Skip to content

Commit

Permalink
Merge pull request #1968 from AviatrixSystems/AVX-51277
Browse files Browse the repository at this point in the history
AVX-51277: Do not set bucket_name for config backup in Azure.
  • Loading branch information
dnardo committed Mar 6, 2024
1 parent 09ee978 commit 5e92924
Show file tree
Hide file tree
Showing 2 changed files with 16 additions and 11 deletions.
6 changes: 3 additions & 3 deletions .github/workflows/go.yml
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ jobs:
- name: Set up Go 1.x
uses: actions/setup-go@v3
with:
go-version: ^1.14
go-version: ^1.21
id: go

- name: Check out code into the Go module directory
Expand All @@ -40,7 +40,7 @@ jobs:
- name: Set up Go 1.x
uses: actions/setup-go@v3
with:
go-version: ^1.14
go-version: ^1.21
id: go

- name: Check out code into the Go module directory
Expand All @@ -64,5 +64,5 @@ jobs:
- name: golangci-lint
uses: golangci/golangci-lint-action@v3
with:
version: v1.52
version: v1.55
only-new-issues: true
21 changes: 13 additions & 8 deletions goaviatrix/controller.go
Original file line number Diff line number Diff line change
Expand Up @@ -155,15 +155,20 @@ func (c *Client) GetSecurityGroupManagementStatus() (*SecurityGroupInfo, error)

func (c *Client) EnableCloudnBackupConfig(cloudnBackupConfiguration *CloudnBackupConfiguration) error {
form := map[string]string{
"CID": c.CID,
"action": "enable_cloudn_backup_config",
"cloud_type": strconv.Itoa(cloudnBackupConfiguration.BackupCloudType),
"acct_name": cloudnBackupConfiguration.BackupAccountName,
"bucket_name": cloudnBackupConfiguration.BackupBucketName,
"storage_name": cloudnBackupConfiguration.BackupStorageName,
"container_name": cloudnBackupConfiguration.BackupContainerName,
"region": cloudnBackupConfiguration.BackupRegion,
"CID": c.CID,
"action": "enable_cloudn_backup_config",
"cloud_type": strconv.Itoa(cloudnBackupConfiguration.BackupCloudType),
"acct_name": cloudnBackupConfiguration.BackupAccountName,
"region": cloudnBackupConfiguration.BackupRegion,
}
// Azure has a set of different parameters that must be set.
if IsCloudType(cloudnBackupConfiguration.BackupCloudType, AzureArmRelatedCloudTypes) {
form["storage_name"] = cloudnBackupConfiguration.BackupStorageName
form["container_name"] = cloudnBackupConfiguration.BackupContainerName
} else {
form["bucket_name"] = cloudnBackupConfiguration.BackupBucketName
}

if cloudnBackupConfiguration.MultipleBackups == "true" {
form["multiple_bkup"] = "true"
}
Expand Down

0 comments on commit 5e92924

Please sign in to comment.