You are viewing a plain text version of this content. The canonical link for it is here.
Posted to notifications@libcloud.apache.org by an...@apache.org on 2018/10/31 03:11:44 UTC
[33/51] [abbrv] libcloud git commit: [LIBCLOUD-1021] Add loadbalancer
and compute drivers for NTTC-CIS. Tests updated. Tox passes.
[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 <mi...@itaas.dimensiondata.com>
Authored: Wed Oct 24 10:09:01 2018 -0400
Committer: mitch <mi...@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),