summaryrefslogtreecommitdiff
path: root/openstackclient/network/v2/subnet_pool.py
diff options
context:
space:
mode:
Diffstat (limited to 'openstackclient/network/v2/subnet_pool.py')
-rw-r--r--openstackclient/network/v2/subnet_pool.py10
1 files changed, 8 insertions, 2 deletions
diff --git a/openstackclient/network/v2/subnet_pool.py b/openstackclient/network/v2/subnet_pool.py
index 56cf6152..bdf7aba8 100644
--- a/openstackclient/network/v2/subnet_pool.py
+++ b/openstackclient/network/v2/subnet_pool.py
@@ -24,6 +24,7 @@ from osc_lib.utils import tags as _tag
from openstackclient.i18n import _
from openstackclient.identity import common as identity_common
+from openstackclient.network import common
from openstackclient.network import sdk_utils
@@ -146,7 +147,7 @@ def _add_default_options(parser):
# TODO(rtheis): Use the SDK resource mapped attribute names once the
# OSC minimum requirements include SDK 1.0.
-class CreateSubnetPool(command.ShowOne):
+class CreateSubnetPool(command.ShowOne, common.NeutronCommandWithExtraArgs):
_description = _("Create subnet pool")
def get_parser(self, prog_name):
@@ -203,6 +204,8 @@ class CreateSubnetPool(command.ShowOne):
# NeutronServer expects prefixes to be a List
if "prefixes" not in attrs:
attrs['prefixes'] = []
+ attrs.update(
+ self._parse_extra_properties(parsed_args.extra_properties))
obj = client.create_subnet_pool(**attrs)
# tags cannot be set when created, so tags need to be set later.
_tag.update_tags_for_set(client, obj, parsed_args)
@@ -351,7 +354,7 @@ class ListSubnetPool(command.Lister):
# TODO(rtheis): Use the SDK resource mapped attribute names once the
# OSC minimum requirements include SDK 1.0.
-class SetSubnetPool(command.Command):
+class SetSubnetPool(common.NeutronCommandWithExtraArgs):
_description = _("Set subnet pool properties")
def get_parser(self, prog_name):
@@ -408,6 +411,9 @@ class SetSubnetPool(command.Command):
if 'prefixes' in attrs:
attrs['prefixes'].extend(obj.prefixes)
+ attrs.update(
+ self._parse_extra_properties(parsed_args.extra_properties))
+
if attrs:
client.update_subnet_pool(obj, **attrs)
# tags is a subresource and it needs to be updated separately.