Change reported Hardware Revision
Correct bug when no links are present on OLT

Change-Id: I6f22474f6891a7d00b3c89c220501d06e6cdafb9
diff --git a/voltha/adapters/tibit_olt/tibit_olt.py b/voltha/adapters/tibit_olt/tibit_olt.py
index 1947333..5936107 100644
--- a/voltha/adapters/tibit_olt/tibit_olt.py
+++ b/voltha/adapters/tibit_olt/tibit_olt.py
@@ -342,6 +342,7 @@
             mac_table = [0xB7, 0x0103]
             links = []
             branch_leaf_pairs = [mac_table]
+            overall_rc = False
 
             for pair in branch_leaf_pairs:
                 temp_pair = pair
@@ -352,9 +353,8 @@
                     overall_rc = True
                 else: 
                     log.info('Failed to get valid response for Branch 0x{:X} Leaf 0x{:0>4X} '.format(temp_pair[0], temp_pair[1]))
-                    ack = True
 
-            if mac_table[rc]:
+            if overall_rc and mac_table[rc]:
                 value = mac_table.pop()
                 macLen = 0
                 while (macLen < len(value)):
@@ -391,7 +391,10 @@
                         Operator = {v: k for k, v in RuleOperatorEnum.iteritems()}
 
                         if self.mode.upper()[0] == "G":  # GPON
-                            vssn = "TBIT"
+                            if child_device_name is 'tibit_onu':
+                                vssn = "TBIT"
+                            elif child_device_name is 'adtran_onu':
+                                vssn = "ADTN"
                             link = int(onu_mac_string[4:12], 16)
                             resultOltQueue = "PortIngressRuleResultOLTQueue(unicastvssn=vssn, unicastlink=link)"
                         else:                       # EPON
@@ -602,6 +605,7 @@
                 
         if hw_version[rc]:
             device.hardware_version = hw_version.pop()
+            device.hardware_version = device.hardware_version.replace("FA","")
             if device.hardware_version.endswith(''):
                 device.hardware_version = device.hardware_version[:-1]
         else:
diff --git a/voltha/adapters/tibit_onu/tibit_onu.py b/voltha/adapters/tibit_onu/tibit_onu.py
index 228c0b1..247a868 100644
--- a/voltha/adapters/tibit_onu/tibit_onu.py
+++ b/voltha/adapters/tibit_onu/tibit_onu.py
@@ -571,7 +571,7 @@
 
         if self.mode.upper()[0] == "G":  # GPON
 
-            hw_vers = int(device.hardware_version[2:], 16)
+            hw_vers = int(device.hardware_version, 16)
 
             if hw_vers >= 0x170517:
                 mcastLidx = 0x14bc
@@ -790,6 +790,7 @@
                 
         if hw_version[rc]:
             device.hardware_version = hw_version.pop()
+            device.hardware_version = device.hardware_version.replace("FA","")
             if device.hardware_version.endswith(''):
                 device.hardware_version = device.hardware_version[:-1]
         else: