yup that is what I have, but it still only get the first line back from pools
[serveradmin@RHEL8-20230921 junos-pyezP311]$ cat pyextest.py
#!/home/serveradmin/code/junos-pyezP311/venv/bin/python
from jnpr.junos import Device
from pprint import pprint
from jnpr.junos.utils.start_shell import StartShell
dev = Device(host='10.228.9.75', user='nodebkup', password='s@vem3')
dev.open()
ss=StartShell(dev)
ss.open()
result = ss.run('cli -c "show security nat resource-usage source-pool all"')
ss.close()
print(result)
print("-----------------------------------------------------------------------------")
for line in result:
print(line)
[serveradmin@RHEL8-20230921 junos-pyezP311]$ ./pyextest.py
(False, 'cli -c "show security nat resource-usage source-pool all"\r\r\nnode0:\r\n--------------------------------------------------------------------------\r\n\r\nPAT pools(including address-shared pool) port utilization:\r\n Pool Address Used Avail Total Usage\r\n gos_src_pool_198_169_34_113 1 2059 62453 64512 3%\r\n')
-----------------------------------------------------------------------------
False
cli -c "show security nat resource-usage source-pool all"
node0:
--------------------------------------------------------------------------
PAT pools(including address-shared pool) port utilization:
Pool Address Used Avail Total Usage
gos_src_pool_198_169_34_113 1 2059 62453 64512 3%
------------------------------
ROB MERRITT
------------------------------
Original Message:
Sent: 05-21-2024 05:20
From: Kalle
Subject: Trying to use Pyez with
Hi Rob,
the line: "ss=StartShell(dev) ss.open()" should be
ss=StartShell(dev)
ss.open()
Maybe it was only a typo.
After I changed this, it worked well.
If you still have problem, check that you use the latest pyez
------------------------------
Kalle Andersson
Original Message:
Sent: 05-20-2024 15:31
From: ROB MERRITT
Subject: Trying to use Pyez with
------------------------------
ROB MERRITT
------------------------------