AnsweredAssumed Answered

SmartConsole CLI Question

Question asked by Mike Andretta on Nov 21, 2018
Latest reply on Nov 26, 2018 by Dameon Welch-Abernathy

I've spun up an R80.10 management server for API testing. I've been working with the SmartConsole CLI as my admins would have access there and could benefit from some mass object creation by importing a file. With that said, on my test management server (R80.10 JHF 154) I can successfully run the syntax below with desired results. 


# add group object

add group name AD-Servers


# add host objects

add host name AD100 ip-address groups.1 AD-Servers

add host name AD101 ip-address groups.1 AD-Servers



# add network

add network name net_10.0.0.0_b24 subnet subnet-mask


# add section

add access-section layer Network position top name "Test Rules"


# add rule

add access-rule layer Network "Test Rules" name "Test AD Rule" source AD-Servers destination net_10.0.0.0_b24 service.1 ldap service.2 http action Accept track Log install-on LABFW comments "Comments here"


This works when there is a single "Standard" policy on the management server so I created a second policy named "Test" and im trying to target then the rule above to be injected into the "Test" policy, not "Standard" anymore.


Within the mgmt_cli there is a policy-package option where you can specify the desired package. Is there no ability to specify a policy you want to execute the code above on (obviously rule creation only) when using the SmatrConsole CLI?


I have looked through the Management API page section in 'add access-rule' with no luck, maybe I'm missing it? Can someone let me know how I can accomplish this?


Thanks in advance!