blob: d8712dc6184381c71f62fb71613dda4d8c3a8fe1 [file] [log] [blame]
Sean Condon06613e92017-06-09 15:14:01 +01001/*
2 * Copyright 2017-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 */
16package org.onosproject.drivers.microsemi.yang.custom;
17
18import org.onosproject.yang.gen.v1.mseatypes.rev20160229.mseatypes.ServiceListType;
19import org.onosproject.yang.gen.v1.mseaunievcservice.rev20160317.mseaunievcservice.evcperuniextensionattributes.EvcPerUniServiceTypeEnum;
20import org.onosproject.yang.gen.v1.mseaunievcservice.rev20160317.mseaunievcservice.evcperuniextensionattributes.FlowMapping;
21import org.onosproject.yang.gen.v1.mseaunievcservice.rev20160317.mseaunievcservice.evcperuniextensionattributes.TagManipulation;
22import org.onosproject.yang.gen.v1.mseaunievcservice.rev20160317.mseaunievcservice.mefservices.uni.evc.evcperuni.DefaultEvcPerUnin;
23
24import java.util.List;
25
26/**
27 * Extend the DefaultEvcPerUnin so that the ceVlanMap can always be initialized at 0.
28 */
29public class CustomEvcPerUnin extends DefaultEvcPerUnin {
30 @Override
31 public ServiceListType ceVlanMap() {
32 if (ceVlanMap == null) {
33 return new ServiceListType("0");
34 }
35 return ceVlanMap;
36 }
37 @Override
38 public Object ingressBwpGroupIndex() {
39 return ingressBwpGroupIndex;
40 }
41
42 @Override
43 public EvcPerUniServiceTypeEnum evcPerUniServiceType() {
44 return evcPerUniServiceType;
45 }
46
47 @Override
48 public TagManipulation tagManipulation() {
49 return tagManipulation;
50 }
51
52 @Override
53 public List<FlowMapping> flowMapping() {
54 return flowMapping;
55 }
56
57}