Documentation examples are wrong and misleading creation of DSL rules
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
Ironic Inspector |
Fix Released
|
High
|
Sam Betts |
Bug Description
Using ironic-inspector REST API, the rules are accessible, although initially empty, meanwhile the creation of rules fails:
$ curl -s -H "X-Auth-Token: $OS_TOKEN" http://
{
"rules": []
}
$ curl -s -H "X-Auth-Token: $OS_TOKEN" -H "Content-Type: application/json" -d '{"actions": {"action": "set-attribute", "path": "/driver_
{
"error": { "message": "404: Not Found" }
}
ironic-inspector logs:
-------
Mar 31 01:06:41 undercloud.
Mar 31 01:06:41 undercloud.
-------
Initial investigation shows the "/v1/rules" request with POST data doesn't even reach the api_rules block:
https:/
Tested:
On Liberty with:
openstack-
openstack-
python-
openstack-
openstack-
python-
Also tried above with:
openstack-
description: | updated |
description: | updated |
Changed in ironic-inspector: | |
status: | Incomplete → Triaged |
importance: | Undecided → High |
tags: | added: documentation |
Hello!
I'm not sure what you mean by http:// ${OS_HOST} :5050/v1/ types, this /types postfix is not something we provide. Also note that conditions and actions keys should be lists of dicts. Please see http:// docs.openstack. org/developer/ ironic- inspector/ http-api. html for details. You can also use the client source code as reference: https:/ /github. com/openstack/ python- ironic- inspector- client/ blob/master/ ironic_ inspector_ client/ v1.py#L179- L208
Let us know if that worked.