VOL-1666: BBSim DHCP Test Case

DHCP IP Addess assignment happens between BBSIM's dhclient, DHCP server
via dhcpl2relay. This is initiated automatically once all ONUs have been
AUTHORIZED.

For the Test Case, we simply verify that all ONUs were assigned an IP
address. We do this using the onos command 'dhcpl2relay-allocations'

A few other minor cleanups were also incorporated
- Dockerfile.onos 1.13.9-rc4 --> 1.13.9
- BBSim hold waits for all ONU's to be AUTHORIZED before proceeding

Change-Id: I863ee241aa904de8267f121fdeb8826298fc1491
diff --git a/tests/atests/common/preprovisioning.py b/tests/atests/common/preprovisioning.py
index 2b077c9..c0b7cc0 100755
--- a/tests/atests/common/preprovisioning.py
+++ b/tests/atests/common/preprovisioning.py
@@ -132,19 +132,25 @@
     def proceed(self):
         logging.info('Pre-provisioning hold')
         onuOnline = 0
-        portType = None
         if self.__oltType == 'ponsim_olt':
             portType = 'PON_OLT'
+            while onuOnline < self.__onuCount:
+                testCaseUtils.send_command_to_voltha_cli(testCaseUtils.get_dir(self, 'log'), 'voltha_olt_device.log', 'device ' +
+                                                         self.__oltDeviceId, 'voltha_olt_ports.log', 'ports')
+                statusLines = testCaseUtils.get_fields_from_grep_command(self, portType, 'voltha_olt_ports.log')
+                lines = statusLines.splitlines()
+                onuOnline = len(lines)
+                time.sleep(5)
+                logging.info('All ONUs now Online!')
         elif self.__oltType == 'openolt':
-            portType = 'ETHERNET_UNI'
-        while onuOnline < self.__onuCount:
-            testCaseUtils.send_command_to_voltha_cli(testCaseUtils.get_dir(self, 'log'), 'voltha_olt_device.log', 'device ' +
-                                                     self.__oltDeviceId, 'voltha_olt_ports.log', 'ports')
-            statusLines = testCaseUtils.get_fields_from_grep_command(self, portType, 'voltha_olt_ports.log')
-            lines = statusLines.splitlines()
-            onuOnline = len(lines)
-            time.sleep(5)
-        logging.info('All ONUs now Online!')
+            while onuOnline < self.__onuCount:
+                testCaseUtils.send_command_to_onos_cli(testCaseUtils.get_dir(self, 'log'),
+                                                       'voltha_onu_auth.log', 'aaa-users')
+                statusLines = testCaseUtils.get_fields_from_grep_command(self, 'AUTHORIZED', 'voltha_onu_auth.log')
+                lines = statusLines.splitlines()
+                onuOnline = len(lines)
+                time.sleep(5)
+            logging.info('All ONUs now AUTHORIZED')
 
 
 def run_test(olt_ip_address, olt_port, olt_type, onu_type, onu_count, log_dir):
@@ -157,7 +163,7 @@
     preprovisioning.check_olt_fields_before_enabling()
     preprovisioning.enable()
     preprovisioning.status_should_be_success_after_enable_command()
+    preprovisioning.proceed()
     preprovisioning.query_devices_after_enabling()
     preprovisioning.check_olt_fields_after_enabling()
     preprovisioning.check_onu_fields_after_enabling()
-    preprovisioning.proceed()