Optionally install the supplemental pack
Add a checkbox to the UI that allows the user to state that the supplemental pack need not be installed Change-Id: I82081e82cd9666a8b2e4af381b6fb203f2f03ffb
This commit is contained in:
parent
e68a139461
commit
561b715d14
|
@ -66,16 +66,18 @@ def get_astute(astute_path):
|
|||
return astute
|
||||
|
||||
|
||||
def get_access(astute, access_section):
|
||||
def get_options(astute, astute_section):
|
||||
"""Return username and password filled in plugin."""
|
||||
if not access_section in astute:
|
||||
warning('%s not found' % access_section)
|
||||
if not astute_section in astute:
|
||||
warning('%s not found' % astute_section)
|
||||
return None, None
|
||||
|
||||
access = astute[access_section]
|
||||
info('username: {username}'.format(**access))
|
||||
info('password: {password}'.format(**access))
|
||||
return access['username'], access['password']
|
||||
options = astute[astute_section]
|
||||
info('username: {username}'.format(**options))
|
||||
info('password: {password}'.format(**options))
|
||||
info('install_xapi: {install_xapi}'.format(**options))
|
||||
return options['username'], options['password'], \
|
||||
options['install_xapi']
|
||||
|
||||
|
||||
def get_endpoints(astute):
|
||||
|
@ -233,13 +235,14 @@ if __name__ == '__main__':
|
|||
install_xenapi_sdk()
|
||||
astute = get_astute(ASTUTE_PATH)
|
||||
if astute:
|
||||
username, password = get_access(astute, ACCESS_SECTION)
|
||||
username, password, install_xapi = get_options(astute, ASTUTE_SECTION)
|
||||
endpoints = get_endpoints(astute)
|
||||
eth, himn_local, himn_xs = init_eth()
|
||||
if username and password and endpoints and himn_local and himn_xs:
|
||||
route_to_compute(
|
||||
endpoints, himn_xs, himn_local, username, password)
|
||||
install_suppack(himn_xs, username, password)
|
||||
if install_xapi:
|
||||
install_suppack(himn_xs, username, password)
|
||||
forward_from_himn(eth)
|
||||
create_novacompute_conf(himn_xs, username, password)
|
||||
restart_nova_services()
|
||||
|
|
|
@ -31,6 +31,8 @@ Select Environment
|
|||
.. image:: images/fmsetting00.png
|
||||
:width: 80%
|
||||
|
||||
#. If the XenServer host already has compatible Nova plugins installed, untick the checkbox to install the supplemental packs. In normal cases, the XenServer host will not have compatible Nova plugins installed, so leave the checkbox enabled
|
||||
|
||||
|
||||
Finish environment configuration
|
||||
--------------------------------
|
||||
|
|
File diff suppressed because one or more lines are too long
|
@ -3,14 +3,20 @@ attributes:
|
|||
value: 'root'
|
||||
label: 'Username'
|
||||
description: ''
|
||||
weight: 25
|
||||
weight: 10
|
||||
type: "text"
|
||||
password:
|
||||
value: ''
|
||||
label: 'Password'
|
||||
description: ''
|
||||
weight: 25
|
||||
weight: 20
|
||||
type: "password"
|
||||
regex:
|
||||
source: '\S'
|
||||
error: "Password cannot be empty"
|
||||
error: "Password cannot be empty"
|
||||
install_xapi:
|
||||
value: true
|
||||
label: 'Install Nova Plugins'
|
||||
description: ''
|
||||
weight: 30
|
||||
type: "checkbox"
|
Loading…
Reference in New Issue