diff options
Diffstat (limited to 'platform-logic')
-rw-r--r-- | platform-logic/lcm/pom.xml | 56 | ||||
-rw-r--r-- | platform-logic/lcm/src/main/json/LCM_upgrade-post-check.json | 466 | ||||
-rw-r--r-- | platform-logic/lcm/src/main/json/LCM_upgrade-pre-check.json | 466 | ||||
-rw-r--r-- | platform-logic/lcm/src/main/json/LCM_upgrade-software.json | 466 | ||||
-rw-r--r-- | platform-logic/lcm/src/main/resources/graph.versions | 3 | ||||
-rw-r--r-- | platform-logic/lcm/src/main/xml/LCM_upgrade-post-check.xml | 295 | ||||
-rw-r--r-- | platform-logic/lcm/src/main/xml/LCM_upgrade-pre-check.xml | 295 | ||||
-rw-r--r-- | platform-logic/lcm/src/main/xml/LCM_upgrade-software.xml | 295 | ||||
-rw-r--r-- | platform-logic/pom.xml | 1 | ||||
-rw-r--r-- | platform-logic/restapi-templates/src/main/json/lcm-dmaap-publish-template.json | 28 |
10 files changed, 2371 insertions, 0 deletions
diff --git a/platform-logic/lcm/pom.xml b/platform-logic/lcm/pom.xml new file mode 100644 index 00000000..58b958f9 --- /dev/null +++ b/platform-logic/lcm/pom.xml @@ -0,0 +1,56 @@ +<?xml version="1.0" encoding="UTF-8"?> +<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd"> + <modelVersion>4.0.0</modelVersion> + + <parent> + <groupId>org.onap.ccsdk.parent</groupId> + <artifactId>odlparent-lite</artifactId> + <version>1.0.1-SNAPSHOT</version> + <relativePath /> + </parent> + + <groupId>org.onap.sdnc.oam</groupId> + <artifactId>platform-logic-lcm</artifactId> + <version>1.3.1-SNAPSHOT</version> + <packaging>pom</packaging> + + <name>sdnc-oam :: platform-logic :: ${project.artifactId}</name> + <description>Contains platform-level service logic for the LCM</description> + + <build> + <plugins> + <plugin> + <artifactId>maven-resources-plugin</artifactId> + <version>2.6</version> + <executions> + <execution> + <id>copy-version</id> + <goals> + <goal>copy-resources</goal> + </goals><!-- here the phase you need --> + <phase>validate</phase> + <configuration> + <outputDirectory>../target/svclogic/graphs/lcm</outputDirectory> + <resources> + <resource> + <directory>src/main/xml</directory> + <includes> + <include>*.xml</include> + </includes> + <filtering>true</filtering> + </resource> + <resource> + <directory>src/main/resources</directory> + <includes> + <include>graph.versions</include> + </includes> + <filtering>true</filtering> + </resource> + </resources> + </configuration> + </execution> + </executions> + </plugin> + </plugins> + </build> +</project> diff --git a/platform-logic/lcm/src/main/json/LCM_upgrade-post-check.json b/platform-logic/lcm/src/main/json/LCM_upgrade-post-check.json new file mode 100644 index 00000000..0224da20 --- /dev/null +++ b/platform-logic/lcm/src/main/json/LCM_upgrade-post-check.json @@ -0,0 +1,466 @@ +[
+ {
+ "id": "cc3bbded.3295a",
+ "type": "method",
+ "name": "upgrade-post-check",
+ "xml": "<method rpc='upgrade-post-check' mode='sync'>\n",
+ "comments": "",
+ "outputs": 1,
+ "x": 493,
+ "y": 238,
+ "z": "7a7e6b0a.b892b4",
+ "wires": [
+ [
+ "fcff5cd2.43b9c"
+ ]
+ ]
+ },
+ {
+ "id": "5b46ba23.86b834",
+ "type": "service-logic",
+ "name": "LCM ${project.version}",
+ "module": "LCM",
+ "version": "${project.version}",
+ "comments": "",
+ "xml": "<service-logic xmlns='http://www.onap.org/sdnc/svclogic' xmlns:xsi='http://www.w3.org/2001/XMLSchema-instance' xsi:schemaLocation='http://www.onap.org/sdnc/svclogic ./svclogic.xsd' module='LCM' version='${project.version}'>",
+ "outputs": 1,
+ "x": 280.99993896484375,
+ "y": 239,
+ "z": "7a7e6b0a.b892b4",
+ "wires": [
+ [
+ "cc3bbded.3295a"
+ ]
+ ]
+ },
+ {
+ "id": "6fe211bc.82848",
+ "type": "execute",
+ "name": "execute AnsibleA.reqExec",
+ "xml": "<execute plugin='org.onap.ccsdk.sli.adaptors.ansible.AnsibleAdapter' method='reqExec' >\n<parameter name='AgentUrl' value='`$prop.ansible.agenturl`'/>\n<parameter name='User' value='`$prop.ansible.user`'/>\n<parameter name='Password' value='`prop.ansible.password`'/>\n<parameter name='LocalParameters' value='`$prop.ansible.lcm.localparameters`'/>\n<parameter name='EnvParameters' value='`$upgrade-post-check-input.payload`'/>\n<parameter name='NodeList' value='`$prop.ansible.nodelist`'/>\n<parameter name='Timeout' value='`$prop.ansible.timeout`'/>\n<parameter name='Version' value='`$prop.ansible.version`'/>\n<parameter name='Id' value='`$upgrade-post-check-input.common-header.request-id`'/>\n<parameter name='PlaybookName' value='`$prop.lcm.upgrade-post-check.playbookname`'/>",
+ "comments": "",
+ "outputs": 1,
+ "x": 281.00001525878906,
+ "y": 456,
+ "z": "7a7e6b0a.b892b4",
+ "wires": [
+ [
+ "e2203f54.fc069",
+ "d5304668.3a91b8",
+ "705657c0.133f18"
+ ]
+ ]
+ },
+ {
+ "id": "dca14761.9a3648",
+ "type": "switchNode",
+ "name": "switch",
+ "xml": "<switch test=\"`$org.onap.ccsdk.sli.adaptors.ansible.result.code`\">\n",
+ "comments": "",
+ "outputs": 1,
+ "x": 582,
+ "y": 504,
+ "z": "7a7e6b0a.b892b4",
+ "wires": [
+ [
+ "ea9accf8.5dfd1",
+ "654c296d.357e98",
+ "eedcb18f.2c47d"
+ ]
+ ]
+ },
+ {
+ "id": "ea9accf8.5dfd1",
+ "type": "other",
+ "name": "outcome 500",
+ "xml": "<outcome value='500'>\n",
+ "comments": "",
+ "outputs": 1,
+ "x": 727,
+ "y": 502.00000762939453,
+ "z": "7a7e6b0a.b892b4",
+ "wires": [
+ [
+ "60a0cbe8.afc9c4"
+ ]
+ ]
+ },
+ {
+ "id": "654c296d.357e98",
+ "type": "other",
+ "name": "outcome 100",
+ "xml": "<outcome value='100'>\n",
+ "comments": "",
+ "outputs": 1,
+ "x": 730,
+ "y": 545.0000381469727,
+ "z": "7a7e6b0a.b892b4",
+ "wires": [
+ [
+ "2682f050.3484a"
+ ]
+ ]
+ },
+ {
+ "id": "2682f050.3484a",
+ "type": "execute",
+ "name": "execute reqExecResult",
+ "xml": "<execute plugin='org.onap.ccsdk.sli.adaptors.ansible.AnsibleAdapter' method='reqExecResult' >\n <parameter name='AgentUrl' value='`$prop.ansible.agenturl`'/>\n\t<parameter name='User' value='`$prop.ansible.user`'/>\n\t<parameter name='Password' value='`$prop.ansible.password`'/>\n\t<parameter name='Id' value='`$upgrade-post-check-input.common-header.request-id`'/>\n\t<parameter name='PlaybookName' value='`$prop.lcm.upgrade-post-check.playbookname`'/>\n\t\n\n\n\n\n",
+ "comments": "",
+ "outputs": 1,
+ "x": 908.0000305175781,
+ "y": 545.0000381469727,
+ "z": "7a7e6b0a.b892b4",
+ "wires": [
+ [
+ "27413748.995628",
+ "659b0cc2.3ae244"
+ ]
+ ]
+ },
+ {
+ "id": "d5304668.3a91b8",
+ "type": "failure",
+ "name": "failure",
+ "xml": "<outcome value='failure'>\n",
+ "comments": "",
+ "outputs": 1,
+ "x": 473,
+ "y": 413.0000305175781,
+ "z": "7a7e6b0a.b892b4",
+ "wires": [
+ [
+ "60a0cbe8.afc9c4"
+ ]
+ ]
+ },
+ {
+ "id": "e2203f54.fc069",
+ "type": "other",
+ "name": "other",
+ "xml": "<outcome value='Other'>\n",
+ "comments": "",
+ "outputs": 1,
+ "x": 475,
+ "y": 465,
+ "z": "7a7e6b0a.b892b4",
+ "wires": [
+ [
+ "dca14761.9a3648"
+ ]
+ ]
+ },
+ {
+ "id": "27413748.995628",
+ "type": "failure",
+ "name": "failure",
+ "xml": "<outcome value='failure'>\n",
+ "comments": "",
+ "outputs": 1,
+ "x": 1069.0000610351562,
+ "y": 522.0000076293945,
+ "z": "7a7e6b0a.b892b4",
+ "wires": [
+ [
+ "60a0cbe8.afc9c4"
+ ]
+ ]
+ },
+ {
+ "id": "eedcb18f.2c47d",
+ "type": "other",
+ "name": "outcome 101",
+ "xml": "<outcome value='101'>\n",
+ "comments": "",
+ "outputs": 1,
+ "x": 724,
+ "y": 460.00003814697266,
+ "z": "7a7e6b0a.b892b4",
+ "wires": [
+ [
+ "60a0cbe8.afc9c4"
+ ]
+ ]
+ },
+ {
+ "id": "659b0cc2.3ae244",
+ "type": "success",
+ "name": "success",
+ "xml": "<outcome value='success'>\n",
+ "comments": "",
+ "outputs": 1,
+ "x": 1076.0000610351562,
+ "y": 570.0000381469727,
+ "z": "7a7e6b0a.b892b4",
+ "wires": [
+ [
+ "5f5e27ef.4861c8"
+ ]
+ ]
+ },
+ {
+ "id": "6abf69d.1e7a698",
+ "type": "returnSuccess",
+ "name": "return success",
+ "xml": "<return status='success'>\n<parameter name='status.code' value='`$org.onap.ccsdk.sli.adaptors.ansible.result.code`' />\n<parameter name='status.message' value='`$org.onap.ccsdk.sli.adaptors.ansible.message`'/>",
+ "comments": "",
+ "x": 1358.9999389648438,
+ "y": 622.0000381469727,
+ "z": "7a7e6b0a.b892b4",
+ "wires": []
+ },
+ {
+ "id": "6e2017a1.a01658",
+ "type": "dgstart",
+ "name": "DGSTART",
+ "outputs": 1,
+ "x": 96,
+ "y": 238,
+ "z": "7a7e6b0a.b892b4",
+ "wires": [
+ [
+ "5b46ba23.86b834"
+ ]
+ ]
+ },
+ {
+ "id": "fcff5cd2.43b9c",
+ "type": "block",
+ "name": "block",
+ "xml": "<block>\n",
+ "atomic": "false",
+ "comments": "",
+ "outputs": 1,
+ "x": 91.91668701171875,
+ "y": 419.0833435058594,
+ "z": "7a7e6b0a.b892b4",
+ "wires": [
+ [
+ "6fe211bc.82848",
+ "e705bf4e.0297b"
+ ]
+ ]
+ },
+ {
+ "id": "e705bf4e.0297b",
+ "type": "execute",
+ "name": "execute Properties",
+ "xml": "<execute plugin='org.onap.ccsdk.sli.plugins.prop.PropertiesNode' method='readProperties' >\n <parameter name='fileName' value='%SDNC_CONFIG_DIR%/lcm-dg.properties' />\n <parameter name='contextPrefix' value='prop' />\n",
+ "comments": "",
+ "outputs": 1,
+ "x": 265.00001525878906,
+ "y": 401.0833435058594,
+ "z": "7a7e6b0a.b892b4",
+ "wires": [
+ []
+ ]
+ },
+ {
+ "id": "82c6d132.b27fb",
+ "type": "execute",
+ "name": "execute DmaapMsg",
+ "xml": "<execute plugin='org.onap.ccsdk.sli.plugins.restapicall.RestapiCallNode' method='sendRequest' >\n <parameter name='templateFileName' value=\"`$prop.restapi.templateDir + '/' + $prop.restapi.lcm.dmaap.publish.templatefile`\" />\n <parameter name='restapiUrl' value='`$prop.lcm.dmaap.url`' />\n <parameter name='restapiUser' value='`$prop.lcm.dmaap.user`' />\n <parameter name='restapiPassword' value='`$prop.lcm.dmaap.password`' />\n <parameter name='format' value='json' />\n <parameter name='httpMethod' value='POST' />\n <parameter name='contentType' value='application/json' />\n <parameter name=\"responsePrefix\" value=\"lcm\" />\n",
+ "comments": "",
+ "outputs": 1,
+ "x": 1076.0000610351562,
+ "y": 366.0833435058594,
+ "z": "7a7e6b0a.b892b4",
+ "wires": [
+ [
+ "ea1dad62.6b4"
+ ]
+ ]
+ },
+ {
+ "id": "ea1dad62.6b4",
+ "type": "failure",
+ "name": "failure",
+ "xml": "<outcome value='failure'>\n",
+ "comments": "",
+ "outputs": 1,
+ "x": 1246,
+ "y": 365.0833435058594,
+ "z": "7a7e6b0a.b892b4",
+ "wires": [
+ [
+ "8f50a91b.8fa828"
+ ]
+ ]
+ },
+ {
+ "id": "60a0cbe8.afc9c4",
+ "type": "block",
+ "name": "block",
+ "xml": "<block>\n",
+ "atomic": "false",
+ "comments": "",
+ "outputs": 1,
+ "x": 879,
+ "y": 390.0833435058594,
+ "z": "7a7e6b0a.b892b4",
+ "wires": [
+ [
+ "82c6d132.b27fb",
+ "fd02a7ce.bf5098",
+ "1f2da62a.28ed8a"
+ ]
+ ]
+ },
+ {
+ "id": "28dc03a3.89af6c",
+ "type": "execute",
+ "name": "execute DmaapMsg",
+ "xml": "<execute plugin='org.onap.ccsdk.sli.plugins.restapicall.RestapiCallNode' method='sendRequest' >\n <parameter name='templateFileName' value=\"`$prop.restapi.templateDir + '/' + $prop.restapi.lcm.dmaap.publish.templatefile`\" />\n <parameter name='restapiUrl' value='`$prop.lcm.dmaap.url`' />\n <parameter name='restapiUser' value='`$prop.lcm.dmaap.user`' />\n <parameter name='restapiPassword' value='`$prop.lcm.dmaap.password`' />\n <parameter name='format' value='json' />\n <parameter name='httpMethod' value='POST' />\n <parameter name='contentType' value='application/json' />\n <parameter name=\"responsePrefix\" value=\"lcm\" />\n",
+ "comments": "",
+ "outputs": 1,
+ "x": 1379.4999389648438,
+ "y": 571.0833511352539,
+ "z": "7a7e6b0a.b892b4",
+ "wires": [
+ [
+ "672eb6c5.9eeee8"
+ ]
+ ]
+ },
+ {
+ "id": "672eb6c5.9eeee8",
+ "type": "failure",
+ "name": "failure",
+ "xml": "<outcome value='failure'>\n",
+ "comments": "",
+ "outputs": 1,
+ "x": 1539.4999389648438,
+ "y": 571.0833511352539,
+ "z": "7a7e6b0a.b892b4",
+ "wires": [
+ [
+ "ce572144.693dc"
+ ]
+ ]
+ },
+ {
+ "id": "8f50a91b.8fa828",
+ "type": "record",
+ "name": "record",
+ "xml": "<record plugin=\"org.onap.ccsdk.sli.core.sli.recording.Slf4jRecorder\"> \n\t<parameter name=\"logger\" value=\"message-log\"/> \n\t<parameter name=\"field1\" value='Failed to Publish to DMaap'/>",
+ "comments": "",
+ "outputs": 1,
+ "x": 1378,
+ "y": 365.0833435058594,
+ "z": "7a7e6b0a.b892b4",
+ "wires": [
+ []
+ ]
+ },
+ {
+ "id": "fd02a7ce.bf5098",
+ "type": "returnFailure",
+ "name": "return failure",
+ "xml": "<return status='failure'>\n<parameter name='error-code' value='200' />\n<parameter name='error-message' value='`$org.onap.ccsdk.sli.adaptors.ansible.message`' />\n",
+ "comments": "",
+ "x": 1050.9166870117188,
+ "y": 403.0833435058594,
+ "z": "7a7e6b0a.b892b4",
+ "wires": []
+ },
+ {
+ "id": "ce572144.693dc",
+ "type": "record",
+ "name": "record",
+ "xml": "<record plugin=\"org.onap.ccsdk.sli.core.sli.recording.Slf4jRecorder\"> \n\t<parameter name=\"logger\" value=\"message-log\"/> \n\t<parameter name=\"field1\" value='Failed to Publish to DMaap'/>",
+ "comments": "",
+ "outputs": 1,
+ "x": 1660.9166870117188,
+ "y": 572.0833511352539,
+ "z": "7a7e6b0a.b892b4",
+ "wires": [
+ []
+ ]
+ },
+ {
+ "id": "1f2da62a.28ed8a",
+ "type": "set",
+ "name": "set",
+ "xml": "<set>\n<parameter name='lcm-dmaap.version' value='`$prop.lcm.dmaap.version`'/>\n<parameter name='lcm-dmaap.correlation-id' value='`$upgrade-post-check-input.common-header.sub-request-id`'/>\n<parameter name='lcm-dmaap.partition' value='`$prop.lcm.dmaap.partition`'/>\n<parameter name='lcm-dmaap.rpc-name' value='upgrade-post-check'/>\n<parameter name='lcm-dmaap.type' value='`$prop.lcm.dmaap.type`'/>\n<parameter name='lcm-dmaap.timestamp' value='`$upgrade-post-check-input.common-header.timestamp`'/>\n<parameter name='lcm-dmaap.api-ver' value='`$upgrade-post-check-input.common-header.api-ver`'/>\n<parameter name='lcm-dmaap.originator-id' value='`$upgrade-post-check-input.common-header.originator-id`'/>\n<parameter name='lcm-dmaap.request-id' value='`$upgrade-post-check-input.common-header.originator-id`'/>\n<parameter name='lcm-dmaap.sub-request-id' value='`$upgrade-post-check-input.common-header.sub-request-id`'/>\n<parameter name='lcm-dmaap.flags.mode' value='`$upgrade-post-check-input.common-header.flags.mode`'/>\n<parameter name='lcm-dmaap.flags.force' value='`$upgrade-post-check-input.common-header.flags.force`'/>\n<parameter name='lcm-dmaap.flags.ttl' value='`$upgrade-post-check-input.common-header.flags.ttl`'/>\n<parameter name='lcm-dmaap.payload' value='`$org.onap.appc.adapter.ansible.results`'/>\n<parameter name='lcm-dmaap.status.code' value='`$org.onap.ccsdk.sli.adaptors.ansible.result.code`' />\n<parameter name='lcm-dmaap.status.message' value='`$org.onap.ccsdk.sli.adaptors.ansible.message`'/>\n",
+ "comments": "",
+ "x": 1028.0000610351562,
+ "y": 313.0833435058594,
+ "z": "7a7e6b0a.b892b4",
+ "wires": []
+ },
+ {
+ "id": "5f5e27ef.4861c8",
+ "type": "block",
+ "name": "block",
+ "xml": "<block>\n",
+ "atomic": "false",
+ "comments": "",
+ "outputs": 1,
+ "x": 1208.9999389648438,
+ "y": 570.0833206176758,
+ "z": "7a7e6b0a.b892b4",
+ "wires": [
+ [
+ "28dc03a3.89af6c",
+ "ef19c52d.bea5d8",
+ "6abf69d.1e7a698"
+ ]
+ ]
+ },
+ {
+ "id": "ef19c52d.bea5d8",
+ "type": "set",
+ "name": "set",
+ "xml": "<set>\n<parameter name='lcm-dmaap.version' value='`$prop.lcm.dmaap.version`'/>\n<parameter name='lcm-dmaap.correlation-id' value='`$upgrade-post-check-input.common-header.sub-request-id`'/>\n<parameter name='lcm-dmaap.partition' value='`$prop.lcm.dmaap.partition`'/>\n<parameter name='lcm-dmaap.rpc-name' value='upgrade-post-check'/>\n<parameter name='lcm-dmaap.type' value='`$prop.lcm.dmaap.type`'/>\n<parameter name='lcm-dmaap.timestamp' value='`$upgrade-post-check-input.common-header.timestamp`'/>\n<parameter name='lcm-dmaap.api-ver' value='`$upgrade-post-check-input.common-header.api-ver`'/>\n<parameter name='lcm-dmaap.originator-id' value='`$upgrade-post-check-input.common-header.originator-id`'/>\n<parameter name='lcm-dmaap.request-id' value='`$upgrade-post-check-input.common-header.originator-id`'/>\n<parameter name='lcm-dmaap.sub-request-id' value='`$upgrade-post-check-input.common-header.sub-request-id`'/>\n<parameter name='lcm-dmaap.flags.mode' value='`$upgrade-post-check-input.common-header.flags.mode`'/>\n<parameter name='lcm-dmaap.flags.force' value='`$upgrade-post-check-input.common-header.flags.force`'/>\n<parameter name='lcm-dmaap.flags.ttl' value='`$upgrade-post-check-input.common-header.flags.ttl`'/>\n<parameter name='lcm-dmaap.payload' value='`$org.onap.appc.adapter.ansible.results`'/>\n<parameter name='lcm-dmaap.status.code' value='`$org.onap.ccsdk.sli.adaptors.ansible.result.code`' />\n<parameter name='lcm-dmaap.status.message' value='`$org.onap.ccsdk.sli.adaptors.ansible.message`'/>\n",
+ "comments": "",
+ "x": 1339.1666870117188,
+ "y": 523.0833511352539,
+ "z": "7a7e6b0a.b892b4",
+ "wires": []
+ },
+ {
+ "id": "705657c0.133f18",
+ "type": "not-found",
+ "name": "not-found",
+ "xml": "<outcome value='not-found'>\n",
+ "comments": "",
+ "outputs": 1,
+ "x": 469,
+ "y": 366,
+ "z": "7a7e6b0a.b892b4",
+ "wires": [
+ [
+ "f066b8c5.507f48"
+ ]
+ ]
+ },
+ {
+ "id": "545bbcea.978c14",
+ "type": "set",
+ "name": "set Defaults",
+ "xml": "<set>\n<parameter name='$org.onap.ccsdk.sli.adaptors.ansible.result.code' value='200'/>\n<parameter name='org.onap.ccsdk.sli.adaptors.ansible.message' value='Ansible Adapter was not found'/>\n",
+ "comments": "",
+ "x": 853,
+ "y": 313,
+ "z": "7a7e6b0a.b892b4",
+ "wires": []
+ },
+ {
+ "id": "f066b8c5.507f48",
+ "type": "block",
+ "name": "block",
+ "xml": "<block>\n",
+ "atomic": "false",
+ "comments": "",
+ "outputs": 1,
+ "x": 653,
+ "y": 358,
+ "z": "7a7e6b0a.b892b4",
+ "wires": [
+ [
+ "545bbcea.978c14",
+ "60a0cbe8.afc9c4"
+ ]
+ ]
+ }
+]
\ No newline at end of file diff --git a/platform-logic/lcm/src/main/json/LCM_upgrade-pre-check.json b/platform-logic/lcm/src/main/json/LCM_upgrade-pre-check.json new file mode 100644 index 00000000..6e9c568c --- /dev/null +++ b/platform-logic/lcm/src/main/json/LCM_upgrade-pre-check.json @@ -0,0 +1,466 @@ +[
+ {
+ "id": "cc3bbded.3295a",
+ "type": "method",
+ "name": "upgrade-pre-check",
+ "xml": "<method rpc='upgrade-pre-check' mode='sync'>\n",
+ "comments": "",
+ "outputs": 1,
+ "x": 493,
+ "y": 238,
+ "z": "7a7e6b0a.b892b4",
+ "wires": [
+ [
+ "fcff5cd2.43b9c"
+ ]
+ ]
+ },
+ {
+ "id": "5b46ba23.86b834",
+ "type": "service-logic",
+ "name": "LCM ${project.version}",
+ "module": "LCM",
+ "version": "${project.version}",
+ "comments": "",
+ "xml": "<service-logic xmlns='http://www.onap.org/sdnc/svclogic' xmlns:xsi='http://www.w3.org/2001/XMLSchema-instance' xsi:schemaLocation='http://www.onap.org/sdnc/svclogic ./svclogic.xsd' module='LCM' version='${project.version}'>",
+ "outputs": 1,
+ "x": 280.99993896484375,
+ "y": 239,
+ "z": "7a7e6b0a.b892b4",
+ "wires": [
+ [
+ "cc3bbded.3295a"
+ ]
+ ]
+ },
+ {
+ "id": "6fe211bc.82848",
+ "type": "execute",
+ "name": "execute AnsibleA.reqExec",
+ "xml": "<execute plugin='org.onap.ccsdk.sli.adaptors.ansible.AnsibleAdapter' method='reqExec' >\n<parameter name='AgentUrl' value='`$prop.ansible.agenturl`'/>\n<parameter name='User' value='`$prop.ansible.user`'/>\n<parameter name='Password' value='`prop.ansible.password`'/>\n<parameter name='LocalParameters' value='`$prop.ansible.lcm.localparameters`'/>\n<parameter name='EnvParameters' value='`$upgrade-pre-check-input.payload`'/>\n<parameter name='NodeList' value='`$prop.ansible.nodelist`'/>\n<parameter name='Timeout' value='`$prop.ansible.timeout`'/>\n<parameter name='Version' value='`$prop.ansible.version`'/>\n<parameter name='Id' value='`$upgrade-pre-check-input.common-header.request-id`'/>\n<parameter name='PlaybookName' value='`$prop.lcm.upgrade-pre-check.playbookname`'/>",
+ "comments": "",
+ "outputs": 1,
+ "x": 281.00001525878906,
+ "y": 456,
+ "z": "7a7e6b0a.b892b4",
+ "wires": [
+ [
+ "e2203f54.fc069",
+ "d5304668.3a91b8",
+ "705657c0.133f18"
+ ]
+ ]
+ },
+ {
+ "id": "dca14761.9a3648",
+ "type": "switchNode",
+ "name": "switch",
+ "xml": "<switch test=\"`$org.onap.ccsdk.sli.adaptors.ansible.result.code`\">\n",
+ "comments": "",
+ "outputs": 1,
+ "x": 582,
+ "y": 504,
+ "z": "7a7e6b0a.b892b4",
+ "wires": [
+ [
+ "ea9accf8.5dfd1",
+ "654c296d.357e98",
+ "eedcb18f.2c47d"
+ ]
+ ]
+ },
+ {
+ "id": "ea9accf8.5dfd1",
+ "type": "other",
+ "name": "outcome 500",
+ "xml": "<outcome value='500'>\n",
+ "comments": "",
+ "outputs": 1,
+ "x": 727,
+ "y": 502.00000762939453,
+ "z": "7a7e6b0a.b892b4",
+ "wires": [
+ [
+ "60a0cbe8.afc9c4"
+ ]
+ ]
+ },
+ {
+ "id": "654c296d.357e98",
+ "type": "other",
+ "name": "outcome 100",
+ "xml": "<outcome value='100'>\n",
+ "comments": "",
+ "outputs": 1,
+ "x": 730,
+ "y": 545.0000381469727,
+ "z": "7a7e6b0a.b892b4",
+ "wires": [
+ [
+ "2682f050.3484a"
+ ]
+ ]
+ },
+ {
+ "id": "2682f050.3484a",
+ "type": "execute",
+ "name": "execute reqExecResult",
+ "xml": "<execute plugin='org.onap.ccsdk.sli.adaptors.ansible.AnsibleAdapter' method='reqExecResult' >\n <parameter name='AgentUrl' value='`$prop.ansible.agenturl`'/>\n\t<parameter name='User' value='`$prop.ansible.user`'/>\n\t<parameter name='Password' value='`$prop.ansible.password`'/>\n\t<parameter name='Id' value='`$upgrade-pre-check-input.common-header.request-id`'/>\n\t<parameter name='PlaybookName' value='`$prop.lcm.upgrade-pre-check.playbookname`'/>\n\t\n\n\n\n\n",
+ "comments": "",
+ "outputs": 1,
+ "x": 908.0000305175781,
+ "y": 545.0000381469727,
+ "z": "7a7e6b0a.b892b4",
+ "wires": [
+ [
+ "27413748.995628",
+ "659b0cc2.3ae244"
+ ]
+ ]
+ },
+ {
+ "id": "d5304668.3a91b8",
+ "type": "failure",
+ "name": "failure",
+ "xml": "<outcome value='failure'>\n",
+ "comments": "",
+ "outputs": 1,
+ "x": 473,
+ "y": 413.0000305175781,
+ "z": "7a7e6b0a.b892b4",
+ "wires": [
+ [
+ "60a0cbe8.afc9c4"
+ ]
+ ]
+ },
+ {
+ "id": "e2203f54.fc069",
+ "type": "other",
+ "name": "other",
+ "xml": "<outcome value='Other'>\n",
+ "comments": "",
+ "outputs": 1,
+ "x": 475,
+ "y": 465,
+ "z": "7a7e6b0a.b892b4",
+ "wires": [
+ [
+ "dca14761.9a3648"
+ ]
+ ]
+ },
+ {
+ "id": "27413748.995628",
+ "type": "failure",
+ "name": "failure",
+ "xml": "<outcome value='failure'>\n",
+ "comments": "",
+ "outputs": 1,
+ "x": 1069.0000610351562,
+ "y": 522.0000076293945,
+ "z": "7a7e6b0a.b892b4",
+ "wires": [
+ [
+ "60a0cbe8.afc9c4"
+ ]
+ ]
+ },
+ {
+ "id": "eedcb18f.2c47d",
+ "type": "other",
+ "name": "outcome 101",
+ "xml": "<outcome value='101'>\n",
+ "comments": "",
+ "outputs": 1,
+ "x": 724,
+ "y": 460.00003814697266,
+ "z": "7a7e6b0a.b892b4",
+ "wires": [
+ [
+ "60a0cbe8.afc9c4"
+ ]
+ ]
+ },
+ {
+ "id": "659b0cc2.3ae244",
+ "type": "success",
+ "name": "success",
+ "xml": "<outcome value='success'>\n",
+ "comments": "",
+ "outputs": 1,
+ "x": 1076.0000610351562,
+ "y": 570.0000381469727,
+ "z": "7a7e6b0a.b892b4",
+ "wires": [
+ [
+ "5f5e27ef.4861c8"
+ ]
+ ]
+ },
+ {
+ "id": "6abf69d.1e7a698",
+ "type": "returnSuccess",
+ "name": "return success",
+ "xml": "<return status='success'>\n<parameter name='status.code' value='`$org.onap.ccsdk.sli.adaptors.ansible.result.code`' />\n<parameter name='status.message' value='`$org.onap.ccsdk.sli.adaptors.ansible.message`'/>",
+ "comments": "",
+ "x": 1358.9999389648438,
+ "y": 622.0000381469727,
+ "z": "7a7e6b0a.b892b4",
+ "wires": []
+ },
+ {
+ "id": "6e2017a1.a01658",
+ "type": "dgstart",
+ "name": "DGSTART",
+ "outputs": 1,
+ "x": 96,
+ "y": 238,
+ "z": "7a7e6b0a.b892b4",
+ "wires": [
+ [
+ "5b46ba23.86b834"
+ ]
+ ]
+ },
+ {
+ "id": "fcff5cd2.43b9c",
+ "type": "block",
+ "name": "block",
+ "xml": "<block>\n",
+ "atomic": "false",
+ "comments": "",
+ "outputs": 1,
+ "x": 91.91668701171875,
+ "y": 419.0833435058594,
+ "z": "7a7e6b0a.b892b4",
+ "wires": [
+ [
+ "6fe211bc.82848",
+ "e705bf4e.0297b"
+ ]
+ ]
+ },
+ {
+ "id": "e705bf4e.0297b",
+ "type": "execute",
+ "name": "execute Properties",
+ "xml": "<execute plugin='org.onap.ccsdk.sli.plugins.prop.PropertiesNode' method='readProperties' >\n <parameter name='fileName' value='%SDNC_CONFIG_DIR%/lcm-dg.properties' />\n <parameter name='contextPrefix' value='prop' />\n",
+ "comments": "",
+ "outputs": 1,
+ "x": 265.00001525878906,
+ "y": 401.0833435058594,
+ "z": "7a7e6b0a.b892b4",
+ "wires": [
+ []
+ ]
+ },
+ {
+ "id": "82c6d132.b27fb",
+ "type": "execute",
+ "name": "execute DmaapMsg",
+ "xml": "<execute plugin='org.onap.ccsdk.sli.plugins.restapicall.RestapiCallNode' method='sendRequest' >\n <parameter name='templateFileName' value=\"`$prop.restapi.templateDir + '/' + $prop.restapi.lcm.dmaap.publish.templatefile`\" />\n <parameter name='restapiUrl' value='`$prop.lcm.dmaap.url`' />\n <parameter name='restapiUser' value='`$prop.lcm.dmaap.user`' />\n <parameter name='restapiPassword' value='`$prop.lcm.dmaap.password`' />\n <parameter name='format' value='json' />\n <parameter name='httpMethod' value='POST' />\n <parameter name='contentType' value='application/json' />\n <parameter name=\"responsePrefix\" value=\"lcm\" />\n",
+ "comments": "",
+ "outputs": 1,
+ "x": 1076.0000610351562,
+ "y": 366.0833435058594,
+ "z": "7a7e6b0a.b892b4",
+ "wires": [
+ [
+ "ea1dad62.6b4"
+ ]
+ ]
+ },
+ {
+ "id": "ea1dad62.6b4",
+ "type": "failure",
+ "name": "failure",
+ "xml": "<outcome value='failure'>\n",
+ "comments": "",
+ "outputs": 1,
+ "x": 1246,
+ "y": 365.0833435058594,
+ "z": "7a7e6b0a.b892b4",
+ "wires": [
+ [
+ "8f50a91b.8fa828"
+ ]
+ ]
+ },
+ {
+ "id": "60a0cbe8.afc9c4",
+ "type": "block",
+ "name": "block",
+ "xml": "<block>\n",
+ "atomic": "false",
+ "comments": "",
+ "outputs": 1,
+ "x": 879,
+ "y": 390.0833435058594,
+ "z": "7a7e6b0a.b892b4",
+ "wires": [
+ [
+ "82c6d132.b27fb",
+ "fd02a7ce.bf5098",
+ "1f2da62a.28ed8a"
+ ]
+ ]
+ },
+ {
+ "id": "28dc03a3.89af6c",
+ "type": "execute",
+ "name": "execute DmaapMsg",
+ "xml": "<execute plugin='org.onap.ccsdk.sli.plugins.restapicall.RestapiCallNode' method='sendRequest' >\n <parameter name='templateFileName' value=\"`$prop.restapi.templateDir + '/' + $prop.restapi.lcm.dmaap.publish.templatefile`\" />\n <parameter name='restapiUrl' value='`$prop.lcm.dmaap.url`' />\n <parameter name='restapiUser' value='`$prop.lcm.dmaap.user`' />\n <parameter name='restapiPassword' value='`$prop.lcm.dmaap.password`' />\n <parameter name='format' value='json' />\n <parameter name='httpMethod' value='POST' />\n <parameter name='contentType' value='application/json' />\n <parameter name=\"responsePrefix\" value=\"lcm\" />\n",
+ "comments": "",
+ "outputs": 1,
+ "x": 1379.4999389648438,
+ "y": 571.0833511352539,
+ "z": "7a7e6b0a.b892b4",
+ "wires": [
+ [
+ "672eb6c5.9eeee8"
+ ]
+ ]
+ },
+ {
+ "id": "672eb6c5.9eeee8",
+ "type": "failure",
+ "name": "failure",
+ "xml": "<outcome value='failure'>\n",
+ "comments": "",
+ "outputs": 1,
+ "x": 1539.4999389648438,
+ "y": 571.0833511352539,
+ "z": "7a7e6b0a.b892b4",
+ "wires": [
+ [
+ "ce572144.693dc"
+ ]
+ ]
+ },
+ {
+ "id": "8f50a91b.8fa828",
+ "type": "record",
+ "name": "record",
+ "xml": "<record plugin=\"org.onap.ccsdk.sli.core.sli.recording.Slf4jRecorder\"> \n\t<parameter name=\"logger\" value=\"message-log\"/> \n\t<parameter name=\"field1\" value='Failed to Publish to DMaap'/>",
+ "comments": "",
+ "outputs": 1,
+ "x": 1378,
+ "y": 365.0833435058594,
+ "z": "7a7e6b0a.b892b4",
+ "wires": [
+ []
+ ]
+ },
+ {
+ "id": "fd02a7ce.bf5098",
+ "type": "returnFailure",
+ "name": "return failure",
+ "xml": "<return status='failure'>\n<parameter name='error-code' value='200' />\n<parameter name='error-message' value='`$org.onap.ccsdk.sli.adaptors.ansible.message`' />\n",
+ "comments": "",
+ "x": 1050.9166870117188,
+ "y": 403.0833435058594,
+ "z": "7a7e6b0a.b892b4",
+ "wires": []
+ },
+ {
+ "id": "ce572144.693dc",
+ "type": "record",
+ "name": "record",
+ "xml": "<record plugin=\"org.onap.ccsdk.sli.core.sli.recording.Slf4jRecorder\"> \n\t<parameter name=\"logger\" value=\"message-log\"/> \n\t<parameter name=\"field1\" value='Failed to Publish to DMaap'/>",
+ "comments": "",
+ "outputs": 1,
+ "x": 1660.9166870117188,
+ "y": 572.0833511352539,
+ "z": "7a7e6b0a.b892b4",
+ "wires": [
+ []
+ ]
+ },
+ {
+ "id": "1f2da62a.28ed8a",
+ "type": "set",
+ "name": "set",
+ "xml": "<set>\n<parameter name='lcm-dmaap.version' value='`$prop.lcm.dmaap.version`'/>\n<parameter name='lcm-dmaap.correlation-id' value='`$upgrade-pre-check-input.common-header.sub-request-id`'/>\n<parameter name='lcm-dmaap.partition' value='`$prop.lcm.dmaap.partition`'/>\n<parameter name='lcm-dmaap.rpc-name' value='upgrade-pre-check'/>\n<parameter name='lcm-dmaap.type' value='`$prop.lcm.dmaap.type`'/>\n<parameter name='lcm-dmaap.timestamp' value='`$upgrade-pre-check-input.common-header.timestamp`'/>\n<parameter name='lcm-dmaap.api-ver' value='`$upgrade-pre-check-input.common-header.api-ver`'/>\n<parameter name='lcm-dmaap.originator-id' value='`$upgrade-pre-check-input.common-header.originator-id`'/>\n<parameter name='lcm-dmaap.request-id' value='`$upgrade-pre-check-input.common-header.originator-id`'/>\n<parameter name='lcm-dmaap.sub-request-id' value='`$upgrade-pre-check-input.common-header.sub-request-id`'/>\n<parameter name='lcm-dmaap.flags.mode' value='`$upgrade-pre-check-input.common-header.flags.mode`'/>\n<parameter name='lcm-dmaap.flags.force' value='`$upgrade-pre-check-input.common-header.flags.force`'/>\n<parameter name='lcm-dmaap.flags.ttl' value='`$upgrade-pre-check-input.common-header.flags.ttl`'/>\n<parameter name='lcm-dmaap.payload' value='`$org.onap.appc.adapter.ansible.results`'/>\n<parameter name='lcm-dmaap.status.code' value='`$org.onap.ccsdk.sli.adaptors.ansible.result.code`' />\n<parameter name='lcm-dmaap.status.message' value='`$org.onap.ccsdk.sli.adaptors.ansible.message`'/>\n",
+ "comments": "",
+ "x": 1028.0000610351562,
+ "y": 313.0833435058594,
+ "z": "7a7e6b0a.b892b4",
+ "wires": []
+ },
+ {
+ "id": "5f5e27ef.4861c8",
+ "type": "block",
+ "name": "block",
+ "xml": "<block>\n",
+ "atomic": "false",
+ "comments": "",
+ "outputs": 1,
+ "x": 1208.9999389648438,
+ "y": 570.0833206176758,
+ "z": "7a7e6b0a.b892b4",
+ "wires": [
+ [
+ "28dc03a3.89af6c",
+ "ef19c52d.bea5d8",
+ "6abf69d.1e7a698"
+ ]
+ ]
+ },
+ {
+ "id": "ef19c52d.bea5d8",
+ "type": "set",
+ "name": "set",
+ "xml": "<set>\n<parameter name='lcm-dmaap.version' value='`$prop.lcm.dmaap.version`'/>\n<parameter name='lcm-dmaap.correlation-id' value='`$upgrade-pre-check-input.common-header.sub-request-id`'/>\n<parameter name='lcm-dmaap.partition' value='`$prop.lcm.dmaap.partition`'/>\n<parameter name='lcm-dmaap.rpc-name' value='upgrade-pre-check'/>\n<parameter name='lcm-dmaap.type' value='`$prop.lcm.dmaap.type`'/>\n<parameter name='lcm-dmaap.timestamp' value='`$upgrade-pre-check-input.common-header.timestamp`'/>\n<parameter name='lcm-dmaap.api-ver' value='`$upgrade-pre-check-input.common-header.api-ver`'/>\n<parameter name='lcm-dmaap.originator-id' value='`$upgrade-pre-check-input.common-header.originator-id`'/>\n<parameter name='lcm-dmaap.request-id' value='`$upgrade-pre-check-input.common-header.originator-id`'/>\n<parameter name='lcm-dmaap.sub-request-id' value='`$upgrade-pre-check-input.common-header.sub-request-id`'/>\n<parameter name='lcm-dmaap.flags.mode' value='`$upgrade-pre-check-input.common-header.flags.mode`'/>\n<parameter name='lcm-dmaap.flags.force' value='`$upgrade-pre-check-input.common-header.flags.force`'/>\n<parameter name='lcm-dmaap.flags.ttl' value='`$upgrade-pre-check-input.common-header.flags.ttl`'/>\n<parameter name='lcm-dmaap.payload' value='`$org.onap.appc.adapter.ansible.results`'/>\n<parameter name='lcm-dmaap.status.code' value='`$org.onap.ccsdk.sli.adaptors.ansible.result.code`' />\n<parameter name='lcm-dmaap.status.message' value='`$org.onap.ccsdk.sli.adaptors.ansible.message`'/>\n",
+ "comments": "",
+ "x": 1339.1666870117188,
+ "y": 523.0833511352539,
+ "z": "7a7e6b0a.b892b4",
+ "wires": []
+ },
+ {
+ "id": "705657c0.133f18",
+ "type": "not-found",
+ "name": "not-found",
+ "xml": "<outcome value='not-found'>\n",
+ "comments": "",
+ "outputs": 1,
+ "x": 469,
+ "y": 366,
+ "z": "7a7e6b0a.b892b4",
+ "wires": [
+ [
+ "f066b8c5.507f48"
+ ]
+ ]
+ },
+ {
+ "id": "545bbcea.978c14",
+ "type": "set",
+ "name": "set Defaults",
+ "xml": "<set>\n<parameter name='$org.onap.ccsdk.sli.adaptors.ansible.result.code' value='200'/>\n<parameter name='org.onap.ccsdk.sli.adaptors.ansible.message' value='Ansible Adapter was not found'/>\n",
+ "comments": "",
+ "x": 853,
+ "y": 313,
+ "z": "7a7e6b0a.b892b4",
+ "wires": []
+ },
+ {
+ "id": "f066b8c5.507f48",
+ "type": "block",
+ "name": "block",
+ "xml": "<block>\n",
+ "atomic": "false",
+ "comments": "",
+ "outputs": 1,
+ "x": 653,
+ "y": 358,
+ "z": "7a7e6b0a.b892b4",
+ "wires": [
+ [
+ "545bbcea.978c14",
+ "60a0cbe8.afc9c4"
+ ]
+ ]
+ }
+]
\ No newline at end of file diff --git a/platform-logic/lcm/src/main/json/LCM_upgrade-software.json b/platform-logic/lcm/src/main/json/LCM_upgrade-software.json new file mode 100644 index 00000000..7d373b07 --- /dev/null +++ b/platform-logic/lcm/src/main/json/LCM_upgrade-software.json @@ -0,0 +1,466 @@ +[
+ {
+ "id": "cc3bbded.3295a",
+ "type": "method",
+ "name": "upgrade-software",
+ "xml": "<method rpc='upgrade-software' mode='sync'>\n",
+ "comments": "",
+ "outputs": 1,
+ "x": 493,
+ "y": 238,
+ "z": "7a7e6b0a.b892b4",
+ "wires": [
+ [
+ "fcff5cd2.43b9c"
+ ]
+ ]
+ },
+ {
+ "id": "5b46ba23.86b834",
+ "type": "service-logic",
+ "name": "LCM ${project.version}",
+ "module": "LCM",
+ "version": "${project.version}",
+ "comments": "",
+ "xml": "<service-logic xmlns='http://www.onap.org/sdnc/svclogic' xmlns:xsi='http://www.w3.org/2001/XMLSchema-instance' xsi:schemaLocation='http://www.onap.org/sdnc/svclogic ./svclogic.xsd' module='LCM' version='${project.version}'>",
+ "outputs": 1,
+ "x": 280.99993896484375,
+ "y": 239,
+ "z": "7a7e6b0a.b892b4",
+ "wires": [
+ [
+ "cc3bbded.3295a"
+ ]
+ ]
+ },
+ {
+ "id": "6fe211bc.82848",
+ "type": "execute",
+ "name": "execute AnsibleA.reqExec",
+ "xml": "<execute plugin='org.onap.ccsdk.sli.adaptors.ansible.AnsibleAdapter' method='reqExec' >\n<parameter name='AgentUrl' value='`$prop.ansible.agenturl`'/>\n<parameter name='User' value='`$prop.ansible.user`'/>\n<parameter name='Password' value='`prop.ansible.password`'/>\n<parameter name='LocalParameters' value='`$prop.ansible.lcm.localparameters`'/>\n<parameter name='EnvParameters' value='`$upgrade-software-input.payload`'/>\n<parameter name='NodeList' value='`$prop.ansible.nodelist`'/>\n<parameter name='Timeout' value='`$prop.ansible.timeout`'/>\n<parameter name='Version' value='`$prop.ansible.version`'/>\n<parameter name='Id' value='`$upgrade-software-input.common-header.request-id`'/>\n<parameter name='PlaybookName' value='`$prop.lcm.upgrade-software.playbookname`'/>",
+ "comments": "",
+ "outputs": 1,
+ "x": 281.00001525878906,
+ "y": 456,
+ "z": "7a7e6b0a.b892b4",
+ "wires": [
+ [
+ "e2203f54.fc069",
+ "d5304668.3a91b8",
+ "705657c0.133f18"
+ ]
+ ]
+ },
+ {
+ "id": "dca14761.9a3648",
+ "type": "switchNode",
+ "name": "switch",
+ "xml": "<switch test=\"`$org.onap.ccsdk.sli.adaptors.ansible.result.code`\">\n",
+ "comments": "",
+ "outputs": 1,
+ "x": 582,
+ "y": 504,
+ "z": "7a7e6b0a.b892b4",
+ "wires": [
+ [
+ "ea9accf8.5dfd1",
+ "654c296d.357e98",
+ "eedcb18f.2c47d"
+ ]
+ ]
+ },
+ {
+ "id": "ea9accf8.5dfd1",
+ "type": "other",
+ "name": "outcome 500",
+ "xml": "<outcome value='500'>\n",
+ "comments": "",
+ "outputs": 1,
+ "x": 727,
+ "y": 502.00000762939453,
+ "z": "7a7e6b0a.b892b4",
+ "wires": [
+ [
+ "60a0cbe8.afc9c4"
+ ]
+ ]
+ },
+ {
+ "id": "654c296d.357e98",
+ "type": "other",
+ "name": "outcome 100",
+ "xml": "<outcome value='100'>\n",
+ "comments": "",
+ "outputs": 1,
+ "x": 730,
+ "y": 545.0000381469727,
+ "z": "7a7e6b0a.b892b4",
+ "wires": [
+ [
+ "2682f050.3484a"
+ ]
+ ]
+ },
+ {
+ "id": "2682f050.3484a",
+ "type": "execute",
+ "name": "execute reqExecResult",
+ "xml": "<execute plugin='org.onap.ccsdk.sli.adaptors.ansible.AnsibleAdapter' method='reqExecResult' >\n <parameter name='AgentUrl' value='`$prop.ansible.agenturl`'/>\n\t<parameter name='User' value='`$prop.ansible.user`'/>\n\t<parameter name='Password' value='`$prop.ansible.password`'/>\n\t<parameter name='Id' value='`$upgrade-software-input.common-header.request-id`'/>\n\t<parameter name='PlaybookName' value='`$prop.lcm.upgrade-software.playbookname`'/>\n\t\n\n\n\n\n",
+ "comments": "",
+ "outputs": 1,
+ "x": 908.0000305175781,
+ "y": 545.0000381469727,
+ "z": "7a7e6b0a.b892b4",
+ "wires": [
+ [
+ "27413748.995628",
+ "659b0cc2.3ae244"
+ ]
+ ]
+ },
+ {
+ "id": "d5304668.3a91b8",
+ "type": "failure",
+ "name": "failure",
+ "xml": "<outcome value='failure'>\n",
+ "comments": "",
+ "outputs": 1,
+ "x": 473,
+ "y": 413.0000305175781,
+ "z": "7a7e6b0a.b892b4",
+ "wires": [
+ [
+ "60a0cbe8.afc9c4"
+ ]
+ ]
+ },
+ {
+ "id": "e2203f54.fc069",
+ "type": "other",
+ "name": "other",
+ "xml": "<outcome value='Other'>\n",
+ "comments": "",
+ "outputs": 1,
+ "x": 475,
+ "y": 465,
+ "z": "7a7e6b0a.b892b4",
+ "wires": [
+ [
+ "dca14761.9a3648"
+ ]
+ ]
+ },
+ {
+ "id": "27413748.995628",
+ "type": "failure",
+ "name": "failure",
+ "xml": "<outcome value='failure'>\n",
+ "comments": "",
+ "outputs": 1,
+ "x": 1069.0000610351562,
+ "y": 522.0000076293945,
+ "z": "7a7e6b0a.b892b4",
+ "wires": [
+ [
+ "60a0cbe8.afc9c4"
+ ]
+ ]
+ },
+ {
+ "id": "eedcb18f.2c47d",
+ "type": "other",
+ "name": "outcome 101",
+ "xml": "<outcome value='101'>\n",
+ "comments": "",
+ "outputs": 1,
+ "x": 724,
+ "y": 460.00003814697266,
+ "z": "7a7e6b0a.b892b4",
+ "wires": [
+ [
+ "60a0cbe8.afc9c4"
+ ]
+ ]
+ },
+ {
+ "id": "659b0cc2.3ae244",
+ "type": "success",
+ "name": "success",
+ "xml": "<outcome value='success'>\n",
+ "comments": "",
+ "outputs": 1,
+ "x": 1076.0000610351562,
+ "y": 570.0000381469727,
+ "z": "7a7e6b0a.b892b4",
+ "wires": [
+ [
+ "5f5e27ef.4861c8"
+ ]
+ ]
+ },
+ {
+ "id": "6abf69d.1e7a698",
+ "type": "returnSuccess",
+ "name": "return success",
+ "xml": "<return status='success'>\n<parameter name='status.code' value='`$org.onap.ccsdk.sli.adaptors.ansible.result.code`' />\n<parameter name='status.message' value='`$org.onap.ccsdk.sli.adaptors.ansible.message`'/>",
+ "comments": "",
+ "x": 1358.9999389648438,
+ "y": 622.0000381469727,
+ "z": "7a7e6b0a.b892b4",
+ "wires": []
+ },
+ {
+ "id": "6e2017a1.a01658",
+ "type": "dgstart",
+ "name": "DGSTART",
+ "outputs": 1,
+ "x": 96,
+ "y": 238,
+ "z": "7a7e6b0a.b892b4",
+ "wires": [
+ [
+ "5b46ba23.86b834"
+ ]
+ ]
+ },
+ {
+ "id": "fcff5cd2.43b9c",
+ "type": "block",
+ "name": "block",
+ "xml": "<block>\n",
+ "atomic": "false",
+ "comments": "",
+ "outputs": 1,
+ "x": 91.91668701171875,
+ "y": 419.0833435058594,
+ "z": "7a7e6b0a.b892b4",
+ "wires": [
+ [
+ "6fe211bc.82848",
+ "e705bf4e.0297b"
+ ]
+ ]
+ },
+ {
+ "id": "e705bf4e.0297b",
+ "type": "execute",
+ "name": "execute Properties",
+ "xml": "<execute plugin='org.onap.ccsdk.sli.plugins.prop.PropertiesNode' method='readProperties' >\n <parameter name='fileName' value='%SDNC_CONFIG_DIR%/lcm-dg.properties' />\n <parameter name='contextPrefix' value='prop' />\n",
+ "comments": "",
+ "outputs": 1,
+ "x": 265.00001525878906,
+ "y": 401.0833435058594,
+ "z": "7a7e6b0a.b892b4",
+ "wires": [
+ []
+ ]
+ },
+ {
+ "id": "82c6d132.b27fb",
+ "type": "execute",
+ "name": "execute DmaapMsg",
+ "xml": "<execute plugin='org.onap.ccsdk.sli.plugins.restapicall.RestapiCallNode' method='sendRequest' >\n <parameter name='templateFileName' value=\"`$prop.restapi.templateDir + '/' + $prop.restapi.lcm.dmaap.publish.templatefile`\" />\n <parameter name='restapiUrl' value='`$prop.lcm.dmaap.url`' />\n <parameter name='restapiUser' value='`$prop.lcm.dmaap.user`' />\n <parameter name='restapiPassword' value='`$prop.lcm.dmaap.password`' />\n <parameter name='format' value='json' />\n <parameter name='httpMethod' value='POST' />\n <parameter name='contentType' value='application/json' />\n <parameter name=\"responsePrefix\" value=\"lcm\" />\n",
+ "comments": "",
+ "outputs": 1,
+ "x": 1076.0000610351562,
+ "y": 366.0833435058594,
+ "z": "7a7e6b0a.b892b4",
+ "wires": [
+ [
+ "ea1dad62.6b4"
+ ]
+ ]
+ },
+ {
+ "id": "ea1dad62.6b4",
+ "type": "failure",
+ "name": "failure",
+ "xml": "<outcome value='failure'>\n",
+ "comments": "",
+ "outputs": 1,
+ "x": 1246,
+ "y": 365.0833435058594,
+ "z": "7a7e6b0a.b892b4",
+ "wires": [
+ [
+ "8f50a91b.8fa828"
+ ]
+ ]
+ },
+ {
+ "id": "60a0cbe8.afc9c4",
+ "type": "block",
+ "name": "block",
+ "xml": "<block>\n",
+ "atomic": "false",
+ "comments": "",
+ "outputs": 1,
+ "x": 879,
+ "y": 390.0833435058594,
+ "z": "7a7e6b0a.b892b4",
+ "wires": [
+ [
+ "82c6d132.b27fb",
+ "fd02a7ce.bf5098",
+ "1f2da62a.28ed8a"
+ ]
+ ]
+ },
+ {
+ "id": "28dc03a3.89af6c",
+ "type": "execute",
+ "name": "execute DmaapMsg",
+ "xml": "<execute plugin='org.onap.ccsdk.sli.plugins.restapicall.RestapiCallNode' method='sendRequest' >\n <parameter name='templateFileName' value=\"`$prop.restapi.templateDir + '/' + $prop.restapi.lcm.dmaap.publish.templatefile`\" />\n <parameter name='restapiUrl' value='`$prop.lcm.dmaap.url`' />\n <parameter name='restapiUser' value='`$prop.lcm.dmaap.user`' />\n <parameter name='restapiPassword' value='`$prop.lcm.dmaap.password`' />\n <parameter name='format' value='json' />\n <parameter name='httpMethod' value='POST' />\n <parameter name='contentType' value='application/json' />\n <parameter name=\"responsePrefix\" value=\"lcm\" />\n",
+ "comments": "",
+ "outputs": 1,
+ "x": 1379.4999389648438,
+ "y": 571.0833511352539,
+ "z": "7a7e6b0a.b892b4",
+ "wires": [
+ [
+ "672eb6c5.9eeee8"
+ ]
+ ]
+ },
+ {
+ "id": "672eb6c5.9eeee8",
+ "type": "failure",
+ "name": "failure",
+ "xml": "<outcome value='failure'>\n",
+ "comments": "",
+ "outputs": 1,
+ "x": 1539.4999389648438,
+ "y": 571.0833511352539,
+ "z": "7a7e6b0a.b892b4",
+ "wires": [
+ [
+ "ce572144.693dc"
+ ]
+ ]
+ },
+ {
+ "id": "8f50a91b.8fa828",
+ "type": "record",
+ "name": "record",
+ "xml": "<record plugin=\"org.onap.ccsdk.sli.core.sli.recording.Slf4jRecorder\"> \n\t<parameter name=\"logger\" value=\"message-log\"/> \n\t<parameter name=\"field1\" value='Failed to Publish to DMaap'/>",
+ "comments": "",
+ "outputs": 1,
+ "x": 1378,
+ "y": 365.0833435058594,
+ "z": "7a7e6b0a.b892b4",
+ "wires": [
+ []
+ ]
+ },
+ {
+ "id": "fd02a7ce.bf5098",
+ "type": "returnFailure",
+ "name": "return failure",
+ "xml": "<return status='failure'>\n<parameter name='error-code' value='200' />\n<parameter name='error-message' value='`$org.onap.ccsdk.sli.adaptors.ansible.message`' />\n",
+ "comments": "",
+ "x": 1050.9166870117188,
+ "y": 403.0833435058594,
+ "z": "7a7e6b0a.b892b4",
+ "wires": []
+ },
+ {
+ "id": "ce572144.693dc",
+ "type": "record",
+ "name": "record",
+ "xml": "<record plugin=\"org.onap.ccsdk.sli.core.sli.recording.Slf4jRecorder\"> \n\t<parameter name=\"logger\" value=\"message-log\"/> \n\t<parameter name=\"field1\" value='Failed to Publish to DMaap'/>",
+ "comments": "",
+ "outputs": 1,
+ "x": 1660.9166870117188,
+ "y": 572.0833511352539,
+ "z": "7a7e6b0a.b892b4",
+ "wires": [
+ []
+ ]
+ },
+ {
+ "id": "1f2da62a.28ed8a",
+ "type": "set",
+ "name": "set",
+ "xml": "<set>\n<parameter name='lcm-dmaap.version' value='`$prop.lcm.dmaap.version`'/>\n<parameter name='lcm-dmaap.correlation-id' value='`$upgrade-software-input.common-header.sub-request-id`'/>\n<parameter name='lcm-dmaap.partition' value='`$prop.lcm.dmaap.partition`'/>\n<parameter name='lcm-dmaap.rpc-name' value='upgrade-software'/>\n<parameter name='lcm-dmaap.type' value='`$prop.lcm.dmaap.type`'/>\n<parameter name='lcm-dmaap.timestamp' value='`$upgrade-software-input.common-header.timestamp`'/>\n<parameter name='lcm-dmaap.api-ver' value='`$upgrade-software-input.common-header.api-ver`'/>\n<parameter name='lcm-dmaap.originator-id' value='`$upgrade-software-input.common-header.originator-id`'/>\n<parameter name='lcm-dmaap.request-id' value='`$upgrade-software-input.common-header.originator-id`'/>\n<parameter name='lcm-dmaap.sub-request-id' value='`$upgrade-software-input.common-header.sub-request-id`'/>\n<parameter name='lcm-dmaap.flags.mode' value='`$upgrade-software-input.common-header.flags.mode`'/>\n<parameter name='lcm-dmaap.flags.force' value='`$upgrade-software-input.common-header.flags.force`'/>\n<parameter name='lcm-dmaap.flags.ttl' value='`$upgrade-software-input.common-header.flags.ttl`'/>\n<parameter name='lcm-dmaap.payload' value='`$org.onap.appc.adapter.ansible.results`'/>\n<parameter name='lcm-dmaap.status.code' value='`$org.onap.ccsdk.sli.adaptors.ansible.result.code`' />\n<parameter name='lcm-dmaap.status.message' value='`$org.onap.ccsdk.sli.adaptors.ansible.message`'/>\n",
+ "comments": "",
+ "x": 1028.0000610351562,
+ "y": 313.0833435058594,
+ "z": "7a7e6b0a.b892b4",
+ "wires": []
+ },
+ {
+ "id": "5f5e27ef.4861c8",
+ "type": "block",
+ "name": "block",
+ "xml": "<block>\n",
+ "atomic": "false",
+ "comments": "",
+ "outputs": 1,
+ "x": 1208.9999389648438,
+ "y": 570.0833206176758,
+ "z": "7a7e6b0a.b892b4",
+ "wires": [
+ [
+ "28dc03a3.89af6c",
+ "ef19c52d.bea5d8",
+ "6abf69d.1e7a698"
+ ]
+ ]
+ },
+ {
+ "id": "ef19c52d.bea5d8",
+ "type": "set",
+ "name": "set",
+ "xml": "<set>\n<parameter name='lcm-dmaap.version' value='`$prop.lcm.dmaap.version`'/>\n<parameter name='lcm-dmaap.correlation-id' value='`$upgrade-software-input.common-header.sub-request-id`'/>\n<parameter name='lcm-dmaap.partition' value='`$prop.lcm.dmaap.partition`'/>\n<parameter name='lcm-dmaap.rpc-name' value='upgrade-software'/>\n<parameter name='lcm-dmaap.type' value='`$prop.lcm.dmaap.type`'/>\n<parameter name='lcm-dmaap.timestamp' value='`$upgrade-software-input.common-header.timestamp`'/>\n<parameter name='lcm-dmaap.api-ver' value='`$upgrade-software-input.common-header.api-ver`'/>\n<parameter name='lcm-dmaap.originator-id' value='`$upgrade-software-input.common-header.originator-id`'/>\n<parameter name='lcm-dmaap.request-id' value='`$upgrade-software-input.common-header.originator-id`'/>\n<parameter name='lcm-dmaap.sub-request-id' value='`$upgrade-software-input.common-header.sub-request-id`'/>\n<parameter name='lcm-dmaap.flags.mode' value='`$upgrade-software-input.common-header.flags.mode`'/>\n<parameter name='lcm-dmaap.flags.force' value='`$upgrade-software-input.common-header.flags.force`'/>\n<parameter name='lcm-dmaap.flags.ttl' value='`$upgrade-software-input.common-header.flags.ttl`'/>\n<parameter name='lcm-dmaap.payload' value='`$org.onap.appc.adapter.ansible.results`'/>\n<parameter name='lcm-dmaap.status.code' value='`$org.onap.ccsdk.sli.adaptors.ansible.result.code`' />\n<parameter name='lcm-dmaap.status.message' value='`$org.onap.ccsdk.sli.adaptors.ansible.message`'/>\n",
+ "comments": "",
+ "x": 1339.1666870117188,
+ "y": 523.0833511352539,
+ "z": "7a7e6b0a.b892b4",
+ "wires": []
+ },
+ {
+ "id": "705657c0.133f18",
+ "type": "not-found",
+ "name": "not-found",
+ "xml": "<outcome value='not-found'>\n",
+ "comments": "",
+ "outputs": 1,
+ "x": 469,
+ "y": 366,
+ "z": "7a7e6b0a.b892b4",
+ "wires": [
+ [
+ "f066b8c5.507f48"
+ ]
+ ]
+ },
+ {
+ "id": "545bbcea.978c14",
+ "type": "set",
+ "name": "set Defaults",
+ "xml": "<set>\n<parameter name='$org.onap.ccsdk.sli.adaptors.ansible.result.code' value='200'/>\n<parameter name='org.onap.ccsdk.sli.adaptors.ansible.message' value='Ansible Adapter was not found'/>\n",
+ "comments": "",
+ "x": 853,
+ "y": 313,
+ "z": "7a7e6b0a.b892b4",
+ "wires": []
+ },
+ {
+ "id": "f066b8c5.507f48",
+ "type": "block",
+ "name": "block",
+ "xml": "<block>\n",
+ "atomic": "false",
+ "comments": "",
+ "outputs": 1,
+ "x": 653,
+ "y": 358,
+ "z": "7a7e6b0a.b892b4",
+ "wires": [
+ [
+ "545bbcea.978c14",
+ "60a0cbe8.afc9c4"
+ ]
+ ]
+ }
+]
\ No newline at end of file diff --git a/platform-logic/lcm/src/main/resources/graph.versions b/platform-logic/lcm/src/main/resources/graph.versions new file mode 100644 index 00000000..1b3fa12b --- /dev/null +++ b/platform-logic/lcm/src/main/resources/graph.versions @@ -0,0 +1,3 @@ +LCM upgrade-software ${project.version} sync +LCM upgrade-post-check ${project.version} sync +LCM upgrade-pre-check ${project.version} sync 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 new file mode 100644 index 00000000..9569433d --- /dev/null +++ b/platform-logic/lcm/src/main/xml/LCM_upgrade-post-check.xml @@ -0,0 +1,295 @@ +<service-logic
+ xmlns='http://www.onap.org/sdnc/svclogic'
+ xmlns:xsi='http://www.w3.org/2001/XMLSchema-instance' xsi:schemaLocation='http://www.onap.org/sdnc/svclogic ./svclogic.xsd' module='LCM' version='${project.version}'>
+ <method rpc='upgrade-post-check' mode='sync'>
+ <block>
+ <execute plugin='org.onap.ccsdk.sli.plugins.prop.PropertiesNode' method='readProperties' >
+ <parameter name='fileName' value='%SDNC_CONFIG_DIR%/lcm-dg.properties' />
+ <parameter name='contextPrefix' value='prop' />
+ </execute>
+ <execute plugin='org.onap.ccsdk.sli.adaptors.ansible.AnsibleAdapter' method='reqExec' >
+ <parameter name='AgentUrl' value='`$prop.ansible.agenturl`'/>
+ <parameter name='User' value='`$prop.ansible.user`'/>
+ <parameter name='Password' value='`prop.ansible.password`'/>
+ <parameter name='LocalParameters' value='`$prop.ansible.lcm.localparameters`'/>
+ <parameter name='EnvParameters' value='`$upgrade-post-check-input.payload`'/>
+ <parameter name='NodeList' value='`$prop.ansible.nodelist`'/>
+ <parameter name='Timeout' value='`$prop.ansible.timeout`'/>
+ <parameter name='Version' value='`$prop.ansible.version`'/>
+ <parameter name='Id' value='`$upgrade-post-check-input.common-header.request-id`'/>
+ <parameter name='PlaybookName' value='`$prop.lcm.upgrade-post-check.playbookname`'/>
+ <outcome value='not-found'>
+ <block>
+ <set>
+ <parameter name='$org.onap.ccsdk.sli.adaptors.ansible.result.code' value='200'/>
+ <parameter name='org.onap.ccsdk.sli.adaptors.ansible.message' value='Ansible Adapter was not found'/>
+ </set>
+ <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.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.originator-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.payload' value='`$org.onap.appc.adapter.ansible.results`'/>
+ <parameter name='lcm-dmaap.status.code' value='`$org.onap.ccsdk.sli.adaptors.ansible.result.code`' />
+ <parameter name='lcm-dmaap.status.message' value='`$org.onap.ccsdk.sli.adaptors.ansible.message`'/>
+ </set>
+ <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`' />
+ <parameter name='restapiUser' value='`$prop.lcm.dmaap.user`' />
+ <parameter name='restapiPassword' value='`$prop.lcm.dmaap.password`' />
+ <parameter name='format' value='json' />
+ <parameter name='httpMethod' value='POST' />
+ <parameter name='contentType' value='application/json' />
+ <parameter name="responsePrefix" value="lcm" />
+ <outcome value='failure'>
+ <record plugin="org.onap.ccsdk.sli.core.sli.recording.Slf4jRecorder">
+ <parameter name="logger" value="message-log"/>
+ <parameter name="field1" value='Failed to Publish to DMaap'/>
+ </record>
+ </outcome>
+ </execute>
+ <return status='failure'>
+ <parameter name='error-code' value='200' />
+ <parameter name='error-message' value='`$org.onap.ccsdk.sli.adaptors.ansible.message`' />
+ </return>
+ </block>
+ </block>
+ </outcome>
+ <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.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.originator-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.payload' value='`$org.onap.appc.adapter.ansible.results`'/>
+ <parameter name='lcm-dmaap.status.code' value='`$org.onap.ccsdk.sli.adaptors.ansible.result.code`' />
+ <parameter name='lcm-dmaap.status.message' value='`$org.onap.ccsdk.sli.adaptors.ansible.message`'/>
+ </set>
+ <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`' />
+ <parameter name='restapiUser' value='`$prop.lcm.dmaap.user`' />
+ <parameter name='restapiPassword' value='`$prop.lcm.dmaap.password`' />
+ <parameter name='format' value='json' />
+ <parameter name='httpMethod' value='POST' />
+ <parameter name='contentType' value='application/json' />
+ <parameter name="responsePrefix" value="lcm" />
+ <outcome value='failure'>
+ <record plugin="org.onap.ccsdk.sli.core.sli.recording.Slf4jRecorder">
+ <parameter name="logger" value="message-log"/>
+ <parameter name="field1" value='Failed to Publish to DMaap'/>
+ </record>
+ </outcome>
+ </execute>
+ <return status='failure'>
+ <parameter name='error-code' value='200' />
+ <parameter name='error-message' value='`$org.onap.ccsdk.sli.adaptors.ansible.message`' />
+ </return>
+ </block>
+ </outcome>
+ <outcome value='Other'>
+ <switch test="`$org.onap.ccsdk.sli.adaptors.ansible.result.code`">
+ <outcome value='101'>
+ <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.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.originator-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.payload' value='`$org.onap.appc.adapter.ansible.results`'/>
+ <parameter name='lcm-dmaap.status.code' value='`$org.onap.ccsdk.sli.adaptors.ansible.result.code`' />
+ <parameter name='lcm-dmaap.status.message' value='`$org.onap.ccsdk.sli.adaptors.ansible.message`'/>
+ </set>
+ <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`' />
+ <parameter name='restapiUser' value='`$prop.lcm.dmaap.user`' />
+ <parameter name='restapiPassword' value='`$prop.lcm.dmaap.password`' />
+ <parameter name='format' value='json' />
+ <parameter name='httpMethod' value='POST' />
+ <parameter name='contentType' value='application/json' />
+ <parameter name="responsePrefix" value="lcm" />
+ <outcome value='failure'>
+ <record plugin="org.onap.ccsdk.sli.core.sli.recording.Slf4jRecorder">
+ <parameter name="logger" value="message-log"/>
+ <parameter name="field1" value='Failed to Publish to DMaap'/>
+ </record>
+ </outcome>
+ </execute>
+ <return status='failure'>
+ <parameter name='error-code' value='200' />
+ <parameter name='error-message' value='`$org.onap.ccsdk.sli.adaptors.ansible.message`' />
+ </return>
+ </block>
+ </outcome>
+ <outcome value='500'>
+ <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.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.originator-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.payload' value='`$org.onap.appc.adapter.ansible.results`'/>
+ <parameter name='lcm-dmaap.status.code' value='`$org.onap.ccsdk.sli.adaptors.ansible.result.code`' />
+ <parameter name='lcm-dmaap.status.message' value='`$org.onap.ccsdk.sli.adaptors.ansible.message`'/>
+ </set>
+ <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`' />
+ <parameter name='restapiUser' value='`$prop.lcm.dmaap.user`' />
+ <parameter name='restapiPassword' value='`$prop.lcm.dmaap.password`' />
+ <parameter name='format' value='json' />
+ <parameter name='httpMethod' value='POST' />
+ <parameter name='contentType' value='application/json' />
+ <parameter name="responsePrefix" value="lcm" />
+ <outcome value='failure'>
+ <record plugin="org.onap.ccsdk.sli.core.sli.recording.Slf4jRecorder">
+ <parameter name="logger" value="message-log"/>
+ <parameter name="field1" value='Failed to Publish to DMaap'/>
+ </record>
+ </outcome>
+ </execute>
+ <return status='failure'>
+ <parameter name='error-code' value='200' />
+ <parameter name='error-message' value='`$org.onap.ccsdk.sli.adaptors.ansible.message`' />
+ </return>
+ </block>
+ </outcome>
+ <outcome value='100'>
+ <execute plugin='org.onap.ccsdk.sli.adaptors.ansible.AnsibleAdapter' method='reqExecResult' >
+ <parameter name='AgentUrl' value='`$prop.ansible.agenturl`'/>
+ <parameter name='User' value='`$prop.ansible.user`'/>
+ <parameter name='Password' value='`$prop.ansible.password`'/>
+ <parameter name='Id' value='`$upgrade-post-check-input.common-header.request-id`'/>
+ <parameter name='PlaybookName' value='`$prop.lcm.upgrade-post-check.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.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.originator-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.payload' value='`$org.onap.appc.adapter.ansible.results`'/>
+ <parameter name='lcm-dmaap.status.code' value='`$org.onap.ccsdk.sli.adaptors.ansible.result.code`' />
+ <parameter name='lcm-dmaap.status.message' value='`$org.onap.ccsdk.sli.adaptors.ansible.message`'/>
+ </set>
+ <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`' />
+ <parameter name='restapiUser' value='`$prop.lcm.dmaap.user`' />
+ <parameter name='restapiPassword' value='`$prop.lcm.dmaap.password`' />
+ <parameter name='format' value='json' />
+ <parameter name='httpMethod' value='POST' />
+ <parameter name='contentType' value='application/json' />
+ <parameter name="responsePrefix" value="lcm" />
+ <outcome value='failure'>
+ <record plugin="org.onap.ccsdk.sli.core.sli.recording.Slf4jRecorder">
+ <parameter name="logger" value="message-log"/>
+ <parameter name="field1" value='Failed to Publish to DMaap'/>
+ </record>
+ </outcome>
+ </execute>
+ <return status='failure'>
+ <parameter name='error-code' value='200' />
+ <parameter name='error-message' value='`$org.onap.ccsdk.sli.adaptors.ansible.message`' />
+ </return>
+ </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.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.originator-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.payload' value='`$org.onap.appc.adapter.ansible.results`'/>
+ <parameter name='lcm-dmaap.status.code' value='`$org.onap.ccsdk.sli.adaptors.ansible.result.code`' />
+ <parameter name='lcm-dmaap.status.message' value='`$org.onap.ccsdk.sli.adaptors.ansible.message`'/>
+ </set>
+ <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`' />
+ <parameter name='restapiUser' value='`$prop.lcm.dmaap.user`' />
+ <parameter name='restapiPassword' value='`$prop.lcm.dmaap.password`' />
+ <parameter name='format' value='json' />
+ <parameter name='httpMethod' value='POST' />
+ <parameter name='contentType' value='application/json' />
+ <parameter name="responsePrefix" value="lcm" />
+ <outcome value='failure'>
+ <record plugin="org.onap.ccsdk.sli.core.sli.recording.Slf4jRecorder">
+ <parameter name="logger" value="message-log"/>
+ <parameter name="field1" value='Failed to Publish to DMaap'/>
+ </record>
+ </outcome>
+ </execute>
+ <return status='success'>
+ <parameter name='status.code' value='`$org.onap.ccsdk.sli.adaptors.ansible.result.code`' />
+ <parameter name='status.message' value='`$org.onap.ccsdk.sli.adaptors.ansible.message`'/>
+ </return>
+ </block>
+ </outcome>
+ </execute>
+ </outcome>
+ </switch>
+ </outcome>
+ </execute>
+ </block>
+ </method>
+</service-logic>
\ No newline at end of file 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 new file mode 100644 index 00000000..da83a54d --- /dev/null +++ b/platform-logic/lcm/src/main/xml/LCM_upgrade-pre-check.xml @@ -0,0 +1,295 @@ +<service-logic
+ xmlns='http://www.onap.org/sdnc/svclogic'
+ xmlns:xsi='http://www.w3.org/2001/XMLSchema-instance' xsi:schemaLocation='http://www.onap.org/sdnc/svclogic ./svclogic.xsd' module='LCM' version='${project.version}'>
+ <method rpc='upgrade-pre-check' mode='sync'>
+ <block>
+ <execute plugin='org.onap.ccsdk.sli.plugins.prop.PropertiesNode' method='readProperties' >
+ <parameter name='fileName' value='%SDNC_CONFIG_DIR%/lcm-dg.properties' />
+ <parameter name='contextPrefix' value='prop' />
+ </execute>
+ <execute plugin='org.onap.ccsdk.sli.adaptors.ansible.AnsibleAdapter' method='reqExec' >
+ <parameter name='AgentUrl' value='`$prop.ansible.agenturl`'/>
+ <parameter name='User' value='`$prop.ansible.user`'/>
+ <parameter name='Password' value='`prop.ansible.password`'/>
+ <parameter name='LocalParameters' value='`$prop.ansible.lcm.localparameters`'/>
+ <parameter name='EnvParameters' value='`$upgrade-pre-check-input.payload`'/>
+ <parameter name='NodeList' value='`$prop.ansible.nodelist`'/>
+ <parameter name='Timeout' value='`$prop.ansible.timeout`'/>
+ <parameter name='Version' value='`$prop.ansible.version`'/>
+ <parameter name='Id' value='`$upgrade-pre-check-input.common-header.request-id`'/>
+ <parameter name='PlaybookName' value='`$prop.lcm.upgrade-pre-check.playbookname`'/>
+ <outcome value='not-found'>
+ <block>
+ <set>
+ <parameter name='$org.onap.ccsdk.sli.adaptors.ansible.result.code' value='200'/>
+ <parameter name='org.onap.ccsdk.sli.adaptors.ansible.message' value='Ansible Adapter was not found'/>
+ </set>
+ <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.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.originator-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.payload' value='`$org.onap.appc.adapter.ansible.results`'/>
+ <parameter name='lcm-dmaap.status.code' value='`$org.onap.ccsdk.sli.adaptors.ansible.result.code`' />
+ <parameter name='lcm-dmaap.status.message' value='`$org.onap.ccsdk.sli.adaptors.ansible.message`'/>
+ </set>
+ <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`' />
+ <parameter name='restapiUser' value='`$prop.lcm.dmaap.user`' />
+ <parameter name='restapiPassword' value='`$prop.lcm.dmaap.password`' />
+ <parameter name='format' value='json' />
+ <parameter name='httpMethod' value='POST' />
+ <parameter name='contentType' value='application/json' />
+ <parameter name="responsePrefix" value="lcm" />
+ <outcome value='failure'>
+ <record plugin="org.onap.ccsdk.sli.core.sli.recording.Slf4jRecorder">
+ <parameter name="logger" value="message-log"/>
+ <parameter name="field1" value='Failed to Publish to DMaap'/>
+ </record>
+ </outcome>
+ </execute>
+ <return status='failure'>
+ <parameter name='error-code' value='200' />
+ <parameter name='error-message' value='`$org.onap.ccsdk.sli.adaptors.ansible.message`' />
+ </return>
+ </block>
+ </block>
+ </outcome>
+ <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.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.originator-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.payload' value='`$org.onap.appc.adapter.ansible.results`'/>
+ <parameter name='lcm-dmaap.status.code' value='`$org.onap.ccsdk.sli.adaptors.ansible.result.code`' />
+ <parameter name='lcm-dmaap.status.message' value='`$org.onap.ccsdk.sli.adaptors.ansible.message`'/>
+ </set>
+ <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`' />
+ <parameter name='restapiUser' value='`$prop.lcm.dmaap.user`' />
+ <parameter name='restapiPassword' value='`$prop.lcm.dmaap.password`' />
+ <parameter name='format' value='json' />
+ <parameter name='httpMethod' value='POST' />
+ <parameter name='contentType' value='application/json' />
+ <parameter name="responsePrefix" value="lcm" />
+ <outcome value='failure'>
+ <record plugin="org.onap.ccsdk.sli.core.sli.recording.Slf4jRecorder">
+ <parameter name="logger" value="message-log"/>
+ <parameter name="field1" value='Failed to Publish to DMaap'/>
+ </record>
+ </outcome>
+ </execute>
+ <return status='failure'>
+ <parameter name='error-code' value='200' />
+ <parameter name='error-message' value='`$org.onap.ccsdk.sli.adaptors.ansible.message`' />
+ </return>
+ </block>
+ </outcome>
+ <outcome value='Other'>
+ <switch test="`$org.onap.ccsdk.sli.adaptors.ansible.result.code`">
+ <outcome value='101'>
+ <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.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.originator-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.payload' value='`$org.onap.appc.adapter.ansible.results`'/>
+ <parameter name='lcm-dmaap.status.code' value='`$org.onap.ccsdk.sli.adaptors.ansible.result.code`' />
+ <parameter name='lcm-dmaap.status.message' value='`$org.onap.ccsdk.sli.adaptors.ansible.message`'/>
+ </set>
+ <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`' />
+ <parameter name='restapiUser' value='`$prop.lcm.dmaap.user`' />
+ <parameter name='restapiPassword' value='`$prop.lcm.dmaap.password`' />
+ <parameter name='format' value='json' />
+ <parameter name='httpMethod' value='POST' />
+ <parameter name='contentType' value='application/json' />
+ <parameter name="responsePrefix" value="lcm" />
+ <outcome value='failure'>
+ <record plugin="org.onap.ccsdk.sli.core.sli.recording.Slf4jRecorder">
+ <parameter name="logger" value="message-log"/>
+ <parameter name="field1" value='Failed to Publish to DMaap'/>
+ </record>
+ </outcome>
+ </execute>
+ <return status='failure'>
+ <parameter name='error-code' value='200' />
+ <parameter name='error-message' value='`$org.onap.ccsdk.sli.adaptors.ansible.message`' />
+ </return>
+ </block>
+ </outcome>
+ <outcome value='500'>
+ <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.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.originator-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.payload' value='`$org.onap.appc.adapter.ansible.results`'/>
+ <parameter name='lcm-dmaap.status.code' value='`$org.onap.ccsdk.sli.adaptors.ansible.result.code`' />
+ <parameter name='lcm-dmaap.status.message' value='`$org.onap.ccsdk.sli.adaptors.ansible.message`'/>
+ </set>
+ <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`' />
+ <parameter name='restapiUser' value='`$prop.lcm.dmaap.user`' />
+ <parameter name='restapiPassword' value='`$prop.lcm.dmaap.password`' />
+ <parameter name='format' value='json' />
+ <parameter name='httpMethod' value='POST' />
+ <parameter name='contentType' value='application/json' />
+ <parameter name="responsePrefix" value="lcm" />
+ <outcome value='failure'>
+ <record plugin="org.onap.ccsdk.sli.core.sli.recording.Slf4jRecorder">
+ <parameter name="logger" value="message-log"/>
+ <parameter name="field1" value='Failed to Publish to DMaap'/>
+ </record>
+ </outcome>
+ </execute>
+ <return status='failure'>
+ <parameter name='error-code' value='200' />
+ <parameter name='error-message' value='`$org.onap.ccsdk.sli.adaptors.ansible.message`' />
+ </return>
+ </block>
+ </outcome>
+ <outcome value='100'>
+ <execute plugin='org.onap.ccsdk.sli.adaptors.ansible.AnsibleAdapter' method='reqExecResult' >
+ <parameter name='AgentUrl' value='`$prop.ansible.agenturl`'/>
+ <parameter name='User' value='`$prop.ansible.user`'/>
+ <parameter name='Password' value='`$prop.ansible.password`'/>
+ <parameter name='Id' value='`$upgrade-pre-check-input.common-header.request-id`'/>
+ <parameter name='PlaybookName' value='`$prop.lcm.upgrade-pre-check.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.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.originator-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.payload' value='`$org.onap.appc.adapter.ansible.results`'/>
+ <parameter name='lcm-dmaap.status.code' value='`$org.onap.ccsdk.sli.adaptors.ansible.result.code`' />
+ <parameter name='lcm-dmaap.status.message' value='`$org.onap.ccsdk.sli.adaptors.ansible.message`'/>
+ </set>
+ <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`' />
+ <parameter name='restapiUser' value='`$prop.lcm.dmaap.user`' />
+ <parameter name='restapiPassword' value='`$prop.lcm.dmaap.password`' />
+ <parameter name='format' value='json' />
+ <parameter name='httpMethod' value='POST' />
+ <parameter name='contentType' value='application/json' />
+ <parameter name="responsePrefix" value="lcm" />
+ <outcome value='failure'>
+ <record plugin="org.onap.ccsdk.sli.core.sli.recording.Slf4jRecorder">
+ <parameter name="logger" value="message-log"/>
+ <parameter name="field1" value='Failed to Publish to DMaap'/>
+ </record>
+ </outcome>
+ </execute>
+ <return status='failure'>
+ <parameter name='error-code' value='200' />
+ <parameter name='error-message' value='`$org.onap.ccsdk.sli.adaptors.ansible.message`' />
+ </return>
+ </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.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.originator-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.payload' value='`$org.onap.appc.adapter.ansible.results`'/>
+ <parameter name='lcm-dmaap.status.code' value='`$org.onap.ccsdk.sli.adaptors.ansible.result.code`' />
+ <parameter name='lcm-dmaap.status.message' value='`$org.onap.ccsdk.sli.adaptors.ansible.message`'/>
+ </set>
+ <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`' />
+ <parameter name='restapiUser' value='`$prop.lcm.dmaap.user`' />
+ <parameter name='restapiPassword' value='`$prop.lcm.dmaap.password`' />
+ <parameter name='format' value='json' />
+ <parameter name='httpMethod' value='POST' />
+ <parameter name='contentType' value='application/json' />
+ <parameter name="responsePrefix" value="lcm" />
+ <outcome value='failure'>
+ <record plugin="org.onap.ccsdk.sli.core.sli.recording.Slf4jRecorder">
+ <parameter name="logger" value="message-log"/>
+ <parameter name="field1" value='Failed to Publish to DMaap'/>
+ </record>
+ </outcome>
+ </execute>
+ <return status='success'>
+ <parameter name='status.code' value='`$org.onap.ccsdk.sli.adaptors.ansible.result.code`' />
+ <parameter name='status.message' value='`$org.onap.ccsdk.sli.adaptors.ansible.message`'/>
+ </return>
+ </block>
+ </outcome>
+ </execute>
+ </outcome>
+ </switch>
+ </outcome>
+ </execute>
+ </block>
+ </method>
+</service-logic>
\ No newline at end of file diff --git a/platform-logic/lcm/src/main/xml/LCM_upgrade-software.xml b/platform-logic/lcm/src/main/xml/LCM_upgrade-software.xml new file mode 100644 index 00000000..e3ce5afb --- /dev/null +++ b/platform-logic/lcm/src/main/xml/LCM_upgrade-software.xml @@ -0,0 +1,295 @@ +<service-logic
+ xmlns='http://www.onap.org/sdnc/svclogic'
+ xmlns:xsi='http://www.w3.org/2001/XMLSchema-instance' xsi:schemaLocation='http://www.onap.org/sdnc/svclogic ./svclogic.xsd' module='LCM' version='${project.version}'>
+ <method rpc='upgrade-software' mode='sync'>
+ <block>
+ <execute plugin='org.onap.ccsdk.sli.plugins.prop.PropertiesNode' method='readProperties' >
+ <parameter name='fileName' value='%SDNC_CONFIG_DIR%/lcm-dg.properties' />
+ <parameter name='contextPrefix' value='prop' />
+ </execute>
+ <execute plugin='org.onap.ccsdk.sli.adaptors.ansible.AnsibleAdapter' method='reqExec' >
+ <parameter name='AgentUrl' value='`$prop.ansible.agenturl`'/>
+ <parameter name='User' value='`$prop.ansible.user`'/>
+ <parameter name='Password' value='`prop.ansible.password`'/>
+ <parameter name='LocalParameters' value='`$prop.ansible.lcm.localparameters`'/>
+ <parameter name='EnvParameters' value='`$upgrade-software-input.payload`'/>
+ <parameter name='NodeList' value='`$prop.ansible.nodelist`'/>
+ <parameter name='Timeout' value='`$prop.ansible.timeout`'/>
+ <parameter name='Version' value='`$prop.ansible.version`'/>
+ <parameter name='Id' value='`$upgrade-software-input.common-header.request-id`'/>
+ <parameter name='PlaybookName' value='`$prop.lcm.upgrade-software.playbookname`'/>
+ <outcome value='not-found'>
+ <block>
+ <set>
+ <parameter name='$org.onap.ccsdk.sli.adaptors.ansible.result.code' value='200'/>
+ <parameter name='org.onap.ccsdk.sli.adaptors.ansible.message' value='Ansible Adapter was not found'/>
+ </set>
+ <block>
+ <set>
+ <parameter name='lcm-dmaap.version' value='`$prop.lcm.dmaap.version`'/>
+ <parameter name='lcm-dmaap.correlation-id' value='`$upgrade-software-input.common-header.sub-request-id`'/>
+ <parameter name='lcm-dmaap.partition' value='`$prop.lcm.dmaap.partition`'/>
+ <parameter name='lcm-dmaap.rpc-name' value='upgrade-software'/>
+ <parameter name='lcm-dmaap.type' value='`$prop.lcm.dmaap.type`'/>
+ <parameter name='lcm-dmaap.timestamp' value='`$upgrade-software-input.common-header.timestamp`'/>
+ <parameter name='lcm-dmaap.api-ver' value='`$upgrade-software-input.common-header.api-ver`'/>
+ <parameter name='lcm-dmaap.originator-id' value='`$upgrade-software-input.common-header.originator-id`'/>
+ <parameter name='lcm-dmaap.request-id' value='`$upgrade-software-input.common-header.originator-id`'/>
+ <parameter name='lcm-dmaap.sub-request-id' value='`$upgrade-software-input.common-header.sub-request-id`'/>
+ <parameter name='lcm-dmaap.flags.mode' value='`$upgrade-software-input.common-header.flags.mode`'/>
+ <parameter name='lcm-dmaap.flags.force' value='`$upgrade-software-input.common-header.flags.force`'/>
+ <parameter name='lcm-dmaap.flags.ttl' value='`$upgrade-software-input.common-header.flags.ttl`'/>
+ <parameter name='lcm-dmaap.payload' value='`$org.onap.appc.adapter.ansible.results`'/>
+ <parameter name='lcm-dmaap.status.code' value='`$org.onap.ccsdk.sli.adaptors.ansible.result.code`' />
+ <parameter name='lcm-dmaap.status.message' value='`$org.onap.ccsdk.sli.adaptors.ansible.message`'/>
+ </set>
+ <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`' />
+ <parameter name='restapiUser' value='`$prop.lcm.dmaap.user`' />
+ <parameter name='restapiPassword' value='`$prop.lcm.dmaap.password`' />
+ <parameter name='format' value='json' />
+ <parameter name='httpMethod' value='POST' />
+ <parameter name='contentType' value='application/json' />
+ <parameter name="responsePrefix" value="lcm" />
+ <outcome value='failure'>
+ <record plugin="org.onap.ccsdk.sli.core.sli.recording.Slf4jRecorder">
+ <parameter name="logger" value="message-log"/>
+ <parameter name="field1" value='Failed to Publish to DMaap'/>
+ </record>
+ </outcome>
+ </execute>
+ <return status='failure'>
+ <parameter name='error-code' value='200' />
+ <parameter name='error-message' value='`$org.onap.ccsdk.sli.adaptors.ansible.message`' />
+ </return>
+ </block>
+ </block>
+ </outcome>
+ <outcome value='failure'>
+ <block>
+ <set>
+ <parameter name='lcm-dmaap.version' value='`$prop.lcm.dmaap.version`'/>
+ <parameter name='lcm-dmaap.correlation-id' value='`$upgrade-software-input.common-header.sub-request-id`'/>
+ <parameter name='lcm-dmaap.partition' value='`$prop.lcm.dmaap.partition`'/>
+ <parameter name='lcm-dmaap.rpc-name' value='upgrade-software'/>
+ <parameter name='lcm-dmaap.type' value='`$prop.lcm.dmaap.type`'/>
+ <parameter name='lcm-dmaap.timestamp' value='`$upgrade-software-input.common-header.timestamp`'/>
+ <parameter name='lcm-dmaap.api-ver' value='`$upgrade-software-input.common-header.api-ver`'/>
+ <parameter name='lcm-dmaap.originator-id' value='`$upgrade-software-input.common-header.originator-id`'/>
+ <parameter name='lcm-dmaap.request-id' value='`$upgrade-software-input.common-header.originator-id`'/>
+ <parameter name='lcm-dmaap.sub-request-id' value='`$upgrade-software-input.common-header.sub-request-id`'/>
+ <parameter name='lcm-dmaap.flags.mode' value='`$upgrade-software-input.common-header.flags.mode`'/>
+ <parameter name='lcm-dmaap.flags.force' value='`$upgrade-software-input.common-header.flags.force`'/>
+ <parameter name='lcm-dmaap.flags.ttl' value='`$upgrade-software-input.common-header.flags.ttl`'/>
+ <parameter name='lcm-dmaap.payload' value='`$org.onap.appc.adapter.ansible.results`'/>
+ <parameter name='lcm-dmaap.status.code' value='`$org.onap.ccsdk.sli.adaptors.ansible.result.code`' />
+ <parameter name='lcm-dmaap.status.message' value='`$org.onap.ccsdk.sli.adaptors.ansible.message`'/>
+ </set>
+ <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`' />
+ <parameter name='restapiUser' value='`$prop.lcm.dmaap.user`' />
+ <parameter name='restapiPassword' value='`$prop.lcm.dmaap.password`' />
+ <parameter name='format' value='json' />
+ <parameter name='httpMethod' value='POST' />
+ <parameter name='contentType' value='application/json' />
+ <parameter name="responsePrefix" value="lcm" />
+ <outcome value='failure'>
+ <record plugin="org.onap.ccsdk.sli.core.sli.recording.Slf4jRecorder">
+ <parameter name="logger" value="message-log"/>
+ <parameter name="field1" value='Failed to Publish to DMaap'/>
+ </record>
+ </outcome>
+ </execute>
+ <return status='failure'>
+ <parameter name='error-code' value='200' />
+ <parameter name='error-message' value='`$org.onap.ccsdk.sli.adaptors.ansible.message`' />
+ </return>
+ </block>
+ </outcome>
+ <outcome value='Other'>
+ <switch test="`$org.onap.ccsdk.sli.adaptors.ansible.result.code`">
+ <outcome value='101'>
+ <block>
+ <set>
+ <parameter name='lcm-dmaap.version' value='`$prop.lcm.dmaap.version`'/>
+ <parameter name='lcm-dmaap.correlation-id' value='`$upgrade-software-input.common-header.sub-request-id`'/>
+ <parameter name='lcm-dmaap.partition' value='`$prop.lcm.dmaap.partition`'/>
+ <parameter name='lcm-dmaap.rpc-name' value='upgrade-software'/>
+ <parameter name='lcm-dmaap.type' value='`$prop.lcm.dmaap.type`'/>
+ <parameter name='lcm-dmaap.timestamp' value='`$upgrade-software-input.common-header.timestamp`'/>
+ <parameter name='lcm-dmaap.api-ver' value='`$upgrade-software-input.common-header.api-ver`'/>
+ <parameter name='lcm-dmaap.originator-id' value='`$upgrade-software-input.common-header.originator-id`'/>
+ <parameter name='lcm-dmaap.request-id' value='`$upgrade-software-input.common-header.originator-id`'/>
+ <parameter name='lcm-dmaap.sub-request-id' value='`$upgrade-software-input.common-header.sub-request-id`'/>
+ <parameter name='lcm-dmaap.flags.mode' value='`$upgrade-software-input.common-header.flags.mode`'/>
+ <parameter name='lcm-dmaap.flags.force' value='`$upgrade-software-input.common-header.flags.force`'/>
+ <parameter name='lcm-dmaap.flags.ttl' value='`$upgrade-software-input.common-header.flags.ttl`'/>
+ <parameter name='lcm-dmaap.payload' value='`$org.onap.appc.adapter.ansible.results`'/>
+ <parameter name='lcm-dmaap.status.code' value='`$org.onap.ccsdk.sli.adaptors.ansible.result.code`' />
+ <parameter name='lcm-dmaap.status.message' value='`$org.onap.ccsdk.sli.adaptors.ansible.message`'/>
+ </set>
+ <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`' />
+ <parameter name='restapiUser' value='`$prop.lcm.dmaap.user`' />
+ <parameter name='restapiPassword' value='`$prop.lcm.dmaap.password`' />
+ <parameter name='format' value='json' />
+ <parameter name='httpMethod' value='POST' />
+ <parameter name='contentType' value='application/json' />
+ <parameter name="responsePrefix" value="lcm" />
+ <outcome value='failure'>
+ <record plugin="org.onap.ccsdk.sli.core.sli.recording.Slf4jRecorder">
+ <parameter name="logger" value="message-log"/>
+ <parameter name="field1" value='Failed to Publish to DMaap'/>
+ </record>
+ </outcome>
+ </execute>
+ <return status='failure'>
+ <parameter name='error-code' value='200' />
+ <parameter name='error-message' value='`$org.onap.ccsdk.sli.adaptors.ansible.message`' />
+ </return>
+ </block>
+ </outcome>
+ <outcome value='500'>
+ <block>
+ <set>
+ <parameter name='lcm-dmaap.version' value='`$prop.lcm.dmaap.version`'/>
+ <parameter name='lcm-dmaap.correlation-id' value='`$upgrade-software-input.common-header.sub-request-id`'/>
+ <parameter name='lcm-dmaap.partition' value='`$prop.lcm.dmaap.partition`'/>
+ <parameter name='lcm-dmaap.rpc-name' value='upgrade-software'/>
+ <parameter name='lcm-dmaap.type' value='`$prop.lcm.dmaap.type`'/>
+ <parameter name='lcm-dmaap.timestamp' value='`$upgrade-software-input.common-header.timestamp`'/>
+ <parameter name='lcm-dmaap.api-ver' value='`$upgrade-software-input.common-header.api-ver`'/>
+ <parameter name='lcm-dmaap.originator-id' value='`$upgrade-software-input.common-header.originator-id`'/>
+ <parameter name='lcm-dmaap.request-id' value='`$upgrade-software-input.common-header.originator-id`'/>
+ <parameter name='lcm-dmaap.sub-request-id' value='`$upgrade-software-input.common-header.sub-request-id`'/>
+ <parameter name='lcm-dmaap.flags.mode' value='`$upgrade-software-input.common-header.flags.mode`'/>
+ <parameter name='lcm-dmaap.flags.force' value='`$upgrade-software-input.common-header.flags.force`'/>
+ <parameter name='lcm-dmaap.flags.ttl' value='`$upgrade-software-input.common-header.flags.ttl`'/>
+ <parameter name='lcm-dmaap.payload' value='`$org.onap.appc.adapter.ansible.results`'/>
+ <parameter name='lcm-dmaap.status.code' value='`$org.onap.ccsdk.sli.adaptors.ansible.result.code`' />
+ <parameter name='lcm-dmaap.status.message' value='`$org.onap.ccsdk.sli.adaptors.ansible.message`'/>
+ </set>
+ <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`' />
+ <parameter name='restapiUser' value='`$prop.lcm.dmaap.user`' />
+ <parameter name='restapiPassword' value='`$prop.lcm.dmaap.password`' />
+ <parameter name='format' value='json' />
+ <parameter name='httpMethod' value='POST' />
+ <parameter name='contentType' value='application/json' />
+ <parameter name="responsePrefix" value="lcm" />
+ <outcome value='failure'>
+ <record plugin="org.onap.ccsdk.sli.core.sli.recording.Slf4jRecorder">
+ <parameter name="logger" value="message-log"/>
+ <parameter name="field1" value='Failed to Publish to DMaap'/>
+ </record>
+ </outcome>
+ </execute>
+ <return status='failure'>
+ <parameter name='error-code' value='200' />
+ <parameter name='error-message' value='`$org.onap.ccsdk.sli.adaptors.ansible.message`' />
+ </return>
+ </block>
+ </outcome>
+ <outcome value='100'>
+ <execute plugin='org.onap.ccsdk.sli.adaptors.ansible.AnsibleAdapter' method='reqExecResult' >
+ <parameter name='AgentUrl' value='`$prop.ansible.agenturl`'/>
+ <parameter name='User' value='`$prop.ansible.user`'/>
+ <parameter name='Password' value='`$prop.ansible.password`'/>
+ <parameter name='Id' value='`$upgrade-software-input.common-header.request-id`'/>
+ <parameter name='PlaybookName' value='`$prop.lcm.upgrade-software.playbookname`'/>
+ <outcome value='failure'>
+ <block>
+ <set>
+ <parameter name='lcm-dmaap.version' value='`$prop.lcm.dmaap.version`'/>
+ <parameter name='lcm-dmaap.correlation-id' value='`$upgrade-software-input.common-header.sub-request-id`'/>
+ <parameter name='lcm-dmaap.partition' value='`$prop.lcm.dmaap.partition`'/>
+ <parameter name='lcm-dmaap.rpc-name' value='upgrade-software'/>
+ <parameter name='lcm-dmaap.type' value='`$prop.lcm.dmaap.type`'/>
+ <parameter name='lcm-dmaap.timestamp' value='`$upgrade-software-input.common-header.timestamp`'/>
+ <parameter name='lcm-dmaap.api-ver' value='`$upgrade-software-input.common-header.api-ver`'/>
+ <parameter name='lcm-dmaap.originator-id' value='`$upgrade-software-input.common-header.originator-id`'/>
+ <parameter name='lcm-dmaap.request-id' value='`$upgrade-software-input.common-header.originator-id`'/>
+ <parameter name='lcm-dmaap.sub-request-id' value='`$upgrade-software-input.common-header.sub-request-id`'/>
+ <parameter name='lcm-dmaap.flags.mode' value='`$upgrade-software-input.common-header.flags.mode`'/>
+ <parameter name='lcm-dmaap.flags.force' value='`$upgrade-software-input.common-header.flags.force`'/>
+ <parameter name='lcm-dmaap.flags.ttl' value='`$upgrade-software-input.common-header.flags.ttl`'/>
+ <parameter name='lcm-dmaap.payload' value='`$org.onap.appc.adapter.ansible.results`'/>
+ <parameter name='lcm-dmaap.status.code' value='`$org.onap.ccsdk.sli.adaptors.ansible.result.code`' />
+ <parameter name='lcm-dmaap.status.message' value='`$org.onap.ccsdk.sli.adaptors.ansible.message`'/>
+ </set>
+ <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`' />
+ <parameter name='restapiUser' value='`$prop.lcm.dmaap.user`' />
+ <parameter name='restapiPassword' value='`$prop.lcm.dmaap.password`' />
+ <parameter name='format' value='json' />
+ <parameter name='httpMethod' value='POST' />
+ <parameter name='contentType' value='application/json' />
+ <parameter name="responsePrefix" value="lcm" />
+ <outcome value='failure'>
+ <record plugin="org.onap.ccsdk.sli.core.sli.recording.Slf4jRecorder">
+ <parameter name="logger" value="message-log"/>
+ <parameter name="field1" value='Failed to Publish to DMaap'/>
+ </record>
+ </outcome>
+ </execute>
+ <return status='failure'>
+ <parameter name='error-code' value='200' />
+ <parameter name='error-message' value='`$org.onap.ccsdk.sli.adaptors.ansible.message`' />
+ </return>
+ </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-software-input.common-header.sub-request-id`'/>
+ <parameter name='lcm-dmaap.partition' value='`$prop.lcm.dmaap.partition`'/>
+ <parameter name='lcm-dmaap.rpc-name' value='upgrade-software'/>
+ <parameter name='lcm-dmaap.type' value='`$prop.lcm.dmaap.type`'/>
+ <parameter name='lcm-dmaap.timestamp' value='`$upgrade-software-input.common-header.timestamp`'/>
+ <parameter name='lcm-dmaap.api-ver' value='`$upgrade-software-input.common-header.api-ver`'/>
+ <parameter name='lcm-dmaap.originator-id' value='`$upgrade-software-input.common-header.originator-id`'/>
+ <parameter name='lcm-dmaap.request-id' value='`$upgrade-software-input.common-header.originator-id`'/>
+ <parameter name='lcm-dmaap.sub-request-id' value='`$upgrade-software-input.common-header.sub-request-id`'/>
+ <parameter name='lcm-dmaap.flags.mode' value='`$upgrade-software-input.common-header.flags.mode`'/>
+ <parameter name='lcm-dmaap.flags.force' value='`$upgrade-software-input.common-header.flags.force`'/>
+ <parameter name='lcm-dmaap.flags.ttl' value='`$upgrade-software-input.common-header.flags.ttl`'/>
+ <parameter name='lcm-dmaap.payload' value='`$org.onap.appc.adapter.ansible.results`'/>
+ <parameter name='lcm-dmaap.status.code' value='`$org.onap.ccsdk.sli.adaptors.ansible.result.code`' />
+ <parameter name='lcm-dmaap.status.message' value='`$org.onap.ccsdk.sli.adaptors.ansible.message`'/>
+ </set>
+ <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`' />
+ <parameter name='restapiUser' value='`$prop.lcm.dmaap.user`' />
+ <parameter name='restapiPassword' value='`$prop.lcm.dmaap.password`' />
+ <parameter name='format' value='json' />
+ <parameter name='httpMethod' value='POST' />
+ <parameter name='contentType' value='application/json' />
+ <parameter name="responsePrefix" value="lcm" />
+ <outcome value='failure'>
+ <record plugin="org.onap.ccsdk.sli.core.sli.recording.Slf4jRecorder">
+ <parameter name="logger" value="message-log"/>
+ <parameter name="field1" value='Failed to Publish to DMaap'/>
+ </record>
+ </outcome>
+ </execute>
+ <return status='success'>
+ <parameter name='status.code' value='`$org.onap.ccsdk.sli.adaptors.ansible.result.code`' />
+ <parameter name='status.message' value='`$org.onap.ccsdk.sli.adaptors.ansible.message`'/>
+ </return>
+ </block>
+ </outcome>
+ </execute>
+ </outcome>
+ </switch>
+ </outcome>
+ </execute>
+ </block>
+ </method>
+</service-logic>
\ No newline at end of file diff --git a/platform-logic/pom.xml b/platform-logic/pom.xml index 6bafb25a..1bb16be2 100644 --- a/platform-logic/pom.xml +++ b/platform-logic/pom.xml @@ -24,6 +24,7 @@ <module>setup</module> <module>generic-resource-api</module> <module>vnfapi</module> + <module>lcm</module> <module>restapi-templates</module> <module>installer</module> </modules> diff --git a/platform-logic/restapi-templates/src/main/json/lcm-dmaap-publish-template.json b/platform-logic/restapi-templates/src/main/json/lcm-dmaap-publish-template.json new file mode 100644 index 00000000..d30aa06a --- /dev/null +++ b/platform-logic/restapi-templates/src/main/json/lcm-dmaap-publish-template.json @@ -0,0 +1,28 @@ +{ + "version": ${lcm-dmaap.version}, + "cambria.partition": ${lcm-dmaap.partition}, + "correlation-id": ${lcm-dmaap.correlation-id}, + "rpc-name": ${lcm-dmaap.rpc-name}, + "type": ${lcm-dmaap.type}, + "body": { + "input": { + "common-header": { + "api-ver": ${lcm-dmaap.api-ver}, + "flags": { + "ttl": ${lcm-dmaap.flags.mode}, + "force": ${lcm-dmaap.flags.force}, + "mode": ${lcm-dmaap.flags.mode} + }, + "originator-id": ${lcm-dmaap.originator-id}, + "request-id": ${lcm-dmaap.request-id}, + "sub-request-id": ${lcm-dmaap.sub-request-id}, + "timestamp": ${lcm-dmaap.timestamp} + }, + "payload": ${lcm-dmaap.payload}, + "status": { + "code": ${lcm-dmaap.status.code}, + "message": ${lcm-dmaap.status.message} + } + } + } +}
\ No newline at end of file |