Unable to set Gateway Platform Version
zwiy opened this issue · comments
I'm using ansible 2.9 and a CheckPoint management and gateway with version R80.30.
I'd like to add a new simple-gateway. For that I'm using the cp_mgmt_simple_gateway
module.
If I set the version to R80.30 I got an error message as you can see below: Unknown API version: R80.30
The API version is v1.5. But I'd like to set the Gateway Version which is R80.30 and not the API version. If I left the version field empty, the gateway is added with version R80.
In the modul description under version it's written that you can set the gateway platform version with the version
field.
"hosts": {
"10.20.3.12": {
"_ansible_no_log": false,
"warnings": [
"Module did not set no_log for one_time_password"
],
"changed": false,
"ansible_facts": {
"discovered_interpreter_python": "/usr/bin/python"
},
"failed": true,
"invocation": {
"module_args": {
"ipv6_address": null,
"color": null,
"threat_extraction": null,
"ips": null,
"logs_settings": null,
"url_filtering": null,
"send_logs_to_server": null,
"save_logs_locally": null,
"ignore_warnings": null,
"comments": null,
"firewall_settings": null,
"state": "present",
"version": "R80.30",
"auto_publish_session": true,
"one_time_password": "aaaa",
"details_level": null,
"threat_emulation": null,
"content_awareness": null,
"os_name": null,
"tags": null,
"interfaces": null,
"application_control": null,
"ipv4_address": "10.20.31.100",
"send_alerts_to_server": null,
"groups": null,
"wait_for_task": true,
"ignore_errors": null,
"anti_bot": null,
"vpn": null,
"ip_address": null,
"firewall": true,
"send_logs_to_backup_server": null,
"name": "checkpoint_gateway",
"anti_virus": null,
"vpn_settings": null
}
},
"action": "cp_mgmt_simple_gateway",
"msg": {
"message": "Unknown API version: R80.30",
"code": "err_unknown_api_version"
}
}
}
If I send an API request with Postman everything is working as expected.
POST
to {{mgmt-server}}/v1.5/add-simple-gateway
Payload:
{
"name" : "checkpoint_gateway",
"color" : "black",
"ipv4-address" : "10.20.31.100",
"version" : "R80.30",
"one-time-password" : "aaaa",
"firewall" : true,
"vpn" : false,
"application-control" : false,
"url-filtering" : false,
"ips" : false,
"anti-bot" : false,
"anti-virus" : false,
"threat-emulation" : false
]
}
Hey zwiy,
Thanks for your finding!
We actually already fixed this issue last week and it will be updated in the next version which will be released in a few days, so I'm closing the issue.
Thanks, and please keep notify us for any issue you find :)
Hey chkp-orso,
Do you have a quick-fix or a workaround?
When do you think to publish a fixed version?
Thanks!
Hi zwiy,
It will be publish just in a few days
Thanks!
Hi chkp-orso,
is this issue fixed now?
Still getting the same issue with Ansible 2.9.
Thank you!
Hi chkp-orso,
we still have this issue with the collection 1.0.5.
fatal: [CPM]: FAILED! => {"changed": false, "msg": "Checkpoint device returned error 400 with message {u'message': u'Unknown API version: R80.30', u'code': u'err_unknown_api_version'}"}
Any recommendations?
Thanks. @chkp-orso
Hi everyone,
we still had the same issue with collection 2.0.0.
So I've taken a look inside the source code and found that the parameter is no longer called version
. It is now called gateway_version
.
After using gateway_version
it works as intended.