Use new_size to match new_name

This commit is contained in:
Joshua Boniface 2020-08-05 10:25:37 -04:00
parent 6fe74b34b2
commit bafdcf9f8c
1 changed files with 4 additions and 4 deletions

View File

@ -3355,7 +3355,7 @@ class API_Storage_Ceph_Volume_Element(Resource):
)
@RequestParser([
{ 'name': 'size' },
{ 'name': 'new_size' },
{ 'name': 'new_name' }
])
@Authenticator
@ -3393,14 +3393,14 @@ class API_Storage_Ceph_Volume_Element(Resource):
type: object
id: Message
"""
if reqargs.get('size', None) and reqargs.get('new_name', None):
if reqargs.get('new_size', None) and reqargs.get('new_name', None):
return { "message": "Can only perform one modification at once" }, 400
if reqargs.get('size', None):
if reqargs.get('new_size', None):
return api_helper.ceph_volume_resize(
pool,
volume,
reqargs.get('size')
reqargs.get('new_size')
)
if reqargs.get('new_name', None):
return api_helper.ceph_volume_rename(