Reply
Topic Options
- Subscribe to RSS Feed
- Mark Topic as New
- Mark Topic as Read
- Float this Topic for Current User
- Bookmark
- Subscribe
- Printer Friendly Page
Adding a custom device field via the API
Options
- Mark as New
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content
02-11-2014 02:45 PM
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
https://sifbaksh.com
Twitter: https://twitter.com/sifbaksh
https://sifbaksh.com
Re: Adding a custom device field via the API
Options
- Mark as New
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content
01-11-2017 02:53 PM
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