Add aaa-12 add yang file for huawei device and coding for connect device/disconnect device

RCA:
SOL:
修改人:maxiaonan
检视人:
This commit is contained in:
maxiaonan 2019-08-15 16:00:02 +08:00
parent d7b4fd3080
commit 5e3b7a6524
27 changed files with 12488 additions and 5 deletions

View File

@ -64,5 +64,20 @@ and is available at http://www.eclipse.org/legal/epl-v10.html
<artifactId>mockito-core</artifactId> <artifactId>mockito-core</artifactId>
<scope>test</scope> <scope>test</scope>
</dependency> </dependency>
<dependency>
<groupId>org.opendaylight.netconf</groupId>
<artifactId>sal-netconf-connector</artifactId>
<version>1.8.3</version>
</dependency>
<dependency>
<groupId>org.opendaylight.mdsal</groupId>
<artifactId>mdsal-binding-api</artifactId>
<version>4.0.2</version>
</dependency>
<dependency>
<groupId>org.opendaylight.controller</groupId>
<artifactId>config-manager</artifactId>
<version>0.8.4</version>
</dependency>
</dependencies> </dependencies>
</project> </project>

View File

@ -17,7 +17,7 @@ public class HuaweiDriverProvider {
private final DataBroker dataBroker; private final DataBroker dataBroker;
private HuaweiDriverRegister register = null; //胡军 private HuaweiDriverRegister register = null; //胡军
private HuaweiNetconfSpeaker netconfSpeaker = null; //肖男 private HuaweiNetconfSpeaker netconfSpeaker = null;
public HuaweiDriverProvider(final DataBroker dataBroker) { public HuaweiDriverProvider(final DataBroker dataBroker) {
this.dataBroker = dataBroker; this.dataBroker = dataBroker;

View File

@ -7,14 +7,257 @@
*/ */
package com.cmcc.cmhi.huawei.impl; package com.cmcc.cmhi.huawei.impl;
import org.opendaylight.controller.md.sal.binding.api.DataBroker; import com.google.common.base.Optional;
import com.google.common.base.Preconditions;
import com.google.common.base.Strings;
import com.google.common.util.concurrent.ThreadFactoryBuilder;
import org.opendaylight.controller.md.sal.binding.api.*;
import org.opendaylight.controller.md.sal.common.api.data.LogicalDatastoreType;
import org.opendaylight.controller.md.sal.common.api.data.ReadFailedException;
import org.opendaylight.controller.sal.binding.api.BindingAwareBroker;
import org.opendaylight.controller.sal.binding.api.BindingAwareBroker.RpcRegistration;
import org.opendaylight.controller.sal.binding.api.BindingAwareProvider;
import org.opendaylight.yang.gen.v1.http.www.huawei.com.netconf.vrp.huawei.devm.rev181123.Devm;
import org.opendaylight.yang.gen.v1.http.www.huawei.com.netconf.vrp.huawei.devm.rev181123.devm.CpuInfos;
import org.opendaylight.yang.gen.v1.http.www.huawei.com.netconf.vrp.huawei.devm.rev181123.devm.MemoryInfos;
import org.opendaylight.yang.gen.v1.http.www.huawei.com.netconf.vrp.huawei.devm.rev181123.devm.cpuinfos.CpuInfo;
import org.opendaylight.yang.gen.v1.http.www.huawei.com.netconf.vrp.huawei.devm.rev181123.devm.memoryinfos.MemoryInfo;
import org.opendaylight.yang.gen.v1.urn.opendaylight.netconf.node.topology.rev150114.NetconfNode;
import org.opendaylight.yang.gen.v1.urn.opendaylight.netconf.node.topology.rev150114.network.topology.topology.topology.types.TopologyNetconf;
import org.opendaylight.yang.gen.v1.urn.tbd.params.xml.ns.yang.network.topology.rev131021.NetworkTopology;
import org.opendaylight.yang.gen.v1.urn.tbd.params.xml.ns.yang.network.topology.rev131021.NodeId;
import org.opendaylight.yang.gen.v1.urn.tbd.params.xml.ns.yang.network.topology.rev131021.TopologyId;
import org.opendaylight.yang.gen.v1.urn.tbd.params.xml.ns.yang.network.topology.rev131021.network.topology.Topology;
import org.opendaylight.yang.gen.v1.urn.tbd.params.xml.ns.yang.network.topology.rev131021.network.topology.TopologyKey;
import org.opendaylight.yang.gen.v1.urn.tbd.params.xml.ns.yang.network.topology.rev131021.network.topology.topology.Node;
import org.opendaylight.yang.gen.v1.urn.tbd.params.xml.ns.yang.network.topology.rev131021.network.topology.topology.NodeBuilder;
import org.opendaylight.yang.gen.v1.urn.tbd.params.xml.ns.yang.network.topology.rev131021.network.topology.topology.NodeKey;
import org.opendaylight.yangtools.concepts.ListenerRegistration;
import org.opendaylight.yangtools.yang.binding.InstanceIdentifier;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
public class HuaweiNetconfSpeaker { import javax.annotation.Nonnull;
import java.util.ArrayList;
import java.util.Collection;
import java.util.List;
import java.util.UUID;
import java.util.concurrent.*;
private final DataBroker dataBroker; import static org.opendaylight.controller.md.sal.binding.api.DataObjectModification.ModificationType.DELETE;
import static org.opendaylight.controller.md.sal.binding.api.DataObjectModification.ModificationType.WRITE;
/**
* @author MaXiaonan
* @Type HuaweiNetconfSpeaker.class
* @Desc
* @date 2019/8/12 11:46
*/
public class HuaweiNetconfSpeaker implements DataTreeChangeListener,
BindingAwareProvider, AutoCloseable {
private MountPointService mountService;
private DataBroker dataBroker;
public static final InstanceIdentifier<Topology> NETCONF_TOPO_IID =
InstanceIdentifier
.create(NetworkTopology.class)
.child(Topology.class,
new TopologyKey(new TopologyId(TopologyNetconf.QNAME.getLocalName())));
private static final InstanceIdentifier<?> NETCONF_IID = InstanceIdentifier.builder(NetworkTopology.class).build();
private static final Logger LOG = LoggerFactory.getLogger(HuaweiNetconfSpeaker.class);
private RpcRegistration rpcReg;
private ListenerRegistration<HuaweiNetconfSpeaker> dataTreeChangeListenerRegistration;
private CopyOnWriteArrayList deviceList = new CopyOnWriteArrayList();
/**
* Scheduled Task
*/
private ThreadFactory timeThreadFactory = new ThreadFactoryBuilder().setNameFormat("huawei-pool-d%").setDaemon(true).build();
/**
* Common Thread Pool
*/
private ScheduledExecutorService pool = new ScheduledThreadPoolExecutor(5, timeThreadFactory,
new ThreadPoolExecutor.AbortPolicy());
public HuaweiNetconfSpeaker(DataBroker dataBroker) { public HuaweiNetconfSpeaker(DataBroker dataBroker) {
this.dataBroker = dataBroker; this.dataBroker = dataBroker;
startTask();
}
public void connectDevice(String netconfNodeId,final NetconfNode netconfNode) {
//add node to list
final NodeId nodeId;
if (!Strings.isNullOrEmpty(netconfNodeId)) {
nodeId = new NodeId(netconfNodeId);
} else {
nodeId = new NodeId(UUID.randomUUID().toString().replace("-", ""));
}
final Node node = new NodeBuilder()
.setKey(new NodeKey(nodeId))
.setNodeId(nodeId)
.addAugmentation(NetconfNode.class,netconfNode)
.build();
final WriteTransaction transaction = dataBroker.newWriteOnlyTransaction();
transaction.put(LogicalDatastoreType.CONFIGURATION, NetconfIidFactory.netconfNodeIid(nodeId.getValue()), node);
transaction.commit();
}
public boolean disConnectDevice(String netconfNodeId) {
final WriteTransaction transaction = dataBroker.newWriteOnlyTransaction();
final InstanceIdentifier<Node> iid = NetconfIidFactory.netconfNodeIid(netconfNodeId);
transaction.delete(LogicalDatastoreType.CONFIGURATION, iid);
try {
LOG.debug("Deleting netconf node: {}", netconfNodeId);
transaction.commit().get();
return true;
} catch (final InterruptedException | ExecutionException e) {
LOG.error("Unable to remove node with Iid {}", iid, e);
return false;
}
}
@Override
public void close() throws Exception {
LOG.info("huawei mount Provider Closed");
// Clean up the RPC service registration
if (rpcReg != null) {
rpcReg.close();
}
// Clean up the Data Change Listener registration
}
/**
* A method called when the session to MD-SAL is established. It initializes
* references to MD-SAL services needed throughout the lifetime of the
* huawei netconf application and registers its RPC implementation and Data change
* Listener with the MD-SAL
* <p>
* The skeleton for this method was generated with the MD-SAL application
* archetype.
*
* @param session Reference to the established MD-SAL session
*/
@Override
public void onSessionInitiated(BindingAwareBroker.ProviderContext session) {
LOG.info("HuaweiNetconfSpeaker Session Initiated");
this.mountService = session.getSALService(MountPointService.class);
this.dataBroker = session.getSALService(DataBroker.class);
}
@Override
public void onDataTreeChanged(@Nonnull Collection changes) {
for (Object obj : changes) {
DataTreeModification<?> change = (DataTreeModification<?>) obj;
DataObjectModification rootNode = change.getRootNode();
String nodeId = "";
if (rootNode.getModificationType() == WRITE) {
// Toaster oldToaster = rootNode.getDataBefore();
// Toaster newToaster = rootNode.getDataAfter();
// LOG.info("onDataTreeChanged - Toaster config with path {} was added or replaced: "
// + "old Toaster: {}, new Toaster: {}", change.getRootPath().getRootIdentifier(),
// oldToaster, newToaster);
if (nodeId != null) {
connectDevice(nodeId,null);
}
} else if (rootNode.getModificationType() == DELETE) {
LOG.info("onDataTreeChanged - Toaster config with path {} was deleted: old Toaster: {}",
change.getRootPath().getRootIdentifier(), rootNode.getDataBefore());
disConnectDevice(nodeId);
}
}
}
private void startTask() {
pool.scheduleAtFixedRate(()->{
for(Object device :deviceList){
readInfoFromDevice("");
}
},0,10000,TimeUnit.MILLISECONDS);
}
private void readInfoFromDevice(String s) {
final Optional<MountPoint> hwNodeOptional = mountService.getMountPoint(NETCONF_TOPO_IID
.child(Node.class, new NodeKey(new NodeId(s))));
Preconditions.checkArgument(hwNodeOptional.isPresent(),
"Unable to locate mountpoint: %s, not mounted yet or not configured",
s);
final MountPoint hwNode = hwNodeOptional.get();
// Get the DataBroker for the mounted node
final DataBroker hwNodeBroker = hwNode.getService(DataBroker.class).get();
// Start a new read only transaction that we will use to read data
// from the device
final ReadOnlyTransaction hwNodeReadTx = hwNodeBroker.newReadOnlyTransaction();
// First, we get an Instance Identifier for the portion of the
// operational data that we want to browse through. Note that we are
// getting an identifier to a more specific path - the cp
// container within the interface-properties container. The Instance
// Identifier path is equivalent to:
// '.../yang-ext:mount/huawei-devm:devm/cpuinfos'
InstanceIdentifier<CpuInfos> iid =
InstanceIdentifier.create(Devm.class).child(CpuInfos.class);
Optional<CpuInfos> cupInfos;
try {
// Read from a transaction is asynchronous, but a simple
// get/checkedGet makes the call synchronous
cupInfos = hwNodeReadTx.read(LogicalDatastoreType.OPERATIONAL, iid).checkedGet();
} catch (ReadFailedException e) {
throw new IllegalStateException("Unexpected error reading data from " + s, e);
}
List<CpuInfo> ifcList = new ArrayList<CpuInfo>();
if(cupInfos.isPresent()){
List<CpuInfo> cpuInfoList = cupInfos.get().getCpuInfo();
for(CpuInfo cpuInfo :cpuInfoList){
LOG.info("Show cpu with serial {},cpu usage is {} ",
cpuInfo.getKey().getPosition(), cpuInfo.getSystemCpuUsage());
}
}else {
LOG.info("No data present on path '{}' for mountpoint: {}",
iid, s);
}
// Identifier path is equivalent to:
// '.../yang-ext:mount/huawei-devm:devm/memoryInfos'
InstanceIdentifier<MemoryInfos> memoryIid =
InstanceIdentifier.create(Devm.class).child(MemoryInfos.class);
Optional<MemoryInfos> memoryInfosOptional;
try {
// Read from a transaction is asynchronous, but a simple
// get/checkedGet makes the call synchronous
memoryInfosOptional = hwNodeReadTx.read(LogicalDatastoreType.OPERATIONAL, memoryIid).checkedGet();
} catch (ReadFailedException e) {
throw new IllegalStateException("Unexpected error reading data from " + s, e);
}
List<MemoryInfo> memoryList = new ArrayList<MemoryInfo>();
if(memoryInfosOptional.isPresent()){
List<MemoryInfo> memoryInfoList = memoryInfosOptional.get().getMemoryInfo();
for(MemoryInfo memoryInfo :memoryInfoList){
LOG.info("Show memory with serial {},cpu usage is {} ",
memoryInfo.getKey().getPosition(), memoryInfo.getDoMemoryUsage());
}
}else {
LOG.info("No data present on path '{}' for mountpoint: {}",
iid, s);
}
} }
} }
/**
* Revision history
* -------------------------------------------------------------------------
* <p>
* Date Author Note
* -------------------------------------------------------------------------
* 2019/8/12 MaXiaonan creat
*/

View File

@ -0,0 +1,55 @@
/*
* Project: driver-layer-aggregator
*
* File Created at 2019/8/15
*
* Copyright 2016 CMCC Corporation Limited.
* All rights reserved.
*
* This software is the confidential and proprietary information of
* ZYHY Company. ("Confidential Information"). You shall not
* disclose such Confidential Information and shall use it only in
* accordance with the terms of the license.
*/
package com.cmcc.cmhi.huawei.impl;
import org.opendaylight.yang.gen.v1.urn.opendaylight.netconf.node.topology.rev150114.network.topology.topology.topology.types.TopologyNetconf;
import org.opendaylight.yang.gen.v1.urn.tbd.params.xml.ns.yang.network.topology.rev131021.NetworkTopology;
import org.opendaylight.yang.gen.v1.urn.tbd.params.xml.ns.yang.network.topology.rev131021.NodeId;
import org.opendaylight.yang.gen.v1.urn.tbd.params.xml.ns.yang.network.topology.rev131021.TopologyId;
import org.opendaylight.yang.gen.v1.urn.tbd.params.xml.ns.yang.network.topology.rev131021.network.topology.Topology;
import org.opendaylight.yang.gen.v1.urn.tbd.params.xml.ns.yang.network.topology.rev131021.network.topology.TopologyKey;
import org.opendaylight.yang.gen.v1.urn.tbd.params.xml.ns.yang.network.topology.rev131021.network.topology.topology.Node;
import org.opendaylight.yang.gen.v1.urn.tbd.params.xml.ns.yang.network.topology.rev131021.network.topology.topology.NodeKey;
import org.opendaylight.yangtools.yang.binding.InstanceIdentifier;
/**
* @author MaXiaonan
* @Type NetconfIidFactory.class
* @Desc
* @date 2019/8/15 8:59
*/
public class NetconfIidFactory {
private NetconfIidFactory() {
throw new IllegalStateException("Instantiating utility class.");
}
public static final InstanceIdentifier<Topology> NETCONF_TOPOLOGY_IID =
InstanceIdentifier.builder(NetworkTopology.class)
.child(Topology.class, new TopologyKey(new TopologyId(TopologyNetconf.QNAME.getLocalName())))
.build();
public static InstanceIdentifier<Node> netconfNodeIid(final String nodeId) {
return NETCONF_TOPOLOGY_IID.child(Node.class, new NodeKey(new NodeId(nodeId)));
}
}
/**
* Revision history
* -------------------------------------------------------------------------
* <p>
* Date Author Note
* -------------------------------------------------------------------------
* 2019/8/15 MaXiaonan creat
*/

View File

@ -0,0 +1,437 @@
/*
Copyright (C) 2013-2018 Huawei Technologies Co., Ltd. All rights reserved.
*/
submodule huawei-devm-action {
belongs-to huawei-devm {
prefix devm;
}
import huawei-pub-type {
prefix pub-type;
}
import ietf-inet-types {
prefix inet;
}
import huawei-extension {
prefix ext;
}
include huawei-devm-type;
organization
"Huawei Technologies Co., Ltd.";
contact
"Huawei Industrial Base
Bantian, Longgang
Shenzhen 518129
People's Republic of China
Website: http://www.huawei.com
Email: support@huawei.com";
description
"the submodule of devm : devm_action";
revision 2018-11-23 {
description
"The modifications in the schema file are synchronized to the YANG file.";
reference
"Huawei private.";
}
revision 2018-06-11 {
description
"The modifications in the schema file are synchronized to the YANG file.";
reference
"Huawei private.";
}
revision 2017-12-23 {
description
"The modifications in the schema file are synchronized to the YANG file.";
reference
"Huawei private.";
}
revision 2017-03-23 {
description
"Functions supported by the schema are added to the YANG file.";
reference
"Huawei private.";
}
revision 2013-01-01 {
description
"Init revision";
reference
"Huawei private.";
}
rpc resetBoard {
description
"Reset board.";
input {
leaf boardPosition {
type string {
length "1..32";
}
description
"Board position.";
}
}
}
rpc resetMpuBoard {
description
"Reset MPU.";
input {
leaf boardPosition {
type string {
length "1..32";
}
description
"Board position.";
}
}
}
rpc resetLpuBoard {
description
"Reset LPU.";
input {
leaf boardPosition {
type string {
length "1..32";
}
description
"Board position.";
}
}
}
rpc resetSfuBoard {
description
"Reset SFU.";
input {
leaf boardPosition {
type string {
length "1..32";
}
description
"Board position.";
}
}
}
rpc switchOver {
description
"Switchover.";
input {
leaf position {
type string {
length "1..32";
}
description
"Chassis position";
}
}
}
rpc resetCard {
description
"Reset Card.";
input {
leaf cardPosition {
type string {
length "1..32";
}
description
"Card position.";
}
}
}
rpc resetChassis {
description
"Reset Chassis.";
input {
leaf chassisPosition {
type string {
length "1..32";
}
description
"Chassis position.";
}
}
}
rpc reboot {
description
"Reboot.";
input {
leaf saveConfig {
type boolean;
default "false";
description
"Flag indicating whether to save the configuration. True: save; False: not save.";
}
}
}
rpc transferFile {
description
"Transfer files.";
input {
leaf serverIpAddress {
type inet:ip-address-no-zone;
mandatory true;
description
"FTP server IP address.";
}
leaf serverPort {
type uint32 {
range "21..65535";
}
default "21";
description
"Server port.";
ext:allowDelete "true";
}
leaf vpnInstanceName {
type string {
length "1..128";
}
description
"VPN instance name.";
ext:allowDelete "true";
}
leaf sourceIpv4Address {
type inet:ipv4-address-no-zone;
description
"Source IPv4 address.";
}
leaf sourceInterfaceName {
type pub-type:ifName;
description
"Source interface name.";
ext:allowDelete "true";
}
leaf serverType {
type devmServerType;
default "ftp";
description
"Server type.";
}
leaf commandType {
type devmTransType;
default "put";
description
"Transmission type.";
ext:allowDelete "true";
}
leaf userName {
type string {
length "1..85";
}
mandatory true;
description
"User name.";
ext:allowDelete "false";
}
leaf password {
type pub-type:password;
mandatory true;
description
"Password.";
ext:allowDelete "false";
}
leaf localFileName {
type string {
length "1..128";
}
mandatory true;
description
"Local file name.";
ext:allowDelete "false";
}
leaf remoteFileName {
type string {
length "1..128";
}
description
"File name on the FTP server.";
ext:allowDelete "true";
}
leaf remoteExtension {
type string {
length "1..5";
}
default ".hw!";
description
"Temporary file name extension used for reliability.";
ext:allowDelete "true";
}
container secureTransferOptions {
description
"Transfer encryption options.";
leaf preferKex {
type devmPreferKexType;
description
"Encryption algorithm.";
ext:allowDelete "true";
}
leaf preferStocCipher {
type devmCipherType;
description
"Encryption algorithm for messages from a client to server.";
ext:allowDelete "true";
}
leaf preferCtosCipher {
type devmCipherType;
description
"Encryption algorithm for messages from a server to client.";
ext:allowDelete "true";
}
leaf preferStocHmac {
type devmStocHmacType;
description
"Prefer Stoc Hmac.";
ext:allowDelete "true";
}
leaf preferCtosHmac {
type devmStocHmacType;
description
"Prefer Ctos Hmac.";
ext:allowDelete "true";
}
leaf keepAliveInterval {
type uint32 {
range "0..60";
}
default "0";
description
"Keepalive interval.";
ext:allowDelete "true";
}
leaf keepAliveCount {
type uint32 {
range "0..100";
}
default "0";
description
"Number of Keepalive packets.";
ext:allowDelete "true";
}
}
}
}
rpc resetOfflineConfig {
description
"Reset offline configuration.";
input {
leaf boardPosition {
type string {
length "1..32";
}
description
"Board position.";
}
}
}
rpc clearInactiveCfg {
description
"Clear Inactive Configuration.";
input {
leaf entClass {
type devmOfflineType;
description
"Class.";
}
leaf position {
type string {
length "1..32";
}
description
"Position.";
}
}
}
rpc ColdResetLpu {
description
"Cold reset LPU.";
input {
leaf boardPosition {
type string {
length "1..32";
}
description
"Board position.";
}
}
}
rpc WarmResetLpu {
description
"Warm reset LPU.";
input {
leaf boardPosition {
type string {
length "1..32";
}
description
"Board position.";
}
}
}
rpc ColdResetMpu {
description
"Cold reset MPU.";
input {
leaf boardPosition {
type string {
length "1..32";
}
description
"Board position.";
}
}
}
rpc WarmResetMpu {
description
"Warm reset MPU.";
input {
leaf boardPosition {
type string {
length "1..32";
}
description
"Board position.";
}
}
}
rpc scheduleRebootAtTime {
description
"Schedule reboot at time.";
input {
leaf scheduleDate {
type pub-type:date;
description
"Date.";
}
leaf scheduleDateTime {
type pub-type:time_hhmm;
description
"Time.";
}
leaf saveConfig {
type boolean;
description
"Flag indicating whether save config";
}
}
}
rpc scheduleRebootDelayTime {
description
"Schedule reboot delay time.";
input {
leaf delayTime {
type string {
length "1..6";
}
description
"Schedule reboot delay time.";
}
leaf saveConfig {
type boolean;
description
"Flag indicating whether save config";
}
}
}
rpc undoSchReboot {
description
"Undo Schedule reboot.";
}
}

View File

@ -0,0 +1,149 @@
/*
Copyright (C) 2013-2018 Huawei Technologies Co., Ltd. All rights reserved.
*/
submodule huawei-devm-notification{
belongs-to huawei-devm{
prefix devm;
}
organization
"Huawei Technologies Co., Ltd.";
contact
"Huawei Industrial Base
Bantian, Longgang
Shenzhen 518129
People's Republic of China
Website: http://www.huawei.com
Email: support@huawei.com";
description
"notification of devm";
revision 2018-11-23 {
description
"The modifications in the schema file are synchronized to the YANG file.";
reference
"Huawei private.";
}
revision 2018-06-11 {
description
"The modifications in the schema file are synchronized to the YANG file.";
reference
"Huawei private.";
}
revision 2017-12-23 {
description
"The modifications in the schema file are synchronized to the YANG file.";
reference
"Huawei private.";
}
revision 2017-03-23 {
description
"Functions supported by the schema are added to the YANG file.";
reference
"Huawei private.";
}
revision 2013-01-01 {
description
"Init revision";
reference
"Huawei private.";
}
notification hwIfMonitorInputRateRising{
description
"Interface input flow bandwidth usage exceeded the trap threshold. (Interface=[IfIndex], BandWidthUsage=[hwIfMonitorInputRatePercentage], TrapThreshold=[hwIfMonitorInputRateThreshold], InterfaceName=[InterfaceName])";
leaf IfIndex{
type uint32;
description
"Interface index";
}
leaf hwIfMonitorInputRateThreshold{
type uint32;
description
"Trap threshold";
}
leaf hwIfMonitorInputRatePercentage{
type uint32;
description
"Input flow bandwidth usage";
}
leaf InterfaceName{
type string;
description
"Interface name";
}
}
notification hwIfMonitorInputRateResume{
description
"Interface input flow bandwidth usage was restored to the trap threshold. (Interface=[IfIndex], BandWidthUsage=[hwIfMonitorInputRatePercentage], TrapThreshold=[hwIfMonitorInputRateThreshold], InterfaceName=[InterfaceName])";
leaf IfIndex{
type uint32;
description
"Interface index";
}
leaf hwIfMonitorInputRateThreshold{
type uint32;
description
"Trap threshold";
}
leaf hwIfMonitorInputRatePercentage{
type uint32;
description
"Input flow bandwidth usage";
}
leaf InterfaceName{
type string;
description
"Interface name";
}
}
notification hwIfMonitorOutputRateResume{
description
"Interface output flow bandwidth usage was restored to the trap threshold. (Interface=[IfIndex], BandWidthUsage=[hwIfMonitorOutputRatePercentage], TrapThreshold=[hwIfMonitorOutputRateThreshold], InterfaceName=[InterfaceName])";
leaf IfIndex{
type uint32;
description
"Interface index";
}
leaf hwIfMonitorOutputRateThreshold{
type uint32;
description
"Trap threshold";
}
leaf InterfaceName{
type string;
description
"Interface name";
}
leaf hwIfMonitorOutputRatePercentage{
type uint32;
description
"Output flow bandwidth usage";
}
}
notification hwIfMonitorOutputRateRising{
description
"Interface output flow bandwidth usage exceeded the trap threshold. (Interface=[IfIndex], BandWidthUsage=[hwIfMonitorOutputRatePercentage], TrapThreshold=[hwIfMonitorOutputRateThreshold], InterfaceName=[InterfaceName])";
leaf IfIndex{
type uint32;
description
"Interface index";
}
leaf hwIfMonitorOutputRateThreshold{
type uint32;
description
"Trap threshold";
}
leaf InterfaceName{
type string;
description
"Interface name";
}
leaf hwIfMonitorOutputRatePercentage{
type uint32;
description
"Output flow bandwidth usage";
}
}
notification entConfigChange{
description
"Records in entity-mib change.";
}
}

View File

@ -0,0 +1,127 @@
/*
Copyright (C) 2013-2018 Huawei Technologies Co., Ltd. All rights reserved.
*/
module huawei-extension {
namespace "http://www.huawei.com/netconf/vrp/huawei-extension";
prefix ext;
organization
"Huawei Technologies Co., Ltd.";
contact
"Huawei Industrial Base
Bantian, Longgang
Shenzhen 518129
People's Republic of China
Website: http://www.huawei.com
Email: support@huawei.com";
description
"ac ne extension yang syntax";
revision 2018-06-11 {
description
"The modifications in the schema file are synchronized to the YANG file.";
reference
"Huawei private.";
}
revision 2017-12-23 {
description
"The modifications in the schema file are synchronized to the YANG file.";
reference
"Huawei private.";
}
revision 2017-03-23 {
description
"Functions supported by the schema are added to the YANG file.";
reference
"Huawei private.";
}
revision 2013-01-01 {
description
"Init revision";
reference
"Huawei private.";
}
extension support-filter {
argument value;
description
"support-filter";
}
extension value-mapping {
description
"value-mapping";
}
extension value-replace {
description
"value-replace";
}
extension item {
argument value;
description
"item";
}
extension meaning {
argument value;
description
"meaning";
}
extension case-sensitivity {
argument value;
description
"case-sensitivity ";
}
extension bitmap-bit-range {
argument value;
description
"bitmap-bit-range";
}
extension masklen {
argument value;
description
"masklen";
}
extension bit {
argument value;
description
"bit";
}
extension allowDelete {
argument value;
description
"allowDelete";
}
extension value-range {
argument value;
description
" The range of values that can be entered using the id-range type or its derived type node. ";
}
extension task-name {
argument value;
description
"task-name";
}
extension entry-from {
argument value;
description "Applies only to a list or presence container whose config is true. " +
"entry-from specifies an instance to be automatically generated by the system "+
"based on other data or to be created by a user.";
}
extension node-ref {
argument value;
description
"Indicates the XPath of the data node for which the rpc operation is performed. "+
"If the rpc operation is performed for the entire system (the corresponding node "+
"cannot be found in the model tree), this syntax is not required.";
}
}

View File

@ -0,0 +1,232 @@
/*
Copyright (C) 2013-2018 Huawei Technologies Co., Ltd. All rights reserved.
*/
submodule huawei-ifm-action {
belongs-to huawei-ifm {
prefix ifm;
}
import huawei-pub-type {
prefix pub-type;
}
import huawei-extension {
prefix ext;
}
include huawei-ifm-type;
organization
"Huawei Technologies Co., Ltd.";
contact
"Huawei Industrial Base
Bantian, Longgang
Shenzhen 518129
People's Republic of China
Website: http://www.huawei.com
Email: support@huawei.com";
description
"the ifm action submodule";
revision 2018-11-23 {
description
"The modifications in the schema file are synchronized to the YANG file.";
reference
"Huawei private.";
}
revision 2018-06-11 {
description
"The modifications in the schema file are synchronized to the YANG file.";
reference
"Huawei private.";
}
revision 2017-12-23 {
description
"The modifications in the schema file are synchronized to the YANG file.";
reference
"Huawei private.";
}
revision 2017-03-23 {
description
"Functions supported by the schema are added to the YANG file.";
reference
"Huawei private.";
}
revision 2013-01-01 {
description
"Init revision";
reference
"Huawei private.";
}
rpc rstStaByIfName {
description
"Clear statistics based on the interface name.";
ext:node-ref "/ifm/interfaces/interface";
input {
leaf ifName {
type pub-type:ifName;
mandatory true;
description
"Clear statistics based on the interface name. ";
}
}
}
rpc rstStaByPhyType {
description
"Clear statistics based on the interface type.";
ext:node-ref "/ifm/interfaces/interface";
input {
leaf ifPhyType {
type ifmcommPhyType;
mandatory true;
description
"To clear the statistics by the type of interface.";
}
}
}
rpc rstStaByAll {
description
"Clear the statistics on all interfaces.";
ext:node-ref "/ifm/interfaces/interface";
input {
leaf allIf {
type boolean;
mandatory true;
description
"Clear the statistics on all interfaces.";
}
}
}
rpc rstMibStatByIfName {
description
"Clear MIB statistics by interface name.";
ext:node-ref "/ifm/interfaces/interface";
input {
leaf ifName {
type pub-type:ifName;
mandatory true;
description
"Name of an interface.";
}
}
}
rpc rstMibStatByPhyType {
description
"Clear MIB statistics by interface type.";
ext:node-ref "/ifm/interfaces/interface";
input {
leaf ifPhyType {
type ifmcommPhyType;
mandatory true;
description
"Interface type.";
}
}
}
rpc rstMibStatByAll {
description
"Clear MIB statistics about all interfaces.";
ext:node-ref "/ifm/interfaces/interface";
input {
leaf allIf {
type boolean;
mandatory true;
description
"Clear statistics about all interfaces.";
}
}
}
rpc rstIfPnlty {
description
"Clear the penalty value of an interface and remove the suppression on the interface.";
ext:node-ref "/ifm/interfaces/interface";
input {
leaf ifName {
type pub-type:ifName;
description
"Name of the interface. For example, ethernet0/1/0.";
}
}
}
rpc rstIfCnt {
description
"Clear the number of flapping control times.";
ext:node-ref "/ifm/interfaces/interface";
input {
leaf ifName {
type pub-type:ifName;
description
"Name of the interface. For example, ethernet0/1/0.";
}
}
}
rpc rstIfCrcAlarm {
description
"Clear PPP CRC alarms.";
ext:node-ref "/ifm/interfaces/interface";
input {
leaf ifName {
type pub-type:ifName;
description
"Interface Name. For example, serial0/3/0:0.";
}
}
}
rpc rstIfMacMtuDisStat {
description
"clear MAC&MTU error statistics.";
ext:node-ref "/ifm/interfaces/interface";
input {
leaf ifName {
type pub-type:ifName;
description
"Interface name of cleared MAC&MTU error statistics.";
}
}
}
rpc rstRemoteIfStat {
description
"Clear remote interface statistics.";
ext:node-ref "/ifm/interfaces/interface";
input {
leaf ifName {
type pub-type:ifName;
description
"Interface name of clear remote interface statistics.";
}
}
}
rpc restartInterface {
description
"Restart interface";
ext:node-ref "/ifm/interfaces/interface";
input {
leaf ifName {
type pub-type:ifName;
mandatory true;
description
"Interface name of the Restart interface";
}
}
}
rpc rstIfMruDisStat {
description
"Clear interface Mru discard statistics.";
ext:node-ref "/ifm/interfaces/interface";
input {
leaf ifName {
type pub-type:ifName;
description
"Interface name of clear interface Mru discard statistics.";
}
}
}
rpc rstRemoteIfStatByIfName {
description
"Clear remote interface statistics by remote interface name.";
ext:node-ref "/ifm/remoteInterfaces/remoteInterface";
input {
leaf ifName {
type pub-type:ifName;
description
"Name of a remote interface.";
}
}
}
}

View File

@ -0,0 +1,538 @@
module huawei-ifm-deviations-nos {
namespace "http://www.huawei.com/netconf/vrp/huawei-ifm-deviations-nos";
prefix ifm-devs-nos;
import huawei-ifm {
prefix ifm;
}
organization
"Huawei Technologies Co., Ltd.";
contact
"Huawei Industrial Base
Bantian, Longgang
Shenzhen 518129
People's Republic of China
Website: http://www.huawei.com
Email: support@huawei.com";
description
"Common interface management, which includes the public configuration of interfaces.";
revision 2018-11-23 {
description
"The modifications in the schema file are synchronized to the YANG file.";
reference "Huawei private.";
}
revision 2018-06-11 {
description
"The modifications in the schema file are synchronized to the YANG file.";
reference "Huawei private.";
}
revision 2017-12-23 {
description
"The modifications in the schema file are synchronized to the YANG file.";
reference "Huawei private.";
}
revision 2017-03-23 {
description
"Functions supported by the schema are added to the YANG file.";
reference "Huawei private.";
}
revision 2013-01-01 {
description
"Init revision";
reference "Huawei private.";
}
typedef ifmam4IpAddrType-deviations {
type enumeration {
enum main {
description
"Primary address of an interface.";
}
enum sub {
description
"Secondary address of an interface.";
}
enum neg {
description
"Negotiated address of an interface.";
}
enum neg_remote {
description
"Remotely negotiated address of an interface.";
}
enum unnumber {
description
"Unnumbered address of an interface.";
}
}
description
"Ip Address Type";
}
typedef ifmam6IpAddr6Type-deviations {
type enumeration {
enum global {
description
"Global unicast address.";
}
enum linkLocal {
description
"Link local address.";
}
enum anycast {
description
"Anycast address.";
}
}
description
"Ipv6 Address Type";
}
typedef ifmcommErrorDownType-deviations {
type enumeration {
enum bpdu-protection {
description
"BPDU protection.";
}
enum l2-loop-occured {
description
"L2 loop.";
}
enum invalid {
description
"None.";
}
}
description
"Interface Error Down Type";
}
typedef ifmcommPhyType-deviations {
type enumeration {
enum Ethernet {
description
"Ethernet interface.";
}
enum GigabitEthernet {
description
"GigabitEthernet interface.";
}
enum Eth-Trunk {
description
"Eth-Trunk interface.";
}
enum Ip-Trunk {
description
"IP-Trunk interface.";
}
enum Pos {
description
"POS interface.";
}
enum Tunnel {
description
"Tunnel interface.";
}
enum NULL {
description
"Null interface.";
}
enum LoopBack {
description
"Loopback interface.";
}
enum Vlanif {
description
"VLANIF interface.";
}
enum 100GE {
description
"100 GigabitEthernet interface.";
}
enum 40GE {
description
"40 GigabitEthernet interface.";
}
enum MTunnel {
description
"MTunnel interface.";
}
enum 10GE {
description
"10 GigabitEthernet interface.";
}
enum MEth {
description
"Management Ethernet interface.";
}
enum Cpos {
description
"CPOS controller.";
}
enum E1 {
description
"E1 controller.";
}
enum Serial {
description
"Serial interface.";
}
enum Mp-group {
description
"MP-group interface.";
}
enum Virtual-Ethernet {
description
"Virtual-Ethernet interface.";
}
enum VMEth {
description
"Virtual management Ethernet interface.";
}
enum Ima-group {
description
"IMA-group interface.";
}
enum Remote-Ap {
description
"Virtual cluster access remote access point interface.";
}
enum VBridge {
description
"Virtual cluster access bridge interface.";
}
enum Atm-Bundle {
description
"ATM-Bundle interface.";
}
enum Lmpif {
description
"Lmpif interface.";
}
enum T1 {
description
"T1 controller.";
}
enum T3 {
description
"T3 controller.";
}
enum Global-VE {
description
"Global-VE interface.";
}
enum Vbdif {
description
"VBDIF interface.";
}
enum E3 {
description
"E3 controller.";
}
enum Cpos-Trunk {
description
"Cpos-Trunk interface.";
}
enum Pos-Trunk {
description
"Pos-Trunk interface.";
}
enum Trunk-Serial {
description
"Trunk-Serial interface.";
}
enum Global-Ima-Group {
description
"Global-Ima-Group interface.";
}
enum Global-Mp-Group {
description
"Global-Mp-Group interface.";
}
enum Gmpls-Uni {
description
"Gmpls-Uni interface.";
}
enum Wdm {
description
"Wdm controller.";
}
enum Nve {
description
"NVE interface.";
}
enum Virtual-Template {
description
"Virtual-Template Interface.";
}
enum 25GE {
description
"25 GigabitEthernet interface.";
}
enum XGigabitEthernet {
description
"XGigabitEthernet interface.";
}
enum ServiceIf {
description
"ServiceIf interface.";
}
enum FlexE {
description
"FlexE interface.";
}
enum 50|100GE {
description
"50|100 GigabitEthernet interface.";
}
enum 50GE {
description
"50 GigabitEthernet interface.";
}
enum FlexE-50G {
description
"FlexE-50G interface.";
}
enum FlexE-100G {
description
"FlexE-100G interface.";
}
enum FlexE-50|100G {
description
"FlexE-50|100G interface.";
}
enum PW-VE {
description
"PW-VE interface.";
}
enum Virtual-Serial {
description
"Virtual-Serial interface.";
}
enum 400GE {
description
"400GE interface.";
}
enum FCoE-Port {
description
"FCoE-Port interface.";
}
enum Virtual-ODUk {
description
"Virtual-ODUk interface.";
}
enum Phy-Serial {
description
"Phy-Serial interface.";
}
}
description
"Interface Physical Type";
}
typedef ifmcommServiceType-deviations {
type enumeration {
enum None {
description
"None.";
}
enum TrunkMember {
description
"Trunk member.";
}
enum MpMember {
description
"MP-Group Member.";
}
enum VbridgeMember {
description
"VBridge member.";
}
enum ImaMember {
description
"IMA member.";
}
enum BundleMember {
description
"Bundle member.";
}
enum CposTrunkMember {
description
"Cpos-Trunk Member.";
}
enum PosTrunkMember {
description
"Pos-Trunk Member.";
}
enum GlobalMpMember {
description
"Global-Mp-group Member.";
}
enum GlobalImaMember {
description
"Global-Ima-group Member.";
}
}
description
"Interface Service Type";
}
typedef ifmcommipv6StatusType-deviations {
type enumeration {
enum preferred {
description
"This is a valid address that can appear as the destination or source address of a packet.";
}
enum inaccessible {
description
"The address is not accessible because the interface to which this address is assigned is not operational.";
}
enum unknown {
description
"The status cannot be determined for some reason.";
}
enum tentative {
description
"The uniqueness of the address on the link is being verified. Addresses in this state should not be used for general communication and should only be used to determine the uniqueness of the address.";
}
enum duplicate {
description
"The address has been determined to be non-unique on the link and so must not be used.";
}
}
description
"The status of an address";
}
deviation "/ifm:ipv6IfStateChange/ifm:rootIndex" {
deviate not-supported;
}
deviation "/ifm:ipv6IfStateChange/ifm:Reason" {
deviate not-supported;
}
deviation "/ifm:linkdown/ifm:rootIndex" {
deviate not-supported;
}
deviation "/ifm:linkdown/ifm:Reason" {
deviate not-supported;
}
deviation "/ifm:linkdown/ifm:PhysicalIndex" {
deviate not-supported;
}
deviation "/ifm:linkup/ifm:rootIndex" {
deviate not-supported;
}
deviation "/ifm:linkup/ifm:Reason" {
deviate not-supported;
}
deviation "/ifm:linkup/ifm:PhysicalIndex" {
deviate not-supported;
}
deviation "/ifm:ifm/ifm:interfaces/ifm:interface/ifm:ifDynamicInfo/ifm:subIfCount" {
deviate not-supported;
}
deviation "/ifm:ifm/ifm:globalConfig/ifm:sysAttriControlMtu" {
deviate not-supported;
}
deviation "/ifm:ifm/ifm:globalConfig/ifm:dualStat" {
deviate not-supported;
}
deviation "/ifm:ifm/ifm:interfaces/ifm:interface/ifm:ifMainIfDescr" {
deviate not-supported;
}
deviation "/ifm:ifm/ifm:interfaces/ifm:interface/ifm:ifNetworkLayerStatus" {
deviate not-supported;
}
deviation "/ifm:ifm/ifm:interfaces/ifm:interface/ifm:isActorBearSrv" {
deviate not-supported;
}
deviation "/ifm:ifm/ifm:interfaces/ifm:interface/ifm:netSlices" {
deviate not-supported;
}
deviation "/ifm:ifm/ifm:interfaces/ifm:interface/ifm:portMode" {
deviate not-supported;
}
deviation "/ifm:ifm/ifm:interfaces/ifm:interface/ifm:isAvailable" {
deviate not-supported;
}
deviation "/ifm:ifm/ifm:interfaces/ifm:interface/ifm:ifCeIpStatiEnable" {
deviate not-supported;
}
deviation "/ifm:ifm/ifm:interfaces/ifm:interface/ifm:ifCeIpStatisticsInfo" {
deviate not-supported;
}
deviation "/ifm:ifm/ifm:interfaces/ifm:interface/ifm:vPosition" {
deviate not-supported;
}
deviation "/ifm:ifm/ifm:interfaces/ifm:interface/ifm:vllPwLoopChk" {
deviate not-supported;
}
deviation "/ifm:ifm/ifm:ipv6InterfaceCountOper" {
deviate not-supported;
}
deviation "/ifm:ifm/ifm:autoRecoveryTimes/ifm:autoRecoveryTime/ifm:errorDownType" {
deviate replace {
type ifm-devs-nos:ifmcommErrorDownType-deviations;
}
}
deviation "/ifm:ifm/ifm:interfaces/ifm:interface/ifm:ifErrorDown/ifm:errorDownCause" {
deviate replace {
type ifm-devs-nos:ifmcommErrorDownType-deviations;
}
}
deviation "/ifm:ifm/ifm:interfaces/ifm:interface/ifm:ifPhyType" {
deviate replace {
type ifm-devs-nos:ifmcommPhyType-deviations;
}
}
deviation "/ifm:ifm/ifm:interfaces/ifm:interface/ifm:ifServiceType" {
deviate replace {
type ifm-devs-nos:ifmcommServiceType-deviations;
}
}
deviation "/ifm:ifm/ifm:interfaces/ifm:interface/ifm:ipv4Config/ifm:am4CfgAddrs/ifm:am4CfgAddr/ifm:addrType" {
deviate replace {
type ifm-devs-nos:ifmam4IpAddrType-deviations;
}
}
deviation "/ifm:ifm/ifm:interfaces/ifm:interface/ifm:ipv4Oper/ifm:ipv4Addrs/ifm:ipv4Addr/ifm:addrType" {
deviate replace {
type ifm-devs-nos:ifmam4IpAddrType-deviations;
}
}
deviation "/ifm:ifm/ifm:interfaces/ifm:interface/ifm:ipv6Config/ifm:am6CfgAddrs/ifm:am6CfgAddr/ifm:addrType6" {
deviate replace {
type ifm-devs-nos:ifmam6IpAddr6Type-deviations;
}
}
deviation "/ifm:ifm/ifm:interfaces/ifm:interface/ifm:ipv6Oper/ifm:ipv6Addrs/ifm:ipv6Addr/ifm:addrType6" {
deviate replace {
type ifm-devs-nos:ifmam6IpAddr6Type-deviations;
}
}
deviation "/ifm:ifm/ifm:staticDimRanges/ifm:staticDimRange/ifm:ifPhyType" {
deviate replace {
type ifm-devs-nos:ifmcommPhyType-deviations;
}
}
deviation "/ifm:rstStaByPhyType/ifm:input/ifm:ifPhyType" {
deviate replace {
type ifm-devs-nos:ifmcommPhyType-deviations;
}
}
deviation "/ifm:rstMibStatByPhyType/ifm:input/ifm:ifPhyType" {
deviate replace {
type ifm-devs-nos:ifmcommPhyType-deviations;
}
}
deviation "/ifm:ifm/ifm:interfaces/ifm:interface/ifm:ipv6Oper/ifm:ipv6Addrs/ifm:ipv6Addr/ifm:status" {
deviate replace {
type ifm-devs-nos:ifmcommipv6StatusType-deviations;
}
}
deviation "/ifm:ifm/ifm:interfaces/ifm:interface/ifm:inportCheck" {
deviate not-supported;
}
}

View File

@ -0,0 +1,64 @@
/*
Copyright (C) 2013-2018 Huawei Technologies Co., Ltd. All rights reserved.
*/
submodule huawei-ifm-flowalarm {
belongs-to huawei-ifm {
prefix ifm;
}
import huawei-extension {
prefix ext;
}
organization
"Huawei Technologies Co., Ltd.";
contact
"Huawei Industrial Base
Bantian, Longgang
Shenzhen 518129
People's Republic of China
Website: http://www.huawei.com
Email: support@huawei.com";
description
"flow alarm";
revision 2018-11-23 {
description
"The modifications in the schema file are synchronized to the YANG file.";
reference
"Huawei private.";
}
revision 2018-06-11 {
description
"The modifications in the schema file are synchronized to the YANG file.";
reference
"Huawei private.";
}
revision 2017-12-23 {
description
"The modifications in the schema file are synchronized to the YANG file.";
reference
"Huawei private.";
}
revision 2017-03-23 {
description
"Functions supported by the schema are added to the YANG file.";
reference
"Huawei private.";
}
revision 2013-01-01 {
description
"Init revision";
reference
"Huawei private.";
}
grouping alarm_type {
description
"";
leaf unknownUnicastAlarm {
type uint32 {
range "1..100";
}
description
"Unknown-unicast alarm threshold, which can be disabled.";
ext:allowDelete "true";
}
}
}

View File

@ -0,0 +1,86 @@
/*
Copyright (C) 2013-2018 Huawei Technologies Co., Ltd. All rights reserved.
*/
submodule huawei-ifm-fr-type {
belongs-to huawei-ifm {
prefix ifm;
}
organization
"Huawei Technologies Co., Ltd.";
contact
"Huawei Industrial Base
Bantian, Longgang
Shenzhen 518129
People's Republic of China
Website: http://www.huawei.com
Email: support@huawei.com";
description
"fr type";
revision 2018-11-23 {
description
"The modifications in the schema file are synchronized to the YANG file.";
reference
"Huawei private.";
}
revision 2018-06-11 {
description
"The modifications in the schema file are synchronized to the YANG file.";
reference
"Huawei private.";
}
revision 2017-12-23 {
description
"The modifications in the schema file are synchronized to the YANG file.";
reference
"Huawei private.";
}
revision 2017-03-23 {
description
"Functions supported by the schema are added to the YANG file.";
reference
"Huawei private.";
}
revision 2013-01-01 {
description
"Init revision";
reference
"Huawei private.";
}
typedef cfgLmiType {
type enumeration {
enum "ansi" {
description
"LMI ANSI.";
}
enum "q933a" {
description
"LMI q933a.";
}
enum "nonstandard" {
description
"LMI nonstandard";
}
}
description
"type of configured lmi type";
}
typedef cfgRole {
type enumeration {
enum "dte" {
description
"FR DTE.";
}
enum "dce" {
description
"FR DCE.";
}
enum "nni" {
description
"FR NNI.";
}
}
description
"type of configured role";
}
}

View File

@ -0,0 +1,138 @@
/*
Copyright (C) 2013-2018 Huawei Technologies Co., Ltd. All rights reserved.
*/
submodule huawei-ifm-fr {
belongs-to huawei-ifm {
prefix ifm;
}
import huawei-extension {
prefix ext;
}
include huawei-ifm-fr-type;
include huawei-ifm-pppbase;
organization
"Huawei Technologies Co., Ltd.";
contact
"Huawei Industrial Base
Bantian, Longgang
Shenzhen 518129
People's Republic of China
Website: http://www.huawei.com
Email: support@huawei.com";
description
"submodule fr";
revision 2018-11-23 {
description
"The modifications in the schema file are synchronized to the YANG file.";
reference
"Huawei private.";
}
revision 2018-06-11 {
description
"The modifications in the schema file are synchronized to the YANG file.";
reference
"Huawei private.";
}
revision 2017-12-23 {
description
"The modifications in the schema file are synchronized to the YANG file.";
reference
"Huawei private.";
}
revision 2017-03-23 {
description
"Functions supported by the schema are added to the YANG file.";
reference
"Huawei private.";
}
revision 2013-01-01 {
description
"Init revision";
reference
"Huawei private.";
}
grouping ifm_frConfig_type {
description
"";
leaf lmiType {
type cfgLmiType;
default "q933a";
description
"LMI type.";
}
leaf ifType {
type cfgRole;
default "dte";
description
"FR role.";
}
leaf n391dte {
type uint32 {
range "1..255";
}
default "6";
description
"FR n391Dte.";
ext:allowDelete "true";
}
leaf n392dce {
type uint64 {
range "1..10";
}
default "3";
description
"FR n392Dce.";
}
leaf n392dte {
type uint64 {
range "1..10";
}
default "3";
description
"FR n392Dte.";
}
leaf n393dce {
type uint64 {
range "1..10";
}
default "4";
description
"FR n393Dce.";
}
leaf n393dte {
type uint32 {
range "1..10";
}
default "4";
description
"FR n393Dte.";
}
leaf t392dce {
type uint64 {
range "5..30";
}
default "15";
description
"FR t392Dce.";
ext:allowDelete "true";
}
container dlcis {
description
"FR DLCI.";
leaf dlci {
type uint32 {
range "16..1007";
}
description
"FR DLCI.";
ext:allowDelete "true";
}
}
container ifLink {
description
"FR polling interval. The value is expressed in seconds.";
uses ifm:ifm_pppbase_ifLink_type;
}
}
}

View File

@ -0,0 +1,77 @@
/*
Copyright (C) 2013-2018 Huawei Technologies Co., Ltd. All rights reserved.
*/
submodule huawei-ifm-hdlc-notification{
belongs-to huawei-ifm{
prefix ifm;
}
organization
"Huawei Technologies Co., Ltd.";
contact
"Huawei Industrial Base
Bantian, Longgang
Shenzhen 518129
People's Republic of China
Website: http://www.huawei.com
Email: support@huawei.com";
description
"notification of hdlc";
revision 2018-11-23 {
description
"The modifications in the schema file are synchronized to the YANG file.";
reference
"Huawei private.";
}
revision 2018-06-11 {
description
"The modifications in the schema file are synchronized to the YANG file.";
reference
"Huawei private.";
}
revision 2017-12-23 {
description
"The modifications in the schema file are synchronized to the YANG file.";
reference
"Huawei private.";
}
revision 2017-03-23 {
description
"Functions supported by the schema are added to the YANG file.";
reference
"Huawei private.";
}
revision 2013-01-01 {
description
"Init revision";
reference
"Huawei private.";
}
notification hwHdlcLoopbackDetResume{
description
"Interface loopback is cleared. (InterfaceIndex=[InterfaceIndex], InterfaceName=[InterfaceName])";
leaf InterfaceIndex{
type int32;
description
"Interface Index";
}
leaf InterfaceName{
type string;
description
"Interface Name";
}
}
notification hwHdlcLoopbackDetect{
description
"Interface loopback is detected. (InterfaceIndex=[InterfaceIndex], InterfaceName=[InterfaceName])";
leaf InterfaceIndex{
type int32;
description
"Interface Index";
}
leaf InterfaceName{
type string;
description
"Interface Name";
}
}
}

View File

@ -0,0 +1,72 @@
/*
Copyright (C) 2013-2018 Huawei Technologies Co., Ltd. All rights reserved.
*/
submodule huawei-ifm-hdlc-type {
belongs-to huawei-ifm {
prefix ifm;
}
organization
"Huawei Technologies Co., Ltd.";
contact
"Huawei Industrial Base
Bantian, Longgang
Shenzhen 518129
People's Republic of China
Website: http://www.huawei.com
Email: support@huawei.com";
description
"hdlc type";
revision 2018-11-23 {
description
"The modifications in the schema file are synchronized to the YANG file.";
reference
"Huawei private.";
}
revision 2018-06-11 {
description
"The modifications in the schema file are synchronized to the YANG file.";
reference
"Huawei private.";
}
revision 2017-12-23 {
description
"The modifications in the schema file are synchronized to the YANG file.";
reference
"Huawei private.";
}
revision 2017-03-23 {
description
"Functions supported by the schema are added to the YANG file.";
reference
"Huawei private.";
}
revision 2013-01-01 {
description
"Init revision";
reference
"Huawei private.";
}
typedef hdlcDampLevelType {
type enumeration {
enum "light" {
description
"Light weight";
}
enum "middle" {
description
"Middle weight";
}
enum "heavy" {
description
"Heavy weight";
}
enum "manual" {
description
"Manually configure the parameters";
}
}
description
"hdlcDampLevelType is light/middle/heavy/manual";
}
}

View File

@ -0,0 +1,124 @@
/*
Copyright (C) 2013-2018 Huawei Technologies Co., Ltd. All rights reserved.
*/
submodule huawei-ifm-hdlc {
belongs-to huawei-ifm {
prefix ifm;
}
include huawei-ifm-pppbase;
include huawei-ifm-hdlc-type;
organization
"Huawei Technologies Co., Ltd.";
contact
"Huawei Industrial Base
Bantian, Longgang
Shenzhen 518129
People's Republic of China
Website: http://www.huawei.com
Email: support@huawei.com";
description
"submodule hdlc";
revision 2018-11-23 {
description
"The modifications in the schema file are synchronized to the YANG file.";
reference
"Huawei private.";
}
revision 2018-06-11 {
description
"The modifications in the schema file are synchronized to the YANG file.";
reference
"Huawei private.";
}
revision 2017-12-23 {
description
"The modifications in the schema file are synchronized to the YANG file.";
reference
"Huawei private.";
}
revision 2017-03-23 {
description
"Functions supported by the schema are added to the YANG file.";
reference
"Huawei private.";
}
revision 2013-01-01 {
description
"Init revision";
reference
"Huawei private.";
}
grouping hdlcDamp_type {
description
"type of HDLC damp";
leaf hdlcDampEnable {
type boolean;
default "true";
description
"HDLC link status damping enable";
}
leaf hdlcDampLevel {
when "not(../hdlcDampEnable='false') or ../hdlcDampEnable='true'";
type hdlcDampLevelType;
default "light";
description
"HDLC link status damping level";
}
leaf hdlcSuppress {
when "not(../hdlcDampEnable='false' or ../hdlcDampLevel!='manual')";
type uint32 {
range "1..20000";
}
units second;
must "not(../hdlcDampLevel='manual') or (../hdlcDampLevel='manual' and ../hdlcSuppress>../hdlcReuse)";
description
"1000 times of suppress threshold";
}
leaf hdlcReuse {
when "not(../hdlcDampEnable='false' or ../hdlcDampLevel!='manual')";
type uint32 {
range "1..20000";
}
units second;
must "not(../hdlcDampLevel='manual') or (../hdlcDampLevel='manual' and ../hdlcSuppress and ../hdlcSuppress>../hdlcReuse)";
description
"1000 times of reuse threshold";
}
leaf hdlcMaxSuppressTime {
when "not(../hdlcDampEnable='false' or ../hdlcDampLevel!='manual')";
type uint16 {
range "1..255";
}
units second;
must "not(../hdlcDampLevel='manual') or (../hdlcDampLevel='manual' and ../hdlcSuppress and ../hdlcReuse and ../hdlcMaxSuppressTime>../hdlcHalfLifePeriod)";
description
"Max suppress time(seconds)";
}
leaf hdlcHalfLifePeriod {
when "not(../hdlcDampEnable='false' or ../hdlcDampLevel!='manual')";
type uint16 {
range "1..60";
}
units second;
description
"HDLC protocol status damping half life time(seconds)";
}
}
grouping hdlc_chdlc_oper_hdlcConfig_type {
description
"";
leaf downWhenLoop {
type boolean;
default "false";
description
"Enable the function of CHDLC DownWhenLoop.";
}
container ifLink {
description
"HDLC polling interval.The value is expressed in seconds.";
uses ifm:ifm_pppbase_ifLink_type;
}
}
}

View File

@ -0,0 +1,73 @@
/*
Copyright (C) 2013-2018 Huawei Technologies Co., Ltd. All rights reserved.
*/
submodule huawei-ifm-method {
belongs-to huawei-ifm {
prefix ifm;
}
import huawei-pub-type {
prefix pub-type;
}
import huawei-extension {
prefix ext;
}
organization
"Huawei Technologies Co., Ltd.";
contact
"Huawei Industrial Base
Bantian, Longgang
Shenzhen 518129
People's Republic of China
Website: http://www.huawei.com
Email: support@huawei.com";
description
"the ifm method submodule";
revision 2018-11-23 {
description
"The modifications in the schema file are synchronized to the YANG file.";
reference
"Huawei private.";
}
revision 2018-06-11 {
description
"The modifications in the schema file are synchronized to the YANG file.";
reference
"Huawei private.";
}
revision 2017-12-23 {
description
"The modifications in the schema file are synchronized to the YANG file.";
reference
"Huawei private.";
}
revision 2017-03-23 {
description
"Functions supported by the schema are added to the YANG file.";
reference
"Huawei private.";
}
revision 2013-01-01 {
description
"Init revision";
reference
"Huawei private.";
}
rpc SubIfStatistics {
description
"Enable sub-interface Statistics";
ext:node-ref "/ifm/interfaces/interface";
input {
leaf SubIfStatisticsEnable {
type boolean;
default "false";
description
"The switch of SubIfStatistics";
}
leaf mainifName {
type pub-type:ifName;
description
"The interface name of SubIfStatistics";
}
}
}
}

View File

@ -0,0 +1,388 @@
/*
Copyright (C) 2013-2018 Huawei Technologies Co., Ltd. All rights reserved.
*/
submodule huawei-ifm-notification {
yang-version 1;
belongs-to huawei-ifm {
prefix ifm;
}
import ietf-yang-types {
prefix yang;
}
organization
"Huawei Technologies Co., Ltd.";
contact
"Huawei Industrial Base
Bantian, Longgang
Shenzhen 518129
People's Republic of China
Website: http://www.huawei.com
Email: support@huawei.com";
description
"notification of ifm";
revision 2018-11-23 {
description
"The modifications in the schema file are synchronized to the YANG file.";
reference
"Huawei private.";
}
revision 2018-06-11 {
description
"The modifications in the schema file are synchronized to the YANG file.";
reference
"Huawei private.";
}
revision 2017-12-23 {
description
"The modifications in the schema file are synchronized to the YANG file.";
reference
"Huawei private.";
}
revision 2017-03-23 {
description
"Functions supported by the schema are added to the YANG file.";
reference
"Huawei private.";
}
revision 2013-01-01 {
description
"Init revision";
reference
"Huawei private.";
}
notification hwErrordownRecovery {
description
"Error-down recovered. (Ifindex=[IfIndex], Ifname=[IfName], Cause=[Cause], RecoverType=[RecoveryType])";
leaf IfIndex {
type uint32;
description
"Interface index.";
}
leaf IfName {
type string;
description
"Interface name.";
}
leaf RecoveryType {
type string;
description
"Recovery Type.";
}
leaf Cause {
type string;
description
"Fault reason.";
}
}
notification hwErrordown {
description
"Error-down occurred. (Ifindex=[IfIndex], Ifname=[IfName], Cause=[Cause])";
leaf IfIndex {
type uint32;
description
"Interface index.";
}
leaf IfName {
type string;
description
"Interface name.";
}
leaf RecoveryType {
type string;
description
"Recovery Type.";
}
leaf Cause {
type string;
description
"Fault reason.";
}
}
notification hwifflowdown {
description
"The state of interface turned to DOWN because of FLOW DOWN. (Interface=[ifIndex], InterfaceIndex=[hwIFExtIndex], SysUpTime=[sysUpTime], FlowStatus=[hwIFExtFlowStatus],InterfaceName=[ifName])";
leaf hwIFExtIndex {
type uint32;
description
"Interface index.";
}
leaf hwIFExtFlowStatus {
type uint32;
description
flowStatus.;
}
leaf ifName {
type string;
description
"interface name.";
}
leaf ifIndex {
type uint32;
description
"interface index";
}
leaf sysUpTime {
type yang:timeticks;
description
"System startup time.";
}
}
notification hwifflowup {
description
"The state of interface turned to UP because of FLOW UP. (Interface=[hwIFExtIndex], InterfaceIndex=[hwIFExtIndex], SysUpTime=[sysUpTime], FlowStatus=[hwIFExtFlowStatus],InterfaceName=[ifName])";
leaf hwIFExtIndex {
type uint32;
description
"Interface index.";
}
leaf hwIFExtFlowStatus {
type uint32;
description
flowStatus.;
}
leaf ifName {
type string;
description
"interface name.";
}
leaf ifIndex {
type uint32;
description
"interface index";
}
leaf sysUpTime {
type yang:timeticks;
description
"System startup time.";
}
}
notification ipv6IfStateChange {
description
"The status of the IPv6 Interface changed.";
leaf ipv6IfAdminStatus {
type string;
description
"current administrate state of the ipv6 interface";
}
leaf ipv6IfIndex {
type uint32;
description
"interface index";
}
leaf ipv6MainIf {
type string;
description
"main interface name";
}
leaf ipv6IfDescr {
type string;
description
"interface name";
}
leaf ReasonCode {
type uint32;
description
"alarm reason";
}
leaf ipv6IfOperStatus {
type string;
description
"current operational state of the ipv6 interface";
}
leaf rootIndex {
type uint32;
description
"carrier id";
}
leaf Reason {
type binary;
description
"alarm reason";
}
}
notification linkdown {
description
"The interface status changes. (ifName=[ifName], AdminStatus=[ifAdminStatus], OperStatus=[ifOperStatus], Reason=[Reason], mainIfname=[mainIf])";
leaf PhysicalIndex {
type uint32;
description
"carrier id.";
}
leaf ifAdminStatus {
type string;
description
"the desired state of the interface.";
}
leaf mainIf {
type string;
description
"the main interface name.";
}
leaf ifOperStatus {
type string;
description
"the current operational state of the interface.";
}
leaf ifName {
type string;
description
"interface name.";
}
leaf ifIndex {
type uint32;
description
"interface index.";
}
leaf reasonCode {
type uint32;
description
"reason code.";
}
leaf rootIndex {
type uint32;
description
"carrier id.";
}
leaf Reason {
type binary;
description
"alarm reason.";
}
}
notification linkup {
description
"The interface status changes. (ifName=[ifName], AdminStatus=[ifAdminStatus], OperStatus=[ifOperStatus], Reason=[Reason], mainIfname=[mainIf])";
leaf PhysicalIndex {
type uint32;
description
"carrier id.";
}
leaf ifAdminStatus {
type string;
description
"the desired state of the interface.";
}
leaf mainIf {
type string;
description
"the main interface name.";
}
leaf ifOperStatus {
type string;
description
"the current operational state of the interface.";
}
leaf ifName {
type string;
description
"interface name.";
}
leaf ifIndex {
type uint32;
description
"interface index.";
}
leaf reasonCode {
type uint32;
description
"reason code.";
}
leaf rootIndex {
type uint32;
description
"carrier id.";
}
leaf Reason {
type binary;
description
"alarm reason.";
}
}
notification hwIfControlFlapResume {
description
"The state of interface changed from suppress to unsuppress. (InterfaceIndex=[InterfaceIndex], InterfaceExtIndex=[InterfaceExtIndex], InterfaceName=[InterfaceName], SuppressState=[SuppressState])";
leaf InterfaceIndex {
type uint32;
description
"Indicates the interface index.";
}
leaf InterfaceExtIndex {
type uint32;
description
"Indicates the extended interface index.";
}
leaf InterfaceName {
type string;
description
"Indicates the interface name.";
}
leaf SuppressState {
type uint32;
description
"Indicates whether the interface is suppressed. 0: indicates the interface is unsuppressed. 1: indicates the interface is suppressed.";
}
}
notification hwIfControlFlapSuppress {
description
"The state of interface changed from unsuppress to suppress. (InterfaceIndex=[InterfaceIndex], InterfaceExtIndex=[InterfaceExtIndex], InterfaceName=[InterfaceName], SuppressState=[SuppressState])";
leaf InterfaceIndex {
type uint32;
description
"Indicates the interface index.";
}
leaf InterfaceExtIndex {
type uint32;
description
"Indicates the extended interface index.";
}
leaf InterfaceName {
type string;
description
"Indicates the interface name.";
}
leaf SuppressState {
type uint32;
description
"Indicates whether the interface is suppressed. 0: indicates the interface is unsuppressed. 1: indicates the interface is suppressed.";
}
}
notification hwPhysicalAdminIfUp {
description
"The physical manage interface physical status changes to up.(ifName=[ifName], OperStatus=[ifOperStatus])";
leaf ifIndex {
type uint32;
description
"interface index.";
}
leaf ifName {
type string;
description
"interface name.";
}
leaf ifOperStatus {
type string;
description
"the current operational state of the interface.";
}
}
notification hwPhysicalAdminIfDown {
description
"The physical manage interface physical status changes to down.(ifName=[ifName], OperStatus=[ifOperStatus])";
leaf ifIndex {
type uint32;
description
"interface index.";
}
leaf ifName {
type string;
description
"interface name.";
}
leaf ifOperStatus {
type string;
description
"the current operational state of the interface.";
}
}
}

View File

@ -0,0 +1,238 @@
/*
Copyright (C) 2013-2018 Huawei Technologies Co., Ltd. All rights reserved.
*/
submodule huawei-ifm-pppbase-notification {
yang-version 1;
belongs-to huawei-ifm {
prefix ifm;
}
organization
"Huawei Technologies Co., Ltd.";
contact
"Huawei Industrial Base
Bantian, Longgang
Shenzhen 518129
People's Republic of China
Website: http://www.huawei.com
Email: support@huawei.com";
description
"notification of ifm-pppbase";
revision 2018-11-23 {
description
"The modifications in the schema file are synchronized to the YANG file.";
reference
"Huawei private.";
}
revision 2018-06-11 {
description
"The modifications in the schema file are synchronized to the YANG file.";
reference
"Huawei private.";
}
revision 2017-12-23 {
description
"The modifications in the schema file are synchronized to the YANG file.";
reference
"Huawei private.";
}
revision 2017-03-23 {
description
"Functions supported by the schema are added to the YANG file.";
reference
"Huawei private.";
}
revision 2013-01-01 {
description
"Init revision";
reference
"Huawei private.";
}
notification hwLcpNegotiateResumed {
description
"The alarm indicating LCP negotiation failure on the local interface was cleared. (IfName=[ifName])";
leaf ifIndex {
type uint32;
description
IfIndex;
}
leaf ifName {
type string;
description
"interface name.";
}
leaf reasonCode {
type string;
description
"Cause of the negotiation failure.";
}
}
notification hwLcpNegotiateFailed {
description
"LCP negotiation failed on the local interface. (IfName=[ifName], hwPppNegotiationFailReason=[reasonCode])";
leaf ifIndex {
type uint32;
description
IfIndex;
}
leaf ifName {
type string;
description
"interface name.";
}
leaf reasonCode {
type string;
description
"Cause of the negotiation failure.";
}
}
notification hwPppLoopbackDetect {
description
"Interface loopback is detected.(IfIndex=[IfIndex], HwBaseTrapSeverity=[HwBaseTrapSeverity], HwBaseTrapProbableCause=[HwBaseTrapProbableCause], HwBaseTrapEventType=[HwBaseTrapEventType], IfName=[IfName])";
leaf IfIndex {
type uint32;
description
Ifindex;
}
leaf HwBaseTrapSeverity {
type uint32;
}
leaf HwBaseTrapProbableCause {
type uint32;
}
leaf HwBaseTrapEventType {
type uint32;
}
leaf IfName {
type string;
}
}
notification hwPppLoopbackDetResume {
description
"Interface loopback is cleared.(IfIndex=[IfIndex], HwBaseTrapSeverity=[HwBaseTrapSeverity], HwBaseTrapProbableCause=[HwBaseTrapProbableCause], HwBaseTrapEventType=[HwBaseTrapEventType], IfName=[IfName])";
leaf IfIndex {
type uint32;
description
Ifindex;
}
leaf HwBaseTrapSeverity {
type uint32;
}
leaf HwBaseTrapProbableCause {
type uint32;
}
leaf HwBaseTrapEventType {
type uint32;
}
leaf IfName {
type string;
}
}
notification hwMpUp {
description
"The number of available member links in the MP-Group reached the lower threshold and the MP-Group went UP. (IfIndex=[IfIndex], IfName=[IfName])";
leaf IfIndex {
type uint32;
description
"Interface index";
}
leaf IfName {
type string;
description
"Interface name";
}
}
notification hwMpDown {
description
"The number of available member links in the MP-Group fell below the lower threshold and the MP-Group went Down. (IfIndex=[IfIndex], IfName=[IfName])";
leaf IfIndex {
type uint32;
description
"Interface index";
}
leaf IfName {
type string;
description
"Interface name";
}
}
notification hwNcpNegotiateResumed {
description
"The alarm indicating NCP negotiation failure on the local interface was cleared. (IfName=[ifName], hwPppNcpName=[hwPppNcpName])";
leaf ifIndex {
type uint32;
description
IfIndex;
}
leaf ifName {
type string;
description
"Interface name";
}
leaf hwPppNcpName {
type string;
description
"NCP protocol name";
}
leaf hwPppNegotiationFailReason {
type string;
description
"Reason code";
}
}
notification hwNcpNegotiateFailed {
description
"NCP negotiation failed on the local interface. (IfName=[ifName], hwPppNcpName=[hwPppNcpName], hwPppNegotiationFailReason=[hwPppNegotiationFailReason])";
leaf ifIndex {
type uint32;
description
IfIndex;
}
leaf ifName {
type string;
description
"Interface name";
}
leaf hwPppNcpName {
type string;
description
"NCP protocol name";
}
leaf hwPppNegotiationFailReason {
type string;
description
"Reason code";
}
}
notification hwMpSonChannelDampingDetect {
description
"The son channel of the MP link is damped. (MpIfIndex=[MpIfIndex], MpIfName=[MpIfName], MpMemberIfIndex=[MpMemberIfIndex], MpMemberIfName=[MpMemberIfName])";
leaf MpIfIndex {
type uint32;
}
leaf MpIfName {
type string;
}
leaf MpMemberIfIndex {
type uint32;
}
leaf MpMemberIfName {
type string;
}
}
notification hwMpSonChannelDampingResume {
description
"The son channel of the MP link is recovered from damping. (MpIfIndex=[MpIfIndex], MpIfName=[MpIfName], MpMemberIfIndex=[MpMemberIfIndex], MpMemberIfName=[MpMemberIfName])";
leaf MpIfIndex {
type uint32;
}
leaf MpIfName {
type string;
}
leaf MpMemberIfIndex {
type uint32;
}
leaf MpMemberIfName {
type string;
}
}
}

View File

@ -0,0 +1,200 @@
/*
Copyright (C) 2013-2018 Huawei Technologies Co., Ltd. All rights reserved.
*/
submodule huawei-ifm-pppbase-type {
belongs-to huawei-ifm {
prefix ifm;
}
organization
"Huawei Technologies Co., Ltd.";
contact
"Huawei Industrial Base
Bantian, Longgang
Shenzhen 518129
People's Republic of China
Website: http://www.huawei.com
Email: support@huawei.com";
description
"type of pppbase";
revision 2018-11-23 {
description
"The modifications in the schema file are synchronized to the YANG file.";
reference
"Huawei private.";
}
revision 2018-06-11 {
description
"The modifications in the schema file are synchronized to the YANG file.";
reference
"Huawei private.";
}
revision 2017-12-23 {
description
"The modifications in the schema file are synchronized to the YANG file.";
reference
"Huawei private.";
}
revision 2017-03-23 {
description
"Functions supported by the schema are added to the YANG file.";
reference
"Huawei private.";
}
revision 2013-01-01 {
description
"Init revision";
reference
"Huawei private.";
}
typedef pppbaseMruNegoMtd {
type enumeration {
enum "IPV4" {
description
"IPv4 MRU negotiation on PPP MRU.";
}
enum "IPV6" {
description
"IPv6 MRU negotiation on PPP MRU.";
}
}
description
"type of ppp negotiated mru";
}
typedef pppbaseCrcType {
type enumeration {
enum "BitErrRatio" {
description
"Error bit rate.";
}
enum "PktErrRatio" {
description
"Error packet rate.";
}
enum "HighLow" {
description
"CRC upper and lower limit.";
}
enum "Default" {
description
"Default CRC alarm type.";
}
}
description
"type of ppp crc";
}
typedef pppbaseCrcBitType {
type enumeration {
enum "16" {
description
"16 bit.";
}
enum "32" {
description
"32 bit.";
}
}
description
"type of ppp crc bit";
}
typedef pppbaseNcpNegoType {
type enumeration {
enum "Enable" {
description
"Enable.";
}
enum "Disable" {
description
"Disable.";
}
}
description
"type of ppp ncp negotiation";
}
typedef pppDampLevelType {
type enumeration {
enum "light" {
description
"Light weight";
}
enum "middle" {
description
"Middle weight";
}
enum "heavy" {
description
"Heavy weight";
}
enum "manual" {
description
"Manually configure the parameters";
}
}
description
"pppDampLevelType is light/middle/heavy/manual";
}
typedef linkType {
type enumeration {
enum "lcp" {
description
"lcp.";
}
enum "ipcp" {
description
"ipcp.";
}
}
description
"description of linkType";
}
typedef pppFsmState {
type enumeration {
enum "initial" {
description
"initial.";
}
enum "starting" {
description
"starting.";
}
enum "closed" {
description
"closed.";
}
enum "stopped" {
description
"stopped.";
}
enum "closing" {
description
"closing.";
}
enum "stopping" {
description
"stopping.";
}
enum "reqsent" {
description
"reqsent.";
}
enum "ackrcvd" {
description
"ackrcvd.";
}
enum "acksent" {
description
"acksent.";
}
enum "opened" {
description
"opened.";
}
enum "none" {
description
"none.";
}
}
description
"description of ppp fsm state";
}
}

View File

@ -0,0 +1,570 @@
/*
Copyright (C) 2013-2018 Huawei Technologies Co., Ltd. All rights reserved.
*/
submodule huawei-ifm-pppbase {
belongs-to huawei-ifm {
prefix ifm;
}
import huawei-pub-type {
prefix pub-type;
}
import ietf-inet-types {
prefix inet;
}
import huawei-extension {
prefix ext;
}
import ietf-yang-types {
prefix yang;
}
include huawei-ifm-pppbase-type;
organization
"Huawei Technologies Co., Ltd.";
contact
"Huawei Industrial Base
Bantian, Longgang
Shenzhen 518129
People's Republic of China
Website: http://www.huawei.com
Email: support@huawei.com";
description
"submodule pppbase";
revision 2018-11-23 {
description
"The modifications in the schema file are synchronized to the YANG file.";
reference
"Huawei private.";
}
revision 2018-06-11 {
description
"The modifications in the schema file are synchronized to the YANG file.";
reference
"Huawei private.";
}
revision 2017-12-23 {
description
"The modifications in the schema file are synchronized to the YANG file.";
reference
"Huawei private.";
}
revision 2017-03-23 {
description
"Functions supported by the schema are added to the YANG file.";
reference
"Huawei private.";
}
revision 2013-01-01 {
description
"Init revision";
reference
"Huawei private.";
}
grouping pppDamp_type {
description
"type of PPP damp";
leaf pppDampEnable {
type boolean;
default "true";
description
"PPP protocal status damping enable";
}
leaf pppDampLevel {
when "not(../pppDampEnable='false') or ../pppDampEnable='true'";
type pppDampLevelType;
default "light";
description
"PPP protocal status damping level";
}
leaf pppSuppress {
when "not(../pppDampEnable='false' or ../pppDampLevel!='manual')";
type uint16 {
range "1..20000";
}
units second;
description
"1000 times of PPP protocal status damping suppress threshold";
}
leaf pppReuse {
when "not(../pppDampEnable='false' or ../pppDampLevel!='manual')";
type uint16 {
range "1..20000";
}
units second;
description
"1000 times of PPP protocal status damping reuse threshold";
}
leaf pppMaxSuppressTime {
when "not(../pppDampEnable='false' or ../pppDampLevel!='manual')";
type uint8 {
range "1..255";
}
units second;
description
"PPP protocal status damping max suppress time(seconds)";
}
leaf pppHalfLifePeriod {
when "not(../pppDampEnable='false' or ../pppDampLevel!='manual')";
type uint8 {
range "1..60";
}
units second;
description
"PPP protocal status damping half life time(seconds)";
}
}
grouping ifm_pppbase_pppConfig_type {
description
"";
leaf negoTimeout {
type uint32 {
range "1..10";
}
units second;
default "3";
description
"Timeout duration of PPP negotiation. The value is expressed in seconds.";
ext:allowDelete "true";
}
leaf deadLinkTime {
type uint32 {
range "5..30";
}
units second;
default "30";
description
"Specify the Link Dead timer value. The value is expressed in seconds.";
ext:allowDelete "true";
}
leaf peerIpAddr {
type inet:ipv4-address-no-zone;
description
"IP address assigned for the peer.";
ext:allowDelete "true";
}
leaf mruNegoMtd {
type pppbaseMruNegoMtd;
default "IPV4";
description
"Enable MRU negotiation. By default, IPv4 negotiation is applied.";
ext:allowDelete "true";
}
leaf ifPapAuth {
type boolean;
default "false";
description
"Enable the PAP authentication mode.";
}
leaf ifChapAuth {
type boolean;
default "false";
description
"Enable the CHAP authentication mode.";
}
leaf magicNumCheck {
type boolean;
default "false";
description
"Enable the function of Magic-Number Check";
ext:allowDelete "true";
}
leaf osicpNego {
type pppbaseNcpNegoType;
default "Enable";
description
"Enable OSICP negotiate.";
ext:allowDelete "true";
}
leaf mplscpNego {
type pppbaseNcpNegoType;
default "Enable";
description
"Enable MPLSCP negotiate.";
ext:allowDelete "true";
}
leaf peerHostRoute {
type boolean;
default "false";
description
"Enable the function of suppressing the adding of peer host routes to the local direct route table.";
ext:allowDelete "true";
}
leaf papUserName {
type string {
length "1..253";
}
description
"PAP authentication on user names.";
ext:allowDelete "true";
}
leaf papPaswrd {
type pub-type:password {
length "1..128";
}
description
"The password is a string ranging from 1 to 16 characters for a plaintext password and 1 to 128 characters for a ciphertext password.";
ext:allowDelete "true";
}
leaf chapUserName {
type string {
length "1..253";
}
description
"CHAP authentication on user names.";
ext:allowDelete "true";
}
leaf chapPaswrd {
type pub-type:password {
length "1..128";
}
description
"The password is a string ranging from 1 to 16 characters for a plaintext password and 1 to 128 characters for a ciphertext password.";
ext:allowDelete "true";
}
leaf dnsAdmitAny {
type boolean;
default "false";
description
"Receive any DNS address sent by the peer.";
}
leaf primDNSAddr {
type inet:ipv4-address-no-zone;
default "0.0.0.0";
description
"IP address of the master DNS server.";
ext:allowDelete "true";
}
leaf secndDNSAddr {
type inet:ipv4-address-no-zone;
default "0.0.0.0";
description
"IP address of the slave DNS server.";
ext:allowDelete "true";
}
container ifLink {
description
"PPP polling interval. The value is expressed in seconds.";
leaf timeInternal {
type uint32 {
range "0..32767";
}
units second;
default "10";
description
"Polling interval. The value is expressed in seconds.";
}
}
container dispPppInfoNode {
config false;
description
"dispPppInfoNode.";
leaf lcpState {
type pppFsmState;
config false;
description
"lcpState.";
}
leaf ipcpState {
type pppFsmState;
config false;
description
"ipcpState.";
}
leaf localMru {
type uint32;
config false;
description
"localMru.";
}
leaf peerMru {
type uint32;
config false;
description
"peerMru.";
}
leaf magicNum {
type uint32;
config false;
description
"magicNum.";
}
leaf negoTimeOut {
type uint32;
config false;
description
"negoTimeOut.";
}
leaf peerIpaddr {
type inet:ipv4-address-no-zone;
config false;
description
"peerIpaddr.";
}
leaf mplscpState {
type pppFsmState;
config false;
description
"mplscpState.";
}
leaf osicpState {
type pppFsmState;
config false;
description
"osicpState.";
}
leaf ip6cpState {
type pppFsmState;
config false;
description
"ip6cpState.";
}
container downEvents {
config false;
description
"downEvents.";
list downEvent {
key "linkType";
config false;
max-elements "10";
description
"downEvent.";
leaf linkType {
type linkType;
config false;
description
"linkType.";
}
leaf downReason {
type string {
length "1..100";
}
config false;
description
"downReason.";
}
leaf downTime {
type yang:date-and-time;
config false;
description
"downTime.";
}
}
}
}
container crcParam {
description
"CRC alarm configurations.";
leaf errType {
type pppbaseCrcType;
default "Default";
description
"CRC alarm type.";
ext:allowDelete "true";
}
leaf highThreshold {
type uint32 {
range "1..4294967295";
}
description
"CRC upper limit.";
ext:allowDelete "true";
}
leaf lowThreshold {
type uint32 {
range "1..4294967295";
}
description
"CRC lower limit.";
ext:allowDelete "true";
}
leaf interval {
type uint32 {
range "1..65535";
}
description
"Time interval.The value is expressed in seconds.";
ext:allowDelete "true";
}
leaf pktAlaCof {
type uint32 {
range "1..9";
}
description
"Error packet alarm coefficient.";
ext:allowDelete "true";
}
leaf pktAlaPow {
type uint32 {
range "1..5";
}
description
"Error packet alarm power.";
ext:allowDelete "true";
}
leaf pktResCof {
type uint32 {
range "1..9";
}
description
"Error packet resume coefficient.";
ext:allowDelete "true";
}
leaf pktResPow {
type uint32 {
range "1..6";
}
description
"Error packet resume power.";
ext:allowDelete "true";
}
leaf bitAlaCof {
type uint32 {
range "1";
}
description
"Error bit alarm coefficient.";
ext:allowDelete "true";
}
leaf bitAlaPow {
type uint32 {
range "3..6";
}
description
"Error bit alarm power.";
ext:allowDelete "true";
}
leaf bitResCof {
type uint32 {
range "1";
}
description
"Error bit resume coefficient.";
ext:allowDelete "true";
}
leaf bitResPow {
type uint32 {
range "3..6";
}
description
"Error bit resume power.";
ext:allowDelete "true";
}
leaf shutdown {
type boolean;
description
"CRC action Down.";
ext:allowDelete "true";
}
leaf crcBit {
type pppbaseCrcBitType;
default "32";
description
"CRC bit.";
ext:allowDelete "true";
}
leaf sampleFactor {
type uint32 {
range "10..100";
}
default "50";
description
"Sample window factor, default is 50.";
ext:allowDelete "false";
}
leaf childMaxNum {
type uint32 {
range "10..100";
}
default "50";
description
"Maximum number of child windows, default is 50.";
ext:allowDelete "false";
}
leaf childAlarmNum {
type uint32 {
range "1..100";
}
default "5";
description
"Minimal number of child windows for alarm generating, default is 5.";
ext:allowDelete "false";
}
leaf childResmNum {
type uint32 {
range "1..100";
}
default "30";
description
"Minimal number of child windows for alarm resuming, default is 30.";
ext:allowDelete "false";
}
}
container pppStatistics {
config false;
description
"PPP statistics.";
leaf inputShortPkts {
type uint32;
default "0";
config false;
description
"PPP input short packets.";
}
leaf inputLongPkts {
type uint32;
default "0";
config false;
description
"PPP input long packets.";
}
leaf inputCrcPkts {
type uint32;
default "0";
config false;
description
"PPP input CRC packets.";
}
leaf inputLostPkts {
type uint32;
default "0";
config false;
description
"PPP input lost packets.";
}
leaf outLostPkts {
type uint32;
default "0";
config false;
description
"PPP output lost packets.";
}
leaf outOverPkts {
type uint32;
default "0";
config false;
description
"PPP output over packets.";
}
leaf outUnderPkts {
type uint32;
default "0";
config false;
description
"PPP output under packets.";
}
}
}
grouping ifm_pppbase_ifLink_type {
description
"";
leaf timeInternal {
type uint32 {
range "0..32767";
}
units second;
default "10";
description
"Polling interval. The value is expressed in seconds.";
}
}
}

View File

@ -0,0 +1,506 @@
/*
Copyright (C) 2013-2018 Huawei Technologies Co., Ltd. All rights reserved.
*/
module huawei-pub-type {
namespace "http://www.huawei.com/netconf/vrp/huawei-pub-type";
prefix pub-type;
import huawei-extension {
prefix ext;
}
organization
"Huawei Technologies Co., Ltd.";
contact
"Huawei Industrial Base
Bantian, Longgang
Shenzhen 518129
People's Republic of China
Website: http://www.huawei.com
Email: support@huawei.com";
description
"pub type";
revision 2018-11-23 {
description
"The modifications in the schema file are synchronized to the YANG file.";
reference
"Huawei private.";
}
revision 2018-06-11 {
description
"The modifications in the schema file are synchronized to the YANG file.";
reference
"Huawei private.";
}
revision 2017-12-23 {
description
"The modifications in the schema file are synchronized to the YANG file.";
reference
"Huawei private.";
}
revision 2017-03-23 {
description
"Functions supported by the schema are added to the YANG file.";
reference
"Huawei private.";
}
revision 2013-01-01 {
description
"Init revision";
reference
"Huawei private.";
}
typedef editOperationType {
type enumeration {
enum "merge" {
description
"";
}
enum "replace" {
description
"";
}
enum "create" {
description
"";
}
enum "delete" {
description
"";
}
}
description
"editOperationType";
}
typedef timeZone {
type string {
length "0..15";
}
description
"timeZone is like +08:00";
}
typedef time_hhmm {
type string {
length "5";
pattern '(([0-1][0-9])|(2[0-3])):[0-5][0-9]';
}
description
"time_hhmm is like string";
}
typedef macAddress {
type string {
length "0..255";
}
description
"A MAC address in standard notation";
}
typedef ipv4PrefixLength {
type uint32 {
range "0..32";
}
description
"An IPv4 address prefix length. Must lie between 0 and 32 inclusive.";
}
typedef ipv6PrefixLength {
type uint32 {
range "0..128";
}
description
"An IPv6 address prefix length. Must lie between 0 and 128 inclusive.";
}
typedef ipv4AddressPrefix {
type string {
length "0..255";
}
description
"now ipv4AddressPrefix is like string";
}
typedef ipv6AddressPrefix {
type string {
length "0..255";
}
description
"now ipv6AddressPrefix is like string";
}
typedef block {
type string {
length "0..255";
}
description
"now block is like string";
}
typedef oid {
type string {
length "0..255";
}
description
"now oid is like string";
}
typedef data {
type string {
length "0..255";
}
description
"now data is like string";
}
typedef chassisPath {
type uint32 {
range "0..127";
}
description
"chassisPath is an unsignedInt";
}
typedef slotPath {
type string {
length "1..127";
pattern '\d+/\d+';
}
description
"slotPath is like 1/1";
}
typedef cardPath {
type string {
length "1..127";
}
description
"cardPath";
}
typedef valspBitErrString {
type string {
length "1..63";
}
description
"biError is like 0";
}
typedef ifNameString {
type string {
length "1..63";
}
description
"ifName is like ethernet1/1/1/1";
}
typedef ifName {
type ifNameString;
description
"ifName";
}
typedef vrfNameExt {
type vrfName;
description
"vrfNameExt";
}
typedef positionString {
type string {
length "1..32";
}
description
"board position is like [1], serialPort position is like[1/1/1/1:2:3]";
}
typedef position {
type positionString;
description
"position";
}
typedef password {
type string {
length "1..128";
}
description
"The password is a string ranging from 1 to 16 characters for a plaintext password and 20 to 128 characters for a ciphertext password.";
}
typedef passwordOSPF {
type string {
length "1..8";
}
description
"now password is like string";
}
typedef passwordExtend {
type string {
length "1..432";
}
description
"The password is a string ranging from 1 to 255 characters for a plaintext password and 20 to 432 characters for a ciphertext password.";
}
typedef oneInputPasswordExtend {
type string {
length "1..255";
}
description
"now oneInputPasswordExtend is like string, only input once no need to confirm";
}
typedef mibString {
type string {
length "0..255";
}
description
"now mibString is like string";
}
typedef vrfName {
type string {
length "1..31";
}
description
"now vrfName is like string";
}
typedef keyChainName {
type string {
length "0..47";
}
description
"now keyChainName is like string";
}
typedef ipv4Mask {
type string {
length "1..255";
}
description
"ipv4Mask support both mask and length format";
}
typedef ipv6Mask {
type string {
length "0..255";
}
description
"ipv6Mask support both mask and length format";
}
typedef timeTick {
type uint32;
description
"timeTick is like unsignedInt";
}
typedef identifierString {
type string {
pattern '([^\s?|>]*)';
}
description
"now identifierString is like string, which is used for identifier with strict limitation";
}
typedef descriptionString {
type string {
pattern '([^?]*)';
}
description
"now descriptionString is like string, which is used for description with little limitation";
}
typedef rowStatus {
type enumeration {
enum "active" {
description
"Rule status is active at the current time.";
}
enum "notInService" {
description
"Rule status is not active at the current time.";
}
enum "notReady" {
description
"The system is unavailable at the moment.";
}
}
description
"rowStatus is like string";
}
typedef bits8 {
type uint8;
description
"bits8 is like unsignedByte";
}
typedef bits16 {
type uint16;
description
"bits16 is like unsignedShort";
}
typedef bits32 {
type uint32;
description
"bits32 is like unsignedInt";
}
typedef bits64 {
type uint64;
description
"bits64 is like unsignedLong";
}
typedef percent {
type uint8 {
range "0..100";
}
description
"percent is like unsignedByte";
}
typedef bandWidth {
type uint64;
description
"Type of ifOperSpeed";
}
typedef appType {
type enumeration {
enum "lct" {
description
"LCT";
}
enum "ems" {
description
"EMS";
}
enum "cmd" {
description
"CMD";
}
enum "ftp" {
description
"FTP";
}
enum "unknown" {
description
"UNKNOWN";
}
}
description
"";
}
typedef teTnlName {
type string {
length "1..35";
pattern '[^ ]*';
}
description
"TE tunnel name";
}
typedef evpnName {
type string {
length "1..31";
}
description
"now evpnName is like string";
}
typedef teTnlNameExt {
type teTnlName;
description
"teTnlNameExt";
}
typedef devmTimeslotListType {
type string {
length "1..61";
}
description
"";
}
typedef hostName {
type string {
length "1..255";
}
description
"";
}
typedef XplFilterName {
type string {
length "1..200";
pattern '\s*(([0-9a-zA-Z][0-9a-zA-Z\-_\.]{0,200})|([0-9a-zA-Z][0-9a-zA-Z\-_\.]{0,200}[\(](($)?[0-9a-zA-Z][0-9a-zA-Z\-_\.]{0,200})(([,]($)?[0-9a-zA-Z][0-9a-zA-Z\-_\.]{0,200}){0,7})[\)]))\s*';
}
description
"";
}
typedef passwordIke {
type string {
length "1..127";
}
description
"now passwordIke is like string";
}
typedef aclNumOrName {
type string {
length "1..32";
pattern '([1-9]\d{3})|(10[0-9]{3})|(23[0-9]{3})|(99999)|([0-9a-zA-Z]([^\s]*))';
}
description
"aclNumOrName is begin with a-z or A-Z or 0-9";
}
typedef hexBinary {
type string {
length "1..10";
pattern '(0x|0X)?[0-9a-fA-F]+';
}
description
"This is a hexadecimal variable.";
}
typedef date {
type string {
pattern '\d{4}-\d{2}-\d{2}';
}
description
"XSD date string type.";
reference "http://www.w3.org/TR/2004/REC-xmlschema-2-20041028/datatypes.html#date";
}
typedef time {
type string {
pattern '\d{2}:\d{2}:\d{2}';
}
description
"XSD time string type.";
reference "http://www.w3.org/TR/2004/REC-xmlschema-2-20041028/datatypes.html#date";
}
typedef id-range {
type string {
pattern '([0-9]|,|\+|\-|\(|\))+';
}
description
"id list,such as '1,3,5-7',or '+1,-3,+(20-30)'.";
}
typedef vlan-range {
type id-range {
pattern '((409[0-4]|40[0-8][0-9]|[1-3][0-9]{3}|[1-9][0-9]{1,2}|[1-9])?(-(409[0-4]|40[0-8][0-9]|[1-3][0-9]{3}|[1-9][0-9]{1,2}|[1-9]))?(,((409[0-4]|40[0-8][0-9]|[1-3][0-9]{3}|[1-9][0-9]{1,2}|[1-9])(-(409[0-4]|40[0-8][0-9]|[1-3][0-9]{3}|[1-9][0-9]{1,2}|[1-9]))?))*)|((([\\+|\\-](409[0-4]|40[0-8][0-9]|[1-3][0-9]{3}|[1-9][0-9]{1,2}|[1-9]))|([\\+|\\-]\\((409[0-4]|40[0-8][0-9]|[1-3][0-9]{3}|[1-9][0-9]{1,2}|[1-9])-(409[0-4]|40[0-8][0-9]|[1-3][0-9]{3}|[1-9][0-9]{1,2}|[1-9])\\)))?(,(([\\+|\\-](409[0-4]|40[0-8][0-9]|[1-3][0-9]{3}|[1-9][0-9]{1,2}|[1-9]))|([\\+|\\-]\\((409[0-4]|40[0-8][0-9]|[1-3][0-9]{3}|[1-9][0-9]{1,2}|[1-9])-(409[0-4]|40[0-8][0-9]|[1-3][0-9]{3}|[1-9][0-9]{1,2}|[1-9])\\))))*)';
ext:value-range "1..4094";
}
description
"vlan id list,the value is 1-4094.";
}
}

View File

@ -0,0 +1,68 @@
/*
Copyright (C) 2013-2018 Huawei Technologies Co., Ltd. All rights reserved.
*/
submodule huawei-rsa-type {
belongs-to huawei-rsa {
prefix rsa;
}
organization
"Huawei Technologies Co., Ltd.";
contact
"Huawei Industrial Base
Bantian, Longgang
Shenzhen 518129
People's Republic of China
Website: http://www.huawei.com
Email: support@huawei.com";
description
"Description of rsa type submodule";
revision 2018-11-23 {
description
"The modifications in the schema file are synchronized to the YANG file.";
reference
"Huawei private.";
}
revision 2018-06-11 {
description
"The modifications in the schema file are synchronized to the YANG file.";
reference
"Huawei private.";
}
revision 2017-12-23 {
description
"The modifications in the schema file are synchronized to the YANG file.";
reference
"Huawei private.";
}
revision 2017-03-23 {
description
"Functions supported by the schema are added to the YANG file.";
reference
"Huawei private.";
}
revision 2013-01-01 {
description
"Init revision";
reference
"Huawei private.";
}
typedef rsaEncodeInType {
type enumeration {
enum "DER" {
description
"DER";
}
enum "PEM" {
description
"PEM";
}
enum "OPENSSH" {
description
"OPENSSH";
}
}
description
"RSA encodein type list";
}
}

View File

@ -0,0 +1,203 @@
/*
Copyright (C) 2013-2018 Huawei Technologies Co., Ltd. All rights reserved.
*/
module huawei-rsa {
namespace "http://www.huawei.com/netconf/vrp/huawei-rsa";
prefix rsa;
include huawei-rsa-type;
organization
"Huawei Technologies Co., Ltd.";
contact
"Huawei Industrial Base
Bantian, Longgang
Shenzhen 518129
People's Republic of China
Website: http://www.huawei.com
Email: support@huawei.com";
description
"RSA";
revision 2018-11-23 {
description
"The modifications in the schema file are synchronized to the YANG file.";
reference
"Huawei private.";
}
revision 2018-06-11 {
description
"The modifications in the schema file are synchronized to the YANG file.";
reference
"Huawei private.";
}
revision 2017-12-23 {
description
"The modifications in the schema file are synchronized to the YANG file.";
reference
"Huawei private.";
}
revision 2017-03-23 {
description
"Functions supported by the schema are added to the YANG file.";
reference
"Huawei private.";
}
revision 2013-01-01 {
description
"Init revision";
reference
"Huawei private.";
}
container rsa {
description
"RSA";
container rsaLocalKeys {
description
"Local key table";
container rsaLocalKey {
presence "create rsaLocalKey";
description
"Local key code.";
leaf keySize {
type uint32 {
range "2048";
}
default "2048";
description
"Key size";
}
leaf hostKeyName {
type string {
length "0..264";
}
config false;
description
"Hostkey name";
}
leaf hostKeyCode {
type string {
length "0..1024";
}
config false;
description
"Hostkey code";
}
leaf hostKeySSH1 {
type string {
length "0..1024";
}
config false;
description
"Hostkey code in SSH1 format";
}
leaf hostKeyPEM {
type string {
length "0..512";
}
config false;
description
"Hostkey code in PEM format";
}
leaf hostKeyOpenSSH {
type string {
length "0..512";
}
config false;
description
"Hostkey code in OpenSSH format";
}
leaf serverKeyName {
type string {
length "0..264";
}
config false;
description
"Server key name";
}
leaf serverKeyCode {
type string {
length "0..1024";
}
config false;
description
"Server key code";
}
}
}
container rsaPeerKeys {
description
"Peer key table";
list rsaPeerKey {
key "keyName";
description
"Peer key code.";
leaf keyName {
type string {
length "1..40";
}
description
"Key name";
}
leaf keyCode {
type string {
length "1..1024";
}
mandatory true;
description
"Key code";
}
leaf encodeInType {
type rsaEncodeInType;
default "DER";
description
"Encode type";
}
}
}
container rsaKeyPairCfgs {
description
"RSA keypair tabel";
list rsaKeyPairCfg {
key "keyPairLabel";
max-elements "20";
description
"RSA keypair";
leaf keyPairLabel {
type string {
length "1..35";
pattern '[a-zA-Z0-9_]*';
}
description
"Keypair Label Name : It only contains underscores (_), case-insensitive letters and digits";
}
leaf keySize {
type uint32 {
range "2048";
}
default "2048";
description
"Size of Keypair";
}
leaf hostKeyCode {
type string {
length "0..2048";
}
config false;
description
"Hostkey code";
}
}
}
container rsaGlobalCfg {
description
"Global Configuration ";
leaf maxKeyPair {
type int32 {
range "1..20";
}
default "20";
description
"Maximum keypair value";
}
}
}
}