-
Notifications
You must be signed in to change notification settings - Fork 183
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
oci compute compute-capacity-report says invalid json with generated sample json #747
Comments
You probably edited the shape-availabilities.json file above before using it in the subsequent command. But you don't show the final json file. I suspect there's a missing or extra bracket or comma that's causing the "must be in JSON format" error. I edited my shape-availabilities.json file to look like:
and the command works okay. |
I tried your exact shape-availabilities.json file contents and get the same error. Might be a windows problem? |
If the json is syntactically correct and you're still getting the error, it may be due to character encoding in the file. See OCI Command Line JSON File Data for details. I'm not sure how to check or change the encoding, but this looks like a possible explanation. |
I still see the issue. could you help us look at it: ➜ ~ oci compute compute-capacity-report create --availability-domain ypKW:US-ASHBURN-AD-3 --compartment-id $COMP --shape-availabilities file://shape-availabilities.json --auth security_token --profile DEFAULT |
This works well:
I would suggest you to check the tool we developed - https://github.com/oracle/oci-python-sdk/tree/master/examples/oci_capacity_reporter |
oci compute compute-capacity-report reports
Parameter 'shape_availabilities' must be in JSON format.
when using example json.Following the documentation here ...
https://docs.oracle.com/en-us/iaas/tools/oci-cli/3.37.7/oci_cli_docs/cmdref/compute/compute-capacity-report/create.html
oci compute compute-capacity-report create \ --generate-param-json-input shape-availabilities > shape-availabilities.json
shape-availabilities.json
Running
Results in
I followed the examples here https://docs.oracle.com/en-us/iaas/Content/API/SDKDocs/cliusing.htm#ManagingCLIInputandOutput but cant seem to make any sense of it.
I suspect there is a bug with the way the report expects input or how the sample data is generated? Thanks in advance.
The text was updated successfully, but these errors were encountered: