f5-common-python
f5-common-python copied to clipboard
Problem in configuring VS with chinese character in description field
Hi, I encountered problem when configuring virtual server with chinese characters in description field using f5 sdk Here is the snippet of my code:
vs_info = {'name': vs_name,
'partition': 'Common',
'destination': '%s:%s' % (vs_ip,vs_port),
'mask': '255.255.255.255',
'source': '0.0.0.0/32',
'pool': pool_name,
'profiles': [
{'name': 'http'},
{'name': 'tcp'}
],
'description': '描述1'
}
vs = bigip.tm.ltm.virtuals.virtual.create(**vs_info)
from the packet capture:(see wireshark screen capture) https://ibb.co/mANEt9
we could find the description field in the request was encoded correctly and can be shown correctly from wireshark.
But from the bigip config, we found there
ltm virtual /Common/vs-jiao-xue-ping-tai {
description "^O ^Q^K^Q^N^O^P" <==== wrong.
destination /Common/192.168.1.1:80
ip-protocol tcp
mask 255.255.255.255
pool /Common/pool-vs-jiao-xue-ping-tai
profiles {
/Common/http { }
/Common/tcp { }
}
source 0.0.0.0/32
translate-address enabled
translate-port enabled
}
the BIGIP is version v13.1.0.5 f5 sdk version
>>> print f5.__version__
3.0.19
could someone help to explain it? Thanks! -MX