fmcapi
fmcapi copied to clipboard
ACP Rule URL - Question
Hello,
Is there a way to add an URL to an ACPRule?
Regards,
Gabor
@banzigaga Yes, but right now you have to build it manually. Eventually I will add a function in the ACPRule Class which takes a list of url object names and does the work for you, just like the other supported objects.
url1 = URL(fmc=fmc1, name='_url1', url='asdf.org')
url1.post()
foo = [{"type":url1.type,"id":url1.id,"name":url1.name}]
acprule1 = ACPRule(fmc=fmc1, acp_name=acp1.name)
acprule1.urls = {"objects":foo}
Ok, thanks @parkerbrother1 !
@parkerbrother1 have you made any progress on this? Personally I like the separate method as it keeps things simple and the script writer doesn't need to be a programmer and/or need to know the underlying structure of the "objects" format.
I wrote some native Python to achieve this, I’ve been in the US for work for the last 5 weeks so swampped.
I’ got back yesterday, now to work out how to add a new method to fmcapi.
On 25 Aug 2019, at 19:27, daxm [email protected] wrote:
@parkerbrother1 https://github.com/parkerbrother1 have you made any progress on this? Personally I like the separate method as it keeps things simple and the script writer doesn't need to be a programmer and/or need to know the underlying structure of the "objects" format.
— You are receiving this because you are subscribed to this thread. Reply to this email directly, view it on GitHub https://github.com/daxm/fmcapi/issues/18?email_source=notifications&email_token=ACM6ZXVGRR4ADXDFBL3LMRLQGLFIJA5CNFSM4HXKIGHKYY3PNVWWK3TUL52HS4DFVREXG43VMVBW63LNMVXHJKTDN5WW2ZLOORPWSZGOD5CZDMQ#issuecomment-524652978, or mute the thread https://github.com/notifications/unsubscribe-auth/ACM6ZXQUUISA4S3FOTOTLHLQGLFIJANCNFSM4HXKIGHA.
@karmicgeezer, Or post your code here and I can implement it.
Hello, just asking how about this enhancement?
@NetDevAutomate, any status on your "fix" for this?
Check out the release 20200615.0. I believe we've finally integrated the URL addition into the AccessRule class.