Commit Graph

53 Commits

Author SHA1 Message Date
Zuul 55049e8415 Merge "Better __repr__() for data model" 2024-02-21 18:49:16 +00:00
Takashi Kajinami 00399e43e5 Bump hacking
hacking 3.0.x is too old.

Change-Id: Ia580fbe0e6667a8c124000a35eea9740c1d5361c
2024-01-27 23:01:37 +09:00
Michael Johnson 2a84a218ef Fix a possible receive timeout
This patch fixes a possible receive timeout caused by a slow response from the
driver agent. For example if the database is very slow.

Closes-Bug: #2032890

Change-Id: I9079030a5fef9dc44da242adab3c568666777451
2023-08-24 02:38:11 -04:00
Tom Weininger bad19004b0 Add support for HTTP Strict Transport Security
Updates needed by Octavia for its HSTS support.

Partial-Bug: #2017972
Change-Id: I3a97f526f9be38c814657a223125b398b5014122
2023-06-28 18:12:14 +02:00
Tom Weininger 93c5e17ba8 Better __repr__() for data model
This greatly enhances debugability of data model objects as repr() and
objects contain now all attributes. Most subclasses implement their
own __str__() so it shows only the most relevant attributes.

Change-Id: I2babd600516cfe98673627c68e97cb581ee54834
2023-05-04 12:57:18 +02:00
Tom Weininger d7ad4de26f Add new amphora failover stopped status
The new AMPHORA_FAILOVER_STOPPED state will get used as way to denote
when the failover ciruit breaker stopps an amphora from doing failover.

Story: 2005604
Task: 30837
Change-Id: If51d242b8534850fd11d4911b90434b5fe9dd481
2022-03-24 14:21:51 +01:00
Michael Johnson 4f217dd4fa Add "PROMETHEUS" protocol.
This patch adds a protocol called "PROMETHEUS" as a supported protocol for
listeners. It will be used to expose a Prometheus exporter endpoint through
a listener.

Change-Id: I313ea875af537f146218eb763ed80038da5d5213
2022-01-25 18:07:16 +00:00
Brian Haley a3b01fd310 Fix loadbalancer_update argument typo
Provider drivers who override this definition started
seeing a failure due to a typo. For example:

  W0237: [Parameter 'new_loadbalncer' has been renamed to
  'new_loadbalancer' in overridden 'MyProviderDriver.
  loadbalancer_update' method (arguments-renamed)

While we just updated .pylintrc to ignore the error,
might as well fix the typo.

Change-Id: I28e210605d2d8bc06bc99844c92b538568dbac45
2021-07-08 21:30:16 +00:00
likui 6a9cd92ae0 Fix PDF docs build
Update tox config to include upper-constraints as dependencies. This
resolves issues with building PDF docs.

New pylint 2.9.0 provides some new checkers and detects new errors with
existing checkers:

 - consider-using-dict-items

Similar change was done in Octavia repo already.

Change-Id: I48106513291263a7f754cfe7f9edc3703f8fbb7a
2021-07-08 16:50:29 -04:00
Carlos Goncalves 0bc8c6a0b8 Add alpn_protocols to the pool data model
This change completes the ALPN support started in Victoria and initially
limited to listeners. Now with pools supported as well, this feature
work is completed in octavia-lib.

Change-Id: I01268f7afac8f6356616f3926d6fe9c1ec31b2b5
2021-01-25 16:31:13 +00:00
Michael Johnson fe022cdf14 Add Proxy protocol version 2 support
This patch adds the required changes to support Proxy protocol
version 2.

Change-Id: Ic51131defb8d687185a7887b7ca578c4f1babaad
Story: 2005611
Task: 30858
2020-08-26 22:26:43 +00:00
Carlos Goncalves b262fc9ad3 Add alpn_protocols to the listener data model
Change-Id: Iea9fdbfaee7c7965adcc65825fe6422f87b06de0
2020-08-26 22:24:11 +00:00
Carlos Goncalves b38f83120c Fix new pylint errors
Pylint 2.6.0 added two new checkers [1] that make pep8 validation to
fail:

- raise-missing-from (W0707)
- super-with-arguments (R1725)

[1] http://pylint.pycqa.org/en/latest/technical_reference/features.html

Change-Id: I50e798178a546132fba608ec4350d19a24986326
2020-08-26 21:08:08 +02:00
Michael Johnson 397653cb6d Fix NotFound exception in docstring
A recent patch added a docstring that references the new NotFound
exception. Unfortunately it is ambiguous with other NotFound
exceptions.
This patch clarifies the NotFound exception.

Change-Id: Ie7df8625c907a19e82a4595b32ee6e77c93363f7
2020-07-21 09:42:40 -07:00
Brian Haley ec7195d713 Add missing assertIsInstance checks
Two tests were missing assertIsInstance() checks, this
makes them like the tests above and below them.

Change-Id: Ie201f5b2574e5e11aeca9c08859977a1b8a3c1d8
2020-07-20 08:43:57 +00:00
Zuul d7d8c8efe4 Merge "Add SCTP protocol and health-monitor constants" 2020-07-17 20:17:06 +00:00
Zuul 9c5681a149 Merge "Define the protocols supported by listener and pool respectively" 2020-07-17 20:17:02 +00:00
Carlos Goncalves 684e0b9f55 Add NotFound exception class
This class can be used by provider drivers to raise an exception when a
resource cannot be found.

Change-Id: If3d095f033f342ebb637d74bd834d373e31fee0f
2020-07-16 15:21:03 +00:00
Brian Haley bf1824a8b2 Update test-requirements to match Octavia repo
pylint needed an update to be >=2.2.0 to fix a pep8 issue,
updated bandit requirement to match Octavia repo while
we're at it.

Had to fix some new errors pylint found as a result.

Change-Id: I7ebdd5eea537a8258f66b5e1bf2ee1aad3f8b10b
2020-07-16 10:15:29 -04:00
Gregory Thiemonge 1e04120299 Add SCTP protocol and health-monitor constants
Story: 2007884
Task: 40255

Change-Id: Iba51738982a13cd93125cd26ac02280745821165
2020-07-01 14:06:27 +02:00
Yang JianFeng ab0beac3ea Define the protocols supported by listener and pool respectively
HTTPS and TERMINATED_HTTPS are not valid protocols for pools, and
PROXY is not valid protocol for listener. So we should declare two
constants to respectively constrain listener and pool support
protocols.

Change-Id: Ibfc1609d867b746e639f9b8382301c04a6723f4b
2020-07-01 00:30:28 +00:00
Zuul 99118d2e47 Merge "Re-home constants here from octavia" 2020-04-01 19:42:12 +00:00
Zuul 52ea602c63 Merge "Add TLS protocols for listener and pool model" 2020-04-01 19:42:08 +00:00
Steven Glasford 6bec133036 Add TLS protocols for listener and pool model
Parameter added to the listener and pool model for TLS protocols.
Constants TLS_VERSIONS, SSL_VERSION_3, TLS_VERSION_1,
TLS_VERSION_1_1, TLS_VERSION_1_2, and TLS_VERSION_1_3 were added.

Change-Id: Ie54640201a0f4905d19841af5913972646b317bf
Co-authored-by: Steven Glasford <stevenglasford@gmail.com>
Story: 2006733
Task: 37186
2020-04-01 14:11:21 -05:00
Zuul 0b76e18bbf Merge "Update hacking for Python3" 2020-03-31 17:48:21 +00:00
Andreas Jaeger 7b52b7caa5 Update hacking for Python3
The repo is Python 3 now, so update hacking to version 3.0 which
supports Python 3.

Fix problems found.

Update local hacking checks for new flake8.

Change-Id: If11b38493aacc7b888a6b64bf50c1a2782efd9ae
2020-03-31 06:46:44 +00:00
Noah Mickus 3e1278391f Adding cipher list Support for provider drivers
updated the data models for pools and listeners to
add support for cipher lists and added the needed
constants

updated the test models to include the new
parameters

Change-Id: Id5f4c20abd40dd092558a711987953012d4ae67f
Story: 2006627
Task: 37185
2020-03-27 19:00:58 +00:00
Michael Johnson c565e7b289 Remove the dependency on the "mock" package
Now that we are python3 only, we should move to using the built
in version of mock that supports all of our testing needs and
remove the dependency on the "mock" package.

This patch moves all references to "import mock" to
"from unittest import mock". It also cleans up some new line
inconsistency.

Change-Id: Ie7567134a7c0ffae525d0282773e4c90a3f2d62b
2020-03-13 10:34:47 -07:00
Brian Haley c05865849f Re-home constants here from octavia
octavia/common/constants.py has a few constants
that can be moved to octavia-lib

Change-Id: If05956d0ddd261576c80c1416e49128c09affc76
2020-01-20 18:15:14 -05:00
Brian Haley 7d03255181 Remove all usage of six library
Convert all code to not require six library and instead
use python 3.x logic.

Change-Id: I32d9f261a219ab4dc95a697d9ab1ff5d9298aee8
2020-01-20 15:41:24 -05:00
Adam Harwell 9e60548de8 Missed some flavor references in the AZ methods
Bad copy/paste T_T

Change-Id: I898d468aca1a08a1acf2c0a2c4c2a642e7adc780
2019-12-13 15:10:48 -08:00
Sam Morrison 012d908b9c Add availability_zone to the LoadBalancer model
Temporarily make the tips jobs non-voting so we can merge this change
that relies on a change in the main repo.

Depends-On: https://review.opendev.org/#/c/693765/
Change-Id: I6dcbe72328369089ed62330098b38f8d4029749c
2019-11-21 19:41:51 +00:00
Adam Harwell 787a8edcbe Availability zone / metadata validation
Change-Id: I01ce19b1cd8331fbb5a8121a88ce9e23edd91752
2019-11-18 19:19:53 -08:00
Adam Harwell 3c6b639b68 Batch member update needs pool_id explicitly
Pulling it from the members doesn't work if it is a delete operation
where there aren't any!

Story: 2006719
Task: 37091

Change-Id: Ia67172306c28c17648eb7f0263c5a66b44a96baa
2019-10-14 12:32:24 -07:00
Michael Johnson 5ea72f9f2c Generate PDF documentation
Change-Id: I71a0820f2322be7f84ab6555b534368d76bb0359
Story: 2006101
Task: 35148
2019-09-13 10:51:05 -07:00
Michael Johnson 28f1e74546 Clean up octavia-lib docs and remove oslo.log
This patch cleans up the octavia-lib documentation and removes an
unused requirement for oslo.log.

Change-Id: I4ddcb51fcfb976e825cd204d5f4f561d60ee0455
2019-08-09 11:50:41 -07:00
Andreas Jaeger 05b8ca95fd Fix docstring and avoid such errors
Docs in octavia where failing with:
Docstring of octavia.api.drivers.amphora_driver.v1.driver.AmphoraProviderDriver.create_vip_port:
10:Unexpected indentation.

The broken docstring is in octavia_lib/api/drivers/provider_base.py. Fix
that docstring and build apidocs - like octavia does - so that all
docstrings in this repo get tested.

For building apidocs, add the needed configuration to the sphinx files
and require the package.

Change-Id: Iad03f19083d9a5429dcfed3499d1c3e2d56cbb0f
Co-Authored-By: Jeremy Stanley <fungi@yuggoth.org>
Co-Authored-By: Adam Harwell <flux.adam@gmail.com>
2019-08-03 17:29:12 +02:00
Michael Johnson c467bf0485 Add constants to octavia-lib
This patch adds some missing constants to octavia-lib for the
provider driver API fields.

Change-Id: I9b601fe2294de2536127a6856f101f4dd0bf4e91
2019-07-30 16:23:25 -07:00
Zuul 43aa1c4024 Merge "Add get methods to the driver-lib" 2019-07-30 10:55:11 +00:00
Michael Johnson d700c00a90 Add get methods to the driver-lib
This patch adds get methods to the driver-lib which allows provider
drivers to query for objects by ID.
In support of the get methods, this patch fixes a bug in the data
model to_dict() where it may not properly recurse the objects.
It also improves connecting to the driver agent sockets and adds a
timeout while waiting to receive data from the driver-agent.

Change-Id: Ia69d1f61571a1a65dee585037affb317999d7ade
Story: 2005870
Task: 33682
2019-07-29 11:29:22 -07:00
Zuul 03c2fe38e4 Merge "Add allowed_cidrs to Listener data model" 2019-07-27 00:49:30 +00:00
Maciej Józefczyk 11b299bcbc Add new LB Algorithm - SOURCE_IP_PORT
LB_ALGORITHM_SOURCE_IP_PORT is an algorithm used by OVN
Load Balancer [0].

[0] https://review.opendev.org/#/c/660369

Story: 2006264
Task: 35951

Change-Id: I605f44f0f50219aa003df477de9bae4062f3c308
2019-07-24 08:09:46 +00:00
Adam Harwell 79848fe84a Additional VIPs is also relevant in provider_base
Though this is just an abstract class so it doesn't break functionality,
it should be kept up to date for the sake of implementers.

Story: 2005608
Task: 33612
Change-Id: I29db66a282886ced2bd1bc1176f279728e5137e5
2019-06-18 02:31:15 -07:00
Carlos Goncalves cf41cb3693 Add allowed_cidrs to Listener data model
Task: 31059
Story: 2003686

Change-Id: I837420afa0d7d67ea98aed40ab9b903f2f8aa33d
2019-06-13 11:42:22 +02:00
Zuul 307b15e2a3 Merge "Add 'additional_vips' field to driver datamodel" 2019-06-07 22:39:37 +00:00
Adam Harwell 7c9cb9dcb9 Add 'additional_vips' field to driver datamodel
Story: 2005608
Task: 33612
Change-Id: Ie1e2532f3aa9dca542ddeee120002e11d0f9f0b1
2019-06-07 04:05:35 -07:00
Michael Johnson 5376e0304c Add project_id to all of the data model objects
This patch adds a project_id field to all of the data model objects.

This is useful for drivers to track/associate objects on the backend.

Change-Id: I224acdf4a1a946ef6e5ecb49a3a54938a6c961a7
2019-06-05 14:18:19 -07:00
Carlos Goncalves 6b55d62196 Sync data models and import new constants from Octavia
Recent TLS encryption, L7policy and health monitor work in Octavia added
a few new constants. This patch imports those constants and updates the
data models.

Story: 2005136
Task: 29823

Change-Id: Idcb87a69cdf725aa4c4ced4102d395149d5fa8d0
2019-03-06 19:22:32 +01:00
Zuul 679cfbb297 Merge "Add FLAVOR as a constant." 2019-02-21 01:00:14 +00:00
Michael Johnson 544d05f24b Fix some driver library bugs
This patch corrects some python3 byte string issues in the driver
library callbacks.
It also corrects an issue where multiple update calls may cause a
bad file descriptor error.

Change-Id: I3a03f2d8e65d48fe3791611486cb5da4961335b6
2019-02-07 16:22:04 -08:00