-
Notifications
You must be signed in to change notification settings - Fork 14
/
v3_structs.go
2764 lines (2193 loc) · 135 KB
/
v3_structs.go
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
675
676
677
678
679
680
681
682
683
684
685
686
687
688
689
690
691
692
693
694
695
696
697
698
699
700
701
702
703
704
705
706
707
708
709
710
711
712
713
714
715
716
717
718
719
720
721
722
723
724
725
726
727
728
729
730
731
732
733
734
735
736
737
738
739
740
741
742
743
744
745
746
747
748
749
750
751
752
753
754
755
756
757
758
759
760
761
762
763
764
765
766
767
768
769
770
771
772
773
774
775
776
777
778
779
780
781
782
783
784
785
786
787
788
789
790
791
792
793
794
795
796
797
798
799
800
801
802
803
804
805
806
807
808
809
810
811
812
813
814
815
816
817
818
819
820
821
822
823
824
825
826
827
828
829
830
831
832
833
834
835
836
837
838
839
840
841
842
843
844
845
846
847
848
849
850
851
852
853
854
855
856
857
858
859
860
861
862
863
864
865
866
867
868
869
870
871
872
873
874
875
876
877
878
879
880
881
882
883
884
885
886
887
888
889
890
891
892
893
894
895
896
897
898
899
900
901
902
903
904
905
906
907
908
909
910
911
912
913
914
915
916
917
918
919
920
921
922
923
924
925
926
927
928
929
930
931
932
933
934
935
936
937
938
939
940
941
942
943
944
945
946
947
948
949
950
951
952
953
954
955
956
957
958
959
960
961
962
963
964
965
966
967
968
969
970
971
972
973
974
975
976
977
978
979
980
981
982
983
984
985
986
987
988
989
990
991
992
993
994
995
996
997
998
999
1000
package v3
import (
"time"
"github.com/nutanix-cloud-native/prism-go-client"
)
// Reference ...
type Reference struct {
Kind *string `json:"kind" mapstructure:"kind"`
Name *string `json:"name,omitempty" mapstructure:"name,omitempty"`
UUID *string `json:"uuid" mapstructure:"uuid"`
}
// VMVnumaConfig Indicates how VM vNUMA should be configured
type VMVnumaConfig struct {
// Number of vNUMA nodes. 0 means vNUMA is disabled.
NumVnumaNodes *int64 `json:"num_vnuma_nodes,omitempty" mapstructure:"num_vnuma_nodes,omitempty"`
}
type VMSerialPort struct {
Index *int64 `json:"index,omitempty" mapstructure:"index,omitempty"`
IsConnected *bool `json:"is_connected,omitempty" mapstructure:"is_connected,omitempty"`
}
// IPAddress An IP address.
type IPAddress struct {
// Address *string.
IP *string `json:"ip,omitempty" mapstructure:"ip,omitempty"`
// Address type. It can only be \"ASSIGNED\" in the spec. If no type is specified in the spec, the default type is
// set to \"ASSIGNED\".
Type *string `json:"type,omitempty" mapstructure:"type,omitempty"`
}
// VMNic Virtual Machine NIC.
type VMNic struct {
// IP endpoints for the adapter. Currently, IPv4 addresses are supported.
IPEndpointList []*IPAddress `json:"ip_endpoint_list,omitempty" mapstructure:"ip_endpoint_list,omitempty"`
// The MAC address for the adapter.
MacAddress *string `json:"mac_address,omitempty" mapstructure:"mac_address,omitempty"`
// The model of this NIC.
Model *string `json:"model,omitempty" mapstructure:"model,omitempty"`
NetworkFunctionChainReference *Reference `json:"network_function_chain_reference,omitempty" mapstructure:"network_function_chain_reference,omitempty"`
// The number of queues for this NIC
NumQueues *int64 `json:"num_queues,omitempty" mapstructure:"num_queues,omitempty"`
// The type of this Network function NIC. Defaults to INGRESS.
NetworkFunctionNicType *string `json:"network_function_nic_type,omitempty" mapstructure:"network_function_nic_type,omitempty"`
// The type of this NIC. Defaults to NORMAL_NIC.
NicType *string `json:"nic_type,omitempty" mapstructure:"nic_type,omitempty"`
SubnetReference *Reference `json:"subnet_reference,omitempty" mapstructure:"subnet_reference,omitempty"`
// The NIC's UUID, which is used to uniquely identify this particular NIC. This UUID may be used to refer to the NIC
// outside the context of the particular VM it is attached to.
UUID *string `json:"uuid,omitempty" mapstructure:"uuid,omitempty"`
IsConnected *bool `json:"is_connected,omitempty" mapstructure:"is_connected,omitempty"`
}
// DiskAddress Disk Address.
type DiskAddress struct {
AdapterType *string `json:"adapter_type,omitempty" mapstructure:"adapter_type,omitempty"`
DeviceIndex *int64 `json:"device_index,omitempty" mapstructure:"device_index,omitempty"`
}
// VMBootDevice Indicates which device a VM should boot from. One of disk_address or mac_address should be provided.
type VMBootDevice struct {
// Address of disk to boot from.
DiskAddress *DiskAddress `json:"disk_address,omitempty" mapstructure:"disk_address,omitempty"`
// MAC address of nic to boot from.
MacAddress *string `json:"mac_address,omitempty" mapstructure:"mac_address,omitempty"`
}
// VMBootConfig Indicates which device a VM should boot from.
type VMBootConfig struct {
// Indicates which device a VM should boot from. Boot device takes precdence over boot device order. If both are
// given then specified boot device will be primary boot device and remaining devices will be assigned boot order
// according to boot device order field.
BootDevice *VMBootDevice `json:"boot_device,omitempty" mapstructure:"boot_device,omitempty"`
BootType *string `json:"boot_type,omitempty" mapstructure:"boot_type,omitempty"`
// Indicates the order of device types in which VM should try to boot from. If boot device order is not provided the
// system will decide appropriate boot device order.
BootDeviceOrderList []*string `json:"boot_device_order_list,omitempty" mapstructure:"boot_device_order_list,omitempty"`
}
// NutanixGuestToolsSpec Information regarding Nutanix Guest Tools.
type NutanixGuestToolsSpec struct {
State *string `json:"state,omitempty" mapstructure:"state,omitempty"` // Nutanix Guest Tools is enabled or not.
Version *string `json:"version,omitempty" mapstructure:"version,omitempty"` // Version of Nutanix Guest Tools installed on the VM.
NgtState *string `json:"ngt_state,omitempty" mapstructure:"ngt_state,omitempty"` // Nutanix Guest Tools installed or not.
Credentials map[string]string `json:"credentials,omitempty" mapstructure:"credentials,omitempty"` // Credentials to login server
IsoMountState *string `json:"iso_mount_state,omitempty" mapstructure:"iso_mount_state,omitempty"` // Desired mount state of Nutanix Guest Tools ISO.
EnabledCapabilityList []*string `json:"enabled_capability_list,omitempty" mapstructure:"enabled_capability_list,omitempty"` // Application names that are enabled.
}
// GuestToolsSpec Information regarding guest tools.
type GuestToolsSpec struct {
// Nutanix Guest Tools information
NutanixGuestTools *NutanixGuestToolsSpec `json:"nutanix_guest_tools,omitempty" mapstructure:"nutanix_guest_tools,omitempty"`
}
// VMGpu Graphics resource information for the Virtual Machine.
type VMGpu struct {
// The device ID of the GPU.
DeviceID *int64 `json:"device_id,omitempty" mapstructure:"device_id,omitempty"`
// The mode of this GPU.
Mode *string `json:"mode,omitempty" mapstructure:"mode,omitempty"`
// The vendor of the GPU.
Vendor *string `json:"vendor,omitempty" mapstructure:"vendor,omitempty"`
}
// GuestCustomizationCloudInit If this field is set, the guest will be customized using cloud-init. Either user_data or
// custom_key_values should be provided. If custom_key_ves are provided then the user data will be generated using these
// key-value pairs.
type GuestCustomizationCloudInit struct {
// Generic key value pair used for custom attributes
CustomKeyValues map[string]string `json:"custom_key_values,omitempty" mapstructure:"custom_key_values,omitempty"`
// The contents of the meta_data configuration for cloud-init. This can be formatted as YAML or JSON. The value must
// be base64 encoded.
MetaData *string `json:"meta_data,omitempty" mapstructure:"meta_data,omitempty"`
// The contents of the user_data configuration for cloud-init. This can be formatted as YAML, JSON, or could be a
// shell script. The value must be base64 encoded.
UserData *string `json:"user_data,omitempty" mapstructure:"user_data,omitempty"`
}
// GuestCustomizationSysprep If this field is set, the guest will be customized using Sysprep. Either unattend_xml or
// custom_key_values should be provided. If custom_key_values are provided then the unattended answer file will be
// generated using these key-value pairs.
type GuestCustomizationSysprep struct {
// Generic key value pair used for custom attributes
CustomKeyValues map[string]string `json:"custom_key_values,omitempty" mapstructure:"custom_key_values,omitempty"`
// Whether the guest will be freshly installed using this unattend configuration, or whether this unattend
// configuration will be applied to a pre-prepared image. Default is \"PREPARED\".
InstallType *string `json:"install_type,omitempty" mapstructure:"install_type,omitempty"`
// This field contains a Sysprep unattend xml definition, as a *string. The value must be base64 encoded.
UnattendXML *string `json:"unattend_xml,omitempty" mapstructure:"unattend_xml,omitempty"`
}
// GuestCustomization VM guests may be customized at boot time using one of several different methods. Currently,
// cloud-init w/ ConfigDriveV2 (for Linux VMs) and Sysprep (for Windows VMs) are supported. Only ONE OF sysprep or
// cloud_init should be provided. Note that guest customization can currently only be set during VM creation. Attempting
// to change it after creation will result in an error. Additional properties can be specified. For example - in the
// context of VM template creation if \"override_script\" is set to \"True\" then the deployer can upload their own
// custom script.
type GuestCustomization struct {
CloudInit *GuestCustomizationCloudInit `json:"cloud_init,omitempty" mapstructure:"cloud_init,omitempty"`
// Flag to allow override of customization by deployer.
IsOverridable *bool `json:"is_overridable,omitempty" mapstructure:"is_overridable,omitempty"`
Sysprep *GuestCustomizationSysprep `json:"sysprep,omitempty" mapstructure:"sysprep,omitempty"`
}
// VMGuestPowerStateTransitionConfig Extra configs related to power state transition.
type VMGuestPowerStateTransitionConfig struct {
// Indicates whether to execute set script before ngt shutdown/reboot.
EnableScriptExec *bool `json:"enable_script_exec,omitempty" mapstructure:"enable_script_exec,omitempty"`
// Indicates whether to abort ngt shutdown/reboot if script fails.
ShouldFailOnScriptFailure *bool `json:"should_fail_on_script_failure,omitempty" mapstructure:"should_fail_on_script_failure,omitempty"`
}
// VMPowerStateMechanism Indicates the mechanism guiding the VM power state transition. Currently used for the transition
// to \"OFF\" state.
type VMPowerStateMechanism struct {
GuestTransitionConfig *VMGuestPowerStateTransitionConfig `json:"guest_transition_config,omitempty" mapstructure:"guest_transition_config,omitempty"`
// Power state mechanism (ACPI/GUEST/HARD).
Mechanism *string `json:"mechanism,omitempty" mapstructure:"mechanism,omitempty"`
}
// VMDiskDeviceProperties ...
type VMDiskDeviceProperties struct {
DeviceType *string `json:"device_type,omitempty" mapstructure:"device_type,omitempty"`
DiskAddress *DiskAddress `json:"disk_address,omitempty" mapstructure:"disk_address,omitempty"`
}
// StorageContainerReference references to a kind. Either one of (kind, uuid) or url needs to be specified.
type StorageContainerReference struct {
URL string `json:"url,omitempty"`
Kind string `json:"kind,omitempty"`
UUID string `json:"uuid,omitempty"`
Name string `json:"name,omitempty"`
}
// VMStorageConfig specifies the storage configuration parameters for VM disks.
type VMStorageConfig struct {
FlashMode string `json:"flash_mode,omitempty"`
StorageContainerReference *StorageContainerReference `json:"storage_container_reference,omitempty"`
}
// VMDisk VirtualMachine Disk (VM Disk).
type VMDisk struct {
DataSourceReference *Reference `json:"data_source_reference,omitempty" mapstructure:"data_source_reference,omitempty"`
DeviceProperties *VMDiskDeviceProperties `json:"device_properties,omitempty" mapstructure:"device_properties,omitempty"`
// Size of the disk in Bytes.
DiskSizeBytes *int64 `json:"disk_size_bytes,omitempty" mapstructure:"disk_size_bytes,omitempty"`
// Size of the disk in MiB. Must match the size specified in 'disk_size_bytes' - rounded up to the nearest MiB -
// when that field is present.
DiskSizeMib *int64 `json:"disk_size_mib,omitempty" mapstructure:"disk_size_mib,omitempty"`
// The device ID which is used to uniquely identify this particular disk.
UUID *string `json:"uuid,omitempty" mapstructure:"uuid,omitempty"`
VolumeGroupReference *Reference `json:"volume_group_reference,omitempty" mapstructure:"volume_group_reference,omitempty"`
// This preference specifies the storage configuration parameters for VM disks.
StorageConfig *VMStorageConfig `json:"storage_config,omitempty" mapstructure:"storage_config,omitempty"`
}
// VMResources VM Resources Definition.
type VMResources struct {
// Indicates which device the VM should boot from.
BootConfig *VMBootConfig `json:"boot_config,omitempty" mapstructure:"boot_config,omitempty"`
// Disks attached to the VM.
DiskList []*VMDisk `json:"disk_list,omitempty" mapstructure:"disk_list,omitempty"`
// GPUs attached to the VM.
GpuList []*VMGpu `json:"gpu_list,omitempty" mapstructure:"gpu_list,omitempty"`
GuestCustomization *GuestCustomization `json:"guest_customization,omitempty" mapstructure:"guest_customization,omitempty"`
// Guest OS Identifier. For ESX, refer to VMware documentation link
// https://www.vmware.com/support/orchestrator/doc/vro-vsphere65-api/html/VcVirtualMachineGuestOsIdentifier.html
// for the list of guest OS identifiers.
GuestOsID *string `json:"guest_os_id,omitempty" mapstructure:"guest_os_id,omitempty"`
// Information regarding guest tools.
GuestTools *GuestToolsSpec `json:"guest_tools,omitempty" mapstructure:"guest_tools,omitempty"`
// VM's hardware clock timezone in IANA TZDB format (America/Los_Angeles).
HardwareClockTimezone *string `json:"hardware_clock_timezone,omitempty" mapstructure:"hardware_clock_timezone,omitempty"`
// Memory size in MiB.
MemorySizeMib *int64 `json:"memory_size_mib,omitempty" mapstructure:"memory_size_mib,omitempty"`
// NICs attached to the VM.
NicList []*VMNic `json:"nic_list,omitempty" mapstructure:"nic_list,omitempty"`
// Number of threads per core
NumThreads *int64 `json:"num_threads_per_core,omitempty" mapstructure:"num_threads_per_core,omitempty"`
// Number of vCPU sockets.
NumSockets *int64 `json:"num_sockets,omitempty" mapstructure:"num_sockets,omitempty"`
// Number of vCPUs per socket.
NumVcpusPerSocket *int64 `json:"num_vcpus_per_socket,omitempty" mapstructure:"num_vcpus_per_socket,omitempty"`
// *Reference to an entity that the VM should be cloned from.
ParentReference *Reference `json:"parent_reference,omitempty" mapstructure:"parent_reference,omitempty"`
// The current or desired power state of the VM.
PowerState *string `json:"power_state,omitempty" mapstructure:"power_state,omitempty"`
PowerStateMechanism *VMPowerStateMechanism `json:"power_state_mechanism,omitempty" mapstructure:"power_state_mechanism,omitempty"`
// Indicates whether VGA console should be enabled or not.
VgaConsoleEnabled *bool `json:"vga_console_enabled,omitempty" mapstructure:"vga_console_enabled,omitempty"`
// Indicates whether to passthrough the host’s CPU features to the guest. Enabling this will disable live migration of the VM.
EnableCPUPassthrough *bool `json:"enable_cpu_passthrough,omitempty" mapstructure:"enable_cpu_passthrough,omitempty"`
// Indicates whether a VMs cores are getting pinned on either CPU1, CPU2, CPU3 or CPU4. By default, the Linux Scheduler in AHV will pin all cores wherever they are best available.
EnableCPUPinning *bool `json:"is_vcpu_hard_pinned,omitempty" mapstructure:"is_vcpu_hard_pinned,omitempty"`
// Information regarding vNUMA configuration.
VMVnumaConfig *VMVnumaConfig `json:"vnuma_config,omitempty" mapstructure:"vnuma_config,omitempty"`
SerialPortList []*VMSerialPort `json:"serial_port_list,omitempty" mapstructure:"serial_port_list,omitempty"`
MachineType *string `json:"machine_type,omitempty" mapstructure:"machine_type,omitempty"`
}
// VM An intentful representation of a vm spec
type VM struct {
AvailabilityZoneReference *Reference `json:"availability_zone_reference,omitempty" mapstructure:"availability_zone_reference,omitempty"`
ClusterReference *Reference `json:"cluster_reference,omitempty" mapstructure:"cluster_reference,omitempty"`
// A description for vm.
Description *string `json:"description,omitempty" mapstructure:"description,omitempty"`
// vm Name.
Name *string `json:"name" mapstructure:"name"`
Resources *VMResources `json:"resources,omitempty" mapstructure:"resources,omitempty"`
}
// VMIntentInput ...
type VMIntentInput struct {
APIVersion *string `json:"api_version,omitempty" mapstructure:"api_version,omitempty"`
Metadata *Metadata `json:"metadata" mapstructure:"metadata"`
Spec *VM `json:"spec" mapstructure:"spec"`
}
// MessageResource ...
type MessageResource struct {
// Custom key-value details relevant to the status.
Details interface{} `json:"details,omitempty" mapstructure:"details,omitempty"`
// If state is ERROR, a message describing the error.
Message *string `json:"message" mapstructure:"message"`
// If state is ERROR, a machine-readable snake-cased *string.
Reason *string `json:"reason" mapstructure:"reason"`
}
// VMStatus The status of a REST API call. Only used when there is a failure to report.
type VMStatus struct {
APIVersion *string `json:"api_version,omitempty" mapstructure:"api_version,omitempty"`
// The HTTP error code.
Code *int64 `json:"code,omitempty" mapstructure:"code,omitempty"`
// The kind name
Kind *string `json:"kind,omitempty" mapstructure:"kind,omitempty"`
MessageList []*MessageResource `json:"message_list,omitempty" mapstructure:"message_list,omitempty"`
State *string `json:"state,omitempty" mapstructure:"state,omitempty"`
}
// VMNicOutputStatus Virtual Machine NIC Status.
type VMNicOutputStatus struct {
// The Floating IP associated with the vnic.
FloatingIP *string `json:"floating_ip,omitempty" mapstructure:"floating_ip,omitempty"`
// IP endpoints for the adapter. Currently, IPv4 addresses are supported.
IPEndpointList []*IPAddress `json:"ip_endpoint_list,omitempty" mapstructure:"ip_endpoint_list,omitempty"`
// The MAC address for the adapter.
MacAddress *string `json:"mac_address,omitempty" mapstructure:"mac_address,omitempty"`
// The model of this NIC.
Model *string `json:"model,omitempty" mapstructure:"model,omitempty"`
NetworkFunctionChainReference *Reference `json:"network_function_chain_reference,omitempty" mapstructure:"network_function_chain_reference,omitempty"`
// The number of queues for this NIC
NumQueues *int64 `json:"num_queues,omitempty" mapstructure:"num_queues,omitempty"`
// The type of this Network function NIC. Defaults to INGRESS.
NetworkFunctionNicType *string `json:"network_function_nic_type,omitempty" mapstructure:"network_function_nic_type,omitempty"`
// The type of this NIC. Defaults to NORMAL_NIC.
NicType *string `json:"nic_type,omitempty" mapstructure:"nic_type,omitempty"`
SubnetReference *Reference `json:"subnet_reference,omitempty" mapstructure:"subnet_reference,omitempty"`
// The NIC's UUID, which is used to uniquely identify this particular NIC. This UUID may be used to refer to the NIC
// outside the context of the particular VM it is attached to.
UUID *string `json:"uuid,omitempty" mapstructure:"uuid,omitempty"`
IsConnected *bool `json:"is_connected,omitempty" mapstructure:"is_connected,omitempty"`
}
// NutanixGuestToolsStatus Information regarding Nutanix Guest Tools.
type NutanixGuestToolsStatus struct {
// Version of Nutanix Guest Tools available on the cluster.
AvailableVersion *string `json:"available_version,omitempty" mapstructure:"available_version,omitempty"`
// Nutanix Guest Tools installed or not.
NgtState *string `json:"ngt_state,omitempty" mapstructure:"ngt_state,omitempty"`
// Desired mount state of Nutanix Guest Tools ISO.
IsoMountState *string `json:"iso_mount_state,omitempty" mapstructure:"iso_mount_state,omitempty"`
// Nutanix Guest Tools is enabled or not.
State *string `json:"state,omitempty" mapstructure:"state,omitempty"`
// Version of Nutanix Guest Tools installed on the VM.
Version *string `json:"version,omitempty" mapstructure:"version,omitempty"`
// Application names that are enabled.
EnabledCapabilityList []*string `json:"enabled_capability_list,omitempty" mapstructure:"enabled_capability_list,omitempty"`
// Credentials to login server
Credentials map[string]string `json:"credentials,omitempty" mapstructure:"credentials,omitempty"`
// Version of the operating system on the VM.
GuestOsVersion *string `json:"guest_os_version,omitempty" mapstructure:"guest_os_version,omitempty"`
// Whether the VM is configured to take VSS snapshots through NGT.
VSSSnapshotCapable *bool `json:"vss_snapshot_capable,omitempty" mapstructure:"vss_snapshot_capable,omitempty"`
// Communication from VM to CVM is active or not.
IsReachable *bool `json:"is_reachable,omitempty" mapstructure:"is_reachable,omitempty"`
// Whether VM mobility drivers are installed in the VM.
VMMobilityDriversInstalled *bool `json:"vm_mobility_drivers_installed,omitempty" mapstructure:"vm_mobility_drivers_installed,omitempty"`
}
// GuestToolsStatus Information regarding guest tools.
type GuestToolsStatus struct {
// Nutanix Guest Tools information
NutanixGuestTools *NutanixGuestToolsStatus `json:"nutanix_guest_tools,omitempty" mapstructure:"nutanix_guest_tools,omitempty"`
}
// VMGpuOutputStatus Graphics resource status information for the Virtual Machine.
type VMGpuOutputStatus struct {
// The device ID of the GPU.
DeviceID *int64 `json:"device_id,omitempty" mapstructure:"device_id,omitempty"`
// Fraction of the physical GPU assigned.
Fraction *int64 `json:"fraction,omitempty" mapstructure:"fraction,omitempty"`
// GPU frame buffer size in MiB.
FrameBufferSizeMib *int64 `json:"frame_buffer_size_mib,omitempty" mapstructure:"frame_buffer_size_mib,omitempty"`
// Last determined guest driver version.
GuestDriverVersion *string `json:"guest_driver_version,omitempty" mapstructure:"guest_driver_version,omitempty"`
// The mode of this GPU
Mode *string `json:"mode,omitempty" mapstructure:"mode,omitempty"`
// Name of the GPU resource.
Name *string `json:"name,omitempty" mapstructure:"name,omitempty"`
// Number of supported virtual display heads.
NumVirtualDisplayHeads *int64 `json:"num_virtual_display_heads,omitempty" mapstructure:"num_virtual_display_heads,omitempty"`
// GPU {segment:bus:device:function} (sbdf) address if assigned.
PCIAddress *string `json:"pci_address,omitempty" mapstructure:"pci_address,omitempty"`
// UUID of the GPU.
UUID *string `json:"uuid,omitempty" mapstructure:"uuid,omitempty"`
// The vendor of the GPU.
Vendor *string `json:"vendor,omitempty" mapstructure:"vendor,omitempty"`
}
// GuestCustomizationStatus VM guests may be customized at boot time using one of several different methods. Currently,
// cloud-init w/ ConfigDriveV2 (for Linux VMs) and Sysprep (for Windows VMs) are supported. Only ONE OF sysprep or
// cloud_init should be provided. Note that guest customization can currently only be set during VM creation. Attempting
// to change it after creation will result in an error. Additional properties can be specified. For example - in the
// context of VM template creation if \"override_script\" is set to \"True\" then the deployer can upload their own
// custom script.
type GuestCustomizationStatus struct {
CloudInit *GuestCustomizationCloudInit `json:"cloud_init,omitempty" mapstructure:"cloud_init,omitempty"`
// Flag to allow override of customization by deployer.
IsOverridable *bool `json:"is_overridable,omitempty" mapstructure:"is_overridable,omitempty"`
Sysprep *GuestCustomizationSysprep `json:"sysprep,omitempty" mapstructure:"sysprep,omitempty"`
}
// VMResourcesDefStatus VM Resources Status Definition.
type VMResourcesDefStatus struct {
// Indicates which device the VM should boot from.
BootConfig *VMBootConfig `json:"boot_config,omitempty" mapstructure:"boot_config,omitempty"`
// Disks attached to the VM.
DiskList []*VMDisk `json:"disk_list,omitempty" mapstructure:"disk_list,omitempty"`
// GPUs attached to the VM.
GpuList []*VMGpuOutputStatus `json:"gpu_list,omitempty" mapstructure:"gpu_list,omitempty"`
GuestCustomization *GuestCustomizationStatus `json:"guest_customization,omitempty" mapstructure:"guest_customization,omitempty"`
// Guest OS Identifier. For ESX, refer to VMware documentation link
// https://www.vmware.com/support/orchestrator/doc/vro-vsphere65-api/html/VcVirtualMachineGuestOsIdentifier.html
// for the list of guest OS identifiers.
GuestOsID *string `json:"guest_os_id,omitempty" mapstructure:"guest_os_id,omitempty"`
// Information regarding guest tools.
GuestTools *GuestToolsStatus `json:"guest_tools,omitempty" mapstructure:"guest_tools,omitempty"`
// VM's hardware clock timezone in IANA TZDB format (America/Los_Angeles).
HardwareClockTimezone *string `json:"hardware_clock_timezone,omitempty" mapstructure:"hardware_clock_timezone,omitempty"`
HostReference *Reference `json:"host_reference,omitempty" mapstructure:"host_reference,omitempty"`
// The hypervisor type for the hypervisor the VM is hosted on.
HypervisorType *string `json:"hypervisor_type,omitempty" mapstructure:"hypervisor_type,omitempty"`
// Memory size in MiB.
MemorySizeMib *int64 `json:"memory_size_mib,omitempty" mapstructure:"memory_size_mib,omitempty"`
// NICs attached to the VM.
NicList []*VMNicOutputStatus `json:"nic_list,omitempty" mapstructure:"nic_list,omitempty"`
// Number of vCPU sockets.
NumSockets *int64 `json:"num_sockets,omitempty" mapstructure:"num_sockets,omitempty"`
// Number of vCPUs per socket.
NumVcpusPerSocket *int64 `json:"num_vcpus_per_socket,omitempty" mapstructure:"num_vcpus_per_socket,omitempty"`
// *Reference to an entity that the VM cloned from.
ParentReference *Reference `json:"parent_reference,omitempty" mapstructure:"parent_reference,omitempty"`
// Current power state of the VM.
PowerState *string `json:"power_state,omitempty" mapstructure:"power_state,omitempty"`
PowerStateMechanism *VMPowerStateMechanism `json:"power_state_mechanism,omitempty" mapstructure:"power_state_mechanism,omitempty"`
// Indicates whether VGA console has been enabled or not.
VgaConsoleEnabled *bool `json:"vga_console_enabled,omitempty" mapstructure:"vga_console_enabled,omitempty"`
// Indicates whether to passthrough the host’s CPU features to the guest. Enabling this will disable live migration of the VM.
EnableCPUPassthrough *bool `json:"enable_cpu_passthrough,omitempty" mapstructure:"enable_cpu_passthrough,omitempty"`
// Indicates whether a VMs cores are getting pinned on either CPU1, CPU2, CPU3 or CPU4. By default, the Linux Scheduler in AHV will pin all cores wherever they are best available.
EnableCPUPinning *bool `json:"is_vcpu_hard_pinned,omitempty" mapstructure:"is_vcpu_hard_pinned,omitempty"`
// Information regarding vNUMA configuration.
VnumaConfig *VMVnumaConfig `json:"vnuma_config,omitempty" mapstructure:"vnuma_config,omitempty"`
SerialPortList []*VMSerialPort `json:"serial_port_list,omitempty" mapstructure:"serial_port_list,omitempty"`
MachineType *string `json:"machine_type,omitempty" mapstructure:"machine_type,omitempty"`
}
// VMDefStatus An intentful representation of a vm status
type VMDefStatus struct {
AvailabilityZoneReference *Reference `json:"availability_zone_reference,omitempty" mapstructure:"availability_zone_reference,omitempty"`
ClusterReference *Reference `json:"cluster_reference,omitempty" mapstructure:"cluster_reference,omitempty"`
// A description for vm.
Description *string `json:"description,omitempty" mapstructure:"description,omitempty"`
// Any error messages for the vm, if in an error state.
MessageList []*MessageResource `json:"message_list,omitempty" mapstructure:"message_list,omitempty"`
// vm Name.
Name *string `json:"name,omitempty" mapstructure:"name,omitempty"`
Resources *VMResourcesDefStatus `json:"resources,omitempty" mapstructure:"resources,omitempty"`
// The state of the vm.
State *string `json:"state,omitempty" mapstructure:"state,omitempty"`
ExecutionContext *ExecutionContext `json:"execution_context,omitempty" mapstructure:"execution_context,omitempty"`
}
// ExecutionContext ...
type ExecutionContext struct {
TaskUUID interface{} `json:"task_uuid,omitempty" mapstructure:"task_uuid,omitempty"`
}
// VMIntentResponse Response object for intentful operations on a vm
type VMIntentResponse struct {
APIVersion *string `json:"api_version" mapstructure:"api_version"`
Metadata *Metadata `json:"metadata,omitempty" mapstructure:"metadata,omitempty"`
Spec *VM `json:"spec,omitempty" mapstructure:"spec,omitempty"`
Status *VMDefStatus `json:"status,omitempty" mapstructure:"status,omitempty"`
}
// DSMetadata All api calls that return a list will have this metadata block as input
type DSMetadata struct {
// The filter in FIQL syntax used for the results.
Filter *string `json:"filter,omitempty" mapstructure:"filter,omitempty"`
// The kind name
Kind *string `json:"kind,omitempty" mapstructure:"kind,omitempty"`
// The number of records to retrieve relative to the offset
Length *int64 `json:"length,omitempty" mapstructure:"length,omitempty"`
// Offset from the start of the entity list
Offset *int64 `json:"offset,omitempty" mapstructure:"offset,omitempty"`
// The attribute to perform sort on
SortAttribute *string `json:"sort_attribute,omitempty" mapstructure:"sort_attribute,omitempty"`
// The sort order in which results are returned
SortOrder *string `json:"sort_order,omitempty" mapstructure:"sort_order,omitempty"`
// Additional filters for client side filtering api response
ClientSideFilters []*prismgoclient.AdditionalFilter `json:"-"`
}
// VMIntentResource Response object for intentful operations on a vm
type VMIntentResource struct {
APIVersion *string `json:"api_version,omitempty" mapstructure:"api_version,omitempty"`
Metadata *Metadata `json:"metadata" mapstructure:"metadata"`
Spec *VM `json:"spec,omitempty" mapstructure:"spec,omitempty"`
Status *VMDefStatus `json:"status,omitempty" mapstructure:"status,omitempty"`
}
// VMListIntentResponse Response object for intentful operation of vms
type VMListIntentResponse struct {
APIVersion *string `json:"api_version" mapstructure:"api_version"`
Entities []*VMIntentResource `json:"entities,omitempty" mapstructure:"entities,omitempty"`
Metadata *ListMetadataOutput `json:"metadata" mapstructure:"metadata"`
}
// SubnetMetadata The subnet kind metadata
type SubnetMetadata struct {
// Categories for the subnet
Categories map[string]string `json:"categories,omitempty" mapstructure:"categories,omitempty"`
// UTC date and time in RFC-3339 format when subnet was created
CreationTime *time.Time `json:"creation_time,omitempty" mapstructure:"creation_time,omitempty"`
// The kind name
Kind *string `json:"kind" mapstructure:"kind"`
// UTC date and time in RFC-3339 format when subnet was last updated
LastUpdateTime *time.Time `json:"last_update_time,omitempty" mapstructure:"last_update_time,omitempty"`
// subnet name
Name *string `json:"name,omitempty" mapstructure:"name,omitempty"`
OwnerReference *Reference `json:"owner_reference,omitempty" mapstructure:"owner_reference,omitempty"`
// project reference
ProjectReference *Reference `json:"project_reference,omitempty" mapstructure:"project_reference,omitempty"`
// Hash of the spec. This will be returned from server.
SpecHash *string `json:"spec_hash,omitempty" mapstructure:"spec_hash,omitempty"`
// Version number of the latest spec.
SpecVersion *int64 `json:"spec_version,omitempty" mapstructure:"spec_version,omitempty"`
// subnet uuid
UUID *string `json:"uuid,omitempty" mapstructure:"uuid,omitempty"`
}
// Address represents the Host address.
type Address struct {
// Fully qualified domain name.
FQDN *string `json:"fqdn,omitempty" mapstructure:"fqdn,omitempty"`
// IPV4 address.
IP *string `json:"ip,omitempty" mapstructure:"ip,omitempty"`
// IPV6 address.
IPV6 *string `json:"ipv6,omitempty" mapstructure:"ipv6,omitempty"`
// Port Number
Port *int64 `json:"port,omitempty" mapstructure:"port,omitempty"`
}
// IPPool represents IP pool.
type IPPool struct {
// Range of IPs (example: 10.0.0.9 10.0.0.19).
Range *string `json:"range,omitempty" mapstructure:"range,omitempty"`
}
// DHCPOptions Spec for defining DHCP options.
type DHCPOptions struct {
BootFileName *string `json:"boot_file_name,omitempty" mapstructure:"boot_file_name,omitempty"`
DomainName *string `json:"domain_name,omitempty" mapstructure:"domain_name,omitempty"`
DomainNameServerList []*string `json:"domain_name_server_list,omitempty" mapstructure:"domain_name_server_list,omitempty"`
DomainSearchList []*string `json:"domain_search_list,omitempty" mapstructure:"domain_search_list,omitempty"`
TFTPServerName *string `json:"tftp_server_name,omitempty" mapstructure:"tftp_server_name,omitempty"`
}
// IPConfig represents the configurtion of IP.
type IPConfig struct {
// Default gateway IP address.
DefaultGatewayIP *string `json:"default_gateway_ip,omitempty" mapstructure:"default_gateway_ip,omitempty"`
DHCPOptions *DHCPOptions `json:"dhcp_options,omitempty" mapstructure:"dhcp_options,omitempty"`
DHCPServerAddress *Address `json:"dhcp_server_address,omitempty" mapstructure:"dhcp_server_address,omitempty"`
PoolList []*IPPool `json:"pool_list,omitempty" mapstructure:"pool_list,omitempty"`
PrefixLength *int64 `json:"prefix_length,omitempty" mapstructure:"prefix_length,omitempty"`
// Subnet IP address.
SubnetIP *string `json:"subnet_ip,omitempty" mapstructure:"subnet_ip,omitempty"`
}
// SubnetResources represents Subnet creation/modification spec.
type SubnetResources struct {
IPConfig *IPConfig `json:"ip_config,omitempty" mapstructure:"ip_config,omitempty"`
NetworkFunctionChainReference *Reference `json:"network_function_chain_reference,omitempty" mapstructure:"network_function_chain_reference,omitempty"`
SubnetType *string `json:"subnet_type" mapstructure:"subnet_type"`
VlanID *int64 `json:"vlan_id,omitempty" mapstructure:"vlan_id,omitempty"`
VswitchName *string `json:"vswitch_name,omitempty" mapstructure:"vswitch_name,omitempty"`
}
// Subnet An intentful representation of a subnet spec
type Subnet struct {
AvailabilityZoneReference *Reference `json:"availability_zone_reference,omitempty" mapstructure:"availability_zone_reference,omitempty"`
ClusterReference *Reference `json:"cluster_reference,omitempty" mapstructure:"cluster_reference,omitempty"`
// A description for subnet.
Description *string `json:"description,omitempty" mapstructure:"description,omitempty"`
// subnet Name.
Name *string `json:"name" mapstructure:"name"`
Resources *SubnetResources `json:"resources,omitempty" mapstructure:"resources,omitempty"`
}
// SubnetIntentInput An intentful representation of a subnet
type SubnetIntentInput struct {
APIVersion *string `json:"api_version,omitempty" mapstructure:"api_version,omitempty"`
Metadata *Metadata `json:"metadata" mapstructure:"metadata"`
Spec *Subnet `json:"spec" mapstructure:"spec"`
}
// SubnetStatus represents The status of a REST API call. Only used when there is a failure to report.
type SubnetStatus struct {
APIVersion *string `json:"api_version,omitempty" mapstructure:"api_version,omitempty"`
// The HTTP error code.
Code *int64 `json:"code,omitempty" mapstructure:"code,omitempty"`
// The kind name
Kind *string `json:"kind,omitempty" mapstructure:"kind,omitempty"`
MessageList []*MessageResource `json:"message_list,omitempty" mapstructure:"message_list,omitempty"`
State *string `json:"state,omitempty" mapstructure:"state,omitempty"`
}
// SubnetResourcesDefStatus represents a Subnet creation/modification status.
type SubnetResourcesDefStatus struct {
IPConfig *IPConfig `json:"ip_config,omitempty" mapstructure:"ip_config,omitempty"`
NetworkFunctionChainReference *Reference `json:"network_function_chain_reference,omitempty" mapstructure:"network_function_chain_reference,omitempty"`
SubnetType *string `json:"subnet_type" mapstructure:"subnet_type"`
VlanID *int64 `json:"vlan_id,omitempty" mapstructure:"vlan_id,omitempty"`
VswitchName *string `json:"vswitch_name,omitempty" mapstructure:"vswitch_name,omitempty"`
}
// SubnetDefStatus An intentful representation of a subnet status
type SubnetDefStatus struct {
AvailabilityZoneReference *Reference `json:"availability_zone_reference,omitempty" mapstructure:"availability_zone_reference,omitempty"`
ClusterReference *Reference `json:"cluster_reference,omitempty" mapstructure:"cluster_reference,omitempty"`
// A description for subnet.
Description *string `json:"description" mapstructure:"description"`
// Any error messages for the subnet, if in an error state.
MessageList []*MessageResource `json:"message_list,omitempty" mapstructure:"message_list,omitempty"`
// subnet Name.
Name *string `json:"name" mapstructure:"name"`
Resources *SubnetResourcesDefStatus `json:"resources,omitempty" mapstructure:"resources,omitempty"`
// The state of the subnet.
State *string `json:"state,omitempty" mapstructure:"state,omitempty"`
ExecutionContext *ExecutionContext `json:"execution_context,omitempty" mapstructure:"execution_context,omitempty"`
}
// SubnetIntentResponse represents the response object for intentful operations on a subnet
type SubnetIntentResponse struct {
APIVersion *string `json:"api_version" mapstructure:"api_version"`
Metadata *Metadata `json:"metadata,omitempty" mapstructure:"metadata,omitempty"`
Spec *Subnet `json:"spec,omitempty" mapstructure:"spec,omitempty"`
Status *SubnetDefStatus `json:"status,omitempty" mapstructure:"status,omitempty"`
}
// SubnetIntentResource represents Response object for intentful operations on a subnet
type SubnetIntentResource struct {
APIVersion *string `json:"api_version,omitempty" mapstructure:"api_version,omitempty"`
Metadata *Metadata `json:"metadata" mapstructure:"metadata"`
Spec *Subnet `json:"spec,omitempty" mapstructure:"spec,omitempty"`
Status *SubnetDefStatus `json:"status,omitempty" mapstructure:"status,omitempty"`
}
// SubnetListIntentResponse represents the response object for intentful operation of subnets
type SubnetListIntentResponse struct {
APIVersion *string `json:"api_version" mapstructure:"api_version"`
Entities []*SubnetIntentResponse `json:"entities,omitempty" mapstructure:"entities,omitempty"`
Metadata *ListMetadataOutput `json:"metadata" mapstructure:"metadata"`
}
// SubnetListMetadata ...
type SubnetListMetadata struct {
// The filter in FIQL syntax used for the results.
Filter *string `json:"filter,omitempty" mapstructure:"filter,omitempty"`
// The kind name
Kind *string `json:"kind,omitempty" mapstructure:"kind,omitempty"`
// The number of records to retrieve relative to the offset
Length *int64 `json:"length,omitempty" mapstructure:"length,omitempty"`
// Offset from the start of the entity list
Offset *int64 `json:"offset,omitempty" mapstructure:"offset,omitempty"`
// The attribute to perform sort on
SortAttribute *string `json:"sort_attribute,omitempty" mapstructure:"sort_attribute,omitempty"`
// The sort order in which results are returned
SortOrder *string `json:"sort_order,omitempty" mapstructure:"sort_order,omitempty"`
}
// Checksum represents the image checksum
type Checksum struct {
ChecksumAlgorithm *string `json:"checksum_algorithm" mapstructure:"checksum_algorithm"`
ChecksumValue *string `json:"checksum_value" mapstructure:"checksum_value"`
}
// ImageVersionResources The image version, which is composed of a product name and product version.
type ImageVersionResources struct {
// Name of the producer/distribution of the image. For example windows or red hat.
ProductName *string `json:"product_name" mapstructure:"product_name"`
// Version *string for the disk image.
ProductVersion *string `json:"product_version" mapstructure:"product_version"`
}
// ImageResources describes the image spec resources object.
type ImageResources struct {
// The supported CPU architecture for a disk image.
Architecture *string `json:"architecture,omitempty" mapstructure:"architecture,omitempty"`
// Checksum of the image. The checksum is used for image validation if the image has a source specified. For images
// that do not have their source specified the checksum is generated by the image service.
Checksum *Checksum `json:"checksum,omitempty" mapstructure:"checksum,omitempty"`
// The type of image.
ImageType *string `json:"image_type,omitempty" mapstructure:"image_type,omitempty"`
// The source URI points at the location of a the source image which is used to create/update image.
SourceURI *string `json:"source_uri,omitempty" mapstructure:"source_uri,omitempty"`
// The image version
Version *ImageVersionResources `json:"version,omitempty" mapstructure:"version,omitempty"`
// Cluster reference lists
InitialPlacementRefList []*ReferenceValues `json:"initial_placement_ref_list,omitempty" mapstructure:"initial_placement_ref_list, omitempty"`
// Reference to the source image such as 'vm_disk
DataSourceReference *Reference `json:"data_source_reference,omitempty" mapstructure:"data_source_reference,omitempty"`
}
// Image An intentful representation of a image spec
type Image struct {
// A description for image.
Description *string `json:"description,omitempty" mapstructure:"description,omitempty"`
// image Name.
Name *string `json:"name,omitempty" mapstructure:"name,omitempty"`
Resources *ImageResources `json:"resources" mapstructure:"resources"`
}
// ImageMetadata Metadata The image kind metadata
type ImageMetadata struct {
// Categories for the image
Categories map[string]string `json:"categories,omitempty" mapstructure:"categories,omitempty"`
// UTC date and time in RFC-3339 format when vm was created
CreationTime *time.Time `json:"creation_time,omitempty" mapstructure:"creation_time,omitempty"`
// The kind name
Kind *string `json:"kind" mapstructure:"kind"`
// UTC date and time in RFC-3339 format when image was last updated
LastUpdateTime *time.Time `json:"last_update_time,omitempty" mapstructure:"last_update_time,omitempty"`
// image name
Name *string `json:"name,omitempty" mapstructure:"name,omitempty"`
// project reference
ProjectReference *Reference `json:"project_reference,omitempty" mapstructure:"project_reference,omitempty"`
OwnerReference *Reference `json:"owner_reference,omitempty" mapstructure:"owner_reference,omitempty"`
// Hash of the spec. This will be returned from server.
SpecHash *string `json:"spec_hash,omitempty" mapstructure:"spec_hash,omitempty"`
// Version number of the latest spec.
SpecVersion *int64 `json:"spec_version,omitempty" mapstructure:"spec_version,omitempty"`
// image uuid
UUID *string `json:"uuid,omitempty" mapstructure:"uuid,omitempty"`
}
// ImageIntentInput An intentful representation of a image
type ImageIntentInput struct {
APIVersion *string `json:"api_version,omitempty" mapstructure:"api_version,omitempty"`
Metadata *Metadata `json:"metadata,omitempty" mapstructure:"metadata,omitempty"`
Spec *Image `json:"spec,omitempty" mapstructure:"spec,omitempty"`
}
// ImageStatus represents the status of a REST API call. Only used when there is a failure to report.
type ImageStatus struct {
APIVersion *string `json:"api_version,omitempty" mapstructure:"api_version,omitempty"`
// The HTTP error code.
Code *int64 `json:"code,omitempty" mapstructure:"code,omitempty"`
// The kind name
Kind *string `json:"kind,omitempty" mapstructure:"kind,omitempty"`
MessageList []*MessageResource `json:"message_list,omitempty" mapstructure:"message_list,omitempty"`
State *string `json:"state,omitempty" mapstructure:"state,omitempty"`
}
// ImageVersionStatus represents the image version, which is composed of a product name and product version.
type ImageVersionStatus struct {
// Name of the producer/distribution of the image. For example windows or red hat.
ProductName *string `json:"product_name" mapstructure:"product_name"`
// Version *string for the disk image.
ProductVersion *string `json:"product_version" mapstructure:"product_version"`
}
// ImageResourcesDefStatus describes the image status resources object.
type ImageResourcesDefStatus struct {
// The supported CPU architecture for a disk image.
Architecture *string `json:"architecture,omitempty" mapstructure:"architecture,omitempty"`
// Checksum of the image. The checksum is used for image validation if the image has a source specified. For images
// that do not have their source specified the checksum is generated by the image service.
Checksum *Checksum `json:"checksum,omitempty" mapstructure:"checksum,omitempty"`
// The type of image.
ImageType *string `json:"image_type,omitempty" mapstructure:"image_type,omitempty"`
// List of URIs where the raw image data can be accessed.
RetrievalURIList []*string `json:"retrieval_uri_list,omitempty" mapstructure:"retrieval_uri_list,omitempty"`
// The size of the image in bytes.
SizeBytes *int64 `json:"size_bytes,omitempty" mapstructure:"size_bytes,omitempty"`
// The source URI points at the location of a the source image which is used to create/update image.
SourceURI *string `json:"source_uri,omitempty" mapstructure:"source_uri,omitempty"`
// Cluster reference lists
InitialPlacementRefList []*ReferenceValues `json:"initial_placement_ref_list,omitempty" mapstructure:"initial_placement_ref_list, omitempty"`
// cluster reference list when request was made without refs
CurrentClusterReferenceList []*ReferenceValues `json:"current_cluster_reference_list,omitempty" mapstructure:"current_cluster_reference_list, omitempty"`
// The image version
Version *ImageVersionStatus `json:"version,omitempty" mapstructure:"version,omitempty"`
}
// ImageDefStatus represents an intentful representation of a image status
type ImageDefStatus struct {
AvailabilityZoneReference *Reference `json:"availability_zone_reference,omitempty" mapstructure:"availability_zone_reference,omitempty"`
ClusterReference *Reference `json:"cluster_reference,omitempty" mapstructure:"cluster_reference,omitempty"`
// A description for image.
Description *string `json:"description,omitempty" mapstructure:"description,omitempty"`
// Any error messages for the image, if in an error state.
MessageList []*MessageResource `json:"message_list,omitempty" mapstructure:"message_list,omitempty"`
// image Name.
Name *string `json:"name" mapstructure:"name"`
Resources ImageResourcesDefStatus `json:"resources" mapstructure:"resources"`
// The state of the image.
State *string `json:"state,omitempty" mapstructure:"state,omitempty"`
ExecutionContext *ExecutionContext `json:"execution_context,omitempty" mapstructure:"execution_context,omitempty"`
}