Skip to content

loading custom classes with using module statements #7171

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

Merged
merged 1 commit into from
Sep 10, 2018
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
Original file line number Diff line number Diff line change
Expand Up @@ -63,11 +63,7 @@ Licensed under the MIT License. See License.txt in the project root for license
# RequiredAssemblies = @()

# Script files (.ps1) that are run in the caller's environment prior to importing this module.
ScriptsToProcess = @(
'Generated.PowerShell.Commands\CustomObjects\ComputeQuotaObject.ps1',
'Generated.PowerShell.Commands\CustomObjects\PlatformImageObject.ps1',
'Generated.PowerShell.Commands\CustomObjects\VmExtensionObject.ps1'
)
ScriptsToProcess = @()

# Type files (.ps1xml) to be loaded when importing this module
TypesToProcess = @('Generated.PowerShell.Commands\FormatFiles\Azs.Compute.Admin.Type.ps1xml')
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,9 @@

<#
Copyright (c) Microsoft Corporation. All rights reserved.
Licensed under the MIT License. See License.txt in the project root for license information.
#>

class ComputeQuotaObject {

# Resource Properties
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,9 @@

<#
Copyright (c) Microsoft Corporation. All rights reserved.
Licensed under the MIT License. See License.txt in the project root for license information.
#>

class PlatformImageObject {
# Resource properties
[string]$Id;
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,9 @@

<#
Copyright (c) Microsoft Corporation. All rights reserved.
Licensed under the MIT License. See License.txt in the project root for license information.
#>

class VmExtensionObject {
# Resource properties
[string]$Id;
Expand Down
Original file line number Diff line number Diff line change
@@ -1,10 +1,8 @@
<#
Copyright (c) Microsoft Corporation. All rights reserved.
Licensed under the MIT License. See License.txt in the project root for license information.

Manually created custom quota object class
#>

using module '..\CustomObjects\ComputeQuotaObject.psm1'
function ConvertTo-ComputeQuota {

[OutputType([ComputeQuotaObject])]
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,10 @@

<#
Copyright (c) Microsoft Corporation. All rights reserved.
Licensed under the MIT License. See License.txt in the project root for license information.
#>

using module '..\CustomObjects\PlatformImageObject.psm1'
function ConvertTo-PlatformImageObject {
[cmdletbinding()]
[OutputType([PlatformImageObject])]
Expand Down
Original file line number Diff line number Diff line change
@@ -1,9 +1,8 @@
<#
Copyright (c) Microsoft Corporation. All rights reserved.
Licensed under the MIT License. See License.txt in the project root for license information.

Manually created custom quota object class
#>
using module '..\CustomObjects\PlatformImageObject.psm1'

function ConvertTo-SdkQuota
{ [OutputType([Microsoft.AzureStack.Management.Compute.Admin.Models.Quota])]
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,8 @@


<#
Copyright (c) Microsoft Corporation. All rights reserved.
Licensed under the MIT License. See License.txt in the project root for license information.
#>
using module '..\CustomObjects\VmExtensionObject.psm1'
function ConvertTo-VmExtensionObject {
[OutputType([VmExtensionObject])]
param (
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -53,6 +53,8 @@ Changes may cause incorrect behavior and will be lost if the code is regenerated
Add a new platform image.

#>
using module '..\CustomObjects\PlatformImageObject.psm1'

function Add-AzsPlatformImage {
[OutputType([PlatformImageObject])]
[CmdletBinding(SupportsShouldProcess = $true)]
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -53,6 +53,8 @@ Licensed under the MIT License. See License.txt in the project root for license
Add a new platform image extension.

#>
using module '..\CustomObjects\VmExtensionObject.psm1'

function Add-AzsVMExtension {
[OutputType([VMExtensionObject])]
[CmdletBinding(SupportsShouldProcess = $true)]
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -35,6 +35,8 @@ Changes may cause incorrect behavior and will be lost if the code is regenerated
Get a specific compute quota.

#>
using module '..\CustomObjects\ComputeQuotaObject.psm1'

function Get-AzsComputeQuota {
[OutputType([ComputeQuotaObject])]
[CmdletBinding(DefaultParameterSetName = 'List')]
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -44,6 +44,8 @@ Changes may cause incorrect behavior and will be lost if the code is regenerated
Get a specific platform image.

#>
using module '..\CustomObjects\PlatformImageObject.psm1'

function Get-AzsPlatformImage {
[OutputType([PlatformImageObject])]
[CmdletBinding(DefaultParameterSetName = 'List')]
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -38,6 +38,7 @@ Licensed under the MIT License. See License.txt in the project root for license
Get specific VM extension.

#>
using module '..\CustomObjects\VmExtensionObject.psm1'

function Get-AzsVMExtension {
[OutputType([VmExtensionObject])]
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -44,6 +44,8 @@ Changes may cause incorrect behavior and will be lost if the code is regenerated
Create a new compute quota.

#>
using module '..\CustomObjects\ComputeQuotaObject.psm1'

function New-AzsComputeQuota {
[OutputType([ComputeQuotaObject])]
[CmdletBinding(SupportsShouldProcess = $true)]
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -50,6 +50,8 @@ Changes may cause incorrect behavior and will be lost if the code is regenerated
Update a compute quota.

#>
using module '..\CustomObjects\ComputeQuotaObject.psm1'

function Set-AzsComputeQuota {
[OutputType([ComputeQuotaObject])]
[CmdletBinding(DefaultParameterSetName = 'Update', SupportsShouldProcess = $true)]
Expand Down