hook: Move OCI hooks handling to the CLI

The CLI being the implementation of the OCI specification, and the
hooks being OCI specific, it makes sense to move the handling of any
OCI hooks to the CLI level. This changes allows the Kata API to
become OCI agnostic.

Fixes #599

Signed-off-by: Sebastien Boeuf <sebastien.boeuf@intel.com>
This commit is contained in:
Sebastien Boeuf
2018-08-16 21:57:04 -07:00
parent ec0fd1b67a
commit 9c6ed93f80
13 changed files with 466 additions and 546 deletions

View File

@@ -143,22 +143,10 @@ func newTestSandboxConfigHyperstartAgentDefaultNetwork() SandboxConfig {
SockTtyName: testHyperstartTtySocket,
}
hooks := Hooks{
PreStartHooks: []Hook{
{
Path: getMockHookBinPath(),
Args: []string{testKeyHook, testContainerIDHook, testControllerIDHook},
},
},
PostStartHooks: []Hook{},
PostStopHooks: []Hook{},
}
netConfig := NetworkConfig{}
sandboxConfig := SandboxConfig{
ID: testSandboxID,
Hooks: hooks,
ID: testSandboxID,
HypervisorType: MockHypervisor,
HypervisorConfig: hypervisorConfig,