def test_remote_set_param(self, collector_ad): rparam = htcondor.RemoteParam(collector_ad) assert "OOF" not in rparam rparam["OOF"] = "BAR" htcondor.send_command(collector_ad, htcondor.DaemonCommands.Reconfig) rparam2 = htcondor.RemoteParam(collector_ad) assert "OOF" in rparam2
def test_remote_param(self, condor, collector_ad): print(f"\n\nLooking for FOO in parameters...{condor.param['FOO']}\n\n") print(f"\n\ncollector_ad: {collector_ad}\n\n") rparam = htcondor.RemoteParam(collector_ad) assert "FOO" in rparam assert rparam["FOO"] == "BAR" assert len(rparam.keys()) > 100
def testRemoteParam(self): os.environ["_condor_FOO"] = "BAR" self.launch_daemons(["COLLECTOR"]) coll = htcondor.Collector() coll_ad = coll.locate(htcondor.DaemonTypes.Collector) rparam = htcondor.RemoteParam(coll_ad) self.assertTrue("FOO" in rparam) self.assertEquals(rparam["FOO"], "BAR") self.assertTrue(len(rparam.keys()) > 100)
def testRemoteSetParam(self): os.environ["_condor_SETTABLE_ATTRS_READ"] = "FOO" os.environ["_condor_ENABLE_RUNTIME_CONFIG"] = "TRUE" self.launch_daemons(["COLLECTOR"]) del os.environ["_condor_SETTABLE_ATTRS_READ"] #htcondor.param["TOOL_DEBUG"] = "D_NETWORK|D_SECURITY" htcondor.enable_debug() coll = htcondor.Collector() coll_ad = coll.locate(htcondor.DaemonTypes.Collector) rparam = htcondor.RemoteParam(coll_ad) self.assertTrue("FOO" not in rparam) rparam["FOO"] = "BAR" htcondor.send_command(coll_ad, htcondor.DaemonCommands.Reconfig) rparam2 = htcondor.RemoteParam(coll_ad) self.assertTrue(rparam2.get("FOO")) self.assertTrue("FOO" in rparam2) self.assertEquals(rparam2["FOO"], "BAR") del rparam["FOO"] rparam2.refresh() htcondor.send_command(coll_ad, htcondor.DaemonCommands.Reconfig) self.assertTrue("FOO" not in rparam2) self.assertTrue(("ENABLE_CHIRP_DELAYED", "true") in rparam2.items())
def update_collector_wn_list(self, wn_list): for coll_ad in htcondor.Collector().locateAll( htcondor.DaemonTypes.Collector): htcondor.send_command(coll_ad, htcondor.DaemonCommands.Reconfig) param = htcondor.RemoteParam(coll_ad) param.update('WNS', wn_list)