Commit Graph

2287 Commits

Author SHA1 Message Date
Zuul 57b8d26e30 Merge "Fix missing oslo.log options in migration tool" 2024-06-05 14:11:02 +00:00
Zuul e7b472e6bf Merge "Add py312 job to periodic based on testing runtime for 2024.2" 2024-05-30 16:36:04 +00:00
Zuul 8b47f3b03f Merge "create default security group using an independent context" 2024-05-30 09:40:08 +00:00
Takashi Kajinami 623d66cb08 Fix missing oslo.log options in migration tool
The migration tool does not register the oslo.log options so fails to
set up its logger. Ensure that the options are loaded before
setup_logging call to fix it.

Closes-Bug: #2067557
Change-Id: I902f49f4efa0da80021c2eda4b7fcb63cc1310b0
2024-05-30 04:04:18 +00:00
frickler.admin 8179ba7eaf Merge "Remove devstack-gate requirement" 2024-05-29 11:37:54 +00:00
Brian Haley 0694a7a391 Remove devstack-gate requirement
devstack-gate has been retired, remove it from the
'required-projects' section of job definitions.

Change-Id: Ic8131b825066bcc5297152924d7c43c245a06045
2024-05-28 23:37:48 -04:00
Takashi Kajinami 0cedfc4eb9 Fix migration script to adopt to SQLAlclehym 2.0
* subtransactions was removed in SQLAlchemy 2.0[1].
* autocommit was removed from SQLAlchemy 2.0 and oslo.db no longer
  supports it since 12.1.0 .

[1] https://docs.sqlalchemy.org/en/20/changelog/migration_20.html#migration-to-2-0-step-five-use-the-future-flag-on-session

Change-Id: Ife9dd679a3956633785300fcec2c82231ef5e748
2024-05-29 10:09:30 +09:00
Zuul 1567e1ec1c Merge "Add pre-commit configuration" 2024-05-27 15:06:38 +00:00
elajkat 453cbdf9d6 Add py312 job to periodic based on testing runtime for 2024.2
Based on [0] & [1] add py312 job to periodic weekly.

[0] https://review.opendev.org/c/openstack/governance/+/908862
[1] https://governance.openstack.org/tc/reference/runtimes/2024.2.html

Change-Id: I88c8c0f3168b18440c18c7092610694354946d98
2024-05-24 07:38:45 +00:00
Zuul 947680df47 Merge "Add pyproject.toml to support pip 23.1" 2024-05-21 16:05:51 +00:00
zhouhenglc e578839fca create default security group using an independent context
The current method of creating a default security group may be under
an upper level context. If there is an exception of creating a
duplicate primary key for the default security group, it will cause
the context to need to be rolled back, but not rolled back, which
will affect subsequent database operations.

Through the submission of patch8, a default security group was
created every time. Upon reviewing the [1] log "Default FWG
was concurrently created", it was determined that duplicate primary keys
were actually triggered and the issue(#2061883) was fixed.

Closes-Bug: #2061883

[1] https://storage.bhs.cloud.ovh.net/v1/AUTH_dcaab5e32b234d56b626f72581e3644c/zuul_opendev_logs_94a/916968/8/check/neutron-tempest-plugin-fwaas/94a09c8/controller/logs/screen-q-svc.txt

Change-Id: Ib2e412ed5e5d4c4fcb4f0abe71d4750fb78bce27
2024-05-21 12:07:01 +00:00
Takashi Kajinami 5f746b474c do not use str(url) to stringify a URL for subsequent use
The str(url) function in SQLAlchemy hides the password.
For a URL string that is to be re-used, use
render_as_string(hide_password=False).

Co-Authored-By: Mike Bayer <mike_mp@zzzcomputing.com>
Change-Id: I00e8bab328b3969c503d682fac6d3f3f811d9c68
2024-05-17 00:02:41 +09:00
Slawek Kaplonski cb517af73d Add pre-commit configuration
'pre-commit' tool [1] provides an extensible way to configure hooks
which can be run automatically before each commit. That way we can make
sure that code send to review is passing base static analysis checks
like e.g. bandit, flake8 or hacking.

For now this is optional to use and not integrated in e.g. tox.ini file
but we can integrate it there too as next step.

[1] https://pre-commit.com/

Change-Id: I781f46a4b3a3df9dd4a3345e569cede0bb5dd955
2024-05-06 10:21:11 +02:00
OpenStack Release Bot 7fd8e38895 reno: Update master for unmaintained/zed
Update the zed release notes configuration to build from
unmaintained/zed.

Change-Id: Ib5f089ab620ef5d5bfca9eeae9bb02cafc991c1b
2024-04-30 08:53:01 +00:00
elajkat 90a0072f37 Add pyproject.toml to support pip 23.1
For details see the below mail thread:
https://lists.openstack.org/archives/list/openstack-discuss@lists.openstack.org/thread/HVFN5RBSHRTM3B2UUKPAWKH6H6AT6CYR/

and the commit message of the keystone patch:
https://review.opendev.org/c/899519

Change-Id: I005a91c15182008a40dca0e2963ca50ed4ee896b
2024-04-19 14:07:47 +02:00
Zuul 553b23e9aa Merge "Remove translation sections from setup.cfg" 2024-04-05 23:44:18 +00:00
Zuul 69e4ee16f2 Merge "disable nonstandard-exception" 2024-04-05 15:04:41 +00:00
OpenStack Release Bot 64d7cd2d60 Update master for stable/2024.1
Add file to the reno documentation build to show release notes for
stable/2024.1.

Use pbr instruction to increment the minor version number
automatically so that master versions are higher than the versions on
stable/2024.1.

Sem-Ver: feature
Change-Id: If74eaf7f7d10994ec91e2ec676bb6eb4b2f484a6
2024-03-14 06:17:57 +00:00
Zuul 293df0f63f Merge "tox: Drop envdir" 2024-02-13 19:30:59 +00:00
elajkat 625b6526ca Bump hacking
hacking 3.0.x is too old.
Try to synchronize pylint ignore and extension list with
other Networking projects.

With new pip the order of packages is not relevant, so the
related comment from requirements.txts is removed, see pip
documentation:
https://pip.pypa.io/en/stable/cli/pip_install/#installation-order

Change-Id: I99a2d30149088d3d71d56351d180e665c38686ef
2024-02-09 09:58:16 +00:00
elajkat fef2d9ee78 tox: Drop envdir
tox now always recreates an env although the env is shared using envdir
options.
~~~
$ tox -e genpolicy
genpolicy: recreate env because env type changed from
{'name': 'genconfig', 'type': 'VirtualEnvRunner'} to
{'name': 'genpolicy', 'type': 'VirtualEnvRunner'}
~~~

According to the maintainer of tox, this functionality is not intended
to be supported.
https://github.com/tox-dev/tox/issues/425#issuecomment-1011944293

Change-Id: I069f590d873ea7a0e689936664c07843c2706fd5
2024-02-06 11:46:56 +01:00
Takashi Kajinami 8549c88e8c Remove translation sections from setup.cfg
These translation sections are not needed anymore, Babel can generate
translation files without them.

Change-Id: I7eb99b96ea1e9a1a96e28c53760d9d747670d6e4
2024-01-20 18:52:11 +09:00
elajkat 3fe92291f2 Update python classifier with py3.10 & py3.11 in setup.cfg
Change-Id: I6b9cc03d902e36f51b31ad2e39ae13a7acbb1b62
2024-01-11 13:22:37 +01:00
zhouhenglc b610592e42 disable nonstandard-exception
Now we use neutron-lib as the standard exceptions.

Change-Id: Ie7dac7968626fe3ce775dfd0444d082d90cf5e71
2024-01-10 13:00:18 +00:00
Takashi Kajinami 75228edb41 Remove usage of LBaaS constants
This removed usage of LBaaS constants from unit tests. LBaaS was
retired some time ago and these constants will be removed.

Change-Id: I2951c866cdfbd88bcba9fb8d299f592cd6a44dff
2023-11-30 11:01:52 +09:00
elajkat 9c6df04c78 py311: Add py311 job and sqlalchemy-main job to weekly
As an extra rename dsvm-fullstack to dsvm-fullstack-gate

Change-Id: Ib9627a46f95dec0727ccba1d819b84f6ef00041a
2023-10-13 16:44:24 +00:00
Rodolfo Alonso Hernandez cfa0b34476 [sqlalchemy-20] Replace the context writer/reader
This patch replaces the old DB contexts and removes the subtransactions.

Change-Id: I9ac48eeba9f7d5d01153edb4b2f3341008ac2e01
2023-10-16 09:17:29 +00:00
Rodolfo Alonso Hernandez a4284e4ee6 Remove the "sitepackages" in the extra arguments
This option is not needed since [1], Also set
tempest_plugins var to setup neutron-tempest-plugin
in tempest venv.

[1] https://review.opendev.org/c/openstack/devstack/+/558930

Change-Id: I595f81ac10443b6484b8b0bc0a12b5b58e75044f
2023-10-16 11:17:56 +05:30
OpenStack Release Bot 960530916d Update master for stable/2023.2
Add file to the reno documentation build to show release notes for
stable/2023.2.

Use pbr instruction to increment the minor version number
automatically so that master versions are higher than the versions on
stable/2023.2.

Sem-Ver: feature
Change-Id: I5f7c8b7b019852558289e94dd18d4867b033b3cb
2023-09-15 13:55:02 +00:00
Zuul 3fcf1b8246 Merge "Firewall group associated with ports is not allowed to be deleted" 2023-09-12 14:20:58 +00:00
Xing Zhang 193d1e2766
Use unittest.mock instead of mock
The mock third party library was needed for mock support in py2
runtimes. Since we now only support py38 and later, we can use the
standard lib unittest.mock module instead.

Change-Id: I009b6e65424ba3b662949baa1226fbf0ff14af80
2023-06-27 11:15:24 +08:00
Zuul a3efd32a86 Merge "[alembic] Alembic operations require keywords only arguments" 2023-06-02 18:49:44 +00:00
Zuul 768937b0d7 Merge "Remove Exception Definition in fwaas_v2 Extension" 2023-06-01 11:07:08 +00:00
Zuul 52539bc578 Merge "notify the plugin only on status updated" 2023-06-01 11:05:00 +00:00
Rodolfo Alonso Hernandez 925b31f6fc [alembic] Alembic operations require keywords only arguments
Since [1] (release 1.11.0), the Alembic operations "now enforce
keyword-only arguments as passed as keyword and not positionally"
(from the commit message).

This change is compatible with the previous versions (as confirmed
in the CI).

[1]df75e85489

Closes-Bug: #2019948
Change-Id: Iedf9a47a80a2775f73e7873ce3e55c4152d0f564
2023-06-01 10:05:56 +00:00
zhouhenglc 72ad4f96db notify the plugin only on status updated
If the status of the firewall group is consistent with the status
to be updated, there is no need to notify the plugin to update the
status.
The processing of the agent requires a certain amount of time. If
firewall group is updated during this period, updating the firewall
group status at this time may cause the firewall group to be in an
incorrect state.

Partial-Bug: #2021457

Change-Id: I316827259367d78d7dbb57888ad41408d44c43f6
2023-05-29 16:14:15 +08:00
zhouhenglc 5b56eaf3b0 Firewall group associated with ports is not allowed to be deleted
Currently, we determine that the firewall group is in use based on
its ACTIVE status. But the firewall group may have just updated
the port and is currently PENDING_UPDATE status, deletion should
not be allowed at this time.
This patch changes the judgment method for deleting firewall
groups, no longer based on their status. But like other neutron
resources, based on whether or not they are associated.

Closes-Bug: #2018967
Depends-On: https://review.opendev.org/c/openstack/neutron-tempest-plugin/+/883826

Change-Id: Ib7ab0daf9f6de45125ffc9408f865fc0964ff339
2023-05-29 16:04:32 +08:00
zhouhenglc 85c2966903 Remove Exception Definition in fwaas_v2 Extension
These exception definitions are already in neutral-lib.
And it has already been directly referenced in neutron lib
in the code.

Change-Id: I9f0d5efc3d86bdab97a188ea880780b19e2a7e43
2023-05-26 10:47:06 +08:00
liushy 3b4e1bdda1 Support standard_attrs for fwaas resources
Now, this patch will support standard_attrs for
firewall_group/firewall_rule/firewall_policy.

Closes-Bug: #1986906
Change-Id: Ib7b06d604a0950a104215bcf4386e14b77d20d12
2023-05-24 16:24:14 +00:00
Rodolfo Alonso Hernandez e479c1a1d6 Fix issues due to recent RBAC changes
Neutron recently merged a commit enabling secure rbacs by default
[1], breaking several unit tests of networking-fwaas.
This patch changes the necessary test calls to be admin and
requires neutron >= 23.0.0.0b2.

[1]670cc383e0

Related-Bug: #2019097
Change-Id: I60ad379f9fc94919581f461fd6a731cfe4baba30
2023-05-23 05:37:56 +02:00
Nurmatov Mamatisa 70d3174f8c Use neutron-lib policy rules
Change-Id: Iac29a8dd4888eaaf5ff833d840953a5b92bd56e8
2023-03-09 11:38:53 +03:00
OpenStack Release Bot bc64e84851 Update master for stable/2023.1
Add file to the reno documentation build to show release notes for
stable/2023.1.

Use pbr instruction to increment the minor version number
automatically so that master versions are higher than the versions on
stable/2023.1.

Sem-Ver: feature
Change-Id: I63a4a2131a6d569a120346dc20e8a413cdae93f4
2023-03-01 09:33:31 +00:00
Zuul 230e9bf38c Merge "Use upper-constraints in docs job" 2023-02-28 00:25:47 +00:00
elajkat 9aef6c4e03 [sqlalchemy-20] The Connection.connect() method is considered legacy
Change-Id: I5eaf60426e10c15ac16800ce1962d6690ff80f92
Related-Bug: #2008227
2023-02-24 17:02:17 +01:00
Zuul c5882990f6 Merge "Make tempest-multinode job voting" 2023-02-17 02:25:52 +00:00
yatinkarel f23379938e Use upper-constraints in docs job
Since we use usedevelop=True, as a result neutron-fwaas
installation happens at 'develop-inst' phase and it installs
requirements from requirements.txt without considering
tox constraints, This can lead to issue where broken
requirements are installed in docs job and as a result
it will fail.

In order to get constraints be considered for this case, add
requirements.txt to deps for docs env(same as [1]).

[1 https://review.opendev.org/q/Ic8f6472fe708d12f8fc129729465367083e1095a

Change-Id: Iea9556f6f025ad2f3dfa38fd401aa64414bd561f
2023-02-16 13:51:11 +05:30
Zuul a88c4922c9 Merge "Add CONTEXT_WRITER to _get_default_fwg_id" 2023-02-16 00:41:02 +00:00
Zuul e18ff58141 Merge "Remove the convert_to functionality" 2023-02-15 12:07:11 +00:00
elajkat 054275813e Add CONTEXT_WRITER to _get_default_fwg_id
Change-Id: I8cc90dc564e9d4fb5637216619ea972bf9a4c417
Closes-Bug: #2006683
2023-02-15 11:52:41 +01:00
zhouhenglc 9ea7f54163 Make tempest-multinode job voting
Change-Id: I7a7f644ddea3794290b27a99419a470a0af0be73
2023-02-15 09:58:05 +08:00