Commit d301f228 authored by Pengfei Ni's avatar Pengfei Ni

CRI: remove PodSandboxStatus.Linux.Namespaces.Network

Closes: #44972
parent 29f37fde
......@@ -338,8 +338,6 @@ message PodSandboxNetworkStatus {
// Namespace contains paths to the namespaces.
message Namespace {
// Path to the network namespace.
string network = 1;
// Namespace options for Linux namespaces.
NamespaceOption options = 2;
}
......
......@@ -322,7 +322,6 @@ func (ds *dockerService) PodSandboxStatus(podSandboxID string) (*runtimeapi.PodS
return nil, err
}
network := &runtimeapi.PodSandboxNetworkStatus{Ip: IP}
netNS := getNetworkNamespace(r)
hostNetwork := sharesHostNetwork(r)
// If the sandbox has no containerTypeLabelKey label, treat it as a legacy sandbox.
......@@ -351,7 +350,6 @@ func (ds *dockerService) PodSandboxStatus(podSandboxID string) (*runtimeapi.PodS
Network: network,
Linux: &runtimeapi.LinuxPodSandboxStatus{
Namespaces: &runtimeapi.Namespace{
Network: netNS,
Options: &runtimeapi.NamespaceOption{
HostNetwork: hostNetwork,
HostPid: sharesHostPid(r),
......
......@@ -20,7 +20,6 @@ import (
"errors"
"fmt"
"net"
"os"
"testing"
"time"
......@@ -100,7 +99,6 @@ func TestSandboxStatus(t *testing.T) {
// TODO: The following variables depend on the internal
// implementation of FakeDockerClient, and should be fixed.
fakeIP := "2.3.4.5"
fakeNS := fmt.Sprintf("/proc/%d/ns/net", os.Getpid())
state := runtimeapi.PodSandboxState_SANDBOX_READY
ct := int64(0)
......@@ -110,7 +108,7 @@ func TestSandboxStatus(t *testing.T) {
CreatedAt: ct,
Metadata: config.Metadata,
Network: &runtimeapi.PodSandboxNetworkStatus{Ip: fakeIP},
Linux: &runtimeapi.LinuxPodSandboxStatus{Namespaces: &runtimeapi.Namespace{Network: fakeNS, Options: &runtimeapi.NamespaceOption{HostNetwork: hostNetwork}}},
Linux: &runtimeapi.LinuxPodSandboxStatus{Namespaces: &runtimeapi.Namespace{Options: &runtimeapi.NamespaceOption{HostNetwork: hostNetwork}}},
Labels: labels,
Annotations: annotations,
}
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment