class Fog::Compute::Packet::VirtualNetwork
Attributes
options[RW]
Public Class Methods
new(attributes = {})
click to toggle source
Calls superclass method
# File lib/fog/compute/packet/models/virtual_network.rb, line 23 def initialize(attributes = {}) super end
Public Instance Methods
assign_port(port_id)
click to toggle source
# File lib/fog/compute/packet/models/virtual_network.rb, line 54 def assign_port(port_id) requires :id response = service.assign_port(port_id, id) true if response.status == 200 end
bond(bulk_enable)
click to toggle source
# File lib/fog/compute/packet/models/virtual_network.rb, line 42 def bond(bulk_enable) requires :id response = service.bond_ports(id, bulk_enable) true if response.status == 200 end
destroy()
click to toggle source
# File lib/fog/compute/packet/models/virtual_network.rb, line 68 def destroy requires :id response = service.delete_virtual_network(id) true if response.status == 204 end
disbond(bulk_disable)
click to toggle source
# File lib/fog/compute/packet/models/virtual_network.rb, line 48 def disbond(bulk_disable) requires :id response = service.disbond_ports(id, bulk_disable) true if response.status == 200 end
save()
click to toggle source
# File lib/fog/compute/packet/models/virtual_network.rb, line 27 def save requires :project_id, :description, :facility, :vxlan, :vlan options = {} options [:project_id] = project_id options[:description] = description options[:facility] = facility options[:vxlan] = vxlan options[:vxlan] = vlan options[:name] = name if name response = service.create_virtual_network(options) merge_attributes(response.body) end
unassign_port(port_id)
click to toggle source
# File lib/fog/compute/packet/models/virtual_network.rb, line 61 def unassign_port(port_id) requires :id response = service.unassign_port(port_id, id) true if response.status == 200 end