class Fog::OracleCloud::Java::Server
Public Instance Methods
ip_addr()
click to toggle source
# File lib/fog/oraclecloud/models/java/server.rb, line 24 def ip_addr reserved_ip.blank? ? hostname : reserved_ip end
ready?()
click to toggle source
# File lib/fog/oraclecloud/models/java/server.rb, line 28 def ready? status == "Ready" end
reload()
click to toggle source
# File lib/fog/oraclecloud/models/java/server.rb, line 44 def reload requires :identity, :service_name data = begin collection.get(service_name, identity) rescue Excon::Errors::SocketError nil end return unless data new_attributes = data.attributes merge_attributes(new_attributes) self end
scale(shape)
click to toggle source
# File lib/fog/oraclecloud/models/java/server.rb, line 32 def scale(shape) if !%w(oc3 oc4 oc5 oc6 oc1m oc2m oc3m oc4m).include? shape then raise ArgumentError, "Invalid Shape. Valid values - oc3, oc4, oc5, oc6, oc1m, oc2m, oc3m or oc4m" end service.scale_a_node(service_name, name, :shape=>shape) end
scale_in_a_cluster()
click to toggle source
# File lib/fog/oraclecloud/models/java/server.rb, line 39 def scale_in_a_cluster requires :service_name, :identity service.scale_in_a_cluster(service_name, identity) end