Various test cases for validating total_ips_per_port quota
have been added. These test cases are for public, service
and isolated networks, using both an admin and a non admin
context.
Change-Id: I65b91bdd545c5855bec045f180a506d97bd9693e
Closes-Bug: #1747419
Flake8 errors, if present, do not show up if run_tests.sh is used. It is
used by Jenkins on creation of a pull request, upon which the tests fail
without flake8 specific information showing up in the log.
Adding PYTHONUNBUFFERED=1 before the flake8 command in run_tests.sh solves
this problem.
Change-Id: I040873b859cca7c0500bd7d600d8de6121cc70a5
Closes-Bug: #1747420
Introduced a check in security_groups.py which calls delete_vif
(which in turn hits redis) only if security_groups is present
in the kwargs passed to the delete_port function.
Introduced changes in test_unmanaged_driver.py which change
test_delete_port by explicitly passing a security_group kwarg &
test_delete_port_redis_is_dead by asserting that delete_vif
isn't called as there is no security_group kwarg. Added a new
test case test_delete_port_no_security_group that verifies that
delete_vif isn't called if no security_group kwarg (or an empty
list) is passed.
Change-Id: I00648f6d490e883175d6592ae64e8c742d35a035
Closes-Bug: #1747417
The idea was to reuse the existing exception handling decorator
in quark/utils.py to use the same decorator to handle exceptions
in internal methods. The enhanced decorator accepts an arguement
to specify if we are handling exceptions in an internal method.
Existing exception handling for api methods do not change.
This commit adds the enhanced wrapper and relevant unit tests, in
addition to adding the wrapper to internal calls in ports.py
Change-Id: I2aa2e3bdd06ff8f839f65e462b885c34b024c157
Implements: blueprint enhance-exc-wrapper
When quark tries to delete an onmetal port that no longer
exists downstream, it should happily ignore the 404 and
move on.Instead, it complains and retries before eventually
giving up. This is due to not catching the correctexception
from the neutron client.This doesn't present as a 500 to
any clients, as the exception is caught and ignored,
but it gums up the logs and wastes time making requests
multiple times.
Implements: Exception handling
Closes-Bug: #1738277
Change-Id: I4ccd9be891e6c533ceb68427d47ed658bf27f4a8
The dispose method call against neutron.db.api has been removed in this
iteration of neutron (Ocata). Removing this call as it may not have ever
been needed based on the accompanying comment on that line.
Change-Id: I3d8c5d50650abda8064eb860118ae2e40d3662a5
Closes-Bug: 1714536
These updates to redis_base allow quark-agent to check for a potential
race condition that can occur from the time quark-agent acknowledges a
security group rule set needs to be updated and when it acknowledges
that rule set has actually been applied. quark-agent will now store
security group rules before and after it has executed scripts on the
hypervisor. If the rule sets do not match, that means an update has
occurred while the hypervisor scripts were executing. quark-agent will
not ack those changes and allows the next cycle to pick them up.
Change-Id: Ieae13f7b22b8e463cba2ccce82fb94699838926a
Closes-Bug: 1713860
Adding additional parameters to gunicorn access log format. This
provides additional information for metrics investigations as well as
for troubleshooting.
JIRA:NCP-2148
Change-Id: Ieb9c4a75cf3c11c9addbb3f7ca3038d47bc657a0
Upstream moved ExtensionDescriptor into neutron-lib as well as some
functionality revolved around retrieving the plugin from NeutronManager.
This refactor moves libraries around in order to align quark with
upstream neutron's expectations.
JIRA:NCP2115
Change-Id: Ie922d7778d370491166a00952bec7cea7f7b5a84
Deprecation warnings indicated that model_base and NeutronBaseV2 had
moved to neutron_lib.db.model_base. Fixed imports to prevent future
packaging issues.
JIRA:NCP-2107
Change-Id: Ie0fb0e35eb85939662c1cc6682d109cfcd62caab
Some libraries were moved from neutron.api.v2 to neutron_lib in various
locations. The old imports were removed where not needed and new
neutron_lib libraries were added.
JIRA:NCP-2107
Change-Id: Ie7daa4f7a679322e0dc5cd473e1bd26c3b8ba41b
No static path is required as we don't have anything to move
from a static directory. This will ensure the gate tests pass.
Also, moved docs to doc as gate failure isn't looking at docs
folder, and updated tox environment run.
Change-Id: I2d6d7e42eafef8e052006a4938e7950279f2f60c
Closes-Bug: #1628113
Migrate neutron.db.sqlalchemyutils.paginate_query to
oslo_db.sqlalchemy.utils.paginate_query. All calls to
to paginate_query now require a sort key, so tests and
defaults had to be updated which trickle down to
paginate_query in quark/db/api.py .
JIRA:NCP-2067
Change-Id: I9133c5d8e128e62fbf4e23004315a3bb55891db6
Refactor nested statements for multiple context managers to
remove deprecation warnings. Additionally, refactor imports
to use current exception libraries.
JIRA:NCP-2066
Change-Id: Ie3953d109c13d03bf5028d54dc3f53d8d3649315
Deprecation warnings began popping up in tox tests. We needed
to import the _ function from neutron._i18n . We can no longer use
the built in _ function.
ATTR_NOT_SPECIFIED was moved from neutron.api.v2 to
neutron_lib.constants . Changed imports to resolve
the deprecation warning.
JIRA:NCP-2058
Change-Id: I78d66de235d827ab8eeb53e4c48f38c233b73d10
JIRA:NCP-1172
Fixed redis-base to use configurable min_sentinels
Must enable environment variable for this to work
SG Update workflow:
- PUT to /security-groups
- Parent task is made and sent to producer RPC
- Creates the task id and then returns it to the main call
- Then starts making sub tasks for each port associated with the SG
- Each sub task will perform the required redis calls and update
its provided subtask to completed (or error)
- Returns normal SG body + task information
Updated the workflow to use the rule_id as the resource_id for the TX
Transactions now autocomplete after updating their subtransactions
Conflicts:
quark/db/migration/alembic/versions/HEAD
Change-Id: I44545f2edb410d19e3156ee934dca283857c10d9
Give users with admin context the ability to reserve a deallocated
ip address. Also, give users with admin context the ability to get
information about IP addresses that have been deallocated.
JIRA:NCP-1884
Change-Id: I75358a1fd3b10af293a496d662020cc94b227ec4
Currently, POST to ports can specify a driver (ex. - ironic)
that would attempt to access resources that do not exist in
that region. Adding ability to enable/disable drivers by region
using neutron.conf
Change-Id: Id9fc1bcf2daba14d970b500165544256f373bdbb
JIRA:NCP-1810
In the unmanaged driver, create port will fail with a KeyError
if a network_id is used that isn't configured properly in
neutron.conf (ie - bridge isn't defined). Added checks and
meaningful error for users.
Change-Id: Ief9c2371100063ff679858abc5fdf7cc24ec9dda
Closes-Bug: #1611440
JIRA:NCP-2012
Many deprecations are triggered early (on imports, for example)
before the warnings are enabled by the WarningsFixture in the
base test class.
To make sure all DeprecationWarning messages are emitted we enable
them via the PYTHONWARNINGS environment variable.
Change-Id: Ica6397a04efdb089b2ae631906886b3ac44862f5
JIRA:NCP-2032
Uses project_id for tenant_id column now and will 'alias' the lookups
appropriately.
Change-Id: I3e3cdd69b8fefaa1336344aedbfd8f30d42193b7
Move requirement for neutron to test-requirements as this is for
tox testing. PIP installations are failing due to this.
Change-Id: I54f218ec6d522296def62522d416518534659109
Silenced a few more warnings from UTs.
Many subnet create_ and update_ methods add new objects to the session.
Unit tests, however, mock those methods frequently.
Hence, the objects are not added to the session, which results in multiple warnings.
Since, we test the logic and don't care about the actual data written to
a database, we can also mock the session commit method to avoid warnings.
Change-Id: I6c129e801f25876b03e28c863328d3ad391034ad
Closes-Bug: #1604970
JIRA:NCP-1835
This patch fixes some dangling whitespace and an indention problem
around the removal of the six module.
Change-Id: Iae56c3ca1ea7e1eccacff2695ab5a288469faae8
Docker images set in place with working build packages. This is
the last iteration of these images.
Change-Id: I29b44e03e9e7835ecd900187559ef8219561f0b9
A warning similar to this is issued during the quark's test suite run:
quark/.tox/py27/local/lib/python2.7/site-packages/alembic/util/messaging.py:69:
UserWarning: Skipping unsupported ALTER for creation of implicit
constraint
The fix is to re-implement column add/drop using batch ops.
Change-Id: I2b00da332254a42d20d2bf34a59cef03e50ef133
Closes-Bug: #1603586
JIRA:NCP-1835
* do not notify of ip address create/delete events when create failed
* fixed double notify for ipv6 addresses
* fixed timestamps to always set microseconds to 0 to conform to Yagi
* added rollback detection to CommandManager
* added CommandManager UT
Change-Id: Ied17d344b5b5773907495f4b34bf1cd3e1e89b8e
JIRA:NCP-2002
Closes-Bug: #1602708