chiark
/
gitweb
/
~ianmdlvl
/
secnet.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
make-secnet-sites: Switch to `ipaddress' from `ipaddr'
[secnet.git]
/
make-secnet-sites
diff --git
a/make-secnet-sites
b/make-secnet-sites
index 1cc979b57e4c5c7ecb66ffcbee9edf19154541cd..158f5b36c8229b170969fe966de4cb23d4c84731 100755
(executable)
--- a/
make-secnet-sites
+++ b/
make-secnet-sites
@@
-46,8
+46,7
@@
no-suppress-args
cd ~/secnet/sites-test/
execute ~/secnet/make-secnet-sites.py -u vpnheader groupfiles sites
cd ~/secnet/sites-test/
execute ~/secnet/make-secnet-sites.py -u vpnheader groupfiles sites
-This program is part of secnet. It relies on the "ipaddr" library from
-Cendio Systems AB.
+This program is part of secnet.
"""
"""
@@
-62,7
+61,7
@@
import os
import getopt
import re
import getopt
import re
-import ipaddr
+import ipaddr
ess
# entry 0 is "near the executable", or maybe from PYTHONPATH=.,
# which we don't want to preempt
# entry 0 is "near the executable", or maybe from PYTHONPATH=.,
# which we don't want to preempt
@@
-148,7
+147,7
@@
def listof(subtype):
class single_ipaddr (basetype):
"An IP address"
def __init__(self,w):
class single_ipaddr (basetype):
"An IP address"
def __init__(self,w):
- self.addr=ipaddr
.IPA
ddress(w[1])
+ self.addr=ipaddr
ess.ip_a
ddress(w[1])
def __str__(self):
return '"%s"'%self.addr
def __str__(self):
return '"%s"'%self.addr
@@
-157,7
+156,7
@@
class networks (basetype):
def __init__(self,w):
self.set=ipaddrset.IPAddressSet()
for i in w[1:]:
def __init__(self,w):
self.set=ipaddrset.IPAddressSet()
for i in w[1:]:
- x=ipaddr
.IPN
etwork(i,strict=True)
+ x=ipaddr
ess.ip_n
etwork(i,strict=True)
self.set.append([x])
def __str__(self):
return ",".join(map((lambda n: '"%s"'%n), self.set.networks()))
self.set.append([x])
def __str__(self):
return ",".join(map((lambda n: '"%s"'%n), self.set.networks()))