lib/cli/commands/services.rb in af-0.3.18.2 vs lib/cli/commands/services.rb in af-0.3.18.3

- old
+ new

@@ -18,10 +18,11 @@ display_system_services(ss) display_provisioned_services(ps) end def create_service(service=nil, name=nil, appname=nil) + unless no_prompt || service services = client.services_info err 'No services available to provision' if services.empty? service = ask( "Which service would you like to provision?", @@ -36,9 +37,18 @@ name = @options[:name] unless name unless name name = random_service_name(service) picked_name = true end + + if client.infra_supported? + unless no_prompt || @options[:infra] + @options[:infra] = VMC::Cli::InfraHelper.name_for_description( + ask("Select Infrastructure", + :indexed => true, :choices => VMC::Cli::InfraHelper.infra_descriptions)) + end + end + create_service_banner(service, name, picked_name, @options[:infra]) appname = @options[:bind] unless appname bind_service_banner(name, appname) if appname end