Use is_public to set access of volume type

Currently the 'public' and 'private' keys does not work
when creating volume type, 'is_public' should be used.

Change-Id: If34a66053ea6c192882a1b9d8bbb1d3666be3f83
Closes-bug: 1520115
This commit is contained in:
Xi Yang 2015-11-08 23:22:51 +08:00
parent c48afe6032
commit d1a58653ab
2 changed files with 5 additions and 5 deletions

View File

@ -73,7 +73,7 @@ class TestTypeCreate(TestType):
self.types_mock.create.assert_called_with( self.types_mock.create.assert_called_with(
volume_fakes.type_name, volume_fakes.type_name,
description=volume_fakes.type_description, description=volume_fakes.type_description,
public=True, is_public=True,
) )
collist = ( collist = (
@ -93,7 +93,7 @@ class TestTypeCreate(TestType):
arglist = [ arglist = [
volume_fakes.type_name, volume_fakes.type_name,
"--description", volume_fakes.type_description, "--description", volume_fakes.type_description,
"--private" "--private",
] ]
verifylist = [ verifylist = [
("name", volume_fakes.type_name), ("name", volume_fakes.type_name),
@ -107,7 +107,7 @@ class TestTypeCreate(TestType):
self.types_mock.create.assert_called_with( self.types_mock.create.assert_called_with(
volume_fakes.type_name, volume_fakes.type_name,
description=volume_fakes.type_description, description=volume_fakes.type_description,
private=True, is_public=False,
) )
collist = ( collist = (

View File

@ -73,9 +73,9 @@ class CreateVolumeType(show.ShowOne):
kwargs = {} kwargs = {}
if parsed_args.public: if parsed_args.public:
kwargs['public'] = True kwargs['is_public'] = True
if parsed_args.private: if parsed_args.private:
kwargs['private'] = True kwargs['is_public'] = False
volume_type = volume_client.volume_types.create( volume_type = volume_client.volume_types.create(
parsed_args.name, parsed_args.name,