Remove XPC compatibility code, simplify network model. (#1616)

- Refactor network model types: replace `NetworkState` enum and
phase-based NetworkStatus with a flat `NetworkStatus` struct.
- Simplify API server ↔ plugin protocol: plugin `status()` returns
runtime status only, API server owns configuration.
- `NetworksService` `list()`/`create()` now return `NetworkResource`
directly.
- Remove lifecycle phase checks and state machine guards throughout CLI
and API server.
- `variant` is plugin-specific, it's not a required property. This PR
replaces `NetworkPluginInfo` with a `plugin` name property on
`NetworkConfiguration` and an `options` list similar to that for
volumes.
- Moved `variant` to the option list.
This commit is contained in:
J Logan
2026-05-29 12:33:45 -07:00
committed by GitHub
parent f4f5925c08
commit 37595a734c
33 changed files with 265 additions and 530 deletions
+3 -1
View File
@@ -753,7 +753,7 @@ Creates a new network with the given name.
**Usage**
```bash
container network create [--label <label> ...] [--subnet <subnet>] [--subnet-v6 <subnet-v6>] [--debug] <name>
container network create [--label <label> ...] [--subnet <subnet>] [--subnet-v6 <subnet-v6>] [--plugin <plugin>] [--option <key=value> ...] [--debug] <name>
```
**Arguments**
@@ -765,6 +765,8 @@ container network create [--label <label> ...] [--subnet <subnet>] [--subnet-v6
* `--label <label>`: Set metadata for a network
* `--subnet <subnet>`: Set the IPv4 subnet for a network (CIDR format, e.g., 192.168.100.0/24)
* `--subnet-v6 <subnet-v6>`: Set the IPv6 prefix for a network (CIDR format, e.g., fd00:1234::/64)
* `--plugin <plugin>`: Network plugin to use (default: `container-network-vmnet`)
* `--option <key=value>`: Set a plugin-specific option; may be repeated
### `container network delete (rm)`