Class: Fog::Ecloud::MockDataClasses::MockNetworkIp
- Inherits:
-
Base
- Object
- Hash
- Base
- Fog::Ecloud::MockDataClasses::MockNetworkIp
show all
- Defined in:
- lib/fog/compute/ecloud.rb
Instance Method Summary
collapse
Methods inherited from Base
#_parent, base_url, #base_url, base_url=, #first, #href, #initialize, #inspect, #last
Instance Method Details
#ip ⇒ Object
448
449
450
|
# File 'lib/fog/compute/ecloud.rb', line 448
def ip
self[:ip]
end
|
#name ⇒ Object
444
445
446
|
# File 'lib/fog/compute/ecloud.rb', line 444
def name
self[:name] || ip
end
|
#rnat ⇒ Object
464
465
466
|
# File 'lib/fog/compute/ecloud.rb', line 464
def rnat
self[:rnat] || _parent._parent.rnat
end
|
#rnat_set? ⇒ Boolean
468
469
470
|
# File 'lib/fog/compute/ecloud.rb', line 468
def rnat_set?
!!self[:rnat]
end
|
#status ⇒ Object
456
457
458
459
460
461
462
|
# File 'lib/fog/compute/ecloud.rb', line 456
def status
if used_by
"Assigned"
else
"Available"
end
end
|
#used_by ⇒ Object
452
453
454
|
# File 'lib/fog/compute/ecloud.rb', line 452
def used_by
self[:used_by] || _parent._parent._parent.virtual_machines.detect {|v| v.ip == ip }
end
|