Migrate to odlparent 2.0.0
[alto.git] / alto-core / standard-service-models / model-costmap / api / src / main / java / org / opendaylight / alto / core / service / model / costmap / CostmapUtils.java
1 /*
2  * Copyright © 2015 Yale University and others.  All rights reserved.
3  *
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
7  */
8 package org.opendaylight.alto.core.service.model.costmap;
9
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;
13
14
15 public class CostmapUtils {
16     public static CostType createCostTypeCapability(String metric, String mode){
17         return createCostTypeCapability(new CostMetric(metric),mode);
18     }
19
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();
25     }
26 }