Move textfield back to plugin

This commit is contained in:
John Hua 2015-07-30 17:03:06 +08:00
parent be59a64692
commit d01d50b392
3 changed files with 16 additions and 19 deletions

View File

@ -10,7 +10,7 @@ from tempfile import mkstemp, mkdtemp
LOG_FILE = '/tmp/compute_post_deployment.log'
ASTUTE_PATH = '/etc/astute.yaml'
ACCESS_SECTION = 'xenserver_access'
ACCESS_SECTION = 'xen-fuel-plugin'
XENAPI_URL = 'https://pypi.python.org/packages/source/X/XenAPI/XenAPI-1.2.tar.gz'
logging.basicConfig(filename=LOG_FILE,level=logging.DEBUG)
@ -26,7 +26,7 @@ def get_access(astute_path, access_section):
return None
access = astute[access_section]
info('username: {user}'.format(**access))
info('username: {username}'.format(**access))
info('password: {password}'.format(**access))
return access
@ -71,7 +71,7 @@ def create_novacompute_conf(access):
compute_driver=xenapi.XenAPIDriver
[xenserver]
connection_url=http://169.254.0.1
connection_username={user}
connection_username={username}
connection_password={password}
"""
s = template.format(**access)

View File

@ -0,0 +1,13 @@
attributes:
username:
value: 'root'
label: 'Username'
description: ''
weight: 25
type: "text"
password:
value: ''
label: 'Password'
description: ''
weight: 25
type: "text"

View File

@ -100,22 +100,6 @@
kernel_params:
kernel:
value: "console=ttyS0,9600 console=tty0 net.ifnames=0 biosdevname=0 rootdelay=90 nomodeset"
xenserver_access:
metadata:
label: "Xenserver Access"
weight: 10
user:
value: "root"
label: "Username"
description: "Username for Xenserver"
weight: 10
type: "text"
password:
value: ""
label: "Password"
description: "Password for Xenserver"
weight: 20
type: "password"
repo_setup:
metadata:
label: "Repositories"