Search in sources :

Example 1 with TapiGetConnectivityDetailsOutputHandler

use of org.onosproject.odtn.utils.tapi.TapiGetConnectivityDetailsOutputHandler in project onos by opennetworkinglab.

the class DcsBasedTapiConnectivityRpc method getConnectivityServiceDetails.

/**
 * Service interface of getConnectivityServiceDetails.
 *
 * @param inputVar input of service interface getConnectivityServiceDetails
 * @return output of service interface getConnectivityServiceDetails
 */
@Override
public RpcOutput getConnectivityServiceDetails(RpcInput inputVar) {
    try {
        TapiGetConnectivityDetailsInputHandler input = new TapiGetConnectivityDetailsInputHandler();
        input.setRpcInput(inputVar);
        log.info("input serviceId: {}", input.getId());
        TapiConnectivityServiceHandler handler = TapiConnectivityServiceHandler.create();
        handler.setId(input.getId());
        handler.read();
        TapiGetConnectivityDetailsOutputHandler output = TapiGetConnectivityDetailsOutputHandler.create().addService(handler.getModelObject());
        return new RpcOutput(RpcOutput.Status.RPC_SUCCESS, output.getDataNode());
    } catch (Throwable e) {
        return new RpcOutput(RpcOutput.Status.RPC_FAILURE, null);
    }
}
Also used : TapiGetConnectivityDetailsOutputHandler(org.onosproject.odtn.utils.tapi.TapiGetConnectivityDetailsOutputHandler) RpcOutput(org.onosproject.yang.model.RpcOutput) TapiConnectivityServiceHandler(org.onosproject.odtn.utils.tapi.TapiConnectivityServiceHandler) TapiGetConnectivityDetailsInputHandler(org.onosproject.odtn.utils.tapi.TapiGetConnectivityDetailsInputHandler)

Aggregations

TapiConnectivityServiceHandler (org.onosproject.odtn.utils.tapi.TapiConnectivityServiceHandler)1 TapiGetConnectivityDetailsInputHandler (org.onosproject.odtn.utils.tapi.TapiGetConnectivityDetailsInputHandler)1 TapiGetConnectivityDetailsOutputHandler (org.onosproject.odtn.utils.tapi.TapiGetConnectivityDetailsOutputHandler)1 RpcOutput (org.onosproject.yang.model.RpcOutput)1