Permalink
Browse files

Have Omapi.lookup_ip and Omapi.lookup_mac lookup hosts and not leases

  • Loading branch information...
1 parent 86b7485 commit 342ec3da91a02f741a2374f5ed594fe938e643af @jof committed Sep 3, 2010
Showing with 9 additions and 2 deletions.
  1. +7 −0 debian/changelog
  2. +2 −2 pypureomapi.py
View
@@ -1,3 +1,10 @@
+pypureomapi (0.1-jof1) unstable; urgency=low
+
+ * Fix lookups to look for hosts and not leases, as add_host and del_host
+ work with hosts, not leases.
+
+ -- Jonathan Lassoff <jof@thejof.com> Tue, 24 Aug 2010 14:15:30 +0200
+
pypureomapi (0.1-1) unstable; urgency=low
* Initial release.
View
@@ -775,7 +775,7 @@ def lookup_ip(self, mac):
@raises OmapiError:
@raises socket.error:
"""
- msg = OmapiMessage.open("lease")
+ msg = OmapiMessage.open("host")
msg.obj.append(("hardware-address", pack_mac(mac)))
response = self.query_server(msg)
if response.opcode != OMAPI_OP_UPDATE:
@@ -793,7 +793,7 @@ def lookup_mac(self, ip):
@raises OmapiError:
@raises socket.error:
"""
- msg = OmapiMessage.open("lease")
+ msg = OmapiMessage.open("host")
msg.obj.append(("ip-address", pack_ip(ip)))
response = self.query_server(msg)
if response.opcode != OMAPI_OP_UPDATE:

0 comments on commit 342ec3d

Please sign in to comment.