Passage de stats_ip à lc_ldap
This commit is contained in:
parent
8f3f9c13da
commit
dd32a30814
1 changed files with 9 additions and 8 deletions
|
@ -1,14 +1,15 @@
|
||||||
#! /usr/bin/env python
|
#!/bin/bash /usr/scripts/python.sh
|
||||||
# -*- coding: utf-8 -*-
|
# -*- coding: utf-8 -*-
|
||||||
|
|
||||||
import sys
|
|
||||||
sys.path.append('/usr/scripts/gestion')
|
|
||||||
|
|
||||||
from ldap_crans import crans_ldap
|
from lc_ldap import shortcuts
|
||||||
from config import NETs
|
from config import NETs
|
||||||
from iptools import AddrInNet
|
from iptools import AddrInNet
|
||||||
|
|
||||||
ips = [ x.ip() for x in crans_ldap().search('ip=*')['machine'] ]
|
ldap = shortcuts.lc_ldap_readonly()
|
||||||
|
|
||||||
|
|
||||||
|
ips = [ unicode(x['ipHostNumber'][0]) for x in ldap.search(u'(ipHostNumber=*)',sizelimit=10000)]
|
||||||
|
|
||||||
for n in NETs:
|
for n in NETs:
|
||||||
|
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue