Class: CloudProviders::VmwareInstance
- Inherits:
-
CloudProviderInstance
- Object
- CloudProviderInstance
- CloudProviders::VmwareInstance
- Defined in:
- lib/cloud_providers/vmware/vmware_instance.rb
Instance Method Summary collapse
- #cloud_provider(o = {}, &block) ⇒ Object
-
#initialize(opts = {}, &block) ⇒ VmwareInstance
constructor
A new instance will be created from a hash.
- #refresh! ⇒ Object
- #status ⇒ Object
-
#to_s ⇒ Object
Printing.
-
#wait_for_public_ip(timeout = 60) ⇒ Object
Since we aren’t actually getting any ips from a list, only using the one vmx file, we don’t actually need to refresh anything.
Methods inherited from CloudProviderInstance
#[], #[]=, #after_bootstrap, #after_configure, #before_bootstrap, #before_configure, #bootstrap!, #bootstrapped?, #configure!, #determine_os, #each, #elapsed_runtime, #has_key?, #keypair, #keys, #loaded, #on_all_callbacks, #os, #pack_clouds_dot_rb_and_expected_directories, #pending?, #running?, #terminate!, #terminated?, #terminating?, #to_hash, #valid?, #values, #wait_for_port
Methods included from Callbacks
Methods included from Connections
#host, #rsync, #run, #scp, #ssh, #ssh_options, #user
Constructor Details
#initialize(opts = {}, &block) ⇒ VmwareInstance
A new instance will be created from a hash. The parent clouds describe_instances list will be searched for the first one matching any of this instance’s provided unique identifiers. If an instance is found, this instance’s properties will be set to the properties provided If the found instance has properties of the same key as the provided options, the found instance’s values will override the passed in options
20 21 22 23 |
# File 'lib/cloud_providers/vmware/vmware_instance.rb', line 20 def initialize(opts={}, &block) (opts) super end |
Instance Method Details
#cloud_provider(o = {}, &block) ⇒ Object
45 46 47 48 49 50 51 52 |
# File 'lib/cloud_providers/vmware/vmware_instance.rb', line 45 def cloud_provider(o={}, &block) @cloud_provider ||= if cloud cloud.cloud_provider else = o.choose{|k,v| Vmware..has_key?(k)} Vmware.new( , &block) end end |
#refresh! ⇒ Object
41 42 43 |
# File 'lib/cloud_providers/vmware/vmware_instance.rb', line 41 def refresh! self end |
#status ⇒ Object
31 32 33 |
# File 'lib/cloud_providers/vmware/vmware_instance.rb', line 31 def status "running" end |
#to_s ⇒ Object
Printing. This is how we extract the instances into the listing on the local side into the local listing file
27 28 29 |
# File 'lib/cloud_providers/vmware/vmware_instance.rb', line 27 def to_s "#{name}\t#{dns_name}\t#{instance_id}" end |
#wait_for_public_ip(timeout = 60) ⇒ Object
Since we aren’t actually getting any ips from a list, only using the one vmx file, we don’t actually need to refresh anything
37 38 39 |
# File 'lib/cloud_providers/vmware/vmware_instance.rb', line 37 def wait_for_public_ip(timeout=60) public_ip end |