From 107c6b143fcd4dca24627400c4a1948402cd657e Mon Sep 17 00:00:00 2001 From: Brian Haley Date: Thu, 13 Mar 2025 17:10:27 -0400 Subject: [PATCH] Fix neutron typos and formatting Just trying to make things consistent in the neutron files. TrivialFix Change-Id: I9c0ac838f5a956f55161e1636472cca761b14781 --- .../network/v2/floating_ip_port_forwarding.py | 6 +-- .../network/v2/l3_conntrack_helper.py | 8 +-- openstackclient/network/v2/local_ip.py | 26 +++++----- openstackclient/network/v2/ndp_proxy.py | 12 ++--- openstackclient/network/v2/network.py | 14 +++--- .../v2/network_auto_allocated_topology.py | 6 +-- openstackclient/network/v2/network_flavor.py | 2 +- .../network/v2/network_flavor_profile.py | 8 +-- openstackclient/network/v2/network_meter.py | 2 +- .../network/v2/network_qos_policy.py | 6 +-- .../network/v2/network_qos_rule.py | 6 +-- openstackclient/network/v2/network_rbac.py | 2 +- .../network/v2/network_segment_range.py | 2 +- openstackclient/network/v2/network_trunk.py | 14 +++--- openstackclient/network/v2/port.py | 40 +++++++-------- openstackclient/network/v2/router.py | 42 ++++++++-------- openstackclient/network/v2/security_group.py | 4 +- openstackclient/network/v2/subnet.py | 50 +++++++++---------- 18 files changed, 126 insertions(+), 124 deletions(-) diff --git a/openstackclient/network/v2/floating_ip_port_forwarding.py b/openstackclient/network/v2/floating_ip_port_forwarding.py index 9151f04983..b51326742d 100644 --- a/openstackclient/network/v2/floating_ip_port_forwarding.py +++ b/openstackclient/network/v2/floating_ip_port_forwarding.py @@ -149,7 +149,7 @@ class CreateFloatingIPPortForwarding( '--description', metavar='', help=_( - "A text to describe/contextualize the use of the " + "Text to describe/contextualize the use of the " "port forwarding configuration" ), ) @@ -280,7 +280,7 @@ class ListFloatingIPPortForwarding(command.Lister): ) parser.add_argument( '--protocol', - metavar='protocol', + metavar='', help=_("Filter the list result by the port protocol"), ) @@ -409,7 +409,7 @@ class SetFloatingIPPortForwarding(common.NeutronCommandWithExtraArgs): '--description', metavar='', help=_( - "A text to describe/contextualize the use of " + "Text to describe/contextualize the use of " "the port forwarding configuration" ), ) diff --git a/openstackclient/network/v2/l3_conntrack_helper.py b/openstackclient/network/v2/l3_conntrack_helper.py index f200090b7f..e5717c3f40 100644 --- a/openstackclient/network/v2/l3_conntrack_helper.py +++ b/openstackclient/network/v2/l3_conntrack_helper.py @@ -99,7 +99,7 @@ class DeleteConntrackHelper(command.Command): parser.add_argument( 'router', metavar='', - help=_('Router that the conntrack helper belong to'), + help=_('Router that the conntrack helper belongs to'), ) parser.add_argument( 'conntrack_helper_id', @@ -147,7 +147,7 @@ class ListConntrackHelper(command.Lister): parser.add_argument( 'router', metavar='', - help=_('Router that the conntrack helper belong to'), + help=_('Router that the conntrack helper belongs to'), ) parser.add_argument( '--helper', @@ -210,7 +210,7 @@ class SetConntrackHelper(command.Command): parser.add_argument( 'router', metavar='', - help=_('Router that the conntrack helper belong to'), + help=_('Router that the conntrack helper belongs to'), ) parser.add_argument( 'conntrack_helper_id', @@ -257,7 +257,7 @@ class ShowConntrackHelper(command.ShowOne): parser.add_argument( 'router', metavar='', - help=_('Router that the conntrack helper belong to'), + help=_('Router that the conntrack helper belongs to'), ) parser.add_argument( 'conntrack_helper_id', diff --git a/openstackclient/network/v2/local_ip.py b/openstackclient/network/v2/local_ip.py index 0d92f2c111..14890c3da2 100644 --- a/openstackclient/network/v2/local_ip.py +++ b/openstackclient/network/v2/local_ip.py @@ -74,30 +74,32 @@ class CreateLocalIP(command.ShowOne): def get_parser(self, prog_name): parser = super().get_parser(prog_name) parser.add_argument( - '--name', metavar="", help=_("New local IP name") + '--name', metavar="", help=_("New Local IP name") ) parser.add_argument( '--description', metavar="", - help=_("New local IP description"), + help=_("Description for Local IP"), ) parser.add_argument( '--network', metavar='', - help=_("Network to allocate Local IP (name or ID)"), + help=_("Network to allocate Local IP from (name or ID)"), ) parser.add_argument( '--local-port', metavar='', - help=_("Port to allocate Local IP (name or ID)"), + help=_("Port to allocate Local IP from (name or ID)"), ) parser.add_argument( "--local-ip-address", metavar="", - help=_("IP address or CIDR "), + help=_("IP address or CIDR for Local IP"), ) parser.add_argument( - '--ip-mode', metavar='', help=_("local IP ip mode") + '--ip-mode', + metavar='', + help=_("IP mode to use for Local IP"), ) identity_common.add_project_domain_option_to_parser(parser) @@ -116,7 +118,7 @@ class CreateLocalIP(command.ShowOne): class DeleteLocalIP(command.Command): - _description = _("Delete local IP(s)") + _description = _("Delete Local IP(s)") def get_parser(self, prog_name): parser = super().get_parser(prog_name) @@ -156,7 +158,7 @@ class DeleteLocalIP(command.Command): class SetLocalIP(command.Command): - _description = _("Set local ip properties") + _description = _("Set Local IP properties") def get_parser(self, prog_name): parser = super().get_parser(prog_name) @@ -171,7 +173,7 @@ class SetLocalIP(command.Command): parser.add_argument( '--description', metavar="", - help=_('Set local IP description'), + help=_('Set Local IP description'), ) return parser @@ -188,7 +190,7 @@ class SetLocalIP(command.Command): class ListLocalIP(command.Lister): - _description = _("List local IPs") + _description = _("List Local IPs") def get_parser(self, prog_name): parser = super().get_parser(prog_name) @@ -196,7 +198,7 @@ class ListLocalIP(command.Lister): parser.add_argument( '--name', metavar='', - help=_("List only local IPs of given name in output"), + help=_("List only Local IPs of given name in output"), ) parser.add_argument( '--project', @@ -295,7 +297,7 @@ class ListLocalIP(command.Lister): class ShowLocalIP(command.ShowOne): - _description = _("Display local IP details") + _description = _("Display Local IP details") def get_parser(self, prog_name): parser = super().get_parser(prog_name) diff --git a/openstackclient/network/v2/ndp_proxy.py b/openstackclient/network/v2/ndp_proxy.py index 4c1871172f..51f77f5cff 100644 --- a/openstackclient/network/v2/ndp_proxy.py +++ b/openstackclient/network/v2/ndp_proxy.py @@ -69,7 +69,7 @@ class CreateNDPProxy(command.ShowOne): '--description', metavar='', help=_( - "A text to describe/contextualize the use of the " + "Text to describe/contextualize the use of the " "NDP proxy configuration" ), ) @@ -156,18 +156,18 @@ class ListNDPProxy(command.Lister): ) parser.add_argument( '--ip-address', - metavar='ip-address', - help=_("List only NDP proxies according to their IPv6 address"), + metavar='', + help=_("List only NDP proxies associated to this IPv6 address"), ) parser.add_argument( '--project', metavar='', - help=_("List NDP proxies according to their project (name or ID)"), + help=_("List only NDP proxies of given project (name or ID)"), ) parser.add_argument( '--name', metavar='', - help=_("List NDP proxies according to their name"), + help=_("List only NDP proxies of given name"), ) identity_common.add_project_domain_option_to_parser(parser) @@ -247,7 +247,7 @@ class SetNDPProxy(command.Command): '--description', metavar='', help=_( - "A text to describe/contextualize the use of " + "Text to describe/contextualize the use of " "the NDP proxy configuration" ), ) diff --git a/openstackclient/network/v2/network.py b/openstackclient/network/v2/network.py index 7636de0c93..f63e791c37 100644 --- a/openstackclient/network/v2/network.py +++ b/openstackclient/network/v2/network.py @@ -166,7 +166,7 @@ def _add_additional_network_options(parser): help=_( "The physical mechanism by which the virtual network " "is implemented. For example: " - "flat, geneve, gre, local, vlan, vxlan." + "flat, geneve, gre, local, vlan or vxlan." ), ) parser.add_argument( @@ -292,8 +292,8 @@ class CreateNetwork( action='store_true', help=self.enhance_help_neutron( _( - "The network has an external routing facility that's not " - "managed by Neutron and can be used as in: " + "The network has an external routing facility that is not " + "managed by Neutron and can be used. For example: " "openstack router set --external-gateway NETWORK " "(external-net extension required)" ) @@ -537,7 +537,7 @@ class ListNetwork(common.NetworkAndComputeLister): _( "List networks according to their physical mechanisms. " "The supported options are: flat, geneve, gre, local, " - "vlan, vxlan." + "vlan and vxlan." ) ), ) @@ -789,10 +789,10 @@ class SetNetwork(common.NeutronCommandWithExtraArgs): '--external', action='store_true', help=_( - "The network has an external routing facility that's not " - "managed by Neutron and can be used as in: " + "The network has an external routing facility that is not " + "managed by Neutron and can be used. For example: " "openstack router set --external-gateway NETWORK " - "(external-net extension required)" + "(external-net extension required)." ), ) external_router_grp.add_argument( diff --git a/openstackclient/network/v2/network_auto_allocated_topology.py b/openstackclient/network/v2/network_auto_allocated_topology.py index 9f382eacfb..a0dcfa47e5 100644 --- a/openstackclient/network/v2/network_auto_allocated_topology.py +++ b/openstackclient/network/v2/network_auto_allocated_topology.py @@ -71,7 +71,7 @@ class CreateAutoAllocatedTopology(command.ShowOne): metavar='', help=_( "Return the auto allocated topology for a given project. " - "Default is current project" + "Default is current project." ), ) identity_common.add_project_domain_option_to_parser(parser) @@ -89,7 +89,7 @@ class CreateAutoAllocatedTopology(command.ShowOne): default=True, help=_( "If topology exists returns the topology's " - "information (Default)" + "information (default)" ), ) @@ -132,7 +132,7 @@ class DeleteAutoAllocatedTopology(command.Command): metavar='', help=_( 'Delete auto allocated topology for a given project. ' - 'Default is the current project' + 'Default is the current project.' ), ) identity_common.add_project_domain_option_to_parser(parser) diff --git a/openstackclient/network/v2/network_flavor.py b/openstackclient/network/v2/network_flavor.py index 8bc5262015..c4d262dea1 100644 --- a/openstackclient/network/v2/network_flavor.py +++ b/openstackclient/network/v2/network_flavor.py @@ -102,7 +102,7 @@ class CreateNetworkFlavor(command.ShowOne, common.NeutronCommandWithExtraArgs): metavar="", required=True, help=_( - 'Service type to which the flavor applies to: e.g. VPN ' + 'Service type to which the flavor applies. For example: VPN ' '(See openstack network service provider list for loaded ' 'examples.)' ), diff --git a/openstackclient/network/v2/network_flavor_profile.py b/openstackclient/network/v2/network_flavor_profile.py index d9a4b5d2e6..fc3f02cf96 100644 --- a/openstackclient/network/v2/network_flavor_profile.py +++ b/openstackclient/network/v2/network_flavor_profile.py @@ -79,14 +79,14 @@ class CreateNetworkFlavorProfile( '--driver', help=_( "Python module path to driver. This becomes " - "required if --metainfo is missing and vice versa" + "required if --metainfo is missing and vice-versa." ), ) parser.add_argument( '--metainfo', help=_( "Metainfo for the flavor profile. This becomes " - "required if --driver is missing and vice versa" + "required if --driver is missing and vice-versa." ), ) @@ -217,14 +217,14 @@ class SetNetworkFlavorProfile(common.NeutronCommandWithExtraArgs): '--driver', help=_( "Python module path to driver. This becomes " - "required if --metainfo is missing and vice versa" + "required if --metainfo is missing and vice-versa." ), ) parser.add_argument( '--metainfo', help=_( "Metainfo for the flavor profile. This becomes " - "required if --driver is missing and vice versa" + "required if --driver is missing and vice-versa." ), ) diff --git a/openstackclient/network/v2/network_meter.py b/openstackclient/network/v2/network_meter.py index 5a6a8f2f21..22df0f90b1 100644 --- a/openstackclient/network/v2/network_meter.py +++ b/openstackclient/network/v2/network_meter.py @@ -70,7 +70,7 @@ class CreateMeter(command.ShowOne, common.NeutronCommandWithExtraArgs): parser.add_argument( '--description', metavar='', - help=_("Create description for meter"), + help=_("Description for meter"), ) parser.add_argument( '--project', diff --git a/openstackclient/network/v2/network_qos_policy.py b/openstackclient/network/v2/network_qos_policy.py index 5023ea9880..07eb2ff2fb 100644 --- a/openstackclient/network/v2/network_qos_policy.py +++ b/openstackclient/network/v2/network_qos_policy.py @@ -190,7 +190,7 @@ class ListNetworkQosPolicy(command.Lister): '--project', metavar='', help=_( - "List qos policies according to their project (name or ID)" + "List QoS policies according to their project (name or ID)" ), ) identity_common.add_project_domain_option_to_parser(parser) @@ -198,12 +198,12 @@ class ListNetworkQosPolicy(command.Lister): shared_group.add_argument( '--share', action='store_true', - help=_("List qos policies shared between projects"), + help=_("List QoS policies shared between projects"), ) shared_group.add_argument( '--no-share', action='store_true', - help=_("List qos policies not shared between projects"), + help=_("List QoS policies not shared between projects"), ) return parser diff --git a/openstackclient/network/v2/network_qos_rule.py b/openstackclient/network/v2/network_qos_rule.py index 0b5e06fe5b..0784de890a 100644 --- a/openstackclient/network/v2/network_qos_rule.py +++ b/openstackclient/network/v2/network_qos_rule.py @@ -378,7 +378,7 @@ class SetNetworkQosRule(common.NeutronCommandWithExtraArgs): parser.add_argument( 'id', metavar='', - help=_('Network QoS rule to delete (ID)'), + help=_('Network QoS rule to set (ID)'), ) _add_rule_arguments(parser) return parser @@ -424,7 +424,7 @@ class ShowNetworkQosRule(command.ShowOne): parser.add_argument( 'id', metavar='', - help=_('Network QoS rule to delete (ID)'), + help=_('Network QoS rule to show (ID)'), ) return parser @@ -442,7 +442,7 @@ class ShowNetworkQosRule(command.ShowOne): rule_id, qos.id ) except Exception as e: - msg = _('Failed to set Network QoS rule ID "%(rule)s": %(e)s') % { + msg = _('Failed to show Network QoS rule ID "%(rule)s": %(e)s') % { 'rule': rule_id, 'e': e, } diff --git a/openstackclient/network/v2/network_rbac.py b/openstackclient/network/v2/network_rbac.py index e3e5aff19e..e51ac4baf6 100644 --- a/openstackclient/network/v2/network_rbac.py +++ b/openstackclient/network/v2/network_rbac.py @@ -147,7 +147,7 @@ class CreateNetworkRBAC(command.ShowOne, common.NeutronCommandWithExtraArgs): target_project_group.add_argument( '--target-all-projects', action='store_true', - help=_('Allow creating RBAC policy for all projects.'), + help=_('Allow creating RBAC policy for all projects'), ) parser.add_argument( '--target-project-domain', diff --git a/openstackclient/network/v2/network_segment_range.py b/openstackclient/network/v2/network_segment_range.py index aa0509969f..9a440f4aea 100644 --- a/openstackclient/network/v2/network_segment_range.py +++ b/openstackclient/network/v2/network_segment_range.py @@ -125,7 +125,7 @@ class CreateNetworkSegmentRange( metavar='', help=_( 'Network segment range owner (name or ID). Optional when ' - 'the segment range is shared' + 'the segment range is shared.' ), ) identity_common.add_project_domain_option_to_parser(parser) diff --git a/openstackclient/network/v2/network_trunk.py b/openstackclient/network/v2/network_trunk.py index a2b0fbf1f8..403cb11b84 100644 --- a/openstackclient/network/v2/network_trunk.py +++ b/openstackclient/network/v2/network_trunk.py @@ -69,8 +69,8 @@ class CreateNetworkTrunk(command.ShowOne): help=_( "Subport to add. Subport is of form " "'port=,segmentation-type=," - "segmentation-id=' (--subport) option " - "can be repeated" + "segmentation-id=' (repeat option " + "to add multiple subports)" ), ) admin_group = parser.add_mutually_exclusive_group() @@ -199,9 +199,9 @@ class SetNetworkTrunk(command.Command): required_keys=['port'], help=_( "Subport to add. Subport is of form " - "'port=,segmentation-type=" - ",segmentation-id=' (--subport) option " - "can be repeated" + "'port=,segmentation-type=," + "segmentation-id=' (repeat option " + "to add multiple subports)" ), ) admin_group = parser.add_mutually_exclusive_group() @@ -308,8 +308,8 @@ class UnsetNetworkTrunk(command.Command): action='append', dest='unset_subports', help=_( - "Subport to delete (name or ID of the port) " - "(--subport) option can be repeated" + "Subport to unset (name or ID of the port) " + "(repeat option to unset multiple subports)" ), ) return parser diff --git a/openstackclient/network/v2/port.py b/openstackclient/network/v2/port.py index 3579194bf7..b500bf2fa9 100644 --- a/openstackclient/network/v2/port.py +++ b/openstackclient/network/v2/port.py @@ -347,8 +347,8 @@ def _add_updatable_args(parser, create=False): help=_( "VNIC type for this port (direct | direct-physical | " "macvtap | normal | baremetal | virtio-forwarder | vdpa | " - "remote-managed, " - "default: normal)" + "remote-managed) " + "(default: normal)" ), ) parser.add_argument( @@ -406,7 +406,7 @@ def _add_updatable_args(parser, create=False): '(requires port-hints extension) ' '(requires port-hint-ovs-tx-steering extension for alias: ' 'ovs-tx-steering) ' - '(repeat option to set multiple hints)' + '(repeat option to set multiple hints).' ), ) port_trusted = parser.add_mutually_exclusive_group() @@ -416,7 +416,7 @@ def _add_updatable_args(parser, create=False): help=_( "Set port to be trusted. This will be populated into the " "'binding:profile' dictionary and passed to the services " - "which expect it in this dictionary (for example, Nova)" + "which expect it in this dictionary (for example, Nova)." ), ) port_trusted.add_argument( @@ -425,7 +425,7 @@ def _add_updatable_args(parser, create=False): help=_( "Set port to be not trusted. This will be populated into the " "'binding:profile' dictionary and passed to the services " - "which expect it in this dictionary (for example, Nova)" + "which expect it in this dictionary (for example, Nova)." ), ) @@ -512,7 +512,7 @@ class CreatePort(command.ShowOne, common.NeutronCommandWithExtraArgs): fixed_ip.add_argument( '--no-fixed-ip', action='store_true', - help=_("No IP or subnet for this port."), + help=_("No IP or subnet set for this port"), ) parser.add_argument( '--binding-profile', @@ -520,8 +520,8 @@ class CreatePort(command.ShowOne, common.NeutronCommandWithExtraArgs): action=JSONKeyValueAction, help=_( "Custom data to be passed as binding:profile. Data may " - "be passed as = or JSON. " - "(repeat option to set multiple binding:profile data)" + "be passed as = or JSON " + "(repeat option to set multiple binding:profile data)." ), ) admin_group = parser.add_mutually_exclusive_group() @@ -596,7 +596,7 @@ class CreatePort(command.ShowOne, common.NeutronCommandWithExtraArgs): port_security.add_argument( '--enable-port-security', action='store_true', - help=_("Enable port security for this port (Default)"), + help=_("Enable port security for this port (default)"), ) port_security.add_argument( '--disable-port-security', @@ -619,7 +619,7 @@ class CreatePort(command.ShowOne, common.NeutronCommandWithExtraArgs): parser.add_argument( '--device-profile', metavar='', - help=_('Cyborg port device profile'), + help=_('Port device profile'), ) parser.add_argument( '--hardware-offload-type', @@ -996,7 +996,7 @@ class SetPort(common.NeutronCommandWithExtraArgs): '--no-fixed-ip', action='store_true', help=_( - "Clear existing information of fixed IP addresses." + "Clear existing information of fixed IP addresses. " "Specify both --fixed-ip and --no-fixed-ip " "to overwrite the current fixed IP addresses." ), @@ -1007,8 +1007,8 @@ class SetPort(common.NeutronCommandWithExtraArgs): action=JSONKeyValueAction, help=_( "Custom data to be passed as binding:profile. Data may " - "be passed as = or JSON. " - "(repeat option to set multiple binding:profile data)" + "be passed as = or JSON " + "(repeat option to set multiple binding:profile data)." ), ) parser.add_argument( @@ -1075,8 +1075,8 @@ class SetPort(common.NeutronCommandWithExtraArgs): help=_( "Clear existing allowed-address pairs associated " "with this port. " - "(Specify both --allowed-address and --no-allowed-address " - "to overwrite the current allowed-address pairs)" + "Specify both --allowed-address and --no-allowed-address " + "to overwrite the current allowed-address pairs." ), ) parser.add_argument( @@ -1100,7 +1100,7 @@ class SetPort(common.NeutronCommandWithExtraArgs): help=_( "Set data plane status of this port (ACTIVE | DOWN). " "Unset it to None with the 'port unset' command " - "(requires data plane status extension)" + "(requires data plane status extension)." ), ) uplink_status_group = parser.add_mutually_exclusive_group() @@ -1262,7 +1262,7 @@ class UnsetPort(common.NeutronUnsetCommandWithExtraArgs): action='append', help=_( "Desired key which should be removed from binding:profile " - "(repeat option to unset multiple binding:profile data)" + "(repeat option to unset multiple binding:profile keys)" ), ) parser.add_argument( @@ -1298,7 +1298,7 @@ class UnsetPort(common.NeutronUnsetCommandWithExtraArgs): parser.add_argument( '--data-plane-status', action='store_true', - help=_("Clear existing information of data plane status"), + help=_("Clear existing data plane status information"), ) parser.add_argument( '--numa-policy', @@ -1309,13 +1309,13 @@ class UnsetPort(common.NeutronUnsetCommandWithExtraArgs): '--host', action='store_true', default=False, - help=_("Clear host binding for the port."), + help=_("Clear host binding for the port"), ) parser.add_argument( '--hints', action='store_true', default=False, - help=_("Clear hints for the port."), + help=_("Clear hints for the port"), ) _tag.add_tag_option_to_parser_for_unset(parser, _('port')) parser.add_argument( diff --git a/openstackclient/network/v2/router.py b/openstackclient/network/v2/router.py index 0deae3600d..0989456bc6 100644 --- a/openstackclient/network/v2/router.py +++ b/openstackclient/network/v2/router.py @@ -258,7 +258,7 @@ def _parser_add_bfd_ecmp_arguments(parser): action='store_true', help=_( "Enable BFD sessions for default routes inferred from " - "the external gateway port subnets for this router." + "the external gateway port subnets for this router" ), ) parser.add_argument( @@ -268,7 +268,7 @@ def _parser_add_bfd_ecmp_arguments(parser): action='store_false', help=_( "Disable BFD sessions for default routes inferred from " - "the external gateway port subnets for this router." + "the external gateway port subnets for this router" ), ) parser.add_argument( @@ -278,7 +278,7 @@ def _parser_add_bfd_ecmp_arguments(parser): action='store_true', help=_( "Add ECMP default routes if multiple are available via " - "different gateway ports." + "different gateway ports" ), ) parser.add_argument( @@ -286,7 +286,7 @@ def _parser_add_bfd_ecmp_arguments(parser): dest='enable_default_route_ecmp', default=None, action='store_false', - help=_("Add default route only for first gateway port."), + help=_("Add default route only for first gateway port"), ) @@ -367,7 +367,7 @@ class AddExtraRoutesToRouter(command.ShowOne): metavar='', help=_( "Router to which extra static routes " - "will be added (name or ID)." + "will be added (name or ID)" ), ) parser.add_argument( @@ -382,7 +382,7 @@ class AddExtraRoutesToRouter(command.ShowOne): "destination: destination subnet (in CIDR notation), " "gateway: nexthop IP address. " "Repeat option to add multiple routes. " - "Trying to add a route that's already present " + "Trying to add a route that is already present " "(exactly, including destination and nexthop) " "in the routing table is allowed and is considered " "a successful operation." @@ -418,7 +418,7 @@ class RemoveExtraRoutesFromRouter(command.ShowOne): metavar='', help=_( "Router from which extra static routes " - "will be removed (name or ID)." + "will be removed (name or ID)" ), ) parser.add_argument( @@ -433,7 +433,7 @@ class RemoveExtraRoutesFromRouter(command.ShowOne): "destination: destination subnet (in CIDR notation), " "gateway: nexthop IP address. " "Repeat option to remove multiple routes. " - "Trying to remove a route that's already missing " + "Trying to remove a route that is already missing " "(fully, including destination and nexthop) " "from the routing table is allowed and is considered " "a successful operation." @@ -525,9 +525,9 @@ class CreateRouter(command.ShowOne, common.NeutronCommandWithExtraArgs): metavar="", action='append', help=_( - "External Network used as router's gateway (name or ID). " + "External Network used as router's gateway (name or ID) " "(repeat option to set multiple gateways per router " - "if the L3 service plugin in use supports it)." + "if the L3 service plugin in use supports it)" ), dest='external_gateways', ) @@ -541,7 +541,7 @@ class CreateRouter(command.ShowOne, common.NeutronCommandWithExtraArgs): "Desired IP and/or subnet (name or ID) " "on external gateway: " "subnet=,ip-address= " - "(repeat option to set multiple fixed IP addresses)." + "(repeat option to set multiple fixed IP addresses)" ), ) snat_group = parser.add_mutually_exclusive_group() @@ -927,7 +927,7 @@ class SetRouter(common.NeutronCommandWithExtraArgs): default=None, required_keys=['destination', 'gateway'], help=_( - "Add routes to the router " + "Add routes to the router. " "destination: destination subnet (in CIDR notation) " "gateway: nexthop IP address " "(repeat option to add multiple routes). " @@ -967,7 +967,7 @@ class SetRouter(common.NeutronCommandWithExtraArgs): metavar="", action='append', help=_( - "External Network used as router's gateway (name or ID). " + "External Network used as router's gateway (name or ID) " "(repeat option to set multiple gateways per router " "if the L3 service plugin in use supports it)." ), @@ -983,7 +983,7 @@ class SetRouter(common.NeutronCommandWithExtraArgs): "Desired IP and/or subnet (name or ID) " "on external gateway: " "subnet=,ip-address= " - "(repeat option to set multiple fixed IP addresses)." + "(repeat option to set multiple fixed IP addresses)" ), ) snat_group = parser.add_mutually_exclusive_group() @@ -1163,7 +1163,7 @@ class UnsetRouter(common.NeutronUnsetCommandWithExtraArgs): default=None, required_keys=['destination', 'gateway'], help=_( - "Routes to be removed from the router " + "Routes to be removed from the router. " "destination: destination subnet (in CIDR notation) " "gateway: nexthop IP address " "(repeat option to unset multiple routes)" @@ -1216,7 +1216,7 @@ class UnsetRouter(common.NeutronUnsetCommandWithExtraArgs): ): pass except (KeyError, TypeError): - msg = _("Router does not have external network or qos policy") + msg = _("Router does not have external network or QoS policy") raise exceptions.CommandError(msg) else: attrs['external_gateway_info'] = { @@ -1253,13 +1253,13 @@ class AddGatewayToRouter(command.ShowOne): parser.add_argument( 'router', metavar="", - help=_("Router to modify (name or ID)."), + help=_("Router to modify (name or ID)"), ) parser.add_argument( metavar="", help=_( "External Network to a attach a router gateway to (name or " - "ID)." + "ID)" ), dest='external_gateways', # The argument is stored in a list in order to reuse the @@ -1276,7 +1276,7 @@ class AddGatewayToRouter(command.ShowOne): "Desired IP and/or subnet (name or ID) " "on external gateway: " "subnet=,ip-address= " - "(repeat option to set multiple fixed IP addresses)." + "(repeat option to set multiple fixed IP addresses)" ), ) return parser @@ -1327,7 +1327,7 @@ class RemoveGatewayFromRouter(command.ShowOne): metavar="", help=_( "External Network to remove a router gateway from (name or " - "ID)." + "ID)" ), dest='external_gateways', # The argument is stored in a list in order to reuse the @@ -1344,7 +1344,7 @@ class RemoveGatewayFromRouter(command.ShowOne): "IP and/or subnet (name or ID) on the external gateway " "which is used to identify a particular gateway if multiple " "are attached to the same network: subnet=," - "ip-address=." + "ip-address=" ), ) return parser diff --git a/openstackclient/network/v2/security_group.py b/openstackclient/network/v2/security_group.py index 556eff2c0d..1735b7c636 100644 --- a/openstackclient/network/v2/security_group.py +++ b/openstackclient/network/v2/security_group.py @@ -126,7 +126,7 @@ class CreateSecurityGroup( "--stateful", action='store_true', default=None, - help=_("Security group is stateful (Default)"), + help=_("Security group is stateful (default)"), ) stateful_group.add_argument( "--stateless", @@ -345,7 +345,7 @@ class SetSecurityGroup( "--stateful", action='store_true', default=None, - help=_("Security group is stateful (Default)"), + help=_("Security group is stateful (default)"), ) stateful_group.add_argument( "--stateless", diff --git a/openstackclient/network/v2/subnet.py b/openstackclient/network/v2/subnet.py index 3d172adb18..543e61d0aa 100644 --- a/openstackclient/network/v2/subnet.py +++ b/openstackclient/network/v2/subnet.py @@ -84,8 +84,8 @@ def _get_common_parse_arguments(parser, is_create=True): action=parseractions.MultiKeyValueAction, required_keys=['start', 'end'], help=_( - "Allocation pool IP addresses for this subnet " - "e.g.: start=192.168.199.2,end=192.168.199.254 " + "Allocation pool IP addresses for this subnet, " + "for example, start=192.168.199.2,end=192.168.199.254 " "(repeat option to add multiple IP addresses)" ), ) @@ -127,10 +127,10 @@ def _get_common_parse_arguments(parser, is_create=True): action=parseractions.MultiKeyValueAction, required_keys=['destination', 'gateway'], help=_( - "Additional route for this subnet " - "e.g.: destination=10.10.0.0/16,gateway=192.168.71.254 " + "Additional route for this subnet, " + "for example, destination=10.10.0.0/16,gateway=192.168.71.254 " "destination: destination subnet (in CIDR notation) " - "gateway: nexthop IP address " + "gateway: next-hop IP address " "(repeat option to add multiple routes)" ), ) @@ -150,8 +150,8 @@ def _get_common_parse_arguments(parser, is_create=True): action='append', dest='service_types', help=_( - "Service type for this subnet " - "e.g.: network:floatingip_agent_gateway. " + "Service type for this subnet, " + "for example, network:floatingip_agent_gateway. " "Must be a valid device owner value for a network port " "(repeat option to set multiple service types)" ), @@ -365,8 +365,8 @@ class CreateSubnet(command.ShowOne, common.NeutronCommandWithExtraArgs): ": Specific IP address to use as the gateway, " "'auto': Gateway address should automatically be chosen " "from within the subnet itself, 'none': This subnet will " - "not use a gateway, e.g.: --gateway 192.168.9.1, " - "--gateway auto, --gateway none (default is 'auto')." + "not use a gateway. For example, --gateway 192.168.9.1, " + "--gateway auto or --gateway none (default is 'auto')." ), ) parser.add_argument( @@ -375,7 +375,7 @@ class CreateSubnet(command.ShowOne, common.NeutronCommandWithExtraArgs): default=4, choices=[4, 6], help=_( - "IP version (default is 4). Note that when subnet pool is " + "IP version (default is 4). Note that when subnet pool is " "specified, IP version is determined from the subnet pool " "and this option is ignored." ), @@ -513,10 +513,10 @@ class ListSubnet(command.Lister): action='append', dest='service_types', help=_( - "List only subnets of a given service type in output " - "e.g.: network:floatingip_agent_gateway. " + "List only subnets of a given service type in output, " + "for example, network:floatingip_agent_gateway. " "Must be a valid device owner value for a network port " - "(repeat option to list multiple service types)" + "(repeat option to list multiple service types)." ), ) parser.add_argument( @@ -551,8 +551,8 @@ class ListSubnet(command.Lister): metavar='', help=_( "List only subnets of given subnet range " - "(in CIDR notation) in output " - "e.g.: --subnet-range 10.10.0.0/16" + "(in CIDR notation) in output. " + "For example, --subnet-range 10.10.0.0/16" ), ) parser.add_argument( @@ -560,7 +560,7 @@ class ListSubnet(command.Lister): metavar='', help=_( "List only subnets which belong to a given subnet pool " - "in output (Name or ID)" + "in output (name or ID)" ), ) _tag.add_tag_filtering_option_to_parser(parser, _('subnets')) @@ -684,8 +684,8 @@ class SetSubnet(common.NeutronCommandWithExtraArgs): help=_( "Specify a gateway for the subnet. The options are: " ": Specific IP address to use as the gateway, " - "'none': This subnet will not use a gateway, " - "e.g.: --gateway 192.168.9.1, --gateway none." + "'none': This subnet will not use a gateway. " + "For example, --gateway 192.168.9.1 or --gateway none." ), ) parser.add_argument( @@ -694,7 +694,7 @@ class SetSubnet(common.NeutronCommandWithExtraArgs): help=_( "Network segment to associate with this subnet (name or " "ID). It is only allowed to set the segment if the current " - "value is `None`, the network must also have only one " + "value is `None`. The network must also have only one " "segment and only one subnet can exist on the network." ), ) @@ -774,7 +774,7 @@ class UnsetSubnet(common.NeutronUnsetCommandWithExtraArgs): required_keys=['start', 'end'], help=_( 'Allocation pool IP addresses to be removed from this ' - 'subnet e.g.: start=192.168.199.2,end=192.168.199.254 ' + 'subnet, for example, start=192.168.199.2,end=192.168.199.254 ' '(repeat option to unset multiple allocation pools)' ), ) @@ -800,10 +800,10 @@ class UnsetSubnet(common.NeutronUnsetCommandWithExtraArgs): action=parseractions.MultiKeyValueAction, required_keys=['destination', 'gateway'], help=_( - 'Route to be removed from this subnet ' - 'e.g.: destination=10.10.0.0/16,gateway=192.168.71.254 ' + 'Route to be removed from this subnet, ' + 'for example, destination=10.10.0.0/16,gateway=192.168.71.254 ' 'destination: destination subnet (in CIDR notation) ' - 'gateway: nexthop IP address ' + 'gateway: next-hop IP address ' '(repeat option to unset multiple host routes)' ), ) @@ -813,8 +813,8 @@ class UnsetSubnet(common.NeutronUnsetCommandWithExtraArgs): action='append', dest='service_types', help=_( - 'Service type to be removed from this subnet ' - 'e.g.: network:floatingip_agent_gateway. ' + 'Service type to be removed from this subnet, ' + 'for example, network:floatingip_agent_gateway. ' 'Must be a valid device owner value for a network port ' '(repeat option to unset multiple service types)' ),