Class: Fog::OpenStack::Introspection::Rules

Inherits:
Model
  • Object
show all
Defined in:
lib/fog/openstack/introspection/models/rules.rb

Instance Attribute Summary

Attributes inherited from Model

#project

Instance Method Summary collapse

Methods inherited from Model

#initialize, #save, #update

Constructor Details

This class inherits a constructor from Fog::OpenStack::Model

Instance Method Details

#createObject



14
15
16
17
18
19
# File 'lib/fog/openstack/introspection/models/rules.rb', line 14

def create
  requires :actions, :conditions
  attributes[:description] = description || ""
  merge_attributes(service.create_rules(attributes).body)
  self
end

#destroyObject



21
22
23
24
25
# File 'lib/fog/openstack/introspection/models/rules.rb', line 21

def destroy
  requires :uuid
  service.delete_rules(uuid)
  true
end