swarm: unrestricted_internet flag on the agent permissions record, unset reads as on, create writes false
This commit is contained in:
parent
e77459d2cb
commit
8699857024
1 changed files with 381 additions and 107 deletions
|
|
@ -81,6 +81,10 @@ pub struct CreateAgentRequest {
|
|||
#[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`.
|
||||
#[serde(default, skip_serializing_if = "Option::is_none")]
|
||||
pub unrestricted_internet: Option<bool>,
|
||||
/// The archetype to build the agent from, one `GET /api/archetypes`
|
||||
/// lists. The agent then gets no `agent-configs/<name>` repo: its hive
|
||||
/// builds it from the archetype's module. Absent is a custom agent.
|
||||
|
|
@ -116,6 +120,7 @@ mod tests {
|
|||
limits: None,
|
||||
inference: None,
|
||||
permissions: None,
|
||||
unrestricted_internet: None,
|
||||
archetype: None,
|
||||
agents_md: None,
|
||||
};
|
||||
|
|
|
|||
Loading…
Reference in a new issue