Note:
Childern and backref will be accessed by in()
Parent and ref will be accessed by out()
Virtual Network Resource
fq_name - Property
Project - Parent
Routing Instance - Children
network_ipam - reference
virtual_machine_interface - back reference
logical_router - back reference
instance_ip - back reference
To display children and backreferences:
.V().hasLabel("virtual_network").inE()
.V().hasLabel("virtual_network").in()
To display parent and eferences:
g.V().hasLabel("virtual_network").outE()
g.V().hasLabel("virtual_network").out()
List the Virutal Networks which has routing instances:
g.V().hasLabel('virtual_network').where(__.in().hasLabel('routing_instance'))
List the Virtual Networks which doesnt have rotuing instance:
g.V().hasLabel('virtual_network').not(__.in().hasLabel('routing_instance'))
List the Virtual Networks which has VMI and Instance IP:
g.V().hasLabel("virtual_network").where(__.in().hasLabel('virtual_machine_interface')).where(__.in().hasLabel('instance_ip'))
List the Virtual Networks which has VMI and not Instance IP:
g.V().hasLabel("virtual_network").where(__.in().hasLabel('virtual_machine_interface')).not(__.in().hasLabel('instance_ip'))
List the Virtual Networks which has Instance IP and no VMI:
g.V().hasLabel("virtual_network").not(__.in().hasLabel('virtual_machine_interface')).where(__.in().hasLabel('instance_ip'))