Chapter 11 Register DMPs

Reference

# multiple devices are connected to the same interface.

# Configs for only the first device that is detected will be applied.

fetch SW_POE /oper/interface{$INTERFACE}/switch_poe_support if [[ $NEW_TRIGGER -eq $CURRENT_TRIGGER ]]; then

if [[ $SW_POE -eq YES ]];then

if [[ $CURRENT_AP125X -eq $IS_AP125X ]]; then

set_oper /oper/interface{$INTERFACE}/macro_cfg_reset_pending_state NO return 0;

else

set_oper /oper/interface{$INTERFACE}/macro_cfg_reset_pending_state YES

fi

else

set_oper /oper/interface{$INTERFACE}/macro_cfg_reset_pending_state NO return 0;

fi

fi

DEF_TRIGGER=CISCO_CUSTOM_EVENT

# trigger $DEF_TRIGGER TRIGGER=$DEF_TRIGGER INTERFACE=$INTERFACE LINKUP=YES AUTH_ENABLED=$IS_AUTH_ENABLED

# Apply the new trigger as there is none already applied on interface

if [[ $CURRENT_TRIGGER -eq ““ ]]; then

set_oper /oper/interface{$INTERFACE}/macro_cfg_reset_pending_state NO fetch ACCESS_VLAN /config/trigger{$NEW_TRIGGER}/vlan_access

fetch VOICE_VLAN /config/trigger{$NEW_TRIGGER}/vlan_voice fetch NATIVE_VLAN /config/trigger{$NEW_TRIGGER}/vlan_native if [[ $NEW_TRIGGER -eq CISCO_WIRELESS_AP_EVENT ]]; then

trigger $NEW_TRIGGER TRIGGER=$NEW_TRIGGER INTERFACE=$INTERFACE LINKUP=YES LIMIT=$LIMIT SW_POE=$SW_POE AP125X=$IS_AP125X NATIVE_VLAN=$NATIVE_VLAN

send log facility AUTOSMARTPORT severity 5 mnemonics INSERT Device $DEVICE_TYPE detected on interface $INTERFACE, executed $NEW_TRIGGER

return 0;

fi

if [[ $NEW_TRIGGER -eq CISCO_WIRELESS_LIGHTWEIGHT_AP_EVENT ]]; then

trigger $NEW_TRIGGER TRIGGER=$NEW_TRIGGER INTERFACE=$INTERFACE LINKUP=YES LIMIT=$LIMIT SW_POE=$SW_POE AP125X=$IS_AP125X ACCESS_VLAN=$ACCESS_VLAN

else

trigger $NEW_TRIGGER TRIGGER=$NEW_TRIGGER INTERFACE=$INTERFACE LINKUP=YES AUTH_ENABLED=$IS_AUTH_ENABLED LIMIT=$LIMIT ACCESS_VLAN=$ACCESS_VLAN VOICE_VLAN=$VOICE_VLAN NATIVE_VLAN=$NATIVE_VLAN

fi

send log facility AUTOSMARTPORT severity 5 mnemonics INSERT Device $DEVICE_TYPE detected on interface $INTERFACE, executed $NEW_TRIGGER

trigger $DEF_TRIGGER TRIGGER=$DEF_TRIGGER INTERFACE=$INTERFACE LINKUP=YES AUTH_ENABLED=$IS_AUTH_ENABLED

return 0;

 

 

 

fi

 

 

 

# Check the reset pending state and only then trigger the new event

 

 

 

# to apply new device configurations.

 

 

 

fetch IS_CFG_RESET_PENDING_STATE /oper/interface{$INTERFACE}/macro_cfg_reset_pending_state

 

 

 

fetch IS_INT_MACRO_CFG_STICKY /config/interface{$INTERFACE}/auto/sticky

 

 

 

STICKY=$IS_INT_MACRO_CFG_STICKY

 

 

 

if [[ $IS_CFG_RESET_PENDING_STATE -eq YES ]]; then

 

 

 

set_oper /oper/interface{$INTERFACE}/macro_cfg_reset_pending_state NO

 

 

 

fetch ACCESS_VLAN /config/trigger{$NEW_TRIGGER}/vlan_access

 

 

 

fetch VOICE_VLAN /config/trigger{$NEW_TRIGGER}/vlan_voice

 

 

 

User Guide for Cisco Digital Media Manager 5.2.x

 

 

 

 

11-24

 

OL-15762-03

 

 

 

 

Page 148
Image 148
Cisco Systems 5.2.x manual 11-24, Deftrigger=Ciscocustomevent