Script move_instance
Tool to move instances from one cluster to another.
|
CheckRapiSetup(rapi_factory)
Checks the RAPI setup by retrieving the version. |
|
|
|
|
|
ParseOptions()
Parses options passed to program. |
|
|
|
CheckOptions(parser,
options,
args)
Checks options and arguments for validity. |
|
|
|
|
|
SRC_RAPI_PORT_OPT = cli.cli_option("--src-rapi-port", action= ...
|
|
SRC_CA_FILE_OPT = cli.cli_option("--src-ca-file", action= "sto...
|
|
SRC_USERNAME_OPT = cli.cli_option("--src-username", action= "s...
|
|
SRC_PASSWORD_FILE_OPT = cli.cli_option("--src-password-file", ...
|
|
DEST_RAPI_PORT_OPT = cli.cli_option("--dest-rapi-port", action...
|
|
DEST_CA_FILE_OPT = cli.cli_option("--dest-ca-file", action= "s...
|
|
DEST_USERNAME_OPT = cli.cli_option("--dest-username", action= ...
|
|
DEST_PASSWORD_FILE_OPT = cli.cli_option("--dest-password-file"...
|
|
DEST_INSTANCE_NAME_OPT = cli.cli_option("--dest-instance-name"...
|
|
DEST_PRIMARY_NODE_OPT = cli.cli_option("--dest-primary-node", ...
|
|
DEST_SECONDARY_NODE_OPT = cli.cli_option("--dest-secondary-nod...
|
|
PARALLEL_OPT = cli.cli_option("-p", "--parallel", action= "sto...
|
Imports:
os,
sys,
time,
logging,
optparse,
threading,
cli,
constants,
utils,
workerpool,
objects,
compat,
rapi,
ganeti
CheckRapiSetup(rapi_factory)
|
|
Checks the RAPI setup by retrieving the version.
- Parameters:
|
Setting up logging infrastructure.
- Parameters:
options - Parsed command line options
|
Main routine.
- Decorators:
@rapi.client.UsesRapiClient
|
SRC_RAPI_PORT_OPT
- Value:
cli.cli_option("--src-rapi-port", action= "store", type= "int", dest=
"src_rapi_port", default= constants.DEFAULT_RAPI_PORT, help= ("Source
cluster RAPI port (defaults to %s)" % constants.DEFAULT_RAPI_PORT))
|
|
SRC_CA_FILE_OPT
- Value:
cli.cli_option("--src-ca-file", action= "store", type= "string", dest=
"src_ca_file", help= ("File containing source cluster Certificate" "
Authority (CA) in PEM format"))
|
|
SRC_USERNAME_OPT
- Value:
cli.cli_option("--src-username", action= "store", type= "string", dest
= "src_username", default= None, help= "Source cluster username")
|
|
SRC_PASSWORD_FILE_OPT
- Value:
cli.cli_option("--src-password-file", action= "store", type= "string",
dest= "src_password_file", help= "File containing source cluster pass
word")
|
|
DEST_RAPI_PORT_OPT
- Value:
cli.cli_option("--dest-rapi-port", action= "store", type= "int", dest=
"dest_rapi_port", default= constants.DEFAULT_RAPI_PORT, help= ("Desti
nation cluster RAPI port (defaults to source" " cluster RAPI port)"))
|
|
DEST_CA_FILE_OPT
- Value:
cli.cli_option("--dest-ca-file", action= "store", type= "string", dest
= "dest_ca_file", help= ("File containing destination cluster Certific
ate" " Authority (CA) in PEM format (defaults to source" " cluster CA)
"))
|
|
DEST_USERNAME_OPT
- Value:
cli.cli_option("--dest-username", action= "store", type= "string", des
t= "dest_username", default= None, help= ("Destination cluster usernam
e (defaults to" " source cluster username)"))
|
|
DEST_PASSWORD_FILE_OPT
- Value:
cli.cli_option("--dest-password-file", action= "store", type= "string"
, dest= "dest_password_file", help= ("File containing destination clus
ter password" " (defaults to source cluster password)"))
|
|
DEST_INSTANCE_NAME_OPT
- Value:
cli.cli_option("--dest-instance-name", action= "store", type= "string"
, dest= "dest_instance_name", help= ("Instance name on destination clu
ster (only" " when moving exactly one instance)"))
|
|
DEST_PRIMARY_NODE_OPT
- Value:
cli.cli_option("--dest-primary-node", action= "store", type= "string",
dest= "dest_primary_node", help= ("Primary node on destination cluste
r (only" " when moving exactly one instance)"))
|
|
DEST_SECONDARY_NODE_OPT
- Value:
cli.cli_option("--dest-secondary-node", action= "store", type= "string
", dest= "dest_secondary_node", help= ("Secondary node on destination
cluster (only" " when moving exactly one instance)"))
|
|
PARALLEL_OPT
- Value:
cli.cli_option("-p", "--parallel", action= "store", type= "int", defau
lt= 1, dest= "parallel", metavar= "<number>", help= "Number of instanc
es to be moved simultaneously")
|
|