Define PackageUpdate 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 | 17 +++++++++++++++++
1 file changed, 17 insertions(+)
diff --git a/src/kimchi/control/host.py b/src/kimchi/control/host.py
index 053c822..e9437c7 100644
--- a/src/kimchi/control/host.py
+++ b/src/kimchi/control/host.py
@@ -36,6 +36,7 @@ class Host(Resource):
self.shutdown = self.generate_action_handler('shutdown')
self.stats = HostStats(self.model)
self.partitions = Partitions(self.model)
+ self.packagesupdate = PackagesUpdate(self.model)
@property
def data(self):
@@ -61,3 +62,19 @@ class Partition(Resource):
@property
def data(self):
return self.info
+
+
+class PackagesUpdate(Collection):
+ def __init__(self, model):
+ super(PackagesUpdate, self).__init__(model)
+ self.resource = PackageUpdate
+ self.update = self.model.packagesupdate_update
+
+
+class PackageUpdate(Resource):
+ def __init__(self, model, id=None):
+ super(PackageUpdate, self).__init__(model, id)
+
+ @property
+ def data(self):
+ return self.info
--
1.8.3.1