Package ganeti :: Package tools :: Module node_daemon_setup
[hide private]
[frames] | no frames]

Module node_daemon_setup

source code

Script to configure the node daemon.

Classes [hide private]
  SetupError
Local class for reporting errors.
Functions [hide private]
 
ParseOptions()
Parses the options passed to the program.
source code
 
VerifyOptions(parser, opts, args)
Verifies options and arguments for correctness.
source code
string
_VerifyCertificate(cert_pem, _check_fn=utils.CheckNodeCertificate)
Verifies a certificate against the local node daemon certificate.
source code
string
VerifyCertificate(data, _verify_fn=_VerifyCertificate)
Verifies cluster certificate.
source code
string
VerifyClusterName(data, _verify_fn=ssconf.VerifyClusterName)
Verifies cluster name.
source code
 
VerifySsconf(data, cluster_name, _verify_fn=ssconf.VerifyKeys)
Verifies ssconf names.
source code
dict
LoadData(raw)
Parses and verifies input data.
source code
 
Main()
Main routine.
source code
Variables [hide private]
  _DATA_CHECK = ht.TStrictDict(False, True, {constants.NDS_CLUST...

Imports: os, optparse, sys, logging, OpenSSL, StringIO, cli, constants, errors, pathutils, utils, serializer, runtime, ht, ssconf, common


Function Details [hide private]

ParseOptions()

source code 

Parses the options passed to the program.

Returns:
Options and arguments

_VerifyCertificate(cert_pem, _check_fn=utils.CheckNodeCertificate)

source code 

Verifies a certificate against the local node daemon certificate.

Parameters:
  • cert_pem (string) - Certificate and key in PEM format
Returns: string
Formatted key and certificate

VerifyCertificate(data, _verify_fn=_VerifyCertificate)

source code 

Verifies cluster certificate.

Parameters:
  • data (dict)
Returns: string
Formatted key and certificate

VerifyClusterName(data, _verify_fn=ssconf.VerifyClusterName)

source code 

Verifies cluster name.

Parameters:
  • data (dict)
Returns: string
Cluster name

VerifySsconf(data, cluster_name, _verify_fn=ssconf.VerifyKeys)

source code 

Verifies ssconf names.

Parameters:
  • data (dict)

Variables Details [hide private]

_DATA_CHECK

Value:
ht.TStrictDict(False, True, {constants.NDS_CLUSTER_NAME: ht.TNonEmptyS\
tring, constants.NDS_NODE_DAEMON_CERTIFICATE: ht.TNonEmptyString, cons\
tants.NDS_SSCONF: ht.TDictOf(ht.TNonEmptyString, ht.TString), constant\
s.NDS_START_NODE_DAEMON: ht.TBool, constants.NDS_NODE_NAME: ht.TString\
,})