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

Create Host from CLI throws error which is not proper #1291

Open
kumarashit opened this issue Jun 13, 2020 · 1 comment
Open

Create Host from CLI throws error which is not proper #1291

kumarashit opened this issue Jun 13, 2020 · 1 comment
Labels
bug Something isn't working
Milestone

Comments

@kumarashit
Copy link
Collaborator

kumarashit commented Jun 13, 2020

Issue/Feature Description:
Create Host using osdsctl with wrong parameter value. This throws error releated to JSON format. Now this error is not very intuitive for user to understand
Why this issue to fixed / feature is needed(give scenarios or use cases):
For better error response.
How to reproduce, in case of a bug:
Using CLI try to create Host

--osType Linux
ERROR: Request body has an error: doesn't match the schema: Error at "/osType":JSON value is not one of the allowed values
root@aks-VirtualBox:~/gopath/src/github.com/sodafoundation/installer/ansible# osdsctl host create ash-host1 --ip 127.0.0.1 --availabilityZones default --accessMode RW --osType linux
ERROR: Request body has an error: doesn't match the schema: Error at "/accessMode":JSON value is not one of the allowed values
root@aks-VirtualBox:~/gopath/src/github.com/sodafoundation/installer/ansible# osdsctl host create ash-host1 --ip 127.0.0.1 --availabilityZones default --accessMode rw --osType linux
ERROR: Request body has an error: doesn't match the schema: Error at "/accessMode":JSON value is not one of the allowed values

Other Notes / Environment Information: (Please give the env information, log link or any useful information for this issue)
Correct format is:

root@aks-VirtualBox:~/gopath/src/github.com/sodafoundation/installer/ansible# osdsctl host create ash-host1 --ip 127.0.0.1 --availabilityZones default --osType linux+-------------------+--------------------------------------+
| Property          | Value                                |
+-------------------+--------------------------------------+
| Id                | 88f9823e-32ac-4aec-a660-8a56e2f16cb4 |
| CreatedAt         | 2020-06-13T19:49:44                  |
| UpdatedAt         |                                      |
| HostName          | ash-host1                            |
| OsType            | linux                                |
| AccessMode        | agentless                            |
| IP                | 127.0.0.1                            |
| Port              | 0                                    |
| Username          |                                      |
| AvailabilityZones | [default]                            |
| Initiators        | null                                 |
|                   |                                      |
+-------------------+--------------------------------------+
root@aks-VirtualBox:~/gopath/src/github.com/sodafoundation/installer/ansible#
@kumarashit kumarashit added the bug Something isn't working label Jun 13, 2020
@kumarashit kumarashit added this to the Jun2020 milestone Jun 13, 2020
@PravinRanjan10
Copy link
Contributor

@PravinRanjan10 plz check it

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants