accords : Add testos debug utility

parent a1240c08
......@@ -35,15 +35,29 @@ class Recipe(GenericSlapRecipe):
path_list = []
poc_location = self.buildout['pocdirectory']['poc']
# Generate os-config.xml
os_configuration_parameter_dict = dict(
parameter_dict = dict(
userid=self.options['userid'],
password=self.options['password'],
domain=self.options['domain'],
openstack_url=self.options['openstack_url'],
python_location=sys.executable,
poc_location=poc_location,
manifest_name=self.options['manifest-name'],
# XXX this is workaround
accords_lib_directory=self.options['accords_lib_directory'],
computer_id = self.computer_id,
computer_partition_id = self.computer_partition_id,
server_url = self.server_url,
software_release_url = self.software_release_url,
key_file = self.key_file,
cert_file = self.cert_file,
path = '%s:%s' % (self.options['accords_bin_directory'],
os.environ.get('PATH', '')),
)
# Generate os-config.xml
os_config_file = self.createFile(self.options['os-config'],
self.substituteTemplate(self.getTemplateFilename('os_config.xml.in'),
os_configuration_parameter_dict))
parameter_dict))
path_list.append(os_config_file)
# Put modified accords configuration file
......@@ -69,24 +83,16 @@ class Recipe(GenericSlapRecipe):
path_list.append(manifest_location)
# Generate wrapper
wrapper_config_dict = dict(
python_location=sys.executable,
poc_location=poc_location,
manifest_name=self.options['manifest-name'],
# XXX this is workaround
accords_lib_directory=self.options['accords_lib_directory'],
computer_id = self.computer_id,
computer_partition_id = self.computer_partition_id,
server_url = self.server_url,
software_release_url = self.software_release_url,
key_file = self.key_file,
cert_file = self.cert_file,
path = '%s:%s' % (self.options['accords_bin_directory'],
os.environ.get('PATH', '')),
)
wrapper_location = self.createPythonScript(self.options['accords-wrapper'],
'%s.accords.runAccords' % __name__,
wrapper_config_dict)
parameter_dict)
path_list.append(wrapper_location)
# Generate helper for debug
self.createExecutable(
self.options['testos-wrapper'],
self.substituteTemplate(self.getTemplateFilename('testos.in'),
parameter_dict)
)
return path_list
......@@ -7,7 +7,7 @@
password="%(password)s"
authenticate=""
agent="CompatibleOne/OpenStackClient/1.0a.0.01"
host="http://beta.enocloud.com:5000/v2.0/"
host="%(openstack_url)s"
version="v1.1"
namespace="%(domain)s"
base=""
......
#!/bin/sh
export PATH=%(path)s
export ENO_HOST=%(openstack_url)s
export ENO_USER=%(userid)s
export ENO_PASS=%(password)s
export ENO_VERSION=v1.1
testos --host $ENO_HOST --password $ENO_PASS --user $ENO_USER --version $ENO_VERSION $1 $2 $3 $4 $5 $6 $7
......@@ -21,6 +21,7 @@ domain = domain
#userid = $${slap-parameter:userid}
#password = $${slap-parameter:password}
#domain = $${slap-parameter:domain}
openstack_url = http://beta.enocloud.com:5000/v2.0/
os-config = $${pocdirectory:poc}/os_config.xml
listen-ip = $${slap-network-information:local-ipv4}
......@@ -30,6 +31,7 @@ manifest-source = ${accords-manifest:target}
manifest-destination = $${pocdirectory:poc}/manifest.xml
manifest-name = manifest
accords-wrapper = $${basedirectory:services}/accords
testos-wrapper = $${rootdirectory:bin}/testos
# Workaround
accords_lib_directory : ${accords:location}/lib
accords_bin_directory : ${accords:location}/bin
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment