Skip to content

Commit b739d15

Browse files
authored
Merge pull request #4159 from EvgenyAgafonchikov/vnetusage
Adding Virtual Network Usage cmdlet
2 parents ec764fd + a5cf44d commit b739d15

File tree

18 files changed

+1706
-23
lines changed

18 files changed

+1706
-23
lines changed

src/ResourceManager/Compute/Commands.Compute.Test/Commands.Compute.Test.csproj

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -67,8 +67,8 @@
6767
<HintPath>..\..\..\packages\Microsoft.Azure.Management.Compute.14.0.0-prerelease\lib\net45\Microsoft.Azure.Management.Compute.dll</HintPath>
6868
<Private>True</Private>
6969
</Reference>
70-
<Reference Include="Microsoft.Azure.Management.Network, Version=10.1.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35, processorArchitecture=MSIL">
71-
<HintPath>..\..\..\packages\Microsoft.Azure.Management.Network.10.1.0-preview\lib\net452\Microsoft.Azure.Management.Network.dll</HintPath>
70+
<Reference Include="Microsoft.Azure.Management.Network, Version=10.1.1.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35, processorArchitecture=MSIL">
71+
<HintPath>..\..\..\packages\Microsoft.Azure.Management.Network.10.1.1-preview\lib\net452\Microsoft.Azure.Management.Network.dll</HintPath>
7272
<Private>True</Private>
7373
</Reference>
7474
<Reference Include="Microsoft.Azure.Management.Storage, Version=4.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35, processorArchitecture=MSIL">
@@ -94,11 +94,11 @@
9494
<HintPath>..\..\..\packages\Microsoft.IdentityModel.Clients.ActiveDirectory.2.28.3\lib\net45\Microsoft.IdentityModel.Clients.ActiveDirectory.WindowsForms.dll</HintPath>
9595
</Reference>
9696
<Reference Include="Microsoft.Rest.ClientRuntime, Version=2.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35, processorArchitecture=MSIL">
97-
<HintPath>..\..\..\packages\Microsoft.Rest.ClientRuntime.2.3.5\lib\net45\Microsoft.Rest.ClientRuntime.dll</HintPath>
97+
<HintPath>..\..\..\packages\Microsoft.Rest.ClientRuntime.2.3.8\lib\net452\Microsoft.Rest.ClientRuntime.dll</HintPath>
9898
<Private>True</Private>
9999
</Reference>
100100
<Reference Include="Microsoft.Rest.ClientRuntime.Azure, Version=3.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35, processorArchitecture=MSIL">
101-
<HintPath>..\..\..\packages\Microsoft.Rest.ClientRuntime.Azure.3.3.5\lib\net45\Microsoft.Rest.ClientRuntime.Azure.dll</HintPath>
101+
<HintPath>..\..\..\packages\Microsoft.Rest.ClientRuntime.Azure.3.3.7\lib\net452\Microsoft.Rest.ClientRuntime.Azure.dll</HintPath>
102102
<Private>True</Private>
103103
</Reference>
104104
<Reference Include="Microsoft.Rest.ClientRuntime.Azure.TestFramework">

src/ResourceManager/Compute/Commands.Compute.Test/packages.config

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@
77
<package id="Microsoft.Azure.Graph.RBAC" version="3.4.0-preview" targetFramework="net452" />
88
<package id="Microsoft.Azure.Management.Authorization" version="1.0.0" targetFramework="net45" />
99
<package id="Microsoft.Azure.Management.Compute" version="14.0.0-prerelease" targetFramework="net45" />
10-
<package id="Microsoft.Azure.Management.Network" version="10.1.0-preview" targetFramework="net452" />
10+
<package id="Microsoft.Azure.Management.Network" version="10.1.1-preview" targetFramework="net452" />
1111
<package id="Microsoft.Azure.Management.Storage" version="4.1.0-preview" targetFramework="net45" />
1212
<package id="Microsoft.Azure.Test.Framework" version="1.0.6179.26854-prerelease" targetFramework="net45" />
1313
<package id="Microsoft.Azure.Test.HttpRecorder" version="1.6.7-preview" targetFramework="net45" />
@@ -16,8 +16,8 @@
1616
<package id="Microsoft.Bcl.Build" version="1.0.14" targetFramework="net45" />
1717
<package id="Microsoft.IdentityModel.Clients.ActiveDirectory" version="2.28.3" targetFramework="net45" />
1818
<package id="Microsoft.Net.Http" version="2.2.28" targetFramework="net45" />
19-
<package id="Microsoft.Rest.ClientRuntime" version="2.3.5" targetFramework="net45" />
20-
<package id="Microsoft.Rest.ClientRuntime.Azure" version="3.3.5" targetFramework="net45" />
19+
<package id="Microsoft.Rest.ClientRuntime" version="2.3.8" targetFramework="net452" />
20+
<package id="Microsoft.Rest.ClientRuntime.Azure" version="3.3.7" targetFramework="net452" />
2121
<package id="Microsoft.Rest.ClientRuntime.Azure.TestFramework" version="1.5.0-preview" targetFramework="net45" />
2222
<package id="Moq" version="4.2.1510.2205" targetFramework="net45" />
2323
<package id="Newtonsoft.Json" version="6.0.8" targetFramework="net45" />

src/ResourceManager/Compute/Commands.Compute/Commands.Compute.csproj

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -83,8 +83,8 @@
8383
<HintPath>..\..\..\packages\Microsoft.Azure.Management.Compute.14.0.0-prerelease\lib\net45\Microsoft.Azure.Management.Compute.dll</HintPath>
8484
<Private>True</Private>
8585
</Reference>
86-
<Reference Include="Microsoft.Azure.Management.Network, Version=10.1.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35, processorArchitecture=MSIL">
87-
<HintPath>..\..\..\packages\Microsoft.Azure.Management.Network.10.1.0-preview\lib\net452\Microsoft.Azure.Management.Network.dll</HintPath>
86+
<Reference Include="Microsoft.Azure.Management.Network, Version=10.1.1.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35, processorArchitecture=MSIL">
87+
<HintPath>..\..\..\packages\Microsoft.Azure.Management.Network.10.1.1-preview\lib\net452\Microsoft.Azure.Management.Network.dll</HintPath>
8888
<Private>True</Private>
8989
</Reference>
9090
<Reference Include="Microsoft.Azure.Management.Storage">

src/ResourceManager/Compute/Commands.Compute/packages.config

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@
99
<package id="Microsoft.Azure.KeyVault.Core" version="1.0.0" targetFramework="net45" />
1010
<package id="Microsoft.Azure.Management.Authorization" version="1.0.0" targetFramework="net45" />
1111
<package id="Microsoft.Azure.Management.Compute" version="14.0.0-prerelease" targetFramework="net45" />
12-
<package id="Microsoft.Azure.Management.Network" version="10.1.0-preview" targetFramework="net452" />
12+
<package id="Microsoft.Azure.Management.Network" version="10.1.1-preview" targetFramework="net452" />
1313
<package id="Microsoft.Azure.Management.Storage" version="4.1.0-preview" targetFramework="net45" />
1414
<package id="Microsoft.Bcl" version="1.1.9" targetFramework="net45" />
1515
<package id="Microsoft.Bcl.Async" version="1.0.168" targetFramework="net45" />

src/ResourceManager/Network/AzureRM.Network.psd1

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -291,7 +291,8 @@ CmdletsToExport = 'Add-AzureRmApplicationGatewayAuthenticationCertificate',
291291
'Get-AzureRmVirtualNetworkGatewayBgpPeerStatus',
292292
'Get-AzureRmVirtualNetworkGatewayAdvertisedRoute',
293293
'Get-AzureRmVirtualNetworkGatewayLearnedRoute',
294-
'Get-AzureRmNetworkUsage'
294+
'Get-AzureRmNetworkUsage',
295+
'Get-AzureRmVirtualNetworkUsageList'
295296

296297
# Variables to export from this module
297298
# VariablesToExport = @()

src/ResourceManager/Network/Commands.Network.Test/Commands.Network.Test.csproj

Lines changed: 8 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -63,8 +63,8 @@
6363
<Reference Include="Microsoft.Azure.Management.Authorization">
6464
<HintPath>..\..\..\packages\Microsoft.Azure.Management.Authorization.2.0.0\lib\net40\Microsoft.Azure.Management.Authorization.dll</HintPath>
6565
</Reference>
66-
<Reference Include="Microsoft.Azure.Management.Network, Version=10.1.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35, processorArchitecture=MSIL">
67-
<HintPath>..\..\..\packages\Microsoft.Azure.Management.Network.10.1.0-preview\lib\net452\Microsoft.Azure.Management.Network.dll</HintPath>
66+
<Reference Include="Microsoft.Azure.Management.Network, Version=10.1.1.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35, processorArchitecture=MSIL">
67+
<HintPath>..\..\..\packages\Microsoft.Azure.Management.Network.10.1.1-preview\lib\net452\Microsoft.Azure.Management.Network.dll</HintPath>
6868
<Private>True</Private>
6969
</Reference>
7070
<Reference Include="Microsoft.Azure.Management.ResourceManager">
@@ -110,7 +110,7 @@
110110
<Private>True</Private>
111111
</Reference>
112112
<Reference Include="Microsoft.Rest.ClientRuntime.Azure, Version=3.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35, processorArchitecture=MSIL">
113-
<HintPath>..\..\..\packages\Microsoft.Rest.ClientRuntime.Azure.3.3.5\lib\net45\Microsoft.Rest.ClientRuntime.Azure.dll</HintPath>
113+
<HintPath>..\..\..\packages\Microsoft.Rest.ClientRuntime.Azure.3.3.7\lib\net452\Microsoft.Rest.ClientRuntime.Azure.dll</HintPath>
114114
<Private>True</Private>
115115
</Reference>
116116
<Reference Include="Microsoft.Rest.ClientRuntime.Azure.TestFramework">
@@ -466,7 +466,7 @@
466466
</None>
467467
<None Include="SessionRecords\Commands.Network.Test.ScenarioTests.UsageTests\TestNetworkUsage.json">
468468
<CopyToOutputDirectory>Always</CopyToOutputDirectory>
469-
</None>
469+
</None>
470470
<None Include="SessionRecords\Commands.Network.Test.ScenarioTests.VirtualNetworkGatewayConnectionTests\TestVirtualNetworkGatewayConnectionCRUD.json">
471471
<CopyToOutputDirectory>Always</CopyToOutputDirectory>
472472
</None>
@@ -491,6 +491,9 @@
491491
<None Include="SessionRecords\Commands.Network.Test.ScenarioTests.VirtualNetworkTests\TestVirtualNetworkSubnetCRUD.json">
492492
<CopyToOutputDirectory>Always</CopyToOutputDirectory>
493493
</None>
494+
<None Include="SessionRecords\Commands.Network.Test.ScenarioTests.VirtualNetworkTests\TestVirtualNetworkUsage.json">
495+
<CopyToOutputDirectory>Always</CopyToOutputDirectory>
496+
</None>
494497
</ItemGroup>
495498
<ItemGroup>
496499
<ProjectReference Include="..\..\..\Common\Commands.Common.Authentication.Abstractions\Commands.Common.Authentication.Abstractions.csproj">
@@ -527,4 +530,4 @@
527530
</ItemGroup>
528531
<ItemGroup />
529532
<Import Project="$(MSBuildToolsPath)\Microsoft.CSharp.targets" />
530-
</Project>
533+
</Project>

src/ResourceManager/Network/Commands.Network.Test/ScenarioTests/VirtualNetworkTests.cs

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -53,5 +53,12 @@ public void TestResourceNavigationLinksOnSubnetCRUD()
5353
{
5454
NetworkResourcesController.NewInstance.RunPsTest("Test-ResourceNavigationLinksCRUD");
5555
}
56+
57+
[Fact]
58+
[Trait(Category.AcceptanceType, Category.CheckIn)]
59+
public void TestVirtualNetworkUsage()
60+
{
61+
NetworkResourcesController.NewInstance.RunPsTest("Test-VirtualNetworkUsage");
62+
}
5663
}
5764
}

src/ResourceManager/Network/Commands.Network.Test/ScenarioTests/VirtualNetworkTests.ps1

Lines changed: 52 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -348,4 +348,55 @@ function Test-ResourceNavigationLinksCRUD
348348
# Cleanup
349349
Clean-ResourceGroup $rgname
350350
}
351-
}
351+
}
352+
353+
<#
354+
.SYNOPSIS
355+
Tests checking Virtual Network Usage feature.
356+
#>
357+
function Test-VirtualNetworkUsage
358+
{
359+
# Setup
360+
$rgname = Get-ResourceGroupName
361+
$vnetName = Get-ResourceName
362+
$subnetName = Get-ResourceName
363+
$subnet2Name = Get-ResourceName
364+
$nicName = Get-ResourceName
365+
$domainNameLabel = Get-ResourceName
366+
$rglocation = Get-ProviderLocation ResourceManagement
367+
$resourceTypeParent = "Microsoft.Network/virtualNetworks"
368+
$location = Get-ProviderLocation $resourceTypeParent
369+
370+
try
371+
{
372+
# Create the resource group
373+
$resourceGroup = New-AzureRmResourceGroup -Name $rgname -Location $rglocation -Tags @{ testtag = "testval" }
374+
375+
# Create the Virtual Network
376+
$subnet = New-AzureRmVirtualNetworkSubnetConfig -Name $subnetName -AddressPrefix 10.0.1.0/24
377+
New-AzureRmvirtualNetwork -Name $vnetName -ResourceGroupName $rgname -Location $location -AddressPrefix 10.0.0.0/16 -Subnet $subnet
378+
$vnet = Get-AzureRmvirtualNetwork -Name $vnetName -ResourceGroupName $rgname
379+
380+
Assert-NotNull $vnet;
381+
Assert-NotNull $vnet.Subnets;
382+
383+
$subnetId = $vnet.Subnets[0].Id;
384+
385+
$usage = Get-AzureRMVirtualNetworkUsageList -ResourceGroupName $rgname -Name $vnetName;
386+
387+
Assert-NotNull $usage;
388+
$currentUsage = $usage.CurrentValue;
389+
390+
# Add Network Interface to change usage current value
391+
New-AzureRmNetworkInterface -Location $location -Name $nicName -ResourceGroupName $rgname -SubnetId $subnetId;
392+
$usage = Get-AzureRMVirtualNetworkUsageList -ResourceGroupName $rgname -Name $vnetName;
393+
$currentUsageNew = $usage.CurrentValue;
394+
395+
Assert-AreEqual $currentUsage $($currentUsageNew - 1);
396+
}
397+
finally
398+
{
399+
# Cleanup
400+
Clean-ResourceGroup $rgname
401+
}
402+
}

src/ResourceManager/Network/Commands.Network.Test/SessionRecords/Commands.Network.Test.ScenarioTests.VirtualNetworkTests/TestVirtualNetworkUsage.json

Lines changed: 1396 additions & 0 deletions
Large diffs are not rendered by default.

src/ResourceManager/Network/Commands.Network.Test/packages.config

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@
88
<package id="Microsoft.Azure.Insights" version="0.13.1-preview" targetFramework="net45" />
99
<package id="Microsoft.Azure.Management.Authorization" version="1.0.0" targetFramework="net45" />
1010
<package id="Microsoft.Azure.Management.Compute" version="14.0.0-prerelease" targetFramework="net45" />
11-
<package id="Microsoft.Azure.Management.Network" version="10.1.0-preview" targetFramework="net452" />
11+
<package id="Microsoft.Azure.Management.Network" version="10.1.1-preview" targetFramework="net452" />
1212
<package id="Microsoft.Azure.Management.Redis" version="3.1.1-preview" targetFramework="net45" />
1313
<package id="Microsoft.Azure.Management.ResourceManager" version="1.6.0-preview" targetFramework="net452" />
1414
<package id="Microsoft.Azure.Management.Resources" version="2.20.0-preview" targetFramework="net45" />
@@ -21,7 +21,7 @@
2121
<package id="Microsoft.IdentityModel.Clients.ActiveDirectory" version="2.28.3" targetFramework="net45" />
2222
<package id="Microsoft.Net.Http" version="2.2.28" targetFramework="net45" />
2323
<package id="Microsoft.Rest.ClientRuntime" version="2.3.8" targetFramework="net452" />
24-
<package id="Microsoft.Rest.ClientRuntime.Azure" version="3.3.5" targetFramework="net45" />
24+
<package id="Microsoft.Rest.ClientRuntime.Azure" version="3.3.7" targetFramework="net452" />
2525
<package id="Microsoft.Rest.ClientRuntime.Azure.TestFramework" version="1.5.2" targetFramework="net45" />
2626
<package id="Moq" version="4.2.1510.2205" targetFramework="net45" />
2727
<package id="Newtonsoft.Json" version="6.0.8" targetFramework="net45" />

src/ResourceManager/Network/Commands.Network/Commands.Network.csproj

Lines changed: 8 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -73,8 +73,8 @@
7373
<SpecificVersion>False</SpecificVersion>
7474
<HintPath>..\..\..\packages\Microsoft.Azure.Management.Authorization.2.0.0\lib\net40\Microsoft.Azure.Management.Authorization.dll</HintPath>
7575
</Reference>
76-
<Reference Include="Microsoft.Azure.Management.Network, Version=10.1.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35, processorArchitecture=MSIL">
77-
<HintPath>..\..\..\packages\Microsoft.Azure.Management.Network.10.1.0-preview\lib\net452\Microsoft.Azure.Management.Network.dll</HintPath>
76+
<Reference Include="Microsoft.Azure.Management.Network, Version=10.1.1.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35, processorArchitecture=MSIL">
77+
<HintPath>..\..\..\packages\Microsoft.Azure.Management.Network.10.1.1-preview\lib\net452\Microsoft.Azure.Management.Network.dll</HintPath>
7878
<Private>True</Private>
7979
</Reference>
8080
<Reference Include="Microsoft.Data.Edm">
@@ -276,6 +276,7 @@
276276
<Compile Include="ExpressRouteCircuit\RemoveAzureExpressRouteCircuitCommand.cs" />
277277
<Compile Include="ExpressRouteCircuit\SetAzureExpressRouteCircuitCommand.cs" />
278278
<Compile Include="ExpressRouteCircuit\ExpressRouteCircuitBaseCmdlet.cs" />
279+
<Compile Include="Models\PSVirtualNetworkUsage.cs" />
279280
<Compile Include="Models\PSApplicationGatewayBackendHealth.cs" />
280281
<Compile Include="Models\PSApplicationGatewayBackendHealthHttpSettings.cs" />
281282
<Compile Include="Models\PSApplicationGatewayBackendHealthPool.cs" />
@@ -369,6 +370,7 @@
369370
<Compile Include="Models\PSTopologyResource.cs" />
370371
<Compile Include="Models\PSVirtualNetworkPeering.cs" />
371372
<Compile Include="Models\PSTunnelConnectionHealth.cs" />
373+
<Compile Include="Models\PSVirtualNetworkUsageCustom.cs" />
372374
<Compile Include="NetworkInterface\EffectiveResources\GetAzureEffectiveNetworkSecurityGroupCommand.cs" />
373375
<Compile Include="NetworkInterface\EffectiveResources\GetAzureEffectiveRouteTableCommand.cs" />
374376
<Compile Include="NetworkInterface\IpConfiguration\AddAzureNetworkInterfaceIpConfigCommand.cs" />
@@ -578,6 +580,7 @@
578580
<Compile Include="VirtualNetwork\GetAzureVirtualNetworkCommand.cs" />
579581
<Compile Include="VirtualNetwork\NewAzureVirtualNetworkCommand.cs" />
580582
<Compile Include="VirtualNetwork\VirtualNetworkBaseCmdlet.cs" />
583+
<Compile Include="VirtualNetwork\VirtualNetworkListUsageMethod.cs" />
581584
</ItemGroup>
582585
<ItemGroup>
583586
<ProjectReference Include="..\..\..\Common\Commands.Common.Authentication.Abstractions\Commands.Common.Authentication.Abstractions.csproj">
@@ -605,7 +608,9 @@
605608
<Name>Commands.Tags</Name>
606609
</ProjectReference>
607610
</ItemGroup>
608-
<ItemGroup />
611+
<ItemGroup>
612+
<Folder Include="Microsoft\Azure\Commands\Network\Models\" />
613+
</ItemGroup>
609614
<ItemGroup>
610615
<None Include="..\AzureRM.Network.psd1">
611616
<Link>AzureRM.Network.psd1</Link>

src/ResourceManager/Network/Commands.Network/Common/NetworkResourceManagerProfile.cs

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -76,10 +76,14 @@ public static void Initialize()
7676
// CNM to MNM
7777
cfg.CreateMap<CNM.PSAddressSpace, MNM.AddressSpace>();
7878
cfg.CreateMap<CNM.PSVirtualNetwork, MNM.VirtualNetwork>();
79+
cfg.CreateMap<CNM.PSVirtualNetworkUsage, MNM.VirtualNetworkUsage>();
80+
cfg.CreateMap<CNM.PSUsageName, MNM.VirtualNetworkUsageName>();
7981

8082
// MNM to CNM
8183
cfg.CreateMap<MNM.AddressSpace, CNM.PSAddressSpace>();
8284
cfg.CreateMap<MNM.VirtualNetwork, CNM.PSVirtualNetwork>();
85+
cfg.CreateMap<MNM.VirtualNetworkUsage, CNM.PSVirtualNetworkUsage>();
86+
cfg.CreateMap<MNM.VirtualNetworkUsageName, CNM.PSUsageName>();
8387

8488
// PublicIpAddress
8589
// CNM to MNM

src/ResourceManager/Network/Commands.Network/Microsoft.Azure.Commands.Network.format.ps1xml

Lines changed: 34 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -27,6 +27,40 @@
2727
</ListEntries>
2828
</ListControl>
2929
</View>
30+
<View>
31+
<Name>Microsoft.Azure.Commands.Network.Models.PSVirtualNetworkUsage</Name>
32+
<ViewSelectedBy>
33+
<TypeName>Microsoft.Azure.Commands.Network.Models.PSVirtualNetworkUsage</TypeName>
34+
</ViewSelectedBy>
35+
<ListControl>
36+
<ListEntries>
37+
<ListEntry>
38+
<ListItems>
39+
<ListItem>
40+
<Label>Name</Label>
41+
<PropertyName>NameText</PropertyName>
42+
</ListItem>
43+
<ListItem>
44+
<Label>Id</Label>
45+
<PropertyName>Id</PropertyName>
46+
</ListItem>
47+
<ListItem>
48+
<Label>CurrentValue</Label>
49+
<PropertyName>CurrentValue</PropertyName>
50+
</ListItem>
51+
<ListItem>
52+
<Label>Limit</Label>
53+
<PropertyName>Limit</PropertyName>
54+
</ListItem>
55+
<ListItem>
56+
<Label>Unit</Label>
57+
<PropertyName>Unit</PropertyName>
58+
</ListItem>
59+
</ListItems>
60+
</ListEntry>
61+
</ListEntries>
62+
</ListControl>
63+
</View>
3064
<View>
3165
<Name>Microsoft.Azure.Commands.Network.Models.PSVirtualNetwork</Name>
3266
<ViewSelectedBy>
Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,11 @@
1+
namespace Microsoft.Azure.Commands.Network.Models
2+
{
3+
public partial class PSVirtualNetworkUsage
4+
{
5+
public string Id { get; set; }
6+
public long CurrentValue { get; set; }
7+
public long Limit { get; set; }
8+
public string Unit { get; set; }
9+
public PSUsageName Name { get; set; }
10+
}
11+
}
Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,16 @@
1+
using System;
2+
using System.Collections.Generic;
3+
using System.Linq;
4+
using System.Text;
5+
using System.Threading.Tasks;
6+
7+
namespace Microsoft.Azure.Commands.Network.Models
8+
{
9+
public partial class PSVirtualNetworkUsage
10+
{
11+
public string NameText
12+
{
13+
get { return Name.LocalizedValue; }
14+
}
15+
}
16+
}

0 commit comments

Comments
 (0)