Bug #49292
closed
mgr/dashboard: fix PUT - /api/host/{hostname} while adding labels
Added by Avan Thakkar about 3 years ago.
Updated about 3 years ago.
Category:
General - Back-end
Description
'PUT /api/host/{hostname}' API call, provided string is spliced into characters and added as individual labels.
curl -i -k --location -X PUT 'https://localhost:11000/api/host/host1' -H 'Accept: application/vnd.ceph.api.v1.0+json' -H 'Content-Type: application/json' -H 'Authorization: Bearer eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJpc3MiOiJjZXBoLWRhc2hib2FyZCIsImp0aSI6ImYxZDg1NmVhLTU2MTYtNGJiYi04NDZhLTVmZDJlNDAxNDQ2MSIsImV4cCI6MTYxMTk2MTU2NCwiaWF0IjoxNjExOTMyNzY0LCJ1c2VybmFtZSI6ImFkbWluIn0.5xmWOgcLa9xlKM0Svt8YVGBMf94M11eHQR19Z3FeFkw' -d '{"labels": "MON"}'
HTTP/1.1 200 OK
Content-Type: application/vnd.ceph.api.v1.0+json
Server: Ceph-Dashboard
Date: Fri, 29 Jan 2021 15:54:16 GMT
Vary: Accept-Encoding
Content-Length: 4
null%
[ceph: root@ceph /]# ceph orch host ls
HOST ADDR LABELS STATUS
host1 host1 M N O
Avan Thakkar wrote:
'PUT /api/host/{hostname}' API call, provided string is spliced into characters and added as individual labels.
curl -i -k --location -X PUT 'https://localhost:11000/api/host/host1' -H 'Accept: application/vnd.ceph.api.v1.0+json' -H 'Content-Type: application/json' -H 'Authorization: Bearer eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJpc3MiOiJjZXBoLWRhc2hib2FyZCIsImp0....FeFkw' -d '{"labels": "MON"}'
HTTP/1.1 200 OK
Content-Type: application/vnd.ceph.api.v1.0+json
Server: Ceph-Dashboard
Date: Fri, 29 Jan 2021 15:54:16 GMT
Vary: Accept-Encoding
Content-Length: 4
null%
[ceph: root@ceph /]# ceph orch host ls
HOST ADDR LABELS STATUS
host1 host1 M N O
- Pull request ID set to 39476
Avan Thakkar wrote:
'PUT /api/host/{hostname}' API call, provided string is spliced into characters and added as individual labels.
curl -i -k --location -X PUT 'https://localhost:11000/api/host/host1' -H 'Accept: application/vnd.ceph.api.v1.0+json' -H 'Content-Type: application/json' -H 'Authorization: Bearer eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJpc3MiOiJjZXBoLWRhc2hib2FyZCIsImp0....FeFkw' -d '{"labels": "MON"}'
HTTP/1.1 200 OK
Content-Type: application/vnd.ceph.api.v1.0+json
Server: Ceph-Dashboard
Date: Fri, 29 Jan 2021 15:54:16 GMT
Vary: Accept-Encoding
Content-Length: 4
null%
[ceph: root@ceph /]# ceph orch host ls
HOST ADDR LABELS STATUS
host1 host1 M N O
- Status changed from In Progress to Pending Backport
- Backport set to pacific
- Copied to Backport #49652: pacific: mgr/dashboard: fix PUT - /api/host/{hostname} while adding labels added
- Status changed from Pending Backport to Resolved
- Project changed from mgr to Dashboard
- Category changed from 146 to General - Back-end
Also available in: Atom
PDF