Parent

Class/Module Index [+]

Quicksearch

Fog::Network::OpenStack::Subnet

Public Class Methods

new(attributes) click to toggle source
# File lib/fog/openstack/models/network/subnet.rb, line 20
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/subnet.rb, line 31
def create
  requires :network_id, :cidr, :ip_version
  merge_attributes(service.create_subnet(self.network_id,
                                            self.cidr,
                                            self.ip_version,
                                            self.attributes).body['subnet'])
  self
end
destroy() click to toggle source
# File lib/fog/openstack/models/network/subnet.rb, line 47
def destroy
  requires :id
  service.delete_subnet(self.id)
  true
end
save() click to toggle source
# File lib/fog/openstack/models/network/subnet.rb, line 26
def save
  requires :network_id, :cidr, :ip_version
  identity ? update : create
end
update() click to toggle source
# File lib/fog/openstack/models/network/subnet.rb, line 40
def update
  requires :id, :network_id, :cidr, :ip_version
  merge_attributes(service.update_subnet(self.id,
                                            self.attributes).body['subnet'])
  self
end

[Validate]

Generated with the Darkfish Rdoc Generator 2.