Enis Afgan hace 10 años
padre
commit
a73971149e

+ 9 - 9
cloudbridge/cloud/interfaces/resources.py

@@ -142,11 +142,11 @@ class ObjectLifeCycleMixin(object):
     """
     A mixin for an object with a defined life-cycle, such as an Instance,
     Volume, Image or Snapshot. An object that supports ObjectLifeCycleMixin
-    will always have a state, defining which point in its lifecycle it is
+    will always have a state, defining which point in its life cycle it is
     currently at.
 
     It also defines a wait_till_ready operation, which indicates that the
-    object is in a state in its lifecycle where it is ready to be used by an
+    object is in a state in its life cycle where it is ready to be used by an
     end-user.
 
     A refresh operation allows the object to synchronise its state with the
@@ -506,7 +506,7 @@ class Instance(ObjectLifeCycleMixin, CloudResource):
         Reboot this instance (using the cloud middleware API).
 
         :rtype: bool
-        :return: ``True`` if the reboot was succesful; ``False`` otherwise.
+        :return: ``True`` if the reboot was successful; ``False`` otherwise.
         """
         pass
 
@@ -516,7 +516,7 @@ class Instance(ObjectLifeCycleMixin, CloudResource):
         Permanently terminate this instance.
 
         :rtype: bool
-        :return: ``True`` if the termination of the instance was succesfully
+        :return: ``True`` if the termination of the instance was successfully
                  initiated; ``False`` otherwise.
         """
         pass
@@ -524,7 +524,7 @@ class Instance(ObjectLifeCycleMixin, CloudResource):
     @abstractproperty
     def image_id(self):
         """
-        Get the image ID for this insance.
+        Get the image ID for this instance.
 
         :rtype: str
         :return: Image ID (i.e., AMI) this instance is using.
@@ -756,7 +756,7 @@ class LaunchConfig(object):
         :type net_id: str
         :param net_id: Network ID to launch an instance into. This is a
                        preliminary implementation (pending full private cloud
-                       support within cloudbridge) so native network IDs need
+                       support within CloudBridge) so native network IDs need
                        to be supplied. For OpenStack, this is the Neutron
                        network ID. For AWS, this is a VPC subnet ID. For the
                        time being, only a single network interface can be
@@ -1280,7 +1280,7 @@ class Snapshot(ObjectLifeCycleMixin, CloudResource):
         Set the snapshot description. Some cloud providers may not support this
         property, and setting the description may have no effect. (Providers
         that do not support this property will always return the snapshot name
-        as the description)
+        as the description).
         """
         pass
 
@@ -1458,7 +1458,7 @@ class Region(CloudResource):
     @abstractproperty
     def zones(self):
         """
-        Accesss information about placement zones within this region.
+        Access information about placement zones within this region.
 
         :rtype: iterable
         :return: Iterable of available placement zones in this region.
@@ -1545,7 +1545,7 @@ class InstanceType(CloudResource):
     @abstractproperty
     def ram(self):
         """
-        The amount of RAM (in mb) supported by this instance type.
+        The amount of RAM (in MB) supported by this instance type.
 
         :rtype: int
         :return: Total RAM (in MB).

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

@@ -39,7 +39,7 @@ class ComputeService(CloudService):
     def images(self):
         """
         Provides access to all Image related services in this provider.
-        (e.g. Glance in Openstack)
+        (e.g. Glance in OpenStack)
 
         Example:
 
@@ -639,7 +639,7 @@ class ObjectStoreService(PageableObjectMixin, CloudService):
     def get(self, bucket_id):
         """
         Returns a bucket given its ID. Returns ``None`` if the bucket
-        does not exist. On some providers, such as AWS and Openstack,
+        does not exist. On some providers, such as AWS and OpenStack,
         the bucket id is the same as its name.
 
         Example:
@@ -780,7 +780,7 @@ class KeyPairService(PageableObjectMixin, CloudService):
         """
         Return a KeyPair given its ID or ``None`` if not found.
 
-        On some providers, such as AWS and Openstack, the KeyPair ID is
+        On some providers, such as AWS and OpenStack, the KeyPair ID is
         the same as its name.
 
         Example:

+ 2 - 2
cloudbridge/cloud/providers/openstack/helpers.py

@@ -7,7 +7,7 @@ from cloudbridge.cloud.base.resources import ServerPagedResultList
 
 def os_result_limit(provider, requested_limit):
     """
-    Calculates the limit for openstack.
+    Calculates the limit for OpenStack.
     """
     limit = requested_limit or provider.config.default_result_limit
     # fetch one more than the limit to help with paging.
@@ -19,7 +19,7 @@ def os_result_limit(provider, requested_limit):
 
 def to_server_paged_list(provider, objects, limit):
     """
-    A convenience function for wrapping a list of openstack native objects in
+    A convenience function for wrapping a list of OpenStack native objects in
     a ServerPagedResultList. OpenStack
     initial list of objects. Thereafter, the return list is wrapped in a
     BaseResultList, enabling extra properties like

+ 2 - 2
cloudbridge/cloud/providers/openstack/provider.py

@@ -98,7 +98,7 @@ class OpenStackCloudProvider(BaseCloudProvider):
     @property
     def _keystone_version(self):
         """
-        Return the numberic version of remote server Keystone.
+        Return the numeric version of remote Keystone server.
 
         :rtype: ``int``
         :return: Keystone version as an int (currently, 2 or 3).
@@ -227,7 +227,7 @@ class OpenStackCloudProvider(BaseCloudProvider):
             # Wow, the internal keystoneV2 implementation is terribly buggy. It
             # needs both a separate Session object and the username, password
             # again for things to work correctly. Plus, a manual call to
-            # authenticate() is also required if the service catalogue needs
+            # authenticate() is also required if the service catalog needs
             # to be queried.
             keystone = keystone_client.Client(
                 session=self._keystone_session,

+ 5 - 5
cloudbridge/cloud/providers/openstack/resources.py

@@ -157,7 +157,7 @@ class OpenStackInstanceType(BaseInstanceType):
 
     @property
     def family(self):
-        # TODO: This may not be standardised accross openstack
+        # TODO: This may not be standardised across OpenStack
         # but NeCTAR is using it this way
         return self.extra_data.get('flavor_class:name')
 
@@ -249,8 +249,8 @@ class OpenStackInstance(BaseInstance):
         """
         Get all the public IP addresses for this instance.
         """
-        # Openstack doesn't provide an easy way to figure our whether an ip is
-        # public or private, since the returned ips are grouped by an arbitrary
+        # OpenStack doesn't provide an easy way to figure our whether an IP is
+        # public or private, since the returned IPs are grouped by an arbitrary
         # network label. Therefore, it's necessary to parse the address and
         # determine whether it's public or private
         return [address
@@ -752,7 +752,7 @@ class OpenStackSecurityGroup(BaseSecurityGroup):
 
     @property
     def rules(self):
-        # Update SG object; otherwise, recenlty added rules do now show
+        # Update SG object; otherwise, recently added rules do now show
         self._security_group = self._provider.nova.security_groups.get(
             self._security_group)
         return [OpenStackSecurityGroupRule(self._provider, r, self)
@@ -813,7 +813,7 @@ class OpenStackSecurityGroup(BaseSecurityGroup):
 
     def get_rule(self, ip_protocol=None, from_port=None, to_port=None,
                  cidr_ip=None, src_group=None):
-        # Update SG object; otherwise, recenlty added rules do now show
+        # Update SG object; otherwise, recently added rules do now show
         self._security_group = self._provider.nova.security_groups.get(
             self._security_group)
         for rule in self._security_group.rules:

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

@@ -721,7 +721,7 @@ class OpenStackSubnetService(BaseSubnetService):
         subnet_id = (subnet.id if isinstance(subnet, OpenStackSubnet)
                      else subnet)
         self.provider.neutron.delete_subnet(subnet_id)
-        # Adhear to the interface docs
+        # Adhere to the interface docs
         if subnet_id not in self.list():
             return True
         return False