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

Aline Manera alinefm at linux.vnet.ibm.com
Wed Jan 29 16:47:24 UTC 2014


Reviewed-by: Aline Manera <alinefm at linux.vnet.ibm.com>

On 01/27/2014 02:34 PM, Paulo Vital wrote:
> Define SoftwareUpdate 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 f041b35..c6abedd 100644
> --- a/src/kimchi/control/host.py
> +++ b/src/kimchi/control/host.py
> @@ -7,6 +7,7 @@
>   #  Adam Litke <agl at linux.vnet.ibm.com>
>   #  Aline Manera <alinefm at linux.vnet.ibm.com>
>   #  Daniel Henrique Barboza <danielhb at linux.vnet.ibm.com>
> +#  Paulo Vital <pvital at linux.vnet.ibm.com>
>   #  ShaoHe Feng <shaohef at linux.vnet.ibm.com>
>   #
>   # This library is free software; you can redistribute it and/or
> @@ -38,6 +39,8 @@ class Host(Resource):
>           self.stats.exposed = True
>           self.partitions = Partitions(self.model)
>           self.partitions.exposed = True
> +        self.softwareupdate = SoftwareUpdate(self.model)
> +        self.softwareupdate.exposed = True
>
>       @property
>       def data(self):
> @@ -63,3 +66,12 @@ class Partition(Resource):
>       @property
>       def data(self):
>           return self.info
> +
> +class SoftwareUpdate(Resource):
> +    def __init__(self, model):
> +        super(SoftwareUpdate, self).__init__(model)
> +        self.update = self.generate_action_handler('update')
> +
> +    @property
> +    def data(self):
> +        return self.info




More information about the Kimchi-devel mailing list