Skip to content
Snippets Groups Projects

restore capability and workflow

Merged Charlotte Hausman requested to merge Restore_Capability into main
All threads resolved!
@@ -62,7 +62,7 @@ class WrestWorkflowMetadata:
make_json = {}
try:
cursor = self.conn.cursor()
cursor.execute(sql, {"spl": self.spl[0]})
cursor.execute(sql, {"spl": self.spl})
data = cursor.fetchall()
if data:
make_json = json.dumps(
@@ -81,7 +81,7 @@ class WrestWorkflowMetadata:
else:
self.logger.error(
f"ERROR: aat-wrest query returned no results!"
f" The database appears to be missing information for SPL {self.spl[0]}!"
f" The database appears to be missing information for SPL {self.spl}!"
)
finally:
self.conn.close()
@@ -140,6 +140,7 @@ class WrestWorkflowMetadata:
the required metadata to run the restore CMS workflow
:return:
"""
print(self.spl)
eb_sql = f"""
SELECT ngas_fileset_id as filesetId,
@@ -245,8 +246,8 @@ def parser() -> argparse.ArgumentParser:
arg_parser.add_argument(
"-r",
"--restore",
nargs=2,
action="store",
nargs="+",
default=[],
required=False,
help="Find workflow metadata for Restores with provided EB product locator and Cal product locator",
)
@@ -267,7 +268,8 @@ def determine_wrester(connection: MDDBConnector, args: argparse.Namespace):
if args.stdimg:
data = WrestWorkflowMetadata(connection, sdm_id=args.stdimg[0]).wrest_standard_image_info()
if args.restore:
data = WrestWorkflowMetadata(connection, spl=args.restore[0]).wrest_restore_info()
print(args)
data = WrestWorkflowMetadata(connection, spl=args.restore).wrest_restore_info()
if args.observation:
data = ObservationWrester(connection, spl=args.observation[0]).wrest_observation_info()
Loading