I've been trying for several days to get the API Service {'Network_Firewall_Update_Request_Rule'].createObject working without success. I did get the firewallManager edit_dedicated_fwl_rules working but now want the Service to work too. I've looked throughout the web for an answer and could not find one.
My question is what is the syntax of the arguments to pass to the Service createObject for the Firewall Rules? Do you have an example?
The command being used is:
client = SoftLayer.create_client_from_env(username=user, api_key=api)
client['Network_Firewall_Update_Request_Rule'].createObject(id=12345, [{'action': 'permit'}])
yes, I know I need more rule statements for a create.
This returns "SyntaxError: non-keyword arg after keyword arg" because of the "id=".
Putting the "id=" at the end of the API:
client['Network_Firewall_Update_Request_Rule'].createObject([{'action': 'permit'}], id=12345)
then the error is "Either a component ID or an ACL ID must be supplied."
If I remove the "id=" and only have
client['Network_Firewall_Update_Request_Rule'].createObject(12345, [{'action': 'permit'}])
then the error is "Either a component ID or an ACL ID must be supplied."
I know I must have the "id=" as this command works:
client['Network_Firewall_Update_Request'].getRules(id=12345)
But with the Manager API command fw.edit_dedicated_fwl_rules(12345, [{'action': 'permit'}])
there is no "id=" as this creates the rule successfully.
Thanks for any help.