Commit Graph

11 Commits

Author SHA1 Message Date
Dmitry Tantsur 90671a01e3 Get rid of testtools and fixtures
testtools was used to provide a smoother transition to Python 3.
fixtures seems no longer actively maintained and is mostly redundant.

Change-Id: I3fff3beafca13a783bcb4d5a811099ad491ac7ac
2020-05-04 11:19:58 +02:00
Sean McGinnis f6fb359cf5
Use unittest.mock instead of third party mock
Now that we no longer support py27, we can use the standard library
unittest.mock module instead of the third party mock lib.

Change-Id: I97af946c244559513689c1ea9ac2d736d55dbe0f
Signed-off-by: Sean McGinnis <sean.mcginnis@gmail.com>
2020-04-18 16:05:36 -05:00
Dmitry Tantsur 814611f022 Switch to allocation API instead of reservations via instance_id
Change-Id: I45882ddd18d2a91db9c3592c6ed527676b91091b
2019-05-17 13:28:58 +02:00
Dmitry Tantsur 9be7472236 Accept hostname in reserve_node in addition to provision_node
With the allocation API we will need to provide the hostname as
the allocation name. Thus, we have to do it earlier.

Change-Id: I8afd8af23ad929fd9768e95a82fecd114fdcbfd9
2019-03-15 14:49:58 +01:00
Dmitry Tantsur eee74d31b8 Completely switch to openstacksdk
Change-Id: I1729797fa03095d200c7334281915abc284b5732
2019-01-15 10:24:52 +01:00
Dmitry Tantsur df831309ba Support traits for scheduling
Story: #2003685
Task: #26209
Change-Id: I4895c414abc55ece6cf56133f13ffaa7cd4f5f92
2018-09-07 16:57:57 +02:00
Dmitry Tantsur 51a006e307 Rework scheduling filters
Remove ValidationFilter, make it a part of reservation to avoid calling
it too many times. Fix AttributeError on failing the custom predicate.
Remove double validation in the reserver, we do another validation later
on anyway.

BREAKING: changes the exception classes.

Change-Id: Ibc3815989917ab777298a05810fd8f3e64debc8f
Story: #2003584
Task: #26178
2018-09-07 15:37:33 +02:00
Dmitry Tantsur a638cec066 Allow filtering by arbitrary predicate and conductor_group
BREAKING: changed order of arguments in reserve_node.

BREAKING: changed exceptions inheriting ReservationFailed.

Change-Id: I79cc9b2794d8332cdb818af0b7effb28d4e9a786
Story: #2003584
Task: #24890
2018-09-05 12:25:11 +02:00
Dmitry Tantsur 23fbeea112 Add docs generation (+ clean up)
Moved public access to exceptions from metalsmith itself to
metalsmith.exceptions to avoid clutterning the former.

Updated tox.ini to use upper-constraints.

Change-Id: I136e036749171dc6d36d644e79c6fcfeef6242af
2018-05-18 13:12:29 +02:00
Dmitry Tantsur 23d605c212 Allow missing local_gb if root_disk_size is provided
Change-Id: Ieb89044b1f3243cc09b49f3afbca96c7602b0b06
2018-05-15 18:29:07 +02:00
Dmitry Tantsur 9f1b7755fc Grand refactor to split out reusable bits 2018-05-08 21:32:14 +02:00