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
base: devel
Are you sure you want to change the base?
Gather facts for IBM i #69163
Conversation
1, Add python path for OS400 platform 2, Add a new collector to collect system info about OS400 platform
This comment has been minimized.
This comment has been minimized.
Could you help to merge this PR? |
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" |
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 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 |
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 never checked anywhere
@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) |
SUMMARY
1, Add python path for OS400 platform
2, Add a new collector to collect system info about OS400 platform
Fixes #64031
ISSUE TYPE
COMPONENT NAME
gather_facts or setup