import plc
-import auth
-api = plc.PLC(auth.auth, auth.plc)
+api = plc.getAuthAPI()
-from optparse import OptionParser
+import parser as parsermodule
from sets import Set
from nodecommon import *
def main():
- from config import config
fb = database.dbLoad("findbad")
- parser = OptionParser()
+ parser = parsermodule.getParser()
parser.set_defaults(nodelist=None,
list=False,
add=False,
)
parser.add_option("", "--nodelist", dest="nodelist", metavar="list.txt",
help="Use all nodes in the given file for operation.")
- config = config(parser)
- config.parse_args()
+ parser = parsermodule.getParser(['defaults'], parser)
+ config = parsermodule.parse_args(parser)
# COLLECT nodegroups, nodes and node lists
for node in config.args: