lib/app42/command/service.rb in app42-0.5.9 vs lib/app42/command/service.rb in app42-0.5.10
- old
+ new
@@ -30,10 +30,11 @@
end
# ask service name to user
def ask_service_name
service_name = ask Paint["Enter Service Name", :cyan]
+ print_new_line
valid_service_name = validate_app_and_service_name "Service name", service_name.strip
valid_service_name ? (return valid_service_name) : ask_service_name
end
# ask old password to user
@@ -120,9 +121,27 @@
# 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
+
+ # read +service name+ and number of +instance+ from user
+ # then vertically scale service by no of instance
+ def vscale
+ @options[:service] = ask_service_name if @options[:service].nil?
+ @options[:kontena] = get_kontena "Vertical scale" if is_service_exist? @options[:service] and @options[:kontena].nil?
+ vscale_or_vdescal_res = vscale_or_vdescale_service __method__, @options[:kontena], @options[:service]
+ exit! if vscale_or_vdescal_res
+ end
+
+ # read +app name+ and number of +instance+ from user
+ # then vertically descale app by no of instance
+ def vdescale
+ @options[:service] = ask_service_name if @options[:service].nil?
+ @options[:kontena] = get_kontena "Vertical descale" if is_service_exist? @options[:service] and @options[:kontena].nil?
+ vscale_or_vdescal_res = vscale_or_vdescale_service __method__, @options[:kontena], @options[:service]
+ exit! if vscale_or_vdescal_res
end
# read +app name+ and number of +instance+ from user
# then vertically descale app by no of instance
def uploadbackup
\ No newline at end of file