Require flavor on instance-create call in the CLI.
Instead of defaulting to flavor 1, the create-instance call will now require that a flavorid is included with --flavor= on the command-line. Implements blueprint no-default-flavor Change-Id: I1de05bf4268d617b255e0be2fd2c999d49952c49
This commit is contained in:
parent
901d8a0423
commit
0dccd261e5
|
@ -51,12 +51,10 @@ class InstanceCommands(common.AuthedCommandsBase):
|
|||
|
||||
def create(self):
|
||||
"""Create a new instance"""
|
||||
self._require('name', 'size')
|
||||
# flavorRef is not required.
|
||||
flavorRef = self.flavor or "http://localhost:8775/v1.0/flavors/1"
|
||||
self._require('name', 'size', 'flavor')
|
||||
volume = {"size": self.size}
|
||||
self._pretty_print(self.dbaas.instances.create, self.name,
|
||||
flavorRef, volume)
|
||||
self.flavor, volume)
|
||||
|
||||
def delete(self):
|
||||
"""Delete the specified instance"""
|
||||
|
|
Loading…
Reference in New Issue