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

Hotfix for the issue on windows powershell #15189

Merged
merged 2 commits into from
Jun 7, 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
6 changes: 3 additions & 3 deletions src/DiskPool/Az.DiskPool.psd1
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
#
# Generated by: Microsoft Corporation
#
# Generated on: 5/27/2021
# Generated on: 6/7/2021
#

@{
Expand All @@ -12,7 +12,7 @@
RootModule = './Az.DiskPool.psm1'

# Version number of this module.
ModuleVersion = '0.1.0'
ModuleVersion = '0.1.1'

# Supported PSEditions
CompatiblePSEditions = 'Core', 'Desktop'
Expand Down Expand Up @@ -111,7 +111,7 @@ PrivateData = @{
# IconUri = ''

# ReleaseNotes of this module
ReleaseNotes = '* First preview release for module Az.DiskPool'
ReleaseNotes = '* Hotfix for the issue on windows powershell'

# Prerelease string of this module
# Prerelease = ''
Expand Down
3 changes: 3 additions & 0 deletions src/DiskPool/Changelog.md
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,9 @@
-->
## Upcoming Release

## Version 0.1.1
* Hotfix for the issue on windows powershell

## Version 0.1.0
* First preview release for module Az.DiskPool

4 changes: 2 additions & 2 deletions src/DiskPool/Properties/AssemblyInfo.cs
Original file line number Diff line number Diff line change
Expand Up @@ -24,5 +24,5 @@
[assembly: ComVisible(false)]
[assembly: CLSCompliant(false)]
[assembly: Guid("cab30302-f17b-4dd6-8c5f-2902b85e7cec")]
[assembly: AssemblyVersion("0.1.0")]
[assembly: AssemblyFileVersion("0.1.0")]
[assembly: AssemblyVersion("0.1.1")]
[assembly: AssemblyFileVersion("0.1.1")]
4 changes: 2 additions & 2 deletions src/DiskPool/build-module.ps1
Original file line number Diff line number Diff line change
Expand Up @@ -122,8 +122,8 @@ $null = New-Item -ItemType Directory -Force -Path $examplesFolder

Write-Host -ForegroundColor Green 'Creating cmdlets for specified models...'
$modelCmdlets = @('Acl', 'IscsiLun')
. (Join-Path $PSScriptRoot 'create-model-cmdlets.ps1') -Models $modelCmdlets
$moduleName = 'Az.DiskPool'
pwsh (Join-Path $PSScriptRoot 'create-model-cmdlets.ps1') -Models $modelCmdlets

if($NoDocs) {
Write-Host -ForegroundColor Green 'Creating exports...'
Export-ProxyCmdlet -ModuleName $moduleName -ModulePath $modulePaths -ExportsFolder $exportsFolder -InternalFolder $internalFolder -ExcludeDocs -ExamplesFolder $examplesFolder
Expand Down
2 changes: 1 addition & 1 deletion src/DiskPool/custom/New-AzDiskPool.ps1
Original file line number Diff line number Diff line change
Expand Up @@ -181,7 +181,7 @@ param(
if ($PSBoundParameters.ContainsKey("DiskId")){
$disk = @()
for ($i = 0; $i -lt $DiskId.Count; $i++) {
$diskObject= [Microsoft.Azure.PowerShell.Cmdlets.DiskPool.Models.Api20210401Preview.Disk]::New()
$diskObject = New-Object -TypeName Microsoft.Azure.PowerShell.Cmdlets.DiskPool.Models.Api20210401Preview.Disk
$diskObject.Id = $DiskId[$i]
$disk += $diskObject
}
Expand Down
2 changes: 1 addition & 1 deletion src/DiskPool/custom/Update-AzDiskPool.ps1
Original file line number Diff line number Diff line change
Expand Up @@ -159,7 +159,7 @@ param(
if ($PSBoundParameters.ContainsKey("DiskId")){
$disk = @()
for ($i = 0; $i -lt $DiskId.Count; $i++) {
$diskObject= [Microsoft.Azure.PowerShell.Cmdlets.DiskPool.Models.Api20210401Preview.Disk]::New()
$diskObject = New-Object -TypeName Microsoft.Azure.PowerShell.Cmdlets.DiskPool.Models.Api20210401Preview.Disk
$diskObject.Id = $DiskId[$i]
$disk += $diskObject
}
Expand Down
10 changes: 5 additions & 5 deletions src/DiskPool/exports/ProxyCmdletDefinitions.ps1
Original file line number Diff line number Diff line change
Expand Up @@ -987,7 +987,7 @@ param(
[Microsoft.Azure.PowerShell.Cmdlets.DiskPool.Category('Path')]
[System.String]
# The name of the Disk Pool.
${DiskPoolName},
${Name},

[Parameter(ParameterSetName='Deallocate', Mandatory)]
[Microsoft.Azure.PowerShell.Cmdlets.DiskPool.Category('Path')]
Expand Down Expand Up @@ -1145,7 +1145,7 @@ westeurope disk-pool-1 Microsoft.StoragePool/diskPools
.Outputs
Microsoft.Azure.PowerShell.Cmdlets.DiskPool.Models.Api20210401Preview.IDiskPool
.Link
https://docs.microsoft.com/powershell/module/diskpool/new-azdiskpool
https://docs.microsoft.com/powershell/module/az.diskpool/new-azdiskpool
#>
function New-AzDiskPool {
[OutputType([Microsoft.Azure.PowerShell.Cmdlets.DiskPool.Models.Api20210401Preview.IDiskPool])]
Expand Down Expand Up @@ -1528,7 +1528,7 @@ STATICACL <IAcl[]>: Access Control List (ACL) for an iSCSI Target; defines LUN m
InitiatorIqn <String>: iSCSI initiator IQN (iSCSI Qualified Name); example: "iqn.2005-03.org.iscsi:client".
MappedLun <String[]>: List of LUN names mapped to the ACL.
.Link
https://docs.microsoft.com/powershell/module/diskpool/new-azdiskpooliscsitarget
https://docs.microsoft.com/powershell/module/az.diskpool/new-azdiskpooliscsitarget
#>
function New-AzDiskPoolIscsiTarget {
[OutputType([Microsoft.Azure.PowerShell.Cmdlets.DiskPool.Models.Api20210401Preview.IIscsiTarget])]
Expand Down Expand Up @@ -1737,7 +1737,7 @@ INPUTOBJECT <IDiskPoolIdentity>: Identity Parameter
[ResourceGroupName <String>]: The name of the resource group. The name is case insensitive.
[SubscriptionId <String>]: The ID of the target subscription.
.Link
https://docs.microsoft.com/powershell/module/diskpool/update-azdiskpool
https://docs.microsoft.com/powershell/module/az.diskpool/update-azdiskpool
#>
function Update-AzDiskPool {
[OutputType([Microsoft.Azure.PowerShell.Cmdlets.DiskPool.Models.Api20210401Preview.IDiskPool])]
Expand Down Expand Up @@ -1944,7 +1944,7 @@ STATICACL <IAcl[]>: Access Control List (ACL) for an iSCSI Target; defines LUN m
InitiatorIqn <String>: iSCSI initiator IQN (iSCSI Qualified Name); example: "iqn.2005-03.org.iscsi:client".
MappedLun <String[]>: List of LUN names mapped to the ACL.
.Link
https://docs.microsoft.com/powershell/module/diskpool/update-azdiskpooliscsitarget
https://docs.microsoft.com/powershell/module/az.diskpool/update-azdiskpooliscsitarget
#>
function Update-AzDiskPoolIscsiTarget {
[OutputType([Microsoft.Azure.PowerShell.Cmdlets.DiskPool.Models.Api20210401Preview.IIscsiTarget])]
Expand Down
2 changes: 1 addition & 1 deletion src/DiskPool/exports/Stop-AzDiskPool.ps1
Original file line number Diff line number Diff line change
Expand Up @@ -54,7 +54,7 @@ param(
[Microsoft.Azure.PowerShell.Cmdlets.DiskPool.Category('Path')]
[System.String]
# The name of the Disk Pool.
${DiskPoolName},
${Name},

[Parameter(ParameterSetName='Deallocate', Mandatory)]
[Microsoft.Azure.PowerShell.Cmdlets.DiskPool.Category('Path')]
Expand Down
10 changes: 5 additions & 5 deletions src/DiskPool/generate-info.json
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
{
"autorest_modelerfour": "4.15.414",
"autorest_powershell": "3.0.430",
"autorest_core": "3.0.6375",
"node": "v10.15.3",
"swagger_commit": "9875f8eebd8c1392a83c052bc50a79c8251b1174",
"autorest": "3.0.6187"
"autorest_powershell": "3.0.431",
"autorest": "3.0.6187",
"autorest_core": "3.0.6375",
"swagger_commit": "a252633188c5e02c4071cc1c3b5cead249db8a54",
"autorest_modelerfour": "4.15.414"
}
20 changes: 20 additions & 0 deletions src/DiskPool/generated/api/Models/Any.PowerShell.cs
Original file line number Diff line number Diff line change
Expand Up @@ -52,6 +52,14 @@ public partial class Any

partial void BeforeDeserializePSObject(global::System.Management.Automation.PSObject content, ref bool returnNow);

/// <summary>
/// <c>OverrideToString</c> will be called if it is implemented. Implement this method in a partial class to enable this behavior
/// </summary>
/// <param name="stringResult">/// instance serialized to a string, normally it is a Json</param>
/// <param name="returnNow">/// set returnNow to true if you provide a customized OverrideToString function</param>

partial void OverrideToString(ref string stringResult, ref bool returnNow);

/// <summary>
/// Deserializes a <see cref="global::System.Collections.IDictionary" /> into a new instance of <see cref="Microsoft.Azure.PowerShell.Cmdlets.DiskPool.Models.Any"
/// />.
Expand Down Expand Up @@ -123,6 +131,18 @@ public static Microsoft.Azure.PowerShell.Cmdlets.DiskPool.Models.IAny Deserializ

/// <returns>a <see cref="System.String" /> containing this model serialized to JSON text.</returns>
public string ToJsonString() => ToJson(null, Microsoft.Azure.PowerShell.Cmdlets.DiskPool.Runtime.SerializationMode.IncludeAll)?.ToString();

public override string ToString()
{
var returnNow = false;
var result = global::System.String.Empty;
OverrideToString(ref result, ref returnNow);
if (returnNow)
{
return result;
}
return ToJsonString();
}
}
/// Any object
[System.ComponentModel.TypeConverter(typeof(AnyTypeConverter))]
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -47,6 +47,14 @@ public partial class Acl

partial void BeforeDeserializePSObject(global::System.Management.Automation.PSObject content, ref bool returnNow);

/// <summary>
/// <c>OverrideToString</c> will be called if it is implemented. Implement this method in a partial class to enable this behavior
/// </summary>
/// <param name="stringResult">/// instance serialized to a string, normally it is a Json</param>
/// <param name="returnNow">/// set returnNow to true if you provide a customized OverrideToString function</param>

partial void OverrideToString(ref string stringResult, ref bool returnNow);

/// <summary>
/// Deserializes a <see cref="global::System.Collections.IDictionary" /> into a new instance of <see cref="Microsoft.Azure.PowerShell.Cmdlets.DiskPool.Models.Api20210401Preview.Acl"
/// />.
Expand Down Expand Up @@ -122,6 +130,18 @@ public static Microsoft.Azure.PowerShell.Cmdlets.DiskPool.Models.Api20210401Prev

/// <returns>a <see cref="System.String" /> containing this model serialized to JSON text.</returns>
public string ToJsonString() => ToJson(null, Microsoft.Azure.PowerShell.Cmdlets.DiskPool.Runtime.SerializationMode.IncludeAll)?.ToString();

public override string ToString()
{
var returnNow = false;
var result = global::System.String.Empty;
OverrideToString(ref result, ref returnNow);
if (returnNow)
{
return result;
}
return ToJsonString();
}
}
/// Access Control List (ACL) for an iSCSI Target; defines LUN masking policy
[System.ComponentModel.TypeConverter(typeof(AclTypeConverter))]
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -47,6 +47,14 @@ public partial class Disk

partial void BeforeDeserializePSObject(global::System.Management.Automation.PSObject content, ref bool returnNow);

/// <summary>
/// <c>OverrideToString</c> will be called if it is implemented. Implement this method in a partial class to enable this behavior
/// </summary>
/// <param name="stringResult">/// instance serialized to a string, normally it is a Json</param>
/// <param name="returnNow">/// set returnNow to true if you provide a customized OverrideToString function</param>

partial void OverrideToString(ref string stringResult, ref bool returnNow);

/// <summary>
/// Deserializes a <see cref="global::System.Collections.IDictionary" /> into an instance of <see cref="Microsoft.Azure.PowerShell.Cmdlets.DiskPool.Models.Api20210401Preview.Disk"
/// />.
Expand Down Expand Up @@ -74,39 +82,39 @@ public static Microsoft.Azure.PowerShell.Cmdlets.DiskPool.Models.Api20210401Prev
}

/// <summary>
/// Deserializes a <see cref="global::System.Collections.IDictionary" /> into a new instance of <see cref="Microsoft.Azure.PowerShell.Cmdlets.DiskPool.Models.Api20210401Preview.Disk"
/// Deserializes a <see cref="global::System.Management.Automation.PSObject" /> into a new instance of <see cref="Microsoft.Azure.PowerShell.Cmdlets.DiskPool.Models.Api20210401Preview.Disk"
/// />.
/// </summary>
/// <param name="content">The global::System.Collections.IDictionary content that should be used.</param>
internal Disk(global::System.Collections.IDictionary content)
/// <param name="content">The global::System.Management.Automation.PSObject content that should be used.</param>
internal Disk(global::System.Management.Automation.PSObject content)
{
bool returnNow = false;
BeforeDeserializeDictionary(content, ref returnNow);
BeforeDeserializePSObject(content, ref returnNow);
if (returnNow)
{
return;
}
// actually deserialize
((Microsoft.Azure.PowerShell.Cmdlets.DiskPool.Models.Api20210401Preview.IDiskInternal)this).Id = (string) content.GetValueForProperty("Id",((Microsoft.Azure.PowerShell.Cmdlets.DiskPool.Models.Api20210401Preview.IDiskInternal)this).Id, global::System.Convert.ToString);
AfterDeserializeDictionary(content);
AfterDeserializePSObject(content);
}

/// <summary>
/// Deserializes a <see cref="global::System.Management.Automation.PSObject" /> into a new instance of <see cref="Microsoft.Azure.PowerShell.Cmdlets.DiskPool.Models.Api20210401Preview.Disk"
/// Deserializes a <see cref="global::System.Collections.IDictionary" /> into a new instance of <see cref="Microsoft.Azure.PowerShell.Cmdlets.DiskPool.Models.Api20210401Preview.Disk"
/// />.
/// </summary>
/// <param name="content">The global::System.Management.Automation.PSObject content that should be used.</param>
internal Disk(global::System.Management.Automation.PSObject content)
/// <param name="content">The global::System.Collections.IDictionary content that should be used.</param>
internal Disk(global::System.Collections.IDictionary content)
{
bool returnNow = false;
BeforeDeserializePSObject(content, ref returnNow);
BeforeDeserializeDictionary(content, ref returnNow);
if (returnNow)
{
return;
}
// actually deserialize
((Microsoft.Azure.PowerShell.Cmdlets.DiskPool.Models.Api20210401Preview.IDiskInternal)this).Id = (string) content.GetValueForProperty("Id",((Microsoft.Azure.PowerShell.Cmdlets.DiskPool.Models.Api20210401Preview.IDiskInternal)this).Id, global::System.Convert.ToString);
AfterDeserializePSObject(content);
AfterDeserializeDictionary(content);
}

/// <summary>
Expand All @@ -120,6 +128,18 @@ internal Disk(global::System.Management.Automation.PSObject content)

/// <returns>a <see cref="System.String" /> containing this model serialized to JSON text.</returns>
public string ToJsonString() => ToJson(null, Microsoft.Azure.PowerShell.Cmdlets.DiskPool.Runtime.SerializationMode.IncludeAll)?.ToString();

public override string ToString()
{
var returnNow = false;
var result = global::System.String.Empty;
OverrideToString(ref result, ref returnNow);
if (returnNow)
{
return result;
}
return ToJsonString();
}
}
/// Azure Managed Disk to attach to the Disk Pool.
[System.ComponentModel.TypeConverter(typeof(DiskTypeConverter))]
Expand Down
Loading