diff --git a/GlobalDashboardPS/GlobalDashboardPS.Format.ps1xml b/GlobalDashboardPS/GlobalDashboardPS.Format.ps1xml index e268814..0cfe242 100644 --- a/GlobalDashboardPS/GlobalDashboardPS.Format.ps1xml +++ b/GlobalDashboardPS/GlobalDashboardPS.Format.ps1xml @@ -299,7 +299,7 @@ Default - GlobalDashboardPS.OVGDResourceAlerts + GlobalDashboardPS.OVGDResourceAlert @@ -576,5 +576,53 @@ + + Default + + GlobalDashboardPS.OVGDTask + + + + + + 30 + left + + + + 15 + left + + + + 25 + left + + + + 15 + left + + + + + + + Name + + + TaskState + + + Created + + + Owner + + + + + + diff --git a/GlobalDashboardPS/GlobalDashboardPS.psd1 b/GlobalDashboardPS/GlobalDashboardPS.psd1 index 31b7448..99f0ad8 100644 Binary files a/GlobalDashboardPS/GlobalDashboardPS.psd1 and b/GlobalDashboardPS/GlobalDashboardPS.psd1 differ diff --git a/GlobalDashboardPS/Public/Get-OVGDTask.ps1 b/GlobalDashboardPS/Public/Get-OVGDTask.ps1 new file mode 100644 index 0000000..82db317 --- /dev/null +++ b/GlobalDashboardPS/Public/Get-OVGDTask.ps1 @@ -0,0 +1,61 @@ +function Get-OVGDTask { + <# + .SYNOPSIS + Retrieves the Storage Systems connected to the Global Dashboard instance + .DESCRIPTION + This function will retrieve the Storage Systems on the specified Global Dashboard instance + .NOTES + Info + Author : Rudi Martinsen / Intility AS + Date : 25/03-2019 + Version : 0.1.1 + Revised : 17/04-2019 + Changelog: + 0.1.1 -- Added help text + .LINK + https://github.com/rumart/GlobalDashboardPS + .LINK + https://developer.hpe.com/blog/accessing-the-hpe-oneview-global-dashboard-api + .PARAMETER Server + The Global Dashboard to remove connection from + .PARAMETER Entity + The Id of the Storage System to retrieve + .PARAMETER Count + The count of Storage Systems to retrieve, defaults to 25 + .EXAMPLE + PS C:\> Get-OVGDTask + + Retrieves all Tasks on the Global Dashboard instance + .EXAMPLE + PS C:\> Get-OVGDTask -Entity xxxxxxxx-xxxx-xxxx-xxxx-54e195f27f36 + + Retrieves the specific Task with the specified ID + #> + [CmdletBinding()] + param ( + $Server, + [alias("Task")] + $Entity, + $Count = 25 + ) + + begin { + $ResourceType = "tasks" + } + + process { + $Resource = BuildPath -Resource $ResourceType -Entity $Entity + $Query = "count=$Count" + $result = Invoke-OVGDRequest -Resource $Resource -Query $Query + + if ($result.Count -lt $result.Total ) { + Write-Verbose "The result has been paged. Total number of results is: $($result.total)" + } + + $output = Add-OVGDTypeName -TypeName "GlobalDashboardPS.OVGDTask" -Object $result.members + return $output + } + + end { + } +} \ No newline at end of file diff --git a/README.md b/README.md index 434a0b8..1469cbc 100644 --- a/README.md +++ b/README.md @@ -32,6 +32,7 @@ For now the following functions are available: - Get-OVGDServerProfile - Get-OVGDServerProfileTemplate - Get-OVGDStorageSystem +- Get-OVGDTask - BuildResource (private function) - Invoke-OVGDRequest (private function) - Set-InsecureSSL (private function) diff --git a/appveyor.yml b/appveyor.yml index 787dc88..a2fa3a8 100644 --- a/appveyor.yml +++ b/appveyor.yml @@ -1,4 +1,4 @@ -version: 0.6.{build} +version: 0.7.{build} build: off skip_non_tags: true diff --git a/changelog.md b/changelog.md index 391b93e..7709750 100644 --- a/changelog.md +++ b/changelog.md @@ -14,7 +14,6 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0 - Function for changing the name and/or the parent of a group - Function for listing Storage pools - Function for listing Storage volumes -- Function for listing Tasks (#3) - Function for listing SAN Managers - Function for listing Managed SANs - Function for returning the sso url of an appliance @@ -28,6 +27,16 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0 - Support queries - Scriptanalyzer test +## [version 0.7.0] - 2019-04-24 + +### Added + +- Function for listing Tasks (#3) + +### Changed / Breaking + +- Renamed Resource Alerts function + ## [version 0.6.0] - 2019-04-24 ### Added