virtcontainers: network: Rename CNM to DefaultNetwork

Since we removed the CNI implementation and that we agreed the network
should only be handled in a single way from virtcontainers, this patch
logically replace the "CNM" naming with "Default".

Signed-off-by: Sebastien Boeuf <sebastien.boeuf@intel.com>
This commit is contained in:
Sebastien Boeuf
2018-08-15 16:22:28 -07:00
parent cc29b8d4b6
commit 44d2ec757c
7 changed files with 173 additions and 188 deletions

View File

@@ -121,7 +121,7 @@ func newTestSandboxConfigHyperstartAgent() SandboxConfig {
return sandboxConfig
}
func newTestSandboxConfigHyperstartAgentCNMNetwork() SandboxConfig {
func newTestSandboxConfigHyperstartAgentDefaultNetwork() SandboxConfig {
// Define the container command and bundle.
container := ContainerConfig{
ID: containerID,
@@ -165,7 +165,7 @@ func newTestSandboxConfigHyperstartAgentCNMNetwork() SandboxConfig {
AgentType: HyperstartAgent,
AgentConfig: agentConfig,
NetworkModel: CNMNetworkModel,
NetworkModel: DefaultNetworkModel,
NetworkConfig: netConfig,
Containers: []ContainerConfig{container},
@@ -1383,14 +1383,14 @@ func TestStartStopContainerHyperstartAgentSuccessful(t *testing.T) {
bindUnmountAllRootfs(ctx, defaultSharedDir, pImpl)
}
func TestStartStopSandboxHyperstartAgentSuccessfulWithCNMNetwork(t *testing.T) {
func TestStartStopSandboxHyperstartAgentSuccessfulWithDefaultNetwork(t *testing.T) {
if os.Geteuid() != 0 {
t.Skip(testDisabledAsNonRoot)
}
cleanUp()
config := newTestSandboxConfigHyperstartAgentCNMNetwork()
config := newTestSandboxConfigHyperstartAgentDefaultNetwork()
sockDir, err := testGenerateCCProxySockDir()
if err != nil {
@@ -2443,7 +2443,7 @@ func TestNetworkOperation(t *testing.T) {
defer deleteNetNS(netNSPath)
config := newTestSandboxConfigNoop()
config.NetworkModel = CNMNetworkModel
config.NetworkModel = DefaultNetworkModel
config.NetworkConfig = NetworkConfig{
NetNSPath: netNSPath,
}