Network Change & Configuration Management

Reply
Highlighted

Adding a custom device field via the API

Adviser
Posts: 402
5068     0

This is a NetMRI perl script that will add a custom field with the csutomer's custom device type in it.

# BEGIN-SCRIPT-BLOCK
#
# Script-Filter:
#     true
#
# END-SCRIPT-BLOCK
 
use strict;
use warnings;
 
use NetMRI_Easy;
my $fwsn;
my $mem_line;
# Connect to the NetMRI
my $easy = new NetMRI_Easy;
 
#Create the Custom Field
$easy->broker->custom_fields->create_field({
  model => 'Device',
  name  => ’Custom Device Type’,
  type  => 'string',
});
 
$easy->device->set_custom_field(custom_device_type=> “This is a Router”);
Follow me on LinkedIn: https://www.linkedin.com/in/sifbaksh
Twitter: https://twitter.com/sifbaksh

Re: Adding a custom device field via the API

Authority
Posts: 40
5069     0

Hi Sif,

Can you help me with this query related to Custom Issue?

 

https://community.infoblox.com/t5/forums/editpage/board-id/NetMRI/message-id/2006

 

Thanks,

Rahul

 

Showing results for 
Search instead for 
Do you mean 

Recommended for You