Junos Automation (Scripting)
Junos Automation (Scripting)

SecurityZoneTable OpTable with NameSpace problem on SRx1500 with HA

‎02-26-2019 04:36 PM
I am trying to parse the security zones on an SRX1500 in an HA cluster and i am using the default SecurityZoneTable definition part of the op Tables shipped with Pyez. **The script is shown below** from jnpr.junos import Device from jnpr.junos.op.securityzone import SecurityZoneTable from pprint import pprint #Create Device Instance dev = Device(host='x.x.x.x',user='xxx',passwd='xxx') dev.open() zones = SecurityZoneTable(dev).get() print(zones) And the output is as shown below SecurityZoneTable:10.74.33.65: 0 items and it failed to parse any element Below is the table definition from the Yaml File SecurityZoneTable: rpc: get-zones-information item: zones-security key: zones-security-zonename view: SecurityZoneView The XML Output from the SRX is as shown below ``` node0 prod Off Yes 1 reth0.1004 nonprod Off Yes 1 reth0.1005 vpn Off Yes 3 st0.1 st0.10 st0.100 junos-host Off Yes 0 {primary:node0} ``` I think that the problem is in the extra NameSpace in the "zones-information" element however i am unable to find a way to remove or handle this namespace. Is there any way to solve this problem.