Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
slapos
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Analytics
Analytics
CI / CD
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Stephane VAROQUI
slapos
Commits
d7d73317
Commit
d7d73317
authored
Apr 11, 2012
by
Cédric de Saint Martin
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
accords : Add testos debug utility
parent
a1240c08
Changes
4
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
48 additions
and
30 deletions
+48
-30
slapos/recipe/accords/__init__.py
slapos/recipe/accords/__init__.py
+25
-19
slapos/recipe/accords/template/os_config.xml.in
slapos/recipe/accords/template/os_config.xml.in
+3
-3
slapos/recipe/accords/template/testos.in
slapos/recipe/accords/template/testos.in
+10
-0
stack/accords/instance-accords.cfg
stack/accords/instance-accords.cfg
+10
-8
No files found.
slapos/recipe/accords/__init__.py
View file @
d7d73317
...
@@ -35,15 +35,29 @@ class Recipe(GenericSlapRecipe):
...
@@ -35,15 +35,29 @@ class Recipe(GenericSlapRecipe):
path_list
=
[]
path_list
=
[]
poc_location
=
self
.
buildout
[
'pocdirectory'
][
'poc'
]
poc_location
=
self
.
buildout
[
'pocdirectory'
][
'poc'
]
# Generate os-config.xml
parameter_dict
=
dict
(
os_configuration_parameter_dict
=
dict
(
userid
=
self
.
options
[
'userid'
],
userid
=
self
.
options
[
'userid'
],
password
=
self
.
options
[
'password'
],
password
=
self
.
options
[
'password'
],
domain
=
self
.
options
[
'domain'
],
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'
],
os_config_file
=
self
.
createFile
(
self
.
options
[
'os-config'
],
self
.
substituteTemplate
(
self
.
getTemplateFilename
(
'os_config.xml.in'
),
self
.
substituteTemplate
(
self
.
getTemplateFilename
(
'os_config.xml.in'
),
os_configuration_
parameter_dict
))
parameter_dict
))
path_list
.
append
(
os_config_file
)
path_list
.
append
(
os_config_file
)
# Put modified accords configuration file
# Put modified accords configuration file
...
@@ -69,24 +83,16 @@ class Recipe(GenericSlapRecipe):
...
@@ -69,24 +83,16 @@ class Recipe(GenericSlapRecipe):
path_list
.
append
(
manifest_location
)
path_list
.
append
(
manifest_location
)
# Generate wrapper
# 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'
],
wrapper_location
=
self
.
createPythonScript
(
self
.
options
[
'accords-wrapper'
],
'%s.accords.runAccords'
%
__name__
,
'%s.accords.runAccords'
%
__name__
,
wrapper_config
_dict
)
parameter
_dict
)
path_list
.
append
(
wrapper_location
)
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
return
path_list
slapos/recipe/accords/template/os_config.xml.in
View file @
d7d73317
<os_configs>
<os_configs>
<os_config
<os_config
id="e1f892e3-slap-slap-slap-9354b95d3b17"
id="e1f892e3-slap-slap-slap-9354b95d3b17"
name="slaposrecipe"
name="slaposrecipe"
description="Configuration of Account used by slapos recipe"
description="Configuration of Account used by slapos recipe"
user="%(userid)s"
user="%(userid)s"
password="%(password)s"
password="%(password)s"
authenticate=""
authenticate=""
agent="CompatibleOne/OpenStackClient/1.0a.0.01"
agent="CompatibleOne/OpenStackClient/1.0a.0.01"
host="
http://beta.enocloud.com:5000/v2.0/
"
host="
%(openstack_url)s
"
version="v1.1"
version="v1.1"
namespace="%(domain)s"
namespace="%(domain)s"
base=""
base=""
...
...
slapos/recipe/accords/template/testos.in
0 → 100644
View file @
d7d73317
#!/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
stack/accords/instance-accords.cfg
View file @
d7d73317
...
@@ -9,7 +9,7 @@ offline = true
...
@@ -9,7 +9,7 @@ offline = true
#[url]
#[url]
#recipe = slapos.cookbook:publishurl
#recipe = slapos.cookbook:publishurl
#url =
#url =
[accords-instance]
[accords-instance]
recipe = slapos.cookbook:accords
recipe = slapos.cookbook:accords
...
@@ -21,6 +21,7 @@ domain = domain
...
@@ -21,6 +21,7 @@ domain = domain
#userid = $${slap-parameter:userid}
#userid = $${slap-parameter:userid}
#password = $${slap-parameter:password}
#password = $${slap-parameter:password}
#domain = $${slap-parameter:domain}
#domain = $${slap-parameter:domain}
openstack_url = http://beta.enocloud.com:5000/v2.0/
os-config = $${pocdirectory:poc}/os_config.xml
os-config = $${pocdirectory:poc}/os_config.xml
listen-ip = $${slap-network-information:local-ipv4}
listen-ip = $${slap-network-information:local-ipv4}
...
@@ -30,6 +31,7 @@ manifest-source = ${accords-manifest:target}
...
@@ -30,6 +31,7 @@ manifest-source = ${accords-manifest:target}
manifest-destination = $${pocdirectory:poc}/manifest.xml
manifest-destination = $${pocdirectory:poc}/manifest.xml
manifest-name = manifest
manifest-name = manifest
accords-wrapper = $${basedirectory:services}/accords
accords-wrapper = $${basedirectory:services}/accords
testos-wrapper = $${rootdirectory:bin}/testos
# Workaround
# Workaround
accords_lib_directory : ${accords:location}/lib
accords_lib_directory : ${accords:location}/lib
accords_bin_directory : ${accords:location}/bin
accords_bin_directory : ${accords:location}/bin
...
@@ -71,18 +73,18 @@ file-list =
...
@@ -71,18 +73,18 @@ file-list =
${accords-scripts:location}/scripts/co-stop
${accords-scripts:location}/scripts/co-stop
${accords-scripts:location}/scripts/run-azprocci
${accords-scripts:location}/scripts/run-azprocci
${accords-scripts:location}/scripts/run-broker
${accords-scripts:location}/scripts/run-broker
${accords-scripts:location}/scripts/run-coees
${accords-scripts:location}/scripts/run-coees
${accords-scripts:location}/scripts/run-coes
${accords-scripts:location}/scripts/run-coes
${accords-scripts:location}/scripts/run-coips
${accords-scripts:location}/scripts/run-coips
${accords-scripts:location}/scripts/run-comons
${accords-scripts:location}/scripts/run-comons
${accords-scripts:location}/scripts/run-conets
${accords-scripts:location}/scripts/run-conets
${accords-scripts:location}/scripts/run-coobas
${accords-scripts:location}/scripts/run-coobas
${accords-scripts:location}/scripts/run-cosacs
${accords-scripts:location}/scripts/run-cosacs
${accords-scripts:location}/scripts/run-coss
${accords-scripts:location}/scripts/run-coss
${accords-scripts:location}/scripts/run-ezvm
${accords-scripts:location}/scripts/run-ezvm
${accords-scripts:location}/scripts/run-fileserver
${accords-scripts:location}/scripts/run-fileserver
${accords-scripts:location}/scripts/run-onprocci
${accords-scripts:location}/scripts/run-onprocci
${accords-scripts:location}/scripts/run-osprocci
${accords-scripts:location}/scripts/run-osprocci
${accords-scripts:location}/scripts/run-parser
${accords-scripts:location}/scripts/run-parser
${accords-scripts:location}/scripts/run-procci
${accords-scripts:location}/scripts/run-procci
${accords-scripts:location}/scripts/run-publisher
${accords-scripts:location}/scripts/run-publisher
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment