DX NetOps Manager

Free script to set interface custom attributes 

Apr 19, 2018 05:30 AM

Attached is a Perl script to set interface custom attributes in batch from a CSV file.

 

Use Case

Customer needs to be able to sort and filter tabular views of interfaces in CA PC by custom criteria such as region or business line. With OpenAPI, he created a couple of CSV files with the interfaces to update and added the custom attribute settings. These updates need to be uploaded to the CA PM system.

 

Approach

Perl script setInterfaceCustAttr.pl sets interface custom attributes from CSV file in CA PM Data Aggregator
CSV file format:
ID; Name; DeviceID; DeviceName; CA1; CA2\n
first line is the column header and has the name of the custom attributes to be set
first column is the interface item ID, columns 2, 3 and 4 are ignored

e.g. file interfaces.csv
ID;Name;device/ID;device/Name;Region;Business
7027;eth0;6;deviceA;EMEA;Power

 

Usage

perl setInterfaceCustAttr.pl DA_host_and_port (e.g. PMDA:8581) inputfilename (without csv suffix)

e.g.

perl setInterfaceCustAttr.pl PMDA:8581 interfaces


Prerequisites

  • CA PM 3.2+
  • custom attributes have been created
  • Perl 5.18+, with REST::Client

 

 

Your feedback is appreciated so please post any comments in this thread.  As with all free Infrastructure Management Field Developed Utility postings, inquiries should be made through questions or comments in this thread, and the author, Lutz_Holzbecher, will provide a response.

All information downloaded or accessed (including field packs, customized solutions, patches etc.) are provided AS IS and no warranties are provided or made.  For more information you may click here.

Statistics
0 Favorited
3 Views
1 Files
0 Shares
4 Downloads
Attachment(s)
zip file
setInterfaceCustAttr.zip   1 KB   1 version
Uploaded - May 29, 2019

Related Entries and Links

No Related Resource entered.