Commit Graph

11 Commits

Author SHA1 Message Date
Harald Jensås a71776b8a4 Get ports by 'binding:host_id' query filter
By retriving ports from neutron by 'binding:host_id', i.e
ironic node uuid we can remove the list_node_vifs() call
for each node.

Story: 2010571
Task: 47302
Change-Id: I1d85f3341e04ddf969027a6f6839f4a807666258
2023-02-07 22:59:38 +01:00
Steve Baker cf6b37ab22 metalsmith list handle missing port
Currently if a port is missing, running metalsmith list will fail with
an error. This change handles missing ports by not showing any IP
address for that VIF, and logging a warning.

Change-Id: I94924ebc81b46a2aa4c3b6f82bd46480f37b3150
Resolves: rhbz#2092444
2022-06-16 09:43:59 +12: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
Iury Gregory Melo Ferreira c765bbe8a8 Stop using six library
Since we've dropped support for Python 2.7, it's time to look at
the bright future that Python 3.x will bring and stop forcing
compatibility with older versions.
This patch removes the six library from requirements, not
looking back.

Change-Id: I19384db89fc2a68376efc3f9f2e05fbd05046fd6
2019-12-03 15:15:20 +01:00
Dmitry Tantsur e9c25b02e5 Use allocation name for hostname instead of a custom field
This concludes the switch to the allocation API.

Change-Id: I25cdae7d17604140f728fdbcfea4110cbd222679
2019-06-07 11:08:48 +02:00
Dmitry Tantsur 0e7fa76b5a Remove features deprecated in Stein
Change-Id: I9825df90c69233acaf3c712f371e33aaf2042d4c
2019-05-24 14:20:08 +02:00
Dmitry Tantsur 1afa4ac4ed Expose Allocation objects on Instance
Change-Id: If62a6829478c532428aff2f5f51edc35df8ee2e1
2019-05-16 12:15:52 +02:00
Dmitry Tantsur 02932096df Clean up the edge cases around states
Currently show_instance returns an Instance even if the requested node
is not actually an instance (e.g. just an available node). This change
corrects it. Make list_instances consistent with it.

Also make the states a proper enum to avoid consumers from using invalid
values (I did it several times when working on this patch).

Change-Id: If9aad0d7f4d10a7119d1f0bccc1cc32a918a72e3
2019-01-18 17:49:01 +01:00
Dmitry Tantsur eee74d31b8 Completely switch to openstacksdk
Change-Id: I1729797fa03095d200c7334281915abc284b5732
2019-01-15 10:24:52 +01:00
Dmitry Tantsur f57e7547af Remove indirection when accessing Image and Network API
Change-Id: I1c6bc900088eb1bc925ef0471f4405208e874348
2018-09-06 18:57:47 +02:00
Dmitry Tantsur 7b3561bb9a Move Instance to its own file
Change-Id: I607b804f719e2a660c2e52a672b68b9281af4569
2018-06-18 17:01:24 +02:00