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
Labels
Merge Requests
107
Merge Requests
107
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Analytics
Analytics
CI / CD
Repository
Value Stream
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Jobs
Commits
Open sidebar
nexedi
slapos
Commits
b493ca7c
Commit
b493ca7c
authored
Jul 02, 2012
by
Cédric de Saint Martin
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Add default software type in libslap
parent
16765399
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
9 additions
and
0 deletions
+9
-0
slapos/slap/slap.py
slapos/slap/slap.py
+9
-0
No files found.
slapos/slap/slap.py
View file @
b493ca7c
...
...
@@ -42,6 +42,8 @@ import zope.interface
Simple, easy to (un)marshall classes for slap client/server communication
"""
DEFAULT_SOFTWARE_TYPE
=
'default'
# httplib.HTTPSConnection with key verification
class
HTTPSConnectionCA
(
httplib
.
HTTPSConnection
):
"""Patched version of HTTPSConnection which verifies server certificate"""
...
...
@@ -181,6 +183,9 @@ class OpenOrder(SlapDocument):
}
if
software_type
is
not
None
:
request_dict
[
'software_type'
]
=
software_type
else
:
# Let's enforce a default software type
request_dict
[
'software_type'
]
=
DEFAULT_SOFTWARE_TYPE
try
:
self
.
_connection_helper
.
POST
(
'/requestComputerPartition'
,
request_dict
)
except
ResourceNotReady
:
...
...
@@ -359,6 +364,10 @@ class ComputerPartition(SlapDocument):
raise
ValueError
(
"Unexpected type of filter_kw '%s'"
%
\
filter_kw
)
# Let enforce a default software type
if
software_type
is
None
:
software_type
=
DEFAULT_SOFTWARE_TYPE
request_dict
=
{
'computer_id'
:
self
.
_computer_id
,
'computer_partition_id'
:
self
.
_partition_id
,
'software_release'
:
software_release
,
...
...
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