Skip to content
This repository has been archived by the owner on Sep 2, 2021. It is now read-only.

Subnet with Proxy and Unmanaged both to "true" should return error; doesn't. #180

Open
sygibson opened this issue Mar 19, 2020 · 1 comment

Comments

@sygibson
Copy link
Contributor

sygibson commented Mar 19, 2020

The swagger-ui Subnets information shows an example POST block that has both "unmanaged" and "proxy" set to true. The documentation states that if both set to "true", this should result in an error. However, a 200 response is returned in this case.

Screen Shot 2020-03-19 at 09 55 34

Swagger URL example:
https://:8092/swagger-ui/#!/Subnets/createSubnet

  "ReadOnly": true,
  "ReservedLeaseTime": 0,
  "Strategy": "string",
  "Subnet": "string",
  "Unmanaged": true,```
@galthaus
Copy link
Contributor

galthaus@Gregorys-MBP  ~/play-swagger/src/github.com/digitalrebar/provision-plugins   v4  drpcli subnets create '{ "Name": "greg-test", "Subnet": "1.1.1.0/24", "Unmanaged": true, "Proxy": true }'
Error: ValidationError: subnets/greg-test: Unmanaged and Proxy cannot both be true

curl -k -u rocketskates:r0cketsk8ts https://127.0.0.1:8092/api/v3/subnets -X POST -H "Content-Type: application/json" -d'{ "Name": "greg-test", "Subnet": "1.1.1.0/24", "Unmanaged": true, "Proxy": true }'

I think we more data:

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants