Merge "Add the ability to update type public status"

This commit is contained in:
Jenkins
2015-08-30 09:19:27 +00:00
committed by Gerrit Code Review
7 changed files with 76 additions and 54 deletions

View File

@@ -57,7 +57,7 @@ def create(context,
return type_ref
def update(context, id, name, description):
def update(context, id, name, description, is_public=None):
"""Update volume type by id."""
if id is None:
msg = _("id cannot be None")
@@ -66,7 +66,8 @@ def update(context, id, name, description):
type_updated = db.volume_type_update(context,
id,
dict(name=name,
description=description))
description=description,
is_public=is_public))
except db_exc.DBError:
LOG.exception(_LE('DB error:'))
raise exception.VolumeTypeUpdateFailed(id=id)