You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
delete non-empty action-set; create it again - the GUI shows it empty; add the same action: although GUI shows action-set empty, trying to add the action to the action-set from API fails with message: action already exists on action-set
#43
Open
andreireiand opened this issue
Jan 13, 2020
· 0 comments
File "", line 3, in
mx.create_action(Name=gwActionName,ActionType='GWSyslog',Protocol=gwSyslogProtocol,Port=gwSysLogSrvPort,Host=gwSysLogSrvIP,ActionSet=gwActionSetName,SyslogLogLevel='INFO',SyslogFacility='USER',Message=sysLogMessage,ActionInterface=actionInterface)
`
mx.logout()
del mx
if 'mx' not in locals() or not mx.IsAuthenticated:
mx = impv.MxConnection(url, Port=443, Username=user, Password=passw)
mx.get_action_set(Name=gwActionSetName)
Out[311]: <imperva_sdk 'ActionSet' Object - 'GW-Sec-Events'>
mx.get_action(Name=gwActionName, ActionSet=gwActionSetName)
mx.create_action(Name=gwActionName,ActionType='GWSyslog',Protocol=gwSyslogProtocol,Port=gwSysLogSrvPort,Host=gwSysLogSrvIP,ActionSet=gwActionSetName,SyslogLogLevel='INFO',SyslogFacility='USER',Message=sysLogMessage,ActionInterface=actionInterface)
Out[313]: <imperva_sdk 'Action' Object - 'GWSyslog'>
mx.delete_action(Name=gwActionName,ActionSet=gwActionSetName)
Out[314]: True
mx.create_action(Name=gwActionName,ActionType='GWSyslog',Protocol=gwSyslogProtocol,Port=gwSysLogSrvPort,Host=gwSysLogSrvIP,ActionSet=gwActionSetName,SyslogLogLevel='INFO',SyslogFacility='USER',Message=sysLogMessage,ActionInterface=actionInterface)
Out[315]: <imperva_sdk 'Action' Object - 'GWSyslog'>
mx.delete_action_set(Name=gwActionSetName)
Out[316]: True
mx.create_action_set(Name=gwActionSetName, AsType='security',update=True)
Out[317]: <imperva_sdk 'ActionSet' Object - 'GW-Sec-Events'>
mx.create_action(Name=gwActionName,ActionType='GWSyslog',Protocol=gwSyslogProtocol,Port=gwSysLogSrvPort,Host=gwSysLogSrvIP,ActionSet=gwActionSetName,SyslogLogLevel='INFO',SyslogFacility='USER',Message=sysLogMessage,ActionInterface=actionInterface)
Traceback (most recent call last):
File "", line 3, in
mx.create_action(Name=gwActionName,ActionType='GWSyslog',Protocol=gwSyslogProtocol,Port=gwSysLogSrvPort,Host=gwSysLogSrvIP,ActionSet=gwActionSetName,SyslogLogLevel='INFO',SyslogFacility='USER',Message=sysLogMessage,ActionInterface=actionInterface)
File "/anaconda3/lib/python3.7/site-packages/imperva_sdk-0.2.0-py3.7.egg/imperva_sdk/MxConnection.py", line 879, in create_action
return Action._create_action(connection=self, Name=Name, ActionSet=ActionSet, ActionType=ActionType, Protocol=Protocol, SyslogFacility=SyslogFacility, Host=Host, SyslogLogLevel=SyslogLogLevel, SecondaryPort=SecondaryPort, ActionInterface=ActionInterface, SecondaryHost=SecondaryHost, Message=Message, Port=Port, update=update)
File "/anaconda3/lib/python3.7/site-packages/imperva_sdk-0.2.0-py3.7.egg/imperva_sdk/Action.py", line 194, in _create_action
raise MxException("Action '%s' already exists" % Name)
MxException: Action 'GWSyslog' already exists
`
The text was updated successfully, but these errors were encountered: