From abc681ca5f69e79daadf63d51cc4e8700fa218c8 Mon Sep 17 00:00:00 2001 From: Samuel Ortiz Date: Thu, 25 Nov 2021 09:47:44 +0100 Subject: [PATCH] katautils: Add Darwin stub for the netNS API And move the current implementation into a Linux only file. Signed-off-by: Samuel Ortiz --- src/runtime/pkg/katautils/network_darwin.go | 22 +++++++++++++++++++ .../{network.go => network_linux.go} | 0 2 files changed, 22 insertions(+) create mode 100644 src/runtime/pkg/katautils/network_darwin.go rename src/runtime/pkg/katautils/{network.go => network_linux.go} (100%) diff --git a/src/runtime/pkg/katautils/network_darwin.go b/src/runtime/pkg/katautils/network_darwin.go new file mode 100644 index 0000000000..d913557cb8 --- /dev/null +++ b/src/runtime/pkg/katautils/network_darwin.go @@ -0,0 +1,22 @@ +// Copyright (c) 2022 Apple Inc. +// +// SPDX-License-Identifier: Apache-2.0 +// + +package katautils + +import ( + vc "github.com/kata-containers/kata-containers/src/runtime/virtcontainers" +) + +func EnterNetNS(networkID string, cb func() error) error { + return nil +} + +func SetupNetworkNamespace(config *vc.NetworkConfig) error { + return nil +} + +func cleanupNetNS(netNSPath string) error { + return nil +} diff --git a/src/runtime/pkg/katautils/network.go b/src/runtime/pkg/katautils/network_linux.go similarity index 100% rename from src/runtime/pkg/katautils/network.go rename to src/runtime/pkg/katautils/network_linux.go