From: Enbo Wang Date: Wed, 27 Mar 2019 09:23:09 +0000 (+0000) Subject: Add a DG for PNF software rollback action X-Git-Url: https://gerrit.onap.org/r/gitweb?a=commitdiff_plain;h=90cd373ebe1409b523b6fd64a436199a66d2bd97;p=sdnc%2Foam.git Add a DG for PNF software rollback action Add a DG for LCM:rollback action to support PNF software rollback. Change-Id: Id82e1dc20a0792713fb079ea302f7d71e2949fc8 Issue-ID: SDNC-670 Signed-off-by: Enbo Wang --- diff --git a/installation/src/main/properties/lcm-dg.properties b/installation/src/main/properties/lcm-dg.properties index 3c6920e3..53cecfba 100644 --- a/installation/src/main/properties/lcm-dg.properties +++ b/installation/src/main/properties/lcm-dg.properties @@ -9,9 +9,11 @@ ansible.version=0.00 lcm.upgrade-pre-check.playbookname=ansible_precheck lcm.upgrade-post-check.playbookname=ansible_postcheck lcm.upgrade-software.playbookname=ansible_upgradesw +lcm.rollback.playbookname=ansible_rollback lcm.pnf.upgrade-pre-check.playbookname=ansible_precheck_pnf lcm.pnf.upgrade-post-check.playbookname=ansible_postcheck_pnf lcm.pnf.upgrade-software.playbookname=ansible_upgradesw_pnf +lcm.pnf.rollback.playbookname=ansible_rollback_pnf lcm.quiesce-traffic.playbookname=ansible_quiescetraffic lcm.resume-traffic.playbookname=ansible_resumetraffic lcm.distribute-traffic.playbookname=ansible_distributetraffic diff --git a/platform-logic/lcm/src/main/json/LCM_rollback.json b/platform-logic/lcm/src/main/json/LCM_rollback.json new file mode 100644 index 00000000..96adf3f4 --- /dev/null +++ b/platform-logic/lcm/src/main/json/LCM_rollback.json @@ -0,0 +1,702 @@ +[ + { + "id": "367cac6c.e28ad4", + "type": "method", + "name": "rollback", + "xml": "\n", + "comments": "", + "outputs": 1, + "x": 606, + "y": 73, + "z": "6f1e5235.30d27c", + "wires": [ + [ + "397a12a.10f34ee" + ] + ] + }, + { + "id": "b7a7c5dd.d286a8", + "type": "service-logic", + "name": "LCM ${project.version}", + "module": "LCM", + "version": "${project.version}", + "comments": "", + "xml": "", + "outputs": 1, + "x": 393.99993896484375, + "y": 74, + "z": "6f1e5235.30d27c", + "wires": [ + [ + "367cac6c.e28ad4" + ] + ] + }, + { + "id": "2749994d.fe16d6", + "type": "execute", + "name": "execute AnsibleA.reqExec", + "xml": "\n\n\n\n\n\n\n\n\n\n", + "comments": "", + "outputs": 1, + "x": 461.00001525878906, + "y": 681, + "z": "6f1e5235.30d27c", + "wires": [ + [ + "d80c72ca.e0d3b", + "3b639a7b.0ca876", + "f4b3d5c4.d9b698" + ] + ] + }, + { + "id": "3f74fb5f.f66a64", + "type": "switchNode", + "name": "switch", + "xml": "\n", + "comments": "", + "outputs": 1, + "x": 860.9999389648438, + "y": 789.0000305175781, + "z": "6f1e5235.30d27c", + "wires": [ + [ + "5e7ae3c.af98c1c", + "80745976.4dae58", + "2d735711.50c158" + ] + ] + }, + { + "id": "5e7ae3c.af98c1c", + "type": "other", + "name": "outcome 500", + "xml": "\n", + "comments": "", + "outputs": 1, + "x": 1005.9999389648438, + "y": 787.0000381469727, + "z": "6f1e5235.30d27c", + "wires": [ + [ + "c157f020.8fa16" + ] + ] + }, + { + "id": "80745976.4dae58", + "type": "other", + "name": "outcome 100", + "xml": "\n", + "comments": "", + "outputs": 1, + "x": 1002.9999389648438, + "y": 844.0000305175781, + "z": "6f1e5235.30d27c", + "wires": [ + [ + "8633c607.bab378" + ] + ] + }, + { + "id": "8633c607.bab378", + "type": "execute", + "name": "execute reqExecResult", + "xml": "\n \n\t\n\t\n\t\n\t\n\t\n\n\n\n\n", + "comments": "", + "outputs": 1, + "x": 1190.9999389648438, + "y": 843.0000305175781, + "z": "6f1e5235.30d27c", + "wires": [ + [ + "7d406d3c.e2a7a4", + "c98b9933.a78a78" + ] + ] + }, + { + "id": "3b639a7b.0ca876", + "type": "failure", + "name": "failure", + "xml": "\n", + "comments": "", + "outputs": 1, + "x": 719.9999389648438, + "y": 702.0000915527344, + "z": "6f1e5235.30d27c", + "wires": [ + [ + "c157f020.8fa16" + ] + ] + }, + { + "id": "d80c72ca.e0d3b", + "type": "other", + "name": "other", + "xml": "\n", + "comments": "", + "outputs": 1, + "x": 721.9999389648438, + "y": 754.0000610351562, + "z": "6f1e5235.30d27c", + "wires": [ + [ + "3f74fb5f.f66a64" + ] + ] + }, + { + "id": "7d406d3c.e2a7a4", + "type": "failure", + "name": "failure", + "xml": "\n", + "comments": "", + "outputs": 1, + "x": 1359.9999389648438, + "y": 801.0000381469727, + "z": "6f1e5235.30d27c", + "wires": [ + [ + "c157f020.8fa16" + ] + ] + }, + { + "id": "2d735711.50c158", + "type": "other", + "name": "outcome 101", + "xml": "\n", + "comments": "", + "outputs": 1, + "x": 1002.9999389648438, + "y": 745.0000686645508, + "z": "6f1e5235.30d27c", + "wires": [ + [ + "c157f020.8fa16" + ] + ] + }, + { + "id": "c98b9933.a78a78", + "type": "success", + "name": "success", + "xml": "\n", + "comments": "", + "outputs": 1, + "x": 1367.9998779296875, + "y": 849.0001220703125, + "z": "6f1e5235.30d27c", + "wires": [ + [ + "5b424098.08bd5" + ] + ] + }, + { + "id": "4e1d4556.7dd52c", + "type": "returnSuccess", + "name": "return success", + "xml": "\n\n", + "comments": "", + "x": 1661.9998779296875, + "y": 906.0000610351562, + "z": "6f1e5235.30d27c", + "wires": [] + }, + { + "id": "d900eabd.53e918", + "type": "dgstart", + "name": "DGSTART", + "outputs": 1, + "x": 209, + "y": 73, + "z": "6f1e5235.30d27c", + "wires": [ + [ + "b7a7c5dd.d286a8" + ] + ] + }, + { + "id": "397a12a.10f34ee", + "type": "block", + "name": "block : atomic", + "xml": "", + "atomic": "true", + "comments": "", + "outputs": 1, + "x": 206.9166259765625, + "y": 165.08331298828125, + "z": "6f1e5235.30d27c", + "wires": [ + [ + "2749994d.fe16d6", + "73725554.5774bc", + "8603ce63.b7c47", + "9a79bc82.279ce", + "cc7baeb9.6a3dc", + "b9b832a7.ed87d", + "16e37417.d2c8bc", + "763cfac9.48a8a4" + ] + ] + }, + { + "id": "73725554.5774bc", + "type": "execute", + "name": "execute Properties", + "xml": "\n \n \n", + "comments": "", + "outputs": 1, + "x": 505.0000305175781, + "y": 198.08334350585938, + "z": "6f1e5235.30d27c", + "wires": [ + [] + ] + }, + { + "id": "c9d7b572.9b1b08", + "type": "execute", + "name": "execute DmaapMsg", + "xml": "\n \n \n \n \n \n \n \n \n", + "comments": "", + "outputs": 1, + "x": 1671.9998779296875, + "y": 651.0834045410156, + "z": "6f1e5235.30d27c", + "wires": [ + [ + "18a85145.032faf" + ] + ] + }, + { + "id": "18a85145.032faf", + "type": "failure", + "name": "failure", + "xml": "\n", + "comments": "", + "outputs": 1, + "x": 1841.9998168945312, + "y": 650.0834045410156, + "z": "6f1e5235.30d27c", + "wires": [ + [ + "1f387472.1096ac" + ] + ] + }, + { + "id": "c157f020.8fa16", + "type": "block", + "name": "block", + "xml": "\n", + "atomic": "false", + "comments": "", + "outputs": 1, + "x": 1474.9998168945312, + "y": 675.0834045410156, + "z": "6f1e5235.30d27c", + "wires": [ + [ + "c9d7b572.9b1b08", + "b8d2a948.9f6268", + "9c77e950.a59098" + ] + ] + }, + { + "id": "246949fc.089f56", + "type": "execute", + "name": "execute DmaapMsg", + "xml": "\n \n \n \n \n \n \n \n \n", + "comments": "", + "outputs": 1, + "x": 1672.4998779296875, + "y": 856.0833740234375, + "z": "6f1e5235.30d27c", + "wires": [ + [ + "3c6c9ce.ec3e364" + ] + ] + }, + { + "id": "3c6c9ce.ec3e364", + "type": "failure", + "name": "failure", + "xml": "\n", + "comments": "", + "outputs": 1, + "x": 1840.4998779296875, + "y": 856.0833740234375, + "z": "6f1e5235.30d27c", + "wires": [ + [ + "8c845e57.511d" + ] + ] + }, + { + "id": "1f387472.1096ac", + "type": "record", + "name": "record", + "xml": " \n\t \n\t", + "comments": "", + "outputs": 1, + "x": 1961.9998779296875, + "y": 649.0833740234375, + "z": "6f1e5235.30d27c", + "wires": [ + [] + ] + }, + { + "id": "b8d2a948.9f6268", + "type": "returnFailure", + "name": "return failure", + "xml": "\n\n\n", + "comments": "", + "x": 1653.91650390625, + "y": 702.0834045410156, + "z": "6f1e5235.30d27c", + "wires": [] + }, + { + "id": "8c845e57.511d", + "type": "record", + "name": "record", + "xml": " \n\t \n\t", + "comments": "", + "outputs": 1, + "x": 1968.9166259765625, + "y": 856.0833740234375, + "z": "6f1e5235.30d27c", + "wires": [ + [] + ] + }, + { + "id": "9c77e950.a59098", + "type": "set", + "name": "set DmaapReq", + "xml": "\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n", + "comments": "", + "x": 1658.9998779296875, + "y": 598.0833740234375, + "z": "6f1e5235.30d27c", + "wires": [] + }, + { + "id": "5b424098.08bd5", + "type": "block", + "name": "block", + "xml": "\n", + "atomic": "false", + "comments": "", + "outputs": 1, + "x": 1495.9998779296875, + "y": 850.0833740234375, + "z": "6f1e5235.30d27c", + "wires": [ + [ + "246949fc.089f56", + "4d96ab15.f92c04", + "4e1d4556.7dd52c" + ] + ] + }, + { + "id": "4d96ab15.f92c04", + "type": "set", + "name": "set DmaapReq", + "xml": "\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n", + "comments": "", + "x": 1662.1666259765625, + "y": 801.0833740234375, + "z": "6f1e5235.30d27c", + "wires": [] + }, + { + "id": "f4b3d5c4.d9b698", + "type": "not-found", + "name": "not-found", + "xml": "\n", + "comments": "", + "outputs": 1, + "x": 728.9999389648438, + "y": 654.0000610351562, + "z": "6f1e5235.30d27c", + "wires": [ + [ + "9b946286.c1fc1" + ] + ] + }, + { + "id": "2c09132b.2c598c", + "type": "set", + "name": "set Defaults", + "xml": "\n\n\n", + "comments": "", + "x": 1019.9999389648438, + "y": 613, + "z": "6f1e5235.30d27c", + "wires": [] + }, + { + "id": "9b946286.c1fc1", + "type": "block", + "name": "block", + "xml": "\n", + "atomic": "false", + "comments": "", + "outputs": 1, + "x": 865.9999389648438, + "y": 648.0000610351562, + "z": "6f1e5235.30d27c", + "wires": [ + [ + "2c09132b.2c598c", + "c157f020.8fa16" + ] + ] + }, + { + "id": "8603ce63.b7c47", + "type": "set", + "name": "set default values", + "xml": "\n\n\n\n", + "comments": "", + "x": 498, + "y": 245, + "z": "6f1e5235.30d27c", + "wires": [] + }, + { + "id": "16e37417.d2c8bc", + "type": "record", + "name": "record", + "xml": " \n\t \n\t\n\t", + "comments": "", + "outputs": 1, + "x": 426.9998779296875, + "y": 609, + "z": "6f1e5235.30d27c", + "wires": [ + [] + ] + }, + { + "id": "cc7baeb9.6a3dc", + "type": "switchNode", + "name": "switch pnf-flag", + "xml": "\n", + "comments": "", + "outputs": 1, + "x": 480, + "y": 346, + "z": "6f1e5235.30d27c", + "wires": [ + [ + "b515ebb.9b7de18", + "ea8f46f7.654968" + ] + ] + }, + { + "id": "9a79bc82.279ce", + "type": "execute", + "name": "execute jsonStringToCtx", + "xml": "\n\t\n\t\n\t", + "comments": "", + "outputs": 1, + "x": 512, + "y": 292, + "z": "6f1e5235.30d27c", + "wires": [ + [] + ] + }, + { + "id": "b515ebb.9b7de18", + "type": "outcome", + "name": "true", + "xml": "\n", + "comments": "", + "outputs": 1, + "x": 677, + "y": 325, + "z": "6f1e5235.30d27c", + "wires": [ + [ + "d8920a01.f108b8" + ] + ] + }, + { + "id": "ea8f46f7.654968", + "type": "outcome", + "name": "other", + "xml": "\n", + "comments": "", + "outputs": 1, + "x": 677, + "y": 386, + "z": "6f1e5235.30d27c", + "wires": [ + [ + "32f9eda7.1c1082" + ] + ] + }, + { + "id": "32f9eda7.1c1082", + "type": "block", + "name": "block", + "xml": "\n", + "atomic": "false", + "comments": "", + "outputs": 1, + "x": 824.9999389648438, + "y": 385, + "z": "6f1e5235.30d27c", + "wires": [ + [ + "3756c2a1.fa5d6e" + ] + ] + }, + { + "id": "d8920a01.f108b8", + "type": "set", + "name": "set AnsibleReq", + "xml": "\n\n\n", + "comments": "", + "x": 838, + "y": 323, + "z": "6f1e5235.30d27c", + "wires": [] + }, + { + "id": "b9b832a7.ed87d", + "type": "switchNode", + "name": "switch playbookname", + "xml": "\n", + "comments": "", + "outputs": 1, + "x": 477, + "y": 477, + "z": "6f1e5235.30d27c", + "wires": [ + [ + "5725646c.c7b37c" + ] + ] + }, + { + "id": "5725646c.c7b37c", + "type": "outcome", + "name": "null", + "xml": "\n", + "comments": "", + "outputs": 1, + "x": 648, + "y": 478, + "z": "6f1e5235.30d27c", + "wires": [ + [ + "4546e558.72429c" + ] + ] + }, + { + "id": "4546e558.72429c", + "type": "set", + "name": "set playbookname", + "xml": "\n\n", + "comments": "", + "x": 838, + "y": 477, + "z": "6f1e5235.30d27c", + "wires": [] + }, + { + "id": "763cfac9.48a8a4", + "type": "switchNode", + "name": "switch nodelist", + "xml": "\n", + "comments": "", + "outputs": 1, + "x": 467, + "y": 536, + "z": "6f1e5235.30d27c", + "wires": [ + [ + "76eb51c0.552ce", + "178c823.496cd7e" + ] + ] + }, + { + "id": "76eb51c0.552ce", + "type": "outcome", + "name": "null", + "xml": "\n", + "comments": "", + "outputs": 1, + "x": 647, + "y": 529, + "z": "6f1e5235.30d27c", + "wires": [ + [ + "66b6e37a.9e852c" + ] + ] + }, + { + "id": "66b6e37a.9e852c", + "type": "set", + "name": "set nodelist", + "xml": "\n", + "comments": "", + "x": 804, + "y": 543, + "z": "6f1e5235.30d27c", + "wires": [] + }, + { + "id": "178c823.496cd7e", + "type": "outcome", + "name": "empty", + "xml": "\n\n", + "comments": "", + "outputs": 1, + "x": 646, + "y": 573, + "z": "6f1e5235.30d27c", + "wires": [ + [ + "66b6e37a.9e852c" + ] + ] + }, + { + "id": "3756c2a1.fa5d6e", + "type": "returnFailure", + "name": "return failure", + "xml": "\n\n", + "comments": "", + "x": 998, + "y": 385, + "z": "6f1e5235.30d27c", + "wires": [] + } +] \ 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 index ea54b270..40fe3a95 100644 --- a/platform-logic/lcm/src/main/resources/graph.versions +++ b/platform-logic/lcm/src/main/resources/graph.versions @@ -10,3 +10,4 @@ LCM unlock ${project.version} sync LCM snapshot ${project.version} sync LCM config-scale-out ${project.version} sync LCM health-check ${project.version} sync +LCM rollback ${project.version} sync diff --git a/platform-logic/lcm/src/main/xml/LCM_rollback.xml b/platform-logic/lcm/src/main/xml/LCM_rollback.xml new file mode 100644 index 00000000..bb540b6d --- /dev/null +++ b/platform-logic/lcm/src/main/xml/LCM_rollback.xml @@ -0,0 +1,340 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + \ No newline at end of file