Problem with "vim list" when the "extra" attribute is not included in the response
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
tacker |
New
|
Undecided
|
Unassigned |
Bug Description
- Problem
When Enhanced Tacker Policy is enabled, if the "extra" attribute is not included in the response, data cannot be obtained correctly with "vim list" (GET /v1.0/vims).
Case where response does not include "extra"
````
$ curl -g -X GET "http://
{"vims": []}
````
->The expected response is below.
````
{"vims": [{"id": "88e5cb77-
````
Case where response include "extra"
````
$ curl -g -X GET "http://
{"vims": [{"id": "88e5cb77-
````
- Cause
When Enhanced Tacker Policy is enabled, policy checks are performed using the value of vim's "extra" attributes.
```
"vim": {
...
"extra": {
"area": "tokyo@japan"
},
...
}
```
Therefore, if "fields" is specified in the query parameter and the "extra" attribute is no longer included in the response, the policy check will unintentionally fail and data will not be retrieved as expected.
- Impact
In the "openstack vim show/set/delete" commands, execute "vim list" with "fields=id" specified as the query parameter before executing "vim show/set/delete".
Therefore, when Enhanced Tacker Policy is enabled, the "openstack vim show/set/delete" commands cannot be executed correctly.
Example
```
$ openstack vim show 88e5cb77-
...
REQ: curl -g -i -X GET http://
RESP BODY: {"vims": []}
...
REQ: curl -g -i -X GET http://
RESP BODY: {"vims": []}
...
clean_up ShowVIM: Unable to find vim with name '88e5cb77-
```