[Kimchi-devel] [PATCH 2/4] Host's software update: Update REST API

Sheldon shaohef at linux.vnet.ibm.com
Mon Feb 10 08:24:32 UTC 2014


Just a minor comment below

On 02/10/2014 10: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
you can remove this:
self.packageupdate.expose = True

$ git show fdbd2a8

>
>       @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')
> +
> +    @property
> +    def data(self):
> +        return self.info


-- 
Thanks and best regards!

Sheldon Feng(冯少合)<shaohef at linux.vnet.ibm.com>
IBM Linux Technology Center




More information about the Kimchi-devel mailing list