Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add patameter 'type="URL List" or "Category Match"' for panos.objects.CustomUrlCategory #285

Closed
Konakin opened this issue Oct 29, 2020 · 2 comments
Labels

Comments

@Konakin
Copy link

Konakin commented Oct 29, 2020

Hello.

Describe the bug

When i create panos.objects.CustomUrlCategory with parameter "url_value", i have error "panos.errors.PanDeviceXapiError: Black list internal URL -> list 'http://example.ru' is invalid. custom-url-category entry has to be type specified
Black list internal URL -> list is invalid".

Expected behavior

In class panos.objects.CustomUrlCategory need set parameter type (URL List or Category Match).

Current behavior

If i send comand (panos.objects.CustomUrlCategory('Black list internal URL')) without parameter url_value (only with name), i don't have error.

And when i set type "URL List" for UrlCategory in web concole and next send comand with url_value (panos.objects.CustomUrlCategory('Black list internal URL', url_value=ioc)), i don't have error.

Possible solution

Add new parameter call type with value "URL List or Category Match"' for class panos.objects.CustomUrlCategory

Steps to reproduce

code with error:

from panos import firewall
import panos.objects
ioc=['http://example.com']
fw = firewall.Firewall(hostname, api_username=user, api_password=password)
h=panos.objects.CustomUrlCategory()
fw.add(h)
current=panos.objects.CustomUrlCategory.refreshall(h)
temp1=panos.objects.CustomUrlCategory('Black list internal URL', url_value=ioc)
fw.add(temp1)
temp1.create()

Context

I need create CustomUrlCategory, add url, and add CustomUrlCategory in security rule.

Your Environment

@Konakin Konakin added the bug label Oct 29, 2020
@welcome-to-palo-alto-networks

🎉 Thanks for opening your first issue here! Welcome to the community!

@shinmog
Copy link
Collaborator

shinmog commented Aug 2, 2021

The type param was added already as part of #244

@shinmog shinmog closed this as completed Aug 2, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants