Class: VagrantPlugins::Skytap::API::PublicIp
- Includes:
- Connectable
- Defined in:
- lib/vagrant-skytap/api/public_ip.rb
Instance Attribute Summary collapse
-
#interface ⇒ Object
readonly
Returns the value of attribute interface.
Attributes inherited from Resource
Class Method Summary collapse
Instance Method Summary collapse
- #attached? ⇒ Boolean
- #deployed? ⇒ Boolean
-
#initialize(attrs, interface, env) ⇒ PublicIp
constructor
interface
may be nil; i.e., this IP isn’t attached to anything.
Methods included from Connectable
#choice_for_setup, #connection_choice_class
Methods inherited from Resource
#delete, #refresh, #reload, short_name, #update, #url
Methods included from SpecifiedAttributes
Constructor Details
#initialize(attrs, interface, env) ⇒ PublicIp
interface
may be nil; i.e., this IP isn’t attached to anything.
41 42 43 44 |
# File 'lib/vagrant-skytap/api/public_ip.rb', line 41 def initialize(attrs, interface, env) super @interface = interface end |
Instance Attribute Details
#interface ⇒ Object (readonly)
Returns the value of attribute interface.
36 37 38 |
# File 'lib/vagrant-skytap/api/public_ip.rb', line 36 def interface @interface end |
Class Method Details
.rest_name ⇒ Object
32 33 34 |
# File 'lib/vagrant-skytap/api/public_ip.rb', line 32 def self.rest_name "public_ip" end |
Instance Method Details
#attached? ⇒ Boolean
46 47 48 |
# File 'lib/vagrant-skytap/api/public_ip.rb', line 46 def attached? interface || nics.present? end |
#deployed? ⇒ Boolean
50 51 52 |
# File 'lib/vagrant-skytap/api/public_ip.rb', line 50 def deployed? nics.any? {|nic_attrs| nic_attrs['deployed']} end |