Commit Graph

83 Commits

Author SHA1 Message Date
Zuul 7817b0c8a6 Merge "Move load_auth_fixtures()" 2018-07-05 21:57:19 +00:00
Jeremy Freudberg ae11bb3a96 Split functional job
Split the functional job into
- functional-compute
- functional-image-volume-network-scenario

Change-Id: I815da397f4963385639187912f76872aa6dc755a
2018-07-05 13:55:03 +00:00
Ding Jin e85c6b6193 Move load_auth_fixtures()
Move load_auth_fixtures() to the BaseTest class.

Change-Id: I838848114acd8a2e24f89b0cf748eeb19738050f
2018-07-05 09:10:17 -04:00
Parul Sohal fd5e5d3e42 Changed deprecated API call
In auth.py,changed /OS-FEDERATION/projects to /auth/projects

Change-Id: Ie763fd328c3c763f19acdecaf54dd93e8ac20961
2018-07-02 20:10:01 +00:00
Zuul 4b5d77da37 Merge "Same line logs" 2018-06-18 19:25:42 +00:00
Kristi Nikolla 39e4c36344 Same line logs
When logging, headers, url, method, etc, were in different lines
making it hard to distinguish what belonged to the same request
or response. This puts everything in the same line.

Change-Id: I9aa8ce64fa98a13d5d26f80f4e690f2a8eda847b
2018-06-15 18:09:04 -04:00
Jeremy Freudberg 9664dd23d6 Shorten the blacklist
A lot more tests pass since the last time we focused on this file.

Change-Id: Ib90ad5c4dd8e78d6aabe0d4e0541610c4ae0cb46
2018-06-13 19:31:48 +00:00
Kristi Nikolla 61a8444c27 Don't put project_id in path if it wasn't there
This fixes the case that when a request looking like
http://example.com/resource/volume
and containing a token comes to the proxy, we translate it to
http://cinder.local/volume/<project_id>

This happens because we populate the project_id information of
a request either from the url, or from the token.

Change-Id: Ie83fec4910eff750ba15f5485428c23ec3505e3b
2018-06-07 00:27:15 -04:00
Jeremy Freudberg 955f28d397 Extend-a-network
Create a new extension to the proxy, which will allow networks to be
extended across clouds.

Additionally, provide lots of documentation for this new feature.

Change-Id: I9088e3509f71fb363ddc7f504cbb96f94932cc1e
2018-05-15 18:19:26 +00:00
Lohith 902c033af8 Avoid request loops between mixmatch proxies
Closes-Bug:#1763549

Change-Id: I9ad9a2363024ce722c1cb2b1bac27be755fc6888
2018-05-02 16:26:59 -04:00
Kristi Nikolla 5c42bde257 Remove hack for lack of service type
Change-Id: I1fbce415369f8d7ee6edd58299df02ad10d86818
2018-02-16 21:47:46 +00:00
Kristi Nikolla be10840d86 More sophisticated extension matching
Rewrote the extension matching code to work with variables. Now
using the Routes library.

Change-Id: I361e6e597421bc71ed2cf9ed82516ad8b7bd3a8c
2017-10-25 13:10:49 -04:00
Tyler Sam 3a8a1f4872 Completed _match_action function and created test cases
Change-Id: I29552b463c1b93f9e621d4935fd7dcd22fc2b649
2017-10-20 15:52:47 -04:00
Zuul 76a38b533d Merge "Move legacy jobs to project" 2017-10-16 20:00:10 +00:00
Duong Ha-Quang 23d5c2df9e Move legacy jobs to project
This patch implements first step in zuulv3 migration guide [1]:

Move jobs to mixmatch repo

[1] https://docs.openstack.org/infra/manual/zuulv3.html#legacy-job-migration-details

Change-Id: I6d97b4ec8f4c22785a1081dc711257c071637999
2017-10-16 16:59:03 +00:00
Jeremy Freudberg a1a9cad038 Request headers are case insensitive
Per RFC2616. Within the codebase itself we represent headers as
uppercase strings, but now they can be passed with any capitalization
style. (Including whatever keystoneauth or requests chooses to send.)

Change-Id: Ia4e932a91dec030b9efeb947759ceebdb7a426fc
Closes-Bug: #1720433
2017-10-10 17:45:25 +00:00
Jeremy Freudberg b23bf3cefa More attributes of flask.request in RequestDetails
To simplify the writing of extensions, and to reduce reliance on
importing the flask.request global object, store pertinent attributes
of flask.request in the RequestDetails class.

Change-Id: Idff737155a6110d0520a74e36a5b0c23b5b5d93c
2017-09-11 19:47:09 +00:00
Kristi Nikolla 1cb775fcf4 Add mixmatch-manage cli command with db_sync
This adds a cli for management commands that is run through
`mixmatch-manage`.

Also added `db_sync` which is creates the tables in the database
based on the model. No upgrade functionality exists yet.

Change-Id: I18187967bb62865529712c83ef60482c3d1ed8ca
2017-09-05 11:46:08 -04:00
Leo Tomatsu 06543ccbed RequestDetail
The self.detail is now a class rather than a dictionary.

Change-Id: Ia33583613e91707f16de638023e93899528473e2
2017-08-08 19:28:14 +00:00
Kristi Nikolla 10fae26c6d uwsgi improvements
This patch adds a .ini file with the configuration for running
mixmatch through uwsgi, replacing the previous `run_proxy.sh`
script which passed the configuration as arguments.

This patch also removed the wsgi configuration, making it
unsupported. The wsgi documentation has also been removed. A
follow on patch will also remove any remnants of wsgi logic.

The default port for running the proxy has been changed to
9913.

This patch also updates the `setup.cfg` file, adding the
parameters for wsgi_scripts so that pbr install the wsgi exec
on package installation.

This patch also uses apache and mod_proxy to map /resource to
the uwsgi port 9913.

Change-Id: I2069d0f28e8e14da59109158cd2912ddb284a4e3
2017-08-04 16:03:01 -04:00
Jenkins e860a37ea8 Merge "Don't stream json" 2017-08-02 20:42:08 +00:00
Jenkins a914a13d56 Merge "Neutron pass-through" 2017-08-02 14:05:08 +00:00
Eric Juma 87f89d1f74 Don't stream json
Makes json data that would normally be streamed not streamed
so that it can be modified.

Change-Id: I9690ee1841258e4e6a4d1bfea68e6505484f2216
2017-08-01 18:12:22 +00:00
Jeremy Freudberg c23c48fe8e Neutron pass-through
Network federation preliminary work

Depends-On: I9dcd30fe6669bdf570149ed317b16005c21f6291
Change-Id: Ic5e694259544c2c6ffe717d560fc18391f64a1a0
2017-07-31 17:55:38 +00:00
Jeremy Freudberg a85cf6bf52 Stop using six.b and six.u
For a better developer experience, accomplish removal of six.b and
six.u by changing how Werkzeug response objects are handled in the
relevant unit tests.

Change-Id: Iac36e5fd9eb7ef78e6c8e9e8bff1c596e2e5823e
2017-07-31 17:51:22 +00:00
Jenkins 4130ec8ca6 Merge "Retry request" 2017-07-24 16:00:57 +00:00
Kristi Nikolla dafed90251 Retry request
Will try multiple times on connection errors and on 500, 502, 504.

Change-Id: I16d6eb8a00e452aeaf5ee4a51d423271684bf7eb
2017-07-24 10:31:26 -04:00
Jenkins 5205cc8b3d Merge "Catch invalid MM-SERVICE-PROVIDER early" 2017-07-24 14:18:35 +00:00
Jenkins a4ddfd04f0 Merge "Preliminary extension support + Name routing" 2017-07-21 21:40:28 +00:00
Jeremy Freudberg c1815c66ff Catch invalid MM-SERVICE-PROVIDER early
Now junk in MM-SERVICE-PROVIDER will lead to a client side error,
instead of a server-side one.

Change-Id: Ic930b4093fe005c3abc6c8561ee1114846fb80a6
Closes-Bug: #1705773
2017-07-21 20:17:24 +00:00
Kristi Nikolla 6673e2e6f2 Preliminary extension support + Name routing
This introduces preliminary support for extensions.
Extensions are registered to routes, and if the
request matches the registered route they will be
called to handle the request and the response.
The interface is still not finalized and will
progress as more extensions with their different
requirements are added.

Also included dependency on oslo_serialization for
loading the json response. Follow up patch will
change all instances of json.loads to
jsonutils.loads

Change-Id: I9c573ce1d4ebe85c07c8ff219f384e3c6c67b39a
2017-07-21 16:05:13 -04:00
Jenkins 749de86ac5 Merge "Combine aggregate_forward and search_forward" 2017-07-21 19:52:48 +00:00
Kristi Nikolla b488c79e5a Combine aggregate_forward and search_forward
Also included a new decorator utils.CachedProperty.

Change-Id: I3fe6072866e7d5716f6d19cde86684d5b0eb8bff
2017-07-21 11:05:24 -04:00
Jeremy Freudberg b8427c65db Remove unused config option
TrivialFix

Change-Id: Ifcdda9bfd0e076772a697faddd91909fb9e33ace
2017-07-20 20:37:01 +00:00
Kristi Nikolla 8ee42dff50 Move endpoint registering into the devstack plugin
Endpoing registering which was previously restricted to the
functional tests, now can be enabled in the devstack plugin by
adding `REGISTER_MIXMATCH=true` to `local.conf`.

Change-Id: I1aedcd57819d41a26f38dd5e30b6bc4692684f36
2017-07-17 21:53:03 +00:00
Jenkins 6f5a885fa4 Merge "The Volume API now supports user messages" 2017-07-06 14:47:15 +00:00
Kristi Nikolla 4bb9dd6841 The Volume API now supports user messages
This tentatively adds support for that API by letting the
microversion header OpenStack-API-Version go through. Also
added a few unit tests just to check that we're properly routing
the messages path.

Change-Id: Ie21b15ee5d33085e0515a129ea4ef89836ca8d57
2017-07-05 17:04:19 +00:00
Jenkins f7aec5ccf5 Merge "Return 404 rather than ValueError" 2017-07-05 16:51:47 +00:00
ltomatsu 199dbbaea8 Return 404 rather than ValueError
The get_service function returns ValueError
when the service response is neither cinder
nor glance. Switch this over to abort 404.

Closes-Bug: #1700144
Change-Id: If2cf585dd555eab4771a27fe6f272842a3d498fe
2017-07-05 15:24:53 +00:00
Jeremy Freudberg 22f45add29 Return most specific error instead of 404
Particularly for client-side errors, we ought to at least return the
actual error status instead of a generic 404.

Enablement of negative Tempest tests.

Change-Id: Ieaf658c9bd202dbb5000c10c43bdd1afa15a2aa1
2017-07-03 16:26:59 +00:00
Kristi Nikolla c49aacec27 Config refactoring
This splits the configuration module into a package with multiple
modules.

Additionally adds support for oslo-config-generator.
Additionally adds mixmatch.conf to .gitignore

Change-Id: I735c6e852ef3cddb6dff654e1b8777ba239b91ab
2017-06-13 12:20:28 -04:00
Jenkins bcc72e46f9 Merge "Move utility functions to utils.py" 2017-06-05 17:43:51 +00:00
Eric Juma 2c5960c183 Restart Nova and Cinder in gate
Restart Nova and Cinder after endpoints are set to the ones of the
proxy to ensure that the new endpoints are used by these services.

Change-Id: I4097cee1707e58415def310535c1786e3a03e51e
2017-05-30 23:24:59 +00:00
Eric Juma 4e87d72a17 Run only Nova, Cinder, and Glance tempest API tests
Scenario tests will still be run. This will cut down on time for
tests to run in CI.

Change-Id: Ia0639f6c3a31023fd5986bb210f1b1ce1bb59092
2017-05-30 21:38:09 +00:00
Kristi Nikolla 6e042d2e1f Move utility functions to utils.py
Some general utility functions such as safe_get and safe_pop were
moved to utils.py.

Change-Id: I14f4fce68369746542abade39b7dc02d3ce272bf
2017-05-30 21:26:13 +00:00
Jenkins 7f3a9e0426 Merge "Blacklist tests in functional gate" 2017-05-15 22:40:57 +00:00
Jenkins 9125a215fb Merge "Fix for Volumev1 Aggregation" 2017-05-15 22:34:10 +00:00
Kristi Nikolla e55f32a0ae Blacklist tests in functional gate
Some tests fail because of the new volume v3 messages API. Some
fail because tempest is now checking also the URL which we do no
rewrite with the proxies URL but we still return the original one.
And some need investigation. Comments about each test are in the
blacklist file.

Change-Id: I8ef19c471f7f77f57335b640953826450dbb53de
2017-05-15 17:04:12 -04:00
wjdan.alharthi 217f7c3a02 Fix for Volumev1 Aggregation
Takes into account the differences between volumes details
in volume v1 and v2

Co-Authored-By: Kristi Nikolla <knikolla@bu.edu>

Change-Id: Ied7f6f1cca752eb300a284ca1267ad1ef79e6db5
Closes-bug: 1646520
2017-05-15 16:52:46 -04:00
Kristi Nikolla 6b5f16c85c Rename tenant_id to project_id
Tenant_id is old keystone terminology. Replace all instances of
tenant in the model with project. The listener still uses tenant_id
when listening to messages in the message queue. Investigate if
it is safe to rename those too to project_id.

Change-Id: I5126238eb5c4e5ade8effbd9fdc9b73a09b4ea90
2017-05-15 19:32:35 +00:00