Reviewed-by: Aline Manera <alinefm(a)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(a)linux.vnet.ibm.com>
Signed-off-by: Ramon Medeiros <ramonn(a)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(a)linux.vnet.ibm.com>
# Aline Manera <alinefm(a)linux.vnet.ibm.com>
# Daniel Henrique Barboza <danielhb(a)linux.vnet.ibm.com>
+# Paulo Vital <pvital(a)linux.vnet.ibm.com>
# ShaoHe Feng <shaohef(a)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