Skip to content

Transform Profile into an interface #1186

@EmilienM

Description

@EmilienM

/kind feature

Right now, when creating a Neutron port with specific binding capabilities (e.g. switchdev for OVS Hardware Offload), the syntax would be:

profile:
  capabilities: '[''switchdev'']'

Because our interface is:

Profile map[string]string `json:"profile,omitempty"`

While in Gophercloud, it's an interface:

Profile map[string]interface{} `json:"binding:profile,omitempty"`

https://github.com/gophercloud/gophercloud/blob/4885c347dcf48fc518798d37fb93ffa7bdaa43e9/openstack/networking/v2/extensions/portsbinding/requests.go#L23

Providing the list of capabilities via a string isn't clean.

Describe the solution you'd like

Convert Profile to Profile map[string]interface{}, so we'll be able to do:

profile:
  capabilities:
  - switchdev

Note: this feature is difficult to test against a real OpenStack cloud, for example switchdev required specific hardware (Mellanox Connect-X) for OVS HW offload. When implementing this change, we should also add functional testing with a basic profile that would work with current devstack setup.

Metadata

Metadata

Assignees

Labels

kind/featureCategorizes issue or PR as related to a new feature.

Type

No type

Projects

Relationships

None yet

Development

No branches or pull requests

Issue actions