Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
S
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
5
Merge Requests
5
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Analytics
Analytics
CI / CD
Repository
Value Stream
Wiki
Wiki
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Jérome Perrin
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
Show 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
...
@@ -7,7 +7,7 @@
...
@@ -7,7 +7,7 @@
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
...
@@ -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
...
...
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