*/
package org.opendaylight.unimgr.mef.nrp.cisco.xr.common.helper;
-import org.opendaylight.yang.gen.v1.urn.mef.nrp.bandwidth.profile.rev160630.GNRPBwpFlow;
-import org.opendaylight.yang.gen.v1.urn.mef.nrp.specs.rev160630.g_nrp_connadaptspec.EgressBwpFlow;
-import org.opendaylight.yang.gen.v1.urn.mef.nrp.specs.rev160630.g_nrp_connadaptspec.IngressBwpFlow;
-import org.opendaylight.yang.gen.v1.urn.mef.nrp.specs.rev160630.g_nrp_uni_terminationspec.EgressBwpUni;
-import org.opendaylight.yang.gen.v1.urn.mef.nrp.specs.rev160630.g_nrp_uni_terminationspec.IngressBwpUni;
-
-import java.util.Optional;
-
public class BandwidthProfileComposition {
public enum BwpDirection {
EVC,
UNI
}
-
- public static BandwidthProfileCompositionBuilder builder() {
- return new BandwidthProfileCompositionBuilder();
- }
-
- private static Optional<GNRPBwpFlow> convert(Optional<? extends GNRPBwpFlow> input) {
- if (input.isPresent()) {
- return Optional.of(input.get());
- }
-
- return Optional.empty();
- }
-
- private Optional<IngressBwpFlow> ingressBwProfilePerEvc;
-
- private Optional<EgressBwpFlow> egressBwProfilePerEvc;
-
- private Optional<IngressBwpUni> ingressBwProfilePerUni;
-
- private Optional<EgressBwpUni> egressBwProfilePerUni;
-
- private Optional<IngressBwpFlow> defaultIngressBwProfile;
-
- private Optional<EgressBwpFlow> defaultEgressBwProfile;
-
- private BandwidthProfileComposition(BandwidthProfileCompositionBuilder builder) {
- this.ingressBwProfilePerEvc = builder.ingressBwProfilePerEvc;
- this.egressBwProfilePerEvc = builder.egressBwProfilePerEvc;
- this.ingressBwProfilePerUni = builder.ingressBwProfilePerUni;
- this.egressBwProfilePerUni = builder.egressBwProfilePerUni;
- this.defaultIngressBwProfile = builder.defaultIngressBwProfile;
- this.defaultEgressBwProfile = builder.defaultEgressBwProfile;
- }
-
- public Optional<IngressBwpFlow> getIngressBwProfilePerEvc() {
- return ingressBwProfilePerEvc;
- }
-
- public Optional<EgressBwpFlow> getEgressBwProfilePerEvc() {
- return egressBwProfilePerEvc;
- }
-
- public Optional<IngressBwpUni> getIngressBwProfilePerUni() {
- return ingressBwProfilePerUni;
- }
-
- public Optional<EgressBwpUni> getEgressBwProfilePerUni() {
- return egressBwProfilePerUni;
- }
-
- public Optional<IngressBwpFlow> getDefaultIngressBwProfile() {
- return defaultIngressBwProfile;
- }
-
- public Optional<EgressBwpFlow> getDefaultEgressBwProfile() {
- return defaultEgressBwProfile;
- }
-
- public Optional<GNRPBwpFlow> get(BwpDirection direction, BwpApplicability applicability) {
- switch(direction) {
- case INGRESS:
- switch(applicability) {
- case DEFAULT:
- return convert(defaultIngressBwProfile);
- case EVC:
- return convert(ingressBwProfilePerEvc);
- case UNI:
- return convert(ingressBwProfilePerUni);
- default:
- return Optional.empty();
- }
- case EGRESS:
- switch(applicability) {
- case DEFAULT:
- return convert(defaultEgressBwProfile);
- case EVC:
- return convert(egressBwProfilePerEvc);
- case UNI:
- return convert(egressBwProfilePerUni);
- default:
- return Optional.empty();
- }
- default:
- return Optional.empty();
- }
- }
-
- public boolean hasAnyProfileDefined() {
- return ingressBwProfilePerEvc.isPresent() ||
- egressBwProfilePerEvc.isPresent() ||
- ingressBwProfilePerUni.isPresent() ||
- egressBwProfilePerUni.isPresent() ||
- defaultIngressBwProfile.isPresent() ||
- defaultEgressBwProfile.isPresent();
- }
-
- public static class BandwidthProfileCompositionBuilder {
- private Optional<IngressBwpFlow> ingressBwProfilePerEvc;
-
- private Optional<EgressBwpFlow> egressBwProfilePerEvc;
-
- private Optional<IngressBwpUni> ingressBwProfilePerUni;
-
- private Optional<EgressBwpUni> egressBwProfilePerUni;
-
- private Optional<IngressBwpFlow> defaultIngressBwProfile;
-
- private Optional<EgressBwpFlow> defaultEgressBwProfile;
-
- private BandwidthProfileCompositionBuilder() {
- ingressBwProfilePerEvc = Optional.empty();
- egressBwProfilePerEvc = Optional.empty();
- ingressBwProfilePerUni = Optional.empty();
- egressBwProfilePerUni = Optional.empty();
- defaultIngressBwProfile = Optional.empty();
- defaultEgressBwProfile = Optional.empty();
- }
-
- public BandwidthProfileCompositionBuilder ingressBwProfilePerEvc(Optional<IngressBwpFlow> ingressBwProfilePerEvc) {
- this.ingressBwProfilePerEvc = ingressBwProfilePerEvc;
- return this;
- }
-
- public BandwidthProfileCompositionBuilder egressBwProfilePerEvc(Optional<EgressBwpFlow> egressBwProfilePerEvc) {
- this.egressBwProfilePerEvc = egressBwProfilePerEvc;
- return this;
- }
-
- public BandwidthProfileCompositionBuilder ingressBwProfilePerUni(Optional<IngressBwpUni> ingressBwProfilePerUni) {
- this.ingressBwProfilePerUni = ingressBwProfilePerUni;
- return this;
- }
-
- public BandwidthProfileCompositionBuilder egressBwProfilePerUni(Optional<EgressBwpUni> egressBwProfilePerUni) {
- this.egressBwProfilePerUni = egressBwProfilePerUni;
- return this;
- }
-
- public BandwidthProfileCompositionBuilder defaultIngressBwProfile(Optional<IngressBwpFlow> defaultIngressBwProfile) {
- this.defaultIngressBwProfile = defaultIngressBwProfile;
- return this;
- }
-
- public BandwidthProfileCompositionBuilder defaultEgressBwProfile(Optional<EgressBwpFlow> defaultEgressBwProfile) {
- this.defaultEgressBwProfile = defaultEgressBwProfile;
- return this;
- }
-
- public BandwidthProfileComposition build() {
- return new BandwidthProfileComposition(this);
- }
- }
}
\ No newline at end of file
*/
package org.opendaylight.unimgr.mef.nrp.cisco.xr.common.helper;
-import org.opendaylight.controller.md.sal.binding.api.DataBroker;
-import org.opendaylight.controller.md.sal.common.api.data.LogicalDatastoreType;
-import org.opendaylight.unimgr.mef.nrp.common.ServicePort;
-import org.opendaylight.unimgr.utils.MdsalUtils;
-import org.opendaylight.unimgr.utils.NullAwareDatastoreGetter;
+import org.opendaylight.unimgr.mef.nrp.cisco.xr.l2vpn.activator.qos.ServicePort;
import org.opendaylight.yang.gen.v1.http.cisco.com.ns.yang.cisco.ios.xr.asr9k.policymgr.cfg.rev150518.PolicyManager;
import org.opendaylight.yang.gen.v1.http.cisco.com.ns.yang.cisco.ios.xr.asr9k.policymgr.cfg.rev150518.PolicyManagerBuilder;
import org.opendaylight.yang.gen.v1.http.cisco.com.ns.yang.cisco.ios.xr.asr9k.policymgr.cfg.rev150518.RateUnits;
import org.opendaylight.yang.gen.v1.http.cisco.com.ns.yang.cisco.ios.xr.asr9k.policymgr.cfg.rev150518.policy.map.rule.policy.map.rule.Police;
import org.opendaylight.yang.gen.v1.http.cisco.com.ns.yang.cisco.ios.xr.asr9k.policymgr.cfg.rev150518.policy.map.rule.policy.map.rule.PoliceBuilder;
import org.opendaylight.yang.gen.v1.http.cisco.com.ns.yang.cisco.ios.xr.asr9k.policymgr.cfg.rev150518.policy.map.rule.policy.map.rule.police.*;
-import org.opendaylight.yang.gen.v1.urn.mef.nrp.bandwidth.profile.rev160630.GNRPBwpFlow;
-import org.opendaylight.yang.gen.v1.urn.mef.nrp.specs.rev160630.AdapterSpec1;
-import org.opendaylight.yang.gen.v1.urn.mef.nrp.specs.rev160630.TerminationSpec1;
-import org.opendaylight.yang.gen.v1.urn.onf.core.network.module.rev160630.TerminationPoint1;
-import org.opendaylight.yang.gen.v1.urn.onf.core.network.module.rev160630.g_layerprotocol.LpSpec;
-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.network.topology.Topology;
-import org.opendaylight.yang.gen.v1.urn.tbd.params.xml.ns.yang.network.topology.rev131021.network.topology.TopologyKey;
-import org.opendaylight.yang.gen.v1.urn.tbd.params.xml.ns.yang.network.topology.rev131021.network.topology.topology.Node;
-import org.opendaylight.yang.gen.v1.urn.tbd.params.xml.ns.yang.network.topology.rev131021.network.topology.topology.NodeKey;
-import org.opendaylight.yang.gen.v1.urn.tbd.params.xml.ns.yang.network.topology.rev131021.network.topology.topology.node.TerminationPoint;
-import org.opendaylight.yang.gen.v1.urn.tbd.params.xml.ns.yang.network.topology.rev131021.network.topology.topology.node.TerminationPointKey;
-import org.opendaylight.yangtools.yang.binding.InstanceIdentifier;
+import org.opendaylight.yang.gen.v1.urn.mef.yang.mef.common.rev170712.BwpFlow;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import java.util.ArrayList;
+import java.util.Collections;
import java.util.List;
import java.util.Optional;
-import java.util.stream.Collectors;
-
-import static org.opendaylight.controller.md.sal.common.api.data.LogicalDatastoreType.CONFIGURATION;
public class BandwidthProfileHelper {
private static String SEPARATOR = "_";
private static String CLASS_DEFAULT = "class-default";
+ private final ServicePort port;
private static class PolicyMapNameGenerator {
- public static String generate(String fcName, BandwidthProfileComposition.BwpDirection direction, BandwidthProfileComposition.BwpApplicability applicability) {
+ static String generate(String fcName, BandwidthProfileComposition.BwpDirection direction, BandwidthProfileComposition.BwpApplicability applicability) {
//TODO naming convention
- return new StringBuilder()
- .append(fcName)
- .append(SEPARATOR)
- .append(direction.name().toLowerCase())
- .append(SEPARATOR)
- .append(applicability.name().toLowerCase())
- .toString();
+ return fcName +
+ SEPARATOR +
+ direction.name().toLowerCase() +
+ SEPARATOR +
+ applicability.name().toLowerCase();
}
}
- private static List<BandwidthProfileComposition> retrieveBandwidthProfiles(DataBroker dataBroker, ServicePort port) {
- List<BandwidthProfileComposition> bwCompositionList = new ArrayList<>();
- List<NullAwareDatastoreGetter<LpSpec>> lpSpecNadgs = new NullAwareDatastoreGetter<>(readTerminationPoint(dataBroker, CONFIGURATION, port))
- .collect(x -> x::getAugmentation, TerminationPoint1.class)
- .collect(x -> x::getLtpAttrs)
- .collectMany(x -> x::getLpList)
- .stream()
- .map(nadg -> nadg.collect(x -> x::getLpSpec))
- .collect(Collectors.toList());
-
- for (NullAwareDatastoreGetter<LpSpec> lpSpecNadg : lpSpecNadgs) {
- NullAwareDatastoreGetter<AdapterSpec1> adapterSpecNadg = lpSpecNadg
- .collect(x -> x::getAdapterSpec)
- .collect(x -> x::getAugmentation, AdapterSpec1.class);
-
- NullAwareDatastoreGetter<TerminationSpec1> terminationSpecNadg = lpSpecNadg
- .collect(x -> x::getTerminationSpec)
- .collect(x -> x::getAugmentation, TerminationSpec1.class);
-
- bwCompositionList.add(
- BandwidthProfileComposition.builder()
- .defaultIngressBwProfile(adapterSpecNadg.collect(x -> x::getNrpConnAdaptSpecAttrs).collect(x -> x::getIngressBwpFlow).get())
- .defaultEgressBwProfile(adapterSpecNadg.collect(x -> x::getNrpConnAdaptSpecAttrs).collect(x -> x::getEgressBwpFlow).get())
- .ingressBwProfilePerEvc(adapterSpecNadg.collect(x -> x::getNrpEvcEndpointConnAdaptSpecAttrs).collect(x -> x::getIngressBwpFlow).get())
- .egressBwProfilePerEvc(adapterSpecNadg.collect(x -> x::getNrpEvcEndpointConnAdaptSpecAttrs).collect(x -> x::getEgressBwpFlow).get())
- .ingressBwProfilePerUni(terminationSpecNadg.collect(x -> x::getNrpUniTerminationAttrs).collect(x -> x::getIngressBwpUni).get())
- .egressBwProfilePerUni(terminationSpecNadg.collect(x -> x::getNrpUniTerminationAttrs).collect(x -> x::getEgressBwpUni).get())
- .build()
- );
- }
-
- return bwCompositionList;
- }
-
- private List<BandwidthProfileComposition> bandwidthProfiles;
-
private List<PolicyMap> policyMaps;
- public BandwidthProfileHelper(DataBroker dataBroker, ServicePort port) {
- bandwidthProfiles = BandwidthProfileHelper.retrieveBandwidthProfiles(dataBroker, port);
+ public BandwidthProfileHelper(ServicePort port) {
policyMaps = new ArrayList<>();
+ this.port = port;
}
- public List<BandwidthProfileComposition> getBandwidthProfiles() {
- return bandwidthProfiles;
- }
-
- public boolean isQosEnabled() {
- for (BandwidthProfileComposition bandwidthProfileComposition : bandwidthProfiles) {
- if (bandwidthProfileComposition.hasAnyProfileDefined()) {
- return true;
- }
- }
-
- return false;
- }
-
- private Police addPolice(GNRPBwpFlow bandwidthProfile) {
- Long cir = bandwidthProfile.getCir().getValue();
- Long cbs = bandwidthProfile.getCbs().getValue();
- Long pir = bandwidthProfile.getEir().getValue() + cir;
- Long pbs = bandwidthProfile.getEbs().getValue() + cbs;
+ private Police addPolice(BwpFlow bwp) {
+ assert bwp != null;
+ Long cir = bwp.getCir().getValue();
+ Long cbs = bwp.getCbs().getValue();
+ Long pir = bwp.getEir().getValue() + cir;
+ Long pbs = bwp.getCbs().getValue() + cbs;
return new PoliceBuilder()
// CIR configuration
}
public BandwidthProfileHelper addPolicyMap(String fcName, BandwidthProfileComposition.BwpDirection direction, BandwidthProfileComposition.BwpApplicability applicability) {
- if (bandwidthProfiles.size() > 0) {
- Optional<GNRPBwpFlow> bwProfileOptional = bandwidthProfiles.stream().findFirst().get().get(direction, applicability);
-
- if (bwProfileOptional.isPresent()) {
- List<PolicyMapRule> policyMapRules = new ArrayList<>();
- policyMapRules.add(
- new PolicyMapRuleBuilder()
- .setClassName(CLASS_DEFAULT)
- .setPolice(addPolice(bwProfileOptional.get()))
- .build()
- );
-
- policyMaps.add(new PolicyMapBuilder()
- .setName(PolicyMapNameGenerator.generate(fcName, direction, applicability))
- .setPolicyMapRule(policyMapRules)
- .build()
- );
-
- return this;
+ if(BandwidthProfileComposition.BwpApplicability.UNI == applicability) {
+
+ BwpFlow bwp = null;
+
+ if(direction == BandwidthProfileComposition.BwpDirection.INGRESS) {
+ bwp = port.getIngressBwpFlow();
+ }
+
+ if(direction == BandwidthProfileComposition.BwpDirection.EGRESS) {
+ bwp = port.getEgressBwpFlow();
}
+
+ if(bwp == null) return this;
+
+ PolicyMapRule rule = new PolicyMapRuleBuilder()
+ .setClassName(CLASS_DEFAULT)
+ .setPolice(addPolice(bwp))
+ .build();
+
+ policyMaps.add(new PolicyMapBuilder()
+ .setName(PolicyMapNameGenerator.generate(fcName, direction, applicability))
+ .setPolicyMapRule(Collections.singletonList(rule))
+ .build()
+ );
+
+ return this;
+
}
LOG.warn("Cannot configure policy map - there are no Bandwidth Profiles defined.");
.build()
);
}
-
- public static com.google.common.base.Optional<TerminationPoint> readTerminationPoint(DataBroker dataBroker, LogicalDatastoreType store, ServicePort port) {
- InstanceIdentifier tpIid = InstanceIdentifier.builder(NetworkTopology.class)
- .child(Topology.class, new TopologyKey(port.getTopology()))
- .child(Node.class, new NodeKey(port.getNode()))
- .child(TerminationPoint.class, new TerminationPointKey(port.getTp()))
- .build();
-
- return MdsalUtils.readOptional(dataBroker, store, tpIid);
- }
}
\ No newline at end of file
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.common.helper.InterfaceHelper;
+import org.opendaylight.unimgr.mef.nrp.cisco.xr.l2vpn.activator.qos.ServicePort;
import org.opendaylight.unimgr.mef.nrp.cisco.xr.l2vpn.helper.L2vpnHelper;
import org.opendaylight.unimgr.mef.nrp.common.MountPointHelper;
import org.opendaylight.unimgr.mef.nrp.common.ResourceActivator;
-import org.opendaylight.unimgr.mef.nrp.common.ServicePort;
import org.opendaylight.yang.gen.v1.http.cisco.com.ns.yang.cisco.ios.xr.asr9k.policymgr.cfg.rev150518.PolicyManager;
import org.opendaylight.yang.gen.v1.http.cisco.com.ns.yang.cisco.ios.xr.ifmgr.cfg.rev150730.InterfaceActive;
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.l2vpn.cfg.rev151109.l2vpn.database.xconnect.groups.xconnect.group.p2p.xconnects.P2pXconnectKey;
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;
import org.opendaylight.yang.gen.v1.http.cisco.com.ns.yang.cisco.xr.types.rev150629.CiscoIosXrString;
+import org.opendaylight.yang.gen.v1.urn.mef.yang.nrp._interface.rev170712.nrp.connectivity.service.end.point.attrs.NrpCarrierEthConnectivityEndPointResource;
import org.opendaylight.yangtools.yang.binding.InstanceIdentifier;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import java.util.List;
+import static org.opendaylight.unimgr.mef.nrp.common.ServicePort.toServicePort;
+
/**
* Abstarct activator of VPLS-based L2 VPN on IOS-XR devices. It is responsible for handling activation and deactivation
* process of VPN configuration and it provides generic transaction designated for this purpose.
ServicePort neighbor = null;
for (EndPoint endPoint: endPoints) {
if (port==null) {
- port = ServicePort.toServicePort(endPoint, NETCONF_TOPOLODY_NAME);
+ port = new ServicePort(toServicePort(endPoint, NETCONF_TOPOLODY_NAME));
+ NrpCarrierEthConnectivityEndPointResource attrs = endPoint.getAttrs() == null ? null : endPoint.getAttrs().getNrpCarrierEthConnectivityEndPointResource();
+ if(attrs != null) {
+ port.setEgressBwpFlow(attrs.getEgressBwpFlow());
+ port.setIngressBwpFlow(attrs.getIngressBwpFlow());
+
+ }
} else {
- neighbor = ServicePort.toServicePort(endPoint, NETCONF_TOPOLODY_NAME);
+ neighbor = new ServicePort(toServicePort(endPoint, NETCONF_TOPOLODY_NAME));
}
}
public void deactivate(List<EndPoint> endPoints, String serviceId) throws TransactionCommitFailedException {
String innerName = getInnerName(serviceId);
String outerName = getOuterName(serviceId);
- ServicePort port = ServicePort.toServicePort(endPoints.stream().findFirst().get(), NETCONF_TOPOLODY_NAME);
+ ServicePort port = new ServicePort(toServicePort(endPoints.stream().findFirst().get(), NETCONF_TOPOLODY_NAME));
InstanceIdentifier<P2pXconnect> xconnectId = deactivateXConnect(outerName, innerName);
InstanceIdentifier<InterfaceConfiguration> interfaceConfigurationId = deactivateInterface(port);
import org.opendaylight.controller.md.sal.binding.api.MountPointService;
import org.opendaylight.unimgr.mef.nrp.cisco.xr.common.helper.BandwidthProfileHelper;
import org.opendaylight.unimgr.mef.nrp.cisco.xr.common.helper.InterfaceHelper;
+import org.opendaylight.unimgr.mef.nrp.cisco.xr.l2vpn.activator.qos.ServicePort;
import org.opendaylight.unimgr.mef.nrp.cisco.xr.l2vpn.helper.AttachmentCircuitHelper;
import org.opendaylight.unimgr.mef.nrp.cisco.xr.l2vpn.helper.L2vpnHelper;
import org.opendaylight.unimgr.mef.nrp.cisco.xr.l2vpn.helper.PseudowireHelper;
import org.opendaylight.unimgr.mef.nrp.cisco.xr.l2vpn.helper.XConnectHelper;
-import org.opendaylight.unimgr.mef.nrp.common.ServicePort;
import org.opendaylight.yang.gen.v1.http.cisco.com.ns.yang.cisco.ios.xr.asr9k.policymgr.cfg.rev150518.PolicyManager;
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.l2vpn.cfg.rev151109.L2vpn;
@Override
protected Optional<PolicyManager> activateQos(String name, ServicePort port) {
- return new BandwidthProfileHelper(dataBroker, port)
+ return new BandwidthProfileHelper(port)
.addPolicyMap(name, INGRESS, UNI)
.addPolicyMap(name, EGRESS, UNI)
.build();
import org.opendaylight.unimgr.mef.nrp.cisco.xr.common.helper.InterfaceHelper;
import org.opendaylight.unimgr.mef.nrp.cisco.xr.common.util.LoopbackUtils;
import org.opendaylight.unimgr.mef.nrp.cisco.xr.common.util.MtuUtils;
+import org.opendaylight.unimgr.mef.nrp.cisco.xr.l2vpn.activator.qos.ServicePort;
import org.opendaylight.unimgr.mef.nrp.cisco.xr.l2vpn.helper.AttachmentCircuitHelper;
import org.opendaylight.unimgr.mef.nrp.cisco.xr.l2vpn.helper.L2vpnHelper;
import org.opendaylight.unimgr.mef.nrp.cisco.xr.l2vpn.helper.PseudowireHelper;
import org.opendaylight.unimgr.mef.nrp.cisco.xr.l2vpn.helper.XConnectHelper;
import org.opendaylight.unimgr.mef.nrp.common.FixedServiceNaming;
-import org.opendaylight.unimgr.mef.nrp.common.ServicePort;
import org.opendaylight.yang.gen.v1.http.cisco.com.ns.yang.cisco.ios.xr.asr9k.policymgr.cfg.rev150518.PolicyManager;
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._interface.configuration.Mtus;
@Override
protected Optional<PolicyManager> activateQos(String name, ServicePort port) {
- return new BandwidthProfileHelper(dataBroker, port)
+ return new BandwidthProfileHelper(port)
.addPolicyMap(name, INGRESS, UNI)
.addPolicyMap(name, EGRESS, UNI)
.build();
--- /dev/null
+package org.opendaylight.unimgr.mef.nrp.cisco.xr.l2vpn.activator.qos;
+
+import org.opendaylight.yang.gen.v1.urn.mef.yang.nrm.connectivity.rev170712.carrier.eth.connectivity.end.point.resource.IngressBwpFlow;
+import org.opendaylight.yang.gen.v1.urn.mef.yang.nrm.connectivity.rev170712.carrier.eth.connectivity.end.point.resource.EgressBwpFlow;
+
+/**
+ * @author bartosz.michalik@amartus.com
+ */
+public class ServicePort extends org.opendaylight.unimgr.mef.nrp.common.ServicePort {
+ private IngressBwpFlow ingressBwpFlow;
+ private EgressBwpFlow egressBwpFlow;
+ public ServicePort(org.opendaylight.unimgr.mef.nrp.common.ServicePort servicePort) {
+ super(servicePort.getTopology(), servicePort.getNode(), servicePort.getTp());
+ }
+
+ public IngressBwpFlow getIngressBwpFlow() {
+ return ingressBwpFlow;
+ }
+
+ public void setIngressBwpFlow(IngressBwpFlow ingressBwpFlow) {
+ this.ingressBwpFlow = ingressBwpFlow;
+ }
+
+ public EgressBwpFlow getEgressBwpFlow() {
+ return egressBwpFlow;
+ }
+
+ public void setEgressBwpFlow(EgressBwpFlow egressBwpFlow) {
+ this.egressBwpFlow = egressBwpFlow;
+ }
+}
+++ /dev/null
-/*
- * Copyright (c) 2016 Cisco Systems Inc and others. All rights reserved.
- *
- * This program and the accompanying materials are made available under the
- * terms of the Eclipse Public License v1.0 which accompanies this distribution,
- * and is available at http://www.eclipse.org/legal/epl-v10.html
- */
-package org.opendaylight.unimgr.mef.nrp.cisco.xr.common.helper;
-
-import org.junit.Before;
-import org.junit.Test;
-import org.opendaylight.yang.gen.v1.urn.mef.nrp.bandwidth.profile.rev160630.GNRPBwpFlow;
-import org.opendaylight.yang.gen.v1.urn.mef.nrp.specs.rev160630.g_nrp_connadaptspec.EgressBwpFlow;
-import org.opendaylight.yang.gen.v1.urn.mef.nrp.specs.rev160630.g_nrp_connadaptspec.IngressBwpFlow;
-import org.opendaylight.yang.gen.v1.urn.mef.nrp.specs.rev160630.g_nrp_uni_terminationspec.EgressBwpUni;
-import org.opendaylight.yang.gen.v1.urn.mef.nrp.specs.rev160630.g_nrp_uni_terminationspec.IngressBwpUni;
-
-import java.util.Optional;
-
-import static org.junit.Assert.*;
-import static org.mockito.Mockito.mock;
-import static org.opendaylight.unimgr.mef.nrp.cisco.xr.common.helper.BandwidthProfileComposition.BwpApplicability.*;
-import static org.opendaylight.unimgr.mef.nrp.cisco.xr.common.helper.BandwidthProfileComposition.BwpDirection.EGRESS;
-import static org.opendaylight.unimgr.mef.nrp.cisco.xr.common.helper.BandwidthProfileComposition.BwpDirection.INGRESS;
-
-public class BandwidthProfileCompositionTest {
-
- private IngressBwpFlow defaultIngressBwProfileMock;
-
- private EgressBwpFlow defaultEgressBwProfileMock;
-
- private IngressBwpFlow ingressBwProfilePerEvcMock;
-
- private EgressBwpFlow egressBwProfilePerEvcMock;
-
- private IngressBwpUni ingressBwProfilePerUniMock;
-
- private EgressBwpUni egressBwProfilePerUniMock;
-
- @Before
- public void setup() {
- defaultIngressBwProfileMock = mock(IngressBwpFlow.class);
- defaultEgressBwProfileMock = mock(EgressBwpFlow.class);
- ingressBwProfilePerEvcMock = mock(IngressBwpFlow.class);
- egressBwProfilePerEvcMock = mock(EgressBwpFlow.class);
- ingressBwProfilePerUniMock = mock(IngressBwpUni.class);
- egressBwProfilePerUniMock = mock(EgressBwpUni.class);
- }
-
- @Test
- public void testBuilder() {
- //given
- BandwidthProfileComposition.BandwidthProfileCompositionBuilder compositionBuilder = builderWithAllProfiles();
-
- //when
- BandwidthProfileComposition composition = compositionBuilder.build();
-
- //then
- assertTrue(composition.getDefaultIngressBwProfile().isPresent());
- assertTrue(composition.getDefaultEgressBwProfile().isPresent());
- assertTrue(composition.getIngressBwProfilePerEvc().isPresent());
- assertTrue(composition.getEgressBwProfilePerEvc().isPresent());
- assertTrue(composition.getIngressBwProfilePerUni().isPresent());
- assertTrue(composition.getEgressBwProfilePerUni().isPresent());
-
- assertEquals(defaultIngressBwProfileMock, composition.getDefaultIngressBwProfile().get());
- assertEquals(defaultEgressBwProfileMock, composition.getDefaultEgressBwProfile().get());
- assertEquals(ingressBwProfilePerEvcMock, composition.getIngressBwProfilePerEvc().get());
- assertEquals(egressBwProfilePerEvcMock, composition.getEgressBwProfilePerEvc().get());
- assertEquals(ingressBwProfilePerUniMock, composition.getIngressBwProfilePerUni().get());
- assertEquals(egressBwProfilePerUniMock, composition.getEgressBwProfilePerUni().get());
- }
-
- @Test
- public void testBuilderEmpty() {
- //given
- BandwidthProfileComposition.BandwidthProfileCompositionBuilder compositionBuilder = BandwidthProfileComposition.builder();
-
- //when
- BandwidthProfileComposition composition = compositionBuilder.build();
-
- //then
- assertNotNull(composition.getDefaultIngressBwProfile());
- assertNotNull(composition.getDefaultEgressBwProfile());
- assertNotNull(composition.getIngressBwProfilePerEvc());
- assertNotNull(composition.getEgressBwProfilePerEvc());
- assertNotNull(composition.getIngressBwProfilePerUni());
- assertNotNull(composition.getEgressBwProfilePerUni());
-
- assertFalse(composition.getDefaultIngressBwProfile().isPresent());
- assertFalse(composition.getDefaultEgressBwProfile().isPresent());
- assertFalse(composition.getIngressBwProfilePerEvc().isPresent());
- assertFalse(composition.getEgressBwProfilePerEvc().isPresent());
- assertFalse(composition.getIngressBwProfilePerUni().isPresent());
- assertFalse(composition.getEgressBwProfilePerUni().isPresent());
- }
-
- @Test
- public void testGet() {
- //given
- BandwidthProfileComposition composition = builderWithAllProfiles().build();
-
- //when
- Optional<GNRPBwpFlow> actualIngerssDefaultOptional = composition.get(INGRESS, DEFAULT);
- Optional<GNRPBwpFlow> actualIngressEvcOptional = composition.get(INGRESS, EVC);
- Optional<GNRPBwpFlow> actualIngerssUniOptional = composition.get(INGRESS, UNI);
- Optional<GNRPBwpFlow> actualEgerssDefaultOptional = composition.get(EGRESS, DEFAULT);
- Optional<GNRPBwpFlow> actualEgerssEvcOptional = composition.get(EGRESS, EVC);
- Optional<GNRPBwpFlow> actualEgerssUniOptional = composition.get(EGRESS, UNI);
-
- //then
- assertTrue(actualIngerssDefaultOptional.isPresent());
- assertTrue(actualIngressEvcOptional.isPresent());
- assertTrue(actualIngerssUniOptional.isPresent());
- assertTrue(actualEgerssDefaultOptional.isPresent());
- assertTrue(actualEgerssEvcOptional.isPresent());
- assertTrue(actualEgerssUniOptional.isPresent());
-
- assertEquals(defaultIngressBwProfileMock, actualIngerssDefaultOptional.get());
- assertEquals(defaultEgressBwProfileMock, actualEgerssDefaultOptional.get());
- assertEquals(ingressBwProfilePerEvcMock, actualIngressEvcOptional.get());
- assertEquals(egressBwProfilePerEvcMock, actualEgerssEvcOptional.get());
- assertEquals(ingressBwProfilePerUniMock, actualIngerssUniOptional.get());
- assertEquals(egressBwProfilePerUniMock, actualEgerssUniOptional.get());
- }
-
- @Test
- public void testHasAnyProfileDefinedPositive() {
- //given
- BandwidthProfileComposition composition = builderWithOneProfile().build();
-
- //when
- boolean actual = composition.hasAnyProfileDefined();
-
- //then
- assertTrue(actual);
- }
-
- @Test
- public void testHasAnyProfileDefinedNegative() {
- //given
- BandwidthProfileComposition composition = builderWithNoProfile().build();
-
- //when
- boolean actual = composition.hasAnyProfileDefined();
-
- //then
- assertFalse(actual);
- }
-
- private BandwidthProfileComposition.BandwidthProfileCompositionBuilder builderWithAllProfiles() {
- return BandwidthProfileComposition.builder()
- .defaultIngressBwProfile(Optional.of(defaultIngressBwProfileMock))
- .defaultEgressBwProfile(Optional.of(defaultEgressBwProfileMock))
- .ingressBwProfilePerEvc(Optional.of(ingressBwProfilePerEvcMock))
- .egressBwProfilePerEvc(Optional.of(egressBwProfilePerEvcMock))
- .ingressBwProfilePerUni(Optional.of(ingressBwProfilePerUniMock))
- .egressBwProfilePerUni(Optional.of(egressBwProfilePerUniMock));
- }
-
- private BandwidthProfileComposition.BandwidthProfileCompositionBuilder builderWithOneProfile() {
- return BandwidthProfileComposition.builder()
- .defaultIngressBwProfile(Optional.empty())
- .defaultEgressBwProfile(Optional.empty())
- .ingressBwProfilePerEvc(Optional.empty())
- .egressBwProfilePerEvc(Optional.of(egressBwProfilePerEvcMock))
- .ingressBwProfilePerUni(Optional.empty())
- .egressBwProfilePerUni(Optional.empty());
- }
-
- private BandwidthProfileComposition.BandwidthProfileCompositionBuilder builderWithNoProfile() {
- return BandwidthProfileComposition.builder()
- .defaultIngressBwProfile(Optional.empty())
- .defaultEgressBwProfile(Optional.empty())
- .ingressBwProfilePerEvc(Optional.empty())
- .egressBwProfilePerEvc(Optional.empty())
- .ingressBwProfilePerUni(Optional.empty())
- .egressBwProfilePerUni(Optional.empty());
- }
-}
+++ /dev/null
-/*
- * Copyright (c) 2016 Cisco Systems Inc and others. All rights reserved.
- *
- * This program and the accompanying materials are made available under the
- * terms of the Eclipse Public License v1.0 which accompanies this distribution,
- * and is available at http://www.eclipse.org/legal/epl-v10.html
- */
-package org.opendaylight.unimgr.mef.nrp.cisco.xr.common.helper;
-
-import org.junit.Test;
-import org.junit.runner.RunWith;
-import org.opendaylight.controller.md.sal.binding.api.DataBroker;
-import org.opendaylight.unimgr.mef.nrp.common.ServicePort;
-import org.opendaylight.unimgr.utils.MdsalUtils;
-import org.opendaylight.yang.gen.v1.urn.mef.nrp.specs.rev160630.AdapterSpec1;
-import org.opendaylight.yang.gen.v1.urn.mef.nrp.specs.rev160630.TerminationSpec1;
-import org.opendaylight.yang.gen.v1.urn.mef.nrp.specs.rev160630.g_nrp_connadaptspec.EgressBwpFlow;
-import org.opendaylight.yang.gen.v1.urn.mef.nrp.specs.rev160630.g_nrp_connadaptspec.IngressBwpFlow;
-import org.opendaylight.yang.gen.v1.urn.mef.nrp.specs.rev160630.g_nrp_uni_terminationspec.EgressBwpUni;
-import org.opendaylight.yang.gen.v1.urn.mef.nrp.specs.rev160630.g_nrp_uni_terminationspec.IngressBwpUni;
-import org.opendaylight.yang.gen.v1.urn.mef.nrp.specs.rev160630.network.topology.topology.node.termination.point.ltp.attrs.lplist.lpspec.adapterspec.NrpConnAdaptSpecAttrs;
-import org.opendaylight.yang.gen.v1.urn.mef.nrp.specs.rev160630.network.topology.topology.node.termination.point.ltp.attrs.lplist.lpspec.adapterspec.NrpEvcEndpointConnAdaptSpecAttrs;
-import org.opendaylight.yang.gen.v1.urn.mef.nrp.specs.rev160630.network.topology.topology.node.termination.point.ltp.attrs.lplist.lpspec.terminationspec.NrpUniTerminationAttrs;
-import org.opendaylight.yang.gen.v1.urn.onf.core.network.module.rev160630.TerminationPoint1;
-import org.opendaylight.yang.gen.v1.urn.onf.core.network.module.rev160630.g_layerprotocol.LpSpec;
-import org.opendaylight.yang.gen.v1.urn.onf.core.network.module.rev160630.g_logicalterminationpoint.LpList;
-import org.opendaylight.yang.gen.v1.urn.onf.core.network.module.rev160630.network.topology.topology.node.termination.point.LtpAttrs;
-import org.opendaylight.yang.gen.v1.urn.onf.core.specs.rev160630.g_layerprotocolspec.AdapterSpec;
-import org.opendaylight.yang.gen.v1.urn.onf.core.specs.rev160630.g_layerprotocolspec.TerminationSpec;
-import org.opendaylight.yang.gen.v1.urn.tbd.params.xml.ns.yang.network.topology.rev131021.network.topology.topology.node.TerminationPoint;
-import org.powermock.api.mockito.PowerMockito;
-import org.powermock.core.classloader.annotations.PrepareForTest;
-import org.powermock.modules.junit4.PowerMockRunner;
-
-import java.util.ArrayList;
-import java.util.List;
-import java.util.Optional;
-
-import static org.junit.Assert.*;
-import static org.mockito.Mockito.mock;
-import static org.opendaylight.controller.md.sal.common.api.data.LogicalDatastoreType.CONFIGURATION;
-import static org.powermock.api.mockito.PowerMockito.when;
-
-@RunWith(PowerMockRunner.class)
-@PrepareForTest(MdsalUtils.class)
-public class BandwidthProfileHelperTest {
-
- @Test
- public void testRetrieveBandwidthProfiles() {
- //given
- ServicePort servicePort = mock(ServicePort.class);
-
- IngressBwpFlow expectedIngressDefaultBwp = mock(IngressBwpFlow.class);
- EgressBwpFlow expectedEgressDefaultBwp = mock(EgressBwpFlow.class);
- IngressBwpFlow expectedIngressEvcBwp = mock(IngressBwpFlow.class);
- EgressBwpFlow expectedEgressEvcBwp = mock(EgressBwpFlow.class);
- IngressBwpUni expectedIngressUniBwp = null;
- EgressBwpUni expectedEgressUniBwp = null;
-
- DataBroker dataBroker = mockDatastore(servicePort,
- Optional.ofNullable(expectedIngressDefaultBwp),
- Optional.ofNullable(expectedEgressDefaultBwp),
- Optional.ofNullable(expectedIngressEvcBwp),
- Optional.ofNullable(expectedEgressEvcBwp),
- Optional.ofNullable(expectedIngressUniBwp),
- Optional.ofNullable(expectedEgressUniBwp));
-
- //when
- List<BandwidthProfileComposition> actual = new BandwidthProfileHelper(dataBroker, servicePort).getBandwidthProfiles();
-
- //then
- assertNotNull(actual);
- assertEquals(1, actual.size());
-
- BandwidthProfileComposition actualBpc = actual.get(0);
- assertTrue(actualBpc.hasAnyProfileDefined());
-
- assertTrue(actualBpc.getDefaultIngressBwProfile().isPresent());
- assertEquals(expectedIngressDefaultBwp, actualBpc.getDefaultIngressBwProfile().get());
-
- assertTrue(actualBpc.getDefaultEgressBwProfile().isPresent());
- assertEquals(expectedEgressDefaultBwp, actualBpc.getDefaultEgressBwProfile().get());
-
- assertTrue(actualBpc.getIngressBwProfilePerEvc().isPresent());
- assertEquals(expectedIngressEvcBwp, actualBpc.getIngressBwProfilePerEvc().get());
-
- assertTrue(actualBpc.getEgressBwProfilePerEvc().isPresent());
- assertEquals(expectedEgressEvcBwp, actualBpc.getEgressBwProfilePerEvc().get());
-
- assertFalse(actualBpc.getIngressBwProfilePerUni().isPresent());
- assertFalse(actualBpc.getEgressBwProfilePerUni().isPresent());
- }
-
- @Test
- public void testRetrieveBandwidthProfilesNoQos() {
- //given
- ServicePort fcPort = mock(ServicePort.class);
-
- DataBroker dataBroker = mockDatastore(fcPort,
- Optional.empty(),
- Optional.empty(),
- Optional.empty(),
- Optional.empty(),
- Optional.empty(),
- Optional.empty());
-
- //when
- List<BandwidthProfileComposition> actual = new BandwidthProfileHelper(dataBroker, fcPort).getBandwidthProfiles();
-
- //then
- assertNotNull(actual);
- assertEquals(1, actual.size());
-
- BandwidthProfileComposition actualBpc = actual.get(0);
- assertFalse(actualBpc.hasAnyProfileDefined());
- assertFalse(actualBpc.getDefaultIngressBwProfile().isPresent());
- assertFalse(actualBpc.getDefaultEgressBwProfile().isPresent());
- assertFalse(actualBpc.getIngressBwProfilePerEvc().isPresent());
- assertFalse(actualBpc.getEgressBwProfilePerEvc().isPresent());
- assertFalse(actualBpc.getIngressBwProfilePerUni().isPresent());
- assertFalse(actualBpc.getEgressBwProfilePerUni().isPresent());
- }
-
- @Test
- public void testRetrieveBandwidthProfilesEmpty() {
- //given
- ServicePort fcPort = mock(ServicePort.class);
-
- DataBroker dataBroker = mockDatastoreEmpty(fcPort);
-
- //when
- List<BandwidthProfileComposition> actual = new BandwidthProfileHelper(dataBroker, fcPort).getBandwidthProfiles();
-
- //then
- assertNotNull(actual);
- assertEquals(0, actual.size());
- }
-
- private DataBroker mockDatastore(ServicePort servicePort,
- Optional<IngressBwpFlow> ingressDefaultBwp,
- Optional<EgressBwpFlow> egressDefaultBwp,
- Optional<IngressBwpFlow> ingressEvcBwp,
- Optional<EgressBwpFlow> egressEvcBwp,
- Optional<IngressBwpUni> ingressUniBwp,
- Optional<EgressBwpUni> egressUniBwp) {
- DataBroker dataBroker = mock(DataBroker.class);
-
- TerminationPoint tp = mock(TerminationPoint.class);
- TerminationPoint1 tp1 = mock(TerminationPoint1.class);
- LtpAttrs ltpAttrs = mock(LtpAttrs.class);
- LpList lpList = mock(LpList.class);
- LpSpec lpSpec = mock(LpSpec.class);
- List<LpList> lpLists = new ArrayList<>();
- lpLists.add(lpList);
-
- when(tp.getAugmentation(TerminationPoint1.class)).thenReturn(tp1);
- when(tp1.getLtpAttrs()).thenReturn(ltpAttrs);
- when(ltpAttrs.getLpList()).thenReturn(lpLists);
- when(lpList.getLpSpec()).thenReturn(lpSpec);
-
- AdapterSpec adapterSpec = mock(AdapterSpec.class);
- AdapterSpec1 adapterSpec1 = mock(AdapterSpec1.class);
- NrpEvcEndpointConnAdaptSpecAttrs evcAttrs = mock(NrpEvcEndpointConnAdaptSpecAttrs.class);
- NrpConnAdaptSpecAttrs connAdaptSpecAttrs = mock(NrpConnAdaptSpecAttrs.class);
-
- when(lpSpec.getAdapterSpec()).thenReturn(adapterSpec);
- when(adapterSpec.getAugmentation(AdapterSpec1.class)).thenReturn(adapterSpec1);
- when(adapterSpec1.getNrpConnAdaptSpecAttrs()).thenReturn(connAdaptSpecAttrs);
- when(adapterSpec1.getNrpEvcEndpointConnAdaptSpecAttrs()).thenReturn(evcAttrs);
-
- if (ingressDefaultBwp.isPresent()) {
- when(connAdaptSpecAttrs.getIngressBwpFlow()).thenReturn(ingressDefaultBwp.get());
- }
-
- if (egressDefaultBwp.isPresent()) {
- when(connAdaptSpecAttrs.getEgressBwpFlow()).thenReturn(egressDefaultBwp.get());
- }
-
- if (ingressEvcBwp.isPresent()) {
- when(evcAttrs.getIngressBwpFlow()).thenReturn(ingressEvcBwp.get());
- }
-
- if (egressEvcBwp.isPresent()) {
- when(evcAttrs.getEgressBwpFlow()).thenReturn(egressEvcBwp.get());
- }
-
- TerminationSpec terminationSpec = mock(TerminationSpec.class);
- TerminationSpec1 terminationSpec1 = mock(TerminationSpec1.class);
- NrpUniTerminationAttrs nrpUniTerminationAttrs = mock(NrpUniTerminationAttrs.class);
-
- when(lpSpec.getTerminationSpec()).thenReturn(terminationSpec);
- when(terminationSpec.getAugmentation(TerminationSpec1.class)).thenReturn(terminationSpec1);
- when(terminationSpec1.getNrpUniTerminationAttrs()).thenReturn(nrpUniTerminationAttrs);
-
- if (ingressUniBwp.isPresent()) {
- when(nrpUniTerminationAttrs.getIngressBwpUni()).thenReturn(ingressUniBwp.get());
- }
-
- if (egressUniBwp.isPresent()) {
- when(nrpUniTerminationAttrs.getEgressBwpUni()).thenReturn(egressUniBwp.get());
- }
-
- PowerMockito.mockStatic(MdsalUtils.class);
- when(BandwidthProfileHelper.readTerminationPoint(dataBroker, CONFIGURATION, servicePort)).thenReturn(com.google.common.base.Optional.of(tp));
-
- return dataBroker;
- }
-
- private DataBroker mockDatastoreEmpty(ServicePort servicePort) {
- DataBroker dataBroker = mock(DataBroker.class);
-
- PowerMockito.mockStatic(MdsalUtils.class);
- when(BandwidthProfileHelper.readTerminationPoint(dataBroker, CONFIGURATION, servicePort)).thenReturn(com.google.common.base.Optional.absent());
-
- return dataBroker;
- }
-}
+++ /dev/null
-<?xml version="1.0" encoding="UTF-8"?>
-<!--
-Copyright (c) 2015 Cisco Systems, Inc. All rights reserved.
-
-This program and the accompanying materials are made available under the
-terms of the Eclipse Public License v1.0 which accompanies this distribution,
-and is available at http://www.eclipse.org/legal/epl-v10.html INTERNAL
--->
-<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
- xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
- <parent>
- <groupId>org.opendaylight.mdsal</groupId>
- <artifactId>binding-parent</artifactId>
- <version>0.12.0-SNAPSHOT</version>
- <relativePath />
- </parent>
-
- <modelVersion>4.0.0</modelVersion>
- <groupId>org.opendaylight.unimgr</groupId>
- <artifactId>edgeassure-1000</artifactId>
- <version>0.4.0-SNAPSHOT</version>
- <packaging>bundle</packaging>
- <!-- <name> formatting is used by autorelease to parse and notify projects on
- build failure. Please do not modify this unless you have a good reason. -->
- <name>ODL :: unimgr :: ${project.artifactId}</name>
-
- <properties>
- <checkstyle.skip>true</checkstyle.skip>
- </properties>
-
- <dependencies>
-
- <dependency>
- <groupId>org.opendaylight.unimgr</groupId>
- <artifactId>unimgr-impl</artifactId>
- <version>0.4.0-SNAPSHOT</version>
- </dependency>
- <dependency>
- <groupId>org.opendaylight.mdsal.model</groupId>
- <artifactId>ietf-inet-types-2013-07-15</artifactId>
- </dependency>
- <dependency>
- <groupId>org.opendaylight.mdsal.model</groupId>
- <artifactId>ietf-yang-types-20130715</artifactId>
- </dependency>
- <dependency>
- <groupId>org.opendaylight.mdsal.model</groupId>
- <artifactId>iana-if-type-2014-05-08</artifactId>
- </dependency>
- <dependency>
- <groupId>org.opendaylight.mdsal.model</groupId>
- <artifactId>ietf-interfaces</artifactId>
- </dependency>
- </dependencies>
-
-</project>
\ No newline at end of file
+++ /dev/null
-/*
- * Copyright (c) 2016 Microsemi and others. All rights reserved.
- *
- * This program and the accompanying materials are made available under the
- * terms of the Eclipse Public License v1.0 which accompanies this distribution,
- * and is available at http://www.eclipse.org/legal/epl-v10.html
- */
-
-package org.opendaylight.unimgr.mef.nrp.edgeassure;
-
-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.MountPointService;
-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.MountPointHelper;
-import org.opendaylight.unimgr.mef.nrp.common.ResourceActivator;
-import org.opendaylight.unimgr.mef.nrp.common.ResourceNotAvailableException;
-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;
-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.tapi.common.rev170712.Uuid;
-import org.opendaylight.yangtools.yang.binding.InstanceIdentifier;
-import org.slf4j.Logger;
-import org.slf4j.LoggerFactory;
-
-import com.google.common.base.Optional;
-
-public class EdgeAssureActivator implements ResourceActivator {
-
- private static final Logger LOG = LoggerFactory.getLogger(EdgeAssureActivator.class);
- private MountPointService mountService;
- DataBroker baseDataBroker;
-
- EdgeAssureActivator(DataBroker dataBroker, MountPointService mountService) {
- this.mountService = mountService;
- baseDataBroker = dataBroker;
- }
-
- @Override
- public void activate(List<EndPoint> endPoints, String serviceName) throws ResourceNotAvailableException, TransactionCommitFailedException {
- LOG.info("Activation called on EdgeAssureActivator");
- Uuid sip = endPoints.get(0).getEndpoint().getServiceInterfacePoint();
- String nodeName = SipHandler.getDeviceName(sip);
- long evcId = 1;
-
- EvcBuilder evcBuilder = new EvcBuilder();
- evcBuilder.setEvcIndex(evcId).setName(new Identifier45("evc" + String.valueOf(evcId)));
- List<Evc> evcConfigs = new LinkedList<>();
- evcConfigs.add(evcBuilder.build());
-
- InstanceIdentifier<Evc> evcConfigId = InstanceIdentifier.builder(MefServices.class).child(Uni.class)
- .child(Evc.class, new EvcKey(evcId)).build();
-
- Optional<DataBroker> optional = MountPointHelper.getDataBroker(mountService, nodeName);
- if (optional.isPresent()) {
- DataBroker netconfDataBroker = optional.get();
- WriteTransaction w = netconfDataBroker.newWriteOnlyTransaction();
- w.merge(LogicalDatastoreType.CONFIGURATION, evcConfigId, evcBuilder.build());
- } else {
- LOG.error("");
- }
- }
-
- @Override
- public void deactivate(List<EndPoint> endPoints, String serviceName) throws TransactionCommitFailedException, ResourceNotAvailableException {
- LOG.info("Deactivation called on EdgeAssureActivator. Not yet implemented.");
- }
-}
\ No newline at end of file
+++ /dev/null
-/*
- * Copyright (c) 2016 Microsemi and others. All rights reserved.
- *
- * This program and the accompanying materials are made available under the
- * terms of the Eclipse Public License v1.0 which accompanies this distribution,
- * and is available at http://www.eclipse.org/legal/epl-v10.html
- */
-
-package org.opendaylight.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.ActivationDriver;
-import org.opendaylight.unimgr.mef.nrp.api.ActivationDriverBuilder;
-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.rev170712.NrpConnectivityServiceAttrs;
-import org.opendaylight.yang.gen.v1.urn.mef.yang.tapi.common.rev170712.Uuid;
-
-/**
- * Fake driver builder;
- * @author sean.condon@microsemi.com
- */
-public class EdgeAssureDriverBuilder implements ActivationDriverBuilder {
-
- private final FixedServiceNaming namingProvider;
- private final EdgeAssureActivator edgeAssureActivator;
-
- EdgeAssureDriverBuilder(DataBroker dataBroker, MountPointService mountService) {
- this.namingProvider = new FixedServiceNaming();
- edgeAssureActivator = new EdgeAssureActivator(dataBroker, mountService);
- }
-
- @Override
- public Optional<ActivationDriver> driverFor(BuilderContext context) {
- final ActivationDriver driver = new ActivationDriver() {
- List<EndPoint> endPoints;
- String serviceId;
-
- @Override
- public void commit() {
- //ignore for the moment
- }
-
- @Override
- public void rollback() {
- //ignore for the moment
- }
-
- @Override
- public void initialize(List<EndPoint> endPoints, String serviceId, NrpConnectivityServiceAttrs context) {
- this.endPoints = endPoints;
- this.serviceId = serviceId;
- }
-
- @Override
- public void activate() throws TransactionCommitFailedException, ResourceNotAvailableException {
- edgeAssureActivator.activate(endPoints,serviceId);
- }
-
- @Override
- public void deactivate() throws ResourceNotAvailableException, TransactionCommitFailedException {
- edgeAssureActivator.deactivate(endPoints,serviceId);
- }
-
- @Override
- public int priority() {
- return 0;
- }
- };
-
- return Optional.of(driver);
-
- }
-
- @Override
- public Uuid getNodeUuid() {
- return null;
- }
-}
+++ /dev/null
-package org.opendaylight.yang.gen.v1.urn.ietf.params.xml.ns.yang.ietf.inet.types.rev130715;
-
-
-/**
- * The purpose of generated class in src/main/java for Union types is to create new instances of unions from a string representation.
- * In some cases it is very difficult to automate it since there can be unions such as (uint32 - uint16), or (string - uint32).
- *
- * The reason behind putting it under src/main/java is:
- * This class is generated in form of a stub and needs to be finished by the user. This class is generated only once to prevent
- * loss of user code.
- *
- */
-public class HostBuilder {
-
- public static Host getDefaultInstance(java.lang.String defaultValue) {
- throw new java.lang.UnsupportedOperationException("Not yet implemented");
- }
-
-}
+++ /dev/null
-package org.opendaylight.yang.gen.v1.urn.ietf.params.xml.ns.yang.ietf.inet.types.rev130715;
-
-
-/**
- * The purpose of generated class in src/main/java for Union types is to create new instances of unions from a string representation.
- * In some cases it is very difficult to automate it since there can be unions such as (uint32 - uint16), or (string - uint32).
- *
- * The reason behind putting it under src/main/java is:
- * This class is generated in form of a stub and needs to be finished by the user. This class is generated only once to prevent
- * loss of user code.
- *
- */
-public class IpAddressBuilder {
-
- public static IpAddress getDefaultInstance(java.lang.String defaultValue) {
- throw new java.lang.UnsupportedOperationException("Not yet implemented");
- }
-
-}
+++ /dev/null
-package org.opendaylight.yang.gen.v1.urn.ietf.params.xml.ns.yang.ietf.inet.types.rev130715;
-
-
-/**
- * The purpose of generated class in src/main/java for Union types is to create new instances of unions from a string representation.
- * In some cases it is very difficult to automate it since there can be unions such as (uint32 - uint16), or (string - uint32).
- *
- * The reason behind putting it under src/main/java is:
- * This class is generated in form of a stub and needs to be finished by the user. This class is generated only once to prevent
- * loss of user code.
- *
- */
-public class IpAddressNoZoneBuilder {
-
- public static IpAddressNoZone getDefaultInstance(java.lang.String defaultValue) {
- throw new java.lang.UnsupportedOperationException("Not yet implemented");
- }
-
-}
+++ /dev/null
-package org.opendaylight.yang.gen.v1.urn.ietf.params.xml.ns.yang.ietf.inet.types.rev130715;
-
-
-/**
- * The purpose of generated class in src/main/java for Union types is to create new instances of unions from a string representation.
- * In some cases it is very difficult to automate it since there can be unions such as (uint32 - uint16), or (string - uint32).
- *
- * The reason behind putting it under src/main/java is:
- * This class is generated in form of a stub and needs to be finished by the user. This class is generated only once to prevent
- * loss of user code.
- *
- */
-public class IpPrefixBuilder {
-
- public static IpPrefix getDefaultInstance(java.lang.String defaultValue) {
- throw new java.lang.UnsupportedOperationException("Not yet implemented");
- }
-
-}
+++ /dev/null
-/*
- * This module has been generated by smidump 0.4.8:
- *
- * smidump -f yang ENTITY-STATE-TC-MIB
- *
- * Do not edit. Edit the source file instead!
- */
-
-module ENTITY-STATE-TC-MIB {
-
- /*** NAMESPACE / PREFIX DEFINITION ***/
-
- namespace "urn:ietf:params:xml:ns:yang:smiv2:ENTITY-STATE-TC-MIB";
- prefix "entity-state";
-
- /*** LINKAGE (IMPORTS / INCLUDES) ***/
-
-
- /*** META INFORMATION ***/
-
- organization
- "IETF Entity MIB Working Group";
-
- contact
- "General Discussion: entmib@ietf.org
- To Subscribe:
- http://www.ietf.org/mailman/listinfo/entmib
-
- http://www.ietf.org/html.charters/entmib-charter.html
-
- Sharon Chisholm
- Nortel Networks
- PO Box 3511 Station C
- Ottawa, Ont. K1Y 4H7
- Canada
- schishol@nortel.com
-
- David T. Perkins
- 548 Qualbrook Ct
- San Jose, CA 95110
- USA
- Phone: 408 394-8702
- dperkins@snmpinfo.com";
-
- description
- "This MIB defines state textual conventions.
-
- Copyright (C) The Internet Society 2005. This version
- of this MIB module is part of RFC 4268; see the RFC
- itself for full legal notices.";
-
- revision "2005-11-22" {
- description
- "Initial version, published as RFC 4268.";
- }
-
- /*** TYPE DEFINITIONS ***/
-
- typedef EntityAdminState {
- type enumeration {
- enum unknown { value 1; }
- enum locked { value 2; }
- enum shuttingDown { value 3; }
- enum unlocked { value 4; }
- }
- description
- " Represents the various possible administrative states.
-
-
-
-
-
- A value of 'locked' means the resource is administratively
- prohibited from use. A value of 'shuttingDown' means that
- usage is administratively limited to current instances of
- use. A value of 'unlocked' means the resource is not
- administratively prohibited from use. A value of
- 'unknown' means that this resource is unable to
- report administrative state.";
- }
-
- typedef EntityOperState {
- type enumeration {
- enum unknown { value 1; }
- enum disabled { value 2; }
- enum enabled { value 3; }
- enum testing { value 4; }
- }
- description
- " Represents the possible values of operational states.
-
- A value of 'disabled' means the resource is totally
- inoperable. A value of 'enabled' means the resource
- is partially or fully operable. A value of 'testing'
- means the resource is currently being tested
- and cannot therefore report whether it is operational
- or not. A value of 'unknown' means that this
- resource is unable to report operational state.";
- }
-
- typedef EntityUsageState {
- type enumeration {
- enum unknown { value 1; }
- enum idle { value 2; }
- enum active { value 3; }
- enum busy { value 4; }
- }
- description
- " Represents the possible values of usage states.
- A value of 'idle' means the resource is servicing no
- users. A value of 'active' means the resource is
- currently in use and it has sufficient spare capacity
- to provide for additional users. A value of 'busy'
- means the resource is currently in use, but it
- currently has no spare capacity to provide for
- additional users. A value of 'unknown' means
- that this resource is unable to report usage state.";
- }
-
- typedef EntityAlarmStatus {
- type bits {
- bit unknown { position 0; }
- bit underRepair { position 1; }
- bit critical { position 2; }
- bit major { position 3; }
- bit minor { position 4; }
- bit warning { position 5; }
- bit indeterminate { position 6; }
- }
- description
- " Represents the possible values of alarm status.
- An Alarm [RFC3877] is a persistent indication
- of an error or warning condition.
-
- When no bits of this attribute are set, then no active
- alarms are known against this entity and it is not under
- repair.
-
- When the 'value of underRepair' is set, the resource is
- currently being repaired, which, depending on the
- implementation, may make the other values in this bit
- string not meaningful.
-
- When the value of 'critical' is set, one or more critical
- alarms are active against the resource. When the value
- of 'major' is set, one or more major alarms are active
- against the resource. When the value of 'minor' is set,
- one or more minor alarms are active against the resource.
- When the value of 'warning' is set, one or more warning
- alarms are active against the resource. When the value
- of 'indeterminate' is set, one or more alarms of whose
- perceived severity cannot be determined are active
- against this resource.
-
- A value of 'unknown' means that this resource is
- unable to report alarm state.";
- }
-
- typedef EntityStandbyStatus {
- type enumeration {
- enum unknown { value 1; }
- enum hotStandby { value 2; }
- enum coldStandby { value 3; }
- enum providingService { value 4; }
- }
- description
- " Represents the possible values of standby status.
-
- A value of 'hotStandby' means the resource is not
- providing service, but it will be immediately able to
- take over the role of the resource to be backed up,
- without the need for initialization activity, and will
- contain the same information as the resource to be
- backed up. A value of 'coldStandy' means that the
- resource is to back up another resource, but will not
- be immediately able to take over the role of a resource
- to be backed up, and will require some initialization
- activity. A value of 'providingService' means the
- resource is providing service. A value of
- 'unknown' means that this resource is unable to
- report standby state.";
- }
-
-} /* end of module ENTITY-STATE-TC-MIB */
+++ /dev/null
-module msea-types {\r
- \r
- namespace "http://www.microsemi.com/microsemi-edge-assure/msea-types";\r
- prefix "msea-types"; //MicroSemi EdgeAssure (msea)\r
-\r
- organization\r
- "Microsemi Inc., FTD Division";\r
-\r
- contact \r
- "Web URL: http://www.microsemi.com/\r
- E-mail: info@microsemi.com\r
- Postal: Microsemi Corporation Corporate Headquarters\r
- One Enterprise Aliso Viejo, \r
- CA 92656\r
- U.S.A.\r
- Phone: +1 949 380 6100\r
- Fax: +1 949 215-4996";\r
-\r
- description \r
- "This module contains a collection of generally useful derived\r
- YANG data types for VLans and Meps and such.\r
- \r
- Copyright 2016 Microsemi Inc.\r
- All rights reserved.";\r
-\r
- revision "2016-02-29" {\r
- description \r
- "Initial version - Sean Condon, Microsemi";\r
- reference\r
- "Eagle EANTC Tail-f Inter-operation Summary Revision 1.0 16th Feb 2016";\r
- }\r
-\r
- //\r
- // Extensions related to Edge Assure\r
- //\r
- extension not-changeable {\r
- description\r
- "Marks the leaf as being settable at creation time \r
- only and not writable thereafter";\r
- }\r
- \r
- //\r
- // Type definitions related to Edge Assure\r
- //\r
- typedef mep-id-type {\r
- type uint16 {\r
- range "1..8191";\r
- }\r
-\r
- description\r
- "Maintenance association End Point Identifier (MEPID): A small integer,\r
- unique over a given Maintenance Association, identifying a\r
- specific MEP.";\r
- reference\r
- "[802.1q] 3.19 and 19.2.1";\r
- }\r
-\r
- typedef vlan-id-type {\r
- type uint16 {\r
- range "1..4094";\r
- }\r
-\r
- description\r
- "The VLAN-ID that uniquely identifies a VLAN. This is the 12-bit VLAN-ID\r
- used in the VLAN Tag header.";\r
-\r
- reference\r
- "[802.1q] 9.6";\r
- }\r
-\r
- typedef port-status-type {\r
- type enumeration {\r
- enum no-status-tlv {\r
- description "Indicates either that no CCM has been received or that \r
- no port status TLV was present in the last CCM received.";\r
- }\r
- enum blocked {\r
- description "Ordinary data cannot pass freely through the port on \r
- which the remote MEP resides. Value of enableRmepDefect \r
- is equal to false.";\r
- }\r
- enum up {\r
- description "Ordinary data can pass freely through the port on which\r
- the remote MEP resides. Value of enableRmepDefect is \r
- equal to true.";\r
- }\r
- } \r
-\r
- description\r
- "The set of values available from the Port Status TLV in CCM PDUs\r
- including the default no-status-tlv";\r
-\r
- reference\r
- "[802.1q] 20.19.3, 12.14.7.6.3:f\r
- IEEE8021-CFM-MIB.Dot1agCfmPortStatus";\r
- }\r
-\r
- typedef interface-status-type {\r
- type enumeration {\r
- enum no-status-tlv {\r
- description "Indicates either that no CCM has been received or that\r
- no interface status TLV was present in the last CCM received.";\r
- }\r
- enum up {\r
- description "The interface is ready to pass packets.";\r
- }\r
- enum down {\r
- description "The interface cannot pass packets.";\r
- }\r
- enum testing {\r
- description "The interface is in some test mode.";\r
- }\r
- enum unknown {\r
- description "The interface status cannot be determined for some reason.";\r
- }\r
- enum dormant {\r
- description "The interface is not in a state to pass\r packets but is in a pending state, waiting\r for some external event.";\r
- }\r
- enum not-present {\r
- description "Some component of the interface is missing.";\r
- }\r
- enum lower-layer-down {\r
- description "The interface is down due to state of the lower layer \r
- interfaces.";\r
- }\r
- }\r
-\r
- description\r
- "The set of values available from the Interface Status TLV in CCM PDUs\r
- including the default no-status-tlv";\r
- reference\r
- "[802.1q] 20.19.4, 12.14.7.6.3:g\r
- IEEE8021-CFM-MIB.Dot1agCfmInterfaceStatus";\r
- }\r
- \r
- typedef mac-address-and-uint-type {\r
- type binary {\r
- length "8";\r
- } \r
- description\r
- "A MAC address and a two-octet unsigned integer";\r
- reference\r
- "[802.1q] IEEE8021-CFM-MIB.Dot1agCfmMaintDomainNameType";\r
- }\r
-\r
- typedef md-level-type {\r
- type uint8 {\r
- range "0..7";\r
- }\r
-\r
- description\r
- "Maintenance Domain Level (MD Level) identifier. Higher numbers\r
- correspond to higher Maintenance Domains, those with the greatest\r
- physical reach, with the highest values for customers' CFM PDUs.\r
- Lower numbers correspond to lower Maintenance Domains, those with\r
- more limited physical reach, with the lowest values for CFM PDUs\r
- protecting single bridges or physical links.";\r
-\r
- reference\r
- "[802.1q] 18.3, 21.4.1, IEEE8021-CFM-MIB.Dot1agCfmMDLevel";\r
- }\r
-\r
- typedef priority-type {\r
- type uint8 {\r
- range "0..7";\r
- }\r
-\r
- description\r
- "A 3 bit priority value to be used in the VLAN tag, if present\r
- in the transmitted frame.";\r
- reference\r
- "[802.1q] 12.14.7.3.2:e";\r
- }\r
- \r
- typedef cos-color-type {\r
- type enumeration {\r
- enum "green" {\r
- description "Change color to green";\r
- }\r
- enum "yellow" {\r
- description "Change color to yellow";\r
- }\r
- enum "drop" {\r
- description "Delete color information";\r
- }\r
- }\r
- description\r
- "TBD";\r
- reference "[MEF23.1].";\r
- }\r
- \r
- typedef service-list-type {\r
- type string {\r
- length "0..255";\r
- pattern "\d*([,:]\d*)?";\r
- }\r
- description \r
- "An octet string containing a list of item values.\r
- \r
- An item value is an arbitrary string of octets from\r
- ASCII character 0x30 - 0x39, but may not contain \r
- a delimiter character. Delimiter characters are \r
- defined to be one of the following:\r
- \r
- - An ASCII comma character (0x2C)\r
- - An ASCII colon character (0x3A)\r
- \r
- Delimiter characters are used to separate item values\r
- in a item list. Only a single delimiter character may\r
- occur between two item values. A item value may not\r
- have a zero length. These constraints imply certain\r
- restrictions on the contents of this object:\r
- \r
- - There cannot be a leading or trailing delimiter\r
- character.\r
- \r
- - There cannot be multiple adjacent delimiter\r
- characters.\r
- \r
- The 'comma' delimiter separates individual items or a\r
- sequence of items. The 'colon' delimiter indicates a range\r
- of items from the first item before the colon through the\r
- last item after the colon. Individual ranges in the same\r
- item list need to be separated by a 'comma'.\r
- \r
- Some examples of valid item lists are:\r
- \r
- - '' -- an empty list\r
- - '1234' -- list of one item\r
- - '10,11,12' -- list of several items\r
- - '10:20' -- a list containing all the valid values from\r
- 10 through 20\r
- \r
- Note that although an item value may not have a length of\r
- zero, an empty string is still valid. This indicates\r
- an empty list (i.e. there are no tag values in the list).\r
- \r
- The use of the item list is to select one or more items at\r
- one time with a single object instead of having separate row\r
- entries in a table for each individual item.";\r
- }\r
- \r
- \r
- typedef service-preservation-type {\r
- type enumeration {\r
- enum preserve { \r
- description "The type of service is preserved, either CE-VLAN ID or \r
- CE-VLAN CoS as indicated by the specific object";\r
- }\r
- enum noPreserve { \r
- description "The type of service is not preserved, either CE-VLAN ID\r
- or CE-VLAN CoS as indicated by the specific object.";\r
- }\r
- }\r
- description \r
- "Configures the EVC preservation attributes.";\r
- reference \r
- "[MEF 6.1] 6.1; [MEF 7.2] 6.2.1.3";\r
- }\r
-\r
- typedef service-delivery-type {\r
- type enumeration {\r
- enum discard { \r
- description "Service Frames are discarded";\r
- }\r
- enum unconditional { \r
- description "Service Frames are unconditionally delivered no matter the \r
- content of the Service Frame. An example of this is a \r
- Point-to-Point EVC";\r
- }\r
- enum conditional { \r
- description "Service Frame are conditionally delivered to the \r
- destination UNI. The condition is specified, for example via a\r
- bandwidth profile or unicast MAC address learning.";\r
- }\r
- }\r
- description \r
- "A MEF service can have one of three different delivery types.";\r
- reference \r
- "[MEF 6.1] 6.0";\r
- }\r
-\r
- \r
- typedef identifier45 {\r
- type string {\r
- length "min..45";\r
- }\r
- description\r
- "This type definition accepts any visible ASCII character " +\r
- "plus the <space> character.The string must be RFC 2579 " +\r
- "Display " +\r
- "String but not contain the characters 0.00 through 0.1f " +\r
- "It does not accept the <delete> character despite the " +\r
- "current MEF specification.";\r
- reference "MEF 10.3 [R8], [R9]";\r
- }\r
-}
\ No newline at end of file
+++ /dev/null
-module msea-uni-evc-interface {
-
- namespace "http://www.microsemi.com/microsemi-edge-assure/msea-uni-evc-interface";
- prefix "msea-if"; //MicroSemi EdgeAssure (msea)
-
- import ietf-yang-types {
- prefix yang;
- revision-date 2013-07-15;
- }
-
- import msea-types {
- prefix msea;
- revision-date 2016-02-29;
- }
-
- import ietf-interfaces {
- prefix "if";
- }
-
- import iana-if-type {
- prefix "ianaift";
- }
-
- organization
- "Microsemi Inc., FTD Division";
-
- contact
- "Web URL: http://www.microsemi.com/
- E-mail: info@microsemi.com
- Postal: Microsemi Corporation Corporate Headquarters
- One Enterprise Aliso Viejo,
- CA 92656
- U.S.A.
- Phone: +1 949 380 6100
- Fax: +1 949 215-4996";
-
-
- description
- "This YANG module is based on the MEF 40 SNMP model, for the management
- objects for the management of User Network Interfaces (UNIs).
- It has been converted to YANG and modified slightly to suit the
- EdgeAssure SFP which has some extra constraints that are not handled by
- the original model
-
- Copyright 2016 Microsemi Inc.
- All rights reserved.";
-
- reference
- "***************************************************************************
- Reference Overview
-
- A number of base documents have been used to create this MIB. The following
- are the abbreviations for the baseline documents:
- [MEF 40] refers to SNMP MIB
- [MEF6.1] refers to MEF 6.1 'Ethernet Services Definitions - Phase 2',
- April 2008
- [MEF 6.1.1] refers to MEF 6.1.1 'Layer 2 Control Protocol Handling Amendment
- to MEF 6.1', January 2012
- [MEF 7.2] refers to MEF 7.2 'Carrier Ethernet Management Information Model',
- January 2013
- [MEF 10.2] refers to MEF 10.2 'Ethernet Services Attributes Phase 2',
- October 2009
- [MEF 26.1] refers to MEF 26.1 'External Network Network Interface (ENNI) -
- Phase 2', January 2012
- [Q.840.1] refers to 'ITU-T Requirements and analysis for NMS-EMS
- management interface of Ethernet over Transport and Metro Ethernet
- Network (EoT/MEN)', March 2007
- ****************************************************************************";
-
- revision "2016-03-17" {
- description
- "Initial Version. Sean Condon - Microsemi";
- reference "MEF 6.2";
- }
-
-
- typedef MefServiceInterfaceType {
- type bits {
-// bit bUni1d1;
-// bit bUni1d2;
- bit bUni2d1 {description "Only bUni2d1 is supported by EdgeAssure 1000";}
-// bit bUni2d2;
-// bit bEnni;
-// bit bEnniVuni;
- }
-
- default "bUni2d1";
- description
- "A MEF Interface can be one of several types:
-
- bUni1d1 UNI Type 1.1 See MEF 13. Non-multiplexed UNI for services such as EPL,
- bUni1d2 UNI Type 1.2 See MEF 13. Multiplexed UNI for services such as EVPL,
- bUni2d1 UNI Type 2.1 See MEF 20 section 7
- bUni2d2 UNI Type 2.2 See MEF 20 section 7
- bEnni ENNI
- bEnniVuni VUNI on an ENNI";
- reference
- "[MEF 6.1] 6.0";
- }
-
- typedef l2cp-dest-mac-address {
- type string {
- pattern '01-80-[cC]2-(00-){2}[02][0-9a-fA-F]|01:80:[cC]2:(00:){2}[02][0-9a-fA-F]';
- }
- description
- "The L2CP Destination MAC address for CoS
- Identifier type of 'l2cp' and is ignored for other types.
-
- Valid values are 01-80-C2-00-00-00 through 01-80-C2-00-00-0F and
- 01-80-C2-00-00-20 through 01-80-C2-00-00-2F
-
- Values can be upper or lower case and can be separated by hyphen or colon (but not both)";
- }
-
-
-
- typedef l2cp-destination-address {
- type enumeration {
- enum destinationAddressOnly {
- description "L2CP selection is determined by
- MAC Destination Address only";
- }
-
-// enum daPlusProtocol {
-// description "L2CP selection is determined by
-// MAC Destination Address plus
-// Ethernet protocol";
-// }
-//
-// enum daPlusProtocolPlusSubtype {
-// description "L2CP selection is determined by
-// MAC Destination Address plus
-// Ethernet protocol plus subtype";
-// }
- }
- }
-
-/*** OBJECT DEFINITIONS ***/
- //
- // Augments ietf-interfaces (only of type ethernetCsmacd) with MEF Services
- //
- augment "/if:interfaces/if:interface" {
- when "if:type='ianaift:ethernetCsmacd' and (if:name='eth0' or if:name='eth1')";
-
- leaf frame-format { //aka mefServiceInterfaceCfgFrameFormat
- type enumeration {
- enum noTag {
- description "Indicates that all data on the interface
- is regarded as untagged, regardless of it ingress type"; }
- enum ctag {
- description "Ingress frames with CTAG(vlan>0) will be
- regared as 'VLAN tagged'; with CTAG(vlan=0) as Priority; otherwise untagged";
- }
- enum stag {
- description "Ingress frames with STAG(vlan>0) will be
- regared as 'VLAN tagged'; with STAG(vlan=0) as Priority; otherwise untagged";
- }
-// enum stagCtag { description "Indicates that service traffic identified
-// with both an S-TAG (outer tag) and a C-TAG
-// (inner tag)"; }
- }
- //default noTag; --These defaults break the validation - not using them in Eagle
- description
- "This object indicates the interface frame format type that the
- interface can recognize.";
- reference
- "[MEF 6.1] 6.0";
- }
-
- leaf interface-ingress-bwp-group-index { //aka mefServiceInterfaceCfgIngressBwpGrpIndex
- type leafref {
- path "/if:interfaces/msea-if:interface-profiles/msea-if:interface-bwp-group/msea-if:group-index";
- }
- description
- "This object is the index number of the ingress bandwidth profile group
- associated with the current interface. A value of 0 indicates that no
- interface ingress bandwidth profile group is associated with the
- interface.
-
- This index indicates the specific bandwidth profile group previously
- configured via mefServiceBwpGrpCfgTable and mefServiceBwpCfgTable
- using this value for mefServiceBwpGrpCfgIndex. There may be multiple
- entries in mefServiceBwpCfgTable using this index, each containing
- bandwidth parameters for a different Class of Service Identifier.";
- reference
- "[MEF 6.1] 6.0; [MEF 7.2] 6.2.1.2";
- }
-
- leaf ce-vid-untagged { //aka mefServiceUniCfgCeVidUntagged
- type msea:vlan-id-type;
-
- description
- "Configures the CE VLAN ID associated with untagged and priority
- Service Frames. It allows the identification of untagged and
- priority tagged traffic with a specific CE-VLAN ID. This object
- is ignored for all to one bundling at the UNI.
- This attribute has been placed on the interface (rather than the UNI)
- as it can be defined regardless of whether a UNI exists or not";
- reference
- "[MEF 6.1] 6.0, [MEF 7.2] 6.2.1.2";
- }
-
- leaf ce-priority-untagged { //aka mefServiceUniCfgCePriorityUntagged
- type msea:priority-type;
-
- description
- "Configures the CE VLAN Priority associated with untagged Service
- Frames. It allows the assignment of a specific VLAN priority to
- untagged traffic. This object is ignored for all to one bundling
- at the UNI.
- This attribute has been placed on the interface (rather than the UNI)
- as it can be defined regardless of whether a UNI exists or not";
- reference
- "[MEF 7.2] 6.2.1.2";
- }
-
- leaf admittance-criteria {
- type enumeration {
- enum admitAll { description "Admit all frames";}
- enum admitPrioUntaggedOnly { description "Admit only frames that are not Priority tagged";}
- enum admitVlanOnly { description "Admit only frames that are VLAN tagged";}
- }
-
-// default admitAll;
-
- description "Criteria for admitting packets to this interface.
- The Frame Format attribute to determintes how frames are tagged";
- }
-
- } //End augment "/if:interfaces/if:interface
-
-
- augment "/if:interfaces-state/if:interface" {
-
- leaf max-vc { //aka mefServiceInterfaceStatusMaxVc
- type uint32 {
- range "1..4095";
- }
- description
- "This object indicates the maximum number of virtual channels that the
- interface can support. A virtual connection can be an Ethernet Virtual
- Connection (EVC) or an Operator Virtual Connection (OVC) depending upon
- the type of interface that is selected. ";
- reference
- "[MEF 6.1] 6.0; [MEF 7.2] 6.2.1.2";
- }
-
- leaf max-end-point-per-vc { //aka mefServiceInterfaceStatusMaxEndPointPerVc
- type uint32 {
- range "1..10";
- }
- description
- "This object indicates the interface maximum number of end points per
- virtual channel. It can be used to indicate the maximum number of OVC
- end points per OVC. It has no current applicability for EVCs. ";
- reference
- "[MEF 26.1]";
- }
- } //End augment "/if:interfaces-state/if:interface"
-
-
- augment "/if:interfaces-state/if:interface/if:statistics" {
-
- leaf ingress-undersized { //aka mefServiceInterfaceStatisticsIngressUndersized
- type yang:counter32;
- units "Ethernet frames";
- description
- "This object is incremented for each frame received
- on a NE interface that was smaller than 64 octets.
-
- This object defaults to '0'. ";
- reference
- "[MEF 15] 8.2; [Q.840.1] 6.2.4";
- }
-
- leaf ingress-oversized { //aka mefServiceInterfaceStatisticsIngressOversized
- type yang:counter32;
- units "Ethernet frames";
- description
- "This object is incremented for each frame received
- on a NE interface that was larger than the maximum MTU size.
-
- This object defaults to '0'.";
- reference
- "[MEF 15] 8.2; [Q.840.1] 6.2.4";
- }
-
- leaf ingress-fragments { //aka mefServiceInterfaceStatisticsIngressFragments
- type yang:counter32;
- units "Ethernet frames";
- description
- "This object is incremented for each frame received
- on a NE interface that was less than 64 octets in length
- (excluding framing bits but including FCS octets) and had
- either a bad Frame Check Sequence (FCS) with an integral
- number of octets (FCS Error) or a bad FCS with a non-integral
- number of octets (Alignment Error).
-
- Note that it is entirely normal for this counter to
- increment. This is because it counts both runts (which are
- normal occurrences due to collisions) and noise hits.
-
- This object defaults to '0'.";
- reference
- "[MEF 15] 8.2; [Q.840.1] 6.2.4";
- }
-
- leaf ingress-crc-alignment { //aka mefServiceInterfaceStatisticsIngressCrcAlignment
- type yang:counter32;
- units "Ethernet frames";
- description
- "This object is incremented for each frame received
- on a NE interface that was from 64 octets to the maximum MTU
- size in length, but had either a bad Frame Check Sequence (FCS)
- with an integral number of octets (FCS Error) or a bad FCS with
- a non-integral number of octets (Alignment Error).
-
- This object defaults to '0'.";
- reference
- "[MEF 15] 8.2; [Q.840.1] 6.2.4";
- }
-
- leaf ingress-invalid-vid { //aka mefServiceInterfaceStatisticsIngressInvalidVid
- type yang:counter32;
- units "Ethernet frames";
- description
- "This object is incremented for each frame received
- on a NE interface with an invalid VLAN ID.
-
- This object defaults to '0'.";
- reference
- "[MEF 15] 8.2; [Q.840.1] 6.2.4";
- }
-
- leaf ingress-octets { //aka mefServiceInterfaceStatisticsIngressOctets
- type yang:counter64;
- units "octets";
- description
- "This object is incremented by the number of octets in a
- valid frame received on a NE interface.
-
- This object defaults to '0'.";
- reference
- "[MEF 15] 8.2; [Q.840.1] 6.2.4";
- }
-
- leaf ingress-unicast { //aka mefServiceInterfaceStatisticsIngressUnicast
- type yang:counter64;
- units "Ethernet frames";
- description
- "This object is incremented for each valid unicast frame received
- on a NE interface.
-
- NEs that do not support 64 bit counters can return the
- upper half of the counter as all zeros.
-
- This object defaults to '0'.";
- reference
- "[MEF 15] 8.2; [Q.840.1] 6.2.4";
- }
-
- leaf ingress-multicast { //aka mefServiceInterfaceStatisticsIngressMulticast
- type yang:counter64;
- units "Ethernet frames";
- description
- "This object is incremented for each valid multicast frame received
- on a NE interface.
-
- ME-NEs that do not support 64 bit counters can return the
- upper half of the counter as all zeros.
-
- This object defaults to '0'.";
- reference
- "[MEF 15] 8.2; [Q.840.1] 6.2.4";
- }
-
- leaf ingress-broadcast { //aka mefServiceInterfaceStatisticsIngressBroadcast
- type yang:counter64;
- units "Ethernet frames";
- description
- "This object is incremented for each valid broadcast frame received
- on a NE interface.
-
- ME-NEs that do not support 64 bit counters can return the
- upper half of the counter as all zeros.
-
- This object defaults to '0'.";
- reference
- "[MEF 15] 8.2; [Q.840.1] 6.2.4";
- }
-
- leaf egress-octets { //aka mefServiceInterfaceStatisticsEgressOctets
- type yang:counter64;
- units "octets";
- description
- "This object is incremented by the number of octets in a frame
- transmitted on a NE interface.
-
- This object defaults to '0'.";
- reference
- "[MEF 15] 8.2; [Q.840.1] 6.2.4";
- }
-
- leaf egress-unicast { //aka mefServiceInterfaceStatisticsEgressUnicast
- type yang:counter64;
- units "Ethernet frames";
- description
- "This object is incremented for each unicast frame transmitted on a
- NE interface.
-
- ME-NEs that do not support 64 bit counters can return the
- upper half of the counter as all zeros.
-
- This object defaults to '0'.";
- reference
- "[MEF 15] 8.2; [Q.840.1] 6.2.4";
- }
-
- leaf egress-multicast { //aka mefServiceInterfaceStatisticsEgressMulticast
- type yang:counter64;
- units "Ethernet frames";
- description
- "This object is incremented for each multicast frame transmitted on a
- NE interface.
-
- ME-NEs that do not support 64 bit counters can return the
- upper half of the counter as all zeros.
-
- This object defaults to '0'.";
- reference
- "[MEF 15] 8.2; [Q.840.1] 6.2.4";
- }
-
- leaf egress-broadcast { //aka mefServiceInterfaceStatisticsEgressBroadcast
- type yang:counter64;
- units "Ethernet frames";
- description
- "This object is incremented for each broadcast frame transmitted on a
- NE interface.
-
- ME-NEs that do not support 64 bit counters can return the
- upper half of the counter as all zeros.
-
- This object defaults to '0'.";
- reference
- "[MEF 15] 8.2; [Q.840.1] 6.2.4";
- }
- } //End augment "/if:interfaces-state/if:interface/if:statistics
-
-
- augment "/if:interfaces-state" {
- leaf mef-service-type-options { //aka mefServiceInterfaceStatusType
- type MefServiceInterfaceType;
- description
- "This object is a vector of bits that indicates the possible
- interface types that an interface can be configured to. An interface,
- for instance, can be configured to be a UNI type 1 or 2, or an ENNI.
-
- All the possible capabilities of an interface are indicated, one bit
- per possible type. At least one bit must be set for MEF compliant NEs.";
- reference
- "[MEF 6.1] 6.0";
- }
- } //End augment "/if:interfaces-state
-
-
-
- augment "/if:interfaces" {
- leaf l2cp-group-index { //aka mefServiceInterfaceCfgL2cpGrpIndex
- type leafref {
- path "/if:interfaces/msea-if:interface-profiles/msea-if:l2cp-group/msea-if:group-index";
- }
- description
- "This object is the index of the L2CP profile group
- (mefServiceL2cpGrpCfgIndex) associated with the current interface. A
- value of 0 indicates that no interface L2CP profile group is associated
- with the interface. The L2CP group must be the same for both interfaces";
- reference
- "[MEF 6.1] 6.0; [MEF 6.1.1] 8.0; [MEF 7.2] 6.2.1.2";
-
-// must "count(//if:interfaces/if:interface[msea-if:l2cp-group-index = current()]) = 2" {
-// error-app-tag "msea-if-must-01";
-// error-message "The same L2CP Group must be used on both interfaces of this device";
-// }
- }
-
- leaf mef-service-type { //aka mefServiceInterfaceCfgType
- type MefServiceInterfaceType;
- description
- "This object indicates the configured interface type. One
- bit in the vector can be set at one time based upon the
- possible values indicated by mefServiceInterfaceStatusType.";
- //default bUni1d1; --These defaults break the validation - not using them in Eagle
- reference
- "[MEF 6.1] 6.0; [MEF 7.2] 6.2.1.1, 6.2.1.2, 6.2.1.3";
- }
-
-
- container interface-profiles {
-
- list interface-bwp-group { //aka mefServiceBwpGrpCfgEntry
-
- key "group-index";
- max-elements 64;
- description
- "Bandwidth profile group settings table entry.";
-
- leaf group-index { //aka mefServiceBwpGrpCfgIndex
- type uint8;
- description
- "Bandwidth profile group index number";
- }
-
- list interface-bwp { //aka mefServiceBwpCfgEntry
- key "cos-index";//Changed to cos-index (from bwp-index) based on MEP 40 6.4.2
- unique name;
- max-elements 64;
-
- description
- "Bandwidth profile. This maps 1:1 with a COS instance. This object is
- maintained here to keep the traditional layout of BWPGroup-BWP-COS, but does
- not have any other purpose in the current implementation";
-
- leaf cos-index { //aka mefServiceBwpCfgCosIndex
- type leafref {
- path "/if:interfaces/msea-if:interface-profiles/msea-if:interface-cos/msea-if:cos-index";
- }
- description
- "This object is the index number of the CoS ID profile
- associated with the current bandwidth profile. A value of 0 indicates
- that no CoS ID profile is associated with the bandwidth profile and the
- bandwidth profile applies to all CoS IDs.
-
- This index indicates a specific CoS ID profile previously configured via
- mefServiceCosCfgTable as indicated by the mefServiceCosCfgIndex object.";
- reference
- "[MEF 6.1] 6.1; [MEF 7.2] 6.2.1.3";
-
- must "current()/../../msea-if:group-index > 0" {
- error-app-tag "msea-if-must-02";
- error-message "No BWP's can be added to the Bandwidth Profile Group 0, as this index represents a special case";
- }
- }
-
- leaf name { //mefServiceBwpCfgIdentifier
- type string {
- length "1..45";
- }
- mandatory true;
- description
- "This object indicates the bandwidth profile identifier for the
- associated bandwidth profile index and is an arbitrary
- text string that is used to identify a bandwidth profile. Unique
- string values are chosen to uniquely identify the bandwidth
- profile.
-
- Octet values of 0x00 through 0x1f are illegal.
-
- MEF 26.1 restricts the maximum size identifiers to 45 octets.";
- reference
- "[MEF 6.1] 6.0, 6.1, 6.2, 6.3; [MEF 7.2] 6.2.1.2, 6.2.1.3";
- }
-// The attributes of BWP Group are not made visible here as they are not used in the device
-// leaf committed-information-rate { //aka mefServiceBwpCfgCir
-// type uint32 {
-// range "0..10000000";
-// }
-// units "kbits/s";
-// default 1000000;
-// msea:not-changeable;
-//
-// description
-// "This object indicates the Committed Information Rate (CIR) in kbits/s
-// and defines the average rate in kbits/sec up to which
-// the network delivers Service Frames. Service Frames that meet
-// the CIR are said to be in profile or in conformance to performance
-// objectives. These frames are generally identified as 'Green'
-// Service Frames.";
-// reference
-// "[MEF 6.1] 6.0, 6.1, 6.2, 6.3; [MEF 7.2] 6.2.1.2, 6.2.1.3";
-// }
-//
-// leaf committed-burst-size { //aka mefServiceBwpCfgCbs
-// type uint32 {
-// range "0..10000000";
-// }
-// units "bytes";
-// default 12;
-// msea:not-changeable;
-//
-// description
-// "This object indicates the Committed Burst Size (CBS) in bytes. It limits
-// the maximum number of bytes available for a burst of Service Frames sent
-// at interface speed to remain CIR-conformant.";
-// reference
-// "[MEF 10.2]";
-// }
-//
-// leaf excess-information-rate { //aka mefServiceBwpCfgEir
-// type uint32 {
-// range "0..10000000";
-// }
-// units "kbits/s";
-// msea:not-changeable;
-//
-// description
-// "This object indicates the Excess Information Rate (EIR) in kbits/s
-// and defines the average rate in kbits/sec of Service Frames up to
-// which the network may deliver Service Frames but without performance
-// objectives. Service Frames that meet the EIR as set to be in out-of-
-// profile or not in conformance to performance objectives. These
-// frames are not guaranteed to be delivered and are generally identified
-// as 'Yellow' service frames.";
-// reference
-// "[MEF 6.1] 6.0, 6.1, 6.2, 6.3; [MEF 7.2] 6.2.1.2, 6.2.1.3";
-// }
-//
-// leaf excess-burst-size { //aka mefServiceBwpCfgEbs
-// type uint32 {
-// range "0..10000000";
-// }
-// units "bytes";
-// msea:not-changeable;
-//
-// description
-// "This object indicates the Excess Burst Size (EBS) in bytes. It limits
-// the maximum number of bytes available for a burst of Service Frames
-// sent at the interface speed to remain EIR-conformant.";
-// reference
-// "[MEF 6.1] 6.0, 6.1, 6.2, 6.3; [MEF 7.2] 6.2.1.2, 6.2.1.3";
-// }
-//
-// leaf color-mode { //aka mefServiceBwpCfgCm
-// type enumeration {
-// enum colorBlind {description "A bandwidth profile property where ingress
-// Service Frames are not pre-colored for either
-// green or yellow, and if present, is ignored when
-// determining the level of compliance for each
-// Service Frame";
-// }
-//
-// enum colorAware {
-// description "A bandwidth profile property were a pre-determined
-// level of Bandwidth Profile compliance for each
-// Service Frame is taken into account when determining
-// the level of compliance for each Service Frame.
-// Each service frame can be colored red (discarded),
-// yellow (conditional delivery), or green (unconditional
-// delivery.";
-// }
-// }
-// default colorBlind;
-// msea:not-changeable;
-//
-// description
-// "This object configures the bandwidth profile color mode.";
-//
-// reference
-// "[MEF 6.1] 6.0, 6.1, 6.2, 6.3; [MEF 7.2] 6.2.1.2, 6.2.1.3";
-// }
-//
-// leaf coupling-flag { //aka mefServiceBwpCfgCf
-// type enumeration {
-// enum couplingYellowEirOnly {
-// description "The long term average bit rate of Service
-// Frames that are declared Yellow is bounded by EIR.";
-// }
-//
-// enum couplingYellowEirPlusCir {
-// description "The long term average bit rate of Service
-// Frames that are declared Yellow is bounded
-// by CIR + EIR depending on the volume of
-// the offered Service Frames that are
-// declared Green.";
-// }
-// }
-//
-// default couplingYellowEirOnly;
-// msea:not-changeable;
-//
-// description
-// "This object configures the bandwidth profile coupling flag and has
-// the effect of controlling the volume of the Service Frames that are
-// declared Yellow.";
-//
-// reference
-// "[MEF 6.1] 6.0, 6.1, 6.2, 6.3; [MEF 7.2] 6.2.1.2, 6.2.1.3";
-// }
-//
-// container performance { //aka mefServicePerformanceEntry
-// config false;
-// description
-// "Traffic Performance Data Set profile settings table entry.";
-//
-// leaf ingress-green-frames { //aka mefServicePerformanceIngressGreenFrameCount
-// type yang:counter64;
-// units "Ethernet frames";
-//
-// description
-// "This object indicates the number of green frames that were
-// received on a ME-NE for the associated bandwidth profile.
-//
-// ME-NEs that do not support 64 bit counters can return the
-// upper half of the counter as all zeros.
-//
-// This object defaults to '0'. ";
-// reference
-// "[MEF 15] 8.2; [Q.840.1] 6.2.4";
-// }
-//
-// leaf ingress-yellow-frames { //aka mefServicePerformanceIngressYellowFrameCount
-// type yang:counter64;
-// units "Ethernet frames";
-//
-// description
-// "This object indicates the number of yellow frames that were
-// received on the ME-NE for the associated bandwidth profile.
-//
-// ME-NEs that do not support 64 bit counters can return the
-// upper half of the counter as all zeros.
-//
-// This object defaults to '0'. ";
-// reference
-// "[MEF 15] 8.2; [Q.840.1] 6.2.4";
-// }
-//
-// leaf ingress-red-frames { //aka mefServicePerformanceIngressRedFrameCount
-// type yang:counter64;
-// units "Ethernet frames";
-// description
-// "This object indicates the number of red frames that were
-// received on the ME-NE for the associated bandwidth profile.
-//
-// ME-NEs that do not support 64 bit counters can return the
-// upper half of the counter as all zeros.
-//
-// This object defaults to '0'. ";
-// reference
-// "[MEF 15] 8.2; [Q.840.1] 6.2.4";
-// }
-//
-//
-// leaf ingress-green-frame-discards { //aka mefServicePerformanceIngressGreenFrameDiscards
-// type yang:counter64;
-// units "Ethernet frames";
-// description
-// "This object indicates the number of green frames that were
-// discarded due to congestion within the ME-NE for the
-// associated bandwidth profile.
-//
-// ME-NEs that do not support 64 bit counters can return the
-// upper half of the counter as all zeros.
-//
-// This object defaults to '0'. ";
-// reference
-// "[MEF 15] 8.2; [Q.840.1] 6.2.4";
-// }
-//
-// leaf ingress-yellow-frame-discards { //aka mefServicePerformanceIngressYellowFrameDiscards
-// type yang:counter64;
-// units "Ethernet frames";
-// description
-// "This object indicates the number of yellow frames that were
-// discarded due to congestion within the ME-NE for the
-// associated bandwidth profile.
-//
-// ME-NEs that do not support 64 bit counters can return the
-// upper half of the counter as all zeros.
-//
-// This object defaults to '0'. ";
-// reference
-// "[MEF 15] 8.2; [Q.840.1] 6.2.4";
-// }
-//
-// leaf ingress-octets-discards {
-// type yang:counter64;
-// units "octets";
-// description
-// "This object indicates the number of valid octets of any colour
-// that were discarded due to congestion within the ME-NE for the
-// associated bandwidth profile.
-//
-// This object defaults to '0'. ";
-// reference
-// "[MEF 15] 8.2; [Q.840.1] 6.2.4";
-// }
-//
-// } //End performance
-
- } //End bwp
-
- } //End bwp-group
-
- list interface-cos { //aka mefServiceCosCfgEntry
- key "cos-index";
- unique name;
- max-elements 64;
- description
- "Class of Service Identifier settings table entry.";
-
- leaf cos-index { //aka mefServiceCosCfgIndex
- type uint32 {
- range 1..max;
- }
- description
- "Class of Service Identifier profile index number.";
- }
-
- leaf name { //aka mefServiceCosCfgIdentifier
- type string {
- length 1..45;
- }
-
- description
- "This object indicates the Class of Service Name for the
- associated CoS profile index and is an arbitrary text string that is
- used to identify a CoS ID profile. Unique string values are chosen to
- uniquely identify the profile.
-
- Octet values of 0x00 through 0x1f are illegal.
-
- MEF 26.1 restricts the maximum size identifiers to 45 octets.";
- reference
- "[MEF 6.1] 6.0, 6.1, 6.2, 6.3; [MEF 7.2] 6.2.1.2, 6.2.1.3";
- }
-
- container dscp-cos-type {
- description "Indicates that the CoS profile is associated
- with the incoming frame's DSCP field if it is an IP frame.
- If it is not an IP frame no action is taken on it";
-
- choice dscp-id-choice {
- case dscp-bits-list {
- leaf dscp-group-bit-list {
- type bits {
- bit dscp-0-7 {
- description "The set of DSCP identifiers from 0-7";
- }
- bit dscp-8-15 {
- description "The set of DSCP identifiers from 8-15";
- }
- bit dscp-16-23 {
- description "The set of DSCP identifiers from 16-23";
- }
- bit dscp-24-31 {
- description "The set of DSCP identifiers from 24-31";
- }
- bit dscp-32-39 {
- description "The set of DSCP identifiers from 32-39";
- }
- bit dscp-40-47 {
- description "The set of DSCP identifiers from 40-47";
- }
- bit dscp-48-55 {
- description "The set of DSCP identifiers from 48-55";
- }
- bit dscp-56-63 {
- description "The set of DSCP identifiers from 56-63";
- }
- }
- }
- }
-
- case dscp-0-63 {
- container dscp-0-63 {
- presence "The full set of DSCP identifiers from 0-63";
- }
- }
-
- case specific-values {
- leaf-list dscp-id {
- type uint16 {
- range 0..64;
- }
- ordered-by system;
- description "The set of DSCP identifiers handled by this COS";
- }
- }
- mandatory true;
- msea:not-changeable;
- }
-
- choice color-specification {
- case all-green {
- container color-all-green {
- presence "Color for all specified DSCPs mapped to green";
- }
- }
- case all-yellow {
- container color-all-yellow {
- presence "Color for all specified DSCPs mapped to yellow";
- }
- }
- case all-dropped {
- container color-all-dropped {
- presence "Color for all specified DSCPs mapped to dropped";
- }
- }
-
- case dscp-to-color-map {
- list dscp-color {
- key dscp-id;
- ordered-by system;
- description "A list of DSCP values that apply to this COS.
- When the COS type is DSCP a subset of the values can
- be specified. Other DSCP values can be specified in
- additional COS profiles. In total the same priority
- cannot be repeated in a BWP Group";
-
- leaf dscp-id {
- type uint16 {
- range 0..64;
- }
- }
-
- leaf color {
- description "Color to apply to incoming IP frames
- with this DSCP id";
-
- type msea:cos-color-type;
- }
- }
- }
- default all-green;
- msea:not-changeable;
- }
- }
-
- leaf outgoing-cos-value {
- type msea:priority-type;
- mandatory true;
- msea:not-changeable;
-
- description
- "Used to set the egress COS to use for all ingress COS explicitly listed";
- reference
- "Edge Assure internal API";
- }
- }
-
-
- list l2cp-group { //aka mefServiceL2cpGrpCfgEntry
- key "group-index";
- max-elements 64;
- description
- "L2CP profile group settings table entry on an interface.";
-
- leaf group-index { //aka mefServiceL2cpGrpCfgIndex
- type uint32;
- description
- "L2CP profile group index number, indicating the specific L2CP profile
- group";
- }
-
- list l2cp { //aka mefServiceL2cpCfgEntry
- key "index";
- max-elements 64;
- description
- "L2CP settings table entry on an interface or a service.";
-
- leaf index { //aka mefServiceL2cpCfgIndex
- type uint32;
- description
- "This object configures the L2CP index number on an interface or a
- Service and is used to create/access a L2CP profile within a L2CP
- group.";
-
- must "current()/../../msea-if:group-index > 0" {
- error-app-tag "msea-if-must-03";
- error-message "No L2CP's can be added to the L2CP Group 0, as this index represents a special case";
- }
- }
-
- leaf handling { //aka mefServiceL2cpCfgType
- type enumeration {
- enum discard {description "The indicated L2CP is discarded";}
-
- enum tunnel {description "The indicated L2CP is tunneled (passed)";}
-
- enum peer {description "The indicated L2CP is peered with the NE";}
-
-// enum passToEvc {description "the indicated L2CP is passed to the EVC for
-// EVC processing of the L2CP. Final L2CP
-// disposition is based the L2CP profile for
-// the EVC to be tunneled, discarded, or peered.
-// This value is not valid for EVC based L2CP";
-// }
- }
- default tunnel;
- msea:not-changeable;
-
- description
- "This object configures the handling of matching L2CP frames.";
- reference
- "[MEF 6.1] 6.0, 8.0; [MEF 6.1.1] 8.0; [MEF 7.2] 6.2.1.2";
- }
-
- leaf match-scope { //aka mefServiceL2cpCfgMatchScope
- type l2cp-destination-address;
- default destinationAddressOnly;
- msea:not-changeable;
-
- description
- "This object configures the L2CP selection matching scope.";
- reference
- "[MEF 6.1] 6.0, 8.0; [MEF 6.1.1] 8.0; [MEF 7.2] 6.2.1.2";
-
- }
-
- leaf mac-address { //aka mefServiceL2cpCfgMacAddress
- type l2cp-dest-mac-address;
- mandatory true;
- msea:not-changeable;
-
- description
- "This object configures the L2CP Destination MAC address.
-
- Valid values are 01-80-C2-00-00-00 through 01-80-C2-00-00-0F and
- 01-80-C2-00-00-20 through 01-80-C2-00-00-2F";
-
- must "count(current()/../../msea-if:l2cp[msea-if:mac-address = current()]) <= 1" {
- error-app-tag "msea-if-must-04";
- error-message "A destination address can only appear once in an L2CP Group";
- }
- }
- } //End l2cp
-
- } //End l2cp-group
-
-
- } //End profiles
- } //end augment interfaces
-
-} /* end of module msea-uni-evc-interface */
+++ /dev/null
-module msea-uni-evc-service {
-
- namespace "http://www.microsemi.com/microsemi-edge-assure/msea-uni-evc-service";
- prefix "msea-svcs"; //MicroSemi EdgeAssure (msea)
-
-
- import msea-types {
- prefix msea;
- revision-date 2016-02-29;
- }
-
-// import ietf-interfaces { prefix if; }
-// import mef-uni-evc-interface { prefix mef-interface; }
- import ENTITY-STATE-TC-MIB {prefix "entity-state";}
-
- /*** META INFORMATION ***/
-
- organization
- "Microsemi Inc., FTD Division";
-
- contact
- "Web URL: http://www.microsemi.com/
- E-mail: info@microsemi.com
- Postal: Microsemi Corporation Corporate Headquarters
- One Enterprise Aliso Viejo,
- CA 92656
- U.S.A.
- Phone: +1 949 380 6100
- Fax: +1 949 215-4996";
-
- description
- "This YANG module is based on the MEF 40 SNMP model, for the management
- objects for the management of User Network Interfaces (UNIs) and Ethernet
- Virtual Connections (EVCs). It has been converted to YANG and modified
- slightly to suit the EdgeAssure SFP which has some extra
- constraints that are not handled by the original model
-
- Copyright 2016 Microsemi Inc.
- All rights reserved.";
-
- reference
- "***************************************************************************
- Reference Overview
-
- A number of base documents have been used to create this MIB. The following
- are the abbreviations for the baseline documents:
- [MEF 40] refers to SNMP MIB
- [MEF6.1] refers to MEF 6.1 'Ethernet Services Definitions - Phase 2',
- April 2008
- [MEF 6.1.1] refers to MEF 6.1.1 'Layer 2 Control Protocol Handling Amendment
- to MEF 6.1', January 2012
- [MEF 7.2] refers to MEF 7.2 'Carrier Ethernet Management Information Model',
- January 2013
- [MEF 10.2] refers to MEF 10.2 'Ethernet Services Attributes Phase 2',
- October 2009
- [MEF 26.1] refers to MEF 26.1 'External Network Network Interface (ENNI) -
- Phase 2', January 2012
- [Q.840.1] refers to 'ITU-T Requirements and analysis for NMS-EMS
- management interface of Ethernet over Transport and Metro Ethernet
- Network (EoT/MEN)', March 2007
- ****************************************************************************";
-
- revision "2016-03-17" {
- description
- "Initial Version. Sean Condon - Microsemi";
- reference "MEF 6.2";
- }
-
-
-
-
- grouping uni-attributes {
-
- description "Common UNI attributes";
-
- leaf bundling-multiplex { //aka mefServiceUniCfgBundlingMultiplex
- type enumeration {
- enum allToOne {
- description
- "All to One Bundling, used for Private services:
- EPL, EP-LAN, and EP-Tree";
- }
-
- enum bundling {
- description
- "Bundling, indicates one or more
- CE-VLANS per service, used for virtual private CE-VLAN
- preservation services: EVPL, EVP-LAN, EVP-Tree";
- }
-
- enum multiplex {
- description
- "Service Multiplexing, indicates
- one or more EVCs per UNI, used for virtual private
- CE-VLAN preservation or non-preservation services:
- EVPL, EVP-LAN, EVP-Tree";
- }
-
- enum bundlingMultiplex {
- description
- "Service Multiplexing plus
- Bundling, indicates one or more EVCs per UNI that are
- composed of one or more CE-VLANs, used for virtual
- CE-VLAN preservation services: EVPL, EVP-LAN, EVP-Tree";
- }
- }
-
- default allToOne;
- msea:not-changeable;
-
- description
- "Configures bundling and multiplexing options for the UNI. This object
- is an enumerated list of possible multiplexing and bundling options
- on a UNI that is unambiguous and provides only the legal possibilities.";
-
- reference
- "[MEF 6.1] 6.0, [MEF 7.2] 6.2.1.2";
- }
-
- }
-
-
- grouping evc-per-uni-extension-attributes {
- description "EVC attributes that are configured depending on
- the UNI side.";
-
- leaf ce-vlan-map { //aka mefServiceEvcPerUniCfgCeVlanMap
- type msea:service-list-type;
-
- mandatory true;
- description
- "This object indicates the CE-VLANs associated with the specific
- EVC on a UNI. CE-VLAN IDs have value of 0 to 4095. The CE-VLAN ID
- list can be a single value or multiple values separated by a delimiter.
-
- Some valid values are: '100', '1:10', '10,20,30', '1:4095'. In the
- first example only CE-VLAN ID 100 is associated with the VLAN map.
- In the second example the CE-VLAN map includes CE-VLAN IDs 1 through
- 10 (range of values). The third example indicates three separate values
- that make up the CE-VLAN map. The last example indicates all CE-VLAN IDs
- are included in the map (range of values). ";
- reference
- "[MEF 6.1] 6.1; [MEF 7.2] 6.2.1.3";
- }
-
-
- leaf ingress-bwp-group-index { //aka mefServiceEvcPerUniCfgIngressBwpGrpIndex
- type leafref {
- path "/msea-svcs:mef-services/msea-svcs:profiles/msea-svcs:bwp-group/msea-svcs:group-index";
- }
-
- mandatory true;
-
- description
- "This object is the index number of the ingress bandwidth profile group
- associated with the current EVC on a UNI. A value of 0 indicates that
- no ingress bandwidth profile group is associated with the EVC on a UNI.
-
- This index indicates the specific bandwidth profile group previously
- configured via mefServiceBwpGrpCfgTable and mefServiceBwpCfgTable
- using this value for mefServiceBwpGrpCfgIndex. There may be multiple
- entries in mefServiceBwpCfgTable using this index, each containing
- bandwidth parameters for a different Class of Service Identifier.";
- reference
- "[MEF 6.1] 6.1; [MEF 7.2] 6.2.1.3";
- }
-
-
- choice tag-manipulation {
- description "Tag Action to take for an EVC.
- If no case is specified then the default noAction will apply";
- //case noAction - if not specified then noAction will be taken
- case tagPop {
- container tag-pop {
- description "Pop the tag.";
- presence "Tag pop.";
- }
- }
-
- case tagPush {
- container tag-push {
- description "Push the tag.";
-
- leaf push-tag-type { //Microsemi Eagle specific configuration attribute
- type enumeration {
- enum pushCtag { description "Use Ctag type on push"; }
- enum pushStag { description "Use Stag type on push"; }
- }
- default pushCtag;
-
- description
- "Specify what tag type should be used is if tagAction is 'push'.";
- reference
- "Edge Assure internal API";
- }
-
- leaf outer-tag-vlan { //Microsemi Eagle specific configuration attribute
- type msea:vlan-id-type;
- mandatory true;
- description
- "The VLan value to use as the outer tag's vlan.";
- reference
- "Edge Assure internal API";
- }
- }
- }
-
- case tagOverwrite {
- container tag-overwrite {
- description "Overwrite the tag";
-
- leaf outer-tag-vlan { //Microsemi Eagle specific configuration attribute
- type msea:vlan-id-type;
- mandatory true;
- description
- "The VLan value to use as the outer tag's vlan.";
- reference
- "Edge Assure internal API";
- }
- }
- }
- }
-
- leaf evc-per-uni-service-type { //aka mefServiceEvcPerUniCfgServiceType
- type enumeration {
- enum epl {
- description "Ethernet Private Line Service (EPL)
- Point-to-Point EVC, all to one bundling";
- }
-
- enum evpl {
- description "Ethernet Virtual Private Line (EVPL)
- Point-to-Point EVC, bundling and/or multiplexing";
- }
-
- enum eplan {
- description "Ethernet Private LAN Service (EP-LAN)
- Multipoint-to-Multipoint EVC, all to one bundling";
- }
-
- enum evplan {
- description "Ethernet Virtual Private LAN Service (EVP-LAN)
- Multipoint-to-Multipoint EVC, bundling and/or multiplexing";
- }
-
- enum eptree {
- description "Ethernet Private Tree Service (EP-Tree)
- Rooted-Multipoint EVC, all to one bundling";
- }
-
- enum evptree {
- description "Ethernet Virtual Private Tree Service (EVP-Tree)
- Rooted-Multipoint EVC, bundling and/or multiplexing";
- }
- }
- config false;
-
- description
- "This object indicates the specific Ethernet service type. The value is
- derived from the EVC object 'mefServiceEvcCfgType' and the UNI object
- 'mefServiceUniCfgBundlingMultiplex'.";
-
- reference
- "[MEF 6.1] 6.1; [MEF 7.2] 6.2.1.3";
- }
- }
-
-
- grouping pcp-color-map-grouping {
- description "The PCP identifiers for the COS";
- leaf pcp-id {
- description "The priority level";
- type msea:priority-type;
- }
-
- leaf pcp-color {
- description "The color to apply to this Priority";
- type msea:cos-color-type;
- msea:not-changeable;
- }
- }
-
- container mef-services {
- description
- "This acts as a container of the MEF (6.2) Services configuration.";
-
- container uni {
-// must "count(/if:interfaces/if:interface/[mef-interface:mef-service-type = 'bUni2d1']) = 2" {
-// error-message "The interfaces must be configured as a UNI";
-// error-app-tag "msea-uni-must-01";
-// } //Unenforceable as the interface resides in a different module - may have to be implemented in the TransAPI
-
- presence "If present this device acts as a UNI";
-
- description "This Edge Assure device support only one UNI.
- This device supports only one UNI even though it has two interfaces.
- One of the interfaces corresponds to the UNI-N side of the UNI,
- while the other interface corresponds to the UNI-C side of the interface.
- Each side performs the mapping to and from the EVC on the ingress
- of packets to the device.";
-
-
- leaf name { //aka mefServiceUniCfgIdentifier
- type msea:identifier45;
- mandatory true;
- description
- "This object indicates the UNI identifier. This is distinct from
- the mefServiceInterfaceCfgIdentifier and allows the naming of the
- UNI separately from the Interface name. The identifier is
- an arbitrary text string that is used to identify an interface.
- Unique string values are chosen to uniquely identify the UNI.
-
- This object is used to add an identifier to a service interface. The
- mefServiceInterfaceCfgIdentifier can be used to add a separate
- identifier that is associated with the physical interface name.
-
- Octet values of 0x00 through 0x1f are illegal.
-
- MEF 26.1 restricts the maximum size identifiers to 45 octets.";
- reference
- "[MEF 6.1] 6.0, [MEF 7.2] 6.2.1.2";
- }
-
- leaf uni-side-interface-assignment {
- type enumeration {
- enum uni-c-on-host {
- description "Uni-C (Customer) is the Host/eth1/LAN - commonly the System port.
- Uni-N (Network) is the Optics/eth0/WAN - commonly the Carrier port";
- }
- enum uni-c-on-optics {
- description "Uni-C (Customer) is the Optics/eth0/WAN - commonly the Carrier port.
- Uni-N (Network) is the Host/eth1/LAN - commonly the System port";
- }
- }
-
- default uni-c-on-host;
- msea:not-changeable;
-
-
- description "An attribute to configure the assignment of UNI-C (Customer) and
- UNI-N (Network) to the interfaces.
- This Edge Assure supports only one UNI over its two interfaces.
- One of the interfaces corresponds to the UNI-N side of the UNI,
- while the other interface corresponds to the UNI-C side of the interface.
- Each side acts on packets only on ingress at each interface";
- }
-
- container uni-c { //aka mefServiceUniCfgEntry
- presence "If present this configures the UNI-C";
-
- uses uni-attributes;
-
- must "//msea-svcs:mef-services/msea-svcs:uni/msea-svcs:uni-n" {
- error-app-tag "msea-svcs-must-00";
- error-message "Both UNI-C and UNI-N must be specified";
- }
-
- description "The configuration of the UNI-C side of the UNI.
- UNI-C refers to eth1 by default but can be changed through the
- uni-side-interface-assignment attribute.
- The interface used must have been configured as a UNI";
- }
-
- container uni-n { //aka mefServiceUniCfgEntry
- presence "If present this configures the UNI-N";
-
- uses uni-attributes;
-
- must "//msea-svcs:mef-services/msea-svcs:uni/msea-svcs:uni-c" {
- error-app-tag "msea-svcs-must-01";
- error-message "Both UNI-C and UNI-N must be specified";
- }
-
- description "The configuration of the UNI-C side of the UNI.
- UNI-N refers to eth0 by default but can be changed through the
- uni-side-interface-assignment attribute.
- The interface used must have been configured as a UNI";
- }
-
- list evc { //aka mefServiceEvcPerUniCfgEntry
- key evc-index;
- max-elements 32;
- description "The UNI can support one or more EVCs";
-
-
- leaf evc-index { //aka mefServiceEvcCfgIndex
- type uint32 {
- range 1..max;
- }
- description
- "The specific instance of an EVC number.";
- }
-
- leaf name { //aka mefServiceEvcCfgIdentifier
- type msea:identifier45;
- mandatory true;
-
- description
- "This object indicates the EVC identifier. The identifier is
- an arbitrary text string that is used to identify an EVC.
- Unique string values are chosen to uniquely identify the EVC.
-
- Octet values of 0x00 through 0x1f are illegal.
-
- MEF 26.1 restricts the maximum size identifiers to 45 octets.";
- reference
- "[MEF 6.1] 6.1; [MEF 7.2] 6.2.1.3";
- }
-
-
- leaf uni-evc-id { //aka mefServiceEvcCfgIdentifier
- type msea:identifier45;
- config false;
- description
- "The UNI EVC ID is a string formed by the concatenation of
- the UNI ID (Section 9.1) and the EVC ID (Section 8.2) that
- is used to identify an EVC at the UNI. It is intended for
- management and control purposes.";
- reference
- "[MEF 10.3] 10.1";
- }
-
- leaf service-type { //aka mefServiceEvcCfgServiceType
- type enumeration {
- enum pointToPoint {
- description "EVC Point-to-Point service,
- used for EPL and EVPL services";
- }
-
- enum multipointToMultipoint {
- description "EVC Multipoint-to-Multipoint
- Service, used for EP-LAN and EVP-LAN
- services";
- }
-
- enum rootedMultipoint {
- description "EVC Rooted-Multipoint Service,
- used for EP-Tree and EVP-Tree services";
- }
-
- }
- default pointToPoint;
- msea:not-changeable;
-
- description
- "This object configures the EVC service type for the ME-NE.";
-
- reference
- "[MEF 6.1] 6.1; [MEF 7.2] 6.2.1.3";
- }
-
- leaf mtu-size { //aka mefServiceEvcCfgMtuSize
- type uint32 {
- range "9600";
- }
- units "octets";
- default 9600;
- description
- "This object indicates the configured EVC maximum service frame format
- size. It must be less than or equal to the
- mefServiceEvcStatusMaxMtuSize.";
- reference
- "[MEF 6.1] 6.1; [MEF 7.2] 6.2.1.3";
- }
-
- leaf cevlan-id-preservation { //aka mefServiceEvcCfgCevlanIdPreservation
- type msea:service-preservation-type;
- default preserve;
- msea:not-changeable;
-
- description
- "This object configures the EVC CE-VLAN ID preservation.
-
- preserve(1) The CE-VLAN ID is preserved. The ingress CE-VLAN
- is the CE-VLAN ID at the egress UNI
- noPreserve(2) The CE-VLAN ID is not preserved. The ingress
- CE-VLAN ID may not be the CE-VLAN ID at the egress
- UNI";
- reference
- "[MEF 6.1] 6.1; [MEF 7.2] 6.2.1.3";
- }
-
- leaf cevlan-cos-preservation { //aka mefServiceEvcCfgCevlanCosPreservation
- type msea:service-preservation-type;
- default preserve;
- msea:not-changeable;
-
- description
- "This object configures EVC CE-VLAN CoS preservation.
-
- preserve(1) The CE-VLAN CoS is preserved. The ingress CE-VLAN
- CoS is the CE-VLAN CoS at the egress UNI
- noPreserve(2) The CE-VLAN CoS is not preserved. The ingress
- CE-VLAN CoS may not be the CE-VLAN CoS at the
- egress UNI";
- reference
- "[MEF 6.1] 6.1; [MEF 7.2] 6.2.1.3";
- }
-
- // No effect on per EVC with this device
- // leaf unicast-delivery { //aka mefServiceEvcCfgUnicastDelivery
- // type msea:service-delivery-type;
- // default unconditional;
- // description
- // "This object configures EVC Unicast delivery condition.";
- // reference
- // "[MEF 6.1] 6.1; [MEF 7.2] 6.2.1.3";
- // }
- //
- // No effect on per EVC with this device
- // leaf multicast-delivery { //aka mefServiceEvcCfgMulticastDelivery
- // type msea:service-delivery-type;
- // default unconditional;
- // description
- // "This object configures EVC Multicast delivery condition.";
- // reference
- // "[MEF 6.1] 6.1; [MEF 7.2] 6.2.1.3";
- // }
- //
- // No effect on per EVC with this device
- // leaf broadcast-delivery { //aka mefServiceEvcCfgBroadcastDelivery
- // type msea:service-delivery-type;
- // default unconditional;
- // description
- // "This object configures EVC Broadcast delivery condition.";
- // reference
- // "[MEF 6.1] 6.1; [MEF 7.2] 6.2.1.3";
- // }
- //
- // No effect on per EVC with this device
- // leaf l2cp-group-index { //aka mefServiceEvcCfgL2cpGrpIndex
- // type leafref {
- // path "/msea-svcs:mef-services/msea-svcs:l2cp-group/msea-svcs:group-index";
- // }
- // description
- // "This object is the index of the L2CP profile group
- // (mefServiceL2cpGrpCfgIndex) associated with the current EVC on an
- // interface. A value of 0 indicates that no EVC L2CP profile group is
- // associated with the EVC.
- //
- // This index indicates the L2CP profile group previously configured via
- // the mefServiceL2cpGrpCfgTable and mefServiceL2cpCfgTable using the value
- // of the mefServiceL2cpGrpCfgIndex. There may be multiple entries in
- // mefServiceL2cpCfgTable using this index, each containing
- // parameters for a different L2CP protocol.";
- // reference
- // "[MEF 6.1] 6.1; [MEF 6.1.1] 8.0; [MEF 7.2] 6.2.1.3";
- // }
- //
- // No effect on per EVC with this device
- // leaf admin-state { //aka mefServiceEvcCfgAdminState
- // type entity-state:EntityAdminState;
- // default unlocked;
- // description
- // "This object specifies the administrative state of the EVC.
- //
- // If mefServiceEvcCfgAdminState is set to 'locked', the EVC will be
- // administratively locked.
- //
- // If mefServiceEvcCfgAdminState is set to 'unlocked', the EVC will be
- // administratively unlocked if previously locked.
- //
- // Other values of mefServiceEvcCfgAdminState are undefined.";
- // reference
- // "[MEF 7.2] 6.2.1.3";
- // }
-
- container evc-status { //aka mefServiceEvcStatusEntry
- config false;
- description
- "The conceptual row of mefServiceEvcStatusTable.";
-
- leaf max-mtu-size { //aka mefServiceEvcStatusMaxMtuSize
- type uint32 {
- range "1522..16384";
- }
- units "octets";
- description
- "This object indicates the EVC maximum configurable service
- frame format size. The actual configured size is set via the
- mefServiceEvcCfgMtuSize object.";
- reference
- "[MEF 6.1] 6.1; [MEF 7.2] 6.2.1.3";
- }
-
- leaf max-num-uni { //aka mefServiceEvcStatusMaxNumUni
- type uint32 {
- range "2..16384";
- }
- description
- "This object indicates the maximum number of UNIs in an EVC. For
- a Point-to-Point EVC this value is '2'. For a Multipoint EVC the
- value can be '2' or greater.";
- reference
- "[MEF 6.1] 6.1; [MEF 7.2] 6.2.1.3";
- }
-
- leaf operational-state { //aka mefServiceEvcStatusOperationalState
- type entity-state:EntityOperState;
- description
- "This object indicates the operational state (current
- capability) of the EVC.
-
- If the value is 'enabled', the EVC is able to ingress and
- egress service frames and has been set to active.
-
- If the value is 'disabled' the EVC is not able to ingress and
- egress service frames, has detected an operational failure
- condition, or has failed an internal test.
-
- If the value is 'testing' the EVC has been placed into a test mode,
- either a troubleshooting mode or a test mode.
-
- If the value is 'unknown' the EVC is unable to report the operational
- state.";
- reference
- "[MEF 7.2] 6.2.1.3";
- }
- } //End evc-status
-
- // list evc-uni { //aka mefServiceEvcUniCfgEntry
-
- // key "if-index";
- // description
- // "The conceptual row of mefServiceEvcUniCfgTable.";
- //
- // leaf if-index {
- // type leafref {
- // path "/if:interfaces/if:interface/if:name";
- // }
- // description
- // "Automagically generated keyref leaf.";
- // }
- container evc-per-uni {
- leaf evc-uni-type { //aka mefServiceEvcUniCfgType
- type enumeration {
- enum root {
- description "Valid setting for all service types. A UNI set
- to this value may send frames to UNIs configured
- as 'root' or 'leaf'";
- }
- }
- // enum leaf {
- // description "Valid setting for Root-Multipoint EVCs only. A
- // UNI set to this value may send frames to UNIs
- // 'root'";
- // }
- //
- // enum unknown {
- // description "UNI port is not configured or illegally
- // configured. This value cannot be written, but
- // is only returned when the type is unknown.";
- // }
- // }
- default root;
- description
- "This object configures UNI type on an EVC.";
- reference
- "[MEF 10.2]";
-
- }
-
- container evc-per-uni-c { //aka mefServiceUniCfgEntry
-
- description "The configuration of the UNI-C side of the EVC-per-UNI.";
-
- uses evc-per-uni-extension-attributes;
-
- } //End evc-per-uni-c
-
-
- container evc-per-uni-n { //aka mefServiceUniCfgEntry
-
- description "The configuration of the UNI-N side of the EVC-per-UNI";
-
- uses evc-per-uni-extension-attributes;
-
- } //End evc-per-uni-n
- }
- } //End evc
- } //end of uni
-
-
- container profiles {
-
- list bwp-group { //aka mefServiceBwpGrpCfgEntry
-
- key "group-index";
- max-elements 64;
- description
- "Bandwidth profile group settings table entry.";
-
- leaf group-index { //aka mefServiceBwpGrpCfgIndex
- type uint8;
- description
- "Bandwidth profile group index number";
- }
-
- list bwp { //aka mefServiceBwpCfgEntry
- key "cos-index";//Changed to cos-index (from bwp-index) based on MEP 40 6.4.2
- unique name;
- max-elements 64;
-
- description
- "Bandwidth profile settings table entry.";
-
- leaf cos-index { //aka mefServiceBwpCfgCosIndex
- type leafref {
- path "/msea-svcs:mef-services/msea-svcs:profiles/msea-svcs:cos/msea-svcs:cos-index";
- }
- description
- "This object is the index number of the CoS ID profile
- associated with the current bandwidth profile. A value of 0 indicates
- that no CoS ID profile is associated with the bandwidth profile and the
- bandwidth profile applies to all CoS IDs.
-
- This index indicates a specific CoS ID profile previously configured via
- mefServiceCosCfgTable as indicated by the mefServiceCosCfgIndex object.";
- reference
- "[MEF 6.1] 6.1; [MEF 7.2] 6.2.1.3";
-
- must "count(//msea-svcs:mef-services/msea-svcs:profiles/msea-svcs:cos[msea-svcs:cos-index=//msea-svcs:mef-services/msea-svcs:profiles/msea-svcs:bwp-group[msea-svcs:group-index=current()/../../msea-svcs:group-index]/msea-svcs:bwp/msea-svcs:cos-index]/msea-svcs:*/priority[.='0']) <= 1" {
- error-app-tag "msea-svcs-must-02";
- error-message "Priority 0 can be specified only once in the COS's related to a BWP Group";
- }
-
- must "count(//msea-svcs:mef-services/msea-svcs:profiles/msea-svcs:cos[msea-svcs:cos-index=//msea-svcs:mef-services/msea-svcs:profiles/msea-svcs:bwp-group[msea-svcs:group-index=current()/../../msea-svcs:group-index]/msea-svcs:bwp/msea-svcs:cos-index]/msea-svcs:*/priority[.='1']) <= 1" {
- error-app-tag "msea-svcs-must-03";
- error-message "Priority 1 can be specified only once in the COS's related to a BWP Group";
- }
-
- must "count(//msea-svcs:mef-services/msea-svcs:profiles/msea-svcs:cos[msea-svcs:cos-index=//msea-svcs:mef-services/msea-svcs:profiles/msea-svcs:bwp-group[msea-svcs:group-index=current()/../../msea-svcs:group-index]/msea-svcs:bwp/msea-svcs:cos-index]/msea-svcs:*/priority[.='2']) <= 1" {
- error-app-tag "msea-svcs-must-04";
- error-message "Priority 2 can be specified only once in the COS's related to a BWP Group";
- }
-
- must "count(//msea-svcs:mef-services/msea-svcs:profiles/msea-svcs:cos[msea-svcs:cos-index=//msea-svcs:mef-services/msea-svcs:profiles/msea-svcs:bwp-group[msea-svcs:group-index=current()/../../msea-svcs:group-index]/msea-svcs:bwp/msea-svcs:cos-index]/msea-svcs:*/priority[.='3']) <= 1" {
- error-app-tag "msea-svcs-must-05";
- error-message "Priority 3 can be specified only once in the COS's related to a BWP Group";
- }
-
- must "count(//msea-svcs:mef-services/msea-svcs:profiles/msea-svcs:cos[msea-svcs:cos-index=//msea-svcs:mef-services/msea-svcs:profiles/msea-svcs:bwp-group[msea-svcs:group-index=current()/../../msea-svcs:group-index]/msea-svcs:bwp/msea-svcs:cos-index]/msea-svcs:*/priority[.='4']) <= 1" {
- error-app-tag "msea-svcs-must-06";
- error-message "Priority 4 can be specified only once in the COS's related to a BWP Group";
- }
-
- must "count(//msea-svcs:mef-services/msea-svcs:profiles/msea-svcs:cos[msea-svcs:cos-index=//msea-svcs:mef-services/msea-svcs:profiles/msea-svcs:bwp-group[msea-svcs:group-index=current()/../../msea-svcs:group-index]/msea-svcs:bwp/msea-svcs:cos-index]/msea-svcs:*/priority[.='5']) <= 1" {
- error-app-tag "msea-svcs-must-07";
- error-message "Priority 5 can be specified only once in the COS's related to a BWP Group";
- }
-
- must "count(//msea-svcs:mef-services/msea-svcs:profiles/msea-svcs:cos[msea-svcs:cos-index=//msea-svcs:mef-services/msea-svcs:profiles/msea-svcs:bwp-group[msea-svcs:group-index=current()/../../msea-svcs:group-index]/msea-svcs:bwp/msea-svcs:cos-index]/msea-svcs:*/priority[.='6']) <= 1" {
- error-app-tag "msea-svcs-must-08";
- error-message "Priority 6 can be specified only once in the COS's related to a BWP Group";
- }
-
- must "count(//msea-svcs:mef-services/msea-svcs:profiles/msea-svcs:cos[msea-svcs:cos-index=//msea-svcs:mef-services/msea-svcs:profiles/msea-svcs:bwp-group[msea-svcs:group-index=current()/../../msea-svcs:group-index]/msea-svcs:bwp/msea-svcs:cos-index]/msea-svcs:*/priority[.='7']) <= 1" {
- error-app-tag "msea-svcs-must-09";
- error-message "Priority 7 can be specified only once in the COS's related to a BWP Group";
- }
-
-
- must "count(//msea-svcs:mef-services/msea-svcs:profiles/msea-svcs:cos[msea-svcs:cos-index=//msea-svcs:mef-services/msea-svcs:profiles/msea-svcs:bwp-group[msea-svcs:group-index=current()/../../msea-svcs:group-index]/msea-svcs:bwp/msea-svcs:cos-index]/msea-svcs:evc-cos-type-all-8-prio-to-1-evc-color) <= 1" {
- error-app-tag "msea-svcs-must-10";
- error-message "Only one COS can be specified in a Bandwidth Profile Group when the cos-type is 'evc-cos-type-all-8-prio-to-1-evc-color' ";
- }
-
- must "count(//msea-svcs:mef-services/msea-svcs:profiles/msea-svcs:cos[msea-svcs:cos-index=//msea-svcs:mef-services/msea-svcs:profiles/msea-svcs:bwp-group[msea-svcs:group-index=current()/../../msea-svcs:group-index]/msea-svcs:bwp/msea-svcs:cos-index]/msea-svcs:evc-cos-type-all-8-prio-to-1-pcp-color) <= 1" {
- error-app-tag "msea-svcs-must-11";
- error-message "Only one COS can be specified in a Bandwidth Profile Group when the cos-type is 'evc-cos-type-all-8-prio-to-1-pcp-color' ";
- }
-
- must "count(//msea-svcs:mef-services/msea-svcs:profiles/msea-svcs:cos[msea-svcs:cos-index=//msea-svcs:mef-services/msea-svcs:profiles/msea-svcs:bwp-group[msea-svcs:group-index=current()/../../msea-svcs:group-index]/msea-svcs:bwp/msea-svcs:cos-index]/msea-svcs:evc-cos-type-all-8-prio-to-1-dei-color) <= 1" {
- error-app-tag "msea-svcs-must-12";
- error-message "Only one COS can be specified in a Bandwidth Profile Group when the cos-type is 'evc-cos-type-all-8-prio-to-1-dei-color' ";
- }
-
- must "current()/../../msea-svcs:group-index > 0" {
- error-app-tag "msea-svcs-must-15";
- error-message "No BWP's can be added to the Bandwidth Profile Group 0, as this index represents a special case";
- }
- }
-
- leaf name { //mefServiceBwpCfgIdentifier
- type string {
- length "1..45";
- }
- mandatory true;
- description
- "This object indicates the bandwidth profile identifier for the
- associated bandwidth profile index and is an arbitrary
- text string that is used to identify a bandwidth profile. Unique
- string values are chosen to uniquely identify the bandwidth
- profile.
-
- Octet values of 0x00 through 0x1f are illegal.
-
- MEF 26.1 restricts the maximum size identifiers to 45 octets.";
- reference
- "[MEF 6.1] 6.0, 6.1, 6.2, 6.3; [MEF 7.2] 6.2.1.2, 6.2.1.3";
- }
-
- leaf committed-information-rate { //aka mefServiceBwpCfgCir
- type uint32 {
- range "0..10000000";
- }
- units "kbits/s";
- default 1000000;
- msea:not-changeable;
-
- description
- "This object indicates the Committed Information Rate (CIR) in kbits/s
- and defines the average rate in kbits/sec up to which
- the network delivers Service Frames. Service Frames that meet
- the CIR are said to be in profile or in conformance to performance
- objectives. These frames are generally identified as 'Green'
- Service Frames.";
- reference
- "[MEF 6.1] 6.0, 6.1, 6.2, 6.3; [MEF 7.2] 6.2.1.2, 6.2.1.3";
- }
-
- leaf committed-burst-size { //aka mefServiceBwpCfgCbs
- type uint32 {
- range "0..10000000";
- }
- units "bytes";
- default 12;
- msea:not-changeable;
-
- description
- "This object indicates the Committed Burst Size (CBS) in bytes. It limits
- the maximum number of bytes available for a burst of Service Frames sent
- at interface speed to remain CIR-conformant.";
- reference
- "[MEF 10.2]";
- }
-
- leaf excess-information-rate { //aka mefServiceBwpCfgEir
- type uint32 {
- range "0..10000000";
- }
- units "kbits/s";
- msea:not-changeable;
-
- description
- "This object indicates the Excess Information Rate (EIR) in kbits/s
- and defines the average rate in kbits/sec of Service Frames up to
- which the network may deliver Service Frames but without performance
- objectives. Service Frames that meet the EIR as set to be in out-of-
- profile or not in conformance to performance objectives. These
- frames are not guaranteed to be delivered and are generally identified
- as 'Yellow' service frames.";
- reference
- "[MEF 6.1] 6.0, 6.1, 6.2, 6.3; [MEF 7.2] 6.2.1.2, 6.2.1.3";
- }
-
- leaf excess-burst-size { //aka mefServiceBwpCfgEbs
- type uint32 {
- range "0..10000000";
- }
- units "bytes";
- msea:not-changeable;
-
- description
- "This object indicates the Excess Burst Size (EBS) in bytes. It limits
- the maximum number of bytes available for a burst of Service Frames
- sent at the interface speed to remain EIR-conformant.";
- reference
- "[MEF 6.1] 6.0, 6.1, 6.2, 6.3; [MEF 7.2] 6.2.1.2, 6.2.1.3";
- }
-
- leaf color-mode { //aka mefServiceBwpCfgCm
- type enumeration {
- enum colorBlind {description "A bandwidth profile property where ingress
- Service Frames are not pre-colored for either
- green or yellow, and if present, is ignored when
- determining the level of compliance for each
- Service Frame";
- }
-
- enum colorAware {
- description "A bandwidth profile property were a pre-determined
- level of Bandwidth Profile compliance for each
- Service Frame is taken into account when determining
- the level of compliance for each Service Frame.
- Each service frame can be colored red (discarded),
- yellow (conditional delivery), or green (unconditional
- delivery.";
- }
- }
- default colorBlind;
- msea:not-changeable;
-
- description
- "This object configures the bandwidth profile color mode.";
-
- reference
- "[MEF 6.1] 6.0, 6.1, 6.2, 6.3; [MEF 7.2] 6.2.1.2, 6.2.1.3";
- }
-
- leaf coupling-flag { //aka mefServiceBwpCfgCf
- type enumeration {
- enum couplingYellowEirOnly {
- description "The long term average bit rate of Service
- Frames that are declared Yellow is bounded by EIR.";
- }
-
- enum couplingYellowEirPlusCir {
- description "The long term average bit rate of Service
- Frames that are declared Yellow is bounded
- by CIR + EIR depending on the volume of
- the offered Service Frames that are
- declared Green.";
- }
- }
-
- default couplingYellowEirOnly;
- msea:not-changeable;
-
- description
- "This object configures the bandwidth profile coupling flag and has
- the effect of controlling the volume of the Service Frames that are
- declared Yellow.";
-
- reference
- "[MEF 6.1] 6.0, 6.1, 6.2, 6.3; [MEF 7.2] 6.2.1.2, 6.2.1.3";
- }
-
-// leaf performance-enable { //aka mefServiceBwpCfgPerformanceEnable
-// type enumeration {
-// enum disablePerformanceDataSet {
-// description "A performance data set is enabled for this
-// bandwidth profile";
-// }
-//
-// enum enablePerformanceDataSet {
-// description "A performance data set is not enabled for
-// this bandwidth profile";
-// }
-// }
-// default disablePerformanceDataSet;
-//
-// description
-// "This object indicates whether a performance data set is configured
-// for a specific bandwidth profile. This allows for only specific
-// bandwidth profiles to be monitored if there are limitations in the
-// ME-NE being accessed.";
-//
-// reference
-// "[MEF 6.1] 6.1; [MEF 7.2] 6.2.1.3";
-// }
-//
-// container performance { //aka mefServicePerformanceEntry
-// config false;
-// description
-// "Traffic Performance Data Set profile settings table entry.";
-//
-// leaf ingress-green-frames { //aka mefServicePerformanceIngressGreenFrameCount
-// type yang:counter64;
-// units "Ethernet frames";
-//
-// description
-// "This object indicates the number of green frames that were
-// received on a ME-NE for the associated bandwidth profile.
-//
-// ME-NEs that do not support 64 bit counters can return the
-// upper half of the counter as all zeros.
-//
-// This object defaults to '0'. ";
-// reference
-// "[MEF 15] 8.2; [Q.840.1] 6.2.4";
-// }
-//
-// leaf ingress-yellow-frames { //aka mefServicePerformanceIngressYellowFrameCount
-// type yang:counter64;
-// units "Ethernet frames";
-//
-// description
-// "This object indicates the number of yellow frames that were
-// received on the ME-NE for the associated bandwidth profile.
-//
-// ME-NEs that do not support 64 bit counters can return the
-// upper half of the counter as all zeros.
-//
-// This object defaults to '0'. ";
-// reference
-// "[MEF 15] 8.2; [Q.840.1] 6.2.4";
-// }
-//
-// leaf ingress-red-frames { //aka mefServicePerformanceIngressRedFrameCount
-// type yang:counter64;
-// units "Ethernet frames";
-// description
-// "This object indicates the number of red frames that were
-// received on the ME-NE for the associated bandwidth profile.
-//
-// ME-NEs that do not support 64 bit counters can return the
-// upper half of the counter as all zeros.
-//
-// This object defaults to '0'. ";
-// reference
-// "[MEF 15] 8.2; [Q.840.1] 6.2.4";
-// }
-//
-// leaf ingress-green-octets { //aka mefServicePerformanceIngressGreenOctets
-// type yang:counter64;
-// units "octets";
-// description
-// "This object indicates the number of valid green octets
-// that were received on the ME-NE for the associated bandwidth
-// profile.
-//
-// This object defaults to '0'. ";
-// reference
-// "[MEF 15] 8.2; [Q.840.1] 6.2.4";
-// }
-//
-// leaf ingress-yellow-octets { //aka mefServicePerformanceIngressYellowOctets
-// type yang:counter64;
-// units "octets";
-// description
-// "This object indicates the number of valid yellow octets
-// that were received on the ME-NE for the associated bandwidth
-// profile.
-//
-// This object defaults to '0'. ";
-// reference
-// "[MEF 15] 8.2; [Q.840.1] 6.2.4";
-// }
-//
-// leaf ingress-red-octets { //aka mefServicePerformanceIngressRedOctets
-// type yang:counter64;
-// units "octets";
-// description
-// "This object indicates the number of valid red octets
-// that were received on the ME-NE for the associated bandwidth
-// profile.
-//
-// This object defaults to '0'. ";
-// reference
-// "[MEF 15] 8.2; [Q.840.1] 6.2.4";
-// }
-//
-// leaf ingress-green-frame-discards { //aka mefServicePerformanceIngressGreenFrameDiscards
-// type yang:counter64;
-// units "Ethernet frames";
-// description
-// "This object indicates the number of green frames that were
-// discarded due to congestion within the ME-NE for the
-// associated bandwidth profile.
-//
-// ME-NEs that do not support 64 bit counters can return the
-// upper half of the counter as all zeros.
-//
-// This object defaults to '0'. ";
-// reference
-// "[MEF 15] 8.2; [Q.840.1] 6.2.4";
-// }
-//
-// leaf ingress-yellow-frame-discards { //aka mefServicePerformanceIngressYellowFrameDiscards
-// type yang:counter64;
-// units "Ethernet frames";
-// description
-// "This object indicates the number of yellow frames that were
-// discarded due to congestion within the ME-NE for the
-// associated bandwidth profile.
-//
-// ME-NEs that do not support 64 bit counters can return the
-// upper half of the counter as all zeros.
-//
-// This object defaults to '0'. ";
-// reference
-// "[MEF 15] 8.2; [Q.840.1] 6.2.4";
-// }
-//
-// leaf ingress-octets-discards {
-// type yang:counter64;
-// units "octets";
-// description
-// "This object indicates the number of valid octets of any colour
-// that were discarded due to congestion within the ME-NE for the
-// associated bandwidth profile.
-//
-// This object defaults to '0'. ";
-// reference
-// "[MEF 15] 8.2; [Q.840.1] 6.2.4";
-// }
-//
-// leaf ingress-green-octets-discards { //aka mefServicePerformanceIngressGreenOctetsDiscards
-// type yang:counter64;
-// units "octets";
-// description
-// "This object indicates the number of valid green octets
-// that were discarded due to congestion within the ME-NE for the
-// associated bandwidth profile.
-//
-// This object defaults to '0'. ";
-// reference
-// "[MEF 15] 8.2; [Q.840.1] 6.2.4";
-// }
-//
-// leaf ingress-yellow-octets-discards { //aka mefServicePerformanceIngressYellowOctetsDiscards
-// type yang:counter64;
-// units "octets";
-// description
-// "This object indicates the number of valid yellow octets
-// that were discarded due to congestion within the ME-NE for the
-// associated bandwidth profile.
-//
-// This object defaults to '0'. ";
-// reference
-// "[MEF 15] 8.2; [Q.840.1] 6.2.4";
-// }
-
-// leaf egress-green-frames { //aka mefServicePerformanceEgressGreenFrameCount
-// type yang:counter64;
-// units "Ethernet frames";
-// config false;
-// description
-// "This object indicates the number of green frames that were
-// transmitted on the ME-NE for the associated bandwidth profile.
-//
-// ME-NEs that do not support 64 bit counters can return the
-// upper half of the counter as all zeros.
-//
-// This object defaults to '0'. ";
-// reference
-// "[MEF 15] 8.2; [Q.840.1] 6.2.4";
-// }
-//
-// leaf egress-yellow-frames { //aka mefServicePerformanceEgressYellowFrameCount
-// type yang:counter64;
-// units "Ethernet frames";
-// config false;
-// description
-// "This object indicates the number of yellow frames that were
-// transmitted on the ME-NE for the associated bandwidth profile.
-//
-// ME-NEs that do not support 64 bit counters can return the
-// upper half of the counter as all zeros.
-//
-// This object defaults to '0'. ";
-// reference
-// "[MEF 15] 8.2; [Q.840.1] 6.2.4";
-// }
-//
-// leaf egress-green-octets { //aka mefServicePerformanceEgressGreenOctets
-// type yang:counter64;
-// units "octets";
-// config false;
-// description
-// "This object indicates the number of valid green octets
-// that were transmitted on the ME-NE for the associated bandwidth
-// profile.
-//
-// This object defaults to '0'. ";
-// reference
-// "[MEF 15] 8.2; [Q.840.1] 6.2.4";
-// }
-//
-// leaf egress-yellow-octets { //aka mefServicePerformanceEgressYellowOctets
-// type yang:counter64;
-// units "octets";
-// config false;
-// description
-// "This object indicates the number of valid yellow octets
-// that were transmitted on the ME-NE for the associated bandwidth
-// profile.
-//
-// This object defaults to '0'. ";
-// reference
-// "[MEF 15] 8.2; [Q.840.1] 6.2.4";
-// }
-// } //End performance
-
- } //End bwp
-
- } //End bwp-group
-
- list cos { //aka mefServiceCosCfgEntry
- key "cos-index";
- unique name;
- max-elements 64;
- description
- "Class of Service Identifier settings table entry.";
-
- leaf cos-index { //aka mefServiceCosCfgIndex
- type uint32 {
- range 1..max;
- }
- description
- "Class of Service Identifier profile index number.";
- }
-
- leaf name { //aka mefServiceCosCfgIdentifier
- type string {
- length 1..45;
- }
-
- description
- "This object indicates the Class of Service Name for the
- associated CoS profile index and is an arbitrary text string that is
- used to identify a CoS ID profile. Unique string values are chosen to
- uniquely identify the profile.
-
- Octet values of 0x00 through 0x1f are illegal.
-
- MEF 26.1 restricts the maximum size identifiers to 45 octets.";
- reference
- "[MEF 6.1] 6.0, 6.1, 6.2, 6.3; [MEF 7.2] 6.2.1.2, 6.2.1.3";
- }
-
-
-
-// leaf type { //aka mefServiceCosCfgType
-// type enumeration {
-// enum interface {
-// description "This value indicates that the CoS ID profile is associated
-// with the interface, i.e. UNI or ENNI";
-// }
-//
-// enum evc {
-// description "This value indicates that the CoS ID profile is associated
-// with the virtual channel, i.e. EVC or OVC";
-// }
-// enum pcp {description "This value indicates that the CoS ID profile is associated
-// with the outer tag's Priority Code Point (priority bits)";
-// }
-//
-// enum dscp {description "This value indicates that the CoS ID profile is associated
-// the IP's frames DSCP (priority) setting";
-// }
-//
-// enum l2cp {description "This value indicates that the CoS ID profile is associated
-// a Layer 2 Control Protocol";
-// }
-// }
-//
-// default pcp;
-// description
-// "This object configures the CoS ID type and indicates the interpretation
-// of the mefServiceCosIdentifierList object.";
-//
-// reference
-// "[MEF 6.1] 6.0, 6.1, 6.2, 6.3; [MEF 7.2] 6.2.1.2, 6.2.1.3";
-// }
-
- choice cos-type-choice {
- description "CoS configuration alternatives.";
- //We have 6 choices in a single tier choice structure which is easier for client
- //tools to represent automatically rather than a two tier choice structure
-
- case evc-cos-type-evc-color-id {
- container evc-cos-type-all-8-prio-to-1-evc-color {
- description "Indicates that the CoS profile is associated
- with the virtual channel, i.e. EVC or OVC. All 8 priorities
- are mapped to the outgoing-cos-value - therefore there can
- only be one of this type of COS specified in any BWP Group";
-
- leaf evc-all-8-color-to {
- description "The color to be applied regardless of priority";
- mandatory true;
- type msea:cos-color-type;
- }
- }
- }
-
- case evc-cos-type-pcp-color-id {
-
- container evc-cos-type-all-8-prio-to-1-pcp-color {
- description "Indicates that the CoS profile is associated
- with the virtual channel, i.e. EVC or OVC. All 8 priorities
- are mapped to the outgoing-cos-value - therefore there can
- only be one of this type of COS specified in any BWP Group";
-
- list pcp-color-per-prio {
- key pcp-id;
- description "The PCP value of the incoming frame is
- used to lookup the following table to determine the
- frame's color";
-
- min-elements 8;
- max-elements 8;
- uses pcp-color-map-grouping;
- }
- }
- }
-
- case evc-cos-type-dei-color-id {
- container evc-cos-type-all-8-prio-to-1-dei-color {
- presence "Cos type EVC and Color Mapping DEI";
-
- description "Indicates that the CoS profile is associated
- with the virtual channel, i.e. EVC or OVC. All 8 priorities
- are mapped to the outgoing-cos-value - therefore there can
- only be one of this type of COS specified in any BWP Group
- The source of the color is DEI of the
- incoming frame. False (0) in the DEI field will set
- the color to Green and True (1) will set to Yellow";
-
- }
- }
-
- case pcp-cos-type-evc-color-id {
- container pcp-cos-type-n-prio-to-1-evc-color {
- description "Indicates that the CoS profile is associated
- with the incoming frame's Priority Code Point (priority bits).";
-
- leaf-list priority {
- type msea:priority-type;
- ordered-by system;
-
- description "A list of priorities that apply to this COS.
- When the COS type is PCP a subset of the priorities can
- be specified. Other priorities can be specified in
- additional COS profiles. In total the same priority
- cannot be repeated in a BWP Group";
-
- min-elements 1;
- max-elements 8;
- }
-
- leaf evc-all-8-colors-to {
- description "The color to be applied regardless
- of priority. If multiple instances of this cos
- type have different values then the color-type
- of the last one will apply";
-
- type msea:cos-color-type;
- mandatory true;
- }
- }
- }
-
- case pcp-cos-type-pcp-color-id {
- container pcp-cos-type-n-prio-to-1-pcp-color {
- description "Indicates that the CoS profile is associated
- with the incoming frame's Priority Code Point (priority bits).
- The PCP value of the incoming frame is used to lookup the
- follwing table to determine the frame's color";
-
- leaf-list priority {
- type msea:priority-type;
- min-elements 1;
- max-elements 8;
- ordered-by system;
-
- description "A list of priorities that apply to this COS.
- When the COS type is PCP a subset of the priorities can
- be specified. Other priorities can be specified in
- additional COS profiles. In total the same priority
- cannot be repeated in a BWP Group";
- }
-
- list pcp-color-for-prio {
- key pcp-id;
- description "Each priority specified above must
- have a corresponding color otherwise the default
- (green) will apply";
-
- min-elements 1;
- ordered-by system;
-
- uses pcp-color-map-grouping {
- refine pcp-id {
- must "count(current()/../../msea-svcs:priority[.=current()]) = 1" {
- error-message "Each element must already exist in the priority list";
- }
- }
- }
- }
- }
- }
-
-
- case pcp-cos-type-dei-color-id {
- container pcp-cos-type-n-prio-to-1-dei-color {
- description "Indicates that the CoS profile is associated
- with the incoming frame's Priority Code Point (priority bits).
- The DEI value of the incoming frame is used to determine
- the frame's color. False (0) in the DEI field of the frame
- will set the color to Green and True (1) will set to Yellow";
-
- leaf-list priority {
- type msea:priority-type;
- min-elements 1;
- max-elements 8;
- ordered-by system;
-
- description "A list of priorities that apply to this COS.
- When the COS type is PCP a subset of the priorities can
- be specified. Other priorities can be specified in
- additional COS profiles. In total the same priority
- cannot be repeated in a BWP Group";
- }
- }
- }
-
-// case dscp {
-// container cos-dscp {
-// description "Indicates that the CoS ID profile is associated
-// the IP's frames DSCP (priority) setting.";
-//
-// list dscp-ids { //aka mefServiceCosCfgIdentifierList
-// key dscp-id;
-// description "The 6-bit DSCP value of the IP frame. Has a range of '0:63' for IPv4.";
-// leaf dscp-id {
-// type uint8 {
-// range 0..63; //has a range of '0:63' for IPv4 and '0:16384' for IPv6
-// }
-// }
-//
-// leaf dscp-color {
-// description "The color to apply to this dscp-id";
-// type cos-color-type;
-// }
-// }
-// }
-// }
-//
-// case l2cp {
-// container cos-l2cp {
-// description "This value indicates that the CoS ID profile is associated
-// a Layer 2 Control Protocol";
-//
-// leaf l2cp-type {
-// type l2cp-destination-address;
-// default destinationAddressOnly;
-// }
-//
-// leaf mac-address { //aka mefServiceCosCfgMacAddress
-// type l2cp-dest-mac-address;
-//
-// description
-// "This object configures the L2CP Destination MAC address for CoS
-// Identifier type of 'l2cp' and is ignored for other types.
-//
-// Valid values are 01-80-C2-00-00-00 through 01-80-C2-00-00-0F and
-// 01-80-C2-00-00-20 through 01-80-C2-00-00-2F";
-// }
-//
-// leaf protocol { //aka mefServiceCosCfgProtocol
-// type uint16;
-//
-// description
-// "This object configures the L2CP Ethernet protocol for CoS Identifier
-// type of 'l2cp' and is ignored for other types. It is also ignored if
-// mefServiceCosCfgIdentifierList has a value of '1'.
-//
-// The protocol is defined in the Ethertype field of the Ethertype
-// frame. For instance the Ethertype for Link OAM is 0x8809, for
-// E-LMI it is 0x88EE, for LLDP it is 0x88CC.
-//
-// Valid protocol values are defined by MEF 6.1 and MEF 6.1.1.";
-// reference
-// "[MEF 6.1] 6.0, 8.0; [MEF 6.1.1] 8.0; [MEF 7.2] 6.2.1.2";
-// }
-//
-// leaf sub-type { //aka mefServiceCosCfgSubType
-// type uint16;
-//
-// description
-// "This object configures the L2CP subtype protocol for CoS Identifier
-// type of 'l2cp' and is ignored for other types. It is also ignored if
-// mefServiceCosCfgIdentifierList has a value of '1' or '2'.
-//
-// For instance, the subtype for LACP is '2' and Link OAM is '3'.
-//
-// Valid subtype values are defined by MEF 6.1 and MEF 6.1.1.";
-// reference
-// "[MEF 6.1] 6.0, 8.0; [MEF 6.1.1] 8.0; [MEF 7.2] 6.2.1.2";
-// }
-// }
-// }
-
- mandatory true;
- msea:not-changeable;
- }
-
-// leaf identifier-list { //aka mefServiceCosCfgIdentifierList
-// type msea:service-list-type;
-// default "0:7";
-//
-// description
-// "This object indicates the list of CoS identifiers associated with
-// the specific CoS ID profile. Interpretation of the values in the list
-// are based upon the mefServiceCosCfgType object.
-//
-// For each of the mefServiceCosCfgType types valid range is:
-//
-// interface - the value of this object is ignored for the 'interface' type
-// vc - the value of this object is ignored for the 'vc' type
-// pcp - the value of this object has a range of '0:7'
-// dscp - the value of this object has a range of '0:63' for IPv4 and '0:16384' for IPv6
-// l2cp - the value of this object indicates the matching criteria:
-// '1' - destination MAC address only
-// '2' - destination MAC address plus Ethernet protocol
-// '3' - destination MAC address plus Ethernet protocol
-// plus subtype
-//
-// CoS identifier list can be a single value or multiple values separated
-// by a delimiter.
-//
-// Some valid values are: '1', '1:3', '1,3,5', '0:7'. In the first example
-// only one item, '1', is included in the CoS ID list. In the second example
-// values 1, 2, and 3 are included in the CoS ID list (range of values). In
-// the third example three individual values are included. In the fourth
-// example eight values are included: 0 through 7 (range of values).";
-//
-// reference
-// "[MEF 6.1] 6.0, 6.1, 6.2, 6.3; [MEF 7.2] 6.2.1.2, 6.2.1.3";
-// }
-
-
-
- //Microsemi Eagle specific configuration attribute
-// leaf color-map {
-// type string {
-// length "0..32";
-// pattern "[0-2x:,']";
-// }
-// description
-// "Custom attribute for setting up COS color map.
-// Each entry in this defines the color to be used for each
-// item of the identity list. 0 = green, 1 = yellow, x=no value
-// ',' to separate values, ':' to define a range of values,
-// ''n' to define a repeated value n times";
-// reference
-// "Edge Assure internal API";
-// }
-
- leaf outgoing-cos-value {
- type msea:priority-type;
- mandatory true;
- msea:not-changeable;
-
- description
- "Used to set the egress COS to use for all ingress COS explicitly listed";
- reference
- "Edge Assure internal API";
- }
-
- leaf color-aware {
- type boolean;
- default false;
- msea:not-changeable;
-
- description
- "Set if the profile should be treated as colour aware (true) or not (false)";
- reference
- "Edge Assure internal API";
- }
-
- leaf color-forward {
- type boolean;
- default false;
- msea:not-changeable;
-
- description
- "Used to override the colour mapping of the profile. If true the ingress colour is forwarded";
- reference
- "Edge Assure internal API";
- }
-
- } //End cos
-
-
- } //End of profiles
-
- } //End of mef-services
-
-} /* end of module msea-uni-evc-service */
\ No newline at end of file
<type>xml</type>
<classifier>features</classifier>
</dependency>
- <dependency>
- <groupId>${project.groupId}</groupId>
- <artifactId>odl-unimgr-presto-api</artifactId>
- <version>${project.version}</version>
- <type>xml</type>
- <classifier>features</classifier>
- </dependency>
<dependency>
<groupId>${project.groupId}</groupId>
<artifactId>odl-unimgr-api</artifactId>
+++ /dev/null
-<?xml version="1.0" encoding="UTF-8"?>
-<!-- Copyright (c) 2015 Cable Television Laboratories, Inc. All rights reserved.
- This program and the accompanying materials are made available under the
- terms of the Eclipse Public License v1.0 which accompanies this distribution,
- and is available at http://www.eclipse.org/legal/epl-v10.html INTERNAL -->
-<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
- xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
- <parent>
- <groupId>org.opendaylight.odlparent</groupId>
- <artifactId>single-feature-parent</artifactId>
- <version>2.0.5</version>
- <relativePath />
- </parent>
- <groupId>org.opendaylight.unimgr</groupId>
- <artifactId>odl-unimgr-presto-api</artifactId>
- <version>0.4.0-SNAPSHOT</version>
- <packaging>feature</packaging>
-
- <name>ODL :: unimgr :: ${project.artifactId}</name>
- <modelVersion>4.0.0</modelVersion>
-
- <properties>
- <mdsal.model.version>0.12.0-SNAPSHOT</mdsal.model.version>
- </properties>
-
- <dependencies>
- <dependency>
- <groupId>org.opendaylight.mdsal.model</groupId>
- <artifactId>odl-mdsal-models</artifactId>
- <version>${mdsal.model.version}</version>
- <type>xml</type>
- <classifier>features</classifier>
- </dependency>
- <dependency>
- <groupId>org.opendaylight.unimgr</groupId>
- <artifactId>unimgr-presto-api</artifactId>
- <version>${project.version}</version>
- </dependency>
- </dependencies>
-
-</project>
<type>xml</type>
<classifier>features</classifier>
</dependency>
- <dependency>
- <groupId>org.opendaylight.unimgr</groupId>
- <artifactId>odl-unimgr-presto-api</artifactId>
- <version>${project.version}</version>
- <type>xml</type>
- <classifier>features</classifier>
- </dependency>
<dependency>
<groupId>org.opendaylight.netconf</groupId>
<artifactId>odl-netconf-topology</artifactId>
<modules>
<module>features4-unimgr</module>
<module>odl-unimgr-api</module>
- <module>odl-unimgr-presto-api</module>
<module>odl-unimgr</module>
<module>odl-unimgr-netvirt</module>
<module>odl-unimgr-dlux</module>
<artifactId>unimgr-api</artifactId>
<version>${project.version}</version>
</dependency>
- <dependency>
- <groupId>${project.groupId}</groupId>
- <artifactId>unimgr-presto-api</artifactId>
- <version>${project.version}</version>
- </dependency>
<!-- OVSDB dependency -->
<dependency>
}
public static ServicePort toServicePort(EndPoint endPoint, String topologyName) {
+ return toServicePort(endPoint, new TopologyId(topologyName));
+ }
+
+ public static ServicePort toServicePort(EndPoint endPoint, TopologyId topologyId) {
Uuid sip = endPoint.getEndpoint().getServiceInterfacePoint();
- TopologyId topologyId = new TopologyId(topologyName);
NodeId nodeId = new NodeId(SipHandler.getDeviceName(sip));
TpId tpId = new TpId(SipHandler.getPortName(sip));
ServicePort servicePort = new ServicePort(topologyId,nodeId,tpId);
package org.opendaylight.unimgr.utils;
import com.google.common.base.Optional;
-import com.google.common.util.concurrent.CheckedFuture;
import org.opendaylight.controller.md.sal.binding.api.DataBroker;
-import org.opendaylight.controller.md.sal.binding.api.ReadTransaction;
-import org.opendaylight.controller.md.sal.common.api.data.LogicalDatastoreType;
-import org.opendaylight.controller.md.sal.common.api.data.ReadFailedException;
-import org.opendaylight.yang.gen.v1.urn.onf.core.network.module.rev160630.g_forwardingconstruct.FcPort;
import org.opendaylight.yang.gen.v1.urn.opendaylight.netconf.node.topology.rev150114.NetconfNode;
import org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.ovsdb.rev150105.OvsdbBridgeAugmentation;
-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.network.topology.Topology;
-import org.opendaylight.yang.gen.v1.urn.tbd.params.xml.ns.yang.network.topology.rev131021.network.topology.TopologyKey;
import org.opendaylight.yang.gen.v1.urn.tbd.params.xml.ns.yang.network.topology.rev131021.network.topology.topology.Node;
-import org.opendaylight.yang.gen.v1.urn.tbd.params.xml.ns.yang.network.topology.rev131021.network.topology.topology.NodeKey;
-import org.opendaylight.yangtools.yang.binding.InstanceIdentifier;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
return new NodeContext(this, Optional.of(node));
}
- public NodeContext nodeByPort(FcPort port) {
- return new NodeContext(this, readNode(port));
- }
-
- private Optional<Node> readNode(FcPort port) {
- InstanceIdentifier<Node> nodeIid = InstanceIdentifier.builder(NetworkTopology.class)
- .child(Topology.class, new TopologyKey(port.getTopology()))
- .child(Node.class, new NodeKey(port.getNode()))
- .build();
-
- final ReadTransaction tx = dataBroker.newReadOnlyTransaction();
- final CheckedFuture<Optional<Node>, ReadFailedException> nodeFuture = tx.read(LogicalDatastoreType.OPERATIONAL, nodeIid);
- Optional<Node> result = Optional.absent();
-
- try {
- result = nodeFuture.checkedGet();
- } catch (final ReadFailedException e) {
- LOG.error("Unable to read node with Iid {}", nodeIid, e);
- }
-
- return result;
- }
-
private <T> boolean checkCondition(Capability<T> capability, T data) {
return capability.getCondition().apply(dataBroker, data);
}
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.onf.core.network.module.rev160630.g_forwardingconstruct.FcPort;
+import org.opendaylight.unimgr.mef.nrp.api.EndPoint;
+import org.opendaylight.unimgr.mef.nrp.common.ServicePort;
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.NetworkTopology;
* Read a TerminationPoint from datastore used in given FcPort.
* @param dataBroker The dataBroker instance to create transactions
* @param store The datastore type.
- * @param port FcPort data
+ * @param topo TopologyId
+ * @param ep FcPort data
* @return An Optional TerminationPoint instance
*/
- public static Optional<TerminationPoint> readTerminationPoint(DataBroker dataBroker, LogicalDatastoreType store, FcPort port) {
- InstanceIdentifier tpIid = InstanceIdentifier.builder(NetworkTopology.class)
- .child(Topology.class, new TopologyKey(port.getTopology()))
- .child(Node.class, new NodeKey(port.getNode()))
- .child(TerminationPoint.class, new TerminationPointKey(port.getTp()))
- .build();
-
- return MdsalUtils.readOptional(dataBroker, store, tpIid);
+ public static Optional<TerminationPoint> readTerminationPoint(DataBroker dataBroker, LogicalDatastoreType store, TopologyId topo, EndPoint ep) {
+ ServicePort servicePort = ServicePort.toServicePort(ep, topo);
+ return readTerminationPoint(dataBroker, store, servicePort.getTopology(), servicePort.getNode(), servicePort.getTp());
}
public static Optional<TerminationPoint> readTerminationPoint(DataBroker dataBroker, LogicalDatastoreType store, TopologyId topologyId, NodeId nodeId, TpId tpId) {
import com.google.common.base.Optional;
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.utils.CapabilitiesService;
-import org.opendaylight.yang.gen.v1.urn.onf.core.network.module.rev160630.g_forwardingconstruct.FcPort;
+import org.opendaylight.controller.md.sal.binding.test.AbstractConcurrentDataBrokerTest;
import org.opendaylight.yang.gen.v1.urn.tbd.params.xml.ns.yang.network.topology.rev131021.network.topology.topology.Node;
import static org.junit.Assert.*;
import static org.opendaylight.unimgr.utils.CapabilitiesService.Capability.Mode.AND;
import static org.opendaylight.unimgr.utils.CapabilitiesService.NodeContext.NodeCapability.*;
-public class CapabilitiesServiceTest extends AbstractDataBrokerTest {
-
- @Test
- public void testNodeByPortPositive() {
- //given
- Optional<Node> mockedNodeOptional = mockNode();
- DataBroker mockedDataBrocker = mockDataBroker(mockedNodeOptional);
- CapabilitiesService capabilitiesService = new CapabilitiesService(mockedDataBrocker);
- FcPort mockedFcPort = mockFcPort();
-
- //when
- CapabilitiesService.NodeContext context = capabilitiesService.nodeByPort(mockedFcPort);
-
- //then
- assertNotNull(context);
- assertTrue(context.getNode().isPresent());
- assertEquals(mockedNodeOptional.get(), context.getNode().get());
- }
-
- @Test
- public void testNodeByPortNegative() {
- //given
- DataBroker mockedDataBrocker = mockDataBroker(Optional.absent());
- CapabilitiesService capabilitiesService = new CapabilitiesService(mockedDataBrocker);
- FcPort mockedFcPort = mockFcPort();
-
- //when
- CapabilitiesService.NodeContext context = capabilitiesService.nodeByPort(mockedFcPort);
-
- //then
- assertNotNull(context);
- assertFalse(context.getNode().isPresent());
- }
-
-
+public class CapabilitiesServiceTest extends AbstractConcurrentDataBrokerTest {
@Test
public void testNode() {
//given
import org.opendaylight.controller.md.sal.common.api.data.LogicalDatastoreType;
import org.opendaylight.controller.md.sal.common.api.data.ReadFailedException;
import org.opendaylight.unimgr.impl.UnimgrConstants;
+import org.opendaylight.unimgr.mef.nrp.api.EndPoint;
import org.opendaylight.yang.gen.v1.urn.ietf.params.xml.ns.yang.ietf.inet.types.rev130715.IpAddress;
-import org.opendaylight.yang.gen.v1.urn.onf.core.network.module.rev160630.g_forwardingconstruct.FcPort;
+import org.opendaylight.yang.gen.v1.urn.mef.yang.tapi.common.rev170712.PortDirection;
+import org.opendaylight.yang.gen.v1.urn.mef.yang.tapi.common.rev170712.Uuid;
+import org.opendaylight.yang.gen.v1.urn.mef.yang.tapi.connectivity.rev170712.ConnectivityServiceEndPoint;
import org.opendaylight.yang.gen.v1.urn.tbd.params.xml.ns.yang.network.topology.rev131021.*;
import org.opendaylight.yang.gen.v1.urn.tbd.params.xml.ns.yang.network.topology.rev131021.network.topology.Topology;
import org.opendaylight.yang.gen.v1.urn.tbd.params.xml.ns.yang.network.topology.rev131021.network.topology.TopologyKey;
public void testReadTerminationPoint() throws ReadFailedException {
//given
TerminationPoint expectedTp = mock(TerminationPoint.class);
- FcPort fcPort = mock(FcPort.class);
- when(fcPort.getNode()).thenReturn(new NodeId("r1"));
- when(fcPort.getTopology()).thenReturn(new TopologyId("topology-netconf"));
- when(fcPort.getTp()).thenReturn(new TpId("tp1"));
+
+
+ TopologyId topologyId = new TopologyId("topology-netconf");
+
+
+ ConnectivityServiceEndPoint cep = new org.opendaylight.yang.gen.v1.urn.mef.yang.tapi.connectivity.rev170712.connectivity.service.EndPointBuilder()
+ .setServiceInterfacePoint(new Uuid("sip:r1:tp1"))
+ .setDirection(PortDirection.Bidirectional)
+ .build();
+ EndPoint ep = new EndPoint(cep, null);
+
DataBroker dataBroker = mock(DataBroker.class);
ReadOnlyTransaction transaction = mock(ReadOnlyTransaction.class);
when(optionalDataObject.get()).thenReturn(expectedTp);
//when
- Optional<TerminationPoint> actualTpOptional = MdsalUtils.readTerminationPoint(dataBroker, LogicalDatastoreType.CONFIGURATION, fcPort);
+ Optional<TerminationPoint> actualTpOptional = MdsalUtils.readTerminationPoint(dataBroker, LogicalDatastoreType.CONFIGURATION, topologyId, ep);
//then
assertNotNull(actualTpOptional);
import org.opendaylight.controller.md.sal.binding.api.DataBroker;
import org.opendaylight.controller.md.sal.binding.api.ReadOnlyTransaction;
import org.opendaylight.controller.md.sal.common.api.data.LogicalDatastoreType;
-import org.opendaylight.yang.gen.v1.urn.onf.core.network.module.rev160630.g_forwardingconstruct.FcPort;
import org.opendaylight.yang.gen.v1.urn.opendaylight.netconf.node.topology.rev150114.NetconfNode;
import org.opendaylight.yang.gen.v1.urn.opendaylight.netconf.node.topology.rev150114.netconf.node.connection.status.AvailableCapabilities;
import org.opendaylight.yang.gen.v1.urn.opendaylight.netconf.node.topology.rev150114.netconf.node.connection.status.available.capabilities.AvailableCapability;
import org.opendaylight.yang.gen.v1.urn.opendaylight.netconf.node.topology.rev150114.netconf.node.connection.status.available.capabilities.AvailableCapabilityBuilder;
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.network.topology.topology.Node;
import org.opendaylight.yangtools.yang.binding.InstanceIdentifier;
public class NodeTestUtils {
public static final String DEVICE_ID = "device";
- public static final String TOPOLOGY_ID = "topology";
public static DataBroker mockDataBroker(Optional<Node> nodeOptional) {
DataBroker dataBroker = mock(DataBroker.class);
return dataBroker;
}
- public static FcPort mockFcPort(int nodeNo) {
- FcPort mockedFcPort = mock(FcPort.class);
- StringBuilder nodeIdBuilder = new StringBuilder(DEVICE_ID);
-
- if (nodeNo > 0) {
- nodeIdBuilder.append("_").append(Integer.toString(nodeNo));
- }
-
- when(mockedFcPort.getNode()).thenReturn(new NodeId(nodeIdBuilder.toString()));
- when(mockedFcPort.getTopology()).thenReturn(new TopologyId(TOPOLOGY_ID));
-
- return mockedFcPort;
- }
-
- public static FcPort mockFcPort() {
- return mockFcPort(0);
- }
-
public static Optional<Node> mockNode() {
final Node node = mock(Node.class);
when(node.getNodeId()).thenReturn(new NodeId(DEVICE_ID));
+++ /dev/null
-/*
- * Copyright (c) 2016 CableLabs and others. All rights reserved.
- *
- * This program and the accompanying materials are made available under the
- * terms of the Eclipse Public License v1.0 which accompanies this distribution,
- * and is available at http://www.eclipse.org/legal/epl-v10.html
- */
-package org.opendaylight.unimgr.utils;
-
-
-import org.junit.Test;
-import org.opendaylight.yang.gen.v1.urn.mef.unimgr.ext.rev160725.ForwardingConstruct1;
-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 org.opendaylight.yang.gen.v1.urn.onf.core.network.module.rev160630.g_forwardingconstruct.FcSpec;
-
-import java.util.ArrayList;
-import java.util.List;
-import java.util.Optional;
-import java.util.stream.Collectors;
-
-import static org.junit.Assert.*;
-import static org.mockito.Matchers.eq;
-import static org.mockito.Mockito.mock;
-import static org.mockito.Mockito.when;
-
-public class NullAwareDatastoreGetterTest {
-
- @Test
- public void testCollectNotNull() {
- //given
- ForwardingConstruct fc = mock(ForwardingConstruct.class);
- FcSpec expected = mock(FcSpec.class);
-
- when(fc.getFcSpec()).thenReturn(expected);
-
- //when
- Optional<FcSpec> actualOptional = new NullAwareDatastoreGetter<>(fc)
- .collect(x -> x::getFcSpec)
- .get();
-
- //then
- assertNotNull(actualOptional);
- assertTrue(actualOptional.isPresent());
- assertEquals(expected, actualOptional.get());
- }
-
- @Test
- public void testCollectNull() {
- //given
- ForwardingConstruct fc = mock(ForwardingConstruct.class);
- when(fc.getFcSpec()).thenReturn(null);
-
- //when
- Optional<FcSpec> actualOptional = new NullAwareDatastoreGetter<>(fc)
- .collect(x -> x::getFcSpec)
- .get();
-
- //then
- assertNotNull(actualOptional);
- assertFalse(actualOptional.isPresent());
- }
-
- @Test
- public void testCollectInputNull() {
- //given
- ForwardingConstruct fc = null;
-
- //when
- Optional<FcSpec> actualOptional = new NullAwareDatastoreGetter<>(fc)
- .collect(x -> x::getFcSpec)
- .get();
-
- //then
- assertNotNull(actualOptional);
- assertFalse(actualOptional.isPresent());
- }
-
- @Test
- public void testCollectInputOptionalPresent() {
- //given
- ForwardingConstruct fc = mock(ForwardingConstruct.class);
- FcSpec expected = mock(FcSpec.class);
-
- when(fc.getFcSpec()).thenReturn(expected);
-
- Optional<ForwardingConstruct> fcOptional = Optional.of(fc);
-
- //when
- Optional<FcSpec> actualOptional = new NullAwareDatastoreGetter<>(fcOptional)
- .collect(x -> x::getFcSpec)
- .get();
-
- //then
- assertNotNull(actualOptional);
- assertTrue(actualOptional.isPresent());
- assertEquals(expected, actualOptional.get());
- }
-
- @Test
- public void testCollectInputOptionalAbsent() {
- //given
- Optional<ForwardingConstruct> fcOptional = Optional.empty();
-
- //when
- Optional<FcSpec> actualOptional = new NullAwareDatastoreGetter<>(fcOptional)
- .collect(x -> x::getFcSpec)
- .get();
-
- //then
- assertNotNull(actualOptional);
- assertFalse(actualOptional.isPresent());
- }
-
- @Test
- public void testCollectInputGoogleOptionalPresent() {
- //given
- ForwardingConstruct fc = mock(ForwardingConstruct.class);
- FcSpec expected = mock(FcSpec.class);
-
- when(fc.getFcSpec()).thenReturn(expected);
-
- com.google.common.base.Optional<ForwardingConstruct> fcOptional = com.google.common.base.Optional.of(fc);
-
- //when
- Optional<FcSpec> actualOptional = new NullAwareDatastoreGetter<>(fcOptional)
- .collect(x -> x::getFcSpec)
- .get();
-
- //then
- assertNotNull(actualOptional);
- assertTrue(actualOptional.isPresent());
- assertEquals(expected, actualOptional.get());
- }
-
- @Test
- public void testCollectInputGoogleOptionalAbsent() {
- //given
- com.google.common.base.Optional<ForwardingConstruct> fcOptional = com.google.common.base.Optional.absent();
-
- //when
- Optional<FcSpec> actualOptional = new NullAwareDatastoreGetter<>(fcOptional)
- .collect(x -> x::getFcSpec)
- .get();
-
- //then
- assertNotNull(actualOptional);
- assertFalse(actualOptional.isPresent());
- }
-
- @Test
- public void testCollectAugmentationNotNull() {
- //given
- ForwardingConstruct fc = mock(ForwardingConstruct.class);
- ForwardingConstruct1 expected = mock(ForwardingConstruct1.class);
-
- when(fc.getAugmentation(eq(ForwardingConstruct1.class))).thenReturn(expected);
-
- //when
- Optional<ForwardingConstruct1> actualOptional = new NullAwareDatastoreGetter<>(fc)
- .collect(x -> x::getAugmentation, ForwardingConstruct1.class)
- .get();
-
- //then
- assertNotNull(actualOptional);
- assertTrue(actualOptional.isPresent());
- assertEquals(expected, actualOptional.get());
- }
-
- @Test
- public void testCollectAugmentationNull() {
- //given
- ForwardingConstruct fc = mock(ForwardingConstruct.class);
- when(fc.getAugmentation(eq(ForwardingConstruct1.class))).thenReturn(null);
-
- //when
- Optional<ForwardingConstruct1> actualOptional = new NullAwareDatastoreGetter<>(fc)
- .collect(x -> x::getAugmentation, ForwardingConstruct1.class)
- .get();
-
- //then
- assertNotNull(actualOptional);
- assertFalse(actualOptional.isPresent());
- }
-
- @Test
- public void testCollectManyNotNull() {
- //given
- ForwardingConstruct fc = mock(ForwardingConstruct.class);
-
- FcPort fcPortA = mock(FcPort.class);
- FcPort fcPortZ = mock(FcPort.class);
-
- List<FcPort> fcPorts = new ArrayList<>();
- fcPorts.add(fcPortA);
- fcPorts.add(fcPortZ);
-
- when(fc.getFcPort()).thenReturn(fcPorts);
-
- //when
- List<NullAwareDatastoreGetter<FcPort>> nullAwareDatastoreGetters = new NullAwareDatastoreGetter<>(fc)
- .collectMany(x -> x::getFcPort);
-
- //then
- assertNotNull(nullAwareDatastoreGetters);
- assertEquals(2, nullAwareDatastoreGetters.size());
-
- NullAwareDatastoreGetter fcPortNadg1 = nullAwareDatastoreGetters.get(0);
- assertTrue(fcPortNadg1.get().isPresent());
- assertEquals(fcPortA, fcPortNadg1.get().get());
-
- NullAwareDatastoreGetter fcPortNadg2 = nullAwareDatastoreGetters.get(1);
- assertTrue(fcPortNadg2.get().isPresent());
- assertEquals(fcPortZ, fcPortNadg2.get().get());
- }
-
- @Test
- public void testCollectManyNull() {
- //given
- ForwardingConstruct fc = mock(ForwardingConstruct.class);
- List<FcPort> fcPorts = null;
-
- when(fc.getFcPort()).thenReturn(fcPorts);
-
- //when
- List<NullAwareDatastoreGetter<FcPort>> nullAwareDatastoreGetters = new NullAwareDatastoreGetter<>(fc)
- .collectMany(x -> x::getFcPort);
-
- //then
- assertNotNull(nullAwareDatastoreGetters);
- assertEquals(0, nullAwareDatastoreGetters.size());
- }
-}
<id>models</id>
<modules>
<module>cisco-xrmodels</module>
- <module>edgeassure-1000</module>
</modules>
<activation><activeByDefault>true</activeByDefault></activation>
</profile>
<modules>
<module>api</module>
<module>legato-api</module>
- <module>presto-api</module>
<module>nrp-api</module>
<module>impl</module>
<module>netvirt</module>
+++ /dev/null
-<?xml version="1.0" encoding="UTF-8"?>
-<!--
-Copyright (c) 2016 Cisco Systems, Inc. All rights reserved.
-
-This program and the accompanying materials are made available under the
-terms of the Eclipse Public License v1.0 which accompanies this distribution,
-and is available at http://www.eclipse.org/legal/epl-v10.html INTERNAL
--->
-<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
- <parent>
- <groupId>org.opendaylight.mdsal</groupId>
- <artifactId>binding-parent</artifactId>
- <version>0.12.0-SNAPSHOT</version>
- <relativePath/>
- </parent>
-
- <modelVersion>4.0.0</modelVersion>
- <groupId>org.opendaylight.unimgr</groupId>
- <artifactId>unimgr-presto-api</artifactId>
- <version>0.4.0-SNAPSHOT</version>
- <packaging>bundle</packaging>
- <!-- <name> formatting is used by autorelease to parse and notify projects on
- build failure. Please do not modify this unless you have a good reason. -->
- <name>ODL :: unimgr :: ${project.artifactId}</name>
-
- <dependencies>
- <dependency>
- <groupId>org.opendaylight.mdsal.model</groupId>
- <artifactId>ietf-topology</artifactId>
- </dependency>
- </dependencies>
-
-</project>
+++ /dev/null
-/*
- * Copyright (c) 2016 Cisco Systems, Inc. All rights reserved.
- *
- * This program and the accompanying materials are made available under the
- * terms of the Eclipse Public License v1.0 which accompanies this distribution,
- * and is available at http://www.eclipse.org/legal/epl-v10.html INTERNAL
- */
-module mef-nrp-bandwidth-profile {
- namespace "urn:mef:nrp-bandwidth-profile";
- prefix nrp-bwp;
-
- import mef-nrp-types {
- prefix nrp-types;
- }
-
- revision 2016-06-30 {
- }
-
- grouping G_NRP_BwpFlow {
- leaf bwpFlowIndex {
- type nrp-types:NRP_PositiveInteger;
- description "The index i=1,2,...,n is used to index the Bandwidth Profile Flow among all Bandwidth Profile
-Flows that are mapped to a given Envelope";
- }
- leaf cir {
- type nrp-types:NRP_NaturalNumber;
- description "Committed Information Rate that limits the average rate of frames that will be declared
-Green. In bits per second.";
- }
- leaf cirMax {
- type nrp-types:NRP_NaturalNumber;
- description "Maximum Committed Information Rate that limits the rate of tokens added to the committed token
-bucket. In bits per second.";
- }
- leaf cbs {
- type nrp-types:NRP_NaturalNumber;
- description "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 nrp-types:NRP_NaturalNumber;
- description "Excess Information Rate that limits the average rate of frames that will be declared Yellow, in
-bits per second.";
- }
- leaf eirMax {
- type nrp-types:NRP_NaturalNumber;
- description "Maximum Excess Infor-mation Rate that Limits the rate of tokens added to the excess token
-bucket, in bits per second.";
- }
- leaf ebs {
- type nrp-types:NRP_NaturalNumber;
- description "Excessive Burst Size that limits the maximum number of bytes available for a burst of frames
-that will be declared Yellow, in bytes.";
- }
- leaf couplingFlag {
- type nrp-types:NRP_NaturalNumber;
- description "Coupling Flag that Determines if overflow Green tokens can be used as Yellow tokens. Value 0 for
-NO and value 1 for YES.";
- }
- leaf colorMode {
- type nrp-types:NRP_ColorMode;
- description "Color Mode that Indicates whether the Color Identifier of the frame is considered by the
-Bandwidth Profile Algorithm.";
- }
- leaf rank {
- type nrp-types:NRP_PositiveInteger;
- description "Bandwidth prorile flow rank in an associated Envelope.";
- }
- leaf tokenRequestOffset {
- type nrp-types:NRP_NaturalNumber;
- description "Adjusts the number of tokens requested for each external interface frame.";
- }
- }
-
- grouping G_NRP_ColorIdentifier {
- choice identifier {
- case sap-color-id {
- container serviceAccessPointColorId {
- uses G_NRP_ServiceAccessPointColorId;
- }
- }
- case pcp-color-id {
- container pcpColorId {
- uses G_NRP_PcpColorId;
- }
- }
- case dei-color-id {
- container deiColorId {
- uses G_NRP_DeiColorId;
- }
- }
- case desp-color-id {
- container despColorId {
- uses G_NRP_DespColorId;
- }
- }
- }
- }
-
- grouping G_NRP_ServiceAccessPointColorId {
- leaf color {
- type nrp-types:NRP_FrameColor;
- description "Green or Yellow.";
- }
- }
- grouping G_NRP_PcpColorId {
- leaf vlanTag {
- type nrp-types:NRP_VlanTag;
- description "Which vlan tag pcp to be used for color identier, S tag or C tag. S-tag is not valid for EvcEndPoint. ";
- }
- leaf-list pcpValue {
- description "List PCP values map to the same color.";
- ordered-by system;
- type nrp-types:NRP_NaturalNumber;
- min-elements 1;
- }
- leaf color {
- type nrp-types:NRP_FrameColor;
- description "Green or Yellow.";
- }
- }
- grouping G_NRP_DeiColorId {
- leaf vlanTag {
- type nrp-types:NRP_VlanTag;
- description "Which vlan tag pcp to be used for color identier, S tag or C tag. S-tag is not valid for EvcEndPoint. ";
- }
- leaf-list deiValue {
- description "DEI=0 or DEI=1";
- ordered-by system;
- type nrp-types:NRP_NaturalNumber;
- max-elements 2;
- min-elements 1;
- }
- leaf color {
- type nrp-types:NRP_FrameColor;
- description "Green or Yellow";
- }
- }
- grouping G_NRP_DespColorId {
- leaf ipVersion {
- type nrp-types:NRP_IpVersion;
- description "IPv4, or IPv6, or both IPv4 and IPv6.";
- }
- leaf-list dscpValue {
- description "List DSCP values map to the same color.";
- ordered-by system;
- type nrp-types:NRP_NaturalNumber;
- }
- leaf color {
- type nrp-types:NRP_FrameColor;
- description "Green or Yellow";
- }
- }
-
-}
+++ /dev/null
-/*
- * Copyright (c) 2016 Cisco Systems, Inc. All rights reserved.
- *
- * This program and the accompanying materials are made available under the
- * terms of the Eclipse Public License v1.0 which accompanies this distribution,
- * and is available at http://www.eclipse.org/legal/epl-v10.html INTERNAL
- */
-module mef-nrp-specs {
- namespace "urn:mef:nrp-specs";
- prefix nrp;
-
- import onf-core-network-module {
- prefix onf-cn;
- }
-
- import mef-nrp-types {
- prefix nrp-types;
- }
-
- import mef-nrp-bandwidth-profile {
- prefix nrp-bwp;
- }
-
- import network-topology {
- prefix nt;
- }
-
- revision 2016-06-30 {
- }
-
- augment "/onf-cn:forwarding-constructs/onf-cn:forwarding-construct/onf-cn:fcSpec" {
- container nrp-ce-fcspec-attrs {
- uses G_NRP_CeFcSpec;
- }
- }
-
- grouping G_NRP_CeFcSpec {
- leaf connectionType {
- type nrp-types:NRP_ConnectionType;
- description "Virtual connection (EVC or OVC).";
- }
- leaf unicastFrameDelivery {
- type nrp-types:NRP_ServiceFrameDelivery;
- description "A Data Service Frame with a unicast Destination MAC Address is defined to be a Multicast Data
-Service Frame. Reference MEF 10.3, Section 8.5.2.";
- }
- leaf multicastFrameDelivery {
- type nrp-types:NRP_ServiceFrameDelivery;
- }
- leaf broadcastFrameDelivery {
- type nrp-types:NRP_ServiceFrameDelivery;
- description "A Data Service Frame with a broadcast Destination MAC Address is defined to be a Broadcast Data
-Service Frame. Reference MEF 10.3, Section 8.5.2 for EVC and MEF 26.1, Section x.y for OVC.";
- }
- leaf vcMaxServiceFrame {
- type nrp-types:NRP_PositiveInteger;
- description "The value for the EVC or OVC Maximum Service Frame Size is a positive integer in
-bytes. Reference MEF 10.3, Section 8.9 for EVC and MEF 26.1 Section x.y for OVC.";
- }
- leaf vcId {
- type nrp-types:NRP_PositiveInteger;
- description "The EVC ID is an arbitrary string administered by the Service Provider that is used to identify
-an EVC within the CEN. MEF 10.3, Section 8.2.";
- }
- }
-
- augment "/nt:network-topology/nt:topology/nt:node/nt:termination-point/onf-cn:ltp-attrs/onf-cn:lpList/onf-cn:lpSpec/onf-cn:terminationSpec" {
- container nrp-termination-spec-attrs {
- uses G_NRP_TerminationSpec;
- }
- container nrp-uni-termination-attrs {
- uses G_NRP_UNI_TerminationSpec;
- }
- }
-
- grouping G_NRP_TerminationSpec {
- leaf physicalLayer {
- type nrp-types:NRP_PhysicalLayer;
- description "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 be one of the PHYs listed in IEEE Std 802.3 -
-2012 but excluding 1000BASE-PX-D and 1000BASE-PX-U. Reference MEF 10.3, Section 9.2.";
- }
- list syncMode {
- description "<p>The Synchronous Mode Service 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. Reference MEF 10.3, Section 9.3.</p>
-";
- key 'linkId';
- config true;
- ordered-by system;
- uses nrp-types:G_NRP_SyncModePerLink;
- }
- leaf numberOfLinks {
- type nrp-types:NRP_NaturalNumber;
- description "This attribute specifies the number of links at the Ethernet Service Interface (UNI or ENNI).
-MEF 10.3, Section 9.4.";
- }
- leaf resiliency {
- type nrp-types:NRP_InterfaceResiliency;
- description "This attribute value is one of None, 2-Link Active/Standby, All Active, or Other. MEF 10.3,
-Section 9.5. MEF 10.3.2, MEF 26.2
-";
- }
- container portConvsIdToAggLinkMap {
- description "The Port Conversation ID to Aggregation Link Map Attribute is applicable only when the
-EthernetServiceInterface 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. MEF 10.3.2";
- config true;
- uses nrp-types:G_NRP_ConversationIdToAggrgationLinkMap;
- }
- leaf maxFrameSize {
- type nrp-types:NRP_NaturalNumber;
- description "This value limits the length of frames carried by an EVC/OVC that associates an EVC/OVC End
-Point. The minimum of this maxinum number for UNI and ENNI are different. MEF 10.3, Section
-9.7.";
- }
- leaf linkOamEnabled {
- type boolean;
- description "When the value of the Link OAM attribute is Enabled, Link OAM musd tbe run on all physical links
-in the UNI/ENNI. MEF 10.3, Section 9.16.";
- }
- leaf tokenShareEnabled {
- type boolean;
- description "When the value of the Token Share Service attribute is Enabled, at least one Envelope at the
-UNI/ENNI MUST be able to have two or more Bandwidth Profiles mapped to it. MEF 6.2, Section
-8.2.1.";
- }
- leaf serviceProviderUniId {
- type string;
- description "MEF 10.3, Section 9.1.";
- }
- }
-
- grouping G_NRP_UNI_TerminationSpec {
- leaf defaultCeVlanId {
- description "This is the CE-VLAN ID value assigned to Untagged Service Frames and Priority Tagged Service
-Frames. In MEF 10.3, it is called CE Vlan ID for untagged and priority tagged service frames.
-MEF 10.3, Section 9.9.";
- config true;
- type nrp-types:NRP_PositiveInteger;
- }
- leaf uniMegEnabled {
- type boolean;
- description "When the value of the UNI MEG Service Attribute is Enabled, the CEN MUST meet the mandatory
-requirements in MEF 30.1 that apply to the UNI MEG MEF 10.3, Section 9.17.";
- }
- leaf elmiEnabled {
- type boolean;
- description "When the value of the E-LMI Service Attribute is Enabled, the CEN MUST meet the mandatory
-requirements in MEF 16 that apply to the UNI-N. MEF 10.3, Section 9.18";
- }
- leaf serviceprovideruniprofile {
- type string;
- }
- leaf operatoruniprofile {
- type string;
- }
- container ingressBwpUni {
- description "MEF 10.3, Section 9.14";
- config true;
- uses nrp-bwp:G_NRP_BwpFlow;
- }
- container egressBwpUni {
- description "MEF 10.3, Section 9.15";
- config true;
- uses nrp-bwp:G_NRP_BwpFlow;
- }
- }
-
- augment "/nt:network-topology/nt:topology/nt:node/nt:termination-point/onf-cn:ltp-attrs/onf-cn:lpList/onf-cn:lpSpec/onf-cn:adapterSpec" {
- container nrp-conn-adapt-spec-attrs {
- uses G_NRP_ConnAdaptSpec;
- }
- container nrp-ivc-endpoint-conn-adapt-spec-attrs {
- uses G_NRP_IvcEndpoint_ConnAdaptSpec;
- }
- container nrp-evc-endpoint-conn-adapt-spec-attrs {
- uses G_NRP_EvcEndpoint_ConnAdaptSpec;
- }
- }
-
- grouping G_NRP_ConnAdaptSpec {
- container sourceMacAddressLimit {
- description "MEF 10.3, Section 10.9";
- config true;
- uses nrp-types:G_NRP_SourceMacAddressLimit;
- }
- container CeExternalInterface {
- config true;
- uses G_NRP_TerminationSpec;
- }
- container coloridentifier {
- config true;
- uses nrp-bwp:G_NRP_ColorIdentifier;
- }
- container ingressBwpFlow {
- config true;
- uses nrp-bwp:G_NRP_BwpFlow;
- }
- container egressBwpFlow {
- config true;
- uses nrp-bwp:G_NRP_BwpFlow;
- }
- leaf l2cpAddressSet {
- type nrp-types:NRP_L2cpAddressSet;
- }
- list l2cpPeering {
- description "The L2CP Peering service attribute value MUST be an empty list, or a list
-of entries identifying protocols to be Peered where each entry consists of
-{Destination Address, Protocol Identifier} or {Destination Address, Protocol
-Identifier, Link Identifier}.
-MEF 45, Section 8.2";
- key 'linkId';
- config true;
- ordered-by system;
- uses nrp-types:G_NRP_L2cpPeering;
- }
- }
-
- grouping G_NRP_EvcEndpoint_ConnAdaptSpec {
- uses G_NRP_ConnAdaptSpec;
- leaf evcEndPointId {
- type nrp-types:NRP_PositiveInteger;
- description "The EVC End Point Identification. This attribute is adapted from MEF 26.2. MEF 10.3 uses \"EVC
-per UNI\" for EVC End Point, therefore there is no identificaiton attribute.";
- }
- leaf testMegEnabled {
- type boolean;
- description "When the value of the Test MEG Service Attribute is Enabled, the CEN MUST meet the mandatory
-requirements in Section 7.5 of MEF 30.1. that apply to the Test MEG";
- }
- leaf evcEndPointRole {
- type nrp-types:NRP_EvcEndPointRole;
- description "The EVC End Point Role is ROOF or LEAF.";
- }
- list evcEndPointMap {
- description "This attribute provides the list of CE-VLAN IDs that maps to the EVC. MEF 10.3 and MEF 6.2 list
-this attriubte (CE-VLAN ID/EVC map) as UNI service attribute while MEF 26.2 decided to move this
-on as endpoint service attribute, just as MEF 10.1 and MEF 6.1 did. Decided to move this one to
-endpoint to be consistent. To be consitent, changing its name to EvcEntPointMap (MEF 26.2 lists
-as OVC Endpoint Map).
-";
- key 'vid';
- leaf vid {
- type nrp-types:NRP_PositiveInteger;
- }
- config true;
- ordered-by system;
- }
- leaf subscriberMegMipEbabled {
- type boolean;
- description "When the value of the Subscriber MEG MIP Service Attribute is Enabled, the CEN MUST instantiate
-a Subscriber Level MIP.";
- }
- }
-
- grouping G_NRP_IvcEndpoint_ConnAdaptSpec {
- leaf ivcEndPointId {
- type string;
- description "The EVC End Point Identification. This attribute is adapted from MEF 26.2. MEF 10.3 uses \"EVC
-per UNI\" for EVC End Point, therefore there is no identificaiton attribute.";
- }
- leaf testMegEnabled {
- type boolean;
- description "When the value of the Test MEG Service Attribute is Enabled, the CEN MUST meet the mandatory
-requirements in Section 7.5 of MEF 30.1. that apply to the Test MEG";
- }
- leaf ivcEndPointRole {
- type nrp-types:NRP_EndPointRole;
- description "The EVC End Point Role is ROOF or LEAF.";
- }
- list ivcEndPointMap {
- description "This attribute provides the list of CE-VLAN IDs that maps to the EVC. MEF 10.3 and MEF 6.2 list
-this attriubte (CE-VLAN ID/EVC map) as UNI service attribute while MEF 26.2 decided to move this
-on as endpoint service attribute, just as MEF 10.1 and MEF 6.1 did. Decided to move this one to
-endpoint to be consistent. To be consitent, changing its name to EvcEntPointMap (MEF 26.2 lists
-as OVC Endpoint Map).
-";
- key 'vlanId';
- config true;
- ordered-by system;
- uses G_NRP_EndPointMap;
- }
- leaf subscriberMegMipEnabled {
- type boolean;
- description "When the value of the Subscriber MEG MIP Service Attribute is Enabled, the CEN MUST instantiate
-a Subscriber Level MIP.";
- }
- }
-
- grouping G_NRP_EndPointMap {
- leaf vlanId {
- type nrp-types:NRP_PositiveInteger;
- }
- choice endpoint-map-form {
- case map-form-e {
- list enni-svid {
- key 'vid';
- leaf vid {
- type nrp-types:NRP_PositiveInteger;
- }
- }
- }
- case map-form-t {
- leaf root-svid {
- type nrp-types:NRP_PositiveInteger;
- }
- leaf leaf-svid {
- type nrp-types:NRP_PositiveInteger;
- }
- }
- case map-form-v {
- leaf vuni-vid {
- type nrp-types:NRP_PositiveInteger;
- }
- list enni-cevid {
- key 'vid';
- leaf vid {
- type nrp-types:NRP_PositiveInteger;
- }
- }
- }
- case map-form-u {
- list cvid {
- key 'vid';
- leaf vid {
- type nrp-types:NRP_PositiveInteger;
- }
- }
- }
- }
- }
-}
+++ /dev/null
-/*
- * Copyright (c) 2016 Cisco Systems, Inc. All rights reserved.
- *
- * This program and the accompanying materials are made available under the
- * terms of the Eclipse Public License v1.0 which accompanies this distribution,
- * and is available at http://www.eclipse.org/legal/epl-v10.html INTERNAL
- */
-module mef-nrp-types {
- namespace "urn:mef:nrp-types";
- prefix nrp-types;
-
- revision 2016-06-30 {
- }
-
- grouping G_NRP_SourceMacAddressLimit {
- leaf enabled {
- type boolean;
- }
- leaf limit {
- type NRP_NaturalNumber;
- }
- leaf timeInterval {
- type NRP_NaturalNumber;
- }
- }
- grouping G_NRP_VlanId {
- leaf vid {
- type NRP_PositiveInteger;
- }
- }
- typedef NRP_EvcEndPointRole {
- type enumeration {
- enum ROOT;
- enum LEAF;
- }
- }
- typedef NRP_Identifier45 {
- type string;
- }
- typedef NRP_L2cpAddressSet {
- type enumeration {
- enum CTA;
- enum CTB;
- enum CTB2;
- }
- }
- typedef NRP_PhysicalLayer {
- type enumeration {
- enum 10BASE2;
- enum 10BASE5;
- enum 10BASE_F;
- enum 10BASE_FB;
- enum 10BASE_FL;
- enum 10BASE_FP;
- enum 10BASE_T;
- enum 10BASE_TE;
- enum 10BROAD36;
- enum 10PASS_TS;
- enum 100BASE_BX10;
- enum 100BASE_FX;
- enum 100BASE_LX10;
- enum 100BASE_T;
- enum 100BASE_T2;
- enum 100BASE_T4;
- enum 100BASE_TX;
- enum 100BASE_X;
- enum 1000BASE_BX10;
- enum 1000BASE_CX;
- enum 1000BASE_KX;
- enum 1000BASE_LX;
- enum 1000BASE_LX10;
- enum 1000BASE_PX10;
- enum 1000BASE_PX20;
- enum 1000BASE_SX;
- enum 1000BASE_T;
- enum 1000BASE_X;
- enum 10GBASE_CX4;
- enum 10GBASE_E;
- enum 10GBASE_ER;
- enum 10GBASE_EW;
- enum 10GBASE_KR;
- enum 10GBASE_KX4;
- enum 10GBASE_L;
- enum 10GBASE_LR;
- enum 10GBASE_LRM;
- enum 10GBASE_LW;
- enum 10GBASE_LX4;
- enum 10GBASE_PR;
- enum 10GBASE_PRX;
- enum 10GBASE_R;
- enum 10GBASE_S;
- enum 10GBASE_SR;
- enum 10GBASE_SW;
- enum 10GBASE_T;
- enum 10GBASE_W;
- enum 10GBASE_X;
- enum 100GBASE_R;
- enum 100GBASE_CR10;
- enum 100GBASE_ER4;
- enum 100GBASE_LR4;
- enum 100GBASE_SR10;
- enum 40GBASE_R;
- enum 40GBASE_CR4;
- enum 40GBASE__FR;
- enum 40GBASE_KR4;
- enum 40GBASE_LR4;
- enum 40GBASE_SR4;
- enum 1BASE5;
- enum 2BASE_TL;
- enum 1G_EPON;
- enum 10G_EPON;
- enum 10_1G_EPON;
- enum 10_10G_EPON;
- enum NONE;
- }
- }
- typedef NRP_NaturalNumber {
- type uint32 {
- range "1..max";
- }
- }
- grouping G_NRP_SyncModePerLink {
- leaf linkId {
- type string;
- }
- leaf syncModeEnabled {
- type boolean;
- }
- }
- typedef NRP_ProtocolFrameType {
- type enumeration {
- enum ETHERTYPE;
- enum LLC_ADDRESS;
- enum OTHER;
- }
- }
- typedef NRP_InterfaceResiliency {
- type enumeration {
- enum NONE;
- enum 2_LINK_ACTIVE_STANDBY;
- enum ALL_ACTIVE;
- enum OTHER;
- }
- }
- grouping G_NRP_ConversationIdToAggrgationLinkMap {
- leaf conversationId {
- type NRP_NaturalNumber;
- }
- leaf linkId {
- type NRP_NaturalNumber;
- }
- }
- grouping G_NRP_L2cpPeering {
- leaf destinationMacAddress {
- type string;
- description "The destination address determines the intended recipient device for the frame.";
- }
- leaf protocolType {
- type NRP_ProtocolFrameType;
- description "Protocol Identifier is either an LLC Address or an Ethertype, and it could have subtypes. The list specifies only the L2CP Frames that
-are to be Peered. Any L2CP Frame that is not Peered will either be Discarded or Passed
-as a result of the flow charts and requirements specified in MEF 45, Section 9.";
- }
- leaf linkId {
- type string;
- description "Identifies the physical link identifier for protocols (e.g. LLDP, ESMC) that can operate over the individual physical links.
-If no link identifier is specified then the list entry will apply to all physical links.
-MEF 45, Section 8.2";
- }
- leaf protocolId {
- type string;
- }
- }
- typedef NRP_ColorMode {
- type enumeration {
- enum COLOR_AWARE;
- enum COLOR_BLIND;
- }
- }
- typedef NRP_PositiveInteger {
- type uint32 {
- range "1..max";
- }
- }
- typedef NRP_VlanTag {
- type enumeration {
- enum S_TAG;
- enum C_TAG;
- }
- }
- typedef NRP_IpVersion {
- type enumeration {
- enum IPV4;
- enum IPV6;
- enum IPV4_AND_IPV6;
- }
- }
- typedef NRP_FrameColor {
- type enumeration {
- enum GREEN;
- enum YELLOW;
- }
- }
- typedef NRP_PcpOrDiscard {
- type enumeration {
- enum DISCARD;
- enum 0;
- enum 1;
- enum 2;
- enum 3;
- enum 4;
- enum 5;
- enum 6;
- enum 7;
- }
- }
- typedef NRP_DeiOrDiscard {
- type enumeration {
- enum DISCARD;
- enum 0;
- enum 1;
- }
- }
- grouping G_NRP_AggLinkDepth {
- container nrp_vlanId {
- config true;
- uses G_NRP_VlanId;
- }
- leaf nrp_linkNumber {
- type NRP_NaturalNumber;
- }
- }
- typedef NRP_ConnectionType {
- type enumeration {
- enum POINT_TO_POINT;
- enum MULTIPOINT;
- enum ROOTED_MULTIPOINT;
- }
- }
- typedef NRP_ServiceFrameDelivery {
- type enumeration {
- enum CONDITIONALLY;
- enum UNCONDITIONALLY;
- }
- }
- typedef NRP_EndPointRole {
- type enumeration {
- enum ROOT;
- enum LEAF;
- enum TRUNK;
- }
- }
- typedef NRP_MepDirection {
- type enumeration {
- enum DOWN;
- enum UP;
- }
- }
- grouping G_NRP_MepLevelAndDirection {
- leaf nrp_level {
- type NRP_NaturalNumber;
- }
- leaf nrp_direction {
- type NRP_MepDirection;
- }
- leaf nrp_megId {
- type string;
- }
- }
-}
+++ /dev/null
-module mef-unimgr-ext {
- namespace "urn:mef:unimgr-ext";
- prefix mef-unimgr-ext;
-
- import onf-core-network-module {
- prefix onf-cn;
- }
-
- import ietf-inet-types { prefix "inet"; }
-
- revision 2016-07-25 {
- }
-
- typedef ActivationStatus {
- type enumeration {
- enum INACTIVE;
- enum ACTIVE;
- enum FAILED;
- }
- }
-
- typedef CTagVlanId {
- type uint32 {
- range "0..4094";
- }
- }
-
- augment "/onf-cn:forwarding-constructs/onf-cn:forwarding-construct" {
- container unimgr-attrs {
- leaf status {
- type ActivationStatus;
- config false;
- default INACTIVE;
- }
- }
- }
-
- augment "/onf-cn:forwarding-constructs/onf-cn:forwarding-construct/onf-cn:fcPort" {
- leaf cTagVlanId {
- type CTagVlanId;
- config true;
- default 0;
- }
- }
-
- augment "/nt:network-topology/nt:topology/nt:node" {
- container connection-settings {
- leaf userName {
- type string;
- config true;
- }
- leaf password {
- type string;
- config true;
- }
- leaf host {
- type inet:host;
- config true;
- }
- }
- }
-}
+++ /dev/null
-/*
- * Copyright (c) 2016 Cisco Systems, Inc. All rights reserved.
- *
- * This program and the accompanying materials are made available under the
- * terms of the Eclipse Public License v1.0 which accompanies this distribution,
- * and is available at http://www.eclipse.org/legal/epl-v10.html INTERNAL
- */
-module onf-core-network-module {
- namespace "urn:onf:core-network-module";
- prefix onf-cn;
-
- import onf-core-network-types {
- prefix onf-cnt;
- }
-
- import onf-core-specs {
- prefix onf-cs;
- }
-
- import network-topology {
- prefix nt;
- }
-
- revision 2016-06-30 {
- }
-
- container forwarding-constructs {
- list forwarding-construct {
- key 'uuid';
-
- leaf uuid {
- type string;
- }
-
- uses G_ForwardingConstruct;
- }
- }
-
- grouping G_ForwardingConstruct {
- leaf layerProtocolName {
- type onf-cnt:LayerProtocolName;
- description "The layerProtocol at which the FC enables potential for forwarding.";
- }
- leaf-list lowerLevelFc {
- description "An FC object supports a recursive aggregation relationship such that the internal construction
-of an FC can be exposed as multiple lower level FC objects (partitioning). Aggregation is used
-as for the FD to allow changes in hierarchy.
-";
- ordered-by system;
- type leafref {
- path '/forwarding-constructs/forwarding-construct/uuid';
- }
- }
- list fcRoute {
- description "An FC object can have zero or more routes, each of which is defined as a list of lower level FC
-objects describing the flow across the network.";
- key 'uuid';
- config true;
- ordered-by system;
- uses G_FcRoute;
- }
- list fcPort {
- description "The association of the FC to LTPs is made via FcPorts (essentially the ports of the FC).";
- key 'topology node tp';
- config true;
- uses G_FcPort;
- min-elements 2;
- }
- container fcSpec {
- uses onf-cs:G_FcSpec;
- description "References the specification that describes the capability and internal structure of of the FC
-(e.g. The arrangement of switches for a particular instance is described by a referenced
-FcSpec). The specification allows interpretation of FcPort role and switch configurations etc.";
- }
- leaf forwardingDirection {
- type onf-cnt:ForwardingDirection;
- description "The directionality of the ForwardingConstruct. Is applicable to simple ForwardingConstructs
-where all FcPorts are BIDIRECTIONAL (the ForwardingConstruct will be BIDIRECTIONAL) or
-UNIDIRECTIONAL (the ForwardingConstruct will be UNIDIRECTIONAL). Is not present in more complex
-cases.";
- }
- }
-
- grouping G_FcRoute {
- leaf uuid {
- type string;
- }
- leaf-list fc {
- description "The list of FCs describing the route of an FC.";
- ordered-by system;
- type leafref {
- path '/onf-cn:forwarding-constructs/onf-cn:forwarding-construct/onf-cn:uuid';
- }
- min-elements 2;
- }
- }
-
- grouping G_FcPort {
- uses onf-cs:ltp-ref;
- leaf role {
- type onf-cnt:PortRole;
- description "Each FcPort 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.";
- }
- leaf fcPortDirection {
- type onf-cnt:PortDirection;
- description "The orientation of defined flow at the FcPort.";
- }
- }
-
- augment "/nt:network-topology/nt:topology/nt:node/nt:termination-point" {
- container ltp-attrs {
- uses G_LogicalTerminationPoint;
- }
- }
-
- grouping G_LogicalTerminationPoint {
- list lpList {
- description "Ordered list of LayerProtocols that this LTP is comprised of where the first entry in the list is the lowest server layer (e.g. physical)";
- key 'uuid';
- config true;
- leaf uuid {
- type string;
- }
- uses G_LayerProtocol;
- }
- container ltpSpec {
- uses onf-cs:G_LtpSpec;
- description "The specification of the LTP defines internal structure of the LTP. The specification allows
-interpretation of organisation of LPs making up the LTP and also identifies which inter-LTP
-associations are valid.";
- }
- leaf ltpDirection {
- type onf-cnt:TerminationDirection;
- description "The overall directionality of the LTP.
-- A BIDIRECTIONAL LTP must have at least some LPs that are BIDIRECTIONAL but may also have some SINK and/or SOURCE LPs.
-- A SINK LTP can only contain SINK LPs
-- A SOURCE LTP can only contain SOURCE LPs";
- }
- }
-
- grouping G_LayerProtocol {
- leaf layerProtocolName {
- type onf-cnt:LayerProtocolName;
- description "Indicate the specific layer-protocol described by the LayerProtocol entity.";
- }
- container lpSpec {
- uses onf-cs:G_LayerProtocolSpec;
- description "The LpSpec identifies the internal structure of the LP explaining internal flexibilities, degree
-of termination and degree of adaptation on both client and server side.";
- }
- leaf configuredClientCapacity {
- type string;
- description "Provides a summarized view of the client capacity that is configurable for use. Note the cleint
-LTP association should provide all necessary detail hence this attribute is questionable.";
- }
- leaf lpDirection {
- type onf-cnt:TerminationDirection;
- description "The overall directionality of the LP.
-- A BIDIRECTIONAL LP will have some SINK and/or SOURCE flowss.
-- A SINK LP can only contain elements with SINK flows or CONTRA_DIRECTION_SOURCE flows
-- A SOURCE LP can only contain SOURCE flows or CONTRA_DIRECTION_SINK flows";
- }
- leaf terminationState {
- type string;
- description "Indicates whether the layer is terminated and if so how.";
- }
- }
-
-}
+++ /dev/null
-/*
- * Copyright (c) 2016 Cisco Systems, Inc. All rights reserved.
- *
- * This program and the accompanying materials are made available under the
- * terms of the Eclipse Public License v1.0 which accompanies this distribution,
- * and is available at http://www.eclipse.org/legal/epl-v10.html INTERNAL
- */
-module onf-core-network-types {
- namespace "urn:onf:core-network-types";
- prefix onf-cnt;
-
- revision 2016-06-30 {
- }
-
- typedef OperType {
- type enumeration {
- enum REVERTIVE;
- enum NON-REVERTIVE;
- }
- }
-
- typedef LayerProtocolName {
- type string;
- }
-
- typedef ForwardingDirection {
- type enumeration {
- enum BIDIRECTIONAL;
- enum UNIDIRECTIONAL;
- enum UNDEFINED_OR_UNKNOWN;
- }
- }
-
- typedef PortRole {
- status current;
- type string;
- }
-
- typedef PortDirection {
- type enumeration {
- enum BIDIRECTIONAL;
- enum INPUT;
- enum OUTPUT;
- enum UNIDENTIFIED_OR_UNKNOWN;
- }
- }
-
- typedef ProtectionType {
- status deprecated;
- type string;
- }
-
- typedef TerminationDirection {
- type enumeration {
- enum BIDIRECTIONAL;
- enum SINK;
- enum SOURCE;
- enum UNDEFINED_OR_UNKNOWN;
- }
- }
-
-}
+++ /dev/null
-/*
- * Copyright (c) 2016 Cisco Systems, Inc. All rights reserved.
- *
- * This program and the accompanying materials are made available under the
- * terms of the Eclipse Public License v1.0 which accompanies this distribution,
- * and is available at http://www.eclipse.org/legal/epl-v10.html INTERNAL
- */
-module onf-core-specs {
- namespace "urn:onf:core-specs";
- prefix onf-cs;
-
- import network-topology {
- prefix nt;
- }
-
- revision 2016-06-30 {
- }
-
- grouping ltp-ref {
- leaf topology {
- type nt:topology-ref;
- }
- leaf node {
- type nt:node-ref;
- }
- leaf tp {
- type nt:tp-ref;
- }
- }
-
- grouping G_FcSpec {
- status current;
- leaf uuid {
- type string;
- }
- list fcPortSpec {
- key 'uuid';
- config true;
- ordered-by system;
- uses G_FcPortSetSpec;
- }
- }
-
- grouping G_FcPortSetSpec {
- status current;
- leaf uuid {
- type string;
- }
- list ingressFcPortSet {
- ordered-by system;
- key 'topology node tp';
- config true;
- uses ltp-ref;
- }
- list egressFcPortSet {
- ordered-by system;
- key 'topology node tp';
- config true;
- uses ltp-ref;
- }
- leaf role {
- type string;
- default true;
- }
- }
-
- grouping G_LtpSpec {
- }
-
- grouping G_LayerProtocolSpec {
- container adapterSpec {
- config true;
- uses G_ConnectionPointAndAdapterSpec;
- }
- container terminationSpec {
- config true;
- uses G_TerminationSpec;
- }
- list adapterPropertySpecList {
- key 'uuid';
- config true;
- leaf uuid {
- type string;
- }
- ordered-by system;
- uses G_AdapterPropertySpec;
- }
- container providerViewSpec {
- config true;
- uses G_ProviderViewSpec;
- }
- list serverSpecList {
- key 'uuid';
- config true;
- leaf uuid {
- type string;
- }
- ordered-by system;
- uses G_ServerSpec;
- }
- }
-
- grouping G_TerminationSpec {
- }
-
- grouping G_ConnectionPointAndAdapterSpec {
- }
-
- grouping G_AdapterPropertySpec {
- }
-
- grouping G_ProviderViewSpec {
- }
-
- grouping G_ServerSpec {
- }
-}