<div dir="ltr"><div dir="ltr"><div><div><br></div><div><br></div><div>Hi all,</div><div><br></div><div>I'm using openstack command like this, and got error:</div><div><br></div><div>```</div><div>gyw@c1:~$ openstack port create --network selfservice --vnic-type remote-managed \</div><div>> --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"}' \</div><div>> pf0vf0</div><div>Expected '<key>=<value>' or JSON data for option --binding-profile, but encountered JSON parsing error: Expecting value: line 1 column 21 (char 20)</div><div>```</div><div><br></div><div>So how to set "pci_vendor_info" to NoneType of python in openstack CLI's json format string?</div><div><br></div><div>BTW, "NoneType of python" means the NoneType in python code, like these comment in <a href="https://github.com/openstack/neutron/blob/stable/yoga/neutron/common/ovn/utils.py">https://github.com/openstack/neutron/blob/stable/yoga/neutron/common/ovn/utils.py</a></div><div><br></div><div>```</div><div>    # With this example param_set:</div><div>    #</div><div>    # param_set = {</div><div>    #     'do_not_check_this_key': None,</div><div>    #     'pci_slot': [str],</div><div>    #     'physical_network': [str, type(None)]</div><div>    # }</div><div>    #</div><div>    # We confirm that each binding_profile key is of one of the listed types,</div><div>    # allowing validation of polymorphic entries.</div><div>    #</div><div>    # 'physical_network' is polymorphic because:  When a VNIC_REMOTE_MANAGED or</div><div>    # VNIC_DIRECT with PORT_CAP_SWITCHDEV capability port is attached to a</div><div>    # project network backed by an overlay (tunneled) network the value will be</div><div>    # 'None'.  For the case of ports attached to a project network backed by</div><div>    # VLAN the value will be of type ``str``.  This comes from Nova and is</div><div>    # provided in the ``physical_network`` tag in the Nova PCI Passthrough</div><div>    # configuration.</div><div>    #</div><div>    # In the above example the type of the value behind 'do_not_check_this_key'</div><div>    # will not be checked, 'pci_slot' must be ``str``, 'physical_network  must</div><div>    # be either ``str`` or ``NoneType``.</div><div>```</div><div><br></div><div>Thank you~</div></div><br clear="all"><div><div dir="ltr" class="gmail_signature"><div dir="ltr"><div><div dir="ltr"><div>----</div>Simon Jones</div></div></div></div></div></div></div>