Module Expr Str Import alias Import alias Import alias ImportFrom alias ImportFrom alias ImportFrom alias identifier ImportFrom alias ImportFrom alias ImportFrom alias ImportFrom alias alias ImportFrom alias ImportFrom alias Assign NameStore ListLoad Call AttributeLoad NameLoad attr Str keyword Call AttributeLoad NameLoad attr Str keyword Str Call AttributeLoad NameLoad attr Str keyword Str keyword Str Call AttributeLoad NameLoad attr Str keyword Str keyword Str Call AttributeLoad NameLoad attr Str keyword Str keyword Str Call AttributeLoad NameLoad attr Str keyword Num keyword Num keyword Num keyword Str Assign NameStore AttributeLoad NameLoad attr Expr Call AttributeLoad NameLoad attr NameLoad Expr Call AttributeLoad NameLoad attr Str Str Assign NameStore Call AttributeLoad NameLoad attr NameLoad ClassDef bases NameLoad body Expr Str FunctionDef arguments args NameParam defaults body Assign AttributeStore NameLoad attr Call AttributeLoad Call NameLoad AttributeLoad NameLoad attr attr Assign AttributeStore NameLoad attr AttributeLoad NameLoad attr Expr Call AttributeLoad Call NameLoad NameLoad NameLoad attr decorator_list FunctionDef arguments args NameParam defaults body Return Str decorator_list NameLoad FunctionDef arguments args NameParam NameParam defaults body Expr Str Return AttributeLoad NameLoad attr decorator_list FunctionDef arguments args NameParam NameParam NameParam defaults body Expr Str Expr Call AttributeLoad NameLoad attr Call AttributeLoad NameLoad attr decorator_list FunctionDef arguments args NameParam NameParam NameParam defaults body Expr Str Expr Call AttributeLoad NameLoad attr Call AttributeLoad NameLoad attr decorator_list FunctionDef arguments args NameParam defaults body Expr Str Assign NameStore Call AttributeLoad NameLoad attr Expr Call AttributeLoad NameLoad attr NameLoad decorator_list FunctionDef arguments args NameParam NameParam defaults body Expr Str Return Call AttributeLoad NameLoad attr NameLoad keyword NameLoad decorator_list FunctionDef arguments args NameParam NameParam defaults body Expr Str Return Call AttributeLoad NameLoad attr NameLoad decorator_list FunctionDef arguments args NameParam NameParam defaults body Expr Call AttributeLoad NameLoad attr Str Assign NameStore ListComp NameLoad comprehension NameStore Call AttributeLoad NameLoad attr NameLoad AttributeLoad NameLoad attr AttributeLoad NameLoad attr SubscriptLoad NameLoad Index Str If UnaryOpNot NameLoad body Expr Call AttributeLoad NameLoad attr Str Expr Call AttributeLoad NameLoad attr Return Assign NameStore Dict Str Str AttributeLoad NameLoad attr NameLoad Assign TupleStore NameStore NameStore Call AttributeLoad AttributeLoad NameLoad attr attr AttributeLoad NameLoad attr Assign NameStore Call AttributeLoad NameLoad attr keyword Call AttributeLoad NameLoad attr NameLoad Assign SubscriptStore AttributeLoad NameLoad attr Index Str AttributeLoad NameLoad attr Assign NameStore Call AttributeLoad NameLoad attr NameLoad Expr Call AttributeLoad NameLoad attr Call AttributeLoad NameLoad attr NameLoad Expr Call AttributeLoad NameLoad attr decorator_list FunctionDef arguments args NameParam NameParam defaults body TryExcept body Expr Call AttributeLoad NameLoad attr Str AttributeLoad NameLoad attr With Call NameLoad AttributeLoad NameLoad attr Str NameStore body Expr Call AttributeLoad NameLoad attr NameLoad handlers ExceptHandler type NameLoad body With Call AttributeLoad NameLoad attr body Expr Call AttributeLoad NameLoad attr Call NameLoad Str decorator_list FunctionDef arguments args NameParam defaults body Expr Call AttributeLoad NameLoad attr Str Assign NameStore Call AttributeLoad NameLoad attr If UnaryOpNot NameLoad body Return TryExcept body Expr Call AttributeLoad NameLoad attr NameLoad AttributeLoad NameLoad attr handlers ExceptHandler type NameLoad body Pass decorator_list FunctionDef arguments args NameParam defaults body If Call AttributeLoad NameLoad attr body Return Expr Call AttributeLoad NameLoad attr Str TryExcept body Expr Call AttributeLoad NameLoad attr Str Str AttributeLoad NameLoad attr Str AttributeLoad NameLoad attr Str AttributeLoad NameLoad attr handlers ExceptHandler type AttributeLoad NameLoad attr name NameStore body Expr Call AttributeLoad NameLoad attr Call NameLoad Str NameLoad decorator_list FunctionDef arguments args NameParam defaults body Expr Call AttributeLoad NameLoad attr Str If UnaryOpNot Call AttributeLoad NameLoad attr body Expr Call AttributeLoad NameLoad attr Str Expr Call AttributeLoad NameLoad attr orelse Assign NameStore Call AttributeLoad NameLoad attr Expr Call AttributeLoad NameLoad attr NameLoad AttributeLoad NameLoad attr decorator_list FunctionDef arguments args NameParam defaults body TryExcept body With Call NameLoad AttributeLoad NameLoad attr Str NameStore body Assign NameStore Call NameLoad Call AttributeLoad NameLoad attr handlers ExceptHandler type NameLoad body Return NameLoad ExceptHandler type NameLoad body Return NameLoad Return NameLoad decorator_list FunctionDef arguments args NameParam defaults body Assign NameStore Call AttributeLoad NameLoad attr If UnaryOpNot NameLoad body Return NameLoad TryExcept body Expr Call AttributeLoad NameLoad attr NameLoad Num handlers ExceptHandler type NameLoad body Return NameLoad Return NameLoad decorator_list FunctionDef arguments args NameParam NameParam NameParam defaults NameLoad body Expr Str Assign NameStore Num Assign NameStore Str If NameLoad body Assign NameStore Num Assign NameStore Str Assign NameStore SubscriptLoad NameLoad Slice NameLoad Assign TupleStore NameStore NameStore Call AttributeLoad NameLoad attr Str NameLoad keyword NameLoad If NameLoad body Raise Call AttributeLoad NameLoad attr Call NameLoad Str Return Call AttributeLoad NameLoad attr decorator_list decorator_list
N/A N/A XVP (Xenserver VNC Proxy) driver. N/A os N/A signal N/A jinja2 oslo_concurrency processutils oslo_config cfg oslo_log log logging oslo_utils excutils nova context nova db nova.i18n _ _LE nova paths nova utils N/A xvp_opts N/A N/A N/A cfg StrOpt console_xvp_conf_template default N/A N/A paths basedir_def nova/console/xvp.conf.template help XVP conf template N/A N/A cfg StrOpt console_xvp_conf default /etc/xvp.conf help Generated XVP conf file N/A N/A cfg StrOpt console_xvp_pid default /var/run/xvp.pid help XVP master process pid file N/A N/A cfg StrOpt console_xvp_log default /var/log/xvp.log help XVP log file N/A N/A cfg IntOpt console_xvp_multiplex_port default 5900 min 1 max 65535 help Port for XVP to multiplex VNC connections on N/A CONF N/A cfg CONF N/A N/A N/A CONF register_opts xvp_opts N/A N/A N/A CONF import_opt host nova.netconf N/A LOG N/A N/A logging getLogger __name__ XVPConsoleProxy N/A object N/A N/A Sets up XVP config, and manages XVP daemon. __init__ N/A N/A self N/A N/A N/A N/A self xvpconf_template N/A N/A N/A open N/A CONF console_xvp_conf_template read N/A N/A self host N/A CONF host N/A N/A N/A N/A super XVPConsoleProxy self __init__ N/A console_type N/A N/A self N/A N/A N/A vnc+xvp N/A property get_port N/A N/A self context N/A N/A N/A Get available port for consoles that need one. N/A N/A CONF console_xvp_multiplex_port N/A setup_console N/A N/A self context console N/A N/A N/A Sets up actual proxies. N/A N/A N/A self _rebuild_xvp_conf N/A N/A context elevated N/A teardown_console N/A N/A self context console N/A N/A N/A Tears down actual proxies. N/A N/A N/A self _rebuild_xvp_conf N/A N/A context elevated N/A init_host N/A N/A self N/A N/A N/A Start up any config'ed consoles on start. N/A ctxt N/A N/A context get_admin_context N/A N/A N/A self _rebuild_xvp_conf ctxt N/A fix_pool_password N/A N/A self password N/A N/A N/A Trim password to length, and encode. N/A N/A N/A self _xvp_encrypt password is_pool_password True N/A fix_console_password N/A N/A self password N/A N/A N/A Trim password to length, and encode. N/A N/A N/A self _xvp_encrypt password N/A _rebuild_xvp_conf N/A N/A self context N/A N/A N/A N/A N/A LOG debug Rebuilding xvp conf N/A pools N/A pool N/A pool N/A N/A db console_pool_get_all_by_host_type context N/A self host N/A self console_type N/A pool N/A consoles N/A N/A pools N/A N/A N/A N/A LOG debug No console pools! N/A N/A N/A self _xvp_stop N/A N/A conf_data N/A multiplex_port pools N/A CONF console_xvp_multiplex_port pools N/A N/A tmpl_path tmpl_file N/A N/A N/A os path split N/A CONF injected_network_template N/A env N/A N/A jinja2 Environment loader N/A N/A jinja2 FileSystemLoader tmpl_path N/A N/A N/A env filters N/A pass_encode N/A self fix_console_password N/A template N/A N/A env get_template tmpl_file N/A N/A N/A self _write_conf N/A N/A template render conf_data N/A N/A N/A self _xvp_restart N/A _write_conf N/A N/A self config N/A N/A N/A N/A N/A N/A N/A LOG debug Re-wrote %s N/A CONF console_xvp_conf N/A N/A open N/A CONF console_xvp_conf w cfile N/A N/A N/A N/A cfile write config N/A N/A N/A IOError N/A N/A N/A N/A excutils save_and_reraise_exception N/A N/A N/A N/A LOG exception N/A _LE Failed to write configuration file N/A _xvp_stop N/A N/A self N/A N/A N/A N/A N/A LOG debug Stopping xvp N/A pid N/A N/A self _xvp_pid N/A N/A pid N/A N/A N/A N/A N/A N/A N/A os kill pid N/A signal SIGTERM N/A N/A N/A OSError N/A N/A N/A _xvp_start N/A N/A self N/A N/A N/A N/A N/A self _xvp_check_running N/A N/A N/A N/A N/A LOG debug Starting xvp N/A N/A N/A N/A N/A utils execute xvp -p N/A CONF console_xvp_pid -c N/A CONF console_xvp_conf -l N/A CONF console_xvp_log N/A N/A N/A N/A processutils ProcessExecutionError N/A err N/A N/A N/A N/A LOG error N/A _LE Error starting xvp: %s err N/A _xvp_restart N/A N/A self N/A N/A N/A N/A N/A LOG debug Restarting xvp N/A N/A N/A N/A self _xvp_check_running N/A N/A N/A N/A LOG debug xvp not running... N/A N/A N/A self _xvp_start N/A N/A pid N/A N/A self _xvp_pid N/A N/A N/A os kill pid N/A signal SIGUSR1 N/A _xvp_pid N/A N/A self N/A N/A N/A N/A N/A N/A open N/A CONF console_xvp_pid r pidfile N/A N/A pid N/A int N/A N/A pidfile read N/A N/A N/A IOError N/A N/A None N/A N/A ValueError N/A N/A None N/A pid N/A _xvp_check_running N/A N/A self N/A N/A N/A pid N/A N/A self _xvp_pid N/A N/A pid N/A N/A False N/A N/A N/A N/A N/A os kill pid 0 N/A N/A N/A OSError N/A N/A False N/A True N/A _xvp_encrypt N/A N/A self password is_pool_password N/A False N/A N/A Call xvp to obfuscate passwords for config file.

        Args:
            - password: the password to encode, max 8 char for vm passwords,
                        and 16 chars for pool passwords. passwords will
                        be trimmed to max len before encoding.
            - is_pool_password: True if this is the XenServer api password
                                False if it's a VM console password
              (xvp uses different keys and max lengths for pool passwords)

        Note that xvp's obfuscation should not be considered 'real' encryption.
        It simply DES encrypts the passwords with static keys plainly viewable
        in the xvp source code.

         N/A maxlen 8 N/A flag -e N/A is_pool_password N/A N/A maxlen 16 N/A flag -x N/A password N/A password N/A maxlen N/A N/A out err N/A N/A utils execute xvp flag process_input password N/A err N/A N/A N/A N/A processutils ProcessExecutionError N/A _ Failed to run xvp. N/A N/A N/A out strip N/A N/A