Commit 2bfe175c authored by Romain Courteaud's avatar Romain Courteaud Committed by Sebastien Robin

Do not return unexpected details

parent feead756
...@@ -72,12 +72,14 @@ bt5_list = portal.portal_templates.resolveBusinessTemplateListDependency(bt5.spl ...@@ -72,12 +72,14 @@ bt5_list = portal.portal_templates.resolveBusinessTemplateListDependency(bt5.spl
severity = len(bt5_list)\n severity = len(bt5_list)\n
if severity == 0:\n if severity == 0:\n
summary = "Nothing to do."\n summary = "Nothing to do."\n
detail = "Needed to install %s" % \', \'.join([x[1] for x in bt5_list])\n
else:\n else:\n
summary = "Upgrade needed"\n summary = "Upgrade needed"\n
detail = ""\n
active_result.edit(\n active_result.edit(\n
summary=summary, \n summary=summary, \n
severity=severity, \n severity=severity,\n
detail="Needed to install %s" % \', \'.join([x[1] for x in bt5_list]))\n detail=detail)\n
\n \n
context.newActiveProcess().postResult(active_result)\n context.newActiveProcess().postResult(active_result)\n
</string> </value> </string> </value>
......
...@@ -66,14 +66,17 @@ active_result = ActiveResult()\n ...@@ -66,14 +66,17 @@ active_result = ActiveResult()\n
if promise_url != url:\n if promise_url != url:\n
severity = 1\n severity = 1\n
summary = "Conversion Server not configured as expected"\n summary = "Conversion Server not configured as expected"\n
detail = "Expect %s\\nGot %s" % (promise_url, url)\n
else:\n else:\n
severity = 0\n severity = 0\n
summary = "Nothing to do."\n summary = "Nothing to do."\n
detail = ""\n
\n \n
active_result.edit(\n active_result.edit(\n
summary=summary, \n summary=summary, \n
severity=severity, \n severity=severity, \n
detail="Expect %s\\nGot %s" % (promise_url, url))\n detail=detail)\n
\n
\n \n
context.newActiveProcess().postResult(active_result)\n context.newActiveProcess().postResult(active_result)\n
</string> </value> </string> </value>
......
...@@ -58,7 +58,9 @@ promise_url = portal.getPromiseParameter(\'external_service\', \'kumofs_url\')\n ...@@ -58,7 +58,9 @@ promise_url = portal.getPromiseParameter(\'external_service\', \'kumofs_url\')\n
if promise_url is None:\n if promise_url is None:\n
return\n return\n
\n \n
plugin = portal.portal_memcached.persistent_memcached_plugin\n plugin = portal.portal_memcached.restrictedTraverse("persistent_memcached_plugin", None)\n
if plugin is None:\n
return\n
\n \n
url = "memcached://%s/" % plugin.getUrlString()\n url = "memcached://%s/" % plugin.getUrlString()\n
\n \n
......
...@@ -77,14 +77,16 @@ active_result = ActiveResult()\n ...@@ -77,14 +77,16 @@ active_result = ActiveResult()\n
if promise_url != url:\n if promise_url != url:\n
severity = 1\n severity = 1\n
summary = "SMTP Server not configured as expected"\n summary = "SMTP Server not configured as expected"\n
detail = "Expect %s\\nGot %s" % (promise_url, url)\n
else:\n else:\n
severity = 0\n severity = 0\n
summary = "Nothing to do."\n summary = "Nothing to do."\n
detail = ""\n
\n \n
active_result.edit(\n active_result.edit(\n
summary=summary, \n summary=summary, \n
severity=severity, \n severity=severity, \n
detail="Expect %s\\nGot %s" % (promise_url, url))\n detail=detail)\n
\n \n
context.newActiveProcess().postResult(active_result)\n context.newActiveProcess().postResult(active_result)\n
</string> </value> </string> </value>
......
...@@ -67,14 +67,17 @@ active_result = ActiveResult()\n ...@@ -67,14 +67,17 @@ active_result = ActiveResult()\n
if promise_url != url:\n if promise_url != url:\n
severity = 1\n severity = 1\n
summary = "Memcached not configured as expected"\n summary = "Memcached not configured as expected"\n
detail = "Expect %s\\nGot %s" % (promise_url, url)\n
else:\n else:\n
severity = 0\n severity = 0\n
summary = "Nothing to do."\n summary = "Nothing to do."\n
detail = ""\n
\n \n
active_result.edit(\n active_result.edit(\n
summary=summary, \n summary=summary, \n
severity=severity, \n severity=severity,\n
detail="Expect %s\\nGot %s" % (promise_url, url))\n detail=detail)\n
\n
\n \n
context.newActiveProcess().postResult(active_result)\n context.newActiveProcess().postResult(active_result)\n
</string> </value> </string> </value>
......
...@@ -72,14 +72,17 @@ active_result = ActiveResult()\n ...@@ -72,14 +72,17 @@ active_result = ActiveResult()\n
if repository_list != promise_repository_list:\n if repository_list != promise_repository_list:\n
severity = 1\n severity = 1\n
summary = "Template tool not configured as expected"\n summary = "Template tool not configured as expected"\n
detail = \'\\n\'.join(promise_repository_list)\n
else:\n else:\n
severity = 0\n severity = 0\n
summary = "Nothing to do."\n summary = "Nothing to do."\n
detail = ""\n
\n \n
active_result.edit(\n active_result.edit(\n
summary=summary, \n summary=summary, \n
severity=severity, \n severity=severity,\n
detail=\'\\n\'.join(promise_repository_list))\n detail=detail)\n
\n
\n \n
context.newActiveProcess().postResult(active_result)\n context.newActiveProcess().postResult(active_result)\n
</string> </value> </string> </value>
......
1 2
\ No newline at end of file \ No newline at end of file
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