lib/app42/command/service.rb in app42-0.5.5 vs lib/app42/command/service.rb in app42-0.5.6

- old
+ new

@@ -81,21 +81,42 @@ iaas = get_iaas_providers os = get_os_for_service iaas, vm_type, service - vmconfig = get_vmconfig 'info/service', vm_type, iaas + kontena = get_vmconfig - create_service service, service_name , database, vm_type, iaas, vmconfig, os + create_service service, service_name , database, vm_type, iaas, kontena, os end # collect service name from user and proceed service delete request def delete @options[:service] = ask_service_name if @options[:service].nil? response = delete_service @options[:service] if is_service_exist? @options[:service] exit! if response end + + # collect service name from user and proceed service start request + def start + @options[:service] = ask_service_name if @options[:service].nil? + response = service_operation __method__, @options[:service] if is_service_exist? @options[:service] + exit! if response + end + + # collect service name from user and proceed service restart request + def restart + @options[:service] = ask_service_name if @options[:service].nil? + response = service_operation __method__, @options[:service] if is_service_exist? @options[:service] + exit! if response + end + + # collect service name from user and proceed service stop request + def stop + @options[:service] = ask_service_name if @options[:service].nil? + response = service_operation __method__, @options[:service] if is_service_exist? @options[:service] + exit! if response + end # collect service name from user and proceed service resetPassword request def reset_pass @options[:service] = ask_service_name if @options[:service].nil? service_token = ask_service_token if is_service_exist? @options[:service] \ No newline at end of file