Quantcast
Channel: THWACK: Message List - Network Configuration Manager
Viewing all articles
Browse latest Browse all 8827

NCM : Interface Description-Change template for Huawei Router

$
0
0

Hello All,

 

I want to create a config change template for Huawei routers to change the interface description.  I have modified a cisco template script to support Huawei , but the script is  not showing interface list of Huawei router.



 

Please check the below script.
---------------------------------------------------------------------------------------------------------------------------
/*
.CHANGE_TEMPLATE_DESCRIPTION
Change Bandwidth on Huawei devices
.CHANGE_TEMPLATE_TAGS
HuaweiRouter
.PLATFORM_DESCRIPTION
Huawei Device
.PARAMETER_LABEL @ContextNode
NCM node
.PARAMETER_DESCRIPTION @ContextNode
The node the template will operate on. All templates require this by default. The target node is selected during the first part of the wizard so it will not be available for selection when defining variable values
.PARAMETER_LABEL @PhysicalInterfaces
Select Interface(s)
.PARAMETER_DESCRIPTION @PhysicalInterfaces
Select Interface(s) you would like to change description on.
.PARAMETER_LABEL @NewInterfaceDescription
Interface Description
.PARAMETER_DESCRIPTION @NewInterfaceDescription
Enter new description for interface(s).
*/


script ChangeInterfaceDescriptionHuawei (
NCM.Nodes @ContextNode,
NCM.Interfaces[] @PhysicalInterfaces,
string @NewInterfaceDescription )
{
// Enter config terminal mode
CLI
{
system-view
}
foreach (@itf in @PhysicalInterfaces)
{
CLI
{
interface @itf.InterfaceDescription
undo description
description @NewInterfaceDescription
quit
}
}
//Exit Config mode
CLI {quit}
}

----------------------------------------------------------------------------------------------------------------------------------------------------------------
Regards,

(

 

Message was edited by: wakhan


Viewing all articles
Browse latest Browse all 8827

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>