Im working in a script and I need to add targets to a policy package using the cli in r77.30, so r80 api is not an option.
Is this possible?
Thanks in advance!
Have never seen anyone do it myself--will have to check with R&D to see if it's possible.
Is there a particular reason you can't upgrade to R80.x?
I don't know a procedure on R77.30 version, but on R80.x version you can perform it using mgmt_cli, using this command:
set access-rule layer "Network" rule-number 1 install-on.add Corporate-GW
He's looking for the policy installation targets for the Policy Package, which is different from setting the install-on for a specific rule.
Thank you for your answers, yes, I need to do it in r77.30 so I can't use the r80 api. Due of the requeriments of the enviroment of a migration I need to do it previously to upgrade r.80.10.
As I have to do it in with a lot of policy targets I would like to write a script to automatize this step and other ones that I need to do. I can get the policy targets to get the "export" info:
cpmiquerybin attr "" policies_collections "name='Standard'" -a __name__,installable_targets
But now I'm looking to assign targets to a policy package.
Assuming the policy package name is 'Standard' and you want to add 'gw1' as target to entire policy, you can do it in following way:
dbedit> addelement policies_collections Standard installable_targets network_objects:gw1
dbedit> update_allpolicies_collections::Standard Updated Successfully
Checked in lab, it works, thank you very much to all!
Retrieving data ...