[CORD-3154] Adding support for host-learning config in fabric ports

Change-Id: Ic7f00d625ecd6fc6e0085a01bfccd3dd5fc64d7b
diff --git a/xos/synchronizer/steps/sync_fabric_port.py b/xos/synchronizer/steps/sync_fabric_port.py
index 793bfd2..bfac5b9 100644
--- a/xos/synchronizer/steps/sync_fabric_port.py
+++ b/xos/synchronizer/steps/sync_fabric_port.py
@@ -43,13 +43,18 @@
 
         # Send port config to onos-fabric netcfg
         data = {
-          "ports": {
-            "%s/%s" % (model.switch.ofId, model.portId) : {
-              "interfaces" : interfaces
+            "ports": {
+                "%s/%s" % (model.switch.ofId, model.portId) : {
+                    "interfaces": interfaces,
+                    "hostLearning": {
+                        "enabled": model.host_learning
+                    }
+                }
             }
-          }
         }
 
+        log.debug("Port %s/%s data" % (model.switch.ofId, model.portId), data=data)
+
         onos = Helpers.get_onos_fabric_service()
 
         url = 'http://%s:%s/onos/v1/network/configuration/' % (onos.rest_hostname, onos.rest_port)
@@ -61,9 +66,9 @@
             raise Exception("Failed to add port %s into ONOS" % model.name)
         else:
             try:
-                print r.json()
+                log.info("Port %s/%s response" % (model.switch.ofId, model.portId), json=r.json())
             except Exception:
-                print r.text
+                log.info("Port %s/%s response" % (model.switch.ofId, model.portId), text=r.text)
 
     def delete_record(self, model):
         log.info("Removing port %s/%s from onos-fabric" % (model.switch.ofId, model.portId))