Class: Fog::Compute::Vsphere::Server
- Defined in:
- lib/fog/vsphere/models/compute/server.rb
Instance Attribute Summary
Attributes inherited from Model
Instance Method Summary collapse
- #destroy(options = {}) ⇒ Object
- #reboot(options = {}) ⇒ Object
- #start(options = {}) ⇒ Object
- #stop(options = {}) ⇒ Object
Methods inherited from Server
Methods inherited from Model
#initialize, #inspect, #reload, #to_json, #wait_for
Methods included from Attributes::ClassMethods
#_load, #aliases, #attribute, #attributes, #identity, #ignore_attributes, #ignored_attributes
Methods included from Attributes::InstanceMethods
#_dump, #attributes, #dup, #identity, #identity=, #merge_attributes, #new_record?, #requires, #requires_one
Constructor Details
This class inherits a constructor from Fog::Model
Instance Method Details
#destroy(options = {}) ⇒ Object
54 55 56 57 |
# File 'lib/fog/vsphere/models/compute/server.rb', line 54 def destroy( = {}) requires :instance_uuid connection.vm_destroy('instance_uuid' => instance_uuid) end |
#reboot(options = {}) ⇒ Object
48 49 50 51 52 |
# File 'lib/fog/vsphere/models/compute/server.rb', line 48 def reboot( = {}) = { :force => false }.merge() requires :instance_uuid connection.vm_reboot('instance_uuid' => instance_uuid, 'force' => [:force]) end |
#start(options = {}) ⇒ Object
37 38 39 40 |
# File 'lib/fog/vsphere/models/compute/server.rb', line 37 def start( = {}) requires :instance_uuid connection.vm_power_on('instance_uuid' => instance_uuid) end |
#stop(options = {}) ⇒ Object
42 43 44 45 46 |
# File 'lib/fog/vsphere/models/compute/server.rb', line 42 def stop( = {}) = { :force => false }.merge() requires :instance_uuid connection.vm_power_off('instance_uuid' => instance_uuid, 'force' => [:force]) end |