Compares files on site to files in the dynamo inventory.
This tool requires dynamo
and xrdfs
to be installed separately.
Then a configuration file should be created.
.. autoanysrc:: phony :src: ../ConsistencyCheck/test/config.yml :analyzer: shell-script
Configuration parameters can also be quickly overwritten for a given run by setting an environment variable of the same name.
A consistency check on a site can be done simply by doing the following:
from ConsistencyCheck import config, datatypes, getsitecontents, getinventorycontents config.CONFIG_FILE = '/path/to/config.json' site = 'T2_US_MIT' # For example inventory_listing = getinventorycontents.get_inventory_tree(site) remote_listing = getsitecontents.get_site_tree(site) datatypes.compare(inventory_listing, remote_listing, 'results')
In this example,
the list of file LFNs in the inventory and not at the site will be in results_missing.txt
.
The list of file LFNs at the site and not in the inventory will be in results_orphan.txt
.
.. automodule:: ConsistencyCheck.config :members:
.. automodule:: ConsistencyCheck.datatypes :members:
.. automodule:: ConsistencyCheck.getsitecontents :members:
.. automodule:: ConsistencyCheck.getinventorycontents :members: