Skip to content

Commit 10c6a7d

Browse files
authored
Merge pull request #7582 from cle5eland/clthomps/iotc-powershell-mod-refactored
Powershell Module For IoT Central Application CRUD Management
2 parents b61106c + dc13be6 commit 10c6a7d

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

41 files changed

+4743
-0
lines changed

Azure.PowerShell.Netcore.sln

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -148,6 +148,8 @@ Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Commands.SignalR.Netcore",
148148
EndProject
149149
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Commands.DevSpaces.Netcore", "src\ResourceManager\DevSpaces\Commands.DevSpaces\Commands.DevSpaces.Netcore.csproj", "{6EBD1E1B-12D1-451D-B284-ED35A91D6C8C}"
150150
EndProject
151+
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Commands.IotCentral.Netcore", "src\ResourceManager\IotCentral\Commands.IotCentral\Commands.IotCentral.Netcore.csproj", "{18B8B354-6920-4329-AB6B-DC98790B7A5A}"
152+
EndProject
151153
Global
152154
GlobalSection(SolutionConfigurationPlatforms) = preSolution
153155
Debug|Any CPU = Debug|Any CPU
@@ -1033,6 +1035,18 @@ Global
10331035
{6EBD1E1B-12D1-451D-B284-ED35A91D6C8C}.Release|x64.Build.0 = Release|Any CPU
10341036
{6EBD1E1B-12D1-451D-B284-ED35A91D6C8C}.Release|x86.ActiveCfg = Release|Any CPU
10351037
{6EBD1E1B-12D1-451D-B284-ED35A91D6C8C}.Release|x86.Build.0 = Release|Any CPU
1038+
{18B8B354-6920-4329-AB6B-DC98790B7A5A}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
1039+
{18B8B354-6920-4329-AB6B-DC98790B7A5A}.Debug|Any CPU.Build.0 = Debug|Any CPU
1040+
{18B8B354-6920-4329-AB6B-DC98790B7A5A}.Debug|x64.ActiveCfg = Debug|Any CPU
1041+
{18B8B354-6920-4329-AB6B-DC98790B7A5A}.Debug|x64.Build.0 = Debug|Any CPU
1042+
{18B8B354-6920-4329-AB6B-DC98790B7A5A}.Debug|x86.ActiveCfg = Debug|Any CPU
1043+
{18B8B354-6920-4329-AB6B-DC98790B7A5A}.Debug|x86.Build.0 = Debug|Any CPU
1044+
{18B8B354-6920-4329-AB6B-DC98790B7A5A}.Release|Any CPU.ActiveCfg = Release|Any CPU
1045+
{18B8B354-6920-4329-AB6B-DC98790B7A5A}.Release|Any CPU.Build.0 = Release|Any CPU
1046+
{18B8B354-6920-4329-AB6B-DC98790B7A5A}.Release|x64.ActiveCfg = Release|Any CPU
1047+
{18B8B354-6920-4329-AB6B-DC98790B7A5A}.Release|x64.Build.0 = Release|Any CPU
1048+
{18B8B354-6920-4329-AB6B-DC98790B7A5A}.Release|x86.ActiveCfg = Release|Any CPU
1049+
{18B8B354-6920-4329-AB6B-DC98790B7A5A}.Release|x86.Build.0 = Release|Any CPU
10361050
EndGlobalSection
10371051
GlobalSection(SolutionProperties) = preSolution
10381052
HideSolutionNode = FALSE
Lines changed: 67 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,67 @@
1+
<Project Sdk="Microsoft.NET.Sdk">
2+
3+
<Import Project="$(ProjectDir)..\..\..\..\tools\Common.Netcore.Dependencies.Test.targets" />
4+
5+
<PropertyGroup>
6+
<TargetFrameworks>netcoreapp2.1;netcoreapp2.0;net472</TargetFrameworks>
7+
<AssemblyName>Microsoft.Azure.Commands.IotCentral.Test</AssemblyName>
8+
<RootNamespace>Microsoft.Azure.Commands.IotCentral.Test</RootNamespace>
9+
<GenerateAssemblyInfo>false</GenerateAssemblyInfo>
10+
<TreatWarningsAsErrors>true</TreatWarningsAsErrors>
11+
<WarningsAsErrors />
12+
</PropertyGroup>
13+
14+
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|AnyCPU'">
15+
<DelaySign>false</DelaySign>
16+
<DefineConstants>TRACE;DEBUG;NETSTANDARD</DefineConstants>
17+
</PropertyGroup>
18+
19+
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|AnyCPU'">
20+
<SignAssembly>true</SignAssembly>
21+
<DelaySign>true</DelaySign>
22+
<AssemblyOriginatorKeyFile>MSSharedLibKey.snk</AssemblyOriginatorKeyFile>
23+
<DefineConstants>TRACE;RELEASE;NETSTANDARD;SIGN</DefineConstants>
24+
</PropertyGroup>
25+
26+
<ItemGroup Condition="'$(TargetFramework)' != 'net472'">
27+
<PackageReference Include="Microsoft.Azure.Management.IotCentral" Version="1.0.0" />
28+
<PackageReference Include="Moq" Version="4.7.145" />
29+
</ItemGroup>
30+
31+
<ItemGroup>
32+
<Reference Include="Microsoft.Azure.Commands.IotCentral">
33+
<HintPath>..\..\..\Package\$(Configuration)\ResourceManager\AzureResourceManager\Az.IotCentral\Microsoft.Azure.Commands.IotCentral.dll</HintPath>
34+
</Reference>
35+
</ItemGroup>
36+
37+
<ItemGroup>
38+
<None Update="SessionRecords\**\*.json">
39+
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
40+
</None>
41+
<None Update="ScenarioTests\*.ps1">
42+
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
43+
</None>
44+
<None Update="ConfigFiles\*.*">
45+
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
46+
</None>
47+
<None Update="Templates\*.*">
48+
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
49+
</None>
50+
<None Update="VhdFiles\*.*">
51+
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
52+
</None>
53+
</ItemGroup>
54+
55+
<ItemGroup>
56+
<None Include="$(ScenarioTestToolsPath)Assert.ps1" Link="ScenarioTests\Assert.ps1">
57+
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
58+
</None>
59+
<None Include="$(ScenarioTestToolsPath)AzureRM.Resources.ps1" Link="ScenarioTests\AzureRM.Resources.ps1">
60+
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
61+
</None>
62+
<None Include="..\..\Resources\Commands.Resources.Test\ScenarioTests\Common.ps1" Link="ScenarioTests\Common.ps1">
63+
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
64+
</None>
65+
</ItemGroup>
66+
67+
</Project>
Lines changed: 78 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,78 @@
1+
<?xml version="1.0" encoding="utf-8"?>
2+
<Project ToolsVersion="14.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
3+
<Import Project="..\..\..\..\tools\Common.Dependencies.Test.targets" />
4+
<Import Project="$(MSBuildExtensionsPath)\$(MSBuildToolsVersion)\Microsoft.Common.props" Condition="Exists('$(MSBuildExtensionsPath)\$(MSBuildToolsVersion)\Microsoft.Common.props')" />
5+
<PropertyGroup>
6+
<Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
7+
<Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
8+
<ProjectGuid>{4D4F91FD-616E-4F39-A10F-6CC28DC1068A}</ProjectGuid>
9+
<OutputType>Library</OutputType>
10+
<AppDesignerFolder>Properties</AppDesignerFolder>
11+
<RootNamespace>Microsoft.Azure.Commands.IotCentral.Test</RootNamespace>
12+
<AssemblyName>Microsoft.Azure.Commands.IotCentral.Test</AssemblyName>
13+
<TargetFrameworkVersion>v4.5.2</TargetFrameworkVersion>
14+
<FileAlignment>512</FileAlignment>
15+
<AutoGenerateBindingRedirects>true</AutoGenerateBindingRedirects>
16+
</PropertyGroup>
17+
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
18+
<PlatformTarget>AnyCPU</PlatformTarget>
19+
<DebugSymbols>true</DebugSymbols>
20+
<DebugType>full</DebugType>
21+
<Optimize>false</Optimize>
22+
<OutputPath>bin\Debug\</OutputPath>
23+
<DefineConstants>DEBUG;TRACE</DefineConstants>
24+
<ErrorReport>prompt</ErrorReport>
25+
<WarningLevel>4</WarningLevel>
26+
</PropertyGroup>
27+
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
28+
<PlatformTarget>AnyCPU</PlatformTarget>
29+
<DebugType>pdbonly</DebugType>
30+
<Optimize>true</Optimize>
31+
<OutputPath>bin\Release\</OutputPath>
32+
<DefineConstants>TRACE</DefineConstants>
33+
<ErrorReport>prompt</ErrorReport>
34+
<WarningLevel>4</WarningLevel>
35+
</PropertyGroup>
36+
<PropertyGroup>
37+
<StartupObject />
38+
</PropertyGroup>
39+
<ItemGroup>
40+
<Reference Include="Microsoft.Azure.Management.IotCentral, Version=2.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35, processorArchitecture=MSIL">
41+
<SpecificVersion>False</SpecificVersion>
42+
<HintPath>..\..\..\packages\Microsoft.Azure.Management.IotCentral.2.0.0\lib\net452\Microsoft.Azure.Management.IotCentral.dll</HintPath>
43+
</Reference>
44+
</ItemGroup>
45+
<ItemGroup>
46+
<Compile Include="ScenarioTests\IotCentralController.cs" />
47+
<Compile Include="ScenarioTests\IotCentralTests.cs" />
48+
<Compile Include="Properties\AssemblyInfo.cs" />
49+
</ItemGroup>
50+
<ItemGroup>
51+
<None Include="packages.config">
52+
<SubType>Designer</SubType>
53+
</None>
54+
<None Include="ScenarioTests\Common.ps1">
55+
<CopyToOutputDirectory>Always</CopyToOutputDirectory>
56+
</None>
57+
<None Include="ScenarioTests\IotCentralTests.ps1">
58+
<CopyToOutputDirectory>Always</CopyToOutputDirectory>
59+
</None>
60+
<None Include="SessionRecords\Microsoft.Azure.Commands.IotCentral.Test.ScenarioTests.IotCentralTests\TestIotCentralAppLifecycleManagement.json">
61+
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
62+
</None>
63+
</ItemGroup>
64+
<ItemGroup>
65+
<Service Include="{82A7F48D-3B50-4B1E-B82E-3ADA8210C358}" />
66+
</ItemGroup>
67+
<ItemGroup />
68+
<ItemGroup>
69+
<PackageReference Include="Microsoft.Azure.Management.IotCentral">
70+
<Version>2.0.0</Version>
71+
</PackageReference>
72+
</ItemGroup>
73+
<Import Project="$(MSBuildToolsPath)\Microsoft.CSharp.targets" />
74+
<PropertyGroup>
75+
<PostBuildEvent>
76+
</PostBuildEvent>
77+
</PropertyGroup>
78+
</Project>
Lines changed: 37 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,37 @@
1+
using System.Reflection;
2+
using System.Runtime.InteropServices;
3+
using Xunit;
4+
5+
// General Information about an assembly is controlled through the following
6+
// set of attributes. Change these attribute values to modify the information
7+
// associated with an assembly.
8+
[assembly: AssemblyTitle("Commands.IotCentral.Test")]
9+
[assembly: AssemblyDescription("")]
10+
[assembly: AssemblyConfiguration("")]
11+
[assembly: AssemblyCompany("")]
12+
[assembly: AssemblyProduct("Commands.IotCentral.Test")]
13+
[assembly: AssemblyCopyright("Copyright © 2018")]
14+
[assembly: AssemblyTrademark("")]
15+
[assembly: AssemblyCulture("")]
16+
17+
// Setting ComVisible to false makes the types in this assembly not visible
18+
// to COM components. If you need to access a type in this assembly from
19+
// COM, set the ComVisible attribute to true on that type.
20+
[assembly: ComVisible(false)]
21+
22+
// The following GUID is for the ID of the typelib if this project is exposed to COM
23+
[assembly: Guid("4a4bc09c-0a7d-4469-8998-2a87bc95b6a7")]
24+
25+
// Version information for an assembly consists of the following four values:
26+
//
27+
// Major Version
28+
// Minor Version
29+
// Build Number
30+
// Revision
31+
//
32+
// You can specify all the values or you can default the Build and Revision Numbers
33+
// by using the '*' as shown below:
34+
// [assembly: AssemblyVersion("1.0.*")]
35+
[assembly: AssemblyVersion("1.0.0")]
36+
[assembly: AssemblyFileVersion("1.0.0")]
37+
[assembly: CollectionBehavior(DisableTestParallelization = true)]
Lines changed: 40 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,40 @@
1+
# ----------------------------------------------------------------------------------
2+
#
3+
# Copyright Microsoft Corporation
4+
# Licensed under the Apache License, Version 2.0 (the "License");
5+
# you may not use this file except in compliance with the License.
6+
# You may obtain a copy of the License at
7+
# http://www.apache.org/licenses/LICENSE-2.0
8+
# Unless required by applicable law or agreed to in writing, software
9+
# distributed under the License is distributed on an "AS IS" BASIS,
10+
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
11+
# See the License for the specific language governing permissions and
12+
# limitations under the License.
13+
# ----------------------------------------------------------------------------------
14+
15+
<#
16+
.SYNOPSIS
17+
Gets valid resource group name
18+
#>
19+
function Get-ResourceGroupName
20+
{
21+
return getAssetName
22+
}
23+
24+
<#
25+
.SYNOPSIS
26+
Gets valid resource name
27+
#>
28+
function Get-ResourceName
29+
{
30+
return getAssetName
31+
}
32+
33+
<#
34+
.SYNOPSIS
35+
Cleans the created resource groups
36+
#>
37+
function Clean-ResourceGroup($rgname)
38+
{
39+
Remove-AzureRmResourceGroup -Name $rgname -Force
40+
}

0 commit comments

Comments
 (0)