-
Notifications
You must be signed in to change notification settings - Fork 4k
Add a VHD DiskFile parameter set to existing New-AzureRmVM cmdlet #5105
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
[Parameter(ParameterSetName = DiskFileParameterSetNameStr, Mandatory = false, Position = 9, ValueFromPipelineByPropertyName = true)] | ||
[ValidateNotNullOrEmpty] | ||
[ValidateRange(1, 64)] | ||
public int? NumberOfUploaderThreads { get; set; } |
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.
int, instead of int?
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.
int
will default to 0
... but we want to set default to 2
if no value is specified, i.e. null
.
|
||
[Parameter(ParameterSetName = DiskLinkParameterSetNameStr, Mandatory = false, Position = 10, ValueFromPipelineByPropertyName = true)] | ||
[Parameter(ParameterSetName = DiskFileParameterSetNameStr, Mandatory = false, Position = 10, ValueFromPipelineByPropertyName = true)] | ||
public bool? CheckDiskLinkExistence { get; set; } |
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.
consider switch parameter
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.
ok
[Parameter(ParameterSetName = DiskLinkParameterSetNameStr, Mandatory = false, Position = 6, ValueFromPipelineByPropertyName = true)] | ||
[Parameter(ParameterSetName = DiskFileParameterSetNameStr, Mandatory = false, Position = 6, ValueFromPipelineByPropertyName = true)] | ||
[ValidateNotNullOrEmpty] | ||
public List<SecurityRule> SecurityRules { get; set; } |
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.
array instead of List
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.
Why?
using Microsoft.WindowsAzure.Storage; | ||
using Microsoft.WindowsAzure.Storage.Auth; | ||
using Microsoft.WindowsAzure.Storage.Blob; | ||
using System.Collections.Generic; |
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.
NIT: sort usings.
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.
OK
@@ -153,7 +153,7 @@ public class RemoveAzureRoleAssignmentCommand : ResourcesBaseCmdlet | |||
public SwitchParameter PassThru { get; set; } | |||
|
|||
[ValidateNotNullOrEmpty] | |||
[Parameter(Position = 0, Mandatory = true, ValueFromPipeline = true, ParameterSetName = ParameterSet.RoleAssignment, HelpMessage = "Role Assignment.")] | |||
[Parameter(Position = 0, Mandatory = true, ValueFromPipeline = true, ParameterSetName = "RoleAssignment", HelpMessage = "Role Assignment.")] |
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.
is this change necessary?
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.
I have to make this change, because it's breaking my build.
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 revert all ofthese changes outside the Compute project
[Parameter(ParameterSetName = DiskLinkParameterSetNameStr, Mandatory = true, Position = 1, ValueFromPipelineByPropertyName = true)] | ||
[Parameter(ParameterSetName = DiskFileParameterSetNameStr, Mandatory = true, Position = 1, ValueFromPipelineByPropertyName = true)] | ||
[ValidateNotNullOrEmpty] | ||
public string Location { get; set; } |
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.
Consider adding Zone parameter too.
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's for a single VM. Does a Zone
parameter help?
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.
If so, how?
``` | ||
|
||
### -VMSize | ||
Fill VMSize Description |
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.
in the help file, please indicate the default value when the parameter is not given.
@@ -64,9 +64,16 @@ | |||
<HintPath>..\..\..\packages\Microsoft.Azure.Management.KeyVault.2.3.0-preview\lib\net452\Microsoft.Azure.Management.KeyVault.dll</HintPath> | |||
<Private>True</Private> | |||
</Reference> | |||
<Reference Include="Microsoft.Azure.Management.Network, Version=15.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35, processorArchitecture=MSIL"> |
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.
do you need to update commands.compute project?
remove files under stackadmin and tools directory. |
72b6451
to
e85ba33
Compare
7f97618
to
d5084bc
Compare
@@ -0,0 +1,3 @@ | |||
<?xml version="1.0" encoding="utf-8"?> |
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.
Not needed
@@ -0,0 +1,126 @@ | |||
# |
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 should be in its own directory (Compute.ManagedService)
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.
They were in different folders from the initial commits...
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.
moved.
# ProcessorArchitecture = '' | ||
|
||
# Modules that must be imported into the global environment prior to importing this module | ||
RequiredModules = @(@{ModuleName = 'AzureRM.Profile'; ModuleVersion = '4.0.0'; }) |
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.
Update
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
<Private>True</Private> | ||
</Reference> | ||
<Reference Include="Microsoft.Azure.Management.Network, Version=15.1.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35, processorArchitecture=MSIL"> | ||
<HintPath>..\..\..\packages\Microsoft.Azure.Management.Network.15.1.0-preview\lib\net452\Microsoft.Azure.Management.Network.dll</HintPath> |
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 package should not take dependencies on any management clients other than Compute. Any required management operations should come from the Commands.Common.* common assembleis. This prevents modules from taking dependencies on incompatible versions of shared assemblies.
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.
OK
<HintPath>..\..\..\packages\Microsoft.Azure.Management.Resources.2.20.0-preview\lib\portable-net45+wp8+wpa81+win\Microsoft.Azure.ResourceManager.dll</HintPath> | ||
</Reference> | ||
<Reference Include="Microsoft.Data.Edm, Version=5.8.1.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35, processorArchitecture=MSIL"> | ||
<HintPath>..\..\..\packages\Microsoft.Data.Edm.5.8.2\lib\net40\Microsoft.Data.Edm.dll</HintPath> |
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.
Is WindowsAzure.Storage sued for this?
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.
Yes
|
||
[Parameter(ParameterSetName = DiskLinkParameterSetNameStr, Mandatory = false, Position = 9, ValueFromPipelineByPropertyName = true)] | ||
[Parameter(ParameterSetName = DiskFileParameterSetNameStr, Mandatory = false, Position = 9, ValueFromPipelineByPropertyName = true)] | ||
[ValidateNotNullOrEmpty] |
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.
As discussed, why do we need this parameter?
|
||
[Parameter(ParameterSetName = DiskLinkParameterSetNameStr, Mandatory = false, Position = 10, ValueFromPipelineByPropertyName = true)] | ||
[Parameter(ParameterSetName = DiskFileParameterSetNameStr, Mandatory = false, Position = 10, ValueFromPipelineByPropertyName = true)] | ||
public SwitchParameter NoDiskLinkExistenceCheck { get; set; } |
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.
SkipDiskLinkExistenceCheck
#> | ||
|
||
function Move-AzureRmVhdVM | ||
{ |
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.
I don't think we have figured out how to take the necessary depencency, or whether this shoudl be a cmdlet or a script
``` | ||
|
||
## DESCRIPTION | ||
Fill in the Description |
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 fill out the help data
@@ -153,7 +153,7 @@ public class RemoveAzureRoleAssignmentCommand : ResourcesBaseCmdlet | |||
public SwitchParameter PassThru { get; set; } | |||
|
|||
[ValidateNotNullOrEmpty] | |||
[Parameter(Position = 0, Mandatory = true, ValueFromPipeline = true, ParameterSetName = ParameterSet.RoleAssignment, HelpMessage = "Role Assignment.")] | |||
[Parameter(Position = 0, Mandatory = true, ValueFromPipeline = true, ParameterSetName = "RoleAssignment", HelpMessage = "Role Assignment.")] |
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 revert all ofthese changes outside the Compute project
d6e8797
to
bad01ab
Compare
@azuresdkci Test this please |
@@ -31,7 +31,7 @@ static class VirtualMachineStrategy | |||
p.ResourceGroupName, p.Name, null, p.CancellationToken), | |||
createOrUpdateAsync: (o, p) => o.CreateOrUpdateAsync( | |||
p.ResourceGroupName, p.Name, p.Model, p.CancellationToken), | |||
createTime: c => c.OsProfile.WindowsConfiguration != null ? 240 : 120); | |||
createTime: c => c.OsProfile == null ? 240 : c.OsProfile.WindowsConfiguration != null ? 240 : 120); |
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.
Do not use nested ? :
Combine two conditions or use if-then-else.
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 a lamda expression, so I just want to fit it into one line...
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.
Anyway, I will try not to use nested here.
using Microsoft.Azure.Management.Compute; | ||
using Microsoft.Azure.Management.Compute.Models; | ||
using Microsoft.Azure.Management.Internal.Resources.Models; | ||
using Microsoft.Azure.Commands.Compute.Strategies.ResourceManager; |
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.
NIT: order usings.
public string Size { get; set; } = "Standard_DS1_v2"; | ||
|
||
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.
NIT: unnecessary spaces
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
|
||
[Parameter(ParameterSetName = DiskFileParameterSet, Mandatory = true)] | ||
[ValidateNotNullOrEmpty] | ||
public string DiskFile { get; set; } |
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.
You need to update \help\New-AzureRmVM.md file for new parameters.
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.
ok
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.
Can we add this parameter to the SimpleSarameterSet
instead of creating a new parameter set?
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.
Then the parameter set would be mixed for image & disk file cases. I don't think it's actually a good way to do so. We may expand the DiskFile set later on, as well.
071131a
to
0df10c9
Compare
Cmdlet = this, | ||
BlobObjectFactory = new CloudPageBlobObjectFactory(storageCredentialsFactory, TimeSpan.FromMinutes(1)) | ||
}; | ||
if (!string.Equals(Environment.GetEnvironmentVariable("AZURE_TEST_MODE"), "playback", StringComparison.OrdinalIgnoreCase)) |
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.
@markcowl @hyonholee
Is it OK to do so?
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.
hmm.. I don't think this should be in dev code.
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 to increase testability & I think I somehow saw similar code somewhere.
``` | ||
|
||
### -DiskFile | ||
{{Fill DiskFile Description}} |
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.
Add description
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.
ok
@@ -248,30 +273,45 @@ Accept pipeline input: False | |||
Accept wildcard characters: False | |||
``` | |||
|
|||
### -Linux | |||
{{Fill Linux Description}} |
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.
Fill the description
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.
ok
666b685
to
290bffb
Compare
$thrownErrorMessage = ''; | ||
try | ||
{ | ||
$st = New-AzureRmVM -ResourceGroupName $rgname -Name $rgname -Location $loc -DiskFile $file; |
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.
I don't understand - you are catching an exception when this is supposed to be a positive test case. You are also not testing any properties of the VM. Please include an actual positive test case in which you create a valid VM and validate the expected properties of the resulting object.
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.
I'm puzzled by the test framework as well, as you can see in the checkpoint in the next few lines, the test will fail with either 'queue empty' or 'object not found' errors only in playback mode.
Azure.PowerShell.Netcore.sln
Outdated
@@ -1,50 +1,52 @@ | |||
| |||
Microsoft Visual Studio Solution File, Format Version 12.00 | |||
# Visual Studio 15 | |||
VisualStudioVersion = 15.0.27019.1 | |||
VisualStudioVersion = 15.0.27130.2010 |
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.
Why is this file changed? Did we need to add in the strategies project?
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.
The netcore build failed, so I had to do something with it, but maybe it's not needed to change the solution file. I will try to revert this particular part and see.
d566881
to
1865f89
Compare
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.
I would like to discuss if we can use Strategies
for disks as well as for other resources.
p.ResourceGroupName, p.Name, p.CancellationToken), | ||
createOrUpdateAsync: (o, p) => o.CreateOrUpdateAsync( | ||
p.ResourceGroupName, p.Name, p.Model, p.CancellationToken), | ||
createTime: d => 120); |
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.
Does it take 2 minutes (120 seconds) in average to create a disk ?
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.
I think it's about right. What would happen the real timespan is 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.
We use the number to show progress, it's ok if takes longer or shorter. We need an average.
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.
OK. Should be fine.
Name = disk.Name, | ||
CreateOption = DiskCreateOptionTypes.Attach, | ||
OsType = isWindows ? OperatingSystemTypes.Windows : OperatingSystemTypes.Linux, | ||
ManagedDisk = new ManagedDiskParameters |
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.
IMHO, we should modify the existing CreateVirtualMachineConfig
and have ResourceConfig<Disk>
disk as an optional parameter.
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.
Similar to the other comment.
|
||
namespace Microsoft.Azure.Commands.Compute | ||
{ | ||
[Cmdlet( | ||
VerbsCommon.New, | ||
ProfileNouns.VirtualMachine, | ||
SupportsShouldProcess = true, | ||
DefaultParameterSetName = "DefaultParameterSet")] | ||
DefaultParameterSetName = "SimpleParameterSet")] | ||
[OutputType(typeof(PSAzureOperationResponse), typeof(PSVirtualMachine))] |
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.
IMHO, we should still use DefaultParameterSet
as default.
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.
The parameter set with the least inputs should be the default, otherwise PS is not able to resolve which set the users want to use.
|
||
[Parameter(ParameterSetName = DiskFileParameterSet, Mandatory = true)] | ||
[ValidateNotNullOrEmpty] | ||
public string DiskFile { get; set; } |
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.
Can we add this parameter to the SimpleSarameterSet
instead of creating a new parameter set?
@@ -176,6 +209,9 @@ public override void ExecuteCmdlet() | |||
case SimpleParameterSet: | |||
this.StartAndWait(StrategyExecuteCmdletAsync); | |||
break; | |||
case DiskFileParameterSet: | |||
this.StartAndWait(StrategyExecuteCmdletAsync); |
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.
The implementation is identical for SimpleParameterSet
and DiskFileParameterSet
. This confirms that we don't need a new parameter set ;-)
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.
Similar comment.
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.
Yes, we actually need a parameter set to make Image and DiskFile mutually exclusive. Whether we need separate execution paths is a question.
AzureSession.Instance.ClientFactory.CreateArmClient<StorageManagementClient>(DefaultProfile.DefaultContext, | ||
AzureEnvironment.Endpoint.ResourceManager); | ||
var st1 = storageClient.StorageAccounts.Create(ResourceGroupName, Name, new StorageAccountCreateParameters | ||
{ |
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 would be good if call the Create
function as a part of dependency tree. I can help with this. In the future, we may generate Azure templates so let's discuss it.
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.
I tried, but not trivial. You can check storage account operations. They don't have Get
and they have GetProperties
, and they don't have CreateOrUpdate
and they use Create
, etc.
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 is one problem then. A user may specify a new resource group which doesn't exist yet. SimpleParameterSet
handles this but it will fail in DiskFileParameterSet
.
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.
I think I use the same RG strategy?
this ResourceConfig<ResourceGroup> resourceGroup,
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.
Oh, you mean in the storage creation...
Can we handle it as a bug item? It doesn't seem to be trivial, and it's not an issue for the Simple parameter set, and not a P0 blocker for DiskFile set as well...
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.
I'm fine with this as long as we track the issue.
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.
Created for tracking: #5279
@@ -176,6 +209,9 @@ public override void ExecuteCmdlet() | |||
case SimpleParameterSet: | |||
this.StartAndWait(StrategyExecuteCmdletAsync); | |||
break; | |||
case DiskFileParameterSet: | |||
this.StartAndWait(StrategyExecuteCmdletAsync); |
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.
Yes, we actually need a parameter set to make Image and DiskFile mutually exclusive. Whether we need separate execution paths is a question.
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.
Will it make sense to have another parameterset which accept disk Uri?
{ | ||
Name = SkuName.PremiumLRS | ||
}, | ||
#endif |
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.
Could we create a separate static function? For example
public static StorageAccountCreateParameters WithPremiumLRS(this StorageAccountCreateParameters p)
{
#if !NETSTANDARD
p.AccountType = AccountType.PremiumLRS;
#else
p.Sku = new SM.Sku
{
Name = SkuName.PremiumLRS
};
#endif
return p;
}
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.
@sergey-shandar When users give a disk file, & we upload it to the cloud, there should be no lease on it. However, if users directly refer to a disk link, it's not necessarily that case, so we need to think about what's the proper way to validate that. Thus, it's not included in this PR to make things too complicated.
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.
Regarding the macro conditionally separated code, I think we should be able to live with them for a while? Since eventually the Storage client is going to reconcile and use only the final set of input parameters. Then at that time, the static function will need to be removed as well, if they are added now.
AzureSession.Instance.ClientFactory.CreateArmClient<StorageManagementClient>(DefaultProfile.DefaultContext, | ||
AzureEnvironment.Endpoint.ResourceManager); | ||
var st1 = storageClient.StorageAccounts.Create(ResourceGroupName, Name, new StorageAccountCreateParameters | ||
{ |
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.
I'm fine with this as long as we track the issue.
Description
This checklist is used to make sure that common guidelines for a pull request are followed. You can find a more complete discussion of PowerShell cmdlet best practices here.
General Guidelines
Testing Guidelines
Cmdlet Signature Guidelines
ShouldProcess
and haveSupportShouldProcess=true
specified in the cmdlet attribute. You can find more information onShouldProcess
here.OutputType
attribute if any output is produced - if the cmdlet produces no output, it should implement aPassThru
parameter.Cmdlet Parameter Guidelines