mq-ansible icon indicating copy to clipboard operation
mq-ansible copied to clipboard

Save QMGR state in YAML file - Useful for parsing MQSC

Open JamRamPage opened this issue 6 months ago • 0 comments

Is your feature request related to a problem? Please describe. Currently, queue_manager.py runs statelessly, involves various, occasionally complicated checks to identify the system state of the target machine (existing QMGRs, started/stopped etc). The code is therefore relatively complex.

For example, queue_manager.py's run_mqsc_file method currently only runs the mqsc it is given.

Describe the solution you'd like We should save the qmgr's state in a yaml file stored on the target machine, which the code can refer to. (Uses include, for example, with simple MQSC commands such as "START QMGR", "STOP QMGR", etc, we can check if they are required before having to run run_mqsc_file), which may make the code more readable.

Describe alternatives you've considered Leaving the code as-is may actually (depending on the stage of process) make it more readable. However this is unlikely as support for parsing more MQSC commands is added. We could start by just saving a yaml file that we don't use in our code, helping users check what setup they currently have.

Additional context As more features are added with #109 and other similar issues, we can extend this to work with objects such as queues and channels.

JamRamPage avatar Aug 07 '24 14:08 JamRamPage