Class: Fog::Ecloud::MockDataClasses::MockNetworkIp
- Inherits:
-
Base
- Object
- Hash
- Base
- Fog::Ecloud::MockDataClasses::MockNetworkIp
show all
- Defined in:
- lib/rackspace-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
Methods inherited from Hash
#symbolize_keys!
Instance Method Details
#ip ⇒ Object
417
418
419
|
# File 'lib/rackspace-fog/ecloud/mock_data_classes.rb', line 417
def ip
self[:ip]
end
|
#name ⇒ Object
413
414
415
|
# File 'lib/rackspace-fog/ecloud/mock_data_classes.rb', line 413
def name
self[:name] || ip
end
|
#rnat ⇒ Object
433
434
435
|
# File 'lib/rackspace-fog/ecloud/mock_data_classes.rb', line 433
def rnat
self[:rnat] || _parent._parent.rnat
end
|
#rnat_set? ⇒ Boolean
437
438
439
|
# File 'lib/rackspace-fog/ecloud/mock_data_classes.rb', line 437
def rnat_set?
!!self[:rnat]
end
|
#status ⇒ Object
425
426
427
428
429
430
431
|
# File 'lib/rackspace-fog/ecloud/mock_data_classes.rb', line 425
def status
if used_by
"Assigned"
else
"Available"
end
end
|
#used_by ⇒ Object
421
422
423
|
# File 'lib/rackspace-fog/ecloud/mock_data_classes.rb', line 421
def used_by
self[:used_by] || _parent._parent._parent.virtual_machines.detect {|v| v.ip == ip }
end
|