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



16
17
18
# File 'lib/fog/opennebula/models/compute/network.rb', line 16

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

#saveObject

Raises:

  • (Fog::Errors::Error)


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

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

#shutdownObject

Raises:

  • (Fog::Errors::Error)


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

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

#to_labelObject



32
33
34
35
36
37
# File 'lib/fog/opennebula/models/compute/network.rb', line 32

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

#vlanObject



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

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