Learning Library

← Back to Library

Creating Custom Standard Drivers in IBM NCM

Key Points

  • IBM Network Configuration Manager (NCM) includes many built‑in drivers and offers a wizard to create custom **standard** (CLI‑based) drivers, but not “smart model” drivers.
  • Standard drivers work only with devices that expose a command‑line interface via Telnet or SSH; they cannot be created for GUI‑only, API‑only, or menu‑driven devices.
  • The video demonstrates building a driver that gathers command output and runs simple CLI commands on a Linux server, illustrating the same process used for any CLI device.
  • Before creating a driver you must plan the VTOs (Vendor, Type, Model, OS) – selecting unique values that don’t duplicate existing entries and considering how VTO filters will affect device selection.
  • The driver must include logic to verify the device’s model and OS version by matching specific CLI command output, with optional string mapping techniques not covered in this demo.

Full Transcript

# Creating Custom Standard Drivers in IBM NCM **Source:** [https://www.youtube.com/watch?v=2TrI0m9D1F0](https://www.youtube.com/watch?v=2TrI0m9D1F0) **Duration:** 00:30:14 ## Summary - IBM Network Configuration Manager (NCM) includes many built‑in drivers and offers a wizard to create custom **standard** (CLI‑based) drivers, but not “smart model” drivers. - Standard drivers work only with devices that expose a command‑line interface via Telnet or SSH; they cannot be created for GUI‑only, API‑only, or menu‑driven devices. - The video demonstrates building a driver that gathers command output and runs simple CLI commands on a Linux server, illustrating the same process used for any CLI device. - Before creating a driver you must plan the VTOs (Vendor, Type, Model, OS) – selecting unique values that don’t duplicate existing entries and considering how VTO filters will affect device selection. - The driver must include logic to verify the device’s model and OS version by matching specific CLI command output, with optional string mapping techniques not covered in this demo. ## Sections - [00:00:00](https://www.youtube.com/watch?v=2TrI0m9D1F0&t=0s) **Untitled Section** - - [00:26:34](https://www.youtube.com/watch?v=2TrI0m9D1F0&t=1594s) **Enabling Debug Logging and CLI Test** - The passage outlines changing ITCM driver logs to debug level, restarting the service to verify device data, then creating a native CLI command set to test that the new driver correctly executes and returns results. ## Full Transcript
0:01in this video I will demonstrate how to 0:04create new custom standard drivers with 0:06it NCM IBM tiv network configuration 0:10manager before starting the 0:12demonstration I will provide some 0:14background on it NCM drivers and I will 0:17briefly discuss the information that 0:18should be collected in advance prior to 0:21creating a new 0:23driver it NCM ships with drivers for a 0:26large number of network devices for 0:28devices that are not covered out of the 0:30box itcm provides a wizard to create new 0:33custom standard type drivers standard 0:37drivers are Ci or command line interface 0:39drivers that provide basic configuration 0:42backup and configuration change 0:45functionality new smart model type 0:47drivers cannot be created using the 0:50driver creation 0:51wizard it is usually possible to create 0:54a new custom standard driver for devices 0:57that have a CLI interface that is 0:59directly access accessible via telnet or 1:01SSH it may be difficult or not possible 1:04to create new custom standard drivers 1:07for devices that require navigating a 1:09menu to reach the CLI interface or they 1:11make significant use of special 1:13characters in their interface it is not 1:16possible to create new standard drivers 1:18for devices that only have GUI or API 1:21interfaces for configuration 1:23management it NCM is intended to manage 1:26network devices such as rers and 1:28switches but depending on your 1:30requirements it may be possible to 1:31manage specific aspects of other devices 1:34such as Linux servers in this video we 1:37will create a driver that can collect 1:39the output of a set of commands for a 1:40Linux server and that can execute simple 1:43CLI commands on a Linux server the basic 1:46steps to create a new standard driver 1:48are the same for all device types with a 1:50CLI 1:51interface keep in mind that if you need 1:53comprehensive server management IBM has 1:56products that are better suited for that 1:57task in order to work if efficiently 2:00when using the driver creation wizard it 2:02is important to do some planning for 2:04your new driver I will review the 2:06decisions you need to make and the data 2:08you need to collect before starting work 2:09on your new driver first what values 2:12will you use for the vtos the vendor the 2:16type the model and the OS version you 2:18cannot use a vtm OS that is an exact 2:21match for a vtm OS that already exists 2:23in 2:24itcm you should also consider how your 2:27choice of vtos will affect selecting 2:30devices and other itcm resources when 2:33using vtos filters in this example we 2:36will use a vtos of Linux server Cent OS 2:416X it is possible for drivers to support 2:44multiple models and Os versions if the 2:47behavior and CLI commands for those 2:48models and Os versions are very similar 2:51in this example we will support one 2:53model Cent OS and two OS versions 2:56five-star and six-star next decide how 3:00your new driver will verify the model 3:02and OS version information when 3:04communicating with the device typically 3:07you need to identify CLI command output 3:10that contains exact or Wild Card matches 3:12for the model and OS version strings 3:14there are ways to map or replace strings 3:16found in the command output but we will 3:18not cover that topic in this example in 3:20this example we will use the output of 3:22the command 3:24catc 3:26r-ras since that output contains matches 3:29for both the model and the OS version 3:31strings you must know the sequence of 3:34prompts and responses used when logging 3:36onto the device you will need to edit 3:38part of the driver to match some or all 3:40of that sequence and finally you need to 3:43decide what you consider the devices 3:45configuration to be we need to be able 3:48to collect this data from the device and 3:50store it in 3:52itcm in this example we will capture the 3:55output of the commands 3:57catc hosts and netstat 4:02DNR this slide provides the output of 4:05the commands used in this example for 4:07determining the devices vtos and for 4:10collecting the device's configuration 4:11data you may find this data useful to 4:14refer to during the demonstration of 4:16creating a new custom standard 4:19driver we'll launch the new driver 4:21creation wizard by navigating to the 4:24system manager tab the driers section 4:28and then from the tool tools menu we'll 4:30select new 4:34driver when the new driver window opens 4:37select IBM templates then select CLI 4:40based via telet or SSH we are not going 4:43to demonstrate creating tl1 based 4:45drivers in this 4:47example then click 4:50next and in the driver details panel we 4:53enter the data that we decided upon 4:55earlier so our vendor was going to be 4:59Linux 5:03the type was going to be 5:05server the model was going to be Cent 5:11OS and the OS was going to be 5:176X the supported model would be sent 5:23OS and the supported os's were going to 5:26be 5:28fstar and 5:31six-star both the supported models and 5:33the supported OS values are comedy 5:36limited 5:40lists we'll click next to move to the 5:43device script 5:45section device scripts control the 5:47configurable details of the handshake 5:50between itcm communication handlers and 5:52the device for functionality such as 5:54logging on executing commands and 5:56transferring data we're going to addit 5:59SSH section of the device script since 6:01our Linux server only allows SSH 6:04connections we will select an existing 6:07device script template by using the 6:09selection box is near the bottom of the 6:11screen in this case we'll pick a 6:18Cisco router 6:267200 and a version 12.3 we're using a 6:30Cisco router template because there are 6:32no vtm os's in it NCM that have Behavior 6:36really similar to a Linux server and a 6:38Cisco router 7200 family of drivers has 6:41an SSH connection section that will work 6:44pretty well with that extensive 6:45modification note that if you have a 6:47custom device script that is closer to 6:50the behavior of your new vtos you can 6:52always paste in that script uh from the 6:56text mode of the editor 7:01we'll click open to load the device 7:03script and once it loads we'll make sure 7:07that we have the SSH tab selected and 7:10that we have the 7:13form editing mode selected Advanced 7:16users may prefer to use the text mode of 7:19the editor however you must navigate the 7:22device script manually and be sure that 7:24you're editing the correct section when 7:25you use this mode in this example we're 7:28going to use the form mode the first 7:30section we will edit will be the connect 7:31section this is the section that handles 7:34logging on to the 7:35device we will use information from the 7:38device log on sequence to edit the 7:40section since we are using SSH 7:42programmatically it's likely that we 7:44will only need to know the prompt that 7:46indicates that we've successfully logged 7:47on even though this section is designed 7:49to handle telnet as well as SSH we will 7:52also need to remove any extra lines that 7:55are specific to the template vtm OS to 7:57avoid executing commands that do not 8:00apply to our Target device we'll first 8:02edit the script content to remove the if 8:05and if block that handles the enable 8:08command for routers since this does not 8:10apply to uh Linux 8:20servers next we'll remove the lines that 8:23control setting the terminal width and 8:24length on a Cisco rouer since these also 8:27don't apply to a Linux server 8:31finally we'll change our prompt from a 8:34pound sign to a dollar sign since in 8:36this case we're logged in as a non-root 8:38user and we'll be seeing the dollar 8:41character as the last character in our 8:43prompt next we'll edit the section of 8:45the script that parses the model 8:47information from the device 8:49output we've already decided that we 8:51will use the output of the cat Etc Red 8:54Hat release command to provide the vtos 8:57data that will parse in this section 9:00we'll edit this section to reflect the 9:03information from the output of that 9:21command note that in order to have a 9:23good match in this case we've included a 9:26carriage return line feed character 9:28after the Red Hat 9:30release line that comes right before the 9:33Centos string which is our model and 9:36we've also included a leading and 9:38trailing space after the word release 9:41next we'll edit the section that 9:43determines the OS version we'll click on 9:45the config do version Tab and edit that 9:48information also using the output of the 9:51command catet Red Hat 9:57release the concept cep of feature sets 10:00doesn't apply to the OS versions of 10:02Linux servers so we'll delete those 10:04lines we'll change the rest of the lines 10:07to match what we see in the output of 10:09etsy Red Hat 10:15release in this case we want to identify 10:19or parse out the string 6.7 as the OS 10:22version so our F began string will be 10:25Cent OS release with a trailing space 10:31and our find end string will be a 10:34leading space followed by opening 10:39parentheses next we'll edit the section 10:41that pulls what we consider to be our 10:43running configuration data from the 10:45device we'll click on config do running 10:48we want to send the command cat Etsy 10:52host and netstat DNR to the device we 10:56need to edit the commands that we want 10:57to send in this section and the prompt 10:59that lets us know when we've received 11:01each command response we also need to 11:03add information strings to parse for 11:06that indicate the start and the end of 11:08the configuration data so we will paste 11:11in the commands we want to send 11:14first note that we are sending an echo 11:16command to Output as a start marker 11:19we'll use the echoed string as the find 11:22begin value in the upper 11:27panel 11:29note that we're also proceeding this 11:31with a line feed character so that we 11:33can avoid including the actual Echo 11:35command itself in our configuration 11:38output data this is not required having 11:41a start marker and we're simply doing 11:44this to show an example of how this can 11:46be done also note that we don't put a 11:49final weight equals dollar sign remember 11:53the dollar sign is the prompt we're 11:54looking for we do not put an a final 11:57weight equals dollar sign line at the 12:00end of this set of commands because we 12:03want to catch the final dollar prompt as 12:06our config running. end marker both to 12:10tell us that we've received all the data 12:12and when we're parsing for the end of 12:16the configuration data next we'll edit 12:18the information or diag section we'll 12:21click on the diag 12:23tab this section allows us to collect 12:26additional information from the device 12:27in addition to what we considered to be 12:29our configuration data unlike 12:32configuration data historical versions 12:35of this data are not kept only one copy 12:38of this data per device is kept the 12:40database field that stores this data is 12:42fairly large but if the collect the data 12:45is too large for the field it will cause 12:47a driver error and the entire unit of 12:49work for the device will fail we need to 12:51edit the commands that we going to send 12:53in this section and the prompt that lets 12:55us know we've received each command 12:57response we also have have to add a 12:59string to parse for that indicate that 13:01we've received all the informational 13:03data in this example we'll send a single 13:05command slin if 13:11config we'll also change our prompt that 13:15indicates the end of data to the dollar 13:18sign 13:20character note that we don't have a 13:22weight equals dollar sign uh because we 13:25want to in intercept the uh the final 13:28dollar sign character as the end of our 13:30data however if we had multiple commands 13:33as we saw before we 13:34edited uh after each command except for 13:37the final command we would have a weight 13:39equals dollar sign line to make sure 13:42that we'd received all data from the 13:44First Command before we started a second 13:47command next we'll edit the device 13:49script section that controls sending CLI 13:52commands to the device using native CLI 13:55command 13:56sets these commands can either either 13:58make changes to the device or return 14:00data from the device or possibly 14:04both in this example we are going to 14:06send commands to the device in line in 14:09the SSH session with the device the 14:12section of the device script used for 14:13this purpose is the stream file section 14:16CLI commands resulting from processing a 14:19native CLI command set are stored in a 14:21temporary file and this section handles 14:24streaming the lines from the temporary 14:26file to the device we will remove the 14:28existing commands that are intended for 14:30a Cisco router and replace those or 14:33leave only the commands that are needed 14:34for a Linux 14:50server we'll also change the prompt 14:52we're waiting for to our dollar prompt 14:55next we'll edit global settings for the 14:57device script we'll select cect the 14:59miscellaneous tab we'll change the 15:01prompts to match our dollar sign 15:10prompt and we'll add a line that strips 15:13the final line off the configuration 15:16data this is an optional line this line 15:19may or may not be useful to you 15:21depending on your data and whether or 15:22not a trailing line is a problem for 15:24your use of the configuration data next 15:26we'll edit the config tag again global 15:29data or global settings we'll change the 15:32configuration type to single 15:35config since we don't have the concept 15:37of a startup and running configuration 15:39on a Linux 15:42server and we'll change the prompts to 15:44our dollar 15:46prompt even though these values are 15:49probably overridden by specific script 15:54sections this completes editing the 15:57device script so we'll click next to 15:59move on to the resource access or rad 16:02section since we plan to use SSH to 16:04communicate with our Linux server we'll 16:06select the SSH Tab and make sure it's 16:11enabled in the transport section we'll 16:14make sure that our streaming put and get 16:17checkboxes are checked this is because 16:19we want to send and receive data over 16:22our SSH connection stream rather than 16:26creating an FTP server to send data back 16:28and forth to the device in the SSH 16:30option section we'll select ssh2 because 16:34our Linux version uses ssh2 instead of 16:37ssh1 there are no changes we'll make in 16:40the authentication section in the 16:42command line we simply make sure that we 16:45are using the SSH script 16:51type in the configuration section we'll 16:54leave native compare selected we're 16:56going to turn off reboot on config list 16:58load this probably doesn't make sense 17:00for a Linux server and we don't want to 17:02reboot our server unnecessarily anyway 17:04we'll allow line by line for Native 17:06command sets this allows all commands to 17:09be executed in the command set even if 17:12some of them error out which may be 17:13useful when we try to collect 17:15information from the Linux server later 17:18we're going to leave the compare device 17:20and itcm checkbox checks for network 17:23devices this box should always be 17:25checked for normal use but if your Linux 17:27server responses are not consistent this 17:30may cause itcm to incorrectly think that 17:33it NCM and the Linux server are out of 17:35sync in that case we can edit the driver 17:38and change the setting we only have a 17:40single configuration since we don't have 17:43the concept of a startup command with 17:45Linux so we'll leave the multiple config 17:47compare checkbox unchecked and we'll 17:50also leave the disable config checks on 17:52changes unchecked this way it NCM will 17:56check to see if someone has changed the 17:58the Linux server configuration outside 18:00of itcm before it makes a change we're 18:03going to turn off pre writes for imports 18:06and syns this is the equivalent of the 18:08copy running to start command for a 18:11Cisco router and it really doesn't apply 18:13to a Linux server we'll leave the report 18:16diffs checkbox unchecked uh for import 18:19we'll still see any differences when we 18:21do a configuration synchronization and 18:23we're going to leave the update on 18:25change check for our info which was our 18:27diag section from the device script and 18:30for configuration so when we actually 18:32make changes we'll get our configuration 18:34and our information updated we'll leave 18:37the data type as CLI since we're just 18:40getting the output of CLI commands since 18:42we're not going to use the tnet and ALT 18:44T telnet access 18:47types we'll disable telnet since we may 18:50use it later and since we have no 18:53intention of having another access type 18:56we'll simply remove the alt tnet type 18:58this concludes the changes we need to 19:00make to the resource access document so 19:03we'll click next we'll enter a 19:06description for the new custom driver 19:08you should enter a description that's 19:09going to make sense to you a week a 19:12month or a year later when you come back 19:14to try to figure out what you created 19:16this driver 19:19for the last screen simply shows us the 19:22details of the driver we just created 19:24and we can always find this information 19:26later in the itcm driver management 19:32guey now that we finished creating our 19:35driver if we refresh our driver's panel 19:38by toggling back and forth between 19:41screens we'll be able to see our new 19:43driver in our top row with our Linux 19:46server Centos 6X and we'll notice that 19:49this starts with CST indicating it's a 19:51custom standard 19:53driver U now it's time for us to test 19:57our driver at try to actually import a 19:59device of this vendor type model in OS 20:02before we can do that we need to add 20:04credentials for the Target device into 20:07an authentication resource we've created 20:10a custom driver test realm just to keep 20:13things organized in this example and 20:16we've already created a authentication 20:19for our Centos Target device you'll 20:23notice that we set the filter on this to 20:26Linux as the vendor server as the type 20:28and sent OS as the model and we've left 20:32the OS version wild card if we look at 20:37this we can see that we just have one 20:39entry with our username our password and 20:42we've also set that password as the 20:43enabled password although for a Linux 20:46server we shouldn't need an enable 20:47password we're just doing this to avoid 20:49a possible null po or exception at 20:52execution time in case some routine is 20:54called that looks for an enabled 20:56password value now now we need to create 20:59a device of that type uh we're just 21:01going to use the Linux server that itcm 21:06is running on and we're just going to 21:08name it by its host name so we won't 21:10have to worry about name 21:14resolution so we'll create a new network 21:19resource we'll put in the IP address of 21:21our itcm 21:24server and we'll select our new vendor 21:26type model in OS 21:35we happen to know from looking at our 21:37red hat-- release file that this is a 21:416.x OS version but even if we picked the 21:445.x at runtime the parsing logic in the 21:48device script that we edited would find 21:50the right version and substitute 21:54that now that we've created the device 21:57we'll import it to see if our driver 21:59Works clicking on Import in the context 22:02menu opens our import network resources 22:06wizard we can see that our device is 22:08already 22:09selected so we'll just step through the 22:11wizard we're going to ignore errors 22:14we've got an authentication resource so 22:15there's no need to override the 22:17passwords the priority really doesn't 22:19matter for the unit of work we're going 22:21to create since it'll be the only unit 22:22of work running on our example 22:25system and we'll schedule this for 22:28immediate 22:29execution it'll just give it a 22:34description we can look for our unit of 22:36work in Q manager and track its 22:44status in this case we can see that our 22:46U aired out we'll take a look at the U 22:50log and get an idea what the problem is 22:53in this case it looks like there's a 22:54problem with our Command uh to get the 22:57model section 22:58we did something wrong sending the ETC 23:01Red Hat Das release command so we'll 23:04have to go back and add it the driver uh 23:07and correct that 23:13error we'll navigate back to the 23:16driver's 23:17panel and from the tools menu we'll 23:20select edit 23:25driver this brings up our driver wizard 23:28again and there's one driver we can edit 23:31which is our new 23:33one we'll navigate back to the device 23:35script panel and we'll select the SSH 23:40Tab and we'll go down to our model 23:44section we can see that we left the 23:46equals out between the model. send and 23:49the command cat Etsy SL Red Hat D relase 23:55so we'll correct that 23:58we'll check config version uh to make 24:01sure we didn't make the same error which 24:02we 24:05didn't then we can click finish close 24:08our Editor to save our changes to our uh 24:11new 24:12driver and after saving our driver we'll 24:14go back and we'll try our import 24:26again 24:44and we'll check the status of our 24:46currently executing uh unit of 24:56work 24:59and we can see that this 25:02time we were able to successfully import 25:05our 25:06device now we'll go and check the uh 25:09configuration data and the info data for 25:11that 25:18device we'll have to use view native 25:20commands to see the configuration data 25:23since this is a standard driver and 25:25there is not a guey editor for the 25:27configuration 25:31as we expected we have our config start 25:34marker line we've got the output of 25:37catc hosts and the output of netstat 25:42DNR if we look at our information data 25:46that's under the hardware tab for 25:47historical reasons itcm used to model 25:51hardware and there was a gooey layout 25:54for the chassis however that work has 25:56now been deferred ref to it&m however 26:00itcm still collects the text data in 26:04this section and we can see the output 26:07of 26:08oursin if config command 26:11here if the new driver fails when 26:13importing the device and a basic check 26:15of device connectivity device log on 26:18credentials and the accuracy of your 26:20device script editing in the new driver 26:22don't solve the problem you can set the 26:24driver logging level to debug to get 26:26additional troubleshooting information 26:28to do this edit the driver log. 26:31properties file in the config 26:34/properties 26:35directory under the itcm base install 26:40location near the top of the file change 26:43the line log for j. root log or equals 26:45error comma driver log to log for j. 26:49root log or equals debug driver log save 26:52the file and restart 26:54itcm when it NCM restarts 26:59test your work against the device again 27:01after that review the data in the 27:05drivers. log file under the logs 27:07directory of the itcm base install 27:10location once you're done 27:12troubleshooting remember to set driver 27:14logging back to error level to avoid 27:17degrading itcm 27:21performance now that our new driver is 27:23working correctly to import devices into 27:26itnc 27:28we need to test to be sure that it will 27:30correctly execute CLI commands from a 27:33native CLI command set in order to do 27:36that we need to create a native CLI 27:39command set of the same 27:41vtos as the new 27:44driver for our example we've created a 27:47simple native CLI command set called get 27:51you limit 27:52data the vendor filter is set to Linux 27:55the type filter is set to server and 27:57we've left the model and Os filters wild 27:59carded since the command we're going to 28:01use will work on probably any Linux 28:08server we can see that we're just going 28:10to send the command UL limit d 28:14a the driver framework takes care of 28:17connecting to the device sending this 28:19command and detecting that the command 28:22is completed successfully in this case 28:25we're going to select a type 28:27interrogation native command set because 28:30we want to return results and be able to 28:32view those 28:33results so our next step is to apply 28:36that command set to the device we could 28:38apply the command set from the device or 28:41from the command set itself using the 28:43context menu apply native command set 28:47this opens a wizard we can see that the 28:50command set is already 28:51selected and we'll just walk through the 28:54wizard and select the device 29:02we don't need to supply credentials 29:04since we already have an authentication 29:06resource and we don't really care about 29:08the priority in this case since our 29:10system is not very busy and we'll 29:12schedule this uh command set unit of 29:14work for immediate 29:20execution and we check the progress of 29:23our Command set and our Q 29:25manager look at the work currently 29:28executing and bore into our Command 29:31set and take a look at the resulting 29:34unit of work 29:37log we can see that our Command set has 29:40completed 29:42successfully it sent our Command ulimit 29:45d 29:46a and it got back the response we 29:49expected uh for a nonroot 29:53user this concludes our example of 29:56creating and testing a custom standard 29:58driver with basic capabilities to backup 30:01configuration data and to execute CLI 30:04commands although examples for a Linux 30:07server creating drivers for network 30:09devices requires the same basic steps