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

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

Instance Attribute Summary

Attributes inherited from Fog::OpenStack::Collection

#response

Instance Method Summary collapse

Methods inherited from Fog::OpenStack::Collection

#all, #destroy, #find_by_id, #load_response, #summary

Instance Method Details

#get(security_group_rule_id) ⇒ Object



10
11
12
13
14
15
16
17
# File 'lib/fog/openstack/compute/models/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::OpenStack::Compute::NotFound
  nil
end