Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
S
slapos.core
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
Nicolas Wavrant
slapos.core
Commits
34a9e7ae
Commit
34a9e7ae
authored
Jan 28, 2013
by
Marco Mariani
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
keep running if cp.error() or sr.error() have issues (fixes 20130119-744D94)
parent
47723afa
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
24 additions
and
12 deletions
+24
-12
slapos/slap/slap.py
slapos/slap/slap.py
+24
-12
No files found.
slapos/slap/slap.py
View file @
34a9e7ae
...
...
@@ -26,6 +26,10 @@
# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
#
##############################################################################
"""
Simple, easy to (un)marshall classes for slap client/server communication
"""
__all__
=
[
"slap"
,
"ComputerPartition"
,
"Computer"
,
"SoftwareRelease"
,
"Supply"
,
"OpenOrder"
,
"NotFoundError"
,
"Unauthorized"
,
"ResourceNotReady"
,
"ServerError"
]
...
...
@@ -33,15 +37,15 @@ __all__ = ["slap", "ComputerPartition", "Computer", "SoftwareRelease",
from
interface
import
slap
as
interface
from
xml_marshaller
import
xml_marshaller
import
httplib
import
logging
import
socket
import
ssl
import
traceback
import
urllib
import
urlparse
import
zope.interface
"""
Simple, easy to (un)marshall classes for slap client/server communication
"""
log
=
logging
.
getLogger
(
__name__
)
DEFAULT_SOFTWARE_TYPE
=
'default'
...
...
@@ -109,11 +113,15 @@ class SoftwareRelease(SlapDocument):
return
self
.
_software_release
def
error
(
self
,
error_log
):
try
:
# Does not follow interface
self
.
_connection_helper
.
POST
(
'/softwareReleaseError'
,
{
'url'
:
self
.
getURI
(),
'computer_id'
:
self
.
getComputerId
(),
'error_log'
:
error_log
})
except
Exception
:
exception
=
traceback
.
format_exc
()
log
.
error
(
exception
)
def
available
(
self
):
self
.
_connection_helper
.
POST
(
'/availableSoftwareRelease'
,
{
...
...
@@ -469,10 +477,14 @@ class ComputerPartition(SlapDocument):
})
def
error
(
self
,
error_log
):
try
:
self
.
_connection_helper
.
POST
(
'/softwareInstanceError'
,
{
'computer_id'
:
self
.
_computer_id
,
'computer_partition_id'
:
self
.
getId
(),
'error_log'
:
error_log
})
except
Exception
:
exception
=
traceback
.
format_exc
()
log
.
error
(
exception
)
def
bang
(
self
,
message
):
self
.
_connection_helper
.
POST
(
'/softwareInstanceBang'
,
{
...
...
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