Graphdb connection


In [2]:
from libs.graph import graph


Connected

A simple test for neomodel library


In [3]:
graph.Zone.get_or_create({'name':'test'})


Out[3]:
[<libs.graph.ogmmodels.Zone at 0x7fe59db837b8>]

Finding data objects in the graph which have a replica connection


In [4]:
dobj_with_replicas = graph.DataObject.nodes.has(replica=True)

In [9]:
for replicas in dobj_with_replicas:
    print("Data Object:", replicas.filename, "with location:\n", replicas.location, "\n")
    #print(replicas.replica.relationship())


Data Object: abc_amWL7PWCAgFBDE4owlRCqCxAZtvfNj9m.txt.replica with location:
 irods://130.186.13.14:1247/cinecaDMPZone/home/pdonorio/irods2graph/abc_amWL7PWCAgFBDE4owlRCqCxAZtvfNj9m.txt.replica 

Data Object: abc_BewVCBrdUl2ziqwqmKyIKvxR0N9jAv1B.txt.replica with location:
 irods://130.186.13.14:1247/cinecaDMPZone/home/pdonorio/irods2graph/abc_BewVCBrdUl2ziqwqmKyIKvxR0N9jAv1B.txt.replica 

Data Object: abc_hMLTBbatVxFg3ozn2HTSwFYuY13UuIJU.txt.replica with location:
 irods://130.186.13.14:1247/cinecaDMPZone/home/pdonorio/irods2graph/abc_hMLTBbatVxFg3ozn2HTSwFYuY13UuIJU.txt.replica 


Danger ;)


In [4]:
#graph.clean_whole_database()


Cleaning the whole graph
Out[4]: