Make spec_driver_handles_share_servers required

This change makes the extra spec "spec_driver_handles_share_servers"
required for the type-create command in the Manila Client as opposed 
to being listed as an optional argument that was in fact required. I
had to remove a no longer valid test case in the unit test suite, 
but it was done because instead of throwing an exception, the 
argparser will just exit(2).

Change-Id: I0dc58cdfe10493a8eb736fa1bd0cd196bb0f5c05
Closes-Bug: #1484156
This commit is contained in:
Dustin Schoenbrun 2015-08-12 11:38:39 -04:00 committed by Dustin Schoenbrun
parent 8a3702d556
commit 5f45b18f36
2 changed files with 2 additions and 10 deletions

View File

@ -497,13 +497,6 @@ class ShellTest(test_utils.TestCase):
cliutils.print_list.assert_called_once_with(
mock.ANY, ['ID', 'Name', 'all_extra_specs'], mock.ANY)
def test_type_create_without_required_extra_spec(self):
self.assertRaises(
exceptions.CommandError,
self.run_command,
'type-create test',
)
@ddt.data('fake', 'FFFalse', 'trueee')
def test_type_create_invalid_extra_spec(self, extra_spec):
self.assertRaises(

View File

@ -1838,10 +1838,9 @@ def do_extra_specs_list(cs, args):
@cliutils.arg(
'spec_driver_handles_share_servers',
metavar='<spec_driver_handles_share_servers>',
default='',
nargs='?',
type=str,
help="Required extra specification. "
"Valid values 'true'/'1' and 'false'/'0'")
"Valid values are 'true'/'1' and 'false'/'0'")
@cliutils.arg(
'--is_public',
'--is-public',