This commit fixes a few issues:
1) The number of arguments to decode in a request to the simulated
OLT was incorrect
2) Adapter type was not set properly when a device is loaded from
DB

Change-Id: I7aa9a5314bd167565372138b0819df9aa744c41b
diff --git a/rw_core/core/logical_device_agent.go b/rw_core/core/logical_device_agent.go
index bda249f..9d05757 100644
--- a/rw_core/core/logical_device_agent.go
+++ b/rw_core/core/logical_device_agent.go
@@ -86,8 +86,10 @@
 			log.Errorw("error-creating-datapath-id", log.Fields{"error": err})
 			return err
 		}
+
 		ld.DatapathId = datapathID
 		ld.Desc = (proto.Clone(switchCap.Desc)).(*ofp.OfpDesc)
+		log.Debugw("Switch-capability", log.Fields{"Desc": ld.Desc, "fromAd": switchCap.Desc})
 		ld.SwitchFeatures = (proto.Clone(switchCap.SwitchFeatures)).(*ofp.OfpSwitchFeatures)
 		ld.Flows = &ofp.Flows{Items: nil}
 		ld.FlowGroups = &ofp.FlowGroups{Items: nil}
@@ -847,7 +849,7 @@
 	}
 	//it is possible that the downstream ports are not created, but the flow_decomposition has already
 	//kicked in. In such scenarios, cut short the processing and return.
-	if len(downstreamPorts) == 0 {
+	if len(downstreamPorts) == 0 || len(upstreamPorts) == 0{
 		return fg
 	}
 	// set up the default flows