summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorGanesh <ganesh.c@samsung.com>2021-11-02 17:44:17 +0530
committerGanesh <ganesh.c@samsung.com>2021-11-02 17:44:19 +0530
commitd0d10cc0dbfcc421041782c51b7d6f784e6fa092 (patch)
tree7eec0dc0bf2334a3ea3954a4978798a7d5d1379f
parentee33558d82c132cf79a765097f3711fdecc45bf7 (diff)
update on exec-sls-DG for appc integration
Signed-off-by: Ganesh <ganesh.c@samsung.com> Change-Id: I3f7dc9c8869f75c290056ea04ca7c68e470646aa Issue-ID: CCSDK-3499
-rw-r--r--adaptors/saltstack-adaptor/saltstack-directed-graphs-sample/reqExecCommand/APPC_saltstack-adaptor-1.0-exec-SLSFile.json706
1 files changed, 348 insertions, 358 deletions
diff --git a/adaptors/saltstack-adaptor/saltstack-directed-graphs-sample/reqExecCommand/APPC_saltstack-adaptor-1.0-exec-SLSFile.json b/adaptors/saltstack-adaptor/saltstack-directed-graphs-sample/reqExecCommand/APPC_saltstack-adaptor-1.0-exec-SLSFile.json
index d68d05c8f..b1b9ca28d 100644
--- a/adaptors/saltstack-adaptor/saltstack-directed-graphs-sample/reqExecCommand/APPC_saltstack-adaptor-1.0-exec-SLSFile.json
+++ b/adaptors/saltstack-adaptor/saltstack-directed-graphs-sample/reqExecCommand/APPC_saltstack-adaptor-1.0-exec-SLSFile.json
@@ -1,360 +1,350 @@
[
- {
- "id":"d0ad0305.352fc",
- "type":"method",
- "name":"saltstack-adaptor-1.0",
- "xml":"<method rpc='saltstack-adaptor-1.0-exec-SLSFile' mode='sync'>\n",
- "comments":"",
- "outputs":1,
- "x":552,
- "y":183,
- "z":"b84dc629.83cd08",
- "wires":[
- [
- "65cc87e2.a95188"
- ]
- ]
- },
- {
- "id":"22aefec.e8c7902",
- "type":"service-logic",
- "name":"APPC 2.0.1",
- "module":"APPC",
- "version":"2.0.1",
- "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='APPC' version='2.0.1'>",
- "outputs":1,
- "x":343,
- "y":261,
- "z":"b84dc629.83cd08",
- "wires":[
- [
- "d0ad0305.352fc"
- ]
- ]
- },
- {
- "id":"31587001.4259e",
- "type":"returnFailure",
- "name":"return failure",
- "xml":"<return status='failure'>\n<parameter name='error-code' value='200' />\n<parameter name='error-message' value='`$org.openecomp.appc.adaptor.saltstack.message`' />\n<parameter name='output.status.results' value='`$org.openecomp.appc.adaptor.saltstack.results`' />\n",
- "comments":"",
- "x":1262,
- "y":365,
- "z":"b84dc629.83cd08",
- "wires":[
-
- ]
- },
- {
- "id":"65cc87e2.a95188",
- "type":"execute",
- "name":"execute",
- "xml":"<execute plugin='org.openecomp.appc.adaptor.saltstack.SaltstackAdaptor' method='reqExecCommand' >\n <parameter name='HostName' value='`$AgentUrl`'/>\n <parameter name='Port' value='`$Port`'/>\n <parameter name='User' value='`$User`'/>\n <parameter name='Password' value='`$Password`'/>\n <parameter name='Id' value='test1'/>\n <parameter name='Cmd' value='salt &apos;*&apos; test.ping --out=json --static'/>\n <parameter name='SlsExec' value='false'/>\n <parameter name='Timeout' value='`$Timeout`'/>\n",
- "comments":"",
- "outputs":1,
- "x":761,
- "y":185,
- "z":"b84dc629.83cd08",
- "wires":[
- [
- "f9bf6ee7.cf954",
- "7b51c357.a852cc"
- ]
- ]
- },
- {
- "id":"42fa1258.aa570c",
- "type":"switchNode",
- "name":"switch",
- "xml":"<switch test=\"`$org.onap.appc.adaptor.saltstack.result.code`\">\n",
- "comments":"",
- "outputs":1,
- "x":544,
- "y":345,
- "z":"b84dc629.83cd08",
- "wires":[
- [
- "a7cf236a.84c03",
- "c45d597b.20b4c8"
- ]
- ]
- },
- {
- "id":"a7cf236a.84c03",
- "type":"other",
- "name":"other",
- "xml":"<outcome value='Other'>\n",
- "comments":"",
- "outputs":1,
- "x":735,
- "y":343,
- "z":"b84dc629.83cd08",
- "wires":[
- [
- "31587001.4259e"
- ]
- ]
- },
- {
- "id":"f9bf6ee7.cf954",
- "type":"failure",
- "name":"failure",
- "xml":"<outcome value='failure'>\n",
- "comments":"",
- "outputs":1,
- "x":1011,
- "y":182,
- "z":"b84dc629.83cd08",
- "wires":[
- [
- "31587001.4259e"
- ]
- ]
- },
- {
- "id":"7b51c357.a852cc",
- "type":"other",
- "name":"other",
- "xml":"<outcome value='Other'>\n",
- "comments":"",
- "outputs":1,
- "x":366,
- "y":343,
- "z":"b84dc629.83cd08",
- "wires":[
- [
- "42fa1258.aa570c"
- ]
- ]
- },
- {
- "id":"c45d597b.20b4c8",
- "type":"success",
- "name":"success",
- "xml":"<outcome value='200'>\n",
- "comments":"",
- "outputs":1,
- "x":351,
- "y":459,
- "z":"b84dc629.83cd08",
- "wires":[
- [
- "30d5f0f7.0e3c8"
- ]
- ]
- },
- {
- "id":"2856792.c401a86",
- "type":"returnSuccess",
- "name":"return success",
- "xml":"<return status='success'>\n<parameter name='output.status.code' value='`$org.openecomp.appc.adaptor.saltstack.result.code`' />\n<parameter name='output.status.message' value='`$org.openecomp.appc.adaptor.saltstack.message`'/>\n<parameter name='output.status.results' value = '`$org.openecomp.appc.adaptor.saltstack.results`'/>\n",
- "comments":"",
- "x":1042,
- "y":656,
- "z":"b84dc629.83cd08",
- "wires":[
-
- ]
- },
- {
- "id":"6c359fdc.3b566",
- "type":"dgstart",
- "name":"DGSTART",
- "outputs":1,
- "x":321,
- "y":161,
- "z":"b84dc629.83cd08",
- "wires":[
- [
- "22aefec.e8c7902"
- ]
- ]
- },
- {
- "id":"b5342c59.29f74",
- "type":"comment",
- "name":"SaltStack Adaptor DG",
- "info":"",
- "comments":"",
- "x":693,
- "y":44,
- "z":"b84dc629.83cd08",
- "wires":[
-
- ]
- },
- {
- "id":"19202194.8ff55e",
- "type":"comment",
- "name":"request-method = reqExecCommand, req-action = \"execute multiple SLS commands\"",
- "info":"Here we basically test if minion1 is active by pinging to it, then install vim package to it. \n",
- "comments":"",
- "x":711,
- "y":127,
- "z":"b84dc629.83cd08",
- "wires":[
-
- ]
- },
- {
- "id":"a2ebc17e.fa03a",
- "type":"other",
- "name":"other",
- "xml":"<outcome value='Other'>\n",
- "comments":"",
- "outputs":1,
- "x":396,
- "y":661,
- "z":"b84dc629.83cd08",
- "wires":[
- [
- "c9345fbb.d6d19"
- ]
- ]
- },
- {
- "id":"770411a5.18825",
- "type":"execute",
- "name":"execute",
- "xml":"<execute plugin='org.openecomp.appc.adaptor.saltstack.SaltstackAdaptor' method='reqExecCommand' >\n <parameter name='HostName' value='`$AgentUrl`'/>\n <parameter name='Port' value='`$Port`'/>\n <parameter name='User' value='`$User`'/>\n <parameter name='Password' value='`$Password`'/>\n <parameter name='Id' value='test2'/>\n <parameter name='Cmd' value='cd /srv/salt/; salt &apos;minion1&apos; state.apply vim --out=json --static'/>\n <parameter name='SlsExec' value='true'/>\n <parameter name='Timeout' value='`$Timeout`'/>\n",
- "comments":"",
- "outputs":1,
- "x":773,
- "y":548,
- "z":"b84dc629.83cd08",
- "wires":[
- [
- "e09a3e12.87428",
- "a2ebc17e.fa03a"
- ]
- ]
- },
- {
- "id":"e09a3e12.87428",
- "type":"failure",
- "name":"failure",
- "xml":"<outcome value='failure'>\n",
- "comments":"",
- "outputs":1,
- "x":991,
- "y":554,
- "z":"b84dc629.83cd08",
- "wires":[
- [
- "31587001.4259e"
- ]
- ]
- },
- {
- "id":"c9345fbb.d6d19",
- "type":"switchNode",
- "name":"switch",
- "xml":"<switch test=\"`$org.onap.appc.adaptor.saltstack.result.code`\">\n",
- "comments":"",
- "outputs":1,
- "x":578,
- "y":658,
- "z":"b84dc629.83cd08",
- "wires":[
- [
- "485e453d.36c75c",
- "f1adcf2a.2c456"
- ]
- ]
- },
- {
- "id":"485e453d.36c75c",
- "type":"other",
- "name":"other",
- "xml":"<outcome value='Other'>\n",
- "comments":"",
- "outputs":1,
- "x":783,
- "y":732,
- "z":"b84dc629.83cd08",
- "wires":[
- [
- "31587001.4259e"
- ]
- ]
- },
- {
- "id":"f1adcf2a.2c456",
- "type":"success",
- "name":"success",
- "xml":"<outcome value='200'>\n",
- "comments":"",
- "outputs":1,
- "x":776,
- "y":658,
- "z":"b84dc629.83cd08",
- "wires":[
- [
- "2856792.c401a86"
- ]
- ]
- },
- {
- "id":"30d5f0f7.0e3c8",
- "type":"switchNode",
- "name":"switch",
- "xml":"<switch test=\"`$test1.minion1`\">\n",
- "comments":"",
- "outputs":1,
- "x":523,
- "y":459,
- "z":"b84dc629.83cd08",
- "wires":[
- [
- "15e9ff68.9812a1",
- "17d9d7e.4d9a928"
- ]
- ]
- },
- {
- "id":"17d9d7e.4d9a928",
- "type":"other",
- "name":"outcome",
- "xml":"<outcome value='true'>\n",
- "comments":"",
- "outputs":1,
- "x":593,
- "y":550,
- "z":"b84dc629.83cd08",
- "wires":[
- [
- "770411a5.18825"
- ]
- ]
- },
- {
- "id":"15e9ff68.9812a1",
- "type":"other",
- "name":"other",
- "xml":"<outcome value='Other'>\n",
- "comments":"",
- "outputs":1,
- "x":717,
- "y":459,
- "z":"b84dc629.83cd08",
- "wires":[
- [
- "31587001.4259e"
- ]
- ]
- },
- {
- "id":"b764890c.ed0018",
- "type":"comment",
- "name":"Assumptions for this DG (example-server)",
- "info":"1) Here we assume, the saltstack server is the example-vagrant based server. Where, the master saltstact controlls minion1 and minion2. \n2) We assume that sls file called vim.sls is already present in the path /srv/salt on the server.",
- "comments":"",
- "x":693,
- "y":86,
- "z":"b84dc629.83cd08",
- "wires":[
-
- ]
- }
+ {
+ "id": "9e493c5d.c18c7",
+ "type": "method",
+ "name": "saltstack-adaptor-1.0",
+ "xml": "<method rpc='saltstack-adaptor-1.0-exec-SLSFile' mode='sync'>\n",
+ "comments": "",
+ "outputs": 1,
+ "x": 343,
+ "y": 177,
+ "z": "c817b245.e1acf",
+ "wires": [
+ [
+ "382f8817.0dda08"
+ ]
+ ]
+ },
+ {
+ "id": "5ab60e1a.76a",
+ "type": "service-logic",
+ "name": "APPC 2.0.1",
+ "module": "APPC",
+ "version": "2.0.1",
+ "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='APPC' version='2.0.1'>",
+ "outputs": 1,
+ "x": 134,
+ "y": 255,
+ "z": "c817b245.e1acf",
+ "wires": [
+ [
+ "9e493c5d.c18c7"
+ ]
+ ]
+ },
+ {
+ "id": "69ba9b5b.21dc44",
+ "type": "returnFailure",
+ "name": "return failure",
+ "xml": "<return status='failure'>\n<parameter name='error-code' value='200' />\n<parameter name='error-message' value='`$org.openecomp.appc.adaptor.saltstack.message`' />\n<parameter name='output.status.results' value='`$org.openecomp.appc.adaptor.saltstack.results`' />\n",
+ "comments": "",
+ "x": 1053,
+ "y": 359,
+ "z": "c817b245.e1acf",
+ "wires": []
+ },
+ {
+ "id": "382f8817.0dda08",
+ "type": "execute",
+ "name": "execute",
+ "xml": "<execute plugin='org.openecomp.appc.adaptor.saltstack.SaltstackAdaptor' method='reqExecCommand' >\n <parameter name='HostName' value='`$AgentUrl`'/>\n <parameter name='Port' value='`$Port`'/>\n <parameter name='User' value='`$User`'/>\n <parameter name='Password' value='`$Password`'/>\n <parameter name='Id' value='test1'/>\n <parameter name='Cmd' value='salt &apos;*&apos; test.ping --out=json --static'/>\n <parameter name='SlsExec' value='false'/>\n <parameter name='Timeout' value='`$Timeout`'/>\n",
+ "comments": "",
+ "outputs": 1,
+ "x": 552,
+ "y": 179,
+ "z": "c817b245.e1acf",
+ "wires": [
+ [
+ "11467754.fc8b19",
+ "7eb57428.8570cc"
+ ]
+ ]
+ },
+ {
+ "id": "c0b1e722.890768",
+ "type": "switchNode",
+ "name": "switch",
+ "xml": "<switch test=\"`$org.onap.appc.adaptor.saltstack.result.code`\">\n",
+ "comments": "",
+ "outputs": 1,
+ "x": 335,
+ "y": 339,
+ "z": "c817b245.e1acf",
+ "wires": [
+ [
+ "7bf12507.627b6c",
+ "d23ec77b.c9a8f8"
+ ]
+ ]
+ },
+ {
+ "id": "7bf12507.627b6c",
+ "type": "other",
+ "name": "other",
+ "xml": "<outcome value='Other'>\n",
+ "comments": "",
+ "outputs": 1,
+ "x": 526,
+ "y": 337,
+ "z": "c817b245.e1acf",
+ "wires": [
+ [
+ "69ba9b5b.21dc44"
+ ]
+ ]
+ },
+ {
+ "id": "11467754.fc8b19",
+ "type": "failure",
+ "name": "failure",
+ "xml": "<outcome value='failure'>\n",
+ "comments": "",
+ "outputs": 1,
+ "x": 802,
+ "y": 176,
+ "z": "c817b245.e1acf",
+ "wires": [
+ [
+ "69ba9b5b.21dc44"
+ ]
+ ]
+ },
+ {
+ "id": "7eb57428.8570cc",
+ "type": "other",
+ "name": "other",
+ "xml": "<outcome value='Other'>\n",
+ "comments": "",
+ "outputs": 1,
+ "x": 157,
+ "y": 337,
+ "z": "c817b245.e1acf",
+ "wires": [
+ [
+ "c0b1e722.890768"
+ ]
+ ]
+ },
+ {
+ "id": "d23ec77b.c9a8f8",
+ "type": "success",
+ "name": "success",
+ "xml": "<outcome value='200'>\n",
+ "comments": "",
+ "outputs": 1,
+ "x": 142,
+ "y": 453,
+ "z": "c817b245.e1acf",
+ "wires": [
+ [
+ "cc2bc9e2.787ab8"
+ ]
+ ]
+ },
+ {
+ "id": "745755b2.4509cc",
+ "type": "returnSuccess",
+ "name": "return success",
+ "xml": "<return status='success'>\n<parameter name='output.status.code' value='`$org.openecomp.appc.adaptor.saltstack.result.code`' />\n<parameter name='output.status.message' value='`$org.openecomp.appc.adaptor.saltstack.message`'/>\n<parameter name='output.status.results' value = '`$org.openecomp.appc.adaptor.saltstack.results`'/>\n",
+ "comments": "",
+ "x": 833,
+ "y": 650,
+ "z": "c817b245.e1acf",
+ "wires": []
+ },
+ {
+ "id": "cf1290d3.278fd",
+ "type": "dgstart",
+ "name": "DGSTART",
+ "outputs": 1,
+ "x": 112,
+ "y": 155,
+ "z": "c817b245.e1acf",
+ "wires": [
+ [
+ "5ab60e1a.76a"
+ ]
+ ]
+ },
+ {
+ "id": "5697d7dc.4e0678",
+ "type": "comment",
+ "name": "SaltStack Adaptor DG",
+ "info": "",
+ "comments": "",
+ "x": 484,
+ "y": 38,
+ "z": "c817b245.e1acf",
+ "wires": []
+ },
+ {
+ "id": "c923d8a1.848318",
+ "type": "comment",
+ "name": "request-method = reqExecCommand, req-action = \"execute multiple SLS commands\"",
+ "info": "Here we basically test if minion1 is active by pinging to it, then install vim package to it. \n",
+ "comments": "",
+ "x": 502,
+ "y": 121,
+ "z": "c817b245.e1acf",
+ "wires": []
+ },
+ {
+ "id": "27be8370.edc93c",
+ "type": "other",
+ "name": "other",
+ "xml": "<outcome value='Other'>\n",
+ "comments": "",
+ "outputs": 1,
+ "x": 187,
+ "y": 655,
+ "z": "c817b245.e1acf",
+ "wires": [
+ [
+ "f4628658.b3b638"
+ ]
+ ]
+ },
+ {
+ "id": "186009ee.e1eae6",
+ "type": "execute",
+ "name": "execute",
+ "xml": "<execute plugin='org.openecomp.appc.adaptor.saltstack.SaltstackAdaptor' method='reqExecCommand' >\n <parameter name='HostName' value='`$AgentUrl`'/>\n <parameter name='Port' value='`$Port`'/>\n <parameter name='User' value='`$User`'/>\n <parameter name='Password' value='`$Password`'/>\n <parameter name='Id' value='test2'/>\n <parameter name='Cmd' value='cd /srv/salt/; salt &apos;minion1&apos; state.apply vim --out=json --static'/>\n <parameter name='SlsExec' value='true'/>\n <parameter name='Timeout' value='`$Timeout`'/>\n",
+ "comments": "",
+ "outputs": 1,
+ "x": 564,
+ "y": 542,
+ "z": "c817b245.e1acf",
+ "wires": [
+ [
+ "c056efff.509e2",
+ "27be8370.edc93c"
+ ]
+ ]
+ },
+ {
+ "id": "c056efff.509e2",
+ "type": "failure",
+ "name": "failure",
+ "xml": "<outcome value='failure'>\n",
+ "comments": "",
+ "outputs": 1,
+ "x": 782,
+ "y": 548,
+ "z": "c817b245.e1acf",
+ "wires": [
+ [
+ "69ba9b5b.21dc44"
+ ]
+ ]
+ },
+ {
+ "id": "f4628658.b3b638",
+ "type": "switchNode",
+ "name": "switch",
+ "xml": "<switch test=\"`$org.onap.appc.adaptor.saltstack.result.code`\">\n",
+ "comments": "",
+ "outputs": 1,
+ "x": 369,
+ "y": 652,
+ "z": "c817b245.e1acf",
+ "wires": [
+ [
+ "f79c7587.586f88",
+ "ca95f193.0b712"
+ ]
+ ]
+ },
+ {
+ "id": "f79c7587.586f88",
+ "type": "other",
+ "name": "other",
+ "xml": "<outcome value='Other'>\n",
+ "comments": "",
+ "outputs": 1,
+ "x": 574,
+ "y": 726,
+ "z": "c817b245.e1acf",
+ "wires": [
+ [
+ "69ba9b5b.21dc44"
+ ]
+ ]
+ },
+ {
+ "id": "ca95f193.0b712",
+ "type": "success",
+ "name": "success",
+ "xml": "<outcome value='200'>\n",
+ "comments": "",
+ "outputs": 1,
+ "x": 567,
+ "y": 652,
+ "z": "c817b245.e1acf",
+ "wires": [
+ [
+ "745755b2.4509cc"
+ ]
+ ]
+ },
+ {
+ "id": "cc2bc9e2.787ab8",
+ "type": "switchNode",
+ "name": "switch",
+ "xml": "<switch test=\"`$test1.minion1`\">\n",
+ "comments": "",
+ "outputs": 1,
+ "x": 314,
+ "y": 453,
+ "z": "c817b245.e1acf",
+ "wires": [
+ [
+ "c139043.a0224f8",
+ "e16e55cf.bf6f48"
+ ]
+ ]
+ },
+ {
+ "id": "e16e55cf.bf6f48",
+ "type": "other",
+ "name": "outcome",
+ "xml": "<outcome value='true'>\n",
+ "comments": "",
+ "outputs": 1,
+ "x": 384,
+ "y": 544,
+ "z": "c817b245.e1acf",
+ "wires": [
+ [
+ "186009ee.e1eae6"
+ ]
+ ]
+ },
+ {
+ "id": "c139043.a0224f8",
+ "type": "other",
+ "name": "other",
+ "xml": "<outcome value='Other'>\n",
+ "comments": "",
+ "outputs": 1,
+ "x": 508,
+ "y": 453,
+ "z": "c817b245.e1acf",
+ "wires": [
+ [
+ "69ba9b5b.21dc44"
+ ]
+ ]
+ },
+ {
+ "id": "7874f92a.9a1f38",
+ "type": "comment",
+ "name": "Assumptions for this DG (example-server)",
+ "info": "1) Here we assume, the saltstack server is the example-vagrant based server. Where, the master saltstact controlls minion1 and minion2. \n2) We assume that sls file called vim.sls is already present in the path /srv/salt on the server.",
+ "comments": "",
+ "x": 484,
+ "y": 80,
+ "z": "c817b245.e1acf",
+ "wires": []
+ }
] \ No newline at end of file