+ val props = new ConcurrentHashMap<Node, Map<String, org.opendaylight.controller.sal.core.Property>>()
+
+ val nodes = readAllMDNodes()
+ for (node : nodes.node ) {
+ val fcn = node.getAugmentation(FlowCapableNode)
+ if(fcn != null) {
+ val perNodeProps = fcn.toADNodeProperties(node.id)
+ val perNodePropMap = new ConcurrentHashMap<String, org.opendaylight.controller.sal.core.Property>
+ if(perNodeProps != null ) {
+ for(perNodeProp : perNodeProps) {
+ perNodePropMap.put(perNodeProp.name,perNodeProp)
+ }
+ }
+ props.put(new Node(MD_SAL_TYPE, node.id.toADNodeId),perNodePropMap)
+ }
+ }
+ return props;
+ }
+
+ private def readAllMDNodes() {
+ val nodesRef = InstanceIdentifier.builder(Nodes)
+ .toInstance
+ val reader = TypeSafeDataReader.forReader(dataService)
+ return reader.readOperationalData(nodesRef)
+ }
+
+ private def readAllMDNodeConnectors(org.opendaylight.yang.gen.v1.urn.opendaylight.inventory.rev130819.nodes.Node node) {
+ val nodeRef = InstanceIdentifier.builder(Nodes)
+ .child(org.opendaylight.yang.gen.v1.urn.opendaylight.inventory.rev130819.nodes.Node,new NodeKey(node.id))
+ .toInstance
+ val reader = TypeSafeDataReader.forReader(dataService)
+ return reader.readOperationalData(nodeRef).nodeConnector