Skip to content

Commit

Permalink
Merge pull request #2618 from zach96guan/issue-2612
Browse files Browse the repository at this point in the history
Update generated types to vCenter 7.0U3 (build 18700403)
  • Loading branch information
zach96guan committed Oct 13, 2021
2 parents fb0e331 + 038bc3d commit ffd45c8
Show file tree
Hide file tree
Showing 12 changed files with 991 additions and 155 deletions.
94 changes: 67 additions & 27 deletions eam/methods/methods.go
Original file line number Diff line number Diff line change
Expand Up @@ -63,6 +63,46 @@ func AgencyQueryRuntime(ctx context.Context, r soap.RoundTripper, req *types.Age
return resBody.Res, nil
}

type Agency_DisableBody struct {
Req *types.Agency_Disable `xml:"urn:eam Agency_Disable,omitempty"`
Res *types.Agency_DisableResponse `xml:"urn:eam Agency_DisableResponse,omitempty"`
Fault_ *soap.Fault `xml:"http://schemas.xmlsoap.org/soap/envelope/ Fault,omitempty"`
}

func (b *Agency_DisableBody) Fault() *soap.Fault { return b.Fault_ }

func Agency_Disable(ctx context.Context, r soap.RoundTripper, req *types.Agency_Disable) (*types.Agency_DisableResponse, error) {
var reqBody, resBody Agency_DisableBody

reqBody.Req = req

if err := r.RoundTrip(ctx, &reqBody, &resBody); err != nil {
return nil, err
}

return resBody.Res, nil
}

type Agency_EnableBody struct {
Req *types.Agency_Enable `xml:"urn:eam Agency_Enable,omitempty"`
Res *types.Agency_EnableResponse `xml:"urn:eam Agency_EnableResponse,omitempty"`
Fault_ *soap.Fault `xml:"http://schemas.xmlsoap.org/soap/envelope/ Fault,omitempty"`
}

func (b *Agency_EnableBody) Fault() *soap.Fault { return b.Fault_ }

func Agency_Enable(ctx context.Context, r soap.RoundTripper, req *types.Agency_Enable) (*types.Agency_EnableResponse, error) {
var reqBody, resBody Agency_EnableBody

reqBody.Req = req

if err := r.RoundTrip(ctx, &reqBody, &resBody); err != nil {
return nil, err
}

return resBody.Res, nil
}

type AgentQueryConfigBody struct {
Req *types.AgentQueryConfig `xml:"urn:eam AgentQueryConfig,omitempty"`
Res *types.AgentQueryConfigResponse `xml:"urn:eam AgentQueryConfigResponse,omitempty"`
Expand Down Expand Up @@ -143,36 +183,16 @@ func DestroyAgency(ctx context.Context, r soap.RoundTripper, req *types.DestroyA
return resBody.Res, nil
}

type DisableBody struct {
Req *types.Disable `xml:"urn:eam Disable,omitempty"`
Res *types.DisableResponse `xml:"urn:eam DisableResponse,omitempty"`
Fault_ *soap.Fault `xml:"http://schemas.xmlsoap.org/soap/envelope/ Fault,omitempty"`
type GetMaintenanceModePolicyBody struct {
Req *types.GetMaintenanceModePolicy `xml:"urn:eam GetMaintenanceModePolicy,omitempty"`
Res *types.GetMaintenanceModePolicyResponse `xml:"urn:eam GetMaintenanceModePolicyResponse,omitempty"`
Fault_ *soap.Fault `xml:"http://schemas.xmlsoap.org/soap/envelope/ Fault,omitempty"`
}

func (b *DisableBody) Fault() *soap.Fault { return b.Fault_ }
func (b *GetMaintenanceModePolicyBody) Fault() *soap.Fault { return b.Fault_ }

func Disable(ctx context.Context, r soap.RoundTripper, req *types.Disable) (*types.DisableResponse, error) {
var reqBody, resBody DisableBody

reqBody.Req = req

if err := r.RoundTrip(ctx, &reqBody, &resBody); err != nil {
return nil, err
}

return resBody.Res, nil
}

type EnableBody struct {
Req *types.Enable `xml:"urn:eam Enable,omitempty"`
Res *types.EnableResponse `xml:"urn:eam EnableResponse,omitempty"`
Fault_ *soap.Fault `xml:"http://schemas.xmlsoap.org/soap/envelope/ Fault,omitempty"`
}

func (b *EnableBody) Fault() *soap.Fault { return b.Fault_ }

func Enable(ctx context.Context, r soap.RoundTripper, req *types.Enable) (*types.EnableResponse, error) {
var reqBody, resBody EnableBody
func GetMaintenanceModePolicy(ctx context.Context, r soap.RoundTripper, req *types.GetMaintenanceModePolicy) (*types.GetMaintenanceModePolicyResponse, error) {
var reqBody, resBody GetMaintenanceModePolicyBody

reqBody.Req = req

Expand Down Expand Up @@ -383,6 +403,26 @@ func ScanForUnknownAgentVm(ctx context.Context, r soap.RoundTripper, req *types.
return resBody.Res, nil
}

type SetMaintenanceModePolicyBody struct {
Req *types.SetMaintenanceModePolicy `xml:"urn:eam SetMaintenanceModePolicy,omitempty"`
Res *types.SetMaintenanceModePolicyResponse `xml:"urn:eam SetMaintenanceModePolicyResponse,omitempty"`
Fault_ *soap.Fault `xml:"http://schemas.xmlsoap.org/soap/envelope/ Fault,omitempty"`
}

func (b *SetMaintenanceModePolicyBody) Fault() *soap.Fault { return b.Fault_ }

func SetMaintenanceModePolicy(ctx context.Context, r soap.RoundTripper, req *types.SetMaintenanceModePolicy) (*types.SetMaintenanceModePolicyResponse, error) {
var reqBody, resBody SetMaintenanceModePolicyBody

reqBody.Req = req

if err := r.RoundTrip(ctx, &reqBody, &resBody); err != nil {
return nil, err
}

return resBody.Res, nil
}

type UninstallBody struct {
Req *types.Uninstall `xml:"urn:eam Uninstall,omitempty"`
Res *types.UninstallResponse `xml:"urn:eam UninstallResponse,omitempty"`
Expand Down
4 changes: 2 additions & 2 deletions eam/object/agency.go
Original file line number Diff line number Diff line change
Expand Up @@ -95,7 +95,7 @@ func (m Agency) Destroy(ctx context.Context) error {
}

func (m Agency) Disable(ctx context.Context) error {
_, err := methods.Disable(ctx, m.c, &types.Disable{
_, err := methods.Agency_Disable(ctx, m.c, &types.Agency_Disable{
This: m.r,
})
if err != nil {
Expand All @@ -105,7 +105,7 @@ func (m Agency) Disable(ctx context.Context) error {
}

func (m Agency) Enable(ctx context.Context) error {
_, err := methods.Enable(ctx, m.c, &types.Enable{
_, err := methods.Agency_Enable(ctx, m.c, &types.Agency_Enable{
This: m.r,
})
if err != nil {
Expand Down
16 changes: 8 additions & 8 deletions eam/simulator/agency.go
Original file line number Diff line number Diff line change
Expand Up @@ -151,25 +151,25 @@ func (m *Agency) DestroyAgency(
}
}

func (m *Agency) Disable(
func (m *Agency) Agency_Disable(
ctx *simulator.Context,
req *types.Disable) soap.HasFault {
req *types.Agency_Disable) soap.HasFault {

m.Runtime.GoalState = string(types.EamObjectRuntimeInfoGoalStateDisabled)

return &methods.DisableBody{
Res: &types.DisableResponse{},
return &methods.Agency_DisableBody{
Res: &types.Agency_DisableResponse{},
}
}

func (m *Agency) Enable(
func (m *Agency) Agency_Enable(
ctx *simulator.Context,
req *types.Enable) soap.HasFault {
req *types.Agency_Enable) soap.HasFault {

m.Runtime.GoalState = string(types.EamObjectRuntimeInfoGoalStateEnabled)

return &methods.EnableBody{
Res: &types.EnableResponse{},
return &methods.Agency_EnableBody{
Res: &types.Agency_EnableResponse{},
}
}

Expand Down
102 changes: 76 additions & 26 deletions eam/types/types.go
Original file line number Diff line number Diff line change
Expand Up @@ -62,6 +62,7 @@ type AgencyConfigInfo struct {
OptimizedDeploymentEnabled *bool `xml:"optimizedDeploymentEnabled"`
AgentName string `xml:"agentName,omitempty"`
AgencyName string `xml:"agencyName,omitempty"`
UseUuidVmName *bool `xml:"useUuidVmName"`
ManuallyProvisioned *bool `xml:"manuallyProvisioned"`
ManuallyMonitored *bool `xml:"manuallyMonitored"`
BypassVumEnabled *bool `xml:"bypassVumEnabled"`
Expand All @@ -77,6 +78,14 @@ func init() {
types.Add("eam:AgencyConfigInfo", reflect.TypeOf((*AgencyConfigInfo)(nil)).Elem())
}

type AgencyDisabled struct {
AgencyIssue
}

func init() {
types.Add("eam:AgencyDisabled", reflect.TypeOf((*AgencyDisabled)(nil)).Elem())
}

type AgencyIssue struct {
Issue

Expand Down Expand Up @@ -138,6 +147,40 @@ func init() {
types.Add("eam:AgencyVMResourcePool", reflect.TypeOf((*AgencyVMResourcePool)(nil)).Elem())
}

type Agency_Disable Agency_DisableRequestType

func init() {
types.Add("eam:Agency_Disable", reflect.TypeOf((*Agency_Disable)(nil)).Elem())
}

type Agency_DisableRequestType struct {
This types.ManagedObjectReference `xml:"_this"`
}

func init() {
types.Add("eam:Agency_DisableRequestType", reflect.TypeOf((*Agency_DisableRequestType)(nil)).Elem())
}

type Agency_DisableResponse struct {
}

type Agency_Enable Agency_EnableRequestType

func init() {
types.Add("eam:Agency_Enable", reflect.TypeOf((*Agency_Enable)(nil)).Elem())
}

type Agency_EnableRequestType struct {
This types.ManagedObjectReference `xml:"_this"`
}

func init() {
types.Add("eam:Agency_EnableRequestType", reflect.TypeOf((*Agency_EnableRequestType)(nil)).Elem())
}

type Agency_EnableResponse struct {
}

type AgentConfigInfo struct {
types.DynamicData

Expand Down Expand Up @@ -529,21 +572,20 @@ func init() {
type DestroyAgencyResponse struct {
}

type Disable DisableRequestType

func init() {
types.Add("eam:Disable", reflect.TypeOf((*Disable)(nil)).Elem())
}
type DisabledClusterFault struct {
EamAppFault

type DisableRequestType struct {
This types.ManagedObjectReference `xml:"_this"`
DisabledComputeResource []types.ManagedObjectReference `xml:"disabledComputeResource,omitempty"`
}

func init() {
types.Add("eam:DisableRequestType", reflect.TypeOf((*DisableRequestType)(nil)).Elem())
types.Add("eam:DisabledClusterFault", reflect.TypeOf((*DisabledClusterFault)(nil)).Elem())
}

type DisableResponse struct {
type DisabledClusterFaultFault DisabledClusterFault

func init() {
types.Add("eam:DisabledClusterFaultFault", reflect.TypeOf((*DisabledClusterFaultFault)(nil)).Elem())
}

type EamAppFault struct {
Expand Down Expand Up @@ -610,6 +652,12 @@ func init() {
types.Add("eam:EamInvalidState", reflect.TypeOf((*EamInvalidState)(nil)).Elem())
}

type EamInvalidStateFault EamInvalidState

func init() {
types.Add("eam:EamInvalidStateFault", reflect.TypeOf((*EamInvalidStateFault)(nil)).Elem())
}

type EamInvalidVibPackage struct {
EamRuntimeFault
}
Expand Down Expand Up @@ -679,23 +727,6 @@ func init() {
types.Add("eam:EamSystemFaultFault", reflect.TypeOf((*EamSystemFaultFault)(nil)).Elem())
}

type Enable EnableRequestType

func init() {
types.Add("eam:Enable", reflect.TypeOf((*Enable)(nil)).Elem())
}

type EnableRequestType struct {
This types.ManagedObjectReference `xml:"_this"`
}

func init() {
types.Add("eam:EnableRequestType", reflect.TypeOf((*EnableRequestType)(nil)).Elem())
}

type EnableResponse struct {
}

type ExtensibleIssue struct {
Issue

Expand All @@ -710,6 +741,12 @@ func init() {
types.Add("eam:ExtensibleIssue", reflect.TypeOf((*ExtensibleIssue)(nil)).Elem())
}

type GetMaintenanceModePolicy GetMaintenanceModePolicyRequestType

func init() {
types.Add("eam:GetMaintenanceModePolicy", reflect.TypeOf((*GetMaintenanceModePolicy)(nil)).Elem())
}

type GetMaintenanceModePolicyRequestType struct {
This types.ManagedObjectReference `xml:"_this"`
}
Expand All @@ -718,6 +755,10 @@ func init() {
types.Add("eam:GetMaintenanceModePolicyRequestType", reflect.TypeOf((*GetMaintenanceModePolicyRequestType)(nil)).Elem())
}

type GetMaintenanceModePolicyResponse struct {
Returnval string `xml:"returnval"`
}

type HostInMaintenanceMode struct {
VmDeployed
}
Expand Down Expand Up @@ -1313,6 +1354,12 @@ func init() {
type ScanForUnknownAgentVmResponse struct {
}

type SetMaintenanceModePolicy SetMaintenanceModePolicyRequestType

func init() {
types.Add("eam:SetMaintenanceModePolicy", reflect.TypeOf((*SetMaintenanceModePolicy)(nil)).Elem())
}

type SetMaintenanceModePolicyRequestType struct {
This types.ManagedObjectReference `xml:"_this"`
Policy string `xml:"policy"`
Expand All @@ -1322,6 +1369,9 @@ func init() {
types.Add("eam:SetMaintenanceModePolicyRequestType", reflect.TypeOf((*SetMaintenanceModePolicyRequestType)(nil)).Elem())
}

type SetMaintenanceModePolicyResponse struct {
}

type Uninstall UninstallRequestType

func init() {
Expand Down
8 changes: 4 additions & 4 deletions gen/gen.sh
Original file line number Diff line number Diff line change
Expand Up @@ -48,25 +48,25 @@ generate() {
}

#
# All types derive from vCenter build 17986435, vSphere 7.0U2 Hot Patch 4
# All types derive from vCenter build 18700403, vSphere 7.0U3.
#
export COPYRIGHT_DATE_RANGE="2014-2021"

#
# FORCE_BASE_INTERFACE_FOR_TYPES defines the types that we want to
# generate base interfaces for. The type names should be comma seperated -
# e.g. "TypeA,TypeB,TypeC"
# e.g. "TypeA,TypeB,TypeC".
#
export FORCE_BASE_INTERFACE_FOR_TYPES="AgencyConfigInfo"

# ./sdk/ contains the contents of wsdl.zip from vimbase build 17354719
# ./sdk/ contains the contents of wsdl.zip from vimbase build 18281059.
generate "../vim25" "vim" "./rbvmomi/vmodl.db" # from github.com/vmware/rbvmomi@v3.0.0
generate "../pbm" "pbm"
generate "../vslm" "vslm"
generate "../sms" "sms"

# ./sdk/ contains the files eam-messagetypes.xsd and eam-types.xsd from
# eam-wsdl.zip, from eam-vcenter build 17490501.
# eam-wsdl.zip, from eam-vcenter build 18281060.
#
# Please note the EAM files are also available at the following, public URL --
# http://bit.ly/eam-sdk, therefore the WSDL resource for EAM are in fact
Expand Down
1 change: 1 addition & 0 deletions pbm/types/enum.go
Original file line number Diff line number Diff line change
Expand Up @@ -171,6 +171,7 @@ const (
PbmObjectTypeVirtualDiskId = PbmObjectType("virtualDiskId")
PbmObjectTypeVirtualDiskUUID = PbmObjectType("virtualDiskUUID")
PbmObjectTypeDatastore = PbmObjectType("datastore")
PbmObjectTypeVsanObjectId = PbmObjectType("vsanObjectId")
PbmObjectTypeFileShareId = PbmObjectType("fileShareId")
PbmObjectTypeUnknown = PbmObjectType("unknown")
)
Expand Down
Loading

0 comments on commit ffd45c8

Please sign in to comment.