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

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

Instance Attribute Summary

Attributes inherited from OpenStack::Model

#project

Instance Method Summary collapse

Methods inherited from OpenStack::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/introspection/openstack/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/introspection/openstack/models/rules.rb', line 21

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