add a default archetype, preselected by the clients
This commit is contained in:
parent
a74d23d313
commit
8f7c45d40f
1 changed files with 253 additions and 47 deletions
|
|
@ -322,7 +322,7 @@ impl Actions for Live {
|
|||
let target = self.target()?;
|
||||
let hive = agent::parse_ident(hive, "hive")?;
|
||||
if !exists {
|
||||
agent::request_create(target, RUTH, &hive, None)?;
|
||||
agent::request_create(target, RUTH, &hive, None, None)?;
|
||||
}
|
||||
let every = Duration::from_secs(2);
|
||||
ensure_manager_permission(
|
||||
|
|
@ -339,10 +339,11 @@ impl Actions for Live {
|
|||
))
|
||||
}
|
||||
|
||||
fn create_agent(&mut self, name: &str, hive: &str) -> Result<String> {
|
||||
fn create_agent(&mut self, name: &str, hive: &str, custom: bool) -> Result<String> {
|
||||
let name = agent::parse_ident(name, "agent name")?;
|
||||
let hive = agent::parse_ident(hive, "hive")?;
|
||||
let resp = agent::request_create(self.target()?, &name, &hive, None)?;
|
||||
let archetype = (!custom).then_some("default");
|
||||
let resp = agent::request_create(self.target()?, &name, &hive, archetype, None)?;
|
||||
let mut said = format!(
|
||||
"queued job node {} to deploy {name:?} to hive {hive:?}",
|
||||
resp.node_id
|
||||
|
|
|
|||
Loading…
Reference in a new issue