Skip to content

Commit

Permalink
update docs
Browse files Browse the repository at this point in the history
  • Loading branch information
greenpau committed Oct 14, 2020
1 parent 0c794aa commit d4c9927
Show file tree
Hide file tree
Showing 2 changed files with 30 additions and 6 deletions.
15 changes: 9 additions & 6 deletions ndmtk/plugins/analytics/toolkit.py
Original file line number Diff line number Diff line change
Expand Up @@ -645,12 +645,15 @@ def get_ospf_neighbors_junos(self,fp):
s = ' '
if part.count(':') == 1:
s = ':'
j = part.index(s)
k = part[:j].strip().lower().replace(' ', '_')
v = part[j:].strip()
if part.count(':') == 1:
v = part[j+1:].strip()
neighbors[i][k] = v
try:
j = part.index(s)
k = part[:j].strip().lower().replace(' ', '_')
v = part[j:].strip()
if part.count(':') == 1:
v = part[j+1:].strip()
neighbors[i][k] = v
except:
pass
continue
self.log.info("unmatched line: %s" % (line))
return neighbors
Expand Down
21 changes: 21 additions & 0 deletions utils/README.analytics.md
Original file line number Diff line number Diff line change
Expand Up @@ -19,10 +19,31 @@ utils/ndmtk-analytics -i ${NDMTK_SRC_DIR} --interface-props --format json -o ${N
utils/ndmtk-analytics --edge-discovery \
--ip-interface-ref ${NDMTK_DST_DIR}/ip_interface.json \
--arp-table-ref ${NDMTK_DST_DIR}/arp_entries.json \
--edge-node-ref ${NDMTK_DST_DIR}/registered_edge_nodes.json \
-o ${NDMTK_DST_DIR}/unregistered_edge_nodes.txt \
--format csv -l 2
```

The `registered_edge_nodes.json` file is in the following format:

```json
[
{
"name": "Verizon MPLS Network",
"networks": [
"10.1.0.0/16"
]
},
{
"name": "AT&T MPLS Network",
"networks": [
"10.2.0.0/16"
]
}
]
```


Additionally, the same utility could be used to bulk upload the data to Elasticsearch:

```bash
Expand Down

0 comments on commit d4c9927

Please sign in to comment.