crans_bcfg2/etc/python/ip.py
Jeremie Dimino 5d6f9722bb Corrections.
darcs-hash:20080209020948-af139-3a259bbab9d382b1c72a5d3087e47641b1f87417.gz
2008-02-09 03:09:48 +01:00

17 lines
354 B
Python

# -*- mode: python; coding: utf-8 -*-
#
# Recuperation des addresses ip des serveurs
import socket
def pubipof(hostname):
return socket.gethostbyname(hostname + ".crans.org")
def admipof(hostname):
return socket.gethostbyname(hostname + ".adm.crans.org")
def pubip():
return pubip(pubhostname)
def admip():
return admip(admhostname)