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

Re: [HTCondor-users] A few questions about the format of variables (classads) and their values when using the python bindings

> On Jul 27, 2015, at 9:56 AM, Jose Caballero <jcaballero.hep@xxxxxxxxx> wrote:
> Hi,
> I am in the process to stop creating by code a condor submit file to
> then run condor_submit in a subshell, and instead using the python
> bindings end-to-end.
> I have tried to figure out the mapping between submit files content
> and classads by running
>   condor_submit -dump
> Also, read the documentation on classAds here
> http://research.cs.wisc.edu/htcondor/manual/v8.3/12_Appendix_A.html
> However, there are a few things I don't know yet how to deal with. In
> particular, with respect to some varibles -or classads-, their format,
> and the correct format of their values.
> Here we go...
> (1) copy_to_spool
> I don't find anywhere the corresponding classAd for it, or how to pass
> a value opposite to the default one when calling  submit( )

The corresponding ClassAd is CopyToSpool.

> (2) Lower case or upper case? Quotes yes or not?
> Let's take, for example, classad StreamOut. In the dump file, its
> value is false. No quotes, lower case.
> In the original submit file, however, its value was False. Upper case.
> In the output of htcondor.Schedd( ).query( ), its value is False. Upper case.
> How should I fill it when creating the classads diccionary myself? Is
> the same upper case than lower case?
> Now, let's take classad x509userproxy. In the output of
> htcondor.Schedd( ).query( ) is comes between quotes, even it doesn't
> seem to need them in the submit file.
> When must I provide for the quotes and when not in the classad dictionary?

Keywords and attribute names are case-insensitive.

When creating the ClassAd, since it is casting from the equivalent python, youâll want to use the python keyword True or False:

ad[âfooâ] = True

Trying to do:

ad[âfooâ] = true

would not do what you want, unless âtrueâ is a variable name.  This would be fine though:

ad = classad.ClassAd(â[ foo = true; ]â)

> (3) Similar to that. What about
>   +TransferOutput = ""
> what should be the value of the classad? double quotes in between
> single quotes? double quotes escaped in between double quotes? Just
> double quotes? â?

Anything starting with â+â is a ClassAd attribute and must obey ClassAd quoting rules (strings start with double quotes).

> (4) what is the classad equivalent to submit file variable nordugrid_rsl ?