Browse code

Update hcsshim vendor to v0.8.20

Full set of changes: https://github.com/Microsoft/hcsshim/compare/v0.8.16...v0.8.20

Importantly brings in https://github.com/microsoft/hcsshim/pull/1065,
which fixes #42610.

Signed-off-by: Kevin Parsons <kevpar@microsoft.com>

Kevin Parsons authored on 2021/07/10 07:36:39
Showing 233 changed files
... ...
@@ -1,5 +1,5 @@
1 1
 github.com/Azure/go-ansiterm                        d185dfc1b5a126116ea5a19e148e29d16b4574c9
2
-github.com/Microsoft/hcsshim                        e811ee705ec77df2ae28857ade553043fb564d91 # v0.8.16
2
+github.com/Microsoft/hcsshim                        3ad51c76263bad09548a40e1996960814a12a870 # v0.8.20
3 3
 github.com/Microsoft/go-winio                       5c2e05d71961716a6c392a06ada435aaf5d5302c # v0.4.19
4 4
 github.com/docker/libtrust                          9cbd2a1374f46905c68a4eb3694a130610adc62a
5 5
 github.com/golang/gddo                              72a348e765d293ed6d1ded7b699591f14d6cd921
... ...
@@ -49,7 +49,7 @@ func SetupBaseOSLayer(ctx context.Context, layerPath string, vhdHandle windows.H
49 49
 //
50 50
 // `options` are the options applied while processing the layer.
51 51
 func SetupBaseOSVolume(ctx context.Context, layerPath, volumePath string, options OsLayerOptions) (err error) {
52
-	if osversion.Get().Build < 19645 {
52
+	if osversion.Build() < 19645 {
53 53
 		return errors.New("SetupBaseOSVolume is not present on builds older than 19645")
54 54
 	}
55 55
 	title := "hcsshim.SetupBaseOSVolume"
... ...
@@ -4,7 +4,7 @@
4 4
 package computestorage
5 5
 
6 6
 import (
7
-	hcsschema "github.com/Microsoft/hcsshim/internal/schema2"
7
+	hcsschema "github.com/Microsoft/hcsshim/internal/hcs/schema2"
8 8
 )
9 9
 
10 10
 //go:generate go run ../mksyscall_windows.go -output zsyscall_windows.go storage.go
... ...
@@ -8,8 +8,8 @@ import (
8 8
 	"time"
9 9
 
10 10
 	"github.com/Microsoft/hcsshim/internal/hcs"
11
+	"github.com/Microsoft/hcsshim/internal/hcs/schema1"
11 12
 	"github.com/Microsoft/hcsshim/internal/mergemaps"
12
-	"github.com/Microsoft/hcsshim/internal/schema1"
13 13
 )
14 14
 
15 15
 // ContainerProperties holds the properties for a container and the processes running in that container
... ...
@@ -59,7 +59,7 @@ var (
59 59
 	// ErrVmcomputeOperationInvalidState is an error encountered when the compute system is not in a valid state for the requested operation
60 60
 	ErrVmcomputeOperationInvalidState = hcs.ErrVmcomputeOperationInvalidState
61 61
 
62
-	// ErrProcNotFound is an error encountered when the the process cannot be found
62
+	// ErrProcNotFound is an error encountered when a procedure look up fails.
63 63
 	ErrProcNotFound = hcs.ErrProcNotFound
64 64
 
65 65
 	// ErrVmcomputeOperationAccessIsDenied is an error which can be encountered when enumerating compute systems in RS1/RS2
... ...
@@ -159,7 +159,7 @@ func (e *ProcessError) Error() string {
159 159
 // IsNotExist checks if an error is caused by the Container or Process not existing.
160 160
 // Note: Currently, ErrElementNotFound can mean that a Process has either
161 161
 // already exited, or does not exist. Both IsAlreadyStopped and IsNotExist
162
-// will currently return true when the error is ErrElementNotFound or ErrProcNotFound.
162
+// will currently return true when the error is ErrElementNotFound.
163 163
 func IsNotExist(err error) bool {
164 164
 	if _, ok := err.(EndpointNotFoundError); ok {
165 165
 		return true
... ...
@@ -192,7 +192,7 @@ func IsTimeout(err error) bool {
192 192
 // a Container or Process being already stopped.
193 193
 // Note: Currently, ErrElementNotFound can mean that a Process has either
194 194
 // already exited, or does not exist. Both IsAlreadyStopped and IsNotExist
195
-// will currently return true when the error is ErrElementNotFound or ErrProcNotFound.
195
+// will currently return true when the error is ErrElementNotFound.
196 196
 func IsAlreadyStopped(err error) bool {
197 197
 	return hcs.IsAlreadyStopped(getInnerError(err))
198 198
 }
... ...
@@ -3,13 +3,13 @@ module github.com/Microsoft/hcsshim
3 3
 go 1.13
4 4
 
5 5
 require (
6
-	github.com/Microsoft/go-winio v0.4.17-0.20210211115548-6eac466e5fa3
7
-	github.com/containerd/cgroups v0.0.0-20210114181951-8a68de567b68
8
-	github.com/containerd/console v1.0.1
9
-	github.com/containerd/containerd v1.5.0-beta.4
10
-	github.com/containerd/go-runc v0.0.0-20201020171139-16b287bc67d0
6
+	github.com/Microsoft/go-winio v0.4.17
7
+	github.com/containerd/cgroups v1.0.1
8
+	github.com/containerd/console v1.0.2
9
+	github.com/containerd/containerd v1.5.1
10
+	github.com/containerd/go-runc v1.0.0
11 11
 	github.com/containerd/ttrpc v1.0.2
12
-	github.com/containerd/typeurl v1.0.1
12
+	github.com/containerd/typeurl v1.0.2
13 13
 	github.com/gogo/protobuf v1.3.2
14 14
 	github.com/opencontainers/runtime-spec v1.0.3-0.20200929063507-e6143ca7d51d
15 15
 	github.com/pkg/errors v0.9.1
... ...
@@ -20,3 +20,8 @@ require (
20 20
 	golang.org/x/sys v0.0.0-20210324051608-47abb6519492
21 21
 	google.golang.org/grpc v1.33.2
22 22
 )
23
+
24
+replace (
25
+	google.golang.org/genproto => google.golang.org/genproto v0.0.0-20200224152610-e50cd9704f63
26
+	google.golang.org/grpc => google.golang.org/grpc v1.27.1
27
+)
... ...
@@ -4,7 +4,7 @@ import (
4 4
 	"io"
5 5
 	"time"
6 6
 
7
-	"github.com/Microsoft/hcsshim/internal/schema1"
7
+	"github.com/Microsoft/hcsshim/internal/hcs/schema1"
8 8
 )
9 9
 
10 10
 // ProcessConfig is used as both the input of Container.CreateProcess
... ...
@@ -4,8 +4,8 @@ import (
4 4
 	"context"
5 5
 	"io"
6 6
 
7
-	"github.com/Microsoft/hcsshim/internal/schema1"
8
-	hcsschema "github.com/Microsoft/hcsshim/internal/schema2"
7
+	"github.com/Microsoft/hcsshim/internal/hcs/schema1"
8
+	hcsschema "github.com/Microsoft/hcsshim/internal/hcs/schema2"
9 9
 )
10 10
 
11 11
 // Process is the interface for an OS process running in a container or utility VM.
... ...
@@ -17,6 +17,12 @@ type Process interface {
17 17
 	// CloseStdin causes the process's stdin handle to receive EOF/EPIPE/whatever
18 18
 	// is appropriate to indicate that no more data is available.
19 19
 	CloseStdin(ctx context.Context) error
20
+	// CloseStdout closes the stdout connection to the process. It is used to indicate
21
+	// that we are done receiving output on the shim side.
22
+	CloseStdout(ctx context.Context) error
23
+	// CloseStderr closes the stderr connection to the process. It is used to indicate
24
+	// that we are done receiving output on the shim side.
25
+	CloseStderr(ctx context.Context) error
20 26
 	// Pid returns the process ID.
21 27
 	Pid() int
22 28
 	// Stdio returns the stdio streams for a process. These may be nil if a stream
... ...
@@ -13,7 +13,7 @@ import (
13 13
 
14 14
 var (
15 15
 	nextCallback    uintptr
16
-	callbackMap     = map[uintptr]*notifcationWatcherContext{}
16
+	callbackMap     = map[uintptr]*notificationWatcherContext{}
17 17
 	callbackMapLock = sync.RWMutex{}
18 18
 
19 19
 	notificationWatcherCallback = syscall.NewCallback(notificationWatcher)
... ...
@@ -87,7 +87,7 @@ func (hn hcsNotification) String() string {
87 87
 
88 88
 type notificationChannel chan error
89 89
 
90
-type notifcationWatcherContext struct {
90
+type notificationWatcherContext struct {
91 91
 	channels notificationChannels
92 92
 	handle   vmcompute.HcsCallback
93 93
 
... ...
@@ -60,7 +60,7 @@ var (
60 60
 	// ErrVmcomputeOperationInvalidState is an error encountered when the compute system is not in a valid state for the requested operation
61 61
 	ErrVmcomputeOperationInvalidState = syscall.Errno(0xc0370105)
62 62
 
63
-	// ErrProcNotFound is an error encountered when the the process cannot be found
63
+	// ErrProcNotFound is an error encountered when a procedure look up fails.
64 64
 	ErrProcNotFound = syscall.Errno(0x7f)
65 65
 
66 66
 	// ErrVmcomputeOperationAccessIsDenied is an error which can be encountered when enumerating compute systems in RS1/RS2
... ...
@@ -242,12 +242,11 @@ func makeProcessError(process *Process, op string, err error, events []ErrorEven
242 242
 // IsNotExist checks if an error is caused by the Container or Process not existing.
243 243
 // Note: Currently, ErrElementNotFound can mean that a Process has either
244 244
 // already exited, or does not exist. Both IsAlreadyStopped and IsNotExist
245
-// will currently return true when the error is ErrElementNotFound or ErrProcNotFound.
245
+// will currently return true when the error is ErrElementNotFound.
246 246
 func IsNotExist(err error) bool {
247 247
 	err = getInnerError(err)
248 248
 	return err == ErrComputeSystemDoesNotExist ||
249
-		err == ErrElementNotFound ||
250
-		err == ErrProcNotFound
249
+		err == ErrElementNotFound
251 250
 }
252 251
 
253 252
 // IsAlreadyClosed checks if an error is caused by the Container or Process having been
... ...
@@ -278,12 +277,11 @@ func IsTimeout(err error) bool {
278 278
 // a Container or Process being already stopped.
279 279
 // Note: Currently, ErrElementNotFound can mean that a Process has either
280 280
 // already exited, or does not exist. Both IsAlreadyStopped and IsNotExist
281
-// will currently return true when the error is ErrElementNotFound or ErrProcNotFound.
281
+// will currently return true when the error is ErrElementNotFound.
282 282
 func IsAlreadyStopped(err error) bool {
283 283
 	err = getInnerError(err)
284 284
 	return err == ErrVmcomputeAlreadyStopped ||
285
-		err == ErrElementNotFound ||
286
-		err == ErrProcNotFound
285
+		err == ErrElementNotFound
287 286
 }
288 287
 
289 288
 // IsNotSupported returns a boolean indicating whether the error is caused by
... ...
@@ -118,7 +118,7 @@ func (process *Process) Signal(ctx context.Context, options interface{}) (bool,
118 118
 	process.handleLock.RLock()
119 119
 	defer process.handleLock.RUnlock()
120 120
 
121
-	operation := "hcsshim::Process::Signal"
121
+	operation := "hcs::Process::Signal"
122 122
 
123 123
 	if process.handle == 0 {
124 124
 		return false, makeProcessError(process, operation, ErrAlreadyClosed, nil)
... ...
@@ -143,7 +143,7 @@ func (process *Process) Kill(ctx context.Context) (bool, error) {
143 143
 	process.handleLock.RLock()
144 144
 	defer process.handleLock.RUnlock()
145 145
 
146
-	operation := "hcsshim::Process::Kill"
146
+	operation := "hcs::Process::Kill"
147 147
 
148 148
 	if process.handle == 0 {
149 149
 		return false, makeProcessError(process, operation, ErrAlreadyClosed, nil)
... ...
@@ -164,7 +164,7 @@ func (process *Process) Kill(ctx context.Context) (bool, error) {
164 164
 // This MUST be called exactly once per `process.handle` but `Wait` is safe to
165 165
 // call multiple times.
166 166
 func (process *Process) waitBackground() {
167
-	operation := "hcsshim::Process::waitBackground"
167
+	operation := "hcs::Process::waitBackground"
168 168
 	ctx, span := trace.StartSpan(context.Background(), operation)
169 169
 	defer span.End()
170 170
 	span.AddAttributes(
... ...
@@ -229,7 +229,7 @@ func (process *Process) ResizeConsole(ctx context.Context, width, height uint16)
229 229
 	process.handleLock.RLock()
230 230
 	defer process.handleLock.RUnlock()
231 231
 
232
-	operation := "hcsshim::Process::ResizeConsole"
232
+	operation := "hcs::Process::ResizeConsole"
233 233
 
234 234
 	if process.handle == 0 {
235 235
 		return makeProcessError(process, operation, ErrAlreadyClosed, nil)
... ...
@@ -267,7 +267,7 @@ func (process *Process) ExitCode() (int, error) {
267 267
 		}
268 268
 		return process.exitCode, nil
269 269
 	default:
270
-		return -1, makeProcessError(process, "hcsshim::Process::ExitCode", ErrInvalidProcessState, nil)
270
+		return -1, makeProcessError(process, "hcs::Process::ExitCode", ErrInvalidProcessState, nil)
271 271
 	}
272 272
 }
273 273
 
... ...
@@ -275,7 +275,7 @@ func (process *Process) ExitCode() (int, error) {
275 275
 // these pipes does not close the underlying pipes. Once returned, these pipes
276 276
 // are the responsibility of the caller to close.
277 277
 func (process *Process) StdioLegacy() (_ io.WriteCloser, _ io.ReadCloser, _ io.ReadCloser, err error) {
278
-	operation := "hcsshim::Process::StdioLegacy"
278
+	operation := "hcs::Process::StdioLegacy"
279 279
 	ctx, span := trace.StartSpan(context.Background(), operation)
280 280
 	defer span.End()
281 281
 	defer func() { oc.SetSpanStatus(span, err) }()
... ...
@@ -327,7 +327,7 @@ func (process *Process) CloseStdin(ctx context.Context) error {
327 327
 	process.handleLock.RLock()
328 328
 	defer process.handleLock.RUnlock()
329 329
 
330
-	operation := "hcsshim::Process::CloseStdin"
330
+	operation := "hcs::Process::CloseStdin"
331 331
 
332 332
 	if process.handle == 0 {
333 333
 		return makeProcessError(process, operation, ErrAlreadyClosed, nil)
... ...
@@ -361,10 +361,59 @@ func (process *Process) CloseStdin(ctx context.Context) error {
361 361
 	return nil
362 362
 }
363 363
 
364
+func (process *Process) CloseStdout(ctx context.Context) (err error) {
365
+	ctx, span := trace.StartSpan(ctx, "hcs::Process::CloseStdout") //nolint:ineffassign,staticcheck
366
+	defer span.End()
367
+	defer func() { oc.SetSpanStatus(span, err) }()
368
+	span.AddAttributes(
369
+		trace.StringAttribute("cid", process.SystemID()),
370
+		trace.Int64Attribute("pid", int64(process.processID)))
371
+
372
+	process.handleLock.Lock()
373
+	defer process.handleLock.Unlock()
374
+
375
+	if process.handle == 0 {
376
+		return nil
377
+	}
378
+
379
+	process.stdioLock.Lock()
380
+	defer process.stdioLock.Unlock()
381
+	if process.stdout != nil {
382
+		process.stdout.Close()
383
+		process.stdout = nil
384
+	}
385
+	return nil
386
+}
387
+
388
+func (process *Process) CloseStderr(ctx context.Context) (err error) {
389
+	ctx, span := trace.StartSpan(ctx, "hcs::Process::CloseStderr") //nolint:ineffassign,staticcheck
390
+	defer span.End()
391
+	defer func() { oc.SetSpanStatus(span, err) }()
392
+	span.AddAttributes(
393
+		trace.StringAttribute("cid", process.SystemID()),
394
+		trace.Int64Attribute("pid", int64(process.processID)))
395
+
396
+	process.handleLock.Lock()
397
+	defer process.handleLock.Unlock()
398
+
399
+	if process.handle == 0 {
400
+		return nil
401
+	}
402
+
403
+	process.stdioLock.Lock()
404
+	defer process.stdioLock.Unlock()
405
+	if process.stderr != nil {
406
+		process.stderr.Close()
407
+		process.stderr = nil
408
+
409
+	}
410
+	return nil
411
+}
412
+
364 413
 // Close cleans up any state associated with the process but does not kill
365 414
 // or wait on it.
366 415
 func (process *Process) Close() (err error) {
367
-	operation := "hcsshim::Process::Close"
416
+	operation := "hcs::Process::Close"
368 417
 	ctx, span := trace.StartSpan(context.Background(), operation)
369 418
 	defer span.End()
370 419
 	defer func() { oc.SetSpanStatus(span, err) }()
... ...
@@ -414,7 +463,7 @@ func (process *Process) Close() (err error) {
414 414
 }
415 415
 
416 416
 func (process *Process) registerCallback(ctx context.Context) error {
417
-	callbackContext := &notifcationWatcherContext{
417
+	callbackContext := &notificationWatcherContext{
418 418
 		channels:  newProcessChannels(),
419 419
 		systemID:  process.SystemID(),
420 420
 		processID: process.processID,
421 421
new file mode 100644
... ...
@@ -0,0 +1,250 @@
0
+package schema1
1
+
2
+import (
3
+	"encoding/json"
4
+	"time"
5
+
6
+	"github.com/Microsoft/go-winio/pkg/guid"
7
+	hcsschema "github.com/Microsoft/hcsshim/internal/hcs/schema2"
8
+)
9
+
10
+// ProcessConfig is used as both the input of Container.CreateProcess
11
+// and to convert the parameters to JSON for passing onto the HCS
12
+type ProcessConfig struct {
13
+	ApplicationName   string            `json:",omitempty"`
14
+	CommandLine       string            `json:",omitempty"`
15
+	CommandArgs       []string          `json:",omitempty"` // Used by Linux Containers on Windows
16
+	User              string            `json:",omitempty"`
17
+	WorkingDirectory  string            `json:",omitempty"`
18
+	Environment       map[string]string `json:",omitempty"`
19
+	EmulateConsole    bool              `json:",omitempty"`
20
+	CreateStdInPipe   bool              `json:",omitempty"`
21
+	CreateStdOutPipe  bool              `json:",omitempty"`
22
+	CreateStdErrPipe  bool              `json:",omitempty"`
23
+	ConsoleSize       [2]uint           `json:",omitempty"`
24
+	CreateInUtilityVm bool              `json:",omitempty"` // Used by Linux Containers on Windows
25
+	OCISpecification  *json.RawMessage  `json:",omitempty"` // Used by Linux Containers on Windows
26
+}
27
+
28
+type Layer struct {
29
+	ID   string
30
+	Path string
31
+}
32
+
33
+type MappedDir struct {
34
+	HostPath          string
35
+	ContainerPath     string
36
+	ReadOnly          bool
37
+	BandwidthMaximum  uint64
38
+	IOPSMaximum       uint64
39
+	CreateInUtilityVM bool
40
+	// LinuxMetadata - Support added in 1803/RS4+.
41
+	LinuxMetadata bool `json:",omitempty"`
42
+}
43
+
44
+type MappedPipe struct {
45
+	HostPath          string
46
+	ContainerPipeName string
47
+}
48
+
49
+type HvRuntime struct {
50
+	ImagePath           string `json:",omitempty"`
51
+	SkipTemplate        bool   `json:",omitempty"`
52
+	LinuxInitrdFile     string `json:",omitempty"` // File under ImagePath on host containing an initrd image for starting a Linux utility VM
53
+	LinuxKernelFile     string `json:",omitempty"` // File under ImagePath on host containing a kernel for starting a Linux utility VM
54
+	LinuxBootParameters string `json:",omitempty"` // Additional boot parameters for starting a Linux Utility VM in initrd mode
55
+	BootSource          string `json:",omitempty"` // "Vhd" for Linux Utility VM booting from VHD
56
+	WritableBootSource  bool   `json:",omitempty"` // Linux Utility VM booting from VHD
57
+}
58
+
59
+type MappedVirtualDisk struct {
60
+	HostPath          string `json:",omitempty"` // Path to VHD on the host
61
+	ContainerPath     string // Platform-specific mount point path in the container
62
+	CreateInUtilityVM bool   `json:",omitempty"`
63
+	ReadOnly          bool   `json:",omitempty"`
64
+	Cache             string `json:",omitempty"` // "" (Unspecified); "Disabled"; "Enabled"; "Private"; "PrivateAllowSharing"
65
+	AttachOnly        bool   `json:",omitempty"`
66
+}
67
+
68
+// AssignedDevice represents a device that has been directly assigned to a container
69
+//
70
+// NOTE: Support added in RS5
71
+type AssignedDevice struct {
72
+	//  InterfaceClassGUID of the device to assign to container.
73
+	InterfaceClassGUID string `json:"InterfaceClassGuid,omitempty"`
74
+}
75
+
76
+// ContainerConfig is used as both the input of CreateContainer
77
+// and to convert the parameters to JSON for passing onto the HCS
78
+type ContainerConfig struct {
79
+	SystemType                  string              // HCS requires this to be hard-coded to "Container"
80
+	Name                        string              // Name of the container. We use the docker ID.
81
+	Owner                       string              `json:",omitempty"` // The management platform that created this container
82
+	VolumePath                  string              `json:",omitempty"` // Windows volume path for scratch space. Used by Windows Server Containers only. Format \\?\\Volume{GUID}
83
+	IgnoreFlushesDuringBoot     bool                `json:",omitempty"` // Optimization hint for container startup in Windows
84
+	LayerFolderPath             string              `json:",omitempty"` // Where the layer folders are located. Used by Windows Server Containers only. Format  %root%\windowsfilter\containerID
85
+	Layers                      []Layer             // List of storage layers. Required for Windows Server and Hyper-V Containers. Format ID=GUID;Path=%root%\windowsfilter\layerID
86
+	Credentials                 string              `json:",omitempty"` // Credentials information
87
+	ProcessorCount              uint32              `json:",omitempty"` // Number of processors to assign to the container.
88
+	ProcessorWeight             uint64              `json:",omitempty"` // CPU shares (relative weight to other containers with cpu shares). Range is from 1 to 10000. A value of 0 results in default shares.
89
+	ProcessorMaximum            int64               `json:",omitempty"` // Specifies the portion of processor cycles that this container can use as a percentage times 100. Range is from 1 to 10000. A value of 0 results in no limit.
90
+	StorageIOPSMaximum          uint64              `json:",omitempty"` // Maximum Storage IOPS
91
+	StorageBandwidthMaximum     uint64              `json:",omitempty"` // Maximum Storage Bandwidth in bytes per second
92
+	StorageSandboxSize          uint64              `json:",omitempty"` // Size in bytes that the container system drive should be expanded to if smaller
93
+	MemoryMaximumInMB           int64               `json:",omitempty"` // Maximum memory available to the container in Megabytes
94
+	HostName                    string              `json:",omitempty"` // Hostname
95
+	MappedDirectories           []MappedDir         `json:",omitempty"` // List of mapped directories (volumes/mounts)
96
+	MappedPipes                 []MappedPipe        `json:",omitempty"` // List of mapped Windows named pipes
97
+	HvPartition                 bool                // True if it a Hyper-V Container
98
+	NetworkSharedContainerName  string              `json:",omitempty"` // Name (ID) of the container that we will share the network stack with.
99
+	EndpointList                []string            `json:",omitempty"` // List of networking endpoints to be attached to container
100
+	HvRuntime                   *HvRuntime          `json:",omitempty"` // Hyper-V container settings. Used by Hyper-V containers only. Format ImagePath=%root%\BaseLayerID\UtilityVM
101
+	Servicing                   bool                `json:",omitempty"` // True if this container is for servicing
102
+	AllowUnqualifiedDNSQuery    bool                `json:",omitempty"` // True to allow unqualified DNS name resolution
103
+	DNSSearchList               string              `json:",omitempty"` // Comma seperated list of DNS suffixes to use for name resolution
104
+	ContainerType               string              `json:",omitempty"` // "Linux" for Linux containers on Windows. Omitted otherwise.
105
+	TerminateOnLastHandleClosed bool                `json:",omitempty"` // Should HCS terminate the container once all handles have been closed
106
+	MappedVirtualDisks          []MappedVirtualDisk `json:",omitempty"` // Array of virtual disks to mount at start
107
+	AssignedDevices             []AssignedDevice    `json:",omitempty"` // Array of devices to assign. NOTE: Support added in RS5
108
+}
109
+
110
+type ComputeSystemQuery struct {
111
+	IDs    []string `json:"Ids,omitempty"`
112
+	Types  []string `json:",omitempty"`
113
+	Names  []string `json:",omitempty"`
114
+	Owners []string `json:",omitempty"`
115
+}
116
+
117
+type PropertyType string
118
+
119
+const (
120
+	PropertyTypeStatistics        PropertyType = "Statistics"        // V1 and V2
121
+	PropertyTypeProcessList       PropertyType = "ProcessList"       // V1 and V2
122
+	PropertyTypeMappedVirtualDisk PropertyType = "MappedVirtualDisk" // Not supported in V2 schema call
123
+	PropertyTypeGuestConnection   PropertyType = "GuestConnection"   // V1 and V2. Nil return from HCS before RS5
124
+)
125
+
126
+type PropertyQuery struct {
127
+	PropertyTypes []PropertyType `json:",omitempty"`
128
+}
129
+
130
+// ContainerProperties holds the properties for a container and the processes running in that container
131
+type ContainerProperties struct {
132
+	ID                           string `json:"Id"`
133
+	State                        string
134
+	Name                         string
135
+	SystemType                   string
136
+	RuntimeOSType                string `json:"RuntimeOsType,omitempty"`
137
+	Owner                        string
138
+	SiloGUID                     string                              `json:"SiloGuid,omitempty"`
139
+	RuntimeID                    guid.GUID                           `json:"RuntimeId,omitempty"`
140
+	IsRuntimeTemplate            bool                                `json:",omitempty"`
141
+	RuntimeImagePath             string                              `json:",omitempty"`
142
+	Stopped                      bool                                `json:",omitempty"`
143
+	ExitType                     string                              `json:",omitempty"`
144
+	AreUpdatesPending            bool                                `json:",omitempty"`
145
+	ObRoot                       string                              `json:",omitempty"`
146
+	Statistics                   Statistics                          `json:",omitempty"`
147
+	ProcessList                  []ProcessListItem                   `json:",omitempty"`
148
+	MappedVirtualDiskControllers map[int]MappedVirtualDiskController `json:",omitempty"`
149
+	GuestConnectionInfo          GuestConnectionInfo                 `json:",omitempty"`
150
+}
151
+
152
+// MemoryStats holds the memory statistics for a container
153
+type MemoryStats struct {
154
+	UsageCommitBytes            uint64 `json:"MemoryUsageCommitBytes,omitempty"`
155
+	UsageCommitPeakBytes        uint64 `json:"MemoryUsageCommitPeakBytes,omitempty"`
156
+	UsagePrivateWorkingSetBytes uint64 `json:"MemoryUsagePrivateWorkingSetBytes,omitempty"`
157
+}
158
+
159
+// ProcessorStats holds the processor statistics for a container
160
+type ProcessorStats struct {
161
+	TotalRuntime100ns  uint64 `json:",omitempty"`
162
+	RuntimeUser100ns   uint64 `json:",omitempty"`
163
+	RuntimeKernel100ns uint64 `json:",omitempty"`
164
+}
165
+
166
+// StorageStats holds the storage statistics for a container
167
+type StorageStats struct {
168
+	ReadCountNormalized  uint64 `json:",omitempty"`
169
+	ReadSizeBytes        uint64 `json:",omitempty"`
170
+	WriteCountNormalized uint64 `json:",omitempty"`
171
+	WriteSizeBytes       uint64 `json:",omitempty"`
172
+}
173
+
174
+// NetworkStats holds the network statistics for a container
175
+type NetworkStats struct {
176
+	BytesReceived          uint64 `json:",omitempty"`
177
+	BytesSent              uint64 `json:",omitempty"`
178
+	PacketsReceived        uint64 `json:",omitempty"`
179
+	PacketsSent            uint64 `json:",omitempty"`
180
+	DroppedPacketsIncoming uint64 `json:",omitempty"`
181
+	DroppedPacketsOutgoing uint64 `json:",omitempty"`
182
+	EndpointId             string `json:",omitempty"`
183
+	InstanceId             string `json:",omitempty"`
184
+}
185
+
186
+// Statistics is the structure returned by a statistics call on a container
187
+type Statistics struct {
188
+	Timestamp          time.Time      `json:",omitempty"`
189
+	ContainerStartTime time.Time      `json:",omitempty"`
190
+	Uptime100ns        uint64         `json:",omitempty"`
191
+	Memory             MemoryStats    `json:",omitempty"`
192
+	Processor          ProcessorStats `json:",omitempty"`
193
+	Storage            StorageStats   `json:",omitempty"`
194
+	Network            []NetworkStats `json:",omitempty"`
195
+}
196
+
197
+// ProcessList is the structure of an item returned by a ProcessList call on a container
198
+type ProcessListItem struct {
199
+	CreateTimestamp              time.Time `json:",omitempty"`
200
+	ImageName                    string    `json:",omitempty"`
201
+	KernelTime100ns              uint64    `json:",omitempty"`
202
+	MemoryCommitBytes            uint64    `json:",omitempty"`
203
+	MemoryWorkingSetPrivateBytes uint64    `json:",omitempty"`
204
+	MemoryWorkingSetSharedBytes  uint64    `json:",omitempty"`
205
+	ProcessId                    uint32    `json:",omitempty"`
206
+	UserTime100ns                uint64    `json:",omitempty"`
207
+}
208
+
209
+// MappedVirtualDiskController is the structure of an item returned by a MappedVirtualDiskList call on a container
210
+type MappedVirtualDiskController struct {
211
+	MappedVirtualDisks map[int]MappedVirtualDisk `json:",omitempty"`
212
+}
213
+
214
+// GuestDefinedCapabilities is part of the GuestConnectionInfo returned by a GuestConnection call on a utility VM
215
+type GuestDefinedCapabilities struct {
216
+	NamespaceAddRequestSupported  bool `json:",omitempty"`
217
+	SignalProcessSupported        bool `json:",omitempty"`
218
+	DumpStacksSupported           bool `json:",omitempty"`
219
+	DeleteContainerStateSupported bool `json:",omitempty"`
220
+	UpdateContainerSupported      bool `json:",omitempty"`
221
+}
222
+
223
+// GuestConnectionInfo is the structure of an iterm return by a GuestConnection call on a utility VM
224
+type GuestConnectionInfo struct {
225
+	SupportedSchemaVersions  []hcsschema.Version      `json:",omitempty"`
226
+	ProtocolVersion          uint32                   `json:",omitempty"`
227
+	GuestDefinedCapabilities GuestDefinedCapabilities `json:",omitempty"`
228
+}
229
+
230
+// Type of Request Support in ModifySystem
231
+type RequestType string
232
+
233
+// Type of Resource Support in ModifySystem
234
+type ResourceType string
235
+
236
+// RequestType const
237
+const (
238
+	Add     RequestType  = "Add"
239
+	Remove  RequestType  = "Remove"
240
+	Network ResourceType = "Network"
241
+)
242
+
243
+// ResourceModificationRequestResponse is the structure used to send request to the container to modify the system
244
+// Supported resource types are Network and Request Types are Add/Remove
245
+type ResourceModificationRequestResponse struct {
246
+	Resource ResourceType `json:"ResourceType"`
247
+	Data     interface{}  `json:"Settings"`
248
+	Request  RequestType  `json:"RequestType,omitempty"`
249
+}
0 250
new file mode 100644
... ...
@@ -0,0 +1,30 @@
0
+/*
1
+ * HCS API
2
+ *
3
+ * No description provided (generated by Swagger Codegen https://github.com/swagger-api/swagger-codegen)
4
+ *
5
+ * API version: 2.1
6
+ * Generated by: Swagger Codegen (https://github.com/swagger-api/swagger-codegen.git)
7
+ */
8
+
9
+package hcsschema
10
+
11
+type Attachment struct {
12
+	Type_ string `json:"Type,omitempty"`
13
+
14
+	Path string `json:"Path,omitempty"`
15
+
16
+	IgnoreFlushes bool `json:"IgnoreFlushes,omitempty"`
17
+
18
+	CachingMode string `json:"CachingMode,omitempty"`
19
+
20
+	NoWriteHardening bool `json:"NoWriteHardening,omitempty"`
21
+
22
+	DisableExpansionOptimization bool `json:"DisableExpansionOptimization,omitempty"`
23
+
24
+	IgnoreRelativeLocator bool `json:"IgnoreRelativeLocator,omitempty"`
25
+
26
+	CaptureIoAttributionContext bool `json:"CaptureIoAttributionContext,omitempty"`
27
+
28
+	ReadOnly bool `json:"ReadOnly,omitempty"`
29
+}
0 30
new file mode 100644
... ...
@@ -0,0 +1,13 @@
0
+/*
1
+ * HCS API
2
+ *
3
+ * No description provided (generated by Swagger Codegen https://github.com/swagger-api/swagger-codegen)
4
+ *
5
+ * API version: 2.1
6
+ * Generated by: Swagger Codegen (https://github.com/swagger-api/swagger-codegen.git)
7
+ */
8
+
9
+package hcsschema
10
+
11
+type Battery struct {
12
+}
0 13
new file mode 100644
... ...
@@ -0,0 +1,18 @@
0
+/*
1
+ * HCS API
2
+ *
3
+ * No description provided (generated by Swagger Codegen https://github.com/swagger-api/swagger-codegen)
4
+ *
5
+ * API version: 2.1
6
+ * Generated by: Swagger Codegen (https://github.com/swagger-api/swagger-codegen.git)
7
+ */
8
+
9
+package hcsschema
10
+
11
+type CacheQueryStatsResponse struct {
12
+	L3OccupancyBytes int32 `json:"L3OccupancyBytes,omitempty"`
13
+
14
+	L3TotalBwBytes int32 `json:"L3TotalBwBytes,omitempty"`
15
+
16
+	L3LocalBwBytes int32 `json:"L3LocalBwBytes,omitempty"`
17
+}
0 18
new file mode 100644
... ...
@@ -0,0 +1,27 @@
0
+/*
1
+ * HCS API
2
+ *
3
+ * No description provided (generated by Swagger Codegen https://github.com/swagger-api/swagger-codegen)
4
+ *
5
+ * API version: 2.1
6
+ * Generated by: Swagger Codegen (https://github.com/swagger-api/swagger-codegen.git)
7
+ */
8
+
9
+package hcsschema
10
+
11
+type Chipset struct {
12
+	Uefi *Uefi `json:"Uefi,omitempty"`
13
+
14
+	IsNumLockDisabled bool `json:"IsNumLockDisabled,omitempty"`
15
+
16
+	BaseBoardSerialNumber string `json:"BaseBoardSerialNumber,omitempty"`
17
+
18
+	ChassisSerialNumber string `json:"ChassisSerialNumber,omitempty"`
19
+
20
+	ChassisAssetTag string `json:"ChassisAssetTag,omitempty"`
21
+
22
+	UseUtc bool `json:"UseUtc,omitempty"`
23
+
24
+	// LinuxKernelDirect - Added in v2.2 Builds >=181117
25
+	LinuxKernelDirect *LinuxKernelDirect `json:"LinuxKernelDirect,omitempty"`
26
+}
0 27
new file mode 100644
... ...
@@ -0,0 +1,14 @@
0
+/*
1
+ * HCS API
2
+ *
3
+ * No description provided (generated by Swagger Codegen https://github.com/swagger-api/swagger-codegen)
4
+ *
5
+ * API version: 2.1
6
+ * Generated by: Swagger Codegen (https://github.com/swagger-api/swagger-codegen.git)
7
+ */
8
+
9
+package hcsschema
10
+
11
+type CloseHandle struct {
12
+	Handle string `json:"Handle,omitempty"`
13
+}
0 14
new file mode 100644
... ...
@@ -0,0 +1,17 @@
0
+/*
1
+ * HCS API
2
+ *
3
+ * No description provided (generated by Swagger Codegen https://github.com/swagger-api/swagger-codegen)
4
+ *
5
+ * API version: 2.1
6
+ * Generated by: Swagger Codegen (https://github.com/swagger-api/swagger-codegen.git)
7
+ */
8
+
9
+package hcsschema
10
+
11
+//  ComPort specifies the named pipe that will be used for the port, with empty string indicating a disconnected port.
12
+type ComPort struct {
13
+	NamedPipe string `json:"NamedPipe,omitempty"`
14
+
15
+	OptimizeForDebugger bool `json:"OptimizeForDebugger,omitempty"`
16
+}
0 17
new file mode 100644
... ...
@@ -0,0 +1,26 @@
0
+/*
1
+ * HCS API
2
+ *
3
+ * No description provided (generated by Swagger Codegen https://github.com/swagger-api/swagger-codegen)
4
+ *
5
+ * API version: 2.1
6
+ * Generated by: Swagger Codegen (https://github.com/swagger-api/swagger-codegen.git)
7
+ */
8
+
9
+package hcsschema
10
+
11
+type ComputeSystem struct {
12
+	Owner string `json:"Owner,omitempty"`
13
+
14
+	SchemaVersion *Version `json:"SchemaVersion,omitempty"`
15
+
16
+	HostingSystemId string `json:"HostingSystemId,omitempty"`
17
+
18
+	HostedSystem interface{} `json:"HostedSystem,omitempty"`
19
+
20
+	Container *Container `json:"Container,omitempty"`
21
+
22
+	VirtualMachine *VirtualMachine `json:"VirtualMachine,omitempty"`
23
+
24
+	ShouldTerminateOnLastHandleClosed bool `json:"ShouldTerminateOnLastHandleClosed,omitempty"`
25
+}
0 26
new file mode 100644
... ...
@@ -0,0 +1,72 @@
0
+/*
1
+ * HCS API
2
+ *
3
+ * No description provided (generated by Swagger Codegen https://github.com/swagger-api/swagger-codegen)
4
+ *
5
+ * API version: 2.1
6
+ * Generated by: Swagger Codegen (https://github.com/swagger-api/swagger-codegen.git)
7
+ */
8
+
9
+package hcsschema
10
+
11
+import (
12
+	"net/http"
13
+)
14
+
15
+// contextKeys are used to identify the type of value in the context.
16
+// Since these are string, it is possible to get a short description of the
17
+// context key for logging and debugging using key.String().
18
+
19
+type contextKey string
20
+
21
+func (c contextKey) String() string {
22
+	return "auth " + string(c)
23
+}
24
+
25
+var (
26
+	// ContextOAuth2 takes a oauth2.TokenSource as authentication for the request.
27
+	ContextOAuth2 = contextKey("token")
28
+
29
+	// ContextBasicAuth takes BasicAuth as authentication for the request.
30
+	ContextBasicAuth = contextKey("basic")
31
+
32
+	// ContextAccessToken takes a string oauth2 access token as authentication for the request.
33
+	ContextAccessToken = contextKey("accesstoken")
34
+
35
+	// ContextAPIKey takes an APIKey as authentication for the request
36
+	ContextAPIKey = contextKey("apikey")
37
+)
38
+
39
+// BasicAuth provides basic http authentication to a request passed via context using ContextBasicAuth
40
+type BasicAuth struct {
41
+	UserName string `json:"userName,omitempty"`
42
+	Password string `json:"password,omitempty"`
43
+}
44
+
45
+// APIKey provides API key based authentication to a request passed via context using ContextAPIKey
46
+type APIKey struct {
47
+	Key    string
48
+	Prefix string
49
+}
50
+
51
+type Configuration struct {
52
+	BasePath      string            `json:"basePath,omitempty"`
53
+	Host          string            `json:"host,omitempty"`
54
+	Scheme        string            `json:"scheme,omitempty"`
55
+	DefaultHeader map[string]string `json:"defaultHeader,omitempty"`
56
+	UserAgent     string            `json:"userAgent,omitempty"`
57
+	HTTPClient    *http.Client
58
+}
59
+
60
+func NewConfiguration() *Configuration {
61
+	cfg := &Configuration{
62
+		BasePath:      "https://localhost",
63
+		DefaultHeader: make(map[string]string),
64
+		UserAgent:     "Swagger-Codegen/2.1.0/go",
65
+	}
66
+	return cfg
67
+}
68
+
69
+func (c *Configuration) AddDefaultHeader(key string, value string) {
70
+	c.DefaultHeader[key] = value
71
+}
0 72
new file mode 100644
... ...
@@ -0,0 +1,16 @@
0
+/*
1
+ * HCS API
2
+ *
3
+ * No description provided (generated by Swagger Codegen https://github.com/swagger-api/swagger-codegen)
4
+ *
5
+ * API version: 2.1
6
+ * Generated by: Swagger Codegen (https://github.com/swagger-api/swagger-codegen.git)
7
+ */
8
+
9
+package hcsschema
10
+
11
+type ConsoleSize struct {
12
+	Height int32 `json:"Height,omitempty"`
13
+
14
+	Width int32 `json:"Width,omitempty"`
15
+}
0 16
new file mode 100644
... ...
@@ -0,0 +1,34 @@
0
+/*
1
+ * HCS API
2
+ *
3
+ * No description provided (generated by Swagger Codegen https://github.com/swagger-api/swagger-codegen)
4
+ *
5
+ * API version: 2.1
6
+ * Generated by: Swagger Codegen (https://github.com/swagger-api/swagger-codegen.git)
7
+ */
8
+
9
+package hcsschema
10
+
11
+type Container struct {
12
+	GuestOs *GuestOs `json:"GuestOs,omitempty"`
13
+
14
+	Storage *Storage `json:"Storage,omitempty"`
15
+
16
+	MappedDirectories []MappedDirectory `json:"MappedDirectories,omitempty"`
17
+
18
+	MappedPipes []MappedPipe `json:"MappedPipes,omitempty"`
19
+
20
+	Memory *Memory `json:"Memory,omitempty"`
21
+
22
+	Processor *Processor `json:"Processor,omitempty"`
23
+
24
+	Networking *Networking `json:"Networking,omitempty"`
25
+
26
+	HvSocket *HvSocket `json:"HvSocket,omitempty"`
27
+
28
+	ContainerCredentialGuard *ContainerCredentialGuardState `json:"ContainerCredentialGuard,omitempty"`
29
+
30
+	RegistryChanges *RegistryChanges `json:"RegistryChanges,omitempty"`
31
+
32
+	AssignedDevices []Device `json:"AssignedDevices,omitempty"`
33
+}
0 34
new file mode 100644
... ...
@@ -0,0 +1,16 @@
0
+/*
1
+ * HCS API
2
+ *
3
+ * No description provided (generated by Swagger Codegen https://github.com/swagger-api/swagger-codegen)
4
+ *
5
+ * API version: 2.4
6
+ * Generated by: Swagger Codegen (https://github.com/swagger-api/swagger-codegen.git)
7
+ */
8
+
9
+package hcsschema
10
+
11
+type ContainerCredentialGuardAddInstanceRequest struct {
12
+	Id             string `json:"Id,omitempty"`
13
+	CredentialSpec string `json:"CredentialSpec,omitempty"`
14
+	Transport      string `json:"Transport,omitempty"`
15
+}
0 16
new file mode 100644
... ...
@@ -0,0 +1,15 @@
0
+/*
1
+ * HCS API
2
+ *
3
+ * No description provided (generated by Swagger Codegen https://github.com/swagger-api/swagger-codegen)
4
+ *
5
+ * API version: 2.4
6
+ * Generated by: Swagger Codegen (https://github.com/swagger-api/swagger-codegen.git)
7
+ */
8
+
9
+package hcsschema
10
+
11
+type ContainerCredentialGuardHvSocketServiceConfig struct {
12
+	ServiceId     string                 `json:"ServiceId,omitempty"`
13
+	ServiceConfig *HvSocketServiceConfig `json:"ServiceConfig,omitempty"`
14
+}
0 15
new file mode 100644
... ...
@@ -0,0 +1,16 @@
0
+/*
1
+ * HCS API
2
+ *
3
+ * No description provided (generated by Swagger Codegen https://github.com/swagger-api/swagger-codegen)
4
+ *
5
+ * API version: 2.4
6
+ * Generated by: Swagger Codegen (https://github.com/swagger-api/swagger-codegen.git)
7
+ */
8
+
9
+package hcsschema
10
+
11
+type ContainerCredentialGuardInstance struct {
12
+	Id              string                                         `json:"Id,omitempty"`
13
+	CredentialGuard *ContainerCredentialGuardState                 `json:"CredentialGuard,omitempty"`
14
+	HvSocketConfig  *ContainerCredentialGuardHvSocketServiceConfig `json:"HvSocketConfig,omitempty"`
15
+}
0 16
new file mode 100644
... ...
@@ -0,0 +1,17 @@
0
+/*
1
+ * HCS API
2
+ *
3
+ * No description provided (generated by Swagger Codegen https://github.com/swagger-api/swagger-codegen)
4
+ *
5
+ * API version: 2.4
6
+ * Generated by: Swagger Codegen (https://github.com/swagger-api/swagger-codegen.git)
7
+ */
8
+
9
+package hcsschema
10
+
11
+type ContainerCredentialGuardModifyOperation string
12
+
13
+const (
14
+	AddInstance    ContainerCredentialGuardModifyOperation = "AddInstance"
15
+	RemoveInstance ContainerCredentialGuardModifyOperation = "RemoveInstance"
16
+)
0 17
new file mode 100644
... ...
@@ -0,0 +1,15 @@
0
+/*
1
+ * HCS API
2
+ *
3
+ * No description provided (generated by Swagger Codegen https://github.com/swagger-api/swagger-codegen)
4
+ *
5
+ * API version: 2.4
6
+ * Generated by: Swagger Codegen (https://github.com/swagger-api/swagger-codegen.git)
7
+ */
8
+
9
+package hcsschema
10
+
11
+type ContainerCredentialGuardOperationRequest struct {
12
+	Operation        ContainerCredentialGuardModifyOperation `json:"Operation,omitempty"`
13
+	OperationDetails interface{}                             `json:"OperationDetails,omitempty"`
14
+}
0 15
new file mode 100644
... ...
@@ -0,0 +1,14 @@
0
+/*
1
+ * HCS API
2
+ *
3
+ * No description provided (generated by Swagger Codegen https://github.com/swagger-api/swagger-codegen)
4
+ *
5
+ * API version: 2.4
6
+ * Generated by: Swagger Codegen (https://github.com/swagger-api/swagger-codegen.git)
7
+ */
8
+
9
+package hcsschema
10
+
11
+type ContainerCredentialGuardRemoveInstanceRequest struct {
12
+	Id string `json:"Id,omitempty"`
13
+}
0 14
new file mode 100644
... ...
@@ -0,0 +1,25 @@
0
+/*
1
+ * HCS API
2
+ *
3
+ * No description provided (generated by Swagger Codegen https://github.com/swagger-api/swagger-codegen)
4
+ *
5
+ * API version: 2.1
6
+ * Generated by: Swagger Codegen (https://github.com/swagger-api/swagger-codegen.git)
7
+ */
8
+
9
+package hcsschema
10
+
11
+type ContainerCredentialGuardState struct {
12
+
13
+	//  Authentication cookie for calls to a Container Credential Guard instance.
14
+	Cookie string `json:"Cookie,omitempty"`
15
+
16
+	//  Name of the RPC endpoint of the Container Credential Guard instance.
17
+	RpcEndpoint string `json:"RpcEndpoint,omitempty"`
18
+
19
+	//  Transport used for the configured Container Credential Guard instance.
20
+	Transport string `json:"Transport,omitempty"`
21
+
22
+	//  Credential spec used for the configured Container Credential Guard instance.
23
+	CredentialSpec string `json:"CredentialSpec,omitempty"`
24
+}
0 25
new file mode 100644
... ...
@@ -0,0 +1,14 @@
0
+/*
1
+ * HCS API
2
+ *
3
+ * No description provided (generated by Swagger Codegen https://github.com/swagger-api/swagger-codegen)
4
+ *
5
+ * API version: 2.4
6
+ * Generated by: Swagger Codegen (https://github.com/swagger-api/swagger-codegen.git)
7
+ */
8
+
9
+package hcsschema
10
+
11
+type ContainerCredentialGuardSystemInfo struct {
12
+	Instances []ContainerCredentialGuardInstance `json:"Instances,omitempty"`
13
+}
0 14
new file mode 100644
... ...
@@ -0,0 +1,25 @@
0
+/*
1
+ * HCS API
2
+ *
3
+ * No description provided (generated by Swagger Codegen https://github.com/swagger-api/swagger-codegen)
4
+ *
5
+ * API version: 2.1
6
+ * Generated by: Swagger Codegen (https://github.com/swagger-api/swagger-codegen.git)
7
+ */
8
+
9
+package hcsschema
10
+
11
+//  memory usage as viewed from within the container
12
+type ContainerMemoryInformation struct {
13
+	TotalPhysicalBytes int32 `json:"TotalPhysicalBytes,omitempty"`
14
+
15
+	TotalUsage int32 `json:"TotalUsage,omitempty"`
16
+
17
+	CommittedBytes int32 `json:"CommittedBytes,omitempty"`
18
+
19
+	SharedCommittedBytes int32 `json:"SharedCommittedBytes,omitempty"`
20
+
21
+	CommitLimitBytes int32 `json:"CommitLimitBytes,omitempty"`
22
+
23
+	PeakCommitmentBytes int32 `json:"PeakCommitmentBytes,omitempty"`
24
+}
0 25
new file mode 100644
... ...
@@ -0,0 +1,15 @@
0
+/*
1
+ * HCS API
2
+ *
3
+ * No description provided (generated by Swagger Codegen https://github.com/swagger-api/swagger-codegen)
4
+ *
5
+ * API version: 2.4
6
+ * Generated by: Swagger Codegen (https://github.com/swagger-api/swagger-codegen.git)
7
+ */
8
+
9
+package hcsschema
10
+
11
+// CPU groups allow Hyper-V administrators to better manage and allocate the host's CPU resources across guest virtual machines
12
+type CpuGroup struct {
13
+	Id string `json:"Id,omitempty"`
14
+}
0 15
new file mode 100644
... ...
@@ -0,0 +1,15 @@
0
+/*
1
+ * HCS API
2
+ *
3
+ * No description provided (generated by Swagger Codegen https://github.com/swagger-api/swagger-codegen)
4
+ *
5
+ * API version: 2.4
6
+ * Generated by: Swagger Codegen (https://github.com/swagger-api/swagger-codegen.git)
7
+ */
8
+
9
+package hcsschema
10
+
11
+type CpuGroupAffinity struct {
12
+	LogicalProcessorCount int32   `json:"LogicalProcessorCount,omitempty"`
13
+	LogicalProcessors     []int32 `json:"LogicalProcessors,omitempty"`
14
+}
0 15
new file mode 100644
... ...
@@ -0,0 +1,18 @@
0
+/*
1
+ * HCS API
2
+ *
3
+ * No description provided (generated by Swagger Codegen https://github.com/swagger-api/swagger-codegen)
4
+ *
5
+ * API version: 2.4
6
+ * Generated by: Swagger Codegen (https://github.com/swagger-api/swagger-codegen.git)
7
+ */
8
+
9
+package hcsschema
10
+
11
+type CpuGroupConfig struct {
12
+	GroupId         string             `json:"GroupId,omitempty"`
13
+	Affinity        *CpuGroupAffinity  `json:"Affinity,omitempty"`
14
+	GroupProperties []CpuGroupProperty `json:"GroupProperties,omitempty"`
15
+	// Hypervisor CPU group IDs exposed to clients
16
+	HypervisorGroupId int32 `json:"HypervisorGroupId,omitempty"`
17
+}
0 18
new file mode 100644
... ...
@@ -0,0 +1,15 @@
0
+/*
1
+ * HCS API
2
+ *
3
+ * No description provided (generated by Swagger Codegen https://github.com/swagger-api/swagger-codegen)
4
+ *
5
+ * API version: 2.4
6
+ * Generated by: Swagger Codegen (https://github.com/swagger-api/swagger-codegen.git)
7
+ */
8
+
9
+package hcsschema
10
+
11
+// Structure used to return cpu groups for a Service property query
12
+type CpuGroupConfigurations struct {
13
+	CpuGroups []CpuGroupConfig `json:"CpuGroups,omitempty"`
14
+}
0 15
new file mode 100644
... ...
@@ -0,0 +1,18 @@
0
+/*
1
+ * HCS API
2
+ *
3
+ * No description provided (generated by Swagger Codegen https://github.com/swagger-api/swagger-codegen)
4
+ *
5
+ * API version: 2.4
6
+ * Generated by: Swagger Codegen (https://github.com/swagger-api/swagger-codegen.git)
7
+ */
8
+
9
+package hcsschema
10
+
11
+type CPUGroupOperation string
12
+
13
+const (
14
+	CreateGroup CPUGroupOperation = "CreateGroup"
15
+	DeleteGroup CPUGroupOperation = "DeleteGroup"
16
+	SetProperty CPUGroupOperation = "SetProperty"
17
+)
0 18
new file mode 100644
... ...
@@ -0,0 +1,15 @@
0
+/*
1
+ * HCS API
2
+ *
3
+ * No description provided (generated by Swagger Codegen https://github.com/swagger-api/swagger-codegen)
4
+ *
5
+ * API version: 2.4
6
+ * Generated by: Swagger Codegen (https://github.com/swagger-api/swagger-codegen.git)
7
+ */
8
+
9
+package hcsschema
10
+
11
+type CpuGroupProperty struct {
12
+	PropertyCode  uint32 `json:"PropertyCode,omitempty"`
13
+	PropertyValue uint32 `json:"PropertyValue,omitempty"`
14
+}
0 15
new file mode 100644
... ...
@@ -0,0 +1,17 @@
0
+/*
1
+ * HCS API
2
+ *
3
+ * No description provided (generated by Swagger Codegen https://github.com/swagger-api/swagger-codegen)
4
+ *
5
+ * API version: 2.4
6
+ * Generated by: Swagger Codegen (https://github.com/swagger-api/swagger-codegen.git)
7
+ */
8
+
9
+package hcsschema
10
+
11
+// Create group operation settings
12
+type CreateGroupOperation struct {
13
+	GroupId               string   `json:"GroupId,omitempty"`
14
+	LogicalProcessorCount uint32   `json:"LogicalProcessorCount,omitempty"`
15
+	LogicalProcessors     []uint32 `json:"LogicalProcessors,omitempty"`
16
+}
0 17
new file mode 100644
... ...
@@ -0,0 +1,15 @@
0
+/*
1
+ * HCS API
2
+ *
3
+ * No description provided (generated by Swagger Codegen https://github.com/swagger-api/swagger-codegen)
4
+ *
5
+ * API version: 2.4
6
+ * Generated by: Swagger Codegen (https://github.com/swagger-api/swagger-codegen.git)
7
+ */
8
+
9
+package hcsschema
10
+
11
+// Delete group operation settings
12
+type DeleteGroupOperation struct {
13
+	GroupId string `json:"GroupId,omitempty"`
14
+}
0 15
new file mode 100644
... ...
@@ -0,0 +1,27 @@
0
+/*
1
+ * HCS API
2
+ *
3
+ * No description provided (generated by Swagger Codegen https://github.com/swagger-api/swagger-codegen)
4
+ *
5
+ * API version: 2.1
6
+ * Generated by: Swagger Codegen (https://github.com/swagger-api/swagger-codegen.git)
7
+ */
8
+
9
+package hcsschema
10
+
11
+type DeviceType string
12
+
13
+const (
14
+	ClassGUID      DeviceType = "ClassGuid"
15
+	DeviceInstance DeviceType = "DeviceInstance"
16
+	GPUMirror      DeviceType = "GpuMirror"
17
+)
18
+
19
+type Device struct {
20
+	//  The type of device to assign to the container.
21
+	Type DeviceType `json:"Type,omitempty"`
22
+	//  The interface class guid of the device interfaces to assign to the  container.  Only used when Type is ClassGuid.
23
+	InterfaceClassGuid string `json:"InterfaceClassGuid,omitempty"`
24
+	//  The location path of the device to assign to the container.  Only used when Type is DeviceInstance.
25
+	LocationPath string `json:"LocationPath,omitempty"`
26
+}
0 27
new file mode 100644
... ...
@@ -0,0 +1,46 @@
0
+/*
1
+ * HCS API
2
+ *
3
+ * No description provided (generated by Swagger Codegen https://github.com/swagger-api/swagger-codegen)
4
+ *
5
+ * API version: 2.1
6
+ * Generated by: Swagger Codegen (https://github.com/swagger-api/swagger-codegen.git)
7
+ */
8
+
9
+package hcsschema
10
+
11
+type Devices struct {
12
+	ComPorts map[string]ComPort `json:"ComPorts,omitempty"`
13
+
14
+	Scsi map[string]Scsi `json:"Scsi,omitempty"`
15
+
16
+	VirtualPMem *VirtualPMemController `json:"VirtualPMem,omitempty"`
17
+
18
+	NetworkAdapters map[string]NetworkAdapter `json:"NetworkAdapters,omitempty"`
19
+
20
+	VideoMonitor *VideoMonitor `json:"VideoMonitor,omitempty"`
21
+
22
+	Keyboard *Keyboard `json:"Keyboard,omitempty"`
23
+
24
+	Mouse *Mouse `json:"Mouse,omitempty"`
25
+
26
+	HvSocket *HvSocket2 `json:"HvSocket,omitempty"`
27
+
28
+	EnhancedModeVideo *EnhancedModeVideo `json:"EnhancedModeVideo,omitempty"`
29
+
30
+	GuestCrashReporting *GuestCrashReporting `json:"GuestCrashReporting,omitempty"`
31
+
32
+	VirtualSmb *VirtualSmb `json:"VirtualSmb,omitempty"`
33
+
34
+	Plan9 *Plan9 `json:"Plan9,omitempty"`
35
+
36
+	Battery *Battery `json:"Battery,omitempty"`
37
+
38
+	FlexibleIov map[string]FlexibleIoDevice `json:"FlexibleIov,omitempty"`
39
+
40
+	SharedMemory *SharedMemoryConfiguration `json:"SharedMemory,omitempty"`
41
+
42
+	// TODO: This is pre-release support in schema 2.3. Need to add build number
43
+	// docs when a public build with this is out.
44
+	VirtualPci map[string]VirtualPciDevice `json:",omitempty"`
45
+}
0 46
new file mode 100644
... ...
@@ -0,0 +1,14 @@
0
+/*
1
+ * HCS API
2
+ *
3
+ * No description provided (generated by Swagger Codegen https://github.com/swagger-api/swagger-codegen)
4
+ *
5
+ * API version: 2.1
6
+ * Generated by: Swagger Codegen (https://github.com/swagger-api/swagger-codegen.git)
7
+ */
8
+
9
+package hcsschema
10
+
11
+type EnhancedModeVideo struct {
12
+	ConnectionOptions *RdpConnectionOptions `json:"ConnectionOptions,omitempty"`
13
+}
0 14
new file mode 100644
... ...
@@ -0,0 +1,18 @@
0
+/*
1
+ * HCS API
2
+ *
3
+ * No description provided (generated by Swagger Codegen https://github.com/swagger-api/swagger-codegen)
4
+ *
5
+ * API version: 2.1
6
+ * Generated by: Swagger Codegen (https://github.com/swagger-api/swagger-codegen.git)
7
+ */
8
+
9
+package hcsschema
10
+
11
+type FlexibleIoDevice struct {
12
+	EmulatorId string `json:"EmulatorId,omitempty"`
13
+
14
+	HostingModel string `json:"HostingModel,omitempty"`
15
+
16
+	Configuration []string `json:"Configuration,omitempty"`
17
+}
0 18
new file mode 100644
... ...
@@ -0,0 +1,19 @@
0
+/*
1
+ * HCS API
2
+ *
3
+ * No description provided (generated by Swagger Codegen https://github.com/swagger-api/swagger-codegen)
4
+ *
5
+ * API version: 2.1
6
+ * Generated by: Swagger Codegen (https://github.com/swagger-api/swagger-codegen.git)
7
+ */
8
+
9
+package hcsschema
10
+
11
+type GuestConnection struct {
12
+
13
+	//  Use Vsock rather than Hyper-V sockets to communicate with the guest service.
14
+	UseVsock bool `json:"UseVsock,omitempty"`
15
+
16
+	//  Don't disconnect the guest connection when pausing the virtual machine.
17
+	UseConnectedSuspend bool `json:"UseConnectedSuspend,omitempty"`
18
+}
0 19
new file mode 100644
... ...
@@ -0,0 +1,21 @@
0
+/*
1
+ * HCS API
2
+ *
3
+ * No description provided (generated by Swagger Codegen https://github.com/swagger-api/swagger-codegen)
4
+ *
5
+ * API version: 2.1
6
+ * Generated by: Swagger Codegen (https://github.com/swagger-api/swagger-codegen.git)
7
+ */
8
+
9
+package hcsschema
10
+
11
+//  Information about the guest.
12
+type GuestConnectionInfo struct {
13
+
14
+	//  Each schema version x.y stands for the range of versions a.b where a==x  and b<=y. This list comes from the SupportedSchemaVersions field in  GcsCapabilities.
15
+	SupportedSchemaVersions []Version `json:"SupportedSchemaVersions,omitempty"`
16
+
17
+	ProtocolVersion int32 `json:"ProtocolVersion,omitempty"`
18
+
19
+	GuestDefinedCapabilities *interface{} `json:"GuestDefinedCapabilities,omitempty"`
20
+}
0 21
new file mode 100644
... ...
@@ -0,0 +1,14 @@
0
+/*
1
+ * HCS API
2
+ *
3
+ * No description provided (generated by Swagger Codegen https://github.com/swagger-api/swagger-codegen)
4
+ *
5
+ * API version: 2.1
6
+ * Generated by: Swagger Codegen (https://github.com/swagger-api/swagger-codegen.git)
7
+ */
8
+
9
+package hcsschema
10
+
11
+type GuestCrashReporting struct {
12
+	WindowsCrashSettings *WindowsCrashReporting `json:"WindowsCrashSettings,omitempty"`
13
+}
0 14
new file mode 100644
... ...
@@ -0,0 +1,14 @@
0
+/*
1
+ * HCS API
2
+ *
3
+ * No description provided (generated by Swagger Codegen https://github.com/swagger-api/swagger-codegen)
4
+ *
5
+ * API version: 2.1
6
+ * Generated by: Swagger Codegen (https://github.com/swagger-api/swagger-codegen.git)
7
+ */
8
+
9
+package hcsschema
10
+
11
+type GuestOs struct {
12
+	HostName string `json:"HostName,omitempty"`
13
+}
0 14
new file mode 100644
... ...
@@ -0,0 +1,22 @@
0
+/*
1
+ * HCS API
2
+ *
3
+ * No description provided (generated by Swagger Codegen https://github.com/swagger-api/swagger-codegen)
4
+ *
5
+ * API version: 2.1
6
+ * Generated by: Swagger Codegen (https://github.com/swagger-api/swagger-codegen.git)
7
+ */
8
+
9
+package hcsschema
10
+
11
+type GuestState struct {
12
+
13
+	//  The path to an existing file uses for persistent guest state storage.  An empty string indicates the system should initialize new transient, in-memory guest state.
14
+	GuestStateFilePath string `json:"GuestStateFilePath,omitempty"`
15
+
16
+	//  The path to an existing file for persistent runtime state storage.  An empty string indicates the system should initialize new transient, in-memory runtime state.
17
+	RuntimeStateFilePath string `json:"RuntimeStateFilePath,omitempty"`
18
+
19
+	//  If true, the guest state and runtime state files will be used as templates  to populate transient, in-memory state instead of using the files as persistent backing store.
20
+	ForceTransientState bool `json:"ForceTransientState,omitempty"`
21
+}
0 22
new file mode 100644
... ...
@@ -0,0 +1,16 @@
0
+/*
1
+ * HCS API
2
+ *
3
+ * No description provided (generated by Swagger Codegen https://github.com/swagger-api/swagger-codegen)
4
+ *
5
+ * API version: 2.4
6
+ * Generated by: Swagger Codegen (https://github.com/swagger-api/swagger-codegen.git)
7
+ */
8
+
9
+package hcsschema
10
+
11
+// Structure used to request a service processor modification
12
+type HostProcessorModificationRequest struct {
13
+	Operation        CPUGroupOperation `json:"Operation,omitempty"`
14
+	OperationDetails interface{}       `json:"OperationDetails,omitempty"`
15
+}
0 16
new file mode 100644
... ...
@@ -0,0 +1,16 @@
0
+/*
1
+ * HCS API
2
+ *
3
+ * No description provided (generated by Swagger Codegen https://github.com/swagger-api/swagger-codegen)
4
+ *
5
+ * API version: 2.1
6
+ * Generated by: Swagger Codegen (https://github.com/swagger-api/swagger-codegen.git)
7
+ */
8
+
9
+package hcsschema
10
+
11
+type HostedSystem struct {
12
+	SchemaVersion *Version `json:"SchemaVersion,omitempty"`
13
+
14
+	Container *Container `json:"Container,omitempty"`
15
+}
0 16
new file mode 100644
... ...
@@ -0,0 +1,16 @@
0
+/*
1
+ * HCS API
2
+ *
3
+ * No description provided (generated by Swagger Codegen https://github.com/swagger-api/swagger-codegen)
4
+ *
5
+ * API version: 2.1
6
+ * Generated by: Swagger Codegen (https://github.com/swagger-api/swagger-codegen.git)
7
+ */
8
+
9
+package hcsschema
10
+
11
+type HvSocket struct {
12
+	Config *HvSocketSystemConfig `json:"Config,omitempty"`
13
+
14
+	EnablePowerShellDirect bool `json:"EnablePowerShellDirect,omitempty"`
15
+}
0 16
new file mode 100644
... ...
@@ -0,0 +1,15 @@
0
+/*
1
+ * HCS API
2
+ *
3
+ * No description provided (generated by Swagger Codegen https://github.com/swagger-api/swagger-codegen)
4
+ *
5
+ * API version: 2.1
6
+ * Generated by: Swagger Codegen (https://github.com/swagger-api/swagger-codegen.git)
7
+ */
8
+
9
+package hcsschema
10
+
11
+//  HvSocket configuration for a VM
12
+type HvSocket2 struct {
13
+	HvSocketConfig *HvSocketSystemConfig `json:"HvSocketConfig,omitempty"`
14
+}
0 15
new file mode 100644
... ...
@@ -0,0 +1,17 @@
0
+/*
1
+ * HCS API
2
+ *
3
+ * No description provided (generated by Swagger Codegen https://github.com/swagger-api/swagger-codegen)
4
+ *
5
+ * API version: 2.4
6
+ * Generated by: Swagger Codegen (https://github.com/swagger-api/swagger-codegen.git)
7
+ */
8
+
9
+package hcsschema
10
+
11
+//  This class defines address settings applied to a VM
12
+//  by the GCS every time a VM starts or restores.
13
+type HvSocketAddress struct {
14
+	LocalAddress  string `json:"LocalAddress,omitempty"`
15
+	ParentAddress string `json:"ParentAddress,omitempty"`
16
+}
0 17
new file mode 100644
... ...
@@ -0,0 +1,28 @@
0
+/*
1
+ * HCS API
2
+ *
3
+ * No description provided (generated by Swagger Codegen https://github.com/swagger-api/swagger-codegen)
4
+ *
5
+ * API version: 2.1
6
+ * Generated by: Swagger Codegen (https://github.com/swagger-api/swagger-codegen.git)
7
+ */
8
+
9
+package hcsschema
10
+
11
+type HvSocketServiceConfig struct {
12
+
13
+	//  SDDL string that HvSocket will check before allowing a host process to bind  to this specific service.  If not specified, defaults to the system DefaultBindSecurityDescriptor, defined in  HvSocketSystemWpConfig in V1.
14
+	BindSecurityDescriptor string `json:"BindSecurityDescriptor,omitempty"`
15
+
16
+	//  SDDL string that HvSocket will check before allowing a host process to connect  to this specific service.  If not specified, defaults to the system DefaultConnectSecurityDescriptor, defined in  HvSocketSystemWpConfig in V1.
17
+	ConnectSecurityDescriptor string `json:"ConnectSecurityDescriptor,omitempty"`
18
+
19
+	//  If true, HvSocket will process wildcard binds for this service/system combination.  Wildcard binds are secured in the registry at  SOFTWARE/Microsoft/Windows NT/CurrentVersion/Virtualization/HvSocket/WildcardDescriptors
20
+	AllowWildcardBinds bool `json:"AllowWildcardBinds,omitempty"`
21
+
22
+	// Disabled controls whether the HvSocket service is accepting connection requests.
23
+	// This set to true will make the service refuse all incoming connections as well as cancel
24
+	// any connections already established. The service itself will still be active however
25
+	// and can be re-enabled at a future time.
26
+	Disabled bool `json:"Disabled,omitempty"`
27
+}
0 28
new file mode 100644
... ...
@@ -0,0 +1,22 @@
0
+/*
1
+ * HCS API
2
+ *
3
+ * No description provided (generated by Swagger Codegen https://github.com/swagger-api/swagger-codegen)
4
+ *
5
+ * API version: 2.1
6
+ * Generated by: Swagger Codegen (https://github.com/swagger-api/swagger-codegen.git)
7
+ */
8
+
9
+package hcsschema
10
+
11
+//  This is the HCS Schema version of the HvSocket configuration. The VMWP version is  located in Config.Devices.IC in V1.
12
+type HvSocketSystemConfig struct {
13
+
14
+	//  SDDL string that HvSocket will check before allowing a host process to bind  to an unlisted service for this specific container/VM (not wildcard binds).
15
+	DefaultBindSecurityDescriptor string `json:"DefaultBindSecurityDescriptor,omitempty"`
16
+
17
+	//  SDDL string that HvSocket will check before allowing a host process to connect  to an unlisted service in the VM/container.
18
+	DefaultConnectSecurityDescriptor string `json:"DefaultConnectSecurityDescriptor,omitempty"`
19
+
20
+	ServiceTable map[string]HvSocketServiceConfig `json:"ServiceTable,omitempty"`
21
+}
0 22
new file mode 100644
... ...
@@ -0,0 +1,42 @@
0
+/*
1
+ * HCS API
2
+ *
3
+ * No description provided (generated by Swagger Codegen https://github.com/swagger-api/swagger-codegen)
4
+ *
5
+ * API version: 2.4
6
+ * Generated by: Swagger Codegen (https://github.com/swagger-api/swagger-codegen.git)
7
+ */
8
+
9
+package hcsschema
10
+
11
+type InterruptModerationName string
12
+
13
+// The valid interrupt moderation modes for I/O virtualization (IOV) offloading.
14
+const (
15
+	DefaultName  InterruptModerationName = "Default"
16
+	AdaptiveName InterruptModerationName = "Adaptive"
17
+	OffName      InterruptModerationName = "Off"
18
+	LowName      InterruptModerationName = "Low"
19
+	MediumName   InterruptModerationName = "Medium"
20
+	HighName     InterruptModerationName = "High"
21
+)
22
+
23
+type InterruptModerationValue uint32
24
+
25
+const (
26
+	DefaultValue InterruptModerationValue = iota
27
+	AdaptiveValue
28
+	OffValue
29
+	LowValue    InterruptModerationValue = 100
30
+	MediumValue InterruptModerationValue = 200
31
+	HighValue   InterruptModerationValue = 300
32
+)
33
+
34
+var InterruptModerationValueToName = map[InterruptModerationValue]InterruptModerationName{
35
+	DefaultValue:  DefaultName,
36
+	AdaptiveValue: AdaptiveName,
37
+	OffValue:      OffName,
38
+	LowValue:      LowName,
39
+	MediumValue:   MediumName,
40
+	HighValue:     HighName,
41
+}
0 42
new file mode 100644
... ...
@@ -0,0 +1,22 @@
0
+/*
1
+ * HCS API
2
+ *
3
+ * No description provided (generated by Swagger Codegen https://github.com/swagger-api/swagger-codegen)
4
+ *
5
+ * API version: 2.4
6
+ * Generated by: Swagger Codegen (https://github.com/swagger-api/swagger-codegen.git)
7
+ */
8
+
9
+package hcsschema
10
+
11
+type IovSettings struct {
12
+	// The weight assigned to this port for I/O virtualization (IOV) offloading.
13
+	// Setting this to 0 disables IOV offloading.
14
+	OffloadWeight *uint32 `json:"OffloadWeight,omitempty"`
15
+
16
+	// The number of queue pairs requested for this port for I/O virtualization (IOV) offloading.
17
+	QueuePairsRequested *uint32 `json:"QueuePairsRequested,omitempty"`
18
+
19
+	// The interrupt moderation mode for I/O virtualization (IOV) offloading.
20
+	InterruptModeration *InterruptModerationName `json:"InterruptModeration,omitempty"`
21
+}
0 22
new file mode 100644
... ...
@@ -0,0 +1,13 @@
0
+/*
1
+ * HCS API
2
+ *
3
+ * No description provided (generated by Swagger Codegen https://github.com/swagger-api/swagger-codegen)
4
+ *
5
+ * API version: 2.1
6
+ * Generated by: Swagger Codegen (https://github.com/swagger-api/swagger-codegen.git)
7
+ */
8
+
9
+package hcsschema
10
+
11
+type Keyboard struct {
12
+}
0 13
new file mode 100644
... ...
@@ -0,0 +1,21 @@
0
+/*
1
+ * HCS API
2
+ *
3
+ * No description provided (generated by Swagger Codegen https://github.com/swagger-api/swagger-codegen)
4
+ *
5
+ * API version: 2.1
6
+ * Generated by: Swagger Codegen (https://github.com/swagger-api/swagger-codegen.git)
7
+ */
8
+
9
+package hcsschema
10
+
11
+type Layer struct {
12
+	Id string `json:"Id,omitempty"`
13
+
14
+	Path string `json:"Path,omitempty"`
15
+
16
+	PathType string `json:"PathType,omitempty"`
17
+
18
+	//  Unspecified defaults to Enabled
19
+	Cache string `json:"Cache,omitempty"`
20
+}
0 21
new file mode 100644
... ...
@@ -0,0 +1,18 @@
0
+/*
1
+ * HCS API
2
+ *
3
+ * No description provided (generated by Swagger Codegen https://github.com/swagger-api/swagger-codegen)
4
+ *
5
+ * API version: 2.2
6
+ * Generated by: Swagger Codegen (https://github.com/swagger-api/swagger-codegen.git)
7
+ */
8
+
9
+package hcsschema
10
+
11
+type LinuxKernelDirect struct {
12
+	KernelFilePath string `json:"KernelFilePath,omitempty"`
13
+
14
+	InitRdPath string `json:"InitRdPath,omitempty"`
15
+
16
+	KernelCmdLine string `json:"KernelCmdLine,omitempty"`
17
+}
0 18
new file mode 100644
... ...
@@ -0,0 +1,18 @@
0
+/*
1
+ * HCS API
2
+ *
3
+ * No description provided (generated by Swagger Codegen https://github.com/swagger-api/swagger-codegen)
4
+ *
5
+ * API version: 2.4
6
+ * Generated by: Swagger Codegen (https://github.com/swagger-api/swagger-codegen.git)
7
+ */
8
+
9
+package hcsschema
10
+
11
+type LogicalProcessor struct {
12
+	LpIndex     uint32 `json:"LpIndex,omitempty"`
13
+	NodeNumber  uint8  `json:"NodeNumber,omitempty"`
14
+	PackageId   uint32 `json:"PackageId,omitempty"`
15
+	CoreId      uint32 `json:"CoreId,omitempty"`
16
+	RootVpIndex int32  `json:"RootVpIndex,omitempty"`
17
+}
0 18
new file mode 100644
... ...
@@ -0,0 +1,20 @@
0
+/*
1
+ * HCS API
2
+ *
3
+ * No description provided (generated by Swagger Codegen https://github.com/swagger-api/swagger-codegen)
4
+ *
5
+ * API version: 2.1
6
+ * Generated by: Swagger Codegen (https://github.com/swagger-api/swagger-codegen.git)
7
+ */
8
+
9
+package hcsschema
10
+
11
+type MappedDirectory struct {
12
+	HostPath string `json:"HostPath,omitempty"`
13
+
14
+	HostPathType string `json:"HostPathType,omitempty"`
15
+
16
+	ContainerPath string `json:"ContainerPath,omitempty"`
17
+
18
+	ReadOnly bool `json:"ReadOnly,omitempty"`
19
+}
0 20
new file mode 100644
... ...
@@ -0,0 +1,18 @@
0
+/*
1
+ * HCS API
2
+ *
3
+ * No description provided (generated by Swagger Codegen https://github.com/swagger-api/swagger-codegen)
4
+ *
5
+ * API version: 2.1
6
+ * Generated by: Swagger Codegen (https://github.com/swagger-api/swagger-codegen.git)
7
+ */
8
+
9
+package hcsschema
10
+
11
+type MappedPipe struct {
12
+	ContainerPipeName string `json:"ContainerPipeName,omitempty"`
13
+
14
+	HostPath string `json:"HostPath,omitempty"`
15
+
16
+	HostPathType string `json:"HostPathType,omitempty"`
17
+}
0 18
new file mode 100644
... ...
@@ -0,0 +1,14 @@
0
+/*
1
+ * HCS API
2
+ *
3
+ * No description provided (generated by Swagger Codegen https://github.com/swagger-api/swagger-codegen)
4
+ *
5
+ * API version: 2.1
6
+ * Generated by: Swagger Codegen (https://github.com/swagger-api/swagger-codegen.git)
7
+ */
8
+
9
+package hcsschema
10
+
11
+type Memory struct {
12
+	SizeInMB uint64 `json:"SizeInMB,omitempty"`
13
+}
0 14
new file mode 100644
... ...
@@ -0,0 +1,49 @@
0
+/*
1
+ * HCS API
2
+ *
3
+ * No description provided (generated by Swagger Codegen https://github.com/swagger-api/swagger-codegen)
4
+ *
5
+ * API version: 2.1
6
+ * Generated by: Swagger Codegen (https://github.com/swagger-api/swagger-codegen.git)
7
+ */
8
+
9
+package hcsschema
10
+
11
+type Memory2 struct {
12
+	SizeInMB uint64 `json:"SizeInMB,omitempty"`
13
+
14
+	AllowOvercommit bool `json:"AllowOvercommit,omitempty"`
15
+
16
+	EnableHotHint bool `json:"EnableHotHint,omitempty"`
17
+
18
+	EnableColdHint bool `json:"EnableColdHint,omitempty"`
19
+
20
+	EnableEpf bool `json:"EnableEpf,omitempty"`
21
+
22
+	// EnableDeferredCommit is private in the schema. If regenerated need to add back.
23
+	EnableDeferredCommit bool `json:"EnableDeferredCommit,omitempty"`
24
+
25
+	// EnableColdDiscardHint if enabled, then the memory cold discard hint feature is exposed
26
+	// to the VM, allowing it to trim non-zeroed pages from the working set (if supported by
27
+	// the guest operating system).
28
+	EnableColdDiscardHint bool `json:"EnableColdDiscardHint,omitempty"`
29
+
30
+	// LowMmioGapInMB is the low MMIO region allocated below 4GB.
31
+	//
32
+	// TODO: This is pre-release support in schema 2.3. Need to add build number
33
+	// docs when a public build with this is out.
34
+	LowMMIOGapInMB uint64 `json:"LowMmioGapInMB,omitempty"`
35
+
36
+	// HighMmioBaseInMB is the high MMIO region allocated above 4GB (base and
37
+	// size).
38
+	//
39
+	// TODO: This is pre-release support in schema 2.3. Need to add build number
40
+	// docs when a public build with this is out.
41
+	HighMMIOBaseInMB uint64 `json:"HighMmioBaseInMB,omitempty"`
42
+
43
+	// HighMmioGapInMB is the high MMIO region.
44
+	//
45
+	// TODO: This is pre-release support in schema 2.3. Need to add build number
46
+	// docs when a public build with this is out.
47
+	HighMMIOGapInMB uint64 `json:"HighMmioGapInMB,omitempty"`
48
+}
0 49
new file mode 100644
... ...
@@ -0,0 +1,18 @@
0
+/*
1
+ * HCS API
2
+ *
3
+ * No description provided (generated by Swagger Codegen https://github.com/swagger-api/swagger-codegen)
4
+ *
5
+ * API version: 2.1
6
+ * Generated by: Swagger Codegen (https://github.com/swagger-api/swagger-codegen.git)
7
+ */
8
+
9
+package hcsschema
10
+
11
+type MemoryInformationForVm struct {
12
+	VirtualNodeCount uint32 `json:"VirtualNodeCount,omitempty"`
13
+
14
+	VirtualMachineMemory *VmMemory `json:"VirtualMachineMemory,omitempty"`
15
+
16
+	VirtualNodes []VirtualNodeInfo `json:"VirtualNodes,omitempty"`
17
+}
0 18
new file mode 100644
... ...
@@ -0,0 +1,19 @@
0
+/*
1
+ * HCS API
2
+ *
3
+ * No description provided (generated by Swagger Codegen https://github.com/swagger-api/swagger-codegen)
4
+ *
5
+ * API version: 2.1
6
+ * Generated by: Swagger Codegen (https://github.com/swagger-api/swagger-codegen.git)
7
+ */
8
+
9
+package hcsschema
10
+
11
+//  Memory runtime statistics
12
+type MemoryStats struct {
13
+	MemoryUsageCommitBytes uint64 `json:"MemoryUsageCommitBytes,omitempty"`
14
+
15
+	MemoryUsageCommitPeakBytes uint64 `json:"MemoryUsageCommitPeakBytes,omitempty"`
16
+
17
+	MemoryUsagePrivateWorkingSetBytes uint64 `json:"MemoryUsagePrivateWorkingSetBytes,omitempty"`
18
+}
0 19
new file mode 100644
... ...
@@ -0,0 +1,15 @@
0
+/*
1
+ * HCS API
2
+ *
3
+ * No description provided (generated by Swagger Codegen https://github.com/swagger-api/swagger-codegen)
4
+ *
5
+ * API version: 2.4
6
+ * Generated by: Swagger Codegen (https://github.com/swagger-api/swagger-codegen.git)
7
+ */
8
+
9
+package hcsschema
10
+
11
+type ModificationRequest struct {
12
+	PropertyType PropertyType `json:"PropertyType,omitempty"`
13
+	Settings     interface{}  `json:"Settings,omitempty"`
14
+}
0 15
new file mode 100644
... ...
@@ -0,0 +1,20 @@
0
+/*
1
+ * HCS API
2
+ *
3
+ * No description provided (generated by Swagger Codegen https://github.com/swagger-api/swagger-codegen)
4
+ *
5
+ * API version: 2.1
6
+ * Generated by: Swagger Codegen (https://github.com/swagger-api/swagger-codegen.git)
7
+ */
8
+
9
+package hcsschema
10
+
11
+type ModifySettingRequest struct {
12
+	ResourcePath string `json:"ResourcePath,omitempty"`
13
+
14
+	RequestType string `json:"RequestType,omitempty"`
15
+
16
+	Settings interface{} `json:"Settings,omitempty"` // NOTE: Swagger generated as *interface{}. Locally updated
17
+
18
+	GuestRequest interface{} `json:"GuestRequest,omitempty"` // NOTE: Swagger generated as *interface{}. Locally updated
19
+}
0 20
new file mode 100644
... ...
@@ -0,0 +1,13 @@
0
+/*
1
+ * HCS API
2
+ *
3
+ * No description provided (generated by Swagger Codegen https://github.com/swagger-api/swagger-codegen)
4
+ *
5
+ * API version: 2.1
6
+ * Generated by: Swagger Codegen (https://github.com/swagger-api/swagger-codegen.git)
7
+ */
8
+
9
+package hcsschema
10
+
11
+type Mouse struct {
12
+}
0 13
new file mode 100644
... ...
@@ -0,0 +1,17 @@
0
+/*
1
+ * HCS API
2
+ *
3
+ * No description provided (generated by Swagger Codegen https://github.com/swagger-api/swagger-codegen)
4
+ *
5
+ * API version: 2.1
6
+ * Generated by: Swagger Codegen (https://github.com/swagger-api/swagger-codegen.git)
7
+ */
8
+
9
+package hcsschema
10
+
11
+type NetworkAdapter struct {
12
+	EndpointId string `json:"EndpointId,omitempty"`
13
+	MacAddress string `json:"MacAddress,omitempty"`
14
+	// The I/O virtualization (IOV) offloading configuration.
15
+	IovSettings *IovSettings `json:"IovSettings,omitempty"`
16
+}
0 17
new file mode 100644
... ...
@@ -0,0 +1,23 @@
0
+/*
1
+ * HCS API
2
+ *
3
+ * No description provided (generated by Swagger Codegen https://github.com/swagger-api/swagger-codegen)
4
+ *
5
+ * API version: 2.1
6
+ * Generated by: Swagger Codegen (https://github.com/swagger-api/swagger-codegen.git)
7
+ */
8
+
9
+package hcsschema
10
+
11
+type Networking struct {
12
+	AllowUnqualifiedDnsQuery bool `json:"AllowUnqualifiedDnsQuery,omitempty"`
13
+
14
+	DnsSearchList string `json:"DnsSearchList,omitempty"`
15
+
16
+	NetworkSharedContainerName string `json:"NetworkSharedContainerName,omitempty"`
17
+
18
+	//  Guid in windows; string in linux
19
+	Namespace string `json:"Namespace,omitempty"`
20
+
21
+	NetworkAdapters []string `json:"NetworkAdapters,omitempty"`
22
+}
0 23
new file mode 100644
... ...
@@ -0,0 +1,15 @@
0
+/*
1
+ * HCS API
2
+ *
3
+ * No description provided (generated by Swagger Codegen https://github.com/swagger-api/swagger-codegen)
4
+ *
5
+ * API version: 2.1
6
+ * Generated by: Swagger Codegen (https://github.com/swagger-api/swagger-codegen.git)
7
+ */
8
+
9
+package hcsschema
10
+
11
+//  Notification data that is indicated to components running in the Virtual Machine.
12
+type PauseNotification struct {
13
+	Reason string `json:"Reason,omitempty"`
14
+}
0 15
new file mode 100644
... ...
@@ -0,0 +1,17 @@
0
+/*
1
+ * HCS API
2
+ *
3
+ * No description provided (generated by Swagger Codegen https://github.com/swagger-api/swagger-codegen)
4
+ *
5
+ * API version: 2.1
6
+ * Generated by: Swagger Codegen (https://github.com/swagger-api/swagger-codegen.git)
7
+ */
8
+
9
+package hcsschema
10
+
11
+//  Options for HcsPauseComputeSystem
12
+type PauseOptions struct {
13
+	SuspensionLevel string `json:"SuspensionLevel,omitempty"`
14
+
15
+	HostedNotification *PauseNotification `json:"HostedNotification,omitempty"`
16
+}
0 17
new file mode 100644
... ...
@@ -0,0 +1,14 @@
0
+/*
1
+ * HCS API
2
+ *
3
+ * No description provided (generated by Swagger Codegen https://github.com/swagger-api/swagger-codegen)
4
+ *
5
+ * API version: 2.1
6
+ * Generated by: Swagger Codegen (https://github.com/swagger-api/swagger-codegen.git)
7
+ */
8
+
9
+package hcsschema
10
+
11
+type Plan9 struct {
12
+	Shares []Plan9Share `json:"Shares,omitempty"`
13
+}
0 14
new file mode 100644
... ...
@@ -0,0 +1,34 @@
0
+/*
1
+ * HCS API
2
+ *
3
+ * No description provided (generated by Swagger Codegen https://github.com/swagger-api/swagger-codegen)
4
+ *
5
+ * API version: 2.1
6
+ * Generated by: Swagger Codegen (https://github.com/swagger-api/swagger-codegen.git)
7
+ */
8
+
9
+package hcsschema
10
+
11
+type Plan9Share struct {
12
+	Name string `json:"Name,omitempty"`
13
+
14
+	//  The name by which the guest operation system can access this share, via  the aname parameter in the Plan9 protocol.
15
+	AccessName string `json:"AccessName,omitempty"`
16
+
17
+	Path string `json:"Path,omitempty"`
18
+
19
+	Port int32 `json:"Port,omitempty"`
20
+
21
+	// Flags are marked private. Until they are exported correctly
22
+	//
23
+	// ReadOnly      0x00000001
24
+	// LinuxMetadata 0x00000004
25
+	// CaseSensitive 0x00000008
26
+	Flags int32 `json:"Flags,omitempty"`
27
+
28
+	ReadOnly bool `json:"ReadOnly,omitempty"`
29
+
30
+	UseShareRootIdentity bool `json:"UseShareRootIdentity,omitempty"`
31
+
32
+	AllowedFiles []string `json:"AllowedFiles,omitempty"`
33
+}
0 34
new file mode 100644
... ...
@@ -0,0 +1,33 @@
0
+/*
1
+ * HCS API
2
+ *
3
+ * No description provided (generated by Swagger Codegen https://github.com/swagger-api/swagger-codegen)
4
+ *
5
+ * API version: 2.1
6
+ * Generated by: Swagger Codegen (https://github.com/swagger-api/swagger-codegen.git)
7
+ */
8
+
9
+package hcsschema
10
+
11
+import (
12
+	"time"
13
+)
14
+
15
+//  Information about a process running in a container
16
+type ProcessDetails struct {
17
+	ProcessId int32 `json:"ProcessId,omitempty"`
18
+
19
+	ImageName string `json:"ImageName,omitempty"`
20
+
21
+	CreateTimestamp time.Time `json:"CreateTimestamp,omitempty"`
22
+
23
+	UserTime100ns int32 `json:"UserTime100ns,omitempty"`
24
+
25
+	KernelTime100ns int32 `json:"KernelTime100ns,omitempty"`
26
+
27
+	MemoryCommitBytes int32 `json:"MemoryCommitBytes,omitempty"`
28
+
29
+	MemoryWorkingSetPrivateBytes int32 `json:"MemoryWorkingSetPrivateBytes,omitempty"`
30
+
31
+	MemoryWorkingSetSharedBytes int32 `json:"MemoryWorkingSetSharedBytes,omitempty"`
32
+}
0 33
new file mode 100644
... ...
@@ -0,0 +1,19 @@
0
+/*
1
+ * HCS API
2
+ *
3
+ * No description provided (generated by Swagger Codegen https://github.com/swagger-api/swagger-codegen)
4
+ *
5
+ * API version: 2.1
6
+ * Generated by: Swagger Codegen (https://github.com/swagger-api/swagger-codegen.git)
7
+ */
8
+
9
+package hcsschema
10
+
11
+//  Passed to HcsRpc_ModifyProcess
12
+type ProcessModifyRequest struct {
13
+	Operation string `json:"Operation,omitempty"`
14
+
15
+	ConsoleSize *ConsoleSize `json:"ConsoleSize,omitempty"`
16
+
17
+	CloseHandle *CloseHandle `json:"CloseHandle,omitempty"`
18
+}
0 19
new file mode 100644
... ...
@@ -0,0 +1,46 @@
0
+/*
1
+ * HCS API
2
+ *
3
+ * No description provided (generated by Swagger Codegen https://github.com/swagger-api/swagger-codegen)
4
+ *
5
+ * API version: 2.1
6
+ * Generated by: Swagger Codegen (https://github.com/swagger-api/swagger-codegen.git)
7
+ */
8
+
9
+package hcsschema
10
+
11
+type ProcessParameters struct {
12
+	ApplicationName string `json:"ApplicationName,omitempty"`
13
+
14
+	CommandLine string `json:"CommandLine,omitempty"`
15
+
16
+	//  optional alternative to CommandLine, currently only supported by Linux GCS
17
+	CommandArgs []string `json:"CommandArgs,omitempty"`
18
+
19
+	User string `json:"User,omitempty"`
20
+
21
+	WorkingDirectory string `json:"WorkingDirectory,omitempty"`
22
+
23
+	Environment map[string]string `json:"Environment,omitempty"`
24
+
25
+	//  if set, will run as low-privilege process
26
+	RestrictedToken bool `json:"RestrictedToken,omitempty"`
27
+
28
+	//  if set, ignore StdErrPipe
29
+	EmulateConsole bool `json:"EmulateConsole,omitempty"`
30
+
31
+	CreateStdInPipe bool `json:"CreateStdInPipe,omitempty"`
32
+
33
+	CreateStdOutPipe bool `json:"CreateStdOutPipe,omitempty"`
34
+
35
+	CreateStdErrPipe bool `json:"CreateStdErrPipe,omitempty"`
36
+
37
+	//  height then width
38
+	ConsoleSize []int32 `json:"ConsoleSize,omitempty"`
39
+
40
+	//  if set, find an existing session for the user and create the process in it
41
+	UseExistingLogin bool `json:"UseExistingLogin,omitempty"`
42
+
43
+	//  if set, use the legacy console instead of conhost
44
+	UseLegacyConsole bool `json:"UseLegacyConsole,omitempty"`
45
+}
0 46
new file mode 100644
... ...
@@ -0,0 +1,21 @@
0
+/*
1
+ * HCS API
2
+ *
3
+ * No description provided (generated by Swagger Codegen https://github.com/swagger-api/swagger-codegen)
4
+ *
5
+ * API version: 2.1
6
+ * Generated by: Swagger Codegen (https://github.com/swagger-api/swagger-codegen.git)
7
+ */
8
+
9
+package hcsschema
10
+
11
+//  Status of a process running in a container
12
+type ProcessStatus struct {
13
+	ProcessId int32 `json:"ProcessId,omitempty"`
14
+
15
+	Exited bool `json:"Exited,omitempty"`
16
+
17
+	ExitCode int32 `json:"ExitCode,omitempty"`
18
+
19
+	LastWaitResult int32 `json:"LastWaitResult,omitempty"`
20
+}
0 21
new file mode 100644
... ...
@@ -0,0 +1,18 @@
0
+/*
1
+ * HCS API
2
+ *
3
+ * No description provided (generated by Swagger Codegen https://github.com/swagger-api/swagger-codegen)
4
+ *
5
+ * API version: 2.1
6
+ * Generated by: Swagger Codegen (https://github.com/swagger-api/swagger-codegen.git)
7
+ */
8
+
9
+package hcsschema
10
+
11
+type Processor struct {
12
+	Count int32 `json:"Count,omitempty"`
13
+
14
+	Maximum int32 `json:"Maximum,omitempty"`
15
+
16
+	Weight int32 `json:"Weight,omitempty"`
17
+}
0 18
new file mode 100644
... ...
@@ -0,0 +1,23 @@
0
+/*
1
+ * HCS API
2
+ *
3
+ * No description provided (generated by Swagger Codegen https://github.com/swagger-api/swagger-codegen)
4
+ *
5
+ * API version: 2.5
6
+ * Generated by: Swagger Codegen (https://github.com/swagger-api/swagger-codegen.git)
7
+ */
8
+
9
+package hcsschema
10
+
11
+type Processor2 struct {
12
+	Count int32 `json:"Count,omitempty"`
13
+
14
+	Limit int32 `json:"Limit,omitempty"`
15
+
16
+	Weight int32 `json:"Weight,omitempty"`
17
+
18
+	ExposeVirtualizationExtensions bool `json:"ExposeVirtualizationExtensions,omitempty"`
19
+
20
+	// An optional object that configures the CPU Group to which a Virtual Machine is going to bind to.
21
+	CpuGroup *CpuGroup `json:"CpuGroup,omitempty"`
22
+}
0 23
new file mode 100644
... ...
@@ -0,0 +1,19 @@
0
+/*
1
+ * HCS API
2
+ *
3
+ * No description provided (generated by Swagger Codegen https://github.com/swagger-api/swagger-codegen)
4
+ *
5
+ * API version: 2.1
6
+ * Generated by: Swagger Codegen (https://github.com/swagger-api/swagger-codegen.git)
7
+ */
8
+
9
+package hcsschema
10
+
11
+//  CPU runtime statistics
12
+type ProcessorStats struct {
13
+	TotalRuntime100ns uint64 `json:"TotalRuntime100ns,omitempty"`
14
+
15
+	RuntimeUser100ns uint64 `json:"RuntimeUser100ns,omitempty"`
16
+
17
+	RuntimeKernel100ns uint64 `json:"RuntimeKernel100ns,omitempty"`
18
+}
0 19
new file mode 100644
... ...
@@ -0,0 +1,15 @@
0
+/*
1
+ * HCS API
2
+ *
3
+ * No description provided (generated by Swagger Codegen https://github.com/swagger-api/swagger-codegen)
4
+ *
5
+ * API version: 2.4
6
+ * Generated by: Swagger Codegen (https://github.com/swagger-api/swagger-codegen.git)
7
+ */
8
+
9
+package hcsschema
10
+
11
+type ProcessorTopology struct {
12
+	LogicalProcessorCount uint32             `json:"LogicalProcessorCount,omitempty"`
13
+	LogicalProcessors     []LogicalProcessor `json:"LogicalProcessors,omitempty"`
14
+}
0 15
new file mode 100644
... ...
@@ -0,0 +1,54 @@
0
+/*
1
+ * HCS API
2
+ *
3
+ * No description provided (generated by Swagger Codegen https://github.com/swagger-api/swagger-codegen)
4
+ *
5
+ * API version: 2.1
6
+ * Generated by: Swagger Codegen (https://github.com/swagger-api/swagger-codegen.git)
7
+ */
8
+
9
+package hcsschema
10
+
11
+import (
12
+	v1 "github.com/containerd/cgroups/stats/v1"
13
+)
14
+
15
+type Properties struct {
16
+	Id string `json:"Id,omitempty"`
17
+
18
+	SystemType string `json:"SystemType,omitempty"`
19
+
20
+	RuntimeOsType string `json:"RuntimeOsType,omitempty"`
21
+
22
+	Name string `json:"Name,omitempty"`
23
+
24
+	Owner string `json:"Owner,omitempty"`
25
+
26
+	RuntimeId string `json:"RuntimeId,omitempty"`
27
+
28
+	RuntimeTemplateId string `json:"RuntimeTemplateId,omitempty"`
29
+
30
+	State string `json:"State,omitempty"`
31
+
32
+	Stopped bool `json:"Stopped,omitempty"`
33
+
34
+	ExitType string `json:"ExitType,omitempty"`
35
+
36
+	Memory *MemoryInformationForVm `json:"Memory,omitempty"`
37
+
38
+	Statistics *Statistics `json:"Statistics,omitempty"`
39
+
40
+	ProcessList []ProcessDetails `json:"ProcessList,omitempty"`
41
+
42
+	TerminateOnLastHandleClosed bool `json:"TerminateOnLastHandleClosed,omitempty"`
43
+
44
+	HostingSystemId string `json:"HostingSystemId,omitempty"`
45
+
46
+	SharedMemoryRegionInfo []SharedMemoryRegionInfo `json:"SharedMemoryRegionInfo,omitempty"`
47
+
48
+	GuestConnectionInfo *GuestConnectionInfo `json:"GuestConnectionInfo,omitempty"`
49
+
50
+	// Metrics is not part of the API for HCS but this is used for LCOW v2 to
51
+	// return the full cgroup metrics from the guest.
52
+	Metrics *v1.Metrics `json:"LCOWMetrics,omitempty"`
53
+}
0 54
new file mode 100644
... ...
@@ -0,0 +1,15 @@
0
+/*
1
+ * HCS API
2
+ *
3
+ * No description provided (generated by Swagger Codegen https://github.com/swagger-api/swagger-codegen)
4
+ *
5
+ * API version: 2.1
6
+ * Generated by: Swagger Codegen (https://github.com/swagger-api/swagger-codegen.git)
7
+ */
8
+
9
+package hcsschema
10
+
11
+//   By default the basic properties will be returned. This query provides a way to  request specific properties.
12
+type PropertyQuery struct {
13
+	PropertyTypes []PropertyType `json:"PropertyTypes,omitempty"`
14
+}
0 15
new file mode 100644
... ...
@@ -0,0 +1,26 @@
0
+/*
1
+ * HCS API
2
+ *
3
+ * No description provided (generated by Swagger Codegen https://github.com/swagger-api/swagger-codegen)
4
+ *
5
+ * API version: 2.1
6
+ * Generated by: Swagger Codegen (https://github.com/swagger-api/swagger-codegen.git)
7
+ */
8
+
9
+package hcsschema
10
+
11
+type PropertyType string
12
+
13
+const (
14
+	PTMemory                      PropertyType = "Memory"
15
+	PTGuestMemory                 PropertyType = "GuestMemory"
16
+	PTStatistics                  PropertyType = "Statistics"
17
+	PTProcessList                 PropertyType = "ProcessList"
18
+	PTTerminateOnLastHandleClosed PropertyType = "TerminateOnLastHandleClosed"
19
+	PTSharedMemoryRegion          PropertyType = "SharedMemoryRegion"
20
+	PTContainerCredentialGuard    PropertyType = "ContainerCredentialGuard" // This field is not generated by swagger. This was added manually.
21
+	PTGuestConnection             PropertyType = "GuestConnection"
22
+	PTICHeartbeatStatus           PropertyType = "ICHeartbeatStatus"
23
+	PTProcessorTopology           PropertyType = "ProcessorTopology"
24
+	PTCPUGroup                    PropertyType = "CpuGroup"
25
+)
0 26
new file mode 100644
... ...
@@ -0,0 +1,16 @@
0
+/*
1
+ * HCS API
2
+ *
3
+ * No description provided (generated by Swagger Codegen https://github.com/swagger-api/swagger-codegen)
4
+ *
5
+ * API version: 2.1
6
+ * Generated by: Swagger Codegen (https://github.com/swagger-api/swagger-codegen.git)
7
+ */
8
+
9
+package hcsschema
10
+
11
+type RdpConnectionOptions struct {
12
+	AccessSids []string `json:"AccessSids,omitempty"`
13
+
14
+	NamedPipe string `json:"NamedPipe,omitempty"`
15
+}
0 16
new file mode 100644
... ...
@@ -0,0 +1,16 @@
0
+/*
1
+ * HCS API
2
+ *
3
+ * No description provided (generated by Swagger Codegen https://github.com/swagger-api/swagger-codegen)
4
+ *
5
+ * API version: 2.1
6
+ * Generated by: Swagger Codegen (https://github.com/swagger-api/swagger-codegen.git)
7
+ */
8
+
9
+package hcsschema
10
+
11
+type RegistryChanges struct {
12
+	AddValues []RegistryValue `json:"AddValues,omitempty"`
13
+
14
+	DeleteKeys []RegistryKey `json:"DeleteKeys,omitempty"`
15
+}
0 16
new file mode 100644
... ...
@@ -0,0 +1,18 @@
0
+/*
1
+ * HCS API
2
+ *
3
+ * No description provided (generated by Swagger Codegen https://github.com/swagger-api/swagger-codegen)
4
+ *
5
+ * API version: 2.1
6
+ * Generated by: Swagger Codegen (https://github.com/swagger-api/swagger-codegen.git)
7
+ */
8
+
9
+package hcsschema
10
+
11
+type RegistryKey struct {
12
+	Hive string `json:"Hive,omitempty"`
13
+
14
+	Name string `json:"Name,omitempty"`
15
+
16
+	Volatile bool `json:"Volatile,omitempty"`
17
+}
0 18
new file mode 100644
... ...
@@ -0,0 +1,30 @@
0
+/*
1
+ * HCS API
2
+ *
3
+ * No description provided (generated by Swagger Codegen https://github.com/swagger-api/swagger-codegen)
4
+ *
5
+ * API version: 2.1
6
+ * Generated by: Swagger Codegen (https://github.com/swagger-api/swagger-codegen.git)
7
+ */
8
+
9
+package hcsschema
10
+
11
+type RegistryValue struct {
12
+	Key *RegistryKey `json:"Key,omitempty"`
13
+
14
+	Name string `json:"Name,omitempty"`
15
+
16
+	Type_ string `json:"Type,omitempty"`
17
+
18
+	//  One and only one value type must be set.
19
+	StringValue string `json:"StringValue,omitempty"`
20
+
21
+	BinaryValue string `json:"BinaryValue,omitempty"`
22
+
23
+	DWordValue int32 `json:"DWordValue,omitempty"`
24
+
25
+	QWordValue int32 `json:"QWordValue,omitempty"`
26
+
27
+	//  Only used if RegistryValueType is CustomType  The data is in BinaryValue
28
+	CustomType int32 `json:"CustomType,omitempty"`
29
+}
0 30
new file mode 100644
... ...
@@ -0,0 +1,19 @@
0
+/*
1
+ * HCS API
2
+ *
3
+ * No description provided (generated by Swagger Codegen https://github.com/swagger-api/swagger-codegen)
4
+ *
5
+ * API version: 2.1
6
+ * Generated by: Swagger Codegen (https://github.com/swagger-api/swagger-codegen.git)
7
+ */
8
+
9
+package hcsschema
10
+
11
+type RestoreState struct {
12
+
13
+	//  The path to the save state file to restore the system from.
14
+	SaveStateFilePath string `json:"SaveStateFilePath,omitempty"`
15
+
16
+	//  The ID of the template system to clone this new system off of. An empty  string indicates the system should not be cloned from a template.
17
+	TemplateSystemId string `json:"TemplateSystemId,omitempty"`
18
+}
0 19
new file mode 100644
... ...
@@ -0,0 +1,19 @@
0
+/*
1
+ * HCS API
2
+ *
3
+ * No description provided (generated by Swagger Codegen https://github.com/swagger-api/swagger-codegen)
4
+ *
5
+ * API version: 2.1
6
+ * Generated by: Swagger Codegen (https://github.com/swagger-api/swagger-codegen.git)
7
+ */
8
+
9
+package hcsschema
10
+
11
+type SaveOptions struct {
12
+
13
+	//  The type of save operation to be performed.
14
+	SaveType string `json:"SaveType,omitempty"`
15
+
16
+	//  The path to the file that will container the saved state.
17
+	SaveStateFilePath string `json:"SaveStateFilePath,omitempty"`
18
+}
0 19
new file mode 100644
... ...
@@ -0,0 +1,16 @@
0
+/*
1
+ * HCS API
2
+ *
3
+ * No description provided (generated by Swagger Codegen https://github.com/swagger-api/swagger-codegen)
4
+ *
5
+ * API version: 2.1
6
+ * Generated by: Swagger Codegen (https://github.com/swagger-api/swagger-codegen.git)
7
+ */
8
+
9
+package hcsschema
10
+
11
+type Scsi struct {
12
+
13
+	//  Map of attachments, where the key is the integer LUN number on the controller.
14
+	Attachments map[string]Attachment `json:"Attachments,omitempty"`
15
+}
0 16
new file mode 100644
... ...
@@ -0,0 +1,18 @@
0
+/*
1
+ * HCS API
2
+ *
3
+ * No description provided (generated by Swagger Codegen https://github.com/swagger-api/swagger-codegen)
4
+ *
5
+ * API version: 2.4
6
+ * Generated by: Swagger Codegen (https://github.com/swagger-api/swagger-codegen.git)
7
+ */
8
+
9
+package hcsschema
10
+
11
+import "encoding/json"
12
+
13
+type ServiceProperties struct {
14
+	// Changed Properties field to []json.RawMessage from []interface{} to avoid having to
15
+	// remarshal sp.Properties[n] and unmarshal into the type(s) we want.
16
+	Properties []json.RawMessage `json:"Properties,omitempty"`
17
+}
0 18
new file mode 100644
... ...
@@ -0,0 +1,14 @@
0
+/*
1
+ * HCS API
2
+ *
3
+ * No description provided (generated by Swagger Codegen https://github.com/swagger-api/swagger-codegen)
4
+ *
5
+ * API version: 2.1
6
+ * Generated by: Swagger Codegen (https://github.com/swagger-api/swagger-codegen.git)
7
+ */
8
+
9
+package hcsschema
10
+
11
+type SharedMemoryConfiguration struct {
12
+	Regions []SharedMemoryRegion `json:"Regions,omitempty"`
13
+}
0 14
new file mode 100644
... ...
@@ -0,0 +1,22 @@
0
+/*
1
+ * HCS API
2
+ *
3
+ * No description provided (generated by Swagger Codegen https://github.com/swagger-api/swagger-codegen)
4
+ *
5
+ * API version: 2.1
6
+ * Generated by: Swagger Codegen (https://github.com/swagger-api/swagger-codegen.git)
7
+ */
8
+
9
+package hcsschema
10
+
11
+type SharedMemoryRegion struct {
12
+	SectionName string `json:"SectionName,omitempty"`
13
+
14
+	StartOffset int32 `json:"StartOffset,omitempty"`
15
+
16
+	Length int32 `json:"Length,omitempty"`
17
+
18
+	AllowGuestWrite bool `json:"AllowGuestWrite,omitempty"`
19
+
20
+	HiddenFromGuest bool `json:"HiddenFromGuest,omitempty"`
21
+}
0 22
new file mode 100644
... ...
@@ -0,0 +1,16 @@
0
+/*
1
+ * HCS API
2
+ *
3
+ * No description provided (generated by Swagger Codegen https://github.com/swagger-api/swagger-codegen)
4
+ *
5
+ * API version: 2.1
6
+ * Generated by: Swagger Codegen (https://github.com/swagger-api/swagger-codegen.git)
7
+ */
8
+
9
+package hcsschema
10
+
11
+type SharedMemoryRegionInfo struct {
12
+	SectionName string `json:"SectionName,omitempty"`
13
+
14
+	GuestPhysicalAddress int32 `json:"GuestPhysicalAddress,omitempty"`
15
+}
0 16
new file mode 100644
... ...
@@ -0,0 +1,17 @@
0
+/*
1
+ * HCS API
2
+ *
3
+ * No description provided (generated by Swagger Codegen https://github.com/swagger-api/swagger-codegen)
4
+ *
5
+ * API version: 2.1
6
+ * Generated by: Swagger Codegen (https://github.com/swagger-api/swagger-codegen.git)
7
+ */
8
+
9
+package hcsschema
10
+
11
+//  Silo job information
12
+type SiloProperties struct {
13
+	Enabled bool `json:"Enabled,omitempty"`
14
+
15
+	JobName string `json:"JobName,omitempty"`
16
+}
0 17
new file mode 100644
... ...
@@ -0,0 +1,29 @@
0
+/*
1
+ * HCS API
2
+ *
3
+ * No description provided (generated by Swagger Codegen https://github.com/swagger-api/swagger-codegen)
4
+ *
5
+ * API version: 2.1
6
+ * Generated by: Swagger Codegen (https://github.com/swagger-api/swagger-codegen.git)
7
+ */
8
+
9
+package hcsschema
10
+
11
+import (
12
+	"time"
13
+)
14
+
15
+//  Runtime statistics for a container
16
+type Statistics struct {
17
+	Timestamp time.Time `json:"Timestamp,omitempty"`
18
+
19
+	ContainerStartTime time.Time `json:"ContainerStartTime,omitempty"`
20
+
21
+	Uptime100ns uint64 `json:"Uptime100ns,omitempty"`
22
+
23
+	Processor *ProcessorStats `json:"Processor,omitempty"`
24
+
25
+	Memory *MemoryStats `json:"Memory,omitempty"`
26
+
27
+	Storage *StorageStats `json:"Storage,omitempty"`
28
+}
0 29
new file mode 100644
... ...
@@ -0,0 +1,21 @@
0
+/*
1
+ * HCS API
2
+ *
3
+ * No description provided (generated by Swagger Codegen https://github.com/swagger-api/swagger-codegen)
4
+ *
5
+ * API version: 2.1
6
+ * Generated by: Swagger Codegen (https://github.com/swagger-api/swagger-codegen.git)
7
+ */
8
+
9
+package hcsschema
10
+
11
+type Storage struct {
12
+
13
+	//  List of layers that describe the parent hierarchy for a container's  storage. These layers combined together, presented as a disposable  and/or committable working storage, are used by the container to  record all changes done to the parent layers.
14
+	Layers []Layer `json:"Layers,omitempty"`
15
+
16
+	//  Path that points to the scratch space of a container, where parent  layers are combined together to present a new disposable and/or committable  layer with the changes done during its runtime.
17
+	Path string `json:"Path,omitempty"`
18
+
19
+	QoS *StorageQoS `json:"QoS,omitempty"`
20
+}
0 21
new file mode 100644
... ...
@@ -0,0 +1,16 @@
0
+/*
1
+ * HCS API
2
+ *
3
+ * No description provided (generated by Swagger Codegen https://github.com/swagger-api/swagger-codegen)
4
+ *
5
+ * API version: 2.1
6
+ * Generated by: Swagger Codegen (https://github.com/swagger-api/swagger-codegen.git)
7
+ */
8
+
9
+package hcsschema
10
+
11
+type StorageQoS struct {
12
+	IopsMaximum int32 `json:"IopsMaximum,omitempty"`
13
+
14
+	BandwidthMaximum int32 `json:"BandwidthMaximum,omitempty"`
15
+}
0 16
new file mode 100644
... ...
@@ -0,0 +1,21 @@
0
+/*
1
+ * HCS API
2
+ *
3
+ * No description provided (generated by Swagger Codegen https://github.com/swagger-api/swagger-codegen)
4
+ *
5
+ * API version: 2.1
6
+ * Generated by: Swagger Codegen (https://github.com/swagger-api/swagger-codegen.git)
7
+ */
8
+
9
+package hcsschema
10
+
11
+//  Storage runtime statistics
12
+type StorageStats struct {
13
+	ReadCountNormalized uint64 `json:"ReadCountNormalized,omitempty"`
14
+
15
+	ReadSizeBytes uint64 `json:"ReadSizeBytes,omitempty"`
16
+
17
+	WriteCountNormalized uint64 `json:"WriteCountNormalized,omitempty"`
18
+
19
+	WriteSizeBytes uint64 `json:"WriteSizeBytes,omitempty"`
20
+}
0 21
new file mode 100644
... ...
@@ -0,0 +1,16 @@
0
+/*
1
+ * HCS API
2
+ *
3
+ * No description provided (generated by Swagger Codegen https://github.com/swagger-api/swagger-codegen)
4
+ *
5
+ * API version: 2.1
6
+ * Generated by: Swagger Codegen (https://github.com/swagger-api/swagger-codegen.git)
7
+ */
8
+
9
+package hcsschema
10
+
11
+type Topology struct {
12
+	Memory *Memory2 `json:"Memory,omitempty"`
13
+
14
+	Processor *Processor2 `json:"Processor,omitempty"`
15
+}
0 16
new file mode 100644
... ...
@@ -0,0 +1,20 @@
0
+/*
1
+ * HCS API
2
+ *
3
+ * No description provided (generated by Swagger Codegen https://github.com/swagger-api/swagger-codegen)
4
+ *
5
+ * API version: 2.1
6
+ * Generated by: Swagger Codegen (https://github.com/swagger-api/swagger-codegen.git)
7
+ */
8
+
9
+package hcsschema
10
+
11
+type Uefi struct {
12
+	EnableDebugger bool `json:"EnableDebugger,omitempty"`
13
+
14
+	SecureBootTemplateId string `json:"SecureBootTemplateId,omitempty"`
15
+
16
+	BootThis *UefiBootEntry `json:"BootThis,omitempty"`
17
+
18
+	Console string `json:"Console,omitempty"`
19
+}
0 20
new file mode 100644
... ...
@@ -0,0 +1,22 @@
0
+/*
1
+ * HCS API
2
+ *
3
+ * No description provided (generated by Swagger Codegen https://github.com/swagger-api/swagger-codegen)
4
+ *
5
+ * API version: 2.1
6
+ * Generated by: Swagger Codegen (https://github.com/swagger-api/swagger-codegen.git)
7
+ */
8
+
9
+package hcsschema
10
+
11
+type UefiBootEntry struct {
12
+	DeviceType string `json:"DeviceType,omitempty"`
13
+
14
+	DevicePath string `json:"DevicePath,omitempty"`
15
+
16
+	DiskNumber int32 `json:"DiskNumber,omitempty"`
17
+
18
+	OptionalData string `json:"OptionalData,omitempty"`
19
+
20
+	VmbFsRootPath string `json:"VmbFsRootPath,omitempty"`
21
+}
0 22
new file mode 100644
... ...
@@ -0,0 +1,16 @@
0
+/*
1
+ * HCS API
2
+ *
3
+ * No description provided (generated by Swagger Codegen https://github.com/swagger-api/swagger-codegen)
4
+ *
5
+ * API version: 2.1
6
+ * Generated by: Swagger Codegen (https://github.com/swagger-api/swagger-codegen.git)
7
+ */
8
+
9
+package hcsschema
10
+
11
+type Version struct {
12
+	Major int32 `json:"Major,omitempty"`
13
+
14
+	Minor int32 `json:"Minor,omitempty"`
15
+}
0 16
new file mode 100644
... ...
@@ -0,0 +1,18 @@
0
+/*
1
+ * HCS API
2
+ *
3
+ * No description provided (generated by Swagger Codegen https://github.com/swagger-api/swagger-codegen)
4
+ *
5
+ * API version: 2.1
6
+ * Generated by: Swagger Codegen (https://github.com/swagger-api/swagger-codegen.git)
7
+ */
8
+
9
+package hcsschema
10
+
11
+type VideoMonitor struct {
12
+	HorizontalResolution int32 `json:"HorizontalResolution,omitempty"`
13
+
14
+	VerticalResolution int32 `json:"VerticalResolution,omitempty"`
15
+
16
+	ConnectionOptions *RdpConnectionOptions `json:"ConnectionOptions,omitempty"`
17
+}
0 18
new file mode 100644
... ...
@@ -0,0 +1,32 @@
0
+/*
1
+ * HCS API
2
+ *
3
+ * No description provided (generated by Swagger Codegen https://github.com/swagger-api/swagger-codegen)
4
+ *
5
+ * API version: 2.1
6
+ * Generated by: Swagger Codegen (https://github.com/swagger-api/swagger-codegen.git)
7
+ */
8
+
9
+package hcsschema
10
+
11
+type VirtualMachine struct {
12
+
13
+	// StopOnReset is private in the schema. If regenerated need to put back.
14
+	StopOnReset bool `json:"StopOnReset,omitempty"`
15
+
16
+	Chipset *Chipset `json:"Chipset,omitempty"`
17
+
18
+	ComputeTopology *Topology `json:"ComputeTopology,omitempty"`
19
+
20
+	Devices *Devices `json:"Devices,omitempty"`
21
+
22
+	GuestState *GuestState `json:"GuestState,omitempty"`
23
+
24
+	RestoreState *RestoreState `json:"RestoreState,omitempty"`
25
+
26
+	RegistryChanges *RegistryChanges `json:"RegistryChanges,omitempty"`
27
+
28
+	StorageQoS *StorageQoS `json:"StorageQoS,omitempty"`
29
+
30
+	GuestConnection *GuestConnection `json:"GuestConnection,omitempty"`
31
+}
0 32
new file mode 100644
... ...
@@ -0,0 +1,20 @@
0
+/*
1
+ * HCS API
2
+ *
3
+ * No description provided (generated by Swagger Codegen https://github.com/swagger-api/swagger-codegen)
4
+ *
5
+ * API version: 2.1
6
+ * Generated by: Swagger Codegen (https://github.com/swagger-api/swagger-codegen.git)
7
+ */
8
+
9
+package hcsschema
10
+
11
+type VirtualNodeInfo struct {
12
+	VirtualNodeIndex int32 `json:"VirtualNodeIndex,omitempty"`
13
+
14
+	PhysicalNodeNumber int32 `json:"PhysicalNodeNumber,omitempty"`
15
+
16
+	VirtualProcessorCount int32 `json:"VirtualProcessorCount,omitempty"`
17
+
18
+	MemoryUsageInPages int32 `json:"MemoryUsageInPages,omitempty"`
19
+}
0 20
new file mode 100644
... ...
@@ -0,0 +1,20 @@
0
+/*
1
+ * HCS API
2
+ *
3
+ * No description provided (generated by Swagger Codegen https://github.com/swagger-api/swagger-codegen)
4
+ *
5
+ * API version: 2.1
6
+ * Generated by: Swagger Codegen (https://github.com/swagger-api/swagger-codegen.git)
7
+ */
8
+
9
+package hcsschema
10
+
11
+type VirtualPMemController struct {
12
+	Devices map[string]VirtualPMemDevice `json:"Devices,omitempty"`
13
+
14
+	MaximumCount uint32 `json:"MaximumCount,omitempty"`
15
+
16
+	MaximumSizeBytes uint64 `json:"MaximumSizeBytes,omitempty"`
17
+
18
+	Backing string `json:"Backing,omitempty"`
19
+}
0 20
new file mode 100644
... ...
@@ -0,0 +1,18 @@
0
+/*
1
+ * HCS API
2
+ *
3
+ * No description provided (generated by Swagger Codegen https://github.com/swagger-api/swagger-codegen)
4
+ *
5
+ * API version: 2.1
6
+ * Generated by: Swagger Codegen (https://github.com/swagger-api/swagger-codegen.git)
7
+ */
8
+
9
+package hcsschema
10
+
11
+type VirtualPMemDevice struct {
12
+	HostPath string `json:"HostPath,omitempty"`
13
+
14
+	ReadOnly bool `json:"ReadOnly,omitempty"`
15
+
16
+	ImageFormat string `json:"ImageFormat,omitempty"`
17
+}
0 18
new file mode 100644
... ...
@@ -0,0 +1,16 @@
0
+/*
1
+ * HCS API
2
+ *
3
+ * No description provided (generated by Swagger Codegen https://github.com/swagger-api/swagger-codegen)
4
+ *
5
+ * API version: 2.3
6
+ * Generated by: Swagger Codegen (https://github.com/swagger-api/swagger-codegen.git)
7
+ */
8
+
9
+package hcsschema
10
+
11
+// TODO: This is pre-release support in schema 2.3. Need to add build number
12
+// docs when a public build with this is out.
13
+type VirtualPciDevice struct {
14
+	Functions []VirtualPciFunction `json:",omitempty"`
15
+}
0 16
new file mode 100644
... ...
@@ -0,0 +1,18 @@
0
+/*
1
+ * HCS API
2
+ *
3
+ * No description provided (generated by Swagger Codegen https://github.com/swagger-api/swagger-codegen)
4
+ *
5
+ * API version: 2.3
6
+ * Generated by: Swagger Codegen (https://github.com/swagger-api/swagger-codegen.git)
7
+ */
8
+
9
+package hcsschema
10
+
11
+// TODO: This is pre-release support in schema 2.3. Need to add build number
12
+// docs when a public build with this is out.
13
+type VirtualPciFunction struct {
14
+	DeviceInstancePath string `json:",omitempty"`
15
+
16
+	VirtualFunction uint16 `json:",omitempty"`
17
+}
0 18
new file mode 100644
... ...
@@ -0,0 +1,16 @@
0
+/*
1
+ * HCS API
2
+ *
3
+ * No description provided (generated by Swagger Codegen https://github.com/swagger-api/swagger-codegen)
4
+ *
5
+ * API version: 2.1
6
+ * Generated by: Swagger Codegen (https://github.com/swagger-api/swagger-codegen.git)
7
+ */
8
+
9
+package hcsschema
10
+
11
+type VirtualSmb struct {
12
+	Shares []VirtualSmbShare `json:"Shares,omitempty"`
13
+
14
+	DirectFileMappingInMB int64 `json:"DirectFileMappingInMB,omitempty"`
15
+}
0 16
new file mode 100644
... ...
@@ -0,0 +1,20 @@
0
+/*
1
+ * HCS API
2
+ *
3
+ * No description provided (generated by Swagger Codegen https://github.com/swagger-api/swagger-codegen)
4
+ *
5
+ * API version: 2.1
6
+ * Generated by: Swagger Codegen (https://github.com/swagger-api/swagger-codegen.git)
7
+ */
8
+
9
+package hcsschema
10
+
11
+type VirtualSmbShare struct {
12
+	Name string `json:"Name,omitempty"`
13
+
14
+	Path string `json:"Path,omitempty"`
15
+
16
+	AllowedFiles []string `json:"AllowedFiles,omitempty"`
17
+
18
+	Options *VirtualSmbShareOptions `json:"Options,omitempty"`
19
+}
0 20
new file mode 100644
... ...
@@ -0,0 +1,62 @@
0
+/*
1
+ * HCS API
2
+ *
3
+ * No description provided (generated by Swagger Codegen https://github.com/swagger-api/swagger-codegen)
4
+ *
5
+ * API version: 2.1
6
+ * Generated by: Swagger Codegen (https://github.com/swagger-api/swagger-codegen.git)
7
+ */
8
+
9
+package hcsschema
10
+
11
+type VirtualSmbShareOptions struct {
12
+	ReadOnly bool `json:"ReadOnly,omitempty"`
13
+
14
+	//  convert exclusive access to shared read access
15
+	ShareRead bool `json:"ShareRead,omitempty"`
16
+
17
+	//  all opens will use cached I/O
18
+	CacheIo bool `json:"CacheIo,omitempty"`
19
+
20
+	//  disable oplock support
21
+	NoOplocks bool `json:"NoOplocks,omitempty"`
22
+
23
+	//  Acquire the backup privilege when attempting to open
24
+	TakeBackupPrivilege bool `json:"TakeBackupPrivilege,omitempty"`
25
+
26
+	//  Use the identity of the share root when opening
27
+	UseShareRootIdentity bool `json:"UseShareRootIdentity,omitempty"`
28
+
29
+	//  disable Direct Mapping
30
+	NoDirectmap bool `json:"NoDirectmap,omitempty"`
31
+
32
+	//  disable Byterange locks
33
+	NoLocks bool `json:"NoLocks,omitempty"`
34
+
35
+	//  disable Directory CHange Notifications
36
+	NoDirnotify bool `json:"NoDirnotify,omitempty"`
37
+
38
+	//  share is use for VM shared memory
39
+	VmSharedMemory bool `json:"VmSharedMemory,omitempty"`
40
+
41
+	//  allow access only to the files specified in AllowedFiles
42
+	RestrictFileAccess bool `json:"RestrictFileAccess,omitempty"`
43
+
44
+	//  disable all oplocks except Level II
45
+	ForceLevelIIOplocks bool `json:"ForceLevelIIOplocks,omitempty"`
46
+
47
+	//  Allow the host to reparse this base layer
48
+	ReparseBaseLayer bool `json:"ReparseBaseLayer,omitempty"`
49
+
50
+	//  Enable pseudo-oplocks
51
+	PseudoOplocks bool `json:"PseudoOplocks,omitempty"`
52
+
53
+	//  All opens will use non-cached IO
54
+	NonCacheIo bool `json:"NonCacheIo,omitempty"`
55
+
56
+	//  Enable pseudo directory change notifications
57
+	PseudoDirnotify bool `json:"PseudoDirnotify,omitempty"`
58
+
59
+	//  Block directory enumeration, renames, and deletes.
60
+	SingleFileMapping bool `json:"SingleFileMapping,omitempty"`
61
+}
0 62
new file mode 100644
... ...
@@ -0,0 +1,26 @@
0
+/*
1
+ * HCS API
2
+ *
3
+ * No description provided (generated by Swagger Codegen https://github.com/swagger-api/swagger-codegen)
4
+ *
5
+ * API version: 2.1
6
+ * Generated by: Swagger Codegen (https://github.com/swagger-api/swagger-codegen.git)
7
+ */
8
+
9
+package hcsschema
10
+
11
+type VmMemory struct {
12
+	AvailableMemory int32 `json:"AvailableMemory,omitempty"`
13
+
14
+	AvailableMemoryBuffer int32 `json:"AvailableMemoryBuffer,omitempty"`
15
+
16
+	ReservedMemory uint64 `json:"ReservedMemory,omitempty"`
17
+
18
+	AssignedMemory uint64 `json:"AssignedMemory,omitempty"`
19
+
20
+	SlpActive bool `json:"SlpActive,omitempty"`
21
+
22
+	BalancingEnabled bool `json:"BalancingEnabled,omitempty"`
23
+
24
+	DmOperationInProgress bool `json:"DmOperationInProgress,omitempty"`
25
+}
0 26
new file mode 100644
... ...
@@ -0,0 +1,22 @@
0
+/*
1
+ * HCS API
2
+ *
3
+ * No description provided (generated by Swagger Codegen https://github.com/swagger-api/swagger-codegen)
4
+ *
5
+ * API version: 2.4
6
+ * Generated by: Swagger Codegen (https://github.com/swagger-api/swagger-codegen.git)
7
+ */
8
+
9
+package hcsschema
10
+
11
+// ProcessorLimits is used when modifying processor scheduling limits of a virtual machine.
12
+type ProcessorLimits struct {
13
+	// Maximum amount of host CPU resources that the virtual machine can use.
14
+	Limit uint64 `json:"Limit,omitempty"`
15
+	// Value describing the relative priority of this virtual machine compared to other virtual machines.
16
+	Weight uint64 `json:"Weight,omitempty"`
17
+	// Minimum amount of host CPU resources that the virtual machine is guaranteed.
18
+	Reservation uint64 `json:"Reservation,omitempty"`
19
+	// Provides the target maximum CPU frequency, in MHz, for a virtual machine.
20
+	MaximumFrequencyMHz uint32 `json:"MaximumFrequencyMHz,omitempty"`
21
+}
0 22
new file mode 100644
... ...
@@ -0,0 +1,16 @@
0
+/*
1
+ * HCS API
2
+ *
3
+ * No description provided (generated by Swagger Codegen https://github.com/swagger-api/swagger-codegen)
4
+ *
5
+ * API version: 2.1
6
+ * Generated by: Swagger Codegen (https://github.com/swagger-api/swagger-codegen.git)
7
+ */
8
+
9
+package hcsschema
10
+
11
+type WindowsCrashReporting struct {
12
+	DumpFileName string `json:"DumpFileName,omitempty"`
13
+
14
+	MaxDumpSize int64 `json:"MaxDumpSize,omitempty"`
15
+}
... ...
@@ -4,13 +4,13 @@ import (
4 4
 	"context"
5 5
 	"encoding/json"
6 6
 
7
-	hcsschema "github.com/Microsoft/hcsshim/internal/schema2"
7
+	hcsschema "github.com/Microsoft/hcsshim/internal/hcs/schema2"
8 8
 	"github.com/Microsoft/hcsshim/internal/vmcompute"
9 9
 )
10 10
 
11 11
 // GetServiceProperties returns properties of the host compute service.
12 12
 func GetServiceProperties(ctx context.Context, q hcsschema.PropertyQuery) (*hcsschema.ServiceProperties, error) {
13
-	operation := "hcsshim::GetServiceProperties"
13
+	operation := "hcs::GetServiceProperties"
14 14
 
15 15
 	queryb, err := json.Marshal(q)
16 16
 	if err != nil {
... ...
@@ -34,7 +34,7 @@ func GetServiceProperties(ctx context.Context, q hcsschema.PropertyQuery) (*hcss
34 34
 
35 35
 // ModifyServiceSettings modifies settings of the host compute service.
36 36
 func ModifyServiceSettings(ctx context.Context, settings hcsschema.ModificationRequest) error {
37
-	operation := "hcsshim::ModifyServiceSettings"
37
+	operation := "hcs::ModifyServiceSettings"
38 38
 
39 39
 	settingsJSON, err := json.Marshal(settings)
40 40
 	if err != nil {
... ...
@@ -9,10 +9,10 @@ import (
9 9
 	"syscall"
10 10
 
11 11
 	"github.com/Microsoft/hcsshim/internal/cow"
12
+	"github.com/Microsoft/hcsshim/internal/hcs/schema1"
13
+	hcsschema "github.com/Microsoft/hcsshim/internal/hcs/schema2"
12 14
 	"github.com/Microsoft/hcsshim/internal/log"
13 15
 	"github.com/Microsoft/hcsshim/internal/oc"
14
-	"github.com/Microsoft/hcsshim/internal/schema1"
15
-	hcsschema "github.com/Microsoft/hcsshim/internal/schema2"
16 16
 	"github.com/Microsoft/hcsshim/internal/timeout"
17 17
 	"github.com/Microsoft/hcsshim/internal/vmcompute"
18 18
 	"go.opencensus.io/trace"
... ...
@@ -40,7 +40,7 @@ func newSystem(id string) *System {
40 40
 
41 41
 // CreateComputeSystem creates a new compute system with the given configuration but does not start it.
42 42
 func CreateComputeSystem(ctx context.Context, id string, hcsDocumentInterface interface{}) (_ *System, err error) {
43
-	operation := "hcsshim::CreateComputeSystem"
43
+	operation := "hcs::CreateComputeSystem"
44 44
 
45 45
 	// hcsCreateComputeSystemContext is an async operation. Start the outer span
46 46
 	// here to measure the full create time.
... ...
@@ -96,7 +96,7 @@ func CreateComputeSystem(ctx context.Context, id string, hcsDocumentInterface in
96 96
 
97 97
 // OpenComputeSystem opens an existing compute system by ID.
98 98
 func OpenComputeSystem(ctx context.Context, id string) (*System, error) {
99
-	operation := "hcsshim::OpenComputeSystem"
99
+	operation := "hcs::OpenComputeSystem"
100 100
 
101 101
 	computeSystem := newSystem(id)
102 102
 	handle, resultJSON, err := vmcompute.HcsOpenComputeSystem(ctx, id)
... ...
@@ -148,7 +148,7 @@ func (computeSystem *System) IsOCI() bool {
148 148
 
149 149
 // GetComputeSystems gets a list of the compute systems on the system that match the query
150 150
 func GetComputeSystems(ctx context.Context, q schema1.ComputeSystemQuery) ([]schema1.ContainerProperties, error) {
151
-	operation := "hcsshim::GetComputeSystems"
151
+	operation := "hcs::GetComputeSystems"
152 152
 
153 153
 	queryb, err := json.Marshal(q)
154 154
 	if err != nil {
... ...
@@ -174,7 +174,7 @@ func GetComputeSystems(ctx context.Context, q schema1.ComputeSystemQuery) ([]sch
174 174
 
175 175
 // Start synchronously starts the computeSystem.
176 176
 func (computeSystem *System) Start(ctx context.Context) (err error) {
177
-	operation := "hcsshim::System::Start"
177
+	operation := "hcs::System::Start"
178 178
 
179 179
 	// hcsStartComputeSystemContext is an async operation. Start the outer span
180 180
 	// here to measure the full start time.
... ...
@@ -209,7 +209,7 @@ func (computeSystem *System) Shutdown(ctx context.Context) error {
209 209
 	computeSystem.handleLock.RLock()
210 210
 	defer computeSystem.handleLock.RUnlock()
211 211
 
212
-	operation := "hcsshim::System::Shutdown"
212
+	operation := "hcs::System::Shutdown"
213 213
 
214 214
 	if computeSystem.handle == 0 {
215 215
 		return nil
... ...
@@ -230,7 +230,7 @@ func (computeSystem *System) Terminate(ctx context.Context) error {
230 230
 	computeSystem.handleLock.RLock()
231 231
 	defer computeSystem.handleLock.RUnlock()
232 232
 
233
-	operation := "hcsshim::System::Terminate"
233
+	operation := "hcs::System::Terminate"
234 234
 
235 235
 	if computeSystem.handle == 0 {
236 236
 		return nil
... ...
@@ -252,7 +252,7 @@ func (computeSystem *System) Terminate(ctx context.Context) error {
252 252
 // This MUST be called exactly once per `computeSystem.handle` but `Wait` is
253 253
 // safe to call multiple times.
254 254
 func (computeSystem *System) waitBackground() {
255
-	operation := "hcsshim::System::waitBackground"
255
+	operation := "hcs::System::waitBackground"
256 256
 	ctx, span := trace.StartSpan(context.Background(), operation)
257 257
 	defer span.End()
258 258
 	span.AddAttributes(trace.StringAttribute("cid", computeSystem.id))
... ...
@@ -300,7 +300,7 @@ func (computeSystem *System) Properties(ctx context.Context, types ...schema1.Pr
300 300
 	computeSystem.handleLock.RLock()
301 301
 	defer computeSystem.handleLock.RUnlock()
302 302
 
303
-	operation := "hcsshim::System::Properties"
303
+	operation := "hcs::System::Properties"
304 304
 
305 305
 	queryBytes, err := json.Marshal(schema1.PropertyQuery{PropertyTypes: types})
306 306
 	if err != nil {
... ...
@@ -329,7 +329,7 @@ func (computeSystem *System) PropertiesV2(ctx context.Context, types ...hcsschem
329 329
 	computeSystem.handleLock.RLock()
330 330
 	defer computeSystem.handleLock.RUnlock()
331 331
 
332
-	operation := "hcsshim::System::PropertiesV2"
332
+	operation := "hcs::System::PropertiesV2"
333 333
 
334 334
 	queryBytes, err := json.Marshal(hcsschema.PropertyQuery{PropertyTypes: types})
335 335
 	if err != nil {
... ...
@@ -355,7 +355,7 @@ func (computeSystem *System) PropertiesV2(ctx context.Context, types ...hcsschem
355 355
 
356 356
 // Pause pauses the execution of the computeSystem. This feature is not enabled in TP5.
357 357
 func (computeSystem *System) Pause(ctx context.Context) (err error) {
358
-	operation := "hcsshim::System::Pause"
358
+	operation := "hcs::System::Pause"
359 359
 
360 360
 	// hcsPauseComputeSystemContext is an async peration. Start the outer span
361 361
 	// here to measure the full pause time.
... ...
@@ -382,7 +382,7 @@ func (computeSystem *System) Pause(ctx context.Context) (err error) {
382 382
 
383 383
 // Resume resumes the execution of the computeSystem. This feature is not enabled in TP5.
384 384
 func (computeSystem *System) Resume(ctx context.Context) (err error) {
385
-	operation := "hcsshim::System::Resume"
385
+	operation := "hcs::System::Resume"
386 386
 
387 387
 	// hcsResumeComputeSystemContext is an async operation. Start the outer span
388 388
 	// here to measure the full restore time.
... ...
@@ -409,7 +409,7 @@ func (computeSystem *System) Resume(ctx context.Context) (err error) {
409 409
 
410 410
 // Save the compute system
411 411
 func (computeSystem *System) Save(ctx context.Context, options interface{}) (err error) {
412
-	operation := "hcsshim::System::Save"
412
+	operation := "hcs::System::Save"
413 413
 
414 414
 	// hcsSaveComputeSystemContext is an async peration. Start the outer span
415 415
 	// here to measure the full save time.
... ...
@@ -465,7 +465,7 @@ func (computeSystem *System) createProcess(ctx context.Context, operation string
465 465
 
466 466
 // CreateProcess launches a new process within the computeSystem.
467 467
 func (computeSystem *System) CreateProcess(ctx context.Context, c interface{}) (cow.Process, error) {
468
-	operation := "hcsshim::System::CreateProcess"
468
+	operation := "hcs::System::CreateProcess"
469 469
 	process, processInfo, err := computeSystem.createProcess(ctx, operation, c)
470 470
 	if err != nil {
471 471
 		return nil, err
... ...
@@ -498,7 +498,7 @@ func (computeSystem *System) OpenProcess(ctx context.Context, pid int) (*Process
498 498
 	computeSystem.handleLock.RLock()
499 499
 	defer computeSystem.handleLock.RUnlock()
500 500
 
501
-	operation := "hcsshim::System::OpenProcess"
501
+	operation := "hcs::System::OpenProcess"
502 502
 
503 503
 	if computeSystem.handle == 0 {
504 504
 		return nil, makeSystemError(computeSystem, operation, ErrAlreadyClosed, nil)
... ...
@@ -521,7 +521,7 @@ func (computeSystem *System) OpenProcess(ctx context.Context, pid int) (*Process
521 521
 
522 522
 // Close cleans up any state associated with the compute system but does not terminate or wait for it.
523 523
 func (computeSystem *System) Close() (err error) {
524
-	operation := "hcsshim::System::Close"
524
+	operation := "hcs::System::Close"
525 525
 	ctx, span := trace.StartSpan(context.Background(), operation)
526 526
 	defer span.End()
527 527
 	defer func() { oc.SetSpanStatus(span, err) }()
... ...
@@ -554,7 +554,7 @@ func (computeSystem *System) Close() (err error) {
554 554
 }
555 555
 
556 556
 func (computeSystem *System) registerCallback(ctx context.Context) error {
557
-	callbackContext := &notifcationWatcherContext{
557
+	callbackContext := &notificationWatcherContext{
558 558
 		channels: newSystemChannels(),
559 559
 		systemID: computeSystem.id,
560 560
 	}
... ...
@@ -615,7 +615,7 @@ func (computeSystem *System) Modify(ctx context.Context, config interface{}) err
615 615
 	computeSystem.handleLock.RLock()
616 616
 	defer computeSystem.handleLock.RUnlock()
617 617
 
618
-	operation := "hcsshim::System::Modify"
618
+	operation := "hcs::System::Modify"
619 619
 
620 620
 	if computeSystem.handle == 0 {
621 621
 		return makeSystemError(computeSystem, operation, ErrAlreadyClosed, nil)
622 622
deleted file mode 100644
... ...
@@ -1,250 +0,0 @@
1
-package schema1
2
-
3
-import (
4
-	"encoding/json"
5
-	"time"
6
-
7
-	"github.com/Microsoft/go-winio/pkg/guid"
8
-	hcsschema "github.com/Microsoft/hcsshim/internal/schema2"
9
-)
10
-
11
-// ProcessConfig is used as both the input of Container.CreateProcess
12
-// and to convert the parameters to JSON for passing onto the HCS
13
-type ProcessConfig struct {
14
-	ApplicationName   string            `json:",omitempty"`
15
-	CommandLine       string            `json:",omitempty"`
16
-	CommandArgs       []string          `json:",omitempty"` // Used by Linux Containers on Windows
17
-	User              string            `json:",omitempty"`
18
-	WorkingDirectory  string            `json:",omitempty"`
19
-	Environment       map[string]string `json:",omitempty"`
20
-	EmulateConsole    bool              `json:",omitempty"`
21
-	CreateStdInPipe   bool              `json:",omitempty"`
22
-	CreateStdOutPipe  bool              `json:",omitempty"`
23
-	CreateStdErrPipe  bool              `json:",omitempty"`
24
-	ConsoleSize       [2]uint           `json:",omitempty"`
25
-	CreateInUtilityVm bool              `json:",omitempty"` // Used by Linux Containers on Windows
26
-	OCISpecification  *json.RawMessage  `json:",omitempty"` // Used by Linux Containers on Windows
27
-}
28
-
29
-type Layer struct {
30
-	ID   string
31
-	Path string
32
-}
33
-
34
-type MappedDir struct {
35
-	HostPath          string
36
-	ContainerPath     string
37
-	ReadOnly          bool
38
-	BandwidthMaximum  uint64
39
-	IOPSMaximum       uint64
40
-	CreateInUtilityVM bool
41
-	// LinuxMetadata - Support added in 1803/RS4+.
42
-	LinuxMetadata bool `json:",omitempty"`
43
-}
44
-
45
-type MappedPipe struct {
46
-	HostPath          string
47
-	ContainerPipeName string
48
-}
49
-
50
-type HvRuntime struct {
51
-	ImagePath           string `json:",omitempty"`
52
-	SkipTemplate        bool   `json:",omitempty"`
53
-	LinuxInitrdFile     string `json:",omitempty"` // File under ImagePath on host containing an initrd image for starting a Linux utility VM
54
-	LinuxKernelFile     string `json:",omitempty"` // File under ImagePath on host containing a kernel for starting a Linux utility VM
55
-	LinuxBootParameters string `json:",omitempty"` // Additional boot parameters for starting a Linux Utility VM in initrd mode
56
-	BootSource          string `json:",omitempty"` // "Vhd" for Linux Utility VM booting from VHD
57
-	WritableBootSource  bool   `json:",omitempty"` // Linux Utility VM booting from VHD
58
-}
59
-
60
-type MappedVirtualDisk struct {
61
-	HostPath          string `json:",omitempty"` // Path to VHD on the host
62
-	ContainerPath     string // Platform-specific mount point path in the container
63
-	CreateInUtilityVM bool   `json:",omitempty"`
64
-	ReadOnly          bool   `json:",omitempty"`
65
-	Cache             string `json:",omitempty"` // "" (Unspecified); "Disabled"; "Enabled"; "Private"; "PrivateAllowSharing"
66
-	AttachOnly        bool   `json:",omitempty"`
67
-}
68
-
69
-// AssignedDevice represents a device that has been directly assigned to a container
70
-//
71
-// NOTE: Support added in RS5
72
-type AssignedDevice struct {
73
-	//  InterfaceClassGUID of the device to assign to container.
74
-	InterfaceClassGUID string `json:"InterfaceClassGuid,omitempty"`
75
-}
76
-
77
-// ContainerConfig is used as both the input of CreateContainer
78
-// and to convert the parameters to JSON for passing onto the HCS
79
-type ContainerConfig struct {
80
-	SystemType                  string              // HCS requires this to be hard-coded to "Container"
81
-	Name                        string              // Name of the container. We use the docker ID.
82
-	Owner                       string              `json:",omitempty"` // The management platform that created this container
83
-	VolumePath                  string              `json:",omitempty"` // Windows volume path for scratch space. Used by Windows Server Containers only. Format \\?\\Volume{GUID}
84
-	IgnoreFlushesDuringBoot     bool                `json:",omitempty"` // Optimization hint for container startup in Windows
85
-	LayerFolderPath             string              `json:",omitempty"` // Where the layer folders are located. Used by Windows Server Containers only. Format  %root%\windowsfilter\containerID
86
-	Layers                      []Layer             // List of storage layers. Required for Windows Server and Hyper-V Containers. Format ID=GUID;Path=%root%\windowsfilter\layerID
87
-	Credentials                 string              `json:",omitempty"` // Credentials information
88
-	ProcessorCount              uint32              `json:",omitempty"` // Number of processors to assign to the container.
89
-	ProcessorWeight             uint64              `json:",omitempty"` // CPU shares (relative weight to other containers with cpu shares). Range is from 1 to 10000. A value of 0 results in default shares.
90
-	ProcessorMaximum            int64               `json:",omitempty"` // Specifies the portion of processor cycles that this container can use as a percentage times 100. Range is from 1 to 10000. A value of 0 results in no limit.
91
-	StorageIOPSMaximum          uint64              `json:",omitempty"` // Maximum Storage IOPS
92
-	StorageBandwidthMaximum     uint64              `json:",omitempty"` // Maximum Storage Bandwidth in bytes per second
93
-	StorageSandboxSize          uint64              `json:",omitempty"` // Size in bytes that the container system drive should be expanded to if smaller
94
-	MemoryMaximumInMB           int64               `json:",omitempty"` // Maximum memory available to the container in Megabytes
95
-	HostName                    string              `json:",omitempty"` // Hostname
96
-	MappedDirectories           []MappedDir         `json:",omitempty"` // List of mapped directories (volumes/mounts)
97
-	MappedPipes                 []MappedPipe        `json:",omitempty"` // List of mapped Windows named pipes
98
-	HvPartition                 bool                // True if it a Hyper-V Container
99
-	NetworkSharedContainerName  string              `json:",omitempty"` // Name (ID) of the container that we will share the network stack with.
100
-	EndpointList                []string            `json:",omitempty"` // List of networking endpoints to be attached to container
101
-	HvRuntime                   *HvRuntime          `json:",omitempty"` // Hyper-V container settings. Used by Hyper-V containers only. Format ImagePath=%root%\BaseLayerID\UtilityVM
102
-	Servicing                   bool                `json:",omitempty"` // True if this container is for servicing
103
-	AllowUnqualifiedDNSQuery    bool                `json:",omitempty"` // True to allow unqualified DNS name resolution
104
-	DNSSearchList               string              `json:",omitempty"` // Comma seperated list of DNS suffixes to use for name resolution
105
-	ContainerType               string              `json:",omitempty"` // "Linux" for Linux containers on Windows. Omitted otherwise.
106
-	TerminateOnLastHandleClosed bool                `json:",omitempty"` // Should HCS terminate the container once all handles have been closed
107
-	MappedVirtualDisks          []MappedVirtualDisk `json:",omitempty"` // Array of virtual disks to mount at start
108
-	AssignedDevices             []AssignedDevice    `json:",omitempty"` // Array of devices to assign. NOTE: Support added in RS5
109
-}
110
-
111
-type ComputeSystemQuery struct {
112
-	IDs    []string `json:"Ids,omitempty"`
113
-	Types  []string `json:",omitempty"`
114
-	Names  []string `json:",omitempty"`
115
-	Owners []string `json:",omitempty"`
116
-}
117
-
118
-type PropertyType string
119
-
120
-const (
121
-	PropertyTypeStatistics        PropertyType = "Statistics"        // V1 and V2
122
-	PropertyTypeProcessList       PropertyType = "ProcessList"       // V1 and V2
123
-	PropertyTypeMappedVirtualDisk PropertyType = "MappedVirtualDisk" // Not supported in V2 schema call
124
-	PropertyTypeGuestConnection   PropertyType = "GuestConnection"   // V1 and V2. Nil return from HCS before RS5
125
-)
126
-
127
-type PropertyQuery struct {
128
-	PropertyTypes []PropertyType `json:",omitempty"`
129
-}
130
-
131
-// ContainerProperties holds the properties for a container and the processes running in that container
132
-type ContainerProperties struct {
133
-	ID                           string `json:"Id"`
134
-	State                        string
135
-	Name                         string
136
-	SystemType                   string
137
-	RuntimeOSType                string `json:"RuntimeOsType,omitempty"`
138
-	Owner                        string
139
-	SiloGUID                     string                              `json:"SiloGuid,omitempty"`
140
-	RuntimeID                    guid.GUID                           `json:"RuntimeId,omitempty"`
141
-	IsRuntimeTemplate            bool                                `json:",omitempty"`
142
-	RuntimeImagePath             string                              `json:",omitempty"`
143
-	Stopped                      bool                                `json:",omitempty"`
144
-	ExitType                     string                              `json:",omitempty"`
145
-	AreUpdatesPending            bool                                `json:",omitempty"`
146
-	ObRoot                       string                              `json:",omitempty"`
147
-	Statistics                   Statistics                          `json:",omitempty"`
148
-	ProcessList                  []ProcessListItem                   `json:",omitempty"`
149
-	MappedVirtualDiskControllers map[int]MappedVirtualDiskController `json:",omitempty"`
150
-	GuestConnectionInfo          GuestConnectionInfo                 `json:",omitempty"`
151
-}
152
-
153
-// MemoryStats holds the memory statistics for a container
154
-type MemoryStats struct {
155
-	UsageCommitBytes            uint64 `json:"MemoryUsageCommitBytes,omitempty"`
156
-	UsageCommitPeakBytes        uint64 `json:"MemoryUsageCommitPeakBytes,omitempty"`
157
-	UsagePrivateWorkingSetBytes uint64 `json:"MemoryUsagePrivateWorkingSetBytes,omitempty"`
158
-}
159
-
160
-// ProcessorStats holds the processor statistics for a container
161
-type ProcessorStats struct {
162
-	TotalRuntime100ns  uint64 `json:",omitempty"`
163
-	RuntimeUser100ns   uint64 `json:",omitempty"`
164
-	RuntimeKernel100ns uint64 `json:",omitempty"`
165
-}
166
-
167
-// StorageStats holds the storage statistics for a container
168
-type StorageStats struct {
169
-	ReadCountNormalized  uint64 `json:",omitempty"`
170
-	ReadSizeBytes        uint64 `json:",omitempty"`
171
-	WriteCountNormalized uint64 `json:",omitempty"`
172
-	WriteSizeBytes       uint64 `json:",omitempty"`
173
-}
174
-
175
-// NetworkStats holds the network statistics for a container
176
-type NetworkStats struct {
177
-	BytesReceived          uint64 `json:",omitempty"`
178
-	BytesSent              uint64 `json:",omitempty"`
179
-	PacketsReceived        uint64 `json:",omitempty"`
180
-	PacketsSent            uint64 `json:",omitempty"`
181
-	DroppedPacketsIncoming uint64 `json:",omitempty"`
182
-	DroppedPacketsOutgoing uint64 `json:",omitempty"`
183
-	EndpointId             string `json:",omitempty"`
184
-	InstanceId             string `json:",omitempty"`
185
-}
186
-
187
-// Statistics is the structure returned by a statistics call on a container
188
-type Statistics struct {
189
-	Timestamp          time.Time      `json:",omitempty"`
190
-	ContainerStartTime time.Time      `json:",omitempty"`
191
-	Uptime100ns        uint64         `json:",omitempty"`
192
-	Memory             MemoryStats    `json:",omitempty"`
193
-	Processor          ProcessorStats `json:",omitempty"`
194
-	Storage            StorageStats   `json:",omitempty"`
195
-	Network            []NetworkStats `json:",omitempty"`
196
-}
197
-
198
-// ProcessList is the structure of an item returned by a ProcessList call on a container
199
-type ProcessListItem struct {
200
-	CreateTimestamp              time.Time `json:",omitempty"`
201
-	ImageName                    string    `json:",omitempty"`
202
-	KernelTime100ns              uint64    `json:",omitempty"`
203
-	MemoryCommitBytes            uint64    `json:",omitempty"`
204
-	MemoryWorkingSetPrivateBytes uint64    `json:",omitempty"`
205
-	MemoryWorkingSetSharedBytes  uint64    `json:",omitempty"`
206
-	ProcessId                    uint32    `json:",omitempty"`
207
-	UserTime100ns                uint64    `json:",omitempty"`
208
-}
209
-
210
-// MappedVirtualDiskController is the structure of an item returned by a MappedVirtualDiskList call on a container
211
-type MappedVirtualDiskController struct {
212
-	MappedVirtualDisks map[int]MappedVirtualDisk `json:",omitempty"`
213
-}
214
-
215
-// GuestDefinedCapabilities is part of the GuestConnectionInfo returned by a GuestConnection call on a utility VM
216
-type GuestDefinedCapabilities struct {
217
-	NamespaceAddRequestSupported  bool `json:",omitempty"`
218
-	SignalProcessSupported        bool `json:",omitempty"`
219
-	DumpStacksSupported           bool `json:",omitempty"`
220
-	DeleteContainerStateSupported bool `json:",omitempty"`
221
-	UpdateContainerSupported      bool `json:",omitempty"`
222
-}
223
-
224
-// GuestConnectionInfo is the structure of an iterm return by a GuestConnection call on a utility VM
225
-type GuestConnectionInfo struct {
226
-	SupportedSchemaVersions  []hcsschema.Version      `json:",omitempty"`
227
-	ProtocolVersion          uint32                   `json:",omitempty"`
228
-	GuestDefinedCapabilities GuestDefinedCapabilities `json:",omitempty"`
229
-}
230
-
231
-// Type of Request Support in ModifySystem
232
-type RequestType string
233
-
234
-// Type of Resource Support in ModifySystem
235
-type ResourceType string
236
-
237
-// RequestType const
238
-const (
239
-	Add     RequestType  = "Add"
240
-	Remove  RequestType  = "Remove"
241
-	Network ResourceType = "Network"
242
-)
243
-
244
-// ResourceModificationRequestResponse is the structure used to send request to the container to modify the system
245
-// Supported resource types are Network and Request Types are Add/Remove
246
-type ResourceModificationRequestResponse struct {
247
-	Resource ResourceType `json:"ResourceType"`
248
-	Data     interface{}  `json:"Settings"`
249
-	Request  RequestType  `json:"RequestType,omitempty"`
250
-}
251 1
deleted file mode 100644
... ...
@@ -1,30 +0,0 @@
1
-/*
2
- * HCS API
3
- *
4
- * No description provided (generated by Swagger Codegen https://github.com/swagger-api/swagger-codegen)
5
- *
6
- * API version: 2.1
7
- * Generated by: Swagger Codegen (https://github.com/swagger-api/swagger-codegen.git)
8
- */
9
-
10
-package hcsschema
11
-
12
-type Attachment struct {
13
-	Type_ string `json:"Type,omitempty"`
14
-
15
-	Path string `json:"Path,omitempty"`
16
-
17
-	IgnoreFlushes bool `json:"IgnoreFlushes,omitempty"`
18
-
19
-	CachingMode string `json:"CachingMode,omitempty"`
20
-
21
-	NoWriteHardening bool `json:"NoWriteHardening,omitempty"`
22
-
23
-	DisableExpansionOptimization bool `json:"DisableExpansionOptimization,omitempty"`
24
-
25
-	IgnoreRelativeLocator bool `json:"IgnoreRelativeLocator,omitempty"`
26
-
27
-	CaptureIoAttributionContext bool `json:"CaptureIoAttributionContext,omitempty"`
28
-
29
-	ReadOnly bool `json:"ReadOnly,omitempty"`
30
-}
31 1
deleted file mode 100644
... ...
@@ -1,13 +0,0 @@
1
-/*
2
- * HCS API
3
- *
4
- * No description provided (generated by Swagger Codegen https://github.com/swagger-api/swagger-codegen)
5
- *
6
- * API version: 2.1
7
- * Generated by: Swagger Codegen (https://github.com/swagger-api/swagger-codegen.git)
8
- */
9
-
10
-package hcsschema
11
-
12
-type Battery struct {
13
-}
14 1
deleted file mode 100644
... ...
@@ -1,18 +0,0 @@
1
-/*
2
- * HCS API
3
- *
4
- * No description provided (generated by Swagger Codegen https://github.com/swagger-api/swagger-codegen)
5
- *
6
- * API version: 2.1
7
- * Generated by: Swagger Codegen (https://github.com/swagger-api/swagger-codegen.git)
8
- */
9
-
10
-package hcsschema
11
-
12
-type CacheQueryStatsResponse struct {
13
-	L3OccupancyBytes int32 `json:"L3OccupancyBytes,omitempty"`
14
-
15
-	L3TotalBwBytes int32 `json:"L3TotalBwBytes,omitempty"`
16
-
17
-	L3LocalBwBytes int32 `json:"L3LocalBwBytes,omitempty"`
18
-}
19 1
deleted file mode 100644
... ...
@@ -1,27 +0,0 @@
1
-/*
2
- * HCS API
3
- *
4
- * No description provided (generated by Swagger Codegen https://github.com/swagger-api/swagger-codegen)
5
- *
6
- * API version: 2.1
7
- * Generated by: Swagger Codegen (https://github.com/swagger-api/swagger-codegen.git)
8
- */
9
-
10
-package hcsschema
11
-
12
-type Chipset struct {
13
-	Uefi *Uefi `json:"Uefi,omitempty"`
14
-
15
-	IsNumLockDisabled bool `json:"IsNumLockDisabled,omitempty"`
16
-
17
-	BaseBoardSerialNumber string `json:"BaseBoardSerialNumber,omitempty"`
18
-
19
-	ChassisSerialNumber string `json:"ChassisSerialNumber,omitempty"`
20
-
21
-	ChassisAssetTag string `json:"ChassisAssetTag,omitempty"`
22
-
23
-	UseUtc bool `json:"UseUtc,omitempty"`
24
-
25
-	// LinuxKernelDirect - Added in v2.2 Builds >=181117
26
-	LinuxKernelDirect *LinuxKernelDirect `json:"LinuxKernelDirect,omitempty"`
27
-}
28 1
deleted file mode 100644
... ...
@@ -1,14 +0,0 @@
1
-/*
2
- * HCS API
3
- *
4
- * No description provided (generated by Swagger Codegen https://github.com/swagger-api/swagger-codegen)
5
- *
6
- * API version: 2.1
7
- * Generated by: Swagger Codegen (https://github.com/swagger-api/swagger-codegen.git)
8
- */
9
-
10
-package hcsschema
11
-
12
-type CloseHandle struct {
13
-	Handle string `json:"Handle,omitempty"`
14
-}
15 1
deleted file mode 100644
... ...
@@ -1,17 +0,0 @@
1
-/*
2
- * HCS API
3
- *
4
- * No description provided (generated by Swagger Codegen https://github.com/swagger-api/swagger-codegen)
5
- *
6
- * API version: 2.1
7
- * Generated by: Swagger Codegen (https://github.com/swagger-api/swagger-codegen.git)
8
- */
9
-
10
-package hcsschema
11
-
12
-//  ComPort specifies the named pipe that will be used for the port, with empty string indicating a disconnected port.
13
-type ComPort struct {
14
-	NamedPipe string `json:"NamedPipe,omitempty"`
15
-
16
-	OptimizeForDebugger bool `json:"OptimizeForDebugger,omitempty"`
17
-}
18 1
deleted file mode 100644
... ...
@@ -1,26 +0,0 @@
1
-/*
2
- * HCS API
3
- *
4
- * No description provided (generated by Swagger Codegen https://github.com/swagger-api/swagger-codegen)
5
- *
6
- * API version: 2.1
7
- * Generated by: Swagger Codegen (https://github.com/swagger-api/swagger-codegen.git)
8
- */
9
-
10
-package hcsschema
11
-
12
-type ComputeSystem struct {
13
-	Owner string `json:"Owner,omitempty"`
14
-
15
-	SchemaVersion *Version `json:"SchemaVersion,omitempty"`
16
-
17
-	HostingSystemId string `json:"HostingSystemId,omitempty"`
18
-
19
-	HostedSystem interface{} `json:"HostedSystem,omitempty"`
20
-
21
-	Container *Container `json:"Container,omitempty"`
22
-
23
-	VirtualMachine *VirtualMachine `json:"VirtualMachine,omitempty"`
24
-
25
-	ShouldTerminateOnLastHandleClosed bool `json:"ShouldTerminateOnLastHandleClosed,omitempty"`
26
-}
27 1
deleted file mode 100644
... ...
@@ -1,72 +0,0 @@
1
-/*
2
- * HCS API
3
- *
4
- * No description provided (generated by Swagger Codegen https://github.com/swagger-api/swagger-codegen)
5
- *
6
- * API version: 2.1
7
- * Generated by: Swagger Codegen (https://github.com/swagger-api/swagger-codegen.git)
8
- */
9
-
10
-package hcsschema
11
-
12
-import (
13
-	"net/http"
14
-)
15
-
16
-// contextKeys are used to identify the type of value in the context.
17
-// Since these are string, it is possible to get a short description of the
18
-// context key for logging and debugging using key.String().
19
-
20
-type contextKey string
21
-
22
-func (c contextKey) String() string {
23
-	return "auth " + string(c)
24
-}
25
-
26
-var (
27
-	// ContextOAuth2 takes a oauth2.TokenSource as authentication for the request.
28
-	ContextOAuth2 = contextKey("token")
29
-
30
-	// ContextBasicAuth takes BasicAuth as authentication for the request.
31
-	ContextBasicAuth = contextKey("basic")
32
-
33
-	// ContextAccessToken takes a string oauth2 access token as authentication for the request.
34
-	ContextAccessToken = contextKey("accesstoken")
35
-
36
-	// ContextAPIKey takes an APIKey as authentication for the request
37
-	ContextAPIKey = contextKey("apikey")
38
-)
39
-
40
-// BasicAuth provides basic http authentication to a request passed via context using ContextBasicAuth
41
-type BasicAuth struct {
42
-	UserName string `json:"userName,omitempty"`
43
-	Password string `json:"password,omitempty"`
44
-}
45
-
46
-// APIKey provides API key based authentication to a request passed via context using ContextAPIKey
47
-type APIKey struct {
48
-	Key    string
49
-	Prefix string
50
-}
51
-
52
-type Configuration struct {
53
-	BasePath      string            `json:"basePath,omitempty"`
54
-	Host          string            `json:"host,omitempty"`
55
-	Scheme        string            `json:"scheme,omitempty"`
56
-	DefaultHeader map[string]string `json:"defaultHeader,omitempty"`
57
-	UserAgent     string            `json:"userAgent,omitempty"`
58
-	HTTPClient    *http.Client
59
-}
60
-
61
-func NewConfiguration() *Configuration {
62
-	cfg := &Configuration{
63
-		BasePath:      "https://localhost",
64
-		DefaultHeader: make(map[string]string),
65
-		UserAgent:     "Swagger-Codegen/2.1.0/go",
66
-	}
67
-	return cfg
68
-}
69
-
70
-func (c *Configuration) AddDefaultHeader(key string, value string) {
71
-	c.DefaultHeader[key] = value
72
-}
73 1
deleted file mode 100644
... ...
@@ -1,16 +0,0 @@
1
-/*
2
- * HCS API
3
- *
4
- * No description provided (generated by Swagger Codegen https://github.com/swagger-api/swagger-codegen)
5
- *
6
- * API version: 2.1
7
- * Generated by: Swagger Codegen (https://github.com/swagger-api/swagger-codegen.git)
8
- */
9
-
10
-package hcsschema
11
-
12
-type ConsoleSize struct {
13
-	Height int32 `json:"Height,omitempty"`
14
-
15
-	Width int32 `json:"Width,omitempty"`
16
-}
17 1
deleted file mode 100644
... ...
@@ -1,34 +0,0 @@
1
-/*
2
- * HCS API
3
- *
4
- * No description provided (generated by Swagger Codegen https://github.com/swagger-api/swagger-codegen)
5
- *
6
- * API version: 2.1
7
- * Generated by: Swagger Codegen (https://github.com/swagger-api/swagger-codegen.git)
8
- */
9
-
10
-package hcsschema
11
-
12
-type Container struct {
13
-	GuestOs *GuestOs `json:"GuestOs,omitempty"`
14
-
15
-	Storage *Storage `json:"Storage,omitempty"`
16
-
17
-	MappedDirectories []MappedDirectory `json:"MappedDirectories,omitempty"`
18
-
19
-	MappedPipes []MappedPipe `json:"MappedPipes,omitempty"`
20
-
21
-	Memory *Memory `json:"Memory,omitempty"`
22
-
23
-	Processor *Processor `json:"Processor,omitempty"`
24
-
25
-	Networking *Networking `json:"Networking,omitempty"`
26
-
27
-	HvSocket *HvSocket `json:"HvSocket,omitempty"`
28
-
29
-	ContainerCredentialGuard *ContainerCredentialGuardState `json:"ContainerCredentialGuard,omitempty"`
30
-
31
-	RegistryChanges *RegistryChanges `json:"RegistryChanges,omitempty"`
32
-
33
-	AssignedDevices []Device `json:"AssignedDevices,omitempty"`
34
-}
35 1
deleted file mode 100644
... ...
@@ -1,16 +0,0 @@
1
-/*
2
- * HCS API
3
- *
4
- * No description provided (generated by Swagger Codegen https://github.com/swagger-api/swagger-codegen)
5
- *
6
- * API version: 2.4
7
- * Generated by: Swagger Codegen (https://github.com/swagger-api/swagger-codegen.git)
8
- */
9
-
10
-package hcsschema
11
-
12
-type ContainerCredentialGuardAddInstanceRequest struct {
13
-	Id             string `json:"Id,omitempty"`
14
-	CredentialSpec string `json:"CredentialSpec,omitempty"`
15
-	Transport      string `json:"Transport,omitempty"`
16
-}
17 1
deleted file mode 100644
... ...
@@ -1,15 +0,0 @@
1
-/*
2
- * HCS API
3
- *
4
- * No description provided (generated by Swagger Codegen https://github.com/swagger-api/swagger-codegen)
5
- *
6
- * API version: 2.4
7
- * Generated by: Swagger Codegen (https://github.com/swagger-api/swagger-codegen.git)
8
- */
9
-
10
-package hcsschema
11
-
12
-type ContainerCredentialGuardHvSocketServiceConfig struct {
13
-	ServiceId     string                 `json:"ServiceId,omitempty"`
14
-	ServiceConfig *HvSocketServiceConfig `json:"ServiceConfig,omitempty"`
15
-}
16 1
deleted file mode 100644
... ...
@@ -1,16 +0,0 @@
1
-/*
2
- * HCS API
3
- *
4
- * No description provided (generated by Swagger Codegen https://github.com/swagger-api/swagger-codegen)
5
- *
6
- * API version: 2.4
7
- * Generated by: Swagger Codegen (https://github.com/swagger-api/swagger-codegen.git)
8
- */
9
-
10
-package hcsschema
11
-
12
-type ContainerCredentialGuardInstance struct {
13
-	Id              string                                         `json:"Id,omitempty"`
14
-	CredentialGuard *ContainerCredentialGuardState                 `json:"CredentialGuard,omitempty"`
15
-	HvSocketConfig  *ContainerCredentialGuardHvSocketServiceConfig `json:"HvSocketConfig,omitempty"`
16
-}
17 1
deleted file mode 100644
... ...
@@ -1,17 +0,0 @@
1
-/*
2
- * HCS API
3
- *
4
- * No description provided (generated by Swagger Codegen https://github.com/swagger-api/swagger-codegen)
5
- *
6
- * API version: 2.4
7
- * Generated by: Swagger Codegen (https://github.com/swagger-api/swagger-codegen.git)
8
- */
9
-
10
-package hcsschema
11
-
12
-type ContainerCredentialGuardModifyOperation string
13
-
14
-const (
15
-	AddInstance    ContainerCredentialGuardModifyOperation = "AddInstance"
16
-	RemoveInstance ContainerCredentialGuardModifyOperation = "RemoveInstance"
17
-)
18 1
deleted file mode 100644
... ...
@@ -1,15 +0,0 @@
1
-/*
2
- * HCS API
3
- *
4
- * No description provided (generated by Swagger Codegen https://github.com/swagger-api/swagger-codegen)
5
- *
6
- * API version: 2.4
7
- * Generated by: Swagger Codegen (https://github.com/swagger-api/swagger-codegen.git)
8
- */
9
-
10
-package hcsschema
11
-
12
-type ContainerCredentialGuardOperationRequest struct {
13
-	Operation        ContainerCredentialGuardModifyOperation `json:"Operation,omitempty"`
14
-	OperationDetails interface{}                             `json:"OperationDetails,omitempty"`
15
-}
16 1
deleted file mode 100644
... ...
@@ -1,14 +0,0 @@
1
-/*
2
- * HCS API
3
- *
4
- * No description provided (generated by Swagger Codegen https://github.com/swagger-api/swagger-codegen)
5
- *
6
- * API version: 2.4
7
- * Generated by: Swagger Codegen (https://github.com/swagger-api/swagger-codegen.git)
8
- */
9
-
10
-package hcsschema
11
-
12
-type ContainerCredentialGuardRemoveInstanceRequest struct {
13
-	Id string `json:"Id,omitempty"`
14
-}
15 1
deleted file mode 100644
... ...
@@ -1,25 +0,0 @@
1
-/*
2
- * HCS API
3
- *
4
- * No description provided (generated by Swagger Codegen https://github.com/swagger-api/swagger-codegen)
5
- *
6
- * API version: 2.1
7
- * Generated by: Swagger Codegen (https://github.com/swagger-api/swagger-codegen.git)
8
- */
9
-
10
-package hcsschema
11
-
12
-type ContainerCredentialGuardState struct {
13
-
14
-	//  Authentication cookie for calls to a Container Credential Guard instance.
15
-	Cookie string `json:"Cookie,omitempty"`
16
-
17
-	//  Name of the RPC endpoint of the Container Credential Guard instance.
18
-	RpcEndpoint string `json:"RpcEndpoint,omitempty"`
19
-
20
-	//  Transport used for the configured Container Credential Guard instance.
21
-	Transport string `json:"Transport,omitempty"`
22
-
23
-	//  Credential spec used for the configured Container Credential Guard instance.
24
-	CredentialSpec string `json:"CredentialSpec,omitempty"`
25
-}
26 1
deleted file mode 100644
... ...
@@ -1,14 +0,0 @@
1
-/*
2
- * HCS API
3
- *
4
- * No description provided (generated by Swagger Codegen https://github.com/swagger-api/swagger-codegen)
5
- *
6
- * API version: 2.4
7
- * Generated by: Swagger Codegen (https://github.com/swagger-api/swagger-codegen.git)
8
- */
9
-
10
-package hcsschema
11
-
12
-type ContainerCredentialGuardSystemInfo struct {
13
-	Instances []ContainerCredentialGuardInstance `json:"Instances,omitempty"`
14
-}
15 1
deleted file mode 100644
... ...
@@ -1,25 +0,0 @@
1
-/*
2
- * HCS API
3
- *
4
- * No description provided (generated by Swagger Codegen https://github.com/swagger-api/swagger-codegen)
5
- *
6
- * API version: 2.1
7
- * Generated by: Swagger Codegen (https://github.com/swagger-api/swagger-codegen.git)
8
- */
9
-
10
-package hcsschema
11
-
12
-//  memory usage as viewed from within the container
13
-type ContainerMemoryInformation struct {
14
-	TotalPhysicalBytes int32 `json:"TotalPhysicalBytes,omitempty"`
15
-
16
-	TotalUsage int32 `json:"TotalUsage,omitempty"`
17
-
18
-	CommittedBytes int32 `json:"CommittedBytes,omitempty"`
19
-
20
-	SharedCommittedBytes int32 `json:"SharedCommittedBytes,omitempty"`
21
-
22
-	CommitLimitBytes int32 `json:"CommitLimitBytes,omitempty"`
23
-
24
-	PeakCommitmentBytes int32 `json:"PeakCommitmentBytes,omitempty"`
25
-}
26 1
deleted file mode 100644
... ...
@@ -1,15 +0,0 @@
1
-/*
2
- * HCS API
3
- *
4
- * No description provided (generated by Swagger Codegen https://github.com/swagger-api/swagger-codegen)
5
- *
6
- * API version: 2.4
7
- * Generated by: Swagger Codegen (https://github.com/swagger-api/swagger-codegen.git)
8
- */
9
-
10
-package hcsschema
11
-
12
-// CPU groups allow Hyper-V administrators to better manage and allocate the host's CPU resources across guest virtual machines
13
-type CpuGroup struct {
14
-	Id string `json:"Id,omitempty"`
15
-}
16 1
deleted file mode 100644
... ...
@@ -1,15 +0,0 @@
1
-/*
2
- * HCS API
3
- *
4
- * No description provided (generated by Swagger Codegen https://github.com/swagger-api/swagger-codegen)
5
- *
6
- * API version: 2.4
7
- * Generated by: Swagger Codegen (https://github.com/swagger-api/swagger-codegen.git)
8
- */
9
-
10
-package hcsschema
11
-
12
-type CpuGroupAffinity struct {
13
-	LogicalProcessorCount int32   `json:"LogicalProcessorCount,omitempty"`
14
-	LogicalProcessors     []int32 `json:"LogicalProcessors,omitempty"`
15
-}
16 1
deleted file mode 100644
... ...
@@ -1,18 +0,0 @@
1
-/*
2
- * HCS API
3
- *
4
- * No description provided (generated by Swagger Codegen https://github.com/swagger-api/swagger-codegen)
5
- *
6
- * API version: 2.4
7
- * Generated by: Swagger Codegen (https://github.com/swagger-api/swagger-codegen.git)
8
- */
9
-
10
-package hcsschema
11
-
12
-type CpuGroupConfig struct {
13
-	GroupId         string             `json:"GroupId,omitempty"`
14
-	Affinity        *CpuGroupAffinity  `json:"Affinity,omitempty"`
15
-	GroupProperties []CpuGroupProperty `json:"GroupProperties,omitempty"`
16
-	// Hypervisor CPU group IDs exposed to clients
17
-	HypervisorGroupId int32 `json:"HypervisorGroupId,omitempty"`
18
-}
19 1
deleted file mode 100644
... ...
@@ -1,15 +0,0 @@
1
-/*
2
- * HCS API
3
- *
4
- * No description provided (generated by Swagger Codegen https://github.com/swagger-api/swagger-codegen)
5
- *
6
- * API version: 2.4
7
- * Generated by: Swagger Codegen (https://github.com/swagger-api/swagger-codegen.git)
8
- */
9
-
10
-package hcsschema
11
-
12
-// Structure used to return cpu groups for a Service property query
13
-type CpuGroupConfigurations struct {
14
-	CpuGroups []CpuGroupConfig `json:"CpuGroups,omitempty"`
15
-}
16 1
deleted file mode 100644
... ...
@@ -1,18 +0,0 @@
1
-/*
2
- * HCS API
3
- *
4
- * No description provided (generated by Swagger Codegen https://github.com/swagger-api/swagger-codegen)
5
- *
6
- * API version: 2.4
7
- * Generated by: Swagger Codegen (https://github.com/swagger-api/swagger-codegen.git)
8
- */
9
-
10
-package hcsschema
11
-
12
-type CPUGroupOperation string
13
-
14
-const (
15
-	CreateGroup CPUGroupOperation = "CreateGroup"
16
-	DeleteGroup CPUGroupOperation = "DeleteGroup"
17
-	SetProperty CPUGroupOperation = "SetProperty"
18
-)
19 1
deleted file mode 100644
... ...
@@ -1,15 +0,0 @@
1
-/*
2
- * HCS API
3
- *
4
- * No description provided (generated by Swagger Codegen https://github.com/swagger-api/swagger-codegen)
5
- *
6
- * API version: 2.4
7
- * Generated by: Swagger Codegen (https://github.com/swagger-api/swagger-codegen.git)
8
- */
9
-
10
-package hcsschema
11
-
12
-type CpuGroupProperty struct {
13
-	PropertyCode  uint32 `json:"PropertyCode,omitempty"`
14
-	PropertyValue uint32 `json:"PropertyValue,omitempty"`
15
-}
16 1
deleted file mode 100644
... ...
@@ -1,17 +0,0 @@
1
-/*
2
- * HCS API
3
- *
4
- * No description provided (generated by Swagger Codegen https://github.com/swagger-api/swagger-codegen)
5
- *
6
- * API version: 2.4
7
- * Generated by: Swagger Codegen (https://github.com/swagger-api/swagger-codegen.git)
8
- */
9
-
10
-package hcsschema
11
-
12
-// Create group operation settings
13
-type CreateGroupOperation struct {
14
-	GroupId               string   `json:"GroupId,omitempty"`
15
-	LogicalProcessorCount uint32   `json:"LogicalProcessorCount,omitempty"`
16
-	LogicalProcessors     []uint32 `json:"LogicalProcessors,omitempty"`
17
-}
18 1
deleted file mode 100644
... ...
@@ -1,15 +0,0 @@
1
-/*
2
- * HCS API
3
- *
4
- * No description provided (generated by Swagger Codegen https://github.com/swagger-api/swagger-codegen)
5
- *
6
- * API version: 2.4
7
- * Generated by: Swagger Codegen (https://github.com/swagger-api/swagger-codegen.git)
8
- */
9
-
10
-package hcsschema
11
-
12
-// Delete group operation settings
13
-type DeleteGroupOperation struct {
14
-	GroupId string `json:"GroupId,omitempty"`
15
-}
16 1
deleted file mode 100644
... ...
@@ -1,27 +0,0 @@
1
-/*
2
- * HCS API
3
- *
4
- * No description provided (generated by Swagger Codegen https://github.com/swagger-api/swagger-codegen)
5
- *
6
- * API version: 2.1
7
- * Generated by: Swagger Codegen (https://github.com/swagger-api/swagger-codegen.git)
8
- */
9
-
10
-package hcsschema
11
-
12
-type DeviceType string
13
-
14
-const (
15
-	ClassGUID      DeviceType = "ClassGuid"
16
-	DeviceInstance DeviceType = "DeviceInstance"
17
-	GPUMirror      DeviceType = "GpuMirror"
18
-)
19
-
20
-type Device struct {
21
-	//  The type of device to assign to the container.
22
-	Type DeviceType `json:"Type,omitempty"`
23
-	//  The interface class guid of the device interfaces to assign to the  container.  Only used when Type is ClassGuid.
24
-	InterfaceClassGuid string `json:"InterfaceClassGuid,omitempty"`
25
-	//  The location path of the device to assign to the container.  Only used when Type is DeviceInstance.
26
-	LocationPath string `json:"LocationPath,omitempty"`
27
-}
28 1
deleted file mode 100644
... ...
@@ -1,46 +0,0 @@
1
-/*
2
- * HCS API
3
- *
4
- * No description provided (generated by Swagger Codegen https://github.com/swagger-api/swagger-codegen)
5
- *
6
- * API version: 2.1
7
- * Generated by: Swagger Codegen (https://github.com/swagger-api/swagger-codegen.git)
8
- */
9
-
10
-package hcsschema
11
-
12
-type Devices struct {
13
-	ComPorts map[string]ComPort `json:"ComPorts,omitempty"`
14
-
15
-	Scsi map[string]Scsi `json:"Scsi,omitempty"`
16
-
17
-	VirtualPMem *VirtualPMemController `json:"VirtualPMem,omitempty"`
18
-
19
-	NetworkAdapters map[string]NetworkAdapter `json:"NetworkAdapters,omitempty"`
20
-
21
-	VideoMonitor *VideoMonitor `json:"VideoMonitor,omitempty"`
22
-
23
-	Keyboard *Keyboard `json:"Keyboard,omitempty"`
24
-
25
-	Mouse *Mouse `json:"Mouse,omitempty"`
26
-
27
-	HvSocket *HvSocket2 `json:"HvSocket,omitempty"`
28
-
29
-	EnhancedModeVideo *EnhancedModeVideo `json:"EnhancedModeVideo,omitempty"`
30
-
31
-	GuestCrashReporting *GuestCrashReporting `json:"GuestCrashReporting,omitempty"`
32
-
33
-	VirtualSmb *VirtualSmb `json:"VirtualSmb,omitempty"`
34
-
35
-	Plan9 *Plan9 `json:"Plan9,omitempty"`
36
-
37
-	Battery *Battery `json:"Battery,omitempty"`
38
-
39
-	FlexibleIov map[string]FlexibleIoDevice `json:"FlexibleIov,omitempty"`
40
-
41
-	SharedMemory *SharedMemoryConfiguration `json:"SharedMemory,omitempty"`
42
-
43
-	// TODO: This is pre-release support in schema 2.3. Need to add build number
44
-	// docs when a public build with this is out.
45
-	VirtualPci map[string]VirtualPciDevice `json:",omitempty"`
46
-}
47 1
deleted file mode 100644
... ...
@@ -1,14 +0,0 @@
1
-/*
2
- * HCS API
3
- *
4
- * No description provided (generated by Swagger Codegen https://github.com/swagger-api/swagger-codegen)
5
- *
6
- * API version: 2.1
7
- * Generated by: Swagger Codegen (https://github.com/swagger-api/swagger-codegen.git)
8
- */
9
-
10
-package hcsschema
11
-
12
-type EnhancedModeVideo struct {
13
-	ConnectionOptions *RdpConnectionOptions `json:"ConnectionOptions,omitempty"`
14
-}
15 1
deleted file mode 100644
... ...
@@ -1,18 +0,0 @@
1
-/*
2
- * HCS API
3
- *
4
- * No description provided (generated by Swagger Codegen https://github.com/swagger-api/swagger-codegen)
5
- *
6
- * API version: 2.1
7
- * Generated by: Swagger Codegen (https://github.com/swagger-api/swagger-codegen.git)
8
- */
9
-
10
-package hcsschema
11
-
12
-type FlexibleIoDevice struct {
13
-	EmulatorId string `json:"EmulatorId,omitempty"`
14
-
15
-	HostingModel string `json:"HostingModel,omitempty"`
16
-
17
-	Configuration []string `json:"Configuration,omitempty"`
18
-}
19 1
deleted file mode 100644
... ...
@@ -1,19 +0,0 @@
1
-/*
2
- * HCS API
3
- *
4
- * No description provided (generated by Swagger Codegen https://github.com/swagger-api/swagger-codegen)
5
- *
6
- * API version: 2.1
7
- * Generated by: Swagger Codegen (https://github.com/swagger-api/swagger-codegen.git)
8
- */
9
-
10
-package hcsschema
11
-
12
-type GuestConnection struct {
13
-
14
-	//  Use Vsock rather than Hyper-V sockets to communicate with the guest service.
15
-	UseVsock bool `json:"UseVsock,omitempty"`
16
-
17
-	//  Don't disconnect the guest connection when pausing the virtual machine.
18
-	UseConnectedSuspend bool `json:"UseConnectedSuspend,omitempty"`
19
-}
20 1
deleted file mode 100644
... ...
@@ -1,21 +0,0 @@
1
-/*
2
- * HCS API
3
- *
4
- * No description provided (generated by Swagger Codegen https://github.com/swagger-api/swagger-codegen)
5
- *
6
- * API version: 2.1
7
- * Generated by: Swagger Codegen (https://github.com/swagger-api/swagger-codegen.git)
8
- */
9
-
10
-package hcsschema
11
-
12
-//  Information about the guest.
13
-type GuestConnectionInfo struct {
14
-
15
-	//  Each schema version x.y stands for the range of versions a.b where a==x  and b<=y. This list comes from the SupportedSchemaVersions field in  GcsCapabilities.
16
-	SupportedSchemaVersions []Version `json:"SupportedSchemaVersions,omitempty"`
17
-
18
-	ProtocolVersion int32 `json:"ProtocolVersion,omitempty"`
19
-
20
-	GuestDefinedCapabilities *interface{} `json:"GuestDefinedCapabilities,omitempty"`
21
-}
22 1
deleted file mode 100644
... ...
@@ -1,14 +0,0 @@
1
-/*
2
- * HCS API
3
- *
4
- * No description provided (generated by Swagger Codegen https://github.com/swagger-api/swagger-codegen)
5
- *
6
- * API version: 2.1
7
- * Generated by: Swagger Codegen (https://github.com/swagger-api/swagger-codegen.git)
8
- */
9
-
10
-package hcsschema
11
-
12
-type GuestCrashReporting struct {
13
-	WindowsCrashSettings *WindowsCrashReporting `json:"WindowsCrashSettings,omitempty"`
14
-}
15 1
deleted file mode 100644
... ...
@@ -1,14 +0,0 @@
1
-/*
2
- * HCS API
3
- *
4
- * No description provided (generated by Swagger Codegen https://github.com/swagger-api/swagger-codegen)
5
- *
6
- * API version: 2.1
7
- * Generated by: Swagger Codegen (https://github.com/swagger-api/swagger-codegen.git)
8
- */
9
-
10
-package hcsschema
11
-
12
-type GuestOs struct {
13
-	HostName string `json:"HostName,omitempty"`
14
-}
15 1
deleted file mode 100644
... ...
@@ -1,22 +0,0 @@
1
-/*
2
- * HCS API
3
- *
4
- * No description provided (generated by Swagger Codegen https://github.com/swagger-api/swagger-codegen)
5
- *
6
- * API version: 2.1
7
- * Generated by: Swagger Codegen (https://github.com/swagger-api/swagger-codegen.git)
8
- */
9
-
10
-package hcsschema
11
-
12
-type GuestState struct {
13
-
14
-	//  The path to an existing file uses for persistent guest state storage.  An empty string indicates the system should initialize new transient, in-memory guest state.
15
-	GuestStateFilePath string `json:"GuestStateFilePath,omitempty"`
16
-
17
-	//  The path to an existing file for persistent runtime state storage.  An empty string indicates the system should initialize new transient, in-memory runtime state.
18
-	RuntimeStateFilePath string `json:"RuntimeStateFilePath,omitempty"`
19
-
20
-	//  If true, the guest state and runtime state files will be used as templates  to populate transient, in-memory state instead of using the files as persistent backing store.
21
-	ForceTransientState bool `json:"ForceTransientState,omitempty"`
22
-}
23 1
deleted file mode 100644
... ...
@@ -1,16 +0,0 @@
1
-/*
2
- * HCS API
3
- *
4
- * No description provided (generated by Swagger Codegen https://github.com/swagger-api/swagger-codegen)
5
- *
6
- * API version: 2.4
7
- * Generated by: Swagger Codegen (https://github.com/swagger-api/swagger-codegen.git)
8
- */
9
-
10
-package hcsschema
11
-
12
-// Structure used to request a service processor modification
13
-type HostProcessorModificationRequest struct {
14
-	Operation        CPUGroupOperation `json:"Operation,omitempty"`
15
-	OperationDetails interface{}       `json:"OperationDetails,omitempty"`
16
-}
17 1
deleted file mode 100644
... ...
@@ -1,16 +0,0 @@
1
-/*
2
- * HCS API
3
- *
4
- * No description provided (generated by Swagger Codegen https://github.com/swagger-api/swagger-codegen)
5
- *
6
- * API version: 2.1
7
- * Generated by: Swagger Codegen (https://github.com/swagger-api/swagger-codegen.git)
8
- */
9
-
10
-package hcsschema
11
-
12
-type HostedSystem struct {
13
-	SchemaVersion *Version `json:"SchemaVersion,omitempty"`
14
-
15
-	Container *Container `json:"Container,omitempty"`
16
-}
17 1
deleted file mode 100644
... ...
@@ -1,16 +0,0 @@
1
-/*
2
- * HCS API
3
- *
4
- * No description provided (generated by Swagger Codegen https://github.com/swagger-api/swagger-codegen)
5
- *
6
- * API version: 2.1
7
- * Generated by: Swagger Codegen (https://github.com/swagger-api/swagger-codegen.git)
8
- */
9
-
10
-package hcsschema
11
-
12
-type HvSocket struct {
13
-	Config *HvSocketSystemConfig `json:"Config,omitempty"`
14
-
15
-	EnablePowerShellDirect bool `json:"EnablePowerShellDirect,omitempty"`
16
-}
17 1
deleted file mode 100644
... ...
@@ -1,15 +0,0 @@
1
-/*
2
- * HCS API
3
- *
4
- * No description provided (generated by Swagger Codegen https://github.com/swagger-api/swagger-codegen)
5
- *
6
- * API version: 2.1
7
- * Generated by: Swagger Codegen (https://github.com/swagger-api/swagger-codegen.git)
8
- */
9
-
10
-package hcsschema
11
-
12
-//  HvSocket configuration for a VM
13
-type HvSocket2 struct {
14
-	HvSocketConfig *HvSocketSystemConfig `json:"HvSocketConfig,omitempty"`
15
-}
16 1
deleted file mode 100644
... ...
@@ -1,17 +0,0 @@
1
-/*
2
- * HCS API
3
- *
4
- * No description provided (generated by Swagger Codegen https://github.com/swagger-api/swagger-codegen)
5
- *
6
- * API version: 2.4
7
- * Generated by: Swagger Codegen (https://github.com/swagger-api/swagger-codegen.git)
8
- */
9
-
10
-package hcsschema
11
-
12
-//  This class defines address settings applied to a VM
13
-//  by the GCS every time a VM starts or restores.
14
-type HvSocketAddress struct {
15
-	LocalAddress  string `json:"LocalAddress,omitempty"`
16
-	ParentAddress string `json:"ParentAddress,omitempty"`
17
-}
18 1
deleted file mode 100644
... ...
@@ -1,28 +0,0 @@
1
-/*
2
- * HCS API
3
- *
4
- * No description provided (generated by Swagger Codegen https://github.com/swagger-api/swagger-codegen)
5
- *
6
- * API version: 2.1
7
- * Generated by: Swagger Codegen (https://github.com/swagger-api/swagger-codegen.git)
8
- */
9
-
10
-package hcsschema
11
-
12
-type HvSocketServiceConfig struct {
13
-
14
-	//  SDDL string that HvSocket will check before allowing a host process to bind  to this specific service.  If not specified, defaults to the system DefaultBindSecurityDescriptor, defined in  HvSocketSystemWpConfig in V1.
15
-	BindSecurityDescriptor string `json:"BindSecurityDescriptor,omitempty"`
16
-
17
-	//  SDDL string that HvSocket will check before allowing a host process to connect  to this specific service.  If not specified, defaults to the system DefaultConnectSecurityDescriptor, defined in  HvSocketSystemWpConfig in V1.
18
-	ConnectSecurityDescriptor string `json:"ConnectSecurityDescriptor,omitempty"`
19
-
20
-	//  If true, HvSocket will process wildcard binds for this service/system combination.  Wildcard binds are secured in the registry at  SOFTWARE/Microsoft/Windows NT/CurrentVersion/Virtualization/HvSocket/WildcardDescriptors
21
-	AllowWildcardBinds bool `json:"AllowWildcardBinds,omitempty"`
22
-
23
-	// Disabled controls whether the HvSocket service is accepting connection requests.
24
-	// This set to true will make the service refuse all incoming connections as well as cancel
25
-	// any connections already established. The service itself will still be active however
26
-	// and can be re-enabled at a future time.
27
-	Disabled bool `json:"Disabled,omitempty"`
28
-}
29 1
deleted file mode 100644
... ...
@@ -1,22 +0,0 @@
1
-/*
2
- * HCS API
3
- *
4
- * No description provided (generated by Swagger Codegen https://github.com/swagger-api/swagger-codegen)
5
- *
6
- * API version: 2.1
7
- * Generated by: Swagger Codegen (https://github.com/swagger-api/swagger-codegen.git)
8
- */
9
-
10
-package hcsschema
11
-
12
-//  This is the HCS Schema version of the HvSocket configuration. The VMWP version is  located in Config.Devices.IC in V1.
13
-type HvSocketSystemConfig struct {
14
-
15
-	//  SDDL string that HvSocket will check before allowing a host process to bind  to an unlisted service for this specific container/VM (not wildcard binds).
16
-	DefaultBindSecurityDescriptor string `json:"DefaultBindSecurityDescriptor,omitempty"`
17
-
18
-	//  SDDL string that HvSocket will check before allowing a host process to connect  to an unlisted service in the VM/container.
19
-	DefaultConnectSecurityDescriptor string `json:"DefaultConnectSecurityDescriptor,omitempty"`
20
-
21
-	ServiceTable map[string]HvSocketServiceConfig `json:"ServiceTable,omitempty"`
22
-}
23 1
deleted file mode 100644
... ...
@@ -1,42 +0,0 @@
1
-/*
2
- * HCS API
3
- *
4
- * No description provided (generated by Swagger Codegen https://github.com/swagger-api/swagger-codegen)
5
- *
6
- * API version: 2.4
7
- * Generated by: Swagger Codegen (https://github.com/swagger-api/swagger-codegen.git)
8
- */
9
-
10
-package hcsschema
11
-
12
-type InterruptModerationName string
13
-
14
-// The valid interrupt moderation modes for I/O virtualization (IOV) offloading.
15
-const (
16
-	DefaultName  InterruptModerationName = "Default"
17
-	AdaptiveName InterruptModerationName = "Adaptive"
18
-	OffName      InterruptModerationName = "Off"
19
-	LowName      InterruptModerationName = "Low"
20
-	MediumName   InterruptModerationName = "Medium"
21
-	HighName     InterruptModerationName = "High"
22
-)
23
-
24
-type InterruptModerationValue uint32
25
-
26
-const (
27
-	DefaultValue InterruptModerationValue = iota
28
-	AdaptiveValue
29
-	OffValue
30
-	LowValue    InterruptModerationValue = 100
31
-	MediumValue InterruptModerationValue = 200
32
-	HighValue   InterruptModerationValue = 300
33
-)
34
-
35
-var InterruptModerationValueToName = map[InterruptModerationValue]InterruptModerationName{
36
-	DefaultValue:  DefaultName,
37
-	AdaptiveValue: AdaptiveName,
38
-	OffValue:      OffName,
39
-	LowValue:      LowName,
40
-	MediumValue:   MediumName,
41
-	HighValue:     HighName,
42
-}
43 1
deleted file mode 100644
... ...
@@ -1,22 +0,0 @@
1
-/*
2
- * HCS API
3
- *
4
- * No description provided (generated by Swagger Codegen https://github.com/swagger-api/swagger-codegen)
5
- *
6
- * API version: 2.4
7
- * Generated by: Swagger Codegen (https://github.com/swagger-api/swagger-codegen.git)
8
- */
9
-
10
-package hcsschema
11
-
12
-type IovSettings struct {
13
-	// The weight assigned to this port for I/O virtualization (IOV) offloading.
14
-	// Setting this to 0 disables IOV offloading.
15
-	OffloadWeight *uint32 `json:"OffloadWeight,omitempty"`
16
-
17
-	// The number of queue pairs requested for this port for I/O virtualization (IOV) offloading.
18
-	QueuePairsRequested *uint32 `json:"QueuePairsRequested,omitempty"`
19
-
20
-	// The interrupt moderation mode for I/O virtualization (IOV) offloading.
21
-	InterruptModeration *InterruptModerationName `json:"InterruptModeration,omitempty"`
22
-}
23 1
deleted file mode 100644
... ...
@@ -1,13 +0,0 @@
1
-/*
2
- * HCS API
3
- *
4
- * No description provided (generated by Swagger Codegen https://github.com/swagger-api/swagger-codegen)
5
- *
6
- * API version: 2.1
7
- * Generated by: Swagger Codegen (https://github.com/swagger-api/swagger-codegen.git)
8
- */
9
-
10
-package hcsschema
11
-
12
-type Keyboard struct {
13
-}
14 1
deleted file mode 100644
... ...
@@ -1,21 +0,0 @@
1
-/*
2
- * HCS API
3
- *
4
- * No description provided (generated by Swagger Codegen https://github.com/swagger-api/swagger-codegen)
5
- *
6
- * API version: 2.1
7
- * Generated by: Swagger Codegen (https://github.com/swagger-api/swagger-codegen.git)
8
- */
9
-
10
-package hcsschema
11
-
12
-type Layer struct {
13
-	Id string `json:"Id,omitempty"`
14
-
15
-	Path string `json:"Path,omitempty"`
16
-
17
-	PathType string `json:"PathType,omitempty"`
18
-
19
-	//  Unspecified defaults to Enabled
20
-	Cache string `json:"Cache,omitempty"`
21
-}
22 1
deleted file mode 100644
... ...
@@ -1,18 +0,0 @@
1
-/*
2
- * HCS API
3
- *
4
- * No description provided (generated by Swagger Codegen https://github.com/swagger-api/swagger-codegen)
5
- *
6
- * API version: 2.2
7
- * Generated by: Swagger Codegen (https://github.com/swagger-api/swagger-codegen.git)
8
- */
9
-
10
-package hcsschema
11
-
12
-type LinuxKernelDirect struct {
13
-	KernelFilePath string `json:"KernelFilePath,omitempty"`
14
-
15
-	InitRdPath string `json:"InitRdPath,omitempty"`
16
-
17
-	KernelCmdLine string `json:"KernelCmdLine,omitempty"`
18
-}
19 1
deleted file mode 100644
... ...
@@ -1,18 +0,0 @@
1
-/*
2
- * HCS API
3
- *
4
- * No description provided (generated by Swagger Codegen https://github.com/swagger-api/swagger-codegen)
5
- *
6
- * API version: 2.4
7
- * Generated by: Swagger Codegen (https://github.com/swagger-api/swagger-codegen.git)
8
- */
9
-
10
-package hcsschema
11
-
12
-type LogicalProcessor struct {
13
-	LpIndex     uint32 `json:"LpIndex,omitempty"`
14
-	NodeNumber  uint8  `json:"NodeNumber,omitempty"`
15
-	PackageId   uint32 `json:"PackageId,omitempty"`
16
-	CoreId      uint32 `json:"CoreId,omitempty"`
17
-	RootVpIndex int32  `json:"RootVpIndex,omitempty"`
18
-}
19 1
deleted file mode 100644
... ...
@@ -1,20 +0,0 @@
1
-/*
2
- * HCS API
3
- *
4
- * No description provided (generated by Swagger Codegen https://github.com/swagger-api/swagger-codegen)
5
- *
6
- * API version: 2.1
7
- * Generated by: Swagger Codegen (https://github.com/swagger-api/swagger-codegen.git)
8
- */
9
-
10
-package hcsschema
11
-
12
-type MappedDirectory struct {
13
-	HostPath string `json:"HostPath,omitempty"`
14
-
15
-	HostPathType string `json:"HostPathType,omitempty"`
16
-
17
-	ContainerPath string `json:"ContainerPath,omitempty"`
18
-
19
-	ReadOnly bool `json:"ReadOnly,omitempty"`
20
-}
21 1
deleted file mode 100644
... ...
@@ -1,18 +0,0 @@
1
-/*
2
- * HCS API
3
- *
4
- * No description provided (generated by Swagger Codegen https://github.com/swagger-api/swagger-codegen)
5
- *
6
- * API version: 2.1
7
- * Generated by: Swagger Codegen (https://github.com/swagger-api/swagger-codegen.git)
8
- */
9
-
10
-package hcsschema
11
-
12
-type MappedPipe struct {
13
-	ContainerPipeName string `json:"ContainerPipeName,omitempty"`
14
-
15
-	HostPath string `json:"HostPath,omitempty"`
16
-
17
-	HostPathType string `json:"HostPathType,omitempty"`
18
-}
19 1
deleted file mode 100644
... ...
@@ -1,14 +0,0 @@
1
-/*
2
- * HCS API
3
- *
4
- * No description provided (generated by Swagger Codegen https://github.com/swagger-api/swagger-codegen)
5
- *
6
- * API version: 2.1
7
- * Generated by: Swagger Codegen (https://github.com/swagger-api/swagger-codegen.git)
8
- */
9
-
10
-package hcsschema
11
-
12
-type Memory struct {
13
-	SizeInMB uint64 `json:"SizeInMB,omitempty"`
14
-}
15 1
deleted file mode 100644
... ...
@@ -1,49 +0,0 @@
1
-/*
2
- * HCS API
3
- *
4
- * No description provided (generated by Swagger Codegen https://github.com/swagger-api/swagger-codegen)
5
- *
6
- * API version: 2.1
7
- * Generated by: Swagger Codegen (https://github.com/swagger-api/swagger-codegen.git)
8
- */
9
-
10
-package hcsschema
11
-
12
-type Memory2 struct {
13
-	SizeInMB uint64 `json:"SizeInMB,omitempty"`
14
-
15
-	AllowOvercommit bool `json:"AllowOvercommit,omitempty"`
16
-
17
-	EnableHotHint bool `json:"EnableHotHint,omitempty"`
18
-
19
-	EnableColdHint bool `json:"EnableColdHint,omitempty"`
20
-
21
-	EnableEpf bool `json:"EnableEpf,omitempty"`
22
-
23
-	// EnableDeferredCommit is private in the schema. If regenerated need to add back.
24
-	EnableDeferredCommit bool `json:"EnableDeferredCommit,omitempty"`
25
-
26
-	// EnableColdDiscardHint if enabled, then the memory cold discard hint feature is exposed
27
-	// to the VM, allowing it to trim non-zeroed pages from the working set (if supported by
28
-	// the guest operating system).
29
-	EnableColdDiscardHint bool `json:"EnableColdDiscardHint,omitempty"`
30
-
31
-	// LowMmioGapInMB is the low MMIO region allocated below 4GB.
32
-	//
33
-	// TODO: This is pre-release support in schema 2.3. Need to add build number
34
-	// docs when a public build with this is out.
35
-	LowMMIOGapInMB uint64 `json:"LowMmioGapInMB,omitempty"`
36
-
37
-	// HighMmioBaseInMB is the high MMIO region allocated above 4GB (base and
38
-	// size).
39
-	//
40
-	// TODO: This is pre-release support in schema 2.3. Need to add build number
41
-	// docs when a public build with this is out.
42
-	HighMMIOBaseInMB uint64 `json:"HighMmioBaseInMB,omitempty"`
43
-
44
-	// HighMmioGapInMB is the high MMIO region.
45
-	//
46
-	// TODO: This is pre-release support in schema 2.3. Need to add build number
47
-	// docs when a public build with this is out.
48
-	HighMMIOGapInMB uint64 `json:"HighMmioGapInMB,omitempty"`
49
-}
50 1
deleted file mode 100644
... ...
@@ -1,18 +0,0 @@
1
-/*
2
- * HCS API
3
- *
4
- * No description provided (generated by Swagger Codegen https://github.com/swagger-api/swagger-codegen)
5
- *
6
- * API version: 2.1
7
- * Generated by: Swagger Codegen (https://github.com/swagger-api/swagger-codegen.git)
8
- */
9
-
10
-package hcsschema
11
-
12
-type MemoryInformationForVm struct {
13
-	VirtualNodeCount uint32 `json:"VirtualNodeCount,omitempty"`
14
-
15
-	VirtualMachineMemory *VmMemory `json:"VirtualMachineMemory,omitempty"`
16
-
17
-	VirtualNodes []VirtualNodeInfo `json:"VirtualNodes,omitempty"`
18
-}
19 1
deleted file mode 100644
... ...
@@ -1,19 +0,0 @@
1
-/*
2
- * HCS API
3
- *
4
- * No description provided (generated by Swagger Codegen https://github.com/swagger-api/swagger-codegen)
5
- *
6
- * API version: 2.1
7
- * Generated by: Swagger Codegen (https://github.com/swagger-api/swagger-codegen.git)
8
- */
9
-
10
-package hcsschema
11
-
12
-//  Memory runtime statistics
13
-type MemoryStats struct {
14
-	MemoryUsageCommitBytes uint64 `json:"MemoryUsageCommitBytes,omitempty"`
15
-
16
-	MemoryUsageCommitPeakBytes uint64 `json:"MemoryUsageCommitPeakBytes,omitempty"`
17
-
18
-	MemoryUsagePrivateWorkingSetBytes uint64 `json:"MemoryUsagePrivateWorkingSetBytes,omitempty"`
19
-}
20 1
deleted file mode 100644
... ...
@@ -1,15 +0,0 @@
1
-/*
2
- * HCS API
3
- *
4
- * No description provided (generated by Swagger Codegen https://github.com/swagger-api/swagger-codegen)
5
- *
6
- * API version: 2.4
7
- * Generated by: Swagger Codegen (https://github.com/swagger-api/swagger-codegen.git)
8
- */
9
-
10
-package hcsschema
11
-
12
-type ModificationRequest struct {
13
-	PropertyType PropertyType `json:"PropertyType,omitempty"`
14
-	Settings     interface{}  `json:"Settings,omitempty"`
15
-}
16 1
deleted file mode 100644
... ...
@@ -1,20 +0,0 @@
1
-/*
2
- * HCS API
3
- *
4
- * No description provided (generated by Swagger Codegen https://github.com/swagger-api/swagger-codegen)
5
- *
6
- * API version: 2.1
7
- * Generated by: Swagger Codegen (https://github.com/swagger-api/swagger-codegen.git)
8
- */
9
-
10
-package hcsschema
11
-
12
-type ModifySettingRequest struct {
13
-	ResourcePath string `json:"ResourcePath,omitempty"`
14
-
15
-	RequestType string `json:"RequestType,omitempty"`
16
-
17
-	Settings interface{} `json:"Settings,omitempty"` // NOTE: Swagger generated as *interface{}. Locally updated
18
-
19
-	GuestRequest interface{} `json:"GuestRequest,omitempty"` // NOTE: Swagger generated as *interface{}. Locally updated
20
-}
21 1
deleted file mode 100644
... ...
@@ -1,13 +0,0 @@
1
-/*
2
- * HCS API
3
- *
4
- * No description provided (generated by Swagger Codegen https://github.com/swagger-api/swagger-codegen)
5
- *
6
- * API version: 2.1
7
- * Generated by: Swagger Codegen (https://github.com/swagger-api/swagger-codegen.git)
8
- */
9
-
10
-package hcsschema
11
-
12
-type Mouse struct {
13
-}
14 1
deleted file mode 100644
... ...
@@ -1,17 +0,0 @@
1
-/*
2
- * HCS API
3
- *
4
- * No description provided (generated by Swagger Codegen https://github.com/swagger-api/swagger-codegen)
5
- *
6
- * API version: 2.1
7
- * Generated by: Swagger Codegen (https://github.com/swagger-api/swagger-codegen.git)
8
- */
9
-
10
-package hcsschema
11
-
12
-type NetworkAdapter struct {
13
-	EndpointId string `json:"EndpointId,omitempty"`
14
-	MacAddress string `json:"MacAddress,omitempty"`
15
-	// The I/O virtualization (IOV) offloading configuration.
16
-	IovSettings *IovSettings `json:"IovSettings,omitempty"`
17
-}
18 1
deleted file mode 100644
... ...
@@ -1,23 +0,0 @@
1
-/*
2
- * HCS API
3
- *
4
- * No description provided (generated by Swagger Codegen https://github.com/swagger-api/swagger-codegen)
5
- *
6
- * API version: 2.1
7
- * Generated by: Swagger Codegen (https://github.com/swagger-api/swagger-codegen.git)
8
- */
9
-
10
-package hcsschema
11
-
12
-type Networking struct {
13
-	AllowUnqualifiedDnsQuery bool `json:"AllowUnqualifiedDnsQuery,omitempty"`
14
-
15
-	DnsSearchList string `json:"DnsSearchList,omitempty"`
16
-
17
-	NetworkSharedContainerName string `json:"NetworkSharedContainerName,omitempty"`
18
-
19
-	//  Guid in windows; string in linux
20
-	Namespace string `json:"Namespace,omitempty"`
21
-
22
-	NetworkAdapters []string `json:"NetworkAdapters,omitempty"`
23
-}
24 1
deleted file mode 100644
... ...
@@ -1,15 +0,0 @@
1
-/*
2
- * HCS API
3
- *
4
- * No description provided (generated by Swagger Codegen https://github.com/swagger-api/swagger-codegen)
5
- *
6
- * API version: 2.1
7
- * Generated by: Swagger Codegen (https://github.com/swagger-api/swagger-codegen.git)
8
- */
9
-
10
-package hcsschema
11
-
12
-//  Notification data that is indicated to components running in the Virtual Machine.
13
-type PauseNotification struct {
14
-	Reason string `json:"Reason,omitempty"`
15
-}
16 1
deleted file mode 100644
... ...
@@ -1,17 +0,0 @@
1
-/*
2
- * HCS API
3
- *
4
- * No description provided (generated by Swagger Codegen https://github.com/swagger-api/swagger-codegen)
5
- *
6
- * API version: 2.1
7
- * Generated by: Swagger Codegen (https://github.com/swagger-api/swagger-codegen.git)
8
- */
9
-
10
-package hcsschema
11
-
12
-//  Options for HcsPauseComputeSystem
13
-type PauseOptions struct {
14
-	SuspensionLevel string `json:"SuspensionLevel,omitempty"`
15
-
16
-	HostedNotification *PauseNotification `json:"HostedNotification,omitempty"`
17
-}
18 1
deleted file mode 100644
... ...
@@ -1,14 +0,0 @@
1
-/*
2
- * HCS API
3
- *
4
- * No description provided (generated by Swagger Codegen https://github.com/swagger-api/swagger-codegen)
5
- *
6
- * API version: 2.1
7
- * Generated by: Swagger Codegen (https://github.com/swagger-api/swagger-codegen.git)
8
- */
9
-
10
-package hcsschema
11
-
12
-type Plan9 struct {
13
-	Shares []Plan9Share `json:"Shares,omitempty"`
14
-}
15 1
deleted file mode 100644
... ...
@@ -1,34 +0,0 @@
1
-/*
2
- * HCS API
3
- *
4
- * No description provided (generated by Swagger Codegen https://github.com/swagger-api/swagger-codegen)
5
- *
6
- * API version: 2.1
7
- * Generated by: Swagger Codegen (https://github.com/swagger-api/swagger-codegen.git)
8
- */
9
-
10
-package hcsschema
11
-
12
-type Plan9Share struct {
13
-	Name string `json:"Name,omitempty"`
14
-
15
-	//  The name by which the guest operation system can access this share, via  the aname parameter in the Plan9 protocol.
16
-	AccessName string `json:"AccessName,omitempty"`
17
-
18
-	Path string `json:"Path,omitempty"`
19
-
20
-	Port int32 `json:"Port,omitempty"`
21
-
22
-	// Flags are marked private. Until they are exported correctly
23
-	//
24
-	// ReadOnly      0x00000001
25
-	// LinuxMetadata 0x00000004
26
-	// CaseSensitive 0x00000008
27
-	Flags int32 `json:"Flags,omitempty"`
28
-
29
-	ReadOnly bool `json:"ReadOnly,omitempty"`
30
-
31
-	UseShareRootIdentity bool `json:"UseShareRootIdentity,omitempty"`
32
-
33
-	AllowedFiles []string `json:"AllowedFiles,omitempty"`
34
-}
35 1
deleted file mode 100644
... ...
@@ -1,33 +0,0 @@
1
-/*
2
- * HCS API
3
- *
4
- * No description provided (generated by Swagger Codegen https://github.com/swagger-api/swagger-codegen)
5
- *
6
- * API version: 2.1
7
- * Generated by: Swagger Codegen (https://github.com/swagger-api/swagger-codegen.git)
8
- */
9
-
10
-package hcsschema
11
-
12
-import (
13
-	"time"
14
-)
15
-
16
-//  Information about a process running in a container
17
-type ProcessDetails struct {
18
-	ProcessId int32 `json:"ProcessId,omitempty"`
19
-
20
-	ImageName string `json:"ImageName,omitempty"`
21
-
22
-	CreateTimestamp time.Time `json:"CreateTimestamp,omitempty"`
23
-
24
-	UserTime100ns int32 `json:"UserTime100ns,omitempty"`
25
-
26
-	KernelTime100ns int32 `json:"KernelTime100ns,omitempty"`
27
-
28
-	MemoryCommitBytes int32 `json:"MemoryCommitBytes,omitempty"`
29
-
30
-	MemoryWorkingSetPrivateBytes int32 `json:"MemoryWorkingSetPrivateBytes,omitempty"`
31
-
32
-	MemoryWorkingSetSharedBytes int32 `json:"MemoryWorkingSetSharedBytes,omitempty"`
33
-}
34 1
deleted file mode 100644
... ...
@@ -1,19 +0,0 @@
1
-/*
2
- * HCS API
3
- *
4
- * No description provided (generated by Swagger Codegen https://github.com/swagger-api/swagger-codegen)
5
- *
6
- * API version: 2.1
7
- * Generated by: Swagger Codegen (https://github.com/swagger-api/swagger-codegen.git)
8
- */
9
-
10
-package hcsschema
11
-
12
-//  Passed to HcsRpc_ModifyProcess
13
-type ProcessModifyRequest struct {
14
-	Operation string `json:"Operation,omitempty"`
15
-
16
-	ConsoleSize *ConsoleSize `json:"ConsoleSize,omitempty"`
17
-
18
-	CloseHandle *CloseHandle `json:"CloseHandle,omitempty"`
19
-}
20 1
deleted file mode 100644
... ...
@@ -1,46 +0,0 @@
1
-/*
2
- * HCS API
3
- *
4
- * No description provided (generated by Swagger Codegen https://github.com/swagger-api/swagger-codegen)
5
- *
6
- * API version: 2.1
7
- * Generated by: Swagger Codegen (https://github.com/swagger-api/swagger-codegen.git)
8
- */
9
-
10
-package hcsschema
11
-
12
-type ProcessParameters struct {
13
-	ApplicationName string `json:"ApplicationName,omitempty"`
14
-
15
-	CommandLine string `json:"CommandLine,omitempty"`
16
-
17
-	//  optional alternative to CommandLine, currently only supported by Linux GCS
18
-	CommandArgs []string `json:"CommandArgs,omitempty"`
19
-
20
-	User string `json:"User,omitempty"`
21
-
22
-	WorkingDirectory string `json:"WorkingDirectory,omitempty"`
23
-
24
-	Environment map[string]string `json:"Environment,omitempty"`
25
-
26
-	//  if set, will run as low-privilege process
27
-	RestrictedToken bool `json:"RestrictedToken,omitempty"`
28
-
29
-	//  if set, ignore StdErrPipe
30
-	EmulateConsole bool `json:"EmulateConsole,omitempty"`
31
-
32
-	CreateStdInPipe bool `json:"CreateStdInPipe,omitempty"`
33
-
34
-	CreateStdOutPipe bool `json:"CreateStdOutPipe,omitempty"`
35
-
36
-	CreateStdErrPipe bool `json:"CreateStdErrPipe,omitempty"`
37
-
38
-	//  height then width
39
-	ConsoleSize []int32 `json:"ConsoleSize,omitempty"`
40
-
41
-	//  if set, find an existing session for the user and create the process in it
42
-	UseExistingLogin bool `json:"UseExistingLogin,omitempty"`
43
-
44
-	//  if set, use the legacy console instead of conhost
45
-	UseLegacyConsole bool `json:"UseLegacyConsole,omitempty"`
46
-}
47 1
deleted file mode 100644
... ...
@@ -1,21 +0,0 @@
1
-/*
2
- * HCS API
3
- *
4
- * No description provided (generated by Swagger Codegen https://github.com/swagger-api/swagger-codegen)
5
- *
6
- * API version: 2.1
7
- * Generated by: Swagger Codegen (https://github.com/swagger-api/swagger-codegen.git)
8
- */
9
-
10
-package hcsschema
11
-
12
-//  Status of a process running in a container
13
-type ProcessStatus struct {
14
-	ProcessId int32 `json:"ProcessId,omitempty"`
15
-
16
-	Exited bool `json:"Exited,omitempty"`
17
-
18
-	ExitCode int32 `json:"ExitCode,omitempty"`
19
-
20
-	LastWaitResult int32 `json:"LastWaitResult,omitempty"`
21
-}
22 1
deleted file mode 100644
... ...
@@ -1,18 +0,0 @@
1
-/*
2
- * HCS API
3
- *
4
- * No description provided (generated by Swagger Codegen https://github.com/swagger-api/swagger-codegen)
5
- *
6
- * API version: 2.1
7
- * Generated by: Swagger Codegen (https://github.com/swagger-api/swagger-codegen.git)
8
- */
9
-
10
-package hcsschema
11
-
12
-type Processor struct {
13
-	Count int32 `json:"Count,omitempty"`
14
-
15
-	Maximum int32 `json:"Maximum,omitempty"`
16
-
17
-	Weight int32 `json:"Weight,omitempty"`
18
-}
19 1
deleted file mode 100644
... ...
@@ -1,20 +0,0 @@
1
-/*
2
- * HCS API
3
- *
4
- * No description provided (generated by Swagger Codegen https://github.com/swagger-api/swagger-codegen)
5
- *
6
- * API version: 2.1
7
- * Generated by: Swagger Codegen (https://github.com/swagger-api/swagger-codegen.git)
8
- */
9
-
10
-package hcsschema
11
-
12
-type Processor2 struct {
13
-	Count int32 `json:"Count,omitempty"`
14
-
15
-	Limit int32 `json:"Limit,omitempty"`
16
-
17
-	Weight int32 `json:"Weight,omitempty"`
18
-
19
-	ExposeVirtualizationExtensions bool `json:"ExposeVirtualizationExtensions,omitempty"`
20
-}
21 1
deleted file mode 100644
... ...
@@ -1,19 +0,0 @@
1
-/*
2
- * HCS API
3
- *
4
- * No description provided (generated by Swagger Codegen https://github.com/swagger-api/swagger-codegen)
5
- *
6
- * API version: 2.1
7
- * Generated by: Swagger Codegen (https://github.com/swagger-api/swagger-codegen.git)
8
- */
9
-
10
-package hcsschema
11
-
12
-//  CPU runtime statistics
13
-type ProcessorStats struct {
14
-	TotalRuntime100ns uint64 `json:"TotalRuntime100ns,omitempty"`
15
-
16
-	RuntimeUser100ns uint64 `json:"RuntimeUser100ns,omitempty"`
17
-
18
-	RuntimeKernel100ns uint64 `json:"RuntimeKernel100ns,omitempty"`
19
-}
20 1
deleted file mode 100644
... ...
@@ -1,15 +0,0 @@
1
-/*
2
- * HCS API
3
- *
4
- * No description provided (generated by Swagger Codegen https://github.com/swagger-api/swagger-codegen)
5
- *
6
- * API version: 2.4
7
- * Generated by: Swagger Codegen (https://github.com/swagger-api/swagger-codegen.git)
8
- */
9
-
10
-package hcsschema
11
-
12
-type ProcessorTopology struct {
13
-	LogicalProcessorCount uint32             `json:"LogicalProcessorCount,omitempty"`
14
-	LogicalProcessors     []LogicalProcessor `json:"LogicalProcessors,omitempty"`
15
-}
16 1
deleted file mode 100644
... ...
@@ -1,54 +0,0 @@
1
-/*
2
- * HCS API
3
- *
4
- * No description provided (generated by Swagger Codegen https://github.com/swagger-api/swagger-codegen)
5
- *
6
- * API version: 2.1
7
- * Generated by: Swagger Codegen (https://github.com/swagger-api/swagger-codegen.git)
8
- */
9
-
10
-package hcsschema
11
-
12
-import (
13
-	v1 "github.com/containerd/cgroups/stats/v1"
14
-)
15
-
16
-type Properties struct {
17
-	Id string `json:"Id,omitempty"`
18
-
19
-	SystemType string `json:"SystemType,omitempty"`
20
-
21
-	RuntimeOsType string `json:"RuntimeOsType,omitempty"`
22
-
23
-	Name string `json:"Name,omitempty"`
24
-
25
-	Owner string `json:"Owner,omitempty"`
26
-
27
-	RuntimeId string `json:"RuntimeId,omitempty"`
28
-
29
-	RuntimeTemplateId string `json:"RuntimeTemplateId,omitempty"`
30
-
31
-	State string `json:"State,omitempty"`
32
-
33
-	Stopped bool `json:"Stopped,omitempty"`
34
-
35
-	ExitType string `json:"ExitType,omitempty"`
36
-
37
-	Memory *MemoryInformationForVm `json:"Memory,omitempty"`
38
-
39
-	Statistics *Statistics `json:"Statistics,omitempty"`
40
-
41
-	ProcessList []ProcessDetails `json:"ProcessList,omitempty"`
42
-
43
-	TerminateOnLastHandleClosed bool `json:"TerminateOnLastHandleClosed,omitempty"`
44
-
45
-	HostingSystemId string `json:"HostingSystemId,omitempty"`
46
-
47
-	SharedMemoryRegionInfo []SharedMemoryRegionInfo `json:"SharedMemoryRegionInfo,omitempty"`
48
-
49
-	GuestConnectionInfo *GuestConnectionInfo `json:"GuestConnectionInfo,omitempty"`
50
-
51
-	// Metrics is not part of the API for HCS but this is used for LCOW v2 to
52
-	// return the full cgroup metrics from the guest.
53
-	Metrics *v1.Metrics `json:"LCOWMetrics,omitempty"`
54
-}
55 1
deleted file mode 100644
... ...
@@ -1,15 +0,0 @@
1
-/*
2
- * HCS API
3
- *
4
- * No description provided (generated by Swagger Codegen https://github.com/swagger-api/swagger-codegen)
5
- *
6
- * API version: 2.1
7
- * Generated by: Swagger Codegen (https://github.com/swagger-api/swagger-codegen.git)
8
- */
9
-
10
-package hcsschema
11
-
12
-//   By default the basic properties will be returned. This query provides a way to  request specific properties.
13
-type PropertyQuery struct {
14
-	PropertyTypes []PropertyType `json:"PropertyTypes,omitempty"`
15
-}
16 1
deleted file mode 100644
... ...
@@ -1,26 +0,0 @@
1
-/*
2
- * HCS API
3
- *
4
- * No description provided (generated by Swagger Codegen https://github.com/swagger-api/swagger-codegen)
5
- *
6
- * API version: 2.1
7
- * Generated by: Swagger Codegen (https://github.com/swagger-api/swagger-codegen.git)
8
- */
9
-
10
-package hcsschema
11
-
12
-type PropertyType string
13
-
14
-const (
15
-	PTMemory                      PropertyType = "Memory"
16
-	PTGuestMemory                 PropertyType = "GuestMemory"
17
-	PTStatistics                  PropertyType = "Statistics"
18
-	PTProcessList                 PropertyType = "ProcessList"
19
-	PTTerminateOnLastHandleClosed PropertyType = "TerminateOnLastHandleClosed"
20
-	PTSharedMemoryRegion          PropertyType = "SharedMemoryRegion"
21
-	PTContainerCredentialGuard    PropertyType = "ContainerCredentialGuard" // This field is not generated by swagger. This was added manually.
22
-	PTGuestConnection             PropertyType = "GuestConnection"
23
-	PTICHeartbeatStatus           PropertyType = "ICHeartbeatStatus"
24
-	PTProcessorTopology           PropertyType = "ProcessorTopology"
25
-	PTCPUGroup                    PropertyType = "CpuGroup"
26
-)
27 1
deleted file mode 100644
... ...
@@ -1,16 +0,0 @@
1
-/*
2
- * HCS API
3
- *
4
- * No description provided (generated by Swagger Codegen https://github.com/swagger-api/swagger-codegen)
5
- *
6
- * API version: 2.1
7
- * Generated by: Swagger Codegen (https://github.com/swagger-api/swagger-codegen.git)
8
- */
9
-
10
-package hcsschema
11
-
12
-type RdpConnectionOptions struct {
13
-	AccessSids []string `json:"AccessSids,omitempty"`
14
-
15
-	NamedPipe string `json:"NamedPipe,omitempty"`
16
-}
17 1
deleted file mode 100644
... ...
@@ -1,16 +0,0 @@
1
-/*
2
- * HCS API
3
- *
4
- * No description provided (generated by Swagger Codegen https://github.com/swagger-api/swagger-codegen)
5
- *
6
- * API version: 2.1
7
- * Generated by: Swagger Codegen (https://github.com/swagger-api/swagger-codegen.git)
8
- */
9
-
10
-package hcsschema
11
-
12
-type RegistryChanges struct {
13
-	AddValues []RegistryValue `json:"AddValues,omitempty"`
14
-
15
-	DeleteKeys []RegistryKey `json:"DeleteKeys,omitempty"`
16
-}
17 1
deleted file mode 100644
... ...
@@ -1,18 +0,0 @@
1
-/*
2
- * HCS API
3
- *
4
- * No description provided (generated by Swagger Codegen https://github.com/swagger-api/swagger-codegen)
5
- *
6
- * API version: 2.1
7
- * Generated by: Swagger Codegen (https://github.com/swagger-api/swagger-codegen.git)
8
- */
9
-
10
-package hcsschema
11
-
12
-type RegistryKey struct {
13
-	Hive string `json:"Hive,omitempty"`
14
-
15
-	Name string `json:"Name,omitempty"`
16
-
17
-	Volatile bool `json:"Volatile,omitempty"`
18
-}
19 1
deleted file mode 100644
... ...
@@ -1,30 +0,0 @@
1
-/*
2
- * HCS API
3
- *
4
- * No description provided (generated by Swagger Codegen https://github.com/swagger-api/swagger-codegen)
5
- *
6
- * API version: 2.1
7
- * Generated by: Swagger Codegen (https://github.com/swagger-api/swagger-codegen.git)
8
- */
9
-
10
-package hcsschema
11
-
12
-type RegistryValue struct {
13
-	Key *RegistryKey `json:"Key,omitempty"`
14
-
15
-	Name string `json:"Name,omitempty"`
16
-
17
-	Type_ string `json:"Type,omitempty"`
18
-
19
-	//  One and only one value type must be set.
20
-	StringValue string `json:"StringValue,omitempty"`
21
-
22
-	BinaryValue string `json:"BinaryValue,omitempty"`
23
-
24
-	DWordValue int32 `json:"DWordValue,omitempty"`
25
-
26
-	QWordValue int32 `json:"QWordValue,omitempty"`
27
-
28
-	//  Only used if RegistryValueType is CustomType  The data is in BinaryValue
29
-	CustomType int32 `json:"CustomType,omitempty"`
30
-}
31 1
deleted file mode 100644
... ...
@@ -1,19 +0,0 @@
1
-/*
2
- * HCS API
3
- *
4
- * No description provided (generated by Swagger Codegen https://github.com/swagger-api/swagger-codegen)
5
- *
6
- * API version: 2.1
7
- * Generated by: Swagger Codegen (https://github.com/swagger-api/swagger-codegen.git)
8
- */
9
-
10
-package hcsschema
11
-
12
-type RestoreState struct {
13
-
14
-	//  The path to the save state file to restore the system from.
15
-	SaveStateFilePath string `json:"SaveStateFilePath,omitempty"`
16
-
17
-	//  The ID of the template system to clone this new system off of. An empty  string indicates the system should not be cloned from a template.
18
-	TemplateSystemId string `json:"TemplateSystemId,omitempty"`
19
-}
20 1
deleted file mode 100644
... ...
@@ -1,19 +0,0 @@
1
-/*
2
- * HCS API
3
- *
4
- * No description provided (generated by Swagger Codegen https://github.com/swagger-api/swagger-codegen)
5
- *
6
- * API version: 2.1
7
- * Generated by: Swagger Codegen (https://github.com/swagger-api/swagger-codegen.git)
8
- */
9
-
10
-package hcsschema
11
-
12
-type SaveOptions struct {
13
-
14
-	//  The type of save operation to be performed.
15
-	SaveType string `json:"SaveType,omitempty"`
16
-
17
-	//  The path to the file that will container the saved state.
18
-	SaveStateFilePath string `json:"SaveStateFilePath,omitempty"`
19
-}
20 1
deleted file mode 100644
... ...
@@ -1,16 +0,0 @@
1
-/*
2
- * HCS API
3
- *
4
- * No description provided (generated by Swagger Codegen https://github.com/swagger-api/swagger-codegen)
5
- *
6
- * API version: 2.1
7
- * Generated by: Swagger Codegen (https://github.com/swagger-api/swagger-codegen.git)
8
- */
9
-
10
-package hcsschema
11
-
12
-type Scsi struct {
13
-
14
-	//  Map of attachments, where the key is the integer LUN number on the controller.
15
-	Attachments map[string]Attachment `json:"Attachments,omitempty"`
16
-}
17 1
deleted file mode 100644
... ...
@@ -1,18 +0,0 @@
1
-/*
2
- * HCS API
3
- *
4
- * No description provided (generated by Swagger Codegen https://github.com/swagger-api/swagger-codegen)
5
- *
6
- * API version: 2.4
7
- * Generated by: Swagger Codegen (https://github.com/swagger-api/swagger-codegen.git)
8
- */
9
-
10
-package hcsschema
11
-
12
-import "encoding/json"
13
-
14
-type ServiceProperties struct {
15
-	// Changed Properties field to []json.RawMessage from []interface{} to avoid having to
16
-	// remarshal sp.Properties[n] and unmarshal into the type(s) we want.
17
-	Properties []json.RawMessage `json:"Properties,omitempty"`
18
-}
19 1
deleted file mode 100644
... ...
@@ -1,14 +0,0 @@
1
-/*
2
- * HCS API
3
- *
4
- * No description provided (generated by Swagger Codegen https://github.com/swagger-api/swagger-codegen)
5
- *
6
- * API version: 2.1
7
- * Generated by: Swagger Codegen (https://github.com/swagger-api/swagger-codegen.git)
8
- */
9
-
10
-package hcsschema
11
-
12
-type SharedMemoryConfiguration struct {
13
-	Regions []SharedMemoryRegion `json:"Regions,omitempty"`
14
-}
15 1
deleted file mode 100644
... ...
@@ -1,22 +0,0 @@
1
-/*
2
- * HCS API
3
- *
4
- * No description provided (generated by Swagger Codegen https://github.com/swagger-api/swagger-codegen)
5
- *
6
- * API version: 2.1
7
- * Generated by: Swagger Codegen (https://github.com/swagger-api/swagger-codegen.git)
8
- */
9
-
10
-package hcsschema
11
-
12
-type SharedMemoryRegion struct {
13
-	SectionName string `json:"SectionName,omitempty"`
14
-
15
-	StartOffset int32 `json:"StartOffset,omitempty"`
16
-
17
-	Length int32 `json:"Length,omitempty"`
18
-
19
-	AllowGuestWrite bool `json:"AllowGuestWrite,omitempty"`
20
-
21
-	HiddenFromGuest bool `json:"HiddenFromGuest,omitempty"`
22
-}
23 1
deleted file mode 100644
... ...
@@ -1,16 +0,0 @@
1
-/*
2
- * HCS API
3
- *
4
- * No description provided (generated by Swagger Codegen https://github.com/swagger-api/swagger-codegen)
5
- *
6
- * API version: 2.1
7
- * Generated by: Swagger Codegen (https://github.com/swagger-api/swagger-codegen.git)
8
- */
9
-
10
-package hcsschema
11
-
12
-type SharedMemoryRegionInfo struct {
13
-	SectionName string `json:"SectionName,omitempty"`
14
-
15
-	GuestPhysicalAddress int32 `json:"GuestPhysicalAddress,omitempty"`
16
-}
17 1
deleted file mode 100644
... ...
@@ -1,17 +0,0 @@
1
-/*
2
- * HCS API
3
- *
4
- * No description provided (generated by Swagger Codegen https://github.com/swagger-api/swagger-codegen)
5
- *
6
- * API version: 2.1
7
- * Generated by: Swagger Codegen (https://github.com/swagger-api/swagger-codegen.git)
8
- */
9
-
10
-package hcsschema
11
-
12
-//  Silo job information
13
-type SiloProperties struct {
14
-	Enabled bool `json:"Enabled,omitempty"`
15
-
16
-	JobName string `json:"JobName,omitempty"`
17
-}
18 1
deleted file mode 100644
... ...
@@ -1,29 +0,0 @@
1
-/*
2
- * HCS API
3
- *
4
- * No description provided (generated by Swagger Codegen https://github.com/swagger-api/swagger-codegen)
5
- *
6
- * API version: 2.1
7
- * Generated by: Swagger Codegen (https://github.com/swagger-api/swagger-codegen.git)
8
- */
9
-
10
-package hcsschema
11
-
12
-import (
13
-	"time"
14
-)
15
-
16
-//  Runtime statistics for a container
17
-type Statistics struct {
18
-	Timestamp time.Time `json:"Timestamp,omitempty"`
19
-
20
-	ContainerStartTime time.Time `json:"ContainerStartTime,omitempty"`
21
-
22
-	Uptime100ns uint64 `json:"Uptime100ns,omitempty"`
23
-
24
-	Processor *ProcessorStats `json:"Processor,omitempty"`
25
-
26
-	Memory *MemoryStats `json:"Memory,omitempty"`
27
-
28
-	Storage *StorageStats `json:"Storage,omitempty"`
29
-}
30 1
deleted file mode 100644
... ...
@@ -1,21 +0,0 @@
1
-/*
2
- * HCS API
3
- *
4
- * No description provided (generated by Swagger Codegen https://github.com/swagger-api/swagger-codegen)
5
- *
6
- * API version: 2.1
7
- * Generated by: Swagger Codegen (https://github.com/swagger-api/swagger-codegen.git)
8
- */
9
-
10
-package hcsschema
11
-
12
-type Storage struct {
13
-
14
-	//  List of layers that describe the parent hierarchy for a container's  storage. These layers combined together, presented as a disposable  and/or committable working storage, are used by the container to  record all changes done to the parent layers.
15
-	Layers []Layer `json:"Layers,omitempty"`
16
-
17
-	//  Path that points to the scratch space of a container, where parent  layers are combined together to present a new disposable and/or committable  layer with the changes done during its runtime.
18
-	Path string `json:"Path,omitempty"`
19
-
20
-	QoS *StorageQoS `json:"QoS,omitempty"`
21
-}
22 1
deleted file mode 100644
... ...
@@ -1,16 +0,0 @@
1
-/*
2
- * HCS API
3
- *
4
- * No description provided (generated by Swagger Codegen https://github.com/swagger-api/swagger-codegen)
5
- *
6
- * API version: 2.1
7
- * Generated by: Swagger Codegen (https://github.com/swagger-api/swagger-codegen.git)
8
- */
9
-
10
-package hcsschema
11
-
12
-type StorageQoS struct {
13
-	IopsMaximum int32 `json:"IopsMaximum,omitempty"`
14
-
15
-	BandwidthMaximum int32 `json:"BandwidthMaximum,omitempty"`
16
-}
17 1
deleted file mode 100644
... ...
@@ -1,21 +0,0 @@
1
-/*
2
- * HCS API
3
- *
4
- * No description provided (generated by Swagger Codegen https://github.com/swagger-api/swagger-codegen)
5
- *
6
- * API version: 2.1
7
- * Generated by: Swagger Codegen (https://github.com/swagger-api/swagger-codegen.git)
8
- */
9
-
10
-package hcsschema
11
-
12
-//  Storage runtime statistics
13
-type StorageStats struct {
14
-	ReadCountNormalized uint64 `json:"ReadCountNormalized,omitempty"`
15
-
16
-	ReadSizeBytes uint64 `json:"ReadSizeBytes,omitempty"`
17
-
18
-	WriteCountNormalized uint64 `json:"WriteCountNormalized,omitempty"`
19
-
20
-	WriteSizeBytes uint64 `json:"WriteSizeBytes,omitempty"`
21
-}
22 1
deleted file mode 100644
... ...
@@ -1,16 +0,0 @@
1
-/*
2
- * HCS API
3
- *
4
- * No description provided (generated by Swagger Codegen https://github.com/swagger-api/swagger-codegen)
5
- *
6
- * API version: 2.1
7
- * Generated by: Swagger Codegen (https://github.com/swagger-api/swagger-codegen.git)
8
- */
9
-
10
-package hcsschema
11
-
12
-type Topology struct {
13
-	Memory *Memory2 `json:"Memory,omitempty"`
14
-
15
-	Processor *Processor2 `json:"Processor,omitempty"`
16
-}
17 1
deleted file mode 100644
... ...
@@ -1,20 +0,0 @@
1
-/*
2
- * HCS API
3
- *
4
- * No description provided (generated by Swagger Codegen https://github.com/swagger-api/swagger-codegen)
5
- *
6
- * API version: 2.1
7
- * Generated by: Swagger Codegen (https://github.com/swagger-api/swagger-codegen.git)
8
- */
9
-
10
-package hcsschema
11
-
12
-type Uefi struct {
13
-	EnableDebugger bool `json:"EnableDebugger,omitempty"`
14
-
15
-	SecureBootTemplateId string `json:"SecureBootTemplateId,omitempty"`
16
-
17
-	BootThis *UefiBootEntry `json:"BootThis,omitempty"`
18
-
19
-	Console string `json:"Console,omitempty"`
20
-}
21 1
deleted file mode 100644
... ...
@@ -1,22 +0,0 @@
1
-/*
2
- * HCS API
3
- *
4
- * No description provided (generated by Swagger Codegen https://github.com/swagger-api/swagger-codegen)
5
- *
6
- * API version: 2.1
7
- * Generated by: Swagger Codegen (https://github.com/swagger-api/swagger-codegen.git)
8
- */
9
-
10
-package hcsschema
11
-
12
-type UefiBootEntry struct {
13
-	DeviceType string `json:"DeviceType,omitempty"`
14
-
15
-	DevicePath string `json:"DevicePath,omitempty"`
16
-
17
-	DiskNumber int32 `json:"DiskNumber,omitempty"`
18
-
19
-	OptionalData string `json:"OptionalData,omitempty"`
20
-
21
-	VmbFsRootPath string `json:"VmbFsRootPath,omitempty"`
22
-}
23 1
deleted file mode 100644
... ...
@@ -1,16 +0,0 @@
1
-/*
2
- * HCS API
3
- *
4
- * No description provided (generated by Swagger Codegen https://github.com/swagger-api/swagger-codegen)
5
- *
6
- * API version: 2.1
7
- * Generated by: Swagger Codegen (https://github.com/swagger-api/swagger-codegen.git)
8
- */
9
-
10
-package hcsschema
11
-
12
-type Version struct {
13
-	Major int32 `json:"Major,omitempty"`
14
-
15
-	Minor int32 `json:"Minor,omitempty"`
16
-}
17 1
deleted file mode 100644
... ...
@@ -1,18 +0,0 @@
1
-/*
2
- * HCS API
3
- *
4
- * No description provided (generated by Swagger Codegen https://github.com/swagger-api/swagger-codegen)
5
- *
6
- * API version: 2.1
7
- * Generated by: Swagger Codegen (https://github.com/swagger-api/swagger-codegen.git)
8
- */
9
-
10
-package hcsschema
11
-
12
-type VideoMonitor struct {
13
-	HorizontalResolution int32 `json:"HorizontalResolution,omitempty"`
14
-
15
-	VerticalResolution int32 `json:"VerticalResolution,omitempty"`
16
-
17
-	ConnectionOptions *RdpConnectionOptions `json:"ConnectionOptions,omitempty"`
18
-}
19 1
deleted file mode 100644
... ...
@@ -1,32 +0,0 @@
1
-/*
2
- * HCS API
3
- *
4
- * No description provided (generated by Swagger Codegen https://github.com/swagger-api/swagger-codegen)
5
- *
6
- * API version: 2.1
7
- * Generated by: Swagger Codegen (https://github.com/swagger-api/swagger-codegen.git)
8
- */
9
-
10
-package hcsschema
11
-
12
-type VirtualMachine struct {
13
-
14
-	// StopOnReset is private in the schema. If regenerated need to put back.
15
-	StopOnReset bool `json:"StopOnReset,omitempty"`
16
-
17
-	Chipset *Chipset `json:"Chipset,omitempty"`
18
-
19
-	ComputeTopology *Topology `json:"ComputeTopology,omitempty"`
20
-
21
-	Devices *Devices `json:"Devices,omitempty"`
22
-
23
-	GuestState *GuestState `json:"GuestState,omitempty"`
24
-
25
-	RestoreState *RestoreState `json:"RestoreState,omitempty"`
26
-
27
-	RegistryChanges *RegistryChanges `json:"RegistryChanges,omitempty"`
28
-
29
-	StorageQoS *StorageQoS `json:"StorageQoS,omitempty"`
30
-
31
-	GuestConnection *GuestConnection `json:"GuestConnection,omitempty"`
32
-}
33 1
deleted file mode 100644
... ...
@@ -1,20 +0,0 @@
1
-/*
2
- * HCS API
3
- *
4
- * No description provided (generated by Swagger Codegen https://github.com/swagger-api/swagger-codegen)
5
- *
6
- * API version: 2.1
7
- * Generated by: Swagger Codegen (https://github.com/swagger-api/swagger-codegen.git)
8
- */
9
-
10
-package hcsschema
11
-
12
-type VirtualNodeInfo struct {
13
-	VirtualNodeIndex int32 `json:"VirtualNodeIndex,omitempty"`
14
-
15
-	PhysicalNodeNumber int32 `json:"PhysicalNodeNumber,omitempty"`
16
-
17
-	VirtualProcessorCount int32 `json:"VirtualProcessorCount,omitempty"`
18
-
19
-	MemoryUsageInPages int32 `json:"MemoryUsageInPages,omitempty"`
20
-}
21 1
deleted file mode 100644
... ...
@@ -1,20 +0,0 @@
1
-/*
2
- * HCS API
3
- *
4
- * No description provided (generated by Swagger Codegen https://github.com/swagger-api/swagger-codegen)
5
- *
6
- * API version: 2.1
7
- * Generated by: Swagger Codegen (https://github.com/swagger-api/swagger-codegen.git)
8
- */
9
-
10
-package hcsschema
11
-
12
-type VirtualPMemController struct {
13
-	Devices map[string]VirtualPMemDevice `json:"Devices,omitempty"`
14
-
15
-	MaximumCount uint32 `json:"MaximumCount,omitempty"`
16
-
17
-	MaximumSizeBytes uint64 `json:"MaximumSizeBytes,omitempty"`
18
-
19
-	Backing string `json:"Backing,omitempty"`
20
-}
21 1
deleted file mode 100644
... ...
@@ -1,18 +0,0 @@
1
-/*
2
- * HCS API
3
- *
4
- * No description provided (generated by Swagger Codegen https://github.com/swagger-api/swagger-codegen)
5
- *
6
- * API version: 2.1
7
- * Generated by: Swagger Codegen (https://github.com/swagger-api/swagger-codegen.git)
8
- */
9
-
10
-package hcsschema
11
-
12
-type VirtualPMemDevice struct {
13
-	HostPath string `json:"HostPath,omitempty"`
14
-
15
-	ReadOnly bool `json:"ReadOnly,omitempty"`
16
-
17
-	ImageFormat string `json:"ImageFormat,omitempty"`
18
-}
19 1
deleted file mode 100644
... ...
@@ -1,16 +0,0 @@
1
-/*
2
- * HCS API
3
- *
4
- * No description provided (generated by Swagger Codegen https://github.com/swagger-api/swagger-codegen)
5
- *
6
- * API version: 2.3
7
- * Generated by: Swagger Codegen (https://github.com/swagger-api/swagger-codegen.git)
8
- */
9
-
10
-package hcsschema
11
-
12
-// TODO: This is pre-release support in schema 2.3. Need to add build number
13
-// docs when a public build with this is out.
14
-type VirtualPciDevice struct {
15
-	Functions []VirtualPciFunction `json:",omitempty"`
16
-}
17 1
deleted file mode 100644
... ...
@@ -1,18 +0,0 @@
1
-/*
2
- * HCS API
3
- *
4
- * No description provided (generated by Swagger Codegen https://github.com/swagger-api/swagger-codegen)
5
- *
6
- * API version: 2.3
7
- * Generated by: Swagger Codegen (https://github.com/swagger-api/swagger-codegen.git)
8
- */
9
-
10
-package hcsschema
11
-
12
-// TODO: This is pre-release support in schema 2.3. Need to add build number
13
-// docs when a public build with this is out.
14
-type VirtualPciFunction struct {
15
-	DeviceInstancePath string `json:",omitempty"`
16
-
17
-	VirtualFunction uint16 `json:",omitempty"`
18
-}
19 1
deleted file mode 100644
... ...
@@ -1,16 +0,0 @@
1
-/*
2
- * HCS API
3
- *
4
- * No description provided (generated by Swagger Codegen https://github.com/swagger-api/swagger-codegen)
5
- *
6
- * API version: 2.1
7
- * Generated by: Swagger Codegen (https://github.com/swagger-api/swagger-codegen.git)
8
- */
9
-
10
-package hcsschema
11
-
12
-type VirtualSmb struct {
13
-	Shares []VirtualSmbShare `json:"Shares,omitempty"`
14
-
15
-	DirectFileMappingInMB int64 `json:"DirectFileMappingInMB,omitempty"`
16
-}
17 1
deleted file mode 100644
... ...
@@ -1,20 +0,0 @@
1
-/*
2
- * HCS API
3
- *
4
- * No description provided (generated by Swagger Codegen https://github.com/swagger-api/swagger-codegen)
5
- *
6
- * API version: 2.1
7
- * Generated by: Swagger Codegen (https://github.com/swagger-api/swagger-codegen.git)
8
- */
9
-
10
-package hcsschema
11
-
12
-type VirtualSmbShare struct {
13
-	Name string `json:"Name,omitempty"`
14
-
15
-	Path string `json:"Path,omitempty"`
16
-
17
-	AllowedFiles []string `json:"AllowedFiles,omitempty"`
18
-
19
-	Options *VirtualSmbShareOptions `json:"Options,omitempty"`
20
-}
21 1
deleted file mode 100644
... ...
@@ -1,62 +0,0 @@
1
-/*
2
- * HCS API
3
- *
4
- * No description provided (generated by Swagger Codegen https://github.com/swagger-api/swagger-codegen)
5
- *
6
- * API version: 2.1
7
- * Generated by: Swagger Codegen (https://github.com/swagger-api/swagger-codegen.git)
8
- */
9
-
10
-package hcsschema
11
-
12
-type VirtualSmbShareOptions struct {
13
-	ReadOnly bool `json:"ReadOnly,omitempty"`
14
-
15
-	//  convert exclusive access to shared read access
16
-	ShareRead bool `json:"ShareRead,omitempty"`
17
-
18
-	//  all opens will use cached I/O
19
-	CacheIo bool `json:"CacheIo,omitempty"`
20
-
21
-	//  disable oplock support
22
-	NoOplocks bool `json:"NoOplocks,omitempty"`
23
-
24
-	//  Acquire the backup privilege when attempting to open
25
-	TakeBackupPrivilege bool `json:"TakeBackupPrivilege,omitempty"`
26
-
27
-	//  Use the identity of the share root when opening
28
-	UseShareRootIdentity bool `json:"UseShareRootIdentity,omitempty"`
29
-
30
-	//  disable Direct Mapping
31
-	NoDirectmap bool `json:"NoDirectmap,omitempty"`
32
-
33
-	//  disable Byterange locks
34
-	NoLocks bool `json:"NoLocks,omitempty"`
35
-
36
-	//  disable Directory CHange Notifications
37
-	NoDirnotify bool `json:"NoDirnotify,omitempty"`
38
-
39
-	//  share is use for VM shared memory
40
-	VmSharedMemory bool `json:"VmSharedMemory,omitempty"`
41
-
42
-	//  allow access only to the files specified in AllowedFiles
43
-	RestrictFileAccess bool `json:"RestrictFileAccess,omitempty"`
44
-
45
-	//  disable all oplocks except Level II
46
-	ForceLevelIIOplocks bool `json:"ForceLevelIIOplocks,omitempty"`
47
-
48
-	//  Allow the host to reparse this base layer
49
-	ReparseBaseLayer bool `json:"ReparseBaseLayer,omitempty"`
50
-
51
-	//  Enable pseudo-oplocks
52
-	PseudoOplocks bool `json:"PseudoOplocks,omitempty"`
53
-
54
-	//  All opens will use non-cached IO
55
-	NonCacheIo bool `json:"NonCacheIo,omitempty"`
56
-
57
-	//  Enable pseudo directory change notifications
58
-	PseudoDirnotify bool `json:"PseudoDirnotify,omitempty"`
59
-
60
-	//  Block directory enumeration, renames, and deletes.
61
-	SingleFileMapping bool `json:"SingleFileMapping,omitempty"`
62
-}
63 1
deleted file mode 100644
... ...
@@ -1,26 +0,0 @@
1
-/*
2
- * HCS API
3
- *
4
- * No description provided (generated by Swagger Codegen https://github.com/swagger-api/swagger-codegen)
5
- *
6
- * API version: 2.1
7
- * Generated by: Swagger Codegen (https://github.com/swagger-api/swagger-codegen.git)
8
- */
9
-
10
-package hcsschema
11
-
12
-type VmMemory struct {
13
-	AvailableMemory int32 `json:"AvailableMemory,omitempty"`
14
-
15
-	AvailableMemoryBuffer int32 `json:"AvailableMemoryBuffer,omitempty"`
16
-
17
-	ReservedMemory uint64 `json:"ReservedMemory,omitempty"`
18
-
19
-	AssignedMemory uint64 `json:"AssignedMemory,omitempty"`
20
-
21
-	SlpActive bool `json:"SlpActive,omitempty"`
22
-
23
-	BalancingEnabled bool `json:"BalancingEnabled,omitempty"`
24
-
25
-	DmOperationInProgress bool `json:"DmOperationInProgress,omitempty"`
26
-}
27 1
deleted file mode 100644
... ...
@@ -1,22 +0,0 @@
1
-/*
2
- * HCS API
3
- *
4
- * No description provided (generated by Swagger Codegen https://github.com/swagger-api/swagger-codegen)
5
- *
6
- * API version: 2.4
7
- * Generated by: Swagger Codegen (https://github.com/swagger-api/swagger-codegen.git)
8
- */
9
-
10
-package hcsschema
11
-
12
-// ProcessorLimits is used when modifying processor scheduling limits of a virtual machine.
13
-type ProcessorLimits struct {
14
-	// Maximum amount of host CPU resources that the virtual machine can use.
15
-	Limit uint64 `json:"Limit,omitempty"`
16
-	// Value describing the relative priority of this virtual machine compared to other virtual machines.
17
-	Weight uint64 `json:"Weight,omitempty"`
18
-	// Minimum amount of host CPU resources that the virtual machine is guaranteed.
19
-	Reservation uint64 `json:"Reservation,omitempty"`
20
-	// Provides the target maximum CPU frequency, in MHz, for a virtual machine.
21
-	MaximumFrequencyMHz uint32 `json:"MaximumFrequencyMHz,omitempty"`
22
-}
23 1
deleted file mode 100644
... ...
@@ -1,16 +0,0 @@
1
-/*
2
- * HCS API
3
- *
4
- * No description provided (generated by Swagger Codegen https://github.com/swagger-api/swagger-codegen)
5
- *
6
- * API version: 2.1
7
- * Generated by: Swagger Codegen (https://github.com/swagger-api/swagger-codegen.git)
8
- */
9
-
10
-package hcsschema
11
-
12
-type WindowsCrashReporting struct {
13
-	DumpFileName string `json:"DumpFileName,omitempty"`
14
-
15
-	MaxDumpSize int64 `json:"MaxDumpSize,omitempty"`
16
-}
... ...
@@ -30,7 +30,7 @@ func ExpandScratchSize(ctx context.Context, path string, size uint64) (err error
30 30
 
31 31
 	// Manually expand the volume now in order to work around bugs in 19H1 and
32 32
 	// prerelease versions of Vb. Remove once this is fixed in Windows.
33
-	if build := osversion.Get().Build; build >= osversion.V19H1 && build < 19020 {
33
+	if build := osversion.Build(); build >= osversion.V19H1 && build < 19020 {
34 34
 		err = expandSandboxVolume(ctx, path)
35 35
 		if err != nil {
36 36
 			return err
... ...
@@ -2,6 +2,7 @@ package osversion
2 2
 
3 3
 import (
4 4
 	"fmt"
5
+	"sync"
5 6
 
6 7
 	"golang.org/x/sys/windows"
7 8
 )
... ...
@@ -15,19 +16,26 @@ type OSVersion struct {
15 15
 	Build        uint16
16 16
 }
17 17
 
18
+var (
19
+	osv  OSVersion
20
+	once sync.Once
21
+)
22
+
18 23
 // Get gets the operating system version on Windows.
19 24
 // The calling application must be manifested to get the correct version information.
20 25
 func Get() OSVersion {
21
-	var err error
22
-	osv := OSVersion{}
23
-	osv.Version, err = windows.GetVersion()
24
-	if err != nil {
25
-		// GetVersion never fails.
26
-		panic(err)
27
-	}
28
-	osv.MajorVersion = uint8(osv.Version & 0xFF)
29
-	osv.MinorVersion = uint8(osv.Version >> 8 & 0xFF)
30
-	osv.Build = uint16(osv.Version >> 16)
26
+	once.Do(func() {
27
+		var err error
28
+		osv = OSVersion{}
29
+		osv.Version, err = windows.GetVersion()
30
+		if err != nil {
31
+			// GetVersion never fails.
32
+			panic(err)
33
+		}
34
+		osv.MajorVersion = uint8(osv.Version & 0xFF)
35
+		osv.MinorVersion = uint8(osv.Version >> 8 & 0xFF)
36
+		osv.Build = uint16(osv.Version >> 16)
37
+	})
31 38
 	return osv
32 39
 }
33 40