class Fog::Network::OpenStack::Network

Public Class Methods

new(attributes) click to toggle source
Calls superclass method Fog::Model.new
# File lib/fog/openstack/models/network/network.rb, line 16
def initialize(attributes)
  @connection = attributes[:connection]
  super
end

Public Instance Methods

create() click to toggle source
# File lib/fog/openstack/models/network/network.rb, line 25
def create
  merge_attributes(connection.create_network(self.attributes).body['network'])
  self
end
destroy() click to toggle source
# File lib/fog/openstack/models/network/network.rb, line 37
def destroy
  requires :id
  connection.delete_network(self.id)
  true
end
save() click to toggle source
# File lib/fog/openstack/models/network/network.rb, line 21
def save
  identity ? update : create
end
update() click to toggle source
# File lib/fog/openstack/models/network/network.rb, line 30
def update
  requires :id
  merge_attributes(connection.update_network(self.id,
                                             self.attributes).body['network'])
  self
end