This patch fixes a bug where adding an additional pool to designate using the "designate-manage pool update" command may fail with an exception:
designate.exceptions.MissingProjectID: A project ID must be specified when not using a project scoped token.
There was an extra check added as part of the scoped token work that a project ID must be provided when creating pools. This was incorrect as pools are still valid with a None project ID as they are a system resource and not tied to a specific project.
This patch removes that check, but retains the RBAC check for and "admin" token.
Closes-Bug: #1986733
Change-Id: I7345d7ef505420767209ba037e3c8930a282d03f
If invalid MX record is provided during recordset create command or
valid record is updated to invalid record using recordset set command,
causes recordset creation/updation failure. This leads to zone enter
in ERROR state and all further recordset creation calls fail. Validate
the records within recordset during create or update call.
Closes-Bug: #1927304
Change-Id: I0ace4d6c4ad6a6ee236e3af23805b01345d60a42
These tests have no dependencies on the Designate Test class
and by moving to the oslo test base class instead we reduce the
runtime of these tests from ~5s to ~150ms.
- Added some basic tests for the fake backend (aka noop)
- Switched from designate.tests.TestCase to oslotest.base.BaseTestCase
Change-Id: I5d78939eb43476e6c93235e131086bc8537b0e03
The current rootwrap.conf file is outdated and doesn't include some
parameters. This change updates the content to make it consistent with
the latest example file in oslo.rootwrap.
Change-Id: I5fe06cf99bb9787ec3afc67ab60a7330fe281513
We are currently override __repr__ in our base VersionedObject
and removing some useful information when debugging.
- Re-wrote __str__ to not raise an exception if data is missing.
- Removed some unused _to_string functions.
- Changed _from_string to from_string.
Change-Id: Idfd6c959cf943c5aaf95746f16070000bf82ca21
Currently Designate is using sqlalchemy-migrate for database schema
migrations. sqlalchemy-migrate/migrate have been deprecated for some
time. This patch moves switches Designate to use Alembic for database
migrations.
Change-Id: I90ecb4d409b8b609b384997fa4cc9c65755409b3
This patch removes the 'netaddr' module from the Designate requirements list.
It replaces the use of netaddr in Designate with the python standard library 'ipaddress' module.
Change-Id: I2fb1549e1d6cbccf58c03810c7d74c8c378682d5
This patch adds a user guide that describes how to use the Neutron/Nova integration with Designate. It provides examples for Nova instance, Neutron ports and floating IPs.
Previously this information was split across Nova, Neutron, and Designate documentation.
This patch also adds a "references" section to the documentation and adds a glossary document to help explain some of our terms.
Change-Id: I2bcf4b7052e12801b95dd3a541d1e8535c82c17c
This patch updates Designate to use the new method of getting the table names from a sqlalchemy engine. It replaces the use of tables_names() with get_table_names from the sqlalchemy inspector.
The DeprecationWarning was:
SADeprecationWarning: The Engine.table_names() method is deprecated and will be removed in a future release. Please refer to Inspector.get_table_names(). (deprecated since: 1.4)
self.assertEqual(table_names, self.storage.engine.table_names())
Change-Id: I99d01a552d24123681e11f746c2e1195634efbfd
This patch updates Designate for the new funtion signature on pecan
lookup_controller to include the request information if available.
This corrects the following warning we were seeing in Designate:
DeprecationWarning: The function signature for pecan.routing.lookup_controller is changing in the next version of pecan.
Please update to: `lookup_controller(self, obj, remainder, request)`.
Change-Id: Icb206e59c83eec984599d48b3d4719c36eb83734
This patch adds the "cache_ok = True" to the custom sqlalchemy UUID type in designate.
It resolves the warning:
designate/sqlalchemy/base.py:243: SAWarning: TypeDecorator UUID() will not produce a cache key because the ``cache_ok`` attribute is not set to True. This can have significant performance implications including some performance degradations in comparison to prior SQLAlchemy versions. Set this attribute to True if this type object's state is safe to use in a cache key, or False to disable this warning. (Background on this error at: https://sqlalche.me/e/14/cprf)
Change-Id: Ic3aca3836b331db495109f6b6672e5c8af1d4028
We are currently raising the wrong exceptions for a few record
types. This can cause only part of the failures to get raised
to the user, since the first exception will fail the process.
Ideally we want to inform the user of all invalid records.
This patch fixes this and cleans up some of code as well.
- Cleaned up objects to use consistent exceptions.
- Fixed all broken tests.
- Re-named various objects tests.
Change-Id: I3d54a47f73929377122249c4d971e70e553725a6
Currently, designate does not validate that if a TXT recordset starts
with a double quote, it also ends with a double quote. So, if user has
provided TXT record in this unmatched doublequote format, zone ends up
in error.
This change verifies that if a TXT record starts with a double quote,
it also ends with a double quote.
Closes-Bug: 1980757
Change-Id: I75bd7c1657a9178c8e7ef2d66fa7318255c67582
- Added additional dns tests.
- Split unit and functional tests into separate files.
- Cleaned up duplicate dns message functions.
- Updated dns function comments and naming.
Change-Id: I913dab094d5c86736a030848ce1bba29736ff835
According to IETF https://tools.ietf.org/html/rfc2181#section-8 the
definition of the ttl value is unsigned and can have a minimum
value of 0. This path changes the minimum value of 1 to allow for
0 in recordset creats and updates. Unit test have also been modified
accordingly.
Closes-Bug: #1926429
Change-Id: I9b08e25a007bea598442da377dc227538f6e35f7
Adds simple API versioning for Designate. Designate API minor releases are
additive to the API major revision and share the same URL path. Subsequent
minor versions are a superset of the previous versions of the same major
revision.
Updates the version discovery document to be compliant with OpenStack
version discovery.
Restructures the API reference to provide more information about the
versioning.
Depends-On: https://review.opendev.org/c/openstack/designate-tempest-plugin/+/848323
Change-Id: I13162711b521472ec8b796ced34d0b7107aaed36