[VOL-5255] Use all uplink interfaces not only interface 0 at OLT

Raising a new MR after addressing review comments from the original MR.
Link to original MR:
https://gerrit.opencord.org/c/openolt/+/34962
https://gerrit.opencord.org/c/openolt/+/35151

Change-Id: I1231ef0943d6656f1ea0be96a1b2e55c716d9ba6
Signed-off-by: Sridhar Ravindra <sridhar.ravindra@radisys.com>
diff --git a/agent/common/main.cc b/agent/common/main.cc
index 8e0aba8..910475f 100644
--- a/agent/common/main.cc
+++ b/agent/common/main.cc
@@ -140,26 +140,15 @@
     }
     sleep(2);
     // Enable all NNI interfaces.
-#if 0
     for (int i = 0; i < NumNniIf_(); i++) {
-        status = EnableUplinkIf_(i);
+        uint32_t nni_speed = GetNniSpeed_(i);
+        status = SetStateUplinkIf_(i, true);
         if (!status.ok()) {
             // raise alarm to report error in enabling PON
-            pushOltOperInd(i, "nni", "down");
+            pushOltOperInd(i, "nni", "down", nni_speed);
         }
         else
-            pushOltOperInd(i, "nni", "up");
-    }
-#endif
-    //only for nni-65536 mapping to intf_id 0
-    uint32_t nni_speed = GetNniSpeed_(0);
-    status = SetStateUplinkIf_(0, true);
-    if (!status.ok()) {
-        // raise alarm to report error in enabling NNI
-        pushOltOperInd(0, "nni", "down", nni_speed);
-    }
-    else{
-        pushOltOperInd(0, "nni", "up", nni_speed);
+            pushOltOperInd(i, "nni", "up", nni_speed);
     }
 
     for (int i = 1; i < argc; ++i) {