-
Notifications
You must be signed in to change notification settings - Fork 4k
Add ThreatIntelWhitelist to AzFirewall commands #10390
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
Conversation
Can one of the admins verify this patch? |
Depends on #10386 |
Hi @b564518128 @number213 could you please take a look at this PR? Because there are too many changed files even after I merged the network-october. I don't think this make sense. |
This reverts commit e5fda3d.
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.
Please also consider renaming TestAzureFirewallAdditionalPropertyCRUD
. It made sense in Andrey's PR, but with ThreatIntel cmdlet it's confusing
...rk/Network/AzureFirewall/ThreatIntelWhitelist/NewAzureFirewallThreatIntelWhitelistCommand.cs
Outdated
Show resolved
Hide resolved
...rk/Network/AzureFirewall/ThreatIntelWhitelist/NewAzureFirewallThreatIntelWhitelistCommand.cs
Outdated
Show resolved
Hide resolved
Changed the test name |
hi @wyunchi-ms , I updated the PR and removed the unnecessary helper md. Please complete the PR |
Azure/azure-powershell-cmdlet-review-pr/issues/410 |
|
||
namespace Microsoft.Azure.Commands.Network | ||
{ | ||
[Cmdlet(VerbsCommon.New, ResourceManager.Common.AzureRMConstants.AzureRMPrefix + "FirewallThreatIntelWhitelist", SupportsShouldProcess = true), OutputType(typeof(PSAzureFirewallThreatIntelWhitelist))] |
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.
No need for shouldprocess cause this cmdlet is creating an in-memory object, not modifying anything on Azure
[Cmdlet(VerbsCommon.New, ResourceManager.Common.AzureRMConstants.AzureRMPrefix + "FirewallThreatIntelWhitelist", SupportsShouldProcess = true), OutputType(typeof(PSAzureFirewallThreatIntelWhitelist))] | |
[Cmdlet(VerbsCommon.New, ResourceManager.Common.AzureRMConstants.AzureRMPrefix + "FirewallThreatIntelWhitelist"), OutputType(typeof(PSAzureFirewallThreatIntelWhitelist))] |
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.
removed
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.
@isra-fel After I removed this, the check is emitting this error:
"New-AzFirewallThreatIntelWhitelist Does not support ShouldProcess but the cmdlet verb New indicates that it should.","Determine if the cmdlet should implement ShouldProcess and if so determine if it should implement Force / ShouldContinue"
Could you please take a loo?
src/Network/Network/Models/AzureFirewall/PSAzureFirewallThreatIntelWhitelist.cs
Outdated
Show resolved
Hide resolved
|
||
# Verify | ||
$getAzureFirewall = Get-AzFirewall -Name $azureFirewallName -ResourceGroupName $rgname | ||
Assert-AreEqual true (-not (Compare-Object $threatIntelWhitelist1.FQDNs $getAzureFirewall.ThreatIntelWhitelist.FQDNs)) |
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.
Assert-AreEqual true (-not (Compare-Object $threatIntelWhitelist1.FQDNs $getAzureFirewall.ThreatIntelWhitelist.FQDNs)) | |
Assert-AreEqualArray $threatIntelWhitelist1.FQDNs $getAzureFirewall.ThreatIntelWhitelist.FQDNs |
Same suggestion for the below assertions
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.
changed
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 is not changed
Unresolved one conversation. |
Description
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