Package pulp :: Package server :: Package auth :: Module certificate :: Class OID
[hide private]
[frames] | no frames]

Class OID

source code

object --+
         |
        OID

The Object Identifier object.

Instance Methods [hide private]
 
__init__(self, oid)
x.__init__(...) initializes x; see x.__class__.__doc__ for signature
source code
OID
parent(self)
Get the parent OID.
source code
OID
ltrim(self, n)
Left trim n parts.
source code
OID
rtrim(self, n)
Right trim n parts.
source code
OID
append(self, oid)
Append the specified OID fragment.
source code
 
match(self, oid)
Match the specified OID considering wildcards.
source code
 
__len__(self) source code
 
__getitem__(self, index) source code
 
__repr__(self)
repr(x)
source code
 
__hash__(self)
hash(x)
source code
 
__eq__(self, other) source code
 
__str__(self)
str(x)
source code

Inherited from object: __delattr__, __getattribute__, __new__, __reduce__, __reduce_ex__, __setattr__

Class Methods [hide private]
 
join(cls, *oid) source code
[str,]
split(cls, s)
Split an OID string.
source code
Class Variables [hide private]
str WILDCARD = '*'
The wildcard character.
Instance Variables [hide private]
[str,] part
The oid parts.
Properties [hide private]

Inherited from object: __class__

Method Details [hide private]

split(cls, s)
Class Method

source code 

Split an OID string.

Parameters:
  • s (str) - An OID string Eg: (1.2.3)
Returns: [str,]
A list of OID parts.

__init__(self, oid)
(Constructor)

source code 

x.__init__(...) initializes x; see x.__class__.__doc__ for signature

Parameters:
  • oid (str|[str,]) - The OID value.
Overrides: object.__init__

parent(self)

source code 

Get the parent OID.

Returns: OID
The parent OID.

ltrim(self, n)

source code 

Left trim n parts.

Parameters:
  • n (int) - The number of parts to trim.
Returns: OID
The trimmed OID

rtrim(self, n)

source code 

Right trim n parts.

Parameters:
  • n (int) - The number of parts to trim.
Returns: OID
The trimmed OID

append(self, oid)

source code 

Append the specified OID fragment.

Parameters:
  • oid (str|OID) - An OID fragment.
Returns: OID
The concatenated OID.

match(self, oid)

source code 

Match the specified OID considering wildcards. Patterns:

  • 1.4.5.6.74 (not wildcarded)
  • .5.6.74 (match on only last 4)
  • 5.6.74. (match only first 4)
  • 1.4.*.6.* (wildcard pattern)
Parameters:
  • oid (str|OID) - An OID string or object.
Returns:
True if matched

__repr__(self)
(Representation operator)

source code 

repr(x)

Overrides: object.__repr__
(inherited documentation)

__hash__(self)
(Hashing function)

source code 

hash(x)

Overrides: object.__hash__
(inherited documentation)

__str__(self)
(Informal representation operator)

source code 

str(x)

Overrides: object.__str__
(inherited documentation)