fmcapi icon indicating copy to clipboard operation
fmcapi copied to clipboard

ACP Rule URL - Question

Open banzigaga opened this issue 5 years ago • 8 comments

Hello,

Is there a way to add an URL to an ACPRule?

Regards,

Gabor

banzigaga avatar Jun 12 '19 15:06 banzigaga

@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}

parkerbrother1 avatar Jun 17 '19 03:06 parkerbrother1

Ok, thanks @parkerbrother1 !

banzigaga avatar Jun 25 '19 10:06 banzigaga

@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.

daxm avatar Aug 25 '19 18:08 daxm

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.

NetDevAutomate avatar Aug 25 '19 18:08 NetDevAutomate

@karmicgeezer, Or post your code here and I can implement it.

daxm avatar Sep 13 '19 17:09 daxm

Hello, just asking how about this enhancement?

banzigaga avatar Jan 14 '20 15:01 banzigaga

@NetDevAutomate, any status on your "fix" for this?

daxm avatar Mar 19 '20 13:03 daxm

Check out the release 20200615.0. I believe we've finally integrated the URL addition into the AccessRule class.

daxm avatar Jun 15 '20 16:06 daxm