Skip to content
This repository has been archived by the owner on Jul 25, 2022. It is now read-only.

Add device information to integration tests #1831

Open
wants to merge 2 commits into
base: list-devices-cmd
Choose a base branch
from

Conversation

johnsonw
Copy link
Contributor

@johnsonw johnsonw commented Apr 28, 2020

Add device information loaded into IML. This will allow the tests to
verify that the devices have been loaded before attempting to add
servers.

Signed-off-by: johnsonw wjohnson@whamcloud.com


This change is Reviewable

@johnsonw johnsonw added this to the IML EX V2 milestone Apr 28, 2020
@johnsonw johnsonw self-assigned this Apr 28, 2020
println!("Comparing iml devices to bindings files.");
println!("iml_devices: {:?}", iml_devices);
println!("binding wwids: {:?}", wwids);
}
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I am just pondering: :)

loop {
  count += 1;

  let iml_devices: BTreeSet<String> = get_iml_devices(config).await?;
  let all_volumes_accounted_for = wwids.is_subset(&iml_devices);
  
  println!("Comparing iml devices to bindings files ({})", &count);
  println!("iml_devices: {:?}", iml_devices);
  println!("binding wwids: {:?}", wwids);

  if all_volumes_accounted_for {
    return Ok();
  }
  if count >= max_tries {
    return Err(..);
  }
  delay_for(Duration::from_secs(5)).await;
}

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yeah this could probably be updated. Looks a bit cleaner.

Add device information loaded into IML. This will allow the tests to
verify that the devices have been loaded before attempting to add
servers.

Signed-off-by: johnsonw <wjohnson@whamcloud.com>
- Update device parse functionality

Signed-off-by: johnsonw <wjohnson@whamcloud.com>
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants