Class: Fog::Ecloud::MockDataClasses::MockNetworkIp
- Inherits:
-
Base
- Object
- Hash
- Base
- Fog::Ecloud::MockDataClasses::MockNetworkIp
show all
- Defined in:
- lib/fog/ecloud/mock_data_classes.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
415
416
417
|
# File 'lib/fog/ecloud/mock_data_classes.rb', line 415
def ip
self[:ip]
end
|
#name ⇒ Object
411
412
413
|
# File 'lib/fog/ecloud/mock_data_classes.rb', line 411
def name
self[:name] || ip
end
|
#rnat ⇒ Object
431
432
433
|
# File 'lib/fog/ecloud/mock_data_classes.rb', line 431
def rnat
self[:rnat] || _parent._parent.rnat
end
|
#rnat_set? ⇒ Boolean
435
436
437
|
# File 'lib/fog/ecloud/mock_data_classes.rb', line 435
def rnat_set?
!!self[:rnat]
end
|
#status ⇒ Object
423
424
425
426
427
428
429
|
# File 'lib/fog/ecloud/mock_data_classes.rb', line 423
def status
if used_by
"Assigned"
else
"Available"
end
end
|
#used_by ⇒ Object
419
420
421
|
# File 'lib/fog/ecloud/mock_data_classes.rb', line 419
def used_by
self[:used_by] || _parent._parent._parent.virtual_machines.find {|v| v.ip == ip }
end
|