diff options
Diffstat (limited to 'openstackclient/network/v2')
| -rw-r--r-- | openstackclient/network/v2/subnet.py | 26 |
1 files changed, 26 insertions, 0 deletions
diff --git a/openstackclient/network/v2/subnet.py b/openstackclient/network/v2/subnet.py index 1f0c2d94..60994aca 100644 --- a/openstackclient/network/v2/subnet.py +++ b/openstackclient/network/v2/subnet.py @@ -229,6 +229,10 @@ def _get_attrs(client_manager, parsed_args, is_create=True): attrs['enable_dhcp'] = True if parsed_args.no_dhcp: attrs['enable_dhcp'] = False + if parsed_args.dns_publish_fixed_ip: + attrs['dns_publish_fixed_ip'] = True + if parsed_args.no_dns_publish_fixed_ip: + attrs['dns_publish_fixed_ip'] = False if ('dns_nameservers' in parsed_args and parsed_args.dns_nameservers is not None): attrs['dns_nameservers'] = parsed_args.dns_nameservers @@ -302,6 +306,17 @@ class CreateSubnet(command.ShowOne): action='store_true', help=_("Disable DHCP") ) + dns_publish_fixed_ip_group = parser.add_mutually_exclusive_group() + dns_publish_fixed_ip_group.add_argument( + '--dns-publish-fixed-ip', + action='store_true', + help=_("Enable publishing fixed IPs in DNS") + ) + dns_publish_fixed_ip_group.add_argument( + '--no-dns-publish-fixed-ip', + action='store_true', + help=_("Disable publishing fixed IPs in DNS (default)") + ) parser.add_argument( '--gateway', metavar='<gateway>', @@ -557,6 +572,17 @@ class SetSubnet(command.Command): action='store_true', help=_("Disable DHCP") ) + dns_publish_fixed_ip_group = parser.add_mutually_exclusive_group() + dns_publish_fixed_ip_group.add_argument( + '--dns-publish-fixed-ip', + action='store_true', + help=_("Enable publishing fixed IPs in DNS") + ) + dns_publish_fixed_ip_group.add_argument( + '--no-dns-publish-fixed-ip', + action='store_true', + help=_("Disable publishing fixed IPs in DNS") + ) parser.add_argument( '--gateway', metavar='<gateway>', |
