Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

-Verbose returns back incomplete messages. #480

Closed
clumnah opened this issue Oct 25, 2019 · 0 comments · Fixed by #482
Closed

-Verbose returns back incomplete messages. #480

clumnah opened this issue Oct 25, 2019 · 0 comments · Fixed by #482
Labels

Comments

@clumnah
Copy link
Contributor

clumnah commented Oct 25, 2019

This is a super minor issue, and I stumbled across this by accident.

When running a cmdlet with the -verbose switch, messages are being returned back without the function name in the "Load API Data for " statement

See the line in bold below.
I have found this to be true with all cmdlets in the module.

The reason for this is that in Get-RubrikAPIData, each cmdlet definition is missing the "Function" Key and value.

Depending on when this gets looked at, Get-RubrikDatabase, may have been fixed as a my last update to the module corrected this issue for that cmdlet. However, other cmdlets will have the same issue.
Provide information about the failure by issuing the command using the -Verbose command.

get-rubrikdatabase -name stackoverflow -verbose
VERBOSE: Validate the Rubrik token exists
VERBOSE: Found a Rubrik token for authentication
VERBOSE: Gather API Data for Get-RubrikDatabase
VERBOSE: Selected 1.0 API Data for Get-RubrikDatabase
**VERBOSE: Load API data for**
VERBOSE: Description: Returns a list of summary information for Microsoft SQL databases.
VERBOSE: Build the URI
VERBOSE: URI = https://amer1-rbk01.rubrikdemo.com/api/v1/mssql/db
VERBOSE: Build the query parameters for instance_id,primary_cluster_id,effective_sla_domain_id
VERBOSE: Query = Found limit flag
VERBOSE: URI = https://amer1-rbk01.rubrikdemo.com/api/v1/mssql/db?limit=9999
VERBOSE: Submitting the request
VERBOSE: GET https://amer1-rbk01.rubrikdemo.com/api/v1/mssql/db?limit=9999 with 0-byte payload
VERBOSE: received 1667508-byte response of content type application/json; charset=UTF-8
VERBOSE: Received HTTP Status 200
VERBOSE: Formatting return value
VERBOSE: Filter the results
VERBOSE: Filter match = Instance
VERBOSE: Filter match = Name
VERBOSE: Filter match = Hostname
VERBOSE: Filter match = SLA

Expected Behavior:
See line in bold below

get-rubrikdatabase -name stackoverflow -verbose
VERBOSE: Validate the Rubrik token exists
VERBOSE: Found a Rubrik token for authentication
VERBOSE: Gather API Data for Get-RubrikDatabase
VERBOSE: Selected 1.0 API Data for Get-RubrikDatabase
**VERBOSE: Load API data for Get-RubrikDatabase**
VERBOSE: Description: Returns a list of summary information for Microsoft SQL databases.
VERBOSE: Build the URI
VERBOSE: URI = https://amer1-rbk01.rubrikdemo.com/api/v1/mssql/db
VERBOSE: Build the query parameters for instance_id,primary_cluster_id,effective_sla_domain_id
VERBOSE: Query = Found limit flag
VERBOSE: URI = https://amer1-rbk01.rubrikdemo.com/api/v1/mssql/db?limit=9999
VERBOSE: Submitting the request
VERBOSE: GET https://amer1-rbk01.rubrikdemo.com/api/v1/mssql/db?limit=9999 with 0-byte payload
VERBOSE: received 1667508-byte response of content type application/json; charset=UTF-8
VERBOSE: Received HTTP Status 200
VERBOSE: Formatting return value
VERBOSE: Filter the results
VERBOSE: Filter match = Instance
VERBOSE: Filter match = Name
VERBOSE: Filter match = Hostname
VERBOSE: Filter match = SLA

Steps to Reproduce:

Please provide detailed steps for reproducing the issue.

run any cmdlet with -verbose. Regardless of parameters provided.

mwpreston added a commit that referenced this issue Oct 28, 2019
Fixed -Verbose incomplete message - Resolves #480
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant