@@ -394,15 +394,36 @@ func GetSupportedBootDevices(client *gophercloud.ServiceClient, id string) (r Su
394394 return
395395}
396396
397+ // An interface type for a deploy (or clean) step.
398+ type StepInterface string
399+
400+ const (
401+ InterfaceBIOS StepInterface = "bios"
402+ InterfaceDeploy StepInterface = "deploy"
403+ InterfaceManagement StepInterface = "management"
404+ InterfacePower StepInterface = "power"
405+ InterfaceRAID StepInterface = "raid"
406+ )
407+
397408// A cleaning step has required keys ‘interface’ and ‘step’, and optional key ‘args’. If specified,
398409// the value for ‘args’ is a keyword variable argument dictionary that is passed to the cleaning step
399410// method.
400411type CleanStep struct {
401- Interface string `json:"interface" required:"true"`
412+ Interface StepInterface `json:"interface" required:"true"`
402413 Step string `json:"step" required:"true"`
403414 Args map [string ]interface {} `json:"args,omitempty"`
404415}
405416
417+ // A deploy step has required keys ‘interface’, ‘step’, ’args’ and ’priority’.
418+ // The value for ‘args’ is a keyword variable argument dictionary that is passed to the deploy step
419+ // method. Priority is a numeric priority at which the step is running.
420+ type DeployStep struct {
421+ Interface StepInterface `json:"interface" required:"true"`
422+ Step string `json:"step" required:"true"`
423+ Args map [string ]interface {} `json:"args" required:"true"`
424+ Priority int `json:"priority" required:"true"`
425+ }
426+
406427// ProvisionStateOptsBuilder allows extensions to add additional parameters to the
407428// ChangeProvisionState request.
408429type ProvisionStateOptsBuilder interface {
@@ -418,11 +439,12 @@ type ConfigDrive struct {
418439}
419440
420441// ProvisionStateOpts for a request to change a node's provision state. A config drive should be base64-encoded
421- // gzipped ISO9660 image.
442+ // gzipped ISO9660 image. Deploy steps are supported starting with API 1.69.
422443type ProvisionStateOpts struct {
423444 Target TargetProvisionState `json:"target" required:"true"`
424445 ConfigDrive interface {} `json:"configdrive,omitempty"`
425446 CleanSteps []CleanStep `json:"clean_steps,omitempty"`
447+ DeploySteps []DeployStep `json:"deploy_steps,omitempty"`
426448 RescuePassword string `json:"rescue_password,omitempty"`
427449}
428450
0 commit comments