aboutsummaryrefslogtreecommitdiffstats
path: root/platform-logic
diff options
context:
space:
mode:
Diffstat (limited to 'platform-logic')
-rwxr-xr-xplatform-logic/lcm/src/main/json/LCM_config-scale-out.json364
-rwxr-xr-xplatform-logic/lcm/src/main/json/LCM_distribute-traffic.json553
-rwxr-xr-xplatform-logic/lcm/src/main/json/LCM_health-check.json364
-rw-r--r--platform-logic/lcm/src/main/json/LCM_quiesce-traffic.json747
-rw-r--r--platform-logic/lcm/src/main/json/LCM_resume-traffic.json747
-rw-r--r--platform-logic/lcm/src/main/json/LCM_upgrade-post-check.json1031
-rw-r--r--platform-logic/lcm/src/main/json/LCM_upgrade-pre-check.json1031
-rw-r--r--platform-logic/lcm/src/main/json/LCM_upgrade-software.json1031
-rwxr-xr-xplatform-logic/lcm/src/main/json/lcm-restconf-configscaleout.json5
-rw-r--r--platform-logic/lcm/src/main/resources/graph.versions9
-rwxr-xr-xplatform-logic/lcm/src/main/xml/LCM_config-scale-out.xml120
-rwxr-xr-xplatform-logic/lcm/src/main/xml/LCM_distribute-traffic.xml312
-rwxr-xr-xplatform-logic/lcm/src/main/xml/LCM_health-check.xml117
-rw-r--r--platform-logic/lcm/src/main/xml/LCM_quiesce-traffic.xml325
-rw-r--r--platform-logic/lcm/src/main/xml/LCM_resume-traffic.xml325
-rw-r--r--platform-logic/lcm/src/main/xml/LCM_upgrade-post-check.xml27
-rw-r--r--platform-logic/lcm/src/main/xml/LCM_upgrade-pre-check.xml25
-rw-r--r--platform-logic/lcm/src/main/xml/LCM_upgrade-software.xml27
-rwxr-xr-xplatform-logic/restapi-templates/src/main/json/lcm-restconf-configscaleout.json5
19 files changed, 5266 insertions, 1899 deletions
diff --git a/platform-logic/lcm/src/main/json/LCM_config-scale-out.json b/platform-logic/lcm/src/main/json/LCM_config-scale-out.json
new file mode 100755
index 00000000..9d37cf13
--- /dev/null
+++ b/platform-logic/lcm/src/main/json/LCM_config-scale-out.json
@@ -0,0 +1,364 @@
+[
+ {
+ "id": "2525c69c.46a53a",
+ "type": "method",
+ "name": "config-scale-out",
+ "xml": "<method rpc='config-scale-out' mode='sync'>\n",
+ "comments": "",
+ "outputs": 1,
+ "x": 525,
+ "y": 310,
+ "z": "2e6279df.227e56",
+ "wires": [
+ [
+ "fbc1ecc4.e47a5"
+ ]
+ ]
+ },
+ {
+ "id": "71bc22fb.570a1c",
+ "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": 316.99993896484375,
+ "y": 312,
+ "z": "2e6279df.227e56",
+ "wires": [
+ [
+ "2525c69c.46a53a"
+ ]
+ ]
+ },
+ {
+ "id": "9aa59a9a.573488",
+ "type": "failure",
+ "name": "failure",
+ "xml": "<outcome value='failure'>\n",
+ "comments": "",
+ "outputs": 1,
+ "x": 535,
+ "y": 499.0000305175781,
+ "z": "2e6279df.227e56",
+ "wires": [
+ [
+ "1648f778.245cc9"
+ ]
+ ]
+ },
+ {
+ "id": "af21aba.b59b158",
+ "type": "other",
+ "name": "success",
+ "xml": "<outcome value='success'>\n",
+ "comments": "",
+ "outputs": 1,
+ "x": 534,
+ "y": 573,
+ "z": "2e6279df.227e56",
+ "wires": [
+ [
+ "4b5b877e.ab2088"
+ ]
+ ]
+ },
+ {
+ "id": "def90fda.f980a",
+ "type": "returnSuccess",
+ "name": "return success",
+ "xml": "<return status='success'>\n<parameter name='status.code' value='`$restconf.response-code`' />\n<parameter name='status.message' value='`$restconf.response-message`' />",
+ "comments": "",
+ "x": 833.9998779296875,
+ "y": 629.0000305175781,
+ "z": "2e6279df.227e56",
+ "wires": []
+ },
+ {
+ "id": "42cca51a.60b21c",
+ "type": "dgstart",
+ "name": "DGSTART",
+ "outputs": 1,
+ "x": 132,
+ "y": 311,
+ "z": "2e6279df.227e56",
+ "wires": [
+ [
+ "71bc22fb.570a1c"
+ ]
+ ]
+ },
+ {
+ "id": "fbc1ecc4.e47a5",
+ "type": "block",
+ "name": "block",
+ "xml": "<block>\n",
+ "atomic": "false",
+ "comments": "",
+ "outputs": 1,
+ "x": 117.91668701171875,
+ "y": 448.0833435058594,
+ "z": "2e6279df.227e56",
+ "wires": [
+ [
+ "78a05e7a.6a51e",
+ "bafaa90c.54ab78",
+ "4ce05c2c.5aa5b4",
+ "dfe17100.934dc"
+ ]
+ ]
+ },
+ {
+ "id": "78a05e7a.6a51e",
+ "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": 302.00001525878906,
+ "y": 427.0833435058594,
+ "z": "2e6279df.227e56",
+ "wires": [
+ []
+ ]
+ },
+ {
+ "id": "2f415068.43c48",
+ "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='dmaap' />\n",
+ "comments": "",
+ "outputs": 1,
+ "x": 864.0000610351562,
+ "y": 435.0833435058594,
+ "z": "2e6279df.227e56",
+ "wires": [
+ [
+ "fdf40e79.456aa"
+ ]
+ ]
+ },
+ {
+ "id": "fdf40e79.456aa",
+ "type": "failure",
+ "name": "failure",
+ "xml": "<outcome value='failure'>\n",
+ "comments": "",
+ "outputs": 1,
+ "x": 1046,
+ "y": 434.0833435058594,
+ "z": "2e6279df.227e56",
+ "wires": [
+ [
+ "d3492d84.dee36"
+ ]
+ ]
+ },
+ {
+ "id": "1648f778.245cc9",
+ "type": "block",
+ "name": "block",
+ "xml": "<block>\n",
+ "atomic": "false",
+ "comments": "",
+ "outputs": 1,
+ "x": 673,
+ "y": 500.0833435058594,
+ "z": "2e6279df.227e56",
+ "wires": [
+ [
+ "2f415068.43c48",
+ "fb59df11.d6057",
+ "aafbe068.0daef"
+ ]
+ ]
+ },
+ {
+ "id": "c832fe63.37e5f",
+ "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='dmaap' />\n",
+ "comments": "",
+ "outputs": 1,
+ "x": 854.4998779296875,
+ "y": 578.0833435058594,
+ "z": "2e6279df.227e56",
+ "wires": [
+ [
+ "5e5bf79f.1bf8b8"
+ ]
+ ]
+ },
+ {
+ "id": "5e5bf79f.1bf8b8",
+ "type": "failure",
+ "name": "failure",
+ "xml": "<outcome value='failure'>\n",
+ "comments": "",
+ "outputs": 1,
+ "x": 1031.4998779296875,
+ "y": 577.0833740234375,
+ "z": "2e6279df.227e56",
+ "wires": [
+ [
+ "1e79000b.07848"
+ ]
+ ]
+ },
+ {
+ "id": "d3492d84.dee36",
+ "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": 1173,
+ "y": 434.0833435058594,
+ "z": "2e6279df.227e56",
+ "wires": [
+ []
+ ]
+ },
+ {
+ "id": "fb59df11.d6057",
+ "type": "returnFailure",
+ "name": "return failure",
+ "xml": "<return status='failure'>\n<parameter name='status.code' value= '`$lcm-dmaap.status.code`'/>\n<parameter name='status.message' value='`$lcm-dmaap.status.message`' />\n",
+ "comments": "",
+ "x": 844.9166870117188,
+ "y": 485.0833435058594,
+ "z": "2e6279df.227e56",
+ "wires": []
+ },
+ {
+ "id": "1e79000b.07848",
+ "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": 1163.9166259765625,
+ "y": 575.0833740234375,
+ "z": "2e6279df.227e56",
+ "wires": [
+ []
+ ]
+ },
+ {
+ "id": "aafbe068.0daef",
+ "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=\"`$config-scale-out-input.common-header.request-id + '-' + $config-scale-out-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='config-scale-out'/>\n<parameter name='lcm-dmaap.type' value='`$prop.lcm.dmaap.type`'/>\n<parameter name='lcm-dmaap.timestamp' value='`$config-scale-out-input.common-header.timestamp`'/>\n<parameter name='lcm-dmaap.api-ver' value='`$config-scale-out-input.common-header.api-ver`'/>\n<parameter name='lcm-dmaap.originator-id' value='`$config-scale-out-input.common-header.originator-id`'/>\n<parameter name='lcm-dmaap.request-id' value='`$config-scale-out-input.common-header.request-id`'/>\n<parameter name='lcm-dmaap.sub-request-id' value='`$config-scaleout-input.common-header.sub-request-id`'/>\n<parameter name='lcm-dmaap.flags.mode' value='`$config-scale-out-input.common-header.flags.mode`'/>\n<parameter name='lcm-dmaap.flags.force' value='`$config-scale-out-input.common-header.flags.force`'/>\n<parameter name='lcm-dmaap.flags.ttl' value='`$config-scale-out-input.common-header.flags.ttl`'/>\n<parameter name='lcm-dmaap.status.code' value='401' />\n<parameter name='lcm-dmaap.status.message' value=\"`'DG-Failure ' + $restconf.response-message + ' RestConf ResponseCode=' + $restconf.response-code`\"/>\n",
+ "comments": "",
+ "x": 832.0000610351562,
+ "y": 379.0833435058594,
+ "z": "2e6279df.227e56",
+ "wires": []
+ },
+ {
+ "id": "4b5b877e.ab2088",
+ "type": "block",
+ "name": "block",
+ "xml": "<block>\n",
+ "atomic": "false",
+ "comments": "",
+ "outputs": 1,
+ "x": 683.9998779296875,
+ "y": 577.0833129882812,
+ "z": "2e6279df.227e56",
+ "wires": [
+ [
+ "c832fe63.37e5f",
+ "654b3892.a14d08",
+ "def90fda.f980a"
+ ]
+ ]
+ },
+ {
+ "id": "654b3892.a14d08",
+ "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=\"`$config-scale-out-input.common-header.request-id + '-' + $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='config-scale-out'/>\n<parameter name='lcm-dmaap.type' value='`$prop.lcm.dmaap.type`'/>\n<parameter name='lcm-dmaap.timestamp' value='`$config-scale-out-input.common-header.timestamp`'/>\n<parameter name='lcm-dmaap.api-ver' value='`$config-scaleout-input.common-header.api-ver`'/>\n<parameter name='lcm-dmaap.originator-id' value='`$config-scale-out-input.common-header.originator-id`'/>\n<parameter name='lcm-dmaap.request-id' value='`$config-scale-out-input.common-header.request-id`'/>\n<parameter name='lcm-dmaap.sub-request-id' value='`$config-scale-out-input.common-header.sub-request-id`'/>\n<parameter name='lcm-dmaap.flags.mode' value='`$config-scale-out-input.common-header.flags.mode`'/>\n<parameter name='lcm-dmaap.flags.force' value='`$config-scale-out-input.common-header.flags.force`'/>\n<parameter name='lcm-dmaap.flags.ttl' value='`$config-scale-out-input.common-header.flags.ttl`'/>\n<parameter name='lcm-dmaap.status.code' value='`$restconf.response-code`' />\n<parameter name='lcm-dmaap.status.message' value='`$restconf.response-message`'/>\n\n",
+ "comments": "",
+ "x": 814.1666259765625,
+ "y": 530.0833435058594,
+ "z": "2e6279df.227e56",
+ "wires": []
+ },
+ {
+ "id": "bafaa90c.54ab78",
+ "type": "set",
+ "name": "set default status value",
+ "xml": "<set>\n<parameter name='status.code' value='200' />\n<parameter name='status.message' value='unexpected return from LCM DG' />",
+ "comments": "",
+ "x": 310,
+ "y": 473,
+ "z": "2e6279df.227e56",
+ "wires": []
+ },
+ {
+ "id": "dfe17100.934dc",
+ "type": "execute",
+ "name": "execute RestConfAPI",
+ "xml": "<execute plugin='org.onap.ccsdk.sli.plugins.restapicall.RestapiCallNode' method='sendRequest' >\n <parameter name='templateFileName' value=\"`$prop.restapi.templateDir + '/' + $prop.lcm.restconf.configscaleout.templatefile`\" />\n <parameter name='restapiUrl' value=\"`'http://' + $payloadJson.request-parameters.vnf-host-ip-address + ':' + $prop.lcm.restconf.port + $prop.lcm.restconf.configscaleout.urlpath + $payloadJson.configuration-parameters.ip-addr`\" />\n <parameter name='restapiUser' value='`$prop.lcm.restconf.configscaleout.user`' />\n <parameter name='restapiPassword' value='`$prop.lcm.restconf.configscaleout.password`' />\n <parameter name='format' value='json' />\n <parameter name='httpMethod' value='PUT' />\n <parameter name='contentType' value='application/json' />\n <parameter name=\"responsePrefix\" value=\"restconf\" />",
+ "comments": "",
+ "outputs": 1,
+ "x": 302,
+ "y": 582,
+ "z": "2e6279df.227e56",
+ "wires": [
+ [
+ "9aa59a9a.573488",
+ "af21aba.b59b158"
+ ]
+ ]
+ },
+ {
+ "id": "4ce05c2c.5aa5b4",
+ "type": "execute",
+ "name": "execute jsonStringToCtx",
+ "xml": "<execute plugin='org.onap.ccsdk.sli.core.slipluginutils.SliPluginUtils' method='jsonStringToCtx'>\n\t<parameter name='source' value='config-scale-out-input.payload' />\n\t<parameter name='outputPath' value='payloadJson' />\n\t<parameter name='isEscaped' value='true' />",
+ "comments": "",
+ "outputs": 1,
+ "x": 310,
+ "y": 520,
+ "z": "2e6279df.227e56",
+ "wires": [
+ [
+ "e5f5e49e.ae0018"
+ ]
+ ]
+ },
+ {
+ "id": "874cba8d.9da118",
+ "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='`$payloadJson.request-parameters.vnf-host-ip-address`'/>\n\t<parameter name='field2' value='`$payloadJson.configuration-parameters.ip-addr`'/>",
+ "comments": "",
+ "outputs": 1,
+ "x": 678,
+ "y": 430,
+ "z": "2e6279df.227e56",
+ "wires": [
+ []
+ ]
+ },
+ {
+ "id": "e5f5e49e.ae0018",
+ "type": "other",
+ "name": "success",
+ "xml": "<outcome value='success'>\n",
+ "comments": "",
+ "outputs": 1,
+ "x": 536,
+ "y": 429,
+ "z": "2e6279df.227e56",
+ "wires": [
+ [
+ "874cba8d.9da118"
+ ]
+ ]
+ }
+] \ No newline at end of file
diff --git a/platform-logic/lcm/src/main/json/LCM_distribute-traffic.json b/platform-logic/lcm/src/main/json/LCM_distribute-traffic.json
new file mode 100755
index 00000000..30ee561d
--- /dev/null
+++ b/platform-logic/lcm/src/main/json/LCM_distribute-traffic.json
@@ -0,0 +1,553 @@
+[
+ {
+ "id": "1a420388.7ce24c",
+ "type": "method",
+ "name": "distribute-traffic",
+ "xml": "<method rpc='distribute-traffic' mode='sync'>\n",
+ "comments": "",
+ "outputs": 1,
+ "x": 550,
+ "y": 102,
+ "z": "af8f5cdd.6e4de",
+ "wires": [
+ [
+ "e635fd5d.f4087"
+ ]
+ ]
+ },
+ {
+ "id": "c220826b.91906",
+ "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": 337.99993896484375,
+ "y": 103,
+ "z": "af8f5cdd.6e4de",
+ "wires": [
+ [
+ "1a420388.7ce24c"
+ ]
+ ]
+ },
+ {
+ "id": "810e1e54.dec1c",
+ "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' }
/*-
 * ============LICENSE_START=======================================================
 * SDC
 * ================================================================================
 * Copyright (C) 2017 AT&T Intellectual Property. All rights reserved.
 * ================================================================================
 * Licensed under the Apache License, Version 2.0 (the "License");
 * you may not use this file except in compliance with the License.
 * You may obtain a copy of the License at
 *
 *      http://www.apache.org/licenses/LICENSE-2.0
 *
 * Unless required by applicable law or agreed to in writing, software
 * distributed under the License is distributed on an "AS IS" BASIS,
 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 * See the License for the specific language governing permissions and
 * limitations under the License.
 * ============LICENSE_END=========================================================
 */

'use strict';

//import 'restangular';
//import 'angular-ui-router';
import * as _ from "lodash";
import "reflect-metadata";
import 'ng-infinite-scroll';
import './modules/filters.ts';
import './modules/utils.ts';
import './modules/directive-module.ts';
import './modules/service-module';
import './modules/view-model-module.ts';

import {
    DataTypesService,
    LeftPaletteLoaderService,
    EcompHeaderService,
    CookieService,
    ConfigurationUiService,
    CacheService,
    SdcVersionService,
    ICategoryResourceClass,
    EntityService
} from "./services";
import { UserService } from "./ng2/services/user.service";
import {forwardRef} from '@angular/core';
import {UpgradeAdapter} from '@angular/upgrade';
import {CHANGE_COMPONENT_CSAR_VERSION_FLAG, States} from "./utils";
import {IAppConfigurtaion, IAppMenu, IMainCategory, Resource, IHostedApplication} from "./models";
import {ComponentFactory} from "./utils/component-factory";
import {ModalsHandler} from "./utils/modals-handler";
import {downgradeComponent} from "@angular/upgrade/static";

import {AppModule} from './ng2/app.module';
import {PropertiesAssignmentComponent} from "./ng2/pages/properties-assignment/properties-assignment.page.component";
import {Component} from "./models/components/component";
import {ComponentServiceNg2} from "./ng2/services/component-services/component.service";
import {ComponentMetadata} from "./models/component-metadata";
import {Categories} from "./models/categories";
import {IUserProperties} from "./models/user";

let moduleName:string = 'sdcApp';
let viewModelsModuleName:string = 'Sdc.ViewModels';
let directivesModuleName:string = 'Sdc.Directives';
let servicesModuleName:string = 'Sdc.Services';
let filtersModuleName:string = 'Sdc.Filters';
let utilsModuleName:string = 'Sdc.Utils';

// Load configuration according to environment.
declare var __ENV__:string;
let sdcConfig:IAppConfigurtaion;
let sdcMenu:IAppMenu;
let pathPrefix:string = '';
if (__ENV__ === 'dev') {
    sdcConfig = require('./../../configurations/dev.js');
} else if (__ENV__ === 'prod') {
    sdcConfig = require('./../../configurations/prod.js');
    pathPrefix = 'sdc1/';
} else {
    console.log("ERROR: Environment configuration not found!");
}
sdcMenu = require('./../../configurations/menu.js');

let dependentModules:Array<string> = [
    'ui.router',
    'ui.bootstrap',
    'ui.bootstrap.tpls',
    'ngDragDrop',
    'ui-notification',
    'ngResource',
    'ngSanitize',
    'naif.base64',
    'base64',
    'uuid4',
    'checklist-model',
    'angular.filter',
    'pascalprecht.translate',
    '720kb.tooltips',
    'restangular',
    'angular-clipboard',
    'angularResizable',
    'infinite-scroll',
    viewModelsModuleName,
    directivesModuleName,
    servicesModuleName,
    filtersModuleName,
    utilsModuleName
];

// ===================== Hosted applications section ====================
// Define here new hosted apps
let hostedApplications:Array<IHostedApplication> = [
    {
        "moduleName": "dcaeApp",
        "navTitle": "DCAE",
        "defaultState": 'dcae.app.home',
        "state": {
            "name": "dcae",
            "url": "/dcae",
            "relativeHtmlPath": 'dcae-app/dcae-app-view.html',
            "controllerName": '.DcaeAppViewModel'
        }
    }
];

// Check if module exists (in case the javascript was not loaded).
let isModuleExists = (moduleName:string):boolean => {
    try {
        angular.module(moduleName);
        dependentModules.push(moduleName);
        return true;
    } catch (e) {
        console.log('Module ' + moduleName + ' does not exists');
        return false;
    }
};

// Check which hosted applications exists
_.each(hostedApplications, (hostedApp)=> {
    if (isModuleExists(hostedApp.moduleName)) {
        hostedApp['exists'] = true;
    }
});
// ===================== Hosted applications section ====================

export const ng1appModule:ng.IModule = angular.module(moduleName, dependentModules);

ng1appModule.config([
    '$stateProvider',
    '$translateProvider',
    '$urlRouterProvider',
    '$httpProvider',
    'tooltipsConfigProvider',
    'NotificationProvider',
    ($stateProvider:any,
     $translateProvider:any,
     $urlRouterProvider:ng.ui.IUrlRouterProvider,
     $httpProvider:ng.IHttpProvider,
     tooltipsConfigProvider:any,
     NotificationProvider:any):void => {

        NotificationProvider.setOptions({
            delay: 5000,
            startTop: 10,
            startRight: 10,
            closeOnClick: true,
            verticalSpacing: 20,
            horizontalSpacing: 20,
            positionX: 'right',
            positionY: 'top'
        });
        NotificationProvider.options.templateUrl = 'notification-custom-template.html';

        $translateProvider.useStaticFilesLoader({
            prefix: pathPrefix + 'assets/languages/',
            langKey: '',
            suffix: '.json?d=' + (new Date()).getTime()
        });
        $translateProvider.useSanitizeValueStrategy('escaped');
        $translateProvider.preferredLanguage('en_US');

        $httpProvider.interceptors.push('Sdc.Services.HeaderInterceptor');
        $httpProvider.interceptors.push('Sdc.Services.HttpErrorInterceptor');
        $urlRouterProvider.otherwise('welcome');

        $stateProvider.state(
            'dashboard', {
                url: '/dashboard?show&folder',
                templateUrl: "./view-models/dashboard/dashboard-view.html",
                controller: viewModelsModuleName + '.DashboardViewModel',
            }
        );

        $stateProvider.state(
            'welcome', {
                url: '/welcome',
                templateUrl: "./view-models/welcome/welcome-view.html",
                controller: viewModelsModuleName + '.WelcomeViewModel'
            }
        );

        let componentsParam:Array<any> = ['$stateParams', 'Sdc.Services.EntityService', 'Sdc.Services.CacheService', ($stateParams:any, EntityService:EntityService, cacheService:CacheService) => {
            if (cacheService.get('breadcrumbsComponents')) {
                return cacheService.get('breadcrumbsComponents');
            } else {
                return EntityService.getCatalog();
            }
        }];

        $stateProvider.state(
            'workspace', {
                url: '/workspace/:id/:type/',
                params: {'importedFile': null, 'componentCsar': null, 'resourceType': null, 'disableButtons': null},
                templateUrl: './view-models/workspace/workspace-view.html',
                controller: viewModelsModuleName + '.WorkspaceViewModel',
                resolve: {
                    injectComponent: ['$stateParams', 'ComponentFactory', 'ComponentServiceNg2', function ($stateParams, ComponentFactory:ComponentFactory, ComponentServiceNg2:ComponentServiceNg2) {
                        if ($stateParams.id) {
                            return ComponentFactory.getComponentWithMetadataFromServer($stateParams.type.toUpperCase(), $stateParams.id).then(
                                (component:Component)=> {
                                if ($stateParams.componentCsar){
                                    component = ComponentFactory.updateComponentFromCsar($stateParams.componentCsar, <Resource>component);
                                }
                                return component;
                            });
                        } else if ($stateParams.componentCsar && $stateParams.componentCsar.csarUUID) {
                            return $stateParams.componentCsar;
                        } else {
                            let emptyComponent = ComponentFactory.createEmptyComponent($stateParams.type.toUpperCase());
                            if (emptyComponent.isResource() && $stateParams.resourceType) {
                                // Set the resource type
                                (<Resource>emptyComponent).resourceType = $stateParams.resourceType;
                            }
                            if ($stateParams.importedFile) {
                                (<Resource>emptyComponent).importedFile = $stateParams.importedFile;
                            }
                            return emptyComponent;
                        }
                    }],
                    components: componentsParam
                }
            }
        );

        $stateProvider.state(
            States.WORKSPACE_GENERAL, {
                url: 'general',
                parent: 'workspace',
                controller: viewModelsModuleName + '.GeneralViewModel',
                templateUrl: './view-models/workspace/tabs/general/general-view.html',
                data: {unsavedChanges: false, bodyClass: 'general'}
            }
        );

        $stateProvider.state(
            States.WORKSPACE_ACTIVITY_LOG, {
                url: 'activity_log',
                parent: 'workspace',
                controller: viewModelsModuleName + '.ActivityLogViewModel',
                templateUrl: './view-models/workspace/tabs/activity-log/activity-log.html',
                data: {unsavedChanges: false}
            }
        );

        $stateProvider.state(
            States.WORKSPACE_DEPLOYMENT_ARTIFACTS, {
                url: 'deployment_artifacts',
                parent: 'workspace',
                controller: viewModelsModuleName + '.DeploymentArtifactsViewModel',
                templateUrl: './view-models/workspace/tabs/deployment-artifacts/deployment-artifacts-view.html',
                data: {
                    bodyClass: 'deployment_artifacts'
                }
            }
        );

        $stateProvider.state(
            States.WORKSPACE_INFORMATION_ARTIFACTS, {
                url: 'information_artifacts',
                parent: 'workspace',
                controller: viewModelsModuleName + '.InformationArtifactsViewModel',
                templateUrl: './view-models/workspace/tabs/information-artifacts/information-artifacts-view.html',
                data: {
                    bodyClass: 'information_artifacts'
                }
            }
        );

        $stateProvider.state(
            States.WORKSPACE_TOSCA_ARTIFACTS, {
                url: 'tosca_artifacts',
                parent: 'workspace',
                controller: viewModelsModuleName + '.ToscaArtifactsViewModel',
                templateUrl: './view-models/workspace/tabs/tosca-artifacts/tosca-artifacts-view.html',
                data: {
                    bodyClass: 'tosca_artifacts'
                }
            }
        );

        $stateProvider.state(
            States.WORKSPACE_PROPERTIES, {
                url: 'properties',
                parent: 'workspace',
                controller: viewModelsModuleName + '.PropertiesViewModel',
                templateUrl: './view-models/workspace/tabs/properties/properties-view.html',
                data: {
                    bodyClass: 'properties'
                }
            }
        );

        $stateProvider.state(
            States.WORKSPACE_SERVICE_INPUTS, {
                url: 'service_inputs',
                parent: 'workspace',
                controller: viewModelsModuleName + '.ServiceInputsViewModel',
                templateUrl: './view-models/workspace/tabs/inputs/service-input/service-inputs-view.html',
                data: {
                    bodyClass: 'workspace-inputs'
                }
            }
        );

        $stateProvider.state(
            States.WORKSPACE_PROPERTIES_ASSIGNMENT, {
                url: 'properties_assignment',
                params: {'component': null},
                template: '<properties-assignment></properties-assignment>',
                parent: 'workspace',
                resolve: {
                    componentData: ['injectComponent', '$stateParams', function (injectComponent:Component, $stateParams) {
                        //injectComponent.componentService = null; // this is for not passing the service so no one will use old api and start using new api
                        $stateParams.component = injectComponent;
                        return injectComponent;
                    }],
                },
                data: {
                    bodyClass: 'properties-assignment'
                }
            }
        );

        $stateProvider.state(
            States.WORKSPACE_RESOURCE_INPUTS, {
                url: 'resource_inputs',
                parent: 'workspace',
                controller: viewModelsModuleName + '.ResourceInputsViewModel',
                templateUrl: './view-models/workspace/tabs/inputs/resource-input/resource-inputs-view.html',
                data: {
                    bodyClass: 'workspace-inputs'
                }
            }
        );

        $stateProvider.state(
            States.WORKSPACE_ATTRIBUTES, {
                url: 'attributes',
                parent: 'workspace',
                controller: viewModelsModuleName + '.AttributesViewModel',
                templateUrl: './view-models/workspace/tabs/attributes/attributes-view.html',
                data: {
                    bodyClass: 'attributes'
                }
            }
        );

        $stateProvider.state(
            States.WORKSPACE_REQUIREMENTS_AND_CAPABILITIES, {
                url: 'req_and_capabilities',
                parent: 'workspace',
                controller: viewModelsModuleName + '.ReqAndCapabilitiesViewModel',
                templateUrl: './view-models/workspace/tabs/req-and-capabilities/req-and-capabilities-view.html',
                data: {
                    bodyClass: 'attributes'
                }
            }
        );


        $stateProvider.state(
            States.WORKSPACE_MANAGEMENT_WORKFLOW, {
                parent: 'workspace',
                url: 'management_workflow',
                templateUrl: './view-models/workspace/tabs/management-workflow/management-workflow-view.html',
                controller: viewModelsModuleName + '.ManagementWorkflowViewModel'
            }
        );

        $stateProvider.state(
            States.WORKSPACE_NETWORK_CALL_FLOW, {
                parent: 'workspace',
                url: 'network_call_flow',
                templateUrl: './view-models/workspace/tabs/network-call-flow/network-call-flow-view.html',
                controller: viewModelsModuleName + '.NetworkCallFlowViewModel'
            }
        );

        $stateProvider.state(
            States.WORKSPACE_DISTRIBUTION, {
                parent: 'workspace',
                url: 'distribution',
                templateUrl: './view-models/workspace/tabs/distribution/distribution-view.html',
                controller: viewModelsModuleName + '.DistributionViewModel'
            }
        );

        $stateProvider.state(
            States.WORKSPACE_COMPOSITION, {
                url: 'composition/',
                parent: 'workspace',
                controller: viewModelsModuleName + '.CompositionViewModel',
                templateUrl: './view-models/workspace/tabs/composition/composition-view.html',
                data: {
                    bodyClass: 'composition'
                }
            }
        );

        // $stateProvider.state(
        //     States.WORKSPACE_NG2, {
        //         url: 'ng2/',
        //        component: downgradeComponent({component: NG2Example2Component}), //viewModelsModuleName + '.NG2Example',
        //        templateUrl: './ng2/view-ng2/ng2.example2/ng2.example2.component.html'
        //     }
        // );

        $stateProvider.state(
            States.WORKSPACE_DEPLOYMENT, {
                url: 'deployment/',
                parent: 'workspace',
                templateUrl: './view-models/workspace/tabs/deployment/deployment-view.html',
                controller: viewModelsModuleName + '.DeploymentViewModel',
                data: {
                    bodyClass: 'composition'
                }
            }
        );

        $stateProvider.state(
            'workspace.composition.details', {
                url: 'details',
                parent: 'workspace.composition',
                templateUrl: './view-models/workspace/tabs/composition/tabs/details/details-view.html',
                controller: viewModelsModuleName + '.DetailsViewModel'
            }
        );

        $stateProvider.state(
            'workspace.composition.properties', {
                url: 'properties',
                parent: 'workspace.composition',
                templateUrl: './view-models/workspace/tabs/composition/tabs/properties-and-attributes/properties-view.html',
                controller: viewModelsModuleName + '.ResourcePropertiesViewModel'
            }
        );

        $stateProvider.state(
            'workspace.composition.artifacts', {
                url: 'artifacts',
                parent: 'workspace.composition',
                templateUrl: './view-models/workspace/tabs/composition/tabs/artifacts/artifacts-view.html',
                controller: viewModelsModuleName + '.ResourceArtifactsViewModel'
            }
        );

        $stateProvider.state(
            'workspace.composition.relations', {
                url: 'relations',
                parent: 'workspace.composition',
                templateUrl: './view-models/workspace/tabs/composition/tabs/relations/relations-view.html',
                controller: viewModelsModuleName + '.RelationsViewModel'
            }
        );

        $stateProvider.state(
            'workspace.composition.structure', {
                url: 'structure',
                parent: 'workspace.composition',
                templateUrl: './view-models/workspace/tabs/composition/tabs/structure/structure-view.html',
                controller: viewModelsModuleName + '.StructureViewModel'
            }
        );
        $stateProvider.state(
            'workspace.composition.lifecycle', {
                url: 'lifecycle',
                parent: 'workspace.composition',
                templateUrl: './view-models/workspace/tabs/composition/tabs/artifacts/artifacts-view.html',
                controller: viewModelsModuleName + '.ResourceArtifactsViewModel'
            }
        );

        $stateProvider.state(
            'workspace.composition.api', {
                url: 'api',
                parent: 'workspace.composition',
                templateUrl: './view-models/workspace/tabs/composition/tabs/artifacts/artifacts-view.html',
                controller: viewModelsModuleName + '.ResourceArtifactsViewModel'
            }
        );
        $stateProvider.state(
            'workspace.composition.deployment', {
                url: 'deployment',
                parent: 'workspace.composition',
                templateUrl: './view-models/workspace/tabs/composition/tabs/artifacts/artifacts-view.html',
                controller: viewModelsModuleName + '.ResourceArtifactsViewModel'
            }
        );

        $stateProvider.state(
            States.WORKSPACE_INTERFACE_OPERATION, {
                url: 'interface_operation',
                parent: 'workspace',
                controller: viewModelsModuleName + '.InterfaceOperationViewModel',
                templateUrl: './view-models/workspace/tabs/interface-operation/interface-operation-view.html',
                data: {
                    bodyClass: 'interface_operation'
                }
            }
        );

        $stateProvider.state(
            'workspace.plugins', {
                url: 'plugins/*path',
                parent: 'workspace',
                params: {'queryParams': null},
                templateUrl: './view-models/workspace/tabs/plugins/plugins-context-view.html',
                controller: viewModelsModuleName + '.PluginsContextViewModel'
            }
        );

        $stateProvider.state(
            'adminDashboard', {
                url: '/adminDashboard',
                templateUrl: './view-models/admin-dashboard/admin-dashboard-view.html',
                controller: viewModelsModuleName + '.AdminDashboardViewModel',
                permissions: ['ADMIN']
            }
        );

        $stateProvider.state(
            'onboardVendor', {
                url: '/onboardVendor',
                templateUrl: './view-models/onboard-vendor/onboard-vendor-view.html',
                controller: viewModelsModuleName + '.OnboardVendorViewModel'//,
            }
        );

        $stateProvider.state(
            'plugins', {
                url: '/plugins/*path',
                templateUrl: './view-models/plugins/plugins-tab-view.html',
                controller: viewModelsModuleName + '.PluginsTabViewModel'
            }
        );

        // Build the states for all hosted apps dynamically
        _.each(hostedApplications, (hostedApp)=> {
            if (hostedApp.exists) {
                $stateProvider.state(
                    hostedApp.state.name, {
                        url: hostedApp.state.url,
                        templateUrl: './view-models/dcae-app/dcae-app-view.html',
                        controller: viewModelsModuleName + hostedApp.state.controllerName
                    }
                );
            }
        });

        $stateProvider.state(
            'catalog', {
                url: '/catalog',
                templateUrl: './view-models/catalog/catalog-view.html',
                controller: viewModelsModuleName + '.CatalogViewModel',
                resolve: {
                    auth: ["$q", "UserServiceNg2", ($q:any, userService:UserService) => {
                        let userInfo:IUserProperties = userService.getLoggedinUser();
                        if (userInfo) {
                            return $q.when(userInfo);
                        } else {
                            return $q.reject({authenticated: false});
                        }
                    }]
                }
            }
        );

        $stateProvider.state(
            'support', {
                url: '/support',
                templateUrl: './view-models/support/support-view.html',
                controller: viewModelsModuleName + '.SupportViewModel'
            }
        );

        $stateProvider.state(
            'error-403', {
                url: '/error-403',
                templateUrl: "./view-models/modals/error-modal/error-403-view.html",
                controller: viewModelsModuleName + '.ErrorViewModel'
            }
        );

        tooltipsConfigProvider.options({
            side: 'bottom',
            delay: '600',
            class: 'tooltip-custom',
            lazy: 0,
            try: 0
        });

    }
]);

ng1appModule.value('ValidationPattern', /^[\s\w\&_.:-]{1,1024}$/);
ng1appModule.value('ComponentNameValidationPattern', /^(?=.*[^. ])[\s\w\&_.:-]{1,1024}$/); //DE250513 - same as ValidationPattern above, plus requirement that name not consist of dots and/or spaces alone.
ng1appModule.value('PropertyNameValidationPattern', /^[a-zA-Z0-9_:-]{1,50}$/);// DE210977
ng1appModule.value('TagValidationPattern', /^[\s\w_.-]{1,50}$/);
ng1appModule.value('VendorReleaseValidationPattern', /^[\x20-\x21\x23-\x29\x2B-\x2E\x30-\x39\x3B\x3D\x40-\x5B\x5D-\x7B\x7D-\xFF]{1,25}$/);
ng1appModule.value('VendorNameValidationPattern', /^[\x20-\x21\x23-\x29\x2B-\x2E\x30-\x39\x3B\x3D\x40-\x5B\x5D-\x7B\x7D-\xFF]{1,60}$/);
ng1appModule.value('VendorModelNumberValidationPattern', /^[\x20-\x21\x23-\x29\x2B-\x2E\x30-\x39\x3B\x3D\x40-\x5B\x5D-\x7B\x7D-\xFF]{1,65}$/);
ng1appModule.value('ContactIdValidationPattern', /^[\s\w-]{1,50}$/);
ng1appModule.value('UserIdValidationPattern', /^[\s\w-]{1,50}$/);
ng1appModule.value('ProjectCodeValidationPattern', /^[\s\w-]{5,50}$/);
ng1appModule.value('LabelValidationPattern', /^[\sa-zA-Z0-9+-]{1,25}$/);
ng1appModule.value('UrlValidationPattern', /^(https?|ftp):\/\/(((([A-Za-z]|\d|-|\.|_|~|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])|(%[\da-f]{2})|[!\$&'\(\)\*\+,;=]|:)*@)?(((\d|[1-9]\d|1\d\d|2[0-4]\d|25[0-5])\.(\d|[1-9]\d|1\d\d|2[0-4]\d|25[0-5])\.(\d|[1-9]\d|1\d\d|2[0-4]\d|25[0-5])\.(\d|[1-9]\d|1\d\d|2[0-4]\d|25[0-5]))|((([A-Za-z]|\d|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])|(([A-Za-z]|\d|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])([A-Za-z]|\d|-|\.|_|~|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])*([a-z]|\d|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])))\.)+(([A-Za-z]|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])|(([A-Za-z]|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])([A-Za-z]|\d|-|\.|_|~|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])*([A-Za-z]|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])))\.?)(:\d*)?)(\/((([A-Za-z]|\d|-|\.|_|~|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])|(%[\da-f]{2})|[!\$&'\(\)\*\+,;=]|:|@)+(\/(([A-Za-z]|\d|-|\.|_|~|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])|(%[\da-f]{2})|[!\$&'\(\)\*\+,;=]|:|@)*)*)?)?(\?((([A-Za-z]|\d|-|\.|_|~|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])|(%[\da-f]{2})|[!\$&'\(\)\*\+,;=]|:|@)|[\uE000-\uF8FF]|\/|\?)*)?(\#((([A-Za-z]|\d|-|\.|_|~|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])|(%[\da-f]{2})|[!\$&'\(\)\*\+,;=]|:|@)|\/|\?)*)?$/);
ng1appModule.value('IntegerValidationPattern', /^(([-+]?\d+)|([-+]?0x[0-9a-fA-F]+))$/);
ng1appModule.value('IntegerNoLeadingZeroValidationPattern', /^(0|[-+]?[1-9][0-9]*|[-+]?0x[0-9a-fA-F]+|[-+]?0o[0-7]+)$/);
ng1appModule.value('FloatValidationPattern', /^[-+]?[0-9]*\.?[0-9]+([eE][-+]?[0-9]+)?f?$/);
ng1appModule.value('NumberValidationPattern', /^((([-+]?\d+)|([-+]?0x[0-9a-fA-F]+))|([-+]?[0-9]*\.?[0-9]+([eE][-+]?[0-9]+)?))$/);
ng1appModule.value('KeyValidationPattern', /^[\s\w-]{1,50}$/);
ng1appModule.value('CommentValidationPattern', /^[\u0000-\u00BF]*$/);
ng1appModule.value('BooleanValidationPattern', /^([Tt][Rr][Uu][Ee]|[Ff][Aa][Ll][Ss][Ee])$/);
ng1appModule.value('MapKeyValidationPattern', /^[\w]{1,50}$/);

ng1appModule.constant('sdcConfig', sdcConfig);
ng1appModule.constant('sdcMenu', sdcMenu);

ng1appModule.run([
    '$http',
    'Sdc.Services.CacheService',
    'Sdc.Services.CookieService',
    'Sdc.Services.ConfigurationUiService',
    'UserServiceNg2',
    'Sdc.Services.CategoryResourceService',
    'Sdc.Services.SdcVersionService',
    '$state',
    '$rootScope',
    '$location',
    'sdcMenu',
    'ModalsHandler',
    'Sdc.Services.EcompHeaderService',
    'LeftPaletteLoaderService',
    'Sdc.Services.DataTypesService',
    'AngularJSBridge',
    '$templateCache',
    ($http:ng.IHttpService,
     cacheService:CacheService,
     cookieService:CookieService,
     ConfigurationUi:ConfigurationUiService,
     userService:UserService,
     categoryResourceService:ICategoryResourceClass,
     sdcVersionService:SdcVersionService,
     $state:ng.ui.IStateService,
     $rootScope:ng.IRootScopeService,
     $location:ng.ILocationService,
     sdcMenu:IAppMenu,
     ModalsHandler:ModalsHandler,
     ecompHeaderService:EcompHeaderService,
     LeftPaletteLoaderService:LeftPaletteLoaderService,
     DataTypesService:DataTypesService,
     AngularJSBridge,
     $templateCache:ng.ITemplateCacheService):void => {
        $templateCache.put('notification-custom-template.html', require('./view-models/shared/notification-custom-template.html'));
        //handle cache data - version
        let initAsdcVersion:Function = ():void => {

            let onFailed = (response) => {
                console.info('onFailed initAsdcVersion', response);
                cacheService.set('version', 'N/A');
            };

            let onSuccess = (version:any) => {
                let tmpVerArray = version.version.split(".");
                let ver = tmpVerArray[0] + "." + tmpVerArray[1] + "." + tmpVerArray[2];
                cacheService.set('version', ver);
            };

            sdcVersionService.getVersion().then(onSuccess, onFailed);

        };

        let initEcompMenu:Function = (user):void => {
            ecompHeaderService.getMenuItems(user.userId).then((data)=> {
                $rootScope['menuItems'] = data;
            });
        };

        let initConfigurationUi:Function = ():void => {
            ConfigurationUi
                .getConfigurationUi()
                .then((configurationUi:any) => {
                    cacheService.set('UIConfiguration', configurationUi);
                });
        };

        let initCategories:Function = ():void => {
            let onError = ():void => {
                console.log('Failed to init categories');
            };

            categoryResourceService.getAllCategories((categories: Categories):void => {
                cacheService.set('serviceCategories', categories.serviceCategories);
                cacheService.set('resourceCategories', categories.resourceCategories);
            }, onError);
        };

        // Add hosted applications to sdcConfig
        sdcConfig.hostedApplications = hostedApplications;

        //handle http config
        $http.defaults.withCredentials = true;
        $http.defaults.headers.common.Authorization = 'Basic YmVlcDpib29w';
        $http.defaults.headers.common[cookieService.getUserIdSuffix()] = cookieService.getUserId();

        initAsdcVersion();
        initConfigurationUi();
       // initLeftPalette();
        DataTypesService.initDataTypes();

        //handle stateChangeStart
        let internalDeregisterStateChangeStartWatcher:Function = ():void => {
            if (deregisterStateChangeStartWatcher) {
                deregisterStateChangeStartWatcher();
                deregisterStateChangeStartWatcher = null;
            }
            if (deregisterStateChangeSuccessWatcher) {
                deregisterStateChangeSuccessWatcher();
                deregisterStateChangeSuccessWatcher = null;
            }
        };

        let removeLoader:Function = ():void => {
            $(".sdc-loading-page .main-loader").addClass("animated fadeOut");
            $(".sdc-loading-page .caption1").addClass("animated fadeOut");
            $(".sdc-loading-page .caption2").addClass("animated fadeOut");
            window.setTimeout(():void=> {
                $(".sdc-loading-page .main-loader").css("display", "none");
                $(".sdc-loading-page .caption1").css("display", "none");
                $(".sdc-loading-page .caption2").css("display", "none");
                $(".sdc-loading-page").addClass("animated fadeOut");
            }, 1000);
        };

        let onNavigateOut:Function = (toState, toParams):void => {
            let onOk = ():void => {
                $state.current.data.unsavedChanges = false;
                $state.go(toState.name, toParams);
            };

            let data = sdcMenu.alertMessages.exitWithoutSaving;
            //open notify to user if changes are not saved
            ModalsHandler.openAlertModal(data.title, data.message).then(onOk);
        };

        let onStateChangeStart:Function = (event, toState, toParams, fromState, fromParams):void => {
            console.info((new Date()).getTime());
            console.info('$stateChangeStart', toState.name);

            if (toState.name !== 'error-403' && !userService.getLoggedinUser()) {
                if (toState.name !== 'welcome') {
                    event.preventDefault();
                }

                userService.authorize().subscribe((userInfo:IUserProperties) => {
                    if (!doesUserHasAccess(toState, userInfo)) {
                        $state.go('error-403');
                        console.info('User has no permissions');
                        return;
                    }
                    userService.setLoggedinUser(userInfo);
                    cacheService.set('user', userInfo);
                    initCategories();
                    //   initEcompMenu(userInfo);
                    setTimeout(function () {

                        removeLoader();

                        // initCategories();
                        if (userService.getLoggedinUser().role === 'ADMIN') {
                            // toState.name = "adminDashboard";
                            $state.go("adminDashboard", toParams);
                            return;
                        }

                        // After user authorized init categories
                        window.setTimeout(():void=> {
                            if ($state.current.name === '') {
                                $state.go(toState.name, toParams);
                            }

                            console.log("------$state.current.name=" + $state.current.name);

                        }, 1000);

                    }, 0);

                }, () => {
                    $state.go('error-403');
                });
            }
            else if (userService.getLoggedinUser()) {
                if (!doesUserHasAccess(toState, userService.getLoggedinUser())) {
                    event.preventDefault();
                    $state.go('error-403');
                    console.info('User has no permissions');
                }
                if (toState.name === "welcome") {
                    $state.go("dashboard");
                }

                //if form is dirty and not save  - notify to user
                if (fromState.data && fromState.data.unsavedChanges && fromParams.id != toParams.id) {
                    event.preventDefault();
                    onNavigateOut(toState, toParams);
                }
            }

            // if enetering workspace, set the previousState param
            if (toState.name.indexOf('workspace') !== -1) {
                if (!toParams.previousState) {
                    const tmpPreviousState1 = fromParams && fromParams.previousState;
                    const tmpPreviousState2 = (['dashboard', 'catalog'].indexOf(fromState.name) !== -1) ? fromState.name : 'catalog';
                    toParams.previousState = tmpPreviousState1 || tmpPreviousState2;
                }
            }

        };

        let onStateChangeSuccess:Function = (event, toState, toParams, fromState, fromParams):void => {
            console.info('$stateChangeSuccess', toState.name);

            // Workaround in case we are entering other state then workspace (user move to catalog)
            // remove the changeComponentCsarVersion, user should open again the VSP list and select one for update.
            if (toState.name.indexOf('workspace') === -1) {
                if (cacheService.contains(CHANGE_COMPONENT_CSAR_VERSION_FLAG)) {
                    cacheService.remove(CHANGE_COMPONENT_CSAR_VERSION_FLAG);
                }
            }

            //set body class
            $rootScope['bodyClass'] = 'default-class';
            if (toState.data && toState.data.bodyClass) {
                $rootScope['bodyClass'] = toState.data.bodyClass;
            }
        };

        let doesUserHasAccess:Function = (toState, user):boolean => {

            let isUserHasAccess = true;
            if (toState.permissions && toState.permissions.length > 0) {
                isUserHasAccess = _.includes(toState.permissions, user.role);
            }
            return isUserHasAccess;
        };
        let deregisterStateChangeStartWatcher:Function;
        let deregisterStateChangeSuccessWatcher:Function;

        let registerStateChangeStartWatcher:Function = ():void => {
            internalDeregisterStateChangeStartWatcher();
            console.info('registerStateChangeStartWatcher $stateChangeStart');
            deregisterStateChangeStartWatcher = $rootScope.$on('$stateChangeStart', (event, toState, toParams, fromState, fromParams):void => {
                onStateChangeStart(event, toState, toParams, fromState, fromParams);
            });
            deregisterStateChangeSuccessWatcher = $rootScope.$on('$stateChangeSuccess', (event, toState, toParams, fromState, fromParams):void => {
                onStateChangeSuccess(event, toState, toParams, fromState, fromParams);
            });
        };

        registerStateChangeStartWatcher();
    }]);
+ },
+ {
+ "id": "f7db5396.7b5f1",
+ "type": "switchNode",
+ "name": "switch",
+ "xml": "<switch test=\"`$org.onap.appc.adapter.ansible.result.code`\">\n",
+ "comments": "",
+ "outputs": 1,
+ "x": 690.9999389648438,
+ "y": 530.0000228881836,
+ "z": "af8f5cdd.6e4de",
+ "wires": [
+ [
+ "bc5a2382.4973",
+ "84f0dd88.8438",
+ "ffd4aab1.e3c4b8"
+ ]
+ ]
+ },
+ {
+ "id": "bc5a2382.4973",
+ "type": "other",
+ "name": "outcome 500",
+ "xml": "<outcome value='500'>\n",
+ "comments": "",
+ "outputs": 1,
+ "x": 835.9999389648438,
+ "y": 528.0000305175781,
+ "z": "af8f5cdd.6e4de",
+ "wires": [
+ [
+ "80cc4946.3f0f78"
+ ]
+ ]
+ },
+ {
+ "id": "84f0dd88.8438",
+ "type": "other",
+ "name": "outcome 100",
+ "xml": "<outcome value='100'>\n",
+ "comments": "",
+ "outputs": 1,
+ "x": 838.9999389648438,
+ "y": 571.0000610351562,
+ "z": "af8f5cdd.6e4de",
+ "wires": [
+ [
+ "f44a47b3.3aa128"
+ ]
+ ]
+ },
+ {
+ "id": "f44a47b3.3aa128",
+ "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='`$org.onap.appc.adapter.ansible.Id`'/>\n\t<parameter name='PlaybookName' value='`$prop.lcm.resume-traffic.playbookname`'/>\n\t\n\n\n\n\n",
+ "comments": "",
+ "outputs": 1,
+ "x": 1025.9999389648438,
+ "y": 570.0000305175781,
+ "z": "af8f5cdd.6e4de",
+ "wires": [
+ [
+ "dd2fe7e6.957248",
+ "6913b982.6c9bb8"
+ ]
+ ]
+ },
+ {
+ "id": "895a0a53.e12ea8",
+ "type": "failure",
+ "name": "failure",
+ "xml": "<outcome value='failure'>\n",
+ "comments": "",
+ "outputs": 1,
+ "x": 581.9999389648438,
+ "y": 439.0000534057617,
+ "z": "af8f5cdd.6e4de",
+ "wires": [
+ [
+ "80cc4946.3f0f78"
+ ]
+ ]
+ },
+ {
+ "id": "f279f5b8.9d49b8",
+ "type": "other",
+ "name": "other",
+ "xml": "<outcome value='Other'>\n",
+ "comments": "",
+ "outputs": 1,
+ "x": 583.9999389648438,
+ "y": 491.0000228881836,
+ "z": "af8f5cdd.6e4de",
+ "wires": [
+ [
+ "f7db5396.7b5f1"
+ ]
+ ]
+ },
+ {
+ "id": "dd2fe7e6.957248",
+ "type": "failure",
+ "name": "failure",
+ "xml": "<outcome value='failure'>\n",
+ "comments": "",
+ "outputs": 1,
+ "x": 1189.9999389648438,
+ "y": 542.0000305175781,
+ "z": "af8f5cdd.6e4de",
+ "wires": [
+ [
+ "80cc4946.3f0f78"
+ ]
+ ]
+ },
+ {
+ "id": "ffd4aab1.e3c4b8",
+ "type": "other",
+ "name": "outcome 101",
+ "xml": "<outcome value='101'>\n",
+ "comments": "",
+ "outputs": 1,
+ "x": 832.9999389648438,
+ "y": 486.00006103515625,
+ "z": "af8f5cdd.6e4de",
+ "wires": [
+ [
+ "80cc4946.3f0f78"
+ ]
+ ]
+ },
+ {
+ "id": "6913b982.6c9bb8",
+ "type": "success",
+ "name": "success",
+ "xml": "<outcome value='success'>\n",
+ "comments": "",
+ "outputs": 1,
+ "x": 1191.9999389648438,
+ "y": 597.0000915527344,
+ "z": "af8f5cdd.6e4de",
+ "wires": [
+ [
+ "14c8dea1.b5b7a1"
+ ]
+ ]
+ },
+ {
+ "id": "a32993f8.f8215",
+ "type": "returnSuccess",
+ "name": "return success",
+ "xml": "<return status='success'>\n<parameter name='status.code' value='`$org.onap.appc.adapter.ansible.result.code`' />\n<parameter name='status.message' value='`$org.onap.appc.adapter.ansible.message`'/>",
+ "comments": "",
+ "x": 1467.9998779296875,
+ "y": 648.0000610351562,
+ "z": "af8f5cdd.6e4de",
+ "wires": []
+ },
+ {
+ "id": "d8c3f83d.d0b9d8",
+ "type": "dgstart",
+ "name": "DGSTART",
+ "outputs": 1,
+ "x": 153,
+ "y": 102,
+ "z": "af8f5cdd.6e4de",
+ "wires": [
+ [
+ "c220826b.91906"
+ ]
+ ]
+ },
+ {
+ "id": "e635fd5d.f4087",
+ "type": "block",
+ "name": "block",
+ "xml": "<block>\n",
+ "atomic": "false",
+ "comments": "",
+ "outputs": 1,
+ "x": 139.91668701171875,
+ "y": 241.08334350585938,
+ "z": "af8f5cdd.6e4de",
+ "wires": [
+ [
+ "810e1e54.dec1c",
+ "ee1802be.c5c18",
+ "e8d3b31a.f46c6",
+ "4d7f56db.9375c8"
+ ]
+ ]
+ },
+ {
+ "id": "ee1802be.c5c18",
+ "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": 328.00001525878906,
+ "y": 225.08334350585938,
+ "z": "af8f5cdd.6e4de",
+ "wires": [
+ []
+ ]
+ },
+ {
+ "id": "3830f5d4.87f1aa",
+ "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": 1222.9999389648438,
+ "y": 371.0833740234375,
+ "z": "af8f5cdd.6e4de",
+ "wires": [
+ [
+ "1566d659.a0655a"
+ ]
+ ]
+ },
+ {
+ "id": "1566d659.a0655a",
+ "type": "failure",
+ "name": "failure",
+ "xml": "<outcome value='failure'>\n",
+ "comments": "",
+ "outputs": 1,
+ "x": 1392.9998779296875,
+ "y": 370.0833740234375,
+ "z": "af8f5cdd.6e4de",
+ "wires": [
+ [
+ "22f8bfd0.6139e"
+ ]
+ ]
+ },
+ {
+ "id": "80cc4946.3f0f78",
+ "type": "block",
+ "name": "block",
+ "xml": "<block>\n",
+ "atomic": "false",
+ "comments": "",
+ "outputs": 1,
+ "x": 1025.9998779296875,
+ "y": 395.0833740234375,
+ "z": "af8f5cdd.6e4de",
+ "wires": [
+ [
+ "3830f5d4.87f1aa",
+ "fedbb5e6.fb3c28",
+ "898f667e.daf2e8"
+ ]
+ ]
+ },
+ {
+ "id": "7ce48bed.5b7c74",
+ "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": 1488.4998779296875,
+ "y": 597.0833740234375,
+ "z": "af8f5cdd.6e4de",
+ "wires": [
+ [
+ "37e7fa80.2728b6"
+ ]
+ ]
+ },
+ {
+ "id": "37e7fa80.2728b6",
+ "type": "failure",
+ "name": "failure",
+ "xml": "<outcome value='failure'>\n",
+ "comments": "",
+ "outputs": 1,
+ "x": 1648.4998779296875,
+ "y": 597.0833740234375,
+ "z": "af8f5cdd.6e4de",
+ "wires": [
+ [
+ "47c7511a.dd8fe"
+ ]
+ ]
+ },
+ {
+ "id": "22f8bfd0.6139e",
+ "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": 1524.9998779296875,
+ "y": 370.0833740234375,
+ "z": "af8f5cdd.6e4de",
+ "wires": [
+ []
+ ]
+ },
+ {
+ "id": "fedbb5e6.fb3c28",
+ "type": "returnFailure",
+ "name": "return failure",
+ "xml": "<return status='failure'>\n<parameter name='status.code' value='401' />\n<parameter name='status.message' value='`$org.onap.appc.adapter.ansible.message`' />\n",
+ "comments": "",
+ "x": 1197.9165649414062,
+ "y": 408.0833740234375,
+ "z": "af8f5cdd.6e4de",
+ "wires": []
+ },
+ {
+ "id": "47c7511a.dd8fe",
+ "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": 1769.9166259765625,
+ "y": 598.0833740234375,
+ "z": "af8f5cdd.6e4de",
+ "wires": [
+ []
+ ]
+ },
+ {
+ "id": "898f667e.daf2e8",
+ "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=\"`$resume-traffic-input.common-header.request-id + '-' + $resume-traffic-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='resume-traffic'/>\n<parameter name='lcm-dmaap.type' value='`$prop.lcm.dmaap.type`'/>\n<parameter name='lcm-dmaap.timestamp' value='`$resume-traffic-input.common-header.timestamp`'/>\n<parameter name='lcm-dmaap.api-ver' value='`$resume-traffic-input.common-header.api-ver`'/>\n<parameter name='lcm-dmaap.originator-id' value='`$resume-traffic-input.common-header.originator-id`'/>\n<parameter name='lcm-dmaap.request-id' value='`$resume-traffic-input.common-header.request-id`'/>\n<parameter name='lcm-dmaap.sub-request-id' value='`$resume-traffic-input.common-header.sub-request-id`'/>\n<parameter name='lcm-dmaap.flags.mode' value='`$resume-traffic-input.common-header.flags.mode`'/>\n<parameter name='lcm-dmaap.flags.force' value='`$resume-traffic-input.common-header.flags.force`'/>\n<parameter name='lcm-dmaap.flags.ttl' value='`$resume-traffic-input.common-header.flags.ttl`'/>\n<parameter name='lcm-dmaap.status.code' value='`$org.onap.appc.adapter.ansible.result.code`' />\n<parameter name='lcm-dmaap.status.message' value='`$org.onap.appc.adapter.ansible.message`'/>\n",
+ "comments": "",
+ "x": 1174.9999389648438,
+ "y": 318.0833740234375,
+ "z": "af8f5cdd.6e4de",
+ "wires": []
+ },
+ {
+ "id": "14c8dea1.b5b7a1",
+ "type": "block",
+ "name": "block",
+ "xml": "<block>\n",
+ "atomic": "false",
+ "comments": "",
+ "outputs": 1,
+ "x": 1317.9998779296875,
+ "y": 596.0833435058594,
+ "z": "af8f5cdd.6e4de",
+ "wires": [
+ [
+ "7ce48bed.5b7c74",
+ "70a28c6a.563d24",
+ "a32993f8.f8215"
+ ]
+ ]
+ },
+ {
+ "id": "70a28c6a.563d24",
+ "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=\"`$resume-traffic-input.common-header.request-id + '-' + $resume-traffic-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='resume-traffic'/>\n<parameter name='lcm-dmaap.type' value='`$prop.lcm.dmaap.type`'/>\n<parameter name='lcm-dmaap.timestamp' value='`$resume-traffic-input.common-header.timestamp`'/>\n<parameter name='lcm-dmaap.api-ver' value='`$resume-traffic-input.common-header.api-ver`'/>\n<parameter name='lcm-dmaap.originator-id' value='`$resume-traffic-input.common-header.originator-id`'/>\n<parameter name='lcm-dmaap.request-id' value='`$resume-traffic-input.common-header.request-id`'/>\n<parameter name='lcm-dmaap.sub-request-id' value='`$resume-traffic-input.common-header.sub-request-id`'/>\n<parameter name='lcm-dmaap.flags.mode' value='`$resume-traffic-input.common-header.flags.mode`'/>\n<parameter name='lcm-dmaap.flags.force' value='`$resume-traffic-input.common-header.flags.force`'/>\n<parameter name='lcm-dmaap.flags.ttl' value='`$resume-traffic-input.common-header.flags.ttl`'/>\n<parameter name='lcm-dmaap.status.code' value='`$org.onap.appc.adapter.ansible.result.code`' />\n<parameter name='lcm-dmaap.status.message' value='`$org.onap.appc.adapter.ansible.message`'/>\n",
+ "comments": "",
+ "x": 1448.1666259765625,
+ "y": 549.0833740234375,
+ "z": "af8f5cdd.6e4de",
+ "wires": []
+ },
+ {
+ "id": "fa759954.4e2068",
+ "type": "not-found",
+ "name": "not-found",
+ "xml": "<outcome value='not-found'>\n",
+ "comments": "",
+ "outputs": 1,
+ "x": 577.9999389648438,
+ "y": 392.0000228881836,
+ "z": "af8f5cdd.6e4de",
+ "wires": [
+ [
+ "ed41675d.59c088"
+ ]
+ ]
+ },
+ {
+ "id": "756c2e53.ca6d7",
+ "type": "set",
+ "name": "set Defaults",
+ "xml": "<set>\n<parameter name='org.onap.appc.adapter.ansible.result.code' value='401'/>\n<parameter name='org.onap.appc.adapter.ansible.message' value='Ansible Adapter was not found'/>\n",
+ "comments": "",
+ "x": 1009.9999389648438,
+ "y": 297.0000305175781,
+ "z": "af8f5cdd.6e4de",
+ "wires": []
+ },
+ {
+ "id": "ed41675d.59c088",
+ "type": "block",
+ "name": "block",
+ "xml": "<block>\n",
+ "atomic": "false",
+ "comments": "",
+ "outputs": 1,
+ "x": 761.9999389648438,
+ "y": 384.0000228881836,
+ "z": "af8f5cdd.6e4de",
+ "wires": [
+ [
+ "756c2e53.ca6d7",
+ "80cc4946.3f0f78"
+ ]
+ ]
+ },
+ {
+ "id": "e8d3b31a.f46c6",
+ "type": "set",
+ "name": "set default status value",
+ "xml": "<set>\n<parameter name='status.code' value='200' />\n<parameter name='status.message' value='unexpected return from DG' />\n<parameter name='nodelist' value=\"`$prop.ansible.nodelist`\"/>",
+ "comments": "",
+ "x": 336,
+ "y": 269,
+ "z": "af8f5cdd.6e4de",
+ "wires": []
+ },
+ {
+ "id": "4d7f56db.9375c8",
+ "type": "get-resource",
+ "name": "get aai.generic-vnf by vnf-id",
+ "xml": "<get-resource plugin=\"org.onap.ccsdk.sli.adaptors.aai.AAIService\" \n\tresource=\"generic-vnf\" \n\t\tkey=\"generic-vnf.vnf-id = $resume-traffic-input.action-identifiers.vnf-id\" \n\t\tlocal-only=\"false\" \n\t\tpfx='aai.generic-vnf'>",
+ "comments": "",
+ "outputs": 1,
+ "x": 349.0000305175781,
+ "y": 325,
+ "z": "af8f5cdd.6e4de",
+ "wires": [
+ [
+ "fa69a126.2a554",
+ "f9cb9963.f9e368"
+ ]
+ ]
+ },
+ {
+ "id": "fa69a126.2a554",
+ "type": "failure",
+ "name": "other",
+ "xml": "<outcome value='Other'>\n",
+ "comments": "",
+ "outputs": 1,
+ "x": 589.86083984375,
+ "y": 312.53564453125,
+ "z": "af8f5cdd.6e4de",
+ "wires": [
+ [
+ "2d1a88c6.11f9d8"
+ ]
+ ]
+ },
+ {
+ "id": "f9cb9963.f9e368",
+ "type": "success",
+ "name": "success",
+ "xml": "<outcome value='success'>\n",
+ "comments": "",
+ "outputs": 1,
+ "x": 591.3908081054688,
+ "y": 260.28399658203125,
+ "z": "af8f5cdd.6e4de",
+ "wires": [
+ [
+ "c4d4de4d.3e19f"
+ ]
+ ]
+ },
+ {
+ "id": "c4d4de4d.3e19f",
+ "type": "set",
+ "name": "set nodelist",
+ "xml": "<set>\n<parameter name='quote' value=\"'\" />\n<parameter name='nodelist' value=\"`'[' + $quote + $aai.ipv4-oam-address + $quote + ']'`\"/>\n",
+ "comments": "",
+ "x": 740.3908081054688,
+ "y": 259.28399658203125,
+ "z": "af8f5cdd.6e4de",
+ "wires": []
+ },
+ {
+ "id": "2d1a88c6.11f9d8",
+ "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='VNF not found in AAI. Nodelist retrieved from config'/>",
+ "comments": "",
+ "outputs": 1,
+ "x": 736,
+ "y": 312,
+ "z": "af8f5cdd.6e4de",
+ "wires": [
+ []
+ ]
+ }
+] \ No newline at end of file
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
index 102870d5..60fe6a61 100644
--- a/platform-logic/lcm/src/main/json/LCM_upgrade-post-check.json
+++ b/platform-logic/lcm/src/main/json/LCM_upgrade-post-check.json
@@ -1,478 +1,553 @@
-[
- {
- "id": "7a39f2fe.3dcdf4",
- "type": "method",
- "name": "upgrade-post-check",
- "xml": "<method rpc='upgrade-post-check' mode='sync'>\n",
- "comments": "",
- "outputs": 1,
- "x": 504,
- "y": 189,
- "z": "8298903b.6dd47",
- "wires": [
- [
- "29adfec5.3e996a"
- ]
- ]
- },
- {
- "id": "d4e963ab.cbd07",
- "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": 291.99993896484375,
- "y": 190,
- "z": "8298903b.6dd47",
- "wires": [
- [
- "7a39f2fe.3dcdf4"
- ]
- ]
- },
- {
- "id": "dbae8f8c.b9f5c8",
- "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": 292.00001525878906,
- "y": 407,
- "z": "8298903b.6dd47",
- "wires": [
- [
- "6f51d66.269da28",
- "3cef6eb.3854f92",
- "7d81ec43.a1807c"
- ]
- ]
- },
- {
- "id": "d7bab1d5.51757",
- "type": "switchNode",
- "name": "switch",
- "xml": "<switch test=\"`$org.onap.appc.adapter.ansible.result.code`\">\n",
- "comments": "",
- "outputs": 1,
- "x": 593,
- "y": 455,
- "z": "8298903b.6dd47",
- "wires": [
- [
- "2746f459.4c8844",
- "f804c90e.5a0878",
- "a107745e.d375f"
- ]
- ]
- },
- {
- "id": "2746f459.4c8844",
- "type": "other",
- "name": "outcome 500",
- "xml": "<outcome value='500'>\n",
- "comments": "",
- "outputs": 1,
- "x": 738,
- "y": 453.00000762939453,
- "z": "8298903b.6dd47",
- "wires": [
- [
- "812cc9c1.aee1"
- ]
- ]
- },
- {
- "id": "f804c90e.5a0878",
- "type": "other",
- "name": "outcome 100",
- "xml": "<outcome value='100'>\n",
- "comments": "",
- "outputs": 1,
- "x": 741,
- "y": 496.00003814697266,
- "z": "8298903b.6dd47",
- "wires": [
- [
- "91a9092c.bcfc5"
- ]
- ]
- },
- {
- "id": "91a9092c.bcfc5",
- "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='`$org.onap.appc.adapter.ansible.Id`'/>\n\t<parameter name='PlaybookName' value='`$prop.lcm.upgrade-post-check.playbookname`'/>\n\t\n\n\n\n\n",
- "comments": "",
- "outputs": 1,
- "x": 919.0000305175781,
- "y": 496.00003814697266,
- "z": "8298903b.6dd47",
- "wires": [
- [
- "746c71a8.ecf54",
- "3553670.a015a9a"
- ]
- ]
- },
- {
- "id": "3cef6eb.3854f92",
- "type": "failure",
- "name": "failure",
- "xml": "<outcome value='failure'>\n",
- "comments": "",
- "outputs": 1,
- "x": 484,
- "y": 364.0000305175781,
- "z": "8298903b.6dd47",
- "wires": [
- [
- "812cc9c1.aee1"
- ]
- ]
- },
- {
- "id": "6f51d66.269da28",
- "type": "other",
- "name": "other",
- "xml": "<outcome value='Other'>\n",
- "comments": "",
- "outputs": 1,
- "x": 486,
- "y": 416,
- "z": "8298903b.6dd47",
- "wires": [
- [
- "d7bab1d5.51757"
- ]
- ]
- },
- {
- "id": "746c71a8.ecf54",
- "type": "failure",
- "name": "failure",
- "xml": "<outcome value='failure'>\n",
- "comments": "",
- "outputs": 1,
- "x": 1080.0000610351562,
- "y": 473.00000762939453,
- "z": "8298903b.6dd47",
- "wires": [
- [
- "812cc9c1.aee1"
- ]
- ]
- },
- {
- "id": "a107745e.d375f",
- "type": "other",
- "name": "outcome 101",
- "xml": "<outcome value='101'>\n",
- "comments": "",
- "outputs": 1,
- "x": 735,
- "y": 411.00003814697266,
- "z": "8298903b.6dd47",
- "wires": [
- [
- "812cc9c1.aee1"
- ]
- ]
- },
- {
- "id": "3553670.a015a9a",
- "type": "success",
- "name": "success",
- "xml": "<outcome value='success'>\n",
- "comments": "",
- "outputs": 1,
- "x": 1087.0000610351562,
- "y": 521.0000381469727,
- "z": "8298903b.6dd47",
- "wires": [
- [
- "9eb97883.c25dd"
- ]
- ]
- },
- {
- "id": "4d0102b3.cb0034",
- "type": "returnSuccess",
- "name": "return success",
- "xml": "<return status='success'>\n<parameter name='status.code' value='`$org.onap.appc.adapter.ansible.result.code`' />\n<parameter name='status.message' value='`$org.onap.appc.adapter.ansible.message`'/>",
- "comments": "",
- "x": 1369.9999389648438,
- "y": 573.0000381469727,
- "z": "8298903b.6dd47",
- "wires": []
- },
- {
- "id": "b0b34f77.1a63a",
- "type": "dgstart",
- "name": "DGSTART",
- "outputs": 1,
- "x": 107,
- "y": 189,
- "z": "8298903b.6dd47",
- "wires": [
- [
- "d4e963ab.cbd07"
- ]
- ]
- },
- {
- "id": "29adfec5.3e996a",
- "type": "block",
- "name": "block",
- "xml": "<block>\n",
- "atomic": "false",
- "comments": "",
- "outputs": 1,
- "x": 102.91668701171875,
- "y": 370.0833435058594,
- "z": "8298903b.6dd47",
- "wires": [
- [
- "dbae8f8c.b9f5c8",
- "2da1a6a3.957b62",
- "f33027ae.498be"
- ]
- ]
- },
- {
- "id": "2da1a6a3.957b62",
- "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": 275.00001525878906,
- "y": 328.0833435058594,
- "z": "8298903b.6dd47",
- "wires": [
- []
- ]
- },
- {
- "id": "e8fdf598.f43db",
- "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": 1087.0000610351562,
- "y": 317.0833435058594,
- "z": "8298903b.6dd47",
- "wires": [
- [
- "27736dcd.8ac982"
- ]
- ]
- },
- {
- "id": "27736dcd.8ac982",
- "type": "failure",
- "name": "failure",
- "xml": "<outcome value='failure'>\n",
- "comments": "",
- "outputs": 1,
- "x": 1257,
- "y": 316.0833435058594,
- "z": "8298903b.6dd47",
- "wires": [
- [
- "86cb0ea6.638338"
- ]
- ]
- },
- {
- "id": "812cc9c1.aee1",
- "type": "block",
- "name": "block",
- "xml": "<block>\n",
- "atomic": "false",
- "comments": "",
- "outputs": 1,
- "x": 890,
- "y": 341.0833435058594,
- "z": "8298903b.6dd47",
- "wires": [
- [
- "e8fdf598.f43db",
- "e11198e6.679a2",
- "a3a650c3.8200a8"
- ]
- ]
- },
- {
- "id": "7d25ddd1.4d85f4",
- "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": 1390.4999389648438,
- "y": 522.0833511352539,
- "z": "8298903b.6dd47",
- "wires": [
- [
- "1bd36512.b1eedb"
- ]
- ]
- },
- {
- "id": "1bd36512.b1eedb",
- "type": "failure",
- "name": "failure",
- "xml": "<outcome value='failure'>\n",
- "comments": "",
- "outputs": 1,
- "x": 1550.4999389648438,
- "y": 522.0833511352539,
- "z": "8298903b.6dd47",
- "wires": [
- [
- "8b14e6d.6ed9318"
- ]
- ]
- },
- {
- "id": "86cb0ea6.638338",
- "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": 1389,
- "y": 316.0833435058594,
- "z": "8298903b.6dd47",
- "wires": [
- []
- ]
- },
- {
- "id": "e11198e6.679a2",
- "type": "returnFailure",
- "name": "return failure",
- "xml": "<return status='failure'>\n<parameter name='status.code' value='401' />\n<parameter name='status.message' value='`$org.onap.appc.adapter.ansible.message`' />\n",
- "comments": "",
- "x": 1061.9166870117188,
- "y": 354.0833435058594,
- "z": "8298903b.6dd47",
- "wires": []
- },
- {
- "id": "8b14e6d.6ed9318",
- "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": 1671.9166870117188,
- "y": 523.0833511352539,
- "z": "8298903b.6dd47",
- "wires": [
- []
- ]
- },
- {
- "id": "a3a650c3.8200a8",
- "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.request-id + '-' + $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.request-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.status.code' value='`$org.onap.appc.adapter.ansible.result.code`' />\n<parameter name='lcm-dmaap.status.message' value='`$org.onap.appc.adapter.ansible.message`'/>\n",
- "comments": "",
- "x": 1039.0000610351562,
- "y": 264.0833435058594,
- "z": "8298903b.6dd47",
- "wires": []
- },
- {
- "id": "9eb97883.c25dd",
- "type": "block",
- "name": "block",
- "xml": "<block>\n",
- "atomic": "false",
- "comments": "",
- "outputs": 1,
- "x": 1219.9999389648438,
- "y": 521.0833206176758,
- "z": "8298903b.6dd47",
- "wires": [
- [
- "7d25ddd1.4d85f4",
- "5aed86b8.dac118",
- "4d0102b3.cb0034"
- ]
- ]
- },
- {
- "id": "5aed86b8.dac118",
- "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.request-id + '-' + $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.request-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.status.code' value='`$org.onap.appc.adapter.ansible.result.code`' />\n<parameter name='lcm-dmaap.status.message' value='`$org.onap.appc.adapter.ansible.message`'/>\n",
- "comments": "",
- "x": 1350.1666870117188,
- "y": 474.0833511352539,
- "z": "8298903b.6dd47",
- "wires": []
- },
- {
- "id": "7d81ec43.a1807c",
- "type": "not-found",
- "name": "not-found",
- "xml": "<outcome value='not-found'>\n",
- "comments": "",
- "outputs": 1,
- "x": 480,
- "y": 317,
- "z": "8298903b.6dd47",
- "wires": [
- [
- "97422b5e.b01ec"
- ]
- ]
- },
- {
- "id": "c3ed93bf.f51b6",
- "type": "set",
- "name": "set Defaults",
- "xml": "<set>\n<parameter name='$org.onap.appc.adapter.ansible.result.code' value='401'/>\n<parameter name='org.onap.appc.adapter.ansible.message' value='Ansible Adapter was not found'/>\n",
- "comments": "",
- "x": 864,
- "y": 264,
- "z": "8298903b.6dd47",
- "wires": []
- },
- {
- "id": "97422b5e.b01ec",
- "type": "block",
- "name": "block",
- "xml": "<block>\n",
- "atomic": "false",
- "comments": "",
- "outputs": 1,
- "x": 664,
- "y": 309,
- "z": "8298903b.6dd47",
- "wires": [
- [
- "c3ed93bf.f51b6",
- "812cc9c1.aee1"
- ]
- ]
- },
- {
- "id": "f33027ae.498be",
- "type": "set",
- "name": "set default status value",
- "xml": "<set>\n<parameter name='status.code' value='200' />\n<parameter name='status.message' value='unexpected return from DG' />\n",
- "comments": "",
- "x": 289,
- "y": 368,
- "z": "8298903b.6dd47",
- "wires": []
- }
-]
+[
+ {
+ "id": "1a420388.7ce24c",
+ "type": "method",
+ "name": "upgrade-post-check",
+ "xml": "<method rpc='upgrade-post-check' mode='sync'>\n",
+ "comments": "",
+ "outputs": 1,
+ "x": 550,
+ "y": 102,
+ "z": "af8f5cdd.6e4de",
+ "wires": [
+ [
+ "e635fd5d.f4087"
+ ]
+ ]
+ },
+ {
+ "id": "c220826b.91906",
+ "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": 337.99993896484375,
+ "y": 103,
+ "z": "af8f5cdd.6e4de",
+ "wires": [
+ [
+ "1a420388.7ce24c"
+ ]
+ ]
+ },
+ {
+ "id": "810e1e54.dec1c",
+ "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=\"`$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": 345.00001525878906,
+ "y": 379,
+ "z": "af8f5cdd.6e4de",
+ "wires": [
+ [
+ "f279f5b8.9d49b8",
+ "895a0a53.e12ea8",
+ "fa759954.4e2068"
+ ]
+ ]
+ },
+ {
+ "id": "f7db5396.7b5f1",
+ "type": "switchNode",
+ "name": "switch",
+ "xml": "<switch test=\"`$org.onap.appc.adapter.ansible.result.code`\">\n",
+ "comments": "",
+ "outputs": 1,
+ "x": 690.9999389648438,
+ "y": 530.0000228881836,
+ "z": "af8f5cdd.6e4de",
+ "wires": [
+ [
+ "bc5a2382.4973",
+ "84f0dd88.8438",
+ "ffd4aab1.e3c4b8"
+ ]
+ ]
+ },
+ {
+ "id": "bc5a2382.4973",
+ "type": "other",
+ "name": "outcome 500",
+ "xml": "<outcome value='500'>\n",
+ "comments": "",
+ "outputs": 1,
+ "x": 835.9999389648438,
+ "y": 528.0000305175781,
+ "z": "af8f5cdd.6e4de",
+ "wires": [
+ [
+ "80cc4946.3f0f78"
+ ]
+ ]
+ },
+ {
+ "id": "84f0dd88.8438",
+ "type": "other",
+ "name": "outcome 100",
+ "xml": "<outcome value='100'>\n",
+ "comments": "",
+ "outputs": 1,
+ "x": 838.9999389648438,
+ "y": 571.0000610351562,
+ "z": "af8f5cdd.6e4de",
+ "wires": [
+ [
+ "f44a47b3.3aa128"
+ ]
+ ]
+ },
+ {
+ "id": "f44a47b3.3aa128",
+ "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='`$org.onap.appc.adapter.ansible.Id`'/>\n\t<parameter name='PlaybookName' value='`$prop.lcm.upgrade-post-check.playbookname`'/>\n\t\n\n\n\n\n",
+ "comments": "",
+ "outputs": 1,
+ "x": 1025.9999389648438,
+ "y": 570.0000305175781,
+ "z": "af8f5cdd.6e4de",
+ "wires": [
+ [
+ "dd2fe7e6.957248",
+ "6913b982.6c9bb8"
+ ]
+ ]
+ },
+ {
+ "id": "895a0a53.e12ea8",
+ "type": "failure",
+ "name": "failure",
+ "xml": "<outcome value='failure'>\n",
+ "comments": "",
+ "outputs": 1,
+ "x": 581.9999389648438,
+ "y": 439.0000534057617,
+ "z": "af8f5cdd.6e4de",
+ "wires": [
+ [
+ "80cc4946.3f0f78"
+ ]
+ ]
+ },
+ {
+ "id": "f279f5b8.9d49b8",
+ "type": "other",
+ "name": "other",
+ "xml": "<outcome value='Other'>\n",
+ "comments": "",
+ "outputs": 1,
+ "x": 583.9999389648438,
+ "y": 491.0000228881836,
+ "z": "af8f5cdd.6e4de",
+ "wires": [
+ [
+ "f7db5396.7b5f1"
+ ]
+ ]
+ },
+ {
+ "id": "dd2fe7e6.957248",
+ "type": "failure",
+ "name": "failure",
+ "xml": "<outcome value='failure'>\n",
+ "comments": "",
+ "outputs": 1,
+ "x": 1189.9999389648438,
+ "y": 542.0000305175781,
+ "z": "af8f5cdd.6e4de",
+ "wires": [
+ [
+ "80cc4946.3f0f78"
+ ]
+ ]
+ },
+ {
+ "id": "ffd4aab1.e3c4b8",
+ "type": "other",
+ "name": "outcome 101",
+ "xml": "<outcome value='101'>\n",
+ "comments": "",
+ "outputs": 1,
+ "x": 832.9999389648438,
+ "y": 486.00006103515625,
+ "z": "af8f5cdd.6e4de",
+ "wires": [
+ [
+ "80cc4946.3f0f78"
+ ]
+ ]
+ },
+ {
+ "id": "6913b982.6c9bb8",
+ "type": "success",
+ "name": "success",
+ "xml": "<outcome value='success'>\n",
+ "comments": "",
+ "outputs": 1,
+ "x": 1191.9999389648438,
+ "y": 597.0000915527344,
+ "z": "af8f5cdd.6e4de",
+ "wires": [
+ [
+ "14c8dea1.b5b7a1"
+ ]
+ ]
+ },
+ {
+ "id": "a32993f8.f8215",
+ "type": "returnSuccess",
+ "name": "return success",
+ "xml": "<return status='success'>\n<parameter name='status.code' value='`$org.onap.appc.adapter.ansible.result.code`' />\n<parameter name='status.message' value='`$org.onap.appc.adapter.ansible.message`'/>",
+ "comments": "",
+ "x": 1467.9998779296875,
+ "y": 648.0000610351562,
+ "z": "af8f5cdd.6e4de",
+ "wires": []
+ },
+ {
+ "id": "d8c3f83d.d0b9d8",
+ "type": "dgstart",
+ "name": "DGSTART",
+ "outputs": 1,
+ "x": 153,
+ "y": 102,
+ "z": "af8f5cdd.6e4de",
+ "wires": [
+ [
+ "c220826b.91906"
+ ]
+ ]
+ },
+ {
+ "id": "e635fd5d.f4087",
+ "type": "block",
+ "name": "block",
+ "xml": "<block>\n",
+ "atomic": "false",
+ "comments": "",
+ "outputs": 1,
+ "x": 139.91668701171875,
+ "y": 241.08334350585938,
+ "z": "af8f5cdd.6e4de",
+ "wires": [
+ [
+ "810e1e54.dec1c",
+ "ee1802be.c5c18",
+ "e8d3b31a.f46c6",
+ "4d7f56db.9375c8"
+ ]
+ ]
+ },
+ {
+ "id": "ee1802be.c5c18",
+ "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": 328.00001525878906,
+ "y": 225.08334350585938,
+ "z": "af8f5cdd.6e4de",
+ "wires": [
+ []
+ ]
+ },
+ {
+ "id": "3830f5d4.87f1aa",
+ "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": 1222.9999389648438,
+ "y": 371.0833740234375,
+ "z": "af8f5cdd.6e4de",
+ "wires": [
+ [
+ "1566d659.a0655a"
+ ]
+ ]
+ },
+ {
+ "id": "1566d659.a0655a",
+ "type": "failure",
+ "name": "failure",
+ "xml": "<outcome value='failure'>\n",
+ "comments": "",
+ "outputs": 1,
+ "x": 1392.9998779296875,
+ "y": 370.0833740234375,
+ "z": "af8f5cdd.6e4de",
+ "wires": [
+ [
+ "22f8bfd0.6139e"
+ ]
+ ]
+ },
+ {
+ "id": "80cc4946.3f0f78",
+ "type": "block",
+ "name": "block",
+ "xml": "<block>\n",
+ "atomic": "false",
+ "comments": "",
+ "outputs": 1,
+ "x": 1025.9998779296875,
+ "y": 395.0833740234375,
+ "z": "af8f5cdd.6e4de",
+ "wires": [
+ [
+ "3830f5d4.87f1aa",
+ "fedbb5e6.fb3c28",
+ "898f667e.daf2e8"
+ ]
+ ]
+ },
+ {
+ "id": "7ce48bed.5b7c74",
+ "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": 1488.4998779296875,
+ "y": 597.0833740234375,
+ "z": "af8f5cdd.6e4de",
+ "wires": [
+ [
+ "37e7fa80.2728b6"
+ ]
+ ]
+ },
+ {
+ "id": "37e7fa80.2728b6",
+ "type": "failure",
+ "name": "failure",
+ "xml": "<outcome value='failure'>\n",
+ "comments": "",
+ "outputs": 1,
+ "x": 1648.4998779296875,
+ "y": 597.0833740234375,
+ "z": "af8f5cdd.6e4de",
+ "wires": [
+ [
+ "47c7511a.dd8fe"
+ ]
+ ]
+ },
+ {
+ "id": "22f8bfd0.6139e",
+ "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": 1524.9998779296875,
+ "y": 370.0833740234375,
+ "z": "af8f5cdd.6e4de",
+ "wires": [
+ []
+ ]
+ },
+ {
+ "id": "fedbb5e6.fb3c28",
+ "type": "returnFailure",
+ "name": "return failure",
+ "xml": "<return status='failure'>\n<parameter name='status.code' value='401' />\n<parameter name='status.message' value='`$org.onap.appc.adapter.ansible.message`' />\n",
+ "comments": "",
+ "x": 1197.9165649414062,
+ "y": 408.0833740234375,
+ "z": "af8f5cdd.6e4de",
+ "wires": []
+ },
+ {
+ "id": "47c7511a.dd8fe",
+ "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": 1769.9166259765625,
+ "y": 598.0833740234375,
+ "z": "af8f5cdd.6e4de",
+ "wires": [
+ []
+ ]
+ },
+ {
+ "id": "898f667e.daf2e8",
+ "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.request-id + '-' + $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.request-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.status.code' value='`$org.onap.appc.adapter.ansible.result.code`' />\n<parameter name='lcm-dmaap.status.message' value='`$org.onap.appc.adapter.ansible.message`'/>\n",
+ "comments": "",
+ "x": 1174.9999389648438,
+ "y": 318.0833740234375,
+ "z": "af8f5cdd.6e4de",
+ "wires": []
+ },
+ {
+ "id": "14c8dea1.b5b7a1",
+ "type": "block",
+ "name": "block",
+ "xml": "<block>\n",
+ "atomic": "false",
+ "comments": "",
+ "outputs": 1,
+ "x": 1317.9998779296875,
+ "y": 596.0833435058594,
+ "z": "af8f5cdd.6e4de",
+ "wires": [
+ [
+ "7ce48bed.5b7c74",
+ "70a28c6a.563d24",
+ "a32993f8.f8215"
+ ]
+ ]
+ },
+ {
+ "id": "70a28c6a.563d24",
+ "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.request-id + '-' + $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.request-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.status.code' value='`$org.onap.appc.adapter.ansible.result.code`' />\n<parameter name='lcm-dmaap.status.message' value='`$org.onap.appc.adapter.ansible.message`'/>\n",
+ "comments": "",
+ "x": 1448.1666259765625,
+ "y": 549.0833740234375,
+ "z": "af8f5cdd.6e4de",
+ "wires": []
+ },
+ {
+ "id": "fa759954.4e2068",
+ "type": "not-found",
+ "name": "not-found",
+ "xml": "<outcome value='not-found'>\n",
+ "comments": "",
+ "outputs": 1,
+ "x": 577.9999389648438,
+ "y": 392.0000228881836,
+ "z": "af8f5cdd.6e4de",
+ "wires": [
+ [
+ "ed41675d.59c088"
+ ]
+ ]
+ },
+ {
+ "id": "756c2e53.ca6d7",
+ "type": "set",
+ "name": "set Defaults",
+ "xml": "<set>\n<parameter name='org.onap.appc.adapter.ansible.result.code' value='401'/>\n<parameter name='org.onap.appc.adapter.ansible.message' value='Ansible Adapter was not found'/>\n",
+ "comments": "",
+ "x": 1009.9999389648438,
+ "y": 297.0000305175781,
+ "z": "af8f5cdd.6e4de",
+ "wires": []
+ },
+ {
+ "id": "ed41675d.59c088",
+ "type": "block",
+ "name": "block",
+ "xml": "<block>\n",
+ "atomic": "false",
+ "comments": "",
+ "outputs": 1,
+ "x": 761.9999389648438,
+ "y": 384.0000228881836,
+ "z": "af8f5cdd.6e4de",
+ "wires": [
+ [
+ "756c2e53.ca6d7",
+ "80cc4946.3f0f78"
+ ]
+ ]
+ },
+ {
+ "id": "e8d3b31a.f46c6",
+ "type": "set",
+ "name": "set default status value",
+ "xml": "<set>\n<parameter name='status.code' value='200' />\n<parameter name='status.message' value='unexpected return from DG' />\n<parameter name='nodelist' value=\"`$prop.ansible.nodelist`\"/>",
+ "comments": "",
+ "x": 336,
+ "y": 269,
+ "z": "af8f5cdd.6e4de",
+ "wires": []
+ },
+ {
+ "id": "4d7f56db.9375c8",
+ "type": "get-resource",
+ "name": "get aai.generic-vnf by vnf-id",
+ "xml": "<get-resource plugin=\"org.onap.ccsdk.sli.adaptors.aai.AAIService\" \n\tresource=\"generic-vnf\" \n\t\tkey=\"generic-vnf.vnf-id = $upgrade-post-check-input.action-identifiers.vnf-id\" \n\t\tlocal-only=\"false\" \n\t\tpfx='aai.generic-vnf'>",
+ "comments": "",
+ "outputs": 1,
+ "x": 349.0000305175781,
+ "y": 325,
+ "z": "af8f5cdd.6e4de",
+ "wires": [
+ [
+ "fa69a126.2a554",
+ "f9cb9963.f9e368"
+ ]
+ ]
+ },
+ {
+ "id": "fa69a126.2a554",
+ "type": "failure",
+ "name": "other",
+ "xml": "<outcome value='Other'>\n",
+ "comments": "",
+ "outputs": 1,
+ "x": 589.86083984375,
+ "y": 312.53564453125,
+ "z": "af8f5cdd.6e4de",
+ "wires": [
+ [
+ "2d1a88c6.11f9d8"
+ ]
+ ]
+ },
+ {
+ "id": "f9cb9963.f9e368",
+ "type": "success",
+ "name": "success",
+ "xml": "<outcome value='success'>\n",
+ "comments": "",
+ "outputs": 1,
+ "x": 591.3908081054688,
+ "y": 260.28399658203125,
+ "z": "af8f5cdd.6e4de",
+ "wires": [
+ [
+ "c4d4de4d.3e19f"
+ ]
+ ]
+ },
+ {
+ "id": "c4d4de4d.3e19f",
+ "type": "set",
+ "name": "set nodelist",
+ "xml": "<set>\n<parameter name='quote' value=\"'\" />\n<parameter name='nodelist' value=\"`'[' + $quote + $aai.ipv4-oam-address + $quote + ']'`\"/>\n",
+ "comments": "",
+ "x": 740.3908081054688,
+ "y": 259.28399658203125,
+ "z": "af8f5cdd.6e4de",
+ "wires": []
+ },
+ {
+ "id": "2d1a88c6.11f9d8",
+ "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='VNF not found in AAI. Nodelist retrieved from config'/>",
+ "comments": "",
+ "outputs": 1,
+ "x": 736,
+ "y": 312,
+ "z": "af8f5cdd.6e4de",
+ "wires": [
+ []
+ ]
+ }
+] \ 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
index 51d33da3..4f39f487 100644
--- a/platform-logic/lcm/src/main/json/LCM_upgrade-pre-check.json
+++ b/platform-logic/lcm/src/main/json/LCM_upgrade-pre-check.json
@@ -1,478 +1,553 @@
-[
- {
- "id": "8794d455.5cce5",
- "type": "method",
- "name": "upgrade-pre-check",
- "xml": "<method rpc='upgrade-pre-check' mode='sync'>\n",
- "comments": "",
- "outputs": 1,
- "x": 520,
- "y": 133,
- "z": "7da5048.3ddb5fc",
- "wires": [
- [
- "ff45289b.166bd8"
- ]
- ]
- },
- {
- "id": "80857f67.984b6",
- "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": 307.99993896484375,
- "y": 134,
- "z": "7da5048.3ddb5fc",
- "wires": [
- [
- "8794d455.5cce5"
- ]
- ]
- },
- {
- "id": "d102dc2d.41fe",
- "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": 308.00001525878906,
- "y": 351,
- "z": "7da5048.3ddb5fc",
- "wires": [
- [
- "dde77b94.93ef18",
- "ed53398e.b83e6",
- "f5081dcd.9b7118"
- ]
- ]
- },
- {
- "id": "fe62b59e.3e5e2",
- "type": "switchNode",
- "name": "switch",
- "xml": "<switch test=\"`$org.onap.appc.adapter.ansible.result.code`\">\n",
- "comments": "",
- "outputs": 1,
- "x": 609,
- "y": 399,
- "z": "7da5048.3ddb5fc",
- "wires": [
- [
- "1521e2ba.c5b60d",
- "c92b8968.b6598",
- "1549489f.79a4df"
- ]
- ]
- },
- {
- "id": "1521e2ba.c5b60d",
- "type": "other",
- "name": "outcome 500",
- "xml": "<outcome value='500'>\n",
- "comments": "",
- "outputs": 1,
- "x": 754,
- "y": 397.00000762939453,
- "z": "7da5048.3ddb5fc",
- "wires": [
- [
- "6680d59e.022b5c"
- ]
- ]
- },
- {
- "id": "c92b8968.b6598",
- "type": "other",
- "name": "outcome 100",
- "xml": "<outcome value='100'>\n",
- "comments": "",
- "outputs": 1,
- "x": 757,
- "y": 440.00003814697266,
- "z": "7da5048.3ddb5fc",
- "wires": [
- [
- "a515c0c.2a1774"
- ]
- ]
- },
- {
- "id": "a515c0c.2a1774",
- "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='`$org.onap.appc.adapter.ansible.Id`'/>\n\t<parameter name='PlaybookName' value='`$prop.lcm.upgrade-pre-check.playbookname`'/>\n\t\n\n\n\n\n",
- "comments": "",
- "outputs": 1,
- "x": 935.0000305175781,
- "y": 440.00003814697266,
- "z": "7da5048.3ddb5fc",
- "wires": [
- [
- "aafd18f3.e67588",
- "12d7ff4a.4dff39"
- ]
- ]
- },
- {
- "id": "ed53398e.b83e6",
- "type": "failure",
- "name": "failure",
- "xml": "<outcome value='failure'>\n",
- "comments": "",
- "outputs": 1,
- "x": 500,
- "y": 308.0000305175781,
- "z": "7da5048.3ddb5fc",
- "wires": [
- [
- "6680d59e.022b5c"
- ]
- ]
- },
- {
- "id": "dde77b94.93ef18",
- "type": "other",
- "name": "other",
- "xml": "<outcome value='Other'>\n",
- "comments": "",
- "outputs": 1,
- "x": 502,
- "y": 360,
- "z": "7da5048.3ddb5fc",
- "wires": [
- [
- "fe62b59e.3e5e2"
- ]
- ]
- },
- {
- "id": "aafd18f3.e67588",
- "type": "failure",
- "name": "failure",
- "xml": "<outcome value='failure'>\n",
- "comments": "",
- "outputs": 1,
- "x": 1096.0000610351562,
- "y": 417.00000762939453,
- "z": "7da5048.3ddb5fc",
- "wires": [
- [
- "6680d59e.022b5c"
- ]
- ]
- },
- {
- "id": "1549489f.79a4df",
- "type": "other",
- "name": "outcome 101",
- "xml": "<outcome value='101'>\n",
- "comments": "",
- "outputs": 1,
- "x": 751,
- "y": 355.00003814697266,
- "z": "7da5048.3ddb5fc",
- "wires": [
- [
- "6680d59e.022b5c"
- ]
- ]
- },
- {
- "id": "12d7ff4a.4dff39",
- "type": "success",
- "name": "success",
- "xml": "<outcome value='success'>\n",
- "comments": "",
- "outputs": 1,
- "x": 1103.0000610351562,
- "y": 465.00003814697266,
- "z": "7da5048.3ddb5fc",
- "wires": [
- [
- "db47df98.2c4588"
- ]
- ]
- },
- {
- "id": "cdc8f332.5e3cb8",
- "type": "returnSuccess",
- "name": "return success",
- "xml": "<return status='success'>\n<parameter name='status.code' value='`$org.onap.appc.adapter.ansible.result.code`' />\n<parameter name='status.message' value='`$org.onap.appc.adapter.ansible.message`'/>",
- "comments": "",
- "x": 1385.9999389648438,
- "y": 517.0000381469727,
- "z": "7da5048.3ddb5fc",
- "wires": []
- },
- {
- "id": "35025675.c3eb3a",
- "type": "dgstart",
- "name": "DGSTART",
- "outputs": 1,
- "x": 123,
- "y": 133,
- "z": "7da5048.3ddb5fc",
- "wires": [
- [
- "80857f67.984b6"
- ]
- ]
- },
- {
- "id": "ff45289b.166bd8",
- "type": "block",
- "name": "block",
- "xml": "<block>\n",
- "atomic": "false",
- "comments": "",
- "outputs": 1,
- "x": 118.91668701171875,
- "y": 314.0833435058594,
- "z": "7da5048.3ddb5fc",
- "wires": [
- [
- "d102dc2d.41fe",
- "8c1fb722.e712a8",
- "d66534d5.e238c"
- ]
- ]
- },
- {
- "id": "8c1fb722.e712a8",
- "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": 292.00001525878906,
- "y": 267.0833435058594,
- "z": "7da5048.3ddb5fc",
- "wires": [
- []
- ]
- },
- {
- "id": "5aa80cdf.0a7ab4",
- "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": 1103.0000610351562,
- "y": 261.0833435058594,
- "z": "7da5048.3ddb5fc",
- "wires": [
- [
- "33950e88.f14ed2"
- ]
- ]
- },
- {
- "id": "33950e88.f14ed2",
- "type": "failure",
- "name": "failure",
- "xml": "<outcome value='failure'>\n",
- "comments": "",
- "outputs": 1,
- "x": 1273,
- "y": 260.0833435058594,
- "z": "7da5048.3ddb5fc",
- "wires": [
- [
- "d29bb160.8e2c18"
- ]
- ]
- },
- {
- "id": "6680d59e.022b5c",
- "type": "block",
- "name": "block",
- "xml": "<block>\n",
- "atomic": "false",
- "comments": "",
- "outputs": 1,
- "x": 906,
- "y": 285.0833435058594,
- "z": "7da5048.3ddb5fc",
- "wires": [
- [
- "5aa80cdf.0a7ab4",
- "b116f2bd.6d187",
- "3c43772b.4e0da8"
- ]
- ]
- },
- {
- "id": "ee44a647.c4fff",
- "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": 1406.4999389648438,
- "y": 466.0833511352539,
- "z": "7da5048.3ddb5fc",
- "wires": [
- [
- "96654ac9.0d28b8"
- ]
- ]
- },
- {
- "id": "96654ac9.0d28b8",
- "type": "failure",
- "name": "failure",
- "xml": "<outcome value='failure'>\n",
- "comments": "",
- "outputs": 1,
- "x": 1566.4999389648438,
- "y": 466.0833511352539,
- "z": "7da5048.3ddb5fc",
- "wires": [
- [
- "8e468697.9f9a2"
- ]
- ]
- },
- {
- "id": "d29bb160.8e2c18",
- "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": 1405,
- "y": 260.0833435058594,
- "z": "7da5048.3ddb5fc",
- "wires": [
- []
- ]
- },
- {
- "id": "b116f2bd.6d187",
- "type": "returnFailure",
- "name": "return failure",
- "xml": "<return status='failure'>\n<parameter name='status.code' value='401' />\n<parameter name='status.message' value='`$org.onap.appc.adapter.ansible.message`' />\n",
- "comments": "",
- "x": 1077.9166870117188,
- "y": 298.0833435058594,
- "z": "7da5048.3ddb5fc",
- "wires": []
- },
- {
- "id": "8e468697.9f9a2",
- "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": 1687.9166870117188,
- "y": 467.0833511352539,
- "z": "7da5048.3ddb5fc",
- "wires": [
- []
- ]
- },
- {
- "id": "3c43772b.4e0da8",
- "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.request-id + '-' + $upgrade-pre-check-input.common-header.sub-request-id`\"/>\n\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.request-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.status.code' value='`$org.onap.appc.adapter.ansible.result.code`' />\n<parameter name='lcm-dmaap.status.message' value='`$org.onap.appc.adapter.ansible.message`'/>\n",
- "comments": "",
- "x": 1055.0000610351562,
- "y": 208.08334350585938,
- "z": "7da5048.3ddb5fc",
- "wires": []
- },
- {
- "id": "db47df98.2c4588",
- "type": "block",
- "name": "block",
- "xml": "<block>\n",
- "atomic": "false",
- "comments": "",
- "outputs": 1,
- "x": 1235.9999389648438,
- "y": 465.0833206176758,
- "z": "7da5048.3ddb5fc",
- "wires": [
- [
- "ee44a647.c4fff",
- "61a3bf4.bcdb3c",
- "cdc8f332.5e3cb8"
- ]
- ]
- },
- {
- "id": "61a3bf4.bcdb3c",
- "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.request-id + '-' + $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.request-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.status.code' value='`$org.onap.appc.adapter.ansible.result.code`' />\n<parameter name='lcm-dmaap.status.message' value='`$org.onap.appc.adapter.ansible.message`'/>\n",
- "comments": "",
- "x": 1366.1666870117188,
- "y": 418.0833511352539,
- "z": "7da5048.3ddb5fc",
- "wires": []
- },
- {
- "id": "f5081dcd.9b7118",
- "type": "not-found",
- "name": "not-found",
- "xml": "<outcome value='not-found'>\n",
- "comments": "",
- "outputs": 1,
- "x": 496,
- "y": 261,
- "z": "7da5048.3ddb5fc",
- "wires": [
- [
- "ce8b68f1.22b2d8"
- ]
- ]
- },
- {
- "id": "e7918964.c04f3",
- "type": "set",
- "name": "set Defaults",
- "xml": "<set>\n<parameter name='org.onap.appc.adapter.ansible.result.code' value='401'/>\n<parameter name='org.onap.appc.adapter.ansible.message' value='Ansible Adapter was not found'/>\n",
- "comments": "",
- "x": 880,
- "y": 208,
- "z": "7da5048.3ddb5fc",
- "wires": []
- },
- {
- "id": "ce8b68f1.22b2d8",
- "type": "block",
- "name": "block",
- "xml": "<block>\n",
- "atomic": "false",
- "comments": "",
- "outputs": 1,
- "x": 680,
- "y": 253,
- "z": "7da5048.3ddb5fc",
- "wires": [
- [
- "e7918964.c04f3",
- "6680d59e.022b5c"
- ]
- ]
- },
- {
- "id": "d66534d5.e238c",
- "type": "set",
- "name": "set default status value",
- "xml": "<set>\n<parameter name='status.code' value='200' />\n<parameter name='status.message' value='unexpected return from DG' />\n",
- "comments": "",
- "x": 301,
- "y": 311,
- "z": "7da5048.3ddb5fc",
- "wires": []
- }
-]
+[
+ {
+ "id": "1a420388.7ce24c",
+ "type": "method",
+ "name": "upgrade-pre-check",
+ "xml": "<method rpc='upgrade-pre-check' mode='sync'>\n",
+ "comments": "",
+ "outputs": 1,
+ "x": 550,
+ "y": 102,
+ "z": "af8f5cdd.6e4de",
+ "wires": [
+ [
+ "e635fd5d.f4087"
+ ]
+ ]
+ },
+ {
+ "id": "c220826b.91906",
+ "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": 337.99993896484375,
+ "y": 103,
+ "z": "af8f5cdd.6e4de",
+ "wires": [
+ [
+ "1a420388.7ce24c"
+ ]
+ ]
+ },
+ {
+ "id": "810e1e54.dec1c",
+ "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=\"`$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": 345.00001525878906,
+ "y": 379,
+ "z": "af8f5cdd.6e4de",
+ "wires": [
+ [
+ "f279f5b8.9d49b8",
+ "895a0a53.e12ea8",
+ "fa759954.4e2068"
+ ]
+ ]
+ },
+ {
+ "id": "f7db5396.7b5f1",
+ "type": "switchNode",
+ "name": "switch",
+ "xml": "<switch test=\"`$org.onap.appc.adapter.ansible.result.code`\">\n",
+ "comments": "",
+ "outputs": 1,
+ "x": 690.9999389648438,
+ "y": 530.0000228881836,
+ "z": "af8f5cdd.6e4de",
+ "wires": [
+ [
+ "bc5a2382.4973",
+ "84f0dd88.8438",
+ "ffd4aab1.e3c4b8"
+ ]
+ ]
+ },
+ {
+ "id": "bc5a2382.4973",
+ "type": "other",
+ "name": "outcome 500",
+ "xml": "<outcome value='500'>\n",
+ "comments": "",
+ "outputs": 1,
+ "x": 835.9999389648438,
+ "y": 528.0000305175781,
+ "z": "af8f5cdd.6e4de",
+ "wires": [
+ [
+ "80cc4946.3f0f78"
+ ]
+ ]
+ },
+ {
+ "id": "84f0dd88.8438",
+ "type": "other",
+ "name": "outcome 100",
+ "xml": "<outcome value='100'>\n",
+ "comments": "",
+ "outputs": 1,
+ "x": 838.9999389648438,
+ "y": 571.0000610351562,
+ "z": "af8f5cdd.6e4de",
+ "wires": [
+ [
+ "f44a47b3.3aa128"
+ ]
+ ]
+ },
+ {
+ "id": "f44a47b3.3aa128",
+ "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='`$org.onap.appc.adapter.ansible.Id`'/>\n\t<parameter name='PlaybookName' value='`$prop.lcm.upgrade-pre-check.playbookname`'/>\n\t\n\n\n\n\n",
+ "comments": "",
+ "outputs": 1,
+ "x": 1025.9999389648438,
+ "y": 570.0000305175781,
+ "z": "af8f5cdd.6e4de",
+ "wires": [
+ [
+ "dd2fe7e6.957248",
+ "6913b982.6c9bb8"
+ ]
+ ]
+ },
+ {
+ "id": "895a0a53.e12ea8",
+ "type": "failure",
+ "name": "failure",
+ "xml": "<outcome value='failure'>\n",
+ "comments": "",
+ "outputs": 1,
+ "x": 581.9999389648438,
+ "y": 439.0000534057617,
+ "z": "af8f5cdd.6e4de",
+ "wires": [
+ [
+ "80cc4946.3f0f78"
+ ]
+ ]
+ },
+ {
+ "id": "f279f5b8.9d49b8",
+ "type": "other",
+ "name": "other",
+ "xml": "<outcome value='Other'>\n",
+ "comments": "",
+ "outputs": 1,
+ "x": 583.9999389648438,
+ "y": 491.0000228881836,
+ "z": "af8f5cdd.6e4de",
+ "wires": [
+ [
+ "f7db5396.7b5f1"
+ ]
+ ]
+ },
+ {
+ "id": "dd2fe7e6.957248",
+ "type": "failure",
+ "name": "failure",
+ "xml": "<outcome value='failure'>\n",
+ "comments": "",
+ "outputs": 1,
+ "x": 1189.9999389648438,
+ "y": 542.0000305175781,
+ "z": "af8f5cdd.6e4de",
+ "wires": [
+ [
+ "80cc4946.3f0f78"
+ ]
+ ]
+ },
+ {
+ "id": "ffd4aab1.e3c4b8",
+ "type": "other",
+ "name": "outcome 101",
+ "xml": "<outcome value='101'>\n",
+ "comments": "",
+ "outputs": 1,
+ "x": 832.9999389648438,
+ "y": 486.00006103515625,
+ "z": "af8f5cdd.6e4de",
+ "wires": [
+ [
+ "80cc4946.3f0f78"
+ ]
+ ]
+ },
+ {
+ "id": "6913b982.6c9bb8",
+ "type": "success",
+ "name": "success",
+ "xml": "<outcome value='success'>\n",
+ "comments": "",
+ "outputs": 1,
+ "x": 1191.9999389648438,
+ "y": 597.0000915527344,
+ "z": "af8f5cdd.6e4de",
+ "wires": [
+ [
+ "14c8dea1.b5b7a1"
+ ]
+ ]
+ },
+ {
+ "id": "a32993f8.f8215",
+ "type": "returnSuccess",
+ "name": "return success",
+ "xml": "<return status='success'>\n<parameter name='status.code' value='`$org.onap.appc.adapter.ansible.result.code`' />\n<parameter name='status.message' value='`$org.onap.appc.adapter.ansible.message`'/>",
+ "comments": "",
+ "x": 1467.9998779296875,
+ "y": 648.0000610351562,
+ "z": "af8f5cdd.6e4de",
+ "wires": []
+ },
+ {
+ "id": "d8c3f83d.d0b9d8",
+ "type": "dgstart",
+ "name": "DGSTART",
+ "outputs": 1,
+ "x": 153,
+ "y": 102,
+ "z": "af8f5cdd.6e4de",
+ "wires": [
+ [
+ "c220826b.91906"
+ ]
+ ]
+ },
+ {
+ "id": "e635fd5d.f4087",
+ "type": "block",
+ "name": "block",
+ "xml": "<block>\n",
+ "atomic": "false",
+ "comments": "",
+ "outputs": 1,
+ "x": 139.91668701171875,
+ "y": 241.08334350585938,
+ "z": "af8f5cdd.6e4de",
+ "wires": [
+ [
+ "810e1e54.dec1c",
+ "ee1802be.c5c18",
+ "e8d3b31a.f46c6",
+ "4d7f56db.9375c8"
+ ]
+ ]
+ },
+ {
+ "id": "ee1802be.c5c18",
+ "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": 328.00001525878906,
+ "y": 225.08334350585938,
+ "z": "af8f5cdd.6e4de",
+ "wires": [
+ []
+ ]
+ },
+ {
+ "id": "3830f5d4.87f1aa",
+ "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": 1222.9999389648438,
+ "y": 371.0833740234375,
+ "z": "af8f5cdd.6e4de",
+ "wires": [
+ [
+ "1566d659.a0655a"
+ ]
+ ]
+ },
+ {
+ "id": "1566d659.a0655a",
+ "type": "failure",
+ "name": "failure",
+ "xml": "<outcome value='failure'>\n",
+ "comments": "",
+ "outputs": 1,
+ "x": 1392.9998779296875,
+ "y": 370.0833740234375,
+ "z": "af8f5cdd.6e4de",
+ "wires": [
+ [
+ "22f8bfd0.6139e"
+ ]
+ ]
+ },
+ {
+ "id": "80cc4946.3f0f78",
+ "type": "block",
+ "name": "block",
+ "xml": "<block>\n",
+ "atomic": "false",
+ "comments": "",
+ "outputs": 1,
+ "x": 1025.9998779296875,
+ "y": 395.0833740234375,
+ "z": "af8f5cdd.6e4de",
+ "wires": [
+ [
+ "3830f5d4.87f1aa",
+ "fedbb5e6.fb3c28",
+ "898f667e.daf2e8"
+ ]
+ ]
+ },
+ {
+ "id": "7ce48bed.5b7c74",
+ "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": 1488.4998779296875,
+ "y": 597.0833740234375,
+ "z": "af8f5cdd.6e4de",
+ "wires": [
+ [
+ "37e7fa80.2728b6"
+ ]
+ ]
+ },
+ {
+ "id": "37e7fa80.2728b6",
+ "type": "failure",
+ "name": "failure",
+ "xml": "<outcome value='failure'>\n",
+ "comments": "",
+ "outputs": 1,
+ "x": 1648.4998779296875,
+ "y": 597.0833740234375,
+ "z": "af8f5cdd.6e4de",
+ "wires": [
+ [
+ "47c7511a.dd8fe"
+ ]
+ ]
+ },
+ {
+ "id": "22f8bfd0.6139e",
+ "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": 1524.9998779296875,
+ "y": 370.0833740234375,
+ "z": "af8f5cdd.6e4de",
+ "wires": [
+ []
+ ]
+ },
+ {
+ "id": "fedbb5e6.fb3c28",
+ "type": "returnFailure",
+ "name": "return failure",
+ "xml": "<return status='failure'>\n<parameter name='status.code' value='401' />\n<parameter name='status.message' value='`$org.onap.appc.adapter.ansible.message`' />\n",
+ "comments": "",
+ "x": 1197.9165649414062,
+ "y": 408.0833740234375,
+ "z": "af8f5cdd.6e4de",
+ "wires": []
+ },
+ {
+ "id": "47c7511a.dd8fe",
+ "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": 1769.9166259765625,
+ "y": 598.0833740234375,
+ "z": "af8f5cdd.6e4de",
+ "wires": [
+ []
+ ]
+ },
+ {
+ "id": "898f667e.daf2e8",
+ "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.request-id + '-' + $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.request-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.status.code' value='`$org.onap.appc.adapter.ansible.result.code`' />\n<parameter name='lcm-dmaap.status.message' value='`$org.onap.appc.adapter.ansible.message`'/>\n",
+ "comments": "",
+ "x": 1174.9999389648438,
+ "y": 318.0833740234375,
+ "z": "af8f5cdd.6e4de",
+ "wires": []
+ },
+ {
+ "id": "14c8dea1.b5b7a1",
+ "type": "block",
+ "name": "block",
+ "xml": "<block>\n",
+ "atomic": "false",
+ "comments": "",
+ "outputs": 1,
+ "x": 1317.9998779296875,
+ "y": 596.0833435058594,
+ "z": "af8f5cdd.6e4de",
+ "wires": [
+ [
+ "7ce48bed.5b7c74",
+ "70a28c6a.563d24",
+ "a32993f8.f8215"
+ ]
+ ]
+ },
+ {
+ "id": "70a28c6a.563d24",
+ "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.request-id + '-' + $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.request-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.status.code' value='`$org.onap.appc.adapter.ansible.result.code`' />\n<parameter name='lcm-dmaap.status.message' value='`$org.onap.appc.adapter.ansible.message`'/>\n",
+ "comments": "",
+ "x": 1448.1666259765625,
+ "y": 549.0833740234375,
+ "z": "af8f5cdd.6e4de",
+ "wires": []
+ },
+ {
+ "id": "fa759954.4e2068",
+ "type": "not-found",
+ "name": "not-found",
+ "xml": "<outcome value='not-found'>\n",
+ "comments": "",
+ "outputs": 1,
+ "x": 577.9999389648438,
+ "y": 392.0000228881836,
+ "z": "af8f5cdd.6e4de",
+ "wires": [
+ [
+ "ed41675d.59c088"
+ ]
+ ]
+ },
+ {
+ "id": "756c2e53.ca6d7",
+ "type": "set",
+ "name": "set Defaults",
+ "xml": "<set>\n<parameter name='org.onap.appc.adapter.ansible.result.code' value='401'/>\n<parameter name='org.onap.appc.adapter.ansible.message' value='Ansible Adapter was not found'/>\n",
+ "comments": "",
+ "x": 1009.9999389648438,
+ "y": 297.0000305175781,
+ "z": "af8f5cdd.6e4de",
+ "wires": []
+ },
+ {
+ "id": "ed41675d.59c088",
+ "type": "block",
+ "name": "block",
+ "xml": "<block>\n",
+ "atomic": "false",
+ "comments": "",
+ "outputs": 1,
+ "x": 761.9999389648438,
+ "y": 384.0000228881836,
+ "z": "af8f5cdd.6e4de",
+ "wires": [
+ [
+ "756c2e53.ca6d7",
+ "80cc4946.3f0f78"
+ ]
+ ]
+ },
+ {
+ "id": "e8d3b31a.f46c6",
+ "type": "set",
+ "name": "set default status value",
+ "xml": "<set>\n<parameter name='status.code' value='200' />\n<parameter name='status.message' value='unexpected return from DG' />\n<parameter name='nodelist' value=\"`$prop.ansible.nodelist`\"/>",
+ "comments": "",
+ "x": 336,
+ "y": 269,
+ "z": "af8f5cdd.6e4de",
+ "wires": []
+ },
+ {
+ "id": "4d7f56db.9375c8",
+ "type": "get-resource",
+ "name": "get aai.generic-vnf by vnf-id",
+ "xml": "<get-resource plugin=\"org.onap.ccsdk.sli.adaptors.aai.AAIService\" \n\tresource=\"generic-vnf\" \n\t\tkey=\"generic-vnf.vnf-id = $upgrade-pre-check-input.action-identifiers.vnf-id\" \n\t\tlocal-only=\"false\" \n\t\tpfx='aai.generic-vnf'>",
+ "comments": "",
+ "outputs": 1,
+ "x": 349.0000305175781,
+ "y": 325,
+ "z": "af8f5cdd.6e4de",
+ "wires": [
+ [
+ "fa69a126.2a554",
+ "f9cb9963.f9e368"
+ ]
+ ]
+ },
+ {
+ "id": "fa69a126.2a554",
+ "type": "failure",
+ "name": "other",
+ "xml": "<outcome value='Other'>\n",
+ "comments": "",
+ "outputs": 1,
+ "x": 589.86083984375,
+ "y": 312.53564453125,
+ "z": "af8f5cdd.6e4de",
+ "wires": [
+ [
+ "2d1a88c6.11f9d8"
+ ]
+ ]
+ },
+ {
+ "id": "f9cb9963.f9e368",
+ "type": "success",
+ "name": "success",
+ "xml": "<outcome value='success'>\n",
+ "comments": "",
+ "outputs": 1,
+ "x": 591.3908081054688,
+ "y": 260.28399658203125,
+ "z": "af8f5cdd.6e4de",
+ "wires": [
+ [
+ "c4d4de4d.3e19f"
+ ]
+ ]
+ },
+ {
+ "id": "c4d4de4d.3e19f",
+ "type": "set",
+ "name": "set nodelist",
+ "xml": "<set>\n<parameter name='quote' value=\"'\" />\n<parameter name='nodelist' value=\"`'[' + $quote + $aai.ipv4-oam-address + $quote + ']'`\"/>\n",
+ "comments": "",
+ "x": 740.3908081054688,
+ "y": 259.28399658203125,
+ "z": "af8f5cdd.6e4de",
+ "wires": []
+ },
+ {
+ "id": "2d1a88c6.11f9d8",
+ "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='VNF not found in AAI. Nodelist retrieved from config'/>",
+ "comments": "",
+ "outputs": 1,
+ "x": 736,
+ "y": 312,
+ "z": "af8f5cdd.6e4de",
+ "wires": [
+ []
+ ]
+ }
+] \ 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
index 54b75cd3..95e0638e 100644
--- a/platform-logic/lcm/src/main/json/LCM_upgrade-software.json
+++ b/platform-logic/lcm/src/main/json/LCM_upgrade-software.json
@@ -1,478 +1,553 @@
-[
- {
- "id": "4c3f9752.77dec",
- "type": "method",
- "name": "upgrade-software",
- "xml": "<method rpc='upgrade-software' mode='sync'>\n",
- "comments": "",
- "outputs": 1,
- "x": 489,
- "y": 152,
- "z": "e0b620f9.dad4e8",
- "wires": [
- [
- "83650b67.6cd8c"
- ]
- ]
- },
- {
- "id": "d837d6cb.338428",
- "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": 276.99993896484375,
- "y": 153,
- "z": "e0b620f9.dad4e8",
- "wires": [
- [
- "4c3f9752.77dec"
- ]
- ]
- },
- {
- "id": "3421e2b7.29c266",
- "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": 277.00001525878906,
- "y": 370,
- "z": "e0b620f9.dad4e8",
- "wires": [
- [
- "199ed9da.f92c0e",
- "c8dd71a.7a9241",
- "50f87fc.8f6068"
- ]
- ]
- },
- {
- "id": "32b073b0.4096bc",
- "type": "switchNode",
- "name": "switch",
- "xml": "<switch test=\"`$org.onap.appc.adapter.ansible.result.code`\">\n",
- "comments": "",
- "outputs": 1,
- "x": 578,
- "y": 418,
- "z": "e0b620f9.dad4e8",
- "wires": [
- [
- "df999599.1b565",
- "96b44eb0.622268",
- "a80c397d.561b48"
- ]
- ]
- },
- {
- "id": "df999599.1b565",
- "type": "other",
- "name": "outcome 500",
- "xml": "<outcome value='500'>\n",
- "comments": "",
- "outputs": 1,
- "x": 723,
- "y": 416.00000762939453,
- "z": "e0b620f9.dad4e8",
- "wires": [
- [
- "f25faee.c20865"
- ]
- ]
- },
- {
- "id": "96b44eb0.622268",
- "type": "other",
- "name": "outcome 100",
- "xml": "<outcome value='100'>\n",
- "comments": "",
- "outputs": 1,
- "x": 726,
- "y": 459.00003814697266,
- "z": "e0b620f9.dad4e8",
- "wires": [
- [
- "fcf5e1f3.334ad"
- ]
- ]
- },
- {
- "id": "fcf5e1f3.334ad",
- "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='`$org.onap.appc.adapter.ansible.Id`'/>\n\t<parameter name='PlaybookName' value='`$prop.lcm.upgrade-software.playbookname`'/>\n\t\n\n\n\n\n",
- "comments": "",
- "outputs": 1,
- "x": 904.0000305175781,
- "y": 459.00003814697266,
- "z": "e0b620f9.dad4e8",
- "wires": [
- [
- "9223dd62.33b848",
- "52b60d15.5c8824"
- ]
- ]
- },
- {
- "id": "c8dd71a.7a9241",
- "type": "failure",
- "name": "failure",
- "xml": "<outcome value='failure'>\n",
- "comments": "",
- "outputs": 1,
- "x": 469,
- "y": 327.0000305175781,
- "z": "e0b620f9.dad4e8",
- "wires": [
- [
- "f25faee.c20865"
- ]
- ]
- },
- {
- "id": "199ed9da.f92c0e",
- "type": "other",
- "name": "other",
- "xml": "<outcome value='Other'>\n",
- "comments": "",
- "outputs": 1,
- "x": 471,
- "y": 379,
- "z": "e0b620f9.dad4e8",
- "wires": [
- [
- "32b073b0.4096bc"
- ]
- ]
- },
- {
- "id": "9223dd62.33b848",
- "type": "failure",
- "name": "failure",
- "xml": "<outcome value='failure'>\n",
- "comments": "",
- "outputs": 1,
- "x": 1065.0000610351562,
- "y": 436.00000762939453,
- "z": "e0b620f9.dad4e8",
- "wires": [
- [
- "f25faee.c20865"
- ]
- ]
- },
- {
- "id": "a80c397d.561b48",
- "type": "other",
- "name": "outcome 101",
- "xml": "<outcome value='101'>\n",
- "comments": "",
- "outputs": 1,
- "x": 720,
- "y": 374.00003814697266,
- "z": "e0b620f9.dad4e8",
- "wires": [
- [
- "f25faee.c20865"
- ]
- ]
- },
- {
- "id": "52b60d15.5c8824",
- "type": "success",
- "name": "success",
- "xml": "<outcome value='success'>\n",
- "comments": "",
- "outputs": 1,
- "x": 1072.0000610351562,
- "y": 484.00003814697266,
- "z": "e0b620f9.dad4e8",
- "wires": [
- [
- "9c548e74.79765"
- ]
- ]
- },
- {
- "id": "6d12b2b7.836454",
- "type": "returnSuccess",
- "name": "return success",
- "xml": "<return status='success'>\n<parameter name='status.code' value='`$org.onap.appc.adapter.ansible.result.code`' />\n<parameter name='status.message' value='`$org.onap.appc.adapter.ansible.message`'/>",
- "comments": "",
- "x": 1354.9999389648438,
- "y": 536.0000381469727,
- "z": "e0b620f9.dad4e8",
- "wires": []
- },
- {
- "id": "c4c2701e.31e65",
- "type": "dgstart",
- "name": "DGSTART",
- "outputs": 1,
- "x": 92,
- "y": 152,
- "z": "e0b620f9.dad4e8",
- "wires": [
- [
- "d837d6cb.338428"
- ]
- ]
- },
- {
- "id": "83650b67.6cd8c",
- "type": "block",
- "name": "block",
- "xml": "<block>\n",
- "atomic": "false",
- "comments": "",
- "outputs": 1,
- "x": 87.91668701171875,
- "y": 333.0833435058594,
- "z": "e0b620f9.dad4e8",
- "wires": [
- [
- "3421e2b7.29c266",
- "af5cebbf.24ded",
- "9b7242c2.970088"
- ]
- ]
- },
- {
- "id": "af5cebbf.24ded",
- "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": 262.00001525878906,
- "y": 275.0833435058594,
- "z": "e0b620f9.dad4e8",
- "wires": [
- []
- ]
- },
- {
- "id": "17a67139.0163e7",
- "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": 1072.0000610351562,
- "y": 280.0833435058594,
- "z": "e0b620f9.dad4e8",
- "wires": [
- [
- "4b59a568.89eb14"
- ]
- ]
- },
- {
- "id": "4b59a568.89eb14",
- "type": "failure",
- "name": "failure",
- "xml": "<outcome value='failure'>\n",
- "comments": "",
- "outputs": 1,
- "x": 1242,
- "y": 279.0833435058594,
- "z": "e0b620f9.dad4e8",
- "wires": [
- [
- "81a1b456.34658"
- ]
- ]
- },
- {
- "id": "f25faee.c20865",
- "type": "block",
- "name": "block",
- "xml": "<block>\n",
- "atomic": "false",
- "comments": "",
- "outputs": 1,
- "x": 875,
- "y": 304.0833435058594,
- "z": "e0b620f9.dad4e8",
- "wires": [
- [
- "17a67139.0163e7",
- "e10545e8.eea44",
- "d8fbd5c3.79579"
- ]
- ]
- },
- {
- "id": "3095e5cd.210e32",
- "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": 1375.4999389648438,
- "y": 485.0833511352539,
- "z": "e0b620f9.dad4e8",
- "wires": [
- [
- "8bc4822b.c5137"
- ]
- ]
- },
- {
- "id": "8bc4822b.c5137",
- "type": "failure",
- "name": "failure",
- "xml": "<outcome value='failure'>\n",
- "comments": "",
- "outputs": 1,
- "x": 1535.4999389648438,
- "y": 485.0833511352539,
- "z": "e0b620f9.dad4e8",
- "wires": [
- [
- "b21f8cea.572bf8"
- ]
- ]
- },
- {
- "id": "81a1b456.34658",
- "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": 1374,
- "y": 279.0833435058594,
- "z": "e0b620f9.dad4e8",
- "wires": [
- []
- ]
- },
- {
- "id": "e10545e8.eea44",
- "type": "returnFailure",
- "name": "return failure",
- "xml": "<return status='failure'>\n<parameter name='status.code' value='401' />\n<parameter name='status.message' value='`$org.onap.appc.adapter.ansible.message`' />\n",
- "comments": "",
- "x": 1046.9166870117188,
- "y": 317.0833435058594,
- "z": "e0b620f9.dad4e8",
- "wires": []
- },
- {
- "id": "b21f8cea.572bf8",
- "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": 1656.9166870117188,
- "y": 486.0833511352539,
- "z": "e0b620f9.dad4e8",
- "wires": [
- []
- ]
- },
- {
- "id": "d8fbd5c3.79579",
- "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.request-id + '-' + $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.request-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.status.code' value='`$org.onap.appc.adapter.ansible.result.code`' />\n<parameter name='lcm-dmaap.status.message' value='`$org.onap.appc.adapter.ansible.message`'/>\n",
- "comments": "",
- "x": 1024.0000610351562,
- "y": 227.08334350585938,
- "z": "e0b620f9.dad4e8",
- "wires": []
- },
- {
- "id": "9c548e74.79765",
- "type": "block",
- "name": "block",
- "xml": "<block>\n",
- "atomic": "false",
- "comments": "",
- "outputs": 1,
- "x": 1204.9999389648438,
- "y": 484.0833206176758,
- "z": "e0b620f9.dad4e8",
- "wires": [
- [
- "3095e5cd.210e32",
- "dfdfe757.04d0d8",
- "6d12b2b7.836454"
- ]
- ]
- },
- {
- "id": "dfdfe757.04d0d8",
- "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.request-id + '-' + $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.request-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.status.code' value='`$org.onap.appc.adapter.ansible.result.code`' />\n<parameter name='lcm-dmaap.status.message' value='`$org.onap.appc.adapter.ansible.message`'/>\n",
- "comments": "",
- "x": 1335.1666870117188,
- "y": 437.0833511352539,
- "z": "e0b620f9.dad4e8",
- "wires": []
- },
- {
- "id": "50f87fc.8f6068",
- "type": "not-found",
- "name": "not-found",
- "xml": "<outcome value='not-found'>\n",
- "comments": "",
- "outputs": 1,
- "x": 465,
- "y": 280,
- "z": "e0b620f9.dad4e8",
- "wires": [
- [
- "71cef7a8.a94c"
- ]
- ]
- },
- {
- "id": "711ed4cf.9ec76c",
- "type": "set",
- "name": "set Defaults",
- "xml": "<set>\n<parameter name='$org.onap.appc.adapter.ansible.result.code' value='401'/>\n<parameter name='org.onap.appc.adapter.ansible.message' value='Ansible Adapter was not found'/>\n",
- "comments": "",
- "x": 849,
- "y": 227,
- "z": "e0b620f9.dad4e8",
- "wires": []
- },
- {
- "id": "71cef7a8.a94c",
- "type": "block",
- "name": "block",
- "xml": "<block>\n",
- "atomic": "false",
- "comments": "",
- "outputs": 1,
- "x": 649,
- "y": 272,
- "z": "e0b620f9.dad4e8",
- "wires": [
- [
- "711ed4cf.9ec76c",
- "f25faee.c20865"
- ]
- ]
- },
- {
- "id": "9b7242c2.970088",
- "type": "set",
- "name": "set default status value",
- "xml": "<set>\n<parameter name='status.code' value='200' />\n<parameter name='status.message' value='unexpected return from DG' />\n",
- "comments": "",
- "x": 276,
- "y": 319,
- "z": "e0b620f9.dad4e8",
- "wires": []
- }
-]
+[
+ {
+ "id": "1a420388.7ce24c",
+ "type": "method",
+ "name": "upgrade-software",
+ "xml": "<method rpc='upgrade-software' mode='sync'>\n",
+ "comments": "",
+ "outputs": 1,
+ "x": 550,
+ "y": 102,
+ "z": "af8f5cdd.6e4de",
+ "wires": [
+ [
+ "e635fd5d.f4087"
+ ]
+ ]
+ },
+ {
+ "id": "c220826b.91906",
+ "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": 337.99993896484375,
+ "y": 103,
+ "z": "af8f5cdd.6e4de",
+ "wires": [
+ [
+ "1a420388.7ce24c"
+ ]
+ ]
+ },
+ {
+ "id": "810e1e54.dec1c",
+ "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=\"`$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": 345.00001525878906,
+ "y": 379,
+ "z": "af8f5cdd.6e4de",
+ "wires": [
+ [
+ "f279f5b8.9d49b8",
+ "895a0a53.e12ea8",
+ "fa759954.4e2068"
+ ]
+ ]
+ },
+ {
+ "id": "f7db5396.7b5f1",
+ "type": "switchNode",
+ "name": "switch",
+ "xml": "<switch test=\"`$org.onap.appc.adapter.ansible.result.code`\">\n",
+ "comments": "",
+ "outputs": 1,
+ "x": 690.9999389648438,
+ "y": 530.0000228881836,
+ "z": "af8f5cdd.6e4de",
+ "wires": [
+ [
+ "bc5a2382.4973",
+ "84f0dd88.8438",
+ "ffd4aab1.e3c4b8"
+ ]
+ ]
+ },
+ {
+ "id": "bc5a2382.4973",
+ "type": "other",
+ "name": "outcome 500",
+ "xml": "<outcome value='500'>\n",
+ "comments": "",
+ "outputs": 1,
+ "x": 835.9999389648438,
+ "y": 528.0000305175781,
+ "z": "af8f5cdd.6e4de",
+ "wires": [
+ [
+ "80cc4946.3f0f78"
+ ]
+ ]
+ },
+ {
+ "id": "84f0dd88.8438",
+ "type": "other",
+ "name": "outcome 100",
+ "xml": "<outcome value='100'>\n",
+ "comments": "",
+ "outputs": 1,
+ "x": 838.9999389648438,
+ "y": 571.0000610351562,
+ "z": "af8f5cdd.6e4de",
+ "wires": [
+ [
+ "f44a47b3.3aa128"
+ ]
+ ]
+ },
+ {
+ "id": "f44a47b3.3aa128",
+ "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='`$org.onap.appc.adapter.ansible.Id`'/>\n\t<parameter name='PlaybookName' value='`$prop.lcm.upgrade-software.playbookname`'/>\n\t\n\n\n\n\n",
+ "comments": "",
+ "outputs": 1,
+ "x": 1025.9999389648438,
+ "y": 570.0000305175781,
+ "z": "af8f5cdd.6e4de",
+ "wires": [
+ [
+ "dd2fe7e6.957248",
+ "6913b982.6c9bb8"
+ ]
+ ]
+ },
+ {
+ "id": "895a0a53.e12ea8",
+ "type": "failure",
+ "name": "failure",
+ "xml": "<outcome value='failure'>\n",
+ "comments": "",
+ "outputs": 1,
+ "x": 581.9999389648438,
+ "y": 439.0000534057617,
+ "z": "af8f5cdd.6e4de",
+ "wires": [
+ [
+ "80cc4946.3f0f78"
+ ]
+ ]
+ },
+ {
+ "id": "f279f5b8.9d49b8",
+ "type": "other",
+ "name": "other",
+ "xml": "<outcome value='Other'>\n",
+ "comments": "",
+ "outputs": 1,
+ "x": 583.9999389648438,
+ "y": 491.0000228881836,
+ "z": "af8f5cdd.6e4de",
+ "wires": [
+ [
+ "f7db5396.7b5f1"
+ ]
+ ]
+ },
+ {
+ "id": "dd2fe7e6.957248",
+ "type": "failure",
+ "name": "failure",
+ "xml": "<outcome value='failure'>\n",
+ "comments": "",
+ "outputs": 1,
+ "x": 1189.9999389648438,
+ "y": 542.0000305175781,
+ "z": "af8f5cdd.6e4de",
+ "wires": [
+ [
+ "80cc4946.3f0f78"
+ ]
+ ]
+ },
+ {
+ "id": "ffd4aab1.e3c4b8",
+ "type": "other",
+ "name": "outcome 101",
+ "xml": "<outcome value='101'>\n",
+ "comments": "",
+ "outputs": 1,
+ "x": 832.9999389648438,
+ "y": 486.00006103515625,
+ "z": "af8f5cdd.6e4de",
+ "wires": [
+ [
+ "80cc4946.3f0f78"
+ ]
+ ]
+ },
+ {
+ "id": "6913b982.6c9bb8",
+ "type": "success",
+ "name": "success",
+ "xml": "<outcome value='success'>\n",
+ "comments": "",
+ "outputs": 1,
+ "x": 1191.9999389648438,
+ "y": 597.0000915527344,
+ "z": "af8f5cdd.6e4de",
+ "wires": [
+ [
+ "14c8dea1.b5b7a1"
+ ]
+ ]
+ },
+ {
+ "id": "a32993f8.f8215",
+ "type": "returnSuccess",
+ "name": "return success",
+ "xml": "<return status='success'>\n<parameter name='status.code' value='`$org.onap.appc.adapter.ansible.result.code`' />\n<parameter name='status.message' value='`$org.onap.appc.adapter.ansible.message`'/>",
+ "comments": "",
+ "x": 1467.9998779296875,
+ "y": 648.0000610351562,
+ "z": "af8f5cdd.6e4de",
+ "wires": []
+ },
+ {
+ "id": "d8c3f83d.d0b9d8",
+ "type": "dgstart",
+ "name": "DGSTART",
+ "outputs": 1,
+ "x": 153,
+ "y": 102,
+ "z": "af8f5cdd.6e4de",
+ "wires": [
+ [
+ "c220826b.91906"
+ ]
+ ]
+ },
+ {
+ "id": "e635fd5d.f4087",
+ "type": "block",
+ "name": "block",
+ "xml": "<block>\n",
+ "atomic": "false",
+ "comments": "",
+ "outputs": 1,
+ "x": 139.91668701171875,
+ "y": 241.08334350585938,
+ "z": "af8f5cdd.6e4de",
+ "wires": [
+ [
+ "810e1e54.dec1c",
+ "ee1802be.c5c18",
+ "e8d3b31a.f46c6",
+ "4d7f56db.9375c8"
+ ]
+ ]
+ },
+ {
+ "id": "ee1802be.c5c18",
+ "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": 328.00001525878906,
+ "y": 225.08334350585938,
+ "z": "af8f5cdd.6e4de",
+ "wires": [
+ []
+ ]
+ },
+ {
+ "id": "3830f5d4.87f1aa",
+ "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": 1222.9999389648438,
+ "y": 371.0833740234375,
+ "z": "af8f5cdd.6e4de",
+ "wires": [
+ [
+ "1566d659.a0655a"
+ ]
+ ]
+ },
+ {
+ "id": "1566d659.a0655a",
+ "type": "failure",
+ "name": "failure",
+ "xml": "<outcome value='failure'>\n",
+ "comments": "",
+ "outputs": 1,
+ "x": 1392.9998779296875,
+ "y": 370.0833740234375,
+ "z": "af8f5cdd.6e4de",
+ "wires": [
+ [
+ "22f8bfd0.6139e"
+ ]
+ ]
+ },
+ {
+ "id": "80cc4946.3f0f78",
+ "type": "block",
+ "name": "block",
+ "xml": "<block>\n",
+ "atomic": "false",
+ "comments": "",
+ "outputs": 1,
+ "x": 1025.9998779296875,
+ "y": 395.0833740234375,
+ "z": "af8f5cdd.6e4de",
+ "wires": [
+ [
+ "3830f5d4.87f1aa",
+ "fedbb5e6.fb3c28",
+ "898f667e.daf2e8"
+ ]
+ ]
+ },
+ {
+ "id": "7ce48bed.5b7c74",
+ "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": 1488.4998779296875,
+ "y": 597.0833740234375,
+ "z": "af8f5cdd.6e4de",
+ "wires": [
+ [
+ "37e7fa80.2728b6"
+ ]
+ ]
+ },
+ {
+ "id": "37e7fa80.2728b6",
+ "type": "failure",
+ "name": "failure",
+ "xml": "<outcome value='failure'>\n",
+ "comments": "",
+ "outputs": 1,
+ "x": 1648.4998779296875,
+ "y": 597.0833740234375,
+ "z": "af8f5cdd.6e4de",
+ "wires": [
+ [
+ "47c7511a.dd8fe"
+ ]
+ ]
+ },
+ {
+ "id": "22f8bfd0.6139e",
+ "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": 1524.9998779296875,
+ "y": 370.0833740234375,
+ "z": "af8f5cdd.6e4de",
+ "wires": [
+ []
+ ]
+ },
+ {
+ "id": "fedbb5e6.fb3c28",
+ "type": "returnFailure",
+ "name": "return failure",
+ "xml": "<return status='failure'>\n<parameter name='status.code' value='401' />\n<parameter name='status.message' value='`$org.onap.appc.adapter.ansible.message`' />\n",
+ "comments": "",
+ "x": 1197.9165649414062,
+ "y": 408.0833740234375,
+ "z": "af8f5cdd.6e4de",
+ "wires": []
+ },
+ {
+ "id": "47c7511a.dd8fe",
+ "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": 1769.9166259765625,
+ "y": 598.0833740234375,
+ "z": "af8f5cdd.6e4de",
+ "wires": [
+ []
+ ]
+ },
+ {
+ "id": "898f667e.daf2e8",
+ "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.request-id + '-' + $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.request-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.status.code' value='`$org.onap.appc.adapter.ansible.result.code`' />\n<parameter name='lcm-dmaap.status.message' value='`$org.onap.appc.adapter.ansible.message`'/>\n",
+ "comments": "",
+ "x": 1174.9999389648438,
+ "y": 318.0833740234375,
+ "z": "af8f5cdd.6e4de",
+ "wires": []
+ },
+ {
+ "id": "14c8dea1.b5b7a1",
+ "type": "block",
+ "name": "block",
+ "xml": "<block>\n",
+ "atomic": "false",
+ "comments": "",
+ "outputs": 1,
+ "x": 1317.9998779296875,
+ "y": 596.0833435058594,
+ "z": "af8f5cdd.6e4de",
+ "wires": [
+ [
+ "7ce48bed.5b7c74",
+ "70a28c6a.563d24",
+ "a32993f8.f8215"
+ ]
+ ]
+ },
+ {
+ "id": "70a28c6a.563d24",
+ "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.request-id + '-' + $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.request-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.status.code' value='`$org.onap.appc.adapter.ansible.result.code`' />\n<parameter name='lcm-dmaap.status.message' value='`$org.onap.appc.adapter.ansible.message`'/>\n",
+ "comments": "",
+ "x": 1448.1666259765625,
+ "y": 549.0833740234375,
+ "z": "af8f5cdd.6e4de",
+ "wires": []
+ },
+ {
+ "id": "fa759954.4e2068",
+ "type": "not-found",
+ "name": "not-found",
+ "xml": "<outcome value='not-found'>\n",
+ "comments": "",
+ "outputs": 1,
+ "x": 577.9999389648438,
+ "y": 392.0000228881836,
+ "z": "af8f5cdd.6e4de",
+ "wires": [
+ [
+ "ed41675d.59c088"
+ ]
+ ]
+ },
+ {
+ "id": "756c2e53.ca6d7",
+ "type": "set",
+ "name": "set Defaults",
+ "xml": "<set>\n<parameter name='org.onap.appc.adapter.ansible.result.code' value='401'/>\n<parameter name='org.onap.appc.adapter.ansible.message' value='Ansible Adapter was not found'/>\n",
+ "comments": "",
+ "x": 1009.9999389648438,
+ "y": 297.0000305175781,
+ "z": "af8f5cdd.6e4de",
+ "wires": []
+ },
+ {
+ "id": "ed41675d.59c088",
+ "type": "block",
+ "name": "block",
+ "xml": "<block>\n",
+ "atomic": "false",
+ "comments": "",
+ "outputs": 1,
+ "x": 761.9999389648438,
+ "y": 384.0000228881836,
+ "z": "af8f5cdd.6e4de",
+ "wires": [
+ [
+ "756c2e53.ca6d7",
+ "80cc4946.3f0f78"
+ ]
+ ]
+ },
+ {
+ "id": "e8d3b31a.f46c6",
+ "type": "set",
+ "name": "set default status value",
+ "xml": "<set>\n<parameter name='status.code' value='200' />\n<parameter name='status.message' value='unexpected return from DG' />\n<parameter name='nodelist' value=\"`$prop.ansible.nodelist`\"/>",
+ "comments": "",
+ "x": 336,
+ "y": 269,
+ "z": "af8f5cdd.6e4de",
+ "wires": []
+ },
+ {
+ "id": "4d7f56db.9375c8",
+ "type": "get-resource",
+ "name": "get aai.generic-vnf by vnf-id",
+ "xml": "<get-resource plugin=\"org.onap.ccsdk.sli.adaptors.aai.AAIService\" \n\tresource=\"generic-vnf\" \n\t\tkey=\"generic-vnf.vnf-id = $upgrade-software-input.action-identifiers.vnf-id\" \n\t\tlocal-only=\"false\" \n\t\tpfx='aai.generic-vnf'>",
+ "comments": "",
+ "outputs": 1,
+ "x": 349.0000305175781,
+ "y": 325,
+ "z": "af8f5cdd.6e4de",
+ "wires": [
+ [
+ "fa69a126.2a554",
+ "f9cb9963.f9e368"
+ ]
+ ]
+ },
+ {
+ "id": "fa69a126.2a554",
+ "type": "failure",
+ "name": "other",
+ "xml": "<outcome value='Other'>\n",
+ "comments": "",
+ "outputs": 1,
+ "x": 589.86083984375,
+ "y": 312.53564453125,
+ "z": "af8f5cdd.6e4de",
+ "wires": [
+ [
+ "2d1a88c6.11f9d8"
+ ]
+ ]
+ },
+ {
+ "id": "f9cb9963.f9e368",
+ "type": "success",
+ "name": "success",
+ "xml": "<outcome value='success'>\n",
+ "comments": "",
+ "outputs": 1,
+ "x": 591.3908081054688,
+ "y": 260.28399658203125,
+ "z": "af8f5cdd.6e4de",
+ "wires": [
+ [
+ "c4d4de4d.3e19f"
+ ]
+ ]
+ },
+ {
+ "id": "c4d4de4d.3e19f",
+ "type": "set",
+ "name": "set nodelist",
+ "xml": "<set>\n<parameter name='quote' value=\"'\" />\n<parameter name='nodelist' value=\"`'[' + $quote + $aai.ipv4-oam-address + $quote + ']'`\"/>\n",
+ "comments": "",
+ "x": 740.3908081054688,
+ "y": 259.28399658203125,
+ "z": "af8f5cdd.6e4de",
+ "wires": []
+ },
+ {
+ "id": "2d1a88c6.11f9d8",
+ "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='VNF not found in AAI. Nodelist retrieved from config'/>",
+ "comments": "",
+ "outputs": 1,
+ "x": 736,
+ "y": 312,
+ "z": "af8f5cdd.6e4de",
+ "wires": [
+ []
+ ]
+ }
+] \ No newline at end of file
diff --git a/platform-logic/lcm/src/main/json/lcm-restconf-configscaleout.json b/platform-logic/lcm/src/main/json/lcm-restconf-configscaleout.json
new file mode 100755
index 00000000..63285f96
--- /dev/null
+++ b/platform-logic/lcm/src/main/json/lcm-restconf-configscaleout.json
@@ -0,0 +1,5 @@
+{
+ "vdns-instance": [
+ ${payloadJson.configuration-parameters}
+ ]
+}
diff --git a/platform-logic/lcm/src/main/resources/graph.versions b/platform-logic/lcm/src/main/resources/graph.versions
index 1b3fa12b..ea54b270 100644
--- a/platform-logic/lcm/src/main/resources/graph.versions
+++ b/platform-logic/lcm/src/main/resources/graph.versions
@@ -1,3 +1,12 @@
LCM upgrade-software ${project.version} sync
LCM upgrade-post-check ${project.version} sync
LCM upgrade-pre-check ${project.version} sync
+LCM upgrade-backup ${project.version} sync
+LCM quiesce-traffic ${project.version} sync
+LCM resume-traffic ${project.version} sync
+LCM distribute-traffic ${project.version} sync
+LCM lock ${project.version} sync
+LCM unlock ${project.version} sync
+LCM snapshot ${project.version} sync
+LCM config-scale-out ${project.version} sync
+LCM health-check ${project.version} sync
diff --git a/platform-logic/lcm/src/main/xml/LCM_config-scale-out.xml b/platform-logic/lcm/src/main/xml/LCM_config-scale-out.xml
new file mode 100755
index 00000000..6f5163fa
--- /dev/null
+++ b/platform-logic/lcm/src/main/xml/LCM_config-scale-out.xml
@@ -0,0 +1,120 @@
+<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='config-scale-out' 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>
+ <set>
+ <parameter name='status.code' value='200' />
+ <parameter name='status.message' value='unexpected return from LCM DG' />
+ </set>
+ <execute plugin='org.onap.ccsdk.sli.core.slipluginutils.SliPluginUtils' method='jsonStringToCtx'>
+ <parameter name='source' value='config-scale-out-input.payload' />
+ <parameter name='outputPath' value='payloadJson' />
+ <parameter name='isEscaped' value='true' />
+ <outcome value='success'>
+ <record plugin='org.onap.ccsdk.sli.core.sli.recording.Slf4jRecorder'>
+ <parameter name='logger' value='message-log'/>
+ <parameter name='field1' value='`$payloadJson.request-parameters.vnf-host-ip-address`'/>
+ <parameter name='field2' value='`$payloadJson.configuration-parameters.ip-addr`'/>
+ </record>
+ </outcome>
+ </execute>
+ <execute plugin='org.onap.ccsdk.sli.plugins.restapicall.RestapiCallNode' method='sendRequest' >
+ <parameter name='templateFileName' value="`$prop.restapi.templateDir + '/' + $prop.lcm.restconf.configscaleout.templatefile`" />
+ <parameter name='restapiUrl' value="`'http://' + $payloadJson.request-parameters.vnf-host-ip-address + ':' + $prop.lcm.restconf.port + $prop.lcm.restconf.configscaleout.urlpath + $payloadJson.configuration-parameters.ip-addr`" />
+ <parameter name='restapiUser' value='`$prop.lcm.restconf.configscaleout.user`' />
+ <parameter name='restapiPassword' value='`$prop.lcm.restconf.configscaleout.password`' />
+ <parameter name='format' value='json' />
+ <parameter name='httpMethod' value='PUT' />
+ <parameter name='contentType' value='application/json' />
+ <parameter name="responsePrefix" value="restconf" />
+ <outcome value='failure'>
+ <block>
+ <set>
+ <parameter name='lcm-dmaap.version' value='`$prop.lcm.dmaap.version`'/>
+ <parameter name='lcm-dmaap.correlation-id' value="`$config-scale-out-input.common-header.request-id + '-' + $config-scale-out-input.common-header.sub-request-id`"/>
+ <parameter name='lcm-dmaap.partition' value='`$prop.lcm.dmaap.partition`'/>
+ <parameter name='lcm-dmaap.rpc-name' value='config-scale-out'/>
+ <parameter name='lcm-dmaap.type' value='`$prop.lcm.dmaap.type`'/>
+ <parameter name='lcm-dmaap.timestamp' value='`$config-scale-out-input.common-header.timestamp`'/>
+ <parameter name='lcm-dmaap.api-ver' value='`$config-scale-out-input.common-header.api-ver`'/>
+ <parameter name='lcm-dmaap.originator-id' value='`$config-scale-out-input.common-header.originator-id`'/>
+ <parameter name='lcm-dmaap.request-id' value='`$config-scale-out-input.common-header.request-id`'/>
+ <parameter name='lcm-dmaap.sub-request-id' value='`$config-scaleout-input.common-header.sub-request-id`'/>
+ <parameter name='lcm-dmaap.flags.mode' value='`$config-scale-out-input.common-header.flags.mode`'/>
+ <parameter name='lcm-dmaap.flags.force' value='`$config-scale-out-input.common-header.flags.force`'/>
+ <parameter name='lcm-dmaap.flags.ttl' value='`$config-scale-out-input.common-header.flags.ttl`'/>
+ <parameter name='lcm-dmaap.status.code' value='401' />
+ <parameter name='lcm-dmaap.status.message' value="`'DG-Failure ' + $restconf.response-message + ' RestConf ResponseCode=' + $restconf.response-code`"/>
+ </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='dmaap' />
+ <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='status.code' value= '`$lcm-dmaap.status.code`'/>
+ <parameter name='status.message' value='`$lcm-dmaap.status.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="`$config-scale-out-input.common-header.request-id + '-' + $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='config-scale-out'/>
+ <parameter name='lcm-dmaap.type' value='`$prop.lcm.dmaap.type`'/>
+ <parameter name='lcm-dmaap.timestamp' value='`$config-scale-out-input.common-header.timestamp`'/>
+ <parameter name='lcm-dmaap.api-ver' value='`$config-scaleout-input.common-header.api-ver`'/>
+ <parameter name='lcm-dmaap.originator-id' value='`$config-scale-out-input.common-header.originator-id`'/>
+ <parameter name='lcm-dmaap.request-id' value='`$config-scale-out-input.common-header.request-id`'/>
+ <parameter name='lcm-dmaap.sub-request-id' value='`$config-scale-out-input.common-header.sub-request-id`'/>
+ <parameter name='lcm-dmaap.flags.mode' value='`$config-scale-out-input.common-header.flags.mode`'/>
+ <parameter name='lcm-dmaap.flags.force' value='`$config-scale-out-input.common-header.flags.force`'/>
+ <parameter name='lcm-dmaap.flags.ttl' value='`$config-scale-out-input.common-header.flags.ttl`'/>
+ <parameter name='lcm-dmaap.status.code' value='`$restconf.response-code`' />
+ <parameter name='lcm-dmaap.status.message' value='`$restconf.response-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='dmaap' />
+ <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='`$restconf.response-code`' />
+ <parameter name='status.message' value='`$restconf.response-message`' />
+ </return>
+ </block>
+ </outcome>
+ </execute>
+ </block>
+ </method>
+</service-logic> \ No newline at end of file
diff --git a/platform-logic/lcm/src/main/xml/LCM_distribute-traffic.xml b/platform-logic/lcm/src/main/xml/LCM_distribute-traffic.xml
new file mode 100755
index 00000000..d83d149d
--- /dev/null
+++ b/platform-logic/lcm/src/main/xml/LCM_distribute-traffic.xml
@@ -0,0 +1,312 @@
+<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='distribute-traffic' 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>
+ <set>
+ <parameter name='status.code' value='200' />
+ <parameter name='status.message' value='unexpected return from DG' />
+ <parameter name='nodelist' value="`$prop.ansible.nodelist`"/>
+ </set>
+ <get-resource plugin="org.onap.ccsdk.sli.adaptors.aai.AAIService"
+ resource="generic-vnf"
+ key="generic-vnf.vnf-id = $distribute-traffic-input.action-identifiers.vnf-id"
+ local-only="false"
+ pfx='aai.generic-vnf'>
+ <outcome value='success'>
+ <set>
+ <parameter name='quote' value="'" />
+ <parameter name='nodelist' value="`'[' + $quote + $aai.ipv4-oam-address + $quote + ']'`"/>
+ </set>
+ </outcome>
+ <outcome value='Other'>
+ <record plugin="org.onap.ccsdk.sli.core.sli.recording.Slf4jRecorder">
+ <parameter name="logger" value="message-log"/>
+ <parameter name="field1" value='VNF not found in AAI. Nodelist retrieved from config'/>
+ </record>
+ </outcome>
+ </get-resource>
+ <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='`$distribute-traffic-input.payload`'/>
+ <parameter name='NodeList' value="`$nodelist`"/>
+ <parameter name='Timeout' value='`$prop.ansible.timeout`'/>
+ <parameter name='Version' value='`$prop.ansible.version`'/>
+ <parameter name='Id' value='`$distribute-traffic-input.common-header.request-id`'/>
+ <parameter name='PlaybookName' value='`$prop.lcm.distribute-traffic.playbookname`'/>
+ <outcome value='not-found'>
+ <block>
+ <set>
+ <parameter name='org.onap.appc.adapter.ansible.result.code' value='401'/>
+ <parameter name='org.onap.appc.adapter.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="`$distribute-traffic-input.common-header.request-id + '-' + $distribute-traffic-input.common-header.sub-request-id`"/>
+ <parameter name='lcm-dmaap.partition' value='`$prop.lcm.dmaap.partition`'/>
+ <parameter name='lcm-dmaap.rpc-name' value='distribute-traffic'/>
+ <parameter name='lcm-dmaap.type' value='`$prop.lcm.dmaap.type`'/>
+ <parameter name='lcm-dmaap.timestamp' value='`$distribute-traffic-input.common-header.timestamp`'/>
+ <parameter name='lcm-dmaap.api-ver' value='`$distribute-traffic-input.common-header.api-ver`'/>
+ <parameter name='lcm-dmaap.originator-id' value='`$distribute-traffic-input.common-header.originator-id`'/>
+ <parameter name='lcm-dmaap.request-id' value='`$distribute-traffic-input.common-header.request-id`'/>
+ <parameter name='lcm-dmaap.sub-request-id' value='`$distribute-traffic-input.common-header.sub-request-id`'/>
+ <parameter name='lcm-dmaap.flags.mode' value='`$distribute-traffic-input.common-header.flags.mode`'/>
+ <parameter name='lcm-dmaap.flags.force' value='`$distribute-traffic-input.common-header.flags.force`'/>
+ <parameter name='lcm-dmaap.flags.ttl' value='`$distribute-traffic-input.common-header.flags.ttl`'/>
+ <parameter name='lcm-dmaap.status.code' value='`$org.onap.appc.adapter.ansible.result.code`' />
+ <parameter name='lcm-dmaap.status.message' value='`$org.onap.appc.adapter.ansible.message`'/>
+ </set>
+ <execute plugin='org.onap.ccsdk.sli.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='status.code' value='401' />
+ <parameter name='status.message' value='`$org.onap.appc.adapter.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="`$distribute-traffic-input.common-header.request-id + '-' + $distribute-traffic-input.common-header.sub-request-id`"/>
+ <parameter name='lcm-dmaap.partition' value='`$prop.lcm.dmaap.partition`'/>
+ <parameter name='lcm-dmaap.rpc-name' value='distribute-traffic'/>
+ <parameter name='lcm-dmaap.type' value='`$prop.lcm.dmaap.type`'/>
+ <parameter name='lcm-dmaap.timestamp' value='`$distribute-traffic-input.common-header.timestamp`'/>
+ <parameter name='lcm-dmaap.api-ver' value='`$distribute-traffic-input.common-header.api-ver`'/>
+ <parameter name='lcm-dmaap.originator-id' value='`$distribute-traffic-input.common-header.originator-id`'/>
+ <parameter name='lcm-dmaap.request-id' value='`$distribute-traffic-input.common-header.request-id`'/>
+ <parameter name='lcm-dmaap.sub-request-id' value='`$distribute-traffic-input.common-header.sub-request-id`'/>
+ <parameter name='lcm-dmaap.flags.mode' value='`$distribute-traffic-input.common-header.flags.mode`'/>
+ <parameter name='lcm-dmaap.flags.force' value='`$distribute-traffic-input.common-header.flags.force`'/>
+ <parameter name='lcm-dmaap.flags.ttl' value='`$distribute-traffic-input.common-header.flags.ttl`'/>
+ <parameter name='lcm-dmaap.status.code' value='`$org.onap.appc.adapter.ansible.result.code`' />
+ <parameter name='lcm-dmaap.status.message' value='`$org.onap.appc.adapter.ansible.message`'/>
+ </set>
+ <execute plugin='org.onap.ccsdk.sli.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='status.code' value='401' />
+ <parameter name='status.message' value='`$org.onap.appc.adapter.ansible.message`' />
+ </return>
+ </block>
+ </outcome>
+ <outcome value='Other'>
+ <switch test="`$org.onap.appc.adapter.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="`$distribute-traffic-input.common-header.request-id + '-' + $distribute-traffic-input.common-header.sub-request-id`"/>
+ <parameter name='lcm-dmaap.partition' value='`$prop.lcm.dmaap.partition`'/>
+ <parameter name='lcm-dmaap.rpc-name' value='distribute-traffic'/>
+ <parameter name='lcm-dmaap.type' value='`$prop.lcm.dmaap.type`'/>
+ <parameter name='lcm-dmaap.timestamp' value='`$distribute-traffic-input.common-header.timestamp`'/>
+ <parameter name='lcm-dmaap.api-ver' value='`$distribute-traffic-input.common-header.api-ver`'/>
+ <parameter name='lcm-dmaap.originator-id' value='`$distribute-traffic-input.common-header.originator-id`'/>
+ <parameter name='lcm-dmaap.request-id' value='`$distribute-traffic-input.common-header.request-id`'/>
+ <parameter name='lcm-dmaap.sub-request-id' value='`$distribute-traffic-input.common-header.sub-request-id`'/>
+ <parameter name='lcm-dmaap.flags.mode' value='`$distribute-traffic-input.common-header.flags.mode`'/>
+ <parameter name='lcm-dmaap.flags.force' value='`$distribute-traffic-input.common-header.flags.force`'/>
+ <parameter name='lcm-dmaap.flags.ttl' value='`$distribute-traffic-input.common-header.flags.ttl`'/>
+ <parameter name='lcm-dmaap.status.code' value='`$org.onap.appc.adapter.ansible.result.code`' />
+ <parameter name='lcm-dmaap.status.message' value='`$org.onap.appc.adapter.ansible.message`'/>
+ </set>
+ <execute plugin='org.onap.ccsdk.sli.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='status.code' value='401' />
+ <parameter name='status.message' value='`$org.onap.appc.adapter.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="`$distribute-traffic-input.common-header.request-id + '-' + $distribute-traffic-input.common-header.sub-request-id`"/>
+ <parameter name='lcm-dmaap.partition' value='`$prop.lcm.dmaap.partition`'/>
+ <parameter name='lcm-dmaap.rpc-name' value='distribute-traffic'/>
+ <parameter name='lcm-dmaap.type' value='`$prop.lcm.dmaap.type`'/>
+ <parameter name='lcm-dmaap.timestamp' value='`$distribute-traffic-input.common-header.timestamp`'/>
+ <parameter name='lcm-dmaap.api-ver' value='`$distribute-traffic-input.common-header.api-ver`'/>
+ <parameter name='lcm-dmaap.originator-id' value='`$distribute-traffic-input.common-header.originator-id`'/>
+ <parameter name='lcm-dmaap.request-id' value='`$distribute-traffic-input.common-header.request-id`'/>
+ <parameter name='lcm-dmaap.sub-request-id' value='`$distribute-traffic-input.common-header.sub-request-id`'/>
+ <parameter name='lcm-dmaap.flags.mode' value='`$distribute-traffic-input.common-header.flags.mode`'/>
+ <parameter name='lcm-dmaap.flags.force' value='`$distribute-traffic-input.common-header.flags.force`'/>
+ <parameter name='lcm-dmaap.flags.ttl' value='`$distribute-traffic-input.common-header.flags.ttl`'/>
+ <parameter name='lcm-dmaap.status.code' value='`$org.onap.appc.adapter.ansible.result.code`' />
+ <parameter name='lcm-dmaap.status.message' value='`$org.onap.appc.adapter.ansible.message`'/>
+ </set>
+ <execute plugin='org.onap.ccsdk.sli.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='status.code' value='401' />
+ <parameter name='status.message' value='`$org.onap.appc.adapter.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='`$org.onap.appc.adapter.ansible.Id`'/>
+ <parameter name='PlaybookName' value='`$prop.lcm.distribute-traffic.playbookname`'/>
+ <outcome value='failure'>
+ <block>
+ <set>
+ <parameter name='lcm-dmaap.version' value='`$prop.lcm.dmaap.version`'/>
+ <parameter name='lcm-dmaap.correlation-id' value="`$distribute-traffic-input.common-header.request-id + '-' + $distribute-traffic-input.common-header.sub-request-id`"/>
+ <parameter name='lcm-dmaap.partition' value='`$prop.lcm.dmaap.partition`'/>
+ <parameter name='lcm-dmaap.rpc-name' value='distribute-traffic'/>
+ <parameter name='lcm-dmaap.type' value='`$prop.lcm.dmaap.type`'/>
+ <parameter name='lcm-dmaap.timestamp' value='`$distribute-traffic-input.common-header.timestamp`'/>
+ <parameter name='lcm-dmaap.api-ver' value='`$distribute-traffic-input.common-header.api-ver`'/>
+ <parameter name='lcm-dmaap.originator-id' value='`$distribute-traffic-input.common-header.originator-id`'/>
+ <parameter name='lcm-dmaap.request-id' value='`$distribute-traffic-input.common-header.request-id`'/>
+ <parameter name='lcm-dmaap.sub-request-id' value='`$distribute-traffic-input.common-header.sub-request-id`'/>
+ <parameter name='lcm-dmaap.flags.mode' value='`$distribute-traffic-input.common-header.flags.mode`'/>
+ <parameter name='lcm-dmaap.flags.force' value='`$distribute-traffic-input.common-header.flags.force`'/>
+ <parameter name='lcm-dmaap.flags.ttl' value='`$distribute-traffic-input.common-header.flags.ttl`'/>
+ <parameter name='lcm-dmaap.status.code' value='`$org.onap.appc.adapter.ansible.result.code`' />
+ <parameter name='lcm-dmaap.status.message' value='`$org.onap.appc.adapter.ansible.message`'/>
+ </set>
+ <execute plugin='org.onap.ccsdk.sli.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='status.code' value='401' />
+ <parameter name='status.message' value='`$org.onap.appc.adapter.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="`$distribute-traffic-input.common-header.request-id + '-' + $distribute-traffic-input.common-header.sub-request-id`"/>
+ <parameter name='lcm-dmaap.partition' value='`$prop.lcm.dmaap.partition`'/>
+ <parameter name='lcm-dmaap.rpc-name' value='distribute-traffic'/>
+ <parameter name='lcm-dmaap.type' value='`$prop.lcm.dmaap.type`'/>
+ <parameter name='lcm-dmaap.timestamp' value='`$distribute-traffic-input.common-header.timestamp`'/>
+ <parameter name='lcm-dmaap.api-ver' value='`$distribute-traffic-input.common-header.api-ver`'/>
+ <parameter name='lcm-dmaap.originator-id' value='`$distribute-traffic-input.common-header.originator-id`'/>
+ <parameter name='lcm-dmaap.request-id' value='`$distribute-traffic-input.common-header.request-id`'/>
+ <parameter name='lcm-dmaap.sub-request-id' value='`$distribute-traffic-input.common-header.sub-request-id`'/>
+ <parameter name='lcm-dmaap.flags.mode' value='`$distribute-traffic-input.common-header.flags.mode`'/>
+ <parameter name='lcm-dmaap.flags.force' value='`$distribute-traffic-input.common-header.flags.force`'/>
+ <parameter name='lcm-dmaap.flags.ttl' value='`$distribute-traffic-input.common-header.flags.ttl`'/>
+ <parameter name='lcm-dmaap.status.code' value='`$org.onap.appc.adapter.ansible.result.code`' />
+ <parameter name='lcm-dmaap.status.message' value='`$org.onap.appc.adapter.ansible.message`'/>
+ </set>
+ <execute plugin='org.onap.ccsdk.sli.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.appc.adapter.ansible.result.code`' />
+ <parameter name='status.message' value='`$org.onap.appc.adapter.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_health-check.xml b/platform-logic/lcm/src/main/xml/LCM_health-check.xml
new file mode 100755
index 00000000..90b1cdea
--- /dev/null
+++ b/platform-logic/lcm/src/main/xml/LCM_health-check.xml
@@ -0,0 +1,117 @@
+<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='health-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>
+ <set>
+ <parameter name='status.code' value='200' />
+ <parameter name='status.message' value='unexpected return from LCM DG' />
+ </set>
+ <execute plugin='org.onap.ccsdk.sli.core.slipluginutils.SliPluginUtils' method='jsonStringToCtx'>
+ <parameter name='source' value='health-check-input.payload' />
+ <parameter name='outputPath' value='payloadJson' />
+ <parameter name='isEscaped' value='true' />
+ <outcome value='success'>
+ <record plugin='org.onap.ccsdk.sli.core.sli.recording.Slf4jRecorder'>
+ <parameter name='logger' value='message-log'/>
+ <parameter name='field1' value='`$payloadJson.request-parameters.vnf-host-ip-address`'/>
+ </record>
+ </outcome>
+ </execute>
+ <execute plugin='org.onap.ccsdk.sli.plugins.restapicall.RestapiCallNode' method='sendRequest' >
+ <parameter name='restapiUrl' value="`'http://' + $payloadJson.request-parameters.vnf-host-ip-address + ':' + $prop.lcm.restconf.port + $prop.lcm.restconf.configscaleout.geturlpath`" />
+ <parameter name='restapiUser' value='`$prop.lcm.restconf.user`' />
+ <parameter name='restapiPassword' value='`$prop.lcm.restconf.password`' />
+ <parameter name='format' value='json' />
+ <parameter name='httpMethod' value='GET' />
+ <parameter name="responsePrefix" value="restconf" />
+ <outcome value='failure'>
+ <block>
+ <set>
+ <parameter name='lcm-dmaap.version' value='`$prop.lcm.dmaap.version`'/>
+ <parameter name='lcm-dmaap.correlation-id' value="`$health-check-input.common-header.request-id + '-' + $health-check-input.common-header.sub-request-id`"/>
+ <parameter name='lcm-dmaap.partition' value='`$prop.lcm.dmaap.partition`'/>
+ <parameter name='lcm-dmaap.rpc-name' value='health-check'/>
+ <parameter name='lcm-dmaap.type' value='`$prop.lcm.dmaap.type`'/>
+ <parameter name='lcm-dmaap.timestamp' value='`$health-check-input.common-header.timestamp`'/>
+ <parameter name='lcm-dmaap.api-ver' value='`$health-check-input.common-header.api-ver`'/>
+ <parameter name='lcm-dmaap.originator-id' value='`$health-check-input.common-header.originator-id`'/>
+ <parameter name='lcm-dmaap.request-id' value='`$health-check-input.common-header.request-id`'/>
+ <parameter name='lcm-dmaap.sub-request-id' value='`$health-check-input.common-header.sub-request-id`'/>
+ <parameter name='lcm-dmaap.flags.mode' value='`$health-check-input.common-header.flags.mode`'/>
+ <parameter name='lcm-dmaap.flags.force' value='`$health-check-input.common-header.flags.force`'/>
+ <parameter name='lcm-dmaap.flags.ttl' value='`$health-check-input.common-header.flags.ttl`'/>
+ <parameter name='lcm-dmaap.status.code' value='401' />
+ <parameter name='lcm-dmaap.status.message' value="`'DG-Failure ' + $restconf.response-message + ' RestConf ResponseCode=' + $restconf.response-code`"/>
+ </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='dmaap' />
+ <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='status.code' value= '`$lcm-dmaap.status.code`'/>
+ <parameter name='status.message' value='`$lcm-dmaap.status.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="`$health-check-input.common-header.request-id + '-' + $health-check-input.common-header.sub-request-id`"/>
+ <parameter name='lcm-dmaap.partition' value='`$prop.lcm.dmaap.partition`'/>
+ <parameter name='lcm-dmaap.rpc-name' value='health-check'/>
+ <parameter name='lcm-dmaap.type' value='`$prop.lcm.dmaap.type`'/>
+ <parameter name='lcm-dmaap.timestamp' value='`$health-check-input.common-header.timestamp`'/>
+ <parameter name='lcm-dmaap.api-ver' value='`$health-check-input.common-header.api-ver`'/>
+ <parameter name='lcm-dmaap.originator-id' value='`$health-check-input.common-header.originator-id`'/>
+ <parameter name='lcm-dmaap.request-id' value='`$health-check-input.common-header.request-id`'/>
+ <parameter name='lcm-dmaap.sub-request-id' value='`$health-check-input.common-header.sub-request-id`'/>
+ <parameter name='lcm-dmaap.flags.mode' value='`$health-check-input.common-header.flags.mode`'/>
+ <parameter name='lcm-dmaap.flags.force' value='`$health-check-input.common-header.flags.force`'/>
+ <parameter name='lcm-dmaap.flags.ttl' value='`$health-check-input.common-header.flags.ttl`'/>
+ <parameter name='lcm-dmaap.status.code' value='`$restconf.response-code`' />
+ <parameter name='lcm-dmaap.status.message' value='`$restconf.response-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='dmaap' />
+ <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='`$restconf.response-code`' />
+ <parameter name='status.message' value='`$restconf.response-message`' />
+ </return>
+ </block>
+ </outcome>
+ </execute>
+ </block>
+ </method>
+</service-logic> \ No newline at end of file
diff --git a/platform-logic/lcm/src/main/xml/LCM_quiesce-traffic.xml b/platform-logic/lcm/src/main/xml/LCM_quiesce-traffic.xml
index 172c459c..95038993 100644
--- a/platform-logic/lcm/src/main/xml/LCM_quiesce-traffic.xml
+++ b/platform-logic/lcm/src/main/xml/LCM_quiesce-traffic.xml
@@ -10,44 +10,303 @@
<set>
<parameter name='status.code' value='200' />
<parameter name='status.message' value='unexpected return from DG' />
+ <parameter name='nodelist' value="`$prop.ansible.nodelist`"/>
</set>
- <set>
- <parameter name='lcm-dmaap.version' value='`$prop.lcm.dmaap.version`'/>
- <parameter name='lcm-dmaap.correlation-id' value="`$quiesce-traffic-input.common-header.request-id + '-' + $quiesce-traffic-input.common-header.sub-request-id`"/>
- <parameter name='lcm-dmaap.partition' value='`$prop.lcm.dmaap.partition`'/>
- <parameter name='lcm-dmaap.rpc-name' value='quiesce-traffic'/>
- <parameter name='lcm-dmaap.type' value='`$prop.lcm.dmaap.type`'/>
- <parameter name='lcm-dmaap.timestamp' value='`$quiesce-traffic-input.common-header.timestamp`'/>
- <parameter name='lcm-dmaap.api-ver' value='`$quiesce-traffic-input.common-header.api-ver`'/>
- <parameter name='lcm-dmaap.originator-id' value='`$quiesce-traffic-input.common-header.originator-id`'/>
- <parameter name='lcm-dmaap.request-id' value='`$quiesce-traffic-input.common-header.originator-id`'/>
- <parameter name='lcm-dmaap.sub-request-id' value='`$quiesce-traffic-input.common-header.sub-request-id`'/>
- <parameter name='lcm-dmaap.flags.mode' value='`$quiesce-traffic-input.common-header.flags.mode`'/>
- <parameter name='lcm-dmaap.flags.force' value='`$quiesce-traffic-input.common-header.flags.force`'/>
- <parameter name='lcm-dmaap.flags.ttl' value='`$quiesce-traffic-input.common-header.flags.ttl`'/>
- <parameter name='lcm-dmaap.status.code' value='400' />
- <parameter name='lcm-dmaap.status.message' value='SDNC Quiesce-Traffic Mock returns success'/>
- </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'>
+ <get-resource plugin="org.onap.ccsdk.sli.adaptors.aai.AAIService"
+ resource="generic-vnf"
+ key="generic-vnf.vnf-id = $quiesce-traffic-input.action-identifiers.vnf-id"
+ local-only="false"
+ pfx='aai.generic-vnf'>
+ <outcome value='success'>
+ <set>
+ <parameter name='quote' value="'" />
+ <parameter name='nodelist' value="`'[' + $quote + $aai.ipv4-oam-address + $quote + ']'`"/>
+ </set>
+ </outcome>
+ <outcome value='Other'>
<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'/>
+ <parameter name="field1" value='VNF not found in AAI. Nodelist retrieved from config'/>
</record>
</outcome>
+ </get-resource>
+ <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='`$quiesce-traffic-input.payload`'/>
+ <parameter name='NodeList' value="`$nodelist`"/>
+ <parameter name='Timeout' value='`$prop.ansible.timeout`'/>
+ <parameter name='Version' value='`$prop.ansible.version`'/>
+ <parameter name='Id' value='`$quiesce-traffic-input.common-header.request-id`'/>
+ <parameter name='PlaybookName' value='`$prop.lcm.quiesce-traffic.playbookname`'/>
+ <outcome value='not-found'>
+ <block>
+ <set>
+ <parameter name='org.onap.appc.adapter.ansible.result.code' value='401'/>
+ <parameter name='org.onap.appc.adapter.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="`$quiesce-traffic-input.common-header.request-id + '-' + $quiesce-traffic-input.common-header.sub-request-id`"/>
+ <parameter name='lcm-dmaap.partition' value='`$prop.lcm.dmaap.partition`'/>
+ <parameter name='lcm-dmaap.rpc-name' value='quiesce-traffic'/>
+ <parameter name='lcm-dmaap.type' value='`$prop.lcm.dmaap.type`'/>
+ <parameter name='lcm-dmaap.timestamp' value='`$quiesce-traffic-input.common-header.timestamp`'/>
+ <parameter name='lcm-dmaap.api-ver' value='`$quiesce-traffic-input.common-header.api-ver`'/>
+ <parameter name='lcm-dmaap.originator-id' value='`$quiesce-traffic-input.common-header.originator-id`'/>
+ <parameter name='lcm-dmaap.request-id' value='`$quiesce-traffic-input.common-header.request-id`'/>
+ <parameter name='lcm-dmaap.sub-request-id' value='`$quiesce-traffic-input.common-header.sub-request-id`'/>
+ <parameter name='lcm-dmaap.flags.mode' value='`$quiesce-traffic-input.common-header.flags.mode`'/>
+ <parameter name='lcm-dmaap.flags.force' value='`$quiesce-traffic-input.common-header.flags.force`'/>
+ <parameter name='lcm-dmaap.flags.ttl' value='`$quiesce-traffic-input.common-header.flags.ttl`'/>
+ <parameter name='lcm-dmaap.status.code' value='`$org.onap.appc.adapter.ansible.result.code`' />
+ <parameter name='lcm-dmaap.status.message' value='`$org.onap.appc.adapter.ansible.message`'/>
+ </set>
+ <execute plugin='org.onap.ccsdk.sli.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='status.code' value='401' />
+ <parameter name='status.message' value='`$org.onap.appc.adapter.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="`$quiesce-traffic-input.common-header.request-id + '-' + $quiesce-traffic-input.common-header.sub-request-id`"/>
+ <parameter name='lcm-dmaap.partition' value='`$prop.lcm.dmaap.partition`'/>
+ <parameter name='lcm-dmaap.rpc-name' value='quiesce-traffic'/>
+ <parameter name='lcm-dmaap.type' value='`$prop.lcm.dmaap.type`'/>
+ <parameter name='lcm-dmaap.timestamp' value='`$quiesce-traffic-input.common-header.timestamp`'/>
+ <parameter name='lcm-dmaap.api-ver' value='`$quiesce-traffic-input.common-header.api-ver`'/>
+ <parameter name='lcm-dmaap.originator-id' value='`$quiesce-traffic-input.common-header.originator-id`'/>
+ <parameter name='lcm-dmaap.request-id' value='`$quiesce-traffic-input.common-header.request-id`'/>
+ <parameter name='lcm-dmaap.sub-request-id' value='`$quiesce-traffic-input.common-header.sub-request-id`'/>
+ <parameter name='lcm-dmaap.flags.mode' value='`$quiesce-traffic-input.common-header.flags.mode`'/>
+ <parameter name='lcm-dmaap.flags.force' value='`$quiesce-traffic-input.common-header.flags.force`'/>
+ <parameter name='lcm-dmaap.flags.ttl' value='`$quiesce-traffic-input.common-header.flags.ttl`'/>
+ <parameter name='lcm-dmaap.status.code' value='`$org.onap.appc.adapter.ansible.result.code`' />
+ <parameter name='lcm-dmaap.status.message' value='`$org.onap.appc.adapter.ansible.message`'/>
+ </set>
+ <execute plugin='org.onap.ccsdk.sli.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='status.code' value='401' />
+ <parameter name='status.message' value='`$org.onap.appc.adapter.ansible.message`' />
+ </return>
+ </block>
+ </outcome>
+ <outcome value='Other'>
+ <switch test="`$org.onap.appc.adapter.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="`$quiesce-traffic-input.common-header.request-id + '-' + $quiesce-traffic-input.common-header.sub-request-id`"/>
+ <parameter name='lcm-dmaap.partition' value='`$prop.lcm.dmaap.partition`'/>
+ <parameter name='lcm-dmaap.rpc-name' value='quiesce-traffic'/>
+ <parameter name='lcm-dmaap.type' value='`$prop.lcm.dmaap.type`'/>
+ <parameter name='lcm-dmaap.timestamp' value='`$quiesce-traffic-input.common-header.timestamp`'/>
+ <parameter name='lcm-dmaap.api-ver' value='`$quiesce-traffic-input.common-header.api-ver`'/>
+ <parameter name='lcm-dmaap.originator-id' value='`$quiesce-traffic-input.common-header.originator-id`'/>
+ <parameter name='lcm-dmaap.request-id' value='`$quiesce-traffic-input.common-header.request-id`'/>
+ <parameter name='lcm-dmaap.sub-request-id' value='`$quiesce-traffic-input.common-header.sub-request-id`'/>
+ <parameter name='lcm-dmaap.flags.mode' value='`$quiesce-traffic-input.common-header.flags.mode`'/>
+ <parameter name='lcm-dmaap.flags.force' value='`$quiesce-traffic-input.common-header.flags.force`'/>
+ <parameter name='lcm-dmaap.flags.ttl' value='`$quiesce-traffic-input.common-header.flags.ttl`'/>
+ <parameter name='lcm-dmaap.status.code' value='`$org.onap.appc.adapter.ansible.result.code`' />
+ <parameter name='lcm-dmaap.status.message' value='`$org.onap.appc.adapter.ansible.message`'/>
+ </set>
+ <execute plugin='org.onap.ccsdk.sli.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='status.code' value='401' />
+ <parameter name='status.message' value='`$org.onap.appc.adapter.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="`$quiesce-traffic-input.common-header.request-id + '-' + $quiesce-traffic-input.common-header.sub-request-id`"/>
+ <parameter name='lcm-dmaap.partition' value='`$prop.lcm.dmaap.partition`'/>
+ <parameter name='lcm-dmaap.rpc-name' value='quiesce-traffic'/>
+ <parameter name='lcm-dmaap.type' value='`$prop.lcm.dmaap.type`'/>
+ <parameter name='lcm-dmaap.timestamp' value='`$quiesce-traffic-input.common-header.timestamp`'/>
+ <parameter name='lcm-dmaap.api-ver' value='`$quiesce-traffic-input.common-header.api-ver`'/>
+ <parameter name='lcm-dmaap.originator-id' value='`$quiesce-traffic-input.common-header.originator-id`'/>
+ <parameter name='lcm-dmaap.request-id' value='`$quiesce-traffic-input.common-header.request-id`'/>
+ <parameter name='lcm-dmaap.sub-request-id' value='`$quiesce-traffic-input.common-header.sub-request-id`'/>
+ <parameter name='lcm-dmaap.flags.mode' value='`$quiesce-traffic-input.common-header.flags.mode`'/>
+ <parameter name='lcm-dmaap.flags.force' value='`$quiesce-traffic-input.common-header.flags.force`'/>
+ <parameter name='lcm-dmaap.flags.ttl' value='`$quiesce-traffic-input.common-header.flags.ttl`'/>
+ <parameter name='lcm-dmaap.status.code' value='`$org.onap.appc.adapter.ansible.result.code`' />
+ <parameter name='lcm-dmaap.status.message' value='`$org.onap.appc.adapter.ansible.message`'/>
+ </set>
+ <execute plugin='org.onap.ccsdk.sli.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='status.code' value='401' />
+ <parameter name='status.message' value='`$org.onap.appc.adapter.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='`$org.onap.appc.adapter.ansible.Id`'/>
+ <parameter name='PlaybookName' value='`$prop.lcm.quiesce-traffic.playbookname`'/>
+ <outcome value='failure'>
+ <block>
+ <set>
+ <parameter name='lcm-dmaap.version' value='`$prop.lcm.dmaap.version`'/>
+ <parameter name='lcm-dmaap.correlation-id' value="`$quiesce-traffic-input.common-header.request-id + '-' + $quiesce-traffic-input.common-header.sub-request-id`"/>
+ <parameter name='lcm-dmaap.partition' value='`$prop.lcm.dmaap.partition`'/>
+ <parameter name='lcm-dmaap.rpc-name' value='quiesce-traffic'/>
+ <parameter name='lcm-dmaap.type' value='`$prop.lcm.dmaap.type`'/>
+ <parameter name='lcm-dmaap.timestamp' value='`$quiesce-traffic-input.common-header.timestamp`'/>
+ <parameter name='lcm-dmaap.api-ver' value='`$quiesce-traffic-input.common-header.api-ver`'/>
+ <parameter name='lcm-dmaap.originator-id' value='`$quiesce-traffic-input.common-header.originator-id`'/>
+ <parameter name='lcm-dmaap.request-id' value='`$quiesce-traffic-input.common-header.request-id`'/>
+ <parameter name='lcm-dmaap.sub-request-id' value='`$quiesce-traffic-input.common-header.sub-request-id`'/>
+ <parameter name='lcm-dmaap.flags.mode' value='`$quiesce-traffic-input.common-header.flags.mode`'/>
+ <parameter name='lcm-dmaap.flags.force' value='`$quiesce-traffic-input.common-header.flags.force`'/>
+ <parameter name='lcm-dmaap.flags.ttl' value='`$quiesce-traffic-input.common-header.flags.ttl`'/>
+ <parameter name='lcm-dmaap.status.code' value='`$org.onap.appc.adapter.ansible.result.code`' />
+ <parameter name='lcm-dmaap.status.message' value='`$org.onap.appc.adapter.ansible.message`'/>
+ </set>
+ <execute plugin='org.onap.ccsdk.sli.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='status.code' value='401' />
+ <parameter name='status.message' value='`$org.onap.appc.adapter.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="`$quiesce-traffic-input.common-header.request-id + '-' + $quiesce-traffic-input.common-header.sub-request-id`"/>
+ <parameter name='lcm-dmaap.partition' value='`$prop.lcm.dmaap.partition`'/>
+ <parameter name='lcm-dmaap.rpc-name' value='quiesce-traffic'/>
+ <parameter name='lcm-dmaap.type' value='`$prop.lcm.dmaap.type`'/>
+ <parameter name='lcm-dmaap.timestamp' value='`$quiesce-traffic-input.common-header.timestamp`'/>
+ <parameter name='lcm-dmaap.api-ver' value='`$quiesce-traffic-input.common-header.api-ver`'/>
+ <parameter name='lcm-dmaap.originator-id' value='`$quiesce-traffic-input.common-header.originator-id`'/>
+ <parameter name='lcm-dmaap.request-id' value='`$quiesce-traffic-input.common-header.request-id`'/>
+ <parameter name='lcm-dmaap.sub-request-id' value='`$quiesce-traffic-input.common-header.sub-request-id`'/>
+ <parameter name='lcm-dmaap.flags.mode' value='`$quiesce-traffic-input.common-header.flags.mode`'/>
+ <parameter name='lcm-dmaap.flags.force' value='`$quiesce-traffic-input.common-header.flags.force`'/>
+ <parameter name='lcm-dmaap.flags.ttl' value='`$quiesce-traffic-input.common-header.flags.ttl`'/>
+ <parameter name='lcm-dmaap.status.code' value='`$org.onap.appc.adapter.ansible.result.code`' />
+ <parameter name='lcm-dmaap.status.message' value='`$org.onap.appc.adapter.ansible.message`'/>
+ </set>
+ <execute plugin='org.onap.ccsdk.sli.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.appc.adapter.ansible.result.code`' />
+ <parameter name='status.message' value='`$org.onap.appc.adapter.ansible.message`'/>
+ </return>
+ </block>
+ </outcome>
+ </execute>
+ </outcome>
+ </switch>
+ </outcome>
</execute>
- <return status='success'>
- <parameter name='status.code' value='400' />
- <parameter name='status.message' value='SDNC Quiesce-Traffic Mock returns success'/>
- </return>
</block>
</method>
-</service-logic>
+</service-logic> \ No newline at end of file
diff --git a/platform-logic/lcm/src/main/xml/LCM_resume-traffic.xml b/platform-logic/lcm/src/main/xml/LCM_resume-traffic.xml
index 6862d598..54d35bde 100644
--- a/platform-logic/lcm/src/main/xml/LCM_resume-traffic.xml
+++ b/platform-logic/lcm/src/main/xml/LCM_resume-traffic.xml
@@ -10,44 +10,303 @@
<set>
<parameter name='status.code' value='200' />
<parameter name='status.message' value='unexpected return from DG' />
+ <parameter name='nodelist' value="`$prop.ansible.nodelist`"/>
</set>
- <set>
- <parameter name='lcm-dmaap.version' value='`$prop.lcm.dmaap.version`'/>
- <parameter name='lcm-dmaap.correlation-id' value="`$resume-traffic-input.common-header.request-id + '-' + $resume-traffic-input.common-header.sub-request-id`"/>
- <parameter name='lcm-dmaap.partition' value='`$prop.lcm.dmaap.partition`'/>
- <parameter name='lcm-dmaap.rpc-name' value='resume-traffic'/>
- <parameter name='lcm-dmaap.type' value='`$prop.lcm.dmaap.type`'/>
- <parameter name='lcm-dmaap.timestamp' value='`$resume-traffic-input.common-header.timestamp`'/>
- <parameter name='lcm-dmaap.api-ver' value='`$resume-traffic-input.common-header.api-ver`'/>
- <parameter name='lcm-dmaap.originator-id' value='`$resume-traffic-input.common-header.originator-id`'/>
- <parameter name='lcm-dmaap.request-id' value='`$resume-traffic-input.common-header.originator-id`'/>
- <parameter name='lcm-dmaap.sub-request-id' value='`$resume-traffic-input.common-header.sub-request-id`'/>
- <parameter name='lcm-dmaap.flags.mode' value='`$resume-traffic-input.common-header.flags.mode`'/>
- <parameter name='lcm-dmaap.flags.force' value='`$resume-traffic-input.common-header.flags.force`'/>
- <parameter name='lcm-dmaap.flags.ttl' value='`$resume-traffic-input.common-header.flags.ttl`'/>
- <parameter name='lcm-dmaap.status.code' value='400' />
- <parameter name='lcm-dmaap.status.message' value='SDNC resume-traffic Mock returns success'/>
- </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'>
+ <get-resource plugin="org.onap.ccsdk.sli.adaptors.aai.AAIService"
+ resource="generic-vnf"
+ key="generic-vnf.vnf-id = $resume-traffic-input.action-identifiers.vnf-id"
+ local-only="false"
+ pfx='aai.generic-vnf'>
+ <outcome value='success'>
+ <set>
+ <parameter name='quote' value="'" />
+ <parameter name='nodelist' value="`'[' + $quote + $aai.ipv4-oam-address + $quote + ']'`"/>
+ </set>
+ </outcome>
+ <outcome value='Other'>
<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'/>
+ <parameter name="field1" value='VNF not found in AAI. Nodelist retrieved from config'/>
</record>
</outcome>
+ </get-resource>
+ <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='`$resume-traffic-input.payload`'/>
+ <parameter name='NodeList' value="`$nodelist`"/>
+ <parameter name='Timeout' value='`$prop.ansible.timeout`'/>
+ <parameter name='Version' value='`$prop.ansible.version`'/>
+ <parameter name='Id' value='`$resume-traffic-input.common-header.request-id`'/>
+ <parameter name='PlaybookName' value='`$prop.lcm.resume-traffic.playbookname`'/>
+ <outcome value='not-found'>
+ <block>
+ <set>
+ <parameter name='org.onap.appc.adapter.ansible.result.code' value='401'/>
+ <parameter name='org.onap.appc.adapter.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="`$resume-traffic-input.common-header.request-id + '-' + $resume-traffic-input.common-header.sub-request-id`"/>
+ <parameter name='lcm-dmaap.partition' value='`$prop.lcm.dmaap.partition`'/>
+ <parameter name='lcm-dmaap.rpc-name' value='resume-traffic'/>
+ <parameter name='lcm-dmaap.type' value='`$prop.lcm.dmaap.type`'/>
+ <parameter name='lcm-dmaap.timestamp' value='`$resume-traffic-input.common-header.timestamp`'/>
+ <parameter name='lcm-dmaap.api-ver' value='`$resume-traffic-input.common-header.api-ver`'/>
+ <parameter name='lcm-dmaap.originator-id' value='`$resume-traffic-input.common-header.originator-id`'/>
+ <parameter name='lcm-dmaap.request-id' value='`$resume-traffic-input.common-header.request-id`'/>
+ <parameter name='lcm-dmaap.sub-request-id' value='`$resume-traffic-input.common-header.sub-request-id`'/>
+ <parameter name='lcm-dmaap.flags.mode' value='`$resume-traffic-input.common-header.flags.mode`'/>
+ <parameter name='lcm-dmaap.flags.force' value='`$resume-traffic-input.common-header.flags.force`'/>
+ <parameter name='lcm-dmaap.flags.ttl' value='`$resume-traffic-input.common-header.flags.ttl`'/>
+ <parameter name='lcm-dmaap.status.code' value='`$org.onap.appc.adapter.ansible.result.code`' />
+ <parameter name='lcm-dmaap.status.message' value='`$org.onap.appc.adapter.ansible.message`'/>
+ </set>
+ <execute plugin='org.onap.ccsdk.sli.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='status.code' value='401' />
+ <parameter name='status.message' value='`$org.onap.appc.adapter.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="`$resume-traffic-input.common-header.request-id + '-' + $resume-traffic-input.common-header.sub-request-id`"/>
+ <parameter name='lcm-dmaap.partition' value='`$prop.lcm.dmaap.partition`'/>
+ <parameter name='lcm-dmaap.rpc-name' value='resume-traffic'/>
+ <parameter name='lcm-dmaap.type' value='`$prop.lcm.dmaap.type`'/>
+ <parameter name='lcm-dmaap.timestamp' value='`$resume-traffic-input.common-header.timestamp`'/>
+ <parameter name='lcm-dmaap.api-ver' value='`$resume-traffic-input.common-header.api-ver`'/>
+ <parameter name='lcm-dmaap.originator-id' value='`$resume-traffic-input.common-header.originator-id`'/>
+ <parameter name='lcm-dmaap.request-id' value='`$resume-traffic-input.common-header.request-id`'/>
+ <parameter name='lcm-dmaap.sub-request-id' value='`$resume-traffic-input.common-header.sub-request-id`'/>
+ <parameter name='lcm-dmaap.flags.mode' value='`$resume-traffic-input.common-header.flags.mode`'/>
+ <parameter name='lcm-dmaap.flags.force' value='`$resume-traffic-input.common-header.flags.force`'/>
+ <parameter name='lcm-dmaap.flags.ttl' value='`$resume-traffic-input.common-header.flags.ttl`'/>
+ <parameter name='lcm-dmaap.status.code' value='`$org.onap.appc.adapter.ansible.result.code`' />
+ <parameter name='lcm-dmaap.status.message' value='`$org.onap.appc.adapter.ansible.message`'/>
+ </set>
+ <execute plugin='org.onap.ccsdk.sli.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='status.code' value='401' />
+ <parameter name='status.message' value='`$org.onap.appc.adapter.ansible.message`' />
+ </return>
+ </block>
+ </outcome>
+ <outcome value='Other'>
+ <switch test="`$org.onap.appc.adapter.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="`$resume-traffic-input.common-header.request-id + '-' + $resume-traffic-input.common-header.sub-request-id`"/>
+ <parameter name='lcm-dmaap.partition' value='`$prop.lcm.dmaap.partition`'/>
+ <parameter name='lcm-dmaap.rpc-name' value='resume-traffic'/>
+ <parameter name='lcm-dmaap.type' value='`$prop.lcm.dmaap.type`'/>
+ <parameter name='lcm-dmaap.timestamp' value='`$resume-traffic-input.common-header.timestamp`'/>
+ <parameter name='lcm-dmaap.api-ver' value='`$resume-traffic-input.common-header.api-ver`'/>
+ <parameter name='lcm-dmaap.originator-id' value='`$resume-traffic-input.common-header.originator-id`'/>
+ <parameter name='lcm-dmaap.request-id' value='`$resume-traffic-input.common-header.request-id`'/>
+ <parameter name='lcm-dmaap.sub-request-id' value='`$resume-traffic-input.common-header.sub-request-id`'/>
+ <parameter name='lcm-dmaap.flags.mode' value='`$resume-traffic-input.common-header.flags.mode`'/>
+ <parameter name='lcm-dmaap.flags.force' value='`$resume-traffic-input.common-header.flags.force`'/>
+ <parameter name='lcm-dmaap.flags.ttl' value='`$resume-traffic-input.common-header.flags.ttl`'/>
+ <parameter name='lcm-dmaap.status.code' value='`$org.onap.appc.adapter.ansible.result.code`' />
+ <parameter name='lcm-dmaap.status.message' value='`$org.onap.appc.adapter.ansible.message`'/>
+ </set>
+ <execute plugin='org.onap.ccsdk.sli.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='status.code' value='401' />
+ <parameter name='status.message' value='`$org.onap.appc.adapter.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="`$resume-traffic-input.common-header.request-id + '-' + $resume-traffic-input.common-header.sub-request-id`"/>
+ <parameter name='lcm-dmaap.partition' value='`$prop.lcm.dmaap.partition`'/>
+ <parameter name='lcm-dmaap.rpc-name' value='resume-traffic'/>
+ <parameter name='lcm-dmaap.type' value='`$prop.lcm.dmaap.type`'/>
+ <parameter name='lcm-dmaap.timestamp' value='`$resume-traffic-input.common-header.timestamp`'/>
+ <parameter name='lcm-dmaap.api-ver' value='`$resume-traffic-input.common-header.api-ver`'/>
+ <parameter name='lcm-dmaap.originator-id' value='`$resume-traffic-input.common-header.originator-id`'/>
+ <parameter name='lcm-dmaap.request-id' value='`$resume-traffic-input.common-header.request-id`'/>
+ <parameter name='lcm-dmaap.sub-request-id' value='`$resume-traffic-input.common-header.sub-request-id`'/>
+ <parameter name='lcm-dmaap.flags.mode' value='`$resume-traffic-input.common-header.flags.mode`'/>
+ <parameter name='lcm-dmaap.flags.force' value='`$resume-traffic-input.common-header.flags.force`'/>
+ <parameter name='lcm-dmaap.flags.ttl' value='`$resume-traffic-input.common-header.flags.ttl`'/>
+ <parameter name='lcm-dmaap.status.code' value='`$org.onap.appc.adapter.ansible.result.code`' />
+ <parameter name='lcm-dmaap.status.message' value='`$org.onap.appc.adapter.ansible.message`'/>
+ </set>
+ <execute plugin='org.onap.ccsdk.sli.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='status.code' value='401' />
+ <parameter name='status.message' value='`$org.onap.appc.adapter.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='`$org.onap.appc.adapter.ansible.Id`'/>
+ <parameter name='PlaybookName' value='`$prop.lcm.resume-traffic.playbookname`'/>
+ <outcome value='failure'>
+ <block>
+ <set>
+ <parameter name='lcm-dmaap.version' value='`$prop.lcm.dmaap.version`'/>
+ <parameter name='lcm-dmaap.correlation-id' value="`$resume-traffic-input.common-header.request-id + '-' + $resume-traffic-input.common-header.sub-request-id`"/>
+ <parameter name='lcm-dmaap.partition' value='`$prop.lcm.dmaap.partition`'/>
+ <parameter name='lcm-dmaap.rpc-name' value='resume-traffic'/>
+ <parameter name='lcm-dmaap.type' value='`$prop.lcm.dmaap.type`'/>
+ <parameter name='lcm-dmaap.timestamp' value='`$resume-traffic-input.common-header.timestamp`'/>
+ <parameter name='lcm-dmaap.api-ver' value='`$resume-traffic-input.common-header.api-ver`'/>
+ <parameter name='lcm-dmaap.originator-id' value='`$resume-traffic-input.common-header.originator-id`'/>
+ <parameter name='lcm-dmaap.request-id' value='`$resume-traffic-input.common-header.request-id`'/>
+ <parameter name='lcm-dmaap.sub-request-id' value='`$resume-traffic-input.common-header.sub-request-id`'/>
+ <parameter name='lcm-dmaap.flags.mode' value='`$resume-traffic-input.common-header.flags.mode`'/>
+ <parameter name='lcm-dmaap.flags.force' value='`$resume-traffic-input.common-header.flags.force`'/>
+ <parameter name='lcm-dmaap.flags.ttl' value='`$resume-traffic-input.common-header.flags.ttl`'/>
+ <parameter name='lcm-dmaap.status.code' value='`$org.onap.appc.adapter.ansible.result.code`' />
+ <parameter name='lcm-dmaap.status.message' value='`$org.onap.appc.adapter.ansible.message`'/>
+ </set>
+ <execute plugin='org.onap.ccsdk.sli.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='status.code' value='401' />
+ <parameter name='status.message' value='`$org.onap.appc.adapter.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="`$resume-traffic-input.common-header.request-id + '-' + $resume-traffic-input.common-header.sub-request-id`"/>
+ <parameter name='lcm-dmaap.partition' value='`$prop.lcm.dmaap.partition`'/>
+ <parameter name='lcm-dmaap.rpc-name' value='resume-traffic'/>
+ <parameter name='lcm-dmaap.type' value='`$prop.lcm.dmaap.type`'/>
+ <parameter name='lcm-dmaap.timestamp' value='`$resume-traffic-input.common-header.timestamp`'/>
+ <parameter name='lcm-dmaap.api-ver' value='`$resume-traffic-input.common-header.api-ver`'/>
+ <parameter name='lcm-dmaap.originator-id' value='`$resume-traffic-input.common-header.originator-id`'/>
+ <parameter name='lcm-dmaap.request-id' value='`$resume-traffic-input.common-header.request-id`'/>
+ <parameter name='lcm-dmaap.sub-request-id' value='`$resume-traffic-input.common-header.sub-request-id`'/>
+ <parameter name='lcm-dmaap.flags.mode' value='`$resume-traffic-input.common-header.flags.mode`'/>
+ <parameter name='lcm-dmaap.flags.force' value='`$resume-traffic-input.common-header.flags.force`'/>
+ <parameter name='lcm-dmaap.flags.ttl' value='`$resume-traffic-input.common-header.flags.ttl`'/>
+ <parameter name='lcm-dmaap.status.code' value='`$org.onap.appc.adapter.ansible.result.code`' />
+ <parameter name='lcm-dmaap.status.message' value='`$org.onap.appc.adapter.ansible.message`'/>
+ </set>
+ <execute plugin='org.onap.ccsdk.sli.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.appc.adapter.ansible.result.code`' />
+ <parameter name='status.message' value='`$org.onap.appc.adapter.ansible.message`'/>
+ </return>
+ </block>
+ </outcome>
+ </execute>
+ </outcome>
+ </switch>
+ </outcome>
</execute>
- <return status='success'>
- <parameter name='status.code' value='400' />
- <parameter name='status.message' value='SDNC resume-traffic Mock returns success'/>
- </return>
</block>
</method>
-</service-logic>
+</service-logic> \ No newline at end of file
diff --git a/platform-logic/lcm/src/main/xml/LCM_upgrade-post-check.xml b/platform-logic/lcm/src/main/xml/LCM_upgrade-post-check.xml
index 7ba3e461..50301a72 100644
--- a/platform-logic/lcm/src/main/xml/LCM_upgrade-post-check.xml
+++ b/platform-logic/lcm/src/main/xml/LCM_upgrade-post-check.xml
@@ -10,14 +10,33 @@
<set>
<parameter name='status.code' value='200' />
<parameter name='status.message' value='unexpected return from DG' />
+ <parameter name='nodelist' value="`$prop.ansible.nodelist`"/>
</set>
+ <get-resource plugin="org.onap.ccsdk.sli.adaptors.aai.AAIService"
+ resource="generic-vnf"
+ key="generic-vnf.vnf-id = $upgrade-post-check-input.action-identifiers.vnf-id"
+ local-only="false"
+ pfx='aai.generic-vnf'>
+ <outcome value='success'>
+ <set>
+ <parameter name='quote' value="'" />
+ <parameter name='nodelist' value="`'[' + $quote + $aai.ipv4-oam-address + $quote + ']'`"/>
+ </set>
+ </outcome>
+ <outcome value='Other'>
+ <record plugin="org.onap.ccsdk.sli.core.sli.recording.Slf4jRecorder">
+ <parameter name="logger" value="message-log"/>
+ <parameter name="field1" value='VNF not found in AAI. Nodelist retrieved from config'/>
+ </record>
+ </outcome>
+ </get-resource>
<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='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='NodeList' value="`$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`'/>
@@ -25,7 +44,7 @@
<outcome value='not-found'>
<block>
<set>
- <parameter name='$org.onap.appc.adapter.ansible.result.code' value='401'/>
+ <parameter name='org.onap.appc.adapter.ansible.result.code' value='401'/>
<parameter name='org.onap.appc.adapter.ansible.message' value='Ansible Adapter was not found'/>
</set>
<block>
@@ -290,4 +309,4 @@
</execute>
</block>
</method>
-</service-logic>
+</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
index b10eff76..c0947ca7 100644
--- a/platform-logic/lcm/src/main/xml/LCM_upgrade-pre-check.xml
+++ b/platform-logic/lcm/src/main/xml/LCM_upgrade-pre-check.xml
@@ -10,14 +10,33 @@
<set>
<parameter name='status.code' value='200' />
<parameter name='status.message' value='unexpected return from DG' />
+ <parameter name='nodelist' value="`$prop.ansible.nodelist`"/>
</set>
+ <get-resource plugin="org.onap.ccsdk.sli.adaptors.aai.AAIService"
+ resource="generic-vnf"
+ key="generic-vnf.vnf-id = $upgrade-pre-check-input.action-identifiers.vnf-id"
+ local-only="false"
+ pfx='aai.generic-vnf'>
+ <outcome value='success'>
+ <set>
+ <parameter name='quote' value="'" />
+ <parameter name='nodelist' value="`'[' + $quote + $aai.ipv4-oam-address + $quote + ']'`"/>
+ </set>
+ </outcome>
+ <outcome value='Other'>
+ <record plugin="org.onap.ccsdk.sli.core.sli.recording.Slf4jRecorder">
+ <parameter name="logger" value="message-log"/>
+ <parameter name="field1" value='VNF not found in AAI. Nodelist retrieved from config'/>
+ </record>
+ </outcome>
+ </get-resource>
<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='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='NodeList' value="`$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`'/>
@@ -290,4 +309,4 @@
</execute>
</block>
</method>
-</service-logic>
+</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
index e2c2cddd..252b438d 100644
--- a/platform-logic/lcm/src/main/xml/LCM_upgrade-software.xml
+++ b/platform-logic/lcm/src/main/xml/LCM_upgrade-software.xml
@@ -10,14 +10,33 @@
<set>
<parameter name='status.code' value='200' />
<parameter name='status.message' value='unexpected return from DG' />
+ <parameter name='nodelist' value="`$prop.ansible.nodelist`"/>
</set>
+ <get-resource plugin="org.onap.ccsdk.sli.adaptors.aai.AAIService"
+ resource="generic-vnf"
+ key="generic-vnf.vnf-id = $upgrade-software-input.action-identifiers.vnf-id"
+ local-only="false"
+ pfx='aai.generic-vnf'>
+ <outcome value='success'>
+ <set>
+ <parameter name='quote' value="'" />
+ <parameter name='nodelist' value="`'[' + $quote + $aai.ipv4-oam-address + $quote + ']'`"/>
+ </set>
+ </outcome>
+ <outcome value='Other'>
+ <record plugin="org.onap.ccsdk.sli.core.sli.recording.Slf4jRecorder">
+ <parameter name="logger" value="message-log"/>
+ <parameter name="field1" value='VNF not found in AAI. Nodelist retrieved from config'/>
+ </record>
+ </outcome>
+ </get-resource>
<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='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='NodeList' value="`$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`'/>
@@ -25,7 +44,7 @@
<outcome value='not-found'>
<block>
<set>
- <parameter name='$org.onap.appc.adapter.ansible.result.code' value='401'/>
+ <parameter name='org.onap.appc.adapter.ansible.result.code' value='401'/>
<parameter name='org.onap.appc.adapter.ansible.message' value='Ansible Adapter was not found'/>
</set>
<block>
@@ -290,4 +309,4 @@
</execute>
</block>
</method>
-</service-logic>
+</service-logic> \ No newline at end of file
diff --git a/platform-logic/restapi-templates/src/main/json/lcm-restconf-configscaleout.json b/platform-logic/restapi-templates/src/main/json/lcm-restconf-configscaleout.json
new file mode 100755
index 00000000..63285f96
--- /dev/null
+++ b/platform-logic/restapi-templates/src/main/json/lcm-restconf-configscaleout.json
@@ -0,0 +1,5 @@
+{
+ "vdns-instance": [
+ ${payloadJson.configuration-parameters}
+ ]
+}