-
Notifications
You must be signed in to change notification settings - Fork 4k
ProxyAgent support in Compute #27936
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
and make high priority refactoring/code clean up to file
Thanks for your contribution! The pull request validation has started. Please revisit this comment for updated status. |
…zure-powershell into feature/cplat-mspCompute
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.
Pull Request Overview
This PR adds support for the Metadata Security Protocol (ProxyAgent) on virtual machines and VM scale sets by introducing new parameters, cmdlets, and wiring through the compute strategies and VMSS creation logic.
- Added
-EnableProxyAgent
toNew-AzVM
andNew-AzVmss
and-ProxyAgentKeyIncarnationId
toUpdate-AzVmssVM
cmdlet help - Implemented
Set-AzVMProxyAgentSetting
andSet-AzVmssProxyAgentSetting
cmdlets - Updated compute strategies and manual VMSS creation to propagate and conditionally apply the proxy agent settings
Reviewed Changes
Copilot reviewed 12 out of 16 changed files in this pull request and generated no comments.
Show a summary per file
File | Description |
---|---|
src/Compute/Compute/help/*.md | Added ProxyAgent parameters and help placeholders |
src/Compute/Compute/VirtualMachine/Config/SetAzVMProxyAgentSetting.cs | Implemented Set-AzVMProxyAgentSetting cmdlet |
src/Compute/Compute/Strategies/ComputeRp/*.cs | Extended strategy methods to accept and assign enableProxyAgent |
src/Compute/Compute/Manual/VirtualMachineScaleSetCreateOrUpdateMethod.cs | Refactored VMSS creation, introduced helper methods, and added ProxyAgent wiring |
src/Compute/Compute/Common/ConstantStringTypes.cs | Added HyperVGenerations constants |
src/Compute/Compute/ChangeLog.md | Documented upcoming release changes |
src/Compute/Compute/Az.Compute.psd1 | Exported new cmdlets |
Comments suppressed due to low confidence (10)
src/Compute/Compute/help/Set-AzVmssProxyAgentSetting.md:11
- The synopsis placeholder is still present. Please provide a concise one-line summary of this cmdlet's purpose.
{{ Fill in the Synopsis }}
src/Compute/Compute/help/Set-AzVMProxyAgentSetting.md:22
- The description placeholder is still present. Please add a brief explanation of what this cmdlet does and when to use it.
{{ Fill in the Description }}
src/Compute/Compute/help/Update-AzVmssVM.md:174
- Grammar: change to 'Increasing the value of this parameter allows users to reset the key used for securing the communication channel between guest and host.'
Increase the value of this parameter allows users to reset the key used for securing communication channel between guest and host.
src/Compute/Compute/VirtualMachine/Config/SetAzVMProxyAgentSetting.cs:28
- Class name does not match the cmdlet noun. Rename to SetAzVMProxyAgentSetting for consistency with the exported cmdlet name.
public class SetAzureVMProxySetting : Microsoft.Azure.Commands.ResourceManager.Common.AzureRMCmdlet
src/Compute/Compute/help/New-AzVmss.md:42
- The syntax block omits a type for
-EnableProxyAgent
. It should include<SwitchParameter>
(or<Boolean>
) for consistency.
[-SkuProfileAllocationStrategy <String>] [-EnableProxyAgent] [-DefaultProfile <IAzureContextContainer>]
src/Compute/Compute/help/New-AzVM.md:33
- The syntax block omits a type for
-EnableProxyAgent
. Please specify<SwitchParameter>
for clarity and help generation.
[-AlignRegionalDisksToVMZone] [-EnableProxyAgent] [-DefaultProfile <IAzureContextContainer>]
src/Compute/Compute/ChangeLog.md:25
- Changelog references incorrect cmdlet names. It should list
Set-AzVmssProxyAgentSetting
andSet-AzVMProxyAgentSetting
to match the actual exports.
* Added new cmdlets `Set-AzVmssProxyAgent` and `Set-AzVMProxyAgent` to set the proxy agent settings for VM and VMSS.`
src/Compute/Compute/Strategies/ComputeRp/VirtualMachineStrategy.cs:161
- Unconditionally instantiating SecurityProfile may send empty profiles when no security or proxy settings are set. Consider restoring a conditional check so SecurityProfile is only created when needed.
SecurityProfile = new SecurityProfile
src/Compute/Compute/Strategies/ComputeRp/VirtualMachineScaleSetStrategy.cs:112
- Similar to VM strategy, SecurityProfile is always instantiated. Wrap in a condition or preserve null when no settings (including enableProxyAgent) are provided.
SecurityProfile = new SecurityProfile
src/Compute/Compute/Manual/VirtualMachineScaleSetCreateOrUpdateMethod.cs:457
- References to
DefaultPortRangeSize
andFirstPortRangeStart
are unresolved: ensure these constants are defined or imported, or restore the original literal values.
FirstPortRangeStart + i * DefaultPortRangeSize))
Added test, but tested more locally with @hmyan90 |
@grizzlytheodore, please fix the CI errors. |
|
requesting OOB release for this along with |
Description
https://github.com/Azure/azure-powershell-cmdlet-review-pr/issues/1483
Mandatory Checklist
Please choose the target release of Azure PowerShell. (⚠️ Target release is a different concept from API readiness. Please click below links for details.)
Check this box to confirm: I have read the Submitting Changes section of
CONTRIBUTING.md
and reviewed the following information:ChangeLog.md
file(s) appropriatelysrc/{{SERVICE}}/{{SERVICE}}/ChangeLog.md
.## Upcoming Release
header in the past tense.ChangeLog.md
if no new release is required, such as fixing test case only.