Class: Openstack::QuantumMessager::DhcpEntry

Inherits:
L2l3
  • Object
show all
Defined in:
lib/openstack-quantum-messager/l2l3/dhcp_entry.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) ⇒ DhcpEntry

Returns a new instance of DhcpEntry.



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

def initialize(quantum_url)
  @quantum_url = "#{quantum_url}/dhcp_entries.json"
end

Instance Method Details

#create(address, mac) ⇒ Object



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

def create(address, mac)
  post_to_quantum(
    @quantum_url,
    {"dhcp_entry" => {"mac" => mac, "address" => address}}
  )
end