-
Notifications
You must be signed in to change notification settings - Fork 23
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Added mechanism to set human readable name while import cluster flow #890
Conversation
THIS IS WIP. YET TO VERIFY WITH ALL THE SCENARIOS. |
97977f1
to
b916feb
Compare
Verified the changes with Tendrl/monitoring-integration#394 with below scenarios
Works as expected. API module doesnt need any changes for this and UI need changes to pass @gnehapk ^^^ Sample API payload for importing a cluster with short_name looks as below
|
tendrl-bug-id: Tendrl#888 Signed-off-by: Shubhendu <shtripat@redhat.com>
b916feb
to
0db187f
Compare
_cluster = NS.tendrl.objects.Cluster( | ||
integration_id=entry.key.split('/')[-1] | ||
).load() | ||
if _cluster.short_name and short_name and \ |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
covert to lower case and check? remove the leading space if any as well
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
done
while True: | ||
if loop_count >= wait_count: | ||
logger.log( | ||
"info", |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Why the log level is info? its a failure scenario right?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This is a job update and yes we can set the severity anything other than notice. will change as error
tendrl-bug-id: Tendrl#888 Signed-off-by: Shubhendu <shtripat@redhat.com>
62d6382
to
5d9ad65
Compare
@@ -13,6 +14,28 @@ def __init__(self, *args, **kwargs): | |||
def run(self): | |||
if "Node[]" not in self.parameters: | |||
integration_id = self.parameters['TendrlContext.integration_id'] | |||
short_name = self.parameters.get('Cluster.short_name', None) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
please add check for max 64 characters.
"type": "monitoring" | ||
} | ||
Job( | ||
job_id=_job_id, |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
add parent job id
tendrl-bug-id: #888
Signed-off-by: Shubhendu shtripat@redhat.com