ExtremeSwitching (EXOS)

Expand all | Collapse all

Help me write UPM script

  • 1.  Help me write UPM script

    Posted 12-23-2018 12:11
    Hi!

    Help me write simple UPM script.
    I need what script do next:

    If link on port 25 down, script do next command:
    conf vlan VLANNAME del po 25
    conf vlan VLANNAME add po 29 tag

    If link on port 25 is up then:
    conf vlan VLANNAME del po 29
    conf vlan VLANNAME add po 25 tag


    EXOS 12.6.5.2 patch1-3


  • 2.  RE: Help me write UPM script

    Posted 12-24-2018 09:11
    Hi,

    this is a simple UPM script that goes like that:

    code:
    create upm profile MyUPMProfile

    enable cli scripting

    IF (!$MATCH($EVENT.LOG_COMPONENT_SUBCOMPONENT,vlan.msgs) && !$MATCH($EVENT.LOG_EVENT,portLinkStateDown)) THEN
    IF (!$MATCH($EVENT.LOG_PARAM_0,25)) THEN
    config vlan VLANNAME del port 25
    config vlan VLANNAME add port 29 tag
    ENDIF
    ELSE
    IF (!$MATCH($EVENT.LOG_COMPONENT_SUBCOMPONENT,vlan.msgs) && !$MATCH($EVENT.LOG_EVENT,portLinkStateUp)) THEN
    IF (!$MATCH($EVENT.LOG_PARAM_0,25)) THEN
    config vlan VLANNAME del port 29
    config vlan VLANNAME add port 25 tag
    ENDIF
    ENDIF
    ENDIF

    .

    create log filter MyLogFilter
    configure log filter MyLogFilter add event vlan.msgs.portLinkStateDown
    configure log filter MyLogFilter add event vlan.msgs.portLinkStateUp

    create log target upm MyUPMProfile
    enable log target upm MyUPMProfile
    config log target upm MyUPMProfile filter MyLogFilter severity Info