Changes made to detect duplicate image tags on docker hub

Change-Id: I4e4943ac71aac02630ef3c5e92d1a5d1dc09043a
diff --git a/TestON/drivers/common/api/dockerapidriver.py b/TestON/drivers/common/api/dockerapidriver.py
index 1d19488..21e2024 100644
--- a/TestON/drivers/common/api/dockerapidriver.py
+++ b/TestON/drivers/common/api/dockerapidriver.py
@@ -54,10 +54,13 @@
         try:
             imageList = list( self.dockerClient.images( name=repo ) )
             imageListToSend = []
+            duplicateTagDetected = 0
             for imageDict in imageList:
                 if imageDict[ 'RepoTags' ] is not None:
+                    if len( imageDict[ 'RepoTags' ] ) > 1:
+                        duplicateTagDetected = 1
                     imageListToSend.append( imageDict['RepoTags'][0].encode('UTF8').split(':')[1] )
-            return imageListToSend
+            return imageListToSend, duplicateTagDetected
         except Exception as e:
             main.log.exception( e )
 
diff --git a/TestON/tests/PLAT/PLATdockertest/PLATdockertest.params b/TestON/tests/PLAT/PLATdockertest/PLATdockertest.params
index 4b1a088..4e66dea 100755
--- a/TestON/tests/PLAT/PLATdockertest/PLATdockertest.params
+++ b/TestON/tests/PLAT/PLATdockertest/PLATdockertest.params
@@ -1,6 +1,6 @@
 <PARAMS>
 
-    <testcases>0,[1,1000,10,110,900,1000]*10,1001</testcases>
+    <testcases>0,[1,1000,10,110,900,1000]*12,1001</testcases>
 
     <DOCKER>
         <repo>onosproject/onos</repo>
diff --git a/TestON/tests/PLAT/PLATdockertest/PLATdockertest.py b/TestON/tests/PLAT/PLATdockertest/PLATdockertest.py
index ebc8d6b..5dc5655 100755
--- a/TestON/tests/PLAT/PLATdockertest/PLATdockertest.py
+++ b/TestON/tests/PLAT/PLATdockertest/PLATdockertest.py
@@ -29,15 +29,22 @@
         Pull all docker images and get a list of image tags
         """
         main.case( "Pull all docker images and get a list of image tags" )
-        main.step( "Pull all ONOS docker images" )
         import os
         DOCKERREPO = main.params[ 'DOCKER' ][ 'repo' ]
         os.system( "docker pull -a " + DOCKERREPO )
         imageTagList = list()
         imageTagCounter = 0
+        duplicateTagDetected = 0
+        imageTagList, duplicateTagDetected = main.ONOSbenchDocker.getListOfImages( DOCKERREPO )
+        stepResult = main.FALSE
+        main.step( "Check for duplicate Tags for a given image" )
+        if not duplicateTagDetected:
+            stepResult = main.TRUE
+        utilities.assert_equals( expect = main.TRUE, actual = stepResult,
+                                    onpass = "no duplicate image tags",
+                                    onfail = "duplicate image tags detected!!" )
         main.step( "Get a list of image tags" )
         stepResult = main.FALSE
-        imageTagList = main.ONOSbenchDocker.getListOfImages( DOCKERREPO )
         if imageTagList is not []:
             main.log.info( "The Image tag list is: " + str(imageTagList) )
             stepResult = main.TRUE
@@ -82,7 +89,7 @@
             main.exit()
             main.cleanup()
         if imageTagCounter > len( imageTagList ):
-            main.log.warn("All images have been tested")
+            main.log.info("All images have been tested")
             main.exit()
             main.cleanup()