Class: VagrantPlugins::Skytap::API::PublicIp
Instance Attribute Summary collapse
Attributes inherited from Resource
#attrs, #env
Instance Method Summary
collapse
Methods inherited from Resource
#refresh, #reload, resource_name, #url
#get_api_attribute, included
Constructor Details
#initialize(attrs, interface, env) ⇒ PublicIp
interface
may be nil; i.e., this IP isn’t attached to anything.
84
85
86
87
|
# File 'lib/vagrant-skytap/api/public_ip.rb', line 84
def initialize(attrs, interface, env)
super
@interface = interface
end
|
Instance Attribute Details
#interface ⇒ Object
Returns the value of attribute interface.
79
80
81
|
# File 'lib/vagrant-skytap/api/public_ip.rb', line 79
def interface
@interface
end
|
Instance Method Details
#attached? ⇒ Boolean
93
94
95
|
# File 'lib/vagrant-skytap/api/public_ip.rb', line 93
def attached?
interface || nics.present?
end
|
#choice_for_setup(iface) ⇒ Object
89
90
91
|
# File 'lib/vagrant-skytap/api/public_ip.rb', line 89
def choice_for_setup(iface)
PublicIpChoice.new(env, self, iface)
end
|
#deployed? ⇒ Boolean
97
98
99
|
# File 'lib/vagrant-skytap/api/public_ip.rb', line 97
def deployed?
nics.any? {|nic_attrs| nic_attrs['deployed']}
end
|