Raise error if trying to create an instance without a flavor

Change-Id: Iee4d92921d75f4d72405342fb5147a8bbfd269e5
Story: 2008340
Task: 41241
This commit is contained in:
Sam Morrison 2020-11-11 16:07:55 +11:00
parent eedc89e9d1
commit dd371f0454
1 changed files with 4 additions and 0 deletions

View File

@ -372,6 +372,10 @@ class CreateDatabaseInstance(command.ShowOne):
database = self.app.client_manager.database
db_instances = database.instances
if not parsed_args.replica_of and not parsed_args.flavor:
raise exceptions.CommandError(
_("Please specify a flavor"))
volume = None
if parsed_args.size is not None and parsed_args.size <= 0:
raise exceptions.ValidationError(