[
    {
        "id": "89575381.22e988",
        "type": "dgstart",
        "name": "DGSTART",
        "outputs": 1,
        "x": 825,
        "y": 430,
        "z": "b2abc2ea.cc1c28",
        "wires": [
            [
                "62fc8ed2.1c1c7"
            ]
        ]
    },
    {
        "id": "62fc8ed2.1c1c7",
        "type": "service-logic",
        "name": "GENERIC-RESOURCE-API ${project.version}",
        "module": "GENERIC-RESOURCE-API",
        "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='GENERIC-RESOURCE-API' version='${project.version}'>",
        "outputs": 1,
        "x": 1184.9996490478516,
        "y": 431.0000219345093,
        "z": "b2abc2ea.cc1c28",
        "wires": [
            [
                "9c1ae725.2fe18"
            ]
        ]
    },
    {
        "id": "9c1ae725.2fe18",
        "type": "method",
        "name": "method:bbs-internet-profile-network-topology-operation-create-huawei",
        "xml": "<method rpc='bbs-internet-profile-network-topology-operation-create-huawei' mode='sync'>\n",
        "comments": "",
        "outputs": 1,
        "x": 1182.9996643066406,
        "y": 651.0000991821289,
        "z": "b2abc2ea.cc1c28",
        "wires": [
            [
                "11984569.4d6beb"
            ]
        ]
    },
    {
        "id": "11984569.4d6beb",
        "type": "block",
        "name": "block : atomic",
        "xml": "<block atomic=\"true\">\n",
        "atomic": "false",
        "comments": "",
        "outputs": 1,
        "x": 1606.9998626708984,
        "y": 650.0000991821289,
        "z": "b2abc2ea.cc1c28",
        "wires": [
            [
                "673fbee.7c17dc",
                "3a7cb4b2.9f805c",
                "9d9c04a.550a178",
                "7117f977.4492b8"
            ]
        ]
    },
    {
        "id": "673fbee.7c17dc",
        "type": "call",
        "name": "call:bbs-internet-profile-network-topology-operation-common-huawei",
        "xml": "<call module='GENERIC-RESOURCE-API' rpc='bbs-internet-profile-network-topology-operation-common-huawei' mode='sync' >\n",
        "comments": "",
        "outputs": 1,
        "x": 2123.0001525878906,
        "y": 563.0000190734863,
        "z": "b2abc2ea.cc1c28",
        "wires": [
            []
        ]
    },
    {
        "id": "3a7cb4b2.9f805c",
        "type": "execute",
        "name": "execute:CreateInternetProfileInstance",
        "xml": "<execute plugin=\"org.onap.ccsdk.sli.plugins.restapicall.RestapiCallNode\" method=\"sendRequest\">\n    <parameter name=\"templateFileName\" value=\"`$prop.restapi.templateDir + '/bbs-internet-profile-operation.json'`\" />\n    <parameter name=\"restapiUrl\" value=\"`$prop.sdncRestApi.thirdpartySdnc.url + '/CreateInternetProfileInstance'`\" />\n    <parameter name=\"contentType\" value=\"application/json\"/>\n    <parameter name=\"httpMethod\" value=\"post\"/>\n    <parameter name=\"responsePrefix\" value=\"service-result\"/>",
        "comments": "",
        "outputs": 1,
        "x": 2012.6507873535156,
        "y": 648.9608345031738,
        "z": "b2abc2ea.cc1c28",
        "wires": [
            [
                "5cb835fe.0ebfdc",
                "4e297705.0757e8"
            ]
        ]
    },
    {
        "id": "4e297705.0757e8",
        "type": "outcome",
        "name": "failure",
        "xml": "<outcome value='failure'>\n",
        "comments": "",
        "outputs": 1,
        "x": 2313.9837684631348,
        "y": 648.9608345031738,
        "z": "b2abc2ea.cc1c28",
        "wires": [
            [
                "340c0c87.92c8b4"
            ]
        ]
    },
    {
        "id": "5cb835fe.0ebfdc",
        "type": "outcome",
        "name": "success",
        "xml": "<outcome value='success'>\n",
        "comments": "",
        "outputs": 1,
        "x": 2322.9836807250977,
        "y": 723.9608364105225,
        "z": "b2abc2ea.cc1c28",
        "wires": [
            [
                "8f2db25f.f4b24"
            ]
        ]
    },
    {
        "id": "8f2db25f.f4b24",
        "type": "switchNode",
        "name": "switch:service-result",
        "xml": "<switch test=\"`$service-result.errors.error[0].error-message`\">\n",
        "comments": "",
        "outputs": 1,
        "x": 2557.999801635742,
        "y": 723.0001316070557,
        "z": "b2abc2ea.cc1c28",
        "wires": [
            [
                "d3ab0cf2.457f3",
                "dee7fa1f.4d78b"
            ]
        ]
    },
    {
        "id": "340c0c87.92c8b4",
        "type": "returnFailure",
        "name": "return failure",
        "xml": "<return status='failure'>\n<parameter name='ack-final' value='Y'/>\n<parameter name=\"error-code\" value=\"500\" />\n<parameter name=\"error-message\" value=\"Error failed to call CreateInternetProfileInstance\" />\n",
        "comments": "",
        "x": 2826.250898361206,
        "y": 649.250337600708,
        "z": "b2abc2ea.cc1c28",
        "wires": []
    },
    {
        "id": "d3ab0cf2.457f3",
        "type": "outcome",
        "name": "Other",
        "xml": "<outcome value='Other'>\n",
        "comments": "",
        "outputs": 1,
        "x": 2784.000141143799,
        "y": 724.0002250671387,
        "z": "b2abc2ea.cc1c28",
        "wires": [
            [
                "957b2d71.78c288"
            ]
        ]
    },
    {
        "id": "dee7fa1f.4d78b",
        "type": "outcome",
        "name": "NULL",
        "xml": "<outcome value=''>\n",
        "comments": "",
        "outputs": 1,
        "x": 2793.9998474121094,
        "y": 810.0000915527344,
        "z": "b2abc2ea.cc1c28",
        "wires": [
            [
                "e5fb5f82.18f85"
            ]
        ]
    },
    {
        "id": "957b2d71.78c288",
        "type": "returnFailure",
        "name": "return failure",
        "xml": "<return status='failure'>\n<parameter name='ack-final' value='Y'/>\n<parameter name=\"error-code\" value=\"500\" />\n<parameter name=\"error-message\" value=\"`'Error CreateInternetProfileInstance return: '+$service-result.errors.error[0].error-message`\" />\n\n",
        "comments": "",
        "x": 2970.4998092651367,
        "y": 724.0000619888306,
        "z": "b2abc2ea.cc1c28",
        "wires": []
    },
    {
        "id": "e5fb5f82.18f85",
        "type": "block",
        "name": "block",
        "xml": "<block>\n",
        "atomic": "false",
        "comments": "",
        "outputs": 1,
        "x": 2952.166477203369,
        "y": 811.0000667572021,
        "z": "b2abc2ea.cc1c28",
        "wires": [
            []
        ]
    },
    {
        "id": "9d9c04a.550a178",
        "type": "returnSuccess",
        "name": "return success",
        "xml": "<return status='success'>\n<parameter name=\"ack-final-indicator\" value=\"Y\" />\n<parameter name=\"error-code\" value=\"200\" />\n<parameter name=\"error-message\" value=\"`$error-message`\" />\n",
        "comments": "",
        "x": 1917.4999237060547,
        "y": 1448.000192642212,
        "z": "b2abc2ea.cc1c28",
        "wires": []
    },
    {
        "id": "c44ed27a.d90d8",
        "type": "save",
        "name": "save:generic-vnf",
        "xml": "<save plugin=\"org.onap.ccsdk.sli.adaptors.aai.AAIService\" resource=\"generic-vnf\" key=\"generic-vnf.vnf-id = $vnf-id\" >\n<parameter name= \"vnf-id\" value = \"`$vnf-id`\"/>\n<parameter name=  \"vnf-name\" value = \"`$vnf-name`\"/>\n<parameter name=  \"vnf-type\" value = \"InternetProfile\"/>\n<parameter name=  \"service-id\" value = \"`$network-topology-operation-input.service-information.service-id`\"/><!--to be clarified,service-id different from service-instance-id -->\n<parameter name=  \"prov-status\" value = \"ACTIVE\"/>\n<parameter name=  \"orchestration-status\" value = \"Active\"/>\n<parameter name=  \"ipv4-oam-address\" value = \"169.254.236.13\"/>\n<parameter name=  \"in-maint\" value = \"false\" />\n<parameter name=  \"is-closed-loop-disabled\" value = \"false\" />\n<parameter name=  \"model-invariant-id\" value = \"`$network-topology-operation-input.network-information.onap-model-information.model-invariant-uuid`\"/>\n<parameter name=  \"model-version-id\" value = \"`$network-topology-operation-input.network-information.onap-model-information.model-uuid`\"/>\n<parameter name=  \"model-customization-id\" value = \"`$network-topology-operation-input.network-information.onap-model-information.model-customization-uuid`\"/>",
        "comments": "",
        "outputs": 1,
        "x": 2196.0312366485596,
        "y": 1114.031213760376,
        "z": "b2abc2ea.cc1c28",
        "wires": [
            [
                "30abcda.3452c32",
                "d057da2e.575678",
                "d2286b35.a71d48"
            ]
        ]
    },
    {
        "id": "30abcda.3452c32",
        "type": "failure",
        "name": "failure",
        "xml": "<outcome value='failure'>\n",
        "comments": "",
        "outputs": 1,
        "x": 2432.253091812134,
        "y": 985.9199714660645,
        "z": "b2abc2ea.cc1c28",
        "wires": [
            [
                "819a16a6.0c9978"
            ]
        ]
    },
    {
        "id": "d057da2e.575678",
        "type": "failure",
        "name": "not-found",
        "xml": "<outcome value='not-found'>\n",
        "comments": "",
        "outputs": 1,
        "x": 2443.228910446167,
        "y": 1045.9358277320862,
        "z": "b2abc2ea.cc1c28",
        "wires": [
            [
                "c90efb31.bd2ff8"
            ]
        ]
    },
    {
        "id": "819a16a6.0c9978",
        "type": "returnFailure",
        "name": "return failure",
        "xml": "<return status='failure'>\n\t<parameter name='ack-final' value='Y'/>\n\t<parameter name=\"error-code\" value=\"500\" />\n    <parameter name=\"error-message\" value=\"Failure calling AAI to save generic-vnf\" />\n",
        "comments": "",
        "x": 2668.3956394195557,
        "y": 985.4914364814758,
        "z": "b2abc2ea.cc1c28",
        "wires": []
    },
    {
        "id": "c90efb31.bd2ff8",
        "type": "returnFailure",
        "name": "return failure",
        "xml": "<return status='failure'>\n\t<parameter name='ack-final' value='Y'/>\n\t<parameter name=\"error-code\" value=\"500\" />\n    <parameter name=\"error-message\" value=\"generic-vnf instance does not exist in AAI\" />\n",
        "comments": "",
        "x": 2663.2764377593994,
        "y": 1046.412142276764,
        "z": "b2abc2ea.cc1c28",
        "wires": []
    },
    {
        "id": "d2286b35.a71d48",
        "type": "outcome",
        "name": "success",
        "xml": "<outcome value='success'>\n",
        "comments": "",
        "outputs": 1,
        "x": 2436.8397159576416,
        "y": 1111.0623078346252,
        "z": "b2abc2ea.cc1c28",
        "wires": [
            [
                "cc6c45ae.c943c8"
            ]
        ]
    },
    {
        "id": "cc6c45ae.c943c8",
        "type": "record",
        "name": "log file",
        "xml": " <record plugin=\"org.onap.ccsdk.sli.core.sli.recording.FileRecorder\">\n    <parameter name=\"file\" value=\"/opt/oak/logx.txt\" />\n    <parameter name=\"field1\" value=\"save generic-vnf success!\" />\n    ",
        "comments": "",
        "outputs": 1,
        "x": 2644.8399696350098,
        "y": 1109.0624370574951,
        "z": "b2abc2ea.cc1c28",
        "wires": [
            []
        ]
    },
    {
        "id": "b746f152.4e5ac",
        "type": "save",
        "name": "save:metadata",
        "xml": "<save plugin=\"org.onap.ccsdk.sli.adaptors.aai.AAIService\" resource=\"service-instance:metadata\"\n key=\"service-instance.service-instance-id = $network-topology-operation-input.service-information.service-id  \n\tAND customer.global-customer-id = $network-topology-operation-input.service-information.global-customer-id\n\t  AND service-subscription.service-type = $network-topology-operation-input.service-information.subscription-service-type\n\t  AND service-instance.service-instance-id =  $network-topology-operation-input.service-information.service-instance-id\"  force=\"true\" pfx=\"tmp.AnAI-data\">\n    <parameter name=\"metadata.metadatum[0].metaname\" value=\"service-type\" />\n    <parameter name=\"metadata.metadatum[0].metaval\" value=\"`$prop.bbs.service_type`\" />\n    <parameter name=\"metadata.metadatum[1].metaname\" value=\"up-speed\" />\n    <parameter name=\"metadata.metadatum[1].metaval\" value=\"`$prop.bbs.up_speed`\" />\n    <parameter name=\"metadata.metadatum[2].metaname\" value=\"down-speed\" />\n    <parameter name=\"metadata.metadatum[2].metaval\" value=\"`$prop.bbs.down_speed`\" />\n    <parameter name=\"metadata.metadatum[3].metaname\" value=\"cvlan\" />\n    <parameter name=\"metadata.metadatum[3].metaval\" value=\"`$prop.bbs.c_vlan`\" />\n    <parameter name=\"metadata.metadatum[4].metaname\" value=\"svlan\" />\n    <parameter name=\"metadata.metadatum[4].metaval\" value=\"`$prop.bbs.s_vlan`\" />\n    <parameter name=\"metadata.metadatum[5].metaname\" value=\"expected-ont-id\" />\n    <parameter name=\"metadata.metadatum[5].metaval\" value=\"`$prop.bbs.ont_sn`\" />\n    <parameter name=\"metadata.metadatum[6].metaname\" value=\"rgw-mac-address\" />\n    <parameter name=\"metadata.metadatum[6].metaval\" value=\"`$prop.bbs.mac`\" />",
        "comments": "",
        "outputs": 1,
        "x": 2194.5305881500244,
        "y": 1266.0309810638428,
        "z": "b2abc2ea.cc1c28",
        "wires": [
            [
                "260fcebb.248022",
                "e5ef08e9.671048",
                "a5459cad.aad38"
            ]
        ]
    },
    {
        "id": "260fcebb.248022",
        "type": "failure",
        "name": "failure",
        "xml": "<outcome value='failure'>\n",
        "comments": "",
        "outputs": 1,
        "x": 2425.006097793579,
        "y": 1197.3955845832825,
        "z": "b2abc2ea.cc1c28",
        "wires": [
            [
                "e624300e.f97b6"
            ]
        ]
    },
    {
        "id": "e5ef08e9.671048",
        "type": "failure",
        "name": "not-found",
        "xml": "<outcome value='not-found'>\n",
        "comments": "",
        "outputs": 1,
        "x": 2436.982259750366,
        "y": 1267.4115180969238,
        "z": "b2abc2ea.cc1c28",
        "wires": [
            [
                "15c9d9c7.1da386"
            ]
        ]
    },
    {
        "id": "e624300e.f97b6",
        "type": "returnFailure",
        "name": "return failure",
        "xml": "<return status='failure'>\n\t<parameter name='ack-final' value='Y'/>\n\t<parameter name=\"error-code\" value=\"500\" />\n    <parameter name=\"error-message\" value=\"Failure calling AAI to save metadatum\" />\n",
        "comments": "",
        "x": 2665.1488933563232,
        "y": 1195.967086315155,
        "z": "b2abc2ea.cc1c28",
        "wires": []
    },
    {
        "id": "15c9d9c7.1da386",
        "type": "returnFailure",
        "name": "return failure",
        "xml": "<return status='failure'>\n\t<parameter name='ack-final' value='Y'/>\n\t<parameter name=\"error-code\" value=\"500\" />\n    <parameter name=\"error-message\" value=\"metadatum instance does not exist in AAI\" />\n",
        "comments": "",
        "x": 2662.0297927856445,
        "y": 1266.8877544403076,
        "z": "b2abc2ea.cc1c28",
        "wires": []
    },
    {
        "id": "a5459cad.aad38",
        "type": "outcome",
        "name": "success",
        "xml": "<outcome value='success'>\n",
        "comments": "",
        "outputs": 1,
        "x": 2431.592969894409,
        "y": 1337.5379576683044,
        "z": "b2abc2ea.cc1c28",
        "wires": [
            [
                "6f08d5bf.9a889c"
            ]
        ]
    },
    {
        "id": "6f08d5bf.9a889c",
        "type": "record",
        "name": "log file",
        "xml": " <record plugin=\"org.onap.ccsdk.sli.core.sli.recording.FileRecorder\">\n    <parameter name=\"file\" value=\"/opt/oak/logx.txt\" />\n    <parameter name=\"field1\" value=\"save metadatum success!\" />\n    ",
        "comments": "",
        "outputs": 1,
        "x": 2642.592969894409,
        "y": 1337.5379576683044,
        "z": "b2abc2ea.cc1c28",
        "wires": [
            []
        ]
    },
    {
        "id": "7117f977.4492b8",
        "type": "block",
        "name": "block",
        "xml": "<block>\n",
        "atomic": "false",
        "comments": "",
        "outputs": 1,
        "x": 1891.164836883545,
        "y": 987.9997653961182,
        "z": "b2abc2ea.cc1c28",
        "wires": [
            [
                "c44ed27a.d90d8",
                "b746f152.4e5ac",
                "d803f78c.61a4a8",
                "a1487411.171428"
            ]
        ]
    },
    {
        "id": "d803f78c.61a4a8",
        "type": "set",
        "name": "set:variables",
        "xml": "<set>\n<parameter name='vnf-id' value=\"`$prop.random-data-list[3]`\"/>\n<parameter name='vnf-name' value=\"`'vnf-'+$prop.random-data-list[4]`\"/>\n",
        "comments": "",
        "x": 2179.1651859283447,
        "y": 984.332763671875,
        "z": "b2abc2ea.cc1c28",
        "wires": []
    },
    {
        "id": "a1487411.171428",
        "type": "execute",
        "name": "execute:generate",
        "xml": " <execute plugin=\"org.onap.ccsdk.sli.core.slipluginutils.SliPluginUtils\" method=\"generateUUID\">\n    <parameter name=\"ctx-destination\" value=\"prop.random-data\"/>",
        "comments": "",
        "outputs": 1,
        "x": 2200.529399871826,
        "y": 910.030613899231,
        "z": "b2abc2ea.cc1c28",
        "wires": [
            [
                "916e0fd0.b9f37"
            ]
        ]
    },
    {
        "id": "916e0fd0.b9f37",
        "type": "success",
        "name": "success",
        "xml": "<outcome value='success'>\n",
        "comments": "",
        "outputs": 1,
        "x": 2429.529342651367,
        "y": 911.0305881500244,
        "z": "b2abc2ea.cc1c28",
        "wires": [
            [
                "8e69817d.115b9"
            ]
        ]
    },
    {
        "id": "8e69817d.115b9",
        "type": "execute",
        "name": "execute",
        "xml": "<execute plugin='org.onap.ccsdk.sli.core.slipluginutils.SliStringUtils' method='split' >\n    <parameter name=\"ctx_memory_result_key\" value=\"prop.random-data-list\"/>\n    <parameter name=\"original_string\" value=\"`$prop.random-data`\"/>\n    <parameter name=\"regex\" value=\"-\"/>\n",
        "comments": "",
        "outputs": 1,
        "x": 2620.529399871826,
        "y": 909.0305881500244,
        "z": "b2abc2ea.cc1c28",
        "wires": [
            [
                "52b18bce.20b054"
            ]
        ]
    },
    {
        "id": "3a61e04b.9260a",
        "type": "record",
        "name": "log file",
        "xml": " <record plugin=\"org.onap.ccsdk.sli.core.sli.recording.FileRecorder\">\n    <parameter name=\"file\" value=\"/opt/oak/logx.txt\" />\n    <parameter name=\"field1\" value=\"`$prop.random-data`\" />\n    ",
        "comments": "",
        "outputs": 1,
        "x": 2952.529462814331,
        "y": 907.0306491851807,
        "z": "b2abc2ea.cc1c28",
        "wires": [
            []
        ]
    },
    {
        "id": "52b18bce.20b054",
        "type": "outcome",
        "name": "success",
        "xml": "<outcome value='success'>\n",
        "comments": "",
        "outputs": 1,
        "x": 2787.52933883667,
        "y": 908.0306186676025,
        "z": "b2abc2ea.cc1c28",
        "wires": [
            [
                "3a61e04b.9260a"
            ]
        ]
    }
]