merge from improvements on the 1.0 branch:
[monitor.git] / nodenetwork.py
index bf80e00..5c1a439 100755 (executable)
@@ -2,9 +2,8 @@
 
 import sys
 import plc
-import auth
-api = plc.PLC(auth.auth, auth.plc)
-import config
+api = plc.getAuthAPI()
+import util.file
 
 if len(sys.argv[1:]) > 0:
        for host in sys.argv[1:]:
@@ -25,7 +24,7 @@ if len(sys.argv[1:]) > 0:
                                        #print nn2['nodenetwork_id']
                                        #api.DeleteNodeNetwork(nn2['nodenetwork_id'])
 else:
-       nnids = config.getListFromFile('nnids.txt')
+       nnids = util.file.getListFromFile('nnids.txt')
        nnids = [ int(i) for i in nnids]
        for id in nnids:
                nnet2 = api.GetNodeNetworks(id)