Class: FlexiScale::Server
- Inherits:
-
Object
- Object
- FlexiScale::Server
- Defined in:
- lib/api/Flexiscale API.rb,
lib/api/Flexiscale APIAddons.rb
Overview
http://api.flexiscale.comServer
server_id - SOAP::SOAPInt
server_name - SOAP::SOAPString
status - SOAP::SOAPString
package_id - SOAP::SOAPInt
processors - SOAP::SOAPInt
memory - SOAP::SOAPInt
- FlexiScale::OperatingSystemImage
disk_capacity - SOAP::SOAPLong
disks - FlexiScale::ArrayOf_xsd_int
network_interfaces - FlexiScale::ArrayOf_xsd_int
initial_password - SOAP::SOAPString
uptime - SOAP::SOAPLong
ip_addresses - FlexiScale::ArrayOf_xsd_string
modified - SOAP::SOAPBoolean
Constant Summary collapse
- STATUS_IN_WORDS =
{ '1' => 'error', '2' => 'running', '3' => 'starting', '4' => 'stopping', '5' => 'stopped' }
Instance Attribute Summary collapse
-
#disk_capacity ⇒ Object
Returns the value of attribute disk_capacity.
-
#disks ⇒ Object
Returns the value of attribute disks.
-
#initial_password ⇒ Object
Returns the value of attribute initial_password.
-
#ip_addresses ⇒ Object
Returns the value of attribute ip_addresses.
-
#memory ⇒ Object
Returns the value of attribute memory.
-
#modified ⇒ Object
Returns the value of attribute modified.
-
#network_interfaces ⇒ Object
Returns the value of attribute network_interfaces.
-
#operating_system_image ⇒ Object
Returns the value of attribute operating_system_image.
-
#package_id ⇒ Object
Returns the value of attribute package_id.
-
#processors ⇒ Object
Returns the value of attribute processors.
-
#server_id ⇒ Object
:nodoc:.
-
#server_name ⇒ Object
Returns the value of attribute server_name.
-
#status ⇒ Object
Returns the value of attribute status.
-
#uptime ⇒ Object
Returns the value of attribute uptime.
Instance Method Summary collapse
-
#initialize(server_id = nil, server_name = nil, status = nil, package_id = nil, processors = nil, memory = nil, operating_system_image = nil, disk_capacity = nil, disks = nil, network_interfaces = nil, initial_password = nil, uptime = nil, ip_addresses = nil, modified = nil) ⇒ Server
constructor
A new instance of Server.
- #on_simple_outbound ⇒ Object
- #to_handy_hash ⇒ Object
Constructor Details
#initialize(server_id = nil, server_name = nil, status = nil, package_id = nil, processors = nil, memory = nil, operating_system_image = nil, disk_capacity = nil, disks = nil, network_interfaces = nil, initial_password = nil, uptime = nil, ip_addresses = nil, modified = nil) ⇒ Server
Returns a new instance of Server.
282 283 284 285 286 287 288 289 290 291 292 293 294 295 296 297 |
# File 'lib/api/Flexiscale API.rb', line 282 def initialize(server_id = nil, server_name = nil, status = nil, package_id = nil, processors = nil, memory = nil, = nil, disk_capacity = nil, disks = nil, network_interfaces = nil, initial_password = nil, uptime = nil, ip_addresses = nil, modified = nil) @server_id = server_id @server_name = server_name @status = status @package_id = package_id @processors = processors @memory = memory @operating_system_image = @disk_capacity = disk_capacity @disks = disks @network_interfaces = network_interfaces @initial_password = initial_password @uptime = uptime @ip_addresses = ip_addresses @modified = modified end |
Instance Attribute Details
#disk_capacity ⇒ Object
Returns the value of attribute disk_capacity.
274 275 276 |
# File 'lib/api/Flexiscale API.rb', line 274 def disk_capacity @disk_capacity end |
#disks ⇒ Object
Returns the value of attribute disks.
275 276 277 |
# File 'lib/api/Flexiscale API.rb', line 275 def disks @disks end |
#initial_password ⇒ Object
Returns the value of attribute initial_password.
277 278 279 |
# File 'lib/api/Flexiscale API.rb', line 277 def initial_password @initial_password end |
#ip_addresses ⇒ Object
Returns the value of attribute ip_addresses.
279 280 281 |
# File 'lib/api/Flexiscale API.rb', line 279 def ip_addresses @ip_addresses end |
#memory ⇒ Object
Returns the value of attribute memory.
272 273 274 |
# File 'lib/api/Flexiscale API.rb', line 272 def memory @memory end |
#modified ⇒ Object
Returns the value of attribute modified.
280 281 282 |
# File 'lib/api/Flexiscale API.rb', line 280 def modified @modified end |
#network_interfaces ⇒ Object
Returns the value of attribute network_interfaces.
276 277 278 |
# File 'lib/api/Flexiscale API.rb', line 276 def network_interfaces @network_interfaces end |
#operating_system_image ⇒ Object
Returns the value of attribute operating_system_image.
273 274 275 |
# File 'lib/api/Flexiscale API.rb', line 273 def @operating_system_image end |
#package_id ⇒ Object
Returns the value of attribute package_id.
270 271 272 |
# File 'lib/api/Flexiscale API.rb', line 270 def package_id @package_id end |
#processors ⇒ Object
Returns the value of attribute processors.
271 272 273 |
# File 'lib/api/Flexiscale API.rb', line 271 def processors @processors end |
#server_id ⇒ Object
:nodoc:
267 268 269 |
# File 'lib/api/Flexiscale API.rb', line 267 def server_id @server_id end |
#server_name ⇒ Object
Returns the value of attribute server_name.
268 269 270 |
# File 'lib/api/Flexiscale API.rb', line 268 def server_name @server_name end |
#status ⇒ Object
Returns the value of attribute status.
269 270 271 |
# File 'lib/api/Flexiscale API.rb', line 269 def status @status end |
#uptime ⇒ Object
Returns the value of attribute uptime.
278 279 280 |
# File 'lib/api/Flexiscale API.rb', line 278 def uptime @uptime end |
Instance Method Details
#on_simple_outbound ⇒ Object
299 300 301 |
# File 'lib/api/Flexiscale API.rb', line 299 def on_simple_outbound { 'kd' => 1234567 } end |
#to_handy_hash ⇒ Object
140 141 142 143 144 145 146 147 148 149 150 151 152 |
# File 'lib/api/Flexiscale APIAddons.rb', line 140 def to_handy_hash ::FlexiScale::attrs_to_hash(self, :disk_capacity, :disks, :ip_addresses, :memory, :modified, :network_interfaces, :package_id, :processors, :status, :uptime ).merge( :fxs_id => self.server_id, :name => self.server_name, :fxs_status => self.status, # :status => STATUS_IN_WORDS[self.status], :image_id => self.., :image_name => self.., :initial_password => self.initial_password.chop ) end |