Ask Your Question

Nek's profile - activity

2018-04-04 18:47:01 -0500 received badge  Popular Question (source)
2018-01-09 06:01:12 -0500 asked a question Mark Unhealthy Resources with method POST/PUT instead of PATCH

Hi everyone,

I am just trying to mark as unhealthy a resource. This is the command I use with method PATCH:

curl -X PATCH -d '{ "mark_unhealthy": true, "resource_status_reason": "repair" }' '/v1/tenant_id/stacks/stack_id/resource_id' -H "Content-Type: application/json" -H 'X-Auth-Token: 43ac1a9369e64864863974782e7ab70b'

But I would like to perform the same operation with method POST or PUT. What I used is this:

curl -X POST -d ' {"name": "mark_unhealthy", "args": { "unhealthy": "true", "resource_status_reason": "repair" }}' '/v1/tenant_id/stacks/stack_id/resource_id' -H "Content-Type: application/json" -H 'X-Auth-Token: 43ac1a9369e64864863974782e7ab70b'

but with no success. Any ideas? Is it possible? I tried this alternative, as I found this page: https://specs.openstack.org/openstack/heat-specs/specs/mitaka/mark-unhealthy.html (https://specs.openstack.org/openstack...)

Thank you

2017-02-16 02:02:30 -0500 answered a question Error in adding interface in router using curl command

Hi, you are right! Now it worked!

Thank you!

2017-02-15 15:23:08 -0500 asked a question Error in adding interface in router using curl command

HI,

I 'm trying to add an interface to a router, using this command I found in another thread in this forum:

curl -i -X PUT http://192.168.2.40:9696/v2.0/routers/68d958cd-779b-4449-8846-fb7c01c0b51d (http://192.168.2.40:9696/v2.0/routers...) -H "User-Agent: python-neutronclient" -H "Content-Type: application/json" -H "Accept: application/json" -H "X-Auth-Token: $TOKEN" -d '{"subnet_id": "97ac7815-a1f0-470a-ac1b-a5c126f401af"}'

where {68d958cd-779b-4449-8846-fb7c01c0b51d} is the router_id I get from this command: curl -s -k -H "X-Auth-Token: $TOKEN" http://192.168.2.40:9696/v2.0/routers | python -m json.tool

and "subnet_id" is the id of the interface I want to add to the router,

but I 'm getting error: NeutronError": {"message": "Unable to find 'router' in request body", "type": "HTTPBadRequest", "detail": ""}.

Can you understand what goes wrong? Thanx