Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
M
mrdata common public
Manage
Activity
Members
Labels
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
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
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
hpc-kyb
mrdata common public
Commits
d9c4556f
Commit
d9c4556f
authored
11 months ago
by
Blake Fitch
Browse files
Options
Downloads
Patches
Plain Diff
add ability to provide path to ssh ca cert
parent
f8b3dbf9
No related branches found
Branches containing commit
No related tags found
Tags containing commit
No related merge requests found
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
pymods/irods_utils/irods_utils.py
+16
-5
16 additions, 5 deletions
pymods/irods_utils/irods_utils.py
with
16 additions
and
5 deletions
pymods/irods_utils/irods_utils.py
+
16
−
5
View file @
d9c4556f
...
...
@@ -22,6 +22,7 @@ import irods.test.helpers as helpers
import
irods.exception
as
irods_ex
def
get_irods_session_from_cred_yaml
(
cred_file_name
,
cafile
=
'
/irods_ssl_ca_certificate_file
'
,
time_out_secs
=
None
):
logger
=
logging
.
getLogger
(
__name__
)
...
...
@@ -46,10 +47,14 @@ def get_irods_session_from_cred_yaml( cred_file_name,
user
=
cred_file_list
[
"
user
"
]
password
=
cred_file_list
[
"
password
"
]
return
get_irods_session
(
host
,
port
,
zone
,
user
,
password
,
time_out_secs
=
time_out_secs
)
return
get_irods_session
(
host
,
port
,
zone
,
user
,
password
,
cafile
=
cafile
,
time_out_secs
=
time_out_secs
)
def
get_irods_session
(
host
,
port
,
zone
,
user
,
password
,
do_not_block
=
False
,
time_out_secs
=
None
):
def
get_irods_session
(
host
,
port
,
zone
,
user
,
password
,
cafile
=
'
/irods_ssl_ca_certificate_file
'
,
do_not_block
=
False
,
time_out_secs
=
None
):
logger
=
logging
.
getLogger
(
__name__
)
backoff
=
0
...
...
@@ -59,7 +64,7 @@ def get_irods_session( host, port, zone, user, password, do_not_block=False, tim
irods_sesh
=
None
try
:
ssl_context
=
ssl
.
create_default_context
(
purpose
=
ssl
.
Purpose
.
SERVER_AUTH
,
cafile
=
'
/irods_ssl_ca_certificate_
file
'
,
cafile
=
ca
file
,
capath
=
None
,
cadata
=
None
)
...
...
@@ -512,7 +517,7 @@ def confirmed_put( irods_sesh, file_pathname, new_obj_ipath, metadata_dict=None,
# Bring in the experiment validation code
sys
.
path
.
append
(
'
/home/mradmin/mrdata-common-public/pymods
/mrdata_irods_config
'
)
sys
.
path
.
append
(
'
..
/mrdata_irods_config
'
)
import
mrdata_irods_config
as
miconf
...
...
@@ -560,7 +565,13 @@ def SetupExperimentInIRODS( irods_sesh, irods_zone, irods_user, exp_dict, logger
return
True
,
"
Succeed
"
sys
.
path
.
append
(
'
/home/mradmin/mrdata-common-public/pymods/experiment_id
'
)
print
(
"
os.path[0]:
"
+
sys
.
path
[
0
]
)
import
pathlib
pypath
=
pathlib
.
Path
(
__file__
).
resolve
().
parent
print
(
f
"
pypath
{
pypath
}
"
)
modpath
=
os
.
path
.
join
(
pypath
,
"
../experiment_id
"
)
print
(
f
"
modpath:
{
modpath
}
"
)
sys
.
path
.
append
(
modpath
)
import
experiment_id
as
exp_id_fx
...
...
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