2 * Copyright © 2015 Yale University and others. All rights reserved.
4 * This program and the accompanying materials are made available under the
5 * terms of the Eclipse Public License v1.0 which accompanies this distribution,
6 * and is available at http://www.eclipse.org/legal/epl-v10.html
8 package org.opendaylight.alto.core.service.model.costmap;
10 import org.opendaylight.yang.gen.v1.urn.alto.types.rev150921.CostMetric;
11 import org.opendaylight.yang.gen.v1.urn.opendaylight.alto.service.model.endpointcost.rev151021.context.resource.capabilities.CostType;
12 import org.opendaylight.yang.gen.v1.urn.opendaylight.alto.service.model.endpointcost.rev151021.context.resource.capabilities.CostTypeBuilder;
15 public class CostmapUtils {
16 public static CostType createCostTypeCapability(String metric, String mode){
17 return createCostTypeCapability(new CostMetric(metric),mode);
20 public static CostType createCostTypeCapability(CostMetric metric,String mode){
21 CostTypeBuilder builder= new CostTypeBuilder();
22 builder.setCostMetric(metric);
23 builder.setCostMode(mode);
24 return builder.build();