Class: Fog::Compute::OpenNebula::Network

Inherits:
Model
  • Object
show all
Defined in:
lib/fog/opennebula/models/compute/network.rb

Instance Method Summary collapse

Instance Method Details

#descriptionObject



19
20
21
# File 'lib/fog/opennebula/models/compute/network.rb', line 19

def description
  attributes[:description] || ''
end

#saveObject

Raises:

  • (Fog::Errors::Error)


27
28
29
# File 'lib/fog/opennebula/models/compute/network.rb', line 27

def save
  raise Fog::Errors::Error, 'Creating a new network is not yet implemented. Contributions welcome!'
end

#shutdownObject

Raises:

  • (Fog::Errors::Error)


31
32
33
# File 'lib/fog/opennebula/models/compute/network.rb', line 31

def shutdown
  raise Fog::Errors::Error, 'Shutting down a new network is not yet implemented. Contributions welcome!'
end

#to_labelObject



35
36
37
38
39
40
# File 'lib/fog/opennebula/models/compute/network.rb', line 35

def to_label
  ret = ''
  ret += "#{description} - " unless description.empty?
  ret += "VLAN #{vlan} - " unless vlan.empty?
  ret += name.to_s
end

#vlanObject



23
24
25
# File 'lib/fog/opennebula/models/compute/network.rb', line 23

def vlan
  attributes[:vlan] || ''
end