Module testutils
source code
Remote API test utilities.
|
_GetOpById(op_id)
Tries to get an opcode class based on its OP_ID . |
source code
|
|
|
|
|
|
|
|
|
_GetPathFromUri(uri)
Gets the path and query from a URI. |
source code
|
|
string
|
|
|
|
|
_URI_RE = re.compile(r"https://(?P<host>.*):(?P<port>\d+)(?P<p...
|
Imports:
logging,
re,
base64,
pycurl,
StringIO,
errors,
opcodes,
http,
server,
utils,
compat,
luxi,
rpccl,
rapi,
ganeti
Verifies opcode parameters according to their definition.
- Parameters:
op_id (string) - Opcode ID (OP_ID attribute), e.g.
OP_CLUSTER_VERIFY
data (dict) - Opcode parameter values
- Decorators:
- Raises:
|
Verifies opcode results used in tests (e.g. in a mock).
- Parameters:
op_id (string) - Opcode ID (OP_ID attribute), e.g.
OP_CLUSTER_VERIFY
result - Mocked opcode result
- Decorators:
- Raises:
|
Formats HTTP headers.
- Parameters:
headers (sequence of strings)
- Returns: string
|
_URI_RE
- Value:
re.compile(r"https://(?P<host>.*):(?P<port>\d+)(?P<path>/.*)")
|
|