When opening a service instance from the instantiation status page, the More Actions... 12/107712/1
authorAmichai Hemli <amichai.hemli@intl.att.com>
Thu, 14 May 2020 22:35:21 +0000 (01:35 +0300)
committerAmichai Hemli <amichai.hemli@intl.att.com>
Thu, 14 May 2020 22:35:21 +0000 (01:35 +0300)
Issue-ID: VID-829
Signed-off-by: Amichai Hemli <amichai.hemli@intl.att.com>
Change-Id: Ia28f2fd9d497e8f7b2f2b4644ec105e5283b2637

vid-app-common/src/main/webapp/app/vid/scripts/controller/InstantiationController.js
vid-app-common/src/main/webapp/app/vid/scripts/view-models/instantiate.htm
vid-webpack-master/cypress/integration/iFrames/viewEditUpgradeVfModule.e2e.ts

index f2301f5..4a3a5b3 100755 (executable)
-/*-\r
- * ============LICENSE_START=======================================================\r
- * VID\r
- * ================================================================================\r
- * Copyright (C) 2017 - 2019 AT&T Intellectual Property. All rights reserved.\r
- * Modifications Copyright (C) 2019 IBM.\r
- * ================================================================================\r
- * Licensed under the Apache License, Version 2.0 (the "License");\r
- * you may not use this file except in compliance with the License.\r
- * You may obtain a copy of the License at\r
- * \r
- *      http://www.apache.org/licenses/LICENSE-2.0\r
- * \r
- * Unless required by applicable law or agreed to in writing, software\r
- * distributed under the License is distributed on an "AS IS" BASIS,\r
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\r
- * See the License for the specific language governing permissions and\r
- * limitations under the License.\r
- * ============LICENSE_END=========================================================\r
- */\r
-\r
-/**\r
- * The Instantiation (or View/Edit) Controller controls the instantiation/removal of\r
- * deployable objects (Services, VNFs, VF-Modules, Networks, and Volume-Groups)\r
- */\r
-(function () {\r
-    "use strict";\r
-\r
-    appDS2.requires.push('ui.tree');\r
-\r
-    appDS2.controller("InstantiationController", function ($scope, $route, $location, $timeout, $uibModal, COMPONENT, VIDCONFIGURATION, FIELD, DataService, PropertyService, UtilityService, VnfService, $http, vidService, AaiService, PnfService, CrService, AsdcService, $q, featureFlags, _, CreationService, $window, DeleteResumeService) {\r
-        $scope.popup = new Object();\r
-        $scope.defaultBaseUrl = "";\r
-        $scope.responseTimeoutMsec = 60000;\r
-        $scope.properties = UtilityService.getProperties();\r
-        $scope.resumeStatus = COMPONENT.RESUME_STATUS;\r
-        //isPermitted - returned as string from url and converted into boolean\r
-        $scope.isPermitted = $location.search().isPermitted === "true";\r
-        $scope.STATUS_CONSTANTS = FIELD.STATUS;\r
-        $scope.pnfs = [];// PNF data init;\r
-        $scope.collectionResource = {};\r
-        $scope.collections = [];\r
-        $scope.networks = [];\r
-        $scope.isCR = false;\r
-        $scope.isVFC = false;\r
-        $scope.init = function () {\r
-            /*\r
-             * These 2 statements should be included in non-test code.\r
-             */\r
-            // takes a default value, retrieves the prop value from the file system and sets it\r
-            var msecs = PropertyService.retrieveMsoMaxPollingIntervalMsec();\r
-            PropertyService.setMsoMaxPollingIntervalMsec(msecs);\r
-\r
-            // takes a default value, retrieves the prop value from the file system and sets it\r
-            var polls = PropertyService.retrieveMsoMaxPolls();\r
-            PropertyService.setMsoMaxPolls(polls);\r
-        };\r
-\r
-\r
-        $scope.convertModel = function (asdcModel) {\r
-            if (!asdcModel) return undefined;\r
-            var convertedAsdcModel = UtilityService.convertModel(asdcModel);\r
-            return convertedAsdcModel;\r
-        };\r
-\r
-        $scope.prepareScopeWithModel = function () {\r
-            // skip if no model\r
-            if (!vidService.getModel()) return;\r
-\r
-            $scope.service = {\r
-                "model": vidService.getModel(),\r
-                "convertedModel": $scope.convertModel(vidService.getModel()),\r
-                "instance": vidService.getInstance()\r
-            };\r
-\r
-\r
-            $scope.isCR = !_.isEmpty($scope.service.model.collectionResources);\r
-            if ($scope.isCR)\r
-                prepareCr();\r
-            else\r
-                preparePnfs();\r
-        };\r
-\r
-        function preparePnfs() {\r
-            var serviceInstance = {\r
-                globalCustomerId: $location.search().subscriberId,\r
-                serviceType: $location.search().serviceType,\r
-                serviceInstanceId: $location.search().serviceInstanceId\r
-            };\r
-\r
-            _setPnf(serviceInstance).then(function (data) {\r
-                $scope.pnfs = data;\r
-            });\r
-        }\r
-\r
-\r
-        function prepareCr() {\r
-            var serviceInstance = {\r
-                globalCustomerId: $location.search().subscriberId,\r
-                serviceType: $location.search().serviceType,\r
-                serviceInstanceId: $location.search().serviceInstanceId\r
-            };\r
-\r
-            _setCr(serviceInstance).then(function (data) {\r
-                $scope.collectionResource = data;\r
-                $scope.collections.push($scope.collectionResource.collection);\r
-                $scope.networks.push($scope.collectionResource.networks[0]);\r
-            });\r
-        }\r
-\r
-        $scope.returnVfModules = function (vnfInstance) {\r
-\r
-            var svcModel = $scope.service.convertedModel;\r
-            //var vnfModelInvariantUuid = vnfInstance[FIELD.ID.MODEL_INVAR_ID];\r
-            var vnfModelVersionId = vnfInstance[FIELD.ID.MODEL_VERSION_ID]; // model uuid\r
-            var vnfModelCustomizationUuid = vnfInstance[FIELD.ID.MODEL_CUSTOMIZATION_ID];\r
-\r
-            var vnfModel = null;\r
-\r
-            if ((!($scope.isObjectEmpty(svcModel))) && (!($scope.isObjectEmpty(svcModel.vnfs)))) {\r
-                if ((svcModel.isNewFlow) && (vnfModelCustomizationUuid != null)) {\r
-                    vnfModel = svcModel.vnfs[vnfModelCustomizationUuid];\r
-                    if (vnfModel !== undefined) {\r
-                        if (!($scope.isObjectEmpty(vnfModel.vfModules))) {\r
-                            //console.log ("vnfModel.vfModules: "); console.log (JSON.stringify(vnfModel.vfModules, null, 4));\r
-                            return (vnfModel.vfModules);\r
-                        }\r
-                    }\r
-                }\r
-                else {\r
-                    // old flow\r
-                    if (vnfModelVersionId != null) {\r
-                        vnfModel = svcModel.vnfs[vnfModelVersionId];\r
-                        if (vnfModel !== undefined) {\r
-                            if (!($scope.isObjectEmpty(vnfModel.vfModules))) {\r
-                                //console.log ("vnfModel.vfModules: "); console.log (JSON.stringify(vnfModel.vfModules, null, 4));\r
-                                return (vnfModel.vfModules);\r
-                            }\r
-                        }\r
-                    }\r
-                }\r
-\r
-            }\r
-            return null;\r
-        };\r
-        $scope.hasVfModules = function (vnfInstance) {\r
-            if ($scope.returnVfModules(vnfInstance) != null) {\r
-                return true;\r
-            }\r
-            return false;\r
-        };\r
-        $scope.returnVolumeGroups = function (vnfInstance) {\r
-\r
-            var svcModel = $scope.service.convertedModel;\r
-\r
-            //var vnfModelInvariantUuid = vnfInstance[FIELD.ID.MODEL_INVAR_ID];\r
-            var vnfModelVersionId = vnfInstance[FIELD.ID.MODEL_VERSION_ID];\r
-            var vnfModelCustomizationUuid = vnfInstance[FIELD.ID.MODEL_CUSTOMIZATION_ID];\r
-\r
-            var vnfModel = null;\r
-\r
-            if ((!($scope.isObjectEmpty(svcModel))) && (!($scope.isObjectEmpty(svcModel.vnfs)))) {\r
-                if ((svcModel.isNewFlow) && (vnfModelCustomizationUuid != null)) {\r
-                    vnfModel = svcModel.vnfs[vnfModelCustomizationUuid];\r
-                    if (vnfModel !== undefined && !($scope.isObjectEmpty(vnfModel.volumeGroups))) {\r
-                            //console.log ("vnfModel.volumeGroups: "); console.log (JSON.stringify(vnfModel.volumeGroups, null, 4));\r
-                            return (vnfModel.volumeGroups);\r
-                        }\r
-                }\r
-                else {\r
-                    // old flow\r
-                    if (vnfModelVersionId != null) {\r
-                        vnfModel = svcModel.vnfs[vnfModelVersionId];\r
-                        if (!($scope.isObjectEmpty(vnfModel.volumeGroups))) {\r
-                            //console.log ("vnfModel.vfModules: "); console.log (JSON.stringify(vnfModel.volumeGroups, null, 4));\r
-                            return (vnfModel.volumeGroups);\r
-                        }\r
-                    }\r
-                }\r
-\r
-            }\r
-            return null;\r
-        };\r
-        $scope.hasVolumeGroups = function (vnfInstance) {\r
-            if ($scope.returnVolumeGroups(vnfInstance) != null) {\r
-                return true;\r
-            }\r
-            return false;\r
-        };\r
-        $scope.deleteNetwork = function (serviceObject, network) {\r
-\r
-            console.log("Removing Network " + network.name);\r
-\r
-            //Send delete network request to MSO\r
-\r
-            //var networks = this.service.instance.networks;\r
-\r
-            //networks.splice(networks.indexOf(network), 1);\r
-\r
-            //Retrieve updated data from A&AI\r
-            var serviceInstance = serviceObject.object;\r
-\r
-            setCurrentNetworkModelInfoFromScope(network);\r
-\r
-            DataService.setInventoryItem(network.object);\r
-\r
-            DataService.setSubscriberName(serviceObject[COMPONENT.SUBSCRIBER_NAME]);\r
-            DataService.setServiceType(serviceObject[COMPONENT.SERVICE_TYPE]);\r
-            DataService.setServiceInstanceId(serviceInstance[FIELD.ID.SERVICE_INSTANCE_ID]);\r
-\r
-            DataService.setGlobalCustomerId(serviceObject[FIELD.ID.GLOBAL_CUST_ID]);\r
-            DataService.setServiceInstanceName($scope.service.instance.name);\r
-            DataService.setServiceName($scope.service.model.service.name);\r
-            DataService.setServiceUuid($scope.service.model.service.uuid);\r
-            DataService.setNetworkInstanceId(network.object[FIELD.ID.NETWORK_ID]);\r
-\r
-            $scope.$broadcast(COMPONENT.DELETE_RESUME_COMPONENT, {\r
-                componentId: COMPONENT.NETWORK,\r
-                callbackFunction: deleteOrResumeCallback,\r
-                dialogMethod: COMPONENT.DELETE\r
-            });\r
-        };\r
-\r
-        $scope.allowTransferToNewScreenAndShowButton = function (){\r
-          if(featureFlags.isOn(COMPONENT.FEATURE_FLAGS.FLAG_FLASH_MORE_ACTIONS_BUTTON_IN_OLD_VIEW_EDIT)) {\r
-              return $scope.isPermitted;\r
-          }\r
-          return false;\r
-        };\r
-\r
-        $scope.navigateToNewEditViewScreen = function(){\r
-                window.location.href = 'serviceModels.htm#/servicePlanning/EDIT?' +\r
-                    'serviceModelId=' +     _.get($scope, 'service.model.service.uuid') +\r
-                    '&subscriberId=' +      $location.search().subscriberId  +\r
-                    '&serviceType=' +       $location.search().serviceType      +\r
-                    '&serviceInstanceId=' + $location.search().serviceInstanceId;\r
-        };\r
-\r
-        $scope.deleteService = function (serviceObject, serviceOrchestrationStatus) {\r
-\r
-            var serviceInstance = serviceObject.object;\r
-\r
-            console.log("Removing Service " + $scope.service.instance.name);\r
-\r
-            if ($scope.isMacro()) {\r
-                DataService.setALaCarte(false);\r
-            }\r
-            else {\r
-                DataService.setALaCarte(true);\r
-            }\r
-            DataService.setMacro($scope.isMacro());\r
-            DataService.setInventoryItem(serviceInstance);\r
-            setCurrentServiceModelInfoFromScope();\r
-\r
-\r
-            DataService.setSubscriberName(serviceObject[FIELD.ID.SUBSCRIBER_NAME]);\r
-            DataService.setServiceType(serviceObject[COMPONENT.SERVICE_TYPE]);\r
-            DataService.setServiceInstanceId(serviceInstance[FIELD.ID.SERVICE_INSTANCE_ID]);\r
-\r
-            DataService.setGlobalCustomerId(serviceObject[COMPONENT.GLOBAL_CUSTOMER_ID]);\r
-            DataService.setServiceInstanceName($scope.service.instance.name);\r
-\r
-            DataService.setServiceName($scope.service.model.service.name);\r
-\r
-            DataService.setServiceUuid($scope.service.model.service.uuid);\r
-\r
-            $scope.$broadcast(COMPONENT.DELETE_RESUME_COMPONENT, {\r
-                componentId: COMPONENT.SERVICE,\r
-                callbackFunction: deleteServiceInstanceCallbackFunction,\r
-                dialogMethod: COMPONENT.DELETE,\r
-                serviceStatus: serviceOrchestrationStatus\r
-            });\r
-\r
-        };\r
-\r
-        function populate_popup_vfModule(serviceObject, vfModule, vnf) {\r
-            var serviceInstance = serviceObject.object;\r
-\r
-            DataService.setInventoryItem(vfModule.object);\r
-\r
-            setCurrentVfModuleModelInfoFromScope(vnf, vfModule);\r
-            var vfModuleInstanceID = vfModule.object[FIELD.ID.VF_MODULE_ID];\r
-            if (vfModuleInstanceID == null) {\r
-                vfModuleInstanceID = "";\r
-            }\r
-\r
-            DataService.setVnfInstanceId(vnf.object[FIELD.ID.VNF_ID]);\r
-            DataService.setVfModuleInstanceId(vfModuleInstanceID);\r
-\r
-            DataService.setSubscriberName(serviceObject[COMPONENT.SUBSCRIBER_NAME]);\r
-            DataService.setServiceType(serviceObject[COMPONENT.SERVICE_TYPE]);\r
-            DataService.setServiceInstanceId(serviceInstance[FIELD.ID.SERVICE_INSTANCE_ID]);\r
-\r
-            DataService.setGlobalCustomerId(serviceObject[FIELD.ID.GLOBAL_CUST_ID]);\r
-            DataService.setServiceInstanceName($scope.service.instance.name);\r
-\r
-            DataService.setServiceName($scope.service.model.service.name);\r
-\r
-            DataService.setServiceUuid($scope.service.model.service.uuid);\r
-        }\r
-\r
-        var modalInstance;\r
-\r
-        var openMsoModal = function (msoType, requestParams, callbackFunction, configuration) {\r
-             modalInstance = $uibModal.open({\r
-                templateUrl: 'app/vid/scripts/modals/mso-commit/mso-commit.html',\r
-                controller: "msoCommitModalController",\r
-                backdrop: false,\r
-                resolve: {\r
-                    msoType: function () {\r
-                        return msoType;\r
-                    },\r
-                    requestParams: function () {\r
-                        requestParams.callbackFunction = callbackFunction;\r
-                        return requestParams;\r
-                    },\r
-                    configuration: function () {\r
-                        return configuration;\r
-                    }\r
-                }\r
-            });\r
-        };\r
-\r
-        var openVfModuleWithHomingDataModal = function(action, vfModule)  {\r
-            modalInstance = $uibModal.open({\r
-                controller: 'vfModuleActionModalController',\r
-                templateUrl: 'app/vid/scripts/modals/vf-module-homing-data-action/vf-module-homing-data-action.html',\r
-                backdrop: false,\r
-                resolve: {\r
-                    action: function () {\r
-                        return action;\r
-                    },\r
-                    vfModule: function() {\r
-                        return vfModule;\r
-                    }\r
-                }\r
-            });\r
-\r
-            modalInstance.result.then(function (data) {\r
-                if (data.msoType && data.requestParams) {\r
-                    openMsoModal(data.msoType, data.requestParams, deleteOrResumeCallback, null);\r
-                }\r
-            });\r
-        };\r
-\r
-        function getLcpCloudRegionTenantList() {\r
-            AaiService.getLcpCloudRegionTenantList(DataService\r
-                .getGlobalCustomerId(), DataService.getServiceType(), function(\r
-                response) {\r
-                $scope.lcpAndTenant = response;\r
-                $scope.isFeatureFlagCloudOwner = featureFlags.isOn(COMPONENT.FEATURE_FLAGS.FLAG_1810_CR_ADD_CLOUD_OWNER_TO_MSO_REQUEST);\r
-                $scope.lcpRegionList = _.uniqBy(response, 'cloudRegionId');\r
-            });\r
-        }\r
-\r
-        $scope.deleteVfModule = function (serviceObject, vfModule, vnf) {\r
-            $scope.isSoftDeleteEnabled = true;\r
-\r
-            populate_popup_vfModule(serviceObject, vfModule, vnf);\r
-\r
-            if (DataService.getLoggedInUserId())  {\r
-                openVfModuleWithHomingDataModal(COMPONENT.DELETE, vfModule);\r
-            }\r
-            else {\r
-                AaiService.getLoggedInUserID(function (response) {\r
-                    var userID = response.data;\r
-                    DataService.setLoggedInUserId(userID);\r
-                    openVfModuleWithHomingDataModal(COMPONENT.DELETE, vfModule);\r
-                });\r
-            }\r
-            console.log("Removing VF-Module", vfModule);\r
-        };\r
-\r
-        function setCurrentServiceModelInfoFromScope() {\r
-            DataService.setModelInfo(COMPONENT.SERVICE, {\r
-                "modelInvariantId": $scope.service.model.service.invariantUuid,\r
-                "modelVersion": $scope.service.model.service.version,\r
-                "modelNameVersionId": $scope.service.model.service.uuid,\r
-                "modelName": $scope.service.model.service.name,\r
-                "inputs": ""\r
-            });\r
-        };\r
-\r
-        function setCurrentVNFModelInfo(vnf) {\r
-            var svcModel = $scope.service.convertedModel;\r
-            var vnfModel;\r
-            var vnfModelCustomizationUuid = vnf.object[FIELD.ID.MODEL_CUSTOMIZATION_ID];\r
-            var vnfModelVersionId = vnf.object[FIELD.ID.MODEL_VERSION_ID];\r
-            if ((!($scope.isObjectEmpty(svcModel))) && (!($scope.isObjectEmpty(svcModel.vnfs)))) {\r
-                if ((svcModel.isNewFlow) && (vnfModelCustomizationUuid != null)) {\r
-                    vnfModel = svcModel.vnfs[vnfModelCustomizationUuid];\r
-                }\r
-                else {\r
-                    vnfModel = svcModel.vnfs[vnfModelVersionId];\r
-                }\r
-                if (!($scope.isObjectEmpty(vnfModel))) {\r
-\r
-                    DataService.setModelInfo(COMPONENT.VNF, {\r
-                        "modelInvariantId": vnfModel.invariantUuid,\r
-                        "modelVersion": vnfModel.version,\r
-                        "modelNameVersionId": vnfModel.uuid,\r
-                        "modelCustomizationName": vnfModel.modelCustomizationName,\r
-                        "customizationUuid": vnfModel.customizationUuid,\r
-                        "modelName": vnfModel.name,\r
-                        "inputs": ""\r
-                    });\r
-                }\r
-            }\r
-\r
-\r
-        }\r
-\r
-        function setCurrentNetworkModelInfoFromScope(network) {\r
-            var svcModel = $scope.service.convertedModel;\r
-            var netModel;\r
-            // set model default and override later if found\r
-            DataService.setModelInfo(COMPONENT.NETWORK, {});\r
-\r
-            if (network.object != null) {\r
-\r
-                //var netModelInvariantUuid = network.object[FIELD.ID.MODEL_INVAR_ID];\r
-                var netModelVersionId = network.object[FIELD.ID.MODEL_VERSION_ID]; // model uuid\r
-                var netModelCustomizationUuid = network.object[FIELD.ID.MODEL_CUSTOMIZATION_ID];\r
-\r
-                if (UtilityService.hasContents(netModelCustomizationUuid)) {\r
-                    // set it to what came from a&ai\r
-                    DataService.setResCustomizationUuid(netModelCustomizationUuid);\r
-                }\r
-\r
-                if ((!($scope.isObjectEmpty(svcModel))) && (!($scope.isObjectEmpty(svcModel.networks)))) {\r
-                    if ((svcModel.isNewFlow) && (UtilityService.hasContents(netModelCustomizationUuid))) {\r
-                        netModel = svcModel.networks[netModelCustomizationUuid];\r
-                    }\r
-                    else {\r
-\r
-                        if (UtilityService.hasContents(netModelVersionId)) {\r
-                            netModel = svcModel.networks[netModelVersionId];\r
-                        }\r
-\r
-                    }\r
-                }\r
-            }\r
-            if (!($scope.isObjectEmpty(netModel))) {\r
-                DataService.setModelInfo(COMPONENT.NETWORK, {\r
-                    "modelInvariantId": netModel.invariantUuid,\r
-                    "modelVersion": netModel.version,\r
-                    "modelNameVersionId": netModel.uuid,\r
-                    "modelCustomizationName": netModel.modelCustomizationName,\r
-                    "customizationUuid": netModel.customizationUuid,\r
-                    "modelName": netModel.name,\r
-                    "inputs": ""\r
-                });\r
-            }\r
-        }\r
-\r
-        function setCurrentVfModuleModelInfoFromScope(vnf, vfModule) {\r
-\r
-            var svcModel = $scope.service.convertedModel;\r
-\r
-            //var vnfModelInvariantUuid = vnf.object[FIELD.ID.MODEL_INVAR_ID];\r
-            var vnfModelVersionId = vnf.object[FIELD.ID.MODEL_VERSION_ID];\r
-            var vnfModelCustomizationUuid = vnf.object[FIELD.ID.MODEL_CUSTOMIZATION_ID];\r
-            var vnfModel = null;\r
-            var vfModuleModel = null;\r
-\r
-            DataService.setModelInfo(COMPONENT.VF_MODULE, {\r
-                "modelInvariantId": "",\r
-                "modelVersion": "",\r
-                "modelNameVersionId": "",\r
-                "modelCustomizationName": "",\r
-                "customizationUuid": "",\r
-                "modelName": "",\r
-                "inputs": ""\r
-            });\r
-\r
-            if ((!($scope.isObjectEmpty(svcModel))) && (!($scope.isObjectEmpty(svcModel.vnfs)))) {\r
-                if ((svcModel.isNewFlow) && (vnfModelCustomizationUuid != null)) {\r
-                    vnfModel = svcModel.vnfs[vnfModelCustomizationUuid];\r
-\r
-                    var vfModuleCustomizationUuid = vfModule.object[FIELD.ID.MODEL_CUSTOMIZATION_ID];\r
-                    if (!($scope.isObjectEmpty(vnfModel)) && !($scope.isObjectEmpty(vnfModel.vfModules)) && UtilityService.hasContents(vfModuleCustomizationUuid)) {\r
-\r
-                        vfModuleModel = vnfModel.vfModules[vfModuleCustomizationUuid];\r
-\r
-                    }\r
-                }\r
-                else {\r
-                    // old flow\r
-                    if (vnfModelVersionId != null) {\r
-                        vnfModel = svcModel.vnfs[vnfModelVersionId];\r
-                    }\r
-                    //var vfModuleInvariantUuid = vfModule.object[FIELD.ID.MODEL_INVAR_ID];\r
-                    var vfModuleModelVersionId = vfModule.object[FIELD.ID.MODEL_VERSION_ID];\r
-                    if ((!($scope.isObjectEmpty(vnfModel))) && (!($scope.isObjectEmpty(vnfModel.vfModules))) &&\r
-                        UtilityService.hasContents(vfModuleModelVersionId)) {\r
-                        vfModuleModel = vnfModel.vfModules[vfModuleModelVersionId];\r
-                    }\r
-                }\r
-                if (!($scope.isObjectEmpty(vfModuleModel))) {\r
-                    DataService.setModelInfo(COMPONENT.VF_MODULE, {\r
-                        "modelInvariantId": vfModuleModel.invariantUuid,\r
-                        "modelVersion": vfModuleModel.version,\r
-                        "modelNameVersionId": vfModuleModel.uuid,\r
-                        "modelCustomizationName": vfModuleModel.modelCustomizationName,\r
-                        "customizationUuid": vfModuleModel.customizationUuid,\r
-                        "modelName": vfModuleModel.name,\r
-                        "inputs": ""\r
-                    });\r
-                }\r
-            }\r
-        }\r
-\r
-        function setCurrentVolumeGroupModelInfoFromScope(vnf, vfModule) {\r
-            var svcModel = $scope.service.convertedModel;\r
-\r
-            var vnfModelCustomizationUuid = null;\r
-            var vnfModel = null;\r
-            var vnfModelVersionId = null;\r
-\r
-            vnfModelVersionId = vnf.object[FIELD.ID.MODEL_VERSION_ID];\r
-            vnfModelCustomizationUuid = vnf.object[FIELD.ID.MODEL_CUSTOMIZATION_ID];\r
-\r
-            DataService.setModelInfo(COMPONENT.VOLUME_GROUP, {\r
-                "modelInvariantId": "",\r
-                "modelVersion": "",\r
-                "modelNameVersionId": "",\r
-                "modelCustomizationName": "",\r
-                "customizationUuid": "",\r
-                "modelName": "",\r
-                "inputs": ""\r
-            });\r
-\r
-            if ((!($scope.isObjectEmpty(svcModel))) && (!($scope.isObjectEmpty(svcModel.vnfs)))) {\r
-                if ((svcModel.isNewFlow) && (vnfModelCustomizationUuid != null)) {\r
-                    vnfModel = svcModel.vnfs[vnfModelCustomizationUuid];\r
-                }\r
-                else {\r
-                    vnfModel = svcModel.vnfs[vnfModelVersionId];\r
-                }\r
-            }\r
-\r
-\r
-            // volume groups don't have model-invariant-id/version in a&ai.\r
-            // Their model-invariant-id/version is the one for the associated vfModule\r
-\r
-            var vfModuleModelVersionId = vfModule.object[FIELD.ID.MODEL_VERSION_ID];\r
-            var vfModuleCustomizationUuid = vfModule.object[FIELD.ID.MODEL_CUSTOMIZATION_ID];\r
-            var volGroupModel = null;\r
-\r
-            if (!($scope.isObjectEmpty(vnfModel)) && !($scope.isObjectEmpty(vnfModel.volumeGroups))) {\r
-                if ((svcModel.isNewFlow) && (UtilityService.hasContents(vfModuleCustomizationUuid))) {\r
-                    volGroupModel = vnfModel.volumeGroups[vfModuleCustomizationUuid];\r
-                }\r
-                else {\r
-                    volGroupModel = vnfModel.volumeGroups[vfModuleModelVersionId];\r
-                }\r
-                if (!($scope.isObjectEmpty(volGroupModel))) {\r
-                    DataService.setModelInfo(COMPONENT.VOLUME_GROUP, {\r
-                        "modelInvariantId": volGroupModel.invariantUuid,\r
-                        "modelVersion": volGroupModel.version,\r
-                        "modelNameVersionId": volGroupModel.uuid,\r
-                        "modelCustomizationName": volGroupModel.modelCustomizationName,\r
-                        "customizationUuid": volGroupModel.customizationUuid,\r
-                        "modelName": volGroupModel.name,\r
-                        "inputs": ""\r
-                    });\r
-\r
-                }\r
-            }\r
-        }\r
-\r
-        function setCurrentVolumeGroupModelInfoByVfModuleFromScope(vnf, volumeGroup) {\r
-            var svcModel = $scope.service.convertedModel;\r
-\r
-            var vnfModelCustomizationUuid = null;\r
-            var vnfModel = null;\r
-            var vnfModelVersionId = null;\r
-\r
-            vnfModelVersionId = vnf.object[FIELD.ID.MODEL_VERSION_ID];\r
-            vnfModelCustomizationUuid = vnf.object[FIELD.ID.MODEL_CUSTOMIZATION_ID];\r
-\r
-            DataService.setModelInfo(COMPONENT.VOLUME_GROUP, {\r
-                "modelInvariantId": "",\r
-                "modelVersion": "",\r
-                "modelNameVersionId": "",\r
-                "modelCustomizationName": "",\r
-                "customizationUuid": "",\r
-                "modelName": "",\r
-                "inputs": ""\r
-            });\r
-\r
-            if ((!($scope.isObjectEmpty(svcModel))) && (!($scope.isObjectEmpty(svcModel.vnfs)))) {\r
-                if ((svcModel.isNewFlow) && (vnfModelCustomizationUuid != null)) {\r
-                    vnfModel = svcModel.vnfs[vnfModelCustomizationUuid];\r
-                }\r
-                else {\r
-                    vnfModel = svcModel.vnfs[vnfModelVersionId];\r
-                }\r
-            }\r
-\r
-\r
-            // volume groups don't have model-invariant-id/version in a&ai.\r
-            // Their model-invariant-id/version is the one for the associated vfModule\r
-\r
-            var vfModuleModelVersionId = volumeGroup.object[FIELD.ID.VF_MODULE_MODEL_VERSION_ID];\r
-            var vfModuleCustomizationUuid = volumeGroup.object[FIELD.ID.VF_MODULE_MODEL_CUSTOMIZATION_ID];\r
-            var volGroupModel = null;\r
-            if ((!($scope.isObjectEmpty(vnfModel))) && (!($scope.isObjectEmpty(vnfModel.volumeGroups)))) {\r
-                if ((svcModel.isNewFlow) && (UtilityService.hasContents(vfModuleCustomizationUuid))) {\r
-                    volGroupModel = vnfModel.volumeGroups[vfModuleCustomizationUuid];\r
-                }\r
-                else {\r
-                    volGroupModel = vnfModel.volumeGroups[vfModuleModelVersionId];\r
-                }\r
-                if (!($scope.isObjectEmpty(volGroupModel))) {\r
-                    DataService.setModelInfo(COMPONENT.VOLUME_GROUP, {\r
-                        "modelInvariantId": volGroupModel.invariantUuid,\r
-                        "modelVersion": volGroupModel.version,\r
-                        "modelNameVersionId": volGroupModel.uuid,\r
-                        "modelCustomizationName": volGroupModel.modelCustomizationName,\r
-                        "customizationUuid": volGroupModel.customizationUuid,\r
-                        "modelName": volGroupModel.name,\r
-                        "inputs": ""\r
-                    });\r
-\r
-                }\r
-            }\r
-        }\r
-\r
-        $scope.deleteVnf = function (serviceObject, vnf) {\r
-            console.log("Removing VNF " + vnf.name);\r
-\r
-            var serviceInstance = serviceObject.object;\r
-            var svcModel = $scope.service.convertedModel;\r
-            DataService.setInventoryItem(vnf.object);\r
-\r
-            /*var vnftype = vnf.object['vnf-type'];\r
-            if (vnftype == null)\r
-                vnftype = "";\r
-            else\r
-            {\r
-                var n = vnftype.search("/");\r
-                if (n >= 0)\r
-                    vnftype = vnftype.substring(n+1);\r
-            }*/\r
-\r
-            var svcModel = $scope.service.convertedModel;\r
-            var vnfModelInvariantUuid = null;\r
-            var vnfModelVersion = null;\r
-            var vnfModelCustomizationUuid = null;\r
-            var vnfModel = null;\r
-            var vnfModelVersionId = null;\r
-\r
-            vnfModelInvariantUuid = vnf.object[FIELD.ID.MODEL_INVAR_ID];\r
-            vnfModelVersionId = vnf.object[FIELD.ID.MODEL_VERSION_ID];\r
-            vnfModelCustomizationUuid = vnf.object[FIELD.ID.MODEL_CUSTOMIZATION_ID];\r
-\r
-            DataService.setModelInfo(COMPONENT.VNF, {\r
-                "modelInvariantId": vnfModelInvariantUuid,\r
-                "modelVersion": "",\r
-                "modelNameVersionId": vnfModelVersionId,\r
-                "modelCustomizationName": "",\r
-                "customizationUuid": vnfModelCustomizationUuid,\r
-                "modelName": "",\r
-                "inputs": ""\r
-            });\r
-\r
-            if ((!($scope.isObjectEmpty(svcModel))) && (!($scope.isObjectEmpty(svcModel.vnfs)))) {\r
-                if ((svcModel.isNewFlow) && (vnfModelCustomizationUuid != null)) {\r
-                    vnfModel = svcModel.vnfs[vnfModelCustomizationUuid];\r
-                }\r
-                else {\r
-                    vnfModel = svcModel.vnfs[vnfModelVersionId];\r
-                }\r
-                //console.log ( "vnf models: "); console.log ( JSON.stringify ($scope.service.convertedModel.vnfs, null, 4) );\r
-                if (!($scope.isObjectEmpty(vnfModel))) {\r
-\r
-                    DataService.setModelInfo(COMPONENT.VNF, {\r
-                        "modelInvariantId": vnfModel.invariantUuid,\r
-                        "modelVersion": vnfModel.version,\r
-                        "modelNameVersionId": vnfModel.uuid,\r
-                        "modelCustomizationName": vnfModel.modelCustomizationName,\r
-                        "customizationUuid": vnfModel.customizationUuid,\r
-                        "modelName": vnfModel.name,\r
-                        "inputs": ""\r
-                    });\r
-                }\r
-            }\r
-\r
-            DataService.setVnfInstanceId(vnf.object[FIELD.ID.VNF_ID]);\r
-\r
-            DataService.setSubscriberName(serviceObject[COMPONENT.SUBSCRIBER_NAME]);\r
-            DataService.setServiceType(serviceObject[COMPONENT.SERVICE_TYPE]);\r
-            DataService.setServiceInstanceId(serviceInstance[FIELD.ID.SERVICE_INSTANCE_ID]);\r
-\r
-            DataService.setGlobalCustomerId(serviceObject[FIELD.ID.GLOBAL_CUST_ID]);\r
-            DataService.setServiceInstanceName($scope.service.instance.name);\r
-\r
-            DataService.setServiceName($scope.service.model.service.name);\r
-\r
-            DataService.setServiceUuid($scope.service.model.service.uuid);\r
-\r
-            $scope.$broadcast(COMPONENT.DELETE_RESUME_COMPONENT, {\r
-                componentId: COMPONENT.VNF,\r
-                callbackFunction: deleteOrResumeCallback,\r
-                dialogMethod: COMPONENT.DELETE\r
-            });\r
-\r
-        };\r
-\r
-        $scope.deleteVolumeGroup = function (serviceObject, vnf, vfModule, volumeGroup) {\r
-\r
-            console.log("Removing Volume Group " + volumeGroup.name);\r
-            var haveModel = false;\r
-\r
-            var serviceInstance = serviceObject.object;\r
-\r
-            setCurrentVolumeGroupModelInfoFromScope(vnf, vfModule);\r
-\r
-            DataService.setInventoryItem(volumeGroup.object);\r
-\r
-            DataService.setSubscriberName(serviceObject[COMPONENT.SUBSCRIBER_NAME]);\r
-            DataService.setServiceType(serviceObject[COMPONENT.SERVICE_TYPE]);\r
-            DataService.setServiceInstanceId(serviceInstance[FIELD.ID.SERVICE_INSTANCE_ID]);\r
-\r
-            DataService.setGlobalCustomerId(serviceObject[FIELD.ID.GLOBAL_CUST_ID]);\r
-            DataService.setServiceInstanceName($scope.service.instance.name);\r
-\r
-            DataService.setServiceName($scope.service.model.service.name);\r
-\r
-            DataService.setServiceUuid($scope.service.model.service.uuid);\r
-            DataService.setVnfInstanceId(vnf.nodeId);\r
-            DataService.setVolumeGroupInstanceId(volumeGroup.nodeId);\r
-\r
-            $scope.$broadcast(COMPONENT.DELETE_RESUME_COMPONENT, {\r
-                componentId: COMPONENT.VOLUME_GROUP,\r
-                dialogMethod: COMPONENT.DELETE\r
-            });\r
-        };\r
-\r
-        $scope.deleteVnfVolumeGroup = function (serviceObject, vnf, volumeGroup) {\r
-\r
-            console.log("Removing Volume Group " + volumeGroup.name);\r
-            var serviceInstance = serviceObject.object;\r
-\r
-            DataService.setInventoryItem(volumeGroup.object);\r
-\r
-            var svcModel = $scope.service.convertedModel;\r
-\r
-            var vnfModelInvariantUuid = vnf.object[FIELD.ID.MODEL_INVAR_ID];\r
-            var vnfModelVersionId = vnf.object[FIELD.ID.MODEL_VERSION_ID];\r
-            var vnfModelCustomizationUuid = vnf.object[FIELD.ID.MODEL_CUSTOMIZATION_ID];\r
-\r
-            var volGroupModelInvariantUuid = volumeGroup.object[FIELD.ID.MODEL_INVAR_ID];\r
-            var volGroupModelVersionId = volumeGroup.object[FIELD.ID.MODEL_VERSION_ID];\r
-            var volGroupModelCustomizationUuid = volumeGroup.object[FIELD.ID.MODEL_CUSTOMIZATION_ID];\r
-\r
-            var vnfModel = null;\r
-            var volGroupModel = null;\r
-\r
-            // send an empty model by default since model is not required for deletes\r
-            DataService.setModelInfo(COMPONENT.VOLUME_GROUP, {});\r
-\r
-            if (svcModel.isNewFlow) {\r
-                vnfModel = svcModel.vnfs[vnfModelCustomizationUuid];\r
-                if (UtilityService.hasContents(volGroupModelCustomizationUuid)) {\r
-                    volGroupModel = vnfModel.volumeGroups[volGroupModelCustomizationUuid];\r
-                }\r
-            }\r
-            else {\r
-\r
-                vnfModel = svcModel.vnfs[vnfModelVersionId];\r
-                if (UtilityService.hasContents(volGroupModelVersionId)) {\r
-                    volGroupModel = vnfModel.volumeGroups[volGroupModelVersionId];\r
-                }\r
-            }\r
-            if (!($scope.isObjectEmpty(volGroupModel))) {\r
-                DataService.setModelInfo(COMPONENT.VOLUME_GROUP, {\r
-                    "modelInvariantId": volGroupModel.invariantUuid,\r
-                    "modelVersion": volGroupModel.version,\r
-                    "modelNameVersionId": volGroupModel.uuid,\r
-                    "modelName": volGroupModel.name,\r
-                    "modelCustomizationName": volGroupModel.modelCustomizationName,\r
-                    "customizationUuid": volGroupModel.customizationUuid,\r
-                    "inputs": ""\r
-                });\r
-            }\r
-\r
-            DataService.setVnfInstanceId(vnf.object[FIELD.ID.VNF_ID]);\r
-\r
-            DataService.setSubscriberName(serviceObject[COMPONENT.SUBSCRIBER_NAME]);\r
-            DataService.setServiceType(serviceObject[COMPONENT.SERVICE_TYPE]);\r
-            DataService.setServiceInstanceId(serviceInstance[FIELD.ID.SERVICE_INSTANCE_ID]);\r
-\r
-            DataService.setGlobalCustomerId(serviceObject[FIELD.ID.GLOBAL_CUST_ID]);\r
-            DataService.setServiceInstanceName($scope.service.instance.name);\r
-\r
-            DataService.setServiceName($scope.service.model.service.name);\r
-\r
-            DataService.setServiceUuid($scope.service.model.service.uuid);\r
-            DataService.setVnfInstanceId(vnf.nodeId);\r
-            DataService.setVolumeGroupInstanceId(volumeGroup.nodeId);\r
-\r
-            $scope.$broadcast(COMPONENT.DELETE_RESUME_COMPONENT, {\r
-                componentId: COMPONENT.VOLUME_GROUP,\r
-                callbackFunction: deleteOrResumeCallback,\r
-                dialogMethod: COMPONENT.DELETE\r
-            });\r
-        };\r
-\r
-        $scope.describeNetwork = function (serviceObject, networkObject) {\r
-            var serviceInstance = serviceObject.object;\r
-            var network = networkObject.object;\r
-            //console.log ("networkObject="); console.log (JSON.stringify(networkObject, null, 4));\r
-\r
-            DataService.setResCustomizationUuid(" ");\r
-\r
-            setCurrentServiceModelInfoFromScope();\r
-            setCurrentNetworkModelInfoFromScope(networkObject);\r
-\r
-            DataService.setNetworkInstanceId(network[FIELD.ID.NETWORK_ID]);\r
-            DataService.setInventoryItem(networkObject);\r
-            DataService.setSubscriberName(serviceObject.subscriberName);\r
-            DataService.setServiceType(serviceObject[COMPONENT.SERVICE_TYPE]);\r
-            DataService.setServiceInstanceId(serviceInstance[FIELD.ID.SERVICE_INSTANCE_ID]);\r
-\r
-            $scope.$broadcast(COMPONENT.SHOW_COMPONENT_DETAILS, {\r
-                componentId: COMPONENT.NETWORK\r
-            });\r
-        };\r
-\r
-        // for service instance id - no need for this!\r
-        $scope.describeService = function (serviceObject) {\r
-            var serviceInstance = serviceObject.object;\r
-            setCurrentServiceModelInfoFromScope();\r
-\r
-            DataService.setInventoryItem(serviceInstance);\r
-            //DataService.setModelInfo(serviceInstance['service-instance-id'], serviceInstance);\r
-\r
-            DataService.setSubscriberName(serviceObject[COMPONENT.SUBSCRIBER_NAME]);\r
-            DataService.setServiceType(serviceObject[COMPONENT.SERVICE_TYPE]);\r
-            DataService.setServiceInstanceId(serviceInstance[FIELD.ID.SERVICE_INSTANCE_ID]);\r
-\r
-            //Display popup with additional service information\r
-            $scope.$broadcast(COMPONENT.SHOW_COMPONENT_DETAILS, {\r
-                componentId: COMPONENT.SERVICE\r
-            });\r
-\r
-        };\r
-\r
-        $scope.describeVfModule = function (serviceObject, vfModuleObject, vnf) {\r
-            var serviceInstance = serviceObject.object;\r
-            var vfModule = vfModuleObject.object;\r
-\r
-            /*var vfModuleInvariantUuid = vfModule[FIELD.ID.MODEL_INVAR_ID];\r
-            var vfModuleModelVersionId = vfModule[FIELD.ID.MODEL_VERSION_ID];*/\r
-            var vfModuleCustomizationUuid = vfModule[FIELD.ID.MODEL_CUSTOMIZATION_ID];\r
-\r
-            setCurrentServiceModelInfoFromScope();\r
-            setCurrentVfModuleModelInfoFromScope(vnf, vfModuleObject);\r
-\r
-            DataService.setCustomizationUuid(" ");\r
-            if (UtilityService.hasContents(vfModuleCustomizationUuid)) {\r
-                DataService.setCustomizationUuid(vfModuleCustomizationUuid);\r
-            }\r
-\r
-            //Display popup with additional VF-Module information\r
-            DataService.setVfModuleInstanceId(vfModule[FIELD.ID.VF_MODULE_ID]);\r
-            DataService.setInventoryItem(vfModule);\r
-\r
-            DataService.setSubscriberName(serviceObject[COMPONENT.SUBSCRIBER_NAME]);\r
-            DataService.setServiceType(serviceObject[COMPONENT.SERVICE_TYPE]);\r
-            DataService.setServiceInstanceId(serviceInstance[FIELD.ID.SERVICE_INSTANCE_ID]);\r
-\r
-            $scope.$broadcast(COMPONENT.SHOW_COMPONENT_DETAILS, {\r
-                componentId: COMPONENT.VF_MODULE\r
-            });\r
-        };\r
-\r
-        $scope.getStatusOfVnf = function (serviceObject, vnfObject) {\r
-            var serviceInstance = serviceObject.object;\r
-            var vnf = vnfObject.object;\r
-\r
-            DataService.setVnfInstanceId(vnf[FIELD.ID.VNF_ID]);\r
-            DataService.setInventoryItem(vnf);\r
-\r
-            DataService.setSubscriberName(serviceObject[COMPONENT.SUBSCRIBER_NAME]);\r
-            DataService.setServiceType(serviceObject[COMPONENT.SERVICE_TYPE]);\r
-            DataService.setServiceInstanceId(serviceInstance[FIELD.ID.SERVICE_INSTANCE_ID]);\r
-            DataService.setServiceInstanceName(serviceInstance[FIELD.ID.SERVICE_INSTANCE_NAME]);\r
-\r
-            $scope.$broadcast(COMPONENT.COMPONENT_STATUS, {\r
-                componentId: COMPONENT.VNF,\r
-                callbackFunction: updateProvStatusVnfCallbackFunction\r
-            });\r
-        };\r
-\r
-        $scope.describeVnf = function (serviceObject, vnfObject) {\r
-            var serviceInstance = serviceObject.object;\r
-            var vnf = vnfObject.object;\r
-            DataService.setResCustomizationUuid(" ");\r
-\r
-            //var vnfInvariantUuid = vnf[FIELD.ID.MODEL_INVAR_ID];\r
-            //var vnfVersionId = vnf[FIELD.ID.MODEL_VERSION_ID];\r
-            var vnfCustomizationUuid = vnf[FIELD.ID.MODEL_CUSTOMIZATION_ID];\r
-\r
-            if (UtilityService.hasContents(vnfCustomizationUuid)) {\r
-                DataService.setResCustomizationUuid(vnfCustomizationUuid);\r
-            }\r
-\r
-            setCurrentServiceModelInfoFromScope();\r
-            setCurrentVNFModelInfo(vnfObject);\r
-\r
-            //Display popup with additional VNF information\r
-            DataService.setVnfInstanceId(vnf[FIELD.ID.VNF_ID]);\r
-            DataService.setInventoryItem(vnf);\r
-\r
-            DataService.setSubscriberName(serviceObject[COMPONENT.SUBSCRIBER_NAME]);\r
-            DataService.setServiceType(serviceObject[COMPONENT.SERVICE_TYPE]);\r
-            DataService.setServiceInstanceId(serviceInstance[FIELD.ID.SERVICE_INSTANCE_ID]);\r
-\r
-            $scope.$broadcast(COMPONENT.SHOW_COMPONENT_DETAILS, {\r
-                componentId: COMPONENT.VNF\r
-            });\r
-        };\r
-\r
-        $scope.describeVolumeGroup = function (serviceObject, vnf, volumeGroupObject) {\r
-\r
-            var serviceInstance = serviceObject.object;\r
-            var volumeGroup = volumeGroupObject.object;\r
-\r
-            var volGroupCustomizationUuid = volumeGroup[FIELD.ID.MODEL_CUSTOMIZATION_ID];\r
-\r
-            setCurrentServiceModelInfoFromScope();\r
-            setCurrentVolumeGroupModelInfoByVfModuleFromScope(vnf, volumeGroupObject);\r
-\r
-            DataService.setCustomizationUuid(" ");\r
-            if (UtilityService.hasContents(volGroupCustomizationUuid)) {\r
-                DataService.setCustomizationUuid(volGroupCustomizationUuid);\r
-            }\r
-            DataService.setVolumeGroupInstanceId(volumeGroup[FIELD.ID.VOLUME_GROUP_ID]);\r
-            DataService.setInventoryItem(volumeGroup);\r
-\r
-            DataService.setSubscriberName(serviceObject[COMPONENT.SUBSCRIBER_NAME]);\r
-            DataService.setServiceType(serviceObject[COMPONENT.SERVICE_TYPE]);\r
-            DataService.setServiceInstanceId(serviceInstance[FIELD.ID.SERVICE_INSTANCE_ID]);\r
-\r
-\r
-            $scope.$broadcast(COMPONENT.SHOW_COMPONENT_DETAILS, {\r
-                componentId: COMPONENT.VOLUME_GROUP\r
-            });\r
-        };\r
-\r
-        $scope.addNetworkInstance = function (netModel, existingVnfs) {\r
-\r
-            // For networks we assume that we always follow the new flow\r
-            console.log("Adding network to service instance" + this.service.instance.name);\r
-            if (VIDCONFIGURATION.VNF_STATUS_CHECK_ENABLED && (UtilityService.hasContents(existingVnfs)) && (existingVnfs.length > 0)) {\r
-                var msg = VnfService.isVnfListStatusValid(existingVnfs);\r
-                if (msg != "") {\r
-                    alert(msg);\r
-                    return;\r
-                }\r
-            }\r
-\r
-            DataService.setSubscriberName($scope.service.instance.subscriberName);\r
-            DataService.setGlobalCustomerId($scope.service.instance.globalCustomerId);\r
-            DataService.setServiceType($scope.service.instance.serviceType);\r
-            DataService.setServiceInstanceName($scope.service.instance.name);\r
-            DataService.setServiceInstanceId($scope.service.instance.id);\r
-            DataService.setServiceName($scope.service.model.service.name);\r
-\r
-            DataService.setModelInfo(COMPONENT.NETWORK, {\r
-                "modelType": "network",\r
-                "modelInvariantId": netModel.invariantUuid,\r
-                "modelVersion": netModel.version,\r
-                "modelNameVersionId": netModel.uuid,\r
-                "modelName": netModel.name,\r
-                "modelCustomizationName": netModel.modelCustomizationName,\r
-                "customizationUuid": netModel.customizationUuid,\r
-                "inputs": "",\r
-                "displayInputs": netModel.displayInputs\r
-            });\r
-            setCurrentServiceModelInfoFromScope();\r
-\r
-\r
-            $scope.$broadcast(COMPONENT.CREATE_COMPONENT, {\r
-                componentId: COMPONENT.NETWORK,\r
-                callbackFunction: createVnfCallbackFunction\r
-            });\r
-        };\r
-\r
-        $scope.addVnfInstance = function (vnf, existingVnfs) {\r
-\r
-            if (VIDCONFIGURATION.VNF_STATUS_CHECK_ENABLED && (UtilityService.hasContents(existingVnfs)) && (existingVnfs.length > 0)) {\r
-                var msg = VnfService.isVnfListStatusValid(existingVnfs);\r
-                if (msg != "") {\r
-                    alert(msg);\r
-                    return;\r
-                }\r
-            }\r
-\r
-            var isVfc = false;\r
-\r
-            _.map($scope.service.model.vnfs, function (value, key) {\r
-                if (value.uuid == vnf.uuid && !_.isEmpty(value.vfcInstanceGroups)) {\r
-                        isVfc = true;\r
-                        var queryData = {\r
-                            serviceModelId: $scope.service.model.service.uuid,\r
-                            serviceInstanceID: $scope.service.instance.id,\r
-                            globalCustomerId: $scope.service.instance.globalCustomerId,\r
-                            serviceType: $scope.service.instance.serviceType,\r
-                            serviceInstanceName: $scope.service.instance.name,\r
-                            modelCustomizationName: value.modelCustomizationName,\r
-                            modelCustomizationId: value.customizationUuid,\r
-                            subscriberName: $scope.service.instance.subscriberName\r
-                        };\r
-\r
-                        $scope.$broadcast(COMPONENT.IFRAME_DIALOG, queryData);\r
-                        return;\r
-                    }\r
-            });\r
-\r
-            DataService.setSubscriberName($scope.service.instance.subscriberName);\r
-            DataService.setGlobalCustomerId($scope.service.instance.globalCustomerId);\r
-            DataService.setServiceType($scope.service.instance.serviceType);\r
-            DataService.setServiceInstanceName($scope.service.instance.name);\r
-            DataService.setServiceInstanceId($scope.service.instance.id);\r
-            DataService.setServiceName($scope.service.model.service.name);\r
-\r
-            console.log("existingVnfs: ");\r
-            console.log(JSON.stringify(existingVnfs, null, 4));\r
-            console.log("existingVnfs: ");\r
-            console.log(JSON.stringify(existingVnfs, null, 4));\r
-            var vnf_type = "";\r
-            var vnf_role = "";\r
-            var vnf_function = "";\r
-            var vnf_code = "";\r
-\r
-            if (UtilityService.hasContents(vnf.nfType)) {\r
-                vnf_type = vnf.nfType;\r
-            }\r
-            if (UtilityService.hasContents(vnf.nfRole)) {\r
-                vnf_role = vnf.nfRole;\r
-            }\r
-            if (UtilityService.hasContents(vnf.nfFunction)) {\r
-                vnf_function = vnf.nfFunction;\r
-            }\r
-            if (UtilityService.hasContents(vnf.nfCode)) {\r
-                vnf_code = vnf.nfCode;\r
-            }\r
-            DataService.setModelInfo(COMPONENT.VNF, {\r
-                "modelType": vnf.isPnf ? "pnf" : "vnf",\r
-                "modelInvariantId": vnf.invariantUuid,\r
-                "modelVersion": vnf.version,\r
-                "modelNameVersionId": vnf.uuid,\r
-                "modelName": vnf.name,\r
-                "modelCustomizationName": vnf.modelCustomizationName,\r
-                "customizationUuid": vnf.customizationUuid,\r
-                "inputs": "",\r
-                "displayInputs": vnf.displayInputs,\r
-                "vnfType": vnf_type,\r
-                "vnfRole": vnf_role,\r
-                "vnfFunction": vnf_function,\r
-                "vnfCode": vnf_code,\r
-                "properties": vnf.properties\r
-            });\r
-\r
-            DataService.setModelInstanceName($scope.service.model.service.name);\r
-            setCurrentServiceModelInfoFromScope();\r
-\r
-            if (vnf.isConfig) {\r
-                DataService.setServiceProxies($scope.service.model.serviceProxies);\r
-                DataService.setSourceServiceProxies(vnf.sourceNodes);\r
-                DataService.setCollectorServiceProxies(vnf.collectorNodes);\r
-                DataService.setConfigurationByPolicy(vnf.isConfigurationByPolicy);\r
-                $location.path("/addNetworkNode");\r
-            } else if (vnf.isPnf) {\r
-                $location.path("/pnfSearchAssociation");\r
-            } else if (isVfc) {\r
-                //do nothing\r
-            } else {\r
-                $scope.$broadcast(COMPONENT.CREATE_COMPONENT, {\r
-                    componentId: COMPONENT.VNF,\r
-                    callbackFunction: createVnfCallbackFunction\r
-                });\r
-            }\r
-        };\r
-\r
-        $scope.addVfModuleInstance = function (vnfInstance, vfModuleModel) {\r
-\r
-            if (VIDCONFIGURATION.VNF_STATUS_CHECK_ENABLED) {\r
-                var msg = VnfService.isVnfStatusValid(vnfInstance);\r
-                if (msg != "") {\r
-                    alert(msg);\r
-                    return;\r
-                }\r
-\r
-            }\r
-            var svcModel = $scope.service.convertedModel;\r
-            DataService.setSubscriberName($scope.service.instance.subscriberName);\r
-            DataService.setGlobalCustomerId($scope.service.instance.globalCustomerId);\r
-            DataService.setServiceType($scope.service.instance.serviceType);\r
-            DataService.setServiceInstanceName($scope.service.instance.name);\r
-            DataService.setServiceInstanceId($scope.service.instance.id);\r
-            DataService.setServiceName($scope.service.model.service.name);\r
-\r
-            var vnfModelInvariantUuid = vnfInstance.object[FIELD.ID.MODEL_INVAR_ID];\r
-            var vnfModelVersionId = vnfInstance.object[FIELD.ID.MODEL_VERSION_ID];\r
-            var vnfModelCustomizationUuid = vnfInstance.object[FIELD.ID.MODEL_CUSTOMIZATION_ID];\r
-            var vnfModel = null;\r
-            if (svcModel.isNewFlow) {\r
-                vnfModel = svcModel.vnfs[vnfModelCustomizationUuid];\r
-            }\r
-            else {\r
-                vnfModel = svcModel.vnfs[vnfModelVersionId];\r
-            }\r
-\r
-            var availableVolumeGroupList = [];\r
-            angular.forEach(vnfInstance[FIELD.ID.AVAILABLEVOLUMEGROUPS], function (volumeGroupInstance, key) {\r
-                availableVolumeGroupList.push({"instance": volumeGroupInstance});\r
-            });\r
-\r
-            DataService.setAvailableVolumeGroupList(availableVolumeGroupList);\r
-            setCurrentServiceModelInfoFromScope();\r
-\r
-            DataService.setVnfInstanceId(vnfInstance.object[FIELD.ID.VNF_ID]);\r
-\r
-            DataService.setModelInfo(COMPONENT.VNF, {\r
-                "modelInvariantId": vnfModel.invariantUuid,\r
-                "modelVersion": vnfModel.version,\r
-                "modelNameVersionId": vnfModel.uuid,\r
-                "modelName": vnfModel.name,\r
-                "modelCustomizationName": vnfModel.modelCustomizationName,\r
-                "customizationUuid": vnfModel.customizationUuid,\r
-                "inputs": ""\r
-            });\r
-\r
-            DataService.setModelInfo(COMPONENT.VF_MODULE, {\r
-                "modelInvariantId": vfModuleModel.invariantUuid,\r
-                "modelVersion": vfModuleModel.version,\r
-                "modelNameVersionId": vfModuleModel.uuid,\r
-                "customizationUuid": vfModuleModel.customizationUuid,\r
-                "modelCustomizationName": vfModuleModel.modelCustomizationName,\r
-                "modelName": vfModuleModel.name,\r
-                "inputs": ""\r
-            });\r
-\r
-            $scope.$broadcast(COMPONENT.CREATE_COMPONENT, {\r
-                componentId: COMPONENT.VF_MODULE,\r
-                callbackFunction: createVfModuleCallbackFunction\r
-            });\r
-\r
-        };\r
-\r
-        $scope.addVolumeGroupInstance = function (vnfInstance, volumeGroupModel) {\r
-            if (VIDCONFIGURATION.VNF_STATUS_CHECK_ENABLED) {\r
-                var msg = VnfService.isVnfStatusValid(vnfInstance);\r
-                if (msg != "") {\r
-                    alert(msg);\r
-                    return;\r
-                }\r
-            }\r
-            var svcModel = $scope.service.convertedModel;\r
-            DataService.setSubscriberName($scope.service.instance.subscriberName);\r
-            DataService.setGlobalCustomerId($scope.service.instance.globalCustomerId);\r
-            DataService.setServiceType($scope.service.instance.serviceType);\r
-            DataService.setServiceInstanceName($scope.service.instance.name);\r
-            DataService.setServiceInstanceId($scope.service.instance.id);\r
-            DataService.setServiceName($scope.service.model.service.name);\r
-            setCurrentServiceModelInfoFromScope();\r
-\r
-            DataService.setModelInfo(COMPONENT.SERVICE, {\r
-                "modelInvariantId": $scope.service.model.service.invariantUuid,\r
-                "modelVersion": $scope.service.model.service.version,\r
-                "modelNameVersionId": $scope.service.model.service.uuid,\r
-                "modelName": $scope.service.model.service.name,\r
-                "inputs": ""\r
-            });\r
-\r
-            DataService.setVnfInstanceId(vnfInstance.object[FIELD.ID.VNF_ID]);\r
-\r
-            var vnfModelInvariantUuid = vnfInstance.object[FIELD.ID.MODEL_INVAR_ID];\r
-            var vnfModelVersionId = vnfInstance.object[FIELD.ID.MODEL_VERSION_ID];\r
-            var vnfCustomizationUuid = vnfInstance.object[FIELD.ID.MODEL_CUSTOMIZATION_ID];\r
-            var vnfModel = null;\r
-\r
-            if (svcModel.isNewFlow) {\r
-                vnfModel = svcModel.vnfs[vnfCustomizationUuid];\r
-            }\r
-            else {\r
-                vnfModel = svcModel.vnfs[vnfModelVersionId];\r
-            }\r
-\r
-            DataService.setModelInfo(COMPONENT.VNF, {\r
-                "modelInvariantId": vnfModel.invariantUuid,\r
-                "modelVersion": vnfModel.version,\r
-                "modelNameVersionId": vnfModel.uuid,\r
-                "modelName": vnfModel.name,\r
-                "modelCustomizationName": vnfModel.modelCustomizationName,\r
-                "customizationUuid": vnfModel.customizationUuid,\r
-                "inputs": ""\r
-            });\r
-\r
-            DataService.setModelInfo(COMPONENT.VOLUME_GROUP, {\r
-                "modelInvariantId": volumeGroupModel.invariantUuid,\r
-                "modelVersion": volumeGroupModel.version,\r
-                "modelNameVersionId": volumeGroupModel.uuid,\r
-                "modelName": volumeGroupModel.name,\r
-                "modelCustomizationName": volumeGroupModel.modelCustomizationName,\r
-                "customizationUuid": volumeGroupModel.customizationUuid,\r
-                "inputs": ""\r
-            });\r
-\r
-            $scope.$broadcast(COMPONENT.CREATE_COMPONENT, {\r
-                componentId: COMPONENT.VOLUME_GROUP,\r
-                callbackFunction: createVolumeGroupCallbackFunction\r
-            });\r
-        };\r
-\r
-        $scope.resume = function (serviceObject, vfModule, vnfModel) {\r
-            populate_popup_vfModule(serviceObject, vfModule, vnfModel);\r
-            setCurrentVNFModelInfo(vnfModel);\r
-\r
-            var availableVolumeGroupList = [];\r
-            angular.forEach(vfModule.volumeGroups, function (volumeGroupInstance, key) {\r
-                availableVolumeGroupList.push({"instance": volumeGroupInstance});\r
-            });\r
-\r
-            DataService.setAvailableVolumeGroupList(availableVolumeGroupList);\r
-\r
-            DataService.setVfModuleInstanceName(vfModule.object[FIELD.ID.VF_MODULE_NAME]);\r
-            setCurrentServiceModelInfoFromScope();\r
-\r
-            if (DataService.getLoggedInUserId())  {\r
-                openVfModuleWithHomingDataModal(COMPONENT.RESUME, vfModule);\r
-            }\r
-            else {\r
-                AaiService.getLoggedInUserID(function (response) {\r
-                    var userID = response.data;\r
-                    DataService.setLoggedInUserId(userID);\r
-                    openVfModuleWithHomingDataModal(COMPONENT.RESUME, vfModule);\r
-                });\r
-            }\r
-        };\r
-\r
-        $scope.deleteConfiguration = function (serviceObject, configuration) {\r
-            console.log("Deleting Configuration " + configuration.name);\r
-\r
-            var serviceInstance = serviceObject.object;\r
-            var svcModel = $scope.service.convertedModel;\r
-            var configModel;\r
-            DataService.setInventoryItem(configuration.object);\r
-            // set model default and override later if found\r
-            DataService.setModelInfo(COMPONENT.CONFIGURATION, {});\r
-\r
-            if (configuration.object != null) {\r
-\r
-                //var netModelInvariantUuid = network.object[FIELD.ID.MODEL_INVAR_ID];\r
-                var configModelVersionId = configuration.object[FIELD.ID.MODEL_VERSION_ID]; // model uuid\r
-                var configModelCustomizationUuid = configuration.object[FIELD.ID.MODEL_CUSTOMIZATION_ID];\r
-\r
-                //configurations added to vnfs list, in order to be part of the "Add VNF" drop-down list\r
-                if ((!($scope.isObjectEmpty(svcModel))) && (!($scope.isObjectEmpty(svcModel.vnfs)))) {\r
-                    if ((svcModel.isNewFlow) && (UtilityService.hasContents(configModelCustomizationUuid))) {\r
-                        configModel = svcModel.vnfs[configModelCustomizationUuid];\r
-                    }\r
-                    else {\r
-\r
-                        if (UtilityService.hasContents(configModelVersionId)) {\r
-                            configModel = svcModel.vnfs[configModelVersionId];\r
-                        }\r
-\r
-                    }\r
-                }\r
-            }\r
-            if (!($scope.isObjectEmpty(configModel))) {\r
-                DataService.setModelInfo(COMPONENT.CONFIGURATION, {\r
-                    "modelInvariantId": configModel.invariantUuid,\r
-                    "modelVersion": configModel.version,\r
-                    "modelNameVersionId": configModel.uuid,\r
-                    "modelCustomizationName": configModel.modelCustomizationName,\r
-                    "customizationUuid": configModel.customizationUuid,\r
-                    "modelName": configModel.name,\r
-                    "inputs": ""\r
-                });\r
-            }\r
-\r
-            DataService.setSubscriberName(serviceObject[COMPONENT.SUBSCRIBER_NAME]);\r
-            DataService.setServiceType(serviceObject[COMPONENT.SERVICE_TYPE]);\r
-            DataService.setServiceInstanceId(serviceInstance[FIELD.ID.SERVICE_INSTANCE_ID]);\r
-\r
-            DataService.setGlobalCustomerId(serviceObject[FIELD.ID.GLOBAL_CUST_ID]);\r
-            DataService.setServiceInstanceName($scope.service.instance.name);\r
-            DataService.setServiceName($scope.service.model.service.name);\r
-            DataService.setServiceUuid($scope.service.model.service.uuid);\r
-            DataService.setConfigurationInstanceId(configuration.object[FIELD.ID.CONFIGURATION_ID]);\r
-\r
-            $scope.$broadcast(COMPONENT.DELETE_RESUME_COMPONENT, {\r
-                componentId: COMPONENT.CONFIGURATION,\r
-                dialogMethod: COMPONENT.DELETE,\r
-                callbackFunction: deleteCallbackFunction\r
-            });\r
-        };\r
-\r
-        var deleteCallbackFunction = function () {\r
-            console.log('hi')\r
-        };\r
-\r
-        $scope.resetProgress = function () {\r
-            $scope.percentProgress = 0;\r
-            $scope.progressClass = FIELD.STYLE.PROGRESS_BAR_INFO;\r
-        };\r
-\r
-        $scope.setProgress = function (percentProgress) {\r
-            percentProgress = parseInt(percentProgress);\r
-            if (percentProgress >= 100) {\r
-                $scope.progressClass = FIELD.STYLE.PROGRESS_BAR_SUCCESS;\r
-            }\r
-\r
-            if (percentProgress < $scope.percentProgress) {\r
-                return;\r
-            }\r
-\r
-            $scope.percentProgress = percentProgress;\r
-            $scope.progressWidth = {width: percentProgress + "%"};\r
-            if (percentProgress >= 5) {\r
-                $scope.progressText = percentProgress + " %";\r
-            } else {\r
-                // Hidden since color combination is barely visible when progress portion is narrow.\r
-                $scope.progressText = "";\r
-            }\r
-        };\r
-        $scope.isObjectEmpty = function (o) {\r
-            var len = 0;\r
-            if (UtilityService.hasContents(o)) {\r
-                var keys = Object.keys(o);\r
-                len = keys.length;\r
-                if (len == 0) {\r
-                    return true;\r
-                }\r
-                else {\r
-                    return false;\r
-                }\r
-            }\r
-            else {\r
-                return true;\r
-            }\r
-        };\r
-        $scope.isMacro = function () {\r
-            return $scope.service && AsdcService.isMacro($scope.service.model);\r
-        };\r
-        $scope.reloadRoute = function () {\r
-            $route.reload();\r
-        };\r
-\r
-\r
-        /*\r
-Private metthods\r
-*/\r
-\r
-        /*\r
-        setPnf\r
-        * set the controller pnf param using api call\r
-        * return: void\r
-         */\r
-        function _setPnf(data) { // data is the $scope.service.instance object\r
-            return PnfService.getPnfs(data)\r
-                .then(\r
-                    function (response) {\r
-                        return response.data;\r
-                        // * can add here changes on the data that are needed to the view ( filter, ect..)\r
-                    },\r
-                    function (error) {\r
-                        console.error(error);\r
-                    }\r
-                );\r
-        }\r
-\r
-\r
-        function _setCr(data) { // data is the $scope.service.instance object\r
-            return CrService.getCr(data)\r
-                .then(\r
-                    function (response) {\r
-                        return response.data.results;\r
-                        // * can add here changes on the data that are needed to the view ( filter, ect..)\r
-                    },\r
-                    function (error) {\r
-                        console.error(error);\r
-                    }\r
-                );\r
-        }\r
-\r
-\r
-        /*\r
-        Callbaks functions\r
-\r
-         */\r
-        var updateProvStatusVnfCallbackFunction = function (response) {\r
-            $scope.callbackResults = "";\r
-            var color = FIELD.ID.COLOR_NONE;\r
-            $scope.callbackStyle = {\r
-                "background-color": color\r
-            };\r
-            $scope.reloadRoute();\r
-            /*\r
-             * This 1/2 delay was only added to visually highlight the status\r
-             * change. Probably not needed in the real application code.\r
-             */\r
-            $timeout(function () {\r
-                $scope.callbackResults = UtilityService.getCurrentTime()\r
-                    + FIELD.STATUS.IS_SUCCESSFUL + response.isSuccessful;\r
-                if (response.isSuccessful) {\r
-                    color = FIELD.ID.COLOR_8F8;\r
-\r
-                } else {\r
-                    color = FIELD.ID.COLOR_F88;\r
-                }\r
-                $scope.callbackStyle = {\r
-                    "background-color": color\r
-                };\r
-            }, 500);\r
-\r
-        };\r
-\r
-        var createVnfCallbackFunction = function (response) {\r
-            $scope.callbackResults = "";\r
-            var color = FIELD.ID.COLOR_NONE;\r
-            $scope.callbackStyle = {\r
-                "background-color": color\r
-            };\r
-\r
-            /*\r
-             * This 1/2 delay was only added to visually highlight the status\r
-             * change. Probably not needed in the real application code.\r
-             */\r
-            $timeout(function () {\r
-                $scope.callbackResults = UtilityService.getCurrentTime()\r
-                    + FIELD.STATUS.IS_SUCCESSFUL + response.isSuccessful;\r
-                if (response.isSuccessful) {\r
-                    color = FIELD.ID.COLOR_8F8;\r
-                    $scope.reloadRoute();\r
-                } else {\r
-                    color = FIELD.ID.COLOR_F88;\r
-                }\r
-                $scope.callbackStyle = {\r
-                    "background-color": color\r
-                };\r
-            }, 500);\r
-\r
-\r
-        };\r
-\r
-        var deleteOrResumeCallback = function (response) {\r
-            $scope.callbackResults = "";\r
-            var color = FIELD.ID.COLOR_NONE;\r
-            $scope.callbackStyle = {\r
-                "background-color": color\r
-            };\r
-\r
-            /*\r
-             * This 1/2 delay was only added to visually highlight the status\r
-             * change. Probably not needed in the real application code.\r
-             */\r
-            $timeout(function () {\r
-                $scope.callbackResults = UtilityService.getCurrentTime()\r
-                    + FIELD.STATUS.IS_SUCCESSFUL + response.isSuccessful;\r
-                if (response.isSuccessful) {\r
-                    color = FIELD.ID.COLOR_8F8;\r
-                    $scope.reloadRoute();\r
-                } else {\r
-                    color = FIELD.ID.COLOR_F88;\r
-                }\r
-                $scope.callbackStyle = {\r
-                    "background-color": color\r
-                };\r
-            }, 500);\r
-\r
-        };\r
-\r
-        var createVfModuleCallbackFunction = function (response) {\r
-            $scope.callbackResults = "";\r
-            var color = FIELD.ID.COLOR_NONE;\r
-            $scope.callbackStyle = {\r
-                "background-color": color\r
-            };\r
-\r
-            /*\r
-             * This 1/2 delay was only added to visually highlight the status\r
-             * change. Probably not needed in the real application code.\r
-             */\r
-            $timeout(function () {\r
-                $scope.callbackResults = UtilityService.getCurrentTime()\r
-                    + FIELD.STATUS.IS_SUCCESSFUL + response.isSuccessful;\r
-                if (response.isSuccessful) {\r
-                    color = FIELD.ID.COLOR_8F8;\r
-                    $scope.reloadRoute();\r
-                } else {\r
-                    color = FIELD.ID.COLOR_F88;\r
-                    $scope.reloadRoute();\r
-                }\r
-                $scope.callbackStyle = {\r
-                    "background-color": color\r
-                };\r
-            }, 500);\r
-\r
-        };\r
-\r
-        var deleteServiceInstanceCallbackFunction = function (response) {\r
-            $scope.callbackResults = "";\r
-            var color = FIELD.ID.COLOR_NONE;\r
-            $scope.callbackStyle = {\r
-                "background-color": color\r
-            };\r
-\r
-            /*\r
-             * This 1/2 delay was only added to visually highlight the status\r
-             * change. Probably not needed in the real application code.\r
-             */\r
-            $timeout(function () {\r
-                $scope.callbackResults = UtilityService.getCurrentTime()\r
-                    + FIELD.STATUS.IS_SUCCESSFUL + response.isSuccessful;\r
-                if (response.isSuccessful) {\r
-                    color = FIELD.ID.COLOR_8F8;\r
-                    $location.path(COMPONENT.SERVICEMODELS_MODELS_SERVICES_PATH);\r
-                } else {\r
-                    color = FIELD.ID.COLOR_F88;\r
-                }\r
-                $scope.callbackStyle = {\r
-                    "background-color": color\r
-                };\r
-            }, 500);\r
-\r
-        };\r
-\r
-        var createVolumeGroupCallbackFunction = function (response) {\r
-            $scope.callbackResults = "";\r
-            var color = FIELD.ID.COLOR_NONE;\r
-            $scope.callbackStyle = {\r
-                "background-color": color\r
-            };\r
-\r
-            /*\r
-             * This 1/2 delay was only added to visually highlight the status\r
-             * change. Probably not needed in the real application code.\r
-             */\r
-            $timeout(function () {\r
-                $scope.callbackResults = UtilityService.getCurrentTime()\r
-                    + FIELD.STATUS.IS_SUCCESSFUL + response.isSuccessful;\r
-                if (response.isSuccessful) {\r
-                    color = FIELD.ID.COLOR_8F8;\r
-                    $scope.reloadRoute();\r
-                } else {\r
-                    color = FIELD.ID.COLOR_F88;\r
-                }\r
-                $scope.callbackStyle = {\r
-                    "background-color": color\r
-                };\r
-            }, 500);\r
-\r
-\r
-        };\r
-\r
-    });\r
-})();\r
+/*-
+ * ============LICENSE_START=======================================================
+ * VID
+ * ================================================================================
+ * Copyright (C) 2017 - 2019 AT&T Intellectual Property. All rights reserved.
+ * Modifications Copyright (C) 2019 IBM.
+ * ================================================================================
+ * 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=========================================================
+ */
+
+/**
+ * The Instantiation (or View/Edit) Controller controls the instantiation/removal of
+ * deployable objects (Services, VNFs, VF-Modules, Networks, and Volume-Groups)
+ */
+(function () {
+    "use strict";
+
+    appDS2.requires.push('ui.tree');
+
+    appDS2.controller("InstantiationController", function ($scope, $route, $location, $timeout, $uibModal, COMPONENT, VIDCONFIGURATION, FIELD, DataService, PropertyService, UtilityService, VnfService, $http, vidService, AaiService, PnfService, CrService, AsdcService, $q, featureFlags, _, CreationService, $window, DeleteResumeService) {
+        $scope.popup = new Object();
+        $scope.defaultBaseUrl = "";
+        $scope.responseTimeoutMsec = 60000;
+        $scope.properties = UtilityService.getProperties();
+        $scope.resumeStatus = COMPONENT.RESUME_STATUS;
+        //isPermitted - returned as string from url and converted into boolean
+        $scope.isPermitted = $location.search().isPermitted === "true";
+        $scope.STATUS_CONSTANTS = FIELD.STATUS;
+        $scope.pnfs = [];// PNF data init;
+        $scope.collectionResource = {};
+        $scope.collections = [];
+        $scope.networks = [];
+        $scope.isCR = false;
+        $scope.isVFC = false;
+        $scope.init = function () {
+            /*
+             * These 2 statements should be included in non-test code.
+             */
+            // takes a default value, retrieves the prop value from the file system and sets it
+            var msecs = PropertyService.retrieveMsoMaxPollingIntervalMsec();
+            PropertyService.setMsoMaxPollingIntervalMsec(msecs);
+
+            // takes a default value, retrieves the prop value from the file system and sets it
+            var polls = PropertyService.retrieveMsoMaxPolls();
+            PropertyService.setMsoMaxPolls(polls);
+        };
+
+
+        $scope.convertModel = function (asdcModel) {
+            if (!asdcModel) return undefined;
+            var convertedAsdcModel = UtilityService.convertModel(asdcModel);
+            return convertedAsdcModel;
+        };
+
+        $scope.prepareScopeWithModel = function () {
+            // skip if no model
+            if (!vidService.getModel()) return;
+
+            $scope.service = {
+                "model": vidService.getModel(),
+                "convertedModel": $scope.convertModel(vidService.getModel()),
+                "instance": vidService.getInstance()
+            };
+
+
+            $scope.isCR = !_.isEmpty($scope.service.model.collectionResources);
+            if ($scope.isCR)
+                prepareCr();
+            else
+                preparePnfs();
+        };
+
+        function preparePnfs() {
+            var serviceInstance = {
+                globalCustomerId: $location.search().subscriberId,
+                serviceType: $location.search().serviceType,
+                serviceInstanceId: $location.search().serviceInstanceId
+            };
+
+            _setPnf(serviceInstance).then(function (data) {
+                $scope.pnfs = data;
+            });
+        }
+
+
+        function prepareCr() {
+            var serviceInstance = {
+                globalCustomerId: $location.search().subscriberId,
+                serviceType: $location.search().serviceType,
+                serviceInstanceId: $location.search().serviceInstanceId
+            };
+
+            _setCr(serviceInstance).then(function (data) {
+                $scope.collectionResource = data;
+                $scope.collections.push($scope.collectionResource.collection);
+                $scope.networks.push($scope.collectionResource.networks[0]);
+            });
+        }
+
+        $scope.returnVfModules = function (vnfInstance) {
+
+            var svcModel = $scope.service.convertedModel;
+            //var vnfModelInvariantUuid = vnfInstance[FIELD.ID.MODEL_INVAR_ID];
+            var vnfModelVersionId = vnfInstance[FIELD.ID.MODEL_VERSION_ID]; // model uuid
+            var vnfModelCustomizationUuid = vnfInstance[FIELD.ID.MODEL_CUSTOMIZATION_ID];
+
+            var vnfModel = null;
+
+            if ((!($scope.isObjectEmpty(svcModel))) && (!($scope.isObjectEmpty(svcModel.vnfs)))) {
+                if ((svcModel.isNewFlow) && (vnfModelCustomizationUuid != null)) {
+                    vnfModel = svcModel.vnfs[vnfModelCustomizationUuid];
+                    if (vnfModel !== undefined) {
+                        if (!($scope.isObjectEmpty(vnfModel.vfModules))) {
+                            //console.log ("vnfModel.vfModules: "); console.log (JSON.stringify(vnfModel.vfModules, null, 4));
+                            return (vnfModel.vfModules);
+                        }
+                    }
+                }
+                else {
+                    // old flow
+                    if (vnfModelVersionId != null) {
+                        vnfModel = svcModel.vnfs[vnfModelVersionId];
+                        if (vnfModel !== undefined) {
+                            if (!($scope.isObjectEmpty(vnfModel.vfModules))) {
+                                //console.log ("vnfModel.vfModules: "); console.log (JSON.stringify(vnfModel.vfModules, null, 4));
+                                return (vnfModel.vfModules);
+                            }
+                        }
+                    }
+                }
+
+            }
+            return null;
+        };
+        $scope.hasVfModules = function (vnfInstance) {
+            if ($scope.returnVfModules(vnfInstance) != null) {
+                return true;
+            }
+            return false;
+        };
+        $scope.returnVolumeGroups = function (vnfInstance) {
+
+            var svcModel = $scope.service.convertedModel;
+
+            //var vnfModelInvariantUuid = vnfInstance[FIELD.ID.MODEL_INVAR_ID];
+            var vnfModelVersionId = vnfInstance[FIELD.ID.MODEL_VERSION_ID];
+            var vnfModelCustomizationUuid = vnfInstance[FIELD.ID.MODEL_CUSTOMIZATION_ID];
+
+            var vnfModel = null;
+
+            if ((!($scope.isObjectEmpty(svcModel))) && (!($scope.isObjectEmpty(svcModel.vnfs)))) {
+                if ((svcModel.isNewFlow) && (vnfModelCustomizationUuid != null)) {
+                    vnfModel = svcModel.vnfs[vnfModelCustomizationUuid];
+                    if (vnfModel !== undefined && !($scope.isObjectEmpty(vnfModel.volumeGroups))) {
+                            //console.log ("vnfModel.volumeGroups: "); console.log (JSON.stringify(vnfModel.volumeGroups, null, 4));
+                            return (vnfModel.volumeGroups);
+                        }
+                }
+                else {
+                    // old flow
+                    if (vnfModelVersionId != null) {
+                        vnfModel = svcModel.vnfs[vnfModelVersionId];
+                        if (!($scope.isObjectEmpty(vnfModel.volumeGroups))) {
+                            //console.log ("vnfModel.vfModules: "); console.log (JSON.stringify(vnfModel.volumeGroups, null, 4));
+                            return (vnfModel.volumeGroups);
+                        }
+                    }
+                }
+
+            }
+            return null;
+        };
+        $scope.hasVolumeGroups = function (vnfInstance) {
+            if ($scope.returnVolumeGroups(vnfInstance) != null) {
+                return true;
+            }
+            return false;
+        };
+        $scope.deleteNetwork = function (serviceObject, network) {
+
+            console.log("Removing Network " + network.name);
+
+            //Send delete network request to MSO
+
+            //var networks = this.service.instance.networks;
+
+            //networks.splice(networks.indexOf(network), 1);
+
+            //Retrieve updated data from A&AI
+            var serviceInstance = serviceObject.object;
+
+            setCurrentNetworkModelInfoFromScope(network);
+
+            DataService.setInventoryItem(network.object);
+
+            DataService.setSubscriberName(serviceObject[COMPONENT.SUBSCRIBER_NAME]);
+            DataService.setServiceType(serviceObject[COMPONENT.SERVICE_TYPE]);
+            DataService.setServiceInstanceId(serviceInstance[FIELD.ID.SERVICE_INSTANCE_ID]);
+
+            DataService.setGlobalCustomerId(serviceObject[FIELD.ID.GLOBAL_CUST_ID]);
+            DataService.setServiceInstanceName($scope.service.instance.name);
+            DataService.setServiceName($scope.service.model.service.name);
+            DataService.setServiceUuid($scope.service.model.service.uuid);
+            DataService.setNetworkInstanceId(network.object[FIELD.ID.NETWORK_ID]);
+
+            $scope.$broadcast(COMPONENT.DELETE_RESUME_COMPONENT, {
+                componentId: COMPONENT.NETWORK,
+                callbackFunction: deleteOrResumeCallback,
+                dialogMethod: COMPONENT.DELETE
+            });
+        };
+
+        $scope.allowTransferToNewScreenAndShowButton = function (isPermitted){
+          if(featureFlags.isOn(COMPONENT.FEATURE_FLAGS.FLAG_FLASH_MORE_ACTIONS_BUTTON_IN_OLD_VIEW_EDIT)) {
+              return isPermitted;
+          }
+          return false;
+        };
+
+        $scope.navigateToNewEditViewScreen = function(){
+                window.location.href = 'serviceModels.htm#/servicePlanning/EDIT?' +
+                    'serviceModelId=' +     _.get($scope, 'service.model.service.uuid') +
+                    '&subscriberId=' +      $location.search().subscriberId  +
+                    '&serviceType=' +       $location.search().serviceType      +
+                    '&serviceInstanceId=' + $location.search().serviceInstanceId;
+        };
+
+        $scope.deleteService = function (serviceObject, serviceOrchestrationStatus) {
+
+            var serviceInstance = serviceObject.object;
+
+            console.log("Removing Service " + $scope.service.instance.name);
+
+            if ($scope.isMacro()) {
+                DataService.setALaCarte(false);
+            }
+            else {
+                DataService.setALaCarte(true);
+            }
+            DataService.setMacro($scope.isMacro());
+            DataService.setInventoryItem(serviceInstance);
+            setCurrentServiceModelInfoFromScope();
+
+
+            DataService.setSubscriberName(serviceObject[FIELD.ID.SUBSCRIBER_NAME]);
+            DataService.setServiceType(serviceObject[COMPONENT.SERVICE_TYPE]);
+            DataService.setServiceInstanceId(serviceInstance[FIELD.ID.SERVICE_INSTANCE_ID]);
+
+            DataService.setGlobalCustomerId(serviceObject[COMPONENT.GLOBAL_CUSTOMER_ID]);
+            DataService.setServiceInstanceName($scope.service.instance.name);
+
+            DataService.setServiceName($scope.service.model.service.name);
+
+            DataService.setServiceUuid($scope.service.model.service.uuid);
+
+            $scope.$broadcast(COMPONENT.DELETE_RESUME_COMPONENT, {
+                componentId: COMPONENT.SERVICE,
+                callbackFunction: deleteServiceInstanceCallbackFunction,
+                dialogMethod: COMPONENT.DELETE,
+                serviceStatus: serviceOrchestrationStatus
+            });
+
+        };
+
+        function populate_popup_vfModule(serviceObject, vfModule, vnf) {
+            var serviceInstance = serviceObject.object;
+
+            DataService.setInventoryItem(vfModule.object);
+
+            setCurrentVfModuleModelInfoFromScope(vnf, vfModule);
+            var vfModuleInstanceID = vfModule.object[FIELD.ID.VF_MODULE_ID];
+            if (vfModuleInstanceID == null) {
+                vfModuleInstanceID = "";
+            }
+
+            DataService.setVnfInstanceId(vnf.object[FIELD.ID.VNF_ID]);
+            DataService.setVfModuleInstanceId(vfModuleInstanceID);
+
+            DataService.setSubscriberName(serviceObject[COMPONENT.SUBSCRIBER_NAME]);
+            DataService.setServiceType(serviceObject[COMPONENT.SERVICE_TYPE]);
+            DataService.setServiceInstanceId(serviceInstance[FIELD.ID.SERVICE_INSTANCE_ID]);
+
+            DataService.setGlobalCustomerId(serviceObject[FIELD.ID.GLOBAL_CUST_ID]);
+            DataService.setServiceInstanceName($scope.service.instance.name);
+
+            DataService.setServiceName($scope.service.model.service.name);
+
+            DataService.setServiceUuid($scope.service.model.service.uuid);
+        }
+
+        var modalInstance;
+
+        var openMsoModal = function (msoType, requestParams, callbackFunction, configuration) {
+             modalInstance = $uibModal.open({
+                templateUrl: 'app/vid/scripts/modals/mso-commit/mso-commit.html',
+                controller: "msoCommitModalController",
+                backdrop: false,
+                resolve: {
+                    msoType: function () {
+                        return msoType;
+                    },
+                    requestParams: function () {
+                        requestParams.callbackFunction = callbackFunction;
+                        return requestParams;
+                    },
+                    configuration: function () {
+                        return configuration;
+                    }
+                }
+            });
+        };
+
+        var openVfModuleWithHomingDataModal = function(action, vfModule)  {
+            modalInstance = $uibModal.open({
+                controller: 'vfModuleActionModalController',
+                templateUrl: 'app/vid/scripts/modals/vf-module-homing-data-action/vf-module-homing-data-action.html',
+                backdrop: false,
+                resolve: {
+                    action: function () {
+                        return action;
+                    },
+                    vfModule: function() {
+                        return vfModule;
+                    }
+                }
+            });
+
+            modalInstance.result.then(function (data) {
+                if (data.msoType && data.requestParams) {
+                    openMsoModal(data.msoType, data.requestParams, deleteOrResumeCallback, null);
+                }
+            });
+        };
+
+        function getLcpCloudRegionTenantList() {
+            AaiService.getLcpCloudRegionTenantList(DataService
+                .getGlobalCustomerId(), DataService.getServiceType(), function(
+                response) {
+                $scope.lcpAndTenant = response;
+                $scope.isFeatureFlagCloudOwner = featureFlags.isOn(COMPONENT.FEATURE_FLAGS.FLAG_1810_CR_ADD_CLOUD_OWNER_TO_MSO_REQUEST);
+                $scope.lcpRegionList = _.uniqBy(response, 'cloudRegionId');
+            });
+        }
+
+        $scope.deleteVfModule = function (serviceObject, vfModule, vnf) {
+            $scope.isSoftDeleteEnabled = true;
+
+            populate_popup_vfModule(serviceObject, vfModule, vnf);
+
+            if (DataService.getLoggedInUserId())  {
+                openVfModuleWithHomingDataModal(COMPONENT.DELETE, vfModule);
+            }
+            else {
+                AaiService.getLoggedInUserID(function (response) {
+                    var userID = response.data;
+                    DataService.setLoggedInUserId(userID);
+                    openVfModuleWithHomingDataModal(COMPONENT.DELETE, vfModule);
+                });
+            }
+            console.log("Removing VF-Module", vfModule);
+        };
+
+        function setCurrentServiceModelInfoFromScope() {
+            DataService.setModelInfo(COMPONENT.SERVICE, {
+                "modelInvariantId": $scope.service.model.service.invariantUuid,
+                "modelVersion": $scope.service.model.service.version,
+                "modelNameVersionId": $scope.service.model.service.uuid,
+                "modelName": $scope.service.model.service.name,
+                "inputs": ""
+            });
+        };
+
+        function setCurrentVNFModelInfo(vnf) {
+            var svcModel = $scope.service.convertedModel;
+            var vnfModel;
+            var vnfModelCustomizationUuid = vnf.object[FIELD.ID.MODEL_CUSTOMIZATION_ID];
+            var vnfModelVersionId = vnf.object[FIELD.ID.MODEL_VERSION_ID];
+            if ((!($scope.isObjectEmpty(svcModel))) && (!($scope.isObjectEmpty(svcModel.vnfs)))) {
+                if ((svcModel.isNewFlow) && (vnfModelCustomizationUuid != null)) {
+                    vnfModel = svcModel.vnfs[vnfModelCustomizationUuid];
+                }
+                else {
+                    vnfModel = svcModel.vnfs[vnfModelVersionId];
+                }
+                if (!($scope.isObjectEmpty(vnfModel))) {
+
+                    DataService.setModelInfo(COMPONENT.VNF, {
+                        "modelInvariantId": vnfModel.invariantUuid,
+                        "modelVersion": vnfModel.version,
+                        "modelNameVersionId": vnfModel.uuid,
+                        "modelCustomizationName": vnfModel.modelCustomizationName,
+                        "customizationUuid": vnfModel.customizationUuid,
+                        "modelName": vnfModel.name,
+                        "inputs": ""
+                    });
+                }
+            }
+
+
+        }
+
+        function setCurrentNetworkModelInfoFromScope(network) {
+            var svcModel = $scope.service.convertedModel;
+            var netModel;
+            // set model default and override later if found
+            DataService.setModelInfo(COMPONENT.NETWORK, {});
+
+            if (network.object != null) {
+
+                //var netModelInvariantUuid = network.object[FIELD.ID.MODEL_INVAR_ID];
+                var netModelVersionId = network.object[FIELD.ID.MODEL_VERSION_ID]; // model uuid
+                var netModelCustomizationUuid = network.object[FIELD.ID.MODEL_CUSTOMIZATION_ID];
+
+                if (UtilityService.hasContents(netModelCustomizationUuid)) {
+                    // set it to what came from a&ai
+                    DataService.setResCustomizationUuid(netModelCustomizationUuid);
+                }
+
+                if ((!($scope.isObjectEmpty(svcModel))) && (!($scope.isObjectEmpty(svcModel.networks)))) {
+                    if ((svcModel.isNewFlow) && (UtilityService.hasContents(netModelCustomizationUuid))) {
+                        netModel = svcModel.networks[netModelCustomizationUuid];
+                    }
+                    else {
+
+                        if (UtilityService.hasContents(netModelVersionId)) {
+                            netModel = svcModel.networks[netModelVersionId];
+                        }
+
+                    }
+                }
+            }
+            if (!($scope.isObjectEmpty(netModel))) {
+                DataService.setModelInfo(COMPONENT.NETWORK, {
+                    "modelInvariantId": netModel.invariantUuid,
+                    "modelVersion": netModel.version,
+                    "modelNameVersionId": netModel.uuid,
+                    "modelCustomizationName": netModel.modelCustomizationName,
+                    "customizationUuid": netModel.customizationUuid,
+                    "modelName": netModel.name,
+                    "inputs": ""
+                });
+            }
+        }
+
+        function setCurrentVfModuleModelInfoFromScope(vnf, vfModule) {
+
+            var svcModel = $scope.service.convertedModel;
+
+            //var vnfModelInvariantUuid = vnf.object[FIELD.ID.MODEL_INVAR_ID];
+            var vnfModelVersionId = vnf.object[FIELD.ID.MODEL_VERSION_ID];
+            var vnfModelCustomizationUuid = vnf.object[FIELD.ID.MODEL_CUSTOMIZATION_ID];
+            var vnfModel = null;
+            var vfModuleModel = null;
+
+            DataService.setModelInfo(COMPONENT.VF_MODULE, {
+                "modelInvariantId": "",
+                "modelVersion": "",
+                "modelNameVersionId": "",
+                "modelCustomizationName": "",
+                "customizationUuid": "",
+                "modelName": "",
+                "inputs": ""
+            });
+
+            if ((!($scope.isObjectEmpty(svcModel))) && (!($scope.isObjectEmpty(svcModel.vnfs)))) {
+                if ((svcModel.isNewFlow) && (vnfModelCustomizationUuid != null)) {
+                    vnfModel = svcModel.vnfs[vnfModelCustomizationUuid];
+
+                    var vfModuleCustomizationUuid = vfModule.object[FIELD.ID.MODEL_CUSTOMIZATION_ID];
+                    if (!($scope.isObjectEmpty(vnfModel)) && !($scope.isObjectEmpty(vnfModel.vfModules)) && UtilityService.hasContents(vfModuleCustomizationUuid)) {
+
+                        vfModuleModel = vnfModel.vfModules[vfModuleCustomizationUuid];
+
+                    }
+                }
+                else {
+                    // old flow
+                    if (vnfModelVersionId != null) {
+                        vnfModel = svcModel.vnfs[vnfModelVersionId];
+                    }
+                    //var vfModuleInvariantUuid = vfModule.object[FIELD.ID.MODEL_INVAR_ID];
+                    var vfModuleModelVersionId = vfModule.object[FIELD.ID.MODEL_VERSION_ID];
+                    if ((!($scope.isObjectEmpty(vnfModel))) && (!($scope.isObjectEmpty(vnfModel.vfModules))) &&
+                        UtilityService.hasContents(vfModuleModelVersionId)) {
+                        vfModuleModel = vnfModel.vfModules[vfModuleModelVersionId];
+                    }
+                }
+                if (!($scope.isObjectEmpty(vfModuleModel))) {
+                    DataService.setModelInfo(COMPONENT.VF_MODULE, {
+                        "modelInvariantId": vfModuleModel.invariantUuid,
+                        "modelVersion": vfModuleModel.version,
+                        "modelNameVersionId": vfModuleModel.uuid,
+                        "modelCustomizationName": vfModuleModel.modelCustomizationName,
+                        "customizationUuid": vfModuleModel.customizationUuid,
+                        "modelName": vfModuleModel.name,
+                        "inputs": ""
+                    });
+                }
+            }
+        }
+
+        function setCurrentVolumeGroupModelInfoFromScope(vnf, vfModule) {
+            var svcModel = $scope.service.convertedModel;
+
+            var vnfModelCustomizationUuid = null;
+            var vnfModel = null;
+            var vnfModelVersionId = null;
+
+            vnfModelVersionId = vnf.object[FIELD.ID.MODEL_VERSION_ID];
+            vnfModelCustomizationUuid = vnf.object[FIELD.ID.MODEL_CUSTOMIZATION_ID];
+
+            DataService.setModelInfo(COMPONENT.VOLUME_GROUP, {
+                "modelInvariantId": "",
+                "modelVersion": "",
+                "modelNameVersionId": "",
+                "modelCustomizationName": "",
+                "customizationUuid": "",
+                "modelName": "",
+                "inputs": ""
+            });
+
+            if ((!($scope.isObjectEmpty(svcModel))) && (!($scope.isObjectEmpty(svcModel.vnfs)))) {
+                if ((svcModel.isNewFlow) && (vnfModelCustomizationUuid != null)) {
+                    vnfModel = svcModel.vnfs[vnfModelCustomizationUuid];
+                }
+                else {
+                    vnfModel = svcModel.vnfs[vnfModelVersionId];
+                }
+            }
+
+
+            // volume groups don't have model-invariant-id/version in a&ai.
+            // Their model-invariant-id/version is the one for the associated vfModule
+
+            var vfModuleModelVersionId = vfModule.object[FIELD.ID.MODEL_VERSION_ID];
+            var vfModuleCustomizationUuid = vfModule.object[FIELD.ID.MODEL_CUSTOMIZATION_ID];
+            var volGroupModel = null;
+
+            if (!($scope.isObjectEmpty(vnfModel)) && !($scope.isObjectEmpty(vnfModel.volumeGroups))) {
+                if ((svcModel.isNewFlow) && (UtilityService.hasContents(vfModuleCustomizationUuid))) {
+                    volGroupModel = vnfModel.volumeGroups[vfModuleCustomizationUuid];
+                }
+                else {
+                    volGroupModel = vnfModel.volumeGroups[vfModuleModelVersionId];
+                }
+                if (!($scope.isObjectEmpty(volGroupModel))) {
+                    DataService.setModelInfo(COMPONENT.VOLUME_GROUP, {
+                        "modelInvariantId": volGroupModel.invariantUuid,
+                        "modelVersion": volGroupModel.version,
+                        "modelNameVersionId": volGroupModel.uuid,
+                        "modelCustomizationName": volGroupModel.modelCustomizationName,
+                        "customizationUuid": volGroupModel.customizationUuid,
+                        "modelName": volGroupModel.name,
+                        "inputs": ""
+                    });
+
+                }
+            }
+        }
+
+        function setCurrentVolumeGroupModelInfoByVfModuleFromScope(vnf, volumeGroup) {
+            var svcModel = $scope.service.convertedModel;
+
+            var vnfModelCustomizationUuid = null;
+            var vnfModel = null;
+            var vnfModelVersionId = null;
+
+            vnfModelVersionId = vnf.object[FIELD.ID.MODEL_VERSION_ID];
+            vnfModelCustomizationUuid = vnf.object[FIELD.ID.MODEL_CUSTOMIZATION_ID];
+
+            DataService.setModelInfo(COMPONENT.VOLUME_GROUP, {
+                "modelInvariantId": "",
+                "modelVersion": "",
+                "modelNameVersionId": "",
+                "modelCustomizationName": "",
+                "customizationUuid": "",
+                "modelName": "",
+                "inputs": ""
+            });
+
+            if ((!($scope.isObjectEmpty(svcModel))) && (!($scope.isObjectEmpty(svcModel.vnfs)))) {
+                if ((svcModel.isNewFlow) && (vnfModelCustomizationUuid != null)) {
+                    vnfModel = svcModel.vnfs[vnfModelCustomizationUuid];
+                }
+                else {
+                    vnfModel = svcModel.vnfs[vnfModelVersionId];
+                }
+            }
+
+
+            // volume groups don't have model-invariant-id/version in a&ai.
+            // Their model-invariant-id/version is the one for the associated vfModule
+
+            var vfModuleModelVersionId = volumeGroup.object[FIELD.ID.VF_MODULE_MODEL_VERSION_ID];
+            var vfModuleCustomizationUuid = volumeGroup.object[FIELD.ID.VF_MODULE_MODEL_CUSTOMIZATION_ID];
+            var volGroupModel = null;
+            if ((!($scope.isObjectEmpty(vnfModel))) && (!($scope.isObjectEmpty(vnfModel.volumeGroups)))) {
+                if ((svcModel.isNewFlow) && (UtilityService.hasContents(vfModuleCustomizationUuid))) {
+                    volGroupModel = vnfModel.volumeGroups[vfModuleCustomizationUuid];
+                }
+                else {
+                    volGroupModel = vnfModel.volumeGroups[vfModuleModelVersionId];
+                }
+                if (!($scope.isObjectEmpty(volGroupModel))) {
+                    DataService.setModelInfo(COMPONENT.VOLUME_GROUP, {
+                        "modelInvariantId": volGroupModel.invariantUuid,
+                        "modelVersion": volGroupModel.version,
+                        "modelNameVersionId": volGroupModel.uuid,
+                        "modelCustomizationName": volGroupModel.modelCustomizationName,
+                        "customizationUuid": volGroupModel.customizationUuid,
+                        "modelName": volGroupModel.name,
+                        "inputs": ""
+                    });
+
+                }
+            }
+        }
+
+        $scope.deleteVnf = function (serviceObject, vnf) {
+            console.log("Removing VNF " + vnf.name);
+
+            var serviceInstance = serviceObject.object;
+            var svcModel = $scope.service.convertedModel;
+            DataService.setInventoryItem(vnf.object);
+
+            /*var vnftype = vnf.object['vnf-type'];
+            if (vnftype == null)
+                vnftype = "";
+            else
+            {
+                var n = vnftype.search("/");
+                if (n >= 0)
+                    vnftype = vnftype.substring(n+1);
+            }*/
+
+            var svcModel = $scope.service.convertedModel;
+            var vnfModelInvariantUuid = null;
+            var vnfModelVersion = null;
+            var vnfModelCustomizationUuid = null;
+            var vnfModel = null;
+            var vnfModelVersionId = null;
+
+            vnfModelInvariantUuid = vnf.object[FIELD.ID.MODEL_INVAR_ID];
+            vnfModelVersionId = vnf.object[FIELD.ID.MODEL_VERSION_ID];
+            vnfModelCustomizationUuid = vnf.object[FIELD.ID.MODEL_CUSTOMIZATION_ID];
+
+            DataService.setModelInfo(COMPONENT.VNF, {
+                "modelInvariantId": vnfModelInvariantUuid,
+                "modelVersion": "",
+                "modelNameVersionId": vnfModelVersionId,
+                "modelCustomizationName": "",
+                "customizationUuid": vnfModelCustomizationUuid,
+                "modelName": "",
+                "inputs": ""
+            });
+
+            if ((!($scope.isObjectEmpty(svcModel))) && (!($scope.isObjectEmpty(svcModel.vnfs)))) {
+                if ((svcModel.isNewFlow) && (vnfModelCustomizationUuid != null)) {
+                    vnfModel = svcModel.vnfs[vnfModelCustomizationUuid];
+                }
+                else {
+                    vnfModel = svcModel.vnfs[vnfModelVersionId];
+                }
+                //console.log ( "vnf models: "); console.log ( JSON.stringify ($scope.service.convertedModel.vnfs, null, 4) );
+                if (!($scope.isObjectEmpty(vnfModel))) {
+
+                    DataService.setModelInfo(COMPONENT.VNF, {
+                        "modelInvariantId": vnfModel.invariantUuid,
+                        "modelVersion": vnfModel.version,
+                        "modelNameVersionId": vnfModel.uuid,
+                        "modelCustomizationName": vnfModel.modelCustomizationName,
+                        "customizationUuid": vnfModel.customizationUuid,
+                        "modelName": vnfModel.name,
+                        "inputs": ""
+                    });
+                }
+            }
+
+            DataService.setVnfInstanceId(vnf.object[FIELD.ID.VNF_ID]);
+
+            DataService.setSubscriberName(serviceObject[COMPONENT.SUBSCRIBER_NAME]);
+            DataService.setServiceType(serviceObject[COMPONENT.SERVICE_TYPE]);
+            DataService.setServiceInstanceId(serviceInstance[FIELD.ID.SERVICE_INSTANCE_ID]);
+
+            DataService.setGlobalCustomerId(serviceObject[FIELD.ID.GLOBAL_CUST_ID]);
+            DataService.setServiceInstanceName($scope.service.instance.name);
+
+            DataService.setServiceName($scope.service.model.service.name);
+
+            DataService.setServiceUuid($scope.service.model.service.uuid);
+
+            $scope.$broadcast(COMPONENT.DELETE_RESUME_COMPONENT, {
+                componentId: COMPONENT.VNF,
+                callbackFunction: deleteOrResumeCallback,
+                dialogMethod: COMPONENT.DELETE
+            });
+
+        };
+
+        $scope.deleteVolumeGroup = function (serviceObject, vnf, vfModule, volumeGroup) {
+
+            console.log("Removing Volume Group " + volumeGroup.name);
+            var haveModel = false;
+
+            var serviceInstance = serviceObject.object;
+
+            setCurrentVolumeGroupModelInfoFromScope(vnf, vfModule);
+
+            DataService.setInventoryItem(volumeGroup.object);
+
+            DataService.setSubscriberName(serviceObject[COMPONENT.SUBSCRIBER_NAME]);
+            DataService.setServiceType(serviceObject[COMPONENT.SERVICE_TYPE]);
+            DataService.setServiceInstanceId(serviceInstance[FIELD.ID.SERVICE_INSTANCE_ID]);
+
+            DataService.setGlobalCustomerId(serviceObject[FIELD.ID.GLOBAL_CUST_ID]);
+            DataService.setServiceInstanceName($scope.service.instance.name);
+
+            DataService.setServiceName($scope.service.model.service.name);
+
+            DataService.setServiceUuid($scope.service.model.service.uuid);
+            DataService.setVnfInstanceId(vnf.nodeId);
+            DataService.setVolumeGroupInstanceId(volumeGroup.nodeId);
+
+            $scope.$broadcast(COMPONENT.DELETE_RESUME_COMPONENT, {
+                componentId: COMPONENT.VOLUME_GROUP,
+                dialogMethod: COMPONENT.DELETE
+            });
+        };
+
+        $scope.deleteVnfVolumeGroup = function (serviceObject, vnf, volumeGroup) {
+
+            console.log("Removing Volume Group " + volumeGroup.name);
+            var serviceInstance = serviceObject.object;
+
+            DataService.setInventoryItem(volumeGroup.object);
+
+            var svcModel = $scope.service.convertedModel;
+
+            var vnfModelInvariantUuid = vnf.object[FIELD.ID.MODEL_INVAR_ID];
+            var vnfModelVersionId = vnf.object[FIELD.ID.MODEL_VERSION_ID];
+            var vnfModelCustomizationUuid = vnf.object[FIELD.ID.MODEL_CUSTOMIZATION_ID];
+
+            var volGroupModelInvariantUuid = volumeGroup.object[FIELD.ID.MODEL_INVAR_ID];
+            var volGroupModelVersionId = volumeGroup.object[FIELD.ID.MODEL_VERSION_ID];
+            var volGroupModelCustomizationUuid = volumeGroup.object[FIELD.ID.MODEL_CUSTOMIZATION_ID];
+
+            var vnfModel = null;
+            var volGroupModel = null;
+
+            // send an empty model by default since model is not required for deletes
+            DataService.setModelInfo(COMPONENT.VOLUME_GROUP, {});
+
+            if (svcModel.isNewFlow) {
+                vnfModel = svcModel.vnfs[vnfModelCustomizationUuid];
+                if (UtilityService.hasContents(volGroupModelCustomizationUuid)) {
+                    volGroupModel = vnfModel.volumeGroups[volGroupModelCustomizationUuid];
+                }
+            }
+            else {
+
+                vnfModel = svcModel.vnfs[vnfModelVersionId];
+                if (UtilityService.hasContents(volGroupModelVersionId)) {
+                    volGroupModel = vnfModel.volumeGroups[volGroupModelVersionId];
+                }
+            }
+            if (!($scope.isObjectEmpty(volGroupModel))) {
+                DataService.setModelInfo(COMPONENT.VOLUME_GROUP, {
+                    "modelInvariantId": volGroupModel.invariantUuid,
+                    "modelVersion": volGroupModel.version,
+                    "modelNameVersionId": volGroupModel.uuid,
+                    "modelName": volGroupModel.name,
+                    "modelCustomizationName": volGroupModel.modelCustomizationName,
+                    "customizationUuid": volGroupModel.customizationUuid,
+                    "inputs": ""
+                });
+            }
+
+            DataService.setVnfInstanceId(vnf.object[FIELD.ID.VNF_ID]);
+
+            DataService.setSubscriberName(serviceObject[COMPONENT.SUBSCRIBER_NAME]);
+            DataService.setServiceType(serviceObject[COMPONENT.SERVICE_TYPE]);
+            DataService.setServiceInstanceId(serviceInstance[FIELD.ID.SERVICE_INSTANCE_ID]);
+
+            DataService.setGlobalCustomerId(serviceObject[FIELD.ID.GLOBAL_CUST_ID]);
+            DataService.setServiceInstanceName($scope.service.instance.name);
+
+            DataService.setServiceName($scope.service.model.service.name);
+
+            DataService.setServiceUuid($scope.service.model.service.uuid);
+            DataService.setVnfInstanceId(vnf.nodeId);
+            DataService.setVolumeGroupInstanceId(volumeGroup.nodeId);
+
+            $scope.$broadcast(COMPONENT.DELETE_RESUME_COMPONENT, {
+                componentId: COMPONENT.VOLUME_GROUP,
+                callbackFunction: deleteOrResumeCallback,
+                dialogMethod: COMPONENT.DELETE
+            });
+        };
+
+        $scope.describeNetwork = function (serviceObject, networkObject) {
+            var serviceInstance = serviceObject.object;
+            var network = networkObject.object;
+            //console.log ("networkObject="); console.log (JSON.stringify(networkObject, null, 4));
+
+            DataService.setResCustomizationUuid(" ");
+
+            setCurrentServiceModelInfoFromScope();
+            setCurrentNetworkModelInfoFromScope(networkObject);
+
+            DataService.setNetworkInstanceId(network[FIELD.ID.NETWORK_ID]);
+            DataService.setInventoryItem(networkObject);
+            DataService.setSubscriberName(serviceObject.subscriberName);
+            DataService.setServiceType(serviceObject[COMPONENT.SERVICE_TYPE]);
+            DataService.setServiceInstanceId(serviceInstance[FIELD.ID.SERVICE_INSTANCE_ID]);
+
+            $scope.$broadcast(COMPONENT.SHOW_COMPONENT_DETAILS, {
+                componentId: COMPONENT.NETWORK
+            });
+        };
+
+        // for service instance id - no need for this!
+        $scope.describeService = function (serviceObject) {
+            var serviceInstance = serviceObject.object;
+            setCurrentServiceModelInfoFromScope();
+
+            DataService.setInventoryItem(serviceInstance);
+            //DataService.setModelInfo(serviceInstance['service-instance-id'], serviceInstance);
+
+            DataService.setSubscriberName(serviceObject[COMPONENT.SUBSCRIBER_NAME]);
+            DataService.setServiceType(serviceObject[COMPONENT.SERVICE_TYPE]);
+            DataService.setServiceInstanceId(serviceInstance[FIELD.ID.SERVICE_INSTANCE_ID]);
+
+            //Display popup with additional service information
+            $scope.$broadcast(COMPONENT.SHOW_COMPONENT_DETAILS, {
+                componentId: COMPONENT.SERVICE
+            });
+
+        };
+
+        $scope.describeVfModule = function (serviceObject, vfModuleObject, vnf) {
+            var serviceInstance = serviceObject.object;
+            var vfModule = vfModuleObject.object;
+
+            /*var vfModuleInvariantUuid = vfModule[FIELD.ID.MODEL_INVAR_ID];
+            var vfModuleModelVersionId = vfModule[FIELD.ID.MODEL_VERSION_ID];*/
+            var vfModuleCustomizationUuid = vfModule[FIELD.ID.MODEL_CUSTOMIZATION_ID];
+
+            setCurrentServiceModelInfoFromScope();
+            setCurrentVfModuleModelInfoFromScope(vnf, vfModuleObject);
+
+            DataService.setCustomizationUuid(" ");
+            if (UtilityService.hasContents(vfModuleCustomizationUuid)) {
+                DataService.setCustomizationUuid(vfModuleCustomizationUuid);
+            }
+
+            //Display popup with additional VF-Module information
+            DataService.setVfModuleInstanceId(vfModule[FIELD.ID.VF_MODULE_ID]);
+            DataService.setInventoryItem(vfModule);
+
+            DataService.setSubscriberName(serviceObject[COMPONENT.SUBSCRIBER_NAME]);
+            DataService.setServiceType(serviceObject[COMPONENT.SERVICE_TYPE]);
+            DataService.setServiceInstanceId(serviceInstance[FIELD.ID.SERVICE_INSTANCE_ID]);
+
+            $scope.$broadcast(COMPONENT.SHOW_COMPONENT_DETAILS, {
+                componentId: COMPONENT.VF_MODULE
+            });
+        };
+
+        $scope.getStatusOfVnf = function (serviceObject, vnfObject) {
+            var serviceInstance = serviceObject.object;
+            var vnf = vnfObject.object;
+
+            DataService.setVnfInstanceId(vnf[FIELD.ID.VNF_ID]);
+            DataService.setInventoryItem(vnf);
+
+            DataService.setSubscriberName(serviceObject[COMPONENT.SUBSCRIBER_NAME]);
+            DataService.setServiceType(serviceObject[COMPONENT.SERVICE_TYPE]);
+            DataService.setServiceInstanceId(serviceInstance[FIELD.ID.SERVICE_INSTANCE_ID]);
+            DataService.setServiceInstanceName(serviceInstance[FIELD.ID.SERVICE_INSTANCE_NAME]);
+
+            $scope.$broadcast(COMPONENT.COMPONENT_STATUS, {
+                componentId: COMPONENT.VNF,
+                callbackFunction: updateProvStatusVnfCallbackFunction
+            });
+        };
+
+        $scope.describeVnf = function (serviceObject, vnfObject) {
+            var serviceInstance = serviceObject.object;
+            var vnf = vnfObject.object;
+            DataService.setResCustomizationUuid(" ");
+
+            //var vnfInvariantUuid = vnf[FIELD.ID.MODEL_INVAR_ID];
+            //var vnfVersionId = vnf[FIELD.ID.MODEL_VERSION_ID];
+            var vnfCustomizationUuid = vnf[FIELD.ID.MODEL_CUSTOMIZATION_ID];
+
+            if (UtilityService.hasContents(vnfCustomizationUuid)) {
+                DataService.setResCustomizationUuid(vnfCustomizationUuid);
+            }
+
+            setCurrentServiceModelInfoFromScope();
+            setCurrentVNFModelInfo(vnfObject);
+
+            //Display popup with additional VNF information
+            DataService.setVnfInstanceId(vnf[FIELD.ID.VNF_ID]);
+            DataService.setInventoryItem(vnf);
+
+            DataService.setSubscriberName(serviceObject[COMPONENT.SUBSCRIBER_NAME]);
+            DataService.setServiceType(serviceObject[COMPONENT.SERVICE_TYPE]);
+            DataService.setServiceInstanceId(serviceInstance[FIELD.ID.SERVICE_INSTANCE_ID]);
+
+            $scope.$broadcast(COMPONENT.SHOW_COMPONENT_DETAILS, {
+                componentId: COMPONENT.VNF
+            });
+        };
+
+        $scope.describeVolumeGroup = function (serviceObject, vnf, volumeGroupObject) {
+
+            var serviceInstance = serviceObject.object;
+            var volumeGroup = volumeGroupObject.object;
+
+            var volGroupCustomizationUuid = volumeGroup[FIELD.ID.MODEL_CUSTOMIZATION_ID];
+
+            setCurrentServiceModelInfoFromScope();
+            setCurrentVolumeGroupModelInfoByVfModuleFromScope(vnf, volumeGroupObject);
+
+            DataService.setCustomizationUuid(" ");
+            if (UtilityService.hasContents(volGroupCustomizationUuid)) {
+                DataService.setCustomizationUuid(volGroupCustomizationUuid);
+            }
+            DataService.setVolumeGroupInstanceId(volumeGroup[FIELD.ID.VOLUME_GROUP_ID]);
+            DataService.setInventoryItem(volumeGroup);
+
+            DataService.setSubscriberName(serviceObject[COMPONENT.SUBSCRIBER_NAME]);
+            DataService.setServiceType(serviceObject[COMPONENT.SERVICE_TYPE]);
+            DataService.setServiceInstanceId(serviceInstance[FIELD.ID.SERVICE_INSTANCE_ID]);
+
+
+            $scope.$broadcast(COMPONENT.SHOW_COMPONENT_DETAILS, {
+                componentId: COMPONENT.VOLUME_GROUP
+            });
+        };
+
+        $scope.addNetworkInstance = function (netModel, existingVnfs) {
+
+            // For networks we assume that we always follow the new flow
+            console.log("Adding network to service instance" + this.service.instance.name);
+            if (VIDCONFIGURATION.VNF_STATUS_CHECK_ENABLED && (UtilityService.hasContents(existingVnfs)) && (existingVnfs.length > 0)) {
+                var msg = VnfService.isVnfListStatusValid(existingVnfs);
+                if (msg != "") {
+                    alert(msg);
+                    return;
+                }
+            }
+
+            DataService.setSubscriberName($scope.service.instance.subscriberName);
+            DataService.setGlobalCustomerId($scope.service.instance.globalCustomerId);
+            DataService.setServiceType($scope.service.instance.serviceType);
+            DataService.setServiceInstanceName($scope.service.instance.name);
+            DataService.setServiceInstanceId($scope.service.instance.id);
+            DataService.setServiceName($scope.service.model.service.name);
+
+            DataService.setModelInfo(COMPONENT.NETWORK, {
+                "modelType": "network",
+                "modelInvariantId": netModel.invariantUuid,
+                "modelVersion": netModel.version,
+                "modelNameVersionId": netModel.uuid,
+                "modelName": netModel.name,
+                "modelCustomizationName": netModel.modelCustomizationName,
+                "customizationUuid": netModel.customizationUuid,
+                "inputs": "",
+                "displayInputs": netModel.displayInputs
+            });
+            setCurrentServiceModelInfoFromScope();
+
+
+            $scope.$broadcast(COMPONENT.CREATE_COMPONENT, {
+                componentId: COMPONENT.NETWORK,
+                callbackFunction: createVnfCallbackFunction
+            });
+        };
+
+        $scope.addVnfInstance = function (vnf, existingVnfs) {
+
+            if (VIDCONFIGURATION.VNF_STATUS_CHECK_ENABLED && (UtilityService.hasContents(existingVnfs)) && (existingVnfs.length > 0)) {
+                var msg = VnfService.isVnfListStatusValid(existingVnfs);
+                if (msg != "") {
+                    alert(msg);
+                    return;
+                }
+            }
+
+            var isVfc = false;
+
+            _.map($scope.service.model.vnfs, function (value, key) {
+                if (value.uuid == vnf.uuid && !_.isEmpty(value.vfcInstanceGroups)) {
+                        isVfc = true;
+                        var queryData = {
+                            serviceModelId: $scope.service.model.service.uuid,
+                            serviceInstanceID: $scope.service.instance.id,
+                            globalCustomerId: $scope.service.instance.globalCustomerId,
+                            serviceType: $scope.service.instance.serviceType,
+                            serviceInstanceName: $scope.service.instance.name,
+                            modelCustomizationName: value.modelCustomizationName,
+                            modelCustomizationId: value.customizationUuid,
+                            subscriberName: $scope.service.instance.subscriberName
+                        };
+
+                        $scope.$broadcast(COMPONENT.IFRAME_DIALOG, queryData);
+                        return;
+                    }
+            });
+
+            DataService.setSubscriberName($scope.service.instance.subscriberName);
+            DataService.setGlobalCustomerId($scope.service.instance.globalCustomerId);
+            DataService.setServiceType($scope.service.instance.serviceType);
+            DataService.setServiceInstanceName($scope.service.instance.name);
+            DataService.setServiceInstanceId($scope.service.instance.id);
+            DataService.setServiceName($scope.service.model.service.name);
+
+            console.log("existingVnfs: ");
+            console.log(JSON.stringify(existingVnfs, null, 4));
+            console.log("existingVnfs: ");
+            console.log(JSON.stringify(existingVnfs, null, 4));
+            var vnf_type = "";
+            var vnf_role = "";
+            var vnf_function = "";
+            var vnf_code = "";
+
+            if (UtilityService.hasContents(vnf.nfType)) {
+                vnf_type = vnf.nfType;
+            }
+            if (UtilityService.hasContents(vnf.nfRole)) {
+                vnf_role = vnf.nfRole;
+            }
+            if (UtilityService.hasContents(vnf.nfFunction)) {
+                vnf_function = vnf.nfFunction;
+            }
+            if (UtilityService.hasContents(vnf.nfCode)) {
+                vnf_code = vnf.nfCode;
+            }
+            DataService.setModelInfo(COMPONENT.VNF, {
+                "modelType": vnf.isPnf ? "pnf" : "vnf",
+                "modelInvariantId": vnf.invariantUuid,
+                "modelVersion": vnf.version,
+                "modelNameVersionId": vnf.uuid,
+                "modelName": vnf.name,
+                "modelCustomizationName": vnf.modelCustomizationName,
+                "customizationUuid": vnf.customizationUuid,
+                "inputs": "",
+                "displayInputs": vnf.displayInputs,
+                "vnfType": vnf_type,
+                "vnfRole": vnf_role,
+                "vnfFunction": vnf_function,
+                "vnfCode": vnf_code,
+                "properties": vnf.properties
+            });
+
+            DataService.setModelInstanceName($scope.service.model.service.name);
+            setCurrentServiceModelInfoFromScope();
+
+            if (vnf.isConfig) {
+                DataService.setServiceProxies($scope.service.model.serviceProxies);
+                DataService.setSourceServiceProxies(vnf.sourceNodes);
+                DataService.setCollectorServiceProxies(vnf.collectorNodes);
+                DataService.setConfigurationByPolicy(vnf.isConfigurationByPolicy);
+                $location.path("/addNetworkNode");
+            } else if (vnf.isPnf) {
+                $location.path("/pnfSearchAssociation");
+            } else if (isVfc) {
+                //do nothing
+            } else {
+                $scope.$broadcast(COMPONENT.CREATE_COMPONENT, {
+                    componentId: COMPONENT.VNF,
+                    callbackFunction: createVnfCallbackFunction
+                });
+            }
+        };
+
+        $scope.addVfModuleInstance = function (vnfInstance, vfModuleModel) {
+
+            if (VIDCONFIGURATION.VNF_STATUS_CHECK_ENABLED) {
+                var msg = VnfService.isVnfStatusValid(vnfInstance);
+                if (msg != "") {
+                    alert(msg);
+                    return;
+                }
+
+            }
+            var svcModel = $scope.service.convertedModel;
+            DataService.setSubscriberName($scope.service.instance.subscriberName);
+            DataService.setGlobalCustomerId($scope.service.instance.globalCustomerId);
+            DataService.setServiceType($scope.service.instance.serviceType);
+            DataService.setServiceInstanceName($scope.service.instance.name);
+            DataService.setServiceInstanceId($scope.service.instance.id);
+            DataService.setServiceName($scope.service.model.service.name);
+
+            var vnfModelInvariantUuid = vnfInstance.object[FIELD.ID.MODEL_INVAR_ID];
+            var vnfModelVersionId = vnfInstance.object[FIELD.ID.MODEL_VERSION_ID];
+            var vnfModelCustomizationUuid = vnfInstance.object[FIELD.ID.MODEL_CUSTOMIZATION_ID];
+            var vnfModel = null;
+            if (svcModel.isNewFlow) {
+                vnfModel = svcModel.vnfs[vnfModelCustomizationUuid];
+            }
+            else {
+                vnfModel = svcModel.vnfs[vnfModelVersionId];
+            }
+
+            var availableVolumeGroupList = [];
+            angular.forEach(vnfInstance[FIELD.ID.AVAILABLEVOLUMEGROUPS], function (volumeGroupInstance, key) {
+                availableVolumeGroupList.push({"instance": volumeGroupInstance});
+            });
+
+            DataService.setAvailableVolumeGroupList(availableVolumeGroupList);
+            setCurrentServiceModelInfoFromScope();
+
+            DataService.setVnfInstanceId(vnfInstance.object[FIELD.ID.VNF_ID]);
+
+            DataService.setModelInfo(COMPONENT.VNF, {
+                "modelInvariantId": vnfModel.invariantUuid,
+                "modelVersion": vnfModel.version,
+                "modelNameVersionId": vnfModel.uuid,
+                "modelName": vnfModel.name,
+                "modelCustomizationName": vnfModel.modelCustomizationName,
+                "customizationUuid": vnfModel.customizationUuid,
+                "inputs": ""
+            });
+
+            DataService.setModelInfo(COMPONENT.VF_MODULE, {
+                "modelInvariantId": vfModuleModel.invariantUuid,
+                "modelVersion": vfModuleModel.version,
+                "modelNameVersionId": vfModuleModel.uuid,
+                "customizationUuid": vfModuleModel.customizationUuid,
+                "modelCustomizationName": vfModuleModel.modelCustomizationName,
+                "modelName": vfModuleModel.name,
+                "inputs": ""
+            });
+
+            $scope.$broadcast(COMPONENT.CREATE_COMPONENT, {
+                componentId: COMPONENT.VF_MODULE,
+                callbackFunction: createVfModuleCallbackFunction
+            });
+
+        };
+
+        $scope.addVolumeGroupInstance = function (vnfInstance, volumeGroupModel) {
+            if (VIDCONFIGURATION.VNF_STATUS_CHECK_ENABLED) {
+                var msg = VnfService.isVnfStatusValid(vnfInstance);
+                if (msg != "") {
+                    alert(msg);
+                    return;
+                }
+            }
+            var svcModel = $scope.service.convertedModel;
+            DataService.setSubscriberName($scope.service.instance.subscriberName);
+            DataService.setGlobalCustomerId($scope.service.instance.globalCustomerId);
+            DataService.setServiceType($scope.service.instance.serviceType);
+            DataService.setServiceInstanceName($scope.service.instance.name);
+            DataService.setServiceInstanceId($scope.service.instance.id);
+            DataService.setServiceName($scope.service.model.service.name);
+            setCurrentServiceModelInfoFromScope();
+
+            DataService.setModelInfo(COMPONENT.SERVICE, {
+                "modelInvariantId": $scope.service.model.service.invariantUuid,
+                "modelVersion": $scope.service.model.service.version,
+                "modelNameVersionId": $scope.service.model.service.uuid,
+                "modelName": $scope.service.model.service.name,
+                "inputs": ""
+            });
+
+            DataService.setVnfInstanceId(vnfInstance.object[FIELD.ID.VNF_ID]);
+
+            var vnfModelInvariantUuid = vnfInstance.object[FIELD.ID.MODEL_INVAR_ID];
+            var vnfModelVersionId = vnfInstance.object[FIELD.ID.MODEL_VERSION_ID];
+            var vnfCustomizationUuid = vnfInstance.object[FIELD.ID.MODEL_CUSTOMIZATION_ID];
+            var vnfModel = null;
+
+            if (svcModel.isNewFlow) {
+                vnfModel = svcModel.vnfs[vnfCustomizationUuid];
+            }
+            else {
+                vnfModel = svcModel.vnfs[vnfModelVersionId];
+            }
+
+            DataService.setModelInfo(COMPONENT.VNF, {
+                "modelInvariantId": vnfModel.invariantUuid,
+                "modelVersion": vnfModel.version,
+                "modelNameVersionId": vnfModel.uuid,
+                "modelName": vnfModel.name,
+                "modelCustomizationName": vnfModel.modelCustomizationName,
+                "customizationUuid": vnfModel.customizationUuid,
+                "inputs": ""
+            });
+
+            DataService.setModelInfo(COMPONENT.VOLUME_GROUP, {
+                "modelInvariantId": volumeGroupModel.invariantUuid,
+                "modelVersion": volumeGroupModel.version,
+                "modelNameVersionId": volumeGroupModel.uuid,
+                "modelName": volumeGroupModel.name,
+                "modelCustomizationName": volumeGroupModel.modelCustomizationName,
+                "customizationUuid": volumeGroupModel.customizationUuid,
+                "inputs": ""
+            });
+
+            $scope.$broadcast(COMPONENT.CREATE_COMPONENT, {
+                componentId: COMPONENT.VOLUME_GROUP,
+                callbackFunction: createVolumeGroupCallbackFunction
+            });
+        };
+
+        $scope.resume = function (serviceObject, vfModule, vnfModel) {
+            populate_popup_vfModule(serviceObject, vfModule, vnfModel);
+            setCurrentVNFModelInfo(vnfModel);
+
+            var availableVolumeGroupList = [];
+            angular.forEach(vfModule.volumeGroups, function (volumeGroupInstance, key) {
+                availableVolumeGroupList.push({"instance": volumeGroupInstance});
+            });
+
+            DataService.setAvailableVolumeGroupList(availableVolumeGroupList);
+
+            DataService.setVfModuleInstanceName(vfModule.object[FIELD.ID.VF_MODULE_NAME]);
+            setCurrentServiceModelInfoFromScope();
+
+            if (DataService.getLoggedInUserId())  {
+                openVfModuleWithHomingDataModal(COMPONENT.RESUME, vfModule);
+            }
+            else {
+                AaiService.getLoggedInUserID(function (response) {
+                    var userID = response.data;
+                    DataService.setLoggedInUserId(userID);
+                    openVfModuleWithHomingDataModal(COMPONENT.RESUME, vfModule);
+                });
+            }
+        };
+
+        $scope.deleteConfiguration = function (serviceObject, configuration) {
+            console.log("Deleting Configuration " + configuration.name);
+
+            var serviceInstance = serviceObject.object;
+            var svcModel = $scope.service.convertedModel;
+            var configModel;
+            DataService.setInventoryItem(configuration.object);
+            // set model default and override later if found
+            DataService.setModelInfo(COMPONENT.CONFIGURATION, {});
+
+            if (configuration.object != null) {
+
+                //var netModelInvariantUuid = network.object[FIELD.ID.MODEL_INVAR_ID];
+                var configModelVersionId = configuration.object[FIELD.ID.MODEL_VERSION_ID]; // model uuid
+                var configModelCustomizationUuid = configuration.object[FIELD.ID.MODEL_CUSTOMIZATION_ID];
+
+                //configurations added to vnfs list, in order to be part of the "Add VNF" drop-down list
+                if ((!($scope.isObjectEmpty(svcModel))) && (!($scope.isObjectEmpty(svcModel.vnfs)))) {
+                    if ((svcModel.isNewFlow) && (UtilityService.hasContents(configModelCustomizationUuid))) {
+                        configModel = svcModel.vnfs[configModelCustomizationUuid];
+                    }
+                    else {
+
+                        if (UtilityService.hasContents(configModelVersionId)) {
+                            configModel = svcModel.vnfs[configModelVersionId];
+                        }
+
+                    }
+                }
+            }
+            if (!($scope.isObjectEmpty(configModel))) {
+                DataService.setModelInfo(COMPONENT.CONFIGURATION, {
+                    "modelInvariantId": configModel.invariantUuid,
+                    "modelVersion": configModel.version,
+                    "modelNameVersionId": configModel.uuid,
+                    "modelCustomizationName": configModel.modelCustomizationName,
+                    "customizationUuid": configModel.customizationUuid,
+                    "modelName": configModel.name,
+                    "inputs": ""
+                });
+            }
+
+            DataService.setSubscriberName(serviceObject[COMPONENT.SUBSCRIBER_NAME]);
+            DataService.setServiceType(serviceObject[COMPONENT.SERVICE_TYPE]);
+            DataService.setServiceInstanceId(serviceInstance[FIELD.ID.SERVICE_INSTANCE_ID]);
+
+            DataService.setGlobalCustomerId(serviceObject[FIELD.ID.GLOBAL_CUST_ID]);
+            DataService.setServiceInstanceName($scope.service.instance.name);
+            DataService.setServiceName($scope.service.model.service.name);
+            DataService.setServiceUuid($scope.service.model.service.uuid);
+            DataService.setConfigurationInstanceId(configuration.object[FIELD.ID.CONFIGURATION_ID]);
+
+            $scope.$broadcast(COMPONENT.DELETE_RESUME_COMPONENT, {
+                componentId: COMPONENT.CONFIGURATION,
+                dialogMethod: COMPONENT.DELETE,
+                callbackFunction: deleteCallbackFunction
+            });
+        };
+
+        var deleteCallbackFunction = function () {
+            console.log('hi')
+        };
+
+        $scope.resetProgress = function () {
+            $scope.percentProgress = 0;
+            $scope.progressClass = FIELD.STYLE.PROGRESS_BAR_INFO;
+        };
+
+        $scope.setProgress = function (percentProgress) {
+            percentProgress = parseInt(percentProgress);
+            if (percentProgress >= 100) {
+                $scope.progressClass = FIELD.STYLE.PROGRESS_BAR_SUCCESS;
+            }
+
+            if (percentProgress < $scope.percentProgress) {
+                return;
+            }
+
+            $scope.percentProgress = percentProgress;
+            $scope.progressWidth = {width: percentProgress + "%"};
+            if (percentProgress >= 5) {
+                $scope.progressText = percentProgress + " %";
+            } else {
+                // Hidden since color combination is barely visible when progress portion is narrow.
+                $scope.progressText = "";
+            }
+        };
+        $scope.isObjectEmpty = function (o) {
+            var len = 0;
+            if (UtilityService.hasContents(o)) {
+                var keys = Object.keys(o);
+                len = keys.length;
+                if (len == 0) {
+                    return true;
+                }
+                else {
+                    return false;
+                }
+            }
+            else {
+                return true;
+            }
+        };
+        $scope.isMacro = function () {
+            return $scope.service && AsdcService.isMacro($scope.service.model);
+        };
+        $scope.reloadRoute = function () {
+            $route.reload();
+        };
+
+
+        /*
+Private metthods
+*/
+
+        /*
+        setPnf
+        * set the controller pnf param using api call
+        * return: void
+         */
+        function _setPnf(data) { // data is the $scope.service.instance object
+            return PnfService.getPnfs(data)
+                .then(
+                    function (response) {
+                        return response.data;
+                        // * can add here changes on the data that are needed to the view ( filter, ect..)
+                    },
+                    function (error) {
+                        console.error(error);
+                    }
+                );
+        }
+
+
+        function _setCr(data) { // data is the $scope.service.instance object
+            return CrService.getCr(data)
+                .then(
+                    function (response) {
+                        return response.data.results;
+                        // * can add here changes on the data that are needed to the view ( filter, ect..)
+                    },
+                    function (error) {
+                        console.error(error);
+                    }
+                );
+        }
+
+
+        /*
+        Callbaks functions
+
+         */
+        var updateProvStatusVnfCallbackFunction = function (response) {
+            $scope.callbackResults = "";
+            var color = FIELD.ID.COLOR_NONE;
+            $scope.callbackStyle = {
+                "background-color": color
+            };
+            $scope.reloadRoute();
+            /*
+             * This 1/2 delay was only added to visually highlight the status
+             * change. Probably not needed in the real application code.
+             */
+            $timeout(function () {
+                $scope.callbackResults = UtilityService.getCurrentTime()
+                    + FIELD.STATUS.IS_SUCCESSFUL + response.isSuccessful;
+                if (response.isSuccessful) {
+                    color = FIELD.ID.COLOR_8F8;
+
+                } else {
+                    color = FIELD.ID.COLOR_F88;
+                }
+                $scope.callbackStyle = {
+                    "background-color": color
+                };
+            }, 500);
+
+        };
+
+        var createVnfCallbackFunction = function (response) {
+            $scope.callbackResults = "";
+            var color = FIELD.ID.COLOR_NONE;
+            $scope.callbackStyle = {
+                "background-color": color
+            };
+
+            /*
+             * This 1/2 delay was only added to visually highlight the status
+             * change. Probably not needed in the real application code.
+             */
+            $timeout(function () {
+                $scope.callbackResults = UtilityService.getCurrentTime()
+                    + FIELD.STATUS.IS_SUCCESSFUL + response.isSuccessful;
+                if (response.isSuccessful) {
+                    color = FIELD.ID.COLOR_8F8;
+                    $scope.reloadRoute();
+                } else {
+                    color = FIELD.ID.COLOR_F88;
+                }
+                $scope.callbackStyle = {
+                    "background-color": color
+                };
+            }, 500);
+
+
+        };
+
+        var deleteOrResumeCallback = function (response) {
+            $scope.callbackResults = "";
+            var color = FIELD.ID.COLOR_NONE;
+            $scope.callbackStyle = {
+                "background-color": color
+            };
+
+            /*
+             * This 1/2 delay was only added to visually highlight the status
+             * change. Probably not needed in the real application code.
+             */
+            $timeout(function () {
+                $scope.callbackResults = UtilityService.getCurrentTime()
+                    + FIELD.STATUS.IS_SUCCESSFUL + response.isSuccessful;
+                if (response.isSuccessful) {
+                    color = FIELD.ID.COLOR_8F8;
+                    $scope.reloadRoute();
+                } else {
+                    color = FIELD.ID.COLOR_F88;
+                }
+                $scope.callbackStyle = {
+                    "background-color": color
+                };
+            }, 500);
+
+        };
+
+        var createVfModuleCallbackFunction = function (response) {
+            $scope.callbackResults = "";
+            var color = FIELD.ID.COLOR_NONE;
+            $scope.callbackStyle = {
+                "background-color": color
+            };
+
+            /*
+             * This 1/2 delay was only added to visually highlight the status
+             * change. Probably not needed in the real application code.
+             */
+            $timeout(function () {
+                $scope.callbackResults = UtilityService.getCurrentTime()
+                    + FIELD.STATUS.IS_SUCCESSFUL + response.isSuccessful;
+                if (response.isSuccessful) {
+                    color = FIELD.ID.COLOR_8F8;
+                    $scope.reloadRoute();
+                } else {
+                    color = FIELD.ID.COLOR_F88;
+                    $scope.reloadRoute();
+                }
+                $scope.callbackStyle = {
+                    "background-color": color
+                };
+            }, 500);
+
+        };
+
+        var deleteServiceInstanceCallbackFunction = function (response) {
+            $scope.callbackResults = "";
+            var color = FIELD.ID.COLOR_NONE;
+            $scope.callbackStyle = {
+                "background-color": color
+            };
+
+            /*
+             * This 1/2 delay was only added to visually highlight the status
+             * change. Probably not needed in the real application code.
+             */
+            $timeout(function () {
+                $scope.callbackResults = UtilityService.getCurrentTime()
+                    + FIELD.STATUS.IS_SUCCESSFUL + response.isSuccessful;
+                if (response.isSuccessful) {
+                    color = FIELD.ID.COLOR_8F8;
+                    $location.path(COMPONENT.SERVICEMODELS_MODELS_SERVICES_PATH);
+                } else {
+                    color = FIELD.ID.COLOR_F88;
+                }
+                $scope.callbackStyle = {
+                    "background-color": color
+                };
+            }, 500);
+
+        };
+
+        var createVolumeGroupCallbackFunction = function (response) {
+            $scope.callbackResults = "";
+            var color = FIELD.ID.COLOR_NONE;
+            $scope.callbackStyle = {
+                "background-color": color
+            };
+
+            /*
+             * This 1/2 delay was only added to visually highlight the status
+             * change. Probably not needed in the real application code.
+             */
+            $timeout(function () {
+                $scope.callbackResults = UtilityService.getCurrentTime()
+                    + FIELD.STATUS.IS_SUCCESSFUL + response.isSuccessful;
+                if (response.isSuccessful) {
+                    color = FIELD.ID.COLOR_8F8;
+                    $scope.reloadRoute();
+                } else {
+                    color = FIELD.ID.COLOR_F88;
+                }
+                $scope.callbackStyle = {
+                    "background-color": color
+                };
+            }, 500);
+
+
+        };
+
+    });
+})();
index 6399065..8856d18 100755 (executable)
-<!--\r
-  ============LICENSE_START=======================================================\r
-  VID\r
-  ================================================================================\r
-  Copyright (C) 2017 - 2019 AT&T Intellectual Property. All rights reserved.\r
-  ================================================================================\r
-  Licensed under the Apache License, Version 2.0 (the "License");\r
-  you may not use this file except in compliance with the License.\r
-  You may obtain a copy of the License at\r
-  \r
-       http://www.apache.org/licenses/LICENSE-2.0\r
-  \r
-  Unless required by applicable law or agreed to in writing, software\r
-  distributed under the License is distributed on an "AS IS" BASIS,\r
-  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\r
-  See the License for the specific language governing permissions and\r
-  limitations under the License.\r
-  ============LICENSE_END=========================================================\r
-  -->\r
-\r
-<div>\r
-\r
-    <div popup-window class="popupContents" ngx-show="{{popup.isVisible}}"\r
-         ng-cloak>\r
-        <div ng-include="'app/vid/scripts/view-models/creationDialog.htm'"></div>\r
-        <div ng-include="'app/vid/scripts/view-models/deleteResumeDialog.htm'"></div>\r
-        <div ng-include="'app/vid/scripts/view-models/detailsDialog.htm'"></div>\r
-        <div ng-include="'app/vid/scripts/view-models/statusDialog.htm'"></div>\r
-        <div ng-include="'app/vid/scripts/view-models/iframeDialog.htm'"></div>\r
-    </div>\r
-    <div ng-controller="aaiSubscriberController" ng-init="getComponentList() ">\r
-        <div class="statusLine" ng-class="{true:'aaiVisible', false:'aaiHidden'}[isSpinnerVisible]">\r
-            <img src="app/vid/images/spinner.gif"></img>\r
-            <label>Status:</label><span class="status">{{status}}</span>\r
-        </div>\r
-\r
-        <div class="error-msg" ng-if="errorMsg != null" style="white-space: pre-line"><font color='red'>{{errorMsg}}\r
-            <pre>{{errorDetails | json}}</pre>\r
-        </font></div>\r
-\r
-        <h1 class="heading1" style="margin-top: 20px;">{{isPermitted ? "View/Edit" : "View"}} Service Instance</h1>\r
-        <a class="btn btn-primary btn-xs pull-right" ng-click="reloadRoute();"><span\r
-                class="glyphicon glyphicon-refresh"></span></a>\r
-        <a class="pull-right btn btn-primary btn-xs" data-nodrag\r
-           data-tests-id="show-new-screen" ng-if="allowTransferToNewScreenAndShowButton()"\r
-           ng-click="navigateToNewEditViewScreen()" style="margin-right: 8px;">More actions</a>\r
-        <br>\r
-\r
-        <center>\r
-            <table att-table border="1" ng-model="service">\r
-                <tr>\r
-                    <th style="text-align: center" width="33%">SUBSCRIBER:\r
-                        {{service.instance.subscriberName}}\r
-                    </th>\r
-                    <th style="text-align: center" width="34%">SERVICE TYPE:\r
-                        {{service.instance.serviceType}}\r
-                    </th>\r
-                    <th data-tests-id="service-instanceId-th-id" style="text-align: center" width="33%">SERVICE INSTANCE\r
-                        ID: {{service.instance.serviceInstanceId}}\r
-                    </th>\r
-                <tr>\r
-                <tr>\r
-                    <td colspan='3' style="text-align: center">Service Instance\r
-                        Name: {{service.instance.name || "Not defined"}}\r
-                    </td>\r
-                <tr>\r
-            </table>\r
-\r
-        </center>\r
-\r
-        <div ui-tree data-drag-enabled="false" data-nodrop-enabled="true" style="margin: 30px">\r
-\r
-            <ol ui-tree-nodes="" ng-model="service">\r
-                <li ng-repeat="aService in [service]" ui-tree-node>\r
-\r
-                    <div ng-if="isCR && collectionResource != null">\r
-                        <div ui-tree-handle class="tree-node tree-node-content">\r
-                            <a class="btn btn-success btn-xs" data-nodrag ng-click="this.toggle()">\r
-                                <span class="glyphicon"\r
-                                      ng-class="{'glyphicon-chevron-right': collapsed,'glyphicon-chevron-down': !collapsed}"></span>\r
-                            </a>\r
-                            SERVICE INSTANCE: {{aService.instance.name}} | ORCH STATUS: {{serviceOrchestrationStatus}}\r
-                            <a ng-if="isPermitted" data-tests-id="deleteServiceButton"\r
-                               class="pull-right btn btn-danger btn-xs" data-nodrag\r
-                               ng-click="deleteService(aService.instance);">\r
-                                <span class="glyphicon glyphicon-remove"></span>\r
-                            </a>\r
-\r
-                            <a class="pull-right btn btn-primary btn-xs" data-tests-id="infoServiceButton" data-nodrag\r
-                               ng-click="describeService(aService.instance)" style="margin-right: 8px;">\r
-                                <span class="glyphicon glyphicon-info-sign service-info"></span>\r
-                            </a>\r
-                        </div>\r
-                        <ol ui-tree-nodes="" ng-model="collections" ng-class="{hidden: collapsed}">\r
-                            <li ng-repeat="collection in collections" ui-tree-node>\r
-                                <div ui-tree-handle class="tree-node tree-node-content" data-tests-id="collectionDiv">\r
-                                    <a class="btn btn-success btn-xs" data-nodrag ng-click="this.toggle()">\r
-                                        <span class="glyphicon"\r
-                                              ng-class="{'glyphicon-chevron-right': collapsed,'glyphicon-chevron-down': !collapsed}"></span>\r
-                                    </a>\r
-                                    COLLECTION: {{collection["collection-name"]}} | TYPE:\r
-                                    {{collection["collection-type"]}}\r
-                                </div>\r
-                                <ol ui-tree-nodes="" ng-model="networks" ng-class="{hidden: collapsed}">\r
-                                    <li ng-repeat="network in networks" ui-tree-node>\r
-                                        <div ui-tree-handle class="tree-node tree-node-content"\r
-                                             data-tests-id="collectionNetworkDiv">\r
-                                            NETWORK INSTANCE GROUP: {{network["network-id"]}} | ROLE:\r
-                                            {{network["network-role"]}} | TYPE: {{network["network-type"]}} | # OF\r
-                                            NETWORKS: {{collectionResource.networks.length}}\r
-                                        </div>\r
-                                    </li>\r
-                                </ol>\r
-                            </li>\r
-                        </ol>\r
-                    </div>\r
-                    <div ng-if="!isCR">\r
-                        <div ui-tree-handle class="tree-node tree-node-content">\r
-                            <a class="btn btn-success btn-xs"\r
-                               ng-if="(aService.instance.vnfs && aService.instance.vnfs.length > 0) ||(aService.instance.pnfs && aService.instance.pnfs.length > 0) || (aService.instance.networks && aService.instance.networks.length > 0)"\r
-                               data-nodrag ng-click="this.toggle()">\r
-                                <span class="glyphicon"\r
-                                      ng-class="{'glyphicon-chevron-right': collapsed,'glyphicon-chevron-down': !collapsed}"></span>\r
-                            </a>\r
-                            SERVICE INSTANCE: {{aService.instance.name}} | ORCH STATUS: {{serviceOrchestrationStatus}}\r
-                            <a ng-if="((isMacro()) ||  (isObjectEmpty(aService.instance.vnfs) && isObjectEmpty(aService.instance.networks) && isObjectEmpty(aService.instance.pnfs))) && isPermitted"\r
-                               data-tests-id="deleteServiceButton" class="pull-right btn btn-danger btn-xs" data-nodrag\r
-                               ng-click="deleteService(aService.instance, serviceOrchestrationStatus);">\r
-                                <span class="glyphicon glyphicon-remove"></span>\r
-                            </a>\r
-                            <div class="pull-right btn-group"\r
-                                 ng-if="(aService.convertedModel.vnfs||aService.convertedModel.vnfs) &&(!isObjectEmpty(aService.convertedModel.pnfs)||!isObjectEmpty(aService.convertedModel.pnfs))  && !aService.convertedModel.isNewFlow && isPermitted">\r
-                                <button type="button" data-tests-id="addVNFButton"\r
-                                        class="btn btn-success btn-xs dropdown-toggle" data-toggle="dropdown"\r
-                                        aria-haspopup="true" aria-expanded="false">\r
-                                    Add node instance<span class="caret"></span>\r
-                                </button>\r
-                                <ul class="dropdown-menu" ng-model="aService.convertedModel.vnfs">\r
-                                    <a role="menuitem" ng-repeat="(vnfUuid, vnf) in aService.convertedModel.vnfs"\r
-                                       data-tests-id="addVNFOption-{{vnf.modelCustomizationName}}"\r
-                                       ng-click="addVnfInstance(vnf, aService.instance.vnfs)">{{vnf.modelCustomizationName}}</a>\r
-\r
-                                </ul>\r
-                            </div>\r
-                            <div class="pull-right btn-group"\r
-                                 ng-if="aService.convertedModel.vnfs && !isObjectEmpty(aService.convertedModel.vnfs) && aService.convertedModel.isNewFlow && isPermitted">\r
-                                <button type="button" data-tests-id="addVNFButton"\r
-                                        class="btn btn-success btn-xs dropdown-toggle" data-toggle="dropdown"\r
-                                        aria-haspopup="true" aria-expanded="false">\r
-                                    Add node instance<span class="caret"></span>\r
-                                </button>\r
-                                <ul class="dropdown-menu" ng-model="aService.convertedModel.vnfs"\r
-                                    data-tests-id="addVnfsDropdown">\r
-                                    <li role="menuitem" ng-repeat="(vnfUuid, vnf) in aService.convertedModel.vnfs">\r
-                                        <a data-tests-id="addVNFOption-{{vnf.modelCustomizationName}}"\r
-                                           ng-click="addVnfInstance(vnf, aService.instance.vnfs)">{{vnf.modelCustomizationName}}\r
-                                            {{vnf.nfType}} {{vnf.nfRole}} {{vnf.nfFunction}} {{vnf.nfCode}}</a>\r
-                                    </li>\r
-                                </ul>\r
-                            </div>\r
-                            <!--  <div class="pull-right btn-group" ng-if="aService.model.networks && !equals(aService.model.networks, {})">-->\r
-                            <div class="pull-right btn-group"\r
-                                 ng-if="aService.convertedModel.networks && (!(isObjectEmpty(aService.convertedModel.networks))) && isPermitted">\r
-                                <!--<div class="pull-right btn-group" ng-if="aService.model.networks">-->\r
-                                <button type="button" data-tests-id="addNetworkButton"\r
-                                        class="btn btn-success btn-xs dropdown-toggle" data-toggle="dropdown"\r
-                                        aria-haspopup="true" aria-expanded="false">\r
-                                    Add Network<span class="caret"></span>\r
-                                </button>\r
-                                <ul class="dropdown-menu" ng-model="aService.convertedModel.networks">\r
-                                    <li ng-repeat="(networkUuid, network) in aService.convertedModel.networks">\r
-                                        <a data-tests-id="addNetworkOption-{{network.modelCustomizationName}}"\r
-                                           ng-click="addNetworkInstance(network, aService.instance.vnfs)">{{network.modelCustomizationName}}</a>\r
-                                    </li>\r
-                                </ul>\r
-                            </div>\r
-                            <a class="pull-right btn btn-primary btn-xs" data-nodrag\r
-                               ng-click="describeService(aService.instance)" style="margin-right: 8px;">\r
-                                <span class="glyphicon glyphicon-info-sign service-info"></span>\r
-                            </a>\r
-                            <a data-tests-id="deactivateButton" ng-disabled="!isActivateDeactivateEnabled('deactivate')"\r
-                               class="pull-right btn btn-primary btn-xs" data-nodrag ng-click="deactivateMSOInstance()"\r
-                               style="margin-right: 8px;">\r
-                                Deactivate\r
-                            </a>\r
-                            <a ng-if="!isActivateFabricConfiguration()" data-tests-id="activateButton" ng-disabled="!isActivateDeactivateEnabled('activate')"\r
-                               class="pull-right btn btn-primary btn-xs" data-nodrag ng-click="activateMSOInstance()"\r
-                               style="margin-right: 8px;">\r
-                                Activate\r
-                            </a>\r
-                            <a ng-if="isActivateFabricConfiguration()" data-tests-id="activateFabricConfigurationButton" ng-disabled="!allConfigurationsAssigned"\r
-                               class="pull-right btn btn-primary btn-xs" data-nodrag ng-click="activateFabricConfigurationMSO()"\r
-                               style="margin-right: 8px;">\r
-                                Activate Fabric Configuration\r
-                            </a>\r
-                            <a data-tests-id="showAssignmentsButton" ng-if="isShowAssignmentsEnabled()"\r
-                               class="pull-right btn btn-primary btn-xs" data-nodrag style="margin-right: 8px;"\r
-                               target="_blank" ng-href="{{showAssignmentsSDNC()}}">\r
-                                Show Assignments\r
-                            </a>\r
-                            <a data-tests-id="verifyServiceButton" ng-if="isShowVerifyService()" ng-disabled="!isEnableVerifyService()"\r
-                               class="pull-right btn btn-primary btn-xs" data-nodrag style="margin-right: 8px;"\r
-                               target="_blank" ng-click="activateVerifyService()">\r
-                                Verify Service\r
-                            </a>\r
-                        </div>\r
-                        <ol ui-tree-nodes="" ng-model="aService.instance.vnfs" ng-class="{hidden: collapsed}">\r
-                            <li ng-repeat="vnf in aService.instance.vnfs" ui-tree-node>\r
-                                <div ui-tree-handle class="tree-node tree-node-content">\r
-                                    <a class="btn btn-success btn-xs"\r
-                                       ng-if="(vnf.vfModules && vnf.vfModules.length > 0) || (vnf.volumeGroups && vnf.volumeGroups.length > 0)"\r
-                                       data-nodrag ng-click="this.toggle()">\r
-                                        <span class="glyphicon"\r
-                                              ng-class="{'glyphicon-chevron-right': collapsed,'glyphicon-chevron-down': !collapsed}"></span>\r
-                                    </a>\r
-                                    VNF: {{vnf.name}} | TYPE: {{vnf.nodeType}} | ORCH STATUS: {{vnf.nodeStatus}}\r
-\r
-                                    <a ng-if="(vnf.vfModules.length == 0) && (vnf.volumeGroups.length == 0) && isPermitted"\r
-                                       data-tests-id="deleteVNFButton" class="pull-right btn btn-danger btn-xs"\r
-                                       data-nodrag ng-click="deleteVnf(aService.instance, vnf)">\r
-                                        <span class="glyphicon glyphicon-remove"></span>\r
-                                    </a>\r
-                                    <!--  <div class="pull-right btn-group" ng-if="aService.convertedModel.vnfs[vnf.object['model-invariant-id']][vnf.object['model-version-id']].vfModules">-->\r
-                                    <div class="pull-right btn-group"\r
-                                         ng-if="(hasVfModules(vnf.object) && (aService.convertedModel.isNewFlow)) && isPermitted">\r
-\r
-                                        <button type="button" data-tests-id="addVFModuleButton"\r
-                                                class="btn btn-success btn-xs dropdown-toggle" data-toggle="dropdown"\r
-                                                aria-haspopup="true" aria-expanded="false">\r
-                                            Add VF-Module<span class="caret"></span>\r
-                                        </button>\r
-                                        <ul class="dropdown-menu" ng-model="vfModule">\r
-                                            <a ng-repeat="(vfModuleCustomizationUuid, vfModule) in aService.convertedModel.vnfs[vnf.object['model-customization-id']].vfModules"\r
-                                               data-tests-id="addVFModuleOption-{{vfModule.modelCustomizationName}}"\r
-                                               ng-click="addVfModuleInstance(vnf, vfModule)">{{vfModule.modelCustomizationName}} </a>\r
-                                        </ul>\r
-                                    </div>\r
-\r
-\r
-                                    <div class="pull-right btn-group"\r
-                                         ng-if="(hasVfModules(vnf.object) && (!(aService.convertedModel.isNewFlow))) && isPermitted">\r
-\r
-                                        <button type="button" data-tests-id="addVFModuleButton"\r
-                                                class="btn btn-success btn-xs dropdown-toggle" data-toggle="dropdown"\r
-                                                aria-haspopup="true" aria-expanded="false">\r
-                                            Add VF-Module<span class="caret"></span>\r
-                                        </button>\r
-                                        <ul class="dropdown-menu" ng-model="vnf">\r
-                                            <a ng-repeat="(vfModuleUuid, vfModule) in aService.convertedModel.vnfs[vnf.object['model-version-id']].vfModules"\r
-                                               data-tests-id="addVFModuleOption-{{vfModule.modelCustomizationName}}"\r
-                                               ng-click="addVfModuleInstance(vnf, vfModule)">{{vfModule.modelCustomizationName}}</a>\r
-                                            </li>\r
-                                        </ul>\r
-\r
-                                    </div>\r
-\r
-                                    <div class="pull-right btn-group"\r
-                                         ng-if="(hasVolumeGroups(vnf.object) && (aService.convertedModel.isNewFlow)) && isPermitted">\r
-                                        <button type="button" data-tests-id="addVolumeGroupButton"\r
-                                                class="btn btn-success btn-xs dropdown-toggle" data-toggle="dropdown"\r
-                                                aria-haspopup="true" aria-expanded="false">\r
-                                            Add Volume Group<span class="caret"></span>\r
-                                        </button>\r
-                                        <ul class="dropdown-menu" ng-model="volumeGroup">\r
-                                            <a ng-repeat="(volumeGroupCustomizationUuid, volumeGroup) in aService.convertedModel.vnfs[vnf.object['model-customization-id']].volumeGroups"\r
-                                               data-tests-id="addVolumeGroupOption-{{volumeGroup.modelCustomizationName}}"\r
-                                               ng-click="addVolumeGroupInstance(vnf, volumeGroup)">{{volumeGroup.modelCustomizationName}}</a>\r
-                                        </ul>\r
-                                    </div>\r
-\r
-                                    <div class="pull-right btn-group"\r
-                                         ng-if="(hasVolumeGroups(vnf.object) && (!(aService.convertedModel.isNewFlow))) && isPermitted">\r
-\r
-                                        <button type="button" data-tests-id="addVolumeGroupButton"\r
-                                                class="btn btn-success btn-xs dropdown-toggle" data-toggle="dropdown"\r
-                                                aria-haspopup="true" aria-expanded="false">\r
-                                            Add Volume Group<span class="caret"></span>\r
-                                        </button>\r
-                                        <ul class="dropdown-menu" ng-model="vnf">\r
-                                            <a ng-repeat="(volumeGroupUuid, volumeGroup) in aService.convertedModel.vnfs[vnf.object['model-version-id']].volumeGroups"\r
-                                               data-tests-id="addVolumeGroupOption-{{volumeGroup.modelCustomizationName}}"\r
-                                               ng-click="addVolumeGroupInstance(vnf, volumeGroup)">{{volumeGroup.modelCustomizationName}}</a>\r
-                                            </li>\r
-                                        </ul>\r
-\r
-                                    </div>\r
-\r
-                                    <!-- VID-374/378 - switching-off feature <a class="pull-right btn btn-primary btn-xs" data-nodrag ng-click="getStatusOfVnf(aService.instance, vnf)" style="margin-right: 8px;">\r
-                                        <span class="glyphicon glyphicon-exclamation-sign"></span>\r
-                                    </a>  -->\r
-                                    <a class="pull-right btn btn-primary btn-xs" data-nodrag\r
-                                       ng-click="describeVnf(aService.instance, vnf)" style="margin-right: 8px;">\r
-                                        <span class="glyphicon glyphicon-info-sign vnf-info"></span>\r
-                                    </a>\r
-                                </div>\r
-                                <ol ui-tree-nodes="" ng-model="vnf.instanceGroups" ng-class="{hidden: collapsed}">\r
-                                    <li ng-repeat="instanceGroup in vnf.instanceGroups" ui-tree-node>\r
-                                        <div ui-tree-handle class="tree-node tree-node-content"\r
-                                             ng-class="'instanceGroupTreeNode'">\r
-                                            INSTANCE-GROUP: {{instanceGroup.name}} | TYPE: Instance-Group\r
-                                        </div>\r
-\r
-                                    </li>\r
-                                </ol>\r
-\r
-                                <ol ui-tree-nodes="" ng-model="vnf.vfModules" ng-class="{hidden: collapsed}">\r
-                                    <li ng-repeat="vfModule in vnf.vfModules" ui-tree-node>\r
-                                        <div ui-tree-handle class="tree-node tree-node-content"\r
-                                             ng-class="'vfModuleTreeNode-' + vfModule.nodeStatus.toLowerCase()">\r
-                                            <a class="btn btn-success btn-xs"\r
-                                               ng-if="(vfModule.volumeGroups && vfModule.volumeGroups.length > 0)"\r
-                                               data-nodrag ng-click="this.toggle()">\r
-                                                <span class="glyphicon"\r
-                                                      ng-class="{'glyphicon-chevron-right': collapsed,'glyphicon-chevron-down': !collapsed}"></span>\r
-                                            </a>\r
-                                            VFMODULE: {{vfModule.name}} | TYPE: {{vfModule.nodeType}} | ORCH STATUS:\r
-                                            {{vfModule.nodeStatus}}\r
-                                            <!--  -->\r
-                                            <a class="pull-right btn btn-danger btn-xs" ng-if="isPermitted"\r
-                                               data-tests-id="deleteVFModuleButton-{{vfModule.name}}" data-nodrag\r
-                                               ng-click="deleteVfModule(aService.instance, vfModule, vnf)">\r
-                                                <span class="glyphicon glyphicon-remove"></span>\r
-                                            </a>\r
-                                            <div class="pull-right btn-group">\r
-                                                <!--   <button type="button" class="btn btn-success btn-xs dropdown-toggle" data-toggle="dropdown" aria-haspopup="true" aria-expanded="false">\r
-                                                    Attach Volume Group<span class="caret"></span>\r
-                                                  </button>\r
-                                                  <ul class="dropdown-menu" ng-model="vnf.volumeGroups">\r
-                                                    <li ng-repeat="volumeGroup in vnf.availableVolumeGroups">\r
-                                                        <a ng-click="attachVolumeGroupInstance(vfModule, volumeGroup)">{{volumeGroup.name}}</a>\r
-                                                    </li>\r
-                                                  </ul> -->\r
-                                            </div>\r
-                                            <a class="pull-right btn btn-primary btn-xs" data-nodrag\r
-                                               ng-click="describeVfModule(aService.instance, vfModule, vnf)"\r
-                                               style="margin-right: 8px;">\r
-                                                <span class="glyphicon glyphicon-info-sign vfmodule-info"></span>\r
-                                            </a>\r
-                                            <div class="resume"\r
-                                                 ng-if="isPermitted && isResumeShown(vfModule.nodeStatus)">\r
-                                                <a data-tests-id="resumeVFModuleButton-{{vfModule.name}}"\r
-                                                   class="pull-right btn btn-success btn-xs button-margin"\r
-                                                   ng-click="resume(aService.instance, vfModule, vnf)">\r
-                                                    Resume\r
-                                                </a>\r
-                                            </div>\r
-\r
-                                        </div>\r
-                                        <ol ui-tree-nodes="" ng-model="vfModule.volumeGroups"\r
-                                            ng-class="{hidden: collapsed}">\r
-                                            <li ng-repeat="volumeGroup in vfModule.volumeGroups" ui-tree-node>\r
-                                                <div ui-tree-handle class="tree-node tree-node-content">\r
-                                                    VOLUME GROUP: {{volumeGroup.name}} | TYPE: {{volumeGroup.nodeType}}\r
-                                                    | ORCH STATUS: {{volumeGroup.nodeStatus}}\r
-                                                    <!-- <a class="pull-right btn btn-danger btn-xs" data-nodrag ng-click="deleteVolumeGroup(aService.instance, vnf, vfModule, volumeGroup)">\r
-                                                        <span class="glyphicon glyphicon-remove"></span>\r
-                                                    </a> -->\r
-                                                    <a class="pull-right btn btn-primary btn-xs" data-nodrag\r
-                                                       ng-click="describeVolumeGroup(aService.instance, vnf, volumeGroup)"\r
-                                                       style="margin-right: 8px;">\r
-                                                        <span class="glyphicon glyphicon-info-sign"></span>\r
-                                                    </a>\r
-                                                </div>\r
-                                            </li>\r
-                                        </ol>\r
-                                    </li>\r
-                                </ol>\r
-                                <ol ui-tree-nodes="" ng-model="vnf.availableVolumeGroups"\r
-                                    ng-class="{hidden: collapsed}">\r
-                                    <li ng-repeat="volumeGroup in vnf.availableVolumeGroups" ui-tree-node>\r
-                                        <div ui-tree-handle class="tree-node tree-node-content">\r
-                                            VOLUME GROUP: {{volumeGroup.name}} | TYPE: {{volumeGroup.nodeType}} | ORCH\r
-                                            STATUS: {{volumeGroup.nodeStatus}}\r
-                                            <a class="pull-right btn btn-danger btn-xs" ng-if="isPermitted"\r
-                                               data-tests-id="deleteVNFVolumeGroupButton" data-nodrag\r
-                                               ng-click="deleteVnfVolumeGroup(aService.instance, vnf, volumeGroup)">\r
-                                                <span class="glyphicon glyphicon-remove"></span>\r
-                                            </a>\r
-                                            <a class="pull-right btn btn-primary btn-xs" data-nodrag\r
-                                               ng-click="describeVolumeGroup(aService.instance, vnf, volumeGroup)"\r
-                                               style="margin-right: 8px;">\r
-                                                <span class="glyphicon glyphicon-info-sign volume-group-info"></span>\r
-                                            </a>\r
-                                        </div>\r
-                                    </li>\r
-                                </ol>\r
-\r
-                                <ol ui-tree-nodes="" ng-model="vnf.networks"\r
-                                    ng-class="{hidden: collapsed}">\r
-                                    <li ng-repeat="network in vnf.networks" ui-tree-node>\r
-                                        <div ui-tree-handle class="tree-node tree-node-content">\r
-                                            NETWORK: {{network.name}} | TYPE: {{network.nodeType}} | ORCH\r
-                                            STATUS: {{network.nodeStatus}}\r
-                                        </div>\r
-                                        <ol ui-tree-nodes="" ng-model="network.vlans" ng-class="{hidden: collapsed}">\r
-                                            <li ng-repeat="vlan in network.vlans" ui-tree-node>\r
-                                                <div ui-tree-handle class="tree-node tree-node-content"\r
-                                                     ng-class="'vlansTreeNode'">\r
-                                                    VLAN: {{vlan.vlanIdOuter}} | TYPE: VLAN\r
-                                                </div>\r
-\r
-                                            </li>\r
-                                        </ol>\r
-                                    </li>\r
-                                </ol>\r
-                            </li>\r
-                        </ol>\r
-\r
-                        <ol ui-tree-nodes="" ng-model="aService.instance.networks" ng-class="{hidden: collapsed}">\r
-                            <li ng-repeat="network in aService.instance.networks" ui-tree-node>\r
-                                <div ui-tree-handle class="tree-node tree-node-content">\r
-                                    NETWORK: {{network.name}} | TYPE: {{network.nodeType}} | ORCH STATUS:\r
-                                    {{network.nodeStatus}}\r
-\r
-                                    <a class="pull-right btn btn-danger btn-xs" ng-if="!isMacro() && isPermitted"\r
-                                       data-tests-id="deleteNetworkButton" data-nodrag\r
-                                       ng-click="deleteNetwork(aService.instance, network)">\r
-                                        <span class="glyphicon glyphicon-remove"></span>\r
-                                    </a>\r
-                                    <!--  <a class="pull-right btn btn-danger btn-xs" data-nodrag ng-click="deleteNetwork(aService.instance, network)">\r
-                                       <span class="glyphicon glyphicon-remove"></span>\r
-                                   </a>-->\r
-                                    <a class="pull-right btn btn-primary btn-xs" data-nodrag\r
-                                       ng-click="describeNetwork(aService.instance, network)"\r
-                                       style="margin-right: 8px;">\r
-                                        <span class="glyphicon glyphicon-info-sign network-info"></span>\r
-                                    </a>\r
-                                </div>\r
-\r
-                                <ol ui-tree-nodes="" ng-model="network.vlans" ng-class="{hidden: collapsed}">\r
-                                    <li ng-repeat="vlan in network.vlans" ui-tree-node>\r
-                                        <div ui-tree-handle class="tree-node tree-node-content"\r
-                                             ng-class="'vlansTreeNode'">\r
-                                            VLAN: {{vlan.vlanIdOuter}} | TYPE: VLAN\r
-                                        </div>\r
-\r
-                                    </li>\r
-                                </ol>\r
-                            </li>\r
-                        </ol>\r
-\r
-                        <ol ui-tree-nodes="" ng-model="aService.instance.configurations" ng-class="{hidden: collapsed}">\r
-                            <li ng-repeat="configuration in aService.instance.configurations" ui-tree-node>\r
-                                <div ui-tree-handle class="tree-node tree-node-content">\r
-                                    <a class="btn btn-success btn-xs"\r
-                                       ng-if="(configuration.ports && configuration.ports.length > 0)" data-nodrag\r
-                                       ng-click="this.toggle()">\r
-                                        <span class="glyphicon"\r
-                                              ng-class="{'glyphicon-chevron-right': collapsed,'glyphicon-chevron-down': !collapsed}"></span>\r
-                                    </a>\r
-                                    CONFIGURATION: {{configuration.name}} | TYPE: {{configuration.nodeType}} | ORCH\r
-                                    STATUS: {{configuration.nodeStatus}}\r
-\r
-                                    <a class="pull-right btn btn-danger btn-xs"\r
-                                       ng-if="!isMacro() && isPermitted && configuration.nodeStatus !== STATUS_CONSTANTS.AAI_ACTIVE"\r
-                                       ng-disabled="!isConfigurationDataAvailiable(configuration)"\r
-                                       data-tests-id="deleteConfigurationButton-{{configuration.name}}"\r
-                                       data-nodrag\r
-                                       ng-click="deleteConfiguration(aService, configuration)">\r
-                                        <span class="glyphicon glyphicon-remove"></span>\r
-                                    </a>\r
-\r
-\r
-                                    <a class="pull-right btn btn-primary btn-xs" data-nodrag\r
-                                       ng-click="toggleConfigurationStatus(aService, configuration)"\r
-                                       ng-if="isPermitted && allowConfigurationActions(configuration)"\r
-                                       ng-disabled="!isConfigurationDataAvailiable(configuration)"\r
-                                       data-tests-id="activateDeactivateButton-{{configuration.name}}">\r
-                                        {{configuration.nodeStatus === STATUS_CONSTANTS.AAI_ACTIVE ? "Deactivate" :\r
-                                        "Activate"}}\r
-                                    </a>\r
-                                </div>\r
-                                <ol ui-tree-nodes="" ng-model="configuration.ports" ng-class="{hidden: collapsed}">\r
-                                    <li ng-repeat="port in configuration.ports" ui-tree-node>\r
-                                        <div ui-tree-handle class="tree-node tree-node-content">\r
-                                            PORT: {{port.portName}} | ORCH STATUS: {{port.portStatus}}\r
-\r
-                                            <button type="button" data-tests-id="enableDisableButton-{{configuration.name}}-{{port.portName}}"\r
-                                                    class="pull-right btn btn-primary btn-xs"\r
-                                                    ng-if="configuration.nodeStatus == STATUS_CONSTANTS.AAI_ACTIVE"\r
-                                                    ng-disabled="!isConfigurationDataAvailiable(configuration)"\r
-                                                    ng-click="togglePortStatus(aService, configuration, port)">\r
-                                                {{port.portStatus === STATUS_CONSTANTS.AAI_ENABLED ? "Disable" :\r
-                                                "Enable"}}\r
-                                            </button>\r
-                                        </div>\r
-                                    </li>\r
-                                </ol>\r
-                            </li>\r
-                        </ol>\r
-\r
-                        <ol id="pnfs-tree" ui-tree-nodes="" ng-model="pnfs"\r
-                            ng-class="{hidden: collapsed || pnf.length === 0}">\r
-                            <li ng-repeat="pnf in pnfs" ui-tree-node>\r
-                                <div ui-tree-handle class="tree-node tree-node-content">\r
-                                    PNF: {{pnf}}\r
-                                    <a ng-if="isMacro()===false" class="dissociate-pnf pull-right btn btn-primary btn-xs" data-nodrag\r
-                                       ng-click="dissociatePnf(pnf)" style="margin-right: 8px;">\r
-                                        <span>Dissociate</span>\r
-                                    </a>\r
-                                </div>\r
-                            </li>\r
-                        </ol>\r
-                    </div>\r
-                </li>\r
-            </ol>\r
-        </div>\r
-    </div>\r
-</div>\r
+<!--
+  ============LICENSE_START=======================================================
+  VID
+  ================================================================================
+  Copyright (C) 2017 - 2019 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=========================================================
+  -->
+
+<div>
+
+    <div popup-window class="popupContents" ngx-show="{{popup.isVisible}}"
+         ng-cloak>
+        <div ng-include="'app/vid/scripts/view-models/creationDialog.htm'"></div>
+        <div ng-include="'app/vid/scripts/view-models/deleteResumeDialog.htm'"></div>
+        <div ng-include="'app/vid/scripts/view-models/detailsDialog.htm'"></div>
+        <div ng-include="'app/vid/scripts/view-models/statusDialog.htm'"></div>
+        <div ng-include="'app/vid/scripts/view-models/iframeDialog.htm'"></div>
+    </div>
+    <div ng-controller="aaiSubscriberController" ng-init="getComponentList() ">
+        <div class="statusLine" ng-class="{true:'aaiVisible', false:'aaiHidden'}[isSpinnerVisible]">
+            <img src="app/vid/images/spinner.gif"></img>
+            <label>Status:</label><span class="status">{{status}}</span>
+        </div>
+
+        <div class="error-msg" ng-if="errorMsg != null" style="white-space: pre-line"><font color='red'>{{errorMsg}}
+            <pre>{{errorDetails | json}}</pre>
+        </font></div>
+
+        <h1 class="heading1" style="margin-top: 20px;">{{isPermitted ? "View/Edit" : "View"}} Service Instance</h1>
+        <a class="btn btn-primary btn-xs pull-right" ng-click="reloadRoute();"><span
+                class="glyphicon glyphicon-refresh"></span></a>
+        <a class="pull-right btn btn-primary btn-xs" data-nodrag
+           data-tests-id="show-new-screen" ng-if="allowTransferToNewScreenAndShowButton(isPermitted)"
+           ng-click="navigateToNewEditViewScreen()" style="margin-right: 8px;">More actions</a>
+        <br>
+
+        <center>
+            <table att-table border="1" ng-model="service">
+                <tr>
+                    <th style="text-align: center" width="33%">SUBSCRIBER:
+                        {{service.instance.subscriberName}}
+                    </th>
+                    <th style="text-align: center" width="34%">SERVICE TYPE:
+                        {{service.instance.serviceType}}
+                    </th>
+                    <th data-tests-id="service-instanceId-th-id" style="text-align: center" width="33%">SERVICE INSTANCE
+                        ID: {{service.instance.serviceInstanceId}}
+                    </th>
+                <tr>
+                <tr>
+                    <td colspan='3' style="text-align: center">Service Instance
+                        Name: {{service.instance.name || "Not defined"}}
+                    </td>
+                <tr>
+            </table>
+
+        </center>
+
+        <div ui-tree data-drag-enabled="false" data-nodrop-enabled="true" style="margin: 30px">
+
+            <ol ui-tree-nodes="" ng-model="service">
+                <li ng-repeat="aService in [service]" ui-tree-node>
+
+                    <div ng-if="isCR && collectionResource != null">
+                        <div ui-tree-handle class="tree-node tree-node-content">
+                            <a class="btn btn-success btn-xs" data-nodrag ng-click="this.toggle()">
+                                <span class="glyphicon"
+                                      ng-class="{'glyphicon-chevron-right': collapsed,'glyphicon-chevron-down': !collapsed}"></span>
+                            </a>
+                            SERVICE INSTANCE: {{aService.instance.name}} | ORCH STATUS: {{serviceOrchestrationStatus}}
+                            <a ng-if="isPermitted" data-tests-id="deleteServiceButton"
+                               class="pull-right btn btn-danger btn-xs" data-nodrag
+                               ng-click="deleteService(aService.instance);">
+                                <span class="glyphicon glyphicon-remove"></span>
+                            </a>
+
+                            <a class="pull-right btn btn-primary btn-xs" data-tests-id="infoServiceButton" data-nodrag
+                               ng-click="describeService(aService.instance)" style="margin-right: 8px;">
+                                <span class="glyphicon glyphicon-info-sign service-info"></span>
+                            </a>
+                        </div>
+                        <ol ui-tree-nodes="" ng-model="collections" ng-class="{hidden: collapsed}">
+                            <li ng-repeat="collection in collections" ui-tree-node>
+                                <div ui-tree-handle class="tree-node tree-node-content" data-tests-id="collectionDiv">
+                                    <a class="btn btn-success btn-xs" data-nodrag ng-click="this.toggle()">
+                                        <span class="glyphicon"
+                                              ng-class="{'glyphicon-chevron-right': collapsed,'glyphicon-chevron-down': !collapsed}"></span>
+                                    </a>
+                                    COLLECTION: {{collection["collection-name"]}} | TYPE:
+                                    {{collection["collection-type"]}}
+                                </div>
+                                <ol ui-tree-nodes="" ng-model="networks" ng-class="{hidden: collapsed}">
+                                    <li ng-repeat="network in networks" ui-tree-node>
+                                        <div ui-tree-handle class="tree-node tree-node-content"
+                                             data-tests-id="collectionNetworkDiv">
+                                            NETWORK INSTANCE GROUP: {{network["network-id"]}} | ROLE:
+                                            {{network["network-role"]}} | TYPE: {{network["network-type"]}} | # OF
+                                            NETWORKS: {{collectionResource.networks.length}}
+                                        </div>
+                                    </li>
+                                </ol>
+                            </li>
+                        </ol>
+                    </div>
+                    <div ng-if="!isCR">
+                        <div ui-tree-handle class="tree-node tree-node-content">
+                            <a class="btn btn-success btn-xs"
+                               ng-if="(aService.instance.vnfs && aService.instance.vnfs.length > 0) ||(aService.instance.pnfs && aService.instance.pnfs.length > 0) || (aService.instance.networks && aService.instance.networks.length > 0)"
+                               data-nodrag ng-click="this.toggle()">
+                                <span class="glyphicon"
+                                      ng-class="{'glyphicon-chevron-right': collapsed,'glyphicon-chevron-down': !collapsed}"></span>
+                            </a>
+                            SERVICE INSTANCE: {{aService.instance.name}} | ORCH STATUS: {{serviceOrchestrationStatus}}
+                            <a ng-if="((isMacro()) ||  (isObjectEmpty(aService.instance.vnfs) && isObjectEmpty(aService.instance.networks) && isObjectEmpty(aService.instance.pnfs))) && isPermitted"
+                               data-tests-id="deleteServiceButton" class="pull-right btn btn-danger btn-xs" data-nodrag
+                               ng-click="deleteService(aService.instance, serviceOrchestrationStatus);">
+                                <span class="glyphicon glyphicon-remove"></span>
+                            </a>
+                            <div class="pull-right btn-group"
+                                 ng-if="(aService.convertedModel.vnfs||aService.convertedModel.vnfs) &&(!isObjectEmpty(aService.convertedModel.pnfs)||!isObjectEmpty(aService.convertedModel.pnfs))  && !aService.convertedModel.isNewFlow && isPermitted">
+                                <button type="button" data-tests-id="addVNFButton"
+                                        class="btn btn-success btn-xs dropdown-toggle" data-toggle="dropdown"
+                                        aria-haspopup="true" aria-expanded="false">
+                                    Add node instance<span class="caret"></span>
+                                </button>
+                                <ul class="dropdown-menu" ng-model="aService.convertedModel.vnfs">
+                                    <a role="menuitem" ng-repeat="(vnfUuid, vnf) in aService.convertedModel.vnfs"
+                                       data-tests-id="addVNFOption-{{vnf.modelCustomizationName}}"
+                                       ng-click="addVnfInstance(vnf, aService.instance.vnfs)">{{vnf.modelCustomizationName}}</a>
+
+                                </ul>
+                            </div>
+                            <div class="pull-right btn-group"
+                                 ng-if="aService.convertedModel.vnfs && !isObjectEmpty(aService.convertedModel.vnfs) && aService.convertedModel.isNewFlow && isPermitted">
+                                <button type="button" data-tests-id="addVNFButton"
+                                        class="btn btn-success btn-xs dropdown-toggle" data-toggle="dropdown"
+                                        aria-haspopup="true" aria-expanded="false">
+                                    Add node instance<span class="caret"></span>
+                                </button>
+                                <ul class="dropdown-menu" ng-model="aService.convertedModel.vnfs"
+                                    data-tests-id="addVnfsDropdown">
+                                    <li role="menuitem" ng-repeat="(vnfUuid, vnf) in aService.convertedModel.vnfs">
+                                        <a data-tests-id="addVNFOption-{{vnf.modelCustomizationName}}"
+                                           ng-click="addVnfInstance(vnf, aService.instance.vnfs)">{{vnf.modelCustomizationName}}
+                                            {{vnf.nfType}} {{vnf.nfRole}} {{vnf.nfFunction}} {{vnf.nfCode}}</a>
+                                    </li>
+                                </ul>
+                            </div>
+                            <!--  <div class="pull-right btn-group" ng-if="aService.model.networks && !equals(aService.model.networks, {})">-->
+                            <div class="pull-right btn-group"
+                                 ng-if="aService.convertedModel.networks && (!(isObjectEmpty(aService.convertedModel.networks))) && isPermitted">
+                                <!--<div class="pull-right btn-group" ng-if="aService.model.networks">-->
+                                <button type="button" data-tests-id="addNetworkButton"
+                                        class="btn btn-success btn-xs dropdown-toggle" data-toggle="dropdown"
+                                        aria-haspopup="true" aria-expanded="false">
+                                    Add Network<span class="caret"></span>
+                                </button>
+                                <ul class="dropdown-menu" ng-model="aService.convertedModel.networks">
+                                    <li ng-repeat="(networkUuid, network) in aService.convertedModel.networks">
+                                        <a data-tests-id="addNetworkOption-{{network.modelCustomizationName}}"
+                                           ng-click="addNetworkInstance(network, aService.instance.vnfs)">{{network.modelCustomizationName}}</a>
+                                    </li>
+                                </ul>
+                            </div>
+                            <a class="pull-right btn btn-primary btn-xs" data-nodrag
+                               ng-click="describeService(aService.instance)" style="margin-right: 8px;">
+                                <span class="glyphicon glyphicon-info-sign service-info"></span>
+                            </a>
+                            <a data-tests-id="deactivateButton" ng-disabled="!isActivateDeactivateEnabled('deactivate')"
+                               class="pull-right btn btn-primary btn-xs" data-nodrag ng-click="deactivateMSOInstance()"
+                               style="margin-right: 8px;">
+                                Deactivate
+                            </a>
+                            <a ng-if="!isActivateFabricConfiguration()" data-tests-id="activateButton" ng-disabled="!isActivateDeactivateEnabled('activate')"
+                               class="pull-right btn btn-primary btn-xs" data-nodrag ng-click="activateMSOInstance()"
+                               style="margin-right: 8px;">
+                                Activate
+                            </a>
+                            <a ng-if="isActivateFabricConfiguration()" data-tests-id="activateFabricConfigurationButton" ng-disabled="!allConfigurationsAssigned"
+                               class="pull-right btn btn-primary btn-xs" data-nodrag ng-click="activateFabricConfigurationMSO()"
+                               style="margin-right: 8px;">
+                                Activate Fabric Configuration
+                            </a>
+                            <a data-tests-id="showAssignmentsButton" ng-if="isShowAssignmentsEnabled()"
+                               class="pull-right btn btn-primary btn-xs" data-nodrag style="margin-right: 8px;"
+                               target="_blank" ng-href="{{showAssignmentsSDNC()}}">
+                                Show Assignments
+                            </a>
+                            <a data-tests-id="verifyServiceButton" ng-if="isShowVerifyService()" ng-disabled="!isEnableVerifyService()"
+                               class="pull-right btn btn-primary btn-xs" data-nodrag style="margin-right: 8px;"
+                               target="_blank" ng-click="activateVerifyService()">
+                                Verify Service
+                            </a>
+                        </div>
+                        <ol ui-tree-nodes="" ng-model="aService.instance.vnfs" ng-class="{hidden: collapsed}">
+                            <li ng-repeat="vnf in aService.instance.vnfs" ui-tree-node>
+                                <div ui-tree-handle class="tree-node tree-node-content">
+                                    <a class="btn btn-success btn-xs"
+                                       ng-if="(vnf.vfModules && vnf.vfModules.length > 0) || (vnf.volumeGroups && vnf.volumeGroups.length > 0)"
+                                       data-nodrag ng-click="this.toggle()">
+                                        <span class="glyphicon"
+                                              ng-class="{'glyphicon-chevron-right': collapsed,'glyphicon-chevron-down': !collapsed}"></span>
+                                    </a>
+                                    VNF: {{vnf.name}} | TYPE: {{vnf.nodeType}} | ORCH STATUS: {{vnf.nodeStatus}}
+
+                                    <a ng-if="(vnf.vfModules.length == 0) && (vnf.volumeGroups.length == 0) && isPermitted"
+                                       data-tests-id="deleteVNFButton" class="pull-right btn btn-danger btn-xs"
+                                       data-nodrag ng-click="deleteVnf(aService.instance, vnf)">
+                                        <span class="glyphicon glyphicon-remove"></span>
+                                    </a>
+                                    <!--  <div class="pull-right btn-group" ng-if="aService.convertedModel.vnfs[vnf.object['model-invariant-id']][vnf.object['model-version-id']].vfModules">-->
+                                    <div class="pull-right btn-group"
+                                         ng-if="(hasVfModules(vnf.object) && (aService.convertedModel.isNewFlow)) && isPermitted">
+
+                                        <button type="button" data-tests-id="addVFModuleButton"
+                                                class="btn btn-success btn-xs dropdown-toggle" data-toggle="dropdown"
+                                                aria-haspopup="true" aria-expanded="false">
+                                            Add VF-Module<span class="caret"></span>
+                                        </button>
+                                        <ul class="dropdown-menu" ng-model="vfModule">
+                                            <a ng-repeat="(vfModuleCustomizationUuid, vfModule) in aService.convertedModel.vnfs[vnf.object['model-customization-id']].vfModules"
+                                               data-tests-id="addVFModuleOption-{{vfModule.modelCustomizationName}}"
+                                               ng-click="addVfModuleInstance(vnf, vfModule)">{{vfModule.modelCustomizationName}} </a>
+                                        </ul>
+                                    </div>
+
+
+                                    <div class="pull-right btn-group"
+                                         ng-if="(hasVfModules(vnf.object) && (!(aService.convertedModel.isNewFlow))) && isPermitted">
+
+                                        <button type="button" data-tests-id="addVFModuleButton"
+                                                class="btn btn-success btn-xs dropdown-toggle" data-toggle="dropdown"
+                                                aria-haspopup="true" aria-expanded="false">
+                                            Add VF-Module<span class="caret"></span>
+                                        </button>
+                                        <ul class="dropdown-menu" ng-model="vnf">
+                                            <a ng-repeat="(vfModuleUuid, vfModule) in aService.convertedModel.vnfs[vnf.object['model-version-id']].vfModules"
+                                               data-tests-id="addVFModuleOption-{{vfModule.modelCustomizationName}}"
+                                               ng-click="addVfModuleInstance(vnf, vfModule)">{{vfModule.modelCustomizationName}}</a>
+                                            </li>
+                                        </ul>
+
+                                    </div>
+
+                                    <div class="pull-right btn-group"
+                                         ng-if="(hasVolumeGroups(vnf.object) && (aService.convertedModel.isNewFlow)) && isPermitted">
+                                        <button type="button" data-tests-id="addVolumeGroupButton"
+                                                class="btn btn-success btn-xs dropdown-toggle" data-toggle="dropdown"
+                                                aria-haspopup="true" aria-expanded="false">
+                                            Add Volume Group<span class="caret"></span>
+                                        </button>
+                                        <ul class="dropdown-menu" ng-model="volumeGroup">
+                                            <a ng-repeat="(volumeGroupCustomizationUuid, volumeGroup) in aService.convertedModel.vnfs[vnf.object['model-customization-id']].volumeGroups"
+                                               data-tests-id="addVolumeGroupOption-{{volumeGroup.modelCustomizationName}}"
+                                               ng-click="addVolumeGroupInstance(vnf, volumeGroup)">{{volumeGroup.modelCustomizationName}}</a>
+                                        </ul>
+                                    </div>
+
+                                    <div class="pull-right btn-group"
+                                         ng-if="(hasVolumeGroups(vnf.object) && (!(aService.convertedModel.isNewFlow))) && isPermitted">
+
+                                        <button type="button" data-tests-id="addVolumeGroupButton"
+                                                class="btn btn-success btn-xs dropdown-toggle" data-toggle="dropdown"
+                                                aria-haspopup="true" aria-expanded="false">
+                                            Add Volume Group<span class="caret"></span>
+                                        </button>
+                                        <ul class="dropdown-menu" ng-model="vnf">
+                                            <a ng-repeat="(volumeGroupUuid, volumeGroup) in aService.convertedModel.vnfs[vnf.object['model-version-id']].volumeGroups"
+                                               data-tests-id="addVolumeGroupOption-{{volumeGroup.modelCustomizationName}}"
+                                               ng-click="addVolumeGroupInstance(vnf, volumeGroup)">{{volumeGroup.modelCustomizationName}}</a>
+                                            </li>
+                                        </ul>
+
+                                    </div>
+
+                                    <!-- VID-374/378 - switching-off feature <a class="pull-right btn btn-primary btn-xs" data-nodrag ng-click="getStatusOfVnf(aService.instance, vnf)" style="margin-right: 8px;">
+                                        <span class="glyphicon glyphicon-exclamation-sign"></span>
+                                    </a>  -->
+                                    <a class="pull-right btn btn-primary btn-xs" data-nodrag
+                                       ng-click="describeVnf(aService.instance, vnf)" style="margin-right: 8px;">
+                                        <span class="glyphicon glyphicon-info-sign vnf-info"></span>
+                                    </a>
+                                </div>
+                                <ol ui-tree-nodes="" ng-model="vnf.instanceGroups" ng-class="{hidden: collapsed}">
+                                    <li ng-repeat="instanceGroup in vnf.instanceGroups" ui-tree-node>
+                                        <div ui-tree-handle class="tree-node tree-node-content"
+                                             ng-class="'instanceGroupTreeNode'">
+                                            INSTANCE-GROUP: {{instanceGroup.name}} | TYPE: Instance-Group
+                                        </div>
+
+                                    </li>
+                                </ol>
+
+                                <ol ui-tree-nodes="" ng-model="vnf.vfModules" ng-class="{hidden: collapsed}">
+                                    <li ng-repeat="vfModule in vnf.vfModules" ui-tree-node>
+                                        <div ui-tree-handle class="tree-node tree-node-content"
+                                             ng-class="'vfModuleTreeNode-' + vfModule.nodeStatus.toLowerCase()">
+                                            <a class="btn btn-success btn-xs"
+                                               ng-if="(vfModule.volumeGroups && vfModule.volumeGroups.length > 0)"
+                                               data-nodrag ng-click="this.toggle()">
+                                                <span class="glyphicon"
+                                                      ng-class="{'glyphicon-chevron-right': collapsed,'glyphicon-chevron-down': !collapsed}"></span>
+                                            </a>
+                                            VFMODULE: {{vfModule.name}} | TYPE: {{vfModule.nodeType}} | ORCH STATUS:
+                                            {{vfModule.nodeStatus}}
+                                            <!--  -->
+                                            <a class="pull-right btn btn-danger btn-xs" ng-if="isPermitted"
+                                               data-tests-id="deleteVFModuleButton-{{vfModule.name}}" data-nodrag
+                                               ng-click="deleteVfModule(aService.instance, vfModule, vnf)">
+                                                <span class="glyphicon glyphicon-remove"></span>
+                                            </a>
+                                            <div class="pull-right btn-group">
+                                                <!--   <button type="button" class="btn btn-success btn-xs dropdown-toggle" data-toggle="dropdown" aria-haspopup="true" aria-expanded="false">
+                                                    Attach Volume Group<span class="caret"></span>
+                                                  </button>
+                                                  <ul class="dropdown-menu" ng-model="vnf.volumeGroups">
+                                                    <li ng-repeat="volumeGroup in vnf.availableVolumeGroups">
+                                                        <a ng-click="attachVolumeGroupInstance(vfModule, volumeGroup)">{{volumeGroup.name}}</a>
+                                                    </li>
+                                                  </ul> -->
+                                            </div>
+                                            <a class="pull-right btn btn-primary btn-xs" data-nodrag
+                                               ng-click="describeVfModule(aService.instance, vfModule, vnf)"
+                                               style="margin-right: 8px;">
+                                                <span class="glyphicon glyphicon-info-sign vfmodule-info"></span>
+                                            </a>
+                                            <div class="resume"
+                                                 ng-if="isPermitted && isResumeShown(vfModule.nodeStatus)">
+                                                <a data-tests-id="resumeVFModuleButton-{{vfModule.name}}"
+                                                   class="pull-right btn btn-success btn-xs button-margin"
+                                                   ng-click="resume(aService.instance, vfModule, vnf)">
+                                                    Resume
+                                                </a>
+                                            </div>
+
+                                        </div>
+                                        <ol ui-tree-nodes="" ng-model="vfModule.volumeGroups"
+                                            ng-class="{hidden: collapsed}">
+                                            <li ng-repeat="volumeGroup in vfModule.volumeGroups" ui-tree-node>
+                                                <div ui-tree-handle class="tree-node tree-node-content">
+                                                    VOLUME GROUP: {{volumeGroup.name}} | TYPE: {{volumeGroup.nodeType}}
+                                                    | ORCH STATUS: {{volumeGroup.nodeStatus}}
+                                                    <!-- <a class="pull-right btn btn-danger btn-xs" data-nodrag ng-click="deleteVolumeGroup(aService.instance, vnf, vfModule, volumeGroup)">
+                                                        <span class="glyphicon glyphicon-remove"></span>
+                                                    </a> -->
+                                                    <a class="pull-right btn btn-primary btn-xs" data-nodrag
+                                                       ng-click="describeVolumeGroup(aService.instance, vnf, volumeGroup)"
+                                                       style="margin-right: 8px;">
+                                                        <span class="glyphicon glyphicon-info-sign"></span>
+                                                    </a>
+                                                </div>
+                                            </li>
+                                        </ol>
+                                    </li>
+                                </ol>
+                                <ol ui-tree-nodes="" ng-model="vnf.availableVolumeGroups"
+                                    ng-class="{hidden: collapsed}">
+                                    <li ng-repeat="volumeGroup in vnf.availableVolumeGroups" ui-tree-node>
+                                        <div ui-tree-handle class="tree-node tree-node-content">
+                                            VOLUME GROUP: {{volumeGroup.name}} | TYPE: {{volumeGroup.nodeType}} | ORCH
+                                            STATUS: {{volumeGroup.nodeStatus}}
+                                            <a class="pull-right btn btn-danger btn-xs" ng-if="isPermitted"
+                                               data-tests-id="deleteVNFVolumeGroupButton" data-nodrag
+                                               ng-click="deleteVnfVolumeGroup(aService.instance, vnf, volumeGroup)">
+                                                <span class="glyphicon glyphicon-remove"></span>
+                                            </a>
+                                            <a class="pull-right btn btn-primary btn-xs" data-nodrag
+                                               ng-click="describeVolumeGroup(aService.instance, vnf, volumeGroup)"
+                                               style="margin-right: 8px;">
+                                                <span class="glyphicon glyphicon-info-sign volume-group-info"></span>
+                                            </a>
+                                        </div>
+                                    </li>
+                                </ol>
+
+                                <ol ui-tree-nodes="" ng-model="vnf.networks"
+                                    ng-class="{hidden: collapsed}">
+                                    <li ng-repeat="network in vnf.networks" ui-tree-node>
+                                        <div ui-tree-handle class="tree-node tree-node-content">
+                                            NETWORK: {{network.name}} | TYPE: {{network.nodeType}} | ORCH
+                                            STATUS: {{network.nodeStatus}}
+                                        </div>
+                                        <ol ui-tree-nodes="" ng-model="network.vlans" ng-class="{hidden: collapsed}">
+                                            <li ng-repeat="vlan in network.vlans" ui-tree-node>
+                                                <div ui-tree-handle class="tree-node tree-node-content"
+                                                     ng-class="'vlansTreeNode'">
+                                                    VLAN: {{vlan.vlanIdOuter}} | TYPE: VLAN
+                                                </div>
+
+                                            </li>
+                                        </ol>
+                                    </li>
+                                </ol>
+                            </li>
+                        </ol>
+
+                        <ol ui-tree-nodes="" ng-model="aService.instance.networks" ng-class="{hidden: collapsed}">
+                            <li ng-repeat="network in aService.instance.networks" ui-tree-node>
+                                <div ui-tree-handle class="tree-node tree-node-content">
+                                    NETWORK: {{network.name}} | TYPE: {{network.nodeType}} | ORCH STATUS:
+                                    {{network.nodeStatus}}
+
+                                    <a class="pull-right btn btn-danger btn-xs" ng-if="!isMacro() && isPermitted"
+                                       data-tests-id="deleteNetworkButton" data-nodrag
+                                       ng-click="deleteNetwork(aService.instance, network)">
+                                        <span class="glyphicon glyphicon-remove"></span>
+                                    </a>
+                                    <!--  <a class="pull-right btn btn-danger btn-xs" data-nodrag ng-click="deleteNetwork(aService.instance, network)">
+                                       <span class="glyphicon glyphicon-remove"></span>
+                                   </a>-->
+                                    <a class="pull-right btn btn-primary btn-xs" data-nodrag
+                                       ng-click="describeNetwork(aService.instance, network)"
+                                       style="margin-right: 8px;">
+                                        <span class="glyphicon glyphicon-info-sign network-info"></span>
+                                    </a>
+                                </div>
+
+                                <ol ui-tree-nodes="" ng-model="network.vlans" ng-class="{hidden: collapsed}">
+                                    <li ng-repeat="vlan in network.vlans" ui-tree-node>
+                                        <div ui-tree-handle class="tree-node tree-node-content"
+                                             ng-class="'vlansTreeNode'">
+                                            VLAN: {{vlan.vlanIdOuter}} | TYPE: VLAN
+                                        </div>
+
+                                    </li>
+                                </ol>
+                            </li>
+                        </ol>
+
+                        <ol ui-tree-nodes="" ng-model="aService.instance.configurations" ng-class="{hidden: collapsed}">
+                            <li ng-repeat="configuration in aService.instance.configurations" ui-tree-node>
+                                <div ui-tree-handle class="tree-node tree-node-content">
+                                    <a class="btn btn-success btn-xs"
+                                       ng-if="(configuration.ports && configuration.ports.length > 0)" data-nodrag
+                                       ng-click="this.toggle()">
+                                        <span class="glyphicon"
+                                              ng-class="{'glyphicon-chevron-right': collapsed,'glyphicon-chevron-down': !collapsed}"></span>
+                                    </a>
+                                    CONFIGURATION: {{configuration.name}} | TYPE: {{configuration.nodeType}} | ORCH
+                                    STATUS: {{configuration.nodeStatus}}
+
+                                    <a class="pull-right btn btn-danger btn-xs"
+                                       ng-if="!isMacro() && isPermitted && configuration.nodeStatus !== STATUS_CONSTANTS.AAI_ACTIVE"
+                                       ng-disabled="!isConfigurationDataAvailiable(configuration)"
+                                       data-tests-id="deleteConfigurationButton-{{configuration.name}}"
+                                       data-nodrag
+                                       ng-click="deleteConfiguration(aService, configuration)">
+                                        <span class="glyphicon glyphicon-remove"></span>
+                                    </a>
+
+
+                                    <a class="pull-right btn btn-primary btn-xs" data-nodrag
+                                       ng-click="toggleConfigurationStatus(aService, configuration)"
+                                       ng-if="isPermitted && allowConfigurationActions(configuration)"
+                                       ng-disabled="!isConfigurationDataAvailiable(configuration)"
+                                       data-tests-id="activateDeactivateButton-{{configuration.name}}">
+                                        {{configuration.nodeStatus === STATUS_CONSTANTS.AAI_ACTIVE ? "Deactivate" :
+                                        "Activate"}}
+                                    </a>
+                                </div>
+                                <ol ui-tree-nodes="" ng-model="configuration.ports" ng-class="{hidden: collapsed}">
+                                    <li ng-repeat="port in configuration.ports" ui-tree-node>
+                                        <div ui-tree-handle class="tree-node tree-node-content">
+                                            PORT: {{port.portName}} | ORCH STATUS: {{port.portStatus}}
+
+                                            <button type="button" data-tests-id="enableDisableButton-{{configuration.name}}-{{port.portName}}"
+                                                    class="pull-right btn btn-primary btn-xs"
+                                                    ng-if="configuration.nodeStatus == STATUS_CONSTANTS.AAI_ACTIVE"
+                                                    ng-disabled="!isConfigurationDataAvailiable(configuration)"
+                                                    ng-click="togglePortStatus(aService, configuration, port)">
+                                                {{port.portStatus === STATUS_CONSTANTS.AAI_ENABLED ? "Disable" :
+                                                "Enable"}}
+                                            </button>
+                                        </div>
+                                    </li>
+                                </ol>
+                            </li>
+                        </ol>
+
+                        <ol id="pnfs-tree" ui-tree-nodes="" ng-model="pnfs"
+                            ng-class="{hidden: collapsed || pnf.length === 0}">
+                            <li ng-repeat="pnf in pnfs" ui-tree-node>
+                                <div ui-tree-handle class="tree-node tree-node-content">
+                                    PNF: {{pnf}}
+                                    <a ng-if="isMacro()===false" class="dissociate-pnf pull-right btn btn-primary btn-xs" data-nodrag
+                                       ng-click="dissociatePnf(pnf)" style="margin-right: 8px;">
+                                        <span>Dissociate</span>
+                                    </a>
+                                </div>
+                            </li>
+                        </ol>
+                    </div>
+                </li>
+            </ol>
+        </div>
+    </div>
+</div>
index 04c1c55..2e6e800 100644 (file)
@@ -93,7 +93,7 @@ describe('View Edit Page: Upgrade VFModule', function () {
     it(`should display the more actions button if user is permitted`, function () {
       let SERVICE_INSTANCE_ID="3f93c7cb-2fd0-4557-9514-e189b7b04f9d";
       let SERVICE_TYPE="TYLER%20SILVIA";
-      cy.visit(`/serviceModels.htm#/instantiate?subscriberId=${SUBSCRIBER_ID}&subscriberName=SILVIA%20ROBBINS&serviceType=${SERVICE_TYPE}&serviceInstanceId=${SERVICE_INSTANCE_ID}&aaiModelVersionId=${serviceUuid}&isPermitted=true`);
+      cy.visit(`/serviceModels.htm#/instantiate?subscriberId=${SUBSCRIBER_ID}&subscriberName=SILVIA%20ROBBINS&serviceType=${SERVICE_TYPE}&serviceInstanceId=${SERVICE_INSTANCE_ID}&aaiModelVersionId=${serviceUuid}`);
 
       cy.get("[data-tests-id='service-instanceId-th-id']").should('contain', SERVICE_INSTANCE_ID);
       cy.getElementByDataTestsId("show-new-screen").should('be.visible').should('have.text', 'More actions').click();