<div style="line-height:1.7;color:#000000;font-size:14px;font-family:Arial"><p style="margin: 0;">Hi all,</p><p style="margin: 0;"><span style="font-size: 14px;"><br></span></p><p style="margin: 0;"><span style="font-size: 14px;">I'm using openstack command like this, and got error:</span></p><p style="margin: 0;"><span style="font-size: 14px;"><br></span></p><p style="margin: 0;"><span style="font-size: 14px;">```</span></p><p style="margin: 0;"><span style="font-size: 14px;">gyw@c1:~$ openstack port create --network selfservice --vnic-type remote-managed \</span></p><p style="margin: 0;"><span style="font-size: 14px;">> --binding-profile '{"pci_vendor_info": None, "pci_slot": None, "physical_network": None, "card_serial_number": "AB0123XX0042", "pf_mac_address": "08:c0:eb:8e:bd:f8", "vf_num":1, "vnic_type": "remote-managed"}' \</span></p><p style="margin: 0;"><span style="font-size: 14px;">> pf0vf0</span></p><p style="margin: 0;"><span style="font-size: 14px;">Expected '<key>=<value>' or JSON data for option --binding-profile, but encountered JSON parsing error: Expecting value: line 1 column 21 (char 20)</span></p><p style="margin: 0;"><span style="font-size: 14px;">```</span></p><p style="margin: 0;"><span style="font-size: 14px;"><br></span></p><p style="margin: 0;"><span style="font-size: 14px;">So how to set "pci_vendor_info" to NoneType of python in openstack CLI's json format string?</span></p><p style="margin: 0;"><span style="font-size: 14px;"><br></span></p><p style="margin: 0;"><span style="font-size: 14px;">BTW, "NoneType of python" means the NoneType in python code, like these comment in https://github.com/openstack/neutron/blob/stable/yoga/neutron/common/ovn/utils.py</span></p><p style="margin: 0;"><span style="font-size: 14px;"><br></span></p><p style="margin: 0;"><span style="font-size: 14px;">```</span></p><p style="margin: 0;"><span style="font-size: 14px;"> # With this example param_set:</span></p><p style="margin: 0;"><span style="font-size: 14px;"> #</span></p><p style="margin: 0;"><span style="font-size: 14px;"> # param_set = {</span></p><p style="margin: 0;"><span style="font-size: 14px;"> # 'do_not_check_this_key': None,</span></p><p style="margin: 0;"><span style="font-size: 14px;"> # 'pci_slot': [str],</span></p><p style="margin: 0;"><span style="font-size: 14px;"> # 'physical_network': [str, type(None)]</span></p><p style="margin: 0;"><span style="font-size: 14px;"> # }</span></p><p style="margin: 0;"><span style="font-size: 14px;"> #</span></p><p style="margin: 0;"><span style="font-size: 14px;"> # We confirm that each binding_profile key is of one of the listed types,</span></p><p style="margin: 0;"><span style="font-size: 14px;"> # allowing validation of polymorphic entries.</span></p><p style="margin: 0;"><span style="font-size: 14px;"> #</span></p><p style="margin: 0;"><span style="font-size: 14px;"> # 'physical_network' is polymorphic because: When a VNIC_REMOTE_MANAGED or</span></p><p style="margin: 0;"><span style="font-size: 14px;"> # VNIC_DIRECT with PORT_CAP_SWITCHDEV capability port is attached to a</span></p><p style="margin: 0;"><span style="font-size: 14px;"> # project network backed by an overlay (tunneled) network the value will be</span></p><p style="margin: 0;"><span style="font-size: 14px;"> # 'None'. For the case of ports attached to a project network backed by</span></p><p style="margin: 0;"><span style="font-size: 14px;"> # VLAN the value will be of type ``str``. This comes from Nova and is</span></p><p style="margin: 0;"><span style="font-size: 14px;"> # provided in the ``physical_network`` tag in the Nova PCI Passthrough</span></p><p style="margin: 0;"><span style="font-size: 14px;"> # configuration.</span></p><p style="margin: 0;"><span style="font-size: 14px;"> #</span></p><p style="margin: 0;"><span style="font-size: 14px;"> # In the above example the type of the value behind 'do_not_check_this_key'</span></p><p style="margin: 0;"><span style="font-size: 14px;"> # will not be checked, 'pci_slot' must be ``str``, 'physical_network must</span></p><p style="margin: 0;"><span style="font-size: 14px;"> # be either ``str`` or ``NoneType``.</span></p><p style="margin: 0;"><span style="font-size: 14px;">```</span></p><p style="margin: 0;"><span style="font-size: 14px;"><br></span></p><p style="margin: 0;"><span style="font-size: 14px;">Thank you~</span></p><p style="margin: 0;"><br></p><p style="margin: 0;"><br></p><p style="margin: 0;"><br></p><p style="margin: 0;"><br></p><div style="position:relative;zoom:1"><p style="margin: 0">--</p><div align="left">
<p class="MsoNormal" style="MARGIN: 0cm 0cm 0pt; mso-margin-top-alt: auto; mso-margin-bottom-alt: auto" align="left"><span style="FONT-SIZE: 10pt; COLOR: navy; FONT-FAMILY: Georgia" lang="EN-US"></span><span style="color: rgb(0, 0, 0);"> </span></p><span style="color: rgb(0, 0, 0);"><span style="color: rgb(0, 0, 0);">
</span><p class="MsoNormal" style="MARGIN: 0cm 0cm 0pt; mso-margin-top-alt: auto; mso-margin-bottom-alt: auto" align="left"><span style="font-size: 10pt; color: rgb(0, 0, 0); font-family: Georgia;" lang="EN-US">Best
Regards</span><span style="font-size: 10pt; color: rgb(0, 0, 0); font-family: ËÎÌå;">£¬</span></p><span style="color: rgb(0, 0, 0);">
</span><p class="MsoNormal" style="MARGIN: 0cm 0cm 0pt; mso-margin-top-alt: auto; mso-margin-bottom-alt: auto"><span style="font-size: 10pt; color: rgb(0, 0, 0); font-family: ¿¬Ìå_GB2312;" lang="EN-US">------------------------------------------------</span></p><span style="color: rgb(0, 0, 0);">
</span><p class="MsoNormal" style="MARGIN: 0cm 0cm 0pt; mso-margin-top-alt: auto; mso-margin-bottom-alt: auto"><span style="font-size: 10pt; color: rgb(0, 0, 0); font-family: Georgia;" lang="EN-US">Sam
Green</span></p><p class="MsoNormal" style="MARGIN: 0cm 0cm 0pt; mso-margin-top-alt: auto; mso-margin-bottom-alt: auto"><span style="font-size: 10pt; color: rgb(0, 0, 0); font-family: Georgia;" lang="EN-US">Home Page: http://blog.csdn.net/batmancn<br></span></p><span style="color: rgb(0, 0, 0);"></span><span style="color: rgb(0, 0, 0);"></span></span><p class="MsoNormal" style="MARGIN: 0cm 0cm 0pt; mso-margin-top-alt: auto; mso-margin-bottom-alt: auto"><span style="color: rgb(0, 0, 0);"><span style="font-size: 10pt; color: rgb(0, 0, 0); font-family: 'Courier New';" lang="PT-BR">Email:<a href="mailto:batmanzg@163.com">batmanzg@163.com</a></span></span><span style="FONT-SIZE: 10pt; COLOR: navy; FONT-FAMILY: 'Courier New'; mso-ansi-language: PT-BR" lang="PT-BR"></span><span style="COLOR: navy; mso-ansi-language: PT-BR" lang="PT-BR"></span></p></div> <div style="clear:both"></div></div></div>