blob: cd1b9efc462bd1e13d580218b873df86e313bf0a [file] [log] [blame]
Sean Condon0e89bda2017-03-21 14:23:19 +00001/*
2 * Copyright 2017-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 */
16package org.onosproject.drivers.microsemi.yang.utils;
17
18import org.onosproject.yang.gen.v1.mseacfm.rev20160229.mseacfm.mefcfm.maintenancedomain.maintenanceassociation.MaintenanceAssociationEndPoint;
19import org.onosproject.yang.gen.v1.mseasoampm.rev20160229.mseasoampm.mefcfm.maintenancedomain.maintenanceassociation.maintenanceassociationendpoint.AugmentedMseaCfmMaintenanceAssociationEndPoint;
20import org.onosproject.yang.gen.v1.mseasoampm.rev20160229.mseasoampm.mefcfm.maintenancedomain.maintenanceassociation.maintenanceassociationendpoint.DefaultAugmentedMseaCfmMaintenanceAssociationEndPoint;
21import org.onosproject.yang.gen.v1.mseasoampm.rev20160229.mseasoampm.remotemepgroup.RemoteMep;
22import org.onosproject.yang.gen.v1.mseasoampm.rev20160229.mseasoampm.remotemepgroup.remotemep.MepId;
23
24/**
25 * This is a workaround for Checkstyle issue.
26 * https://github.com/checkstyle/checkstyle/issues/3850
27 *
28 */
29public final class MepIdUtil {
30 private MepIdUtil() {
31 //Hidden
32 }
33
34 public static MepId convertRemoteMepId(RemoteMep rmep) {
35 return (MepId) rmep;
36 }
37
38 public static AugmentedMseaCfmMaintenanceAssociationEndPoint
39 convertPmAugmentedMep(MaintenanceAssociationEndPoint mep) {
40 AugmentedMseaCfmMaintenanceAssociationEndPoint augmentedMep =
41 (AugmentedMseaCfmMaintenanceAssociationEndPoint) mep
42 .augmentation(
43 DefaultAugmentedMseaCfmMaintenanceAssociationEndPoint.class);
44 return augmentedMep;
45 }
46}