diff options
author | Ravi Pendurty <ravi.pendurty@highstreet-technologies.com> | 2021-04-19 12:46:16 +0200 |
---|---|---|
committer | Michael DÜrre <michael.duerre@highstreet-technologies.com> | 2021-04-20 08:01:27 +0200 |
commit | 05fe114a5969727c32cd9f1051cd7b9fde0344d5 (patch) | |
tree | 4cb505cd98ddb5b9c6f188f9febe93b07cf743db /sdnr/wt/devicemanager-onap/onf14/provider | |
parent | 6ae7e8a1bae83d407b22d8b066dd0bcca730e1bb (diff) |
Reorganization of devicemanager directory structure
Organized into core, onap and o-ran-sc directories
Issue-ID: CCSDK-3242
Signed-off-by: Ravi Pendurty <ravi.pendurty@highstreet-technologies.com>
Change-Id: I3c23710f990a2d96ba01104c97315fc8c6b1921b
Signed-off-by: Ravi Pendurty <ravi.pendurty@highstreet-technologies.com>
Signed-off-by: Michael DÜrre <michael.duerre@highstreet-technologies.com>
Diffstat (limited to 'sdnr/wt/devicemanager-onap/onf14/provider')
55 files changed, 23827 insertions, 0 deletions
diff --git a/sdnr/wt/devicemanager-onap/onf14/provider/copyright b/sdnr/wt/devicemanager-onap/onf14/provider/copyright new file mode 100644 index 000000000..754b6218f --- /dev/null +++ b/sdnr/wt/devicemanager-onap/onf14/provider/copyright @@ -0,0 +1,17 @@ +/** + * ============LICENSE_START======================================================================== + * ONAP : ccsdk feature sdnr wt + * ================================================================================================= + * Copyright (C) 2019 highstreet technologies GmbH Intellectual Property. All rights reserved. + * ================================================================================================= + * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except + * in compliance with the License. You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software distributed under the License + * is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express + * or implied. See the License for the specific language governing permissions and limitations under + * the License. + * ============LICENSE_END========================================================================== + */ diff --git a/sdnr/wt/devicemanager-onap/onf14/provider/pom.xml b/sdnr/wt/devicemanager-onap/onf14/provider/pom.xml new file mode 100644 index 000000000..89a83d909 --- /dev/null +++ b/sdnr/wt/devicemanager-onap/onf14/provider/pom.xml @@ -0,0 +1,126 @@ +<?xml version="1.0" encoding="UTF-8"?> +<!-- + ~ ============LICENSE_START======================================================= + ~ ONAP : ccsdk features + ~ ================================================================================ + ~ Copyright (C) 2020 highstreet technologies GmbH Intellectual Property. + ~ All rights reserved. + ~ ================================================================================ + ~ Update Copyright (C) 2020 AT&T Intellectual Property. All rights reserved. + ~ ================================================================================ + ~ Licensed under the Apache License, Version 2.0 (the "License"); + ~ you may not use this file except in compliance with the License. + ~ You may obtain a copy of the License at + ~ + ~ http://www.apache.org/licenses/LICENSE-2.0 + ~ + ~ Unless required by applicable law or agreed to in writing, software + ~ distributed under the License is distributed on an "AS IS" BASIS, + ~ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + ~ See the License for the specific language governing permissions and + ~ limitations under the License. + ~ ============LICENSE_END======================================================= + ~ + --> + +<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"> + <modelVersion>4.0.0</modelVersion> + + <parent> + <groupId>org.onap.ccsdk.parent</groupId> + <artifactId>binding-parent</artifactId> + <version>2.2.0-SNAPSHOT</version> + <relativePath/> + </parent> + + <groupId>org.onap.ccsdk.features.sdnr.wt</groupId> + <artifactId>sdnr-wt-devicemanager-onap-onf14-provider</artifactId> + <version>1.2.0-SNAPSHOT</version> + <packaging>bundle</packaging> + + <name>ccsdk-features :: ${project.artifactId}</name> + <licenses> + <license> + <name>Apache License, Version 2.0</name> + <url>http://www.apache.org/licenses/LICENSE-2.0</url> + </license> + </licenses> + + <properties> + <maven.javadoc.skip>true</maven.javadoc.skip> + <maven.build.timestamp.format>yyyy-MM-dd HH:mm</maven.build.timestamp.format> + <buildtime>${maven.build.timestamp} UTC</buildtime> + <databaseport>49400</databaseport> + </properties> + + <dependencies> + <!-- begin for testing --> + <dependency> + <groupId>org.mockito</groupId> + <artifactId>mockito-core</artifactId> + <scope>test</scope> + </dependency> + + <!-- end for testing --> + <dependency> + <groupId>${project.groupId}</groupId> + <artifactId>sdnr-wt-devicemanager-onap-onf14-model</artifactId> + <version>${project.version}</version> + </dependency> + <dependency> + <groupId>org.onap.ccsdk.features.sdnr.wt</groupId> + <artifactId>sdnr-wt-devicemanager-core-model</artifactId> + <version>${project.version}</version> + <scope>provided</scope> + </dependency> + <dependency> + <groupId>org.opendaylight.mdsal</groupId> + <artifactId>mdsal-binding-dom-codec-api</artifactId> + <scope>provided</scope> + </dependency> + <dependency> + <groupId>${project.groupId}</groupId> + <artifactId>sdnr-wt-netconfnode-state-service-model</artifactId> + <version>${project.version}</version> + <scope>provided</scope> + </dependency> + <dependency> + <groupId>org.opendaylight.netconf</groupId> + <artifactId>sal-netconf-connector</artifactId> + <scope>provided</scope> + </dependency> + <dependency> + <groupId>org.opendaylight.mdsal</groupId> + <artifactId>mdsal-singleton-common-api</artifactId> + <scope>provided</scope> + </dependency> + <dependency> + <groupId>org.opendaylight.mdsal.binding.model.ietf</groupId> + <artifactId>rfc6991-ietf-yang-types</artifactId> + <scope>provided</scope> + </dependency> + </dependencies> + + <build> + <resources> + <resource> + <directory>src/main/resources</directory> + <filtering>true</filtering> + </resource> + </resources> + <plugins> + <plugin> + <groupId>org.jacoco</groupId> + <artifactId>jacoco-maven-plugin</artifactId> + <configuration> + <excludes> + <exclude>**/gen/**</exclude> + <exclude>**/generated-sources/**</exclude> + <exclude>**/yang-gen-sal/**</exclude> + <exclude>**/pax/**</exclude> + </excludes> + </configuration> + </plugin> + </plugins> + </build> +</project> diff --git a/sdnr/wt/devicemanager-onap/onf14/provider/src/main/java/org/onap/ccsdk/features/sdnr/wt/devicemanager/onf14/impl/DeviceManagerOnf14Impl.java b/sdnr/wt/devicemanager-onap/onf14/provider/src/main/java/org/onap/ccsdk/features/sdnr/wt/devicemanager/onf14/impl/DeviceManagerOnf14Impl.java new file mode 100644 index 000000000..5c57054ff --- /dev/null +++ b/sdnr/wt/devicemanager-onap/onf14/provider/src/main/java/org/onap/ccsdk/features/sdnr/wt/devicemanager/onf14/impl/DeviceManagerOnf14Impl.java @@ -0,0 +1,89 @@ +/* + * ============LICENSE_START======================================================================== + * ONAP : ccsdk feature sdnr wt + * ================================================================================================= + * Copyright (C) 2020 highstreet technologies GmbH Intellectual Property. All rights reserved. + * ================================================================================================= + * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except + * in compliance with the License. You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software distributed under the License + * is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express + * or implied. See the License for the specific language governing permissions and limitations under + * the License. + * ============LICENSE_END========================================================================== + */ +package org.onap.ccsdk.features.sdnr.wt.devicemanager.onf14.impl; + +import org.onap.ccsdk.features.sdnr.wt.common.database.HtDatabaseClient; +import org.onap.ccsdk.features.sdnr.wt.devicemanager.ne.factory.FactoryRegistration; +import org.onap.ccsdk.features.sdnr.wt.devicemanager.service.NetconfNetworkElementService; +import org.slf4j.Logger; +import org.slf4j.LoggerFactory; + +public class DeviceManagerOnf14Impl implements AutoCloseable { + + private static final Logger LOG = LoggerFactory.getLogger(DeviceManagerOnf14Impl.class); + private static final String APPLICATION_NAME = "DeviceManagerOnf14"; + @SuppressWarnings("unused") + private static final String CONFIGURATIONFILE = "etc/devicemanager-onf14.properties"; + + + private NetconfNetworkElementService netconfNetworkElementService; + + private HtDatabaseClient htDatabaseClient; + private Boolean devicemanagerInitializationOk = false; + private FactoryRegistration<Onf14NetworkElementFactory> resOnf; + + // Blueprint begin + public DeviceManagerOnf14Impl() { + LOG.info("Creating provider for {}", APPLICATION_NAME); + resOnf = null; + } + + public void setNetconfNetworkElementService(NetconfNetworkElementService netconfNetworkElementService) { + this.netconfNetworkElementService = netconfNetworkElementService; + } + + public void init() throws Exception { + + LOG.info("Session Initiated start {}", APPLICATION_NAME); + + resOnf = netconfNetworkElementService.registerBindingNetworkElementFactory(new Onf14NetworkElementFactory()); + + + netconfNetworkElementService.writeToEventLog(APPLICATION_NAME, "startup", "done"); + this.devicemanagerInitializationOk = true; + + LOG.info("Session Initiated end. Initialization done {}", devicemanagerInitializationOk); + } + // Blueprint end + + @Override + public void close() throws Exception { + LOG.info("closing ..."); + close(htDatabaseClient); + close(resOnf); + LOG.info("closing done"); + } + + /** + * Used to close all Services, that should support AutoCloseable Pattern + * + * @param toClose + * @throws Exception + */ + private void close(AutoCloseable... toCloseList) { + for (AutoCloseable element : toCloseList) { + if (element != null) { + try { + element.close(); + } catch (Exception e) { + LOG.warn("Fail during close: ", e); + } + } + } + } +} diff --git a/sdnr/wt/devicemanager-onap/onf14/provider/src/main/java/org/onap/ccsdk/features/sdnr/wt/devicemanager/onf14/impl/Onf14Configuration.java b/sdnr/wt/devicemanager-onap/onf14/provider/src/main/java/org/onap/ccsdk/features/sdnr/wt/devicemanager/onf14/impl/Onf14Configuration.java new file mode 100644 index 000000000..8396e8d9c --- /dev/null +++ b/sdnr/wt/devicemanager-onap/onf14/provider/src/main/java/org/onap/ccsdk/features/sdnr/wt/devicemanager/onf14/impl/Onf14Configuration.java @@ -0,0 +1,54 @@ +/* + * ============LICENSE_START======================================================================== + * ONAP : ccsdk feature sdnr wt + * ================================================================================================= + * Copyright (C) 2019 highstreet technologies GmbH Intellectual Property. All rights reserved. + * ================================================================================================= + * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except + * in compliance with the License. You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software distributed under the License + * is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express + * or implied. See the License for the specific language governing permissions and limitations under + * the License. + * ============LICENSE_END========================================================================== + */ +package org.onap.ccsdk.features.sdnr.wt.devicemanager.onf14.impl; + +import org.onap.ccsdk.features.sdnr.wt.common.configuration.Configuration; +import org.onap.ccsdk.features.sdnr.wt.common.configuration.ConfigurationFileRepresentation; + +public class Onf14Configuration implements Configuration { + + private static final String SECTION_MARKER_DMONF = "dmonf14"; + + private static final String DEFAULT_VALUE_ENABLED = "${SDNR_ONF14_USEDOMAPI}"; + private static final String PROPERTY_KEY_USEDOMAPI = "useDomApi"; + + private final ConfigurationFileRepresentation configuration; + + public Onf14Configuration(ConfigurationFileRepresentation configuration) { + this.configuration = configuration; + this.configuration.addSection(SECTION_MARKER_DMONF); + defaults(); + } + + public boolean isUseDomApiEnabled() { + + return configuration.getPropertyBoolean(SECTION_MARKER_DMONF, PROPERTY_KEY_USEDOMAPI); + } + + @Override + public String getSectionName() { + return SECTION_MARKER_DMONF; + } + + @Override + public void defaults() { + //Add default if not available + configuration.setPropertyIfNotAvailable(SECTION_MARKER_DMONF, PROPERTY_KEY_USEDOMAPI, DEFAULT_VALUE_ENABLED); + } + +} diff --git a/sdnr/wt/devicemanager-onap/onf14/provider/src/main/java/org/onap/ccsdk/features/sdnr/wt/devicemanager/onf14/impl/Onf14DomNetworkElement.java b/sdnr/wt/devicemanager-onap/onf14/provider/src/main/java/org/onap/ccsdk/features/sdnr/wt/devicemanager/onf14/impl/Onf14DomNetworkElement.java new file mode 100644 index 000000000..177f25e1e --- /dev/null +++ b/sdnr/wt/devicemanager-onap/onf14/provider/src/main/java/org/onap/ccsdk/features/sdnr/wt/devicemanager/onf14/impl/Onf14DomNetworkElement.java @@ -0,0 +1,218 @@ +/* + * ============LICENSE_START======================================================================== + * ONAP : ccsdk feature sdnr wt + * ================================================================================================= + * Copyright (C) 2020 highstreet technologies GmbH Intellectual Property. All rights reserved. + * ================================================================================================= + * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except + * in compliance with the License. You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software distributed under the License + * is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express + * or implied. See the License for the specific language governing permissions and limitations under + * the License. + * ============LICENSE_END========================================================================== + */ +package org.onap.ccsdk.features.sdnr.wt.devicemanager.onf14.impl; + +import java.util.List; +import java.util.Map; +import java.util.Optional; +import org.eclipse.jdt.annotation.NonNull; +import org.onap.ccsdk.features.sdnr.wt.dataprovider.model.DataProvider; +import org.onap.ccsdk.features.sdnr.wt.devicemanager.ne.service.NetworkElement; +import org.onap.ccsdk.features.sdnr.wt.devicemanager.ne.service.NetworkElementService; +import org.onap.ccsdk.features.sdnr.wt.devicemanager.onf14.impl.dataprovider.Onf14ToInternalDataModel; +import org.onap.ccsdk.features.sdnr.wt.devicemanager.onf14.impl.equipment.Onf14DomEquipmentManager; +import org.onap.ccsdk.features.sdnr.wt.devicemanager.onf14.impl.interfaces.Onf14DomInterfacePacManager; +import org.onap.ccsdk.features.sdnr.wt.devicemanager.service.DeviceManagerServiceProvider; +import org.onap.ccsdk.features.sdnr.wt.devicemanager.service.FaultService; +import org.onap.ccsdk.features.sdnr.wt.devicemanager.service.NotificationService; +import org.onap.ccsdk.features.sdnr.wt.devicemanager.types.FaultData; +import org.onap.ccsdk.features.sdnr.wt.netconfnodestateservice.NetconfAccessor; +import org.onap.ccsdk.features.sdnr.wt.netconfnodestateservice.NetconfDomAccessor; +import org.opendaylight.mdsal.common.api.LogicalDatastoreType; +import org.opendaylight.yang.gen.v1.urn.ietf.params.xml.ns.netmod.notification.rev080714.netconf.streams.Stream; +import org.opendaylight.yang.gen.v1.urn.ietf.params.xml.ns.netmod.notification.rev080714.netconf.streams.StreamKey; +import org.opendaylight.yang.gen.v1.urn.onf.yang.core.model._1._4.rev191127.ControlConstruct; +import org.opendaylight.yang.gen.v1.urn.onf.yang.core.model._1._4.rev191127.UniversalId; +import org.opendaylight.yang.gen.v1.urn.onf.yang.core.model._1._4.rev191127.control.construct.Equipment; +import org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.data.provider.rev201110.NetworkElementConnectionBuilder; +import org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.data.provider.rev201110.NetworkElementDeviceType; +import org.opendaylight.yang.gen.v1.urn.tbd.params.xml.ns.yang.network.topology.rev131021.NodeId; +import org.opendaylight.yangtools.yang.binding.DataObject; +import org.opendaylight.yangtools.yang.data.api.YangInstanceIdentifier; +import org.slf4j.Logger; +import org.slf4j.LoggerFactory; + +/** + * Representation of ONF Core model 1.4 device Top level element is "ControlConstruct" (replaces "NetworkElement" of + * older ONF Version) NOTE: This class is still under development due to unmet dependencies (especially the ones related + * to DOM notifications) in ODL. Once the dependencies are complete, this class will replace the ONF14NetworkElement + */ +public class Onf14DomNetworkElement implements NetworkElement { + + private static final Logger log = LoggerFactory.getLogger(Onf14DomNetworkElement.class); + + // protected static final InstanceIdentifier<ControlConstruct> CONTROLCONSTRUCT_IID = + // InstanceIdentifier.builder(ControlConstruct.class).build(); + protected static final YangInstanceIdentifier CONTROLCONSTRUCT_IID = + YangInstanceIdentifier.builder().node(ControlConstruct.QNAME).build(); + + private final NetconfDomAccessor netconfDomAccessor; + private final DataProvider databaseService; + private final @NonNull FaultService faultService; + private final @NonNull NotificationService notificationService; + + private final Onf14ToInternalDataModel onf14Mapper; + + private final @NonNull Onf14DomEquipmentManager equipmentManager; + private final @NonNull Onf14DomInterfacePacManager interfacePacManager; + private final @NonNull String namespaceRevision; + + private boolean experimental; + + + public Onf14DomNetworkElement(NetconfDomAccessor netconfDomAccessor, DeviceManagerServiceProvider serviceProvider, + String namespaceRevision) { + log.info("Create {}", Onf14DomNetworkElement.class.getSimpleName()); + this.netconfDomAccessor = netconfDomAccessor; + this.databaseService = serviceProvider.getDataProvider(); + this.notificationService = serviceProvider.getNotificationService(); + this.faultService = serviceProvider.getFaultService(); + this.namespaceRevision = namespaceRevision; + this.onf14Mapper = new Onf14ToInternalDataModel(); + this.equipmentManager = new Onf14DomEquipmentManager(netconfDomAccessor, databaseService, onf14Mapper); + + this.interfacePacManager = new Onf14DomInterfacePacManager(netconfDomAccessor, serviceProvider); + this.experimental = false; + } + + /** + * reading the inventory (CoreModel 1.4 Equipment Model) and adding it to the DB + */ + public void initialReadFromNetworkElement() { + + //Read complete device tree + Optional<ControlConstruct> oControlConstruct = readControlConstruct(netconfDomAccessor); + + if (oControlConstruct.isPresent()) { + ControlConstruct controlConstruct = oControlConstruct.get(); + + equipmentManager.setEquipmentData(controlConstruct); + + //-- Start for experimental purpose + if (experimental) { + log.warn("Experimental code activated"); + for (UniversalId uuid : equipmentManager.getEquipmentUuidList()) { + log.info("Read data with id {}", uuid); + Optional<Equipment> res1 = equipmentManager.readEquipmentInstance(netconfDomAccessor, uuid); + log.info("Res1: {}", res1.isPresent() ? res1.get() : "No data1"); + + /*List<DataObject> res2 = equipmentManager.readEquipmentList(netconfDomAccessor); + log.info("Res2: {}", res2.isPresent() ? res2.get() : "No data2");*/ + + equipmentManager.readTopLevelEquipment(netconfDomAccessor); + //Do it only once for test purpose and break + break; + } + List<DataObject> res2 = equipmentManager.readEquipmentList(netconfDomAccessor); + //log.info("Res2: {}", res2.isPresent() ? res2.get() : "No data2"); + for (DataObject dobj : res2) { + Equipment eqpt = (Equipment) dobj; + log.info("Equipment local ID is : {}", eqpt.getLocalId()); + } + + equipmentManager.readTopLevelEquipment(netconfDomAccessor); + } + //-- End for experimental purpose + + // storing all the LTP UUIDs internally, for later usage, for air-interface and ethernet-container + interfacePacManager.readKeys(controlConstruct); + + // Read all fault data + FaultData resultList = new FaultData(); + + int problems = faultService.removeAllCurrentProblemsOfNode(netconfDomAccessor.getNodeId()); + log.debug("Removed all {} problems from database at registration", problems); + + interfacePacManager.readAllAirInterfaceCurrentProblems(netconfDomAccessor, controlConstruct, resultList); + problems = resultList.size(); + log.debug("NETCONF read air interface current problems completed. Got back {} problems.", problems); + /* + readAllEhernetContainerCurrentProblems(resultList); + problems = resultList.size() - problems; + log.debug("NETCONF read current problems completed. Got back {} problems.", resultList.size()); + + readAllWireInterfaceCurrentProblems(resultList); + problems = resultList.size(); + log.debug("NETCONF read wire interface current problems completed. Got back {} problems.", problems); + */ + faultService.initCurrentProblemStatus(netconfDomAccessor.getNodeId(), resultList); + log.debug("DB write current problems completed"); + } + } + + /** + * @param nNode set core-model-capability + */ + public void setCoreModel() { + NetworkElementConnectionBuilder eb = new NetworkElementConnectionBuilder(); + eb.setCoreModelCapability(namespaceRevision); + databaseService.updateNetworkConnection22(eb.build(), netconfDomAccessor.getNodeId().getValue()); + } + + @Override + public void register() { + // Set core-model revision value in "core-model-capability" field + setCoreModel(); + initialReadFromNetworkElement(); + + if (netconfDomAccessor.isNotificationsRFC5277Supported()) { + // register listener + interfacePacManager.subscribeNotifications(); + // Output notification streams to LOG + Map<StreamKey, Stream> streams = netconfDomAccessor.getNotificationStreamsAsMap(); + log.info("Available notifications streams: {}", streams); + // Register to default stream + netconfDomAccessor.invokeCreateSubscription(); + } + } + + @Override + public void deregister() {} + + + @Override + public NodeId getNodeId() { + return netconfDomAccessor.getNodeId(); + } + + @Override + public <L extends NetworkElementService> Optional<L> getService(Class<L> clazz) { + return Optional.empty(); + } + + @Override + public void warmstart() {} + + @Override + public Optional<NetconfAccessor> getAcessor() { + return Optional.of(netconfDomAccessor); + } + + @Override + public NetworkElementDeviceType getDeviceType() { + return NetworkElementDeviceType.Wireless; + } + + private static Optional<ControlConstruct> readControlConstruct(NetconfDomAccessor netconfDomAccessor) { + return netconfDomAccessor.readData(LogicalDatastoreType.CONFIGURATION, CONTROLCONSTRUCT_IID, + ControlConstruct.class); + } + + + +} diff --git a/sdnr/wt/devicemanager-onap/onf14/provider/src/main/java/org/onap/ccsdk/features/sdnr/wt/devicemanager/onf14/impl/Onf14NetworkElement.java b/sdnr/wt/devicemanager-onap/onf14/provider/src/main/java/org/onap/ccsdk/features/sdnr/wt/devicemanager/onf14/impl/Onf14NetworkElement.java new file mode 100644 index 000000000..f7a49e2d5 --- /dev/null +++ b/sdnr/wt/devicemanager-onap/onf14/provider/src/main/java/org/onap/ccsdk/features/sdnr/wt/devicemanager/onf14/impl/Onf14NetworkElement.java @@ -0,0 +1,548 @@ +/* + * ============LICENSE_START======================================================================== + * ONAP : ccsdk feature sdnr wt + * ================================================================================================= + * Copyright (C) 2020 highstreet technologies GmbH Intellectual Property. All rights reserved. + * ================================================================================================= + * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except + * in compliance with the License. You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software distributed under the License + * is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express + * or implied. See the License for the specific language governing permissions and limitations under + * the License. + * ============LICENSE_END========================================================================== + */ +package org.onap.ccsdk.features.sdnr.wt.devicemanager.onf14.impl; + +import java.util.ArrayList; +import java.util.Collection; +import java.util.List; +import java.util.Optional; +import org.eclipse.jdt.annotation.NonNull; +import org.eclipse.jdt.annotation.Nullable; +import org.onap.ccsdk.features.sdnr.wt.common.YangHelper; +import org.onap.ccsdk.features.sdnr.wt.dataprovider.model.DataProvider; +import org.onap.ccsdk.features.sdnr.wt.devicemanager.ne.service.NetworkElement; +import org.onap.ccsdk.features.sdnr.wt.devicemanager.ne.service.NetworkElementService; +import org.onap.ccsdk.features.sdnr.wt.devicemanager.onf14.impl.dataprovider.Onf14ToInternalDataModel; +import org.onap.ccsdk.features.sdnr.wt.devicemanager.onf14.impl.interfaces.Onf14AirInterface; +import org.onap.ccsdk.features.sdnr.wt.devicemanager.onf14.impl.interfaces.Onf14AirInterfaceNotificationListener; +import org.onap.ccsdk.features.sdnr.wt.devicemanager.onf14.impl.interfaces.Onf14EthernetContainer; +import org.onap.ccsdk.features.sdnr.wt.devicemanager.onf14.impl.interfaces.Onf14EthernetContainerNotificationListener; +import org.onap.ccsdk.features.sdnr.wt.devicemanager.onf14.impl.interfaces.Onf14WireInterface; +import org.onap.ccsdk.features.sdnr.wt.devicemanager.onf14.impl.interfaces.Onf14WireInterfaceNotificationListener; +import org.onap.ccsdk.features.sdnr.wt.devicemanager.service.DeviceManagerServiceProvider; +import org.onap.ccsdk.features.sdnr.wt.devicemanager.service.FaultService; +import org.onap.ccsdk.features.sdnr.wt.devicemanager.types.FaultData; +import org.onap.ccsdk.features.sdnr.wt.netconfnodestateservice.Capabilities; +import org.onap.ccsdk.features.sdnr.wt.netconfnodestateservice.NetconfAccessor; +import org.onap.ccsdk.features.sdnr.wt.netconfnodestateservice.NetconfBindingAccessor; +import org.opendaylight.mdsal.common.api.LogicalDatastoreType; +import org.opendaylight.yang.gen.v1.urn.onf.yang.air._interface._2._0.rev200121.LAYERPROTOCOLNAMETYPEAIRLAYER; +import org.opendaylight.yang.gen.v1.urn.onf.yang.air._interface._2._0.rev200121.air._interface.lp.spec.AirInterfacePac; +import org.opendaylight.yang.gen.v1.urn.onf.yang.air._interface._2._0.rev200121.air._interface.pac.AirInterfaceCurrentProblems; +import org.opendaylight.yang.gen.v1.urn.onf.yang.core.model._1._4.rev191127.ControlConstruct; +import org.opendaylight.yang.gen.v1.urn.onf.yang.core.model._1._4.rev191127.LAYERPROTOCOLNAMETYPE; +import org.opendaylight.yang.gen.v1.urn.onf.yang.core.model._1._4.rev191127.UniversalId; +import org.opendaylight.yang.gen.v1.urn.onf.yang.core.model._1._4.rev191127.control.construct.Equipment; +import org.opendaylight.yang.gen.v1.urn.onf.yang.core.model._1._4.rev191127.control.construct.EquipmentKey; +import org.opendaylight.yang.gen.v1.urn.onf.yang.core.model._1._4.rev191127.control.construct.LogicalTerminationPoint; +import org.opendaylight.yang.gen.v1.urn.onf.yang.core.model._1._4.rev191127.control.construct.LogicalTerminationPointKey; +import org.opendaylight.yang.gen.v1.urn.onf.yang.core.model._1._4.rev191127.equipment.ContainedHolder; +import org.opendaylight.yang.gen.v1.urn.onf.yang.core.model._1._4.rev191127.logical.termination.point.LayerProtocol; +import org.opendaylight.yang.gen.v1.urn.onf.yang.core.model._1._4.rev191127.logical.termination.point.LayerProtocolKey; +import org.opendaylight.yang.gen.v1.urn.onf.yang.ethernet.container._2._0.rev200121.LAYERPROTOCOLNAMETYPEETHERNETCONTAINERLAYER; +import org.opendaylight.yang.gen.v1.urn.onf.yang.ethernet.container._2._0.rev200121.ethernet.container.lp.spec.EthernetContainerPac; +import org.opendaylight.yang.gen.v1.urn.onf.yang.ethernet.container._2._0.rev200121.ethernet.container.pac.EthernetContainerCurrentProblems; +import org.opendaylight.yang.gen.v1.urn.onf.yang.wire._interface._2._0.rev200123.LAYERPROTOCOLNAMETYPEWIRELAYER; +import org.opendaylight.yang.gen.v1.urn.onf.yang.wire._interface._2._0.rev200123.wire._interface.lp.spec.WireInterfacePac; +import org.opendaylight.yang.gen.v1.urn.onf.yang.wire._interface._2._0.rev200123.wire._interface.pac.WireInterfaceCurrentProblems; +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.data.provider.rev201110.Inventory; +import org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.data.provider.rev201110.NetworkElementConnectionBuilder; +import org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.data.provider.rev201110.NetworkElementDeviceType; +import org.opendaylight.yang.gen.v1.urn.tbd.params.xml.ns.yang.network.topology.rev131021.NodeId; +import org.opendaylight.yangtools.concepts.ListenerRegistration; +import org.opendaylight.yangtools.yang.binding.InstanceIdentifier; +import org.opendaylight.yangtools.yang.binding.NotificationListener; +import org.opendaylight.yangtools.yang.common.QName; +import org.slf4j.Logger; +import org.slf4j.LoggerFactory; + +/** + * Repesentation of ONF Core model 1.4 device Top level element is "ControlConstruct" (replaces "NetworkElement" of + * older ONF Version) + */ +public class Onf14NetworkElement implements NetworkElement { + + private static final Logger log = LoggerFactory.getLogger(Onf14NetworkElement.class); + + protected static final InstanceIdentifier<ControlConstruct> CONTROLCONSTRUCT_IID = + InstanceIdentifier.builder(ControlConstruct.class).build(); + + private static final int EQUIPMENTROOTLEVEL = 0; + + private final NetconfBindingAccessor netconfAccessor; + private final DataProvider databaseService; + private final Onf14ToInternalDataModel onf14Mapper; + private final @NonNull FaultService faultService; + + // for storing the Equipment UUIDs that are inserted in the DB + private final List<String> equipmentUuidList = new ArrayList<String>(); + + // air interface related members + private final List<TechnologySpecificPacKeys> airInterfaceList = new ArrayList<TechnologySpecificPacKeys>(); + @SuppressWarnings("unused") + private ListenerRegistration<NotificationListener> airInterfaceNotificationListenerHandler; + private @NonNull final Onf14AirInterfaceNotificationListener airInterfaceNotificationListener; + + // ethernet container related members + private final List<TechnologySpecificPacKeys> ethernetContainerList = new ArrayList<TechnologySpecificPacKeys>(); + @SuppressWarnings("unused") + private ListenerRegistration<NotificationListener> etherneContainerNotificationListenerHandler; + private @NonNull final Onf14EthernetContainerNotificationListener ethernetContainerNotificationListener; + + // wire interface related members + private final List<TechnologySpecificPacKeys> wireInterfaceList = new ArrayList<TechnologySpecificPacKeys>(); + @SuppressWarnings("unused") + private ListenerRegistration<NotificationListener> wireInterfaceNotificationListenerHandler; + private @NonNull final Onf14WireInterfaceNotificationListener wireInterfaceNotificationListener; + + Onf14NetworkElement(NetconfBindingAccessor netconfAccess, DeviceManagerServiceProvider serviceProvider) { + log.info("Create {}", Onf14NetworkElement.class.getSimpleName()); + this.netconfAccessor = netconfAccess; + this.databaseService = serviceProvider.getDataProvider(); + this.faultService = serviceProvider.getFaultService(); + this.onf14Mapper = new Onf14ToInternalDataModel(); + this.airInterfaceNotificationListenerHandler = null; + this.airInterfaceNotificationListener = + new Onf14AirInterfaceNotificationListener(netconfAccess, serviceProvider); + this.etherneContainerNotificationListenerHandler = null; + ethernetContainerNotificationListener = + new Onf14EthernetContainerNotificationListener(netconfAccess, serviceProvider); + this.wireInterfaceNotificationListenerHandler = null; + wireInterfaceNotificationListener = new Onf14WireInterfaceNotificationListener(netconfAccess, serviceProvider); + } + + public void initialReadFromNetworkElement() { + + // reading the inventory (CoreModel 1.4 Equipment Model) and adding it to the DB + readEquipmentData(); + + FaultData resultList = new FaultData(); + + int problems = faultService.removeAllCurrentProblemsOfNode(netconfAccessor.getNodeId()); + log.debug("Removed all {} problems from database at registration", problems); + + readAllAirInterfaceCurrentProblems(resultList); + problems = resultList.size(); + log.debug("NETCONF read air interface current problems completed. Got back {} problems.", problems); + + readAllEhernetContainerCurrentProblems(resultList); + problems = resultList.size() - problems; + log.debug("NETCONF read current problems completed. Got back {} problems.", resultList.size()); + + readAllWireInterfaceCurrentProblems(resultList); + problems = resultList.size(); + log.debug("NETCONF read wire interface current problems completed. Got back {} problems.", problems); + + faultService.initCurrentProblemStatus(netconfAccessor.getNodeId(), resultList); + log.debug("DB write current problems completed"); + + } + + public void readAllAirInterfaceCurrentProblems(FaultData resultList) { + + int idxStart; // Start index for debug messages + + for (TechnologySpecificPacKeys key : airInterfaceList) { + idxStart = resultList.size(); + + readAirInterfaceCurrentProblemForLtp(key.getLtpUuid(), key.getLocalId(), resultList); + debugResultList(key.getLtpUuid().getValue(), resultList, idxStart); + } + } + + public void readAllEhernetContainerCurrentProblems(FaultData resultList) { + + int idxStart; // Start index for debug messages + + for (TechnologySpecificPacKeys key : ethernetContainerList) { + idxStart = resultList.size(); + + readEthernetConainerCurrentProblemForLtp(key.getLtpUuid(), key.getLocalId(), resultList); + debugResultList(key.getLtpUuid().getValue(), resultList, idxStart); + } + } + + public void readAllWireInterfaceCurrentProblems(FaultData resultList) { + + int idxStart; // Start index for debug messages + + for (TechnologySpecificPacKeys key : wireInterfaceList) { + idxStart = resultList.size(); + + readWireInterfaceCurrentProblemForLtp(key.getLtpUuid(), key.getLocalId(), resultList); + debugResultList(key.getLtpUuid().getValue(), resultList, idxStart); + } + } + + /** + * @param nNode set core-model-capability + */ + public void setCoreModel(@NonNull NetconfNode nNode) { + NetworkElementConnectionBuilder eb = new NetworkElementConnectionBuilder(); + log.info("In setCoreModel for Onf14NetworkElement"); + String namespaceRevision; + QName QNAME_COREMODEL14 = QName.create("urn:onf:yang:core-model-1-4", "2019-11-27", "core-model-1-4").intern(); + + Capabilities availableCapabilities = Capabilities.getAvailableCapabilities(nNode); + namespaceRevision = availableCapabilities.getRevisionForNamespace(QNAME_COREMODEL14); + log.info("In setCoreModel for Onf14NetworkElement- namespaceRevision = " + namespaceRevision); + if (Capabilities.isNamespaceSupported(namespaceRevision)) { + eb.setCoreModelCapability(namespaceRevision); + } else { + eb.setCoreModelCapability("Unsupported"); + } + databaseService.updateNetworkConnection22(eb.build(), netconfAccessor.getNodeId().getValue()); + } + + @Override + public void register() { + // Set core-model revision value in "core-model-capability" field + setCoreModel(netconfAccessor.getNetconfNode()); + initialReadFromNetworkElement(); + + // Register netconf stream + airInterfaceNotificationListenerHandler = + netconfAccessor.doRegisterNotificationListener(airInterfaceNotificationListener); + etherneContainerNotificationListenerHandler = + netconfAccessor.doRegisterNotificationListener(ethernetContainerNotificationListener); + wireInterfaceNotificationListenerHandler = + netconfAccessor.doRegisterNotificationListener(wireInterfaceNotificationListener); + //netconfAccessor.registerNotificationsStream(NetconfBindingAccessor.DefaultNotificationsStream); + } + + @Override + public void deregister() {} + + + @Override + public NodeId getNodeId() { + return netconfAccessor.getNodeId(); + } + + @Override + public <L extends NetworkElementService> Optional<L> getService(Class<L> clazz) { + return Optional.empty(); + } + + @Override + public void warmstart() {} + + @Override + public Optional<NetconfAccessor> getAcessor() { + return Optional.of(netconfAccessor); + } + + @Override + public NetworkElementDeviceType getDeviceType() { + return NetworkElementDeviceType.Wireless; + } + + private void readEquipmentData() { + + Optional<ControlConstruct> controlConstruct = readControlConstruct(netconfAccessor); + + if (controlConstruct.isPresent()) { + // the top-level-equipment list contains the root objects of the Equipment Model + log.debug("Getting list of topLevelEquipment for mountpoint {}", netconfAccessor.getNodeId()); + @Nullable + List<UniversalId> topLevelEquipment = controlConstruct.get().getTopLevelEquipment(); + + if (topLevelEquipment != null) { + List<Inventory> inventoryList = new ArrayList<>(); + for (UniversalId uuid : topLevelEquipment) { + log.debug("Got back topLevelEquipment with uuid {}", uuid.getValue()); + + // adding all root Equipment objects to the DB + @Nullable + Equipment equipmentInstance = readEquipmentInstance(netconfAccessor, uuid); + if (equipmentInstance != null) { + // recursively adding the root equipment and all its children into the DB + collectEquipment(inventoryList, equipmentInstance, null, EQUIPMENTROOTLEVEL); + } + } + this.databaseService.writeInventory(this.netconfAccessor.getNodeId().getValue(), inventoryList); + + } + } + + // storing all the LTP UUIDs internally, for later usage, for air-interface and ethernet-container + readKeys(controlConstruct); + } + + private List<Inventory> collectEquipment(List<Inventory> list, Equipment currentEq, Equipment parentEq, + long treeLevel) { + + // if the Equipment UUID is already in the list, it was already processed + // needed for solving possible circular dependencies + if (equipmentUuidList.contains(currentEq.getUuid().getValue())) { + log.debug("Not adding equipment with uuid {} because it was aleady added...", + currentEq.getUuid().getValue()); + return list; + } + + // we add this to our internal list, such that we avoid circular dependencies + equipmentUuidList.add(currentEq.getUuid().getValue()); + log.debug("Adding equipment with uuid {} to the database...", currentEq.getUuid().getValue()); + + // we add our current equipment to the database + list.add(onf14Mapper.getInternalEquipment(netconfAccessor.getNodeId(), currentEq, parentEq, treeLevel)); + + // we iterate the kids of our current equipment and add them to the database recursively + // the actual reference is here: /core-model:control-construct/equipment/contained-holder/occupying-fru + @NonNull + Collection<ContainedHolder> holderList = YangHelper.getCollection(currentEq.nonnullContainedHolder()); + + for (ContainedHolder holder : holderList) { + @Nullable + UniversalId occupyingFru = holder.getOccupyingFru(); + if (occupyingFru != null) { + @Nullable + Equipment childEq = readEquipmentInstance(netconfAccessor, occupyingFru); + + if (childEq != null) { + // current becomes parent and tree level increases by 1 + collectEquipment(list, childEq, currentEq, treeLevel + 1); + } + } + } + return list; + } + + private void readKeys(Optional<ControlConstruct> controlConstruct) { + + if (controlConstruct.isPresent()) { + @NonNull + Collection<LogicalTerminationPoint> ltpList = + YangHelper.getCollection(controlConstruct.get().nonnullLogicalTerminationPoint()); + log.debug("Iterating the LTP list for node {}", netconfAccessor.getNodeId().getValue()); + + // iterating all the Logical Termination Point list + for (LogicalTerminationPoint ltp : ltpList) { + @NonNull + List<LayerProtocol> lpList = YangHelper.getList(ltp.nonnullLayerProtocol()); + // the Layer Protocol list should contain only one item, since we have an 1:1 relationship between the LTP and the LP + if (lpList.size() != 1) { + log.debug("Layer protocol has no 1:1 relationship with the LTP."); + return; + } + // accessing the LP, which should be only 1 + LayerProtocol lp = lpList.get(0); + @Nullable + Class<? extends LAYERPROTOCOLNAMETYPE> layerProtocolName = lp.getLayerProtocolName(); + if (layerProtocolName != null) { + // if the LTP has an airInterface technology extension, the layer protocol name is air-layer + if (layerProtocolName.getTypeName() == LAYERPROTOCOLNAMETYPEAIRLAYER.class.getName()) { + TechnologySpecificPacKeys airInterfaceKey = + new TechnologySpecificPacKeys(ltp.getUuid(), lp.getLocalId()); + airInterfaceList.add(airInterfaceKey); + log.debug("Adding Ltp with uuid {} and local-id {} to the air-interface list", + ltp.getUuid().getValue(), lp.getLocalId()); + } + // if the LTP has an ethernetContainier technology extension, the layer protocol name is ethernet-container-layer + else if (layerProtocolName.getTypeName() == LAYERPROTOCOLNAMETYPEETHERNETCONTAINERLAYER.class + .getName()) { + TechnologySpecificPacKeys ethernetContainerKey = + new TechnologySpecificPacKeys(ltp.getUuid(), lp.getLocalId()); + ethernetContainerList.add(ethernetContainerKey); + log.debug("Adding Ltp with uuid {} and local-id {} to the ethernet-contatinier list", + ltp.getUuid().getValue(), lp.getLocalId()); + } else if (layerProtocolName.getTypeName() == LAYERPROTOCOLNAMETYPEWIRELAYER.class.getName()) { + TechnologySpecificPacKeys wireInterfaceKey = + new TechnologySpecificPacKeys(ltp.getUuid(), lp.getLocalId()); + wireInterfaceList.add(wireInterfaceKey); + log.debug("Adding Ltp with uuid {} and local-id {} to the wire-interface list", + ltp.getUuid().getValue(), lp.getLocalId()); + } + } + } + } + } + + private void readAirInterfaceCurrentProblemForLtp(UniversalId ltpUuid, String localId, FaultData resultList) { + + final Class<AirInterfacePac> clazzPac = AirInterfacePac.class; + + log.info("DBRead Get current problems for class {} from mountpoint {} for LTP uuid {} and local-id {}", + clazzPac.getSimpleName(), netconfAccessor.getNodeId().getValue(), ltpUuid.getValue(), localId); + + // constructing the IID needs the augmentation exposed byy the air-interface-2-0 model + InstanceIdentifier<AirInterfaceCurrentProblems> airInterfaceCurrentProblem_IID = InstanceIdentifier + .builder(ControlConstruct.class) + .child(LogicalTerminationPoint.class, new LogicalTerminationPointKey(ltpUuid)) + .child(LayerProtocol.class, new LayerProtocolKey(localId)) + .augmentation( + org.opendaylight.yang.gen.v1.urn.onf.yang.air._interface._2._0.rev200121.LayerProtocol1.class) + .child(AirInterfacePac.class).child(AirInterfaceCurrentProblems.class).build(); + + // reading all the current-problems list for this specific LTP and LP + AirInterfaceCurrentProblems problems = netconfAccessor.getTransactionUtils().readData( + netconfAccessor.getDataBroker(), LogicalDatastoreType.OPERATIONAL, airInterfaceCurrentProblem_IID); + + if (problems == null) { + log.debug("DBRead Id {} no AirInterfaceCurrentProblems", ltpUuid); + } else if (problems.getCurrentProblemList() == null) { + log.debug("DBRead Id {} empty CurrentProblemList", ltpUuid); + } else { + for (org.opendaylight.yang.gen.v1.urn.onf.yang.air._interface._2._0.rev200121.air._interface.current.problems.CurrentProblemList problem : YangHelper + .getCollection(problems.nonnullCurrentProblemList())) { + resultList.add(netconfAccessor.getNodeId(), (int) problem.getSequenceNumber(), problem.getTimestamp(), + ltpUuid.getValue(), problem.getProblemName(), + Onf14AirInterface.mapSeverity(problem.getProblemSeverity())); + } + } + } + + private void readEthernetConainerCurrentProblemForLtp(UniversalId ltpUuid, String localId, FaultData resultList) { + + final Class<EthernetContainerPac> clazzPac = EthernetContainerPac.class; + + log.info("DBRead Get current problems for class {} from mountpoint {} for LTP uuid {} and local-id {}", + clazzPac.getSimpleName(), netconfAccessor.getNodeId().getValue(), ltpUuid.getValue(), localId); + + // constructing the IID needs the augmentation exposed by the ethernet-container-2-0 model + InstanceIdentifier<EthernetContainerCurrentProblems> etherneContainerCurrentProblem_IID = InstanceIdentifier + .builder(ControlConstruct.class) + .child(LogicalTerminationPoint.class, new LogicalTerminationPointKey(ltpUuid)) + .child(LayerProtocol.class, new LayerProtocolKey(localId)) + .augmentation( + org.opendaylight.yang.gen.v1.urn.onf.yang.ethernet.container._2._0.rev200121.LayerProtocol1.class) + .child(EthernetContainerPac.class).child(EthernetContainerCurrentProblems.class).build(); + + // reading all the current-problems list for this specific LTP and LP + EthernetContainerCurrentProblems problems = netconfAccessor.getTransactionUtils().readData( + netconfAccessor.getDataBroker(), LogicalDatastoreType.OPERATIONAL, etherneContainerCurrentProblem_IID); + + if (problems == null) { + log.debug("DBRead Id {} no EthernetContainerCurrentProblems", ltpUuid); + } else if (problems.getCurrentProblemList() == null) { + log.debug("DBRead Id {} empty CurrentProblemList", ltpUuid); + } else { + for (org.opendaylight.yang.gen.v1.urn.onf.yang.ethernet.container._2._0.rev200121.ethernet.container.current.problems.CurrentProblemList problem : YangHelper + .getCollection(problems.nonnullCurrentProblemList())) { + resultList.add(netconfAccessor.getNodeId(), (int) problem.getSequenceNumber(), problem.getTimestamp(), + ltpUuid.getValue(), problem.getProblemName(), + Onf14EthernetContainer.mapSeverity(problem.getProblemSeverity())); + } + } + } + + private void readWireInterfaceCurrentProblemForLtp(UniversalId ltpUuid, String localId, FaultData resultList) { + + final Class<WireInterfacePac> clazzPac = WireInterfacePac.class; + + log.info("DBRead Get current problems for class {} from mountpoint {} for LTP uuid {} and local-id {}", + clazzPac.getSimpleName(), netconfAccessor.getNodeId().getValue(), ltpUuid.getValue(), localId); + + // constructing the IID needs the augmentation exposed by the wire-interface-2-0 model + InstanceIdentifier<WireInterfaceCurrentProblems> wireInterfaceCurrentProblem_IID = InstanceIdentifier + .builder(ControlConstruct.class) + .child(LogicalTerminationPoint.class, new LogicalTerminationPointKey(ltpUuid)) + .child(LayerProtocol.class, new LayerProtocolKey(localId)) + .augmentation( + org.opendaylight.yang.gen.v1.urn.onf.yang.wire._interface._2._0.rev200123.LayerProtocol1.class) + .child(WireInterfacePac.class).child(WireInterfaceCurrentProblems.class).build(); + + // reading all the current-problems list for this specific LTP and LP + WireInterfaceCurrentProblems problems = netconfAccessor.getTransactionUtils().readData( + netconfAccessor.getDataBroker(), LogicalDatastoreType.OPERATIONAL, wireInterfaceCurrentProblem_IID); + + if (problems == null) { + log.debug("DBRead Id {} no WireInterfaceCurrentProblems", ltpUuid); + } else if (problems.getCurrentProblemList() == null) { + log.debug("DBRead Id {} empty CurrentProblemList", ltpUuid); + } else { + for (org.opendaylight.yang.gen.v1.urn.onf.yang.wire._interface._2._0.rev200123.wire._interface.current.problems.CurrentProblemList problem : YangHelper + .getCollection(problems.nonnullCurrentProblemList())) { + resultList.add(netconfAccessor.getNodeId(), (int) problem.getSequenceNumber(), problem.getTimestamp(), + ltpUuid.getValue(), problem.getProblemName(), + Onf14WireInterface.mapSeverity(problem.getProblemSeverity())); + } + } + } + + private Optional<ControlConstruct> readControlConstruct(NetconfBindingAccessor netconfAccessor) { + return Optional.ofNullable(netconfAccessor.getTransactionUtils().readData(netconfAccessor.getDataBroker(), + LogicalDatastoreType.CONFIGURATION, CONTROLCONSTRUCT_IID)); + } + + private @Nullable Equipment readEquipmentInstance(NetconfBindingAccessor accessData, UniversalId equipmentUuid) { + + final Class<?> clazzPac = Equipment.class; + + log.info("DBRead Get equipment for class {} from mountpoint {} for uuid {}", clazzPac.getSimpleName(), + accessData.getNodeId().getValue(), equipmentUuid.getValue()); + + InstanceIdentifier<Equipment> equipmentIID = InstanceIdentifier.builder(ControlConstruct.class) + .child(Equipment.class, new EquipmentKey(equipmentUuid)).build(); + + return accessData.getTransactionUtils().readData(accessData.getDataBroker(), LogicalDatastoreType.CONFIGURATION, + equipmentIID); + } + + // defining a structure that can map the LP local-id and its corresponding LTP uuid + private class TechnologySpecificPacKeys { + + private UniversalId ltpUuid; + private String localId; + + public TechnologySpecificPacKeys(UniversalId uuid, String lId) { + this.ltpUuid = uuid; + this.localId = lId; + } + + public UniversalId getLtpUuid() { + return ltpUuid; + } + + public String getLocalId() { + return localId; + } + + @SuppressWarnings("unused") + public void setLtpUuid(UniversalId uuid) { + this.ltpUuid = uuid; + } + + @SuppressWarnings("unused") + public void setLocalId(String lId) { + this.localId = lId; + } + } + + + /** + * LOG the newly added problems of the interface pac + * + * @param idxStart + * @param uuid + * @param resultList + */ + private void debugResultList(String uuid, FaultData resultList, int idxStart) { + StringBuilder sb = new StringBuilder(); + int idx = 0; + for (int t = idxStart; t < resultList.size(); t++) { + sb.append(idx++); + sb.append(":{"); + sb.append(resultList.get(t)); + sb.append('}'); + } + log.debug("Found problems {} {}", uuid, sb); + } + +} diff --git a/sdnr/wt/devicemanager-onap/onf14/provider/src/main/java/org/onap/ccsdk/features/sdnr/wt/devicemanager/onf14/impl/Onf14NetworkElementFactory.java b/sdnr/wt/devicemanager-onap/onf14/provider/src/main/java/org/onap/ccsdk/features/sdnr/wt/devicemanager/onf14/impl/Onf14NetworkElementFactory.java new file mode 100644 index 000000000..ecf53a1fa --- /dev/null +++ b/sdnr/wt/devicemanager-onap/onf14/provider/src/main/java/org/onap/ccsdk/features/sdnr/wt/devicemanager/onf14/impl/Onf14NetworkElementFactory.java @@ -0,0 +1,66 @@ +/* + * ============LICENSE_START======================================================================== + * ONAP : ccsdk feature sdnr wt + * ================================================================================================= + * Copyright (C) 2020 highstreet technologies GmbH Intellectual Property. All rights reserved. + * ================================================================================================= + * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except + * in compliance with the License. You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software distributed under the License + * is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express + * or implied. See the License for the specific language governing permissions and limitations under + * the License. + * ============LICENSE_END========================================================================== + */ + +package org.onap.ccsdk.features.sdnr.wt.devicemanager.onf14.impl; + +import java.util.Optional; +import org.onap.ccsdk.features.sdnr.wt.devicemanager.ne.factory.NetworkElementFactory; +import org.onap.ccsdk.features.sdnr.wt.devicemanager.ne.service.NetworkElement; +import org.onap.ccsdk.features.sdnr.wt.devicemanager.service.DeviceManagerServiceProvider; +import org.onap.ccsdk.features.sdnr.wt.netconfnodestateservice.Capabilities; +import org.onap.ccsdk.features.sdnr.wt.netconfnodestateservice.NetconfAccessor; +import org.onap.ccsdk.features.sdnr.wt.netconfnodestateservice.NetconfBindingAccessor; +import org.onap.ccsdk.features.sdnr.wt.netconfnodestateservice.NetconfDomAccessor; +import org.opendaylight.yang.gen.v1.urn.onf.yang.core.model._1._4.rev191127.ControlConstruct; +import org.slf4j.Logger; +import org.slf4j.LoggerFactory; + +public class Onf14NetworkElementFactory implements NetworkElementFactory { + + private static final Logger log = LoggerFactory.getLogger(Onf14NetworkElementFactory.class); + private Optional<Onf14Configuration> configuration = Optional.empty(); + + @Override + public Optional<NetworkElement> create(NetconfAccessor accessor, DeviceManagerServiceProvider serviceProvider) { + + Optional<NetworkElement> ne = Optional.empty(); + Capabilities capabilities = accessor.getCapabilites(); + if (capabilities.isSupportingNamespace(ControlConstruct.QNAME)) { + String namespaceRevision = capabilities.getRevisionForNamespace(ControlConstruct.QNAME); + + if (configuration.isPresent() && configuration.get().isUseDomApiEnabled()) { + Optional<NetconfDomAccessor> domAccessor = accessor.getNetconfDomAccessor(); + if (domAccessor.isPresent()) { + ne = Optional.of(new Onf14DomNetworkElement(domAccessor.get(), serviceProvider, namespaceRevision)); + } + } else { + Optional<NetconfBindingAccessor> bindingAccessor = accessor.getNetconfBindingAccessor(); + if (bindingAccessor.isPresent()) { + ne = Optional.of(new Onf14NetworkElement(bindingAccessor.get(), serviceProvider)); + } + } + log.info("Create device:{}", ne.isPresent() ? ne.get().getClass().getSimpleName() : "not"); + } + return ne; + } + + @Override + public void init(DeviceManagerServiceProvider serviceProvider) { + configuration = Optional.of(new Onf14Configuration(serviceProvider.getConfigurationFileRepresentation())); + } +} diff --git a/sdnr/wt/devicemanager-onap/onf14/provider/src/main/java/org/onap/ccsdk/features/sdnr/wt/devicemanager/onf14/impl/dataprovider/InternalDataModelSeverity.java b/sdnr/wt/devicemanager-onap/onf14/provider/src/main/java/org/onap/ccsdk/features/sdnr/wt/devicemanager/onf14/impl/dataprovider/InternalDataModelSeverity.java new file mode 100644 index 000000000..97395f496 --- /dev/null +++ b/sdnr/wt/devicemanager-onap/onf14/provider/src/main/java/org/onap/ccsdk/features/sdnr/wt/devicemanager/onf14/impl/dataprovider/InternalDataModelSeverity.java @@ -0,0 +1,55 @@ +/* + * ============LICENSE_START======================================================= + * ONAP : ccsdk features + * ================================================================================ + * Copyright (C) 2020 highstreet technologies GmbH Intellectual Property. + * All rights reserved. + * ================================================================================ + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + * ============LICENSE_END========================================================= + * + */ +package org.onap.ccsdk.features.sdnr.wt.devicemanager.onf14.impl.dataprovider; + +import java.util.Map; +import org.eclipse.jdt.annotation.Nullable; +import org.opendaylight.yang.gen.v1.urn.onf.yang.wire._interface._2._0.rev200123.SEVERITYTYPECRITICAL; +import org.opendaylight.yang.gen.v1.urn.onf.yang.wire._interface._2._0.rev200123.SEVERITYTYPEMAJOR; +import org.opendaylight.yang.gen.v1.urn.onf.yang.wire._interface._2._0.rev200123.SEVERITYTYPEMINOR; +import org.opendaylight.yang.gen.v1.urn.onf.yang.wire._interface._2._0.rev200123.SEVERITYTYPEWARNING; +import org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.data.provider.rev201110.SeverityType; +import org.opendaylight.yangtools.yang.binding.BaseIdentity; +import org.slf4j.Logger; +import org.slf4j.LoggerFactory; + +public class InternalDataModelSeverity { + + @SuppressWarnings("unused") + private static final Logger LOG = LoggerFactory.getLogger(InternalDataModelSeverity.class); + + private static final Map<String, SeverityType> SEVERITYMAP = Map.of( + SEVERITYTYPEMAJOR.class.getSimpleName(), SeverityType.Major, + SEVERITYTYPECRITICAL.class.getSimpleName(), SeverityType.Critical, + SEVERITYTYPEMINOR.class.getSimpleName(), SeverityType.Minor, + SEVERITYTYPEWARNING.class.getSimpleName(), SeverityType.Warning); + + public static SeverityType mapSeverity(@Nullable Class<? extends BaseIdentity> severity) { + SeverityType res = null; + if (severity != null) { + String severityName = severity.getSimpleName(); + res = severityName != null ? SEVERITYMAP.get(severity.getSimpleName()) : null; + } + return res == null ? SeverityType.NonAlarmed : res; + } + +} diff --git a/sdnr/wt/devicemanager-onap/onf14/provider/src/main/java/org/onap/ccsdk/features/sdnr/wt/devicemanager/onf14/impl/dataprovider/Onf14ToInternalDataModel.java b/sdnr/wt/devicemanager-onap/onf14/provider/src/main/java/org/onap/ccsdk/features/sdnr/wt/devicemanager/onf14/impl/dataprovider/Onf14ToInternalDataModel.java new file mode 100644 index 000000000..52436da61 --- /dev/null +++ b/sdnr/wt/devicemanager-onap/onf14/provider/src/main/java/org/onap/ccsdk/features/sdnr/wt/devicemanager/onf14/impl/dataprovider/Onf14ToInternalDataModel.java @@ -0,0 +1,130 @@ +/* + * ============LICENSE_START======================================================================== + * ONAP : ccsdk feature sdnr wt + * ================================================================================================= + * Copyright (C) 2020 highstreet technologies GmbH Intellectual Property. All rights reserved. + * ================================================================================================= + * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except + * in compliance with the License. You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software distributed under the License + * is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express + * or implied. See the License for the specific language governing permissions and limitations under + * the License. + * ============LICENSE_END========================================================================== + */ +package org.onap.ccsdk.features.sdnr.wt.devicemanager.onf14.impl.dataprovider; + +import java.util.ArrayList; +import java.util.Collection; +import java.util.List; +import java.util.Objects; +import org.eclipse.jdt.annotation.NonNull; +import org.eclipse.jdt.annotation.Nullable; +import org.onap.ccsdk.features.sdnr.wt.common.YangHelper; +import org.opendaylight.yang.gen.v1.urn.onf.yang.core.model._1._4.rev191127.Equipment; +import org.opendaylight.yang.gen.v1.urn.onf.yang.core.model._1._4.rev191127.EquipmentInstance; +import org.opendaylight.yang.gen.v1.urn.onf.yang.core.model._1._4.rev191127.EquipmentType; +import org.opendaylight.yang.gen.v1.urn.onf.yang.core.model._1._4.rev191127.ManufacturedThing; +import org.opendaylight.yang.gen.v1.urn.onf.yang.core.model._1._4.rev191127.ManufacturerProperties; +import org.opendaylight.yang.gen.v1.urn.onf.yang.core.model._1._4.rev191127.UniversalId; +import org.opendaylight.yang.gen.v1.urn.onf.yang.core.model._1._4.rev191127.equipment.ActualEquipment; +import org.opendaylight.yang.gen.v1.urn.onf.yang.core.model._1._4.rev191127.equipment.ContainedHolder; +import org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.data.provider.rev201110.Inventory; +import org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.data.provider.rev201110.InventoryBuilder; +import org.opendaylight.yang.gen.v1.urn.tbd.params.xml.ns.yang.network.topology.rev131021.NodeId; +import org.opendaylight.yangtools.yang.common.Uint32; +import org.slf4j.Logger; +import org.slf4j.LoggerFactory; + +/** + * @author alexs + * + */ +public class Onf14ToInternalDataModel { + + private static final Logger LOG = LoggerFactory.getLogger(Onf14ToInternalDataModel.class); + + public Inventory getInternalEquipment(NodeId nodeId, Equipment currentEq, Equipment parentEq, long treeLevel) { + + Objects.requireNonNull(nodeId); + Objects.requireNonNull(currentEq); + + InventoryBuilder inventoryBuilder = new InventoryBuilder(); + String parentUuid = parentEq != null ? parentEq.getUuid().getValue() : "None"; + + @Nullable + ActualEquipment component = currentEq.getActualEquipment(); + if (component != null) { + // General + inventoryBuilder.setNodeId(nodeId.getValue()); + inventoryBuilder.setTreeLevel(Uint32.valueOf(treeLevel)); + inventoryBuilder.setUuid(currentEq.getUuid().getValue()); + inventoryBuilder.setParentUuid(parentUuid); + + List<String> containedHolderKeyList = new ArrayList<String>(); + @NonNull + Collection<ContainedHolder> containedHolderList = + YangHelper.getCollection(currentEq.nonnullContainedHolder()); + for (ContainedHolder holder : containedHolderList) { + @Nullable + UniversalId occupyingFru = holder.getOccupyingFru(); + + if (occupyingFru != null) { + containedHolderKeyList.add(occupyingFru.getValue()); + } + } + inventoryBuilder.setContainedHolder(containedHolderKeyList); + + @Nullable + ManufacturedThing manThing = component.getManufacturedThing(); + if (manThing != null) { + // Manufacturer properties + @Nullable + ManufacturerProperties manProp = manThing.getManufacturerProperties(); + if (manProp != null) { + inventoryBuilder.setManufacturerName(manProp.getManufacturerName()); + inventoryBuilder.setManufacturerIdentifier(manProp.getManufacturerIdentifier()); + } else { + LOG.debug("manufacturer-properties is not present in Equipment with uuid={}", + currentEq.getUuid().getValue()); + } + + // Equipment instance + @Nullable + EquipmentInstance eqInstance = manThing.getEquipmentInstance(); + if (eqInstance != null) { + inventoryBuilder.setSerial(eqInstance.getSerialNumber()); + inventoryBuilder.setDate(eqInstance.getManufactureDate().getValue()); + } else { + LOG.debug("equipment-instance is not present in Equipment with uuid={}", + currentEq.getUuid().getValue()); + } + + // Equipment type + @Nullable + EquipmentType eqType = manThing.getEquipmentType(); + if (eqType != null) { + inventoryBuilder.setVersion(eqType.getVersion()); + inventoryBuilder.setDescription(eqType.getDescription()); + inventoryBuilder.setPartTypeId(eqType.getPartTypeIdentifier()); + inventoryBuilder.setModelIdentifier(eqType.getModelIdentifier()); + inventoryBuilder.setTypeName(eqType.getTypeName()); + } else { + LOG.debug("equipment-type is not present in Equipment with uuid={}", + currentEq.getUuid().getValue()); + } + } else { + LOG.debug("manufactured-thing is not present in Equipment with uuid={}", + currentEq.getUuid().getValue()); + } + } else { + LOG.debug("actual-equipment is not present in Equipment with uuid={}", currentEq.getUuid().getValue()); + } + + return inventoryBuilder.build(); + } + +} diff --git a/sdnr/wt/devicemanager-onap/onf14/provider/src/main/java/org/onap/ccsdk/features/sdnr/wt/devicemanager/onf14/impl/equipment/Onf14DomEquipmentManager.java b/sdnr/wt/devicemanager-onap/onf14/provider/src/main/java/org/onap/ccsdk/features/sdnr/wt/devicemanager/onf14/impl/equipment/Onf14DomEquipmentManager.java new file mode 100644 index 000000000..092ad4a8f --- /dev/null +++ b/sdnr/wt/devicemanager-onap/onf14/provider/src/main/java/org/onap/ccsdk/features/sdnr/wt/devicemanager/onf14/impl/equipment/Onf14DomEquipmentManager.java @@ -0,0 +1,265 @@ +/* + * ============LICENSE_START======================================================= + * ONAP : ccsdk features + * ================================================================================ + * Copyright (C) 2020 highstreet technologies GmbH Intellectual Property. + * All rights reserved. + * ================================================================================ + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + * ============LICENSE_END========================================================= + * + */ +package org.onap.ccsdk.features.sdnr.wt.devicemanager.onf14.impl.equipment; + +import java.util.ArrayList; +import java.util.Collections; +import java.util.Iterator; +import java.util.List; +import java.util.Map; +import java.util.Objects; +import java.util.Optional; +import java.util.stream.Collectors; +import org.eclipse.jdt.annotation.NonNull; +import org.eclipse.jdt.annotation.Nullable; +import org.onap.ccsdk.features.sdnr.wt.common.YangHelper; +import org.onap.ccsdk.features.sdnr.wt.dataprovider.model.DataProvider; +import org.onap.ccsdk.features.sdnr.wt.devicemanager.onf14.impl.dataprovider.Onf14ToInternalDataModel; +import org.onap.ccsdk.features.sdnr.wt.netconfnodestateservice.NetconfDomAccessor; +import org.opendaylight.mdsal.binding.dom.codec.api.BindingNormalizedNodeSerializer; +import org.opendaylight.mdsal.common.api.LogicalDatastoreType; +import org.opendaylight.yang.gen.v1.urn.onf.yang.core.model._1._4.rev191127.ControlConstruct; +import org.opendaylight.yang.gen.v1.urn.onf.yang.core.model._1._4.rev191127.UniversalId; +import org.opendaylight.yang.gen.v1.urn.onf.yang.core.model._1._4.rev191127.control.construct.Equipment; +import org.opendaylight.yang.gen.v1.urn.onf.yang.core.model._1._4.rev191127.control.construct.EquipmentKey; +import org.opendaylight.yang.gen.v1.urn.onf.yang.core.model._1._4.rev191127.equipment.ContainedHolder; +import org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.data.provider.rev201110.Inventory; +import org.opendaylight.yangtools.util.UnmodifiableCollection; +import org.opendaylight.yangtools.yang.binding.CodeHelpers; +import org.opendaylight.yangtools.yang.binding.DataObject; +import org.opendaylight.yangtools.yang.common.QName; +import org.opendaylight.yangtools.yang.data.api.YangInstanceIdentifier; +import org.opendaylight.yangtools.yang.data.api.YangInstanceIdentifier.InstanceIdentifierBuilder; +import org.opendaylight.yangtools.yang.data.api.schema.LeafSetEntryNode; +import org.opendaylight.yangtools.yang.data.api.schema.MapNode; +import org.opendaylight.yangtools.yang.data.api.schema.NormalizedNode; +import org.slf4j.Logger; +import org.slf4j.LoggerFactory; + +public class Onf14DomEquipmentManager { + + + // constants + private static final Logger log = LoggerFactory.getLogger(Onf14DomEquipmentManager.class); + private static final int EQUIPMENTROOTLEVEL = 0; + // end of constants + + // variables + private final NetconfDomAccessor netconfDomAccessor; + private final DataProvider databaseService; + private final Onf14ToInternalDataModel onf14Mapper; + // for storing the Equipment UUIDs that are inserted in the DB + private final List<UniversalId> equipmentUuidList; + // end of variables + private final BindingNormalizedNodeSerializer serializer; + + // constructors + public Onf14DomEquipmentManager(NetconfDomAccessor netconfDomAccessor, DataProvider databaseService, + Onf14ToInternalDataModel onf14Mapper) { + super(); + this.netconfDomAccessor = Objects.requireNonNull(netconfDomAccessor); + this.databaseService = Objects.requireNonNull(databaseService); + this.onf14Mapper = Objects.requireNonNull(onf14Mapper); + this.serializer = Objects.requireNonNull(netconfDomAccessor.getBindingNormalizedNodeSerializer()); + + this.equipmentUuidList = new ArrayList<>(); + } + // end of constructors + + // getters and setters + public List<UniversalId> getEquipmentUuidList() { + return equipmentUuidList; + } + // end of getters and setters + + // private methods + private List<Inventory> collectEquipment(List<Inventory> list, Equipment currentEq, Equipment parentEq, + long treeLevel, Map<EquipmentKey, Equipment> equipmentMap, EquipmentKey equipmentKey) { + Objects.requireNonNull(list); + if (currentEq == null) { + log.info("Ignore empty equipment with key {}", equipmentKey); + return list; + } + + // if the Equipment UUID is already in the list, it was already processed + // needed for solving possible circular dependencies + if (equipmentUuidList.contains(currentEq.getUuid())) { + log.debug("Not adding equipment with uuid {} because it was aleady added...", + currentEq.getUuid().getValue()); + return list; + } + + // we add this to our internal list, such that we avoid circular dependencies + equipmentUuidList.add(currentEq.getUuid()); + log.debug("Adding equipment with uuid {} to the database...", currentEq.getUuid().getValue()); + + // we add our current equipment to the database + list.add(onf14Mapper.getInternalEquipment(netconfDomAccessor.getNodeId(), currentEq, parentEq, treeLevel)); + + // we iterate the kids of our current equipment and add them to the database recursively + // the actual reference is here: /core-model:control-construct/equipment/contained-holder/occupying-fru + for (ContainedHolder holder : YangHelper.getCollection(currentEq.nonnullContainedHolder())) { + @Nullable + UniversalId occupyingFru = holder.getOccupyingFru(); + if (occupyingFru != null) { + equipmentKey = new EquipmentKey(occupyingFru); + collectEquipment(list, equipmentMap.get(equipmentKey), currentEq, treeLevel + 1, equipmentMap, + equipmentKey); + } + } + return list; + } + // end of private methods + + // public methods + /** + * Set all equipment data from controlConstruct into database and into this manager. + * + * @param controlConstruct with complete device data + */ + public void setEquipmentData(ControlConstruct controlConstruct) { + Objects.requireNonNull(controlConstruct); + + // the top-level-equipment list contains the root objects of the Equipment Model + log.debug("Getting list of topLevelEquipment for mountpoint {}", netconfDomAccessor.getNodeId()); + // adding all root Equipment objects to the DB + for (UniversalId uuid : CodeHelpers.nonnull(controlConstruct.getTopLevelEquipment())) { + log.debug("Got back topLevelEquipment with uuid {}", uuid.getValue()); + EquipmentKey equipmentKey = new EquipmentKey(uuid); + + // adding all root Equipment objects to the DB + Map<EquipmentKey, Equipment> equipmentMap = controlConstruct.nonnullEquipment(); + // recursively adding the root equipment and all its children into the DB + List<Inventory> dbInventory = collectEquipment(new ArrayList<>(), equipmentMap.get(equipmentKey), null, + EQUIPMENTROOTLEVEL, equipmentMap, equipmentKey); + this.databaseService.writeInventory(netconfDomAccessor.getNodeId().getValue(), dbInventory); + } + } + + /** + * Experimental see section in {@link #Onf14DomNetworkElement.initialReadFromNetworkElement()} + * Read one equipment from device + * + * @param accessData to access device + * @param equipmentUuid uuid of equipment to be read + * @return Optional Equipment + */ + public Optional<Equipment> readEquipmentInstance(NetconfDomAccessor accessData, UniversalId equipmentUuid) { + + final Class<?> clazzPac = Equipment.class; + + log.info("DBRead Get equipment for class {} from mountpoint {} for uuid {}", clazzPac.getSimpleName(), + accessData.getNodeId().getValue(), equipmentUuid.getValue()); + + InstanceIdentifierBuilder equipmentIIDBuilder = + YangInstanceIdentifier.builder().node(ControlConstruct.QNAME).node(Equipment.QNAME).nodeWithKey( + Equipment.QNAME, QName.create(Equipment.QNAME, "uuid").intern(), equipmentUuid.getValue()); + + return accessData.readData(LogicalDatastoreType.CONFIGURATION, equipmentIIDBuilder.build(), Equipment.class); + } + + /** + * Experimental see section in {@link #Onf14DomNetworkElement.initialReadFromNetworkElement()} + * Read one equipment list from device. + * + * @param accessData to access device + * @param equipmentUuid uuid of equipment to be read + * @return Optional Equipment + */ + public List<DataObject> readEquipmentList(NetconfDomAccessor accessData) { + log.info("DBRead Get equipment-list for mountpoint {} ", accessData.getNodeId().getValue()); + + InstanceIdentifierBuilder equipmentIIDBuilder = + YangInstanceIdentifier.builder().node(ControlConstruct.QNAME).node(Equipment.QNAME); + + InstanceIdentifierBuilder equipmentIIDBuilderOnly = YangInstanceIdentifier.builder().node(Equipment.QNAME); + + Optional<NormalizedNode<?, ?>> oData = + accessData.readDataNode(LogicalDatastoreType.CONFIGURATION, equipmentIIDBuilder.build()); + if (oData.isPresent()) { + NormalizedNode<?, ?> data = oData.get(); + + log.debug("convertNormalizedNode data identifier: {} data nodetype: {}", data.getIdentifier(), + data.getNodeType()); + final List<DataObject> mapEntries1 = ((MapNode) data).getValue().stream().map(mapEntryNode -> { + final YangInstanceIdentifier mapEntryPath = + equipmentIIDBuilderOnly.build().node(mapEntryNode.getIdentifier()); + return serializer.fromNormalizedNode(mapEntryPath, mapEntryNode).getValue(); + }).collect(Collectors.toList()); + return mapEntries1; + } else { + log.warn("Device does not provide any equipment"); + return Collections.emptyList(); + } + } + + /** + * Experimental see section in {@link #Onf14DomNetworkElement.initialReadFromNetworkElement()} + * Read one equipment list from device + * + * @param accessData to access device + * @param equipmentUuid uuid of equipment to be read + * @return Optional Equipment + */ + public void readTopLevelEquipment(NetconfDomAccessor accessData) { + + log.info("DBRead Get top-level-equipment for mountpoint {}", accessData.getNodeId().getValue()); + + InstanceIdentifierBuilder equipmentIIDBuilder = YangInstanceIdentifier.builder().node(ControlConstruct.QNAME) + .node(QName.create(ControlConstruct.QNAME, "top-level-equipment")); + + Optional<NormalizedNode<?, ?>> oData = + accessData.readDataNode(LogicalDatastoreType.CONFIGURATION, equipmentIIDBuilder.build()); + log.info("Checking for existence of data"); + if (oData.isPresent()) { + log.info("data exists"); + NormalizedNode<?, ?> data = oData.get(); + Object value = data.getValue(); + log.info("DataNode: {} {}", data.getNodeType(), data.getIdentifier()); + if (value != null) { + log.info("DataNode value: {} {}", value.getClass().getName(), value); + if (value instanceof UnmodifiableCollection) { + @SuppressWarnings("unchecked") + UnmodifiableCollection<LeafSetEntryNode<String>> topLevelEquipmentCollection = + (UnmodifiableCollection<LeafSetEntryNode<String>>) value; + @NonNull + Iterator<LeafSetEntryNode<String>> it = topLevelEquipmentCollection.iterator(); + while (it.hasNext()) { + LeafSetEntryNode<String> topLevelEquipmentUuid = it.next(); + if (topLevelEquipmentUuid != null) { + log.info("LeafSetEntryNode: {} {} {}", topLevelEquipmentUuid.getValue(), + topLevelEquipmentUuid.getNodeType(), + topLevelEquipmentUuid.getValue().getClass().getName()); + } + } + } + } + } + } + // end of public methods + + // static methods + // end of static methods + + // private classes + // end of private classes +} diff --git a/sdnr/wt/devicemanager-onap/onf14/provider/src/main/java/org/onap/ccsdk/features/sdnr/wt/devicemanager/onf14/impl/interfaces/Onf14AirInterface.java b/sdnr/wt/devicemanager-onap/onf14/provider/src/main/java/org/onap/ccsdk/features/sdnr/wt/devicemanager/onf14/impl/interfaces/Onf14AirInterface.java new file mode 100644 index 000000000..2d0d3c52d --- /dev/null +++ b/sdnr/wt/devicemanager-onap/onf14/provider/src/main/java/org/onap/ccsdk/features/sdnr/wt/devicemanager/onf14/impl/interfaces/Onf14AirInterface.java @@ -0,0 +1,39 @@ +/* + * ============LICENSE_START======================================================================== + * ONAP : ccsdk feature sdnr wt + * ================================================================================================= + * Copyright (C) 2020 highstreet technologies GmbH Intellectual Property. All rights reserved. + * ================================================================================================= + * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except + * in compliance with the License. You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software distributed under the License + * is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express + * or implied. See the License for the specific language governing permissions and limitations under + * the License. + * ============LICENSE_END========================================================================== + */ +package org.onap.ccsdk.features.sdnr.wt.devicemanager.onf14.impl.interfaces; + +import org.onap.ccsdk.features.sdnr.wt.devicemanager.onf14.impl.dataprovider.InternalDataModelSeverity; +import org.opendaylight.yang.gen.v1.urn.onf.yang.air._interface._2._0.rev200121.SEVERITYTYPE; +import org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.data.provider.rev201110.SeverityType; +import org.slf4j.Logger; +import org.slf4j.LoggerFactory; + +/** + * @author alexs + * + */ +public class Onf14AirInterface { + + @SuppressWarnings("unused") + private static final Logger LOG = LoggerFactory.getLogger(Onf14AirInterface.class); + + public static SeverityType mapSeverity( + Class<? extends SEVERITYTYPE> severity) { + return InternalDataModelSeverity.mapSeverity(severity); + } +} diff --git a/sdnr/wt/devicemanager-onap/onf14/provider/src/main/java/org/onap/ccsdk/features/sdnr/wt/devicemanager/onf14/impl/interfaces/Onf14AirInterfaceNotificationListener.java b/sdnr/wt/devicemanager-onap/onf14/provider/src/main/java/org/onap/ccsdk/features/sdnr/wt/devicemanager/onf14/impl/interfaces/Onf14AirInterfaceNotificationListener.java new file mode 100644 index 000000000..e1ca58055 --- /dev/null +++ b/sdnr/wt/devicemanager-onap/onf14/provider/src/main/java/org/onap/ccsdk/features/sdnr/wt/devicemanager/onf14/impl/interfaces/Onf14AirInterfaceNotificationListener.java @@ -0,0 +1,146 @@ +/* + * ============LICENSE_START======================================================= + * ONAP : ccsdk feature sdnr wt + * ================================================================================ + * Copyright (C) 2020 highstreet technologies GmbH Intellectual Property. + * All rights reserved. + * ================================================================================ + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + * ============LICENSE_END========================================================= + * + */ +package org.onap.ccsdk.features.sdnr.wt.devicemanager.onf14.impl.interfaces; + +import java.util.HashMap; +import java.util.Map; +import org.eclipse.jdt.annotation.NonNull; +import org.eclipse.jdt.annotation.Nullable; +import org.onap.ccsdk.features.sdnr.wt.devicemanager.service.DeviceManagerServiceProvider; +import org.onap.ccsdk.features.sdnr.wt.netconfnodestateservice.NetconfAccessor; +import org.opendaylight.mdsal.dom.api.DOMNotification; +import org.opendaylight.mdsal.dom.api.DOMNotificationListener; +import org.opendaylight.yang.gen.v1.urn.onf.yang.air._interface._2._0.rev200121.AirInterface20Listener; +import org.opendaylight.yang.gen.v1.urn.onf.yang.air._interface._2._0.rev200121.AttributeValueChangedNotification; +import org.opendaylight.yang.gen.v1.urn.onf.yang.air._interface._2._0.rev200121.ObjectCreationNotification; +import org.opendaylight.yang.gen.v1.urn.onf.yang.air._interface._2._0.rev200121.ObjectDeletionNotification; +import org.opendaylight.yang.gen.v1.urn.onf.yang.air._interface._2._0.rev200121.ProblemNotification; +import org.opendaylight.yang.gen.v1.urn.onf.yang.air._interface._2._0.rev200121.SEVERITYTYPE; +import org.opendaylight.yang.gen.v1.urn.onf.yang.air._interface._2._0.rev200121.SEVERITYTYPECRITICAL; +import org.opendaylight.yang.gen.v1.urn.onf.yang.air._interface._2._0.rev200121.SEVERITYTYPEMAJOR; +import org.opendaylight.yang.gen.v1.urn.onf.yang.air._interface._2._0.rev200121.SEVERITYTYPEMINOR; +import org.opendaylight.yang.gen.v1.urn.onf.yang.air._interface._2._0.rev200121.SEVERITYTYPENONALARMED; +import org.opendaylight.yang.gen.v1.urn.onf.yang.air._interface._2._0.rev200121.SEVERITYTYPEWARNING; +import org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.data.provider.rev201110.EventlogBuilder; +import org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.data.provider.rev201110.FaultlogBuilder; +import org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.data.provider.rev201110.FaultlogEntity; +import org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.data.provider.rev201110.SeverityType; +import org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.data.provider.rev201110.SourceType; +import org.slf4j.Logger; +import org.slf4j.LoggerFactory; + +public class Onf14AirInterfaceNotificationListener implements AirInterface20Listener, DOMNotificationListener { + + private static final Logger log = LoggerFactory.getLogger(Onf14AirInterfaceNotificationListener.class); + + private final NetconfAccessor netconfAccessor; + private final DeviceManagerServiceProvider serviceProvider; + + private static final Map<Class<? extends SEVERITYTYPE>,SeverityType> severityMap = initSeverityMap(); + + public Onf14AirInterfaceNotificationListener(NetconfAccessor netconfAccessor, + DeviceManagerServiceProvider serviceProvider) { + this.netconfAccessor = netconfAccessor; + this.serviceProvider = serviceProvider; + } + + private static Map<Class<? extends SEVERITYTYPE>, SeverityType> initSeverityMap() { + Map<Class<? extends SEVERITYTYPE>, SeverityType> map = new HashMap<>(); + map.put(SEVERITYTYPECRITICAL.class,SeverityType.Critical); + map.put(SEVERITYTYPEMAJOR.class,SeverityType.Major); + map.put(SEVERITYTYPEMINOR.class,SeverityType.Minor); + map.put(SEVERITYTYPEWARNING.class,SeverityType.Warning); + map.put(SEVERITYTYPENONALARMED.class,SeverityType.NonAlarmed); + return map; + } + + @Override + public void onObjectDeletionNotification(ObjectDeletionNotification notification) { + log.debug("Got event of type :: {}", ObjectDeletionNotification.class.getSimpleName()); + + EventlogBuilder eventlogBuilder = new EventlogBuilder(); + eventlogBuilder.setNodeId(netconfAccessor.getNodeId().getValue()).setAttributeName("") + .setCounter(notification.getCounter()).setNewValue("deleted") + .setObjectId(notification.getObjectIdRef().getValue()).setSourceType(SourceType.Netconf) + .setTimestamp(notification.getTimestamp()); + serviceProvider.getDataProvider().writeEventLog(eventlogBuilder.build()); + serviceProvider.getWebsocketService().sendNotification(notification, netconfAccessor.getNodeId().getValue(), + ObjectDeletionNotification.QNAME, notification.getTimestamp()); + + log.debug("onObjectDeletionNotification log entry written"); + } + + @Override + public void onProblemNotification(ProblemNotification notification) { + log.debug("Got event of type :: {}", ProblemNotification.class.getSimpleName()); + FaultlogEntity faultAlarm = new FaultlogBuilder().setObjectId(notification.getObjectIdRef().getValue()) + .setProblem(notification.getProblem()).setSourceType(SourceType.Netconf) + .setTimestamp(notification.getTimestamp()) + .setNodeId(this.netconfAccessor.getNodeId().getValue()) + .setSeverity(mapSeverity(notification.getSeverity())).setCounter(notification.getCounter()) + .build(); + serviceProvider.getFaultService().faultNotification(faultAlarm); + serviceProvider.getWebsocketService().sendNotification(notification, netconfAccessor.getNodeId().getValue(), + ProblemNotification.QNAME, notification.getTimestamp()); + + } + + private SeverityType mapSeverity(@Nullable Class<? extends SEVERITYTYPE> severity) { + return severityMap.getOrDefault(severity,SeverityType.NonAlarmed); + } + + @Override + public void onAttributeValueChangedNotification(AttributeValueChangedNotification notification) { + log.debug("Got event of type :: {}", AttributeValueChangedNotification.class.getSimpleName()); + + EventlogBuilder eventlogBuilder = new EventlogBuilder(); + eventlogBuilder.setNodeId(netconfAccessor.getNodeId().getValue()) + .setAttributeName(notification.getAttributeName()).setCounter(notification.getCounter()) + .setNewValue(notification.getNewValue()).setObjectId(notification.getObjectIdRef().getValue()) + .setSourceType(SourceType.Netconf).setTimestamp(notification.getTimestamp()); + serviceProvider.getDataProvider().writeEventLog(eventlogBuilder.build()); + serviceProvider.getWebsocketService().sendNotification(notification, netconfAccessor.getNodeId().getValue(), + AttributeValueChangedNotification.QNAME, notification.getTimestamp()); + log.debug("onAttributeValueChangedNotification log entry written"); + } + + @Override + public void onObjectCreationNotification(ObjectCreationNotification notification) { + log.debug("Got event of type :: {}", ObjectCreationNotification.class.getSimpleName()); + + EventlogBuilder eventlogBuilder = new EventlogBuilder(); + eventlogBuilder.setNodeId(netconfAccessor.getNodeId().getValue()).setAttributeName(notification.getObjectType()) + .setCounter(notification.getCounter()).setNewValue("created") + .setObjectId(notification.getObjectIdRef().getValue()).setSourceType(SourceType.Netconf) + .setTimestamp(notification.getTimestamp()); + serviceProvider.getDataProvider().writeEventLog(eventlogBuilder.build()); + serviceProvider.getWebsocketService().sendNotification(notification, netconfAccessor.getNodeId().getValue(), + ObjectCreationNotification.QNAME, notification.getTimestamp()); + log.debug("onObjectCreationNotification log entry written"); + } + + @Override + public void onNotification(@NonNull DOMNotification notification) { + + } + +} diff --git a/sdnr/wt/devicemanager-onap/onf14/provider/src/main/java/org/onap/ccsdk/features/sdnr/wt/devicemanager/onf14/impl/interfaces/Onf14DomInterfacePacManager.java b/sdnr/wt/devicemanager-onap/onf14/provider/src/main/java/org/onap/ccsdk/features/sdnr/wt/devicemanager/onf14/impl/interfaces/Onf14DomInterfacePacManager.java new file mode 100644 index 000000000..7fca996e9 --- /dev/null +++ b/sdnr/wt/devicemanager-onap/onf14/provider/src/main/java/org/onap/ccsdk/features/sdnr/wt/devicemanager/onf14/impl/interfaces/Onf14DomInterfacePacManager.java @@ -0,0 +1,419 @@ +/* + * ============LICENSE_START======================================================= + * ONAP : ccsdk features + * ================================================================================ + * Copyright (C) 2020 highstreet technologies GmbH Intellectual Property. + * All rights reserved. + * ================================================================================ + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + * ============LICENSE_END========================================================= + * + */ +package org.onap.ccsdk.features.sdnr.wt.devicemanager.onf14.impl.interfaces; + +import java.util.ArrayList; +import java.util.Collection; +import java.util.List; +import java.util.Map; +import java.util.Objects; +import org.eclipse.jdt.annotation.NonNull; +import org.eclipse.jdt.annotation.Nullable; +import org.onap.ccsdk.features.sdnr.wt.common.YangHelper; +import org.onap.ccsdk.features.sdnr.wt.devicemanager.onf14.impl.equipment.Onf14DomEquipmentManager; +import org.onap.ccsdk.features.sdnr.wt.devicemanager.onf14.impl.util.Debug; +import org.onap.ccsdk.features.sdnr.wt.devicemanager.service.DeviceManagerServiceProvider; +import org.onap.ccsdk.features.sdnr.wt.devicemanager.types.FaultData; +import org.onap.ccsdk.features.sdnr.wt.netconfnodestateservice.NetconfDomAccessor; +import org.opendaylight.mdsal.binding.dom.codec.api.BindingNormalizedNodeSerializer; +import org.opendaylight.mdsal.dom.api.DOMNotification; +import org.opendaylight.mdsal.dom.api.DOMNotificationListener; +import org.opendaylight.yang.gen.v1.urn.onf.yang.air._interface._2._0.rev200121.AttributeValueChangedNotification; +import org.opendaylight.yang.gen.v1.urn.onf.yang.air._interface._2._0.rev200121.LAYERPROTOCOLNAMETYPEAIRLAYER; +import org.opendaylight.yang.gen.v1.urn.onf.yang.air._interface._2._0.rev200121.LayerProtocol1; +import org.opendaylight.yang.gen.v1.urn.onf.yang.air._interface._2._0.rev200121.ObjectCreationNotification; +import org.opendaylight.yang.gen.v1.urn.onf.yang.air._interface._2._0.rev200121.ObjectDeletionNotification; +import org.opendaylight.yang.gen.v1.urn.onf.yang.air._interface._2._0.rev200121.ProblemNotification; +import org.opendaylight.yang.gen.v1.urn.onf.yang.air._interface._2._0.rev200121.air._interface.lp.spec.AirInterfacePac; +import org.opendaylight.yang.gen.v1.urn.onf.yang.air._interface._2._0.rev200121.air._interface.pac.AirInterfaceCurrentProblems; +import org.opendaylight.yang.gen.v1.urn.onf.yang.core.model._1._4.rev191127.ControlConstruct; +import org.opendaylight.yang.gen.v1.urn.onf.yang.core.model._1._4.rev191127.LAYERPROTOCOLNAMETYPE; +import org.opendaylight.yang.gen.v1.urn.onf.yang.core.model._1._4.rev191127.UniversalId; +import org.opendaylight.yang.gen.v1.urn.onf.yang.core.model._1._4.rev191127.control.construct.LogicalTerminationPoint; +import org.opendaylight.yang.gen.v1.urn.onf.yang.core.model._1._4.rev191127.control.construct.LogicalTerminationPointKey; +import org.opendaylight.yang.gen.v1.urn.onf.yang.core.model._1._4.rev191127.logical.termination.point.LayerProtocol; +import org.opendaylight.yang.gen.v1.urn.onf.yang.core.model._1._4.rev191127.logical.termination.point.LayerProtocolKey; +import org.opendaylight.yang.gen.v1.urn.onf.yang.ethernet.container._2._0.rev200121.LAYERPROTOCOLNAMETYPEETHERNETCONTAINERLAYER; +import org.opendaylight.yang.gen.v1.urn.onf.yang.wire._interface._2._0.rev200123.LAYERPROTOCOLNAMETYPEWIRELAYER; +import org.opendaylight.yangtools.yang.binding.Notification; +import org.opendaylight.yangtools.yang.common.QName; +import org.slf4j.Logger; +import org.slf4j.LoggerFactory; + +/* +* Notifications streams provided by device NTSSim ONF14 +* Stream{getName=StreamNameType{_value=nc-notifications}, isReplaySupport=true, augmentation=[]}, +* Stream{getName=StreamNameType{_value=hybrid-mw-structure-2-0}, isReplaySupport=true, augmentation=[]}, +* Stream{getName=StreamNameType{_value=vlan-interface-1-0}, isReplaySupport=true, augmentation=[]}, +* Stream{getName=StreamNameType{_value=tdm-container-2-0}, isReplaySupport=true, augmentation=[]}, +* Stream{getName=StreamNameType{_value=ethernet-container-2-0}, isReplaySupport=true, augmentation=[]}, +* Stream{getName=StreamNameType{_value=ietf-yang-library}, isReplaySupport=false, augmentation=[]}, +* Stream{getDescription=Default NETCONF stream containing all the Event Notifications., getName=StreamNameType{_value=NETCONF}, isReplaySupport=true, augmentation=[]}, +* Stream{getName=StreamNameType{_value=vlan-fd-1-0}, isReplaySupport=true, augmentation=[]}, +* Stream{getName=StreamNameType{_value=wire-interface-2-0}, isReplaySupport=true, augmentation=[]}, +* Stream{getName=StreamNameType{_value=mac-fd-1-0}, isReplaySupport=true, augmentation=[]}, +* Stream{getName=StreamNameType{_value=co-channel-profile-1-0}, isReplaySupport=true, augmentation=[]}, +* Stream{getName=StreamNameType{_value=mac-interface-1-0}, isReplaySupport=true, augmentation=[]}, +* Stream{getName=StreamNameType{_value=ietf-keystore}, isReplaySupport=true, augmentation=[]}, +* Stream{getName=StreamNameType{_value=pure-ethernet-structure-2-0}, isReplaySupport=true, augmentation=[]}, +* Stream{getName=StreamNameType{_value=ietf-netconf-notifications}, isReplaySupport=true, augmentation=[]}, +* Stream{getName=StreamNameType{_value=mac-fc-1-0}, isReplaySupport=true, augmentation=[]}, +* Stream{getName=StreamNameType{_value=wred-profile-1-0}, isReplaySupport=true, augmentation=[]}, +* Stream{getName=StreamNameType{_value=air-interface-2-0}, isReplaySupport=true, augmentation=[]}, +* Stream{getName=StreamNameType{_value=ip-interface-1-0}, isReplaySupport=true, augmentation=[]}, +* Stream{getName=StreamNameType{_value=qos-profile-1-0}, isReplaySupport=true, augmentation=[]}, +* Stream{getName=StreamNameType{_value=vlan-fc-1-0}, isReplaySupport=true, augmentation=[]}, +* Stream{getName=StreamNameType{_value=l-3vpn-profile-1-0}, isReplaySupport=true, augmentation=[]}] +*/ + +public class Onf14DomInterfacePacManager implements DOMNotificationListener { + + // constants + private static final Logger log = LoggerFactory.getLogger(Onf14DomEquipmentManager.class); + // end of constants + + // variables + private final NetconfDomAccessor netconfDomAccessor; + private final @NonNull DeviceManagerServiceProvider serviceProvider; + + // air interface related members + private final List<TechnologySpecificPacKeys> airInterfaceList = new ArrayList<TechnologySpecificPacKeys>(); + private @NonNull final Onf14AirInterfaceNotificationListener airInterfaceNotificationListener; + + // ethernet container related members + private final List<TechnologySpecificPacKeys> ethernetContainerList = new ArrayList<TechnologySpecificPacKeys>(); + private @NonNull final Onf14EthernetContainerNotificationListener ethernetContainerNotificationListener; + + // wire interface related members + private final List<TechnologySpecificPacKeys> wireInterfaceList = new ArrayList<TechnologySpecificPacKeys>(); + private @NonNull final Onf14WireInterfaceNotificationListener wireInterfaceNotificationListener; + private @NonNull final BindingNormalizedNodeSerializer serializer; + // end of variables + + + // constructors + public Onf14DomInterfacePacManager(@NonNull NetconfDomAccessor netconfDomAccessor, + @NonNull DeviceManagerServiceProvider serviceProvider) { + + this.netconfDomAccessor = Objects.requireNonNull(netconfDomAccessor); + this.serviceProvider = Objects.requireNonNull(serviceProvider); + this.serializer = Objects.requireNonNull(netconfDomAccessor.getBindingNormalizedNodeSerializer()); + + this.airInterfaceNotificationListener = + new Onf14AirInterfaceNotificationListener(netconfDomAccessor, serviceProvider); + this.ethernetContainerNotificationListener = + new Onf14EthernetContainerNotificationListener(netconfDomAccessor, serviceProvider); + this.wireInterfaceNotificationListener = + new Onf14WireInterfaceNotificationListener(netconfDomAccessor, serviceProvider); + } + // end of constructors + + // getters and setters + // end of getters and setters + + // private methods + // end of private methods + + // public methods + public void readAllAirInterfaceCurrentProblems(NetconfDomAccessor netconfDomAccessor, + ControlConstruct controlConstruct, FaultData resultList) { + + int idxStart; // Start index for debug messages + + for (TechnologySpecificPacKeys key : airInterfaceList) { + idxStart = resultList.size(); + + readAirInterfaceCurrentProblemForLtp(netconfDomAccessor, controlConstruct, key.getLtpUuid(), + key.getLocalId(), resultList); + Debug.debugResultList(key.getLtpUuid().getValue(), resultList, idxStart); + } + } + + /* + public void readAllEhernetContainerCurrentProblems(FaultData resultList) { + + int idxStart; // Start index for debug messages + + for (TechnologySpecificPacKeys key : ethernetContainerList) { + idxStart = resultList.size(); + + readEthernetConainerCurrentProblemForLtp(key.getLtpUuid(), key.getLocalId(), resultList); + debugResultList(key.getLtpUuid().getValue(), resultList, idxStart); + } + } + + public void readAllWireInterfaceCurrentProblems(FaultData resultList) { + + int idxStart; // Start index for debug messages + + for (TechnologySpecificPacKeys key : wireInterfaceList) { + idxStart = resultList.size(); + + readWireInterfaceCurrentProblemForLtp(key.getLtpUuid(), key.getLocalId(), resultList); + debugResultList(key.getLtpUuid().getValue(), resultList, idxStart); + } + }*/ + public void readKeys(ControlConstruct controlConstruct) { + + @NonNull + Collection<LogicalTerminationPoint> ltpList = + YangHelper.getCollection(controlConstruct.nonnullLogicalTerminationPoint()); + log.debug("Iterating the LTP list for node {}", netconfDomAccessor.getNodeId().getValue()); + + // iterating all the Logical Termination Point list + for (LogicalTerminationPoint ltp : ltpList) { + @NonNull + List<LayerProtocol> lpList = YangHelper.getList(ltp.nonnullLayerProtocol()); + // the Layer Protocol list should contain only one item, since we have an 1:1 relationship between the LTP and the LP + if (lpList.size() != 1) { + log.debug("Layer protocol has no 1:1 relationship with the LTP."); + return; + } + // accessing the LP, which should be only 1 + LayerProtocol lp = lpList.get(0); + @Nullable + Class<? extends LAYERPROTOCOLNAMETYPE> layerProtocolName = lp.getLayerProtocolName(); + if (layerProtocolName != null) { + // if the LTP has an airInterface technology extension, the layer protocol name is air-layer + if (layerProtocolName.getTypeName() == LAYERPROTOCOLNAMETYPEAIRLAYER.class.getName()) { + TechnologySpecificPacKeys airInterfaceKey = + new TechnologySpecificPacKeys(ltp.getUuid(), lp.getLocalId()); + airInterfaceList.add(airInterfaceKey); + log.debug("Adding Ltp with uuid {} and local-id {} to the air-interface list", + ltp.getUuid().getValue(), lp.getLocalId()); + } + // if the LTP has an ethernetContainier technology extension, the layer protocol name is ethernet-container-layer + else if (layerProtocolName.getTypeName() == LAYERPROTOCOLNAMETYPEETHERNETCONTAINERLAYER.class + .getName()) { + TechnologySpecificPacKeys ethernetContainerKey = + new TechnologySpecificPacKeys(ltp.getUuid(), lp.getLocalId()); + ethernetContainerList.add(ethernetContainerKey); + log.debug("Adding Ltp with uuid {} and local-id {} to the ethernet-contatinier list", + ltp.getUuid().getValue(), lp.getLocalId()); + } else if (layerProtocolName.getTypeName() == LAYERPROTOCOLNAMETYPEWIRELAYER.class.getName()) { + TechnologySpecificPacKeys wireInterfaceKey = + new TechnologySpecificPacKeys(ltp.getUuid(), lp.getLocalId()); + wireInterfaceList.add(wireInterfaceKey); + log.debug("Adding Ltp with uuid {} and local-id {} to the wire-interface list", + ltp.getUuid().getValue(), lp.getLocalId()); + } + } + } + } + + private static void readAirInterfaceCurrentProblemForLtp(NetconfDomAccessor netconfDomAccessor, + ControlConstruct controlConstruct, UniversalId ltpUuid, String localId, FaultData resultList) { + + final Class<AirInterfacePac> clazzPac = AirInterfacePac.class; + + log.info("DBRead Get current problems for class {} from mountpoint {} for LTP uuid {} and local-id {}", + clazzPac.getSimpleName(), netconfDomAccessor.getNodeId().getValue(), ltpUuid.getValue(), localId); + + // constructing the IID needs the augmentation exposed byy the air-interface-2-0 model + // InstanceIdentifier<AirInterfaceCurrentProblems> airInterfaceCurrentProblem_IID = InstanceIdentifier + // .builder(ControlConstruct.class) + // .child(LogicalTerminationPoint.class, new LogicalTerminationPointKey(ltpUuid)) + // .child(LayerProtocol.class, new LayerProtocolKey(localId)) + // .augmentation( + // org.opendaylight.yang.gen.v1.urn.onf.yang.air._interface._2._0.rev200121.LayerProtocol1.class) + // .child(AirInterfacePac.class) + // .child(AirInterfaceCurrentProblems.class).build(); + /* + final YangInstanceIdentifier airInterfaceCurrentProblem_IID = + YangInstanceIdentifier.builder().node(ControlConstruct.QNAME) + .nodeWithKey(LogicalTerminationPoint.QNAME, + QName.create(LogicalTerminationPoint.QNAME, "logical-termination-point-key").intern(), + ltpUuid.getValue()) + .nodeWithKey(LayerProtocol.QNAME, + QName.create(LayerProtocol.QNAME, "layer-protocol-key").intern(), localId) + //.node(org.opendaylight.yang.gen.v1.urn.onf.yang.air._interface._2._0.rev200121.LayerProtocol1.QNAME) + .node(AirInterfacePac.QNAME).node(AirInterfaceCurrentProblems.QNAME).build(); + + // reading all the current-problems list for this specific LTP and LP + AirInterfaceCurrentProblems problems = + netconfDomAccessor.readData(LogicalDatastoreType.OPERATIONAL, airInterfaceCurrentProblem_IID); + */ + + @NonNull + Map<LogicalTerminationPointKey, LogicalTerminationPoint> ltpMap = + controlConstruct.nonnullLogicalTerminationPoint(); + LogicalTerminationPoint ltp = ltpMap.get(new LogicalTerminationPointKey(ltpUuid)); + if (ltp != null) { + @NonNull + Map<LayerProtocolKey, LayerProtocol> lpMap = ltp.nonnullLayerProtocol(); + LayerProtocol lp = lpMap.get(new LayerProtocolKey(localId)); + @Nullable + LayerProtocol1 lp1 = lp.augmentation( + org.opendaylight.yang.gen.v1.urn.onf.yang.air._interface._2._0.rev200121.LayerProtocol1.class); + if (lp1 != null) { + @Nullable + AirInterfacePac airInterfacePack = lp1.getAirInterfacePac(); + if (airInterfacePack != null) { + @Nullable + AirInterfaceCurrentProblems cp = airInterfacePack.getAirInterfaceCurrentProblems(); + if (cp == null) { + log.debug("DBRead Id {} no AirInterfaceCurrentProblems", ltpUuid); + } else { + for (org.opendaylight.yang.gen.v1.urn.onf.yang.air._interface._2._0.rev200121.air._interface.current.problems.CurrentProblemList problem : YangHelper + .getCollection(cp.nonnullCurrentProblemList())) { + resultList.add(netconfDomAccessor.getNodeId(), (int) problem.getSequenceNumber(), + problem.getTimestamp(), ltpUuid.getValue(), problem.getProblemName(), + Onf14AirInterface.mapSeverity(problem.getProblemSeverity())); + } + } + } + } + } + } + + @Override + public void onNotification(@NonNull DOMNotification domNotification) { + @Nullable + Notification notification = + serializer.fromNormalizedNodeNotification(domNotification.getType(), domNotification.getBody()); + if (notification instanceof ProblemNotification) { + ProblemNotification problemNotification = (ProblemNotification) notification; + log.debug("DOM ProblemNotification: {}", problemNotification); + airInterfaceNotificationListener.onProblemNotification(problemNotification); + } else if (notification instanceof AttributeValueChangedNotification) { + AttributeValueChangedNotification attributeValueChangeNotification = + (AttributeValueChangedNotification) notification; + log.debug("DOM AttributeValueChangedNotification: {}", attributeValueChangeNotification); + airInterfaceNotificationListener.onAttributeValueChangedNotification(attributeValueChangeNotification); + } else if (notification instanceof ObjectDeletionNotification) { + ObjectDeletionNotification objectDeletionNotification = (ObjectDeletionNotification) notification; + log.debug("DOM ObjectDeletionNotification: {}", objectDeletionNotification); + airInterfaceNotificationListener.onObjectDeletionNotification(objectDeletionNotification); + } else if (notification instanceof ObjectCreationNotification) { + ObjectCreationNotification objectCreationNotification = (ObjectCreationNotification) notification; + log.debug("DOM ObjectDeletionNotification: {}", objectCreationNotification); + airInterfaceNotificationListener.onObjectCreationNotification(objectCreationNotification); + } else { + log.warn("DOM Notification ignored: {}", domNotification); + } + } + + /** + * Register notifications to handle + */ + public void subscribeNotifications() { + QName[] notifications = { ObjectCreationNotification.QNAME, ObjectDeletionNotification.QNAME, + AttributeValueChangedNotification.QNAME, ProblemNotification.QNAME }; + netconfDomAccessor.doRegisterNotificationListener(this, notifications); + } + + /* + private void readEthernetConainerCurrentProblemForLtp(UniversalId ltpUuid, String localId, FaultData resultList) { + + final Class<EthernetContainerPac> clazzPac = EthernetContainerPac.class; + + log.info("DBRead Get current problems for class {} from mountpoint {} for LTP uuid {} and local-id {}", + clazzPac.getSimpleName(), netconfDomAccessor.getNodeId().getValue(), ltpUuid.getValue(), localId); + + // constructing the IID needs the augmentation exposed by the ethernet-container-2-0 model + // InstanceIdentifier<EthernetContainerCurrentProblems> etherneContainerCurrentProblem_IID = InstanceIdentifier + // .builder(ControlConstruct.class) + // .child(LogicalTerminationPoint.class, new LogicalTerminationPointKey(ltpUuid)) + // .child(LayerProtocol.class, new LayerProtocolKey(localId)) + // .augmentation( + // org.opendaylight.yang.gen.v1.urn.onf.yang.ethernet.container._2._0.rev200121.LayerProtocol1.class) + // .child(EthernetContainerPac.class).child(EthernetContainerCurrentProblems.class).build(); + final YangInstanceIdentifier etherneContainerCurrentProblem_IID = + YangInstanceIdentifier.builder().node(ControlConstruct.QNAME) + .nodeWithKey(LogicalTerminationPoint.QNAME, + QName.create(LogicalTerminationPoint.QNAME, "logical-termination-point-key").intern(), + ltpUuid.getValue()) + .nodeWithKey(LayerProtocol.QNAME, + QName.create(LayerProtocol.QNAME, "layer-protocol-key").intern(), localId) + //.node(org.opendaylight.yang.gen.v1.urn.onf.yang.ethernet.container._2._0.rev200121.LayerProtocol1.QNAME) + .node(EthernetContainerPac.QNAME).node(EthernetContainerCurrentProblems.QNAME).build(); + + // reading all the current-problems list for this specific LTP and LP + EthernetContainerCurrentProblems problems = + netconfDomAccessor.readData(LogicalDatastoreType.OPERATIONAL, etherneContainerCurrentProblem_IID); + + if (problems == null) { + log.debug("DBRead Id {} no EthernetContainerCurrentProblems", ltpUuid); + } else if (problems.getCurrentProblemList() == null) { + log.debug("DBRead Id {} empty CurrentProblemList", ltpUuid); + } else { + for (org.opendaylight.yang.gen.v1.urn.onf.yang.ethernet.container._2._0.rev200121.ethernet.container.current.problems.CurrentProblemList problem : YangHelper + .getCollection(problems.nonnullCurrentProblemList())) { + resultList.add(netconfDomAccessor.getNodeId(), (int) problem.getSequenceNumber(), + problem.getTimestamp(), ltpUuid.getValue(), problem.getProblemName(), + Onf14EthernetContainer.mapSeverity(problem.getProblemSeverity())); + } + } + } + + private void readWireInterfaceCurrentProblemForLtp(UniversalId ltpUuid, String localId, FaultData resultList) { + + final Class<WireInterfacePac> clazzPac = WireInterfacePac.class; + + log.info("DBRead Get current problems for class {} from mountpoint {} for LTP uuid {} and local-id {}", + clazzPac.getSimpleName(), netconfDomAccessor.getNodeId().getValue(), ltpUuid.getValue(), localId); + + // constructing the IID needs the augmentation exposed by the wire-interface-2-0 model + // InstanceIdentifier<WireInterfaceCurrentProblems> wireInterfaceCurrentProblem_IID = InstanceIdentifier + // .builder(ControlConstruct.class) + // .child(LogicalTerminationPoint.class, new LogicalTerminationPointKey(ltpUuid)) + // .child(LayerProtocol.class, new LayerProtocolKey(localId)) + // .augmentation( + // org.opendaylight.yang.gen.v1.urn.onf.yang.wire._interface._2._0.rev200123.LayerProtocol1.class) + // .child(WireInterfacePac.class).child(WireInterfaceCurrentProblems.class).build(); + final YangInstanceIdentifier wireInterfaceCurrentProblem_IID = + YangInstanceIdentifier.builder().node(ControlConstruct.QNAME) + .nodeWithKey(LogicalTerminationPoint.QNAME, + QName.create(LogicalTerminationPoint.QNAME, "logical-termination-point-key").intern(), + ltpUuid.getValue()) + .nodeWithKey(LayerProtocol.QNAME, + QName.create(LayerProtocol.QNAME, "layer-protocol-key").intern(), localId) + //.node(org.opendaylight.yang.gen.v1.urn.onf.yang.wire._interface._2._0.rev200123.LayerProtocol1.QNAME) + .node(WireInterfacePac.QNAME).node(WireInterfaceCurrentProblems.QNAME).build(); + + // reading all the current-problems list for this specific LTP and LP + WireInterfaceCurrentProblems problems = + netconfDomAccessor.readData(LogicalDatastoreType.OPERATIONAL, wireInterfaceCurrentProblem_IID); + + if (problems == null) { + log.debug("DBRead Id {} no WireInterfaceCurrentProblems", ltpUuid); + } else if (problems.getCurrentProblemList() == null) { + log.debug("DBRead Id {} empty CurrentProblemList", ltpUuid); + } else { + for (org.opendaylight.yang.gen.v1.urn.onf.yang.wire._interface._2._0.rev200123.wire._interface.current.problems.CurrentProblemList problem : YangHelper + .getCollection(problems.nonnullCurrentProblemList())) { + resultList.add(netconfDomAccessor.getNodeId(), (int) problem.getSequenceNumber(), + problem.getTimestamp(), ltpUuid.getValue(), problem.getProblemName(), + Onf14WireInterface.mapSeverity(problem.getProblemSeverity())); + } + } + } + */ + + // end of public methods + + // static methods + // end of static methods + + // private classes + // end of private classes +} diff --git a/sdnr/wt/devicemanager-onap/onf14/provider/src/main/java/org/onap/ccsdk/features/sdnr/wt/devicemanager/onf14/impl/interfaces/Onf14EthernetContainer.java b/sdnr/wt/devicemanager-onap/onf14/provider/src/main/java/org/onap/ccsdk/features/sdnr/wt/devicemanager/onf14/impl/interfaces/Onf14EthernetContainer.java new file mode 100644 index 000000000..f9769951f --- /dev/null +++ b/sdnr/wt/devicemanager-onap/onf14/provider/src/main/java/org/onap/ccsdk/features/sdnr/wt/devicemanager/onf14/impl/interfaces/Onf14EthernetContainer.java @@ -0,0 +1,40 @@ +/* + * ============LICENSE_START======================================================================== + * ONAP : ccsdk feature sdnr wt + * ================================================================================================= + * Copyright (C) 2020 highstreet technologies GmbH Intellectual Property. All rights reserved. + * ================================================================================================= + * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except + * in compliance with the License. You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software distributed under the License + * is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express + * or implied. See the License for the specific language governing permissions and limitations under + * the License. + * ============LICENSE_END========================================================================== + */ +package org.onap.ccsdk.features.sdnr.wt.devicemanager.onf14.impl.interfaces; + +import org.onap.ccsdk.features.sdnr.wt.devicemanager.onf14.impl.dataprovider.InternalDataModelSeverity; +import org.opendaylight.yang.gen.v1.urn.onf.yang.ethernet.container._2._0.rev200121.SEVERITYTYPE; +import org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.data.provider.rev201110.SeverityType; +import org.slf4j.Logger; +import org.slf4j.LoggerFactory; + +/** + * @author alexs + * + */ +public class Onf14EthernetContainer { + + @SuppressWarnings("unused") + private static final Logger LOG = LoggerFactory.getLogger(Onf14EthernetContainer.class); + + public static SeverityType mapSeverity( + Class<? extends SEVERITYTYPE> severity) { + return InternalDataModelSeverity.mapSeverity(severity); + } + +} diff --git a/sdnr/wt/devicemanager-onap/onf14/provider/src/main/java/org/onap/ccsdk/features/sdnr/wt/devicemanager/onf14/impl/interfaces/Onf14EthernetContainerNotificationListener.java b/sdnr/wt/devicemanager-onap/onf14/provider/src/main/java/org/onap/ccsdk/features/sdnr/wt/devicemanager/onf14/impl/interfaces/Onf14EthernetContainerNotificationListener.java new file mode 100644 index 000000000..fb67a24ab --- /dev/null +++ b/sdnr/wt/devicemanager-onap/onf14/provider/src/main/java/org/onap/ccsdk/features/sdnr/wt/devicemanager/onf14/impl/interfaces/Onf14EthernetContainerNotificationListener.java @@ -0,0 +1,141 @@ +/* + * ============LICENSE_START======================================================= + * ONAP : ccsdk feature sdnr wt + * ================================================================================ + * Copyright (C) 2020 highstreet technologies GmbH Intellectual Property. + * All rights reserved. + * ================================================================================ + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + * ============LICENSE_END========================================================= + * + */ +package org.onap.ccsdk.features.sdnr.wt.devicemanager.onf14.impl.interfaces; + +import java.util.HashMap; +import java.util.Map; +import org.eclipse.jdt.annotation.Nullable; +import org.onap.ccsdk.features.sdnr.wt.devicemanager.service.DeviceManagerServiceProvider; +import org.onap.ccsdk.features.sdnr.wt.netconfnodestateservice.NetconfAccessor; +import org.opendaylight.yang.gen.v1.urn.onf.yang.ethernet.container._2._0.rev200121.AttributeValueChangedNotification; +import org.opendaylight.yang.gen.v1.urn.onf.yang.ethernet.container._2._0.rev200121.EthernetContainer20Listener; +import org.opendaylight.yang.gen.v1.urn.onf.yang.ethernet.container._2._0.rev200121.ObjectCreationNotification; +import org.opendaylight.yang.gen.v1.urn.onf.yang.ethernet.container._2._0.rev200121.ObjectDeletionNotification; +import org.opendaylight.yang.gen.v1.urn.onf.yang.ethernet.container._2._0.rev200121.ProblemNotification; +import org.opendaylight.yang.gen.v1.urn.onf.yang.ethernet.container._2._0.rev200121.SEVERITYTYPE; +import org.opendaylight.yang.gen.v1.urn.onf.yang.ethernet.container._2._0.rev200121.SEVERITYTYPECRITICAL; +import org.opendaylight.yang.gen.v1.urn.onf.yang.ethernet.container._2._0.rev200121.SEVERITYTYPEMAJOR; +import org.opendaylight.yang.gen.v1.urn.onf.yang.ethernet.container._2._0.rev200121.SEVERITYTYPEMINOR; +import org.opendaylight.yang.gen.v1.urn.onf.yang.ethernet.container._2._0.rev200121.SEVERITYTYPENONALARMED; +import org.opendaylight.yang.gen.v1.urn.onf.yang.ethernet.container._2._0.rev200121.SEVERITYTYPEWARNING; +import org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.data.provider.rev201110.EventlogBuilder; +import org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.data.provider.rev201110.FaultlogBuilder; +import org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.data.provider.rev201110.FaultlogEntity; +import org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.data.provider.rev201110.SeverityType; +import org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.data.provider.rev201110.SourceType; +import org.slf4j.Logger; +import org.slf4j.LoggerFactory; + +public class Onf14EthernetContainerNotificationListener implements EthernetContainer20Listener { + + private static final Logger log = LoggerFactory.getLogger(Onf14EthernetContainerNotificationListener.class); + + private final NetconfAccessor netconfAccessor; + private final DeviceManagerServiceProvider serviceProvider; + + private static final Map<Class<? extends SEVERITYTYPE>, SeverityType> severityMap = initSeverityMap(); + + public Onf14EthernetContainerNotificationListener(NetconfAccessor netconfAccessor, + DeviceManagerServiceProvider serviceProvider) { + this.netconfAccessor = netconfAccessor; + this.serviceProvider = serviceProvider; + } + + private static Map<Class<? extends SEVERITYTYPE>, SeverityType> initSeverityMap() { + Map<Class<? extends SEVERITYTYPE>, SeverityType> map = new HashMap<>(); + map.put(SEVERITYTYPECRITICAL.class, SeverityType.Critical); + map.put(SEVERITYTYPEMAJOR.class, SeverityType.Major); + map.put(SEVERITYTYPEMINOR.class, SeverityType.Minor); + map.put(SEVERITYTYPEWARNING.class, SeverityType.Warning); + map.put(SEVERITYTYPENONALARMED.class, SeverityType.NonAlarmed); + return map; + } + + @Override + public void onObjectDeletionNotification(ObjectDeletionNotification notification) { + log.debug("Got event of type :: {}", ObjectDeletionNotification.class.getSimpleName()); + + EventlogBuilder eventlogBuilder = new EventlogBuilder(); + eventlogBuilder.setNodeId(netconfAccessor.getNodeId().getValue()).setAttributeName("") + .setCounter(notification.getCounter().intValue()).setNewValue("deleted") + .setObjectId(notification.getObjectIdRef().getValue()).setSourceType(SourceType.Netconf) + .setTimestamp(notification.getTimestamp()); + serviceProvider.getDataProvider().writeEventLog(eventlogBuilder.build()); + serviceProvider.getNotificationService().deletionNotification(netconfAccessor.getNodeId(), + notification.getCounter().intValue(), notification.getTimestamp(), + notification.getObjectIdRef().getValue()); + + log.debug("onObjectDeletionNotification log entry written"); + } + + @Override + public void onProblemNotification(ProblemNotification notification) { + log.debug("Got event of type :: {}", ProblemNotification.class.getSimpleName()); + FaultlogEntity faultAlarm = new FaultlogBuilder().setObjectId(notification.getObjectIdRef().getValue()) + .setProblem(notification.getProblem()).setTimestamp(notification.getTimestamp()) + .setNodeId(this.netconfAccessor.getNodeId().getValue()).setSourceType(SourceType.Netconf) + .setSeverity(mapSeverity(notification.getSeverity())).setCounter(notification.getCounter().intValue()) + .build(); + serviceProvider.getFaultService().faultNotification(faultAlarm); + serviceProvider.getWebsocketService().sendNotification(notification, netconfAccessor.getNodeId().getValue(), + ProblemNotification.QNAME, notification.getTimestamp()); + + } + + private SeverityType mapSeverity(@Nullable Class<? extends SEVERITYTYPE> severity) { + return severityMap.getOrDefault(severity, SeverityType.NonAlarmed); + } + + @Override + public void onAttributeValueChangedNotification(AttributeValueChangedNotification notification) { + log.debug("Got event of type :: {}", AttributeValueChangedNotification.class.getSimpleName()); + + EventlogBuilder eventlogBuilder = new EventlogBuilder(); + eventlogBuilder.setNodeId(netconfAccessor.getNodeId().getValue()) + .setAttributeName(notification.getAttributeName()).setCounter(notification.getCounter().intValue()) + .setNewValue(notification.getNewValue()).setObjectId(notification.getObjectIdRef().getValue()) + .setSourceType(SourceType.Netconf).setTimestamp(notification.getTimestamp()); + serviceProvider.getDataProvider().writeEventLog(eventlogBuilder.build()); + serviceProvider.getWebsocketService().sendNotification(notification, netconfAccessor.getNodeId().getValue(), + AttributeValueChangedNotification.QNAME, notification.getTimestamp()); + + log.debug("onAttributeValueChangedNotification log entry written"); + } + + @Override + public void onObjectCreationNotification(ObjectCreationNotification notification) { + log.debug("Got event of type :: {}", ObjectCreationNotification.class.getSimpleName()); + + EventlogBuilder eventlogBuilder = new EventlogBuilder(); + eventlogBuilder.setNodeId(netconfAccessor.getNodeId().getValue()).setAttributeName(notification.getObjectType()) + .setCounter(notification.getCounter().intValue()).setNewValue("created") + .setObjectId(notification.getObjectIdRef().getValue()).setSourceType(SourceType.Netconf) + .setTimestamp(notification.getTimestamp()); + serviceProvider.getDataProvider().writeEventLog(eventlogBuilder.build()); + serviceProvider.getWebsocketService().sendNotification(notification, netconfAccessor.getNodeId().getValue(), + ObjectCreationNotification.QNAME, notification.getTimestamp()); + + log.debug("onObjectCreationNotification log entry written"); + } + + +} diff --git a/sdnr/wt/devicemanager-onap/onf14/provider/src/main/java/org/onap/ccsdk/features/sdnr/wt/devicemanager/onf14/impl/interfaces/Onf14WireInterface.java b/sdnr/wt/devicemanager-onap/onf14/provider/src/main/java/org/onap/ccsdk/features/sdnr/wt/devicemanager/onf14/impl/interfaces/Onf14WireInterface.java new file mode 100644 index 000000000..acb262fcb --- /dev/null +++ b/sdnr/wt/devicemanager-onap/onf14/provider/src/main/java/org/onap/ccsdk/features/sdnr/wt/devicemanager/onf14/impl/interfaces/Onf14WireInterface.java @@ -0,0 +1,40 @@ +/* + * ============LICENSE_START======================================================================== + * ONAP : ccsdk feature sdnr wt + * ================================================================================================= + * Copyright (C) 2020 highstreet technologies GmbH Intellectual Property. All rights reserved. + * ================================================================================================= + * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except + * in compliance with the License. You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software distributed under the License + * is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express + * or implied. See the License for the specific language governing permissions and limitations under + * the License. + * ============LICENSE_END========================================================================== + */ +package org.onap.ccsdk.features.sdnr.wt.devicemanager.onf14.impl.interfaces; + +import org.eclipse.jdt.annotation.Nullable; +import org.onap.ccsdk.features.sdnr.wt.devicemanager.onf14.impl.dataprovider.InternalDataModelSeverity; +import org.opendaylight.yang.gen.v1.urn.onf.yang.wire._interface._2._0.rev200123.SEVERITYTYPE; +import org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.data.provider.rev201110.SeverityType; +import org.slf4j.Logger; +import org.slf4j.LoggerFactory; + +/** + * @author alexs + * + */ +public class Onf14WireInterface { + + @SuppressWarnings("unused") + private static final Logger LOG = LoggerFactory.getLogger(Onf14WireInterface.class); + + public static SeverityType mapSeverity(@Nullable Class<? extends SEVERITYTYPE> severity) { + return InternalDataModelSeverity.mapSeverity(severity); + } + +} diff --git a/sdnr/wt/devicemanager-onap/onf14/provider/src/main/java/org/onap/ccsdk/features/sdnr/wt/devicemanager/onf14/impl/interfaces/Onf14WireInterfaceNotificationListener.java b/sdnr/wt/devicemanager-onap/onf14/provider/src/main/java/org/onap/ccsdk/features/sdnr/wt/devicemanager/onf14/impl/interfaces/Onf14WireInterfaceNotificationListener.java new file mode 100644 index 000000000..8a1d42fa4 --- /dev/null +++ b/sdnr/wt/devicemanager-onap/onf14/provider/src/main/java/org/onap/ccsdk/features/sdnr/wt/devicemanager/onf14/impl/interfaces/Onf14WireInterfaceNotificationListener.java @@ -0,0 +1,149 @@ +/* + * ============LICENSE_START======================================================= + * ONAP : ccsdk feature sdnr wt + * ================================================================================ + * Copyright (C) 2020 highstreet technologies GmbH Intellectual Property. + * All rights reserved. + * ================================================================================ + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + * ============LICENSE_END========================================================= + * + */ +package org.onap.ccsdk.features.sdnr.wt.devicemanager.onf14.impl.interfaces; + +import java.util.HashMap; +import java.util.Map; +import org.eclipse.jdt.annotation.Nullable; +import org.onap.ccsdk.features.sdnr.wt.devicemanager.service.DeviceManagerServiceProvider; +import org.onap.ccsdk.features.sdnr.wt.netconfnodestateservice.NetconfAccessor; +import org.opendaylight.yang.gen.v1.urn.onf.yang.wire._interface._2._0.rev200123.AttributeValueChangedNotification; +import org.opendaylight.yang.gen.v1.urn.onf.yang.wire._interface._2._0.rev200123.ObjectCreationNotification; +import org.opendaylight.yang.gen.v1.urn.onf.yang.wire._interface._2._0.rev200123.ObjectDeletionNotification; +import org.opendaylight.yang.gen.v1.urn.onf.yang.wire._interface._2._0.rev200123.ProblemNotification; +import org.opendaylight.yang.gen.v1.urn.onf.yang.wire._interface._2._0.rev200123.SEVERITYTYPE; +import org.opendaylight.yang.gen.v1.urn.onf.yang.wire._interface._2._0.rev200123.SEVERITYTYPECRITICAL; +import org.opendaylight.yang.gen.v1.urn.onf.yang.wire._interface._2._0.rev200123.SEVERITYTYPEMAJOR; +import org.opendaylight.yang.gen.v1.urn.onf.yang.wire._interface._2._0.rev200123.SEVERITYTYPEMINOR; +import org.opendaylight.yang.gen.v1.urn.onf.yang.wire._interface._2._0.rev200123.SEVERITYTYPENONALARMED; +import org.opendaylight.yang.gen.v1.urn.onf.yang.wire._interface._2._0.rev200123.SEVERITYTYPEWARNING; +import org.opendaylight.yang.gen.v1.urn.onf.yang.wire._interface._2._0.rev200123.WireInterface20Listener; +import org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.data.provider.rev201110.EventlogBuilder; +import org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.data.provider.rev201110.FaultlogBuilder; +import org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.data.provider.rev201110.FaultlogEntity; +import org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.data.provider.rev201110.SeverityType; +import org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.data.provider.rev201110.SourceType; +import org.slf4j.Logger; +import org.slf4j.LoggerFactory; + +public class Onf14WireInterfaceNotificationListener implements WireInterface20Listener { + + private static final Logger log = LoggerFactory.getLogger(Onf14WireInterfaceNotificationListener.class); + + private final NetconfAccessor netconfAccessor; + private final DeviceManagerServiceProvider serviceProvider; + + private static final Map<Class<? extends SEVERITYTYPE>,SeverityType> severityMap = initSeverityMap(); + + public Onf14WireInterfaceNotificationListener(NetconfAccessor netconfAccessor, + DeviceManagerServiceProvider serviceProvider) { + this.netconfAccessor = netconfAccessor; + this.serviceProvider = serviceProvider; + } + + private static Map<Class<? extends SEVERITYTYPE>, SeverityType> initSeverityMap() { + Map<Class<? extends SEVERITYTYPE>, SeverityType> map = new HashMap<>(); + map.put(SEVERITYTYPECRITICAL.class,SeverityType.Critical); + map.put(SEVERITYTYPEMAJOR.class,SeverityType.Major); + map.put(SEVERITYTYPEMINOR.class,SeverityType.Minor); + map.put(SEVERITYTYPEWARNING.class,SeverityType.Warning); + map.put(SEVERITYTYPENONALARMED.class,SeverityType.NonAlarmed); + return map; + } + + @Override + public void onObjectDeletionNotification(ObjectDeletionNotification notification) { + log.debug("Got event of type :: {}", ObjectDeletionNotification.class.getSimpleName()); + + EventlogBuilder eventlogBuilder = new EventlogBuilder(); + eventlogBuilder.setNodeId(netconfAccessor.getNodeId().getValue()) + .setAttributeName("") + .setCounter(notification.getCounter()) + .setNewValue("deleted") + .setObjectId(notification.getObjectIdRef().getValue()) + .setSourceType(SourceType.Netconf) + .setTimestamp(notification.getTimestamp()); + serviceProvider.getDataProvider().writeEventLog(eventlogBuilder.build()); + serviceProvider.getWebsocketService().sendNotification(notification, netconfAccessor.getNodeId().getValue(), + ObjectDeletionNotification.QNAME, notification.getTimestamp()); + + log.debug("onObjectDeletionNotification log entry written"); + } + + @Override + public void onProblemNotification(ProblemNotification notification) { + log.debug("Got event of type :: {}", ProblemNotification.class.getSimpleName()); + FaultlogEntity faultAlarm = new FaultlogBuilder().setObjectId(notification.getObjectIdRef().getValue()) + .setProblem(notification.getProblem()).setTimestamp(notification.getTimestamp()) + .setNodeId(this.netconfAccessor.getNodeId().getValue()).setSourceType(SourceType.Netconf) + .setSeverity(mapSeverity(notification.getSeverity())).setCounter(notification.getCounter().intValue()) + .build(); + serviceProvider.getFaultService().faultNotification(faultAlarm); + serviceProvider.getWebsocketService().sendNotification( notification, netconfAccessor.getNodeId().getValue(), + ProblemNotification.QNAME, notification.getTimestamp()); + + } + + private SeverityType mapSeverity(@Nullable Class<? extends SEVERITYTYPE> severity) { + return severityMap.getOrDefault(severity,SeverityType.NonAlarmed); + } + + @Override + public void onAttributeValueChangedNotification(AttributeValueChangedNotification notification) { + log.debug("Got event of type :: {}", AttributeValueChangedNotification.class.getSimpleName()); + + EventlogBuilder eventlogBuilder = new EventlogBuilder(); + eventlogBuilder.setNodeId(netconfAccessor.getNodeId().getValue()) + .setAttributeName(notification.getAttributeName()) + .setCounter(notification.getCounter()) + .setNewValue(notification.getNewValue()) + .setObjectId(notification.getObjectIdRef().getValue()) + .setSourceType(SourceType.Netconf) + .setTimestamp(notification.getTimestamp()); + serviceProvider.getDataProvider().writeEventLog(eventlogBuilder.build()); + serviceProvider.getWebsocketService().sendNotification(notification, netconfAccessor.getNodeId().getValue(), + AttributeValueChangedNotification.QNAME, notification.getTimestamp()); + + + log.debug("onAttributeValueChangedNotification log entry written"); + } + + @Override + public void onObjectCreationNotification(ObjectCreationNotification notification) { + log.debug("Got event of type :: {}", ObjectCreationNotification.class.getSimpleName()); + + EventlogBuilder eventlogBuilder = new EventlogBuilder(); + eventlogBuilder.setNodeId(netconfAccessor.getNodeId().getValue()) + .setAttributeName(notification.getObjectType()) + .setCounter(notification.getCounter()) + .setNewValue("created") + .setObjectId(notification.getObjectIdRef().getValue()) + .setSourceType(SourceType.Netconf) + .setTimestamp(notification.getTimestamp()); + serviceProvider.getDataProvider().writeEventLog(eventlogBuilder.build()); + serviceProvider.getWebsocketService().sendNotification(notification, netconfAccessor.getNodeId().getValue(), + ObjectCreationNotification.QNAME, notification.getTimestamp()); + + log.debug("onObjectCreationNotification log entry written"); + } + +} diff --git a/sdnr/wt/devicemanager-onap/onf14/provider/src/main/java/org/onap/ccsdk/features/sdnr/wt/devicemanager/onf14/impl/interfaces/TechnologySpecificPacKeys.java b/sdnr/wt/devicemanager-onap/onf14/provider/src/main/java/org/onap/ccsdk/features/sdnr/wt/devicemanager/onf14/impl/interfaces/TechnologySpecificPacKeys.java new file mode 100644 index 000000000..552ba6604 --- /dev/null +++ b/sdnr/wt/devicemanager-onap/onf14/provider/src/main/java/org/onap/ccsdk/features/sdnr/wt/devicemanager/onf14/impl/interfaces/TechnologySpecificPacKeys.java @@ -0,0 +1,54 @@ +/* + * ============LICENSE_START======================================================= + * ONAP : ccsdk features + * ================================================================================ + * Copyright (C) 2020 highstreet technologies GmbH Intellectual Property. + * All rights reserved. + * ================================================================================ + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + * ============LICENSE_END========================================================= + * + */ +package org.onap.ccsdk.features.sdnr.wt.devicemanager.onf14.impl.interfaces; + +import org.opendaylight.yang.gen.v1.urn.onf.yang.core.model._1._4.rev191127.UniversalId; + +/** + * Defining a structure that can map the LP local-id and its corresponding LTP uuid + */ +class TechnologySpecificPacKeys { + + private UniversalId ltpUuid; + private String localId; + + public TechnologySpecificPacKeys(UniversalId uuid, String lId) { + this.ltpUuid = uuid; + this.localId = lId; + } + + public UniversalId getLtpUuid() { + return ltpUuid; + } + + public String getLocalId() { + return localId; + } + + public void setLtpUuid(UniversalId uuid) { + this.ltpUuid = uuid; + } + + public void setLocalId(String lId) { + this.localId = lId; + } +} diff --git a/sdnr/wt/devicemanager-onap/onf14/provider/src/main/java/org/onap/ccsdk/features/sdnr/wt/devicemanager/onf14/impl/util/Debug.java b/sdnr/wt/devicemanager-onap/onf14/provider/src/main/java/org/onap/ccsdk/features/sdnr/wt/devicemanager/onf14/impl/util/Debug.java new file mode 100644 index 000000000..efa3cf169 --- /dev/null +++ b/sdnr/wt/devicemanager-onap/onf14/provider/src/main/java/org/onap/ccsdk/features/sdnr/wt/devicemanager/onf14/impl/util/Debug.java @@ -0,0 +1,72 @@ +/* + * ============LICENSE_START======================================================= + * ONAP : ccsdk features + * ================================================================================ + * Copyright (C) 2020 highstreet technologies GmbH Intellectual Property. + * All rights reserved. + * ================================================================================ + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + * ============LICENSE_END========================================================= + * + */ +package org.onap.ccsdk.features.sdnr.wt.devicemanager.onf14.impl.util; + +import org.onap.ccsdk.features.sdnr.wt.devicemanager.types.FaultData; +import org.slf4j.Logger; +import org.slf4j.LoggerFactory; + +public class Debug { + + // constants + private static final Logger log = LoggerFactory.getLogger(Debug.class); + // end of constants + + // variables + // end of variables + + // constructors + // end of constructors + + // getters and setters + // end of getters and setters + + // private methods + // end of private methods + + // public methods + /** + * LOG the newly added problems of the interface pac + * + * @param idxStart + * @param uuid + * @param resultList + */ + public static void debugResultList(String uuid, FaultData resultList, int idxStart) { + StringBuilder sb = new StringBuilder(); + int idx = 0; + for (int t = idxStart; t < resultList.size(); t++) { + sb.append(idx++); + sb.append(":{"); + sb.append(resultList.get(t)); + sb.append('}'); + } + log.debug("Found problems {} {}", uuid, sb); + } + // end of public methods + + // static methods + // end of static methods + + // private classes + // end of private classes +} diff --git a/sdnr/wt/devicemanager-onap/onf14/provider/src/main/java/org/onap/ccsdk/features/sdnr/wt/devicemanager/onf14/yang/Control.java b/sdnr/wt/devicemanager-onap/onf14/provider/src/main/java/org/onap/ccsdk/features/sdnr/wt/devicemanager/onf14/yang/Control.java new file mode 100644 index 000000000..fc4de9104 --- /dev/null +++ b/sdnr/wt/devicemanager-onap/onf14/provider/src/main/java/org/onap/ccsdk/features/sdnr/wt/devicemanager/onf14/yang/Control.java @@ -0,0 +1,26 @@ +/* + * ============LICENSE_START======================================================================== + * ONAP : ccsdk feature sdnr wt + * ================================================================================================= + * Copyright (C) 2019 highstreet technologies GmbH Intellectual Property. All rights reserved. + * ================================================================================================= + * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except + * in compliance with the License. You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software distributed under the License + * is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express + * or implied. See the License for the specific language governing permissions and limitations under + * the License. + * ============LICENSE_END========================================================================== + */ +package org.onap.ccsdk.features.sdnr.wt.devicemanager.onf14.yang; + +public class Control { + + public class MaxAlarmStatusChanges { + + } + +} diff --git a/sdnr/wt/devicemanager-onap/onf14/provider/src/main/java/org/onap/ccsdk/features/sdnr/wt/devicemanager/onf14/yang/OperatorState.java b/sdnr/wt/devicemanager-onap/onf14/provider/src/main/java/org/onap/ccsdk/features/sdnr/wt/devicemanager/onf14/yang/OperatorState.java new file mode 100644 index 000000000..9b516bb67 --- /dev/null +++ b/sdnr/wt/devicemanager-onap/onf14/provider/src/main/java/org/onap/ccsdk/features/sdnr/wt/devicemanager/onf14/yang/OperatorState.java @@ -0,0 +1,22 @@ +/* + * ============LICENSE_START======================================================================== + * ONAP : ccsdk feature sdnr wt + * ================================================================================================= + * Copyright (C) 2019 highstreet technologies GmbH Intellectual Property. All rights reserved. + * ================================================================================================= + * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except + * in compliance with the License. You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software distributed under the License + * is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express + * or implied. See the License for the specific language governing permissions and limitations under + * the License. + * ============LICENSE_END========================================================================== + */ +package org.onap.ccsdk.features.sdnr.wt.devicemanager.onf14.yang; + +public enum OperatorState { + +} diff --git a/sdnr/wt/devicemanager-onap/onf14/provider/src/main/java/org/onap/ccsdk/features/sdnr/wt/devicemanager/onf14/yang/Resource.java b/sdnr/wt/devicemanager-onap/onf14/provider/src/main/java/org/onap/ccsdk/features/sdnr/wt/devicemanager/onf14/yang/Resource.java new file mode 100644 index 000000000..7966c1c71 --- /dev/null +++ b/sdnr/wt/devicemanager-onap/onf14/provider/src/main/java/org/onap/ccsdk/features/sdnr/wt/devicemanager/onf14/yang/Resource.java @@ -0,0 +1,22 @@ +/* + * ============LICENSE_START======================================================================== + * ONAP : ccsdk feature sdnr wt + * ================================================================================================= + * Copyright (C) 2019 highstreet technologies GmbH Intellectual Property. All rights reserved. + * ================================================================================================= + * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except + * in compliance with the License. You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software distributed under the License + * is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express + * or implied. See the License for the specific language governing permissions and limitations under + * the License. + * ============LICENSE_END========================================================================== + */ +package org.onap.ccsdk.features.sdnr.wt.devicemanager.onf14.yang; + +public class Resource { + +} diff --git a/sdnr/wt/devicemanager-onap/onf14/provider/src/main/java/org/onap/ccsdk/features/sdnr/wt/devicemanager/onf14/yang/ResourceMatch.java b/sdnr/wt/devicemanager-onap/onf14/provider/src/main/java/org/onap/ccsdk/features/sdnr/wt/devicemanager/onf14/yang/ResourceMatch.java new file mode 100644 index 000000000..c7e9103a1 --- /dev/null +++ b/sdnr/wt/devicemanager-onap/onf14/provider/src/main/java/org/onap/ccsdk/features/sdnr/wt/devicemanager/onf14/yang/ResourceMatch.java @@ -0,0 +1,22 @@ +/* + * ============LICENSE_START======================================================================== + * ONAP : ccsdk feature sdnr wt + * ================================================================================================= + * Copyright (C) 2019 highstreet technologies GmbH Intellectual Property. All rights reserved. + * ================================================================================================= + * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except + * in compliance with the License. You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software distributed under the License + * is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express + * or implied. See the License for the specific language governing permissions and limitations under + * the License. + * ============LICENSE_END========================================================================== + */ +package org.onap.ccsdk.features.sdnr.wt.devicemanager.onf14.yang; + +public class ResourceMatch { + +} diff --git a/sdnr/wt/devicemanager-onap/onf14/provider/src/main/java/org/onap/ccsdk/features/sdnr/wt/devicemanager/onf14/yang/SeverityWithClear.java b/sdnr/wt/devicemanager-onap/onf14/provider/src/main/java/org/onap/ccsdk/features/sdnr/wt/devicemanager/onf14/yang/SeverityWithClear.java new file mode 100644 index 000000000..1b39bf928 --- /dev/null +++ b/sdnr/wt/devicemanager-onap/onf14/provider/src/main/java/org/onap/ccsdk/features/sdnr/wt/devicemanager/onf14/yang/SeverityWithClear.java @@ -0,0 +1,22 @@ +/* + * ============LICENSE_START======================================================================== + * ONAP : ccsdk feature sdnr wt + * ================================================================================================= + * Copyright (C) 2019 highstreet technologies GmbH Intellectual Property. All rights reserved. + * ================================================================================================= + * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except + * in compliance with the License. You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software distributed under the License + * is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express + * or implied. See the License for the specific language governing permissions and limitations under + * the License. + * ============LICENSE_END========================================================================== + */ +package org.onap.ccsdk.features.sdnr.wt.devicemanager.onf14.yang; + +public enum SeverityWithClear { + +} diff --git a/sdnr/wt/devicemanager-onap/onf14/provider/src/main/java/org/onap/ccsdk/features/sdnr/wt/devicemanager/onf14/yang/package-info.java b/sdnr/wt/devicemanager-onap/onf14/provider/src/main/java/org/onap/ccsdk/features/sdnr/wt/devicemanager/onf14/yang/package-info.java new file mode 100644 index 000000000..0769687e8 --- /dev/null +++ b/sdnr/wt/devicemanager-onap/onf14/provider/src/main/java/org/onap/ccsdk/features/sdnr/wt/devicemanager/onf14/yang/package-info.java @@ -0,0 +1,18 @@ +/* + * ============LICENSE_START======================================================================== + * ONAP : ccsdk feature sdnr wt + * ================================================================================================= + * Copyright (C) 2019 highstreet technologies GmbH Intellectual Property. All rights reserved. + * ================================================================================================= + * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except + * in compliance with the License. You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software distributed under the License + * is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express + * or implied. See the License for the specific language governing permissions and limitations under + * the License. + * ============LICENSE_END========================================================================== + */ +package org.onap.ccsdk.features.sdnr.wt.devicemanager.onf14.yang; diff --git a/sdnr/wt/devicemanager-onap/onf14/provider/src/main/resources/org/opendaylight/blueprint/impl-blueprint.xml b/sdnr/wt/devicemanager-onap/onf14/provider/src/main/resources/org/opendaylight/blueprint/impl-blueprint.xml new file mode 100644 index 000000000..0be800784 --- /dev/null +++ b/sdnr/wt/devicemanager-onap/onf14/provider/src/main/resources/org/opendaylight/blueprint/impl-blueprint.xml @@ -0,0 +1,38 @@ +<?xml version="1.0" encoding="UTF-8"?> +<!-- + ~ ============LICENSE_START======================================================= + ~ ONAP : ccsdk features + ~ ================================================================================ + ~ Copyright (C) 2019 highstreet technologies GmbH Intellectual Property. + ~ All rights reserved. + ~ ================================================================================ + ~ Update Copyright (C) 2020 AT&T Intellectual Property. All rights reserved. + ~ ================================================================================ + ~ Licensed under the Apache License, Version 2.0 (the "License"); + ~ you may not use this file except in compliance with the License. + ~ You may obtain a copy of the License at + ~ + ~ http://www.apache.org/licenses/LICENSE-2.0 + ~ + ~ Unless required by applicable law or agreed to in writing, software + ~ distributed under the License is distributed on an "AS IS" BASIS, + ~ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + ~ See the License for the specific language governing permissions and + ~ limitations under the License. + ~ ============LICENSE_END======================================================= + ~ + --> + +<blueprint xmlns:odl="http://opendaylight.org/xmlns/blueprint/v1.0.0" + xmlns="http://www.osgi.org/xmlns/blueprint/v1.0.0" odl:use-default-for-reference-types="true"> + + <reference id="netconfNetworkElementService" + availability="mandatory" activation="eager" + interface="org.onap.ccsdk.features.sdnr.wt.devicemanager.service.NetconfNetworkElementService"/> + + <bean id="provider" + class="org.onap.ccsdk.features.sdnr.wt.devicemanager.onf14.impl.DeviceManagerOnf14Impl" + init-method="init" destroy-method="close"> + <property name="netconfNetworkElementService" ref="netconfNetworkElementService"/> + </bean> +</blueprint> diff --git a/sdnr/wt/devicemanager-onap/onf14/provider/src/main/resources/version.properties b/sdnr/wt/devicemanager-onap/onf14/provider/src/main/resources/version.properties new file mode 100644 index 000000000..6638c04f9 --- /dev/null +++ b/sdnr/wt/devicemanager-onap/onf14/provider/src/main/resources/version.properties @@ -0,0 +1,24 @@ +# +# ============LICENSE_START======================================================= +# ONAP : ccsdk features +# ================================================================================ +# Copyright (C) 2020 AT&T Intellectual Property. All rights reserved. +# ================================================================================ +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. +# ============LICENSE_END======================================================= +# +# + +# Properties filled in by maven during build process +version = ${project.version} +build = ${buildtime} diff --git a/sdnr/wt/devicemanager-onap/onf14/provider/src/main/yang/air-interface-2-0.yang b/sdnr/wt/devicemanager-onap/onf14/provider/src/main/yang/air-interface-2-0.yang new file mode 100644 index 000000000..906a91c7e --- /dev/null +++ b/sdnr/wt/devicemanager-onap/onf14/provider/src/main/yang/air-interface-2-0.yang @@ -0,0 +1,1832 @@ +module air-interface-2-0 {
+ yang-version 1.1;
+ namespace "urn:onf:yang:air-interface-2-0";
+ prefix air-interface;
+
+ import ietf-yang-types {
+ prefix yang;
+ }
+ import core-model-1-4 {
+ prefix core-model;
+ }
+
+ organization
+ "openBackhaul.com proposal to Open Networking Foundation (ONF)";
+ contact
+ "WG Web : https://github.com/openBackhaul/Overview
+ WG List: AirInterface@openBackhaul.com
+ Editor : Thorsten Heinze
+ Email : Thorsten.Heinze@openBackhaul.com";
+ description
+ "Copyright 2019 openBackhaul.com
+
+ Licensed under the Apache License, Version 2.0 (the 'License');
+ you may not use this file except in compliance with the License.
+ You may obtain a copy of the License at
+ http://www.apache.org/licenses/LICENSE-2.0
+ Unless required by applicable law or agreed to in writing, software
+ distributed under the License is distributed on an 'AS IS' BASIS,
+ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ See the License for the specific language governing permissions and
+ limitations under the License.";
+
+ revision 2020-01-21 {
+ description
+ "Model for the Transport SDN Pilot at Telefonica Germany.
+ Please view https://github.com/openBackhaul/airInterface/issues for changes.";
+ reference
+ "https://github.com/openBackhaul/airInterface/tree/tsp: Model definition
+ https://github.com/openBackhaul/onfCoreIm/tree/tsp: ONF TR-512 Core IM incl. Profile and enhanced Equipment definition";
+ }
+ revision 2019-11-22 {
+ description
+ "Model for the Transport SDN Pilot at Telefonica Germany.
+ Please view https://github.com/openBackhaul/airInterface/issues for changes.";
+ reference
+ "https://github.com/openBackhaul/airInterface/tree/tsp: Model definition
+ https://github.com/openBackhaul/onfCoreIm/tree/tsp: ONF TR-512 Core IM incl. Profile and enhanced Equipment definition";
+ }
+ revision 2019-07-11 {
+ description
+ "Model for the Transport SDN Pilot at Telefonica Germany.
+ Please view https://github.com/openBackhaul/airInterface/issues for changes.";
+ reference
+ "https://github.com/openBackhaul/airInterface/tree/tsp: Model definition
+ https://github.com/openBackhaul/onfCoreIm/tree/tsp: ONF TR-512 Core IM incl. Profile and enhanced Equipment definition";
+ }
+
+ identity LAYER_PROTOCOL_NAME_TYPE_AIR_LAYER {
+ base core-model:LAYER_PROTOCOL_NAME_TYPE;
+ description
+ "none";
+ }
+
+ augment "/core-model:control-construct/core-model:logical-termination-point/core-model:layer-protocol" {
+ when "derived-from-or-self(./core-model:layer-protocol-name, 'air-interface:LAYER_PROTOCOL_NAME_TYPE_AIR_LAYER')";
+ uses air-interface-lp-spec;
+ description
+ "none";
+ }
+
+ /****************************************
+ * package notifications
+ **************************************/
+
+ notification object-creation-notification {
+ uses object-creation-notification;
+ description
+ "none";
+ }
+
+ grouping object-creation-notification {
+ leaf counter {
+ type int32;
+ default "-1";
+ config false;
+ description
+ "Counts object creation notifications.";
+ }
+ leaf timestamp {
+ type yang:date-and-time;
+ default "2010-11-20T14:00:00+01:00";
+ config false;
+ description
+ "none";
+ }
+ leaf object-id-ref {
+ type leafref {
+ path "/core-model:control-construct/core-model:logical-termination-point/core-model:uuid";
+ require-instance false;
+ }
+ config false;
+ description
+ "none";
+ }
+ leaf object-type {
+ type string;
+ default "Type of created object not specified.";
+ config false;
+ description
+ "none";
+ }
+ description
+ "none";
+ }
+
+ notification object-deletion-notification {
+ uses object-deletion-notification;
+ description
+ "none";
+ }
+
+ grouping object-deletion-notification {
+ leaf counter {
+ type int32;
+ default "-1";
+ config false;
+ description
+ "Counts object deletion notifications.";
+ }
+ leaf timestamp {
+ type yang:date-and-time;
+ default "2010-11-20T14:00:00+01:00";
+ config false;
+ description
+ "none";
+ }
+ leaf object-id-ref {
+ type leafref {
+ path "/core-model:control-construct/core-model:logical-termination-point/core-model:uuid";
+ require-instance false;
+ }
+ config false;
+ description
+ "none";
+ }
+ description
+ "none";
+ }
+
+ notification attribute-value-changed-notification {
+ uses attribute-value-changed-notification;
+ description
+ "none";
+ }
+
+ grouping attribute-value-changed-notification {
+ leaf counter {
+ type int32;
+ default "-1";
+ config false;
+ description
+ "Counts attribute value changed notifications.";
+ }
+ leaf timestamp {
+ type yang:date-and-time;
+ default "2010-11-20T14:00:00+01:00";
+ config false;
+ description
+ "none";
+ }
+ leaf object-id-ref {
+ type leafref {
+ path "/core-model:control-construct/core-model:logical-termination-point/core-model:uuid";
+ require-instance false;
+ }
+ config false;
+ description
+ "none";
+ }
+ leaf attribute-name {
+ type string;
+ default "Attribute name not specified.";
+ config false;
+ description
+ "Name of the attribute that has been changed.";
+ }
+ leaf new-value {
+ type string;
+ default "New value not specified.";
+ config false;
+ description
+ "Attribute value converted to a string (xml, json, ...)";
+ }
+ description
+ "To be sent when an attribute has changed and one or more controllers have to update their data.";
+ }
+
+ notification problem-notification {
+ uses problem-notification;
+ description
+ "none";
+ }
+
+ grouping problem-notification {
+ leaf counter {
+ type int32;
+ default "-1";
+ config false;
+ description
+ "Counts problem notifications";
+ }
+ leaf timestamp {
+ type yang:date-and-time;
+ default "2010-11-20T14:00:00+01:00";
+ config false;
+ description
+ "none";
+ }
+ leaf object-id-ref {
+ type leafref {
+ path "/core-model:control-construct/core-model:logical-termination-point/core-model:uuid";
+ require-instance false;
+ }
+ config false;
+ description
+ "none";
+ }
+ leaf problem {
+ type string;
+ default "Problem name not specified.";
+ config false;
+ description
+ "Name of the problem according to AirInterface::AirInterfaceCapability::supportedAlarmList";
+ }
+ leaf severity {
+ type severity-type;
+ default "SEVERITY_TYPE_WARNING";
+ config false;
+ description
+ "Severity of the problem according to AirInterface::AirInterfaceConfiguration::problemSeverityList";
+ }
+ description
+ "none";
+ }
+
+ /****************************************
+ * grouping statements for object classes
+ **************************************/
+ /****************************************
+ * package super-classes
+ **************************************/
+
+ grouping current-problem {
+ leaf sequence-number {
+ type int16;
+ config false;
+ description
+ "Unique sequence number of the current problem object.";
+ }
+ leaf timestamp {
+ type yang:date-and-time;
+ default "2010-11-20T14:00:00+01:00";
+ config false;
+ description
+ "none";
+ }
+ leaf problem-severity {
+ type severity-type;
+ default "SEVERITY_TYPE_NOT_YET_DEFINED";
+ config false;
+ description
+ "Severity of the alarm.";
+ }
+ description
+ "none";
+ }
+
+ grouping current-performance {
+ leaf timestamp {
+ type yang:date-and-time;
+ default "2010-11-20T14:00:00+01:00";
+ config false;
+ description
+ "The timestamp associated with when the current data was collected.";
+ }
+ leaf suspect-interval-flag {
+ type boolean;
+ default "false";
+ config false;
+ description
+ "This attribute is used to indicate that the performance data for the current period may not be reliable. Some reasons for this to occur are:
+ – Suspect data were detected by the actual resource doing data collection.
+ – Transition of the administrativeState attribute to/from the 'lock' state.
+ – Transition of the operationalState to/from the 'disabled' state.
+ – Scheduler setting that inhibits the collection function.
+ – The performance counters were reset during the interval.
+ – The currentData (or subclass) object instance was created during the monitoring period.";
+ }
+ leaf elapsed-time {
+ type int64;
+ units "s";
+ default "-1";
+ config false;
+ description
+ "Number of seconds that elapsed since the last reset of the counter.";
+ }
+ leaf scanner-id {
+ type string;
+ default "Scanner ID not defined.";
+ config false;
+ description
+ "none";
+ }
+ leaf granularity-period {
+ type granularity-period-type;
+ config false;
+ description
+ "Time period between reset of the underlying counter.";
+ }
+ description
+ "none";
+ }
+
+ grouping historical-performance {
+ leaf suspect-interval-flag {
+ type boolean;
+ default "false";
+ config false;
+ description
+ "This attribute indicates that the data collected during the interval is suspect.";
+ }
+ leaf history-data-id {
+ type string;
+ default "History Data ID not defined.";
+ config false;
+ description
+ "none";
+ }
+ leaf granularity-period {
+ type granularity-period-type;
+ config false;
+ description
+ "Time period between reset of the underlying counter.";
+ }
+ leaf period-end-time {
+ type yang:date-and-time;
+ config false;
+ description
+ "Time when the counter values have been recorded and the counter reset.";
+ }
+ description
+ "none";
+ }
+
+ grouping air-interface-lp-spec {
+ container air-interface-pac {
+ uses air-interface-pac;
+ description
+ "none";
+ }
+ description
+ "none";
+ }
+
+ grouping air-interface-pac {
+ container air-interface-capability {
+ config false;
+ uses air-interface-capability;
+ description
+ "none";
+ }
+ container air-interface-configuration {
+ uses air-interface-configuration;
+ description
+ "none";
+ }
+ container air-interface-status {
+ config false;
+ uses air-interface-status;
+ description
+ "none";
+ }
+ container air-interface-current-problems {
+ config false;
+ uses air-interface-current-problems;
+ description
+ "none";
+ }
+ container air-interface-current-performance {
+ config false;
+ uses air-interface-current-performance;
+ description
+ "none";
+ }
+ container air-interface-historical-performances {
+ config false;
+ uses air-interface-historical-performances;
+ description
+ "none";
+ }
+ description
+ "none";
+ }
+
+ grouping air-interface-capability {
+ leaf type-of-equipment {
+ type string;
+ default "Type of equipment not yet defined.";
+ config false;
+ description
+ "This parameter indicates the equipment type. Instead of uploading the complete set of capabilities, capabilities of the same equipment type could be reused. Should be unique for a combination of modem, radio and their respective firmware.";
+ }
+ leaf tx-frequency-min {
+ type int32;
+ units "kHz";
+ default "-1";
+ config false;
+ description
+ "Value of the minimum transmit frequency tunable at the air interface.";
+ }
+ leaf tx-frequency-max {
+ type int32;
+ units "kHz";
+ default "-1";
+ config false;
+ description
+ "Value of the maximum transmit frequency tunable at the air interface.";
+ }
+ leaf rx-frequency-min {
+ type int32;
+ units "kHz";
+ default "-1";
+ config false;
+ description
+ "Value of the minimum receive frequency tunable at the air interface.";
+ }
+ leaf rx-frequency-max {
+ type int32;
+ units "kHz";
+ default "-1";
+ config false;
+ description
+ "Value of the maximum receive frequency tunable at the air interface.";
+ }
+ list transmission-mode-list {
+ key "transmission-mode-name";
+ config false;
+ min-elements 1;
+ uses transmission-mode;
+ description
+ "List of supported Transmission Modes.";
+ }
+ leaf duplex-distance-is-freely-configurable {
+ type boolean;
+ default "false";
+ config false;
+ description
+ "1 = Transmitted and received frequency can be freely chosen between the given minimum and maximum values.";
+ }
+ leaf-list duplex-distance-list {
+ type int32;
+ units "kHz";
+ default "-1";
+ config false;
+ description
+ "Only relevant if (duplexDistanceIsFreelyConfigurable==0). Lists all supported distances between transmitted and received frequency.";
+ }
+ leaf auto-freq-select-is-avail {
+ type boolean;
+ default "false";
+ config false;
+ description
+ "In case the microwave radio is capable of automatically selecting the transmit frequency in unlicensed bands, this field shall contain a 'true'.";
+ }
+ leaf adaptive-modulation-is-avail {
+ type boolean;
+ default "false";
+ config false;
+ description
+ "In case the device is capable of adaptive modulation, this field shall contain a 'true'.";
+ }
+ leaf atpc-is-avail {
+ type boolean;
+ default "false";
+ config false;
+ description
+ "In case the microwave radio is capable of ATPC, this field shall contain a 'true'.";
+ }
+ leaf atpc-range {
+ type int8;
+ units "dB";
+ default "0";
+ config false;
+ description
+ "Extent of the ATPC range. This value represents a device specific maximum value. The actual range of the ATPC at a specific link might be limited by the difference between configured transmit power (AirInterface::AirInterfaceConfiguration::txPower) and minimum transmit power of the device (TypeDefinitions::TransmissionModeType::txPowerMin).";
+ }
+ leaf supported-radio-signal-id-datatype {
+ type radio-signal-id-datatype-type;
+ default "RADIO_SIGNAL_ID_DATATYPE_TYPE_NOT_YET_DEFINED";
+ config false;
+ description
+ "This attribute is for expressing the datatype, which is supported as a Radio Signal ID by the device.";
+ }
+ leaf supported-radio-signal-id-length {
+ type int16;
+ default "-1";
+ config false;
+ description
+ "If (supportedRadioSignalIdDatatype==INTEGER): Maximum value of the Radio Signal ID supported by the device; If (supportedRadioSignalIdDatatype==STRING): Maximum number of letters supported by the device.";
+ }
+ leaf expected-equals-transmitted-radio-signal-id {
+ type boolean;
+ default "false";
+ config false;
+ description
+ "1 = It is not possible to configure an expectedRadioSignalID different from the transmittedRadioSignalID.";
+ }
+ leaf encryption-is-avail {
+ type boolean;
+ default "false";
+ config false;
+ description
+ "Shall be marked 'true', if payload encryption is available.";
+ }
+ leaf-list supported-loop-back-kind-list {
+ type loop-back-type;
+ config false;
+ min-elements 1;
+ max-elements 4;
+ description
+ "List of supported kinds of looping back of header information to the remote site.";
+ }
+ leaf maintenance-timer-range {
+ type string;
+ default "Range of the maintenance timer not yet defined.";
+ config false;
+ description
+ "Available time periods for maintenance configurations (e.g. the loop back of microwave header information) to be described. Concrete values shall be separated by commas (e.g. '10, 60, 360'). Ranges shall be expressed as two values separated by a minus (e.g. '10-360').";
+ }
+ leaf-list supported-alarm-list {
+ type string;
+ config false;
+ min-elements 7;
+ description
+ "Available alarms to be listed. Mandatory:'signalIsLost','rslIsExceeded','signalIDMismatching','temperatureIsExceeded','modemIsFaulty','radioIsFaulty' and 'modulationIsDownShifted'. Further alarms might be added by the vendor.";
+ }
+ leaf performance-monitoring-is-avail {
+ type boolean;
+ default "false";
+ config false;
+ description
+ "1 = Collection and aggregation of performance values is available.";
+ }
+ leaf direction-of-acm-performance-values {
+ type direction-type;
+ default "DIRECTION_TYPE_NONE";
+ config false;
+ description
+ "Expresses, whether the ACM performance values (timeXStatesList) are measured at the transmitter (TX) or at the receiver (RX).";
+ }
+ description
+ "Describes the 'analog' capabilities of modem and transmitter of the microwave device. Value ranges of attributes are not independently (e.g. min. and max. transmit power depends on modulation). Legal combinations of values are expressed in transmissionModeTypes.";
+ }
+
+ grouping air-interface-configuration {
+ leaf air-interface-name {
+ type string;
+ default "Air interface ID not yet defined.";
+ description
+ "Operator specific microwave link ID (often used for coding area, type of element and sequential number).";
+ }
+ leaf remote-air-interface-name {
+ type string;
+ default "Air interface ID at the remote site not yet defined.";
+ description
+ "Name of the air interface, which belongs to the same link, at the remote site.";
+ }
+ container transmitted-radio-signal-id {
+ uses radio-signal-id-type;
+ description
+ "Transmitted radio signal ID for synchronizing the remote receiver.";
+ }
+ container expected-radio-signal-id {
+ uses radio-signal-id-type;
+ description
+ "Received radio signal ID for identifying the correct transmitter to synchronize on.";
+ }
+ leaf tx-frequency {
+ type int32;
+ units "kHz";
+ default "-1";
+ description
+ "Center frequency of the transmit channel. The values to be configured have to exactly match the values listed in the international agreement referenced in channelPlanID. In case of automated selection of the transmit frequency this field shall describe the lowest center frequency selectable.";
+ }
+ leaf rx-frequency {
+ type int32;
+ units "kHz";
+ default "-1";
+ description
+ "Center frequency of the receive channel.";
+ }
+ leaf transmission-mode-min {
+ type leafref {
+ path "/core-model:control-construct/core-model:logical-termination-point/core-model:layer-protocol/air-interface:air-interface-pac/air-interface:air-interface-capability/air-interface:transmission-mode-list/air-interface:transmission-mode-name";
+ require-instance false;
+ }
+ must 'boolean(/core-model:control-construct/core-model:logical-termination-point/core-model:layer-protocol/air-interface:air-interface-pac/air-interface:air-interface-capability/air-interface:transmission-mode-list[transmission-mode-name=current()])';
+ description
+ "Minimum transmission mode to be configured (in case adaptive modulation is not used, this value represents also the fixed transmission mode).";
+ }
+ leaf transmission-mode-max {
+ type leafref {
+ path "/core-model:control-construct/core-model:logical-termination-point/core-model:layer-protocol/air-interface:air-interface-pac/air-interface:air-interface-capability/air-interface:transmission-mode-list/air-interface:transmission-mode-name";
+ require-instance false;
+ }
+ must 'boolean(/core-model:control-construct/core-model:logical-termination-point/core-model:layer-protocol/air-interface:air-interface-pac/air-interface:air-interface-capability/air-interface:transmission-mode-list[transmission-mode-name=current()])';
+ description
+ "Maximum transmission mode to be configured.";
+ }
+ leaf power-is-on {
+ type boolean;
+ default "true";
+ description
+ "Power ON. Activation of the entire radio in a split mount configuration shall be expressed as a 'true'.";
+ }
+ leaf transmitter-is-on {
+ type boolean;
+ default "false";
+ description
+ "Activation of the transmitter inside the radio shall be expressed as a 'true'.";
+ }
+ leaf receiver-is-on {
+ type boolean;
+ default "true";
+ description
+ "Maintenance Feature. Activation of the receiver inside the radio shall be expressed as a 'true'. Attribute shall also be used for RX main and RX diversity squelches in case of diversity configurations.";
+ }
+ leaf tx-power {
+ type int8;
+ units "dBm";
+ default "99";
+ description
+ "Transmit power to be configured on the microwave link. Signed Byte is required. The actually operated transmit power might be lower depending on adaptive modulation and ATPC.";
+ }
+ leaf adaptive-modulation-is-on {
+ type boolean;
+ default "false";
+ description
+ "Adaptive Modulation. Activation of adaptive modulation shall be expressed as a 'true'.";
+ }
+ leaf xpic-is-on {
+ type boolean;
+ default "false";
+ description
+ "Activation of Cross Polarization Interference Cancelation shall be expressed as a 'true'. In case XPIC is not available for the current combination of channel bandwidth and modulation or the hardware in general, this parameter shall always be set to 'false'.";
+ }
+ leaf mimo-is-on {
+ type boolean;
+ default "false";
+ description
+ "Activation of Multiple Input Multiple Output (MIMO) shall be expressed as a 'true'.";
+ }
+ leaf alic-is-on {
+ type boolean;
+ default "false";
+ description
+ "Activation of Adjacent Link Interference Cancelation (ALIC) shall be expressed as a 'true'.";
+ }
+ leaf atpc-is-on {
+ type boolean;
+ default "false";
+ description
+ "ATPC. Activation of Automated Transmit Power Control shall be expressed as a 'true'.";
+ }
+ leaf atpc-thresh-upper {
+ type int16;
+ units "dBm";
+ default "99";
+ description
+ "If the receive level is higher than the upper threshold value, the transmitter is notified to decrease transmit power.";
+ }
+ leaf atpc-thresh-lower {
+ type int16;
+ units "dBm";
+ default "99";
+ description
+ "If the receive level is lower than the lower threshold value, the transmitter is notified to increase transmit power.";
+ }
+ leaf atpc-tx-power-min {
+ type int8;
+ units "dBm";
+ default "-99";
+ description
+ "Transmit power, which is not to be undercut, while operating ATPC.";
+ }
+ leaf auto-freq-select-is-on {
+ type boolean;
+ default "false";
+ description
+ "Activation of automatically selecting the transmit frequency in unlicensed bands shall be expressed as a 'true'.";
+ }
+ leaf auto-freq-select-range {
+ type int8;
+ units "channels";
+ default "-1";
+ description
+ "Number of transmit channels (starting at the center frequency defined in txFrequency and with channel bandwidth according to txChannelBandwidth) that define the range within the transmit frequency can automatically been chosen. ";
+ }
+ leaf modulation-is-on {
+ type boolean;
+ default "true";
+ description
+ "Maintenance Feature. De-activation of the modulation of the carrier signal for fault management shall be expressed as a 'false'.";
+ }
+ leaf encryption-is-on {
+ type boolean;
+ default "false";
+ description
+ "Activates encryption of the payload.";
+ }
+ leaf cryptographic-key {
+ type string;
+ default "Cryptographic key not yet defined.";
+ description
+ "Key for transforming plaintext into ciphertext data.";
+ }
+ leaf loop-back-kind-on {
+ type loop-back-type;
+ default "LOOP_BACK_TYPE_NONE";
+ description
+ "Maintenance Feature. The currently configured type of looping back of the air interface header shall be expressed here. The received header is returned to the remote site.";
+ }
+ leaf maintenance-timer {
+ type int32;
+ units "s";
+ default "-1";
+ description
+ "Time of existence of any maintenance configuration (e.g. the loop back of microwave header information). 0 = maintenance timer is switched off. Valid values are defined in AirInterface::AirInterfaceCapability::maintenanceTimerRange. ";
+ }
+ list problem-kind-severity-list {
+ key "problem-kind-name";
+ min-elements 6;
+ uses problem-kind-severity-type;
+ description
+ "Severity of the problem to be configured.";
+ }
+ list g-826-threshold-cross-alarm-list {
+ key "g-826-value-kind granularity-period";
+ uses g-826-threshold-cross-alarm-type;
+ description
+ "List of G826 related threshold cross alarms to be configured.";
+ }
+ list xlts-threshold-cross-alarm-list {
+ key "level-threshold-second-kind granularity-period xlts-threshold-cross-alarm-definition-number";
+ uses xlts-threshold-cross-alarm-type;
+ description
+ "List of RLTS or TLTS (ETSI EN 301 129) related threshold cross alarms to be configured.";
+ }
+ list acm-threshold-cross-alarm-list {
+ key "acm-threshold-cross-alarm-definition-number granularity-period";
+ uses acm-threshold-cross-alarm-type;
+ description
+ "List threshold cross alarms, which relate to the time period of operation of a specific transmission mode.";
+ }
+ leaf clearing-threshold-cross-alarms-is-on {
+ type boolean;
+ default "false";
+ description
+ "Setting this bit is clearing all the currently active threshold cross alarms.";
+ }
+ leaf performance-monitoring-is-on {
+ type boolean;
+ default "false";
+ description
+ "Enables measurement, collection, storage and access to performance data.";
+ }
+ description
+ "Configuration of the radio link.";
+ }
+
+ grouping air-interface-status {
+ leaf interface-status {
+ type interface-status-type;
+ default "INTERFACE_STATUS_TYPE_NOT_YET_DEFINED";
+ config false;
+ description
+ "Operational status of the interface.";
+ }
+ leaf tx-frequency-cur {
+ type int32;
+ units "kHz";
+ default "-1";
+ config false;
+ description
+ "Center frequency of the currently operated transmit channel.";
+ }
+ leaf rx-frequency-cur {
+ type int32;
+ units "kHz";
+ default "-1";
+ config false;
+ description
+ "Center frequency of the currently operated receive channel.";
+ }
+ leaf transmission-mode-cur {
+ type leafref {
+ path "/core-model:control-construct/core-model:logical-termination-point/core-model:layer-protocol/air-interface:air-interface-pac/air-interface:air-interface-capability/air-interface:transmission-mode-list/air-interface:transmission-mode-name";
+ require-instance false;
+ }
+ config false;
+ description
+ "Currently operated transmission mode according to definitions in Capabilities.";
+ }
+ container received-radio-signal-id {
+ config false;
+ uses radio-signal-id-type;
+ description
+ "Radio signal ID of the signal, which the receiver is currently synchronized on.";
+ }
+ leaf radio-power-is-up {
+ type boolean;
+ default "false";
+ config false;
+ description
+ "If the radio unit has power and is switched on, this shall be expressed as a 'true'.";
+ }
+ leaf link-is-up {
+ type boolean;
+ default "false";
+ config false;
+ description
+ "If connection is established to the remote site with the same linkID, this shall be expressed as a 'true'.";
+ }
+ leaf xpic-is-up {
+ type boolean;
+ default "false";
+ config false;
+ description
+ "If XPIC is currently actually working (not just configured), this shall be expressed as a 'true'.";
+ }
+ leaf mimo-is-up {
+ type boolean;
+ default "false";
+ config false;
+ description
+ "If MIMO is currently actually working (not just configured), this shall be expressed as a 'true'.";
+ }
+ leaf alic-is-up {
+ type boolean;
+ default "false";
+ config false;
+ description
+ "If Adjacent Link Interference Cancelation (ALIC) is currently actually working (not just configured), this shall be expressed as a 'true'.";
+ }
+ leaf atpc-is-up {
+ type boolean;
+ default "false";
+ config false;
+ description
+ "If ATPC is currently actually working (not just configured), this shall be expressed as a 'true'.";
+ }
+ leaf auto-freq-select-is-up {
+ type boolean;
+ default "false";
+ config false;
+ description
+ "If automated frequency selection is currently actually working (not just configured), this shall be expressed as a 'true'.";
+ }
+ leaf local-end-point-id {
+ type string;
+ default "not-supported";
+ config false;
+ description
+ "The value of the localEndPointId is a vendor specific identifier of the air interface, used by the node to discover a microwave radio link.";
+ }
+ leaf remote-end-point-id {
+ type string;
+ default "not-supported";
+ config false;
+ description
+ "The value of the remoteEndPointId is a vendor specific identifier of the airinterface at the remote side, used to by the node to discover a microwave radio link.";
+ }
+ leaf loop-back-kind-up {
+ type loop-back-type;
+ default "LOOP_BACK_TYPE_NONE";
+ config false;
+ description
+ "The currently active (not just configured) type of looping back of the air interface header shall be expressed here. The received header is returned to the remote site.";
+ }
+ leaf performance-monitoring-is-up {
+ type boolean;
+ default "false";
+ config false;
+ description
+ "1 = Performance values are currently collected and aggregated.";
+ }
+ leaf rx-level-cur {
+ type int8;
+ units "dBm";
+ default "99";
+ config false;
+ description
+ "Current receive level.";
+ }
+ leaf tx-level-cur {
+ type int8;
+ units "dBm";
+ default "99";
+ config false;
+ description
+ "Current transmit level.";
+ }
+ leaf snir-cur {
+ type int8;
+ units "dB";
+ default "-99";
+ config false;
+ description
+ "Currently measured signal to (noise+interference) ratio.";
+ }
+ leaf xpd-cur {
+ type int8;
+ units "dB";
+ default "-99";
+ config false;
+ description
+ "Currently measured cross polarization discrimination.";
+ }
+ leaf rf-temp-cur {
+ type int8;
+ units "Celsius";
+ default "-99";
+ config false;
+ description
+ "Current temperature (in degree Celsius) of the radio module inside the outdoor unit.";
+ }
+ description
+ "Measurements of current values on the air interface and operational status of the device.";
+ }
+
+ grouping air-interface-current-problems {
+ list current-problem-list {
+ key "sequence-number";
+ config false;
+ uses air-interface-current-problem-type;
+ description
+ "none";
+ }
+ leaf number-of-current-problems {
+ type int8;
+ default "-1";
+ config false;
+ description
+ "Number of alarms, which are currently active on this air interface.";
+ }
+ leaf time-of-latest-change {
+ type yang:date-and-time;
+ default "2010-11-20T14:00:00+01:00";
+ config false;
+ description
+ "Date and time when the list of alarms has been changed for the last time.";
+ }
+ description
+ "none";
+ }
+
+ grouping air-interface-current-performance {
+ list current-performance-data-list {
+ key "granularity-period";
+ config false;
+ min-elements 1;
+ max-elements 2;
+ uses air-interface-current-performance-type;
+ description
+ "At least values of the counters, which are reset every 15 minutes, are to be provided. If available, the current values of the counters, which are reset every 24 hour, can be provided, too.";
+ }
+ leaf number-of-current-performance-sets {
+ type int8;
+ default "-1";
+ config false;
+ description
+ "Number of sets of current performance values, which are provided in the list.";
+ }
+ description
+ "Aggregated performance information of the air interface at a particular moment.";
+ }
+
+ grouping air-interface-historical-performances {
+ list historical-performance-data-list {
+ key "granularity-period period-end-time";
+ config false;
+ uses air-interface-historical-performance-type;
+ description
+ "none";
+ }
+ leaf number-of-historical-performance-sets {
+ type int16;
+ default "-1";
+ config false;
+ description
+ "Number of sets of historical performance values, which are provided in the list.";
+ }
+ leaf time-of-latest-change {
+ type yang:date-and-time;
+ default "2010-11-20T14:00:00+01:00";
+ config false;
+ description
+ "Date and time when the list of sets of historical performance values has been changed for the last time (e.g. new one added or existing one deleted).";
+ }
+ description
+ "Aggregated performance information of the air interface for a pre-defined measurement interval.";
+ }
+
+ grouping transmission-mode {
+ leaf transmission-mode-name {
+ type string;
+ config false;
+ description
+ "Name of the transmission mode. BBBB-m*-i*/t*-r*. B=four digits of channel bandwidth in MHz. m*=required number of digits for modulation name. (i*/t*=code rate.) i*=required number of digits for number of information bits. t*=required number of digits for total bits. r*=required number of digits for rate reduction factor. Example: 0028-4QAM-188/204-1";
+ }
+ leaf transmission-mode-rank {
+ type int32;
+ default "-1";
+ config false;
+ description
+ "Configuring adaptive modulation by selecting _transmissionModeMin and _transmissionModeMin requires the transmission modes to be ordered. The vendor shall rank all available transmission modes according to the respective payload data rate. The application providers shall order the transmission modes according to the rank.";
+ }
+ leaf channel-bandwidth {
+ type int32;
+ units "kHz";
+ default "-1";
+ config false;
+ description
+ "Bandwidth of the transmit channel. The value shall be expressed explicitly (means in kHz) not as a reference to an international agreement. The values shall be chosen from the following _list: 3.500, 7.000, 14.000, 27.500, 28.000, 29.000, 29.650, 30.000, 40.000, 50.000, 55.000, 56.000, 59.300, 60.000, 80.000, 100.000, 112.000, 120.000, 150.000, 200.000, 250.000, 500.000, 750.000, 1.000.000, 1.250.000, 1.500.000, 1.750.000, 2.000.000;";
+ }
+ leaf modulation-scheme {
+ type int16;
+ units "symbols";
+ default "-1";
+ config false;
+ description
+ "Modulation scheme, which is base to the other characteristics described in the same transmissionModeType data type. The modulation scheme shall be described by the number of states in the phase diagram (e.g. BPSK->'2' or 256QAM->'256').";
+ }
+ leaf code-rate {
+ type int8;
+ units "%";
+ default "-1";
+ config false;
+ description
+ "Code rate of the coding scheme in % (Net bit rate ≤ Gross bit rate · code rate).";
+ }
+ leaf symbol-rate-reduction-factor {
+ type int8;
+ default "1";
+ config false;
+ description
+ "Reduction factor for the symbol rate. Example: value would be 4 for 1/4BPSK.";
+ }
+ leaf tx-power-min {
+ type int8;
+ units "dBm";
+ default "99";
+ config false;
+ description
+ "Value of the minimum transmit power the modem can operate in dBm.";
+ }
+ leaf tx-power-max {
+ type int8;
+ units "dBm";
+ default "99";
+ config false;
+ description
+ "Value of the maximum transmit power the modem can operate in dBm.";
+ }
+ leaf rx-threshold {
+ type int16;
+ units "dBm";
+ default "99";
+ config false;
+ description
+ "Value of the receive level required to decode the received signal with a Bit Error Rate of 1e-6 or less.";
+ }
+ leaf am-upshift-level {
+ type int8;
+ units "dBm";
+ default "99";
+ config false;
+ description
+ "Value of the receive level that has to be exceeded to shift into a higher modulation scheme.";
+ }
+ leaf am-downshift-level {
+ type int8;
+ units "dBm";
+ default "99";
+ config false;
+ description
+ "Value of the receive level that has to be exceeded for not shifting into a lower modulation scheme.";
+ }
+ leaf xpic-is-avail {
+ type boolean;
+ default "false";
+ config false;
+ description
+ "In case this air interface type is capable of XPIC, this field shall contain a 'true'. This information shall purely relate to capabilities of the equipment type, but not to the operational capability of a specific hardware composition on site. Means for example that this attribute might contain a 'true' statement, even if an additional cable would have been required to actually operate XPIC in a specific case.";
+ }
+ leaf supported-as-fixed-configuration {
+ type boolean;
+ default "false";
+ config false;
+ description
+ "1 = This transmission mode is available for manual configuration when Adaptive Modulation is switched off.";
+ }
+ description
+ "none";
+ }
+
+ /****************************************
+ * typedef statements
+ **************************************/
+
+ typedef radio-signal-id-datatype-type {
+ type identityref {
+ base RADIO_SIGNAL_ID_DATATYPE_TYPE;
+ }
+ description
+ "none";
+ }
+
+ typedef loop-back-type {
+ type identityref {
+ base LOOP_BACK_TYPE;
+ }
+ description
+ "none";
+ }
+
+ typedef direction-type {
+ type identityref {
+ base DIRECTION_TYPE;
+ }
+ description
+ "none";
+ }
+
+ typedef g-826-type {
+ type identityref {
+ base G_826_TYPE;
+ }
+ description
+ "none";
+ }
+
+ typedef xlevel-threshold-second-kind-type {
+ type identityref {
+ base XLEVEL_THRESHOLD_SECOND_KIND_TYPE;
+ }
+ description
+ "According to ETSI EN 301 129 V1.1.2 (1999-05) chapter B.1.1";
+ }
+
+ /*********************************************
+ * grouping statements for complex data types
+ *******************************************/
+
+ identity RADIO_SIGNAL_ID_DATATYPE_TYPE {
+ description
+ "none";
+ }
+
+ identity RADIO_SIGNAL_ID_DATATYPE_TYPE_INTEGER {
+ base RADIO_SIGNAL_ID_DATATYPE_TYPE;
+ description
+ "none";
+ }
+
+ identity RADIO_SIGNAL_ID_DATATYPE_TYPE_STRING {
+ base RADIO_SIGNAL_ID_DATATYPE_TYPE;
+ description
+ "none";
+ }
+
+ identity RADIO_SIGNAL_ID_DATATYPE_TYPE_NOT_YET_DEFINED {
+ base RADIO_SIGNAL_ID_DATATYPE_TYPE;
+ description
+ "none";
+ }
+
+ identity LOOP_BACK_TYPE {
+ description
+ "none";
+ }
+
+ identity LOOP_BACK_TYPE_RF_TO_REMOTE {
+ base LOOP_BACK_TYPE;
+ description
+ "Returning the header information of the remote site back to the remote site on the radio interface between both outdoor units.";
+ }
+
+ identity LOOP_BACK_TYPE_RF_TO_LOCAL {
+ base LOOP_BACK_TYPE;
+ description
+ "Returning the header information of the local site back to the local site on the radio interface between both outdoor units.";
+ }
+
+ identity LOOP_BACK_TYPE_IF_TO_REMOTE {
+ base LOOP_BACK_TYPE;
+ description
+ "Returning the header information of the remote site back to the remote site on the intermediate frequency interface between local indoor unit and outdoor unit.";
+ }
+
+ identity LOOP_BACK_TYPE_IF_TO_LOCAL {
+ base LOOP_BACK_TYPE;
+ description
+ "Returning the header information of the local site back to the local site on the intermediate frequency interface between local indoor unit and outdoor unit.";
+ }
+
+ identity LOOP_BACK_TYPE_NONE {
+ base LOOP_BACK_TYPE;
+ description
+ "none";
+ }
+
+ identity DIRECTION_TYPE {
+ description
+ "none";
+ }
+
+ identity DIRECTION_TYPE_TX {
+ base DIRECTION_TYPE;
+ description
+ "none";
+ }
+
+ identity DIRECTION_TYPE_RX {
+ base DIRECTION_TYPE;
+ description
+ "none";
+ }
+
+ identity DIRECTION_TYPE_NONE {
+ base DIRECTION_TYPE;
+ description
+ "none";
+ }
+
+ identity G_826_TYPE {
+ description
+ "none";
+ }
+
+ identity G_826_TYPE_ES {
+ base G_826_TYPE;
+ description
+ "Errored Seconds. Threshold cross alarm will relate to TypeDefinitions::AirInterfacePerformanceType::es .";
+ }
+
+ identity G_826_TYPE_SES {
+ base G_826_TYPE;
+ description
+ "Severely Errored Seconds. Threshold cross alarm will relate to TypeDefinitions::AirInterfacePerformanceType::ses .";
+ }
+
+ identity G_826_TYPE_CSES {
+ base G_826_TYPE;
+ description
+ "Consecutive Severely Errored Seconds. Threshold cross alarm will relate to TypeDefinitions::AirInterfacePerformanceType::cses .";
+ }
+
+ identity G_826_TYPE_UAS {
+ base G_826_TYPE;
+ description
+ "Unavailable Seconds. Threshold cross alarm will relate to TypeDefinitions::AirInterfacePerformanceType::unavailability.";
+ }
+
+ identity G_826_TYPE_NOT_SPECIFIED {
+ base G_826_TYPE;
+ description
+ "none";
+ }
+
+ identity XLEVEL_THRESHOLD_SECOND_KIND_TYPE {
+ description
+ "none";
+ }
+
+ identity XLEVEL_THRESHOLD_SECOND_KIND_TYPE_RLTS {
+ base XLEVEL_THRESHOLD_SECOND_KIND_TYPE;
+ description
+ "none";
+ }
+
+ identity XLEVEL_THRESHOLD_SECOND_KIND_TYPE_TLTS {
+ base XLEVEL_THRESHOLD_SECOND_KIND_TYPE;
+ description
+ "none";
+ }
+
+ identity XLEVEL_THRESHOLD_SECOND_KIND_TYPE_NOT_YET_DEFINED {
+ base XLEVEL_THRESHOLD_SECOND_KIND_TYPE;
+ description
+ "none";
+ }
+
+ identity GRANULARITY_PERIOD_TYPE {
+ description
+ "none";
+ }
+
+ identity GRANULARITY_PERIOD_TYPE_UNKNOWN {
+ base GRANULARITY_PERIOD_TYPE;
+ description
+ "none";
+ }
+
+ identity GRANULARITY_PERIOD_TYPE_PERIOD-15-MIN {
+ base GRANULARITY_PERIOD_TYPE;
+ description
+ "none";
+ }
+
+ identity GRANULARITY_PERIOD_TYPE_PERIOD-24-HOURS {
+ base GRANULARITY_PERIOD_TYPE;
+ description
+ "none";
+ }
+
+ identity GRANULARITY_PERIOD_TYPE_NOT_YET_DEFINED {
+ base GRANULARITY_PERIOD_TYPE;
+ description
+ "none";
+ }
+
+ identity SEVERITY_TYPE {
+ description
+ "none";
+ }
+
+ identity SEVERITY_TYPE_NON_ALARMED {
+ base SEVERITY_TYPE;
+ description
+ "none";
+ }
+
+ identity SEVERITY_TYPE_WARNING {
+ base SEVERITY_TYPE;
+ description
+ "none";
+ }
+
+ identity SEVERITY_TYPE_MINOR {
+ base SEVERITY_TYPE;
+ description
+ "none";
+ }
+
+ identity SEVERITY_TYPE_MAJOR {
+ base SEVERITY_TYPE;
+ description
+ "none";
+ }
+
+ identity SEVERITY_TYPE_CRITICAL {
+ base SEVERITY_TYPE;
+ description
+ "none";
+ }
+
+ identity SEVERITY_TYPE_NOT_YET_DEFINED {
+ base SEVERITY_TYPE;
+ description
+ "none";
+ }
+
+ identity INTERFACE_STATUS_TYPE {
+ description
+ "none";
+ }
+
+ identity INTERFACE_STATUS_TYPE_UP {
+ base INTERFACE_STATUS_TYPE;
+ description
+ "Ready to pass packets.";
+ }
+
+ identity INTERFACE_STATUS_TYPE_DOWN {
+ base INTERFACE_STATUS_TYPE;
+ description
+ "The interface does not pass any packets.";
+ }
+
+ identity INTERFACE_STATUS_TYPE_TESTING {
+ base INTERFACE_STATUS_TYPE;
+ description
+ "In some test mode. No operational packets can be passed.";
+ }
+
+ identity INTERFACE_STATUS_TYPE_UNKNOWN {
+ base INTERFACE_STATUS_TYPE;
+ description
+ "Status cannot be determined for some reason.";
+ }
+
+ identity INTERFACE_STATUS_TYPE_DORMANT {
+ base INTERFACE_STATUS_TYPE;
+ description
+ "Waiting for some external event.";
+ }
+
+ identity INTERFACE_STATUS_TYPE_NOT_PRESENT {
+ base INTERFACE_STATUS_TYPE;
+ description
+ "Some component (typically hardware) is missing.";
+ }
+
+ identity INTERFACE_STATUS_TYPE_LOWER_LAYER_DOWN {
+ base INTERFACE_STATUS_TYPE;
+ description
+ "Down due to state of lower-layer interface(s).";
+ }
+
+ identity INTERFACE_STATUS_TYPE_ADMIN_DOWN {
+ base INTERFACE_STATUS_TYPE;
+ description
+ "Down due to configuration.";
+ }
+
+ identity INTERFACE_STATUS_TYPE_NOT_YET_DEFINED {
+ base INTERFACE_STATUS_TYPE;
+ description
+ "none";
+ }
+
+ /****************************************
+ * package super-types
+ **************************************/
+
+ typedef granularity-period-type {
+ type identityref {
+ base GRANULARITY_PERIOD_TYPE;
+ }
+ description
+ "The enumeration with the options for granularity period of the performance data.";
+ }
+
+ typedef severity-type {
+ type identityref {
+ base SEVERITY_TYPE;
+ }
+ description
+ "According to ITU-T M.3160";
+ }
+
+ typedef interface-status-type {
+ type identityref {
+ base INTERFACE_STATUS_TYPE;
+ }
+ description
+ "Current Interface Status";
+ }
+
+ grouping problem-kind-severity-type {
+ leaf problem-kind-name {
+ type string;
+ description
+ "Name of the alarm according to supportedAlarmList";
+ }
+ leaf problem-kind-severity {
+ type severity-type;
+ default "SEVERITY_TYPE_NOT_YET_DEFINED";
+ description
+ "Severity of this type of alarm.";
+ }
+ description
+ "none";
+ }
+
+ grouping radio-signal-id-type {
+ leaf numeric-radio-signal-id {
+ type uint16;
+ default "0";
+ description
+ "Only relevant if (supportedRadioSignalIdDatatype==INTEGER): 0 = the receiver ignores the signal ID of the received signal. Any other value = the receiver exclusively synchronizes on signals with the same signal ID.";
+ }
+ leaf alphanumeric-radio-signal-id {
+ type string;
+ default "Not yet defined.";
+ description
+ "Only relevant if (supportedRadioSignalIdDatatype==STRING): Empty String = the receiver synchronizes on the received signal regardless of the signal ID of the received signal. Any other entry = the receiver exclusively synchronizes on signals with the same signal ID.";
+ }
+ description
+ "none";
+ }
+
+ grouping g-826-threshold-cross-alarm-type {
+ leaf g-826-value-kind {
+ type g-826-type;
+ description
+ "Kind of performance value that shall be equipped with a threshold alarm.";
+ }
+ leaf alarm-raising-threshold {
+ type int32;
+ units "s";
+ default "-1";
+ description
+ "Number of events required for raising the threshold cross alarm.";
+ }
+ leaf alarm-clearing-threshold {
+ type int32;
+ units "s";
+ default "-1";
+ description
+ "Number of events required for clearing the threshold cross alarm.";
+ }
+ leaf granularity-period {
+ type granularity-period-type;
+ description
+ "Period of the performance data collection.";
+ }
+ description
+ "Allows defining a threshold cross alarm.";
+ }
+
+ grouping xlts-threshold-cross-alarm-type {
+ leaf level-threshold-second-kind {
+ type xlevel-threshold-second-kind-type;
+ description
+ "Defines whether receive (RLTS) or transmit (TLTS) level triggers the threshold cross alarm.";
+ }
+ leaf xlts-level {
+ type int8;
+ units "dBm";
+ description
+ "If (LevelThresholdSecondKindType==RLTS): Receive level, which has to be undercut, for the performance counter incrementing the number of seconds. If (LevelThresholdSecondKindType==TLTS): Transmit level, which has to be exceeded, for the performance counter incrementing the number of seconds. See also ETSI EN 301 129 V1.1.2 (1999-05).";
+ }
+ leaf amount-of-seconds {
+ type int16;
+ units "s";
+ default "-1";
+ description
+ "Number of seconds, which has to be exceeded for causing the threshold cross alarm to raise for this period.";
+ }
+ leaf granularity-period {
+ type granularity-period-type;
+ description
+ "Period of the performance data collection.";
+ }
+ leaf xlts-threshold-cross-alarm-definition-number {
+ type int8;
+ description
+ "Sequence number of the definitions.";
+ }
+ description
+ "none";
+ }
+
+ grouping acm-threshold-cross-alarm-type {
+ leaf acm-threshold-cross-alarm-definition-number {
+ type int8;
+ description
+ "Sequence number of the definitions.";
+ }
+ leaf transmission-mode {
+ type leafref {
+ path "/core-model:control-construct/core-model:logical-termination-point/core-model:layer-protocol/air-interface:air-interface-pac/air-interface:air-interface-capability/air-interface:transmission-mode-list/air-interface:transmission-mode-name";
+ require-instance false;
+ }
+ must 'boolean(/core-model:control-construct/core-model:logical-termination-point/core-model:layer-protocol/air-interface:air-interface-pac/air-interface:air-interface-capability/air-interface:transmission-mode-list[transmission-mode-name=current()])';
+ description
+ "none";
+ }
+ leaf amount-of-seconds {
+ type int16;
+ units "s";
+ description
+ "Number of seconds, in which the referenced transmission mode has to be operated until the threshold cross alarm is raised for this 15min or 24hour period.";
+ }
+ leaf granularity-period {
+ type granularity-period-type;
+ description
+ "Period of the performance data collection.";
+ }
+ description
+ "none";
+ }
+
+ grouping air-interface-current-problem-type {
+ leaf problem-name {
+ type string;
+ default "Problem name not specified.";
+ config false;
+ description
+ "Name of the alarm according to AirInterface::AirInterfaceCapability::supportedAlarms";
+ }
+ uses current-problem;
+ description
+ "none";
+ }
+
+ grouping time-xstates-type {
+ leaf time-xstate-sequence-number {
+ type int8;
+ units "s";
+ config false;
+ description
+ "Sequence number of the performance value.";
+ }
+ leaf transmission-mode {
+ type leafref {
+ path "/core-model:control-construct/core-model:logical-termination-point/core-model:layer-protocol/air-interface:air-interface-pac/air-interface:air-interface-capability/air-interface:transmission-mode-list/air-interface:transmission-mode-name";
+ require-instance false;
+ }
+ config false;
+ description
+ "Operated transmission mode.";
+ }
+ leaf time {
+ type int32;
+ units "s";
+ default "-1";
+ config false;
+ description
+ "Sum of all seconds the transmitter operated the transmission mode.";
+ }
+ description
+ "none";
+ }
+
+ grouping air-interface-performance-type {
+ leaf es {
+ type int32;
+ units "s";
+ default "-1";
+ config false;
+ description
+ "Number of errored seconds.";
+ }
+ leaf ses {
+ type int32;
+ units "s";
+ default "-1";
+ config false;
+ description
+ "Number of severely errored seconds.";
+ }
+ leaf cses {
+ type int32;
+ units "s";
+ default "-1";
+ config false;
+ description
+ "Number of consecutive severely errored seconds.";
+ }
+ leaf unavailability {
+ type int32;
+ units "s";
+ default "-1";
+ config false;
+ description
+ "Total time of unavailability in seconds.";
+ }
+ leaf tx-level-min {
+ type int8;
+ units "dBm";
+ default "99";
+ config false;
+ description
+ "Minimum transmit power. Signed integers are required.";
+ }
+ leaf tx-level-max {
+ type int8;
+ units "dBm";
+ default "99";
+ config false;
+ description
+ "Maximum transmit power. Signed integers are required.";
+ }
+ leaf tx-level-avg {
+ type int8;
+ units "dBm";
+ default "99";
+ config false;
+ description
+ "Averaged transmit power. Signed integers are required.";
+ }
+ leaf rx-level-min {
+ type int8;
+ units "dBm";
+ default "99";
+ config false;
+ description
+ "Minimum receive level. Signed integers are required.";
+ }
+ leaf rx-level-max {
+ type int8;
+ units "dBm";
+ default "99";
+ config false;
+ description
+ "Maximum receive level. Signed integers are required.";
+ }
+ leaf rx-level-avg {
+ type int8;
+ units "dBm";
+ default "99";
+ config false;
+ description
+ "Averaged receive level. Signed integers are required.";
+ }
+ list time-xstates-list {
+ key "time-xstate-sequence-number";
+ config false;
+ min-elements 1;
+ uses time-xstates-type;
+ description
+ "Time period the transmitter operated in the respective transmission mode.";
+ }
+ leaf snir-min {
+ type int8;
+ units "dB";
+ default "-99";
+ config false;
+ description
+ "Minimum signal to (noise+interference) ratio.";
+ }
+ leaf snir-max {
+ type int8;
+ units "dB";
+ default "-99";
+ config false;
+ description
+ "Maximum signal to (noise+interference) ratio.";
+ }
+ leaf snir-avg {
+ type int8;
+ units "dB";
+ default "-99";
+ config false;
+ description
+ "Averaged signal to (noise+interference) ratio.";
+ }
+ leaf xpd-min {
+ type int8;
+ units "dB";
+ default "-99";
+ config false;
+ description
+ "Minimum cross polarization discrimination.";
+ }
+ leaf xpd-max {
+ type int8;
+ units "dB";
+ default "-99";
+ config false;
+ description
+ "Maximum cross polarization discrimination.";
+ }
+ leaf xpd-avg {
+ type int8;
+ units "dB";
+ default "-99";
+ config false;
+ description
+ "Averaged cross polarization discrimination.";
+ }
+ leaf rf-temp-min {
+ type int8;
+ units "Celsius";
+ default "-99";
+ config false;
+ description
+ "Lowest temperature (in degree Celsius) of the radio module inside the outdoor unit.";
+ }
+ leaf rf-temp-max {
+ type int8;
+ units "Celsius";
+ default "-99";
+ config false;
+ description
+ "Highest temperature (in degree Celsius) of the radio module inside the outdoor unit.";
+ }
+ leaf rf-temp-avg {
+ type int8;
+ units "Celsius";
+ default "-99";
+ config false;
+ description
+ "Averaged temperature (in degree Celsius) of the radio module inside the outdoor unit.";
+ }
+ leaf defect-blocks-sum {
+ type int16;
+ units "blocks";
+ default "-1";
+ config false;
+ description
+ "Total number of blocks that were defect after receiving and could not be corrected by the FEC.";
+ }
+ leaf time-period {
+ type int32;
+ units "s";
+ default "-1";
+ config false;
+ description
+ "Total length of the measurement period.";
+ }
+ description
+ "Consolidated performance information of the air interface.";
+ }
+
+ grouping air-interface-current-performance-type {
+ container performance-data {
+ config false;
+ uses air-interface-performance-type;
+ description
+ "none";
+ }
+ uses current-performance;
+ description
+ "Turns performance information into current performance information by inheriting from OTN_CurrentData.";
+ }
+
+ grouping air-interface-historical-performance-type {
+ container performance-data {
+ config false;
+ uses air-interface-performance-type;
+ description
+ "none";
+ }
+ uses historical-performance;
+ description
+ "Turns performance information into historical performance information by inheriting from OTN_HistoryData.";
+ }
+}
diff --git a/sdnr/wt/devicemanager-onap/onf14/provider/src/main/yang/co-channel-profile-1-0.yang b/sdnr/wt/devicemanager-onap/onf14/provider/src/main/yang/co-channel-profile-1-0.yang new file mode 100644 index 000000000..9906cf6ba --- /dev/null +++ b/sdnr/wt/devicemanager-onap/onf14/provider/src/main/yang/co-channel-profile-1-0.yang @@ -0,0 +1,285 @@ +module co-channel-profile-1-0 {
+ yang-version 1.1;
+ namespace "urn:onf:yang:co-channel-profile-1-0";
+ prefix co-channel-profile;
+
+ import ietf-yang-types {
+ prefix yang;
+ }
+ import core-model-1-4 {
+ prefix core-model;
+ }
+
+ organization
+ "openBackhaul.com proposal to Open Networking Foundation (ONF)";
+ contact
+ "WG Web : https://github.com/openBackhaul/Overview
+ WG List: CoChannelProfile@openBackhaul.com
+ Editor : Thorsten Heinze
+ Email : Thorsten.Heinze@openBackhaul.com";
+ description
+ "Technology specific definition for groups of microwave radio interfaces, which are using the same frequency channel (XPIC, MIMO and ALIC).
+
+ Copyright 2019 openBackhaul.com
+
+ Licensed under the Apache License, Version 2.0 (the 'License');
+ you may not use this file except in compliance with the License.
+ You may obtain a copy of the License at
+ http://www.apache.org/licenses/LICENSE-2.0
+ Unless required by applicable law or agreed to in writing, software
+ distributed under the License is distributed on an 'AS IS' BASIS,
+ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ See the License for the specific language governing permissions and
+ limitations under the License.";
+
+ revision 2020-01-27 {
+ description
+ "Model for the Transport SDN Pilot at Telefonica Germany.
+ Please view https://github.com/openBackhaul/coChannelProfile/issues for changes.";
+ reference
+ "https://github.com/openBackhaul/coChannelProfile/tree/tsp: Model definition
+ https://github.com/openBackhaul/onfCoreIm/tree/tsp: ONF TR-512 Core IM incl. Profile and enhanced Equipment definition";
+ }
+ revision 2019-11-02 {
+ description
+ "Model for the Transport SDN Pilot at Telefonica Germany.
+ Please view https://github.com/openBackhaul/coChannelProfile/issues for changes.";
+ reference
+ "https://github.com/openBackhaul/coChannelProfile/tree/tsp: Model definition
+ https://github.com/openBackhaul/onfCoreIm/tree/tsp: ONF TR-512 Core IM incl. Profile and enhanced Equipment definition";
+ }
+ revision 2019-07-17 {
+ description
+ "Model for the Transport SDN Pilot at Telefonica Germany.
+ Please view https://github.com/openBackhaul/coChannelProfile/issues for changes.";
+ reference
+ "https://github.com/openBackhaul/coChannelProfile/tree/tsp: Model definition
+ https://github.com/openBackhaul/onfCoreIm/tree/tsp: ONF TR-512 Core IM incl. Profile and enhanced Equipment definition";
+ }
+
+ identity PROFILE_NAME_TYPE_CO_CHANNEL_PROFILE {
+ base core-model:PROFILE_NAME_TYPE;
+ description
+ "none";
+ }
+
+ augment "/core-model:control-construct/core-model:profile-collection/core-model:profile" {
+ when "derived-from-or-self(./core-model:profile-name, 'co-channel-profile:PROFILE_NAME_TYPE_CO_CHANNEL_PROFILE')";
+ uses co-channel-profile-spec;
+ description
+ "none";
+ }
+
+ /****************************************
+ * package notifications
+ **************************************/
+
+ notification object-creation-notification {
+ uses object-creation-notification;
+ description
+ "none";
+ }
+
+ grouping object-creation-notification {
+ leaf counter {
+ type int32;
+ default "-1";
+ config false;
+ description
+ "Counts object creation notifications.";
+ }
+ leaf timestamp {
+ type yang:date-and-time;
+ default "2010-11-20T14:00:00+01:00";
+ config false;
+ description
+ "none";
+ }
+ leaf object-id-ref {
+ type leafref {
+ path "/core-model:control-construct/core-model:profile-collection/core-model:profile/core-model:uuid";
+ require-instance false;
+ }
+ config false;
+ description
+ "none";
+ }
+ leaf object-type {
+ type string;
+ default "Type of created object not specified.";
+ config false;
+ description
+ "none";
+ }
+ description
+ "none";
+ }
+
+ notification object-deletion-notification {
+ uses object-deletion-notification;
+ description
+ "none";
+ }
+
+ grouping object-deletion-notification {
+ leaf counter {
+ type int32;
+ default "-1";
+ config false;
+ description
+ "Counts object deletion notifications.";
+ }
+ leaf timestamp {
+ type yang:date-and-time;
+ default "2010-11-20T14:00:00+01:00";
+ config false;
+ description
+ "none";
+ }
+ leaf object-id-ref {
+ type leafref {
+ path "/core-model:control-construct/core-model:profile-collection/core-model:profile/core-model:uuid";
+ require-instance false;
+ }
+ config false;
+ description
+ "none";
+ }
+ description
+ "none";
+ }
+
+ /****************************************
+ * grouping statements for object classes
+ **************************************/
+
+ grouping co-channel-profile-spec {
+ container co-channel-profile-pac {
+ uses co-channel-profile-pac;
+ description
+ "none";
+ }
+ description
+ "none";
+ }
+
+ grouping co-channel-profile-pac {
+ container co-channel-profile-capability {
+ config false;
+ uses co-channel-profile-capability;
+ description
+ "none";
+ }
+ container co-channel-profile-configuration {
+ uses co-channel-profile-configuration;
+ description
+ "none";
+ }
+ description
+ "none";
+ }
+
+ grouping co-channel-profile-capability {
+ leaf xpic-is-avail {
+ type boolean;
+ default "false";
+ config false;
+ description
+ "In case this device is in general capable of XPIC, this field shall contain a 'true'. This information shall purely relate to capabilities of the equipment type, but not to the operational capability of a specific hardware composition on site. Means for example that this attribute might contain a 'true' statement, even if an additional cable would have been required to actually operate XPIC in a specific case.";
+ }
+ leaf mimo-is-avail {
+ type boolean;
+ default "false";
+ config false;
+ description
+ "In case the device is capable of MIMO, this field shall contain a 'true'.";
+ }
+ leaf number-of-mimo-channels-max {
+ type int8;
+ units "channels";
+ default "1";
+ config false;
+ description
+ "Maximum number (n) of spatial multiplexing streams that can be conveyed by an n x n MIMO configuration.";
+ }
+ leaf alic-is-avail {
+ type boolean;
+ default "false";
+ config false;
+ description
+ "In case the device is capable of Adjacent Link Interference Cancelation (canceling of interference cause by transmitters located at the same site), this field shall contain a 'true'.";
+ }
+ description
+ "none";
+ }
+
+ grouping co-channel-profile-configuration {
+ leaf profile-name {
+ type string;
+ default "Name of profile not yet defined.";
+ description
+ "Identifier of the profile. Could be a name, could be a number. Free text field to be filled by the operator.";
+ }
+ leaf kind-of-co-channel-group {
+ type kind-of-co-channel-group-type;
+ default "KIND_OF_CO_CHANNEL_GROUP_TYPE_NOT_YET_DEFINED";
+ description
+ "Type of group (XPIC, MIMO, ALIC) of air interfaces with the same transmit and receive frequency.";
+ }
+ leaf-list logical-termination-point-list {
+ type leafref {
+ path "/core-model:control-construct/core-model:logical-termination-point/core-model:uuid";
+ require-instance false;
+ }
+ description
+ "List of AirInterfaces, which are part of the co-channel group. Referenced LTP must associate a LayerProtocol class with layerProtocolName attribute having LAYER_PROTOCOL_NAME_TYPE_AIR_LAYER as value.";
+ }
+ description
+ "none";
+ }
+
+ /****************************************
+ * typedef statements
+ **************************************/
+
+ typedef kind-of-co-channel-group-type {
+ type identityref {
+ base KIND_OF_CO_CHANNEL_GROUP_TYPE;
+ }
+ description
+ "none";
+ }
+
+ /*********************************************
+ * grouping statements for complex data types
+ *******************************************/
+
+ identity KIND_OF_CO_CHANNEL_GROUP_TYPE {
+ description
+ "none";
+ }
+
+ identity KIND_OF_CO_CHANNEL_GROUP_TYPE_XPIC {
+ base KIND_OF_CO_CHANNEL_GROUP_TYPE;
+ description
+ "Cross Polarization Interference Cancellation";
+ }
+
+ identity KIND_OF_CO_CHANNEL_GROUP_TYPE_MIMO {
+ base KIND_OF_CO_CHANNEL_GROUP_TYPE;
+ description
+ "Multiple Input Multiple Output";
+ }
+
+ identity KIND_OF_CO_CHANNEL_GROUP_TYPE_ALIC {
+ base KIND_OF_CO_CHANNEL_GROUP_TYPE;
+ description
+ "Adjacent Link Interference Cancellation";
+ }
+
+ identity KIND_OF_CO_CHANNEL_GROUP_TYPE_NOT_YET_DEFINED {
+ base KIND_OF_CO_CHANNEL_GROUP_TYPE;
+ description
+ "none";
+ }
+}
diff --git a/sdnr/wt/devicemanager-onap/onf14/provider/src/main/yang/core-model-1-4.yang b/sdnr/wt/devicemanager-onap/onf14/provider/src/main/yang/core-model-1-4.yang new file mode 100644 index 000000000..990ddd350 --- /dev/null +++ b/sdnr/wt/devicemanager-onap/onf14/provider/src/main/yang/core-model-1-4.yang @@ -0,0 +1,3133 @@ +module core-model-1-4 {
+ yang-version 1.1;
+ namespace "urn:onf:yang:core-model-1-4";
+ prefix core-model;
+
+ import ietf-yang-types {
+ prefix yang;
+ }
+
+ organization
+ "Open Networking Foundation (ONF)";
+ contact
+ "WG Web : https://wiki.opennetworking.org/pages/viewpage.action?pageId=262963204
+ WG List: <mailto:information-modeling@opennetworking.org>
+ Editor : Nigel Davis
+ Email : <mailto:ndavis@ciena.com>";
+ description
+ "This module contains a collection of YANG definitions for management and control of network fuctions.
+
+ Copyright 2019 Open Networking Foundation (ONF). All rights reserved.
+
+ Licensed under the Apache License, Version 2.0 (the 'License');
+ you may not use this file except in compliance with the License.
+ You may obtain a copy of the License at
+
+ http://www.apache.org/licenses/LICENSE-2.0
+
+ Unless required by applicable law or agreed to in writing, software
+ distributed under the License is distributed on an 'AS IS' BASIS,
+ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ See the License for the specific language governing permissions and
+ limitations under the License.";
+
+ revision 2019-11-27 {
+ description
+ "Package equipment-specification has been deleted,
+ because of wrong key statements and overall grouping never applied.
+ ";
+ }
+ revision 2019-11-22 {
+ description
+ "Module name and name space changed to core-model-1-4
+ ";
+ reference
+ "ONF-TR-512, RFC 6020 and RFC 6087";
+ }
+ revision 2019-07-09 {
+ description
+ "Corrected version derived from ONF-TR-512 v1.4
+ - Type of LayerProtocol/layerProtocolName simplfied to LayerProtocolNameType
+ - Type of Profile/profileName changed to ProfileNameType (same concept as for layerProtocolName
+ - FcSwitch added.
+ - remove references to UML model.";
+ reference
+ "ONF-TR-512, RFC 6020 and RFC 6087";
+ }
+ revision 2019-07-05 {
+ description
+ "Corrected version derived from ONF-TR-512 v1.4
+ - renaming of attribute lp to layer-protocol
+ - presence statement in root container according to RFC8407 4.10. Top-Level Data Definitions
+ - Feature names introduced";
+ reference
+ "ONF-TR-512, RFC 6020 and RFC 6087";
+ }
+ revision 2019-05-25 {
+ description
+ "Initial version derived from ONF-TR-512 v1.4
+ Please view https://github.com/OpenNetworkingFoundation/5G-xHaul/tree/experimental/models/tools for changes.
+ Additional information: Additional manual changes";
+ reference
+ "ONF-TR-512, RFC 6020 and RFC 6087";
+ }
+ revision 2019-05-05 {
+ description
+ "Initial version
+ Please view https://github.com/OpenNetworkingFoundation/5G-xHaul/tree/experimental/models/tools for changes.
+ Additional information: Initial version";
+ reference
+ "ONF-TR-512, RFC 6020 and RFC 6087";
+ }
+
+ /****************************************
+ * typedef statements
+ **************************************/
+
+ typedef port-role {
+ type string;
+ description
+ "The role of a port in the context of the function of the forwarding entity that it bounds.";
+ }
+
+ typedef port-direction {
+ type identityref {
+ base PORT_DIRECTION;
+ }
+ description
+ "The orientation of flow at the Port of a Forwarding entity.";
+ }
+
+ typedef forwarding-direction {
+ type identityref {
+ base FORWARDING_DIRECTION;
+ }
+ description
+ "The directionality of a Forwarding entity.";
+ }
+
+ typedef termination-direction {
+ type identityref {
+ base TERMINATION_DIRECTION;
+ }
+ description
+ "The directionality of a termination entity.";
+ }
+
+ typedef termination-state {
+ type identityref {
+ base TERMINATION_STATE;
+ }
+ description
+ "Provides support for the range of behaviors and specific states that an LP can take with respect to termination of the signal.
+ Indicates to what degree the LayerTermination is terminated.";
+ }
+
+ typedef layer-protocol-name-type {
+ type identityref {
+ base LAYER_PROTOCOL_NAME_TYPE;
+ }
+ description
+ "A controlled list of LayerProtocol names.";
+ }
+
+ typedef bit-string {
+ type string;
+ description
+ "This primitive type defines a bit oriented string.
+ The size of the BitString will be defined in the valueRange property of the attribute; according to ASN.1 (X.680).
+ The semantic of each bit position will be defined in the Documentation field of the attribute.";
+ }
+
+ typedef printable-string {
+ type string;
+ description
+ "A string that only includes printable characters.";
+ }
+
+ typedef universal-id {
+ type string;
+ description
+ "The universal ID value where the mechanism for generation is defined by some authority not directly referenced in the structure.
+ An example structure is [IETF RFC4122].";
+ }
+
+ typedef dt-address {
+ type string;
+ description
+ "A description of location via a hierarchy of narrowing contexts.";
+ }
+
+ typedef operational-state {
+ type identityref {
+ base OPERATIONAL_STATE;
+ }
+ description
+ "The operational state is used to indicate whether or not the resource is installed and working. ";
+ }
+
+ typedef administrative-state {
+ type identityref {
+ base ADMINISTRATIVE_STATE;
+ }
+ description
+ "The administrative state is used to show whether use of a resource is allowed or prohibited.
+ The administrative state can be observed and directly controlled by certain operational roles.
+ Typically, only a user (in the provider context) with administrative privileges is allowed to write the administrative state, any other users are restricted to read only.";
+ }
+
+ typedef administrative-control {
+ type identityref {
+ base ADMINISTRATIVE_CONTROL;
+ }
+ description
+ "Reflects the current control action when the entity is not in the desired state.";
+ }
+
+ typedef lifecycle-state {
+ type identityref {
+ base LIFECYCLE_STATE;
+ }
+ description
+ "This state is used to track the planned deployment, allocation to clients and withdrawal of resources.";
+ }
+
+ typedef forwarding-rule {
+ type identityref {
+ base FORWARDING_RULE;
+ }
+ description
+ "Rule that restricts the creation/deletion of an FC between points grouped by FD or related by the Link between FDs.";
+ }
+
+ typedef rule-type {
+ type identityref {
+ base RULE_TYPE;
+ }
+ description
+ "Indicates the focus of the rule.";
+ }
+
+ typedef port-role-rule-option {
+ type identityref {
+ base PORT_ROLE_RULE_OPTION;
+ }
+ description
+ "Indicates how to interpret the PortRole list.";
+ }
+
+ typedef signal-property-value-rule {
+ type identityref {
+ base SIGNAL_PROPERTY_VALUE_RULE;
+ }
+ description
+ "none";
+ }
+
+ typedef metaclass-class-name {
+ type string;
+ description
+ "none";
+ }
+
+ typedef profile-name-type {
+ type identityref {
+ base PROFILE_NAME_TYPE;
+ }
+ description
+ "A controlled list of Profile names.";
+ }
+
+ /*********************************************
+ * grouping statements for complex data types
+ *******************************************/
+
+ identity PORT_DIRECTION {
+ description
+ "none";
+ }
+
+ identity PORT_DIRECTION_BIDIRECTIONAL {
+ base PORT_DIRECTION;
+ description
+ "The Port has both an INPUT flow and an OUTPUT flow defined.";
+ }
+
+ identity PORT_DIRECTION_INPUT {
+ base PORT_DIRECTION;
+ description
+ "The Port only has definition for a flow into the Forwarding entity (i.e. an ingress flow).";
+ }
+
+ identity PORT_DIRECTION_OUTPUT {
+ base PORT_DIRECTION;
+ description
+ "The Port only has definition for a flow out of the Forwarding entity (i.e. an egress flow).";
+ }
+
+ identity PORT_DIRECTION_UNIDENTIFIED_OR_UNKNOWN {
+ base PORT_DIRECTION;
+ description
+ "Not a normal state. The system is unable to determine the correct value.";
+ }
+
+ identity PORT_DIRECTION_OMNIDIRECTIONAL {
+ base PORT_DIRECTION;
+ description
+ "none";
+ }
+
+ identity FORWARDING_DIRECTION {
+ description
+ "none";
+ }
+
+ identity FORWARDING_DIRECTION_BIDIRECTIONAL {
+ base FORWARDING_DIRECTION;
+ description
+ "The Forwarding entity supports both BIDIRECTIONAL flows at all Ports (i.e. all Ports have both an INPUT flow and an OUTPUT flow defined).";
+ }
+
+ identity FORWARDING_DIRECTION_UNIDIRECTIONAL {
+ base FORWARDING_DIRECTION;
+ description
+ "The Forwarding entity has Ports that are either INPUT or OUTPUT. It has no BIDIRECTIONAL Ports.";
+ }
+
+ identity FORWARDING_DIRECTION_UNDEFINED_OR_UNKNOWN {
+ base FORWARDING_DIRECTION;
+ description
+ "Not a normal state. The system is unable to determine the correct value.";
+ }
+
+ identity FORWARDING_DIRECTION_OMNIDIRECTIONAL {
+ base FORWARDING_DIRECTION;
+ description
+ "none";
+ }
+
+ identity TERMINATION_DIRECTION {
+ description
+ "none";
+ }
+
+ identity TERMINATION_DIRECTION_BIDIRECTIONAL {
+ base TERMINATION_DIRECTION;
+ description
+ "A Termination with both SINK and SOURCE flows.";
+ }
+
+ identity TERMINATION_DIRECTION_SINK {
+ base TERMINATION_DIRECTION;
+ description
+ "The flow is up the layer stack from the server side to the client side.
+ Considering an example of a Termination function within the termination entity, a SINK flow:
+ - will arrive at the base of the termination function (the server side) where it is essentially at an INPUT to the termination component
+ - then will be decoded and deconstructed
+ - then relevant parts of the flow will be sent out of the termination function (the client side) where it is essentially at an OUTPUT from the termination component
+ A SINK termination is one that only supports a SINK flow.
+ A SINK termination can be bound to an OUTPUT Port of a Forwarding entity";
+ }
+
+ identity TERMINATION_DIRECTION_SOURCE {
+ base TERMINATION_DIRECTION;
+ description
+ "The flow is down the layer stack from the server side to the client side.
+ Considering an example of a Termination function within the termination entity, a SOURCE flow:
+ - will arrive at the top of the termination function (the client side) where it is essentially at an INPUT to the termination component
+ - then will be assembled with various overheads etc. and will be coded
+ - then coded form of the assembly of flow will be sent out of the termination function (the server side) where it is essentially at an OUTPUT from the termination component
+ A SOURCE termination is one that only supports a SOURCE flow.
+ A SOURCE termination can be bound to an INPUT Port of a Forwarding entity";
+ }
+
+ identity TERMINATION_DIRECTION_UNDEFINED_OR_UNKNOWN {
+ base TERMINATION_DIRECTION;
+ description
+ "Not a normal state. The system is unable to determine the correct value.";
+ }
+
+ identity TERMINATION_STATE {
+ description
+ "none";
+ }
+
+ identity TERMINATION_STATE_LP_CAN_NEVER_TERMINATE {
+ base TERMINATION_STATE;
+ description
+ "A non-flexible case that can never be terminated.";
+ }
+
+ identity TERMINATION_STATE_LP_NOT_TERMINATED {
+ base TERMINATION_STATE;
+ description
+ "A flexible termination that can terminate but is currently not terminated.";
+ }
+
+ identity TERMINATION_STATE_TERMINATED_SERVER_TO_CLIENT_FLOW {
+ base TERMINATION_STATE;
+ description
+ "A flexible termination that is currently terminated for server to client flow only.";
+ }
+
+ identity TERMINATION_STATE_TERMINATED_CLIENT_TO_SERVER_FLOW {
+ base TERMINATION_STATE;
+ description
+ "A flexible termination that is currently terminated for client to server flow only.";
+ }
+
+ identity TERMINATION_STATE_TERMINATED_BIDIRECTIONAL {
+ base TERMINATION_STATE;
+ description
+ "A flexible termination that is currently terminated in both directions of flow.";
+ }
+
+ identity TERMINATION_STATE_LP_PERMENANTLY_TERMINATED {
+ base TERMINATION_STATE;
+ description
+ "A non-flexible termination that is always terminated (in both directions of flow for a bidirectional case and in the one direction of flow for both unidirectional cases).";
+ }
+
+ identity TERMINATION_STATE_TERMINATION_STATE_UNKNOWN {
+ base TERMINATION_STATE;
+ description
+ "There TerminationState cannot be determined.";
+ }
+
+ identity PROTECTION_REASON {
+ description
+ "none";
+ }
+
+ identity PROTECTION_REASON_WAIT_TO_REVERT {
+ base PROTECTION_REASON;
+ description
+ "The resource is selected as control is waiting to restore to a preferred resource.";
+ }
+
+ identity PROTECTION_REASON_SIGNAL_DEGRADE {
+ base PROTECTION_REASON;
+ description
+ "The resource is selected as the best preferred resource is in signal degrade.";
+ }
+
+ identity PROTECTION_REASON_SIGNAL_FAIL {
+ base PROTECTION_REASON;
+ description
+ "The resource is selected as the best preferred resource is in signal fail.";
+ }
+
+ identity ROUTE_SELECTION_CONTROL {
+ description
+ "none";
+ }
+
+ identity ROUTE_SELECTION_CONTROL_LOCK_OUT {
+ base ROUTE_SELECTION_CONTROL;
+ description
+ "The resource is configured to temporarily not be available for use in the protection scheme(s) it is part of.
+ This overrides all other protection control states including forced.
+ If the item is locked out, then it cannot be used under any circumstances.
+ Note: Only relevant when part of a protection scheme.
+ Note: if a protection process that has a relationship to the item (i.e. is one of the options the protection process may choose) is deactivated by being isFrozen = true) then the lockout request will be rejected. ";
+ }
+
+ identity ROUTE_SELECTION_REASON {
+ description
+ "none";
+ }
+
+ identity ROUTE_SELECTION_REASON_NONE {
+ base ROUTE_SELECTION_REASON;
+ description
+ "No reason";
+ }
+
+ identity SWITCH_CONTROL {
+ description
+ "none";
+ }
+
+ identity SWITCH_CONTROL_NORMAL {
+ base SWITCH_CONTROL;
+ description
+ "No administrative control applied to the switch.";
+ }
+
+ identity SWITCH_CONTROL_MANUAL {
+ base SWITCH_CONTROL;
+ description
+ "Resource temporarily chosen by control configuration where the resource is not the preferred resource.
+ Preferred resource has highest priority.
+ Temporarily overrides reversion.
+ If this resource fails, it will switch to best available resource.
+ If resource selected is shared and another FC requires the resource, then the selection control will change to Normal and switch to best available based upon normal rules.
+ Cannot manually switch a Forced switch, cannot remove a forced switch, cannot switch to a locked out item and will be rejected if the protection process is deactivated by being Freeze = true).
+ A manual switch/route that is selecting an FcPort, LTP, FC, Link or Route that is subsequently set to LOCK_OUT will have the manual removed (changed to NORMAL) and will switch away from the FcPort with LOCK_OUT to best available based upon normal rules.
+ A manual switch that is selecting an FcPort that is subsequently selected by a Forced switch will be restored to normal operation and the manual will be removed.
+ A manual switch/route that is selecting an FcPort, LTP, FC, Link or Route that is subsequently manual selected by another switch/route will have the manual removed and will switch away from the FcPort.
+ Can be returned to NORMAL by configuration action.";
+ }
+
+ identity SWITCH_CONTROL_FORCED {
+ base SWITCH_CONTROL;
+ description
+ "Resource temporarily chosen by control configuration where the resource is not the preferred resource.
+ Preferred resource has highest priority.
+ Temporarily overrides reversion.
+ If this resource fails it will NOT switch.
+ If resource selected is shared and another FC requires the resource through a FORCE on that FC and the FC is of a higher FcPriority then the selection control on this FC will change to NORMAL and switch to best available based upon normal rules.
+ If the resource selected is then set to LOCK_OUT then the selection control will change to NORMAL and switch to best available based upon normal rules.
+ Can be returned to NORMAL by configuration action.";
+ }
+
+ identity SWITCH_STATE_REASON {
+ description
+ "none";
+ }
+
+ identity SWITCH_STATE_REASON_NONE {
+ base SWITCH_STATE_REASON;
+ description
+ "No reason";
+ }
+
+ identity REVERSION_MODE {
+ description
+ "none";
+ }
+
+ identity REVERSION_MODE_REVERTIVE {
+ base REVERSION_MODE;
+ description
+ "An FC switched to a lower priority (non-preferred) resource will revert to a higher priority (preferred) resource when that recovers (potentially after some hold-off time).";
+ }
+
+ identity REVERSION_MODE_NON-REVERTIVE {
+ base REVERSION_MODE;
+ description
+ "An FC switched to a lower priority (non-preferred) resource will not revert to a higher priority (preferred) resource when that recovers.";
+ }
+
+ identity RESILIENCE_CONTROL {
+ description
+ "none";
+ }
+
+ identity RESILIENCE_CONTROL_QUIESCENT {
+ base RESILIENCE_CONTROL;
+ description
+ "none";
+ }
+
+ identity RESILIENCE_CONTROL_RESTORING {
+ base RESILIENCE_CONTROL;
+ description
+ "none";
+ }
+
+ identity RESILIENCE_CONTROL_RECOVERY_FAILED {
+ base RESILIENCE_CONTROL;
+ description
+ "none";
+ }
+
+ identity RESILIENCE_CONTROL_UNKNOWN {
+ base RESILIENCE_CONTROL;
+ description
+ "none";
+ }
+
+ identity RUN_MODE {
+ description
+ "none";
+ }
+
+ identity RUN_MODE_FREE_RUN {
+ base RUN_MODE;
+ description
+ "The clock is not synchronized to another clock.";
+ }
+
+ identity RUN_MODE_LOCKED {
+ base RUN_MODE;
+ description
+ "The clock is synchronized to another clock.";
+ }
+
+ identity RUN_MODE_HOLD_OVER {
+ base RUN_MODE;
+ description
+ "The clock was previously synchronized to another clock but that timing input has been lost.
+ The clock is set to the last known synchronization.";
+ }
+
+ identity LAYER_PROTOCOL_NAME_TYPE {
+ description
+ "none";
+ }
+
+ identity LAYER_PROTOCOL_NAME_TYPE_PHOTONIC_MEDIA {
+ base LAYER_PROTOCOL_NAME_TYPE;
+ description
+ "The characteristic information is that of a channel able to carry photons and of the photon source/sink.";
+ }
+
+ identity LAYER_PROTOCOL_NAME_TYPE_OTU_AND_ODU {
+ base LAYER_PROTOCOL_NAME_TYPE;
+ description
+ "The characteristic information is that of a channel able to carry ODU/OTU protocol (OTN) and of the ODU/OTU source/sink.";
+ }
+
+ identity LAYER_PROTOCOL_NAME_TYPE_ETHERNET {
+ base LAYER_PROTOCOL_NAME_TYPE;
+ description
+ "The characteristic information is that of a channel able to carry Ethernet protocol and of the Ethernet protocol source/sink.";
+ }
+
+ identity OPERATIONAL_STATE {
+ description
+ "none";
+ }
+
+ identity OPERATIONAL_STATE_DISABLED {
+ base OPERATIONAL_STATE;
+ description
+ "The resource is unable to meet the SLA of the user of the resource.
+ If no (explicit) SLA is defined the resource is disabled if it is totally inoperable and unable to provide service to the user.";
+ }
+
+ identity OPERATIONAL_STATE_ENABLED {
+ base OPERATIONAL_STATE;
+ description
+ "The resource is partially or fully operable and available for use.";
+ }
+
+ identity ADMINISTRATIVE_STATE {
+ description
+ "none";
+ }
+
+ identity ADMINISTRATIVE_STATE_LOCKED {
+ base ADMINISTRATIVE_STATE;
+ description
+ "Users are administratively prohibited from making use of the resource.";
+ }
+
+ identity ADMINISTRATIVE_STATE_UNLOCKED {
+ base ADMINISTRATIVE_STATE;
+ description
+ "Users are allowed to use the resource.";
+ }
+
+ identity ADMINISTRATIVE_STATE_SHUTTING_DOWN {
+ base ADMINISTRATIVE_STATE;
+ description
+ "The entity is administratively restricted to existing instances of use only. There may be specific actions to remove existing uses. No new instances of use can be enabled.
+ The resource automatically transitions to “locked” when the last user quits.
+ The administrative state is not visible in the client context.
+ The lifecycle state “pending removal” should be used to indicate to the client that the provider intends to remove the resource.";
+ }
+
+ identity ADMINISTRATIVE_CONTROL {
+ description
+ "none";
+ }
+
+ identity ADMINISTRATIVE_CONTROL_UNLOCK {
+ base ADMINISTRATIVE_CONTROL;
+ description
+ "The intention is for the entity to become unlocked.
+ The entity may already be UNLOCKED.";
+ }
+
+ identity ADMINISTRATIVE_CONTROL_LOCK_PASSIVE {
+ base ADMINISTRATIVE_CONTROL;
+ description
+ "The intention is for the entity to become locked but no effort is expected to move to the Locked state (the state will be achieved once all users stop using the resource).
+ The entity may be LOCKED.";
+ }
+
+ identity ADMINISTRATIVE_CONTROL_LOCK_ACTIVE {
+ base ADMINISTRATIVE_CONTROL;
+ description
+ "The intention is for the entity to become locked and it is expected that effort will be made to move to the Locked state (users will be actively removed).
+ The entity may already be LOCKED.";
+ }
+
+ identity ADMINISTRATIVE_CONTROL_LOCK_IMMEDIATE {
+ base ADMINISTRATIVE_CONTROL;
+ description
+ "The intention is for the entity to become locked and it is expected to move to the Locked state immediately (users will be force removed).
+ The entity may already be LOCKED.";
+ }
+
+ identity ADMINISTRATIVE_CONTROL_QUIESCENT {
+ base ADMINISTRATIVE_CONTROL;
+ description
+ "The administrative state is at a stable value (LOCKED/UNLOCKED) and no action is being taken.";
+ }
+
+ identity LIFECYCLE_STATE {
+ description
+ "none";
+ }
+
+ identity LIFECYCLE_STATE_PLANNED {
+ base LIFECYCLE_STATE;
+ description
+ "The resource is planned but is not present in the network.
+ Should include a 'time' when the resources are expected to be installed.";
+ }
+
+ identity LIFECYCLE_STATE_POTENTIAL_AVAILABLE {
+ base LIFECYCLE_STATE;
+ description
+ "The supporting resources are present in the network but are shared with other clients; or require further configuration before they can be used; or both.
+ (1) When a potential resource is configured and allocated to a client it is moved to the INSTALLED state for that client.
+ (2) If the potential resource has been consumed (e.g. allocated to another client) it is moved to the POTENTIAL BUSY state for all other clients.";
+ }
+
+ identity LIFECYCLE_STATE_POTENTIAL_BUSY {
+ base LIFECYCLE_STATE;
+ description
+ "The supporting resources are present in the network but have been allocated to other clients.";
+ }
+
+ identity LIFECYCLE_STATE_INSTALLED {
+ base LIFECYCLE_STATE;
+ description
+ "The resource is present in the network and is capable of providing the service.";
+ }
+
+ identity LIFECYCLE_STATE_PENDING_REMOVAL {
+ base LIFECYCLE_STATE;
+ description
+ "The resource has been marked for removal. Should include a “time” when the resources are expected to be removed.";
+ }
+
+ identity FORWARDING_RULE {
+ description
+ "none";
+ }
+
+ identity FORWARDING_RULE_CANNOT_FORWARD_ACROSS_FD_LINK {
+ base FORWARDING_RULE;
+ description
+ "LTPs referenced by the FD (or indirectly by the Link between FDs) cannot have FCs created between them.
+ This rule overrides all others.";
+ }
+
+ identity FORWARDING_RULE_MUST_FORWARD_ACROSS_FD_LINK {
+ base FORWARDING_RULE;
+ description
+ "LTPs referenced by the FD (or indirectly by the Link between FDs) MUST have FCs created between them.
+ This rule overrides all others except the CANNOT_FORWARD rule.";
+ }
+
+ identity FORWARDING_RULE_MAY_FORWARD_ACROSS_FD_LINK {
+ base FORWARDING_RULE;
+ description
+ "LTPs referenced by the FD (or indirectly by the Link between FDs) may have FCs created between them.
+ FCs may not be created between points that are not related by this rule either directly in an FD or indirectly via a Link linking two or more FDs.
+ For a Link points in an FD at one end of the Link can be connected to points in an FD at an other end of the Link.";
+ }
+
+ identity FORWARDING_RULE_NULL_FORWARDING_RULE {
+ base FORWARDING_RULE;
+ description
+ "none";
+ }
+
+ identity RULE_TYPE {
+ description
+ "none";
+ }
+
+ identity RULE_TYPE_FORWARDING {
+ base RULE_TYPE;
+ description
+ "The rule relates to creation of FCs.";
+ }
+
+ identity RULE_TYPE_COST {
+ base RULE_TYPE;
+ description
+ "The rule relates to forwarding cost.";
+ }
+
+ identity RULE_TYPE_RISK {
+ base RULE_TYPE;
+ description
+ "The rule relates to forwarding risk.";
+ }
+
+ identity RULE_TYPE_CAPACITY {
+ base RULE_TYPE;
+ description
+ "none";
+ }
+
+ identity PORT_ROLE_RULE_OPTION {
+ description
+ "none";
+ }
+
+ identity PORT_ROLE_RULE_OPTION_SAME_ROLE {
+ base PORT_ROLE_RULE_OPTION;
+ description
+ "The ports to which the rule applies must have role from the list in PortRole.";
+ }
+
+ identity PORT_ROLE_RULE_OPTION_DIFFERENT_ROLE {
+ base PORT_ROLE_RULE_OPTION;
+ description
+ "The ports to which the rule applies must not have a role from the list in PortRole.";
+ }
+
+ identity PORT_ROLE_RULE_OPTION_ANY_ROLE {
+ base PORT_ROLE_RULE_OPTION;
+ description
+ "The rule applies to any role of port.";
+ }
+
+ identity SIGNAL_PROPERTY_VALUE_RULE {
+ description
+ "none";
+ }
+
+ identity SIGNAL_PROPERTY_VALUE_RULE_SAME_VALUE {
+ base SIGNAL_PROPERTY_VALUE_RULE;
+ description
+ "none";
+ }
+
+ identity SIGNAL_PROPERTY_VALUE_RULE_ANY_VALUE {
+ base SIGNAL_PROPERTY_VALUE_RULE;
+ description
+ "none";
+ }
+
+ identity PROFILE_NAME_TYPE {
+ description
+ "none";
+ }
+
+ identity PROFILE_NAME_TYPE_USER_PROFILE {
+ base PROFILE_NAME_TYPE;
+ description
+ "none";
+ }
+
+ identity CONNECTOR_AND_PIN_ORIENTATION {
+ description
+ "none";
+ }
+
+ identity CONNECTOR_AND_PIN_ORIENTATION_MALE {
+ base CONNECTOR_AND_PIN_ORIENTATION;
+ description
+ "The connecting elements are dominantly protrusions.";
+ }
+
+ identity CONNECTOR_AND_PIN_ORIENTATION_FEMALE {
+ base CONNECTOR_AND_PIN_ORIENTATION;
+ description
+ "The connecting elements are dominantly indentations.";
+ }
+
+ identity CONNECTOR_AND_PIN_ORIENTATION_SYMMETRIC_NEUTRAL {
+ base CONNECTOR_AND_PIN_ORIENTATION;
+ description
+ "The pin (and housing) orientation combination is such that it is symmetric so a connector is compatible with itself.
+ The connecting element may be a surface rather than protrusions or indentations.";
+ }
+
+ identity EQUIPMENT_CATEGORY {
+ description
+ "none";
+ }
+
+ identity EQUIPMENT_CATEGORY_SUBRACK {
+ base EQUIPMENT_CATEGORY;
+ description
+ "An assembly with holders designed to accommodate CIRCUIT_PACKs.
+ The assembly is designed to be mounted in a RACK.";
+ }
+
+ identity EQUIPMENT_CATEGORY_CIRCUIT_PACK {
+ base EQUIPMENT_CATEGORY;
+ description
+ "An assembly with connectors compatible with those in a holder.
+ The assembly is designed to be mounted in a holder (SLOT) of a SUBRACK.
+ May also support holders (SLOTs) for SMALL_FORMFACTOR_PLUGGABLEs.";
+ }
+
+ identity EQUIPMENT_CATEGORY_SMALL_FORMFACTOR_PLUGGABLE {
+ base EQUIPMENT_CATEGORY;
+ description
+ "A small assembly (compared to a CIRCUIT_PACK) with connectors compatible with those in a holder.
+ The assembly is designed to be mounted in a holder (SLOT) of a CIRCUIT_PACK or STAND_ALONE_UNIT.";
+ }
+
+ identity EQUIPMENT_CATEGORY_STAND_ALONE_UNIT {
+ base EQUIPMENT_CATEGORY;
+ description
+ "An assembly with connectors for cabling and potentially with holders.
+ The assembly is designed to be mounted in a freeform environment (on a table or simple mechanical cabinet).
+ May support holders (SLOTs) for CIRCUIT_PACKs or for SMALL_FORMFACTOR_PLUGGABLEs.";
+ }
+
+ identity EQUIPMENT_CATEGORY_RACK {
+ base EQUIPMENT_CATEGORY;
+ description
+ "A mechanical assembly with cabling and predefined mounting points for particular SUBRACK types.
+ The assembly is designed to be mounted on the floor in a row with other RACKs.";
+ }
+
+ identity HOLDER_CATEGORY {
+ description
+ "none";
+ }
+
+ identity HOLDER_CATEGORY_SLOT {
+ base HOLDER_CATEGORY;
+ description
+ "A guided holder with fixed connectors.
+ The guided holder is designed to take a particular form of CIRCUIT_PACK or SMALL_FORMFACTOR_PLUGGABLE";
+ }
+
+ /****************************************
+ * package resilience
+ **************************************/
+
+ typedef protection-reason {
+ type identityref {
+ base PROTECTION_REASON;
+ }
+ description
+ "The cause of the current protection state.";
+ }
+
+ typedef route-selection-control {
+ type identityref {
+ base ROUTE_SELECTION_CONTROL;
+ }
+ description
+ "Possible degrees of administrative control applied to the Route selection.";
+ }
+
+ typedef route-selection-reason {
+ type identityref {
+ base ROUTE_SELECTION_REASON;
+ }
+ description
+ "The cause of the current route selection.";
+ }
+
+ typedef switch-control {
+ type identityref {
+ base SWITCH_CONTROL;
+ }
+ description
+ "none";
+ }
+
+ typedef switch-state-reason {
+ type identityref {
+ base SWITCH_STATE_REASON;
+ }
+ description
+ "Explains the reason for the current switch state.";
+ }
+
+ typedef reversion-mode {
+ type identityref {
+ base REVERSION_MODE;
+ }
+ description
+ "The reversion mode associated with protection.";
+ }
+
+ typedef protection-type {
+ type string;
+ description
+ "Identifies the type of protection of an FcSwitch.";
+ }
+
+ typedef resilience-control {
+ type identityref {
+ base RESILIENCE_CONTROL;
+ }
+ description
+ "none";
+ }
+
+ /****************************************
+ * package timing
+ **************************************/
+
+ typedef run-mode {
+ type identityref {
+ base RUN_MODE;
+ }
+ description
+ "none";
+ }
+
+ grouping layer-protocol-name-and-qualifier {
+ leaf layer-protocol-qualifier {
+ type string;
+ description
+ "Qualifies the use of the LayerProtocol where the same LayerProtocol may be used recursively such that each recursion has the same characteristic information in the main traffic path but where there is some distinction in some other aspect.
+ An example of use is in the case of the PHOTONIC_MEDIA LayerProtocol. All photonic media is of the same characteristic in the main traffic path, just a channel that enables the flow of photons, but may differ in overhead and with respect to level of nesting.
+ For the PHOTONIC_MEDIA, qualifiers may include OMS (Optical Multiplex Section), OTS (Optical Transmission Section) and NMCA (Network Media Channel Assembly).";
+ }
+ leaf layer-protocol-name {
+ type layer-protocol-name-type;
+ description
+ "The name of the LayerProtocol chosen from a controlled list.
+ LayerProtocol names include:
+ - PHOTONIC_MEDIA
+ - ODU
+ - ETHERNET";
+ }
+ description
+ "Provides a controlled list of layer protocol names and indicates the naming authority.
+ Note that it is expected that attributes will be added to this structure to convey the naming authority name, the name of the layer protocol using a human readable string and any particular standard reference.
+ Layer protocol names include:
+ - Layer 1 (L1): OTU, ODU
+ - Layer 2 (L2): Carrier Grade Ethernet (ETY, ETH), MPLS-TP (MT)
+ ";
+ }
+
+ grouping name-and-value {
+ leaf value-name {
+ type string;
+ description
+ "The name of the value. The value need not have a name.";
+ }
+ leaf value {
+ type string;
+ description
+ "The value.";
+ }
+ description
+ "A scoped name-value pair.";
+ }
+
+ grouping local-id-and-class {
+ leaf class-of-instance {
+ type string;
+ description
+ "The class to which the name refers.";
+ }
+ leaf local-id {
+ type string;
+ description
+ "The localId of the entity.";
+ }
+ description
+ "The localId and the class of entity that it identifies.";
+ }
+
+ grouping port-role-rule {
+ leaf-list port-role {
+ type port-role;
+ description
+ "The role of the port considered.";
+ }
+ leaf-list port-role-rule {
+ type port-role-rule-option;
+ description
+ "none";
+ }
+ description
+ "Constrains which ports the rule applies to.";
+ }
+
+ grouping signal-property-rule {
+ leaf signal-property-name {
+ type string;
+ description
+ "The name of the signal property to which the rule applies.";
+ }
+ leaf signal-property-value-rule {
+ type signal-property-value-rule;
+ description
+ "Indicates whether signal properties should be accounted for or not.";
+ }
+ description
+ "none";
+ }
+
+ grouping metaclass-class {
+ leaf name {
+ type metaclass-class-name;
+ description
+ "The text name of the Class";
+ }
+ description
+ "This datatype represents the '<<Metaclass>> Class' from the UML metamodel.
+ An instance of the referencing Class (e.g. LTP) will reference a Class (not an instance).
+ This referenced Class will provide definition to extend the referencing instance.
+ So, for example, an LTP instance will have the attributes defined in the LTP class and also the attributes defined in the referenced Class (an LtpSpec).
+ The referenced Class may:
+ (1) provide invariant properties (that are the same for many instances) that then are not conveyed with the referencing instance.
+ (2) provide definitions for attributes that are present in the instance that are not defined in the Class of the instance (these attribute may have been pruned and refactored from one or more external definition sources).
+ (3) apply constraints to attributes in the instance that were defined in the class of the referencing instance.
+ (4) replace attributes that were present in the class of the referencing instance by a new definition (same name).;
+ ";
+ }
+
+ grouping external-managed-universal-id {
+ leaf manager-identifier {
+ type string;
+ description
+ "none";
+ }
+ leaf external-managed-uuid {
+ type string;
+ description
+ "none";
+ }
+ description
+ "none";
+ }
+
+ /****************************************
+ * package core-network-model
+ **************************************/
+ /****************************************
+ * grouping statements for object classes
+ **************************************/
+ /****************************************
+ * package resilience
+ **************************************/
+
+ grouping control-parameters-pac {
+ leaf reversion-mode {
+ type reversion-mode;
+ description
+ "Indicates whether the protection scheme is revertive or non-revertive.";
+ }
+ leaf wait-to-revert-time {
+ type int64;
+ default "15";
+ description
+ "If the protection system is revertive, this attribute specifies the time, in minutes, to wait after a fault clears on a higher priority (preferred) resource before switching to the preferred resource.
+ If a further fault occurs on the preferred resource in the waitToRevertTime then the reversion attempt is cancelled.
+ The WTR timer is overridden by the needs of a higher priority signal. Depending upon which resource is requested this may simply cancel the attempt to revert of may cause immediate reversion.";
+ }
+ leaf prot-type {
+ type protection-type;
+ description
+ "Indicates the protection scheme that is used for the ProtectionGroup.";
+ }
+ leaf hold-off-time {
+ type int64;
+ description
+ "This attribute indicates the time, in milliseconds, between declaration of a switch trigger condition (e.g. signal degrade or signal fail), and the initialization of the protection switching algorithm.";
+ }
+ leaf network-scheme-specification {
+ type string;
+ description
+ "none";
+ }
+ description
+ "A list of control parameters to apply to a switch.";
+ }
+
+ grouping fc-switch {
+ leaf hold-off-time {
+ type int64;
+ description
+ "Moved to ControlParameter_Pac. This attribute indicates the time, in seconds, between declaration of unacceptable quality of signal on the currently selected FcPort, and the initialization of the protection switching algorithm. ";
+ }
+ leaf prot-type {
+ type protection-type;
+ description
+ "Indicates the protection scheme that is used for the ProtectionGroup.";
+ }
+ leaf reversion-mode {
+ type reversion-mode;
+ description
+ "Moved to ControlParameter_Pac. This attribute whether or not the protection scheme is revertive or non-revertive. ";
+ }
+ list selected-fc-port {
+ key "local-id";
+ uses fc-port;
+ description
+ "Indicates which points are selected by the switch.
+ Depending on the switch spec (via FcSpec)
+ - more than one FcPort can be selected at any one time (e.g. egress switch, ingress packet switch)
+ - zero FcPorts can be selected. For an ingress switch this indicates that the switch common (egress) is 'high impedance'
+ .";
+ }
+ leaf-list profile-proxy {
+ type string;
+ description
+ "Provides a set of predefined values for switch control in place of the direct values available via the FcSwitch or via _configurationAndSwitchControl.";
+ }
+ leaf configuration-and-switch-control {
+ type string;
+ description
+ "A ConfigurationAndSwitchController that is external to the switch (it is coordinating many switches and hence cannot be encapsulated in the FcSwitch.";
+ }
+ leaf internal-configuration-and-switch-control {
+ type string;
+ description
+ "A ConfigurationAndSwitchController encapsulated in the FcSwitch that controls the FcSwitch alone.";
+ }
+ leaf switch-control {
+ type switch-control;
+ description
+ "Degree of administrative control applied to the switch selection.";
+ }
+ leaf switch-selects-ports {
+ type port-direction;
+ description
+ "Indicates whether the switch selects from ingress to the FC or to egress of the FC, or both.";
+ }
+ leaf switch-selection-reason {
+ type switch-state-reason;
+ config false;
+ description
+ "The reason for the current switch selection.";
+ }
+ container control-parameters {
+ uses control-parameters-pac;
+ description
+ "none";
+ }
+ leaf wait-to-restore-time {
+ type int64;
+ description
+ "Moved to ControlParameter_Pac and changed to waitToRevert. If the protection system is revertive, this attribute specifies the amount of time, in seconds, to wait after the preferred FcPort returns to an acceptable state of operation (e.g. a fault has cleared) before restoring traffic to that preferred FcPort.";
+ }
+ uses local-class;
+ description
+ "The FcSwitch class models the switched forwarding of traffic (traffic flow) between FcPorts and is present where there is protection functionality in the FC.
+ If an FC exposes protection (having two or more FcPorts that provide alternative identical inputs/outputs), the FC will have one or more associated FcSwitch objects to represent the alternative flow choices visible at the edge of the FC.
+ The FC switch represents and defines a protection switch structure encapsulated in the FC and essentially 'decorates' FCs that are involved in resilience schemes that use switching in a protection mechanism.
+ Essentially FcSwitch performs one of the functions of the Protection Group in a traditional model. It associates 2 or more FcPorts each playing the role of a Protection Unit.
+ One or more protection, i.e. standby/backup, FcPorts provide protection for one or more working (i.e. regular/main/preferred) FcPorts where either protection or working can feed one or more protected FcPort.
+ The switch may be used in revertive or non-revertive (symmetric) mode. When in revertive mode it may define a waitToRestore time.
+ It may be used in one of several modes including source switched, destination switched, source and destination switched etc. (covering cases such as 1+1 and 1:1).
+ It may be locked out (prevented from switching), force switched or manual switched.
+ It will indicate switch state and change of state.
+ The switch can be switched away from all sources such that it becomes open and hence two coordinated switches can both feed the same LTP so long as at least one of the two is switched away from all sources (is 'open').
+ The ability for a Switch to be 'high impedance' allows bidirectional ForwardingConstructs to be overlaid on the same bidirectional LTP where the appropriate control is enabled to prevent signal conflict.
+ This ability allows multiple alternate routes to be present that otherwise would be in conflict.";
+ }
+
+ grouping casc-port {
+ leaf port-role {
+ type string;
+ description
+ "The role of the port of a C&SC.
+ The interpretation of the role is provided by the C&SC spec.
+ The C&SC spec will set out the role in the context of C&SC functions.
+ The role will indicate how the port relates to the associated entity, e.g. is conveying messages.";
+ }
+ container port-role-properties {
+ uses casc-port-role-properties;
+ description
+ "A link to properties associated with the port role as defined by the CascSpec.";
+ }
+ list logical-termination-point {
+ key "uuid";
+ uses logical-termination-point;
+ description
+ "The LTP that conveys the messages related to the port and/or is subject to control action and/or provides indications of state etc.
+ For direct association, there may be up to 2 LTPs (to account for directionality differences).
+ In the specification representation, there may be a number rules that provide further LTP relationships that are implicit in the instantiated model.";
+ }
+ leaf encapsulating-casc-port {
+ type leafref {
+ path "/core-model:casc-port/core-model:uuid";
+ }
+ description
+ "In a case where there is nested C&SC the ports are also nested and this references the superior port.";
+ }
+ leaf is-related-control-flow-disabled {
+ type boolean;
+ default "true";
+ description
+ "If TRUE, then any Control signal flow related to this controller (to, from or drop-and-continue) is prevented from passing through the related LTP carrying the signaling for this controller.
+ This can be considered as being realized using an FcSwitch in an FC embedded in the LP at the layer of signaling to disconnect the FcPort bidirectionally.
+ This FcSwitch should be represented in the LTP spec.
+ Note that the FcSwitch will be at the granularity of the relevant control signal and other flows may be passed uninterrupted.";
+ }
+ leaf is-controlled-fc-port-disabled {
+ type boolean;
+ description
+ "If TRUE, then the related FcPort on the FC is disabled and hence signal will not flow through that FcPort.
+ This is realized using an FcSwitch to disconnect the FcPort bidirectionally.
+ Note that as the controller may control many FCs and may switch them all together as one, in an implementation the FcSwitch could be omitted from the FC instance model.
+ Any omission should be explained by the FcSpec.
+ This is equivalent to a blocked indication on the LTP used in other representations.";
+ }
+ leaf is-protection-lock-out {
+ type boolean;
+ description
+ "The resource is configured to temporarily not be available for use in the protection scheme(s) it is part of.
+ This overrides all other protection control states including forced.
+ If the item is locked out, then it cannot be used under any circumstances.
+ This causes isRelatedControlFlowDisabled to become TRUE and isControlledFcPortDisabled to become TRUE.";
+ }
+ uses global-class;
+ description
+ "A port of a C&SC that can be used where there is significant asymmetry to be represented.
+ This can represent any combination of:
+ - the conveying of messaging to/from the C&SC
+ - the conveying of control action
+ - the providing of indications of state etc.";
+ }
+
+ grouping casc-port-role-properties {
+ leaf signalling-format {
+ type string;
+ description
+ "A reference to the definition of the signalling format used by the instance referenced by the related port.
+ This is a placeholder for a more sophisticated capability.";
+ }
+ leaf monitoring-details {
+ type string;
+ description
+ "Information on what is being monitored in the instance referenced by the related port.
+ This is a placeholder for a more sophisticated capability.";
+ }
+ leaf control-details {
+ type string;
+ description
+ "Information on what is being controlled in the instance referenced by the related port.
+ This is a placeholder for a more sophisticated capability.";
+ }
+ description
+ " Container for properties associated with the port role as defined by the CascSpec.";
+ }
+
+ /****************************************
+ * package timing
+ **************************************/
+
+ grouping clock {
+ leaf run-mode {
+ type run-mode;
+ config false;
+ description
+ "The run-mode of the frequency system clock, such as free-run, locked, and holdover.";
+ }
+ leaf-list encompassed-clock {
+ type leafref {
+ path "/core-model:control-construct/core-model:logical-termination-point/core-model:embedded-clock/core-model:local-id";
+ }
+ description
+ "A clock may be emergent from and may effectively encompass several clocks in a resilient solution.";
+ }
+ list encapsulated-fc {
+ key "uuid";
+ uses forwarding-construct;
+ description
+ "A Clock may encapsulate an FC related to resilience where the clock provides an output that is essentially that of one of several other clocks in the resilience scheme.";
+ }
+ leaf-list sync-ltp {
+ type leafref {
+ path "/core-model:control-construct/core-model:logical-termination-point/core-model:uuid";
+ }
+ description
+ "A clock may feed one or more LTPs with timing information to propagate across the network (it may feed no LTPs).";
+ }
+ leaf-list encapsulated-casc {
+ type string;
+ description
+ "The clock may encapsulate a complex FC where there is a resilience mechanism active and that FC will need to be controlled.
+ The Casc to control the FC can be encapsulated in the Clock.";
+ }
+ leaf-list phase-aligned-clock {
+ type leafref {
+ path "/core-model:control-construct/core-model:logical-termination-point/core-model:embedded-clock/core-model:local-id";
+ }
+ description
+ "One or more clocks can be actively phase aligned (this is especially relevant in a hitless resilience scheme).";
+ }
+ uses local-class;
+ description
+ "Clock function processes the input sync information (frequency and ssm or time stamp and PTP announce messages) and provides the modified sync information to the sync distribution function.
+ If none of the inputs meet the quality defined by the controller the clock may enter a hold-over or free run mode.
+ The status of the clock will be reported to the controller.";
+ }
+
+ grouping forwarding-domain {
+ leaf-list layer-protocol-name {
+ type layer-protocol-name-type;
+ min-elements 1;
+ description
+ "One or more protocol layers at which the FD represents the opportunity to enable forwarding between LTP that bound it.";
+ }
+ leaf-list lower-level-fd {
+ type leafref {
+ path "/core-model:control-construct/core-model:forwarding-domain/core-model:uuid";
+ }
+ description
+ "The FD class supports a recursive aggregation relationship (HigherLevelFdEncompassesLowerLevelFds) such that the internal construction of an FD can be exposed as multiple lower level FDs and associated Links (partitioning).
+ The aggregated FDs and Links form an interconnected topology that provides and describes the capability of the aggregating FD.
+ Note that the model actually represents an aggregation of lower level FDs into higher level FDs as views rather than FD partition, and supports multiple views.
+ Aggregation allow reallocation of capacity from lower level FDs to different higher level FDs as if the network is reorganized (as the association is aggregation not composition).";
+ }
+ list fc {
+ key "uuid";
+ uses forwarding-construct;
+ description
+ "An FD aggregates one or more FCs. An aggregated FC connects LTPs that bound the FD.";
+ }
+ leaf-list logical-termination-point {
+ type leafref {
+ path "/core-model:control-construct/core-model:logical-termination-point/core-model:uuid";
+ }
+ description
+ "An instance of FD is associated with zero or more LTP objects.
+ The LTPs that bound the FD provide capacity for forwarding.
+ For asymmetric FDs, the association to the LTP is via the FdPort.";
+ }
+ list fd-port {
+ key "local-id";
+ uses fd-port;
+ description
+ "The association of the FD to LTPs is either made directly for symmetric FDs or via FdPort for asymmetric FDs.";
+ }
+ uses global-class;
+ description
+ "The ForwardingDomain (FD) class models the topological component that represents a forwarding capability that provides the opportunity to enable forwarding (of specific transport characteristic information at one or more protocol layers) between points.
+ The FD object provides the context for and constrains the formation, adjustment and removal of FCs and hence offers the potential to enable forwarding.
+ The FCs may be formed between LTPs at the boundary of the FD or between AccessPorts at the boundary of the FD (for the most basic media layers cases - most media cases use LTPs).
+ A number of FDs (related by Links) may be grouped and abstracted to form an FD where that FD represents the effect of the underlying FDs but where the detailed structure is not apparent.
+ This grouping and abstraction is potentially recursive.
+ This aspect is essentially equivalent to ITU-T partitioning but this is an aggregation not a composition, so it allows an FD to be in multiple higher level FDs.
+ The notion of abstraction/grouping assumes that small things are brought together into larger things as opposed to ITU-T partitioning that assumes large things are broken down into smaller things.
+ An FD represents an abstraction of some combination of software behavior, electronic behavior and physical structure that provides a forwarding capability.
+ At a lower level of recursion an FD could represent a forwarding capability within a device.
+ A device may encompass two or more disjoint forwarding capabilities and may support more than one layer protocol, hence more than one FD.
+ A routing fabric may be logically partitioned to represent connectivity constraints, hence the FD representing the routing fabric may be partitioned into a number of FDs representing the constraints.
+ The FD represents a subnetwork [ITU-T G.800], FlowDomain [TMF 612] and a MultiLayerSubNetwork (MLSN) [TMF 612].
+ As in the TMF concept of MLSN the FD can support more than one layer-protocol.
+ Note that the ITU-T G.800 subnetwork is a single layer entity.";
+ }
+
+ grouping forwarding-construct {
+ leaf layer-protocol-name {
+ type layer-protocol-name-type;
+ description
+ "The layerProtocol at which the FC enables the potential for forwarding.";
+ }
+ leaf-list lower-level-fc {
+ type leafref {
+ path "/core-model:control-construct/core-model:forwarding-domain/core-model:fc/core-model:uuid";
+ }
+ 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.
+ FC aggregation reflects FD aggregation.
+ For example a low level FC could represent what would have traditionally been considered as a 'Cross-Connection' in an 'NE'. The 'Cross-Connection' in an 'NE' is not necessarily the lowest level of FC partitioning.
+ ";
+ }
+ leaf fc-route {
+ type string;
+ 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.";
+ }
+ list fc-port {
+ key "local-id";
+ uses fc-port;
+ description
+ "The FcPorts define the boundary of the FC.
+ The FC is accessed via the FcPorts.
+ Flow within the FC is defined in terms of its FcPorts.";
+ }
+ list fc-switch {
+ key "local-id";
+ uses fc-switch;
+ description
+ "If an FC exposes protection (having two FcPorts that provide alternative identical inputs/outputs), the FC will have one or more associated FcSwitch objects.
+ The arrangement of switches for a particular instance is described by a referenced FcSpec.";
+ }
+ leaf-list configuration-and-switch-control {
+ type string;
+ description
+ "Reference to a ConfigurationAndSwitchController that coordinates switches encapsulated in the FC.
+ The controller coordinates multiple switches in the same FC.";
+ }
+ leaf forwarding-direction {
+ type forwarding-direction;
+ 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.
+ In the case of media the FcPorts and FC may also be omni-directional.";
+ }
+ leaf is-protection-lock-out {
+ if-feature "forwardingconstructisprotectionlockout";
+ type boolean;
+ description
+ "The resource is configured to temporarily not be available for use in the protection scheme(s) it is part of.
+ This overrides all other protection control states including forced.
+ If the item is locked out then it cannot be used under any circumstances.
+ Note: Only relevant when part of a protection scheme.";
+ }
+ leaf service-priority {
+ type int64;
+ description
+ "Relevant where 'service' FCs are competing for server resources.
+ Used to determine which signal FC is allocated resource.
+ The priority of the 'service' with respect to other 'services'.
+ Lower numeric value means higher priority.
+ Covers cases such as pre-emptible in a resilience solution. ";
+ }
+ leaf-list supported-link {
+ type string;
+ description
+ "An FC that spans between LTPs that terminate the LayerProtocol usually supports one or more links in the client layer.";
+ }
+ leaf supporting-pc {
+ type string;
+ description
+ "The functionality supporting this entity.";
+ }
+ uses global-class;
+ description
+ "The ForwardingConstruct (FC) represents enabled constrained potential for forwarding between two or more FcPorts at a particular specific layerProtocol .
+ The constraint is explained by the FcSpec. Even when an FC is in place enabling potential for flow, it is possible that no information is flowing as there is no flow matching the constraint, hence 'potential'.
+ Like the LTP, the FC supports any transport protocol including all analogue, circuit and packet forms.
+ The FC is used to effect forwarding of transport characteristic (layer protocol) information.
+ An FC can be in only one ForwardingDomain (FD).
+ The FC is a forwarding entity.
+ At a low level of the recursion, a FC represents a cross-connection within an NE. It may also represent a fragment of a cross-connection under certain circumstances.
+ The FC object can be used to represent many different structures including point-to-point (P2P), point-to-multipoint (P2MP), rooted-multipoint (RMP) and multipoint-to-multipoint (MP2MP) bridge and selector structures for linear, ring or mesh protection schemes.
+ When applied to media, the FC represents the ability for a flow/wave (potentially containing information), to be propagated between FcPorts.
+ The existence of a FC instance is independent of the presence (or absence) of a flow/wave (and any information encoded within it) where flow/wave covers the progressing of any analogue or digital (packet/frame etc.) structure.
+ A flow/wave cannot propagate in the absence of a FC instance.";
+ }
+
+ grouping fc-port {
+ leaf-list logical-termination-point {
+ type leafref {
+ path "/core-model:control-construct/core-model:logical-termination-point/core-model:uuid";
+ }
+ max-elements 2;
+ description
+ "The FcPort may be associated with more than one LTP when the FcPort is bidirectional and the LTPs are unidirectional.
+ Multiple LTP
+ - Bidirectional FcPort to two Uni-directional LTPs
+ Zero LTP
+ - BreakBeforeMake transition
+ - Planned LTP not yet in place
+ - Off-network LTP referenced through other mechanism.";
+ }
+ leaf role {
+ type port-role;
+ description
+ "Each FcPort of the FC has an assigned role (e.g., working, protection, protected, symmetric, hub, spoke, leaf, root) in the context of the FC with respect to the FC function.
+ The role is fixed by the referenced FcSpec.";
+ }
+ leaf fc-port-direction {
+ type port-direction;
+ description
+ "The orientation of the defined flow at the FcPort.";
+ }
+ leaf is-protection-lock-out {
+ if-feature "fcportisprotectionlockout";
+ type boolean;
+ description
+ "The resource is configured to temporarily not be available for use in the protection scheme(s) it is part of.
+ This overrides all other protection control states including forced.
+ If the item is locked out, then it cannot be used under any circumstances.
+ Note: Only relevant when part of a protection scheme.";
+ }
+ leaf selection-priority {
+ type int64;
+ description
+ "The preference priority of the resource in the protection scheme for a particular FC.
+ The lower the value the higher the priority.
+ A lower value of selection priority is preferred
+ If two resources have the same value they are of equal priority.
+ There is no preference between equal priorities.
+ If a resource with the lowest value selection priority fails,, then the next lowest value available (may be the same value) is picked.
+ Hence on failure of the current resource the next best available will be selected.
+ If there are several equal values, the choice is essentially arbitrary.
+ If the scheme is revertive then when a resource of higher priority than the currently selected resource recovers it will be selected.
+ This is equivalent to working/protection but allows for all static scheme types with n:m capability.
+ In simple schemes 0 = working and 1 = protecting.
+ If selection priority of an FcPort is increased in value and the FC is currently selecting this FcPort then if another FcPort of a lower selection priority value is available, the wait to restore process will come into action as if the other FcPort had just become available.
+ If selection priority of a FcPort is changed and the FC is not currently selecting this FcPort but is selecting an item that is now of a higher numeric value than the changed FcPort then the wait to restore process will come into action as if the other FcPort had just become available.";
+ }
+ leaf is-internal-port {
+ type boolean;
+ config false;
+ description
+ "The FcPort is not exposed and cannot have associated LTPs.
+ This form of FcPort is used to enable chaining of FcSwitches or FcRoutes in complex network protection scenarios.";
+ }
+ leaf-list fc-route-feeds-fc-port-egress {
+ type string;
+ description
+ "Identifies which route(s) currently actively forward to the FcPort to exit the FC to an LTP (or for an internal FcPort to propagate to the next internal switch/route).";
+ }
+ leaf-list fc-port {
+ type leafref {
+ path "/core-model:control-construct/core-model:forwarding-domain/core-model:fc/core-model:fc-port/core-model:local-id";
+ }
+ max-elements 2;
+ description
+ "An FcPort may have a direct association to another FcPort where there is a transition from one domain to another but where there has been no termination.";
+ }
+ leaf-list port-of-internal-fc {
+ type leafref {
+ path "/core-model:control-construct/core-model:forwarding-domain/core-model:fc/core-model:fc-port/core-model:local-id";
+ }
+ description
+ "none";
+ }
+ uses local-class;
+ description
+ "The association of the FC to LTPs is always made via FcPorts.
+ In the case of media the association between FCs is made via their FcPorts and the association of an FC to the physical Pin is made via the FcPort.
+ The FcPort class models the access to the FC function.
+ The traffic forwarding between the associated FcPorts of the FC depends upon the type of FC and may be associated with FcSwitch object instances.
+ In cases where there is resilience, the FcPort may convey the resilience role of the access to the FC.
+ It can represent a protected (resilient/reliable) point or a protecting (unreliable working/main or protection/spare) point.
+ The FcPort replaces the Protection Unit of a traditional protection model (e.g., ITU-T).
+ The ForwardingConstruct can be considered as a component and the FcPort as a Port on that component.";
+ }
+
+ grouping layer-protocol {
+ leaf layer-protocol-name {
+ type layer-protocol-name-type;
+ description
+ "Indicate the specific layer-protocol described by the LayerProtocol entity.";
+ }
+ leaf configured-client-capacity {
+ type string;
+ description
+ "Provides a summarized view of the client capacity that is configurable for use.
+ Note the client LTP association should provide all necessary detail hence this attribute is questionable.";
+ }
+ leaf lp-direction {
+ type termination-direction;
+ description
+ "The overall directionality of the LP.
+ - A BIDIRECTIONAL LP will have some SINK and/or SOURCE flows.
+ - 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 termination-state {
+ type termination-state;
+ description
+ "Indicates whether the layer is terminated and if so how.";
+ }
+ leaf-list configuration-and-switch-control {
+ type string;
+ description
+ "A switch controller external to the LayerProtocol.
+ The controller will coordinate one or more switches in one or more FCs related to the LayerProtocol";
+ }
+ leaf is-protection-lock-out {
+ type boolean;
+ description
+ "The resource is configured to temporarily not be available for use in the protection scheme(s) it is part of.
+ This overrides all other protection control states including forced.
+ If the item is locked out, then it cannot be used under any circumstances.
+ Note: Only relevant when part of a protection scheme.";
+ }
+ leaf fc-blocks-signal-to-lp {
+ type string;
+ description
+ "Indicates whether the associated FC is blocking signal to/from the LTP.";
+ }
+ uses local-class;
+ description
+ "The projection of an LTP into each transport layer is represented by a LayerProtocol (LP) instance. A LayerProtocol instance can be used for controlling termination and monitoring functionality.
+ It can also be used for controlling the adaptation (i.e. aggregation, encapsulation and/or multiplexing of client signal), tandem connection monitoring, traffic conditioning and/or shaping functionality at an intermediate point along a connection.
+ Where the client – server relationship is fixed 1:1 and immutable, the layers can be encapsulated in a single LTP instance. Where there is a n:1 relationship between client and server, the layers must be split over two separate instances of LTP. ";
+ }
+
+ grouping logical-termination-point {
+ leaf-list server-ltp {
+ type leafref {
+ path "/core-model:control-construct/core-model:logical-termination-point/core-model:uuid";
+ }
+ description
+ "References contained LTPs representing servers of this LTP in an inverse multiplexing configuration (e.g. VCAT).";
+ }
+ leaf-list client-ltp {
+ type leafref {
+ path "/core-model:control-construct/core-model:logical-termination-point/core-model:uuid";
+ }
+ description
+ "References contained LTPs representing client traffic of this LTP for normal cases of multiplexing.";
+ }
+ list layer-protocol {
+ key "local-id";
+ min-elements 1;
+ uses layer-protocol;
+ 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).";
+ }
+ leaf connected-ltp {
+ type leafref {
+ path "/core-model:control-construct/core-model:logical-termination-point/core-model:uuid";
+ }
+ description
+ "Applicable in a simple context where two LTPs are associated via a non-adjustable enabled forwarding.
+ Reduces clutter removing the need for two additional LTPs and an FC with a pair of FcPorts.";
+ }
+ leaf peer-ltp {
+ type leafref {
+ path "/core-model:control-construct/core-model:logical-termination-point/core-model:uuid";
+ }
+ description
+ "References contained LTPs representing the reversal of orientation of flow where two LTPs are associated via a non-adjustable enabled forwarding and where the referenced LTP is fully dependent on this LTP.";
+ }
+ leaf-list physical-port-reference {
+ type leafref {
+ path "/core-model:control-construct/core-model:equipment/core-model:uuid";
+ require-instance true;
+ }
+ description
+ "One or more text labels for the unmodeled physical port associated with the LTP.
+ In many cases there is no associated physical port.";
+ }
+ leaf-list ltp-in-other-view {
+ type leafref {
+ path "/core-model:control-construct/core-model:logical-termination-point/core-model:uuid";
+ }
+ description
+ "References one or more LTPs in other views that represent this LTP.
+ The referencing LTP is the provider of capability.";
+ }
+ leaf ltp-direction {
+ type termination-direction;
+ 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";
+ }
+ leaf transfer-capacity-pac {
+ type string;
+ description
+ "The LTP has as an inherent capacity derived from underlying capability.
+ The capacity of a particular LTP may be dependent upon other uses of resource in the device and hence it may vary over time.
+ The capacity of a Link is dependent upon the capacity of the LTPs at its ends.
+ An LTP may be an abstraction and virtualization of a subset of the underlying capability offered in a view or may be directly reflecting the underlying realization.";
+ }
+ leaf-list fd-rule-group {
+ type leafref {
+ path "/core-model:control-construct/core-model:forwarding-domain/core-model:uuid";
+ }
+ description
+ "An LTP can reference FD rules that the FD that aggregates it also references so that the rules can then apply to the LTP.";
+ }
+ list embedded-clock {
+ key "local-id";
+ uses clock;
+ description
+ "none";
+ }
+ leaf supporting-pc {
+ type string;
+ description
+ "The functionality supporting this entity.";
+ }
+ uses global-class;
+ description
+ "The LogicalTerminationPoint (LTP) class encapsulates the termination and adaptation functions of one or more transport layers represented by instances of LayerProtocol.
+ The encapsulated transport layers have a simple fixed 1:1 client-server relationship defined by association end ordering.
+ The structure of LTP supports all transport protocols including analogue, circuit and packet forms.";
+ }
+
+ grouping fd-port {
+ leaf-list logical-termination-point {
+ type leafref {
+ path "/core-model:control-construct/core-model:logical-termination-point/core-model:uuid";
+ }
+ max-elements 2;
+ description
+ "An instance of FD is associated with zero or more LTP objects.
+ The LTPs that bound the FD provide capacity for forwarding.
+ For asymmetric FDs, the association to the LTP is via the FdPort.";
+ }
+ leaf role {
+ type port-role;
+ description
+ "Each FdPort of the FD has a role (e.g., symmetric, hub, spoke, leaf, root) in the context of the FD with respect to the FD capability. ";
+ }
+ leaf fd-port-direction {
+ type port-direction;
+ description
+ "The orientation of the defined flow at the FdPort.";
+ }
+ leaf-list fc-port {
+ type leafref {
+ path "/core-model:control-construct/core-model:forwarding-domain/core-model:fc/core-model:fc-port/core-model:local-id";
+ }
+ description
+ "Where an FD is asymmetric and hence has FdPorts and where that FD and supports FCs, appropriate FdPorts of that FD support the corresponding FcPorts.";
+ }
+ leaf-list fd-port {
+ type leafref {
+ path "/core-model:control-construct/core-model:forwarding-domain/core-model:fd-port/core-model:local-id";
+ }
+ max-elements 2;
+ description
+ "An FdPort may have a direct association to another FdPort where there is a transition from one domain to another but where there has been no termination.";
+ }
+ uses local-class;
+ description
+ "The association of the FD to LTPs may be direct for symmetric FDs and may be via FdPort for asymmetric FDs.
+ The FdPort class models the role of the access to the FD function.
+ The capability to set up FCs between the associated FdPorts of the FD depends upon the type of FD. It is asymmetry in this capability that brings the need for FdPort.
+ The FD can be considered as a component and the FdPort as a Port on that component.";
+ }
+
+ feature forwardingconstructisprotectionlockout {
+ description
+ "none";
+ }
+
+ feature fcportisprotectionlockout {
+ description
+ "none";
+ }
+
+ /****************************************
+ * package associations
+ **************************************/
+ /****************************************
+ * package core-foundation-model
+ **************************************/
+ /****************************************
+ * package super-classes-and-common-packages
+ **************************************/
+ /****************************************
+ * grouping statements for object classes
+ **************************************/
+
+ grouping name {
+ list name {
+ key "value-name";
+ uses name-and-value;
+ description
+ "List of names.";
+ }
+ description
+ "Name: A property of an entity with a value that is unique in some namespace but may change during the life of the entity. A name carries no semantics with respect to the purpose of the entity.";
+ }
+
+ grouping global-class {
+ container external-managed-id {
+ uses external-managed-universal-id;
+ description
+ "A list of external managed universal identifiers, set by an external tool. There must not be any function implemented on the ControlConstruct itself next to updating the list on request and storing it persitenly. ";
+ }
+ leaf local-id {
+ type string;
+ description
+ "An identifier that is unique in the context of some scope that is less than the global scope.
+ (This should be considered in the context of Identifier: A property of an entity/role with a value that is unique within an identifier space, where the identifier space is itself unique, and immutable. The identifier therefore represents the identity of the entity/role. An identifier carries no semantics with respect to the purpose of the entity.)";
+ }
+ leaf uuid {
+ type universal-id;
+ description
+ "UUID: An identifier that is universally unique
+ (This should be considered in the context of Identifier: A property of an entity/role with a value that is unique within an identifier space, where the identifier space is itself globally unique, and immutable. An identifier carries no semantics with respect to the purpose or state of the entity)
+ The uuid should be treated as opaque by the user.";
+ }
+ uses name;
+ uses label;
+ uses extension;
+ uses state-pac;
+ uses address;
+ description
+ "Represents a type of thing (an Entity) that has instances which can exist in their own right (independently of any others).
+ Entity: Has identity, defined boundary, properties, functionality and lifecycle in a global context.
+ (This should be considered in the context of a Class: (usage) The representation of a thing that may be an entity or an inseparable Entity Feature).";
+ }
+
+ grouping local-class {
+ leaf local-id {
+ type string;
+ description
+ "An identifier that is unique in the context of some scope that is less than the global scope.
+ (This should be considered in the context of Identifier: A property of an entity/role with a value that is unique within an identifier space, where the identifier space is itself unique, and immutable. The identifier therefore represents the identity of the entity/role. An identifier carries no semantics with respect to the purpose of the entity.)";
+ }
+ uses name;
+ uses label;
+ uses extension;
+ uses state-pac;
+ uses address;
+ description
+ "A LocalClass represents a Feature of an Entity. It is inseparable from a GlobalClass but is a distinct feature of that GlobalClass such that the instances of LocalClass are able to have associations to other instances.
+ Feature of an Entity: An inseparable, externally distinguishable part of an entity.
+ The mandatory LocalId of the LocalClass instance is unique in the context of the GlobalClass from which it is inseparable.
+ (This should be considered in the context of a Class: (usage) The representation of a thing that may be an entity or an inseparable feature of an entity.)
+ ";
+ }
+
+ grouping label {
+ list label {
+ key "value-name";
+ uses name-and-value;
+ description
+ "List of labels.";
+ }
+ description
+ "A property of an entity with a value that is not expected to be unique and is allowed to change. A label carries no semantics with respect to the purpose of the entity and has no effect on the entity behavior or state.";
+ }
+
+ grouping extension {
+ list extension {
+ key "value-name";
+ uses name-and-value;
+ description
+ "List of simple name-value extensions.";
+ }
+ description
+ "Extension provides an opportunity to define properties not declared in the class that extend the class enabling a realization with simple ad-hoc extension of standard classes to be conformant.";
+ }
+
+ grouping universal-id-authority {
+ leaf uuid {
+ type universal-id;
+ description
+ "The UUID for the UUID authority.";
+ }
+
+ description
+ "Represents the authority that controls the allocation of UUIDs.";
+ }
+
+ grouping name-and-value-authority {
+ leaf uuid {
+ type universal-id;
+ description
+ "The UUID for the NameAndValueAuthority.";
+ }
+ description
+ "Represents the authority that controls the legal values for the names and values of a name/value attribute.";
+ }
+
+ grouping conditional-package {
+ uses extension;
+ uses label;
+ description
+ "The base class for conditional packages.";
+ }
+
+ grouping address {
+ leaf-list address {
+ type dt-address;
+ description
+ "One or more descriptions of the location.";
+ }
+ description
+ "Provides an opportunity to state the location of the entity via one or more hierarchies of narrowing contexts.";
+ }
+
+ /****************************************
+ * package assocations
+ **************************************/
+ /****************************************
+ * package state-model
+ **************************************/
+ /****************************************
+ * grouping statements for object classes
+ **************************************/
+
+ grouping state-pac {
+ leaf operational-state {
+ type operational-state;
+ config false;
+ description
+ "The operational state is used to indicate whether or not the resource is installed and working.";
+ }
+ leaf administrative-control {
+ type administrative-control;
+ description
+ "The administrativeControl state provides control of the availability of specific resources without modification to the provisioning of those resources.
+ The value is the current control target. The actual administrativeState may or may not be at target.";
+ }
+ leaf administrative-state {
+ type administrative-state;
+ config false;
+ description
+ "Shows whether or not the client has permission to use or has a prohibition against using the resource.
+ The administrative state expresses usage permissions for specific resources without modification to the provisioning of those resources.";
+ }
+ leaf lifecycle-state {
+ type lifecycle-state;
+ description
+ "Used to track the planned deployment, allocation to clients and withdrawal of resources.";
+ }
+ description
+ "Provides general state attributes.";
+ }
+
+ /****************************************
+ * package state-machines
+ **************************************/
+ /****************************************
+ * package core-physical-model
+ **************************************/
+ /****************************************
+ * package rule-models
+ **************************************/
+ /****************************************
+ * package fru-non-fru-rules
+ **************************************/
+ /****************************************
+ * grouping statements for object classes
+ **************************************/
+
+ grouping field-replaceable {
+ list equipment-non-fru {
+ key "uuid";
+ uses non-field-replaceable;
+ description
+ "none";
+ }
+ list holder {
+ key "local-id";
+ uses holder;
+ description
+ "none";
+ }
+ container holder-address {
+ uses holder;
+ description
+ "none";
+ }
+ uses equipment;
+ description
+ "A rule class (an abstract specialization of Equipment) that represents an equipment that can be replaced in the field.
+ May plug in to a holder in another equipment (if not stand-alone).
+ Realization could use an FRU Boolean on Equipment.";
+ }
+
+ grouping non-field-replaceable {
+ uses equipment;
+ description
+ "A rule class (an abstract specialization of Equipment) that represents an equipment that cannot be replaced in the field.
+ Is simply a subordinate part of an FRU (or another NFRU – where there must be an FRU at the top of the hierarchy).
+ Does not have any exposed holders (any associated holders are assumed to belong to the containing FRU).
+ Does not have any connectors (any associated connectors are assumed to belong to the containing FRU).
+ ";
+ }
+
+ /****************************************
+ * package connector-rules
+ **************************************/
+ /****************************************
+ * grouping statements for object classes
+ **************************************/
+
+ grouping connector-on-equipment-for-holder {
+ leaf connector-in-holder {
+ type string;
+ description
+ "The equipment connector is plugged into the referenced holder connector.";
+ }
+ uses connector;
+ description
+ "A rule class (an abstract specialization of Connector) that represents a connector on an equipment that is intended to mate with a connector in a holder.";
+ }
+
+ /****************************************
+ * package equipment-detail
+ **************************************/
+ /****************************************
+ * grouping statements for object classes
+ **************************************/
+ /****************************************
+ * package dynamic-details
+ **************************************/
+
+ grouping function-enablers {
+ leaf power-state {
+ type string;
+ description
+ "The state of the power being supplied to the equipment.
+ Note that this attribute summarizes the power state.
+ Full details on the actual power system would be provided from a number of PC instances representing the relevant parts of the Power function (e.g. different voltage supplies).";
+ }
+ description
+ "Represents the dynamic aspects of the properties that relate to the motive force that directly enable functionality to emerge from the equipment.";
+ }
+
+ grouping mechanical-functions {
+ leaf rotation-speed {
+ type string;
+ description
+ "none";
+ }
+ description
+ "Represents the dynamic aspects of the mechanical functions of the equipment.";
+ }
+
+ grouping physical-properties {
+ leaf temperature {
+ type string;
+ description
+ "none";
+ }
+ description
+ "Represents the dynamic aspects of the physical environmental properties of the equipment.";
+ }
+
+ grouping location {
+ leaf equipment-location {
+ type dt-address;
+ description
+ "none";
+ }
+ leaf geographical-location {
+ type dt-address;
+ description
+ "none";
+ }
+ description
+ "Represents where the equipment is.";
+ }
+
+ /****************************************
+ * package invariant-details
+ **************************************/
+
+ grouping equipment-structure {
+ leaf category {
+ type equipment-category;
+ description
+ "This attribute provides the identifier for a category of equipments regarded as having particular shared characteristics.";
+ }
+ description
+ "Represents the form of the equipment.";
+ }
+
+ grouping equipment-instance {
+ leaf manufacture-date {
+ type yang:date-and-time;
+ description
+ "This attribute represents the date on which this instance is manufactured.";
+ }
+ leaf serial-number {
+ type string;
+ description
+ "This attribute represents the serial number of this instance.";
+ }
+ leaf asset-instance-identifier {
+ type string;
+ description
+ "This attribute represents the asset identifier of this instance from the manufacturer's perspective.";
+ }
+ description
+ "Represents the per instance invariant properties of the equipment.";
+ }
+
+ grouping equipment-type {
+ leaf description {
+ type string;
+ description
+ "Text describing the type of Equipment.";
+ }
+ leaf model-identifier {
+ type string;
+ description
+ "This attribute identifies the model of the equipment.";
+ }
+ leaf part-type-identifier {
+ type string;
+ description
+ "This attribute identifies the part type of the equipment.";
+ }
+ leaf type-name {
+ type string;
+ description
+ "This attribute identifies the type of the equipment.";
+ }
+ leaf version {
+ type string;
+ description
+ "This attribute identifies the version of the equipment.";
+ }
+ description
+ "Represents the invariant properties of the equipment that define and characterize the type.";
+ }
+
+ grouping holder-structure {
+ leaf holder-category {
+ type holder-category;
+ description
+ "none";
+ }
+ leaf is-captive {
+ type boolean;
+ description
+ "none";
+ }
+ leaf is-guided {
+ type boolean;
+ description
+ "This attribute indicates whether the holder has guides that constrain the position of the equipment in the holder or not.";
+ }
+ leaf is-quantised-space {
+ type boolean;
+ description
+ "none";
+ }
+ description
+ "Represents the form of the holder.";
+ }
+
+ grouping manufactured-thing {
+ container manufacturer-properties {
+ uses manufacturer-properties;
+ description
+ "none";
+ }
+ container equipment-type {
+ uses equipment-type;
+ description
+ "none";
+ }
+ container equipment-instance {
+ uses equipment-instance;
+ description
+ "none";
+ }
+ container operator-augmented-equipment-type {
+ uses operator-augmented-equipment-type;
+ description
+ "none";
+ }
+ container operator-augmented-equipment-instance {
+ uses operator-augmented-equipment-instance;
+ description
+ "none";
+ }
+ description
+ "Collects all invariant aspects of a manufactured thing.";
+ }
+
+ grouping manufacturer-properties {
+ leaf manufacturer-identifier {
+ type string;
+ description
+ "none";
+ }
+ leaf manufacturer-name {
+ type string;
+ description
+ "none";
+ }
+ description
+ "Represents the properties of the manufacturer.";
+ }
+
+ grouping mechanical-features {
+ description
+ "Represents the invariant characteristics of dynamic mechanical features of a physical thing.";
+ }
+
+ grouping operator-augmented-equipment-type {
+ leaf asset-type-identifier {
+ type string;
+ description
+ "none";
+ }
+ description
+ "Represents the invariant properties of the equipment asset allocated by the operator that define and characterize the type.";
+ }
+
+ grouping physical-characteristics {
+ leaf weight-characeristics {
+ type string;
+ description
+ "none";
+ }
+ leaf fire-characteristics {
+ type string;
+ description
+ "none";
+ }
+ leaf materials {
+ type string;
+ description
+ "none";
+ }
+ description
+ "Represents the invariant physical characteristics (including composition and physical robustness) of the type.";
+ }
+
+ grouping environmental-rating {
+ container thermal-rating {
+ uses thermal-rating;
+ description
+ "This attribute represents the thermal characteristics (preferred maximum/minimum, absolute maximum/minimum etc) that the entity can tolerate.";
+ }
+ container power-rating {
+ uses power-rating;
+ description
+ "This attribute represents the power chracteristics (peak and mean per power source) of the entity.
+ For an Equipment this is the power consumption.
+ For a Holder this is the power that can be conveyed.";
+ }
+ leaf humidity-rating {
+ type string;
+ description
+ "This attribute represents the humidity characteristics (preferred maximum/minimum, absolute maximum/minimum etc.) that the entity can tolerate.";
+ }
+ description
+ "Represents the invariant physical operational boundaries for the equipment/holder type.";
+ }
+
+ grouping position {
+ leaf relative-position {
+ type string;
+ description
+ "none";
+ }
+ description
+ "Represents the invariant relative position of the holder (with respect to some frame of reference in an equipment) or connector on an equipment or pin in a connector.";
+ }
+
+ grouping spatial-properties-of-type {
+ leaf height {
+ type string;
+ description
+ "none";
+ }
+ leaf width {
+ type string;
+ description
+ "none";
+ }
+ leaf length {
+ type string;
+ description
+ "none";
+ }
+ description
+ "Represents the basic invariant spatial properties of a physical thing.";
+ }
+
+ grouping swappability {
+ leaf is-hot-swappable {
+ type boolean;
+ default "true";
+ description
+ "none";
+ }
+ description
+ "Represents the degree of field replacement that is possible for the equipment type.";
+ }
+
+ grouping operator-augmented-equipment-instance {
+ leaf asset-instance-identifier {
+ type string;
+ description
+ "This attribute represents the asset identifier of this instance from the operator's perspective.";
+ }
+ description
+ "Represents the invariant properties of the equipment asset allocated by the operator that define and characterize the type.";
+ }
+
+ /****************************************
+ * package pattern-classes
+ **************************************/
+
+ grouping cable-details {
+ container spatial-properties-of-type {
+ uses spatial-properties-of-type;
+ description
+ "none";
+ }
+ container physical-characteristics {
+ uses physical-characteristics;
+ description
+ "none";
+ }
+ container manufactured-thing {
+ uses manufactured-thing;
+ description
+ "none";
+ }
+ description
+ "none";
+ }
+
+ grouping connector-details {
+ container position {
+ uses position;
+ description
+ "none";
+ }
+ container mechanical-features {
+ uses mechanical-features;
+ description
+ "none";
+ }
+ container manufactured-thing {
+ uses manufactured-thing;
+ description
+ "none";
+ }
+ description
+ "none";
+ }
+
+ grouping equipment-detail {
+ container location {
+ uses location;
+ description
+ "none";
+ }
+ container structure {
+ uses equipment-structure;
+ description
+ "none";
+ }
+ container swappability {
+ uses swappability;
+ description
+ "none";
+ }
+ container physical-properties {
+ uses physical-properties;
+ description
+ "none";
+ }
+ container function-enablers {
+ uses function-enablers;
+ description
+ "none";
+ }
+ container mechanical-functions {
+ uses mechanical-functions;
+ description
+ "none";
+ }
+ container physical-characteristics {
+ uses physical-characteristics;
+ description
+ "none";
+ }
+ container mechanical-features {
+ uses mechanical-features;
+ description
+ "none";
+ }
+ container spatial-properties-of-type {
+ uses spatial-properties-of-type;
+ description
+ "none";
+ }
+ container environmental-rating {
+ uses environmental-rating;
+ description
+ "none";
+ }
+ container manufactured-thing {
+ uses manufactured-thing;
+ description
+ "none";
+ }
+ uses local-class;
+ description
+ "none";
+ }
+
+ grouping holder-details {
+ container spatial-properties-of-type {
+ uses spatial-properties-of-type;
+ description
+ "none";
+ }
+ container environmental-rating {
+ uses environmental-rating;
+ description
+ "none";
+ }
+ container position {
+ uses position;
+ description
+ "none";
+ }
+ container holder-structure {
+ uses holder-structure;
+ description
+ "none";
+ }
+ uses local-class;
+ description
+ "none";
+ }
+
+ /****************************************
+ * package data-types
+ **************************************/
+
+ grouping thermal-rating {
+ leaf thermal-rating-name {
+ type string;
+ description
+ "Name of the rating property, e.g. Absolute.";
+ }
+ leaf maximum-temperature {
+ type decimal64 {
+ fraction-digits 3;
+ }
+ description
+ "The maximum temperature in Celsius.";
+ }
+ leaf minimum-temperature {
+ type decimal64 {
+ fraction-digits 3;
+ }
+ description
+ "The minimum temperature in Celsius.";
+ }
+ description
+ "A thermal rating value range.";
+ }
+
+ grouping power-rating {
+ leaf power-rating-name {
+ type string;
+ description
+ "Name of the rating property, e.g. Absolute.";
+ }
+ leaf power-rating-value {
+ type string;
+ description
+ "none";
+ }
+ description
+ "none";
+ }
+
+ /****************************************
+ * package equipment-pattern-structure
+ **************************************/
+ /****************************************
+ * grouping statements for object classes
+ **************************************/
+
+ grouping connector {
+ leaf connector {
+ type string;
+ description
+ "The Connector that is attached to this Connector so as to join the Equipment/Cable with this Connector to another Equipment/Cable.
+ This may provide physical support and/or allow signal flow.";
+ }
+ leaf orientation {
+ type connector-and-pin-orientation;
+ description
+ "The physical orientation of the connector, such as whether it is a male, or female, or neutral structure.";
+ }
+ leaf pin-layout {
+ type string;
+ description
+ "none";
+ }
+ leaf connector-type {
+ type string;
+ description
+ "The type of the connector.";
+ }
+ leaf role {
+ type string;
+ description
+ "The purpose of the Connector in the physical space and the functional space.";
+ }
+ uses local-class;
+ description
+ "Represents a connector that may be fully exposed (e.g. to plug in a cable or on the end of a cable) or partially exposed (e.g. backplane to plug in another piece of equipment such as a module).
+ A physical port on the Equipment. A place where signals produced by the functionality of the Equipment may be accessed.";
+ }
+
+ grouping equipment {
+ list connector {
+ key "local-id";
+ uses connector;
+ description
+ "A Connector on the Equipment.";
+ }
+ list contained-holder {
+ key "local-id";
+ uses holder;
+ description
+ "References the Holder in an Equipment that is available to take other Equipments.
+ For example:
+ - Slot in a sub-rack
+ - Slot in a Field Replaceable Unit that can take a small form-factor pluggable.";
+ }
+ leaf is-field-replaceable {
+ type boolean;
+ default "true";
+ config false;
+ description
+ "Indicates whether or not the equipment can be removed and replaced 'in the field' (i.e. in a deployment) by normal operations personnel.";
+ }
+ leaf-list function-block {
+ type string;
+ description
+ "none";
+ }
+ list expected-equipment {
+ key "local-id";
+ uses expected-equipment;
+ description
+ "none";
+ }
+ container actual-equipment {
+ uses actual-equipment;
+ description
+ "none";
+ }
+ leaf equipment-functional-boundary {
+ type string;
+ description
+ "none";
+ }
+ uses global-class;
+ description
+ "Represents any relevant physical thing.
+ Can be either field replaceable or not field replaceable.
+ Note: The model is currently constrained to inside plant.";
+ }
+
+ grouping holder {
+ leaf occupying-fru {
+ type leafref {
+ path "/core-model:control-construct/core-model:equipment/core-model:uuid";
+ }
+ description
+ "The FRU that is occupying the holder.
+ A holder may be unoccupied.
+ An FRU may occupy more hat one holder (using or blocking are intentionally not distinguished here).";
+ }
+ leaf holder-location {
+ type dt-address;
+ description
+ "The relative position of the holder in the context of its containing equipment along with the position of that containing Equipment (and further recursion).";
+ }
+ container expected-holder {
+ uses expected-holder;
+ description
+ "none";
+ }
+ container actual-holder {
+ uses actual-holder;
+ description
+ "none";
+ }
+ uses local-class;
+ description
+ "Represents a space in an equipment in which another equipment can be fitted in the field.";
+ }
+
+ /****************************************
+ * package data-types
+ **************************************/
+
+ typedef connector-and-pin-orientation {
+ type identityref {
+ base CONNECTOR_AND_PIN_ORIENTATION;
+ }
+ description
+ "Most connector schemes are asymmetric such that there are two orientations of the connector where a mating is only possible between two connectors of different orientations.
+ A multi-pin connector may have a mix of pin orientations. In this case, it is expected that the dominant orientation of pin is chosen for the connector orientation.";
+ }
+
+ typedef equipment-category {
+ type identityref {
+ base EQUIPMENT_CATEGORY;
+ }
+ description
+ "The form of equipment.";
+ }
+
+ typedef holder-category {
+ type identityref {
+ base HOLDER_CATEGORY;
+ }
+ description
+ "The form of holder.";
+ }
+
+ /****************************************
+ * package expected-and-actual
+ **************************************/
+ /****************************************
+ * grouping statements for object classes
+ **************************************/
+
+ grouping actual-holder {
+ uses holder-details;
+ description
+ "A holder in the ActualEquipment.";
+ }
+
+ grouping expected-holder {
+ uses holder-details;
+ description
+ "A definition of a holder expected in the ActualEquipment (i.e. an ActualHolder) as part of the constraints provided by the ExpectedEquipment.";
+ }
+
+ grouping actual-equipment {
+ uses equipment-detail;
+ description
+ "The equipment that is actually present in the physical network.
+ It will expose all dynamic properties and some critical static properties.";
+ }
+
+ grouping expected-equipment {
+ uses equipment-detail;
+ description
+ "A definition of the restrictions on the equipment that is expected to be present in the physical network at a particular 'place'.
+ The expected equipment will state the type and may constrain any other invariant properties.
+ It may also provide desired ranges for dynamic properties.";
+ }
+
+ /****************************************
+ * package connector-and-pin
+ **************************************/
+ /****************************************
+ * grouping statements for object classes
+ **************************************/
+
+ grouping signal-ref-pt {
+ container logical-termination-point {
+ uses logical-termination-point;
+ description
+ "none";
+ }
+ list elemental-signals {
+ min-elements 1;
+ uses elemental-signals;
+ description
+ "none";
+ }
+ description
+ "A single coherent signal as processed by a single LTP.";
+ }
+
+ grouping signal-ref-pt-group {
+ description
+ "A conceptual access for a group of signals (where that group of signals cannot be separated).
+ A physical indivisible group of signals.";
+ }
+
+ grouping elemental-signals {
+ description
+ "The elemental (sub-atomic) parts of an 'indivisible' signal where processing in the LTP is required to extract the elemental signals.";
+ }
+
+ /****************************************
+ * package general-controller-model
+ **************************************/
+ /****************************************
+ * package associations
+ **************************************/
+ /****************************************
+ * grouping statements for object classes
+ **************************************/
+
+ container control-construct {
+ presence "Enables SDN";
+ uses control-construct;
+ description
+ "none";
+ }
+
+ grouping control-construct {
+ leaf-list top-level-equipment {
+ type leafref {
+ path "/core-model:control-construct/core-model:equipment/core-model:uuid";
+ }
+ description
+ "none";
+ }
+ list equipment {
+ key "uuid";
+ uses equipment;
+ description
+ "none";
+ }
+ list logical-termination-point {
+ key "uuid";
+ uses logical-termination-point;
+ description
+ "none";
+ }
+ list forwarding-domain {
+ key "uuid";
+ uses forwarding-domain;
+ description
+ "none";
+ }
+ container profile-collection {
+ uses profile-collection;
+ description
+ "none";
+ }
+ uses global-class;
+ description
+ "Represents control capability/functionality.
+ ControlConstructs communicate with other ControlConstructs through ControlPorts about things within the related ConstraintDomains.
+ The ControlConstruct applies to all Control/Management cases including:
+ - the controller in the Network/Managed Element e.g. an SNMP agent).
+ - an SDN Controller.
+ - an EMS.
+ - an NMS.
+ This specific model follows a subset of the Component-System Pattern.
+ Root element for controller southbound APIs.";
+ }
+
+ grouping profile-collection {
+ list profile {
+ key "uuid";
+ uses profile;
+ description
+ "none";
+ }
+ description
+ "none";
+ }
+
+ grouping profile {
+ leaf profile-name {
+ type profile-name-type;
+ description
+ "none";
+ }
+ uses global-class;
+ description
+ "none";
+ }
+
+ grouping control-port {
+ container logical-termination-point {
+ uses logical-termination-point;
+ description
+ "The LTP through which the control messaging/signaling flows.";
+ }
+ leaf provider-role {
+ type string;
+ description
+ "Properties relevant when the ControlPort is exposing the ControlConstruct as a provider of capability.";
+ }
+ leaf user-role {
+ type string;
+ description
+ "Properties relevant when the ControlPort is exposing the ControlConstruct as a user of capability.";
+ }
+ uses global-class;
+ description
+ "The access to the ControlConstruct following the normal Component-Port pattern (i.e., the functions of a component are accessed via ports).
+ Is assumed to usually be bidirectional.";
+ }
+
+ /****************************************
+ * package interfaces
+ **************************************/
+
+ rpc apply-system-structure-state-defined-by-constraint {
+ description
+ "none";
+ input {
+ leaf input-constraint-structure {
+ type string;
+ description
+ "none";
+ }
+ }
+ output {
+ leaf output-constraint-structure {
+ type string;
+ description
+ "none";
+ }
+ }
+ }
+
+ rpc retrieve-system-structure-defined-by-constraint {
+ description
+ "none";
+ input {
+ leaf input-constraint-structure {
+ type string;
+ description
+ "none";
+ }
+ }
+ output {
+ leaf output-constraint-structure {
+ type string;
+ description
+ "none";
+ }
+ }
+ }
+
+ /****************************************
+ * package core-software-model
+ **************************************/
+ /****************************************
+ * grouping statements for object classes
+ **************************************/
+ /****************************************
+ * package file-system
+ **************************************/
+
+ grouping file {
+ leaf size {
+ type string;
+ description
+ "The size of the File, in bytes.";
+ }
+ leaf last-modify-time {
+ type yang:date-and-time;
+ description
+ "The date time that the File was last modified.";
+ }
+ leaf checksum {
+ type string;
+ description
+ "A checksum that can be used to validate the contents of the File (in case of corruption or malicious changes) using a hashing algorithm like MD5 or SHA1.";
+ }
+ uses file-system-entry;
+ description
+ "A File is a data structure used to store information (user data, commands, software etc.) in a computer system. Note that in this CIM class, we are only storing the metadata associated with the File, not the actual contents of the File.";
+ }
+
+ grouping file-system {
+ list file-system-entry {
+ uses file-system-entry;
+ description
+ "The root FileSystem entries, which can be Files or Directories.";
+ }
+ description
+ "A FileSystem organizes the data on a storage system so that it can be easily created, updated and accessed. It manages the Directories and also the metadata for the Files.";
+ }
+
+ grouping file-system-entry {
+ leaf is-read-only {
+ type boolean;
+ description
+ "If the File contents can be modified or not.";
+ }
+ leaf is-hidden {
+ type boolean;
+ description
+ "If the File is hidden by the FileSystem.";
+ }
+ leaf path-name {
+ type string;
+ description
+ "The full pathname of the entry, back to the root Directory.";
+ }
+ leaf local-name {
+ type string;
+ description
+ "The name of the entry in its Directory.";
+ }
+ leaf create-date {
+ type yang:date-and-time;
+ description
+ "The date that the entry was created.";
+ }
+ description
+ "FileSystemEntry is an abstraction of File and Directory, useful when there is a need to reference both classes. It also allows for an easy representation of a hierarchical filesystem.";
+ }
+
+ grouping symbolic-link {
+ container file-system-entry {
+ uses file-system-entry;
+ description
+ "The FileSystemEntry that this SymbolicLink refers to.";
+ }
+ uses file;
+ description
+ "A SymbolicLink is a File that contains a path reference to a File or a Directory.";
+ }
+
+ grouping directory {
+ list file-system-entry {
+ uses file-system-entry;
+ description
+ "Directory entry, which can be a File or another Directory.";
+ }
+ uses file-system-entry;
+ description
+ "A Directory is a collection of Files and other Directories. Because a Directory can contain other Directories, this allows a hierarchical file system to be represented.";
+ }
+
+ /****************************************
+ * package running-software
+ **************************************/
+
+ grouping installed-software-component {
+ leaf name {
+ type string;
+ description
+ "The name of the installed component as returned by the operating system.";
+ }
+ leaf version {
+ type string;
+ description
+ "The version of the installed component as returned by the operating system.";
+ }
+ leaf serial-number {
+ type string;
+ description
+ "As part of software licensing, a serial number may be available for the installation.";
+ }
+ container installation-file {
+ uses file;
+ description
+ "If available, the File that the installation was from.";
+ }
+// leaf-list child-installed-software-component {
+// type leafref {
+// path "/core-model:installed-software-component/core-model:child-installed-software-component/core-model:serial-number";
+// }
+// description
+// "References to any child installations.";
+// }
+ list installed-file-system-entry {
+ uses file-system-entry;
+ description
+ "References to any Directories or Files created or used by the installation. Note that installations may share files. So installation 1 may create key.dll in a common area, and installation 2 would create this if it wasn’t present. Because it is already present, installation 2 just references the file. Now if installation 1 is uninstalled, key.dll is not removed as there is still a reference to it.";
+ }
+ description
+ "InstalledSoftwareComponent is part of the software inventory. It represents an application or an application suite or an application (feature) option. It is the unit of installation. Note that this is operating system dependent. For example, Microsoft DOS 3.3 didn’t have an installation manager.";
+ }
+
+ grouping running-software-process {
+ leaf process-id {
+ type string;
+ description
+ "The identifier provided by the operating system.";
+ }
+ leaf priority {
+ type string;
+ description
+ "The process priority which is used by a multi-tasking operating system to assign resource allocations for the different running software processes.";
+ }
+ leaf invoking-user {
+ type string;
+ description
+ "The username of the account that invoked the process.";
+ }
+ leaf invoking-command {
+ type string;
+ description
+ "The command string that invoked the process.";
+ }
+ leaf time-invoked {
+ type yang:date-and-time;
+ description
+ "The date time when the process was invoked.";
+ }
+ leaf run-state {
+ type string;
+ description
+ "The current run state. A software process may be actively running or suspended (or some other state supported by the operating system).";
+ }
+ leaf name {
+ type string;
+ description
+ "The name of the process as assigned by the operating system.";
+ }
+ leaf description {
+ type string;
+ description
+ "The description of the process as assigned by the operating system.";
+ }
+ container executable {
+ uses file;
+ description
+ "A reference to the executable file (invoked via the invokingCommand). Note that the invoking command may not list the full file path.";
+ }
+ leaf-list child-software-process {
+ type string;
+ description
+ "References to a software process’s subprocesses and threads.";
+ }
+ list open-file {
+ uses file;
+ description
+ "References to any files opened and/or locked by the running process.";
+ }
+ description
+ "This is the unit of software execution. It could be a running application or a thread (the smallest level of software execution).";
+ }
+
+ grouping running-operating-system {
+ list running-software-process {
+ uses running-software-process;
+ description
+ "The software processes running under this operating system.";
+ }
+ list running-container-engine {
+ uses running-container-engine;
+ description
+ "The running container engines supported by the running operating system.";
+ }
+ leaf-list running-host-os-vmm {
+ type string;
+ description
+ "The host OS VMMs running under this operating system.";
+ }
+ uses running-software-process;
+ description
+ "An operating system is a running software process that enables software applications to utilize the computer’s hardware.";
+ }
+
+ grouping running-software-application {
+ uses running-software-process;
+ description
+ "This covers generic software processes that don’t have a special subclass (operating system, virtual machine and container special cases have their own specific subclasses).";
+ }
+
+ /****************************************
+ * package software-container
+ **************************************/
+
+ grouping running-container {
+ leaf container-boundary {
+ type string;
+ description
+ "The constraints defining the boundary of the Container.";
+ }
+ uses running-software-process;
+ description
+ "A container that has been activated by its container engine and hence can provide and consume resources.";
+ }
+
+ grouping running-container-engine {
+ list running-container {
+ uses running-container;
+ description
+ "The containers running in this container engine.";
+ }
+ uses running-software-process;
+ description
+ "A software process that abstracts running applications from the operating system. It provides some level of isolation, but not as much as a hypervisor.";
+ }
+
+ /****************************************
+ * package associations
+ **************************************/
+}
diff --git a/sdnr/wt/devicemanager-onap/onf14/provider/src/main/yang/ethernet-container-2-0.yang b/sdnr/wt/devicemanager-onap/onf14/provider/src/main/yang/ethernet-container-2-0.yang new file mode 100644 index 000000000..1f163f533 --- /dev/null +++ b/sdnr/wt/devicemanager-onap/onf14/provider/src/main/yang/ethernet-container-2-0.yang @@ -0,0 +1,1955 @@ +module ethernet-container-2-0 {
+ yang-version 1.1;
+ namespace "urn:onf:yang:ethernet-container-2-0";
+ prefix ethernet-container;
+
+ import ietf-yang-types {
+ prefix yang;
+ }
+ import core-model-1-4 {
+ prefix core-model;
+ }
+
+ organization
+ "openBackhaul.com proposal to Open Networking Foundation (ONF)";
+ contact
+ "WG Web : https://github.com/openBackhaul/Overview
+ WG List: Thorsten.Heinze@openBackhaul.com
+ Editor : Thorsten Heinze
+ Email : Thorsten.Heinze@openBackhaul.com";
+ description
+ "Technology specific amendment to the LayerProtocol class of the ONF Core IM for a transport resource for Ethernet.
+
+ Copyright 2019 openBackhaul.com
+
+ Licensed under the Apache License, Version 2.0 (the 'License');
+ you may not use this file except in compliance with the License.
+ You may obtain a copy of the License at
+ http://www.apache.org/licenses/LICENSE-2.0
+ Unless required by applicable law or agreed to in writing, software
+ distributed under the License is distributed on an 'AS IS' BASIS,
+ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ See the License for the specific language governing permissions and
+ limitations under the License.";
+
+ revision 2020-01-21 {
+ description
+ "Model for the Transport SDN Pilot at Telefonica Germany
+ Please view https://github.com/openBackhaul/ethernetContainer/issues for changes.";
+ reference
+ "https://github.com/openBackhaul/ethernetContainer/tree/tsp: Model definition
+ https://github.com/openBackhaul/onfCoreIm/tree/tsp: ONF TR-512 Core IM incl. Profile and enhanced Equipment definition";
+ }
+ revision 2019-11-23 {
+ description
+ "Model for the Transport SDN Pilot at Telefonica Germany
+ Please view https://github.com/openBackhaul/ethernetContainer/issues for changes.";
+ reference
+ "https://github.com/openBackhaul/ethernetContainer/tree/tsp: Model definition
+ https://github.com/openBackhaul/onfCoreIm/tree/tsp: ONF TR-512 Core IM incl. Profile and enhanced Equipment definition";
+ }
+ revision 2019-06-14 {
+ description
+ "Model for the Transport SDN Pilot at Telefonica Germany
+ Please view https://github.com/openBackhaul/ethernetContainer/issues for changes.";
+ reference
+ "https://github.com/openBackhaul/ethernetContainer/tree/tsp: Model definition
+ https://github.com/openBackhaul/onfCoreIm/tree/tsp: ONF TR-512 Core IM incl. Profile and enhanced Equipment definition";
+ }
+
+ identity LAYER_PROTOCOL_NAME_TYPE_ETHERNET_CONTAINER_LAYER {
+ base core-model:LAYER_PROTOCOL_NAME_TYPE;
+ description
+ "none";
+ }
+
+ augment "/core-model:control-construct/core-model:logical-termination-point/core-model:layer-protocol" {
+ when "derived-from-or-self(./core-model:layer-protocol-name, 'ethernet-container:LAYER_PROTOCOL_NAME_TYPE_ETHERNET_CONTAINER_LAYER')";
+ uses ethernet-container-lp-spec;
+ description
+ "none";
+ }
+
+ /****************************************
+ * package notifications
+ **************************************/
+
+ notification object-creation-notification {
+ uses object-creation-notification;
+ description
+ "none";
+ }
+
+ grouping object-creation-notification {
+ leaf counter {
+ type int64;
+ default "-1";
+ config false;
+ description
+ "Counts object creation notifications.";
+ }
+ leaf timestamp {
+ type yang:date-and-time;
+ default "2010-11-20T14:00:00+01:00";
+ config false;
+ description
+ "none";
+ }
+ leaf object-id-ref {
+ type leafref {
+ path "/core-model:control-construct/core-model:logical-termination-point/core-model:uuid";
+ require-instance false;
+ }
+ config false;
+ description
+ "none";
+ }
+ leaf object-type {
+ type string;
+ default "Type of created object not specified.";
+ config false;
+ description
+ "none";
+ }
+ description
+ "none";
+ }
+
+ notification object-deletion-notification {
+ uses object-deletion-notification;
+ description
+ "none";
+ }
+
+ grouping object-deletion-notification {
+ leaf counter {
+ type int64;
+ default "-1";
+ config false;
+ description
+ "Counts object deletion notifications.";
+ }
+ leaf timestamp {
+ type yang:date-and-time;
+ default "2010-11-20T14:00:00+01:00";
+ config false;
+ description
+ "none";
+ }
+ leaf object-id-ref {
+ type leafref {
+ path "/core-model:control-construct/core-model:logical-termination-point/core-model:uuid";
+ require-instance false;
+ }
+ config false;
+ description
+ "none";
+ }
+ description
+ "none";
+ }
+
+ notification attribute-value-changed-notification {
+ uses attribute-value-changed-notification;
+ description
+ "none";
+ }
+
+ grouping attribute-value-changed-notification {
+ leaf counter {
+ type int64;
+ default "-1";
+ config false;
+ description
+ "Counts attribute value changed notifications.";
+ }
+ leaf timestamp {
+ type yang:date-and-time;
+ default "2010-11-20T14:00:00+01:00";
+ config false;
+ description
+ "none";
+ }
+ leaf object-id-ref {
+ type leafref {
+ path "/core-model:control-construct/core-model:logical-termination-point/core-model:uuid";
+ require-instance false;
+ }
+ config false;
+ description
+ "none";
+ }
+ leaf attribute-name {
+ type string;
+ default "Attribute name not specified.";
+ config false;
+ description
+ "Name of the attribute that has been changed.";
+ }
+ leaf new-value {
+ type string;
+ default "New value not specified.";
+ config false;
+ description
+ "Attribute value converted to a string (xml, json, ...)";
+ }
+ description
+ "none";
+ }
+
+ notification problem-notification {
+ uses problem-notification;
+ description
+ "none";
+ }
+
+ grouping problem-notification {
+ leaf counter {
+ type int64;
+ default "-1";
+ config false;
+ description
+ "Counts problem notifications";
+ }
+ leaf timestamp {
+ type yang:date-and-time;
+ default "2010-11-20T14:00:00+01:00";
+ config false;
+ description
+ "none";
+ }
+ leaf object-id-ref {
+ type leafref {
+ path "/core-model:control-construct/core-model:logical-termination-point/core-model:uuid";
+ require-instance false;
+ }
+ config false;
+ description
+ "none";
+ }
+ leaf problem {
+ type string;
+ default "Problem name not specified.";
+ config false;
+ description
+ "Name of the problem according to supportedAlarmList";
+ }
+ leaf severity {
+ type severity-type;
+ default "SEVERITY_TYPE_WARNING";
+ config false;
+ description
+ "Severity of the problem according to problemKindSeverity";
+ }
+ description
+ "none";
+ }
+
+ /****************************************
+ * grouping statements for object classes
+ **************************************/
+ /****************************************
+ * package super-classes
+ **************************************/
+
+ grouping current-problem {
+ leaf sequence-number {
+ type int16;
+ config false;
+ description
+ "Unique sequence number of the current problem object.";
+ }
+ leaf timestamp {
+ type yang:date-and-time;
+ default "2010-11-20T14:00:00+01:00";
+ config false;
+ description
+ "Time when the alarm was raised.";
+ }
+ leaf problem-severity {
+ type severity-type;
+ default "SEVERITY_TYPE_NOT_YET_DEFINED";
+ config false;
+ description
+ "Severity of the alarm.";
+ }
+ description
+ "none";
+ }
+
+ grouping current-performance {
+ leaf timestamp {
+ type yang:date-and-time;
+ default "2010-11-20T14:00:00+01:00";
+ config false;
+ description
+ "The timestamp associated with when the current data was collected.";
+ }
+ leaf suspect-interval-flag {
+ type boolean;
+ default "false";
+ config false;
+ description
+ "This attribute is used to indicate that the performance data for the current period may not be reliable. Some reasons for this to occur are:
+ – Suspect data were detected by the actual resource doing data collection.
+ – Transition of the administrativeState attribute to/from the 'lock' state.
+ – Transition of the operationalState to/from the 'disabled' state.
+ – Scheduler setting that inhibits the collection function.
+ – The performance counters were reset during the interval.
+ – The currentData (or subclass) object instance was created during the monitoring period.";
+ }
+ leaf elapsed-time {
+ type int64;
+ units "s";
+ default "-1";
+ config false;
+ description
+ "Number of seconds that elapsed since the last reset of the counter.";
+ }
+ leaf scanner-id {
+ type string;
+ default "Scanner ID not defined.";
+ config false;
+ description
+ "none";
+ }
+ leaf granularity-period {
+ type granularity-period-type;
+ config false;
+ description
+ "Time period between reset of the underlying counter.";
+ }
+ description
+ "none";
+ }
+
+ grouping historical-performance {
+ leaf suspect-interval-flag {
+ type boolean;
+ default "false";
+ config false;
+ description
+ "This attribute indicates that the data collected during the interval is suspect.";
+ }
+ leaf history-data-id {
+ type string;
+ default "History Data ID not defined.";
+ config false;
+ description
+ "none";
+ }
+ leaf granularity-period {
+ type granularity-period-type;
+ config false;
+ description
+ "Time period between reset of the underlying counter.";
+ }
+ leaf period-end-time {
+ type yang:date-and-time;
+ config false;
+ description
+ "Time when the counter values have been recorded and the counter reset.";
+ }
+ description
+ "none";
+ }
+
+ grouping ethernet-container-lp-spec {
+ container ethernet-container-pac {
+ uses ethernet-container-pac;
+ description
+ "none";
+ }
+ description
+ "none";
+ }
+
+ grouping ethernet-container-pac {
+ container ethernet-container-capability {
+ config false;
+ uses ethernet-container-capability;
+ description
+ "none";
+ }
+ container ethernet-container-configuration {
+ uses ethernet-container-configuration;
+ description
+ "none";
+ }
+ container ethernet-container-status {
+ config false;
+ uses ethernet-container-status;
+ description
+ "none";
+ }
+ container ethernet-container-current-problems {
+ config false;
+ uses ethernet-container-current-problems;
+ description
+ "none";
+ }
+ container ethernet-container-current-performance {
+ config false;
+ uses ethernet-container-current-performance;
+ description
+ "none";
+ }
+ container ethernet-container-historical-performances {
+ config false;
+ uses ethernet-container-historical-performances;
+ description
+ "none";
+ }
+ description
+ "none";
+ }
+
+ grouping ethernet-container-capability {
+ list available-queue-list {
+ key "queue-name";
+ config false;
+ min-elements 1;
+ max-elements 8;
+ uses available-queue-type;
+ description
+ "List of queues, which are available at the physical interface.";
+ }
+ leaf explicit-congestion-notification-is-avail {
+ type boolean;
+ default "false";
+ config false;
+ description
+ "1 = Explicit Congestion Notification is available at this queue.";
+ }
+ leaf ingress-policing-is-avail {
+ type boolean;
+ default "false";
+ config false;
+ description
+ "1 = This interface supports policing.";
+ }
+ leaf egress-shaping-is-avail {
+ type boolean;
+ default "false";
+ config false;
+ description
+ "1 = This interface supports shaping.";
+ }
+ leaf information-rate-min {
+ type int32;
+ units "kbit/s";
+ default "-1";
+ config false;
+ description
+ "Only relevant if (egressShapingIsAvail==1): Minimum configurable throuput in kbit/s.";
+ }
+ leaf information-rate-max {
+ type int32;
+ units "kbit/s";
+ default "-1";
+ config false;
+ description
+ "Only relevant if (egressShapingIsAvail==1): Maximum configurable throuput in kbit/s.";
+ }
+ leaf burst-size-min {
+ type int16;
+ units "kByte";
+ default "-1";
+ config false;
+ description
+ "Only relevant if (egressShapingIsAvail==1): Minimum configurable value for the number of kBytes, which could be sent in a single burst.";
+ }
+ leaf burst-size-max {
+ type int16;
+ units "kByte";
+ default "-1";
+ config false;
+ description
+ "Only relevant if (egressShapingIsAvail==1): Maximum configurable value for the number of kBytes, which could be sent in a single burst.";
+ }
+ leaf bundling-is-avail {
+ type boolean;
+ default "false";
+ config false;
+ description
+ "This attribute has to be set on 'true', if the device allows combining resources from several air interfaces for transporting this Ethernet container.";
+ }
+ leaf bundling-group-size-max {
+ type int8;
+ default "-1";
+ config false;
+ description
+ "802.3 according to 30.11.1.1.6 aLocalPAFCapacity and ITU-T Rec. G.998.3 Appendix II aGroupCapacity. No Mbit/s value, but number of Ethernet Segments that can be aggregated for transporting this Ethernet Container. Reasonable values are between1 and 32.";
+ }
+ leaf support-of-management-frames-without-preamble-is-avail {
+ type boolean;
+ default "false";
+ config false;
+ description
+ "802.3. 1 = Management frames with suppressed preamble are also accepted.";
+ }
+ list supported-header-compression-kind-list {
+ key "header-compression-name";
+ config false;
+ min-elements 1;
+ uses header-compression-kind;
+ description
+ "Lists the kinds of header compression, which are supported by the device.";
+ }
+ leaf fec-is-avail {
+ type boolean;
+ default "false";
+ config false;
+ description
+ "802.3 according to 30.5.1.1.15 aFECAbility, 45.2.1.92.1 BASE-R FEC ability and 45.2.3.37 10GBASE-PR and 10/1GBASE-PRX FEC ability register and ITU-T Rec. G.998.3 Appendix II aFECSupported. 1 = Indicates that an optional Forward Error Correction (FEC) is supported.";
+ }
+ leaf fec-word-size-max {
+ type int16;
+ units "Byte";
+ default "-1";
+ config false;
+ description
+ "ITU-T Rec. G.998.3 Appendix II aFECWordSize. Indicates maximum supported Forward Error Correction (FEC) code word size in Bytes. Expected values between 20 and 255.";
+ }
+ leaf-list supported-fec-redundancy-size-list {
+ type fec-redundancy-size-type;
+ config false;
+ min-elements 1;
+ description
+ "ITU-T Rec. G.998.3 Appendix II aFECRedundancySize. Indicates maximum supported Forward Error Correction (FEC) redundancy word size.";
+ }
+ leaf-list supported-fec-interleaver-kind-list {
+ type fec-interleaver-kind-type;
+ config false;
+ min-elements 1;
+ description
+ "ITU-T Rec. G.998.3 Appendix II aFECInterleaverType. Supported kinds of Forward Error Correction (FEC) interleaver";
+ }
+ leaf-list supported-fec-interleaver-depth-list {
+ type fec-interleaver-depth-type;
+ config false;
+ min-elements 1;
+ description
+ "ITU-T Rec. G.998.3 Appendix II aFECInterleaverDepth. Indicates the supported depths of the Forward Error Correction (FEC) interleaver.";
+ }
+ leaf encryption-is-avail {
+ type boolean;
+ default "false";
+ config false;
+ description
+ "Shall be marked 'true', if Ethernet payload encryption is available.";
+ }
+ leaf admin-shut-down-is-avail {
+ type boolean;
+ default "false";
+ config false;
+ description
+ "1 = Manual switching on and off of the interface without deleting it (underlying OSI network layers are also not affected) is available.";
+ }
+ leaf-list supported-loop-back-kind-list {
+ type loop-back-type;
+ config false;
+ min-elements 1;
+ max-elements 3;
+ description
+ "List of supported kinds of looping back.";
+ }
+ leaf maintenance-timer-range {
+ type string;
+ default "Range of the maintenance timer not yet defined.";
+ config false;
+ description
+ "Available time periods for maintenance configurations to be described. Concrete values shall be separated by commas (e.g. '10, 60, 360'). Ranges shall be expressed as two values separated by a minus (e.g. '10-360').";
+ }
+ leaf statistics-is-avail {
+ type boolean;
+ default "false";
+ config false;
+ description
+ "1 = Continuous statistics counters are available.";
+ }
+ leaf-list supported-alarm-list {
+ type string;
+ config false;
+ min-elements 2;
+ description
+ "Available alarms to be listed. Mandatory:'framingIsFaulty' and 'containerIsDown'. Further alarms might be added by the vendor.";
+ }
+ leaf performance-monitoring-is-avail {
+ type boolean;
+ default "false";
+ config false;
+ description
+ "1 = Collection and aggregation of performance values is available.";
+ }
+ description
+ "none";
+ }
+
+ grouping ethernet-container-configuration {
+ leaf interface-name {
+ type string;
+ default "Interface name not yet defined.";
+ description
+ "Description of the interface, could be a name, could be a number. Free text field to be filled by the operator.";
+ }
+ leaf interface-is-on {
+ type boolean;
+ default "false";
+ description
+ "Only relevant if (adminShutDownIsAvail==1). 1 = Activation of the interface. 0 = De-activation of the interface without deleting it (underlying OSI network layers are not affected).";
+ }
+ list queue-behavior-list {
+ key "queue-name";
+ min-elements 1;
+ max-elements 8;
+ uses queue-behavior-type;
+ description
+ "Defines scheduling and dropping behavior of all queues.";
+ }
+ leaf explicit-congestion-notification-is-on {
+ type boolean;
+ default "false";
+ description
+ "1 = Explicit Congestion Notification is activitated at this queue.";
+ }
+ leaf ingress-policing-profile {
+ type leafref {
+ path "/core-model:control-construct/core-model:profile-collection/core-model:profile/core-model:uuid";
+ require-instance false;
+ }
+ description
+ "Reference to the policing profile, which is active on this interface. Attribute to point to an instance of Profile with profileName=='PROFILE_NAME_TYPE_POLICING_PROFILE'.";
+ }
+ leaf egress-shaping-is-on {
+ type boolean;
+ default "false";
+ description
+ "1 = Shaping on the egress is activated.";
+ }
+ leaf maximum-information-rate {
+ type int32;
+ units "kbit/s";
+ default "-1";
+ description
+ "Only relevant if (egressShapingIsAvail==1): Limits the throughput on the egress.";
+ }
+ leaf maximum-burst-size {
+ type int16;
+ units "kByte";
+ default "-1";
+ description
+ "Only relevant if (egressShapingIsAvail==1): Limits the number of kBytes, which are sent in a single burst.";
+ }
+ leaf bundling-is-on {
+ type boolean;
+ default "false";
+ description
+ "802.3 according to 30.11.1.1.5 aPAFAdminState and 45.2.3.26.3 PAF enable. 1 = Algorithm for bundling Ethernet segments is activated (, even if only a single Structure would be associated).";
+ }
+ leaf header-compression-kind {
+ type leafref {
+ path "/core-model:control-construct/core-model:logical-termination-point/core-model:layer-protocol/ethernet-container:ethernet-container-pac/ethernet-container:ethernet-container-capability/ethernet-container:supported-header-compression-kind-list/ethernet-container:header-compression-name";
+ require-instance false;
+ }
+ must 'boolean(/core-model:control-construct/core-model:logical-termination-point/core-model:layer-protocol/ethernet-container:ethernet-container-pac/ethernet-container:ethernet-container-capability/ethernet-container:supported-header-compression-kind-list[header-compression-name=current()])';
+ description
+ "Defines the kind of header compression to be used.";
+ }
+ leaf fec-is-on {
+ type boolean;
+ default "false";
+ description
+ "802.3 according to 30.5.1.1.16 aFECmode, 45.2.1.93.1 FEC enable and 45.2.3.38.2 10 Gb/s FEC Enable and ITU-T Rec. G.998.3 Appendix II aFECAdminState. Only relevant if (fecIsAvail==1). 1 = Activation of the Forward Error Correction (FEC).";
+ }
+ leaf fec-word-size {
+ type int16;
+ units "Byte";
+ default "-1";
+ description
+ "ITU-T Rec. G.998.3 Appendix II aFECWordSize. Only relevant if (fecIsSupported==1). Defining the Forward Error Correction (FEC) code word size in Bytes. Expected values between 20 and 255.";
+ }
+ leaf fec-redundancy-size {
+ type fec-redundancy-size-type;
+ default "FEC_REDUNDANCY_SIZE_TYPE_NOT_YET_DEFINED";
+ description
+ "ITU-T Rec. G.998.3 Appendix II aFECRedundancySize. Only relevant if (fecIsSupported==1). Defining the Forward Error Correction (FEC) redundancy word size.";
+ }
+ leaf fec-interleaver-kind {
+ type fec-interleaver-kind-type;
+ default "FEC_INTERLEAVER_KIND_TYPE_NOT_YET_DEFINED";
+ description
+ "ITU-T Rec. G.998.3 Appendix II aFECInterleaverType. Only relevant if (fecIsSupported==1). Defining the kind of Forward Error Correction (FEC) interleaver.";
+ }
+ leaf fec-interleaver-depth {
+ type fec-interleaver-depth-type;
+ default "FEC_INTERLEAVER_DEPTH_TYPE_NOT_YET_DEFINED";
+ description
+ "ITU-T Rec. G.998.3 Appendix II aFECInterleaverDepth. Only relevant if (fecIsSupported==1). Defining the depth of Forward Error Correction (FEC) interleaver.";
+ }
+ leaf encryption-is-on {
+ type boolean;
+ default "false";
+ description
+ "Activates encryption of the Ethernet payload.";
+ }
+ leaf cryptographic-key {
+ type string;
+ default "Cryptographic key not yet defined.";
+ description
+ "Key for transforming plaintext into cipher text data.";
+ }
+ leaf loop-back-kind-on {
+ type loop-back-type;
+ default "LOOP_BACK_TYPE_NOT_YET_DEFINED";
+ description
+ "Maintenance Feature. Configuration of a loop back of TDM time slots on this interface.";
+ }
+ leaf maintenance-timer {
+ type int32;
+ units "s";
+ default "-1";
+ description
+ "Time of existence of any maintenance configuration. 0 = maintenance timer is switched off. Valid values are defined in *Capability::maintenanceTimerRange.";
+ }
+ leaf statistics-is-on {
+ type boolean;
+ default "false";
+ description
+ "Only relevant if (statisticsIsAvail==1). 1 = Continuous statistics counters are switched on.";
+ }
+ list problem-kind-severity-list {
+ key "problem-kind-name";
+ min-elements 2;
+ uses problem-kind-severity-type;
+ description
+ "Severity of the problem to be configured.";
+ }
+ leaf performance-monitoring-is-on {
+ type boolean;
+ default "false";
+ description
+ "Only relevant if (performanceMonitoringIsAvail==1). 1 = Collection and aggregation of performance values is switched on.";
+ }
+ description
+ "Serving Structures are identified by LogicalTerminationPoint::_serverLtpRefList. If (bundlingIsAvail==1), multiplicity might be *. If (bundlingIsAvail==0), multiplicity must be 0..1. It is assumed that there is just one Ethernet segment per Structure.";
+ }
+
+ grouping ethernet-container-status {
+ leaf interface-status {
+ type interface-status-type;
+ default "INTERFACE_STATUS_TYPE_NOT_YET_DEFINED";
+ config false;
+ description
+ "Operational status of the interface.";
+ }
+ leaf bundling-is-up {
+ type boolean;
+ default "false";
+ config false;
+ description
+ "802.3 and ITU-T Rec. G.998.3 Appendix II aGroupStatus. 1 = Algorithm for bundling Ethernet segments is operative (, even if only a single Structure would be associated).";
+ }
+ leaf remote-site-is-faulty {
+ type boolean;
+ default "false";
+ config false;
+ description
+ "802.3. 1 = remote fault condition detected.";
+ }
+ leaf loop-back-kind-up {
+ type loop-back-type;
+ default "LOOP_BACK_TYPE_NOT_YET_DEFINED";
+ config false;
+ description
+ "The currently active (not just configured) type of loop back.";
+ }
+ leaf statistics-is-up {
+ type boolean;
+ default "false";
+ config false;
+ description
+ "1 = Statistics are currently counted";
+ }
+ leaf performance-monitoring-is-up {
+ type boolean;
+ default "false";
+ config false;
+ description
+ "1 = Performance values are currently collected and aggregated.";
+ }
+ leaf timestamp {
+ type yang:date-and-time;
+ default "2010-11-20T14:00:00+01:00";
+ config false;
+ description
+ "The timestamp associated with when the statistic values were read/retrieved.";
+ }
+ leaf last-10-sec-data-input-rate {
+ type int32;
+ units "kbit/s";
+ default "-1";
+ config false;
+ description
+ "Data receive rate over the last 10 second interval in kbit/s.";
+ }
+ leaf last-10-sec-data-output-rate {
+ type int32;
+ units "kbit/s";
+ default "-1";
+ config false;
+ description
+ "Data transmit rate over the last 10 second interval in kbit/s.";
+ }
+ leaf total-bytes-input {
+ type uint64;
+ units "Byte";
+ default "0";
+ config false;
+ description
+ "Received data volume in Byte.";
+ }
+ leaf total-bytes-output {
+ type uint64;
+ units "Byte";
+ default "0";
+ config false;
+ description
+ "Sent data volume in Byte.";
+ }
+ leaf forwarded-bytes-input {
+ type uint64;
+ units "Byte";
+ default "0";
+ config false;
+ description
+ "Number of received Bytes, for which the device was not their final destination and for which the device attempted to find a route to forward them to that final destination.";
+ }
+ leaf forwarded-bytes-output {
+ type uint64;
+ units "Byte";
+ default "0";
+ config false;
+ description
+ "Number of Bytes, for which the device was not their final destination and for which it was successful in finding a path to their final destination.";
+ }
+ description
+ "none";
+ }
+
+ grouping ethernet-container-current-problems {
+ list current-problem-list {
+ key "sequence-number";
+ config false;
+ uses container-current-problem-type;
+ description
+ "none";
+ }
+ leaf number-of-current-problems {
+ type int8;
+ default "-1";
+ config false;
+ description
+ "Number of alarms, which are currently active on this interface.";
+ }
+ leaf time-of-latest-change {
+ type yang:date-and-time;
+ default "2010-11-20T14:00:00+01:00";
+ config false;
+ description
+ "Date and time when the list of alarms has been changed for the last time.";
+ }
+ description
+ "none";
+ }
+
+ grouping ethernet-container-current-performance {
+ list current-performance-data-list {
+ key "granularity-period";
+ config false;
+ min-elements 1;
+ max-elements 2;
+ uses container-current-performance-type;
+ description
+ "none";
+ }
+ leaf number-of-current-performance-sets {
+ type int8;
+ default "-1";
+ config false;
+ description
+ "Number of sets of current performance values, which are provided in the list.";
+ }
+ description
+ "Aggregated performance information of the Ethernet container at a particular moment.";
+ }
+
+ grouping ethernet-container-historical-performances {
+ list historical-performance-data-list {
+ key "granularity-period period-end-time";
+ config false;
+ uses container-historical-performance-type;
+ description
+ "none";
+ }
+ leaf number-of-historical-performance-sets {
+ type int16;
+ default "-1";
+ config false;
+ description
+ "Number of sets of historical performance values, which are provided in the list.";
+ }
+ leaf time-of-latest-change {
+ type yang:date-and-time;
+ default "2010-11-20T14:00:00+01:00";
+ config false;
+ description
+ "Date and time when the list of sets of historical performance values has been changed for the last time (e.g. new one added or existing one deleted).";
+ }
+ description
+ "Aggregated performance information of the Ethernet container for a pre-defined measurement interval.";
+ }
+
+ grouping header-compression-kind {
+ leaf header-compression-name {
+ type string;
+ config false;
+ description
+ "none";
+ }
+ leaf header-compression-mode {
+ type header-compression-mode-type;
+ default "HEADER_COMPRESSION_MODE_TYPE_NOT_YET_DEFINED";
+ config false;
+ description
+ "Defines the way of configuring the header compression.";
+ }
+ leaf-list compressed-protocol-layer-list {
+ type protocol-layer-type;
+ config false;
+ min-elements 1;
+ description
+ "Only relevant if (headerCompressionMode==PROTOCOL_BASED). List of protocol layers that get compressed with this kind of header compression.";
+ }
+ leaf-list mpls-payload-kind-list {
+ type mpls-payload-kind-type;
+ config false;
+ min-elements 1;
+ description
+ "Defines how the header bytes inside the MPLS header has to be interpreted.";
+ }
+ leaf compressed-header-length {
+ type int16;
+ units "Byte";
+ default "-1";
+ config false;
+ description
+ "Only relevant if (headerCompressionMode==LENGTH_BASED). Number of Bytes of header information that get compressed.";
+ }
+ description
+ "none";
+ }
+
+ /****************************************
+ * typedef statements
+ **************************************/
+
+ typedef loop-back-type {
+ type identityref {
+ base LOOP_BACK_TYPE;
+ }
+ description
+ "none";
+ }
+
+ typedef header-compression-mode-type {
+ type identityref {
+ base HEADER_COMPRESSION_MODE_TYPE;
+ }
+ description
+ "none";
+ }
+
+ typedef protocol-layer-type {
+ type identityref {
+ base PROTOCOL_LAYER_TYPE;
+ }
+ description
+ "none";
+ }
+
+ typedef mpls-payload-kind-type {
+ type identityref {
+ base MPLS_PAYLOAD_KIND_TYPE;
+ }
+ description
+ "none";
+ }
+
+ typedef queue-name-type {
+ type identityref {
+ base QUEUE_NAME_TYPE;
+ }
+ description
+ "none";
+ }
+
+ typedef drop-precedence-type {
+ type identityref {
+ base DROP_PRECEDENCE_TYPE;
+ }
+ description
+ "none";
+ }
+
+ typedef dropping-behavior-kind-type {
+ type identityref {
+ base DROPPING_BEHAVIOR_KIND_TYPE;
+ }
+ description
+ "none";
+ }
+
+ typedef scheduler-kind-type {
+ type identityref {
+ base SCHEDULER_KIND_TYPE;
+ }
+ description
+ "none";
+ }
+
+ typedef fec-redundancy-size-type {
+ type identityref {
+ base FEC_REDUNDANCY_SIZE_TYPE;
+ }
+ description
+ "none";
+ }
+
+ typedef fec-interleaver-kind-type {
+ type identityref {
+ base FEC_INTERLEAVER_KIND_TYPE;
+ }
+ description
+ "none";
+ }
+
+ typedef fec-interleaver-depth-type {
+ type identityref {
+ base FEC_INTERLEAVER_DEPTH_TYPE;
+ }
+ description
+ "ITU-T Rec. G.998.3 Appendix II aFECInterleaverDepth";
+ }
+
+ /*********************************************
+ * grouping statements for complex data types
+ *******************************************/
+
+ identity LOOP_BACK_TYPE {
+ description
+ "none";
+ }
+
+ identity LOOP_BACK_TYPE_NONE {
+ base LOOP_BACK_TYPE;
+ description
+ "none";
+ }
+
+ identity LOOP_BACK_TYPE_BACK_TO_LOCAL {
+ base LOOP_BACK_TYPE;
+ description
+ "Returning the Ethernet frames of the local site on the outgoing interface back to the local site.";
+ }
+
+ identity LOOP_BACK_TYPE_BACK_TO_REMOTE {
+ base LOOP_BACK_TYPE;
+ description
+ "Returning the incoming Ethernet frames back to the remote site.";
+ }
+
+ identity LOOP_BACK_TYPE_NOT_YET_DEFINED {
+ base LOOP_BACK_TYPE;
+ description
+ "none";
+ }
+
+ identity HEADER_COMPRESSION_MODE_TYPE {
+ description
+ "none";
+ }
+
+ identity HEADER_COMPRESSION_MODE_TYPE_AUTO {
+ base HEADER_COMPRESSION_MODE_TYPE;
+ description
+ "The header compression algorithm determines the optimum compression.";
+ }
+
+ identity HEADER_COMPRESSION_MODE_TYPE_PROTOCOL_BASED {
+ base HEADER_COMPRESSION_MODE_TYPE;
+ description
+ "Predefined protocol layers are to be compressed.";
+ }
+
+ identity HEADER_COMPRESSION_MODE_TYPE_LENGTH_BASED {
+ base HEADER_COMPRESSION_MODE_TYPE;
+ description
+ "Predefined amount of header bytes are to be compressed.";
+ }
+
+ identity HEADER_COMPRESSION_MODE_TYPE_NOT_YET_DEFINED {
+ base HEADER_COMPRESSION_MODE_TYPE;
+ description
+ "none";
+ }
+
+ identity PROTOCOL_LAYER_TYPE {
+ description
+ "none";
+ }
+
+ identity PROTOCOL_LAYER_TYPE_NONE {
+ base PROTOCOL_LAYER_TYPE;
+ description
+ "none";
+ }
+
+ identity PROTOCOL_LAYER_TYPE_ETHERNET_MAC {
+ base PROTOCOL_LAYER_TYPE;
+ description
+ "none";
+ }
+
+ identity PROTOCOL_LAYER_TYPE_VLAN {
+ base PROTOCOL_LAYER_TYPE;
+ description
+ "none";
+ }
+
+ identity PROTOCOL_LAYER_TYPE_Q_IN_Q {
+ base PROTOCOL_LAYER_TYPE;
+ description
+ "none";
+ }
+
+ identity PROTOCOL_LAYER_TYPE_MPLS {
+ base PROTOCOL_LAYER_TYPE;
+ description
+ "none";
+ }
+
+ identity PROTOCOL_LAYER_TYPE_IPV4 {
+ base PROTOCOL_LAYER_TYPE;
+ description
+ "none";
+ }
+
+ identity PROTOCOL_LAYER_TYPE_IPV6 {
+ base PROTOCOL_LAYER_TYPE;
+ description
+ "none";
+ }
+
+ identity PROTOCOL_LAYER_TYPE_TCP {
+ base PROTOCOL_LAYER_TYPE;
+ description
+ "none";
+ }
+
+ identity PROTOCOL_LAYER_TYPE_UDP {
+ base PROTOCOL_LAYER_TYPE;
+ description
+ "none";
+ }
+
+ identity PROTOCOL_LAYER_TYPE_RTP {
+ base PROTOCOL_LAYER_TYPE;
+ description
+ "none";
+ }
+
+ identity PROTOCOL_LAYER_TYPE_GTP_U {
+ base PROTOCOL_LAYER_TYPE;
+ description
+ "none";
+ }
+
+ identity PROTOCOL_LAYER_TYPE_OTHERS {
+ base PROTOCOL_LAYER_TYPE;
+ description
+ "none";
+ }
+
+ identity PROTOCOL_LAYER_TYPE_NOT_YET_DEFINED {
+ base PROTOCOL_LAYER_TYPE;
+ description
+ "none";
+ }
+
+ identity MPLS_PAYLOAD_KIND_TYPE {
+ description
+ "none";
+ }
+
+ identity MPLS_PAYLOAD_KIND_TYPE_NONE {
+ base MPLS_PAYLOAD_KIND_TYPE;
+ description
+ "Parameter not required.";
+ }
+
+ identity MPLS_PAYLOAD_KIND_TYPE_AUTO {
+ base MPLS_PAYLOAD_KIND_TYPE;
+ description
+ "If the Control Word (CW) will be present, it would be Ethernet Over MPLS. OtherwiseI, it would be Pv4/IPv6.";
+ }
+
+ identity MPLS_PAYLOAD_KIND_TYPE_ETH_O_MPLS {
+ base MPLS_PAYLOAD_KIND_TYPE;
+ description
+ "Always Ethernet over MPLS ";
+ }
+
+ identity MPLS_PAYLOAD_KIND_TYPE_IP_O_MPLS {
+ base MPLS_PAYLOAD_KIND_TYPE;
+ description
+ "Always IPv4/IPv6 over MPLS";
+ }
+
+ identity MPLS_PAYLOAD_KIND_TYPE_NOT_YET_DEFINED {
+ base MPLS_PAYLOAD_KIND_TYPE;
+ description
+ "none";
+ }
+
+ identity QUEUE_NAME_TYPE {
+ description
+ "none";
+ }
+
+ identity QUEUE_NAME_TYPE_BEST_EFFORT_QUEUE {
+ base QUEUE_NAME_TYPE;
+ description
+ "QueueNumber=0;";
+ }
+
+ identity QUEUE_NAME_TYPE_ASSURED_FORWARDING_QUEUE1 {
+ base QUEUE_NAME_TYPE;
+ description
+ "QueueNumber=1;";
+ }
+
+ identity QUEUE_NAME_TYPE_ASSURED_FORWARDING_QUEUE2 {
+ base QUEUE_NAME_TYPE;
+ description
+ "QueueNumber=2;";
+ }
+
+ identity QUEUE_NAME_TYPE_ASSURED_FORWARDING_QUEUE3 {
+ base QUEUE_NAME_TYPE;
+ description
+ "QueueNumber=3;";
+ }
+
+ identity QUEUE_NAME_TYPE_ASSURED_FORWARDING_QUEUE4 {
+ base QUEUE_NAME_TYPE;
+ description
+ "QueueNumber=4;";
+ }
+
+ identity QUEUE_NAME_TYPE_EXPEDITED_FORWARDING_QUEUE {
+ base QUEUE_NAME_TYPE;
+ description
+ "QueueNumber=5;";
+ }
+
+ identity QUEUE_NAME_TYPE_CLASS_SELECTOR_QUEUE6 {
+ base QUEUE_NAME_TYPE;
+ description
+ "QueueNumber=6;";
+ }
+
+ identity QUEUE_NAME_TYPE_CLASS_SELECTOR_QUEUE7 {
+ base QUEUE_NAME_TYPE;
+ description
+ "QueueNumber=7;";
+ }
+
+ identity QUEUE_NAME_TYPE_QUEUENAME_NOT_YET_DEFINED {
+ base QUEUE_NAME_TYPE;
+ description
+ "none";
+ }
+
+ identity DROP_PRECEDENCE_TYPE {
+ description
+ "none";
+ }
+
+ identity DROP_PRECEDENCE_TYPE_ALL {
+ base DROP_PRECEDENCE_TYPE;
+ description
+ "If all drop precedence are affected. This includes the case of drop precedences are not implemented.";
+ }
+
+ identity DROP_PRECEDENCE_TYPE_LOW {
+ base DROP_PRECEDENCE_TYPE;
+ description
+ "Would be equal to GREEN.";
+ }
+
+ identity DROP_PRECEDENCE_TYPE_MEDIUM {
+ base DROP_PRECEDENCE_TYPE;
+ description
+ "Would be equal to YELLOW.";
+ }
+
+ identity DROP_PRECEDENCE_TYPE_HIGH {
+ base DROP_PRECEDENCE_TYPE;
+ description
+ "Would be equal to RED.";
+ }
+
+ identity DROP_PRECEDENCE_TYPE_NOT_YET_DEFINED {
+ base DROP_PRECEDENCE_TYPE;
+ description
+ "none";
+ }
+
+ identity DROPPING_BEHAVIOR_KIND_TYPE {
+ description
+ "none";
+ }
+
+ identity DROPPING_BEHAVIOR_KIND_TYPE_DROP_TAIL {
+ base DROPPING_BEHAVIOR_KIND_TYPE;
+ description
+ "When the queue is filled to capacity, newly arriving packets are discarded until there is room in the queue to accept new traffic. Packets are not differentiated, i.e., all packets are treated identically.";
+ }
+
+ identity DROPPING_BEHAVIOR_KIND_TYPE_RED {
+ base DROPPING_BEHAVIOR_KIND_TYPE;
+ description
+ "Queue management based on Random Early Detection (RED). RED drops packets based on a drop probability that is based on the average queue length, and settings of mininum and maximum queue thresholds. On ECN-capable devices, packets may be marked instead of dropped to signal congestion to the sender.";
+ }
+
+ identity DROPPING_BEHAVIOR_KIND_TYPE_WRED {
+ base DROPPING_BEHAVIOR_KIND_TYPE;
+ description
+ "Queue management based on a variant of RED in which the packet drop probability is based on its traffic class.";
+ }
+
+ identity DROPPING_BEHAVIOR_KIND_TYPE_NOT_YET_DEFINED {
+ base DROPPING_BEHAVIOR_KIND_TYPE;
+ description
+ "none";
+ }
+
+ identity SCHEDULER_KIND_TYPE {
+ description
+ "none";
+ }
+
+ identity SCHEDULER_KIND_TYPE_STRICT {
+ base SCHEDULER_KIND_TYPE;
+ description
+ "Strict Priority";
+ }
+
+ identity SCHEDULER_KIND_TYPE_WFQ {
+ base SCHEDULER_KIND_TYPE;
+ description
+ "Weighted-Fair-Queuing";
+ }
+
+ identity SCHEDULER_KIND_TYPE_WRR {
+ base SCHEDULER_KIND_TYPE;
+ description
+ "Weighted Round Robin";
+ }
+
+ identity SCHEDULER_KIND_TYPE_DWRR {
+ base SCHEDULER_KIND_TYPE;
+ description
+ "Deficit Weighted Round Robin";
+ }
+
+ identity SCHEDULER_KIND_TYPE_NOT_YET_DEFINED {
+ base SCHEDULER_KIND_TYPE;
+ description
+ "none";
+ }
+
+ identity FEC_REDUNDANCY_SIZE_TYPE {
+ description
+ "none";
+ }
+
+ identity FEC_REDUNDANCY_SIZE_TYPE_2 {
+ base FEC_REDUNDANCY_SIZE_TYPE;
+ description
+ "none";
+ }
+
+ identity FEC_REDUNDANCY_SIZE_TYPE_4 {
+ base FEC_REDUNDANCY_SIZE_TYPE;
+ description
+ "none";
+ }
+
+ identity FEC_REDUNDANCY_SIZE_TYPE_8 {
+ base FEC_REDUNDANCY_SIZE_TYPE;
+ description
+ "none";
+ }
+
+ identity FEC_REDUNDANCY_SIZE_TYPE_16 {
+ base FEC_REDUNDANCY_SIZE_TYPE;
+ description
+ "none";
+ }
+
+ identity FEC_REDUNDANCY_SIZE_TYPE_20 {
+ base FEC_REDUNDANCY_SIZE_TYPE;
+ description
+ "none";
+ }
+
+ identity FEC_REDUNDANCY_SIZE_TYPE_NOT_YET_DEFINED {
+ base FEC_REDUNDANCY_SIZE_TYPE;
+ description
+ "none";
+ }
+
+ identity FEC_INTERLEAVER_KIND_TYPE {
+ description
+ "none";
+ }
+
+ identity FEC_INTERLEAVER_KIND_TYPE_NONE {
+ base FEC_INTERLEAVER_KIND_TYPE;
+ description
+ "none";
+ }
+
+ identity FEC_INTERLEAVER_KIND_TYPE_BLOCK {
+ base FEC_INTERLEAVER_KIND_TYPE;
+ description
+ "none";
+ }
+
+ identity FEC_INTERLEAVER_KIND_TYPE_CONVOLUTION {
+ base FEC_INTERLEAVER_KIND_TYPE;
+ description
+ "none";
+ }
+
+ identity FEC_INTERLEAVER_KIND_TYPE_NOT_YET_DEFINED {
+ base FEC_INTERLEAVER_KIND_TYPE;
+ description
+ "none";
+ }
+
+ identity FEC_INTERLEAVER_DEPTH_TYPE {
+ description
+ "none";
+ }
+
+ identity FEC_INTERLEAVER_DEPTH_TYPE_1 {
+ base FEC_INTERLEAVER_DEPTH_TYPE;
+ description
+ "none";
+ }
+
+ identity FEC_INTERLEAVER_DEPTH_TYPE_2 {
+ base FEC_INTERLEAVER_DEPTH_TYPE;
+ description
+ "none";
+ }
+
+ identity FEC_INTERLEAVER_DEPTH_TYPE_3 {
+ base FEC_INTERLEAVER_DEPTH_TYPE;
+ description
+ "none";
+ }
+
+ identity FEC_INTERLEAVER_DEPTH_TYPE_4 {
+ base FEC_INTERLEAVER_DEPTH_TYPE;
+ description
+ "none";
+ }
+
+ identity FEC_INTERLEAVER_DEPTH_TYPE_6 {
+ base FEC_INTERLEAVER_DEPTH_TYPE;
+ description
+ "none";
+ }
+
+ identity FEC_INTERLEAVER_DEPTH_TYPE_8 {
+ base FEC_INTERLEAVER_DEPTH_TYPE;
+ description
+ "none";
+ }
+
+ identity FEC_INTERLEAVER_DEPTH_TYPE_12 {
+ base FEC_INTERLEAVER_DEPTH_TYPE;
+ description
+ "none";
+ }
+
+ identity FEC_INTERLEAVER_DEPTH_TYPE_16 {
+ base FEC_INTERLEAVER_DEPTH_TYPE;
+ description
+ "none";
+ }
+
+ identity FEC_INTERLEAVER_DEPTH_TYPE_24 {
+ base FEC_INTERLEAVER_DEPTH_TYPE;
+ description
+ "none";
+ }
+
+ identity FEC_INTERLEAVER_DEPTH_TYPE_32 {
+ base FEC_INTERLEAVER_DEPTH_TYPE;
+ description
+ "none";
+ }
+
+ identity FEC_INTERLEAVER_DEPTH_TYPE_48 {
+ base FEC_INTERLEAVER_DEPTH_TYPE;
+ description
+ "none";
+ }
+
+ identity FEC_INTERLEAVER_DEPTH_TYPE_96 {
+ base FEC_INTERLEAVER_DEPTH_TYPE;
+ description
+ "none";
+ }
+
+ identity FEC_INTERLEAVER_DEPTH_TYPE_NOT_YET_DEFINED {
+ base FEC_INTERLEAVER_DEPTH_TYPE;
+ description
+ "none";
+ }
+
+ identity GRANULARITY_PERIOD_TYPE {
+ description
+ "none";
+ }
+
+ identity GRANULARITY_PERIOD_TYPE_UNKNOWN {
+ base GRANULARITY_PERIOD_TYPE;
+ description
+ "none";
+ }
+
+ identity GRANULARITY_PERIOD_TYPE_PERIOD-15-MIN {
+ base GRANULARITY_PERIOD_TYPE;
+ description
+ "none";
+ }
+
+ identity GRANULARITY_PERIOD_TYPE_PERIOD-24-HOURS {
+ base GRANULARITY_PERIOD_TYPE;
+ description
+ "none";
+ }
+
+ identity GRANULARITY_PERIOD_TYPE_NOT_YET_DEFINED {
+ base GRANULARITY_PERIOD_TYPE;
+ description
+ "none";
+ }
+
+ identity SEVERITY_TYPE {
+ description
+ "none";
+ }
+
+ identity SEVERITY_TYPE_NON_ALARMED {
+ base SEVERITY_TYPE;
+ description
+ "none";
+ }
+
+ identity SEVERITY_TYPE_WARNING {
+ base SEVERITY_TYPE;
+ description
+ "none";
+ }
+
+ identity SEVERITY_TYPE_MINOR {
+ base SEVERITY_TYPE;
+ description
+ "none";
+ }
+
+ identity SEVERITY_TYPE_MAJOR {
+ base SEVERITY_TYPE;
+ description
+ "none";
+ }
+
+ identity SEVERITY_TYPE_CRITICAL {
+ base SEVERITY_TYPE;
+ description
+ "none";
+ }
+
+ identity SEVERITY_TYPE_NOT_YET_DEFINED {
+ base SEVERITY_TYPE;
+ description
+ "none";
+ }
+
+ identity INTERFACE_STATUS_TYPE {
+ description
+ "none";
+ }
+
+ identity INTERFACE_STATUS_TYPE_UP {
+ base INTERFACE_STATUS_TYPE;
+ description
+ "Ready to pass packets.";
+ }
+
+ identity INTERFACE_STATUS_TYPE_DOWN {
+ base INTERFACE_STATUS_TYPE;
+ description
+ "The interface does not pass any packets.";
+ }
+
+ identity INTERFACE_STATUS_TYPE_TESTING {
+ base INTERFACE_STATUS_TYPE;
+ description
+ "In some test mode. No operational packets can be passed.";
+ }
+
+ identity INTERFACE_STATUS_TYPE_UNKNOWN {
+ base INTERFACE_STATUS_TYPE;
+ description
+ "Status cannot be determined for some reason.";
+ }
+
+ identity INTERFACE_STATUS_TYPE_DORMANT {
+ base INTERFACE_STATUS_TYPE;
+ description
+ "Waiting for some external event.";
+ }
+
+ identity INTERFACE_STATUS_TYPE_NOT_PRESENT {
+ base INTERFACE_STATUS_TYPE;
+ description
+ "Some component (typically hardware) is missing.";
+ }
+
+ identity INTERFACE_STATUS_TYPE_LOWER_LAYER_DOWN {
+ base INTERFACE_STATUS_TYPE;
+ description
+ "Down due to state of lower-layer interface(s).";
+ }
+
+ identity INTERFACE_STATUS_TYPE_ADMIN_DOWN {
+ base INTERFACE_STATUS_TYPE;
+ description
+ "Down due to configuration.";
+ }
+
+ identity INTERFACE_STATUS_TYPE_NOT_YET_DEFINED {
+ base INTERFACE_STATUS_TYPE;
+ description
+ "none";
+ }
+
+ /****************************************
+ * package super-types
+ **************************************/
+
+ typedef granularity-period-type {
+ type identityref {
+ base GRANULARITY_PERIOD_TYPE;
+ }
+ description
+ "The enumeration with the options for granularity period of the performance data.";
+ }
+
+ typedef severity-type {
+ type identityref {
+ base SEVERITY_TYPE;
+ }
+ description
+ "According to ITU-T M.3160";
+ }
+
+ typedef interface-status-type {
+ type identityref {
+ base INTERFACE_STATUS_TYPE;
+ }
+ description
+ "Current Interface Status";
+ }
+
+ grouping problem-kind-severity-type {
+ leaf problem-kind-name {
+ type string;
+ description
+ "Name of the alarm according to supportedAlarmList";
+ }
+ leaf problem-kind-severity {
+ type severity-type;
+ default "SEVERITY_TYPE_NOT_YET_DEFINED";
+ description
+ "Severity of this type of alarm.";
+ }
+ description
+ "none";
+ }
+
+ grouping available-queue-type {
+ leaf queue-name {
+ type queue-name-type;
+ config false;
+ description
+ "Name of the queue.";
+ }
+ leaf max-queue-depth {
+ type int32;
+ units "Byte";
+ default "-1";
+ config false;
+ description
+ "Maximum configurable depth of the queue in Byte. openconfig-qos-interfaces.yang";
+ }
+ leaf queue-depth-configuration-is-avail {
+ type boolean;
+ default "false";
+ config false;
+ description
+ "1 = Size of the individual queue is configurable (setting thresholdHigh of a WRED profile might be an alternative way of configuring the effective queue depth).";
+ }
+ leaf-list available-dropping-behavior-kind-list {
+ type dropping-behavior-kind-type;
+ config false;
+ min-elements 1;
+ max-elements 4;
+ description
+ "Lists the available types of behavior in case of congestions.";
+ }
+ leaf-list available-drop-precedence-kind-list {
+ type drop-precedence-type;
+ config false;
+ min-elements 1;
+ max-elements 3;
+ description
+ "Explicit list (ALL not to be used here) of drop precedences, which are available for this queue.";
+ }
+ leaf wred-profile-per-drop-precedence-is-available {
+ type boolean;
+ default "false";
+ config false;
+ description
+ "1 = Separate WRED profiles can be defined for every drop precedence.";
+ }
+ leaf-list available-scheduling-kind-list {
+ type scheduler-kind-type;
+ config false;
+ min-elements 1;
+ max-elements 4;
+ description
+ "Lists the available types of scheduling.";
+ }
+ description
+ "none";
+ }
+
+ grouping wred-behavior-type {
+ leaf affected-drop-precedence {
+ type drop-precedence-type;
+ description
+ "Definition of the drop precedence, for which the WRED profile shall apply on.";
+ }
+ leaf affected-protocol {
+ type protocol-layer-type;
+ description
+ "Definition of the kind of protocol, for which the WRED profile shall apply on.";
+ }
+ leaf wred-profile {
+ type leafref {
+ path "/core-model:control-construct/core-model:profile-collection/core-model:profile/core-model:uuid";
+ require-instance false;
+ }
+ description
+ "Associates a WRED profile to the queue, respectively drop precedence. Attribute to point to an instance of Profile with profileName=='PROFILE_NAME_TYPE_WRED_PROFILE'.";
+ }
+ description
+ "none";
+ }
+
+ grouping queue-behavior-type {
+ leaf queue-name {
+ type queue-name-type;
+ description
+ "Name of the queue.";
+ }
+ leaf queue-depth {
+ type int32;
+ units "Byte";
+ default "-1";
+ description
+ "Only relevant if (queueDepthConfigurationIsAvail==1). Size of the queue in Byte.";
+ }
+ leaf dropping-behavior-kind {
+ type dropping-behavior-kind-type;
+ default "DROPPING_BEHAVIOR_KIND_TYPE_NOT_YET_DEFINED";
+ description
+ "Defines the behavior in case of congestions.";
+ }
+ list wred-behavior-list {
+ key "affected-drop-precedence affected-protocol";
+ uses wred-behavior-type;
+ description
+ "Only relevant if (droppingBehaviorKind==WRED).";
+ }
+ leaf scheduler-kind {
+ type scheduler-kind-type;
+ default "SCHEDULER_KIND_TYPE_NOT_YET_DEFINED";
+ description
+ "Type of scheduler to be used for this queue.";
+ }
+ leaf weighting {
+ type int8;
+ units "%";
+ default "-1";
+ description
+ "Only relevant if (schedulerKind==WFQ) OR (schedulerKind==DWRR) OR (schedulerKind==WRR). Serving rate for this weighted fair queueing queue as a percentage value.";
+ }
+ description
+ "none";
+ }
+
+ grouping container-current-problem-type {
+ leaf problem-name {
+ type string;
+ default "Problem name not specified.";
+ config false;
+ description
+ "Name of the alarm according to Container::ContainerCapability::supportedAlarms";
+ }
+ uses current-problem;
+ description
+ "none";
+ }
+
+ grouping queue-utilization-type {
+ leaf queue-name {
+ type queue-name-type;
+ config false;
+ description
+ "Name of the queue.";
+ }
+ leaf max-queue-length {
+ type int32;
+ units "Byte";
+ default "-1";
+ config false;
+ description
+ "Maximum observed queue length. openconfig-qos-interfaces.yang";
+ }
+ leaf avg-queue-length {
+ type int32;
+ units "Byte";
+ default "-1";
+ config false;
+ description
+ "Average observed queue length. openconfig-qos-interfaces.yang";
+ }
+ description
+ "none";
+ }
+
+ grouping container-performance-type {
+ leaf tx-ethernet-bytes-max-s {
+ type int32;
+ units "Bytes/s";
+ default "-1";
+ config false;
+ description
+ "Counts the number of Bytes of Ethernet traffic (before header compression) transmitted within a second and keeps the highest value within the measurement period. Field to be left blank for all types of TDM containers.";
+ }
+ leaf tx-ethernet-bytes-max-m {
+ type int64;
+ units "Bytes/min";
+ default "-1";
+ config false;
+ description
+ "Counts the number of Bytes of Ethernet traffic (before header compression) transmitted within a minute and keeps the highest value with in the measurement period. Field to be left blank for all types of TDM containers.";
+ }
+ leaf tx-ethernet-bytes-sum {
+ type int64;
+ units "Bytes";
+ default "-1";
+ config false;
+ description
+ "Total number of Bytes of Ethernet traffic (before header compression) transmitted (in direction out of the device) during the measurement period. Field to be left blank for all types of TDM containers.";
+ }
+ list queue-utilization-list {
+ key "queue-name";
+ config false;
+ max-elements 8;
+ uses queue-utilization-type;
+ description
+ "Utilization of the respective queue. openconfig-qos-interfaces.yang";
+ }
+ leaf fec-corrected-blocks {
+ type int32;
+ units "Blocks";
+ default "-1";
+ config false;
+ description
+ "802.3 according to 30.5.1.1.17 aFECCorrectedBlocks and 30.11.2.1.8 aPMEFECCorrectedBlocks and 45.2.1.94 10GBASE-R FEC corrected blocks counter. Counts received blocks that have been corrected by the Forward Error Correction (FEC) function.";
+ }
+ leaf fec-uncorrectable-blocks {
+ type int32;
+ units "Blocks";
+ default "-1";
+ config false;
+ description
+ "802.3 according to 30.5.1.1.18 aFECUncorrectableBlocks and 30.11.2.1.9 aPMEFECUncorrectableBlocks and 45.2.1.95 10GBASE-R FEC uncorrected blocks counter. Counts received blocks that could not been corrected by the Forward Error Correction (FEC) function.";
+ }
+ leaf time-period {
+ type int32;
+ units "s";
+ default "-1";
+ config false;
+ description
+ "Total length of the measurement period in seconds.";
+ }
+ description
+ "Consolidated performance information of the Container.";
+ }
+
+ grouping container-current-performance-type {
+ container performance-data {
+ config false;
+ uses container-performance-type;
+ description
+ "none";
+ }
+ uses current-performance;
+ description
+ "Turns performance information into current performance information by inheriting from OTN_CurrentData.";
+ }
+
+ grouping container-historical-performance-type {
+ container performance-data {
+ config false;
+ uses container-performance-type;
+ description
+ "none";
+ }
+ uses historical-performance;
+ description
+ "Turns performance information into historical performance information by inheriting from OTN_HistoryData.";
+ }
+}
diff --git a/sdnr/wt/devicemanager-onap/onf14/provider/src/main/yang/hybrid-mw-structure-2-0.yang b/sdnr/wt/devicemanager-onap/onf14/provider/src/main/yang/hybrid-mw-structure-2-0.yang new file mode 100644 index 000000000..73d84d52c --- /dev/null +++ b/sdnr/wt/devicemanager-onap/onf14/provider/src/main/yang/hybrid-mw-structure-2-0.yang @@ -0,0 +1,945 @@ +module hybrid-mw-structure-2-0 {
+ yang-version 1.1;
+ namespace "urn:onf:yang:hybrid-mw-structure-2-0";
+ prefix hybrid-mw-structure;
+
+ import ietf-yang-types {
+ prefix yang;
+ }
+ import core-model-1-4 {
+ prefix core-model;
+ }
+
+ organization
+ "openBackhaul.com proposal to Open Networking Foundation (ONF)";
+ contact
+ "WG Web : https://github.com/openBackhaul/Overview
+ WG List: HybridMwStructure@openBackhaul.com
+ Editor : Thorsten Heinze
+ Email : Thorsten.Heinze@openBackhaul.com";
+ description
+ "Technology specific interface definition for a hybrid microwave structure on a physical media
+
+ Copyright 2019 openBackhaul.com
+
+ Licensed under the Apache License, Version 2.0 (the 'License');
+ you may not use this file except in compliance with the License.
+ You may obtain a copy of the License at
+ http://www.apache.org/licenses/LICENSE-2.0
+ Unless required by applicable law or agreed to in writing, software
+ distributed under the License is distributed on an 'AS IS' BASIS,
+ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ See the License for the specific language governing permissions and
+ limitations under the License.";
+
+ revision 2020-01-22 {
+ description
+ "Model for the Transport SDN Pilot at Telefonica Germany.
+ Please view https://github.com/openBackhaul/hybridMwStructure/issues for changes.";
+ reference
+ "https://github.com/openBackhaul/hybridMwStructure/tree/tsp: Model definition
+ https://github.com/openBackhaul/onfCoreIm/tree/tsp: ONF TR-512 Core IM incl. Profile and enhanced Equipment definition";
+ }
+ revision 2019-11-23 {
+ description
+ "Model for the Transport SDN Pilot at Telefonica Germany.
+ Please view https://github.com/openBackhaul/hybridMwStructure/issues for changes.";
+ reference
+ "https://github.com/openBackhaul/hybridMwStructure/tree/tsp: Model definition
+ https://github.com/openBackhaul/onfCoreIm/tree/tsp: ONF TR-512 Core IM incl. Profile and enhanced Equipment definition";
+ }
+ revision 2019-07-08 {
+ description
+ "Model for the Transport SDN Pilot at Telefonica Germany.
+ Please view https://github.com/openBackhaul/hybridMwStructure/issues for changes.";
+ reference
+ "https://github.com/openBackhaul/hybridMwStructure/tree/tsp: Model definition
+ https://github.com/openBackhaul/onfCoreIm/tree/tsp: ONF TR-512 Core IM incl. Profile and enhanced Equipment definition";
+ }
+
+ identity LAYER_PROTOCOL_NAME_TYPE_HYBRID_MW_STRUCTURE_LAYER {
+ base core-model:LAYER_PROTOCOL_NAME_TYPE;
+ description
+ "none";
+ }
+
+ augment "/core-model:control-construct/core-model:logical-termination-point/core-model:layer-protocol" {
+ when "derived-from-or-self(./core-model:layer-protocol-name, 'hybrid-mw-structure:LAYER_PROTOCOL_NAME_TYPE_HYBRID_MW_STRUCTURE_LAYER')";
+ uses hybrid-mw-structure-lp-spec;
+ description
+ "none";
+ }
+
+ /****************************************
+ * package notifications
+ **************************************/
+
+ notification object-creation-notification {
+ uses object-creation-notification;
+ description
+ "none";
+ }
+
+ grouping object-creation-notification {
+ leaf counter {
+ type int32;
+ default "-1";
+ config false;
+ description
+ "Counts object creation notifications.";
+ }
+ leaf timestamp {
+ type yang:date-and-time;
+ default "2010-11-20T14:00:00+01:00";
+ config false;
+ description
+ "none";
+ }
+ leaf object-id-ref {
+ type leafref {
+ path "/core-model:control-construct/core-model:logical-termination-point/core-model:uuid";
+ require-instance false;
+ }
+ config false;
+ description
+ "none";
+ }
+ leaf object-type {
+ type string;
+ default "Type of created object not specified.";
+ config false;
+ description
+ "none";
+ }
+ description
+ "none";
+ }
+
+ notification object-deletion-notification {
+ uses object-deletion-notification;
+ description
+ "none";
+ }
+
+ grouping object-deletion-notification {
+ leaf counter {
+ type int32;
+ default "-1";
+ config false;
+ description
+ "Counts object deletion notifications.";
+ }
+ leaf timestamp {
+ type yang:date-and-time;
+ default "2010-11-20T14:00:00+01:00";
+ config false;
+ description
+ "none";
+ }
+ leaf object-id-ref {
+ type leafref {
+ path "/core-model:control-construct/core-model:logical-termination-point/core-model:uuid";
+ require-instance false;
+ }
+ config false;
+ description
+ "none";
+ }
+ description
+ "none";
+ }
+
+ notification attribute-value-changed-notification {
+ uses attribute-value-changed-notification;
+ description
+ "none";
+ }
+
+ grouping attribute-value-changed-notification {
+ leaf counter {
+ type int32;
+ default "-1";
+ config false;
+ description
+ "Counts attribute value changed notifications.";
+ }
+ leaf timestamp {
+ type yang:date-and-time;
+ default "2010-11-20T14:00:00+01:00";
+ config false;
+ description
+ "none";
+ }
+ leaf object-id-ref {
+ type leafref {
+ path "/core-model:control-construct/core-model:logical-termination-point/core-model:uuid";
+ require-instance false;
+ }
+ config false;
+ description
+ "none";
+ }
+ leaf attribute-name {
+ type string;
+ default "Attribute name not specified.";
+ config false;
+ description
+ "Name of the attribute that has been changed.";
+ }
+ leaf new-value {
+ type string;
+ default "New value not specified.";
+ config false;
+ description
+ "Attribute value converted to a string (xml, json, ...)";
+ }
+ description
+ "none";
+ }
+
+ notification problem-notification {
+ uses problem-notification;
+ description
+ "none";
+ }
+
+ grouping problem-notification {
+ leaf counter {
+ type int32;
+ default "-1";
+ config false;
+ description
+ "Counts problem notifications";
+ }
+ leaf timestamp {
+ type yang:date-and-time;
+ default "2010-11-20T14:00:00+01:00";
+ config false;
+ description
+ "none";
+ }
+ leaf object-id-ref {
+ type leafref {
+ path "/core-model:control-construct/core-model:logical-termination-point/core-model:uuid";
+ require-instance false;
+ }
+ config false;
+ description
+ "none";
+ }
+ leaf problem {
+ type string;
+ default "Problem name not specified.";
+ config false;
+ description
+ "Name of the problem according to supportedAlarmList";
+ }
+ leaf severity {
+ type severity-type;
+ default "SEVERITY_TYPE_WARNING";
+ config false;
+ description
+ "Severity of the problem according to problemKindSeverity";
+ }
+ description
+ "none";
+ }
+
+ /****************************************
+ * grouping statements for object classes
+ **************************************/
+ /****************************************
+ * package super-classes
+ **************************************/
+
+ grouping current-problem {
+ leaf sequence-number {
+ type int16;
+ config false;
+ description
+ "Unique sequence number of the current problem object.";
+ }
+ leaf timestamp {
+ type yang:date-and-time;
+ default "2010-11-20T14:00:00+01:00";
+ config false;
+ description
+ "Time when the alarm was raised.";
+ }
+ leaf problem-severity {
+ type severity-type;
+ default "SEVERITY_TYPE_NOT_YET_DEFINED";
+ config false;
+ description
+ "Severity of the alarm.";
+ }
+ description
+ "none";
+ }
+
+ grouping current-performance {
+ leaf timestamp {
+ type yang:date-and-time;
+ default "2010-11-20T14:00:00+01:00";
+ config false;
+ description
+ "The timestamp associated with when the current data was collected.";
+ }
+ leaf suspect-interval-flag {
+ type boolean;
+ default "false";
+ config false;
+ description
+ "This attribute is used to indicate that the performance data for the current period may not be reliable. Some reasons for this to occur are:
+ – Suspect data were detected by the actual resource doing data collection.
+ – Transition of the administrativeState attribute to/from the 'lock' state.
+ – Transition of the operationalState to/from the 'disabled' state.
+ – Scheduler setting that inhibits the collection function.
+ – The performance counters were reset during the interval.
+ – The currentData (or subclass) object instance was created during the monitoring period.";
+ }
+ leaf elapsed-time {
+ type int64;
+ units "s";
+ default "-1";
+ config false;
+ description
+ "Number of seconds that elapsed since the last reset of the counter.";
+ }
+ leaf scanner-id {
+ type string;
+ default "Scanner ID not defined.";
+ config false;
+ description
+ "none";
+ }
+ leaf granularity-period {
+ type granularity-period-type;
+ config false;
+ description
+ "Time period between reset of the underlying counter.";
+ }
+ description
+ "none";
+ }
+
+ grouping historical-performance {
+ leaf suspect-interval-flag {
+ type boolean;
+ default "false";
+ config false;
+ description
+ "This attribute indicates that the data collected during the interval is suspect.";
+ }
+ leaf history-data-id {
+ type string;
+ default "History Data ID not defined.";
+ config false;
+ description
+ "none";
+ }
+ leaf granularity-period {
+ type granularity-period-type;
+ config false;
+ description
+ "Time period between reset of the underlying counter.";
+ }
+ leaf period-end-time {
+ type yang:date-and-time;
+ config false;
+ description
+ "Time when the counter values have been recorded and the counter reset.";
+ }
+ description
+ "none";
+ }
+
+ grouping hybrid-mw-structure-lp-spec {
+ container hybrid-mw-structure-pac {
+ uses hybrid-mw-structure-pac;
+ description
+ "none";
+ }
+ description
+ "The HybridMwStructureLpSpec and its attached classes MUST be provided on management interfaces of microwave devices, which are transporting TDM and Ethernet traffic.";
+ }
+
+ grouping hybrid-mw-structure-pac {
+ container hybrid-mw-structure-capability {
+ config false;
+ uses hybrid-mw-structure-capability;
+ description
+ "none";
+ }
+ container hybrid-mw-structure-configuration {
+ uses hybrid-mw-structure-configuration;
+ description
+ "none";
+ }
+ container hybrid-mw-structure-status {
+ config false;
+ uses hybrid-mw-structure-status;
+ description
+ "none";
+ }
+ container hybrid-mw-structure-current-problems {
+ config false;
+ uses hybrid-mw-structure-current-problems;
+ description
+ "none";
+ }
+ container hybrid-mw-structure-current-performance {
+ config false;
+ uses hybrid-mw-structure-current-performance;
+ description
+ "none";
+ }
+ container hybrid-mw-structure-historical-performances {
+ config false;
+ uses hybrid-mw-structure-historical-performances;
+ description
+ "none";
+ }
+ description
+ "The HybridMwStructure_Pac and its attached classes MUST be provided on management interfaces of microwave devices, which are transporting TDM and Ethernet traffic.";
+ }
+
+ grouping hybrid-mw-structure-capability {
+ list supported-tdm-structure-kind-list {
+ key "tdm-structure-name";
+ config false;
+ min-elements 1;
+ uses tdm-structure-kind;
+ description
+ "Lists the TDM frame types that are supported.";
+ }
+ leaf-list supported-alarm-list {
+ type string;
+ default "Supported alarms not yet defined.";
+ config false;
+ description
+ "Available alarms to be listed. Mandatory:none. Names are to be separated by commas. Further alarms might be added by the vendor.";
+ }
+ leaf performance-monitoring-is-avail {
+ type boolean;
+ default "false";
+ config false;
+ description
+ "1 = Collection and aggregation of performance values is available.";
+ }
+ description
+ "Describes the logical structuring of the physical capacity provided by a hybrid microwave device (TDM + Ethernet). Segmentation is available. TDM transport is available.";
+ }
+
+ grouping hybrid-mw-structure-configuration {
+ leaf tdm-structure-kind {
+ type leafref {
+ path "/core-model:control-construct/core-model:logical-termination-point/core-model:layer-protocol/hybrid-mw-structure:hybrid-mw-structure-pac/hybrid-mw-structure:hybrid-mw-structure-capability/hybrid-mw-structure:supported-tdm-structure-kind-list/hybrid-mw-structure:tdm-structure-name";
+ require-instance false;
+ }
+ must 'boolean(/core-model:control-construct/core-model:logical-termination-point/core-model:layer-protocol/hybrid-mw-structure:hybrid-mw-structure-pac/hybrid-mw-structure:hybrid-mw-structure-capability/hybrid-mw-structure:supported-tdm-structure-kind-list[tdm-structure-name=current()])';
+ description
+ "TDM frame to be applied.";
+ }
+ leaf number-of-tdm-segments-to-be-reserved {
+ type int8;
+ default "-1";
+ description
+ "Allows to configure the number of segments reserved for TDM frames of the type specified in HybridMwStructure::HybridMwStructureConfiguration::structureType";
+ }
+ list problem-kind-severity-list {
+ key "problem-kind-name";
+ uses problem-kind-severity-type;
+ description
+ "Severity of the type of problem to be configured.";
+ }
+ list g-826-threshold-cross-alarm-list {
+ key "g-826-value-kind granularity-period";
+ uses g-826-threshold-cross-alarm-type;
+ description
+ "List of G826 related threshold cross alarms to be configured.";
+ }
+ leaf clearing-threshold-cross-alarms-is-on {
+ type boolean;
+ default "false";
+ description
+ "Setting this bit is clearing all the currently active threshold cross alarms.";
+ }
+ leaf performance-monitoring-is-on {
+ type boolean;
+ default "false";
+ description
+ "Enables measurement, collection, storage and access to performance data.";
+ }
+ description
+ "none";
+ }
+
+ grouping hybrid-mw-structure-status {
+ list segment-status-list {
+ key "segment-status-type-id";
+ config false;
+ min-elements 1;
+ uses segment-status-type;
+ description
+ "Status of each segment (all TDM and one Ethernet). Multiplicity = HybridMwStructure::StructureConfiguration::tdmReservedNumberOfSegments + 1";
+ }
+ leaf performance-monitoring-is-up {
+ type boolean;
+ default "false";
+ config false;
+ description
+ "1 = Performance values are currently collected and aggregated.";
+ }
+ description
+ "none";
+ }
+
+ grouping hybrid-mw-structure-current-problems {
+ list current-problem-list {
+ key "sequence-number";
+ config false;
+ uses structure-current-problem-type;
+ description
+ "none";
+ }
+ leaf number-of-current-problems {
+ type int8;
+ default "-1";
+ config false;
+ description
+ "Number of alarms, which are currently active on this interface.";
+ }
+ leaf time-of-latest-change {
+ type yang:date-and-time;
+ default "2010-11-20T14:00:00+01:00";
+ config false;
+ description
+ "Date and time when the list of alarms has been changed for the last time.";
+ }
+ description
+ "none";
+ }
+
+ grouping hybrid-mw-structure-current-performance {
+ list current-performance-data-list {
+ key "granularity-period";
+ config false;
+ min-elements 1;
+ max-elements 2;
+ uses structure-current-performance-type;
+ description
+ "At least values of the counters, which are reset every 15 minutes, are to be provided. If available, the current values of the counters, which are reset every 24 hour, can be provided, too.";
+ }
+ leaf number-of-current-performance-sets {
+ type int8;
+ default "-1";
+ config false;
+ description
+ "Number of sets of current performance values, which are provided in the list.";
+ }
+ description
+ "Aggregated performance information of the structure of a hybrid microwave at a particular moment.";
+ }
+
+ grouping hybrid-mw-structure-historical-performances {
+ list historical-performance-data-list {
+ key "granularity-period period-end-time";
+ config false;
+ uses structure-historical-performance-type;
+ description
+ "none";
+ }
+ leaf number-of-historical-performance-sets {
+ type int16;
+ default "-1";
+ config false;
+ description
+ "Number of sets of historical performance values, which are provided in the list.";
+ }
+ leaf time-of-latest-change {
+ type yang:date-and-time;
+ default "2010-11-20T14:00:00+01:00";
+ config false;
+ description
+ "Date and time when the list of sets of historical performance values has been changed for the last time (e.g. new one added or existing one deleted).";
+ }
+ description
+ "Aggregated performance information of the structure of a hybrid microwave for a pre-defined measurement interval.";
+ }
+
+ grouping tdm-structure-kind {
+ leaf tdm-structure-name {
+ type string;
+ config false;
+ description
+ "Names to be chosen from the following list: 'e1','t1','j1','e3','ds3','stm1','cpri1','cpri2','cpri3','cpri4','cpri5','cpri6' or 'cpri7'";
+ }
+ leaf tdm-segment-size {
+ type int32;
+ units "kbit/s";
+ default "-1";
+ config false;
+ description
+ "Size of the TDM segment in kbit/s. Values to be chosen from the following list: '2048','1544','34000','44736 ','155520','614400','1228800','2457600','3072000','4915200','6144000' or '9830400;";
+ }
+ leaf max-number-of-segments-reservable {
+ type int8;
+ units "segments";
+ default "-1";
+ config false;
+ description
+ "Device specific maximum number of segments (not depending on current air interface configuration) that can be reserved for this type of segment on a single air interface.";
+ }
+ description
+ "none";
+ }
+
+ /****************************************
+ * typedef statements
+ **************************************/
+
+ typedef g-826-type {
+ type identityref {
+ base G_826_TYPE;
+ }
+ description
+ "none";
+ }
+
+ /*********************************************
+ * grouping statements for complex data types
+ *******************************************/
+
+ identity G_826_TYPE {
+ description
+ "none";
+ }
+
+ identity G_826_TYPE_ES {
+ base G_826_TYPE;
+ description
+ "Errored Seconds. Threshold cross alarm will relate to TypeDefinitions::AirInterfacePerformanceType::es .";
+ }
+
+ identity G_826_TYPE_SES {
+ base G_826_TYPE;
+ description
+ "Severely Errored Seconds. Threshold cross alarm will relate to TypeDefinitions::AirInterfacePerformanceType::ses .";
+ }
+
+ identity G_826_TYPE_CSES {
+ base G_826_TYPE;
+ description
+ "Consecutive Severely Errored Seconds. Threshold cross alarm will relate to TypeDefinitions::AirInterfacePerformanceType::cses .";
+ }
+
+ identity G_826_TYPE_UAS {
+ base G_826_TYPE;
+ description
+ "Unavailable Seconds. Threshold cross alarm will relate to TypeDefinitions::AirInterfacePerformanceType::unavailability.";
+ }
+
+ identity G_826_TYPE_NOT_SPECIFIED {
+ base G_826_TYPE;
+ description
+ "none";
+ }
+
+ identity GRANULARITY_PERIOD_TYPE {
+ description
+ "none";
+ }
+
+ identity GRANULARITY_PERIOD_TYPE_UNKNOWN {
+ base GRANULARITY_PERIOD_TYPE;
+ description
+ "none";
+ }
+
+ identity GRANULARITY_PERIOD_TYPE_PERIOD-15-MIN {
+ base GRANULARITY_PERIOD_TYPE;
+ description
+ "none";
+ }
+
+ identity GRANULARITY_PERIOD_TYPE_PERIOD-24-HOURS {
+ base GRANULARITY_PERIOD_TYPE;
+ description
+ "none";
+ }
+
+ identity GRANULARITY_PERIOD_TYPE_NOT_YET_DEFINED {
+ base GRANULARITY_PERIOD_TYPE;
+ description
+ "none";
+ }
+
+ identity SEVERITY_TYPE {
+ description
+ "none";
+ }
+
+ identity SEVERITY_TYPE_NON_ALARMED {
+ base SEVERITY_TYPE;
+ description
+ "none";
+ }
+
+ identity SEVERITY_TYPE_WARNING {
+ base SEVERITY_TYPE;
+ description
+ "none";
+ }
+
+ identity SEVERITY_TYPE_MINOR {
+ base SEVERITY_TYPE;
+ description
+ "none";
+ }
+
+ identity SEVERITY_TYPE_MAJOR {
+ base SEVERITY_TYPE;
+ description
+ "none";
+ }
+
+ identity SEVERITY_TYPE_CRITICAL {
+ base SEVERITY_TYPE;
+ description
+ "none";
+ }
+
+ identity SEVERITY_TYPE_NOT_YET_DEFINED {
+ base SEVERITY_TYPE;
+ description
+ "none";
+ }
+
+ identity OPERATIONAL_STATE_TYPE {
+ description
+ "none";
+ }
+
+ identity OPERATIONAL_STATE_TYPE_ENABLED {
+ base OPERATIONAL_STATE_TYPE;
+ description
+ "none";
+ }
+
+ identity OPERATIONAL_STATE_TYPE_DISABLED {
+ base OPERATIONAL_STATE_TYPE;
+ description
+ "none";
+ }
+
+ identity OPERATIONAL_STATE_TYPE_NOT_YET_DEFINED {
+ base OPERATIONAL_STATE_TYPE;
+ description
+ "none";
+ }
+
+ /****************************************
+ * package super-types
+ **************************************/
+
+ typedef granularity-period-type {
+ type identityref {
+ base GRANULARITY_PERIOD_TYPE;
+ }
+ description
+ "The enumeration with the options for granularity period of the performance data.";
+ }
+
+ typedef severity-type {
+ type identityref {
+ base SEVERITY_TYPE;
+ }
+ description
+ "According to ITU-T M.3160";
+ }
+
+ typedef operational-state-type {
+ type identityref {
+ base OPERATIONAL_STATE_TYPE;
+ }
+ description
+ "The list of valid operational states for the connection.";
+ }
+
+ grouping problem-kind-severity-type {
+ leaf problem-kind-name {
+ type string;
+ description
+ "Name of the alarm according to supportedAlarmList";
+ }
+ leaf problem-kind-severity {
+ type severity-type;
+ default "SEVERITY_TYPE_NOT_YET_DEFINED";
+ description
+ "Severity of this type of alarm.";
+ }
+ description
+ "none";
+ }
+
+ grouping g-826-threshold-cross-alarm-type {
+ leaf g-826-value-kind {
+ type g-826-type;
+ description
+ "Kind of performance value that shall be equipped with a threshold alarm.";
+ }
+ leaf alarm-raising-threshold {
+ type int32;
+ units "s";
+ default "-1";
+ description
+ "Number of events required for raising the threshold cross alarm.";
+ }
+ leaf alarm-clearing-threshold {
+ type int32;
+ units "s";
+ default "-1";
+ description
+ "Number of events required for clearing the threshold cross alarm.";
+ }
+ leaf granularity-period {
+ type granularity-period-type;
+ description
+ "Period of the performance data collection.";
+ }
+ description
+ "Allows defining a threshold cross alarm.\n";
+ }
+
+ grouping segment-status-type {
+ leaf segment-status-type-id {
+ type int16;
+ config false;
+ description
+ "none";
+ }
+ leaf segment-is-reserved-for-tdm {
+ type boolean;
+ default "false";
+ config false;
+ description
+ "The number of segments, which is configured by Structure::StructureConfiguration::tdmReservedNumberOfSegements, has to be reserved for TDM. Starting from the lowest index value, these segments have to be marked with a 'true' in segmentIsReservedForTdm.\n";
+ }
+ leaf operational-status {
+ type operational-state-type;
+ default "OPERATIONAL_STATE_TYPE_NOT_YET_DEFINED";
+ config false;
+ description
+ "Current operational status of each segment.";
+ }
+ description
+ "none";
+ }
+
+ grouping structure-current-problem-type {
+ leaf problem-name {
+ type string;
+ default "Problem name not specified.";
+ config false;
+ description
+ "Name of the alarm according to Structure::StructureCapability::supportedAlarms";
+ }
+ uses current-problem;
+ description
+ "none";
+ }
+
+ grouping structure-performance-type {
+ leaf time-period {
+ type int32;
+ units "s";
+ default "-1";
+ config false;
+ description
+ "Total length of the measurement period in seconds.";
+ }
+ leaf es {
+ type int32;
+ units "s";
+ default "-1";
+ config false;
+ description
+ "Number of errored seconds. 1+0: Same value as for single air interface. 1+1 and Diversity: Value representing the combined signals.";
+ }
+ leaf ses {
+ type int32;
+ units "s";
+ default "-1";
+ config false;
+ description
+ "Number of severely errored seconds. 1+0: Same value as for single air interface. 1+1 and Diversity: Value representing the combined signals.";
+ }
+ leaf cses {
+ type int32;
+ units "s";
+ default "-1";
+ config false;
+ description
+ "Number of consecutive severely errored seconds. 1+0: Same value as for single air interface. 1+1 and Diversity: Value representing the combined signals.";
+ }
+ leaf unavailability {
+ type int32;
+ units "s";
+ default "-1";
+ config false;
+ description
+ "Total time of unavailability in seconds. 1+0: Same value as for single air interface. 1+1 and Diversity: Value representing the combined signals.";
+ }
+ leaf rx-level-min {
+ type int8;
+ units "dBm";
+ default "99";
+ config false;
+ description
+ "Minimum receive level. 1+0: Same value as for single air interface. 1+1: Value representing the combined signals. Diversity: To be left on default value.";
+ }
+ leaf rx-level-max {
+ type int8;
+ units "dBm";
+ default "99";
+ config false;
+ description
+ "Maximum receive level. 1+0: Same value as for single air interface. 1+1: Value representing the combined signals. Diversity: To be left on default value.";
+ }
+ leaf rx-level-avg {
+ type int8;
+ units "dBm";
+ default "99";
+ config false;
+ description
+ "Averaged receive level. 1+0: Same value as for single air interface. 1+1: Value representing the combined signals. Diversity: To be left on default value.";
+ }
+ description
+ "Consolidated performance information of the Structure.";
+ }
+
+ grouping structure-current-performance-type {
+ container performance-data {
+ config false;
+ uses structure-performance-type;
+ description
+ "none";
+ }
+ uses current-performance;
+ description
+ "Turns performance information into current performance information by inheriting from OTN_CurrentData.";
+ }
+
+ grouping structure-historical-performance-type {
+ container performance-data {
+ config false;
+ uses structure-performance-type;
+ description
+ "none";
+ }
+ uses historical-performance;
+ description
+ "Turns performance information into historical performance information by inheriting from OTN_HistoryData.";
+ }
+}
diff --git a/sdnr/wt/devicemanager-onap/onf14/provider/src/main/yang/ip-interface-1-0.yang b/sdnr/wt/devicemanager-onap/onf14/provider/src/main/yang/ip-interface-1-0.yang new file mode 100644 index 000000000..b3b86e24a --- /dev/null +++ b/sdnr/wt/devicemanager-onap/onf14/provider/src/main/yang/ip-interface-1-0.yang @@ -0,0 +1,1198 @@ +module ip-interface-1-0 {
+ yang-version 1.1;
+ namespace "urn:onf:yang:ip-interface-1-0";
+ prefix ip-interface;
+
+ import ietf-yang-types {
+ prefix yang;
+ }
+ import core-model-1-4 {
+ prefix core-model;
+ }
+
+ organization
+ "openBackhaul.com proposal to Open Networking Foundation (ONF)";
+ contact
+ "WG Web : https://github.com/openBackhaul/Overview
+ WG List: Thorsten.Heinze@openBackhaul.com
+ Editor : Thorsten Heinze
+ Email : Thorsten.Heinze@openBackhaul.com";
+ description
+ "Technology specific amendment to the LayerProtocol class for an IPv4 interface according to IETF RFC 791.
+
+ Copyright 2019 openBackhaul.com
+
+ Licensed under the Apache License, Version 2.0 (the 'License');
+ you may not use this file except in compliance with the License.
+ You may obtain a copy of the License at
+ http://www.apache.org/licenses/LICENSE-2.0
+ Unless required by applicable law or agreed to in writing, software
+ distributed under the License is distributed on an 'AS IS' BASIS,
+ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ See the License for the specific language governing permissions and
+ limitations under the License.";
+
+ revision 2020-01-24 {
+ description
+ "Model for the Transport SDN Pilot at Telefonica Germany
+ Please view https://github.com/openBackhaul/ipInterface/issues for changes.";
+ reference
+ "https://github.com/openBackhaul/ipInterface/tree/tsp: Model definition
+ https://github.com/openBackhaul/onfCoreIm/tree/tsp: ONF TR-512 Core IM incl. Profile and enhanced Equipment definition";
+ }
+ revision 2019-07-09 {
+ description
+ "Model for the Transport SDN Pilot at Telefonica Germany
+ Please view https://github.com/openBackhaul/ipInterface/issues for changes.";
+ reference
+ "https://github.com/openBackhaul/ipInterface/tree/tsp: Model definition
+ https://github.com/openBackhaul/onfCoreIm/tree/tsp: ONF TR-512 Core IM incl. Profile and enhanced Equipment definition";
+ }
+
+ identity LAYER_PROTOCOL_NAME_TYPE_IP_LAYER {
+ base core-model:LAYER_PROTOCOL_NAME_TYPE;
+ description
+ "none";
+ }
+
+ augment "/core-model:control-construct/core-model:logical-termination-point/core-model:layer-protocol" {
+ when "derived-from-or-self(./core-model:layer-protocol-name, 'ip-interface:LAYER_PROTOCOL_NAME_TYPE_IP_LAYER')";
+ uses ip-interface-lp-spec;
+ description
+ "none";
+ }
+
+ /****************************************
+ * package notifications
+ **************************************/
+
+ notification object-creation-notification {
+ uses object-creation-notification;
+ description
+ "none";
+ }
+
+ grouping object-creation-notification {
+ leaf counter {
+ type int32;
+ default "-1";
+ config false;
+ description
+ "Counts object creation notifications.";
+ }
+ leaf timestamp {
+ type yang:date-and-time;
+ default "2010-11-20T14:00:00+01:00";
+ config false;
+ description
+ "none";
+ }
+ leaf object-id-ref {
+ type leafref {
+ path "/core-model:control-construct/core-model:logical-termination-point/core-model:uuid";
+ require-instance false;
+ }
+ config false;
+ description
+ "none";
+ }
+ leaf object-type {
+ type string;
+ default "Type of created object not specified.";
+ config false;
+ description
+ "Type of created object not specified.";
+ }
+ description
+ "To be sent when a new MW_AirInterface_Pac, MW_AirInterfaceDiversity_Pac, MW_Structure_Pac, MW_PureEthernetStructure_Pac, MW_HybridMwStructure_Pac, MW_Container_Pac, MW_EthernetContainer_Pac or MW_TdmContainer_Pac has to be instancieted in the controller.";
+ }
+
+ notification object-deletion-notification {
+ uses object-deletion-notification;
+ description
+ "none";
+ }
+
+ grouping object-deletion-notification {
+ leaf counter {
+ type int32;
+ default "-1";
+ config false;
+ description
+ "Counts object deletion notifications.";
+ }
+ leaf timestamp {
+ type yang:date-and-time;
+ default "2010-11-20T14:00:00+01:00";
+ config false;
+ description
+ "none";
+ }
+ leaf object-id-ref {
+ type leafref {
+ path "/core-model:control-construct/core-model:logical-termination-point/core-model:uuid";
+ require-instance false;
+ }
+ config false;
+ description
+ "none";
+ }
+ description
+ "To be sent when a new MW_AirInterface_Pac, MW_AirInterfaceDiversity_Pac, MW_Structure_Pac, MW_PureEthernetStructure_Pac, MW_HybridMwStructure_Pac, MW_Container_Pac, MW_EthernetContainer_Pac or MW_TdmContainer_Pac instance has to be deleted in the controller.";
+ }
+
+ notification attribute-value-changed-notification {
+ uses attribute-value-changed-notification;
+ description
+ "none";
+ }
+
+ grouping attribute-value-changed-notification {
+ leaf counter {
+ type int32;
+ default "-1";
+ config false;
+ description
+ "Counts attribute value changed notifications.";
+ }
+ leaf timestamp {
+ type yang:date-and-time;
+ default "2010-11-20T14:00:00+01:00";
+ config false;
+ description
+ "none";
+ }
+ leaf object-id-ref {
+ type leafref {
+ path "/core-model:control-construct/core-model:logical-termination-point/core-model:uuid";
+ require-instance false;
+ }
+ config false;
+ description
+ "none";
+ }
+ leaf attribute-name {
+ type string;
+ default "Attribute name not specified.";
+ config false;
+ description
+ "Name of the attribute that has been changed.";
+ }
+ leaf new-value {
+ type string;
+ default "New value not specified.";
+ config false;
+ description
+ "Attribute value converted to a string (xml, json, ...)";
+ }
+ description
+ "To be sent when an attribute has changed and one or more controllers have to update their data.";
+ }
+
+ notification problem-notification {
+ uses problem-notification;
+ description
+ "none";
+ }
+
+ grouping problem-notification {
+ leaf counter {
+ type int32;
+ default "-1";
+ config false;
+ description
+ "Counts problem notifications";
+ }
+ leaf timestamp {
+ type yang:date-and-time;
+ default "2010-11-20T14:00:00+01:00";
+ config false;
+ description
+ "none";
+ }
+ leaf object-id-ref {
+ type leafref {
+ path "/core-model:control-construct/core-model:logical-termination-point/core-model:uuid";
+ require-instance false;
+ }
+ config false;
+ description
+ "none";
+ }
+ leaf problem {
+ type string;
+ default "Problem name not specified.";
+ config false;
+ description
+ "Name of the problem according to supportedAlarmList";
+ }
+ leaf severity {
+ type severity-type;
+ default "SEVERITY_TYPE_WARNING";
+ config false;
+ description
+ "Severity of the problem according to problemKindSeverity";
+ }
+ description
+ "To be sent when a problem occurs at a MW_AirInterface_Pac, MW_AirInterfaceDiversity_Pac, MW_Structure_Pac, MW_PureEthernetStructure_Pac, MW_HybridMwStructure_Pac, MW_Container_Pac, MW_EthernetContainer_Pac or MW_TdmContainer_Pac.";
+ }
+
+ /****************************************
+ * grouping statements for object classes
+ **************************************/
+ /****************************************
+ * package super-classes
+ **************************************/
+
+ grouping current-problem {
+ leaf sequence-number {
+ type int16;
+ config false;
+ description
+ "Unique sequence number of the current problem object.";
+ }
+ leaf timestamp {
+ type yang:date-and-time;
+ default "2010-11-20T14:00:00+01:00";
+ config false;
+ description
+ "Time when the alarm was raised.";
+ }
+ leaf problem-severity {
+ type severity-type;
+ default "SEVERITY_TYPE_NOT_YET_DEFINED";
+ config false;
+ description
+ "none";
+ }
+ description
+ "none";
+ }
+
+ grouping ip-interface-lp-spec {
+ container ip-interface-pac {
+ uses ip-interface-pac;
+ description
+ "none";
+ }
+ description
+ "none";
+ }
+
+ grouping ip-interface-pac {
+ container ip-interface-capability {
+ config false;
+ uses ip-interface-capability;
+ description
+ "none";
+ }
+ container ip-interface-configuration {
+ uses ip-interface-configuration;
+ description
+ "none";
+ }
+ container ip-interface-status {
+ config false;
+ uses ip-interface-status;
+ description
+ "none";
+ }
+ container ip-interface-current-problems {
+ config false;
+ uses ip-interface-current-problems;
+ description
+ "none";
+ }
+ description
+ "none";
+ }
+
+ grouping ip-interface-capability {
+ leaf maximum-number-of-ip-v-4-addresses {
+ type int16;
+ default "-1";
+ config false;
+ description
+ "Maximum number of IP addresses at this IP interface (translates into maximum multiplicity of IpInterfaceConfiguration::fixedIpV4AddressList)";
+ }
+ leaf dhcp-client-is-avail {
+ type boolean;
+ default "false";
+ config false;
+ description
+ "1 = Interface is able to operate as a DHCP client.";
+ }
+ leaf fixed-default-gateway-configuration-is-avail {
+ type boolean;
+ default "false";
+ config false;
+ description
+ "1 = Default route per IP Interface can be configuered, 0 if multiple Default routes are not supported";
+ }
+ leaf maximum-transmission-unit-min {
+ type int16;
+ units "Byte";
+ default "-1";
+ config false;
+ description
+ "Minimum layer 3 MTU size configurable.";
+ }
+ leaf maximum-transmission-unit-max {
+ type int16;
+ units "Byte";
+ default "-1";
+ config false;
+ description
+ "Maximum layer 3 MTU size configurable.";
+ }
+ leaf ip-v-6-is-avail {
+ type boolean;
+ default "false";
+ config false;
+ description
+ "1 = interface supports IPv6 (even if not yet supported by this information model).";
+ }
+ leaf arp-proxy-is-avail {
+ type boolean;
+ default "false";
+ config false;
+ description
+ "1 = Interface is able to forward ARP requests.";
+ }
+ leaf ingress-policing-is-avail {
+ type boolean;
+ default "false";
+ config false;
+ description
+ "1 = Shaping on the ingress is available at this interface.";
+ }
+ leaf egress-shaping-is-avail {
+ type boolean;
+ default "false";
+ config false;
+ description
+ "1 = This interface supports shaping.";
+ }
+ leaf information-rate-min {
+ type int32;
+ units "kbit/s";
+ default "-1";
+ config false;
+ description
+ "Only relevant if (egressShapingIsAvail==1): Minimum configurable throuput in kbit/s.";
+ }
+ leaf information-rate-max {
+ type int32;
+ units "kbit/s";
+ default "-1";
+ config false;
+ description
+ "Only relevant if (egressShapingIsAvail==1): Maximum configurable throuput in kbit/s.";
+ }
+ leaf burst-size-min {
+ type int16;
+ units "kByte";
+ default "-1";
+ config false;
+ description
+ "Only relevant if (egressShapingIsAvail==1): Minimum configurable value for the number of kBytes, which could be sent in a single burst.";
+ }
+ leaf burst-size-max {
+ type int16;
+ units "kByte";
+ default "-1";
+ config false;
+ description
+ "Only relevant if (egressShapingIsAvail==1): Maximum configurable value for the number of kBytes, which could be sent in a single burst.";
+ }
+ leaf vpn-binding-is-avail {
+ type boolean;
+ default "false";
+ config false;
+ description
+ "1 = Interface supports being part of a Virtual Private Network.";
+ }
+ leaf admin-shut-down-is-avail {
+ type boolean;
+ default "false";
+ config false;
+ description
+ "1 = Manual switching on and off of the interface without deleting it (underlying OSI network layers are also not affected) is available.";
+ }
+ leaf-list supported-loop-back-kind-list {
+ type loop-back-type;
+ config false;
+ min-elements 1;
+ max-elements 3;
+ description
+ "List of supported kinds of looping back.";
+ }
+ leaf maintenance-timer-range {
+ type string;
+ default "Range of the maintenance timer not yet defined.";
+ config false;
+ description
+ "Available time periods for maintenance configurations to be described. Concrete values shall be separated by commas (e.g. '10, 60, 360'). Ranges shall be expressed as two values separated by a minus (e.g. '10-360').";
+ }
+ leaf statistics-is-avail {
+ type boolean;
+ default "false";
+ config false;
+ description
+ "1 = Statistics collection and aggregation is supported on this interface.";
+ }
+ leaf-list supported-alarm-list {
+ type string;
+ config false;
+ min-elements 2;
+ description
+ "Available alarms to be listed. Mandatory: 'IpInterfaceDown' and 'MtuMissmatch'. Further alarms might be added by the device vendors.";
+ }
+ description
+ "none";
+ }
+
+ grouping ip-interface-configuration {
+ leaf interface-name {
+ type string;
+ default "Interface name not yet defined.";
+ description
+ "Description of the interface, could be a name, could be a number. Free text field to be filled by the operator.";
+ }
+ leaf interface-is-on {
+ type boolean;
+ default "false";
+ description
+ "Only relevant if (adminShutDownIsAvail==1). 1 = Activation of the interface. 0 = De-activation of the interface without deleting it (underlying OSI network layers are not affected).";
+ }
+ leaf dhcp-client-is-on {
+ type boolean;
+ default "false";
+ description
+ "Only relevant if (dhcpClientIsAvail==1). 1 = Activation of a DHCP client on the interface.";
+ }
+ list fixed-ip-v-4-address-list {
+ key "fixed-ip-v-4-address fixed-ip-v-4-address-prefix-length";
+ min-elements 1;
+ uses ip-v-4-address-type;
+ description
+ "Only relevant if (dhcpClientIsOn==0). Secondary IP addresses.";
+ }
+ leaf maximum-transmission-unit-ip {
+ type int16;
+ units "Byte";
+ default "-1";
+ description
+ "Layer 3 maximum transmission unit size in Byte. The MTU describes the maximum IP packet size that can be put into the Ethernet frame before sending";
+ }
+ leaf arp-proxy {
+ type arp-proxy-type;
+ default "ARP_PROXY_TYPE_NOT_YET_DEFINED";
+ description
+ "openconfig-if-ip. Only relevant if (arpProxyIsAvail == 1). If set to a value different from 'DISABLE', the local system should respond to ARP requests that are for target addresses other than those that are configured on the local subinterface using its own MAC address as the target hardware address. If configured to 'REMOTE_ONLY', replies are only sent when the target address falls outside the locally configured subnets on the interface. If configured to 'ALL', all requests regardless of their target address are answered.";
+ }
+ leaf ingress-policing-profile {
+ type leafref {
+ path "/core-model:control-construct/core-model:profile-collection/core-model:profile/core-model:uuid";
+ require-instance false;
+ }
+ description
+ "Only relevant if (ingressPolicingIsAvail ==1). Reference to the definition of a policing profile. Attribute to point to an instance of Profile with profileName=='PROFILE_NAME_TYPE_POLICING_PROFILE'.";
+ }
+ leaf egress-shaping-is-on {
+ type boolean;
+ default "false";
+ description
+ "1 = Shaping on the egress is activated.";
+ }
+ leaf maximum-information-rate {
+ type int32;
+ units "kbit/s";
+ default "-1";
+ description
+ "Only relevant if (egressShapingIsAvail==1): Limits the throughput on the egress.";
+ }
+ leaf maximum-burst-size {
+ type int16;
+ units "kByte";
+ default "-1";
+ description
+ "Only relevant if (egressShapingIsAvail==1): Limits the number of kBytes, which are sent in a single burst.";
+ }
+ leaf l-3vpn-profile {
+ type leafref {
+ path "/core-model:control-construct/core-model:profile-collection/core-model:profile/core-model:uuid";
+ require-instance false;
+ }
+ description
+ "Reference to the definition of a Virtual Private Network, to which this interface belongs to. Attribute to point to an instance of Profile with profileName=='PROFILE_NAME_TYPE_L3VPN_PROFILE'.";
+ }
+ leaf qos-profile {
+ type leafref {
+ path "/core-model:control-construct/core-model:profile-collection/core-model:profile/core-model:uuid";
+ require-instance false;
+ }
+ description
+ "Reference to the definition of the QoS profile, which shall be applied on this interface. Attribute to point to an instance of Profile with profileName=='PROFILE_NAME_TYPE_QOS_PROFILE'.";
+ }
+ leaf loop-back-kind-on {
+ type loop-back-type;
+ default "LOOP_BACK_TYPE_NOT_YET_DEFINED";
+ description
+ "Maintenance Feature. Configuration of a loop back of Ethernet frames on this interface.";
+ }
+ leaf maintenance-timer {
+ type int32;
+ units "s";
+ default "-1";
+ description
+ "Time of existence of any maintenance configuration. Valid values are defined in *Capability::maintenanceTimerRange.";
+ }
+ leaf statistics-is-on {
+ type boolean;
+ default "false";
+ description
+ "Only relevant if (FlowStatisticsIsAvail==1). 1 = Collection and aggregation of statistics is switched on.";
+ }
+ list problem-kind-severity-list {
+ key "problem-kind-name";
+ uses problem-kind-severity-type;
+ description
+ "Severity of each entry of the SupportedAlarmList to be configured.";
+ }
+ description
+ "none";
+ }
+
+ grouping ip-interface-status {
+ leaf interface-status {
+ type interface-status-type;
+ default "INTERFACE_STATUS_TYPE_NOT_YET_DEFINED";
+ config false;
+ description
+ "Operational status of the interface.";
+ }
+ list ip-v-4-address-cur-list {
+ key "fixed-ip-v-4-address fixed-ip-v-4-address-prefix-length";
+ config false;
+ min-elements 1;
+ uses ip-v-4-address-type;
+ description
+ "IPv4 address, which is currently active on this interface. The format is IPv4.";
+ }
+ leaf ip-address-origin {
+ type ip-address-origin-type;
+ default "IP_ADDRESS_ORIGIN_TYPE_NOT_YET_DEFINED";
+ config false;
+ description
+ "openconfig-if-ip. Describes the origin of the currently active IP address information, e.g. statically configured, assigned by DHCP, etc..";
+ }
+ list neighbor-list {
+ key "neighbor-mac-address";
+ config false;
+ uses neighbor-type;
+ description
+ "openconfig-if-ip. Current IP and MAC addresses of the remote site of the IP link.";
+ }
+ leaf vpn-binding-is-up {
+ type boolean;
+ default "false";
+ config false;
+ description
+ "1 = Binding to a VPN definition is currently effective.";
+ }
+ leaf loop-back-kind-up {
+ type loop-back-type;
+ default "LOOP_BACK_TYPE_NOT_YET_DEFINED";
+ config false;
+ description
+ "The currently active (not just configured) type of looping back of the air interface header shall be expressed here. The received header is returned to the remote site.";
+ }
+ leaf statistics-is-up {
+ type boolean;
+ default "false";
+ config false;
+ description
+ "1 = Statistics are currently counted";
+ }
+ leaf timestamp {
+ type yang:date-and-time;
+ default "2010-11-20T14:00:00+01:00";
+ config false;
+ description
+ "The timestamp associated with when the current data was collected.";
+ }
+ leaf last-10-sec-data-input-rate {
+ type int32;
+ units "kbit/s";
+ default "-1";
+ config false;
+ description
+ "Data receive rate over the last 10 second interval in kbit/s.";
+ }
+ leaf last-10-sec-data-output-rate {
+ type int32;
+ units "kbit/s";
+ default "-1";
+ config false;
+ description
+ "Data transmit rate over the last 10 second interval in kbit/s.";
+ }
+ leaf last-10-sec-packet-input-rate {
+ type int32;
+ units "packet/s";
+ default "-1";
+ config false;
+ description
+ "Packet receive rate over the last 10 second interval.";
+ }
+ leaf last-10-sec-packet-output-rate {
+ type int32;
+ units "packet/s";
+ default "-1";
+ config false;
+ description
+ "Packet transmit rate over the last 10 second interval.";
+ }
+ leaf data-volume-input {
+ type int32;
+ units "kByte";
+ default "-1";
+ config false;
+ description
+ "Received data volume in kByte.";
+ }
+ leaf data-volume-output {
+ type int32;
+ units "kByte";
+ default "-1";
+ config false;
+ description
+ "Sent data volume in kByte.";
+ }
+ leaf total-packets-input {
+ type int64;
+ units "packets";
+ default "-1";
+ config false;
+ description
+ "The total number of IP packets received for the specified address family, including those received in error";
+ }
+ leaf total-packets-output {
+ type int64;
+ units "packets";
+ default "-1";
+ config false;
+ description
+ "The total number of IP packets for the specified address family that the device supplied to the lower layers for transmission.This includes packets generated locally and those forwarded by the device.";
+ }
+ leaf forwarded-data-volume-input {
+ type int32;
+ units "kByte";
+ default "-1";
+ config false;
+ description
+ "The number of octets received in input IP packets for the specified address family for which the device was not their final IP destination and for which the device attempted to find a route to forward them to that final destination.\n";
+ }
+ leaf forwarded-data-volume-output {
+ type int32;
+ units "kByte";
+ default "-1";
+ config false;
+ description
+ "The number of octets in packets for which this entity was not their final IP destination and for which it was successful in finding a path to their final destination.\n";
+ }
+ leaf forwarded-packets-input {
+ type int64;
+ units "packets";
+ default "-1";
+ config false;
+ description
+ "The number of input packets for which the device was not their final IP destination and for which the device attempted to find a route to forward them to that final destination.";
+ }
+ leaf forwarded-packets-output {
+ type int64;
+ units "packets";
+ default "-1";
+ config false;
+ description
+ "The number of packets for which this entity was not their final IP destination and for which it was successful in finding a path to their final destination. ";
+ }
+ leaf unicast-packets-input {
+ type int64;
+ units "packets";
+ default "-1";
+ config false;
+ description
+ "Total number of received unicast packets.";
+ }
+ leaf unicast-packets-output {
+ type int64;
+ units "packets";
+ default "-1";
+ config false;
+ description
+ "Total number of sent unicast packets.";
+ }
+ leaf multicast-packets-input {
+ type int32;
+ units "packets";
+ default "-1";
+ config false;
+ description
+ "Total number of received multicast packets.";
+ }
+ leaf multicast-packets-output {
+ type int32;
+ units "packets";
+ default "-1";
+ config false;
+ description
+ "Total number of sent multicast packets.";
+ }
+ leaf broadcast-packets-input {
+ type int32;
+ units "packets";
+ default "-1";
+ config false;
+ description
+ "Total number of received broadcast packets.";
+ }
+ leaf broadcast-packets-output {
+ type int32;
+ units "packets";
+ default "-1";
+ config false;
+ description
+ "Total number of sent broadcast packets.";
+ }
+ leaf fragmented-packets-input {
+ type int32;
+ units "packets";
+ default "-1";
+ config false;
+ description
+ "Total number of received fragmented packets.";
+ }
+ leaf errored-packets-input {
+ type int32;
+ units "packets";
+ default "-1";
+ config false;
+ description
+ "Total number of received errored packets.";
+ }
+ leaf errored-packets-output {
+ type int32;
+ units "packets";
+ default "-1";
+ config false;
+ description
+ "Number of IP packets for the specified address family locally generated and discarded due to errors, including no route found to the IP destination.";
+ }
+ leaf dropped-packets-input {
+ type int32;
+ units "packets";
+ default "-1";
+ config false;
+ description
+ "Total number of packets dropped at the receiver. The number of input IP packets for the specified address family, for which no problems were encountered to prevent their continued processing, but were discarded (e.g., for lack of buffer space).";
+ }
+ leaf dropped-packets-output {
+ type int32;
+ units "packets";
+ default "-1";
+ config false;
+ description
+ "The number of output IP packets for the specified address family for which no problem was encountered to prevent their transmission to their destination, but were discarded (e.g., for lack of buffer space).";
+ }
+ description
+ "none";
+ }
+
+ grouping ip-interface-current-problems {
+ list current-problem-list {
+ key "sequence-number";
+ config false;
+ uses ip-interface-current-problem-type;
+ description
+ "none";
+ }
+ leaf number-of-current-problems {
+ type int8;
+ default "-1";
+ config false;
+ description
+ "Number of alarms, which are currently active on this interface.";
+ }
+ leaf time-of-latest-change {
+ type yang:date-and-time;
+ default "2010-11-20T14:00:00+01:00";
+ config false;
+ description
+ "Date and time when the list of alarms has been changed for the last time.";
+ }
+ description
+ "none";
+ }
+
+ /****************************************
+ * typedef statements
+ **************************************/
+
+ typedef loop-back-type {
+ type identityref {
+ base LOOP_BACK_TYPE;
+ }
+ description
+ "none";
+ }
+
+ typedef arp-proxy-type {
+ type identityref {
+ base ARP_PROXY_TYPE;
+ }
+ description
+ "openconfig-if-ip. ";
+ }
+
+ typedef ip-address-origin-type {
+ type identityref {
+ base IP_ADDRESS_ORIGIN_TYPE;
+ }
+ description
+ "openconfig-if-ip. The origin of the interface's own IP address.";
+ }
+
+ typedef neighbor-origin-type {
+ type identityref {
+ base NEIGHBOR_ORIGIN_TYPE;
+ }
+ description
+ "openconfig-if-ip. The origin of a neighbor entry.";
+ }
+
+ /*********************************************
+ * grouping statements for complex data types
+ *******************************************/
+
+ identity LOOP_BACK_TYPE {
+ description
+ "none";
+ }
+
+ identity LOOP_BACK_TYPE_NONE {
+ base LOOP_BACK_TYPE;
+ description
+ "none";
+ }
+
+ identity LOOP_BACK_TYPE_BACK_TO_LOCAL {
+ base LOOP_BACK_TYPE;
+ description
+ "Returning Ethernet frames of the local site on the Ethernet MAC interface back to the local site.";
+ }
+
+ identity LOOP_BACK_TYPE_BACK_TO_REMOTE {
+ base LOOP_BACK_TYPE;
+ description
+ "Returning Ethernet frames of the remote site on the Ethernet MAC interface back to the remote site.";
+ }
+
+ identity LOOP_BACK_TYPE_NOT_YET_DEFINED {
+ base LOOP_BACK_TYPE;
+ description
+ "none";
+ }
+
+ identity ARP_PROXY_TYPE {
+ description
+ "none";
+ }
+
+ identity ARP_PROXY_TYPE_DISABLE {
+ base ARP_PROXY_TYPE;
+ description
+ "The system should not respond to ARP requests that do not specify an IP address configured on the local subinterface as the target address.";
+ }
+
+ identity ARP_PROXY_TYPE_REMOTE_ONLY {
+ base ARP_PROXY_TYPE;
+ description
+ "The system responds to ARP requests only when the sender and target IP addresses are in different subnets.";
+ }
+
+ identity ARP_PROXY_TYPE_ALL {
+ base ARP_PROXY_TYPE;
+ description
+ "The system responds to ARP requests where the sender and target IP addresses are in different subnets, as well as those where they are in the same subnet.";
+ }
+
+ identity ARP_PROXY_TYPE_NOT_YET_DEFINED {
+ base ARP_PROXY_TYPE;
+ description
+ "none";
+ }
+
+ identity IP_ADDRESS_ORIGIN_TYPE {
+ description
+ "none";
+ }
+
+ identity IP_ADDRESS_ORIGIN_TYPE_OTHER {
+ base IP_ADDRESS_ORIGIN_TYPE;
+ description
+ "None of the following.";
+ }
+
+ identity IP_ADDRESS_ORIGIN_TYPE_STATIC {
+ base IP_ADDRESS_ORIGIN_TYPE;
+ description
+ "Indicates that the address has been statically configured - for example, using NETCONF or a Command Line Interface.";
+ }
+
+ identity IP_ADDRESS_ORIGIN_TYPE_DHCP {
+ base IP_ADDRESS_ORIGIN_TYPE;
+ description
+ "Indicates an address that has been assigned to this system by a DHCP server.";
+ }
+
+ identity IP_ADDRESS_ORIGIN_TYPE_LINK_LAYER {
+ base IP_ADDRESS_ORIGIN_TYPE;
+ description
+ "Indicates an address created by IPv6 stateless autoconfiguration that embeds a link-layer address in its interface identifier.";
+ }
+
+ identity IP_ADDRESS_ORIGIN_TYPE_RANDOM {
+ base IP_ADDRESS_ORIGIN_TYPE;
+ description
+ "Indicates an address chosen by the system at random, e.g., an IPv4 address within 169.254/16, an RFC 4941 temporary address, or an RFC 7217 semantically opaque address.";
+ }
+
+ identity IP_ADDRESS_ORIGIN_TYPE_NOT_YET_DEFINED {
+ base IP_ADDRESS_ORIGIN_TYPE;
+ description
+ "none";
+ }
+
+ identity NEIGHBOR_ORIGIN_TYPE {
+ description
+ "none";
+ }
+
+ identity NEIGHBOR_ORIGIN_TYPE_OTHER {
+ base NEIGHBOR_ORIGIN_TYPE;
+ description
+ "None of the following.";
+ }
+
+ identity NEIGHBOR_ORIGIN_TYPE_STATIC {
+ base NEIGHBOR_ORIGIN_TYPE;
+ description
+ "Indicates that the mapping has been statically configured - for example, using NETCONF or a Command Line Interface.";
+ }
+
+ identity NEIGHBOR_ORIGIN_TYPE_DYNAMIC {
+ base NEIGHBOR_ORIGIN_TYPE;
+ description
+ "Indicates that the mapping has been dynamically resolved using, e.g., IPv4 ARP.";
+ }
+
+ identity NEIGHBOR_ORIGIN_TYPE_NOT_YET_DEFINED {
+ base NEIGHBOR_ORIGIN_TYPE;
+ description
+ "none";
+ }
+
+ identity SEVERITY_TYPE {
+ description
+ "none";
+ }
+
+ identity SEVERITY_TYPE_NON-ALARMED {
+ base SEVERITY_TYPE;
+ description
+ "none";
+ }
+
+ identity SEVERITY_TYPE_WARNING {
+ base SEVERITY_TYPE;
+ description
+ "none";
+ }
+
+ identity SEVERITY_TYPE_MAJOR {
+ base SEVERITY_TYPE;
+ description
+ "none";
+ }
+
+ identity SEVERITY_TYPE_MINOR {
+ base SEVERITY_TYPE;
+ description
+ "none";
+ }
+
+ identity SEVERITY_TYPE_CRITICAL {
+ base SEVERITY_TYPE;
+ description
+ "none";
+ }
+
+ identity SEVERITY_TYPE_NOT_YET_DEFINED {
+ base SEVERITY_TYPE;
+ description
+ "none";
+ }
+
+ identity INTERFACE_STATUS_TYPE {
+ description
+ "none";
+ }
+
+ identity INTERFACE_STATUS_TYPE_UP {
+ base INTERFACE_STATUS_TYPE;
+ description
+ "Ready to pass packets.";
+ }
+
+ identity INTERFACE_STATUS_TYPE_DOWN {
+ base INTERFACE_STATUS_TYPE;
+ description
+ "The interface does not pass any packets.";
+ }
+
+ identity INTERFACE_STATUS_TYPE_TESTING {
+ base INTERFACE_STATUS_TYPE;
+ description
+ "In some test mode. No operational packets can be passed.";
+ }
+
+ identity INTERFACE_STATUS_TYPE_UNKNOWN {
+ base INTERFACE_STATUS_TYPE;
+ description
+ "Status cannot be determined for some reason.";
+ }
+
+ identity INTERFACE_STATUS_TYPE_DORMANT {
+ base INTERFACE_STATUS_TYPE;
+ description
+ "Waiting for some external event.";
+ }
+
+ identity INTERFACE_STATUS_TYPE_NOT_PRESENT {
+ base INTERFACE_STATUS_TYPE;
+ description
+ "Some component (typically hardware) is missing.";
+ }
+
+ identity INTERFACE_STATUS_TYPE_LOWER_LAYER_DOWN {
+ base INTERFACE_STATUS_TYPE;
+ description
+ "Down due to state of lower-layer interface(s).";
+ }
+
+ identity INTERFACE_STATUS_TYPE_ADMIN_DOWN {
+ base INTERFACE_STATUS_TYPE;
+ description
+ "Down due to configuration.";
+ }
+
+ identity INTERFACE_STATUS_TYPE_NOT_YET_DEFINED {
+ base INTERFACE_STATUS_TYPE;
+ description
+ "none";
+ }
+
+ /****************************************
+ * package super-types
+ **************************************/
+
+ typedef severity-type {
+ type identityref {
+ base SEVERITY_TYPE;
+ }
+ description
+ "none";
+ }
+
+ typedef interface-status-type {
+ type identityref {
+ base INTERFACE_STATUS_TYPE;
+ }
+ description
+ "Current Operational Interface Status";
+ }
+
+ grouping problem-kind-severity-type {
+ leaf problem-kind-name {
+ type string;
+ description
+ "Name of the alarm according to SupportedAlarmList";
+ }
+ leaf problem-kind-severity {
+ type severity-type;
+ description
+ "Severity of this type of alarm.";
+ }
+ description
+ "none";
+ }
+
+ grouping ip-v-4-address-type {
+ leaf fixed-ip-v-4-address {
+ type string;
+ description
+ "IPv4 address fixed assigned to this interface. The format is e.g. 172.168.0.5";
+ }
+ leaf fixed-ip-v-4-address-prefix-length {
+ type int8;
+ description
+ "Fixed assigned routing prefix (sub network) length (e.g. for 198.51.100.0/24 the fixedIpV4AddressPrefixLength would be 24).\n";
+ }
+ leaf fixed-default-gateway-ip-v-4-address {
+ type string;
+ default "0.0.0.0";
+ description
+ "Only relevant if ( (dhcpClientIsOn==0) AND (fixedDefaultGatewayConfigurationIsAvail==1) ). Fixed assigned IPv4 address of the default gateway.";
+ }
+ description
+ "none";
+ }
+
+ grouping neighbor-type {
+ leaf neighbor-mac-address {
+ type string;
+ config false;
+ description
+ "MAC address of the neighbor node. The format is e.g. 00:80:41:ae:fd:7e";
+ }
+ leaf neighbor-ip-v-4-address-list {
+ type string;
+ default "0.0.0.0";
+ config false;
+ description
+ "IPv4 address of the neighbor node. The format is IPv4, e.g. 172.168.0.5";
+ }
+ leaf neighbor-origin {
+ type neighbor-origin-type;
+ config false;
+ description
+ "The origin of a neighbor entry.";
+ }
+ description
+ "openconfig-if-ip. Neighbor entries are analagous to static ARP entries, i.e. they create a correspondence between IP and link-layer addresses.";
+ }
+
+ grouping ip-interface-current-problem-type {
+ leaf problem-name {
+ type string;
+ default "NOT_YET_DEFINED";
+ description
+ "Name of the alarm according to SupportedAlarmList";
+ }
+ uses current-problem;
+ description
+ "none";
+ }
+}
diff --git a/sdnr/wt/devicemanager-onap/onf14/provider/src/main/yang/l-3vpn-profile-1-0.yang b/sdnr/wt/devicemanager-onap/onf14/provider/src/main/yang/l-3vpn-profile-1-0.yang new file mode 100644 index 000000000..b5682c9cc --- /dev/null +++ b/sdnr/wt/devicemanager-onap/onf14/provider/src/main/yang/l-3vpn-profile-1-0.yang @@ -0,0 +1,499 @@ +module l-3vpn-profile-1-0 {
+ yang-version 1.1;
+ namespace "urn:onf:yang:l-3vpn-profile-1-0";
+ prefix l-3vpn-profile;
+
+ import ietf-yang-types {
+ prefix yang;
+ }
+ import core-model-1-4 {
+ prefix core-model;
+ }
+
+ organization
+ "openBackhaul.com proposal to Open Networking Foundation (ONF)";
+ contact
+ "WG Web : https://github.com/openBackhaul/Overview
+ WG List: L3vpnProfile@openBackhaul.com
+ Editor : Thorsten Heinze
+ Email : Thorsten.Heinze@openBackhaul.com";
+ description
+ "Technology specific profile definition for Layer 3 Virtual Private Networks
+
+ Copyright 2019 openBackhaul.com
+
+ Licensed under the Apache License, Version 2.0 (the 'License');
+ you may not use this file except in compliance with the License.
+ You may obtain a copy of the License at
+ http://www.apache.org/licenses/LICENSE-2.0
+ Unless required by applicable law or agreed to in writing, software
+ distributed under the License is distributed on an 'AS IS' BASIS,
+ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ See the License for the specific language governing permissions and
+ limitations under the License.";
+
+ revision 2020-01-27 {
+ description
+ "Model for the Transport SDN Pilot at Telefonica Germany.
+ Please view https://github.com/openBackhaul/l3vpnProfile/issues for changes.";
+ reference
+ "https://github.com/openBackhaul/l3vpnProfile/tree/tsp: Model definition
+ https://github.com/openBackhaul/onfCoreIm/tree/tsp: ONF TR-512 Core IM incl. Profile and enhanced Equipment definition";
+ }
+ revision 2019-07-12 {
+ description
+ "Model for the Transport SDN Pilot at Telefonica Germany.
+ Please view https://github.com/openBackhaul/l3vpnProfile/issues for changes.";
+ reference
+ "https://github.com/openBackhaul/l3vpnProfile/tree/tsp: Model definition
+ https://github.com/openBackhaul/onfCoreIm/tree/tsp: ONF TR-512 Core IM incl. Profile and enhanced Equipment definition";
+ }
+
+ identity PROFILE_NAME_TYPE_L3VPN_PROFILE {
+ base core-model:PROFILE_NAME_TYPE;
+ description
+ "none";
+ }
+
+ augment "/core-model:control-construct/core-model:profile-collection/core-model:profile" {
+ when "derived-from-or-self(./core-model:profile-name, 'l-3vpn-profile:PROFILE_NAME_TYPE_L3VPN_PROFILE')";
+ uses l-3vpn-profile-spec;
+ description
+ "none";
+ }
+
+ /****************************************
+ * package notifications
+ **************************************/
+
+ notification object-creation-notification {
+ uses object-creation-notification;
+ description
+ "none";
+ }
+
+ grouping object-creation-notification {
+ leaf counter {
+ type int32;
+ default "-1";
+ config false;
+ description
+ "Counts object creation notifications.";
+ }
+ leaf timestamp {
+ type yang:date-and-time;
+ default "2010-11-20T14:00:00+01:00";
+ config false;
+ description
+ "none";
+ }
+ leaf object-id-ref {
+ type leafref {
+ path "/core-model:control-construct/core-model:profile-collection/core-model:profile/core-model:uuid";
+ require-instance false;
+ }
+ config false;
+ description
+ "none";
+ }
+ leaf object-type {
+ type string;
+ default "Type of created object not specified.";
+ config false;
+ description
+ "none";
+ }
+ description
+ "none";
+ }
+
+ notification object-deletion-notification {
+ uses object-deletion-notification;
+ description
+ "none";
+ }
+
+ grouping object-deletion-notification {
+ leaf counter {
+ type int32;
+ default "-1";
+ config false;
+ description
+ "Counts object deletion notifications.";
+ }
+ leaf timestamp {
+ type yang:date-and-time;
+ default "2010-11-20T14:00:00+01:00";
+ config false;
+ description
+ "none";
+ }
+ leaf object-id-ref {
+ type leafref {
+ path "/core-model:control-construct/core-model:profile-collection/core-model:profile/core-model:uuid";
+ require-instance false;
+ }
+ config false;
+ description
+ "none";
+ }
+ description
+ "none";
+ }
+
+ /****************************************
+ * grouping statements for object classes
+ **************************************/
+
+ grouping l-3vpn-profile-spec {
+ container l-3vpn-pac {
+ uses l-3vpn-pac;
+ description
+ "none";
+ }
+ description
+ "none";
+ }
+
+ grouping l-3vpn-pac {
+ container l-3vpn-capability {
+ config false;
+ uses l-3vpn-capability;
+ description
+ "none";
+ }
+ container l-3vpn-configuration {
+ config false;
+ uses l-3vpn-configuration;
+ description
+ "none";
+ }
+ description
+ "none";
+ }
+
+ grouping l-3vpn-capability {
+ leaf profile-naming-is-avail {
+ type boolean;
+ default "false";
+ config false;
+ description
+ "1 = There is a free text field available for naming the profile.";
+ }
+ leaf l-3vpn-based-on-ip-v-6-is-avail {
+ type boolean;
+ default "false";
+ config false;
+ description
+ "1 = Virtual Private Networks based on IP v6 addresses is available at the device.";
+ }
+ description
+ "none";
+ }
+
+ grouping l-3vpn-configuration {
+ leaf profile-name {
+ type string;
+ default "Name of profile not yet defined.";
+ description
+ "Identifier of the profile. Could be a name, could be a number. Free text field to be filled by the operator.";
+ }
+ leaf l-3vpn-description {
+ type string;
+ default "VPN description not yet defined.";
+ description
+ "Short description of the VPN.";
+ }
+ list l-3vpn-configuration-list {
+ key "label-mode";
+ min-elements 1;
+ max-elements 2;
+ uses l-3vpn-configuration-type;
+ description
+ "L3 VPN instance Configuration.";
+ }
+ description
+ "none";
+ }
+
+ /****************************************
+ * typedef statements
+ **************************************/
+
+ typedef label-mode-type {
+ type identityref {
+ base LABEL_MODE_TYPE;
+ }
+ description
+ "none";
+ }
+
+ typedef device-identifier-kind-type {
+ type identityref {
+ base DEVICE_IDENTIFIER_KIND_TYPE;
+ }
+ description
+ "none";
+ }
+
+ typedef address-family-type {
+ type identityref {
+ base ADDRESS_FAMILY_TYPE;
+ }
+ description
+ "Address family of the VRF IPv4/IPV6.";
+ }
+
+ typedef route-pritority-type {
+ type identityref {
+ base ROUTE_PRITORITY_TYPE;
+ }
+ description
+ "The priority of the Route";
+ }
+
+ typedef route-state-type {
+ type identityref {
+ base ROUTE_STATE_TYPE;
+ }
+ description
+ "The state of the route as per the routing table. It is a combination of the one or more of the following states: ADV, NOADV,ACTIVE, INACTIVE, RELIED.";
+ }
+
+ typedef route-flag-type {
+ type identityref {
+ base ROUTE_FLAG_TYPE;
+ }
+ description
+ "Indicates the route flag, that is, Route Flags in the heading of the routing table displayed. It is a combination of one or more of the following flags: D and,R Meaning of each of the flag is availble under corresponding flag value.";
+ }
+
+ /*********************************************
+ * grouping statements for complex data types
+ *******************************************/
+
+ identity LABEL_MODE_TYPE {
+ description
+ "none";
+ }
+
+ identity LABEL_MODE_TYPE_PER_INSTANCE {
+ base LABEL_MODE_TYPE;
+ description
+ "Labels are assigned to VPN instances in one label per instance mode, that is, all routes in a VPN instance are assigned with the same label.";
+ }
+
+ identity LABEL_MODE_TYPE_PER_ROUTE {
+ base LABEL_MODE_TYPE;
+ description
+ "Labels are assigned to routes in the 'one label per route' mode, that is, each route is assigned with one label.";
+ }
+
+ identity DEVICE_IDENTIFIER_KIND_TYPE {
+ description
+ "none";
+ }
+
+ identity DEVICE_IDENTIFIER_KIND_TYPE_LOOP_BACK_IP_ADDRESS {
+ base DEVICE_IDENTIFIER_KIND_TYPE;
+ description
+ "none";
+ }
+
+ identity DEVICE_IDENTIFIER_KIND_TYPE_AS_NUMBER {
+ base DEVICE_IDENTIFIER_KIND_TYPE;
+ description
+ "none";
+ }
+
+ identity DEVICE_IDENTIFIER_KIND_TYPE_NOT_YET_DEFINED {
+ base DEVICE_IDENTIFIER_KIND_TYPE;
+ description
+ "none";
+ }
+
+ identity ADDRESS_FAMILY_TYPE {
+ description
+ "none";
+ }
+
+ identity ADDRESS_FAMILY_TYPE_IPV4-FAMILY {
+ base ADDRESS_FAMILY_TYPE;
+ description
+ "none";
+ }
+
+ identity ADDRESS_FAMILY_TYPE_IPV6-FAMILY {
+ base ADDRESS_FAMILY_TYPE;
+ description
+ "none";
+ }
+
+ identity ADDRESS_FAMILY_TYPE_UNKNOWN {
+ base ADDRESS_FAMILY_TYPE;
+ description
+ "none";
+ }
+
+ identity ADDRESS_FAMILY_TYPE_NOT_YET_DEFINED {
+ base ADDRESS_FAMILY_TYPE;
+ description
+ "none";
+ }
+
+ identity ROUTE_PRITORITY_TYPE {
+ description
+ "none";
+ }
+
+ identity ROUTE_PRITORITY_TYPE_CRITICAL {
+ base ROUTE_PRITORITY_TYPE;
+ description
+ "Highest protocol priority.";
+ }
+
+ identity ROUTE_PRITORITY_TYPE_HIGH {
+ base ROUTE_PRITORITY_TYPE;
+ description
+ "High protocol priority";
+ }
+
+ identity ROUTE_PRITORITY_TYPE_MEDIUM {
+ base ROUTE_PRITORITY_TYPE;
+ description
+ "Medium protocol priority.";
+ }
+
+ identity ROUTE_PRITORITY_TYPE_LOW {
+ base ROUTE_PRITORITY_TYPE;
+ description
+ "Low protocol priority.";
+ }
+
+ identity ROUTE_STATE_TYPE {
+ description
+ "none";
+ }
+
+ identity ROUTE_STATE_TYPE_ACTIVE_ADV {
+ base ROUTE_STATE_TYPE;
+ description
+ "The route state is active and advertised.";
+ }
+
+ identity ROUTE_STATE_TYPE_ACTIVE_NOADV {
+ base ROUTE_STATE_TYPE;
+ description
+ "The route state is active and not advertised.";
+ }
+
+ identity ROUTE_STATE_TYPE_ACTIVE_ADV_RELIED {
+ base ROUTE_STATE_TYPE;
+ description
+ "The route state is active, advertised, and relied.";
+ }
+
+ identity ROUTE_STATE_TYPE_ACTIVE_NOADV_RELIED {
+ base ROUTE_STATE_TYPE;
+ description
+ "The route state is active, not advertised, and relied.";
+ }
+
+ identity ROUTE_STATE_TYPE_INVALID_NOADV {
+ base ROUTE_STATE_TYPE;
+ description
+ "The route state is invalid and not advertised.";
+ }
+
+ identity ROUTE_STATE_TYPE_INACTIVE_NOADV {
+ base ROUTE_STATE_TYPE;
+ description
+ "The route state is inactive and not advertised.";
+ }
+
+ identity ROUTE_FLAG_TYPE {
+ description
+ "none";
+ }
+
+ identity ROUTE_FLAG_TYPE_D {
+ base ROUTE_FLAG_TYPE;
+ description
+ "A route is advertised to the Forwarding Information Base table.";
+ }
+
+ identity ROUTE_FLAG_TYPE_RD {
+ base ROUTE_FLAG_TYPE;
+ description
+ "A route is an iterated route and needs to be advertised to the FIB table.";
+ }
+
+ identity ROUTE_FLAG_TYPE_R {
+ base ROUTE_FLAG_TYPE;
+ description
+ "A route is an iterated route.";
+ }
+
+ grouping route-distinguisher-and-target-type {
+ leaf vpn-number {
+ type uint32;
+ description
+ "Identifier of the VPN, which is unique in the entire network";
+ }
+ leaf device-identifier-kind {
+ type device-identifier-kind-type;
+ default "DEVICE_IDENTIFIER_KIND_TYPE_NOT_YET_DEFINED";
+ description
+ "none";
+ }
+ leaf loop-back-ip-address {
+ type string;
+ default "-1.-1.-1.-1";
+ description
+ "Only relevant if (deviceIdentifierKind==LOOP_BACK_IP_ADDRESS). Loop back address of the device.";
+ }
+ leaf as-number {
+ type uint32;
+ default "0";
+ description
+ "Only relevant if (deviceIdentifierKind==AS_NUMBER). Autonomous System number of the device.";
+ }
+ description
+ "none";
+ }
+
+ grouping l-3vpn-configuration-type {
+ leaf label-mode {
+ type label-mode-type;
+ description
+ "Label model used by the VPN.";
+ }
+ container route-distinguisher {
+ uses route-distinguisher-and-target-type;
+ description
+ "The route distinguisher that should be used for the local VRF or VSI instance when it is signalled via BGP.";
+ }
+ list route-target-import-list {
+ key "vpn-number";
+ min-elements 1;
+ uses route-distinguisher-and-target-type;
+ description
+ "Route targets that will be imported to this VPN ";
+ }
+ list route-target-export-list {
+ key "vpn-number";
+ min-elements 1;
+ uses route-distinguisher-and-target-type;
+ description
+ "Route targets that will be tagged to outgoing routes";
+ }
+ leaf address-family {
+ type address-family-type;
+ default "ADDRESS_FAMILY_TYPE_NOT_YET_DEFINED";
+ description
+ "Address family type for the VPN instance is created for";
+ }
+ description
+ "L3 VPN instance configuration information.";
+ }
+}
diff --git a/sdnr/wt/devicemanager-onap/onf14/provider/src/main/yang/ltp-augment-1-0.yang b/sdnr/wt/devicemanager-onap/onf14/provider/src/main/yang/ltp-augment-1-0.yang new file mode 100644 index 000000000..a1aae5842 --- /dev/null +++ b/sdnr/wt/devicemanager-onap/onf14/provider/src/main/yang/ltp-augment-1-0.yang @@ -0,0 +1,102 @@ +module ltp-augment-1-0 {
+ yang-version 1.1;
+ namespace "urn:onf:yang:ltp-augment-1-0";
+ prefix ltp-augment;
+
+ import ietf-yang-types {
+ prefix yang;
+ }
+ import core-model-1-4 {
+ prefix core-model;
+ }
+
+ organization
+ "openBackhaul.com proposal to Open Networking Foundation (ONF)";
+ contact
+ "WG Web : https://github.com/openBackhaul/Overview
+ WG List: LtpAugment@openBackhaul.com
+ Editor : Thorsten Heinze
+ Email : Thorsten.Heinze@openBackhaul.com";
+ description
+ "Copyright 2019 openBackhaul.com
+
+ Licensed under the Apache License, Version 2.0 (the 'License');
+ you may not use this file except in compliance with the License.
+ You may obtain a copy of the License at
+ http://www.apache.org/licenses/LICENSE-2.0
+ Unless required by applicable law or agreed to in writing, software
+ distributed under the License is distributed on an 'AS IS' BASIS,
+ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ See the License for the specific language governing permissions and
+ limitations under the License.";
+
+ revision 2020-07-30 {
+ description
+ "Model for the Transport SDN Pilot at Telefonica Germany.
+ Please view https://github.com/openBackhaul/ltpAugment/issues for changes.";
+ reference
+ "https://github.com/openBackhaul/ltpAugment/tree/tsp: Model definition
+ https://github.com/openBackhaul/onfCoreIm/tree/tsp: ONF TR-512 Core IM incl. Profile and enhanced Equipment definition";
+ }
+
+ augment "/core-model:control-construct/core-model:logical-termination-point"{
+ uses ltp-augment-spec;
+ description
+ "none";
+ }
+
+ /****************************************
+ * grouping statements for object classes
+ **************************************/
+ grouping ltp-augment-spec {
+ container ltp-augment-pac {
+ uses ltp-augment-pac;
+ description
+ "none";
+ }
+ description
+ "none";
+ }
+
+ grouping ltp-augment-pac {
+ container ltp-augment-configuration {
+ uses ltp-augment-configuration;
+ description
+ "none";
+ }
+ description
+ "none";
+ }
+
+ grouping ltp-augment-configuration {
+ leaf-list equipment {
+ type leafref {
+ path "/core-model:control-construct/core-model:equipment/core-model:uuid";
+ require-instance false;
+ }
+ config false;
+ description
+ "Equipment, which determines the characteristics of this interface (LTP).";
+ }
+ leaf connector {
+ type leafref {
+ path "/core-model:control-construct/core-model:equipment/core-model:connector/core-model:local-id";
+ require-instance false;
+ }
+ config false;
+ description
+ "Connector, where this interface (LTP) can be physically connected.";
+ }
+ description
+ "none";
+ }
+
+ /****************************************
+ * typedef statements
+ **************************************/
+
+ /*********************************************
+ * grouping statements for complex data types
+ *******************************************/
+
+}
diff --git a/sdnr/wt/devicemanager-onap/onf14/provider/src/main/yang/mac-fc-1-0.yang b/sdnr/wt/devicemanager-onap/onf14/provider/src/main/yang/mac-fc-1-0.yang new file mode 100644 index 000000000..cbe692ca8 --- /dev/null +++ b/sdnr/wt/devicemanager-onap/onf14/provider/src/main/yang/mac-fc-1-0.yang @@ -0,0 +1,569 @@ +module mac-fc-1-0 {
+ yang-version 1.1;
+ namespace "urn:onf:yang:mac-fc-1-0";
+ prefix mac-fc;
+
+ import ietf-yang-types {
+ prefix yang;
+ }
+ import core-model-1-4 {
+ prefix core-model;
+ }
+
+ organization
+ "openBackhaul.com proposal to Open Networking Foundation (ONF)";
+ contact
+ "WG Web : https://github.com/openBackhaul/Overview
+ WG List: MacFc@openBackhaul.com
+ Editor : Thorsten Heinze
+ Email : Thorsten.Heinze@openBackhaul.com";
+ description
+ "Technology specific amendment to the ForwardingConstruct class for documenting entries in the MAC forwarding table according to IEEE 802.1 .
+
+ Copyright 2019 openBackhaul.com
+
+ Licensed under the Apache License, Version 2.0 (the 'License');
+ you may not use this file except in compliance with the License.
+ You may obtain a copy of the License at
+ http://www.apache.org/licenses/LICENSE-2.0
+ Unless required by applicable law or agreed to in writing, software
+ distributed under the License is distributed on an 'AS IS' BASIS,
+ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ See the License for the specific language governing permissions and
+ limitations under the License.";
+
+ revision 2020-08-26 {
+ description
+ "Model for the Transport SDN Pilot at Telefonica Germany
+ Please view https://github.com/openBackhaul/macFc/issues for changes.";
+ reference
+ "https://github.com/openBackhaul/macFc/tree/tsp: Model definition
+ https://github.com/openBackhaul/onfCoreIm/tree/tsp: ONF TR-512 Core IM incl. Profile and enhanced Equipment definition";
+ }
+
+ identity LAYER_PROTOCOL_NAME_TYPE_MAC_LAYER {
+ base core-model:LAYER_PROTOCOL_NAME_TYPE;
+ description
+ "none";
+ }
+
+ augment "/core-model:control-construct/core-model:forwarding-domain/core-model:fc" {
+ when "derived-from-or-self(./core-model:layer-protocol-name, 'mac-fc:LAYER_PROTOCOL_NAME_TYPE_MAC_LAYER')";
+ uses mac-fc-spec;
+ description
+ "none";
+ }
+
+ /****************************************
+ * package notifications
+ **************************************/
+
+ notification object-creation-notification {
+ uses object-creation-notification;
+ description
+ "none";
+ }
+
+ grouping object-creation-notification {
+ leaf counter {
+ type int32;
+ default "-1";
+ config false;
+ description
+ "Counts object creation notifications.";
+ }
+ leaf timestamp {
+ type yang:date-and-time;
+ default "2010-11-20T14:00:00+01:00";
+ config false;
+ description
+ "none";
+ }
+ leaf object-id-ref {
+ type leafref {
+ path "/core-model:control-construct/core-model:forwarding-domain/core-model:fc/core-model:uuid";
+ require-instance false;
+ }
+ config false;
+ description
+ "none";
+ }
+ leaf object-type {
+ type string;
+ default "Type of created object not specified.";
+ config false;
+ description
+ "none";
+ }
+ description
+ "none";
+ }
+
+ notification object-deletion-notification {
+ uses object-deletion-notification;
+ description
+ "none";
+ }
+
+ grouping object-deletion-notification {
+ leaf counter {
+ type int32;
+ default "-1";
+ config false;
+ description
+ "Counts object deletion notifications.";
+ }
+ leaf timestamp {
+ type yang:date-and-time;
+ default "2010-11-20T14:00:00+01:00";
+ config false;
+ description
+ "none";
+ }
+ leaf object-id-ref {
+ type leafref {
+ path "/core-model:control-construct/core-model:forwarding-domain/core-model:fc/core-model:uuid";
+ require-instance false;
+ }
+ config false;
+ description
+ "none";
+ }
+ description
+ "none";
+ }
+
+ notification attribute-value-changed-notification {
+ uses attribute-value-changed-notification;
+ description
+ "none";
+ }
+
+ grouping attribute-value-changed-notification {
+ leaf counter {
+ type int32;
+ default "-1";
+ config false;
+ description
+ "Counts attribute value changed notifications.";
+ }
+ leaf timestamp {
+ type yang:date-and-time;
+ default "2010-11-20T14:00:00+01:00";
+ config false;
+ description
+ "none";
+ }
+ leaf object-id-ref {
+ type leafref {
+ path "/core-model:control-construct/core-model:forwarding-domain/core-model:fc/core-model:uuid";
+ require-instance false;
+ }
+ config false;
+ description
+ "none";
+ }
+ leaf attribute-name {
+ type string;
+ default "Attribute name not specified.";
+ config false;
+ description
+ "Name of the attribute that has been changed.";
+ }
+ leaf new-value {
+ type string;
+ default "New value not specified.";
+ config false;
+ description
+ "Attribute value converted to a string (xml, json, ...)";
+ }
+ description
+ "To be sent when an attribute has changed and one or more controllers have to update their data.";
+ }
+
+ notification problem-notification {
+ uses problem-notification;
+ description
+ "none";
+ }
+
+ grouping problem-notification {
+ leaf counter {
+ type int32;
+ default "-1";
+ config false;
+ description
+ "Counts problem notifications";
+ }
+ leaf timestamp {
+ type yang:date-and-time;
+ default "2010-11-20T14:00:00+01:00";
+ config false;
+ description
+ "none";
+ }
+ leaf object-id-ref {
+ type leafref {
+ path "/core-model:control-construct/core-model:forwarding-domain/core-model:fc/core-model:uuid";
+ require-instance false;
+ }
+ config false;
+ description
+ "none";
+ }
+ leaf problem {
+ type string;
+ default "Problem name not specified.";
+ config false;
+ description
+ "Name of the problem according to *Capability::supportedAlarmList";
+ }
+ leaf severity {
+ type severity-type;
+ default "SEVERITY_TYPE_WARNING";
+ config false;
+ description
+ "Severity of the problem according to *Configuration::problemSeverityList";
+ }
+ description
+ "none";
+ }
+
+ /****************************************
+ * grouping statements for object classes
+ **************************************/
+ /****************************************
+ * package super-classes
+ **************************************/
+
+ grouping current-problem {
+ leaf sequence-number {
+ type int16;
+ config false;
+ description
+ "Unique sequence number of the current problem object.";
+ }
+ leaf timestamp {
+ type yang:date-and-time;
+ default "2010-11-20T14:00:00+01:00";
+ config false;
+ description
+ "none";
+ }
+ leaf problem-severity {
+ type severity-type;
+ default "SEVERITY_TYPE_NOT_YET_DEFINED";
+ config false;
+ description
+ "Severity of the alarm.";
+ }
+ description
+ "none";
+ }
+
+ grouping mac-fc-spec {
+ container mac-fc-pac {
+ uses mac-fc-pac;
+ description
+ "none";
+ }
+ description
+ "Represents an entry into the MAC forwarding table. Name in ieee802-dot1q-bridge.yang: filtering-entry.";
+ }
+
+ grouping mac-fc-pac {
+ container mac-fc-capability {
+ config false;
+ uses mac-fc-capability;
+ description
+ "none";
+ }
+ container mac-fc-configuration {
+ uses mac-fc-configuration;
+ description
+ "none";
+ }
+ container mac-fc-status {
+ config false;
+ uses mac-fc-status;
+ description
+ "none";
+ }
+ container mac-fc-current-problems {
+ config false;
+ uses mac-fc-current-problems;
+ description
+ "none";
+ }
+ description
+ "none";
+ }
+
+ grouping mac-fc-capability {
+ leaf admin-shut-down-is-avail {
+ type boolean;
+ default "false";
+ config false;
+ description
+ "true = Manual switching on and off of the forwarding construct without deleting it (underlying OSI network layers are also not affected) is available.";
+ }
+ leaf-list supported-alarm-list {
+ type string;
+ default "Supported Alarms not yet defined.";
+ config false;
+ description
+ "Available alarms to be listed.";
+ }
+ description
+ "none";
+ }
+
+ grouping mac-fc-configuration {
+ leaf fc-name {
+ type string;
+ default "FC name not yet defined.";
+ description
+ "Name of the ForwardingConstruct. Free text field to be filled by the operator.";
+ }
+ leaf fc-is-on {
+ type boolean;
+ default "false";
+ description
+ "Only effective if (adminShutDownIsAvail==true). true = Activation of the forwarding of frames. false = De-activation of the ForwardingConstruct without deleting it (underlying OSI network layers are not affected).";
+ }
+ leaf database-id {
+ type int32;
+ default "-1";
+ description
+ "The identity of the Filtering Database. Name in ieee802-dot1q-bridge.yang: database-id.";
+ }
+ leaf mac-address {
+ type string;
+ default "00:00:00:00:00:00";
+ description
+ "Configuration of a MAC address (unicast, multicast, broadcast), for which the device has forwarding and/or filtering information.";
+ }
+ leaf entry-kind {
+ type entry-kind-type;
+ default "ENTRY_KIND_TYPE_NOT_YET_DEFINED";
+ description
+ "The type of filtering entry. Whether static or dynamic. Static entries can be created, deleted, and retrieved. However, dynamic entries can only be deleted or retrieved by the management entity. Consequently, a Bridge is not required to accept a command that can alter the dynamic entries except delete a dynamic entry. Name in ieee802-dot1q-bridge.yang: entry-type.";
+ }
+ list problem-kind-severity-list {
+ key "problem-kind-name";
+ uses problem-kind-severity-type;
+ description
+ "Severity of the problem to be configured.";
+ }
+ description
+ "none";
+ }
+
+ grouping mac-fc-status {
+ leaf fc-status {
+ type fc-status-type;
+ default "FC_STATUS_TYPE_NOT_YET_DEFINED";
+ config false;
+ description
+ "The status of this entry. Name in ieee802-dot1q-bridge.yang: status.";
+ }
+ description
+ "none";
+ }
+
+ grouping mac-fc-current-problems {
+ list current-problem-list {
+ key "sequence-number";
+ config false;
+ uses mac-fc-current-problem-type;
+ description
+ "none";
+ }
+ leaf number-of-current-problems {
+ type int8;
+ default "-1";
+ config false;
+ description
+ "Number of alarms, which are currently active on this interface.";
+ }
+ leaf time-of-latest-change {
+ type yang:date-and-time;
+ default "2010-11-20T14:00:00+01:00";
+ config false;
+ description
+ "Date and time when the list of alarms has been changed for the last time.";
+ }
+ description
+ "none";
+ }
+
+ /****************************************
+ * typedef statements
+ **************************************/
+
+ typedef entry-kind-type {
+ type identityref {
+ base ENTRY_KIND_TYPE;
+ }
+ description
+ "none";
+ }
+
+ typedef fc-status-type {
+ type identityref {
+ base FC_STATUS_TYPE;
+ }
+ description
+ "none";
+ }
+
+ /*********************************************
+ * grouping statements for complex data types
+ *******************************************/
+
+ identity ENTRY_KIND_TYPE {
+ description
+ "none";
+ }
+
+ identity ENTRY_KIND_TYPE_STATIC {
+ base ENTRY_KIND_TYPE;
+ description
+ "Static entries can be created, deleted, and retrieved. Name in ieee802-dot1q-bridge.yang: static.";
+ }
+
+ identity ENTRY_KIND_TYPE_DYNAMIC {
+ base ENTRY_KIND_TYPE;
+ description
+ "Dynamic/learnt entries can only be deleted or retrieved. Name in ieee802-dot1q-bridge.yang: dynamic.";
+ }
+
+ identity ENTRY_KIND_TYPE_NOT_YET_DEFINED {
+ base ENTRY_KIND_TYPE;
+ description
+ "none";
+ }
+
+ identity FC_STATUS_TYPE {
+ description
+ "none";
+ }
+
+ identity FC_STATUS_TYPE_OTHER {
+ base FC_STATUS_TYPE;
+ description
+ "None of the following. This may include the case where some other object is being used to determine if and how frames addressed to the value of the corresponding instance of 'address' are being forwarded. Name in ieee802-dot1q-bridge.yang: other.";
+ }
+
+ identity FC_STATUS_TYPE_INVALID {
+ base FC_STATUS_TYPE;
+ description
+ "This entry is no longer valid (e.g., it was learned but has since aged out), but has not yet been flushed from the table. Name in ieee802-dot1q-bridge.yang: invalid.";
+ }
+
+ identity FC_STATUS_TYPE_LEARNED {
+ base FC_STATUS_TYPE;
+ description
+ "The value of the corresponding instance of the port node was learned and is being used. Name in ieee802-dot1q-bridge.yang: learned.";
+ }
+
+ identity FC_STATUS_TYPE_SELF {
+ base FC_STATUS_TYPE;
+ description
+ "The value of the corresponding instance of the address node representing one of the devices address. Name in ieee802-dot1q-bridge.yang: self.";
+ }
+
+ identity FC_STATUS_TYPE_MANAGEMENT {
+ base FC_STATUS_TYPE;
+ description
+ "The value of the corresponding instance of address node that is also the value of an existing instance. Name in ieee802-dot1q-bridge.yang: mgmt.";
+ }
+
+ identity FC_STATUS_TYPE_NOT_YET_DEFINED {
+ base FC_STATUS_TYPE;
+ description
+ "none";
+ }
+
+ identity SEVERITY_TYPE {
+ description
+ "none";
+ }
+
+ identity SEVERITY_TYPE_NON_ALARMED {
+ base SEVERITY_TYPE;
+ description
+ "none";
+ }
+
+ identity SEVERITY_TYPE_WARNING {
+ base SEVERITY_TYPE;
+ description
+ "none";
+ }
+
+ identity SEVERITY_TYPE_MINOR {
+ base SEVERITY_TYPE;
+ description
+ "none";
+ }
+
+ identity SEVERITY_TYPE_MAJOR {
+ base SEVERITY_TYPE;
+ description
+ "none";
+ }
+
+ identity SEVERITY_TYPE_CRITICAL {
+ base SEVERITY_TYPE;
+ description
+ "none";
+ }
+
+ identity SEVERITY_TYPE_NOT_YET_DEFINED {
+ base SEVERITY_TYPE;
+ description
+ "none";
+ }
+
+ /****************************************
+ * package super-types
+ **************************************/
+
+ typedef severity-type {
+ type identityref {
+ base SEVERITY_TYPE;
+ }
+ description
+ "According to ITU-T M.3160";
+ }
+
+ grouping problem-kind-severity-type {
+ leaf problem-kind-name {
+ type string;
+ description
+ "Name of the alarm according to supportedAlarmList";
+ }
+ leaf problem-kind-severity {
+ type severity-type;
+ default "SEVERITY_TYPE_NOT_YET_DEFINED";
+ description
+ "Severity of this type of alarm.";
+ }
+ description
+ "none";
+ }
+
+ grouping mac-fc-current-problem-type {
+ leaf problem-name {
+ type string;
+ default "Problem name not specified.";
+ config false;
+ description
+ "Name of the alarm according to *Capability::supportedAlarmList.";
+ }
+ uses current-problem;
+ description
+ "none";
+ }
+}
diff --git a/sdnr/wt/devicemanager-onap/onf14/provider/src/main/yang/mac-fd-1-0.yang b/sdnr/wt/devicemanager-onap/onf14/provider/src/main/yang/mac-fd-1-0.yang new file mode 100644 index 000000000..9347f0354 --- /dev/null +++ b/sdnr/wt/devicemanager-onap/onf14/provider/src/main/yang/mac-fd-1-0.yang @@ -0,0 +1,585 @@ +module mac-fd-1-0 {
+ yang-version 1.1;
+ namespace "urn:onf:yang:mac-fd-1-0";
+ prefix mac-fd;
+
+ import ietf-yang-types {
+ prefix yang;
+ }
+ import core-model-1-4 {
+ prefix core-model;
+ }
+
+ organization
+ "openBackhaul.com proposal to Open Networking Foundation (ONF)";
+ contact
+ "WG Web : https://github.com/openBackhaul/Overview
+ WG List: MacFd@openBackhaul.com
+ Editor : Thorsten Heinze
+ Email : Thorsten.Heinze@openBackhaul.com";
+ description
+ "Technology specific amendment to the ForwardingDomain class for documenting potential forwarding (Ethernet Switch) according to IEEE 802.1 .
+
+ Copyright 2019 openBackhaul.com
+
+ Licensed under the Apache License, Version 2.0 (the 'License');
+ you may not use this file except in compliance with the License.
+ You may obtain a copy of the License at
+ http://www.apache.org/licenses/LICENSE-2.0
+ Unless required by applicable law or agreed to in writing, software
+ distributed under the License is distributed on an 'AS IS' BASIS,
+ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ See the License for the specific language governing permissions and
+ limitations under the License.";
+
+ revision 2020-08-26 {
+ description
+ "Model for the Transport SDN Pilot at Telefonica Germany.
+ Please view https://github.com/openBackhaul/macFd/issues for changes.";
+ reference
+ "https://github.com/openBackhaul/macFd/tree/tsp: Model definition
+ https://github.com/openBackhaul/onfCoreIm/tree/tsp: ONF TR-512 Core IM incl. Profile and enhanced Equipment definition";
+ }
+
+ identity LAYER_PROTOCOL_NAME_TYPE_MAC_LAYER {
+ base core-model:LAYER_PROTOCOL_NAME_TYPE;
+ description
+ "none";
+ }
+
+ augment "/core-model:control-construct/core-model:forwarding-domain" {
+ when "derived-from-or-self(./core-model:layer-protocol-name, 'vlan-fd:LAYER_PROTOCOL_NAME_TYPE_MAC_LAYER')";
+ uses mac-fd-spec;
+ description
+ "none";
+ }
+
+ /****************************************
+ * package notifications
+ **************************************/
+
+ notification object-creation-notification {
+ uses object-creation-notification;
+ description
+ "none";
+ }
+
+ grouping object-creation-notification {
+ leaf counter {
+ type int32;
+ default "-1";
+ config false;
+ description
+ "Counts object creation notifications.";
+ }
+ leaf timestamp {
+ type yang:date-and-time;
+ default "2010-11-20T14:00:00+01:00";
+ config false;
+ description
+ "none";
+ }
+ leaf object-id-ref {
+ type leafref {
+ path "/core-model:control-construct/core-model:forwarding-domain/core-model:uuid";
+ require-instance false;
+ }
+ config false;
+ description
+ "none";
+ }
+ leaf object-type {
+ type string;
+ default "Type of created object not specified.";
+ config false;
+ description
+ "none";
+ }
+ description
+ "none";
+ }
+
+ notification object-deletion-notification {
+ uses object-deletion-notification;
+ description
+ "none";
+ }
+
+ grouping object-deletion-notification {
+ leaf counter {
+ type int32;
+ default "-1";
+ config false;
+ description
+ "Counts object deletion notifications.";
+ }
+ leaf timestamp {
+ type yang:date-and-time;
+ default "2010-11-20T14:00:00+01:00";
+ config false;
+ description
+ "none";
+ }
+ leaf object-id-ref {
+ type leafref {
+ path "/core-model:control-construct/core-model:forwarding-domain/core-model:uuid";
+ require-instance false;
+ }
+ config false;
+ description
+ "none";
+ }
+ description
+ "none";
+ }
+
+ notification attribute-value-changed-notification {
+ uses attribute-value-changed-notification;
+ description
+ "none";
+ }
+
+ grouping attribute-value-changed-notification {
+ leaf counter {
+ type int32;
+ default "-1";
+ config false;
+ description
+ "Counts attribute value changed notifications.";
+ }
+ leaf timestamp {
+ type yang:date-and-time;
+ default "2010-11-20T14:00:00+01:00";
+ config false;
+ description
+ "none";
+ }
+ leaf object-id-ref {
+ type leafref {
+ path "/core-model:control-construct/core-model:forwarding-domain/core-model:uuid";
+ require-instance false;
+ }
+ config false;
+ description
+ "none";
+ }
+ leaf attribute-name {
+ type string;
+ default "Attribute name not specified.";
+ config false;
+ description
+ "Name of the attribute that has been changed.";
+ }
+ leaf new-value {
+ type string;
+ default "New value not specified.";
+ config false;
+ description
+ "Attribute value converted to a string (xml, json, ...)";
+ }
+ description
+ "To be sent when an attribute has changed and one or more controllers have to update their data.";
+ }
+
+ notification problem-notification {
+ uses problem-notification;
+ description
+ "none";
+ }
+
+ grouping problem-notification {
+ leaf counter {
+ type int32;
+ default "-1";
+ config false;
+ description
+ "Counts problem notifications";
+ }
+ leaf timestamp {
+ type yang:date-and-time;
+ default "2010-11-20T14:00:00+01:00";
+ config false;
+ description
+ "none";
+ }
+ leaf object-id-ref {
+ type leafref {
+ path "/core-model:control-construct/core-model:forwarding-domain/core-model:uuid";
+ require-instance false;
+ }
+ config false;
+ description
+ "none";
+ }
+ leaf problem {
+ type string;
+ default "Problem name not specified.";
+ config false;
+ description
+ "Name of the problem according to *Capability::supportedAlarmList";
+ }
+ leaf severity {
+ type severity-type;
+ default "SEVERITY_TYPE_WARNING";
+ config false;
+ description
+ "Severity of the problem according to *Configuration::problemSeverityList";
+ }
+ description
+ "none";
+ }
+
+ /****************************************
+ * grouping statements for object classes
+ **************************************/
+ /****************************************
+ * package super-classes
+ **************************************/
+
+ grouping current-problem {
+ leaf sequence-number {
+ type int16;
+ config false;
+ description
+ "Unique sequence number of the current problem object.";
+ }
+ leaf timestamp {
+ type yang:date-and-time;
+ default "2010-11-20T14:00:00+01:00";
+ config false;
+ description
+ "none";
+ }
+ leaf problem-severity {
+ type severity-type;
+ default "SEVERITY_TYPE_NOT_YET_DEFINED";
+ config false;
+ description
+ "Severity of the alarm.";
+ }
+ description
+ "none";
+ }
+
+ grouping mac-fd-spec {
+ container mac-fd-pac {
+ uses mac-fd-pac;
+ description
+ "none";
+ }
+ description
+ "The database that holds static and learned entries describing the MAC forwarding. Name in ieee802-dot1q-bridge.yang: filtering-database.";
+ }
+
+ grouping mac-fd-pac {
+ container mac-fd-capability {
+ config false;
+ uses mac-fd-capability;
+ description
+ "none";
+ }
+ container mac-fd-configuration {
+ uses mac-fd-configuration;
+ description
+ "none";
+ }
+ container mac-fd-status {
+ config false;
+ uses mac-fd-status;
+ description
+ "none";
+ }
+ container mac-fd-current-problems {
+ config false;
+ uses mac-fd-current-problems;
+ description
+ "none";
+ }
+ description
+ "none";
+ }
+
+ grouping mac-fd-capability {
+ leaf maximum-number-of-entries {
+ type int32;
+ default "-1";
+ config false;
+ description
+ "The maximum number of entries that can be held in the FDB. Name in ieee802-dot1q-bridge.yang: size.";
+ }
+ leaf admin-shut-down-is-avail {
+ type boolean;
+ default "false";
+ config false;
+ description
+ "true = Manual switching on and off of the forwarding domain without deleting it (underlying OSI network layers are also not affected) is available.";
+ }
+ leaf maintenance-timer-range {
+ type string;
+ default "Range of the maintenance timer not yet defined.";
+ config false;
+ description
+ "Available time periods for maintenance configurations to be described. Concrete values shall be separated by commas (e.g. '10, 60, 360'). Ranges shall be expressed as two values separated by a minus (e.g. '10-360').";
+ }
+ leaf-list supported-alarm-list {
+ type string;
+ default "Supported Alarms Not Yet Defined";
+ config false;
+ description
+ "Available alarms to be listed.";
+ }
+ description
+ "none";
+ }
+
+ grouping mac-fd-configuration {
+ leaf fd-name {
+ type string;
+ default "Forwarding Domain name not yet defined.";
+ description
+ "Name of the ForwardingDomain. Free text field to be filled by the operator.";
+ }
+ leaf fd-is-on {
+ type boolean;
+ default "false";
+ description
+ "Only effective if (adminShutDownIsAvail==true). true = Activation of the ForwardingDomain. false = De-activation of the ForwardingDomain without deleting it (underlying OSI network layers are not affected).";
+ }
+ leaf mac-address {
+ type string;
+ default "00:00:00:00:00:00";
+ description
+ "Configuration of the MAC address of a switch or virtual switch, which is defined by some VLAN.";
+ }
+ leaf aging-time {
+ type int32;
+ units "s";
+ default "-1";
+ description
+ "The timeout period (10..10,000,000) in seconds for aging out dynamically-learned forwarding information. Name in ieee802-dot1q-bridge.yang: aging-time.";
+ }
+ leaf maintenance-timer {
+ type int32;
+ units "s";
+ default "-1";
+ description
+ "Time of existence of any maintenance configuration. false = maintenance timer is switched off. Valid values are defined in *Capability::maintenanceTimerRange.";
+ }
+ list problem-kind-severity-list {
+ key "problem-kind-name";
+ uses problem-kind-severity-type;
+ description
+ "Severity of each entry of the SupportedAlarmList to be configured.";
+ }
+ description
+ "none";
+ }
+
+ grouping mac-fd-status {
+ leaf mac-address-cur {
+ type string;
+ default "00:00:00:00:00:00";
+ config false;
+ description
+ "MAC address assigned to a switch or virtual switch, which is defined by some VLAN.";
+ }
+ leaf number-of-static-entries-cur {
+ type int32;
+ default "-1";
+ config false;
+ description
+ "The number of Static Filtering entries currently in the FDB. Name in ieee802-dot1q-bridge.yang: static-entries.";
+ }
+ leaf number-of-dynamic-entries-cur {
+ type int32;
+ default "-1";
+ config false;
+ description
+ "The number of Dynamic Filtering entries currently in the FDB. Name in ieee802-dot1q-bridge.yang: dynamic-entries.";
+ }
+ leaf number-of-mac-registrations-cur {
+ type int32;
+ default "-1";
+ config false;
+ description
+ "The number of MAC Address Registration entries currently in the FDB. Name in ieee802-dot1q-bridge.yang: mac-address-registration-entries.";
+ }
+ leaf fd-status {
+ type fd-status-type;
+ default "FD_STATUS_TYPE_NOT_YET_DEFINED";
+ config false;
+ description
+ "Operational status of the forwarding domain.";
+ }
+ description
+ "none";
+ }
+
+ grouping mac-fd-current-problems {
+ list current-problem-list {
+ key "sequence-number";
+ config false;
+ uses mac-fd-current-problem-type;
+ description
+ "none";
+ }
+ description
+ "none";
+ }
+
+ /****************************************
+ * typedef statements
+ **************************************/
+ /*********************************************
+ * grouping statements for complex data types
+ *******************************************/
+
+ identity SEVERITY_TYPE {
+ description
+ "none";
+ }
+
+ identity SEVERITY_TYPE_NON_ALARMED {
+ base SEVERITY_TYPE;
+ description
+ "none";
+ }
+
+ identity SEVERITY_TYPE_WARNING {
+ base SEVERITY_TYPE;
+ description
+ "none";
+ }
+
+ identity SEVERITY_TYPE_MINOR {
+ base SEVERITY_TYPE;
+ description
+ "none";
+ }
+
+ identity SEVERITY_TYPE_MAJOR {
+ base SEVERITY_TYPE;
+ description
+ "none";
+ }
+
+ identity SEVERITY_TYPE_CRITICAL {
+ base SEVERITY_TYPE;
+ description
+ "none";
+ }
+
+ identity SEVERITY_TYPE_NOT_YET_DEFINED {
+ base SEVERITY_TYPE;
+ description
+ "none";
+ }
+
+ identity FD_STATUS_TYPE {
+ description
+ "none";
+ }
+
+ identity FD_STATUS_TYPE_UP {
+ base FD_STATUS_TYPE;
+ description
+ "Ready to pass packets.";
+ }
+
+ identity FD_STATUS_TYPE_DOWN {
+ base FD_STATUS_TYPE;
+ description
+ "The interface does not pass any packets.";
+ }
+
+ identity FD_STATUS_TYPE_TESTING {
+ base FD_STATUS_TYPE;
+ description
+ "In some test mode. No operational packets can be passed.";
+ }
+
+ identity FD_STATUS_TYPE_UNKNOWN {
+ base FD_STATUS_TYPE;
+ description
+ "Status cannot be determined for some reason.";
+ }
+
+ identity FD_STATUS_TYPE_DORMANT {
+ base FD_STATUS_TYPE;
+ description
+ "Waiting for some external event.";
+ }
+
+ identity FD_STATUS_TYPE_NOT_PRESENT {
+ base FD_STATUS_TYPE;
+ description
+ "Some component (typically hardware) is missing.";
+ }
+
+ identity FD_STATUS_TYPE_LOWER_LAYER_DOWN {
+ base FD_STATUS_TYPE;
+ description
+ "Down due to state of lower-layer interface(s).";
+ }
+
+ identity FD_STATUS_TYPE_ADMIN_DOWN {
+ base FD_STATUS_TYPE;
+ description
+ "Down due to configuration.";
+ }
+
+ identity FD_STATUS_TYPE_NOT_YET_DEFINED {
+ base FD_STATUS_TYPE;
+ description
+ "none";
+ }
+
+ /****************************************
+ * package super-types
+ **************************************/
+
+ typedef severity-type {
+ type identityref {
+ base SEVERITY_TYPE;
+ }
+ description
+ "none";
+ }
+
+ typedef fd-status-type {
+ type identityref {
+ base FD_STATUS_TYPE;
+ }
+ description
+ "Current Status of the Forwarding Domain";
+ }
+
+ grouping problem-kind-severity-type {
+ leaf problem-kind-name {
+ type string;
+ description
+ "Name of the alarm according to SupportedAlarmList";
+ }
+ leaf problem-kind-severity {
+ type severity-type;
+ default "SEVERITY_TYPE_NOT_YET_DEFINED";
+ description
+ "Severity of this type of alarm.";
+ }
+ description
+ "none";
+ }
+
+ grouping mac-fd-current-problem-type {
+ leaf problem-name {
+ type string;
+ default "Problem name not specified.";
+ config false;
+ description
+ "Name of the alarm according to SupportedAlarmList";
+ }
+ uses current-problem;
+ description
+ "none";
+ }
+}
diff --git a/sdnr/wt/devicemanager-onap/onf14/provider/src/main/yang/mac-interface-1-0.yang b/sdnr/wt/devicemanager-onap/onf14/provider/src/main/yang/mac-interface-1-0.yang new file mode 100644 index 000000000..be46b24f4 --- /dev/null +++ b/sdnr/wt/devicemanager-onap/onf14/provider/src/main/yang/mac-interface-1-0.yang @@ -0,0 +1,1479 @@ +module mac-interface-1-0 {
+ yang-version 1.1;
+ namespace "urn:onf:yang:mac-interface-1-0";
+ prefix mac-interface;
+
+ import ietf-yang-types {
+ prefix yang;
+ }
+ import core-model-1-4 {
+ prefix core-model;
+ }
+
+ organization
+ "openBackhaul.com proposal to Open Networking Foundation (ONF)";
+ contact
+ "WG Web : https://github.com/openBackhaul/Overview
+ WG List: MacInterface@openBackhaul.com
+ Editor : Thorsten Heinze
+ Email : Thorsten.Heinze@openBackhaul.com";
+ description
+ "Technology specific interface definition for Ethernet MAC interfaces according to IEEE 802.1
+
+ Copyright 2019 openBackhaul.com
+
+ Licensed under the Apache License, Version 2.0 (the 'License');
+ you may not use this file except in compliance with the License.
+ You may obtain a copy of the License at
+ http://www.apache.org/licenses/LICENSE-2.0
+ Unless required by applicable law or agreed to in writing, software
+ distributed under the License is distributed on an 'AS IS' BASIS,
+ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ See the License for the specific language governing permissions and
+ limitations under the License.";
+
+ revision 2020-01-23 {
+ description
+ "Model for the Transport SDN Pilot at Telefonica Germany.
+ Please view https://github.com/openBackhaul/macInterface/issues for changes.";
+ reference
+ "https://github.com/openBackhaul/macInterface/tree/tsp: Model definition
+ https://github.com/openBackhaul/onfCoreIm/tree/tsp: ONF TR-512 Core IM incl. Profile and enhanced Equipment definition";
+ }
+ revision 2019-07-11 {
+ description
+ "Model for the Transport SDN Pilot at Telefonica Germany.
+ Please view https://github.com/openBackhaul/macInterface/issues for changes.";
+ reference
+ "https://github.com/openBackhaul/macInterface/tree/tsp: Model definition
+ https://github.com/openBackhaul/onfCoreIm/tree/tsp: ONF TR-512 Core IM incl. Profile and enhanced Equipment definition";
+ }
+
+ identity LAYER_PROTOCOL_NAME_TYPE_MAC_LAYER {
+ base core-model:LAYER_PROTOCOL_NAME_TYPE;
+ description
+ "none";
+ }
+
+ augment "/core-model:control-construct/core-model:logical-termination-point/core-model:layer-protocol" {
+ when "derived-from-or-self(./core-model:layer-protocol-name, 'mac-interface:LAYER_PROTOCOL_NAME_TYPE_MAC_LAYER')";
+ uses mac-interface-lp-spec;
+ description
+ "none";
+ }
+
+ /****************************************
+ * package notifications
+ **************************************/
+
+ notification object-creation-notification {
+ uses object-creation-notification;
+ description
+ "none";
+ }
+
+ grouping object-creation-notification {
+ leaf counter {
+ type int64;
+ default "-1";
+ config false;
+ description
+ "Counts object creation notifications.";
+ }
+ leaf timestamp {
+ type yang:date-and-time;
+ default "2010-11-20T14:00:00+01:00";
+ config false;
+ description
+ "none";
+ }
+ leaf object-id-ref {
+ type leafref {
+ path "/core-model:control-construct/core-model:logical-termination-point/core-model:uuid";
+ require-instance false;
+ }
+ config false;
+ description
+ "none";
+ }
+ leaf object-type {
+ type string;
+ default "Type of created object not specified.";
+ config false;
+ description
+ "none";
+ }
+ description
+ "none";
+ }
+
+ notification object-deletion-notification {
+ uses object-deletion-notification;
+ description
+ "none";
+ }
+
+ grouping object-deletion-notification {
+ leaf counter {
+ type int64;
+ default "-1";
+ config false;
+ description
+ "Counts object deletion notifications.";
+ }
+ leaf timestamp {
+ type yang:date-and-time;
+ default "2010-11-20T14:00:00+01:00";
+ config false;
+ description
+ "none";
+ }
+ leaf object-id-ref {
+ type leafref {
+ path "/core-model:control-construct/core-model:logical-termination-point/core-model:uuid";
+ require-instance false;
+ }
+ config false;
+ description
+ "none";
+ }
+ description
+ "none";
+ }
+
+ notification attribute-value-changed-notification {
+ uses attribute-value-changed-notification;
+ description
+ "none";
+ }
+
+ grouping attribute-value-changed-notification {
+ leaf counter {
+ type int64;
+ default "-1";
+ config false;
+ description
+ "Counts attribute value changed notifications.";
+ }
+ leaf timestamp {
+ type yang:date-and-time;
+ default "2010-11-20T14:00:00+01:00";
+ config false;
+ description
+ "none";
+ }
+ leaf object-id-ref {
+ type leafref {
+ path "/core-model:control-construct/core-model:logical-termination-point/core-model:uuid";
+ require-instance false;
+ }
+ config false;
+ description
+ "none";
+ }
+ leaf attribute-name {
+ type string;
+ default "Attribute name not specified.";
+ config false;
+ description
+ "Name of the attribute that has been changed.";
+ }
+ leaf new-value {
+ type string;
+ default "New value not specified.";
+ config false;
+ description
+ "Attribute value converted to a string (xml, json, ...)";
+ }
+ description
+ "none";
+ }
+
+ notification problem-notification {
+ uses problem-notification;
+ description
+ "none";
+ }
+
+ grouping problem-notification {
+ leaf counter {
+ type int64;
+ default "-1";
+ config false;
+ description
+ "Counts problem notifications";
+ }
+ leaf timestamp {
+ type yang:date-and-time;
+ default "2010-11-20T14:00:00+01:00";
+ config false;
+ description
+ "none";
+ }
+ leaf object-id-ref {
+ type leafref {
+ path "/core-model:control-construct/core-model:logical-termination-point/core-model:uuid";
+ require-instance false;
+ }
+ config false;
+ description
+ "none";
+ }
+ leaf problem {
+ type string;
+ default "Problem name not specified.";
+ config false;
+ description
+ "Name of the problem according to supportedAlarmList";
+ }
+ leaf severity {
+ type severity-type;
+ default "SEVERITY_TYPE_WARNING";
+ config false;
+ description
+ "Severity of the problem according to problemKindSeverity";
+ }
+ description
+ "none";
+ }
+
+ /****************************************
+ * grouping statements for object classes
+ **************************************/
+ /****************************************
+ * package super-classes
+ **************************************/
+
+ grouping current-problem {
+ leaf sequence-number {
+ type int16;
+ config false;
+ description
+ "Unique sequence number of the current problem object.";
+ }
+ leaf timestamp {
+ type yang:date-and-time;
+ default "2010-11-20T14:00:00+01:00";
+ config false;
+ description
+ "Time when the alarm was raised.";
+ }
+ leaf problem-severity {
+ type severity-type;
+ default "SEVERITY_TYPE_NOT_YET_DEFINED";
+ config false;
+ description
+ "Severity of the alarm.";
+ }
+ description
+ "none";
+ }
+
+ grouping current-performance {
+ leaf timestamp {
+ type yang:date-and-time;
+ default "2010-11-20T14:00:00+01:00";
+ config false;
+ description
+ "The timestamp associated with when the current data was collected.";
+ }
+ leaf suspect-interval-flag {
+ type boolean;
+ default "false";
+ config false;
+ description
+ "This attribute is used to indicate that the performance data for the current period may not be reliable. Some reasons for this to occur are:
+ – Suspect data were detected by the actual resource doing data collection.
+ – Transition of the administrativeState attribute to/from the 'lock' state.
+ – Transition of the operationalState to/from the 'disabled' state.
+ – Scheduler setting that inhibits the collection function.
+ – The performance counters were reset during the interval.
+ – The currentData (or subclass) object instance was created during the monitoring period.";
+ }
+ leaf elapsed-time {
+ type int64;
+ units "s";
+ default "-1";
+ config false;
+ description
+ "Number of seconds that elapsed since the last reset of the counter.";
+ }
+ leaf scanner-id {
+ type string;
+ default "Scanner ID not defined.";
+ config false;
+ description
+ "none";
+ }
+ leaf granularity-period {
+ type granularity-period-type;
+ config false;
+ description
+ "Time period between reset of the underlying counter.";
+ }
+ description
+ "none";
+ }
+
+ grouping historical-performance {
+ leaf suspect-interval-flag {
+ type boolean;
+ default "false";
+ config false;
+ description
+ "This attribute indicates that the data collected during the interval is suspect.";
+ }
+ leaf history-data-id {
+ type string;
+ default "History Data ID not defined.";
+ config false;
+ description
+ "none";
+ }
+ leaf granularity-period {
+ type granularity-period-type;
+ config false;
+ description
+ "Time period between reset of the underlying counter.";
+ }
+ leaf period-end-time {
+ type yang:date-and-time;
+ config false;
+ description
+ "Time when the counter values have been recorded and the counter reset.";
+ }
+ description
+ "none";
+ }
+
+ grouping mac-interface-lp-spec {
+ container mac-interface-pac {
+ uses mac-interface-pac;
+ description
+ "none";
+ }
+ description
+ "none";
+ }
+
+ grouping mac-interface-pac {
+ container mac-interface-capability {
+ config false;
+ uses mac-interface-capability;
+ description
+ "none";
+ }
+ container mac-interface-configuration {
+ uses mac-interface-configuration;
+ description
+ "none";
+ }
+ container mac-interface-status {
+ config false;
+ uses mac-interface-status;
+ description
+ "none";
+ }
+ container mac-interface-current-problems {
+ config false;
+ uses mac-interface-current-problems;
+ description
+ "none";
+ }
+ container mac-interface-current-performance {
+ config false;
+ uses mac-interface-current-performance;
+ description
+ "none";
+ }
+ container mac-interface-historical-peformances {
+ config false;
+ uses mac-interface-historical-peformances;
+ description
+ "none";
+ }
+ description
+ "none";
+ }
+
+ grouping mac-interface-capability {
+ leaf hardware-mac-address {
+ type string;
+ default "00:00:00:00:00:00";
+ config false;
+ description
+ "Hardware MAC address of the interface.";
+ }
+ leaf mac-address-configuration-is-avail {
+ type boolean;
+ default "false";
+ config false;
+ description
+ "1 = Device supports overwriting the hardware MAC address.";
+ }
+ leaf maximum-frame-size-min {
+ type int16;
+ units "s";
+ default "-1";
+ config false;
+ description
+ "Minimum configurable value of the maximum Ethernet frame size in Byte.";
+ }
+ leaf maximum-frame-size-max {
+ type int16;
+ units "s";
+ default "-1";
+ config false;
+ description
+ "Maximum configurable value of the maximum Ethernet frame size in Byte.";
+ }
+ leaf-list supported-frame-format-list {
+ type frame-format-type;
+ config false;
+ min-elements 1;
+ description
+ "List of supported Ethernet frame formats";
+ }
+ leaf-list supported-flow-control-mode-list {
+ type flow-control-mode-type;
+ config false;
+ min-elements 1;
+ max-elements 5;
+ description
+ "List of potential configurations of the Flow Control.";
+ }
+ leaf link-loss-forwarding-is-avail {
+ type boolean;
+ default "false";
+ config false;
+ description
+ "1 = Sending a Link Loss message in case of link failure is supported by the device.";
+ }
+ leaf broadcast-frame-suppression-is-avail {
+ type boolean;
+ default "false";
+ config false;
+ description
+ "1 = Interface is supporting limiting the maximum share of broadcast frames.";
+ }
+ leaf loop-port-shut-down-is-avail {
+ type boolean;
+ default "false";
+ config false;
+ description
+ "1 = Device is supporting automated shut down of ports, which are affected by an Ethernet loop.";
+ }
+ leaf loop-detection-is-avail {
+ type boolean;
+ default "false";
+ config false;
+ description
+ "1 = Device is supporting a feature for detecting Ethernet loops on this interface.";
+ }
+ leaf admin-shut-down-is-avail {
+ type boolean;
+ default "false";
+ config false;
+ description
+ "1 = Manual switching on and off of the interface without deleting it (underlying OSI network layers are also not affected) is available.";
+ }
+ leaf-list supported-loop-back-kind-list {
+ type loop-back-type;
+ config false;
+ min-elements 1;
+ max-elements 3;
+ description
+ "List of supported kinds of looping back.";
+ }
+ leaf maintenance-timer-range {
+ type string;
+ default "Range of the maintenance timer not yet defined.";
+ config false;
+ description
+ "Available time periods for maintenance configurations to be described. Concrete values shall be separated by commas (e.g. '10, 60, 360'). Ranges shall be expressed as two values separated by a minus (e.g. '10-360').";
+ }
+ leaf statistics-is-avail {
+ type boolean;
+ default "false";
+ config false;
+ description
+ "1 = Continuous statistics counters are available.";
+ }
+ leaf-list supported-alarm-list {
+ type string;
+ config false;
+ min-elements 2;
+ description
+ "Available alarms to be listed. Mandatory: 'MacInterfaceDown' and 'FrameSizeMissmatch'. Further alarms might be added by the device vendors.";
+ }
+ leaf performance-monitoring-is-avail {
+ type boolean;
+ default "false";
+ config false;
+ description
+ "1 = Collection and aggregation of performance values is available.";
+ }
+ description
+ "none";
+ }
+
+ grouping mac-interface-configuration {
+ leaf interface-name {
+ type string;
+ default "Interface name not yet defined.";
+ description
+ "Description of the interface, could be a name, could be a number. Free text field to be filled by the operator.";
+ }
+ leaf interface-is-on {
+ type boolean;
+ default "false";
+ description
+ "Only relevant if (adminShutDownIsAvail==1). 1 = Activation of the interface. 0 = De-activation of the interface without deleting it (underlying OSI network layers are not affected).";
+ }
+ leaf mac-address-configuration-is-on {
+ type boolean;
+ default "false";
+ description
+ "Only relevant if (macAddressConfigurationIsAvail==1). 1 = Activates overwriting the hardware MAC address by MacInterfaceConfiguration::configuredMacAddress.";
+ }
+ leaf configured-mac-address {
+ type string;
+ default "00:00:00:00:00:00";
+ description
+ "Only relevant if (macAddressConfigurationIsAvail==1 AND macAddressConfigurationIsOn==1). Overwriting the hardware MAC address with the configured value.";
+ }
+ leaf maximum-frame-size {
+ type int16;
+ units "Byte";
+ default "-1";
+ description
+ "This value describes the maximum size of the Ethernet frame (in Byte) before sending.";
+ }
+ leaf fragmentation-allowed {
+ type fragmentation-type;
+ default "FRAGMENTATION_TYPE_NOT_YET_DEFINED";
+ description
+ "none";
+ }
+ leaf transmitted-frame-format {
+ type frame-format-type;
+ default "FRAME_FORMAT_TYPE_NOT_YET_DEFINED";
+ description
+ "Configuration of the format of the transmitted Ethernet frames.";
+ }
+ leaf flow-control-mode {
+ type flow-control-mode-type;
+ default "FLOW_CONTROL_MODE_TYPE_NOT_YET_DEFINED";
+ description
+ "Configures the mode of operation of Flow Control according to IEEE 802.3x on this interface.";
+ }
+ leaf link-loss-forwarding-is-on {
+ type boolean;
+ default "false";
+ description
+ "1 = Sending a Link Loss message in case of link failure is activated.";
+ }
+ leaf link-loss-forwarding-delay {
+ type int8;
+ units "100ms";
+ default "-1";
+ description
+ "Delay (in 100ms steps) between a detected link failure and sending of a Link Loss message. In case of 1+1 hot stand by protection of a microwave, make sure configured value is higher than 5 (500ms).";
+ }
+ leaf broadcast-frame-suppression-is-on {
+ type boolean;
+ default "false";
+ description
+ "1 = Limiting the share of broadcast frames is activated.";
+ }
+ leaf maximum-share-of-broadcast-frames {
+ type int8;
+ units "%";
+ default "-1";
+ description
+ "Threshold for Broadcast frames becoming discarded in %. Value range from 0 to 100.";
+ }
+ leaf loop-port-shut-down-is-on {
+ type boolean;
+ default "false";
+ description
+ "1 = Feature for automated shut down in case of an Ethernet loop is activated on this interface.";
+ }
+ leaf loop-detection-is-on {
+ type boolean;
+ default "false";
+ description
+ "Maintenance Feature. 1 = Checking for Ethernet loops on this interface is currently switched on.";
+ }
+ leaf loop-back-kind-on {
+ type loop-back-type;
+ default "LOOP_BACK_TYPE_NOT_YET_DEFINED";
+ description
+ "Maintenance Feature. Configuration of a loop back of Ethernet frames on this interface.";
+ }
+ leaf maintenance-timer {
+ type int32;
+ units "s";
+ default "-1";
+ description
+ "Time of existence of any maintenance configuration. 0 = maintenance timer is switched off. Valid values are defined in *Capability::maintenanceTimerRange.";
+ }
+ leaf statistics-is-on {
+ type boolean;
+ default "false";
+ description
+ "Only relevant if (statisticsIsAvail==1). 1 = Continuous statistics counters are switched on.";
+ }
+ list problem-kind-severity-list {
+ key "problem-kind-name";
+ min-elements 2;
+ uses problem-kind-severity-type;
+ description
+ "Severity of each entry of the SupportedAlarmList to be configured.";
+ }
+ leaf performance-monitoring-is-on {
+ type boolean;
+ default "false";
+ description
+ "Only relevant if (performanceMonitoringIsAvail==1). 1 = Collection and aggregation of performance values is switched on.";
+ }
+ description
+ "none";
+ }
+
+ grouping mac-interface-status {
+ leaf interface-status {
+ type interface-status-type;
+ default "INTERFACE_STATUS_TYPE_NOT_YET_DEFINED";
+ config false;
+ description
+ "Operational status of the interface.";
+ }
+ leaf mac-address-cur {
+ type string;
+ default "00:00:00:00:00:00";
+ config false;
+ description
+ "If (macAddressConfigurationIsAvail==0), maxAddressCur = MacInterfaceCapability::hardwareMacAddress. If (macAddressConfigurationIsAvail==1 AND macAddressConfigurationIsOn==1), maxAddressCur = MacInterfaceConfiguration::configuredMacAddress.";
+ }
+ leaf received-ethernet-frame-format-cur {
+ type frame-format-type;
+ default "FRAME_FORMAT_TYPE_NOT_YET_DEFINED";
+ config false;
+ description
+ "Ethernet frame format of the currently received frames.";
+ }
+ leaf flow-control-mode-cur {
+ type flow-control-mode-type;
+ default "FLOW_CONTROL_MODE_TYPE_NOT_YET_DEFINED";
+ config false;
+ description
+ "Currently operative mode (none, send, receive, both) of operation of the Flow Control according to IEEE 802.3x on this interface.";
+ }
+ leaf loop-detection-result {
+ type loop-detection-result-type;
+ default "LOOP_DETECTION_RESULT_TYPE_NOT_YET_DEFINED";
+ config false;
+ description
+ "Result of the Ethernet loop detection feature.";
+ }
+ leaf loop-back-kind-up {
+ type loop-back-type;
+ default "LOOP_BACK_TYPE_NOT_YET_DEFINED";
+ config false;
+ description
+ "The currently active (not just configured) type of loop back.";
+ }
+ leaf statistics-is-up {
+ type boolean;
+ default "false";
+ config false;
+ description
+ "1 = Statistics are currently collected and aggregated.";
+ }
+ leaf performance-monitoring-is-up {
+ type boolean;
+ default "false";
+ config false;
+ description
+ "1 = Performance values are currently collected and aggregated.";
+ }
+ leaf timestamp {
+ type yang:date-and-time;
+ default "2010-11-20T14:00:00+01:00";
+ config false;
+ description
+ "The timestamp associated with when the statistic values were read/retrieved.";
+ }
+ leaf last-10-sec-frame-input-rate {
+ type int32;
+ units "frame/s";
+ default "-1";
+ config false;
+ description
+ "Frame receive rate at this MAC interface over the last 10 second interval.";
+ }
+ leaf last-10-sec-frame-output-rate {
+ type int32;
+ units "frame/s";
+ default "-1";
+ config false;
+ description
+ "Frame transmit rate at this MAC interface over the last 10 second interval.";
+ }
+ leaf total-frames-input {
+ type int64;
+ units "frame";
+ default "-1";
+ config false;
+ description
+ "The total number of Ethernet frames received at this MAC interface, including those received in error";
+ }
+ leaf total-frames-output {
+ type int64;
+ units "frame";
+ default "-1";
+ config false;
+ description
+ "The total number of Ethernet frames sent from this MAC interface.";
+ }
+ leaf forwarded-frames-input {
+ type int64;
+ units "frame";
+ default "-1";
+ config false;
+ description
+ "Number of input frames, for which the device was not their final destination and for which the device attempted to find a route to forward them to that final destination.";
+ }
+ leaf forwarded-frames-output {
+ type int64;
+ units "frame";
+ default "-1";
+ config false;
+ description
+ "Number of frames, for which the device was not their final destination and for which it was successful in finding a path to their final destination. ";
+ }
+ leaf unicast-frames-input {
+ type int64;
+ units "frame";
+ default "-1";
+ config false;
+ description
+ "Total number of received unicast frames.";
+ }
+ leaf unicast-frames-output {
+ type int64;
+ units "frame";
+ default "-1";
+ config false;
+ description
+ "Total number of sent unicast frames.";
+ }
+ leaf multicast-frames-input {
+ type int32;
+ units "frame";
+ default "-1";
+ config false;
+ description
+ "Total number of received multicast frames.";
+ }
+ leaf multicast-frames-output {
+ type int32;
+ units "frame";
+ default "-1";
+ config false;
+ description
+ "Total number of sent multicast frames.";
+ }
+ leaf broadcast-frames-input {
+ type int32;
+ units "frame";
+ default "-1";
+ config false;
+ description
+ "Total number of received broadcast frames.";
+ }
+ leaf broadcast-frames-output {
+ type int32;
+ units "frame";
+ default "-1";
+ config false;
+ description
+ "Total number of sent broadcast frames.";
+ }
+ leaf fragmented-frames-input {
+ type int32;
+ units "frame";
+ default "-1";
+ config false;
+ description
+ "Total number of received fragmented frames.";
+ }
+ leaf errored-frames-input {
+ type int32;
+ units "frame";
+ default "-1";
+ config false;
+ description
+ "Total number of received errored frames.";
+ }
+ leaf errored-frames-output {
+ type int32;
+ units "frame";
+ default "-1";
+ config false;
+ description
+ "Number of Ethernet frames, which were locally generated and discarded due to errors, including no route found to the destination.";
+ }
+ leaf dropped-frames-input {
+ type int32;
+ units "frame";
+ default "-1";
+ config false;
+ description
+ "Total number of Ethernet frames dropped at the receiver. The number of input Ethernet frames, for which no problems were encountered to prevent their continued processing, but were discarded (e.g., for lack of buffer space).";
+ }
+ leaf dropped-frames-output {
+ type int32;
+ units "frame";
+ default "-1";
+ config false;
+ description
+ "The number of output Ethernet frames, for which no problem was encountered to prevent their transmission to their destination, but were discarded (e.g., for lack of buffer space).";
+ }
+ description
+ "none";
+ }
+
+ grouping mac-interface-current-problems {
+ list current-problem-list {
+ key "sequence-number";
+ config false;
+ uses mac-interface-current-problem-type;
+ description
+ "none";
+ }
+ leaf number-of-current-problems {
+ type int8;
+ default "-1";
+ config false;
+ description
+ "Number of alarms, which are currently active on this interface.";
+ }
+ leaf time-of-latest-change {
+ type yang:date-and-time;
+ default "2010-11-20T14:00:00+01:00";
+ config false;
+ description
+ "Date and time when the list of alarms has been changed for the last time.";
+ }
+ description
+ "none";
+ }
+
+ grouping mac-interface-current-performance {
+ list current-performance-data-list {
+ key "granularity-period";
+ config false;
+ min-elements 1;
+ max-elements 2;
+ uses mac-interface-current-performance-type;
+ description
+ "none";
+ }
+ leaf number-of-current-performance-sets {
+ type int8;
+ default "-1";
+ config false;
+ description
+ "Number of sets of current performance values, which are provided in the list.";
+ }
+ description
+ "none";
+ }
+
+ grouping mac-interface-historical-peformances {
+ list historical-performace-data-list {
+ key "granularity-period period-end-time";
+ config false;
+ uses mac-interface-historical-performance-type;
+ description
+ "none";
+ }
+ leaf number-of-historical-performance-sets {
+ type int16;
+ default "-1";
+ config false;
+ description
+ "Number of sets of historical performance values, which are provided in the list.";
+ }
+ leaf time-of-latest-change {
+ type yang:date-and-time;
+ default "2010-11-20T14:00:00+01:00";
+ config false;
+ description
+ "Date and time when the list of sets of historical performance values has been changed for the last time (e.g. new one added or existing one deleted).";
+ }
+ description
+ "none";
+ }
+
+ /****************************************
+ * typedef statements
+ **************************************/
+
+ typedef loop-back-type {
+ type identityref {
+ base LOOP_BACK_TYPE;
+ }
+ description
+ "none";
+ }
+
+ typedef fragmentation-type {
+ type identityref {
+ base FRAGMENTATION_TYPE;
+ }
+ description
+ "none";
+ }
+
+ typedef frame-format-type {
+ type identityref {
+ base FRAME_FORMAT_TYPE;
+ }
+ description
+ "none";
+ }
+
+ typedef flow-control-mode-type {
+ type identityref {
+ base FLOW_CONTROL_MODE_TYPE;
+ }
+ description
+ "none";
+ }
+
+ typedef loop-detection-result-type {
+ type identityref {
+ base LOOP_DETECTION_RESULT_TYPE;
+ }
+ description
+ "none";
+ }
+
+ /*********************************************
+ * grouping statements for complex data types
+ *******************************************/
+
+ identity LOOP_BACK_TYPE {
+ description
+ "none";
+ }
+
+ identity LOOP_BACK_TYPE_NONE {
+ base LOOP_BACK_TYPE;
+ description
+ "none";
+ }
+
+ identity LOOP_BACK_TYPE_BACK_TO_LOCAL {
+ base LOOP_BACK_TYPE;
+ description
+ "Returning Ethernet frames of the local site on the Ethernet MAC interface back to the local site.";
+ }
+
+ identity LOOP_BACK_TYPE_BACK_TO_REMOTE {
+ base LOOP_BACK_TYPE;
+ description
+ "Returning Ethernet frames of the remote site on the Ethernet MAC interface back to the remote site.";
+ }
+
+ identity LOOP_BACK_TYPE_NOT_YET_DEFINED {
+ base LOOP_BACK_TYPE;
+ description
+ "none";
+ }
+
+ identity FRAGMENTATION_TYPE {
+ description
+ "none";
+ }
+
+ identity FRAGMENTATION_TYPE_DISABLE {
+ base FRAGMENTATION_TYPE;
+ description
+ "none";
+ }
+
+ identity FRAGMENTATION_TYPE_ENABLE_256_BYTE {
+ base FRAGMENTATION_TYPE;
+ description
+ "none";
+ }
+
+ identity FRAGMENTATION_TYPE_ENABLE_512_BYTE {
+ base FRAGMENTATION_TYPE;
+ description
+ "none";
+ }
+
+ identity FRAGMENTATION_TYPE_NOT_YET_DEFINED {
+ base FRAGMENTATION_TYPE;
+ description
+ "none";
+ }
+
+ identity FRAME_FORMAT_TYPE {
+ description
+ "none";
+ }
+
+ identity FRAME_FORMAT_TYPE_ETHERNET_2 {
+ base FRAME_FORMAT_TYPE;
+ description
+ "none";
+ }
+
+ identity FRAME_FORMAT_TYPE_802.2_SNAP {
+ base FRAME_FORMAT_TYPE;
+ description
+ "none";
+ }
+
+ identity FRAME_FORMAT_TYPE_802.2_LLC {
+ base FRAME_FORMAT_TYPE;
+ description
+ "none";
+ }
+
+ identity FRAME_FORMAT_TYPE_802.3 {
+ base FRAME_FORMAT_TYPE;
+ description
+ "none";
+ }
+
+ identity FRAME_FORMAT_TYPE_NOT_YET_DEFINED {
+ base FRAME_FORMAT_TYPE;
+ description
+ "none";
+ }
+
+ identity FLOW_CONTROL_MODE_TYPE {
+ description
+ "none";
+ }
+
+ identity FLOW_CONTROL_MODE_TYPE_NONE {
+ base FLOW_CONTROL_MODE_TYPE;
+ description
+ "Flow Control is switched off.";
+ }
+
+ identity FLOW_CONTROL_MODE_TYPE_SEND_ONLY {
+ base FLOW_CONTROL_MODE_TYPE;
+ description
+ "Only sending of pause frames according to IEEE 802.3x (Ethernet Flow Control).";
+ }
+
+ identity FLOW_CONTROL_MODE_TYPE_RECEIVE_ONLY {
+ base FLOW_CONTROL_MODE_TYPE;
+ description
+ "Only listening for incoming pause frames according to IEEE 802.3x (Ethernet Flow Control).";
+ }
+
+ identity FLOW_CONTROL_MODE_TYPE_SEND_AND_RECEIVE {
+ base FLOW_CONTROL_MODE_TYPE;
+ description
+ "Sending and listening for pause frames according to IEEE 802.3x (Ethernet Flow Control).";
+ }
+
+ identity FLOW_CONTROL_MODE_TYPE_AUTO_NEGOTIATION {
+ base FLOW_CONTROL_MODE_TYPE;
+ description
+ "none";
+ }
+
+ identity FLOW_CONTROL_MODE_TYPE_NOT_YET_DEFINED {
+ base FLOW_CONTROL_MODE_TYPE;
+ description
+ "none";
+ }
+
+ identity LOOP_DETECTION_RESULT_TYPE {
+ description
+ "none";
+ }
+
+ identity LOOP_DETECTION_RESULT_TYPE_LOOP_DETECTED {
+ base LOOP_DETECTION_RESULT_TYPE;
+ description
+ "none";
+ }
+
+ identity LOOP_DETECTION_RESULT_TYPE_NO_LOOP_DETECTED {
+ base LOOP_DETECTION_RESULT_TYPE;
+ description
+ "none";
+ }
+
+ identity LOOP_DETECTION_RESULT_TYPE_DETECTION_SWITCHED_OFF {
+ base LOOP_DETECTION_RESULT_TYPE;
+ description
+ "none";
+ }
+
+ identity LOOP_DETECTION_RESULT_TYPE_NOT_YET_DEFINED {
+ base LOOP_DETECTION_RESULT_TYPE;
+ description
+ "none";
+ }
+
+ identity GRANULARITY_PERIOD_TYPE {
+ description
+ "none";
+ }
+
+ identity GRANULARITY_PERIOD_TYPE_UNKNOWN {
+ base GRANULARITY_PERIOD_TYPE;
+ description
+ "none";
+ }
+
+ identity GRANULARITY_PERIOD_TYPE_PERIOD-15-MIN {
+ base GRANULARITY_PERIOD_TYPE;
+ description
+ "none";
+ }
+
+ identity GRANULARITY_PERIOD_TYPE_PERIOD-24-HOURS {
+ base GRANULARITY_PERIOD_TYPE;
+ description
+ "none";
+ }
+
+ identity GRANULARITY_PERIOD_TYPE_NOT_YET_DEFINED {
+ base GRANULARITY_PERIOD_TYPE;
+ description
+ "none";
+ }
+
+ identity SEVERITY_TYPE {
+ description
+ "none";
+ }
+
+ identity SEVERITY_TYPE_NON-ALARMED {
+ base SEVERITY_TYPE;
+ description
+ "none";
+ }
+
+ identity SEVERITY_TYPE_WARNING {
+ base SEVERITY_TYPE;
+ description
+ "none";
+ }
+
+ identity SEVERITY_TYPE_MAJOR {
+ base SEVERITY_TYPE;
+ description
+ "none";
+ }
+
+ identity SEVERITY_TYPE_MINOR {
+ base SEVERITY_TYPE;
+ description
+ "none";
+ }
+
+ identity SEVERITY_TYPE_CRITICAL {
+ base SEVERITY_TYPE;
+ description
+ "none";
+ }
+
+ identity SEVERITY_TYPE_NOT_YET_DEFINED {
+ base SEVERITY_TYPE;
+ description
+ "none";
+ }
+
+ identity INTERFACE_STATUS_TYPE {
+ description
+ "none";
+ }
+
+ identity INTERFACE_STATUS_TYPE_UP {
+ base INTERFACE_STATUS_TYPE;
+ description
+ "Ready to pass packets.";
+ }
+
+ identity INTERFACE_STATUS_TYPE_DOWN {
+ base INTERFACE_STATUS_TYPE;
+ description
+ "The interface does not pass any packets.";
+ }
+
+ identity INTERFACE_STATUS_TYPE_SHUT_DUE_LOOP {
+ base INTERFACE_STATUS_TYPE;
+ description
+ "Only relevant if (loopPortShutDownIsAvail==1) AND (loopPortShutDownIsOn==1). 1 = port has been automatically shut down, because an Ethernet loop has been detected on this interface.";
+ }
+
+ identity INTERFACE_STATUS_TYPE_TESTING {
+ base INTERFACE_STATUS_TYPE;
+ description
+ "In some test mode. No operational packets can be passed.";
+ }
+
+ identity INTERFACE_STATUS_TYPE_UNKNOWN {
+ base INTERFACE_STATUS_TYPE;
+ description
+ "Status cannot be determined for some reason.";
+ }
+
+ identity INTERFACE_STATUS_TYPE_DORMANT {
+ base INTERFACE_STATUS_TYPE;
+ description
+ "Waiting for some external event.";
+ }
+
+ identity INTERFACE_STATUS_TYPE_NOT_PRESENT {
+ base INTERFACE_STATUS_TYPE;
+ description
+ "Some component (typically hardware) is missing.";
+ }
+
+ identity INTERFACE_STATUS_TYPE_LOWER_LAYER_DOWN {
+ base INTERFACE_STATUS_TYPE;
+ description
+ "Down due to state of lower-layer interface(s).";
+ }
+
+ identity INTERFACE_STATUS_TYPE_ADMIN_DOWN {
+ base INTERFACE_STATUS_TYPE;
+ description
+ "Down due to configuration.";
+ }
+
+ identity INTERFACE_STATUS_TYPE_NOT_YET_DEFINED {
+ base INTERFACE_STATUS_TYPE;
+ description
+ "none";
+ }
+
+ /****************************************
+ * package super-types
+ **************************************/
+
+ typedef granularity-period-type {
+ type identityref {
+ base GRANULARITY_PERIOD_TYPE;
+ }
+ description
+ "The enumeration with the options for granularity period of the performance data.";
+ }
+
+ typedef severity-type {
+ type identityref {
+ base SEVERITY_TYPE;
+ }
+ description
+ "none";
+ }
+
+ typedef interface-status-type {
+ type identityref {
+ base INTERFACE_STATUS_TYPE;
+ }
+ description
+ "Current Interface Status";
+ }
+
+ grouping problem-kind-severity-type {
+ leaf problem-kind-name {
+ type string;
+ description
+ "Name of the alarm according to SupportedAlarmList";
+ }
+ leaf problem-kind-severity {
+ type severity-type;
+ default "SEVERITY_TYPE_NOT_YET_DEFINED";
+ description
+ "Severity of this type of alarm.";
+ }
+ description
+ "none";
+ }
+
+ grouping mac-interface-current-problem-type {
+ leaf problem-name {
+ type string;
+ default "NOT_YET_DEFINED";
+ description
+ "Name of the alarm according to SupportedAlarmList";
+ }
+ uses current-problem;
+ description
+ "none";
+ }
+
+ grouping mac-interface-performance-type {
+ leaf mac-control-frames-ingress {
+ type int32;
+ units "frame";
+ default "-1";
+ config false;
+ description
+ "MAC layer control frames received on the interface.";
+ }
+ leaf mac-pause-frames-ingress {
+ type int32;
+ units "frame";
+ default "-1";
+ config false;
+ description
+ "MAC layer Pause frames received on the interface.";
+ }
+ leaf oversized-frames-ingress {
+ type int32;
+ units "frame";
+ default "-1";
+ config false;
+ description
+ "The total number of frames received that were longer than 1518 octets (excluding framing bits, but including FCS octets) and were otherwise well formed.";
+ }
+ leaf undersized-frames-ingress {
+ type int32;
+ units "frame";
+ default "-1";
+ config false;
+ description
+ "The total number of frames received that were less than 64 octets long (excluding framing bits, but including FCS octets) and were otherwise well formed.";
+ }
+ leaf jabber-frames-ingres {
+ type int32;
+ units "frame";
+ default "-1";
+ config false;
+ description
+ "Number of jabber frames received on the interface. Jabber frames are typically defined as oversize frames which also have a bad CRC. Implementations may use slightly different definitions of what constitutes a jabber frame. Often indicative of a NIC hardware problem.";
+ }
+ leaf fragmented-frames-ingress {
+ type int64;
+ units "frame";
+ default "-1";
+ config false;
+ description
+ "The total number of frames received that were 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).";
+ }
+ leaf tagged-frames-ingress {
+ type int64;
+ units "frame";
+ default "-1";
+ config false;
+ description
+ "Number of 802.1q tagged frames received on the interface.";
+ }
+ leaf mac-control-frames-egress {
+ type int32;
+ units "frame";
+ default "-1";
+ config false;
+ description
+ "MAC layer control frames sent on the interface.";
+ }
+ leaf mac-pause-frames-egress {
+ type int32;
+ units "frame";
+ default "-1";
+ config false;
+ description
+ "MAC layer Pause frames sent on the interface.";
+ }
+ leaf tagged-frames-egress {
+ type int64;
+ units "frame";
+ default "-1";
+ config false;
+ description
+ "Number of 802.1q tagged frames sent on the interface.";
+ }
+ leaf frames-of-64-byte {
+ type int64;
+ units "frame";
+ default "-1";
+ config false;
+ description
+ "Number of packets (including bad packets) received that were 64 bytes in length (excluding framing bits but including FCS bytes).";
+ }
+ leaf frames-of-65-to-127-byte {
+ type int64;
+ units "frame";
+ default "-1";
+ config false;
+ description
+ "Number of good and bad packets received that were between 65 and 127 bytes in length (excluding framing bits but including FCS bytes).";
+ }
+ leaf frames-of-128-to-255-byte {
+ type int64;
+ units "frame";
+ default "-1";
+ config false;
+ description
+ "Number of good and bad packets received that were between 128 and 255 bytes in length inclusive (excluding framing bits but including FCS bytes).";
+ }
+ leaf frames-of-256-to-511-byte {
+ type int64;
+ units "frame";
+ default "-1";
+ config false;
+ description
+ "Number of good and bad packets received that were between 256 and 511 bytes in length inclusive (excluding framing bits but including FCS bytes).";
+ }
+ leaf frames-of-512-to-1023-byte {
+ type int64;
+ units "frame";
+ default "-1";
+ config false;
+ description
+ "Number of good and bad packets received that were between 512 and 1023 bytes in length inclusive (excluding framing bits but including FCS bytes).";
+ }
+ leaf frames-of-1024-to-1518-byte {
+ type int64;
+ units "frame";
+ default "-1";
+ config false;
+ description
+ "Number of good and bad packets received that were between 1024 and 1518 bytes in length inclusive (excluding framing bits but including FCS bytes).";
+ }
+ description
+ "none";
+ }
+
+ grouping mac-interface-current-performance-type {
+ container performance-data {
+ config false;
+ uses mac-interface-performance-type;
+ description
+ "none";
+ }
+ uses current-performance;
+ description
+ "none";
+ }
+
+ grouping mac-interface-historical-performance-type {
+ container performance-data {
+ config false;
+ uses mac-interface-performance-type;
+ description
+ "none";
+ }
+ uses historical-performance;
+ description
+ "none";
+ }
+}
diff --git a/sdnr/wt/devicemanager-onap/onf14/provider/src/main/yang/pure-ethernet-structure-2-0.yang b/sdnr/wt/devicemanager-onap/onf14/provider/src/main/yang/pure-ethernet-structure-2-0.yang new file mode 100644 index 000000000..14d812450 --- /dev/null +++ b/sdnr/wt/devicemanager-onap/onf14/provider/src/main/yang/pure-ethernet-structure-2-0.yang @@ -0,0 +1,888 @@ +module pure-ethernet-structure-2-0 {
+ yang-version 1.1;
+ namespace "urn:onf:yang:pure-ethernet-structure-2-0";
+ prefix pure-ethernet-structure;
+
+ import ietf-yang-types {
+ prefix yang;
+ }
+ import core-model-1-4 {
+ prefix core-model;
+ }
+
+ organization
+ "openBackhaul.com proposal to Open Networking Foundation (ONF)";
+ contact
+ "WG Web : https://github.com/openBackhaul/Overview
+ WG List: PureEthernetStructure@openBackhaul.com
+ Editor : Thorsten Heinze
+ Email : Thorsten.Heinze@openBackhaul.com";
+ description
+ "Technology specific interface definition for a pure Ethernet structure on a physical media
+
+ Copyright 2019 openBackhaul.com
+
+ Licensed under the Apache License, Version 2.0 (the 'License');
+ you may not use this file except in compliance with the License.
+ You may obtain a copy of the License at
+ http://www.apache.org/licenses/LICENSE-2.0
+ Unless required by applicable law or agreed to in writing, software
+ distributed under the License is distributed on an 'AS IS' BASIS,
+ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ See the License for the specific language governing permissions and
+ limitations under the License.";
+
+ revision 2020-01-22 {
+ description
+ "Model for the Transport SDN Pilot at Telefonica Germany.
+ Please view https://github.com/openBackhaul/pureEthernetStructure/issues for changes.";
+ reference
+ "https://github.com/openBackhaul/pureEthernetStructure/tree/tsp: Model definition
+ https://github.com/openBackhaul/onfCoreIm/tree/tsp: ONF TR-512 Core IM incl. Profile and enhanced Equipment definition";
+ }
+ revision 2019-11-23 {
+ description
+ "Model for the Transport SDN Pilot at Telefonica Germany.
+ Please view https://github.com/openBackhaul/pureEthernetStructure/issues for changes.";
+ reference
+ "https://github.com/openBackhaul/pureEthernetStructure/tree/tsp: Model definition
+ https://github.com/openBackhaul/onfCoreIm/tree/tsp: ONF TR-512 Core IM incl. Profile and enhanced Equipment definition";
+ }
+ revision 2019-07-08 {
+ description
+ "Model for the Transport SDN Pilot at Telefonica Germany.
+ Please view https://github.com/openBackhaul/pureEthernetStructure/issues for changes.";
+ reference
+ "https://github.com/openBackhaul/pureEthernetStructure/tree/tsp: Model definition
+ https://github.com/openBackhaul/onfCoreIm/tree/tsp: ONF TR-512 Core IM incl. Profile and enhanced Equipment definition";
+ }
+
+ identity LAYER_PROTOCOL_NAME_TYPE_PURE_ETHERNET_STRUCTURE_LAYER {
+ base core-model:LAYER_PROTOCOL_NAME_TYPE;
+ description
+ "none";
+ }
+
+ augment "/core-model:control-construct/core-model:logical-termination-point/core-model:layer-protocol" {
+ when "derived-from-or-self(./core-model:layer-protocol-name, 'pure-ethernet-structure:LAYER_PROTOCOL_NAME_TYPE_PURE_ETHERNET_STRUCTURE_LAYER')";
+ uses pure-ethernet-structure-lp-spec;
+ description
+ "none";
+ }
+
+ /****************************************
+ * package notifications
+ **************************************/
+
+ notification object-creation-notification {
+ uses object-creation-notification;
+ description
+ "none";
+ }
+
+ grouping object-creation-notification {
+ leaf counter {
+ type int64;
+ default "-1";
+ config false;
+ description
+ "Counts object creation notifications.";
+ }
+ leaf timestamp {
+ type yang:date-and-time;
+ default "2010-11-20T14:00:00+01:00";
+ config false;
+ description
+ "none";
+ }
+ leaf object-id-ref {
+ type leafref {
+ path "/core-model:control-construct/core-model:logical-termination-point/core-model:uuid";
+ require-instance false;
+ }
+ config false;
+ description
+ "none";
+ }
+ leaf object-type {
+ type string;
+ default "Type of created object not specified.";
+ config false;
+ description
+ "none";
+ }
+ description
+ "none";
+ }
+
+ notification object-deletion-notification {
+ uses object-deletion-notification;
+ description
+ "none";
+ }
+
+ grouping object-deletion-notification {
+ leaf counter {
+ type int64;
+ default "-1";
+ config false;
+ description
+ "Counts object deletion notifications.";
+ }
+ leaf timestamp {
+ type yang:date-and-time;
+ default "2010-11-20T14:00:00+01:00";
+ config false;
+ description
+ "none";
+ }
+ leaf object-id-ref {
+ type leafref {
+ path "/core-model:control-construct/core-model:logical-termination-point/core-model:uuid";
+ require-instance false;
+ }
+ config false;
+ description
+ "none";
+ }
+ description
+ "none";
+ }
+
+ notification attribute-value-changed-notification {
+ uses attribute-value-changed-notification;
+ description
+ "none";
+ }
+
+ grouping attribute-value-changed-notification {
+ leaf counter {
+ type int64;
+ default "-1";
+ config false;
+ description
+ "Counts attribute value changed notifications.";
+ }
+ leaf timestamp {
+ type yang:date-and-time;
+ default "2010-11-20T14:00:00+01:00";
+ config false;
+ description
+ "none";
+ }
+ leaf object-id-ref {
+ type leafref {
+ path "/core-model:control-construct/core-model:logical-termination-point/core-model:uuid";
+ require-instance false;
+ }
+ config false;
+ description
+ "none";
+ }
+ leaf attribute-name {
+ type string;
+ default "Attribute name not specified.";
+ config false;
+ description
+ "Name of the attribute that has been changed.";
+ }
+ leaf new-value {
+ type string;
+ default "New value not specified.";
+ config false;
+ description
+ "Attribute value converted to a string (xml, json, ...)";
+ }
+ description
+ "none";
+ }
+
+ notification problem-notification {
+ uses problem-notification;
+ description
+ "none";
+ }
+
+ grouping problem-notification {
+ leaf counter {
+ type int64;
+ default "-1";
+ config false;
+ description
+ "Counts problem notifications";
+ }
+ leaf timestamp {
+ type yang:date-and-time;
+ default "2010-11-20T14:00:00+01:00";
+ config false;
+ description
+ "none";
+ }
+ leaf object-id-ref {
+ type leafref {
+ path "/core-model:control-construct/core-model:logical-termination-point/core-model:uuid";
+ require-instance false;
+ }
+ config false;
+ description
+ "none";
+ }
+ leaf problem {
+ type string;
+ default "Problem name not specified.";
+ config false;
+ description
+ "Name of the problem according to supportedAlarmList";
+ }
+ leaf severity {
+ type severity-type;
+ default "SEVERITY_TYPE_WARNING";
+ config false;
+ description
+ "Severity of the problem according to problemKindSeverity";
+ }
+ description
+ "none";
+ }
+
+ /****************************************
+ * grouping statements for object classes
+ **************************************/
+ /****************************************
+ * package super-classes
+ **************************************/
+
+ grouping current-problem {
+ leaf sequence-number {
+ type int16;
+ config false;
+ description
+ "Unique sequence number of the current problem object.";
+ }
+ leaf timestamp {
+ type yang:date-and-time;
+ default "2010-11-20T14:00:00+01:00";
+ config false;
+ description
+ "Time when the alarm was raised.";
+ }
+ leaf problem-severity {
+ type severity-type;
+ default "SEVERITY_TYPE_NOT_YET_DEFINED";
+ config false;
+ description
+ "Severity of the alarm.";
+ }
+ description
+ "none";
+ }
+
+ grouping current-performance {
+ leaf timestamp {
+ type yang:date-and-time;
+ default "2010-11-20T14:00:00+01:00";
+ config false;
+ description
+ "The timestamp associated with when the current data was collected.";
+ }
+ leaf suspect-interval-flag {
+ type boolean;
+ default "false";
+ config false;
+ description
+ "This attribute is used to indicate that the performance data for the current period may not be reliable. Some reasons for this to occur are:
+ – Suspect data were detected by the actual resource doing data collection.
+ – Transition of the administrativeState attribute to/from the 'lock' state.
+ – Transition of the operationalState to/from the 'disabled' state.
+ – Scheduler setting that inhibits the collection function.
+ – The performance counters were reset during the interval.
+ – The currentData (or subclass) object instance was created during the monitoring period.";
+ }
+ leaf elapsed-time {
+ type int64;
+ units "s";
+ default "-1";
+ config false;
+ description
+ "Number of seconds that elapsed since the last reset of the counter.";
+ }
+ leaf scanner-id {
+ type string;
+ default "Scanner ID not defined.";
+ config false;
+ description
+ "none";
+ }
+ leaf granularity-period {
+ type granularity-period-type;
+ config false;
+ description
+ "Time period between reset of the underlying counter.";
+ }
+ description
+ "none";
+ }
+
+ grouping historical-performance {
+ leaf suspect-interval-flag {
+ type boolean;
+ default "false";
+ config false;
+ description
+ "This attribute indicates that the data collected during the interval is suspect.";
+ }
+ leaf history-data-id {
+ type string;
+ default "History Data ID not defined.";
+ config false;
+ description
+ "none";
+ }
+ leaf granularity-period {
+ type granularity-period-type;
+ config false;
+ description
+ "Time period between reset of the underlying counter.";
+ }
+ leaf period-end-time {
+ type yang:date-and-time;
+ config false;
+ description
+ "Time when the counter values have been recorded and the counter reset.";
+ }
+ description
+ "none";
+ }
+
+ grouping pure-ethernet-structure-lp-spec {
+ container pure-ethernet-structure-pac {
+ uses pure-ethernet-structure-pac;
+ description
+ "none";
+ }
+ description
+ "The PureEthernetStructureLpSpec and its attached classes MUST be provided on management interfaces of routers, switches and microwave devices, which are transporting exclusively Ethernet traffic.";
+ }
+
+ grouping pure-ethernet-structure-pac {
+ container pure-ethernet-structure-capability {
+ config false;
+ uses pure-ethernet-structure-capability;
+ description
+ "none";
+ }
+ container pure-ethernet-structure-configuration {
+ uses pure-ethernet-structure-configuration;
+ description
+ "none";
+ }
+ container pure-ethernet-structure-status {
+ config false;
+ uses pure-ethernet-structure-status;
+ description
+ "none";
+ }
+ container pure-ethernet-structure-current-problems {
+ config false;
+ uses pure-ethernet-structure-current-problems;
+ description
+ "none";
+ }
+ container pure-ethernet-structure-current-performance {
+ config false;
+ uses pure-ethernet-structure-current-performance;
+ description
+ "none";
+ }
+ container pure-ethernet-structure-historical-performances {
+ config false;
+ uses pure-ethernet-structure-historical-performances;
+ description
+ "none";
+ }
+ description
+ "The pureEthernetStructure_Pac and its attached classes MUST be provided on management interfaces of microwave devices, which are transporting Ethernet traffic only.";
+ }
+
+ grouping pure-ethernet-structure-capability {
+ leaf-list supported-alarm-list {
+ type string;
+ default "Supported alarms not yet defined.";
+ config false;
+ description
+ "Available alarms to be listed. Mandatory:none. Names are to be separated by commas. Further alarms might be added by the vendor.";
+ }
+ leaf performance-monitoring-is-avail {
+ type boolean;
+ default "false";
+ config false;
+ description
+ "1 = Collection and aggregation of performance values is available.";
+ }
+ description
+ "Describes the logical structuring of the physical capacity provided by a pure Ethernet microwave device. Segmentation is not available. No fixed segment size. No TDM transport.";
+ }
+
+ grouping pure-ethernet-structure-configuration {
+ list problem-kind-severity-list {
+ key "problem-kind-name";
+ uses problem-kind-severity-type;
+ description
+ "Severity of the type of problem to be configured.";
+ }
+ list g-826-threshold-cross-alarm-list {
+ key "g-826-value-kind granularity-period";
+ uses g-826-threshold-cross-alarm-type;
+ description
+ "List of G826 related threshold cross alarms to be configured.";
+ }
+ leaf clearing-threshold-cross-alarms-is-on {
+ type boolean;
+ default "false";
+ description
+ "Setting this bit is clearing all the currently active threshold cross alarms.";
+ }
+ leaf performance-monitoring-is-on {
+ type boolean;
+ default "false";
+ description
+ "Enables measurement, collection, storage and access to performance data.";
+ }
+ description
+ "none";
+ }
+
+ grouping pure-ethernet-structure-status {
+ list segment-status-list {
+ key "segment-status-type-id";
+ config false;
+ min-elements 1;
+ uses segment-status-type;
+ description
+ "Status of the Ethernet transport segment. Always just one segment.";
+ }
+ leaf performance-monitoring-is-up {
+ type boolean;
+ default "false";
+ config false;
+ description
+ "1 = Performance values are currently collected and aggregated.";
+ }
+ description
+ "none";
+ }
+
+ grouping pure-ethernet-structure-current-problems {
+ list current-problem-list {
+ key "sequence-number";
+ config false;
+ uses structure-current-problem-type;
+ description
+ "none";
+ }
+ leaf number-of-current-problems {
+ type int8;
+ default "-1";
+ config false;
+ description
+ "Number of alarms, which are currently active on this interface.";
+ }
+ leaf time-of-latest-change {
+ type yang:date-and-time;
+ default "2010-11-20T14:00:00+01:00";
+ config false;
+ description
+ "Date and time when the list of alarms has been changed for the last time.";
+ }
+ description
+ "none";
+ }
+
+ grouping pure-ethernet-structure-current-performance {
+ list current-performance-data-list {
+ key "granularity-period";
+ config false;
+ min-elements 1;
+ max-elements 2;
+ uses structure-current-performance-type;
+ description
+ "At least values of the counters, which are reset every 15 minutes, are to be provided. If available, the current values of the counters, which are reset every 24 hour, can be provided, too.";
+ }
+ leaf number-of-current-performance-sets {
+ type int8;
+ default "-1";
+ config false;
+ description
+ "Number of sets of current performance values, which are provided in the list.";
+ }
+ description
+ "Aggregated performance information of the structure of an pure Ethernet microwave at a particular moment.";
+ }
+
+ grouping pure-ethernet-structure-historical-performances {
+ list historical-performance-data-list {
+ key "granularity-period period-end-time";
+ config false;
+ uses structure-historical-performance-type;
+ description
+ "none";
+ }
+ leaf number-of-historical-performance-sets {
+ type int16;
+ default "-1";
+ config false;
+ description
+ "Number of sets of historical performance values, which are provided in the list.";
+ }
+ leaf time-of-latest-change {
+ type yang:date-and-time;
+ default "2010-11-20T14:00:00+01:00";
+ config false;
+ description
+ "Date and time when the list of sets of historical performance values has been changed for the last time (e.g. new one added or existing one deleted).";
+ }
+ description
+ "Aggregated performance information of the structure of an pure Ethernet microwave for a pre-defined measurement interval.";
+ }
+
+ /****************************************
+ * typedef statements
+ **************************************/
+
+ typedef g-826-type {
+ type identityref {
+ base G_826_TYPE;
+ }
+ description
+ "none";
+ }
+
+ /*********************************************
+ * grouping statements for complex data types
+ *******************************************/
+
+ identity G_826_TYPE {
+ description
+ "none";
+ }
+
+ identity G_826_TYPE_ES {
+ base G_826_TYPE;
+ description
+ "Errored Seconds. Threshold cross alarm will relate to TypeDefinitions::AirInterfacePerformanceType::es .";
+ }
+
+ identity G_826_TYPE_SES {
+ base G_826_TYPE;
+ description
+ "Severely Errored Seconds. Threshold cross alarm will relate to TypeDefinitions::AirInterfacePerformanceType::ses .";
+ }
+
+ identity G_826_TYPE_CSES {
+ base G_826_TYPE;
+ description
+ "Consecutive Severely Errored Seconds. Threshold cross alarm will relate to TypeDefinitions::AirInterfacePerformanceType::cses .";
+ }
+
+ identity G_826_TYPE_UAS {
+ base G_826_TYPE;
+ description
+ "Unavailable Seconds. Threshold cross alarm will relate to TypeDefinitions::AirInterfacePerformanceType::unavailability.";
+ }
+
+ identity G_826_TYPE_NOT_SPECIFIED {
+ base G_826_TYPE;
+ description
+ "none";
+ }
+
+ identity GRANULARITY_PERIOD_TYPE {
+ description
+ "none";
+ }
+
+ identity GRANULARITY_PERIOD_TYPE_UNKNOWN {
+ base GRANULARITY_PERIOD_TYPE;
+ description
+ "none";
+ }
+
+ identity GRANULARITY_PERIOD_TYPE_PERIOD-15-MIN {
+ base GRANULARITY_PERIOD_TYPE;
+ description
+ "none";
+ }
+
+ identity GRANULARITY_PERIOD_TYPE_PERIOD-24-HOURS {
+ base GRANULARITY_PERIOD_TYPE;
+ description
+ "none";
+ }
+
+ identity GRANULARITY_PERIOD_TYPE_NOT_YET_DEFINED {
+ base GRANULARITY_PERIOD_TYPE;
+ description
+ "none";
+ }
+
+ identity SEVERITY_TYPE {
+ description
+ "none";
+ }
+
+ identity SEVERITY_TYPE_NON_ALARMED {
+ base SEVERITY_TYPE;
+ description
+ "none";
+ }
+
+ identity SEVERITY_TYPE_WARNING {
+ base SEVERITY_TYPE;
+ description
+ "none";
+ }
+
+ identity SEVERITY_TYPE_MINOR {
+ base SEVERITY_TYPE;
+ description
+ "none";
+ }
+
+ identity SEVERITY_TYPE_MAJOR {
+ base SEVERITY_TYPE;
+ description
+ "none";
+ }
+
+ identity SEVERITY_TYPE_CRITICAL {
+ base SEVERITY_TYPE;
+ description
+ "none";
+ }
+
+ identity SEVERITY_TYPE_NOT_YET_DEFINED {
+ base SEVERITY_TYPE;
+ description
+ "none";
+ }
+
+ identity OPERATIONAL_STATE_TYPE {
+ description
+ "none";
+ }
+
+ identity OPERATIONAL_STATE_TYPE_ENABLED {
+ base OPERATIONAL_STATE_TYPE;
+ description
+ "none";
+ }
+
+ identity OPERATIONAL_STATE_TYPE_DISABLED {
+ base OPERATIONAL_STATE_TYPE;
+ description
+ "none";
+ }
+
+ identity OPERATIONAL_STATE_TYPE_NOT_YET_DEFINED {
+ base OPERATIONAL_STATE_TYPE;
+ description
+ "none";
+ }
+
+ /****************************************
+ * package super-types
+ **************************************/
+
+ typedef granularity-period-type {
+ type identityref {
+ base GRANULARITY_PERIOD_TYPE;
+ }
+ description
+ "The enumeration with the options for granularity period of the performance data.";
+ }
+
+ typedef severity-type {
+ type identityref {
+ base SEVERITY_TYPE;
+ }
+ description
+ "According to ITU-T M.3160";
+ }
+
+ typedef operational-state-type {
+ type identityref {
+ base OPERATIONAL_STATE_TYPE;
+ }
+ description
+ "The list of valid operational states for the connection.";
+ }
+
+ grouping problem-kind-severity-type {
+ leaf problem-kind-name {
+ type string;
+ description
+ "Name of the alarm according to supportedAlarmList";
+ }
+ leaf problem-kind-severity {
+ type severity-type;
+ default "SEVERITY_TYPE_NOT_YET_DEFINED";
+ description
+ "Severity of this type of alarm.";
+ }
+ description
+ "none";
+ }
+
+ grouping g-826-threshold-cross-alarm-type {
+ leaf g-826-value-kind {
+ type g-826-type;
+ description
+ "Kind of performance value that shall be equipped with a threshold alarm.";
+ }
+ leaf alarm-raising-threshold {
+ type int32;
+ units "s";
+ default "-1";
+ description
+ "Number of events required for raising the threshold cross alarm.";
+ }
+ leaf alarm-clearing-threshold {
+ type int32;
+ units "s";
+ default "-1";
+ description
+ "Number of events required for clearing the threshold cross alarm.";
+ }
+ leaf granularity-period {
+ type granularity-period-type;
+ description
+ "Period of the performance data collection.";
+ }
+ description
+ "Allows defining a threshold cross alarm.\n";
+ }
+
+ grouping segment-status-type {
+ leaf segment-status-type-id {
+ type int16;
+ config false;
+ description
+ "none";
+ }
+ leaf operational-status {
+ type operational-state-type;
+ default "OPERATIONAL_STATE_TYPE_NOT_YET_DEFINED";
+ config false;
+ description
+ "Current operational status of each segment.";
+ }
+ description
+ "none";
+ }
+
+ grouping structure-current-problem-type {
+ leaf problem-name {
+ type string;
+ default "Problem name not specified.";
+ config false;
+ description
+ "Name of the alarm according to Structure::StructureCapability::supportedAlarms";
+ }
+ uses current-problem;
+ description
+ "none";
+ }
+
+ grouping structure-performance-type {
+ leaf time-period {
+ type int32;
+ units "s";
+ default "-1";
+ config false;
+ description
+ "Total length of the measurement period in seconds.";
+ }
+ leaf es {
+ type int32;
+ units "s";
+ default "-1";
+ config false;
+ description
+ "Number of errored seconds. 1+0: Same value as for single air interface. 1+1 and Diversity: Value representing the combined signals.";
+ }
+ leaf ses {
+ type int32;
+ units "s";
+ default "-1";
+ config false;
+ description
+ "Number of severely errored seconds. 1+0: Same value as for single air interface. 1+1 and Diversity: Value representing the combined signals.";
+ }
+ leaf cses {
+ type int32;
+ units "s";
+ default "-1";
+ config false;
+ description
+ "Number of consecutive severely errored seconds. 1+0: Same value as for single air interface. 1+1 and Diversity: Value representing the combined signals.";
+ }
+ leaf unavailability {
+ type int32;
+ units "s";
+ default "-1";
+ config false;
+ description
+ "Total time of unavailability in seconds. 1+0: Same value as for single air interface. 1+1 and Diversity: Value representing the combined signals.";
+ }
+ leaf rx-level-min {
+ type int8;
+ units "dBm";
+ default "99";
+ config false;
+ description
+ "Minimum receive level. 1+0: Same value as for single air interface. 1+1: Value representing the combined signals. Diversity: To be left on default value.";
+ }
+ leaf rx-level-max {
+ type int8;
+ units "dBm";
+ default "99";
+ config false;
+ description
+ "Maximum receive level. 1+0: Same value as for single air interface. 1+1: Value representing the combined signals. Diversity: To be left on default value.";
+ }
+ leaf rx-level-avg {
+ type int8;
+ units "dBm";
+ default "99";
+ config false;
+ description
+ "Averaged receive level. 1+0: Same value as for single air interface. 1+1: Value representing the combined signals. Diversity: To be left on default value.";
+ }
+ description
+ "Consolidated performance information of the Structure.";
+ }
+
+ grouping structure-current-performance-type {
+ container performance-data {
+ config false;
+ uses structure-performance-type;
+ description
+ "none";
+ }
+ uses current-performance;
+ description
+ "Turns performance information into current performance information by inheriting from OTN_CurrentData.";
+ }
+
+ grouping structure-historical-performance-type {
+ container performance-data {
+ config false;
+ uses structure-performance-type;
+ description
+ "none";
+ }
+ uses historical-performance;
+ description
+ "Turns performance information into historical performance information by inheriting from OTN_HistoryData.";
+ }
+}
diff --git a/sdnr/wt/devicemanager-onap/onf14/provider/src/main/yang/qos-profile-1-0.yang b/sdnr/wt/devicemanager-onap/onf14/provider/src/main/yang/qos-profile-1-0.yang new file mode 100644 index 000000000..7dd05d092 --- /dev/null +++ b/sdnr/wt/devicemanager-onap/onf14/provider/src/main/yang/qos-profile-1-0.yang @@ -0,0 +1,534 @@ +module qos-profile-1-0 {
+ yang-version 1.1;
+ namespace "urn:onf:yang:qos-profile-1-0";
+ prefix qos-profile;
+
+ import ietf-yang-types {
+ prefix yang;
+ }
+ import core-model-1-4 {
+ prefix core-model;
+ }
+
+ organization
+ "openBackhaul.com proposal to Open Networking Foundation (ONF)";
+ contact
+ "WG Web : https://github.com/openBackhaul/Overview
+ WG List: QosProfile@openBackhaul.com
+ Editor : Thorsten Heinze
+ Email : Thorsten.Heinze@openBackhaul.com";
+ description
+ "Copyright 2019 openBackhaul.com
+
+ Licensed under the Apache License, Version 2.0 (the 'License');
+ you may not use this file except in compliance with the License.
+ You may obtain a copy of the License at
+ http://www.apache.org/licenses/LICENSE-2.0
+ Unless required by applicable law or agreed to in writing, software
+ distributed under the License is distributed on an 'AS IS' BASIS,
+ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ See the License for the specific language governing permissions and
+ limitations under the License.";
+
+ revision 2020-01-24 {
+ description
+ "Model for the Transport SDN Pilot at Telefonica Germany.
+ Please view https://github.com/openBackhaul/qosProfile/issues for changes.";
+ reference
+ "https://github.com/openBackhaul/qosProfile/tree/tsp: Model definition
+ https://github.com/openBackhaul/onfCoreIm/tree/tsp: ONF TR-512 Core IM incl. Profile and enhanced Equipment definition";
+ }
+ revision 2019-07-12 {
+ description
+ "Model for the Transport SDN Pilot at Telefonica Germany.
+ Please view https://github.com/openBackhaul/qosProfile/issues for changes.";
+ reference
+ "https://github.com/openBackhaul/qosProfile/tree/tsp: Model definition
+ https://github.com/openBackhaul/onfCoreIm/tree/tsp: ONF TR-512 Core IM incl. Profile and enhanced Equipment definition";
+ }
+
+ identity PROFILE_NAME_TYPE_QOS_PROFILE {
+ base core-model:PROFILE_NAME_TYPE;
+ description
+ "none";
+ }
+
+ augment "/core-model:control-construct/core-model:profile-collection/core-model:profile" {
+ when "derived-from-or-self(./core-model:profile-name, 'qos-profile:PROFILE_NAME_TYPE_QOS_PROFILE')";
+ uses qos-profile-spec;
+ description
+ "none";
+ }
+
+ /****************************************
+ * package notifications
+ **************************************/
+
+ notification object-creation-notification {
+ uses object-creation-notification;
+ description
+ "none";
+ }
+
+ grouping object-creation-notification {
+ leaf counter {
+ type int32;
+ default "-1";
+ config false;
+ description
+ "Counts object creation notifications.";
+ }
+ leaf timestamp {
+ type yang:date-and-time;
+ default "2010-11-20T14:00:00+01:00";
+ config false;
+ description
+ "none";
+ }
+ leaf object-id-ref {
+ type leafref {
+ path "/core-model:control-construct/core-model:profile-collection/core-model:profile/core-model:uuid";
+ require-instance false;
+ }
+ config false;
+ description
+ "none";
+ }
+ leaf object-type {
+ type string;
+ default "Type of created object not specified.";
+ config false;
+ description
+ "none";
+ }
+ description
+ "none";
+ }
+
+ notification object-deletion-notification {
+ uses object-deletion-notification;
+ description
+ "none";
+ }
+
+ grouping object-deletion-notification {
+ leaf counter {
+ type int32;
+ default "-1";
+ config false;
+ description
+ "Counts object deletion notifications.";
+ }
+ leaf timestamp {
+ type yang:date-and-time;
+ default "2010-11-20T14:00:00+01:00";
+ config false;
+ description
+ "none";
+ }
+ leaf object-id-ref {
+ type leafref {
+ path "/core-model:control-construct/core-model:profile-collection/core-model:profile/core-model:uuid";
+ require-instance false;
+ }
+ config false;
+ description
+ "none";
+ }
+ description
+ "none";
+ }
+
+ /****************************************
+ * grouping statements for object classes
+ **************************************/
+
+ grouping qos-profile-spec {
+ container qos-profile-pac {
+ uses qos-profile-pac;
+ description
+ "none";
+ }
+ description
+ "none";
+ }
+
+ grouping qos-profile-pac {
+ container qos-profile-capability {
+ config false;
+ uses qos-profile-capability;
+ description
+ "none";
+ }
+ container qos-profile-configuration {
+ config false;
+ uses qos-profile-configuration;
+ description
+ "none";
+ }
+ description
+ "none";
+ }
+
+ grouping qos-profile-capability {
+ leaf profile-naming-is-avail {
+ type boolean;
+ default "false";
+ config false;
+ description
+ "1 = There is a free text field available for naming the profile.";
+ }
+ leaf-list available-queue-list {
+ type queue-name-type;
+ config false;
+ min-elements 1;
+ max-elements 8;
+ description
+ "List of queues, which are available at the physical interface.";
+ }
+ leaf drop-precedence-at-be-queue-is-avail {
+ type boolean;
+ default "false";
+ config false;
+ description
+ "1 = Configuration of the drop precedence is available at the best effort queue.";
+ }
+ leaf drop-precedence-at-af-queues-is-avail {
+ type boolean;
+ default "false";
+ config false;
+ description
+ "1 = Configuration of the drop precedence is available at the assured forwarding queues.";
+ }
+ leaf drop-precedence-at-prio-queues-is-avail {
+ type boolean;
+ default "false";
+ config false;
+ description
+ "1 = Configuration of the drop precedence is available at the priority queues.";
+ }
+ leaf available-qos-profile-kind-list {
+ type qos-profile-kind-type;
+ default "QOS_PROFILE_KIND_TYPE_NOT_YET_DEFINED";
+ config false;
+ description
+ "List of header information that are supported to be base of the QoS definition.";
+ }
+ description
+ "none";
+ }
+
+ grouping qos-profile-configuration {
+ leaf profile-name {
+ type string;
+ default "Name of profile not yet defined.";
+ description
+ "Identifier of the profile. Could be a name, could be a number. Free text field to be filled by the operator.";
+ }
+ leaf qos-profile-kind {
+ type qos-profile-kind-type;
+ default "QOS_PROFILE_KIND_TYPE_NOT_YET_DEFINED";
+ description
+ "Defines whether the sorting into queues is done based on VLAN, MPLS or IP header information.";
+ }
+ list ingress-8021p-to-per-hop-behavior-mapping-list {
+ key "queue-name drop-precedence-inside-queue";
+ min-elements 8;
+ max-elements 8;
+ uses per-hop-behavior-type;
+ description
+ "Only relevant when qosProfileKind == IEEE8021P. Associates the value of the three p-bits of the VLAN header with a per hop behavior at the physical interface. First entry in the list [0] relates to p-bit value '0'. Last entry in the list [7] relates to p-bit value '7'.";
+ }
+ list ingress-exp-to-per-hop-behavior-mapping-list {
+ key "queue-name drop-precedence-inside-queue";
+ min-elements 8;
+ max-elements 8;
+ uses per-hop-behavior-type;
+ description
+ "Only relevant when qosProfileKind == MPLS_EXP. Associates the value of the three p-bits of the MPLS header with a per hop behavior at the physical interface. First entry in the list [0] relates to p-bit value '0'. Last entry in the list [7] relates to p-bit value '7'.";
+ }
+ list ingress-ip-dscp-to-per-hop-behavior-mapping-list {
+ key "queue-name drop-precedence-inside-queue";
+ min-elements 64;
+ max-elements 64;
+ uses per-hop-behavior-type;
+ description
+ "Only relevant when qosProfileKind == IP_DSCP. Associates the value of the 8 dscp bits of the IP header with a per hop behavior at the physical interface. First entry in the list [0] relates to dscp value '0'. Last entry in the list [63] relates to dscp value '63'.";
+ }
+ leaf writing-per-hop-behavior-into-8021p-is-on {
+ type boolean;
+ default "false";
+ description
+ "1 = Original content of 802.1p bits is overwritten with local per hop behavior.";
+ }
+ list egress-per-hop-behavior-to-8021p-mapping-list {
+ key "mapping-number";
+ max-elements 24;
+ uses egress-per-hop-behavior-to-priority-bits-mapping-type;
+ description
+ "Only relevant if (writingPerHopBehaviorInto8021pIsOn==1). Translates (queue and drop precedence) into values of the three p-bits of the VLAN header.";
+ }
+ leaf writing-per-hop-behavior-into-mpls-exp-is-on {
+ type boolean;
+ default "false";
+ description
+ "1 = Original content of MPLS EXP bits is overwritten with local per hop behavior.";
+ }
+ list egress-per-hop-behavior-to-mpls-exp-mapping-list {
+ key "mapping-number";
+ max-elements 24;
+ uses egress-per-hop-behavior-to-priority-bits-mapping-type;
+ description
+ "Only relevant if (writingPerHopBehaviorIntoMplsExpIsOn==1). Translates (queue and drop precedence) into values of the three p-bits of the MPLS header.";
+ }
+ leaf writing-per-hop-behavior-into-ip-dscp-is-on {
+ type boolean;
+ default "false";
+ description
+ "1 = Original content of IP DSCP bits is overwritten with local per hop behavior.";
+ }
+ list egress-per-hop-behavior-to-ip-dscp-mapping-list {
+ key "mapping-number";
+ max-elements 24;
+ uses egress-per-hop-behavior-to-priority-bits-mapping-type;
+ description
+ "Only relevant if (writingPerHopBehaviorIntoIpDscpIsOn==1). Translates (queue and drop precedence) into values of the six dscp bits of the IP header.";
+ }
+ description
+ "Defines the profile that will be used for mapping between header information and queues (next hop behavior).";
+ }
+
+ /****************************************
+ * typedef statements
+ **************************************/
+
+ typedef severity-type {
+ type identityref {
+ base SEVERITY_TYPE;
+ }
+ description
+ "none";
+ }
+
+ typedef qos-profile-kind-type {
+ type identityref {
+ base QOS_PROFILE_KIND_TYPE;
+ }
+ description
+ "none";
+ }
+
+ typedef queue-name-type {
+ type identityref {
+ base QUEUE_NAME_TYPE;
+ }
+ description
+ "none";
+ }
+
+ typedef drop-precedence-type {
+ type identityref {
+ base DROP_PRECEDENCE_TYPE;
+ }
+ description
+ "none";
+ }
+
+ /*********************************************
+ * grouping statements for complex data types
+ *******************************************/
+
+ identity SEVERITY_TYPE {
+ description
+ "none";
+ }
+
+ identity SEVERITY_TYPE_NON-ALARMED {
+ base SEVERITY_TYPE;
+ description
+ "none";
+ }
+
+ identity SEVERITY_TYPE_WARNING {
+ base SEVERITY_TYPE;
+ description
+ "none";
+ }
+
+ identity SEVERITY_TYPE_MAJOR {
+ base SEVERITY_TYPE;
+ description
+ "none";
+ }
+
+ identity SEVERITY_TYPE_MINOR {
+ base SEVERITY_TYPE;
+ description
+ "none";
+ }
+
+ identity QOS_PROFILE_KIND_TYPE {
+ description
+ "none";
+ }
+
+ identity QOS_PROFILE_KIND_TYPE_NONE {
+ base QOS_PROFILE_KIND_TYPE;
+ description
+ "none";
+ }
+
+ identity QOS_PROFILE_KIND_TYPE_IEEE8021P {
+ base QOS_PROFILE_KIND_TYPE;
+ description
+ "none";
+ }
+
+ identity QOS_PROFILE_KIND_TYPE_MPLS_EXP {
+ base QOS_PROFILE_KIND_TYPE;
+ description
+ "none";
+ }
+
+ identity QOS_PROFILE_KIND_TYPE_IP_DSCP {
+ base QOS_PROFILE_KIND_TYPE;
+ description
+ "none";
+ }
+
+ identity QOS_PROFILE_KIND_TYPE_NOT_YET_DEFINED {
+ base QOS_PROFILE_KIND_TYPE;
+ description
+ "none";
+ }
+
+ identity QUEUE_NAME_TYPE {
+ description
+ "none";
+ }
+
+ identity QUEUE_NAME_TYPE_BEST_EFFORT_QUEUE {
+ base QUEUE_NAME_TYPE;
+ description
+ "Queue 0.";
+ }
+
+ identity QUEUE_NAME_TYPE_ASSURED_FORWARDING_QUEUE1 {
+ base QUEUE_NAME_TYPE;
+ description
+ "Queue 1.";
+ }
+
+ identity QUEUE_NAME_TYPE_ASSURED_FORWARDING_QUEUE2 {
+ base QUEUE_NAME_TYPE;
+ description
+ "Queue 2.";
+ }
+
+ identity QUEUE_NAME_TYPE_ASSURED_FORWARDING_QUEUE3 {
+ base QUEUE_NAME_TYPE;
+ description
+ "Queue 3.";
+ }
+
+ identity QUEUE_NAME_TYPE_ASSURED_FORWARDING_QUEUE4 {
+ base QUEUE_NAME_TYPE;
+ description
+ "Queue 4.";
+ }
+
+ identity QUEUE_NAME_TYPE_EXPEDITED_FORWARDING_QUEUE {
+ base QUEUE_NAME_TYPE;
+ description
+ "Queue 5.";
+ }
+
+ identity QUEUE_NAME_TYPE_CLASS_SELECTOR_QUEUE6 {
+ base QUEUE_NAME_TYPE;
+ description
+ "Queue 6.";
+ }
+
+ identity QUEUE_NAME_TYPE_CLASS_SELECTOR_QUEUE7 {
+ base QUEUE_NAME_TYPE;
+ description
+ "Queue 7.";
+ }
+
+ identity QUEUE_NAME_TYPE_NOT_YET_DEFINED {
+ base QUEUE_NAME_TYPE;
+ description
+ "none";
+ }
+
+ identity DROP_PRECEDENCE_TYPE {
+ description
+ "none";
+ }
+
+ identity DROP_PRECEDENCE_TYPE_NONE {
+ base DROP_PRECEDENCE_TYPE;
+ description
+ "none";
+ }
+
+ identity DROP_PRECEDENCE_TYPE_LOW {
+ base DROP_PRECEDENCE_TYPE;
+ description
+ "Would be equal to GREEN.";
+ }
+
+ identity DROP_PRECEDENCE_TYPE_MEDIUM {
+ base DROP_PRECEDENCE_TYPE;
+ description
+ "Would be equal to YELLOW.";
+ }
+
+ identity DROP_PRECEDENCE_TYPE_HIGH {
+ base DROP_PRECEDENCE_TYPE;
+ description
+ "Would be equal to RED.";
+ }
+
+ identity DROP_PRECEDENCE_TYPE_NOT_YET_DEFINED {
+ base DROP_PRECEDENCE_TYPE;
+ description
+ "none";
+ }
+
+ grouping per-hop-behavior-type {
+ leaf queue-name {
+ type queue-name-type;
+ description
+ "Name of the queue.";
+ }
+ leaf drop-precedence-inside-queue {
+ type drop-precedence-type;
+ description
+ "(if dropPrecedenceAt*QueueIsAvail for the referenced queue == 0) default value shall be kept and configuration attempts shall be ignored.";
+ }
+ description
+ "none";
+ }
+
+ grouping egress-per-hop-behavior-to-priority-bits-mapping-type {
+ leaf mapping-number {
+ type int16;
+ description
+ "none";
+ }
+ container per-hop-behavior {
+ uses per-hop-behavior-type;
+ description
+ "Per hop behavior, which is to be translated into a p-bit entry in the VLAN, MPLS or IP header.";
+ }
+ leaf value-of-priority-bits {
+ type int8;
+ default "-1";
+ description
+ "Associated value of the three, three or six p-bits of the VLAN, MPLS or IP header.";
+ }
+ description
+ "none";
+ }
+}
diff --git a/sdnr/wt/devicemanager-onap/onf14/provider/src/main/yang/tdm-container-2-0.yang b/sdnr/wt/devicemanager-onap/onf14/provider/src/main/yang/tdm-container-2-0.yang new file mode 100644 index 000000000..efe06378d --- /dev/null +++ b/sdnr/wt/devicemanager-onap/onf14/provider/src/main/yang/tdm-container-2-0.yang @@ -0,0 +1,899 @@ +module tdm-container-2-0 {
+ yang-version 1.1;
+ namespace "urn:onf:yang:tdm-container-2-0";
+ prefix tdm-container;
+
+ import ietf-yang-types {
+ prefix yang;
+ }
+ import core-model-1-4 {
+ prefix core-model;
+ }
+
+ organization
+ "openBackhaul.com proposal to Open Networking Foundation (ONF)";
+ contact
+ "WG Web : https://github.com/openBackhaul/Overview
+ WG List: TdmContainer@openBackhaul.com
+ Editor : Thorsten Heinze
+ Email : Thorsten.Heinze@openBackhaul.com";
+ description
+ "This model is a technology specific amendment to the LayerProtocol class of the ONF Core IM for managing TDM interfaces (e.g. E1, STM-1).
+
+ Copyright 2019 openBackhaul.com
+
+ Licensed under the Apache License, Version 2.0 (the 'License');
+ you may not use this file except in compliance with the License.
+ You may obtain a copy of the License at
+ http://www.apache.org/licenses/LICENSE-2.0
+ Unless required by applicable law or agreed to in writing, software
+ distributed under the License is distributed on an 'AS IS' BASIS,
+ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ See the License for the specific language governing permissions and
+ limitations under the License.";
+
+ revision 2020-01-23 {
+ description
+ "Model for the Transport SDN Pilot at Telefonica Germany.
+ Please view https://github.com/openBackhaul/tdmContainer/issues for changes.";
+ reference
+ "https://github.com/openBackhaul/tdmContainer/tree/tsp: Model definition
+ https://github.com/openBackhaul/onfCoreIm/tree/tsp: ONF TR-512 Core IM incl. Profile and enhanced Equipment definition";
+ }
+ revision 2019-11-23 {
+ description
+ "Model for the Transport SDN Pilot at Telefonica Germany.
+ Please view https://github.com/openBackhaul/tdmContainer/issues for changes.";
+ reference
+ "https://github.com/openBackhaul/tdmContainer/tree/tsp: Model definition
+ https://github.com/openBackhaul/onfCoreIm/tree/tsp: ONF TR-512 Core IM incl. Profile and enhanced Equipment definition";
+ }
+ revision 2019-07-05 {
+ description
+ "Model for the Transport SDN Pilot at Telefonica Germany.
+ Please view https://github.com/openBackhaul/tdmContainer/issues for changes.";
+ reference
+ "https://github.com/openBackhaul/tdmContainer/tree/tsp: Model definition
+ https://github.com/openBackhaul/onfCoreIm/tree/tsp: ONF TR-512 Core IM incl. Profile and enhanced Equipment definition";
+ }
+
+ identity LAYER_PROTOCOL_NAME_TYPE_TDM_CONTAINER_LAYER {
+ base core-model:LAYER_PROTOCOL_NAME_TYPE;
+ description
+ "none";
+ }
+
+ augment "/core-model:control-construct/core-model:logical-termination-point/core-model:layer-protocol" {
+ when "derived-from-or-self(./core-model:layer-protocol-name, 'tdm-container:LAYER_PROTOCOL_NAME_TYPE_TDM_CONTAINER_LAYER')";
+ uses tdm-container-lp-spec;
+ description
+ "none";
+ }
+
+ /****************************************
+ * package notifications
+ **************************************/
+
+ notification object-creation-notification {
+ uses object-creation-notification;
+ description
+ "none";
+ }
+
+ grouping object-creation-notification {
+ leaf counter {
+ type int64;
+ default "-1";
+ config false;
+ description
+ "Counts object creation notifications.";
+ }
+ leaf timestamp {
+ type yang:date-and-time;
+ default "2010-11-20T14:00:00+01:00";
+ config false;
+ description
+ "none";
+ }
+ leaf object-id-ref {
+ type leafref {
+ path "/core-model:control-construct/core-model:logical-termination-point/core-model:uuid";
+ require-instance false;
+ }
+ config false;
+ description
+ "none";
+ }
+ leaf object-type {
+ type string;
+ default "Type of created object not specified.";
+ config false;
+ description
+ "none";
+ }
+ description
+ "none";
+ }
+
+ notification object-deletion-notification {
+ uses object-deletion-notification;
+ description
+ "none";
+ }
+
+ grouping object-deletion-notification {
+ leaf counter {
+ type int64;
+ default "-1";
+ config false;
+ description
+ "Counts object deletion notifications.";
+ }
+ leaf timestamp {
+ type yang:date-and-time;
+ default "2010-11-20T14:00:00+01:00";
+ config false;
+ description
+ "none";
+ }
+ leaf object-id-ref {
+ type leafref {
+ path "/core-model:control-construct/core-model:logical-termination-point/core-model:uuid";
+ require-instance false;
+ }
+ config false;
+ description
+ "none";
+ }
+ description
+ "none";
+ }
+
+ notification attribute-value-changed-notification {
+ uses attribute-value-changed-notification;
+ description
+ "none";
+ }
+
+ grouping attribute-value-changed-notification {
+ leaf counter {
+ type int64;
+ default "-1";
+ config false;
+ description
+ "Counts attribute value changed notifications.";
+ }
+ leaf timestamp {
+ type yang:date-and-time;
+ default "2010-11-20T14:00:00+01:00";
+ config false;
+ description
+ "none";
+ }
+ leaf object-id-ref {
+ type leafref {
+ path "/core-model:control-construct/core-model:logical-termination-point/core-model:uuid";
+ require-instance false;
+ }
+ config false;
+ description
+ "none";
+ }
+ leaf attribute-name {
+ type string;
+ default "Attribute name not specified.";
+ config false;
+ description
+ "Name of the attribute that has been changed.";
+ }
+ leaf new-value {
+ type string;
+ default "New value not specified.";
+ config false;
+ description
+ "Attribute value converted to a string (xml, json, ...)";
+ }
+ description
+ "none";
+ }
+
+ notification problem-notification {
+ uses problem-notification;
+ description
+ "none";
+ }
+
+ grouping problem-notification {
+ leaf counter {
+ type int64;
+ default "-1";
+ config false;
+ description
+ "Counts problem notifications";
+ }
+ leaf timestamp {
+ type yang:date-and-time;
+ default "2010-11-20T14:00:00+01:00";
+ config false;
+ description
+ "none";
+ }
+ leaf object-id-ref {
+ type leafref {
+ path "/core-model:control-construct/core-model:logical-termination-point/core-model:uuid";
+ require-instance false;
+ }
+ config false;
+ description
+ "none";
+ }
+ leaf problem {
+ type string;
+ default "Problem name not specified.";
+ config false;
+ description
+ "Name of the problem according to supportedAlarmList";
+ }
+ leaf severity {
+ type severity-type;
+ default "SEVERITY_TYPE_WARNING";
+ config false;
+ description
+ "Severity of the problem according to problemKindSeverity";
+ }
+ description
+ "none";
+ }
+
+ /****************************************
+ * grouping statements for object classes
+ **************************************/
+ /****************************************
+ * package super-classes
+ **************************************/
+
+ grouping current-problem {
+ leaf sequence-number {
+ type int16;
+ config false;
+ description
+ "Unique sequence number of the current problem object.";
+ }
+ leaf timestamp {
+ type yang:date-and-time;
+ default "2010-11-20T14:00:00+01:00";
+ config false;
+ description
+ "Time when the alarm was raised.";
+ }
+ leaf problem-severity {
+ type severity-type;
+ default "SEVERITY_TYPE_NOT_YET_DEFINED";
+ config false;
+ description
+ "Severity of the alarm.";
+ }
+ description
+ "none";
+ }
+
+ grouping current-performance {
+ leaf timestamp {
+ type yang:date-and-time;
+ default "2010-11-20T14:00:00+01:00";
+ config false;
+ description
+ "The timestamp associated with when the current data was collected.";
+ }
+ leaf suspect-interval-flag {
+ type boolean;
+ default "false";
+ config false;
+ description
+ "This attribute is used to indicate that the performance data for the current period may not be reliable. Some reasons for this to occur are:
+ – Suspect data were detected by the actual resource doing data collection.
+ – Transition of the administrativeState attribute to/from the 'lock' state.
+ – Transition of the operationalState to/from the 'disabled' state.
+ – Scheduler setting that inhibits the collection function.
+ – The performance counters were reset during the interval.
+ – The currentData (or subclass) object instance was created during the monitoring period.";
+ }
+ leaf elapsed-time {
+ type int64;
+ units "s";
+ default "-1";
+ config false;
+ description
+ "Number of seconds that elapsed since the last reset of the counter.";
+ }
+ leaf scanner-id {
+ type string;
+ default "Scanner ID not defined.";
+ config false;
+ description
+ "none";
+ }
+ leaf granularity-period {
+ type granularity-period-type;
+ config false;
+ description
+ "Time period between reset of the underlying counter.";
+ }
+ description
+ "none";
+ }
+
+ grouping historical-performance {
+ leaf suspect-interval-flag {
+ type boolean;
+ default "false";
+ config false;
+ description
+ "This attribute indicates that the data collected during the interval is suspect.";
+ }
+ leaf history-data-id {
+ type string;
+ default "History Data ID not defined.";
+ config false;
+ description
+ "none";
+ }
+ leaf granularity-period {
+ type granularity-period-type;
+ config false;
+ description
+ "Time period between reset of the underlying counter.";
+ }
+ leaf period-end-time {
+ type yang:date-and-time;
+ config false;
+ description
+ "Time when the counter values have been recorded and the counter reset.";
+ }
+ description
+ "none";
+ }
+
+ grouping tdm-container-lp-spec {
+ container tdm-container-pac {
+ uses tdm-container-pac;
+ description
+ "none";
+ }
+ description
+ "The TdmContainerLpSpec and its attached classes MUST be provided on management interfaces of microwave devices, which are transporting TDM traffic.";
+ }
+
+ grouping tdm-container-pac {
+ container tdm-container-capability {
+ config false;
+ uses tdm-container-capability;
+ description
+ "none";
+ }
+ container tdm-container-configuration {
+ uses tdm-container-configuration;
+ description
+ "none";
+ }
+ container tdm-container-status {
+ config false;
+ uses tdm-container-status;
+ description
+ "none";
+ }
+ container tdm-container-current-problems {
+ config false;
+ uses tdm-container-current-problems;
+ description
+ "none";
+ }
+ container tdm-container-current-performance {
+ config false;
+ uses tdm-container-current-performance;
+ description
+ "none";
+ }
+ container tdm-container-historical-performances {
+ config false;
+ uses tdm-container-historical-performances;
+ description
+ "none";
+ }
+ description
+ "none";
+ }
+
+ grouping tdm-container-capability {
+ list supported-tdm-container-kind-list {
+ key "tdm-container-name";
+ config false;
+ min-elements 1;
+ uses tdm-container-kind;
+ description
+ "Lists the TDM containers that are supported.";
+ }
+ leaf admin-shut-down-is-avail {
+ type boolean;
+ default "false";
+ config false;
+ description
+ "1 = Manual switching on and off of the interface without deleting it (underlying OSI network layers are also not affected) is available.";
+ }
+ leaf-list supported-loop-back-kind-list {
+ type loop-back-type;
+ config false;
+ min-elements 1;
+ max-elements 3;
+ description
+ "List of supported kinds of looping back.";
+ }
+ leaf maintenance-timer-range {
+ type string;
+ default "Range of the maintenance timer not yet defined.";
+ config false;
+ description
+ "Available time periods for maintenance configurations to be described. Concrete values shall be separated by commas (e.g. '10, 60, 360'). Ranges shall be expressed as two values separated by a minus (e.g. '10-360').";
+ }
+ leaf-list supported-alarm-list {
+ type string;
+ config false;
+ min-elements 2;
+ description
+ "Available alarms to be listed. Mandatory:'framingIsFaulty' and 'containerIsDown'. Further alarms might be added by the vendor.";
+ }
+ leaf performance-monitoring-is-avail {
+ type boolean;
+ default "false";
+ config false;
+ description
+ "1 = Collection and aggregation of performance values is available.";
+ }
+ description
+ "none";
+ }
+
+ grouping tdm-container-configuration {
+ leaf interface-name {
+ type string;
+ default "Interface name not yet defined.";
+ description
+ "Description of the interface, could be a name, could be a number. Free text field to be filled by the operator.";
+ }
+ leaf interface-is-on {
+ type boolean;
+ default "false";
+ description
+ "Only relevant if (adminShutDownIsAvail==1). 1 = Activation of the interface. 0 = De-activation of the interface without deleting it (underlying OSI network layers are not affected).";
+ }
+ leaf tdm-container-kind {
+ type leafref {
+ path "/core-model:control-construct/core-model:logical-termination-point/core-model:layer-protocol/tdm-container:tdm-container-pac/tdm-container:tdm-container-capability/tdm-container:supported-tdm-container-kind-list/tdm-container:tdm-container-name";
+ require-instance false;
+ }
+ must 'boolean(/core-model:control-construct/core-model:logical-termination-point/core-model:layer-protocol/tdm-container:tdm-container-pac/tdm-container:tdm-container-capability/tdm-container:supported-tdm-container-kind-list[tdm-container-name=current()])';
+ description
+ "Type of TDM container.";
+ }
+ leaf segment-number {
+ type int16;
+ default "-1";
+ description
+ "Serving TDM structure is identified by LogicalTerminationPoint::_serverLtpRefList (Multiplicity = 1; One segment per TDM container). Serving Segment is identified by segmentID attribute. Type of segment must match type of container.";
+ }
+ leaf loop-back-kind-on {
+ type loop-back-type;
+ default "LOOP_BACK_TYPE_NOT_YET_DEFINED";
+ description
+ "Maintenance Feature. Configuration of a loop back of TDM time slots on this interface.";
+ }
+ leaf maintenance-timer {
+ type int32;
+ units "s";
+ default "-1";
+ description
+ "Time of existence of any maintenance configuration. 0 = maintenance timer is switched off. Valid values are defined in *Capability::maintenanceTimerRange.";
+ }
+ list problem-kind-severity-list {
+ key "problem-kind-name";
+ min-elements 2;
+ uses problem-kind-severity-type;
+ description
+ "Severity of the problem to be configured.";
+ }
+ leaf performance-monitoring-is-on {
+ type boolean;
+ default "false";
+ description
+ "Enables measurement, collection, storage and access to performance data.";
+ }
+ description
+ "none";
+ }
+
+ grouping tdm-container-status {
+ leaf interface-status {
+ type interface-status-type;
+ default "INTERFACE_STATUS_TYPE_NOT_YET_DEFINED";
+ config false;
+ description
+ "Operational status of the interface.";
+ }
+ leaf loop-back-kind-up {
+ type loop-back-type;
+ default "LOOP_BACK_TYPE_NOT_YET_DEFINED";
+ config false;
+ description
+ "The currently active (not just configured) type of loop back.";
+ }
+ leaf statistics-is-up {
+ type boolean;
+ default "false";
+ config false;
+ description
+ "1 = Statistics are currently collected and aggregated.";
+ }
+ leaf performance-monitoring-is-up {
+ type boolean;
+ default "false";
+ config false;
+ description
+ "1 = Performance values are currently collected and aggregated.";
+ }
+ description
+ "none";
+ }
+
+ grouping tdm-container-current-problems {
+ list current-problem-list {
+ key "sequence-number";
+ config false;
+ uses container-current-problem-type;
+ description
+ "none";
+ }
+ leaf number-of-current-problems {
+ type int8;
+ default "-1";
+ config false;
+ description
+ "Number of alarms, which are currently active on this interface.";
+ }
+ leaf time-of-latest-change {
+ type yang:date-and-time;
+ default "2010-11-20T14:00:00+01:00";
+ config false;
+ description
+ "Date and time when the list of alarms has been changed for the last time.";
+ }
+ description
+ "none";
+ }
+
+ grouping tdm-container-current-performance {
+ list current-performance-data-list {
+ key "granularity-period";
+ config false;
+ min-elements 1;
+ max-elements 2;
+ uses container-current-performance-type;
+ description
+ "At least values of the counters, which are reset every 15 minutes, are to be provided. If available, the current values of the counters, which are reset every 24 hour, can be provided, too.";
+ }
+ leaf number-of-current-performance-sets {
+ type int8;
+ default "-1";
+ config false;
+ description
+ "Number of sets of current performance values, which are provided in the list.";
+ }
+ description
+ "Aggregated performance information of the TDM container at a particular moment.";
+ }
+
+ grouping tdm-container-historical-performances {
+ list historical-performance-data-list {
+ key "granularity-period period-end-time";
+ config false;
+ uses container-historical-performance-type;
+ description
+ "none";
+ }
+ leaf number-of-historical-performance-sets {
+ type int16;
+ default "-1";
+ config false;
+ description
+ "Number of sets of historical performance values, which are provided in the list.";
+ }
+ leaf time-of-latest-change {
+ type yang:date-and-time;
+ default "2010-11-20T14:00:00+01:00";
+ config false;
+ description
+ "Date and time when the list of sets of historical performance values has been changed for the last time (e.g. new one added or existing one deleted).";
+ }
+ description
+ "Aggregated performance information of the TDM container for a pre-defined measurement interval.";
+ }
+
+ grouping tdm-container-kind {
+ leaf tdm-container-name {
+ type string;
+ config false;
+ description
+ "Names to be chosen from the following list: 'e1','t1','j1','e3','t3','stm1','cpri1','cpri2','cpri3','cpri4','cpri5','cpri6' or 'cpri7'";
+ }
+ leaf tdm-container-size {
+ type int32;
+ units "kbit/s";
+ default "-1";
+ config false;
+ description
+ "Capacity required for transporting this type of container (in kbit/s). Values to be chosen from the following list: '2048','1544','34000','44736 ','155520','614400','1228800','2457600','3072000','4915200','6144000' or '9830400;";
+ }
+ description
+ "none";
+ }
+
+ /****************************************
+ * typedef statements
+ **************************************/
+
+ typedef loop-back-type {
+ type identityref {
+ base LOOP_BACK_TYPE;
+ }
+ description
+ "none";
+ }
+
+ typedef container-performance-type {
+ type string;
+ description
+ "none";
+ }
+
+ /*********************************************
+ * grouping statements for complex data types
+ *******************************************/
+
+ identity LOOP_BACK_TYPE {
+ description
+ "none";
+ }
+
+ identity LOOP_BACK_TYPE_NONE {
+ base LOOP_BACK_TYPE;
+ description
+ "none";
+ }
+
+ identity LOOP_BACK_TYPE_BACK_TO_LOCAL {
+ base LOOP_BACK_TYPE;
+ description
+ "Returning the TDM time slots of the local site on the outgoing interface back to the local site.";
+ }
+
+ identity LOOP_BACK_TYPE_BACK_TO_REMOTE {
+ base LOOP_BACK_TYPE;
+ description
+ "Returning the incoming TDM time slots back to the remote site.";
+ }
+
+ identity LOOP_BACK_TYPE_NOT_YET_DEFINED {
+ base LOOP_BACK_TYPE;
+ description
+ "none";
+ }
+
+ identity GRANULARITY_PERIOD_TYPE {
+ description
+ "none";
+ }
+
+ identity GRANULARITY_PERIOD_TYPE_UNKNOWN {
+ base GRANULARITY_PERIOD_TYPE;
+ description
+ "none";
+ }
+
+ identity GRANULARITY_PERIOD_TYPE_PERIOD-15-MIN {
+ base GRANULARITY_PERIOD_TYPE;
+ description
+ "none";
+ }
+
+ identity GRANULARITY_PERIOD_TYPE_PERIOD-24-HOURS {
+ base GRANULARITY_PERIOD_TYPE;
+ description
+ "none";
+ }
+
+ identity GRANULARITY_PERIOD_TYPE_NOT_YET_DEFINED {
+ base GRANULARITY_PERIOD_TYPE;
+ description
+ "none";
+ }
+
+ identity SEVERITY_TYPE {
+ description
+ "none";
+ }
+
+ identity SEVERITY_TYPE_NON_ALARMED {
+ base SEVERITY_TYPE;
+ description
+ "none";
+ }
+
+ identity SEVERITY_TYPE_WARNING {
+ base SEVERITY_TYPE;
+ description
+ "none";
+ }
+
+ identity SEVERITY_TYPE_MINOR {
+ base SEVERITY_TYPE;
+ description
+ "none";
+ }
+
+ identity SEVERITY_TYPE_MAJOR {
+ base SEVERITY_TYPE;
+ description
+ "none";
+ }
+
+ identity SEVERITY_TYPE_CRITICAL {
+ base SEVERITY_TYPE;
+ description
+ "none";
+ }
+
+ identity SEVERITY_TYPE_NOT_YET_DEFINED {
+ base SEVERITY_TYPE;
+ description
+ "none";
+ }
+
+ identity INTERFACE_STATUS_TYPE {
+ description
+ "none";
+ }
+
+ identity INTERFACE_STATUS_TYPE_UP {
+ base INTERFACE_STATUS_TYPE;
+ description
+ "Ready to pass packets.";
+ }
+
+ identity INTERFACE_STATUS_TYPE_DOWN {
+ base INTERFACE_STATUS_TYPE;
+ description
+ "The interface does not pass any packets.";
+ }
+
+ identity INTERFACE_STATUS_TYPE_TESTING {
+ base INTERFACE_STATUS_TYPE;
+ description
+ "In some test mode. No operational packets can be passed.";
+ }
+
+ identity INTERFACE_STATUS_TYPE_UNKNOWN {
+ base INTERFACE_STATUS_TYPE;
+ description
+ "Status cannot be determined for some reason.";
+ }
+
+ identity INTERFACE_STATUS_TYPE_DORMANT {
+ base INTERFACE_STATUS_TYPE;
+ description
+ "Waiting for some external event.";
+ }
+
+ identity INTERFACE_STATUS_TYPE_NOT_PRESENT {
+ base INTERFACE_STATUS_TYPE;
+ description
+ "Some component (typically hardware) is missing.";
+ }
+
+ identity INTERFACE_STATUS_TYPE_LOWER_LAYER_DOWN {
+ base INTERFACE_STATUS_TYPE;
+ description
+ "Down due to state of lower-layer interface(s).";
+ }
+
+ identity INTERFACE_STATUS_TYPE_ADMIN_DOWN {
+ base INTERFACE_STATUS_TYPE;
+ description
+ "Down due to configuration.";
+ }
+
+ identity INTERFACE_STATUS_TYPE_NOT_YET_DEFINED {
+ base INTERFACE_STATUS_TYPE;
+ description
+ "none";
+ }
+
+ /****************************************
+ * package super-types
+ **************************************/
+
+ typedef granularity-period-type {
+ type identityref {
+ base GRANULARITY_PERIOD_TYPE;
+ }
+ description
+ "The enumeration with the options for granularity period of the performance data.";
+ }
+
+ typedef severity-type {
+ type identityref {
+ base SEVERITY_TYPE;
+ }
+ description
+ "According to ITU-T M.3160";
+ }
+
+ typedef interface-status-type {
+ type identityref {
+ base INTERFACE_STATUS_TYPE;
+ }
+ description
+ "Current Interface Status";
+ }
+
+ grouping problem-kind-severity-type {
+ leaf problem-kind-name {
+ type string;
+ description
+ "Name of the alarm according to supportedAlarmList";
+ }
+ leaf problem-kind-severity {
+ type severity-type;
+ default "SEVERITY_TYPE_NOT_YET_DEFINED";
+ description
+ "Severity of this type of alarm.";
+ }
+ description
+ "none";
+ }
+
+ grouping container-current-problem-type {
+ leaf problem-name {
+ type string;
+ default "Problem name not specified.";
+ config false;
+ description
+ "Name of the alarm according to Container::ContainerCapability::supportedAlarms";
+ }
+ uses current-problem;
+ description
+ "none";
+ }
+
+ grouping container-current-performance-type {
+ leaf performance-data {
+ type container-performance-type;
+ config false;
+ description
+ "none";
+ }
+ uses current-performance;
+ description
+ "Turns performance information into current performance information by inheriting from OTN_CurrentData.";
+ }
+
+ grouping container-historical-performance-type {
+ leaf performance-data {
+ type container-performance-type;
+ config false;
+ description
+ "none";
+ }
+ uses historical-performance;
+ description
+ "Turns performance information into historical performance information by inheriting from OTN_HistoryData.";
+ }
+}
diff --git a/sdnr/wt/devicemanager-onap/onf14/provider/src/main/yang/vlan-fc-1-0.yang b/sdnr/wt/devicemanager-onap/onf14/provider/src/main/yang/vlan-fc-1-0.yang new file mode 100644 index 000000000..5b6cf7b31 --- /dev/null +++ b/sdnr/wt/devicemanager-onap/onf14/provider/src/main/yang/vlan-fc-1-0.yang @@ -0,0 +1,523 @@ +module vlan-fc-1-0 {
+ yang-version 1.1;
+ namespace "urn:onf:yang:vlan-fc-1-0";
+ prefix vlan-fc;
+
+ import ietf-yang-types {
+ prefix yang;
+ }
+ import core-model-1-4 {
+ prefix core-model;
+ }
+
+ organization
+ "openBackhaul.com proposal to Open Networking Foundation (ONF)";
+ contact
+ "WG Web : https://github.com/openBackhaul/Overview
+ WG List: VlanFc@openBackhaul.com
+ Editor : Thorsten Heinze
+ Email : Thorsten.Heinze@openBackhaul.com";
+ description
+ "Technology specific Forwarding Construct for VLANs according to IEEE 802.1Q-2018.
+
+ Copyright 2019 openBackhaul.com
+
+ Licensed under the Apache License, Version 2.0 (the 'License');
+ you may not use this file except in compliance with the License.
+ You may obtain a copy of the License at
+ http://www.apache.org/licenses/LICENSE-2.0
+ Unless required by applicable law or agreed to in writing, software
+ distributed under the License is distributed on an 'AS IS' BASIS,
+ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ See the License for the specific language governing permissions and
+ limitations under the License.";
+
+ revision 2020-08-26 {
+ description
+ "Model for the Transport SDN Pilot at Telefonica Germany
+ Please view https://github.com/openBackhaul/vlanFc/issues for changes.";
+ reference
+ "https://github.com/openBackhaul/vlanFc/tree/tsp: Model definition
+ https://github.com/openBackhaul/onfCoreIm/tree/tsp: ONF TR-512 Core IM incl. Profile and enhanced Equipment definition";
+ }
+ revision 2019-08-19 {
+ description
+ "Model for the Transport SDN Pilot at Telefonica Germany.
+ Please view https://github.com/openBackhaul/vlanFd/issues for changes.";
+ reference
+ "https://github.com/openBackhaul/vlanFc/tree/tsp: Model definition
+ https://github.com/openBackhaul/onfCoreIm/tree/tsp: ONF TR-512 Core IM incl. Profile and enhanced Equipment definition";
+ }
+
+ identity LAYER_PROTOCOL_NAME_TYPE_VLAN_LAYER {
+ base core-model:LAYER_PROTOCOL_NAME_TYPE;
+ description
+ "none";
+ }
+
+ augment "/core-model:control-construct/core-model:forwarding-domain/core-model:fc" {
+ when "derived-from-or-self(./core-model:layer-protocol-name, 'vlan-fc:LAYER_PROTOCOL_NAME_TYPE_VLAN_LAYER')";
+ uses vlan-fc-spec;
+ description
+ "none";
+ }
+
+ /****************************************
+ * package notifications
+ **************************************/
+
+ notification object-creation-notification {
+ uses object-creation-notification;
+ description
+ "none";
+ }
+
+ grouping object-creation-notification {
+ leaf counter {
+ type int32;
+ default "-1";
+ config false;
+ description
+ "Counts object creation notifications.";
+ }
+ leaf timestamp {
+ type yang:date-and-time;
+ default "2010-11-20T14:00:00+01:00";
+ config false;
+ description
+ "none";
+ }
+ leaf object-id-ref {
+ type leafref {
+ path "/core-model:control-construct/core-model:forwarding-domain/core-model:fc/core-model:uuid";
+ require-instance false;
+ }
+ config false;
+ description
+ "none";
+ }
+ leaf object-type {
+ type string;
+ default "Type of created object not specified.";
+ config false;
+ description
+ "none";
+ }
+ description
+ "none";
+ }
+
+ notification object-deletion-notification {
+ uses object-deletion-notification;
+ description
+ "none";
+ }
+
+ grouping object-deletion-notification {
+ leaf counter {
+ type int32;
+ default "-1";
+ config false;
+ description
+ "Counts object deletion notifications.";
+ }
+ leaf timestamp {
+ type yang:date-and-time;
+ default "2010-11-20T14:00:00+01:00";
+ config false;
+ description
+ "none";
+ }
+ leaf object-id-ref {
+ type leafref {
+ path "/core-model:control-construct/core-model:forwarding-domain/core-model:fc/core-model:uuid";
+ require-instance false;
+ }
+ config false;
+ description
+ "none";
+ }
+ description
+ "none";
+ }
+
+ notification attribute-value-changed-notification {
+ uses attribute-value-changed-notification;
+ description
+ "none";
+ }
+
+ grouping attribute-value-changed-notification {
+ leaf counter {
+ type int32;
+ default "-1";
+ config false;
+ description
+ "Counts attribute value changed notifications.";
+ }
+ leaf timestamp {
+ type yang:date-and-time;
+ default "2010-11-20T14:00:00+01:00";
+ config false;
+ description
+ "none";
+ }
+ leaf object-id-ref {
+ type leafref {
+ path "/core-model:control-construct/core-model:forwarding-domain/core-model:fc/core-model:uuid";
+ require-instance false;
+ }
+ config false;
+ description
+ "none";
+ }
+ leaf attribute-name {
+ type string;
+ default "Attribute name not specified.";
+ config false;
+ description
+ "Name of the attribute that has been changed.";
+ }
+ leaf new-value {
+ type string;
+ default "New value not specified.";
+ config false;
+ description
+ "Attribute value converted to a string (xml, json, ...)";
+ }
+ description
+ "To be sent when an attribute has changed and one or more controllers have to update their data.";
+ }
+
+ notification problem-notification {
+ uses problem-notification;
+ description
+ "none";
+ }
+
+ grouping problem-notification {
+ leaf counter {
+ type int32;
+ default "-1";
+ config false;
+ description
+ "Counts problem notifications";
+ }
+ leaf timestamp {
+ type yang:date-and-time;
+ default "2010-11-20T14:00:00+01:00";
+ config false;
+ description
+ "none";
+ }
+ leaf object-id-ref {
+ type leafref {
+ path "/core-model:control-construct/core-model:forwarding-domain/core-model:fc/core-model:uuid";
+ require-instance false;
+ }
+ config false;
+ description
+ "none";
+ }
+ leaf problem {
+ type string;
+ default "Problem name not specified.";
+ config false;
+ description
+ "Name of the problem according to *Capability::supportedAlarmList";
+ }
+ leaf severity {
+ type severity-type;
+ default "SEVERITY_TYPE_WARNING";
+ config false;
+ description
+ "Severity of the problem according to VlanFc::VlanFcConfiguration::problemSeverityList";
+ }
+ description
+ "none";
+ }
+
+ /****************************************
+ * grouping statements for object classes
+ **************************************/
+ /****************************************
+ * package super-classes
+ **************************************/
+
+ grouping current-problem {
+ leaf sequence-number {
+ type int16;
+ config false;
+ description
+ "Unique sequence number of the current problem object.";
+ }
+ leaf timestamp {
+ type yang:date-and-time;
+ default "2010-11-20T14:00:00+01:00";
+ config false;
+ description
+ "none";
+ }
+ leaf problem-severity {
+ type severity-type;
+ default "SEVERITY_TYPE_NOT_YET_DEFINED";
+ config false;
+ description
+ "Severity of the alarm.";
+ }
+ description
+ "none";
+ }
+
+ grouping vlan-fc-spec {
+ container vlan-fc-pac {
+ uses vlan-fc-pac;
+ description
+ "none";
+ }
+ description
+ "Represents the VLAN, which is configured on the C-VLAN or S-VLAN Component. Name in ieee802-dot1q-bridge.yang: vlan.";
+ }
+
+ grouping vlan-fc-pac {
+ container vlan-fc-capability {
+ config false;
+ uses vlan-fc-capability;
+ description
+ "none";
+ }
+ container vlan-fc-configuration {
+ uses vlan-fc-configuration;
+ description
+ "none";
+ }
+ container vlan-fc-current-problems {
+ config false;
+ uses vlan-fc-current-problems;
+ description
+ "none";
+ }
+ description
+ "none";
+ }
+
+ grouping vlan-fc-capability {
+ leaf-list supported-sub-layer-protocol-name-list {
+ type sub-layer-protocol-name-type;
+ default "SUB_LAYER_PROTOCOL_NAME_TYPE_NOT_YET_DEFINED";
+ config false;
+ description
+ "Lists the supported kinds of Components (implicitly defines the Ethertypes of the VLAN headers, which can be forwarded).";
+ }
+ leaf admin-shut-down-is-avail {
+ type boolean;
+ default "false";
+ config false;
+ description
+ "true = Manual switching on and off of the forwarding construct without deleting it (underlying OSI network layers are also not affected) is available.";
+ }
+ leaf-list supported-alarm-list {
+ type string;
+ default "Supported Alarms not yet defined.";
+ config false;
+ description
+ "Available alarms to be listed.";
+ }
+ description
+ "none";
+ }
+
+ grouping vlan-fc-configuration {
+ leaf fc-name {
+ type string;
+ default "Interface name not yet defined.";
+ description
+ "Description of the VLAN, could be a name, could be a number. Free text of up to 32 letters to be filled by the operator. Name in ieee802-dot1q-bridge.yang: name.";
+ }
+ leaf fc-is-on {
+ type boolean;
+ default "false";
+ description
+ "Only effective if (adminShutDownIsAvail==true). true = Activation of the forwarding of frames with this VLAN ID. false = De-activation of the ForwardingConstruct without deleting it (underlying OSI network layers are not affected).";
+ }
+ leaf sub-layer-protocol-name {
+ type sub-layer-protocol-name-type;
+ default "SUB_LAYER_PROTOCOL_NAME_TYPE_NOT_YET_DEFINED";
+ description
+ "Type of VLAN (e.g. C-VLAN, S-VLAN), respectively Ethertype, which is forwarded.";
+ }
+ leaf vlan-id {
+ type int64;
+ default "-1";
+ description
+ "The VLAN ID, which identifies the frames to be forwarded. Range '1..4094 | 4096..4294967295'. Name in ieee802-dot1q-bridge.yang: vid.";
+ }
+ list problem-kind-severity-list {
+ key "problem-kind-name";
+ uses problem-kind-severity-type;
+ description
+ "Severity of the problem to be configured.";
+ }
+ description
+ "none";
+ }
+
+ grouping vlan-fc-current-problems {
+ list current-problem-list {
+ key "sequence-number";
+ config false;
+ uses vlan-fc-current-problem-type;
+ description
+ "none";
+ }
+ leaf number-of-current-problems {
+ type int8;
+ default "-1";
+ config false;
+ description
+ "Number of alarms, which are currently active on this interface.";
+ }
+ leaf time-of-latest-change {
+ type yang:date-and-time;
+ default "2010-11-20T14:00:00+01:00";
+ config false;
+ description
+ "Date and time when the list of alarms has been changed for the last time.";
+ }
+ description
+ "none";
+ }
+
+ /****************************************
+ * typedef statements
+ **************************************/
+
+ typedef sub-layer-protocol-name-type {
+ type identityref {
+ base SUB_LAYER_PROTOCOL_NAME_TYPE;
+ }
+ description
+ "Represents the type of Component. Name in ieee802-dot1q-bridge.yang: type-of-component.";
+ }
+
+ /*********************************************
+ * grouping statements for complex data types
+ *******************************************/
+
+ identity SUB_LAYER_PROTOCOL_NAME_TYPE {
+ description
+ "none";
+ }
+
+ identity SUB_LAYER_PROTOCOL_NAME_TYPE_C_VLAN_COMPONENT {
+ base SUB_LAYER_PROTOCOL_NAME_TYPE;
+ description
+ "Base identity for a C-VLAN component. Name in ieee802-dot1q-bridge.yang: c-vlan-component.";
+ }
+
+ identity SUB_LAYER_PROTOCOL_NAME_TYPE_S_VLAN_COMPONENT {
+ base SUB_LAYER_PROTOCOL_NAME_TYPE;
+ description
+ "Base identity for a S-VLAN component. Name in ieee802-dot1q-bridge.yang: s-vlan-component.";
+ }
+
+ identity SUB_LAYER_PROTOCOL_NAME_TYPE_D_BRIDGE_COMPONENT {
+ base SUB_LAYER_PROTOCOL_NAME_TYPE;
+ description
+ "Base identity for a VLAN unaware component. Name in ieee802-dot1q-bridge.yang: d-bridge-component.";
+ }
+
+ identity SUB_LAYER_PROTOCOL_NAME_TYPE_EDGE_RELAY_COMPONENT {
+ base SUB_LAYER_PROTOCOL_NAME_TYPE;
+ description
+ "Base identity for an EVB station ER component. Name in ieee802-dot1q-bridge.yang: edge-relay-component. ";
+ }
+
+ identity SUB_LAYER_PROTOCOL_NAME_TYPE_NOT_YET_DEFINED {
+ base SUB_LAYER_PROTOCOL_NAME_TYPE;
+ description
+ "none";
+ }
+
+ identity SEVERITY_TYPE {
+ description
+ "none";
+ }
+
+ identity SEVERITY_TYPE_NON_ALARMED {
+ base SEVERITY_TYPE;
+ description
+ "none";
+ }
+
+ identity SEVERITY_TYPE_WARNING {
+ base SEVERITY_TYPE;
+ description
+ "none";
+ }
+
+ identity SEVERITY_TYPE_MINOR {
+ base SEVERITY_TYPE;
+ description
+ "none";
+ }
+
+ identity SEVERITY_TYPE_MAJOR {
+ base SEVERITY_TYPE;
+ description
+ "none";
+ }
+
+ identity SEVERITY_TYPE_CRITICAL {
+ base SEVERITY_TYPE;
+ description
+ "none";
+ }
+
+ identity SEVERITY_TYPE_NOT_YET_DEFINED {
+ base SEVERITY_TYPE;
+ description
+ "none";
+ }
+
+ /****************************************
+ * package super-types
+ **************************************/
+
+ typedef severity-type {
+ type identityref {
+ base SEVERITY_TYPE;
+ }
+ description
+ "According to ITU-T M.3160";
+ }
+
+ grouping problem-kind-severity-type {
+ leaf problem-kind-name {
+ type string;
+ description
+ "Name of the alarm according to supportedAlarmList";
+ }
+ leaf problem-kind-severity {
+ type severity-type;
+ default "SEVERITY_TYPE_NOT_YET_DEFINED";
+ description
+ "Severity of this type of alarm.";
+ }
+ description
+ "none";
+ }
+
+ grouping vlan-fc-current-problem-type {
+ leaf problem-name {
+ type string;
+ default "Problem name not specified.";
+ config false;
+ description
+ "Name of the alarm according to VlanFc::VlanFcCapability::supportedAlarmList.";
+ }
+ uses current-problem;
+ description
+ "none";
+ }
+}
diff --git a/sdnr/wt/devicemanager-onap/onf14/provider/src/main/yang/vlan-fd-1-0.yang b/sdnr/wt/devicemanager-onap/onf14/provider/src/main/yang/vlan-fd-1-0.yang new file mode 100644 index 000000000..b3d67eef9 --- /dev/null +++ b/sdnr/wt/devicemanager-onap/onf14/provider/src/main/yang/vlan-fd-1-0.yang @@ -0,0 +1,836 @@ +module vlan-fd-1-0 {
+ yang-version 1.1;
+ namespace "urn:onf:yang:vlan-fd-1-0";
+ prefix vlan-fd;
+
+ import ietf-yang-types {
+ prefix yang;
+ }
+ import core-model-1-4 {
+ prefix core-model;
+ }
+ import vlan-interface-1-0 {
+ prefix vlan-interface;
+ }
+
+ organization
+ "openBackhaul.com proposal to Open Networking Foundation (ONF)";
+ contact
+ "WG Web : https://github.com/openBackhaul/Overview
+ WG List: VlanFd@openBackhaul.com
+ Editor : Thorsten Heinze
+ Email : Thorsten.Heinze@openBackhaul.com";
+ description
+ "Technology specific Forwarding Domain for VLAN Components according to IEEE 802.1Q-2018.
+
+ Copyright 2019 openBackhaul.com
+
+ Licensed under the Apache License, Version 2.0 (the 'License');
+ you may not use this file except in compliance with the License.
+ You may obtain a copy of the License at
+ http://www.apache.org/licenses/LICENSE-2.0
+ Unless required by applicable law or agreed to in writing, software
+ distributed under the License is distributed on an 'AS IS' BASIS,
+ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ See the License for the specific language governing permissions and
+ limitations under the License.";
+
+ revision 2020-08-26 {
+ description
+ "Model for the Transport SDN Pilot at Telefonica Germany.
+ Please view https://github.com/openBackhaul/vlanFd/issues for changes.";
+ reference
+ "https://github.com/openBackhaul/vlanFd/tree/tsp: Model definition
+ https://github.com/openBackhaul/onfCoreIm/tree/tsp: ONF TR-512 Core IM incl. Profile and enhanced Equipment definition";
+ }
+ revision 2019-08-19 {
+ description
+ "Model for the Transport SDN Pilot at Telefonica Germany.
+ Please view https://github.com/openBackhaul/vlanFd/issues for changes.";
+ reference
+ "https://github.com/openBackhaul/vlanFd/tree/tsp: Model definition
+ https://github.com/openBackhaul/onfCoreIm/tree/tsp: ONF TR-512 Core IM incl. Profile and enhanced Equipment definition";
+ }
+
+ identity LAYER_PROTOCOL_NAME_TYPE_VLAN_LAYER {
+ base core-model:LAYER_PROTOCOL_NAME_TYPE;
+ description
+ "none";
+ }
+
+ augment "/core-model:control-construct/core-model:forwarding-domain" {
+ when "derived-from-or-self(./core-model:layer-protocol-name, 'vlan-interface:LAYER_PROTOCOL_NAME_TYPE_VLAN_LAYER')";
+ uses vlan-fd-spec;
+ description
+ "none";
+ }
+
+ /****************************************
+ * package notifications
+ **************************************/
+
+ notification object-creation-notification {
+ uses object-creation-notification;
+ description
+ "none";
+ }
+
+ grouping object-creation-notification {
+ leaf counter {
+ type int32;
+ default "-1";
+ config false;
+ description
+ "Counts object creation notifications.";
+ }
+ leaf timestamp {
+ type yang:date-and-time;
+ default "2010-11-20T14:00:00+01:00";
+ config false;
+ description
+ "none";
+ }
+ leaf object-id-ref {
+ type leafref {
+ path "/core-model:control-construct/core-model:forwarding-domain/core-model:uuid";
+ require-instance false;
+ }
+ config false;
+ description
+ "none";
+ }
+ leaf object-type {
+ type string;
+ default "Type of created object not specified.";
+ config false;
+ description
+ "none";
+ }
+ description
+ "none";
+ }
+
+ notification object-deletion-notification {
+ uses object-deletion-notification;
+ description
+ "none";
+ }
+
+ grouping object-deletion-notification {
+ leaf counter {
+ type int32;
+ default "-1";
+ config false;
+ description
+ "Counts object deletion notifications.";
+ }
+ leaf timestamp {
+ type yang:date-and-time;
+ default "2010-11-20T14:00:00+01:00";
+ config false;
+ description
+ "none";
+ }
+ leaf object-id-ref {
+ type leafref {
+ path "/core-model:control-construct/core-model:forwarding-domain/core-model:uuid";
+ require-instance false;
+ }
+ config false;
+ description
+ "none";
+ }
+ description
+ "none";
+ }
+
+ notification attribute-value-changed-notification {
+ uses attribute-value-changed-notification;
+ description
+ "none";
+ }
+
+ grouping attribute-value-changed-notification {
+ leaf counter {
+ type int32;
+ default "-1";
+ config false;
+ description
+ "Counts attribute value changed notifications.";
+ }
+ leaf timestamp {
+ type yang:date-and-time;
+ default "2010-11-20T14:00:00+01:00";
+ config false;
+ description
+ "none";
+ }
+ leaf object-id-ref {
+ type leafref {
+ path "/core-model:control-construct/core-model:forwarding-domain/core-model:uuid";
+ require-instance false;
+ }
+ config false;
+ description
+ "none";
+ }
+ leaf attribute-name {
+ type string;
+ default "Attribute name not specified.";
+ config false;
+ description
+ "Name of the attribute that has been changed.";
+ }
+ leaf new-value {
+ type string;
+ default "New value not specified.";
+ config false;
+ description
+ "Attribute value converted to a string (xml, json, ...)";
+ }
+ description
+ "To be sent when an attribute has changed and one or more controllers have to update their data.";
+ }
+
+ notification problem-notification {
+ uses problem-notification;
+ description
+ "none";
+ }
+
+ grouping problem-notification {
+ leaf counter {
+ type int32;
+ default "-1";
+ config false;
+ description
+ "Counts problem notifications";
+ }
+ leaf timestamp {
+ type yang:date-and-time;
+ default "2010-11-20T14:00:00+01:00";
+ config false;
+ description
+ "none";
+ }
+ leaf object-id-ref {
+ type leafref {
+ path "/core-model:control-construct/core-model:forwarding-domain/core-model:uuid";
+ require-instance false;
+ }
+ config false;
+ description
+ "none";
+ }
+ leaf problem {
+ type string;
+ default "Problem name not specified.";
+ config false;
+ description
+ "Name of the problem according to *Capability::supportedAlarmList";
+ }
+ leaf severity {
+ type severity-type;
+ default "SEVERITY_TYPE_WARNING";
+ config false;
+ description
+ "Severity of the problem according to *Configuration::problemSeverityList";
+ }
+ description
+ "none";
+ }
+
+ /****************************************
+ * grouping statements for object classes
+ **************************************/
+ /****************************************
+ * package super-classes
+ **************************************/
+
+ grouping current-problem {
+ leaf sequence-number {
+ type int16;
+ config false;
+ description
+ "Unique sequence number of the current problem object.";
+ }
+ leaf timestamp {
+ type yang:date-and-time;
+ default "2010-11-20T14:00:00+01:00";
+ config false;
+ description
+ "none";
+ }
+ leaf problem-severity {
+ type severity-type;
+ default "SEVERITY_TYPE_NOT_YET_DEFINED";
+ config false;
+ description
+ "Severity of the alarm.";
+ }
+ description
+ "none";
+ }
+
+ grouping vlan-fd-spec {
+ container vlan-fd-pac {
+ uses vlan-fd-pac;
+ description
+ "none";
+ }
+ description
+ "The set of components associated with a given Bridge. For example, - A TPMR is associated with a single VLAN unaware component. - A Customer VLAN Bridge is associated with a single VLAN aware component. - A Provider Bridge is associated with a single S-VLAN component and zero or more C-VLAN components. Name in ieee802-dot1q-bridge.yang: component.";
+ }
+
+ grouping vlan-fd-pac {
+ container vlan-fd-capability {
+ config false;
+ uses vlan-fd-capability;
+ description
+ "none";
+ }
+ container vlan-fd-configuration {
+ uses vlan-fd-configuration;
+ description
+ "none";
+ }
+ container vlan-fd-status {
+ config false;
+ uses vlan-fd-status;
+ description
+ "none";
+ }
+ container vlan-fd-current-problems {
+ config false;
+ uses vlan-fd-current-problems;
+ description
+ "none";
+ }
+ description
+ "none";
+ }
+
+ grouping vlan-fd-capability {
+ leaf-list supported-sub-layer-protocol-name-list {
+ type sub-layer-protocol-name-type;
+ default "SUB_LAYER_PROTOCOL_NAME_TYPE_NOT_YET_DEFINED";
+ config false;
+ description
+ "Lists the supported kinds of Components. ";
+ }
+ leaf component-id {
+ type int32;
+ config false;
+ description
+ "Unique identifier for a particular Bridge component within the system. Name in ieee802-dot1q-bridge.yang: id.";
+ }
+ leaf extended-filtering-is-avail {
+ type boolean;
+ default "false";
+ config false;
+ description
+ "true = Component can perform filtering on individual multicast addresses controlled by MMRP (Multiple MAC Registration Protocol). Name in ieee802-dot1q-bridge.yang: extended-filtering.";
+ }
+ leaf traffic-classes-is-avail {
+ type boolean;
+ default "false";
+ config false;
+ description
+ "true = Component can map the Priority values into multiple traffic classes (there is more than one traffic class at the device). Name in ieee802-dot1q-bridge.yang: traffic-classes.";
+ }
+ leaf static-entries-on-individual-ports-is-avail {
+ type boolean;
+ default "false";
+ config false;
+ description
+ "true = Static entries per port are available. Name in ieee802-dot1q-bridge.yang: static-entry-individual-port.";
+ }
+ leaf independent-vlan-learning-is-avail {
+ type boolean;
+ default "false";
+ config false;
+ description
+ "true = Component supports Independent VLAN Learning (IVL). Name in ieee802-dot1q-bridge.yang: ivl-capable.";
+ }
+ leaf shared-vlan-learning-is-avail {
+ type boolean;
+ default "false";
+ config false;
+ description
+ "true = Component supports Shared VLAN Learning (SVL). Name in ieee802-dot1q-bridge.yang: svl-capable.";
+ }
+ leaf hybrid-vlan-learning-is-avail {
+ type boolean;
+ default "false";
+ config false;
+ description
+ "true = Component supports both Independent and Shared VLAN Learning simultaneously. Name in ieee802-dot1q-bridge.yang: hybrid-capable.";
+ }
+ leaf configurable-port-vlan-id-tagging-is-avail {
+ type boolean;
+ default "false";
+ config false;
+ description
+ "true = Component supports setting the egress status (VLAN-tagged or Untagged) on each port. Name in ieee802-dot1q-bridge.yang: configurable-pvid-tagging.";
+ }
+ leaf multiple-local-bridges-is-avail {
+ type boolean;
+ default "false";
+ config false;
+ description
+ "true = Can support multiple local Bridges, outside the scope of 802.1Q defined VLANs. Name in ieee802-dot1q-bridge.yang: local-vlan-capable.";
+ }
+ leaf supported-version {
+ type int16;
+ default "-1";
+ config false;
+ description
+ "The version number supported. Name in ieee802-dot1q-bridge.yang: version.";
+ }
+ leaf maximum-number-of-vlan-ids {
+ type int16;
+ default "-1";
+ config false;
+ description
+ "The maximum number of VLAN IDs supported. Name in ieee802-dot1q-bridge.yang: max-vids.";
+ }
+ leaf overriding-default-port-vlan-id-is-avail {
+ type boolean;
+ default "false";
+ config false;
+ description
+ "true = Component supports overridding the default PVID on each port. Name in ieee802-dot1q-bridge.yang: override-default-pvid.";
+ }
+ leaf protocol-frame-format {
+ type protocol-frame-format-type;
+ config false;
+ description
+ "Only effective if (portAndProtocolBasedVlanIsAvail==true). The data-link encapsulation format or the detagged_frame_type in a Protocol Template. Name in ieee802-dot1q-bridge.yang: protocol-template.";
+ }
+ leaf maximum-number-of-msti {
+ type int16;
+ default "-1";
+ config false;
+ description
+ "Maximum number of Multiple Spanning Tree Instances (MSTIs) supported within an MST region (i.e., the number of spanning tree instances that can be supported in addition to the CIST), for MST Bridges. For SST Bridges, this parameter may be either omitted or reported as 0. Name in ieee802-dot1q-bridge.yang: max-msti.";
+ }
+ leaf admin-shut-down-is-avail {
+ type boolean;
+ default "false";
+ config false;
+ description
+ "true = Manual switching on and off of the forwarding domain without deleting it (underlying OSI network layers are also not affected) is available.";
+ }
+ leaf maintenance-timer-range {
+ type string;
+ default "Range of the maintenance timer not yet defined.";
+ config false;
+ description
+ "Available time periods for maintenance configurations to be described. Concrete values shall be separated by commas (e.g. '10, 60, 360'). Ranges shall be expressed as two values separated by a minus (e.g. '10-360').";
+ }
+ leaf-list supported-alarm-list {
+ type string;
+ default "Supported Alarms Not Yet Defined";
+ config false;
+ description
+ "Available alarms to be listed.";
+ }
+ description
+ "none";
+ }
+
+ grouping vlan-fd-configuration {
+ leaf fd-name {
+ type string;
+ default "Forwarding Domain name not yet defined.";
+ description
+ "The name of the Component. Free text field to be filled by the operator. Name in ieee802-dot1q-bridge.yang: name.";
+ }
+ leaf fd-is-on {
+ type boolean;
+ default "false";
+ description
+ "Only effective if (adminShutDownIsAvail==true). true = Activation of the Component. false = De-activation of the forwarding domain without deleting it (underlying OSI network layers are not affected).";
+ }
+ leaf sub-layer-protocol-name {
+ type sub-layer-protocol-name-type;
+ default "SUB_LAYER_PROTOCOL_NAME_TYPE_NOT_YET_DEFINED";
+ description
+ "The type of Component used to classify a particular Bridge component within a Bridge system comprising multiple components. Name in ieee802-dot1q-bridge.yang: type.\n";
+ }
+ leaf mac-address {
+ type string;
+ default "00:00:00:00:00:00";
+ description
+ "Unique EUI-48 Universally Administered MAC address configured on a Bridge Component. Name in ieee802-dot1q-bridge.yang: address.";
+ }
+ leaf traffic-classes-is-on {
+ type boolean;
+ default "false";
+ description
+ "Only effective if (trafficClassesIsAvail==true). true = Traffic Classes are enabled on this Bridge Component. false = Bridge Component operates with a single priority level for all traffic. Name in ieee802-dot1q-bridge.yang: traffic-class-enabled.";
+ }
+ list protocol-group-list {
+ key "db-index";
+ uses protocol-group-type;
+ description
+ "Only effective if (portAndProtocolBasedVlanIsAvail==true). List of the protocol group database entries. Name in ieee802-dot1q-bridge.yang: protocol-group-database.";
+ }
+ leaf maintenance-timer {
+ type int32;
+ units "s";
+ default "-1";
+ description
+ "Time of existence of any maintenance configuration. 0 = maintenance timer is switched off. Valid values are defined in *Capability::maintenanceTimerRange.";
+ }
+ list problem-kind-severity-list {
+ key "problem-kind-name";
+ uses problem-kind-severity-type;
+ description
+ "Severity of each entry of the SupportedAlarmList to be configured.";
+ }
+ description
+ "none";
+ }
+
+ grouping vlan-fd-status {
+ leaf mac-address-cur {
+ type string;
+ default "00:00:00:00:00:00";
+ config false;
+ description
+ "Unique EUI-48 Universally Administered MAC address assigned to a Bridge Component. Name in ieee802-dot1q-bridge.yang: address.";
+ }
+ leaf number-of-ports-cur {
+ type int16;
+ default "-1";
+ config false;
+ description
+ "Number of Bridge Ports associated with the Bridge Component. Values between 1 and 4095. Name in ieee802-dot1q-bridge.yang: ports.";
+ }
+ leaf number-of-static-vlan-registrations-cur {
+ type int32;
+ default "-1";
+ config false;
+ description
+ "The number of Static VLAN Registration entries currently in the FDB. Name in ieee802-dot1q-bridge.yang: static-vlan-registration-entries.";
+ }
+ leaf number-of-dynamic-vlan-registrations-cur {
+ type int32;
+ default "-1";
+ config false;
+ description
+ "The number of Dynamic VLAN Registration entries currently in the FDB. Name in ieee802-dot1q-bridge.yang: static-vlan-registration-entries.";
+ }
+ leaf fd-status {
+ type fd-status-type;
+ default "FD_STATUS_TYPE_NOT_YET_DEFINED";
+ config false;
+ description
+ "Operational status of the forwarding domain.";
+ }
+ description
+ "none";
+ }
+
+ grouping vlan-fd-current-problems {
+ list current-problem-list {
+ key "sequence-number";
+ config false;
+ uses vlan-fd-current-problem-type;
+ description
+ "none";
+ }
+ description
+ "none";
+ }
+
+ /****************************************
+ * typedef statements
+ **************************************/
+
+ typedef sub-layer-protocol-name-type {
+ type identityref {
+ base SUB_LAYER_PROTOCOL_NAME_TYPE;
+ }
+ description
+ "Represents the type of Component. Name in ieee802-dot1q-bridge.yang: type-of-component.";
+ }
+
+ typedef protocol-frame-format-type {
+ type identityref {
+ base PROTOCOL_FRAME_FORMAT_TYPE;
+ }
+ description
+ "A value representing the frame format to be matched. Name in ieee802-dot1q-bridge.yang: protocol-frame-format-type.";
+ }
+
+ /*********************************************
+ * grouping statements for complex data types
+ *******************************************/
+
+ identity SUB_LAYER_PROTOCOL_NAME_TYPE {
+ description
+ "none";
+ }
+
+ identity SUB_LAYER_PROTOCOL_NAME_TYPE_C_VLAN_COMPONENT {
+ base SUB_LAYER_PROTOCOL_NAME_TYPE;
+ description
+ "c-vlan-component. Base identity for a C-VLAN component. Name in ieee802-dot1q-bridge.yang: c-vlan-component.";
+ }
+
+ identity SUB_LAYER_PROTOCOL_NAME_TYPE_S_VLAN_COMPONENT {
+ base SUB_LAYER_PROTOCOL_NAME_TYPE;
+ description
+ "s-vlan-component. Base identity for a S-VLAN component. Name in ieee802-dot1q-bridge.yang: s-vlan-component.";
+ }
+
+ identity SUB_LAYER_PROTOCOL_NAME_TYPE_D_BRIDGE_COMPONENT {
+ base SUB_LAYER_PROTOCOL_NAME_TYPE;
+ description
+ "d-bridge-component. Base identity for a VLAN unaware component. Name in ieee802-dot1q-bridge.yang: d-bridge-component.";
+ }
+
+ identity SUB_LAYER_PROTOCOL_NAME_TYPE_EDGE_RELAY_COMPONENT {
+ base SUB_LAYER_PROTOCOL_NAME_TYPE;
+ description
+ "edge-relay-component. Base identity for an EVB station ER component. Name in ieee802-dot1q-bridge.yang: edge-relay-component. ";
+ }
+
+ identity SUB_LAYER_PROTOCOL_NAME_TYPE_NOT_YET_DEFINED {
+ base SUB_LAYER_PROTOCOL_NAME_TYPE;
+ description
+ "none";
+ }
+
+ identity PROTOCOL_FRAME_FORMAT_TYPE {
+ description
+ "none";
+ }
+
+ identity PROTOCOL_FRAME_FORMAT_TYPE_ETHERNET {
+ base PROTOCOL_FRAME_FORMAT_TYPE;
+ description
+ "Ethernet frame format. Name in ieee802-dot1q-bridge.yang: Ethernet.";
+ }
+
+ identity PROTOCOL_FRAME_FORMAT_TYPE_RFC1042 {
+ base PROTOCOL_FRAME_FORMAT_TYPE;
+ description
+ "RFC 1042 frame format. Name in ieee802-dot1q-bridge.yang: rfc1042.";
+ }
+
+ identity PROTOCOL_FRAME_FORMAT_TYPE_SNAP8021H_ {
+ base PROTOCOL_FRAME_FORMAT_TYPE;
+ description
+ "SNAP 802.1H frame format. Name in ieee802-dot1q-bridge.yang: snap8021H.";
+ }
+
+ identity PROTOCOL_FRAME_FORMAT_TYPE_SNAP_OTHER {
+ base PROTOCOL_FRAME_FORMAT_TYPE;
+ description
+ "Other SNAP frame format. Name in ieee802-dot1q-bridge.yang: snapOther.";
+ }
+
+ identity PROTOCOL_FRAME_FORMAT_TYPE_LLC_OTHER {
+ base PROTOCOL_FRAME_FORMAT_TYPE;
+ description
+ "Other LLC frame format. Name in ieee802-dot1q-bridge.yang: llcOther.";
+ }
+
+ identity PROTOCOL_FRAME_FORMAT_TYPE_NOT_YET_DEFINED {
+ base PROTOCOL_FRAME_FORMAT_TYPE;
+ description
+ "none";
+ }
+
+ identity SEVERITY_TYPE {
+ description
+ "none";
+ }
+
+ identity SEVERITY_TYPE_NON_ALARMED {
+ base SEVERITY_TYPE;
+ description
+ "none";
+ }
+
+ identity SEVERITY_TYPE_WARNING {
+ base SEVERITY_TYPE;
+ description
+ "none";
+ }
+
+ identity SEVERITY_TYPE_MINOR {
+ base SEVERITY_TYPE;
+ description
+ "none";
+ }
+
+ identity SEVERITY_TYPE_MAJOR {
+ base SEVERITY_TYPE;
+ description
+ "none";
+ }
+
+ identity SEVERITY_TYPE_CRITICAL {
+ base SEVERITY_TYPE;
+ description
+ "none";
+ }
+
+ identity SEVERITY_TYPE_NOT_YET_DEFINED {
+ base SEVERITY_TYPE;
+ description
+ "none";
+ }
+
+ identity FD_STATUS_TYPE {
+ description
+ "none";
+ }
+
+ identity FD_STATUS_TYPE_UP {
+ base FD_STATUS_TYPE;
+ description
+ "Ready to pass packets.";
+ }
+
+ identity FD_STATUS_TYPE_DOWN {
+ base FD_STATUS_TYPE;
+ description
+ "The interface does not pass any packets.";
+ }
+
+ identity FD_STATUS_TYPE_TESTING {
+ base FD_STATUS_TYPE;
+ description
+ "In some test mode. No operational packets can be passed.";
+ }
+
+ identity FD_STATUS_TYPE_UNKNOWN {
+ base FD_STATUS_TYPE;
+ description
+ "Status cannot be determined for some reason.";
+ }
+
+ identity FD_STATUS_TYPE_DORMANT {
+ base FD_STATUS_TYPE;
+ description
+ "Waiting for some external event.";
+ }
+
+ identity FD_STATUS_TYPE_NOT_PRESENT {
+ base FD_STATUS_TYPE;
+ description
+ "Some component (typically hardware) is missing.";
+ }
+
+ identity FD_STATUS_TYPE_LOWER_LAYER_DOWN {
+ base FD_STATUS_TYPE;
+ description
+ "Down due to state of lower-layer interface(s).";
+ }
+
+ identity FD_STATUS_TYPE_ADMIN_DOWN {
+ base FD_STATUS_TYPE;
+ description
+ "Down due to configuration.";
+ }
+
+ identity FD_STATUS_TYPE_NOT_YET_DEFINED {
+ base FD_STATUS_TYPE;
+ description
+ "none";
+ }
+
+ /****************************************
+ * package super-types
+ **************************************/
+
+ typedef severity-type {
+ type identityref {
+ base SEVERITY_TYPE;
+ }
+ description
+ "none";
+ }
+
+ typedef fd-status-type {
+ type identityref {
+ base FD_STATUS_TYPE;
+ }
+ description
+ "Current Status of the Forwarding Domain";
+ }
+
+ grouping problem-kind-severity-type {
+ leaf problem-kind-name {
+ type string;
+ description
+ "Name of the alarm according to SupportedAlarmList";
+ }
+ leaf problem-kind-severity {
+ type severity-type;
+ default "SEVERITY_TYPE_NOT_YET_DEFINED";
+ description
+ "Severity of this type of alarm.";
+ }
+ description
+ "none";
+ }
+
+ grouping protocol-group-type {
+ leaf db-index {
+ type uint16;
+ description
+ "The protocol group database index. Name in ieee802-dot1q-bridge.yang: db-index.";
+ }
+ leaf protocol-group-id {
+ type int32;
+ default "-1";
+ description
+ "Designates a group of protocols in the Protocol Group Database. Name in ieee802-dot1q-bridge.yang: group-id.";
+ }
+ leaf protocol-frame-format {
+ type protocol-frame-format-type;
+ default "PROTOCOL_FRAME_FORMAT_TYPE_NOT_YET_DEFINED";
+ description
+ "The data-link encapsulation format or the detagged_frame_type in a Protocol Template. Name in ieee802-dot1q-bridge.yang: frame-format-type.";
+ }
+ leaf ethertype {
+ type string;
+ default "Ethertype not yet defined.";
+ description
+ "ethertype. Only relevant if (protocolFrameFormat==ETHERNET) OR (protocolFrameFormat==RFC1042) OR (protocolFrameFormat==SNAP8021H). Format containing the 16-bit IEEE 802 EtherType field. The EtherType value represented in the canonical order defined by IEEE 802. The canonical representation is using uppercase characters. Pattern '[0-9a-fA-F]{2}-[0-9a-fA-F]{2}'. Name in ieee802-dot1q-bridge.yang: ethertype.";
+ }
+ leaf protocol-id {
+ type string;
+ default "Protocol ID not yet defined.";
+ description
+ "Only effective if (protocolFrameFormat==SNAP_OTHER). Format containing the 40-bit protocol identifier (PID). The canonical representation is using uppercase characters. Pattern '[0-9a-fA-F]{2}(-[0-9a-fA-F]{2}){4}'. Name in ieee802-dot1q-bridge.yang: protocol-id.";
+ }
+ leaf-list llc-address {
+ type string;
+ default "LLC Address not yet defined.";
+ description
+ "Only effective if (protocolFrameFormat==LLC_OTHER). A pair of ISO/IEC 8802-2 DSAP and SSAP address field values, for matching frame formats of LLC_Other. The canonical representation is using uppercase characters. Pattern '[0-9a-fA-F]{2}-[0-9a-fA-F]{2}'. Name in ieee802-dot1q-bridge.yang: llc-address.";
+ }
+ description
+ "none";
+ }
+
+ grouping vlan-fd-current-problem-type {
+ leaf problem-name {
+ type string;
+ default "Problem name not specified.";
+ config false;
+ description
+ "Name of the alarm according to SupportedAlarmList";
+ }
+ uses current-problem;
+ description
+ "none";
+ }
+}
diff --git a/sdnr/wt/devicemanager-onap/onf14/provider/src/main/yang/vlan-interface-1-0.yang b/sdnr/wt/devicemanager-onap/onf14/provider/src/main/yang/vlan-interface-1-0.yang new file mode 100644 index 000000000..67221096b --- /dev/null +++ b/sdnr/wt/devicemanager-onap/onf14/provider/src/main/yang/vlan-interface-1-0.yang @@ -0,0 +1,1495 @@ +module vlan-interface-1-0 {
+ yang-version 1.1;
+ namespace "urn:onf:yang:vlan-interface-1-0";
+ prefix vlan-interface;
+
+ import ietf-yang-types {
+ prefix yang;
+ }
+ import core-model-1-4 {
+ prefix core-model;
+ }
+
+ organization
+ "openBackhaul.com proposal to Open Networking Foundation (ONF)";
+ contact
+ "WG Web : https://github.com/openBackhaul/Overview
+ WG List: VlanInterface@openBackhaul.com
+ Editor : Thorsten Heinze
+ Email : Thorsten.Heinze@openBackhaul.com";
+ description
+ "Technology specific interface definition for VLAN interfaces according to IEEE 802.1Q-2018.
+
+ Copyright 2019 openBackhaul.com
+
+ Licensed under the Apache License, Version 2.0 (the 'License');
+ you may not use this file except in compliance with the License.
+ You may obtain a copy of the License at
+ http://www.apache.org/licenses/LICENSE-2.0
+ Unless required by applicable law or agreed to in writing, software
+ distributed under the License is distributed on an 'AS IS' BASIS,
+ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ See the License for the specific language governing permissions and
+ limitations under the License.";
+
+ revision 2020-07-31 {
+ description
+ "Model for the Transport SDN Pilot at Telefonica Germany.
+ Please view https://github.com/openBackhaul/vlaninterface/issues for changes.";
+ reference
+ "https://github.com/openBackhaul/vlaninterface/tree/tsp: Model definition
+ https://github.com/openBackhaul/onfCoreIm/tree/tsp: ONF TR-512 Core IM incl. Profile and enhanced Equipment definition";
+ }
+
+ identity LAYER_PROTOCOL_NAME_TYPE_VLAN_LAYER {
+ base core-model:LAYER_PROTOCOL_NAME_TYPE;
+ description
+ "none";
+ }
+
+ augment "/core-model:control-construct/core-model:logical-termination-point/core-model:layer-protocol"{
+ when "derived-from-or-self(./core-model:layer-protocol-name, 'vlan-interface:LAYER_PROTOCOL_NAME_TYPE_VLAN_LAYER')";
+ uses vlan-interface-lp-spec;
+ description
+ "none";
+ }
+
+
+ /****************************************
+ * package notifications
+ **************************************/
+ notification object-creation-notification {
+ uses object-creation-notification;
+ description
+ "none";
+ }
+ grouping object-creation-notification {
+ leaf counter {
+ type int32;
+ default "-1";
+ config false;
+ description
+ "Counts object creation notifications.";
+ }
+ leaf timestamp {
+ type yang:date-and-time;
+ default "2010-11-20T14:00:00+01:00";
+ config false;
+ description
+ "none";
+ }
+ leaf object-id-ref {
+ type leafref {
+ path "/core-model:control-construct/core-model:logical-termination-point/core-model:uuid";
+ require-instance false;
+ }
+ config false;
+ description
+ "none";
+ }
+ leaf object-type {
+ type string;
+ default "Type of created object not specified.";
+ config false;
+ description
+ "none";
+ }
+ description
+ "none";
+ }
+ notification object-deletion-notification {
+ uses object-deletion-notification;
+ description
+ "none";
+ }
+ grouping object-deletion-notification {
+ leaf counter {
+ type int32;
+ default "-1";
+ config false;
+ description
+ "Counts object deletion notifications.";
+ }
+ leaf timestamp {
+ type yang:date-and-time;
+ default "2010-11-20T14:00:00+01:00";
+ config false;
+ description
+ "none";
+ }
+ leaf object-id-ref {
+ type leafref {
+ path "/core-model:control-construct/core-model:logical-termination-point/core-model:uuid";
+ require-instance false;
+ }
+ config false;
+ description
+ "none";
+ }
+ description
+ "none";
+ }
+ notification attribute-value-changed-notification {
+ uses attribute-value-changed-notification;
+ description
+ "none";
+ }
+ grouping attribute-value-changed-notification {
+ leaf counter {
+ type int32;
+ default "-1";
+ config false;
+ description
+ "Counts attribute value changed notifications.";
+ }
+ leaf timestamp {
+ type yang:date-and-time;
+ default "2010-11-20T14:00:00+01:00";
+ config false;
+ description
+ "none";
+ }
+ leaf object-id-ref {
+ type leafref {
+ path "/core-model:control-construct/core-model:logical-termination-point/core-model:uuid";
+ require-instance false;
+ }
+ config false;
+ description
+ "none";
+ }
+ leaf attribute-name {
+ type string;
+ default "Attribute name not specified.";
+ config false;
+ description
+ "Name of the attribute that has been changed.";
+ }
+ leaf new-value {
+ type string;
+ default "New value not specified.";
+ config false;
+ description
+ "Attribute value converted to a string (xml, json, ...)";
+ }
+ description
+ "none";
+ }
+ notification problem-notification {
+ uses problem-notification;
+ description
+ "none";
+ }
+ grouping problem-notification {
+ leaf counter {
+ type int32;
+ default "-1";
+ config false;
+ description
+ "Counts problem notifications";
+ }
+ leaf timestamp {
+ type yang:date-and-time;
+ default "2010-11-20T14:00:00+01:00";
+ config false;
+ description
+ "none";
+ }
+ leaf object-id-ref {
+ type leafref {
+ path "/core-model:control-construct/core-model:logical-termination-point/core-model:uuid";
+ require-instance false;
+ }
+ config false;
+ description
+ "none";
+ }
+ leaf problem {
+ type string;
+ default "Problem name not specified.";
+ config false;
+ description
+ "Name of the problem according to *Capability::supportedAlarmList";
+ }
+ leaf severity {
+ type severity-type;
+ default "SEVERITY_TYPE_WARNING";
+ config false;
+ description
+ "Severity of the problem according to *Configuration::problemSeverityList";
+ }
+ description
+ "none";
+ }
+
+ /****************************************
+ * grouping statements for object classes
+ **************************************/
+ /****************************************
+ * package super-classes
+ **************************************/
+ grouping current-problem {
+ leaf sequence-number {
+ type int16;
+ config false;
+ description
+ "Unique sequence number of the current problem object.";
+ }
+ leaf timestamp {
+ type yang:date-and-time;
+ default "2010-11-20T14:00:00+01:00";
+ config false;
+ description
+ "Time when the alarm was raised";
+ }
+ leaf problem-severity {
+ type severity-type;
+ default "SEVERITY_TYPE_NOT_YET_DEFINED";
+ config false;
+ description
+ "Severity of the alarm.";
+ }
+ description
+ "none";
+ }
+ grouping current-performance {
+ leaf timestamp {
+ type yang:date-and-time;
+ default "2010-11-20T14:00:00+01:00";
+ config false;
+ description
+ "The timestamp associated with when the current data was collected.";
+ }
+ leaf suspect-interval-flag {
+ type boolean;
+ default "false";
+ config false;
+ description
+ "This attribute is used to indicate that the performance data for the current period may not be reliable. Some reasons for this to occur are:
+ – Suspect data were detected by the actual resource doing data collection.
+ – Transition of the administrativeState attribute to/from the 'lock' state.
+ – Transition of the operationalState to/from the 'disabled' state.
+ – Scheduler setting that inhibits the collection function.
+ – The performance counters were reset during the interval.
+ – The currentData (or subclass) object instance was created during the monitoring period.";
+ }
+ leaf elapsed-time {
+ type int64;
+ units "s";
+ default "-1";
+ config false;
+ description
+ "Number of seconds that elapsed since the last reset of the counter.";
+ }
+ leaf scanner-id {
+ type string;
+ default "Scanner ID not defined.";
+ config false;
+ description
+ "none";
+ }
+ leaf granularity-period {
+ type granularity-period-type;
+ config false;
+ description
+ "Time period between reset of the underlying counter.";
+ }
+ description
+ "none";
+ }
+ grouping historical-performance {
+ leaf suspect-interval-flag {
+ type boolean;
+ default "false";
+ config false;
+ description
+ "This attribute indicates that the data collected during the interval is suspect.";
+ }
+ leaf history-data-id {
+ type string;
+ default "History Data ID not defined.";
+ config false;
+ description
+ "none";
+ }
+ leaf granularity-period {
+ type granularity-period-type;
+ config false;
+ description
+ "Time period between reset of the underlying counter.";
+ }
+ leaf period-end-time {
+ type yang:date-and-time;
+ config false;
+ description
+ "Time when the counter values have been recorded and the counter reset.";
+ }
+ description
+ "none";
+ }
+
+ grouping vlan-interface-lp-spec {
+ container vlan-interface-pac {
+ uses vlan-interface-pac;
+ description
+ "none";
+ }
+ description
+ "none";
+ }
+ grouping vlan-interface-pac {
+ container vlan-interface-capability {
+ config false;
+ uses vlan-interface-capability;
+ description
+ "none";
+ }
+ container vlan-interface-configuration {
+ uses vlan-interface-configuration;
+ description
+ "none";
+ }
+ container vlan-interface-status {
+ config false;
+ uses vlan-interface-status;
+ description
+ "none";
+ }
+ container vlan-interface-current-problems {
+ config false;
+ uses vlan-interface-current-problems;
+ description
+ "none";
+ }
+ container vlan-interface-current-performance {
+ config false;
+ uses vlan-interface-current-performance;
+ description
+ "none";
+ }
+ container vlan-interface-historical-performances {
+ config false;
+ uses vlan-interface-historical-performances;
+ description
+ "none";
+ }
+ description
+ "none";
+ }
+ grouping vlan-interface-capability {
+ leaf-list supported-sub-layer-protocol-name-list {
+ type sub-layer-protocol-name-type;
+ default "SUB_LAYER_PROTOCOL_NAME_TYPE_NOT_YET_DEFINED";
+ config false;
+ description
+ "Lists the supported kinds of components. ";
+ }
+ leaf-list supported-interface-kind-list {
+ type interface-kind-type;
+ default "INTERFACE_KIND_TYPE_NOT_YET_DEFINED";
+ config false;
+ description
+ "type-capabilties.";
+ }
+ leaf tagging-and-mvrp-is-avail {
+ type boolean;
+ default "false";
+ config false;
+ description
+ "capabilities::tagging. true = Interface supports tagging of frames and MVRP. ";
+ }
+ leaf configuring-ingress-tag-filtering-is-avail {
+ type boolean;
+ default "false";
+ config false;
+ description
+ "capabilities::tagging. true = Configuring ingressTagFiltering is available.";
+ }
+ leaf ingress-vlan-id-filtering-is-avail {
+ type boolean;
+ default "false";
+ config false;
+ description
+ "capabilities::ingress-filtering. true = Discarding ingress frames that are tagged with a VLAN ID, which is unknown to the interface, is available at the interface. false = Filtering happens only at the egress.";
+ }
+ leaf-list available-pcp-bits-interpretation-kind-list {
+ type pcp-bits-interpretation-kind-type;
+ default "PCP_BITS_INTERPRETATION_KIND_TYPE_NOT_YET_DEFINED";
+ config false;
+ description
+ "List of the available ways of translating the PCP bits of the ingress frames into Priority values.";
+ }
+ leaf configuring-pcp-bits-decoding-is-avail {
+ type boolean;
+ default "false";
+ config false;
+ description
+ "false = PCP-bits are decoded according to table 3 in chapter 6.9.3 of IEEE Std 802.1Q-2018; true = Device supports flexibly configuring the translation of PCP-bits values to Priority values and drop eligibility.";
+ }
+ leaf configuring-pcp-bits-encoding-is-avail {
+ type boolean;
+ default "false";
+ config false;
+ description
+ "false = PCP-bits are encoded according to table 2 in chapter 6.9.3 of IEEE Std 802.1Q-2018; true = Device supports flexibly configuring the translation of Priority values and drop eligibility to PCP-bits values.";
+ }
+ leaf drop-eligible-indicator-is-avail {
+ type boolean;
+ default "false";
+ config false;
+ description
+ "true = Decoding and encoding of the Drop Eligible Indicator (DEI) bit of the VLAN header is supported by the device.";
+ }
+ leaf number-of-available-priorities {
+ type int8;
+ default "-1";
+ config false;
+ description
+ "Number of Priority values, which are supported at the device (usually 8 (0-7)).";
+ }
+ leaf received-priority-overwriting-is-avail {
+ type boolean;
+ default "false";
+ config false;
+ description
+ "true = Device supports overwriting the Received Priority of the ingress frames with Regenerated Priority values.";
+ }
+ leaf vlan-id-translation-is-avail {
+ type boolean;
+ default "false";
+ config false;
+ description
+ "true = Translation of VLAN IDs is available at this interface.";
+ }
+ leaf egress-vlan-id-translation-is-avail {
+ type boolean;
+ default "false";
+ config false;
+ description
+ "true = Separate translation table for VLAN IDs of egress frames is available.";
+ }
+ leaf port-and-protocol-based-vlan-is-avail {
+ type boolean;
+ default "false";
+ config false;
+ description
+ "protocol-based-vlan-classification. true = Restricting forwarding of frames of specific VLANs on specific protocols at this interface is available. Name in ieee802-dot1q-bridge.yang: protocol-based-vlan-classification.";
+ }
+ leaf max-number-of-protocol-vlan-id-groupings {
+ type int16;
+ default "-1";
+ config false;
+ description
+ "max-vid-set-entries. Only meaningful if (portAndProtocolBasedVlanIsAvail==true) AND (subLayerProtocolName!=D_BRIDGE_COMPONENT). Maximum number of entries supported in the forwardedProtocolVidGroupingList at this interface. Name in ieee802-dot1q-bridge.yang: max-vid-set-entries.";
+ }
+ leaf service-access-priority-tagging-is-avail {
+ type boolean;
+ default "false";
+ config false;
+ description
+ "true = Adding a priority S-VLAN tag (no VID value) is available on this C_VLAN_BRIDGE_PORT.";
+ }
+ leaf configuring-service-access-priority-mapping-is-avail {
+ type boolean;
+ default "false";
+ config false;
+ description
+ "true = Freely configuring of the mapping of Priority values to the PCP-bits values of the amended priority S-VLAN tag (no VID value) is available on this C_VLAN_BRIDGE_PORT.";
+ }
+ leaf number-of-available-traffic-classes {
+ type int8;
+ default "-1";
+ config false;
+ description
+ "Number of Traffic Classes (queues), which are supported at the device (usually 8).";
+ }
+ leaf restricted-automated-vlan-registration-is-avail {
+ type boolean;
+ default "false";
+ config false;
+ description
+ "false = The automated registration and modification of VLANs by the Multiple Registration Protocol (MRP) can not be restricted to those VIDs that already had a static entry.";
+ }
+ leaf admin-shut-down-is-avail {
+ type boolean;
+ default "false";
+ config false;
+ description
+ "false = Manual switching on and off of the interface without deleting it (underlying OSI network layers are also not affected) is available.";
+ }
+ leaf-list supported-loop-back-kind-list {
+ type loop-back-type;
+ default "LOOP_BACK_TYPE_NOT_YET_DEFINED";
+ config false;
+ description
+ "List of supported kinds of looping back.";
+ }
+ leaf maintenance-timer-range {
+ type string;
+ default "Range of the maintenance timer not yet defined.";
+ config false;
+ description
+ "Available time periods for maintenance configurations to be described. Concrete values shall be separated by commas (e.g. '10, 60, 360'). Ranges shall be expressed as two values separated by a minus (e.g. '10-360').";
+ }
+ leaf statistics-is-avail {
+ type boolean;
+ default "false";
+ config false;
+ description
+ "true = Statistics collection and aggregation is supported on this interface.";
+ }
+ leaf-list supported-alarm-list {
+ type string;
+ default "Supported Alarms Not Yet Defined";
+ config false;
+ description
+ "Available alarms to be listed. Mandatory: 'VlanInterfaceDown' and 'MtuMissmatch'. Further alarms might be added by the device vendors.";
+ }
+ leaf performance-monitoring-is-avail {
+ type boolean;
+ default "false";
+ config false;
+ description
+ "true = Collection and aggregation of performance values is available.";
+ }
+ description
+ "none";
+ }
+ grouping vlan-interface-configuration {
+ leaf interface-name {
+ type string;
+ default "Interface name not yet defined.";
+ description
+ "Description of the interface, could be a name, could be a number. Free text field to be filled by the operator.";
+ }
+ leaf interface-is-on {
+ type boolean;
+ default "false";
+ description
+ "Only effective if (adminShutDownIsAvail==true). true = Activation of the interface. false = De-activation of the interface without deleting it (underlying OSI network layers are not affected).";
+ }
+ leaf sub-layer-protocol-name {
+ type sub-layer-protocol-name-type;
+ default "SUB_LAYER_PROTOCOL_NAME_TYPE_NOT_YET_DEFINED";
+ description
+ "component-name. Used to reference configured component kind. Name in ieee802-dot1q-bridge.yang: component-name.";
+ }
+ leaf interface-kind {
+ type interface-kind-type;
+ default "INTERFACE_KIND_TYPE_NOT_YET_DEFINED";
+ description
+ "port-type. Indicates the capabilities of this port. Name in ieee802-dot1q-bridge.yang: port-type.";
+ }
+ leaf default-vlan-id {
+ type int64;
+ default "-1";
+ description
+ "pvid. Not effective if (subLayerProtocolName==D_BRIDGE_COMPONENT). Untagged frames on the ingress of this VlanInterface get amended by a VLAN header and its 12 VID-bits (VLAN ID) get filled with the default VLAN ID (1-4094). If a value between 4096 and 4294967295 gets assigned, then it represents a local VLAN. Name in ieee802-dot1q-bridge.yang: pvid.";
+ }
+ leaf default-priority {
+ type int8;
+ default "-1";
+ description
+ "default-priority. Untagged frames on the ingress of this VlanInterface get associated with this Priority value. Name in ieee802-dot1q-bridge.yang: default-priority.";
+ }
+ leaf ingress-tag-filtering {
+ type ingress-tag-filtering-type;
+ default "INGRESS_TAG_FILTERING_TYPE_NOT_YET_DEFINED";
+ description
+ "acceptable-frame. Only effective if (configuringIngressTagFilteringIsAvail==true) AND (subLayerProtocolName!=D_BRIDGE_COMPONENT). Defines the type of frame acceptable at this interface. Name in ieee802-dot1q-bridge.yang: acceptable-frame.";
+ }
+ leaf ingress-vlan-id-filtering-is-on {
+ type boolean;
+ default "false";
+ description
+ "enable-ingress-filtering. Only effective if (ingressVlanIdFilteringIsAvail==true) and (subLayerProtocolName!=D_BRIDGE_COMPONENT). true = Received frames with a VID that is unknown to the interface get discarded already at the ingress. Name in ieee802-dot1q-bridge.yang: enable-ingress-filtering.";
+ }
+ leaf pcp-bits-interpretation-kind {
+ type pcp-bits-interpretation-kind-type;
+ default "PCP_BITS_INTERPRETATION_KIND_TYPE_NOT_YET_DEFINED";
+ description
+ "pcp-selection. Defines how to decode and encode the values of the 3 Priority Code Point (PCP) bits of the VLAN header at this interface. Name in ieee802-dot1q-bridge.yang: pcp-selection.";
+ }
+ list pcp-bit-to-priority-mapping-list {
+ key "to-be-decoded-pcp-bits-value";
+ max-elements 8;
+ uses pcp-bits-to-priority-mapping-type;
+ description
+ "pcp-decoding-table. Only effective if (configuringPcpBitsDecodingIsAvail==true). Configurable decoding of the PCP-bits of the ingress VLAN header into Priority values and drop eligibility. This attribute is shortening the ieee802-dot1q-bridge.yang from a table to a list, because it allows only configuring the values for the way of PCP bit interpretation, which is actually chosen in pcpBitsInterpretationKind. Name in ieee802-dot1q-bridge.yang: pcp-decoding-table.";
+ }
+ list pcp-bits-encoding-mapping-list {
+ key "to-be-encoded-priority-value to-be-encoded-drop-eligibility";
+ max-elements 16;
+ uses priority-to-pcp-bits-mapping-type;
+ description
+ "pcp-encoding-table. Only effective if (configuringPcpBitsEncodingIsAvail==true). Configurable encoding of Priority value and drop eligibility into the PCP-bits of the ingress VLAN header. This attribute is shortening the ieee802-dot1q-bridge.yang from a table to a list, because it allows only configuring the values for the way of PCP bit interpretation, which is actually chosen in pcpBitsInterpretationKind. Name in ieee802-dot1q-bridge.yang: pcp-encoding-table.
+ ";
+ }
+ leaf drop-eligible-indicator-is-on {
+ type boolean;
+ default "false";
+ description
+ "use-dei. Only effective if (dropEligibleIndicatorIsAvail==true). true = The Drop Eligible Indicator (DEI) bit of ingress VLAN header is decoded into drop eligibility and vice versa for egress frames. Name in ieee802-dot1q-bridge.yang: use-dei.";
+ }
+ leaf drop-eligible-encoding-is-required {
+ type boolean;
+ default "false";
+ description
+ "drop-encoding. true = Queued frames, which have drop eligibility==true, get dropped, if the chosen pcpBitsInterpretationKind does not allow encoding the DEI bit set on true on the egress. Name in ieee802-dot1q-bridge.yang: drop-encoding.";
+ }
+ leaf received-priority-overwriting-is-on {
+ type boolean;
+ default "false";
+ description
+ "Only effective if (receivedPriorityOverwritingIsAvail==true). true = Overwriting the Received Priority value derived from the PCP-bits of the ingress frame with the Regenerated Priority values listed in ingressPriorityOverwritingTable is activated.";
+ }
+ list received-priority-overwriting-list {
+ key "to-be-overwritten-priority-value";
+ max-elements 8;
+ uses received-priority-overwriting-type;
+ description
+ "priority-regeneration. Only effective if (receivedPriorityOverwritingIsAvail==true) AND (receivedPriorityOverwritingIsOn==true). The Received Priority value derived from the PCP-bits of the ingress frame will be overwritten with the Regenerated Priority value from the list. Name in ieee802-dot1q-bridge.yang: priority-regeneration.";
+ }
+ leaf vlan-id-translation-is-on {
+ type boolean;
+ default "false";
+ description
+ "enable-vid-translation-table. Only effective if (vlanIdTranslationIsAvail==true) AND (subLayerProtocolName!=D_BRIDGE_COMPONENT). If (vlanIdTranslationIsOn==true) AND (egressVlanIdTranslationIsOn==true), the VLAN IDs of ingress frames get translated according to the mapping, which is defined in vidTranslationMapping. If (vlanIdTranslationIsOn==true) AND (egressVlanIdTranslationIsOn==false), the mapping, which is defined in vidTranslationMapping, is used for both ingress and egress frames. Name in ieee802-dot1q-bridge.yang: enable-vid-translation-table.";
+ }
+ list external-to-internal-vlan-id-mapping-list {
+ key "external-vlan-id";
+ uses external-to-internal-vlan-id-mapping-type;
+ description
+ "vid-translations. Only effective if (subLayerProtocolName!=D_BRIDGE_COMPONENT). If (vlanIdTranslationIsOn==true) AND (egressVlanIdTranslationIsOn==true), the VLAN IDs of ingress frames get translated according to this mapping. If (vlanIdTranslationIsOn==true) AND (egressVlanIdTranslationIsOn==false), the VLAN IDs of both ingress and egress frames get mapped according to this mapping. Name in ieee802-dot1q-bridge.yang: vid-translations.";
+ }
+ leaf egress-vlan-id-translation-is-on {
+ type boolean;
+ default "false";
+ description
+ "enable-egress-vid-translation-table. Only effective if (egressVlanIdTranslationIsAvail==true) AND (subLayerProtocolName!=D_BRIDGE_COMPONENT). true = The VLAN IDs of egress frames get translated according to the mapping, which is defined in egressVidTranslationMapping. Name in ieee802-dot1q-bridge.yang: enable-egress-vid-translation-table. References: 12.10.1.9 of IEEE Std 802.1Q-2018 and 6.9 of IEEE Std 802.1Q-2018.";
+ }
+ list internal-to-egress-vlan-id-mapping-list {
+ key "internal-vlan-id";
+ uses internal-to-egress-vlan-id-mapping-type;
+ description
+ "egress-vid-translations. Only effective if (subLayerProtocolName!=D_BRIDGE_COMPONENT) AND (egressVlanIdTranslationIsOn==true). The VLAN IDs of egress frames get translated according to this mapping. Name in ieee802-dot1q-bridge.yang: egress-vid-translations.";
+ }
+ leaf port-and-protocol-based-vlan-is-on {
+ type boolean;
+ default "false";
+ description
+ "Only effective if (portAndProtocolBasedVlanIsAvail==true) AND (subLayerProtocolName!=D_BRIDGE_COMPONENT). true = Restricting forwarding of frames of specific VLANs on specific protocols at this interface is activated.";
+ }
+ list forwarded-protocol-vlan-id-grouping-list {
+ key "forwarded-protocol-group-id";
+ uses forwarded-protocol-vlan-id-grouping-type;
+ description
+ "protocol-group-vid-set. Only effective if (portAndProtocolBasedVlanIsOn==true). Associates lists of protocols with lists of VIDs to combinations, which are forwarded at this interface. Name in ieee802-dot1q-bridge.yang: protocol-group-vid-set.";
+ }
+ leaf service-access-priority-tagging-is-on {
+ type boolean;
+ default "false";
+ description
+ "service-access-priority-selection. Only effective if (serviceAccessPriorityTaggingIsAvail==true). true = Amending priority S-VLAN tags (no VID value) to egress frames at this C_VLAN_BRIDGE_PORT is activated. Name in ieee802-dot1q-bridge.yang: service-access-priority-selection.
+ ";
+ }
+ list service-access-priority-mapping-list {
+ key "c-vlan-priority-value";
+ max-elements 8;
+ uses service-access-priority-mapping-type;
+ description
+ "service-access-priority. Only effective if (serviceAccessPriorityTaggingIsOn==true) AND (configuringServiceAccessPriorityMappingIsAvail==true). The PCP-bits of the priority S-VLAN tag (no VID value), which is amended to the egress frames at this C_VLAN_BRIDGE_PORT, are generated according to this table from the Priority value. Name in ieee802-dot1q-bridge.yang: service-access-priority.";
+ }
+ list priority-to-traffic-class-mapping-list {
+ key "priority-value";
+ max-elements 8;
+ uses priority-to-traffic-class-mapping-type;
+ description
+ "traffic-class-map. Mapping of the Priority values into Traffic Classes (queues). This attribute is shortening the ieee802-dot1q-bridge.yang from a table to a list, because it allows only configuring the values for the number of traffic classes actually available at the device. Name in ieee802-dot1q-bridge.yang: traffic-class-map.
+ ";
+ }
+ leaf restricted-automated-vlan-registration-is-on {
+ type boolean;
+ default "false";
+ description
+ "enable-restricted-vlan-registration. Only effective if (restrictedAutomatedVlanRegistrationIsAvail==true) and (subLayerProtocolName!=D_BRIDGE_COMPONENT). true = Automated VLAN registration by the Multiple Registration Protocol (MRP) is restricted to those VIDs that already had a static entry. Name in ieee802-dot1q-bridge.yang: enable-restricted-vlan-registration.";
+ }
+ leaf admin-point-to-point {
+ type admin-point-to-point-type;
+ default "ADMIN_POINT_TO_POINT_TYPE_NOT_YET_DEFINED";
+ description
+ "admin-point-to-point. For a port running spanning tree, this object represents the administrative point-to-point status of the LAN segment attached to this port, using the enumeration values of IEEE Std 802.1AC. A value of forceTrue(1) indicates that this port should always be treated as if it is connected to a point-to-point link. A value of forceFalse(2) indicates that this port should be treated as having a shared media connection. A value of auto(3) indicates that this port is considered to have a point-to-point link if it is an Aggregator and all of its members are aggregatable, or if the MAC entity is configured for full duplex operation, either through auto-negotiation or by management means. Manipulating this object changes the underlying adminPointToPointMAC. Name in ieee802-dot1q-bridge.yang: admin-point-to-point.
+ *****Potentially, this attribute should be part of an STP/RSTP/MSTP Interface definition and be deleted here.";
+ }
+ leaf loop-back-kind-on {
+ type loop-back-type;
+ default "LOOP_BACK_TYPE_NOT_YET_DEFINED";
+ description
+ "Maintenance Feature. Configuration of a loop back on this interface.";
+ }
+ leaf maintenance-timer {
+ type int32;
+ units "s";
+ default "-1";
+ description
+ "Time of existence of any maintenance configuration. 0 = maintenance timer is switched off. Valid values are defined in *Capability::maintenanceTimerRange.";
+ }
+ leaf statistics-is-on {
+ type boolean;
+ default "false";
+ description
+ "Only effective if (statisticsIsAvail==true). true = Continuous statistics counters are switched on.";
+ }
+ list problem-kind-severity-list {
+ key "problem-kind-name";
+ uses problem-kind-severity-type;
+ description
+ "Severity of each entry of the SupportedAlarmList to be configured.";
+ }
+ leaf performance-monitoring-is-on {
+ type boolean;
+ default "false";
+ description
+ "Only effective if (performanceMonitoringIsAvail==true). true = Collection and aggregation of statistics is switched on.";
+ }
+ description
+ "none";
+ }
+ grouping vlan-interface-status {
+ leaf interface-status {
+ type interface-status-type;
+ default "INTERFACE_STATUS_TYPE_NOT_YET_DEFINED";
+ config false;
+ description
+ "Operational status of the interface.";
+ }
+ leaf loop-back-kind-up {
+ type loop-back-type;
+ config false;
+ description
+ "The currently active (not just configured) type of loop back.";
+ }
+ leaf statistics-is-up {
+ type boolean;
+ default "false";
+ config false;
+ description
+ "true = Statistics are currently counted";
+ }
+ leaf performance-monitoring-is-up {
+ type boolean;
+ default "false";
+ config false;
+ description
+ "true = Performance values are currently collected and aggregated.";
+ }
+ leaf timestamp {
+ type yang:date-and-time;
+ default "2010-11-20T14:00:00+01:00";
+ config false;
+ description
+ "none";
+ }
+ leaf total-bytes-input {
+ type int64;
+ units "Byte";
+ default "-1";
+ config false;
+ description
+ "octets-rx. The total number of octets in all valid frames received. Name in ieee802-dot1q-bridge.yang: octets-rx.";
+ }
+ leaf total-frames-input {
+ type int64;
+ units "frame";
+ default "-1";
+ config false;
+ description
+ "frame-rx. Number of frames that have been received by this port from its segment. Name in ieee802-dot1q-bridge.yang: frame-rx.";
+ }
+ leaf total-bytes-output {
+ type int64;
+ units "Byte";
+ default "-1";
+ config false;
+ description
+ "octets-tx. The total number of octets that have been transmitted by this port to its segment. Name in ieee802-dot1q-bridge.yang: octets-tx.";
+ }
+ leaf total-frames-output {
+ type int64;
+ units "frame";
+ default "-1";
+ config false;
+ description
+ "frame-tx. The number of frames that have been transmitted by this port to its segment. Note that a frame transmitted on the interface corresponding to this port is only counted by this object if and only if it is for a protocol being processed by the local bridging function, including Bridge management frames. Name in ieee802-dot1q-bridge.yang: frame-tx.";
+ }
+ description
+ "none";
+ }
+ grouping vlan-interface-current-problems {
+ list current-problem-list {
+ key "sequence-number";
+ config false;
+ uses vlan-interface-current-problem-type;
+ description
+ "none";
+ }
+ leaf number-of-current-problems {
+ type int8;
+ default "-1";
+ config false;
+ description
+ "Number of alarms, which are currently active on this interface.";
+ }
+ leaf time-of-latest-change {
+ type yang:date-and-time;
+ default "2010-11-20T14:00:00+01:00";
+ config false;
+ description
+ "Date and time when the list of alarms has been changed for the last time.";
+ }
+ description
+ "none";
+ }
+ grouping vlan-interface-current-performance {
+ list current-performance-data-list {
+ key "granularity-period";
+ config false;
+ uses vlan-interface-current-performance-type;
+ description
+ "none";
+ }
+ leaf number-of-current-performance-sets {
+ type int8;
+ default "-1";
+ config false;
+ description
+ "Number of sets of current performance values, which are provided in the list.";
+ }
+ description
+ "none";
+ }
+ grouping vlan-interface-historical-performances {
+ list historical-performance-data {
+ key "granularity-period period-end-time";
+ config false;
+ uses vlan-interface-historical-performance-type;
+ description
+ "none";
+ }
+ leaf number-of-historical-performance-sets {
+ type int16;
+ default "-1";
+ config false;
+ description
+ "Number of sets of historical performance values, which are provided in the list.";
+ }
+ leaf time-of-latest-change {
+ type yang:date-and-time;
+ default "2010-11-20T14:00:00+01:00";
+ config false;
+ description
+ "Date and time when the list of sets of historical performance values has been changed for the last time (e.g. new one added or existing one deleted).";
+ }
+ description
+ "none";
+ }
+
+/****************************************
+* typedef statements
+**************************************/
+ typedef loop-back-type {
+ type identityref {
+ base LOOP_BACK_TYPE;
+ }
+ description
+ "none";
+ }
+ typedef sub-layer-protocol-name-type {
+ type identityref {
+ base SUB_LAYER_PROTOCOL_NAME_TYPE;
+ }
+ description
+ "Represents the type of Component.";
+ }
+ typedef interface-kind-type {
+ type identityref {
+ base INTERFACE_KIND_TYPE;
+ }
+ description
+ "type-capabilties. The type of feature capabilities supported with port. Indicates the capabilities of this port. Name in ieee802-dot1q-bridge.yang:type-capabilties.";
+ }
+ typedef ingress-tag-filtering-type {
+ type identityref {
+ base INGRESS_TAG_FILTERING_TYPE;
+ }
+ description
+ "none";
+ }
+ typedef pcp-bits-interpretation-kind-type {
+ type identityref {
+ base PCP_BITS_INTERPRETATION_KIND_TYPE;
+ }
+ description
+ "pcp-selection-type. Ways of translating the PCP-bit values of the ingress frames into Priority values. Name in ieee802-dot1q-bridge.yang: pcp-selection-type. References: 12.6.2.5.3 of IEEE Std 802.1Q-2018 and 6.9.3 of IEEE Std 802.1Q-2018.";
+ }
+ typedef admin-point-to-point-type {
+ type identityref {
+ base ADMIN_POINT_TO_POINT_TYPE;
+ }
+ description
+ "admin-point-to-point";
+ }
+
+/*********************************************
+* grouping statements for complex data types
+*******************************************/
+ identity LOOP_BACK_TYPE {
+ description
+ "none";
+ }
+ identity LOOP_BACK_TYPE_BACK_TO_LOCAL {
+ base LOOP_BACK_TYPE;
+ description
+ "Returning the Ethernet frames of the local site on the outgoing interface back to the local site.";
+ }
+ identity LOOP_BACK_TYPE_BACK_TO_REMOTE {
+ base LOOP_BACK_TYPE;
+ description
+ "Returning the incoming Ethernet frames back to the remote site.";
+ }
+ identity LOOP_BACK_TYPE_NONE {
+ base LOOP_BACK_TYPE;
+ description
+ "none";
+ }
+ identity LOOP_BACK_TYPE_NOT_YET_DEFINED {
+ base LOOP_BACK_TYPE;
+ description
+ "none";
+ }
+ identity SUB_LAYER_PROTOCOL_NAME_TYPE {
+ description
+ "none";
+ }
+ identity SUB_LAYER_PROTOCOL_NAME_TYPE_D_BRIDGE_COMPONENT {
+ base SUB_LAYER_PROTOCOL_NAME_TYPE;
+ description
+ "VLAN unaware component";
+ }
+ identity SUB_LAYER_PROTOCOL_NAME_TYPE_C_VLAN_COMPONENT {
+ base SUB_LAYER_PROTOCOL_NAME_TYPE;
+ description
+ "C-VLAN component";
+ }
+ identity SUB_LAYER_PROTOCOL_NAME_TYPE_S_VLAN_COMPONENT {
+ base SUB_LAYER_PROTOCOL_NAME_TYPE;
+ description
+ "S-VLAN component";
+ }
+ identity SUB_LAYER_PROTOCOL_NAME_TYPE_EDGE_RELAY_COMPONENT {
+ base SUB_LAYER_PROTOCOL_NAME_TYPE;
+ description
+ "EVB station ER component";
+ }
+ identity SUB_LAYER_PROTOCOL_NAME_TYPE_NOT_YET_DEFINED {
+ base SUB_LAYER_PROTOCOL_NAME_TYPE;
+ description
+ "none";
+ }
+ identity INTERFACE_KIND_TYPE {
+ description
+ "none";
+ }
+ identity INTERFACE_KIND_TYPE_D_BRIDGE_PORT {
+ base INTERFACE_KIND_TYPE;
+ description
+ "Indicates the port can be a VLAN-unaware member of an 802.1Q Bridge.";
+ }
+ identity INTERFACE_KIND_TYPE_C_VLAN_BRIDGE_PORT {
+ base INTERFACE_KIND_TYPE;
+ description
+ "Indicates the port can be a C-TAG aware port of an enterprise VLAN aware Bridge.";
+ }
+ identity INTERFACE_KIND_TYPE_CUSTOMER_EDGE_PORT {
+ base INTERFACE_KIND_TYPE;
+ description
+ "Indicates the port can be a C-TAG aware port of a Provider Bridge used for connections to the exterior of a PBN (Provider Bridged Network) or PBBN (Provider Backbone Bridged Network).";
+ }
+ identity INTERFACE_KIND_TYPE_PROVIDER_EDGE_PORT {
+ base INTERFACE_KIND_TYPE;
+ description
+ "none";
+ }
+ identity INTERFACE_KIND_TYPE_CUSTOMER_NETWORK_PORT {
+ base INTERFACE_KIND_TYPE;
+ description
+ "Indicates the port can be an S-TAG aware port of a Provider Bridge or Backbone Edge Bridge used for connections to the exterior of a PBN (Provider Bridged Network) or PBBN (Provider Backbone Bridged Network).";
+ }
+ identity INTERFACE_KIND_TYPE_PROVIDER_NETWORK_PORT {
+ base INTERFACE_KIND_TYPE;
+ description
+ "Indicates the port can be an S-TAG aware port of a Provider Bridge or Backbone Edge Bridge used for connections within a PBN (Provider Bridged Network) or PBBN (Provider Backbone Bridged Network).";
+ }
+ identity INTERFACE_KIND_TYPE_CUSTOMER_BACKBONE_PORT {
+ base INTERFACE_KIND_TYPE;
+ description
+ "Indicates the port can be a I-TAG aware port of a Backbone Edge Bridge's B-component.";
+ }
+ identity INTERFACE_KIND_TYPE_REMOTE_CUSTOMER_ACCESS_PORT {
+ base INTERFACE_KIND_TYPE;
+ description
+ "Indicates the port can be an S-TAG aware port of a Provider Bridge capable of providing Remote Customer Service Interfaces.";
+ }
+ identity INTERFACE_KIND_TYPE_VIRTUAL_INSTANCE_PORT {
+ base INTERFACE_KIND_TYPE;
+ description
+ "Indicates the port can be a virtual S-TAG aware port within a Backbone Edge Bridge's I-component which is responsible for handling S-tagged traffic for a specific backbone service instance.";
+ }
+ identity INTERFACE_KIND_TYPE_STATION_FACING_BRIDGE_PORT {
+ base INTERFACE_KIND_TYPE;
+ description
+ "Indicates the station-facing Bridge Port in a EVB Bridge.";
+ }
+ identity INTERFACE_KIND_TYPE_UPLINK_ACCESS_PORT {
+ base INTERFACE_KIND_TYPE;
+ description
+ "Indicates the uplink access port in an EVB Bridge or EVB station.";
+ }
+ identity INTERFACE_KIND_TYPE_UPLINK_RELAY_PORT {
+ base INTERFACE_KIND_TYPE;
+ description
+ "Indicates the uplink relay port in an EVB station.";
+ }
+ identity INTERFACE_KIND_TYPE_NOT_YET_DEFINED {
+ base INTERFACE_KIND_TYPE;
+ description
+ "none";
+ }
+ identity INGRESS_TAG_FILTERING_TYPE {
+ description
+ "none";
+ }
+ identity INGRESS_TAG_FILTERING_TYPE_UNTAGGED_AND_PRIORITY_FRAMES_ONLY {
+ base INGRESS_TAG_FILTERING_TYPE;
+ description
+ "admit-only-untagged-and-priority-tagged. Priority frames are frames with VLAN header, but VID==0.";
+ }
+ identity INGRESS_TAG_FILTERING_TYPE_VLAN_TAGGED_FRAMES_ONLY {
+ base INGRESS_TAG_FILTERING_TYPE;
+ description
+ "admit-only-VLAN-tagged-frames";
+ }
+ identity INGRESS_TAG_FILTERING_TYPE_ALL_FRAMES {
+ base INGRESS_TAG_FILTERING_TYPE;
+ description
+ "admit-all-frames ";
+ }
+ identity INGRESS_TAG_FILTERING_TYPE_NOT_YET_DEFINED {
+ base INGRESS_TAG_FILTERING_TYPE;
+ description
+ "none";
+ }
+ identity PCP_BITS_INTERPRETATION_KIND_TYPE {
+ description
+ "none";
+ }
+ identity PCP_BITS_INTERPRETATION_KIND_TYPE_8P0D {
+ base PCP_BITS_INTERPRETATION_KIND_TYPE;
+ description
+ "The 3 bits of the Priority Code Point (PCP) segment of the VLAN header are used to express 8 Priority values and 0 drop eligibility values.";
+ }
+ identity PCP_BITS_INTERPRETATION_KIND_TYPE_7P1D {
+ base PCP_BITS_INTERPRETATION_KIND_TYPE;
+ description
+ "The 3 bits of the Priority Code Point (PCP) segment of the VLAN header are used to express 7 Priority values and 1 drop eligibility values.";
+ }
+ identity PCP_BITS_INTERPRETATION_KIND_TYPE_6P2D {
+ base PCP_BITS_INTERPRETATION_KIND_TYPE;
+ description
+ "The 3 bits of the Priority Code Point (PCP) segment of the VLAN header are used to express 6 Priority values and 2 drop eligibility values.";
+ }
+ identity PCP_BITS_INTERPRETATION_KIND_TYPE_5P3D {
+ base PCP_BITS_INTERPRETATION_KIND_TYPE;
+ description
+ "The 3 bits of the Priority Code Point (PCP) segment of the VLAN header are used to express 5 Priority values and 3 drop eligibility values.";
+ }
+ identity PCP_BITS_INTERPRETATION_KIND_TYPE_NOT_YET_DEFINED {
+ base PCP_BITS_INTERPRETATION_KIND_TYPE;
+ description
+ "none";
+ }
+ identity ADMIN_POINT_TO_POINT_TYPE {
+ description
+ "none";
+ }
+ identity ADMIN_POINT_TO_POINT_TYPE_FORCE_TRUE {
+ base ADMIN_POINT_TO_POINT_TYPE;
+ description
+ "force-true. Indicates that this port should always be treated as if it is connected to a point-to-point link. Name in ieee802-dot1q-bridge.yang: force-true.";
+ }
+ identity ADMIN_POINT_TO_POINT_TYPE_FORCE_FALSE {
+ base ADMIN_POINT_TO_POINT_TYPE;
+ description
+ "force-false. Indicates that this port should be treated as having a shared media connection. Name in ieee802-dot1q-bridge.yang: force-false.";
+ }
+ identity ADMIN_POINT_TO_POINT_TYPE_AUTO {
+ base ADMIN_POINT_TO_POINT_TYPE;
+ description
+ "auto. Indicates that this port is considered to have a point-to-point link if it is an Aggregator and all of its members are aggregatable, or if the MAC entity is configured for full duplex operation, either through auto-negotiation or by management means. Name in ieee802-dot1q-bridge.yang: auto.";
+ }
+ identity ADMIN_POINT_TO_POINT_TYPE_NOT_YET_DEFINED {
+ base ADMIN_POINT_TO_POINT_TYPE;
+ description
+ "none";
+ }
+ identity GRANULARITY_PERIOD_TYPE {
+ description
+ "none";
+ }
+ identity GRANULARITY_PERIOD_TYPE_UNKNOWN {
+ base GRANULARITY_PERIOD_TYPE;
+ description
+ "none";
+ }
+ identity GRANULARITY_PERIOD_TYPE_PERIOD-15-MIN {
+ base GRANULARITY_PERIOD_TYPE;
+ description
+ "none";
+ }
+ identity GRANULARITY_PERIOD_TYPE_PERIOD-24-HOURS {
+ base GRANULARITY_PERIOD_TYPE;
+ description
+ "none";
+ }
+ identity GRANULARITY_PERIOD_TYPE_NOT_YET_DEFINED {
+ base GRANULARITY_PERIOD_TYPE;
+ description
+ "none";
+ }
+ identity SEVERITY_TYPE {
+ description
+ "none";
+ }
+ identity SEVERITY_TYPE_NON-ALARMED {
+ base SEVERITY_TYPE;
+ description
+ "none";
+ }
+ identity SEVERITY_TYPE_WARNING {
+ base SEVERITY_TYPE;
+ description
+ "none";
+ }
+ identity SEVERITY_TYPE_MAJOR {
+ base SEVERITY_TYPE;
+ description
+ "none";
+ }
+ identity SEVERITY_TYPE_MINOR {
+ base SEVERITY_TYPE;
+ description
+ "none";
+ }
+ identity SEVERITY_TYPE_CRITICAL {
+ base SEVERITY_TYPE;
+ description
+ "none";
+ }
+ identity SEVERITY_TYPE_NOT_YET_DEFINED {
+ base SEVERITY_TYPE;
+ description
+ "none";
+ }
+ identity INTERFACE_STATUS_TYPE {
+ description
+ "none";
+ }
+ identity INTERFACE_STATUS_TYPE_UP {
+ base INTERFACE_STATUS_TYPE;
+ description
+ "Ready to pass packets.";
+ }
+ identity INTERFACE_STATUS_TYPE_DOWN {
+ base INTERFACE_STATUS_TYPE;
+ description
+ "The interface does not pass any packets.";
+ }
+ identity INTERFACE_STATUS_TYPE_TESTING {
+ base INTERFACE_STATUS_TYPE;
+ description
+ "In some test mode. No operational packets can be passed.";
+ }
+ identity INTERFACE_STATUS_TYPE_UNKNOWN {
+ base INTERFACE_STATUS_TYPE;
+ description
+ "Status cannot be determined for some reason.";
+ }
+ identity INTERFACE_STATUS_TYPE_DORMANT {
+ base INTERFACE_STATUS_TYPE;
+ description
+ "Waiting for some external event.";
+ }
+ identity INTERFACE_STATUS_TYPE_NOT_PRESENT {
+ base INTERFACE_STATUS_TYPE;
+ description
+ "Some component (typically hardware) is missing.";
+ }
+ identity INTERFACE_STATUS_TYPE_LOWER_LAYER_DOWN {
+ base INTERFACE_STATUS_TYPE;
+ description
+ "Down due to state of lower-layer interface(s).";
+ }
+ identity INTERFACE_STATUS_TYPE_ADMIN_DOWN {
+ base INTERFACE_STATUS_TYPE;
+ description
+ "Down due to configuration.";
+ }
+ identity INTERFACE_STATUS_TYPE_NOT_YET_DEFINED {
+ base INTERFACE_STATUS_TYPE;
+ description
+ "none";
+ }
+ /****************************************
+ * package super-types
+ **************************************/
+ typedef granularity-period-type {
+ type identityref {
+ base GRANULARITY_PERIOD_TYPE;
+ }
+ description
+ "The enumeration with the options for granularity period of the performance data.";
+ }
+ typedef severity-type {
+ type identityref {
+ base SEVERITY_TYPE;
+ }
+ description
+ "none";
+ }
+ typedef interface-status-type {
+ type identityref {
+ base INTERFACE_STATUS_TYPE;
+ }
+ description
+ "Current Interface Status";
+ }
+ grouping problem-kind-severity-type {
+ leaf problem-kind-name {
+ type string;
+ description
+ "Name of the alarm according to SupportedAlarmList";
+ }
+ leaf problem-kind-severity {
+ type severity-type;
+ default "SEVERITY_TYPE_NOT_YET_DEFINED";
+ description
+ "Severity of this type of alarm.";
+ }
+ description
+ "none";
+ }
+
+ grouping pcp-bits-to-priority-mapping-type {
+ leaf to-be-decoded-pcp-bits-value {
+ type int8;
+ description
+ "priority-code-point. Value of the 3 Priority Code Point (PCP) bits of the VLAN header, which is to be interpreted into Priority and eligibility. Name in ieee802-dot1q-bridge.yang: priority-code-point.";
+ }
+ leaf associated-priority-value {
+ type int8;
+ default "-1";
+ description
+ "priority. Priority value associated to the value of the 3 Priority Code Point (PCP) bits of the VLAN header. Values from 0 to 7 (inclusive). Name in ieee802-dot1q-bridge.yang: priority.";
+ }
+ leaf associated-drop-eligibility {
+ type boolean;
+ default "false";
+ description
+ "drop-eligible. Drop eligibility associated to the value of the 3 Priority Code Point (PCP) bits of the VLAN header. Name in ieee802-dot1q-bridge.yang: drop-eligible.";
+ }
+ description
+ "priority-map. The Priority Code Point decoding mapping describes how to decode the PCP-bits of the ingress VLAN header into Priority value and drop eligibility. If no corresponding pcpBitToPriorityMappingType instance exists, the mapping of the respective pcpBitsValue shall follow the standard, which is defined in Table6-3 on page 143 of IEEE802.1Q-2018. Name in ieee802-dot1q-bridge.yang: priority-map.";
+ }
+ grouping priority-to-pcp-bits-mapping-type {
+ leaf to-be-encoded-priority-value {
+ type int8;
+ description
+ "priority. Priority value, which is to be encoded into a value of the 3 Priority Code Point (PCP) bits of the egress VLAN header. Name in ieee802-dot1q-bridge.yang: priority.";
+ }
+ leaf to-be-encoded-drop-eligibility {
+ type boolean;
+ description
+ "dei. Drop eligibility, which is to be encoded into a value of the 3 Priority Code Point (PCP) bits of the egress VLAN header. Name in ieee802-dot1q-bridge.yang: dei.";
+ }
+ leaf associated-pcp-bits-value {
+ type int8;
+ default "-1";
+ description
+ "priority-code-point. Value of the 3 Priority Code Point (PCP) bits of the egress VLAN header, which is to be associated with the Priority value and eligibility. Name in ieee802-dot1q-bridge.yang: priority-code-point.";
+ }
+ description
+ "priority-map. The Priority Code Point encoding mapping describes how to encode Priority value and drop eligibility into the PCP-bits of the egress VLAN header. If no corresponding PriorityToPcpBitsMappingType instance exists, the mapping of the respective Priority value shall follow the standard, which is defined in Table6-2 on page 143 of IEEE802.1Q-2018. Name in ieee802-dot1q-bridge.yang: priority-map.";
+ }
+ grouping received-priority-overwriting-type {
+ leaf to-be-overwritten-priority-value {
+ type int8;
+ description
+ "Received Priority value, which is to be overwritten by the Regenerated Priority value. ieee802-dot1q-bridge.yang is explicitly listing all values, and has been slightly shortened.";
+ }
+ leaf new-priority-value {
+ type int8;
+ default "-1";
+ description
+ "Regenerated Priority value, which is substituting the Received Priority value. ieee802-dot1q-bridge.yang is explicitly listing all values, and has been slightly shortened.";
+ }
+ description
+ "The priority regeneration table provides the ability to map incoming priority values on a per-Port basis, under management control. If no corresponding ReceivedPriorityOverwritingType instance exists, the Regenerated Priority value is the same as the Received Priority value. ";
+ }
+ grouping external-to-internal-vlan-id-mapping-type {
+ leaf external-vlan-id {
+ type int8;
+ description
+ "local-vid. VID of the frame as long as it is inside the interface. If ingress frame, this would be before translation. If egress frame (AND egressVidTranslationMapping not activated!), this would be after translation. Name in ieee802-dot1q-bridge.yang: local-vid.";
+ }
+ leaf internal-vlan-id {
+ type int8;
+ default "-1";
+ description
+ "relay-vid. VID of the frame as long as it is inside the bridge. If ingress frame, this would be after translation. If egress frame (AND egressVidTranslationMapping not activated!), this would be before translation. Name in ieee802-dot1q-bridge.yang: relay-vid.";
+ }
+ description
+ "vid-translations. To configure the VID Translation Table (6.9) associated with a Port. If no translation relationship is defined for some VID value, then it is assumed that the VID does not change. The translation relation applies on ingress and egress frames unless a separate egress translation relations are defined in egressVidTranslationMapping. Name in ieee802-dot1q-bridge.yang: vid-translations.
+ ";
+ }
+ grouping internal-to-egress-vlan-id-mapping-type {
+ leaf internal-vlan-id {
+ type int8;
+ description
+ "relay-vid. VID of the frame as long as it is inside the bridge, but before translating the VID and egress of the frame at this interface. Name in ieee802-dot1q-bridge.yang: relay-vid.";
+ }
+ leaf egress-vlan-id {
+ type int8;
+ default "-1";
+ description
+ "local-vid. VID of the egress frame after translating the VID. Name in ieee802-dot1q-bridge.yang: local-vid.";
+ }
+ description
+ "egress-vid-translationsType. To configure the Egress VID Translation Table (6.9) associated with a Port. If no translation relationship is defined for some VID value, then it is assumed that the VID does not change. Name in ieee802-dot1q-bridge.yang: egress-vid-translationsType.";
+ }
+ grouping forwarded-protocol-vlan-id-grouping-type {
+ leaf forwarded-protocol-group-id {
+ type int32;
+ description
+ "group-id. Bridge wide identifier of a group of protocols that shall be forwarded within the listed VLANs. Name in ieee802-dot1q-bridge.yang: group-id.";
+ }
+ leaf-list forwarded-vlan-id-list {
+ type int8;
+ default "-1";
+ description
+ "vid. List of VLANs that shall forward the protocols, which are consolidated unter the protocolGroupId. Name in ieee802-dot1q-bridge.yang: vid.";
+ }
+ description
+ "protocol-group-vid-set. Limits the forwarded frames of a list of VIDs to the protocols, which are consolidated under a specific group ID. The protocol group is to be defined on Bridge level. Name in ieee802-dot1q-bridge.yang: protocol-group-vid-set.";
+ }
+ grouping service-access-priority-mapping-type {
+ leaf c-vlan-priority-value {
+ type int8;
+ description
+ "C-VLAN Priority, which shall be translated into the associated S-VLAN Priority. ieee802-dot1q-bridge.yang is explicitly listing all values, and has been slightly shortened.";
+ }
+ leaf s-vlan-pcp-bits-value {
+ type int8;
+ default "-1";
+ description
+ "S-VLAN Priority, which shall be associated with this C-VLAN Priority. ieee802-dot1q-bridge.yang is explicitly listing all values, and has been slightly shortened.";
+ }
+ description
+ "service-access-priority-table-grouping. Describes how the PCP-bits of the priority S-VLAN tag (no VID value) get derived from the Priority value. Name in ieee802-dot1q-bridge.yang: service-access-priority-table-grouping.";
+ }
+ grouping priority-to-traffic-class-mapping-type {
+ leaf priority-value {
+ type int8;
+ description
+ "priority. Priority value, which is to be mapped into a Traffic Class (queue). Values from 0 to 7 (inclusive). Name in ieee802-dot1q-bridge.yang: priority.";
+ }
+ leaf traffic-class-value {
+ type int8;
+ default "-1";
+ description
+ "traffic-class. Index of the Traffic Class (queue), which gets associated with the Priority Value. Values from 0 to 7 (inclusive). Name in ieee802-dot1q-bridge.yang: traffic-class.";
+ }
+ description
+ "traffic-class-table-grouping. If no corresponding PriorityToTrafficClassMappingType instance exists, the mapping of the respective Priority shall follow the standard, which is defined in Table 8-5 on page 198 of IEEE802.1Q-2018. This modeling is shortening the ieee802-dot1q-bridge.yang from a table to a list, because it allows only configuring the values for the number of traffic classes, which is actually available at the device. Name in ieee802-dot1q-bridge.yang: traffic-class-table-grouping.";
+ }
+ grouping vlan-interface-current-problem-type {
+ leaf problem-name {
+ type string;
+ default "Problem name not specified.";
+ config false;
+ description
+ "Name of the alarm according to SupportedAlarmList";
+ }
+ uses current-problem;
+ description
+ "none";
+ }
+ grouping vlan-interface-performance-type {
+ leaf total-bytes-input {
+ type int64;
+ units "Bytes";
+ default "-1";
+ config false;
+ description
+ "Received data volume in Byte.";
+ }
+ leaf total-frames-input {
+ type int64;
+ units "frames";
+ default "-1";
+ config false;
+ description
+ "The total number of Ethernet frames received for the specified VLAN ID(s), including those received in error";
+ }
+ leaf total-bytes-output {
+ type int64;
+ units "Bytes";
+ default "-1";
+ config false;
+ description
+ "Sent data volume in Byte.";
+ }
+ leaf total-frames-output {
+ type int64;
+ units "frames";
+ default "-1";
+ config false;
+ description
+ "The total number of Ethernet frames for the specified VLAN ID(s) that the device supplied to the lower layers for transmission. This includes frames generated locally and those forwarded by the device.";
+ }
+ description
+ "none";
+ }
+ grouping vlan-interface-current-performance-type {
+ container performance-data {
+ config false;
+ uses vlan-interface-performance-type;
+ description
+ "none";
+ }
+ uses current-performance;
+ description
+ "none";
+ }
+ grouping vlan-interface-historical-performance-type {
+ container performance-data {
+ config false;
+ uses vlan-interface-performance-type;
+ description
+ "none";
+ }
+ uses historical-performance;
+ description
+ "none";
+ }
+
+}
diff --git a/sdnr/wt/devicemanager-onap/onf14/provider/src/main/yang/wire-interface-2-0.yang b/sdnr/wt/devicemanager-onap/onf14/provider/src/main/yang/wire-interface-2-0.yang new file mode 100644 index 000000000..ada0ea8ef --- /dev/null +++ b/sdnr/wt/devicemanager-onap/onf14/provider/src/main/yang/wire-interface-2-0.yang @@ -0,0 +1,1819 @@ +module wire-interface-2-0 {
+ yang-version 1.1;
+ namespace "urn:onf:yang:wire-interface-2-0";
+ prefix wire-interface;
+
+ import ietf-yang-types {
+ prefix yang;
+ }
+ import core-model-1-4 {
+ prefix core-model;
+ }
+
+ organization
+ "openBackhaul.com proposal to Open Networking Foundation (ONF)";
+ contact
+ "WG Web : https://github.com/openBackhaul/Overview
+ WG List: WireInterface@openBackhaul.com
+ Editor : Thorsten Heinze
+ Email : Thorsten.Heinze@openBackhaul.com";
+ description
+ "This model is for vendor agnostic management of Ethernet PHY interfaces.
+ Supported: '10BASE5', 'FOIRL', '10BASE2', '10BROAD36', '10BASE-T', '10BASE-FP', '10BASE-FB', '10BASE-FL', '100BASE-T4', '100BASE-TX', '100BASE-BX10D', '100BASE-BX10U', '100BASE-FX', '100BASE-LX10', '100BASE-T2', '1000BASE-X', '1000BASE-BX10D', '1000BASE-BX10U', '1000BASE-LX', '1000BASE-LX10', '1000BASE-SX', '1000BASE-CX', '1000BASE-KX', '1000BASE-T', '10GBASE-X', '10GBASE-LX4', '10GBASE-KX4', '10GBASE-R', '10GBASE-ER', '10GBASE-LR', '10GBASE-SR', '10GBASE-LRM', '10GBASE-KR', '10GBASE-T', '10GBASE-PR-D1', '10GBASE-PR-D2', '10GBASE-PR-D3', '10GBASE-PR-D4', '10GBASE-PR-U1', '10GBASE-PR-U2', '10GBASE-PR-U3', '10GBASE-PR-U4', '40GBASE-R', '40GBASE-KR4', '40GBASE-CR4', '40GBASE-SR4', '4x10GBASE-SR', '40GBASE-LR4', '40GBASE-ER4', '40GBASE-FR', '100GBASE-R', '100GBASE-CR4', '100GBASE-KR4', '100GBASE-KP4', '100GBASE-CR10', '100GBASE-SR4', '100GBASE-SR10', '2x40GBASE-SR', '10x10GBASE-SR', '12x10GBASE-SR', '100GBASE-LR4', '100GBASE-ER4' and 'NOT_YET_DEFINED.
+ NOT supported: '2BASE-TL', '10PASS-TS', '1000BASE-PX10-D', '1000BASE-PX10-U', '1000BASE-PX20-D', '1000BASE-PX20-U', '1000BASE-PX30-D', '1000BASE-PX30-U', '1000BASE-PX40-D', '1000BASE-PX40-U', '10GBASE-W', '10GBASE-EW', '10GBASE-LW', '10GBASE-SW', '10/1GBASE-PRX-D1', '10/1GBASE-PRX-D2', '10/1GBASE-PRX-D3', '10/1GBASE-PRX-D4', '10/1GBASE-PRX-U1', '10/1GBASE-PRX-U2', '10/1GBASE-PRX-U3' and '10/1GBASE-PRX-U4'.
+
+ Copyright 2019 openBackhaul.com
+
+ Licensed under the Apache License, Version 2.0 (the 'License');
+ you may not use this file except in compliance with the License.
+ You may obtain a copy of the License at
+ http://www.apache.org/licenses/LICENSE-2.0
+ Unless required by applicable law or agreed to in writing, software
+ distributed under the License is distributed on an 'AS IS' BASIS,
+ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ See the License for the specific language governing permissions and
+ limitations under the License.";
+
+ revision 2020-01-23 {
+ description
+ "Model for the Transport SDN Pilot at Telefonica Germany.
+ Please view https://github.com/openBackhaul/wireInterface/issues for changes.";
+ reference
+ "https://github.com/openBackhaul/wireInterface/tree/tsp: Model definition
+ https://github.com/openBackhaul/onfCoreIm/tree/tsp: ONF TR-512 Core IM incl. Profile and enhanced Equipment definition";
+ }
+ revision 2019-11-22 {
+ description
+ "Model for the Transport SDN Pilot at Telefonica Germany.
+ Please view https://github.com/openBackhaul/wireInterface/issues for changes.";
+ reference
+ "https://github.com/openBackhaul/wireInterface/tree/tsp: Model definition
+ https://github.com/openBackhaul/onfCoreIm/tree/tsp: ONF TR-512 Core IM incl. Profile and enhanced Equipment definition";
+ }
+ revision 2019-10-30 {
+ description
+ "Model for the Transport SDN Pilot at Telefonica Germany.
+ Please view https://github.com/openBackhaul/wireInterface/issues for changes.";
+ reference
+ "https://github.com/openBackhaul/wireInterface/tree/tsp: Model definition
+ https://github.com/openBackhaul/onfCoreIm/tree/tsp: ONF TR-512 Core IM incl. Profile and enhanced Equipment definition";
+ }
+ revision 2019-07-11 {
+ description
+ "Model for the Transport SDN Pilot at Telefonica Germany.
+ Please view https://github.com/openBackhaul/wireInterface/issues for changes.";
+ reference
+ "https://github.com/openBackhaul/wireInterface/tree/tsp: Model definition
+ https://github.com/openBackhaul/onfCoreIm/tree/tsp: ONF TR-512 Core IM incl. Profile and enhanced Equipment definition";
+ }
+
+ identity LAYER_PROTOCOL_NAME_TYPE_WIRE_LAYER {
+ base core-model:LAYER_PROTOCOL_NAME_TYPE;
+ description
+ "none";
+ }
+
+ augment "/core-model:control-construct/core-model:logical-termination-point/core-model:layer-protocol" {
+ when "derived-from-or-self(./core-model:layer-protocol-name, 'wire-interface:LAYER_PROTOCOL_NAME_TYPE_WIRE_LAYER')";
+ uses wire-interface-lp-spec;
+ description
+ "none";
+ }
+
+ /****************************************
+ * package notifications
+ **************************************/
+
+ notification object-creation-notification {
+ uses object-creation-notification;
+ description
+ "none";
+ }
+
+ grouping object-creation-notification {
+ leaf counter {
+ type int32;
+ default "-1";
+ config false;
+ description
+ "Counts object creation notifications.";
+ }
+ leaf timestamp {
+ type yang:date-and-time;
+ default "2010-11-20T14:00:00+01:00";
+ config false;
+ description
+ "none";
+ }
+ leaf object-id-ref {
+ type leafref {
+ path "/core-model:control-construct/core-model:logical-termination-point/core-model:uuid";
+ require-instance false;
+ }
+ config false;
+ description
+ "none";
+ }
+ leaf object-type {
+ type string;
+ default "Type of created object not specified.";
+ config false;
+ description
+ "none";
+ }
+ description
+ "none";
+ }
+
+ notification object-deletion-notification {
+ uses object-deletion-notification;
+ description
+ "none";
+ }
+
+ grouping object-deletion-notification {
+ leaf counter {
+ type int32;
+ default "-1";
+ config false;
+ description
+ "Counts object deletion notifications.";
+ }
+ leaf timestamp {
+ type yang:date-and-time;
+ default "2010-11-20T14:00:00+01:00";
+ config false;
+ description
+ "none";
+ }
+ leaf object-id-ref {
+ type leafref {
+ path "/core-model:control-construct/core-model:logical-termination-point/core-model:uuid";
+ require-instance false;
+ }
+ config false;
+ description
+ "none";
+ }
+ description
+ "none";
+ }
+
+ notification attribute-value-changed-notification {
+ uses attribute-value-changed-notification;
+ description
+ "none";
+ }
+
+ grouping attribute-value-changed-notification {
+ leaf counter {
+ type int32;
+ default "-1";
+ config false;
+ description
+ "Counts attribute value changed notifications.";
+ }
+ leaf timestamp {
+ type yang:date-and-time;
+ default "2010-11-20T14:00:00+01:00";
+ config false;
+ description
+ "none";
+ }
+ leaf object-id-ref {
+ type leafref {
+ path "/core-model:control-construct/core-model:logical-termination-point/core-model:uuid";
+ require-instance false;
+ }
+ config false;
+ description
+ "none";
+ }
+ leaf attribute-name {
+ type string;
+ default "Attribute name not specified.";
+ config false;
+ description
+ "Name of the attribute that has been changed.";
+ }
+ leaf new-value {
+ type string;
+ default "New value not specified.";
+ config false;
+ description
+ "Attribute value converted to a string (xml, json, ...)";
+ }
+ description
+ "none";
+ }
+
+ notification problem-notification {
+ uses problem-notification;
+ description
+ "none";
+ }
+
+ grouping problem-notification {
+ leaf counter {
+ type int32;
+ default "-1";
+ config false;
+ description
+ "Counts problem notifications";
+ }
+ leaf timestamp {
+ type yang:date-and-time;
+ default "2010-11-20T14:00:00+01:00";
+ config false;
+ description
+ "none";
+ }
+ leaf object-id-ref {
+ type leafref {
+ path "/core-model:control-construct/core-model:logical-termination-point/core-model:uuid";
+ require-instance false;
+ }
+ config false;
+ description
+ "none";
+ }
+ leaf problem {
+ type string;
+ default "Problem name not specified.";
+ config false;
+ description
+ "Name of the problem according to supportedAlarmList";
+ }
+ leaf severity {
+ type severity-type;
+ default "SEVERITY_TYPE_WARNING";
+ config false;
+ description
+ "Severity of the problem according to problemKindSeverity";
+ }
+ description
+ "none";
+ }
+
+ /****************************************
+ * grouping statements for object classes
+ **************************************/
+ /****************************************
+ * package super-classes
+ **************************************/
+
+ grouping current-problem {
+ leaf sequence-number {
+ type int16;
+ config false;
+ description
+ "Unique sequence number of the current problem object.";
+ }
+ leaf timestamp {
+ type yang:date-and-time;
+ default "2010-11-20T14:00:00+01:00";
+ config false;
+ description
+ "Time when the alarm was raised";
+ }
+ leaf problem-severity {
+ type severity-type;
+ default "SEVERITY_TYPE_NOT_YET_DEFINED";
+ config false;
+ description
+ "Severity of the alarm.";
+ }
+ description
+ "none";
+ }
+
+ grouping current-performance {
+ leaf timestamp {
+ type yang:date-and-time;
+ default "2010-11-20T14:00:00+01:00";
+ config false;
+ description
+ "The timestamp associated with when the current data was collected.";
+ }
+ leaf suspect-interval-flag {
+ type boolean;
+ default "false";
+ config false;
+ description
+ "This attribute is used to indicate that the performance data for the current period may not be reliable. Some reasons for this to occur are:
+ – Suspect data were detected by the actual resource doing data collection.
+ – Transition of the administrativeState attribute to/from the 'lock' state.
+ – Transition of the operationalState to/from the 'disabled' state.
+ – Scheduler setting that inhibits the collection function.
+ – The performance counters were reset during the interval.
+ – The currentData (or subclass) object instance was created during the monitoring period.";
+ }
+ leaf elapsed-time {
+ type int64;
+ units "s";
+ default "-1";
+ config false;
+ description
+ "Number of seconds that elapsed since the last reset of the counter.";
+ }
+ leaf scanner-id {
+ type string;
+ default "Scanner ID not defined.";
+ config false;
+ description
+ "none";
+ }
+ leaf granularity-period {
+ type granularity-period-type;
+ config false;
+ description
+ "Time period between reset of the underlying counter.";
+ }
+ description
+ "none";
+ }
+
+ grouping historical-performance {
+ leaf suspect-interval-flag {
+ type boolean;
+ default "false";
+ config false;
+ description
+ "This attribute indicates that the data collected during the interval is suspect.";
+ }
+ leaf history-data-id {
+ type string;
+ default "History Data ID not defined.";
+ config false;
+ description
+ "none";
+ }
+ leaf granularity-period {
+ type granularity-period-type;
+ config false;
+ description
+ "Time period between reset of the underlying counter.";
+ }
+ leaf period-end-time {
+ type yang:date-and-time;
+ config false;
+ description
+ "Time when the counter values have been recorded and the counter reset.";
+ }
+ description
+ "none";
+ }
+
+ grouping wire-interface-lp-spec {
+ container wire-interface-pac {
+ uses wire-interface-pac;
+ description
+ "none";
+ }
+ description
+ "none";
+ }
+
+ grouping wire-interface-pac {
+ container wire-interface-capability {
+ config false;
+ uses wire-interface-capability;
+ description
+ "none";
+ }
+ container wire-interface-configuration {
+ uses wire-interface-configuration;
+ description
+ "none";
+ }
+ container wire-interface-status {
+ config false;
+ uses wire-interface-status;
+ description
+ "none";
+ }
+ container wire-interface-current-problems {
+ config false;
+ uses wire-interface-current-problems;
+ description
+ "none";
+ }
+ container wire-interface-current-performance {
+ config false;
+ uses wire-interface-current-performance;
+ description
+ "none";
+ }
+ container wire-interface-historical-performances {
+ config false;
+ uses wire-interface-historical-performances;
+ description
+ "none";
+ }
+ description
+ "none";
+ }
+
+ grouping wire-interface-capability {
+ list supported-pmd-kind-list {
+ key "pmd-name";
+ config false;
+ min-elements 1;
+ uses pmd-kind;
+ description
+ "List of Physical Medium Dependent (PMD) that can be operated";
+ }
+ leaf auto-pmd-negotiation-is-avail {
+ type boolean;
+ default "false";
+ config false;
+ description
+ "1 = device is supporting auto-negotiation";
+ }
+ leaf auto-negotiation-pmd-selection-is-avail {
+ type boolean;
+ default "false";
+ config false;
+ description
+ "1 = device is supporting restricting auto-negotiation on a pre-defined list of PMDs";
+ }
+ leaf-list supported-signal-ordering-kind-list {
+ type signal-ordering-kind-type;
+ config false;
+ min-elements 1;
+ description
+ "Describes the different (e.g. MDI, MDI-X) ways of ordering the signals on the physical medium";
+ }
+ leaf auto-signal-ordering-is-avail {
+ type boolean;
+ default "false";
+ config false;
+ description
+ "1 = there is a mechanism for automatically crossing over tx and rx implemented";
+ }
+ leaf configuration-of-rx-sync-preference-is-avail {
+ type boolean;
+ default "false";
+ config false;
+ description
+ "1 = Configuration of the behavior during the synchronization of transmitter and receiver is available. This attribute has nothing to do with clock signals.";
+ }
+ leaf mii-kind {
+ type mii-kind-type;
+ default "MII_KIND_TYPE_NOT_YET_DEFINED";
+ config false;
+ description
+ "Kind of Medium Independent Interface (MII) provided by this Medium Attachment Unit (MAU) (e.g. SFP, moldered port)";
+ }
+ leaf mdi-kind {
+ type mdi-kind-type;
+ default "MDI_KIND_TYPE_NOT_YET_DEFINED";
+ config false;
+ description
+ "Kind of Medium Dependent Interface (MDI) provided by this Medium Attachment Unit (MAU)";
+ }
+ leaf required-medium-kind {
+ type medium-kind-type;
+ default "MEDIUM_KIND_TYPE_NOT_YET_DEFINED";
+ config false;
+ description
+ "Kind of medium required for operating this Medium Attachment Unit (MAU), more like an information field";
+ }
+ leaf-list wavelength-min-list {
+ type int32;
+ units "pm";
+ default "-1";
+ config false;
+ max-elements 3;
+ description
+ "Source: SFF-8690. Minimum laser wavelength in pico meter, -1 = not applicable, 0 = not known, if (wavelengthMin==wavelengthMax): wavelength cannot be configured; multiplicity=0..3 for 10GBASE-LX4 according to 802.3 53.5. Value to be read from the EPROM of the SFP.";
+ }
+ leaf-list wavelength-max-list {
+ type int32;
+ units "pm";
+ default "-1";
+ config false;
+ max-elements 3;
+ description
+ "Source: SFF-8690. Maximum laser wavelength in pico meter, -1 = not applicable, 0 = not known, if (wavelengthMax==wavelengthMin): wavelength cannot be configured; multiplicity=0..3 for 10GBASE-LX4 according to 802.3 53.5. Value to be read from the EPROM of the SFP.";
+ }
+ leaf wavelength-grid-min {
+ type int32;
+ units "pm";
+ default "-1";
+ config false;
+ description
+ "Source: SFF-8690. Minimum grid spacing supported by the transceiver, -1 = not applicable, 0 = not known";
+ }
+ leaf short-reach-mode-is-avail {
+ type boolean;
+ default "false";
+ config false;
+ description
+ "1 = Indicates that Short Reach Mode for 10GBASE-T according to 802.3 45.2.1.64 is available";
+ }
+ leaf eee-is-avail {
+ type boolean;
+ default "false";
+ config false;
+ description
+ "1 = Indicates that Energy-Efficient Ethernet (EEE) is available at the device.";
+ }
+ leaf unidirectional-operation-is-avail {
+ type boolean;
+ default "false";
+ config false;
+ description
+ "Source: 802.3. 1 = Medium Attachment Unit (MAU) able to transmit from Media Independent Interface (MII) regardless of whether the MAU has determined that a valid link has been established, 0 = MAU able to transmit from MII only when the MAU has determined that a valid link has been established";
+ }
+ leaf rxlevel-low-threshold {
+ type int8;
+ units "dBm";
+ default "99";
+ config false;
+ description
+ "Threshold for alarming low RX levels. Value pre-defined by SFP manufacturer (SFF- 8472)";
+ }
+ leaf rxlevel-high-threshold {
+ type int8;
+ units "dBm";
+ default "99";
+ config false;
+ description
+ "Threshold for alarming high RX levels. Value pre-defined by SFP manufacturer (SFF- 8472)";
+ }
+ leaf temperature-low-threshold {
+ type int8;
+ units "Celsius";
+ default "-99";
+ config false;
+ description
+ "Threshold for alarming low temperature values. Value pre-defined by SFP manufacturer (SFF- 8472)
+ Might move to somewhere in the Physical Segment of the Core IM";
+ }
+ leaf temperature-high-threshold {
+ type int8;
+ units "Celsius";
+ default "-99";
+ config false;
+ description
+ "Threshold for alarming high temperature values. Value pre-defined by SFP manufacturer (SFF- 8472)
+ Might move to somewhere in the Physical Segment of the Core IM";
+ }
+ leaf configuration-of-number-of-bip-errors-per-ses-is-avail {
+ type boolean;
+ default "false";
+ config false;
+ description
+ "1 = SET operation on the Line SES threshold defined by aLineSESThreshold in 30.8.1.1.11 of 802.3-2015 is available.";
+ }
+ leaf admin-shut-down-is-avail {
+ type boolean;
+ default "false";
+ config false;
+ description
+ "1 = Manual switching on and off of the interface without deleting it (underlying OSI network layers are also not affected) is available.";
+ }
+ leaf isolation-is-avail {
+ type boolean;
+ default "false";
+ config false;
+ description
+ "1 = Separation of the PHY from higher network layers is supported by the device. Maintenance feature. Source: 802.3. ";
+ }
+ leaf-list supported-loop-back-kind-list {
+ type loop-back-type;
+ config false;
+ min-elements 1;
+ max-elements 5;
+ description
+ "Source: 802.3 45.2.1.12.1 PMA remote loopback ability. List of supported kinds of looping back of header information to the remote site.";
+ }
+ leaf maintenance-timer-range {
+ type string;
+ default "Range of the maintenance timer not yet defined.";
+ config false;
+ description
+ "Available time periods for maintenance configurations (e.g. the loop back) to be described. Concrete values shall be separated by commas (e.g. '10, 60, 360'). Ranges shall be expressed as two values separated by a minus (e.g. '10-360').";
+ }
+ leaf-list supported-alarm-list {
+ type string;
+ config false;
+ min-elements 1;
+ description
+ "Available alarms to be listed. Mandatory: 'rxLos'. Optional: 'txFault', 'tempHigh', 'tempLow', 'rxLevelHigh', 'rxLevelLow', 'vccHigh', 'vccLow', 'txBiasHigh', 'txBiasLow', 'txPowerHigh', 'txPowerLow', 'laserTempHigh', 'laserTempLow', 'tecCurrentHigh', 'tecCurrentLow'. Further alarms might be added by the device.";
+ }
+ leaf performance-monitoring-is-avail {
+ type boolean;
+ default "false";
+ config false;
+ description
+ "1 = Collection and aggregation of performance values is available.";
+ }
+ description
+ "none";
+ }
+
+ grouping wire-interface-configuration {
+ leaf interface-name {
+ type string;
+ default "Interface name not yet defined.";
+ description
+ "Description of the interface, could be a name, could be a number. Free text field to be filled by the operator.";
+ }
+ leaf interface-is-on {
+ type boolean;
+ default "false";
+ description
+ "Source: 802.3 according 30.3.2.2.1 acPhyAdminControl. 1 = Activation of the interface (it gets powered and can be managed even if the transceiver is not yet transmitting or receiving). In case there is no Medium Attachment Unit (MAU) (e.g. no SFP in the cage) SETting (interfaceIsOn=1) must be ignored and GETing must return (interfaceIsOn=0)";
+ }
+ leaf remote-wire-interface-name {
+ type string;
+ default "Remote wire interface name not yet defined.";
+ description
+ "Text field for defining the wire interface this one is connected with. Ideally used for entering unique numbers or names for unambiguously identifying the connection within the network";
+ }
+ leaf-list transceiver-is-on-list {
+ type boolean;
+ default "false";
+ max-elements 11;
+ description
+ "Source: 802.3 45.2.1.8 PMD transmit disable register (Register 1.9). 1 = Activation of the transmitter and receiver (e.g. laser) of the PHY; transceiverIsOnList[0]:total interface; transceiverIsOnList[1..10] different lanes of a multilane Medium Attachment Unit (MAU)";
+ }
+ leaf auto-pmd-negotiation-is-on {
+ type boolean;
+ default "false";
+ description
+ "Only relevant if (autoPmdNegotiationIsAvail == 1). 1 = Auto-negotiation is switched on";
+ }
+ leaf fixed-pmd-kind {
+ type leafref {
+ path "/core-model:control-construct/core-model:logical-termination-point/core-model:layer-protocol/wire-interface:wire-interface-pac/wire-interface:wire-interface-capability/wire-interface:supported-pmd-kind-list/wire-interface:pmd-name";
+ require-instance false;
+ }
+ must 'boolean(/core-model:control-construct/core-model:logical-termination-point/core-model:layer-protocol/wire-interface:wire-interface-pac/wire-interface:wire-interface-capability/wire-interface:supported-pmd-kind-list[pmd-name=current()])';
+ description
+ "If (autoPmdNegotiationIsOn==0) : Configuration of the concrete kind of Physical Medium Dependent (PMD). If (autoNegotiationIsOn=1) value of this field becomes irrelevant";
+ }
+ leaf-list auto-negotiation-pmd-list {
+ type leafref {
+ path "/core-model:control-construct/core-model:logical-termination-point/core-model:layer-protocol/wire-interface:wire-interface-pac/wire-interface:wire-interface-capability/wire-interface:supported-pmd-kind-list/wire-interface:pmd-name";
+ require-instance false;
+ }
+ must 'boolean(/core-model:control-construct/core-model:logical-termination-point/core-model:layer-protocol/wire-interface:wire-interface-pac/wire-interface:wire-interface-capability/wire-interface:supported-pmd-kind-list[pmd-name=current()])';
+ description
+ "If (autoPmdNegotiationIsOn==1) AND (autoNegotiationPmdSelectionIsAvail==1), this list defines the selection of PMDs the automated negotiation process is allowed to choose from. If no entry, the automated negotiation process is allowed to choose from all available PMDs.";
+ }
+ leaf auto-signal-ordering-is-on {
+ type boolean;
+ default "false";
+ description
+ "Only relevant if (autoSignalOrderingIsAvail == 1). 1 = e.g. auto-MDI-X is switched on";
+ }
+ leaf fixed-signal-ordering-kind {
+ type signal-ordering-kind-type;
+ default "SIGNAL_ORDERING_KIND_TYPE_NOT_YET_DEFINED";
+ description
+ "If (autoSignalOrderingIsOn==0) configuration of the concrete kind of signal ordering on the media (e.g. MDI, or MDI-X). If (autoSignalOrderingIsOn=1) value of this field becomes irrelevant";
+ }
+ leaf-list wavelength-list {
+ type int32;
+ units "pm";
+ default "-1";
+ max-elements 3;
+ description
+ "Source: SFF-8690. Wavelength of the signal of laser in pico meter; multiplicity=0..3 for 10GBASE-LX4 according to 802.3 53.5";
+ }
+ leaf rx-sync-preference {
+ type rx-sync-preference-type;
+ default "RX_SYNC_PREFERENCE_TYPE_NOT_YET_DEFINED";
+ description
+ "Source: 802.3. Only relevant if (configurationOfRxSyncPreferenceIsAvail == 1). Configuration of the behavior during the negotiation of the wire interface (master), which is sending a continuous stream of symbols for the remote site (slave) to synchronize its receiver on it. This attribute is for synchronizing transmitter and receiver and has nothing to do with clock signals.";
+ }
+ leaf short-reach-mode-is-on {
+ type boolean;
+ default "false";
+ description
+ "Only relevant if (shortReachModeIsAvail == 1). Activation of the Short Reach Mode for 10GBASE-T according to 802.3 45.2.1.64";
+ }
+ leaf eee-is-on {
+ type boolean;
+ default "false";
+ description
+ "Only relevant if (eeeIsAvail == 1). 1 = Energy Efficient Ethernet is activated\n";
+ }
+ leaf unidirectional-operation-is-on {
+ type boolean;
+ default "false";
+ description
+ "Source: 802.3. Only relevant if (unidirectionalOperationIsAvail == 1). 1 = Enable transmit from media independent interface regardless of whether the PHY has determined that a valid link has been established, 0 = Enable transmit from media independent interface only when the PHY has determined that a valid link has been established";
+ }
+ leaf number-of-bip-errors-per-ses {
+ type int16;
+ default "-1";
+ description
+ "Only relevant if (configurationOfNumberOfBipErrorsPerSesIsAvail == 1). SET operation on the Line SES threshold defined by aLineSESThreshold in 30.8.1.1.11 of 802.3-2015. This attribute configures the minimum number of BIP errors that have to occur in one second to count this second as a SES instead of an ES. According to 802.3, a value of 9835 should be the hardware default value, which should also apply after restarting the interface.";
+ }
+ leaf restart-pmd-negotiation-is-on {
+ type boolean;
+ default "false";
+ description
+ "Source: 802.3. Restarts the auto negotiation process";
+ }
+ leaf isolation-is-on {
+ type boolean;
+ default "false";
+ description
+ "Maintenance Feature. Only relevant if (isolationIsAvail == 1). Source: 802.3. 1 = Activation of the separation of the PHY from higher network layers. Maintenance feature.";
+ }
+ leaf loop-back-kind-on {
+ type loop-back-type;
+ default "LOOP_BACK_TYPE_NONE";
+ description
+ "Maintenance Feature. Source:802.3 according 22.2.4.1.2 Loopback. The currently configured type of looping back of the wire interface header shall be expressed here. The received header is returned to the remote site.";
+ }
+ leaf maintenance-timer {
+ type int32;
+ units "s";
+ default "-1";
+ description
+ "Time of existence of any maintenance configuration (e.g. the loop back). Valid values are defined in WireInterface::WireInterfaceCapability::maintenanceTimerRange. In case the hardware would implement just a single timer for maintenance at all kinds and instances of interfaces, this attribute should affect this single timer.";
+ }
+ list problem-kind-severity-list {
+ key "problem-kind-name";
+ min-elements 1;
+ uses problem-kind-severity-type;
+ description
+ "Severity of the problem to be configured.";
+ }
+ leaf performance-monitoring-is-on {
+ type boolean;
+ default "false";
+ description
+ "Only relevant if (performanceMonitoringIsAvail==1). 1 = Collection and aggregation of performance values is switched on.";
+ }
+ description
+ "none";
+ }
+
+ grouping wire-interface-status {
+ leaf interface-status {
+ type interface-status-type;
+ default "INTERFACE_STATUS_TYPE_NOT_YET_DEFINED";
+ config false;
+ description
+ "Source: 802.3 according 30.3.2.1.7 aPhyAdminState. 1 = A Physical layer entity (PHY) exists (including Medium Attachment Unit (e.g. SFP) ) and it is powered and can be managed";
+ }
+ leaf-list receive-signal-is-detected-list {
+ type boolean;
+ default "false";
+ config false;
+ max-elements 11;
+ description
+ "Source: 802.3 45.2.1.9 PMD receive signal detect. 1 = Receiver (e.g. laser) detects signal; receiveSignalIsDetected[0]:total interface; receiveSignalIsDetected[1..10] different lanes of a multilane Medium Attachment Unit (MAU)";
+ }
+ leaf pmd-negotiation-state {
+ type pmd-negotiation-state-type;
+ default "PMD_NEGOTIATION_STATE_TYPE_NOT_YET_DEFINED";
+ config false;
+ description
+ "Source: 802.3. Status of the Physical Medium Dependent (PMD) negotiation process (auto-neg)";
+ }
+ leaf pmd-is-up {
+ type boolean;
+ default "false";
+ config false;
+ description
+ "Source: Inverse of 802.3 45.2.1.2.3 Fault (1.1.7). If (interfaceIsUp==1) BUT (pmdIsUp==0) : there is a fault in either transmit or receive path";
+ }
+ leaf pmd-kind-cur {
+ type leafref {
+ path "/core-model:control-construct/core-model:logical-termination-point/core-model:layer-protocol/wire-interface:wire-interface-pac/wire-interface:wire-interface-capability/wire-interface:supported-pmd-kind-list/wire-interface:pmd-name";
+ require-instance false;
+ }
+ config false;
+ description
+ "Indicates the kind of Physical Medium Dependent (PMD) currently operated at this interface";
+ }
+ leaf signal-ordering-kind-cur {
+ type signal-ordering-kind-type;
+ default "SIGNAL_ORDERING_KIND_TYPE_NOT_YET_DEFINED";
+ config false;
+ description
+ "Reference on a SignalOrderingType for expressing the currently active way of ordering the signals on the physical medium.";
+ }
+ leaf rx-sync-role {
+ type rx-sync-role-type;
+ default "RX_SYNC_ROLE_TYPE_NOT_YET_DEFINED";
+ config false;
+ description
+ "Indicates the result of the negotiation of the wire interface (master), which is sending a continuous stream of symbols for the remote site (slave) synchronizing its receiver on it";
+ }
+ leaf eee-is-up {
+ type boolean;
+ default "false";
+ config false;
+ description
+ "1 = Energy Efficient Ethernet is supported at both ends of the link and it is activated";
+ }
+ leaf link-is-up {
+ type boolean;
+ default "false";
+ config false;
+ description
+ "If (transceiverIsUp==1) AND (linkIsUp==1) : communication is established to the remote site";
+ }
+ leaf link-is-idle {
+ type boolean;
+ default "false";
+ config false;
+ description
+ "If (linkIsUp==1) AND (eeeIsAvail==1) AND (eeeIsOn==1) AND (linkIsIdle==1) : link is currently in idle mode. If Energy Efficient Ethernet is not supported or switched off, this attribute must be 0.";
+ }
+ leaf loop-back-kind-up {
+ type loop-back-type;
+ default "LOOP_BACK_TYPE_NONE";
+ config false;
+ description
+ "The currently active (not just configured) type of looping back of the wire interface header shall be expressed here. The received header is returned to the remote site.";
+ }
+ leaf tx-level-cur {
+ type int8;
+ units "dBm";
+ default "99";
+ config false;
+ description
+ "Current transmit power";
+ }
+ leaf-list rx-level-cur-list {
+ type int8;
+ units "dBm";
+ default "99";
+ config false;
+ max-elements 4;
+ description
+ "Current receive power; Also used for receive signal power measured at the Medium Dependent Interface (MDI) of 10GBASE-T during training as described in 802.3 55.4.3.1";
+ }
+ leaf performance-monitoring-is-up {
+ type boolean;
+ default "false";
+ config false;
+ description
+ "1 = Performance values are currently collected and aggregated.";
+ }
+ description
+ "none";
+ }
+
+ grouping wire-interface-current-problems {
+ list current-problem-list {
+ key "sequence-number";
+ config false;
+ uses wire-interface-current-problem-type;
+ description
+ "none";
+ }
+ leaf number-of-current-problems {
+ type int8;
+ default "-1";
+ config false;
+ description
+ "Number of alarms, which are currently active on this interface.";
+ }
+ leaf time-of-latest-change {
+ type yang:date-and-time;
+ default "2010-11-20T14:00:00+01:00";
+ config false;
+ description
+ "Date and time when the list of alarms has been changed for the last time.";
+ }
+ description
+ "none";
+ }
+
+ grouping wire-interface-current-performance {
+ list current-performance-data-list {
+ key "granularity-period";
+ config false;
+ min-elements 1;
+ max-elements 2;
+ uses wire-interface-current-performance-type;
+ description
+ "At least values of the counters, which are reset every 15 minutes, are to be provided. If available, the current values of the counters, which are reset every 24 hour, can be provided, too.";
+ }
+ leaf number-of-current-performance-sets {
+ type int8;
+ default "-1";
+ config false;
+ description
+ "Number of sets of current performance values, which are provided in the list.";
+ }
+ description
+ "Aggregated performance information of the air interface at a particular moment.";
+ }
+
+ grouping wire-interface-historical-performances {
+ list historical-performance-data-list {
+ key "granularity-period period-end-time";
+ config false;
+ uses wire-interface-historical-performance-type;
+ description
+ "none";
+ }
+ leaf number-of-historical-performance-sets {
+ type int16;
+ default "-1";
+ config false;
+ description
+ "Number of sets of historical performance values, which are provided in the list.";
+ }
+ leaf time-of-latest-change {
+ type yang:date-and-time;
+ default "2010-11-20T14:00:00+01:00";
+ config false;
+ description
+ "Date and time when the list of sets of historical performance values has been changed for the last time (e.g. new one added or existing one deleted).";
+ }
+ description
+ "Aggregated performance information of the air interface for a pre-defined measurement interval.";
+ }
+
+ grouping pmd-kind {
+ leaf pmd-name {
+ type string;
+ config false;
+ description
+ "To be chosen from the following list of PMD names according to IEEE 802.3 '10BASE5', 'FOIRL', '10BASE2', '10BROAD36', '10BASE-T', '10BASE-FP', '10BASE-FB', '10BASE-FL', '100BASE-T4', '100BASE-TX', '100BASE-BX10D', '100BASE-BX10U', '100BASE-FX', '100BASE-LX10', '100BASE-T2', '1000BASE-X', '1000BASE-BX10D', '1000BASE-BX10U', '1000BASE-LX', '1000BASE-LX10', '1000BASE-SX', '1000BASE-CX', '1000BASE-KX', '1000BASE-T', '10GBASE-X', '10GBASE-LX4', '10GBASE-KX4', '10GBASE-R', '10GBASE-ER', '10GBASE-LR', '10GBASE-SR', '10GBASE-LRM', '10GBASE-KR', '10GBASE-T', '10GBASE-PR-D1', '10GBASE-PR-D2', '10GBASE-PR-D3', '10GBASE-PR-D4', '10GBASE-PR-U1', '10GBASE-PR-U2', '10GBASE-PR-U3', '10GBASE-PR-U4', '40GBASE-R', '40GBASE-KR4', '40GBASE-CR4', '40GBASE-SR4', '4x10GBASE-SR', '40GBASE-LR4', '40GBASE-ER4', '40GBASE-FR', '100GBASE-R', '100GBASE-CR4', '100GBASE-KR4', '100GBASE-KP4', '100GBASE-CR10', '100GBASE-SR4', '100GBASE-SR10', '2x40GBASE-SR', '10x10GBASE-SR', '12x10GBASE-SR', '100GBASE-LR4', '100GBASE-ER4' and 'NOT_YET_DEFINED'. Some PMDs are distinguishing Full Duplex and Half Duplex. '_FD' and '_HD' are to be attached to the respective PMD name accordingly.";
+ }
+ leaf speed {
+ type string;
+ default "NOT_YET_DEFINED";
+ description
+ "Line speed of the PMD. Value to be chosen from '2Mbit/s', '10Mbit/s', '100Mbit/s', '1000Mbit/s', '10Gbit/s', '40Gbit/s', '100Gbit/s' or 'NOT_YET_DEFINED'. This field is not for calculation purposes, but for supporting selection of the correct PMD on application layer.";
+ }
+ leaf duplex {
+ type duplex-type;
+ default "DUPLEX_TYPE_NOT_YET_DEFINED";
+ description
+ "To be expressed, whether the PMD is full duplex or just half duplex. This field is not for configuration purposes, but for supporting selection of the correct PMD on application layer.";
+ }
+ description
+ "none";
+ }
+
+ /****************************************
+ * typedef statements
+ **************************************/
+
+ typedef loop-back-type {
+ type identityref {
+ base LOOP_BACK_TYPE;
+ }
+ description
+ "none";
+ }
+
+ typedef rx-sync-preference-type {
+ type identityref {
+ base RX_SYNC_PREFERENCE_TYPE;
+ }
+ description
+ "none";
+ }
+
+ typedef rx-sync-role-type {
+ type identityref {
+ base RX_SYNC_ROLE_TYPE;
+ }
+ description
+ "none";
+ }
+
+ typedef mii-kind-type {
+ type identityref {
+ base MII_KIND_TYPE;
+ }
+ description
+ "none";
+ }
+
+ typedef mdi-kind-type {
+ type identityref {
+ base MDI_KIND_TYPE;
+ }
+ description
+ "none";
+ }
+
+ typedef medium-kind-type {
+ type identityref {
+ base MEDIUM_KIND_TYPE;
+ }
+ description
+ "none";
+ }
+
+ typedef duplex-type {
+ type identityref {
+ base DUPLEX_TYPE;
+ }
+ description
+ "none";
+ }
+
+ typedef signal-ordering-kind-type {
+ type identityref {
+ base SIGNAL_ORDERING_KIND_TYPE;
+ }
+ description
+ "none";
+ }
+
+ typedef pmd-negotiation-state-type {
+ type identityref {
+ base PMD_NEGOTIATION_STATE_TYPE;
+ }
+ description
+ "none";
+ }
+
+ /*********************************************
+ * grouping statements for complex data types
+ *******************************************/
+
+ identity LOOP_BACK_TYPE {
+ description
+ "none";
+ }
+
+ identity LOOP_BACK_TYPE_NONE {
+ base LOOP_BACK_TYPE;
+ description
+ "none";
+ }
+
+ identity LOOP_BACK_TYPE_EXTERNAL {
+ base LOOP_BACK_TYPE;
+ description
+ "Parameter
+ If the internal loopback test succeeds but the external loopback fails, the Medium Attachment Unit (MAU) is faulty (e.g. SFP has to be replaced)";
+ }
+
+ identity LOOP_BACK_TYPE_INTERNAL {
+ base LOOP_BACK_TYPE;
+ description
+ "Parameter
+ If the internal loopback test fails, the Data Terminal Equipment (DTE) is faulty (e.g. board has to be replaced)";
+ }
+
+ identity LOOP_BACK_TYPE_NOT_YET_DEFINED {
+ base LOOP_BACK_TYPE;
+ description
+ "none";
+ }
+
+ identity RX_SYNC_PREFERENCE_TYPE {
+ description
+ "none";
+ }
+
+ identity RX_SYNC_PREFERENCE_TYPE_AUTO_MULTIPORT_DEVICE {
+ base RX_SYNC_PREFERENCE_TYPE;
+ description
+ "Master/Slave relation is determined by auto-negotiation and this device has a preference for being Master";
+ }
+
+ identity RX_SYNC_PREFERENCE_TYPE_AUTO_SINGLE_PORT_DEVICE {
+ base RX_SYNC_PREFERENCE_TYPE;
+ description
+ "Master/Slave relation is determined by auto-negotiation and this device has a preference for being Slave";
+ }
+
+ identity RX_SYNC_PREFERENCE_TYPE_MANUAL_MASTER {
+ base RX_SYNC_PREFERENCE_TYPE;
+ description
+ "Master/Slave relation is determined by manual configuration and this device shall be Master";
+ }
+
+ identity RX_SYNC_PREFERENCE_TYPE_MANUAL_SLAVE {
+ base RX_SYNC_PREFERENCE_TYPE;
+ description
+ "Master/Slave relation is determined by manual configuration and this device shall be Slave";
+ }
+
+ identity RX_SYNC_PREFERENCE_TYPE_NOT_YET_DEFINED {
+ base RX_SYNC_PREFERENCE_TYPE;
+ description
+ "none";
+ }
+
+ identity RX_SYNC_ROLE_TYPE {
+ description
+ "none";
+ }
+
+ identity RX_SYNC_ROLE_TYPE_MASTER {
+ base RX_SYNC_ROLE_TYPE;
+ description
+ "none";
+ }
+
+ identity RX_SYNC_ROLE_TYPE_SLAVE {
+ base RX_SYNC_ROLE_TYPE;
+ description
+ "none";
+ }
+
+ identity RX_SYNC_ROLE_TYPE_FAULT {
+ base RX_SYNC_ROLE_TYPE;
+ description
+ "none";
+ }
+
+ identity RX_SYNC_ROLE_TYPE_NOT_YET_DEFINED {
+ base RX_SYNC_ROLE_TYPE;
+ description
+ "none";
+ }
+
+ identity MII_KIND_TYPE {
+ description
+ "none";
+ }
+
+ identity MII_KIND_TYPE_GBIC {
+ base MII_KIND_TYPE;
+ description
+ "none";
+ }
+
+ identity MII_KIND_TYPE_SOLDERED_CONNECTOR {
+ base MII_KIND_TYPE;
+ description
+ "none";
+ }
+
+ identity MII_KIND_TYPE_SFP_SFP_PLUS_SFP28 {
+ base MII_KIND_TYPE;
+ description
+ "none";
+ }
+
+ identity MII_KIND_TYPE_XBI_300_PIN {
+ base MII_KIND_TYPE;
+ description
+ "none";
+ }
+
+ identity MII_KIND_TYPE_XENPAK {
+ base MII_KIND_TYPE;
+ description
+ "none";
+ }
+
+ identity MII_KIND_TYPE_XFP {
+ base MII_KIND_TYPE;
+ description
+ "none";
+ }
+
+ identity MII_KIND_TYPE_XFP_E {
+ base MII_KIND_TYPE;
+ description
+ "none";
+ }
+
+ identity MII_KIND_TYPE_XPAK {
+ base MII_KIND_TYPE;
+ description
+ "none";
+ }
+
+ identity MII_KIND_TYPE_X2 {
+ base MII_KIND_TYPE;
+ description
+ "none";
+ }
+
+ identity MII_KIND_TYPE_DWDM_SFP_SFP_PLUS {
+ base MII_KIND_TYPE;
+ description
+ "none";
+ }
+
+ identity MII_KIND_TYPE_QSFP {
+ base MII_KIND_TYPE;
+ description
+ "none";
+ }
+
+ identity MII_KIND_TYPE_QSFP_PLUS {
+ base MII_KIND_TYPE;
+ description
+ "none";
+ }
+
+ identity MII_KIND_TYPE_CXP {
+ base MII_KIND_TYPE;
+ description
+ "none";
+ }
+
+ identity MII_KIND_TYPE_SHIELDED_MINI_MULTILANE_HD_4X {
+ base MII_KIND_TYPE;
+ description
+ "none";
+ }
+
+ identity MII_KIND_TYPE_SHIELDED_MINI_MULTILANE_HD__X {
+ base MII_KIND_TYPE;
+ description
+ "none";
+ }
+
+ identity MII_KIND_TYPE_QSFP28 {
+ base MII_KIND_TYPE;
+ description
+ "none";
+ }
+
+ identity MII_KIND_TYPE_CXP2 {
+ base MII_KIND_TYPE;
+ description
+ "none";
+ }
+
+ identity MII_KIND_TYPE_CDFP_STYLE1_STYLE2 {
+ base MII_KIND_TYPE;
+ description
+ "none";
+ }
+
+ identity MII_KIND_TYPE_SHIELDED_MINI_MULTILANE_HD_4X_FAN_OUT {
+ base MII_KIND_TYPE;
+ description
+ "none";
+ }
+
+ identity MII_KIND_TYPE_SHIELDED_MINI_MULTILANE_HD_8X_FAN_OUT {
+ base MII_KIND_TYPE;
+ description
+ "none";
+ }
+
+ identity MII_KIND_TYPE_CDFP_STYLE3 {
+ base MII_KIND_TYPE;
+ description
+ "none";
+ }
+
+ identity MII_KIND_TYPE_QSFP_MICRO {
+ base MII_KIND_TYPE;
+ description
+ "none";
+ }
+
+ identity MII_KIND_TYPE_QSFP_DD {
+ base MII_KIND_TYPE;
+ description
+ "none";
+ }
+
+ identity MII_KIND_TYPE_QSFP_PLUS_RATE_SELECT_V1 {
+ base MII_KIND_TYPE;
+ description
+ "none";
+ }
+
+ identity MII_KIND_TYPE_QSFP_PLUS_RATE_SELECT_V2 {
+ base MII_KIND_TYPE;
+ description
+ "none";
+ }
+
+ identity MII_KIND_TYPE_NOT_YET_DEFINED {
+ base MII_KIND_TYPE;
+ description
+ "none";
+ }
+
+ identity MDI_KIND_TYPE {
+ description
+ "none";
+ }
+
+ identity MDI_KIND_TYPE_SC {
+ base MDI_KIND_TYPE;
+ description
+ "Subscriber Connector";
+ }
+
+ identity MDI_KIND_TYPE_FIBRE_CHANNEL_STYLE_1 {
+ base MDI_KIND_TYPE;
+ description
+ "Copper connector";
+ }
+
+ identity MDI_KIND_TYPE_FIBRE_CHANNEL_STYLE_2 {
+ base MDI_KIND_TYPE;
+ description
+ "Copper connector";
+ }
+
+ identity MDI_KIND_TYPE_BNC_TNC {
+ base MDI_KIND_TYPE;
+ description
+ "Bayonet/Threaded Neill-Concelman";
+ }
+
+ identity MDI_KIND_TYPE_FC {
+ base MDI_KIND_TYPE;
+ description
+ "Fibre Channel coax headers";
+ }
+
+ identity MDI_KIND_TYPE_FIBER_JACK {
+ base MDI_KIND_TYPE;
+ description
+ "none";
+ }
+
+ identity MDI_KIND_TYPE_LC {
+ base MDI_KIND_TYPE;
+ description
+ "Lucent Connector";
+ }
+
+ identity MDI_KIND_TYPE_MT_RJ {
+ base MDI_KIND_TYPE;
+ description
+ "Mechanical Transfer - Registered Jack";
+ }
+
+ identity MDI_KIND_TYPE_MU {
+ base MDI_KIND_TYPE;
+ description
+ "Multiple Optical";
+ }
+
+ identity MDI_KIND_TYPE_SG {
+ base MDI_KIND_TYPE;
+ description
+ "none";
+ }
+
+ identity MDI_KIND_TYPE_OPTICAL_PIGTAIL {
+ base MDI_KIND_TYPE;
+ description
+ "none";
+ }
+
+ identity MDI_KIND_TYPE_MPO1x12 {
+ base MDI_KIND_TYPE;
+ description
+ "Multifiber Parallel Optic";
+ }
+
+ identity MDI_KIND_TYPE_MPO2x16 {
+ base MDI_KIND_TYPE;
+ description
+ "Multifiber Parallel Optic";
+ }
+
+ identity MDI_KIND_TYPE_HSSDC_II {
+ base MDI_KIND_TYPE;
+ description
+ "High Speed Serial Data Connector";
+ }
+
+ identity MDI_KIND_TYPE_COPPER_PIGTAIL {
+ base MDI_KIND_TYPE;
+ description
+ "none";
+ }
+
+ identity MDI_KIND_TYPE_RJ45 {
+ base MDI_KIND_TYPE;
+ description
+ "8P8C, according to Clause 3 and Figures 1 through 5 of IEC 60603-7";
+ }
+
+ identity MDI_KIND_TYPE_NO_SEPERABLE_CONNECTOR {
+ base MDI_KIND_TYPE;
+ description
+ "none";
+ }
+
+ identity MDI_KIND_TYPE_MXC2x16 {
+ base MDI_KIND_TYPE;
+ description
+ "none";
+ }
+
+ identity MDI_KIND_TYPE_ST {
+ base MDI_KIND_TYPE;
+ description
+ "according to IEC 60874-10:1992, also often called BFOC/2.5";
+ }
+
+ identity MDI_KIND_TYPE_NOT_YET_DEFINED {
+ base MDI_KIND_TYPE;
+ description
+ "none";
+ }
+
+ identity MEDIUM_KIND_TYPE {
+ description
+ "none";
+ }
+
+ identity MEDIUM_KIND_TYPE_TP_CAT3 {
+ base MEDIUM_KIND_TYPE;
+ description
+ "none";
+ }
+
+ identity MEDIUM_KIND_TYPE_TP_CAT5 {
+ base MEDIUM_KIND_TYPE;
+ description
+ "none";
+ }
+
+ identity MEDIUM_KIND_TYPE_TP_CAT6 {
+ base MEDIUM_KIND_TYPE;
+ description
+ "none";
+ }
+
+ identity MEDIUM_KIND_TYPE_TP_CAT8 {
+ base MEDIUM_KIND_TYPE;
+ description
+ "none";
+ }
+
+ identity MEDIUM_KIND_TYPE_SINGLE_MODE {
+ base MEDIUM_KIND_TYPE;
+ description
+ "none";
+ }
+
+ identity MEDIUM_KIND_TYPE_MULTI_MODE {
+ base MEDIUM_KIND_TYPE;
+ description
+ "none";
+ }
+
+ identity MEDIUM_KIND_TYPE_NOT_YET_DEFINED {
+ base MEDIUM_KIND_TYPE;
+ description
+ "none";
+ }
+
+ identity DUPLEX_TYPE {
+ description
+ "none";
+ }
+
+ identity DUPLEX_TYPE_HALF_DUPLEX {
+ base DUPLEX_TYPE;
+ description
+ "none";
+ }
+
+ identity DUPLEX_TYPE_FULL_DUPLEX {
+ base DUPLEX_TYPE;
+ description
+ "none";
+ }
+
+ identity DUPLEX_TYPE_NOT_YET_DEFINED {
+ base DUPLEX_TYPE;
+ description
+ "none";
+ }
+
+ identity SIGNAL_ORDERING_KIND_TYPE {
+ description
+ "none";
+ }
+
+ identity SIGNAL_ORDERING_KIND_TYPE_MDI {
+ base SIGNAL_ORDERING_KIND_TYPE;
+ description
+ "none";
+ }
+
+ identity SIGNAL_ORDERING_KIND_TYPE_MDI_X {
+ base SIGNAL_ORDERING_KIND_TYPE;
+ description
+ "none";
+ }
+
+ identity SIGNAL_ORDERING_KIND_TYPE_NOT_YET_DEFINED {
+ base SIGNAL_ORDERING_KIND_TYPE;
+ description
+ "none";
+ }
+
+ identity PMD_NEGOTIATION_STATE_TYPE {
+ description
+ "none";
+ }
+
+ identity PMD_NEGOTIATION_STATE_TYPE_NONE {
+ base PMD_NEGOTIATION_STATE_TYPE;
+ description
+ "Device does not support auto negotiation";
+ }
+
+ identity PMD_NEGOTIATION_STATE_TYPE_DISABLED {
+ base PMD_NEGOTIATION_STATE_TYPE;
+ description
+ "Auto negotiation is disabled.";
+ }
+
+ identity PMD_NEGOTIATION_STATE_TYPE_ENABLED {
+ base PMD_NEGOTIATION_STATE_TYPE;
+ description
+ "Auto negotiation is enabled, but currently nothing is connected";
+ }
+
+ identity PMD_NEGOTIATION_STATE_TYPE_IN_PROGRESS {
+ base PMD_NEGOTIATION_STATE_TYPE;
+ description
+ "The auto-negotiation protocol is running and negotiation is currently in-progress";
+ }
+
+ identity PMD_NEGOTIATION_STATE_TYPE_COMPLETE {
+ base PMD_NEGOTIATION_STATE_TYPE;
+ description
+ "The auto-negotation protocol has completed successfully";
+ }
+
+ identity PMD_NEGOTIATION_STATE_TYPE_FAILED {
+ base PMD_NEGOTIATION_STATE_TYPE;
+ description
+ "The auto-negotation protocol has failed";
+ }
+
+ identity PMD_NEGOTIATION_STATE_TYPE_NOT_YET_DEFINED {
+ base PMD_NEGOTIATION_STATE_TYPE;
+ description
+ "Device supports autonegotiation, but state is currently unknown, e.g. because device just booted";
+ }
+
+ identity GRANULARITY_PERIOD_TYPE {
+ description
+ "none";
+ }
+
+ identity GRANULARITY_PERIOD_TYPE_UNKNOWN {
+ base GRANULARITY_PERIOD_TYPE;
+ description
+ "none";
+ }
+
+ identity GRANULARITY_PERIOD_TYPE_PERIOD-15-MIN {
+ base GRANULARITY_PERIOD_TYPE;
+ description
+ "none";
+ }
+
+ identity GRANULARITY_PERIOD_TYPE_PERIOD-24-HOURS {
+ base GRANULARITY_PERIOD_TYPE;
+ description
+ "none";
+ }
+
+ identity GRANULARITY_PERIOD_TYPE_NOT_YET_DEFINED {
+ base GRANULARITY_PERIOD_TYPE;
+ description
+ "none";
+ }
+
+ identity SEVERITY_TYPE {
+ description
+ "none";
+ }
+
+ identity SEVERITY_TYPE_NON_ALARMED {
+ base SEVERITY_TYPE;
+ description
+ "none";
+ }
+
+ identity SEVERITY_TYPE_WARNING {
+ base SEVERITY_TYPE;
+ description
+ "none";
+ }
+
+ identity SEVERITY_TYPE_MINOR {
+ base SEVERITY_TYPE;
+ description
+ "none";
+ }
+
+ identity SEVERITY_TYPE_MAJOR {
+ base SEVERITY_TYPE;
+ description
+ "none";
+ }
+
+ identity SEVERITY_TYPE_CRITICAL {
+ base SEVERITY_TYPE;
+ description
+ "none";
+ }
+
+ identity SEVERITY_TYPE_NOT_YET_DEFINED {
+ base SEVERITY_TYPE;
+ description
+ "none";
+ }
+
+ identity INTERFACE_STATUS_TYPE {
+ description
+ "none";
+ }
+
+ identity INTERFACE_STATUS_TYPE_UP {
+ base INTERFACE_STATUS_TYPE;
+ description
+ "Ready to pass packets.";
+ }
+
+ identity INTERFACE_STATUS_TYPE_DOWN {
+ base INTERFACE_STATUS_TYPE;
+ description
+ "The interface does not pass any packets.";
+ }
+
+ identity INTERFACE_STATUS_TYPE_TESTING {
+ base INTERFACE_STATUS_TYPE;
+ description
+ "In some test mode. No operational packets can be passed.";
+ }
+
+ identity INTERFACE_STATUS_TYPE_UNKNOWN {
+ base INTERFACE_STATUS_TYPE;
+ description
+ "Status cannot be determined for some reason.";
+ }
+
+ identity INTERFACE_STATUS_TYPE_DORMANT {
+ base INTERFACE_STATUS_TYPE;
+ description
+ "Waiting for some external event.";
+ }
+
+ identity INTERFACE_STATUS_TYPE_NOT_PRESENT {
+ base INTERFACE_STATUS_TYPE;
+ description
+ "Some component (typically hardware) is missing.";
+ }
+
+ identity INTERFACE_STATUS_TYPE_LOWER_LAYER_DOWN {
+ base INTERFACE_STATUS_TYPE;
+ description
+ "Down due to state of lower-layer interface(s).";
+ }
+
+ identity INTERFACE_STATUS_TYPE_ADMIN_DOWN {
+ base INTERFACE_STATUS_TYPE;
+ description
+ "Down due to configuration.";
+ }
+
+ identity INTERFACE_STATUS_TYPE_NOT_YET_DEFINED {
+ base INTERFACE_STATUS_TYPE;
+ description
+ "none";
+ }
+
+ /****************************************
+ * package super-types
+ **************************************/
+
+ typedef granularity-period-type {
+ type identityref {
+ base GRANULARITY_PERIOD_TYPE;
+ }
+ description
+ "The enumeration with the options for granularity period of the performance data.";
+ }
+
+ typedef severity-type {
+ type identityref {
+ base SEVERITY_TYPE;
+ }
+ description
+ "According to ITU-T M.3160";
+ }
+
+ typedef interface-status-type {
+ type identityref {
+ base INTERFACE_STATUS_TYPE;
+ }
+ description
+ "Current Interface Status";
+ }
+
+ grouping problem-kind-severity-type {
+ leaf problem-kind-name {
+ type string;
+ description
+ "Name of the alarm according to supportedAlarmList";
+ }
+ leaf problem-kind-severity {
+ type severity-type;
+ default "SEVERITY_TYPE_NOT_YET_DEFINED";
+ description
+ "Severity of this type of alarm.";
+ }
+ description
+ "none";
+ }
+
+ grouping wire-interface-current-problem-type {
+ leaf problem-name {
+ type string;
+ default "Problem name not specified.";
+ config false;
+ description
+ "Name of the alarm according to supportedAlarmList attribute in MauType datatype";
+ }
+ uses current-problem;
+ description
+ "none";
+ }
+
+ grouping wire-interface-performance-type {
+ leaf es {
+ type int32;
+ units "s";
+ default "-1";
+ config false;
+ description
+ "Number of errored seconds according to 802.3 30.8.1.1.13 aLineESs";
+ }
+ leaf ses {
+ type int32;
+ units "s";
+ default "-1";
+ config false;
+ description
+ "Number of severely errored seconds according to 802.3 30.8.1.1.12 aLineSESs";
+ }
+ leaf symbol-error-during-carrier {
+ type int32;
+ units "symbol";
+ default "-1";
+ config false;
+ description
+ "Source: 802.3 according to 30.3.2.1.5 aSymbolErrorDuringCarrier. Number of times when valid carrier was present and an invalid data symbol occured.";
+ }
+ leaf low-power-idle-transmitter-ms {
+ type int32;
+ units "ms";
+ default "-1";
+ config false;
+ description
+ "Source: 802.3 similar to 30.3.2.1.8 aTransmitLPIMicroseconds. Number of milliseconds (original counter expresses microseconds), during which the transmitter was in power save mode";
+ }
+ leaf low-power-idle-receiver-ms {
+ type int32;
+ units "ms";
+ default "-1";
+ config false;
+ description
+ "Source: 802.3 similar to 30.3.2.1.9 aReceiveLPIMicroseconds. Number of milliseconds (original counter expresses microseconds), during which the receiver was in power save mode";
+ }
+ description
+ "none";
+ }
+
+ grouping wire-interface-current-performance-type {
+ container performance-data {
+ config false;
+ uses wire-interface-performance-type;
+ description
+ "none";
+ }
+ uses current-performance;
+ description
+ "Turns performance information into current performance information by inheriting from OTN_CurrentData.";
+ }
+
+ grouping wire-interface-historical-performance-type {
+ container performance-data {
+ config false;
+ uses wire-interface-performance-type;
+ description
+ "none";
+ }
+ uses historical-performance;
+ description
+ "Turns performance information into historical performance information by inheriting from OTN_HistoryData.";
+ }
+}
diff --git a/sdnr/wt/devicemanager-onap/onf14/provider/src/main/yang/wred-profile-1-0.yang b/sdnr/wt/devicemanager-onap/onf14/provider/src/main/yang/wred-profile-1-0.yang new file mode 100644 index 000000000..2b9dd8536 --- /dev/null +++ b/sdnr/wt/devicemanager-onap/onf14/provider/src/main/yang/wred-profile-1-0.yang @@ -0,0 +1,279 @@ +module wred-profile-1-0 {
+ yang-version 1.1;
+ namespace "urn:onf:yang:wred-profile-1-0";
+ prefix wred-profile;
+
+ import ietf-yang-types {
+ prefix yang;
+ }
+ import core-model-1-4 {
+ prefix core-model;
+ }
+
+ organization
+ "openBackhaul.com proposal to Open Networking Foundation (ONF)";
+ contact
+ "WG Web : https://github.com/openBackhaul/Overview
+ WG List: WredProfile@openBackhaul.com
+ Editor : Thorsten Heinze
+ Email : Thorsten.Heinze@openBackhaul.com";
+ description
+ "Technology specific definition for WRED (Weighted Random Early Detection) profiles that can be referenced by multiple interface instances.
+
+ Copyright 2019 openBackhaul.com
+
+ Licensed under the Apache License, Version 2.0 (the 'License');
+ you may not use this file except in compliance with the License.
+ You may obtain a copy of the License at
+ http://www.apache.org/licenses/LICENSE-2.0
+ Unless required by applicable law or agreed to in writing, software
+ distributed under the License is distributed on an 'AS IS' BASIS,
+ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ See the License for the specific language governing permissions and
+ limitations under the License.";
+
+ revision 2020-01-24 {
+ description
+ "Model for the Transport SDN Pilot at Telefonica Germany.
+ Please view https://github.com/openBackhaul/wredProfile/issues for changes.";
+ reference
+ "https://github.com/openBackhaul/wredProfile/tree/tsp: Model definition
+ https://github.com/openBackhaul/onfCoreIm/tree/tsp: ONF TR-512 Core IM incl. Profile and enhanced Equipment definition";
+ }
+ revision 2019-07-12 {
+ description
+ "Model for the Transport SDN Pilot at Telefonica Germany.
+ Please view https://github.com/openBackhaul/wredProfile/issues for changes.";
+ reference
+ "https://github.com/openBackhaul/wredProfile/tree/tsp: Model definition
+ https://github.com/openBackhaul/onfCoreIm/tree/tsp: ONF TR-512 Core IM incl. Profile and enhanced Equipment definition";
+ }
+
+ identity PROFILE_NAME_TYPE_WRED_PROFILE {
+ base core-model:PROFILE_NAME_TYPE;
+ description
+ "none";
+ }
+
+ augment "/core-model:control-construct/core-model:profile-collection/core-model:profile" {
+ when "derived-from-or-self(./core-model:profile-name, 'wred-profile:PROFILE_NAME_TYPE_WRED_PROFILE')";
+ uses wred-profile-spec;
+ description
+ "none";
+ }
+
+ /****************************************
+ * package notifications
+ **************************************/
+
+ notification object-creation-notification {
+ uses object-creation-notification;
+ description
+ "none";
+ }
+
+ grouping object-creation-notification {
+ leaf counter {
+ type int32;
+ default "-1";
+ config false;
+ description
+ "Counts object creation notifications.";
+ }
+ leaf timestamp {
+ type yang:date-and-time;
+ default "2010-11-20T14:00:00+01:00";
+ config false;
+ description
+ "none";
+ }
+ leaf object-id-ref {
+ type leafref {
+ path "/core-model:control-construct/core-model:profile-collection/core-model:profile/core-model:uuid";
+ require-instance false;
+ }
+ config false;
+ description
+ "none";
+ }
+ leaf object-type {
+ type string;
+ default "Type of created object not specified.";
+ config false;
+ description
+ "none";
+ }
+ description
+ "none";
+ }
+
+ notification object-deletion-notification {
+ uses object-deletion-notification;
+ description
+ "none";
+ }
+
+ grouping object-deletion-notification {
+ leaf counter {
+ type int32;
+ default "-1";
+ config false;
+ description
+ "Counts object deletion notifications.";
+ }
+ leaf timestamp {
+ type yang:date-and-time;
+ default "2010-11-20T14:00:00+01:00";
+ config false;
+ description
+ "none";
+ }
+ leaf object-id-ref {
+ type leafref {
+ path "/core-model:control-construct/core-model:profile-collection/core-model:profile/core-model:uuid";
+ require-instance false;
+ }
+ config false;
+ description
+ "none";
+ }
+ description
+ "none";
+ }
+
+ /****************************************
+ * grouping statements for object classes
+ **************************************/
+
+ grouping wred-profile-spec {
+ container wred-profile-pac {
+ uses wred-profile-pac;
+ description
+ "none";
+ }
+ description
+ "none";
+ }
+
+ grouping wred-profile-pac {
+ container wred-profile-capability {
+ config false;
+ uses wred-profile-capability;
+ description
+ "none";
+ }
+ container wred-profile-configuration {
+ uses wred-profile-configuration;
+ description
+ "none";
+ }
+ description
+ "none";
+ }
+
+ grouping wred-profile-capability {
+ leaf available-buffer-size {
+ type int32;
+ units "Byte";
+ default "-1";
+ config false;
+ description
+ "Maximum value that could be configured as thresholdHigh in Byte.";
+ }
+ leaf drop-probability-at-threshold-low-is-avail {
+ type boolean;
+ default "false";
+ config false;
+ description
+ "1 = It is possible to set a drop probability at the lower threshold.";
+ }
+ leaf gentle-wred-is-avail {
+ type boolean;
+ default "false";
+ config false;
+ description
+ "1 = The device allows activating a linear increase of drop probability between dropProbabilityAtThresholdHigh and 100% at thresholdGentle (usually drop probability jumps to 100% at thresholdHigh).";
+ }
+ leaf sensitivity-setting-is-avail {
+ type boolean;
+ default "false";
+ config false;
+ description
+ "1 = It is possible to set the sensitivity for the burst size.";
+ }
+ leaf coloring-is-avail {
+ type boolean;
+ default "false";
+ config false;
+ description
+ "1 = The device allows marking exceeding packets yellow instead of immediately discarding them.";
+ }
+ description
+ "none";
+ }
+
+ grouping wred-profile-configuration {
+ leaf profile-name {
+ type string;
+ default "Name of profile not yet defined.";
+ description
+ "Identifier of the profile. Could be a name, could be a number. Free text field to be filled by the operator.";
+ }
+ leaf threshold-low {
+ type int32;
+ units "Byte";
+ default "-1";
+ description
+ "Defines the lower threshold in Byte. When average queue content is exceeding this value, packets start getting dropped. Probability of dropping is linear increasing until it reaches the value configured in dropProbabilityAtThresholdHigh when average queue content reaches thresholdHigh.";
+ }
+ leaf drop-probability-at-threshold-low {
+ type int8;
+ units "%";
+ default "-1";
+ description
+ "Only relevant if (dropProbabilityAtLowThresholdIsAvail==1). Defines the probability (as a percentage) of an incoming packet getting dropped when the content of the queue reaches the low threshold.";
+ }
+ leaf threshold-high {
+ type int32;
+ units "Byte";
+ default "-1";
+ description
+ "Defines the upper threshold in Byte. When average queue content is reaching this value, incoming packets are dropped with the probability configured in dropProbabilityAtThresholdHigh. When average queue content is exceeding this value, all incoming packets get dropped.";
+ }
+ leaf drop-probability-at-threshold-high {
+ type int8;
+ units "%";
+ default "-1";
+ description
+ "Defines the probability (as a percentage) of an incoming packet getting dropped when the content of the queue reaches the upper threshold.";
+ }
+ leaf gentle-wred-is-on {
+ type boolean;
+ default "false";
+ description
+ "Only relevant if (gentleWredIsAvail==1). 1 = The drop probability is linear increasing between dropProbabilityAtThresholdHigh and 100% at thresholdGentle (otherwise drop probability jumps to 100% at thresholdHigh).";
+ }
+ leaf threshold-gentle {
+ type int32;
+ units "Byte";
+ default "-1";
+ description
+ "Only relevant if (gentleWredIsAvail==1) AND (gentleWredIsOn==1). Defines the 100% dropping threshold for gentle WRED in Byte. When average queue content reaches or exceeds this value, incoming packets get dropped with 100% probability.";
+ }
+ leaf sensitivity {
+ type int8;
+ units "%";
+ default "-1";
+ description
+ "Only relevant if (sensitivitySettingIsAvail==1). Defines how sensitive WRED reacts on traffic burst. low values = WRED reacts quickly and is sensitive to short bursts. high values = WRED reacts slowly on short bursts, which could result in buffer overflow and tail drop. Values between 0 and 15.";
+ }
+ leaf coloring-is-on {
+ type boolean;
+ default "false";
+ description
+ "Only relevant if (colloringIsAvail==1). 1 = Exceeding packets are marked yellow instead of being immediately discarded.";
+ }
+ description
+ "none";
+ }
+}
diff --git a/sdnr/wt/devicemanager-onap/onf14/provider/src/test/java/org/onap/ccsdk/features/sdnr/wt/devicemanager/onf14/TestDeviceManagerOnf14Impl.java b/sdnr/wt/devicemanager-onap/onf14/provider/src/test/java/org/onap/ccsdk/features/sdnr/wt/devicemanager/onf14/TestDeviceManagerOnf14Impl.java new file mode 100644 index 000000000..4b69e4232 --- /dev/null +++ b/sdnr/wt/devicemanager-onap/onf14/provider/src/test/java/org/onap/ccsdk/features/sdnr/wt/devicemanager/onf14/TestDeviceManagerOnf14Impl.java @@ -0,0 +1,55 @@ +/* + * ============LICENSE_START======================================================================== + * ONAP : ccsdk feature sdnr wt + * ================================================================================================= + * Copyright (C) 2020 highstreet technologies GmbH Intellectual Property. All rights reserved. + * ================================================================================================= + * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except + * in compliance with the License. You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software distributed under the License + * is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express + * or implied. See the License for the specific language governing permissions and limitations under + * the License. + * ============LICENSE_END========================================================================== + */ +package org.onap.ccsdk.features.sdnr.wt.devicemanager.onf14; + +import java.io.IOException; +import org.junit.After; +import org.junit.Before; +import org.junit.Test; +import org.mockito.Mockito; +import org.onap.ccsdk.features.sdnr.wt.devicemanager.onf14.impl.DeviceManagerOnf14Impl; +import org.onap.ccsdk.features.sdnr.wt.devicemanager.service.NetconfNetworkElementService; + +public class TestDeviceManagerOnf14Impl extends Mockito { + + DeviceManagerOnf14Impl devMgrOnf14; + private static NetconfNetworkElementService netconfElemService; + + @Before + public void init() throws InterruptedException, IOException { + netconfElemService = mock(NetconfNetworkElementService.class); + } + + @Test + public void test() throws Exception { + devMgrOnf14 = new DeviceManagerOnf14Impl(); + + try { + devMgrOnf14.setNetconfNetworkElementService(netconfElemService); + devMgrOnf14.init(); + } catch (Exception e) { + e.printStackTrace(); + } + } + + @After + public void cleanUp() throws Exception { + devMgrOnf14.close(); + } + +} diff --git a/sdnr/wt/devicemanager-onap/onf14/provider/src/test/java/org/onap/ccsdk/features/sdnr/wt/devicemanager/onf14/TestOnf14AirInterfaceNotificationListener.java b/sdnr/wt/devicemanager-onap/onf14/provider/src/test/java/org/onap/ccsdk/features/sdnr/wt/devicemanager/onf14/TestOnf14AirInterfaceNotificationListener.java new file mode 100644 index 000000000..b9f1c2131 --- /dev/null +++ b/sdnr/wt/devicemanager-onap/onf14/provider/src/test/java/org/onap/ccsdk/features/sdnr/wt/devicemanager/onf14/TestOnf14AirInterfaceNotificationListener.java @@ -0,0 +1,198 @@ +/* + * ============LICENSE_START======================================================================== + * ONAP : ccsdk feature sdnr wt + * ================================================================================================= + * Copyright (C) 2020 highstreet technologies GmbH Intellectual Property. All rights reserved. + * ================================================================================================= + * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except + * in compliance with the License. You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software distributed under the License + * is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express + * or implied. See the License for the specific language governing permissions and limitations under + * the License. + * ============LICENSE_END========================================================================== + */ +package org.onap.ccsdk.features.sdnr.wt.devicemanager.onf14; + +import org.eclipse.jdt.annotation.NonNull; +import org.junit.Before; +import org.junit.Test; +import org.mockito.Mockito; +import org.mockito.invocation.InvocationOnMock; +import org.mockito.stubbing.Answer; +import org.onap.ccsdk.features.sdnr.wt.dataprovider.model.DataProvider; +import org.onap.ccsdk.features.sdnr.wt.devicemanager.onf14.impl.interfaces.Onf14AirInterfaceNotificationListener; +import org.onap.ccsdk.features.sdnr.wt.devicemanager.service.DeviceManagerServiceProvider; +import org.onap.ccsdk.features.sdnr.wt.devicemanager.service.FaultService; +import org.onap.ccsdk.features.sdnr.wt.devicemanager.service.NotificationService; +import org.onap.ccsdk.features.sdnr.wt.netconfnodestateservice.NetconfBindingAccessor; +import org.onap.ccsdk.features.sdnr.wt.websocketmanager.model.WebsocketManagerService; +import org.opendaylight.yang.gen.v1.urn.ietf.params.xml.ns.yang.ietf.yang.types.rev130715.DateAndTime; +import org.opendaylight.yang.gen.v1.urn.onf.yang.air._interface._2._0.rev200121.AttributeValueChangedNotification; +import org.opendaylight.yang.gen.v1.urn.onf.yang.air._interface._2._0.rev200121.ObjectCreationNotification; +import org.opendaylight.yang.gen.v1.urn.onf.yang.air._interface._2._0.rev200121.ObjectDeletionNotification; +import org.opendaylight.yang.gen.v1.urn.onf.yang.air._interface._2._0.rev200121.ProblemNotification; +import org.opendaylight.yang.gen.v1.urn.onf.yang.air._interface._2._0.rev200121.SEVERITYTYPE; +import org.opendaylight.yang.gen.v1.urn.onf.yang.air._interface._2._0.rev200121.SEVERITYTYPECRITICAL; +import org.opendaylight.yang.gen.v1.urn.onf.yang.air._interface._2._0.rev200121.SEVERITYTYPEMAJOR; +import org.opendaylight.yang.gen.v1.urn.onf.yang.air._interface._2._0.rev200121.SEVERITYTYPEMINOR; +import org.opendaylight.yang.gen.v1.urn.onf.yang.air._interface._2._0.rev200121.SEVERITYTYPENONALARMED; +import org.opendaylight.yang.gen.v1.urn.onf.yang.air._interface._2._0.rev200121.SEVERITYTYPEWARNING; +import org.opendaylight.yang.gen.v1.urn.onf.yang.core.model._1._4.rev191127.UniversalId; +import org.opendaylight.yang.gen.v1.urn.tbd.params.xml.ns.yang.network.topology.rev131021.NodeId; + +public class TestOnf14AirInterfaceNotificationListener extends Mockito { + private NetconfBindingAccessor accessor; + private NodeId nodeId; + private DeviceManagerServiceProvider serviceProvider; + private FaultService faultService; + private DataProvider databaseService; + private NotificationService notificationService; + + private ObjectDeletionNotification deletionNotif; + private ObjectCreationNotification creationNotif; + private ProblemNotification problemNotif; + private AttributeValueChangedNotification attrValChangedNotif; + private @NonNull WebsocketManagerService websocketService; + + @Before + public void init() { + accessor = mock(NetconfBindingAccessor.class); + nodeId = mock(NodeId.class); + serviceProvider = mock(DeviceManagerServiceProvider.class); + faultService = mock(FaultService.class); + databaseService = mock(DataProvider.class); + notificationService = mock(NotificationService.class); + websocketService = mock(WebsocketManagerService.class); + + problemNotif = mock(ProblemNotification.class); + deletionNotif = mock(ObjectDeletionNotification.class); + creationNotif = mock(ObjectCreationNotification.class); + attrValChangedNotif = mock(AttributeValueChangedNotification.class); + + when(accessor.getNodeId()).thenReturn(nodeId); + when(problemNotif.getCounter()).thenReturn(10); + when(problemNotif.getTimestamp()).thenReturn(new DateAndTime("2020-02-05T12:30:45.283Z")); + when(problemNotif.getObjectIdRef()).thenReturn(new UniversalId("12345678-0123-0abc-abcd-0123456789AB")); + when(problemNotif.getProblem()).thenReturn("modulationIsDownShifted"); + + when(attrValChangedNotif.getAttributeName()).thenReturn("12345678-0123-2345-abcd-0123456789AB"); + when(attrValChangedNotif.getCounter()).thenReturn(20); + when(attrValChangedNotif.getNewValue()).thenReturn("new-value"); + when(attrValChangedNotif.getObjectIdRef()).thenReturn(new UniversalId("12345678-0123-1234-abcd-0123456789AB")); + when(attrValChangedNotif.getTimestamp()).thenReturn(new DateAndTime("2020-02-05T12:30:45.283Z")); + + when(creationNotif.getObjectType()).thenReturn("air-interface-name"); + when(creationNotif.getCounter()).thenReturn(20); + when(creationNotif.getObjectIdRef()).thenReturn(new UniversalId("12345678-0123-1234-abcd-0123456789AB")); + when(creationNotif.getTimestamp()).thenReturn(new DateAndTime("2020-02-05T12:30:45.283Z")); + + when(deletionNotif.getCounter()).thenReturn(20); + when(deletionNotif.getObjectIdRef()).thenReturn(new UniversalId("12345678-0123-1234-abcd-0123456789AB")); + when(deletionNotif.getTimestamp()).thenReturn(new DateAndTime("2020-02-05T12:30:45.283Z")); + + when(serviceProvider.getFaultService()).thenReturn(faultService); + when(serviceProvider.getDataProvider()).thenReturn(databaseService); + when(serviceProvider.getNotificationService()).thenReturn(notificationService); + when(serviceProvider.getWebsocketService()).thenReturn(websocketService); + } + + @Test + public void testOtherNotif() { + Onf14AirInterfaceNotificationListener notifListener = + new Onf14AirInterfaceNotificationListener(accessor, serviceProvider); + + notifListener.onObjectDeletionNotification(deletionNotif); + notifListener.onObjectCreationNotification(creationNotif); + notifListener.onAttributeValueChangedNotification(attrValChangedNotif); + } + + @Test + public void testProblemNotifCritical() { + Onf14AirInterfaceNotificationListener notifListener = + new Onf14AirInterfaceNotificationListener(accessor, serviceProvider); + + when(problemNotif.getSeverity()).thenAnswer(new Answer<Class<? extends SEVERITYTYPE>>() { + @Override + public Class<? extends SEVERITYTYPE> answer(InvocationOnMock invocation) throws Throwable { + return SEVERITYTYPECRITICAL.class; + } + }); + + notifListener.onProblemNotification(problemNotif); + } + + @Test + public void testProblemNotifMajor() { + Onf14AirInterfaceNotificationListener notifListener = + new Onf14AirInterfaceNotificationListener(accessor, serviceProvider); + + when(problemNotif.getSeverity()).thenAnswer(new Answer<Class<? extends SEVERITYTYPE>>() { + @Override + public Class<? extends SEVERITYTYPE> answer(InvocationOnMock invocation) throws Throwable { + return SEVERITYTYPEMAJOR.class; + } + }); + + notifListener.onProblemNotification(problemNotif); + } + + @Test + public void testProblemNotifMinor() { + Onf14AirInterfaceNotificationListener notifListener = + new Onf14AirInterfaceNotificationListener(accessor, serviceProvider); + + when(problemNotif.getSeverity()).thenAnswer(new Answer<Class<? extends SEVERITYTYPE>>() { + @Override + public Class<? extends SEVERITYTYPE> answer(InvocationOnMock invocation) throws Throwable { + return SEVERITYTYPEMINOR.class; + } + }); + + notifListener.onProblemNotification(problemNotif); + } + + @Test + public void testProblemNotifWarning() { + Onf14AirInterfaceNotificationListener notifListener = + new Onf14AirInterfaceNotificationListener(accessor, serviceProvider); + + when(problemNotif.getSeverity()).thenAnswer(new Answer<Class<? extends SEVERITYTYPE>>() { + @Override + public Class<? extends SEVERITYTYPE> answer(InvocationOnMock invocation) throws Throwable { + return SEVERITYTYPEWARNING.class; + } + }); + + notifListener.onProblemNotification(problemNotif); + } + + @Test + public void testProblemNotifNonalarmed() { + Onf14AirInterfaceNotificationListener notifListener = + new Onf14AirInterfaceNotificationListener(accessor, serviceProvider); + + when(problemNotif.getSeverity()).thenAnswer(new Answer<Class<? extends SEVERITYTYPE>>() { + @Override + public Class<? extends SEVERITYTYPE> answer(InvocationOnMock invocation) throws Throwable { + return SEVERITYTYPENONALARMED.class; + } + }); + + notifListener.onProblemNotification(problemNotif); + } + + @Test + public void testProblemNotifNull() { + Onf14AirInterfaceNotificationListener notifListener = + new Onf14AirInterfaceNotificationListener(accessor, serviceProvider); + + when(problemNotif.getSeverity()).thenReturn(null); + + notifListener.onProblemNotification(problemNotif); + } + +} diff --git a/sdnr/wt/devicemanager-onap/onf14/provider/src/test/java/org/onap/ccsdk/features/sdnr/wt/devicemanager/onf14/TestOnf14EthernetContainerNotificationListener.java b/sdnr/wt/devicemanager-onap/onf14/provider/src/test/java/org/onap/ccsdk/features/sdnr/wt/devicemanager/onf14/TestOnf14EthernetContainerNotificationListener.java new file mode 100644 index 000000000..09e44f47d --- /dev/null +++ b/sdnr/wt/devicemanager-onap/onf14/provider/src/test/java/org/onap/ccsdk/features/sdnr/wt/devicemanager/onf14/TestOnf14EthernetContainerNotificationListener.java @@ -0,0 +1,197 @@ +/* + * ============LICENSE_START======================================================================== + * ONAP : ccsdk feature sdnr wt + * ================================================================================================= + * Copyright (C) 2020 highstreet technologies GmbH Intellectual Property. All rights reserved. + * ================================================================================================= + * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except + * in compliance with the License. You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software distributed under the License + * is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express + * or implied. See the License for the specific language governing permissions and limitations under + * the License. + * ============LICENSE_END========================================================================== + */ +package org.onap.ccsdk.features.sdnr.wt.devicemanager.onf14; + +import org.junit.Before; +import org.junit.Test; +import org.mockito.Mockito; +import org.mockito.invocation.InvocationOnMock; +import org.mockito.stubbing.Answer; +import org.onap.ccsdk.features.sdnr.wt.dataprovider.model.DataProvider; +import org.onap.ccsdk.features.sdnr.wt.devicemanager.onf14.impl.interfaces.Onf14EthernetContainerNotificationListener; +import org.onap.ccsdk.features.sdnr.wt.devicemanager.service.DeviceManagerServiceProvider; +import org.onap.ccsdk.features.sdnr.wt.devicemanager.service.FaultService; +import org.onap.ccsdk.features.sdnr.wt.devicemanager.service.NotificationService; +import org.onap.ccsdk.features.sdnr.wt.netconfnodestateservice.NetconfBindingAccessor; +import org.onap.ccsdk.features.sdnr.wt.websocketmanager.model.WebsocketManagerService; +import org.opendaylight.yang.gen.v1.urn.ietf.params.xml.ns.yang.ietf.yang.types.rev130715.DateAndTime; +import org.opendaylight.yang.gen.v1.urn.onf.yang.core.model._1._4.rev191127.UniversalId; +import org.opendaylight.yang.gen.v1.urn.onf.yang.ethernet.container._2._0.rev200121.AttributeValueChangedNotification; +import org.opendaylight.yang.gen.v1.urn.onf.yang.ethernet.container._2._0.rev200121.ObjectCreationNotification; +import org.opendaylight.yang.gen.v1.urn.onf.yang.ethernet.container._2._0.rev200121.ObjectDeletionNotification; +import org.opendaylight.yang.gen.v1.urn.onf.yang.ethernet.container._2._0.rev200121.ProblemNotification; +import org.opendaylight.yang.gen.v1.urn.onf.yang.ethernet.container._2._0.rev200121.SEVERITYTYPE; +import org.opendaylight.yang.gen.v1.urn.onf.yang.ethernet.container._2._0.rev200121.SEVERITYTYPECRITICAL; +import org.opendaylight.yang.gen.v1.urn.onf.yang.ethernet.container._2._0.rev200121.SEVERITYTYPEMAJOR; +import org.opendaylight.yang.gen.v1.urn.onf.yang.ethernet.container._2._0.rev200121.SEVERITYTYPEMINOR; +import org.opendaylight.yang.gen.v1.urn.onf.yang.ethernet.container._2._0.rev200121.SEVERITYTYPENONALARMED; +import org.opendaylight.yang.gen.v1.urn.onf.yang.ethernet.container._2._0.rev200121.SEVERITYTYPEWARNING; +import org.opendaylight.yang.gen.v1.urn.tbd.params.xml.ns.yang.network.topology.rev131021.NodeId; + +public class TestOnf14EthernetContainerNotificationListener extends Mockito { + private NetconfBindingAccessor accessor; + private NodeId nodeId; + private DeviceManagerServiceProvider serviceProvider; + private FaultService faultService; + private DataProvider databaseService; + private NotificationService notificationService; + + private ObjectDeletionNotification deletionNotif; + private ObjectCreationNotification creationNotif; + private ProblemNotification problemNotif; + private AttributeValueChangedNotification attrValChangedNotif; + private WebsocketManagerService websocketService; + + @Before + public void init() { + accessor = mock(NetconfBindingAccessor.class); + nodeId = mock(NodeId.class); + serviceProvider = mock(DeviceManagerServiceProvider.class); + faultService = mock(FaultService.class); + databaseService = mock(DataProvider.class); + notificationService = mock(NotificationService.class); + websocketService = mock(WebsocketManagerService.class); + + problemNotif = mock(ProblemNotification.class); + deletionNotif = mock(ObjectDeletionNotification.class); + creationNotif = mock(ObjectCreationNotification.class); + attrValChangedNotif = mock(AttributeValueChangedNotification.class); + + when(accessor.getNodeId()).thenReturn(nodeId); + when(problemNotif.getCounter()).thenReturn(10L); + when(problemNotif.getTimestamp()).thenReturn(new DateAndTime("2020-02-05T12:30:45.283Z")); + when(problemNotif.getObjectIdRef()).thenReturn(new UniversalId("12345678-0123-0abc-abcd-0123456789AB")); + when(problemNotif.getProblem()).thenReturn("modulationIsDownShifted"); + + when(attrValChangedNotif.getAttributeName()).thenReturn("12345678-0123-2345-abcd-0123456789AB"); + when(attrValChangedNotif.getCounter()).thenReturn(20L); + when(attrValChangedNotif.getNewValue()).thenReturn("new-value"); + when(attrValChangedNotif.getObjectIdRef()).thenReturn(new UniversalId("12345678-0123-1234-abcd-0123456789AB")); + when(attrValChangedNotif.getTimestamp()).thenReturn(new DateAndTime("2020-02-05T12:30:45.283Z")); + + when(creationNotif.getObjectType()).thenReturn("air-interface-name"); + when(creationNotif.getCounter()).thenReturn(20L); + when(creationNotif.getObjectIdRef()).thenReturn(new UniversalId("12345678-0123-1234-abcd-0123456789AB")); + when(creationNotif.getTimestamp()).thenReturn(new DateAndTime("2020-02-05T12:30:45.283Z")); + + when(deletionNotif.getCounter()).thenReturn(20L); + when(deletionNotif.getObjectIdRef()).thenReturn(new UniversalId("12345678-0123-1234-abcd-0123456789AB")); + when(deletionNotif.getTimestamp()).thenReturn(new DateAndTime("2020-02-05T12:30:45.283Z")); + + when(serviceProvider.getFaultService()).thenReturn(faultService); + when(serviceProvider.getDataProvider()).thenReturn(databaseService); + when(serviceProvider.getNotificationService()).thenReturn(notificationService); + when(serviceProvider.getWebsocketService()).thenReturn(websocketService); + } + + @Test + public void testOtherNotif() { + Onf14EthernetContainerNotificationListener notifListener = + new Onf14EthernetContainerNotificationListener(accessor, serviceProvider); + + notifListener.onObjectDeletionNotification(deletionNotif); + notifListener.onObjectCreationNotification(creationNotif); + notifListener.onAttributeValueChangedNotification(attrValChangedNotif); + } + + @Test + public void testProblemNotifCritical() { + Onf14EthernetContainerNotificationListener notifListener = + new Onf14EthernetContainerNotificationListener(accessor, serviceProvider); + + when(problemNotif.getSeverity()).thenAnswer(new Answer<Class<? extends SEVERITYTYPE>>() { + @Override + public Class<? extends SEVERITYTYPE> answer(InvocationOnMock invocation) throws Throwable { + return SEVERITYTYPECRITICAL.class; + } + }); + + notifListener.onProblemNotification(problemNotif); + } + + @Test + public void testProblemNotifMajor() { + Onf14EthernetContainerNotificationListener notifListener = + new Onf14EthernetContainerNotificationListener(accessor, serviceProvider); + + when(problemNotif.getSeverity()).thenAnswer(new Answer<Class<? extends SEVERITYTYPE>>() { + @Override + public Class<? extends SEVERITYTYPE> answer(InvocationOnMock invocation) throws Throwable { + return SEVERITYTYPEMAJOR.class; + } + }); + + notifListener.onProblemNotification(problemNotif); + } + + @Test + public void testProblemNotifMinor() { + Onf14EthernetContainerNotificationListener notifListener = + new Onf14EthernetContainerNotificationListener(accessor, serviceProvider); + + when(problemNotif.getSeverity()).thenAnswer(new Answer<Class<? extends SEVERITYTYPE>>() { + @Override + public Class<? extends SEVERITYTYPE> answer(InvocationOnMock invocation) throws Throwable { + return SEVERITYTYPEMINOR.class; + } + }); + + notifListener.onProblemNotification(problemNotif); + } + + @Test + public void testProblemNotifWarning() { + Onf14EthernetContainerNotificationListener notifListener = + new Onf14EthernetContainerNotificationListener(accessor, serviceProvider); + + when(problemNotif.getSeverity()).thenAnswer(new Answer<Class<? extends SEVERITYTYPE>>() { + @Override + public Class<? extends SEVERITYTYPE> answer(InvocationOnMock invocation) throws Throwable { + return SEVERITYTYPEWARNING.class; + } + }); + + notifListener.onProblemNotification(problemNotif); + } + + @Test + public void testProblemNotifNonalarmed() { + Onf14EthernetContainerNotificationListener notifListener = + new Onf14EthernetContainerNotificationListener(accessor, serviceProvider); + + when(problemNotif.getSeverity()).thenAnswer(new Answer<Class<? extends SEVERITYTYPE>>() { + @Override + public Class<? extends SEVERITYTYPE> answer(InvocationOnMock invocation) throws Throwable { + return SEVERITYTYPENONALARMED.class; + } + }); + + notifListener.onProblemNotification(problemNotif); + } + + @Test + public void testProblemNotifNull() { + Onf14EthernetContainerNotificationListener notifListener = + new Onf14EthernetContainerNotificationListener(accessor, serviceProvider); + + when(problemNotif.getSeverity()).thenReturn(null); + + notifListener.onProblemNotification(problemNotif); + } + +} diff --git a/sdnr/wt/devicemanager-onap/onf14/provider/src/test/java/org/onap/ccsdk/features/sdnr/wt/devicemanager/onf14/TestOnf14NetworkElement.java b/sdnr/wt/devicemanager-onap/onf14/provider/src/test/java/org/onap/ccsdk/features/sdnr/wt/devicemanager/onf14/TestOnf14NetworkElement.java new file mode 100644 index 000000000..30b4c9b1a --- /dev/null +++ b/sdnr/wt/devicemanager-onap/onf14/provider/src/test/java/org/onap/ccsdk/features/sdnr/wt/devicemanager/onf14/TestOnf14NetworkElement.java @@ -0,0 +1,123 @@ +/* + * ============LICENSE_START======================================================================== + * ONAP : ccsdk feature sdnr wt + * ================================================================================================= + * Copyright (C) 2020 highstreet technologies GmbH Intellectual Property. All rights reserved. + * ================================================================================================= + * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except + * in compliance with the License. You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software distributed under the License + * is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express + * or implied. See the License for the specific language governing permissions and limitations under + * the License. + * ============LICENSE_END========================================================================== + */ +package org.onap.ccsdk.features.sdnr.wt.devicemanager.onf14; + +import static org.junit.Assert.assertEquals; +import static org.junit.Assert.assertTrue; +import java.util.Arrays; +import java.util.List; +import java.util.Optional; +import org.junit.Before; +import org.junit.Test; +import org.mockito.Mockito; +import org.onap.ccsdk.features.sdnr.wt.common.configuration.ConfigurationFileRepresentation; +import org.onap.ccsdk.features.sdnr.wt.dataprovider.model.DataProvider; +import org.onap.ccsdk.features.sdnr.wt.devicemanager.ne.service.NetworkElement; +import org.onap.ccsdk.features.sdnr.wt.devicemanager.onf14.impl.Onf14NetworkElementFactory; +import org.onap.ccsdk.features.sdnr.wt.devicemanager.service.DeviceManagerServiceProvider; +import org.onap.ccsdk.features.sdnr.wt.devicemanager.service.FaultService; +import org.onap.ccsdk.features.sdnr.wt.netconfnodestateservice.Capabilities; +import org.onap.ccsdk.features.sdnr.wt.netconfnodestateservice.NetconfBindingAccessor; +import org.onap.ccsdk.features.sdnr.wt.netconfnodestateservice.NetconfDomAccessor; +import org.onap.ccsdk.features.sdnr.wt.netconfnodestateservice.TransactionUtils; +import org.opendaylight.mdsal.common.api.LogicalDatastoreType; +import org.opendaylight.mdsal.dom.api.DOMDataBroker; +import org.opendaylight.yang.gen.v1.urn.onf.yang.core.model._1._4.rev191127.ControlConstruct; +import org.opendaylight.yang.gen.v1.urn.onf.yang.core.model._1._4.rev191127.UniversalId; +import org.opendaylight.yang.gen.v1.urn.tbd.params.xml.ns.yang.network.topology.rev131021.NodeId; +import org.opendaylight.yangtools.yang.data.api.YangInstanceIdentifier; + +public class TestOnf14NetworkElement extends Mockito { + + private static String NODEIDSTRING = "nSky"; + + static NetconfDomAccessor accessor; + static DeviceManagerServiceProvider serviceProvider; + static Capabilities capabilities; + static DataProvider dataProvider; + static FaultService faultService; + static DOMDataBroker dataBroker; + static TransactionUtils transactionUtils; + static ControlConstruct controlConstruct; + + @Before + public void init() { + capabilities = mock(Capabilities.class); + accessor = mock(NetconfDomAccessor.class); + serviceProvider = mock(DeviceManagerServiceProvider.class); + + NodeId nNodeId = new NodeId("nSky"); + when(accessor.getCapabilites()).thenReturn(capabilities); + when(accessor.getNodeId()).thenReturn(nNodeId); + + dataProvider = mock(DataProvider.class); + when(serviceProvider.getDataProvider()).thenReturn(dataProvider); + + faultService = mock(FaultService.class); + when(serviceProvider.getFaultService()).thenReturn(faultService); + + dataBroker = mock(DOMDataBroker.class); + when(accessor.getDataBroker()).thenReturn(dataBroker); + + controlConstruct = mock(ControlConstruct.class); + + YangInstanceIdentifier CONTROLCONSTRUCT_IID = + YangInstanceIdentifier.builder().node(ControlConstruct.QNAME).build(); + + when(accessor.readData(LogicalDatastoreType.CONFIGURATION, CONTROLCONSTRUCT_IID, ControlConstruct.class)) + .thenReturn(Optional.of(controlConstruct)); + + List<UniversalId> topLevelEqList = null; + UniversalId uuid = new UniversalId("0Aabcdef-0abc-0cfD-0abC-0123456789AB"); + topLevelEqList = Arrays.asList(uuid); + + when(Optional.of(controlConstruct).get().getTopLevelEquipment()).thenReturn(topLevelEqList); + } + + @Test + public void testGeneric() { + Optional<NetworkElement> onfNe; + NodeId nodeId = new NodeId(NODEIDSTRING); + NetconfBindingAccessor bindingAccessor = mock(NetconfBindingAccessor.class); + when(bindingAccessor.getTransactionUtils()).thenReturn(mock(TransactionUtils.class)); + when(bindingAccessor.getNodeId()).thenReturn(nodeId); + + NetconfDomAccessor domAccessor = mock(NetconfDomAccessor.class); + when(domAccessor.getNodeId()).thenReturn(nodeId); + + when(accessor.getCapabilites().isSupportingNamespace(ControlConstruct.QNAME)).thenReturn(true); + when(accessor.getNetconfBindingAccessor()).thenReturn(Optional.of(bindingAccessor)); + when(accessor.getNetconfDomAccessor()).thenReturn(Optional.of(domAccessor)); + + ConfigurationFileRepresentation configurationRepresentation = mock(ConfigurationFileRepresentation.class); + when(serviceProvider.getConfigurationFileRepresentation()).thenReturn(configurationRepresentation); + + Onf14NetworkElementFactory factory = new Onf14NetworkElementFactory(); + onfNe = factory.create(accessor, serviceProvider); + assertTrue(onfNe.isPresent()); + + onfNe.get().register(); + onfNe.get().deregister(); + onfNe.get().getAcessor(); + onfNe.get().getDeviceType(); + onfNe.get().warmstart(); + onfNe.get().getService(null); + assertEquals(onfNe.get().getNodeId().getValue(), "nSky"); + } + +} diff --git a/sdnr/wt/devicemanager-onap/onf14/provider/src/test/java/org/onap/ccsdk/features/sdnr/wt/devicemanager/onf14/TestOnf14NetworkElementFactory.java b/sdnr/wt/devicemanager-onap/onf14/provider/src/test/java/org/onap/ccsdk/features/sdnr/wt/devicemanager/onf14/TestOnf14NetworkElementFactory.java new file mode 100644 index 000000000..f9041eb80 --- /dev/null +++ b/sdnr/wt/devicemanager-onap/onf14/provider/src/test/java/org/onap/ccsdk/features/sdnr/wt/devicemanager/onf14/TestOnf14NetworkElementFactory.java @@ -0,0 +1,71 @@ +/* + * ============LICENSE_START======================================================================== + * ONAP : ccsdk feature sdnr wt + * ================================================================================================= + * Copyright (C) 2020 highstreet technologies GmbH Intellectual Property. All rights reserved. + * ================================================================================================= + * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except + * in compliance with the License. You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software distributed under the License + * is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express + * or implied. See the License for the specific language governing permissions and limitations under + * the License. + * ============LICENSE_END========================================================================== + */ +package org.onap.ccsdk.features.sdnr.wt.devicemanager.onf14; + +import static org.junit.Assert.assertTrue; +import java.io.IOException; +import java.util.Optional; +import org.junit.BeforeClass; +import org.junit.Test; +import org.mockito.Mockito; +import org.onap.ccsdk.features.sdnr.wt.common.configuration.ConfigurationFileRepresentation; +import org.onap.ccsdk.features.sdnr.wt.dataprovider.model.DataProvider; +import org.onap.ccsdk.features.sdnr.wt.devicemanager.onf14.impl.Onf14NetworkElementFactory; +import org.onap.ccsdk.features.sdnr.wt.devicemanager.service.DeviceManagerServiceProvider; +import org.onap.ccsdk.features.sdnr.wt.netconfnodestateservice.Capabilities; +import org.onap.ccsdk.features.sdnr.wt.netconfnodestateservice.NetconfBindingAccessor; +import org.onap.ccsdk.features.sdnr.wt.netconfnodestateservice.NetconfDomAccessor; +import org.opendaylight.yang.gen.v1.urn.onf.yang.core.model._1._4.rev191127.ControlConstruct; + +public class TestOnf14NetworkElementFactory extends Mockito { + + private static NetconfBindingAccessor accessor; + private static Capabilities capabilities; + private static DeviceManagerServiceProvider serviceProvider; + private static ConfigurationFileRepresentation configurationRepresentation; + + + @BeforeClass + public static void init() throws InterruptedException, IOException { + capabilities = mock(Capabilities.class); + accessor = mock(NetconfBindingAccessor.class); + serviceProvider = mock(DeviceManagerServiceProvider.class); + configurationRepresentation = mock(ConfigurationFileRepresentation.class); + + when(accessor.getCapabilites()).thenReturn(capabilities); + when(serviceProvider.getDataProvider()).thenReturn(mock(DataProvider.class)); + when(serviceProvider.getConfigurationFileRepresentation()).thenReturn(configurationRepresentation); + } + + @Test + public void testCreateOnf14Component() throws Exception { + when(accessor.getCapabilites().isSupportingNamespace(ControlConstruct.QNAME)).thenReturn(true); + when(accessor.getNetconfBindingAccessor()).thenReturn(Optional.of(mock(NetconfBindingAccessor.class))); + when(accessor.getNetconfDomAccessor()).thenReturn(Optional.of(mock(NetconfDomAccessor.class))); + Onf14NetworkElementFactory factory = new Onf14NetworkElementFactory(); + assertTrue((factory.create(accessor, serviceProvider)).isPresent()); + } + + @Test + public void testCreateNone() throws Exception { + when(accessor.getCapabilites().isSupportingNamespace(ControlConstruct.QNAME)).thenReturn(false); + Onf14NetworkElementFactory factory = new Onf14NetworkElementFactory(); + assertTrue(factory.create(accessor, serviceProvider).isEmpty()); + } +} + diff --git a/sdnr/wt/devicemanager-onap/onf14/provider/src/test/java/org/onap/ccsdk/features/sdnr/wt/devicemanager/onf14/TestOnf14ToInternalDataModel2.java b/sdnr/wt/devicemanager-onap/onf14/provider/src/test/java/org/onap/ccsdk/features/sdnr/wt/devicemanager/onf14/TestOnf14ToInternalDataModel2.java new file mode 100644 index 000000000..b0b00d935 --- /dev/null +++ b/sdnr/wt/devicemanager-onap/onf14/provider/src/test/java/org/onap/ccsdk/features/sdnr/wt/devicemanager/onf14/TestOnf14ToInternalDataModel2.java @@ -0,0 +1,127 @@ +/* + * ============LICENSE_START======================================================================== + * ONAP : ccsdk feature sdnr wt + * ================================================================================================= + * Copyright (C) 2020 highstreet technologies GmbH Intellectual Property. All rights reserved. + * ================================================================================================= + * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except + * in compliance with the License. You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software distributed under the License + * is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express + * or implied. See the License for the specific language governing permissions and limitations under + * the License. + * ============LICENSE_END========================================================================== + */ +package org.onap.ccsdk.features.sdnr.wt.devicemanager.onf14; + +import static org.junit.Assert.assertEquals; +import java.util.HashMap; +import java.util.Map; +import org.eclipse.jdt.annotation.NonNull; +import org.junit.BeforeClass; +import org.junit.Test; +import org.mockito.Mockito; +import org.onap.ccsdk.features.sdnr.wt.devicemanager.onf14.impl.dataprovider.Onf14ToInternalDataModel; +import org.opendaylight.yang.gen.v1.urn.ietf.params.xml.ns.yang.ietf.yang.types.rev130715.DateAndTime; +import org.opendaylight.yang.gen.v1.urn.onf.yang.core.model._1._4.rev191127.Equipment; +import org.opendaylight.yang.gen.v1.urn.onf.yang.core.model._1._4.rev191127.UniversalId; +import org.opendaylight.yang.gen.v1.urn.onf.yang.core.model._1._4.rev191127.equipment.ActualEquipment; +import org.opendaylight.yang.gen.v1.urn.onf.yang.core.model._1._4.rev191127.equipment.ContainedHolder; +import org.opendaylight.yang.gen.v1.urn.onf.yang.core.model._1._4.rev191127.equipment.ContainedHolderKey; +import org.opendaylight.yang.gen.v1.urn.onf.yang.core.model._1._4.rev191127.equipment.detail.ManufacturedThing; +import org.opendaylight.yang.gen.v1.urn.onf.yang.core.model._1._4.rev191127.manufactured.thing.EquipmentInstance; +import org.opendaylight.yang.gen.v1.urn.onf.yang.core.model._1._4.rev191127.manufactured.thing.EquipmentType; +import org.opendaylight.yang.gen.v1.urn.onf.yang.core.model._1._4.rev191127.manufactured.thing.ManufacturerProperties; +import org.opendaylight.yang.gen.v1.urn.tbd.params.xml.ns.yang.network.topology.rev131021.NodeId; + +public class TestOnf14ToInternalDataModel2 extends Mockito { + + private static NodeId nodeId; + private static Equipment currentEq; + private static Equipment parentEq; + private static ActualEquipment component; + private static ContainedHolder holder; + private static ManufacturedThing manThing; + private static ManufacturerProperties manProperties; + private static EquipmentInstance eqInstance; + private static EquipmentType eqType; + + @BeforeClass + public static void init() { + nodeId = mock(NodeId.class); + currentEq = mock(Equipment.class); + parentEq = mock(Equipment.class); + component = mock(ActualEquipment.class); + holder = mock(ContainedHolder.class); + manThing = mock(ManufacturedThing.class); + manProperties = mock(ManufacturerProperties.class); + eqInstance = mock(EquipmentInstance.class); + eqType = mock(EquipmentType.class); + + when(nodeId.getValue()).thenReturn("CoreModel-1-4-node"); + + when(component.getLocalId()).thenReturn("actLocalEq"); + when(currentEq.getUuid()).thenReturn(new UniversalId("0Aabcdef-0abc-0cfD-0abC-0123456789AB")); + when(parentEq.getUuid()).thenReturn(new UniversalId("0Aabcdef-0123-0abc-abcd-0123456789AB")); + + @NonNull Map<ContainedHolderKey, ContainedHolder> containedHolderList = new HashMap<>(); + containedHolderList.put(holder.key(),holder); + when(currentEq.nonnullContainedHolder()).thenReturn(containedHolderList); + + } + + @Test + public void test1() { + + Onf14ToInternalDataModel model = new Onf14ToInternalDataModel(); + + when(currentEq.getActualEquipment()).thenReturn(component); + when(holder.getOccupyingFru()).thenReturn(new UniversalId("12345678-0123-0abc-abcd-0123456789AB")); + when(component.getManufacturedThing()).thenReturn(manThing); + when(manThing.getManufacturerProperties()).thenReturn(manProperties); + when(manThing.getEquipmentInstance()).thenReturn(eqInstance); + when(eqInstance.getManufactureDate()).thenReturn(new DateAndTime("2020-02-05T12:30:45.283Z")); + when(manThing.getEquipmentType()).thenReturn(eqType); + + model.getInternalEquipment(nodeId, currentEq, parentEq, 0); + assertEquals(currentEq.getActualEquipment().getLocalId(), "actLocalEq"); + } + + @Test + public void test2() { + + Onf14ToInternalDataModel model = new Onf14ToInternalDataModel(); + + when(holder.getOccupyingFru()).thenReturn(null); + when(component.getManufacturedThing()).thenReturn(null); + when(manThing.getManufacturerProperties()).thenReturn(null); + when(manThing.getEquipmentInstance()).thenReturn(null); + when(manThing.getEquipmentType()).thenReturn(null); + + model.getInternalEquipment(nodeId, currentEq, null, 0); + } + + + @Test + public void test3() { + Onf14ToInternalDataModel model = new Onf14ToInternalDataModel(); + + when(component.getManufacturedThing()).thenReturn(manThing); + when(manThing.getManufacturerProperties()).thenReturn(null); + when(manThing.getEquipmentInstance()).thenReturn(null); + when(manThing.getEquipmentType()).thenReturn(null); + + model.getInternalEquipment(nodeId, currentEq, null, 0); + } + + @Test + public void test4() { + Onf14ToInternalDataModel model = new Onf14ToInternalDataModel(); + + when(currentEq.getActualEquipment()).thenReturn(null); + model.getInternalEquipment(nodeId, currentEq, null, 0); + } +} diff --git a/sdnr/wt/devicemanager-onap/onf14/provider/src/test/java/org/onap/ccsdk/features/sdnr/wt/devicemanager/onf14/TestOnf14WireInterfaceNotificationListener.java b/sdnr/wt/devicemanager-onap/onf14/provider/src/test/java/org/onap/ccsdk/features/sdnr/wt/devicemanager/onf14/TestOnf14WireInterfaceNotificationListener.java new file mode 100644 index 000000000..e64847b91 --- /dev/null +++ b/sdnr/wt/devicemanager-onap/onf14/provider/src/test/java/org/onap/ccsdk/features/sdnr/wt/devicemanager/onf14/TestOnf14WireInterfaceNotificationListener.java @@ -0,0 +1,198 @@ +/* + * ============LICENSE_START======================================================================== + * ONAP : ccsdk feature sdnr wt + * ================================================================================================= + * Copyright (C) 2020 highstreet technologies GmbH Intellectual Property. All rights reserved. + * ================================================================================================= + * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except + * in compliance with the License. You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software distributed under the License + * is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express + * or implied. See the License for the specific language governing permissions and limitations under + * the License. + * ============LICENSE_END========================================================================== + */ +package org.onap.ccsdk.features.sdnr.wt.devicemanager.onf14; + +import org.eclipse.jdt.annotation.NonNull; +import org.junit.Before; +import org.junit.Test; +import org.mockito.Mockito; +import org.mockito.invocation.InvocationOnMock; +import org.mockito.stubbing.Answer; +import org.onap.ccsdk.features.sdnr.wt.dataprovider.model.DataProvider; +import org.onap.ccsdk.features.sdnr.wt.devicemanager.onf14.impl.interfaces.Onf14WireInterfaceNotificationListener; +import org.onap.ccsdk.features.sdnr.wt.devicemanager.service.DeviceManagerServiceProvider; +import org.onap.ccsdk.features.sdnr.wt.devicemanager.service.FaultService; +import org.onap.ccsdk.features.sdnr.wt.devicemanager.service.NotificationService; +import org.onap.ccsdk.features.sdnr.wt.netconfnodestateservice.NetconfBindingAccessor; +import org.onap.ccsdk.features.sdnr.wt.websocketmanager.model.WebsocketManagerService; +import org.opendaylight.yang.gen.v1.urn.ietf.params.xml.ns.yang.ietf.yang.types.rev130715.DateAndTime; +import org.opendaylight.yang.gen.v1.urn.onf.yang.core.model._1._4.rev191127.UniversalId; +import org.opendaylight.yang.gen.v1.urn.onf.yang.wire._interface._2._0.rev200123.AttributeValueChangedNotification; +import org.opendaylight.yang.gen.v1.urn.onf.yang.wire._interface._2._0.rev200123.ObjectCreationNotification; +import org.opendaylight.yang.gen.v1.urn.onf.yang.wire._interface._2._0.rev200123.ObjectDeletionNotification; +import org.opendaylight.yang.gen.v1.urn.onf.yang.wire._interface._2._0.rev200123.ProblemNotification; +import org.opendaylight.yang.gen.v1.urn.onf.yang.wire._interface._2._0.rev200123.SEVERITYTYPE; +import org.opendaylight.yang.gen.v1.urn.onf.yang.wire._interface._2._0.rev200123.SEVERITYTYPECRITICAL; +import org.opendaylight.yang.gen.v1.urn.onf.yang.wire._interface._2._0.rev200123.SEVERITYTYPEMAJOR; +import org.opendaylight.yang.gen.v1.urn.onf.yang.wire._interface._2._0.rev200123.SEVERITYTYPEMINOR; +import org.opendaylight.yang.gen.v1.urn.onf.yang.wire._interface._2._0.rev200123.SEVERITYTYPENONALARMED; +import org.opendaylight.yang.gen.v1.urn.onf.yang.wire._interface._2._0.rev200123.SEVERITYTYPEWARNING; +import org.opendaylight.yang.gen.v1.urn.tbd.params.xml.ns.yang.network.topology.rev131021.NodeId; + +public class TestOnf14WireInterfaceNotificationListener extends Mockito { + private NetconfBindingAccessor accessor; + private NodeId nodeId; + private DeviceManagerServiceProvider serviceProvider; + private FaultService faultService; + private DataProvider databaseService; + private NotificationService notificationService; + + private ObjectDeletionNotification deletionNotif; + private ObjectCreationNotification creationNotif; + private ProblemNotification problemNotif; + private AttributeValueChangedNotification attrValChangedNotif; + private @NonNull WebsocketManagerService websocketService; + + @Before + public void init() { + accessor = mock(NetconfBindingAccessor.class); + nodeId = mock(NodeId.class); + serviceProvider = mock(DeviceManagerServiceProvider.class); + faultService = mock(FaultService.class); + databaseService = mock(DataProvider.class); + notificationService = mock(NotificationService.class); + websocketService = mock(WebsocketManagerService.class); + + problemNotif = mock(ProblemNotification.class); + deletionNotif = mock(ObjectDeletionNotification.class); + creationNotif = mock(ObjectCreationNotification.class); + attrValChangedNotif = mock(AttributeValueChangedNotification.class); + + when(accessor.getNodeId()).thenReturn(nodeId); + when(problemNotif.getCounter()).thenReturn(10); + when(problemNotif.getTimestamp()).thenReturn(new DateAndTime("2020-02-05T12:30:45.283Z")); + when(problemNotif.getObjectIdRef()).thenReturn(new UniversalId("12345678-0123-0abc-abcd-0123456789AB")); + when(problemNotif.getProblem()).thenReturn("modulationIsDownShifted"); + + when(attrValChangedNotif.getAttributeName()).thenReturn("12345678-0123-2345-abcd-0123456789AB"); + when(attrValChangedNotif.getCounter()).thenReturn(20); + when(attrValChangedNotif.getNewValue()).thenReturn("new-value"); + when(attrValChangedNotif.getObjectIdRef()).thenReturn(new UniversalId("12345678-0123-1234-abcd-0123456789AB")); + when(attrValChangedNotif.getTimestamp()).thenReturn(new DateAndTime("2020-02-05T12:30:45.283Z")); + + when(creationNotif.getObjectType()).thenReturn("air-interface-name"); + when(creationNotif.getCounter()).thenReturn(20); + when(creationNotif.getObjectIdRef()).thenReturn(new UniversalId("12345678-0123-1234-abcd-0123456789AB")); + when(creationNotif.getTimestamp()).thenReturn(new DateAndTime("2020-02-05T12:30:45.283Z")); + + when(deletionNotif.getCounter()).thenReturn(20); + when(deletionNotif.getObjectIdRef()).thenReturn(new UniversalId("12345678-0123-1234-abcd-0123456789AB")); + when(deletionNotif.getTimestamp()).thenReturn(new DateAndTime("2020-02-05T12:30:45.283Z")); + + when(serviceProvider.getFaultService()).thenReturn(faultService); + when(serviceProvider.getDataProvider()).thenReturn(databaseService); + when(serviceProvider.getNotificationService()).thenReturn(notificationService); + when(serviceProvider.getWebsocketService()).thenReturn(websocketService); + } + + @Test + public void testOtherNotif() { + Onf14WireInterfaceNotificationListener notifListener = + new Onf14WireInterfaceNotificationListener(accessor, serviceProvider); + + notifListener.onObjectDeletionNotification(deletionNotif); + notifListener.onObjectCreationNotification(creationNotif); + notifListener.onAttributeValueChangedNotification(attrValChangedNotif); + } + + @Test + public void testProblemNotifCritical() { + Onf14WireInterfaceNotificationListener notifListener = + new Onf14WireInterfaceNotificationListener(accessor, serviceProvider); + + when(problemNotif.getSeverity()).thenAnswer(new Answer<Class<? extends SEVERITYTYPE>>() { + @Override + public Class<? extends SEVERITYTYPE> answer(InvocationOnMock invocation) throws Throwable { + return SEVERITYTYPECRITICAL.class; + } + }); + + notifListener.onProblemNotification(problemNotif); + } + + @Test + public void testProblemNotifMajor() { + Onf14WireInterfaceNotificationListener notifListener = + new Onf14WireInterfaceNotificationListener(accessor, serviceProvider); + + when(problemNotif.getSeverity()).thenAnswer(new Answer<Class<? extends SEVERITYTYPE>>() { + @Override + public Class<? extends SEVERITYTYPE> answer(InvocationOnMock invocation) throws Throwable { + return SEVERITYTYPEMAJOR.class; + } + }); + + notifListener.onProblemNotification(problemNotif); + } + + @Test + public void testProblemNotifMinor() { + Onf14WireInterfaceNotificationListener notifListener = + new Onf14WireInterfaceNotificationListener(accessor, serviceProvider); + + when(problemNotif.getSeverity()).thenAnswer(new Answer<Class<? extends SEVERITYTYPE>>() { + @Override + public Class<? extends SEVERITYTYPE> answer(InvocationOnMock invocation) throws Throwable { + return SEVERITYTYPEMINOR.class; + } + }); + + notifListener.onProblemNotification(problemNotif); + } + + @Test + public void testProblemNotifWarning() { + Onf14WireInterfaceNotificationListener notifListener = + new Onf14WireInterfaceNotificationListener(accessor, serviceProvider); + + when(problemNotif.getSeverity()).thenAnswer(new Answer<Class<? extends SEVERITYTYPE>>() { + @Override + public Class<? extends SEVERITYTYPE> answer(InvocationOnMock invocation) throws Throwable { + return SEVERITYTYPEWARNING.class; + } + }); + + notifListener.onProblemNotification(problemNotif); + } + + @Test + public void testProblemNotifNonalarmed() { + Onf14WireInterfaceNotificationListener notifListener = + new Onf14WireInterfaceNotificationListener(accessor, serviceProvider); + + when(problemNotif.getSeverity()).thenAnswer(new Answer<Class<? extends SEVERITYTYPE>>() { + @Override + public Class<? extends SEVERITYTYPE> answer(InvocationOnMock invocation) throws Throwable { + return SEVERITYTYPENONALARMED.class; + } + }); + + notifListener.onProblemNotification(problemNotif); + } + + @Test + public void testProblemNotifNull() { + Onf14WireInterfaceNotificationListener notifListener = + new Onf14WireInterfaceNotificationListener(accessor, serviceProvider); + + when(problemNotif.getSeverity()).thenReturn(null); + + notifListener.onProblemNotification(problemNotif); + } + +} diff --git a/sdnr/wt/devicemanager-onap/onf14/provider/src/test/java/org/onap/ccsdk/features/sdnr/wt/devicemanager/onf14/TestSeverity.java b/sdnr/wt/devicemanager-onap/onf14/provider/src/test/java/org/onap/ccsdk/features/sdnr/wt/devicemanager/onf14/TestSeverity.java new file mode 100644 index 000000000..686942a6b --- /dev/null +++ b/sdnr/wt/devicemanager-onap/onf14/provider/src/test/java/org/onap/ccsdk/features/sdnr/wt/devicemanager/onf14/TestSeverity.java @@ -0,0 +1,80 @@ +/* + * ============LICENSE_START======================================================= + * ONAP : ccsdk features + * ================================================================================ + * Copyright (C) 2020 highstreet technologies GmbH Intellectual Property. + * All rights reserved. + * ================================================================================ + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + * ============LICENSE_END========================================================= + * + */ +package org.onap.ccsdk.features.sdnr.wt.devicemanager.onf14; + +import static org.junit.Assert.assertTrue; +import org.junit.Test; +import org.mockito.Mockito; +import org.onap.ccsdk.features.sdnr.wt.devicemanager.onf14.impl.interfaces.Onf14AirInterface; +import org.onap.ccsdk.features.sdnr.wt.devicemanager.onf14.impl.interfaces.Onf14WireInterface; +import org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.data.provider.rev201110.SeverityType; + +public class TestSeverity extends Mockito { + + @Test + public void test1_1() { + assertTrue(Onf14WireInterface.mapSeverity( + org.opendaylight.yang.gen.v1.urn.onf.yang.wire._interface._2._0.rev200123.SEVERITYTYPECRITICAL.class) + .equals(SeverityType.Critical)); + } + + @Test + public void test1_2() { + assertTrue(Onf14WireInterface.mapSeverity( + org.opendaylight.yang.gen.v1.urn.onf.yang.wire._interface._2._0.rev200123.SEVERITYTYPEWARNING.class) + .equals(SeverityType.Warning)); + } + + @Test + public void test1_3() { + assertTrue(Onf14WireInterface.mapSeverity( + org.opendaylight.yang.gen.v1.urn.onf.yang.wire._interface._2._0.rev200123.SEVERITYTYPEMINOR.class) + .equals(SeverityType.Minor)); + } + + @Test + public void test1_4() { + assertTrue(Onf14WireInterface.mapSeverity( + org.opendaylight.yang.gen.v1.urn.onf.yang.wire._interface._2._0.rev200123.SEVERITYTYPEMAJOR.class) + .equals(SeverityType.Major)); + } + + public void test2_1() { + assertTrue(Onf14AirInterface.mapSeverity( + org.opendaylight.yang.gen.v1.urn.onf.yang.air._interface._2._0.rev200121.SEVERITYTYPECRITICAL.class) + .equals(SeverityType.Critical)); + } + + @Test + public void test2_2() { + assertTrue(Onf14AirInterface.mapSeverity( + org.opendaylight.yang.gen.v1.urn.onf.yang.air._interface._2._0.rev200121.SEVERITYTYPEMINOR.class) + .equals(SeverityType.Minor)); + } + + @Test + public void test2_3() { + assertTrue(Onf14AirInterface.mapSeverity(null).equals(SeverityType.NonAlarmed)); + } + + +} diff --git a/sdnr/wt/devicemanager-onap/onf14/provider/src/test/resources/simplelogger.properties b/sdnr/wt/devicemanager-onap/onf14/provider/src/test/resources/simplelogger.properties new file mode 100644 index 000000000..9af26dc96 --- /dev/null +++ b/sdnr/wt/devicemanager-onap/onf14/provider/src/test/resources/simplelogger.properties @@ -0,0 +1,61 @@ +# +# ============LICENSE_START======================================================= +# ONAP : ccsdk features +# ================================================================================ +# Copyright (C) 2020 AT&T Intellectual Property. All rights reserved. +# ================================================================================ +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. +# ============LICENSE_END======================================================= +# +# + +# SLF4J's SimpleLogger configuration file +# Simple implementation of Logger that sends all enabled log messages, for all defined loggers, to System.err. + +# Default logging detail level for all instances of SimpleLogger. +# Must be one of ("trace", "debug", "info", "warn", or "error"). +# If not specified, defaults to "info". +org.slf4j.simpleLogger.defaultLogLevel=info + +# Logging detail level for a SimpleLogger instance named "xxx.yyy.zzz". +# Must be one of ("trace", "debug", "info", "warn", or "error"). +# If not specified, the default logging detail level is used. +# org.slf4j.simpleLogger.log.xxx.yyy=debug +org.slf4j.simpleLogger.log.org.onap.ccsdk.features.sdnr.wt.devicemanager=info +org.slf4j.simpleLogger.log.org.onap.ccsdk.features.sdnr.wt.devicemanager.test=debug +org.slf4j.simpleLogger.log.org.onap.ccsdk.features.sdnr.wt.database=debug +org.slf4j.simpleLogger.log.org.onap.ccsdk.features.sdnr.wt.devicemanager.archiveservice=info +org.slf4j.simpleLogger.log.org.onap.ccsdk.features.sdnr.wt.devicemanager.base.internalTypes.Resources=info +org.slf4j.simpleLogger.log.org.onap.ccsdk.features.sdnr.wt.devicemanager.base.netconf.container=info + +# Set to true if you want the current date and time to be included in output messages. +# Default is false, and will output the number of milliseconds elapsed since startup. +#org.slf4j.simpleLogger.showDateTime=false + +# The date and time format to be used in the output messages. +# The pattern describing the date and time format is the same that is used in java.text.SimpleDateFormat. +# If the format is not specified or is invalid, the default format is used. +# The default format is yyyy-MM-dd HH:mm:ss:SSS Z. +#org.slf4j.simpleLogger.dateTimeFormat=yyyy-MM-dd HH:mm:ss:SSS Z + +# Set to true if you want to output the current thread name. +# Defaults to true. +#org.slf4j.simpleLogger.showThreadName=true + +# Set to true if you want the Logger instance name to be included in output messages. +# Defaults to true. +#org.slf4j.simpleLogger.showLogName=true + +# Set to true if you want the last component of the name to be included in output messages. +# Defaults to false. +#org.slf4j.simpleLogger.showShortLogName=false |