Merge "Require flavor on instance-create call in the CLI."

This commit is contained in:
Jenkins 2013-02-15 18:16:26 +00:00 committed by Gerrit Code Review
commit 65197edafb
1 changed files with 2 additions and 4 deletions

View File

@ -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"""