From 283e5db6919260e49756a885fcb40285c283c949 Mon Sep 17 00:00:00 2001 From: hgangwx Date: Sat, 26 Dec 2015 21:16:23 +0800 Subject: [PATCH] Wrong usage of "a" 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 | 2 +- neutron/api/v2/attributes.py | 2 +- neutron/db/address_scope_db.py | 2 +- neutron/db/allowedaddresspairs_db.py | 2 +- neutron/extensions/agent.py | 4 ++-- neutron/ipam/requests.py | 4 ++-- .../ml2/drivers/openvswitch/agent/ovs_neutron_agent.py | 4 ++-- 7 files changed, 10 insertions(+), 10 deletions(-) diff --git a/neutron/api/rpc/handlers/dhcp_rpc.py b/neutron/api/rpc/handlers/dhcp_rpc.py index e51e31ba2..82878fd7e 100644 --- a/neutron/api/rpc/handlers/dhcp_rpc.py +++ b/neutron/api/rpc/handlers/dhcp_rpc.py @@ -146,7 +146,7 @@ class DhcpRpcCallback(object): return networks def get_network_info(self, context, **kwargs): - """Retrieve and return a 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 ' diff --git a/neutron/api/v2/attributes.py b/neutron/api/v2/attributes.py index 00a827e92..ae25ec6b5 100644 --- a/neutron/api/v2/attributes.py +++ b/neutron/api/v2/attributes.py @@ -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) diff --git a/neutron/db/address_scope_db.py b/neutron/db/address_scope_db.py index d6b5892c9..54d8bb06b 100644 --- a/neutron/db/address_scope_db.py +++ b/neutron/db/address_scope_db.py @@ -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() diff --git a/neutron/db/allowedaddresspairs_db.py b/neutron/db/allowedaddresspairs_db.py index 44faddcd8..a69c23722 100644 --- a/neutron/db/allowedaddresspairs_db.py +++ b/neutron/db/allowedaddresspairs_db.py @@ -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 diff --git a/neutron/extensions/agent.py b/neutron/extensions/agent.py index 176aa2ce0..a5f1ea4e1 100644 --- a/neutron/extensions/agent.py +++ b/neutron/extensions/agent.py @@ -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. """ diff --git a/neutron/ipam/requests.py b/neutron/ipam/requests.py index 377689b4f..e6367580d 100644 --- a/neutron/ipam/requests.py +++ b/neutron/ipam/requests.py @@ -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) diff --git a/neutron/plugins/ml2/drivers/openvswitch/agent/ovs_neutron_agent.py b/neutron/plugins/ml2/drivers/openvswitch/agent/ovs_neutron_agent.py index 414039e93..cb892458c 100644 --- a/neutron/plugins/ml2/drivers/openvswitch/agent/ovs_neutron_agent.py +++ b/neutron/plugins/ml2/drivers/openvswitch/agent/ovs_neutron_agent.py @@ -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", -- 2.45.2