Class: Fog::Compute::Cloudstack::SecurityGroups
- Inherits:
-
Fog::Collection
- Object
- Fog::Collection
- Fog::Compute::Cloudstack::SecurityGroups
- Defined in:
- lib/fog/cloudstack/models/compute/security_groups.rb
Instance Method Summary collapse
Instance Method Details
#all(options = {}) ⇒ Object
10 11 12 13 |
# File 'lib/fog/cloudstack/models/compute/security_groups.rb', line 10 def all(={}) data = service.list_security_groups()["listsecuritygroupsresponse"]["securitygroup"] || [] load(data) end |
#get(security_group_id) ⇒ Object
15 16 17 18 19 20 21 |
# File 'lib/fog/cloudstack/models/compute/security_groups.rb', line 15 def get(security_group_id) if security_group = service.list_security_groups('id' => security_group_id)["listsecuritygroupsresponse"]["securitygroup"].first new(security_group) end rescue Fog::Compute::Cloudstack::BadRequest nil end |