X-Git-Url: http://git.onelab.eu/?a=blobdiff_plain;f=bootauth.py;h=44f9a8f85b56e022e7dfc774f390035bb132c0db;hb=9593742301848f6a3e5d95efe7e52071d0f3b4d5;hp=a946db3432d5ff51bef5102eed3ae8a74af4e1e0;hpb=9dde862b086be909942f8b4df2863acd4ad555f6;p=nodemanager.git diff --git a/bootauth.py b/bootauth.py index a946db3..44f9a8f 100755 --- a/bootauth.py +++ b/bootauth.py @@ -9,7 +9,7 @@ # Mark Huang # Copyright (C) 2006 The Trustees of Princeton University # -# $Id$ +# $Id: bootauth.py,v 1.1 2006/10/31 23:19:28 mlhuang Exp $ # import os, sys @@ -46,7 +46,7 @@ def main(): for (opt, optval) in opts: if opt == "-f" or opt == "--config" or opt == "--cfg" or opt == "--file": - config = optval + config = Config(optval) elif opt == "-n" or opt == "--node" or opt == "--nodeid" or opt == "--node-id" or opt == "--node_id": if os.path.exists(optval): node_id = file(optval).read().strip() @@ -68,10 +68,10 @@ def main(): usage() # Authenticate as the Boot Manager would and get a session key - plc = PLCAPI(config.plc_api_uri, (node_id, key)) + plc = PLCAPI(config.plc_api_uri, config.cacert, (node_id, key)) session = plc.BootGetNodeDetails()['session'] - plc = PLCAPI(config.plc_api_uri, session) + plc = PLCAPI(config.plc_api_uri, config.cacert, session) assert session == plc.GetSession() print session