pritidesai commented on issue #708: redeploy manifest with rule leaves as 
disables
URL: 
https://github.com/apache/incubator-openwhisk-wskdeploy/issues/708#issuecomment-365018487
 
 
   :( @csantanapr I didn't check your comment here, ended up debugging it :(
   
   yup, indeed its a backend issue:
   
   `r1` doesn't exist:
   
   ```
   curl --user user:password -X GET 
http://192.168.33.13:10001/api/v1/namespaces/guest/rules/r1
   {"error":"The requested resource does not exist.","code":1430}
   ```
   
   Creating `r1` using `PUT`:
   
   ```
   curl --user user:password -X PUT 
http://192.168.33.13:10001/api/v1/namespaces/guest/rules/r1 -H "Content-Type: 
application/json" -d 
'{"name":"r1","status":"active","trigger":"/guest/trigger1","action":"/guest/action1","publish":false}'
   
{"name":"r1","publish":false,"annotations":[],"version":"0.0.1","status":"active","action":{"path":"guest/","name":"action1"},"namespace":"guest","trigger":{"path":"guest/","name":"trigger1"}}
   ```
   
   Getting `r1`:
   
   ```
    curl --user user:password -X GET 
http://192.168.33.13:10001/api/v1/namespaces/guest/rules/r1
   
{"name":"r1","publish":false,"annotations":[],"version":"0.0.1","status":"active","action":{"path":"guest/","name":"action1"},"namespace":"guest","trigger":{"path":"guest","name":"trigger1"}}
   ```
   
   Update rule `PUT r1`: 
   
   ```
   curl --user user:password -X PUT 
http://192.168.33.13:10001/api/v1/namespaces/guest/rules/r1?overwrite=true -H 
"Content-Type: application/json" -d 
'{"name":"r1","status":"active","trigger":"/guest/trigger1","action":"/guest/action1","publish":false}'
   
{"name":"r1","publish":false,"annotations":[],"version":"0.0.2","status":"active","action":{"path":"guest","name":"action1"},"namespace":"guest","trigger":{"path":"guest","name":"trigger1"}}
   ```
   
   Get `r1`:
   
   ```
   curl --user user:password -X GET 
http://192.168.33.13:10001/api/v1/namespaces/guest/rules/r1
   
{"name":"r1","publish":false,"annotations":[],"version":"0.0.2","status":"inactive","action":{"path":"guest","name":"action1"},"namespace":"guest","trigger":{"path":"guest","name":"trigger1"}}
   ```

----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
us...@infra.apache.org


With regards,
Apache Git Services

Reply via email to