blob: c07a18f5760c98c7f6c7618bd5bad8352bf3ca6f [file] [log] [blame]
Vidyashree Rama76faccc2016-10-17 22:06:52 +05301/*
2 * Copyright 2016-present Open Networking Laboratory
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.yms.app.yab;
18
19import org.onosproject.yang.gen.v1.ydt.test.rev20160524.Test;
20import org.onosproject.yang.gen.v1.ydt.test.rev20160524.TestOpParam;
21import org.onosproject.yang.gen.v1.ydt.test.rev20160524.TestService;
22import org.onosproject.yang.gen.v1.ydt.test.rev20160524.test.Cont1;
23import org.onosproject.yang.gen.v1.ydt.test.rev20160524.test.DefaultCont1;
24import org.onosproject.yang.gen.v1.ydt.test.rev20160524.test.rockthehouse.DefaultRockTheHouseOutput;
25import org.onosproject.yang.gen.v1.ydt.test.rev20160524.test.rockthehouse.RockTheHouseInput;
26import org.onosproject.yang.gen.v1.ydt.test.rev20160524.test.rockthehouse.RockTheHouseOutput;
27import org.onosproject.yang.gen.v1.ydt.test.rev20160524.test.rockthehouse1.RockTheHouse1Input;
28import org.onosproject.yang.gen.v1.ydt.test.rev20160524.test.rockthehouse2.DefaultRockTheHouse2Output;
29import org.onosproject.yang.gen.v1.ydt.test.rev20160524.test.rockthehouse2.RockTheHouse2Output;
30
31/**
32 * Implementation of the application management service.
33 */
34public class TestManager implements TestService {
35
36 Test response;
37
38 @Override
39 public Test getTest(TestOpParam test) {
40 Cont1 cont = new DefaultCont1.Cont1Builder().leaf4("4").build();
41 Test response = new TestOpParam.TestBuilder().cont1(cont).build();
42 return response;
43 }
44
45 @Override
46 public void setTest(TestOpParam test) {
47 response = test;
48 }
49
50 @Override
51 public Test getAugmentedTestCont4(TestOpParam test) {
52 Cont1 cont = new DefaultCont1.Cont1Builder().leaf4("4").build();
53 Test response = new TestOpParam.TestBuilder().cont1(cont).build();
54 return response;
55 }
56
57 @Override
58 public void setAugmentedTestCont4(TestOpParam augmentedTestCont4) {
59 response = augmentedTestCont4;
60 }
61
62 @Override
63 public RockTheHouseOutput rockTheHouse(RockTheHouseInput inputVar) {
64 return DefaultRockTheHouseOutput.builder().hello("hello").build();
65 }
66
67
68 @Override
69 public void rockTheHouse1(RockTheHouse1Input inputVar) {
70 // TODO : to be implemented
71 }
72
73 @Override
74 public RockTheHouse2Output rockTheHouse2() {
75 return DefaultRockTheHouse2Output
76 .builder().leaf14("14").build();
77 }
78
79 @Override
80 public void rockTheHouse3() {
81 }
82}