Commit Graph

89 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 <xin-ran.wang@intel.com>
Change-Id: I89947796e120d89ec56f8f5daeb9774cf15b6bd0
Implements: blueprint system-metadata
Closes-Bug: #1727913
2018-02-05 14:17:03 +08: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
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
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
liusheng f10c8e1c2e Don't need to update flavor if only access projects changed
Closes-Bug: #1718092
Change-Id: I043ecb9087eb3e8425432c6e325b7f87eaf96028
2017-09-19 11:32:43 +08:00
Jenkins d45a8de43c Merge "Return node name with server API object" 2017-09-12 04:26:23 +00: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 1c50ceed0b Add preserve_on_delete to server nic object
This field will indicate whether we should delete or unbind the
port during server deletion or detaching interfaces.

Change-Id: I25834a82b83806bf87b4c7006a8d33d56e2ce976
Closes-Bug: #1715040
2017-09-11 09:53:20 +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
Jenkins 6e28762b40 Merge "Return node(name or uuid) with server instead of node_uuid" 2017-09-05 15:01:13 +00: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 91eb325a44 Merge "Rollback to the original status when server powering action failed" 2017-09-05 04:42:47 +00:00
Tao Li 4b80551346 Rollback to the original status when server powering action failed
As we don't move server status to error when power action failed, the
status will be stuck in *ing forever.

Change-Id: Ie98ec4c5d2d848ca13dae4d891f762cd58650fad
Closes-Bug: #1690096
2017-09-04 14:23:30 +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
liusheng 639aeceafb Use server group in scheduler
This change will allow the scheduler to select nodes with specified server
group in schedule_hints.

Partially Implements: bp support-schedule-hints
Change-Id: Idecd5e5f470eee12de0088b2332874b43f9dae52
2017-08-30 14:17:16 +08:00
Jenkins a85fe38f3d Merge "Leverage _detach_interface for destroying networks" 2017-08-28 04:34:04 +00:00
Zhenguo Niu 9b6e5870a3 Leverage _detach_interface for destroying networks
During network task revert, we should unplug vifs as well.

Change-Id: I26b1ba8ffba167683613d901bcbee65fde1f4b2d
Closes-Bug: #1712511
2017-08-26 02:55:59 +00: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
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
Jenkins c05a8dd2a9 Merge "Add aggregates filters when do scheduling" 2017-08-11 10:40:45 +00:00
Zhenguo Niu 7ec20fdd31 Add aggregates filters when do scheduling
We should extract resources aggregates information from flavor,
and pass it to placement with resources filters.

Partially Implements: bp node-aggregate

Change-Id: I96eeb7ab6636fa241e7d82bbddad8d70791c1f43
2017-08-11 07:24:26 +00:00
liusheng a9c67464b6 Add the missed quota object importing
This make sure the objects version check test can work locally

Change-Id: I5328286dc0ddd74ada3fbfc1a4d85abe40f84167
2017-08-11 10:38:20 +08:00
Jenkins 8c9947c547 Merge "Add ServerGroup object" 2017-08-10 13:55:17 +00: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 3760f43af4 Add ServerGroup object
This change adds ServerGroup and ServerGroupList objects

Partially Implements: bp server-group-api-extension
Change-Id: Iaff5d00aa27d36852421233a8b8f466ce2088667
2017-08-09 17:01:27 +08:00
Jenkins e7c202cf7a Merge "Fix aggregate metadata update/remove error" 2017-08-07 19:54:52 +00:00
Zhenguo Niu 977c1d23b1 Fix aggregate metadata update/remove error
* Fix a typo of orig_metadata
* Move metadata update under db session

Change-Id: I07f71d0b93ca5431d32e4e9de37456fb5b69a964
2017-08-07 11:23:47 +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 a3010af334 Merge "Support quota for keypairs in Mogan(part-three)" 2017-08-01 08:52:36 +00:00
Jenkins 5ce37152fe Merge "Add aggregate API" 2017-08-01 07:08:37 +00:00
Zhenguo Niu a637bfd38a Add aggregate nodes API
* list nodes for the specified aggregates
* add node to an aggregate
* remove node from an aggregate

Change-Id: I78ce523c7ba26860e02dcde84bcb84a6cc0c60ee
2017-07-31 11:03:28 +08:00
wanghao a7d6d054c1 Support quota for keypairs in Mogan(part-three)
Introduce the quota management in keypair creation and deletion.

Change-Id: I8241b0bfb38a9c41b564df07a7799e4bc5438c0d
Implements: blueprint quota-support
2017-07-31 10:37:34 +08:00
Zhenguo Niu 27f3b1832a Add aggregate API
This addes the aggregate APIs and docs

Partially Implements: bp node-aggregate

Change-Id: Iaa8d1de301f09360f7aa36e3a8fe5829e65b55c9
2017-07-28 12:53:39 +08:00
Zhenguo Niu d830dc7256 Clean up some unused codes
Change-Id: I5552795255b5bfcaf125f3441d6ee7ea7359ec5d
2017-07-28 11:26:41 +08:00
Zhenguo Niu b9b1a5200a Add aggregate object
This adds aggregate and aggregate metadata objects.

Partially Implements: bp node-aggregate
Change-Id: Ie2046e78e0a51b326f69cead2b095e3978fb355e
2017-07-26 10:58:10 +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
liusheng d194741e10 Clean the compute_node and compute_port objects and db interfaces
This change clean the compute_node and compute_port versioned object
implementation and them db interfaces, after we totally switch to use
placement, we don't need to store any node info in Mogan's db.

Partially Implements: bp track-resources-using-placement

Change-Id: I515674d17a85a77a9380a60ef918dc6dbda8ed83
2017-07-17 14:37:09 +08:00
Zhenguo Niu d18afdeab1 Trivial-Fix: Correct KeypairExists exception message
Change-Id: I4985e8a64115f2632ddcadca79580192ab37de39
2017-07-12 13:26:39 +08:00
Tao Li 4e34d886b9 Fix reverting the network when plug vif failed
Currently, the port is not removed correctly when plug vif failed,
So we should fix it.

Change-Id: I095f0c3cc8fa281beb494a19f25cc20774df21f2
Closes-Bug: #1700437
2017-07-10 15:40:55 +08:00
ZhongLuyao f9affb75f2 Update ironic.driver.plug_vif implementation
port.update is replaced by node.vif_attach

Co-Authored-By: Xinran <xin-ran.wang@intel.com>

Closes-Bug: #1694942
Change-Id: Ie0f9043a93da2b3b8dfbc660f7575c3235f751b9
2017-07-03 03:51:47 +00:00
Zhenguo Niu 4b6df25fd8 Adds `resource_traits` field for flavors
The `resource_traits` field is intended to be used to reference
the resource qualities.

Partially Implements: bp new-flavor

Change-Id: I5fa154dbf8bc96d15c3cdd3699c671e5eccc1cdd
2017-06-24 08:38:52 +00:00
Zhenguo Niu fc005946a3 Adds `resources` field for flavors.
The `resources` field is intended to be used to reference baremetal
node resource classes and also other generic resources in the cloud
tracked by placement.

Partially Implements: bp new-flavor

Change-Id: I4e8fe15aed612e62cec96d1acad236cd0924d597
2017-06-24 16:38:34 +08:00
Jenkins 6fec2da0d9 Merge "Adds `disabled` field for flavors." 2017-06-19 12:09:53 +00:00