Juniper/py-junos-eznc — pull request #321 by shermdog (2014-12-10 17:12:40+00:00)
Title: Added support for pipe (union) operator in Table keys

Added the ability to use an XPATH pipe (union) operator for Table keys. This feature was already supported with View fields.

The syntax is ```' | '``` (space + pipe + space) between the values. The table will automatically append the item value + / to each element specified in the piped key.

```
key: lldp-local-interface | lldp-local-port-id

lldp.keys()
['me0.0', 'me0.0', 'me0.0', 'me0.0', 'xe-0/1/0.0']
```

The most common use case for this is the implicit "or"; there are situations where keys may have a different name between releases or types of configuration (as is the case with LLDP on ELS and non-ELS switches).

If there are multiple keys (of fields) listed with pipes that are found in the RPC reply they will be added to the list.

```
key: lldp-local-interface | lldp-remote-chassis-id

lldp.keys()
['me0.0', '5c:5e:ab:79:42:80', 'me0.0', '74:99:75:5d:e5:00', 'me0.0', '74:99:75:69:59:00', 'me0.0', '78:fe:3d:6a:67:c0', 'xe-0/1/0.0', 'ac:4b:c8:46:17:c0']
```