7 Commits

Author SHA1 Message Date
Brian Wuchner
b68077e4c3 Updating module to resolve duplicate object bug
When passing in objects to Get-SkylineAffectedObject, it was possible for duplicate queries to be invoked for the same product.  This commit fixes that by moving some of the string manipulation inside the correct loop for this function.  Additionally, the text replace lines were consolidated to reduce some confusion with variable assignment that led to this bug in the first place.

Signed-off-by: Brian Wuchner <brian.wuchner@gmail.com>
2022-12-20 08:52:34 -05:00
Brian Wuchner
e0e2d1bbdc Update VMware.Skyline.InsightsApi.psm1
I accidentally committed a version with a query problem in Get-SkylineAffectedObject.  This version does not contain that search problem.

Signed-off-by: Brian Wuchner <brian.wuchner@gmail.com>
2022-05-13 16:43:07 -04:00
Brian Wuchner
80622414d6 Update VMware.Skyline.InsightsApi.psm1
Apologies for the delay on getting this commit to address the final open item in the PR.  This change removes the "hit a 429 and retry" logic as it was not effective.  Replaced it with a global variable that stores the time of the last query.  If a query has happened within the last 501ms we wait before sending.  I've issued a few thousand queries with this logic added and have not yet hit the 429 error.  The logic to find and report on 429's in a more friendly way still exists, just in case.

Additionally I've implemented a counter to track number of queries that is reset by Connect-SkylineInsights, to track how many queries are executed.  This was more of a debugging tool, but felt the overhead was low enough to leave it in for future troubleshooting.

Signed-off-by: Brian Wuchner <brian.wuchner@gmail.com>
2022-05-13 11:14:46 -04:00
Brian Wuchner
b2e0decb68 Update VMware.Skyline.InsightsApi.psm1
Fixing minor issue uncovered by testing where only a product (vCenter Name) was passed to Get-SkylineFinding function.  When passed by pipeline, the product was applied to each pipeline input.  Making a change to require passing through pipeline by property name only.

Signed-off-by: Brian Wuchner <brian.wuchner@gmail.com>
2022-03-20 20:50:13 -04:00
Brian Wuchner
d85c6096a3 Update VMware.Skyline.InsightsApi.psm1
Addressing issues in PR 546.

Signed-off-by: Brian Wuchner <brian.wuchner@gmail.com>
2022-03-18 23:04:05 -04:00
Brian Wuchner
3cd0fe0ca5 Update VMware.Skyline.InsightsApi.psm1
Moving the ParameterSetName checks to the process block instead of the begin block.

Signed-off-by: Brian Wuchner <brian.wuchner@gmail.com>
2022-02-23 15:18:04 -05:00
Brian Wuchner
bc6d2e8a5f Initial commit of VMware.Skyline.InsightsApi module
Initial commit of VMware.SkylineInsightsApi module, containing the following functions:
Connect-SkylineInsights, Disconnect-SkylineInsights, Invoke-SkylineInsightsApi, Get-SkylineFinding, Get-SkylineAffectedObject, Format-SkylineResult, Start-SkylineInsightsApiExplorer

Signed-off-by: Brian Wuchner <brian.wuchner@gmail.com>
2022-02-21 12:21:45 -05:00