Commit 94146a07 authored by Alain Takoudjou's avatar Alain Takoudjou Committed by Rafael Monnerat

SlapOSRestAPIV1: Also return status for Software Installation

parent d479f1bb
...@@ -609,12 +609,13 @@ class StatusPublisher(GenericPublisher): ...@@ -609,12 +609,13 @@ class StatusPublisher(GenericPublisher):
kw = dict( kw = dict(
validation_state="validated", validation_state="validated",
portal_type=['Computer', 'Software Instance'] portal_type=['Computer', 'Software Installation', 'Software Instance']
) )
d = {"list": []} d = {"list": []}
a = d['list'].append a = d['list'].append
for si in self.getPortalObject().portal_catalog(**kw): for si in self.getPortalObject().portal_catalog(**kw):
if si.getPortalType() == "Software Instance" and \ if (si.getPortalType() == "Software Instance" or \
si.getPortalType() == "Software Installation") and \
si.getSlapState() not in ['start_requested','stop_requested']: si.getSlapState() not in ['start_requested','stop_requested']:
continue continue
if si.getPortalType() == "Computer" and \ if si.getPortalType() == "Computer" and \
...@@ -635,7 +636,7 @@ class StatusPublisher(GenericPublisher): ...@@ -635,7 +636,7 @@ class StatusPublisher(GenericPublisher):
return self.REQUEST.response return self.REQUEST.response
# XXX Use a decated document to keep the history # XXX Use a decated document to keep the history
@extractDocument(['Computer', 'Software Instance']) @extractDocument(['Computer', 'Software Installation', 'Software Instance'])
# @supportModifiedSince('document_url') # @supportModifiedSince('document_url')
def __status_info(self): def __status_info(self):
certificate = False certificate = False
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment