2 * ============LICENSE_START=======================================================
4 * ================================================================================
5 * Copyright © 2017-2018 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=========================================================
20 package org.onap.aai.migration.v14;
22 import static org.junit.Assert.*;
23 import static org.mockito.Mockito.spy;
24 import static org.mockito.Mockito.when;
26 import java.util.List;
28 import org.apache.tinkerpop.gremlin.process.traversal.dsl.graph.GraphTraversalSource;
29 import org.apache.tinkerpop.gremlin.process.traversal.strategy.verification.ReadOnlyStrategy;
30 import org.apache.tinkerpop.gremlin.structure.Vertex;
32 import org.onap.aai.AAISetup;
33 import org.onap.aai.dbmap.DBConnectionType;
34 import org.onap.aai.introspection.Loader;
35 import org.onap.aai.introspection.ModelType;
36 import org.onap.aai.serialization.engines.QueryStyle;
37 import org.onap.aai.serialization.engines.JanusGraphDBEngine;
38 import org.onap.aai.serialization.engines.TransactionalGraphEngine;
39 import org.janusgraph.core.JanusGraphFactory;
40 import org.janusgraph.core.JanusGraph;
41 import org.janusgraph.core.JanusGraphTransaction;
43 public class PserverDedupWithDifferentSourcesOfTruthTest extends AAISetup{
45 private final static ModelType introspectorFactoryType = ModelType.MOXY;
46 private final static QueryStyle queryStyle = QueryStyle.TRAVERSAL;
49 TransactionalGraphEngine dbEngine;
51 PserverDedupWithDifferentSourcesOfTruth migration;
52 JanusGraphTransaction tx;
53 GraphTraversalSource g;
62 Vertex pserverRCTScn2;
64 Vertex lInterfaceRoScn2;
66 Vertex lInterfaceRctScn2;
68 Vertex complexRctScn2;
72 Vertex samePintScn4RO;
73 Vertex samePintScn4RCT;
74 Vertex pserverRCTPlinkScn4;
77 Vertex pserverRCTScn3;
81 //ManyToOne edge scenario
82 Vertex pserverRCTScn6;
88 public void setUp() throws Exception {
89 graph = JanusGraphFactory.build().set("storage.backend","inmemory").open();
90 tx = graph.newTransaction();
92 loader = loaderFactory.createLoaderForVersion(introspectorFactoryType,schemaVersions.getDefaultVersion());
93 dbEngine = new JanusGraphDBEngine(
96 //Scn1 empty RCT move everything over
97 pserverRCT = g.addV().property("aai-node-type", "pserver")
98 .property("hostname","pserverRCT")
99 .property("source-of-truth","RCT")
100 .property("fqdn","tttt.bbbb.cccc.dddd")
101 .property("aai-uri","/cloud-infrastructure/pservers/pserver/pserverRCT")
102 .property("resource-version","1")
105 Vertex pserverRO = g.addV().property("aai-node-type", "pserver")
106 .property("hostname","tttt.RoHostname")
107 .property("source-of-truth","RO")
108 .property("aai-uri","/cloud-infrastructure/pservers/pserver/tttt.RoHostname")
109 .property("resource-version","2")
112 .property("aai-node-type", "p-interface")
113 .property("interface-name", "pIntRo")
114 .property("aai-uri","/cloud-infrastructure/pservers/pserver/tttt.RoHostname/p-interfaces/p-interface/pIntRo")
116 lInterfaceRo = g.addV().property("aai-node-type", "l-interface")
117 .property("interface-name", "lInterfaceRo")
118 .property("aai-uri","/cloud-infrastructure/pservers/pserver/tttt.RoHostname/p-interfaces/p-interface/pIntRo/l-interfaces/l-interface/lInterfaceRo")
120 complexRO = g.addV().property("aai-node-type", "complex")
121 .property("physical-location-id","complexRO")
122 .property("aai-uri","/cloud-infrastructure/complexes/complex/complexRO")
125 // physical-link tests
126 //1. p-int does not exist on RCT, p-int and p-link moves from RO to RCT
127 pintPlinkScn1= g.addV()
128 .property("aai-node-type", "p-interface")
129 .property("interface-name", "pintPlinkScn1")
130 .property("aai-uri","/cloud-infrastructure/pservers/pserver/tttt.RoHostname/p-interfaces/p-interface/pintPlinkScn1")
133 Vertex pLinkScn1 = g.addV().property("aai-node-type", "physical-link")
134 .property("link-name", "pLinkScn1")
135 .property("service-provider-bandwidth-up-value", 0)
136 .property("service-provider-bandwidth-up-units", "empty")
137 .property("service-provider-bandwidth-down-value", 0)
138 .property("service-provider-bandwidth-down-units", "empty")
139 .property("aai-uri","/network/physical-links/physical-link/pLinkScn1")
141 edgeSerializer.addTreeEdge(g,pserverRO,pintPlinkScn1);
142 edgeSerializer.addEdge(g,pintPlinkScn1,pLinkScn1);
144 //2. p-int matches on RCT, p-int and p-link don't move from RO to RCT
146 Vertex pserverROSPlinkScn4 = g.addV().property("aai-node-type", "pserver")
147 .property("hostname","Scn4.pserverROSPlinkScn4")
148 .property("source-of-truth","RO")
149 .property("aai-uri","/cloud-infrastructure/pservers/pserver/Scn4.pserverROSPlinkScn4")
150 .property("resource-version","4")
153 pserverRCTPlinkScn4 = g.addV().property("aai-node-type", "pserver")
154 .property("hostname","pserverRCTPlinkScn4")
155 .property("source-of-truth","RCT")
156 .property("fqdn","Scn4.pserverRCTPlinkScn4")
157 .property("aai-uri","/cloud-infrastructure/pservers/pserver/pserverRCTPlinkScn4")
158 .property("resource-version","3")
161 samePintScn4RO= g.addV()
162 .property("aai-node-type", "p-interface")
163 .property("interface-name", "pintPlinkScn4")
164 .property("aai-uri","/cloud-infrastructure/pservers/pserver/Scn4.pserverROSPlinkScn4/p-interfaces/p-interface/pintPlinkScn4")
167 Vertex plinkScn2 = g.addV().property("aai-node-type", "physical-link")
168 .property("link-name", "plinkScn2")
169 .property("service-provider-bandwidth-up-value", 0)
170 .property("service-provider-bandwidth-up-units", "empty")
171 .property("service-provider-bandwidth-down-value", 0)
172 .property("service-provider-bandwidth-down-units", "empty")
173 .property("aai-uri","/network/physical-links/physical-link/pLinkScn2")
176 samePintScn4RCT= g.addV()
177 .property("aai-node-type", "p-interface")
178 .property("interface-name", "pintPlinkScn4")
179 .property("aai-uri","/cloud-infrastructure/pservers/pserver/pserverRCTPlinkScn4/p-interfaces/p-interface/pintPlinkScn4")
182 edgeSerializer.addTreeEdge(g,pserverROSPlinkScn4,samePintScn4RO);
183 edgeSerializer.addEdge(g,samePintScn4RO,plinkScn2);
184 edgeSerializer.addTreeEdge(g,pserverRCTPlinkScn4,samePintScn4RCT);
185 //End physical-links tests
187 //Scn2 RCT has children already
189 pserverRCTScn2 = g.addV().property("aai-node-type", "pserver")
190 .property("hostname","pserverRCTScn2")
191 .property("source-of-truth","RCT")
192 .property("fqdn","Scn2.pserverRCTScn2")
193 .property("aai-uri","/cloud-infrastructure/pservers/pserver/pserverRCTScn2")
194 .property("resource-version","3")
196 pIntRctScn2 = g.addV()
197 .property("aai-node-type", "p-interface")
198 .property("interface-name", "pIntRctScn2")
199 .property("aai-uri","/cloud-infrastructure/pservers/pserver/pserverRCTScn2/p-interfaces/p-interface/pIntRctScn2")
201 lInterfaceRctScn2 = g.addV().property("aai-node-type", "l-interface")
202 .property("interface-name", "lInterfaceRctScn2")
203 .property("aai-uri","/cloud-infrastructure/pservers/pserver/pserverRCTScn2/p-interfaces/p-interface/pIntRctScn2/l-interfaces/l-interface/lInterfaceRctScn2")
205 complexRctScn2 = g.addV().property("aai-node-type", "complex")
206 .property("physical-location-id","complexRctScn2")
207 .property("aai-uri","/cloud-infrastructure/complexes/complex/complexRctScn2")
209 Vertex pserverROScn2 = g.addV().property("aai-node-type", "pserver")
210 .property("hostname","Scn2.pserverROScn2")
211 .property("source-of-truth","RO")
212 .property("aai-uri","/cloud-infrastructure/pservers/pserver/Scn2.pserverROScn2")
213 .property("resource-version","4")
215 pIntRoScn2 = g.addV()
216 .property("aai-node-type", "p-interface")
217 .property("interface-name", "pIntRoScn2")
218 .property("aai-uri","/cloud-infrastructure/pservers/pserver/Scn2.pserverROScn2/p-interfaces/p-interface/pIntRoScn2")
220 lInterfaceRoScn2 = g.addV().property("aai-node-type", "l-interface")
221 .property("interface-name", "lInterfaceRoScn2")
222 .property("aai-uri","/cloud-infrastructure/pservers/pserver/Scn2.pserverROScn2/p-interfaces/p-interface/pIntRoScn2/l-interfaces/l-interface/lInterfaceRoScn2")
224 complexROScn2 = g.addV().property("aai-node-type", "complex")
225 .property("physical-location-id","complexROScn2")
226 .property("aai-uri","/cloud-infrastructure/complexes/complex/complexROScn2")
231 edgeSerializer.addTreeEdge(g,pserverRO,pIntRo);
232 edgeSerializer.addTreeEdge(g,pIntRo,lInterfaceRo);
233 edgeSerializer.addEdge(g,pserverRO,complexRO);
238 edgeSerializer.addTreeEdge(g,pserverRCTScn2,pIntRctScn2);
239 edgeSerializer.addTreeEdge(g,pIntRctScn2,lInterfaceRctScn2);
240 edgeSerializer.addEdge(g,pserverRCTScn2,complexRctScn2);
241 edgeSerializer.addTreeEdge(g,pserverROScn2,pIntRoScn2);
242 edgeSerializer.addTreeEdge(g,pIntRoScn2,lInterfaceRoScn2);
243 edgeSerializer.addEdge(g,pserverROScn2,complexROScn2);
246 pserverRCTScn3 = g.addV().property("aai-node-type", "pserver")
247 .property("hostname","pserverRCTScn3")
248 .property("source-of-truth","RCT")
249 .property("fqdn","Scn3.pserverRCTScn3")
250 .property("aai-uri","/cloud-infrastructure/pservers/pserver/pserverRCTScn3")
251 .property("resource-version","3")
254 complexScn3 = g.addV().property("aai-node-type", "complex")
255 .property("physical-location-id","complexScn3")
256 .property("aai-uri","/cloud-infrastructure/complexes/complex/complexScn3")
259 pserverROScn3 = g.addV().property("aai-node-type", "pserver")
260 .property("hostname","Scn3.pserverROScn3")
261 .property("source-of-truth","RO")
262 .property("fqdn","Scn2.pserverRCTScn2")
263 .property("aai-uri","/cloud-infrastructure/pservers/pserver/Scn3.pserverROScn3")
264 .property("resource-version","4")
267 edgeSerializer.addEdge(g, pserverRCTScn3, complexScn3);
268 edgeSerializer.addEdge(g, pserverROScn3, complexScn3);
270 //Verify manytoOne edge scenario
271 pserverRCTScn6 = g.addV().property("aai-node-type", "pserver")
272 .property("hostname","pserverRCTScn6")
273 .property("source-of-truth","RCT")
274 .property("fqdn","Scn6.pserverRCTScn6")
275 .property("aai-uri","/cloud-infrastructure/pservers/pserver/pserverRCTScn6")
276 .property("resource-version","1")
279 zoneScn61 = g.addV().property("aai-node-type", "zone")
280 .property("zone-id", "zone-61")
281 .property("aai-uri","/network/zones/zone/zone-61")
284 pserverROScn6 = g.addV().property("aai-node-type", "pserver")
285 .property("hostname","Scn6.pserverROScn6")
286 .property("source-of-truth","RO")
287 .property("fqdn","Scn6.pserverRCTScn6")
288 .property("aai-uri","/cloud-infrastructure/pservers/pserver/Scn6.pserverROScn6")
289 .property("resource-version","4")
292 zoneScn62 = g.addV().property("aai-node-type", "zone")
293 .property("zone-id", "zone-62")
294 .property("aai-uri","/network/zones/zone/zone-62")
297 edgeSerializer.addEdge(g, pserverRCTScn6, zoneScn61);
298 edgeSerializer.addEdge(g, pserverROScn6, zoneScn62);
300 //Verify manyToMany edge scenario
301 Vertex gvnf1 = g.addV().property("aai-node-type", "generic-vnf")
302 .property("vnf-id", "vnf-1")
303 .property("aai-uri","/cloud-infrastructure/pservers/pserver/Scn6.pserverROScn6")
306 Vertex gvnf2 = g.addV().property("aai-node-type", "generic-vnf")
307 .property("vnf-id", "vnf-2")
308 .property("aai-uri","/network/generic-vnfs/generic-vnf/vnf-2")
311 edgeSerializer.addEdge(g, pserverRCTScn6, gvnf1);
312 edgeSerializer.addEdge(g, pserverROScn6, gvnf2);
314 // Verify empty string scenario
315 Vertex pserver1EmptyFirstToken = g.addV().property("aai-node-type", "pserver")
316 .property("hostname",".pserver1EmptyFirstToken")
317 .property("source-of-truth","RO")
318 .property("fqdn","sameScn1.rrrr.tttt.yyyy")
319 .property("aai-uri","/cloud-infrastructure/pservers/pserver/.pserver1EmptyFirstToken")
320 .property("resource-version","1")
323 Vertex pserver1EmptyFirstTokenFqdn = g.addV().property("aai-node-type", "pserver")
324 .property("hostname","pserver1EmptyFirstTokenFqdn")
325 .property("source-of-truth","RCT")
326 .property("fqdn",".rrrr.tttt.yyyy")
327 .property("aai-uri","/cloud-infrastructure/pservers/pserver/pserver1EmptyFirstTokenFqdn")
328 .property("resource-version","1")
333 Vertex roP1 = g.addV().property("aai-node-type", "pserver")
334 .property("hostname","pserver.ro")
335 .property("source-of-truth","RO")
336 .property("fqdn","pserver.rrrr.tttt.yyyy")
337 .property("aai-uri","/cloud-infrastructure/pservers/pserver/pserver.ro")
338 .property("resource-version","1")
341 Vertex rctP1 = g.addV().property("aai-node-type", "pserver")
342 .property("hostname","rctP1")
343 .property("source-of-truth","RCT")
344 .property("fqdn","pserver.rrrr.tttt.yyyy")
345 .property("aai-uri","/cloud-infrastructure/pservers/pserver/rctP1")
346 .property("resource-version","3")
349 //lagint11 does not have a match on rctP1. So, expect this to move to rctP1. Add test
350 Vertex lagint11= g.addV()
351 .property("aai-node-type", "lag-interface")
352 .property("interface-name", "lagint11")
353 .property("aai-uri","/cloud-infrastructure/pservers/pserver/roP1/lag-interfaces/lag-interface/lagint11")
355 edgeSerializer.addTreeEdge(g, roP1, lagint11);
357 //lagint12 matches with lagint31 on rctP3
358 Vertex lagint12= g.addV()
359 .property("aai-node-type", "lag-interface")
360 .property("interface-name", "lagint12")
361 .property("aai-uri","/cloud-infrastructure/pservers/pserver/roP1/lag-interfaces/lag-interface/lagint12")
363 Vertex lagint31= g.addV()
364 .property("aai-node-type", "lag-interface")
365 .property("interface-name", "lagint12")
366 .property("aai-uri","/cloud-infrastructure/pservers/pserver/rctP3/lag-interfaces/lag-interface/lagint12")
368 edgeSerializer.addTreeEdge(g, roP1, lagint12);
369 edgeSerializer.addTreeEdge(g, rctP1, lagint31);
371 TransactionalGraphEngine spy = spy(dbEngine);
372 TransactionalGraphEngine.Admin adminSpy = spy(dbEngine.asAdmin());
374 GraphTraversalSource traversal = g;
375 GraphTraversalSource readOnly = graph.traversal().withStrategies(ReadOnlyStrategy.instance());
376 when (spy.tx()).thenReturn(tx);
377 when(spy.asAdmin()).thenReturn(adminSpy);
378 when(adminSpy.getTraversalSource()).thenReturn(traversal);
379 when(adminSpy.getReadOnlyTraversalSource()).thenReturn(readOnly);
381 migration = new PserverDedupWithDifferentSourcesOfTruth(spy,loaderFactory, edgeIngestor, edgeSerializer, schemaVersions);
386 public void cleanUp() {
392 public void rctSuccessfulMoveScn1() throws Exception {
394 assertEquals("tttt.RoHostname",pserverRCT.property("fqdn").value().toString());
395 assertEquals(true, g.V().has("aai-node-type", "pserver").has("hostname","pserverRCT").in("tosca.relationships.network.BindsTo").has("aai-node-type","p-interface").hasNext());
396 assertEquals("/cloud-infrastructure/pservers/pserver/pserverRCT/p-interfaces/p-interface/pIntRo", pIntRo.property("aai-uri").value().toString());
397 assertEquals("/cloud-infrastructure/pservers/pserver/pserverRCT/p-interfaces/p-interface/pIntRo/l-interfaces/l-interface/lInterfaceRo", lInterfaceRo.property("aai-uri").value().toString());
398 assertEquals(true,pserverRCT.property("pserver-id").isPresent());
402 public void rctSuccessfulMovePlink() throws Exception {
404 assertEquals("tttt.RoHostname",pserverRCT.property("fqdn").value().toString());
405 assertEquals(true, g.V().has("aai-node-type", "pserver").has("hostname","pserverRCT").in("tosca.relationships.network.BindsTo")
406 .has("aai-node-type","p-interface").has("interface-name","pintPlinkScn1").hasNext());
407 assertEquals("/cloud-infrastructure/pservers/pserver/pserverRCT/p-interfaces/p-interface/pintPlinkScn1", pintPlinkScn1.property("aai-uri").value().toString());
408 assertEquals(true, g.V().has("aai-node-type", "pserver").has("hostname","pserverRCT").in("tosca.relationships.network.BindsTo")
409 .has("aai-node-type","p-interface").has("interface-name","pintPlinkScn1").out("tosca.relationships.network.LinksTo").has("link-name","pLinkScn1").hasNext());
413 public void rctNoChangeSamePIntScenario() throws Exception {
415 assertEquals("Scn4.pserverROSPlinkScn4",pserverRCTPlinkScn4.property("fqdn").value().toString());
416 assertEquals(true, g.V().has("aai-node-type", "pserver").has("hostname","pserverRCTPlinkScn4").in("tosca.relationships.network.BindsTo")
417 .has("aai-node-type","p-interface").has("interface-name","pintPlinkScn4").hasNext());
418 assertEquals("only 1 p-int is present on RCT pserver", new Long(1L), g.V().has("aai-node-type", "pserver").has("hostname","pserverRCTPlinkScn4").in("tosca.relationships.network.BindsTo")
419 .has("aai-node-type","p-interface").has("interface-name","pintPlinkScn4").count().next());
420 assertEquals("/cloud-infrastructure/pservers/pserver/pserverRCTPlinkScn4/p-interfaces/p-interface/pintPlinkScn4", samePintScn4RCT.property("aai-uri").value().toString());
421 //plink is not moved from RO to RCT when p-int matches
422 assertEquals(false, g.V().has("aai-node-type", "pserver").has("hostname","pserverRCT").in("tosca.relationships.network.BindsTo")
423 .has("aai-node-type","p-interface").has("interface-name","pintPlinkScn4").out("tosca.relationships.network.LinksTo").hasNext());
424 assertEquals(false, g.V().has("aai-node-type", "pserver").has("hostname","pserverROPlinkScn4").hasNext());
425 //Verify that no orphan nodes are present in the graph
426 assertEquals(false, g.V().has("aai-node-type","p-interface").has("interface-name","pintPlinkScn4").out("tosca.relationships.network.LinksTo").has("link-name","pLinkScn2").hasNext());
427 assertEquals(false, g.V().has("aai-node-type","physical-link").has("link-name","pLinkScn2").hasNext());
431 public void rctSuccessfulMoveScn2() throws Exception {
433 assertEquals("Scn2.pserverROScn2",pserverRCTScn2.property("fqdn").value().toString());
434 assertEquals(true, g.V().has("aai-node-type", "pserver").has("hostname","pserverRCTScn2").in("tosca.relationships.network.BindsTo").has("aai-node-type","p-interface").hasNext());
435 assertEquals("/cloud-infrastructure/pservers/pserver/pserverRCTScn2/p-interfaces/p-interface/pIntRoScn2", pIntRoScn2.property("aai-uri").value().toString());
436 assertEquals("/cloud-infrastructure/pservers/pserver/pserverRCTScn2/p-interfaces/p-interface/pIntRoScn2/l-interfaces/l-interface/lInterfaceRoScn2", lInterfaceRoScn2.property("aai-uri").value().toString());
437 assertEquals(true,pserverRCTScn2.property("pserver-id").isPresent());
438 assertEquals(true, g.V().has("aai-node-type", "pserver").has("hostname","pserverRCTScn2").out("org.onap.relationships.inventory.LocatedIn")
439 .has("aai-node-type","complex").has("physical-location-id","complexRctScn2").hasNext());
443 public void checkRCTPserverHasRelnToOnly1Complex() throws Exception {
445 assertEquals("Edge to only 1 complex exists", new Long(1L), g.V().has("aai-node-type", "pserver").has("hostname","pserverRCTScn3").out("org.onap.relationships.inventory.LocatedIn")
446 .has("aai-node-type","complex").count().next());
450 public void checkRCTPserverHasRelnToOnly1Zone() throws Exception {
452 assertEquals("Edge to only 1 Zone exists", new Long(1L), g.V().has("aai-node-type", "pserver").has("hostname","pserverRCTScn6").out("org.onap.relationships.inventory.LocatedIn")
453 .has("aai-node-type","zone").count().next());
454 assertEquals(true, g.V().has("aai-node-type", "zone").has("zone-id","zone-62").hasNext());
455 //Verify no edge exists from zone62 to RO pserver
456 assertEquals(false, g.V().has("aai-node-type", "zone").has("zone-id","zone-62").in().has("aai-node-type", "pserver").hasNext());
461 public void checkRCTPserverHasRelnTo2GenericVnfs() throws Exception {
463 assertEquals("Edge to 2 generic-vnfs exists", new Long(2L), g.V().has("aai-node-type", "pserver").has("hostname","pserverRCTScn6").in("tosca.relationships.HostedOn")
464 .has("aai-node-type","generic-vnf").count().next());
465 assertEquals(true, g.V().has("aai-node-type", "generic-vnf").has("vnf-id","vnf-2").out().has("aai-node-type", "pserver").has("hostname", "pserverRCTScn6").hasNext());
466 //Verify no edge exists from zone62 to RO pserver
467 assertEquals(false, g.V().has("aai-node-type", "generic-vnf").has("vnf-id","vnf-2").out().has("aai-node-type", "pserver").has("hostname", "pserverROScn6").hasNext());
471 public void ignoreEmptyStringFirstTokenFqdn() throws Exception {
472 // List<Vertex> pserverList = g.V().has("aai-node-type", "pserver").has("hostname").toList();
473 // pserverList.forEach(v ->System.out.println(v.property("hostname").value().toString()));
474 assertEquals(true, g.V().has("aai-node-type", "pserver").has("hostname","pserver1EmptyFirstTokenFqdn").hasNext());
475 assertEquals(true, g.V().has("aai-node-type", "pserver").has("hostname",".pserver1EmptyFirstToken").hasNext());
480 public void testLagInterfaces() throws Exception {
481 //1. lagint11 from roP1 moves to rctP1
482 assertEquals(true, g.V().has("aai-node-type", "pserver").has("hostname","rctP1").in("tosca.relationships.network.BindsTo")
483 .has("aai-node-type","lag-interface").has("interface-name","lagint11").hasNext());
484 assertEquals(false, g.V().has("aai-node-type", "lag-interface").has("aai-uri","/cloud-infrastructure/pservers/pserver/pserver.ro/lag-interfaces/lag-interface/lagint11").hasNext());
485 assertEquals(true, g.V().has("aai-node-type", "lag-interface").has("aai-uri","/cloud-infrastructure/pservers/pserver/rctP1/lag-interfaces/lag-interface/lagint11").hasNext());
488 //2. lagint12 int-name matches with lagint31. So, verify that lag-int does not move from rctP1 to rctP3
489 assertEquals("rctP1 has only 1 lag-interface with name lagint12", new Long(1L), g.V().has("aai-node-type", "pserver").has("hostname","rctP1").in("tosca.relationships.network.BindsTo")
490 .has("aai-node-type","lag-interface").has("interface-name","lagint12").count().next());