[ONOS-6623]: Fix parsing of hosts json
Change-Id: I7e612bb9a1b8e5e63894b2698ab40db653ad6473
diff --git a/TestON/tests/CHOTestMonkey/CHOTestMonkey.py b/TestON/tests/CHOTestMonkey/CHOTestMonkey.py
index 5ad6a87..4a3ae04 100644
--- a/TestON/tests/CHOTestMonkey/CHOTestMonkey.py
+++ b/TestON/tests/CHOTestMonkey/CHOTestMonkey.py
@@ -455,11 +455,11 @@
hostInitIndex = 0
for host in hosts:
name = macToName[ host[ 'mac' ] ]
- dpid = host[ 'location' ][ 'elementId' ]
+ dpid = host[ 'locations' ][ 0 ][ 'elementId' ]
device = dpidToDevice[ dpid ]
newHost = Host( hostInitIndex,
name, host[ 'id' ], host[ 'mac' ],
- device, host[ 'location' ][ 'port' ],
+ device, host[ 'locations' ][ 0 ][ 'port' ],
host[ 'vlan' ], host[ 'ipAddresses' ] )
print newHost
main.hosts.append( newHost )