Automation/API Discussions

Threads in this discussion area are now read-only. If you have a question about Automation/API products please visit our product discussions.

cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 
Automation/API Discussions

Threads in this discussion area are now read-only. If you have a question about Automation/API products please visit our product discussions.

About Automation/API Discussions

Threads in this discussion area are now read-only. If you have a question about Automation/API products please visit our product discussions.

Discussions

Ansible and LDAP

Hello,

 

For a PAN device connected with an LDAP server - is it possible to create an address group object containing users added with "Authentication profile: LDAP", using Ansible?

 

Thank you for your time.

 

Best regards.

Update Azure Microsoft NSG using DAG

Just curious if there is another way to do it, without spending money.. 

I am pulling DAG blocked IPs from physical PA boxes using a python script, and then i am thinking of printing the formatted output in csv. This CSV will be used by a powershell s

...

raji_toor by L4 Transporter
  • 1895 Views
  • 0 replies
  • 0 Likes

paramiko hangs on PaloAlto

I have a simple script that used to work but not any longer.  It now hangs during the "load_system_host_keys()".  I have even tried using user parameters, which is commented out, but still it hangs.  Any idea why it can't connect either via ssh key o

...

Resolved! How to parse op(cmd) results

I am new to python. I am able to get results using op() method but not able to display or parse them to use meaningfully.

 

 

fw = pandevice.base.PanDevice('10.10.10.10',api_key='abcdefgh') fwcmd = fw.op(cmd='show global-protect-gateway current-user',xm...

raji_toor by L4 Transporter
  • 5596 Views
  • 4 replies
  • 0 Likes

API in python works but in browser fails

Trying the API in browser. Clicking either submit or the URL give me error "show rule hit count op-command failed'

Tried on 5250 multi-vsys and 220, both on 8.1.8-h5

 

 

 

 

 

https://PA/api/?REST_API_TOKEN=111111111&type=op&cmd=%3Cshow%3E%3Crule-hit-count%...

image.png
raji_toor by L4 Transporter
  • 3405 Views
  • 2 replies
  • 0 Likes

Resolved! updating a portion of the rule - ansible

Wondering if anyone has had any experience updating rules. I have approximately 700 or so rules that i need to add a security profile group to... 

testing the following seems to basically overwrite anything not provided to 'any' 

 

- name: update rules

...

Psabouri by L0 Member
  • 4089 Views
  • 2 replies
  • 0 Likes

XML Config to Ansible

Hi Guys,

 

I need to translate the base 'xml' config to 'ansible'.

 

I cannot locate any concrete information on doing the above:

- Management creation

- Policy definition

- Static Routes

- VPN i.e. Tunnel etc

etc

 

 

Automated Policy Push

I am trying to setup a Policy Push for quiet traffic hours of the day. This would ensure that Admins need only to commit to Panorama and then the push occur during the night. The systems are heavily taxed throughout the day and a Scheduled Policy Pus

...

jeffg12 by L0 Member
  • 2274 Views
  • 0 replies
  • 0 Likes

Running a CLI command from Python using paramiko

I have a very simple python script that uses ssh=paramiko.SSHClient(), ssh.connect (host, 22, user, password), stdin, stdout, stderr=ssh.exec_command(command), and for line in stdout.read().splitlines(): print(line). 

When I set host, user, password a

...

pan.xapi no response

Why am I not getting response when using pan.xapi vs panxapi.py?

 

from python interpretor:

 

api_sess = pan.xapi.PanXapi(hostname="10.209.32.33",api_username="myusername", api_password="mypassword",api_key='mykey')

 

api_sess..show(xpath = "/config/device

...

bdugger by L0 Member
  • 4348 Views
  • 2 replies
  • 0 Likes

pandevice help with Panorama

I did some work with pandevice and I am able to create new configuration  in a Firewall, but struggling working with the existing Panorama configuration. Can you please help me with ideas for the below.

 

I need to move a firewall between panorama appl

...

batd2 by L4 Transporter
  • 2076 Views
  • 0 replies
  • 0 Likes
  • 1031 Posts
  • 70 Subscriptions