Merge "Follow-on to I665f402f to convert rxtx_quota to rxtx_factor in nova-manage and a couple of tests."
This commit is contained in:
@@ -1706,10 +1706,9 @@ class InstanceTypeCommands(object):
|
|||||||
def _print_instance_types(self, name, val):
|
def _print_instance_types(self, name, val):
|
||||||
deleted = ('', ', inactive')[val["deleted"] == 1]
|
deleted = ('', ', inactive')[val["deleted"] == 1]
|
||||||
print ("%s: Memory: %sMB, VCPUS: %s, Storage: %sGB, FlavorID: %s, "
|
print ("%s: Memory: %sMB, VCPUS: %s, Storage: %sGB, FlavorID: %s, "
|
||||||
"Swap: %sMB, RXTX Quota: %sGB, RXTX Cap: %sMB%s") % (
|
"Swap: %sMB, RXTX Factor: %s") % (
|
||||||
name, val["memory_mb"], val["vcpus"], val["local_gb"],
|
name, val["memory_mb"], val["vcpus"], val["local_gb"],
|
||||||
val["flavorid"], val["swap"], val["rxtx_quota"],
|
val["flavorid"], val["swap"], val["rxtx_factor"])
|
||||||
val["rxtx_cap"], deleted)
|
|
||||||
|
|
||||||
@args('--name', dest='name', metavar='<name>',
|
@args('--name', dest='name', metavar='<name>',
|
||||||
help='Name of instance type/flavor')
|
help='Name of instance type/flavor')
|
||||||
@@ -1721,16 +1720,14 @@ class InstanceTypeCommands(object):
|
|||||||
@args('--flavor', dest='flavorid', metavar='<flavor id>',
|
@args('--flavor', dest='flavorid', metavar='<flavor id>',
|
||||||
help='Flavor ID')
|
help='Flavor ID')
|
||||||
@args('--swap', dest='swap', metavar='<swap>', help='Swap')
|
@args('--swap', dest='swap', metavar='<swap>', help='Swap')
|
||||||
@args('--rxtx_quota', dest='rxtx_quota', metavar='<rxtx_quota>',
|
@args('--rxtx_factor', dest='rxtx_factor', metavar='<rxtx_factor>',
|
||||||
help='rxtx_quota')
|
help='rxtx_factor')
|
||||||
@args('--rxtx_cap', dest='rxtx_cap', metavar='<rxtx_cap>',
|
|
||||||
help='rxtx_cap')
|
|
||||||
def create(self, name, memory, vcpus, local_gb, flavorid,
|
def create(self, name, memory, vcpus, local_gb, flavorid,
|
||||||
swap=0, rxtx_quota=0, rxtx_cap=0):
|
swap=0, rxtx_factor=1):
|
||||||
"""Creates instance types / flavors"""
|
"""Creates instance types / flavors"""
|
||||||
try:
|
try:
|
||||||
instance_types.create(name, memory, vcpus, local_gb,
|
instance_types.create(name, memory, vcpus, local_gb,
|
||||||
flavorid, swap, rxtx_quota, rxtx_cap)
|
flavorid, swap, rxtx_factor)
|
||||||
except exception.InvalidInput, e:
|
except exception.InvalidInput, e:
|
||||||
print "Must supply valid parameters to create instance_type"
|
print "Must supply valid parameters to create instance_type"
|
||||||
print e
|
print e
|
||||||
|
|||||||
@@ -163,8 +163,7 @@ class BaseTestCase(test.TestCase):
|
|||||||
inst['local_gb'] = '20'
|
inst['local_gb'] = '20'
|
||||||
inst['flavorid'] = '1'
|
inst['flavorid'] = '1'
|
||||||
inst['swap'] = '2048'
|
inst['swap'] = '2048'
|
||||||
inst['rxtx_quota'] = 100
|
inst['rxtx_factor'] = 1
|
||||||
inst['rxtx_cap'] = 200
|
|
||||||
inst.update(params)
|
inst.update(params)
|
||||||
return db.instance_type_create(context, inst)['id']
|
return db.instance_type_create(context, inst)['id']
|
||||||
|
|
||||||
|
|||||||
@@ -1615,8 +1615,7 @@ class NWFilterTestCase(test.TestCase):
|
|||||||
inst['local_gb'] = '20'
|
inst['local_gb'] = '20'
|
||||||
inst['flavorid'] = '1'
|
inst['flavorid'] = '1'
|
||||||
inst['swap'] = '2048'
|
inst['swap'] = '2048'
|
||||||
inst['rxtx_quota'] = 100
|
inst['rxtx_factor'] = 1
|
||||||
inst['rxtx_cap'] = 200
|
|
||||||
inst.update(params)
|
inst.update(params)
|
||||||
return db.instance_type_create(context, inst)['id']
|
return db.instance_type_create(context, inst)['id']
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user