-
Notifications
You must be signed in to change notification settings - Fork 4k
Routing support for IotHub #3998
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
@ssankar1984, |
Can one of the admins verify this patch? |
@azuresdkci add to whitelist |
resolved conflict |
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.
Since this involves changes to your cmdlet surface, you must send us the changes to the public interface for review before this cna be accepted (md file changes suffice).
I don't understand the various routing properties and why there are so many of them, please send an explanation, come to an office hours, or set up a review time.
Please include a description of changes in your changelog.
<Reference Include="Newtonsoft.Json, Version=6.0.0.0, Culture=neutral, PublicKeyToken=30ad4fe6b2a6aeed, processorArchitecture=MSIL"> | ||
<HintPath>..\..\packages\Newtonsoft.Json.6.0.8\lib\net45\Newtonsoft.Json.dll</HintPath> | ||
<Private>True</Private> | ||
<Reference Include="Newtonsoft.Json, Version=9.0.0.0, Culture=neutral, PublicKeyToken=30ad4fe6b2a6aeed, 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.
Remove
@@ -156,6 +153,7 @@ | |||
</EmbeddedResource> | |||
</ItemGroup> | |||
<ItemGroup> | |||
<None Include="app.config" /> |
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
<package id="Newtonsoft.Json" version="6.0.8" targetFramework="net45" /> | ||
</packages> | ||
<package id="Microsoft.Rest.ClientRuntime.Azure.Authentication" version="2.3.0" targetFramework="net452" /> | ||
<package id="Newtonsoft.Json" version="9.0.1" 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.
Remove
@@ -85,6 +85,7 @@ | |||
<Compile Include="Serialization\ModelConversionExtensions.cs" /> | |||
</ItemGroup> | |||
<ItemGroup> | |||
<None Include="app.config" /> |
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
<Reference Include="Newtonsoft.Json, Version=6.0.0.0, Culture=neutral, PublicKeyToken=30ad4fe6b2a6aeed, processorArchitecture=MSIL"> | ||
<SpecificVersion>False</SpecificVersion> | ||
<HintPath>..\..\..\packages\Newtonsoft.Json.6.0.8\lib\net45\Newtonsoft.Json.dll</HintPath> | ||
<Reference Include="Newtonsoft.Json, Version=9.0.0.0, Culture=neutral, PublicKeyToken=30ad4fe6b2a6aeed, 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.
remove
Mandatory = false, | ||
HelpMessage = "Routes")] | ||
[ValidateNotNullOrEmpty] | ||
public List<PSRouteProperties> Routes { 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.
What is the difference between RouteProperties and routing properties? You shoiuld just take an array of the type rather than a list. Also, parameter name should be singular (Route)
Mandatory = false, | ||
HelpMessage = "Fallback Routes")] | ||
[ValidateNotNullOrEmpty] | ||
public PSFallbackRouteProperties FallbackRoute { 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.
Is it really necessary to have 3 different types for these 3 kinds of route 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.
We should rename the rout property types to make the distinction clear, the List<> type should be an array, and parameter names should be singular.
/// <summary> | ||
/// The properties related to service bus queue endpoint types. | ||
/// </summary> | ||
public partial class PSRoutingServiceBusQueueEndpointProperties |
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.
What is the rationale for having a separate class for this? Isn't there a more generic Routing Proeprties that will do?
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 need separate classes , discussed offline
@@ -32,5 +32,5 @@ | |||
// You can specify all the values or you can default the Build and Revision Numbers | |||
// by using the '*' as shown below: | |||
// [assembly: AssemblyVersion("1.0.*")] | |||
[assembly: AssemblyVersion("2.0.0")] | |||
[assembly: AssemblyVersion("2.0.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.
Do not change
@@ -39,7 +38,7 @@ Adds a new consumergroup named "myconsumergroup" to the eventhub for operations | |||
## PARAMETERS | |||
|
|||
### -EventHubConsumerGroupName | |||
Name of the EventHub ConsumerGroup that you want to add. | |||
EventHubConsumerGroupName. |
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 use complete sentences in the help descriptions. This applies acrosss the board to all help files
…hell into preview # Conflicts: # src/ResourceManager/Profile/Commands.Profile/packages.config
@@ -146,6 +132,10 @@ | |||
<Project>{5ee72c53-1720-4309-b54b-5fb79703195f}</Project> | |||
<Name>Commands.Common</Name> | |||
</ProjectReference> | |||
<ProjectReference Include="..\..\Common\Commands.Common.Authentication.ResourceManager\Commands.Common.Authentication.ResourceManager.csproj"> |
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 really should not need this reference
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.
@ssankar1984 Not removed. Please push the changes to your branch.
@@ -37,8 +37,50 @@ function Test-AzureRmIotHubLifecycle | |||
# Create or Update Resource Group | |||
$resourceGroup = New-AzureRmResourceGroup -Name $ResourceGroupName -Location $Location | |||
|
|||
Write-Debug " Create new eventHub " | |||
$namespaceName = "IotHubPSEHNamespaceTest" |
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 should not hard code names in the tests, you should generate names using test common code. This allows tests to be used against any subscription
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 run against all subs , I see this pattern followed all over the test , this helps us to delete resources if it was there before while running a new test and therefore not leave undeleted resources without usage in the subscription. For test common code , are you suggesting passing this param ?
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 am suggesting generating the parameter based on a prefix, there are lots of examples of using the test library to do this.
@@ -37,30 +37,24 @@ | |||
<Reference Include="Hyak.Common"> | |||
<HintPath>..\..\..\packages\Hyak.Common.1.0.3\lib\portable-net403+win+wpa81\Hyak.Common.dll</HintPath> | |||
</Reference> | |||
<Reference Include="Microsoft.Azure.Management.EventHub, Version=1.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.
Why do you add this depednency on EventHub? This creates a cross-depednency on EventHub managemrnt client between this module and the Evnethub module. Please remove this, or consider moving any necessary methods into common 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.
good catch ! , 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.
@ssankar1984 Not removed.
</Reference> | ||
<Reference Include="Microsoft.Threading.Tasks.Extensions.Desktop"> | ||
<HintPath>..\..\..\packages\Microsoft.Bcl.Async.1.0.168\lib\net40\Microsoft.Threading.Tasks.Extensions.Desktop.dll</HintPath> | ||
<Reference Include="Microsoft.Rest.ClientRuntime.Azure.Authentication, Version=2.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.
Remove this reference
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.
Not removed.
@@ -178,6 +179,10 @@ | |||
</EmbeddedResource> | |||
</ItemGroup> | |||
<ItemGroup> | |||
<Content Include="Microsoft.Azure.Commands.IotHub.dll-Help.xml"> |
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. Follow the directions here for creating help markdowns: https://github.com/Azure/azure-powershell/blob/preview/documentation/help-generation.md
@@ -97,7 +101,7 @@ public class SetAzureRmIotHub : IotHubBaseCmdlet | |||
[Parameter( | |||
ParameterSetName = UpdateFileUploadPropertiesParameterSet, | |||
Mandatory = false, | |||
HelpMessage = "fileUploadNotificationMaxDeliveryCount")] | |||
HelpMessage = "FileUploadNotificationMaxDeliveryCount")] |
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 a help message, you are merely copying the name of the parameter
Mandatory = false, | ||
HelpMessage = "RoutingProperties")] | ||
[ValidateNotNullOrEmpty] | ||
public PSRoutingProperties RoutingProperties { 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.
We discussed this. These type names need to be disambiguated
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 changed the type name for RouteProperties , are you suggesting changing this too ? So we have the following now ...
PSRoutingProperties
PSRouteMetadata
PSFallbackRouteMetadata
PSEndpoints
Please suggest if you want these to be changed...
@@ -0,0 +1,2634 @@ | |||
<?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.
Remove this file
@@ -8,7 +8,7 @@ Locale: en-US | |||
|
|||
# AzureRM.IotHub Module | |||
## Description | |||
Commands for Managing Azure IotHubs | |||
{{Manually Enter Description 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.
Need a 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.
fixed
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.
Still need to fix all the help descriptions to be meaningful
@@ -73,7 +73,7 @@ | |||
</Reference> | |||
<Reference Include="Microsoft.Rest.ClientRuntime, Version=2.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35, processorArchitecture=MSIL"> | |||
<HintPath>..\..\packages\Microsoft.Rest.ClientRuntime.2.3.5\lib\net45\Microsoft.Rest.ClientRuntime.dll</HintPath> | |||
<Private>True</Private> |
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 any changes to this 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.
The true is removed and added and therefore it shows as a diff
@@ -24,4 +24,4 @@ | |||
<package id="xunit.extensibility.core" version="2.1.0" targetFramework="net45" /> | |||
<package id="xunit.extensibility.execution" version="2.1.0" targetFramework="net45" /> | |||
<package id="xunit.runner.visualstudio" version="2.1.0" targetFramework="net45" /> | |||
</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 any changes to this 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.
removed
@@ -146,6 +132,10 @@ | |||
<Project>{5ee72c53-1720-4309-b54b-5fb79703195f}</Project> | |||
<Name>Commands.Common</Name> | |||
</ProjectReference> | |||
<ProjectReference Include="..\..\Common\Commands.Common.Authentication.ResourceManager\Commands.Common.Authentication.ResourceManager.csproj"> |
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.
@ssankar1984 Not removed. Please push the changes to your branch.
@@ -37,30 +37,24 @@ | |||
<Reference Include="Hyak.Common"> | |||
<HintPath>..\..\..\packages\Hyak.Common.1.0.3\lib\portable-net403+win+wpa81\Hyak.Common.dll</HintPath> | |||
</Reference> | |||
<Reference Include="Microsoft.Azure.Management.EventHub, Version=1.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.
@ssankar1984 Not removed.
</Reference> | ||
<Reference Include="Microsoft.Threading.Tasks.Extensions.Desktop"> | ||
<HintPath>..\..\..\packages\Microsoft.Bcl.Async.1.0.168\lib\net40\Microsoft.Threading.Tasks.Extensions.Desktop.dll</HintPath> | ||
<Reference Include="Microsoft.Rest.ClientRuntime.Azure.Authentication, Version=2.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.
Not removed.
@@ -8,7 +8,7 @@ Locale: en-US | |||
|
|||
# AzureRM.IotHub Module | |||
## Description | |||
Commands for Managing Azure IotHubs | |||
{{Manually Enter Description 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.
Still need to fix all the help descriptions to be meaningful
@@ -37,8 +37,50 @@ function Test-AzureRmIotHubLifecycle | |||
# Create or Update Resource Group | |||
$resourceGroup = New-AzureRmResourceGroup -Name $ResourceGroupName -Location $Location | |||
|
|||
Write-Debug " Create new eventHub " | |||
$namespaceName = "IotHubPSEHNamespaceTest" |
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 am suggesting generating the parameter based on a prefix, there are lots of examples of using the test library to do this.
<package id="Microsoft.Rest.ClientRuntime" version="2.3.5" targetFramework="net452" /> | ||
<package id="Microsoft.Rest.ClientRuntime.Azure" version="3.3.5" targetFramework="net452" /> | ||
<package id="Newtonsoft.Json" version="6.0.8" targetFramework="net452" /> | ||
<package id="Microsoft.IdentityModel.Clients.ActiveDirectory" version="2.28.3" 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.
remove
<package id="Microsoft.IdentityModel.Clients.ActiveDirectory" version="2.28.3" targetFramework="net452" /> | ||
<package id="Microsoft.Rest.ClientRuntime" version="2.3.8" targetFramework="net452" /> | ||
<package id="Microsoft.Rest.ClientRuntime.Azure" version="3.3.7" targetFramework="net452" /> | ||
<package id="Newtonsoft.Json" version="9.0.1" 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.
remove
@@ -9,9 +9,9 @@ | |||
<package id="Microsoft.Bcl.Build" version="1.0.14" targetFramework="net45" /> | |||
<package id="Microsoft.IdentityModel.Clients.ActiveDirectory" version="2.28.3" targetFramework="net45" /> | |||
<package id="Microsoft.Net.Http" version="2.2.28" targetFramework="net45" /> | |||
<package id="Microsoft.Rest.ClientRuntime" version="2.3.5" targetFramework="net45" /> |
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 change this file
@@ -61,22 +63,22 @@ Accept wildcard characters: False | |||
``` | |||
|
|||
### -PrimaryKey | |||
The Primary Key. | |||
PrimaryKey |
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 Primary Key
@@ -156,7 +156,9 @@ | |||
</EmbeddedResource> | |||
</ItemGroup> | |||
<ItemGroup> | |||
<None Include="packages.config" /> | |||
<None Include="packages.config"> |
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 revert this change
will close in favor of #4075 |
Description
Routing support for IotHub
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