All Downloads are FREE. Search and download functionalities are using the official Maven repository.

org.opendaylight.sfc.provider.api.SfcServiceFunctionSchedulerAPI Maven / Gradle / Ivy

There is a newer version: 0.10.4
Show newest version
/*
 * Copyright (c) 2015, 2017 Intel Ltd. and others. All rights reserved.
 *
 * This program and the accompanying materials are made available under the
 * terms of the Eclipse Public License v1.0 which accompanies this distribution,
 * and is available at http://www.eclipse.org/legal/epl-v10.html
 */

package org.opendaylight.sfc.provider.api;

import java.util.HashMap;
import java.util.List;
import java.util.Map;
import org.opendaylight.yang.gen.v1.urn.cisco.params.xml.ns.yang.sfc.common.rev151017.SfName;
import org.opendaylight.yang.gen.v1.urn.cisco.params.xml.ns.yang.sfc.sfc.rev140701.service.function.chain.grouping.ServiceFunctionChain;
import org.opendaylight.yang.gen.v1.urn.cisco.params.xml.ns.yang.sfc.sfp.rev140701.service.function.paths.ServiceFunctionPath;
import org.opendaylight.yang.gen.v1.urn.cisco.params.xml.ns.yang.sfc.sfp.rev140701.service.function.paths.service.function.path.ServicePathHop;

/**
 * This class defines the Generic API for SF scheduling.
 *
 * 

* * @author Johnson Li ([email protected]) * @version 0.1 * @since 2015-03-04 */ public abstract class SfcServiceFunctionSchedulerAPI { private java.lang.Class sfcServiceFunctionSchedulerType; public java.lang.Class getSfcServiceFunctionSchedulerType() { return this.sfcServiceFunctionSchedulerType; } public void setSfcServiceFunctionSchedulerType( java.lang.Class schedulerType) { this.sfcServiceFunctionSchedulerType = schedulerType; } public abstract List scheduleServiceFunctions(ServiceFunctionChain chain, int serviceIndex, ServiceFunctionPath sfp); protected Map getSFPHopSfMapping(ServiceFunctionPath sfp) { Map ret = new HashMap<>(); List hops = sfp.getServicePathHop(); if (hops != null) { for (ServicePathHop hop : hops) { ret.put(hop.getHopNumber(), hop.getServiceFunctionName()); } } return ret; } }





© 2015 - 2025 Weber Informatics LLC | Privacy Policy