¡@

Home 

OpenStack Study: spicehtml5proxy.py

OpenStack Index

**** CubicPower OpenStack Study ****

def main():

    # Setup flags

    config.parse_args(sys.argv)

    if CONF.ssl_only and not os.path.exists(CONF.cert):

        print("SSL only and %s not found." % CONF.cert)

        return(-1)

    # Check to see if spice html/js/css files are present

    if not os.path.exists(CONF.web):

        print("Can not find spice html/js/css files at %s." % CONF.web)

        return(-1)

    gmr.TextGuruMeditation.setup_autorun(version)

    # Create and start the NovaWebSockets proxy

    server = websocketproxy.NovaWebSocketProxy(

                                   listen_host=CONF.spicehtml5proxy_host,

                                   listen_port=CONF.spicehtml5proxy_port,

                                   source_is_ipv6=CONF.source_is_ipv6,

                                   verbose=CONF.verbose,

                                   cert=CONF.cert,

                                   key=CONF.key,

                                   ssl_only=CONF.ssl_only,

                                   daemon=CONF.daemon,

                                   record=CONF.record,

                                   web=CONF.web,

                                   target_host='ignore',

                                   target_port='ignore',

                                   wrap_mode='exit',

                                   wrap_cmd=None)

    server.start_server()