# File lib/fog/glesys/models/compute/server.rb, line 48 def destroy requires :identity connection.destroy(:serverid => identity, :keepip => keepip) end
# File lib/fog/glesys/models/compute/server.rb, line 29 def ready? state == 'running' end
# File lib/fog/glesys/models/compute/server.rb, line 43 def reboot requires :identity connection.reboot(:serverid => identity) end
# File lib/fog/glesys/models/compute/server.rb, line 53 def save raise "Operation not supported" if self.identity requires :hostname, :rootpassword options = { :datacenter => datacenter || "Falkenberg", :platform => platform || "Xen", :hostname => hostname, :templatename => templatename || "Debian-6 x64", :disksize => disksize || "10", :memorysize => memorysize || "512", :cpucores => cpucores || "1", :rootpassword => rootpassword, :transfer => transfer || "500", } data = connection.create(options) merge_attributes(data.body['response']['server']) data.status == 200 ? true : false end
# File lib/fog/glesys/models/compute/server.rb, line 33 def start requires :identity connection.start(:serverid => identity) end
# File lib/fog/glesys/models/compute/server.rb, line 38 def stop requires :identity connection.stop(:serverid => identity) end