Vidyashree Rama | 6160be1 | 2016-11-24 13:43:31 +0530 | [diff] [blame] | 1 | /* |
Brian O'Connor | a09fe5b | 2017-08-03 21:12:30 -0700 | [diff] [blame] | 2 | * Copyright 2016-present Open Networking Foundation |
Vidyashree Rama | 6160be1 | 2016-11-24 13:43:31 +0530 | [diff] [blame] | 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 | |
| 17 | package org.onosproject.yms.app.yab; |
| 18 | |
| 19 | import org.onosproject.yang.gen.v1.ydt.test.rev20160524.Test; |
| 20 | import org.onosproject.yang.gen.v1.ydt.test.rev20160524.TestOpParam; |
| 21 | import org.onosproject.yang.gen.v1.ydt.test.rev20160524.TestService; |
| 22 | import org.onosproject.yang.gen.v1.ydt.test.rev20160524.test.Cont1; |
| 23 | import org.onosproject.yang.gen.v1.ydt.test.rev20160524.test.DefaultCont1; |
| 24 | import org.onosproject.yang.gen.v1.ydt.test.rev20160524.test.rockthehouse.DefaultRockTheHouseOutput; |
| 25 | import org.onosproject.yang.gen.v1.ydt.test.rev20160524.test.rockthehouse.RockTheHouseInput; |
| 26 | import org.onosproject.yang.gen.v1.ydt.test.rev20160524.test.rockthehouse.RockTheHouseOutput; |
| 27 | import org.onosproject.yang.gen.v1.ydt.test.rev20160524.test.rockthehouse1.RockTheHouse1Input; |
| 28 | import org.onosproject.yang.gen.v1.ydt.test.rev20160524.test.rockthehouse2.DefaultRockTheHouse2Output; |
| 29 | import org.onosproject.yang.gen.v1.ydt.test.rev20160524.test.rockthehouse2.RockTheHouse2Output; |
| 30 | |
| 31 | /** |
| 32 | * Implementation of the application management service. |
| 33 | */ |
| 34 | public 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 | } |