Skip to content
Snippets Groups Projects
Commit 8dfe55d8 authored by Charlotte Hausman's avatar Charlotte Hausman
Browse files

aat_wrest restore info

parent 647ebf89
No related branches found
No related tags found
2 merge requests!344Refactor aat_wrest,!340restore capability and workflow
......@@ -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()
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment