Commit Graph

552 Commits

Author SHA1 Message Date
zxgao 55af2ffa8d Add test case for nodes api.
Change-Id: I49ef9f7aa76fbac55a8c73f62459d8a5cb2a06c8
Closes-Bug: 1809085
2018-12-19 16:17:47 +08:00
zxgao f2617cde8a Add test case for availability zone api.
Change-Id: I75d95b0a576c6320f402591b709e985feb176ed8
Closes-Bug: 1809059
2018-12-19 10:00:17 +08:00
Zuul fdbf7895de Merge "add test for quota update when quota no exist" 2018-12-18 11:26:59 +00:00
Zuul 1de1107bf7 Merge "Add save aggregate metadata test case" 2018-12-18 11:26:58 +00:00
Zuul 73df2670bc Merge "Add api app unit test" 2018-12-18 11:26:02 +00:00
Zuul 94f8ea6a3d Merge "Add server nic unit tests" 2018-12-18 11:23:46 +00:00
Rui Yuan Dou 8d2d3395ce Add rpc call test
Change-Id: I36a2cc66fe70c4fc7ba978a9ef27e2ea1f6be0d7
Closes-Bug: #1808962
2018-12-18 18:26:35 +08:00
Rui Yuan Dou 7bb91da41f Add server nic unit tests
Change-Id: I0ac7cbba90f19c133ee01b79bb2966f540d54982
Closes-Bug: #1808952
2018-12-18 17:58:23 +08:00
Zuul ca8d5dad0b Merge "Add server_group related db exception tests." 2018-12-18 09:10:10 +00:00
Zuul 54a5145b4a Merge "add test for get_one() when server_uuid not found" 2018-12-18 09:08:10 +00:00
zhaodan d2c2cf68b8 add test for quota update when quota no exist
Closes-Bug: #1808940

Change-Id: Ib4ad6138edc49b334a7a2da1c7864d874bf9a0eb
2018-12-18 17:02:27 +08:00
zxgao d24e10ecd7 Add server_group related db exception tests.
Change-Id: Ib270840d667088d9edecf88440eecdad97ac7b86
Closes-Bug: 1808936
2018-12-18 16:27:58 +08:00
Rui Yuan Dou 18433592a8 Add save aggregate metadata test case
Change-Id: I8a63c033043e0e4f92b3f080ab5cabc4a85f1841
Closes-Bug: #1808933
2018-12-18 16:09:44 +08:00
zhaodan 03eba771f4 add test for get_one() when server_uuid not found
Closes-Bug:#1808918

Change-Id: I265defee39a8c5795f3d23c617af00bc1d5c3c96
2018-12-18 07:04:29 +00:00
zxgao b23eec0419 Add unit test of db about updating a not exist server.
Change-Id: I2d20d575e90c36b2bef3a781f4f1f1bda4bd93a5
Closes-Bug: 1808922
2018-12-18 14:56:54 +08:00
Rui Yuan Dou b8967b6b94 Add api app unit test
Change-Id: Ie9e9b0fa39c672c430234172cf213eaca191aa1e
Closes-Bug: #1808921
2018-12-18 14:54:57 +08:00
zxgao feda8431b1 Add unit test of api about trying to get a not exist flavor.
Change-Id: I02a5c27fd68ad762d35aba40dda9176fae680ef8
Closes-Bug: 1808914
2018-12-18 14:12:40 +08:00
zxgao c801a3f8ea Fix context hook unit test error.
Change-Id: I8559b62c2b485d385626253cfcca4ecda2ecaa7f
Closes-Bug: 1808900
2018-12-18 11:02:48 +08:00
Zuul bc369618b2 Merge "Modify grammatical errors" 2018-03-01 09:18:11 +00:00
pangliye c17bc17552 fix misspelling of 'return'
Change-Id: Ibaca0172e23db35a0a6c18ee7f3bc5564271d050
2018-02-09 14:19:39 +08:00
Zuul baaaac8334 Merge "fix the typo mistake" 2018-02-09 03:15:39 +00:00
Zuul 4a1fe6bffa Merge "Add manageable server information into system metadata" 2018-02-08 06:56:00 +00:00
MaoyangLiu 0eae042534 fix the typo mistake
it's need  'a' here not 'an'

Change-Id: I71a800aa32f13a4d550f01dc9fcd3773f2268854
2018-02-06 10:00:32 +00:00
chengebj5238 c68f0fd41e Modify grammatical errors
Change-Id: Id3b8b950cd4df5b9af4c6721d1c4f645a6de0759
2018-02-06 17:46:43 +08:00
Zuul 99261e46b9 Merge "remove re-auth logic for ironic client" 2018-02-05 10:15:52 +00:00
wanghao bdbf3f81e7 Add manageable server information into system metadata
Now when Mogan manage the baremetal node from driver,
Mogan didn't know it is a managed server.
We need add this information "managed_server=True" to
system metadata for internal use.

So this patch will finish two jobs:
1. Implements the system metadata in Mogan
2. Add manageable server information into system metadata

Co-Authored-By: Xinran WANG <xin-ran.wang@intel.com>
Change-Id: I89947796e120d89ec56f8f5daeb9774cf15b6bd0
Implements: blueprint system-metadata
Closes-Bug: #1727913
2018-02-05 14:17:03 +08:00
Zuul 063a6d9d9a Merge "server group unit testing a bit wrong" 2018-02-05 04:06:28 +00:00
yufei dd7567d50a remove re-auth logic for ironic client
We are using keystone session to build ironic client now, keystone
session support to re-auth for expired token, so we don't need to
re-auth again in client wrapper. This logic is removed from nova
in Ifbb6e19d4e2811ebaafc4e5899e46b13b4520f62.

Change-Id: Id319a01c8745b466aaf77b9087ffb2f3fd1e5533
2018-01-25 17:36:23 +08:00
liuluyang 1b2490bdf0 server group unit testing a bit wrong
the function of create_test_server_group should be used instead
create_test_aggregate

Change-Id: I383bc563d369144a5f918064309b73e7984b61ab
Closes-Bug: #1736331
2017-12-25 03:04:13 +00:00
liusheng ddcdfad9be Add versioned notifications of rebuild server action
This change add the implememtation of versioned notifications of server
rebuild action.

- Add notification for server.rebuild.end event
- Add notification for server.rebuild.error event
- Add notification for server.rebuild.start event

Change-Id: If168a95dc090f18e6464a03e5ceec9978b2c2df2
2017-11-24 08:53:22 +08:00
Zuul fce0cb4c25 Merge "Remove 'locked' from server object" 2017-11-23 06:30:50 +00:00
Zuul 2cee9e9107 Merge "Add admin_password support" 2017-11-20 09:29:01 +00:00
Zuul 47ab4b37fe Merge "Ensure root_gb always in patch params to avoid ValidationError" 2017-11-20 09:29:00 +00:00
Zuul 4be116f70e Merge "Add port group mode to manageable servers" 2017-11-15 10:21:03 +00:00
zhangjl c8f6ca2c8a Ensure root_gb always in patch params to avoid ValidationError
Accoring [1], the root_gb is required when validating the
node properties. While, in latest mogan codes [2], root_gb
is optional. Then, the ValidationError would occured when
creating baremetal server with mogan.

To fix this problem, ensure root_gb always in patch params.

[1]: https://github.com/openstack/nova/blob/master/nova/virt/ironic/patcher.py#L61
[2]: https://github.com/openstack/mogan/blob/master/mogan/baremetal/ironic/driver.py#L159-L161

Change-Id: I99f7a0408c234649fc81482f82018c74781f7a26
Closes-Bug: #1729533
2017-11-02 17:35:17 +08:00
Zuul a8050e3d5c Merge "Following up patch of bbbe964ff4e19232ce3dd326fbd3f04f0781f5b1" 2017-10-31 10:21:11 +00:00
Xinran eeabfedc54 Add admin_password support
Mogan should support to inject an admin password into a bare metal server.

DocImpact
APIImpact

Change-Id: Id3487b7aea699353aedd49a51d9a5a2e250943b9
Implements: bp admin-password-support
2017-10-31 16:50:08 +08:00
Xinran e81187d703 Complete the comments for pagination support.
Change-Id: I96aa4b7b4ea3be4d387d600a9fd23969657bdc1e
2017-10-30 03:24:20 +00:00
Zuul 8d2d165755 Merge "Pagination support for server list API" 2017-10-28 16:55:05 +00:00
Zhenguo Niu d5d480d1e6 Following up patch of bbbe964ff4
This merges db migrations file into one, will not add new migration
scrips until we are offical.

Change-Id: Ibd70c05e42a6b8ad63f3818e385bc347b9ff8afa
2017-10-28 15:46:56 +08:00
Zhenguo Niu 448556bab0 Remove 'locked' from server object
locked_by can be used to check the lock status, there's no
need to keep locked field.

Change-Id: I3761ab710cf67d56163a39add4c51ee48f940a36
Closes-Bug: #1727944
2017-10-28 09:44:04 +08:00
Zhenguo Niu c8755c58ea Add port group mode to manageable servers
Mode of the port group is useful when listing manageable servers.

Change-Id: I5a13aa953e40d49f2d136c7d80de11975b796548
Closes-Bug: #1727895
2017-10-27 10:05:26 +08:00
Xinran 05cc14d399 Pagination support for server list API
We should support to return a list of servers according to users' requirements.
In this patch, marker, limit, sort_key and sort_dir were added in server list
API.
- marker is used to display a list of servers after marker
- limit is used to determinate the maximum number of servers to display
- sort_key is used to sort the returned server list by specified key value
- sort_dir is used to select a sort direction

DocImpact
APIImpact

Change-Id: Id70e965794c82a0a29e53d4364f65b0f39042c7c
Closes-Bug: #1726665
2017-10-26 07:40:05 +00:00
Tao Li ea83f4711a Add db api layer for CRUD operations
Add the DB layer Operations for server tags

- set/unset server tags
- get server tags
- add/delete single tag
- check whether server tag exists

Change-Id: I2338ece8e4ae880835f6e20ef1e9e71a228a9703
Implements: blueprint server-tags-support
2017-10-19 14:33:58 +08:00
Jenkins 57fe9d796f Merge "Add tag table in db and migration file" 2017-10-15 02:15:10 +00:00
Tao Li bbbe964ff4 Add tag table in db and migration file
Add a new table named 'server_tags' in mogan database. and
provide a migration script to upgrade the old datbase.

Change-Id: I509d4db82d2aaa4c75ba93812ff0055eb3bd56f7
Implements: blueprint server-tags-support
2017-09-26 16:02:32 +08:00
liusheng 10c429e08a [DOC] Add contributor guide for versioned notification
Change-Id: I79a2842bf31d6b8f6f697e4bdc980db959efa7cc
2017-09-22 09:24:57 +08:00
wanghao 7744129c83 Show respect to original author
Add origianl copyright in quotas.py

Change-Id: I39b935c56432dd19aa8f507f42170a812a28970e
2017-09-20 15:48:05 +08:00
Zhenguo Niu 511be25834 Show respect to original authors
We copied some codes/frameworks from Nova, but frogot to add
the original file informations, this tries to add them back.

Change-Id: I310d94fc334b6e72dc5eafa316f1b4842066ccbe
2017-09-20 11:16:19 +08:00
Jenkins 09392f9a29 Merge "Don't need to update flavor if only access projects changed" 2017-09-19 07:23:42 +00:00