Skip to content

Commit f8e5b68

Browse files
authored
[shimV2] [VM controller] refactor + adds Update + Device controllers (#2663)
* [shimV2] remove all interfaces from vm manager and guest manager Following the shim V2 standard, we are declaring the interfaces at the place where the APIs are used. Therefore, we are deleting all the interfaces from the existing packages. Signed-off-by: Harsh Rawat <harshrawat@microsoft.com> * [shimV2] refactor vm controller + add functionalities In this commit, we are refactoring the vm controller to bring it to the same standard as rest of the controllers. Additionally, we are adding- - Update functionality - RuntimeID API - APIs to obtain device controllers Signed-off-by: Harsh Rawat <harshrawat@microsoft.com>
1 parent 20ecf50 commit f8e5b68

35 files changed

Lines changed: 348 additions & 352 deletions

cmd/containerd-shim-lcow-v2/main.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
//go:build windows
1+
//go:build windows && lcow
22

33
// containerd-shim-lcow-v2 is a containerd shim implementation for Linux Containers on Windows (LCOW).
44
package main

cmd/containerd-shim-lcow-v2/manager.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
//go:build windows
1+
//go:build windows && lcow
22

33
package main
44

cmd/containerd-shim-lcow-v2/manager_test.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
//go:build windows
1+
//go:build windows && lcow
22

33
package main
44

cmd/containerd-shim-lcow-v2/service/plugin/plugin.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
//go:build windows
1+
//go:build windows && lcow
22

33
package plugin
44

cmd/containerd-shim-lcow-v2/service/service.go

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
//go:build windows
1+
//go:build windows && lcow
22

33
package service
44

@@ -45,7 +45,7 @@ type Service struct {
4545
sandboxOptions *lcow.SandboxOptions
4646

4747
// vmController is responsible for managing the lifecycle of the underlying utility VM and its associated resources.
48-
vmController vm.Controller
48+
vmController *vm.Controller
4949

5050
// shutdown manages graceful shutdown operations and allows registration of cleanup callbacks.
5151
shutdown shutdown.Service
@@ -58,7 +58,7 @@ func NewService(ctx context.Context, eventsPublisher shim.Publisher, sd shutdown
5858
svc := &Service{
5959
publisher: eventsPublisher,
6060
events: make(chan interface{}, 128), // Buffered channel for events
61-
vmController: vm.NewController(),
61+
vmController: vm.New(),
6262
shutdown: sd,
6363
}
6464

cmd/containerd-shim-lcow-v2/service/service_sandbox.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
//go:build windows
1+
//go:build windows && lcow
22

33
package service
44

cmd/containerd-shim-lcow-v2/service/service_sandbox_internal.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
//go:build windows
1+
//go:build windows && lcow
22

33
package service
44

cmd/containerd-shim-lcow-v2/service/service_shimdiag.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
//go:build windows
1+
//go:build windows && lcow
22

33
package service
44

cmd/containerd-shim-lcow-v2/service/service_shimdiag_internal.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
//go:build windows
1+
//go:build windows && lcow
22

33
package service
44

cmd/containerd-shim-lcow-v2/service/service_task.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
//go:build windows
1+
//go:build windows && lcow
22

33
package service
44

0 commit comments

Comments
 (0)