فهرست منبع

Rename static IP to floating IP to make it inline with existing code (see Instance class)

Enis Afgan 9 سال پیش
والد
کامیت
405b42101d

+ 4 - 4
cloudbridge/cloud/interfaces/services.py

@@ -554,15 +554,15 @@ class NetworkService(PageableObjectMixin, CloudService):
         """
         pass
 
-    @abstractproperty
-    def static_ips(self, network_id=None):
+    @abstractmethod
+    def floating_ips(self, network_id=None):
         """
-        List static IP addresses.
+        List floating (i.e., static) IP addresses.
 
         :type: ``str``
         :param: The ID of the network by which to filter the IPs.
 
-        :rtype: ``lsit`` of strings
+        :rtype: ``list`` of strings
         :return: list of static IPs
         """
         pass

+ 4 - 4
cloudbridge/cloud/providers/aws/services.py

@@ -468,9 +468,9 @@ class AWSInstanceService(BaseInstanceService):
         """
         Creates a new virtual machine instance.
 
-        In no VPC/subnet was specified (via ``launch_config``), this method
-        will search for a default VPC and attempt to launch an instance into
-        that VPC.
+        If no VPC/subnet was specified (via ``launch_config`` parameter), this
+        method will search for a default VPC and attempt to launch an instance
+        into that VPC.
         """
         image_id = image.id if isinstance(image, MachineImage) else image
         instance_size = instance_type.id if \
@@ -790,7 +790,7 @@ class AWSNetworkService(BaseNetworkService):
     def subnets(self):
         return self._subnet_svc
 
-    def static_ips(self, network_id=None):
+    def floating_ips(self, network_id=None):
         fltrs = None
         if network_id:
             fltrs = {'network-interface-id': network_id}

+ 1 - 1
cloudbridge/cloud/providers/openstack/services.py

@@ -725,7 +725,7 @@ class OpenStackNetworkService(BaseNetworkService):
     def subnets(self):
         return self._subnet_svc
 
-    def static_ips(self, network_id=None):
+    def floating_ips(self, network_id=None):
         if network_id:
             al = self.provider.neutron.list_floatingips(
                 floating_network_id=network_id)['floatingips']