Class: Fog::Rackspace::NetworkingV2::Subnet

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

Instance Method Summary collapse

Instance Method Details

#destroyObject



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

def destroy
  requires :identity
  service.delete_subnet(identity)
  true
end

#saveObject



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

def save
  data = unless self.id.nil?
    service.update_subnet(self)
  else
    service.create_subnet(self)
  end

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