Readme à jour, et quelques modifications sur les noms de variables.
This commit is contained in:
parent
f228493399
commit
4bc4cb7abe
8 changed files with 152 additions and 102 deletions
|
@ -15,14 +15,14 @@ from gestion.trigger.host import record_parser, chaining
|
|||
|
||||
@record_parser(lc_ldap.attributs.macAddress.ldap_name, lc_ldap.attributs.ipHostNumber.ldap_name)
|
||||
@chaining(0)
|
||||
def send_mac_ip(ob_id, body, diff):
|
||||
"""Computes mac_ip data to send from body and diff
|
||||
def send_mac_ip(ob_id, operations, diff, more):
|
||||
"""Computes mac_ip data to send from operations and diff
|
||||
|
||||
Body is a couple of two dicts (before, after)
|
||||
operations is a couple of two dicts (before, after)
|
||||
|
||||
"""
|
||||
macs = tuple([body[i].get(lc_ldap.attributs.macAddress.ldap_name, [''])[0] for i in xrange(0, 2)])
|
||||
ips = tuple([body[i].get(lc_ldap.attributs.ipHostNumber.ldap_name, [''])[0] for i in xrange(0, 2)])
|
||||
macs = tuple([operations[i].get(lc_ldap.attributs.macAddress.ldap_name, [''])[0] for i in xrange(0, 2)])
|
||||
ips = tuple([operations[i].get(lc_ldap.attributs.ipHostNumber.ldap_name, [''])[0] for i in xrange(0, 2)])
|
||||
|
||||
# Mise à jour du parefeu mac_ip
|
||||
if not macs[0]:
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue