Closed hieu-n closed 4 years ago
Hello, Your issue seems not be related with the python-ovh wrapper itself, but tend to be on API usage. Support for API usage is done on api@ml.ovh.net (subscribe using api-subscribe@ml.ovh.net)
For your current problem, code should be like this:
rule = {'action': 'permit', 'protocol': 'tcp', 'sequence': 0, 'tcpOption': {'option':'established'}}
ip = 'xxx.xxx.xxx.xxx'
ovh_client.post(f'/ip/{ip}/firewall/{ip}/rule', **rule)
as tcpOption is a complex type named ip.FirewallOptionTCP.
Closing this issue, feel free to re-open if you think this issue is linked to a bug with python-ovh wrapper. Thanks Romain
I tried to create a rule authorising TCP protocol on all the IPs with an established option, as following:
That raised the following exception:
What is the appropriate value to pass to
tcpOption
parameter?