| |
- __builtin__.object
-
- AttrValue
- AuthorizationInfo
- CsCase
- CsChoice
- CsNode
- CsNodeInfo
- CsType
- DateTime
- HKeypathRef
- QueryResult
- SnmpVarbind
- TagValue
- TransCtxRef
- UserInfo
- Value
- XmlTag
class AttrValue(__builtin__.object) |
|
This type represents the c-type confd_attr_value_t.
The contructor for this type has the following signature:
AttrValue(attr, v) -> object
Keyword arguments:
attr -- attribute type
v -- value |
|
Methods defined here:
- __init__(...)
- x.__init__(...) initializes x; see help(type(x)) for signature
- __repr__(...)
- x.__repr__() <==> repr(x)
- __str__(...)
- x.__str__() <==> str(x)
Data descriptors defined here:
- attr
- attribute type (int)
- v
- attribute value (Value)
Data and other attributes defined here:
- __new__ = <built-in method __new__ of type object>
- T.__new__(S, ...) -> a new object with type S, a subtype of T
|
class DateTime(__builtin__.object) |
|
This type represents the c-type struct confd_datetime.
The contructor for this type has the following signature:
DateTime(year, month, day, hour, min, sec, micro, timezone,
timezone_minutes) -> object
Keyword arguments:
year -- the year (int)
month -- the month (int)
day -- the day (int)
hour -- the hour (int)
min -- minutes (int)
sec -- seconds (int)
micro -- micro seconds (int)
timezone -- the timezone (int)
timezone_minutes -- number of timezone_minutes (int) |
|
Methods defined here:
- __init__(...)
- x.__init__(...) initializes x; see help(type(x)) for signature
- __repr__(...)
- x.__repr__() <==> repr(x)
- __str__(...)
- x.__str__() <==> str(x)
Data descriptors defined here:
- day
- the day
- hour
- the hour
- micro
- micro seconds
- min
- minutes
- month
- the month
- sec
- seconds
- timezone
- timezone
- timezone_minutes
- timezone minutes
- year
- the year
Data and other attributes defined here:
- __new__ = <built-in method __new__ of type object>
- T.__new__(S, ...) -> a new object with type S, a subtype of T
|
class HKeypathRef(__builtin__.object) |
|
This type represents the c-type confd_hkeypath_t.
HKeypathRef implements some sequence methods which enables indexing,
iteration and length checking. There is also support for slicing, e.g:
Lets say the variable hkp is a valid hkeypath pointing to '/foo/bar{a}/baz'
and we slice that object like this:
newhkp = hkp[1:]
In this case newhkp will be a new hkeypath pointing to '/foo/bar{a}'.
Note that the last element must always be included, so trying to create
a slice with hkp[1:2] will fail.
The example above could also be written using the dup_len() method:
newhkp = hkp.dup_len(3)
Retrieving an element of the HKeypathRef when the underlying Value is of
type C_XMLTAG returns a XmlTag instance. In all other cases a tuple of
Values is returned.
When receiving an HKeypathRef object as on argument in a callback method,
the underlying object is only borrowed, so this particular instance is only
valid inside that callback method. If one, for some reason, would like
to keep the HKeypathRef object 'alive' for any longer than that, use
dup() or dup_len() to get a copy of it. Slicing also creates a copy.
HKeypathRef cannot be directly instantiated from Python. |
|
Methods defined here:
- __getitem__(...)
- x.__getitem__(y) <==> x[y]
- __init__(...)
- x.__init__(...) initializes x; see help(type(x)) for signature
- __len__(...)
- x.__len__() <==> len(x)
- __repr__(...)
- x.__repr__() <==> repr(x)
- __str__(...)
- x.__str__() <==> str(x)
- dup(...)
- dup() -> HKeypathRef
Duplicates this hkeypath.
- dup_len(...)
- dup_len(len) -> HKeypathRef
Duplicates the first len elements of this hkeypath.
Keyword arguments:
len -- number of elements to include in the copy
Data and other attributes defined here:
- __new__ = <built-in method __new__ of type object>
- T.__new__(S, ...) -> a new object with type S, a subtype of T
|
class QueryResult(__builtin__.object) |
|
This type represents the c-type struct confd_query_result.
QueryResult implements some sequence methods which enables indexing,
iteration and length checking.
QueryResult cannot be directly instantiated from Python. |
|
Methods defined here:
- __getitem__(...)
- x.__getitem__(y) <==> x[y]
- __init__(...)
- x.__init__(...) initializes x; see help(type(x)) for signature
- __len__(...)
- x.__len__() <==> len(x)
- __repr__(...)
- x.__repr__() <==> repr(x)
- __str__(...)
- x.__str__() <==> str(x)
Data descriptors defined here:
- nelements
- number of elements (int)
- nresults
- number of results (int)
- offset
- the offset (int)
- type
- the query result type (int)
Data and other attributes defined here:
- __new__ = <built-in method __new__ of type object>
- T.__new__(S, ...) -> a new object with type S, a subtype of T
|
class SnmpVarbind(__builtin__.object) |
|
This type represents the c-type struct confd_snmp_varbind.
The contructor for this type has the following signature:
SnmpVarbind(type, val, vartype, name, oid, cr) -> object
Keyword arguments:
type -- SNMP_VARIABLE, SNMP_OID or SNMP_COL_ROW (int)
val -- value (Value)
vartype -- snmp type (optional)
name -- mandatory if type is SNMP_VARIABLE (string)
oid -- mandatory if type is SNMP_OID (list of integers)
cr -- mandatory if type is SNMP_COL_ROW (described below)
When type is SNMP_COL_ROW the cr argument must be provided. It is built up
as a 2-tuple like this: tuple(string, list(int)).
The first element of the 2-tuple is the column name.
The second element (the row index) is a list of up to 128 integers. |
|
Methods defined here:
- __init__(...)
- x.__init__(...) initializes x; see help(type(x)) for signature
- __repr__(...)
- x.__repr__() <==> repr(x)
- __str__(...)
- x.__str__() <==> str(x)
Data descriptors defined here:
- type
- the SnmpVarbind type
Data and other attributes defined here:
- __new__ = <built-in method __new__ of type object>
- T.__new__(S, ...) -> a new object with type S, a subtype of T
|
class TagValue(__builtin__.object) |
|
This type represents the c-type confd_tag_value_t.
In addition to the 'ns' and 'tag' attributes there is an additional
attribute 'v' which containes the Value object.
The contructor for this type has the following signature:
TagValue(xmltag, v, tag, ns) -> object
There are two ways to contruct this object. The first one requires that both
xmltag and v are specified. The second one requires that both tag and ns are
specified.
Keyword arguments:
xmltag -- a XmlTag instance (optional)
v -- a Value instance (optional)
tag -- tag hash (optional)
ns -- namespace hash (optional) |
|
Methods defined here:
- __getattribute__(...)
- x.__getattribute__('name') <==> x.name
- __init__(...)
- x.__init__(...) initializes x; see help(type(x)) for signature
- __repr__(...)
- x.__repr__() <==> repr(x)
- __str__(...)
- x.__str__() <==> str(x)
Data descriptors defined here:
- ns
- namespace hash
- tag
- tag hash
Data and other attributes defined here:
- __new__ = <built-in method __new__ of type object>
- T.__new__(S, ...) -> a new object with type S, a subtype of T
|
class TransCtxRef(__builtin__.object) |
|
This type represents the c-type struct confd_trans_ctx.
Available attributes:
fd -- worker socket (int)
th -- transaction handle (int)
secondary_index -- secondary index number for list traversal (int)
username -- from user session (string)
context -- from user session (string)
TransCtxRef cannot be directly instantiated from Python. |
|
Methods defined here:
- __getattribute__(...)
- x.__getattribute__('name') <==> x.name
- __init__(...)
- x.__init__(...) initializes x; see help(type(x)) for signature
- __repr__(...)
- x.__repr__() <==> repr(x)
- __str__(...)
- x.__str__() <==> str(x)
Data and other attributes defined here:
- __new__ = <built-in method __new__ of type object>
- T.__new__(S, ...) -> a new object with type S, a subtype of T
|
class UserInfo(__builtin__.object) |
|
This type represents the c-type struct confd_user_info.
UserInfo cannot be directly instantiated from Python. |
|
Methods defined here:
- __init__(...)
- x.__init__(...) initializes x; see help(type(x)) for signature
- __repr__(...)
- x.__repr__() <==> repr(x)
- __str__(...)
- x.__str__() <==> str(x)
Data descriptors defined here:
- actx_thandle
- actx_thandle -- action context transaction handle
- addr
- addr -- ip address (string)
- af
- af -- address family AF_INIT or AF_INET6 (int)
- clearpass
- clearpass -- password if available (string)
- context
- context -- the context (string)
- flags
- flags -- CONFD_USESS_FLAG_... (int)
- lmode
- lmode -- the lock we have (int)
- logintime
- logintime -- time for login (long)
- port
- port -- source port (int)
- proto
- proto -- protocol (int)
- snmp_v3_ctx
- snmp_v3_ctx -- SNMP context (string)
- username
- username -- the username (string)
- usid
- usid -- user session id (int)
Data and other attributes defined here:
- __new__ = <built-in method __new__ of type object>
- T.__new__(S, ...) -> a new object with type S, a subtype of T
|
class Value(__builtin__.object) |
|
This type represents the c-type confd_value_t.
The contructor for this type has the following signature:
Value(init, type) -> object
If type is not provided it will be automatically set by inspecting the type
of argument init according to this table:
Python type Value type
------------------------------
bool C_BOOL
int C_INT32
long C_INT64
float C_DOUBLE
string C_BUF
If any other type is provided for the init argument, the type will be set to
C_BUF and the value will be the string representation of init.
For types C_XMLTAG, C_XMLBEGIN and C_XMLEND the init argument must be a
2-tuple which specifies the tag and ns values like this: (tag, ns).
For type C_IDENTITYREF the init argument must be a
2-tuple which specifies the ns and id values like this: (ns, id).
For types C_IPV4, C_IPV6, C_DATETIME, C_DATE, C_TIME, C_DURATION, C_OID,
C_IPV4PREFIX and C_IPV6PREFIX, the init argument must be a string.
For type C_DECIMAL64 the init argument must be a string, or a 2-tuple which
specifies value and fraction digits like this: (value, fraction_digits).
For type C_BINARY the init argument must be a string.
Keyword arguments:
init -- the initial value
type -- type (optional, see confd_types(3)) |
|
Methods defined here:
- __eq__(...)
- x.__eq__(y) <==> x==y
- __float__(...)
- x.__float__() <==> float(x)
- __ge__(...)
- x.__ge__(y) <==> x>=y
- __getitem__(...)
- x.__getitem__(y) <==> x[y]
- __gt__(...)
- x.__gt__(y) <==> x>y
- __init__(...)
- x.__init__(...) initializes x; see help(type(x)) for signature
- __int__(...)
- x.__int__() <==> int(x)
- __iter__(...)
- x.__iter__() <==> iter(x)
- __le__(...)
- x.__le__(y) <==> x<=y
- __len__(...)
- x.__len__() <==> len(x)
- __long__(...)
- x.__long__() <==> long(x)
- __lt__(...)
- x.__lt__(y) <==> x<y
- __ne__(...)
- x.__ne__(y) <==> x!=y
- __nonzero__(...)
- x.__nonzero__() <==> x != 0
- __repr__(...)
- x.__repr__() <==> repr(x)
- __str__(...)
- x.__str__() <==> str(x)
- as_decimal64(...)
- as_decimal64() -> tuple(int, int)
Returns a tuple containing (value, fraction_digits) if this value is of
type C_DECIMAL64.
- as_list(...)
- as_list() -> list
Returns a list of Value's if this value is of type C_LIST.
- as_pyval(...)
- as_pyval() -> PyObject
Tries to convert a Value to a native Python type. If possible the object
returned will be of the same type as used when initializing a Value object.
If the type cannot be represented as something useful in Python a string
will be returned. Note that not all Value types are supported.
E.g. assuming you already have a value object, this should be possible
in most cases:
newvalue = Value(value.as_pyval(), value.confd_type())
- as_xmltag(...)
- as_xmltag() -> XmlTag
Returns a XmlTag instance if this value is of type C_XMLTAG.
- confd_type(...)
- confd_type() -> int
Returns the confd type.
- confd_type_str(...)
- confd_type_str() -> str
Returns a string representation for the Value type.
- str2val(...)
- str2val(value, schema_type) -> Value
(class method)
Create and return a Value from a string. The schema_type argument must be
either a 2-tuple with namespace and keypath, a CsNode instance or a CsType
instance.
Keyword arguments:
value -- string value
schema_type -- either (ns, keypath), a CsNode or a CsType
- val2str(...)
- val2str(schema_type) -> str
Return a string representation of Value. The schema_type argument must be
either a 2-tuple with namespace and keypath, a CsNode instance or a CsType
instance.
Keyword arguments:
schema_type -- either (ns, keypath), a CsNode or a CsType
Data and other attributes defined here:
- __new__ = <built-in method __new__ of type object>
- T.__new__(S, ...) -> a new object with type S, a subtype of T
|
class XmlTag(__builtin__.object) |
|
This type represent the c-type struct xml_tag.
The contructor for this type has the following signature:
XmlTag(ns, tag) -> object
Keyword arguments:
ns -- namespace hash
tag -- tag hash |
|
Methods defined here:
- __init__(...)
- x.__init__(...) initializes x; see help(type(x)) for signature
- __repr__(...)
- x.__repr__() <==> repr(x)
- __str__(...)
- x.__str__() <==> str(x)
Data descriptors defined here:
- ns
- namespace hash value (unsigned int)
- tag
- tag hash value (unsigned int)
Data and other attributes defined here:
- __new__ = <built-in method __new__ of type object>
- T.__new__(S, ...) -> a new object with type S, a subtype of T
| |