libcloud-notifications mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From to...@apache.org
Subject svn commit: r1201114 - in /libcloud/trunk: ./ libcloud/compute/ libcloud/compute/drivers/ libcloud/loadbalancer/ test/compute/ test/loadbalancer/
Date Sat, 12 Nov 2011 00:14:37 GMT
Author: tomaz
Date: Sat Nov 12 00:14:36 2011
New Revision: 1201114

URL: http://svn.apache.org/viewvc?rev=1201114&view=rev
Log:
Rename public_ip and private_ip on the Node object to public_ips and
private_ips. For backward compatibility still allow users to access those two
attributes the old way.

Modified:
    libcloud/trunk/CHANGES
    libcloud/trunk/libcloud/compute/base.py
    libcloud/trunk/libcloud/compute/drivers/bluebox.py
    libcloud/trunk/libcloud/compute/drivers/brightbox.py
    libcloud/trunk/libcloud/compute/drivers/cloudsigma.py
    libcloud/trunk/libcloud/compute/drivers/cloudstack.py
    libcloud/trunk/libcloud/compute/drivers/dreamhost.py
    libcloud/trunk/libcloud/compute/drivers/dummy.py
    libcloud/trunk/libcloud/compute/drivers/ec2.py
    libcloud/trunk/libcloud/compute/drivers/ecp.py
    libcloud/trunk/libcloud/compute/drivers/elasticstack.py
    libcloud/trunk/libcloud/compute/drivers/gandi.py
    libcloud/trunk/libcloud/compute/drivers/gogrid.py
    libcloud/trunk/libcloud/compute/drivers/ibm_sbc.py
    libcloud/trunk/libcloud/compute/drivers/linode.py
    libcloud/trunk/libcloud/compute/drivers/opennebula.py
    libcloud/trunk/libcloud/compute/drivers/openstack.py
    libcloud/trunk/libcloud/compute/drivers/opsource.py
    libcloud/trunk/libcloud/compute/drivers/rimuhosting.py
    libcloud/trunk/libcloud/compute/drivers/slicehost.py
    libcloud/trunk/libcloud/compute/drivers/softlayer.py
    libcloud/trunk/libcloud/compute/drivers/vcloud.py
    libcloud/trunk/libcloud/compute/drivers/voxel.py
    libcloud/trunk/libcloud/compute/drivers/vpsnet.py
    libcloud/trunk/libcloud/loadbalancer/base.py
    libcloud/trunk/test/compute/test_base.py
    libcloud/trunk/test/compute/test_brightbox.py
    libcloud/trunk/test/compute/test_cloudsigma.py
    libcloud/trunk/test/compute/test_deployment.py
    libcloud/trunk/test/compute/test_dreamhost.py
    libcloud/trunk/test/compute/test_ec2.py
    libcloud/trunk/test/compute/test_ecp.py
    libcloud/trunk/test/compute/test_elasticstack.py
    libcloud/trunk/test/compute/test_gogrid.py
    libcloud/trunk/test/compute/test_ibm_sbc.py
    libcloud/trunk/test/compute/test_linode.py
    libcloud/trunk/test/compute/test_openstack.py
    libcloud/trunk/test/compute/test_opsource.py
    libcloud/trunk/test/compute/test_rimuhosting.py
    libcloud/trunk/test/compute/test_slicehost.py
    libcloud/trunk/test/compute/test_vcloud.py
    libcloud/trunk/test/compute/test_voxel.py
    libcloud/trunk/test/loadbalancer/test_gogrid.py

Modified: libcloud/trunk/CHANGES
URL: http://svn.apache.org/viewvc/libcloud/trunk/CHANGES?rev=1201114&r1=1201113&r2=1201114&view=diff
==============================================================================
--- libcloud/trunk/CHANGES (original)
+++ libcloud/trunk/CHANGES Sat Nov 12 00:14:36 2011
@@ -12,10 +12,17 @@ Changes with Apache Libcloud in developm
        inconsistencies in the OpenStack driver extension method signatures.
        [Brad Morgan]
 
-     - Update Amazon EC2 driver and pricing data to support a new region - 
+     - Update Amazon EC2 driver and pricing data to support a new region -
        US West 2 (Oregon)
        [Tomaz Muraus]
 
+     - Change public_ip and private_ip attribute on the Node object to the
+       public_ips and private_ips since both of the objects are always a list.
+
+       Note: For backward compatibility you can still access public_ip and
+       private_ip attributes, but this will be removed in the next release.
+       [Tomaz Muraus]
+
   *) Storage:
 
      - Update Amazon S3 driver to support a new region - US West 2 (Oregon)

Modified: libcloud/trunk/libcloud/compute/base.py
URL: http://svn.apache.org/viewvc/libcloud/trunk/libcloud/compute/base.py?rev=1201114&r1=1201113&r2=1201114&view=diff
==============================================================================
--- libcloud/trunk/libcloud/compute/base.py (original)
+++ libcloud/trunk/libcloud/compute/base.py Sat Nov 12 00:14:36 2011
@@ -78,7 +78,7 @@ class Node(object):
     >>> from libcloud.compute.drivers.dummy import DummyNodeDriver
     >>> driver = DummyNodeDriver(0)
     >>> node = driver.create_node()
-    >>> node.public_ip[0]
+    >>> node.public_ips[0]
     '127.0.0.3'
     >>> node.name
     'dummy-3'
@@ -109,19 +109,37 @@ class Node(object):
 
     """
 
-    def __init__(self, id, name, state, public_ip, private_ip,
+    def __init__(self, id, name, state, public_ips, private_ips,
                  driver, size=None, image=None, extra=None):
         self.id = str(id) if id else None
         self.name = name
         self.state = state
-        self.public_ip = public_ip
-        self.private_ip = private_ip
+        self.public_ips = public_ips
+        self.private_ips = private_ips
         self.driver = driver
         self.uuid = self.get_uuid()
         self.size = size
         self.image = image
         self.extra = extra or {}
 
+    # Note: getters and setters bellow are here only for backward compatibility.
+    # They will be removed in the next release.
+
+    def _set_public_ips(self, value):
+        self.public_ips = value
+
+    def _get_public_ips(self):
+        return self.public_ips
+
+    def _set_private_ips(self, value):
+        self.private_ips = value
+
+    def _get_private_ips(self):
+        return self.private_ips
+
+    public_ip = property(fget=_get_public_ips, fset=_set_public_ips)
+    private_ip = property(fget=_get_private_ips, fset=_set_private_ips)
+
     def get_uuid(self):
         """Unique hash for this node
 
@@ -189,9 +207,9 @@ class Node(object):
         return self.driver.destroy_node(self)
 
     def __repr__(self):
-        return (('<Node: uuid=%s, name=%s, state=%s, public_ip=%s, '
+        return (('<Node: uuid=%s, name=%s, state=%s, public_ips=%s, '
                  'provider=%s ...>')
-                % (self.uuid, self.name, self.state, self.public_ip,
+                % (self.uuid, self.name, self.state, self.public_ips,
                    self.driver.name))
 
 
@@ -527,7 +545,7 @@ class NodeDriver(BaseDriver):
             ssh_timeout = kwargs.get('ssh_timeout', 10)
             ssh_key_file = kwargs.get('ssh_key', None)
 
-            ssh_client = SSHClient(hostname=node.public_ip[0],
+            ssh_client = SSHClient(hostname=node.public_ips[0],
                                    port=ssh_port, username=ssh_username,
                                    password=password,
                                    key=ssh_key_file,
@@ -582,7 +600,7 @@ class NodeDriver(BaseDriver):
 
             node = nodes[0]
 
-            if (node.public_ip and node.state == NodeState.RUNNING):
+            if (node.public_ips and node.state == NodeState.RUNNING):
                 return node
             else:
                 time.sleep(wait_period)

Modified: libcloud/trunk/libcloud/compute/drivers/bluebox.py
URL: http://svn.apache.org/viewvc/libcloud/trunk/libcloud/compute/drivers/bluebox.py?rev=1201114&r1=1201113&r2=1201114&view=diff
==============================================================================
--- libcloud/trunk/libcloud/compute/drivers/bluebox.py (original)
+++ libcloud/trunk/libcloud/compute/drivers/bluebox.py Sat Nov 12 00:14:36 2011
@@ -210,8 +210,8 @@ class BlueboxNodeDriver(NodeDriver):
         n = Node(id=vm['id'],
                  name=vm['hostname'],
                  state=state,
-                 public_ip=[ ip['address'] for ip in vm['ips'] ],
-                 private_ip=[],
+                 public_ips=[ ip['address'] for ip in vm['ips'] ],
+                 private_ips=[],
                  extra={'storage':vm['storage'], 'cpu':vm['cpu']},
                  driver=self.connection.driver)
         return n

Modified: libcloud/trunk/libcloud/compute/drivers/brightbox.py
URL: http://svn.apache.org/viewvc/libcloud/trunk/libcloud/compute/drivers/brightbox.py?rev=1201114&r1=1201113&r2=1201114&view=diff
==============================================================================
--- libcloud/trunk/libcloud/compute/drivers/brightbox.py (original)
+++ libcloud/trunk/libcloud/compute/drivers/brightbox.py Sat Nov 12 00:14:36 2011
@@ -114,8 +114,8 @@ class BrightboxNodeDriver(NodeDriver):
             id = data['id'],
             name = data['name'],
             state = self.NODE_STATE_MAP[data['status']],
-            public_ip = map(lambda cloud_ip: cloud_ip['public_ip'], data['cloud_ips']),
-            private_ip = map(lambda interface: interface['ipv4_address'], data['interfaces']),
+            public_ips = map(lambda cloud_ip: cloud_ip['public_ip'], data['cloud_ips']),
+            private_ips = map(lambda interface: interface['ipv4_address'], data['interfaces']),
             driver = self.connection.driver,
             extra = {
                 'status': data['status'],

Modified: libcloud/trunk/libcloud/compute/drivers/cloudsigma.py
URL: http://svn.apache.org/viewvc/libcloud/trunk/libcloud/compute/drivers/cloudsigma.py?rev=1201114&r1=1201113&r2=1201114&view=diff
==============================================================================
--- libcloud/trunk/libcloud/compute/drivers/cloudsigma.py (original)
+++ libcloud/trunk/libcloud/compute/drivers/cloudsigma.py Sat Nov 12 00:14:36 2011
@@ -491,12 +491,12 @@ class CloudSigmaBaseNodeDriver(NodeDrive
                 # creation failed because of insufficient funds.
                 return None
 
-            public_ip = []
+            public_ips = []
             if data.has_key('nic:0:dhcp'):
                 if isinstance(data['nic:0:dhcp'], list):
-                    public_ip = data['nic:0:dhcp']
+                    public_ips = data['nic:0:dhcp']
                 else:
-                    public_ip = [data['nic:0:dhcp']]
+                    public_ips = [data['nic:0:dhcp']]
 
             extra = {}
             extra_keys = [ ('cpu', 'int'), ('smp', 'auto'), ('mem', 'int'), ('status', 'str') ]
@@ -518,7 +518,7 @@ class CloudSigmaBaseNodeDriver(NodeDrive
                 extra.update({'vnc_ip': data['vnc:ip'], 'vnc_password': data['vnc:password']})
 
             node = Node(id = data['server'], name = data['name'], state =  state,
-                        public_ip = public_ip, private_ip = None, driver = self.connection.driver,
+                        public_ips = public_ips, private_ips = None, driver = self.connection.driver,
                         extra = extra)
 
             return node

Modified: libcloud/trunk/libcloud/compute/drivers/cloudstack.py
URL: http://svn.apache.org/viewvc/libcloud/trunk/libcloud/compute/drivers/cloudstack.py?rev=1201114&r1=1201113&r2=1201114&view=diff
==============================================================================
--- libcloud/trunk/libcloud/compute/drivers/cloudstack.py (original)
+++ libcloud/trunk/libcloud/compute/drivers/cloudstack.py Sat Nov 12 00:14:36 2011
@@ -142,8 +142,8 @@ class CloudStackNodeDriver(CloudStackDri
                 id=vm['id'],
                 name=vm.get('displayname', None),
                 state=self.NODE_STATE_MAP[vm['state']],
-                public_ip=public_ips.get(vm['id'], {}).keys(),
-                private_ip=private_ips,
+                public_ips=public_ips.get(vm['id'], {}).keys(),
+                private_ips=private_ips,
                 driver=self,
                 extra={
                     'zoneid': vm['zoneid'],
@@ -207,8 +207,8 @@ class CloudStackNodeDriver(CloudStackDri
             id=node['id'],
             name=node['displayname'],
             state=self.NODE_STATE_MAP[node['state']],
-            public_ip=[],
-            private_ip=[],
+            public_ips=[],
+            private_ips=[],
             driver=self,
             extra={
                 'zoneid': location.id,
@@ -236,7 +236,7 @@ class CloudStackNodeDriver(CloudStackDri
         if result.get('success', '').lower() != 'true':
             return None
 
-        node.public_ip.append(addr['ipaddress'])
+        node.public_ips.append(addr['ipaddress'])
         addr = CloudStackAddress(node, addr['id'], addr['ipaddress'])
         node.extra['ip_addresses'].append(addr)
         return addr
@@ -245,7 +245,7 @@ class CloudStackNodeDriver(CloudStackDri
         "Release a public IP."
 
         node.extra['ip_addresses'].remove(address)
-        node.public_ip.remove(address.address)
+        node.public_ips.remove(address.address)
 
         self._async_request('disableStaticNat', ipaddressid=address.id)
         self._async_request('disassociateIpAddress', id=address.id)

Modified: libcloud/trunk/libcloud/compute/drivers/dreamhost.py
URL: http://svn.apache.org/viewvc/libcloud/trunk/libcloud/compute/drivers/dreamhost.py?rev=1201114&r1=1201113&r2=1201114&view=diff
==============================================================================
--- libcloud/trunk/libcloud/compute/drivers/dreamhost.py (original)
+++ libcloud/trunk/libcloud/compute/drivers/dreamhost.py Sat Nov 12 00:14:36 2011
@@ -151,8 +151,8 @@ class DreamhostNodeDriver(NodeDriver):
             id = data['added_web'],
             name = data['added_web'],
             state = NodeState.PENDING,
-            public_ip = [],
-            private_ip = [],
+            public_ips = [],
+            private_ips = [],
             driver = self.connection.driver,
             extra = {
                 'type' : kwargs['image'].name
@@ -235,8 +235,8 @@ class DreamhostNodeDriver(NodeDriver):
             id = data['ps'],
             name = data['ps'],
             state = NodeState.UNKNOWN,
-            public_ip = [data['ip']],
-            private_ip = [],
+            public_ips = [data['ip']],
+            private_ips = [],
             driver = self.connection.driver,
             extra = {
                 'current_size' : data['memory_mb'],

Modified: libcloud/trunk/libcloud/compute/drivers/dummy.py
URL: http://svn.apache.org/viewvc/libcloud/trunk/libcloud/compute/drivers/dummy.py?rev=1201114&r1=1201113&r2=1201114&view=diff
==============================================================================
--- libcloud/trunk/libcloud/compute/drivers/dummy.py (original)
+++ libcloud/trunk/libcloud/compute/drivers/dummy.py Sat Nov 12 00:14:36 2011
@@ -44,7 +44,7 @@ class DummyNodeDriver(NodeDriver):
     >>> from libcloud.compute.drivers.dummy import DummyNodeDriver
     >>> driver = DummyNodeDriver(0)
     >>> node=driver.create_node()
-    >>> node.public_ip[0]
+    >>> node.public_ips[0]
     '127.0.0.3'
     >>> node.name
     'dummy-3'
@@ -79,8 +79,8 @@ class DummyNodeDriver(NodeDriver):
               Node(id=i,
                    name='dummy-%d' % (i),
                    state=NodeState.RUNNING,
-                   public_ip=[ip],
-                   private_ip=[],
+                   public_ips=[ip],
+                   private_ips=[],
                    driver=self,
                    extra={'foo': 'bar'})
             )
@@ -89,15 +89,15 @@ class DummyNodeDriver(NodeDriver):
               Node(id=1,
                    name='dummy-1',
                    state=NodeState.RUNNING,
-                   public_ip=['127.0.0.1'],
-                   private_ip=[],
+                   public_ips=['127.0.0.1'],
+                   private_ips=[],
                    driver=self,
                    extra={'foo': 'bar'}),
               Node(id=2,
                    name='dummy-2',
                    state=NodeState.RUNNING,
-                   public_ip=['127.0.0.1'],
-                   private_ip=[],
+                   public_ips=['127.0.0.1'],
+                   private_ips=[],
                    driver=self,
                    extra={'foo': 'bar'}),
           ]
@@ -284,8 +284,8 @@ class DummyNodeDriver(NodeDriver):
         n = Node(id=l,
                  name='dummy-%d' % l,
                  state=NodeState.RUNNING,
-                 public_ip=['127.0.0.%d' % l],
-                 private_ip=[],
+                 public_ips=['127.0.0.%d' % l],
+                 private_ips=[],
                  driver=self,
                  size=NodeSize(id='s1', name='foo', ram=2048,
                                disk=160, bandwidth=None, price=0.0,

Modified: libcloud/trunk/libcloud/compute/drivers/ec2.py
URL: http://svn.apache.org/viewvc/libcloud/trunk/libcloud/compute/drivers/ec2.py?rev=1201114&r1=1201113&r2=1201114&view=diff
==============================================================================
--- libcloud/trunk/libcloud/compute/drivers/ec2.py (original)
+++ libcloud/trunk/libcloud/compute/drivers/ec2.py Sat Nov 12 00:14:36 2011
@@ -340,8 +340,8 @@ class EC2NodeDriver(NodeDriver):
                         namespace=NAMESPACE),
             name=name,
             state=state,
-            public_ip=public_ips,
-            private_ip=private_ips,
+            public_ips=public_ips,
+            private_ips=private_ips,
             driver=self.connection.driver,
             extra={
                 'dns_name': findattr(element=element, xpath="dnsName",
@@ -446,7 +446,7 @@ class EC2NodeDriver(NodeDriver):
         nodes_elastic_ips_mappings = self.ex_describe_addresses(nodes)
         for node in nodes:
             ips = nodes_elastic_ips_mappings[node.id]
-            node.public_ip.extend(ips)
+            node.public_ips.extend(ips)
         return nodes
 
     def list_sizes(self, location=None):

Modified: libcloud/trunk/libcloud/compute/drivers/ecp.py
URL: http://svn.apache.org/viewvc/libcloud/trunk/libcloud/compute/drivers/ecp.py?rev=1201114&r1=1201113&r2=1201114&view=diff
==============================================================================
--- libcloud/trunk/libcloud/compute/drivers/ecp.py (original)
+++ libcloud/trunk/libcloud/compute/drivers/ecp.py Sat Nov 12 00:14:36 2011
@@ -171,8 +171,8 @@ class ECPNodeDriver(NodeDriver):
           id=vm['uuid'],
           name=vm['name'],
           state=NodeState.RUNNING,
-          public_ip=public_ips,
-          private_ip=private_ips,
+          public_ips=public_ips,
+          private_ips=private_ips,
           driver=self,
         )
 
@@ -352,8 +352,8 @@ class ECPNodeDriver(NodeDriver):
             id=response['machine_id'],
             name=data['name'],
             state=NodeState.PENDING,
-            public_ip=[],
-            private_ip=[],
+            public_ips=[],
+            private_ips=[],
             driver=self,
         )
 

Modified: libcloud/trunk/libcloud/compute/drivers/elasticstack.py
URL: http://svn.apache.org/viewvc/libcloud/trunk/libcloud/compute/drivers/elasticstack.py?rev=1201114&r1=1201113&r2=1201114&view=diff
==============================================================================
--- libcloud/trunk/libcloud/compute/drivers/elasticstack.py (original)
+++ libcloud/trunk/libcloud/compute/drivers/elasticstack.py Sat Nov 12 00:14:36 2011
@@ -445,7 +445,7 @@ class ElasticStackBaseNodeDriver(NodeDri
             extra.update({'password': ssh_password})
 
         node = Node(id=data['server'], name=data['name'], state=state,
-                    public_ip=public_ip, private_ip=None,
+                    public_ips=public_ip, private_ips=None,
                     driver=self.connection.driver,
                     extra=extra)
 

Modified: libcloud/trunk/libcloud/compute/drivers/gandi.py
URL: http://svn.apache.org/viewvc/libcloud/trunk/libcloud/compute/drivers/gandi.py?rev=1201114&r1=1201113&r2=1201114&view=diff
==============================================================================
--- libcloud/trunk/libcloud/compute/drivers/gandi.py (original)
+++ libcloud/trunk/libcloud/compute/drivers/gandi.py Sat Nov 12 00:14:36 2011
@@ -67,8 +67,8 @@ class GandiNodeDriver(BaseGandiDriver, N
                 vm['state'],
                 NodeState.UNKNOWN
             ),
-            public_ip=vm.get('ip'),
-            private_ip='',
+            public_ips=vm.get('ip'),
+            private_ips=[],
             driver=self,
             extra={
                 'ai_active': vm.get('ai_active'),

Modified: libcloud/trunk/libcloud/compute/drivers/gogrid.py
URL: http://svn.apache.org/viewvc/libcloud/trunk/libcloud/compute/drivers/gogrid.py?rev=1201114&r1=1201113&r2=1201114&view=diff
==============================================================================
--- libcloud/trunk/libcloud/compute/drivers/gogrid.py (original)
+++ libcloud/trunk/libcloud/compute/drivers/gogrid.py Sat Nov 12 00:14:36 2011
@@ -83,7 +83,7 @@ class GoGridNode(Node):
     # so uuid of node should not change after add is completed
     def get_uuid(self):
         return hashlib.sha1(
-            "%s:%d" % (self.public_ip,self.driver.type)
+            "%s:%d" % (self.public_ips,self.driver.type)
         ).hexdigest()
 
 class GoGridNodeDriver(BaseGoGridDriver, NodeDriver):
@@ -119,8 +119,8 @@ class GoGridNodeDriver(BaseGoGridDriver,
         n = GoGridNode(id=id,
                  name=element['name'],
                  state=state,
-                 public_ip=[ip],
-                 private_ip=[],
+                 public_ips=[ip],
+                 private_ips=[],
                  extra={'ram': element.get('ram').get('name'),
                      'description': element.get('description', '')},
                  driver=self.connection.driver)
@@ -279,7 +279,7 @@ class GoGridNodeDriver(BaseGoGridDriver,
             nodes = self.list_nodes()
 
             for i in nodes:
-                if i.public_ip[0] == node.public_ip[0] and i.id is not None:
+                if i.public_ips[0] == node.public_ips[0] and i.id is not None:
                     return i
 
             waittime += interval

Modified: libcloud/trunk/libcloud/compute/drivers/ibm_sbc.py
URL: http://svn.apache.org/viewvc/libcloud/trunk/libcloud/compute/drivers/ibm_sbc.py?rev=1201114&r1=1201113&r2=1201114&view=diff
==============================================================================
--- libcloud/trunk/libcloud/compute/drivers/ibm_sbc.py (original)
+++ libcloud/trunk/libcloud/compute/drivers/ibm_sbc.py Sat Nov 12 00:14:36 2011
@@ -160,8 +160,8 @@ class IBMNodeDriver(NodeDriver):
         return Node(id = instance.findtext('ID'),
                     name = instance.findtext('Name'),
                     state = self.NODE_STATE_MAP[int(instance.findtext('Status'))],
-                    public_ip = instance.findtext('IP'),
-                    private_ip = None,
+                    public_ips = instance.findtext('IP'),
+                    private_ips = None,
                     driver = self.connection.driver)
 
     def _to_images(self, object):

Modified: libcloud/trunk/libcloud/compute/drivers/linode.py
URL: http://svn.apache.org/viewvc/libcloud/trunk/libcloud/compute/drivers/linode.py?rev=1201114&r1=1201113&r2=1201114&view=diff
==============================================================================
--- libcloud/trunk/libcloud/compute/drivers/linode.py (original)
+++ libcloud/trunk/libcloud/compute/drivers/linode.py Sat Nov 12 00:14:36 2011
@@ -438,8 +438,8 @@ class LinodeNodeDriver(NodeDriver):
         batch = []
         for o in objs:
             lid = o["LINODEID"]
-            nodes[lid] = n = Node(id=lid, name=o["LABEL"], public_ip=[],
-                private_ip=[], state=self.LINODE_STATES[o["STATUS"]],
+            nodes[lid] = n = Node(id=lid, name=o["LABEL"], public_ips=[],
+                private_ips=[], state=self.LINODE_STATES[o["STATUS"]],
                 driver=self.connection.driver)
             n.extra = copy(o)
             n.extra["PLANID"] = self._linode_plan_ids.get(o.get("TOTALRAM"))
@@ -462,8 +462,8 @@ class LinodeNodeDriver(NodeDriver):
         for ip_list in ip_answers:
             for ip in ip_list:
                 lid = ip["LINODEID"]
-                which = nodes[lid].public_ip if ip["ISPUBLIC"] == 1 else \
-                    nodes[lid].private_ip
+                which = nodes[lid].public_ips if ip["ISPUBLIC"] == 1 else \
+                    nodes[lid].private_ips
                 which.append(ip["IPADDRESS"])
         return nodes.values()
 

Modified: libcloud/trunk/libcloud/compute/drivers/opennebula.py
URL: http://svn.apache.org/viewvc/libcloud/trunk/libcloud/compute/drivers/opennebula.py?rev=1201114&r1=1201113&r2=1201114&view=diff
==============================================================================
--- libcloud/trunk/libcloud/compute/drivers/opennebula.py (original)
+++ libcloud/trunk/libcloud/compute/drivers/opennebula.py Sat Nov 12 00:14:36 2011
@@ -300,8 +300,8 @@ class OpenNebulaNodeDriver(NodeDriver):
         return Node(id=compute.findtext('ID'),
                     name=compute.findtext('NAME'),
                     state=state,
-                    public_ip=networks,
-                    private_ip=[],
+                    public_ips=networks,
+                    private_ips=[],
                     driver=self.connection.driver)
 
     def _xml_action(self, compute_id, action):

Modified: libcloud/trunk/libcloud/compute/drivers/openstack.py
URL: http://svn.apache.org/viewvc/libcloud/trunk/libcloud/compute/drivers/openstack.py?rev=1201114&r1=1201113&r2=1201114&view=diff
==============================================================================
--- libcloud/trunk/libcloud/compute/drivers/openstack.py (original)
+++ libcloud/trunk/libcloud/compute/drivers/openstack.py Sat Nov 12 00:14:36 2011
@@ -608,8 +608,8 @@ class OpenStack_1_0_NodeDriver(OpenStack
                  name=el.get('name'),
                  state=self.NODE_STATE_MAP.get(
                      el.get('status'), NodeState.UNKNOWN),
-                 public_ip=public_ip,
-                 private_ip=private_ip,
+                 public_ips=public_ip,
+                 private_ips=private_ip,
                  driver=self.connection.driver,
                  extra={
                     'password': el.get('adminPass'),
@@ -1016,9 +1016,9 @@ class OpenStack_1_1_NodeDriver(OpenStack
             name=api_node['name'],
             state=self.NODE_STATE_MAP.get(api_node['status'],
                                           NodeState.UNKNOWN),
-            public_ip=[addr_desc['addr'] for addr_desc in
+            public_ips=[addr_desc['addr'] for addr_desc in
                        api_node['addresses'].get('public', [])],
-            private_ip=[addr_desc['addr'] for addr_desc in
+            private_ips=[addr_desc['addr'] for addr_desc in
                         api_node['addresses'].get('private', [])],
             driver=self,
             extra=dict(

Modified: libcloud/trunk/libcloud/compute/drivers/opsource.py
URL: http://svn.apache.org/viewvc/libcloud/trunk/libcloud/compute/drivers/opsource.py?rev=1201114&r1=1201113&r2=1201114&view=diff
==============================================================================
--- libcloud/trunk/libcloud/compute/drivers/opsource.py (original)
+++ libcloud/trunk/libcloud/compute/drivers/opsource.py Sat Nov 12 00:14:36 2011
@@ -540,8 +540,8 @@ class OpsourceNodeDriver(NodeDriver):
         n = Node(id=findtext(element, 'id', SERVER_NS),
                  name=findtext(element, 'name', SERVER_NS),
                  state=state,
-                 public_ip="unknown",
-                 private_ip=findtext(element, 'privateIpAddress', SERVER_NS),
+                 public_ips="unknown",
+                 private_ips=findtext(element, 'privateIpAddress', SERVER_NS),
                  driver=self.connection.driver,
                  extra=extra)
         return n

Modified: libcloud/trunk/libcloud/compute/drivers/rimuhosting.py
URL: http://svn.apache.org/viewvc/libcloud/trunk/libcloud/compute/drivers/rimuhosting.py?rev=1201114&r1=1201113&r2=1201114&view=diff
==============================================================================
--- libcloud/trunk/libcloud/compute/drivers/rimuhosting.py (original)
+++ libcloud/trunk/libcloud/compute/drivers/rimuhosting.py Sat Nov 12 00:14:36 2011
@@ -131,11 +131,11 @@ class RimuHostingNodeDriver(NodeDriver):
         n = Node(id=order['slug'],
                 name=order['domain_name'],
                 state=NodeState.RUNNING,
-                public_ip=(
+                public_ips=(
                     [order['allocated_ips']['primary_ip']]
                     + order['allocated_ips']['secondary_ips']
                 ),
-                private_ip=[],
+                private_ips=[],
                 driver=self.connection.driver,
                 extra={'order_oid': order['order_oid'],
                        'monthly_recurring_fee': order.get('billing_info').get('monthly_recurring_fee')})

Modified: libcloud/trunk/libcloud/compute/drivers/slicehost.py
URL: http://svn.apache.org/viewvc/libcloud/trunk/libcloud/compute/drivers/slicehost.py?rev=1201114&r1=1201113&r2=1201114&view=diff
==============================================================================
--- libcloud/trunk/libcloud/compute/drivers/slicehost.py (original)
+++ libcloud/trunk/libcloud/compute/drivers/slicehost.py Sat Nov 12 00:14:36 2011
@@ -197,8 +197,8 @@ class SlicehostNodeDriver(NodeDriver):
         n = Node(id=element.findtext('id'),
                  name=element.findtext('name'),
                  state=state,
-                 public_ip=public_ip,
-                 private_ip=private_ip,
+                 public_ips=public_ip,
+                 private_ips=private_ip,
                  driver=self.connection.driver,
                  extra=extra)
         return n

Modified: libcloud/trunk/libcloud/compute/drivers/softlayer.py
URL: http://svn.apache.org/viewvc/libcloud/trunk/libcloud/compute/drivers/softlayer.py?rev=1201114&r1=1201113&r2=1201114&view=diff
==============================================================================
--- libcloud/trunk/libcloud/compute/drivers/softlayer.py (original)
+++ libcloud/trunk/libcloud/compute/drivers/softlayer.py Sat Nov 12 00:14:36 2011
@@ -264,8 +264,8 @@ class SoftLayerNodeDriver(NodeDriver):
                 host['powerState']['keyName'],
                 NodeState.UNKNOWN
             ),
-            public_ip=[host['primaryIpAddress']],
-            private_ip=[host['primaryBackendIpAddress']],
+            public_ips=[host['primaryIpAddress']],
+            private_ips=[host['primaryBackendIpAddress']],
             driver=self,
             extra={
                 'password': password,

Modified: libcloud/trunk/libcloud/compute/drivers/vcloud.py
URL: http://svn.apache.org/viewvc/libcloud/trunk/libcloud/compute/drivers/vcloud.py?rev=1201114&r1=1201113&r2=1201114&view=diff
==============================================================================
--- libcloud/trunk/libcloud/compute/drivers/vcloud.py (original)
+++ libcloud/trunk/libcloud/compute/drivers/vcloud.py Sat Nov 12 00:14:36 2011
@@ -324,8 +324,8 @@ class VCloudNodeDriver(NodeDriver):
         node = Node(id=elm.get('href'),
                     name=name,
                     state=state,
-                    public_ip=public_ips,
-                    private_ip=private_ips,
+                    public_ips=public_ips,
+                    private_ips=private_ips,
                     driver=self.connection.driver)
 
         return node

Modified: libcloud/trunk/libcloud/compute/drivers/voxel.py
URL: http://svn.apache.org/viewvc/libcloud/trunk/libcloud/compute/drivers/voxel.py?rev=1201114&r1=1201113&r2=1201114&view=diff
==============================================================================
--- libcloud/trunk/libcloud/compute/drivers/voxel.py (original)
+++ libcloud/trunk/libcloud/compute/drivers/voxel.py Sat Nov 12 00:14:36 2011
@@ -231,8 +231,8 @@ class VoxelNodeDriver(NodeDriver):
                 id = object.findtext("device/id"),
                 name = kwargs["name"],
                 state = NODE_STATE_MAP[object.findtext("device/status")],
-                public_ip = kwargs.get("publicip", None),
-                private_ip = kwargs.get("privateip", None),
+                public_ips = kwargs.get("publicip", None),
+                private_ips = kwargs.get("privateip", None),
                 driver = self.connection.driver
             )
         else:
@@ -293,8 +293,8 @@ class VoxelNodeDriver(NodeDriver):
                 nodes.append(Node(id= element.attrib['id'],
                                  name=element.attrib['label'],
                                  state=state,
-                                 public_ip= public_ip,
-                                 private_ip= private_ip,
+                                 public_ips= public_ip,
+                                 private_ips= private_ip,
                                  driver=self.connection.driver))
         return nodes
 

Modified: libcloud/trunk/libcloud/compute/drivers/vpsnet.py
URL: http://svn.apache.org/viewvc/libcloud/trunk/libcloud/compute/drivers/vpsnet.py?rev=1201114&r1=1201113&r2=1201114&view=diff
==============================================================================
--- libcloud/trunk/libcloud/compute/drivers/vpsnet.py (original)
+++ libcloud/trunk/libcloud/compute/drivers/vpsnet.py Sat Nov 12 00:14:36 2011
@@ -91,8 +91,8 @@ class VPSNetNodeDriver(NodeDriver):
         n = Node(id=vm['id'],
                  name=vm['label'],
                  state=state,
-                 public_ip=[vm.get('primary_ip_address', None)],
-                 private_ip=[],
+                 public_ips=[vm.get('primary_ip_address', None)],
+                 private_ips=[],
                  extra={'slices_count':vm['slices_count']}, # Number of nodes consumed by VM
                  driver=self.connection.driver)
         return n

Modified: libcloud/trunk/libcloud/loadbalancer/base.py
URL: http://svn.apache.org/viewvc/libcloud/trunk/libcloud/loadbalancer/base.py?rev=1201114&r1=1201113&r2=1201114&view=diff
==============================================================================
--- libcloud/trunk/libcloud/loadbalancer/base.py (original)
+++ libcloud/trunk/libcloud/loadbalancer/base.py Sat Nov 12 00:14:36 2011
@@ -169,7 +169,7 @@ class Driver(BaseDriver):
         """
 
         return self.balancer_attach_member(balancer, Member(None,
-                                           node.public_ip[0],
+                                           node.public_ips[0],
                                            balancer.port))
 
     def balancer_attach_member(self, balancer, member):

Modified: libcloud/trunk/test/compute/test_base.py
URL: http://svn.apache.org/viewvc/libcloud/trunk/test/compute/test_base.py?rev=1201114&r1=1201113&r2=1201114&view=diff
==============================================================================
--- libcloud/trunk/test/compute/test_base.py (original)
+++ libcloud/trunk/test/compute/test_base.py Sat Nov 12 00:14:36 2011
@@ -27,7 +27,7 @@ class FakeDriver(object):
 class BaseTests(unittest.TestCase):
 
     def test_base_node(self):
-        Node(id=0, name=0, state=0, public_ip=0, private_ip=0,
+        Node(id=0, name=0, state=0, public_ips=0, private_ips=0,
              driver=FakeDriver())
 
     def test_base_node_size(self):

Modified: libcloud/trunk/test/compute/test_brightbox.py
URL: http://svn.apache.org/viewvc/libcloud/trunk/test/compute/test_brightbox.py?rev=1201114&r1=1201113&r2=1201114&view=diff
==============================================================================
--- libcloud/trunk/test/compute/test_brightbox.py (original)
+++ libcloud/trunk/test/compute/test_brightbox.py Sat Nov 12 00:14:36 2011
@@ -47,8 +47,8 @@ class BrightboxTest(unittest.TestCase, T
     def test_list_nodes(self):
         nodes = self.driver.list_nodes()
         self.assertEqual(len(nodes), 1)
-        self.assertTrue('109.107.42.129' in nodes[0].public_ip)
-        self.assertTrue('10.110.24.54' in nodes[0].private_ip)
+        self.assertTrue('109.107.42.129' in nodes[0].public_ips)
+        self.assertTrue('10.110.24.54' in nodes[0].private_ips)
         self.assertEqual(nodes[0].state, NodeState.RUNNING)
 
     def test_list_sizes(self):

Modified: libcloud/trunk/test/compute/test_cloudsigma.py
URL: http://svn.apache.org/viewvc/libcloud/trunk/test/compute/test_cloudsigma.py?rev=1201114&r1=1201113&r2=1201114&view=diff
==============================================================================
--- libcloud/trunk/test/compute/test_cloudsigma.py (original)
+++ libcloud/trunk/test/compute/test_cloudsigma.py Sat Nov 12 00:14:36 2011
@@ -38,7 +38,7 @@ class CloudSigmaTestCase(unittest.TestCa
         self.assertEqual(len(nodes), 1)
 
         node = nodes[0]
-        self.assertEqual(node.public_ip[0], "1.2.3.4")
+        self.assertEqual(node.public_ips[0], "1.2.3.4")
         self.assertEqual(node.extra['smp'], 1)
         self.assertEqual(node.extra['cpu'], 1100)
         self.assertEqual(node.extra['mem'], 640)

Modified: libcloud/trunk/test/compute/test_deployment.py
URL: http://svn.apache.org/viewvc/libcloud/trunk/test/compute/test_deployment.py?rev=1201114&r1=1201113&r2=1201114&view=diff
==============================================================================
--- libcloud/trunk/test/compute/test_deployment.py (original)
+++ libcloud/trunk/test/compute/test_deployment.py Sat Nov 12 00:14:36 2011
@@ -59,7 +59,7 @@ class DeploymentTests(unittest.TestCase)
         self.driver = Rackspace(*RACKSPACE_PARAMS)
         self.driver.features = {'create_node': ['generates_password']}
         self.node = Node(id=12345, name='test', state=NodeState.RUNNING,
-                   public_ip=['1.2.3.4'], private_ip='1.2.3.5',
+                   public_ips=['1.2.3.4'], private_ips=['1.2.3.5'],
                    driver=Rackspace)
 
     def test_multi_step_deployment(self):

Modified: libcloud/trunk/test/compute/test_dreamhost.py
URL: http://svn.apache.org/viewvc/libcloud/trunk/test/compute/test_dreamhost.py?rev=1201114&r1=1201113&r2=1201114&view=diff
==============================================================================
--- libcloud/trunk/test/compute/test_dreamhost.py (original)
+++ libcloud/trunk/test/compute/test_dreamhost.py Sat Nov 12 00:14:36 2011
@@ -77,7 +77,7 @@ class DreamhostTest(unittest.TestCase, T
         # Web node tests
         self.assertEqual(web_node.id, 'ps22174')
         self.assertEqual(web_node.state, NodeState.UNKNOWN)
-        self.assertTrue('75.119.203.51' in web_node.public_ip)
+        self.assertTrue('75.119.203.51' in web_node.public_ips)
         self.assertTrue(
             web_node.extra.has_key('current_size') and
             web_node.extra['current_size'] == 500
@@ -93,7 +93,7 @@ class DreamhostTest(unittest.TestCase, T
         # MySql node tests
         self.assertEqual(mysql_node.id, 'ps22175')
         self.assertEqual(mysql_node.state, NodeState.UNKNOWN)
-        self.assertTrue('75.119.203.52' in mysql_node.public_ip)
+        self.assertTrue('75.119.203.52' in mysql_node.public_ips)
         self.assertTrue(
             mysql_node.extra.has_key('current_size') and
             mysql_node.extra['current_size'] == 1500

Modified: libcloud/trunk/test/compute/test_ec2.py
URL: http://svn.apache.org/viewvc/libcloud/trunk/test/compute/test_ec2.py?rev=1201114&r1=1201113&r2=1201114&view=diff
==============================================================================
--- libcloud/trunk/test/compute/test_ec2.py (original)
+++ libcloud/trunk/test/compute/test_ec2.py Sat Nov 12 00:14:36 2011
@@ -99,10 +99,10 @@ class EC2Tests(LibcloudTestCase, TestCas
 
     def test_list_nodes(self):
         node = self.driver.list_nodes()[0]
-        public_ips = sorted(node.public_ip)
+        public_ips = sorted(node.public_ips)
         self.assertEqual(node.id, 'i-4382922a')
         self.assertEqual(node.name, node.id)
-        self.assertEqual(len(node.public_ip), 2)
+        self.assertEqual(len(node.public_ips), 2)
         self.assertEqual(node.extra['launchdatetime'], '2009-08-07T05:47:04.000Z')
         self.assertTrue('instancetype' in node.extra)
 
@@ -399,17 +399,17 @@ class NimbusTests(EC2Tests):
         # overridden from EC2Tests -- Nimbus doesn't support elastic IPs.
         node = self.driver.list_nodes()[0]
         self.assertExecutedMethodCount(0)
-        public_ips = node.public_ip
+        public_ips = node.public_ips
         self.assertEqual(node.id, 'i-4382922a')
-        self.assertEqual(len(node.public_ip), 1)
+        self.assertEqual(len(node.public_ips), 1)
         self.assertEqual(public_ips[0], '1.2.3.5')
         self.assertEqual(node.extra['tags'], {})
 
         node = self.driver.list_nodes()[1]
         self.assertExecutedMethodCount(0)
-        public_ips = node.public_ip
+        public_ips = node.public_ips
         self.assertEqual(node.id, 'i-8474834a')
-        self.assertEqual(len(node.public_ip), 1)
+        self.assertEqual(len(node.public_ips), 1)
         self.assertEqual(public_ips[0], '1.2.3.5')
         self.assertEqual(node.extra['tags'], {'user_key0': 'user_val0', 'user_key1': 'user_val1'})
 

Modified: libcloud/trunk/test/compute/test_ecp.py
URL: http://svn.apache.org/viewvc/libcloud/trunk/test/compute/test_ecp.py?rev=1201114&r1=1201113&r2=1201114&view=diff
==============================================================================
--- libcloud/trunk/test/compute/test_ecp.py (original)
+++ libcloud/trunk/test/compute/test_ecp.py Sat Nov 12 00:14:36 2011
@@ -39,7 +39,7 @@ class ECPTests(unittest.TestCase, TestCa
         node = nodes[0]
         self.assertEqual(node.id, '1')
         self.assertEqual(node.name, 'dummy-1')
-        self.assertEqual(node.public_ip[0], "42.78.124.75")
+        self.assertEqual(node.public_ips[0], "42.78.124.75")
         self.assertEqual(node.state, NodeState.RUNNING)
 
 

Modified: libcloud/trunk/test/compute/test_elasticstack.py
URL: http://svn.apache.org/viewvc/libcloud/trunk/test/compute/test_elasticstack.py?rev=1201114&r1=1201113&r2=1201114&view=diff
==============================================================================
--- libcloud/trunk/test/compute/test_elasticstack.py (original)
+++ libcloud/trunk/test/compute/test_elasticstack.py Sat Nov 12 00:14:36 2011
@@ -50,8 +50,8 @@ class ElasticStackTestCase(object):
         self.mockHttp = ElasticStackMockHttp
         self.mockHttp.type = None
 
-        self.node = Node(id=72258, name=None, state=None, public_ip=None,
-                         private_ip=None, driver=self.driver)
+        self.node = Node(id=72258, name=None, state=None, public_ips=None,
+                         private_ips=None, driver=self.driver)
 
     def test_invalid_creds(self):
         self.mockHttp.type = 'UNAUTHORIZED'
@@ -100,8 +100,8 @@ class ElasticStackTestCase(object):
         self.assertEqual(len(nodes), 1)
 
         node = nodes[0]
-        self.assertEqual(node.public_ip[0], "1.2.3.4")
-        self.assertEqual(node.public_ip[1], "1.2.3.5")
+        self.assertEqual(node.public_ips[0], "1.2.3.4")
+        self.assertEqual(node.public_ips[1], "1.2.3.5")
         self.assertEqual(node.extra['smp'], 1)
 
     def test_list_sizes(self):

Modified: libcloud/trunk/test/compute/test_gogrid.py
URL: http://svn.apache.org/viewvc/libcloud/trunk/test/compute/test_gogrid.py?rev=1201114&r1=1201113&r2=1201114&view=diff
==============================================================================
--- libcloud/trunk/test/compute/test_gogrid.py (original)
+++ libcloud/trunk/test/compute/test_gogrid.py Sat Nov 12 00:14:36 2011
@@ -155,7 +155,7 @@ class GoGridTests(unittest.TestCase, Tes
 
     def test_ex_edit_node(self):
         node = Node(id=90967, name=None, state=None,
-                    public_ip=None, private_ip=None, driver=self.driver)
+                    public_ips=None, private_ips=None, driver=self.driver)
         ret = self.driver.ex_edit_node(node=node,
                                        size=self._get_test_512Mb_node_size())
 

Modified: libcloud/trunk/test/compute/test_ibm_sbc.py
URL: http://svn.apache.org/viewvc/libcloud/trunk/test/compute/test_ibm_sbc.py?rev=1201114&r1=1201113&r2=1201114&view=diff
==============================================================================
--- libcloud/trunk/test/compute/test_ibm_sbc.py (original)
+++ libcloud/trunk/test/compute/test_ibm_sbc.py Sat Nov 12 00:14:36 2011
@@ -50,10 +50,10 @@ class IBMTests(unittest.TestCase, TestCa
         self.assertEquals(len(ret), 3)
         self.assertEquals(ret[0].id, '26557')
         self.assertEquals(ret[0].name, 'Insight Instance')
-        self.assertEquals(ret[0].public_ip, '129.33.196.128')
-        self.assertEquals(ret[0].private_ip, None)  # Private IPs not supported
-        self.assertEquals(ret[1].public_ip, None)   # Node is non-active (no IP)
-        self.assertEquals(ret[1].private_ip, None)
+        self.assertEquals(ret[0].public_ips, '129.33.196.128')
+        self.assertEquals(ret[0].private_ips, None)  # Private IPs not supported
+        self.assertEquals(ret[1].public_ips, None)   # Node is non-active (no IP)
+        self.assertEquals(ret[1].private_ips, None)
         self.assertEquals(ret[1].id, '28193')
 
     def test_list_sizes(self):

Modified: libcloud/trunk/test/compute/test_linode.py
URL: http://svn.apache.org/viewvc/libcloud/trunk/test/compute/test_linode.py?rev=1201114&r1=1201113&r2=1201114&view=diff
==============================================================================
--- libcloud/trunk/test/compute/test_linode.py (original)
+++ libcloud/trunk/test/compute/test_linode.py Sat Nov 12 00:14:36 2011
@@ -41,8 +41,8 @@ class LinodeTest(unittest.TestCase, Test
         node = nodes[0]
         self.assertEqual(node.id, "8098")
         self.assertEqual(node.name, 'api-node3')
-        self.assertTrue('75.127.96.245' in node.public_ip)
-        self.assertEqual(node.private_ip, [])
+        self.assertTrue('75.127.96.245' in node.public_ips)
+        self.assertEqual(node.private_ips, [])
 
     def test_reboot_node(self):
         # An exception would indicate failure

Modified: libcloud/trunk/test/compute/test_openstack.py
URL: http://svn.apache.org/viewvc/libcloud/trunk/test/compute/test_openstack.py?rev=1201114&r1=1201113&r2=1201114&view=diff
==============================================================================
--- libcloud/trunk/test/compute/test_openstack.py (original)
+++ libcloud/trunk/test/compute/test_openstack.py Sat Nov 12 00:14:36 2011
@@ -118,8 +118,8 @@ class OpenStack_1_0_Tests(unittest.TestC
         ret = self.driver.list_nodes()
         self.assertEqual(len(ret), 1)
         node = ret[0]
-        self.assertEqual('67.23.21.33', node.public_ip[0])
-        self.assertEqual('10.176.168.218', node.private_ip[0])
+        self.assertEqual('67.23.21.33', node.public_ips[0])
+        self.assertEqual('10.176.168.218', node.private_ips[0])
         self.assertEqual(node.extra.get('flavorId'), '1')
         self.assertEqual(node.extra.get('imageId'), '11')
         self.assertEqual(type(node.extra.get('metadata')), type(dict()))
@@ -183,14 +183,14 @@ class OpenStack_1_0_Tests(unittest.TestC
         self.assertEqual(node.extra.get('metadata'), metadata)
 
     def test_reboot_node(self):
-        node = Node(id=72258, name=None, state=None, public_ip=None,
-                    private_ip=None, driver=self.driver)
+        node = Node(id=72258, name=None, state=None, public_ips=None,
+                    private_ips=None, driver=self.driver)
         ret = node.reboot()
         self.assertTrue(ret is True)
 
     def test_destroy_node(self):
-        node = Node(id=72258, name=None, state=None, public_ip=None,
-                    private_ip=None, driver=self.driver)
+        node = Node(id=72258, name=None, state=None, public_ips=None,
+                    private_ips=None, driver=self.driver)
         ret = node.destroy()
         self.assertTrue(ret is True)
 
@@ -200,8 +200,8 @@ class OpenStack_1_0_Tests(unittest.TestC
         self.assertTrue("absolute" in limits)
 
     def test_ex_save_image(self):
-        node = Node(id=444222, name=None, state=None, public_ip=None,
-                    private_ip=None, driver=self.driver)
+        node = Node(id=444222, name=None, state=None, public_ips=None,
+                    private_ips=None, driver=self.driver)
         image = self.driver.ex_save_image(node, "imgtest")
         self.assertEqual(image.name, "imgtest")
         self.assertEqual(image.id, "12345")
@@ -267,20 +267,20 @@ class OpenStack_1_0_Tests(unittest.TestC
         self.assertEquals(True, ret)
 
     def test_ex_resize(self):
-        node = Node(id=444222, name=None, state=None, public_ip=None,
-                    private_ip=None, driver=self.driver)
+        node = Node(id=444222, name=None, state=None, public_ips=None,
+                    private_ips=None, driver=self.driver)
         size = NodeSize(1, '256 slice', None, None, None, None,
                         driver=self.driver)
         self.assertTrue(self.driver.ex_resize(node=node, size=size))
 
     def test_ex_confirm_resize(self):
-        node = Node(id=444222, name=None, state=None, public_ip=None,
-                    private_ip=None, driver=self.driver)
+        node = Node(id=444222, name=None, state=None, public_ips=None,
+                    private_ips=None, driver=self.driver)
         self.assertTrue(self.driver.ex_confirm_resize(node=node))
 
     def test_ex_revert_resize(self):
-        node = Node(id=444222, name=None, state=None, public_ip=None,
-                    private_ip=None, driver=self.driver)
+        node = Node(id=444222, name=None, state=None, public_ips=None,
+                    private_ips=None, driver=self.driver)
         self.assertTrue(self.driver.ex_revert_resize(node=node))
 
     def test_list_sizes(self):
@@ -499,10 +499,10 @@ class OpenStack_1_1_Tests(unittest.TestC
         node = nodes[0]
 
         self.assertEqual('12065', node.id)
-        self.assertEqual('50.57.94.35', node.public_ip[0])
-        self.assertEqual('2001:4801:7808:52:16:3eff:fe47:788a', node.public_ip[1])
-        self.assertEqual('10.182.64.34', node.private_ip[0])
-        self.assertEqual('fec0:4801:7808:52:16:3eff:fe60:187d', node.private_ip[1])
+        self.assertEqual('50.57.94.35', node.public_ips[0])
+        self.assertEqual('2001:4801:7808:52:16:3eff:fe47:788a', node.public_ips[1])
+        self.assertEqual('10.182.64.34', node.private_ips[0])
+        self.assertEqual('fec0:4801:7808:52:16:3eff:fe60:187d', node.private_ips[1])
 
         self.assertEqual(node.extra.get('flavorId'), '2')
         self.assertEqual(node.extra.get('imageId'), '7')
@@ -604,7 +604,7 @@ class OpenStack_1_1_Tests(unittest.TestC
     def test_ex_set_server_name(self):
         old_node = Node(
             id='12064', name=None, state=None,
-            public_ip=None, private_ip=None, driver=self.driver,
+            public_ips=None, private_ips=None, driver=self.driver,
         )
         new_node = self.driver.ex_set_server_name(old_node, 'Bob')
         self.assertEqual('Bob', new_node.name)
@@ -612,7 +612,7 @@ class OpenStack_1_1_Tests(unittest.TestC
     def test_ex_set_metadata(self):
         old_node = Node(
             id='12063', name=None, state=None,
-            public_ip=None, private_ip=None, driver=self.driver,
+            public_ips=None, private_ips=None, driver=self.driver,
         )
         metadata = {'Image Version': '2.1', 'Server Label': 'Web Head 1'}
         returned_metadata = self.driver.ex_set_metadata(old_node, metadata)
@@ -621,7 +621,7 @@ class OpenStack_1_1_Tests(unittest.TestC
     def test_ex_get_metadata(self):
         node = Node(
             id='12063', name=None, state=None,
-            public_ip=None, private_ip=None, driver=self.driver,
+            public_ips=None, private_ips=None, driver=self.driver,
         )
 
         metadata = {'Image Version': '2.1', 'Server Label': 'Web Head 1'}
@@ -631,14 +631,14 @@ class OpenStack_1_1_Tests(unittest.TestC
     def test_ex_update_node(self):
         old_node = Node(
             id='12064',
-            name=None, state=None, public_ip=None, private_ip=None, driver=self.driver,
+            name=None, state=None, public_ips=None, private_ips=None, driver=self.driver,
         )
 
         new_node = self.driver.ex_update_node(old_node, name='Bob')
 
         self.assertTrue(new_node)
         self.assertEqual('Bob', new_node.name)
-        self.assertEqual('50.57.94.30', new_node.public_ip[0])
+        self.assertEqual('50.57.94.30', new_node.public_ips[0])
 
     def test_ex_get_node_details(self):
         node_id = '12064'

Modified: libcloud/trunk/test/compute/test_opsource.py
URL: http://svn.apache.org/viewvc/libcloud/trunk/test/compute/test_opsource.py?rev=1201114&r1=1201113&r2=1201114&view=diff
==============================================================================
--- libcloud/trunk/test/compute/test_opsource.py (original)
+++ libcloud/trunk/test/compute/test_opsource.py Sat Nov 12 00:14:36 2011
@@ -51,14 +51,14 @@ class OpsourceTests(unittest.TestCase, T
 
     def test_reboot_node_response(self):
         node = Node(id='11', name=None, state=None,
-                    public_ip=None, private_ip=None, driver=self.driver)
+                    public_ips=None, private_ips=None, driver=self.driver)
         ret = node.reboot()
         self.assertTrue(ret is True)
 
     def test_reboot_node_response_INPROGRESS(self):
         OpsourceMockHttp.type = 'INPROGRESS'
         node = Node(id='11', name=None, state=None,
-                    public_ip=None, private_ip=None, driver=self.driver)
+                    public_ips=None, private_ips=None, driver=self.driver)
         try:
             node.reboot()
             self.assertTrue(False) # above command should have thrown OpsourceAPIException
@@ -67,14 +67,14 @@ class OpsourceTests(unittest.TestCase, T
 
     def test_destroy_node_response(self):
         node = Node(id='11', name=None, state=None,
-                    public_ip=None, private_ip=None, driver=self.driver)
+                    public_ips=None, private_ips=None, driver=self.driver)
         ret = node.destroy()
         self.assertTrue(ret is True)
 
     def test_destroy_node_response_INPROGRESS(self):
         OpsourceMockHttp.type = 'INPROGRESS'
         node = Node(id='11', name=None, state=None,
-                    public_ip=None, private_ip=None, driver=self.driver)
+                    public_ips=None, private_ips=None, driver=self.driver)
         try:
             node.destroy()
             self.assertTrue(False) # above command should have thrown OpsourceAPIException
@@ -93,14 +93,14 @@ class OpsourceTests(unittest.TestCase, T
 
     def test_ex_shutdown_graceful(self):
         node = Node(id='11', name=None, state=None,
-                    public_ip=None, private_ip=None, driver=self.driver)
+                    public_ips=None, private_ips=None, driver=self.driver)
         ret = self.driver.ex_shutdown_graceful(node)
         self.assertTrue(ret is True)
 
     def test_ex_shutdown_graceful_INPROGRESS(self):
         OpsourceMockHttp.type = 'INPROGRESS'
         node = Node(id='11', name=None, state=None,
-                    public_ip=None, private_ip=None, driver=self.driver)
+                    public_ips=None, private_ips=None, driver=self.driver)
         try:
             self.driver.ex_shutdown_graceful(node)
             self.assertTrue(False) # above command should have thrown OpsourceAPIException
@@ -109,14 +109,14 @@ class OpsourceTests(unittest.TestCase, T
 
     def test_ex_start_node(self):
         node = Node(id='11', name=None, state=None,
-                    public_ip=None, private_ip=None, driver=self.driver)
+                    public_ips=None, private_ips=None, driver=self.driver)
         ret = self.driver.ex_start_node(node)
         self.assertTrue(ret is True)
 
     def test_ex_start_node_INPROGRESS(self):
         OpsourceMockHttp.type = 'INPROGRESS'
         node = Node(id='11', name=None, state=None,
-                    public_ip=None, private_ip=None, driver=self.driver)
+                    public_ips=None, private_ips=None, driver=self.driver)
         try:
             self.driver.ex_start_node(node)
             self.assertTrue(False) # above command should have thrown OpsourceAPIException
@@ -125,14 +125,14 @@ class OpsourceTests(unittest.TestCase, T
 
     def test_ex_power_off(self):
         node = Node(id='11', name=None, state=None,
-                    public_ip=None, private_ip=None, driver=self.driver)
+                    public_ips=None, private_ips=None, driver=self.driver)
         ret = self.driver.ex_power_off(node)
         self.assertTrue(ret is True)
 
     def test_ex_power_off_INPROGRESS(self):
         OpsourceMockHttp.type = 'INPROGRESS'
         node = Node(id='11', name=None, state=None,
-                    public_ip=None, private_ip=None, driver=self.driver)
+                    public_ips=None, private_ips=None, driver=self.driver)
         try:
             self.driver.ex_power_off(node)
             self.assertTrue(False) # above command should have thrown OpsourceAPIException

Modified: libcloud/trunk/test/compute/test_rimuhosting.py
URL: http://svn.apache.org/viewvc/libcloud/trunk/test/compute/test_rimuhosting.py?rev=1201114&r1=1201113&r2=1201114&view=diff
==============================================================================
--- libcloud/trunk/test/compute/test_rimuhosting.py (original)
+++ libcloud/trunk/test/compute/test_rimuhosting.py Sat Nov 12 00:14:36 2011
@@ -34,8 +34,8 @@ class RimuHostingTest(unittest.TestCase,
         nodes = self.driver.list_nodes()
         self.assertEqual(len(nodes),1)
         node = nodes[0]
-        self.assertEqual(node.public_ip[0], "1.2.3.4")
-        self.assertEqual(node.public_ip[1], "1.2.3.5")
+        self.assertEqual(node.public_ips[0], "1.2.3.4")
+        self.assertEqual(node.public_ips[1], "1.2.3.5")
         self.assertEqual(node.extra['order_oid'], 88833465)
         self.assertEqual(node.id, "order-88833465-api-ivan-net-nz")
 

Modified: libcloud/trunk/test/compute/test_slicehost.py
URL: http://svn.apache.org/viewvc/libcloud/trunk/test/compute/test_slicehost.py?rev=1201114&r1=1201113&r2=1201114&view=diff
==============================================================================
--- libcloud/trunk/test/compute/test_slicehost.py (original)
+++ libcloud/trunk/test/compute/test_slicehost.py Sat Nov 12 00:14:36 2011
@@ -39,8 +39,8 @@ class SlicehostTest(unittest.TestCase, T
         ret = self.driver.list_nodes()
         self.assertEqual(len(ret), 1)
         node = ret[0]
-        self.assertTrue('174.143.212.229' in node.public_ip)
-        self.assertTrue('10.176.164.199' in node.private_ip)
+        self.assertTrue('174.143.212.229' in node.public_ips)
+        self.assertTrue('10.176.164.199' in node.private_ips)
         self.assertEqual(node.state, NodeState.PENDING)
 
         SlicehostMockHttp.type = 'UNAUTHORIZED'
@@ -65,7 +65,7 @@ class SlicehostTest(unittest.TestCase, T
         self.assertEqual(image.id, '2')
 
     def test_reboot_node(self):
-        node = Node(id=1, name=None, state=None, public_ip=None, private_ip=None,
+        node = Node(id=1, name=None, state=None, public_ips=None, private_ips=None,
                     driver=self.driver)
 
         ret = node.reboot()
@@ -83,7 +83,7 @@ class SlicehostTest(unittest.TestCase, T
             self.fail('test should have thrown')
 
     def test_destroy_node(self):
-        node = Node(id=1, name=None, state=None, public_ip=None, private_ip=None,
+        node = Node(id=1, name=None, state=None, public_ips=None, private_ips=None,
                     driver=self.driver)
 
         ret = node.destroy()

Modified: libcloud/trunk/test/compute/test_vcloud.py
URL: http://svn.apache.org/viewvc/libcloud/trunk/test/compute/test_vcloud.py?rev=1201114&r1=1201113&r2=1201114&view=diff
==============================================================================
--- libcloud/trunk/test/compute/test_vcloud.py (original)
+++ libcloud/trunk/test/compute/test_vcloud.py Sat Nov 12 00:14:36 2011
@@ -64,8 +64,8 @@ class TerremarkTests(unittest.TestCase, 
         self.assertEqual(node.id, 'https://services.vcloudexpress.terremark.com/api/v0.8/vapp/14031')
         self.assertEqual(node.name, 'testerpart2')
         self.assertEqual(node.state, NodeState.RUNNING)
-        self.assertEqual(node.public_ip, [])
-        self.assertEqual(node.private_ip, ['10.112.78.69'])
+        self.assertEqual(node.public_ips, [])
+        self.assertEqual(node.private_ips, ['10.112.78.69'])
 
     def test_reboot_node(self):
         node = self.driver.list_nodes()[0]

Modified: libcloud/trunk/test/compute/test_voxel.py
URL: http://svn.apache.org/viewvc/libcloud/trunk/test/compute/test_voxel.py?rev=1201114&r1=1201113&r2=1201114&view=diff
==============================================================================
--- libcloud/trunk/test/compute/test_voxel.py (original)
+++ libcloud/trunk/test/compute/test_voxel.py Sat Nov 12 00:14:36 2011
@@ -109,14 +109,14 @@ class VoxelTest(unittest.TestCase):
 
     def test_reboot_node(self):
         VoxelMockHttp.type = 'REBOOT_NODE'
-        node = Node(id=72258, name=None, state=None, public_ip=None, private_ip=None,
+        node = Node(id=72258, name=None, state=None, public_ips=None, private_ips=None,
                     driver=self.driver)
 
         self.assertTrue(node.reboot())
 
     def test_destroy_node(self):
         VoxelMockHttp.type = 'DESTROY_NODE'
-        node = Node(id=72258, name=None, state=None, public_ip=None, private_ip=None,
+        node = Node(id=72258, name=None, state=None, public_ips=None, private_ips=None,
                     driver=self.driver)
 
         self.assertTrue(node.destroy())

Modified: libcloud/trunk/test/loadbalancer/test_gogrid.py
URL: http://svn.apache.org/viewvc/libcloud/trunk/test/loadbalancer/test_gogrid.py?rev=1201114&r1=1201113&r2=1201114&view=diff
==============================================================================
--- libcloud/trunk/test/loadbalancer/test_gogrid.py (original)
+++ libcloud/trunk/test/loadbalancer/test_gogrid.py Sat Nov 12 00:14:36 2011
@@ -110,8 +110,8 @@ class GoGridTests(unittest.TestCase):
 
     def test_balancer_attach_compute_node(self):
         balancer = LoadBalancer(23530, None, None, None, None, self.driver)
-        node = Node(id='1', name='test', state=None, public_ip=['10.0.0.75'], 
-                    private_ip=[], driver=DummyNodeDriver)
+        node = Node(id='1', name='test', state=None, public_ips=['10.0.0.75'], 
+                    private_ips=[], driver=DummyNodeDriver)
         member1 = self.driver.balancer_attach_compute_node(balancer, node)
         member2 = balancer.attach_compute_node(node)
 



Mime
View raw message