-
Notifications
You must be signed in to change notification settings - Fork 0
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Migrate BlobInventoryPolicy related cmdelts and Invoke-AzStorageAccountFailover to Track2 SDK #17
Conversation
this.ResourceGroupName, | ||
this.StorageAccountName); | ||
Track2.BlobInventoryPolicyResource policy = | ||
this.StorageClientTrack2.GetBlobInventoryPolicyResource(this.ResourceGroupName, this.StorageAccountName, "default").Get(); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks! Done
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It'd be better if the static string in a place that can be shared by other files also use the it (Set/RemoveAzureStorageBlobInventoryPolicy.cs).
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Sorry totally missed this comment. Will include this change in the next PR. Thanks a lot!
|
||
this.Enabled = policy.Policy.Enabled; | ||
this.Destination = policy.Policy.Destination; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Might need to add a comments to add the destination which is on a later API version.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Done
Enabled = this.Enabled, | ||
//Destination = this.Destination, | ||
Rules = invRules | ||
Policy = policySchema, |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It looks still still missing ID, Name, LastModified...
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This might not be an issue, since this function is only used in set-AzstorageStorageBlobInventoryPolicy, to parse the input the policy (PSH object) to the policy (SDK object) to set.
And I can understand SDK not allow to set them, since they should only be read from server, but not set by customer.
In a word, if PSH code works with it, I believe this will not be an issue.
Description
This PR includes migration of BlobInventoryPolicy related cmdlets and Invoke-AzStorageAccountFailover to Track2 SDK.
BlobInventoryPolicy related cmdlets include Get-AzStorageBlobInventoryPolicy, New-AzStorageBlobInventoryPolicyRule, Remove-AzStorageBlobInventoryPolicy, Set-AzStorageBlobInventoryPolicy
Checklist
CONTRIBUTING.md
ChangeLog.md
file(s) has been updated:ChangeLog.md
file can be found atsrc/{{SERVICE}}/{{SERVICE}}/ChangeLog.md
## Upcoming Release
header -- no new version header should be added