Class: Openstack::QuantumMessager::FilteredRange

Inherits:
L2l3
  • Object
show all
Defined in:
lib/openstack-quantum-messager/l2l3/filtered_range.rb

Instance Attribute Summary

Attributes inherited from L2l3

#quantum_extension_url, #quantum_url

Instance Method Summary collapse

Methods inherited from L2l3

#attachment_detail, #dhcp, #dhcp_entry, #filter_rule, #filtered_range, #firewall, #network, #port

Constructor Details

#initialize(quantum_url) ⇒ FilteredRange

Returns a new instance of FilteredRange.



5
6
7
# File 'lib/openstack-quantum-messager/l2l3/filtered_range.rb', line 5

def initialize(quantum_url)
  @quantum_url = "#{quantum_url}/firewalls/%s/filtered_ranges.json"
end

Instance Method Details

#create(firewall_uuid, address, mask) ⇒ Object



9
10
11
12
13
14
# File 'lib/openstack-quantum-messager/l2l3/filtered_range.rb', line 9

def create(firewall_uuid, address, mask)
  post_to_quantum(
    @quantum_url % firewall_uuid.to_s,
    {"filtered_range" => {"address" => address, "mask" => mask}}
  )
end