diff options
| author | Zuul <zuul@review.opendev.org> | 2020-01-13 19:27:51 +0000 |
|---|---|---|
| committer | Gerrit Code Review <review@openstack.org> | 2020-01-13 19:27:51 +0000 |
| commit | 08c57260e4ef17150b67ef0a9493af2a4d8bf4f6 (patch) | |
| tree | 911d05e3774c6c3f448efa2410f062fc69cef14e /openstackclient | |
| parent | cf76a002512e45e9c5cfd5d805f29b031c55dc69 (diff) | |
| parent | b4e9b225b4435a7a3598b70617c1e6eb73613fa0 (diff) | |
| download | python-openstackclient-08c57260e4ef17150b67ef0a9493af2a4d8bf4f6.tar.gz | |
Merge "Add dns_publish_fixed_ip attribute to subnets"
Diffstat (limited to 'openstackclient')
| -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 c5368861..f282f42b 100644 --- a/openstackclient/network/v2/subnet.py +++ b/openstackclient/network/v2/subnet.py @@ -230,6 +230,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 @@ -303,6 +307,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>', @@ -558,6 +573,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>', |
