Merge "Change v3 flavor_rxtx to v2.1"
This commit is contained in:
@@ -65,7 +65,7 @@ class FlavorManageController(wsgi.Controller):
|
||||
root_gb = vals['disk']
|
||||
ephemeral_gb = vals.get('ephemeral', 0)
|
||||
swap = vals.get('swap', 0)
|
||||
rxtx_factor = vals.get('os-flavor-rxtx:rxtx_factor', 1.0)
|
||||
rxtx_factor = vals.get('rxtx_factor', 1.0)
|
||||
is_public = vals.get('flavor-access:is_public', True)
|
||||
|
||||
try:
|
||||
|
||||
@@ -25,7 +25,7 @@ class FlavorRxtxController(wsgi.Controller):
|
||||
def _extend_flavors(self, req, flavors):
|
||||
for flavor in flavors:
|
||||
db_flavor = req.get_db_flavor(flavor['id'])
|
||||
key = '%s:rxtx_factor' % FlavorRxtx.alias
|
||||
key = 'rxtx_factor'
|
||||
flavor[key] = db_flavor['rxtx_factor'] or ""
|
||||
|
||||
def _show(self, req, resp_obj):
|
||||
|
||||
@@ -12,7 +12,6 @@
|
||||
# License for the specific language governing permissions and limitations
|
||||
# under the License.
|
||||
|
||||
from nova.api.openstack.compute.plugins.v3 import flavor_rxtx
|
||||
from nova.api.validation import parameter_types
|
||||
|
||||
create = {
|
||||
@@ -55,7 +54,7 @@ create = {
|
||||
'pattern': '^[0-9]*$', 'minimum': 0
|
||||
},
|
||||
# positive ( > 0) float
|
||||
'%s:rxtx_factor' % flavor_rxtx.ALIAS: {
|
||||
'rxtx_factor': {
|
||||
'type': ['number', 'string'],
|
||||
'pattern': '^[0-9]+(\.[0-9]+)?$',
|
||||
'minimum': 0, 'exclusiveMinimum': True
|
||||
|
||||
Reference in New Issue
Block a user