Ask Your Question
0

How to specify binding:profile with python neutronclient library

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

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 -0500

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

Your Answer

Please start posting anonymously - your entry will be published after you log in or create a new account.

Add Answer

Get to know Ask OpenStack

Resources for moderators

Question Tools

1 follower

Stats

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

Seen: 21 times

Last updated: May 29