-
Notifications
You must be signed in to change notification settings - Fork 3.8k
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
Az.network function1 #18966
Az.network function1 #18966
Conversation
src/NetworkFunction/custom/Get-AzNetworkFunctionAzureTrafficCollector.ps1
Outdated
Show resolved
Hide resolved
Could you explain what's your purpose to do this customization so that we can check whether your PR is the correct way to do so? |
|
As you said,
Did this change check into azure-rest-api-spec? Can we do this work just updating the commit id of swagger? |
I have made this change in the Readme. I see 2 cmdlets generated, is this correct?
We haven't changed our swagger. If the swagger is checked in, will we still need any customization from Powershell side for this cmdlet? |
Yes, they should be from OperationId AzureTrafficCollectorsBySubscription_List and AzureTrafficCollectorsByResourceGroup_List. Does current Get-AzTrafficCollectors match your requirement now?
it depends what change has been done in swagger side. Removing module doesn't matter in preview module. Az.NetworkFunction is 0.1.0. all module is in preview status when its version is lower than 1.0.0 |
Yes it matches the requirement now. Just 1 question - is there a reason why this isn't part of the automated pipeline in Powershell? If this is a common scenario needed by multiple teams, is there a reason we need to do this manually and it's not automated?
Ok, we are trying to make the resource as a tracked resource in swagger. Currently it is a proxy resource. Once this is done, location property should automatically be added as per our understanding - pls correct if wrong. |
As we assume that an operation id should follow pattern {Noun}_{Verb}, so our generator recognizes
I guess you can modify swagger by directive to make the resource as a tracked resource by far to reach your goal.
|
Thanks - we have made the swagger change and PR is under review: Azure/azure-rest-api-specs#19888 |
That's good. We have two options now.
|
src/NetworkFunction/custom/Set-AzNetworkFunctionCollectorPolicy.ps1
Outdated
Show resolved
Hide resolved
src/NetworkFunction/custom/New-AzNetworkFunctionTrafficCollector.ps1
Outdated
Show resolved
Hide resolved
like @isra-fel said, the best way is marking Location in TrackedResource as required. Is it doable? |
We have time constraints since we have our public preview this month. Changing swagger again would require us to go through more review processes and would need additional testing. Is it possible to keep the customization on the powershell side? Thanks. |
Looks good to me. No update-* cmdlet is expected, is it? |
Actually, the set cmdlets that we had included in the earlier commit were supposed to be the update cmdlets. I have added them again, and named them as update and also made the location property mandatory in them. Those cmdlets are used for updating the traffic collector and collector policy. |
Hi @BethanyZhou @isra-fel Is this good to be merged? |
@kukulkarni1 Hi, can you write down a list of changes that we can put into change log? |
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 fix these issues in examples. And don't forget to run ./build-module.ps1 to refresh doc/ folder.
"Module","Cmdlet","Example","Line","RuleName","ProblemId","Severity","Description","Extent","Remediation"
"NetworkFunction","Get-AzNetworkFunctionCollectorPolicy","1","1","Invalid_Parameter_Name","5011","1","Get-AzNetworkFunctionCollectorPolicy -resourcegroup is not a valid parameter name.","-resourcegroup","Check validity of the parameter -resourcegroup."
"NetworkFunction","Get-AzNetworkFunctionTrafficCollector","2","1","Invalid_Parameter_Name","5011","1","Get-AzNetworkFunctionTrafficCollector -ResourceGroup is not a valid parameter name.","-ResourceGroup","Check validity of the parameter -ResourceGroup."
"NetworkFunction","Get-AzNetworkFunctionTrafficCollector","3","1","Invalid_Parameter_Name","5011","1","Get-AzNetworkFunctionTrafficCollector -ResourceGroup is not a valid parameter name.","-ResourceGroup","Check validity of the parameter -ResourceGroup."
"NetworkFunction","New-AzNetworkFunctionCollectorPolicy","1","1","Unassigned_Parameter","5013","1","New-AzNetworkFunctionCollectorPolicy -azuretrafficcollectorname must be assigned with a value.","-azuretrafficcollectorname","Assign value for the parameter -azuretrafficcollectorname."
"NetworkFunction","New-AzNetworkFunctionCollectorPolicy","1","1","Invalid_Parameter_Name","5011","1","New-AzNetworkFunctionCollectorPolicy -atc is not a valid parameter name.","-atc","Check validity of the parameter -atc."
"NetworkFunction","New-AzNetworkFunctionCollectorPolicy","1","1","Invalid_Parameter_Name","5011","1","New-AzNetworkFunctionCollectorPolicy -resourcegroup is not a valid parameter name.","-resourcegroup","Check validity of the parameter -resourcegroup."
"NetworkFunction","New-AzNetworkFunctionTrafficCollector","1","1","Invalid_Parameter_Name","5011","1","New-AzNetworkFunctionTrafficCollector -resourcegroup is not a valid parameter name.","-resourcegroup","Check validity of the parameter -resourcegroup."
"NetworkFunction","Remove-AzNetworkFunctionCollectorPolicy","1","1","Invalid_Parameter_Name","5011","1","Remove-AzNetworkFunctionCollectorPolicy -resourcegroup is not a valid parameter name.","-resourcegroup","Check validity of the parameter -resourcegroup."
"NetworkFunction","Remove-AzNetworkFunctionTrafficCollector","1","1","Invalid_Parameter_Name","5011","1","Remove-AzNetworkFunctionTrafficCollector -resourcegroup is not a valid parameter name.","-resourcegroup","Check validity of the parameter -resourcegroup."
"NetworkFunction","Update-AzNetworkFunctionCollectorPolicy","1","1","Unassigned_Parameter","5013","1","Update-AzNetworkFunctionCollectorPolicy -azuretrafficcollectorname must be assigned with a value.","-azuretrafficcollectorname","Assign value for the parameter -azuretrafficcollectorname."
"NetworkFunction","Update-AzNetworkFunctionCollectorPolicy","1","1","Invalid_Parameter_Name","5011","1","Update-AzNetworkFunctionCollectorPolicy -atc is not a valid parameter name.","-atc","Check validity of the parameter -atc."
"NetworkFunction","Update-AzNetworkFunctionCollectorPolicy","1","1","Invalid_Parameter_Name","5011","1","Update-AzNetworkFunctionCollectorPolicy -resourcegroup is not a valid parameter name.","-resourcegroup","Check validity of the parameter -resourcegroup."
"NetworkFunction","Update-AzNetworkFunctionTrafficCollector","1","1","Invalid_Parameter_Name","5011","1","Update-AzNetworkFunctionTrafficCollector -resourcegroup is not a valid parameter name.","-resourcegroup","Check validity of the parameter -resourcegroup."
"NetworkFunction","Update-AzNetworkFunctionTrafficCollectorTag","1","1","Invalid_Parameter_Name","5011","1","Update-AzNetworkFunctionTrafficCollectorTag -resourcegroup is not a valid parameter name.","-resourcegroup","Check validity of the parameter -resourcegroup."
|
I have renamed the resourcegroup parameter to resourcegroupname in the examples. also pushed the latest doc folder after running ./build-modules.ps1 |
Description
Added custom script for get traffic collector
Checklist
CONTRIBUTING.md
and reviewed the following information:generation
branch.ChangeLog.md
file(s) appropriatelyChangeLog.md
file can be found atsrc/{{SERVICE}}/{{SERVICE}}/ChangeLog.md
## Upcoming Release
header in the past tense. Add changelog in description section if PR goes intogeneration
branch.ChangeLog.md
if no new release is required, such as fixing test case only.