kata 2.0: delete use_vsock option and proxy abstraction

With kata containers moving to 2.0, (hybrid-)vsock will be the only
way to directly communicate between host and agent.
And kata-proxy as additional component to handle the multiplexing on
serial port is also no longer needed.
Cleaning up related unit tests, and also add another mock socket type
`MockHybridVSock` to deal with ttrpc-based hybrid-vsock mock server.

Fixes: #389

Signed-off-by: Penny Zheng penny.zheng@arm.com
This commit is contained in:
Penny Zheng
2020-07-13 02:21:10 +00:00
parent c052e46c66
commit 1099a28830
68 changed files with 427 additions and 2374 deletions

View File

@@ -26,11 +26,6 @@ func NewMockAgent() agent {
return &mockAgent{}
}
//start the proxy to watch the vm console. It does nothing.
func (n *mockAgent) startProxy(sandbox *Sandbox) error {
return nil
}
// init initializes the Noop agent, i.e. it does nothing.
func (n *mockAgent) init(ctx context.Context, sandbox *Sandbox, config KataAgentConfig) (bool, error) {
return false, nil
@@ -181,11 +176,11 @@ func (n *mockAgent) resumeContainer(sandbox *Sandbox, c Container) error {
}
// configHypervisor is the Noop agent hypervisor configuration implementation. It does nothing.
func (n *mockAgent) configure(h hypervisor, id, sharePath string, builtin bool, config interface{}) error {
func (n *mockAgent) configure(h hypervisor, id, sharePath string, config interface{}) error {
return nil
}
func (n *mockAgent) configureFromGrpc(h hypervisor, id string, builtin bool, config interface{}) error {
func (n *mockAgent) configureFromGrpc(h hypervisor, id string, config interface{}) error {
return nil
}
@@ -204,14 +199,11 @@ func (n *mockAgent) getAgentURL() (string, error) {
return "", nil
}
// setProxy is the Noop agent proxy setter. It does nothing.
func (n *mockAgent) setProxy(sandbox *Sandbox, proxy proxy, pid int, url string) error {
// setAgentURL is the Noop agent url setter. It does nothing.
func (n *mockAgent) setAgentURL() error {
return nil
}
func (n *mockAgent) setProxyFromGrpc(proxy proxy, pid int, url string) {
}
// getGuestDetails is the Noop agent GuestDetails queryer. It does nothing.
func (n *mockAgent) getGuestDetails(*grpc.GuestDetailsRequest) (*grpc.GuestDetailsResponse, error) {
return nil, nil