Fix neutron typos and formatting

Just trying to make things consistent in the neutron files.

TrivialFix

Change-Id: I9c0ac838f5a956f55161e1636472cca761b14781
This commit is contained in:
Brian Haley
2025-03-13 17:10:27 -04:00
parent 866009211f
commit 107c6b143f
18 changed files with 126 additions and 124 deletions

View File

@@ -149,7 +149,7 @@ class CreateFloatingIPPortForwarding(
'--description', '--description',
metavar='<description>', metavar='<description>',
help=_( help=_(
"A text to describe/contextualize the use of the " "Text to describe/contextualize the use of the "
"port forwarding configuration" "port forwarding configuration"
), ),
) )
@@ -280,7 +280,7 @@ class ListFloatingIPPortForwarding(command.Lister):
) )
parser.add_argument( parser.add_argument(
'--protocol', '--protocol',
metavar='protocol', metavar='<protocol>',
help=_("Filter the list result by the port protocol"), help=_("Filter the list result by the port protocol"),
) )
@@ -409,7 +409,7 @@ class SetFloatingIPPortForwarding(common.NeutronCommandWithExtraArgs):
'--description', '--description',
metavar='<description>', metavar='<description>',
help=_( help=_(
"A text to describe/contextualize the use of " "Text to describe/contextualize the use of "
"the port forwarding configuration" "the port forwarding configuration"
), ),
) )

View File

@@ -99,7 +99,7 @@ class DeleteConntrackHelper(command.Command):
parser.add_argument( parser.add_argument(
'router', 'router',
metavar='<router>', metavar='<router>',
help=_('Router that the conntrack helper belong to'), help=_('Router that the conntrack helper belongs to'),
) )
parser.add_argument( parser.add_argument(
'conntrack_helper_id', 'conntrack_helper_id',
@@ -147,7 +147,7 @@ class ListConntrackHelper(command.Lister):
parser.add_argument( parser.add_argument(
'router', 'router',
metavar='<router>', metavar='<router>',
help=_('Router that the conntrack helper belong to'), help=_('Router that the conntrack helper belongs to'),
) )
parser.add_argument( parser.add_argument(
'--helper', '--helper',
@@ -210,7 +210,7 @@ class SetConntrackHelper(command.Command):
parser.add_argument( parser.add_argument(
'router', 'router',
metavar='<router>', metavar='<router>',
help=_('Router that the conntrack helper belong to'), help=_('Router that the conntrack helper belongs to'),
) )
parser.add_argument( parser.add_argument(
'conntrack_helper_id', 'conntrack_helper_id',
@@ -257,7 +257,7 @@ class ShowConntrackHelper(command.ShowOne):
parser.add_argument( parser.add_argument(
'router', 'router',
metavar='<router>', metavar='<router>',
help=_('Router that the conntrack helper belong to'), help=_('Router that the conntrack helper belongs to'),
) )
parser.add_argument( parser.add_argument(
'conntrack_helper_id', 'conntrack_helper_id',

View File

@@ -74,30 +74,32 @@ class CreateLocalIP(command.ShowOne):
def get_parser(self, prog_name): def get_parser(self, prog_name):
parser = super().get_parser(prog_name) parser = super().get_parser(prog_name)
parser.add_argument( parser.add_argument(
'--name', metavar="<name>", help=_("New local IP name") '--name', metavar="<name>", help=_("New Local IP name")
) )
parser.add_argument( parser.add_argument(
'--description', '--description',
metavar="<description>", metavar="<description>",
help=_("New local IP description"), help=_("Description for Local IP"),
) )
parser.add_argument( parser.add_argument(
'--network', '--network',
metavar='<network>', metavar='<network>',
help=_("Network to allocate Local IP (name or ID)"), help=_("Network to allocate Local IP from (name or ID)"),
) )
parser.add_argument( parser.add_argument(
'--local-port', '--local-port',
metavar='<local-port>', metavar='<local-port>',
help=_("Port to allocate Local IP (name or ID)"), help=_("Port to allocate Local IP from (name or ID)"),
) )
parser.add_argument( parser.add_argument(
"--local-ip-address", "--local-ip-address",
metavar="<local-ip-address>", metavar="<local-ip-address>",
help=_("IP address or CIDR "), help=_("IP address or CIDR for Local IP"),
) )
parser.add_argument( parser.add_argument(
'--ip-mode', metavar='<ip-mode>', help=_("local IP ip mode") '--ip-mode',
metavar='<ip-mode>',
help=_("IP mode to use for Local IP"),
) )
identity_common.add_project_domain_option_to_parser(parser) identity_common.add_project_domain_option_to_parser(parser)
@@ -116,7 +118,7 @@ class CreateLocalIP(command.ShowOne):
class DeleteLocalIP(command.Command): class DeleteLocalIP(command.Command):
_description = _("Delete local IP(s)") _description = _("Delete Local IP(s)")
def get_parser(self, prog_name): def get_parser(self, prog_name):
parser = super().get_parser(prog_name) parser = super().get_parser(prog_name)
@@ -156,7 +158,7 @@ class DeleteLocalIP(command.Command):
class SetLocalIP(command.Command): class SetLocalIP(command.Command):
_description = _("Set local ip properties") _description = _("Set Local IP properties")
def get_parser(self, prog_name): def get_parser(self, prog_name):
parser = super().get_parser(prog_name) parser = super().get_parser(prog_name)
@@ -171,7 +173,7 @@ class SetLocalIP(command.Command):
parser.add_argument( parser.add_argument(
'--description', '--description',
metavar="<description>", metavar="<description>",
help=_('Set local IP description'), help=_('Set Local IP description'),
) )
return parser return parser
@@ -188,7 +190,7 @@ class SetLocalIP(command.Command):
class ListLocalIP(command.Lister): class ListLocalIP(command.Lister):
_description = _("List local IPs") _description = _("List Local IPs")
def get_parser(self, prog_name): def get_parser(self, prog_name):
parser = super().get_parser(prog_name) parser = super().get_parser(prog_name)
@@ -196,7 +198,7 @@ class ListLocalIP(command.Lister):
parser.add_argument( parser.add_argument(
'--name', '--name',
metavar='<name>', metavar='<name>',
help=_("List only local IPs of given name in output"), help=_("List only Local IPs of given name in output"),
) )
parser.add_argument( parser.add_argument(
'--project', '--project',
@@ -295,7 +297,7 @@ class ListLocalIP(command.Lister):
class ShowLocalIP(command.ShowOne): class ShowLocalIP(command.ShowOne):
_description = _("Display local IP details") _description = _("Display Local IP details")
def get_parser(self, prog_name): def get_parser(self, prog_name):
parser = super().get_parser(prog_name) parser = super().get_parser(prog_name)

View File

@@ -69,7 +69,7 @@ class CreateNDPProxy(command.ShowOne):
'--description', '--description',
metavar='<description>', metavar='<description>',
help=_( help=_(
"A text to describe/contextualize the use of the " "Text to describe/contextualize the use of the "
"NDP proxy configuration" "NDP proxy configuration"
), ),
) )
@@ -156,18 +156,18 @@ class ListNDPProxy(command.Lister):
) )
parser.add_argument( parser.add_argument(
'--ip-address', '--ip-address',
metavar='ip-address', metavar='<ip-address>',
help=_("List only NDP proxies according to their IPv6 address"), help=_("List only NDP proxies associated to this IPv6 address"),
) )
parser.add_argument( parser.add_argument(
'--project', '--project',
metavar='<project>', metavar='<project>',
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( parser.add_argument(
'--name', '--name',
metavar='<name>', metavar='<name>',
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) identity_common.add_project_domain_option_to_parser(parser)
@@ -247,7 +247,7 @@ class SetNDPProxy(command.Command):
'--description', '--description',
metavar='<description>', metavar='<description>',
help=_( help=_(
"A text to describe/contextualize the use of " "Text to describe/contextualize the use of "
"the NDP proxy configuration" "the NDP proxy configuration"
), ),
) )

View File

@@ -166,7 +166,7 @@ def _add_additional_network_options(parser):
help=_( help=_(
"The physical mechanism by which the virtual network " "The physical mechanism by which the virtual network "
"is implemented. For example: " "is implemented. For example: "
"flat, geneve, gre, local, vlan, vxlan." "flat, geneve, gre, local, vlan or vxlan."
), ),
) )
parser.add_argument( parser.add_argument(
@@ -292,8 +292,8 @@ class CreateNetwork(
action='store_true', action='store_true',
help=self.enhance_help_neutron( help=self.enhance_help_neutron(
_( _(
"The network has an external routing facility that's not " "The network has an external routing facility that is not "
"managed by Neutron and can be used as in: " "managed by Neutron and can be used. For example: "
"openstack router set --external-gateway NETWORK " "openstack router set --external-gateway NETWORK "
"(external-net extension required)" "(external-net extension required)"
) )
@@ -537,7 +537,7 @@ class ListNetwork(common.NetworkAndComputeLister):
_( _(
"List networks according to their physical mechanisms. " "List networks according to their physical mechanisms. "
"The supported options are: flat, geneve, gre, local, " "The supported options are: flat, geneve, gre, local, "
"vlan, vxlan." "vlan and vxlan."
) )
), ),
) )
@@ -789,10 +789,10 @@ class SetNetwork(common.NeutronCommandWithExtraArgs):
'--external', '--external',
action='store_true', action='store_true',
help=_( help=_(
"The network has an external routing facility that's not " "The network has an external routing facility that is not "
"managed by Neutron and can be used as in: " "managed by Neutron and can be used. For example: "
"openstack router set --external-gateway NETWORK " "openstack router set --external-gateway NETWORK "
"(external-net extension required)" "(external-net extension required)."
), ),
) )
external_router_grp.add_argument( external_router_grp.add_argument(

View File

@@ -71,7 +71,7 @@ class CreateAutoAllocatedTopology(command.ShowOne):
metavar='<project>', metavar='<project>',
help=_( help=_(
"Return the auto allocated topology for a given project. " "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) identity_common.add_project_domain_option_to_parser(parser)
@@ -89,7 +89,7 @@ class CreateAutoAllocatedTopology(command.ShowOne):
default=True, default=True,
help=_( help=_(
"If topology exists returns the topology's " "If topology exists returns the topology's "
"information (Default)" "information (default)"
), ),
) )
@@ -132,7 +132,7 @@ class DeleteAutoAllocatedTopology(command.Command):
metavar='<project>', metavar='<project>',
help=_( help=_(
'Delete auto allocated topology for a given project. ' '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) identity_common.add_project_domain_option_to_parser(parser)

View File

@@ -102,7 +102,7 @@ class CreateNetworkFlavor(command.ShowOne, common.NeutronCommandWithExtraArgs):
metavar="<service-type>", metavar="<service-type>",
required=True, required=True,
help=_( 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 ' '(See openstack network service provider list for loaded '
'examples.)' 'examples.)'
), ),

View File

@@ -79,14 +79,14 @@ class CreateNetworkFlavorProfile(
'--driver', '--driver',
help=_( help=_(
"Python module path to driver. This becomes " "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( parser.add_argument(
'--metainfo', '--metainfo',
help=_( help=_(
"Metainfo for the flavor profile. This becomes " "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', '--driver',
help=_( help=_(
"Python module path to driver. This becomes " "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( parser.add_argument(
'--metainfo', '--metainfo',
help=_( help=_(
"Metainfo for the flavor profile. This becomes " "Metainfo for the flavor profile. This becomes "
"required if --driver is missing and vice versa" "required if --driver is missing and vice-versa."
), ),
) )

View File

@@ -70,7 +70,7 @@ class CreateMeter(command.ShowOne, common.NeutronCommandWithExtraArgs):
parser.add_argument( parser.add_argument(
'--description', '--description',
metavar='<description>', metavar='<description>',
help=_("Create description for meter"), help=_("Description for meter"),
) )
parser.add_argument( parser.add_argument(
'--project', '--project',

View File

@@ -190,7 +190,7 @@ class ListNetworkQosPolicy(command.Lister):
'--project', '--project',
metavar='<project>', metavar='<project>',
help=_( 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) identity_common.add_project_domain_option_to_parser(parser)
@@ -198,12 +198,12 @@ class ListNetworkQosPolicy(command.Lister):
shared_group.add_argument( shared_group.add_argument(
'--share', '--share',
action='store_true', action='store_true',
help=_("List qos policies shared between projects"), help=_("List QoS policies shared between projects"),
) )
shared_group.add_argument( shared_group.add_argument(
'--no-share', '--no-share',
action='store_true', action='store_true',
help=_("List qos policies not shared between projects"), help=_("List QoS policies not shared between projects"),
) )
return parser return parser

View File

@@ -378,7 +378,7 @@ class SetNetworkQosRule(common.NeutronCommandWithExtraArgs):
parser.add_argument( parser.add_argument(
'id', 'id',
metavar='<rule-id>', metavar='<rule-id>',
help=_('Network QoS rule to delete (ID)'), help=_('Network QoS rule to set (ID)'),
) )
_add_rule_arguments(parser) _add_rule_arguments(parser)
return parser return parser
@@ -424,7 +424,7 @@ class ShowNetworkQosRule(command.ShowOne):
parser.add_argument( parser.add_argument(
'id', 'id',
metavar='<rule-id>', metavar='<rule-id>',
help=_('Network QoS rule to delete (ID)'), help=_('Network QoS rule to show (ID)'),
) )
return parser return parser
@@ -442,7 +442,7 @@ class ShowNetworkQosRule(command.ShowOne):
rule_id, qos.id rule_id, qos.id
) )
except Exception as e: 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, 'rule': rule_id,
'e': e, 'e': e,
} }

View File

@@ -147,7 +147,7 @@ class CreateNetworkRBAC(command.ShowOne, common.NeutronCommandWithExtraArgs):
target_project_group.add_argument( target_project_group.add_argument(
'--target-all-projects', '--target-all-projects',
action='store_true', action='store_true',
help=_('Allow creating RBAC policy for all projects.'), help=_('Allow creating RBAC policy for all projects'),
) )
parser.add_argument( parser.add_argument(
'--target-project-domain', '--target-project-domain',

View File

@@ -125,7 +125,7 @@ class CreateNetworkSegmentRange(
metavar='<project>', metavar='<project>',
help=_( help=_(
'Network segment range owner (name or ID). Optional when ' '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) identity_common.add_project_domain_option_to_parser(parser)

View File

@@ -69,8 +69,8 @@ class CreateNetworkTrunk(command.ShowOne):
help=_( help=_(
"Subport to add. Subport is of form " "Subport to add. Subport is of form "
"'port=<name or ID>,segmentation-type=<segmentation-type>," "'port=<name or ID>,segmentation-type=<segmentation-type>,"
"segmentation-id=<segmentation-ID>' (--subport) option " "segmentation-id=<segmentation-ID>' (repeat option "
"can be repeated" "to add multiple subports)"
), ),
) )
admin_group = parser.add_mutually_exclusive_group() admin_group = parser.add_mutually_exclusive_group()
@@ -199,9 +199,9 @@ class SetNetworkTrunk(command.Command):
required_keys=['port'], required_keys=['port'],
help=_( help=_(
"Subport to add. Subport is of form " "Subport to add. Subport is of form "
"'port=<name or ID>,segmentation-type=<segmentation-type>" "'port=<name or ID>,segmentation-type=<segmentation-type>,"
",segmentation-id=<segmentation-ID>' (--subport) option " "segmentation-id=<segmentation-ID>' (repeat option "
"can be repeated" "to add multiple subports)"
), ),
) )
admin_group = parser.add_mutually_exclusive_group() admin_group = parser.add_mutually_exclusive_group()
@@ -308,8 +308,8 @@ class UnsetNetworkTrunk(command.Command):
action='append', action='append',
dest='unset_subports', dest='unset_subports',
help=_( help=_(
"Subport to delete (name or ID of the port) " "Subport to unset (name or ID of the port) "
"(--subport) option can be repeated" "(repeat option to unset multiple subports)"
), ),
) )
return parser return parser

View File

@@ -347,8 +347,8 @@ def _add_updatable_args(parser, create=False):
help=_( help=_(
"VNIC type for this port (direct | direct-physical | " "VNIC type for this port (direct | direct-physical | "
"macvtap | normal | baremetal | virtio-forwarder | vdpa | " "macvtap | normal | baremetal | virtio-forwarder | vdpa | "
"remote-managed, " "remote-managed) "
"default: normal)" "(default: normal)"
), ),
) )
parser.add_argument( parser.add_argument(
@@ -406,7 +406,7 @@ def _add_updatable_args(parser, create=False):
'(requires port-hints extension) ' '(requires port-hints extension) '
'(requires port-hint-ovs-tx-steering extension for alias: ' '(requires port-hint-ovs-tx-steering extension for alias: '
'ovs-tx-steering) ' 'ovs-tx-steering) '
'(repeat option to set multiple hints)' '(repeat option to set multiple hints).'
), ),
) )
port_trusted = parser.add_mutually_exclusive_group() port_trusted = parser.add_mutually_exclusive_group()
@@ -416,7 +416,7 @@ def _add_updatable_args(parser, create=False):
help=_( help=_(
"Set port to be trusted. This will be populated into the " "Set port to be trusted. This will be populated into the "
"'binding:profile' dictionary and passed to the services " "'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( port_trusted.add_argument(
@@ -425,7 +425,7 @@ def _add_updatable_args(parser, create=False):
help=_( help=_(
"Set port to be not trusted. This will be populated into the " "Set port to be not trusted. This will be populated into the "
"'binding:profile' dictionary and passed to the services " "'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( fixed_ip.add_argument(
'--no-fixed-ip', '--no-fixed-ip',
action='store_true', action='store_true',
help=_("No IP or subnet for this port."), help=_("No IP or subnet set for this port"),
) )
parser.add_argument( parser.add_argument(
'--binding-profile', '--binding-profile',
@@ -520,8 +520,8 @@ class CreatePort(command.ShowOne, common.NeutronCommandWithExtraArgs):
action=JSONKeyValueAction, action=JSONKeyValueAction,
help=_( help=_(
"Custom data to be passed as binding:profile. Data may " "Custom data to be passed as binding:profile. Data may "
"be passed as <key>=<value> or JSON. " "be passed as <key>=<value> or JSON "
"(repeat option to set multiple binding:profile data)" "(repeat option to set multiple binding:profile data)."
), ),
) )
admin_group = parser.add_mutually_exclusive_group() admin_group = parser.add_mutually_exclusive_group()
@@ -596,7 +596,7 @@ class CreatePort(command.ShowOne, common.NeutronCommandWithExtraArgs):
port_security.add_argument( port_security.add_argument(
'--enable-port-security', '--enable-port-security',
action='store_true', action='store_true',
help=_("Enable port security for this port (Default)"), help=_("Enable port security for this port (default)"),
) )
port_security.add_argument( port_security.add_argument(
'--disable-port-security', '--disable-port-security',
@@ -619,7 +619,7 @@ class CreatePort(command.ShowOne, common.NeutronCommandWithExtraArgs):
parser.add_argument( parser.add_argument(
'--device-profile', '--device-profile',
metavar='<device-profile>', metavar='<device-profile>',
help=_('Cyborg port device profile'), help=_('Port device profile'),
) )
parser.add_argument( parser.add_argument(
'--hardware-offload-type', '--hardware-offload-type',
@@ -996,7 +996,7 @@ class SetPort(common.NeutronCommandWithExtraArgs):
'--no-fixed-ip', '--no-fixed-ip',
action='store_true', action='store_true',
help=_( help=_(
"Clear existing information of fixed IP addresses." "Clear existing information of fixed IP addresses. "
"Specify both --fixed-ip and --no-fixed-ip " "Specify both --fixed-ip and --no-fixed-ip "
"to overwrite the current fixed IP addresses." "to overwrite the current fixed IP addresses."
), ),
@@ -1007,8 +1007,8 @@ class SetPort(common.NeutronCommandWithExtraArgs):
action=JSONKeyValueAction, action=JSONKeyValueAction,
help=_( help=_(
"Custom data to be passed as binding:profile. Data may " "Custom data to be passed as binding:profile. Data may "
"be passed as <key>=<value> or JSON. " "be passed as <key>=<value> or JSON "
"(repeat option to set multiple binding:profile data)" "(repeat option to set multiple binding:profile data)."
), ),
) )
parser.add_argument( parser.add_argument(
@@ -1075,8 +1075,8 @@ class SetPort(common.NeutronCommandWithExtraArgs):
help=_( help=_(
"Clear existing allowed-address pairs associated " "Clear existing allowed-address pairs associated "
"with this port. " "with this port. "
"(Specify both --allowed-address and --no-allowed-address " "Specify both --allowed-address and --no-allowed-address "
"to overwrite the current allowed-address pairs)" "to overwrite the current allowed-address pairs."
), ),
) )
parser.add_argument( parser.add_argument(
@@ -1100,7 +1100,7 @@ class SetPort(common.NeutronCommandWithExtraArgs):
help=_( help=_(
"Set data plane status of this port (ACTIVE | DOWN). " "Set data plane status of this port (ACTIVE | DOWN). "
"Unset it to None with the 'port unset' command " "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() uplink_status_group = parser.add_mutually_exclusive_group()
@@ -1262,7 +1262,7 @@ class UnsetPort(common.NeutronUnsetCommandWithExtraArgs):
action='append', action='append',
help=_( help=_(
"Desired key which should be removed from binding:profile " "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( parser.add_argument(
@@ -1298,7 +1298,7 @@ class UnsetPort(common.NeutronUnsetCommandWithExtraArgs):
parser.add_argument( parser.add_argument(
'--data-plane-status', '--data-plane-status',
action='store_true', action='store_true',
help=_("Clear existing information of data plane status"), help=_("Clear existing data plane status information"),
) )
parser.add_argument( parser.add_argument(
'--numa-policy', '--numa-policy',
@@ -1309,13 +1309,13 @@ class UnsetPort(common.NeutronUnsetCommandWithExtraArgs):
'--host', '--host',
action='store_true', action='store_true',
default=False, default=False,
help=_("Clear host binding for the port."), help=_("Clear host binding for the port"),
) )
parser.add_argument( parser.add_argument(
'--hints', '--hints',
action='store_true', action='store_true',
default=False, default=False,
help=_("Clear hints for the port."), help=_("Clear hints for the port"),
) )
_tag.add_tag_option_to_parser_for_unset(parser, _('port')) _tag.add_tag_option_to_parser_for_unset(parser, _('port'))
parser.add_argument( parser.add_argument(

View File

@@ -258,7 +258,7 @@ def _parser_add_bfd_ecmp_arguments(parser):
action='store_true', action='store_true',
help=_( help=_(
"Enable BFD sessions for default routes inferred from " "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( parser.add_argument(
@@ -268,7 +268,7 @@ def _parser_add_bfd_ecmp_arguments(parser):
action='store_false', action='store_false',
help=_( help=_(
"Disable BFD sessions for default routes inferred from " "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( parser.add_argument(
@@ -278,7 +278,7 @@ def _parser_add_bfd_ecmp_arguments(parser):
action='store_true', action='store_true',
help=_( help=_(
"Add ECMP default routes if multiple are available via " "Add ECMP default routes if multiple are available via "
"different gateway ports." "different gateway ports"
), ),
) )
parser.add_argument( parser.add_argument(
@@ -286,7 +286,7 @@ def _parser_add_bfd_ecmp_arguments(parser):
dest='enable_default_route_ecmp', dest='enable_default_route_ecmp',
default=None, default=None,
action='store_false', 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='<router>', metavar='<router>',
help=_( help=_(
"Router to which extra static routes " "Router to which extra static routes "
"will be added (name or ID)." "will be added (name or ID)"
), ),
) )
parser.add_argument( parser.add_argument(
@@ -382,7 +382,7 @@ class AddExtraRoutesToRouter(command.ShowOne):
"destination: destination subnet (in CIDR notation), " "destination: destination subnet (in CIDR notation), "
"gateway: nexthop IP address. " "gateway: nexthop IP address. "
"Repeat option to add multiple routes. " "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) " "(exactly, including destination and nexthop) "
"in the routing table is allowed and is considered " "in the routing table is allowed and is considered "
"a successful operation." "a successful operation."
@@ -418,7 +418,7 @@ class RemoveExtraRoutesFromRouter(command.ShowOne):
metavar='<router>', metavar='<router>',
help=_( help=_(
"Router from which extra static routes " "Router from which extra static routes "
"will be removed (name or ID)." "will be removed (name or ID)"
), ),
) )
parser.add_argument( parser.add_argument(
@@ -433,7 +433,7 @@ class RemoveExtraRoutesFromRouter(command.ShowOne):
"destination: destination subnet (in CIDR notation), " "destination: destination subnet (in CIDR notation), "
"gateway: nexthop IP address. " "gateway: nexthop IP address. "
"Repeat option to remove multiple routes. " "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) " "(fully, including destination and nexthop) "
"from the routing table is allowed and is considered " "from the routing table is allowed and is considered "
"a successful operation." "a successful operation."
@@ -525,9 +525,9 @@ class CreateRouter(command.ShowOne, common.NeutronCommandWithExtraArgs):
metavar="<network>", metavar="<network>",
action='append', action='append',
help=_( 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 " "(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', dest='external_gateways',
) )
@@ -541,7 +541,7 @@ class CreateRouter(command.ShowOne, common.NeutronCommandWithExtraArgs):
"Desired IP and/or subnet (name or ID) " "Desired IP and/or subnet (name or ID) "
"on external gateway: " "on external gateway: "
"subnet=<subnet>,ip-address=<ip-address> " "subnet=<subnet>,ip-address=<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() snat_group = parser.add_mutually_exclusive_group()
@@ -927,7 +927,7 @@ class SetRouter(common.NeutronCommandWithExtraArgs):
default=None, default=None,
required_keys=['destination', 'gateway'], required_keys=['destination', 'gateway'],
help=_( help=_(
"Add routes to the router " "Add routes to the router. "
"destination: destination subnet (in CIDR notation) " "destination: destination subnet (in CIDR notation) "
"gateway: nexthop IP address " "gateway: nexthop IP address "
"(repeat option to add multiple routes). " "(repeat option to add multiple routes). "
@@ -967,7 +967,7 @@ class SetRouter(common.NeutronCommandWithExtraArgs):
metavar="<network>", metavar="<network>",
action='append', action='append',
help=_( 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 " "(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)."
), ),
@@ -983,7 +983,7 @@ class SetRouter(common.NeutronCommandWithExtraArgs):
"Desired IP and/or subnet (name or ID) " "Desired IP and/or subnet (name or ID) "
"on external gateway: " "on external gateway: "
"subnet=<subnet>,ip-address=<ip-address> " "subnet=<subnet>,ip-address=<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() snat_group = parser.add_mutually_exclusive_group()
@@ -1163,7 +1163,7 @@ class UnsetRouter(common.NeutronUnsetCommandWithExtraArgs):
default=None, default=None,
required_keys=['destination', 'gateway'], required_keys=['destination', 'gateway'],
help=_( help=_(
"Routes to be removed from the router " "Routes to be removed from the router. "
"destination: destination subnet (in CIDR notation) " "destination: destination subnet (in CIDR notation) "
"gateway: nexthop IP address " "gateway: nexthop IP address "
"(repeat option to unset multiple routes)" "(repeat option to unset multiple routes)"
@@ -1216,7 +1216,7 @@ class UnsetRouter(common.NeutronUnsetCommandWithExtraArgs):
): ):
pass pass
except (KeyError, TypeError): 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) raise exceptions.CommandError(msg)
else: else:
attrs['external_gateway_info'] = { attrs['external_gateway_info'] = {
@@ -1253,13 +1253,13 @@ class AddGatewayToRouter(command.ShowOne):
parser.add_argument( parser.add_argument(
'router', 'router',
metavar="<router>", metavar="<router>",
help=_("Router to modify (name or ID)."), help=_("Router to modify (name or ID)"),
) )
parser.add_argument( parser.add_argument(
metavar="<network>", metavar="<network>",
help=_( help=_(
"External Network to a attach a router gateway to (name or " "External Network to a attach a router gateway to (name or "
"ID)." "ID)"
), ),
dest='external_gateways', dest='external_gateways',
# The argument is stored in a list in order to reuse the # 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) " "Desired IP and/or subnet (name or ID) "
"on external gateway: " "on external gateway: "
"subnet=<subnet>,ip-address=<ip-address> " "subnet=<subnet>,ip-address=<ip-address> "
"(repeat option to set multiple fixed IP addresses)." "(repeat option to set multiple fixed IP addresses)"
), ),
) )
return parser return parser
@@ -1327,7 +1327,7 @@ class RemoveGatewayFromRouter(command.ShowOne):
metavar="<network>", metavar="<network>",
help=_( help=_(
"External Network to remove a router gateway from (name or " "External Network to remove a router gateway from (name or "
"ID)." "ID)"
), ),
dest='external_gateways', dest='external_gateways',
# The argument is stored in a list in order to reuse the # 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 " "IP and/or subnet (name or ID) on the external gateway "
"which is used to identify a particular gateway if multiple " "which is used to identify a particular gateway if multiple "
"are attached to the same network: subnet=<subnet>," "are attached to the same network: subnet=<subnet>,"
"ip-address=<ip-address>." "ip-address=<ip-address>"
), ),
) )
return parser return parser

View File

@@ -126,7 +126,7 @@ class CreateSecurityGroup(
"--stateful", "--stateful",
action='store_true', action='store_true',
default=None, default=None,
help=_("Security group is stateful (Default)"), help=_("Security group is stateful (default)"),
) )
stateful_group.add_argument( stateful_group.add_argument(
"--stateless", "--stateless",
@@ -345,7 +345,7 @@ class SetSecurityGroup(
"--stateful", "--stateful",
action='store_true', action='store_true',
default=None, default=None,
help=_("Security group is stateful (Default)"), help=_("Security group is stateful (default)"),
) )
stateful_group.add_argument( stateful_group.add_argument(
"--stateless", "--stateless",

View File

@@ -84,8 +84,8 @@ def _get_common_parse_arguments(parser, is_create=True):
action=parseractions.MultiKeyValueAction, action=parseractions.MultiKeyValueAction,
required_keys=['start', 'end'], required_keys=['start', 'end'],
help=_( help=_(
"Allocation pool IP addresses for this subnet " "Allocation pool IP addresses for this subnet, "
"e.g.: start=192.168.199.2,end=192.168.199.254 " "for example, start=192.168.199.2,end=192.168.199.254 "
"(repeat option to add multiple IP addresses)" "(repeat option to add multiple IP addresses)"
), ),
) )
@@ -127,10 +127,10 @@ def _get_common_parse_arguments(parser, is_create=True):
action=parseractions.MultiKeyValueAction, action=parseractions.MultiKeyValueAction,
required_keys=['destination', 'gateway'], required_keys=['destination', 'gateway'],
help=_( help=_(
"Additional route for this subnet " "Additional route for this subnet, "
"e.g.: destination=10.10.0.0/16,gateway=192.168.71.254 " "for example, destination=10.10.0.0/16,gateway=192.168.71.254 "
"destination: destination subnet (in CIDR notation) " "destination: destination subnet (in CIDR notation) "
"gateway: nexthop IP address " "gateway: next-hop IP address "
"(repeat option to add multiple routes)" "(repeat option to add multiple routes)"
), ),
) )
@@ -150,8 +150,8 @@ def _get_common_parse_arguments(parser, is_create=True):
action='append', action='append',
dest='service_types', dest='service_types',
help=_( help=_(
"Service type for this subnet " "Service type for this subnet, "
"e.g.: network:floatingip_agent_gateway. " "for example, network:floatingip_agent_gateway. "
"Must be a valid device owner value for a network port " "Must be a valid device owner value for a network port "
"(repeat option to set multiple service types)" "(repeat option to set multiple service types)"
), ),
@@ -365,8 +365,8 @@ class CreateSubnet(command.ShowOne, common.NeutronCommandWithExtraArgs):
"<ip-address>: Specific IP address to use as the gateway, " "<ip-address>: Specific IP address to use as the gateway, "
"'auto': Gateway address should automatically be chosen " "'auto': Gateway address should automatically be chosen "
"from within the subnet itself, 'none': This subnet will " "from within the subnet itself, 'none': This subnet will "
"not use a gateway, e.g.: --gateway 192.168.9.1, " "not use a gateway. For example, --gateway 192.168.9.1, "
"--gateway auto, --gateway none (default is 'auto')." "--gateway auto or --gateway none (default is 'auto')."
), ),
) )
parser.add_argument( parser.add_argument(
@@ -375,7 +375,7 @@ class CreateSubnet(command.ShowOne, common.NeutronCommandWithExtraArgs):
default=4, default=4,
choices=[4, 6], choices=[4, 6],
help=_( 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 " "specified, IP version is determined from the subnet pool "
"and this option is ignored." "and this option is ignored."
), ),
@@ -513,10 +513,10 @@ class ListSubnet(command.Lister):
action='append', action='append',
dest='service_types', dest='service_types',
help=_( help=_(
"List only subnets of a given service type in output " "List only subnets of a given service type in output, "
"e.g.: network:floatingip_agent_gateway. " "for example, network:floatingip_agent_gateway. "
"Must be a valid device owner value for a network port " "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( parser.add_argument(
@@ -551,8 +551,8 @@ class ListSubnet(command.Lister):
metavar='<subnet-range>', metavar='<subnet-range>',
help=_( help=_(
"List only subnets of given subnet range " "List only subnets of given subnet range "
"(in CIDR notation) in output " "(in CIDR notation) in output. "
"e.g.: --subnet-range 10.10.0.0/16" "For example, --subnet-range 10.10.0.0/16"
), ),
) )
parser.add_argument( parser.add_argument(
@@ -560,7 +560,7 @@ class ListSubnet(command.Lister):
metavar='<subnet-pool>', metavar='<subnet-pool>',
help=_( help=_(
"List only subnets which belong to a given subnet pool " "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')) _tag.add_tag_filtering_option_to_parser(parser, _('subnets'))
@@ -684,8 +684,8 @@ class SetSubnet(common.NeutronCommandWithExtraArgs):
help=_( help=_(
"Specify a gateway for the subnet. The options are: " "Specify a gateway for the subnet. The options are: "
"<ip-address>: Specific IP address to use as the gateway, " "<ip-address>: Specific IP address to use as the gateway, "
"'none': This subnet will not use a gateway, " "'none': This subnet will not use a gateway. "
"e.g.: --gateway 192.168.9.1, --gateway none." "For example, --gateway 192.168.9.1 or --gateway none."
), ),
) )
parser.add_argument( parser.add_argument(
@@ -694,7 +694,7 @@ class SetSubnet(common.NeutronCommandWithExtraArgs):
help=_( help=_(
"Network segment to associate with this subnet (name or " "Network segment to associate with this subnet (name or "
"ID). It is only allowed to set the segment if the current " "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." "segment and only one subnet can exist on the network."
), ),
) )
@@ -774,7 +774,7 @@ class UnsetSubnet(common.NeutronUnsetCommandWithExtraArgs):
required_keys=['start', 'end'], required_keys=['start', 'end'],
help=_( help=_(
'Allocation pool IP addresses to be removed from this ' '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)' '(repeat option to unset multiple allocation pools)'
), ),
) )
@@ -800,10 +800,10 @@ class UnsetSubnet(common.NeutronUnsetCommandWithExtraArgs):
action=parseractions.MultiKeyValueAction, action=parseractions.MultiKeyValueAction,
required_keys=['destination', 'gateway'], required_keys=['destination', 'gateway'],
help=_( help=_(
'Route to be removed from this subnet ' 'Route to be removed from this subnet, '
'e.g.: destination=10.10.0.0/16,gateway=192.168.71.254 ' 'for example, destination=10.10.0.0/16,gateway=192.168.71.254 '
'destination: destination subnet (in CIDR notation) ' 'destination: destination subnet (in CIDR notation) '
'gateway: nexthop IP address ' 'gateway: next-hop IP address '
'(repeat option to unset multiple host routes)' '(repeat option to unset multiple host routes)'
), ),
) )
@@ -813,8 +813,8 @@ class UnsetSubnet(common.NeutronUnsetCommandWithExtraArgs):
action='append', action='append',
dest='service_types', dest='service_types',
help=_( help=_(
'Service type to be removed from this subnet ' 'Service type to be removed from this subnet, '
'e.g.: network:floatingip_agent_gateway. ' 'for example, network:floatingip_agent_gateway. '
'Must be a valid device owner value for a network port ' 'Must be a valid device owner value for a network port '
'(repeat option to unset multiple service types)' '(repeat option to unset multiple service types)'
), ),