2 * Copyright (C) 2017 AT&T Intellectual Property. All rights reserved.
4 * Licensed under the Apache License, Version 2.0 (the "License");
5 * you may not use this file except in compliance with the License.
6 * You may obtain a copy of the License at
8 * http://www.apache.org/licenses/LICENSE-2.0
10 * Unless required by applicable law or agreed to in writing, software
11 * distributed under the License is distributed on an "AS IS" BASIS,
12 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express
13 * or implied. See the License for the specific language governing
14 * permissions and limitations under the License.
17 import keyMirror from 'nfvo-utils/KeyMirror.js';
19 export const actionTypes = keyMirror({
26 export const rules = {
33 export const SyncStates = {
35 OUT_OF_SYNC: 'OutOfSync',
36 UP_TO_DATE: 'UpToDate'
39 export const ResolutionTypes = {
44 export const fileTypes = {
45 LKG : 'LicenseKeyGroup',
46 VLM : 'VendorLicenseModel',
47 EP : 'EntitlementPool',
49 LA : 'LicenseAgreement',
50 VSP : 'VendorSoftwareProduct',
52 VSP_Q : 'VSPQuestionnaire',
53 COMPONENT : 'Component',
54 COMPONENT_Q : 'ComponentQuestionnaire',
55 COMPONENT_DEP : 'ComponentDependencies',
56 COMPUTE_Q : 'ComputeQuestionnaire',
58 COMPUTE_FLAVOR: 'ComputeFlavor',
60 NIC_Q : 'NicQuestionnaire',
62 IMAGE_Q : 'ImageQuestionnaire',
64 DEPLOYMENT_FLAVOR : 'DeploymentFlavor',
67 ORCHESTRATION_TEMPLATE_CANDIDATE : 'OrchestrationTemplateCandidate'
70 export const dataRules = {
81 functionName: 'parseDate'
85 functionName: 'parseDate'
89 functionName: 'reduceList',
90 args: {subField: 'name'}
94 functionName: 'reduceList',
95 args: {subField: 'name'}
99 functionName: 'reduceList',
100 args: {subField: 'name'}
103 [fileTypes.COMPONENT] : {
105 [fileTypes.COMPUTE_FLAVOR] : {
106 associatedToDeploymentFlavor: {
111 [fileTypes.COMPUTE_Q] : {
113 [fileTypes.COMPONENT_Q] : {
114 isComponentMandatory: {
121 referencingFeatureGroups: {
123 functionName: 'getFeatureGroups'
126 rule: rules.FUNCTION,
127 functionName: 'processChoices'
131 referencingLicenseAgreements: {
133 functionName: 'getLicenseAgreements'
138 rule: rules.FUNCTION,
139 functionName: 'processChoice'
142 [fileTypes.LIMIT] : {
144 rule: rules.FUNCTION,
145 functionName: 'getEnumValue',
146 args: {listName: 'limitType'}
149 rule: rules.FUNCTION,
150 functionName: 'getEnumValue',
151 args: {listName: 'limitUnit'}
156 rule: rules.FUNCTION,
157 functionName: 'processChoices'
159 referencingFeatureGroups: {
161 functionName: 'getFeatureGroups'
169 [fileTypes.NIC_Q] : {
171 [fileTypes.PROCESS] : {
173 rule: rules.FUNCTION,
174 functionName: 'getEnumValue',
175 args: {listName: 'processType'}
197 rule: rules.FUNCTION,
198 functionName: 'fetchLMVersion'
201 rule: rules.FUNCTION,
202 functionName: 'fetchCategory'
208 [fileTypes.VSP_Q] : {
212 storageReplicationAcrossRegion: {
218 [fileTypes.ORCHESTRATION_TEMPLATE_CANDIDATE] : {
220 rule: rules.FUNCTION,
221 functionName: 'convertArrayToObject'