Conversation
…ling directly (do the later on your own risk!)
jclulow
left a comment
There was a problem hiding this comment.
I have taken a brief look at this. Some initial thoughts and questions!
| description = "Cloud metadata bootstrap software for illumos systems" | ||
| version = "0.1.0" | ||
| authors = ["Joshua M. Clulow <josh@sysmgr.org>"] | ||
| authors = ["Joshua M. Clulow <josh@sysmgr.org>", "Till Wegmueller <toasterson@gmail.com>"] |
There was a problem hiding this comment.
We should just delete the authors field here, as it's going away for the most part.
There was a problem hiding this comment.
Ah, good to know, I'll do that
| slog = "2.5" | ||
| slog-term = "2.5" | ||
| atty = "0.2" | ||
| failure = "0.1" |
There was a problem hiding this comment.
Rather than failure, I'd prefer to use thiserror where we need errors that can be handled programmatically, and continue to use anyhow where we do not.
(NB: failure is deprecated)
There was a problem hiding this comment.
Yep, I switched in other projects but this code sat around a bit. Will change over.
| let mut count = 0; | ||
| for line_result in BufReader::new(output.stdout.as_slice()).lines() { | ||
| if let Ok(line) = line_result { | ||
| if count == 0 { |
There was a problem hiding this comment.
You can use lines().enumerate() to get the count as part of the iterator.
| @@ -0,0 +1,101 @@ | |||
| use crate::common::*; | |||
There was a problem hiding this comment.
This file should probably retain the Oxide Copyright notice from where the methods originated?
There was a problem hiding this comment.
I am trying to remember if I took it wholesale or not but probably did. Will add it.
| @@ -0,0 +1,16 @@ | |||
| #!/bin/bash | |||
There was a problem hiding this comment.
Where does this script get used?
There was a problem hiding this comment.
The rust community probably does not know the concept as this originates from golang. The hack folder has helpers people can use during development. This script was made to ease testing of features that require network. It could be reworked into a SMF service or included into metadata-agent.
Signed-off-by: Till Wegmueller <toasterson@gmail.com>
Signed-off-by: Till Wegmueller <toasterson@gmail.com>
No description provided.