[Kimchi-devel] [PATCH 2/4] Host's software update: Update REST API
Aline Manera
alinefm at linux.vnet.ibm.com
Mon Feb 10 16:36:15 UTC 2014
On 02/10/2014 12:50 AM, Paulo Vital wrote:
> Define PackageUpdate resource features according to API.md
> Activate auth support to new resource
>
> Signed-off-by: Paulo Vital <pvital at linux.vnet.ibm.com>
> Signed-off-by: Ramon Medeiros <ramonn at linux.vnet.ibm.com>
> ---
> src/kimchi/control/host.py | 12 ++++++++++++
> 1 file changed, 12 insertions(+)
>
> diff --git a/src/kimchi/control/host.py b/src/kimchi/control/host.py
> index 053c822..f382eb3 100644
> --- a/src/kimchi/control/host.py
> +++ b/src/kimchi/control/host.py
> @@ -36,6 +36,8 @@ class Host(Resource):
> self.shutdown = self.generate_action_handler('shutdown')
> self.stats = HostStats(self.model)
> self.partitions = Partitions(self.model)
> + self.packageupdate = PackageUpdate(self.model)
> + self.packageupdate.expose = True
There is no need to expose it here.
>
> @property
> def data(self):
> @@ -61,3 +63,13 @@ class Partition(Resource):
> @property
> def data(self):
> return self.info
> +
> +
> +class PackageUpdate(Resource):
> + def __init__(self, model, id=None):
> + super(PackageUpdate, self).__init__(model, id)
> + self.update = self.generate_action_handler('update')
As we will update all the packages at once the update action should be
in the PackagesUpdate(Collection)
> +
> + @property
> + def data(self):
> + return self.info
More information about the Kimchi-devel
mailing list