forwarder: Remove quotes from socket path in doc

Update the trace forwarder README to remove the quotes around the socket
path, which makes manipulating that path easier.

Signed-off-by: James O. D. Hunt <james.o.hunt@intel.com>
This commit is contained in:
James O. D. Hunt 2021-10-27 09:53:10 +01:00
parent b85edbfa00
commit d1bcf105ff
2 changed files with 32 additions and 1 deletions

View File

@ -120,7 +120,7 @@ forwarder.
```bash
$ sandbox_id="foo"
$ socket_path=$(echo "$socket_path_template" | sed "s/{ID}/${sandbox_id}/g")
$ socket_path=$(echo "$socket_path_template" | sed "s/{ID}/${sandbox_id}/g" | tr -d '"')
$ sudo mkdir -p $(dirname "$socket_path")
```

View File

@ -87,6 +87,11 @@ static AGENT_CMDS: &'static [AgentCmd] = &[
st: ServiceType::Agent,
fp: agent_cmd_sandbox_add_arp_neighbors,
},
AgentCmd {
name: "AddSwap",
st: ServiceType::Agent,
fp: agent_cmd_sandbox_add_swap,
},
AgentCmd {
name: "Check",
st: ServiceType::Health,
@ -1918,3 +1923,29 @@ fn get_repeat_count(cmdline: &str) -> i64 {
Err(_) => return default_repeat_count,
}
}
fn agent_cmd_sandbox_add_swap(
ctx: &Context,
client: &AgentServiceClient,
_health: &HealthClient,
_options: &mut Options,
_args: &str,
) -> Result<()> {
let req = AddSwapRequest::default();
let ctx = clone_context(ctx);
debug!(sl!(), "sending request"; "request" => format!("{:?}", req));
let reply = client
.add_swap(ctx, &req)
.map_err(|e| anyhow!("{:?}", e).context(ERR_API_FAILED))?;
// FIXME: Implement 'AddSwap' fully.
eprintln!("FIXME: 'AddSwap' not fully implemented");
info!(sl!(), "response received";
"response" => format!("{:?}", reply));
Ok(())
}