@@ -124,7 +124,7 @@ func (c *Manager) CreateDraft(clusterId string, spec CreateSpec) (string, error)
124
124
// ApplyDraft commits the draft with the specified ID
125
125
// https://developer.broadcom.com/xapis/vsphere-automation-api/latest/api/esx/settings/clusters/cluster/configuration/drafts
126
126
func (c * Manager ) ApplyDraft (clusterId , draftId string ) (ApplyResult , error ) {
127
- path := c .Resource (fmt .Sprintf (DraftPath , clusterId , draftId )).WithAction ( "apply" )
127
+ path := c .Resource (fmt .Sprintf (DraftPath , clusterId , draftId )).WithParam ( "action" , "apply" )
128
128
req := path .Request (http .MethodPost )
129
129
var res ApplyResult
130
130
return res , c .Do (context .Background (), req , & res )
@@ -133,15 +133,15 @@ func (c *Manager) ApplyDraft(clusterId, draftId string) (ApplyResult, error) {
133
133
// UpdateDraft updates the configuration of the draft with the specified ID
134
134
// https://developer.broadcom.com/xapis/vsphere-automation-api/latest/api/esx/settings/clusters/cluster/configuration/drafts
135
135
func (c * Manager ) UpdateDraft (clusterId , draftId string , spec UpdateSpec ) error {
136
- path := c .Resource (fmt .Sprintf (DraftPath , clusterId , draftId )).WithAction ( "update" )
136
+ path := c .Resource (fmt .Sprintf (DraftPath , clusterId , draftId )).WithParam ( "action" , "update" )
137
137
req := path .Request (http .MethodPost , spec )
138
138
return c .Do (context .Background (), req , nil )
139
139
}
140
140
141
141
// ImportFromHost sets a reference host to use as the source for the draft configuration
142
142
// https://developer.broadcom.com/xapis/vsphere-automation-api/latest/api/esx/settings/clusters/cluster/configuration/drafts
143
143
func (c * Manager ) ImportFromHost (clusterId , draftId string , spec ImportSpec ) (string , error ) {
144
- path := c .Resource (fmt .Sprintf (DraftPath , clusterId , draftId )).WithAction ( "importFromHost" ).WithParam ("vmw-task" , "true" )
144
+ path := c .Resource (fmt .Sprintf (DraftPath , clusterId , draftId )).WithParam ( "action" , "importFromHost" ).WithParam ("vmw-task" , "true" )
145
145
req := path .Request (http .MethodPost , spec )
146
146
var res string
147
147
return res , c .Do (context .Background (), req , & res )
@@ -150,7 +150,7 @@ func (c *Manager) ImportFromHost(clusterId, draftId string, spec ImportSpec) (st
150
150
// Precheck runs pre-checks for the provided draft on the specified cluster
151
151
// https://developer.broadcom.com/xapis/vsphere-automation-api/latest/api/esx/settings/clusters/cluster/configuration/drafts
152
152
func (c * Manager ) Precheck (clusterId , draftId string ) (string , error ) {
153
- path := c .Resource (fmt .Sprintf (DraftPath , clusterId , draftId )).WithAction ( "precheck" ).WithParam ("vmw-task" , "true" )
153
+ path := c .Resource (fmt .Sprintf (DraftPath , clusterId , draftId )).WithParam ( "action" , "precheck" ).WithParam ("vmw-task" , "true" )
154
154
req := path .Request (http .MethodPost )
155
155
var res string
156
156
return res , c .Do (context .Background (), req , & res )
0 commit comments