From 0b30e8059a396cd4ec2ef865bccc4b79da350b25 Mon Sep 17 00:00:00 2001 From: jremitz Date: Mon, 30 Sep 2019 21:00:11 -0500 Subject: [PATCH 1/2] add missing api fields for structs --- client/v3/v3_structs.go | 27 +++++++++++++++++---------- 1 file changed, 17 insertions(+), 10 deletions(-) diff --git a/client/v3/v3_structs.go b/client/v3/v3_structs.go index 23369cc99..be9488740 100644 --- a/client/v3/v3_structs.go +++ b/client/v3/v3_structs.go @@ -245,6 +245,9 @@ type VMResources struct { // NICs attached to the VM. NicList []*VMNic `json:"nic_list,omitempty"` + // Number of threads per core + NumThreads *int64 `json:"num_threads_per_core,omitempty"` + // Number of vCPU sockets. NumSockets *int64 `json:"num_sockets,omitempty"` @@ -836,6 +839,9 @@ type ImageResources struct { // The image version Version *ImageVersionResources `json:"version,omitempty"` + + // Reference to the source image such as 'vm_disk + DataSourceReference *Reference `json:"data_source_reference,omitempty"` } // Image An intentful representation of a image spec @@ -1610,16 +1616,17 @@ type NetworkSecurityRule struct { // Metadata Metadata The kind metadata type Metadata struct { - LastUpdateTime *time.Time `json:"last_update_time,omitempty"` // - Kind *string `json:"kind"` // - UUID *string `json:"uuid,omitempty"` // - ProjectReference *Reference `json:"project_reference,omitempty"` // project reference - CreationTime *time.Time `json:"creation_time,omitempty"` - SpecVersion *int64 `json:"spec_version,omitempty"` - SpecHash *string `json:"spec_hash,omitempty"` - OwnerReference *Reference `json:"owner_reference,omitempty"` - Categories map[string]string `json:"categories,omitempty"` - Name *string `json:"name,omitempty"` + LastUpdateTime *time.Time `json:"last_update_time,omitempty"` // + Kind *string `json:"kind"` // + UUID *string `json:"uuid,omitempty"` // + ProjectReference *Reference `json:"project_reference,omitempty"` // project reference + CreationTime *time.Time `json:"creation_time,omitempty"` + SpecVersion *int64 `json:"spec_version,omitempty"` + SpecHash *string `json:"spec_hash,omitempty"` + OwnerReference *Reference `json:"owner_reference,omitempty"` + Categories map[string]string `json:"categories,omitempty"` + Name *string `json:"name,omitempty"` + ShouldForceTranslate *bool `json:"should_force_translate,omitempty"` // Applied on Prism Central only. Indicate whether force to translate the spec of the fanout request to fit the target cluster API schema. } // NetworkSecurityRuleIntentInput An intentful representation of a network_security_rule From 3895082c0c199ddabbc262d50d40845cdfbfbee9 Mon Sep 17 00:00:00 2001 From: jremitz Date: Mon, 30 Sep 2019 21:28:22 -0500 Subject: [PATCH 2/2] fix typo for omitempty and linting --- client/v3/v3_structs.go | 26 ++++++++++++++------------ 1 file changed, 14 insertions(+), 12 deletions(-) diff --git a/client/v3/v3_structs.go b/client/v3/v3_structs.go index be9488740..5db130376 100644 --- a/client/v3/v3_structs.go +++ b/client/v3/v3_structs.go @@ -1616,17 +1616,19 @@ type NetworkSecurityRule struct { // Metadata Metadata The kind metadata type Metadata struct { - LastUpdateTime *time.Time `json:"last_update_time,omitempty"` // - Kind *string `json:"kind"` // - UUID *string `json:"uuid,omitempty"` // - ProjectReference *Reference `json:"project_reference,omitempty"` // project reference - CreationTime *time.Time `json:"creation_time,omitempty"` - SpecVersion *int64 `json:"spec_version,omitempty"` - SpecHash *string `json:"spec_hash,omitempty"` - OwnerReference *Reference `json:"owner_reference,omitempty"` - Categories map[string]string `json:"categories,omitempty"` - Name *string `json:"name,omitempty"` - ShouldForceTranslate *bool `json:"should_force_translate,omitempty"` // Applied on Prism Central only. Indicate whether force to translate the spec of the fanout request to fit the target cluster API schema. + LastUpdateTime *time.Time `json:"last_update_time,omitempty"` // + Kind *string `json:"kind"` // + UUID *string `json:"uuid,omitempty"` // + ProjectReference *Reference `json:"project_reference,omitempty"` // project reference + CreationTime *time.Time `json:"creation_time,omitempty"` + SpecVersion *int64 `json:"spec_version,omitempty"` + SpecHash *string `json:"spec_hash,omitempty"` + OwnerReference *Reference `json:"owner_reference,omitempty"` + Categories map[string]string `json:"categories,omitempty"` + Name *string `json:"name,omitempty"` + + // Applied on Prism Central only. Indicate whether force to translate the spec of the fanout request to fit the target cluster API schema. + ShouldForceTranslate *bool `json:"should_force_translate,omitempty"` } // NetworkSecurityRuleIntentInput An intentful representation of a network_security_rule @@ -1638,7 +1640,7 @@ type NetworkSecurityRuleIntentInput struct { // NetworkSecurityRuleDefStatus ... Network security rule status type NetworkSecurityRuleDefStatus struct { - Resources *NetworkSecurityRuleResources `json:"resources,omitmepty"` + Resources *NetworkSecurityRuleResources `json:"resources,omitempty"` State *string `json:"state,omitempty"` ExecutionContext *ExecutionContext `json:"execution_context,omitempty"` Name *string `json:"name,omitempty"`