#!/usr/bin/python
+#
+# RunlevelAgent - acts as a heartbeat back to myplc reporting that the node is
+# online and whether it is in boot or pre-boot run-level.
+# This is useful to identify nodes that are behind a firewall, as well as to
+# have the machine report run-time status both in safeboot and boot modes,
+# so that it is immediately visible at myplc (gui or api).
+#
import xml, xmlrpclib
import logging
session_str=f.read().strip()
api = PLC(Auth(session=session_str), api_server_url)
# NOTE: What should we do if this call fails?
+ # TODO: handle dns failure here.
api.AuthCheck()
try: