Skip to content
This repository was archived by the owner on Nov 4, 2021. It is now read-only.

Commit

Permalink
v0.14.0 (#32)
Browse files Browse the repository at this point in the history
* Added refresh command to Set-UnityLun function.

* Added Get-UnityHostInitiator function.

* Added refresh command to Set-UnityLun function.

* Pulled latest changes from Equelin production repo.

* Updated Set-UnitySnap documentation.

* Re-updated Unity-PowerShell.UnityHostInitiator.Format.ps1xml file from source.

* Added functions about hardware, updated docs

* Fixed missing help parameters
  • Loading branch information
equelin authored Apr 10, 2017
1 parent 87c738c commit 8338251
Show file tree
Hide file tree
Showing 158 changed files with 4,322 additions and 1,449 deletions.
Binary file modified Tools/Classes/Classes.ps1
Binary file not shown.
2 changes: 1 addition & 1 deletion Tools/Classes/Get-Class.ps1
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ Function Format-Type {

Process {
Switch -Wildcard ($Type) {
'Integer' {$output = 'Int'}
'Integer' {$output = 'Object'}
'Boolean' {$output = 'Bool'}
'String' {$output = 'String'}
'List<*>' {
Expand Down
11 changes: 11 additions & 0 deletions Tools/Format/Build.ps1
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
[CmdletBinding()]
Param ()

$here = Split-Path -Parent $MyInvocation.MyCommand.Path

. $here\Data.ps1

Foreach ($Class in ($Data.Class)) {
Write-Verbose "Processing class $Class.TypeName"
.\Convert-ClassToPS1xml.ps1 -TypeName $Class.TypeName -TableHeaderList $Class.TableHeaderList -OutputPath F:\Code\GitHub\Unity-Powershell\Unity-Powershell\Format\
}
13 changes: 13 additions & 0 deletions Tools/Format/Data.ps1
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
$Data = @{}

$Data.Class = @(
@{TypeName='UnityDae'; TableHeaderList=@('id','name','busId','slotNumber','model')}
@{TypeName='UnityDisk'; TableHeaderList=@('id','name','Rawsize','DiskTechnology','Rpm','Bankslot')}
@{TypeName='UnityDpe'; TableHeaderList=@('id','name','busId','slotNumber','model')}
@{TypeName='UnityEncryption'; TableHeaderList=@('id','encryptionMode','encryptionStatus','encryptionPercentage','keyManagerBackupKeyStatus')}
@{TypeName='UnityEthernetPort'; TableHeaderList=@('id','name','StorageProcessor','PortNumber','ConnectorType','Mtu','NeedsReplacement')}
@{TypeName='UnitySsc'; TableHeaderList=@('id','name','parentDae','slotNumber','model')}
@{TypeName='UnitySsd'; TableHeaderList=@('id','name','parent','slotNumber','model')}
@{TypeName='UnityStorageProcessor'; TableHeaderList=@('id','name','parentDpe','slotNumber','model')}
)

36 changes: 36 additions & 0 deletions Tools/Readthedocs/Update-Doc.ps1
Original file line number Diff line number Diff line change
@@ -0,0 +1,36 @@
$ProjectRoot = 'F:\Code\GitHub\Unity-Powershell'

Import-Module "$ProjectRoot\Unity-Powershell" -Force

#Build YAMLText starting with the header
$YMLtext = (Get-Content "$ProjectRoot\header-mkdocs.yml") -join "`n"
$YMLtext = "$YMLtext`n"

$YMLText = "$YMLtext - Functions References:`n"
# Drain the swamp
$parameters = @{
Recurse = $true
Force = $true
Path = "$ProjectRoot\docs\References"
ErrorAction = 'SilentlyContinue'
}
$null = Remove-Item @parameters
$Params = @{
Path = "$ProjectRoot\docs\References"
type = 'directory'
ErrorAction = 'SilentlyContinue'
}
$null = New-Item @Params
$Params = @{
Module = $ENV:BHProjectName
Force = $true
OutputFolder = "$ProjectRoot\docs\References"
NoMetadata = $true
}
New-MarkdownHelp @Params | foreach-object {
$Function = $_.Name -replace '\.md', ''
$Part = " - {0}: References/{1}" -f $Function, $_.Name
$YMLText = "{0}{1}`n" -f $YMLText, $Part
$Part
}
$YMLtext | Set-Content -Path "$ProjectRoot\mkdocs.yml"
36 changes: 0 additions & 36 deletions Tools/Readthedocs/Update-Mkdocs.ps1

This file was deleted.

Binary file not shown.
Binary file modified Unity-Powershell/Format/Unity-Powershell.UnityDisk.Format.ps1xml
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
52 changes: 52 additions & 0 deletions Unity-Powershell/Public/Hardware/Get-UnityDae.ps1
Original file line number Diff line number Diff line change
@@ -0,0 +1,52 @@
Function Get-UnityDae {

<#
.SYNOPSIS
Information about Disk Array Enclosure (DAE) components in the storage system.
.DESCRIPTION
Information about Disk Array Enclosure (DAE) components in the storage system.
You need to have an active session with the array.
.NOTES
Written by Erwan Quelin under MIT licence - https://github.com/equelin/Unity-Powershell/blob/master/LICENSE
.LINK
https://github.com/equelin/Unity-Powershell
.PARAMETER Session
Specifies an UnitySession Object.
.PARAMETER Name
Specifies the object name.
.PARAMETER ID
Specifies the object ID.
.EXAMPLE
Get-UnityDae
Retrieve Information about Disk Array Enclosure (DAE) components in the storage system.
#>

[CmdletBinding(DefaultParameterSetName="ID")]
Param (
[Parameter(Mandatory = $false,HelpMessage = 'EMC Unity Session')]
$session = ($global:DefaultUnitySession | where-object {$_.IsConnected -eq $true}),
[Parameter(Mandatory = $false,ParameterSetName="Name",ValueFromPipeline=$True,ValueFromPipelinebyPropertyName=$True,HelpMessage = 'DAE Name')]
[String[]]$Name,
[Parameter(Mandatory = $false,ParameterSetName="ID",ValueFromPipeline=$True,ValueFromPipelinebyPropertyName=$True,HelpMessage = 'DAE ID')]
[String[]]$ID
)

Begin {
Write-Debug -Message "[$($MyInvocation.MyCommand)] Executing function"

#Initialazing variables
$URI = '/api/types/dae/instances' #URI for the ressource (example: /api/types/lun/instances)
$TypeName = 'UnityDae'
}

Process {
Foreach ($sess in $session) {

Write-Debug -Message "[$($MyInvocation.MyCommand)] Processing Session: $($Session.Server) with SessionId: $($Session.SessionId)"

Get-UnityItemByKey -Session $Sess -URI $URI -Typename $Typename -Key $PsCmdlet.ParameterSetName -Value $PSBoundParameters[$PsCmdlet.ParameterSetName]

} # End Foreach ($sess in $session)
} # End Process
} # End Function
52 changes: 52 additions & 0 deletions Unity-Powershell/Public/Hardware/Get-UnityDpe.ps1
Original file line number Diff line number Diff line change
@@ -0,0 +1,52 @@
Function Get-UnityDpe {

<#
.SYNOPSIS
Information about Disk Processor Enclosures (DPEs) in the storage system.
.DESCRIPTION
Information about Disk Processor Enclosures (DPEs) in the storage system.
You need to have an active session with the array.
.NOTES
Written by Erwan Quelin under MIT licence - https://github.com/equelin/Unity-Powershell/blob/master/LICENSE
.LINK
https://github.com/equelin/Unity-Powershell
.PARAMETER Session
Specifies an UnitySession Object.
.PARAMETER Name
Specifies the object name.
.PARAMETER ID
Specifies the object ID.
.EXAMPLE
Get-UnityDpe
Retrieve Information about Disk Processor Enclosures (DPEs) in the storage system.
#>

[CmdletBinding(DefaultParameterSetName="ID")]
Param (
[Parameter(Mandatory = $false,HelpMessage = 'EMC Unity Session')]
$session = ($global:DefaultUnitySession | where-object {$_.IsConnected -eq $true}),
[Parameter(Mandatory = $false,ParameterSetName="Name",ValueFromPipeline=$True,ValueFromPipelinebyPropertyName=$True,HelpMessage = 'DPE Name')]
[String[]]$Name,
[Parameter(Mandatory = $false,ParameterSetName="ID",ValueFromPipeline=$True,ValueFromPipelinebyPropertyName=$True,HelpMessage = 'DPE ID')]
[String[]]$ID
)

Begin {
Write-Debug -Message "[$($MyInvocation.MyCommand)] Executing function"

#Initialazing variables
$URI = '/api/types/dpe/instances' #URI for the ressource (example: /api/types/lun/instances)
$TypeName = 'UnityDpe'
}

Process {
Foreach ($sess in $session) {

Write-Debug -Message "[$($MyInvocation.MyCommand)] Processing Session: $($Session.Server) with SessionId: $($Session.SessionId)"

Get-UnityItemByKey -Session $Sess -URI $URI -Typename $Typename -Key $PsCmdlet.ParameterSetName -Value $PSBoundParameters[$PsCmdlet.ParameterSetName]

} # End Foreach ($sess in $session)
} # End Process
} # End Function
50 changes: 50 additions & 0 deletions Unity-Powershell/Public/Hardware/Get-UnityEncryption.ps1
Original file line number Diff line number Diff line change
@@ -0,0 +1,50 @@
Function Get-UnityEncryption {

<#
.SYNOPSIS
Information about Encryption.
.DESCRIPTION
Information about Encryption.
You need to have an active session with the array.
.NOTES
Written by Erwan Quelin under MIT licence - https://github.com/equelin/Unity-Powershell/blob/master/LICENSE
.LINK
https://github.com/equelin/Unity-Powershell
.PARAMETER Session
Specifies an UnitySession Object.
.PARAMETER ID
Specifies the object ID.
.EXAMPLE
Get-UnityEncryption
Retrieve Information about Encryption.
#>

[CmdletBinding(DefaultParameterSetName="ID")]
Param (
[Parameter(Mandatory = $false,HelpMessage = 'EMC Unity Session')]
$session = ($global:DefaultUnitySession | where-object {$_.IsConnected -eq $true}),
[Parameter(Mandatory = $false,ParameterSetName="ID",ValueFromPipeline=$True,ValueFromPipelinebyPropertyName=$True,HelpMessage = 'Encryption ID')]
[String[]]$ID
)

Begin {
Write-Debug -Message "[$($MyInvocation.MyCommand)] Executing function"

#Initialazing variables
$URI = '/api/types/encryption/instances' #URI for the ressource (example: /api/types/lun/instances)
$TypeName = 'UnityEncryption
'
}

Process {
Foreach ($sess in $session) {

Write-Debug -Message "[$($MyInvocation.MyCommand)] Processing Session: $($Session.Server) with SessionId: $($Session.SessionId)"

Get-UnityItemByKey -Session $Sess -URI $URI -Typename $Typename -Key $PsCmdlet.ParameterSetName -Value $PSBoundParameters[$PsCmdlet.ParameterSetName]

} # End Foreach ($sess in $session)
} # End Process
} # End Function
53 changes: 53 additions & 0 deletions Unity-Powershell/Public/Hardware/Get-UnitySsc.ps1
Original file line number Diff line number Diff line change
@@ -0,0 +1,53 @@
Function Get-UnitySsc {

<#
.SYNOPSIS
Information about System Status Cards (SSCs) in the storage system.
.DESCRIPTION
Information about System Status Cards (SSCs) in the storage system.
Applies to physical deployments only.
You need to have an active session with the array.
.NOTES
Written by Erwan Quelin under MIT licence - https://github.com/equelin/Unity-Powershell/blob/master/LICENSE
.LINK
https://github.com/equelin/Unity-Powershell
.PARAMETER Session
Specifies an UnitySession Object.
.PARAMETER ID
Specifies the object ID.
.PARAMETER Name
Specifies the object name.
.EXAMPLE
Get-UnitySsc
Retrieve Information about System Status Cards (SSCs) in the storage system.
#>

[CmdletBinding(DefaultParameterSetName="ID")]
Param (
[Parameter(Mandatory = $false,HelpMessage = 'EMC Unity Session')]
$session = ($global:DefaultUnitySession | where-object {$_.IsConnected -eq $true}),
[Parameter(Mandatory = $false,ParameterSetName="Name",ValueFromPipeline=$True,ValueFromPipelinebyPropertyName=$True,HelpMessage = 'SSD Name')]
[String[]]$Name,
[Parameter(Mandatory = $false,ParameterSetName="ID",ValueFromPipeline=$True,ValueFromPipelinebyPropertyName=$True,HelpMessage = 'SSD ID')]
[String[]]$ID
)

Begin {
Write-Debug -Message "[$($MyInvocation.MyCommand)] Executing function"

#Initialazing variables
$URI = '/api/types/ssc/instances' #URI for the ressource (example: /api/types/lun/instances)
$TypeName = 'UnitySsc'
}

Process {
Foreach ($sess in $session) {

Write-Debug -Message "[$($MyInvocation.MyCommand)] Processing Session: $($Session.Server) with SessionId: $($Session.SessionId)"

Get-UnityItemByKey -Session $Sess -URI $URI -Typename $Typename -Key $PsCmdlet.ParameterSetName -Value $PSBoundParameters[$PsCmdlet.ParameterSetName]

} # End Foreach ($sess in $session)
} # End Process
} # End Function
53 changes: 53 additions & 0 deletions Unity-Powershell/Public/Hardware/Get-UnitySsd.ps1
Original file line number Diff line number Diff line change
@@ -0,0 +1,53 @@
Function Get-UnitySsd {

<#
.SYNOPSIS
Information about internal Flash-based Solid State Disks (SSDs, mSATAs) in the storage system.
.DESCRIPTION
Information about internal Flash-based Solid State Disks (SSDs, mSATAs) in the storage system.
Applies to physical deployments only.
You need to have an active session with the array.
.NOTES
Written by Erwan Quelin under MIT licence - https://github.com/equelin/Unity-Powershell/blob/master/LICENSE
.LINK
https://github.com/equelin/Unity-Powershell
.PARAMETER Session
Specifies an UnitySession Object.
.PARAMETER ID
Specifies the object ID.
.PARAMETER Name
Specifies the object name.
.EXAMPLE
Get-UnitySsd
Retrieve Information about SSD.
#>

[CmdletBinding(DefaultParameterSetName="ID")]
Param (
[Parameter(Mandatory = $false,HelpMessage = 'EMC Unity Session')]
$session = ($global:DefaultUnitySession | where-object {$_.IsConnected -eq $true}),
[Parameter(Mandatory = $false,ParameterSetName="Name",ValueFromPipeline=$True,ValueFromPipelinebyPropertyName=$True,HelpMessage = 'SSD Name')]
[String[]]$Name,
[Parameter(Mandatory = $false,ParameterSetName="ID",ValueFromPipeline=$True,ValueFromPipelinebyPropertyName=$True,HelpMessage = 'SSD ID')]
[String[]]$ID
)

Begin {
Write-Debug -Message "[$($MyInvocation.MyCommand)] Executing function"

#Initialazing variables
$URI = '/api/types/ssd/instances' #URI for the ressource (example: /api/types/lun/instances)
$TypeName = 'UnitySsd'
}

Process {
Foreach ($sess in $session) {

Write-Debug -Message "[$($MyInvocation.MyCommand)] Processing Session: $($Session.Server) with SessionId: $($Session.SessionId)"

Get-UnityItemByKey -Session $Sess -URI $URI -Typename $Typename -Key $PsCmdlet.ParameterSetName -Value $PSBoundParameters[$PsCmdlet.ParameterSetName]

} # End Foreach ($sess in $session)
} # End Process
} # End Function
Loading

0 comments on commit 8338251

Please sign in to comment.