Class: Fog::Rackspace::NetworkingV2::Port

Inherits:
Model
  • Object
show all
Defined in:
lib/fog/rackspace/models/networking_v2/port.rb

Instance Method Summary collapse

Instance Method Details

#destroyObject



30
31
32
33
34
35
# File 'lib/fog/rackspace/models/networking_v2/port.rb', line 30

def destroy
  requires :identity

  service.delete_port(identity)
  true
end

#saveObject



19
20
21
22
23
24
25
26
27
28
# File 'lib/fog/rackspace/models/networking_v2/port.rb', line 19

def save
  data = unless self.id.nil?
    service.update_port(self)
  else
    service.create_port(self)
  end

  merge_attributes(data.body['port'])
  true
end