summaryrefslogtreecommitdiff
path: root/openstackclient
diff options
context:
space:
mode:
Diffstat (limited to 'openstackclient')
-rw-r--r--openstackclient/network/v2/network.py29
-rw-r--r--openstackclient/tests/network/v2/test_network.py8
2 files changed, 21 insertions, 16 deletions
diff --git a/openstackclient/network/v2/network.py b/openstackclient/network/v2/network.py
index 24d71976..63411d55 100644
--- a/openstackclient/network/v2/network.py
+++ b/openstackclient/network/v2/network.py
@@ -43,13 +43,16 @@ class CreateNetwork(show.ShowOne):
help='Name of network to create')
admin_group = parser.add_mutually_exclusive_group()
admin_group.add_argument(
- '--admin-state-up',
- dest='admin_state', action='store_true',
- default=True, help='Set Admin State Up')
+ '--enable',
+ dest='admin_state',
+ default=True,
+ action='store_true',
+ help='Set administrative state up')
admin_group.add_argument(
- '--admin-state-down',
- dest='admin_state', action='store_false',
- help='Set Admin State Down')
+ '--disable',
+ dest='admin_state',
+ action='store_false',
+ help='Set administrative state down')
share_group = parser.add_mutually_exclusive_group()
share_group.add_argument(
'--share',
@@ -171,14 +174,16 @@ class SetNetwork(command.Command):
)
admin_group = parser.add_mutually_exclusive_group()
admin_group.add_argument(
- '--admin-state-up',
- dest='admin_state', action='store_true',
+ '--enable',
+ dest='admin_state',
default=None,
- help='Set Admin State Up')
+ action='store_true',
+ help='Set administrative state up')
admin_group.add_argument(
- '--admin-state-down',
- dest='admin_state', action='store_false',
- help='Set Admin State Down')
+ '--disable',
+ dest='admin_state',
+ action='store_false',
+ help='Set administrative state down')
parser.add_argument(
'--name',
metavar='<network_name>',
diff --git a/openstackclient/tests/network/v2/test_network.py b/openstackclient/tests/network/v2/test_network.py
index 08b61a0a..468db5e0 100644
--- a/openstackclient/tests/network/v2/test_network.py
+++ b/openstackclient/tests/network/v2/test_network.py
@@ -61,7 +61,7 @@ class TestCreateNetwork(common.TestNetworkBase):
def test_create_all_options(self):
arglist = [
- "--admin-state-down",
+ "--disable",
"--share",
FAKE_NAME,
] + self.given_show_options
@@ -88,7 +88,7 @@ class TestCreateNetwork(common.TestNetworkBase):
def test_create_other_options(self):
arglist = [
- "--admin-state-up",
+ "--enable",
"--no-share",
FAKE_NAME,
]
@@ -220,7 +220,7 @@ class TestSetNetwork(common.TestNetworkBase):
def test_set_this(self):
arglist = [
FAKE_NAME,
- '--admin-state-up',
+ '--enable',
'--name', 'noob',
'--share',
]
@@ -247,7 +247,7 @@ class TestSetNetwork(common.TestNetworkBase):
def test_set_that(self):
arglist = [
FAKE_NAME,
- '--admin-state-down',
+ '--disable',
'--no-share',
]
verifylist = [