Openstack Neutron:如何使用 update_port() api 更新端口 vif 模型

Openstack Neutron: How to update port vif-model using update_port() api

我想更新 vif_model 已创建的端口。我在 CLI

中使用以下命令
neutron port-update --binding:vif_model=avp <port_id>

如何使用 python api 中子实现同样的效果。 我正在尝试使用 update_port() api。但不确定参数。

>>> from neutronclient.neutron import client
>>> neutron = client.Client('2.0', endpoint_url=neutron_endpoint, token=tok)
>>> help(neutron.update_port)

给出以下提示:

Help on function with_params in module neutronclient.v2_0.client:

with_params(*args, **kwargs)

我查看了 Nova 源代码以了解通常如何使用 update_port 调用的示例,看起来您会这样称呼它:

client.update_port('1fe691a6-f3a0-4586-b126-9fabb11e962a',
                   {'port': 
                     {'binding:vif_type': 'avp'}})