add ipv6 to node, from primary nic
Project: http://git-wip-us.apache.org/repos/asf/libcloud/repo Commit: http://git-wip-us.apache.org/repos/asf/libcloud/commit/08937bef Tree: http://git-wip-us.apache.org/repos/asf/libcloud/tree/08937bef Diff: http://git-wip-us.apache.org/repos/asf/libcloud/diff/08937bef Branch: refs/heads/trunk Commit: 08937befa7d7877b2b5bb50df6c8c89b0ae65d87 Parents: db1f603 Author: Bernard Paques <bernard.paq...@gmail.com> Authored: Sat Dec 26 18:53:48 2015 +0100 Committer: anthony-shaw <anthony.p.s...@gmail.com> Committed: Tue Jan 5 19:26:59 2016 +1100 ---------------------------------------------------------------------- libcloud/compute/drivers/dimensiondata.py | 6 ++++++ 1 file changed, 6 insertions(+) ---------------------------------------------------------------------- http://git-wip-us.apache.org/repos/asf/libcloud/blob/08937bef/libcloud/compute/drivers/dimensiondata.py ---------------------------------------------------------------------- diff --git a/libcloud/compute/drivers/dimensiondata.py b/libcloud/compute/drivers/dimensiondata.py index cab39f5..d5bce7b 100644 --- a/libcloud/compute/drivers/dimensiondata.py +++ b/libcloud/compute/drivers/dimensiondata.py @@ -1694,6 +1694,12 @@ class DimensionDataNodeDriver(NodeDriver): if has_network_info else \ element.find(fixxpath('nic', TYPES_URN)).get('privateIpv4') + node.extra['ipv6'] = element.find( + fixxpath('networkInfo/primaryNic', TYPES_URN)) \ + .get('ipv6') \ + if has_network_info else \ + element.find(fixxpath('nic', TYPES_URN)).get('ipv6') + n = Node(id=element.get('id'), name=findtext(element, 'name', TYPES_URN), state=state,