From 1513cc178eaf1407228e54d9e375a7756018d71f Mon Sep 17 00:00:00 2001 From: Paul McMillan Date: Tue, 10 Apr 2012 10:29:32 -0700 Subject: [PATCH] Improve grammar throughout nova. Fixes some "its" and "it's" mistakes, and unifies the tense of some documentation. Change-Id: I9b83aba535b554e80b2cf1e048bb3a4e5cac0e5e --- Authors | 1 + nova/auth/ldapdriver.py | 2 +- nova/db/sqlalchemy/api.py | 2 +- nova/network/quantum/manager.py | 6 +++--- nova/tests/test_imagecache.py | 2 +- nova/volume/san.py | 2 +- nova/wsgi.py | 2 +- plugins/xenserver/doc/networking.rst | 28 +++++++++++++++------------- 8 files changed, 24 insertions(+), 21 deletions(-) diff --git a/Authors b/Authors index 0fcb1fdf058d..8c167f7f9911 100644 --- a/Authors +++ b/Authors @@ -155,6 +155,7 @@ Nikolay Sokolov Nirmal Ranganathan Ollie Leahy Pádraig Brady +Paul McMillan Paul Voccio Peng Yong Philip Knouff diff --git a/nova/auth/ldapdriver.py b/nova/auth/ldapdriver.py index 91135f1c7cdb..3f36d97b6289 100644 --- a/nova/auth/ldapdriver.py +++ b/nova/auth/ldapdriver.py @@ -199,7 +199,7 @@ class LdapDriver(object): return False def __local_cache(key_fmt): # pylint: disable=E0213 - """Wrap function to cache it's result in self.__cache. + """Wrap function to cache its result in self.__cache. Works only with functions with one fixed argument. """ def do_wrap(fn): diff --git a/nova/db/sqlalchemy/api.py b/nova/db/sqlalchemy/api.py index 49d3df0f98fc..a0224796b9ba 100644 --- a/nova/db/sqlalchemy/api.py +++ b/nova/db/sqlalchemy/api.py @@ -1542,7 +1542,7 @@ def instance_get_all_by_reservation(context, reservation_id): # NOTE(jkoelker) This is only being left here for compat with floating # ips. Currently the network_api doesn't return floaters # in network_info. Once it starts return the model. This -# function and it's call in compute/manager.py on 1829 can +# function and its call in compute/manager.py on 1829 can # go away @require_context def instance_get_floating_address(context, instance_id): diff --git a/nova/network/quantum/manager.py b/nova/network/quantum/manager.py index d769e2ca096f..33370948b018 100644 --- a/nova/network/quantum/manager.py +++ b/nova/network/quantum/manager.py @@ -403,9 +403,9 @@ class QuantumManager(manager.FloatingIP, manager.FlatManager): @manager.wrap_check_policy def get_instance_uuids_by_ip_filter(self, context, filters): - # This is not returning the instance IDs like the method name would - # make you think, its matching the return format of the method it's - # overriding. + # This is not returning the instance IDs like the method name + # would make you think; it is matching the return format of + # the method it's overriding. instance_ids = self.ipam.get_instance_ids_by_ip_address( context, filters.get('ip')) instances = [db.instance_get(context, id) for id in instance_ids] diff --git a/nova/tests/test_imagecache.py b/nova/tests/test_imagecache.py index 9cf400320cd5..eaa05a4b7c10 100644 --- a/nova/tests/test_imagecache.py +++ b/nova/tests/test_imagecache.py @@ -133,7 +133,7 @@ class ImageCacheManagerTestCase(test.TestCase): image_cache_manager = imagecache.ImageCacheManager() - # The argument here should be a context, but its mocked out + # The argument here should be a context, but it's mocked out image_cache_manager._list_running_instances(None) self.assertEqual(len(image_cache_manager.used_images), 2) diff --git a/nova/volume/san.py b/nova/volume/san.py index 95627ffa5aa7..2e8cc7f2a661 100644 --- a/nova/volume/san.py +++ b/nova/volume/san.py @@ -853,7 +853,7 @@ class SolidFireSanISCSIDriver(SanISCSIDriver): volumeID is what's guaranteed unique. What we'll do here is check volumes based on account. this - should work because nova will increment it's volume_id + should work because nova will increment its volume_id so we should always get the correct volume. This assumes that nova does not assign duplicate ID's. """ diff --git a/nova/wsgi.py b/nova/wsgi.py index 6bebaf08e985..c048ab019711 100644 --- a/nova/wsgi.py +++ b/nova/wsgi.py @@ -100,7 +100,7 @@ class Server(object): """Stop this server. This is not a very nice action, as currently the method by which a - server is stopped is by killing it's eventlet. + server is stopped is by killing its eventlet. :returns: None diff --git a/plugins/xenserver/doc/networking.rst b/plugins/xenserver/doc/networking.rst index 67f2d9af3bc1..d0529db10501 100644 --- a/plugins/xenserver/doc/networking.rst +++ b/plugins/xenserver/doc/networking.rst @@ -48,12 +48,12 @@ the instances to ensure they have permission to talk on the internet. How it works - Long =================== -Any time an underprivileged domain or domU is started or stopped, it gets a -unique domain id (dom_id). This dom_id is utilized in a number of places, one -of which is it's assigned to the virtual interface (vif). The vifs are attached -to the bridge that is attached to the physical network. For instance, if you -had a public bridge attached to eth0 and your domain id was 5, your vif would be -vif5.0. +Any time an underprivileged domain or domU is started or stopped, it +gets a unique domain id (dom_id). This dom_id is utilized in a number +of places, one of which is that it is assigned to the virtual +interface (vif). The vifs are attached to the bridge that is attached +to the physical network. For instance, if you had a public bridge +attached to eth0 and your domain id was 5, your vif would be vif5.0. The networking rules are applied to the VIF directly so they apply at the lowest level of the networking stack. Because the VIF changes along with the domain id @@ -85,8 +85,9 @@ ebtables -A FORWARD -p 0806 -o vif1.0 --arp-ip-dst 10.1.135.22 -j ACCEPT ebtables -A FORWARD -p 0800 -o vif1.0 --ip-dst 10.1.135.22 -j ACCEPT ebtables -I FORWARD 1 -s ! 9e:6e:cc:19:7f:fe -i vif1.0 -j DROP -Typically when you see a vif, it'll look like vif.. -vif2.1 for example would be domain 2 on the second interface. +Typically when you see a vif, it'll look like +vif.. vif2.1 for example would be domain 2 on the +second interface. The vif_rules.py script needs to pull information about the IPs and MAC addresses assigned to the instance. The current implementation assumes that @@ -121,11 +122,12 @@ vm-data/networking/40402321c9b8: "gateway":"10.177.10.1"}], "mac":"40:40:23:21:c9:b8"} -The key is used for two purposes. One, the vif_rules.py script will read from -it to apply the rules needed after parsing the JSON. The second is that because -it's put into the xenstore-data field, the xenstore will be populated with this -data on boot. This allows a guest agent the ability to read out data about the -instance and apply configurations as needed. +The key is used for two purposes. First, the vif_rules.py script +reads from it to apply the rules needed after parsing the JSON. +Second, because it is put into the xenstore-data field, the xenstore +is populated with this data on boot. This allows a guest agent the +ability to read out data about the instance and apply configurations +as needed. Installation ============