@@ -545,7 +545,7 @@ func resourceDeploymentDelete(ctx context.Context, d *schema.ResourceData, m int
545
545
}
546
546
547
547
// Gets the inputs and their types as map[string]string
548
- func getInputTypesMap (d * schema.ResourceData , apiClient * client.MulticloudIaaS ) map [string ]string {
548
+ func getInputTypesMap (d * schema.ResourceData , apiClient * client.API ) map [string ]string {
549
549
inputTypesMap := make (map [string ]string )
550
550
551
551
if _ , ok := d .GetOk ("inputs" ); ! ok {
@@ -584,7 +584,7 @@ func getInputTypesMap(d *schema.ResourceData, apiClient *client.MulticloudIaaS)
584
584
return inputTypesMap
585
585
}
586
586
587
- func getCatalogItemInputsByType (apiClient * client.MulticloudIaaS , catalogItemID string , catalogItemVersion string , inputValues interface {}) (map [string ]interface {}, error ) {
587
+ func getCatalogItemInputsByType (apiClient * client.API , catalogItemID string , catalogItemVersion string , inputValues interface {}) (map [string ]interface {}, error ) {
588
588
inputTypesMap , err := getCatalogItemInputTypesMap (apiClient , catalogItemID , catalogItemVersion )
589
589
if err != nil {
590
590
return nil , err
@@ -599,7 +599,7 @@ func getCatalogItemInputsByType(apiClient *client.MulticloudIaaS, catalogItemID
599
599
return inputs , nil
600
600
}
601
601
602
- func getCatalogItemInputTypesMap (apiClient * client.MulticloudIaaS , catalogItemID string , catalogItemVersion string ) (map [string ]string , error ) {
602
+ func getCatalogItemInputTypesMap (apiClient * client.API , catalogItemID string , catalogItemVersion string ) (map [string ]string , error ) {
603
603
log .Printf ("Getting Catalog Item Schema for catalog_item_id: [%v], catalog_item_version: [%v]" , catalogItemID , catalogItemVersion )
604
604
inputsSchemaMap , err := getCatalogItemSchema (apiClient , catalogItemID , catalogItemVersion )
605
605
if err != nil {
@@ -614,7 +614,7 @@ func getCatalogItemInputTypesMap(apiClient *client.MulticloudIaaS, catalogItemID
614
614
return inputTypesMap , nil
615
615
}
616
616
617
- func getBlueprintInputsByType (apiClient * client.MulticloudIaaS , blueprintID string , blueprintVersion string , inputValues interface {}) (map [string ]interface {}, error ) {
617
+ func getBlueprintInputsByType (apiClient * client.API , blueprintID string , blueprintVersion string , inputValues interface {}) (map [string ]interface {}, error ) {
618
618
inputTypesMap , err := getBlueprintInputTypesMap (apiClient , blueprintID , blueprintVersion )
619
619
if err != nil {
620
620
return nil , err
@@ -629,7 +629,7 @@ func getBlueprintInputsByType(apiClient *client.MulticloudIaaS, blueprintID stri
629
629
return inputs , nil
630
630
}
631
631
632
- func getBlueprintInputTypesMap (apiClient * client.MulticloudIaaS , blueprintID string , blueprintVersion string ) (map [string ]string , error ) {
632
+ func getBlueprintInputTypesMap (apiClient * client.API , blueprintID string , blueprintVersion string ) (map [string ]string , error ) {
633
633
log .Printf ("Getting Blueprint Schema for blueprint_id: [%v], blueprint_version: [%v]" , blueprintID , blueprintVersion )
634
634
inputsSchemaMap , err := getBlueprintSchema (apiClient , blueprintID , blueprintVersion )
635
635
if err != nil {
@@ -644,7 +644,7 @@ func getBlueprintInputTypesMap(apiClient *client.MulticloudIaaS, blueprintID str
644
644
return inputTypesMap , nil
645
645
}
646
646
647
- func getCatalogItemSchema (apiClient * client.MulticloudIaaS , catalogItemID string , catalogItemVersion string ) (map [string ]interface {}, error ) {
647
+ func getCatalogItemSchema (apiClient * client.API , catalogItemID string , catalogItemVersion string ) (map [string ]interface {}, error ) {
648
648
// Getting the catalog item schema
649
649
log .Printf ("Getting the schema for catalog item: %v version: %v" , catalogItemID , catalogItemVersion )
650
650
var catalogItemSchema interface {}
@@ -669,7 +669,7 @@ func getCatalogItemSchema(apiClient *client.MulticloudIaaS, catalogItemID string
669
669
return make (map [string ]interface {}), nil
670
670
}
671
671
672
- func getBlueprintSchema (apiClient * client.MulticloudIaaS , blueprintID string , blueprintVersion string ) (map [string ]models.PropertyDefinition , error ) {
672
+ func getBlueprintSchema (apiClient * client.API , blueprintID string , blueprintVersion string ) (map [string ]models.PropertyDefinition , error ) {
673
673
// Getting the blueprint inputs schema
674
674
log .Printf ("Getting the schema for catalog item: %v version: %v" , blueprintID , blueprintVersion )
675
675
var blueprintInputsSchema map [string ]models.PropertyDefinition
@@ -691,7 +691,7 @@ func getBlueprintSchema(apiClient *client.MulticloudIaaS, blueprintID string, bl
691
691
return blueprintInputsSchema , nil
692
692
}
693
693
694
- func deploymentStatusRefreshFunc (apiClient client.MulticloudIaaS , id string ) resource.StateRefreshFunc {
694
+ func deploymentStatusRefreshFunc (apiClient client.API , id string ) resource.StateRefreshFunc {
695
695
return func () (interface {}, string , error ) {
696
696
ret , err := apiClient .Deployments .GetDeploymentByIDV3UsingGET (
697
697
deployments .NewGetDeploymentByIDV3UsingGETParams ().
@@ -717,7 +717,7 @@ func deploymentStatusRefreshFunc(apiClient client.MulticloudIaaS, id string) res
717
717
}
718
718
}
719
719
720
- func updateDeploymentWithNewBlueprint (ctx context.Context , d * schema.ResourceData , m interface {}, apiClient * client.MulticloudIaaS ) diag.Diagnostics {
720
+ func updateDeploymentWithNewBlueprint (ctx context.Context , d * schema.ResourceData , m interface {}, apiClient * client.API ) diag.Diagnostics {
721
721
log .Printf ("Noticed changes to blueprint_id/blueprint_version/blueprint_content. Starting to update existing deployment..." )
722
722
723
723
blueprintID , blueprintVersion , blueprintContent := "" , "" , ""
@@ -831,7 +831,7 @@ func updateDeploymentWithNewBlueprint(ctx context.Context, d *schema.ResourceDat
831
831
return nil
832
832
}
833
833
834
- func updateDeploymentMetadata (d * schema.ResourceData , apiClient * client.MulticloudIaaS , deploymentUUID strfmt.UUID ) error {
834
+ func updateDeploymentMetadata (d * schema.ResourceData , apiClient * client.API , deploymentUUID strfmt.UUID ) error {
835
835
log .Printf ("Starting to update deployment name and description" )
836
836
description := d .Get ("description" ).(string )
837
837
name := d .Get ("name" ).(string )
@@ -852,7 +852,7 @@ func updateDeploymentMetadata(d *schema.ResourceData, apiClient *client.Multiclo
852
852
return nil
853
853
}
854
854
855
- func runDeploymentUpdateAction (ctx context.Context , d * schema.ResourceData , apiClient * client.MulticloudIaaS , deploymentUUID strfmt.UUID ) error {
855
+ func runDeploymentUpdateAction (ctx context.Context , d * schema.ResourceData , apiClient * client.API , deploymentUUID strfmt.UUID ) error {
856
856
log .Printf ("Noticed changes to inputs. Starting to update deployment with inputs" )
857
857
// Get the deployment actions
858
858
deploymentActions , err := apiClient .DeploymentActions .GetDeploymentActionsUsingGET2 (deployment_actions .
@@ -997,7 +997,7 @@ func getInputTypesMapFromBlueprintInputsSchema(schema map[string]models.Property
997
997
}
998
998
999
999
// Returns whether the day2 action is valid currently, exact action ID for a given action string
1000
- func getDeploymentDay2ActionID (apiClient * client.MulticloudIaaS , deploymentUUID strfmt.UUID , actionName string ) (bool , string , error ) {
1000
+ func getDeploymentDay2ActionID (apiClient * client.API , deploymentUUID strfmt.UUID , actionName string ) (bool , string , error ) {
1001
1001
// Get the deployment actions
1002
1002
deploymentActions , err := apiClient .DeploymentActions .GetDeploymentActionsUsingGET2 (deployment_actions .
1003
1003
NewGetDeploymentActionsUsingGET2Params ().WithDeploymentID (deploymentUUID ))
@@ -1026,7 +1026,7 @@ func getDeploymentDay2ActionID(apiClient *client.MulticloudIaaS, deploymentUUID
1026
1026
}
1027
1027
1028
1028
// Gets the schema for a given deployment action id
1029
- func getDeploymentActionSchema (apiClient * client.MulticloudIaaS , deploymentUUID strfmt.UUID , actionID string ) (map [string ]interface {}, error ) {
1029
+ func getDeploymentActionSchema (apiClient * client.API , deploymentUUID strfmt.UUID , actionID string ) (map [string ]interface {}, error ) {
1030
1030
// Getting the catalog item schema
1031
1031
log .Printf ("Getting the schema for deploymentID: %v, actionID: %v" , deploymentUUID , actionID )
1032
1032
var actionSchema interface {}
@@ -1046,7 +1046,7 @@ func getDeploymentActionSchema(apiClient *client.MulticloudIaaS, deploymentUUID
1046
1046
return make (map [string ]interface {}), nil
1047
1047
}
1048
1048
1049
- func getDeploymentActionInputTypesMap (apiClient * client.MulticloudIaaS , deploymentUUID strfmt.UUID , actionID string ) (map [string ]string , error ) {
1049
+ func getDeploymentActionInputTypesMap (apiClient * client.API , deploymentUUID strfmt.UUID , actionID string ) (map [string ]string , error ) {
1050
1050
inputsSchemaMap , err := getDeploymentActionSchema (apiClient , deploymentUUID , actionID )
1051
1051
if err != nil {
1052
1052
return nil , err
@@ -1059,7 +1059,7 @@ func getDeploymentActionInputTypesMap(apiClient *client.MulticloudIaaS, deployme
1059
1059
return inputTypesMap , nil
1060
1060
}
1061
1061
1062
- func runChangeOwnerDeploymentAction (ctx context.Context , d * schema.ResourceData , apiClient * client.MulticloudIaaS , deploymentUUID strfmt.UUID ) error {
1062
+ func runChangeOwnerDeploymentAction (ctx context.Context , d * schema.ResourceData , apiClient * client.API , deploymentUUID strfmt.UUID ) error {
1063
1063
oldOwner , newOwner := d .GetChange ("owner" )
1064
1064
log .Printf ("Noticed changes to owner. Starting to change deployment owner from %s to %s" , oldOwner .(string ), newOwner .(string ))
1065
1065
@@ -1097,7 +1097,7 @@ func runChangeOwnerDeploymentAction(ctx context.Context, d *schema.ResourceData,
1097
1097
return nil
1098
1098
}
1099
1099
1100
- func runAction (ctx context.Context , d * schema.ResourceData , apiClient * client.MulticloudIaaS , deploymentUUID strfmt.UUID , actionID string , inputs map [string ]interface {}, reason string ) error {
1100
+ func runAction (ctx context.Context , d * schema.ResourceData , apiClient * client.API , deploymentUUID strfmt.UUID , actionID string , inputs map [string ]interface {}, reason string ) error {
1101
1101
resourceActionRequest := models.ResourceActionRequest {
1102
1102
ActionID : actionID ,
1103
1103
Reason : reason ,
@@ -1129,7 +1129,7 @@ func runAction(ctx context.Context, d *schema.ResourceData, apiClient *client.Mu
1129
1129
return nil
1130
1130
}
1131
1131
1132
- func deploymentActionStatusRefreshFunc (apiClient client.MulticloudIaaS , deploymentUUID strfmt.UUID , requestID strfmt.UUID ) resource.StateRefreshFunc {
1132
+ func deploymentActionStatusRefreshFunc (apiClient client.API , deploymentUUID strfmt.UUID , requestID strfmt.UUID ) resource.StateRefreshFunc {
1133
1133
return func () (interface {}, string , error ) {
1134
1134
ret , err := apiClient .Deployments .GetDeploymentByIDV3UsingGET (
1135
1135
deployments .NewGetDeploymentByIDV3UsingGETParams ().
@@ -1158,7 +1158,7 @@ func deploymentActionStatusRefreshFunc(apiClient client.MulticloudIaaS, deployme
1158
1158
}
1159
1159
}
1160
1160
1161
- func deploymentDeleteStatusRefreshFunc (apiClient client.MulticloudIaaS , id string ) resource.StateRefreshFunc {
1161
+ func deploymentDeleteStatusRefreshFunc (apiClient client.API , id string ) resource.StateRefreshFunc {
1162
1162
return func () (interface {}, string , error ) {
1163
1163
ret , err := apiClient .Deployments .GetDeploymentByIDV3UsingGET (
1164
1164
deployments .NewGetDeploymentByIDV3UsingGETParams ().
0 commit comments