3787bc80cb5d3c56da80231d7b0e3d21b1f800dc
[aai/aai-common.git] / aai-core / src / main / java / org / openecomp / aai / dbmodel / v9 / gen / DbEdgeRules.java
1 /*-
2  * ============LICENSE_START=======================================================
3  * org.openecomp.aai
4  * ================================================================================
5  * Copyright (C) 2017 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
10
11      http://www.apache.org/licenses/LICENSE-2.0
12
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=========================================================
19  */
20
21 package org.openecomp.aai.dbmodel.v9.gen;
22
23 import java.util.HashMap;
24 import java.util.Map;
25
26 import com.google.common.collect.ImmutableSetMultimap;
27 import com.google.common.collect.Multimap;
28
29 public class DbEdgeRules {
30
31         /*
32          * The EdgeRules data is set up as a key (fromNodeTypeA|toNodeTypeB) mapped
33          * to a string which holds the info we need to build an edge from nodeTypeA
34          * to nodeTypeB. Note -- the MultiMap will let us define more than one type
35          * of edge between a given pair of nodeTypes, but for now we never define
36          * more than one.
37          * 
38          * The edgeInfo part is comma separated and looks like this:
39          * "edgeLabel,direction,multiplicityRule,isParent,usesResource,hasDelTarget,SVC-INFRA" This
40          * format is encoded into the EdgeInfoMap below. 
41          * MultiplicityRule can be either "Many2Many", "Many2One", "One2Many" or "One2One"
42          * The values for the things after multiplicityRule can be either "true", "false" or "reverse". "reverse" is
43          * really saying that this tag does apply, but the edge will be traversed
44          * the opposite way from the same tag that just has "true".
45          */
46         public static final Map<Integer, String> EdgeInfoMap;
47         static {
48                 EdgeInfoMap = new HashMap<Integer, String>();
49                 EdgeInfoMap.put(0, "edgeLabel");
50                 EdgeInfoMap.put(1, "direction");
51                 EdgeInfoMap.put(2, "multiplicityRule");
52                 EdgeInfoMap.put(3, "isParent");
53                 EdgeInfoMap.put(4, "usesResource");
54                 EdgeInfoMap.put(5, "hasDelTarget");
55                 EdgeInfoMap.put(6, "SVC-INFRA");
56         }
57         
58         public static Integer firstTagIndex = 3;
59
60         public static final Multimap<String, String> EdgeRules = new ImmutableSetMultimap.Builder<String, String>()
61                         .putAll("availability-zone|complex",
62                                         "groupsResourcesIn,OUT,Many2Many,false,false,false,false")
63                         .putAll("availability-zone|service-capability",
64                                         "supportsServiceCapability,OUT,Many2Many,false,false,false,false")
65                         .putAll("cloud-region|complex",
66                                         "locatedIn,OUT,Many2One,false,false,false,false")
67                         .putAll("cloud-region|l3-network",
68                                         "uses,OUT,Many2Many,false,false,false,false")
69                         .putAll("cloud-region|tenant",
70                                         "has,OUT,One2Many,true,false,false,reverse")
71                         .putAll("cloud-region|image",
72                                         "has,OUT,One2Many,true,false,false,false")
73                         .putAll("cloud-region|flavor",
74                                         "has,OUT,One2Many,true,false,false,false")
75                         .putAll("cloud-region|availability-zone",
76                                         "has,OUT,One2Many,true,false,false,false")
77                         .putAll("cloud-region|oam-network",
78                                         "has,OUT,One2Many,true,false,false,false")
79                         .putAll("cloud-region|dvs-switch",
80                                         "has,OUT,One2Many,true,false,false,false")
81                         .putAll("cloud-region|volume-group",
82                                         "has,OUT,One2Many,true,true,false,false")
83                         .putAll("cloud-region|group-assignment",
84                                         "has,OUT,One2Many,true,false,false,false")
85                         .putAll("cloud-region|snapshot",
86                                         "has,OUT,One2Many,true,false,false,false")
87                         .putAll("cloud-region|zone",
88                                         "isMemberOf,OUT,Many2One,false,false,false,false")
89                         .putAll("complex|ctag-pool",
90                                         "hasCtagPool,OUT,Many2Many,true,false,false,false")
91                         .putAll("complex|l3-network",
92                                         "usesL3Network,OUT,Many2Many,false,false,false,true")
93                         .putAll("ctag-pool|availability-zone",
94                                         "supportsAvailabilityZone,OUT,Many2Many,false,false,false,false")
95                         .putAll("customer|service-subscription",
96                                         "subscribesTo,OUT,Many2Many,true,false,false,reverse")
97                         .putAll("dvs-switch|availability-zone",
98                                         "existsIn,OUT,Many2Many,false,false,false,false")
99                         .putAll("generic-vnf|l-interface",
100                                         "hasLInterface,OUT,Many2Many,true,false,false,true")
101                         .putAll("generic-vnf|availability-zone",
102                                         "hasAvailabilityZone,OUT,Many2Many,false,false,false,true")
103                         .putAll("generic-vnf|lag-interface",
104                                         "hasLAGInterface,OUT,Many2Many,true,false,false,true")
105                         .putAll("generic-vnf|l3-network",
106                                         "usesL3Network,OUT,Many2Many,false,true,false,true")
107                         .putAll("generic-vnf|pserver",
108                                         "runsOnPserver,OUT,Many2Many,false,true,false,true")
109                         .putAll("generic-vnf|vnf-image",
110                                         "usesVnfImage,OUT,Many2One,false,false,false,true")
111                         .putAll("generic-vnf|vserver",
112                                         "runsOnVserver,OUT,One2Many,false,true,false,true")
113                         .putAll("generic-vnf|service-instance",
114                                         "hasInstance,OUT,Many2Many,false,true,false,true")
115                         .putAll("generic-vnf|site-pair-set",
116                                         "hasSitePairSet,OUT,Many2Many,false,false,false,false")
117                         .putAll("generic-vnf|network-profile",
118                                         "hasNetworkProfile,OUT,Many2Many,false,false,false,false")
119                         .putAll("group-assignment|tenant",
120                                         "has,OUT,Many2Many,false,false,false,false")
121                         .putAll("group-assignment|pserver",
122                                         "has,OUT,One2Many,false,false,false,false")
123                         .putAll("image|metadata", "hasMetaData,OUT,Many2Many,true,false,false,false")
124                         .putAll("image|metadatum",
125                                         "hasMetaDatum,OUT,Many2Many,true,false,false,false")
126                         .putAll("l-interface|l3-interface-ipv4-address-list",
127                                         "hasIpAddress,OUT,Many2Many,true,false,false,true")
128                         .putAll("l-interface|l3-interface-ipv6-address-list",
129                                         "hasIpAddress,OUT,Many2Many,true,false,false,true")
130                         .putAll("l-interface|logical-link",
131                                         "usesLogicalLink,OUT,Many2Many,false,false,true,true")
132                         .putAll("l-interface|vlan","hasVlan,OUT,Many2Many,true,false,false,false")
133                         .putAll("l-interface|sriov-vf","has,OUT,One2One,true,false,false,false")
134                         .putAll("l3-interface-ipv4-address-list|l3-network",
135                                         "isMemberOf,OUT,Many2Many,false,false,false,true")
136                         .putAll("l3-interface-ipv6-address-list|l3-network",
137                                         "isMemberOf,OUT,Many2Many,false,false,false,true")
138                         .putAll("l3-interface-ipv4-address-list|subnet",
139                                         "isMemberOf,OUT,Many2Many,false,false,false,true")
140                         .putAll("l3-interface-ipv6-address-list|subnet",
141                                         "isMemberOf,OUT,Many2Many,false,false,false,true")
142                         .putAll("l3-network|vpn-binding",
143                                         "usesVpnBinding,OUT,Many2Many,false,false,false,false")
144                         .putAll("l3-network|subnet",
145                                         "hasSubnet,OUT,Many2Many,true,false,false,reverse")
146                         .putAll("l3-network|service-instance",
147                                         "hasInstance,OUT,Many2Many,false,false,false,reverse")
148                         .putAll("l3-network|ctag-assignment",
149                                         "hasCtagAssignment,OUT,Many2Many,true,false,false,true")
150                         .putAll("l3-network|network-policy",
151                                         "uses,OUT,Many2Many,false,false,false,true")
152                         .putAll("l3-network|segmentation-assignment",
153                                         "has,OUT,One2Many,true,false,false,false")
154                         .putAll("l3-network|route-table-reference",
155                                         "uses,OUT,Many2Many,false,false,false,false")
156                         .putAll("lag-interface|lag-link",
157                                         "usesLAGLink,OUT,Many2Many,false,true,true,true")
158                         .putAll("lag-interface|p-interface",
159                                         "usesPInterface,OUT,Many2Many,false,true,false,true")
160                         .putAll("lag-interface|l-interface",
161                                         "hasLInterface,OUT,Many2Many,true,false,false,true")            
162                         .putAll("logical-link|lag-link",
163                                         "usesLAGLink,OUT,Many2Many,false,true,false,true")      
164                         .putAll("logical-link|pnf",
165                                         "bridgedTo,OUT,Many2Many,false,false,false,false")      
166                         .putAll("logical-link|logical-link",
167                                         "uses,OUT,One2Many,false,false,false,true")     
168                         .putAll("model|model-ver",
169                                         "has,OUT,One2Many,true,false,false,false")
170                         .putAll("model-ver|model-element",
171                                         "startsWith,OUT,One2Many,true,false,false,false")
172                         .putAll("model-element|model-ver",
173                                         "isA,OUT,Many2One,false,false,false,false")
174                         .putAll("model-ver|metadatum",
175                                         "hasMetaData,OUT,One2Many,true,false,false,false")
176                         .putAll("model-element|model-element",
177                                         "connectsTo,OUT,One2Many,true,false,false,false")
178                         .putAll("model-element|model-constraint",
179                                         "uses,OUT,One2Many,true,false,false,false")
180                         .putAll("model-element|constrained-element-set",
181                                         "connectsTo,OUT,One2Many,true,false,false,false")
182                         .putAll("model-constraint|constrained-element-set",
183                                         "uses,OUT,One2Many,true,false,false,false")
184                         .putAll("constrained-element-set|element-choice-set",
185                                         "uses,OUT,One2Many,true,false,false,false")
186                         .putAll("element-choice-set|model-element",
187                                         "has,OUT,One2Many,true,false,false,false")
188                         .putAll("named-query|model",
189                                         "relatedTo,OUT,One2Many,false,false,false,false")
190                         .putAll("named-query|named-query-element",
191                                         "startsWith,OUT,One2One,true,false,false,false")
192                         .putAll("named-query-element|named-query-element",
193                                         "connectsTo,OUT,Many2Many,true,false,false,false")
194                         .putAll("named-query-element|model",
195                                         "isA,OUT,Many2One,false,false,false,false")
196                         .putAll("named-query-element|property-constraint",
197                                         "uses,OUT,One2Many,true,false,false,false")
198                         .putAll("named-query-element|related-lookup",
199                                         "uses,OUT,One2Many,true,false,false,false")
200                         .putAll("instance-group|model",
201                                         "targets,OUT,Many2Many,false,false,false,false")
202                         .putAll("newvce|l-interface",
203                                         "hasLInterface,OUT,Many2Many,true,false,false,false")
204                         .putAll("oam-network|complex",
205                                         "definedFor,OUT,Many2Many,false,false,false,false")
206                         .putAll("oam-network|service-capability",
207                                         "supportsServiceCapability,OUT,Many2Many,false,false,false,false")
208                         .putAll("p-interface|l-interface",
209                                         "hasLInterface,OUT,Many2Many,true,false,false,true")
210                         .putAll("p-interface|physical-link",
211                                         "usesPhysicalLink,OUT,Many2Many,false,false,true,false")
212                         .putAll("p-interface|logical-link",
213                     "usesLogicalLink,OUT,Many2One,false,false,false,true")              
214                         .putAll("port-group|cvlan-tag", "hasCTag,OUT,Many2Many,true,true,false,true")
215                         .putAll("pserver|complex", "locatedIn,OUT,Many2One,false,false,false,true")
216                         .putAll("pserver|cloud-region","locatedIn,OUT,Many2One,false,false,false,true")
217                         .putAll("pserver|availability-zone","existsIn,OUT,Many2One,false,false,false,true")
218                         .putAll("pserver|lag-interface",
219                                         "hasLAGInterface,OUT,Many2Many,true,false,false,true")
220                         .putAll("pserver|p-interface",
221                                         "hasPinterface,OUT,Many2Many,true,true,false,true")
222                         .putAll("pserver|zone",
223                                         "isMemberOf,OUT,Many2One,false,false,false,false")      
224                         .putAll("pnf|p-interface",
225                                         "hasPinterface,OUT,Many2Many,true,true,false,true")
226                         .putAll("pnf|lag-interface",
227                                         "has,OUT,One2Many,true,false,false,true")
228                         .putAll("pnf|complex",
229                                         "locatedIn,OUT,Many2One,false,false,false,false")       
230                         .putAll("pnf|instance-group",
231                                         "isMemberOf,OUT,Many2Many,false,false,false,false")     
232                         .putAll("pnf|zone",
233                                         "isMemberOf,OUT,Many2One,false,false,false,false")      
234                         .putAll("service-instance|cvlan-tag",
235                                         "hasIPAGFacingVLAN,OUT,Many2Many,false,true,false,false")                       
236                         .putAll("service-instance|pnf",
237                                         "uses,OUT,One2Many,false,true,false,false")     
238                         .putAll("service-subscription|service-instance",
239                                         "hasInstance,OUT,Many2Many,true,false,false,reverse")
240                         .putAll("site-pair-set|routing-instance",
241                                         "hasRoutingInstance,OUT,Many2Many,true,false,false,false")
242                         .putAll("routing-instance|site-pair",
243                                         "hasSitePair,OUT,Many2Many,true,false,false,false")                                     
244                         .putAll("site-pair|class-of-service",
245                                         "hasClassOfService,OUT,Many2Many,true,false,false,false")
246                         .putAll("tenant|l3-network",
247                                         "usesL3Network,OUT,Many2Many,false,false,false,false")
248                         .putAll("tenant|service-subscription",
249                                         "relatedTo,OUT,Many2Many,false,false,false,false")
250                         .putAll("tenant|vserver", "owns,OUT,One2Many,true,false,false,reverse")
251                         .putAll("vce|availability-zone",
252                                         "hasAvailabilityZone,OUT,Many2Many,false,false,false,false")
253                         .putAll("vce|complex", "locatedIn,OUT,Many2Many,false,false,false,true")
254                         .putAll("vce|port-group", "hasPortGroup,OUT,Many2Many,true,true,false,true")
255                         .putAll("vce|vserver", "runsOnVserver,OUT,Many2Many,false,true,false,true")
256                         .putAll("vce|service-instance",
257                                         "hasServiceInstance,OUT,Many2Many,false,false,false,reverse")
258                         .putAll("virtual-data-center|generic-vnf",
259                                         "hasVNF,OUT,Many2Many,false,false,false,reverse")
260                         .putAll("vlan|l3-interface-ipv4-address-list",
261                                         "hasIpAddress,OUT,Many2Many,true,false,false,true")
262                         .putAll("vlan|l3-interface-ipv6-address-list",
263                                         "hasIpAddress,OUT,Many2Many,true,false,false,true")
264                         .putAll("vpe|complex", "locatedIn,OUT,Many2Many,false,false,false,false")
265                         .putAll("vpe|ctag-pool", "usesCtagPool,OUT,Many2Many,false,false,false,false")
266                         .putAll("vpe|l-interface",
267                                         "hasLInterface,OUT,Many2Many,true,false,false,false")
268                         .putAll("vpe|lag-interface",
269                                         "hasLAGInterface,OUT,Many2Many,true,false,false,false")
270                         .putAll("vpe|vserver", "runsOnVserver,OUT,Many2Many,false,true,false,false")
271                         .putAll("vpls-pe|complex", "locatedIn,OUT,Many2Many,false,false,false,false")
272                         .putAll("vpls-pe|ctag-pool",
273                                         "usesCtagPool,OUT,Many2Many,false,false,false,false")
274                         .putAll("vpls-pe|p-interface",
275                                         "hasPinterface,OUT,Many2Many,true,false,false,false")
276                         .putAll("vpls-pe|lag-interface",
277                                         "hasLAGinterface,OUT,Many2Many,true,false,false,false")
278                         .putAll("vserver|flavor", "hasFlavor,OUT,Many2One,false,false,false,true")
279                         .putAll("vserver|image", "hasImage,OUT,Many2One,false,false,false,true")
280                         .putAll("vserver|ipaddress",
281                                         "hasIpAddress,OUT,Many2Many,true,true,false,false")
282                         .putAll("vserver|l-interface",
283                                         "hasLInterface,OUT,Many2Many,true,false,false,true")
284                         .putAll("vserver|pserver",
285                                         "runsOnPserver,OUT,Many2One,false,true,false,true")
286                         .putAll("vserver|volume", "hasVolume,OUT,Many2Many,true,true,false,true")
287                         .putAll("vserver|vnfc", "hosts,OUT,Many2Many,false,true,false,true")
288                         .putAll("vserver|snapshot", "uses,OUT,One2One,false,false,false,true")
289             .putAll("service-instance|connector", "uses,OUT,Many2Many,false,true,false,false")
290             .putAll("service-instance|metadatum", "hasMetaData,OUT,Many2Many,true,false,false,false")
291             .putAll("service-instance|logical-link", "uses,OUT,Many2Many,false,false,true,false")
292                         .putAll("service-instance|vlan", "dependsOn,OUT,One2Many,false,true,false,false")
293                         .putAll("service-instance|service-instance", "dependsOn,OUT,One2Many,false,true,false,false")
294             .putAll("connector|virtual-data-center", "contains,OUT,Many2Many,false,false,false,false")
295             .putAll("connector|metadatum", "hasMetaData,OUT,Many2Many,true,false,false,false")
296             .putAll("virtual-data-center|logical-link", "contains,OUT,Many2Many,false,true,false,false")
297             .putAll("logical-link|generic-vnf", "bridgedTo,OUT,Many2Many,false,false,false,false")
298             .putAll("logical-link|pserver", "bridgedTo,OUT,Many2Many,false,false,false,false")
299             .putAll("vlan|multicast-configuration", "uses,OUT,Many2Many,false,true,false,false")
300             .putAll("volume-group|complex", "existsIn,OUT,Many2Many,false,false,false,true")
301             .putAll("volume-group|tenant", "belongsTo,OUT,Many2Many,false,false,false,true")
302             .putAll("ipsec-configuration|vig-server", "hasVigServer,OUT,One2Many,true,true,false,false")
303             .putAll("generic-vnf|ipsec-configuration", "uses,OUT,Many2One,false,true,false,false")
304             .putAll("vf-module|volume-group", "uses,OUT,One2One,false,false,false,true")
305             .putAll("vserver|vf-module", "isPartOf,OUT,Many2One,false,false,false,true")
306             .putAll("vf-module|l3-network", "uses,OUT,Many2Many,false,false,false,true")
307             .putAll("vf-module|vnfc", "uses,OUT,One2Many,false,false,true,true")
308             .putAll("generic-vnf|vf-module", "has,OUT,One2Many,true,false,false,true")
309             .putAll("generic-vnf|volume-group", "uses,OUT,One2Many,false,false,false,true")
310             .putAll("generic-vnf|vnfc", "uses,OUT,One2Many,false,false,true,true")
311             .putAll("vlan|logical-link", "usesLogicalLink,OUT,Many2Many,false,false,true,true")
312             .putAll("service-instance|ctag-assignment","uses,OUT,One2Many,false,false,false,false")
313             // The next edge is needed in 1702 but will be worked in user story AAI-6848
314             //.putAll("service-instance|allotted-resource", "uses,OUT,Many2Many,false,false,false,false")
315             .putAll("allotted-resource|generic-vnf", "isPartOf,OUT,Many2Many,false,false,false,false")
316             .putAll("allotted-resource|l3-network", "isPartOf,OUT,Many2Many,false,false,false,false")
317             .putAll("allotted-resource|instance-group", "isMemberOf,OUT,Many2Many,false,false,false,false")
318             .putAll("allotted-resource|vlan", "isPartOf,OUT,Many2Many,false,false,false,false")
319             .putAll("generic-vnf|instance-group", "isMemberOf,OUT,Many2Many,false,false,false,false")
320             .putAll("service-instance|instance-group", "isMemberOf,OUT,Many2Many,false,false,false,false")      
321             .putAll("allotted-resource|tunnel-xconnect", "has,OUT,One2One,true,false,false,false")
322             .putAll("logical-link|cloud-region", "existsIn,OUT,Many2Many,false,false,false,false")
323             .putAll("logical-link|vpn-binding", "uses,OUT,Many2Many,false,false,false,false")
324             .putAll("generic-vnf|entitlement", "has,OUT,One2Many,true,false,false,false")
325             .putAll("generic-vnf|license", "has,OUT,One2Many,true,false,false,false")
326             .putAll("vce|entitlement", "has,OUT,One2Many,true,false,false,false")
327             .putAll("vce|license", "has,OUT,One2Many,true,false,false,false")
328             .putAll("vpe|entitlement", "has,OUT,One2Many,true,false,false,false")
329             .putAll("vpe|license", "has,OUT,One2Many,true,false,false,false")
330             .putAll("zone|complex", "existsIn,OUT,Many2One,false,false,false,false")
331             .putAll("service-instance|allotted-resource", "has,OUT,Many2Many,true,false,false,false")
332             .putAll("service-instance|allotted-resource", "uses,OUT,Many2Many,false,false,false,false")
333                         .build();
334
335         public static final Multimap<String, String> DefaultDeleteScope = new ImmutableSetMultimap.Builder<String, String>()
336                         .putAll("customer", "CASCADE_TO_CHILDREN")
337                         .putAll("cloud-region", "THIS_NODE_ONLY")
338                         .putAll("service-subscription", "CASCADE_TO_CHILDREN")
339                         .putAll("service-instance", "CASCADE_TO_CHILDREN")
340                         .putAll("vce", "CASCADE_TO_CHILDREN")
341                         .putAll("port-group", "CASCADE_TO_CHILDREN")
342                         .putAll("cvlan-tag", "THIS_NODE_ONLY")
343                         .putAll("tenant", "THIS_NODE_ONLY")
344                         .putAll("vserver", "CASCADE_TO_CHILDREN")
345                         .putAll("volume", "THIS_NODE_ONLY")
346                         .putAll("ipaddress", "THIS_NODE_ONLY")
347                         .putAll("image", "ERROR_4_IN_EDGES_OR_CASCADE")
348                         .putAll("pserver", "ERROR_4_IN_EDGES_OR_CASCADE")
349                         .putAll("availability-zone", "ERROR_IF_ANY_IN_EDGES")
350                         .putAll("oam-network", "ERROR_IF_ANY_IN_EDGES")
351                         .putAll("dvs-switch", "THIS_NODE_ONLY")
352                         .putAll("service-capability", "ERROR_IF_ANY_IN_EDGES")
353                         .putAll("complex", "ERROR_4_IN_EDGES_OR_CASCADE")
354                         .putAll("flavor", "ERROR_IF_ANY_IN_EDGES")
355                         .putAll("metadata", "THIS_NODE_ONLY")
356                         .putAll("metadatum", "THIS_NODE_ONLY")
357                         .putAll("model", "ERROR_4_IN_EDGES_OR_CASCADE")
358                         .putAll("model-ver", "ERROR_4_IN_EDGES_OR_CASCADE")
359                         .putAll("model-element", "CASCADE_TO_CHILDREN")
360                         .putAll("model-constraint", "CASCADE_TO_CHILDREN")
361                         .putAll("property-constraint", "CASCADE_TO_CHILDREN")
362                         .putAll("related-lookup", "CASCADE_TO_CHILDREN")
363                         .putAll("constrained-element-set", "CASCADE_TO_CHILDREN")
364                         .putAll("element-choice-set", "CASCADE_TO_CHILDREN")
365                         .putAll("named-query", "CASCADE_TO_CHILDREN")
366                         .putAll("named-query-element", "CASCADE_TO_CHILDREN")
367                         .putAll("network-policy", "THIS_NODE_ONLY")
368                         .putAll("collect-lookup", "THIS_NODE_ONLY")
369                         .putAll("service", "ERROR_IF_ANY_IN_EDGES")
370                         .putAll("newvce", "CASCADE_TO_CHILDREN")
371                         .putAll("vpe", "CASCADE_TO_CHILDREN")
372                         .putAll("vpls-pe", "CASCADE_TO_CHILDREN")
373                         .putAll("l-interface", "CASCADE_TO_CHILDREN")
374                         .putAll("vlan", "CASCADE_TO_CHILDREN")
375                         .putAll("p-interface", "CASCADE_TO_CHILDREN")
376                         .putAll("l3-interface-ipv6-address-list", "THIS_NODE_ONLY")
377                         .putAll("l3-interface-ipv4-address-list", "THIS_NODE_ONLY")
378                         .putAll("logical-link", "THIS_NODE_ONLY")
379                         .putAll("physical-link", "THIS_NODE_ONLY")
380                         .putAll("lag-link", "THIS_NODE_ONLY")
381                         .putAll("lag-interface", "CASCADE_TO_CHILDREN")
382                         .putAll("virtual-data-center", "CASCADE_TO_CHILDREN")
383                         .putAll("generic-vnf", "CASCADE_TO_CHILDREN")
384                         .putAll("l3-network", "CASCADE_TO_CHILDREN")
385                         .putAll("ctag-pool", "THIS_NODE_ONLY")
386                         .putAll("subnet", "THIS_NODE_ONLY")
387                         .putAll("sriov-vf", "THIS_NODE_ONLY")
388                         .putAll("vpn-binding", "ERROR_IF_ANY_IN_EDGES")
389                         .putAll("vnf-image", "ERROR_IF_ANY_IN_EDGES")
390                         .putAll("site-pair-set", "CASCADE_TO_CHILDREN")
391                         .putAll("routing-instance", "CASCADE_TO_CHILDREN")
392                         .putAll("site-pair", "CASCADE_TO_CHILDREN")
393                         .putAll("class-of-service", "THIS_NODE_ONLY")
394                         .putAll("connector", "CASCADE_TO_CHILDREN")
395                         .putAll("vnfc", "THIS_NODE_ONLY")
396                         .putAll("multicast-configuration", "THIS_NODE_ONLY")
397                         .putAll("volume-group", "THIS_NODE_ONLY")
398                         .putAll("ctag-assignment", "THIS_NODE_ONLY")
399                         .putAll("pnf", "CASCADE_TO_CHILDREN")
400                         .putAll("ipsec-configuration", "CASCADE_TO_CHILDREN")
401                         .putAll("vig-server", "THIS_NODE_ONLY")
402                         .putAll("vf-module", "THIS_NODE_ONLY")
403                         .putAll("snapshot", "THIS_NODE_ONLY")
404                         .putAll("group-assignment", "THIS_NODE_ONLY")
405                         .putAll("segmentation-assignment", "THIS_NODE_ONLY")
406                         .putAll("route-table-reference", "THIS_NODE_ONLY")
407                         .putAll("network-profile", "THIS_NODE_ONLY")
408                         .putAll("allotted-resource", "CASCADE_TO_CHILDREN")
409                         .putAll("tunnel-xconnect", "THIS_NODE_ONLY")
410                         .putAll("instance-group","THIS_NODE_ONLY")
411                         .putAll("entitlement","THIS_NODE_ONLY")
412                         .putAll("license","THIS_NODE_ONLY")
413                         .putAll("zone", "THIS_NODE_ONLY").build();
414
415         // NOTE -- Sorry, this is ugly, but we are mapping the nodeTypeCategory two
416         // ways just to
417         // make the code a little less bulky. But that means that we need to ensure
418         // that
419         // nodeTypeCategory and nodeTypeCatMap are kept in synch.
420
421         // NodeTypeCategory: key is: nodeTypeCategory, value is:
422         // "nodeTypes,keyProperties,AltKeyProps,depNode4UniquenessFlag"
423         public static final Multimap<String, String> NodeTypeCategory = new ImmutableSetMultimap.Builder<String, String>()
424                         .putAll("vnf", "vce|vpe|generic-vnf,vnf-id,,true").build();
425
426         // NodeTypeCatMap: key is nodeType; value is: "nodeTypeCategory"
427         // So -- we're assuming that a nodeType can only be in one nodeTypeCategory.
428         public static final Map<String, String> NodeTypeCatMap;
429         static {
430                 NodeTypeCatMap = new HashMap<String, String>();
431                 NodeTypeCatMap.put("vpe", "vnf");
432                 NodeTypeCatMap.put("vce", "vnf");
433                 NodeTypeCatMap.put("generic-vnf", "vnf");
434         }
435
436         // ReservedPropNames: keys are property names of (node) properties that are
437         // common to all nodes and
438         // should not be removed if not passed in on an UPDATE request.
439         public static final Map<String, String> ReservedPropNames;
440         static {
441                 ReservedPropNames = new HashMap<String, String>();
442                 ReservedPropNames.put("source-of-truth", "");
443                 ReservedPropNames.put("last-mod-source-of-truth", "");
444                 ReservedPropNames.put("aai-created-ts", "");
445                 ReservedPropNames.put("aai-last-mod-ts", "");
446         }
447         
448         // This just lists which node types can be connected to themselves recursively.
449         // It's temporary - since DbEdgeRules is going to be overhauled in 16-10, this will
450         // get generated automatically.   But for 1607, it can work like this.
451         public static final Map<String, String> CanBeRecursiveNT;
452         static {
453                 CanBeRecursiveNT = new HashMap<String, String>();
454                 CanBeRecursiveNT.put("model-element", "");
455                 CanBeRecursiveNT.put("service-instance", "");
456                 CanBeRecursiveNT.put("named-query-element", "");
457         }
458
459 }