mirror of
https://github.com/apple/container.git
synced 2026-08-24 10:05:43 -05:00
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:
@@ -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(
|
||||
|
||||
Reference in New Issue
Block a user