Commit Graph

146 Commits (master)

Author SHA1 Message Date
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 <>
Change-Id: I89947796e120d89ec56f8f5daeb9774cf15b6bd0
Implements: blueprint system-metadata
Closes-Bug: #1727913
2018-02-05 14:17:03 +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
Xinran eeabfedc54 Add admin_password support
Mogan should support to inject an admin password into a bare metal server.


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
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
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
- 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


Change-Id: Id70e965794c82a0a29e53d4364f65b0f39042c7c
Closes-Bug: #1726665
2017-10-26 07:40:05 +00:00
liusheng 185e6e9302 Drop the getting server state API
This API is redundant because all the status can be displayed in server

Change-Id: I5013d6746d2f6c4380563f319b3bd1fba7671bd6
Closes-Bug: #1717406
2017-09-15 14:17:28 +08:00
liusheng 244f31f88c Add *locked* field in server response
Closes-Bug: #1717405
Change-Id: I946879f9505b0fc91e1726b61b5ee235427ac0e0
2017-09-15 14:17:24 +08:00
Zhenguo Niu 279100a520 Add partitions to server API object
Add partitions to make sure it returned with the API response.

Change-Id: I11fa63df60785f79116fa40d5f3cd7427a003add
2017-09-14 18:30:37 +08:00
Zhenguo Niu b55a988327 Disable flavor traits on API side
As we can't support traits now when talking to placement, so
disable it to avoid to confuse users.

Change-Id: Ib739f0cae03bf12b1c7ae1af7c3a9ec94b40cce1
2017-09-13 13:11:49 +08:00
Zhenguo Niu a4b1ee741f Return node name with server API object
Currently we support to list compute nodes and aggregate nodes
with names, but server show will return the node uuid always,
which makes the admins have to go to ironic to get the relationship
between name and uuid, so this changes to return node name.

Change-Id: I6f1e5d0f9cfe277fe952d21b38ebfe68dde4f745
Closes-Bug: #1715036
2017-09-11 19:05:09 +08:00
Jenkins 811dd3dcf5 Merge "Manage existing BMs: Part-2" 2017-09-11 10:53:18 +00:00
Tao Li 26508fd131 Manage existing BMs: Part-2
Add the adopt baremetal node API.

Change-Id: I1897129930bface6a6c4a179e02d6107ff3811af
Implements: bp manage-existing-bms
2017-09-11 16:57:35 +08:00
Zhenguo Niu 10d714a827 Fix addresses show within one network
This makes the server show with all addresses in a same

Change-Id: Ie9254fd6795783335d1fa7083865a3a04a9887e5
2017-09-08 18:00:25 +08:00
Zhenguo Niu 93da16d88f Revert "Return node(name or uuid) with server instead of node_uuid"
This reverts commit 5124ae1d44.

Change-Id: I0ff6f7e22afbe8833bbc6044b8b7f5c768c9b940
2017-09-07 17:29:56 +08:00
Zhenguo Niu 028b28594f Add root disk partitions support
This adds root disk partitons support to allow users to specify
root, ephemeral, and swap size.

Implements: bp root-disk-partitions

Change-Id: I9562f39501c23579ba561f0cd4cbb8ef60674a6b
2017-09-06 17:30:25 +08:00
Zhenguo Niu 7d78b09a01 Add preserve_ephemeral support for rebuilding
Currently we don't support preserving ephemeral partition when
requesting to rebuild, we need to expose the ability to users.

Change-Id: Ia10ab6a8d6dd6beba8837e7d0414dc6984dd2426
Closes-Bug: #1714852
2017-09-06 09:12:40 +08:00
Zhenguo Niu 5124ae1d44 Return node(name or uuid) with server instead of node_uuid
Currently we support to list compute nodes and aggregate nodes
with names, but server show will return the node uuid always,
which make the admins have to go ironic to get the relationship
between name and uuid, so this changes to return node name.

Change-Id: Ia0e5122aa29c4de2e870c5b71c420de49530ba92
Closes-Bug: #1715036
2017-09-05 14:53:54 +08:00
Jenkins 5cd5e24a31 Merge "Return key name with server API" 2017-09-01 02:44:15 +00:00
Xinran 3b026239f9 Return key name with server API
Change-Id: Ia8d7c917afc3bae04997161f8bb55c30cd196d60
Closes-Bug: #1712234
2017-08-31 09:55:16 +00:00
Jenkins e03982d000 Merge "support specifying port_id when attaching interface" 2017-08-30 09:58:03 +00:00
Xinran 817748c6b0 support specifying port_id when attaching interface
Change-Id: I5d3f18a32c357096f5a6090abed1d8d480a93c6f
2017-08-30 15:01:06 +08:00
Zhenguo Niu dead07444c Add socat console support
This adds another serial console type socat support.

Change-Id: Ic443d050790aee2ea2e27daf165310f8e292fda7
Implements: bp socat-console
2017-08-29 17:07:23 +08:00
Jenkins 30a16bc608 Merge "Add support for scheduler_hints" 2017-08-28 04:39:26 +00:00
Jenkins 2a569c8533 Merge "Return addresses with server API object" 2017-08-28 04:34:48 +00:00
liusheng 6302f74832 Add support for scheduler_hints
Partially Implements: bp support-schedule-hints
Change-Id: I7c482ca0ac1031f0017c6bc832892111ecfb20dc
2017-08-26 18:04:57 +08:00
Zhenguo Niu 7bf7a776fd Return addresses with server API object
Replace server.nics with server.addresses to only return basic
addresses info with server API object, and we also provide an
API to get networks infomation.

Change-Id: If684252f8112e3879f096403d5b9daed2bd5951a
2017-08-26 10:17:12 +08:00
wanghao d577c88d4a Manage existing BMs: Part-1
This patch introduce a new API:
'GET: /manageable_servers' to list the adoptable nodes
from drivers to operators.

As a reference, now we implement api in the Ironic driver.


Implements: bp manage-existing-bms

Change-Id: I56340ce534c3b8d4e855a4c753ecf90a07147d29
2017-08-25 19:42:58 +08:00
liusheng 0a7e49aacc Add affinity_zone field for server object
Partially Implements: bp server-group-api-extension
Change-Id: Id118e661cace434c5a08ed28c65da70fe5bda6b0
2017-08-25 11:47:14 +08:00
Jenkins 574d5f4cb0 Merge "Add checks for aggregate affinity_zone" 2017-08-24 08:29:28 +00:00
Jenkins db41f26426 Merge "Replace server fault_info with fault" 2017-08-22 06:44:08 +00:00
Zhenguo Niu 2f376e39a6 Replace server fault_info with fault
There's no need to change the object field name in
API object.

Change-Id: I4c368d6a2ef9e0f28df8dec23a25dff8a621284c
2017-08-21 14:51:04 +08:00
Xinran 108348ad41 Specify image when do rebuilding
Implements: bp specify-image-during-rebuilding

Change-Id: I83104f4209eb4f67699ea9a721509f704d232af9
2017-08-18 15:55:34 +08:00
Zhenguo Niu b95ab6b9f9 Add checks for aggregate affinity_zone
* Do not allow empty affinity zone
* A node can not be in different affinity zone

Partially Implements: bp server-group-api-extension

Change-Id: I0b96ddd16bd51975d1fadb93760854bb8c486be7
2017-08-15 19:10:55 +08:00
Zhenguo Niu da476a99c6 Make disabled flavors not available for common users
The disabled field is intended to not allow new servers
created from that flavor, so this makes it happen.

Partially Implements: bp new-flavor

Change-Id: I7a3509cef6f5dea5c7d6eac63fbb179a9850daae
2017-08-15 03:13:39 +00:00
Jenkins 262eea3278 Merge "Do not allow update flavor internal attributes" 2017-08-11 12:41:40 +00:00
Zhenguo Niu 3c15f2554a Add checks for aggregate availability_zone
* Do not allow empty availablity zone
* A node can not be in different availablity zone

Change-Id: I82096c60f9d871e5f3ddcbc905dfe62f70b19b79
2017-08-11 09:10:08 +08:00
Jenkins 8b874151da Merge "Add ServerGroup API interfaces" 2017-08-10 13:55:32 +00:00
Jenkins b61af5ad34 Merge "Normalize objects file name" 2017-08-10 13:43:53 +00:00
Zhenguo Niu 82b89b0cb7 Do not allow update flavor internal attributes
This makes it only allow to update '/name', '/is_public',
'disabled' attributes.

Partially Implements: bp new-flavor

Change-Id: I8eb584ee47ce6bcdc2fe229485fa8540d48aa923
2017-08-10 16:56:09 +08:00
Zhenguo Niu 6fc66c7bee Remove rp aggregate when the aggregate get removed
This tries to remove aggregate from resource provider in placement
when removing the aggregate.

Partially Implements: bp node-aggregate

Change-Id: Ia80a92ea8e19650b7b53d4d771e848079039aa28
2017-08-10 13:03:39 +08:00
Zhenguo Niu a1836f6c67 Normalize objects file name
* change objects/server_nics to objects/server_nic
* change api/availability_zone to api/availability_zones

Change-Id: I923bc5ee78eacc92e6eb1f75cbfea9e8905b674d
2017-08-09 18:51:03 +08:00
liusheng 2dc155534f Add ServerGroup API interfaces
This change adds ServerGroup interfaces

Partially Implements: bp server-group-api-extension

Change-Id: I56647ac7f871aee357b3cf05ab78d31548c96ee3
2017-08-09 17:01:38 +08:00
Jenkins b69a5d5a94 Merge "Add resource aggregates filed to flavor" 2017-08-07 16:00:30 +00:00
Xinran 535c788ed5 Don't return unuseful BM flavor info to common users.
Change-Id: I4a0f6ab139f08540e798c58a8ec847d650a93fc7
Closes-Bug: #1707858
2017-08-03 03:09:02 +00:00
Xinran 12ddae115e Return node uuid with server for admins
Closes-Bug: #1696378
Change-Id: Iad874b8c1f641722a09c6d06691bb44ad390beef
2017-08-01 18:06:59 +08:00
Zhenguo Niu 902a9ac65b Add resource aggregates filed to flavor
This addes a new aggregates field to flavor including
aggregates metadata key/value pairs. Then we can extract
resources quantitive, qualative and group informations
from flavors.

Change-Id: Ia85ff44fa9aabf2ef172c65c9ba9a3f0ce611b50
2017-08-01 10:05:53 +00:00
Jenkins 94ea8f2f01 Merge "Add aggregate nodes API" 2017-08-01 09:13:52 +00:00
Jenkins d48fdbf50e Merge "Add node list support" 2017-08-01 09:13:47 +00:00