Commit Graph

50 Commits

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 <xin-ran.wang@intel.com>
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.

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
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
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
liusheng 185e6e9302 Drop the getting server state API
This API is redundant because all the status can be displayed in server
response.

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

Change-Id: I83104f4209eb4f67699ea9a721509f704d232af9
2017-08-18 15:55:34 +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
Xinran 12ddae115e Return node uuid with server for admins
Closes-Bug: #1696378
Change-Id: Iad874b8c1f641722a09c6d06691bb44ad390beef
2017-08-01 18:06:59 +08:00
Jenkins 041dafae06 Merge "Add filters to server list API" 2017-07-20 05:20:09 +00:00
Xinran 0563c48554 Add filters to server list API
APIImpact
DocImpact

Closes-Bug: #1697390
Change-Id: I1fd41d0e1897d0187e49cb54c7d4539ce64a70ff
2017-07-19 17:22:41 +08:00
Jenkins ce70bceca4 Merge "Refactor exception raise by using mogan exception" 2017-07-14 11:56:14 +00:00
Xinran WANG bfecc061aa Detach interface for server
Partially Implements: bp attach-detach-interface

DocImpact
APIImpact

Co-Authored-By: Zhenguo Niu <Niu.ZGlinux@gmail.com>
Co-Authored-By: liusheng <liusheng2048@gmail.com>
Change-Id: Ib474e542a4d9c32bb15f91d0993e0f6dd990ca8a
2017-07-13 10:57:38 +00:00
wanghao ad83d1be16 Refactor exception raise by using mogan exception
Now in some process, Mogan catch the exception and
then raise a new wsme.exc.ClientSideError with an
additional http_code, but Mogan has defined the
http_code in some exception.

So we didn't need raise a new exception,
just raise the mogan exception if it has the http_code.

Change-Id: I9150301a43046af8a2e7290ccfebad8ca4118f90
Close-Bug: #1699075
2017-07-13 08:49:12 +08:00
Jenkins c9e4fe340b Merge "Make floatingip can be saved to db and can be displayed" 2017-07-06 02:37:02 +00:00
liusheng ff7211c35f Make floatingip can be saved to db and can be displayed
For now, we don't implementation the functionality of saving and
displaying floatingip to end users. This patch add that and improve the
check of association and disassociation floating ips.

Change-Id: I2b19dabb89b9915f5e3aec875bff3ef6c011c73a
Closes-Bug: #1698995
2017-07-05 01:00:28 +00:00
Vu Cong Tuan e4bf6a631f Stop using deprecated 'message' attribute in Exception
The 'message' attribute has been deprecated and removed
from Python3.
For more details, please check:
https://www.python.org/dev/peps/pep-0352/

Change-Id: If69389968f92b2b32f876c10ce9b4a00306c4d2a
2017-06-21 16:06:11 +07:00
wanghao 99abbe590a Specify neutron port when creating servers
Now Mogan can support network_ids in request of creation servers.

This feature introduces the support for specifying the port_ids
in request body too.

Change-Id: I7f25a97da6e45f06f9ef2def68eeaf294659a932
Implements: bp specify-neutron-port-when-creating-instances
2017-06-20 09:21:19 +08:00
Zhenguo Niu 5e7be51642 Revert "Add requested neworks check with the specified flavor"
This reverts commit 5938805af9.

As we plan to refactor the flavor and will get rid of the nics attribute
so this check will be done by scheduler filters

Change-Id: Ib916951cd2260146840b1fa7fd20aa4317bf8c01
2017-06-15 18:47:22 +08:00
Jenkins 12fe7e85d3 Merge "Rename the rpc_server/rpc_flavor variable with db_server/db_flavor" 2017-06-15 09:42:58 +00:00
Zhenguo Niu ed5993efce Change to use server metadata instead of extra
Use server metadata to be user friendly.

Change-Id: Ib396fba305d6138c2436a40559c267de5bb4e7f9
Closes-Bug: #1696899
2017-06-14 17:45:49 +08:00
liusheng ff0dc1bbb5 Rename the rpc_server/rpc_flavor variable with db_server/db_flavor
It actually is server object from db, so name it db_server to avoid
misleading.

Change-Id: Id4ca55160f4f94f1bd398c3915ad7059c461b485
2017-06-14 03:29:49 +00:00
Jenkins 17a45afa72 Merge "Add requested neworks check with the specified flavor" 2017-05-27 01:33:07 +00:00
Zhenguo Niu 5938805af9 Add requested neworks check with the specified flavor
This adds check for the amount of networks and port_type with
the specified flavor.

Change-Id: Ie30e6a903b559cab862d009841ebd95c34ec3fec
2017-05-26 17:19:45 +08:00
Zhenguo Niu c81e8b8faa Following up patch of fea6689e74
Change-Id: Ia373415e352721c8df1e80eb5aa56ad94177b9ad
2017-05-22 14:14:56 +08:00
Jenkins 896ef30bf0 Merge "Attach interface for server" 2017-05-19 04:14:32 +00:00
Zhong Luyao fea6689e74 Attach interface for server
Partially Implements: bp attach-detach-interface

Change-Id: I3c852428676c19ebaeee1954c1a78e77a61eb014
2017-05-18 09:11:48 +00:00
liusheng e9e3db6149 Refactor the network_info field in API layer
This change use a list of nic dict to replace the old "network_info" field
in instance body.

Change-Id: Ie38e50287a2a602e030d19c8b45196ed8337d677
2017-05-04 09:13:57 +08:00
ZhongLuyao 829e95b3f9 bug fix: return fault_info correctly
return fault_info (code, message, detail included) to user
when server status is error.

Change-Id: I57d8711d15e8014da29622e25b595bedff6c65f8
2017-05-03 03:30:03 +00:00
liusheng 7d0f8ab360 Rename instance to server and instance type to flavor
Change-Id: I35a7fb0b4f3fa9e09f2fc2c739c0a9b39a8576ab
2017-04-28 14:23:22 +08:00