Merge "Network use enable/disable vs admin state up/down"
This commit is contained in:
commit
6977ef8aec
@ -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>',
|
||||
|
@ -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 = [
|
||||
|
Loading…
Reference in New Issue
Block a user