DX NetOps Manager

Enable/Disable polling for multiple interfaces in CAPM - Python code 

Aug 27, 2018 05:30 AM

Dear All,

 

In CAPM 3.6 there is a new feature introduced to enable/disable interface polling. Using the attached python code, one can do the same in bulk for multiple interfaces. The Input required is the oData Interface ID for the said interface.

 

There are two inputs required. The Odata Device Ids in text file as below and if they need to be enabled/disabled.

 

inter.txt is sample file attached.

 

The script will summarise the status when it runs fully as below.

 

$python3 Update_Polling_CA-Community.py

Type input file which has interface ids : inter.txt

Do you want to enable or disable polling : disable

Type output file to log : test.txt

Total Interfaces to be Updated :  2

Successfully done :  2

Failed to Update :  0

Details logged to file :  test.txt

 

Since the API only returns success/failure, in case of failure, most probably the id is incorrect.

 

please leave a comment in case you face difficulties in running the script.

 

Rgds,

Chetan

Statistics
0 Favorited
17 Views
2 Files
0 Shares
11 Downloads
Attachment(s)
zip file
Update_polling_CA-Community.py.zip   1 KB   1 version
Uploaded - May 29, 2019
zip file
inter.txt.zip   152 B   1 version
Uploaded - May 29, 2019

Related Entries and Links

No Related Resource entered.