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

View File

@ -51,12 +51,10 @@ class InstanceCommands(common.AuthedCommandsBase):
def create(self): def create(self):
"""Create a new instance""" """Create a new instance"""
self._require('name', 'size') self._require('name', 'size', 'flavor')
# flavorRef is not required.
flavorRef = self.flavor or "http://localhost:8775/v1.0/flavors/1"
volume = {"size": self.size} volume = {"size": self.size}
self._pretty_print(self.dbaas.instances.create, self.name, self._pretty_print(self.dbaas.instances.create, self.name,
flavorRef, volume) self.flavor, volume)
def delete(self): def delete(self):
"""Delete the specified instance""" """Delete the specified instance"""