Class: Fog::Rackspace::Networking::Network

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

Instance Method Summary collapse

Instance Method Details

#destroyObject


18
19
20
21
22
23
# File 'lib/fog/rackspace/models/networking/network.rb', line 18

def destroy
  requires :identity

  service.delete_network(identity)
  true
end

#saveObject


10
11
12
13
14
15
16
# File 'lib/fog/rackspace/models/networking/network.rb', line 10

def save
  requires :label, :cidr

  data = service.create_network(label, cidr)
  merge_attributes(data.body['network'])
  true
end