MCPcopy Create free account
hub / github.com/NVIDIA/OpenShell / parse_remove_endpoint_spec

Function parse_remove_endpoint_spec

crates/openshell-cli/src/policy_update.rs:282–292  ·  view source on GitHub ↗
(spec: &str)

Source from the content-addressed store, hash-verified

280}
281
282fn parse_remove_endpoint_spec(spec: &str) -> Result<(String, u32)> {
283 let parts = spec.split(':').collect::<Vec<_>>();
284 if parts.len() != 2 {
285 return Err(miette!("--remove-endpoint expects host:port, got '{spec}'"));
286 }
287
288 Ok((
289 parse_host("--remove-endpoint", spec, parts[0])?,
290 parse_port("--remove-endpoint", spec, parts[1])?,
291 ))
292}
293
294fn parse_add_endpoint_spec(spec: &str) -> Result<NetworkEndpoint> {
295 let parts = spec.split(':').collect::<Vec<_>>();

Callers 1

build_policy_update_planFunction · 0.85

Calls 3

parse_portFunction · 0.85
lenMethod · 0.80
parse_hostFunction · 0.70

Tested by

no test coverage detected