Groovy web console

subscribe to the feed Subscribe
to this
site
if && (via #groovywebconsole)
tweet this snippet Tweet
this
script

if &&

Published 4 weeks ago by Lawrence
Actions  ➤ Edit in console Back to console Show/hide line numbers View recent scripts
  def deviceprofiles_id   
  def device_vendor_value = "Mikrotik"
  def device_type_value = "Router"

  if (device_vendor_value == "Cisco" && device_type_value == "Router" ){
          deviceprofiles_id = '17'
        }
        
    if (device_vendor_value == "Mikrotik" && device_type_value == "Router" ){
          deviceprofiles_id = '32'
        }
       
  if (device_vendor_value == "Ruckus" && device_type_value == "Access Point" ){
          deviceprofiles_id = '33'
        }

return "{$device_type_value, $device_vendor_value, $deviceprofiles_id"