Skip to content
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

[IoTCentral] resourceType became camel case, added industry, locations field to appTemplate API, added origin, properties field to operations API #18415

Merged
merged 7 commits into from
Feb 4, 2021
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions eng/mgmt/mgmtmetadata/iotcentral_resource-manager.txt
Original file line number Diff line number Diff line change
Expand Up @@ -4,11 +4,11 @@ Commencing code generation
Generating CSharp code
Executing AutoRest command
cmd.exe /c autorest.cmd https://github.com/Azure/azure-rest-api-specs/blob/master/specification/iotcentral/resource-manager/readme.md --csharp --version=v2 --reflect-api-versions --csharp.output-folder=C:\Users\pochen\Github\azure-sdk-for-net\sdk\iotcentral\Microsoft.Azure.Management.IotCentral\src\Generated
2021-01-06 01:06:39 UTC
2021-02-04 03:45:38 UTC
Azure-rest-api-specs repository information
GitHub fork: Azure
Branch: master
Commit: b5851f013e3e954c7356e7d7384ae5188f6944ca
Commit: 42fdd45e761f87132e85ed77caf30d5cac81aee5
AutoRest information
Requested version: v2
Bootstrapper version: autorest@2.0.4413

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Original file line number Diff line number Diff line change
Expand Up @@ -8,11 +8,13 @@
<Description>Provides management capabilities for Microsoft Azure IotCentral.</Description>
<AssemblyTitle>Microsoft Azure IotCentral Management</AssemblyTitle>
<AssemblyName>Microsoft.Azure.Management.IotCentral</AssemblyName>
<Version>3.0.0</Version>
<Version>3.1.0</Version>
<PackageTags>Microsoft Azure IotCentral;IotCentral management;IotCentral;</PackageTags>
<PackageReleaseNotes>
<![CDATA[
This release fix the incorrect field appTemplateName to name.
This release made sure the resourceType, iotApps is in camel case.
This release also added origin and properties field to operations API.
This release also added industry and locations field to appTemplate API.
]]>
</PackageReleaseNotes>
</PropertyGroup>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,8 +7,8 @@
[assembly: AssemblyTitle("Microsoft Azure IotCentral Management Library")]
[assembly: AssemblyDescription("Provides management functionality for Microsoft Azure IotCentral Resources.")]

[assembly: AssemblyVersion("3.0.0.0")]
[assembly: AssemblyFileVersion("3.0.0.0")]
[assembly: AssemblyVersion("3.1.0.0")]
[assembly: AssemblyFileVersion("3.1.0.0")]
[assembly: AssemblyConfiguration("")]
[assembly: AssemblyCompany("Microsoft")]
[assembly: AssemblyProduct("Microsoft Azure .NET SDK")]
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -66,16 +66,8 @@ public void TestIotCentralCreateLifeCycle()
// Get all Iot Apps in a subscription
var iotAppsBySubscription = this.iotCentralClient.Apps.ListBySubscription().ToList();

// Get all of the available IoT Apps REST API operations
var operationList = this.iotCentralClient.Operations.List().ToList();

// Get IoT Central Apps REST API read operation
var readOperation = operationList.Where(e => e.Name.Equals("Microsoft.IoTCentral/IotApps/Read", StringComparison.OrdinalIgnoreCase)).ToList();

Assert.True(iotAppsByResourceGroup.Count > 0);
Assert.True(iotAppsBySubscription.Count > 0);
Assert.True(operationList.Count > 0);
Assert.True(readOperation.Count.Equals(1));
}
}

Expand Down Expand Up @@ -216,6 +208,37 @@ public void TestAppTemplateNameField()
Assert.True(iotAppsTemplates.Count > 0);
Assert.NotNull(iotAppsTemplates[0].Name);
Assert.Equal("Store Analytics – Condition Monitoring", iotAppsTemplates[0].Name);
Assert.NotNull(iotAppsTemplates[0].Industry);
Assert.Equal("Retail", iotAppsTemplates[0].Industry);
Assert.True(iotAppsTemplates[0].Locations.Count > 0);
Assert.NotNull(iotAppsTemplates[0].Locations[0].Id);
Assert.Equal("unitedstates", iotAppsTemplates[0].Locations[0].Id);
Assert.NotNull(iotAppsTemplates[0].Locations[0].DisplayName);
Assert.Equal("United States", iotAppsTemplates[0].Locations[0].DisplayName);
}
}

[Fact]
public void TestIotCentralOperationsApi()
{
using (MockContext context = MockContext.Start(this.GetType()))
{
Initialize(context);

// Get all of the available IoT Apps REST API operations
var operationList = this.iotCentralClient.Operations.List().ToList();

Assert.True(operationList.Count > 0);

// Get IoT Central Apps REST API read operation
var readOperation = operationList.Where(e => e.Name.Equals("Microsoft.IoTCentral/IotApps/Read", StringComparison.OrdinalIgnoreCase)).ToList();
// Get IoT Central Apps REST API read metricDefinitions operation
var readMetricDefinitionsOperation = operationList.Where(e => e.Name.Equals("Microsoft.IoTCentral/IoTApps/providers/Microsoft.Insights/metricDefinitions/read", StringComparison.OrdinalIgnoreCase)).ToList();

Assert.True(readOperation.Count.Equals(1));
Assert.True(readMetricDefinitionsOperation.Count.Equals(1));
Assert.NotNull(readMetricDefinitionsOperation[0].Origin);
Assert.NotNull(readMetricDefinitionsOperation[0].Properties);
}
}

Expand Down

Large diffs are not rendered by default.

Loading