Merge "add flavor description to flavor_create"

This commit is contained in:
Zuul
2022-11-21 18:58:47 +00:00
committed by Gerrit Code Review
2 changed files with 4 additions and 0 deletions

View File

@@ -1384,6 +1384,7 @@ class ComputeCloudMixin:
ram,
vcpus,
disk,
description=None,
flavorid="auto",
ephemeral=0,
swap=0,
@@ -1396,6 +1397,7 @@ class ComputeCloudMixin:
: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 description: Description of the flavor
:param flavorid: ID for the flavor (optional)
:param ephemeral: Ephemeral space size in GB
:param swap: Swap space in MB
@@ -1414,6 +1416,7 @@ class ComputeCloudMixin:
'rxtx_factor': rxtx_factor,
'swap': swap,
'vcpus': vcpus,
'description': description,
}
if flavorid == 'auto':
attrs['id'] = None

View File

@@ -34,6 +34,7 @@ class TestFlavors(base.TestCase):
json={
'flavor': {
"name": "vanilla",
"description": None,
"ram": 65536,
"vcpus": 24,
"swap": 0,