Class: Fog::Introspection::OpenStack::RulesCollection
Instance Attribute Summary
#response
Instance Method Summary
collapse
#find_by_id, #load_response, #summary
Instance Method Details
#all(_options = {}) ⇒ Object
10
11
12
|
# File 'lib/fog/introspection/openstack/models/rules_collection.rb', line 10
def all(_options = {})
load_response(service.list_rules, 'rules')
end
|
#destroy(uuid) ⇒ Object
21
22
23
24
|
# File 'lib/fog/introspection/openstack/models/rules_collection.rb', line 21
def destroy(uuid)
rules = get(uuid)
rules.destroy
end
|
#destroy_all ⇒ Object
26
27
28
|
# File 'lib/fog/introspection/openstack/models/rules_collection.rb', line 26
def destroy_all
service.delete_rules_all
end
|
#get(uuid) ⇒ Object
14
15
16
17
18
19
|
# File 'lib/fog/introspection/openstack/models/rules_collection.rb', line 14
def get(uuid)
data = service.get_rules(uuid).body
new(data)
rescue Fog::Introspection::OpenStack::NotFound
nil
end
|