Class: Fog::Rackspace::NetworkingV2::SecurityGroupRule

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

Instance Method Summary collapse

Instance Method Details

#destroyObject



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

def destroy
  requires :identity

  service.delete_security_group_rule(identity)
  true
end

#saveObject



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

def save
  data = unless self.id.nil?
    service.update_security_group_rule(self)
  else
    service.create_security_group_rule(self)
  end

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