File: classad.rst

package info (click to toggle)
condor 23.9.6%2Bdfsg-2.1
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid, trixie
  • size: 60,012 kB
  • sloc: cpp: 528,272; perl: 87,066; python: 42,650; ansic: 29,558; sh: 11,271; javascript: 3,479; ada: 2,319; java: 619; makefile: 615; xml: 613; awk: 268; yacc: 78; fortran: 54; csh: 24
file content (114 lines) | stat: -rw-r--r-- 3,022 bytes parent folder | download
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
:mod:`classad` API Reference
============================

.. module:: classad
   :platform: Unix, Windows, Mac OS X
   :synopsis: Work with the ClassAd language
.. moduleauthor:: Brian Bockelman <bbockelm@cse.unl.edu>

This page is an exhaustive reference of the API exposed by the :mod:`classad`
module.  It is not meant to be a tutorial for new users but rather a helpful
guide for those who already understand the basic usage of the module.


ClassAd Representation
----------------------

ClassAds are individually represented by the :class:`ClassAd` class.
Their attribute are key-value pairs, as in a standard Python dictionary.
The keys are strings, and the values may be either Python primitives
corresponding to ClassAd data types (string, bool, etc.) or :class:`ExprTree`
objects, which correspond to un-evaluated ClassAd expressions.

.. autoclass:: ClassAd

   .. automethod:: ClassAd.eval
   .. automethod:: ClassAd.lookup
   .. automethod:: ClassAd.printOld
   .. automethod:: ClassAd.printJson
   .. automethod:: ClassAd.flatten
   .. automethod:: ClassAd.matches
   .. automethod:: ClassAd.symmetricMatch
   .. automethod:: ClassAd.externalRefs
   .. automethod:: ClassAd.internalRefs
   .. automethod:: ClassAd.__eq__
   .. automethod:: ClassAd.__ne__


.. autoclass:: ExprTree

   .. automethod:: ExprTree.and_
   .. automethod:: ExprTree.or_
   .. automethod:: ExprTree.is_
   .. automethod:: ExprTree.isnt_
   .. automethod:: ExprTree.sameAs
   .. automethod:: ExprTree.eval
   .. automethod:: ExprTree.simplify

.. autoclass:: Value


Parsing and Creating ClassAds
-----------------------------

:mod:`classad` provides a variety of utility functions that can help you
construct ClassAd expressions and parse string representations of ClassAds.

.. autofunction:: parseAds
.. autofunction:: parseNext
.. autofunction:: parseOne

.. autofunction:: quote
.. autofunction:: unquote

.. autofunction:: Attribute
.. autofunction:: Function
.. autofunction:: Literal

.. autofunction:: lastError

.. autofunction:: register
.. autofunction:: registerLibrary


Parser Control
--------------

The behavior of :func:`parseAds`, :func:`parseNext`, and :func:`parseOne`
can be controlled by giving them different values of the :class:`Parser`
enumeration.

.. autoclass:: Parser


Utility Functions
-----------------

.. autofunction:: version


Exceptions
----------

For backwards-compatibility, the exceptions in this module inherit
from the built-in exceptions raised in earlier (pre-v8.9.9) versions.

.. autoclass:: ClassAdException

.. autoclass:: ClassAdEnumError
.. autoclass:: ClassAdEvaluationError
.. autoclass:: ClassAdInternalError
.. autoclass:: ClassAdOSError
.. autoclass:: ClassAdParseError
.. autoclass:: ClassAdTypeError
.. autoclass:: ClassAdValueError


Deprecated Functions
--------------------

The functions in this section are deprecated; new code should not use them
and existing code should be rewritten to use their replacements.

.. autofunction:: parse
.. autofunction:: parseOld