diff --git a/test/csit/tests/dcaegen2/testcases/resources/DMaaP.py b/test/csit/tests/dcaegen2/testcases/resources/DMaaP.py
index 63e4e8c..db59557 100644
--- a/test/csit/tests/dcaegen2/testcases/resources/DMaaP.py
+++ b/test/csit/tests/dcaegen2/testcases/resources/DMaaP.py
@@ -1,423 +1,423 @@
-'''
-Created on Aug 15, 2017
-
-@author: sw6830
-'''
-import os
-import posixpath
-import BaseHTTPServer
-import urllib
-import urlparse
-import cgi, sys, shutil, mimetypes
-from jsonschema import validate
-import jsonschema, json
-import DcaeVariables
-import SimpleHTTPServer
-from robot.api import logger
-
-
-try:
-    from cStringIO import StringIO
-except ImportError:
-    from StringIO import StringIO
-
-EvtSchema = None
-DMaaPHttpd = None
-
-
-def cleanUpEvent():
-    sz = DcaeVariables.VESEventQ.qsize()
-    for i in range(sz):
-        try:
-            self.evtQueue.get_nowait()
-        except:
-            pass
-
-def enqueEvent(evt):
-    if DcaeVariables.VESEventQ != None:
-        try:
-            DcaeVariables.VESEventQ.put(evt)
-            if DcaeVariables.IsRobotRun:
-                logger.console("DMaaP Event enqued - size=" + str(len(evt)))
-            else:
-                print ("DMaaP Event enqueued - size=" + str(len(evt)))
-            return True
-        except Exception as e:
-            print (str(e))
-            return False
-    return False
-            
-def dequeEvent(waitSec=25):
-    if DcaeVariables.IsRobotRun:
-        logger.console("Enter DequeEvent")
-    try:
-        evt = DcaeVariables.VESEventQ.get(True, waitSec)
-        if DcaeVariables.IsRobotRun:
-            logger.console("DMaaP Event dequeued - size=" + str(len(evt)))
-        else:
-            print("DMaaP Event dequeued - size=" + str(len(evt)))
-        return evt
-    except Exception as e:
-        if DcaeVariables.IsRobotRun:
-            logger.console(str(e))
-            logger.console("DMaaP Event dequeue timeout")
-        else:
-            print("DMaaP Event dequeue timeout")
-        return None
- 
-class DMaaPHandler(BaseHTTPServer.BaseHTTPRequestHandler):
-      
-    def do_PUT(self):
-        self.send_response(405)
-        return
-        
-    def do_POST(self):
-        
-        respCode = 0
-        # Parse the form data posted
-        '''
-        form = cgi.FieldStorage(
-            fp=self.rfile, 
-            headers=self.headers,
-            environ={'REQUEST_METHOD':'POST',
-                     'CONTENT_TYPE':self.headers['Content-Type'],
-                     })
-        
-        
-        form = cgi.FieldStorage(
-        fp=self.rfile,
-        headers=self.headers,
-        environ={"REQUEST_METHOD": "POST"})
-
-        for item in form.list:
-            print "%s=%s" % (item.name, item.value)
-            
-        '''
-        
-        if 'POST' not in self.requestline:
-            respCode = 405
-            
-        '''
-        if respCode == 0:
-            if '/eventlistener/v5' not in self.requestline and '/eventlistener/v5/eventBatch' not in self.requestline and \
-                        '/eventlistener/v5/clientThrottlingState' not in self.requestline:
-                respCode = 404
-         
-        
-        if respCode == 0:
-            if 'Y29uc29sZTpaakprWWpsbE1qbGpNVEkyTTJJeg==' not in str(self.headers):
-                respCode = 401
-        '''  
-        
-        if respCode == 0:
-            content_len = int(self.headers.getheader('content-length', 0))
-            post_body = self.rfile.read(content_len)
-            
-            if DcaeVariables.IsRobotRun:
-                logger.console("\n" + "DMaaP Receive Event:\n" + post_body)
-            else:
-                print("\n" + "DMaaP Receive Event:")
-                print (post_body)
-            
-            indx = post_body.index("{")
-            if indx != 0:
-                post_body = post_body[indx:]
-            
-            if enqueEvent(post_body) == False:
-                print "enque event fails"
-                   
-            global EvtSchema
-            try:
-                if EvtSchema == None:
-                    with open(DcaeVariables.CommonEventSchemaV5) as file:
-                        EvtSchema = json.load(file)
-                decoded_body = json.loads(post_body)
-                jsonschema.validate(decoded_body, EvtSchema)
-            except:
-                respCode = 400
-        
-        # Begin the response
-        if DcaeVariables.IsRobotRun == False:
-            print ("Response Message:")
-        
-        '''
-        {
-          "200" : {
-            "description" : "Success",
-            "schema" : {
-              "$ref" : "#/definitions/DR_Pub"
-            }
-        }
-        
-        rspStr = "{'responses' : {'200' : {'description' : 'Success'}}}"
-        rspStr1 = "{'count': 1, 'serverTimeMs': 3}"
-
-        '''
-        
-        if respCode == 0:
-            if 'clientThrottlingState' in self.requestline:
-                self.send_response(204)
-            else:
-                self.send_response(200)
-                self.send_header('Content-Type', 'application/json')
-                self.end_headers()
-                #self.wfile.write("{'responses' : {'200' : {'description' : 'Success'}}}")
-                self.wfile.write("{'count': 1, 'serverTimeMs': 3}")
-                self.wfile.close()
-        else:
-            self.send_response(respCode)
-        
-        '''
-        self.end_headers()
-        self.wfile.write('Client: %s\n' % str(self.client_address))
-        self.wfile.write('User-agent: %s\n' % str(self.headers['user-agent']))
-        self.wfile.write('Path: %s\n' % self.path)
-        self.wfile.write('Form data:\n')
-        self.wfile.close()
-
-        # Echo back information about what was posted in the form
-        for field in form.keys():
-            field_item = form[field]
-            if field_item.filename:
-                # The field contains an uploaded file
-                file_data = field_item.file.read()
-                file_len = len(file_data)
-                del file_data
-                self.wfile.write('\tUploaded %s as "%s" (%d bytes)\n' % \
-                        (field, field_item.filename, file_len))
-            else:
-                # Regular form value
-                self.wfile.write('\t%s=%s\n' % (field, form[field].value))
-        '''
-        return
-    
-    
-    def do_GET(self):
-        """Serve a GET request."""
-        f = self.send_head()
-        if f:
-            try:
-                self.copyfile(f, self.wfile)
-            finally:
-                f.close()
-
-    def do_HEAD(self):
-        """Serve a HEAD request."""
-        f = self.send_head()
-        if f:
-            f.close()
-
-    def send_head(self):
-        """Common code for GET and HEAD commands.
-
-        This sends the response code and MIME headers.
-
-        Return value is either a file object (which has to be copied
-        to the outputfile by the caller unless the command was HEAD,
-        and must be closed by the caller under all circumstances), or
-        None, in which case the caller has nothing further to do.
-
-        """
-        path = self.translate_path(self.path)
-        f = None
-        if os.path.isdir(path):
-            parts = urlparse.urlsplit(self.path)
-            if not parts.path.endswith('/'):
-                # redirect browser - doing basically what apache does
-                self.send_response(301)
-                new_parts = (parts[0], parts[1], parts[2] + '/',
-                             parts[3], parts[4])
-                new_url = urlparse.urlunsplit(new_parts)
-                self.send_header("Location", new_url)
-                self.end_headers()
-                return None
-            for index in "index.html", "index.htm":
-                index = os.path.join(path, index)
-                if os.path.exists(index):
-                    path = index
-                    break
-            else:
-                return self.list_directory(path)
-        ctype = self.guess_type(path)
-        try:
-            # Always read in binary mode. Opening files in text mode may cause
-            # newline translations, making the actual size of the content
-            # transmitted *less* than the content-length!
-            f = open(path, 'rb')
-        except IOError:
-            self.send_error(404, "File not found")
-            return None
-        try:
-            self.send_response(200)
-            self.send_header("Content-type", ctype)
-            fs = os.fstat(f.fileno())
-            self.send_header("Content-Length", str(fs[6]))
-            self.send_header("Last-Modified", self.date_time_string(fs.st_mtime))
-            self.end_headers()
-            return f
-        except:
-            f.close()
-            raise
-
-    def list_directory(self, path):
-        """Helper to produce a directory listing (absent index.html).
-
-        Return value is either a file object, or None (indicating an
-        error).  In either case, the headers are sent, making the
-        interface the same as for send_head().
-
-        """
-        try:
-            list = os.listdir(path)
-        except os.error:
-            self.send_error(404, "No permission to list directory")
-            return None
-        list.sort(key=lambda a: a.lower())
-        f = StringIO()
-        displaypath = cgi.escape(urllib.unquote(self.path))
-        f.write('<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 3.2 Final//EN">')
-        f.write("<html>\n<title>Directory listing for %s</title>\n" % displaypath)
-        f.write("<body>\n<h2>Directory listing for %s</h2>\n" % displaypath)
-        f.write("<hr>\n<ul>\n")
-        for name in list:
-            fullname = os.path.join(path, name)
-            displayname = linkname = name
-            # Append / for directories or @ for symbolic links
-            if os.path.isdir(fullname):
-                displayname = name + "/"
-                linkname = name + "/"
-            if os.path.islink(fullname):
-                displayname = name + "@"
-                # Note: a link to a directory displays with @ and links with /
-            f.write('<li><a href="%s">%s</a>\n'
-                    % (urllib.quote(linkname), cgi.escape(displayname)))
-        f.write("</ul>\n<hr>\n</body>\n</html>\n")
-        length = f.tell()
-        f.seek(0)
-        self.send_response(200)
-        encoding = sys.getfilesystemencoding()
-        self.send_header("Content-type", "text/html; charset=%s" % encoding)
-        self.send_header("Content-Length", str(length))
-        self.end_headers()
-        return f
-
-    def translate_path(self, path):
-        """Translate a /-separated PATH to the local filename syntax.
-
-        Components that mean special things to the local file system
-        (e.g. drive or directory names) are ignored.  (XXX They should
-        probably be diagnosed.)
-
-        """
-        # abandon query parameters
-        path = path.split('?',1)[0]
-        path = path.split('#',1)[0]
-        # Don't forget explicit trailing slash when normalizing. Issue17324
-        trailing_slash = path.rstrip().endswith('/')
-        path = posixpath.normpath(urllib.unquote(path))
-        words = path.split('/')
-        words = filter(None, words)
-        path = os.getcwd()
-        for word in words:
-            if os.path.dirname(word) or word in (os.curdir, os.pardir):
-                # Ignore components that are not a simple file/directory name
-                continue
-            path = os.path.join(path, word)
-        if trailing_slash:
-            path += '/'
-        return path
-
-    def copyfile(self, source, outputfile):
-        """Copy all data between two file objects.
-
-        The SOURCE argument is a file object open for reading
-        (or anything with a read() method) and the DESTINATION
-        argument is a file object open for writing (or
-        anything with a write() method).
-
-        The only reason for overriding this would be to change
-        the block size or perhaps to replace newlines by CRLF
-        -- note however that this the default server uses this
-        to copy binary data as well.
-
-        """
-        shutil.copyfileobj(source, outputfile)
-
-    def guess_type(self, path):
-        """Guess the type of a file.
-
-        Argument is a PATH (a filename).
-
-        Return value is a string of the form type/subtype,
-        usable for a MIME Content-type header.
-
-        The default implementation looks the file's extension
-        up in the table self.extensions_map, using application/octet-stream
-        as a default; however it would be permissible (if
-        slow) to look inside the data to make a better guess.
-
-        """
-
-        base, ext = posixpath.splitext(path)
-        if ext in self.extensions_map:
-            return self.extensions_map[ext]
-        ext = ext.lower()
-        if ext in self.extensions_map:
-            return self.extensions_map[ext]
-        else:
-            return self.extensions_map['']
-
-    if not mimetypes.inited:
-        mimetypes.init() # try to read system mime.types
-    extensions_map = mimetypes.types_map.copy()
-    extensions_map.update({
-        '': 'application/octet-stream', # Default
-        '.py': 'text/plain',
-        '.c': 'text/plain',
-        '.h': 'text/plain',
-        })
-
-def test(HandlerClass = DMaaPHandler,
-         ServerClass = BaseHTTPServer.HTTPServer, protocol="HTTP/1.0", port=3904):
-    print "Load event schema file: " + DcaeVariables.CommonEventSchemaV5
-    with open(DcaeVariables.CommonEventSchemaV5) as file:
-        global EvtSchema
-        EvtSchema = json.load(file)
-        
-    server_address = ('', port)
-
-    HandlerClass.protocol_version = protocol
-    httpd = ServerClass(server_address, HandlerClass)
-    
-    global DMaaPHttpd
-    DMaaPHttpd = httpd
-    DcaeVariables.HTTPD = httpd
-
-    sa = httpd.socket.getsockname()
-    print "Serving HTTP on", sa[0], "port", sa[1], "..."
-    #httpd.serve_forever()
-
-def _main_ (HandlerClass = DMaaPHandler,
-         ServerClass = BaseHTTPServer.HTTPServer, protocol="HTTP/1.0"):
-    
-    if sys.argv[1:]:
-        port = int(sys.argv[1])
-    else:
-        port = 3904
-    
-    print "Load event schema file: " + DcaeVariables.CommonEventSchemaV5
-    with open(DcaeVariables.CommonEventSchemaV5) as file:
-        global EvtSchema
-        EvtSchema = json.load(file)
-        
-    server_address = ('', port)
-
-    HandlerClass.protocol_version = protocol
-    httpd = ServerClass(server_address, HandlerClass)
-
-    sa = httpd.socket.getsockname()
-    print "Serving HTTP on", sa[0], "port", sa[1], "..."
-    httpd.serve_forever()
-    
-if __name__ == '__main__':
+'''
+Created on Aug 15, 2017
+
+@author: sw6830
+'''
+import os
+import posixpath
+import BaseHTTPServer
+import urllib
+import urlparse
+import cgi, sys, shutil, mimetypes
+from jsonschema import validate
+import jsonschema, json
+import DcaeVariables
+import SimpleHTTPServer
+from robot.api import logger
+
+
+try:
+    from cStringIO import StringIO
+except ImportError:
+    from StringIO import StringIO
+
+EvtSchema = None
+DMaaPHttpd = None
+
+
+def cleanUpEvent():
+    sz = DcaeVariables.VESEventQ.qsize()
+    for i in range(sz):
+        try:
+            self.evtQueue.get_nowait()
+        except:
+            pass
+
+def enqueEvent(evt):
+    if DcaeVariables.VESEventQ != None:
+        try:
+            DcaeVariables.VESEventQ.put(evt)
+            if DcaeVariables.IsRobotRun:
+                logger.console("DMaaP Event enqued - size=" + str(len(evt)))
+            else:
+                print ("DMaaP Event enqueued - size=" + str(len(evt)))
+            return True
+        except Exception as e:
+            print (str(e))
+            return False
+    return False
+            
+def dequeEvent(waitSec=25):
+    if DcaeVariables.IsRobotRun:
+        logger.console("Enter DequeEvent")
+    try:
+        evt = DcaeVariables.VESEventQ.get(True, waitSec)
+        if DcaeVariables.IsRobotRun:
+            logger.console("DMaaP Event dequeued - size=" + str(len(evt)))
+        else:
+            print("DMaaP Event dequeued - size=" + str(len(evt)))
+        return evt
+    except Exception as e:
+        if DcaeVariables.IsRobotRun:
+            logger.console(str(e))
+            logger.console("DMaaP Event dequeue timeout")
+        else:
+            print("DMaaP Event dequeue timeout")
+        return None
+ 
+class DMaaPHandler(BaseHTTPServer.BaseHTTPRequestHandler):
+      
+    def do_PUT(self):
+        self.send_response(405)
+        return
+        
+    def do_POST(self):
+        
+        respCode = 0
+        # Parse the form data posted
+        '''
+        form = cgi.FieldStorage(
+            fp=self.rfile, 
+            headers=self.headers,
+            environ={'REQUEST_METHOD':'POST',
+                     'CONTENT_TYPE':self.headers['Content-Type'],
+                     })
+        
+        
+        form = cgi.FieldStorage(
+        fp=self.rfile,
+        headers=self.headers,
+        environ={"REQUEST_METHOD": "POST"})
+
+        for item in form.list:
+            print "%s=%s" % (item.name, item.value)
+            
+        '''
+        
+        if 'POST' not in self.requestline:
+            respCode = 405
+            
+        '''
+        if respCode == 0:
+            if '/eventlistener/v5' not in self.requestline and '/eventlistener/v5/eventBatch' not in self.requestline and \
+                        '/eventlistener/v5/clientThrottlingState' not in self.requestline:
+                respCode = 404
+         
+        
+        if respCode == 0:
+            if 'Y29uc29sZTpaakprWWpsbE1qbGpNVEkyTTJJeg==' not in str(self.headers):
+                respCode = 401
+        '''  
+        
+        if respCode == 0:
+            content_len = int(self.headers.getheader('content-length', 0))
+            post_body = self.rfile.read(content_len)
+            
+            if DcaeVariables.IsRobotRun:
+                logger.console("\n" + "DMaaP Receive Event:\n" + post_body)
+            else:
+                print("\n" + "DMaaP Receive Event:")
+                print (post_body)
+            
+            indx = post_body.index("{")
+            if indx != 0:
+                post_body = post_body[indx:]
+            
+            if enqueEvent(post_body) == False:
+                print "enque event fails"
+                   
+            global EvtSchema
+            try:
+                if EvtSchema == None:
+                    with open(DcaeVariables.CommonEventSchemaV5) as file:
+                        EvtSchema = json.load(file)
+                decoded_body = json.loads(post_body)
+                jsonschema.validate(decoded_body, EvtSchema)
+            except:
+                respCode = 400
+        
+        # Begin the response
+        if DcaeVariables.IsRobotRun == False:
+            print ("Response Message:")
+        
+        '''
+        {
+          "200" : {
+            "description" : "Success",
+            "schema" : {
+              "$ref" : "#/definitions/DR_Pub"
+            }
+        }
+        
+        rspStr = "{'responses' : {'200' : {'description' : 'Success'}}}"
+        rspStr1 = "{'count': 1, 'serverTimeMs': 3}"
+
+        '''
+        
+        if respCode == 0:
+            if 'clientThrottlingState' in self.requestline:
+                self.send_response(204)
+            else:
+                self.send_response(200)
+                self.send_header('Content-Type', 'application/json')
+                self.end_headers()
+                #self.wfile.write("{'responses' : {'200' : {'description' : 'Success'}}}")
+                self.wfile.write("{'count': 1, 'serverTimeMs': 3}")
+                self.wfile.close()
+        else:
+            self.send_response(respCode)
+        
+        '''
+        self.end_headers()
+        self.wfile.write('Client: %s\n' % str(self.client_address))
+        self.wfile.write('User-agent: %s\n' % str(self.headers['user-agent']))
+        self.wfile.write('Path: %s\n' % self.path)
+        self.wfile.write('Form data:\n')
+        self.wfile.close()
+
+        # Echo back information about what was posted in the form
+        for field in form.keys():
+            field_item = form[field]
+            if field_item.filename:
+                # The field contains an uploaded file
+                file_data = field_item.file.read()
+                file_len = len(file_data)
+                del file_data
+                self.wfile.write('\tUploaded %s as "%s" (%d bytes)\n' % \
+                        (field, field_item.filename, file_len))
+            else:
+                # Regular form value
+                self.wfile.write('\t%s=%s\n' % (field, form[field].value))
+        '''
+        return
+    
+    
+    def do_GET(self):
+        """Serve a GET request."""
+        f = self.send_head()
+        if f:
+            try:
+                self.copyfile(f, self.wfile)
+            finally:
+                f.close()
+
+    def do_HEAD(self):
+        """Serve a HEAD request."""
+        f = self.send_head()
+        if f:
+            f.close()
+
+    def send_head(self):
+        """Common code for GET and HEAD commands.
+
+        This sends the response code and MIME headers.
+
+        Return value is either a file object (which has to be copied
+        to the outputfile by the caller unless the command was HEAD,
+        and must be closed by the caller under all circumstances), or
+        None, in which case the caller has nothing further to do.
+
+        """
+        path = self.translate_path(self.path)
+        f = None
+        if os.path.isdir(path):
+            parts = urlparse.urlsplit(self.path)
+            if not parts.path.endswith('/'):
+                # redirect browser - doing basically what apache does
+                self.send_response(301)
+                new_parts = (parts[0], parts[1], parts[2] + '/',
+                             parts[3], parts[4])
+                new_url = urlparse.urlunsplit(new_parts)
+                self.send_header("Location", new_url)
+                self.end_headers()
+                return None
+            for index in "index.html", "index.htm":
+                index = os.path.join(path, index)
+                if os.path.exists(index):
+                    path = index
+                    break
+            else:
+                return self.list_directory(path)
+        ctype = self.guess_type(path)
+        try:
+            # Always read in binary mode. Opening files in text mode may cause
+            # newline translations, making the actual size of the content
+            # transmitted *less* than the content-length!
+            f = open(path, 'rb')
+        except IOError:
+            self.send_error(404, "File not found")
+            return None
+        try:
+            self.send_response(200)
+            self.send_header("Content-type", ctype)
+            fs = os.fstat(f.fileno())
+            self.send_header("Content-Length", str(fs[6]))
+            self.send_header("Last-Modified", self.date_time_string(fs.st_mtime))
+            self.end_headers()
+            return f
+        except:
+            f.close()
+            raise
+
+    def list_directory(self, path):
+        """Helper to produce a directory listing (absent index.html).
+
+        Return value is either a file object, or None (indicating an
+        error).  In either case, the headers are sent, making the
+        interface the same as for send_head().
+
+        """
+        try:
+            list = os.listdir(path)
+        except os.error:
+            self.send_error(404, "No permission to list directory")
+            return None
+        list.sort(key=lambda a: a.lower())
+        f = StringIO()
+        displaypath = cgi.escape(urllib.unquote(self.path))
+        f.write('<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 3.2 Final//EN">')
+        f.write("<html>\n<title>Directory listing for %s</title>\n" % displaypath)
+        f.write("<body>\n<h2>Directory listing for %s</h2>\n" % displaypath)
+        f.write("<hr>\n<ul>\n")
+        for name in list:
+            fullname = os.path.join(path, name)
+            displayname = linkname = name
+            # Append / for directories or @ for symbolic links
+            if os.path.isdir(fullname):
+                displayname = name + "/"
+                linkname = name + "/"
+            if os.path.islink(fullname):
+                displayname = name + "@"
+                # Note: a link to a directory displays with @ and links with /
+            f.write('<li><a href="%s">%s</a>\n'
+                    % (urllib.quote(linkname), cgi.escape(displayname)))
+        f.write("</ul>\n<hr>\n</body>\n</html>\n")
+        length = f.tell()
+        f.seek(0)
+        self.send_response(200)
+        encoding = sys.getfilesystemencoding()
+        self.send_header("Content-type", "text/html; charset=%s" % encoding)
+        self.send_header("Content-Length", str(length))
+        self.end_headers()
+        return f
+
+    def translate_path(self, path):
+        """Translate a /-separated PATH to the local filename syntax.
+
+        Components that mean special things to the local file system
+        (e.g. drive or directory names) are ignored.  (XXX They should
+        probably be diagnosed.)
+
+        """
+        # abandon query parameters
+        path = path.split('?',1)[0]
+        path = path.split('#',1)[0]
+        # Don't forget explicit trailing slash when normalizing. Issue17324
+        trailing_slash = path.rstrip().endswith('/')
+        path = posixpath.normpath(urllib.unquote(path))
+        words = path.split('/')
+        words = filter(None, words)
+        path = os.getcwd()
+        for word in words:
+            if os.path.dirname(word) or word in (os.curdir, os.pardir):
+                # Ignore components that are not a simple file/directory name
+                continue
+            path = os.path.join(path, word)
+        if trailing_slash:
+            path += '/'
+        return path
+
+    def copyfile(self, source, outputfile):
+        """Copy all data between two file objects.
+
+        The SOURCE argument is a file object open for reading
+        (or anything with a read() method) and the DESTINATION
+        argument is a file object open for writing (or
+        anything with a write() method).
+
+        The only reason for overriding this would be to change
+        the block size or perhaps to replace newlines by CRLF
+        -- note however that this the default server uses this
+        to copy binary data as well.
+
+        """
+        shutil.copyfileobj(source, outputfile)
+
+    def guess_type(self, path):
+        """Guess the type of a file.
+
+        Argument is a PATH (a filename).
+
+        Return value is a string of the form type/subtype,
+        usable for a MIME Content-type header.
+
+        The default implementation looks the file's extension
+        up in the table self.extensions_map, using application/octet-stream
+        as a default; however it would be permissible (if
+        slow) to look inside the data to make a better guess.
+
+        """
+
+        base, ext = posixpath.splitext(path)
+        if ext in self.extensions_map:
+            return self.extensions_map[ext]
+        ext = ext.lower()
+        if ext in self.extensions_map:
+            return self.extensions_map[ext]
+        else:
+            return self.extensions_map['']
+
+    if not mimetypes.inited:
+        mimetypes.init() # try to read system mime.types
+    extensions_map = mimetypes.types_map.copy()
+    extensions_map.update({
+        '': 'application/octet-stream', # Default
+        '.py': 'text/plain',
+        '.c': 'text/plain',
+        '.h': 'text/plain',
+        })
+
+def test(HandlerClass = DMaaPHandler,
+         ServerClass = BaseHTTPServer.HTTPServer, protocol="HTTP/1.0", port=3904):
+    print "Load event schema file: " + DcaeVariables.CommonEventSchemaV5
+    with open(DcaeVariables.CommonEventSchemaV5) as file:
+        global EvtSchema
+        EvtSchema = json.load(file)
+        
+    server_address = ('', port)
+
+    HandlerClass.protocol_version = protocol
+    httpd = ServerClass(server_address, HandlerClass)
+    
+    global DMaaPHttpd
+    DMaaPHttpd = httpd
+    DcaeVariables.HTTPD = httpd
+
+    sa = httpd.socket.getsockname()
+    print "Serving HTTP on", sa[0], "port", sa[1], "..."
+    #httpd.serve_forever()
+
+def _main_ (HandlerClass = DMaaPHandler,
+         ServerClass = BaseHTTPServer.HTTPServer, protocol="HTTP/1.0"):
+    
+    if sys.argv[1:]:
+        port = int(sys.argv[1])
+    else:
+        port = 3904
+    
+    print "Load event schema file: " + DcaeVariables.CommonEventSchemaV5
+    with open(DcaeVariables.CommonEventSchemaV5) as file:
+        global EvtSchema
+        EvtSchema = json.load(file)
+        
+    server_address = ('', port)
+
+    HandlerClass.protocol_version = protocol
+    httpd = ServerClass(server_address, HandlerClass)
+
+    sa = httpd.socket.getsockname()
+    print "Serving HTTP on", sa[0], "port", sa[1], "..."
+    httpd.serve_forever()
+    
+if __name__ == '__main__':
     _main_()
\ No newline at end of file
diff --git a/test/csit/tests/dcaegen2/testcases/resources/DcaeLibrary.py b/test/csit/tests/dcaegen2/testcases/resources/DcaeLibrary.py
index 0242ad7..e581f1b 100644
--- a/test/csit/tests/dcaegen2/testcases/resources/DcaeLibrary.py
+++ b/test/csit/tests/dcaegen2/testcases/resources/DcaeLibrary.py
@@ -1,159 +1,159 @@
-'''
-Created on Aug 18, 2017
-
-@author: sw6830
-'''
-from robot.api import logger
-from Queue import Queue
-import uuid, time, datetime,json, threading,os, platform, subprocess,paramiko
-import DcaeVariables
-import DMaaP
-
-class DcaeLibrary(object):
-    
-    def __init__(self):
-        pass 
-    
-    def setup_dmaap_server(self, portNum=3904):
-        if DcaeVariables.HttpServerThread != None:
-            DMaaP.cleanUpEvent()
-            logger.console("Clean up event from event queue before test")
-            logger.info("DMaaP Server already started")
-            return "true"
-        
-        DcaeVariables.IsRobotRun = True
-        DMaaP.test(port=portNum)
-        try:
-            DcaeVariables.VESEventQ = Queue()
-            DcaeVariables.HttpServerThread = threading.Thread(name='DMAAP_HTTPServer', target=DMaaP.DMaaPHttpd.serve_forever)
-            DcaeVariables.HttpServerThread.start()
-            logger.console("DMaaP Mockup Sever started")
-            time.sleep(2)
-            return "true"
-        except Exception as e:
-            print (str(e))
-            return "false"
-            
-    def shutdown_dmaap(self):
-        if DcaeVariables.HTTPD != None:
-            DcaeVariables.HTTPD.shutdown()
-            logger.console("DMaaP Server shut down")
-            time.sleep(3)
-            return "true"
-        else:
-            return "false"
-            
-    def cleanup_ves_events(self):
-        if DcaeVariables.HttpServerThread != None:
-            DMaaP.cleanUpEvent()
-            logger.console("DMaaP event queue is cleaned up")
-            return "true"
-        logger.console("DMaaP server not started yet")
-        return "false"
-    
-    def enable_vesc_https_auth(self):
-        if 'Windows' in platform.system():
-            try:
-                client = paramiko.SSHClient()
-                client.load_system_host_keys()
-                #client.set_missing_host_key_policy(paramiko.WarningPolicy)
-                client.set_missing_host_key_policy(paramiko.AutoAddPolicy())
-                
-                client.connect(os.environ['CSIT_IP'], port=22, username=os.environ['CSIT_USER'], password=os.environ['CSIT_PD'])
-                stdin, stdout, stderr = client.exec_command('%{WORKSPACE}/test/csit/tests/dcaegen2/testcases/resources/vesc_enable_https_auth.sh')
-                logger.console(stdout.read())    
-            finally:
-                client.close()
-            return
-        ws = os.environ['WORKSPACE']
-        script2run = ws + "/test/csit/tests/dcaegen2/testcases/resources/vesc_enable_https_auth.sh"
-        logger.info("Running script: " + script2run)
-        logger.console("Running script: " + script2run)
-        subprocess.call(script2run)
-        time.sleep(5)
-        return  
-                   
-    def dmaap_message_receive(self, evtobj, action='contain'):
-        
-        evtStr = DMaaP.dequeEvent()
-        while evtStr != None:
-            logger.console("DMaaP receive VES Event:\n" + evtStr)
-            if action == 'contain':
-                if evtobj in evtStr:
-                    logger.info("DMaaP Receive Expected Publish Event:\n" + evtStr)
-                    return 'true'
-            if action == 'sizematch':
-                if len(evtobj) == len(evtStr):
-                    return 'true'
-            if action == 'dictmatch':
-                evtDict = json.loads(evtStr)
-                if cmp(evtobj, evtDict) == 0:
-                    return 'true'
-            evtStr = DMaaP.dequeEvent()
-        return 'false'
-    
-    def create_header_from_string(self, dictStr):
-        logger.info("Enter create_header_from_string: dictStr")
-        return dict(u.split("=") for u in dictStr.split(","))
-    
-    def is_json_empty(self, resp):
-        logger.info("Enter is_json_empty: resp.text: " + resp.text)
-        if resp.text == None or len(resp.text) < 2:
-            return 'True'
-        return 'False'
-    
-    def Generate_UUID(self):
-        """generate a uuid"""
-        return uuid.uuid4()
-    
-    def get_json_value_list(self, jsonstr, keyval):
-        logger.info("Enter Get_Json_Key_Value_List")
-        if jsonstr == None or len(jsonstr) < 2:
-            logger.info("No Json data found")
-            return []
-        try:
-            data = json.loads(jsonstr)   
-            nodelist = []
-            for item in data:
-                nodelist.append(item[keyval])
-            return nodelist
-        except Exception as e:
-            logger.info("Json data parsing fails")
-            print str(e)
-            return []
-        
-    def generate_MilliTimestamp_UUID(self):
-        """generate a millisecond timestamp uuid"""
-        then = datetime.datetime.now()
-        return int(time.mktime(then.timetuple())*1e3 + then.microsecond/1e3)
-    
-    def test (self):
-        import json
-        from pprint import pprint
-
-        with open('robot/assets/dcae/ves_volte_single_fault_event.json') as data_file:    
-            data = json.load(data_file)
-
-        data['event']['commonEventHeader']['version'] = '5.0'
-        pprint(data)
-
-
-
-if __name__ == '__main__':
-    '''
-    dictStr = "action=getTable,Accept=application/json,Content-Type=application/json,X-FromAppId=1234908903284"
-    cls = DcaeLibrary()
-    #dict = cls.create_header_from_string(dictStr)
-    #print str(dict)
-    jsonStr = "[{'Node': 'onapfcnsl00', 'CheckID': 'serfHealth', 'Name': 'Serf Health Status', 'ServiceName': '', 'Notes': '', 'ModifyIndex': 6, 'Status': 'passing', 'ServiceID': '', 'ServiceTags': [], 'Output': 'Agent alive and reachable', 'CreateIndex': 6}]"
-    lsObj = cls.get_json_value_list(jsonStr, 'Status')
-    print lsObj
-    '''
-    
-    lib = DcaeLibrary()
-    lib.enable_vesc_https_auth()
-    
-    ret = lib.setup_dmaap_server()
-    print ret
-    time.sleep(100000)
-    
+'''
+Created on Aug 18, 2017
+
+@author: sw6830
+'''
+from robot.api import logger
+from Queue import Queue
+import uuid, time, datetime,json, threading,os, platform, subprocess,paramiko
+import DcaeVariables
+import DMaaP
+
+class DcaeLibrary(object):
+    
+    def __init__(self):
+        pass 
+    
+    def setup_dmaap_server(self, portNum=3904):
+        if DcaeVariables.HttpServerThread != None:
+            DMaaP.cleanUpEvent()
+            logger.console("Clean up event from event queue before test")
+            logger.info("DMaaP Server already started")
+            return "true"
+        
+        DcaeVariables.IsRobotRun = True
+        DMaaP.test(port=portNum)
+        try:
+            DcaeVariables.VESEventQ = Queue()
+            DcaeVariables.HttpServerThread = threading.Thread(name='DMAAP_HTTPServer', target=DMaaP.DMaaPHttpd.serve_forever)
+            DcaeVariables.HttpServerThread.start()
+            logger.console("DMaaP Mockup Sever started")
+            time.sleep(2)
+            return "true"
+        except Exception as e:
+            print (str(e))
+            return "false"
+            
+    def shutdown_dmaap(self):
+        if DcaeVariables.HTTPD != None:
+            DcaeVariables.HTTPD.shutdown()
+            logger.console("DMaaP Server shut down")
+            time.sleep(3)
+            return "true"
+        else:
+            return "false"
+            
+    def cleanup_ves_events(self):
+        if DcaeVariables.HttpServerThread != None:
+            DMaaP.cleanUpEvent()
+            logger.console("DMaaP event queue is cleaned up")
+            return "true"
+        logger.console("DMaaP server not started yet")
+        return "false"
+    
+    def enable_vesc_https_auth(self):
+        if 'Windows' in platform.system():
+            try:
+                client = paramiko.SSHClient()
+                client.load_system_host_keys()
+                #client.set_missing_host_key_policy(paramiko.WarningPolicy)
+                client.set_missing_host_key_policy(paramiko.AutoAddPolicy())
+                
+                client.connect(os.environ['CSIT_IP'], port=22, username=os.environ['CSIT_USER'], password=os.environ['CSIT_PD'])
+                stdin, stdout, stderr = client.exec_command('%{WORKSPACE}/test/csit/tests/dcaegen2/testcases/resources/vesc_enable_https_auth.sh')
+                logger.console(stdout.read())    
+            finally:
+                client.close()
+            return
+        ws = os.environ['WORKSPACE']
+        script2run = ws + "/test/csit/tests/dcaegen2/testcases/resources/vesc_enable_https_auth.sh"
+        logger.info("Running script: " + script2run)
+        logger.console("Running script: " + script2run)
+        subprocess.call(script2run)
+        time.sleep(5)
+        return  
+                   
+    def dmaap_message_receive(self, evtobj, action='contain'):
+        
+        evtStr = DMaaP.dequeEvent()
+        while evtStr != None:
+            logger.console("DMaaP receive VES Event:\n" + evtStr)
+            if action == 'contain':
+                if evtobj in evtStr:
+                    logger.info("DMaaP Receive Expected Publish Event:\n" + evtStr)
+                    return 'true'
+            if action == 'sizematch':
+                if len(evtobj) == len(evtStr):
+                    return 'true'
+            if action == 'dictmatch':
+                evtDict = json.loads(evtStr)
+                if cmp(evtobj, evtDict) == 0:
+                    return 'true'
+            evtStr = DMaaP.dequeEvent()
+        return 'false'
+    
+    def create_header_from_string(self, dictStr):
+        logger.info("Enter create_header_from_string: dictStr")
+        return dict(u.split("=") for u in dictStr.split(","))
+    
+    def is_json_empty(self, resp):
+        logger.info("Enter is_json_empty: resp.text: " + resp.text)
+        if resp.text == None or len(resp.text) < 2:
+            return 'True'
+        return 'False'
+    
+    def Generate_UUID(self):
+        """generate a uuid"""
+        return uuid.uuid4()
+    
+    def get_json_value_list(self, jsonstr, keyval):
+        logger.info("Enter Get_Json_Key_Value_List")
+        if jsonstr == None or len(jsonstr) < 2:
+            logger.info("No Json data found")
+            return []
+        try:
+            data = json.loads(jsonstr)   
+            nodelist = []
+            for item in data:
+                nodelist.append(item[keyval])
+            return nodelist
+        except Exception as e:
+            logger.info("Json data parsing fails")
+            print str(e)
+            return []
+        
+    def generate_MilliTimestamp_UUID(self):
+        """generate a millisecond timestamp uuid"""
+        then = datetime.datetime.now()
+        return int(time.mktime(then.timetuple())*1e3 + then.microsecond/1e3)
+    
+    def test (self):
+        import json
+        from pprint import pprint
+
+        with open('robot/assets/dcae/ves_volte_single_fault_event.json') as data_file:    
+            data = json.load(data_file)
+
+        data['event']['commonEventHeader']['version'] = '5.0'
+        pprint(data)
+
+
+
+if __name__ == '__main__':
+    '''
+    dictStr = "action=getTable,Accept=application/json,Content-Type=application/json,X-FromAppId=1234908903284"
+    cls = DcaeLibrary()
+    #dict = cls.create_header_from_string(dictStr)
+    #print str(dict)
+    jsonStr = "[{'Node': 'onapfcnsl00', 'CheckID': 'serfHealth', 'Name': 'Serf Health Status', 'ServiceName': '', 'Notes': '', 'ModifyIndex': 6, 'Status': 'passing', 'ServiceID': '', 'ServiceTags': [], 'Output': 'Agent alive and reachable', 'CreateIndex': 6}]"
+    lsObj = cls.get_json_value_list(jsonStr, 'Status')
+    print lsObj
+    '''
+    
+    lib = DcaeLibrary()
+    lib.enable_vesc_https_auth()
+    
+    ret = lib.setup_dmaap_server()
+    print ret
+    time.sleep(100000)
+    
diff --git a/test/csit/tests/dcaegen2/testcases/resources/dcae_keywords.robot b/test/csit/tests/dcaegen2/testcases/resources/dcae_keywords.robot
index 59d44e1..98b3415 100644
--- a/test/csit/tests/dcaegen2/testcases/resources/dcae_keywords.robot
+++ b/test/csit/tests/dcaegen2/testcases/resources/dcae_keywords.robot
@@ -1,133 +1,133 @@
- *** Settings ***
-Documentation     The main interface for interacting with DCAE. It handles low level stuff like managing the http request library and DCAE required fields
-Library 	      RequestsLibrary
-Library	          DcaeLibrary   
-Library           OperatingSystem
-Library           Collections
-Variables         ../resources/DcaeVariables.py
-Resource          ../resources/dcae_properties.robot
-*** Variables ***
-${DCAE_HEALTH_CHECK_BODY}    %{WORKSPACE}/test/csit/tests/dcae/testcases/assets/json_events/dcae_healthcheck.json
-*** Keywords ***
-Get DCAE Nodes
-    [Documentation]    Get DCAE Nodes from Consul Catalog
-    #Log    Creating session   ${GLOBAL_DCAE_CONSUL_URL}
-    ${session}=    Create Session 	dcae 	${GLOBAL_DCAE_CONSUL_URL}
-    ${uuid}=    Generate UUID
-    ${headers}=  Create Dictionary     Accept=application/json    Content-Type=application/json  X-Consul-Token=abcd1234  X-TransactionId=${GLOBAL_APPLICATION_ID}-${uuid}    X-FromAppId=${GLOBAL_APPLICATION_ID}
-    ${resp}= 	Get Request 	dcae 	/v1/catalog/nodes        headers=${headers}
-    Log    Received response from dcae consul: ${resp.json()}
-    Should Be Equal As Strings 	${resp.status_code} 	200
-    ${NodeList}=   Get Json Value List   ${resp.text}   Node
-    ${NodeListLength}=  Get Length  ${NodeList}  
-    ${len}=  Get Length   ${NodeList}   
-    Should Not Be Equal As Integers   ${len}   0
-    [return]    ${NodeList}
-DCAE Node Health Check
-    [Documentation]    Perform DCAE Node Health Check
-    [Arguments]    ${NodeName}
-    ${session}=    Create Session 	dcae-${NodeName} 	${GLOBAL_DCAE_CONSUL_URL}
-    ${uuid}=    Generate UUID
-    ${headers}=  Create Dictionary     Accept=application/json    Content-Type=application/json  X-Consul-Token=abcd1234  X-TransactionId=${GLOBAL_APPLICATION_ID}-${uuid}    X-FromAppId=${GLOBAL_APPLICATION_ID}
-    ${hcpath}=   Catenate  SEPARATOR=    /v1/health/node/    ${NodeName}
-    ${resp}= 	Get Request 	dcae-${NodeName} 	${hcpath}        headers=${headers}
-    Log    Received response from dcae consul: ${resp.json()}
-    Should Be Equal As Strings 	${resp.status_code} 	200
-    ${StatusList}=  Get Json Value List   ${resp.text}    Status
-    ${len}=  Get Length  ${StatusList}
-    Should Not Be Equal As Integers   ${len}   0
-    DCAE Check Health Status    ${NodeName}   ${StatusList[0]}    Serf Health Status
-    #Run Keyword if  ${len} > 1  DCAE Check Health Status  ${NodeName}  ${StatusList[1]}  Serf Health Status
-DCAE Check Health Status
-    [Arguments]    ${NodeName}    ${ItemStatus}   ${CheckType}
-    Should Be Equal As Strings    ${ItemStatus}    passing   
-    Log   Node: ${NodeName} ${CheckType} check pass ok
-VES Collector Suite Setup DMaaP
-    [Documentation]   Start DMaaP Mockup Server
-    ${ret}=  Setup DMaaP Server
-    Should Be Equal As Strings     ${ret}    true
-VES Collector Suite Shutdown DMaaP
-    [Documentation]   Shutdown DMaaP Mockup Server
-    ${ret}=  Shutdown DMaap
-    Should Be Equal As Strings     ${ret}    true
-Check DCAE Results
-    [Documentation]    Parse DCAE JSON response and make sure all rows have healthTestStatus=GREEN
-    [Arguments]    ${json}
-    @{rows}=    Get From Dictionary    ${json['returns']}    rows
-    @{headers}=    Get From Dictionary    ${json['returns']}    columns
-    # Retrieve column names from headers
-    ${columns}=    Create List
-    :for    ${header}    in    @{headers}
-    \    ${colName}=    Get From Dictionary    ${header}    colName
-    \    Append To List    ${columns}    ${colName}
-    # Process each row making sure status=GREEN
-    :for    ${row}    in    @{rows}
-    \    ${cells}=    Get From Dictionary    ${row}    cells
-    \    ${dict}=    Make A Dictionary    ${cells}    ${columns}
-    \    Dictionary Should Contain Item    ${dict}    healthTestStatus    GREEN
-Make A Dictionary
-    [Documentation]    Given a list of column names and a list of dictionaries, map columname=value
-    [Arguments]     ${columns}    ${names}    ${valuename}=value
-    ${dict}=    Create Dictionary
-    ${collength}=    Get Length    ${columns}
-    ${namelength}=    Get Length    ${names}
-    :for    ${index}    in range    0   ${collength}
-    \    ${name}=    Evaluate     ${names}[${index}]
-    \    ${valued}=    Evaluate     ${columns}[${index}]
-    \    ${value}=    Get From Dictionary    ${valued}    ${valueName}
-    \    Set To Dictionary    ${dict}   ${name}    ${value}     
-    [Return]     ${dict}
-Get Event Data From File
-    [Arguments]    ${jsonfile}
-    ${data}=    OperatingSystem.Get File    ${jsonfile}
-    #Should Not Be_Equal    ${data}    None
-    [return]    ${data}
-Json String To Dictionary
-    [Arguments]  ${json_string}   
-    ${json_dict}=  evaluate    json.loads('''${json_string}''')    json
-    [return]   ${json_dict}
-Dictionary To Json String
-    [Arguments]  ${json_dict}
-    ${json_string}=    evaluate    json.dumps(${json_dict})    json
-    [return]    ${json_string}
-Get DCAE Service Component Status
-    [Documentation]   Get the status of a DCAE Service Component
-    [Arguments]    ${url}    ${urlpath}     ${usr}    ${passwd}    
-    ${auth}=  Create List  ${usr}  ${passwd}
-    ${session}=    Create Session 	dcae-service-component 	${url}    auth=${auth}
-    ${resp}= 	Get Request 	dcae-service-component 	${urlpath}
-    [return]    ${resp}
-Publish Event To VES Collector No Auth
-    [Documentation]    Send an event to VES Collector
-    [Arguments]     ${url}  ${evtpath}   ${httpheaders}    ${evtdata}
-    Log    Creating session ${url}
-    ${session}=    Create Session 	dcaegen2-d1 	${url}
-    ${resp}= 	Post Request 	dcaegen2-d1 	${evtpath}     data=${evtdata}   headers=${httpheaders}
-    #Log    Received response from dcae ${resp.json()}
-    [return] 	${resp}
-Publish Event To VES Collector
-    [Documentation]    Send an event to VES Collector
-    [Arguments]     ${url}  ${evtpath}   ${httpheaders}    ${evtdata}   ${user}  ${pd}
-    ${auth}=  Create List  ${user}   ${pd}
-    Log    Creating session ${url}
-    ${session}=    Create Session 	dcaegen2-d1 	${url}    auth=${auth}   disable_warnings=1
-    ${resp}= 	Post Request 	dcaegen2-d1 	${evtpath}     data=${evtdata}   headers=${httpheaders}
-    #Log    Received response from dcae ${resp.json()}
-    [return] 	${resp}
-Publish Event To VES Collector With Put Method
-    [Documentation]    Send an event to VES Collector
-    [Arguments]     ${url}  ${evtpath}   ${httpheaders}    ${evtdata}   ${user}  ${pd}
-    ${auth}=  Create List  ${user}   ${pd}
-    Log    Creating session ${url}
-    ${session}=    Create Session 	dcae-d1 	${url}    auth=${auth}
-    ${resp}= 	Put Request 	dcae-d1 	${evtpath}     data=${evtdata}   headers=${httpheaders}
-    #Log    Received response from dcae ${resp.json()}
-    [return] 	${resp}
-Publish Event To VES Collector With Put Method No Auth
-    [Documentation]    Send an event to VES Collector
-    [Arguments]     ${url}  ${evtpath}   ${httpheaders}    ${evtdata}
-    Log    Creating session ${url}
-    ${session}=    Create Session 	dcae-d1 	${url}
-    ${resp}= 	Put Request 	dcae-d1 	${evtpath}     data=${evtdata}   headers=${httpheaders}
-    #Log    Received response from dcae ${resp.json()}
-    [return] 	${resp}
+ *** Settings ***
+Documentation     The main interface for interacting with DCAE. It handles low level stuff like managing the http request library and DCAE required fields
+Library 	      RequestsLibrary
+Library	          DcaeLibrary   
+Library           OperatingSystem
+Library           Collections
+Variables         ../resources/DcaeVariables.py
+Resource          ../resources/dcae_properties.robot
+*** Variables ***
+${DCAE_HEALTH_CHECK_BODY}    %{WORKSPACE}/test/csit/tests/dcae/testcases/assets/json_events/dcae_healthcheck.json
+*** Keywords ***
+Get DCAE Nodes
+    [Documentation]    Get DCAE Nodes from Consul Catalog
+    #Log    Creating session   ${GLOBAL_DCAE_CONSUL_URL}
+    ${session}=    Create Session 	dcae 	${GLOBAL_DCAE_CONSUL_URL}
+    ${uuid}=    Generate UUID
+    ${headers}=  Create Dictionary     Accept=application/json    Content-Type=application/json  X-Consul-Token=abcd1234  X-TransactionId=${GLOBAL_APPLICATION_ID}-${uuid}    X-FromAppId=${GLOBAL_APPLICATION_ID}
+    ${resp}= 	Get Request 	dcae 	/v1/catalog/nodes        headers=${headers}
+    Log    Received response from dcae consul: ${resp.json()}
+    Should Be Equal As Strings 	${resp.status_code} 	200
+    ${NodeList}=   Get Json Value List   ${resp.text}   Node
+    ${NodeListLength}=  Get Length  ${NodeList}  
+    ${len}=  Get Length   ${NodeList}   
+    Should Not Be Equal As Integers   ${len}   0
+    [return]    ${NodeList}
+DCAE Node Health Check
+    [Documentation]    Perform DCAE Node Health Check
+    [Arguments]    ${NodeName}
+    ${session}=    Create Session 	dcae-${NodeName} 	${GLOBAL_DCAE_CONSUL_URL}
+    ${uuid}=    Generate UUID
+    ${headers}=  Create Dictionary     Accept=application/json    Content-Type=application/json  X-Consul-Token=abcd1234  X-TransactionId=${GLOBAL_APPLICATION_ID}-${uuid}    X-FromAppId=${GLOBAL_APPLICATION_ID}
+    ${hcpath}=   Catenate  SEPARATOR=    /v1/health/node/    ${NodeName}
+    ${resp}= 	Get Request 	dcae-${NodeName} 	${hcpath}        headers=${headers}
+    Log    Received response from dcae consul: ${resp.json()}
+    Should Be Equal As Strings 	${resp.status_code} 	200
+    ${StatusList}=  Get Json Value List   ${resp.text}    Status
+    ${len}=  Get Length  ${StatusList}
+    Should Not Be Equal As Integers   ${len}   0
+    DCAE Check Health Status    ${NodeName}   ${StatusList[0]}    Serf Health Status
+    #Run Keyword if  ${len} > 1  DCAE Check Health Status  ${NodeName}  ${StatusList[1]}  Serf Health Status
+DCAE Check Health Status
+    [Arguments]    ${NodeName}    ${ItemStatus}   ${CheckType}
+    Should Be Equal As Strings    ${ItemStatus}    passing   
+    Log   Node: ${NodeName} ${CheckType} check pass ok
+VES Collector Suite Setup DMaaP
+    [Documentation]   Start DMaaP Mockup Server
+    ${ret}=  Setup DMaaP Server
+    Should Be Equal As Strings     ${ret}    true
+VES Collector Suite Shutdown DMaaP
+    [Documentation]   Shutdown DMaaP Mockup Server
+    ${ret}=  Shutdown DMaap
+    Should Be Equal As Strings     ${ret}    true
+Check DCAE Results
+    [Documentation]    Parse DCAE JSON response and make sure all rows have healthTestStatus=GREEN
+    [Arguments]    ${json}
+    @{rows}=    Get From Dictionary    ${json['returns']}    rows
+    @{headers}=    Get From Dictionary    ${json['returns']}    columns
+    # Retrieve column names from headers
+    ${columns}=    Create List
+    :for    ${header}    in    @{headers}
+    \    ${colName}=    Get From Dictionary    ${header}    colName
+    \    Append To List    ${columns}    ${colName}
+    # Process each row making sure status=GREEN
+    :for    ${row}    in    @{rows}
+    \    ${cells}=    Get From Dictionary    ${row}    cells
+    \    ${dict}=    Make A Dictionary    ${cells}    ${columns}
+    \    Dictionary Should Contain Item    ${dict}    healthTestStatus    GREEN
+Make A Dictionary
+    [Documentation]    Given a list of column names and a list of dictionaries, map columname=value
+    [Arguments]     ${columns}    ${names}    ${valuename}=value
+    ${dict}=    Create Dictionary
+    ${collength}=    Get Length    ${columns}
+    ${namelength}=    Get Length    ${names}
+    :for    ${index}    in range    0   ${collength}
+    \    ${name}=    Evaluate     ${names}[${index}]
+    \    ${valued}=    Evaluate     ${columns}[${index}]
+    \    ${value}=    Get From Dictionary    ${valued}    ${valueName}
+    \    Set To Dictionary    ${dict}   ${name}    ${value}     
+    [Return]     ${dict}
+Get Event Data From File
+    [Arguments]    ${jsonfile}
+    ${data}=    OperatingSystem.Get File    ${jsonfile}
+    #Should Not Be_Equal    ${data}    None
+    [return]    ${data}
+Json String To Dictionary
+    [Arguments]  ${json_string}   
+    ${json_dict}=  evaluate    json.loads('''${json_string}''')    json
+    [return]   ${json_dict}
+Dictionary To Json String
+    [Arguments]  ${json_dict}
+    ${json_string}=    evaluate    json.dumps(${json_dict})    json
+    [return]    ${json_string}
+Get DCAE Service Component Status
+    [Documentation]   Get the status of a DCAE Service Component
+    [Arguments]    ${url}    ${urlpath}     ${usr}    ${passwd}    
+    ${auth}=  Create List  ${usr}  ${passwd}
+    ${session}=    Create Session 	dcae-service-component 	${url}    auth=${auth}
+    ${resp}= 	Get Request 	dcae-service-component 	${urlpath}
+    [return]    ${resp}
+Publish Event To VES Collector No Auth
+    [Documentation]    Send an event to VES Collector
+    [Arguments]     ${url}  ${evtpath}   ${httpheaders}    ${evtdata}
+    Log    Creating session ${url}
+    ${session}=    Create Session 	dcaegen2-d1 	${url}
+    ${resp}= 	Post Request 	dcaegen2-d1 	${evtpath}     data=${evtdata}   headers=${httpheaders}
+    #Log    Received response from dcae ${resp.json()}
+    [return] 	${resp}
+Publish Event To VES Collector
+    [Documentation]    Send an event to VES Collector
+    [Arguments]     ${url}  ${evtpath}   ${httpheaders}    ${evtdata}   ${user}  ${pd}
+    ${auth}=  Create List  ${user}   ${pd}
+    Log    Creating session ${url}
+    ${session}=    Create Session 	dcaegen2-d1 	${url}    auth=${auth}   disable_warnings=1
+    ${resp}= 	Post Request 	dcaegen2-d1 	${evtpath}     data=${evtdata}   headers=${httpheaders}
+    #Log    Received response from dcae ${resp.json()}
+    [return] 	${resp}
+Publish Event To VES Collector With Put Method
+    [Documentation]    Send an event to VES Collector
+    [Arguments]     ${url}  ${evtpath}   ${httpheaders}    ${evtdata}   ${user}  ${pd}
+    ${auth}=  Create List  ${user}   ${pd}
+    Log    Creating session ${url}
+    ${session}=    Create Session 	dcae-d1 	${url}    auth=${auth}
+    ${resp}= 	Put Request 	dcae-d1 	${evtpath}     data=${evtdata}   headers=${httpheaders}
+    #Log    Received response from dcae ${resp.json()}
+    [return] 	${resp}
+Publish Event To VES Collector With Put Method No Auth
+    [Documentation]    Send an event to VES Collector
+    [Arguments]     ${url}  ${evtpath}   ${httpheaders}    ${evtdata}
+    Log    Creating session ${url}
+    ${session}=    Create Session 	dcae-d1 	${url}
+    ${resp}= 	Put Request 	dcae-d1 	${evtpath}     data=${evtdata}   headers=${httpheaders}
+    #Log    Received response from dcae ${resp.json()}
+    [return] 	${resp}
diff --git a/test/csit/tests/dcaegen2/testcases/resources/dcae_properties.robot b/test/csit/tests/dcaegen2/testcases/resources/dcae_properties.robot
index be072d7..6924888 100644
--- a/test/csit/tests/dcaegen2/testcases/resources/dcae_properties.robot
+++ b/test/csit/tests/dcaegen2/testcases/resources/dcae_properties.robot
@@ -1,15 +1,15 @@
-Documentation        store all properties that can change or are used in multiple places here
-...                    format is all caps with underscores between words and prepended with GLOBAL
-...                   make sure you prepend them with GLOBAL so that other files can easily see it is from this file.
-
-
-
-*** Variables ***
-${GLOBAL_APPLICATION_ID}           robot-dcaegen2
-${GLOBAL_DCAE_CONSUL_URL}          http://135.205.228.129:8500
-${GLOBAL_DCAE_CONSUL_URL1}         http://135.205.228.170:8500
-${GLOBAL_DCAE_VES_URL}             http://localhost:8443/eventlistener/v5
-${GLOBAL_DCAE_USERNAME}            console
-${GLOBAL_DCAE_PASSWORD}            ZjJkYjllMjljMTI2M2Iz
-${VESC_HTTPS_USER}                 sample1
-${VESC_HTTPS_PD}                   sample1
+Documentation        store all properties that can change or are used in multiple places here
+...                    format is all caps with underscores between words and prepended with GLOBAL
+...                   make sure you prepend them with GLOBAL so that other files can easily see it is from this file.
+
+
+
+*** Variables ***
+${GLOBAL_APPLICATION_ID}           robot-dcaegen2
+${GLOBAL_DCAE_CONSUL_URL}          http://135.205.228.129:8500
+${GLOBAL_DCAE_CONSUL_URL1}         http://135.205.228.170:8500
+${GLOBAL_DCAE_VES_URL}             http://localhost:8443/eventlistener/v5
+${GLOBAL_DCAE_USERNAME}            console
+${GLOBAL_DCAE_PASSWORD}            ZjJkYjllMjljMTI2M2Iz
+${VESC_HTTPS_USER}                 sample1
+${VESC_HTTPS_PD}                   sample1
diff --git a/test/csit/tests/vfc/nfvo-wfengine/workflow.robot b/test/csit/tests/vfc/nfvo-wfengine/workflow.robot
index 07bfe69..c9dbe6c 100644
--- a/test/csit/tests/vfc/nfvo-wfengine/workflow.robot
+++ b/test/csit/tests/vfc/nfvo-wfengine/workflow.robot
@@ -1,113 +1,113 @@
-*** Settings ***
-Resource          ../../common.robot
-Library           Collections
-Library           json
-Library           OperatingSystem
-Library           RequestsLibrary
-Library           HttpLibrary.HTTP
-
-*** Variables ***
-${MSB_IP}         127.0.0.1
-${MSB_PORT}       10550
-${ACTIVITI_IP}    127.0.0.1
-${ACTIVITI_PORT}    8804
-${MGRSERVICE_IP}    127.0.0.1
-${MGRSERVICE_PORT}    8805
-${processId}      demo
-${deployid}       0
-${bmpfilepath}    ${SCRIPTS}/nfvo-wfengine/demo.bpmn20.xml
-
-*** Test Cases ***
-Deploy BPMN File Test On Activiti
-    [Documentation]    Check if the test bpmn file can be deployed in activiti engine
-    ${auth}=    Create List    kermit    kermit
-    ${headers}=    Create Dictionary    Accept=application/json
-    Create Session    web_session    http://${ACTIVITI_IP}:${ACTIVITI_PORT}    headers=${headers}    auth=${auth}
-    ${files}=    evaluate    {"file":open('${bmpfilepath}','rb')}
-    ${resp}=    Post Request    web_session    /activiti-rest/service/repository/deployments    files=${files}
-    Should Be Equal    ${resp.status_code}    ${201}
-    Log    ${resp.json()}
-    ${deployedId}=    Set Variable    ${resp.json()["id"]}
-    Set Global Variable    ${deployedId}
-
-Exectue BPMN File Testt On Activiti
-    [Documentation]    Check if the test bpmn file can be exectued in activiti engine
-    ${headers}    Create Dictionary    Content-Type=application/json    Accept=application/json    Authorization=Basic a2VybWl0Omtlcm1pdA==
-    Create Session    web_session    http://${ACTIVITI_IP}:${ACTIVITI_PORT}    headers=${headers}
-    ${body}    Create Dictionary    processDefinitionKey=${processId}
-    ${body}    dumps    ${body}
-    ${resp}=    Post Request    web_session    /activiti-rest/service/runtime/process-instances    ${body}
-    Should Be Equal    ${resp.status_code}    ${201}
-
-UnDeploy BPMN File Testt On Activiti
-    [Documentation]    Check if the test bpmn file can be undeployed in activiti engine
-    log    ${deployedId}
-    ${auth}=    Create List    kermit    kermit
-    ${headers}    Create Dictionary    Content-Type=application/json    Accept=application/json
-    Create Session    web_session    http://${ACTIVITI_IP}:${ACTIVITI_PORT}    headers=${headers}    auth=${auth}
-    ${resp}=    Delete Request    web_session    /activiti-rest/service/repository/deployments/${deployedId}?cascade=true
-    Should Be Equal    ${resp.status_code}    ${204}
-
-Deploy BPMN File Test On MgrService
-    [Documentation]    Check if the test bpmn file can be deployed in Management Service
-    ${auth}=    Create List    kermit    kermit
-    ${headers}=    Create Dictionary    Accept=application/json
-    Create Session    web_session    http://${MGRSERVICE_IP}:${MGRSERVICE_PORT}    headers=${headers}    auth=${auth}
-    ${files}=    evaluate    {"file":open('${bmpfilepath}','rb')}
-    ${resp}=    Post Request    web_session    api/workflow/v1/package    files=${files}
-    Should Be Equal    ${resp.status_code}    ${200}
-    Log    ${resp.json()}
-    ${deployedId}=    Set Variable    ${resp.json()["deployedId"]}
-    Set Global Variable    ${deployedId}
-
-Exectue BPMN File Testt On MgrService
-    [Documentation]    Check if the test bpmn file can be exectued in Management Service
-    ${headers}    Create Dictionary    Content-Type=application/json    Accept=application/json    Authorization=Basic a2VybWl0Omtlcm1pdA==
-    Create Session    web_session    http://${MGRSERVICE_IP}:${MGRSERVICE_PORT}    headers=${headers}
-    ${body}    Create Dictionary    processDefinitionKey=${processId}
-    ${body}    dumps    ${body}
-    ${resp}=    Post Request    web_session    api/workflow/v1/process/instance    ${body}
-    Should Be Equal    ${resp.status_code}    ${200}
-    Log    ${resp.json()}
-    Should Be Equal    ${resp.json()["processDefinitionKey"]}    ${processId}
-
-UnDeploy BPMN File Testt On MgrService
-    [Documentation]    Check if the test bpmn file can be undeployed in Management Service
-    log    ${deployedId}
-    ${auth}=    Create List    kermit    kermit
-    ${headers}    Create Dictionary    Content-Type=application/json    Accept=application/json
-    Create Session    web_session    http://${MGRSERVICE_IP}:${MGRSERVICE_PORT}    headers=${headers}    auth=${auth}
-    ${resp}=    Delete Request    web_session    /api/workflow/v1/package/${deployedId}
-    Should Be Equal    ${resp.status_code}    ${200}
-
-Deploy BPMN File Test On MSB
-    [Documentation]    Check if the test bpmn file can be deployed in activiti engine
-    ${auth}=    Create List    kermit    kermit
-    ${headers}=    Create Dictionary    Accept=application/json
-    Create Session    web_session    http://${MSB_IP}:${MSB_PORT}    headers=${headers}    auth=${auth}
-    ${files}=    evaluate    {"file":open('${bmpfilepath}','rb')}
-    ${resp}=    Post Request    web_session    api/workflow/v1/package    files=${files}
-    Should Be Equal    ${resp.status_code}    ${200}
-    Log    ${resp.json()}
-    ${deployedId}=    Set Variable    ${resp.json()["deployedId"]}
-    Set Global Variable    ${deployedId}
-
-Exectue BPMN File Testt On MSB
-    [Documentation]    Check if the test bpmn file can be exectued in MSB
-    ${headers}    Create Dictionary    Content-Type=application/json    Accept=application/json    Authorization=Basic a2VybWl0Omtlcm1pdA==
-    Create Session    web_session    http://${MSB_IP}:${MSB_PORT}    headers=${headers}
-    ${body}    Create Dictionary    processDefinitionKey=${processId}
-    ${body}    dumps    ${body}
-    ${resp}=    Post Request    web_session    api/workflow/v1/process/instance    ${body}
-    Should Be Equal    ${resp.status_code}    ${200}
-    Log    ${resp.json()}
-    Should Be Equal    ${resp.json()["processDefinitionKey"]}    ${processId}
-
-UnDeploy BPMN File Testt On MSB
-    [Documentation]    Check if the test bpmn file can be undeployed in MSB
-    log    ${deployedId}
-    ${auth}=    Create List    kermit    kermit
-    ${headers}    Create Dictionary    Content-Type=application/json    Accept=application/json
-    Create Session    web_session    http://${MSB_IP}:${MSB_PORT}    headers=${headers}    auth=${auth}
-    ${resp}=    Delete Request    web_session    /api/workflow/v1/package/${deployedId}
-    Should Be Equal    ${resp.status_code}    ${200}
+*** Settings ***
+Resource          ../../common.robot
+Library           Collections
+Library           json
+Library           OperatingSystem
+Library           RequestsLibrary
+Library           HttpLibrary.HTTP
+
+*** Variables ***
+${MSB_IP}         127.0.0.1
+${MSB_PORT}       10550
+${ACTIVITI_IP}    127.0.0.1
+${ACTIVITI_PORT}    8804
+${MGRSERVICE_IP}    127.0.0.1
+${MGRSERVICE_PORT}    8805
+${processId}      demo
+${deployid}       0
+${bmpfilepath}    ${SCRIPTS}/nfvo-wfengine/demo.bpmn20.xml
+
+*** Test Cases ***
+Deploy BPMN File Test On Activiti
+    [Documentation]    Check if the test bpmn file can be deployed in activiti engine
+    ${auth}=    Create List    kermit    kermit
+    ${headers}=    Create Dictionary    Accept=application/json
+    Create Session    web_session    http://${ACTIVITI_IP}:${ACTIVITI_PORT}    headers=${headers}    auth=${auth}
+    ${files}=    evaluate    {"file":open('${bmpfilepath}','rb')}
+    ${resp}=    Post Request    web_session    /activiti-rest/service/repository/deployments    files=${files}
+    Should Be Equal    ${resp.status_code}    ${201}
+    Log    ${resp.json()}
+    ${deployedId}=    Set Variable    ${resp.json()["id"]}
+    Set Global Variable    ${deployedId}
+
+Exectue BPMN File Testt On Activiti
+    [Documentation]    Check if the test bpmn file can be exectued in activiti engine
+    ${headers}    Create Dictionary    Content-Type=application/json    Accept=application/json    Authorization=Basic a2VybWl0Omtlcm1pdA==
+    Create Session    web_session    http://${ACTIVITI_IP}:${ACTIVITI_PORT}    headers=${headers}
+    ${body}    Create Dictionary    processDefinitionKey=${processId}
+    ${body}    dumps    ${body}
+    ${resp}=    Post Request    web_session    /activiti-rest/service/runtime/process-instances    ${body}
+    Should Be Equal    ${resp.status_code}    ${201}
+
+UnDeploy BPMN File Testt On Activiti
+    [Documentation]    Check if the test bpmn file can be undeployed in activiti engine
+    log    ${deployedId}
+    ${auth}=    Create List    kermit    kermit
+    ${headers}    Create Dictionary    Content-Type=application/json    Accept=application/json
+    Create Session    web_session    http://${ACTIVITI_IP}:${ACTIVITI_PORT}    headers=${headers}    auth=${auth}
+    ${resp}=    Delete Request    web_session    /activiti-rest/service/repository/deployments/${deployedId}?cascade=true
+    Should Be Equal    ${resp.status_code}    ${204}
+
+Deploy BPMN File Test On MgrService
+    [Documentation]    Check if the test bpmn file can be deployed in Management Service
+    ${auth}=    Create List    kermit    kermit
+    ${headers}=    Create Dictionary    Accept=application/json
+    Create Session    web_session    http://${MGRSERVICE_IP}:${MGRSERVICE_PORT}    headers=${headers}    auth=${auth}
+    ${files}=    evaluate    {"file":open('${bmpfilepath}','rb')}
+    ${resp}=    Post Request    web_session    api/workflow/v1/package    files=${files}
+    Should Be Equal    ${resp.status_code}    ${200}
+    Log    ${resp.json()}
+    ${deployedId}=    Set Variable    ${resp.json()["deployedId"]}
+    Set Global Variable    ${deployedId}
+
+Exectue BPMN File Testt On MgrService
+    [Documentation]    Check if the test bpmn file can be exectued in Management Service
+    ${headers}    Create Dictionary    Content-Type=application/json    Accept=application/json    Authorization=Basic a2VybWl0Omtlcm1pdA==
+    Create Session    web_session    http://${MGRSERVICE_IP}:${MGRSERVICE_PORT}    headers=${headers}
+    ${body}    Create Dictionary    processDefinitionKey=${processId}
+    ${body}    dumps    ${body}
+    ${resp}=    Post Request    web_session    api/workflow/v1/process/instance    ${body}
+    Should Be Equal    ${resp.status_code}    ${200}
+    Log    ${resp.json()}
+    Should Be Equal    ${resp.json()["processDefinitionKey"]}    ${processId}
+
+UnDeploy BPMN File Testt On MgrService
+    [Documentation]    Check if the test bpmn file can be undeployed in Management Service
+    log    ${deployedId}
+    ${auth}=    Create List    kermit    kermit
+    ${headers}    Create Dictionary    Content-Type=application/json    Accept=application/json
+    Create Session    web_session    http://${MGRSERVICE_IP}:${MGRSERVICE_PORT}    headers=${headers}    auth=${auth}
+    ${resp}=    Delete Request    web_session    /api/workflow/v1/package/${deployedId}
+    Should Be Equal    ${resp.status_code}    ${200}
+
+Deploy BPMN File Test On MSB
+    [Documentation]    Check if the test bpmn file can be deployed in activiti engine
+    ${auth}=    Create List    kermit    kermit
+    ${headers}=    Create Dictionary    Accept=application/json
+    Create Session    web_session    http://${MSB_IP}:${MSB_PORT}    headers=${headers}    auth=${auth}
+    ${files}=    evaluate    {"file":open('${bmpfilepath}','rb')}
+    ${resp}=    Post Request    web_session    api/workflow/v1/package    files=${files}
+    Should Be Equal    ${resp.status_code}    ${200}
+    Log    ${resp.json()}
+    ${deployedId}=    Set Variable    ${resp.json()["deployedId"]}
+    Set Global Variable    ${deployedId}
+
+Exectue BPMN File Testt On MSB
+    [Documentation]    Check if the test bpmn file can be exectued in MSB
+    ${headers}    Create Dictionary    Content-Type=application/json    Accept=application/json    Authorization=Basic a2VybWl0Omtlcm1pdA==
+    Create Session    web_session    http://${MSB_IP}:${MSB_PORT}    headers=${headers}
+    ${body}    Create Dictionary    processDefinitionKey=${processId}
+    ${body}    dumps    ${body}
+    ${resp}=    Post Request    web_session    api/workflow/v1/process/instance    ${body}
+    Should Be Equal    ${resp.status_code}    ${200}
+    Log    ${resp.json()}
+    Should Be Equal    ${resp.json()["processDefinitionKey"]}    ${processId}
+
+UnDeploy BPMN File Testt On MSB
+    [Documentation]    Check if the test bpmn file can be undeployed in MSB
+    log    ${deployedId}
+    ${auth}=    Create List    kermit    kermit
+    ${headers}    Create Dictionary    Content-Type=application/json    Accept=application/json
+    Create Session    web_session    http://${MSB_IP}:${MSB_PORT}    headers=${headers}    auth=${auth}
+    ${resp}=    Delete Request    web_session    /api/workflow/v1/package/${deployedId}
+    Should Be Equal    ${resp.status_code}    ${200}
