Diagnostic¶
Available diagnostic units¶
The following units can be available depending on the configuration of the service on which the diagnostic is launched.
Copper¶
Unit Diag Name |
Unit code |
Unit Diag Category |
Part of STANDARD DIAG |
|---|---|---|---|
Technical information |
technicalinfo |
Access |
Yes |
Synchro test |
synchro |
Access |
Yes |
CPE MAC |
cpemac |
Access |
Yes |
SELT |
selt |
Access |
No |
MELT |
melt |
Access |
No |
Enable access |
enable |
Access |
No |
Disable access |
disable |
Access |
No |
Reset access |
reset |
Access |
No |
Access traffic |
traffic |
Access |
No |
Test dslam |
test_dslam |
Access |
Yes |
Test dlm |
test_dlm |
Access |
Yes |
Test rtc |
test_rtc |
Access |
Yes |
Collective disturbance |
derco |
Access |
Yes |
Fiber¶
Unit Diag Name |
Unit code |
Unit Diag Category |
Part of STANDARD DIAG |
|---|---|---|---|
Fiber state |
fiber_state |
Access |
Yes |
Service informations |
service_info |
Access |
No |
Collective disturbance |
derco |
Access |
Yes |
Note
Diagnostics on ENNI services are not supported at this time.
In the event of a collective disruption, the response will contain the “impacted_services” key listing all service references impacted by this disruption.
Diagnostic unit categories¶
There are two types of diagnostic units categories : access and network.
access units run on the access side of the service such as line synchronization, DSLAM ports technical informations, etc.
network units run on the network side of the service (Covage network) such as DSLAM status, core routers or delivery gate.
Getting available diagnostic units¶
To get the diagnostic units available specifically for a service, you must call the url /api/diagnostic/units/ and provide the following query parameters:
Query parameter |
Mandatory |
Description |
|---|---|---|
|
Yes |
UUID of the service on which you want to run diagnostic |
|
Yes |
Category of the units you want to run ( |
Example:
GET /api/diagnostic/units/?service_uuid=54u93i&category=access HTTP/1.1
Host: extranet.kosc-telecom.fr
HTTP/1.1 200 OK
Content-Type: application/json
[
{
"name": "technicalinfo",
"label": "Technical information",
"category": "access",
"description": "TODO",
"standard": true
},
{
"name": "synchro",
"label": "Synchro test",
"category": "access",
"description": "TODO",
"standard": true
},
{
"name": "cpemac",
"label": "CPE MAC",
"category": "access",
"description": "TODO",
"standard": true
},
{
"name": "selt",
"label": "SELT",
"category": "access",
"description": "TODO",
"standard": false
},
{
"name": "melt",
"label": "MELT",
"category": "access",
"description": "TODO",
"standard": false
},
{
"name": "port-reset",
"label": "Port reset",
"category": "access",
"description": "TODO",
"standard": false
},
{
"name": "enable",
"label": "Enable access",
"category": "access",
"description": "TODO",
"standard": false
},
{
"name": "disable",
"label": "Disable access",
"category": "access",
"description": "TODO",
"standard": false
}
]
Units fields are the following ones:
Field name |
Type |
Description |
|---|---|---|
|
string |
Name of the unit, this field is used for the |
|
string |
Category of the unit ( |
|
string |
Localized string containing the unit name (useful when displaying results on your backoffice) |
|
string |
Localized string containing the unit description (useful when displaying results on your backoffice) |
|
boolean |
Tells if the |
Creating a diagnostic run¶
To run a diagnostic on a service, a new diagnostic run must be created by doing a POST on url /api/diagnostic/runs/.
POST /api/diagnostic/runs/ HTTP/1.1
Host: extranet.kosc-telecom.fr
Content-Type: application/json
{
"service_uuid": "3acf5ab1-4062-4199-ba98-c3f94681b3de",
"type": "standard"
}
You can ask for a custom series of diagnostic units by setting type field to custom and by providing a units field containing all units you want to run.
POST /api/diagnostic/runs/ HTTP/1.1
Host: extranet.kosc-telecom.fr
Content-Type: application/json
{
"service_uuid": "3acf5ab1-4062-4199-ba98-c3f94681b3de",
"type": "custom",
"units": ["selt", "enable", "synchro"]
}
By default, units are ran on all endpoints of the service. You can specify which endpoint(s) you want the unit to be ran on by providing the endpoints field on request. You will find these endpoints on the service itself.
POST /api/diagnostic/runs/ HTTP/1.1
Host: extranet.kosc-telecom.fr
Content-Type: application/json
{
"service_uuid": "3acf5ab1-4062-4199-ba98-c3f94681b3de",
"type": "custom",
"units": ["selt", "enable", "synchro"],
"endpoints": [{
"endpoint_ref": "0123456789",
"endpoint_ref_type": "line_number"
}]
}
Constraints:
You may only execute units part of the same category if you ask for a
customdiagnotic.You must own the service you are creating the
diagnostic runon.If a
diagnostic runis already attached to the given service and its status is (created,submittedorrunning), you cannot create a newdiagnostic run. You have to wait until it’scompleted,cancelledorerror).On a Bitstream service (copper) you cannot reset an endpoint(e), and run other diagnostic(s) at the same time.
Note
Only standard diagnostic runs will allow to create a support ticket.
Fetching a diagnostic run¶
To fetch a diagnostic run you will have to GET url /api/diagnostic/runs/{alias}/.
Note
This request is possible using the alias or the id of the diagnostic run.
GET /api/diagnostic/runs/D170803_11001/ HTTP/1.1
Host: extranet.kosc-telecom.fr
When a diagnostic run is created or fetched, the API returns a dictionary with complete information about the run, the units and their status.
GET /api/diagnostic/runs/D170803_11001/ HTTP/1.1
Host: extranet.kosc-telecom.fr
HTTP/1.1 200 OK
Content-Type: application/json
{
"id": 225146,
"alias": "D190913_80926",
"service_uuid": "3acf5ab1-4062-4199-ba98-c3f94681b3de",
"status": "error",
"units": [
"synchro"
],
"results": {
"synchro": {
"status": "error",
"label": "Synchro test",
"category": "access",
"description": "",
"data": [],
"error_code": null,
"error_description": ""
}
},
"creation_date": "2019-09-13T14:03:32.713524Z",
"modification_date": "2019-09-16T15:27:06.151004Z",
"end_customer": "Untel",
"type": "custom",
"service_alias": "S190913_75475",
"endpoints": [
{
"endpoint_ref": "0492271978",
"endpoint_ref_type": "line_number"
}
],
"product": {
"code": "AM01",
"name": "ADSL-Max_FULL_BE_KOSC"
},
"ticket_id": null,
"ticket_alias": null
}
Field name |
Type |
Description |
|---|---|---|
|
integer |
Id of the diagnostic run |
|
string |
Alias of the diagnostic run |
|
string |
Diagnosed service uuid |
|
string |
Diagnosed service alias |
|
string |
|
|
array |
Array |
|
dict |
|
|
string |
|
|
string |
|
|
string |
Information about service end customer |
|
string |
|
|
array |
Service |
|
dictionary |
Dictionary containing the |
Diagnostic run results¶
Fetching a diagnostic run returns a dictionary containing a field named results. This field contains the results of all units of the diagnostic run.
Example:
{
"results" : {
"selt": {
"status": "submitted",
"label" "SELT",
"category": "access",
"description": "Description of the SELT diagnostic unit",
},
"enable": {
"status": "completed",
"label" : "Enable access",
"category": "access",
"description": "Description of the 'enable' diagnostic unit",
"data": [ {} ]
},
"synchro": {
"status": "error",
"label" "Synchro test",
"category": "access",
"description": "Description of the Synchro test diagnostic unit",
"error_code": "DSLAM_UNREACHABLE",
"error_description": "DSLAM can not be reached",
}
}
}
Each unit listed on the units field have an entry on the results dictionary with the following fields:
Name |
Type |
Description |
|---|---|---|
|
string |
Status of the unit, can be ( |
|
string |
Category of the unit ( |
|
string |
Localized string containing the unit name (useful when displaying results on your backoffice). |
|
string |
Localized string containing the unit description (useful when displaying results on your backoffice). |
|
string |
This fields contains the error code of the unit when status its status is |
|
string |
Human readable localized string describing the unit error. |
|
list of dictionnaries |
Results of unit for each of the endpoints of the service |
Note
When a unit is erroneous on a specific endpoint, the unit status is set to completed_with_error. The data dictionary corresponding to that endpoint will contain a field named error that will contain the reason why the unit failed on endpoint.
Cancelling a diagnostic¶
To cancel a diagnostic run you will have to do a PUT on url /api/diagnostic/runs/{alias}/.
Example:
PUT /api/diagnostic/runs/D170803_11001/ HTTP/1.1
Host: extranet.kosc-telecom.fr
Content-Type: application/json
{
"status": "cancelled"
}
HTTP/1.1 200 OK
Content-Type: application/json
{
"id": 1,
"alias": "D170803_11001",
"type": "custom",
"creation_date": "2017-06-16T16:20:19.824993",
"modification_date": "2017-06-19T07:31:19.372438",
"service_uuid": "yn4b0yf6",
"service_alias": "S170418_21000",
"endpoints": [{
"endpoint_ref": "0123456789",
"endpoint_ref_type": "line_number",
}],
"endcustomer": "John Doe",
"product": {
"code": "AM01",
"name": "ADSL-Max",
},
"status": "cancelled",
"units": ["selt", "enable", "synchro"],
"results": {
"selt": {
"status": "cancelled",
"label" "SELT",
"category": "access",
"description": "Description of the SELT diagnostic unit",
"data": [{ }],
},
"enable": {
"status": "cancelled",
"label" "Enable access",
"category": "access",
"description": "Description of the 'enable' diagnostic unit",
"data": [{ }],
},
"synchro": {
"status": "cancelled",
"label" "Synchro test",
"category": "access",
"description": "Description of the Synchro test diagnostic unit",
"data": [{ }],
}
}
}
Note
The diagnostic run status must be created, submitted or running to be cancelled.
This request is possible using the alias or the id of the diagnostic run.
Deleting a diagnostic run¶
Diagnostic runs can be deleted by doing a DELETE on url /api/diagnostic/runs/{alias}/.
DELETE /api/diagnostic/runs/D170420-56732/ HTTP/1.1
Host: extranet.kosc-telecom.fr
Note
The diagnostic status must be completed, cancelled or error to be deleted.
This request is possible using the alias or the id of the diagnostic run.
Listing diagnostic runs¶
A list of diagnostic runs can be retrieved by doing a GET on url /api/diagnostic/runs/.
The following filters can be added as query params to url.
Filter name |
Description |
|---|---|
|
Alias of the service diagnostics are running on |
|
Alias of the service diagnostics are running on |
|
Product line code of service diagnostics are running on |
|
Search for diagnostics on service belonging to end customer |
The API will return a list of dictionnaries representing the runs.
Note
Diagnostic runs are asynchronous. That means that after having created a run, you will have to call it regularly until its status is either completed or failed.