- Moved all functional tests to dedicated folder.
- Updated a few tests to use faster oslo tests.
- Renamed fixtures.py to base_fixtures.py.
Change-Id: Ie8c5591dd12a91350173bec2b418b6c9ddea79fe
The new API would be v2/zones/<zone_id>/tasks/move
Only POST would be allowed on this API.
This move zone from existing pool and add it in new pool. After zone
pool_id field will be updated in DB, clone-zone will be created on
target pool backend servers. The zone transfer(AXFR/IXFR) will happen
and the zone on target pool gets synced with the Designate DB.
This command serve as replacement to "zone export + zone delete + zone
import" procedure.
Added following things in pool move operation:
- Add/Update NS servers of new pool in the zone
Implements: blueprint zone-move
Change-Id: I5307de429114b20efd9785c3c0cdb33977418423
There was a large config refactor many releases ago, but
we never standardized on the new pattern. This will also
help ensure that config is always loaded in the right order.
- Standardize how config is setup throughout designate.
- Removed unecessary import_opt.
Change-Id: I8913d2569f174208740a76c474c73316f6c1d89e
Result of running
$ pyupgrade --py38-plus $(git ls-files | grep ".py$")
This was inspired by Nova [1] and Octavia [2]
Fixed PEP8 errors introduced by pyupgrade by running:
$ autopep8 --select=E127,E128,E501 --max-line-length 79 -r \
--in-place designate
and manual updates.
[1]: https://review.opendev.org/c/openstack/nova/+/896986
[2]: https://review.opendev.org/c/openstack/octavia/+/899263
Change-Id: Idfa757d7ba238012db116fdb3e98cc7c5ff4b169
This patch moved the remaining RPC calls away from the
MDNS service to the Worker and re-worked them to better
match the patterns used in the Worker. This means that
the MDNS service now only handles incoming DNS queries.
In addition the metrics backend has been removed as it was
only used by the MDNS RPC implementation and the monascastatsd
implementation no longer serves a purpose.
Closes-Bug: #1978742
Closes-Bug: #1978743
Change-Id: I5ef106717546a201fd62a51adacd43495c148cd4
According to ITEF https://tools.ietf.org/html/rfc2181#section-8
the definition of the ttl value is unsigned integer and can have a
minimum value of 0. This patch changes the minimum value of 1 to allow
for 0. Unit test have also been modified accordingly.
Closes-Bug: #1926429
Change-Id: I7876b4c1e2c800b654ca750211ee2e58f3ea4309
To better align with other OpenStack projects and to reduce the
ongoing problem with duplicate imports, this patch re-enables the
H306 check for proper module import order.
Change-Id: Iced92590829f6d9177d64ad4868aebe6eafd6a8a
Now that we no longer support py27, we can use the standard library
unittest.mock module instead of the third party mock lib.
Change-Id: I4bd0de2f553c43a805670a424c44455d691891ac
This commit will migrate:
- Pool and PoolList
- Related objects
Co-authored-By: Dai Dang Van <daidv@vn.fujitsu.com>
Change-Id: I59da0628a9dc23efe8d8665bbf3359e652eaa8c9
Implements: blueprint designate-rolling-upgrade
This fixes the address_name method to return text, as the to_text
method from dnspython returns bytes, and make 3 new test modules pass.
Change-Id: I5d0e75bd9acdd517ed4a94b1959783a2437cf5a5
This is a pretty invasive change :)
A non complete list of changes:
* Database Tables
* Database Columns
* Designate Objects and fields on Objects
* Designate Objects Adaptors stop doing some of the renames
* All RPCAPI versions are bumped - totally backward
incompatable (function names have changed)
Change-Id: Ib99e918998a3909fa4aa92bf1ee0475f8a519196
Returns an error when a call is made with a filter that is not
supported. Added unit tests.
Change-Id: Ic712f8d145cd6059d9e8af4df3efaa113acb7e08
Closes-bug: 1468452
-Can now filter on zones by TTL and description, and on recordsets by description.
-Updated the doc with the changes.
-Added unit tests for zone filtering and recordset filtering
Change-Id: I3da024c2a7f99446512574cb126a568c6027e99c
Closes-Bug: 1466545
The Oslo libraries have moved all of their code out of the 'oslo'
namespace package into per-library packages. The namespace package was
retained during kilo for backwards compatibility, but will be removed by
the liberty-2 milestone. This change removes the use of the namespace
package, replacing it with the new package names.
The patches in the libraries will be put on hold until application
patches have landed, or L2, whichever comes first. At that point, new
versions of the libraries without namespace packages will be released as
a major version update.
Please merge this patch, or an equivalent, before L2 to avoid problems
with those library releases.
Blueprint: remove-namespace-packages
https://blueprints.launchpad.net/oslo-incubator/+spec/remove-namespace-packages
Change-Id: Ia21c15e8eca6bf456f7cfe13f815f5ce068601e7
The Oslo libraries have moved all of their code out of the 'oslo'
namespace package into per-library packages. The namespace package was
retained during kilo for backwards compatibility, but will be removed by
the liberty-2 milestone. This change removes the use of the namespace
package, replacing it with the new package names.
The patches in the libraries will be put on hold until application
patches have landed, or L2, whichever comes first. At that point, new
versions of the libraries without namespace packages will be released as
a major version update.
Please merge this patch, or an equivalent, before L2 to avoid problems
with those library releases.
Blueprint: remove-namespace-packages
https://blueprints.launchpad.net/oslo-incubator/+spec/remove-namespace-packages
Change-Id: Iae62b48993eef3b31420f8cc245a55f5e303c4fc
* Moves zonefile import/export to admin API due to issues with non
async action of import / export
* Added policy checks to allow restriction of usage
* Fixed 500 Error on invalid Content-Type when using body_dict()
Closes-Bug: #1443366
Change-Id: Iea0f2077f24da9bb1a93d5ac9aadced402343405
APIImpact: Move zone import / export to /admin
* Copied old base view into /admin/
* Removed all v2/ views
* Controllers moved to Adapters
* Validation Error Middleware now in use for validation errors
* Updated tests to remove wrapper object
* Updated Docs to remove wrapper
* Moved Quota Docs to /admin/
Change-Id: I345552bb271222d41321523acc9c4100cbe4878e
Partially-Implements: blueprint validation-cleanup
APIImpact: Removes wrapping object on APIv2 single resource gets
(i.e. get zone by id moves from {zone:{<zone_info>}} to {<zone_info>})
The provides part 1 of the Pools API changes discussed at the
mid cycle. Th majority of the remaining changes are new code/
objects rather than refactoring - so this change has been
split into it's own review.
Change-Id: I2291d76d36e8fcdeb8dffca855e7292d8cb22bfb
*Disallows zone updates, record creates/updates/deletes to zones
that have an action of 'DELETE'
*Once someone hits delete on a zone, that should be it for that zone,
allowing updates could keep it alive in a broken state
Change-Id: If76de6dbc8c244552033256d8c758acda35526ea
Partial-Bug: 1434189
Only a POST is valid on an abandon zone endpoint
(v2/zones/<zone_id>/tasks/abandon). All the other
operations including a get return 405
Change-Id: I0a812ad96b3c0da133dc506d2c4df7557bc3d5fd
Closes-Bug: 1421416
* Update the recordset's status correctly before deleting it.
* Deleting a zone now returns 202 with the zone, showing
the status and action
* Deleting a recordset now returns 202 with the recordset,
showing the status and action
One issue still remains (needs a different fix):
Deleting a recordset without any records returns 202,
but the recordset returned shows a status of 'ACTIVE'
and not 'PENDING'. This is because recordset does
not have a status field.
Change-Id: Id7bf645adbbf8eadc509781a4ab16bef51f0536f
Closes-Bug: 1420359
Add a new API for abandoning of zones from storage.
The new API would be v2/zones/<zone_id>/tasks/abandon
Only POST would be allowed on this API.
This just removes it from storage and does not take
any action on the backends.
Recordsets would not have this feature. By default this is
restricted by policy to admins.
Deleting a zone returns 202. Abandoning returns 204.
Zone now displays action too.
Change-Id: I213b567d1b609670b7c659f6e9780bdac240c89b
Closes-Bug: 1413024
This migrates the data in the server table to
the pool_attributes table. In addition, this
makes all the changes for the code to use the
nameserver pool_attribute in the default pool
instead of a server.
Paritally-implements: blueprint server-pools-storage
What's left to do:
- Remove the old server table and rest of the
server api code
Change-Id: I7e93ab53966cf71d7c8ced38fce55f76aec12e71
Full integration of Pool Manager with Central (no longer using the proxy
backend driver.)
This patch fixes:
- Fix concurrent requests that cause lockup issue (bug #1392762)
- Fixed bug where creating a domain fails the first time in mdns
- Fixed bug where records in recordsets do not have the correct
status/action/serial
- Changed 'ADD' to 'CREATE' for ACTION column
- Ported Fake backend to pools
- Removed transitional pool_manager_proxy backend
Change-Id: Icb40448f760ff2a573d08a04bb4dec1f550119bb
Closes-Bug: 1392762
*Adds a metadata field to API calls if there is metadata
*Adds objects.base.PagedListObjectMixin to hold metadata fields
*Adds a count_x call to domains/recordsets _find_x to get data
*Unit tests for metadata/total_count
Change-Id: I6929e933afad1570603e9276ccf33cf45bb349d3
Implements: blueprint zones-and-record-totalcount
Designate currently generates and hides
each zones NS and SOA records, this
can be confusing for users who expect all
records to be visible in the API.
Change-Id: Ib23f3eb0ae196553c92a28b054ec3cc63333ecef
Implements:blueprint expose-soa-ns
The v2 schemas specify min and max. Changed this to minimum and
maximum as required by the validators.
readOnly does not seem to be validated. But I changed some of the
places in v2 to be consistent across v2.
Change-Id: Ica9b5dfe6860640ab8a2ef6978fb6d1eec1a1d25
Closes-Bug: 1334933
H305: Imports not grouped correctly
H307: Like imports should be grouped together
Change-Id: Ic63d253e015298c7b952121a4b3634d2b1bdaf92
Implements: blueprint new-hacking-style-rules
Currently 'id' and other fields like 'created_at' and 'updated_at' can
be set in the request body. Some of these fields are ignored and
some like 'id' can actual set the id.
With this change - remove 'id' from the list of valid keys and ensure
that only valid keys are present in the request body.
Closes-Bug: #1291518
Change-Id: I99f3f106c0004fa5521869e46da85f1053241eb5
utils.validate_uuid() assumes that any URL after a valid first level
(like zones) is correct. Consequently it calls the function with
incorrect number of arguments.
We now check that the URL is correct by validating the number of
arguments the function expects against the number of arguments provided.
Get, patch and delete go through this code and return a 404. For the
same URL, POST however returns a 405. The 405 is returned by Pecan.
Change-Id: I004c8af2ae0af3c8467f4140c5855ea75966d0e7
Closes-Bug: 1288834
* Previous checks only checked status and not content.
* One method to use across all V2 tests.
* Switch existing _assert_* methods to use this.
Closes-Bug: #1283527
Change-Id: If49460965b08789286df4287862a0c96d2d8b44d
* Remove uuidutils as noted and move the is_valid_like into designate.utils.
* Add UUID validation to the V2 API endpoints
Closes-Bug: #1282672
Change-Id: Ib30a4c2657323145c8500fae503f75871281675f