diff options
author | Narayan Desai <desai@mcs.anl.gov> | 2004-10-19 19:09:17 +0000 |
---|---|---|
committer | Narayan Desai <desai@mcs.anl.gov> | 2004-10-19 19:09:17 +0000 |
commit | 3f7b97f78d2fb7ee346712e8b884402ba3b9afb5 (patch) | |
tree | e50a7b75f0f7675a6ea1329405a50658c7573f6f | |
parent | 6f9884f651e3bc73e07c40330c1fcdf17a9d8337 (diff) | |
download | bcfg2-3f7b97f78d2fb7ee346712e8b884402ba3b9afb5.tar.gz bcfg2-3f7b97f78d2fb7ee346712e8b884402ba3b9afb5.tar.bz2 bcfg2-3f7b97f78d2fb7ee346712e8b884402ba3b9afb5.zip |
Delete: src/lib/Server/Generators/myri.py
}(Logical change 1.101)
git-svn-id: https://svn.mcs.anl.gov/repos/bcfg/trunk/bcfg2@463 ce84e21b-d406-0410-9b95-82705330c041
-rw-r--r-- | src/lib/Server/Generators/myri.py | 24 |
1 files changed, 0 insertions, 24 deletions
diff --git a/src/lib/Server/Generators/myri.py b/src/lib/Server/Generators/myri.py deleted file mode 100644 index 63d907514..000000000 --- a/src/lib/Server/Generators/myri.py +++ /dev/null @@ -1,24 +0,0 @@ -#!/usr/bin/env python - -from socket import getaddrinfo - -from Bcfg2.Server.Generator import Generator -from Bcfg2.Server.Types import ConfigFile - -class myri(Generator): - __name__ = 'myri' - __version__ = '$Id$' - __author__ = 'bcfg-dev@mcs.anl.gov' - - filedata="DEVICE=myri0\nIPADDR=%s\nBROADCAST=140.221.69.255\nNETMASK=255.255.254.0\nNETWORK=140.221.68.0\nONBOOT=yes\nBOOTPROTO=none" - - def __setup__(self): - self.__provides__ = {'ConfigFile':{'/etc/sysconfig/network-scripts/ifcfg-myri0':self.build_myri}} - - def build_myri(self,name,metadata): - client = metadata.hostname - (ip,port) = getaddrinfo(client,None)[0][4] - subnet = int(ip.split('.')[2])+2 - lo = ip.split('.')[3] - addr = "140.221.%s.%s"%(subnet,lo) - return ConfigFile('/etc/sysconfig/network-scripts/ifcfg-myri0','root','root','0755',self.filedata%(addr)) |