Introduce TaskFlowServiceController which uses taskflow
jobboard feature and saves jobs info into persistence backend.
Jobboard could be operated via RedisTaskFlowDriver or
ZookeeperTaskFlowDriver, that could be set via the config.
RedisTaskFlowDriver is intoduced as default backend for jobboard.
Usage of jobboard allows to resume jobs in case of restart/stop
of Octavia controller services.
Persistence backend saves state of flow tasks that required in
case of resuming job. SQLAlchemy backend is used here.
Bump taskflow version to 3.7.1 and add dependency to
SQLAlchemy-Utils (required for taskflow sqlalchemy
backend support).
Story: 2005072
Task: 30806
Task: 30816
Task: 30817
Change-Id: I92ee4e879e98e4718d2e9aba56486341223a9157
Convert all code to not require six library and instead
use python 3.x logic.
Created one helper method in common.utils for binary
representation to limit code changes.
Change-Id: I2716ce93691d11100ee951a3a3f491329a4073f0
Eventually hacking will move to 2.0.0 (diskimage-builder
is holding it back), and when it does there will be a few
errors to fix. We can get ahead of it so it doesn't
break us with some small changes for these items:
F601 dictionary key $item repeated with different values
F632 use ==/!= to compare str, bytes, and int literals
E501 line too long
While doing this noticed the lower-constraints.txt for
hacking was set at 0.12.0, when test-requirements.txt
had it at 1.1.0, so fixed that as well.
Change-Id: I80d2a5f97e7a4896a8fa765c1971c8bb7e72d211
When filtering API calls using tags along with other filter parameters
the API could fail with an "Entity has no property" errors.
Also when filtering with tags that contain a comma separated list,
the API would mis-interpret the list of tags as a single string.
This patch resolves both of these issues and adds functional test
coverage for these use cases.
Change-Id: I7153ed9a6214ce352b2ac115001f7f6134d95b39
Story: 2006914
Task: 37559
This patch extends the listener API to include the new parameter
'allowed_cidrs'. This parameter is a list of IPv4 or IPv6 CIDRs. Leaving
this list unset defaults to the traditional behavior of allowing all
ingress traffic to the listener. Setting it will deny all traffic but
all CIDRs set in the 'allowed_cidrs' list.
Note that the API will validate that all CIDRs match the same IP version
of the VIP. This may change later as part of work to allow multiple VIPs
per LB (Change-Id Id7153dbf33b9616d7af685fcf13ad9a79793c06b).
Task: 26210
Story: 2003686
Change-Id: Id2b560df1cde9ce9403afbd593bbaa6cae5f06d6
In order to support Python 3.7, pylint has to be updated to 2.0.0
minimum. Newer versions of Pylint enforce additional checkers which can
be addressed with some code refactoring rather than silently ignoring
them in pylintrc; except useless-object-inheritance which is required to
be silented so that we stay compatible with Python 2.x.
Story: 2004073
Task: 27434
Change-Id: I52301d763797d619f195bd8a1c32bc47f1e68420
This patch changes the to_dict function for the API obj, if the user
pass null into admin_state_up to request. We treat it as False.
Depends-On: https://review.openstack.org/#/c/583413/
Story: 2002927
Task: 22914
Change-Id: Iab79b422983f6b2124837fd9ebe60a85b0516f41
To be 100% backwards compatible with neutron-lbaas, we need to continue
to return tenant_id in addition to project_id, even though it has been
deprecated and was actually removed previously from Octavia.
Adding it this way is much cleaner than adding it to every object and
will allow us to remove it very easily in the future.
Change-Id: I371a5bd51fc9acc4f6ef1e2b3b2fae9d4babd975
This also fix build-openstack-sphinx-docs, there was a change introduced
in sphinx 1.6.6:
https://github.com/sphinx-doc/sphinx/pull/4335/files
If the size of __init__.py is less than 2, then the module would be
skipped which will cause the sphinx consistency checking failing later.
Change-Id: I9d8764b6e907aceed8bb8a9b04711145d0eb32ad
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
Administrators can now use /v2.0/octavia/amphorae to retrieve internal
information about amphora details like compute_id and lb_network_ip.
Change-Id: I5ac8d1ce189db09d52e518d42aeb3a192b8a8814
Also, create a section for API settings `api_settings` and move some
related settings there.
This patch also enables the configuration settings to be logged
when the api process is started if debug is True.
Change-Id: I31671789d186c4b8a775cc12a414acd2d439512d
This patch implements API filtering based off of
query parameters passed to the Octavia API. Additonally
this patch implements field selection for the Octavia
API.
Change-Id: I9fe26abe37f464d9c028b8c476485007143d3b5c
Use glance sorting and pagination from inside the SQLAlchemy query
to handle the sorting and pagination for octavia.
Change-Id: I5489c5c89691b8871e32caf3f85ab1978bc3618c
Co-Authored-By: Adam Harwell <flux.adam@gmail.com>
Co-Authored-By: Lubosz "diltram" Kosnik <lubosz.kosnik@intel.com>
Closes-Bug: #1596628
Closes-Bug: #1596625
Still need to fix the entry-points for each individual type, but that
wasn't even in the original spec. Not sure if we even want that.
I think this may not do things EXACTLY how the old one did it, we'll
need to look into whether it matters, as we never published docs for it
and I don't think it ever actually worked properly in neutron-lbaas.
Also closing a few bugs that are only peripherally related, because we
(possibly me) forgot to tag them on the individual CRs, but I'm
considering them closed as of this patch. See below for my reasoning on
each individual bug, and feel free to post counter-arguments.
For #1673546 (single-call create): This is the obvious one!
For #1673499 (lb return pool object): Rolled into this patch as a matter
of course, abandoned the original fix as it is no longer relevant.
For #1544214 (root tags): All existing resources now have root tags. Any
new ones will also need root tags, but I would consider this bug closed.
For #1596636 (tenant facing API): Every object is now creatable via the
v2 API, so I would consider this to be complete. Quotas and some
additional work is being finished, but it's not necessary for this IMO.
For #1665446 (hm id): This was resolved in the HM patch, I just forgot
to close it, and including it here will ensure it is release-tracked.
For #1685789 (listener quota): Just shoving it in here as I do the
single-create quotas.
For #1685827 (hm quota): Same as listener quota.
Closes-Bug: #1673546
Closes-Bug: #1673499
Closes-Bug: #1544214
Closes-Bug: #1596636
Closes-Bug: #1665446
Closes-Bug: #1685789
Closes-Bug: #1685827
Depends-On: I3d86482a2999197a60a81d42afc5ef7a6e71e313
Change-Id: I4ff03593e1cfd8dca00a13c0550d6cf95b93d746
GET all - /v2.0/lbaas/healthmonitors
GET one - /v2.0/lbaas/healthmonitors/<hm_id>
POST - /v2.0/lbaas/healthmonitors {<body>}
PUT - /v2.0/lbaas/healthmonitors<hm_id> {<body>}
DELETE - /v2.0/lbaas/healthmonitors/<hm_id>
Co-Authored-By: Sindhu Devale <sindhu.devale@intel.com>
Co-Authored-By: Adam Harwell <flux.adam@gmail.com>
Co-Authored-By: Reedip Banerjee <reedip14@gmail.com>
Partial-Bug: #1616643
Change-Id: I7f65bb9370530ae3b533b927fcdabc6c1a295231
This patch moves hooks present in octavia/api/v1/hooks.py and
octavia/api/v2/hooks.py to octavia/api/common/hooks.py since they
both are the same.
Change-Id: I3388d9020f19cb4e392cd3053ceed97d97162027
Since v1 and v2 types will share similar code, it makes sense for there
to be a base type for all types. This also creates the types packages
under the v2 api package.
This also adds logic to allow for the renaming of fields from types to
data models. For example: if the API accepts the field "admin_state_up"
but the data layer knows it as "enabled", then the type can define the
field "admin_state_up" and also define a mapping that says
"admin_state_up" will be mapped to "enabled" for data model
transformations.
Change-Id: I171e394daeb58ec90e9f531c91301c3dfd48dbb7