Class: Openstack::QuantumMessager::AttachmentDetail

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

Returns a new instance of AttachmentDetail.



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

def initialize(quantum_extension_url)
  @quantum_extension_url = quantum_extension_url
end

Instance Method Details

#create(mac, ip) ⇒ Object



13
14
15
16
# File 'lib/openstack-quantum-messager/l2l3/attachment_detail.rb', line 13

def create(mac, ip)
  url = "#{quantum_extension_url}/attachment_details.json"
  post_to_quantum(url, {"attachment_detail" => {"interface_id" => mac, "ip" => ip}})
end

#delete(id) ⇒ Object



18
19
20
21
# File 'lib/openstack-quantum-messager/l2l3/attachment_detail.rb', line 18

def delete(id)
  url = "#{quantum_extension_url}/attachment_details/#{id}.json"
  HTTParty.delete(url)
end

#list(filters = {}) ⇒ Object



9
10
11
# File 'lib/openstack-quantum-messager/l2l3/attachment_detail.rb', line 9

def list(filters={})
  HTTParty.get("#{quantum_extension_url}/attachment_details.json", :query => filters)
end