Skip to content
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

Allow ems to terminate connection after use #17959

Merged
merged 1 commit into from
Sep 14, 2018

Conversation

tadeboro
Copy link
Contributor

@tadeboro tadeboro commented Sep 8, 2018

This commit adds a simple disconnect hook that allows ext management
systems (providers) to terminate connection after it is no longer
needed.

Use case for such functionality is provider that needs to delete user
session after the operation since user sessions are long-lived and
number of concurrent live sessions is limited.

@miq-bot assign @agrare

@tadeboro tadeboro closed this Sep 10, 2018
@tadeboro tadeboro reopened this Sep 10, 2018
connection = connect(options)
yield connection
ensure
disconnect(connection) if connection
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@borod108 I want to standardize on an ensure disconnect in core, do you need the rescue around your disconnect method? https://github.com/ManageIQ/manageiq-providers-ovirt/blob/master/app/models/manageiq/providers/redhat/infra_manager/api_integration.rb#L113
Looks like that rescue might be better in the disconnect method itself.

This commit adds a simple disconnect hook that allows ext management
systems (providers) to terminate connection after it is no longer
needed.

Use case for such functionality is provider that needs to delete user
session after the operation since user sessions are long-lived and
number of concurrent live sessions is limited.
@miq-bot
Copy link
Member

miq-bot commented Sep 14, 2018

Checked commit xlab-si@2619b1e with ruby 2.3.3, rubocop 0.52.1, haml-lint 0.20.0, and yamllint 1.10.0
1 file checked, 0 offenses detected
Everything looks fine. 👍

Copy link
Member

@agrare agrare left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

ManageIQ/manageiq-providers-ovirt#286 was merged so merging this

@agrare agrare merged commit 5dd206c into ManageIQ:master Sep 14, 2018
@agrare agrare added this to the Sprint 95 Ending Sep 24, 2018 milestone Sep 14, 2018
@tadeboro tadeboro deleted the provider-disconnect branch September 17, 2018 05:07
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants