Commit Graph

37 Commits

Author SHA1 Message Date
Zuul fce0cb4c25 Merge "Remove 'locked' from server object" 2017-11-23 06:30:50 +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
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
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 c540eb16ca Reduce test_keypair time consuming
Set keypair quota limit config option in the test case instead of
creating 100 keypairs there.

Change-Id: I5f1fbc9a67174db4e88ac73c9c6e98ce5455bed9
2017-09-11 13:09:53 +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
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 b3c8d17270 Merge "Remove the duplicate flavor disable check" 2017-08-22 06:56:13 +00:00
Zhenguo Niu 98fd7160e7 Remove the duplicate flavor disable check
We moved the admin role check to db api side, so common users will get
a NotFound error, if they try to get a disabled flavor. Also we check
whether the flavor disabled on api side, if so, we will raise a
FlavorDisabled error to admin users.

Change-Id: I4b4595bab266a7041b860e582c64a0198e50c322
2017-08-21 01:41:28 +00: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
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
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
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 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 b4ae79c2be Adds `disabled` field for flavors.
The `disabled` field is intended to be used when phasing out
flavors. In this case, a delete wouldn't work because the flavor
needs to still be available for live servers using that flavor,
but we don't want to allow *new* servers created from that flavor.

Partially Implements: bp new-flavor

Change-Id: I12713bfe13f506a0d9bb79f733b00bd637ef227b
2017-06-19 10:09:43 +08: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
Jenkins 75bfaeb0f3 Merge "Improve the multi-instance creation" 2017-06-02 06:38:16 +00:00
Tao Li 3c5548343a Improve the multi-instance creation
Select all available nodes before staring to create servers. If not
enough nodes for request instances, then abort the this process.

Closes-Bug: #1691699

Change-Id: I041927ed056859f30829b5fdcd0f7b486832424a
2017-06-01 17:21:15 +08:00
jeremy.zhang d27cd4c018 Using assertIsNone(xxx) instead of assertEqual(None, xxx)
TrivilalFix

Following OpenStack Style Guidelines:
[1] http://docs.openstack.org/developer/hacking/#unit-tests-and-assertraises
[H203] Unit test assertions tend to give better messages for more
specific assertions. As a result, assertIsNone(xxx) is preferred over
assertEqual(None, xxx) and assertIs(xxx, None)

Change-Id: I8ea5708d2dd71ed29abdf21036f0d671eff2cd26
2017-05-28 00:18:03 +08:00
liusheng 7d0f8ab360 Rename instance to server and instance type to flavor
Change-Id: I35a7fb0b4f3fa9e09f2fc2c739c0a9b39a8576ab
2017-04-28 14:23:22 +08:00
Zhenguo Niu a7224e4ba9 Add support for injecting keypairs
Change-Id: I6aa4f8ca970ca70e7e2279e2436e94939e065e1f
2017-04-22 11:21:06 +08:00
Zhenguo Niu 80d8397bd4 Add injected files support
This addes the ability to inject files on instance launch. We follow
nova's way to use 'personality' to specify the files.

Change-Id: Ic74632b0922d2c7e2dd9b2907304e45ade7376c4
2017-04-14 15:45:38 +08:00
Zhenguo Niu c610213199 Add user_data support
We should allow users to specify user data when creating an
instance.

Change-Id: I8fcd9aa4ca091ba3435292b519a999653a6d5b19
2017-04-12 10:26:19 +08:00
Zhenguo Niu 83dfea98c9 Move list-az from engine manager to api
There's no need to issue a rpc request to manager to list az from DB,
we can just do it from api side, also this saves a rpc call.

Change-Id: Ie10db1f0df3a255d4bdbfb334936a9c03e3e900c
2017-04-05 15:04:34 +08:00
wanghao efa63af620 Support quota in mogan(part two)
This patch introduces the quota operation in
creating and deleting instances process.

Change-Id: If6573fafc5acb805cf727acdc8f0f9872fc1a717
Implements: blueprint quota-support
2017-03-29 14:46:30 +08:00
Zhenguo Niu 8cfef9cd82 Change to use mock assert_not_called()
Change-Id: I142c857a3150dd9887dd11eb7d907ef404acf488
2017-03-24 17:59:57 +08:00
Zhenguo Niu 71bb41de95 Refactor rebuild instance
Change-Id: Ibed48d9b281780221f3c91811622352535823f8f
2017-03-10 18:00:40 +08:00
Zhenguo Niu 15d2e90bc2 Add rebuild instance support
We should support rebuild/redeploy instance.

Change-Id: Ic1c98c8944d3ec5ae5c80e8d2de655412ba91243
Implements: bp rebuild-instance
2017-03-04 22:20:17 +08:00
zhangjl 1f21101df1 Lock instances support in Mogan(part 3)
Adds lock/unlock api for mogan.
This patch is the last of lock/unlock api in mogan server side.
And this patch aims to add lock state checking when executing
other operations.

Change-Id: I58075b21d76d00a1acf41ecf782531516ca959a9
Implements: bp lock-instances
2017-02-17 01:56:56 +00:00
Jenkins 5ec24c2dc9 Merge "Following up patch of multi instance creating" 2017-02-16 15:11:21 +00:00
Zhenguo Niu 9bdfa26f2f Following up patch of multi instance creating
Change-Id: I47026b52d13652dcd6bad29d56b8766e7b7b6c2b
2017-02-16 20:21:29 +08:00
zhangjl 36e4401103 Lock instances support in Mogan(part 2)
Adds lock/unlock api for mogan.
This commit finish the main flows and leave some lock state
check for another commit.

Change-Id: Ib4bb8b87384b6a3eba845b3ddcd8bd6f1d3dc6c9
Implements: bp lock-instances
2017-02-16 02:06:20 +00:00
Tao Li 62a0f6d86a Support multi-instance creating (part 1)
Support to create multi-instance in one request of mogan.
This commit finish the main flows and leave some network check
for another commit.

Implements: bp support-multiple-creation

Change-Id: I24fcc94c8acfb8b351579a5a96eb129c7a59efbe
2017-02-15 09:32:01 +08:00
Zhenguo Niu 719efacd9d Add default_availability_zone config option
The option determines the availability zone to be used when it is
not specified in the baremetal node. default_schedule_zone is used
for scheduling when it is not specified in the instance creation
request, if it is not set, any node can pass the scheuling az filter.

We use 'nova' as the default value to avoid issues in cross projects
scenario.

Change-Id: Ib8aee86ffc6c552891555fb553438ae65fc01b7a
2017-02-08 17:14:43 +08:00
Zhenguo Niu b28a51c904 Introduce a state machine for instance status
State Machine helps us to manage instance states transitions.

Change-Id: Ie7b7d33ea509484a98344e0a95728075d6aebe47
2017-01-16 18:52:20 +08:00
sxmatch 4fd1aab5b3 Rename nimble to mogan(part three)
This part includes codes folder renaming.

Co-Authored-By: Zhenguo Niu <Niu.ZGlinux@gmail.com>

Change-Id: I919f17a769baee44ce19f65bab900f9d6bd8b982
2017-01-04 22:53:39 +08:00