runtime: remove agent abstraction

This PR will delete agent abstraction and use Kata agent as the only one agent.

Fixes: #377

Signed-off-by: bin liu <bin@hyper.sh>
This commit is contained in:
bin liu
2020-07-02 17:15:03 +08:00
parent 350831b18b
commit bd8f03a5ef
36 changed files with 263 additions and 819 deletions

View File

@@ -190,7 +190,6 @@ func createAllRuntimeConfigFiles(dir, hypervisor string) (config testRuntimeConf
HypervisorType: defaultHypervisor,
HypervisorConfig: hypervisorConfig,
AgentType: defaultAgent,
AgentConfig: agentConfig,
ProxyType: defaultProxy,
@@ -609,7 +608,6 @@ func TestMinimalRuntimeConfig(t *testing.T) {
HypervisorType: defaultHypervisor,
HypervisorConfig: expectedHypervisorConfig,
AgentType: defaultAgent,
AgentConfig: expectedAgentConfig,
ProxyType: defaultProxy,
@@ -1516,30 +1514,6 @@ func TestDefaultCPUFeatures(t *testing.T) {
assert.Equal(cpuFeatures, h.cpuFeatures())
}
func TestUpdateRuntimeConfiguration(t *testing.T) {
assert := assert.New(t)
assert.Equal(defaultAgent, vc.KataContainersAgent)
config := oci.RuntimeConfig{}
tomlConf := tomlConfig{
Agent: map[string]agent{
// force a non-default value
kataAgentTableType: {},
},
}
assert.NotEqual(config.AgentType, vc.AgentType(kataAgentTableType))
assert.NotEqual(config.AgentConfig, vc.KataAgentConfig{})
err := updateRuntimeConfig("", tomlConf, &config, false)
assert.NoError(err)
assert.Equal(config.AgentType, vc.AgentType(kataAgentTableType))
assert.Equal(config.AgentConfig, vc.KataAgentConfig{})
}
func TestUpdateRuntimeConfigurationVMConfig(t *testing.T) {
assert := assert.New(t)
@@ -1589,8 +1563,6 @@ func TestUpdateRuntimeConfigurationFactoryConfig(t *testing.T) {
func TestUpdateRuntimeConfigurationInvalidKernelParams(t *testing.T) {
assert := assert.New(t)
assert.Equal(defaultAgent, vc.KataContainersAgent)
config := oci.RuntimeConfig{}
tomlConf := tomlConfig{}