module documentation

Verification helpers for the configuration object.

Function ValidateConfig Verifies that a configuration dict looks valid.
Function VerifyIpolicy Checks if an ipolicy has correct form.
Function VerifyIspecs Checks if an ispec has correct form.
Function VerifyNic Checks if a NIC has correct form.
Function VerifyType Checks if an attribute has correct form.
def ValidateConfig(data):

Verifies that a configuration dict looks valid.

This only verifies the version of the configuration.

Raises
errors.ConfigurationErrorif the version differs from what we expect
def VerifyIpolicy(owner, ipolicy, iscluster, callback):

Checks if an ipolicy has correct form.

Parameters
owner:strname of the object containing the attribute
ipolicy:dictactual value of the ipolicy parameters
iscluster:boolTrue iff the owner is the cluster
callback:callablewill be called if there is an error
def VerifyIspecs(owner, parentkey, params, callback):

Checks if an ispec has correct form.

Parameters
owner:strname of the object containing the attribute
parentkey:strthe root name of the key
params:dictactual value of the ispec parameters
callback:callablewill be called if there is an error
def VerifyNic(owner, params, callback):

Checks if a NIC has correct form.

Parameters
owner:strname of the object containing the attribute
params:dictactual value of the NIC parameters
callback:callablewill be called if there is an error
def VerifyType(owner, attr, value, template, callback):

Checks if an attribute has correct form.

Parameters
owner:strname of the object containing the attribute
attr:strname of the attribute
value:dictactual value of the attribute
template:dictexpected types of the keys
callback:callablewill be called if there is an error