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

Gather facts for IBM i #69163

Open
wants to merge 3 commits into
base: devel
Choose a base branch
from
Open

Conversation

coolnothing
Copy link

@coolnothing coolnothing commented Apr 25, 2020

SUMMARY

1, Add python path for OS400 platform
2, Add a new collector to collect system info about OS400 platform

Fixes #64031

ISSUE TYPE
  • Bugfix Pull Request
COMPONENT NAME

gather_facts or setup

1, Add python path for OS400 platform
2, Add a new collector to collect system info about OS400 platform
@ansibot ansibot added affects_2.10 bug core_review needs_triage new_contributor support:core labels Apr 25, 2020
@ansibot

This comment has been minimized.

@ansibot ansibot added needs_revision and removed core_review labels Apr 25, 2020
@Akasurde Akasurde changed the title Update to fix #64031 Gather facts for IBM i May 5, 2020
@jimi-c jimi-c removed the needs_triage label May 5, 2020
@ansibot ansibot added stale_ci core_review and removed stale_ci needs_revision labels May 13, 2020
@ansibot ansibot added the stale_ci label May 22, 2020
@coolnothing
Copy link
Author

@coolnothing coolnothing commented Jun 9, 2020

Could you help to merge this PR?
Since we can not put this in collections, If this PR is not merged, our customer can not use the collections either.

Copy link

@kadler kadler left a comment

AFAICT, we should not be using itoolkit at all here. As I intend to remove the SQL interfaces in a future version of itoolkit, I would recommend against adding more dependencies to them, especially when it's completely pointless as we already have an SQL interface with ibm_db.

if HAS_ITOOLKIT:
virtual_facts = {}
connection = dbi.connect()
sql = "SELECT SYSTEM_VALUE_NAME,CURRENT_NUMERIC_VALUE,CURRENT_CHARACTER_VALUE FROM QSYS2.SYSTEM_VALUE_INFO"
Copy link

@kadler kadler Jul 7, 2020

Choose a reason for hiding this comment

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

Why are we calling SQL through itoolkit over a database connection instead of just passing the SQL through the database connection itself?

try:
import ibm_db_dbi as dbi
except ImportError:
HAS_IBM_DB = False
Copy link

@kadler kadler Jul 7, 2020

Choose a reason for hiding this comment

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

This is never checked anywhere

@ansibot ansibot added needs_revision and removed core_review labels Jul 7, 2020
@ansibot ansibot added pre_azp and removed stale_ci labels Dec 6, 2020
@ansibot ansibot added the needs_rebase label Aug 10, 2021
@ThePrez
Copy link

@ThePrez ThePrez commented Apr 4, 2022

@coolnothing , are you able to clean up the code per @kadler's comments? I find the lack of python interpreter issue ( #77458 is very pervasive for IBM i users)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
affects_2.10 bug has_issue needs_rebase needs_revision new_contributor pre_azp support:core
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants