Class: Fog::Compute::XenServer::Models::Server

Inherits:
Server
  • Object
show all
Defined in:
lib/chef/provisioning/fog_driver/providers/xenserver.rb

Instance Method Summary collapse

Instance Method Details

#idObject



166
167
168
# File 'lib/chef/provisioning/fog_driver/providers/xenserver.rb', line 166

def id
  uuid
end

#public_ip_addressObject



174
175
176
177
178
179
180
181
182
183
184
185
186
# File 'lib/chef/provisioning/fog_driver/providers/xenserver.rb', line 174

def public_ip_address
  if xenstore_data["vm-data/ip"]
    xenstore_data["vm-data/ip"]
  else
    wait_for { tools_installed? }
    if tools_installed?
      guest_metrics.networks.first[1]
    else
      raise "Unable to return IP address. Virtual machine does not " \
      "have XenTools installed or a timeout occurred."
    end
  end
end

#ready?Boolean

Returns:

  • (Boolean)


188
189
190
# File 'lib/chef/provisioning/fog_driver/providers/xenserver.rb', line 188

def ready?
  running?
end

#stateObject



170
171
172
# File 'lib/chef/provisioning/fog_driver/providers/xenserver.rb', line 170

def state
  attributes[:power_state]
end