Merge "Fix creating a private flavor with ID auto"
This commit is contained in:
commit
221cb5318e
@ -167,7 +167,7 @@ class CreateFlavor(command.ShowOne):
|
|||||||
parsed_args.project_domain,
|
parsed_args.project_domain,
|
||||||
).id
|
).id
|
||||||
compute_client.flavor_access.add_tenant_access(
|
compute_client.flavor_access.add_tenant_access(
|
||||||
parsed_args.id, project_id)
|
flavor.id, project_id)
|
||||||
except Exception as e:
|
except Exception as e:
|
||||||
msg = _("Failed to add project %(project)s access to "
|
msg = _("Failed to add project %(project)s access to "
|
||||||
"flavor: %(e)s")
|
"flavor: %(e)s")
|
||||||
|
@ -160,7 +160,7 @@ class TestFlavorCreate(TestFlavor):
|
|||||||
|
|
||||||
self.flavor.is_public = False
|
self.flavor.is_public = False
|
||||||
arglist = [
|
arglist = [
|
||||||
'--id', self.flavor.id,
|
'--id', 'auto',
|
||||||
'--ram', str(self.flavor.ram),
|
'--ram', str(self.flavor.ram),
|
||||||
'--disk', str(self.flavor.disk),
|
'--disk', str(self.flavor.disk),
|
||||||
'--ephemeral', str(self.flavor.ephemeral),
|
'--ephemeral', str(self.flavor.ephemeral),
|
||||||
@ -174,7 +174,6 @@ class TestFlavorCreate(TestFlavor):
|
|||||||
self.flavor.name,
|
self.flavor.name,
|
||||||
]
|
]
|
||||||
verifylist = [
|
verifylist = [
|
||||||
('id', self.flavor.id),
|
|
||||||
('ram', self.flavor.ram),
|
('ram', self.flavor.ram),
|
||||||
('disk', self.flavor.disk),
|
('disk', self.flavor.disk),
|
||||||
('ephemeral', self.flavor.ephemeral),
|
('ephemeral', self.flavor.ephemeral),
|
||||||
@ -193,7 +192,7 @@ class TestFlavorCreate(TestFlavor):
|
|||||||
self.flavor.ram,
|
self.flavor.ram,
|
||||||
self.flavor.vcpus,
|
self.flavor.vcpus,
|
||||||
self.flavor.disk,
|
self.flavor.disk,
|
||||||
self.flavor.id,
|
'auto',
|
||||||
self.flavor.ephemeral,
|
self.flavor.ephemeral,
|
||||||
self.flavor.swap,
|
self.flavor.swap,
|
||||||
self.flavor.rxtx_factor,
|
self.flavor.rxtx_factor,
|
||||||
|
6
releasenotes/notes/bug-1654221-a564ab75a6afc332.yaml
Normal file
6
releasenotes/notes/bug-1654221-a564ab75a6afc332.yaml
Normal file
@ -0,0 +1,6 @@
|
|||||||
|
---
|
||||||
|
fixes:
|
||||||
|
- |
|
||||||
|
Fix ``--project`` option for ``flavor create`` command when the
|
||||||
|
ID for the new flavor is auto generated.
|
||||||
|
[Bug `1654221 <https://bugs.launchpad.net/bugs/1654221>`_]
|
Loading…
Reference in New Issue
Block a user