Skip to content

Commit 75ca7d5

Browse files
Zuulopenstack-gerrit
authored andcommitted
Merge "fix TypeError when boot_volume_size label is passed as string"
2 parents b0fe3ad + c73f9e1 commit 75ca7d5

2 files changed

Lines changed: 9 additions & 0 deletions

File tree

magnum/api/attr_validator.py

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -14,6 +14,7 @@
1414

1515
from glanceclient import exc as glance_exception
1616
from novaclient import exceptions as nova_exception
17+
from oslo_utils import strutils
1718

1819
from magnum.api import utils as api_utils
1920
from magnum.common import clients
@@ -180,6 +181,9 @@ def validate_master_count(context, cluster):
180181
def validate_flavor_root_volume_size(cli, flavor, boot_volume_size):
181182
"""Validate flavor root volume size."""
182183

184+
boot_volume_size = strutils.validate_integer(boot_volume_size,
185+
"boot_volume_size")
186+
183187
if boot_volume_size > 0:
184188
return
185189

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
---
2+
fixes:
3+
- |
4+
The boot_volume_size label value is passed as a string from the API.
5+
The validator now converts it to an integer before comparison.

0 commit comments

Comments
 (0)