Fix share size units to match the API
Similar issue has been handled in CinderClient in bug/1511167. The API docs list the size units as gibibytes(GiBs). Client should request/report share size in GiB instead of gigabyes(GB). Hence made the corrections. Change-Id: I25465e68a713613646e2350a443660fc4b3850a2 Closes-bug: 1516841
This commit is contained in:
@@ -158,7 +158,7 @@ class ShareManager(base.ManagerWithFind):
|
|||||||
|
|
||||||
:param share_proto: text - share protocol for new share
|
:param share_proto: text - share protocol for new share
|
||||||
available values are NFS, CIFS, GlusterFS and HDFS.
|
available values are NFS, CIFS, GlusterFS and HDFS.
|
||||||
:param size: int - size in GB
|
:param size: int - size in GiB
|
||||||
:param snapshot_id: text - ID of the snapshot
|
:param snapshot_id: text - ID of the snapshot
|
||||||
:param name: text - name of new share
|
:param name: text - name of new share
|
||||||
:param description: text - description of a share
|
:param description: text - description of a share
|
||||||
|
@@ -442,7 +442,7 @@ def do_rate_limits(cs, args):
|
|||||||
'size',
|
'size',
|
||||||
metavar='<size>',
|
metavar='<size>',
|
||||||
type=int,
|
type=int,
|
||||||
help='Share size in GB.')
|
help='Share size in GiB.')
|
||||||
@cliutils.arg(
|
@cliutils.arg(
|
||||||
'--snapshot-id',
|
'--snapshot-id',
|
||||||
metavar='<snapshot-id>',
|
metavar='<snapshot-id>',
|
||||||
@@ -2275,7 +2275,7 @@ def do_type_access_remove(cs, args):
|
|||||||
@cliutils.arg('new_size',
|
@cliutils.arg('new_size',
|
||||||
metavar='<new_size>',
|
metavar='<new_size>',
|
||||||
type=int,
|
type=int,
|
||||||
help='New size of share, in GBs.')
|
help='New size of share, in GiBs.')
|
||||||
def do_extend(cs, args):
|
def do_extend(cs, args):
|
||||||
"""Increases the size of an existing share."""
|
"""Increases the size of an existing share."""
|
||||||
share = _find_share(cs, args.share)
|
share = _find_share(cs, args.share)
|
||||||
@@ -2287,7 +2287,7 @@ def do_extend(cs, args):
|
|||||||
@cliutils.arg('new_size',
|
@cliutils.arg('new_size',
|
||||||
metavar='<new_size>',
|
metavar='<new_size>',
|
||||||
type=int,
|
type=int,
|
||||||
help='New size of share, in GBs.')
|
help='New size of share, in GiBs.')
|
||||||
def do_shrink(cs, args):
|
def do_shrink(cs, args):
|
||||||
"""Decreases the size of an existing share."""
|
"""Decreases the size of an existing share."""
|
||||||
share = _find_share(cs, args.share)
|
share = _find_share(cs, args.share)
|
||||||
|
Reference in New Issue
Block a user