wslc: add network create, delete, and list#40179
Open
beena352 wants to merge 5 commits intomicrosoft:feature/wsl-for-appsfrom
Open
wslc: add network create, delete, and list#40179beena352 wants to merge 5 commits intomicrosoft:feature/wsl-for-appsfrom
beena352 wants to merge 5 commits intomicrosoft:feature/wsl-for-appsfrom
Conversation
Contributor
There was a problem hiding this comment.
Pull request overview
Note
Copilot was unable to run its full agentic suite in this review.
Adds WSLC custom network management (create, delete, list) backed by the Docker Engine API, including COM/IDL surface area, persistence/recovery in the session, Docker schema bindings, and TAEF coverage.
Changes:
- Extend
IWSLCSessionwithCreateNetwork,DeleteNetwork,ListNetworksand add corresponding IDL structs/constants. - Implement network bookkeeping (in-memory map + recovery via managed-label) and Docker HTTP client endpoints.
- Add docker schema types for network create/list and TAEF tests covering network CRUD and validation.
Reviewed changes
Copilot reviewed 9 out of 9 changed files in this pull request and generated 13 comments.
Show a summary per file
| File | Description |
|---|---|
| test/windows/WSLCTests.cpp | Adds TAEF tests for network create/delete/list, options parsing, reserved name/driver validation, and session recovery. |
| src/windows/wslcsession/WSLCSession.h | Adds network methods to the session interface and introduces network lock/map + recovery hook. |
| src/windows/wslcsession/WSLCSession.cpp | Implements network CRUD/list, termination cleanup, and recovery of WSLC-managed networks. |
| src/windows/wslcsession/WSLCNetworkMetadata.h | Introduces constants (managed label/driver) and reserved-name validation helper + entry struct. |
| src/windows/wslcsession/DockerHTTPClient.h | Adds Docker client APIs for network create/remove/list. |
| src/windows/wslcsession/DockerHTTPClient.cpp | Implements HTTP transactions for Docker network endpoints. |
| src/windows/service/inc/wslc.idl | Adds IDL types for network options/info, new session methods, and a not-found HRESULT. |
| src/windows/inc/docker_schema.h | Adds JSON (de)serialization types for network create/list including IPAM fields. |
| localization/strings/en-US/Resources.resw | Adds user-facing localized strings for network errors and invalid options. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary of the Pull Request
Adds WSLC custom network management (create, delete, list) via the Docker Engine API. This is the first PR in the network support series, subsequent PRs will add inspect, container-on-network, SDK, and CLI support.
PR Checklist
Detailed Description of the Pull Request / Additional comments
Validation Steps Performed
Tests covering: CRUD lifecycle, duplicate name handling, delete-not-found, subnet/gateway options, internal network flag, user labels, invalid driver/name/options/JSON, session recovery, and multi-network create/list/delete.