[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [HTCondor-users] Python bindings: how to querying configuration values



ah, shoot - I was on the v8.1 documentation for the python bindings -
just noticed the much more verbose one in 8.5...

Sorry for the noise!
  Thomas

On 2016-07-26 15:45, Thomas Hartmann wrote:
> Hi Iain,
> 
> many thanks - that's what I was looking for!
> 
> I.e.,
>> masterAds = condorCollector.locate(htcondor.DaemonTypes.Master,
> "wn2-test.desy.de")
> 
>> masterParams = htcondor.RemoteParam(masterAds)
> 
>> masterParams.get('UTSNAME_RELEASE')
> '2.6.32-642.3.1.el6.x86_64'
> 
> 
> Do you know, if there is some documentation?
> Else I will try to deduce the remaining functionality from dir() or the
> C++ modules behind it.
> 
> Cheers and thanks,
>   Thomas
> 
> On 2016-07-26 15:21, Iain Bradford Steers wrote:
>> Hi Thomas,
>>
>> Check out the local param attribute and the remoteparam class.
>>
>> Cheers, Iain
>>
>> Sent from Nine <http://www.9folders.com/>
>> ------------------------------------------------------------------------
>> *From:* Thomas Hartmann <thomas.hartmann@xxxxxxx>
>> *Sent:* 26 Jul 2016 15:19
>> *To:* htcondor-users@xxxxxxxxxxx
>> *Subject:* [HTCondor-users] Python bindings: how to querying
>> configuration values
>>
>> Hi all,
>>
>> I have another question regarding the python bindings:
>>
>>  - is it possible to query config values with the python bindings?
>>
>> e.g., the kernel version
>>
>>> condor_config_val -name wn2-test.desy.de -master UTSNAME_RELEASE
>> 2.6.32-504.8.1.el6.x86_64
>>
>> since it is a configuration value and no (master?) ClassAd(?), I cannot
>> simply query it with something like
>>
>>> condorCollector.query(htcondor.AdTypes.Any, 'regexp("wn.*\.desy\.de",
>> Name)',['Name','UTSNAME_RELEASE'])
>> [[ MyType = "DaemonMaster"; Name = "wn2-test.desy.de" ], [..],...]
>>
>> So, I wonder, if the configuration values are available as ClassAds as
>> well, so that I can query them?
>>
>>>>>
>>
>> illustration what I intent:
>>
>> I have added some attributes to a node's master, e.g.,
>>
>>> /etc/condor/config.d/99test.conf
>> TargetKernel = 3.4.5
>> TargetState = False
>> MASTER_ATTRS = TargetKernel, TargetState, $(MASTERD_ATTRS)
>> MASTER.SETTABLE_ATTRS_ADMINISTRATOR = TargetKernel, TargetState,
>> $(MASTER.SETTABLE_ATTRS_ADMINISTRATOR)
>>
>> which I can get/set via condor_config_val/condor_reconfig.
>>
>> So, I would like to do the same with the bindings - but since these are
>> no ClassAds but attributes (probably I am mixing these up??), I have
>> found no way to access them?
>>
>> Cheers and thanks,
>>   Thomas
>>
>>
>>
>> _______________________________________________
>> HTCondor-users mailing list
>> To unsubscribe, send a message to htcondor-users-request@xxxxxxxxxxx with a
>> subject: Unsubscribe
>> You can also unsubscribe by visiting
>> https://lists.cs.wisc.edu/mailman/listinfo/htcondor-users
>>
>> The archives can be found at:
>> https://lists.cs.wisc.edu/archive/htcondor-users/
>>
> 

Attachment: smime.p7s
Description: S/MIME Cryptographic Signature