Actully, I want to set physical_network to NoneType, as I use selfservice network, NOT provider network. -- Best Regards, ------------------------------------------------ Sam Green Home Page: http://blog.csdn.net/batmancn Email:batmanzg@163.com At 2023-02-22 09:21:17, "Sam" <batmanzg@163.com> wrote: Hi all, I'm using openstack command like this, and got error: ``` gyw@c1:~$ openstack port create --network selfservice --vnic-type remote-managed \
--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"}' \
pf0vf0
Expected '<key>=<value>' or JSON data for option --binding-profile, but encountered JSON parsing error: Expecting value: line 1 column 21 (char 20) ``` So how to set "pci_vendor_info" to NoneType of python in openstack CLI's json format string? 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/uti... ``` # With this example param_set: # # param_set = { # 'do_not_check_this_key': None, # 'pci_slot': [str], # 'physical_network': [str, type(None)] # } # # We confirm that each binding_profile key is of one of the listed types, # allowing validation of polymorphic entries. # # 'physical_network' is polymorphic because: When a VNIC_REMOTE_MANAGED or # VNIC_DIRECT with PORT_CAP_SWITCHDEV capability port is attached to a # project network backed by an overlay (tunneled) network the value will be # 'None'. For the case of ports attached to a project network backed by # VLAN the value will be of type ``str``. This comes from Nova and is # provided in the ``physical_network`` tag in the Nova PCI Passthrough # configuration. # # In the above example the type of the value behind 'do_not_check_this_key' # will not be checked, 'pci_slot' must be ``str``, 'physical_network must # be either ``str`` or ``NoneType``. ``` Thank you~ -- Best Regards, ------------------------------------------------ Sam Green Home Page: http://blog.csdn.net/batmancn Email:batmanzg@163.com