-
Notifications
You must be signed in to change notification settings - Fork 4k
Add new management cmdlets for Azure Location Based Services #5284
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
I see the break above --- something to do with 'mappings'? what's that? |
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.
Initial review comments
``` | ||
|
||
### -InputObject | ||
{{Fill InputObject 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 in the descriptions for all parameters in the help
# Test | ||
$accountname = 'csa' + $rgname; | ||
$skuname = 'S0'; | ||
$loc = 'West US'; |
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.
regions should not be hardcoded - this will keep maintainers from being able to run and record tests in some environments
New-AzureRmResourceGroup -Name $rgname -Location $loc; | ||
|
||
$createdAccount = New-AzureRmLocationBasedServicesAccount -ResourceGroupName $rgname -Name $accountname -SkuName $skuname -Force; | ||
Assert-NotNull $createdAccount; |
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 add some additional validation of the account properties
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
@JCookit A couple of things from a cursory review, will add some detail tomorrow |
@JCookit Also, the test is failing due to an app.config file in your test directory - you want to avoid using these for assembly binding redirects, as this can mask issues. |
- updated help files with missing descriptions - removed app.config and obsolete newtonsoft dependency
@markcowl |
- dynamically determine RG region in tests - also added PSSku object (was returning sdk model object before) - reran all unittests
@@ -0,0 +1,28 @@ | |||
<packages> |
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.
remove
# ProcessorArchitecture = '' | ||
|
||
# Modules that must be imported into the global environment prior to importing this module | ||
RequiredModules = @(@{ModuleName = 'AzureRM.Profile'; ModuleVersion = '3.3.2'; }) |
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.
Needs to sue the current version (4.1.1)
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.
got it
RequiredModules = @(@{ModuleName = 'AzureRM.Profile'; ModuleVersion = '3.3.2'; }) | ||
|
||
# Assemblies that must be loaded prior to importing this module | ||
# RequiredAssemblies = @() |
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.
Need to add your management assembly, and any other assemblies not used by other modules here (see the other psd1 files for samples)
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 just be our management assembly.
|
||
# A URL to an icon representing this module. | ||
# IconUri = '' | ||
|
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.
Need to add
Prerelease='preview'
here
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.
inside the PSData? ok.
/// <summary> | ||
/// Get Location Based Services Account by name, all accounts under resource group or all accounts under the subscription | ||
/// </summary> | ||
[Cmdlet(VerbsCommon.Get, LocationBasedServicesAccountNounStr), OutputType(typeof(PSLocationBasedServicesAccount))] |
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.
Need a DefaultParameterSetName, since there is more than one 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.
ok. does it matter which one? i picked.
<PropertyName>AccountName</PropertyName> | ||
</TableColumnItem> | ||
<TableColumnItem> | ||
<PropertyName>Id</PropertyName> |
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 other data that the user would liek to know about the account?
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.
At this time, our accounts themselves are dead simple. Nothing else interesting (at least that's exposed in the SDK... yet)
|
||
PrimaryKey SecondaryKey | ||
---------- ------------ | ||
yKp9encJJQyJMlxgj0gc4n5Iz9DheQyxt020Rwnd3a8 AeE4SoxPk6BrYZgRlqA8uuchLXzkTEHTpm3_iMaml2g |
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 might want to ensure that these are obviously redeacted (xxxxxxxx, yyyyyyyyyy, ***********, 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.
ya wasn't sure what best practice was. These keys are just examples; they won't work.
but i can redact.
<?xml version="1.0" encoding="utf-8"?> | ||
<packages> | ||
<package id="Microsoft.Azure.Management.LocationBasedServices" version="1.0.0" targetFramework="net452" /> | ||
<package id="Microsoft.Rest.ClientRuntime" version="2.3.10" targetFramework="net452" /> |
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.
don't need any entries other than your management client
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
EndProject | ||
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Commands.Common.Authorization", "..\..\Common\Commands.Common.Authorization\Commands.Common.Authorization.csproj", "{24508E26-154D-47F1-80EE-439BF0710996}" | ||
EndProject | ||
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Commands.Common.Graph.RBAC", "..\..\Common\Commands.Common.Graph.RBAC\Commands.Common.Graph.RBAC.csproj", "{269ACF73-0A34-42DC-AB9C-4B15931A489D}" |
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 include Commands.Common.Network, and Commands.Common.Storage projects, they are necessary for building Profile
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.
added Network (Storage was already there). fwiw, this isn't documented that i can find.
- Additional information about change #1 | ||
--> | ||
## Current Release | ||
* Integrate with Cognitive Services Management SDK version 2.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.
?? I don;t think this impacts this library
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're right. bad copy/paste from the project i was modeling after.
- fixed various metadata - added ResourceId parameter sets & DefaultParameterSets - updated help - improved and reran unittests
Description
New component: management plane cmdlets for Azure Location Based Services (a new service).
Previously worked on in azure-powershell-pr https://github.com/Azure/azure-powershell-pr/pull/369 with feedback here. Have incorporated this feedback.
Based on the swagger here and the .net SDK here.
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