xcat2 / xcat-inventory

An inventory tool for xcat cluster
8 stars 16 forks source link

Implement Policy api #193

Closed robin2008 closed 5 years ago

robin2008 commented 5 years ago

complement the API described in https://github.ibm.com/xcat2/task_management/issues/144

robin2008 commented 5 years ago

UT for deleting, other UT results in https://github.ibm.com/xcat2/task_management/issues/144

curl -X POST "http://10.4.39.1:5000/api/v2/security/policy" -H  "accept: application/json" -H  "Content-Type: application/json" -d "{    \"kind\": \"policy\",    \"spec\": {        \"name\": \"abc\",        \"rule\": \"allow\",        \"priority\": \"100\"    }}"
null
[root@c910f04x39 xcat-inventory]# curl -X DELETE "http://10.4.39.1:5000/api/v2/security/policy/100" -H  "accept: application/json"
bybai commented 5 years ago

I am ok to merge it.