swarm: merge a re-create into the stored agent permissions instead of overwriting them
This commit is contained in:
parent
8699857024
commit
ae8b2d39ec
1 changed files with 108 additions and 22 deletions
|
|
@ -76,13 +76,15 @@ pub struct CreateAgentRequest {
|
|||
/// /api/agents/{name}/inference` takes them. Absent as `limits`.
|
||||
#[serde(default, skip_serializing_if = "Option::is_none")]
|
||||
pub inference: Option<InferenceSettings>,
|
||||
/// The agent's permissions, stored before the job is queued. Left out, the
|
||||
/// agent holds the default set.
|
||||
/// The agent's permissions, stored before the job is queued. Left out, an
|
||||
/// existing record keeps its list and otherwise the agent holds the default
|
||||
/// set.
|
||||
#[serde(default, skip_serializing_if = "Option::is_none")]
|
||||
#[cfg_attr(feature = "schema", schema(value_type = Option<Vec<String>>))]
|
||||
pub permissions: Option<Vec<Permission>>,
|
||||
/// Whether the agent's traffic leaves the host unfiltered. Left out, the
|
||||
/// agent is created with `false`.
|
||||
/// Whether the agent's traffic leaves the host unfiltered. Left out, an
|
||||
/// agent with no stored value is created with `false`, and one that has a
|
||||
/// record (a re-create) keeps its value.
|
||||
#[serde(default, skip_serializing_if = "Option::is_none")]
|
||||
pub unrestricted_internet: Option<bool>,
|
||||
/// The archetype to build the agent from, one `GET /api/archetypes`
|
||||
|
|
|
|||
Loading…
Reference in a new issue