https://blueprints.launchpad.net/karbor/+spec/karbor-service-management
Currently, karbor does not have service management API for karbor services (karbor-operationengine and karbor-protection). We can find that service management API has been in almost all the other OpenStack projects. It is very convenient for admin to list/enable/disable the services on any nodes.
Admin want to list/enable/disable karbor services on any karbor nodes.
Implement the ‘index’ method of service management API controller. Implement the ‘update’ method of service management API controller.
None
None
1. List services API The response JSON when listing services:
**get** : /v1/{project_id}/os-services
```json
{
"services": [
{
"status": "enabled",
"binary": "karbor-operationengine",
"disabled_reason": null,
"host": "karbor@node",
"updated_at": "2017-09-07T13:03:57.000000",
"state": "up",
"id": 1
},
{
"status": "enabled",
"binary": "karbor-protection",
"disabled_reason": null,
"host": "karbor@node",
"updated_at": "2017-09-07T13:03:57.000000",
"state": "up",
"id": 2
}
]
}
2. Update service API The request JSON when updating service:
**put** : /v1/{project_id}/os-services/{service_id}
```json
{
"status": "enable"
}
The response JSON when updating service:
```json
{
"service": {
"id": "e81d66a4-ddd3-4aba-8a84-171d1cb4d339",
"binary": "karbor-protection",
"disabled_reason": null,
"host": "karbor@node",
"state": "up",
"status": "enabled",
"updated_at": "2012-10-29T13:42:05.000000",
}
}
None
None
None
None
None
None
Primary assignee: Jiao Pengju <jiaopengju@cmss.chinamobile.com>
None
Unit tests in Karbor.
None
None
Except where otherwise noted, this document is licensed under Creative Commons Attribution 3.0 License. See all OpenStack Legal Documents.