Our primary archive object
Adds the specified archiveObject to the archive queue. We retrieve FCS data via fcsxml.FCSVRClient calls. For XML based workflows, utilize addFileFromXMLPath
Method which returns a dictionary, keyed by the selection set name, which match the provided status, if a set contains multiple objects with different status, we will return a set only with objects matching the provided status
Returns the barcode corresponding to the tape the file for the provided archiveObject
Returns a list of barcode numbers in use by active jobs (submitted and running)
Changes the status for all archive objects loaded in the provided, can be provided a string name for the set, or the archiveSet object itself
Commits an archive object to our archiveHistory SQL table
Commits each archiveObject in the provided archiveSet both to the SQL DB as well as FCS
Returns an archiveObject loaded from provided filepath. We utilize fcsvr_client to fetch FCS data
Reads file from path queueFile, which should be a line delimited list of file paths. We check the filePath against loaded values in our SQL archiveQueue table, merging where appropriate. We also check against our archiveHistory table to ensure that the asset hasn’t already been archived.
This function creates an associative dictionary from an SQL results row, necessary for Python versions previous to 2.6 that do not support sqlite3.Row.keys(). Accepts optional parameter table, which is used to specify the table that we are creating the result set for.
Returns an archiveObject loaded from provided filepath. We utilize fcsvr_client to fetch FCS data
Reads file from path queueFile, which should be a line delimited list of file paths. We check the filePath against loaded values in our SQL restoreQueue table, merging where appropriate.
Function which reads our sqlite database and generates archiveSet objects for queued files
Load from configuration file, expects a ConfigParser type object. If you subclass, you should call this function.
Function which reads our sqlite database and generates archiveSet objects for queued files
Returns the volume barcode for provided PresStore tape label
Returns nsdchat command, this may be wrapped with sudo or ssh, so you should not quote the nsdchat path argument when submitting
Returns the status for volume with provided label, returns True if the asset is on a tape in the library, false if it is not
Uses nsdchat to query the status of job with provided running jobID
Creates a new selection set and submits the job, returns jobID
Creates a new selection set and submits the job, returns jobID
Returns an array of volume barcodes for the specified path as indexed in the provided archive database
Returns the volume label for file archived at path filePath. If PresStore returns multiple volume labels, only the first volume is returned.
Returns an array of volume labels for the specified path as indexed in the provided archive database
This function predicts the volume barcode for a label which does not have one associated with it.
Method which checks on the status of submitted archive jobs. Jobs with a status of ‘archiveSubmitted’ or ‘archiveRunning’ are checked with nsdchat, jobs with a status of ‘archiveFailed’,’archiveDied’, or ‘archiveCancelled’ are resubmitted.
Method which checks on the status of submitted archive jobs. Jobs with a status of ‘archiveSubmitted’ or ‘archiveRunning’ are checked with nsdchat, jobs with a status of ‘archiveFailed’,’archiveDied’, or ‘archiveCancelled’ are resubmitted.
Removes an archive object from the archiveQueue SQL table
Removes an archive object from the archiveQueue SQL table
Method which returns a dictionary, keyed by the selection set name, which match the provided status
Sends an email with the provided subject and body to the provided recipients. If no recipient is provided, we will load from our config. All server settings are loaded from config.
Changes the jobID for all archive objects in the SQL queue, can be provided a string name for the set, or the archiveSet object itself
Changes the status for all archive objects loaded in this restore set
Verifies whether an archiveObject’s asset is online, either in an archived state or in it’s original location.
Returns true or false based on whether the tape for the provided restoreObject is online. If no tapeSet is specified, we will return true whether an offsite or onsite disk is available, and we will update the tapeSet on the restoreObject accordingly