clh: vsock: Use the updated VsockConfig

[ port runtime commit 364435a6a18bfbb1277512431040bf085554ffdf ]

The new release of clh v0.8.0 updated the 'VsockConfig' of its HTTP API,
which requires changes on our clh driver.

Signed-off-by: Bo Chen <chen.bo@intel.com>
Signed-off-by: Peng Tao <bergwolf@hyper.sh>
This commit is contained in:
Bo Chen 2020-06-29 23:27:08 -07:00 committed by Peng Tao
parent d8a333b935
commit 7ae4376bf4
2 changed files with 5 additions and 5 deletions

View File

@ -1133,7 +1133,7 @@ func (clh *cloudHypervisor) addVSock(cid int64, path string) {
"cid": cid,
}).Info("Adding HybridVSock")
clh.vmconfig.Vsock = chclient.VsockConfig{Cid: cid, Sock: path}
clh.vmconfig.Vsock = chclient.VsockConfig{Cid: cid, Socket: path}
}
func (clh *cloudHypervisor) addNet(e Endpoint) error {
@ -1177,14 +1177,14 @@ func (clh *cloudHypervisor) addVolume(volume types.Volume) error {
{
Tag: volume.MountTag,
CacheSize: int64(clh.config.VirtioFSCacheSize << 20),
Sock: vfsdSockPath,
Socket: vfsdSockPath,
},
}
} else {
clh.vmconfig.Fs = []chclient.FsConfig{
{
Tag: volume.MountTag,
Sock: vfsdSockPath,
Tag: volume.MountTag,
Socket: vfsdSockPath,
},
}

View File

@ -110,7 +110,7 @@ func TestCloudHypervisorAddVSock(t *testing.T) {
clh.addVSock(1, "path")
assert.Equal(clh.vmconfig.Vsock.Cid, int64(1))
assert.Equal(clh.vmconfig.Vsock.Sock, "path")
assert.Equal(clh.vmconfig.Vsock.Socket, "path")
}
// Check addNet appends to the network config list new configurations.