Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
athena
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Requirements
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Locked files
Deploy
Releases
Package Registry
Container Registry
Model registry
Operate
Terraform modules
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
Repository analytics
Code review analytics
Issue analytics
Insights
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
This is an archived project. Repository and other project resources are read-only.
Show more breadcrumbs
India Bhalla-Ladd
athena
Commits
9ca36777
Commit
9ca36777
authored
5 years ago
by
Alaettin Serhan Mete
Committed by
Frank Winklmeier
5 years ago
Browse files
Options
Downloads
Patches
Plain Diff
PyJobTransforms: Fix for ATLINFR-3411
parent
a6dcfdf5
No related branches found
No related tags found
No related merge requests found
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
Tools/PyJobTransforms/python/trfAMI.py
+4
-13
4 additions, 13 deletions
Tools/PyJobTransforms/python/trfAMI.py
with
4 additions
and
13 deletions
Tools/PyJobTransforms/python/trfAMI.py
+
4
−
13
View file @
9ca36777
...
@@ -223,19 +223,18 @@ class TagInfo(object):
...
@@ -223,19 +223,18 @@ class TagInfo(object):
## @brief Get an AMI client
## @brief Get an AMI client
# @note Always return a client to the primary replica.
# @note Always return a client to the primary replica.
# The caller is allowed to update the replica via the
# The caller is allowed to update the replica via the
# config.endpoint value.
# config.endpoint
s
value.
# @returns pyAMI.client.Client instance
# @returns pyAMI.client.Client instance
def
getAMIClient
():
def
getAMIClient
(
endpoints
=
[
'
atlas-replica
'
,
'
atlas
'
]
):
msg
.
debug
(
'
Getting AMI client...
'
)
msg
.
debug
(
'
Getting AMI client...
'
)
endpoint
=
'
atlas
'
try
:
try
:
from
pyAMI.client
import
Client
from
pyAMI.client
import
Client
except
ImportError
:
except
ImportError
:
raise
TransformAMIException
(
AMIerrorCode
,
'
Import of pyAMI modules failed.
'
)
raise
TransformAMIException
(
AMIerrorCode
,
'
Import of pyAMI modules failed.
'
)
msg
.
debug
(
"
Attempting to get AMI client for endpoint {0}
"
.
format
(
endpoint
))
msg
.
debug
(
"
Attempting to get AMI client for endpoint
s
{0}
"
.
format
(
endpoint
s
))
amiclient
=
Client
(
endpoint
,
ignore_proxy
=
True
)
amiclient
=
Client
(
endpoint
s
,
ignore_proxy
=
True
)
return
amiclient
return
amiclient
## @brief Get list of characters of ProdSys tags
## @brief Get list of characters of ProdSys tags
...
@@ -444,14 +443,6 @@ def getTrfConfigFromAMI(tag, suppressNonJobOptions = True):
...
@@ -444,14 +443,6 @@ def getTrfConfigFromAMI(tag, suppressNonJobOptions = True):
raise
TransformAMIException
(
AMIerrorCode
,
'
Invalid AMI tag ({0}).
'
.
format
(
tag
))
raise
TransformAMIException
(
AMIerrorCode
,
'
Invalid AMI tag ({0}).
'
.
format
(
tag
))
msg
.
debug
(
"
Error may not be fatal - will try AMI replica catalog
"
)
msg
.
debug
(
"
Error may not be fatal - will try AMI replica catalog
"
)
try
:
amiclient
.
config
.
endpoint
=
'
atlas-replica
'
# result = pyAMI.atlas.api.get_ami_tag(amiclient, tag)
result
=
get_ami_tag
(
amiclient
,
tag
,
suppressNonJobOptions
)
except
pyAMI
.
exception
.
Error
as
e
:
msg
.
error
(
'
An exception occured when connecting to the AMI replica catalog: {0}
'
.
format
(
e
))
raise
TransformAMIException
(
AMIerrorCode
,
'
Getting tag info from AMI failed (tried both primary and replica).
'
'
See logfile for exception details.
'
)
try
:
try
:
trf
=
TrfConfig
()
trf
=
TrfConfig
()
...
...
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