Class: Fog::Compute::OpenStack::SecurityGroupRules

Inherits:
OpenStack::Collection show all
Defined in:
lib/fog/openstack/models/compute/security_group_rules.rb

Instance Attribute Summary

Attributes inherited from OpenStack::Collection

#response

Instance Method Summary collapse

Methods inherited from OpenStack::Collection

#all, #destroy, #load_response, #summary

Instance Method Details

#get(security_group_rule_id) ⇒ Object



10
11
12
13
14
15
16
17
# File 'lib/fog/openstack/models/compute/security_group_rules.rb', line 10

def get(security_group_rule_id)
  if security_group_rule_id
    body = service.get_security_group_rule(security_group_rule_id).body
    new(body['security_group_rule'])
  end
rescue Fog::Compute::OpenStack::NotFound
  nil
end