Skip to content

Commit

Permalink
Added Task function, resolving #3
Browse files Browse the repository at this point in the history
  • Loading branch information
rumart committed Apr 24, 2019
1 parent 0601aa4 commit 015e69b
Show file tree
Hide file tree
Showing 6 changed files with 122 additions and 3 deletions.
50 changes: 49 additions & 1 deletion GlobalDashboardPS/GlobalDashboardPS.Format.ps1xml
Original file line number Diff line number Diff line change
Expand Up @@ -299,7 +299,7 @@
<View>
<Name>Default</Name>
<ViewSelectedBy>
<TypeName>GlobalDashboardPS.OVGDResourceAlerts</TypeName>
<TypeName>GlobalDashboardPS.OVGDResourceAlert</TypeName>
</ViewSelectedBy>
<TableControl>
<TableHeaders>
Expand Down Expand Up @@ -576,5 +576,53 @@
</TableRowEntries>
</TableControl>
</View>
<View>
<Name>Default</Name>
<ViewSelectedBy>
<TypeName>GlobalDashboardPS.OVGDTask</TypeName>
</ViewSelectedBy>
<TableControl>
<TableHeaders>
<TableColumnHeader>
<Label>Name</Label>
<Width>30</Width>
<Alignment>left</Alignment>
</TableColumnHeader>
<TableColumnHeader>
<Label>TaskState</Label>
<Width>15</Width>
<Alignment>left</Alignment>
</TableColumnHeader>
<TableColumnHeader>
<Label>Created</Label>
<Width>25</Width>
<Alignment>left</Alignment>
</TableColumnHeader>
<TableColumnHeader>
<Label>Owner</Label>
<Width>15</Width>
<Alignment>left</Alignment>
</TableColumnHeader>
</TableHeaders>
<TableRowEntries>
<TableRowEntry>
<TableColumnItems>
<TableColumnItem>
<PropertyName>Name</PropertyName>
</TableColumnItem>
<TableColumnItem>
<PropertyName>TaskState</PropertyName>
</TableColumnItem>
<TableColumnItem>
<PropertyName>Created</PropertyName>
</TableColumnItem>
<TableColumnItem>
<PropertyName>Owner</PropertyName>
</TableColumnItem>
</TableColumnItems>
</TableRowEntry>
</TableRowEntries>
</TableControl>
</View>
</ViewDefinitions>
</Configuration>
Binary file modified GlobalDashboardPS/GlobalDashboardPS.psd1
Binary file not shown.
61 changes: 61 additions & 0 deletions GlobalDashboardPS/Public/Get-OVGDTask.ps1
Original file line number Diff line number Diff line change
@@ -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 {
}
}
1 change: 1 addition & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand Down
2 changes: 1 addition & 1 deletion appveyor.yml
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
version: 0.6.{build}
version: 0.7.{build}
build: off
skip_non_tags: true

Expand Down
11 changes: 10 additions & 1 deletion changelog.md
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand All @@ -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
Expand Down

0 comments on commit 015e69b

Please sign in to comment.