Parent

Class/Module Index [+]

Quicksearch

Fog::Network::OpenStack::Port

Public Class Methods

new(attributes) click to toggle source
# File lib/fog/openstack/models/network/port.rb, line 19
def initialize(attributes)
  # Old 'connection' is renamed as service and should be used instead
  prepare_service_value(attributes)
  super
end

Public Instance Methods

create() click to toggle source
# File lib/fog/openstack/models/network/port.rb, line 30
def create
  requires :network_id
  merge_attributes(service.create_port(self.network_id,
                                          self.attributes).body['port'])
  self
end
destroy() click to toggle source
# File lib/fog/openstack/models/network/port.rb, line 44
def destroy
  requires :id
  service.delete_port(self.id)
  true
end
save() click to toggle source
# File lib/fog/openstack/models/network/port.rb, line 25
def save
  requires :network_id
  identity ? update : create
end
update() click to toggle source
# File lib/fog/openstack/models/network/port.rb, line 37
def update
  requires :id, :network_id
  merge_attributes(service.update_port(self.id,
                                          self.attributes).body['port'])
  self
end

[Validate]

Generated with the Darkfish Rdoc Generator 2.