How to specify binding:profile with python neutronclient library

asked 2019-05-29 14:46:18 -0600

hkotak gravatar image

Part of python script

  body = {
            "port": {
                'name': name,
                'network_id': chain_network.get_uuid(),
                'binding:vnic_type': vnic_type,
                'binding:profile': 'capabilities[switchdev]'
            }

Output log: BadRequest: Invalid input for binding:profile. Reason: 'capabilities[switchdev]' is not a dictionary.

I can run the same with openstack CLI using this command:

openstack port create --network provider-net --vnic-type direct --binding-profile '{"capabilities": ["switchdev"]}' direct-port

edit retag flag offensive close merge delete

1 answer

Sort by » oldest newest most voted
0

answered 2019-06-27 22:18:44 -0600

hkotak gravatar image

I figured it out. It can be specified using

'binding:vnic_type': direct,
'binding:profile': {'capabilities':’switchdev’}
edit flag offensive delete link more

Get to know Ask OpenStack

Resources for moderators

Question Tools

1 follower

Stats

Asked: 2019-05-29 14:46:18 -0600

Seen: 192 times

Last updated: May 29 '19