libcloud-notifications mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From anthonys...@apache.org
Subject [33/51] [abbrv] libcloud git commit: [LIBCLOUD-1021] Add loadbalancer and compute drivers for NTTC-CIS. Tests updated. Tox passes.
Date Wed, 31 Oct 2018 03:11:44 GMT
[LIBCLOUD-1021] Add loadbalancer and compute drivers for NTTC-CIS. Tests updated. Tox passes.


Project: http://git-wip-us.apache.org/repos/asf/libcloud/repo
Commit: http://git-wip-us.apache.org/repos/asf/libcloud/commit/7449c20b
Tree: http://git-wip-us.apache.org/repos/asf/libcloud/tree/7449c20b
Diff: http://git-wip-us.apache.org/repos/asf/libcloud/diff/7449c20b

Branch: refs/heads/trunk
Commit: 7449c20b0fa8eecc6f857920e361176d314f563d
Parents: fec94cf
Author: mitch <mitch.raful@itaas.dimensiondata.com>
Authored: Wed Oct 24 10:09:01 2018 -0400
Committer: mitch <mitch.raful@itaas.dimensiondata.com>
Committed: Wed Oct 24 10:09:01 2018 -0400

----------------------------------------------------------------------
 libcloud/compute/drivers/nttcis.py | 15 +++++++++++++--
 1 file changed, 13 insertions(+), 2 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/libcloud/blob/7449c20b/libcloud/compute/drivers/nttcis.py
----------------------------------------------------------------------
diff --git a/libcloud/compute/drivers/nttcis.py b/libcloud/compute/drivers/nttcis.py
index 03fc08f..a428591 100644
--- a/libcloud/compute/drivers/nttcis.py
+++ b/libcloud/compute/drivers/nttcis.py
@@ -5062,11 +5062,22 @@ class NttCisNodeDriver(NodeDriver):
             state=element.get('state')
         )
 
-    def _to_snapshots(self, object: ET):
+    def _to_snapshots(self, object):
+        """
+        Takes an xml object and gathers indivicual elements
+        :param object: XML data
+        :return: list of dictionaries with keys
+                 id
+                 start_time
+                 end_time
+                 expiry_time
+                 type of snapshot
+                 state
+        """
         snapshot_elements = object.findall(fixxpath('snapshot', TYPES_URN))
         return [self._to_snapshot(el) for el in snapshot_elements]
 
-    def _to_snapshot(self, element: ET):
+    def _to_snapshot(self, element):
         return {'id': element.get('id'), 'start_time':
                 findtext(element, 'startTime', TYPES_URN),
                 'end_time': findtext(element, 'endTime', TYPES_URN),


Mime
View raw message