Commit Graph

4 Commits (b7b432c64286623d86a5caf2dcc11770b170a003)

Author SHA1 Message Date
Thomas Morin 5981bf416d OVSBridge: add --strict to allow priority in delete_flows
n8g-sfc currently has its own variant of OVSBridge to allow the use
of priority in a delete_flows call

This change is meant to make this available outside n8g-sfc and
simplify n8g-sfc code.

This change adds a 'strict' boolean parameter to mod_flow and delete_flows
that results in ovs-ofctl to be run with --strict for del-flows and
mod-flows actions.  When strict is set, the use of priority is allowed
and hence not rejected anymore.

Note that for batched actions in a deffered bridge, we disallow mixing
calls with strict and without strict, which can't be translated in one CLI
call.

Needed-By: I3bf939590dd43bff685f133bff86eb7e9068de91
Change-Id: I289d546780f10dc1002ab6bc2e1b38c9ef2d728f
6 years ago
Thomas Morin 106f6507db Refactor OVSCookieBridge: always use bridge cookie
Instead of having OVSCookieBridge as a passthrough class that does not
provide the intended behavior (see bug 1557620), this change implements
a cookie bridge as a patched copy of the underlying bridge:
- the underlying bridge is copied
- the copy is given an extension-specific cookie

The 'extension bridge should only touch its flows' effect is obtained
by a separate change (Idd0531cedda87224531cb8fb6a912ccd0f1554d5).

The two problems in the bug are addressed:
- the extension-specific cookie is now applied even for calls to
  methods other than add/delete/mod_flows
- the extension-specific cookie is now applied in the case of the
  native/ryu implementation

This commit also re-enable the use of uninstall_flows in the QoS OVS driver,
which had to be disabled in Idd0531cedda87224531cb8fb6a912ccd0f1554d5, but
can now be re-enabled with this bug addressed.

This change complements the unit tests to confirm that the bug is
fixed.

Change-Id: I55835a34d8fba7a139dce93f99cbff54584d695c
Closes-Bug: #1557620
Needed-By: I8570441a0b8d5ee3ad7f88e07affac2f1b782021
6 years ago
Inessa Vasilevskaya bdeb7bcc2b enable OVSDB native interface by default
- unit tests were fixed mainly by mocking
  Connection class of native implementation.

- some ovs-lib tests rely on direct ovs-vsctl
  output. Temporarily decorated with @vsctl_only.

UpgradeImpact

Change-Id: I2632b0e21edd61536867a9fc830a45d9899091e4
7 years ago
David Shaughnessy ea8d60f561 Added agent specific API support to L2 extensions
- Introduces an API to allow l2-agents to access resources within
  the Open vSwitch Agent, specifically the integration and tunnel bridges.
- adds consume_api method to the AgentCoreResourceExtension class.
- modifies the AgentExtensionManager class to accept the AgentExtensionAPI
  class as an optional argument.
- adds the OVSAgentExtensionAPI class.
- modifies ovs_lib and ofswitch to include a list of uuid stamps
  to exempt from flow deletion.
- adds the OVSBridgeCookieMixin class that manages the distribution of
  cookies and maintains the list of reserved cookies.
- modifies OVSNeutronAgent to initialize OVSAgentExtensionAPI and pass
  into the AgentExtensionManager.

Partial-Bug: #1517903
Co-Authored-By: Nate Johnston <nate_johnston@cable.comcast.com>
Co-Authored-By: Thomas Morin <thomas.morin@orange.com>
Implements: blueprint l2-api-extensions

Change-Id: I7cb61f30689dff2d7895d444060dedc1532a63ec
7 years ago