package org.opendaylight.unimgr.mef.nrp.cisco.xr;
-import com.google.common.base.Optional;
-import com.google.common.cache.CacheBuilder;
-import com.google.common.cache.CacheLoader;
-import com.google.common.cache.LoadingCache;
-import com.google.common.util.concurrent.FutureCallback;
-import com.google.common.util.concurrent.Futures;
-import org.opendaylight.controller.md.sal.binding.api.*;
+import static org.opendaylight.unimgr.utils.CapabilitiesService.Capability.Mode.AND;
+import static org.opendaylight.unimgr.utils.CapabilitiesService.NodeContext.NodeCapability.NETCONF;
+import static org.opendaylight.unimgr.utils.CapabilitiesService.NodeContext.NodeCapability.NETCONF_CISCO_IOX_IFMGR;
+import static org.opendaylight.unimgr.utils.CapabilitiesService.NodeContext.NodeCapability.NETCONF_CISCO_IOX_L2VPN;
+
+import java.util.Collection;
+import java.util.Collections;
+import java.util.List;
+import java.util.Objects;
+import java.util.concurrent.TimeUnit;
+import java.util.function.Function;
+import java.util.function.Predicate;
+import java.util.regex.Pattern;
+import java.util.stream.Collectors;
+import java.util.stream.Stream;
+
+import javax.annotation.Nonnull;
+import javax.annotation.Nullable;
+
+import org.opendaylight.controller.md.sal.binding.api.DataBroker;
+import org.opendaylight.controller.md.sal.binding.api.DataObjectModification;
+import org.opendaylight.controller.md.sal.binding.api.DataTreeChangeListener;
+import org.opendaylight.controller.md.sal.binding.api.DataTreeIdentifier;
+import org.opendaylight.controller.md.sal.binding.api.DataTreeModification;
+import org.opendaylight.controller.md.sal.binding.api.MountPoint;
+import org.opendaylight.controller.md.sal.binding.api.MountPointService;
+import org.opendaylight.controller.md.sal.binding.api.ReadOnlyTransaction;
+import org.opendaylight.controller.md.sal.binding.api.ReadWriteTransaction;
import org.opendaylight.controller.md.sal.common.api.data.LogicalDatastoreType;
import org.opendaylight.controller.md.sal.common.api.data.ReadFailedException;
import org.opendaylight.unimgr.mef.nrp.cisco.xr.common.helper.InterfaceHelper;
import org.opendaylight.yang.gen.v1.http.cisco.com.ns.yang.cisco.ios.xr.ifmgr.cfg.rev150730.InterfaceConfigurations;
import org.opendaylight.yang.gen.v1.http.cisco.com.ns.yang.cisco.ios.xr.ifmgr.cfg.rev150730._interface.configurations.InterfaceConfiguration;
import org.opendaylight.yang.gen.v1.http.cisco.com.ns.yang.cisco.ios.xr.ifmgr.cfg.rev150730._interface.configurations.InterfaceConfigurationKey;
-import org.opendaylight.yang.gen.v1.urn.mef.yang.tapicommon.rev170227.LayerProtocolName;
-import org.opendaylight.yang.gen.v1.urn.mef.yang.tapicommon.rev170227.TerminationDirection;
-import org.opendaylight.yang.gen.v1.urn.mef.yang.tapicommon.rev170227.UniversalId;
-import org.opendaylight.yang.gen.v1.urn.mef.yang.tapicommon.rev170227.context.attrs.ServiceInterfacePoint;
-import org.opendaylight.yang.gen.v1.urn.mef.yang.tapicommon.rev170227.context.attrs.ServiceInterfacePointBuilder;
-import org.opendaylight.yang.gen.v1.urn.mef.yang.tapicommon.rev170227.service._interface.point.LayerProtocolBuilder;
-import org.opendaylight.yang.gen.v1.urn.mef.yang.tapitopology.rev170227.node.OwnedNodeEdgePoint;
-import org.opendaylight.yang.gen.v1.urn.mef.yang.tapitopology.rev170227.node.OwnedNodeEdgePointBuilder;
-import org.opendaylight.yang.gen.v1.urn.mef.yang.tapitopology.rev170227.node.OwnedNodeEdgePointKey;
+import org.opendaylight.yang.gen.v1.urn.mef.yang.tapicommon.rev170531.LayerProtocolName;
+import org.opendaylight.yang.gen.v1.urn.mef.yang.tapicommon.rev170531.TerminationDirection;
+import org.opendaylight.yang.gen.v1.urn.mef.yang.tapicommon.rev170531.UniversalId;
+import org.opendaylight.yang.gen.v1.urn.mef.yang.tapicommon.rev170531.context.g.ServiceInterfacePoint;
+import org.opendaylight.yang.gen.v1.urn.mef.yang.tapicommon.rev170531.context.g.ServiceInterfacePointBuilder;
+import org.opendaylight.yang.gen.v1.urn.mef.yang.tapicommon.rev170531.service._interface.point.g.LayerProtocolBuilder;
+import org.opendaylight.yang.gen.v1.urn.mef.yang.tapitopology.rev170531.node.g.OwnedNodeEdgePoint;
+import org.opendaylight.yang.gen.v1.urn.mef.yang.tapitopology.rev170531.node.g.OwnedNodeEdgePointBuilder;
+import org.opendaylight.yang.gen.v1.urn.mef.yang.tapitopology.rev170531.node.g.OwnedNodeEdgePointKey;
import org.opendaylight.yang.gen.v1.urn.opendaylight.netconf.node.topology.rev150114.network.topology.topology.topology.types.TopologyNetconf;
import org.opendaylight.yang.gen.v1.urn.tbd.params.xml.ns.yang.network.topology.rev131021.NetworkTopology;
import org.opendaylight.yang.gen.v1.urn.tbd.params.xml.ns.yang.network.topology.rev131021.TopologyId;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
-import javax.annotation.Nonnull;
-import javax.annotation.Nullable;
-import java.util.Collection;
-import java.util.Collections;
-import java.util.List;
-import java.util.Objects;
-import java.util.concurrent.TimeUnit;
-import java.util.function.Function;
-import java.util.function.Predicate;
-import java.util.regex.Pattern;
-import java.util.stream.Collectors;
-import java.util.stream.Stream;
-
-import static org.opendaylight.unimgr.utils.CapabilitiesService.Capability.Mode.AND;
-import static org.opendaylight.unimgr.utils.CapabilitiesService.NodeContext.NodeCapability.*;
+import com.google.common.base.Optional;
+import com.google.common.cache.CacheBuilder;
+import com.google.common.cache.CacheLoader;
+import com.google.common.cache.LoadingCache;
+import com.google.common.util.concurrent.FutureCallback;
+import com.google.common.util.concurrent.Futures;
/**
* @author bartosz.michalik@amartus.com
*/
package org.opendaylight.unimgr.mef.nrp.cisco.xr.l2vpn.driver;
+import java.util.AbstractMap;
+import java.util.ArrayList;
+import java.util.Arrays;
+import java.util.List;
+import java.util.Map;
+import java.util.Optional;
+import java.util.function.BiConsumer;
+
import org.opendaylight.controller.md.sal.binding.api.DataBroker;
import org.opendaylight.controller.md.sal.binding.api.MountPointService;
import org.opendaylight.controller.md.sal.common.api.data.TransactionCommitFailedException;
import org.opendaylight.unimgr.mef.nrp.cisco.xr.l2vpn.activator.L2vpnP2pConnectActivator;
import org.opendaylight.unimgr.utils.DriverConstants;
import org.opendaylight.unimgr.utils.SipHandler;
-import org.opendaylight.yang.gen.v1.urn.mef.yang.nrp_interface.rev170227.NrpCreateConnectivityServiceAttrs;
-import org.opendaylight.yang.gen.v1.urn.mef.yang.tapicommon.rev170227.UniversalId;
+import org.opendaylight.yang.gen.v1.urn.mef.yang.nrp_interface.rev170531.NrpConnectivityServiceAttrsG;
+import org.opendaylight.yang.gen.v1.urn.mef.yang.tapicommon.rev170531.UniversalId;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
-import java.util.*;
-import java.util.function.BiConsumer;
-
/**
* @author marek.ryznar@amartus.com
*/
}
@Override
- public void initialize(List<EndPoint> endPoints, String serviceId, NrpCreateConnectivityServiceAttrs context) {
+ public void initialize(List<EndPoint> endPoints, String serviceId, NrpConnectivityServiceAttrsG context) {
this.endPoints = endPoints;
this.serviceId = serviceId;
*/
package org.opendaylight.unimgr.mef.nrp.cisco.xr.common.util;
-import com.google.common.util.concurrent.CheckedFuture;
+import static org.junit.Assert.assertEquals;
+
import org.junit.After;
import org.junit.Before;
import org.junit.Test;
import org.opendaylight.controller.md.sal.binding.test.AbstractDataBrokerTest;
import org.opendaylight.controller.md.sal.common.api.data.LogicalDatastoreType;
import org.opendaylight.controller.md.sal.common.api.data.TransactionCommitFailedException;
-import org.opendaylight.unimgr.mef.nrp.cisco.xr.l2vpn.L2vpnTestUtils;
+import org.opendaylight.unimgr.mef.nrp.cisco.xr.l2vpn.activator.L2vpnTestUtils;
import org.opendaylight.unimgr.mef.nrp.common.ServicePort;
import org.opendaylight.yang.gen.v1.urn.ietf.params.xml.ns.yang.ietf.inet.types.rev130715.IpAddress;
import org.opendaylight.yang.gen.v1.urn.ietf.params.xml.ns.yang.ietf.inet.types.rev130715.Ipv4Address;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
-import static org.junit.Assert.assertEquals;
+import com.google.common.util.concurrent.CheckedFuture;
/**
* @author marek.ryznar@amartus.com
*/
package org.opendaylight.unimgr.mef.nrp.cisco.xr.l2vpn.activator;
-import com.google.common.base.Optional;
-import com.google.common.util.concurrent.CheckedFuture;
+import static org.junit.Assert.assertEquals;
+import static org.junit.Assert.assertNotNull;
+import static org.junit.Assert.fail;
+
+import java.util.List;
+import java.util.concurrent.ExecutionException;
+
import org.junit.Before;
import org.junit.Test;
import org.junit.runner.RunWith;
import org.opendaylight.controller.md.sal.common.api.data.ReadFailedException;
import org.opendaylight.controller.md.sal.common.api.data.TransactionCommitFailedException;
import org.opendaylight.unimgr.mef.nrp.api.EndPoint;
-import org.opendaylight.unimgr.mef.nrp.cisco.xr.l2vpn.L2vpnTestUtils;
import org.opendaylight.unimgr.mef.nrp.common.MountPointHelper;
import org.opendaylight.yang.gen.v1.http.cisco.com.ns.yang.cisco.ios.xr.ifmgr.cfg.rev150730.InterfaceConfigurations;
import org.opendaylight.yang.gen.v1.http.cisco.com.ns.yang.cisco.ios.xr.ifmgr.cfg.rev150730._interface.configurations.InterfaceConfiguration;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
-import java.util.List;
-import java.util.concurrent.ExecutionException;
-
-import static org.junit.Assert.*;
+import com.google.common.base.Optional;
+import com.google.common.util.concurrent.CheckedFuture;
/**
* @author marek.ryznar@amartus.com
*/
package org.opendaylight.unimgr.mef.nrp.cisco.xr.l2vpn.activator;
-import com.google.common.base.Optional;
-import com.google.common.util.concurrent.CheckedFuture;
+import static org.junit.Assert.fail;
+
+import java.util.List;
+import java.util.concurrent.ExecutionException;
+
import org.junit.Before;
import org.junit.Test;
import org.junit.runner.RunWith;
import org.opendaylight.controller.md.sal.common.api.data.ReadFailedException;
import org.opendaylight.controller.md.sal.common.api.data.TransactionCommitFailedException;
import org.opendaylight.unimgr.mef.nrp.api.EndPoint;
-import org.opendaylight.unimgr.mef.nrp.cisco.xr.l2vpn.L2vpnTestUtils;
import org.opendaylight.unimgr.mef.nrp.common.MountPointHelper;
import org.opendaylight.yang.gen.v1.http.cisco.com.ns.yang.cisco.ios.xr.ifmgr.cfg.rev150730.InterfaceConfigurations;
import org.opendaylight.yang.gen.v1.http.cisco.com.ns.yang.cisco.ios.xr.ifmgr.cfg.rev150730._interface.configurations.InterfaceConfiguration;
import org.powermock.core.classloader.annotations.PrepareForTest;
import org.powermock.modules.junit4.PowerMockRunner;
-import java.util.List;
-import java.util.concurrent.ExecutionException;
-
-import static org.junit.Assert.fail;
+import com.google.common.base.Optional;
+import com.google.common.util.concurrent.CheckedFuture;
/**
* @author marek.ryznar@amartus.com
* 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.unimgr.mef.nrp.cisco.xr.l2vpn;
+package org.opendaylight.unimgr.mef.nrp.cisco.xr.l2vpn.activator;
+
+import static org.junit.Assert.assertEquals;
+import static org.junit.Assert.assertFalse;
+import static org.junit.Assert.assertNotNull;
+import static org.junit.Assert.assertTrue;
+import static org.junit.Assert.fail;
+import static org.mockito.Mockito.mock;
+import static org.mockito.Mockito.when;
+
+import java.util.ArrayList;
+import java.util.List;
+import java.util.concurrent.ExecutionException;
-import com.google.common.base.Optional;
-import com.google.common.util.concurrent.CheckedFuture;
import org.mockito.Mockito;
import org.opendaylight.controller.md.sal.binding.api.DataBroker;
import org.opendaylight.controller.md.sal.binding.api.MountPointService;
import org.opendaylight.yang.gen.v1.http.cisco.com.ns.yang.cisco.ios.xr.l2vpn.cfg.rev151109.l2vpn.database.xconnect.groups.xconnect.group.p2p.xconnects.p2p.xconnect.pseudowires.Pseudowire;
import org.opendaylight.yang.gen.v1.http.cisco.com.ns.yang.cisco.ios.xr.l2vpn.cfg.rev151109.l2vpn.database.xconnect.groups.xconnect.group.p2p.xconnects.p2p.xconnect.pseudowires.pseudowire.Neighbor;
import org.opendaylight.yang.gen.v1.http.cisco.com.ns.yang.cisco.ios.xr.l2vpn.cfg.rev151109.l2vpn.database.xconnect.groups.xconnect.group.p2p.xconnects.p2p.xconnect.pseudowires.pseudowire.pseudowire.content.MplsStaticLabels;
-import org.opendaylight.yang.gen.v1.urn.mef.yang.nrp_interface.rev170227.NrpCreateConnectivityServiceEndPointAttrs;
-import org.opendaylight.yang.gen.v1.urn.mef.yang.tapicommon.rev170227.UniversalId;
-import org.opendaylight.yang.gen.v1.urn.mef.yang.tapiconnectivity.rev170227.ConnectivityServiceEndPoint;
+import org.opendaylight.yang.gen.v1.urn.mef.yang.nrp_interface.rev170531.NrpConnectivityServiceEndPointAttrsG;
+import org.opendaylight.yang.gen.v1.urn.mef.yang.tapicommon.rev170531.UniversalId;
+import org.opendaylight.yang.gen.v1.urn.mef.yang.tapiconnectivity.rev170531.ConnectivityServiceEndPointG;
import org.opendaylight.yang.gen.v1.urn.tbd.params.xml.ns.yang.network.topology.rev131021.NodeId;
import org.opendaylight.yang.gen.v1.urn.tbd.params.xml.ns.yang.network.topology.rev131021.TopologyId;
import org.opendaylight.yang.gen.v1.urn.tbd.params.xml.ns.yang.network.topology.rev131021.TpId;
import org.opendaylight.yangtools.yang.binding.InstanceIdentifier;
import org.powermock.api.mockito.PowerMockito;
-import java.util.ArrayList;
-import java.util.List;
-import java.util.concurrent.ExecutionException;
-
-import static org.junit.Assert.*;
-import static org.mockito.Mockito.mock;
-import static org.mockito.Mockito.when;
+import com.google.common.base.Optional;
+import com.google.common.util.concurrent.CheckedFuture;
/**
* Util class responsible for executing suitable assert operations on given objects.
}
private static EndPoint mockEndPoint(String portName){
- ConnectivityServiceEndPoint connectivityServiceEndPoint = mock(ConnectivityServiceEndPoint.class);
- NrpCreateConnectivityServiceEndPointAttrs attrs = mock(NrpCreateConnectivityServiceEndPointAttrs.class);
+ ConnectivityServiceEndPointG connectivityServiceEndPoint = mock(ConnectivityServiceEndPointG.class);
+ NrpConnectivityServiceEndPointAttrsG attrs = mock(NrpConnectivityServiceEndPointAttrsG.class);
//UNI port mock
when(connectivityServiceEndPoint.getServiceInterfacePoint())
.thenReturn(new UniversalId(portName));
import org.opendaylight.unimgr.mef.nrp.common.MountPointHelper;
import org.opendaylight.unimgr.mef.nrp.common.ResourceActivator;
import org.opendaylight.unimgr.mef.nrp.common.ResourceNotAvailableException;
-import org.opendaylight.unimgr.mef.nrp.common.ServicePort;
import org.opendaylight.unimgr.utils.SipHandler;
import org.opendaylight.yang.gen.v1.http.www.microsemi.com.microsemi.edge.assure.msea.types.rev160229.Identifier45;
import org.opendaylight.yang.gen.v1.http.www.microsemi.com.microsemi.edge.assure.msea.uni.evc.service.rev160317.MefServices;
import org.opendaylight.yang.gen.v1.http.www.microsemi.com.microsemi.edge.assure.msea.uni.evc.service.rev160317.mef.services.uni.Evc;
import org.opendaylight.yang.gen.v1.http.www.microsemi.com.microsemi.edge.assure.msea.uni.evc.service.rev160317.mef.services.uni.EvcBuilder;
import org.opendaylight.yang.gen.v1.http.www.microsemi.com.microsemi.edge.assure.msea.uni.evc.service.rev160317.mef.services.uni.EvcKey;
-import org.opendaylight.yang.gen.v1.urn.mef.yang.tapicommon.rev170227.UniversalId;
-import org.opendaylight.yang.gen.v1.urn.onf.core.network.module.rev160630.g_forwardingconstruct.FcPort;
+import org.opendaylight.yang.gen.v1.urn.mef.yang.tapicommon.rev170531.UniversalId;
import org.opendaylight.yangtools.yang.binding.InstanceIdentifier;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
package org.opendaylight.unimgr.mef.nrp.edgeassure;
+import java.util.List;
+import java.util.Optional;
+
import org.opendaylight.controller.md.sal.binding.api.DataBroker;
import org.opendaylight.controller.md.sal.binding.api.MountPointService;
import org.opendaylight.controller.md.sal.common.api.data.TransactionCommitFailedException;
import org.opendaylight.unimgr.mef.nrp.api.EndPoint;
import org.opendaylight.unimgr.mef.nrp.common.FixedServiceNaming;
import org.opendaylight.unimgr.mef.nrp.common.ResourceNotAvailableException;
-import org.opendaylight.yang.gen.v1.urn.mef.yang.nrp_interface.rev170227.NrpCreateConnectivityServiceAttrs;
-import org.opendaylight.yang.gen.v1.urn.mef.yang.tapicommon.rev170227.UniversalId;
-import org.opendaylight.yang.gen.v1.urn.onf.core.network.module.rev160630.forwarding.constructs.ForwardingConstruct;
-import org.opendaylight.yang.gen.v1.urn.onf.core.network.module.rev160630.g_forwardingconstruct.FcPort;
-
-import java.util.List;
-import java.util.Optional;
+import org.opendaylight.yang.gen.v1.urn.mef.yang.nrp_interface.rev170531.NrpConnectivityServiceAttrsG;
+import org.opendaylight.yang.gen.v1.urn.mef.yang.tapicommon.rev170531.UniversalId;
/**
* Fake driver builder;
}
@Override
- public void initialize(List<EndPoint> endPoints, String serviceId, NrpCreateConnectivityServiceAttrs context) {
+ public void initialize(List<EndPoint> endPoints, String serviceId, NrpConnectivityServiceAttrsG context) {
this.endPoints = endPoints;
this.serviceId = serviceId;
}
*/
package org.opendaylight.unimgr.mef.nrp.api;
+import java.util.List;
+
import org.opendaylight.controller.md.sal.common.api.data.TransactionCommitFailedException;
import org.opendaylight.unimgr.mef.nrp.common.ResourceActivatorException;
-import org.opendaylight.yang.gen.v1.urn.mef.yang.nrp_interface.rev170227.NrpCreateConnectivityServiceAttrs;
-
-import java.util.List;
+import org.opendaylight.yang.gen.v1.urn.mef.yang.nrp_interface.rev170531.NrpConnectivityServiceAttrsG;
/**
* Interface of a driver that maps NRP concepts to the configuration of underlying infrastructure.
* @param serviceId connectivity service id
* @param context context
*/
- void initialize(List<EndPoint> endPoints, String serviceId, NrpCreateConnectivityServiceAttrs context);
+ void initialize(List<EndPoint> endPoints, String serviceId, NrpConnectivityServiceAttrsG context);
/**
* Performs the activation action.
import java.util.Set;
import java.util.concurrent.ConcurrentHashMap;
-import org.opendaylight.yang.gen.v1.urn.mef.yang.tapicommon.rev170227.UniversalId;
-import org.opendaylight.yang.gen.v1.urn.onf.core.network.module.rev160630.g_forwardingconstruct.FcPort;
+import org.opendaylight.yang.gen.v1.urn.mef.yang.tapicommon.rev170531.UniversalId;
/**
* Driver builder that can provide stateful driver that are used in NRP forwarding construct transaction.
package org.opendaylight.unimgr.mef.nrp.api;
-import org.opendaylight.yang.gen.v1.urn.mef.yang.tapicommon.rev170227.UniversalId;
-
import java.util.Optional;
+import org.opendaylight.yang.gen.v1.urn.mef.yang.tapicommon.rev170531.UniversalId;
+
/**
* This interface is used to request an ActivationDriver for a given MEF service fragment.
*/
package org.opendaylight.unimgr.mef.nrp.api;
-import org.opendaylight.yang.gen.v1.urn.mef.yang.nrp_interface.rev170227.NrpCreateConnectivityServiceEndPointAttrs;
-import org.opendaylight.yang.gen.v1.urn.mef.yang.tapicommon.rev170227.UniversalId;
-import org.opendaylight.yang.gen.v1.urn.mef.yang.tapiconnectivity.rev170227.ConnectivityServiceEndPoint;
+import org.opendaylight.yang.gen.v1.urn.mef.yang.nrp_interface.rev170531.NrpConnectivityServiceEndPointAttrsG;
+import org.opendaylight.yang.gen.v1.urn.mef.yang.tapicommon.rev170531.UniversalId;
+import org.opendaylight.yang.gen.v1.urn.mef.yang.tapiconnectivity.rev170531.ConnectivityServiceEndPointG;
/**
- * @see ConnectivityServiceEndPoint
+ * @see ConnectivityServiceEndPointG
* @author bartosz.michalik@amartus.com
*/
public class EndPoint {
- private final ConnectivityServiceEndPoint endpoint;
+ private final ConnectivityServiceEndPointG endpoint;
/**
* Optional attributes
* (likely to change to different implementation)
*/
- private final NrpCreateConnectivityServiceEndPointAttrs attrs;
+ private final NrpConnectivityServiceEndPointAttrsG attrs;
private UniversalId systemNepUuid;
* @param endpoint endpoint data
* @param attrs associated NRP attributes
*/
- public EndPoint(ConnectivityServiceEndPoint endpoint, NrpCreateConnectivityServiceEndPointAttrs attrs) {
+ public EndPoint(ConnectivityServiceEndPointG endpoint, NrpConnectivityServiceEndPointAttrsG attrs) {
this.endpoint = endpoint;
this.attrs = attrs;
}
*
* @return endpoints
*/
- public ConnectivityServiceEndPoint getEndpoint() {
+ public ConnectivityServiceEndPointG getEndpoint() {
return endpoint;
}
*
* @return attributes
*/
- public NrpCreateConnectivityServiceEndPointAttrs getAttrs() {
+ public NrpConnectivityServiceEndPointAttrsG getAttrs() {
return attrs;
}
import java.util.List;
/**
- * Request decomposer is responsible for decomposition of {@link org.opendaylight.yang.gen.v1.urn.mef.yang.tapiconnectivity.rev170227.ConnectivityService}
+ * Request decomposer is responsible for decomposition of {@link org.opendaylight.yang.gen.v1.urn.mef.yang.tapiconnectivity.rev170531.connectivity.context.g.ConnectivityService}
* requests into one or many driver requests.
* @author bartosz.michalik@amartus.com
*/
package org.opendaylight.unimgr.mef.nrp.api;
-import org.opendaylight.yang.gen.v1.urn.mef.yang.tapiconnectivity.rev170227.CreateConnectivityServiceInput;
-
import java.util.ArrayList;
import java.util.LinkedList;
import java.util.List;
+import org.opendaylight.yang.gen.v1.urn.mef.yang.tapiconnectivity.rev170531.CreateConnectivityServiceInput;
+
/**
* @author bartosz.michalik@amartus.com
*/
package org.opendaylight.unimgr.mef.nrp.api;
-import org.opendaylight.yang.gen.v1.urn.mef.yang.tapicommon.rev170227.UniversalId;
-
import java.util.List;
+import org.opendaylight.yang.gen.v1.urn.mef.yang.tapicommon.rev170531.UniversalId;
+
/**
* @author bartosz.michalik@amartus.com
*/
*/
package org.opendaylight.unimgr.mef.nrp.common;
-import com.google.common.base.Optional;
+import java.util.List;
+import java.util.function.Function;
+import java.util.stream.Stream;
+
import org.opendaylight.controller.md.sal.binding.api.ReadOnlyTransaction;
import org.opendaylight.controller.md.sal.binding.api.ReadTransaction;
import org.opendaylight.controller.md.sal.binding.api.ReadWriteTransaction;
import org.opendaylight.controller.md.sal.common.api.data.LogicalDatastoreType;
import org.opendaylight.controller.md.sal.common.api.data.ReadFailedException;
import org.opendaylight.unimgr.mef.nrp.api.TapiConstants;
-import org.opendaylight.yang.gen.v1.urn.mef.yang.tapicommon.rev170227.Context;
-import org.opendaylight.yang.gen.v1.urn.mef.yang.tapicommon.rev170227.UniversalId;
-import org.opendaylight.yang.gen.v1.urn.mef.yang.tapicommon.rev170227.context.attrs.ServiceInterfacePoint;
-import org.opendaylight.yang.gen.v1.urn.mef.yang.tapicommon.rev170227.context.attrs.ServiceInterfacePointKey;
-import org.opendaylight.yang.gen.v1.urn.mef.yang.tapiconnectivity.rev170227.connectivity.context.Connection;
-import org.opendaylight.yang.gen.v1.urn.mef.yang.tapiconnectivity.rev170227.connectivity.context.ConnectionKey;
-import org.opendaylight.yang.gen.v1.urn.mef.yang.tapiconnectivity.rev170227.connectivity.context.ConnectivityService;
-import org.opendaylight.yang.gen.v1.urn.mef.yang.tapiconnectivity.rev170227.connectivity.context.ConnectivityServiceKey;
-import org.opendaylight.yang.gen.v1.urn.mef.yang.tapitopology.rev170227.Context1;
-import org.opendaylight.yang.gen.v1.urn.mef.yang.tapitopology.rev170227.NodeEdgePoint;
-import org.opendaylight.yang.gen.v1.urn.mef.yang.tapitopology.rev170227.node.OwnedNodeEdgePoint;
-import org.opendaylight.yang.gen.v1.urn.mef.yang.tapitopology.rev170227.node.OwnedNodeEdgePointBuilder;
-import org.opendaylight.yang.gen.v1.urn.mef.yang.tapitopology.rev170227.node.OwnedNodeEdgePointKey;
-import org.opendaylight.yang.gen.v1.urn.mef.yang.tapitopology.rev170227.topology.Node;
-import org.opendaylight.yang.gen.v1.urn.mef.yang.tapitopology.rev170227.topology.NodeBuilder;
-import org.opendaylight.yang.gen.v1.urn.mef.yang.tapitopology.rev170227.topology.NodeKey;
-import org.opendaylight.yang.gen.v1.urn.mef.yang.tapitopology.rev170227.topology.context.Topology;
-import org.opendaylight.yang.gen.v1.urn.mef.yang.tapitopology.rev170227.topology.context.TopologyKey;
+import org.opendaylight.yang.gen.v1.urn.mef.yang.tapicommon.rev170531.Context;
+import org.opendaylight.yang.gen.v1.urn.mef.yang.tapicommon.rev170531.UniversalId;
+import org.opendaylight.yang.gen.v1.urn.mef.yang.tapicommon.rev170531.context.g.ServiceInterfacePoint;
+import org.opendaylight.yang.gen.v1.urn.mef.yang.tapicommon.rev170531.context.g.ServiceInterfacePointKey;
+import org.opendaylight.yang.gen.v1.urn.mef.yang.tapiconnectivity.rev170531.connectivity.context.g.Connection;
+import org.opendaylight.yang.gen.v1.urn.mef.yang.tapiconnectivity.rev170531.connectivity.context.g.ConnectionKey;
+import org.opendaylight.yang.gen.v1.urn.mef.yang.tapiconnectivity.rev170531.connectivity.context.g.ConnectivityService;
+import org.opendaylight.yang.gen.v1.urn.mef.yang.tapiconnectivity.rev170531.connectivity.context.g.ConnectivityServiceKey;
+import org.opendaylight.yang.gen.v1.urn.mef.yang.tapitopology.rev170531.Context1;
+import org.opendaylight.yang.gen.v1.urn.mef.yang.tapitopology.rev170531.get.node.edge.point.details.output.NodeEdgePoint;
+import org.opendaylight.yang.gen.v1.urn.mef.yang.tapitopology.rev170531.node.g.OwnedNodeEdgePoint;
+import org.opendaylight.yang.gen.v1.urn.mef.yang.tapitopology.rev170531.node.g.OwnedNodeEdgePointBuilder;
+import org.opendaylight.yang.gen.v1.urn.mef.yang.tapitopology.rev170531.node.g.OwnedNodeEdgePointKey;
+import org.opendaylight.yang.gen.v1.urn.mef.yang.tapitopology.rev170531.topology.context.g.Topology;
+import org.opendaylight.yang.gen.v1.urn.mef.yang.tapitopology.rev170531.topology.context.g.TopologyKey;
+import org.opendaylight.yang.gen.v1.urn.mef.yang.tapitopology.rev170531.topology.g.Node;
+import org.opendaylight.yang.gen.v1.urn.mef.yang.tapitopology.rev170531.topology.g.NodeBuilder;
+import org.opendaylight.yang.gen.v1.urn.mef.yang.tapitopology.rev170531.topology.g.NodeKey;
import org.opendaylight.yangtools.yang.binding.InstanceIdentifier;
import org.opendaylight.yangtools.yang.binding.KeyedInstanceIdentifier;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
-import java.util.List;
-import java.util.function.Function;
-import java.util.stream.Stream;
+import com.google.common.base.Optional;
/**
* @author bartosz.michalik@amartus.com
public ConnectivityService getConnectivityService(UniversalId id) {
try {
- return rtx.read(LogicalDatastoreType.OPERATIONAL, ctx().augmentation(org.opendaylight.yang.gen.v1.urn.mef.yang.tapiconnectivity.rev170227.Context1.class).child(ConnectivityService.class, new ConnectivityServiceKey(id)))
+ return rtx.read(LogicalDatastoreType.OPERATIONAL, ctx().augmentation(org.opendaylight.yang.gen.v1.urn.mef.yang.tapiconnectivity.rev170531.Context1.class).child(ConnectivityService.class, new ConnectivityServiceKey(id)))
.checkedGet().orNull();
} catch (ReadFailedException e) {
public Connection getConnection(UniversalId connectionId) {
try {
- return rtx.read(LogicalDatastoreType.OPERATIONAL, ctx().augmentation(org.opendaylight.yang.gen.v1.urn.mef.yang.tapiconnectivity.rev170227.Context1.class).child(Connection.class, new ConnectionKey(connectionId)))
+ return rtx.read(LogicalDatastoreType.OPERATIONAL, ctx().augmentation(org.opendaylight.yang.gen.v1.urn.mef.yang.tapiconnectivity.rev170531.Context1.class).child(Connection.class, new ConnectionKey(connectionId)))
.checkedGet().orNull();
} catch (ReadFailedException e) {
*/
package org.opendaylight.unimgr.mef.nrp.common;
+import java.util.regex.Matcher;
+import java.util.regex.Pattern;
+
import org.opendaylight.unimgr.mef.nrp.api.EndPoint;
import org.opendaylight.unimgr.utils.SipHandler;
-import org.opendaylight.yang.gen.v1.urn.mef.yang.nrp_interface.rev170227.nrp.create.connectivity.service.end.point.attrs.NrpCgEthFrameFlowCpaAspec;
-import org.opendaylight.yang.gen.v1.urn.mef.yang.tapicommon.rev170227.UniversalId;
+import org.opendaylight.yang.gen.v1.urn.mef.yang.nrp_interface.rev170531.nrp.connectivity.service.end.point.attrs.g.NrpCgEthFrameFlowSpec;
+import org.opendaylight.yang.gen.v1.urn.mef.yang.tapicommon.rev170531.UniversalId;
import org.opendaylight.yang.gen.v1.urn.tbd.params.xml.ns.yang.network.topology.rev131021.NodeId;
import org.opendaylight.yang.gen.v1.urn.tbd.params.xml.ns.yang.network.topology.rev131021.TopologyId;
import org.opendaylight.yang.gen.v1.urn.tbd.params.xml.ns.yang.network.topology.rev131021.TpId;
-import java.util.regex.Matcher;
-import java.util.regex.Pattern;
-
/**
* Class representing port (replacement for FcPort)
*
}
public static boolean hasVlan(EndPoint endPoint){
- if( (endPoint.getAttrs() != null) && (endPoint.getAttrs().getNrpCgEthFrameFlowCpaAspec()!=null) ){
- NrpCgEthFrameFlowCpaAspec attr = endPoint.getAttrs().getNrpCgEthFrameFlowCpaAspec();
- if( (attr.getCeVlanIdList()!=null) && !(attr.getCeVlanIdList().getVlanIdList().isEmpty()) ){
+ if( (endPoint.getAttrs() != null) && (endPoint.getAttrs().getNrpCgEthFrameFlowSpec()!=null) ){
+ NrpCgEthFrameFlowSpec attr = endPoint.getAttrs().getNrpCgEthFrameFlowSpec();
+ if( (attr.getCeVlanIdListOrUntag()!=null) && !(attr.getCeVlanIdListOrUntag().getVlanIdList().isEmpty()) ){
return true;
} else {
return false;
}
private static int getVlan(EndPoint endPoint){
- return endPoint.getAttrs().getNrpCgEthFrameFlowCpaAspec().getCeVlanIdList().getVlanIdList().get(0).getVlanId().getValue().intValue();
+ return endPoint.getAttrs().getNrpCgEthFrameFlowSpec().getCeVlanIdListOrUntag().getVlanIdList().get(0).getVlanId().getValue().intValue();
}
public String getInterfaceName(){
*/
package org.opendaylight.unimgr.mef.nrp.impl;
-import com.google.common.util.concurrent.FutureCallback;
-import com.google.common.util.concurrent.Futures;
-import org.opendaylight.controller.md.sal.binding.api.*;
+import java.util.Collection;
+import java.util.List;
+import java.util.Objects;
+import java.util.stream.Collectors;
+
+import javax.annotation.Nonnull;
+import javax.annotation.Nullable;
+
+import org.opendaylight.controller.md.sal.binding.api.DataBroker;
+import org.opendaylight.controller.md.sal.binding.api.DataObjectModification;
+import org.opendaylight.controller.md.sal.binding.api.DataTreeChangeListener;
+import org.opendaylight.controller.md.sal.binding.api.DataTreeIdentifier;
+import org.opendaylight.controller.md.sal.binding.api.DataTreeModification;
+import org.opendaylight.controller.md.sal.binding.api.ReadWriteTransaction;
import org.opendaylight.controller.md.sal.common.api.data.LogicalDatastoreType;
import org.opendaylight.unimgr.mef.nrp.api.TapiConstants;
import org.opendaylight.unimgr.mef.nrp.common.NrpDao;
-import org.opendaylight.yang.gen.v1.urn.mef.yang.tapicommon.rev170227.Context;
-import org.opendaylight.yang.gen.v1.urn.mef.yang.tapicommon.rev170227.UniversalId;
-import org.opendaylight.yang.gen.v1.urn.mef.yang.tapitopology.rev170227.Context1;
-import org.opendaylight.yang.gen.v1.urn.mef.yang.tapitopology.rev170227.node.OwnedNodeEdgePoint;
-import org.opendaylight.yang.gen.v1.urn.mef.yang.tapitopology.rev170227.topology.context.Topology;
-import org.opendaylight.yang.gen.v1.urn.mef.yang.tapitopology.rev170227.topology.context.TopologyKey;
+import org.opendaylight.yang.gen.v1.urn.mef.yang.tapicommon.rev170531.Context;
+import org.opendaylight.yang.gen.v1.urn.mef.yang.tapicommon.rev170531.UniversalId;
+import org.opendaylight.yang.gen.v1.urn.mef.yang.tapitopology.rev170531.Context1;
+import org.opendaylight.yang.gen.v1.urn.mef.yang.tapitopology.rev170531.node.g.OwnedNodeEdgePoint;
+import org.opendaylight.yang.gen.v1.urn.mef.yang.tapitopology.rev170531.topology.context.g.Topology;
+import org.opendaylight.yang.gen.v1.urn.mef.yang.tapitopology.rev170531.topology.context.g.TopologyKey;
import org.opendaylight.yangtools.concepts.ListenerRegistration;
-import org.opendaylight.yangtools.yang.binding.DataObject;
import org.opendaylight.yangtools.yang.binding.InstanceIdentifier;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
-import javax.annotation.Nonnull;
-import javax.annotation.Nullable;
-import java.util.Collection;
-import java.util.LinkedList;
-import java.util.List;
-import java.util.Objects;
-import java.util.stream.Collectors;
+import com.google.common.util.concurrent.FutureCallback;
+import com.google.common.util.concurrent.Futures;
/**
* TopologyDataHandler listens to presto system topology and propagate significant changes to presto system topology.
import org.opendaylight.unimgr.mef.nrp.api.ActivationDriverBuilder;
import org.opendaylight.unimgr.mef.nrp.api.ActivationDriverNotFoundException;
import org.opendaylight.unimgr.mef.nrp.api.ActivationDriverRepoService;
-import org.opendaylight.yang.gen.v1.urn.mef.yang.tapicommon.rev170227.UniversalId;
-import org.opendaylight.yang.gen.v1.urn.onf.core.network.module.rev160630.g_forwardingconstruct.FcPort;
+import org.opendaylight.yang.gen.v1.urn.mef.yang.tapicommon.rev170531.UniversalId;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
package org.opendaylight.unimgr.mef.nrp.impl;
import org.opendaylight.unimgr.mef.nrp.api.RequestValidator;
-import org.opendaylight.yang.gen.v1.urn.mef.yang.tapiconnectivity.rev170227.CreateConnectivityServiceInput;
+import org.opendaylight.yang.gen.v1.urn.mef.yang.tapiconnectivity.rev170531.CreateConnectivityServiceInput;
/**
* @author bartosz.michalik@amartus.com
package org.opendaylight.unimgr.mef.nrp.impl;
-import com.google.common.base.Optional;
-import com.google.common.util.concurrent.CheckedFuture;
+import static org.opendaylight.unimgr.mef.nrp.api.TapiConstants.PRESTO_CTX;
+import static org.opendaylight.unimgr.mef.nrp.api.TapiConstants.PRESTO_EXT_TOPO;
+import static org.opendaylight.unimgr.mef.nrp.api.TapiConstants.PRESTO_SYSTEM_TOPO;
+
+import java.util.Arrays;
+import java.util.Collections;
+
import org.opendaylight.controller.md.sal.binding.api.DataBroker;
import org.opendaylight.controller.md.sal.binding.api.ReadWriteTransaction;
import org.opendaylight.controller.md.sal.common.api.data.LogicalDatastoreType;
import org.opendaylight.controller.md.sal.common.api.data.ReadFailedException;
import org.opendaylight.controller.md.sal.common.api.data.TransactionCommitFailedException;
-import org.opendaylight.yang.gen.v1.urn.mef.yang.tapicommon.rev170227.Context;
-import org.opendaylight.yang.gen.v1.urn.mef.yang.tapicommon.rev170227.ContextBuilder;
-import org.opendaylight.yang.gen.v1.urn.mef.yang.tapicommon.rev170227.LayerProtocolName;
-import org.opendaylight.yang.gen.v1.urn.mef.yang.tapicommon.rev170227.UniversalId;
-import org.opendaylight.yang.gen.v1.urn.mef.yang.tapitopology.rev170227.topology.Node;
-import org.opendaylight.yang.gen.v1.urn.mef.yang.tapitopology.rev170227.topology.NodeBuilder;
-import org.opendaylight.yang.gen.v1.urn.mef.yang.tapitopology.rev170227.topology.NodeKey;
-import org.opendaylight.yang.gen.v1.urn.mef.yang.tapitopology.rev170227.topology.context.TopologyBuilder;
-import org.opendaylight.yang.gen.v1.urn.mef.yang.tapitopology.rev170227.topology.context.TopologyKey;
+import org.opendaylight.yang.gen.v1.urn.mef.yang.tapicommon.rev170531.Context;
+import org.opendaylight.yang.gen.v1.urn.mef.yang.tapicommon.rev170531.ContextBuilder;
+import org.opendaylight.yang.gen.v1.urn.mef.yang.tapicommon.rev170531.LayerProtocolName;
+import org.opendaylight.yang.gen.v1.urn.mef.yang.tapicommon.rev170531.UniversalId;
+import org.opendaylight.yang.gen.v1.urn.mef.yang.tapitopology.rev170531.topology.context.g.Topology;
+import org.opendaylight.yang.gen.v1.urn.mef.yang.tapitopology.rev170531.topology.context.g.TopologyBuilder;
+import org.opendaylight.yang.gen.v1.urn.mef.yang.tapitopology.rev170531.topology.context.g.TopologyKey;
+import org.opendaylight.yang.gen.v1.urn.mef.yang.tapitopology.rev170531.topology.g.Node;
+import org.opendaylight.yang.gen.v1.urn.mef.yang.tapitopology.rev170531.topology.g.NodeBuilder;
+import org.opendaylight.yang.gen.v1.urn.mef.yang.tapitopology.rev170531.topology.g.NodeKey;
import org.opendaylight.yangtools.yang.binding.DataObject;
import org.opendaylight.yangtools.yang.binding.InstanceIdentifier;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
-import java.util.Arrays;
-import java.util.Collections;
-
-import static org.opendaylight.unimgr.mef.nrp.api.TapiConstants.*;
+import com.google.common.base.Optional;
+import com.google.common.util.concurrent.CheckedFuture;
/**
* @author bartosz.michalik@amartus.com
log.info("initialize Presto NRP context");
Context ctx = new ContextBuilder()
.setUuid(new UniversalId(PRESTO_CTX))
- .addAugmentation(org.opendaylight.yang.gen.v1.urn.mef.yang.tapitopology.rev170227.Context1.class, context())
- .addAugmentation(org.opendaylight.yang.gen.v1.urn.mef.yang.tapiconnectivity.rev170227.Context1.class, connCtx())
+ .addAugmentation(org.opendaylight.yang.gen.v1.urn.mef.yang.tapitopology.rev170531.Context1.class, context())
+ .addAugmentation(org.opendaylight.yang.gen.v1.urn.mef.yang.tapiconnectivity.rev170531.Context1.class, connCtx())
.build();
tx.put(LogicalDatastoreType.OPERATIONAL, ctxId, ctx);
try {
}
}
- private org.opendaylight.yang.gen.v1.urn.mef.yang.tapitopology.rev170227.Context1 context() {
- return new org.opendaylight.yang.gen.v1.urn.mef.yang.tapitopology.rev170227.Context1Builder()
+ private org.opendaylight.yang.gen.v1.urn.mef.yang.tapitopology.rev170531.Context1 context() {
+ return new org.opendaylight.yang.gen.v1.urn.mef.yang.tapitopology.rev170531.Context1Builder()
.setTopology(Arrays.asList(systemTopo(), extTopo()))
.build();
}
- private org.opendaylight.yang.gen.v1.urn.mef.yang.tapiconnectivity.rev170227.Context1 connCtx() {
- return new org.opendaylight.yang.gen.v1.urn.mef.yang.tapiconnectivity.rev170227.Context1Builder()
+ private org.opendaylight.yang.gen.v1.urn.mef.yang.tapiconnectivity.rev170531.Context1 connCtx() {
+ return new org.opendaylight.yang.gen.v1.urn.mef.yang.tapiconnectivity.rev170531.Context1Builder()
.build();
}
- private org.opendaylight.yang.gen.v1.urn.mef.yang.tapitopology.rev170227.topology.context.Topology extTopo() {
+ private Topology extTopo() {
UniversalId topoId = new UniversalId(PRESTO_EXT_TOPO);
log.debug("Adding {}", PRESTO_EXT_TOPO);
return new TopologyBuilder()
.build();
}
- private org.opendaylight.yang.gen.v1.urn.mef.yang.tapitopology.rev170227.topology.context.Topology systemTopo() {
+ private Topology systemTopo() {
UniversalId topoId = new UniversalId(PRESTO_SYSTEM_TOPO);
log.debug("Adding {}", PRESTO_SYSTEM_TOPO);
return new TopologyBuilder()
package org.opendaylight.unimgr.mef.nrp.impl.connectivityservice;
-import com.google.common.util.concurrent.FutureCallback;
-import com.google.common.util.concurrent.Futures;
+import java.text.MessageFormat;
+import java.util.Collections;
+import java.util.List;
+import java.util.Objects;
+import java.util.Optional;
+import java.util.concurrent.Callable;
+import java.util.stream.Collectors;
+
+import javax.annotation.Nullable;
+
import org.opendaylight.controller.md.sal.binding.api.WriteTransaction;
import org.opendaylight.controller.md.sal.common.api.data.LogicalDatastoreType;
-import org.opendaylight.unimgr.mef.nrp.api.*;
+import org.opendaylight.unimgr.mef.nrp.api.ActivationDriver;
+import org.opendaylight.unimgr.mef.nrp.api.EndPoint;
+import org.opendaylight.unimgr.mef.nrp.api.RequestValidator;
+import org.opendaylight.unimgr.mef.nrp.api.Subrequrest;
+import org.opendaylight.unimgr.mef.nrp.api.TapiConstants;
import org.opendaylight.unimgr.mef.nrp.impl.ActivationTransaction;
-import org.opendaylight.yang.gen.v1.urn.mef.yang.nrp_interface.rev170227.EndPoint2;
-import org.opendaylight.yang.gen.v1.urn.mef.yang.tapicommon.rev170227.*;
-import org.opendaylight.yang.gen.v1.urn.mef.yang.tapiconnectivity.rev170227.ConnectivityService;
-import org.opendaylight.yang.gen.v1.urn.mef.yang.tapiconnectivity.rev170227.CreateConnectivityServiceInput;
-import org.opendaylight.yang.gen.v1.urn.mef.yang.tapiconnectivity.rev170227.CreateConnectivityServiceOutput;
-import org.opendaylight.yang.gen.v1.urn.mef.yang.tapiconnectivity.rev170227.CreateConnectivityServiceOutputBuilder;
-import org.opendaylight.yang.gen.v1.urn.mef.yang.tapiconnectivity.rev170227.connection.ConnectionEndPoint;
-import org.opendaylight.yang.gen.v1.urn.mef.yang.tapiconnectivity.rev170227.connection.ConnectionEndPointBuilder;
-import org.opendaylight.yang.gen.v1.urn.mef.yang.tapiconnectivity.rev170227.connection.RouteBuilder;
-import org.opendaylight.yang.gen.v1.urn.mef.yang.tapiconnectivity.rev170227.connection.end.point.LayerProtocolBuilder;
-import org.opendaylight.yang.gen.v1.urn.mef.yang.tapiconnectivity.rev170227.connectivity.context.Connection;
-import org.opendaylight.yang.gen.v1.urn.mef.yang.tapiconnectivity.rev170227.connectivity.context.ConnectionBuilder;
-import org.opendaylight.yang.gen.v1.urn.mef.yang.tapiconnectivity.rev170227.connectivity.context.ConnectionKey;
-import org.opendaylight.yang.gen.v1.urn.mef.yang.tapiconnectivity.rev170227.connectivity.context.ConnectivityServiceKey;
-import org.opendaylight.yang.gen.v1.urn.mef.yang.tapiconnectivity.rev170227.connectivity.service.ConnConstraint;
-import org.opendaylight.yang.gen.v1.urn.mef.yang.tapiconnectivity.rev170227.connectivity.service.ConnConstraintBuilder;
-import org.opendaylight.yang.gen.v1.urn.mef.yang.tapiconnectivity.rev170227.connectivity.service.EndPointBuilder;
-import org.opendaylight.yang.gen.v1.urn.mef.yang.tapiconnectivity.rev170227.create.connectivity.service.output.ServiceBuilder;
+import org.opendaylight.yang.gen.v1.urn.mef.yang.nrp_interface.rev170531.EndPoint2;
+import org.opendaylight.yang.gen.v1.urn.mef.yang.tapicommon.rev170531.ForwardingDirection;
+import org.opendaylight.yang.gen.v1.urn.mef.yang.tapicommon.rev170531.GlobalClassG;
+import org.opendaylight.yang.gen.v1.urn.mef.yang.tapicommon.rev170531.LayerProtocolName;
+import org.opendaylight.yang.gen.v1.urn.mef.yang.tapicommon.rev170531.PortDirection;
+import org.opendaylight.yang.gen.v1.urn.mef.yang.tapicommon.rev170531.PortRole;
+import org.opendaylight.yang.gen.v1.urn.mef.yang.tapicommon.rev170531.TerminationDirection;
+import org.opendaylight.yang.gen.v1.urn.mef.yang.tapicommon.rev170531.UniversalId;
+import org.opendaylight.yang.gen.v1.urn.mef.yang.tapiconnectivity.rev170531.CreateConnectivityServiceInput;
+import org.opendaylight.yang.gen.v1.urn.mef.yang.tapiconnectivity.rev170531.CreateConnectivityServiceOutput;
+import org.opendaylight.yang.gen.v1.urn.mef.yang.tapiconnectivity.rev170531.CreateConnectivityServiceOutputBuilder;
+import org.opendaylight.yang.gen.v1.urn.mef.yang.tapiconnectivity.rev170531.connection.end.point.g.LayerProtocolBuilder;
+import org.opendaylight.yang.gen.v1.urn.mef.yang.tapiconnectivity.rev170531.connection.g.ConnectionEndPoint;
+import org.opendaylight.yang.gen.v1.urn.mef.yang.tapiconnectivity.rev170531.connection.g.ConnectionEndPointBuilder;
+import org.opendaylight.yang.gen.v1.urn.mef.yang.tapiconnectivity.rev170531.connection.g.RouteBuilder;
+import org.opendaylight.yang.gen.v1.urn.mef.yang.tapiconnectivity.rev170531.connectivity.context.g.Connection;
+import org.opendaylight.yang.gen.v1.urn.mef.yang.tapiconnectivity.rev170531.connectivity.context.g.ConnectionBuilder;
+import org.opendaylight.yang.gen.v1.urn.mef.yang.tapiconnectivity.rev170531.connectivity.context.g.ConnectionKey;
+import org.opendaylight.yang.gen.v1.urn.mef.yang.tapiconnectivity.rev170531.connectivity.context.g.ConnectivityService;
+import org.opendaylight.yang.gen.v1.urn.mef.yang.tapiconnectivity.rev170531.connectivity.context.g.ConnectivityServiceBuilder;
+import org.opendaylight.yang.gen.v1.urn.mef.yang.tapiconnectivity.rev170531.connectivity.context.g.ConnectivityServiceKey;
+import org.opendaylight.yang.gen.v1.urn.mef.yang.tapiconnectivity.rev170531.connectivity.service.g.ConnConstraint;
+import org.opendaylight.yang.gen.v1.urn.mef.yang.tapiconnectivity.rev170531.connectivity.service.g.ConnConstraintBuilder;
+import org.opendaylight.yang.gen.v1.urn.mef.yang.tapiconnectivity.rev170531.connectivity.service.g.EndPointBuilder;
+import org.opendaylight.yang.gen.v1.urn.mef.yang.tapiconnectivity.rev170531.create.connectivity.service.output.ServiceBuilder;
import org.opendaylight.yangtools.yang.common.RpcError;
import org.opendaylight.yangtools.yang.common.RpcResult;
import org.opendaylight.yangtools.yang.common.RpcResultBuilder;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
-import javax.annotation.Nullable;
-import java.text.MessageFormat;
-import java.util.Collections;
-import java.util.List;
-import java.util.Objects;
-import java.util.Optional;
-import java.util.concurrent.Callable;
-import java.util.stream.Collectors;
+import com.google.common.util.concurrent.FutureCallback;
+import com.google.common.util.concurrent.Futures;
/**
* @author bartosz.michalik@amartus.com
.setConnectionEndPoint(toConnectionPoints(endpoints, uniqueStamp))
.setRoute(Collections.singletonList(new RouteBuilder()
.setLocalId("route")
- .setLowerConnection(systemConnections.stream().map(GlobalClass::getUuid).collect(Collectors.toList()))
+ .setLowerConnection(systemConnections.stream().map(GlobalClassG::getUuid).collect(Collectors.toList()))
.build())
).build();
ConnConstraint connConstraint = input.getConnConstraint() == null ? null : new ConnConstraintBuilder(input.getConnConstraint()).build();
- org.opendaylight.yang.gen.v1.urn.mef.yang.tapiconnectivity.rev170227.connectivity.context.ConnectivityService cs = new org.opendaylight.yang.gen.v1.urn.mef.yang.tapiconnectivity.rev170227.connectivity.context.ConnectivityServiceBuilder()
+ org.opendaylight.yang.gen.v1.urn.mef.yang.tapiconnectivity.rev170531.connectivity.context.g.ConnectivityService cs = new org.opendaylight.yang.gen.v1.urn.mef.yang.tapiconnectivity.rev170531.connectivity.context.g.ConnectivityServiceBuilder()
.setUuid(new UniversalId(toCsId(uniqueStamp)))
// .setState()
.setConnConstraint(connConstraint)
tx.put(LogicalDatastoreType.OPERATIONAL, TapiConnectivityServiceImpl.connectivityCtx.child(Connection.class, new ConnectionKey(c.getUuid())), c);
});
tx.put(LogicalDatastoreType.OPERATIONAL,
- TapiConnectivityServiceImpl.connectivityCtx.child(org.opendaylight.yang.gen.v1.urn.mef.yang.tapiconnectivity.rev170227.connectivity.context.ConnectivityService.class,
+ TapiConnectivityServiceImpl.connectivityCtx.child(org.opendaylight.yang.gen.v1.urn.mef.yang.tapiconnectivity.rev170531.connectivity.context.g.ConnectivityService.class,
new ConnectivityServiceKey(cs.getUuid())), cs);
tx.put(LogicalDatastoreType.OPERATIONAL, TapiConnectivityServiceImpl.connectivityCtx.child(Connection.class, new ConnectionKey(globalConnection.getUuid())), globalConnection);
});
- return new ServiceBuilder(cs).build();
+ return new ConnectivityServiceBuilder(cs).build();
}
- private List<org.opendaylight.yang.gen.v1.urn.mef.yang.tapiconnectivity.rev170227.connectivity.service.EndPoint> toConnectionServiceEndpoints(List<EndPoint> endpoints, String uniqueStamp) {
+ private List<org.opendaylight.yang.gen.v1.urn.mef.yang.tapiconnectivity.rev170531.connectivity.service.g.EndPoint> toConnectionServiceEndpoints(List<EndPoint> endpoints, String uniqueStamp) {
return endpoints.stream().map(ep -> new EndPointBuilder()
.setLocalId("sep:" + ep.getSystemNepUuid() + ":" + uniqueStamp)
.setServiceInterfacePoint(ep.getEndpoint().getServiceInterfacePoint())
package org.opendaylight.unimgr.mef.nrp.impl.connectivityservice;
+import java.text.MessageFormat;
+import java.util.Arrays;
+import java.util.LinkedList;
+import java.util.List;
+import java.util.Map;
+import java.util.Objects;
+import java.util.Optional;
+import java.util.concurrent.Callable;
+import java.util.stream.Collectors;
+
import org.opendaylight.controller.md.sal.binding.api.WriteTransaction;
import org.opendaylight.controller.md.sal.common.api.data.LogicalDatastoreType;
import org.opendaylight.controller.md.sal.common.api.data.TransactionCommitFailedException;
import org.opendaylight.unimgr.mef.nrp.api.EndPoint;
import org.opendaylight.unimgr.mef.nrp.common.NrpDao;
import org.opendaylight.unimgr.mef.nrp.impl.ActivationTransaction;
-import org.opendaylight.yang.gen.v1.urn.mef.yang.tapicommon.rev170227.UniversalId;
-import org.opendaylight.yang.gen.v1.urn.mef.yang.tapiconnectivity.rev170227.Context1;
-import org.opendaylight.yang.gen.v1.urn.mef.yang.tapiconnectivity.rev170227.DeleteConnectivityServiceInput;
-import org.opendaylight.yang.gen.v1.urn.mef.yang.tapiconnectivity.rev170227.DeleteConnectivityServiceOutput;
-import org.opendaylight.yang.gen.v1.urn.mef.yang.tapiconnectivity.rev170227.DeleteConnectivityServiceOutputBuilder;
-import org.opendaylight.yang.gen.v1.urn.mef.yang.tapiconnectivity.rev170227.connection.Route;
-import org.opendaylight.yang.gen.v1.urn.mef.yang.tapiconnectivity.rev170227.connectivity.context.Connection;
-import org.opendaylight.yang.gen.v1.urn.mef.yang.tapiconnectivity.rev170227.connectivity.context.ConnectionKey;
-import org.opendaylight.yang.gen.v1.urn.mef.yang.tapiconnectivity.rev170227.connectivity.context.ConnectivityService;
-import org.opendaylight.yang.gen.v1.urn.mef.yang.tapiconnectivity.rev170227.connectivity.context.ConnectivityServiceKey;
-import org.opendaylight.yang.gen.v1.urn.mef.yang.tapiconnectivity.rev170227.delete.connectivity.service.output.Service;
-import org.opendaylight.yang.gen.v1.urn.mef.yang.tapiconnectivity.rev170227.delete.connectivity.service.output.ServiceBuilder;
+import org.opendaylight.yang.gen.v1.urn.mef.yang.tapicommon.rev170531.UniversalId;
+import org.opendaylight.yang.gen.v1.urn.mef.yang.tapiconnectivity.rev170531.Context1;
+import org.opendaylight.yang.gen.v1.urn.mef.yang.tapiconnectivity.rev170531.DeleteConnectivityServiceInput;
+import org.opendaylight.yang.gen.v1.urn.mef.yang.tapiconnectivity.rev170531.DeleteConnectivityServiceOutput;
+import org.opendaylight.yang.gen.v1.urn.mef.yang.tapiconnectivity.rev170531.DeleteConnectivityServiceOutputBuilder;
+import org.opendaylight.yang.gen.v1.urn.mef.yang.tapiconnectivity.rev170531.connection.g.Route;
+import org.opendaylight.yang.gen.v1.urn.mef.yang.tapiconnectivity.rev170531.connectivity.context.g.Connection;
+import org.opendaylight.yang.gen.v1.urn.mef.yang.tapiconnectivity.rev170531.connectivity.context.g.ConnectionKey;
+import org.opendaylight.yang.gen.v1.urn.mef.yang.tapiconnectivity.rev170531.connectivity.context.g.ConnectivityService;
+import org.opendaylight.yang.gen.v1.urn.mef.yang.tapiconnectivity.rev170531.connectivity.context.g.ConnectivityServiceKey;
+import org.opendaylight.yang.gen.v1.urn.mef.yang.tapiconnectivity.rev170531.delete.connectivity.service.output.Service;
+import org.opendaylight.yang.gen.v1.urn.mef.yang.tapiconnectivity.rev170531.delete.connectivity.service.output.ServiceBuilder;
import org.opendaylight.yangtools.yang.binding.InstanceIdentifier;
import org.opendaylight.yangtools.yang.common.RpcError;
import org.opendaylight.yangtools.yang.common.RpcResult;
import org.opendaylight.yangtools.yang.common.RpcResultBuilder;
-import org.slf4j.LoggerFactory;
import org.slf4j.Logger;
-
-import java.text.MessageFormat;
-import java.util.*;
-import java.util.concurrent.Callable;
-import java.util.stream.Collectors;
+import org.slf4j.LoggerFactory;
/**
* @author bartosz.michalik@amartus.com
.flatMap(c -> {
UniversalId nodeId = c.getNode();
return c.getConnectionEndPoint().stream().map(cep -> {
- Optional<org.opendaylight.yang.gen.v1.urn.mef.yang.tapiconnectivity.rev170227.connectivity.service.EndPoint> optEndPoint = Optional.empty();
+ Optional<org.opendaylight.yang.gen.v1.urn.mef.yang.tapiconnectivity.rev170531.connectivity.service.g.EndPoint> optEndPoint = Optional.empty();
if(cs.getEndPoint() != null){
optEndPoint = cs.getEndPoint().stream()
.filter(endPoint1 -> endPoint1.getServiceInterfacePoint().getValue().contains(cep.getServerNodeEdgePoint().getValue()))
.findFirst();
}
- org.opendaylight.yang.gen.v1.urn.mef.yang.tapiconnectivity.rev170227.connectivity.service.EndPoint endPoint =
+ org.opendaylight.yang.gen.v1.urn.mef.yang.tapiconnectivity.rev170531.connectivity.service.g.EndPoint endPoint =
optEndPoint.isPresent() ? optEndPoint.get() : null;
EndPoint ep = new EndPoint(endPoint, null).setSystemNepUuid(cep.getServerNodeEdgePoint());
return new Pair(nodeId, ep);
package org.opendaylight.unimgr.mef.nrp.impl.connectivityservice;
+import java.util.Objects;
+import java.util.concurrent.ExecutorService;
+import java.util.concurrent.Future;
+import java.util.concurrent.LinkedBlockingQueue;
+import java.util.concurrent.ThreadPoolExecutor;
+import java.util.concurrent.TimeUnit;
+
import org.opendaylight.controller.md.sal.binding.api.DataBroker;
-import org.opendaylight.unimgr.mef.nrp.api.*;
+import org.opendaylight.unimgr.mef.nrp.api.ActivationDriverRepoService;
+import org.opendaylight.unimgr.mef.nrp.api.RequestDecomposer;
+import org.opendaylight.unimgr.mef.nrp.api.RequestValidator;
import org.opendaylight.unimgr.mef.nrp.common.NrpDao;
import org.opendaylight.unimgr.mef.nrp.impl.ConnectivityServiceIdResourcePool;
-import org.opendaylight.yang.gen.v1.urn.mef.yang.tapiconnectivity.rev170227.*;
+import org.opendaylight.yang.gen.v1.urn.mef.yang.tapiconnectivity.rev170531.Context1;
+import org.opendaylight.yang.gen.v1.urn.mef.yang.tapiconnectivity.rev170531.CreateConnectivityServiceInput;
+import org.opendaylight.yang.gen.v1.urn.mef.yang.tapiconnectivity.rev170531.CreateConnectivityServiceOutput;
+import org.opendaylight.yang.gen.v1.urn.mef.yang.tapiconnectivity.rev170531.DeleteConnectivityServiceInput;
+import org.opendaylight.yang.gen.v1.urn.mef.yang.tapiconnectivity.rev170531.DeleteConnectivityServiceOutput;
+import org.opendaylight.yang.gen.v1.urn.mef.yang.tapiconnectivity.rev170531.GetConnectionDetailsInput;
+import org.opendaylight.yang.gen.v1.urn.mef.yang.tapiconnectivity.rev170531.GetConnectionDetailsOutput;
+import org.opendaylight.yang.gen.v1.urn.mef.yang.tapiconnectivity.rev170531.GetConnectivityServiceDetailsInput;
+import org.opendaylight.yang.gen.v1.urn.mef.yang.tapiconnectivity.rev170531.GetConnectivityServiceDetailsOutput;
+import org.opendaylight.yang.gen.v1.urn.mef.yang.tapiconnectivity.rev170531.GetConnectivityServiceListOutput;
+import org.opendaylight.yang.gen.v1.urn.mef.yang.tapiconnectivity.rev170531.TapiConnectivityService;
+import org.opendaylight.yang.gen.v1.urn.mef.yang.tapiconnectivity.rev170531.UpdateConnectivityServiceInput;
+import org.opendaylight.yang.gen.v1.urn.mef.yang.tapiconnectivity.rev170531.UpdateConnectivityServiceOutput;
import org.opendaylight.yangtools.yang.binding.InstanceIdentifier;
import org.opendaylight.yangtools.yang.common.RpcResult;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
-import java.util.Objects;
-import java.util.concurrent.*;
-
/**
* @author bartosz.michalik@amartus.com
*/
package org.opendaylight.unimgr.mef.nrp.impl.decomposer;
+import java.util.HashMap;
+import java.util.List;
+import java.util.Objects;
+import java.util.Optional;
+import java.util.stream.Collectors;
+import java.util.stream.Stream;
+
import org.jgrapht.Graph;
import org.jgrapht.GraphPath;
import org.jgrapht.alg.shortestpath.DijkstraShortestPath;
import org.opendaylight.unimgr.mef.nrp.api.Subrequrest;
import org.opendaylight.unimgr.mef.nrp.api.TapiConstants;
import org.opendaylight.unimgr.mef.nrp.common.NrpDao;
-import org.opendaylight.yang.gen.v1.urn.mef.yang.tapicommon.rev170227.OperationalState;
-import org.opendaylight.yang.gen.v1.urn.mef.yang.tapicommon.rev170227.UniversalId;
-import org.opendaylight.yang.gen.v1.urn.mef.yang.tapitopology.rev170227.topology.Node;
-import org.opendaylight.yang.gen.v1.urn.mef.yang.tapitopology.rev170227.topology.context.Topology;
+import org.opendaylight.yang.gen.v1.urn.mef.yang.tapicommon.rev170531.OperationalState;
+import org.opendaylight.yang.gen.v1.urn.mef.yang.tapicommon.rev170531.UniversalId;
+import org.opendaylight.yang.gen.v1.urn.mef.yang.tapitopology.rev170531.topology.context.g.Topology;
+import org.opendaylight.yang.gen.v1.urn.mef.yang.tapitopology.rev170531.topology.g.Node;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
-import java.util.*;
-import java.util.stream.Collectors;
-import java.util.stream.Stream;
-
/**
* @author bartosz.michalik@amartus.com
*/
package org.opendaylight.unimgr.mef.nrp.impl.ext;
-import com.google.common.base.Optional;
+import java.text.MessageFormat;
+import java.util.Collections;
+import java.util.List;
+import java.util.Objects;
+import java.util.concurrent.ExecutorService;
+import java.util.concurrent.Future;
+import java.util.concurrent.LinkedBlockingQueue;
+import java.util.concurrent.ThreadPoolExecutor;
+import java.util.concurrent.TimeUnit;
+
import org.opendaylight.controller.md.sal.binding.api.DataBroker;
import org.opendaylight.controller.md.sal.binding.api.ReadWriteTransaction;
import org.opendaylight.controller.md.sal.common.api.data.LogicalDatastoreType;
import org.opendaylight.unimgr.mef.nrp.api.TapiConstants;
import org.opendaylight.unimgr.mef.nrp.common.NrpDao;
-import org.opendaylight.yang.gen.v1.urn.mef.yang.nrp_interface.rev170227.LayerProtocol1;
-import org.opendaylight.yang.gen.v1.urn.mef.yang.nrp_interface.rev170227.LayerProtocol1Builder;
-import org.opendaylight.yang.gen.v1.urn.mef.yang.nrp_interface.rev170227.nrp.layer.protocol.attrs.NrpCgEthEnniSpecBuilder;
-import org.opendaylight.yang.gen.v1.urn.mef.yang.nrp_interface.rev170227.nrp.layer.protocol.attrs.NrpCgEthInniSpecBuilder;
-import org.opendaylight.yang.gen.v1.urn.mef.yang.nrp_interface.rev170227.nrp.layer.protocol.attrs.NrpCgEthUniSpecBuilder;
-import org.opendaylight.yang.gen.v1.urn.mef.yang.tapicommon.rev170227.LayerProtocolName;
-import org.opendaylight.yang.gen.v1.urn.mef.yang.tapicommon.rev170227.UniversalId;
-import org.opendaylight.yang.gen.v1.urn.mef.yang.tapicommon.rev170227.context.attrs.ServiceInterfacePointBuilder;
-import org.opendaylight.yang.gen.v1.urn.mef.yang.tapicommon.rev170227.service._interface.point.LayerProtocol;
-import org.opendaylight.yang.gen.v1.urn.mef.yang.tapicommon.rev170227.service._interface.point.LayerProtocolBuilder;
-import org.opendaylight.yang.gen.v1.urn.mef.yang.tapitopology.rev170227.node.OwnedNodeEdgePoint;
-import org.opendaylight.yang.gen.v1.urn.mef.yang.tapitopology.rev170227.node.OwnedNodeEdgePointBuilder;
-import org.opendaylight.yang.gen.v1.urn.mef.yang.tapitopology.rev170227.node.OwnedNodeEdgePointKey;
-import org.opendaylight.yang.gen.v1.urn.mef.yang.tapitopology.rev170227.topology.Node;
-import org.opendaylight.yang.gen.v1.urn.mef.yang.tapitopology.rev170227.topology.NodeKey;
+import org.opendaylight.yang.gen.v1.urn.mef.yang.nrp_interface.rev170531.LayerProtocol1;
+import org.opendaylight.yang.gen.v1.urn.mef.yang.nrp_interface.rev170531.LayerProtocol1Builder;
+import org.opendaylight.yang.gen.v1.urn.mef.yang.nrp_interface.rev170531.nrp.layer.protocol.attrs.g.NrpCgEthEnniSpecBuilder;
+import org.opendaylight.yang.gen.v1.urn.mef.yang.nrp_interface.rev170531.nrp.layer.protocol.attrs.g.NrpCgEthInniSpecBuilder;
+import org.opendaylight.yang.gen.v1.urn.mef.yang.nrp_interface.rev170531.nrp.layer.protocol.attrs.g.NrpCgEthUniSpecBuilder;
+import org.opendaylight.yang.gen.v1.urn.mef.yang.tapicommon.rev170531.LayerProtocolName;
+import org.opendaylight.yang.gen.v1.urn.mef.yang.tapicommon.rev170531.UniversalId;
+import org.opendaylight.yang.gen.v1.urn.mef.yang.tapicommon.rev170531.context.g.ServiceInterfacePointBuilder;
+import org.opendaylight.yang.gen.v1.urn.mef.yang.tapicommon.rev170531.service._interface.point.g.LayerProtocol;
+import org.opendaylight.yang.gen.v1.urn.mef.yang.tapicommon.rev170531.service._interface.point.g.LayerProtocolBuilder;
+import org.opendaylight.yang.gen.v1.urn.mef.yang.tapitopology.rev170531.node.g.OwnedNodeEdgePoint;
+import org.opendaylight.yang.gen.v1.urn.mef.yang.tapitopology.rev170531.node.g.OwnedNodeEdgePointBuilder;
+import org.opendaylight.yang.gen.v1.urn.mef.yang.tapitopology.rev170531.node.g.OwnedNodeEdgePointKey;
+import org.opendaylight.yang.gen.v1.urn.mef.yang.tapitopology.rev170531.topology.g.Node;
+import org.opendaylight.yang.gen.v1.urn.mef.yang.tapitopology.rev170531.topology.g.NodeKey;
import org.opendaylight.yang.gen.v1.urn.odl.unimgr.yang.unimgr.ext.rev700101.AddSipInput;
import org.opendaylight.yang.gen.v1.urn.odl.unimgr.yang.unimgr.ext.rev700101.UnimgrExtService;
import org.opendaylight.yang.gen.v1.urn.odl.unimgr.yang.unimgr.ext.rev700101.add.sip.input.SipType;
-import org.opendaylight.yang.gen.v1.urn.odl.unimgr.yang.unimgr.ext.rev700101.add.sip.input.sip.type.UniSpec;
import org.opendaylight.yang.gen.v1.urn.odl.unimgr.yang.unimgr.ext.rev700101.add.sip.input.sip.type.EnniSpec;
import org.opendaylight.yang.gen.v1.urn.odl.unimgr.yang.unimgr.ext.rev700101.add.sip.input.sip.type.InniSpec;
+import org.opendaylight.yang.gen.v1.urn.odl.unimgr.yang.unimgr.ext.rev700101.add.sip.input.sip.type.UniSpec;
import org.opendaylight.yangtools.yang.common.RpcError;
import org.opendaylight.yangtools.yang.common.RpcResult;
import org.opendaylight.yangtools.yang.common.RpcResultBuilder;
-import java.text.MessageFormat;
-import java.util.Collections;
-import java.util.List;
-import java.util.Objects;
-import java.util.concurrent.*;
+import com.google.common.base.Optional;
/**
* @author bartosz.michalik@amartus.com
*/
package org.opendaylight.unimgr.utils;
-import org.opendaylight.yang.gen.v1.urn.mef.yang.tapicommon.rev170227.UniversalId;
+import org.opendaylight.yang.gen.v1.urn.mef.yang.tapicommon.rev170531.UniversalId;
/**
* @author marek.ryznar@amartus.com
<argument ref="dataBroker" />
</bean>
- <odl:rpc-implementation ref="tapiConnectivityService" interface="org.opendaylight.yang.gen.v1.urn.mef.yang.tapiconnectivity.rev170227.TapiConnectivityService" />
+ <odl:rpc-implementation ref="tapiConnectivityService" interface="org.opendaylight.yang.gen.v1.urn.mef.yang.tapiconnectivity.rev170531.TapiConnectivityService" />
<reference id="dataBroker" interface="org.opendaylight.controller.md.sal.binding.api.DataBroker"/>
<reference-list id="driverBuilders" interface="org.opendaylight.unimgr.mef.nrp.api.ActivationDriverBuilder" availability="optional">
*/
package org.opendaylight.unimgr.mef.nrp.impl;
-import com.google.common.base.Optional;
+import static org.junit.Assert.assertEquals;
+import static org.junit.Assert.assertFalse;
+import static org.junit.Assert.assertTrue;
+import static org.junit.Assert.fail;
+
+import java.util.Arrays;
+import java.util.Collections;
+import java.util.List;
+import java.util.concurrent.ExecutionException;
+import java.util.function.BiConsumer;
+import java.util.stream.Collectors;
+import java.util.stream.IntStream;
+
import org.junit.Before;
import org.junit.Test;
-import org.opendaylight.controller.md.sal.binding.api.DataBroker;
import org.opendaylight.controller.md.sal.binding.api.ReadOnlyTransaction;
import org.opendaylight.controller.md.sal.binding.api.ReadWriteTransaction;
-import org.opendaylight.controller.md.sal.binding.test.AbstractDataBrokerTest;
import org.opendaylight.controller.md.sal.common.api.data.LogicalDatastoreType;
import org.opendaylight.controller.md.sal.common.api.data.TransactionCommitFailedException;
import org.opendaylight.unimgr.mef.nrp.api.TapiConstants;
import org.opendaylight.unimgr.mef.nrp.common.NrpDao;
-import org.opendaylight.yang.gen.v1.urn.mef.yang.tapicommon.rev170227.Context;
-import org.opendaylight.yang.gen.v1.urn.mef.yang.tapicommon.rev170227.TerminationDirection;
-import org.opendaylight.yang.gen.v1.urn.mef.yang.tapicommon.rev170227.UniversalId;
-import org.opendaylight.yang.gen.v1.urn.mef.yang.tapitopology.rev170227.Context1;
-import org.opendaylight.yang.gen.v1.urn.mef.yang.tapitopology.rev170227.node.OwnedNodeEdgePoint;
-import org.opendaylight.yang.gen.v1.urn.mef.yang.tapitopology.rev170227.node.OwnedNodeEdgePointBuilder;
-import org.opendaylight.yang.gen.v1.urn.mef.yang.tapitopology.rev170227.node.OwnedNodeEdgePointKey;
-import org.opendaylight.yang.gen.v1.urn.mef.yang.tapitopology.rev170227.topology.Node;
-import org.opendaylight.yang.gen.v1.urn.mef.yang.tapitopology.rev170227.topology.NodeKey;
-import org.opendaylight.yang.gen.v1.urn.mef.yang.tapitopology.rev170227.topology.context.Topology;
-import org.opendaylight.yang.gen.v1.urn.mef.yang.tapitopology.rev170227.topology.context.TopologyKey;
+import org.opendaylight.yang.gen.v1.urn.mef.yang.tapicommon.rev170531.Context;
+import org.opendaylight.yang.gen.v1.urn.mef.yang.tapicommon.rev170531.TerminationDirection;
+import org.opendaylight.yang.gen.v1.urn.mef.yang.tapicommon.rev170531.UniversalId;
+import org.opendaylight.yang.gen.v1.urn.mef.yang.tapitopology.rev170531.Context1;
+import org.opendaylight.yang.gen.v1.urn.mef.yang.tapitopology.rev170531.node.g.OwnedNodeEdgePoint;
+import org.opendaylight.yang.gen.v1.urn.mef.yang.tapitopology.rev170531.node.g.OwnedNodeEdgePointBuilder;
+import org.opendaylight.yang.gen.v1.urn.mef.yang.tapitopology.rev170531.node.g.OwnedNodeEdgePointKey;
+import org.opendaylight.yang.gen.v1.urn.mef.yang.tapitopology.rev170531.topology.context.g.Topology;
+import org.opendaylight.yang.gen.v1.urn.mef.yang.tapitopology.rev170531.topology.context.g.TopologyKey;
+import org.opendaylight.yang.gen.v1.urn.mef.yang.tapitopology.rev170531.topology.g.Node;
+import org.opendaylight.yang.gen.v1.urn.mef.yang.tapitopology.rev170531.topology.g.NodeKey;
import org.opendaylight.yangtools.yang.binding.InstanceIdentifier;
-import java.util.Arrays;
-import java.util.Collections;
-import java.util.List;
-import java.util.concurrent.ExecutionException;
-import java.util.function.BiConsumer;
-import java.util.stream.Collectors;
-import java.util.stream.IntStream;
-
-import static org.junit.Assert.*;
+import com.google.common.base.Optional;
/**
* @author marek.ryznar@amartus.com
package org.opendaylight.unimgr.mef.nrp.impl;
+import static org.opendaylight.unimgr.mef.nrp.api.TapiConstants.PRESTO_SYSTEM_TOPO;
+
+import java.util.Arrays;
+import java.util.Collections;
+import java.util.stream.Collectors;
+import java.util.stream.Stream;
+
import org.junit.Before;
import org.opendaylight.controller.md.sal.binding.api.DataBroker;
import org.opendaylight.controller.md.sal.binding.api.ReadWriteTransaction;
import org.opendaylight.controller.md.sal.common.api.data.LogicalDatastoreType;
import org.opendaylight.unimgr.mef.nrp.api.EndPoint;
import org.opendaylight.unimgr.mef.nrp.common.NrpDao;
-import org.opendaylight.yang.gen.v1.urn.mef.yang.tapicommon.rev170227.ForwardingDirection;
-import org.opendaylight.yang.gen.v1.urn.mef.yang.tapicommon.rev170227.LayerProtocolName;
-import org.opendaylight.yang.gen.v1.urn.mef.yang.tapicommon.rev170227.OperationalState;
-import org.opendaylight.yang.gen.v1.urn.mef.yang.tapicommon.rev170227.UniversalId;
-import org.opendaylight.yang.gen.v1.urn.mef.yang.tapicommon.rev170227.context.attrs.ServiceInterfacePointBuilder;
-import org.opendaylight.yang.gen.v1.urn.mef.yang.tapiconnectivity.rev170227.ConnectivityServiceEndPoint;
-import org.opendaylight.yang.gen.v1.urn.mef.yang.tapiconnectivity.rev170227.create.connectivity.service.input.EndPointBuilder;
-import org.opendaylight.yang.gen.v1.urn.mef.yang.tapitopology.rev170227.link.StateBuilder;
-import org.opendaylight.yang.gen.v1.urn.mef.yang.tapitopology.rev170227.node.OwnedNodeEdgePointBuilder;
-import org.opendaylight.yang.gen.v1.urn.mef.yang.tapitopology.rev170227.topology.Link;
-import org.opendaylight.yang.gen.v1.urn.mef.yang.tapitopology.rev170227.topology.LinkBuilder;
-import org.opendaylight.yang.gen.v1.urn.mef.yang.tapitopology.rev170227.topology.LinkKey;
-import org.opendaylight.yang.gen.v1.urn.mef.yang.tapitopology.rev170227.topology.Node;
-
-import java.util.Arrays;
-import java.util.Collections;
-import java.util.stream.Collectors;
-import java.util.stream.Stream;
-
-import static org.opendaylight.unimgr.mef.nrp.api.TapiConstants.PRESTO_SYSTEM_TOPO;
+import org.opendaylight.yang.gen.v1.urn.mef.yang.tapicommon.rev170531.ForwardingDirection;
+import org.opendaylight.yang.gen.v1.urn.mef.yang.tapicommon.rev170531.LayerProtocolName;
+import org.opendaylight.yang.gen.v1.urn.mef.yang.tapicommon.rev170531.OperationalState;
+import org.opendaylight.yang.gen.v1.urn.mef.yang.tapicommon.rev170531.UniversalId;
+import org.opendaylight.yang.gen.v1.urn.mef.yang.tapicommon.rev170531.context.g.ServiceInterfacePointBuilder;
+import org.opendaylight.yang.gen.v1.urn.mef.yang.tapiconnectivity.rev170531.ConnectivityServiceEndPointG;
+import org.opendaylight.yang.gen.v1.urn.mef.yang.tapiconnectivity.rev170531.create.connectivity.service.input.EndPointBuilder;
+import org.opendaylight.yang.gen.v1.urn.mef.yang.tapitopology.rev170531.link.g.StateBuilder;
+import org.opendaylight.yang.gen.v1.urn.mef.yang.tapitopology.rev170531.node.g.OwnedNodeEdgePointBuilder;
+import org.opendaylight.yang.gen.v1.urn.mef.yang.tapitopology.rev170531.topology.g.Link;
+import org.opendaylight.yang.gen.v1.urn.mef.yang.tapitopology.rev170531.topology.g.LinkBuilder;
+import org.opendaylight.yang.gen.v1.urn.mef.yang.tapitopology.rev170531.topology.g.LinkKey;
+import org.opendaylight.yang.gen.v1.urn.mef.yang.tapitopology.rev170531.topology.g.Node;
/**
* @author bartosz.michalik@amartus.com
}
protected EndPoint ep(String nepId) {
- ConnectivityServiceEndPoint ep = new EndPointBuilder()
+ ConnectivityServiceEndPointG ep = new EndPointBuilder()
.setLocalId("ep_" + nepId)
.setServiceInterfacePoint(new UniversalId("sip:" + nepId))
.build();
*/
package org.opendaylight.unimgr.mef.nrp.impl;
+import static org.junit.Assert.assertTrue;
+import static org.mockito.Mockito.mock;
+import static org.mockito.Mockito.when;
+import static org.opendaylight.unimgr.utils.ActivationDriverMocks.prepareDriver;
+
+import java.util.Collections;
+import java.util.Optional;
+
import org.junit.Test;
import org.opendaylight.unimgr.mef.nrp.api.ActivationDriver;
import org.opendaylight.unimgr.mef.nrp.api.ActivationDriverBuilder;
import org.opendaylight.unimgr.mef.nrp.api.ActivationDriverNotFoundException;
import org.opendaylight.unimgr.mef.nrp.api.ActivationDriverRepoService;
-import org.opendaylight.yang.gen.v1.urn.mef.yang.tapicommon.rev170227.UniversalId;
-
-import java.util.Collections;
-import java.util.Optional;
-
-import static org.junit.Assert.assertTrue;
-import static org.mockito.Mockito.mock;
-import static org.mockito.Mockito.when;
-import static org.opendaylight.unimgr.utils.ActivationDriverMocks.prepareDriver;
+import org.opendaylight.yang.gen.v1.urn.mef.yang.tapicommon.rev170531.UniversalId;
/**
* @author bartosz.michalik@amartus.com
package org.opendaylight.unimgr.mef.nrp.impl;
+import static org.junit.Assert.assertEquals;
+import static org.junit.Assert.assertNotNull;
+import static org.junit.Assert.assertNull;
+
+import java.util.Arrays;
+import java.util.List;
+
import org.junit.Before;
import org.junit.Test;
import org.opendaylight.controller.md.sal.binding.api.ReadWriteTransaction;
import org.opendaylight.unimgr.mef.nrp.api.Subrequrest;
import org.opendaylight.unimgr.mef.nrp.impl.decomposer.BasicDecomposer;
-import org.opendaylight.yang.gen.v1.urn.mef.yang.tapicommon.rev170227.OperationalState;
+import org.opendaylight.yang.gen.v1.urn.mef.yang.tapicommon.rev170531.OperationalState;
import org.opendaylight.yangtools.yang.common.OperationFailedException;
-import java.util.Arrays;
-import java.util.List;
-
-import static org.junit.Assert.*;
-
/**
* @author bartosz.michalik@amartus.com
*/
package org.opendaylight.unimgr.mef.nrp.impl.connectivityservice;
-import com.google.common.util.concurrent.CheckedFuture;
+import static org.junit.Assert.assertFalse;
+import static org.junit.Assert.assertTrue;
+import static org.mockito.Matchers.any;
+import static org.mockito.Matchers.eq;
+import static org.mockito.Mockito.doThrow;
+import static org.mockito.Mockito.mock;
+import static org.mockito.Mockito.times;
+import static org.mockito.Mockito.verify;
+import static org.mockito.Mockito.verifyZeroInteractions;
+import static org.mockito.Mockito.when;
+
+import java.util.Arrays;
+import java.util.List;
+import java.util.concurrent.ExecutionException;
+import java.util.function.Function;
+import java.util.stream.Collectors;
+import java.util.stream.IntStream;
+
import org.junit.Before;
import org.junit.Test;
import org.opendaylight.controller.md.sal.binding.api.DataBroker;
import org.opendaylight.controller.md.sal.binding.api.ReadWriteTransaction;
import org.opendaylight.controller.md.sal.common.api.data.LogicalDatastoreType;
import org.opendaylight.controller.md.sal.common.api.data.TransactionCommitFailedException;
-import org.opendaylight.unimgr.mef.nrp.api.*;
+import org.opendaylight.unimgr.mef.nrp.api.ActivationDriver;
+import org.opendaylight.unimgr.mef.nrp.api.ActivationDriverRepoService;
+import org.opendaylight.unimgr.mef.nrp.api.Constraints;
+import org.opendaylight.unimgr.mef.nrp.api.RequestDecomposer;
+import org.opendaylight.unimgr.mef.nrp.api.RequestValidator;
+import org.opendaylight.unimgr.mef.nrp.api.Subrequrest;
import org.opendaylight.unimgr.mef.nrp.common.ResourceActivatorException;
import org.opendaylight.unimgr.mef.nrp.impl.ConnectivityServiceIdResourcePool;
import org.opendaylight.unimgr.utils.ActivationDriverMocks;
-import org.opendaylight.yang.gen.v1.urn.mef.yang.tapicommon.rev170227.PortRole;
-import org.opendaylight.yang.gen.v1.urn.mef.yang.tapicommon.rev170227.UniversalId;
-import org.opendaylight.yang.gen.v1.urn.mef.yang.tapiconnectivity.rev170227.CreateConnectivityServiceInput;
-import org.opendaylight.yang.gen.v1.urn.mef.yang.tapiconnectivity.rev170227.CreateConnectivityServiceInputBuilder;
-import org.opendaylight.yang.gen.v1.urn.mef.yang.tapiconnectivity.rev170227.CreateConnectivityServiceOutput;
-import org.opendaylight.yang.gen.v1.urn.mef.yang.tapiconnectivity.rev170227.create.connectivity.service.input.EndPoint;
-import org.opendaylight.yang.gen.v1.urn.mef.yang.tapiconnectivity.rev170227.create.connectivity.service.input.EndPointBuilder;
+import org.opendaylight.yang.gen.v1.urn.mef.yang.tapicommon.rev170531.PortRole;
+import org.opendaylight.yang.gen.v1.urn.mef.yang.tapicommon.rev170531.UniversalId;
+import org.opendaylight.yang.gen.v1.urn.mef.yang.tapiconnectivity.rev170531.CreateConnectivityServiceInput;
+import org.opendaylight.yang.gen.v1.urn.mef.yang.tapiconnectivity.rev170531.CreateConnectivityServiceInputBuilder;
+import org.opendaylight.yang.gen.v1.urn.mef.yang.tapiconnectivity.rev170531.CreateConnectivityServiceOutput;
+import org.opendaylight.yang.gen.v1.urn.mef.yang.tapiconnectivity.rev170531.create.connectivity.service.input.EndPoint;
+import org.opendaylight.yang.gen.v1.urn.mef.yang.tapiconnectivity.rev170531.create.connectivity.service.input.EndPointBuilder;
import org.opendaylight.yangtools.yang.binding.InstanceIdentifier;
import org.opendaylight.yangtools.yang.common.RpcResult;
-import java.util.Arrays;
-import java.util.List;
-import java.util.concurrent.ExecutionException;
-import java.util.function.Function;
-import java.util.stream.Collectors;
-import java.util.stream.IntStream;
-
-import static org.junit.Assert.assertFalse;
-import static org.junit.Assert.assertTrue;
-import static org.mockito.Matchers.any;
-import static org.mockito.Mockito.*;
+import com.google.common.util.concurrent.CheckedFuture;
/**
* @author bartosz.michalik@amartus.com
.build();
}
- private org.opendaylight.yang.gen.v1.urn.mef.yang.tapiconnectivity.rev170227.create.connectivity.service.input.EndPoint ep(String id) {
+ private org.opendaylight.yang.gen.v1.urn.mef.yang.tapiconnectivity.rev170531.create.connectivity.service.input.EndPoint ep(String id) {
return new EndPointBuilder()
.setLocalId(id)
.setRole(PortRole.Symmetric)
package org.opendaylight.unimgr.mef.nrp.impl.connectivityservice;
+import static org.junit.Assert.assertEquals;
+import static org.junit.Assert.assertFalse;
+import static org.junit.Assert.assertTrue;
+import static org.mockito.Matchers.any;
+import static org.mockito.Mockito.mock;
+import static org.mockito.Mockito.verify;
+import static org.mockito.Mockito.verifyZeroInteractions;
+import static org.mockito.Mockito.when;
+
+import java.util.Arrays;
+import java.util.Collections;
+import java.util.List;
+import java.util.concurrent.ExecutionException;
+import java.util.stream.Collectors;
+
import org.junit.Before;
import org.junit.Test;
import org.opendaylight.controller.md.sal.binding.api.ReadOnlyTransaction;
import org.opendaylight.unimgr.mef.nrp.impl.ConnectivityServiceIdResourcePool;
import org.opendaylight.unimgr.mef.nrp.impl.decomposer.BasicDecomposer;
import org.opendaylight.unimgr.utils.ActivationDriverMocks;
-import org.opendaylight.yang.gen.v1.urn.mef.yang.tapicommon.rev170227.PortRole;
-import org.opendaylight.yang.gen.v1.urn.mef.yang.tapicommon.rev170227.TerminationDirection;
-import org.opendaylight.yang.gen.v1.urn.mef.yang.tapicommon.rev170227.UniversalId;
-import org.opendaylight.yang.gen.v1.urn.mef.yang.tapiconnectivity.rev170227.*;
-import org.opendaylight.yang.gen.v1.urn.mef.yang.tapiconnectivity.rev170227.connection.*;
-import org.opendaylight.yang.gen.v1.urn.mef.yang.tapiconnectivity.rev170227.connection.ConnectionEndPoint;
-import org.opendaylight.yang.gen.v1.urn.mef.yang.tapiconnectivity.rev170227.connectivity.context.*;
-import org.opendaylight.yang.gen.v1.urn.mef.yang.tapiconnectivity.rev170227.connectivity.context.Connection;
-import org.opendaylight.yang.gen.v1.urn.mef.yang.tapiconnectivity.rev170227.connectivity.context.ConnectivityService;
-import org.opendaylight.yang.gen.v1.urn.mef.yang.tapiconnectivity.rev170227.create.connectivity.service.input.EndPoint;
-import org.opendaylight.yang.gen.v1.urn.mef.yang.tapiconnectivity.rev170227.create.connectivity.service.input.EndPointBuilder;
+import org.opendaylight.yang.gen.v1.urn.mef.yang.tapicommon.rev170531.PortRole;
+import org.opendaylight.yang.gen.v1.urn.mef.yang.tapicommon.rev170531.TerminationDirection;
+import org.opendaylight.yang.gen.v1.urn.mef.yang.tapicommon.rev170531.UniversalId;
+import org.opendaylight.yang.gen.v1.urn.mef.yang.tapiconnectivity.rev170531.Context1;
+import org.opendaylight.yang.gen.v1.urn.mef.yang.tapiconnectivity.rev170531.CreateConnectivityServiceInput;
+import org.opendaylight.yang.gen.v1.urn.mef.yang.tapiconnectivity.rev170531.CreateConnectivityServiceInputBuilder;
+import org.opendaylight.yang.gen.v1.urn.mef.yang.tapiconnectivity.rev170531.CreateConnectivityServiceOutput;
+import org.opendaylight.yang.gen.v1.urn.mef.yang.tapiconnectivity.rev170531.DeleteConnectivityServiceInput;
+import org.opendaylight.yang.gen.v1.urn.mef.yang.tapiconnectivity.rev170531.DeleteConnectivityServiceInputBuilder;
+import org.opendaylight.yang.gen.v1.urn.mef.yang.tapiconnectivity.rev170531.DeleteConnectivityServiceOutput;
+import org.opendaylight.yang.gen.v1.urn.mef.yang.tapiconnectivity.rev170531.connection.g.ConnectionEndPoint;
+import org.opendaylight.yang.gen.v1.urn.mef.yang.tapiconnectivity.rev170531.connection.g.ConnectionEndPointBuilder;
+import org.opendaylight.yang.gen.v1.urn.mef.yang.tapiconnectivity.rev170531.connection.g.RouteBuilder;
+import org.opendaylight.yang.gen.v1.urn.mef.yang.tapiconnectivity.rev170531.connectivity.context.g.Connection;
+import org.opendaylight.yang.gen.v1.urn.mef.yang.tapiconnectivity.rev170531.connectivity.context.g.ConnectionBuilder;
+import org.opendaylight.yang.gen.v1.urn.mef.yang.tapiconnectivity.rev170531.connectivity.context.g.ConnectionKey;
+import org.opendaylight.yang.gen.v1.urn.mef.yang.tapiconnectivity.rev170531.connectivity.context.g.ConnectivityService;
+import org.opendaylight.yang.gen.v1.urn.mef.yang.tapiconnectivity.rev170531.connectivity.context.g.ConnectivityServiceBuilder;
+import org.opendaylight.yang.gen.v1.urn.mef.yang.tapiconnectivity.rev170531.connectivity.context.g.ConnectivityServiceKey;
+import org.opendaylight.yang.gen.v1.urn.mef.yang.tapiconnectivity.rev170531.create.connectivity.service.input.EndPoint;
+import org.opendaylight.yang.gen.v1.urn.mef.yang.tapiconnectivity.rev170531.create.connectivity.service.input.EndPointBuilder;
import org.opendaylight.yangtools.yang.binding.InstanceIdentifier;
import org.opendaylight.yangtools.yang.common.RpcResult;
-import java.util.Arrays;
-import java.util.Collections;
-import java.util.List;
-import java.util.concurrent.ExecutionException;
-import java.util.stream.Collectors;
-
-import static org.junit.Assert.*;
-import static org.mockito.Matchers.any;
-import static org.mockito.Mockito.*;
-
/**
* @author bartosz.michalik@amartus.com
*/
.build()).collect(Collectors.toList());
}
- private org.opendaylight.yang.gen.v1.urn.mef.yang.tapiconnectivity.rev170227.connectivity.context.ConnectivityService cs(String csId, UniversalId connectionId) {
+ private org.opendaylight.yang.gen.v1.urn.mef.yang.tapiconnectivity.rev170531.connectivity.context.g.ConnectivityService cs(String csId, UniversalId connectionId) {
return new ConnectivityServiceBuilder()
.setUuid(new UniversalId(csId))
.setConnection(Arrays.asList(connectionId))
.build();
}
- private org.opendaylight.yang.gen.v1.urn.mef.yang.tapiconnectivity.rev170227.connectivity.context.Connection c(String nodeUuid, List<UniversalId> route, String... neps) {
+ private org.opendaylight.yang.gen.v1.urn.mef.yang.tapiconnectivity.rev170531.connectivity.context.g.Connection c(String nodeUuid, List<UniversalId> route, String... neps) {
ConnectionBuilder builder = new ConnectionBuilder()
.setUuid(new UniversalId("c:" + nodeUuid))
.setNode(new UniversalId(nodeUuid))
return builder.build();
}
- private org.opendaylight.yang.gen.v1.urn.mef.yang.tapiconnectivity.rev170227.connectivity.context.Connection c(String nodeUuid, String... neps) {
+ private org.opendaylight.yang.gen.v1.urn.mef.yang.tapiconnectivity.rev170531.connectivity.context.g.Connection c(String nodeUuid, String... neps) {
return c(nodeUuid, Collections.emptyList(), neps);
}
package org.opendaylight.unimgr.mef.nrp.impl.ext;
+import static org.junit.Assert.assertFalse;
+import static org.junit.Assert.assertNotNull;
+import static org.junit.Assert.assertTrue;
+
+import java.util.function.Consumer;
+
import org.junit.Before;
import org.junit.Test;
import org.opendaylight.controller.md.sal.binding.api.ReadWriteTransaction;
import org.opendaylight.controller.md.sal.common.api.data.ReadFailedException;
import org.opendaylight.unimgr.mef.nrp.common.NrpDao;
import org.opendaylight.unimgr.mef.nrp.impl.AbstractTestWithTopo;
-import org.opendaylight.yang.gen.v1.urn.mef.yang.nrm_connectivity.rev170227.NaturalNumber;
-import org.opendaylight.yang.gen.v1.urn.mef.yang.nrp_interface.rev170227.LayerProtocol1;
-import org.opendaylight.yang.gen.v1.urn.mef.yang.tapicommon.rev170227.UniversalId;
-import org.opendaylight.yang.gen.v1.urn.mef.yang.tapicommon.rev170227.context.attrs.ServiceInterfacePoint;
-import org.opendaylight.yang.gen.v1.urn.mef.yang.tapicommon.rev170227.service._interface.point.LayerProtocol;
-import org.opendaylight.yang.gen.v1.urn.mef.yang.tapitopology.rev170227.node.OwnedNodeEdgePoint;
+import org.opendaylight.yang.gen.v1.urn.mef.yang.mef_types.rev170531.NaturalNumber;
+import org.opendaylight.yang.gen.v1.urn.mef.yang.nrp_interface.rev170531.LayerProtocol1;
+import org.opendaylight.yang.gen.v1.urn.mef.yang.tapicommon.rev170531.UniversalId;
+import org.opendaylight.yang.gen.v1.urn.mef.yang.tapicommon.rev170531.context.g.ServiceInterfacePoint;
+import org.opendaylight.yang.gen.v1.urn.mef.yang.tapicommon.rev170531.service._interface.point.g.LayerProtocol;
+import org.opendaylight.yang.gen.v1.urn.mef.yang.tapitopology.rev170531.node.g.OwnedNodeEdgePoint;
import org.opendaylight.yang.gen.v1.urn.odl.unimgr.yang.unimgr.ext.rev700101.AddSipInput;
import org.opendaylight.yang.gen.v1.urn.odl.unimgr.yang.unimgr.ext.rev700101.AddSipInputBuilder;
-import org.opendaylight.yang.gen.v1.urn.odl.unimgr.yang.unimgr.ext.rev700101.add.sip.input.sip.type.UniSpecBuilder;
import org.opendaylight.yang.gen.v1.urn.odl.unimgr.yang.unimgr.ext.rev700101.add.sip.input.sip.type.EnniSpecBuilder;
import org.opendaylight.yang.gen.v1.urn.odl.unimgr.yang.unimgr.ext.rev700101.add.sip.input.sip.type.InniSpecBuilder;
+import org.opendaylight.yang.gen.v1.urn.odl.unimgr.yang.unimgr.ext.rev700101.add.sip.input.sip.type.UniSpecBuilder;
import org.opendaylight.yangtools.yang.common.RpcResult;
-import java.math.BigInteger;
-import java.util.function.Consumer;
-
-import static org.junit.Assert.assertFalse;
-import static org.junit.Assert.assertNotNull;
-import static org.junit.Assert.assertTrue;
-
/**
* @author bartosz.michalik@amartus.com
*/
new EnniSpecBuilder()
.setEnniSpec(
new org.opendaylight.yang.gen.v1.urn.odl.unimgr.yang.unimgr.ext.rev700101.add.sip.input.sip.type.enni.spec.EnniSpecBuilder()
- .setMaxFrameSize(new NaturalNumber(new BigInteger("1000")))
+ .setMaxFrameSize(new NaturalNumber(new Long(1000)))
.build())
.build());
break;
*/
package org.opendaylight.unimgr.utils;
-import org.opendaylight.unimgr.mef.nrp.api.ActivationDriver;
-import org.opendaylight.unimgr.mef.nrp.api.ActivationDriverBuilder;
-import org.opendaylight.unimgr.mef.nrp.api.ActivationDriverRepoService;
-import org.opendaylight.unimgr.mef.nrp.impl.ActivationDriverRepoServiceImpl;
-import org.opendaylight.yang.gen.v1.urn.mef.yang.tapicommon.rev170227.UniversalId;
+import static org.mockito.Matchers.any;
+import static org.mockito.Mockito.doAnswer;
+import static org.mockito.Mockito.mock;
+import static org.mockito.Mockito.when;
import java.util.HashMap;
import java.util.List;
import java.util.function.Supplier;
import java.util.stream.Collectors;
-import static org.mockito.Matchers.any;
-import static org.mockito.Mockito.doAnswer;
-import static org.mockito.Mockito.mock;
-import static org.mockito.Mockito.when;
+import org.opendaylight.unimgr.mef.nrp.api.ActivationDriver;
+import org.opendaylight.unimgr.mef.nrp.api.ActivationDriverBuilder;
+import org.opendaylight.unimgr.mef.nrp.api.ActivationDriverRepoService;
+import org.opendaylight.unimgr.mef.nrp.impl.ActivationDriverRepoServiceImpl;
+import org.opendaylight.yang.gen.v1.urn.mef.yang.tapicommon.rev170531.UniversalId;
/**
* @author bartosz.michalik@amartus.com
</properties>
<dependencies>
+ <dependency>
+ <groupId>${project.groupId}</groupId>
+ <artifactId>features4-unimgr</artifactId>
+ <version>${project.version}</version>
+ <classifier>features</classifier>
+ <type>xml</type>
+ </dependency>
<dependency>
<groupId>${project.groupId}</groupId>
<artifactId>unimgr-karaf4</artifactId>
--- /dev/null
+module mef-common {
+ namespace "urn:mef:yang:MEF_Common";
+ prefix mef-common;
+ import mef-common-types {
+ prefix mef-common-types;
+ }
+ organization "Metro Ethernet Forum (MEF)";
+ contact "MEF";
+ description "none";
+ revision 2017-05-31 {
+ description "MEF NRP 1.0.alpha";
+ reference "ONF-TR-527, ONF-TR-512, ONF-TR-531, RFC 6020 and RFC 6087";
+ }
+
+ typedef real {
+ type decimal64 {
+ fraction-digits 2;
+ }
+ }
+
+ /***********************
+ * package diagrams
+ **********************/
+
+ /***********************
+ * package object-classes
+ **********************/
+ /***********************
+ * package bwp
+ **********************/
+ grouping bwp-flow-g {
+ leaf rank {
+ type mef-common-types:positive-integer;
+ description "This attribute denotes the rank of the bandwidth profile flow in the envelope.";
+ }
+ leaf cir {
+ type mef-common-types:natural-number;
+ description "This attribute denotes the Committed Information Rate that limits the average rate of frames that will be declared Green. In bits per second.";
+ }
+ leaf cir-max {
+ type mef-common-types:natural-number;
+ description "This attribute denotes the maximum Committed Information Rate that limits the rate of tokens added to the committed token bucket. In bits per second.";
+ }
+ leaf cbs {
+ type mef-common-types:natural-number;
+ description "This attribute denotes the Committed Burst Size that limits the maximum number of bytes available for a burst of frames that will be declared Green, in bytes,";
+ }
+ leaf eir {
+ type mef-common-types:natural-number;
+ description "This attribute denotes the Excess Information Rate that limits the average rate of frames that will be declared Yellow, in bits per second.";
+ }
+ leaf eir-max {
+ type mef-common-types:natural-number;
+ description "This attribute denotes the Maximum Excess Information Rate that Limits the rate of tokens added to the excess token bucket, in bits per second.";
+ }
+ leaf ebs {
+ type mef-common-types:natural-number;
+ description "This attribute denotes the Excessive Burst Size that limits the maximum number of bytes available for a burst of frames that will be declared Yellow, in bytes.";
+ }
+ leaf coupling-flag {
+ type boolean;
+ description "This attribute denotes the Coupling Flag that Determines if overflow Green tokens can be used as Yellow tokens. FALSE for 0 (overflow green tokens are discarded) and TRUE for 1 (overflow green tokens can be used as yellow tokens)";
+ }
+ leaf color-mode {
+ type mef-common-types:color-mode;
+ description "This attribute denotes the Color Mode that Indicates whether the Color Identifier of the frame is considered by the Bandwidth Profile Algorithm.";
+ }
+ leaf token-request-offset {
+ type mef-common-types:natural-number;
+ description "This attribute adjusts the number of tokens requested for each external interface frame.";
+ }
+ description "The BwpFlow object class represents the Bandwidth Profile Flow which includes the bandwidth profile parameters such as CIR, CIR Max, EIR, EIR Max, CBS, EBS, Coupling Flag, Color Mode, etc. The BwpFlow object class is associated with OperatorUni, ServiceProviderUni, VUNI, CosIdentifier, EecIdentifier, and Envelope, etc. ";
+ }
+ grouping envelope-g {
+ leaf envelope-id {
+ type mef-common-types:identifier45;
+ description "This attribute is a string that identifies the Envelope.";
+ }
+ leaf coupling-flag-for-index-zero {
+ type boolean;
+ description "This attribute denotes the coupling flag for index zero. FALSE for NO and TRUE for YES (overflow Green tokens can be used as Yellow tokens)";
+ }
+ description "The Envelope object class represents the UNI/ENNI service attribute Envelope, which is a bandwidth profile parameter that consists of an envelope ID and an envelope coupling flag (0) that controls conversion of unused green tokens into yellow tokens in the bandwidth profile algorithm. The Envelope object class is associated with UNI (via OperatorUni or ServiceProviderUni), ENNI (via EnniService), and BwpFlow(s), etc. ";
+ }
+
+ /***********************
+ * package color-identifier
+ **********************/
+ grouping color-identifier-g {
+ leaf color-field-type {
+ type mef-common-types:color-field-type;
+ description "This attribute determines which conditional package (among EVC/OVC End Point, PCP, DEI or DSCP) to be used as the Color Identifier.";
+ }
+ container sep-color-pac {
+ uses sep-color-id-pac-g;
+ description "This attribute represents the relationship between the ColorIdentifier and the SepColorIdPac (representing the choice that maps EVC End Point or OVC End Point to Color).";
+ }
+ container dei-color-pac {
+ uses dei-color-id-pac-g;
+ description "This attribute represents the relationship between the ColorIdentifier and the DeiColorIdPac (representing the choice that maps Vlan tag DEI to Color).";
+ }
+ container pcp-color-pac {
+ uses pcp-color-id-pac-g;
+ description "This attribute represents the relationship between the ColorIdentifier and the PcpColorIdPac (representing the choice that maps Vlan tag PCPs to Color).";
+ }
+ list dcsp-color-pac {
+ key 'ip-version';
+ max-elements 2;
+ uses dscp-color-id-pac-g;
+ description "This attribute represents the relationship between the ColorIdentifier and the DscpColorIdPac (representing the choice that maps DSCP values to Color).";
+ }
+ description "The ColorIdentifier object class represents the Color Identifier. The Color Identifier is a pair of the form <F, M> where F is a field in the ingress EI Frame and M is a mapping between each possible value of the field F and a Color. The ColorIdentifier object class is associated with CarrierEthernetServiceEndPoint (EvcEndPoint or OvcEndPoint), in addition to the different field F, such as SepColorIdPac, PcpColorIdPac, DeiColorIdPac, and DscpColorIdPac, etc.";
+ }
+ grouping dei-color-id-pac-g {
+ description "The DeiColorIdPac object class represents the Color Identifier that maps the vlan tag (S tag or C tag) DEI value to Color, DEI=0 for green color and DEI=1 for yellow color. For an EVC End Point or an OVC End Point at UNI or in a VUNI, the DEI value is from C-Tag ingress EI frames. For an OVC End Point at an ENNI and not in a VUNI, the DEI value is from S-Tag of the ingress EI frames. ";
+ }
+ grouping dscp-color-id-pac-g {
+ leaf ip-version {
+ type mef-common-types:ip-version;
+ description "This attribute denotes which IP version is used. It can be IPV4, IPV6 or IPV4_AND_IPV6.";
+ }
+ leaf-list dscp-value-for-green-list {
+ type mef-common-types:natural-number;
+ max-elements 64;
+ description "This attribute provides a list DSCP values map to the green ingress EI frames. The dscpValueForGreenList and the dscpValueForYellowList must disjoint and the union of the two lists must include all possible DSCP values.";
+ }
+ leaf-list dscp-value-for-yellow-list {
+ type mef-common-types:natural-number;
+ max-elements 64;
+ description "This attribute provides a list DSCP values map to the yellow ingress EI frames. The dscpValueForGreenList and the dscpValueForYellowList must disjoint and the union of the two lists must include all possible DSCP values.";
+ }
+ description "The DscpColorIdPac object class represents the Color Identifier that maps DSCP (IPv4 or IPv6) values to Color.";
+ }
+ grouping pcp-color-id-pac-g {
+ leaf-list pcp-value-for-green-list {
+ type mef-common-types:natural-number;
+ max-elements 8;
+ description "This attribute provides a list PCP values map to the green ingress EI frames. The pcpValueForGreenList and the pcpValueForYellowList must disjoint and the union of the two lists must include all possible PCP values. ";
+ }
+ leaf-list pcp-value-for-yellow-list {
+ type mef-common-types:natural-number;
+ max-elements 8;
+ description "This attribute provides a list PCP values map to the yellow ingress EI frames. The pcpValueForGreenList and the pcpValueForYellowList must disjoint and the union of the two lists must include all possible PCP values. ";
+ }
+ description "The PcpColorIdPac object class represents the Color Identifier that maps vlan tag (S tag or C tag) PCP values to Color. For an EVC End Point or an OVC End Point at UNI or in a VUNI, the PCP values are from C-Tag ingress EI frames. For an OVC End Point at an ENNI and not in a VUNI, the PCP values are from S-Tag of the ingress EI frames. ";
+ }
+ grouping sep-color-id-pac-g {
+ leaf color {
+ type mef-common-types:frame-color;
+ description "This attribute denotes the color of the EI frame, green or yellow.";
+ }
+ description "The SepColorIdPac represents the Color Identifier that maps to the EVC End Point or the OVC End Point to Color.";
+ }
+
+ /***********************
+ * package cos-identifier
+ **********************/
+ grouping cos-identifier-g {
+ leaf cos-name {
+ type string;
+ description "This attribute denotes the Class of Service name that the CosIdentifier map to.";
+ }
+ list l2cp-protocol-list {
+ key 'l2cp-protocol-type';
+ uses mef-common-types:l2cp-protocol-g;
+ description "This attribute lists the L2CP Protocols that map to the Class of Service Name.";
+ }
+ container sep-cos-id-pac {
+ uses sep-cos-id-pac-g;
+ description "This attribute represents the relationship between the CosIdentifier and the SepCosIdPac when the cosMappingType of EvcEndPoint or OvcEndPoint is END_POINT and the cosName is not only for L2CP.";
+ }
+ container pcp-cos-id-pac {
+ uses pcp-cos-id-pac-g;
+ description "This attribute represents the relationship between the CosIdentifier and the PcpCosIdPac when the cosMappingType of EvcEndPoint or OvcEndPoint is PCP and the cosName is not only for L2CP.";
+ }
+ list dscp-cos-id-pac {
+ key 'ip-version';
+ max-elements 2;
+ uses dscp-cos-id-pac-g;
+ description "This attribute represents the relationship between the CosIdentifier and the DespCosIdPac when the cosMappingType of EvcEndPoint or OvcEndPoint is DSCP and the cosName is not only for L2CP.";
+ }
+ container ingress-bwp-per-cos {
+ uses bwp-flow-g;
+ description "This attribute represents the relationship between the CosIdentifier and the BwpFlow, for ingress bandwidth profile per CoS Name.";
+ }
+ description "The CosIdentifier object class represents the Class of Service Identifier. Each ingress EI Frame mapped to the given EVC/OVC End Point has a single Class of Service. The Class of Service can be determined from inspection of the content of the ingress EI Frame. It is associated with the SepCosIdPac, or the PcpCosIdPac, or the DscpCosIdPac (when the Class of Service Identifier mapping type is Service End Point, or PCP values, or DSCP values respectively). EI Frames of L2CP protocols may be identified by a Class of Service Identifier, mapping to specific CoS Name.";
+ }
+ grouping dscp-cos-id-pac-g {
+ leaf-list dscp-value-list {
+ type mef-common-types:natural-number;
+ min-elements 1;
+ max-elements 64;
+ description "This attribute is a list of DSCP values that maps to a CoS Name.";
+ }
+ leaf ip-version {
+ type mef-common-types:ip-version;
+ description "This attribute denotes the IP version for the DSCP. It can be IPV4, IPV6 or IPV4_AND_IPV6.";
+ }
+ description "The DscpCosIdPac object class represents CoS Identifier that maps the IP DSCP values to the Class of Service Name(s). It can map a list of DSCP values to two different Class of Service Names, one for ingress EI Frames carrying an IPv4 packet and a different one for ingress EI Frames carrying an IPv6 packet. It also can map a list of DSCP values (both IPv4 and IPv6) to one Class of Service Name.";
+ }
+ grouping pcp-cos-id-pac-g {
+ leaf-list pcp-value-list {
+ type mef-common-types:natural-number;
+ min-elements 1;
+ max-elements 8;
+ description "This attribute is a list of PCP values that map to the CoS Name. ";
+ }
+ description "The PcpCosIdPac object class represents CoS Identifier that maps a list of PCP values to a Class of Service Name. For an EVC End Point or an OVC End Point at UNI or in a VUNI, the PCP values are from C-Tag ingress EI frames. For an OVC End Point at an ENNI and not in a VUNI, the PCP values are from S-Tag of the ingress EI frames. ";
+ }
+ grouping sep-cos-id-pac-g {
+ description "The SepCosIdPac represents the CoS Identifier that maps the EVC End Point or the OVC End Point to a Class of Service Name. ";
+ }
+
+ /***********************
+ * package eec-identifier
+ **********************/
+ grouping dscp-eec-id-pac-g {
+ leaf ip-version {
+ type mef-common-types:ip-version;
+ description "This attribute specifies the IP version for the DSCP. It can be IPV4, IPV6 or IPV4_AND_IPV6.";
+ }
+ leaf-list dscp-value-list {
+ type mef-common-types:natural-number;
+ min-elements 1;
+ max-elements 64;
+ description "This attribute is a list of DSCP values that maps to the EEC Name. ";
+ }
+ description "The DscpEecIdPac object class represents Egress Equivalence Class Identifier that maps the IP DSCP values to the Egress Equivalence Class Name(s). It can map a list of DSCP values to two different Egress Equivalence Class Names, one for ingress EI Frames carrying an IPv4 packet and a different one for ingress EI Frames carrying an IPv6 packet. It also can map a list of DSCP values (both IPv4 and IPv6 packets) to an Egress Equivalence Class Name.";
+ }
+ grouping eec-identifier-g {
+ leaf eec-name {
+ type string;
+ description "This attribute denotes the Egress Equivalence Class Name that the EecIdentifier maps to.";
+ }
+ list l2cp-protocol-list {
+ key 'l2cp-protocol-type';
+ uses mef-common-types:l2cp-protocol-g;
+ description "This attribute lists the L2CP Protocols that map to the Egress Equivalence Class Name.";
+ }
+ container sep-eec-id-pac {
+ uses sep-eec-id-pac-g;
+ description "This attribute represents the relationship between the EecIdentifier and a SepEecIdPac when the eecMappingType of EvcEndPoint or OvcEndPoint is END_POINT and the eecName is not only for L2CP. This not addressed in MEF 10.3 but can be future consideration.";
+ }
+ container pcp-eec-id-pac {
+ uses pcp-eec-id-pac-g;
+ description "This attribute represents the relationship between the EecIdentifier and a PcpEecIdPac when the eecMappingType of EvcEndPoint or OvcEndPoint is PCP and the eecName is not only for L2CP.";
+ }
+ list dscp-eec-id-pac {
+ key 'ip-version';
+ max-elements 2;
+ uses dscp-eec-id-pac-g;
+ description "This attribute represents the relationship between the EecIdentifier and a DscpEecIdPac when the eecMappingType of EvcEndPoint or OvcEndPoint is DSCP and the eecName is not only for L2CP.";
+ }
+ container egress-bwp-per-eec {
+ uses bwp-flow-g;
+ description "This attribute represents the relationship between the EecIdentifier and the BwpFlow, for egress bandwidth profile per EEC Name.";
+ }
+ description "The EecIdentifier object class represents the Egress Equivalence Class Identifier. Each egress EI Frame mapped to the given EVC/OVC End Point has a single Egress Equivalence Class.
+The Egress Equivalence Class can be determined from inspection of the content of the egress EI Frame. It is associated with the SepCosIdPac, or the PcpCosIdPac, or the DscpCosIdPac (representing mapping to EVC/OVC End Point, or PCP, or DSCP respectively). EI Frames of L2CP protocols may be identified by an Egress Equivalence Class Identifier, mapping to specific Egress Equivalence Class Name.";
+ }
+ grouping pcp-eec-id-pac-g {
+ leaf-list pcp-value-list {
+ type mef-common-types:natural-number;
+ min-elements 1;
+ max-elements 8;
+ description "This attribute provides a list of PCP values that map to the Egress Equivalence Class Name.";
+ }
+ description "The PcpEecIdPac object class represents Egress Equivalence Class Identifier that maps a list of PCP values to Egress Equivalence Class Name. For an EVC End Point or an OVC End Point at UNI or in a VUNI, the PCP values are from C-Tag egress EI frames. For an OVC End Point at an ENNI and not in a VUNI, the PCP values are from S-Tag of the egress EI frames";
+ }
+ grouping sep-eec-id-pac-g {
+ description "The SepEecIdPac represents the Egress Equivalence Class Identifier that maps the EVC End Point or the OVC End Point to an Egress Equivalence Class Name.";
+ }
+
+ /***********************
+ * package egress-map
+ **********************/
+ grouping cos-name-and-color-to-dei-pac-g {
+ leaf ingress-cos-name {
+ type string;
+ description "This attribute denotes the ingress CoS name.";
+ }
+ leaf ingress-color {
+ type mef-common-types:frame-color;
+ description "This attribute denotes the ingress frame color as one of the determined factor for Egress Map. ";
+ }
+ leaf dei-value {
+ type mef-common-types:dei-or-discard;
+ description "This attribute denotes the egress frame DEI value, mapped from ingress CoS Name and ingress frame color. ";
+ }
+ description "The CosNameAndColorToDeiPac object class represents the Egress Map that maps from CoS Name and Ingress Color to DEI.";
+ }
+ grouping cos-name-and-color-to-pcp-pac-g {
+ leaf ingress-cos-name {
+ type string;
+ description "This attribute denotes the ingress CoS name.";
+ }
+ leaf ingress-color {
+ type mef-common-types:frame-color;
+ description "This attribute denotes the ingress frame color as one of the determined factor for Egress Map. ";
+ }
+ leaf pcp-value {
+ type mef-common-types:pcp-or-discard;
+ description "This attribute denotes the egress frame PCP value, mapped from ingress CoS name and ingress frame color. ";
+ }
+ description "The CosNameAndColorToPcpPac object class represents the Egress Map that maps from CoS Name and Ingress Color to PCP.";
+ }
+ grouping cos-name-to-pcp-pac-g {
+ leaf ingress-cos-name {
+ type string;
+ description "This attribute denotes the ingress CoS name.";
+ }
+ leaf pcp-value {
+ type mef-common-types:pcp-or-discard;
+ description "This attribute denotes the egress frame PCP value, mapped from ingress CoS Name and ingress frame color. ";
+ }
+ description "The CosNameToPcpPac object class represents the Egress Map that maps from CoS Name to PCP.";
+ }
+ grouping egress-map-g {
+ leaf egress-map-type {
+ type mef-common-types:egress-map-type;
+ description "This attribute determines which form to take to apply for egress frame color indication, among CoS name and Ingress Color to C-Tag PCP, or CoS name and Ingress Color to S-Tag PCP, or CoS Name and Ingress Color to C-Tag DEI, or CoS Name and Ingress Color to S-Tag DEI, or CoS Name to C-Tag PCP, or CoS Name to S-Tag PCP.";
+ }
+ list cos-name-and-color-to-dei-pac-list {
+ key 'ingress-cos-name ingress-color';
+ uses cos-name-and-color-to-dei-pac-g;
+ description "This attribute represents the relationship between the EgressMap and the CosNameAndColorToDeiPac (representing the attribute set for using CoS Name and ingress color to egress DEI mapping).";
+ }
+ list cos-name-to-pcp-pac-list {
+ key 'ingress-cos-name';
+ uses cos-name-to-pcp-pac-g;
+ description "This attribute represents the relationship between the EgressMap and the CosNameToPcpPac (representing the attribute set for using CoS Name to egress PCP mapping).";
+ }
+ list cos-name-and-color-to-pcp-pac-list {
+ key 'ingress-color';
+ uses cos-name-and-color-to-pcp-pac-g;
+ description "This attribute represents the relationship between the EgressMap and the CosNameAndColorToPcpPac (representing the attribute set for using CoS Name and ingress color to egress PCP mapping).";
+ }
+ description "The EgressMap object class represents the Egress Map that is a set of mappings that determine the content of the S-Tag or C-Tag of an egress EI Frame. It is associated with EvcEndPoint or OvcEndPoint.";
+ }
+
+
+ /***********************
+ * package associations
+ **********************/
+
+}
--- /dev/null
+module mef-common-types {
+ namespace "urn:mef:yang:MEF_Types";
+ prefix mef-common-types;
+ organization "Metro Ethernet Forum (MEF)";
+ contact "MEF";
+ description "none";
+ revision 2017-05-31 {
+ description "MEF NRP 1.0.alpha";
+ reference "ONF-TR-527, ONF-TR-512, ONF-TR-531, RFC 6020 and RFC 6087";
+ }
+ /***********************
+ * package type-definitions
+ **********************/
+ typedef admin-state {
+ type enumeration {
+ enum unlocked {
+ description "The resource is administratively permitted to perform services for its users.";
+ }
+ enum locked {
+ description "The resource is administratively prohibited from performing services for its users.";
+ }
+ }
+ description "This enumeration is for Administrative states. Refer to ITU-T X.731.";
+ }
+ grouping agg-link-depth-g {
+ container vlan-id {
+ uses vlan-id-g;
+ description "The ingress frame Vlan ID. ";
+ }
+ leaf link-depth {
+ type positive-integer;
+ description "The number of links for the aggregation link.";
+ }
+ description "This is a pair of <VLAN ID, link depth> indicating that a given VLAN ID maps to a given number of links in the Port Conversation ID to Aggregation Link Map.";
+ }
+ typedef available-meg-level {
+ type enumeration {
+ enum none {
+ description "Indicates that SOAM EI Frames are not guaranteed to pass over this OVC at any MEG Level.";
+ }
+ enum 0 {
+ description "none";
+ }
+ enum 1 {
+ description "none";
+ }
+ enum 2 {
+ description "none";
+ }
+ enum 3 {
+ description "none";
+ }
+ enum 4 {
+ description "none";
+ }
+ enum 5 {
+ description "none";
+ }
+ enum 6 {
+ description "none";
+ }
+ enum 7 {
+ description "none";
+ }
+ }
+ description "This enumeration is for available MEG level, can be either NONE or value 0..7. NONE indicates that SOAM EI Frames are not guaranteed to pass over at any MEG Level.";
+ }
+ typedef color-field-type {
+ type enumeration {
+ enum pcp {
+ description "Using PCP field to map to the color.";
+ }
+ enum dei {
+ description "Using DEI field to map to the color.";
+ }
+ enum end-point {
+ description "Using EVC End Point or the OVC End Point to map to the color.";
+ }
+ enum dscp {
+ description "Using DSCP field to map to the color.";
+ }
+ }
+ description "This enumeration is for selecting which frame field being used for color indication.";
+ }
+ typedef color-mode {
+ type enumeration {
+ enum color-aware {
+ description "none";
+ }
+ enum color-blind {
+ description "none";
+ }
+ }
+ description "This enumeration indicates whether the Color Identifier of the Service Frame is considered by the Bandwidth Profile Algorithm.";
+ }
+ typedef connection-type {
+ type enumeration {
+ enum point-to-point {
+ description "none";
+ }
+ enum multipoint {
+ description "none";
+ }
+ enum rooted-multipoint {
+ description "none";
+ }
+ }
+ description "This is for EVC or OVC connection types, including point to point, multi-point and rooted multi-point.";
+ }
+ grouping conversation-id-to-aggregation-link-map-g {
+ leaf conversation-id {
+ type natural-number;
+ description "The conversation ID is a Vlan ID or 0 for untagged or priority tagged frame.. ";
+ }
+ leaf-list link-id-list {
+ type natural-number;
+ min-elements 1;
+ description "The link ID of the aggregation link.";
+ }
+ description "This is a Port Conversation ID to Aggregation Link Map as defined in IEEE Std 802.1AX – 2014.";
+ }
+ typedef cos-or-eec-mapping-type {
+ type enumeration {
+ enum end-point {
+ description "Using EVC End Point or OVC End Point to map to the CoS Name as CoS ID.";
+ }
+ enum pcp {
+ description "Using PCP field to map to the CoS Name as CoS ID.";
+ }
+ enum dscp {
+ description "Using DSCP field to map to the CoS Name as CoS ID.";
+ }
+ }
+ description "This lists the Class of Service identifier type, or the Equivalence Class Identifier type. ";
+ }
+ typedef dei-or-discard {
+ type enumeration {
+ enum discard {
+ description "Discard the egress frame when the Egress Map determines based on CoS Name (and ingress Color).";
+ }
+ enum 0 {
+ description "Set egress frame DEI field to be 0 when the Egress Map determines based on CoS Name (and ingress Color).";
+ }
+ enum 1 {
+ description "Set egress frame DEI field to be 1 when the Egress Map determines based on CoS Name (and ingress Color).";
+ }
+ }
+ description "This lists the DEI value for color or discard, used for Egress Map.";
+ }
+ typedef egress-map-type {
+ type enumeration {
+ enum cn-c-tag-pcp {
+ description "CoS Name to C-Tag PCP egress map type";
+ }
+ enum cc-c-tag-pcp {
+ description "CoS Name and Color to C-Tag PCP egress map type";
+ }
+ enum cc-c-tag-dei {
+ description "CoS Name and Color to C-Tag DEI egress map type";
+ }
+ enum cn-s-tag-pcp {
+ description "CoS Name to S-Tag PCP egress map type";
+ }
+ enum cc-s-tag-pcp {
+ description "CoS Name and Color to S-Tag PCP egress map type";
+ }
+ enum cc-s-tag-dei {
+ description "CoS Name and Color to S-Tag DEI egress map type";
+ }
+ }
+ description "This lists the Egress Map types, either CoS Name to PCP, or CoS Name and Ingress Color to PCP, or CoS Name and Ingress Color to DEI for S-Tag or C-Tag.";
+ }
+ typedef ethernet-frame-format {
+ type enumeration {
+ enum ethernet {
+ description "none";
+ }
+ }
+ description "This is a single value read only attribute. Keep this in the info model just because MEF 10.3 lists it as a service attribute.";
+ }
+ typedef evc-end-point-role {
+ type enumeration {
+ enum root {
+ description "EVC End Point has role of root for the EVC.";
+ }
+ enum leaf {
+ description "EVC End Point has role of leaf for the EVC.";
+ }
+ }
+ description "The value indicates how external interface frames mapped to the EVC End Point can be forwarded.";
+ }
+ typedef frame-color {
+ type enumeration {
+ enum green {
+ description "none";
+ }
+ enum yellow {
+ description "none";
+ }
+ }
+ description "Frame color is either Green or Yellow.";
+ }
+ typedef frame-delivery {
+ type enumeration {
+ enum discard {
+ description "Frame must be discarded.";
+ }
+ enum conditionally {
+ description "Frame will be delivered with specified condition.";
+ }
+ enum unconditionally {
+ description "Frame will be delivered unconditionally.";
+ }
+ }
+ description "Service frame delivery defined in MEF 10.3. When the value is conditionally, the specific condition has to be addresses by the users. What conditions should be supported are not in the scope.";
+ }
+ typedef identifier45 {
+ type string;
+ description "Unique by network administrative domain, containing no more than 45 characters and non-null RFC Display String but not contain the characters 0x00 through 0x1f.";
+ }
+ typedef identifier90 {
+ type string;
+ description "Unique by network administrative domain, containing no more than 90 characters and non-null RFC Display String but not contain the characters 0x00 through 0x1f.";
+ }
+ typedef interface-resiliency {
+ type enumeration {
+ enum none {
+ description "none";
+ }
+ enum 2-link-active-standby {
+ description "none";
+ }
+ enum all-active {
+ description "none";
+ }
+ enum other {
+ description "none";
+ }
+ }
+ description "The method for protection, if any, against a physical link failure. Refer to MEF 10.3.2 and MEF 26.2.";
+ }
+ typedef ip-version {
+ type enumeration {
+ enum ipv4 {
+ description "none";
+ }
+ enum ipv6 {
+ description "none";
+ }
+ enum ipv4-and-ipv6 {
+ description "none";
+ }
+ }
+ description "This enumeration lists the IP versions, including IPv4, IPv6 and both.";
+ }
+ typedef l2cp-address-set {
+ type enumeration {
+ enum cta {
+ description "CE-Vlan Tag Aware";
+ }
+ enum ctb {
+ description "CE-Vlan Tag Blind";
+ }
+ enum ctb2 {
+ description "CE-Vlan Tag Blind option 2";
+ }
+ }
+ description "This lists the L2CP Address Set. Refer to MEF 45.";
+ }
+ grouping l2cp-peering-g {
+ container protocol-id {
+ uses l2cp-protocol-g;
+ description "This is a L2CP Protocol Identifier.";
+ }
+ leaf destination-address {
+ type natural-number;
+ description "This is a Mac Address.";
+ }
+ leaf-list link-id-list {
+ type positive-integer;
+ description "It is possible that a protocol (e.g. ESMC) could operate on some, but not all, of the physical
+ links. When linkId is not listed, the protocol peering applies to all members of the aggregation link.";
+ }
+ description "This is a list specifies the L2CP Protocol Identifier and the Destination Address in use by the protocol entity.";
+ }
+ grouping l2cp-protocol-g {
+ leaf l2cp-protocol-type {
+ type l2cp-protocol-type;
+ description "This attribute specifies the type of L2CP protocol, i.e., LLC or EtherType.";
+ }
+ leaf llc-address-or-ether-type {
+ type natural-number;
+ description "This attribute specifies the LLC address or the EtherType value.";
+ }
+ leaf sub-type {
+ type natural-number;
+ description "This attribute specifies the subtype of the L2CP protocol.";
+ }
+ description "This data type defines a L2CP protocol (LLC address type or EtherType) with possible subtype.";
+ }
+ typedef l2cp-protocol-type {
+ type enumeration {
+ enum ethertype {
+ description "EtherType for L2CP, e.g., LLDP (0x88CC).";
+ }
+ enum llc {
+ description "Logical Link Control sublayer address for L2CP, e.g., STP (0x42).";
+ }
+ }
+ description "This lists the L2CP protocol types, either EtherType, or LLC Address.";
+ }
+ typedef mep-direction {
+ type enumeration {
+ enum down {
+ description "none";
+ }
+ enum up {
+ description "none";
+ }
+ }
+ description "This is for MEP direction, either Down MEP or Up MEP.";
+ }
+ grouping mep-level-and-direction-g {
+ leaf level {
+ type natural-number;
+ description "This is the MEG level, value between 0..7.";
+ }
+ leaf direction {
+ type mep-direction;
+ description "This is MEP direction, UP or DOWN.";
+ }
+ description "This complex data type includes MEG LEVEL and MEP direction.";
+ }
+ typedef natural-number {
+ type int64;
+ description "An integer >=0";
+ }
+ typedef operational-state {
+ type enumeration {
+ enum enabled {
+ description "none";
+ }
+ enum disabled {
+ description "none";
+ }
+ }
+ description "This enumeration is for Operational states. Refer to ITU-T X.731.";
+ }
+ typedef ovc-end-point-map-form {
+ type enumeration {
+ enum form-e {
+ description "OVC End Point Map for ENNI.";
+ }
+ enum form-v {
+ description "OVC End Point Map for VUNI.";
+ }
+ enum form-u {
+ description "OVC End Point Map for UNI.";
+ }
+ enum form-t {
+ description "OVC End Point Map for Trunk.";
+ }
+ }
+ description "The OVC End Point Map types, for ENNI (FORM E), for UNI (FORM U), for VUNI (FORM V), or for Trunk (FORM T).";
+ }
+ typedef ovc-end-point-role {
+ type enumeration {
+ enum root {
+ description "OVC End Point has role of root for the OVC.";
+ }
+ enum leaf {
+ description "OVC End Point has role of leaf for the OVC.";
+ }
+ enum trunk {
+ description "OVC End Point has role of trunk for the OVC.";
+ }
+ }
+ description "The value indicates how external interface frames mapped to the OVC End Point can be forwarded.";
+ }
+ typedef pcp-or-discard {
+ type enumeration {
+ enum discard {
+ description "none";
+ }
+ enum 0 {
+ description "none";
+ }
+ enum 1 {
+ description "none";
+ }
+ enum 2 {
+ description "none";
+ }
+ enum 3 {
+ description "none";
+ }
+ enum 4 {
+ description "none";
+ }
+ enum 5 {
+ description "none";
+ }
+ enum 6 {
+ description "none";
+ }
+ enum 7 {
+ description "none";
+ }
+ }
+ description "This enumeration lists one of PCP values or DISCARD.";
+ }
+ typedef percentage {
+ type int64;
+ description "Data type for percentage, 0%-100%.";
+ }
+ typedef physical-layer {
+ type enumeration {
+ enum 10base2 {
+ description "none";
+ }
+ enum 10base5 {
+ description "none";
+ }
+ enum 10base-f {
+ description "none";
+ }
+ enum 10base-fb {
+ description "none";
+ }
+ enum 10base-fl {
+ description "none";
+ }
+ enum 10base-fp {
+ description "none";
+ }
+ enum 10base-t {
+ description "none";
+ }
+ enum 10base-te {
+ description "none";
+ }
+ enum 10broad36 {
+ description "none";
+ }
+ enum 10pass-ts {
+ description "none";
+ }
+ enum 100base-bx10 {
+ description "none";
+ }
+ enum 100base-fx {
+ description "none";
+ }
+ enum 100base-lx10 {
+ description "none";
+ }
+ enum 100base-t {
+ description "none";
+ }
+ enum 100base-t2 {
+ description "none";
+ }
+ enum 100base-t4 {
+ description "none";
+ }
+ enum 100base-tx {
+ description "none";
+ }
+ enum 100base-x {
+ description "none";
+ }
+ enum 1000base-bx10 {
+ description "none";
+ }
+ enum 1000base-cx {
+ description "none";
+ }
+ enum 1000base-kx {
+ description "none";
+ }
+ enum 1000base-lx {
+ description "none";
+ }
+ enum 1000base-lx10 {
+ description "none";
+ }
+ enum 1000base-px10 {
+ description "none";
+ }
+ enum 1000base-px20 {
+ description "none";
+ }
+ enum 1000base-sx {
+ description "none";
+ }
+ enum 1000base-t {
+ description "none";
+ }
+ enum 1000base-x {
+ description "none";
+ }
+ enum 10gbase-cx4 {
+ description "none";
+ }
+ enum 10gbase-e {
+ description "none";
+ }
+ enum 10gbase-er {
+ description "none";
+ }
+ enum 10gbase-ew {
+ description "none";
+ }
+ enum 10gbase-kr {
+ description "none";
+ }
+ enum 10gbase-kx4 {
+ description "none";
+ }
+ enum 10gbase-l {
+ description "none";
+ }
+ enum 10gbase-lr {
+ description "none";
+ }
+ enum 10gbase-lrm {
+ description "none";
+ }
+ enum 10gbase-lw {
+ description "none";
+ }
+ enum 10gbase-lx4 {
+ description "none";
+ }
+ enum 10gbase-pr {
+ description "none";
+ }
+ enum 10gbase-prx {
+ description "none";
+ }
+ enum 10gbase-r {
+ description "none";
+ }
+ enum 10gbase-s {
+ description "none";
+ }
+ enum 10gbase-sr {
+ description "none";
+ }
+ enum 10gbase-sw {
+ description "none";
+ }
+ enum 10gbase-t {
+ description "none";
+ }
+ enum 10gbase-w {
+ description "none";
+ }
+ enum 10gbase-x {
+ description "none";
+ }
+ enum 100gbase-r {
+ description "none";
+ }
+ enum 100gbase-cr10 {
+ description "none";
+ }
+ enum 100gbase-er4 {
+ description "none";
+ }
+ enum 100gbase-lr4 {
+ description "none";
+ }
+ enum 100gbase-sr10 {
+ description "none";
+ }
+ enum 40gbase-r {
+ description "none";
+ }
+ enum 40gbase-cr4 {
+ description "none";
+ }
+ enum 40gbase--fr {
+ description "none";
+ }
+ enum 40gbase-kr4 {
+ description "none";
+ }
+ enum 40gbase-lr4 {
+ description "none";
+ }
+ enum 40gbase-sr4 {
+ description "none";
+ }
+ enum 1base5 {
+ description "none";
+ }
+ enum 2base-tl {
+ description "none";
+ }
+ enum 1g-epon {
+ description "none";
+ }
+ enum 10g-epon {
+ description "none";
+ }
+ enum 10-1g-epon {
+ description "none";
+ }
+ enum 10-10g-epon {
+ description "none";
+ }
+ enum other {
+ description "none";
+ }
+ enum none {
+ description "none";
+ }
+ }
+ description "IEEE802.3 (2012) defined list excluding 1000BASE-PX-D and 1000BASE-PX-U. NONE is added with further MEF 10.3 discussion, for supporting logical interfaces.";
+ }
+ grouping physical-layer-per-link-g {
+ leaf link-id {
+ type natural-number;
+ description "This is the link ID.";
+ }
+ leaf physical-layer {
+ type physical-layer;
+ description "This is the physical layer. IEEE802.3 (2012) defined.";
+ }
+ description "A link may consist of one or more physical ports. This data type includes the link ID and the physical port associated to the link Id.";
+ }
+ typedef pm-metric-type {
+ type enumeration {
+ enum fd {
+ description "Frame Delay Performance Metric.";
+ }
+ enum fdr {
+ description "Frame Delay Range Performance Metric.";
+ }
+ enum mfd {
+ description "Mean Frame Delay Performance Metric.";
+ }
+ enum ifdv {
+ description "Inter Frame Delay Variation Performance Metric.";
+ }
+ enum flr {
+ description "Frame Loss Ratio Performance Metric.";
+ }
+ enum av {
+ description "Availability Performance Metric.";
+ }
+ enum hli {
+ description "High Loss Interval Performance Metric.";
+ }
+ enum chli {
+ description "Consecutive High Loss Interval Performance Metric.";
+ }
+ enum group-av {
+ description "Group Availability (for a single EVC/OVC) Performance Metric.";
+ }
+ enum cpm {
+ description "Composite Performance Metric. Refer to MEF 10.3.1.";
+ }
+ }
+ description "This enumeration provides the list of PM Metric types, including FD, MFD, FDR, IFDV, FLR, AV, HLI, CHLI, GROUP_AV, and CPM.";
+ }
+ typedef pm-unit {
+ type enumeration {
+ enum millisecond {
+ description "Measured Performance Metric in PM report as milliseconds, for FD, FDR, IFDV, and MFD.";
+ }
+ enum count {
+ description "Measured Performance Metric in PM report as count number, for HLI and CHLI.";
+ }
+ enum percent {
+ description "Measured Performance Metric in PM report as percentage, for FLR, Availability, Group Availability and Composite PM.";
+ }
+ }
+ description "PM Unit, used for pairing with Value in data type PmUnitAndValue. Can be second, millisecond, micro second, etc. ";
+ }
+ grouping pm-unit-and-value-g {
+ leaf pm-unit {
+ type pm-unit;
+ description "This attribute denotes the 'unit', e.g., MILLISECOND, COUNT or PERCENT.";
+ }
+ leaf delay-value {
+ type uint64;
+ description "This attribute denotes the delay value only when the PmUnit=SECOND. It is for FD, FDR, MFD, IFDV.";
+ }
+ leaf count-value {
+ type natural-number;
+ description "This attribute denotes the count value only when the PmUnit=COUNT. It is for HLI and CHLI.";
+ }
+ leaf percent-value {
+ type percentage;
+ description "This attribute denotes the percentage value only when the PmUnit=PERCENT. It is for FLR, AV, GROUP_AV and CPM.";
+ }
+ description "This data type provides the pair of <unit, value> where the unit can be ms (for frame delay), number (for HLI), and value is the correspondent value for that unit.";
+ }
+ typedef positive-integer {
+ type int64;
+ description "An integer >0";
+ }
+ typedef service-state {
+ type enumeration {
+ enum pending {
+ description "none";
+ }
+ enum active {
+ description "none";
+ }
+ enum inactive {
+ description "none";
+ }
+ }
+ description "This enumeration is for Service State.";
+ }
+ grouping source-mac-address-limit-g {
+ leaf limit {
+ type natural-number;
+ description "This attribute denotes the maximum acceptable source MAC addresses.";
+ }
+ leaf time-interval {
+ type natural-number;
+ description "This attribute denotes the time interval in milliseconds.";
+ }
+ description "This limits the number of source MAC Addresses that can be used in ingress external interface frames mapped to the End Point of all types over a time interval.";
+ }
+ typedef svlan-id-control {
+ type enumeration {
+ enum full {
+ description "Operator can support only a single SP/SO (Service Provider/Super Operator) at the ENNI.";
+ }
+ enum partial {
+ description "Operator can support only multiple SP/SO (Service Provider/Super Operator) at the ENNI";
+ }
+ }
+ description "This lists the S Vlan ID Control, either FULL or PARTIAL.";
+ }
+ grouping sync-mode-per-link-g {
+ leaf link-id {
+ type natural-number;
+ description "This is the link ID of the link in the Aggregation Link.";
+ }
+ leaf sync-mode-enabled {
+ type boolean;
+ description "This attribute denotes whether the Synchronous Mode is enabled (on the link with the Link ID).";
+ }
+ description "A link may consist of one or more physical ports. This data type includes the link ID and the sync mode of the physical port associated to the link Id.";
+ }
+ typedef tagged-l2cp-processing {
+ type enumeration {
+ enum 802-1-compliant {
+ description "none";
+ }
+ enum 802-1-non-compliant {
+ description "none";
+ }
+ }
+ description "Either 802.1 compliant or not. Refer to MEF 45.";
+ }
+ grouping time-and-date-g {
+ leaf year {
+ type positive-integer;
+ description "This denotes the year.";
+ }
+ leaf month {
+ type positive-integer;
+ description "This denotes the month.";
+ }
+ leaf day {
+ type positive-integer;
+ description "This denotes the day.";
+ }
+ leaf hour {
+ type natural-number;
+ description "This denotes the hour.";
+ }
+ leaf minute {
+ type natural-number;
+ description "This denotes the minute.";
+ }
+ leaf second {
+ type natural-number;
+ description "This denotes the second.";
+ }
+ description "This data type is for Time and Date in UTC.";
+ }
+ grouping time-interval-t-g {
+ leaf unit {
+ type time-interval-unit;
+ description "Month, week, day, hour, etc.";
+ }
+ leaf number {
+ type positive-integer;
+ description "This denotes the value (for the unit), e.g., 1 (month), 20 (day), etc.";
+ }
+ description "Time interval T for PM. E.g., 1 month, 20 days, 2 weeks, etc.";
+ }
+ typedef time-interval-unit {
+ type enumeration {
+ enum year {
+ description "none";
+ }
+ enum month {
+ description "none";
+ }
+ enum week {
+ description "none";
+ }
+ enum day {
+ description "none";
+ }
+ enum hour {
+ description "none";
+ }
+ enum minute {
+ description "none";
+ }
+ enum second {
+ description "none";
+ }
+ }
+ description "Time interval unit, e.g., month, day, week, hour, etc.";
+ }
+ grouping vlan-id-g {
+ leaf vlan-id {
+ type positive-integer;
+ description "This is the Vlan ID value.";
+ }
+ description "This is for VLAN ID from 1 to 4094";
+ }
+ grouping vlan-id-listing-g {
+ leaf type {
+ type vlan-id-mapping-type;
+ description "Can be LIST, or ALL, or EXCEPT.";
+ }
+ list vlan-id-list {
+ key 'vlan-id';
+ uses vlan-id-g;
+ description "This is a list of Vlan IDs.";
+ }
+ description "The list VLAN IDs, either when type=LIST, or when type==EXCEPT (which means the VLAN IDs except the listed). When type=ALL, the vlanId list is not applicable.";
+ }
+ typedef vlan-id-mapping-type {
+ type enumeration {
+ enum all {
+ description "All Vlan IDs.";
+ }
+ enum except {
+ description "All Vlan IDs except the listed.";
+ }
+ enum list {
+ description "List of Vlan IDs.";
+ }
+ }
+ description "Vlan ID types, ALL for all vlan IDs, LIST for a list of Vlan IDs, EXCEPT for all Vlan IDs except the listed. ";
+ }
+ typedef vlan-id-preservation {
+ type enumeration {
+ enum preserve {
+ description "To achieve EVC CE-VLAN ID Preservation.";
+ }
+ enum retain {
+ description "C-Tag, if present, is encapsulated with the C-Tag VLAN ID value retained.";
+ }
+ enum strip {
+ description "C-Tag is discarded.";
+ }
+ }
+ description "This is for Vlan ID Preservation. Refer to MEF 26.2 section 12.7.";
+ }
+ typedef vlan-tag {
+ type enumeration {
+ enum s-tag {
+ description "none";
+ }
+ enum c-tag {
+ description "none";
+ }
+ }
+ description "This is for Vlan Tag type, i.e., S-tag or C-tag.";
+ }
+ grouping vlan-id-list-or-untag-g {
+ leaf type {
+ type vlan-id-mapping-type-or-untag;
+ description "none";
+ }
+ list vlan-id-list {
+ key 'vlan-id';
+ uses vlan-id-g;
+ description "none";
+ }
+ description "none";
+ }
+ typedef vlan-id-mapping-type-or-untag {
+ type enumeration {
+ enum all {
+ description "none";
+ }
+ enum except {
+ description "none";
+ }
+ enum list {
+ description "none";
+ }
+ enum untagged {
+ description "none";
+ }
+ }
+ description "Vlan ID types, ALL for all Vlan IDs, LIST for a list of Vlan IDs, EXCEPT for all Vlan IDs except the listed, UNTAGGED to indicate that untagged and priority-tagged frames are mapped to this end point.";
+ }
+
+}
import tapi-common {
prefix tapi-common;
}
- import tapi-connectivity {
- prefix tapi-connectivity;
+ import mef-common-types {
+ prefix mef-common-types;
+ }
+ import mef-common {
+ prefix mef-common;
}
organization "Metro Ethernet Forum (MEF)";
contact "MEF";
description "none";
- revision 2017-02-27 {
+ revision 2017-05-31 {
description "MEF NRP 1.0.alpha";
reference "ONF-TR-527, ONF-TR-512, ONF-TR-531, RFC 6020 and RFC 6087";
}
/***********************
* package main
- **********************/
+ **********************/
/***********************
* package object-classes
- **********************/
- grouping cg-eth-enni-spec {
- leaf max-frame-size {
- type natural-number;
- description "MEF 7.3: This value limits the length of frames carried by an OVC that associates an OVC End Point at this ENNI in bytes. It is one of the ENNI Operator Multi-lateral attributes, which requires the CENs at the ENNI-N to agree on the values but may allow these values to be different.";
- }
+ **********************/
+ grouping cg-eth-enni-spec-g {
container l2cp-peering-list {
- uses l2cp-peering;
+ uses mef-common-types:l2cp-peering-g;
description "MEF 7.3: This attribute represents the L2CP Peering Service defined in MEF 45 section 8.2 when applied to the ENNI. It is one of the ENNI Operator Multi-lateral attributes, which requires the CENs at the ENNI-N to agree on the values but may allow these values to be different.";
}
leaf tagged-l2cp-processing {
- type tagged-l2cp-processing;
+ type mef-common-types:tagged-l2cp-processing;
description "MEF 7.3: This attribute represents the Tagged L2CP Processing defined in MEF 45 section 8.3 (802.1 compliant or 802.1 non-compliant. Desired to be 802.1 compliant). It is one of the ENNI Operator Multi-lateral attributes, which requires the CENs at the ENNI-N to agree on the values but may allow these values to be different.";
}
- list cg-eth-spor-sospecific-srv-attributes {
- key 'uuid';
- uses cg-eth-spor-sospecific-srv-attributes;
- description "none";
- }
- uses cg-eth-frame-aggr-trm-spec;
+ uses cg-eth-frame-aggr-spec-g;
description "none";
}
- grouping cg-eth-inni-spec {
- leaf max-frame-size {
- type natural-number;
- description "none";
- }
- uses cg-eth-frame-aggr-trm-spec;
+ grouping cg-eth-inni-spec-g {
+ uses cg-eth-frame-aggr-spec-g;
description "none";
}
- grouping cg-eth-uni-spec {
+ grouping cg-eth-uni-spec-g {
leaf elmi-enabled {
type boolean;
description "MEF 7.3: This attribute denotes whether the ELMI is enabled or not. When the value is TRUE, the CEN MUST meet the mandatory requirements in MEF 16 that apply to the UNI-N.
Note: Ethernel Local Management Interface protocol contents are defined which clearly identify MEF Service/Resource constructs like UNI and EVC, hence the attribute cannot be placed in an ethernet generic class.";
}
- leaf max-frame-size {
- type natural-number;
- description "10.3: The value for the UNI Maximum Service Frame Size is a positive integer in bytes.
- [R71] The value of the UNI Maximum Service Frame Size MUST be at least 1522 bytes.";
- }
- container default-ce-vlan-id {
- uses vlan-id;
- description "Mapped from original 7.3 'untaggedAndPriorityTaggedCeVlanId'
- 10.3: At the given UNI, the Customer Edge VLAN ID (CE-VLAN ID) can be used to identify an EVC that associates this UNI. There are 4095 CE-VLAN IDs numbered 1 through 4095. The CE-VLAN ID for a VLAN
- Tagged Service Frame is the value of the VLAN ID in the tag.
- [R73] Untagged and Priority Tagged Service Frames MUST have the same CE VLAN ID.
- [R74] The CE-VLAN ID for Untagged and Priority Tagged Service Frames MUST be in the range 1, 2 , …, 4094.";
- }
- leaf max-num-of-ce-vlan-id-per-conn-serv-end-point {
- type positive-integer;
- description "none";
- }
- leaf service-multiplexing-enabled {
- type boolean;
- description "7.3: When this attribute value is enabled, there can be multiple EVCs at the UNI. This attribute can be enabled only when All-to-one bundling is disabled.
- 10.3: Service Multiplexing can be either Enabled or Disabled.
- [R72] A UNI with Service Multiplexing Enabled MUST be able to support multiple EVCs.
- [O2] When a UNI has Service Multiplexing Enabled, Point-to-Point EVCs and Multipoint EVCs MAY be multiplexed in any combination at a UNI.";
- }
- leaf all-to-one-bundling-enabled {
- type boolean;
- description "7.3: When a UNI has All to One Bundling Enabled, all CE-VLAN IDs MUST map to a single EVC at the UNI. This attribute can be enabled only when Service Multiplexing and Bundling are disabled.";
- }
- leaf token-share-enabled {
- type boolean;
- description "MEF 6.2: This is used to indicate whether a given UNI is capable of sharing tokens across Bandwidth Profile Flows in an Envelope. The allowed values, at each UNI, are Enabled or Disabled.
- [R2] A UNI, with Token Share Enabled, MUST be able to support two or more Bandwidth Profile Flows in at least one Envelope for Bandwidth Profile as specified in Section 11 of MEF 10.3 [6]
- [D1] A UNI, with Token Share Enabled, SHOULD be able to support two or more Bandwidth Profile Flows in every Envelope at that UNI.
- [R3] A UNI with Token Share Disabled, MUST have exactly one Bandwidth Profile Flow per Envelope";
- }
leaf l2cp-address-set {
- type l2cp-address-set;
+ type mef-common-types:l2cp-address-set;
description "MEF 45: The L2CP Address Set Service Attribute specifies the subset of the Bridge Reserved Addresses that are filtered (i.e. L2CP Frames with this destination address are Peered or Discarded but not Passed) at a L2CP Decision Point.
The basic construct of the L2CP behavioral model is a Decision Point that determines how an L2CP Frame is processed at an External Interface. L2CP Frames that enter
the Decision Point from the External Interface will either be Passed to the EVC (or OVC), or Peered by redirecting the frame to a Protocol Entity, or Discarded. L2CP Frames that enter the Decision Point
from the EVC (or OVC) will either be Passed to the External Interface, or Peered by redirecting the frame to a Protocol Entity, or Discarded.";
}
container l2cp-peering-list {
- uses l2cp-peering;
+ uses mef-common-types:l2cp-peering-g;
description "MEF 45: The L2CP Peering Service Attribute is a list of Layer 2 Control Protocols that will be Peered by a protocol entity at a UNI, VUNI, or ENNI. Each entry in the list specifies the Protocol Identifier and the Destination Address in use by the protocol entity.";
}
container ingress-cg-eth-bwpflow {
- uses cg-eth-bwp-flow;
+ uses cg-eth-bwp-flow-g;
description "none";
}
container egress-cg-eth-bwpflow {
- uses cg-eth-bwp-flow;
+ uses cg-eth-bwp-flow-g;
description "none";
}
- list cg-eth-envelope-list {
- key 'uuid';
- uses cg-eth-envelope;
- description "none";
- }
- uses cg-eth-frame-aggr-trm-spec;
+ uses cg-eth-frame-aggr-spec-g;
description "none";
}
- container cg-ety-trm-spec {
+ grouping cg-ety-spec-g {
leaf-list physical-layer-list {
- type physical-layer;
+ type mef-common-types:physical-layer;
description "MEF 7.3: This attribute is a list of physical layers, one for each physical link implementing the UNI or ENNI. Different physical links can use different physical layers. The Physical Layer for each physical link implementing the UNI or ENNI MUST is one of the PHYs listed in IEEE Std 802.3 – 2012 but excluding 1000BASE-PX-D and 1000BASE-PX-U.
G.8052: This attribute identifies the PHY type of the ETY trail termination. See clause 30.3.2.1.2 of [IEEE 802.3].
- IEEE 802.3: A read-only value that identifies the PHY type. The enumeration of the type is such that the value matches the clause number of this International Standard that specifies the particular PHY. The value of this attribute maps to the value of aMAUType. The enumeration 'none' can only occur in a standard implementation where an MII exists and there is nothing connected. However, the attribute aMIIDetect should be used to determine whether an MII exists or not.";
+ IEEE 802.3: A read-only value that identifies the PHY type. The enumeration of the type is such that the value matches the clause number of this International Standard that specifies the particular PHY. The value of this attribute maps to the value of aMAUType. The enumeration “none” can only occur in a standard implementation where an MII exists and there is nothing connected. However, the attribute aMIIDetect should be used to determine whether an MII exists or not.";
}
list sync-mode-list {
- key 'link-id';
min-elements 1;
- uses sync-mode-per-link;
+ uses mef-common-types:sync-mode-per-link-g;
description "MEF 7.3: This attribute is a list with one item for each of the physical links. When the value of an item is 'Enabled,' the bits transmitted from the CEN to the CE on the physical link corresponding to the item can be used by the CE as a bit clock reference.
G.8052: no equivalent definition
IEEE 802.3: oTimeSync class (?), 1:1 with oMAU.";
}
leaf number-of-links {
- type positive-integer;
+ type mef-common-types:positive-integer;
description "none";
}
container port-convs-id-to-agg-link-map-list {
- uses conversation-id-to-aggregation-link-map;
+ uses mef-common-types:conversation-id-to-aggregation-link-map-g;
description "MEF 7.3: This attribute is applicable only when the UNI or ENNI resiliency attribute has the value of All Active. Its value is a Port Conversation ID to Aggregation Link Map as defined in IEEE Std 802.1AX – 2014.
G.8052: no equivalent definition - likely because refers to IEEE Std 802.1AX – 2008, where Conversation-sensitive LACP was not yet defined.";
}
To be updated accordingly to the development of OAM model. E.g. can be replaced by explicit provisioning of MEP on LAG links.";
}
leaf link-aggregation {
- type interface-resiliency;
+ type mef-common-types:interface-resiliency;
description "MEF 7.3: This attribute represents the Link Aggregation for a UNI or an ENNI. Its value is one of None, 2-Link Active/Standby, All Active, or Other. In MEF 10.3 it is called UNI Resiliency. the value of All Active is added in MEF 10.3.2.
G.8052: no equivalent definition found.";
}
description "none";
}
- grouping cg-eth-frame-aggr-trm-spec {
+ grouping cg-eth-frame-aggr-spec-g {
+ leaf max-frame-size {
+ type mef-common-types:natural-number;
+ description "none";
+ }
description "none";
}
- grouping cg-eth-frame-flow-cpa-aspec {
+ grouping cg-eth-frame-flow-spec-g {
leaf cos-mapping-type {
- type cos-or-eec-mapping-type;
+ type mef-common-types:cos-or-eec-mapping-type;
description "MEF 7.3 (UML): The Class of Service (CoS) is used to specify ingress Bandwidth Profiles. The values of CoS is a triple of the form mapping type, SEP (Service End Point) based, PCP based or DSCP based.";
}
container source-mac-address-limit {
- uses source-mac-address-limit;
+ uses mef-common-types:source-mac-address-limit-g;
description "MEF 10.3: Source MAC Address Limit can be either Enabled or Disabled.
This attribute limits the number of source MAC Addresses that can be used in ingress Service Frames of all types over a time interval. Two independent parameters control the behavior of this attribute: N : A positive integer and t : A time interval.
This attribute operates by maintaining a list of maximum length N of source MAC addresses which are aged-out of the list if not seen in a time interval t. If an ingress Service Frame arrives with a new source MAC address when the list is full, the Service Frame is discarded.
MEF 7.3: This attribute limits the number of source MAC Addresses that can be used in ingress EI Frames mapped to the EVC End Point or the OVC End Point of all types over a time interval. When not present, the number of source MAC addresses is unlimited.";
}
leaf eec-mapping-type {
- type cos-or-eec-mapping-type;
+ type mef-common-types:cos-or-eec-mapping-type;
description "MEF 7.3 (UML): The Egress Equivalence Class (EEC) is used to specify Egress Bandwidth Profiles. The values of EEC is a triple of the form mapping type, SEP (Service End Point) based, PCP based or DSCP based. When _eecIdentifier is null this attrubute shall be null. Otherwise both shall be set.";
}
- container agg-link-depth {
- uses agg-link-depth;
- description "MEF 7.3:
- EvcEndPoint: This attribute only applies to an EVC End Point when the UNI resiliency has the value All Active. The EVC End Point Aggregation Link Depth Service Attribute value is a list of pairs of the form < VLAN ID, ,n> where the CE-VLAN ID value that is contained in the value of the EVC End Point Map and n is an integer in the range 1 to the value of the EI Number of Links n specifies the number of links in the value of the EI Port Conversation ID to Aggregation Link Map for the VLAN ID value.
- OvcEndPoint: This attribute only applies to an OVC End Point at ENNI when the EI Link Aggregation has the value All Active. This attribute value is a list of pairs of the form < S-VLAN ID, ,n> where the S-VLAN ID value that is contained in the value of the OVC End Point Map and n is an integer in the range 1 to the value of the EI Number of Links n specifies the number of links in the value of the EI Port Conversation ID to Aggregation Link Map for the VLAN ID value.";
- }
container cg-eth-color-identifier {
- uses cg-eth-color-identifier;
+ uses cg-eth-color-identifier-g;
description "none";
}
leaf end-point-role {
- type ovc-end-point-role;
+ type mef-common-types:ovc-end-point-role;
description "End Point Role can be Root, Leaf for EVC End Points, Root, Leaf and Trunk for OVC End Poins.";
}
- list s-vlan-id-list {
- key 'type';
- uses vlan-id-listing;
+ container s-vlan-id-list {
+ uses mef-common-types:vlan-id-listing-g;
description "none";
}
- container ce-vlan-id-list {
- uses vlan-id-listing;
+ container ce-vlan-id-list-or-untag {
+ uses mef-common-types:vlan-id-listing-g;
description "ceVlanIdList maps 7.3 evcEndPointMap.
MEF 7.3: This attribute provides the list of CE-VLAN IDs those map to the EVC. MEF 10.3 lists this attribute (CE-VLAN ID/EVC map) as UNI service attribute while MEF 26.2 decided to move this on as endpoint service attribute. Decided to move this one to endpoint to be consistent. MEF 45 allows this attribute to be elastic.";
}
container root-svlan-id-list {
- uses vlan-id-listing;
+ uses mef-common-types:vlan-id-listing-g;
description "none";
}
container leaf-svlan-id-list {
- uses vlan-id-listing;
+ uses mef-common-types:vlan-id-listing-g;
description "none";
}
- container cg-eth-spor-sospecific-srv-attributes {
- uses cg-eth-spor-sospecific-srv-attributes;
+ container egress-cg-eth-bwp-flow-per-sep {
+ uses cg-eth-bwp-flow-g;
description "none";
}
- container cg-eth-bwp-flow {
- uses cg-eth-bwp-flow;
+ container ingress-cg-eth-bwp-flow-per-sep {
+ uses cg-eth-bwp-flow-g;
description "none";
}
- container ingress-cg-ethbwpflow {
- uses cg-eth-bwp-flow;
- description "none";
- }
- list eth-cg-eth-cos-identifier {
- key 'uuid';
- uses eth-cg-eth-cos-identifier;
+ list cg-eth-cos-identifier {
+ key 'cos-name';
+ uses cg-eth-cos-identifier-g;
description "none";
}
list cg-eth-eec-identifier {
- key 'uuid';
- uses cg-eth-eec-identifier;
+ key 'eec-name';
+ uses cg-eth-eec-identifier-g;
description "none";
}
list cg-eth-egress-map {
- key 'uuid';
- uses cg-eth-egress-map;
+ key 'egress-map-type';
+ uses cg-eth-egress-map-g;
description "none";
}
description "none";
}
- grouping cg-eth-conn-serv-spec {
+ grouping cg-eth-conn-serv-spec-g {
leaf connection-type {
- type connection-type;
+ type mef-common-types:connection-type;
description "7.3 'connectionType' replaced by G.8052 'connectionType' attribute.";
}
- leaf unicast-frame-delivery {
- type frame-delivery;
- description "none";
- }
- leaf multicast-frame-delivery {
- type frame-delivery;
- description "none";
- }
- leaf broadcast-frame-delivery {
- type frame-delivery;
+ leaf is-connection-type-modifiable {
+ type boolean;
description "none";
}
leaf ce-vlan-pcp-preservation {
description "MEF 7.3 (UML): The CE-VLAN DEI Preservation Service Attribute for EVC/OVC can be used to preserve the value of the DEI field in VLAN Tagged Service Frames across a service. This is not inlcuded in MEF 10.3 but added in MEV 26.2. Future consideration will be included in MEF 10.x.";
}
leaf max-frame-size {
- type positive-integer;
+ type mef-common-types:positive-integer;
description "none";
}
- leaf cos-name-list {
+ leaf-list cos-name-list {
type string;
description "none";
}
leaf ce-vlan-id-preservation {
- type vlan-id-preservation;
+ type mef-common-types:vlan-id-preservation;
description "MEF 7.3 EVC/OVC ceVlanIdPreservation added to CgEthConnServSpec class, with the OVC type (PRESERVE/STRIP/RETAIN) as it depends on EVC/OVC decomposition performed by SOFs.
MEF 7.3 defines this attribute separately in EVC and OVC. When defined in OVC, the type is more complex:
This attribute describes a relationship between the format of the VLAN ID and related fields values of the frame at one External Interface and the format and VLAN ID and related fields values of the corresponding frame at another External Interface. The value of OVC CE-VLAN ID Preservation Service Attribute can be one of PRESERVE, STRIP, or RETAIN.";
type boolean;
description "MEF 7.3 (UML): This attribute describes a relationship between the S-VLAN DEI value of a frame at one ENNI and the S-VLAN DEI of the corresponding frame at another ENNI supported by the Operator CEN where each ENNI has an OVC End Point that is associated by the OVC.";
}
- leaf available-meg-level {
- type available-meg-level;
- description "none";
- }
leaf l2cp-address-set {
- type l2cp-address-set;
+ type mef-common-types:l2cp-address-set;
description "l2cpAddressSet maps 7.3 ovcL2cpAddressSet.
MEF 7.3 (UML): This attribute is the L2CP Address Set Service Attribute that is defined in MEF 45 when it is applied to the OVC.";
}
- container cg-eth-carrier-ethernet-sls {
- uses cg-eth-carrier-ethernet-sls;
- description "none";
- }
description "none";
}
- grouping cg-eth-spor-sospecific-srv-attributes {
- leaf sp-or-so-id {
- type identifier45;
- description "none";
- }
- leaf token-share-enabled {
- type boolean;
- description "none";
- }
- leaf-list operator-conn-serv-port-list {
- type leafref {
- path '/tapi-common:context/tapi-connectivity:connectivity-service/tapi-connectivity:end-point/tapi-connectivity:local-id';
- }
- description "none";
- }
+ grouping cg-eth-cos-identifier-g {
leaf uuid {
type tapi-common:universal-id;
description "none";
}
- list cg-eth-envelope-list {
- key 'uuid';
- uses cg-eth-envelope;
- description "none";
- }
+ uses mef-common:cos-identifier-g;
description "none";
}
- grouping eth-cg-eth-cos-identifier {
+ grouping cg-eth-egress-map-g {
leaf uuid {
type tapi-common:universal-id;
description "none";
}
+ uses mef-common:egress-map-g;
description "none";
}
- grouping cg-eth-egress-map {
+ grouping cg-eth-color-identifier-g {
leaf uuid {
type tapi-common:universal-id;
description "none";
}
+ uses mef-common:color-identifier-g;
description "none";
}
- grouping cg-eth-color-identifier {
+ grouping cg-eth-eec-identifier-g {
leaf uuid {
type tapi-common:universal-id;
description "none";
}
+ uses mef-common:eec-identifier-g;
description "none";
}
- grouping cg-eth-eec-identifier {
+ grouping cg-eth-bwp-flow-g {
leaf uuid {
type tapi-common:universal-id;
description "none";
}
+ uses mef-common:bwp-flow-g;
description "none";
}
- grouping cg-eth-bwp-flow {
- leaf uuid {
- type tapi-common:universal-id;
- description "none";
- }
- description "none";
- }
- grouping cg-eth-envelope {
- leaf uuid {
- type tapi-common:universal-id;
- description "none";
- }
- list cg-eth-bwp-flow-list {
- key 'uuid';
- min-elements 1;
- uses cg-eth-bwp-flow;
- description "none";
- }
- description "none";
- }
- grouping cg-eth-carrier-ethernet-sls {
- leaf uuid {
- type tapi-common:universal-id;
- description "none";
- }
- list cg-eth-sls-cos-name-entry {
- key 'uuid';
- uses cg-eth-sls-cos-name-entry;
- description "none";
- }
- description "none";
- }
- grouping cg-eth-sls-cos-name-entry {
- leaf uuid {
- type tapi-common:universal-id;
- description "none";
- }
- list cg-eth-sls-objective-and-parameters {
- key 'uuid';
- uses cg-eth-sls-objective-and-parameters;
- description "none";
- }
- description "none";
- }
- grouping cg-eth-sls-objective-and-parameters {
- leaf uuid {
- type tapi-common:universal-id;
- description "none";
- }
+ grouping cg-eth-envelope-g {
+ uses mef-common:envelope-g;
description "none";
}
/***********************
* package diagrams
- **********************/
-
- /***********************
- * package type-definitions
- **********************/
- typedef admin-state {
- type enumeration {
- enum unlocked {
- description "The resource is administratively permitted to perform services for its users.";
- }
- enum locked {
- description "The resource is administratively prohibited from performing services for its users.";
- }
- }
- description "This enumeration is for Administrative states. Refer to ITU-T X.731.";
- }
- grouping agg-link-depth {
- container vlan-id {
- uses vlan-id;
- description "The ingress frame Vlan ID. ";
- }
- leaf link-depth {
- type positive-integer;
- description "The number of links for the aggregation link.";
- }
- description "This is a pair of <VLAN ID, link depth> indicating that a given VLAN ID maps to a given number of links in the Port Conversation ID to Aggregation Link Map.";
- }
- typedef available-meg-level {
- type enumeration {
- enum none {
- description "Indicates that SOAM EI Frames are not guaranteed to pass over this OVC at any MEG Level.";
- }
- enum 0 {
- description "none";
- }
- enum 1 {
- description "none";
- }
- enum 2 {
- description "none";
- }
- enum 3 {
- description "none";
- }
- enum 4 {
- description "none";
- }
- enum 5 {
- description "none";
- }
- enum 6 {
- description "none";
- }
- enum 7 {
- description "none";
- }
- }
- description "This enumeration is for available MEG level, can be either NONE or value 0..7. NONE indicates that SOAM EI Frames are not guaranteed to pass over at any MEG Level.";
- }
- typedef connection-type {
- type enumeration {
- enum point-to-point {
- description "none";
- }
- enum multipoint {
- description "none";
- }
- enum rooted-multipoint {
- description "none";
- }
- }
- description "This is for EVC or OVC connection types, including point to point, multi-point and rooted multi-point.";
- }
- typedef color-field-type {
- type enumeration {
- enum pcp {
- description "Using PCP field to map to the color.";
- }
- enum dei {
- description "Using DEI field to map to the color.";
- }
- enum end-point {
- description "Using EVC End Point or the OVC End Point to map to the color.";
- }
- enum dscp {
- description "Using DSCP field to map to the color.";
- }
- }
- description "This enumeration is for selecting which frame field being used for color indication.";
- }
- typedef color-mode {
- type enumeration {
- enum color-aware {
- description "none";
- }
- enum color-blind {
- description "none";
- }
- }
- description "This enumeration indicates whether the Color Identifier of the Service Frame is considered by the Bandwidth Profile Algorithm.";
- }
- grouping conversation-id-to-aggregation-link-map {
- leaf conversation-id {
- type natural-number;
- description "The conversation ID is a Vlan ID or 0 for untagged or priority tagged frame.. ";
- }
- leaf-list link-id-list {
- type natural-number;
- min-elements 1;
- description "The link ID of the aggregation link.";
- }
- description "This is a Port Conversation ID to Aggregation Link Map as defined in IEEE Std 802.1AX – 2014.";
- }
- typedef cos-or-eec-mapping-type {
- type enumeration {
- enum end-point {
- description "Using EVC End Point or OVC End Point to map to the CoS Name as CoS ID.";
- }
- enum pcp {
- description "Using PCP field to map to the CoS Name as CoS ID.";
- }
- enum dscp {
- description "Using DSCP field to map to the CoS Name as CoS ID.";
- }
- }
- description "This lists the Class of Service identifier type, or the Equivalence Class Identifier type. ";
- }
- typedef dei-or-discard {
- type enumeration {
- enum discard {
- description "Discard the egress frame when the Egress Map determines based on CoS Name (and ingress Color).";
- }
- enum 0 {
- description "Set egress frame DEI field to be 0 when the Egress Map determines based on CoS Name (and ingress Color).";
- }
- enum 1 {
- description "Set egress frame DEI field to be 1 when the Egress Map determines based on CoS Name (and ingress Color).";
- }
- }
- description "This lists the DEI value for color or discard, used for Egress Map.";
- }
- typedef egress-map-type {
- type enumeration {
- enum cn-c-tag-pcp {
- description "CoS Name to C-Tag PCP egress map type";
- }
- enum cc-c-tag-pcp {
- description "CoS Name and Color to C-Tag PCP egress map type";
- }
- enum cc-c-tag-dei {
- description "CoS Name and Color to C-Tag DEI egress map type";
- }
- enum cn-s-tag-pcp {
- description "CoS Name to S-Tag PCP egress map type";
- }
- enum cc-s-tag-pcp {
- description "CoS Name and Color to S-Tag PCP egress map type";
- }
- enum cc-s-tag-dei {
- description "CoS Name and Color to S-Tag DEI egress map type";
- }
- }
- description "This lists the Egress Map types, either CoS Name to PCP, or CoS Name and Ingress Color to PCP, or CoS Name and Ingress Color to DEI for S-Tag or C-Tag.";
- }
- typedef ethernet-frame-format {
- type enumeration {
- enum ethernet {
- description "none";
- }
- }
- description "This is a single value read only attribute. Keep this in the info model just because MEF 10.3 lists it as a service attribute.";
- }
- typedef evc-end-point-role {
- type enumeration {
- enum root {
- description "EVC End Point has role of root for the EVC.";
- }
- enum leaf {
- description "EVC End Point has role of leaf for the EVC.";
- }
- }
- description "The value indicates how external interface frames mapped to the EVC End Point can be forwarded.";
- }
- typedef frame-color {
- type enumeration {
- enum green {
- description "none";
- }
- enum yellow {
- description "none";
- }
- }
- description "Frame color is either Green or Yellow.";
- }
- typedef frame-delivery {
- type enumeration {
- enum discard {
- description "Frame must be discarded.";
- }
- enum conditionally {
- description "Frame will be delivered with specified condition.";
- }
- enum unconditionally {
- description "Frame will be delivered unconditionally.";
- }
- }
- description "Service frame delivery defined in MEF 10.3. When the value is conditionally, the specific condition has to be addresses by the users. What conditions should be supported are not in the scope.";
- }
- typedef identifier45 {
- type string;
- description "Unique by network administrative domain, containing no more than 45 characters and non-null RFC Display String but not contain the characters 0x00 through 0x1f.";
- }
- typedef identifier90 {
- type string;
- description "Unique by network administrative domain, containing no more than 90 characters and non-null RFC Display String but not contain the characters 0x00 through 0x1f.";
- }
- typedef interface-resiliency {
- type enumeration {
- enum none {
- description "none";
- }
- enum 2-link-active-standby {
- description "none";
- }
- enum all-active {
- description "none";
- }
- enum other {
- description "none";
- }
- }
- description "The method for protection, if any, against a physical link failure. Refer to MEF 10.3.2 and MEF 26.2.";
- }
- typedef ip-version {
- type enumeration {
- enum ipv4 {
- description "none";
- }
- enum ipv6 {
- description "none";
- }
- enum ipv4-and-ipv6 {
- description "none";
- }
- }
- description "This enumeration lists the IP versions, including IPv4, IPv6 and both.";
- }
- typedef l2cp-address-set {
- type enumeration {
- enum cta {
- description "CE-Vlan Tag Aware";
- }
- enum ctb {
- description "CE-Vlan Tag Blind";
- }
- enum ctb2 {
- description "CE-Vlan Tag Blind option 2";
- }
- }
- description "This lists the L2CP Address Set. Refer to MEF 45.";
- }
- grouping l2cp-peering {
- container protocol-id {
- uses l2cp-protocol;
- description "This is a L2CP Protocol Identifier.";
- }
- leaf destination-address {
- type natural-number;
- description "This is a Mac Address.";
- }
- leaf-list link-id-list {
- type positive-integer;
- description "It is possible that a protocol (e.g. ESMC) could operate on some, but not all, of the physical
- links. When linkId is not listed, the protocol peering applies to all members of the aggregation link.";
- }
- description "This is a list specifies the L2CP Protocol Identifier and the Destination Address in use by the protocol entity.";
- }
- grouping l2cp-protocol {
- leaf l2cp-protocol-type {
- type l2cp-protocol-type;
- description "This attribute specifies the type of L2CP protocol, i.e., LLC or EtherType.";
- }
- leaf llc-address-or-ether-type {
- type natural-number;
- description "This attribute specifies the LLC address or the EtherType value.";
- }
- leaf sub-type {
- type natural-number;
- description "This attribute specifies the subtype of the L2CP protocol.";
- }
- description "This data type defines a L2CP protocol (LLC address type or EtherType) with possible subtype.";
- }
- typedef l2cp-protocol-type {
- type enumeration {
- enum ethertype {
- description "EtherType for L2CP, e.g., LLDP (0x88CC).";
- }
- enum llc {
- description "Logical Link Control sublayer address for L2CP, e.g., STP (0x42).";
- }
- }
- description "This lists the L2CP protocol types, either EtherType, or LLC Address.";
- }
- typedef mep-direction {
- type enumeration {
- enum down {
- description "none";
- }
- enum up {
- description "none";
- }
- }
- description "This is for MEP direction, either Down MEP or Up MEP.";
- }
- grouping mep-level-and-direction {
- leaf level {
- type natural-number;
- description "This is the MEG level, value between 0..7.";
- }
- leaf direction {
- type mep-direction;
- description "This is MEP direction, UP or DOWN.";
- }
- description "This complex data type includes MEG LEVEL and MEP direction.";
- }
- typedef natural-number {
- type uint64;
- description "An integer >=0";
- }
- typedef operational-state {
- type enumeration {
- enum enabled {
- description "none";
- }
- enum disabled {
- description "none";
- }
- }
- description "This enumeration is for Operational states. Refer to ITU-T X.731.";
- }
- typedef ovc-end-point-map-form {
- type enumeration {
- enum form-e {
- description "OVC End Point Map for ENNI.";
- }
- enum form-v {
- description "OVC End Point Map for VUNI.";
- }
- enum form-u {
- description "OVC End Point Map for UNI.";
- }
- enum form-t {
- description "OVC End Point Map for Trunk.";
- }
- }
- description "The OVC End Point Map types, for ENNI (FORM E), for UNI (FORM U), for VUNI (FORM V), or for Trunk (FORM T).";
- }
- typedef ovc-end-point-role {
- type enumeration {
- enum root {
- description "OVC End Point has role of root for the OVC.";
- }
- enum leaf {
- description "OVC End Point has role of leaf for the OVC.";
- }
- enum trunk {
- description "OVC End Point has role of trunk for the OVC.";
- }
- }
- description "The value indicates how external interface frames mapped to the OVC End Point can be forwarded.";
- }
- typedef pcp-or-discard {
- type enumeration {
- enum discard {
- description "none";
- }
- enum 0 {
- description "none";
- }
- enum 1 {
- description "none";
- }
- enum 2 {
- description "none";
- }
- enum 3 {
- description "none";
- }
- enum 4 {
- description "none";
- }
- enum 5 {
- description "none";
- }
- enum 6 {
- description "none";
- }
- enum 7 {
- description "none";
- }
- }
- description "This enumeration lists one of PCP values or DISCARD.";
- }
- typedef percentage {
- type uint64;
- description "Data type for percentage, 0%-100%.";
- }
- typedef physical-layer {
- type enumeration {
- enum 10base2 {
- description "none";
- }
- enum 10base5 {
- description "none";
- }
- enum 10base-f {
- description "none";
- }
- enum 10base-fb {
- description "none";
- }
- enum 10base-fl {
- description "none";
- }
- enum 10base-fp {
- description "none";
- }
- enum 10base-t {
- description "none";
- }
- enum 10base-te {
- description "none";
- }
- enum 10broad36 {
- description "none";
- }
- enum 10pass-ts {
- description "none";
- }
- enum 100base-bx10 {
- description "none";
- }
- enum 100base-fx {
- description "none";
- }
- enum 100base-lx10 {
- description "none";
- }
- enum 100base-t {
- description "none";
- }
- enum 100base-t2 {
- description "none";
- }
- enum 100base-t4 {
- description "none";
- }
- enum 100base-tx {
- description "none";
- }
- enum 100base-x {
- description "none";
- }
- enum 1000base-bx10 {
- description "none";
- }
- enum 1000base-cx {
- description "none";
- }
- enum 1000base-kx {
- description "none";
- }
- enum 1000base-lx {
- description "none";
- }
- enum 1000base-lx10 {
- description "none";
- }
- enum 1000base-px10 {
- description "none";
- }
- enum 1000base-px20 {
- description "none";
- }
- enum 1000base-sx {
- description "none";
- }
- enum 1000base-t {
- description "none";
- }
- enum 1000base-x {
- description "none";
- }
- enum 10gbase-cx4 {
- description "none";
- }
- enum 10gbase-e {
- description "none";
- }
- enum 10gbase-er {
- description "none";
- }
- enum 10gbase-ew {
- description "none";
- }
- enum 10gbase-kr {
- description "none";
- }
- enum 10gbase-kx4 {
- description "none";
- }
- enum 10gbase-l {
- description "none";
- }
- enum 10gbase-lr {
- description "none";
- }
- enum 10gbase-lrm {
- description "none";
- }
- enum 10gbase-lw {
- description "none";
- }
- enum 10gbase-lx4 {
- description "none";
- }
- enum 10gbase-pr {
- description "none";
- }
- enum 10gbase-prx {
- description "none";
- }
- enum 10gbase-r {
- description "none";
- }
- enum 10gbase-s {
- description "none";
- }
- enum 10gbase-sr {
- description "none";
- }
- enum 10gbase-sw {
- description "none";
- }
- enum 10gbase-t {
- description "none";
- }
- enum 10gbase-w {
- description "none";
- }
- enum 10gbase-x {
- description "none";
- }
- enum 100gbase-r {
- description "none";
- }
- enum 100gbase-cr10 {
- description "none";
- }
- enum 100gbase-er4 {
- description "none";
- }
- enum 100gbase-lr4 {
- description "none";
- }
- enum 100gbase-sr10 {
- description "none";
- }
- enum 40gbase-r {
- description "none";
- }
- enum 40gbase-cr4 {
- description "none";
- }
- enum 40gbase--fr {
- description "none";
- }
- enum 40gbase-kr4 {
- description "none";
- }
- enum 40gbase-lr4 {
- description "none";
- }
- enum 40gbase-sr4 {
- description "none";
- }
- enum 1base5 {
- description "none";
- }
- enum 2base-tl {
- description "none";
- }
- enum 1g-epon {
- description "none";
- }
- enum 10g-epon {
- description "none";
- }
- enum 10-1g-epon {
- description "none";
- }
- enum 10-10g-epon {
- description "none";
- }
- enum other {
- description "none";
- }
- enum none {
- description "none";
- }
- }
- description "IEEE802.3 (2012) defined list excluding 1000BASE-PX-D and 1000BASE-PX-U. NONE is added with further MEF 10.3 discussion, for supporting logical interfaces.";
- }
- grouping physical-layer-per-link {
- leaf link-id {
- type natural-number;
- description "This is the link ID.";
- }
- leaf physical-layer {
- type physical-layer;
- description "This is the physical layer. IEEE802.3 (2012) defined.";
- }
- description "A link may consist of one or more physical ports. This data type includes the link ID and the physical port associated to the link Id.";
- }
- typedef pm-metric-type {
- type enumeration {
- enum fd {
- description "Frame Delay Performance Metric.";
- }
- enum fdr {
- description "Frame Delay Range Performance Metric.";
- }
- enum mfd {
- description "Mean Frame Delay Performance Metric.";
- }
- enum ifdv {
- description "Inter Frame Delay Variation Performance Metric.";
- }
- enum flr {
- description "Frame Loss Ratio Performance Metric.";
- }
- enum av {
- description "Availability Performance Metric.";
- }
- enum hli {
- description "High Loss Interval Performance Metric.";
- }
- enum chli {
- description "Consecutive High Loss Interval Performance Metric.";
- }
- enum group-av {
- description "Group Availability (for a single EVC/OVC) Performance Metric.";
- }
- enum cpm {
- description "Composite Performance Metric. Refer to MEF 10.3.1.";
- }
- }
- description "This enumeration provides the list of PM Metric types, including FD, MFD, FDR, IFDV, FLR, AV, HLI, CHLI, GROUP_AV, and CPM.";
- }
- typedef pm-unit {
- type enumeration {
- enum millisecond {
- description "Measured Performance Metric in PM report as milliseconds, for FD, FDR, IFDV, and MFD.";
- }
- enum count {
- description "Measured Performance Metric in PM report as count number, for HLI and CHLI.";
- }
- enum percent {
- description "Measured Performance Metric in PM report as percentage, for FLR, Availability, Group Availability and Composite PM.";
- }
- }
- description "PM Unit, used for pairing with Value in data type PmUnitAndValue. Can be second, millisecond, micro second, etc. ";
- }
- grouping pm-unit-and-value {
- leaf pm-unit {
- type pm-unit;
- description "This attribute denotes the 'unit', e.g., MILLISECOND, COUNT or PERCENT.";
- }
- leaf delay-value {
- type uint64;
- description "This attribute denotes the delay value only when the PmUnit=SECOND. It is for FD, FDR, MFD, IFDV.";
- }
- leaf count-value {
- type natural-number;
- description "This attribute denotes the count value only when the PmUnit=COUNT. It is for HLI and CHLI.";
- }
- leaf percent-value {
- type percentage;
- description "This attribute denotes the percentage value only when the PmUnit=PERCENT. It is for FLR, AV, GROUP_AV and CPM.";
- }
- description "This data type provides the pair of <unit, value> where the unit can be ms (for frame delay), number (for HLI), and value is the correspondent value for that unit.";
- }
- typedef positive-integer {
- type uint64;
- description "An integer >0";
- }
- typedef service-state {
- type enumeration {
- enum pending {
- description "none";
- }
- enum active {
- description "none";
- }
- enum inactive {
- description "none";
- }
- }
- description "This enumeration is for Service State.";
- }
- grouping source-mac-address-limit {
- leaf limit {
- type natural-number;
- description "This attribute denotes the maximum acceptable source MAC addresses.";
- }
- leaf time-interval {
- type natural-number;
- description "This attribute denotes the time interval in milliseconds.";
- }
- description "This limits the number of source MAC Addresses that can be used in ingress external interface frames mapped to the End Point of all types over a time interval.";
- }
- typedef svlan-id-control {
- type enumeration {
- enum full {
- description "Operator can support only a single SP/SO (Service Provider/Super Operator) at the ENNI.";
- }
- enum partial {
- description "Operator can support only multiple SP/SO (Service Provider/Super Operator) at the ENNI";
- }
- }
- description "This lists the S Vlan ID Control, either FULL or PARTIAL.";
- }
- grouping sync-mode-per-link {
- leaf link-id {
- type natural-number;
- description "This is the link ID of the link in the Aggregation Link.";
- }
- leaf sync-mode-enabled {
- type boolean;
- description "This attribute denotes whether the Synchronous Mode is enabled (on the link with the Link ID).";
- }
- description "A link may consist of one or more physical ports. This data type includes the link ID and the sync mode of the physical port associated to the link Id.";
- }
- typedef tagged-l2cp-processing {
- type enumeration {
- enum 802-1-compliant {
- description "none";
- }
- enum 802-1-non-compliant {
- description "none";
- }
- }
- description "Either 802.1 compliant or not. Refer to MEF 45.";
- }
- grouping time-and-date {
- leaf year {
- type positive-integer;
- description "This denotes the year.";
- }
- leaf month {
- type positive-integer;
- description "This denotes the month.";
- }
- leaf day {
- type positive-integer;
- description "This denotes the day.";
- }
- leaf hour {
- type natural-number;
- description "This denotes the hour.";
- }
- leaf minute {
- type natural-number;
- description "This denotes the minute.";
- }
- leaf second {
- type natural-number;
- description "This denotes the second.";
- }
- description "This data type is for Time and Date in UTC.";
- }
- grouping time-interval-t {
- leaf unit {
- type time-interval-unit;
- description "Month, week, day, hour, etc.";
- }
- leaf number {
- type positive-integer;
- description "This denotes the value (for the unit), e.g., 1 (month), 20 (day), etc.";
- }
- description "Time interval T for PM. E.g., 1 month, 20 days, 2 weeks, etc.";
- }
- typedef time-interval-unit {
- type enumeration {
- enum year {
- description "none";
- }
- enum month {
- description "none";
- }
- enum week {
- description "none";
- }
- enum day {
- description "none";
- }
- enum hour {
- description "none";
- }
- enum minute {
- description "none";
- }
- enum second {
- description "none";
- }
- }
- description "Time interval unit, e.g., month, day, week, hour, etc.";
- }
- grouping vlan-id {
- leaf vlan-id {
- type positive-integer;
- description "This is the Vlan ID value.";
- }
- description "This is for VLAN ID from 1 to 4094";
- }
- typedef vlan-id-mapping-type {
- type enumeration {
- enum all {
- description "All Vlan IDs.";
- }
- enum except {
- description "All Vlan IDs except the listed.";
- }
- enum list {
- description "List of Vlan IDs.";
- }
- }
- description "Vlan ID types, ALL for all vlan IDs, LIST for a list of Vlan IDs, EXCEPT for all Vlan IDs except the listed. ";
- }
- typedef vlan-id-preservation {
- type enumeration {
- enum preserve {
- description "To achieve EVC CE-VLAN ID Preservation.";
- }
- enum retain {
- description "C-Tag, if present, is encapsulated with the C-Tag VLAN ID value retained.";
- }
- enum strip {
- description "C-Tag is discarded.";
- }
- }
- description "This is for Vlan ID Preservation. Refer to MEF 26.2 section 12.7.";
- }
- grouping vlan-id-listing {
- leaf type {
- type vlan-id-mapping-type;
- description "Can be LIST, or ALL, or EXCEPT.";
- }
- list vlan-id-list {
- key 'vlan-id';
- uses vlan-id;
- description "This is a list of Vlan IDs.";
- }
- description "The list VLAN IDs, either when type=LIST, or when type==EXCEPT (which means the VLAN IDs except the listed). When type=ALL, the vlanId list is not applicable.";
- }
- typedef vlan-tag {
- type enumeration {
- enum s-tag {
- description "none";
- }
- enum c-tag {
- description "none";
- }
- }
- description "This is for Vlan Tag type, i.e., S-tag or C-tag.";
- }
+ **********************/
}
organization "Metro Ethernet Forum (MEF)";
contact "MEF";
description "none";
- revision 2017-02-27 {
+ revision 2017-05-31 {
description "MEF NRP 1.0.alpha";
reference "ONF-TR-527, ONF-TR-512, ONF-TR-531, RFC 6020 and RFC 6087";
}
- augment "/tapi-common:context/tapi-common:service-interface-point/tapi-common:layer-protocol" {
- uses nrp-layer-protocol-attrs;
- description "none";
- }
- augment "/tapi-connectivity:create-connectivity-service/tapi-connectivity:input" {
- uses nrp-create-connectivity-service-attrs;
- description "none";
+ augment "/tapi-connectivity:create-connectivity-service/tapi-connectivity:output/tapi-connectivity:service/tapi-connectivity:end-point" {
+ uses nrp-connectivity-service-end-point-attrs-g;
+ description "none";
}
augment "/tapi-common:context/tapi-connectivity:connectivity-service" {
- uses nrp-connectivity-service-attrs;
- description "none";
+ uses nrp-connectivity-service-attrs-g;
+ description "none";
+ }
+ augment "/tapi-connectivity:create-connectivity-service/tapi-connectivity:input/tapi-connectivity:end-point" {
+ uses nrp-connectivity-service-end-point-attrs-g;
+ description "none";
}
augment "/tapi-common:context/tapi-connectivity:connectivity-service/tapi-connectivity:end-point" {
- uses nrp-connectivity-service-end-point-attrs;
- description "none";
+ uses nrp-connectivity-service-end-point-attrs-g;
+ description "none";
+ }
+ augment "/tapi-connectivity:create-connectivity-service/tapi-connectivity:input" {
+ uses nrp-connectivity-service-attrs-g;
+ description "none";
+ }
+ augment "/tapi-connectivity:create-connectivity-service/tapi-connectivity:output/tapi-connectivity:service" {
+ uses nrp-connectivity-service-attrs-g;
+ description "none";
+ }
+ augment "/tapi-common:context/tapi-common:service-interface-point/tapi-common:layer-protocol" {
+ uses nrp-layer-protocol-attrs-g;
+ description "none";
}
augment "/tapi-connectivity:create-connectivity-service/tapi-connectivity:input/tapi-connectivity:end-point" {
- uses nrp-create-connectivity-service-end-point-attrs;
- description "none";
+ uses nrp-layer-protocol-attrs-g;
+ description "none";
}
/***********************
* package diagrams
- **********************/
+ **********************/
/***********************
* package object-classes
- **********************/
- grouping nrp-cg-eth-uni-spec {
- uses nrm-connectivity:cg-eth-uni-spec;
+ **********************/
+ grouping nrp-cg-eth-uni-spec-g {
+ uses nrm-connectivity:cg-eth-uni-spec-g;
description "none";
}
- grouping nrp-cg-eth-inni-spec {
- uses nrm-connectivity:cg-eth-inni-spec;
+ grouping nrp-cg-eth-inni-spec-g {
+ uses nrm-connectivity:cg-eth-inni-spec-g;
description "none";
}
- grouping nrp-cg-eth-frame-flow-cpa-aspec {
- uses nrm-connectivity:cg-eth-frame-flow-cpa-aspec;
+ grouping nrp-cg-eth-frame-flow-spec-g {
+ uses nrm-connectivity:cg-eth-frame-flow-spec-g;
description "none";
}
- grouping nrp-cg-eth-conn-serv-spec {
- uses nrm-connectivity:cg-eth-conn-serv-spec;
+ grouping nrp-cg-eth-conn-serv-spec-g {
+ uses nrm-connectivity:cg-eth-conn-serv-spec-g;
description "none";
}
- grouping nrp-cg-eth-enni-spec {
- uses nrm-connectivity:cg-eth-enni-spec;
+ grouping nrp-cg-eth-enni-spec-g {
+ uses nrm-connectivity:cg-eth-enni-spec-g;
description "none";
}
- grouping nrp-layer-protocol-attrs {
+ grouping nrp-layer-protocol-attrs-g {
container nrp-cg-eth-uni-spec {
- uses nrp-cg-eth-uni-spec;
+ uses nrp-cg-eth-uni-spec-g;
description "none";
}
container nrp-cg-eth-inni-spec {
- uses nrp-cg-eth-inni-spec;
+ uses nrp-cg-eth-inni-spec-g;
description "none";
}
container nrp-cg-eth-enni-spec {
- uses nrp-cg-eth-enni-spec;
+ uses nrp-cg-eth-enni-spec-g;
description "none";
}
description "none";
}
- grouping nrp-create-connectivity-service-attrs {
+ grouping nrp-connectivity-service-attrs-g {
container nrp-cg-eth-conn-serv-spec {
- uses nrp-cg-eth-conn-serv-spec;
+ uses nrp-cg-eth-conn-serv-spec-g;
description "none";
}
description "none";
}
- grouping nrp-connectivity-service-attrs {
- container nrp-cg-eth-conn-serv-spec {
- uses nrp-cg-eth-conn-serv-spec;
- description "none";
- }
- description "none";
- }
- grouping nrp-connectivity-service-end-point-attrs {
- container nrp-cg-eth-frame-flow-cpa-aspec {
- uses nrp-cg-eth-frame-flow-cpa-aspec;
- description "none";
- }
- description "none";
- }
- grouping nrp-create-connectivity-service-end-point-attrs {
- container nrp-cg-eth-frame-flow-cpa-aspec {
- uses nrp-cg-eth-frame-flow-cpa-aspec;
- description "none";
- }
- container nrp-cg-eth-enni-spec {
- uses nrp-cg-eth-enni-spec;
- description "none";
- }
- container nrp-cg-eth-inni-spec {
- uses nrp-cg-eth-inni-spec;
- description "none";
- }
- container nrp-cg-eth-uni-spec {
- uses nrp-cg-eth-uni-spec;
+ grouping nrp-connectivity-service-end-point-attrs-g {
+ container nrp-cg-eth-frame-flow-spec {
+ uses nrp-cg-eth-frame-flow-spec-g;
description "none";
}
description "none";
organization "Metro Ethernet Forum (MEF)";
contact "MEF";
description "none";
- revision 2017-02-27 {
+ revision 2017-05-31 {
description "MEF NRP 1.0.alpha";
reference "ONF-TR-527, ONF-TR-512, ONF-TR-531, RFC 6020 and RFC 6087";
}
/***********************
* package object-classes
- **********************/
- grouping admin-state-pac {
+ **********************/
+ grouping admin-state-pac-g {
leaf administrative-state {
type administrative-state;
description "none";
}
description "Provides state attributes that are applicable to an entity that can be administered. Such an entity also has operational and lifecycle aspects.";
}
- grouping global-class {
+ grouping global-class-g {
leaf uuid {
type universal-id;
description "UUID: An identifier that is universally unique within an identifier space, where the identifier space is itself globally unique, and immutable. An UUID carries no semantics with respect to the purpose or state of the entity.
}
list name {
key 'value-name';
- uses name-and-value;
+ uses name-and-value-g;
description "List of names. A property of an entity with a value that is unique in some namespace but may change during the life of the entity. A name carries no semantics with respect to the purpose of the entity.";
}
list label {
key 'value-name';
- uses name-and-value;
+ uses name-and-value-g;
description "List of labels.A property of an entity with a value that is not expected to be unique and is allowed to change. A label carries no semantics with respect to the purpose of the entity and has no effect on the entity behavior or state.";
}
description "The TAPI GlobalComponent serves as the super class for all TAPI entities that can be directly retrieved by their ID. As such, these are first class entities and their ID is expected to be globally unique. ";
}
- grouping layer-protocol {
+ grouping layer-protocol-g {
leaf layer-protocol-name {
type layer-protocol-name;
description "Indicate the specific layer-protocol described by the LayerProtocol entity.";
type termination-state;
description "Indicates whether the layer is terminated and if so how.";
}
- uses local-class;
+ uses local-class-g;
description "Each transport layer is represented by a LayerProtocol (LP) instance. The LayerProtocol instances it can be used for controlling termination and monitoring functionality.
It can also be used for controlling the adaptation (i.e. encapsulation and/or multiplexing of client signal), tandem connection monitoring, traffic conditioning and/or shaping functionality at an intermediate point along a connection.
Where the client – server relationship is fixed 1:1 and immutable, the layers can be encapsulated in a single LTP instance. Where the is a n:1 relationship between client and server, the layers must be split over two separate instances of LTP. ";
}
- grouping lifecycle-state-pac {
+ grouping lifecycle-state-pac-g {
leaf lifecycle-state {
type lifecycle-state;
description "none";
}
description "Provides state attributes for an entity that has lifeccycle aspects only.";
}
- grouping local-class {
+ grouping local-class-g {
leaf local-id {
type string;
description "none";
}
list name {
key 'value-name';
- uses name-and-value;
+ uses name-and-value-g;
description "List of names. A property of an entity with a value that is unique in some namespace but may change during the life of the entity. A name carries no semantics with respect to the purpose of the entity.";
}
description "The TAPI GlobalComponent serves as the super class for all TAPI entities that can be directly retrieved by their ID. As such, these are first class entities and their ID is expected to be globally unique. ";
}
- grouping operational-state-pac {
+ grouping operational-state-pac-g {
leaf operational-state {
type operational-state;
description "none";
}
description "Provides state attributes that are applicable to an entity that reflects operational aspects. Such an entity is expected to also have lifecycle aspects.";
}
- grouping time-range {
+ grouping time-range-g {
leaf end-time {
type date-and-time;
description "none";
description "none";
}
container context {
- uses context-attrs;
+ uses context-g;
description "none";
}
- grouping context-attrs {
+ grouping context-g {
list service-interface-point {
key 'uuid';
config false;
- uses service-interface-point;
+ uses service-interface-point-g;
description "none";
}
- uses global-class;
+ uses global-class-g;
description "The Network Control Domain (NCD) object class represents the scope of control that a particular SDN controller has with respect to a particular network, (i.e., encompassing a designated set of interconnected (virtual) network elements).";
}
- grouping resource-spec {
- uses global-class;
+ grouping resource-spec-g {
+ uses global-class-g;
description "none";
}
- grouping service-spec {
- uses global-class;
+ grouping service-spec-g {
+ uses global-class-g;
description "none";
}
- grouping service-interface-point {
+ grouping service-interface-point-g {
list layer-protocol {
key 'local-id';
config false;
min-elements 1;
- uses layer-protocol;
+ uses layer-protocol-g;
description "none";
}
container state {
config false;
- uses lifecycle-state-pac;
+ uses lifecycle-state-pac-g;
description "none";
}
leaf direction {
config false;
description "none";
}
- uses resource-spec;
+ uses resource-spec-g;
description "The LogicalTerminationPoint (LTP) object class encapsulates the termination and adaptation functions of one or more transport layers.
The structure of LTP supports all transport protocols including circuit and packet forms.";
}
/***********************
* package type-definitions
- **********************/
+ **********************/
typedef administrative-state {
type enumeration {
enum locked {
}
enum potential {
description "The supporting resources are present in the network but are shared with other clients; or require further configuration before they can be used; or both.
- o When a potential resource is configured and allocated to a client it is moved to the 'installed' state for that client.
- o If the potential resource has been consumed (e.g. allocated to another client) it is moved to the 'planned' state for all other clients.";
+ o When a potential resource is configured and allocated to a client it is moved to the “installed” state for that client.
+ o If the potential resource has been consumed (e.g. allocated to another client) it is moved to the “planned” state for all other clients.";
}
enum installed {
description "The resource is present in the network and is capable of providing the service expected.";
}
description "The possible values of the lifecycleState.";
}
- grouping name-and-value {
+ grouping name-and-value-g {
leaf value-name {
type string;
description "The name of the value. The value need not have a name.";
/***********************
* package interfaces
- **********************/
+ **********************/
rpc get-service-interface-point-details {
description "none";
input {
}
output {
container sip {
- uses service-interface-point;
+ uses service-interface-point-g;
description "none";
}
}
description "none";
output {
list sip {
- uses service-interface-point;
+ uses service-interface-point-g;
description "none";
}
}
organization "Metro Ethernet Forum (MEF)";
contact "MEF";
description "none";
- revision 2017-02-27 {
+ revision 2017-05-31 {
description "MEF NRP 1.0.alpha";
reference "ONF-TR-527, ONF-TR-512, ONF-TR-531, RFC 6020 and RFC 6087";
}
augment "/tapi-common:context" {
- uses connectivity-context;
- description "none";
+ uses connectivity-context-g;
+ description "Augments the base TAPI Context with ConnectivityService information";
}
/***********************
* package object-classes
- **********************/
- grouping connection {
+ **********************/
+ grouping connection-g {
list connection-end-point {
key 'uuid';
config false;
min-elements 2;
- uses connection-end-point;
+ uses connection-end-point-g;
description "none";
}
list route {
key 'local-id';
config false;
- uses route;
+ uses route-g;
description "none";
}
leaf node {
list switch-control {
key 'local-id';
config false;
- uses switch-control;
+ uses switch-control-g;
description "none";
}
container state {
config false;
- uses tapi-common:operational-state-pac;
+ uses tapi-common:operational-state-pac-g;
description "none";
}
leaf layer-protocol-name {
config false;
description "none";
}
- uses tapi-common:resource-spec;
+ uses tapi-common:resource-spec-g;
description "The ForwardingConstruct (FC) object class models enabled potential for forwarding between two or more LTPs and like the LTP supports any transport protocol including all circuit and packet forms.
At the lowest level of recursion, a FC represents a cross-connection within an NE.";
}
- grouping connection-end-point {
+ grouping connection-end-point-g {
list layer-protocol {
key 'local-id';
config false;
min-elements 1;
- uses tapi-common:layer-protocol;
+ uses tapi-common:layer-protocol-g;
description "none";
}
leaf-list client-node-edge-point {
}
container state {
config false;
- uses tapi-common:operational-state-pac;
+ uses tapi-common:operational-state-pac-g;
description "none";
}
leaf termination-direction {
config false;
description "Each EP of the FC has a role (e.g., working, protection, protected, symmetric, hub, spoke, leaf, root) in the context of the FC with respect to the FC function. ";
}
- uses tapi-common:resource-spec;
+ uses tapi-common:resource-spec-g;
description "The LogicalTerminationPoint (LTP) object class encapsulates the termination and adaptation functions of one or more transport layers.
The structure of LTP supports all transport protocols including circuit and packet forms.";
}
- grouping connectivity-constraint {
+ grouping connectivity-constraint-g {
leaf service-type {
type service-type;
config false;
}
container requested-capacity {
config false;
- uses tapi-topology:capacity;
+ uses tapi-topology:capacity-g;
description "none";
}
list cost-characteristic {
key 'cost-name cost-value cost-algorithm';
config false;
- uses tapi-topology:cost-characteristic;
+ uses tapi-topology:cost-characteristic-g;
description "The list of costs where each cost relates to some aspect of the TopologicalEntity.";
}
list latency-characteristic {
key 'traffic-property-name traffic-property-queing-latency';
config false;
- uses tapi-topology:latency-characteristic;
+ uses tapi-topology:latency-characteristic-g;
description "The effect on the latency of a queuing process. This only has significant effect for packet based systems and has a complex characteristic.";
}
leaf coroute-inclusion {
config false;
description "none";
}
- uses tapi-common:local-class;
+ uses tapi-common:local-class-g;
description "none";
}
- grouping connectivity-service {
+ grouping connectivity-service-g {
leaf-list connection {
type leafref {
path '/tapi-common:context/tapi-connectivity:connection/tapi-connectivity:uuid';
list end-point {
key 'local-id';
min-elements 2;
- uses connectivity-service-end-point;
+ uses connectivity-service-end-point-g;
description "none";
}
container conn-constraint {
- uses connectivity-constraint;
+ uses connectivity-constraint-g;
description "none";
}
container topo-constraint {
- uses topology-constraint;
+ uses topology-constraint-g;
description "none";
}
container schedule {
- uses tapi-common:time-range;
+ uses tapi-common:time-range-g;
description "none";
}
container state {
- uses tapi-common:admin-state-pac;
+ uses tapi-common:admin-state-pac-g;
description "none";
}
leaf direction {
type tapi-common:layer-protocol-name;
description "none";
}
- uses tapi-common:service-spec;
+ uses tapi-common:service-spec-g;
description "The ForwardingConstruct (FC) object class models enabled potential for forwarding between two or more LTPs and like the LTP supports any transport protocol including all circuit and packet forms.
At the lowest level of recursion, a FC represents a cross-connection within an NE.";
}
- grouping connectivity-service-end-point {
+ grouping connectivity-service-end-point-g {
leaf service-interface-point {
type leafref {
path '/tapi-common:context/tapi-common:service-interface-point/tapi-common:uuid';
config false;
description "none";
}
- uses tapi-common:local-class;
+ uses tapi-common:local-class-g;
description "The association of the FC to LTPs is made via EndPoints.
The EndPoint (EP) object class models the access to the FC function.
The traffic forwarding between the associated EPs of the FC depends upon the type of FC and may be associated with FcSwitch object instances.
The EP replaces the Protection Unit of a traditional protection model.
The ForwadingConstruct can be considered as a component and the EndPoint as a Port on that component";
}
- grouping route {
+ grouping route-g {
leaf-list lower-connection {
type leafref {
path '/tapi-common:context/tapi-connectivity:connection/tapi-connectivity:uuid';
min-elements 1;
description "none";
}
- uses tapi-common:local-class;
+ uses tapi-common:local-class-g;
description "The FC Route (FcRoute) object class models the individual routes of an FC.
The route of an FC object is represented by a list of FCs at a lower level.
Note that depending on the service supported by an FC, an the FC can have multiple routes.";
}
- grouping connectivity-context {
+ grouping connectivity-context-g {
list connectivity-service {
key 'uuid';
- uses connectivity-service;
+ uses connectivity-service-g;
description "none";
}
list connection {
key 'uuid';
config false;
- uses connection;
+ uses connection-g;
description "none";
}
description "none";
}
- grouping switch {
+ grouping switch-g {
leaf-list selected-connection-end-point {
type leafref {
path '/tapi-common:context/tapi-connectivity:connection/tapi-connectivity:connection-end-point/tapi-connectivity:uuid';
type tapi-common:port-direction;
description "Indicates whether the switch selects from ingress to the FC or to egress of the FC, or both.";
}
- uses tapi-common:local-class;
+ uses tapi-common:local-class-g;
description "The class models the switched forwarding of traffic (traffic flow) between FcPorts (ConnectionEndPoints) and is present where there is protection functionality in the FC (Connection).
If an FC exposes protection (having two or more FcPorts that provide alternative identical inputs/outputs), the FC will have one or more associated FcSwitch objects to represent the alternative flow choices visible at the edge of the FC.
The FC switch represents and defines a protection switch structure encapsulated in the FC.
The ability for a Switch to be 'high impedance' allows bidirectional ForwardingConstructs to be overlaid on the same bidirectional LTP where the appropriate control is enabled to prevent signal conflict.
This ability allows multiple alternate routes to be present that otherwise would be in conflict.";
}
- grouping switch-control {
+ grouping switch-control-g {
leaf-list sub-switch-control {
type leafref {
path '/tapi-common:context/tapi-connectivity:connection/tapi-connectivity:switch-control/tapi-connectivity:local-id';
}
list switch {
key 'local-id';
- uses switch;
+ uses switch-g;
description "none";
}
container control-parameters {
- uses control-parameters-pac;
+ uses control-parameters-pac-g;
description "none";
}
- uses tapi-common:local-class;
+ uses tapi-common:local-class-g;
description "Represents the capability to control and coordinate switches, to add/delete/modify FCs and to add/delete/modify LTPs/LPs so as to realize a protection scheme.";
}
- grouping control-parameters-pac {
+ grouping control-parameters-pac-g {
leaf prot-type {
type protection-type;
description "Indicates the protection scheme that is used for the ProtectionGroup.";
}
description "A list of control parameters to apply to a switch.";
}
- grouping topology-constraint {
+ grouping topology-constraint-g {
leaf-list include-topology {
type leafref {
path '/tapi-common:context/tapi-topology:topology/tapi-topology:uuid';
config false;
description "soft constraint requested by client to indicate the layer(s) of transport connection that it prefers to carry the service. This could be same as the service layer or one of the supported server layers";
}
- uses tapi-common:local-class;
+ uses tapi-common:local-class-g;
description "none";
}
/***********************
* package type-definitions
- **********************/
+ **********************/
typedef service-type {
type enumeration {
enum point-to-point-connectivity {
/***********************
* package interfaces
- **********************/
+ **********************/
rpc get-connection-details {
description "none";
input {
}
output {
container connection {
- uses connection;
+ uses connection-g;
description "none";
}
}
description "none";
output {
list service {
- uses connectivity-service;
+ uses connectivity-service-g;
description "none";
}
}
}
output {
container service {
- uses connectivity-service;
+ uses connectivity-service-g;
description "none";
}
}
input {
list end-point {
min-elements 2;
- uses connectivity-service-end-point;
+ uses connectivity-service-end-point-g;
description "none";
}
container conn-constraint {
- uses connectivity-constraint;
+ uses connectivity-constraint-g;
description "none";
}
container topo-constraint {
- uses topology-constraint;
+ uses topology-constraint-g;
description "none";
}
- leaf schedule {
- type string;
+ container schedule {
+ uses tapi-common:time-range-g;
description "none";
}
- leaf state {
- type string;
+ container state {
+ uses tapi-common:admin-state-pac-g;
description "none";
}
}
output {
container service {
- uses connectivity-service;
+ uses connectivity-service-g;
description "none";
}
}
description "none";
}
container end-point {
- uses connectivity-service-end-point;
+ uses connectivity-service-end-point-g;
description "none";
}
container conn-constraint {
- uses connectivity-constraint;
+ uses connectivity-constraint-g;
description "none";
}
container topo-constraint {
- uses topology-constraint;
+ uses topology-constraint-g;
description "none";
}
- leaf schedule {
- type string;
+ container schedule {
+ uses tapi-common:time-range-g;
description "none";
}
- leaf state {
- type string;
+ container state {
+ uses tapi-common:admin-state-pac-g;
description "none";
}
}
output {
container service {
- uses connectivity-service;
+ uses connectivity-service-g;
description "none";
}
}
}
output {
container service {
- uses connectivity-service;
+ uses connectivity-service-g;
description "none";
}
}
organization "Metro Ethernet Forum (MEF)";
contact "MEF";
description "none";
- revision 2017-02-27 {
+ revision 2017-05-31 {
description "MEF NRP 1.0.alpha";
reference "ONF-TR-527, ONF-TR-512, ONF-TR-531, RFC 6020 and RFC 6087";
}
augment "/tapi-common:context" {
- uses path-computation-context;
- description "none";
+ uses path-computation-context-g;
+ description "Augments the base TAPI Context with PathComputationService information";
}
/***********************
* package object-classes
- **********************/
- grouping path {
+ **********************/
+ grouping path-g {
leaf-list link {
type leafref {
path '/tapi-common:context/tapi-topology:topology/tapi-topology:link/tapi-topology:uuid';
}
container routing-constraint {
config false;
- uses routing-constraint;
+ uses routing-constraint-g;
description "none";
}
- uses tapi-common:resource-spec;
+ uses tapi-common:resource-spec-g;
description "Path is described by an ordered list of TE Links. A TE Link is defined by a pair of Node/NodeEdgePoint IDs. A Connection is realized by concatenating link resources (associated with a Link) and the lower-level connections (cross-connections) in the different nodes";
}
- grouping path-service-end-point {
+ grouping path-service-end-point-g {
leaf service-interface-point {
type leafref {
path '/tapi-common:context/tapi-common:service-interface-point/tapi-common:uuid';
config false;
description "none";
}
- uses tapi-common:local-class;
+ uses tapi-common:local-class-g;
description "The association of the FC to LTPs is made via EndPoints.
- The EndPoint (EP) object class models the access to the FC function.
- The traffic forwarding between the associated EPs of the FC depends upon the type of FC and may be associated with FcSwitch object instances.
- In cases where there is resilience the EndPoint may convey the resilience role of the access to the FC.
+ The EndPoint (EP) object class models the access to the FC function.
+ The traffic forwarding between the associated EPs of the FC depends upon the type of FC and may be associated with FcSwitch object instances.
+ In cases where there is resilience the EndPoint may convey the resilience role of the access to the FC.
It can represent a protected (resilient/reliable) point or a protecting (unreliable working or protection) point.
- The EP replaces the Protection Unit of a traditional protection model.
+ The EP replaces the Protection Unit of a traditional protection model.
The ForwadingConstruct can be considered as a component and the EndPoint as a Port on that component";
}
- grouping path-computation-service {
+ grouping path-computation-service-g {
leaf-list path {
type leafref {
path '/tapi-common:context/tapi-path-computation:path/tapi-path-computation:uuid';
min-elements 1;
description "none";
}
- list service-port {
+ list end-point {
key 'local-id';
min-elements 2;
max-elements 2;
- uses path-service-end-point;
+ uses path-service-end-point-g;
description "none";
}
container routing-constraint {
- uses routing-constraint;
+ uses routing-constraint-g;
description "none";
}
container objective-function {
- uses path-objective-function;
+ uses path-objective-function-g;
description "none";
}
container optimization-constraint {
- uses path-optimization-constraint;
+ uses path-optimization-constraint-g;
description "none";
}
- uses tapi-common:service-spec;
+ uses tapi-common:service-spec-g;
description "none";
}
- grouping path-objective-function {
+ grouping path-objective-function-g {
leaf bandwidth-optimization {
type tapi-common:directive-value;
config false;
config false;
description "none";
}
- uses tapi-common:local-class;
+ uses tapi-common:local-class-g;
description "none";
}
- grouping path-optimization-constraint {
+ grouping path-optimization-constraint-g {
leaf traffic-interruption {
type tapi-common:directive-value;
config false;
description "none";
}
- uses tapi-common:local-class;
+ uses tapi-common:local-class-g;
description "none";
}
- grouping routing-constraint {
+ grouping routing-constraint-g {
container requested-capacity {
config false;
- uses tapi-topology:capacity;
+ uses tapi-topology:capacity-g;
description "none";
}
leaf service-level {
list cost-characteristic {
key 'cost-name cost-value cost-algorithm';
config false;
- uses tapi-topology:cost-characteristic;
+ uses tapi-topology:cost-characteristic-g;
description "The list of costs where each cost relates to some aspect of the TopologicalEntity.";
}
list latency-characteristic {
key 'traffic-property-name traffic-property-queing-latency';
config false;
- uses tapi-topology:latency-characteristic;
+ uses tapi-topology:latency-characteristic-g;
description "The effect on the latency of a queuing process. This only has significant effect for packet based systems and has a complex characteristic.";
}
leaf-list include-topology {
config false;
description "none";
}
- uses tapi-common:local-class;
+ uses tapi-common:local-class-g;
description "none";
}
- grouping path-computation-context {
+ grouping path-computation-context-g {
list path-comp-service {
key 'uuid';
- uses path-computation-service;
+ uses path-computation-service-g;
description "none";
}
list path {
key 'uuid';
config false;
- uses path;
+ uses path-g;
description "none";
}
description "none";
/***********************
* package interfaces
- **********************/
+ **********************/
rpc compute-p2ppath {
description "none";
input {
list sep {
min-elements 2;
max-elements 2;
- uses path-service-end-point;
+ uses path-service-end-point-g;
description "none";
}
container routing-constraint {
- uses routing-constraint;
+ uses routing-constraint-g;
description "none";
}
container objective-function {
- uses path-objective-function;
+ uses path-objective-function-g;
description "none";
}
}
output {
container service {
- uses path-computation-service;
+ uses path-computation-service-g;
description "none";
}
}
description "none";
}
container routing-constraint {
- uses routing-constraint;
+ uses routing-constraint-g;
description "none";
}
container optimization-constraint {
- uses path-optimization-constraint;
+ uses path-optimization-constraint-g;
description "none";
}
container objective-function {
- uses path-objective-function;
+ uses path-objective-function-g;
description "none";
}
}
output {
container service {
- uses path-computation-service;
+ uses path-computation-service-g;
description "none";
}
}
}
output {
container service {
- uses path-computation-service;
+ uses path-computation-service-g;
description "none";
}
}
organization "Metro Ethernet Forum (MEF)";
contact "MEF";
description "none";
- revision 2017-02-27 {
+ revision 2017-05-31 {
description "MEF NRP 1.0.alpha";
reference "ONF-TR-527, ONF-TR-512, ONF-TR-531, RFC 6020 and RFC 6087";
}
augment "/tapi-common:context" {
- uses topology-context;
- description "none";
+ uses topology-context-g;
+ description "Augments the base TAPI Context with TopologyService information";
}
/***********************
* package object-classes
- **********************/
- grouping link {
+ **********************/
+ grouping link-g {
leaf-list node-edge-point {
type leafref {
path '/tapi-common:context/tapi-topology:topology/tapi-topology:node/tapi-topology:owned-node-edge-point/tapi-topology:uuid';
}
container state {
config false;
- uses tapi-common:admin-state-pac;
+ uses tapi-common:admin-state-pac-g;
description "none";
}
container transfer-capacity {
config false;
- uses transfer-capacity-pac;
+ uses transfer-capacity-pac-g;
description "none";
}
container transfer-cost {
config false;
- uses transfer-cost-pac;
+ uses transfer-cost-pac-g;
description "none";
}
container transfer-integrity {
config false;
- uses transfer-integrity-pac;
+ uses transfer-integrity-pac-g;
description "none";
}
container transfer-timing {
config false;
- uses transfer-timing-pac;
+ uses transfer-timing-pac-g;
description "none";
}
container risk-parameter {
config false;
- uses risk-parameter-pac;
+ uses risk-parameter-pac-g;
description "none";
}
container validation {
config false;
- uses validation-pac;
+ uses validation-pac-g;
description "none";
}
container lp-transition {
config false;
- uses layer-protocol-transition-pac;
+ uses layer-protocol-transition-pac-g;
description "none";
}
leaf-list layer-protocol-name {
Is applicable to simple Links where all LinkEnds are BIDIRECTIONAL (the Link will be BIDIRECTIONAL) or UNIDIRECTIONAL (the Link will be UNIDIRECTIONAL).
Is not present in more complex cases.";
}
- uses tapi-common:resource-spec;
+ uses tapi-common:resource-spec-g;
description "The Link object class models effective adjacency between two or more ForwardingDomains (FD). ";
}
- grouping node {
+ grouping node-g {
list owned-node-edge-point {
key 'uuid';
config false;
- uses node-edge-point;
+ uses node-edge-point-g;
description "none";
}
leaf-list aggregated-node-edge-point {
config false;
description "none";
}
+ list node-rule-group {
+ key 'uuid';
+ uses node-rule-group-g;
+ description "none";
+ }
leaf encap-topology {
type leafref {
path '/tapi-common:context/tapi-topology:topology/tapi-topology:uuid';
}
container state {
config false;
- uses tapi-common:admin-state-pac;
+ uses tapi-common:admin-state-pac-g;
description "none";
}
container transfer-capacity {
config false;
- uses transfer-capacity-pac;
+ uses transfer-capacity-pac-g;
description "none";
}
container transfer-cost {
config false;
- uses transfer-cost-pac;
+ uses transfer-cost-pac-g;
description "none";
}
container transfer-integrity {
config false;
- uses transfer-integrity-pac;
+ uses transfer-integrity-pac-g;
description "none";
}
container transfer-timing {
config false;
- uses transfer-timing-pac;
+ uses transfer-timing-pac-g;
description "none";
}
leaf-list layer-protocol-name {
min-elements 1;
description "none";
}
- uses tapi-common:resource-spec;
- description "The ForwardingDomain (FD) object class models the 'ForwardingDomain' topological component which is used to effect forwarding of transport characteristic information and offers the potential to enable forwarding.
+ uses tapi-common:resource-spec-g;
+ description "The ForwardingDomain (FD) object class models the “ForwardingDomain” topological component which is used to effect forwarding of transport characteristic information and offers the potential to enable forwarding.
At the lowest level of recursion, an FD (within a network element (NE)) represents a switch matrix (i.e., a fabric). Note that an NE can encompass multiple switch matrices (FDs). ";
}
- grouping topology {
+ grouping topology-g {
list node {
key 'uuid';
config false;
- uses node;
+ uses node-g;
description "none";
}
list link {
key 'uuid';
config false;
- uses link;
+ uses link-g;
description "none";
}
leaf-list layer-protocol-name {
min-elements 1;
description "none";
}
- uses tapi-common:resource-spec;
- description "The ForwardingDomain (FD) object class models the 'ForwardingDomain' topological component which is used to effect forwarding of transport characteristic information and offers the potential to enable forwarding.
+ uses tapi-common:resource-spec-g;
+ description "The ForwardingDomain (FD) object class models the “ForwardingDomain” topological component which is used to effect forwarding of transport characteristic information and offers the potential to enable forwarding.
At the lowest level of recursion, an FD (within a network element (NE)) represents a switch matrix (i.e., a fabric). Note that an NE can encompass multiple switch matrices (FDs). ";
}
- grouping layer-protocol-transition-pac {
+ grouping layer-protocol-transition-pac-g {
leaf-list transitioned-layer-protocol-name {
type string;
min-elements 2;
This Pac provides the relevant abstractions of the LTPs and provides the necessary association to the LTPs involved.
Links that included details in this Pac are often referred to as Transitional Links.";
}
- grouping node-edge-point {
+ grouping node-edge-point-g {
list layer-protocol {
key 'local-id';
config false;
min-elements 1;
- uses tapi-common:layer-protocol;
+ uses tapi-common:layer-protocol-g;
description "none";
}
leaf-list aggregated-node-edge-point {
}
container state {
config false;
- uses tapi-common:admin-state-pac;
+ uses tapi-common:admin-state-pac-g;
description "none";
}
leaf termination-direction {
config false;
description "Each LinkEnd of the Link has a role (e.g., symmetric, hub, spoke, leaf, root) in the context of the Link with respect to the Link function. ";
}
- uses tapi-common:resource-spec;
+ uses tapi-common:resource-spec-g;
description "The LogicalTerminationPoint (LTP) object class encapsulates the termination and adaptation functions of one or more transport layers.
The structure of LTP supports all transport protocols including circuit and packet forms.";
}
- grouping risk-parameter-pac {
+ grouping risk-parameter-pac-g {
list risk-characteristic {
key 'risk-characteristic-name';
config false;
min-elements 1;
- uses risk-characteristic;
+ uses risk-characteristic-g;
description "A list of risk characteristics for consideration in an analysis of shared risk. Each element of the list represents a specific risk consideration.";
}
description "The risk characteristics of a TopologicalEntity come directly from the underlying physical realization.
Shared risk between two TopologicalEntities compromises the integrity of any solution that use one of those TopologicalEntity as a backup for the other.
Where two TopologicalEntities have a common risk characteristic they have an elevated probability of failing simultaneously compared to two TopologicalEntities that do not share risk characteristics.";
}
- grouping transfer-capacity-pac {
+ grouping transfer-capacity-pac-g {
container total-potential-capacity {
config false;
- uses capacity;
+ uses capacity-g;
description "An optimistic view of the capacity of the TopologicalEntity assuming that any shared capacity is available to be taken.";
}
container available-capacity {
config false;
- uses capacity;
+ uses capacity-g;
description "Capacity available to be assigned.";
}
list capacity-assigned-to-user-view {
key 'total-size';
config false;
- uses capacity;
+ uses capacity-g;
description "Capacity already assigned";
}
leaf capacity-interaction-algorithm {
Represents the capacity available to user (client) along with client interaction and usage.
A TopologicalEntity may reflect one or more client protocols and one or more members for each profile.";
}
- grouping transfer-cost-pac {
+ grouping transfer-cost-pac-g {
list cost-characteristic {
key 'cost-name cost-value cost-algorithm';
config false;
min-elements 1;
- uses cost-characteristic;
+ uses cost-characteristic-g;
description "The list of costs where each cost relates to some aspect of the TopologicalEntity.";
}
description "The cost characteristics of a TopologicalEntity not necessarily correlated to the cost of the underlying physical realization.
There may be many perspectives from which cost may be considered for a particular TopologicalEntity and hence many specific costs and potentially cost algorithms.
Using an entity will incur a cost. ";
}
- grouping transfer-integrity-pac {
+ grouping transfer-integrity-pac-g {
leaf error-characteristic {
type string;
config false;
It includes all aspects of possible degradation of signal content as well as any damage of any form to the total TopologicalEntity and to the carried signals.
Note that the statement is of total impact to the TopologicalEntity so any partial usage of the TopologicalEntity (e.g. a signal that does not use full capacity) will only suffer its portion of the impact.";
}
- grouping transfer-timing-pac {
+ grouping transfer-timing-pac-g {
list latency-characteristic {
key 'traffic-property-name traffic-property-queing-latency';
config false;
min-elements 1;
- uses latency-characteristic;
+ uses latency-characteristic-g;
description "The effect on the latency of a queuing process. This only has significant effect for packet based systems and has a complex characteristic.";
}
description "A TopologicalEntity will suffer effects from the underlying physical realization related to the timing of the information passed by the TopologicalEntity.";
}
- grouping validation-pac {
+ grouping validation-pac-g {
list validation-mechanism {
key 'validation-mechanism layer-protocol-adjacency-validated validation-robustness';
config false;
min-elements 1;
- uses validation-mechanism;
+ uses validation-mechanism-g;
description "Provides details of the specific validation mechanism(s) used to confirm the presence of an intended topologicalEntity.";
}
description "Validation covers the various adjacenct discovery and reachability verification protocols. Also may cover Information source and degree of integrity.";
}
- grouping network-topology-service {
+ grouping network-topology-service-g {
leaf-list topology {
type leafref {
path '/tapi-common:context/tapi-topology:topology/tapi-topology:uuid';
config false;
description "none";
}
- uses tapi-common:service-spec;
+ uses tapi-common:service-spec-g;
description "none";
}
- grouping topology-context {
+ grouping topology-context-g {
container nw-topology-service {
config false;
- uses network-topology-service;
+ uses network-topology-service-g;
description "none";
}
list topology {
key 'uuid';
config false;
- uses topology;
+ uses topology-g;
+ description "none";
+ }
+ description "none";
+ }
+ grouping inter-rule-group-g {
+ list rule {
+ key 'local-id';
+ min-elements 1;
+ uses rule-g;
+ description "none";
+ }
+ leaf-list associated-node-rule-group {
+ type leafref {
+ path '/tapi-common:context/tapi-topology:topology/tapi-topology:node/tapi-topology:node-rule-group/tapi-topology:uuid';
+ }
+ min-elements 2;
+ description "none";
+ }
+ container transfer-capacity {
+ uses transfer-capacity-pac-g;
+ description "none";
+ }
+ container transfer-cost {
+ uses transfer-cost-pac-g;
+ description "none";
+ }
+ container transfer-timing {
+ uses transfer-timing-pac-g;
+ description "none";
+ }
+ container risk-parameter {
+ uses risk-parameter-pac-g;
description "none";
}
+ uses tapi-common:resource-spec-g;
+ description "none";
+ }
+ grouping node-rule-group-g {
+ list rule {
+ key 'local-id';
+ min-elements 1;
+ uses rule-g;
+ description "none";
+ }
+ leaf-list node-edge-point {
+ type leafref {
+ path '/tapi-common:context/tapi-topology:topology/tapi-topology:node/tapi-topology:owned-node-edge-point/tapi-topology:uuid';
+ }
+ min-elements 1;
+ description "none";
+ }
+ leaf-list node-rule-group {
+ type leafref {
+ path '/tapi-common:context/tapi-topology:topology/tapi-topology:node/tapi-topology:node-rule-group/tapi-topology:uuid';
+ }
+ description "none";
+ }
+ list inter-rule-group {
+ key 'uuid';
+ uses inter-rule-group-g;
+ description "none";
+ }
+ container transfer-capacity {
+ uses transfer-capacity-pac-g;
+ description "none";
+ }
+ container transfer-cost {
+ uses transfer-cost-pac-g;
+ description "none";
+ }
+ container transfer-timing {
+ uses transfer-timing-pac-g;
+ description "none";
+ }
+ container risk-parameter {
+ uses risk-parameter-pac-g;
+ description "none";
+ }
+ uses tapi-common:resource-spec-g;
+ description "none";
+ }
+ grouping rule-g {
+ leaf rule-type {
+ type rule-type;
+ description "none";
+ }
+ leaf forwarding-rule {
+ type forwarding-rule;
+ description "none";
+ }
+ leaf override-priority {
+ type uint64;
+ description "none";
+ }
+ uses tapi-common:local-class-g;
description "none";
}
/***********************
* package type-definitions
- **********************/
- grouping capacity {
+ **********************/
+ grouping capacity-g {
leaf total-size {
type fixed-capacity-value;
description "Total capacity of the TopologicalEntity in MB/s";
}
description "Information on capacity of a particular TopologicalEntity.";
}
- grouping cost-characteristic {
+ grouping cost-characteristic-g {
leaf cost-name {
type string;
description "The cost characteristic will related to some aspect of the TopologicalEntity (e.g. $ cost, routing weight). This aspect will be conveyed by the costName.";
}
description "The Capacity (Bandwidth) values that are applicable for digital layers. ";
}
- grouping latency-characteristic {
+ grouping latency-characteristic-g {
leaf fixed-latency-characteristic {
type string;
config false;
}
description "Provides information on latency characteristic for a particular stated trafficProperty.";
}
- grouping risk-characteristic {
+ grouping risk-characteristic-g {
leaf risk-characteristic-name {
type string;
description "The name of the risk characteristic. The characteristic may be related to a specific degree of closeness.
}
description "The information for a particular risk characteristic where there is a list of risk identifiers related to that characteristic.";
}
- grouping validation-mechanism {
+ grouping validation-mechanism-g {
leaf validation-mechanism {
type string;
description "Name of mechanism used to validate adjacency";
}
description "none";
}
+ typedef forwarding-rule {
+ type enumeration {
+ enum may-forward-across-group {
+ description "none";
+ }
+ enum must-forward-across-group {
+ description "none";
+ }
+ enum cannot-forward-across-group {
+ description "none";
+ }
+ enum no-statement-on-forwarding {
+ description "none";
+ }
+ }
+ description "none";
+ }
+ typedef rule-type {
+ type enumeration {
+ enum forwarding {
+ description "none";
+ }
+ enum capacity {
+ description "none";
+ }
+ enum cost {
+ description "none";
+ }
+ enum timing {
+ description "none";
+ }
+ enum risk {
+ description "none";
+ }
+ enum grouping {
+ description "none";
+ }
+ }
+ description "none";
+ }
/***********************
* package interfaces
- **********************/
+ **********************/
rpc get-topology-details {
description "none";
input {
}
output {
container topology {
- uses topology;
+ uses topology-g;
description "none";
}
}
}
output {
container node {
- uses node;
+ uses node-g;
description "none";
}
}
}
output {
container node-edge-point {
- uses node-edge-point;
+ uses node-edge-point-g;
description "none";
}
}
}
output {
container link {
- uses link;
+ uses link-g;
description "none";
}
}
description "none";
output {
list topology {
- uses topology;
+ uses topology-g;
description "none";
}
}
}
choice sip-type {
container uni-spec {
- uses nrp-interface:nrp-cg-eth-uni-spec;
+ uses nrp-interface:nrp-cg-eth-uni-spec-g;
description "none";
}
container inni-spec {
- uses nrp-interface:nrp-cg-eth-inni-spec;
+ uses nrp-interface:nrp-cg-eth-inni-spec-g;
description "none";
}
container enni-spec {
- uses nrp-interface:nrp-cg-eth-enni-spec;
+ uses nrp-interface:nrp-cg-eth-enni-spec-g;
description "none";
}
}
*/
package org.opendaylight.unimgr.mef.nrp.ovs.activator;
+import java.util.HashMap;
+import java.util.List;
+import java.util.Map;
+
import org.opendaylight.unimgr.mef.nrp.api.EndPoint;
import org.opendaylight.unimgr.mef.nrp.common.ResourceNotAvailableException;
import org.opendaylight.unimgr.mef.nrp.ovs.exception.VlanNotSetException;
import org.opendaylight.unimgr.mef.nrp.ovs.transaction.TopologyTransaction;
import org.opendaylight.unimgr.mef.nrp.ovs.util.VlanUtils;
import org.opendaylight.unimgr.utils.NullAwareDatastoreGetter;
-import org.opendaylight.yang.gen.v1.urn.mef.yang.nrp_interface.rev170227.nrp.create.connectivity.service.end.point.attrs.NrpCgEthFrameFlowCpaAspec;
+import org.opendaylight.yang.gen.v1.urn.mef.yang.nrp_interface.rev170531.nrp.connectivity.service.end.point.attrs.g.NrpCgEthFrameFlowSpec;
import org.opendaylight.yang.gen.v1.urn.opendaylight.flow.inventory.rev130819.FlowCapableNodeConnector;
import org.opendaylight.yang.gen.v1.urn.opendaylight.inventory.rev130819.node.NodeConnector;
import org.opendaylight.yang.gen.v1.urn.opendaylight.inventory.rev130819.nodes.Node;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
-import java.util.HashMap;
-import java.util.List;
-import java.util.Map;
-
/**
* Helper class for OvsDriver activation.
*
*/
int getCeVlanId() throws ResourceNotAvailableException {
- if( (endPoint.getAttrs() != null) && (endPoint.getAttrs().getNrpCgEthFrameFlowCpaAspec()!=null) ){
- NrpCgEthFrameFlowCpaAspec attr = endPoint.getAttrs().getNrpCgEthFrameFlowCpaAspec();
- if( (attr.getCeVlanIdList()!=null) && !(attr.getCeVlanIdList().getVlanIdList().isEmpty()) ){
+ if( (endPoint.getAttrs() != null) && (endPoint.getAttrs().getNrpCgEthFrameFlowSpec()!=null) ){
+ NrpCgEthFrameFlowSpec attr = endPoint.getAttrs().getNrpCgEthFrameFlowSpec();
+ if( (attr.getCeVlanIdListOrUntag()!=null) && !(attr.getCeVlanIdListOrUntag().getVlanIdList().isEmpty()) ){
//for now we support only one CE VLAN
- return attr.getCeVlanIdList().getVlanIdList().get(0).getVlanId().getValue().intValue();
+ return attr.getCeVlanIdListOrUntag().getVlanIdList().get(0).getVlanId().getValue().intValue();
} else {
LOG.warn(String.format(CTAG_VLAN_ID_NOT_SET_ERROR_MESSAGE, tpName));
throw new VlanNotSetException(String.format(CTAG_VLAN_ID_NOT_SET_ERROR_MESSAGE, tpName));
}
} else {
- String className = NrpCgEthFrameFlowCpaAspec.class.toString();
+ String className = NrpCgEthFrameFlowSpec.class.toString();
LOG.warn(String.format(ATTRS_NOT_SET_ERROR_MESSAGE, tpName, className));
throw new ResourceNotAvailableException(String.format(ATTRS_NOT_SET_ERROR_MESSAGE, tpName, className));
}
*/
package org.opendaylight.unimgr.mef.nrp.ovs.driver;
+import java.util.List;
+import java.util.Optional;
+
import org.opendaylight.controller.md.sal.binding.api.DataBroker;
import org.opendaylight.controller.md.sal.common.api.data.TransactionCommitFailedException;
import org.opendaylight.unimgr.mef.nrp.api.ActivationDriver;
import org.opendaylight.unimgr.mef.nrp.common.ResourceNotAvailableException;
import org.opendaylight.unimgr.mef.nrp.ovs.activator.OvsActivator;
import org.opendaylight.unimgr.mef.nrp.ovs.tapi.TopologyDataHandler;
-import org.opendaylight.yang.gen.v1.urn.mef.yang.nrp_interface.rev170227.NrpCreateConnectivityServiceAttrs;
-import org.opendaylight.yang.gen.v1.urn.mef.yang.tapicommon.rev170227.UniversalId;
-
-import java.util.List;
-import java.util.Optional;
+import org.opendaylight.yang.gen.v1.urn.mef.yang.nrp_interface.rev170531.NrpConnectivityServiceAttrsG;
+import org.opendaylight.yang.gen.v1.urn.mef.yang.tapicommon.rev170531.UniversalId;
/**
* @author marek.ryznar@amartus.com
}
@Override
- public void initialize(List<EndPoint> endPoints, String serviceId, NrpCreateConnectivityServiceAttrs context) {
+ public void initialize(List<EndPoint> endPoints, String serviceId, NrpConnectivityServiceAttrsG context) {
this.endPoints = endPoints;
this.serviceId = serviceId;
}
*/
package org.opendaylight.unimgr.mef.nrp.ovs.tapi;
-import com.google.common.util.concurrent.FutureCallback;
-import com.google.common.util.concurrent.Futures;
-import org.opendaylight.controller.md.sal.binding.api.*;
+import java.util.Collection;
+import java.util.Collections;
+import java.util.HashMap;
+import java.util.List;
+import java.util.Map;
+import java.util.Objects;
+import java.util.function.BiConsumer;
+import java.util.stream.Collectors;
+
+import javax.annotation.Nonnull;
+import javax.annotation.Nullable;
+
+import org.opendaylight.controller.md.sal.binding.api.DataBroker;
+import org.opendaylight.controller.md.sal.binding.api.DataObjectModification;
+import org.opendaylight.controller.md.sal.binding.api.DataTreeChangeListener;
+import org.opendaylight.controller.md.sal.binding.api.DataTreeIdentifier;
+import org.opendaylight.controller.md.sal.binding.api.DataTreeModification;
+import org.opendaylight.controller.md.sal.binding.api.ReadWriteTransaction;
import org.opendaylight.controller.md.sal.common.api.data.LogicalDatastoreType;
import org.opendaylight.unimgr.mef.nrp.common.NrpDao;
import org.opendaylight.unimgr.mef.nrp.common.ResourceNotAvailableException;
import org.opendaylight.unimgr.mef.nrp.ovs.transaction.TopologyTransaction;
import org.opendaylight.yang.gen.v1.urn.ietf.params.xml.ns.yang.ietf.inet.types.rev130715.Uri;
-import org.opendaylight.yang.gen.v1.urn.mef.yang.tapicommon.rev170227.LifecycleState;
-import org.opendaylight.yang.gen.v1.urn.mef.yang.tapicommon.rev170227.TerminationDirection;
-import org.opendaylight.yang.gen.v1.urn.mef.yang.tapicommon.rev170227.UniversalId;
-import org.opendaylight.yang.gen.v1.urn.mef.yang.tapicommon.rev170227.context.attrs.ServiceInterfacePoint;
-import org.opendaylight.yang.gen.v1.urn.mef.yang.tapicommon.rev170227.context.attrs.ServiceInterfacePointBuilder;
-import org.opendaylight.yang.gen.v1.urn.mef.yang.tapicommon.rev170227.context.attrs.ServiceInterfacePointKey;
-import org.opendaylight.yang.gen.v1.urn.mef.yang.tapicommon.rev170227.service._interface.point.StateBuilder;
-import org.opendaylight.yang.gen.v1.urn.mef.yang.tapitopology.rev170227.node.OwnedNodeEdgePoint;
-import org.opendaylight.yang.gen.v1.urn.mef.yang.tapitopology.rev170227.node.OwnedNodeEdgePointBuilder;
-import org.opendaylight.yang.gen.v1.urn.mef.yang.tapitopology.rev170227.node.OwnedNodeEdgePointKey;
+import org.opendaylight.yang.gen.v1.urn.mef.yang.tapicommon.rev170531.LifecycleState;
+import org.opendaylight.yang.gen.v1.urn.mef.yang.tapicommon.rev170531.TerminationDirection;
+import org.opendaylight.yang.gen.v1.urn.mef.yang.tapicommon.rev170531.UniversalId;
+import org.opendaylight.yang.gen.v1.urn.mef.yang.tapicommon.rev170531.context.g.ServiceInterfacePoint;
+import org.opendaylight.yang.gen.v1.urn.mef.yang.tapicommon.rev170531.context.g.ServiceInterfacePointBuilder;
+import org.opendaylight.yang.gen.v1.urn.mef.yang.tapicommon.rev170531.context.g.ServiceInterfacePointKey;
+import org.opendaylight.yang.gen.v1.urn.mef.yang.tapicommon.rev170531.service._interface.point.g.StateBuilder;
+import org.opendaylight.yang.gen.v1.urn.mef.yang.tapitopology.rev170531.node.g.OwnedNodeEdgePoint;
+import org.opendaylight.yang.gen.v1.urn.mef.yang.tapitopology.rev170531.node.g.OwnedNodeEdgePointBuilder;
+import org.opendaylight.yang.gen.v1.urn.mef.yang.tapitopology.rev170531.node.g.OwnedNodeEdgePointKey;
import org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.ovsdb.rev150105.InterfaceTypeInternal;
import org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.ovsdb.rev150105.OvsdbTerminationPointAugmentation;
import org.opendaylight.yang.gen.v1.urn.tbd.params.xml.ns.yang.network.topology.rev131021.NetworkTopology;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
-import javax.annotation.Nonnull;
-import javax.annotation.Nullable;
-import java.util.*;
-import java.util.function.BiConsumer;
-import java.util.stream.Collectors;
+import com.google.common.util.concurrent.FutureCallback;
+import com.google.common.util.concurrent.Futures;
/**
* TopologyDataHandler listens to ovsdb topology and propagate significant changes to presto ext topology.
*/
package org.opendaylight.unimgr.mef.nrp.ovs.activator;
+import static org.junit.Assert.assertEquals;
+import static org.junit.Assert.assertFalse;
+import static org.junit.Assert.assertTrue;
+import static org.junit.Assert.fail;
+import static org.mockito.Mockito.mock;
+import static org.mockito.Mockito.when;
+
+import java.util.ArrayList;
+import java.util.Arrays;
+import java.util.List;
+import java.util.function.BiConsumer;
+import java.util.stream.Collectors;
+import java.util.stream.IntStream;
+
import org.junit.Before;
import org.junit.Test;
import org.opendaylight.controller.md.sal.binding.api.DataBroker;
import org.opendaylight.unimgr.mef.nrp.ovs.OvsdbTopologyTestUtils;
import org.opendaylight.unimgr.mef.nrp.ovs.util.OpenFlowUtils;
import org.opendaylight.unimgr.utils.MdsalUtils;
-import org.opendaylight.yang.gen.v1.urn.mef.yang.nrm_connectivity.rev170227.PositiveInteger;
-import org.opendaylight.yang.gen.v1.urn.mef.yang.nrm_connectivity.rev170227.cg.eth.frame.flow.cpa.aspec.CeVlanIdList;
-import org.opendaylight.yang.gen.v1.urn.mef.yang.nrm_connectivity.rev170227.vlan.id.listing.VlanIdList;
-import org.opendaylight.yang.gen.v1.urn.mef.yang.nrp_interface.rev170227.NrpCreateConnectivityServiceEndPointAttrs;
-import org.opendaylight.yang.gen.v1.urn.mef.yang.nrp_interface.rev170227.nrp.create.connectivity.service.end.point.attrs.NrpCgEthFrameFlowCpaAspec;
-import org.opendaylight.yang.gen.v1.urn.mef.yang.tapicommon.rev170227.UniversalId;
-import org.opendaylight.yang.gen.v1.urn.mef.yang.tapiconnectivity.rev170227.ConnectivityServiceEndPoint;
+import org.opendaylight.yang.gen.v1.urn.mef.yang.mef_types.rev170531.PositiveInteger;
+import org.opendaylight.yang.gen.v1.urn.mef.yang.mef_types.rev170531.vlan.id.listing.g.VlanIdList;
+import org.opendaylight.yang.gen.v1.urn.mef.yang.nrm_connectivity.rev170531.cg.eth.frame.flow.spec.g.CeVlanIdListOrUntag;
+import org.opendaylight.yang.gen.v1.urn.mef.yang.nrp_interface.rev170531.NrpConnectivityServiceEndPointAttrsG;
+import org.opendaylight.yang.gen.v1.urn.mef.yang.nrp_interface.rev170531.nrp.connectivity.service.end.point.attrs.g.NrpCgEthFrameFlowSpec;
+import org.opendaylight.yang.gen.v1.urn.mef.yang.tapicommon.rev170531.UniversalId;
+import org.opendaylight.yang.gen.v1.urn.mef.yang.tapiconnectivity.rev170531.ConnectivityServiceEndPointG;
import org.opendaylight.yang.gen.v1.urn.opendaylight.flow.inventory.rev130819.tables.Table;
import org.opendaylight.yang.gen.v1.urn.opendaylight.flow.inventory.rev130819.tables.table.Flow;
import org.opendaylight.yang.gen.v1.urn.opendaylight.inventory.rev130819.Nodes;
import org.opendaylight.yang.gen.v1.urn.tbd.params.xml.ns.yang.network.topology.rev131021.network.topology.topology.node.TerminationPoint;
import org.opendaylight.yangtools.yang.binding.InstanceIdentifier;
-import java.util.ArrayList;
-import java.util.Arrays;
-import java.util.List;
-import java.util.function.BiConsumer;
-import java.util.stream.Collectors;
-import java.util.stream.IntStream;
-
-import static org.junit.Assert.*;
-import static org.mockito.Mockito.mock;
-import static org.mockito.Mockito.when;
-
/**
* @author marek.ryznar@amartus.com
*/
}
private EndPoint mockEndPoint(String portName){
- ConnectivityServiceEndPoint connectivityServiceEndPoint = mock(ConnectivityServiceEndPoint.class);
- NrpCreateConnectivityServiceEndPointAttrs attrs = mock(NrpCreateConnectivityServiceEndPointAttrs.class);
+ ConnectivityServiceEndPointG connectivityServiceEndPoint = mock(ConnectivityServiceEndPointG.class);
+ NrpConnectivityServiceEndPointAttrsG attrs = mock(NrpConnectivityServiceEndPointAttrsG.class);
//UNI port mock
when(connectivityServiceEndPoint.getServiceInterfacePoint())
.thenReturn(new UniversalId(portName));
List<VlanIdList> vlanIds = new ArrayList<>();
vlanIds.add(vlanIdList);
- CeVlanIdList ceVlanIdList = mock(CeVlanIdList.class);
+ CeVlanIdListOrUntag ceVlanIdList = mock(CeVlanIdListOrUntag.class);
when(ceVlanIdList.getVlanIdList())
.thenReturn(vlanIds);
- NrpCgEthFrameFlowCpaAspec nrpCgEthFrameFlowCpaAspec = mock(NrpCgEthFrameFlowCpaAspec.class);
- when(nrpCgEthFrameFlowCpaAspec.getCeVlanIdList())
+ NrpCgEthFrameFlowSpec nrpCgEthFrameFlowCpaAspec = mock(NrpCgEthFrameFlowSpec.class);
+ when(nrpCgEthFrameFlowCpaAspec.getCeVlanIdListOrUntag())
.thenReturn(ceVlanIdList);
- when(attrs.getNrpCgEthFrameFlowCpaAspec())
+ when(attrs.getNrpCgEthFrameFlowSpec())
.thenReturn(nrpCgEthFrameFlowCpaAspec);
return new EndPoint(connectivityServiceEndPoint,attrs);
*/
package org.opendaylight.unimgr.mef.nrp.ovs.tapi;
+import static junit.framework.TestCase.assertNotNull;
+import static org.junit.Assert.assertEquals;
+import static org.junit.Assert.assertFalse;
+import static org.junit.Assert.assertTrue;
+
+import java.util.ArrayList;
+import java.util.Arrays;
+import java.util.List;
+import java.util.function.BiFunction;
+
import org.junit.Before;
import org.junit.Test;
import org.opendaylight.controller.md.sal.binding.api.DataBroker;
import org.opendaylight.controller.md.sal.binding.test.AbstractDataBrokerTest;
import org.opendaylight.unimgr.mef.nrp.ovs.FlowTopologyTestUtils;
import org.opendaylight.unimgr.mef.nrp.ovs.OvsdbTopologyTestUtils;
-import org.opendaylight.yang.gen.v1.urn.mef.yang.tapicommon.rev170227.UniversalId;
-import org.opendaylight.yang.gen.v1.urn.mef.yang.tapitopology.rev170227.topology.Node;
+import org.opendaylight.yang.gen.v1.urn.mef.yang.tapicommon.rev170531.UniversalId;
+import org.opendaylight.yang.gen.v1.urn.mef.yang.tapitopology.rev170531.topology.g.Node;
import org.opendaylight.yang.gen.v1.urn.tbd.params.xml.ns.yang.network.topology.rev131021.network.topology.topology.Link;
-import java.util.ArrayList;
-import java.util.Arrays;
-import java.util.List;
-import java.util.function.BiFunction;
-
-import static junit.framework.TestCase.assertNotNull;
-import static org.junit.Assert.*;
-
/**
* @author marek.ryznar@amartus.com
*/
.forEach(nep -> assertTrue(checkNep.apply(node,nep)));
}
- private BiFunction<List<org.opendaylight.yang.gen.v1.urn.mef.yang.tapicommon.rev170227.context.attrs.ServiceInterfacePoint>, String, Boolean> checkSip =
+ private BiFunction<List<org.opendaylight.yang.gen.v1.urn.mef.yang.tapicommon.rev170531.context.g.ServiceInterfacePoint>, String, Boolean> checkSip =
(sips, nep) -> sips.stream()
.anyMatch(sip -> sip.getUuid().getValue().equals(sip_prefix + ovs_nep_prefix + nep));
- private void checkSips(List<org.opendaylight.yang.gen.v1.urn.mef.yang.tapicommon.rev170227.context.attrs.ServiceInterfacePoint> sips, String ... neps){
+ private void checkSips(List<org.opendaylight.yang.gen.v1.urn.mef.yang.tapicommon.rev170531.context.g.ServiceInterfacePoint> sips, String ... neps){
Arrays.stream(neps)
.forEach(nep -> assertTrue(checkSip.apply(sips,nep)));
}
*/
package org.opendaylight.unimgr.mef.nrp.ovs.tapi;
-import com.google.common.base.Optional;
+import static org.junit.Assert.fail;
+
+import java.util.ArrayList;
+import java.util.LinkedList;
+import java.util.List;
+
import org.opendaylight.controller.md.sal.binding.api.DataBroker;
import org.opendaylight.controller.md.sal.binding.api.ReadWriteTransaction;
import org.opendaylight.controller.md.sal.common.api.data.LogicalDatastoreType;
import org.opendaylight.unimgr.mef.nrp.ovs.DataStoreTestUtils;
import org.opendaylight.unimgr.mef.nrp.ovs.OpenFlowTopologyTestUtils;
import org.opendaylight.unimgr.mef.nrp.ovs.OvsdbTopologyTestUtils;
-import org.opendaylight.yang.gen.v1.urn.mef.yang.tapicommon.rev170227.Context;
-import org.opendaylight.yang.gen.v1.urn.mef.yang.tapicommon.rev170227.UniversalId;
-import org.opendaylight.yang.gen.v1.urn.mef.yang.tapitopology.rev170227.Context1;
+import org.opendaylight.yang.gen.v1.urn.mef.yang.tapicommon.rev170531.Context;
+import org.opendaylight.yang.gen.v1.urn.mef.yang.tapicommon.rev170531.UniversalId;
+import org.opendaylight.yang.gen.v1.urn.mef.yang.tapitopology.rev170531.Context1;
import org.opendaylight.yang.gen.v1.urn.opendaylight.flow.inventory.rev130819.FlowCapableNodeConnector;
import org.opendaylight.yang.gen.v1.urn.opendaylight.flow.inventory.rev130819.FlowCapableNodeConnectorBuilder;
import org.opendaylight.yang.gen.v1.urn.opendaylight.flow.types.port.rev130925.PortNumberUni;
import org.opendaylight.yang.gen.v1.urn.tbd.params.xml.ns.yang.network.topology.rev131021.network.topology.topology.node.TerminationPoint;
import org.opendaylight.yangtools.yang.binding.InstanceIdentifier;
-import java.util.ArrayList;
-import java.util.LinkedList;
-import java.util.List;
-
-import static org.junit.Assert.fail;
+import com.google.common.base.Optional;
/**
* @author marek.ryznar@amartus.com
}
}
- protected org.opendaylight.yang.gen.v1.urn.mef.yang.tapitopology.rev170227.topology.Node readOvsNode(){
+ protected org.opendaylight.yang.gen.v1.urn.mef.yang.tapitopology.rev170531.topology.g.Node readOvsNode(){
return DataStoreTestUtils.read(getNodeIid(),dataBroker);
}
- protected List<org.opendaylight.yang.gen.v1.urn.mef.yang.tapicommon.rev170227.context.attrs.ServiceInterfacePoint> readSips(){
+ protected List<org.opendaylight.yang.gen.v1.urn.mef.yang.tapicommon.rev170531.context.g.ServiceInterfacePoint> readSips(){
ReadWriteTransaction readWriteTransaction = dataBroker.newReadWriteTransaction();
try {
Optional<Context> opt = readWriteTransaction.read(LogicalDatastoreType.OPERATIONAL, InstanceIdentifier.create(Context.class)).checkedGet();
private static InstanceIdentifier getNodeIid(){
return getTopoIid()
- .child(org.opendaylight.yang.gen.v1.urn.mef.yang.tapitopology.rev170227.topology.Node.class,
- new org.opendaylight.yang.gen.v1.urn.mef.yang.tapitopology.rev170227.topology.NodeKey(new UniversalId(ovsNodeId)));
+ .child(org.opendaylight.yang.gen.v1.urn.mef.yang.tapitopology.rev170531.topology.g.Node.class,
+ new org.opendaylight.yang.gen.v1.urn.mef.yang.tapitopology.rev170531.topology.g.NodeKey(new UniversalId(ovsNodeId)));
}
private static InstanceIdentifier getTopoIid(){
return InstanceIdentifier.create(Context.class)
.augmentation(Context1.class)
- .child(org.opendaylight.yang.gen.v1.urn.mef.yang.tapitopology.rev170227.topology.context.Topology.class,
- new org.opendaylight.yang.gen.v1.urn.mef.yang.tapitopology.rev170227.topology.context.TopologyKey(new UniversalId(prestoNrpTopoId)));
+ .child(org.opendaylight.yang.gen.v1.urn.mef.yang.tapitopology.rev170531.topology.context.g.Topology.class,
+ new org.opendaylight.yang.gen.v1.urn.mef.yang.tapitopology.rev170531.topology.context.g.TopologyKey(new UniversalId(prestoNrpTopoId)));
}
}
\ No newline at end of file
package org.opendaylight.unimgr.mef.nrp.template.driver;
+import java.util.List;
+import java.util.Optional;
+
import org.opendaylight.controller.md.sal.common.api.data.TransactionCommitFailedException;
import org.opendaylight.unimgr.mef.nrp.api.ActivationDriver;
import org.opendaylight.unimgr.mef.nrp.api.ActivationDriverBuilder;
import org.opendaylight.unimgr.mef.nrp.api.EndPoint;
import org.opendaylight.unimgr.mef.nrp.common.ResourceActivatorException;
-import org.opendaylight.yang.gen.v1.urn.mef.yang.nrp_interface.rev170227.NrpCreateConnectivityServiceAttrs;
-import org.opendaylight.yang.gen.v1.urn.mef.yang.tapicommon.rev170227.UniversalId;
+import org.opendaylight.yang.gen.v1.urn.mef.yang.nrp_interface.rev170531.NrpConnectivityServiceAttrsG;
+import org.opendaylight.yang.gen.v1.urn.mef.yang.tapicommon.rev170531.UniversalId;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
-import java.util.List;
-import java.util.Optional;
-
/**
* Example driver builder
* @author bartosz.michalik@amartus.com
}
@Override
- public void initialize(List<EndPoint> endPoints, String serviceId, NrpCreateConnectivityServiceAttrs context) {
+ public void initialize(List<EndPoint> endPoints, String serviceId, NrpConnectivityServiceAttrsG context) {
this.serviceId = serviceId;
}
package org.opendaylight.unimgr.mef.nrp.template.tapi;
+import java.util.Arrays;
+import java.util.Collections;
+import java.util.List;
+import java.util.Objects;
+import java.util.stream.Collectors;
+
import org.opendaylight.controller.md.sal.binding.api.DataBroker;
import org.opendaylight.controller.md.sal.binding.api.ReadWriteTransaction;
import org.opendaylight.controller.md.sal.common.api.data.TransactionCommitFailedException;
import org.opendaylight.unimgr.mef.nrp.common.NrpDao;
import org.opendaylight.unimgr.mef.nrp.template.TemplateConstants;
-import org.opendaylight.yang.gen.v1.urn.mef.yang.nrm_connectivity.rev170227.NaturalNumber;
-import org.opendaylight.yang.gen.v1.urn.mef.yang.nrp_interface.rev170227.LayerProtocol1;
-import org.opendaylight.yang.gen.v1.urn.mef.yang.nrp_interface.rev170227.LayerProtocol1Builder;
-import org.opendaylight.yang.gen.v1.urn.mef.yang.nrp_interface.rev170227.nrp.layer.protocol.attrs.NrpCgEthUniSpecBuilder;
-import org.opendaylight.yang.gen.v1.urn.mef.yang.tapicommon.rev170227.*;
-import org.opendaylight.yang.gen.v1.urn.mef.yang.tapicommon.rev170227.context.attrs.ServiceInterfacePoint;
-import org.opendaylight.yang.gen.v1.urn.mef.yang.tapicommon.rev170227.context.attrs.ServiceInterfacePointBuilder;
-import org.opendaylight.yang.gen.v1.urn.mef.yang.tapicommon.rev170227.service._interface.point.LayerProtocol;
-import org.opendaylight.yang.gen.v1.urn.mef.yang.tapicommon.rev170227.service._interface.point.LayerProtocolBuilder;
-import org.opendaylight.yang.gen.v1.urn.mef.yang.tapitopology.rev170227.node.OwnedNodeEdgePoint;
-import org.opendaylight.yang.gen.v1.urn.mef.yang.tapitopology.rev170227.node.OwnedNodeEdgePointBuilder;
+import org.opendaylight.yang.gen.v1.urn.mef.yang.mef_types.rev170531.NaturalNumber;
+import org.opendaylight.yang.gen.v1.urn.mef.yang.nrp_interface.rev170531.LayerProtocol1;
+import org.opendaylight.yang.gen.v1.urn.mef.yang.nrp_interface.rev170531.LayerProtocol1Builder;
+import org.opendaylight.yang.gen.v1.urn.mef.yang.nrp_interface.rev170531.nrp.layer.protocol.attrs.g.NrpCgEthUniSpecBuilder;
+import org.opendaylight.yang.gen.v1.urn.mef.yang.tapicommon.rev170531.LayerProtocolName;
+import org.opendaylight.yang.gen.v1.urn.mef.yang.tapicommon.rev170531.PortDirection;
+import org.opendaylight.yang.gen.v1.urn.mef.yang.tapicommon.rev170531.PortRole;
+import org.opendaylight.yang.gen.v1.urn.mef.yang.tapicommon.rev170531.TerminationDirection;
+import org.opendaylight.yang.gen.v1.urn.mef.yang.tapicommon.rev170531.UniversalId;
+import org.opendaylight.yang.gen.v1.urn.mef.yang.tapicommon.rev170531.context.g.ServiceInterfacePoint;
+import org.opendaylight.yang.gen.v1.urn.mef.yang.tapicommon.rev170531.context.g.ServiceInterfacePointBuilder;
+import org.opendaylight.yang.gen.v1.urn.mef.yang.tapicommon.rev170531.service._interface.point.g.LayerProtocol;
+import org.opendaylight.yang.gen.v1.urn.mef.yang.tapicommon.rev170531.service._interface.point.g.LayerProtocolBuilder;
+import org.opendaylight.yang.gen.v1.urn.mef.yang.tapitopology.rev170531.node.g.OwnedNodeEdgePoint;
+import org.opendaylight.yang.gen.v1.urn.mef.yang.tapitopology.rev170531.node.g.OwnedNodeEdgePointBuilder;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
-import java.math.BigInteger;
-import java.util.Arrays;
-import java.util.Collections;
-import java.util.List;
-import java.util.Objects;
-import java.util.stream.Collectors;
-
/**
* @author bartosz.michalik@amartus.com
*/
.addAugmentation(LayerProtocol1.class, new LayerProtocol1Builder()
.setNrpCgEthUniSpec(
new NrpCgEthUniSpecBuilder()
- .setMaxFrameSize(new NaturalNumber(new BigInteger("1703")))
+ .setMaxFrameSize(new NaturalNumber(new Long(1703)))
.build()
).build()
).build();
return Arrays.stream(indexes).mapToObj(idx -> new OwnedNodeEdgePointBuilder()
.setUuid(new UniversalId(TemplateConstants.DRIVER_ID + ":nep" + idx))
.setLayerProtocol(Collections.singletonList(
- new org.opendaylight.yang.gen.v1.urn.mef.yang.tapitopology.rev170227.node.edge.point.LayerProtocolBuilder()
+ new org.opendaylight.yang.gen.v1.urn.mef.yang.tapitopology.rev170531.node.edge.point.g.LayerProtocolBuilder()
.setLocalId("eth")
.setLayerProtocolName(LayerProtocolName.Eth)
.build()))
package org.opendaylight.unimgr.mef.nrp.template.tapi;
+import static org.junit.Assert.assertNotNull;
+import static org.junit.Assert.assertTrue;
+
import org.junit.Before;
import org.junit.Test;
import org.opendaylight.controller.md.sal.binding.api.ReadOnlyTransaction;
import org.opendaylight.unimgr.mef.nrp.common.NrpDao;
import org.opendaylight.unimgr.mef.nrp.impl.AbstractTestWithTopo;
import org.opendaylight.unimgr.mef.nrp.template.TemplateConstants;
-import org.opendaylight.yang.gen.v1.urn.mef.yang.tapitopology.rev170227.topology.context.Topology;
-
-import static org.junit.Assert.*;
+import org.opendaylight.yang.gen.v1.urn.mef.yang.tapitopology.rev170531.topology.context.g.Topology;
/**
* A simple integration test to look at the handler