Skip to content

Commit e3d686f

Browse files
Jenkinsopenstack-gerrit
authored andcommitted
Merge "Replace basestring by six.string_types"
2 parents daa33c5 + 99e289e commit e3d686f

3 files changed

Lines changed: 5 additions & 4 deletions

File tree

novaclient/tests/v1_1/test_shell.py

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -461,7 +461,8 @@ def test_boot_metadata(self):
461461
)
462462

463463
def test_boot_hints(self):
464-
self.run_command('boot --image 1 --flavor 1 --hint a=b=c some-server ')
464+
self.run_command('boot --image 1 --flavor 1 '
465+
'--hint a=b0=c0 --hint a=b1=c1 some-server ')
465466
self.assert_called_anytime(
466467
'POST', '/servers',
467468
{
@@ -472,7 +473,7 @@ def test_boot_hints(self):
472473
'min_count': 1,
473474
'max_count': 1,
474475
},
475-
'os:scheduler_hints': {'a': 'b=c'},
476+
'os:scheduler_hints': {'a': ['b0=c0', 'b1=c1']},
476477
},
477478
)
478479

novaclient/v1_1/shell.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -256,7 +256,7 @@ def _boot(cs, args, reservation_id=None, min_count=None, max_count=None):
256256
# NOTE(vish): multiple copies of the same hint will
257257
# result in a list of values
258258
if key in hints:
259-
if isinstance(hints[key], basestring):
259+
if isinstance(hints[key], six.string_types):
260260
hints[key] = [hints[key]]
261261
hints[key] += [value]
262262
else:

novaclient/v3/shell.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -173,7 +173,7 @@ def _boot(cs, args, reservation_id=None, min_count=None, max_count=None):
173173
# NOTE(vish): multiple copies of the same hint will
174174
# result in a list of values
175175
if key in hints:
176-
if isinstance(hints[key], basestring):
176+
if isinstance(hints[key], six.string_types):
177177
hints[key] = [hints[key]]
178178
hints[key] += [value]
179179
else:

0 commit comments

Comments
 (0)