Removes ArgumentParser import from NetworkMode. (#1102)

- ContainerResources shouldn't need to know anything about CLI stuff.
- Move ExpressibleByArgument protocol conformance to an extension in the
package where it's needed.
This commit is contained in:
J Logan
2026-01-28 09:04:58 -08:00
committed by GitHub
parent 3abf81f69e
commit d8722708ec
2 changed files with 3 additions and 3 deletions
@@ -14,10 +14,8 @@
// limitations under the License.
//===----------------------------------------------------------------------===//
import ArgumentParser
/// Networking mode that applies to client containers.
public enum NetworkMode: String, Codable, Sendable, ExpressibleByArgument {
public enum NetworkMode: String, Codable, Sendable {
/// NAT networking mode.
/// Containers do not have routable IPs, and the host performs network
/// address translation to allow containers to reach external services.
@@ -29,6 +29,8 @@ enum Variant: String, ExpressibleByArgument {
case allocationOnly
}
extension NetworkMode: ExpressibleByArgument {}
extension NetworkVmnetHelper {
struct Start: AsyncParsableCommand {
static let configuration = CommandConfiguration(