CE-1764: Modify backend to use Naming service instead of CCDB
APIs references of the CCDB have been replaced with equivalent naming service API endpoints.
Naming REST APIs used:
- Fetching all IOCs: https://naming.esss.lu.se/rest/deviceNames/devicetype/{deviceType} . The deviceType is IOC in our case, and we are only keeping those item which: discipline = SC AND status = ACTIVE
- Fetching a single device by UUID: https://naming.esss.lu.se/rest/deviceNames/{uuid} // Then we keeping only those which: deviceType = IOC AND discipline = SC AND status = ACTIVE
Along with the CCDB phase-out, the external name id also has been removed from the IOC. (From the database too.) So it includes some API changes:
Create IOC:
request body before:
{
"externalNameId": 0,
"gitProjectId": 0
}
request body after:
{
"namingUuid": "string",
"gitProjectId": 0
}
Update IOC:
request body before:
{
"owner": "string",
"externalNameId": 0,
"gitProjectId": 0
}
request body after:
{
"owner": "string",
"nameUuid": "string",
"gitProjectId": 0
}
Fetching names from naming by name substring:
response before:
[
{
"id": 0,
"name": "string",
"description": "string"
}
]
response after:
[
{
"uuid": "string",
"name": "string",
"description": "string"
}
]
So instead of the external name id (which is a CCDB based identifier), the uuid (and of course the name) will identify the IOC in the Naming service.
Unfortunately, this change could not really be separated into multiple commits, because there is a lot of cross connected code.
Edited by Domonkos Gulyas