Add support for byte strings in calls to MQAI
Bug #684251 reported by
Dariusz Suchojad
This bug affects 1 person
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
PyMQI |
Fix Released
|
Medium
|
Dariusz Suchojad |
Bug Description
A follow-up from question #136313 - byte strings should be supported when invoking MQAI from pymqe so that PCF commands such as MQCMD_INQUIRE_
Related branches
lp:~registry/pymqi/byte-strings
(Merged)
To post a comment you must log in.
If you have a look at the code I've pushed up to the branch, you'll notice a couple of changes regarding byte string, the end result is that the code returns the expected output, as seen below. Can you please confirm it's all OK for you as well?
import pymqi
from CMQC import *
from CMQCFC import *
cd = pymqi.cd()
cd.ChannelName = 'SVRCONN.1'
cd.ConnectionName = '127.0.0.1(1418)'
cd.ChannelType = MQCHT_CLNTCONN
cd.TransportType = MQXPT_TCP
qmgr = pymqi.QueueMana ger(None) hOptions( 'QM01', opts=MQCNO_ HANDLE_ SHARE_NO_ BLOCK, cd=cd) PCFExecute( qmgr)
qmgr.connectWit
pcf=pymqi.
conns=pcf. MQCMD_INQUIRE_ CONNECTION( GENERIC_ CONNECTION_ ID: pymqi.ByteStrin g(''), CONNECTION_ ATTRS:MQIACF_ ALL, CONN_INFO_ TYPE:MQIACF_ CONN_INFO_ CONN}
{MQBACF_
MQIACF_
MQIACF_
)
print(conns)
[{1024L: 2393L, 1025L: 1L, 1L: 7L, 1308L: 0L, 3501L: '', 3506L: '', 3025L: 'mqm ', 1108L: 1L, 1110L: 1111L, 7005L: '', 7006L: 'AMQCQM01 A\xb6\xf7L\x01', 7007L: 'AMQCQM01 A\xb6\xf7L\x01', 7009L: '', 3174L: 'WebSphere MQ Object Authority Manager', 1128L: 0L, 1132L: 0L, 3058L: 'amqzfuma ', 3060L: '', 3061L: '', 3062L: '', 3063L: '', 3064L: ''}, {1024L: 2422L, 1025L: 1L, 1L: 7L, 1308L: 0L, 3501L: '', 3506L: '', 3025L: 'mqm ', 1108L: 256L, 1110L: 1111L, 7005L: '', 7006L: 'AMQCQM01 A\xb6\xf7L\ x01\x06' , 7007L: 'AMQCQM01 A\xb6\xf7L\ x01\x06' , 7009L: '', 3174L: 'WebSphere MQ Deferred Message Processor', 1128L: 0L, 1132L: 0L, 3058L: 'amqzdmaa ', 3060L: '', 3061L: '', 3062L: '', 3063L: '', 3064L: ''}, {1024L: 2421L, 1025L: 1L, 1L: 7L, 1308L: 0L, 3501L: '', 3506L: '', 3025L: 'mqm ', 1108L: 256L, 1110L: 1111L, 7005L: '', 7006L: 'AMQCQM01 A\xb6\xf7L\ x01\x07' , 7007L: 'AMQCQM01 A\xb6\xf7L\ x01\x07' , 7009L: '', 3174L: 'WebSphere MQ Cluster Repository', 1128L: 1L, 1132L: 0L, 3058L: 'amqrrmfa ', 3060L: '2010-12-02 ', 3061L: '17.07.46', 3062L: '', 3063L: '', 3064L: ''}, {1024L: 2449L, 1025L: 1L, 1L: 7L, 1308L: 0L, 3501L: '', 3506L: '', 3025L: 'mqm ', 1108L: 256L, 1110L: 1111L, 7005L: '', 7006L: 'AMQCQM01 A\xb6\xf7L\x01\r', 7007L: 'AMQCQM01 A\xb6\xf7L\x01\r', 7009L: '', 3174L: 'WebSphere MQ Command Server', 1128L: 0L, 1132L: 0L, 3058L: 'amqpcsea ', 3060L: '', 3061L: '', 3062L: '', 3063L: '', 3064L: ''}, {1024L: 2448L, 1025L: 1L, 1L: 7L, 1308L: 0L, 3501L: '', 3506L: '', 3025L: 'mqm ', 1108L: 256L, 1110L: 1111L, 7005L: '', 7006L: 'AMQCQM01 A\xb6\xf7L\ x01\x0e' , 7007L: 'AMQCQM01 A\xb6\xf7L\ x01\x0e' , 7009L: '', 3174L: 'WebSphere MQ Channel Initiator', 1128L: 0L, 1132L: 0L, 3058L: 'runmqchi ', 3060L: '', 3061L: '', 3062L: '', 3063L: '', 3064L: ''}, {1024L: 2678L, 1025L: 70L, 1L: 25L, 1308L: 1L, 3501L: 'SVRCONN.1 ', 3506L: '127.0.0.1 ', 3025L: 'mqm ', 1108L: 320L, 1110L: 1111L, 7005L: '', 7006L: 'AMQCQM01 A\xb6\xf7L\t7', 7007L: 'AMQCQM01 A\xb6\xf7L\t7', 7009L: '', 3174L: '', 1128L: 0L, 1132L: 0L, 3058L: 'python', 3060L: '', 3061L: '', 3062L: '', 3063L: '', 3064L: ''}]