]> review.fuel-infra Code Review - openstack-build/neutron-build.git/commitdiff
Wrong usage of "a"
authorhgangwx <hgangwx@cn.ibm.com>
Sat, 26 Dec 2015 13:16:23 +0000 (21:16 +0800)
committerhgangwx <hgangwx@cn.ibm.com>
Tue, 29 Dec 2015 17:15:16 +0000 (01:15 +0800)
Wrong usage of "a" in the messages:
"'%s' is not a integer"
"Create a address scope"
"Return True if port has as a allowed address pair"
"But if a agent does not report its status"
"a ipv4 link-local address"
"Retrieve and return a extended information about a network"
"It could be a eui-64 address, a random IPv6 address"
"push a elastic-recheck query for it (see below)"
"is not a enforced requirement"
"a ovs_lib.VifPort object"

Should be:
"'%s' is not an integer"
"Create an address scope"
"Return True if port has as an allowed address pair"
"But if an agent does not report its status"
"an ipv4 link-local address"
"Retrieve and return extended information about a network"
"It could be an eui-64 address, a random IPv6 address"
"push an elastic-recheck query for it (see below)"
"is not an enforced requirement"
"an ovs_lib.VifPort object"

Totally 9 occurrences in Neutron base code.

Change-Id: I0f980fc8c98524db3d194ecb779f76abb37eb31c

neutron/api/rpc/handlers/dhcp_rpc.py
neutron/api/v2/attributes.py
neutron/db/address_scope_db.py
neutron/db/allowedaddresspairs_db.py
neutron/extensions/agent.py
neutron/ipam/requests.py
neutron/plugins/ml2/drivers/openvswitch/agent/ovs_neutron_agent.py

index e51e31ba212a20e017ae528eb71df33e64c3e866..82878fd7eb139e026a3d00360bd85c57ae98d461 100644 (file)
@@ -146,7 +146,7 @@ class DhcpRpcCallback(object):
         return networks
 
     def get_network_info(self, context, **kwargs):
-        """Retrieve and return extended information about a network."""
+        """Retrieve and return extended information about a network."""
         network_id = kwargs.get('network_id')
         host = kwargs.get('host')
         LOG.debug('Network %(network_id)s requested from '
index 00a827e92983cc0bc37ec9081c2b19d42a2e910b..ae25ec6b54612745fc5d93152e51b61e26053104 100644 (file)
@@ -533,7 +533,7 @@ def convert_to_int(data):
     try:
         return int(data)
     except (ValueError, TypeError):
-        msg = _("'%s' is not a integer") % data
+        msg = _("'%s' is not an integer") % data
         raise n_exc.InvalidInput(error_message=msg)
 
 
index d6b5892c9049d7fcf6605c0bd1d057479812bf70..54d8bb06befff0778f2857c50808237699a57916 100644 (file)
@@ -75,7 +75,7 @@ class AddressScopeDbMixin(ext_address_scope.AddressScopePluginBase):
         return address_scope.ip_version
 
     def create_address_scope(self, context, address_scope):
-        """Create a address scope."""
+        """Create an address scope."""
         a_s = address_scope['address_scope']
         tenant_id = self._get_tenant_id_for_create(context, a_s)
         address_scope_id = a_s.get('id') or uuidutils.generate_uuid()
index 44faddcd896ec5ff7746846347086c2ca0b3a385..a69c237228c3d55aa091620020509174a3cf87ca 100644 (file)
@@ -110,7 +110,7 @@ class AllowedAddressPairsMixin(object):
     def _check_update_deletes_allowed_address_pairs(self, port):
         """Determine if request deletes address pair.
 
-        Return True if port has as a allowed address pair and its value
+        Return True if port has an allowed address pair and its value
         is either [] or not is_attr_set, otherwise return False
         """
         return (addr_pair.ADDRESS_PAIRS in port['port'] and
index 176aa2ce09bbc64657654ea0139c8503fb074256..a5f1ea4e1788cc5917720d7f2d0553411a6da283 100644 (file)
@@ -139,8 +139,8 @@ class AgentPluginBase(object):
         """Delete agent.
 
         Agents register themselves on reporting state.
-        But if a agent does not report its status
-        for a long time (for example, it is dead for ever. ),
+        But if an agent does not report its status
+        for a long time (for example, it is dead forever. ),
         admin can remove it. Agents must be disabled before
         being removed.
         """
index 377689b4fa9f49382ede227807a89af50ded05e3..e6367580d1093639a48ad8ea0b4fde3c09527390 100644 (file)
@@ -235,8 +235,8 @@ class AutomaticAddressRequest(SpecificAddressRequest):
         generating it can be passed as optional keyword arguments.
 
         :param address_type: the type of address to generate.
-            It could be a eui-64 address, a random IPv6 address, or
-            a ipv4 link-local address.
+            It could be an eui-64 address, a random IPv6 address, or
+            an ipv4 link-local address.
             For the Kilo release only eui-64 addresses will be supported.
         """
         address_generator = self._address_generators.get(address_type)
index 414039e932d44e072d5e2f1b8dbde97575ea818f..cb892458c0a5dd987d8a0b786f7c6208338f66ab 100644 (file)
@@ -758,7 +758,7 @@ class OVSNeutronAgent(sg_rpc.SecurityGroupAgentRpcCallbackMixin,
         '''Bind port to net_uuid/lsw_id and install flow for inbound traffic
         to vm.
 
-        :param port: a ovs_lib.VifPort object.
+        :param port: an ovs_lib.VifPort object.
         :param net_uuid: the net_uuid this port is to be associated with.
         :param network_type: the network type ('gre', 'vlan', 'flat', 'local')
         :param physical_network: the physical network for 'vlan' or 'flat'
@@ -934,7 +934,7 @@ class OVSNeutronAgent(sg_rpc.SecurityGroupAgentRpcCallbackMixin,
     def port_dead(self, port, log_errors=True):
         '''Once a port has no binding, put it on the "dead vlan".
 
-        :param port: a ovs_lib.VifPort object.
+        :param port: an ovs_lib.VifPort object.
         '''
         # Don't kill a port if it's already dead
         cur_tag = self.int_br.db_get_val("Port", port.port_name, "tag",