summaryrefslogtreecommitdiffstats
path: root/platform-logic/lcm/src/main/xml
diff options
context:
space:
mode:
authorEnbo Wang <wangenbo@huawei.com>2019-05-09 15:28:55 +0000
committerEnbo Wang <wangenbo@huawei.com>2019-05-10 03:37:15 +0000
commitef1336a6cbd9cd2c417bebe03ac4fb7b8d328cfa (patch)
treea1cbc1245a71b8a9d3c7be7f0d0d1cc295fbd817 /platform-logic/lcm/src/main/xml
parentffebda5919ae6d309620bc0d0f188a49d3d75edc (diff)
Revert deleted payload in SW upgrade DGs
Change-Id: Ic951cea8aa91c2c311ccab731eac1f579dccff00 Issue-ID: SDNC-746 Signed-off-by: Enbo Wang <wangenbo@huawei.com> Former-commit-id: 73657078060445739c1a5c05e031a8216f8c87dd
Diffstat (limited to 'platform-logic/lcm/src/main/xml')
-rw-r--r--platform-logic/lcm/src/main/xml/LCM_upgrade-post-check.xml216
-rw-r--r--platform-logic/lcm/src/main/xml/LCM_upgrade-pre-check.xml216
2 files changed, 348 insertions, 84 deletions
diff --git a/platform-logic/lcm/src/main/xml/LCM_upgrade-post-check.xml b/platform-logic/lcm/src/main/xml/LCM_upgrade-post-check.xml
index 4a88aac4..b22f4715 100644
--- a/platform-logic/lcm/src/main/xml/LCM_upgrade-post-check.xml
+++ b/platform-logic/lcm/src/main/xml/LCM_upgrade-post-check.xml
@@ -11,6 +11,7 @@
<parameter name='status.code' value='200' />
<parameter name='status.message' value='unexpected return from DG' />
<parameter name='quote' value="'" />
+ <parameter name='outputPayloadField' value='.Output' />
</set>
<execute plugin='org.onap.ccsdk.sli.core.slipluginutils.SliPluginUtils' method='jsonStringToCtx'>
<parameter name='source' value='upgrade-post-check-input.payload' />
@@ -22,6 +23,7 @@
<set>
<parameter name='nodelist' value="`'[' + $quote + $payloadJson.ipaddress-v4-oam + $quote + ']'`"/>
<parameter name='playbookname' value='`$prop.lcm.pnf.upgrade-post-check.playbookname`'/>
+ <parameter name='outputPayloadField' value="`'.' + $payloadJson.ipaddress-v4-oam + '.Output'`"/>
</set>
</outcome>
<outcome value='Other'>
@@ -270,23 +272,56 @@
<parameter name='PlaybookName' value='`$playbookname`'/>
<outcome value='failure'>
<block>
- <set>
- <parameter name='lcm-dmaap.version' value='`$prop.lcm.dmaap.version`'/>
- <parameter name='lcm-dmaap.correlation-id' value="`$upgrade-post-check-input.common-header.request-id + '-' + $upgrade-post-check-input.common-header.sub-request-id`"/>
- <parameter name='lcm-dmaap.partition' value='`$prop.lcm.dmaap.partition`'/>
- <parameter name='lcm-dmaap.rpc-name' value='upgrade-post-check'/>
- <parameter name='lcm-dmaap.type' value='`$prop.lcm.dmaap.type`'/>
- <parameter name='lcm-dmaap.timestamp' value='`$upgrade-post-check-input.common-header.timestamp`'/>
- <parameter name='lcm-dmaap.api-ver' value='`$upgrade-post-check-input.common-header.api-ver`'/>
- <parameter name='lcm-dmaap.originator-id' value='`$upgrade-post-check-input.common-header.originator-id`'/>
- <parameter name='lcm-dmaap.request-id' value='`$upgrade-post-check-input.common-header.request-id`'/>
- <parameter name='lcm-dmaap.sub-request-id' value='`$upgrade-post-check-input.common-header.sub-request-id`'/>
- <parameter name='lcm-dmaap.flags.mode' value='`$upgrade-post-check-input.common-header.flags.mode`'/>
- <parameter name='lcm-dmaap.flags.force' value='`$upgrade-post-check-input.common-header.flags.force`'/>
- <parameter name='lcm-dmaap.flags.ttl' value='`$upgrade-post-check-input.common-header.flags.ttl`'/>
- <parameter name='lcm-dmaap.status.code' value='`$org.onap.appc.adapter.ansible.result.code`' />
- <parameter name='lcm-dmaap.status.message' value='`$org.onap.appc.adapter.ansible.message`'/>
- </set>
+ <execute plugin='org.onap.ccsdk.sli.core.slipluginutils.SliPluginUtils' method='jsonStringToCtx'>
+ <parameter name='source' value='org.onap.appc.adapter.ansible.results' />
+ <parameter name='outputPath' value='resultsJson' />
+ <parameter name='isEscaped' value='false' />
+ </execute>
+ <execute plugin='org.onap.ccsdk.sli.core.slipluginutils.SliPluginUtils' method='getAttributeValue'>
+ <parameter name='source' value="`'resultsJson' + $outputPayloadField`" />
+ <parameter name='outputPath' value='outputPayload' />
+ </execute>
+ <switch test='`$outputPayload`'>
+ <outcome value=''>
+ <set>
+ <parameter name='lcm-dmaap.version' value='`$prop.lcm.dmaap.version`'/>
+ <parameter name='lcm-dmaap.correlation-id' value="`$upgrade-post-check-input.common-header.request-id + '-' + $upgrade-post-check-input.common-header.sub-request-id`"/>
+ <parameter name='lcm-dmaap.partition' value='`$prop.lcm.dmaap.partition`'/>
+ <parameter name='lcm-dmaap.rpc-name' value='upgrade-post-check'/>
+ <parameter name='lcm-dmaap.type' value='`$prop.lcm.dmaap.type`'/>
+ <parameter name='lcm-dmaap.timestamp' value='`$upgrade-post-check-input.common-header.timestamp`'/>
+ <parameter name='lcm-dmaap.api-ver' value='`$upgrade-post-check-input.common-header.api-ver`'/>
+ <parameter name='lcm-dmaap.originator-id' value='`$upgrade-post-check-input.common-header.originator-id`'/>
+ <parameter name='lcm-dmaap.request-id' value='`$upgrade-post-check-input.common-header.request-id`'/>
+ <parameter name='lcm-dmaap.sub-request-id' value='`$upgrade-post-check-input.common-header.sub-request-id`'/>
+ <parameter name='lcm-dmaap.flags.mode' value='`$upgrade-post-check-input.common-header.flags.mode`'/>
+ <parameter name='lcm-dmaap.flags.force' value='`$upgrade-post-check-input.common-header.flags.force`'/>
+ <parameter name='lcm-dmaap.flags.ttl' value='`$upgrade-post-check-input.common-header.flags.ttl`'/>
+ <parameter name='lcm-dmaap.status.code' value='`$org.onap.appc.adapter.ansible.result.code`' />
+ <parameter name='lcm-dmaap.status.message' value='`$org.onap.appc.adapter.ansible.message`'/>
+ </set>
+ </outcome>
+ <outcome value='Other'>
+ <set>
+ <parameter name='lcm-dmaap.version' value='`$prop.lcm.dmaap.version`'/>
+ <parameter name='lcm-dmaap.correlation-id' value="`$upgrade-post-check-input.common-header.request-id + '-' + $upgrade-post-check-input.common-header.sub-request-id`"/>
+ <parameter name='lcm-dmaap.partition' value='`$prop.lcm.dmaap.partition`'/>
+ <parameter name='lcm-dmaap.rpc-name' value='upgrade-post-check'/>
+ <parameter name='lcm-dmaap.type' value='`$prop.lcm.dmaap.type`'/>
+ <parameter name='lcm-dmaap.timestamp' value='`$upgrade-post-check-input.common-header.timestamp`'/>
+ <parameter name='lcm-dmaap.api-ver' value='`$upgrade-post-check-input.common-header.api-ver`'/>
+ <parameter name='lcm-dmaap.originator-id' value='`$upgrade-post-check-input.common-header.originator-id`'/>
+ <parameter name='lcm-dmaap.request-id' value='`$upgrade-post-check-input.common-header.request-id`'/>
+ <parameter name='lcm-dmaap.sub-request-id' value='`$upgrade-post-check-input.common-header.sub-request-id`'/>
+ <parameter name='lcm-dmaap.flags.mode' value='`$upgrade-post-check-input.common-header.flags.mode`'/>
+ <parameter name='lcm-dmaap.flags.force' value='`$upgrade-post-check-input.common-header.flags.force`'/>
+ <parameter name='lcm-dmaap.flags.ttl' value='`$upgrade-post-check-input.common-header.flags.ttl`'/>
+ <parameter name='lcm-dmaap.status.code' value='`$org.onap.appc.adapter.ansible.result.code`' />
+ <parameter name='lcm-dmaap.status.message' value='`$org.onap.appc.adapter.ansible.message`'/>
+ <parameter name='lcm-dmaap.payload' value='`$outputPayload`'/>
+ </set>
+ </outcome>
+ </switch>
<execute plugin='org.onap.ccsdk.sli.plugins.restapicall.RestapiCallNode' method='sendRequest' >
<parameter name='templateFileName' value="`$prop.restapi.templateDir + '/' + $prop.restapi.lcm.dmaap.publish.templatefile`" />
<parameter name='restapiUrl' value='`$prop.lcm.dmaap.url`' />
@@ -303,31 +338,96 @@
</record>
</outcome>
</execute>
- <return status='failure'>
- <parameter name='status.code' value='401' />
- <parameter name='status.message' value='`$org.onap.appc.adapter.ansible.message`' />
- </return>
+ <switch test='`$outputPayload`'>
+ <outcome value=''>
+ <switch test="`$org.onap.appc.adapter.ansible.result.code`">
+ <outcome value='400'>
+ <return status='success'>
+ <parameter name='status.code' value='`$org.onap.appc.adapter.ansible.result.code`' />
+ <parameter name='status.message' value='`$org.onap.appc.adapter.ansible.message`'/>
+ </return>
+ </outcome>
+ <outcome value='Other'>
+ <return status='failure'>
+ <parameter name='status.code' value='401' />
+ <parameter name='status.message' value='`$org.onap.appc.adapter.ansible.message`' />
+ </return>
+ </outcome>
+ </switch>
+ </outcome>
+ <outcome value='Other'>
+ <switch test="`$org.onap.appc.adapter.ansible.result.code`">
+ <outcome value='400'>
+ <return status='success'>
+ <parameter name='status.code' value='`$org.onap.appc.adapter.ansible.result.code`' />
+ <parameter name='status.message' value='`$org.onap.appc.adapter.ansible.message`'/>
+ <parameter name='payload' value='`$outputPayload`'/>
+ </return>
+ </outcome>
+ <outcome value='Other'>
+ <return status='failure'>
+ <parameter name='status.code' value='401' />
+ <parameter name='status.message' value='`$org.onap.appc.adapter.ansible.message`' />
+ <parameter name='payload' value='`$outputPayload`'/>
+ </return>
+ </outcome>
+ </switch>
+ </outcome>
+ </switch>
</block>
</outcome>
<outcome value='success'>
<block>
- <set>
- <parameter name='lcm-dmaap.version' value='`$prop.lcm.dmaap.version`'/>
- <parameter name='lcm-dmaap.correlation-id' value="`$upgrade-post-check-input.common-header.request-id + '-' + $upgrade-post-check-input.common-header.sub-request-id`"/>
- <parameter name='lcm-dmaap.partition' value='`$prop.lcm.dmaap.partition`'/>
- <parameter name='lcm-dmaap.rpc-name' value='upgrade-post-check'/>
- <parameter name='lcm-dmaap.type' value='`$prop.lcm.dmaap.type`'/>
- <parameter name='lcm-dmaap.timestamp' value='`$upgrade-post-check-input.common-header.timestamp`'/>
- <parameter name='lcm-dmaap.api-ver' value='`$upgrade-post-check-input.common-header.api-ver`'/>
- <parameter name='lcm-dmaap.originator-id' value='`$upgrade-post-check-input.common-header.originator-id`'/>
- <parameter name='lcm-dmaap.request-id' value='`$upgrade-post-check-input.common-header.request-id`'/>
- <parameter name='lcm-dmaap.sub-request-id' value='`$upgrade-post-check-input.common-header.sub-request-id`'/>
- <parameter name='lcm-dmaap.flags.mode' value='`$upgrade-post-check-input.common-header.flags.mode`'/>
- <parameter name='lcm-dmaap.flags.force' value='`$upgrade-post-check-input.common-header.flags.force`'/>
- <parameter name='lcm-dmaap.flags.ttl' value='`$upgrade-post-check-input.common-header.flags.ttl`'/>
- <parameter name='lcm-dmaap.status.code' value='`$org.onap.appc.adapter.ansible.result.code`' />
- <parameter name='lcm-dmaap.status.message' value='`$org.onap.appc.adapter.ansible.message`'/>
- </set>
+ <execute plugin='org.onap.ccsdk.sli.core.slipluginutils.SliPluginUtils' method='jsonStringToCtx'>
+ <parameter name='source' value='org.onap.appc.adapter.ansible.results' />
+ <parameter name='outputPath' value='resultsJson' />
+ <parameter name='isEscaped' value='false' />
+ </execute>
+ <execute plugin='org.onap.ccsdk.sli.core.slipluginutils.SliPluginUtils' method='getAttributeValue'>
+ <parameter name='source' value="`'resultsJson' + $outputPayloadField`" />
+ <parameter name='outputPath' value='outputPayload' />
+ </execute>
+ <switch test='`$outputPayload`'>
+ <outcome value=''>
+ <set>
+ <parameter name='lcm-dmaap.version' value='`$prop.lcm.dmaap.version`'/>
+ <parameter name='lcm-dmaap.correlation-id' value="`$upgrade-post-check-input.common-header.request-id + '-' + $upgrade-post-check-input.common-header.sub-request-id`"/>
+ <parameter name='lcm-dmaap.partition' value='`$prop.lcm.dmaap.partition`'/>
+ <parameter name='lcm-dmaap.rpc-name' value='upgrade-post-check'/>
+ <parameter name='lcm-dmaap.type' value='`$prop.lcm.dmaap.type`'/>
+ <parameter name='lcm-dmaap.timestamp' value='`$upgrade-post-check-input.common-header.timestamp`'/>
+ <parameter name='lcm-dmaap.api-ver' value='`$upgrade-post-check-input.common-header.api-ver`'/>
+ <parameter name='lcm-dmaap.originator-id' value='`$upgrade-post-check-input.common-header.originator-id`'/>
+ <parameter name='lcm-dmaap.request-id' value='`$upgrade-post-check-input.common-header.request-id`'/>
+ <parameter name='lcm-dmaap.sub-request-id' value='`$upgrade-post-check-input.common-header.sub-request-id`'/>
+ <parameter name='lcm-dmaap.flags.mode' value='`$upgrade-post-check-input.common-header.flags.mode`'/>
+ <parameter name='lcm-dmaap.flags.force' value='`$upgrade-post-check-input.common-header.flags.force`'/>
+ <parameter name='lcm-dmaap.flags.ttl' value='`$upgrade-post-check-input.common-header.flags.ttl`'/>
+ <parameter name='lcm-dmaap.status.code' value='`$org.onap.appc.adapter.ansible.result.code`' />
+ <parameter name='lcm-dmaap.status.message' value='`$org.onap.appc.adapter.ansible.message`'/>
+ </set>
+ </outcome>
+ <outcome value='Other'>
+ <set>
+ <parameter name='lcm-dmaap.version' value='`$prop.lcm.dmaap.version`'/>
+ <parameter name='lcm-dmaap.correlation-id' value="`$upgrade-post-check-input.common-header.request-id + '-' + $upgrade-post-check-input.common-header.sub-request-id`"/>
+ <parameter name='lcm-dmaap.partition' value='`$prop.lcm.dmaap.partition`'/>
+ <parameter name='lcm-dmaap.rpc-name' value='upgrade-post-check'/>
+ <parameter name='lcm-dmaap.type' value='`$prop.lcm.dmaap.type`'/>
+ <parameter name='lcm-dmaap.timestamp' value='`$upgrade-post-check-input.common-header.timestamp`'/>
+ <parameter name='lcm-dmaap.api-ver' value='`$upgrade-post-check-input.common-header.api-ver`'/>
+ <parameter name='lcm-dmaap.originator-id' value='`$upgrade-post-check-input.common-header.originator-id`'/>
+ <parameter name='lcm-dmaap.request-id' value='`$upgrade-post-check-input.common-header.request-id`'/>
+ <parameter name='lcm-dmaap.sub-request-id' value='`$upgrade-post-check-input.common-header.sub-request-id`'/>
+ <parameter name='lcm-dmaap.flags.mode' value='`$upgrade-post-check-input.common-header.flags.mode`'/>
+ <parameter name='lcm-dmaap.flags.force' value='`$upgrade-post-check-input.common-header.flags.force`'/>
+ <parameter name='lcm-dmaap.flags.ttl' value='`$upgrade-post-check-input.common-header.flags.ttl`'/>
+ <parameter name='lcm-dmaap.status.code' value='`$org.onap.appc.adapter.ansible.result.code`' />
+ <parameter name='lcm-dmaap.status.message' value='`$org.onap.appc.adapter.ansible.message`'/>
+ <parameter name='lcm-dmaap.payload' value='`$outputPayload`'/>
+ </set>
+ </outcome>
+ </switch>
<execute plugin='org.onap.ccsdk.sli.plugins.restapicall.RestapiCallNode' method='sendRequest' >
<parameter name='templateFileName' value="`$prop.restapi.templateDir + '/' + $prop.restapi.lcm.dmaap.publish.templatefile`" />
<parameter name='restapiUrl' value='`$prop.lcm.dmaap.url`' />
@@ -344,10 +444,42 @@
</record>
</outcome>
</execute>
- <return status='success'>
- <parameter name='status.code' value='`$org.onap.appc.adapter.ansible.result.code`' />
- <parameter name='status.message' value='`$org.onap.appc.adapter.ansible.message`'/>
- </return>
+ <switch test='`$outputPayload`'>
+ <outcome value=''>
+ <switch test="`$org.onap.appc.adapter.ansible.result.code`">
+ <outcome value='400'>
+ <return status='success'>
+ <parameter name='status.code' value='`$org.onap.appc.adapter.ansible.result.code`' />
+ <parameter name='status.message' value='`$org.onap.appc.adapter.ansible.message`'/>
+ </return>
+ </outcome>
+ <outcome value='Other'>
+ <return status='failure'>
+ <parameter name='status.code' value='401' />
+ <parameter name='status.message' value='`$org.onap.appc.adapter.ansible.message`' />
+ </return>
+ </outcome>
+ </switch>
+ </outcome>
+ <outcome value='Other'>
+ <switch test="`$org.onap.appc.adapter.ansible.result.code`">
+ <outcome value='400'>
+ <return status='success'>
+ <parameter name='status.code' value='`$org.onap.appc.adapter.ansible.result.code`' />
+ <parameter name='status.message' value='`$org.onap.appc.adapter.ansible.message`'/>
+ <parameter name='payload' value='`$outputPayload`'/>
+ </return>
+ </outcome>
+ <outcome value='Other'>
+ <return status='failure'>
+ <parameter name='status.code' value='401' />
+ <parameter name='status.message' value='`$org.onap.appc.adapter.ansible.message`' />
+ <parameter name='payload' value='`$outputPayload`'/>
+ </return>
+ </outcome>
+ </switch>
+ </outcome>
+ </switch>
</block>
</outcome>
</execute>
diff --git a/platform-logic/lcm/src/main/xml/LCM_upgrade-pre-check.xml b/platform-logic/lcm/src/main/xml/LCM_upgrade-pre-check.xml
index 6f89bfcf..89033222 100644
--- a/platform-logic/lcm/src/main/xml/LCM_upgrade-pre-check.xml
+++ b/platform-logic/lcm/src/main/xml/LCM_upgrade-pre-check.xml
@@ -11,6 +11,7 @@
<parameter name='status.code' value='200' />
<parameter name='status.message' value='unexpected return from DG' />
<parameter name='quote' value="'" />
+ <parameter name='outputPayloadField' value='.Output' />
</set>
<execute plugin='org.onap.ccsdk.sli.core.slipluginutils.SliPluginUtils' method='jsonStringToCtx'>
<parameter name='source' value='upgrade-pre-check-input.payload' />
@@ -22,6 +23,7 @@
<set>
<parameter name='nodelist' value="`'[' + $quote + $payloadJson.ipaddress-v4-oam + $quote + ']'`"/>
<parameter name='playbookname' value='`$prop.lcm.pnf.upgrade-pre-check.playbookname`'/>
+ <parameter name='outputPayloadField' value="`'.' + $payloadJson.ipaddress-v4-oam + '.Output'`"/>
</set>
</outcome>
<outcome value='Other'>
@@ -270,23 +272,56 @@
<parameter name='PlaybookName' value='`$playbookname`'/>
<outcome value='failure'>
<block>
- <set>
- <parameter name='lcm-dmaap.version' value='`$prop.lcm.dmaap.version`'/>
- <parameter name='lcm-dmaap.correlation-id' value="`$upgrade-pre-check-input.common-header.request-id + '-' + $upgrade-pre-check-input.common-header.sub-request-id`"/>
- <parameter name='lcm-dmaap.partition' value='`$prop.lcm.dmaap.partition`'/>
- <parameter name='lcm-dmaap.rpc-name' value='upgrade-pre-check'/>
- <parameter name='lcm-dmaap.type' value='`$prop.lcm.dmaap.type`'/>
- <parameter name='lcm-dmaap.timestamp' value='`$upgrade-pre-check-input.common-header.timestamp`'/>
- <parameter name='lcm-dmaap.api-ver' value='`$upgrade-pre-check-input.common-header.api-ver`'/>
- <parameter name='lcm-dmaap.originator-id' value='`$upgrade-pre-check-input.common-header.originator-id`'/>
- <parameter name='lcm-dmaap.request-id' value='`$upgrade-pre-check-input.common-header.request-id`'/>
- <parameter name='lcm-dmaap.sub-request-id' value='`$upgrade-pre-check-input.common-header.sub-request-id`'/>
- <parameter name='lcm-dmaap.flags.mode' value='`$upgrade-pre-check-input.common-header.flags.mode`'/>
- <parameter name='lcm-dmaap.flags.force' value='`$upgrade-pre-check-input.common-header.flags.force`'/>
- <parameter name='lcm-dmaap.flags.ttl' value='`$upgrade-pre-check-input.common-header.flags.ttl`'/>
- <parameter name='lcm-dmaap.status.code' value='`$org.onap.appc.adapter.ansible.result.code`' />
- <parameter name='lcm-dmaap.status.message' value='`$org.onap.appc.adapter.ansible.message`'/>
- </set>
+ <execute plugin='org.onap.ccsdk.sli.core.slipluginutils.SliPluginUtils' method='jsonStringToCtx'>
+ <parameter name='source' value='org.onap.appc.adapter.ansible.results' />
+ <parameter name='outputPath' value='resultsJson' />
+ <parameter name='isEscaped' value='false' />
+ </execute>
+ <execute plugin='org.onap.ccsdk.sli.core.slipluginutils.SliPluginUtils' method='getAttributeValue'>
+ <parameter name='source' value="`'resultsJson' + $outputPayloadField`" />
+ <parameter name='outputPath' value='outputPayload' />
+ </execute>
+ <switch test='`$outputPayload`'>
+ <outcome value=''>
+ <set>
+ <parameter name='lcm-dmaap.version' value='`$prop.lcm.dmaap.version`'/>
+ <parameter name='lcm-dmaap.correlation-id' value="`$upgrade-pre-check-input.common-header.request-id + '-' + $upgrade-pre-check-input.common-header.sub-request-id`"/>
+ <parameter name='lcm-dmaap.partition' value='`$prop.lcm.dmaap.partition`'/>
+ <parameter name='lcm-dmaap.rpc-name' value='upgrade-pre-check'/>
+ <parameter name='lcm-dmaap.type' value='`$prop.lcm.dmaap.type`'/>
+ <parameter name='lcm-dmaap.timestamp' value='`$upgrade-pre-check-input.common-header.timestamp`'/>
+ <parameter name='lcm-dmaap.api-ver' value='`$upgrade-pre-check-input.common-header.api-ver`'/>
+ <parameter name='lcm-dmaap.originator-id' value='`$upgrade-pre-check-input.common-header.originator-id`'/>
+ <parameter name='lcm-dmaap.request-id' value='`$upgrade-pre-check-input.common-header.request-id`'/>
+ <parameter name='lcm-dmaap.sub-request-id' value='`$upgrade-pre-check-input.common-header.sub-request-id`'/>
+ <parameter name='lcm-dmaap.flags.mode' value='`$upgrade-pre-check-input.common-header.flags.mode`'/>
+ <parameter name='lcm-dmaap.flags.force' value='`$upgrade-pre-check-input.common-header.flags.force`'/>
+ <parameter name='lcm-dmaap.flags.ttl' value='`$upgrade-pre-check-input.common-header.flags.ttl`'/>
+ <parameter name='lcm-dmaap.status.code' value='`$org.onap.appc.adapter.ansible.result.code`' />
+ <parameter name='lcm-dmaap.status.message' value='`$org.onap.appc.adapter.ansible.message`'/>
+ </set>
+ </outcome>
+ <outcome value='Other'>
+ <set>
+ <parameter name='lcm-dmaap.version' value='`$prop.lcm.dmaap.version`'/>
+ <parameter name='lcm-dmaap.correlation-id' value="`$upgrade-pre-check-input.common-header.request-id + '-' + $upgrade-pre-check-input.common-header.sub-request-id`"/>
+ <parameter name='lcm-dmaap.partition' value='`$prop.lcm.dmaap.partition`'/>
+ <parameter name='lcm-dmaap.rpc-name' value='upgrade-pre-check'/>
+ <parameter name='lcm-dmaap.type' value='`$prop.lcm.dmaap.type`'/>
+ <parameter name='lcm-dmaap.timestamp' value='`$upgrade-pre-check-input.common-header.timestamp`'/>
+ <parameter name='lcm-dmaap.api-ver' value='`$upgrade-pre-check-input.common-header.api-ver`'/>
+ <parameter name='lcm-dmaap.originator-id' value='`$upgrade-pre-check-input.common-header.originator-id`'/>
+ <parameter name='lcm-dmaap.request-id' value='`$upgrade-pre-check-input.common-header.request-id`'/>
+ <parameter name='lcm-dmaap.sub-request-id' value='`$upgrade-pre-check-input.common-header.sub-request-id`'/>
+ <parameter name='lcm-dmaap.flags.mode' value='`$upgrade-pre-check-input.common-header.flags.mode`'/>
+ <parameter name='lcm-dmaap.flags.force' value='`$upgrade-pre-check-input.common-header.flags.force`'/>
+ <parameter name='lcm-dmaap.flags.ttl' value='`$upgrade-pre-check-input.common-header.flags.ttl`'/>
+ <parameter name='lcm-dmaap.status.code' value='`$org.onap.appc.adapter.ansible.result.code`' />
+ <parameter name='lcm-dmaap.status.message' value='`$org.onap.appc.adapter.ansible.message`'/>
+ <parameter name='lcm-dmaap.payload' value='`$outputPayload`'/>
+ </set>
+ </outcome>
+ </switch>
<execute plugin='org.onap.ccsdk.sli.plugins.restapicall.RestapiCallNode' method='sendRequest' >
<parameter name='templateFileName' value="`$prop.restapi.templateDir + '/' + $prop.restapi.lcm.dmaap.publish.templatefile`" />
<parameter name='restapiUrl' value='`$prop.lcm.dmaap.url`' />
@@ -303,31 +338,96 @@
</record>
</outcome>
</execute>
- <return status='failure'>
- <parameter name='status.code' value='401' />
- <parameter name='status.message' value='`$org.onap.appc.adapter.ansible.message`' />
- </return>
+ <switch test='`$outputPayload`'>
+ <outcome value=''>
+ <switch test="`$org.onap.appc.adapter.ansible.result.code`">
+ <outcome value='400'>
+ <return status='success'>
+ <parameter name='status.code' value='`$org.onap.appc.adapter.ansible.result.code`' />
+ <parameter name='status.message' value='`$org.onap.appc.adapter.ansible.message`'/>
+ </return>
+ </outcome>
+ <outcome value='Other'>
+ <return status='failure'>
+ <parameter name='status.code' value='401' />
+ <parameter name='status.message' value='`$org.onap.appc.adapter.ansible.message`' />
+ </return>
+ </outcome>
+ </switch>
+ </outcome>
+ <outcome value='Other'>
+ <switch test="`$org.onap.appc.adapter.ansible.result.code`">
+ <outcome value='400'>
+ <return status='success'>
+ <parameter name='status.code' value='`$org.onap.appc.adapter.ansible.result.code`' />
+ <parameter name='status.message' value='`$org.onap.appc.adapter.ansible.message`'/>
+ <parameter name='payload' value='`$outputPayload`'/>
+ </return>
+ </outcome>
+ <outcome value='Other'>
+ <return status='failure'>
+ <parameter name='status.code' value='401' />
+ <parameter name='status.message' value='`$org.onap.appc.adapter.ansible.message`' />
+ <parameter name='payload' value='`$outputPayload`'/>
+ </return>
+ </outcome>
+ </switch>
+ </outcome>
+ </switch>
</block>
</outcome>
<outcome value='success'>
<block>
- <set>
- <parameter name='lcm-dmaap.version' value='`$prop.lcm.dmaap.version`'/>
- <parameter name='lcm-dmaap.correlation-id' value="`$upgrade-pre-check-input.common-header.request-id + '-' + $upgrade-pre-check-input.common-header.sub-request-id`"/>
- <parameter name='lcm-dmaap.partition' value='`$prop.lcm.dmaap.partition`'/>
- <parameter name='lcm-dmaap.rpc-name' value='upgrade-pre-check'/>
- <parameter name='lcm-dmaap.type' value='`$prop.lcm.dmaap.type`'/>
- <parameter name='lcm-dmaap.timestamp' value='`$upgrade-pre-check-input.common-header.timestamp`'/>
- <parameter name='lcm-dmaap.api-ver' value='`$upgrade-pre-check-input.common-header.api-ver`'/>
- <parameter name='lcm-dmaap.originator-id' value='`$upgrade-pre-check-input.common-header.originator-id`'/>
- <parameter name='lcm-dmaap.request-id' value='`$upgrade-pre-check-input.common-header.request-id`'/>
- <parameter name='lcm-dmaap.sub-request-id' value='`$upgrade-pre-check-input.common-header.sub-request-id`'/>
- <parameter name='lcm-dmaap.flags.mode' value='`$upgrade-pre-check-input.common-header.flags.mode`'/>
- <parameter name='lcm-dmaap.flags.force' value='`$upgrade-pre-check-input.common-header.flags.force`'/>
- <parameter name='lcm-dmaap.flags.ttl' value='`$upgrade-pre-check-input.common-header.flags.ttl`'/>
- <parameter name='lcm-dmaap.status.code' value='`$org.onap.appc.adapter.ansible.result.code`' />
- <parameter name='lcm-dmaap.status.message' value='`$org.onap.appc.adapter.ansible.message`'/>
- </set>
+ <execute plugin='org.onap.ccsdk.sli.core.slipluginutils.SliPluginUtils' method='jsonStringToCtx'>
+ <parameter name='source' value='org.onap.appc.adapter.ansible.results' />
+ <parameter name='outputPath' value='resultsJson' />
+ <parameter name='isEscaped' value='false' />
+ </execute>
+ <execute plugin='org.onap.ccsdk.sli.core.slipluginutils.SliPluginUtils' method='getAttributeValue'>
+ <parameter name='source' value="`'resultsJson' + $outputPayloadField`" />
+ <parameter name='outputPath' value='outputPayload' />
+ </execute>
+ <switch test='`$outputPayload`'>
+ <outcome value=''>
+ <set>
+ <parameter name='lcm-dmaap.version' value='`$prop.lcm.dmaap.version`'/>
+ <parameter name='lcm-dmaap.correlation-id' value="`$upgrade-pre-check-input.common-header.request-id + '-' + $upgrade-pre-check-input.common-header.sub-request-id`"/>
+ <parameter name='lcm-dmaap.partition' value='`$prop.lcm.dmaap.partition`'/>
+ <parameter name='lcm-dmaap.rpc-name' value='upgrade-pre-check'/>
+ <parameter name='lcm-dmaap.type' value='`$prop.lcm.dmaap.type`'/>
+ <parameter name='lcm-dmaap.timestamp' value='`$upgrade-pre-check-input.common-header.timestamp`'/>
+ <parameter name='lcm-dmaap.api-ver' value='`$upgrade-pre-check-input.common-header.api-ver`'/>
+ <parameter name='lcm-dmaap.originator-id' value='`$upgrade-pre-check-input.common-header.originator-id`'/>
+ <parameter name='lcm-dmaap.request-id' value='`$upgrade-pre-check-input.common-header.request-id`'/>
+ <parameter name='lcm-dmaap.sub-request-id' value='`$upgrade-pre-check-input.common-header.sub-request-id`'/>
+ <parameter name='lcm-dmaap.flags.mode' value='`$upgrade-pre-check-input.common-header.flags.mode`'/>
+ <parameter name='lcm-dmaap.flags.force' value='`$upgrade-pre-check-input.common-header.flags.force`'/>
+ <parameter name='lcm-dmaap.flags.ttl' value='`$upgrade-pre-check-input.common-header.flags.ttl`'/>
+ <parameter name='lcm-dmaap.status.code' value='`$org.onap.appc.adapter.ansible.result.code`' />
+ <parameter name='lcm-dmaap.status.message' value='`$org.onap.appc.adapter.ansible.message`'/>
+ </set>
+ </outcome>
+ <outcome value='Other'>
+ <set>
+ <parameter name='lcm-dmaap.version' value='`$prop.lcm.dmaap.version`'/>
+ <parameter name='lcm-dmaap.correlation-id' value="`$upgrade-pre-check-input.common-header.request-id + '-' + $upgrade-pre-check-input.common-header.sub-request-id`"/>
+ <parameter name='lcm-dmaap.partition' value='`$prop.lcm.dmaap.partition`'/>
+ <parameter name='lcm-dmaap.rpc-name' value='upgrade-pre-check'/>
+ <parameter name='lcm-dmaap.type' value='`$prop.lcm.dmaap.type`'/>
+ <parameter name='lcm-dmaap.timestamp' value='`$upgrade-pre-check-input.common-header.timestamp`'/>
+ <parameter name='lcm-dmaap.api-ver' value='`$upgrade-pre-check-input.common-header.api-ver`'/>
+ <parameter name='lcm-dmaap.originator-id' value='`$upgrade-pre-check-input.common-header.originator-id`'/>
+ <parameter name='lcm-dmaap.request-id' value='`$upgrade-pre-check-input.common-header.request-id`'/>
+ <parameter name='lcm-dmaap.sub-request-id' value='`$upgrade-pre-check-input.common-header.sub-request-id`'/>
+ <parameter name='lcm-dmaap.flags.mode' value='`$upgrade-pre-check-input.common-header.flags.mode`'/>
+ <parameter name='lcm-dmaap.flags.force' value='`$upgrade-pre-check-input.common-header.flags.force`'/>
+ <parameter name='lcm-dmaap.flags.ttl' value='`$upgrade-pre-check-input.common-header.flags.ttl`'/>
+ <parameter name='lcm-dmaap.status.code' value='`$org.onap.appc.adapter.ansible.result.code`' />
+ <parameter name='lcm-dmaap.status.message' value='`$org.onap.appc.adapter.ansible.message`'/>
+ <parameter name='lcm-dmaap.payload' value='`$outputPayload`'/>
+ </set>
+ </outcome>
+ </switch>
<execute plugin='org.onap.ccsdk.sli.plugins.restapicall.RestapiCallNode' method='sendRequest' >
<parameter name='templateFileName' value="`$prop.restapi.templateDir + '/' + $prop.restapi.lcm.dmaap.publish.templatefile`" />
<parameter name='restapiUrl' value='`$prop.lcm.dmaap.url`' />
@@ -344,10 +444,42 @@
</record>
</outcome>
</execute>
- <return status='success'>
- <parameter name='status.code' value='`$org.onap.appc.adapter.ansible.result.code`' />
- <parameter name='status.message' value='`$org.onap.appc.adapter.ansible.message`'/>
- </return>
+ <switch test='`$outputPayload`'>
+ <outcome value=''>
+ <switch test="`$org.onap.appc.adapter.ansible.result.code`">
+ <outcome value='400'>
+ <return status='success'>
+ <parameter name='status.code' value='`$org.onap.appc.adapter.ansible.result.code`' />
+ <parameter name='status.message' value='`$org.onap.appc.adapter.ansible.message`'/>
+ </return>
+ </outcome>
+ <outcome value='Other'>
+ <return status='failure'>
+ <parameter name='status.code' value='401' />
+ <parameter name='status.message' value='`$org.onap.appc.adapter.ansible.message`' />
+ </return>
+ </outcome>
+ </switch>
+ </outcome>
+ <outcome value='Other'>
+ <switch test="`$org.onap.appc.adapter.ansible.result.code`">
+ <outcome value='400'>
+ <return status='success'>
+ <parameter name='status.code' value='`$org.onap.appc.adapter.ansible.result.code`' />
+ <parameter name='status.message' value='`$org.onap.appc.adapter.ansible.message`'/>
+ <parameter name='payload' value='`$outputPayload`'/>
+ </return>
+ </outcome>
+ <outcome value='Other'>
+ <return status='failure'>
+ <parameter name='status.code' value='401' />
+ <parameter name='status.message' value='`$org.onap.appc.adapter.ansible.message`' />
+ <parameter name='payload' value='`$outputPayload`'/>
+ </return>
+ </outcome>
+ </switch>
+ </outcome>
+ </switch>
</block>
</outcome>
</execute>