blob: 34186a4895fa932853d06d360fdc9fdd96d05049 [file] [log] [blame]
hirokif4ed5212018-05-26 22:39:38 -07001/*
2 * Copyright 2018-present Open Networking Foundation
3 *
4 * Licensed under the Apache License, Version 2.0 (the "License");
5 * you may not use this file except in compliance with the License.
6 * You may obtain a copy of the License at
7 *
8 * http://www.apache.org/licenses/LICENSE-2.0
9 *
10 * Unless required by applicable law or agreed to in writing, software
11 * distributed under the License is distributed on an "AS IS" BASIS,
12 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13 * See the License for the specific language governing permissions and
14 * limitations under the License.
15 */
16
17package org.onosproject.odtn.utils.tapi;
18
19import org.onosproject.yang.gen.v1.tapiconnectivity.rev20180307.tapiconnectivity.connectivitycontext.ConnectivityService;
20import org.onosproject.yang.gen.v1.tapiconnectivity.rev20180307.tapiconnectivity.deleteconnectivityservice.DefaultDeleteConnectivityServiceOutput;
21import org.onosproject.yang.gen.v1.tapiconnectivity.rev20180307.tapiconnectivity.deleteconnectivityservice.deleteconnectivityserviceoutput.DefaultService;
22
23/**
24 * Utility class to deal with TAPI RPC output with DCS.
25 */
26public final class TapiDeleteConnectivityOutputHandler
27 extends TapiRpcOutputHandler<DefaultDeleteConnectivityServiceOutput> {
28
29 private TapiDeleteConnectivityOutputHandler() {
30 obj = new DefaultDeleteConnectivityServiceOutput();
31 }
32
33 public static TapiDeleteConnectivityOutputHandler create() {
34 return new TapiDeleteConnectivityOutputHandler();
35 }
36
37 public TapiDeleteConnectivityOutputHandler addService(ConnectivityService res) {
38 log.info("Output service: {}", res);
39 DefaultService rpcOutputService = new DefaultService();
40 rpcOutputService.uuid(res.uuid());
41 obj.service(rpcOutputService);
42 return this;
43 }
44
45}