Package ganeti :: Package config :: Module verify
[hide private]
[frames] | no frames]

Module verify

source code

Verification helpers for the configuration object.

Functions [hide private]
 
ValidateConfig(data)
Verifies that a configuration dict looks valid.
source code
 
VerifyType(owner, attr, value, template, callback)
Checks if an attribute has correct form.
source code
 
VerifyNic(owner, params, callback)
Checks if a NIC has correct form.
source code
 
VerifyIpolicy(owner, ipolicy, iscluster, callback)
Checks if an ipolicy has correct form.
source code
 
VerifyIspecs(owner, parentkey, params, callback)
Checks if an ispec has correct form.
source code

Imports: constants, errors, objects, utils


Function Details [hide private]

ValidateConfig(data)

source code 

Verifies that a configuration dict looks valid.

This only verifies the version of the configuration.

Raises:

VerifyType(owner, attr, value, template, callback)

source code 

Checks if an attribute has correct form.

Parameters:
  • owner (str) - name of the object containing the attribute
  • attr (str) - name of the attribute
  • value (dict) - actual value of the attribute
  • template (dict) - expected types of the keys
  • callback (callable) - will be called if there is an error

VerifyNic(owner, params, callback)

source code 

Checks if a NIC has correct form.

Parameters:
  • owner (str) - name of the object containing the attribute
  • params (dict) - actual value of the NIC parameters
  • callback (callable) - will be called if there is an error

VerifyIpolicy(owner, ipolicy, iscluster, callback)

source code 

Checks if an ipolicy has correct form.

Parameters:
  • owner (str) - name of the object containing the attribute
  • ipolicy (dict) - actual value of the ipolicy parameters
  • iscluster (bool) - True iff the owner is the cluster
  • callback (callable) - will be called if there is an error

VerifyIspecs(owner, parentkey, params, callback)

source code 

Checks if an ispec has correct form.

Parameters:
  • owner (str) - name of the object containing the attribute
  • parentkey (str) - the root name of the key
  • params (dict) - actual value of the ispec parameters
  • callback (callable) - will be called if there is an error