Commit Graph

29 Commits

Author SHA1 Message Date
Adit Sarfaty 74f3831027 NSX|P: QoS support
Change-Id: I719c1adfa94676b5e8b3a7b60f8d9d034d54eeb3
2019-01-07 13:07:23 +02:00
Adit Sarfaty 5a52317eac NSX|V3: Fail on unsupported QoS rules
The NSX plugin does not support minimum BW rules.
This patch fails validation to prevent the creation of such rules.

Change-Id: I293dd5b6c659855bb939912370d72cdfd228a338
2018-08-26 12:07:54 +03:00
Adit Sarfaty 41806e8f41 NSX-TVD QoS drivers support
Modify the QoS drivers of NSX-V and NSX-V3 to support TVD core plugin

Change-Id: I20eb61a01f6a0238871440d9d91e18f55b4bd20e
2017-12-19 11:56:06 +02:00
Boden R 06bf8d1186 use common constants from lib
neutron-lib contains the neutron.common.constants.
This patch switches references over to use the lib version of them.

Change-Id: I0354c84bd85e20ff4ea7ba392bf9ebfc2e7ac70e
2017-09-22 15:55:08 -06:00
Boden R 52de5b6cef use qos constants from neutron-lib
neutron-lib contains the qos constants now, and neutron is moving to it
in I6ed379b178a2b79fd14385a1d1e87d87eb04bfb9. This patch moves all
references from neutron's qos constants to neutron-lib.

Change-Id: I047e187af8c5a7ea04b94659ccc725f796553066
2017-07-26 11:54:28 -06:00
Adit Sarfaty 3c5d0d4ff6 NSX|V3: Support QoS ingress rules
Commit Ia13568879c2b6f80fb190ccafe7e19ca05b0c6a8 added the ingress direction
BW rules.
This patch adds this support for the nSX-V3 QoS driver.

Depends-on: I34ae54b7c4b5810694e4ea05265421c8e4c903d8
Change-Id: I886896c4f9cc6b6456d72c3bec05ee76e18fea3b
2017-06-26 09:13:47 +03:00
Adit Sarfaty 25f67e66ae NSX|V3: Use QoS precommit callback to validate rules
Commit I44dd7e049eab054363063021f07ade81ef2d1a90 introduced the qos driver
precommit callbacks.
The NSX-V3 uses this callback to validate the BW rule limit and raise an exception
if the values are not supported by the backend.

Change-Id: Ie47c147cb5bb5ece01d8c272544994eacd295c52
2017-06-18 15:40:36 +03:00
Gary Kotton 01d33ffa65 Integration with new neutron code
1. Use new enginefacade + l3_db breakage
Use reader and writer for db operations.
Partially-Implements blueprint: enginefacade-switch

2. Fix the callback pass for _prevent_l3_port_delete_callback
which was changed in commit Ia8ac4f510c003667cac95f76dea0e9ae55159878

3. QoS driver integration
Commit I5f747635be3fd66b70326d9f94c85a6736286bd2 removes the qos
notification driver.
Fixing the nsx-v and nsx-v3 to work only with the regular driver

4. _get_extra_routes_dict_by_router_id was removed by
Ia815d6c597730bd5cb49455e7409ca747a4cc22c

5. Floating IP association without subnet gateway IP
not supported by our plugins.
Added in commit If212c36d918ed57400a53f4b5fa1925b3d1fa6fd

Co-Authored-by: Adit Sarfaty <asarfaty@vmware.com>
Change-Id: I277ec5c38c5895337011019f71d586b254bfafde
2017-04-18 18:56:05 +03:00
Gary Kotton 6228a06399 Drop log translations
Log messages are no longer being translated. This removes all use of
the _LE, _LI, and _LW translation markers to simplify logging and to
avoid confusion with new contributions.

See:
http://lists.openstack.org/pipermail/openstack-i18n/2016-November/002574.html
http://lists.openstack.org/pipermail/openstack-dev/2017-March/113365.html

Change-Id: I9d37ae28a3fecbe910e60dc7f22e229a7b65940c
2017-03-26 05:09:02 -07:00
Adit Sarfaty 70fbe736b7 NSX-V3: Fix QoS delete
In commit I1f863bf91f712d4b12db753b13cc6b842b6918a4 the qos driver stopped
using the message queue.
So the delete callback is now called in the plugin context, after the qos
policy is already deleted.
This means that we cannot access the backend profile id in the DB, since it
was already deleted too.

The fix is to remove the foreign key constraint from the mapping table, and
manually delete the entry.

Change-Id: I28e1c7c5ad0bb487d9c19ce76e2f7820f029678e
2017-03-15 13:58:27 +02:00
Adit Sarfaty 02f630b616 NSX-V3| Qos without RPC notifications
The QoS implementation will stop using the RPC notifications in Pike.
See commit I2f166a43f0b980ad22617f8a3f7b4cc7f4786c48
This patch still supports it for backwards compatibility,
as well as a new driver to replace the RPC notifications.

Change-Id: I1f863bf91f712d4b12db753b13cc6b842b6918a4
2017-02-16 12:40:54 +02:00
Adit Sarfaty 26070b7ac1 NSX-V3| Fix qos switching profile project name
In order to get the real project name on the qos switching profile,
we need to use the original context of the request when building the tags
for the profile.

Change-Id: I483f3a7a23e220d3ce5e61a09f21a95545b7efcc
2017-01-18 08:55:27 +02:00
Adit Sarfaty fafafdc67e NSX-V3| Validate Qos burst size before rule creation
Change-Id: Ie2685d19a7f7a7e43ab80f9761e9c9240b5d49e1
2017-01-16 14:24:58 +02:00
Adit Sarfaty e8a66301c6 Replace subscribe with register for rpc callbacks
Commit I06c8302951c99039b532acd9f2a68d5b989fdab5 deprecated rpc callbacks
subscribe and replaced them with register that get context and resource type too.

Change-Id: Id80b1947c5dd329567609d3980b7790a01ab01ff
2016-12-25 08:47:48 +02:00
Adit Sarfaty 3009f37757 Integration with neutron-lib plugin directory
Co-authored-by: Armando Migliaccio <armamig@gmail.com>
Change-Id: I7c7efbaa7a53f8d244f1b19ea3a7c8a8900602be
Depends-on: I7331e914234c5f0b7abe836604fdd7e4067551cf
Depends-on: Ia91dfbf9d93e19b43c0dd0b58b95fc0080b0ad7c
Depends-on: I48cd9257f419ad949ba0cecc9aca98a624ca4dcc
2016-11-23 20:18:17 +00:00
Adit Sarfaty 875105af5a NSX|v+v3: QoS BW translations should be rounded
When translating kbps->Mbps, or multiplying BW values by the
qos_peak_bw_multiplier, the result should be round in order to make
it more reasonable.

Change-Id: I69e9a6b6ea8bf5400308552f63713db5192209d9
2016-10-30 11:31:56 +02:00
Adit Sarfaty 34f3ee275e nsxlib refactor: config + neutron deps
1. new config class was added to allow all the classes to use the same object
2. removing dependencies of the neutron project in nsxlib code & tests

Change-Id: I15ace2ab60c1e4307d7076426c48ecc7a242e792
2016-09-30 21:00:52 +03:00
Adit Sarfaty 701de5c48f nsxlib refactor - add hierarchy to the nsxlib apis
Separating the nsxlib apis into sub classed like
firewall, nsgroup, logical router, in order to make the api simpler

Change-Id: If67fae83515bd9e72aba116a78bb6afce1fe1ab9
2016-09-30 20:44:32 +03:00
Adit Sarfaty a7b5bfafcc nsxlib refactor continue
- separate nsxlib/v3 constants and utils from the common ones
- separate the nsxlib/v3 tests
- update the nsxlib tests to cover create_firewall_rules
- remove all of the DB calls from the nsxlib/v3
- merge security & dfw_api classes

To be done in future patches:
- Avoid using the nsx configuration values directly
- Improve nsxlib interface (as Aaron suggested in If2fe1e014b78703ff0a9cdff1e4e8d45f3a4a16d)

Change-Id: I43257f557ce1e98b4f64b8157d723cc84ea58c2b
2016-09-29 15:59:13 +03:00
Jenkins f41ef9b532 Merge "QoS integration - callbacks should support a list of policies" 2016-08-25 12:28:46 +00:00
Aaron Rosen 86118f6692 nxv3: mass refactor of nsxlib
This patch refactors the current codebase to be more modular
and testable. The main changes are:

  - pull out all of the profile setup logic from the __init__
    method to it's own method _init_nsx_profiles method to make
    testing the code easier.

  - refactors the nsxlib.v3 code to break out all neutron related
    exceptions and cleans up the interface so we can make nsxlib.v3
    it's own standalone library eventually.

To improve:

  - Currently we have nsxlib.v3.dfw_api and nsxlib.v3.firewall,
    we should refactor this code and merge them into one file.

  - refactor nsxlib to section of each api component to it's own
    subclass. For example, nsxlib().port.create() rather than
    nsxlib().create_port(). I think this would be most useful
    for the security group/firewall integration as there are many
    methods there that are needed to interface with nsx as the security
    group feature is requires the most orchestration with nsx.
    Breaking them into a sub class will make things more easy to understand.

Change-Id: If2fe1e014b78703ff0a9cdff1e4e8d45f3a4a16d
2016-08-19 12:28:20 +00:00
Adit Sarfaty 466bde4b40 QoS integration - callbacks should support a list of policies
Patch I1117925360a29ecbd1902fa527b2f24f94ce81ec changed the QoS
callbacks api - instead of a single policy, it now receives a list

Change-Id: Icd598fca250aa6812066a816b82b6930cd8a0283
2016-08-12 07:14:39 +00:00
Adit Sarfaty 2576e7dddd NSX|V+V3: Fix QoS peak bandwidth calculation
The NSX backend supports configuration of Peak Bandwidth, but if it is the same
as the average bandwidth, bursts are not allowed.
To fix this, we added a new configuration multiplier that will be used to
calculate the peak bw out of the neutron max bw.

Change-Id: I38ca66dfccdf09aca2ea31015174f0615cf83656
2016-07-20 17:19:03 +00:00
Adit Sarfaty b05f9d533c NSX-V: support qos policy in network get
Return the policy id when getting a network

Change-Id: Ib3dbf3910dc1299a8b916788810d3e7ef024a4e8
2016-06-05 11:07:51 +00:00
Adit Sarfaty 16200ab377 NSX|V3 QoS DSCP marking support
Adding support for the QoS DSCP marking rules for ports & networks,
and updating the backend QoS switching profile

Change-Id: I852ad20965c78c2d6011d350ca4f226f462d03fd
2016-05-15 09:15:02 +03:00
Gary Kotton 0613e7773f Remove deprecated warnings for neutron_lib
neutron_lib should be used instead of the attributes and constants
imports. This patch moves to using neutron_lib. This removes all of
the deprecated warnings (there are still some from neutron and
l2gw - those are addressed in other patches).

Change-Id: I796d749c46a69107a1a484e8774c5d501fc4704f
2016-05-11 19:26:04 -07:00
Adit Sarfaty 1b331422a0 NSX|V3 QoS: handle illegal max bandwidth
The backed does not allow max bandwidth < 1M.
Since the switch update is done from a notification callback,
we cannot fail the user action.
Instead, we log a warning, and use the minimal possible value.

Change-Id: Ic5aa7f933d7faf959bafd7f3f589fe29d6ded06d
2016-05-10 11:27:10 +00:00
Adit Sarfaty eebeeec051 NSX|V3 add QoS support for networks
The user will be able to attach/detach QoS policies to internal
networks. This will affect newly created 'compute' ports, or ports
with a newly updated 'compute' device owner which will get the same
policy as their network, unless a specific policy was set to this port.
Updating the policy of a network will only affect new ports

Change-Id: I043c3002db0ee018f6556bf4db32a505f92240dd
2016-04-21 08:29:00 +03:00
Adit Sarfaty 6fbf7ff64c NSX|V3 add qos support for ports
Add support for the qos service in NSX|V3, including:
- Attach/Detach qos policy to a new or updated port
- Allow qos configuration on ports with internal networks only
- Update the switch profile with the BW limitations and tags
  through the qos notification driver
- Add a new mapping db table to link the policy id and the
  nsx-v3 switch profile id

For this to work, the following configuration should appear under the 'qos' section in the neutron.conf:
notification_drivers = vmware_nsxv3_message_queue

Change-Id: I4016de756cebe0032e61d3c2a5250527e44b49e4
2016-04-20 09:11:41 +03:00