aboutsummaryrefslogtreecommitdiffstats
path: root/vid-app-common/src/main/webapp/app/vid/scripts/constants/vidConfiguration.js
blob: f56066164a430b9d37821a2dd500ec6a256ea830 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
/*-
 * ============LICENSE_START=======================================================
 * VID
 * ================================================================================
 * Copyright (C) 2017 AT&T Intellectual Property. All rights reserved.
 * ================================================================================
 * Licensed under the Apache License, Version 2.0 (the "License");
 * you may not use this file except in compliance with the License.
 * You may obtain a copy of the License at
 * 
 *      http://www.apache.org/licenses/LICENSE-2.0
 * 
 * Unless required by applicable law or agreed to in writing, software
 * distributed under the License is distributed on an "AS IS" BASIS,
 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 * See the License for the specific language governing permissions and
 * limitations under the License.
 * ============LICENSE_END=========================================================
 */

"use strict";

appDS2.constant("VIDCONFIGURATION", (function() {
	/*
	 * VNF_STATUS_CHECK_ENABLED: Determines whether VID will check the VNF valid status combination list, before allowing VNF updates.
	 * Set to false, to disable the check.
	 */
	var VNF_STATUS_CHECK_ENABLED = false;
	/*
	 * UPLOAD_SUPPLEMENTARY_STATUS_CHECK_ENABLED: Determines the Property to Govern Presence of Upload Supplementary File on Volume Group Screen.
	 * Set to false, to disable the check.
	 */
	var UPLOAD_SUPPLEMENTARY_STATUS_CHECK_ENABLED = false;
	/*
	 * List of valid VNF status combinations
	 */
	var vnfValidStatusList = [
			{
				"provStatus": "preprov",
				"orchestrationStatus": "pending-create",
				"inMaint": false,
				"operationalStatus": null
			},
			{
				"provStatus": "preprov",
				"orchestrationStatus": "created",
				"inMaint": false,
				"operationalStatus": null
			},
			{
				"provStatus": "preprov",
				"orchestrationStatus": "active",
				"inMaint": false,
				"operationalStatus": null
			},
			{
				"provStatus": "nvtprov",
				"orchestrationStatus": "active",
				"inMaint": false,
				"operationalStatus": null
			},
			{
				"provStatus": "prov",
				"orchestrationStatus": "active",
				"inMaint": false,
				"operationalStatus": "out-of-service-path"
			}
	];
	/* 
	 * The model status VID uses to query SDC for a list of models. The possible values are:
	 * DISTRIBUTION_NOT_APPROVED,
	 * DISTRIBUTION_APPROVED,
	 * DISTRIBUTED,
	 * DISTRIBUTION_REJECTED,
	 * ALL,
	 * In the production env, this should always be set to DISTRIBUTED
	 */
	var ASDC_MODEL_STATUS = "DISTRIBUTED";
	/*
	 * Max number of times that VID will poll MSO for a given request status
	 */
	var MSO_MAX_POLLS = 10;
	/*
	 * Number of msecs that VID will wait between MSO polls.
	 */
	var MSO_POLLING_INTERVAL_MSECS = 10000;
	/*
	 * List of all service model invariant UUIDs that need macro instantiation.
	 * Example:
	 * MACRO_SERVICES : ["3cf30cbb-5fe7-4fb3-b049-559a4997b221", "b135a703-bab5-4295-a37f-580a4f2d0961"]
	 * 
	 */
	var COMPONENT_LIST_NAMED_QUERY_ID = "0367193e-c785-4d5f-9cb8-7bc89dc9ddb7";
	var MACRO_SERVICES = [];
    return {
    	ASDC_MODEL_STATUS : ASDC_MODEL_STATUS,
    	MSO_MAX_POLLS : MSO_MAX_POLLS,
    	MSO_POLLING_INTERVAL_MSECS : MSO_POLLING_INTERVAL_MSECS,
    	VNF_STATUS_CHECK_ENABLED : VNF_STATUS_CHECK_ENABLED,
    	VNF_VALID_STATUS_LIST : vnfValidStatusList,
		UPLOAD_SUPPLEMENTARY_STATUS_CHECK_ENABLED : UPLOAD_SUPPLEMENTARY_STATUS_CHECK_ENABLED,
    	MACRO_SERVICES : MACRO_SERVICES,
    	COMPONENT_LIST_NAMED_QUERY_ID : COMPONENT_LIST_NAMED_QUERY_ID
    };
})())