Raise error if trying to create an instance without a flavor
Change-Id: Iee4d92921d75f4d72405342fb5147a8bbfd269e5 Story: 2008340 Task: 41241
This commit is contained in:
parent
eedc89e9d1
commit
dd371f0454
|
@ -372,6 +372,10 @@ class CreateDatabaseInstance(command.ShowOne):
|
||||||
database = self.app.client_manager.database
|
database = self.app.client_manager.database
|
||||||
db_instances = database.instances
|
db_instances = database.instances
|
||||||
|
|
||||||
|
if not parsed_args.replica_of and not parsed_args.flavor:
|
||||||
|
raise exceptions.CommandError(
|
||||||
|
_("Please specify a flavor"))
|
||||||
|
|
||||||
volume = None
|
volume = None
|
||||||
if parsed_args.size is not None and parsed_args.size <= 0:
|
if parsed_args.size is not None and parsed_args.size <= 0:
|
||||||
raise exceptions.ValidationError(
|
raise exceptions.ValidationError(
|
||||||
|
|
Loading…
Reference in New Issue