2 * ============LICENSE_START=======================================================
4 * ================================================================================
5 * Copyright (C) 2017 - 2019 AT&T Intellectual Property. All rights reserved.
6 * ================================================================================
7 * Licensed under the Apache License, Version 2.0 (the "License");
8 * you may not use this file except in compliance with the License.
9 * You may obtain a copy of the License at
11 * http://www.apache.org/licenses/LICENSE-2.0
13 * Unless required by applicable law or agreed to in writing, software
14 * distributed under the License is distributed on an "AS IS" BASIS,
15 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
16 * See the License for the specific language governing permissions and
17 * limitations under the License.
18 * ============LICENSE_END=========================================================
23 var DataService = function($log, DataService) {
28 getAvailableVolumeGroupList : function() {
29 return _this.availableVolumeGroupList;
31 setAvailableVolumeGroupList : function(availableVolumeGroupList) {
32 _this.availableVolumeGroupList = availableVolumeGroupList;
34 getCloudRegionTenantList : function() {
35 return _this.cloudRegionTenantList;
37 setCloudRegionTenantList : function(cloudRegionTenantList) {
38 _this.cloudRegionTenantList = cloudRegionTenantList;
40 getCloudOwnerAndLcpCloudRegionFromOptionId : function (cloudRegionOptionId) {
41 var cloudRegionTenantList = this.getCloudRegionTenantList();
42 var cloudRegionTenant = _.find(cloudRegionTenantList, {"cloudRegionOptionId": cloudRegionOptionId});
44 cloudOwner: cloudRegionTenant.cloudOwner,
45 cloudRegionId: cloudRegionTenant.cloudRegionId
48 getGlobalCustomerId : function() {
49 return _this.globalCustomerId;
51 setGlobalCustomerId : function(globalCustomerId) {
52 _this.globalCustomerId = globalCustomerId;
54 getCustomizationUuid : function() {
55 return _this.customizationUUID;
57 setCustomizationUuid : function(customizationUUID) {
58 _this.customizationUUID = customizationUUID;
60 getResCustomizationUuid : function() {
61 return _this.rescustomizationUUID;
63 setResCustomizationUuid : function(rescustomizationUUID) {
64 _this.rescustomizationUUID = rescustomizationUUID;
66 getInventoryItem : function() {
67 return _this.inventoryItem;
69 setInventoryItem : function(inventoryItem) {
70 _this.inventoryItem = inventoryItem;
72 getModelId : function() {
75 setModelId : function(modelId) {
76 _this.modelId = modelId;
78 setModelInstanceName : function(modelInstanceName) {
79 _this.modelInstanceName = modelInstanceName;
81 getModelInfo : function(componentId) {
82 return _this.modelInfo[componentId];
84 setModelInfo : function(componentId, modelInfo) {
85 if (_this.modelInfo === undefined) {
86 _this.modelInfo = new Object;
88 _this.modelInfo[componentId] = modelInfo;
90 getNetworkInstanceId : function() {
91 return _this.networkInstanceId;
93 setNetworkInstanceId : function(networkInstanceId) {
94 _this.networkInstanceId = networkInstanceId;
96 getServiceIdList : function() {
97 return _this.serviceIdList;
99 setServiceIdList : function(serviceIdList) {
100 _this.serviceIdList = serviceIdList;
102 setAicZones : function(aicZones) {
103 _this.aicZones = aicZones;
105 getAicZones : function(){
106 return _this.aicZones;
108 getAicZoneForPNF : function(){
109 return _this.aicZone;
111 getServiceInstanceId : function() {
112 return _this.serviceInstanceId;
114 setServiceInstanceId : function(serviceInstanceId) {
115 _this.serviceInstanceId = serviceInstanceId;
117 getServiceInstanceName : function() {
118 return _this.serviceInstanceName;
120 setServiceInstanceName : function(serviceInstanceName) {
121 _this.serviceInstanceName = serviceInstanceName;
123 getServiceName : function() {
124 return _this.serviceName;
126 setServiceName : function(serviceName) {
127 _this.serviceName = serviceName;
129 getServiceType : function() {
130 return _this.serviceType;
132 setServiceType : function(serviceType) {
133 _this.serviceType = serviceType;
135 getServiceUuid : function() {
136 return _this.serviceUuid;
138 setServiceUuid : function(serviceUuid) {
139 _this.serviceUuid = serviceUuid;
141 getLoggedInUserId : function() {
142 return _this.loggedInUserId;
144 setLoggedInUserId : function(loggedInUserId) {
145 _this.loggedInUserId = loggedInUserId;
147 getSubscriberName : function() {
148 return _this.subscriberName;
150 setSubscriberName : function(subscriberName) {
151 _this.subscriberName = subscriberName;
153 getSubscribers : function() {
154 return _this.subscribers;
156 setSubscribers : function(subscribers) {
157 _this.subscribers = subscribers;
159 getSubscriptionServiceTypeList : function() {
160 return _this.subscriptionServiceTypeList;
162 setSubscriptionServiceTypeList : function(subscriptionServiceTypeList) {
163 _this.subscriptionServiceTypeList = subscriptionServiceTypeList;
165 setUserServiceInstanceName : function(userServiceInstanceName) {
166 _this.userServiceInstanceName = userServiceInstanceName;
168 getVfModuleInstanceId : function() {
169 return _this.vfModuleInstanceId;
171 setVfModuleInstanceId : function(vfModuleInstanceId) {
172 _this.vfModuleInstanceId = vfModuleInstanceId;
174 getVnfInstanceId : function() {
175 return _this.vnfInstanceId;
177 setVnfInstanceId : function(vnfInstanceId) {
178 _this.vnfInstanceId = vnfInstanceId;
180 getVfModuleInstanceName : function() {
181 return _this.vfModuleInstanceName;
183 setVfModuleInstanceName : function(vfModuleInstanceName) {
184 _this.vfModuleInstanceName = vfModuleInstanceName;
186 getVolumeGroupInstanceId : function() {
187 return _this.volumeGroupInstanceId;
189 setVolumeGroupInstanceId : function(volumeGroupInstanceId) {
190 _this.volumeGroupInstanceId = volumeGroupInstanceId;
192 getLcpRegion : function() {
193 return _this.lcpRegion;
195 setLcpRegion : function(lcpRegion) {
196 _this.lcpRegion = lcpRegion;
198 getTenant : function() {
201 setTenant : function(tenant) {
202 _this.tenant = tenant;
204 setServiceInstanceToCustomer : function(serviceInstanceToCustomer) {
205 _this.serviceInstanceToCustomer = [];
206 _this.serviceInstanceToCustomer = serviceInstanceToCustomer;
208 getMsoRequestParametersTestApi: function(){
209 return sessionStorage.getItem("msoRequestParametersTestApiValue");
211 setALaCarte : function(aval) {
212 _this.aLaCarte = aval;
214 getALaCarte : function() {
215 // if not set return true
216 if (_this.aLaCarte === undefined) {
219 return _this.aLaCarte;
221 setShouldIncludeInAsyncInstantiationFlow: function (val) {
222 _this.shouldIncludeInAsyncInstantiationFlow = val;
224 getShouldIncludeInAsyncInstantiationFlow: function(){
225 if (_this.shouldIncludeInAsyncInstantiationFlow === undefined) {
228 return _this.shouldIncludeInAsyncInstantiationFlow;
230 setMacro : function(aval) {
233 getMacro : function() {
234 if (_this.macro === undefined) {
239 getResources : function() {
240 return _this.resources;
242 setResources : function(r) {
245 getSystemPropProvStatus : function() {
246 return _this.syspropProvStatusList;
248 setSystemPropProvStatus : function(r) {
249 _this.syspropProvStatusList = r;
251 getUpdatedVNFProvStatus : function() {
252 return _this.updatedvnfProvStatus;
254 setUpdatedVNFProvStatus : function(r) {
255 _this.updatedvnfProvStatus = r;
257 setArbitraryParameters : function (pList) {
258 _this.arbitraryParameters = pList;
260 getArbitraryParameters : function () {
261 return _this.arbitraryParameters;
263 setE2EService:function(b){
266 getE2EService:function(){
267 return _this.e2eService;
269 setHideServiceFields:function(b){
270 _this.hideServiceFields=b;
272 getHideServiceFields:function(){
273 return _this.hideServiceFields;
275 getServiceProxies:function(){
276 return _this.serviceProxies;
278 setServiceProxies:function(serviceProxies){
279 _this.serviceProxies = serviceProxies;
281 getSourceServiceProxies:function(){
282 return _this.sourceServiceProxies;
284 setSourceServiceProxies:function(sourceServiceProxies){
285 _this.sourceServiceProxies = sourceServiceProxies;
287 getCollectorServiceProxies:function(){
288 return _this.collectorServiceProxies;
290 setCollectorServiceProxies:function(collectorServiceProxies){
291 _this.collectorServiceProxies = collectorServiceProxies;
293 getConfigurationByPolicy:function() {
294 return _this.configurationByPolicy;
296 setConfigurationByPolicy:function (configurationByPolicy) {
297 _this.configurationByPolicy = configurationByPolicy;
299 getPortMirroningConfigFields:function(){
300 return _this.portMirroningConfigFields;
302 setPortMirroningConfigFields:function(portMirroningConfigFields){
303 _this.portMirroningConfigFields = portMirroningConfigFields;
305 getConfigurationInstanceId : function() {
306 return _this.configurationInstanceId;
308 setConfigurationInstanceId : function(configurationInstanceId) {
309 _this.configurationInstanceId = configurationInstanceId;
311 getPnf: function () {
314 setPnf: function (pnf) {
317 getOwningEntityProperties: function () {
318 return _this.owningEntityProperties;
320 setOwningEntityProperties: function (properties) {
321 _this.owningEntityProperties = properties;
326 appDS2.factory("DataService", [ "$log", DataService ]);