- Products
- Learn
- Local User Groups
- Partners
- More
MVP 2026: Submissions
Are Now Open!
What's New in R82.10?
Watch NowOverlap in Security Validation
Help us to understand your needs better
CheckMates Go:
Maestro Madness
To test the ability of my code to deal properly with policy packages with empty installation targets, I'm trying to build such a policy package. It's easy in SmartConsole, but I'm not sure how to do it via the API.
[Expert@TestSC:0]# mgmt_cli -s session.txt add package name "Installed_Nowhere" access true installation-targets "none"
code: "generic_err_object_not_found"
message: "Requested object [none] not found"
[Expert@TestSC:0]# mgmt_cli -s session.txt add package name "Installed_Nowhere" access true installation-targets ""
code: "generic_err_object_not_found"
message: "Requested object [] not found"
[Expert@TestSC:0]# mgmt_cli -s session.txt add package name "Installed_Nowhere" access true installation-targets "[]"
[Expert@TestSC:0]# mgmt_cli -f json -s session.txt show package name "Installed_Nowhere" details-level full | jq '."installation-targets"'
"all"
[Expert@TestSC:0]# mgmt_cli -s session.txt discard
number-of-discarded-changes: 1
message: "OK"
[Expert@TestSC:0]# mgmt_cli -s session.txt add package name "Installed_Nowhere" access true
[Expert@TestSC:0]# mgmt_cli -f json -s session.txt show package name "Installed_Nowhere" details-level full | jq '."installation-targets"'
"all"
[Expert@TestSC:0]# mgmt_cli -s session.txt set package name "Installed_Nowhere" installation-targets.remove "all"
code: "generic_err_object_not_found"
message: "Requested object [all] not found"
Meanwhile, on a real box I have with a policy I built in SmartConsole:
[Expert@StandingLab:0]# mgmt_cli -f json -r true show package name "Installed_Nowhere" details-level full | jq '."installation-targets"'
[]
Is there a special value I can pass to 'add package' to get it to build a package with an empty installation targets list?
Separately, I have tried building it with a single installation target, then removing that target. That causes the property to change to "all" rather than to an empty list. That seems very unlikely to be expected behavior.
If None (notice the caps) doesn’t work, maybe @Omer_Kleinstern knows.
I thought I had tried that, but I had not. Sadly, I get the same result:
[Expert@TestSC:0]# mgmt_cli -s session.txt add package name "Installed_Nowhere" access true installation-targets "None"
code: "generic_err_object_not_found"
message: "Requested object [None] not found"
try this out (but be wary when using generic-object, I suspect you can do this with the REST API interface more easily but can't get at it right now in my lab).
mgmt_cli -r true set generic-object uid <UID for your policy package here> installationTargets
"SPECIFIC_GATEWAYS"
The equivalent setting for the default of all gateways is ALL_INTERNAL_GATEWAYS
That worked. Thanks!
Separately, the properties in 'show generic-object' are camelCase, which is incredibly nice. I don't recall seeing anything about this in the API documentation, but it's possible I've been looking in the wrong places. This could make my life significantly easier.
Leaderboard
Epsum factorial non deposit quid pro quo hic escorol.
| User | Count |
|---|---|
| 4 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 |
Tue 16 Dec 2025 @ 05:00 PM (CET)
Under the Hood: CloudGuard Network Security for Oracle Cloud - Config and Autoscaling!Thu 18 Dec 2025 @ 10:00 AM (CET)
Cloud Architect Series - Building a Hybrid Mesh Security Strategy across cloudsTue 16 Dec 2025 @ 05:00 PM (CET)
Under the Hood: CloudGuard Network Security for Oracle Cloud - Config and Autoscaling!Thu 18 Dec 2025 @ 10:00 AM (CET)
Cloud Architect Series - Building a Hybrid Mesh Security Strategy across cloudsAbout CheckMates
Learn Check Point
Advanced Learning
YOU DESERVE THE BEST SECURITY