Skip to content

Commit 464171b

Browse files
author
Maddie Clayton
authored
Merge pull request Azure#7171 from bganapa/using-module
loading custom classes with using module statements
2 parents a37920e + e438c48 commit 464171b

15 files changed

+42
-12
lines changed

src/StackAdmin/Azs.Compute.Admin/Module/Azs.Compute.Admin/Azs.Compute.Admin.psd1

Lines changed: 1 addition & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -63,11 +63,7 @@ Licensed under the MIT License. See License.txt in the project root for license
6363
# RequiredAssemblies = @()
6464

6565
# Script files (.ps1) that are run in the caller's environment prior to importing this module.
66-
ScriptsToProcess = @(
67-
'Generated.PowerShell.Commands\CustomObjects\ComputeQuotaObject.ps1',
68-
'Generated.PowerShell.Commands\CustomObjects\PlatformImageObject.ps1',
69-
'Generated.PowerShell.Commands\CustomObjects\VmExtensionObject.ps1'
70-
)
66+
ScriptsToProcess = @()
7167

7268
# Type files (.ps1xml) to be loaded when importing this module
7369
TypesToProcess = @('Generated.PowerShell.Commands\FormatFiles\Azs.Compute.Admin.Type.ps1xml')
Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,9 @@
11

2+
<#
3+
Copyright (c) Microsoft Corporation. All rights reserved.
4+
Licensed under the MIT License. See License.txt in the project root for license information.
5+
#>
6+
27
class ComputeQuotaObject {
38

49
# Resource Properties
Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,9 @@
11

2+
<#
3+
Copyright (c) Microsoft Corporation. All rights reserved.
4+
Licensed under the MIT License. See License.txt in the project root for license information.
5+
#>
6+
27
class PlatformImageObject {
38
# Resource properties
49
[string]$Id;
Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,9 @@
11

2+
<#
3+
Copyright (c) Microsoft Corporation. All rights reserved.
4+
Licensed under the MIT License. See License.txt in the project root for license information.
5+
#>
6+
27
class VmExtensionObject {
38
# Resource properties
49
[string]$Id;

src/StackAdmin/Azs.Compute.Admin/Module/Azs.Compute.Admin/Generated.PowerShell.Commands/SwaggerDefinitionCommands/ConvertTo-ComputeQuota.ps1

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,8 @@
11
<#
22
Copyright (c) Microsoft Corporation. All rights reserved.
33
Licensed under the MIT License. See License.txt in the project root for license information.
4-
5-
Manually created custom quota object class
64
#>
7-
5+
using module '..\CustomObjects\ComputeQuotaObject.psm1'
86
function ConvertTo-ComputeQuota {
97

108
[OutputType([ComputeQuotaObject])]

src/StackAdmin/Azs.Compute.Admin/Module/Azs.Compute.Admin/Generated.PowerShell.Commands/SwaggerDefinitionCommands/ConvertTo-PlatformImageObject.ps1

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,10 @@
11

2+
<#
3+
Copyright (c) Microsoft Corporation. All rights reserved.
4+
Licensed under the MIT License. See License.txt in the project root for license information.
5+
#>
6+
7+
using module '..\CustomObjects\PlatformImageObject.psm1'
28
function ConvertTo-PlatformImageObject {
39
[cmdletbinding()]
410
[OutputType([PlatformImageObject])]

src/StackAdmin/Azs.Compute.Admin/Module/Azs.Compute.Admin/Generated.PowerShell.Commands/SwaggerDefinitionCommands/ConvertTo-SDKQuota.ps1

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,8 @@
11
<#
22
Copyright (c) Microsoft Corporation. All rights reserved.
33
Licensed under the MIT License. See License.txt in the project root for license information.
4-
5-
Manually created custom quota object class
64
#>
5+
using module '..\CustomObjects\PlatformImageObject.psm1'
76

87
function ConvertTo-SdkQuota
98
{ [OutputType([Microsoft.AzureStack.Management.Compute.Admin.Models.Quota])]

src/StackAdmin/Azs.Compute.Admin/Module/Azs.Compute.Admin/Generated.PowerShell.Commands/SwaggerDefinitionCommands/ConvertTo-VMExtensionObject.ps1

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,8 @@
1-
2-
1+
<#
2+
Copyright (c) Microsoft Corporation. All rights reserved.
3+
Licensed under the MIT License. See License.txt in the project root for license information.
4+
#>
5+
using module '..\CustomObjects\VmExtensionObject.psm1'
36
function ConvertTo-VmExtensionObject {
47
[OutputType([VmExtensionObject])]
58
param (

src/StackAdmin/Azs.Compute.Admin/Module/Azs.Compute.Admin/Generated.PowerShell.Commands/SwaggerPathCommands/Add-AzsPlatformImage.ps1

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -53,6 +53,8 @@ Changes may cause incorrect behavior and will be lost if the code is regenerated
5353
Add a new platform image.
5454
5555
#>
56+
using module '..\CustomObjects\PlatformImageObject.psm1'
57+
5658
function Add-AzsPlatformImage {
5759
[OutputType([PlatformImageObject])]
5860
[CmdletBinding(SupportsShouldProcess = $true)]

src/StackAdmin/Azs.Compute.Admin/Module/Azs.Compute.Admin/Generated.PowerShell.Commands/SwaggerPathCommands/Add-AzsVMExtension.ps1

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -53,6 +53,8 @@ Licensed under the MIT License. See License.txt in the project root for license
5353
Add a new platform image extension.
5454
5555
#>
56+
using module '..\CustomObjects\VmExtensionObject.psm1'
57+
5658
function Add-AzsVMExtension {
5759
[OutputType([VMExtensionObject])]
5860
[CmdletBinding(SupportsShouldProcess = $true)]

src/StackAdmin/Azs.Compute.Admin/Module/Azs.Compute.Admin/Generated.PowerShell.Commands/SwaggerPathCommands/Get-AzsComputeQuota.ps1

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -35,6 +35,8 @@ Changes may cause incorrect behavior and will be lost if the code is regenerated
3535
Get a specific compute quota.
3636
3737
#>
38+
using module '..\CustomObjects\ComputeQuotaObject.psm1'
39+
3840
function Get-AzsComputeQuota {
3941
[OutputType([ComputeQuotaObject])]
4042
[CmdletBinding(DefaultParameterSetName = 'List')]

src/StackAdmin/Azs.Compute.Admin/Module/Azs.Compute.Admin/Generated.PowerShell.Commands/SwaggerPathCommands/Get-AzsPlatformImage.ps1

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -44,6 +44,8 @@ Changes may cause incorrect behavior and will be lost if the code is regenerated
4444
Get a specific platform image.
4545
4646
#>
47+
using module '..\CustomObjects\PlatformImageObject.psm1'
48+
4749
function Get-AzsPlatformImage {
4850
[OutputType([PlatformImageObject])]
4951
[CmdletBinding(DefaultParameterSetName = 'List')]

src/StackAdmin/Azs.Compute.Admin/Module/Azs.Compute.Admin/Generated.PowerShell.Commands/SwaggerPathCommands/Get-AzsVMExtension.ps1

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -38,6 +38,7 @@ Licensed under the MIT License. See License.txt in the project root for license
3838
Get specific VM extension.
3939
4040
#>
41+
using module '..\CustomObjects\VmExtensionObject.psm1'
4142

4243
function Get-AzsVMExtension {
4344
[OutputType([VmExtensionObject])]

src/StackAdmin/Azs.Compute.Admin/Module/Azs.Compute.Admin/Generated.PowerShell.Commands/SwaggerPathCommands/New-AzsComputeQuota.ps1

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -44,6 +44,8 @@ Changes may cause incorrect behavior and will be lost if the code is regenerated
4444
Create a new compute quota.
4545
4646
#>
47+
using module '..\CustomObjects\ComputeQuotaObject.psm1'
48+
4749
function New-AzsComputeQuota {
4850
[OutputType([ComputeQuotaObject])]
4951
[CmdletBinding(SupportsShouldProcess = $true)]

src/StackAdmin/Azs.Compute.Admin/Module/Azs.Compute.Admin/Generated.PowerShell.Commands/SwaggerPathCommands/Set-AzsComputeQuota.ps1

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -50,6 +50,8 @@ Changes may cause incorrect behavior and will be lost if the code is regenerated
5050
Update a compute quota.
5151
5252
#>
53+
using module '..\CustomObjects\ComputeQuotaObject.psm1'
54+
5355
function Set-AzsComputeQuota {
5456
[OutputType([ComputeQuotaObject])]
5557
[CmdletBinding(DefaultParameterSetName = 'Update', SupportsShouldProcess = $true)]

0 commit comments

Comments
 (0)