lib/app42/base/util.rb in app42-0.6.4 vs lib/app42/base/util.rb in app42-0.7.0
- old
+ new
@@ -406,10 +406,20 @@
message "Setup with name '#{setup_name}' does not exist.", true, 'red'
exit!
end
end
+ # rest call to server to check whether +Static IP+ assigned OR not.
+ # return true if +Static IP+ assigned else false
+ def is_static_ip_assigned? gpaas_name
+ query_params = params
+ query_params.store('setupName', gpaas_name)
+
+ setup_info = build_get_request query_params, 'gpaas', "#{@options[:setup]}"
+ setup_info["setupInfo"]["staticIP"] == "NULL" ? (return false) : (return true)
+ end
+
# Check whether +git URL+ is valid OR not
# given +git URL+ must end with +.git+ extension
def validate_git_url git_url
unless git_url.include?('.git')
message "#{Message::GIT_URL_NOT_VALID}", true, 'red'
@@ -445,6 +455,6 @@
return instance_config_id
end
end
end
-end
\ No newline at end of file
+end