Merge "Add function to get the console info from ironic"

This commit is contained in:
Jenkins
2017-03-30 03:51:23 +00:00
committed by Gerrit Code Review
7 changed files with 212 additions and 0 deletions

View File

@@ -25,6 +25,7 @@ from mogan.conf import keystone
from mogan.conf import neutron
from mogan.conf import quota
from mogan.conf import scheduler
from mogan.conf import shellinabox
CONF = cfg.CONF
@@ -38,3 +39,4 @@ keystone.register_opts(CONF)
neutron.register_opts(CONF)
quota.register_opts(CONF)
scheduler.register_opts(CONF)
shellinabox.register_opts(CONF)

66
mogan/conf/shellinabox.py Normal file
View File

@@ -0,0 +1,66 @@
# Copyright 2015 OpenStack Foundation
# All Rights Reserved.
#
# Licensed under the Apache License, Version 2.0 (the "License"); you may
# not use this file except in compliance with the License. You may obtain
# a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
# WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
# License for the specific language governing permissions and limitations
# under the License.
from oslo_config import cfg
shellinabox_opt_group = cfg.OptGroup("shellinabox_console",
title="The shellinabox console feature",
help="""
The shellinabox console feature allows you to connect to a guest in case a
graphical console like VNC, RDP or SPICE is not available. This is only
currently supported for the Ironic driver.""")
shellinabox_base_url_opt = cfg.URIOpt('shellinabox_base_url',
default='http://127.0.0.1:8866/',
help="""
The URL an end user would use to connect to the ``mogan-shellinaboxproxy``
service.
The ``mogan-shellinaboxproxy`` service is called with this token enriched URL
and establishes the connection to the proper instance.
Possible values:
* <scheme><IP-address><port-number>
Services which consume this:
* ``mogan-engine``
Interdependencies to other options:
* The IP address must be identical to the address to which the
``mogan-shellinaboxproxy`` service is listening (see option
``shellinaboxproxy_host``in this section).
* The port must be the same as in the option ``shellinaboxproxy_port`` of this
section.
""")
ALL_OPTS = [shellinabox_base_url_opt]
def register_opts(conf):
conf.register_group(shellinabox_opt_group)
conf.register_opts(ALL_OPTS, group=shellinabox_opt_group)
def register_cli_opts(conf):
conf.register_group(shellinabox_opt_group)
conf.register_cli_opts(ALL_OPTS, shellinabox_opt_group)
def list_opts():
return {shellinabox_opt_group: ALL_OPTS}