A desconexão de um cliente no OZmap, que está conectado a uma Caixa e a um Splitter, pode ser realizada de duas maneiras:
Desconectar a Fibra do Cliente (mantendo o cliente na Caixa): Neste caso, o cliente será desconectado do Splitter, mas continuará vinculado à Caixa.
Desconectar o Cliente da Caixa (removendo o cabo de drop): Aqui, o cliente será totalmente desconectado, tanto do Splitter quanto da Caixa, com a remoção do cabo de drop.
➡️ Exemplo
A seguir, apresentamos um exemplo de como realizar cada um dos processos de desconexão mencionados. Para isso, utilizaremos a seguinte property do OZmap, que será usada para ilustrar ambos os tipos de desconexãoDisconnecting a client in OZmap who's connected to a Box and a Splitter can be done in two ways:
Disconnect the Client's Fiber (keeping the client in the Box): In this case, the client will be disconnected from the Splitter but remain linked to the Box.
Disconnect the Client from the Box (removing the drop cable): With the drop cable removed, the client will be fully disconnected from both the Splitter and the Box.
➡️ Example
Below, we present an example of how to perform each of the disconnection processes mentioned before. For this, we will use the following property from OZmap, which will be used to illustrate both types of disconnection:
Code Block | ||
---|---|---|
| ||
{
"observation": "",
"drop": "665a0b258ce829001532be3b",
"tags": [],
"cables": [],
"towers": [],
"kind": "Property",
"box": "665a099ad502780021370a59",
"address": "RUA TEST OZMAP",
"client": {
...
},
"creatorData": {
"id": "65d645dc76afab0014bbc9d1",
"name": "test_ozmap",
"username": "test_ozmap"
},
"connections": [
{
"id": "665a099ad502780021370a61",
"kind": "Splitter",
"port": 1,
"name": "Splitter 1",
"implanted": true,
"fiber": "665a0b258ce829001532be3c"
}
]
...
} |
Desconectar a Fibra do Cliente (mantendo o cliente na Caixa)
Neste caso, o cliente é desconectado do Splitter, mas permanece vinculado à Caixa. Para realizar esta operação, é necessário o ID do cabo de drop (neste exemplo, "665a0b258ce829001532be3b"), localizado na propriedade "drop" da property.
...
Disconnect the Client's Fiber (keeping the client linked to the Box)
In this case, the client is disconnected from the Splitter but remains linked to the Box. To perform this operation, the drop cable ID(in this example, '665a0b258ce829001532be3b
'), located in the 'drop' property of the property, is required.
To disconnect the client's fiber, make the following request to OZmap:
Code Block | ||
---|---|---|
| ||
curl --location --request POST 'https://sandbox.ozmap.com.br:9994/api/v2/cables/665a0b258ce829001532be3b/fibers/disconnect' \ --header 'Authorization: AUTHORIZATION_KEY' |
A resposta esperada será um The expected response will be a status 204 No Content, confirmando que a desconexão da fibra foi realizada com sucesso.
Desconectar o Cliente da Caixa (removendo o cabo de drop)
Já neste caso, além de desconectar a fibra do cliente, o cabo de drop será removido, desconectando-o completamente da caixa.
Para realizar isso, removeremos o cabo no OZmap, que desconectará simultaneamente o cliente da fibra. Esse procedimento será realizado por meio de uma exclusão em cascata, utilizando a query cascade=true
. Dessa forma, ao deletar o cabo de drop, sua fibra também será excluída, caso esteja conectada. Para executar esse processo, faça a seguinte chamada ao OZmap, informando o ID do drop (neste exemplo, "665a0b258ce829001532be3b") e a confirming that the fiber disconnection was completed.
Disconnect the Client from the Box (removing the drop cable)
In this case, besides disconnecting the client's fiber, the drop cable will also be removed, completely disconnecting the client from the box.
Now, we will remove the drop cable in OZmap, which will simultaneously disconnect the client from the fiber. This procedure will be performed through a cascading delete, using the query cascade=true
. By deleting the drop cable, the fiber will also be removed if it is connected. To execute this process, make the following request to OZmap, providing the drop cable ID (in this example, '665a0b258ce829001532be3b
') and the query cascade=true
:
Code Block | ||
---|---|---|
| ||
curl --location --request DELETE 'https://sandbox.ozmap.com.br:9994/api/v2/cables/665a0b258ce829001532be3b?cascade=true' \ --header 'Authorization: AUTHORIZATION_KEY' |
A resposta esperada será um The expected response will be a status 204 No Content, indicando que o cabo foi removido com sucessoconfirming the cable was successfully removed.