Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
erp5
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
Bryan Kaperick
erp5
Commits
02c725dc
Commit
02c725dc
authored
Jun 13, 2013
by
Benjamin Blanc
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Update
parent
d906384d
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
4 additions
and
9 deletions
+4
-9
erp5/util/testnode/SlapOSControler.py
erp5/util/testnode/SlapOSControler.py
+4
-9
No files found.
erp5/util/testnode/SlapOSControler.py
View file @
02c725dc
...
@@ -91,13 +91,12 @@ class SlapOSControler(object):
...
@@ -91,13 +91,12 @@ class SlapOSControler(object):
log
(
"%s created."
%
(
str
(
configuration_file_path
)))
log
(
"%s created."
%
(
str
(
configuration_file_path
)))
self
.
configuration_file_path
=
configuration_file_path
self
.
configuration_file_path
=
configuration_file_path
def
supply
(
self
,
software_url
,
computer_id
,
remove
=
False
):
def
supply
(
self
,
software_url
,
computer_id
,
state
=
"available"
):
"""
"""
Request the installation of a software release on a specific node
Request the installation of a software release on a specific node
Ex :
Ex :
my_controler.supply('kvm.cfg', 'COMP-726')
my_controler.supply('kvm.cfg', 'COMP-726')
"""
"""
state
=
"available"
self
.
log
(
'SlapOSControler : supply'
)
self
.
log
(
'SlapOSControler : supply'
)
parser
=
argparse
.
ArgumentParser
()
parser
=
argparse
.
ArgumentParser
()
parser
.
add_argument
(
"configuration_file"
)
parser
.
add_argument
(
"configuration_file"
)
...
@@ -106,15 +105,11 @@ class SlapOSControler(object):
...
@@ -106,15 +105,11 @@ class SlapOSControler(object):
if
os
.
path
.
exists
(
self
.
configuration_file_path
):
if
os
.
path
.
exists
(
self
.
configuration_file_path
):
args
=
parser
.
parse_args
([
self
.
configuration_file_path
,
software_url
,
computer_id
])
args
=
parser
.
parse_args
([
self
.
configuration_file_path
,
software_url
,
computer_id
])
config
=
client
.
Config
()
config
=
client
.
Config
()
# config = client.ClientConfig(args, args.configuration_file)
config
.
setConfig
(
args
,
args
.
configuration_file
)
config
.
setConfig
(
args
,
args
.
configuration_file
)
try
:
try
:
# client.do_supply(args.software_url, args.node, client.init(config), remove=remove)
#client.do_supply(software_url, computer_id,
# client.init(config).shorthandSupply(args.software_url, args.node, client.init(config), remove=remove)
local
=
client
.
init
(
config
)
local
=
client
.
init
(
config
)
local
[
'supply'
](
software_url
,
computer_id
)
local
[
'supply'
](
software_url
,
computer_id
,
state
)
self
.
log
(
'SlapOSControler : supply %s %s
'
%
(
software_url
,
computer_id
))
self
.
log
(
'SlapOSControler : supply %s %s
%s'
%
(
software_url
,
computer_id
,
state
))
except
:
except
:
self
.
log
(
"SlapOSControler.supply,
\
self
.
log
(
"SlapOSControler.supply,
\
exception in registerOpenOrder"
,
exc_info
=
sys
.
exc_info
())
exception in registerOpenOrder"
,
exc_info
=
sys
.
exc_info
())
...
@@ -128,7 +123,7 @@ class SlapOSControler(object):
...
@@ -128,7 +123,7 @@ class SlapOSControler(object):
Ex :
Ex :
my_controler.destroy('kvm.cfg', 'COMP-726')
my_controler.destroy('kvm.cfg', 'COMP-726')
"""
"""
self
.
supply
(
self
,
software_url
,
computer_id
,
remove
=
True
)
self
.
supply
(
self
,
software_url
,
computer_id
,
state
=
"destroyed"
)
def
request
(
self
,
reference
,
def
request
(
self
,
reference
,
software_url
,
software_type
,
software_configuration
,
computer_guid
=
None
):
software_url
,
software_type
,
software_configuration
,
computer_guid
=
None
):
...
...
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