Skip to content
GitLab
Explore
Sign in
Register
Primary navigation
Search or go to…
Project
workspaces
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Package registry
Model registry
Operate
Environments
Terraform modules
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Terms and privacy
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
ssa
workspaces
Commits
9b387513
Commit
9b387513
authored
11 months ago
by
Sam Kagan
Browse files
Options
Downloads
Patches
Plain Diff
Drafted change to stick piperestorescript in the right place
parent
1c26be09
No related branches found
No related tags found
2 merge requests
!1706
merge 2.8.4 to main
,
!1657
Got EVLA CMS restores working via casa_envoy, using casa_restorepipescript.py when it exists
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
apps/cli/executables/pexable/casa_envoy/casa_envoy/foundation.py
+14
-1
14 additions, 1 deletion
...i/executables/pexable/casa_envoy/casa_envoy/foundation.py
with
14 additions
and
1 deletion
apps/cli/executables/pexable/casa_envoy/casa_envoy/foundation.py
+
14
−
1
View file @
9b387513
...
...
@@ -23,11 +23,12 @@ import json
import
logging
import
os
import
shutil
import
sys
import
tarfile
from
distutils.dir_util
import
copy_tree
from
pathlib
import
Path
from
posixpath
import
isfile
from
typing
import
Optional
from
casa_envoy.interfaces
import
FoundationIF
from
casa_envoy.schema
import
AbstractTextFile
...
...
@@ -89,6 +90,7 @@ class RestoreFoundation(FoundationIF):
self
.
parameters
=
parameters
self
.
parent_path
=
parameters
[
"
parent_path
"
]
self
.
content
=
json
.
loads
(
metadata
.
content
)
self
.
_path_to_piperestorescript
:
Optional
[
Path
]
=
None
def
data_foundation
(
self
):
"""
...
...
@@ -107,8 +109,19 @@ class RestoreFoundation(FoundationIF):
path
=
Path
(
"
./products
"
)
self
.
logger
.
info
(
"
Ensuring correct file permissions....
"
)
set_permissions
(
path
)
CASAPIPERESTORESCRIPT
=
"
casa_piperestorescript.py
"
self
.
logger
.
info
(
f
"
Checking for
{
CASAPIPERESTORESCRIPT
}
)...
"
)
if
(
path
/
CASAPIPERESTORESCRIPT
).
is_file
():
dest
=
Path
(
f
"
working/
{
CASAPIPERESTORESCRIPT
}
"
)
shutil
.
copyfile
(
path
/
CASAPIPERESTORESCRIPT
,
dest
)
self
.
_path_to_piperestorescript
=
dest
self
.
logger
.
info
(
f
"
Found
{
CASAPIPERESTORESCRIPT
}
, copied it to
{
dest
}
"
)
self
.
logger
.
info
(
"
Restore data foundation complete!
"
)
@property
def
path_to_piperestorescript
(
self
)
->
Optional
[
Path
]:
return
self
.
_path_to_piperestorescript
def
extract_cal
(
self
):
self
.
logger
.
info
(
"
Extracting calibration tar file to products directory...
"
)
cal_name
=
self
.
content
[
"
fileSetIds
"
][
1
]
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment