HewlettPackard / HPEDSCC-PowerShell-Toolkit

A PowerShell Toolkit that enables management of a HPE GreenLake DSCC (Data Storage Cloud Console) environment via easy to use PowerShell commands which interface with the publically available RestAPI.
BSD 3-Clause "New" or "Revised" License
9 stars 5 forks source link

Add -DiskId functionality and refactoring for Disk.ps1 #4

Closed atkinsroy closed 1 year ago

atkinsroy commented 1 year ago

30-April-2030 - I've implemented a few changes to Get-DsccDisk

  1. Implemented the -DiskId parameter. This accepts one or more disk IDs.
  2. Implemented the default -WhatIf functionality available in PowerShell.
  3. Refactored the code to reduce the number of API calls (improved performance) and generally flattened and simplified the code.

01-May-2023 - Added another pull request with the following updates:

  1. Refactored Get-DsccStorageSystem so that it creates a Global Variable called $DsccStorageSystem. This has name, ID and device type in it. The idea I'm suggesting is run this with no parameters in Connect-DSCC to initalise this variable. Then all other cmdlets can access the variable rather than calling Get-DsccStorageSystem. This improves performance dramatically because there are fewer RESTApi calls being made. This can be used to resolve SystemId from SystemName and DeviceType from SystemID, for example.
  2. Renamed Invoke-DsscStorageSystemLocate to Enable-DsccStorageSystemLocate and also written a new cmdlet called Disable-DsccStorageSystemLocate. Both tested and working on an Alletra 9080.
  3. Updated above cmdlets and Get-DsccDisk to implement -SystemName parameter. Now either -SystemName or -SystemId can be specified (Using parameter sets). This uses the $DssStorageSystem global variable implemented, as above.
  4. Implemented the default -WhatIf functionality to all the above cmdlets.
  5. Updated HPEDSCC.psm1 to add the two new cmdlets.

09-May-2023 - V1.0.2 Refactored Get-DsccController to support one or more systems and one or more controllers. Also added the -Component and -Performance parameters. Get-DsccControllerSubComponent and Get-DsccControllerPerf are refactored but are no longer exported - they implement the new parameters in Get-DsccController. This provides a more intuitive way of displaying the required information. NOTE: I have not added custom objects for components yet - like DSCC.StorageSystem.Battery, DSCC.StorageSystem.Performance etc.

chris-lionetti commented 1 year ago

Excellent Contributions, These are some great enhancement.