From 53c2e8ad91fd5f64989a4e6a923926990130b5cd Mon Sep 17 00:00:00 2001 From: Dmitry Vyukov Date: Tue, 23 Jul 2024 14:13:28 +0200 Subject: vmimpl: refactor VM type registration Pass Type struct directly during registration. This allows to add additional optional parameters to VM types without changing all VM implementations. We we will need to add SupportsSnapshots flag and one flag to resolve #5028. With this change it will be possible to add "SupportsSnapshots: true" to just one VM type implemenetation. --- vm/vmware/vmware.go | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) (limited to 'vm/vmware/vmware.go') diff --git a/vm/vmware/vmware.go b/vm/vmware/vmware.go index 210a4957a..56a97e016 100644 --- a/vm/vmware/vmware.go +++ b/vm/vmware/vmware.go @@ -23,7 +23,9 @@ import ( ) func init() { - vmimpl.Register("vmware", ctor, false) + vmimpl.Register("vmware", vmimpl.Type{ + Ctor: ctor, + }) } type Config struct { -- cgit mrf-deployment