New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
modify_target Error: HOSTS requires an EXCLUDE_HOSTS #187
Comments
Thanks for the info. For me this is actually an issue in gvmd but we should implement a workaround in python-gvm. |
@y0urself do you have some time to validate this issue and implement a fix? Something like if hosts and exclude_hosts is None:
exclude_hosts = [''] |
Sure |
Thanks! |
If I tested this bug correctly, it appears when I use the <modify_target target_id='fancy_id'>
<name>really good name</name>
<hosts>some,hosts,here</hosts>
<exclude_hosts/>
</modify_target> or <modify_target target_id='fancy_id'>
<name>really good name</name>
<hosts>some,hosts,here</hosts>
<exclude_hosts></exclude_hosts>
</modify_target> |
Should be fixed with #188 |
Hello,
just to let you know that the function "modify_target" requires the "exclude_hosts" parameter if you set the "hosts" parameter. Even if it's supposed to be optional...
e.g. you will get that error if you try to call
gmp.modify_target(target_id, hosts=['192.168.1.2'])
you will get the error:
gvm.errors.GvmError: ('Error in response. HOSTS requires an EXCLUDE_HOSTS', <Element modify_target_response at 0x7fe668f3f588>)
In order to avoid the error you have to use instead:
gmp.modify_target(target_id, hosts=['192.168.1.2'], exclude_hosts=[''])
The text was updated successfully, but these errors were encountered: