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')
|
help='Name of network to create')
|
||||||
admin_group = parser.add_mutually_exclusive_group()
|
admin_group = parser.add_mutually_exclusive_group()
|
||||||
admin_group.add_argument(
|
admin_group.add_argument(
|
||||||
'--admin-state-up',
|
'--enable',
|
||||||
dest='admin_state', action='store_true',
|
dest='admin_state',
|
||||||
default=True, help='Set Admin State Up')
|
default=True,
|
||||||
|
action='store_true',
|
||||||
|
help='Set administrative state up')
|
||||||
admin_group.add_argument(
|
admin_group.add_argument(
|
||||||
'--admin-state-down',
|
'--disable',
|
||||||
dest='admin_state', action='store_false',
|
dest='admin_state',
|
||||||
help='Set Admin State Down')
|
action='store_false',
|
||||||
|
help='Set administrative state down')
|
||||||
share_group = parser.add_mutually_exclusive_group()
|
share_group = parser.add_mutually_exclusive_group()
|
||||||
share_group.add_argument(
|
share_group.add_argument(
|
||||||
'--share',
|
'--share',
|
||||||
@ -171,14 +174,16 @@ class SetNetwork(command.Command):
|
|||||||
)
|
)
|
||||||
admin_group = parser.add_mutually_exclusive_group()
|
admin_group = parser.add_mutually_exclusive_group()
|
||||||
admin_group.add_argument(
|
admin_group.add_argument(
|
||||||
'--admin-state-up',
|
'--enable',
|
||||||
dest='admin_state', action='store_true',
|
dest='admin_state',
|
||||||
default=None,
|
default=None,
|
||||||
help='Set Admin State Up')
|
action='store_true',
|
||||||
|
help='Set administrative state up')
|
||||||
admin_group.add_argument(
|
admin_group.add_argument(
|
||||||
'--admin-state-down',
|
'--disable',
|
||||||
dest='admin_state', action='store_false',
|
dest='admin_state',
|
||||||
help='Set Admin State Down')
|
action='store_false',
|
||||||
|
help='Set administrative state down')
|
||||||
parser.add_argument(
|
parser.add_argument(
|
||||||
'--name',
|
'--name',
|
||||||
metavar='<network_name>',
|
metavar='<network_name>',
|
||||||
|
@ -61,7 +61,7 @@ class TestCreateNetwork(common.TestNetworkBase):
|
|||||||
|
|
||||||
def test_create_all_options(self):
|
def test_create_all_options(self):
|
||||||
arglist = [
|
arglist = [
|
||||||
"--admin-state-down",
|
"--disable",
|
||||||
"--share",
|
"--share",
|
||||||
FAKE_NAME,
|
FAKE_NAME,
|
||||||
] + self.given_show_options
|
] + self.given_show_options
|
||||||
@ -88,7 +88,7 @@ class TestCreateNetwork(common.TestNetworkBase):
|
|||||||
|
|
||||||
def test_create_other_options(self):
|
def test_create_other_options(self):
|
||||||
arglist = [
|
arglist = [
|
||||||
"--admin-state-up",
|
"--enable",
|
||||||
"--no-share",
|
"--no-share",
|
||||||
FAKE_NAME,
|
FAKE_NAME,
|
||||||
]
|
]
|
||||||
@ -220,7 +220,7 @@ class TestSetNetwork(common.TestNetworkBase):
|
|||||||
def test_set_this(self):
|
def test_set_this(self):
|
||||||
arglist = [
|
arglist = [
|
||||||
FAKE_NAME,
|
FAKE_NAME,
|
||||||
'--admin-state-up',
|
'--enable',
|
||||||
'--name', 'noob',
|
'--name', 'noob',
|
||||||
'--share',
|
'--share',
|
||||||
]
|
]
|
||||||
@ -247,7 +247,7 @@ class TestSetNetwork(common.TestNetworkBase):
|
|||||||
def test_set_that(self):
|
def test_set_that(self):
|
||||||
arglist = [
|
arglist = [
|
||||||
FAKE_NAME,
|
FAKE_NAME,
|
||||||
'--admin-state-down',
|
'--disable',
|
||||||
'--no-share',
|
'--no-share',
|
||||||
]
|
]
|
||||||
verifylist = [
|
verifylist = [
|
||||||
|
Loading…
Reference in New Issue
Block a user