Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Update upload data flow #13

Closed
wants to merge 2 commits into from
Closed

Conversation

joshuef
Copy link
Contributor

@joshuef joshuef commented Sep 26, 2023

No description provided.

@joshuef joshuef changed the title chore: refactor ansible to use IpAddr in place of string for clarity Update upload data flow Sep 28, 2023
// TODO:
// Ensure gen node has `safe` client
// get the test data from somewhere
let output = testnet_deploy.ssh_client.run_script(
Copy link
Contributor

Choose a reason for hiding this comment

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

I think it would be nicer if the code for this went in the upload_test_data function that was in the TestDataClient and replaced what is in there.

That client would need to have its definition extended to accept the SshClientInterface, but that should be OK.

// Finally, parse the output to get the uploaded files


// println!("Uploaded files:");
Copy link
Contributor

Choose a reason for hiding this comment

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

Can we remove this commented out stuff?

// println!("Uploaded files:");
// for (path, address) in uploaded_files.iter() {
// println!("{path}: {address}");
// }
inventory.add_uploaded_files(uploaded_files.clone());
Copy link
Contributor

Choose a reason for hiding this comment

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

Does this work any more now that it's a remote script? Is it returning back the path and address?

// It takes a PathBuf as an argument which represents the inventory path.
// It returns a Result containing a vector of tuples. Each tuple contains a string representing the name and the ansible host.
fn inventory_list(&self, inventory_path: PathBuf) -> Result<Vec<(String, IpAddr)>> {
// Run the external command and store the output.
Copy link
Contributor

Choose a reason for hiding this comment

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

To be honest, I find some of these comments are just stating what the code says fine on its own, but not a big deal.

@joshuef joshuef closed this Dec 28, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants