Merge "Replace GB with GiB"

This commit is contained in:
Zuul 2018-04-06 18:51:16 +00:00 committed by Gerrit Code Review
commit 69d41135a0
6 changed files with 23 additions and 23 deletions

View File

@ -82,11 +82,11 @@ Then call methods on its managers::
>>> nova.flavors.list()
[<Flavor: 256 server>,
<Flavor: 512 server>,
<Flavor: 1GB server>,
<Flavor: 2GB server>,
<Flavor: 4GB server>,
<Flavor: 8GB server>,
<Flavor: 15.5GB server>]
<Flavor: 1GiB server>,
<Flavor: 2GiB server>,
<Flavor: 4GiB server>,
<Flavor: 8GiB server>,
<Flavor: 15.5GiB server>]
>>> fl = nova.flavors.find(ram=512)
>>> nova.servers.create("my-server", flavor=fl)

View File

@ -501,7 +501,7 @@ class BootingManagerWithFind(ManagerWithFind):
for device_name, mapping in block_device_mapping.items():
#
# The mapping is in the format:
# <id>:[<type>]:[<size(GB)>]:[<delete_on_terminate>]
# <id>:[<type>]:[<size(GiB)>]:[<delete_on_terminate>]
#
bdm_dict = {'device_name': device_name}

View File

@ -61,7 +61,7 @@ class TestServersBootNovaClient(base.ClientTestBase):
def test_boot_server_with_legacy_bdm(self):
# bdm v1 format
# <id>:<type>:<size(GB)>:<delete-on-terminate>
# <id>:<type>:<size(GiB)>:<delete-on-terminate>
# params = (type, size, delete-on-terminate)
params = ('', '', '1')
self._boot_server_with_legacy_bdm(bdm_params=params)

View File

@ -2051,7 +2051,7 @@ class ShellTest(utils.TestCase):
'start=2000-01-20T00:00:00&' +
'end=2005-02-01T00:00:00&' +
'detailed=1')
# Servers, RAM MB-Hours, CPU Hours, Disk GB-Hours
# Servers, RAM MB-Hours, CPU Hours, Disk GiB-Hours
self.assertIn('1 | 25451.76 | 49.71 | 0.00', stdout)
def test_usage_list_stitch_together_next_results(self):
@ -2072,7 +2072,7 @@ class ShellTest(utils.TestCase):
'start=2000-01-20T00:00:00&'
'end=2005-02-01T00:00:00&'
'marker=%s&detailed=1' % (marker), pos=pos + 1)
# Servers, RAM MB-Hours, CPU Hours, Disk GB-Hours
# Servers, RAM MB-Hours, CPU Hours, Disk GiB-Hours
self.assertIn('2 | 50903.53 | 99.42 | 0.00', stdout)
def test_usage_list_no_args(self):
@ -2092,7 +2092,7 @@ class ShellTest(utils.TestCase):
'/os-simple-tenant-usage/test?' +
'start=2000-01-20T00:00:00&' +
'end=2005-02-01T00:00:00')
# Servers, RAM MB-Hours, CPU Hours, Disk GB-Hours
# Servers, RAM MB-Hours, CPU Hours, Disk GiB-Hours
self.assertIn('1 | 25451.76 | 49.71 | 0.00', stdout)
def test_usage_stitch_together_next_results(self):
@ -2112,7 +2112,7 @@ class ShellTest(utils.TestCase):
'start=2000-01-20T00:00:00&'
'end=2005-02-01T00:00:00&'
'marker=%s' % (marker), pos=pos + 1)
# Servers, RAM MB-Hours, CPU Hours, Disk GB-Hours
# Servers, RAM MB-Hours, CPU Hours, Disk GiB-Hours
self.assertIn('2 | 50903.53 | 99.42 | 0.00', stdout)
def test_usage_no_tenant(self):

View File

@ -184,11 +184,11 @@ class FlavorManager(base.ManagerWithFind):
:param name: Descriptive name of the flavor
:param ram: Memory in MB for the flavor
:param vcpus: Number of VCPUs for the flavor
:param disk: Size of local disk in GB
:param disk: Size of local disk in GiB
:param flavorid: ID for the flavor (optional). You can use the reserved
value ``"auto"`` to have Nova generate a UUID for the
flavor in cases where you cannot simply pass ``None``.
:param ephemeral: Ephemeral disk space in GB.
:param ephemeral: Ephemeral disk space in GiB.
:param swap: Swap space in MB
:param rxtx_factor: RX/TX factor
:param is_public: Whether or not the flavor is public.

View File

@ -599,7 +599,7 @@ def _boot(cs, args):
action='append',
default=[],
help=_("Block device mapping in the format "
"<dev-name>=<id>:<type>:<size(GB)>:<delete-on-terminate>."))
"<dev-name>=<id>:<type>:<size(GiB)>:<delete-on-terminate>."))
@utils.arg(
'--block-device',
metavar="key1=value1[,key2=value2...]",
@ -621,7 +621,7 @@ def _boot(cs, args):
"depending on selected bus; note the libvirt driver always "
"uses default device names), "
"size=size of the block device in MB(for swap) and in "
"GB(for other formats) "
"GiB(for other formats) "
"(if omitted, hypervisor driver calculates size), "
"format=device will be formatted (e.g. swap, ntfs, ...; optional), "
"bootindex=integer used for ordering the boot disks "
@ -651,7 +651,7 @@ def _boot(cs, args):
"depending on selected bus; note the libvirt driver always "
"uses default device names), "
"size=size of the block device in MB(for swap) and in "
"GB(for other formats) "
"GiB(for other formats) "
"(if omitted, hypervisor driver calculates size), "
"format=device will be formatted (e.g. swap, ntfs, ...; optional), "
"bootindex=integer used for ordering the boot disks "
@ -680,7 +680,7 @@ def _boot(cs, args):
"depending on selected bus; note the libvirt driver always "
"uses default device names), "
"size=size of the block device in MB(for swap) and in "
"GB(for other formats) "
"GiB(for other formats) "
"(if omitted, hypervisor driver calculates size), "
"format=device will be formatted (e.g. swap, ntfs, ...; optional), "
"bootindex=integer used for ordering the boot disks "
@ -708,7 +708,7 @@ def _boot(cs, args):
"depending on selected bus; note the libvirt driver always "
"uses default device names), "
"size=size of the block device in MB(for swap) and in "
"GB(for other formats) "
"GiB(for other formats) "
"(if omitted, hypervisor driver calculates size), "
"format=device will be formatted (e.g. swap, ntfs, ...; optional), "
"bootindex=integer used for ordering the boot disks "
@ -727,7 +727,7 @@ def _boot(cs, args):
metavar="size=<size>[,format=<format>]",
action='append',
default=[],
help=_("Create and attach a local ephemeral block device of <size> GB "
help=_("Create and attach a local ephemeral block device of <size> GiB "
"and format it to <format>."))
@utils.arg(
'--hint',
@ -1130,11 +1130,11 @@ def do_flavor_show(cs, args):
@utils.arg(
'disk',
metavar='<disk>',
help=_("Disk size in GB."))
help=_("Disk size in GiB."))
@utils.arg(
'--ephemeral',
metavar='<ephemeral>',
help=_("Ephemeral space size in GB (default 0)."),
help=_("Ephemeral space size in GiB (default 0)."),
default=0)
@utils.arg(
'vcpus',
@ -2939,7 +2939,7 @@ def do_usage_list(cs, args):
"""List usage data for all tenants."""
dateformat = "%Y-%m-%d"
rows = ["Tenant ID", "Servers", "RAM MB-Hours", "CPU Hours",
"Disk GB-Hours"]
"Disk GiB-Hours"]
now = timeutils.utcnow()
@ -3007,7 +3007,7 @@ def do_usage_list(cs, args):
def do_usage(cs, args):
"""Show usage data for a single tenant."""
dateformat = "%Y-%m-%d"
rows = ["Servers", "RAM MB-Hours", "CPU Hours", "Disk GB-Hours"]
rows = ["Servers", "RAM MB-Hours", "CPU Hours", "Disk GiB-Hours"]
now = timeutils.utcnow()