mirror of
https://github.com/kata-containers/kata-containers.git
synced 2025-07-15 08:02:31 +00:00
Merge pull request #604 from jcvenegas/remove-not-Num-var
vc: Remove unused variable NumInterfaces
This commit is contained in:
commit
d748b26f40
@ -152,9 +152,7 @@ func newTestSandboxConfigHyperstartAgentCNMNetwork() SandboxConfig {
|
||||
PostStopHooks: []Hook{},
|
||||
}
|
||||
|
||||
netConfig := NetworkConfig{
|
||||
NumInterfaces: len(hooks.PreStartHooks),
|
||||
}
|
||||
netConfig := NetworkConfig{}
|
||||
|
||||
sandboxConfig := SandboxConfig{
|
||||
ID: testSandboxID,
|
||||
@ -1980,9 +1978,7 @@ func createNewSandboxConfig(hType HypervisorType, aType AgentType, aConfig inter
|
||||
HypervisorPath: "/usr/bin/qemu-system-x86_64",
|
||||
}
|
||||
|
||||
netConfig := NetworkConfig{
|
||||
NumInterfaces: 1,
|
||||
}
|
||||
netConfig := NetworkConfig{}
|
||||
|
||||
return SandboxConfig{
|
||||
ID: testSandboxID,
|
||||
|
@ -276,7 +276,6 @@ const (
|
||||
// NetworkConfig is the network configuration related to a network.
|
||||
type NetworkConfig struct {
|
||||
NetNSPath string
|
||||
NumInterfaces int
|
||||
InterworkingModel NetInterworkingModel
|
||||
}
|
||||
```
|
||||
|
@ -176,9 +176,7 @@ func buildSandboxConfig(context *cli.Context) (vc.SandboxConfig, error) {
|
||||
return vc.SandboxConfig{}, err
|
||||
}
|
||||
|
||||
netConfig := vc.NetworkConfig{
|
||||
NumInterfaces: 1,
|
||||
}
|
||||
netConfig := vc.NetworkConfig{}
|
||||
|
||||
switch *agentType {
|
||||
case vc.HyperstartAgent:
|
||||
|
@ -142,7 +142,6 @@ type NetworkInterfacePair struct {
|
||||
// NetworkConfig is the network configuration related to a network.
|
||||
type NetworkConfig struct {
|
||||
NetNSPath string
|
||||
NumInterfaces int
|
||||
InterworkingModel NetInterworkingModel
|
||||
}
|
||||
|
||||
|
@ -357,9 +357,6 @@ func networkConfig(ocispec CompatOCISpec, config RuntimeConfig) (vc.NetworkConfi
|
||||
continue
|
||||
}
|
||||
|
||||
// Bug: This is not the interface count
|
||||
// It is just an indication that you need networking
|
||||
netConf.NumInterfaces = 1
|
||||
if n.Path != "" {
|
||||
netConf.NetNSPath = n.Path
|
||||
}
|
||||
|
@ -211,9 +211,7 @@ func TestMinimalSandboxConfig(t *testing.T) {
|
||||
DeviceInfos: expectedDeviceInfo,
|
||||
}
|
||||
|
||||
expectedNetworkConfig := vc.NetworkConfig{
|
||||
NumInterfaces: 1,
|
||||
}
|
||||
expectedNetworkConfig := vc.NetworkConfig{}
|
||||
|
||||
expectedSandboxConfig := vc.SandboxConfig{
|
||||
ID: containerID,
|
||||
|
Loading…
Reference in New Issue
Block a user