mirror of
https://github.com/kata-containers/kata-containers.git
synced 2025-07-05 11:36:56 +00:00
vc: Remove unused variable NumInterfaces
Remove unsed variable, the variable is set just in one place, and never is used again. Fixes: #603 Signed-off-by: Jose Carlos Venegas Munoz <jose.carlos.venegas.munoz@intel.com>
This commit is contained in:
parent
26f31071ca
commit
161e3a771b
@ -152,9 +152,7 @@ func newTestSandboxConfigHyperstartAgentCNMNetwork() SandboxConfig {
|
|||||||
PostStopHooks: []Hook{},
|
PostStopHooks: []Hook{},
|
||||||
}
|
}
|
||||||
|
|
||||||
netConfig := NetworkConfig{
|
netConfig := NetworkConfig{}
|
||||||
NumInterfaces: len(hooks.PreStartHooks),
|
|
||||||
}
|
|
||||||
|
|
||||||
sandboxConfig := SandboxConfig{
|
sandboxConfig := SandboxConfig{
|
||||||
ID: testSandboxID,
|
ID: testSandboxID,
|
||||||
@ -1980,9 +1978,7 @@ func createNewSandboxConfig(hType HypervisorType, aType AgentType, aConfig inter
|
|||||||
HypervisorPath: "/usr/bin/qemu-system-x86_64",
|
HypervisorPath: "/usr/bin/qemu-system-x86_64",
|
||||||
}
|
}
|
||||||
|
|
||||||
netConfig := NetworkConfig{
|
netConfig := NetworkConfig{}
|
||||||
NumInterfaces: 1,
|
|
||||||
}
|
|
||||||
|
|
||||||
return SandboxConfig{
|
return SandboxConfig{
|
||||||
ID: testSandboxID,
|
ID: testSandboxID,
|
||||||
|
@ -276,7 +276,6 @@ const (
|
|||||||
// NetworkConfig is the network configuration related to a network.
|
// NetworkConfig is the network configuration related to a network.
|
||||||
type NetworkConfig struct {
|
type NetworkConfig struct {
|
||||||
NetNSPath string
|
NetNSPath string
|
||||||
NumInterfaces int
|
|
||||||
InterworkingModel NetInterworkingModel
|
InterworkingModel NetInterworkingModel
|
||||||
}
|
}
|
||||||
```
|
```
|
||||||
|
@ -176,9 +176,7 @@ func buildSandboxConfig(context *cli.Context) (vc.SandboxConfig, error) {
|
|||||||
return vc.SandboxConfig{}, err
|
return vc.SandboxConfig{}, err
|
||||||
}
|
}
|
||||||
|
|
||||||
netConfig := vc.NetworkConfig{
|
netConfig := vc.NetworkConfig{}
|
||||||
NumInterfaces: 1,
|
|
||||||
}
|
|
||||||
|
|
||||||
switch *agentType {
|
switch *agentType {
|
||||||
case vc.HyperstartAgent:
|
case vc.HyperstartAgent:
|
||||||
|
@ -142,7 +142,6 @@ type NetworkInterfacePair struct {
|
|||||||
// NetworkConfig is the network configuration related to a network.
|
// NetworkConfig is the network configuration related to a network.
|
||||||
type NetworkConfig struct {
|
type NetworkConfig struct {
|
||||||
NetNSPath string
|
NetNSPath string
|
||||||
NumInterfaces int
|
|
||||||
InterworkingModel NetInterworkingModel
|
InterworkingModel NetInterworkingModel
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -357,9 +357,6 @@ func networkConfig(ocispec CompatOCISpec, config RuntimeConfig) (vc.NetworkConfi
|
|||||||
continue
|
continue
|
||||||
}
|
}
|
||||||
|
|
||||||
// Bug: This is not the interface count
|
|
||||||
// It is just an indication that you need networking
|
|
||||||
netConf.NumInterfaces = 1
|
|
||||||
if n.Path != "" {
|
if n.Path != "" {
|
||||||
netConf.NetNSPath = n.Path
|
netConf.NetNSPath = n.Path
|
||||||
}
|
}
|
||||||
|
@ -211,9 +211,7 @@ func TestMinimalSandboxConfig(t *testing.T) {
|
|||||||
DeviceInfos: expectedDeviceInfo,
|
DeviceInfos: expectedDeviceInfo,
|
||||||
}
|
}
|
||||||
|
|
||||||
expectedNetworkConfig := vc.NetworkConfig{
|
expectedNetworkConfig := vc.NetworkConfig{}
|
||||||
NumInterfaces: 1,
|
|
||||||
}
|
|
||||||
|
|
||||||
expectedSandboxConfig := vc.SandboxConfig{
|
expectedSandboxConfig := vc.SandboxConfig{
|
||||||
ID: containerID,
|
ID: containerID,
|
||||||
|
Loading…
Reference in New Issue
Block a user