Commit Graph

312 Commits

Author SHA1 Message Date
Julia Kreger 7241770603 Invoke tests with fake interfaces
So it turns out as highlighted by looking at bug 2054722
that you can end up creating nodes with "fake" hardware nodes
in the default config we test in the gate, which end up with
"fake" as the deploy_interface, but if you try to run the
same test against a production configured ironic deployment,
it fails because it likely ends up with a default of "agent"
as the deploy_interface.

Unfortunately, a review of test logs also reveals that the
same basic problem exists with the network_interface field
*as well*, where tests were written expecting the default
to be a fake or noop interface out of the box.

Note: This depends-on is to be removed before mering, it is
      enable additional issues to be identified.

Change-Id: Id0051d9b39bc0f46e3afee5bbfa8a2062114df80
2024-03-06 15:08:11 +00:00
Zuul f5bfe9b319 Merge "Test multiple boot interfaces as part of one CI job" 2024-03-06 03:27:33 +00:00
Julia Kreger 18eb2c4828 Test multiple boot interfaces as part of one CI job
The idea here came out of the 2024.1 PTG held in ?October? 2023,
with the goal of being able to exercise testing of boot interfaces
as a group in a single job, instead of spreading it out amongst
CI jobs with different scenarios.

That doesn't mean different scenarios are wrong, but as we add more
boot interfaces as part of supporting HTTPBoot, we cannot double
our scenarios.

In theory, the hope is we should be able to consolidate down several
secenario jobs into just one test running these jobs.

Change-Id: Id41ee40c36624387216b2cfc1501f01a3217b2af
2024-02-12 12:08:38 -08:00
Jay Faulkner f2b9c74c9c Basic API tests for sharding
Validates:
- Unfiltered requests get sharded nodes
- Filtering by a single shard
- Filtering by >1 shards
- Filtering by sharded nodes
- Filtering by unsharded nodes

Change-Id: Id37e8d6db098bb8decae87b6184bab4482321316
2024-02-08 14:48:50 -08:00
Zuul 53039461b0 Merge "Ensure scope logic is enforced" 2024-01-24 23:13:50 +00:00
Julia Kreger 638dcb7706 Ensure scope logic is enforced
Back after we added the new policies, at some point we should
have changed the default state for the tempest tests so they
assume/default to the understanding that Ironic is enforcing
scope and to use the appropriate client when launching tests,
because Ironic restructed it's access model to better align
with the overall community and further enable infrastructure
operators.

Closes-Bug: 2051137
Change-Id: I564af48698d20a150699933bf7e2e829b104ab04
2024-01-24 07:48:31 -08:00
Kyrylo Romanenko 95b901c3ff Add negative tests for VIF attach/detach operations
Add tests:
  test_vif_already_attached_on_internal_info
  test_vif_already_attached_with_portgroups
  test_vif_attach_no_free_port
  test_vif_attach_no_port
  test_vif_attach_with_empty_portgroup
  test_vif_attach_port_not_in_portgroup
  test_vif_attach_node_doesnt_exist
  test_vif_attach_no_args
  test_vif_detach_not_existing
  test_vif_detach_no_args

Closes-Bug: #1666534
Change-Id: I657fbecd37ceec424da6182507f324b653288857
2024-01-22 03:35:47 +04:00
Zuul 227a519fc9 Merge "Add test for dhcp-less vmedia based deployment" 2023-12-05 20:39:46 +00:00
Julia Kreger d8e25ec09f Add snmp variant of ramdisk iso boot test
Change-Id: I3e3849a9aefcc568dd39f3765d6b8e8784b2771a
2023-11-16 17:49:59 -08:00
Julia Kreger 793608a857 Add test for dhcp-less vmedia based deployment
Creating test to help facilitate the fix of bug 2032377 and
ultimately help ensure we have a backwards compatible fix.

The scenario:

* Creates a shiny new network without dhcp, and adds a router.
* Sets that network as the provisioning network for the node.
* Creates a port on that network, assigns that port as the VIF.
* Creates a configuration drive network_data.json file payload
* Triggers deployment, utilizing the aformentioned network_data
  payload and configuration drive.
* Once deployment has complete, attempts to ping the remote host.
* Once pingable, and this is configurable, it will then attempt
  to rebuild the remote host, basically forcing the condition
  covered in bug #2032377.
* Rebuild is completed, and the host is attempted to be pinged,
  again.

To facilitate this, three configuration options have been added.
Two are external network settings. Because there is no way in
a devstack configuration of neutron to advertise the next hop
router, we have to have a pre-assigned/configured IP on the
external network we can attach a router to. We also need to know
the external network ID.

Then there is basically a option flag if we wish to exercise the
pattern for bug 2032377. Ideally, this would be always, but with
the complexity and fact a non-stock IPA image is required, one
sort of needs to know and then configure as appropriate.

Change-Id: Ic848b8051e4d863f30d47c833d334afc879e4f20
2023-11-03 15:11:30 -07:00
Harald Jensås 3c8235ed02 rbac - Fix vif_attach expected return values
Client vif_attach only return resp - not body.

On a system without policies enabled the test fail with
too maby values to unpack - which is confusing ...

Change-Id: I36bce09c9ffe31364d738809adabe65a3af8443f
2023-06-01 00:35:34 +00:00
Zuul d5c0acf722 Merge "Clarify checksum for wholedisk images." 2023-05-25 16:06:44 +00:00
Harald Jensås 72c5ed3351 Fix rbac indicator tests
Also disable test_reader_cannot_ipa_heartbeat,
will follow up.

Depends-On: https://review.opendev.org/882597
Change-Id: I966ae89333b6ad553b6f1398d61bc7d8f8b72c74
2023-05-24 07:57:18 -07:00
Riccardo Pittau f29753262e Fix rbac tests
Fix the exceptions got from test_reader_cannot_get_indicator_state
and test_reader_cannot_ipa_heartbeat.

Also get_indicator_state takes only 2 arguments since the get_one()
function takes only 2 positional arguments besides self, node_uuid
and indicator.

Change-Id: I4b5399562ffddb6e603f457aef1423f1fe7ba93e
2023-05-04 14:58:32 +02:00
Julia Kreger ec74c1c0f4 Clarify checksum for wholedisk images.
Change-Id: I4ae825a09838dae198ff663cfc1e602b10bc7084
2023-05-02 12:58:39 -07:00
Julia Kreger e4756405cd
Secure RBAC Test
Enforce/test the state of each policy's engagement for
baremetal nodes, project reader and system reader.

The tests use a try clause, catches the exception and
checks the response status code match what is expected.

Change-Id: I0b5f8eb881462f5d78f65bd37fbb8b296d9880eb
2023-04-19 01:43:12 +02:00
Dmitry Tantsur 5952cbd6da Split the ramdisk ISO test
I have a feeling that class-level logic involving CONF does not work
because CONF is populated later.

Change-Id: I65c65faf55069a4c9d668e0e0ba06ffc8b6b43ed
2023-03-03 15:18:04 +01:00
Zuul 5ac31e71ea Merge "Disable use of the SSH agent for the rescue test" 2023-02-17 11:18:13 +00:00
Julia Kreger b4f8b42c8e Disable use of the SSH agent for the rescue test
Paramiko, by default, attempts agent based authentication before
ever attempting password based authentication. But this doesn't
work so well if the environment has an agent running or thinks it
has an agent running, because it breaks the rescue test.

Instead, explicitly tell the tempest and thus paramiko to *not* use
the ssh-agent functionality.

Depends-On: https://review.opendev.org/c/openstack/tempest/+/872566
Change-Id: Ia2870579c7398d359b8d360fe7d1e42abb79b299
2023-02-02 08:31:54 -08:00
Julia Kreger cda96d5ca3 Prevent protected node tests from orphaning test nodes
While investigating failures where four orphaned nodes
were observed after running the tempest plugin against an
operating environment, it was discovered that each node
was created by the TestProtectedNode class. A review of the
logs indicated that tearDown() was being called, but
resource_cleanup was never being called which houses the
unified resource cleanup. Upon reviewing the pattern
in tempest itself, generally resource_cleanup is used
instead of teardown, however with our class structure,
that doesn't seem to work, so instead we just
explicitly call to unset the protected state for each
node.

We should now be consistent, and the four TestProtectedNode
tests should no longer orphan four nodes when run.

Also added some additional logging to help spotting cases
where orphaned nodes might be occuring, in order to aid
in troubleshooting when reviewing Tempest logs.

Change-Id: I4dc6140f1dbcf1bb891fa522523957c1d8002df4
2023-01-20 18:04:22 +00:00
Kamlesh Chauvhan 30d1f902da OOB inspection timeout fix for iDRAC
Make inspection timeout configurable to fix iDRAC driver out of band
inspection intermittent timeout issue for idrac-wsman and idrac-redfish
inspect interface.
For idrac, at least 20 seconds is recommended to be set for inspect
timeout for successful execution of OOB inspection.

Change-Id: Ibdf78d0669d0afb43d32bb71e7710145ffb7c05e
2022-12-02 09:21:29 +00:00
Aija Jauntēva 4684f915b5 Fix typo: BaremetalIdracRedfishConfigurationMolds
Configuration in the class name was mistyped.

Change-Id: I349e4e2e3d7dcb90c25860b34d6be19b458ff584
2022-11-11 04:28:41 -05:00
Julia Kreger 982d177007 Tempest test for anaconda deploy
Provides a test and substrate changes to support integration
testing of the anaconda deployment interface from a "standalone"
perspect.

This is present in two forms, a "with stage2 ramdisk" and
"without stage2" test which is enabled, or not depening
on the underlying configuration.

This test also has two modes of operation, the first and
default being primarily a "did anaconda start and can I
ping the machine?" test mode. The second attempts to wait
for the node to reach an active state, although it is not
the default because an anaconda deployment, depending on
mode of use, even with a default configuration can take
a substantial amount of itme. The anaconda deployment
interface is also modeled for highly tuned configurations,
so the prime aspect is "does it boot? does anaconda start?"

Also:
* Removes the explicit requirement that test classes explicitly
  declare support for wholedisk_image or not.

Change-Id: I42933d26268b55737fa2508265643c1cd14651ea
2022-09-27 13:44:29 -07:00
Zuul a2c26c6ddf Merge "Add iDRAC Redfish configuration molds test" 2022-09-25 20:42:08 +00:00
Zuul 41c3ed3c21 Merge "Add iDRAC Redfish sync boot mode test" 2022-09-21 18:54:33 +00:00
Zuul 7b1644f3fb Merge "Swap maintenance fix to cleanup step" 2022-09-21 15:04:07 +00:00
Kamlesh Chauvhan 785620516c Add iDRAC Redfish configuration molds test
This adds test for idrac-redfish configuration molds for export and
import configuration steps.

Change-Id: If9337f9d7cee6009ce4df53e105b65fbcc95a9ba
2022-09-15 09:51:36 +00:00
Kamlesh Chauvhan 853164a480 Add iDRAC Redfish firmware update test
This adds test for firmware update using iDRAC redfish.

Change-Id: I87bacfabcaf94b9b80b884d6ab576058e7411f84
2022-09-05 11:00:42 +00:00
Swapnil Machikar 2e680f9f80 Add iDRAC Redfish sync boot mode test
This adds test for sync boot mode which changes boot mode
from 'bios' to 'uefi' and vice versa using iDRAC redfish

Change-Id: I43241204e71ab7e0d8c8929e216ce9473c3c2e1e
2022-08-26 09:38:04 +00:00
Zuul 50f0a715d5 Merge "Add iDRAC RAID cleaning steps tests" 2022-08-17 12:19:33 +00:00
Kamlesh Chauvhan 42656a0d8d Add iDRAC RAID cleaning steps tests
This adds tests for both the WS-Man and Redfish implementations
of the iDRAC RAID cleaning steps. In this test, storage inventory
input for RAID cleaning is provided by user in JSON format.
The storage inventory is validated against schema once at the
beginning of RAID tests execution and each test checks
test specific requirements before execution.

Change-Id: I183fdc47dbb7a12b2ffb4f8453753dada2d8f5fe
2022-08-08 17:14:15 +00:00
Zuul f461c928d2 Merge "Add iDRAC Redfish virtual media boot deploy test" 2022-07-22 00:53:49 +00:00
Julia Kreger a766d8e426 Swap maintenance fix to cleanup step
Follow-up to I89839ecb0e08555ddcfee0289350fac1923b3958 to
use a cleanup step so the maintenance state is rolled back
regardless.

Change-Id: I52a5c36d8ca1965d866409fee4590cc1d151f238
2022-07-20 06:59:04 -07:00
Julia Kreger 8d176bd321 Undo maintenace state on protected node tests
As part of the protected from deletion test, we set a node into maintenance
state which allows override actions to be performed for node deletions.

The test is verifying the removal of the node is prevented. This fails upon
the TearDown class execution, resulting in a silent hidden failure which
cannot complete teardown because you cannot unprovision, as is in the
teardown step, a node in maintenance state.

Explicitly unset maintenance, and the world will be happy!

Change-Id: I89839ecb0e08555ddcfee0289350fac1923b3958
2022-07-13 13:10:49 -07:00
Swapnil Machikar b1c8a2b86f Add iDRAC Redfish virtual media boot deploy test
Change-Id: Ic2a46779e9ab5d0706fbbde0d6067b6b85e48add
2022-07-11 10:11:09 +00:00
Zuul c4a2e5e139 Merge "Add more deploy tests for idrac, redfish, ipmi" 2022-07-11 00:19:13 +00:00
Zuul caeb5c9dc1 Merge "Add idrac OOB inspection test cases" 2022-07-11 00:12:29 +00:00
Zuul 3af6253bc9 Merge "Dettaching instance_uuid for standalone TC's" 2022-06-21 17:28:28 +00:00
Sagar Nanda 832deac63f Add more deploy tests for idrac, redfish, ipmi
This adds deploy tests using iPXE and PXE boot with
agent deploy (direct) for the idrac (idrac-redfish and idrac-wsman
interfaces), redfish and ipmi drivers.

Change-Id: Icd65251f1cc9680cfc3c1a1e8e1603681546d3cd
2022-06-14 08:26:03 +00:00
Ameya Raut c652e31d42 Dettaching instance_uuid for standalone TC's
For standalone test cases, where delete_node is set as False,
the instance_uuid remains attached with the node even after test
case execution.

This affects the serial execution of tempest test cases as
instance_uuid is already associated to node which results in
failure of consecutive test cases.
This dettaches instance_uuid of a node while cleanup.

Change-Id: I854c533ef4f76f3abb589dbcc9c39358ebedc194
2022-06-08 15:11:26 +00:00
Ameya Raut 853073752a Add idrac OOB inspection test cases
This adds test cases for the two out-of-band inspect interfaces
supported by the idrac hardware type, idrac-redfish and idrac-wsman.

Change-Id: I40240888aa1fa7b9ea860189141199ca9672e30b
2022-05-27 09:58:25 +00:00
Zuul f904d287a8 Merge "Remove six" 2022-05-10 11:28:30 +00:00
Takashi Kajinami 6bddaab162 Remove six
Python 2 is no longer supported, thus usage of six can be removed.

Change-Id: I60259f7b326ac862409b4d8a0591859a0f070e8b
2022-05-10 08:19:33 +09:00
Ameya Raut 64ad55769e Add iDRAC management cleaning steps tests
This adds tests for both the WS-Man and Redfish implementations of the
iDRAC management cleaning steps.

Change-Id: I5dc41782fb905f0d88ff0defb2c950e9ca3d0faa
2022-04-29 14:53:01 +00:00
Zuul d3360cf3b6 Merge "Add iDRAC BIOS cleaning steps tests" 2022-03-28 16:36:46 +00:00
Roman Popelka 7064b5e588 Remove setup_clients method
As tempest.scenario.manager was announced stable interface in Tempest 27.0.0[1] it can be now reused in plugins.

Replaced methods:
	* setup_clients

Etherpad concerning this effort:
https://etherpad.opendev.org/p/tempest-scenario-manager-cleanup

[1] https://docs.openstack.org/releasenotes/tempest/v27.0.0.html#release-notes-27-0-0

Change-Id: Idcfa1d5495ed68484cdc869bcd27fa8413a479ba
2022-03-22 16:05:20 +00:00
Roman Popelka 2b2cf8bfba Remove _create_network & _get_server_port_id_and_ip4 methods
As tempest.scenario.manager was announced stable interface in Tempest 27.0.0[1] it can be now reused in plugins.

Replaced methods:
	* _create_network
	* _get_server_port_id_and_ip4

Etherpad concerning this effort:
https://etherpad.opendev.org/p/tempest-scenario-manager-cleanup

[1] https://docs.openstack.org/releasenotes/tempest/v27.0.0.html#release-notes-27-0-0

Change-Id: I424cf6f3547eeb229f888e4ad9f9cb09f635ec31
2022-03-22 17:04:46 +01:00
Roman Popelka ed28162064 Remove _get_router & _create_router methods
As tempest.scenario.manager was announced stable interface in Tempest 27.0.0[1] it can be now reused in plugins.

Replaced methods:
	* _get_router
	* _create_router

Etherpad concerning this effort:
https://etherpad.opendev.org/p/tempest-scenario-manager-cleanup

[1] https://docs.openstack.org/releasenotes/tempest/v27.0.0.html#release-notes-27-0-0

Change-Id: I3dc123bea822a2c430a7fe4b714ca2bb9e5a5494
2022-03-17 15:19:24 +01:00
Roman Popelka 082919c84a Remove create_floating_ip & get_server_ip methods
As tempest.scenario.manager was announced stable interface in Tempest 27.0.0[1] it can be now reused in plugins.

Ironic tempest plugin still uses nova-network old interface for floating ip related methods, this patch removes them and use tempests's ones which already use neutron's interface.[2]

Replaced methods:
	* create_floating_ip
	* get_server_ip

Etherpad concerning this effort:
https://etherpad.opendev.org/p/tempest-scenario-manager-cleanup

[1] https://docs.openstack.org/releasenotes/tempest/v27.0.0.html#release-notes-27-0-0
[2] 6428139de1

Change-Id: I963fe7478c0f3a46c1daa44c4eeff69714cf3ba0
2022-03-17 15:18:48 +01:00
Roman Popelka 0bbacde23b Remove create_timestamp method
As tempest.scenario.manager was announced stable interface in Tempest 27.0.0[1] it can be now reused in plugins.

Replaced methods:
	* create_timestamp

Etherpad concerning this effort:
https://etherpad.opendev.org/p/tempest-scenario-manager-cleanup

[1] https://docs.openstack.org/releasenotes/tempest/v27.0.0.html#release-notes-27-0-0

Change-Id: Ic4bc853edf7283cbf1c4d2b17431a051f5309a02
2022-03-17 11:37:23 +01:00