91 Commits

Author SHA1 Message Date
Adam Harwell
29d4340e9f Remove v1 API and associated code
Includes some updates to docs and configs and related files to remove
references to neutron-lbaas. Also remove handlers.

Change-Id: I3082962841d3b645f3cbd1a6b41fc7fb28dcf7e6
2019-05-11 14:39:17 -07:00
Michael Johnson
7d1bdc31bb Fix missing REDIRECT_PREFIX in the api-ref
The Octavia API reference was missing the option of "REDIRECT_PREFIX"
as one of the L7 policy actions. This patch corrects that.

Change-Id: I5fa14354fb88b325380834e0deec09bfb813b409
2019-04-15 16:03:42 -07:00
ZhaoBo
44833d5d5e Support Host header inject for healthmonitor HTTP 1.1 health check
This patch adds 2 new options for healthmonitor HTTP health check.
'http_version' is for user to specify the HTTP version, 1.0 and 1.1 are
available.
'domain_name' is for user to specify the HTTP host header inject to check
the HTTP backend health.
'domain_name' only available when HTTP version is 1.1

Story: 2002160
Task: 20010
Change-Id: Id3bf3962a02fbf77cf886c40ac64588cbacd3832
2019-03-06 01:24:31 +00:00
ZhaoBo
25fb7e4c32 Support L7policy redirect http code
Currently, L7Policy already support the redirection by url_prefix.
Then we can support the redirection with HTTP code.

This patch adds an new option 'redirect_http_code' to L7Policy API.

Story: 2003609
Task: 24941
Change-Id: Id0c9c376ffbc2fb10ddb988537d0ef1a8205e586
2019-03-04 15:04:53 -08:00
ZhaoBo
e0e9af3b51 Add boolean tls_enabled option into Pool
Add "tls_enabled" option in Pool API.
This option will work on cert cases or no cert cases.

Story: 2003858
Task: 26672
Co-Authored-By: Michael Johnson <johnsomor@gmail.com>
Change-Id: I62e31aaa66748ba652dfd5dbfd5a8b06d9ba0dfe
2019-03-01 00:20:38 +00:00
ZhaoBo
7aa115a553 Add 2 new fields into Pool API for support re-encryption
Add tls_ca_container_id and crl_container_id into Pool API.

Story: 2003858
Task: 26672
Co-Authored-By: Michael Johnson <johnsomor@gmail.com>
Change-Id: I6cd6e2ca8e48a5df707a70d22505dec9d752c7eb
2019-02-28 16:20:09 -08:00
ZhaoBo
aa7ac7ab73 Pool support sni cert for backend re-encryption
Add 1 fields like Listener does, which is 'tls_container_ref', this
field is introduced into Pool for storage the pool client certificate to
the backend servers, when the traffic willing to bring a cert to the
servers and check for tls connection.

Story: 2003859
Task: 26685
Change-Id: I29b7c7116e6087c942179ed9efdead494ef277a3
2019-02-28 11:36:48 -08:00
ZhaoBo
f77d7d0220 L7rule support client certificate cases
This patch add 4 new types for SSL connection ACL configuration.
Which are:
L7RULE_TYPE_SSL_CONN_HAS_CERT
L7RULE_TYPE_VERIFY_RESULT
L7RULE_TYPE_DN_FIELD

The first type can just accept the compare type "EQUAL_TO" and value
"True" string.
The second can just accept the int value string to check the certificate
verify result, also just support "EQUAL_TO" compare type.
The third can accept key, the distinguished name field and a match string,
this one supports all kind compare types.

Story: 2002165
Task: 20025
Co-Authored-By: Michael Johnson <johnsomor@gmail.com>
Change-Id: I71b57d0f32d4839a770396645d2b9945d24f2853
2019-02-24 23:31:09 +00:00
ZhaoBo
aa1bca0271 Add new ssl header into Listener for client certificate
Add new ssl headers:
'X-SSL-Client-Verify', 'X-SSL-Client-Has-Cert', 'X-SSL-Client-DN',
'X-SSL-Client-CN', 'X-SSL-Issuer', 'X-SSL-Client-SHA1',
'X-SSL-Client-Not-Before', 'X-SSL-Client-Not-After'

Allow users to send to the backend with multiple choices when
tls_terminated is enabled for client certificate.

Story: 2002165
Task: 20020

Change-Id: I112936ee85c9e0dcfb87b962176ba7d623989a30
2019-02-24 23:30:59 +00:00
ZhaoBo
20509e2337 Add crl-file option for certification
Add crl-file in Listener side.

Story: 2002165
Co-Authored-By: Michael Johnson <johnsomor@gmail.com>
Change-Id: I9e2ec06719fbbfd19482c2b8d39220e7e4ed81e3
2019-02-24 15:29:59 -08:00
ZhaoBo
7a8eb3ce22 Add an option to the Octavia V2 listener API for client cert
Listener API for client cerificate authentication with "None,
Optional, Mandatory" options

Story: 2002165
Task: 20019
Co-Authored-By: Michael Johnson <johnsomor@gmail.com>
Change-Id: Ia753659981d99b315504f166c09afb8f5b14f195
2019-02-24 01:52:20 +00:00
ZhaoBo
0cc546a7c7 Add client_ca_tls_container_ref to listener API
This patch add 'client_ca_tls_container_ref' into listener API for front
client authentication.

Story: 2002165
Task: 20018
Co-Authored-By: Michael Johnson <johnsomor@gmail.com>
Change-Id: I8a96d6fdfe53a16d1abcfd09bc6afedd6c490de2
2019-02-24 01:51:35 +00:00
Michael Johnson
52ffdd16a6 Add amphora agent configuration update admin API
This patch adds a new admin API that updates an amphora's agent
configuration.

Change-Id: I41ce6843fb53fa21ab84e5b1d0734e70380d716a
2019-02-11 17:30:53 -08:00
Michael Johnson
1afeeb95d3 Add provider driver capabilities API
This patch adds an API that allows operators to query a provider driver
for the list of supported flavor capabilities.

Change-Id: Ia3d62acdc3b1af2e666f58d32a06d2238706dee6
2019-01-25 12:38:03 -08:00
Michael Johnson
15282ff9d6 Add flavors/flavor_profile api-ref
This patch adds the api-ref updates for the new flavors and flavor profile
API.

Change-Id: I11ab9af188731a1eaf1f402c4d55a944dc85ea88
2019-01-25 12:30:24 -08:00
Michael Johnson
fb0bbb9826 Update api-ref for tag filtering
This patch also updates the API version to 2.5 to represent the tags
support.

Change-Id: Ia57724c231c10efad9cee46be4969fa276fff8b1
Co-Authored-By: Lingxian Kong <anlin.kong@gmail.com>
2019-01-22 00:55:19 +00:00
Zuul
ee11927c9e Merge "fix typo mistakes" 2019-01-04 18:44:37 +00:00
Michael Johnson
66298f9a48 Add amphora statistics to the admin API
This patch adds an admin API for getting per-amphora statistics.

Change-Id: Ib57b2136dbb41067d6b8949ee42f946f109616e7
2018-12-20 22:28:51 -08:00
Yang JianFeng
ae8d6fb2de Add compute_flavor field for amphora api
Operators want to have the ability to see amphora flavor information.
But they haven't access permisson of octavia configuration file. So
it is necessary to show amphora flavor information as part of command
'openstack loadbalancer amphora list/show'.

Story: 2002896
Task: 22986

Change-Id: Ib3ca05d816747d08ef7055ec532b81746468cbf9
2018-12-18 19:48:56 +08:00
wangxiyuan
d62189366c Tags support for lb resources
Add tags support for all lb related resources. It includes:
load balancer, listener, member, pool, L7rule, L7policy
and health-monitor

Change-Id: Ib33a002b3b59820db29897454e9d4303c73310b2
Story: 2003890
Task: 26757
2018-12-17 07:58:04 +00:00
MaoyangLiu
04613ac171 fix typo mistakes
Change-Id: I3c5980782c029a33ed5dc5ce04dd709cf0c50fe0
2018-12-16 16:13:11 +08:00
Michael Johnson
759cb75960 Update docs conf.py for openstackdocstheme change
A Starlingx patch[1] changed the signature for some openstackdocstheme
methods which is causing Octavia docs to not build.

This patch updates the octavia docs configuration for the new
openstackdocstheme.

[1] https://review.openstack.org/#/c/607298

Change-Id: Id09ab3b78291c28e116f1f4ffb8836eac0537d94
2018-10-19 16:18:20 -07:00
Zuul
8e373c8053 Merge "Remove deprecated parameters" 2018-10-19 20:59:02 +00:00
Zuul
ed301d7fa2 Merge "Add API versioning to the api-ref" 2018-10-14 13:43:59 +00:00
Jacky Hu
6d21b33cdc Remove deprecated parameters
This is a follow up of I70e5cb07a4435f58f5da3999be70162efa7f0bd8, which
eliminated the usage of the parameters removed here.

Change-Id: I9c52aa6ef73482e2f2d83a6b228407790e18ca74
2018-10-11 09:25:41 +08:00
Michael Johnson
9aea3501d1 Add API versioning to the api-ref
This patch documents the new parameters added, by API version greater
than 2.0.

Change-Id: Ieb2c30653e832b9fa726f8430da603945fd10cc2
2018-10-10 16:24:36 -07:00
sapd
62192dba3a Support REDIRECT_PREFIX action for L7Policy
Currently, Octavia only support three actions for L7Policy,
in this patch we will implement new action for L7Policy.

Story: 2003700

Change-Id: Ie99591ede097b566294ebdb673c460442dd6d942
2018-09-28 18:10:39 +07:00
Michael Johnson
5022588164 Fix UDP release note for CentOS
This patch removes the comment about the UDP patch not working on CentOS
because we fixed the issues that were impacting CentOS based amphora.

It also corrects a typo in the api-ref where the protocol field was listed
as an "integer" type, where it should be "string".

Change-Id: I0857015f25de607ab8364b9e1d59a65f8b072c3c
2018-08-08 13:25:24 -07:00
Michael Johnson
cc97397d1c Followup patch for UDP support
1. Removes the misc_dynamic setting from the UDP-CONNECT health monitor
   as our script does not use it.
2. Adds a release note for the UDP features.
3. Updates the API reference for UDP support.
4. Adds a comment to the keepalived config with the LB ID.
5. Updates the status message type to be the correct UDP protocol.
6. Fix error during deleting a listener if there are multiple amphoraes.
7. Refactors systemd service script handling.

Story: 2003306
Task: 24258
Change-Id: I09240023d066ac5a71836d01045cda6ce5678712
2018-08-07 20:55:11 -07:00
Adam Harwell
bd0206a6ea Correct naming for quota resources
Story: 2002997
Task: 23013

Change-Id: Ie2f3944676f04e80b8dd4affe947b03d36d854f5
2018-07-25 21:54:54 -07:00
Zuul
92963f1899 Merge "Fix version discovery for the Octavia API" 2018-07-25 22:26:09 +00:00
Michael Johnson
87fca27e37 Fix version discovery for the Octavia API
This adds the required "links" part of the version discovery document.

Change-Id: I18e75116e1da47991d68b0842892f1036adec41a
Story: 2001796
Task: 12518
2018-07-08 14:19:04 -07:00
Rafal Pietrzak
d3f0a50014 Adding support for the octavia listener X-Forwarded-Proto header insertion.
Adding support for the octavia listener X-Forwarded-Proto header insertion.
  A X-Forwarded-Proto header is inserted into the end of request to the backend
  member. HTTP for the HTTP listener protocol type, HTTPS for
  the TERMINATED_HTTPS listener protocol type.

  Adding X-Forwarded-Proto to the list of HTTP headers which are supported.

  File: octavia/master/octavia/octavia/common/constants.py:
      SUPPORTED_HTTP_HEADERS = ['X-Forwarded-For',
                                'X-Forwarded-Port',
                                'X-Forwarded-Proto']

  Adding the lines to the macros.j2 realizing the the http/https insertion
  to the backend member according to listener protocol type:

  File:  octavia/common/jinja/haproxy/templates/macros.j2

    {% if listener.insert_headers.get('X-Forwarded-Proto',
                                          'False').lower() == 'true' %}
        {% if listener.protocol.lower() == constants.PROTOCOL_HTTP.lower() %}
    http-request set-header X-Forwarded-Proto http
        {% elif listener.protocol.lower() ==
                               constants.PROTOCOL_TERMINATED_HTTPS.lower() %}
    http-request set-header X-Forwarded-Proto https
        {% endif %}
    {% endif %}

Change-Id: Id017bb277eebae98f0441663e41d07b40b6e3e38
Story: 2002173
Task: 20038
2018-06-19 09:55:36 +02:00
Michael Johnson
6349976cde Implement provider drivers - Cleanup
This patch addresses the following:
Fixes some unit tests.
Cleans up some code from the parent patches,
Adds a release note for the provider driver support.
Adds the "List providers" API.
Adds a document listing the know provider drivers.
Adds a provider driver development guide.

Change-Id: I90dc39e5e9d7d5839913dc2dbf187d935ee2b8b5
Story: 1655768
Task: 5165
2018-06-04 19:34:42 -07:00
Adam Harwell
86da7a86a1 Correct flavor to flavor_id in LB API
This matches neutron-lbaas. This was never actually used, so changing it
should not be an issue hopefully.

Change-Id: If5dfcb291e7fa5c406ea99905f61673786823c8b
2018-04-20 23:55:04 +00:00
Michael Johnson
dda45f0cb8 Add pool session persistence validation
This patch adds validation to the pool session persistence options.
It validates the cookie_name specified and whether that option is valid
for the session persistence type specified.

Change-Id: I2f35a1a267bf2fc35bbb93a7f5390213ca20d1a8
Story: 2001818
Task: 12555
2018-04-11 12:00:48 -07:00
Adam Harwell
bb0447e98b Expose timeout options
Various timeout options need to be exposed to enable use-cases more
complex than standard HTTP requests.

In this patch we expose four new timeout values:
* timeout_client_data
* timeout_member_connect
* timeout_member_data
* timeout_tcp_inspect

Change-Id: Id4667201c1bfaa06f7af9060c936ba00c2f314f9
Story: 1457556
Task: 5453
2018-04-04 13:06:01 +09:00
Adam Harwell
e819e4521a Allow members to be set as "backup"
Setting a member as "backup" means no traffic will be sent to it unless
all non-backup members are marked as down.

This should be essentially the same in every backend provider AFAIU.

This was requested by at least one operator (me) and was agreed during
the PTG to add value.

Story: 2001777
Task: 12483
Change-Id: I953abe71a0988da78efc6b3961f7518c81c2a06d
2018-04-04 07:47:31 +09:00
Michael Johnson
aab5e6645f Update API-REF for x-forwarded-port is string
The API reference document had a typo where the "X-Forwarded-Port"
parameter for the HTTP header insertions was listed as an integer
instead of as a string. It also corrects "X-Forwarded-For" to be a
string. This patch corrects that mistake.

Change-Id: I3996d5e1950f8d979eb1c354dfac70a0ddefdca2
2018-04-02 02:23:30 +00:00
Adam Harwell
6ee20b272e Add image_id to amphora table
Story: 2001491
Task: 6215
Change-Id: I5ab6707591c856e43a0e0f49c84e1e721f01893c
2018-02-27 14:46:25 +00:00
Adam Harwell
2e7d9c6cd1 Add timestamps to amphora table
Change-Id: I3df39278eee2d2c6c31f93c8b651e6f74690a1b1
2018-02-27 14:41:02 +00:00
Michael Johnson
4120ad721f Fix missing test-requirement and cleanup docs
This patch adds oslo.serialization to the test-requirements.txt file as it is
used in some tests.
It also fixes the parameter ordering in the api-ref for the new qos parameters
on load balancers.

Change-Id: I0baf00457cb131a05b31ac83c03a7ed4a176160c
2018-02-10 14:48:31 -08:00
chengebj5238
66a7e6138f Repalce Chinese quotes to English quotes
Change-Id: Idcd0cdb57019a512f2d3eecdb7bc2b08a34af7e8
2018-02-05 18:39:02 +08:00
Zuul
fdc8d17ec5 Merge "Update api-ref for uuid type and fix tox" 2018-02-04 03:57:34 +00:00
Michael Johnson
711f6159c1 Update api-ref for uuid type and fix tox
The API reference documentation theme now supports the "uuid" type[1].
This patch updates the Octavia API reference to use the uuid type where
appropriate to clarify the type.

This patch also fixes the api-ref tox target for the new documentation
requirements.txt file.

[1] https://review.openstack.org/#/c/528597/

Change-Id: Ia7dfe2a26140fba0208531bd8e8e82163eb75347
2018-02-03 21:38:12 +00:00
Michael Johnson
ee00bfe50e Update docs config for storyboard bugs
This patch updates the docs configuration to have bugs links that take the
reporter to storyboad instead of launchpad.
It also sets the docs up for PDF rendering and multiple versions of the
documentation.

Change-Id: I66187e09e038efe605db45a26e3505218a7a4c65
2018-02-01 17:24:24 -08:00
Adam Harwell
8934a629df Switch to using PKCS12 for TLS Term certs
*NOT* deprecating the old way of storing these, as I believe that would
create a huge mess for anyone already using it.

Change-Id: I1fee174d8b8956f3d2053781a7f18c2940b21765
2018-01-23 07:17:14 +00:00
Adam Harwell
2ab55ebc91 Add api-ref for amphora failover
Change-Id: Ie55c54bc48eac966207430d84ec9b2707b058e28
2018-01-10 07:10:11 +00:00
ZhaoBo
51f6f7258b Extend api to accept qos_policy_id
This patch extend Octavia v2 API to access qos_policy_id from neutron.
Users can pass it as 'vip_qos_policy_id' to Octavia request body to
create/update Loadbalancers, and the vrrp ports will have the qos
abilities.

This patch modifies the Loadbalancer Post/Put request body and response
body. It also extends the 'vip' table with the new column named
'qos_policy_id' to store the qos_id from neutron.

Co-Authored-By: Reedip <reedip.banerjee@nectechnologies.in>

Change-Id: I43aba9d2ae816b1498d16da077936d6bdb62e30a
2017-12-20 09:23:16 +08:00
Bar RH
3ada33d4c7 Fix filtering in list API calls
The API's filtering arguments were not handled properly, and
therefore, some were consistently ignored.
This patch resolves this by translating the argument names to
the ORM data model's fields, and then validating them.

Additionally, enforcing of arguments validity is now the default
behavior. Should unrecognized filtering arguments be entered,
the API call will fail with code 400.

Task: 5844
Story: 2001224

Change-Id: I8f61880d6c11037d32b96e9827fb4e810dc219c2
2017-12-05 16:13:56 +02:00