Class: Openstack::QuantumMessager::FilterRule
- Defined in:
- lib/openstack-quantum-messager/l2l3/filter_rule.rb
Instance Attribute Summary
Attributes inherited from L2l3
#quantum_extension_url, #quantum_url
Instance Method Summary collapse
- #create(src, dst, dst_port, proto) ⇒ Object
- #delete(id) ⇒ Object
-
#initialize(quantum_url) ⇒ FilterRule
constructor
A new instance of FilterRule.
- #show(id) ⇒ Object
Methods inherited from L2l3
#attachment_detail, #dhcp, #dhcp_entry, #filter_rule, #filtered_range, #firewall, #network, #port
Constructor Details
#initialize(quantum_url) ⇒ FilterRule
Returns a new instance of FilterRule.
5 6 7 |
# File 'lib/openstack-quantum-messager/l2l3/filter_rule.rb', line 5 def initialize(quantum_url) @quantum_url = quantum_url end |
Instance Method Details
#create(src, dst, dst_port, proto) ⇒ Object
9 10 11 12 13 14 15 16 17 18 19 20 |
# File 'lib/openstack-quantum-messager/l2l3/filter_rule.rb', line 9 def create(src, dst, dst_port, proto) full_url = "#{@quantum_url}/filter_rules.json" post_hash = { "filter_rule" => { "src" => src, "dst" => dst, "dst_port" => dst_port, "proto" => proto } } post_to_quantum(full_url, post_hash) end |
#delete(id) ⇒ Object
22 23 24 |
# File 'lib/openstack-quantum-messager/l2l3/filter_rule.rb', line 22 def delete(id) HTTParty.delete("#{@quantum_url}/filter_rules/#{id}.json" ) end |
#show(id) ⇒ Object
26 27 28 |
# File 'lib/openstack-quantum-messager/l2l3/filter_rule.rb', line 26 def show(id) HTTParty.get("#{@quantum_url}/filter_rules/#{id}.json" ) end |