Class: Fog::Compute::XenServer::Vlans
- Inherits:
-
Fog::Collection
- Object
- Fog::Collection
- Fog::Compute::XenServer::Vlans
- Defined in:
- lib/fog/xenserver/models/compute/vlans.rb
Instance Method Summary collapse
-
#all(options = {}) ⇒ Array
Return the list of VLANs available.
-
#get(ref) ⇒ Fog::Compute::XenServer::VLAN
Retrieve a VLAN object by by reference.
Instance Method Details
#all(options = {}) ⇒ Array
Return the list of VLANs available
14 15 16 17 |
# File 'lib/fog/xenserver/models/compute/vlans.rb', line 14 def all( = {}) data = service.get_records 'VLAN' load(data) end |
#get(ref) ⇒ Fog::Compute::XenServer::VLAN
Retrieve a VLAN object by by reference.
Returns nil if not found
25 26 27 28 29 30 31 |
# File 'lib/fog/xenserver/models/compute/vlans.rb', line 25 def get( ref ) if ref && obj = service.get_record( ref, 'VLAN' ) new(obj) end rescue Fog::XenServer::NotFound nil end |