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

View File

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