add flavor description to flavor_create
To properly describe a flavor via openstacksdk we add the parameter to flavor create. If the value is not set we default to None. Change-Id: I9607230edfbd70fd085e694c4ee3fe08088051db
This commit is contained in:
@@ -1388,6 +1388,7 @@ class ComputeCloudMixin(_normalize.Normalizer):
|
||||
ram,
|
||||
vcpus,
|
||||
disk,
|
||||
description=None,
|
||||
flavorid="auto",
|
||||
ephemeral=0,
|
||||
swap=0,
|
||||
@@ -1400,6 +1401,7 @@ class ComputeCloudMixin(_normalize.Normalizer):
|
||||
: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
|
||||
@@ -1418,6 +1420,7 @@ class ComputeCloudMixin(_normalize.Normalizer):
|
||||
'rxtx_factor': rxtx_factor,
|
||||
'swap': swap,
|
||||
'vcpus': vcpus,
|
||||
'description': description,
|
||||
}
|
||||
if flavorid == 'auto':
|
||||
attrs['id'] = None
|
||||
|
||||
@@ -34,6 +34,7 @@ class TestFlavors(base.TestCase):
|
||||
json={
|
||||
'flavor': {
|
||||
"name": "vanilla",
|
||||
"description": None,
|
||||
"ram": 65536,
|
||||
"vcpus": 24,
|
||||
"swap": 0,
|
||||
|
||||
Reference in New Issue
Block a user