Class: Fog::Introspection::OpenStack::RulesCollection
- Inherits:
-
OpenStack::Collection
- Object
- Collection
- OpenStack::Collection
- Fog::Introspection::OpenStack::RulesCollection
- Defined in:
- lib/fog/openstack/models/introspection/rules_collection.rb
Instance Attribute Summary
Attributes inherited from OpenStack::Collection
Instance Method Summary collapse
Methods inherited from OpenStack::Collection
Instance Method Details
#all(_options = {}) ⇒ Object
10 11 12 |
# File 'lib/fog/openstack/models/introspection/rules_collection.rb', line 10 def all( = {}) load_response(service.list_rules, 'rules') end |
#destroy(uuid) ⇒ Object
21 22 23 24 |
# File 'lib/fog/openstack/models/introspection/rules_collection.rb', line 21 def destroy(uuid) rules = get(uuid) rules.destroy end |
#destroy_all ⇒ Object
26 27 28 |
# File 'lib/fog/openstack/models/introspection/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/openstack/models/introspection/rules_collection.rb', line 14 def get(uuid) data = service.get_rules(uuid).body new(data) rescue Fog::Introspection::OpenStack::NotFound nil end |