Generic Exercises:

List all the resources

gremlin> g.V()
==>v[12b2955f-7c3d-4990-909f-9829e8ee8718]
==>v[74eae87e-cb5d-4512-8796-d6846d655fac]
==>v[30a5b36e-b2fc-4d62-9427-8d6ee0b95325]

The above command lists all the resource ids (project, virtual_network, virtua_l_router, instance__ip ......etc).

List the resource type(label)

gremlin> g.V(UUID.fromString("12b2955f-7c3d-4990-909f-9829e8ee8718")).label()
==>project
gremlin>

Note: UUID is used as ID. we cannot specify UUID directly, it needs to load fromString

List only specifi resource (in this example project)

gremlin> g.V().hasLabel('project')
==>v[12b2955f-7c3d-4990-909f-9829e8ee8718]
==>v[c0b2a770-1e99-4292-a3de-845197af0d6e]
==>v[fed56796-d507-452e-8001-2ee6cd561ad6]
==>v[15d09ad4-cd08-4f81-8d70-d9853229aec0]
==>v[327630a3-71cc-4a89-9e10-8ee5e06af1d8]
gremlin>

List the Values(properties) of the resource:

gremlin> g.V(UUID.fromString("12b2955f-7c3d-4990-909f-9829e8ee8718")).values()
==>0
==>[default-domain,default-project]
==>1530000837
==>2018-06-26T08:13:57.944257
==>7
==>7
==>7
==>cloud-admin
==>1347303475876022672
==>0
==>true
==>cloud-admin-group
==>2018-06-26T08:13:58.163644
==>7
==>true
==>cloud-admin
==>1530000838
==>10421215368527645000
==>-1
gremlin> 


gremlin> g.V(UUID.fromString("12b2955f-7c3d-4990-909f-9829e8ee8718")).values('fq_name')
==>[default-domain,default-project]
gremlin>

Here, field name(header) is missing in the output.

Note: mostly in the properities only fq_name is exists.

results matching ""

    No results matching ""