13 Commits

Author SHA1 Message Date
Tim Simmons
2ce080d36c Do not allow GET /resource.json
By _default_, Pecan exposes the functionality
to try and "use the extension in the URL for
guessing the content type to return."

I'm not even kidding:
http://pecan.readthedocs.org/en/latest/pecan_core.html#pecan.core.Pecan
`guess_content_type_from_ext`.

So this allowed an API user to GET /v2/zones.json that returned
the same thing as /v2/zones. Similarly for /zones/id.json.

So this turns that off.

Change-Id: I38a2e35f58cf7619bee64247d7ac01a50b0dcc58
2016-03-14 18:58:44 +00:00
Jenkins
6232567f8d Merge "Add functional tests for TLDs" 2015-11-09 18:54:23 +00:00
Endre Karlson
5813493932 Add functional tests for TLDs
Change-Id: Ic5c25f40cf19d0f1915f89698468090bf6eb743b
2015-10-13 15:06:53 +00:00
sonu.kumar
2fed891b5a Fix order of argument in assertEqual
Some tests in test_zone.py used incorrect argument
order in assertEqual(observed, expected).
The correct order expected by testtools is
assertEqual(expected, observed).

Change-Id: I60e491f5629fd6dccd25c24bfb158d3c2b0145f1
Partial-Bug: #1259292
2015-09-29 15:56:42 +05:30
Paul Glass
ef96861c2c Check the contents of a zone export in the functional tests
* Fixes a policy check on doing the zone export that caused a 403
unless the tenant was an admin
* Adds ZoneFile and ZoneFileRecord models to parse a zone file
* Adds some "meta" tests for the new models
* Updates the test_export_domain test to check the zone file text

Change-Id: I65c93f5d5283fc5962f4a2bf0ac8abae1966e6d6
2015-09-11 20:20:26 +00:00
Paul Glass
3c8e0d7891 Cleanup data created in the functional tests
Change-Id: I773d56662adc24322ce0ab0fa26fb62c9624d36f
2015-09-11 20:17:07 +00:00
TimSimmons
50d1b1553e Asynchronous Zone Export
Do the needful to move Zone Exports to an asynchronous resource in the
v2 API, as discussed at the Austin 2015 summe mid-cycle

* Make designate-zone-manager an RPC service, with a read-only connection
  to the database
* Add a 'location' column to the zone_tasks table that stores a location
  (swift, URI) that is used to determine where the export will be made
  available to the user
* Add all the infrastucture to make zone export resources live (objects,
  central, storage methods)
* Add a quota on the size of allowed synchronous exports
* Tests, docs

THIS DOES NOT IMPLEMENT
* Zone exports to Swift
* Debateable: See the note in zone_manager/service.py about how the configuration
  and determination of future swift exports will work.

ApiImpact
Blueprint: async-export
Change-Id: I1c168b10358164c3ca5be986b4d615df71062851
2015-08-28 16:45:10 -05:00
Tim Simmons
021946e386 Asynchronous Zone Import
* Creates /v2/zones/tasks/imports, which allows users to view imports as resources
* Creates new database table zone_tasks for asynchronous tasks related to zones, along
with the associated objects/adapters
* Imports are done by passing over the request body, creating an async record in the db,
and spawning a thread to do the import
* Adds a config option to enable zone import

Implements: async-import-export
APIImpact: Adds /zones/tasks/imports and removes import from admin api

Change-Id: Ib23810bf8b25d962b9d2d75e042bb097f3c12f7a
2015-06-22 14:45:39 +00:00
Paul Glass
b82b3c03d9 Zone ownership tests
* There are three tenants: default, alt, and admin
* Updated config to grab creds for each tenant type
* Reworked clients to make tenant selection simple within test cases
* Added zone ownership test cases
* A bit of other refactoring to put code in more sensible places

Change-Id: I5330b2b1f81ac896300f199b341775594ab14073
2015-04-22 16:28:11 +00:00
Paul Glass
c10c853d2b First Tempest tests for recordsets
* Added decorators for parameterized tests
* Added models/clients for recordsets
* Move v2 specific clients into DesignateV2Test base class
* Added data generation for A, AAAA, CNAME, and MX recordsets
* Added test cases that do CRUD on A, AAAA, CNAME, and MX recordsets

Change-Id: I7755167b707ca66f8f2a3362579e3e976b4aa315
2015-04-03 16:21:20 +00:00
Paul Glass
4620275cdb Remove zone wrapper object in Tempest tests
Change-Id: Ice135dd29b357827c1ceabf6cf8e83316c82a724
2015-04-03 15:28:15 +00:00
Paul Glass
4beca918e2 Add Tempest zone tests
Change-Id: Ia68692503e31cc0eb34f06b6cb304b9d7b027ed4
2015-03-13 21:11:47 +00:00
Paul Glass
dc2c1ae540 Add initial code for tempest tests
This is a bit of initial structure for some Tempest tests
intended to run in the devstack gates.

* Contains a single test case (list zones)
* Uses tempest_lib instead of tempest wherever possible
* Added a .testr.conf for use with testr
* Currently, needs keystone to get Designate's endpoint

Change-Id: I87a3f7c4fea55183eb2264a8b099344c6e3faa67
2015-03-05 22:32:07 +00:00