Commit Graph

139 Commits

Author SHA1 Message Date
Zuul 3b150a1177 Merge "Replace the usage of some aliases in tempest" 2018-07-04 08:17:35 +00:00
Vu Cong Tuan b5ad6b0a64 Replace the usage of some aliases in tempest
In tempest, following aliases have been moved in version Pike
and will be removed in version Queens:
* manager > os_primary [1]
* admin_manager > os_admin [2]
* os_adm > os_admin [3]
* os > os_primary [4]
* alt_manager > os_alt [5]

[1] https://review.openstack.org/#/c/468036/
[2] https://review.openstack.org/#/c/467852/
[3] https://review.openstack.org/#/c/467605/
[4] https://review.openstack.org/#/c/466991/
[5] https://review.openstack.org/#/c/457555/

Change-Id: Ie06d3aeb4da1415682677b5cb3015f09a32f6f13
2018-06-05 13:58:36 +00:00
Vu Cong Tuan f4721a3eee Remove old oslo.messaging transport aliases
Those are remnants from the oslo-incubator times. Also, oslo.messaging
deprecated [1] transport aliases since 5.2.0+ that is the minimal
version supported for stable/newton. The patch that bumped the minimal
version for Designate landed 3 months+ ago, so we can proceed ripping
those aliases from the code base.

[1] I314cefa5fb1803fa7e21e3e34300e5ced31bba89

Change-Id: I46142df6ecae24eb4e7b6892b946ef131ae66bc7
Closes-Bug: #1424728
2018-06-05 13:58:22 +00:00
Lakshmi Prasanna Goutham Pratapa 1a6bcdad99 Fix py27 and py35 tests-failure.
This commit is to fix the failing py27 and py35.
The issue is it raised webtest.api error and keyerror is
asserted until now.

Change-Id: Ie4f30b8204bfd039f81a49b57b11836fa8200017
2018-06-05 18:57:48 +05:30
Vamsi Surapureddi 5ec6bd1c41 Fix failing tests for py27 and py34
Closes-bug: #1769105

Change-Id: Ic709c19edee47a7bf4e73bca78c285de7f01e71a
2018-05-06 07:42:11 +05:30
mounikasreeram 424e7328cc Kingbird Queen’s upgrade with Devstack Queens.
The parameters “admin_user_domain_name” and
“admin_project_domain_name” are added to
establish a Keystone session in Kingbird with
Devstack Queens release.

Change-Id: I6953cbc5e76e21e274bfd8a652b91dd8f6441104
2018-04-09 11:05:47 +05:30
mounikasreeram 679da316cb Enhancing Sync template feature.
The sync template feature in kingbird is to sync multiple
resource types to multiple regions.We can sync the same
resource_type more than once and in any order.
Added test-cases and tempest test-cases for the same.
Closes-Bug: #1748172

Change-Id: I01fd628ef8ed34363facc21c39e66908c4f383ac
2018-02-09 11:47:16 +05:30
mounikasreeram fad12485f7 Add tempest test-cases for kingbird.
The tempest test-cases for "resource management" are provided to
check the actual scenario of sync operation.
Added tempest test-cases for “flavor sync” and “Sync template” features.
The tempest test-cases for "quota management" are changed
due to the bug raised in “quota show” feature.

Depends-On: <I3ef8d8e707d586b25f286a61b723a1bd067191bc>
Change-Id: I1c1825eb52ebdaa00e1e61bb5468a9cb8561f0fb
2018-01-25 13:19:16 +00:00
mounikasreeram a4a49045fe Add Sync template feature to kingbird.
"Sync template" feature is introduced in kingbird to
sync multiple resource_types to multiple regions
at a single request.
This feature is changed based on the
Commit ID : 69223a78f9.

Depends-On:  <I4aa422546a2949438328c8fe47e89f3079e2eb65>
Change-Id: I3ef8d8e707d586b25f286a61b723a1bd067191bc
2018-01-25 17:20:11 +05:30
Goutham Pratapa 69223a78f9 Add resource_sync_id column in resource_sync table.
Currently in Kingbird there is no id for each resource which is being synced
into multiple regions. But with the help of this resource_sync_id user can
keep a track of all the resource which are binded to a given sync job.
Remaining changes are to enhance kingbird.
Added Test cases for the same.

Change-Id: I4aa422546a2949438328c8fe47e89f3079e2eb65
2018-01-25 11:22:12 +00:00
Goutham Pratapa 01c31c45aa Cleanup resources created in keypair tempest tests
In tempest test-case "test_keypair_sync_with_force_true" the
main intention is to test resource_sync with force TRUE which will
evetually delete the existing resources and then recreate if
the resources are already present.
Closes-Bug: #1743690

Change-Id: I422b03be34755adcf96a922bbbb79e070ab291da
2018-01-19 16:56:52 +05:30
mounikasreeram bef1771cd8 Sync flavor with “ephemeral” property in kingbird.
We had a provision to sync the flavor from one region
to other regions.
This commit is to sync the flavor with “ephemeral”
property from the source region to target regions
in kingbird.

Change-Id: I16e4e88956696c33b77593b4902d558ca22f1fe2
2018-01-16 16:04:16 +05:30
mounikasreeram a8a562554e Enhancing Quota-show feature in kingbird.
Quota show feature will display the updated quota values.
This feature is enhanced by displaying the default quota
values as well as updated values as in.
The size of the resource column in database is increased
for better usage.

Change-Id: I814bd45a634342104c190f4437cae265ea3bb0f1
Closes-Bug:1740823
Closes-Bug:1742906
2018-01-15 13:57:18 +05:30
mounikasreeram a6117883a6 Enhancing "Sync show" and "Sync list" features
"Sync show":
Existing "sync show" feature displays the details
of only one job-identifier but when "Sync template"
feature comes into picture,there will be multiple
job-identifiers present for a single job request.
This commit is to display the details of multiple job-identifiers.
"Sync list":
Interface of "Sync list" feature is changed for better understanding.
Added test-cases for the same.
Depends-On: <Iaa8e9568f97581f74e688d15a11c7e7fd832e019>

Change-Id: Id85a51f5c13ba1b3c90b75c6820da5d1e443c398
2018-01-12 11:56:03 +05:30
mounikasreeram a364c4b11c Add Sync template feature to KB-server
This commit from kingbird server is to enhance the existing "sync create" job.
Existing feature "sync create" is to sync single resource-type
to single target region i.e one resource off one resource-type
to one region.
Issue with "sync create":
Kingbird cannot sync more than one resource-type to multiple
target regions in a single request.
This issue is solved by "sync template" feature.
Working of sync template feature:
User have to provide a input file with .yaml or .yml or .json extension.
This input file should consists of
    ->resource-type
    ->resources
    ->source_region
    ->target_region.

Change-Id: Iaa8e9568f97581f74e688d15a11c7e7fd832e019
2018-01-02 14:29:44 +05:30
Goutham Pratapa fd6b4cba10 Implement Flavor synchronization in Kingbird.
Flavor Synchronization sync multiple flavors from one region to
multiple target regions.
Only admin can perform flavor-sync.Currently, when a user requests to
sync a flavor kingbird syncs extra specs of the source resource.
Added Test-cases for the same.

Implements:blueprint resource-syncing
Change-Id: Id289cf93bb9c30ea699223e232025285a29042de
2017-10-06 18:12:34 +05:30
Goutham Pratapa 2f6dab7fc1 API validations for Flavor-synchronization.
Initial commit for flavor synchronization.
Performs some basic validations like
-Check whether the flavor is present in source-region.
-Check whether the access to sync flavor is restricted only to admin.
-Added test-cases for the same.

Partially Implements: resource-syncing

Change-Id: Ieca068aec981b0db6ffc4f4d563b021342c58d60
2017-10-04 17:44:36 +05:30
Goutham Pratapa 3906c41d43 Usage of Plugins instead of keystone client.
In Kingbird there are few api calls which are deprecated in
Pike release.This Fix is to address this issue.
Closes-bug: #1712036

Change-Id: I605e3fabe8063999457bb67545029e83a33fee0c
2017-09-04 06:18:24 +00:00
Jenkins 8098e11854 Merge "Tempest tests for Image_Synchronization." 2017-07-19 15:24:29 +00:00
Jenkins 3803ecc61b Merge "Modify Tempest to use Kingbird-client" 2017-07-19 15:19:30 +00:00
Jenkins 6264342d2b Merge "Implement Image synchronization in Kingbird." 2017-07-19 14:50:58 +00:00
Goutham Pratapa ce3a2dae92 Implement Image synchronization in Kingbird.
Image-synchronization syncs multiple images from one region to
multiple target regions.
Currently the supported image disk_formats are Qcow2 and AMI.
If user triggers a request to sync AMI format image then Kingbird
syncs the dependent AKI and ARI images as well.
-Syncs the respective image's image-metadata as well.
-Verification of Dependent images is handled by glance_adapter.
-Modified sync_manager to keypair_sync_manager and made it an
independent entity.
-Created an independent Image Sync-manager which syncs images in
multiple target regions.
Added Test-cases for the same.
Depends-on: I316ff7e79afb0ea092eec2a4bf32a78c609198ab
Implements: blueprint image-synchronization

Change-Id: If207f803b67b5f5702117d377883b57101802c42
2017-07-18 12:19:13 +00:00
Jenkins 1736c7dec0 Merge "API validations for image synchronization." 2017-07-14 12:50:44 +00:00
Goutham Pratapa 3d0416d152 Modify Tempest to use Kingbird-client
Currently, Kingbird uses curl requests to run Tempest tests.
This commit replaces curl requests with kingbird clients for
Kingbird quota management and quota-class management.
Implements: blueprint kingbirdclient-tempest
Depends-on: I7fbeec5376dc3a2333a7cc9ad51108feb79a7b03

Change-Id: I69f3cd359846b75c767ddd1e3d3de69e1a015c13
2017-07-10 08:45:04 +00:00
Jenkins a492a661fd Merge "Modify Tempest tests of resource_management." 2017-07-07 12:52:01 +00:00
Goutham Pratapa 4d21be6947 API validations for image synchronization.
Added validation of source image
Added test cases for the same.

Depends-on: I66fbf4ab207a6615f8070d3a22ea7561e608dcd9
Depends-on: I022bd5b972aca159b4a8f6f88d201afa5c21ab8e

Partially Implements: blueprint image-synchronization

Change-Id: I316ff7e79afb0ea092eec2a4bf32a78c609198ab
2017-07-06 19:31:26 +05:30
Goutham Pratapa 47e1cd48a2 Tempest tests for Image_Synchronization.
Added Tempest testcases for Kingbird image_sync.
Added test_image_sync.py to resource_sync directory
which contains tempest testcases for image_sync.
Depends-on: I7fbeec5376dc3a2333a7cc9ad51108feb79a7b03
Implements: blueprint image-synchronization

Change-Id: I58b54eedd2956990991dc15a37cf0ff246341acb
2017-06-30 18:50:41 +05:30
Goutham Pratapa 3c2bc63a9f Modify Tempest tests of resource_management.
Currently, Kingbird uses curl requests to run Tempest tests
This commit replaces curl requests with kingbird python sdk
(python-kingbirdclient)for resource_management only.
Add kingbirdclient to the test-requriements.txt
Partially Implements: kingbirdclient-tempest
Change-Id: I7fbeec5376dc3a2333a7cc9ad51108feb79a7b03
2017-06-30 18:11:49 +05:30
Jenkins afe776b0f9 Merge "Create Glance driver for Kingbird." 2017-06-08 11:18:32 +00:00
Jenkins 26ee37310e Merge "Create keypairs in other regions using context." 2017-06-08 11:18:24 +00:00
Jenkins ffc1884b0a Merge "Fix to show default class limits for a quota class" 2017-05-23 05:47:18 +00:00
Goutham Pratapa 72ed8e27f4 Create Glance driver for Kingbird.
create glance_v2 with api-version 2.
Change keystone_V3.py to return service endpoints.
Added test-cases for the same.
Depends-on: I1f34d54f72e115bb40a146bb733672c649602ef4
Partially Implements: blueprint Images synchronization

Change-Id: I022bd5b972aca159b4a8f6f88d201afa5c21ab8e
2017-05-22 15:40:54 +05:30
Goutham Pratapa 7e18bc10ea Create keypairs in other regions using context.
Currently, in Kingbird if a non-admin user sends a request to
sync keypairs from one region to other, the resources are
created with the nova client formed, using the admin credentials.

This commit fixes the internal issues and
creates keypairs for the same user based on the context object.
-Used Keystoneauth1 instead of keystoneclient
-Used loading to get session in order to communicate with other
openstack drivers in kingbird.

Modified test-cases for the same.
Closes-Bug: #1692012

Change-Id: I66fbf4ab207a6615f8070d3a22ea7561e608dcd9
2017-05-22 14:27:48 +05:30
Goutham Pratapa 3fc29899cb Add 'roles' parameter to the Context object.
Kingbird context object does not contain parameter 'roles'.
parameter 'roles' is essential as when kingbird communicates with other
openstack services through auth token.

Change-Id: I1f34d54f72e115bb40a146bb733672c649602ef4
2017-05-04 12:48:50 +05:30
Jenkins 219c034f56 Merge "Enable some tempest test cases" 2017-05-04 07:00:50 +00:00
joehuang 7bfcd6533e Enable some tempest test cases
Enable tempest test cases for quota management and resourece
management as example

Change-Id: I9f5f0be8cbef26a51d035e5829e225fe1cce2f7a
Signed-off-by: joehuang <joehuang@huawei.com>
2017-04-27 05:58:11 +00:00
Jenkins eac12147bd Merge "Support V1.1 for kingbird quota management." 2017-04-24 14:05:14 +00:00
Goutham Pratapa 0010e8d2b6 Fix to show default class limits for a quota class
Currently, Kingbird does not display the default limits
for a random class which is not an expected behavior.
This fix displays default resources and default limits
for any quota-class of kingbird.
Closes-Bug: #1684082

Change-Id: I1b8e3f1db79fd92531e05807547fcf7310be78f2
2017-04-19 17:01:23 +05:30
joehuang 0155d79498 Test multi-region environment
This patch is to debug and enbale multi-region test
environment

Change-Id: Id6bb3c0a875bf10b7a3453edc38f7fad6bb34f18
Signed-off-by: joehuang <joehuang@huawei.com>
2017-04-18 23:56:11 -04:00
Goutham Pratapa 8a453465bc Support V1.1 for kingbird quota management.
-Modified existing policy.json.
-Added enforcer.py to use policy.json and there by enforcing restrictions.
-Trimmed curl requests of version V1
-Added new working curl requests in Readme.rst
-Added quota-class management curl requests in "kingbird/api/controllers/v1/README.rst"

Partially Implements: blueprint kingbird-api-v2

Change-Id: I513a60b2cc643d6d7458cc955f135dce88637c47
2017-04-17 16:01:26 +05:30
joehuang 63f94de34a Add multi-region scripts for devstack based gate/check test job
Just like py27 gate/check test job enabled for each patch submitted
for review, devstack based multi-region gate/check test job can be
added to each patch too.

gate_hook.sh: the script to build two nodes two OpenStack regions
with Kingbird installed.

post_test_hook.sh: the script to execute test cases against prepared
multi-region with running Kingbird

These two scripts will take into effect only after the job configured
for Kingbird is merged: https://review.openstack.org/456479. So these
two scripts should be merged before the patch in project-config.

Note:
1. multi-region job alread begins to run in Tricircle project,
these two scripts are copied from Tricircle with Kingbird related
update.
2. plugin.sh was updated to register endpoint correctly, no need to
judge database now.

Change-Id: I126365cc8225dc73d758daf70b7efe7b1aafcb27
Signed-off-by: joehuang <joehuang@huawei.com>
2017-04-14 02:35:50 -04:00
Goutham Pratapa 7f89f08407 Move existing kingbird to V1 directory.
Currently kingbird api version is V1 and if the api version is
upgraded or changed to V2 it creates ambiguity because of the loose files
present in "api/controllers".So made changes to move entire
current code to V1 and made changes to existing tests to provide support
to new changes.

Change-Id: I07c19cac7eca111391a22b186949b26729d93414
2017-04-04 19:19:57 +05:30
Jenkins 923c9c140d Merge "Fix to show version information from root API." 2017-03-24 05:54:59 +00:00
Jenkins 2da4c582ae Merge "Replace six.iteritems() with .items()" 2017-03-24 05:09:55 +00:00
Goutham Pratapa 8e0acbdcc5 Fix to show version information from root API.
When the user hits http://serv_api:8118 instead of version information
kingbird returns 401 authentication.Introduced a new section
pecan configurations and pecan hooks to fix this error.
Added test-cases, made trivial changes for tempest tests and refactored
some code.

Closes-Bug: #1673383
Change-Id: Ic87b078a73bd0505b309f099cffdfb7ee31ba8e3
2017-03-23 12:23:33 +05:30
XieYingYun d194bf597b Remove log translations
Log messages are no longer being translated. This removes all use of
the _LE, _LI, and _LW translation markers to simplify logging and to
avoid confusion with new contributions.

See:
http://lists.openstack.org/pipermail/openstack-i18n/2016-November/002574.html
http://lists.openstack.org/pipermail/openstack-dev/2017-March/113365.html

Change-Id: Icba5a60fff276b85e0c5df8b638d525f073faa2e
2017-03-21 20:45:47 +08:00
WangBinbin b86e7a0609 Replace six.iteritems() with .items()
we should avoid using six.iteritems to achieve iterators.
We can use dict.items instead, as it will return iterators in PY3 as well.
And dict.items/keys will be more readable.

In py2, the performance about list should be negligible

Change-Id: I972b6eb73620eea0cae8b1e0ed9df5f80213bf3d
2017-03-14 05:49:13 +08:00
Goutham Pratapa fce80a3991 Fix issues related to delete quota-class
Currently Kingbird doesnot raise any exception if there
is no class in DB with the specified name.
With this change we can fix this.
Refactored some part of the code and added test-cases for the same.

Closes-Bug: #1587363
Change-Id: I0953c95459de31e223ec1ef658b76b3ab9d16ea8
2017-03-01 10:33:48 +00:00
Goutham Pratapa 2f161b0ae6 Change display output while listing sync_jobs
Currently while listing the sync_jobs.Kingbird doesnt display
the parameter (created_at) and source_region in the job_details.

Change-Id: I4814f8039dfc080dc340a15c94d0292e57604e1b
2017-02-17 17:15:50 +05:30
Goutham Pratapa acf83a3df8 Tempest testcases to support new bug fixes
Kingbird has two bug fixes 1652747,1654569 cause tempest failures,
This commit provides fix for the same.

Depends-on: I6fd74f63cde69c8a21d3e347cea206fc629e7c36

Change-Id: I7ea8a4f14b68f4f9d0a81379d9207063811e3ce6
2017-02-13 11:13:11 +00:00