diff --git a/catalog-be/.gitignore b/catalog-be/.gitignore
index 9ef05f3..ff9fd70 100644
--- a/catalog-be/.gitignore
+++ b/catalog-be/.gitignore
@@ -1 +1,2 @@
-/sdc-backend/chef-repo/cookbooks/sdc-catalog-be/files/default/Artifact-Generator.properties
\ No newline at end of file
+/sdc-backend/chef-repo/cookbooks/sdc-catalog-be/files/default/Artifact-Generator.properties
+!/sdc-backend-init/scripts/**
diff --git a/catalog-be/pom.xml b/catalog-be/pom.xml
index d0a0f95..cbaf209 100644
--- a/catalog-be/pom.xml
+++ b/catalog-be/pom.xml
@@ -1165,6 +1165,27 @@
                   </resources>
                 </configuration>
               </execution>
+              <execution>
+                <id>copy-sdc-be-py</id>
+                <phase>verify</phase>
+                <goals>
+                  <goal>copy-resources</goal>
+                </goals>
+                <configuration>
+                  <outputDirectory>
+                    sdc-backend-init/
+                  </outputDirectory>
+                  <resources>
+                    <resource>
+                      <directory>${project.parent.basedir}/catalog-be/src/main/resources/</directory>
+                      <includes>
+                        <include>scripts/sdcBePy/**</include>
+                        <inculde>scripts/setup.py</inculde>
+                      </includes>
+                    </resource>
+                  </resources>
+                </configuration>
+              </execution>
             </executions>
           </plugin>
           <plugin>
diff --git a/catalog-be/sdc-backend-init/Dockerfile b/catalog-be/sdc-backend-init/Dockerfile
index cb26610..3ffcbe6 100644
--- a/catalog-be/sdc-backend-init/Dockerfile
+++ b/catalog-be/sdc-backend-init/Dockerfile
@@ -1,11 +1,22 @@
-FROM onap/base_sdc-python:1.6.0-SNAPSHOT-latest
+FROM onap/base_sdc-python:1.7.0
 
-COPY --chown=sdc:sdc chef-solo /home/sdc/chef-solo/
+# user/group args are inherited from base_sdc-python base image
+COPY --chown=$user:$group scripts /home/$user/scripts
 
-COPY --chown=sdc:sdc chef-repo/cookbooks /home/sdc/chef-solo/cookbooks/
+RUN chmod 770 -R /home/$user/scripts && \
+    cd /home/$user/scripts && \
+    python setup.py install --user
 
-COPY --chown=sdc:sdc startup.sh /home/sdc/
+ENV PATH=$PATH:/home/$user/.local/bin
 
-RUN chmod 770 /home/sdc/startup.sh
+COPY --chown=$user:$group chef-solo /home/$user/chef-solo/
 
-ENTRYPOINT [ "/home/sdc/startup.sh" ]
+COPY --chown=$user:$group chef-repo/cookbooks /home/$user/chef-solo/cookbooks/
+
+COPY --chown=$user:$group startup.sh /home/$user/
+
+RUN chmod 770 /home/$user/startup.sh
+
+WORKDIR /home/$user/
+
+ENTRYPOINT /home/${user}/startup.sh
diff --git a/catalog-be/sdc-backend-init/chef-repo/cookbooks/sdc-catalog-be-setup/recipes/1_create_consumer_and_user.rb b/catalog-be/sdc-backend-init/chef-repo/cookbooks/sdc-catalog-be-setup/recipes/1_create_consumer_and_user.rb
index 97d140a..bf8065b 100644
--- a/catalog-be/sdc-backend-init/chef-repo/cookbooks/sdc-catalog-be-setup/recipes/1_create_consumer_and_user.rb
+++ b/catalog-be/sdc-backend-init/chef-repo/cookbooks/sdc-catalog-be-setup/recipes/1_create_consumer_and_user.rb
@@ -1,46 +1,43 @@
 if node['disableHttp']
   protocol = "https"
+  https_flag = "--https"
   be_port = node['BE']['https_port']
 else
   protocol = "http"
+  https_flag = ""
   be_port = node['BE']['http_port']
 end
 
-
-template "/var/tmp/user.py" do
-    source "user.py.erb"
-    sensitive true
-    mode 0755
-    variables({
-      :protocol => protocol,
-      :be_ip => node['Nodes']['BE'],
-      :be_port => be_port
-    })
+if node['BE']['user_conf']
+  user_conf_dir = "--conf " + node['BE']['user_conf']
+else
+  # set default user configuration file
+  user_conf_dir = ""
 end
 
 bash "executing-create_user" do
-   code <<-EOH
-     python /var/tmp/user.py
-     rc=$?
-     if [[ $rc != 0 ]]; then exit $rc; fi
-   EOH
+  code <<-EOH
+    sdcuserinit -i #{node['Nodes']['BE']} -p #{be_port} #{user_conf_dir} #{https_flag}
+    rc=$?
+    if [[ $rc != 0 ]]; then exit $rc; fi
+  EOH
 end
 
 template "/var/tmp/consumers.py" do
-    source "consumers.py.erb"
-    sensitive true
-    mode 0755
-    variables({
-      :protocol => protocol,
-      :be_ip => node['Nodes']['BE'],
-      :be_port => be_port
-    })
+  source "consumers.py.erb"
+  sensitive true
+  mode 0755
+  variables({
+    :protocol => protocol,
+    :be_ip => node['Nodes']['BE'],
+    :be_port => be_port
+  })
 end
 
 bash "executing-consumers" do
-   code <<-EOH
-     python /var/tmp/consumers.py
-     rc=$?
-     if [[ $rc != 0 ]]; then exit $rc; fi
-   EOH
+  code <<-EOH
+    python /var/tmp/consumers.py
+    rc=$?
+    if [[ $rc != 0 ]]; then exit $rc; fi
+  EOH
 end
diff --git a/catalog-be/sdc-backend-init/chef-repo/cookbooks/sdc-catalog-be-setup/recipes/3_import_Normatives.rb b/catalog-be/sdc-backend-init/chef-repo/cookbooks/sdc-catalog-be-setup/recipes/3_import_Normatives.rb
index b640b3a..f59d916 100644
--- a/catalog-be/sdc-backend-init/chef-repo/cookbooks/sdc-catalog-be-setup/recipes/3_import_Normatives.rb
+++ b/catalog-be/sdc-backend-init/chef-repo/cookbooks/sdc-catalog-be-setup/recipes/3_import_Normatives.rb
@@ -3,7 +3,7 @@
 if node['disableHttp']
   protocol = "https"
   be_port = node['BE']['https_port']
-  param="-i #{be_ip} -p #{be_port} --scheme #{protocol}"
+  param="-i #{be_ip} -p #{be_port} --https"
 else
   protocol = "http"
   be_port = node['BE']['http_port']
@@ -11,38 +11,39 @@
 end
 
 cookbook_file "/var/tmp/normatives.tar.gz" do
-      source "normatives.tar.gz"
-   end
+  source "normatives.tar.gz"
+end
 
 bash "executing-import_Normatives" do
-   code <<-EOH
-     set -x
-     cd /var/tmp
-     tar xvfz /var/tmp/normatives.tar.gz
-     cd /var/tmp/normatives/scripts/import/tosca/
-     /bin/chmod +x *.py
+  code <<-EOH
+    set -ex
 
-     # executing the normatives
-     # add --debug=true to the importNormativeAll.py arguments to enable debug
+    cd /var/tmp/
+    tar -xvf normatives.tar.gz
+    
+    # executing the normatives
+    # add --debug to the importNormativeAll.py arguments to enable debug
+    
+    check_normative="/tmp/check_normative.out"
+    status_code=$(curl -k -s -o ${check_normative} -w "%{http_code}\\n" -X GET -H 'Content-Type: application/json;charset=UTF-8' -H 'USER_ID: jh0003' -H 'X-ECOMP-RequestID: cbe744a0-037b-458f-aab5-df6e543c4090' "#{protocol}://#{be_ip}:#{be_port}/sdc2/rest/v1/screen")
+    if [ "$status_code" != 200 ] ; then
+      exit "$status_code"
+    fi
+    
+    #curl -s -X GET -H "Content-Type: application/json;charset=UTF-8" -H "USER_ID: jh0003" -H "X-ECOMP-RequestID: cbe744a0-037b-458f-aab5-df6e543c4090" "#{protocol}://#{be_ip}:#{be_port}/sdc2/rest/v1/screen" > ${check_normative}
+    
+    resources_len=`cat ${check_normative}| jq '.["resources"]|length'`
+    mkdir -p /var/lib/jetty/logs
 
-     check_normative="/tmp/check_normative.out"
-     status_code=$(curl -k -s -o ${check_normative} -w "%{http_code}\\n" -X GET -H 'Content-Type: application/json;charset=UTF-8' -H 'USER_ID: jh0003' -H 'X-ECOMP-RequestID: cbe744a0-037b-458f-aab5-df6e543c4090' "#{protocol}://#{be_ip}:#{be_port}/sdc2/rest/v1/screen")
-     if [ "$status_code" != 200 ] ; then
-        exit "$status_code"
-     fi
-
-     #curl -s -X GET -H "Content-Type: application/json;charset=UTF-8" -H "USER_ID: jh0003" -H "X-ECOMP-RequestID: cbe744a0-037b-458f-aab5-df6e543c4090" "#{protocol}://#{be_ip}:#{be_port}/sdc2/rest/v1/screen" > ${check_normative}
-
-     resources_len=`cat ${check_normative}| jq '.["resources"]|length'`
-     mkdir -p /var/lib/jetty/logs
-     if [ $resources_len -eq 0 ] ; then
-        python importONAPNormativeAll.py #{param} > /var/lib/jetty/logs/importNormativeAll.log
-            rc=$?
-            if [[ $rc != 0 ]]; then exit $rc; fi
-     else
-        python upgradeONAPNormative.py #{param} > /var/lib/jetty/logs/upgradeNormative.log
-            rc=$?
-            if [[ $rc != 0 ]]; then exit $rc; fi
-     fi
-   EOH
+    cd /var/tmp/normatives/import/tosca/
+    if [ $resources_len -eq 0 ] ; then
+      sdcimportall #{param} > /var/lib/jetty/logs/importNormativeAll.log
+      rc=$?
+      if [[ $rc != 0 ]]; then exit $rc; fi
+    else
+      sdcupgradeall #{param} > /var/lib/jetty/logs/upgradeNormative.log
+      rc=$?
+      if [[ $rc != 0 ]]; then exit $rc; fi
+    fi
+  EOH
 end
diff --git a/catalog-be/sdc-backend-init/chef-repo/cookbooks/sdc-catalog-be-setup/templates/default/check_Backend_Health.py.erb b/catalog-be/sdc-backend-init/chef-repo/cookbooks/sdc-catalog-be-setup/templates/default/check_Backend_Health.py.erb
index bcacf88..ebd8ea5 100644
--- a/catalog-be/sdc-backend-init/chef-repo/cookbooks/sdc-catalog-be-setup/templates/default/check_Backend_Health.py.erb
+++ b/catalog-be/sdc-backend-init/chef-repo/cookbooks/sdc-catalog-be-setup/templates/default/check_Backend_Health.py.erb
@@ -30,7 +30,7 @@
     proc = subprocess.Popen( command , shell=True , stdout=subprocess.PIPE )
     (out, err) = proc.communicate()
     result = out.strip()
-    return result
+    return str(result, "UTF-8")
 
 ##############################
 #    Main
@@ -39,12 +39,12 @@
 for i in range(1,10):
     myResult = checkBackend()
     if myResult == '200':
-        print '[INFO]: Backend is up and running'
+        print('[INFO]: Backend is up and running')
         beStat=1
         break
     else:
         currentTime = datetime.now()
-        print '[ERROR]: ' + currentTime.strftime('%Y/%m/%d %H:%M:%S') + bcolors.FAIL + ' Backend not responding, try #' + str(i) + bcolors.ENDC
+        print('[ERROR]: ' + currentTime.strftime('%Y/%m/%d %H:%M:%S') + bcolors.FAIL + ' Backend not responding, try #' + str(i) + bcolors.ENDC)
         time.sleep(10)
 
 if beStat == 0:
diff --git a/catalog-be/sdc-backend-init/chef-repo/cookbooks/sdc-catalog-be-setup/templates/default/consumers.py.erb b/catalog-be/sdc-backend-init/chef-repo/cookbooks/sdc-catalog-be-setup/templates/default/consumers.py.erb
index b09b719..02ca9a8 100644
--- a/catalog-be/sdc-backend-init/chef-repo/cookbooks/sdc-catalog-be-setup/templates/default/consumers.py.erb
+++ b/catalog-be/sdc-backend-init/chef-repo/cookbooks/sdc-catalog-be-setup/templates/default/consumers.py.erb
@@ -28,7 +28,7 @@
     proc = subprocess.Popen( command , shell=True , stdout=subprocess.PIPE )
     (out, err) = proc.communicate()
     result = out.strip()
-    return result
+    return str(result, "UTF-8")
 
 
 def checkConsumer(consumerName):
@@ -37,18 +37,18 @@
     proc = subprocess.Popen( command , shell=True , stdout=subprocess.PIPE )
     (out, err) = proc.communicate()
     result = out.strip()
-    return result
+    return str(result, "UTF-8")
 
 
 def createConsumer( consumerName, consumerSalt, consumerPass ):
-    print '[INFO] ' + consumerName
+    print('[INFO] ' + consumerName)
     command="curl -k -s -o /dev/null -w \"%{http_code}\" -X POST -i -H \"Accept: application/json; charset=UTF-8\" -H \"Content-Type: application/json\" -H \"USER_ID: jh0003\" "+PROTOCOL+"://"  + BE_IP  + ":" + BE_PORT + "/sdc2/rest/v1/consumers/ -d '{\"consumerName\": '" + consumerName + "', \"consumerSalt\": '" + consumerSalt + "',\"consumerPassword\": '" + consumerPass + "'}'"
 
     proc = subprocess.Popen( command , shell=True , stdout=subprocess.PIPE)
 
     (out, err) = proc.communicate()
     result = out.strip()
-    return result
+    return str(result, "UTF-8")
 
 
 
@@ -69,25 +69,25 @@
 for i in range(1,10):
     myResult = checkBackend()
     if myResult == '200':
-        print '[INFO]: Backend is up and running'
+        print('[INFO]: Backend is up and running')
         beStat=1
         break
     else:
         currentTime = datetime.now()
-        print '[ERROR]: ' + currentTime.strftime('%Y/%m/%d %H:%M:%S') + bcolors.FAIL + ' Backend not responding, try #' + str(i) + bcolors.ENDC
+        print('[ERROR]: ' + currentTime.strftime('%Y/%m/%d %H:%M:%S') + bcolors.FAIL + ' Backend not responding, try #' + str(i) + bcolors.ENDC)
         time.sleep(10)
 
 if beStat == 0:
-    print '[ERROR]: ' + time.strftime('%Y/%m/%d %H:%M:%S') + bcolors.FAIL + 'Backend is DOWN :-(' + bcolors.ENDC
+    print('[ERROR]: ' + time.strftime('%Y/%m/%d %H:%M:%S') + bcolors.FAIL + 'Backend is DOWN :-(' + bcolors.ENDC)
     exit()
 
 for consumer in consumersList:
     myResult = checkConsumer(consumer)
     if myResult == '200':
-        print '[INFO]: ' + consumer + ' already exists'
+        print('[INFO]: ' + consumer + ' already exists')
     else:
         myResult = createConsumer( consumer, salt, password )
         if myResult == '201':
-            print '[INFO]: ' + consumer + ' created, result: [' + myResult + ']'
+            print('[INFO]: ' + consumer + ' created, result: [' + myResult + ']')
         else:
-            print '[ERROR]: ' + bcolors.FAIL + consumer + bcolors.ENDC + ' error creating , result: [' + myResult + ']'
+            print('[ERROR]: ' + bcolors.FAIL + consumer + bcolors.ENDC + ' error creating , result: [' + myResult + ']')
diff --git a/catalog-be/sdc-backend-init/chef-repo/cookbooks/sdc-catalog-be-setup/templates/default/user.py.erb b/catalog-be/sdc-backend-init/chef-repo/cookbooks/sdc-catalog-be-setup/templates/default/user.py.erb
deleted file mode 100644
index c2f267b..0000000
--- a/catalog-be/sdc-backend-init/chef-repo/cookbooks/sdc-catalog-be-setup/templates/default/user.py.erb
+++ /dev/null
@@ -1,97 +0,0 @@
-#!/usr/bin/python
-import subprocess
-#from time import sleep
-import time
-from datetime import datetime
-
-BE_IP="<%= @be_ip %>"
-BE_PORT="<%= @be_port %>"
-PROTOCOL="<%= @protocol %>"
-
-class bcolors:
-    HEADER    = '\033[95m'
-    OKBLUE    = '\033[94m'
-    OKGREEN   = '\033[92m'
-    WARNING   = '\033[93m'
-    FAIL      = '\033[91m'
-    ENDC      = '\033[0m'
-    BOLD      = '\033[1m'
-    UNDERLINE = '\033[4m'
-
-
-##############################
-#    Functions
-##############################
-def checkBackend():
-    command="curl -k -s -o /dev/null -I -w \"%{http_code}\" -i -H \"Accept: application/json; charset=UTF-8\" -H \"Content-Type: application/json\" -H \"USER_ID: jh0003\" "+PROTOCOL+"://" + BE_IP + ":" + BE_PORT + "/sdc2/rest/v1/user/jh0003"
-
-    proc = subprocess.Popen( command , shell=True , stdout=subprocess.PIPE )
-    (out, err) = proc.communicate()
-    result = out.strip()
-    return result
-
-
-def checkUser(userName):
-    command="curl -k -s -o /dev/null -I -w \"%{http_code}\" -i -H \"Accept: application/json; charset=UTF-8\" -H \"Content-Type: application/json\" -H \"USER_ID: jh0003\" "+PROTOCOL+"://" + BE_IP + ":" + BE_PORT + "/sdc2/rest/v1/user/" + userName
-
-    proc = subprocess.Popen( command , shell=True , stdout=subprocess.PIPE )
-    (out, err) = proc.communicate()
-    result = out.strip()
-    return result
-
-
-
-
-def createUser( firstName, lastName, userId , email_dom , role ):
-    print '[INFO] create first:[' + firstName + '], last:[' + lastName + '], Id:[' + userId + '], email:[' + userId + '@' + email_dom + '], role:[' + role +']'
-    command="curl -k -s -o /dev/null -w \"%{http_code}\" -X POST -i -H \"Accept: application/json; charset=UTF-8\" -H \"Content-Type: application/json\" -H \"USER_ID: jh0003\" "+PROTOCOL+"://" + BE_IP + ":" + BE_PORT + "/sdc2/rest/v1/user/ -d '{\"firstName\": \"" + firstName + "\", \"lastName\": \"" + lastName + "\",\"userId\": \"" + userId + "\",\"email\": \"" + userId + "@" + email_dom + "\",\"role\": \"" + role + "\"}'"
-
-    proc = subprocess.Popen( command , shell=True , stdout=subprocess.PIPE)
-    (out, err) = proc.communicate()
-    result = out.strip()
-    return result
-
-
-
-
-##############################
-#    Definitions
-##############################
-userId    = [ "demo" , "op0001" , "gv0001" , "jh0003" , "jm0007" , "cs0008" ]
-firstName = [ "demo" , "Oper" , "Giuseppe" , "Jimmy" , "Joni" , "Carlos" ]
-lastName  = [ "demo" , "P" , "Verdi" , "Hendrix" , "Mitchell" , "Santana" ]
-role      = [ "ADMIN" , "OPS" , "GOVERNOR" , "ADMIN" , "TESTER" , "DESIGNER" ]
-email_dom = "openecomp.org"
-beStat=0
-
-
-##############################
-#    Main
-##############################
-
-for i in range(1,10):
-    myResult = checkBackend()
-    if myResult == '200':
-        print '[INFO]: Backend is up and running'
-        beStat=1
-        break
-    else:
-        currentTime = datetime.now()
-        print '[ERROR]: ' + currentTime.strftime('%Y/%m/%d %H:%M:%S') + bcolors.FAIL + ' Backend not responding, try #' + str(i) + bcolors.ENDC
-        time.sleep(10)
-
-if beStat == 0:
-    print '[ERROR]: ' + time.strftime('%Y/%m/%d %H:%M:%S') + bcolors.FAIL + 'Backend is DOWN :-(' + bcolors.ENDC
-    exit()
-
-for user in userId:
-    myResult = checkUser(user)
-    pos = userId.index(user)
-    if myResult == '200':
-        print '[INFO]: ' + user + ' already exists'
-    else:
-        myResult = createUser( firstName[pos], lastName[pos], userId[pos], email_dom, role[pos] )
-        if myResult == '201':
-            print '[INFO]: ' + userId[pos] + ' created, result: [' + myResult + ']'
-        else:
-            print '[ERROR]: ' + bcolors.FAIL + userId[pos] + bcolors.ENDC + ' error creating , result: [' + myResult + ']'
diff --git a/catalog-be/sdc-backend-init/startup.sh b/catalog-be/sdc-backend-init/startup.sh
index a379677..83bfbf2 100644
--- a/catalog-be/sdc-backend-init/startup.sh
+++ b/catalog-be/sdc-backend-init/startup.sh
@@ -1,6 +1,6 @@
 #!/bin/sh
 
-cd /home/sdc/chef-solo || exit $?
+cd /home/"${user}"/chef-solo || exit $?
 chef-solo -c solo.rb -E "${ENVNAME}"
 rc=$?
 if [ $rc != 0 ]; then exit $rc; fi
diff --git a/catalog-be/src/main/assembly/normatives.xml b/catalog-be/src/main/assembly/normatives.xml
index 0598672..03ad2f8 100644
--- a/catalog-be/src/main/assembly/normatives.xml
+++ b/catalog-be/src/main/assembly/normatives.xml
@@ -10,9 +10,9 @@
 		<directory>src/main/resources/import</directory>
         <outputDirectory>import</outputDirectory>
 	</fileSet>
-	<fileSet>
-		<directory>src/main/resources/scripts</directory>
-        <outputDirectory>scripts</outputDirectory>
-	</fileSet>
+<!--	<fileSet>-->
+<!--		<directory>src/main/resources/scripts</directory>-->
+<!--        <outputDirectory>scripts</outputDirectory>-->
+<!--	</fileSet>-->
   </fileSets>
 </assembly>
diff --git a/catalog-be/src/main/resources/scripts/.gitignore b/catalog-be/src/main/resources/scripts/.gitignore
new file mode 100644
index 0000000..be20bef
--- /dev/null
+++ b/catalog-be/src/main/resources/scripts/.gitignore
@@ -0,0 +1,132 @@
+# Created by .ignore support plugin (hsz.mobi)
+### Python template
+# Byte-compiled / optimized / DLL files
+__pycache__/
+*.py[cod]
+*$py.class
+
+# C extensions
+*.so
+
+# Distribution / packaging
+.Python
+build/
+develop-eggs/
+dist/
+downloads/
+eggs/
+.eggs/
+lib/
+lib64/
+parts/
+sdist/
+var/
+wheels/
+pip-wheel-metadata/
+share/python-wheels/
+*.egg-info/
+.installed.cfg
+*.egg
+MANIFEST
+
+# PyInstaller
+#  Usually these files are written by a python script from a template
+#  before PyInstaller builds the exe, so as to inject date/other infos into it.
+*.manifest
+*.spec
+
+# Installer logs
+pip-log.txt
+pip-delete-this-directory.txt
+
+# Unit test / coverage reports
+htmlcov/
+.tox/
+.nox/
+.coverage
+.coverage.*
+.cache
+nosetests.xml
+coverage.xml
+*.cover
+*.py,cover
+.hypothesis/
+.pytest_cache/
+
+# Translations
+*.mo
+*.pot
+
+# Django stuff:
+*.log
+local_settings.py
+db.sqlite3
+db.sqlite3-journal
+
+# Flask stuff:
+instance/
+.webassets-cache
+
+# Scrapy stuff:
+.scrapy
+
+# Sphinx documentation
+docs/_build/
+
+# PyBuilder
+target/
+
+# Jupyter Notebook
+.ipynb_checkpoints
+
+# IPython
+profile_default/
+ipython_config.py
+
+# pyenv
+.python-version
+
+# pipenv
+#   According to pypa/pipenv#598, it is recommended to include Pipfile.lock in version control.
+#   However, in case of collaboration, if having platform-specific dependencies or dependencies
+#   having no cross-platform support, pipenv may install dependencies that don't work, or not
+#   install all needed dependencies.
+#Pipfile.lock
+
+# PEP 582; used by e.g. github.com/David-OConnor/pyflow
+__pypackages__/
+
+# Celery stuff
+celerybeat-schedule
+celerybeat.pid
+
+# SageMath parsed files
+*.sage.py
+
+# Environments
+.env
+.venv
+env/
+venv/
+ENV/
+env.bak/
+venv.bak/
+
+# Spyder project settings
+.spyderproject
+.spyproject
+
+# Rope project settings
+.ropeproject
+
+# mkdocs documentation
+/site
+
+# mypy
+.mypy_cache/
+.dmypy.json
+dmypy.json
+
+# Pyre type checker
+.pyre/
+
diff --git a/catalog-be/src/main/resources/scripts/import/tosca/importAnnotationTypes.py b/catalog-be/src/main/resources/scripts/import/tosca/importAnnotationTypes.py
deleted file mode 100644
index 5f0d4ad..0000000
--- a/catalog-be/src/main/resources/scripts/import/tosca/importAnnotationTypes.py
+++ /dev/null
@@ -1,35 +0,0 @@
-import sys
-
-from importCommon import parse_cmd_line_params
-from importNormativeElements import import_element
-
-IMPORT_ANNOTATION_URL = "/sdc2/rest/v1/catalog/uploadType/annotationtypes"
-ANNOTATION_FILE_PATH = "../../../import/tosca/annotation-types/"
-ANNOTATION_ZIP_FILE = "annotationTypesZip"
-ANNOTATION_ELEMENT_NAME = "annotationTypes"
-
-#####################################################################################################################################################################################
-#																																		       										#
-# Import tosca data types																										   													#
-# 																																			   										#
-# activation :																																   										#
-#       python importAnnotaionTypes.py [-s <scheme> | --scheme=<scheme> ] [-i <be host> | --ip=<be host>] [-p <be port> | --port=<be port> ] [-f <input file> | --ifile=<input file> ]  #
-#																																		  	   										#
-# shortest activation (be host = localhost, be port = 8080): 																				   										#
-#		python importAnnotaionTypes.py [-f <input file> | --ifile=<input file> ]												 				           							#
-#																																		       										#
-#####################################################################################################################################################################################
-
-
-def import_annotation_types(scheme, be_host, be_port, admin_user, exit_on_success):
-    import_element(scheme, be_host, be_port, admin_user, exit_on_success, ANNOTATION_FILE_PATH, IMPORT_ANNOTATION_URL,
-                   ANNOTATION_ELEMENT_NAME, ANNOTATION_ZIP_FILE)
-
-
-def main(argv):
-    scheme, be_host, be_port, admin_user = parse_cmd_line_params(argv)
-    import_annotation_types(scheme, be_host, be_port, admin_user, True)
-
-
-if __name__ == "__main__":
-    main(sys.argv[1:])
diff --git a/catalog-be/src/main/resources/scripts/import/tosca/importCategoryTypes.py b/catalog-be/src/main/resources/scripts/import/tosca/importCategoryTypes.py
deleted file mode 100644
index cb361c6..0000000
--- a/catalog-be/src/main/resources/scripts/import/tosca/importCategoryTypes.py
+++ /dev/null
@@ -1,75 +0,0 @@
-from importCommon import *
-from importNormativeElements import createNormativeElement
-
-
-#########################################################################################################################################################################################
-#																																		       											#
-# Import categoriy types																										   														#
-# 																																			   											#
-# activation :																																   											#
-#       python importCategoryTypes.py [-s <scheme> | --scheme=<scheme> ] [-i <be host> | --ip=<be host>] [-p <be port> | --port=<be port> ] [-f <input file> | --ifile=<input file> ]   #
-#																																		  	   											#
-# shortest activation (be host = localhost, be port = 8080): 																				   											#
-#		python importCategoryTypes.py [-f <input file> | --ifile=<input file> ]												 				           									#
-#																																		       											#
-#########################################################################################################################################################################################
-
-def usage():
-    print sys.argv[0], \
-        '[optional -s <scheme> | --scheme=<scheme>, default http] [-i <be host> | --ip=<be host>] [-p <be port> | --port=<be port> ] [-u <user userId> | --user=<user userId> ]'
-
-
-def importCategories(scheme, be_host, be_port, admin_user, exit_on_success, file_dir):
-    result = createNormativeElement(scheme, be_host, be_port, admin_user, file_dir,
-                                    "/sdc2/rest/v1/catalog/uploadType/categories", "categoryTypes", "categoriesZip")
-
-    print_frame_line()
-    print_name_and_return_code(result[0], result[1])
-    print_frame_line()
-
-    if result[1] is None or result[1] not in [200, 201, 409]:
-        error_and_exit(1, None)
-    else:
-        if exit_on_success is True:
-            error_and_exit(0, None)
-
-
-def main(argv):
-    print 'Number of arguments:', len(sys.argv), 'arguments.'
-
-    be_host = 'localhost'
-    be_port = '8080'
-    admin_user = 'jh0003'
-    scheme = 'http'
-
-    try:
-        opts, args = getopt.getopt(argv, "i:p:u:h:s:", ["ip=", "port=", "user=", "scheme="])
-    except getopt.GetoptError:
-        usage()
-        error_and_exit(2, 'Invalid input')
-
-    for opt, arg in opts:
-        # print opt, arg
-        if opt == '-h':
-            usage()
-            sys.exit(3)
-        elif opt in ("-i", "--ip"):
-            be_host = arg
-        elif opt in ("-p", "--port"):
-            be_port = arg
-        elif opt in ("-u", "--user"):
-            admin_user = arg
-        elif opt in ("-s", "--scheme"):
-            scheme = arg
-
-    print 'scheme =', scheme, ', be host =', be_host, ', be port =', be_port, ', user =', admin_user
-
-    if be_host is None:
-        usage()
-        sys.exit(3)
-
-    importCategories(scheme, be_host, be_port, admin_user, True, "../../../import/tosca/categories/")
-
-
-if __name__ == "__main__":
-    main(sys.argv[1:])
diff --git a/catalog-be/src/main/resources/scripts/import/tosca/importCommon.py b/catalog-be/src/main/resources/scripts/import/tosca/importCommon.py
deleted file mode 100644
index 6f976d0..0000000
--- a/catalog-be/src/main/resources/scripts/import/tosca/importCommon.py
+++ /dev/null
@@ -1,90 +0,0 @@
-import getopt
-import sys
-
-###############################################################################################################
-#
-#
-###############################################################################################################
-
-debugFlag = True
-
-
-def join_strings(lst):
-    concat = ""
-    for string in lst:
-        if string is not None:
-            if type(string) == int:
-                string = str(string)
-            concat += (string + " ")
-    return concat
-
-
-def debug(desc, *args):
-    if debugFlag:
-        print desc, join_strings(args)
-
-
-def is_debug():
-    return debugFlag
-
-
-def log(desc, arg=None):
-    print desc, arg
-
-
-def error_and_exit(error_code, error_desc):
-    if error_code > 0:
-        print "status={0}. {1}".format(error_code, '' if error_desc is None else error_desc)
-    else:
-        print "status={0}".format(error_code)
-    sys.exit(error_code)
-
-
-def print_name_and_return_code(name, code):
-    print "{0:30} | {1:6}".format(name, code)
-
-
-def print_frame_line():
-    print "----------------------------------------"
-
-
-def parse_cmd_line_params(argv):
-    print 'Number of arguments:', len(sys.argv), 'arguments.'
-
-    be_host = 'localhost'
-    be_port = '8080'
-    admin_user = 'jh0003'
-    scheme = 'http'
-
-    try:
-        opts, args = getopt.getopt(argv, "i:p:u:h:s:", ["ip=", "port=", "user=", "scheme="])
-    except getopt.GetoptError:
-        usage()
-        error_and_exit(2, 'Invalid input')
-
-    for opt, arg in opts:
-        # print opt, arg
-        if opt == '-h':
-            usage()
-            sys.exit(3)
-        elif opt in ("-i", "--ip"):
-            be_host = arg
-        elif opt in ("-p", "--port"):
-            be_port = arg
-        elif opt in ("-u", "--user"):
-            admin_user = arg
-        elif opt in ("-s", "--scheme"):
-            scheme = arg
-
-    print 'scheme =', scheme, ', be host =', be_host, ', be port =', be_port, ', user =', admin_user
-
-    if be_host is None:
-        usage()
-        sys.exit(3)
-    return scheme, be_host, be_port, admin_user
-
-
-def usage():
-    print sys.argv[
-        0], '[optional -s <scheme> | --scheme=<scheme>, default http ] [-i <be host> | --ip=<be host>] [-p <be port> ' \
-            '| --port=<be port> ] [-u <user userId> | --user=<user userId> ] '
diff --git a/catalog-be/src/main/resources/scripts/import/tosca/importDataTypes.py b/catalog-be/src/main/resources/scripts/import/tosca/importDataTypes.py
deleted file mode 100644
index c37fc87..0000000
--- a/catalog-be/src/main/resources/scripts/import/tosca/importDataTypes.py
+++ /dev/null
@@ -1,76 +0,0 @@
-from importCommon import *
-from importNormativeElements import createNormativeElement
-
-
-#####################################################################################################################################################################################
-#																																		       										#
-# Import tosca data types																										   													#
-# 																																			   										#
-# activation :																																   										#
-#       python importDataTypes.py [-s <scheme> | --scheme=<scheme> ] [-i <be host> | --ip=<be host>] [-p <be port> | --port=<be port> ] [-f <input file> | --ifile=<input file> ] 	#
-#																																		  	   										#
-# shortest activation (be host = localhost, be port = 8080): 																				   										#
-#		python importDataTypes.py [-f <input file> | --ifile=<input file> ]												 				           									#
-#																																		       										#
-#####################################################################################################################################################################################
-
-
-def usage():
-    print sys.argv[0], \
-        '[optional -s <scheme> | --scheme=<scheme>, default http ] [-i <be host> | --ip=<be host>] [-p <be port> | --port=<be port> ] [-u <user userId> | --user=<user userId> ]'
-
-
-def importDataTypes(scheme, be_host, be_port, admin_user, exit_on_success, file_dir):
-    result = createNormativeElement(scheme, be_host, be_port, admin_user, file_dir, "/sdc2/rest/v1/catalog/uploadType/datatypes", "dataTypes", "dataTypesZip")
-
-    print_frame_line()
-    print_name_and_return_code(result[0], result[1])
-    print_frame_line()
-
-    if result[1] is None or result[1] not in [200, 201, 409]:
-        error_and_exit(1, None)
-    else:
-        if exit_on_success is True:
-            error_and_exit(0, None)
-
-
-def main(argv):
-    print 'Number of arguments:', len(sys.argv), 'arguments.'
-
-    be_host = 'localhost'
-    be_port = '8080'
-    admin_user = 'jh0003'
-    scheme = 'http'
-
-    try:
-        opts, args = getopt.getopt(argv, "i:p:u:h:s:", ["ip=", "port=", "user=", "scheme="])
-    except getopt.GetoptError:
-        usage()
-        error_and_exit(2, 'Invalid input')
-
-    for opt, arg in opts:
-    #print opt, arg
-        if opt == '-h':
-            usage()
-            sys.exit(3)
-        elif opt in ("-i", "--ip"):
-            be_host = arg
-        elif opt in ("-p", "--port"):
-            be_port = arg
-        elif opt in ("-u", "--user"):
-            admin_user = arg
-        elif opt in ("-s", "--scheme"):
-            scheme = arg
-
-    print 'scheme =', scheme, ', be host =', be_host, ', be port =', be_port, ', user =', admin_user
-
-    if be_host is None:
-        usage()
-        sys.exit(3)
-
-    importDataTypes(scheme, be_host, be_port, admin_user, True, "../../../import/tosca/data-types/")
-
-
-if __name__ == "__main__":
-        main(sys.argv[1:])
-
diff --git a/catalog-be/src/main/resources/scripts/import/tosca/importGroupTypes.py b/catalog-be/src/main/resources/scripts/import/tosca/importGroupTypes.py
deleted file mode 100644
index 7db6033..0000000
--- a/catalog-be/src/main/resources/scripts/import/tosca/importGroupTypes.py
+++ /dev/null
@@ -1,75 +0,0 @@
-from importCommon import *
-from importNormativeElements import createNormativeElement
-
-
-#####################################################################################################################################################################################
-#																																		       										#
-# Import tosca data types																										   													#
-# 																																			   										#
-# activation :																																   										#
-#       python importGroupTypes.py [-s <scheme> | --scheme=<scheme> ] [-i <be host> | --ip=<be host>] [-p <be port> | --port=<be port> ] [-f <input file> | --ifile=<input file> ]  #
-#																																		  	   										#
-# shortest activation (be host = localhost, be port = 8080): 																				   										#
-#		python importGroupTypes.py [-f <input file> | --ifile=<input file> ]												 				           								#
-#																																		       										#
-#####################################################################################################################################################################################
-
-def usage():
-    print sys.argv[0], \
-        '[optional -s <scheme> | --scheme=<scheme>, default http ] [-i <be host> | --ip=<be host>] [-p <be port> | --port=<be port> ] [-u <user userId> | --user=<user userId> ]'
-
-
-def importGroupTypes(scheme, be_host, be_port, admin_user, exit_on_success, file_dir):
-    result = createNormativeElement(scheme, be_host, be_port, admin_user, file_dir,
-                                    "/sdc2/rest/v1/catalog/uploadType/grouptypes", "groupTypes", "groupTypesZip", True)
-
-    print_frame_line()
-    print_name_and_return_code(result[0], result[1])
-    print_frame_line()
-
-    if result[1] is None or result[1] not in [200, 201, 409]:
-        error_and_exit(1, None)
-    else:
-        if exit_on_success:
-            error_and_exit(0, None)
-
-
-def main(argv):
-    print 'Number of arguments:', len(sys.argv), 'arguments.'
-
-    be_host = 'localhost'
-    be_port = '8080'
-    admin_user = 'jh0003'
-    scheme = 'http'
-
-    try:
-        opts, args = getopt.getopt(argv, "i:p:u:h:s:", ["ip=", "port=", "user=", "scheme="])
-    except getopt.GetoptError:
-        usage()
-        error_and_exit(2, 'Invalid input')
-
-    for opt, arg in opts:
-        # print opt, arg
-        if opt == '-h':
-            usage()
-            sys.exit(3)
-        elif opt in ("-i", "--ip"):
-            be_host = arg
-        elif opt in ("-p", "--port"):
-            be_port = arg
-        elif opt in ("-u", "--user"):
-            admin_user = arg
-        elif opt in ("-s", "--scheme"):
-            scheme = arg
-
-    print 'scheme =', scheme, ', be host =', be_host, ', be port =', be_port, ', user =', admin_user
-
-    if be_host is None:
-        usage()
-        sys.exit(3)
-
-    importGroupTypes(scheme, be_host, be_port, admin_user, True, "../../../import/tosca/group-types/")
-
-
-if __name__ == "__main__":
-    main(sys.argv[1:])
diff --git a/catalog-be/src/main/resources/scripts/import/tosca/importHeatTypes.py b/catalog-be/src/main/resources/scripts/import/tosca/importHeatTypes.py
deleted file mode 100644
index 92b8634..0000000
--- a/catalog-be/src/main/resources/scripts/import/tosca/importHeatTypes.py
+++ /dev/null
@@ -1,137 +0,0 @@
-from importNormativeTypes import *
-
-
-#####################################################################################################################################################################################
-#																																		       										#
-# Import heat types																										   															#
-# 																																			   										#
-# activation :																																   										#
-#       python importHeatTypes.py [-s <scheme> | --scheme=<scheme> ] [-i <be host> | --ip=<be host>] [-p <be port> | --port=<be port> ] [-f <input file> | --ifile=<input file> ]	#
-#																																		  	   										#
-# shortest activation (be host = localhost, be port = 8080): 																				   										#
-#		python importHeatTypes.py [-f <input file> | --ifile=<input file> ]												 				           									#
-#																																		       										#
-#####################################################################################################################################################################################
-
-def importHeatTypes(scheme, be_host, be_port, admin_user, file_dir, update_version):
-    heat_types = ["globalNetwork",
-                  "globalPort",
-                  "globalCompute",
-                  "volume",
-                  "cinderVolume",
-                  "contrailVirtualNetwork",
-                  "neutronNet",
-                  "neutronPort",
-                  "novaServer",
-                  "extVl",
-                  "internalVl",
-                  "extCp",
-                  "vl",
-                  "eline",
-                  "abstractSubstitute",
-                  "Generic_VFC",
-                  "Generic_VF",
-                  "Generic_CR",
-                  "Generic_PNF",
-                  "Generic_Service",
-                  "contrailNetworkRules",
-                  "contrailPort",
-                  "portMirroring",
-                  "serviceProxy",
-                  "contrailV2NetworkRules",
-                  "contrailV2VirtualNetwork",
-                  "securityRules",
-                  "contrailAbstractSubstitute",
-                  "contrailCompute",
-                  "contrailV2VirtualMachineInterface",
-                  "subInterface",
-                  "contrailV2VLANSubInterface",
-                  "multiFlavorVFC",
-                  "vnfConfiguration",
-                  "extCp2",
-                  "extNeutronCP",
-                  "extContrailCP",
-                  "portMirroringByPolicy",
-                  "forwardingPath",
-                  "configuration",
-                  "VRFObject",
-                  "extVirtualMachineInterfaceCP",
-                  "VLANNetworkReceptor",
-                  "VRFEntry",
-                  "subInterfaceV2",
-                  "contrailV2VLANSubInterfaceV2",
-                  "fabricConfiguration"]
-
-    response_codes = [200, 201]
-
-    if update_version == 'false':
-        response_codes = [200, 201, 409]
-
-    results = []
-    for heat_type in heat_types:
-        result = createNormativeType(scheme, be_host, be_port, admin_user, file_dir, heat_type, update_version)
-        results.append(result)
-        if result[1] is None or result[1] not in response_codes:
-            print "Failed creating heat type " + heat_type + ". " + str(result[1])
-    return results
-
-
-def main(argv):
-    print 'Number of arguments:', len(sys.argv), 'arguments.'
-
-    be_host = 'localhost'
-    be_port = '8080'
-    admin_user = 'jh0003'
-    update_version = 'true'
-    scheme = 'http'
-
-    try:
-        opts, args = getopt.getopt(argv, "i:p:u:v:h:s:", ["ip=", "port=", "user=", "updateversion=", "scheme="])
-    except getopt.GetoptError:
-        usage()
-        error_and_exit(2, 'Invalid input')
-
-    for opt, arg in opts:
-        # print opt, arg
-        if opt == '-h':
-            usage()
-            sys.exit(3)
-        elif opt in ("-i", "--ip"):
-            be_host = arg
-        elif opt in ("-p", "--port"):
-            be_port = arg
-        elif opt in ("-u", "--user"):
-            admin_user = arg
-        elif opt in ("-s", "--scheme"):
-            scheme = arg
-        elif opt in ("-v", "--updateversion"):
-            if arg.lower() == "false" or arg.lower() == "no":
-                update_version = 'false'
-
-    print 'scheme =', scheme, ', be host =', be_host, ', be port =', be_port, ', user =', admin_user
-
-    if be_host is None:
-        usage()
-        sys.exit(3)
-
-    results = importHeatTypes(scheme, be_host, be_port, admin_user, "../../../import/tosca/heat-types/", update_version)
-
-    print "-----------------------------"
-    for result in results:
-        print "{0:20} | {1:6}".format(result[0], result[1])
-    print "-----------------------------"
-
-    response_codes = [200, 201]
-
-    if update_version == 'false':
-        response_codes = [200, 201, 409]
-
-    failed_normatives = filter(lambda x: x[1] is None or x[1] not in response_codes, results)
-    if len(list(failed_normatives)) > 0:
-        error_and_exit(1, None)
-    else:
-        error_and_exit(0, None)
-
-
-if __name__ == "__main__":
-    main(sys.argv[1:])
diff --git a/catalog-be/src/main/resources/scripts/import/tosca/importNfvTypes.py b/catalog-be/src/main/resources/scripts/import/tosca/importNfvTypes.py
deleted file mode 100644
index ed68695..0000000
--- a/catalog-be/src/main/resources/scripts/import/tosca/importNfvTypes.py
+++ /dev/null
@@ -1,115 +0,0 @@
-from importNormativeTypes import *
-
-
-#####################################################################################################################################################################################################
-#																																		       														#
-# Import Nfv Types from a given file																										   														#
-# 																																			   														#
-# activation :																																   														#
-#       python importNfvTypes.py [optional -s <scheme> | --scheme=<scheme>, default http] [-i <be host> | --ip=<be host>] [-p <be port> | --port=<be port> ] [-f <input file> | --ifile=<input file> ] #
-#																																		  	  														#
-# shortest activation (be host = localhost, be port = 8080): 																				   														#
-#		python importUsers.py [-f <input file> | --ifile=<input file> ]												 				           														#
-#																																		       														#
-#####################################################################################################################################################################################################
-
-def importNfvTypes(scheme, be_host, be_port, admin_user, file_dir, update_version):
-    nfv_types = ["underlayVpn",
-                 "overlayTunnel",
-                 "genericNeutronNet",
-                 "allottedResource",
-                 "extImageFile",
-                 "extLocalStorage",
-                 "extZteCP",
-                 "extZteVDU",
-                 "extZteVL",
-                 "NSD",
-                 "VDU",
-                 "vduCompute",
-                 "Cp",
-                 "vduVirtualStorage",
-                 "vduVirtualBlockStorage",
-                 "vduVirtualFileStorage",
-                 "vduVirtualObjectStorage",
-                 "vduVirtualStorage",
-                 "vnfVirtualLink",
-                 "vnfExtCp",
-                 "vduCp",
-                 "VNF",
-                 "PonUni",
-                 "OltNni",
-                 "OntNni"]
-
-    response_codes = [200, 201]
-
-    if update_version == 'false':
-        response_codes = [200, 201, 409]
-
-    results = []
-    for nfv_type in nfv_types:
-        result = createNormativeType(scheme, be_host, be_port, admin_user, file_dir, nfv_type, update_version)
-        results.append(result)
-        if result[1] is None or result[1] not in response_codes:
-            print "Failed creating heat type " + nfv_type + ". " + str(result[1])
-    return results
-
-
-def main(argv):
-    print 'Number of arguments:', len(sys.argv), 'arguments.'
-
-    be_host = 'localhost'
-    be_port = '8080'
-    admin_user = 'jh0003'
-    update_version = 'true'
-    scheme = 'http'
-
-    try:
-        opts, args = getopt.getopt(argv, "i:p:u:v:h:", ["ip=", "port=", "user=", "updateversion="])
-    except getopt.GetoptError:
-        usage()
-        error_and_exit(2, 'Invalid input')
-
-    for opt, arg in opts:
-        # print opt, arg
-        if opt == '-h':
-            usage()
-            sys.exit(3)
-        elif opt in ("-i", "--ip"):
-            be_host = arg
-        elif opt in ("-p", "--port"):
-            be_port = arg
-        elif opt in ("-u", "--user"):
-            admin_user = arg
-        elif opt in ("-s", "--scheme"):
-            scheme = arg
-        elif opt in ("-v", "--updateversion"):
-            if arg.lower() == "false" or arg.lower() == "no":
-                update_version = 'false'
-
-    print 'scheme =', scheme, ',be host =', be_host, ', be port =', be_port, ', user =', admin_user
-
-    if be_host is None:
-        usage()
-        sys.exit(3)
-
-    results = importNfvTypes(scheme, be_host, be_port, admin_user, "../../../import/tosca/nfv-types/", update_version)
-
-    print "-----------------------------"
-    for result in results:
-        print "{0:20} | {1:6}".format(result[0], result[1])
-    print "-----------------------------"
-
-    response_codes = [200, 201]
-
-    if update_version == 'false':
-        response_codes = [200, 201, 409]
-
-    failed_normatives = filter(lambda x: x[1] is None or x[1] not in response_codes, results)
-    if len(list(failed_normatives)) > 0:
-        error_and_exit(1, None)
-    else:
-        error_and_exit(0, None)
-
-
-if __name__ == "__main__":
-    main(sys.argv[1:])
diff --git a/catalog-be/src/main/resources/scripts/import/tosca/importNodeType.py b/catalog-be/src/main/resources/scripts/import/tosca/importNodeType.py
deleted file mode 100644
index 5552199..0000000
--- a/catalog-be/src/main/resources/scripts/import/tosca/importNodeType.py
+++ /dev/null
@@ -1,170 +0,0 @@
-import json
-import os
-import zipfile
-from StringIO import StringIO
-
-import pycurl
-
-import importCommon
-from importCommon import *
-
-
-################################################################################################################################################
-#																																		       #	
-################################################################################################################################################
-
-
-def createZipFromYml(ymlFile, zipFile):
-    zip = zipfile.ZipFile(zipFile, 'w', zipfile.ZIP_DEFLATED)
-
-    zip.write(ymlFile, os.path.basename(ymlFile))
-    zip.close()
-
-
-def createUserNormativeType(scheme, be_host, be_port, admin_user, file_dir, element_name):
-    try:
-        log("in create normative type ", element_name)
-        debug("userId", admin_user)
-        debug("fileDir", file_dir)
-
-        _buffer = StringIO()
-        c = pycurl.Curl()
-
-        url = scheme + '://' + be_host + ':' + be_port + '/sdc2/rest/v1/catalog/upload/multipart'
-        c.setopt(c.URL, url)
-        c.setopt(c.POST, 1)
-
-        admin_header = 'USER_ID: ' + admin_user
-        # c.setopt(pycurl.HTTPHEADER, ['Content-Type: application/json', 'Accept: application/json', adminHeader])
-        c.setopt(pycurl.HTTPHEADER, [admin_header])
-
-        ymlFile = file_dir + element_name + "/normative-types-new-" + element_name + ".yml"
-        zipFile = file_dir + element_name + "/normative-types-new-" + element_name + ".zip"
-        debug(ymlFile)
-        debug(zipFile)
-        path = zipFile
-        debug("path=" + path)
-        current_json_file = file_dir + element_name + "/" + element_name + ".json"
-        debug(current_json_file)
-        json_file = open(current_json_file)
-
-        debug("before load json")
-        json_data = json.load(json_file, strict=False)
-        debug(json_data)
-
-        json_as_str = json.dumps(json_data)
-        debug(path)
-        send = [('resourceMetadata', json_as_str), ('resourceZip', (pycurl.FORM_FILE, path))]
-        debug(send)
-        c.setopt(pycurl.HTTPPOST, send)
-
-        c.setopt(c.WRITEFUNCTION, _buffer.write)
-        if scheme == 'https':
-            c.setopt(pycurl.SSL_VERIFYPEER, 0)
-            c.setopt(pycurl.SSL_VERIFYHOST, 0)
-
-        c.perform()
-
-        # print("Before get response code")
-        http_res = c.getinfo(c.RESPONSE_CODE)
-        if http_res is not None:
-            debug("http response=", http_res)
-        # print('Status: ' + str(responseCode))
-        debug(_buffer.getvalue())
-        c.close()
-
-        return element_name, http_res, _buffer.getvalue()
-
-    except Exception as inst:
-        print("ERROR=" + str(inst))
-        return element_name, None, None
-
-
-def usage():
-    print sys.argv[0], \
-        '[optional -s <scheme> | --scheme=<scheme>, default http] [-i <be host> | --ip=<be host>] [-p <be port> | --port=<be port> ] [-u <user userId> | --user=<user userId> ] [-l <directory base location> | --location=<directory base location>] [-e <element name> | --element=<element name>]'
-    print "----------------- Example -------------------"
-    print "python importNodeType.py -d false -l  /home/vagrant/catalog-be-1604.0.2.15.6-SNAPSHOT/scripts/import/tosca/../../../import/tosca/user-normative-types/ -e root1"
-
-
-def main(argv):
-    print 'Number of arguments:', len(sys.argv), 'arguments.'
-
-    be_host = 'localhost'
-    be_port = '8080'
-    admin_user = 'jh0003'
-    debug_f = None
-    location = None
-    element = None
-    scheme = 'http'
-
-    try:
-        opts, args = getopt.getopt(argv, "i:p:u:d:l:e:h:s:",
-                                   ["ip=", "port=", "user=", "location=", "element=", "debug=", "scheme="])
-    except getopt.GetoptError:
-        usage()
-        error_and_exit(2, 'Invalid input')
-
-    for opt, arg in opts:
-        # print opt, arg
-        if opt == '-h':
-            usage()
-            sys.exit(3)
-        elif opt in ("-i", "--ip"):
-            be_host = arg
-        elif opt in ("-p", "--port"):
-            be_port = arg
-        elif opt in ("-u", "--user"):
-            admin_user = arg
-        elif opt in ("-l", "--location"):
-            location = arg
-        elif opt in ("-e", "--element"):
-            element = arg
-        elif opt in ("-s", "--scheme"):
-            scheme = arg
-        elif opt in ("-d", "--debug"):
-            print arg
-            debug_f = bool(arg.lower() == "true" or arg.lower() == "yes")
-
-    print 'scheme =', scheme, ', be host =', be_host, ', be port =', be_port, ', user =', admin_user
-
-    if be_host is None:
-        usage()
-        sys.exit(3)
-
-    if debug_f is not None:
-        print 'set debug mode to ' + str(debug_f)
-        importCommon.debugFlag = debug_f
-
-    if location is None:
-        print 'Missing file location'
-        usage()
-        sys.exit(3)
-
-    if element is None:
-        print 'Missing element name. E.g. root, compute, ...'
-        usage()
-        sys.exit(3)
-
-    # pathdir = os.path.dirname(os.path.realpath(sys.argv[0]))
-
-    # baseFileLocation = pathdir + "/../../../import/tosca/"
-    # fileDir = baseFileLocation + "user-normative-types/"
-
-    # normativeType = "root1"
-
-    result = createUserNormativeType(scheme, be_host, be_port, admin_user, location, element)
-    # result = createUserNormativeType(beHost, bePort, adminUser, fileDir, normativeType)
-    print "---------------------------------------"
-    print "{0:30} | {1:6}".format(result[0], result[1])
-    print "---------------------------------------"
-
-    if result[1] is None or result[1] not in [200, 201]:
-        print "Failed creating normative type " + element + ". " + str(result[1])
-        error_and_exit(1, None)
-
-    error_and_exit(0, None)
-
-
-if __name__ == "__main__":
-    main(sys.argv[1:])
diff --git a/catalog-be/src/main/resources/scripts/import/tosca/importNormativeAll.py b/catalog-be/src/main/resources/scripts/import/tosca/importNormativeAll.py
deleted file mode 100644
index c61b8bc..0000000
--- a/catalog-be/src/main/resources/scripts/import/tosca/importNormativeAll.py
+++ /dev/null
@@ -1,145 +0,0 @@
-import os
-import time
-
-import importCommon
-from importAnnotationTypes import import_annotation_types
-from importCategoryTypes import importCategories
-from importCommon import *
-from importDataTypes import importDataTypes
-from importGroupTypes import importGroupTypes
-from importHeatTypes import importHeatTypes
-from importNormativeCapabilities import importNormativeCapabilities
-from importNormativeInterfaceLifecycleTypes import importNormativeInterfaceLifecycleType
-from importNormativeRelationships import importNormativeRelationships
-from importNormativeTypes import importNormativeTypes
-from importPolicyTypes import importPolicyTypes
-
-
-#################################################################################################################################################################################################################################
-#																																		       																					#
-# Import all users from a given file																										   																					#
-# 																																			   																					#
-# activation :																																   																					#
-#       python importNormativeAll.py [-s <scheme> | --scheme=<scheme> ] [-i <be host> | --ip=<be host>] [-p <be port> | --port=<be port> ] [-u <user userId> | --user=<user userId> ] [-d <true|false> | --debug=<true|false>]	#
-#									 [-v <true|false> | --updateversion=<true|false>]																																			#
-#																																		  	   																					#
-# shortest activation (be host = localhost, be port = 8080, user = jh0003): 																				   																	#
-#		python importNormativeAll.py											 				           																														#
-#																																		       																					#
-#################################################################################################################################################################################################################################
-
-def usage():
-    print sys.argv[0], \
-        '[optional -s <scheme> | --scheme=<scheme>, default http] [-i <be host> | --ip=<be host>] [-p <be port> | --port=<be port> ] [-u <user userId> | --user=<user userId> ] [-d <true|false> | --debug=<true|false>] [-v <true|false> | --updateversion=<true|false>]'
-
-
-def handleResults(results, update_version):
-    print_frame_line()
-    for result in results:
-        print_name_and_return_code(result[0], result[1])
-    print_frame_line()
-
-    response_codes = [200, 201]
-
-    if update_version == 'false':
-        response_codes = [200, 201, 409]
-
-    failed_results = filter(lambda x: x[1] is None or x[1] not in response_codes, results)
-    if len(list(failed_results)) > 0:
-        error_and_exit(1, None)
-
-
-def main(argv):
-    print 'Number of arguments:', len(sys.argv), 'arguments.'
-
-    be_host = 'localhost'
-    be_port = '8080'
-    admin_user = 'jh0003'
-    debug_f = None
-    update_version = 'true'
-    importCommon.debugFlag = False
-    scheme = 'http'
-
-    try:
-        opts, args = getopt.getopt(argv, "i:p:u:d:v:h:s:",
-                                   ["ip=", "port=", "user=", "debug=", "updateversion=", "scheme="])
-    except getopt.GetoptError:
-        usage()
-        error_and_exit(2, 'Invalid input')
-
-    for opt, arg in opts:
-        # print opt, arg
-        if opt == '-h':
-            usage()
-            sys.exit(3)
-        elif opt in ("-i", "--ip"):
-            be_host = arg
-        elif opt in ("-p", "--port"):
-            be_port = arg
-        elif opt in ("-u", "--user"):
-            admin_user = arg
-        elif opt in ("-s", "--scheme"):
-            scheme = arg
-        elif opt in ("-d", "--debug"):
-            print arg
-            debug_f = bool(arg.lower() == "true" or arg.lower() == "yes")
-        elif opt in ("-v", "--updateversion"):
-            print arg
-            if arg.lower() == "false" or arg.lower() == "no":
-                update_version = 'false'
-
-    print 'scheme =', scheme, ', be host =', be_host, ', be port =', be_port, ', user =', admin_user, ', debug =', debug_f, ', updateversion =', update_version
-
-    if debug_f is not None:
-        print 'set debug mode to ' + str(debug_f)
-        importCommon.debugFlag = debug_f
-
-    if be_host is None:
-        usage()
-        sys.exit(3)
-
-    print sys.argv[0]
-    path_dir = os.path.dirname(os.path.realpath(sys.argv[0]))
-    debug("path dir =" + path_dir)
-
-    base_file_location = path_dir + "/../../../import/tosca/"
-
-    file_location = base_file_location + "data-types/"
-    importDataTypes(scheme, be_host, be_port, admin_user, False, file_location)
-
-    print 'sleep until data type cache is updated'
-    time.sleep(70)
-
-    file_location = base_file_location + "capability-types/"
-    importNormativeCapabilities(scheme, be_host, be_port, admin_user, False, file_location)
-
-    file_location = base_file_location + "relationship-types/"
-    importNormativeRelationships(scheme, be_host, be_port, admin_user, False, file_location)
-
-    file_location = base_file_location + "interface-lifecycle-types/"
-    importNormativeInterfaceLifecycleType(scheme, be_host, be_port, admin_user, False, file_location)
-
-    file_location = base_file_location + "categories/"
-    importCategories(scheme, be_host, be_port, admin_user, False, file_location)
-
-    file_location = base_file_location + "normative-types/"
-    results = importNormativeTypes(scheme, be_host, be_port, admin_user, file_location, update_version)
-    handleResults(results, update_version)
-
-    file_location = base_file_location + "heat-types/"
-    results_heat = importHeatTypes(scheme, be_host, be_port, admin_user, file_location, update_version)
-    handleResults(results_heat, update_version)
-
-    file_location = base_file_location + "group-types/"
-    importGroupTypes(scheme, be_host, be_port, admin_user, False, file_location)
-
-    file_location = base_file_location + "policy-types/"
-    importPolicyTypes(scheme, be_host, be_port, admin_user, False, file_location)
-
-    import_annotation_types(scheme, be_host, be_port, admin_user, False)
-
-    error_and_exit(0, None)
-
-
-if __name__ == "__main__":
-    main(sys.argv[1:])
diff --git a/catalog-be/src/main/resources/scripts/import/tosca/importNormativeCapabilities.py b/catalog-be/src/main/resources/scripts/import/tosca/importNormativeCapabilities.py
deleted file mode 100644
index 989233d..0000000
--- a/catalog-be/src/main/resources/scripts/import/tosca/importNormativeCapabilities.py
+++ /dev/null
@@ -1,78 +0,0 @@
-import importCommon
-from importCommon import *
-from importNormativeElements import createNormativeElement
-
-
-#################################################################################################################################################################################################
-#																																		       													#
-# Import normative capabilities																										   															#
-# 																																			   													#
-# activation :																																   													#
-#       python importNormativeCapabilities.py [-s <scheme> | --scheme=<scheme> ] [-i <be host> | --ip=<be host>] [-p <be port> | --port=<be port> ] [-f <input file> | --ifile=<input file> ]	#
-#																																		  	  													#
-# shortest activation (be host = localhost, be port = 8080): 																				   													#
-#		python importNormativeCapabilities.py [-f <input file> | --ifile=<input file> ]												 				           									#
-#																																		       													#
-#################################################################################################################################################################################################
-
-
-def usage():
-    print sys.argv[0], \
-        '[optional -s <scheme> | --scheme=<scheme>, default http] [-i <be host> | --ip=<be host>] [-p <be port> | --port=<be port> ] [-u <user userId> | --user=<user userId> ]'
-
-
-def importNormativeCapabilities(scheme, be_host, be_port, admin_user, exit_on_success, file_dir):
-    result = createNormativeElement(scheme, be_host, be_port, admin_user, file_dir,
-                                    "/sdc2/rest/v1/catalog/uploadType/capability", "capabilityTypes",
-                                    "capabilityTypeZip")
-
-    print_frame_line()
-    print_name_and_return_code(result[0], result[1])
-    print_frame_line()
-
-    if result[1] is None or result[1] not in [200, 201, 409]:
-        importCommon.error_and_exit(1, None)
-    else:
-        if exit_on_success is True:
-            importCommon.error_and_exit(0, None)
-
-
-def main(argv):
-    print 'Number of arguments:', len(sys.argv), 'arguments.'
-
-    be_host = 'localhost'
-    be_port = '8080'
-    admin_user = 'jh0003'
-    scheme = 'http'
-
-    try:
-        opts, args = getopt.getopt(argv, "i:p:u:h:s:", ["ip=", "port=", "user=", "scheme="])
-    except getopt.GetoptError:
-        usage()
-        importCommon.error_and_exit(2, 'Invalid input')
-
-    for opt, arg in opts:
-        # print opt, arg
-        if opt == '-h':
-            usage()
-            sys.exit(3)
-        elif opt in ("-i", "--ip"):
-            be_host = arg
-        elif opt in ("-p", "--port"):
-            be_port = arg
-        elif opt in ("-u", "--user"):
-            admin_user = arg
-        elif opt in ("-s", "--scheme"):
-            scheme = arg
-
-    print 'scheme =', scheme, ', be host =', be_host, ', be port =', be_port, ', user =', admin_user
-
-    if be_host is None:
-        usage()
-        sys.exit(3)
-
-    importNormativeCapabilities(scheme, be_host, be_port, admin_user, True, "../../../import/tosca/capability-types/")
-
-
-if __name__ == "__main__":
-    main(sys.argv[1:])
diff --git a/catalog-be/src/main/resources/scripts/import/tosca/importNormativeElements.py b/catalog-be/src/main/resources/scripts/import/tosca/importNormativeElements.py
deleted file mode 100644
index 47ed633..0000000
--- a/catalog-be/src/main/resources/scripts/import/tosca/importNormativeElements.py
+++ /dev/null
@@ -1,108 +0,0 @@
-import pycurl
-import zipfile
-from StringIO import StringIO
-import json
-import copy
-from importCommon import *
-
-
-#################################################################################################################################################################################
-#																																		       									#
-# Import all users from a given file																										   									#
-# 																																			   									#
-# activation :																																   									#
-#       python importUsers.py [-s <scheme> | --scheme=<scheme> ] [-i <be host> | --ip=<be host>] [-p <be port> | --port=<be port> ] [-f <input file> | --ifile=<input file> ]   #
-#																																		  	   									#
-# shortest activation (be host = localhost, be port = 8080): 																				   									#
-#		python importUsers.py [-f <input file> | --ifile=<input file> ]												 				           									#
-#																																		       									#
-#################################################################################################################################################################################
-def import_element(scheme, be_host, be_port, admin_user, exit_on_success, file_dir, url_suffix, element_name, element_form_name,
-                   with_metadata=False):
-    result = createNormativeElement(scheme, be_host, be_port, admin_user, file_dir, url_suffix, element_name, element_form_name, with_metadata)
-    print_frame_line()
-    print_name_and_return_code(result[0], result[1])
-    print_frame_line()
-
-    if result[1] is None or result[1] not in [200, 201, 409]:
-        error_and_exit(1, None)
-    else:
-        if exit_on_success:
-            error_and_exit(0, None)
-
-
-
-def createNormativeElement(scheme, be_host, be_port, admin_user, file_dir, url_suffix, element_name, element_form_name,
-                           with_metadata=False):
-    try:
-        log("in create normative element ", element_name)
-        buffer = StringIO()
-        c = pycurl.Curl()
-
-        url = scheme + '://' + be_host + ':' + be_port + url_suffix
-        c.setopt(c.URL, url)
-        c.setopt(c.POST, 1)
-
-        admin_header = 'USER_ID: ' + admin_user
-        c.setopt(pycurl.HTTPHEADER, [admin_header])
-
-        type_file_name = file_dir + "/" + element_name
-
-        multi_part_form_data = create_multipart_form_data(element_form_name, type_file_name, with_metadata, element_name)
-
-        c.setopt(pycurl.HTTPPOST, multi_part_form_data)
-        c.setopt(c.WRITEFUNCTION, buffer.write)
-
-        if scheme == 'https':
-            c.setopt(pycurl.SSL_VERIFYPEER, 0)
-            c.setopt(pycurl.SSL_VERIFYHOST, 0)
-
-        c.perform()
-
-        http_res = c.getinfo(c.RESPONSE_CODE)
-        if http_res is not None:
-            debug("http response=", http_res)
-        debug("response buffer", buffer.getvalue())
-        c.close()
-        return (element_name, http_res, buffer.getvalue())
-
-    except Exception as inst:
-        print("ERROR=" + str(inst))
-        return (element_name, None, None)
-
-
-def create_multipart_form_data(element_form_name, type_file_name, with_metadata, element_name):
-    tosca_type_zip_part = create_zip_file_multi_part(element_form_name, type_file_name, element_name)
-    multi_part_form_data = [tosca_type_zip_part]
-    if with_metadata:
-        metadata_type_part = create_metadata_multipart(type_file_name)
-        multi_part_form_data.append(metadata_type_part)
-    debug(multi_part_form_data)
-    return multi_part_form_data
-
-
-def create_metadata_multipart(type_file_name):
-    metadata = create_json_metadata_str(type_file_name)
-    return ("toscaTypeMetadata", metadata)
-
-
-def create_zip_file_multi_part(element_form_name, type_file_name, element_name):
-    zf = zipfile.ZipFile(type_file_name + ".zip", "w")
-    zf.write(type_file_name + '.yml', element_name + '.yml')
-    zf.close()
-
-    tosca_type_zip_path = type_file_name + ".zip"
-    tosca_type_zip_part = (element_form_name, (pycurl.FORM_FILE, tosca_type_zip_path))
-    return tosca_type_zip_part
-
-
-def create_json_metadata_str(file_name):
-    type_metadata_json_file = file_name + ".json"
-    debug(type_metadata_json_file)
-    json_file = open(type_metadata_json_file)
-
-    debug("before load json")
-    json_data = json.load(json_file, strict=False)
-    debug(json_data)
-
-    return json.dumps(json_data)
diff --git a/catalog-be/src/main/resources/scripts/import/tosca/importNormativeInterfaceLifecycleTypes.py b/catalog-be/src/main/resources/scripts/import/tosca/importNormativeInterfaceLifecycleTypes.py
deleted file mode 100644
index 1e6b9ca..0000000
--- a/catalog-be/src/main/resources/scripts/import/tosca/importNormativeInterfaceLifecycleTypes.py
+++ /dev/null
@@ -1,77 +0,0 @@
-from importCommon import *
-from importNormativeElements import createNormativeElement
-
-
-#############################################################################################################################################################################################################
-#																																		       																#
-# Import all users from a given file																										   																#
-# 																																			   																#
-# activation :																																   																#
-#       python importNormativeInterfaceLifecycleTypes.py  [-s <scheme> | --scheme=<scheme> ] [-i <be host> | --ip=<be host>] [-p <be port> | --port=<be port> ] [-f <input file> | --ifile=<input file> ]	#
-#																																		  	   																#
-# shortest activation (be host = localhost, be port = 8080): 																				   																#
-#		python importNormativeInterfaceLifecycleTypes.py [-f <input file> | --ifile=<input file> ]												 				           									#
-#																																		       																#
-#############################################################################################################################################################################################################
-
-def usage():
-    print sys.argv[0], \
-        '[optional -s <scheme> | --scheme=<scheme>, default http] [-i <be host> | --ip=<be host>] [-p <be port> | --port=<be port> ] [-u <user userId> | --user=<user userId> ]'
-
-
-def importNormativeInterfaceLifecycleType(scheme, be_host, be_port, admin_user, exit_on_success, file_dir):
-    result = createNormativeElement(scheme, be_host, be_port, admin_user, file_dir,
-                                    "/sdc2/rest/v1/catalog/uploadType/interfaceLifecycle", "interfaceLifecycleTypes",
-                                    "interfaceLifecycleTypeZip")
-
-    print_frame_line()
-    print_name_and_return_code(result[0], result[1])
-    print_frame_line()
-
-    if result[1] is None or result[1] not in [200, 201, 409]:
-        error_and_exit(1, None)
-    else:
-        if exit_on_success is True:
-            error_and_exit(0, None)
-
-
-def main(argv):
-    print 'Number of arguments:', len(sys.argv), 'arguments.'
-
-    be_host = 'localhost'
-    be_port = '8080'
-    admin_user = 'jh0003'
-    scheme = 'http'
-
-    try:
-        opts, args = getopt.getopt(argv, "i:p:u:h:s:", ["ip=", "port=", "user=", "scheme="])
-    except getopt.GetoptError:
-        usage()
-        error_and_exit(2, 'Invalid input')
-
-    for opt, arg in opts:
-        # print opt, arg
-        if opt == '-h':
-            usage()
-            sys.exit(3)
-        elif opt in ("-i", "--ip"):
-            be_host = arg
-        elif opt in ("-p", "--port"):
-            be_port = arg
-        elif opt in ("-u", "--user"):
-            admin_user = arg
-        elif opt in ("-s", "--scheme"):
-            scheme = arg
-
-    print 'scheme =', scheme, ', be host =', be_host, ', be port =', be_port, ', user =', admin_user
-
-    if be_host is None:
-        usage()
-        sys.exit(3)
-
-    importNormativeInterfaceLifecycleType(scheme, be_host, be_port, admin_user, True,
-                                          "../../../import/tosca/interface-lifecycle-types//")
-
-
-if __name__ == "__main__":
-    main(sys.argv[1:])
diff --git a/catalog-be/src/main/resources/scripts/import/tosca/importNormativeNoHeatAndNormativeTypes.py b/catalog-be/src/main/resources/scripts/import/tosca/importNormativeNoHeatAndNormativeTypes.py
deleted file mode 100644
index b06959a..0000000
--- a/catalog-be/src/main/resources/scripts/import/tosca/importNormativeNoHeatAndNormativeTypes.py
+++ /dev/null
@@ -1,136 +0,0 @@
-import os
-import time
-
-import importCommon
-from importCommon import *
-from importDataTypes import importDataTypes
-from importGroupTypes import importGroupTypes
-from importNormativeCapabilities import importNormativeCapabilities
-from importNormativeInterfaceLifecycleTypes import importNormativeInterfaceLifecycleType
-from importPolicyTypes import importPolicyTypes
-
-
-#####################################################################################################################################################################################################################################################
-#																																		       																										#
-# Import all users from a given file																										   																										#
-# 																																			   																										#
-# activation :																																   																										#
-#       python importNormativeNoHeatAndNormativeTypes.py [-s <scheme> | --scheme=<scheme> ] [-i <be host> | --ip=<be host>] [-p <be port> | --port=<be port> ] [-u <user userId> | --user=<user userId> ] [-d <true|false> | --debug=<true|false>]	#
-#									 [-v <true|false> | --updateversion=<true|false>]																																								#
-#																																		  	   																										#
-# shortest activation (be host = localhost, be port = 8080, user = jh0003): 																				   																						#
-#		python importNormativeNoHeatAndNormativeTypes.py											 				           																														#
-#																																		       																										#
-#####################################################################################################################################################################################################################################################
-
-
-def usage():
-    print sys.argv[0], \
-        '[optional -s <scheme> | --scheme=<scheme>, default http] [-i <be host> | --ip=<be host>] [-p <be port> | --port=<be port> ] [-u <user userId> | --user=<user userId> ] [-d <true|false> | --debug=<true|false>] [-v <true|false> | --updateversion=<true|false>]'
-
-
-def handleResults(results, update_version):
-    print_frame_line()
-    for result in results:
-        print_name_and_return_code(result[0], result[1])
-    print_frame_line()
-
-    response_codes = [200, 201]
-
-    if update_version == 'false':
-        response_codes = [200, 201, 409]
-
-    failed_results = filter(lambda x: x[1] is None or x[1] not in response_codes, results)
-    if len(list(failed_results)) > 0:
-        error_and_exit(1, None)
-
-
-def main(argv):
-    print 'Number of arguments:', len(sys.argv), 'arguments.'
-
-    be_host = 'localhost'
-    be_port = '8080'
-    admin_user = 'jh0003'
-    debug_f = None
-    update_version = 'true'
-    importCommon.debugFlag = False
-    scheme = 'http'
-
-    try:
-        opts, args = getopt.getopt(argv, "i:p:u:d:v:h:s:",
-                                   ["ip=", "port=", "user=", "debug=", "updateversion=", "scheme="])
-    except getopt.GetoptError:
-        usage()
-        error_and_exit(2, 'Invalid input')
-
-    for opt, arg in opts:
-        # print opt, arg
-        if opt == '-h':
-            usage()
-            sys.exit(3)
-        elif opt in ("-i", "--ip"):
-            be_host = arg
-        elif opt in ("-p", "--port"):
-            be_port = arg
-        elif opt in ("-u", "--user"):
-            admin_user = arg
-        elif opt in ("-s", "--scheme"):
-            scheme = arg
-        elif opt in ("-d", "--debug"):
-            print arg
-            debug_f = bool(arg.lower() == "true" or arg.lower() == "yes")
-        elif opt in ("-v", "--updateversion"):
-            print arg
-            if arg.lower() == "false" or arg.lower() == "no":
-                update_version = 'false'
-
-    print 'scheme =', scheme, ', be host =', be_host, ', be port =', be_port, ', user =', admin_user, ', debug =', debug_f, ', updateversion =', update_version
-
-    if debug_f is not None:
-        print 'set debug mode to ' + str(debug_f)
-        importCommon.debugFlag = debug_f
-
-    if be_host is None:
-        usage()
-        sys.exit(3)
-
-    print sys.argv[0]
-    path_dir = os.path.dirname(os.path.realpath(sys.argv[0]))
-    debug("path dir =" + path_dir)
-
-    base_file_location = path_dir + "/../../../import/tosca/"
-
-    file_location = base_file_location + "data-types/"
-    importDataTypes(scheme, be_host, be_port, admin_user, False, file_location)
-
-    print 'sleep until data type cache is updated'
-    time.sleep(70)
-
-    file_location = base_file_location + "capability-types/"
-    importNormativeCapabilities(scheme, be_host, be_port, admin_user, False, file_location)
-
-    file_location = base_file_location + "interface-lifecycle-types/"
-    importNormativeInterfaceLifecycleType(scheme, be_host, be_port, admin_user, False, file_location)
-
-    # fileLocation = baseFileLocation + "categories/"
-    # importCategories(beHost, bePort, adminUser, False, fileLocation)
-
-    # fileLocation = baseFileLocation + "normative-types/"
-    # results = importNormativeTypes(beHost, bePort, adminUser, fileLocation, updateversion)
-    # handleResults(results, updateversion)
-
-    # fileLocation = baseFileLocation + "heat-types/"
-    # resultsHeat = importHeatTypes(beHost, bePort, adminUser, fileLocation, updateversion)
-    # handleResults(resultsHeat, updateversion)
-
-    file_location = base_file_location + "group-types/"
-    importGroupTypes(scheme, be_host, be_port, admin_user, False, file_location)
-
-    file_location = base_file_location + "policy-types/"
-    importPolicyTypes(scheme, be_host, be_port, admin_user, False, file_location)
-
-    error_and_exit(0, None)
-
-
-if __name__ == "__main__":
-    main(sys.argv[1:])
diff --git a/catalog-be/src/main/resources/scripts/import/tosca/importNormativeRelationships.py b/catalog-be/src/main/resources/scripts/import/tosca/importNormativeRelationships.py
deleted file mode 100644
index a6040d0..0000000
--- a/catalog-be/src/main/resources/scripts/import/tosca/importNormativeRelationships.py
+++ /dev/null
@@ -1,82 +0,0 @@
-import importCommon
-from importCommon import *
-from importNormativeElements import createNormativeElement
-
-
-#################################################################################################################################################################################################
-#																																		       													#
-# Import normative relationships
-# 				   															#
-# 																																			   													#
-# activation :																																   													#
-#       python importNormativeRelationships.py [-s <scheme> | --scheme=<scheme> ] [-i <be host> | --ip=<be host>] [-p
-#  <be port> | --port=<be port> ] [-f <input file> | --ifile=<input file> ]	#
-#																																		  	  													#
-# shortest activation (be host = localhost, be port = 8080): 																				   													#
-#		python importNormativeRelationships.py [-f <input file> | --ifile=<input file> ]
-# 					 				           									#
-#																																		       													#
-#################################################################################################################################################################################################
-
-
-def usage():
-    print sys.argv[0], \
-        '[optional -s <scheme> | --scheme=<scheme>, default http] [-i <be host> | --ip=<be host>] [-p <be port> | --port=<be port> ] [-u <user userId> | --user=<user userId> ]'
-
-
-def importNormativeRelationships(scheme, be_host, be_port, admin_user, exit_on_success, file_dir):
-    result = createNormativeElement(scheme, be_host, be_port, admin_user, file_dir,
-                                    "/sdc2/rest/v1/catalog/uploadType/relationship", "relationshipTypes",
-                                    "relationshipTypeZip")
-
-    print_frame_line()
-    print_name_and_return_code(result[0], result[1])
-    print_frame_line()
-
-    if result[1] is None or result[1] not in [200, 201, 409]:
-        importCommon.error_and_exit(1, None)
-    else:
-        if exit_on_success is True:
-            importCommon.error_and_exit(0, None)
-
-
-def main(argv):
-    print 'Number of arguments:', len(sys.argv), 'arguments.'
-
-    be_host = 'localhost'
-    be_port = '8080'
-    admin_user = 'jh0003'
-    scheme = 'http'
-
-    try:
-        opts, args = getopt.getopt(argv, "i:p:u:h:s:", ["ip=", "port=", "user=", "scheme="])
-    except getopt.GetoptError:
-        usage()
-        importCommon.error_and_exit(2, 'Invalid input')
-
-    for opt, arg in opts:
-        # print opt, arg
-        if opt == '-h':
-            usage()
-            sys.exit(3)
-        elif opt in ("-i", "--ip"):
-            be_host = arg
-        elif opt in ("-p", "--port"):
-            be_port = arg
-        elif opt in ("-u", "--user"):
-            admin_user = arg
-        elif opt in ("-s", "--scheme"):
-            scheme = arg
-
-    print 'scheme =', scheme, ', be host =', be_host, ', be port =', be_port, ', user =', admin_user
-
-    if be_host is None:
-        usage()
-        sys.exit(3)
-
-    importNormativeRelationships(scheme, be_host, be_port, admin_user, True,
-                                 "../../../import/tosca/relationship-types/")
-
-
-if __name__ == "__main__":
-    main(sys.argv[1:])
diff --git a/catalog-be/src/main/resources/scripts/import/tosca/importNormativeTypes.py b/catalog-be/src/main/resources/scripts/import/tosca/importNormativeTypes.py
deleted file mode 100644
index 889ea05..0000000
--- a/catalog-be/src/main/resources/scripts/import/tosca/importNormativeTypes.py
+++ /dev/null
@@ -1,177 +0,0 @@
-import json
-import zipfile
-from StringIO import StringIO
-
-import pycurl
-
-from importCommon import *
-
-
-#########################################################################################################################################################################################
-#																																		       											#
-# Import all users from a given file																										   											#
-# 																																			   											#
-# activation :																																   											#
-#       python importNormativeTypes.py [-s <scheme> | --scheme=<scheme> ] [-i <be host> | --ip=<be host>] [-p <be port> | --port=<be port> ] [-f <input file> | --ifile=<input file> ]	#
-#							  [-v <true|false> | --updateversion=<true|false>]																											#
-# shortest activation (be host = localhost, be port = 8080): 																				   											#
-#		python importNormativeTypes.py [-f <input file> | --ifile=<input file> ]												 				           								#
-#																																		       											#	
-#########################################################################################################################################################################################
-
-def createNormativeType(scheme, be_host, be_port, admin_user, file_dir, element_name, update_version):
-    try:
-        log("in create normative type ", element_name)
-        debug("userId", admin_user)
-        debug("fileDir", file_dir)
-
-        buffer = StringIO()
-        c = pycurl.Curl()
-        if is_debug():
-            c.setopt(pycurl.VERBOSE, 1)
-
-        url = scheme + '://' + be_host + ':' + be_port + '/sdc2/rest/v1/catalog/upload/multipart'
-        if update_version is not None:
-            url += '?createNewVersion=' + update_version
-        c.setopt(c.URL, url)
-        c.setopt(c.POST, 1)
-
-        admin_header = 'USER_ID: ' + admin_user
-        # c.setopt(pycurl.HTTPHEADER, ['Content-Type: application/json', 'Accept: application/json', adminHeader])
-        c.setopt(pycurl.HTTPHEADER, [admin_header])
-
-        yml_path = file_dir + element_name + "/" + element_name + ".yml"
-        path = file_dir + element_name + "/" + element_name + ".zip"
-
-        zf = zipfile.ZipFile(path, "w")
-        zf.write(yml_path, element_name + '.yml')
-        zf.close()
-
-        debug(path)
-        current_json_file = file_dir + element_name + "/" + element_name + ".json"
-        # sed -i 's/"userId": ".*",/"userId": "'${USER_ID}'",/' ${current_json_file}
-
-        jsonFile = open(current_json_file)
-
-        debug("before load json")
-        json_data = json.load(jsonFile, strict=False)
-        debug(json_data)
-
-        json_as_str = json.dumps(json_data)
-
-        send = [('resourceMetadata', json_as_str), ('resourceZip', (pycurl.FORM_FILE, path))]
-        debug(send)
-        c.setopt(pycurl.HTTPPOST, send)
-
-        # data = json.dumps(user)
-        # c.setopt(c.POSTFIELDS, data)
-
-        if scheme == 'https':
-            c.setopt(pycurl.SSL_VERIFYPEER, 0)
-            c.setopt(pycurl.SSL_VERIFYHOST, 0)
-
-        # c.setopt(c.WRITEFUNCTION, lambda x: None)
-        c.setopt(c.WRITEFUNCTION, buffer.write)
-
-        # print("before perform")
-        c.perform()
-
-        # print("Before get response code")
-        http_res = c.getinfo(c.RESPONSE_CODE)
-        if http_res is not None:
-            debug("http response=", http_res)
-        # print('Status: ' + str(responseCode))
-        debug(buffer.getvalue())
-        c.close()
-
-        return (element_name, http_res, buffer.getvalue())
-
-    except Exception as inst:
-        print("ERROR=" + str(inst))
-        return (element_name, None, None)
-
-
-def usage():
-    print sys.argv[0], \
-        '[optional -s <scheme> | --scheme=<scheme>, default http] [-i <be host> | --ip=<be host>] [-p <be port> | --port=<be port> ] [-u <user userId> | --user=<user userId> ] [-v <true|false> | --updateversion=<true|false>]'
-
-
-def importNormativeTypes(scheme, be_host, be_port, admin_user, file_dir, update_version):
-    normative_types = ["root", "compute", "softwareComponent", "webServer", "webApplication", "DBMS", "database",
-                       "objectStorage", "blockStorage", "containerRuntime", "containerApplication", "loadBalancer",
-                       "port", "network"]
-    # normative_types = [ "root" ]
-    response_codes = [200, 201]
-
-    if update_version == 'false':
-        response_codes = [200, 201, 409]
-
-    results = []
-    for normative_type in normative_types:
-        result = createNormativeType(scheme, be_host, be_port, admin_user, file_dir, normative_type, update_version)
-        results.append(result)
-        if result[1] is None or result[1] not in response_codes:
-            print "Failed creating normative type " + normative_type + ". " + str(result[1])
-    return results
-
-
-def main(argv):
-    print 'Number of arguments:', len(sys.argv), 'arguments.'
-
-    be_host = 'localhost'
-    be_port = '8080'
-    admin_user = 'jh0003'
-    update_version = 'true'
-    scheme = 'http'
-
-    try:
-        opts, args = getopt.getopt(argv, "i:p:u:v:h:s:", ["ip=", "port=", "user=", "updateversion=", "scheme="])
-    except getopt.GetoptError:
-        usage()
-        error_and_exit(2, 'Invalid input')
-
-    for opt, arg in opts:
-        # print opt, arg
-        if opt == '-h':
-            usage()
-            sys.exit(3)
-        elif opt in ("-i", "--ip"):
-            be_host = arg
-        elif opt in ("-p", "--port"):
-            be_port = arg
-        elif opt in ("-u", "--user"):
-            admin_user = arg
-        elif opt in ("-s", "--scheme"):
-            scheme = arg
-        elif opt in ("-v", "--updateversion"):
-            if arg.lower() == "false" or arg.lower() == "no":
-                update_version = 'false'
-
-    print 'scheme =', scheme, ', be host =', be_host, ', be port =', be_port, ', user =', admin_user, ', updateversion =', update_version
-
-    if be_host is None:
-        usage()
-        sys.exit(3)
-
-    results = importNormativeTypes(scheme, be_host, be_port, admin_user, "../../../import/tosca/normative-types/",
-                                   update_version)
-
-    print "-----------------------------"
-    for result in results:
-        print "{0:20} | {1:6}".format(result[0], result[1])
-    print "-----------------------------"
-
-    response_codes = [200, 201]
-
-    if update_version == 'false':
-        response_codes = [200, 201, 409]
-
-    failed_normatives = filter(lambda x: x[1] is None or x[1] not in response_codes, results)
-    if len(list(failed_normatives)) > 0:
-        error_and_exit(1, None)
-    else:
-        error_and_exit(0, None)
-
-
-if __name__ == "__main__":
-    main(sys.argv[1:])
diff --git a/catalog-be/src/main/resources/scripts/import/tosca/importONAPNormativeAll.py b/catalog-be/src/main/resources/scripts/import/tosca/importONAPNormativeAll.py
deleted file mode 100644
index de67cd7..0000000
--- a/catalog-be/src/main/resources/scripts/import/tosca/importONAPNormativeAll.py
+++ /dev/null
@@ -1,160 +0,0 @@
-import os
-import time
-
-import importCommon
-from importCategoryTypes import importCategories
-from importCommon import *
-from importDataTypes import importDataTypes
-from importGroupTypes import importGroupTypes
-from importHeatTypes import importHeatTypes
-from importNfvTypes import importNfvTypes
-from importNormativeCapabilities import importNormativeCapabilities
-from importNormativeInterfaceLifecycleTypes import importNormativeInterfaceLifecycleType
-from importNormativeRelationships import importNormativeRelationships
-# from importNormativeElements import createNormativeElement
-from importNormativeTypes import importNormativeTypes
-from importOnapTypes import importOnapTypes
-from importPolicyTypes import importPolicyTypes
-from importSolTypes import importSolTypes
-
-
-#################################################################################################################################################################################################
-#																																		       													#	
-# Import all users from a given file																										   													#
-# 																																			   													#		
-# activation :																																   													#
-#       python importNormativeAll.py [-s <scheme> | --scheme=<scheme> ] [-i <be host> | --ip=<be host>] [-p <be port> | --port=<be port> ] [-u <user userId> | --user=<user userId> ] [-d <true|false> | --debug=<true|false>] 	#
-#									 [-v <true|false> | --updateversion=<true|false>]																											#
-#																																		  	   													#			
-# shortest activation (be host = localhost, be port = 8080, user = jh0003): 																				   									#	#												       																																			#
-#		python importNormativeAll.py											 				           																						#
-#																																		       													#	
-#################################################################################################################################################################################################
-
-def usage():
-    print sys.argv[0], \
-        '[-s <scheme> | --scheme=<scheme> ] [-i <be host> | --ip=<be host>] [-p <be port> | --port=<be port> ] [-u <user userId> | --user=<user userId> ] [-d <true|false> | --debug=<true|false>] [-v <true|false> | --updateversion=<true|false>]'
-
-
-def handle_results(results, update_version):
-    if results is not None:
-        print_frame_line()
-        for result in results:
-            print_name_and_return_code(result[0], result[1])
-        print_frame_line()
-
-        response_codes = [200, 201]
-
-        if update_version == 'false':
-            response_codes = [200, 201, 409]
-
-        failed_results = filter(lambda x: x[1] is None or x[1] not in response_codes, results)
-        if len(list(failed_results)) > 0:
-            error_and_exit(1, None)
-
-
-def main(argv):
-    print 'Number of arguments:', len(sys.argv), 'arguments.'
-
-    be_host = 'localhost'
-    be_port = '8080'
-    admin_user = 'jh0003'
-    debugf = None
-    update_version = 'true'
-    importCommon.debugFlag = False
-    scheme = 'http'
-    opts = []
-
-    try:
-        opts, args = getopt.getopt(argv, "i:p:u:d:v:h:s:",
-                                   ["ip=", "port=", "user=", "debug=", "update_version=", "scheme="])
-    except getopt.GetoptError:
-        usage()
-        error_and_exit(2, 'Invalid input')
-
-    for opt, arg in opts:
-        # print opt, arg
-        if opt == '-h':
-            usage()
-            sys.exit(3)
-        elif opt in ("-i", "--ip"):
-            be_host = arg
-        elif opt in ("-p", "--port"):
-            be_port = arg
-        elif opt in ("-u", "--user"):
-            admin_user = arg
-        elif opt in ("-s", "--scheme"):
-            scheme = arg
-        elif opt in ("-d", "--debug"):
-            print arg
-            debugf = bool(arg.lower() == "true" or arg.lower() == "yes")
-        elif opt in ("-v", "--update_version"):
-            print arg
-            if arg.lower() == "false" or arg.lower() == "no":
-                update_version = 'false'
-
-    print 'scheme =', scheme, ',be host =', be_host, ', be port =', be_port, ', user =', admin_user, ', debug =', debugf, ', update_version =', update_version
-
-    if debugf is not None:
-        print 'set debug mode to ' + str(debugf)
-        importCommon.debugFlag = debugf
-
-    if be_host is None:
-        usage()
-        sys.exit(3)
-
-    print sys.argv[0]
-    pathdir = os.path.dirname(os.path.realpath(sys.argv[0]))
-    debug("path dir =" + pathdir)
-
-    base_file_location = pathdir + "/../../../import/tosca/"
-
-    file_location = base_file_location + "data-types/"
-    importDataTypes(scheme, be_host, be_port, admin_user, False, file_location)
-
-    print 'sleep until data type cache is updated'
-    time.sleep(70)
-
-    file_location = base_file_location + "capability-types/"
-    importNormativeCapabilities(scheme, be_host, be_port, admin_user, False, file_location)
-
-    file_location = base_file_location + "relationship-types/"
-    importNormativeRelationships(scheme, be_host, be_port, admin_user, False, file_location)
-
-    file_location = base_file_location + "interface-lifecycle-types/"
-    importNormativeInterfaceLifecycleType(scheme, be_host, be_port, admin_user, False, file_location)
-
-    file_location = base_file_location + "categories/"
-    importCategories(scheme, be_host, be_port, admin_user, False, file_location)
-
-    file_location = base_file_location + "normative-types/"
-    results = importNormativeTypes(scheme, be_host, be_port, admin_user, file_location, update_version)
-    handle_results(results, update_version)
-
-    file_location = base_file_location + "heat-types/"
-    results_heat = importHeatTypes(scheme, be_host, be_port, admin_user, file_location, update_version)
-    handle_results(results_heat, update_version)
-
-    file_location = base_file_location + "nfv-types/"
-    results_heat = importNfvTypes(scheme, be_host, be_port, admin_user, file_location, update_version)
-    handle_results(results_heat, update_version)
-
-    file_location = base_file_location + "onap-types/"
-    results_heat = importOnapTypes(scheme, be_host, be_port, admin_user, file_location, update_version)
-    handle_results(results_heat, update_version)
-
-    file_location = base_file_location + "sol-types/"
-    results_heat = importSolTypes(scheme, be_host, be_port, admin_user, file_location, update_version)
-    handle_results(results_heat, update_version)
-
-    file_location = base_file_location + "group-types/"
-    importGroupTypes(scheme, be_host, be_port, admin_user, False, file_location)
-
-    file_location = base_file_location + "policy-types/"
-    importPolicyTypes(scheme, be_host, be_port, admin_user, False, file_location)
-
-    error_and_exit(0, None)
-
-
-if __name__ == "__main__":
-    main(sys.argv[1:])
diff --git a/catalog-be/src/main/resources/scripts/import/tosca/importOnapTypes.py b/catalog-be/src/main/resources/scripts/import/tosca/importOnapTypes.py
deleted file mode 100644
index f6e4749..0000000
--- a/catalog-be/src/main/resources/scripts/import/tosca/importOnapTypes.py
+++ /dev/null
@@ -1,92 +0,0 @@
-from importNormativeTypes import *
-
-
-#####################################################################################################################################################################################################
-#																																		       														#	
-# Import all users from a given file																										   														#
-# 																																			   														#		
-# activation :																																   														#
-#       python importUsers.py [optional -s <scheme> | --scheme=<scheme>, default http] [-i <be host> | --ip=<be host>] [-p <be port> | --port=<be port> ] [-f <input file> | --ifile=<input file> ] #
-#																																		  	  														#			
-# shortest activation (be host = localhost, be port = 8080): 																				   														#
-#		python importUsers.py [-f <input file> | --ifile=<input file> ]												 				           														#
-#																																		       														#	
-#####################################################################################################################################################################################################
-
-def importOnapTypes(scheme, be_host, be_port, admin_user, file_dir, update_version):
-    # Add desired type names to the list
-    onap_types = []
-
-    response_codes = [200, 201]
-
-    if update_version == 'false':
-        response_codes = [200, 201, 409]
-
-    results = []
-    for onap_type in onap_types:
-        result = createNormativeType(scheme, be_host, be_port, admin_user, file_dir, onap_type, update_version)
-        results.append(result)
-        if result[1] is None or result[1] not in response_codes:
-            print "Failed creating heat type " + onap_type + ". " + str(result[1])
-    return results
-
-
-def main(argv):
-    print 'Number of arguments:', len(sys.argv), 'arguments.'
-
-    be_host = 'localhost'
-    be_port = '8080'
-    admin_user = 'jh0003'
-    update_version = 'true'
-    scheme = 'http'
-
-    try:
-        opts, args = getopt.getopt(argv, "i:p:u:v:h:", ["ip=", "port=", "user=", "update_version="])
-    except getopt.GetoptError:
-        usage()
-        error_and_exit(2, 'Invalid input')
-
-    for opt, arg in opts:
-        # print opt, arg
-        if opt == '-h':
-            usage()
-            sys.exit(3)
-        elif opt in ("-i", "--ip"):
-            be_host = arg
-        elif opt in ("-p", "--port"):
-            be_port = arg
-        elif opt in ("-u", "--user"):
-            admin_user = arg
-        elif opt in ("-s", "--scheme"):
-            scheme = arg
-        elif opt in ("-v", "--update_version"):
-            if arg.lower() == "false" or arg.lower() == "no":
-                update_version = 'false'
-
-    print 'scheme =', scheme, ',be host =', be_host, ', be port =', be_port, ', user =', admin_user
-
-    if be_host is None:
-        usage()
-        sys.exit(3)
-
-    results = importOnapTypes(scheme, be_host, be_port, admin_user, "../../../import/tosca/onap-types/", update_version)
-
-    print "-----------------------------"
-    for result in results:
-        print "{0:20} | {1:6}".format(result[0], result[1])
-    print "-----------------------------"
-
-    response_codes = [200, 201]
-
-    if update_version == 'false':
-        response_codes = [200, 201, 409]
-
-    failed_normatives = filter(lambda x: x[1] is None or x[1] not in response_codes, results)
-    if len(list(failed_normatives)) > 0:
-        error_and_exit(1, None)
-    else:
-        error_and_exit(0, None)
-
-
-if __name__ == "__main__":
-    main(sys.argv[1:])
diff --git a/catalog-be/src/main/resources/scripts/import/tosca/importPolicyTypes.py b/catalog-be/src/main/resources/scripts/import/tosca/importPolicyTypes.py
deleted file mode 100644
index 47f783d..0000000
--- a/catalog-be/src/main/resources/scripts/import/tosca/importPolicyTypes.py
+++ /dev/null
@@ -1,76 +0,0 @@
-from importCommon import *
-from importNormativeElements import createNormativeElement
-
-
-#####################################################################################################################################################################################
-#																																		       										#
-# Import tosca data types																										   													#
-# 																																			   										#
-# activation :																																   										#
-#       python importPolicyTypes.py [-s <scheme> | --scheme=<scheme> ] [-i <be host> | --ip=<be host>] [-p <be port> | --port=<be port> ] [-f <input file> | --ifile=<input file> ]	#
-#																																		  	   										#
-# shortest activation (be host = localhost, be port = 8080): 																				   										#
-#		python importPolicyTypes.py [-f <input file> | --ifile=<input file> ]												 				           								#
-#																																		       										#
-#####################################################################################################################################################################################
-
-def usage():
-    print sys.argv[
-        0], '[optional -s <scheme> | --scheme=<scheme>, default http] [-i <be host> | --ip=<be host>] [-p <be port> | --port=<be port> ] [-u <user userId> | --user=<user userId> ]'
-
-
-def importPolicyTypes(scheme, be_host, be_port, admin_user, exit_on_success, file_dir):
-    result = createNormativeElement(scheme, be_host, be_port, admin_user, file_dir,
-                                    "/sdc2/rest/v1/catalog/uploadType/policytypes", "policyTypes", "policyTypesZip",
-                                    True)
-
-    print_frame_line()
-    print_name_and_return_code(result[0], result[1])
-    print_frame_line()
-
-    if result[1] is None or result[1] not in [200, 201, 409]:
-        error_and_exit(1, None)
-    else:
-        if exit_on_success:
-            error_and_exit(0, None)
-
-
-def main(argv):
-    print 'Number of arguments:', len(sys.argv), 'arguments.'
-
-    be_host = 'localhost'
-    be_port = '8080'
-    admin_user = 'jh0003'
-    scheme = 'http'
-
-    try:
-        opts, args = getopt.getopt(argv, "i:p:u:h:s:", ["ip=", "port=", "user=", "scheme="])
-    except getopt.GetoptError:
-        usage()
-        error_and_exit(2, 'Invalid input')
-
-    for opt, arg in opts:
-        # print opt, arg
-        if opt == '-h':
-            usage()
-            sys.exit(3)
-        elif opt in ("-i", "--ip"):
-            be_host = arg
-        elif opt in ("-p", "--port"):
-            be_port = arg
-        elif opt in ("-u", "--user"):
-            admin_user = arg
-        elif opt in ("-s", "--scheme"):
-            scheme = arg
-
-    print 'scheme =', scheme, ', be host =', be_host, ', be port =', be_port, ', user =', admin_user
-
-    if be_host is None:
-        usage()
-        sys.exit(3)
-
-    importPolicyTypes(scheme, be_host, be_port, admin_user, True, "../../../import/tosca/policy-types/")
-
-
-if __name__ == "__main__":
-    main(sys.argv[1:])
diff --git a/catalog-be/src/main/resources/scripts/import/tosca/importSolTypes.py b/catalog-be/src/main/resources/scripts/import/tosca/importSolTypes.py
deleted file mode 100644
index 5a8d2aa..0000000
--- a/catalog-be/src/main/resources/scripts/import/tosca/importSolTypes.py
+++ /dev/null
@@ -1,92 +0,0 @@
-from importNormativeTypes import *
-
-
-#####################################################################################################################################################################################################
-#																																		       														#	
-# Import Sol Types from a given file																										   														#
-# 																																			   														#		
-# activation :																																   														#
-#       python importSolTypes.py [optional -s <scheme> | --scheme=<scheme>, default http] [-i <be host> | --ip=<be host>] [-p <be port> | --port=<be port> ] [-f <input file> | --ifile=<input file> ] #
-#																																		  	  														#			
-# shortest activation (be host = localhost, be port = 8080): 																				   														#
-#		python importUsers.py [-f <input file> | --ifile=<input file> ]												 				           														#
-#																																		       														#	
-#####################################################################################################################################################################################################
-
-def importSolTypes(scheme, be_host, be_port, admin_user, file_dir, update_version):
-    # Add desired type names to the list
-    sol_types = []
-
-    response_codes = [200, 201]
-
-    if update_version == 'false':
-        response_codes = [200, 201, 409]
-
-    results = []
-    for onap_type in sol_types:
-        result = createNormativeType(scheme, be_host, be_port, admin_user, file_dir, onap_type, update_version)
-        results.append(result)
-        if result[1] is None or result[1] not in response_codes:
-            print "Failed creating heat type " + onap_type + ". " + str(result[1])
-    return results
-
-
-def main(argv):
-    print 'Number of arguments:', len(sys.argv), 'arguments.'
-
-    be_host = 'localhost'
-    be_port = '8080'
-    admin_user = 'jh0003'
-    update_version = 'true'
-    scheme = 'http'
-
-    try:
-        opts, args = getopt.getopt(argv, "i:p:u:v:h:", ["ip=", "port=", "user=", "updateversion="])
-    except getopt.GetoptError:
-        usage()
-        error_and_exit(2, 'Invalid input')
-
-    for opt, arg in opts:
-        # print opt, arg
-        if opt == '-h':
-            usage()
-            sys.exit(3)
-        elif opt in ("-i", "--ip"):
-            be_host = arg
-        elif opt in ("-p", "--port"):
-            be_port = arg
-        elif opt in ("-u", "--user"):
-            admin_user = arg
-        elif opt in ("-s", "--scheme"):
-            scheme = arg
-        elif opt in ("-v", "--updateversion"):
-            if arg.lower() == "false" or arg.lower() == "no":
-                update_version = 'false'
-
-    print 'scheme =', scheme, ',be host =', be_host, ', be port =', be_port, ', user =', admin_user
-
-    if be_host is None:
-        usage()
-        sys.exit(3)
-
-    results = importSolTypes(scheme, be_host, be_port, admin_user, "../../../import/tosca/sol-types/", update_version)
-
-    print "-----------------------------"
-    for result in results:
-        print "{0:20} | {1:6}".format(result[0], result[1])
-    print "-----------------------------"
-
-    response_codes = [200, 201]
-
-    if update_version == 'false':
-        response_codes = [200, 201, 409]
-
-    failed_normatives = filter(lambda x: x[1] is None or x[1] not in response_codes, results)
-    if len(list(failed_normatives)) > 0:
-        error_and_exit(1, None)
-    else:
-        error_and_exit(0, None)
-
-
-if __name__ == "__main__":
-    main(sys.argv[1:])
diff --git a/catalog-be/src/main/resources/scripts/import/tosca/importUsersFromYaml.py b/catalog-be/src/main/resources/scripts/import/tosca/importUsersFromYaml.py
deleted file mode 100644
index 8cc8926..0000000
--- a/catalog-be/src/main/resources/scripts/import/tosca/importUsersFromYaml.py
+++ /dev/null
@@ -1,223 +0,0 @@
-import getopt
-import json
-import sys
-
-import pycurl
-import yaml
-
-
-#########################################################################################################################################################################################
-#																																				       									#
-# Import all users from a given YAML file																											   									#
-# 																																					   									#
-# activation :																																		   									#
-#       python importUsersFromYaml.py [-s <scheme> | --scheme=<scheme> ] [-i <be host> | --ip=<be host>] [-p <be port> | --port=<be port> ] [-f <input file> | --ifile=<input file> ]	#
-#																																				  	   									#
-# shortest activation (be host = localhost, be port = 8080): 																						   									#
-#		python importUsersFromYaml.py [-f <input file> | --ifile=<input file> ]												 				           									#
-#									    																											   									#
-#   PyYAML module shall be added to python.																											   									#
-#   pip install PyYAML>=3.1.0 --proxy=http://one.proxy.att.com:8080														                               									#
-#########################################################################################################################################################################################
-
-
-def importUsers(scheme, be_host, be_port, users, admin_user):
-    result = []
-
-    for user in users:
-        # print("Going to add user " + user['userId'])
-        get_res = getUser(scheme, be_host, be_port, user)
-        user_id = get_res[0]
-        error = get_res[1]
-        # print error
-        if error is not None and error == 404:
-            res = createUser(scheme, be_host, be_port, user, admin_user)
-            result.append(res)
-        else:
-            if error == 200:
-                cur_result = user_id, 409
-                result.append(cur_result)
-            else:
-                result.append(get_res)
-
-    return result
-
-
-def getUser(scheme, be_host, be_port, user):
-    if user.get('userId') is None:
-        print "Ignoring record", user
-        return 'NotExist', 200
-    user_id = user['userId']
-    try:
-        c = pycurl.Curl()
-
-        # print type(userId)
-        url = scheme + '://' + be_host + ':' + be_port + '/sdc2/rest/v1/user/' + str(user_id)
-        c.setopt(c.URL, url)
-
-        if scheme == 'https':
-            c.setopt(pycurl.SSL_VERIFYPEER, 0)
-            c.setopt(pycurl.SSL_VERIFYHOST, 0)
-
-        # adminHeader = 'USER_ID: ' + adminUser
-        c.setopt(pycurl.HTTPHEADER, ['Content-Type: application/json', 'Accept: application/json'])
-        c.setopt(c.WRITEFUNCTION, lambda x: None)
-        res = c.perform()
-
-        # print("Before get response code")
-        http_res = c.getinfo(c.RESPONSE_CODE)
-        # print("After get response code")
-        # response_code = c.getinfo(c.RESPONSE_CODE)
-        # print('Status: ' + str(response_code))
-
-        c.close()
-
-        return user_id, http_res
-
-    except Exception as inst:
-        print(inst)
-        return user_id, None
-
-
-def createUser(scheme, be_host, be_port, user, admin_user):
-    if user.get('userId') is None:
-        print "Ignoring record", user
-        return 'NotExist', 200
-
-    user_id = user['userId']
-    try:
-        c = pycurl.Curl()
-
-        url = scheme + '://' + be_host + ':' + be_port + '/sdc2/rest/v1/user'
-        c.setopt(c.URL, url)
-        c.setopt(c.POST, 1)
-
-        admin_header = 'USER_ID: ' + admin_user
-        c.setopt(pycurl.HTTPHEADER, ['Content-Type: application/json', 'Accept: application/json', admin_header])
-
-        data = json.dumps(user)
-        c.setopt(c.POSTFIELDS, data)
-
-        if scheme == 'https':
-            c.setopt(pycurl.SSL_VERIFYPEER, 0)
-            c.setopt(pycurl.SSL_VERIFYHOST, 0)
-
-        c.setopt(c.WRITEFUNCTION, lambda x: None)
-        # print("before perform")
-        c.perform()
-
-        # print("Before get response code")
-        http_res = c.getinfo(c.RESPONSE_CODE)
-        # print("After get response code")
-        # responseCode = c.getinfo(c.RESPONSE_CODE)
-        # print('Status: ' + str(responseCode))
-
-        c.close()
-
-        return user_id, http_res
-
-    except Exception as inst:
-        print(inst)
-        return user_id, None
-
-
-def error_and_exit(error_code, error_desc):
-    if error_code > 0:
-        print("status=" + str(error_code) + ". " + error_desc)
-    else:
-        print("status=" + str(error_code))
-    sys.exit(error_code)
-
-
-def usage():
-    print sys.argv[0], \
-        '[optional -s <scheme> | --scheme=<scheme>, default http] [-i <be host> | --ip=<be host>] [-p <be port> | --port=<be port> ] [-f <input file> | --ifile=<input file> ]'
-
-
-def main(argv):
-    print 'Number of arguments:', len(sys.argv), 'arguments.'
-
-    be_host = 'localhost'
-    be_port = '8080'
-    input_file = None
-
-    admin_user = 'jh0003'
-    scheme = 'http'
-
-    try:
-        opts, args = getopt.getopt(argv, "i:p:f:h:s:", ["ip=", "port=", "ifile=", "scheme="])
-    except getopt.GetoptError:
-        usage()
-        error_and_exit(2, 'Invalid input')
-
-    for opt, arg in opts:
-        # print opt, arg
-        if opt == '-h':
-            usage()
-            sys.exit(3)
-        elif opt in ("-i", "--ip"):
-            be_host = arg
-        elif opt in ("-p", "--port"):
-            be_port = arg
-        elif opt in ("-f", "--ifile"):
-            input_file = arg
-        elif opt in ("-s", "--scheme"):
-            scheme = arg
-
-    print 'scheme =', scheme, ', be host =', be_host, ', be port =', be_port, ', users file =', input_file
-
-    if input_file is None:
-        usage()
-        sys.exit(3)
-
-    print 'Input file is ', input_file
-
-    users_as_yaml_file = open(input_file, 'r')
-    users_doc = yaml.load(users_as_yaml_file)
-    print users_doc
-
-    clone_users = []
-    for users in users_doc.values():
-        for x, y in users.items():
-            copied_user = y
-            copied_user['userId'] = x
-            # print copiedUser
-            clone_users.append(copied_user)
-
-    print clone_users
-
-    users_as_yaml_file.close()
-
-    # activeUsers = filter(lambda x: x.get('status') == None or x['status'] == 'ACTIVE', cloneUsers)
-
-    result_table = importUsers(scheme, be_host, be_port, clone_users, admin_user)
-
-    g = lambda x: x[1] != 201 and x[1] != 409
-
-    result = filter(g, result_table)
-
-    if len(result) > 0:
-        # print("ERROR: Failed to load the users " + ', '.join(map(lambda x: x[0],result)))
-        error_and_exit(3, "Failed to load the users " + ', '.join(map(lambda x: x[0], result)))
-
-    g = lambda x: x[1] == 409
-    result = filter(g, result_table)
-
-    print("-------------------------------------------")
-    print("Existing users: " + ', '.join(map(lambda x: x[0], result)))
-
-    result = filter(lambda x: x[1] == 201, result_table)
-    if len(list(result)) == 0:
-        print("-------------------------------------------")
-        print("No NEW user was loaded. All users are already exist")
-        print("-------------------------------------------")
-    else:
-        print("-------------------------------------------")
-        print("Loaded users: " + ', '.join(map(lambda x: x[0], result)))
-        print("-------------------------------------------")
-
-    error_and_exit(0, None)
-
-
-if __name__ == "__main__":
-    main(sys.argv[1:])
diff --git a/catalog-be/src/main/resources/scripts/import/tosca/upgradeHeatAndNormativeTypes.py b/catalog-be/src/main/resources/scripts/import/tosca/upgradeHeatAndNormativeTypes.py
deleted file mode 100644
index 7ba9250..0000000
--- a/catalog-be/src/main/resources/scripts/import/tosca/upgradeHeatAndNormativeTypes.py
+++ /dev/null
@@ -1,108 +0,0 @@
-from importNormativeTypes import *
-
-
-################################################################################################################################################################################################
-#																																		                                                       #
-# Upgrades all Heat and Normative types confiugred in "typesToUpgrade.json" file																										       #
-# 																																			                                                   #
-# activation                                                                                                                                                                                   #
-#       python upgradeHeatAndNormativeTypes.py [-s <scheme> | --scheme=<scheme> ] [-i <be host> | --ip=<be host>] [-p <be port> | --port=<be port> ] [-f <input file> | --ifile=<input file> ] #
-#																																		  	                                                   #
-# shortest activation (be host = localhost, be port = 8080): 																				                                                   #
-#		python upgradeHeatAndNormativeTypes.py [-f <input file> | --ifile=<input file> ]												 				                                       #
-#																																		                                                       #
-################################################################################################################################################################################################
-
-
-def upgradeTypesPerConfigFile(scheme, be_host, be_port, admin_user, base_dir, update_version):
-    response_codes = [200, 201]
-    if update_version == 'false':
-        response_codes = [200, 201, 409]
-    with open("typesToUpgrade.json", 'r') as stream:
-        try:
-            types = json.load(stream)
-            heat_types = types["heat"]
-            debug(heat_types)
-            normative_types = types["normative"]
-            debug(normative_types)
-            heat_file_dir = base_dir + "heat-types/"
-            debug(heat_file_dir)
-            normative_file_dir = base_dir + "normative-types/"
-            debug(normative_file_dir)
-            results = []
-            for heat_type in heat_types:
-                result = createNormativeType(scheme, be_host, be_port, admin_user, heat_file_dir,
-                                             heat_type.encode('ascii', 'ignore'), update_version)
-                results.append(result)
-                if result[1] is None or result[1] not in response_codes:
-                    print "Failed creating heat type " + heat_type + ". " + str(result[1])
-            for normativeType in normative_types:
-                result = createNormativeType(scheme, be_host, be_port, admin_user, normative_file_dir,
-                                             normativeType.encode('ascii', 'ignore'), update_version)
-                results.append(result)
-                if result[1] is None or result[1] not in response_codes:
-                    print "Failed creating normative type " + normativeType + ". " + str(result[1])
-            return results
-        except Exception as exc:
-            print(exc)
-
-
-def main(argv):
-    print 'Number of arguments:', len(sys.argv), 'arguments.'
-
-    be_host = 'localhost'
-    be_port = '8080'
-    admin_user = 'jh0003'
-    update_version = 'true'
-    scheme = 'http'
-
-    try:
-        opts, args = getopt.getopt(argv, "i:p:u:v:h:s:", ["ip=", "port=", "user=", "updateversion=", "scheme="])
-    except getopt.GetoptError:
-        usage()
-        error_and_exit(2, 'Invalid input')
-
-    for opt, arg in opts:
-        # print opt, arg
-        if opt == '-h':
-            usage()
-            sys.exit(3)
-        elif opt in ("-i", "--ip"):
-            be_host = arg
-        elif opt in ("-p", "--port"):
-            be_port = arg
-        elif opt in ("-u", "--user"):
-            admin_user = arg
-        elif opt in ("-s", "--scheme"):
-            scheme = arg
-        elif opt in ("-v", "--updateversion"):
-            if arg.lower() == "false" or arg.lower() == "no":
-                update_version = 'false'
-
-    print 'scheme =', scheme, ', be host =', be_host, ', be port =', be_port, ', user =', admin_user
-
-    if be_host is None:
-        usage()
-        sys.exit(3)
-
-    results = upgradeTypesPerConfigFile(scheme, be_host, be_port, admin_user, "../../../import/tosca/", update_version)
-
-    print "-----------------------------"
-    for result in results:
-        print "{0:20} | {1:6}".format(result[0], result[1])
-    print "-----------------------------"
-
-    response_codes = [200, 201]
-
-    if update_version == 'false':
-        response_codes = [200, 201, 409]
-
-    failed_normatives = filter(lambda x: x[1] is None or x[1] not in response_codes, results)
-    if len(list(failed_normatives)) > 0:
-        error_and_exit(1, None)
-    else:
-        error_and_exit(0, None)
-
-
-if __name__ == "__main__":
-    main(sys.argv[1:])
diff --git a/catalog-be/src/main/resources/scripts/import/tosca/upgradeHeatTypes1707.py b/catalog-be/src/main/resources/scripts/import/tosca/upgradeHeatTypes1707.py
deleted file mode 100644
index 5394864..0000000
--- a/catalog-be/src/main/resources/scripts/import/tosca/upgradeHeatTypes1707.py
+++ /dev/null
@@ -1,111 +0,0 @@
-from importNormativeTypes import *
-
-
-#################################################################################################################################################################################
-#																																		       									#
-# Import all users from a given file																										   									#
-# 																																			   									#
-# activation :																																   									#
-#       python importUsers.py [-s <scheme> | --scheme=<scheme> ] [-i <be host> | --ip=<be host>] [-p <be port> | --port=<be port> ] [-f <input file> | --ifile=<input file> ]	#
-#																																		  	   									#
-# shortest activation (be host = localhost, be port = 8080): 																				   									#
-#		python importUsers.py [-f <input file> | --ifile=<input file> ]												 				           									#
-#																																		       									#
-#################################################################################################################################################################################
-
-
-def upgradeHeatTypes1707(scheme, be_host, be_port, admin_user, file_dir, update_version):
-    heat_types = ["volume",
-                  "cinderVolume",
-                  "extVl",
-                  "extCp",
-                  "Generic_VFC",
-                  "Generic_VF",
-                  "Generic_PNF",
-                  "Generic_Service",
-                  "globalPort",
-                  "globalNetwork",
-                  "contrailV2VirtualMachineInterface",
-                  "contrailV2VLANSubInterface",
-                  "contrailPort",
-                  "contrailV2VirtualNetwork",
-                  "contrailVirtualNetwork",
-                  "neutronNet",
-                  "neutronPort",
-                  "multiFlavorVFC",
-                  "vnfConfiguration"]
-
-    response_codes = [200, 201]
-
-    if update_version == 'false':
-        response_codes = [200, 201, 409]
-
-    results = []
-    for heatType in heat_types:
-        result = createNormativeType(scheme, be_host, be_port, admin_user, file_dir, heatType, update_version)
-        results.append(result)
-        if result[1] is None or result[1] not in response_codes:
-            print "Failed creating heat type " + heatType + ". " + str(result[1])
-    return results
-
-
-def main(argv):
-    print 'Number of arguments:', len(sys.argv), 'arguments.'
-
-    be_host = 'localhost'
-    be_port = '8080'
-    admin_user = 'jh0003'
-    update_version = 'true'
-    scheme = 'http'
-
-    try:
-        opts, args = getopt.getopt(argv, "i:p:u:v:h:s:", ["ip=", "port=", "user=", "updateversion=", "scheme="])
-    except getopt.GetoptError:
-        usage()
-        error_and_exit(2, 'Invalid input')
-
-    for opt, arg in opts:
-        # print opt, arg
-        if opt == '-h':
-            usage()
-            sys.exit(3)
-        elif opt in ("-i", "--ip"):
-            be_host = arg
-        elif opt in ("-p", "--port"):
-            be_port = arg
-        elif opt in ("-u", "--user"):
-            admin_user = arg
-        elif opt in ("-s", "--scheme"):
-            scheme = arg
-        elif opt in ("-v", "--updateversion"):
-            if arg.lower() == "false" or arg.lower() == "no":
-                update_version = 'false'
-
-    print 'scheme =', scheme, ', be host =', be_host, ', be port =', be_port, ', user =', admin_user
-
-    if be_host is None:
-        usage()
-        sys.exit(3)
-
-    results = upgradeHeatTypes1707(scheme, be_host, be_port, admin_user, "../../../import/tosca/heat-types/",
-                                   update_version)
-
-    print "-----------------------------"
-    for result in results:
-        print "{0:20} | {1:6}".format(result[0], result[1])
-    print "-----------------------------"
-
-    response_codes = [200, 201]
-
-    if update_version == 'false':
-        response_codes = [200, 201, 409]
-
-    failed_normatives = filter(lambda x: x[1] is None or x[1] not in response_codes, results)
-    if len(list(failed_normatives)) > 0:
-        error_and_exit(1, None)
-    else:
-        error_and_exit(0, None)
-
-
-if __name__ == "__main__":
-    main(sys.argv[1:])
diff --git a/catalog-be/src/main/resources/scripts/import/tosca/upgradeNfvTypes.py b/catalog-be/src/main/resources/scripts/import/tosca/upgradeNfvTypes.py
deleted file mode 100644
index ce93987..0000000
--- a/catalog-be/src/main/resources/scripts/import/tosca/upgradeNfvTypes.py
+++ /dev/null
@@ -1,101 +0,0 @@
-from importNormativeTypes import *
-
-
-################################################################################################################################################################################################
-#																																		                                                       #
-# Upgrades all Heat and Normative types confiugred in "typesToUpgrade.json" file																										       #
-# 																																			                                                   #
-# activation                                                                                                                                                                                   #
-#       python upgradeHeatAndNormativeTypes.py [-s <scheme> | --scheme=<scheme> ] [-i <be host> | --ip=<be host>] [-p <be port> | --port=<be port> ] [-f <input file> | --ifile=<input file> ] #
-#																																		  	                                                   #
-# shortest activation (be host = localhost, be port = 8080): 																				                                                   #
-#		python upgradeHeatAndNormativeTypes.py [-f <input file> | --ifile=<input file> ]												 				                                       #
-#																																		                                                       #
-################################################################################################################################################################################################
-
-
-def upgradeNfvTypesPerConfigFile(scheme, be_host, be_port, admin_user, base_dir, update_version):
-    response_codes = [200, 201]
-    results = []
-
-    if update_version == 'false':
-        response_codes = [200, 201, 409]
-    with open("onapTypesToUpgrade.json", 'r') as stream:
-        try:
-            types = json.load(stream)
-            nfv_types = types["nfv"]
-            debug(nfv_types)
-            nfv_file_dir = base_dir + "nfv-types/"
-            debug(nfv_file_dir)
-            for nfvType in nfv_types:
-                result = createNormativeType(scheme, be_host, be_port, admin_user, nfv_file_dir,
-                                             nfvType.encode('ascii', 'ignore'), update_version)
-                results.append(result)
-                if result[1] is None or result[1] not in response_codes:
-                    print "Failed creating nfv type " + nfvType + ". " + str(result[1])
-        except Exception as exc:
-            print(exc)
-
-    return results
-
-
-def main(argv):
-    print 'Number of arguments:', len(sys.argv), 'arguments.'
-
-    be_host = 'localhost'
-    be_port = '8080'
-    admin_user = 'jh0003'
-    update_version = 'true'
-    scheme = 'http'
-
-    try:
-        opts, args = getopt.getopt(argv, "i:p:u:v:h:s:", ["ip=", "port=", "user=", "updateversion=", "scheme="])
-    except getopt.GetoptError:
-        usage()
-        error_and_exit(2, 'Invalid input')
-
-    for opt, arg in opts:
-        # print opt, arg
-        if opt == '-h':
-            usage()
-            sys.exit(3)
-        elif opt in ("-i", "--ip"):
-            be_host = arg
-        elif opt in ("-p", "--port"):
-            be_port = arg
-        elif opt in ("-u", "--user"):
-            admin_user = arg
-        elif opt in ("-s", "--scheme"):
-            scheme = arg
-        elif opt in ("-v", "--updateversion"):
-            if arg.lower() == "false" or arg.lower() == "no":
-                update_version = 'false'
-
-    print 'scheme =', scheme, ', be host =', be_host, ', be port =', be_port, ', user =', admin_user
-
-    if be_host is None:
-        usage()
-        sys.exit(3)
-
-    results = upgradeNfvTypesPerConfigFile(scheme, be_host, be_port, admin_user, "../../../import/tosca/",
-                                           update_version)
-
-    print "-----------------------------"
-    for result in results:
-        print "{0:20} | {1:6}".format(result[0], result[1])
-    print "-----------------------------"
-
-    response_codes = [200, 201]
-
-    if update_version == 'false':
-        response_codes = [200, 201, 409]
-
-    failed_normatives = filter(lambda x: x[1] is None or x[1] not in response_codes, results)
-    if len(list(failed_normatives)) > 0:
-        error_and_exit(1, None)
-    else:
-        error_and_exit(0, None)
-
-
-if __name__ == "__main__":
-    main(sys.argv[1:])
diff --git a/catalog-be/src/main/resources/scripts/import/tosca/upgradeNormative.py b/catalog-be/src/main/resources/scripts/import/tosca/upgradeNormative.py
deleted file mode 100644
index c8f5ecf..0000000
--- a/catalog-be/src/main/resources/scripts/import/tosca/upgradeNormative.py
+++ /dev/null
@@ -1,130 +0,0 @@
-import os
-import time
-
-import importCommon
-from importAnnotationTypes import import_annotation_types
-from importCategoryTypes import importCategories
-from importCommon import *
-from importDataTypes import importDataTypes
-from importGroupTypes import importGroupTypes
-from importNormativeCapabilities import importNormativeCapabilities
-from importNormativeInterfaceLifecycleTypes import importNormativeInterfaceLifecycleType
-from importNormativeRelationships import importNormativeRelationships
-from importPolicyTypes import importPolicyTypes
-from upgradeHeatAndNormativeTypes import upgradeTypesPerConfigFile
-
-
-#################################################################################################################################################################################################################################
-#																																		       																					#
-# Upgrades the normative types																										   																							#
-# 																																			   																					#
-# activation :																																   																					#
-#       python upgradeNormative.py [-s <scheme> | --scheme=<scheme> ] [-i <be host> | --ip=<be host>] [-p <be port> | --port=<be port> ] [-u <user userId> | --user=<user userId> ] [-d <true|false> | --debug=<true|false>]	#
-#																																																								#
-#																																		  	   																					#
-# shortest activation (be host = localhost, be port = 8080, user = jh0003): 																				   																	#
-#		python upgradeNormative.py												 				           																														#
-#																																		       																					#
-#################################################################################################################################################################################################################################
-
-
-def usage():
-    print sys.argv[0], \
-        '[optional -s <scheme> | --scheme=<scheme>, default http] [-i <be host> | --ip=<be host>] [-p <be port> | --port=<be port> ] [-u <user userId> | --user=<user userId> ] [-d <true|false> | --debug=<true|false>]'
-
-
-def handleResults(results):
-    print_frame_line()
-    for result in results:
-        print_name_and_return_code(result[0], result[1])
-    print_frame_line()
-
-    failed_results = filter(lambda x: x[1] is None or x[1] not in [200, 201, 409], results)
-    if len(list(failed_results)) > 0:
-        error_and_exit(1, None)
-
-
-def main(argv):
-    print 'Number of arguments:', len(sys.argv), 'arguments.'
-
-    be_host = 'localhost'
-    be_port = '8080'
-    admin_user = 'jh0003'
-    debug_f = None
-    update_version = 'true'
-    importCommon.debugFlag = False
-    scheme = 'http'
-
-    try:
-        opts, args = getopt.getopt(argv, "i:p:u:d:h:s:", ["ip=", "port=", "user=", "debug=", "scheme="])
-    except getopt.GetoptError:
-        usage()
-        error_and_exit(2, 'Invalid input')
-
-    for opt, arg in opts:
-        # print opt, arg
-        if opt == '-h':
-            usage()
-            sys.exit(3)
-        elif opt in ("-i", "--ip"):
-            be_host = arg
-        elif opt in ("-p", "--port"):
-            be_port = arg
-        elif opt in ("-u", "--user"):
-            admin_user = arg
-        elif opt in ("-s", "--scheme"):
-            scheme = arg
-        elif opt in ("-d", "--debug"):
-            print arg
-            debug_f = bool(arg.lower() == "true" or arg.lower() == "yes")
-
-    print 'scheme =', scheme, ', be host =', be_host, ', be port =', be_port, ', user =', admin_user, ', debug =', debug_f
-
-    if debug_f is not None:
-        print 'set debug mode to ' + str(debug_f)
-        importCommon.debugFlag = debug_f
-
-    if be_host is None:
-        usage()
-        sys.exit(3)
-
-    print sys.argv[0]
-    path_dir = os.path.dirname(os.path.realpath(sys.argv[0]))
-    debug("path dir =" + path_dir)
-
-    base_file_location = path_dir + "/../../../import/tosca/"
-
-    file_location = base_file_location + "categories/"
-    importCategories(scheme, be_host, be_port, admin_user, False, file_location)
-
-    file_location = base_file_location + "relationship-types/"
-    importNormativeRelationships(scheme, be_host, be_port, admin_user, False, file_location)
-
-    file_location = base_file_location + "data-types/"
-    importDataTypes(scheme, be_host, be_port, admin_user, False, file_location)
-
-    file_location = base_file_location + "policy-types/"
-    importPolicyTypes(scheme, be_host, be_port, admin_user, False, file_location)
-
-    file_location = base_file_location + "capability-types/"
-    importNormativeCapabilities(scheme, be_host, be_port, admin_user, False, file_location)
-
-    file_location = base_file_location + "group-types/"
-    importGroupTypes(scheme, be_host, be_port, admin_user, False, file_location)
-
-    file_location = base_file_location + "interface-lifecycle-types/"
-    importNormativeInterfaceLifecycleType(scheme, be_host, be_port, admin_user, False, file_location)
-
-    import_annotation_types(scheme, be_host, be_port, admin_user, False)
-
-    print 'sleep until data type cache is updated'
-    time.sleep(70)
-
-    results_heat = upgradeTypesPerConfigFile(scheme, be_host, be_port, admin_user, base_file_location, update_version)
-    handleResults(results_heat)
-
-    error_and_exit(0, None)
-
-
-if __name__ == "__main__":
-    main(sys.argv[1:])
diff --git a/catalog-be/src/main/resources/scripts/import/tosca/upgradeNormativeVersion.py b/catalog-be/src/main/resources/scripts/import/tosca/upgradeNormativeVersion.py
deleted file mode 100644
index b5ba42f..0000000
--- a/catalog-be/src/main/resources/scripts/import/tosca/upgradeNormativeVersion.py
+++ /dev/null
@@ -1,108 +0,0 @@
-import os
-
-import importCommon
-from importCommon import *
-from importNormativeTypes import createNormativeType
-
-
-#################################################################################################################################################################################################################################
-#																																		       																					#
-# Upgrades the normative types																										   																							#
-# 																																			   																					#
-# activation :																																   																					#
-#       python upgradeNormative.py [-s <scheme> | --scheme=<scheme> ] [-i <be host> | --ip=<be host>] [-p <be port> | --port=<be port> ] [-u <user userId> | --user=<user userId> ] [-d <true|false> | --debug=<true|false>]	#
-#																																																								#
-#																																		  	   																					#
-# shortest activation (be host = localhost, be port = 8080, user = jh0003): 																				   																	#
-#		python upgradeNormative.py												 				           																														#
-#																																		       																					#
-#################################################################################################################################################################################################################################
-
-
-def usage():
-    print sys.argv[0], \
-        '[optional -s <scheme> | --scheme=<scheme>, default http] [-i <be host> | --ip=<be host>] [-p <be port> | --port=<be port> ] [-u <user userId> | --user=<user userId> ] [-d <true|false> | --debug=<true|false>]'
-
-
-def handleResults(results):
-    print_frame_line()
-    for result in results:
-        print_name_and_return_code(result[0], result[1])
-    print_frame_line()
-
-    failed_results = filter(lambda x: x[1] is None or x[1] not in [200, 201, 409], results)
-    if len(list(failed_results)) > 0:
-        error_and_exit(1, None)
-
-
-def main(argv):
-    print 'Number of arguments:', len(sys.argv), 'arguments.'
-
-    be_host = 'localhost'
-    be_port = '8080'
-    admin_user = 'jh0003'
-    debug_f = None
-    update_version = 'true'
-    importCommon.debugFlag = False
-    scheme = 'http'
-
-    try:
-        opts, args = getopt.getopt(argv, "i:p:u:d:h:s:", ["ip=", "port=", "user=", "debug=", "scheme="])
-    except getopt.GetoptError:
-        usage()
-        error_and_exit(2, 'Invalid input')
-
-    for opt, arg in opts:
-        # print opt, arg
-        if opt == '-h':
-            usage()
-            sys.exit(3)
-        elif opt in ("-i", "--ip"):
-            be_host = arg
-        elif opt in ("-p", "--port"):
-            be_port = arg
-        elif opt in ("-u", "--user"):
-            admin_user = arg
-        elif opt in ("-s", "--scheme"):
-            scheme = arg
-        elif opt in ("-d", "--debug"):
-            print arg
-            debug_f = bool(arg.lower() == "true" or arg.lower() == "yes")
-
-    print 'scheme =', scheme, ', be host =', be_host, ', be port =', be_port, ', user =', admin_user, ', debug =', debug_f
-
-    if debug_f is not None:
-        print 'set debug mode to ' + str(debug_f)
-        importCommon.debugFlag = debug_f
-
-    if be_host is None:
-        usage()
-        sys.exit(3)
-
-    print sys.argv[0]
-    path_dir = os.path.dirname(os.path.realpath(sys.argv[0]))
-    debug("path dir =" + path_dir)
-
-    base_file_location = path_dir + "/../../../import/tosca/"
-    results = []
-
-    ##########################################################################
-    # ---------------------------------for release 1702---------------------- #
-    ##########################################################################
-
-    file_location = base_file_location + "heat-types/"
-    result = createNormativeType(scheme, be_host, be_port, admin_user, file_location,
-                                 "contrailV2VirtualMachineInterface", update_version)
-    results.append(result)
-
-    file_location = base_file_location + "heat-types/"
-    result = createNormativeType(scheme, be_host, be_port, admin_user, file_location, "neutronPort", update_version)
-    results.append(result)
-
-    handleResults(results)
-
-    error_and_exit(0, None)
-
-
-if __name__ == "__main__":
-    main(sys.argv[1:])
diff --git a/catalog-be/src/main/resources/scripts/import/tosca/upgradeNormativeVersionAll.py b/catalog-be/src/main/resources/scripts/import/tosca/upgradeNormativeVersionAll.py
deleted file mode 100644
index a5e2eba..0000000
--- a/catalog-be/src/main/resources/scripts/import/tosca/upgradeNormativeVersionAll.py
+++ /dev/null
@@ -1,102 +0,0 @@
-import os
-
-import importCommon
-from importCommon import *
-from importHeatTypes import importHeatTypes
-from importNormativeTypes import importNormativeTypes
-from importOnapTypes import importOnapTypes
-
-
-def usage():
-    print sys.argv[0], \
-        '[optional -s <scheme> | --scheme=<scheme>, default http] [-i <be host> | --ip=<be host>] [-p <be port> | --port=<be port> ] [-u <user userId> | --user=<user userId> ] [-d <true|false> | --debug=<true|false>] [-v <true|false> | --updateversion=<true|false>]'
-
-
-def handleResults(results, update_version):
-    print_frame_line()
-    for result in results:
-        print_name_and_return_code(result[0], result[1])
-    print_frame_line()
-
-    response_codes = [200, 201]
-
-    if update_version == 'false':
-        response_codes = [200, 201, 409]
-
-    failed_results = filter(lambda x: x[1] is None or x[1] not in response_codes, results)
-    if len(list(failed_results)) > 0:
-        error_and_exit(1, None)
-
-
-def main(argv):
-    print 'Number of arguments:', len(sys.argv), 'arguments.'
-
-    be_host = 'localhost'
-    be_port = '8080'
-    admin_user = 'jh0003'
-    debug_f = None
-    update_version = 'true'
-    importCommon.debugFlag = False
-    scheme = 'http'
-
-    try:
-        opts, args = getopt.getopt(argv, "i:p:u:d:v:h:s:",
-                                   ["ip=", "port=", "user=", "debug=", "updateversion=", "scheme="])
-    except getopt.GetoptError:
-        usage()
-        error_and_exit(2, 'Invalid input')
-
-    for opt, arg in opts:
-        # print opt, arg
-        if opt == '-h':
-            usage()
-            sys.exit(3)
-        elif opt in ("-i", "--ip"):
-            be_host = arg
-        elif opt in ("-p", "--port"):
-            be_port = arg
-        elif opt in ("-u", "--user"):
-            admin_user = arg
-        elif opt in ("-s", "--scheme"):
-            scheme = arg
-        elif opt in ("-d", "--debug"):
-            print arg
-            debug_f = bool(arg.lower() == "true" or arg.lower() == "yes")
-        elif opt in ("-v", "--updateversion"):
-            print arg
-            if arg.lower() == "false" or arg.lower() == "no":
-                update_version = 'false'
-
-    print 'scheme =', scheme, ', be host =', be_host, ', be port =', be_port, ', user =', admin_user, ', debug =', debug_f, ', updateversion =', update_version
-
-    if debug_f is not None:
-        print 'set debug mode to ' + str(debug_f)
-        importCommon.debugFlag = debug_f
-
-    if be_host is None:
-        usage()
-        sys.exit(3)
-
-    print sys.argv[0]
-    path_dir = os.path.dirname(os.path.realpath(sys.argv[0]))
-    debug("path dir =" + path_dir)
-
-    base_file_location = path_dir + "/../../../import/tosca/"
-
-    file_location = base_file_location + "normative-types/"
-    results = importNormativeTypes(scheme, be_host, be_port, admin_user, file_location, update_version)
-    handleResults(results, update_version)
-
-    file_location = base_file_location + "heat-types/"
-    results_heat = importHeatTypes(scheme, be_host, be_port, admin_user, file_location, update_version)
-    handleResults(results_heat, update_version)
-
-    file_location = base_file_location + "onap-types/"
-    results_onap = importOnapTypes(scheme, be_host, be_port, admin_user, file_location, update_version)
-    handleResults(results_onap, update_version)
-
-    error_and_exit(0, None)
-
-
-if __name__ == "__main__":
-    main(sys.argv[1:])
diff --git a/catalog-be/src/main/resources/scripts/import/tosca/upgradeNormativeVersionProd1702_3537.py b/catalog-be/src/main/resources/scripts/import/tosca/upgradeNormativeVersionProd1702_3537.py
deleted file mode 100644
index cc2325f..0000000
--- a/catalog-be/src/main/resources/scripts/import/tosca/upgradeNormativeVersionProd1702_3537.py
+++ /dev/null
@@ -1,134 +0,0 @@
-import os
-
-import importCommon
-from importCommon import *
-from importNormativeTypes import createNormativeType
-
-
-#################################################################################################################################################################################################################################
-#																																		       																					#
-# Upgrades the normative types																										   																							#
-# 																																			   																					#
-# activation :																																   																					#
-#       python upgradeNormative.py [-s <scheme> | --scheme=<scheme> ] [-i <be host> | --ip=<be host>] [-p <be port> | --port=<be port> ] [-u <user userId> | --user=<user userId> ] [-d <true|false> | --debug=<true|false>]	#
-#																																																								#
-#																																		  	   																					#
-# shortest activation (be host = localhost, be port = 8080, user = jh0003): 																				   																	#
-#		python upgradeNormative.py												 				           																														#
-#																																		       																					#
-#################################################################################################################################################################################################################################
-
-
-def usage():
-    print sys.argv[0], \
-        '[optional -s <scheme> | --scheme=<scheme>, default http] [-i <be host> | --ip=<be host>] [-p <be port> | --port=<be port> ] [-u <user userId> | --user=<user userId> ] [-d <true|false> | --debug=<true|false>]'
-
-
-def handleResults(results):
-    print_frame_line()
-    for result in results:
-        print_name_and_return_code(result[0], result[1])
-    print_frame_line()
-
-    failed_results = filter(lambda x: x[1] is None or x[1] not in [200, 201, 409], results)
-    if len(list(failed_results)) > 0:
-        error_and_exit(1, None)
-
-
-def main(argv):
-    print 'Number of arguments:', len(sys.argv), 'arguments.'
-
-    be_host = 'localhost'
-    be_port = '8080'
-    admin_user = 'jh0003'
-    debug_f = None
-    update_version = 'true'
-    importCommon.debugFlag = False
-    scheme = 'http'
-
-    try:
-        opts, args = getopt.getopt(argv, "i:p:u:d:h:s:", ["ip=", "port=", "user=", "debug=", "scheme="])
-    except getopt.GetoptError:
-        usage()
-        error_and_exit(2, 'Invalid input')
-
-    for opt, arg in opts:
-        # print opt, arg
-        if opt == '-h':
-            usage()
-            sys.exit(3)
-        elif opt in ("-i", "--ip"):
-            be_host = arg
-        elif opt in ("-p", "--port"):
-            be_port = arg
-        elif opt in ("-u", "--user"):
-            admin_user = arg
-        elif opt in ("-s", "--scheme"):
-            scheme = arg
-        elif opt in ("-d", "--debug"):
-            print arg
-            debug_f = bool(arg.lower() == "true" or arg.lower() == "yes")
-
-    print 'scheme =', scheme, ', be host =', be_host, ', be port =', be_port, ', user =', admin_user, ', debug =', debug_f
-
-    if debug_f is not None:
-        print 'set debug mode to ' + str(debug_f)
-        importCommon.debugFlag = debug_f
-
-    if be_host is None:
-        usage()
-        sys.exit(3)
-
-    print sys.argv[0]
-    path_dir = os.path.dirname(os.path.realpath(sys.argv[0]))
-    debug("path dir =" + path_dir)
-
-    base_file_location = path_dir + "/../../../import/tosca/"
-    results = []
-
-    ##########################################################################
-    # ---------------------------------for release 1702---------------------- #
-    ##########################################################################
-
-    file_location = base_file_location + "heat-types/"
-    result = createNormativeType(scheme, be_host, be_port, admin_user, file_location, "contrailPort", update_version)
-    results.append(result)
-
-    file_location = base_file_location + "heat-types/"
-    result = createNormativeType(scheme, be_host, be_port, admin_user, file_location,
-                                 "contrailV2VirtualMachineInterface", update_version)
-    results.append(result)
-
-    file_location = base_file_location + "heat-types/"
-    result = createNormativeType(scheme, be_host, be_port, admin_user, file_location, "neutronPort", update_version)
-    results.append(result)
-
-    file_location = base_file_location + "heat-types/"
-    result = createNormativeType(scheme, be_host, be_port, admin_user, file_location, "contrailCompute", update_version)
-    results.append(result)
-
-    file_location = base_file_location + "heat-types/"
-    result = createNormativeType(scheme, be_host, be_port, admin_user, file_location, "novaServer", update_version)
-    results.append(result)
-
-    file_location = base_file_location + "heat-types/"
-    result = createNormativeType(scheme, be_host, be_port, admin_user, file_location, "contrailV2VirtualNetwork",
-                                 update_version)
-    results.append(result)
-
-    file_location = base_file_location + "heat-types/"
-    result = createNormativeType(scheme, be_host, be_port, admin_user, file_location, "contrailVirtualNetwork",
-                                 update_version)
-    results.append(result)
-
-    file_location = base_file_location + "heat-types/"
-    result = createNormativeType(scheme, be_host, be_port, admin_user, file_location, "neutronNet", update_version)
-    results.append(result)
-
-    handleResults(results)
-
-    error_and_exit(0, None)
-
-
-if __name__ == "__main__":
-    main(sys.argv[1:])
diff --git a/catalog-be/src/main/resources/scripts/import/tosca/upgradeONAPNormative.py b/catalog-be/src/main/resources/scripts/import/tosca/upgradeONAPNormative.py
deleted file mode 100644
index 59fece9..0000000
--- a/catalog-be/src/main/resources/scripts/import/tosca/upgradeONAPNormative.py
+++ /dev/null
@@ -1,146 +0,0 @@
-import os
-import time
-from importCategoryTypes import importCategories
-from upgradeHeatAndNormativeTypes import upgradeTypesPerConfigFile
-from importDataTypes import importDataTypes
-from importPolicyTypes import importPolicyTypes
-from importGroupTypes import importGroupTypes
-from importNormativeCapabilities import importNormativeCapabilities
-from importNormativeRelationships import importNormativeRelationships
-from importNormativeInterfaceLifecycleTypes import importNormativeInterfaceLifecycleType
-from upgradeNfvTypes import upgradeNfvTypesPerConfigFile
-from upgradeONAPTypes import upgradeOnapTypesPerConfigFile
-from upgradeSolTypes import upgradeSolTypesPerConfigFile
-
-from importCommon import *
-import importCommon
-
-
-#################################################################################################################################################################################################
-#																																		       													#
-# Upgrades the normative types																										   															#
-# 																																			   													#
-# activation :																																   													#
-#       python upgradeNormative.py [-i <be host> | --ip=<be host>] [-p <be port> | --port=<be port> ] [-u <user userId> | --user=<user userId> ] [-d <true|false> | --debug=<true|false>] 		#
-#																																																#
-#																																		  	   													#
-# shortest activation (be host = localhost, be port = 8080, user = jh0003): 																				   									#
-#		python upgradeNormative.py												 				           																						#
-#																																		       													#
-#################################################################################################################################################################################################
-
-def usage():
-    print sys.argv[
-        0], '[-i <be host> | --ip=<be host>] [-p <be port> | --port=<be port> ] [-u <user userId> | --user=<user ' \
-            'userId> ] [-d <true|false> | --debug=<true|false>] '
-
-
-def handle_results(results):
-    if results is not None:
-        print_frame_line()
-        for result in results:
-            print_name_and_return_code(result[0], result[1])
-
-        print_frame_line()
-
-        failed_results = filter(lambda x: x[1] is None or x[1] not in [200, 201, 409], results)
-        if len(failed_results) > 0:
-            error_and_exit(1, None)
-
-
-def main(argv):
-    print 'Number of arguments:', len(sys.argv), 'arguments.'
-
-    be_host = 'localhost'
-    be_port = '8080'
-    admin_user = 'jh0003'
-    is_debug = None
-    update_version = 'true'
-    update_onap_version = 'false'
-    importCommon.debugFlag = False
-    scheme = 'http'
-
-    try:
-        opts, args = getopt.getopt(argv, "i:p:u:d:v:h:s",
-                                   ["scheme=", "ip=", "port=", "user=", "debug=", "updateversion="])
-    except getopt.GetoptError:
-        usage()
-        error_and_exit(2, 'Invalid input')
-
-    for opt, arg in opts:
-        # print opt, arg
-        if opt == '-h':
-            usage()
-            sys.exit(3)
-        elif opt in ("-i", "--ip"):
-            be_host = arg
-        elif opt in ("-p", "--port"):
-            be_port = arg
-        elif opt in ("-u", "--user"):
-            admin_user = arg
-        elif opt in ("-s", "--scheme"):
-            scheme = arg
-        elif opt in ("-d", "--debug"):
-            print arg
-            is_debug = bool(arg.lower() == "true" or arg.lower() == "yes")
-
-    print 'scheme =', scheme, ',be host =', be_host, ', be port =', be_port, ', user =', admin_user, ', debug =', is_debug
-
-    if is_debug is not None:
-        print 'set debug mode to ' + str(is_debug)
-        importCommon.debugFlag = is_debug
-
-    if be_host is None:
-        usage()
-        sys.exit(3)
-
-    print sys.argv[0]
-    pathdir = os.path.dirname(os.path.realpath(sys.argv[0]))
-    debug("path dir =" + pathdir)
-
-    base_file_location = pathdir + "/../../../import/tosca/"
-
-    file_location = base_file_location + "categories/"
-    importCategories(scheme, be_host, be_port, admin_user, False, file_location)
-
-    file_location = base_file_location + "relationship-types/"
-    importNormativeRelationships(scheme, be_host, be_port, admin_user, False, file_location)
-
-    file_location = base_file_location + "data-types/"
-    importDataTypes(scheme, be_host, be_port, admin_user, False, file_location)
-
-    file_location = base_file_location + "policy-types/"
-    importPolicyTypes(scheme, be_host, be_port, admin_user, False, file_location)
-
-    file_location = base_file_location + "group-types/"
-    importGroupTypes(scheme, be_host, be_port, admin_user, False, file_location)
-
-    file_location = base_file_location + "capability-types/"
-    importNormativeCapabilities(scheme, be_host, be_port, admin_user, False, file_location)
-
-    file_location = base_file_location + "interface-lifecycle-types/"
-    importNormativeInterfaceLifecycleType(scheme, be_host, be_port, admin_user, False, file_location)
-
-    print 'sleep until data type cache is updated'
-    time.sleep(70)
-
-    results_heat = upgradeTypesPerConfigFile(scheme, be_host, be_port, admin_user, base_file_location, update_version)
-    handle_results(results_heat)
-
-    results_heat = upgradeNfvTypesPerConfigFile(scheme, be_host, be_port, admin_user, base_file_location,
-                                                update_onap_version)
-    handle_results(results_heat)
-
-    results_heat = upgradeOnapTypesPerConfigFile(scheme, be_host, be_port, admin_user, base_file_location,
-                                                 update_onap_version)
-    handle_results(results_heat)
-
-    results_heat = upgradeSolTypesPerConfigFile(scheme, be_host, be_port, admin_user, base_file_location,
-                                                update_onap_version)
-    handle_results(results_heat)
-
-    error_and_exit(0, None)
-
-
-if __name__ == "__main__":
-    main(sys.argv[1:])
diff --git a/catalog-be/src/main/resources/scripts/import/tosca/upgradeONAPTypes.py b/catalog-be/src/main/resources/scripts/import/tosca/upgradeONAPTypes.py
deleted file mode 100644
index bb26659..0000000
--- a/catalog-be/src/main/resources/scripts/import/tosca/upgradeONAPTypes.py
+++ /dev/null
@@ -1,101 +0,0 @@
-from importNormativeTypes import *
-
-
-################################################################################################################################################################################################
-#																																		                                                       #
-# Upgrades all Heat and Normative types confiugred in "typesToUpgrade.json" file																										       #
-# 																																			                                                   #
-# activation                                                                                                                                                                                   #
-#       python upgradeHeatAndNormativeTypes.py [-s <scheme> | --scheme=<scheme> ] [-i <be host> | --ip=<be host>] [-p <be port> | --port=<be port> ] [-f <input file> | --ifile=<input file> ] #
-#																																		  	                                                   #
-# shortest activation (be host = localhost, be port = 8080): 																				                                                   #
-#		python upgradeHeatAndNormativeTypes.py [-f <input file> | --ifile=<input file> ]												 				                                       #
-#																																		                                                       #
-################################################################################################################################################################################################
-
-
-def upgradeOnapTypesPerConfigFile(scheme, be_host, be_port, admin_user, base_dir, update_version):
-    response_codes = [200, 201]
-    results = []
-
-    if update_version == 'false':
-        response_codes = [200, 201, 409]
-    with open("onapTypesToUpgrade.json", 'r') as stream:
-        try:
-            types = json.load(stream)
-            onap_types = types["onap"]
-            debug(onap_types)
-            onap_file_dir = base_dir + "onap-types/"
-            debug(onap_file_dir)
-            for onap_type in onap_types:
-                result = createNormativeType(scheme, be_host, be_port, admin_user, onap_file_dir,
-                                             onap_type.encode('ascii', 'ignore'), update_version)
-                results.append(result)
-                if result[1] is None or result[1] not in response_codes:
-                    print "Failed creating onap type " + onap_type + ". " + str(result[1])
-        except Exception as exc:
-            print(exc)
-
-    return results
-
-
-def main(argv):
-    print 'Number of arguments:', len(sys.argv), 'arguments.'
-
-    be_host = 'localhost'
-    be_port = '8080'
-    admin_user = 'jh0003'
-    update_version = 'true'
-    scheme = 'http'
-
-    try:
-        opts, args = getopt.getopt(argv, "i:p:u:v:h:s:", ["ip=", "port=", "user=", "updateversion=", "scheme="])
-    except getopt.GetoptError:
-        usage()
-        error_and_exit(2, 'Invalid input')
-
-    for opt, arg in opts:
-        # print opt, arg
-        if opt == '-h':
-            usage()
-            sys.exit(3)
-        elif opt in ("-i", "--ip"):
-            be_host = arg
-        elif opt in ("-p", "--port"):
-            be_port = arg
-        elif opt in ("-u", "--user"):
-            admin_user = arg
-        elif opt in ("-s", "--scheme"):
-            scheme = arg
-        elif opt in ("-v", "--updateversion"):
-            if arg.lower() == "false" or arg.lower() == "no":
-                update_version = 'false'
-
-    print 'scheme =', scheme, ', be host =', be_host, ', be port =', be_port, ', user =', admin_user
-
-    if be_host is None:
-        usage()
-        sys.exit(3)
-
-    results = upgradeOnapTypesPerConfigFile(scheme, be_host, be_port, admin_user, "../../../import/tosca/",
-                                            update_version)
-
-    print "-----------------------------"
-    for result in results:
-        print "{0:20} | {1:6}".format(result[0], result[1])
-    print "-----------------------------"
-
-    response_codes = [200, 201]
-
-    if update_version == 'false':
-        response_codes = [200, 201, 409]
-
-    failed_normatives = filter(lambda x: x[1] is None or x[1] not in response_codes, results)
-    if len(list(failed_normatives)) > 0:
-        error_and_exit(1, None)
-    else:
-        error_and_exit(0, None)
-
-
-if __name__ == "__main__":
-    main(sys.argv[1:])
diff --git a/catalog-be/src/main/resources/scripts/import/tosca/upgradeSolTypes.py b/catalog-be/src/main/resources/scripts/import/tosca/upgradeSolTypes.py
deleted file mode 100644
index aa60e4d..0000000
--- a/catalog-be/src/main/resources/scripts/import/tosca/upgradeSolTypes.py
+++ /dev/null
@@ -1,100 +0,0 @@
-from importNormativeTypes import *
-
-
-################################################################################################################################################################################################
-#																																		                                                       #
-# Upgrades all Heat and Normative types confiugred in "typesToUpgrade.json" file																										       #
-# 																																			                                                   #
-# activation                                                                                                                                                                                   #
-#       python upgradeHeatAndNormativeTypes.py [-s <scheme> | --scheme=<scheme> ] [-i <be host> | --ip=<be host>] [-p <be port> | --port=<be port> ] [-f <input file> | --ifile=<input file> ] #
-#																																		  	                                                   #
-# shortest activation (be host = localhost, be port = 8080): 																				                                                   #
-#		python upgradeHeatAndNormativeTypes.py [-f <input file> | --ifile=<input file> ]												 				                                       #
-#																																		                                                       #
-################################################################################################################################################################################################
-
-
-def upgradeSolTypesPerConfigFile(scheme, be_host, be_port, admin_user, base_dir, update_version):
-    response_codes = [200, 201]
-    results = []
-    if update_version == 'false':
-        response_codes = [200, 201, 409]
-    with open("onapTypesToUpgrade.json", 'r') as stream:
-        try:
-            types = json.load(stream)
-            sol_types = types["sol"]
-            debug(sol_types)
-            sol_file_dir = base_dir + "sol-types/"
-            debug(sol_file_dir)
-            for solType in sol_types:
-                result = createNormativeType(scheme, be_host, be_port, admin_user, sol_file_dir,
-                                             solType.encode('ascii', 'ignore'), update_version)
-                results.append(result)
-                if result[1] is None or result[1] not in response_codes:
-                    print "Failed creating sol type " + solType + ". " + str(result[1])
-        except Exception as exc:
-            print(exc)
-
-    return results
-
-
-def main(argv):
-    print 'Number of arguments:', len(sys.argv), 'arguments.'
-
-    be_host = 'localhost'
-    be_port = '8080'
-    admin_user = 'jh0003'
-    update_version = 'true'
-    scheme = 'http'
-
-    try:
-        opts, args = getopt.getopt(argv, "i:p:u:v:h:s:", ["ip=", "port=", "user=", "updateversion=", "scheme="])
-    except getopt.GetoptError:
-        usage()
-        error_and_exit(2, 'Invalid input')
-
-    for opt, arg in opts:
-        # print opt, arg
-        if opt == '-h':
-            usage()
-            sys.exit(3)
-        elif opt in ("-i", "--ip"):
-            be_host = arg
-        elif opt in ("-p", "--port"):
-            be_port = arg
-        elif opt in ("-u", "--user"):
-            admin_user = arg
-        elif opt in ("-s", "--scheme"):
-            scheme = arg
-        elif opt in ("-v", "--updateversion"):
-            if arg.lower() == "false" or arg.lower() == "no":
-                update_version = 'false'
-
-    print 'scheme =', scheme, ', be host =', be_host, ', be port =', be_port, ', user =', admin_user
-
-    if be_host is None:
-        usage()
-        sys.exit(3)
-
-    results = upgradeSolTypesPerConfigFile(scheme, be_host, be_port, admin_user, "../../../import/tosca/",
-                                           update_version)
-
-    print "-----------------------------"
-    for result in results:
-        print "{0:20} | {1:6}".format(result[0], result[1])
-    print "-----------------------------"
-
-    response_codes = [200, 201]
-
-    if update_version == 'false':
-        response_codes = [200, 201, 409]
-
-    failed_normatives = filter(lambda x: x[1] is None or x[1] not in response_codes, results)
-    if len(list(failed_normatives)) > 0:
-        error_and_exit(1, None)
-    else:
-        error_and_exit(0, None)
-
-
-if __name__ == "__main__":
-    main(sys.argv[1:])
diff --git a/catalog-be/src/main/resources/scripts/sdcBePy/__init__.py b/catalog-be/src/main/resources/scripts/sdcBePy/__init__.py
new file mode 100644
index 0000000..e69de29
--- /dev/null
+++ b/catalog-be/src/main/resources/scripts/sdcBePy/__init__.py
diff --git a/catalog-be/src/main/resources/scripts/sdcBePy/common/__init__.py b/catalog-be/src/main/resources/scripts/sdcBePy/common/__init__.py
new file mode 100644
index 0000000..e69de29
--- /dev/null
+++ b/catalog-be/src/main/resources/scripts/sdcBePy/common/__init__.py
diff --git a/catalog-be/src/main/resources/scripts/sdcBePy/common/bColors.py b/catalog-be/src/main/resources/scripts/sdcBePy/common/bColors.py
new file mode 100755
index 0000000..a14458b
--- /dev/null
+++ b/catalog-be/src/main/resources/scripts/sdcBePy/common/bColors.py
@@ -0,0 +1,8 @@
+
+class BColors:
+
+    HEADER = '\033[95m'
+    WARNING = '\033[93m'
+    FAIL = '\033[91m'
+    END_C = '\033[0m'
+    BOLD = '\033[1m'
diff --git a/catalog-be/src/main/resources/scripts/sdcBePy/common/helpers.py b/catalog-be/src/main/resources/scripts/sdcBePy/common/helpers.py
new file mode 100644
index 0000000..0e6db5e
--- /dev/null
+++ b/catalog-be/src/main/resources/scripts/sdcBePy/common/helpers.py
@@ -0,0 +1,3 @@
+
+def check_arguments_not_none(*args):
+    return None not in args
diff --git a/catalog-be/src/main/resources/scripts/sdcBePy/common/logger.py b/catalog-be/src/main/resources/scripts/sdcBePy/common/logger.py
new file mode 100644
index 0000000..e2e434f
--- /dev/null
+++ b/catalog-be/src/main/resources/scripts/sdcBePy/common/logger.py
@@ -0,0 +1,83 @@
+import sys
+
+debugFlag = True
+
+
+def join_strings(lst):
+    return ''.join([str(string) for string in lst])
+
+
+def debug(desc, *args):
+    if debugFlag:
+        print(desc, join_strings(args))
+
+
+def log(desc, arg):
+    print(desc, arg)
+
+
+def error_and_exit(error_code, error_desc):
+    if error_code > 0:
+        print("status={0}. {1}".format(error_code, '' if not error_desc else error_desc))
+    else:
+        print("status={0}".format(error_code))
+    sys.exit(error_code)
+
+
+def print_name_and_return_code(name, code, with_line=True):
+    if _strings_correct(name, code):
+        if with_line:
+            print("----------------------------------------")
+        print("{0:30} | {1:6}".format(name, code))
+        if with_line:
+            print("----------------------------------------")
+    else:
+        print("name of the item or return code from request is none -> error occurred!!")
+
+
+def _strings_correct(*strings):
+    results = [(string is not None and string != "") for string in strings]
+    return all(results) is True
+
+# def parse_cmd_line_params(argv):
+#     print('Number of arguments:', len(sys.argv), 'arguments.')
+#
+#     opts = []
+#
+#     be_host = 'localhost'
+#     be_port = '8080'
+#     admin_user = 'jh0003'
+#     scheme = 'http'
+#
+#     try:
+#         opts, args = getopt.getopt(argv, "i:p:u:h:s:", ["ip=", "port=", "user=", "scheme="])
+#     except getopt.GetoptError:
+#         usage()
+#         error_and_exit(2, 'Invalid input')
+#
+#     for opt, arg in opts:
+#         # print opt, arg
+#         if opt == '-h':
+#             usage()
+#             sys.exit(3)
+#         elif opt in ("-i", "--ip"):
+#             be_host = arg
+#         elif opt in ("-p", "--port"):
+#             be_port = arg
+#         elif opt in ("-u", "--user"):
+#             admin_user = arg
+#         elif opt in ("-s", "--scheme"):
+#             scheme = arg
+#
+#     print('scheme =', scheme, ', be host =', be_host, ', be port =', be_port, ', user =', admin_user)
+#
+#     if be_host is None:
+#         usage()
+#         sys.exit(3)
+#     return scheme, be_host, be_port, admin_user
+#
+#
+# def usage():
+#     print(sys.argv[0], '[optional -s <scheme> | --scheme=<scheme>, default http ] '
+#                        '[-i <be host> | --ip=<be host>] [-p <be port> | '
+#                        '--port=<be port> ] [-u <user userId> | --user=<user userId> ] ')
diff --git a/catalog-be/src/main/resources/scripts/sdcBePy/common/normative/__init__.py b/catalog-be/src/main/resources/scripts/sdcBePy/common/normative/__init__.py
new file mode 100644
index 0000000..e69de29
--- /dev/null
+++ b/catalog-be/src/main/resources/scripts/sdcBePy/common/normative/__init__.py
diff --git a/catalog-be/src/main/resources/scripts/sdcBePy/common/normative/main.py b/catalog-be/src/main/resources/scripts/sdcBePy/common/normative/main.py
new file mode 100644
index 0000000..a30d46d
--- /dev/null
+++ b/catalog-be/src/main/resources/scripts/sdcBePy/common/normative/main.py
@@ -0,0 +1,16 @@
+from sdcBePy.common.normative.toscaElements import process_and_create_normative_element
+from sdcBePy.common.normative.toscaTypes import process_and_create_normative_types
+
+
+def process_element_list(normative_elements_list, sdc_be_proxy):
+    for normative_element in normative_elements_list:
+        process_and_create_normative_element(normative_element,
+                                             sdc_be_proxy=sdc_be_proxy)
+
+
+def process_type_list(normative_type_list, sdc_be_proxy, update_version):
+    for normative_type in normative_type_list:
+        process_and_create_normative_types(normative_type,
+                                           sdc_be_proxy=sdc_be_proxy,
+                                           update_version=update_version)
+
diff --git a/catalog-be/src/main/resources/scripts/sdcBePy/common/normative/toscaElements.py b/catalog-be/src/main/resources/scripts/sdcBePy/common/normative/toscaElements.py
new file mode 100644
index 0000000..1d4e734
--- /dev/null
+++ b/catalog-be/src/main/resources/scripts/sdcBePy/common/normative/toscaElements.py
@@ -0,0 +1,107 @@
+import json
+import zipfile
+
+import pycurl
+
+from sdcBePy.common.logger import debug, log, print_name_and_return_code, error_and_exit
+from sdcBePy.common.sdcBeProxy import SdcBeProxy
+
+
+def process_and_create_normative_element(normative_element,
+                                         scheme=None, be_host=None, be_port=None, admin_user=None, sdc_be_proxy=None,
+                                         debug=False,
+                                         exit_on_success=False):
+    if sdc_be_proxy is None:
+        sdc_be_proxy = SdcBeProxy(be_host, be_port, scheme, admin_user, debug=debug)
+
+    file_dir, url_suffix, element_name, element_from_name, with_metadata = normative_element.get_parameters()
+    _create_normative_element(sdc_be_proxy,
+                              file_dir,
+                              url_suffix,
+                              element_name,
+                              element_from_name,
+                              with_metadata,
+                              exit_on_success)
+
+
+def _create_normative_element(sdc_be_proxy, file_dir,
+                              url_suffix, element_name, element_form_name, with_metadata=False,
+                              exit_on_success=False):
+    result = _send_request(sdc_be_proxy,
+                           file_dir,
+                           url_suffix,
+                           element_name,
+                           element_form_name,
+                           with_metadata)
+    print_and_check_result(result, exit_on_success)
+
+
+def _send_request(sdc_be_proxy, file_dir, url_suffix, element_name,
+                  element_form_name,
+                  with_metadata=False):
+    try:
+        log("create normative element ", element_name)
+
+        type_file_name = file_dir + element_name
+        multi_part_form_data = _create_multipart_form_data(element_form_name, type_file_name, with_metadata,
+                                                           element_name)
+
+        http_res = sdc_be_proxy.post_file(url_suffix, multi_part_form_data)
+        if http_res is not None:
+            debug("http response =", http_res)
+        debug("response buffer", str(sdc_be_proxy.con.buffer.getvalue(), "UTF-8"))
+        # c.close()
+        return element_name, http_res, sdc_be_proxy.con.buffer.getvalue()
+
+    except Exception as inst:
+        print("ERROR=" + str(inst))
+        return element_name, None, None
+
+
+def _create_multipart_form_data(element_form_name, type_file_name, with_metadata, element_name):
+    tosca_type_zip_part = _create_zip_file_multi_part(element_form_name, type_file_name, element_name)
+    multi_part_form_data = [tosca_type_zip_part]
+    if with_metadata:
+        metadata_type_part = _create_metadata_multipart(type_file_name)
+        multi_part_form_data.append(metadata_type_part)
+    debug(multi_part_form_data)
+    return multi_part_form_data
+
+
+def _create_metadata_multipart(type_file_name):
+    metadata = _create_json_metadata_str(type_file_name)
+    return "toscaTypeMetadata", metadata
+
+
+def _create_zip_file_multi_part(element_form_name, type_file_name, element_name):
+    zf = zipfile.ZipFile(type_file_name + ".zip", "w")
+    zf.write(type_file_name + '.yml', element_name + '.yml')
+    zf.close()
+
+    tosca_type_zip_path = type_file_name + ".zip"
+    tosca_type_zip_part = (element_form_name, (pycurl.FORM_FILE, tosca_type_zip_path))
+    return tosca_type_zip_part
+
+
+def _create_json_metadata_str(file_name):
+    type_metadata_json_file = file_name + ".json"
+    debug(type_metadata_json_file)
+    json_file = open(type_metadata_json_file)
+
+    debug("before load json")
+    json_data = json.load(json_file, strict=False)
+    debug(json_data)
+
+    return json.dumps(json_data)
+
+
+def print_and_check_result(result, exit_on_success):
+    if result is not None:
+        print_name_and_return_code(result[0], result[1])
+        if result[1] is None or result[1] not in [200, 201, 409]:
+            error_and_exit(1, "Failed to create the normatives elements!!")
+        else:
+            if exit_on_success is True:
+                error_and_exit(0, "All normatives elements created successfully!!")
+    else:
+        error_and_exit(1, "Results is None!!")
diff --git a/catalog-be/src/main/resources/scripts/sdcBePy/common/normative/toscaTypes.py b/catalog-be/src/main/resources/scripts/sdcBePy/common/normative/toscaTypes.py
new file mode 100644
index 0000000..48b20cc
--- /dev/null
+++ b/catalog-be/src/main/resources/scripts/sdcBePy/common/normative/toscaTypes.py
@@ -0,0 +1,121 @@
+import json
+import zipfile
+
+import pycurl
+
+from sdcBePy.common.logger import print_name_and_return_code, error_and_exit, log, debug
+from sdcBePy.common.sdcBeProxy import SdcBeProxy
+
+
+def process_and_create_normative_types(normative_type,
+                                       scheme=None, be_host=None, be_port=None, admin_user=None,
+                                       sdc_be_proxy=None,
+                                       update_version=False,
+                                       debug=False,
+                                       exit_on_success=False):
+    if sdc_be_proxy is None:
+        sdc_be_proxy = SdcBeProxy(be_host, be_port, scheme, admin_user, debug=debug)
+
+    file_dir, normative_type_list = normative_type.get_parameters()
+
+    results = _create_normatives_type(file_dir, sdc_be_proxy, normative_type_list, update_version)
+    print_and_check_results(results, update_version, exit_on_success)
+
+
+def print_and_check_results(results, update_version, exit_on_success=False):
+    if results is not None:
+        if len(results) == 0:
+            return
+        print("----------------------------------------")
+        for result in results:
+            print_name_and_return_code(result[0], result[1], with_line=False)
+        print("----------------------------------------")
+        check_results_and_exit(results, update_version, exit_on_success)
+    else:
+        error_and_exit(1, "results is none -> error occurred!!")
+
+
+def check_results_and_exit(results, update_version, exit_on_success):
+    if not _results_ok(results, _get_response_code(update_version)):
+        error_and_exit(1, "Failed to create the normatives types !!")
+    else:
+        if exit_on_success:
+            error_and_exit(0, "All normatives types created successfully!!")
+
+
+def _create_normatives_type(file_dir, sdc_be_proxy, types, update_version):
+    results = []
+    response_codes = _get_response_code(update_version)
+    for normativeType in types:
+        result = _send_request(sdc_be_proxy, file_dir, normativeType, update_version)
+        results.append(result)
+        if result[1] is None or result[1] not in response_codes:
+            print("Failed creating normative type " + normativeType + ". " + str(result[1]))
+    return results
+
+
+def _send_request(sdc_be_proxy, file_dir, element_name, update_version):
+    try:
+        log("create normative type ", element_name)
+        debug("userId", sdc_be_proxy.con.user_header)
+        debug("fileDir", file_dir)
+
+        url = '/sdc2/rest/v1/catalog/upload/multipart'
+        if update_version is not None:
+            url += '?createNewVersion=' + _boolean_to_string(update_version)
+
+        send = _create_send_body(file_dir, element_name)
+
+        debug(send)
+        httpRes = sdc_be_proxy.post_file(url, send)
+        if httpRes is not None:
+            debug("http response=", httpRes)
+        debug(sdc_be_proxy.con.buffer.getvalue())
+
+        return element_name, httpRes, sdc_be_proxy.con.buffer.getvalue()
+
+    except Exception as inst:
+        print("ERROR=" + str(inst))
+        return element_name, None, None
+
+
+def _create_send_body(file_dir, element_name):
+    yml_path = file_dir + element_name + "/" + element_name + ".yml"
+    path = file_dir + element_name + "/" + element_name + ".zip"
+
+    zf = zipfile.ZipFile(path, "w")
+    zf.write(yml_path, element_name + '.yml')
+    zf.close()
+
+    debug(path)
+    current_json_file = file_dir + element_name + "/" + element_name + ".json"
+
+    jsonFile = open(current_json_file)
+
+    debug("before load json")
+    json_data = json.load(jsonFile, strict=False)
+    debug(json_data)
+
+    jsonAsStr = json.dumps(json_data)
+
+    return [('resourceMetadata', jsonAsStr), ('resourceZip', (pycurl.FORM_FILE, path))]
+
+
+def _results_ok(results, response_codes):
+    for result in results:
+        if result[1] not in response_codes:
+            return False
+
+    return True
+
+
+def _get_response_code(update_version):
+    responseCodes = [200, 201]
+    if update_version is False:
+        responseCodes.append(409)
+
+    return responseCodes
+
+
+def _boolean_to_string(boolean_value):
+    return "true" if boolean_value else "false"
diff --git a/catalog-be/src/main/resources/scripts/sdcBePy/common/sdcBeProxy.py b/catalog-be/src/main/resources/scripts/sdcBePy/common/sdcBeProxy.py
new file mode 100755
index 0000000..4826170
--- /dev/null
+++ b/catalog-be/src/main/resources/scripts/sdcBePy/common/sdcBeProxy.py
@@ -0,0 +1,117 @@
+import json
+from io import BytesIO
+
+import pycurl
+
+from sdcBePy.common.helpers import check_arguments_not_none
+
+
+def get_url(ip, port, protocol):
+    return "%s://%s:%s" % (protocol, ip, port)
+
+
+class SdcBeProxy:
+
+    def __init__(self, be_ip, be_port, scheme, user_id="jh0003",
+                 debug=False, connector=None):
+        if not check_arguments_not_none(be_ip, be_port, scheme, user_id):
+            raise AttributeError("The be_host, be_port, scheme or admin_user are missing")
+        url = get_url(be_ip, be_port, scheme)
+        self.con = connector if connector \
+            else CurlConnector(url, user_id, scheme=scheme, debug=debug)
+
+    def check_backend(self):
+        return self.con.get('/sdc2/rest/v1/user/jh0003')
+
+    def check_user(self, user_name):
+        return self.con.get("/sdc2/rest/v1/user/" + user_name)
+
+    def create_user(self, first_name, last_name, user_id, email, role):
+        return self.con.post('/sdc2/rest/v1/user', json.dumps({
+            'firstName': first_name,
+            'lastName': last_name,
+            'userId': user_id,
+            'email': email,
+            'role': role
+        }))
+
+    def post_file(self, path, multi_part_form_data):
+        return self.con.post_file(path, multi_part_form_data)
+
+
+class CurlConnector:
+    CONTENT_TYPE_HEADER = "Content-Type: application/json"
+    ACCEPT_HEADER = "Accept: application/json; charset=UTF-8"
+
+    def __init__(self, url, user_id_header, buffer=None, scheme="http", debug=False):
+        self.c = pycurl.Curl()
+        self.c.setopt(pycurl.HEADER, True)
+
+        self.user_header = "USER_ID: " + user_id_header
+
+        if not debug:
+            # disable printing not necessary logs in the terminal
+            self.c.setopt(pycurl.WRITEFUNCTION, lambda x: None)
+        else:
+            self.c.setopt(pycurl.VERBOSE, 1)
+
+        if not buffer:
+            self.buffer = BytesIO()
+
+        self.url = url
+        self._check_schema(scheme)
+
+    def get(self, path):
+        try:
+            self.c.setopt(pycurl.URL, self.url + path)
+            self.c.setopt(pycurl.HTTPHEADER, [self.user_header,
+                                              CurlConnector.CONTENT_TYPE_HEADER,
+                                              CurlConnector.ACCEPT_HEADER])
+
+            self.c.perform()
+            return self.c.getinfo(pycurl.RESPONSE_CODE)
+        except pycurl.error:
+            return 111
+
+    def post(self, path, data):
+        try:
+            self.c.setopt(pycurl.URL, self.url + path)
+            self.c.setopt(pycurl.POST, 1)
+            self.c.setopt(pycurl.HTTPHEADER, [self.user_header,
+                                              CurlConnector.CONTENT_TYPE_HEADER,
+                                              CurlConnector.ACCEPT_HEADER])
+
+            self.c.setopt(pycurl.POSTFIELDS, data)
+
+            self.c.perform()
+            self.c.setopt(pycurl.POST, 0)
+
+            return self.c.getinfo(pycurl.RESPONSE_CODE)
+        except pycurl.error:
+            return 111
+
+    def post_file(self, path, post_body, buffer=None):
+        try:
+            self.c.setopt(pycurl.URL, self.url + path)
+            self.c.setopt(pycurl.POST, 1)
+            self.c.setopt(pycurl.HTTPHEADER, [self.user_header])
+
+            self.c.setopt(pycurl.HTTPPOST, post_body)
+
+            write = self.buffer.write if not buffer else buffer.write
+            self.c.setopt(pycurl.WRITEFUNCTION, write)
+
+            self.c.perform()
+            self.c.setopt(pycurl.POST, 0)
+
+            return self.c.getinfo(pycurl.RESPONSE_CODE)
+        except pycurl.error:
+            return 111
+
+    def _check_schema(self, scheme):
+        if scheme == 'https':
+            self.c.setopt(pycurl.SSL_VERIFYPEER, 0)
+            self.c.setopt(pycurl.SSL_VERIFYHOST, 0)
+
+    def __del__(self):
+        self.c.close()
diff --git a/catalog-be/src/main/resources/scripts/sdcBePy/tosca/__init__.py b/catalog-be/src/main/resources/scripts/sdcBePy/tosca/__init__.py
new file mode 100644
index 0000000..e69de29
--- /dev/null
+++ b/catalog-be/src/main/resources/scripts/sdcBePy/tosca/__init__.py
diff --git a/catalog-be/src/main/resources/scripts/sdcBePy/tosca/data/beConfig.json b/catalog-be/src/main/resources/scripts/sdcBePy/tosca/data/beConfig.json
new file mode 100644
index 0000000..f8c740b
--- /dev/null
+++ b/catalog-be/src/main/resources/scripts/sdcBePy/tosca/data/beConfig.json
@@ -0,0 +1,5 @@
+{
+  "beHost": "localhost",
+  "bePort": "8080",
+  "adminUser": "jh0003"
+}
\ No newline at end of file
diff --git a/catalog-be/src/main/resources/scripts/import/tosca/onapTypesToUpgrade.json b/catalog-be/src/main/resources/scripts/sdcBePy/tosca/data/onapTypesToUpgrade.json
similarity index 100%
rename from catalog-be/src/main/resources/scripts/import/tosca/onapTypesToUpgrade.json
rename to catalog-be/src/main/resources/scripts/sdcBePy/tosca/data/onapTypesToUpgrade.json
diff --git a/catalog-be/src/main/resources/scripts/import/tosca/typesToUpgrade.json b/catalog-be/src/main/resources/scripts/sdcBePy/tosca/data/typesToUpgrade.json
similarity index 97%
rename from catalog-be/src/main/resources/scripts/import/tosca/typesToUpgrade.json
rename to catalog-be/src/main/resources/scripts/sdcBePy/tosca/data/typesToUpgrade.json
index 4d59e02..5dd2001 100644
--- a/catalog-be/src/main/resources/scripts/import/tosca/typesToUpgrade.json
+++ b/catalog-be/src/main/resources/scripts/sdcBePy/tosca/data/typesToUpgrade.json
@@ -1,4 +1,4 @@
 {
     "heat": [],
     "normative": []
-}
+}
\ No newline at end of file
diff --git a/catalog-be/src/main/resources/scripts/sdcBePy/tosca/imports/__init__.py b/catalog-be/src/main/resources/scripts/sdcBePy/tosca/imports/__init__.py
new file mode 100644
index 0000000..e69de29
--- /dev/null
+++ b/catalog-be/src/main/resources/scripts/sdcBePy/tosca/imports/__init__.py
diff --git a/catalog-be/src/main/resources/scripts/sdcBePy/tosca/imports/run.py b/catalog-be/src/main/resources/scripts/sdcBePy/tosca/imports/run.py
new file mode 100644
index 0000000..4d4eeaf
--- /dev/null
+++ b/catalog-be/src/main/resources/scripts/sdcBePy/tosca/imports/run.py
@@ -0,0 +1,42 @@
+#!/usr/bin/env python3
+
+import os
+import sys
+
+import sdcBePy.common.logger as logger
+from sdcBePy.common.normative.main import process_element_list, process_type_list
+from sdcBePy.common.sdcBeProxy import SdcBeProxy
+from sdcBePy.tosca.main import get_args, usage
+from sdcBePy.tosca.models.normativeElementsList import get_normative_element_candidate_list, \
+    get_normative_element_with_metadata_list
+from sdcBePy.tosca.models.normativeTypesList import get_normative_type_candidate_list
+
+
+def main():
+    scheme, be_host, be_port, admin_user, update_version, debug = get_args()
+
+    if debug is False:
+        print('Disabling debug mode')
+        logger.debugFlag = debug
+
+    try:
+        sdc_be_proxy = SdcBeProxy(be_host, be_port, scheme, admin_user, debug)
+    except AttributeError:
+        usage()
+        sys.exit(3)
+
+    # use to run script form this dir (not like the command)
+    # base_file_location = os.getcwd() + "/../../../../import/tosca/"
+    base_file_location = os.getcwd() + os.path.sep
+    logger.debug("working directory =" + base_file_location)
+
+    process_element_list(get_normative_element_candidate_list(base_file_location), sdc_be_proxy)
+    process_type_list(get_normative_type_candidate_list(base_file_location), sdc_be_proxy, update_version)
+    process_element_list(get_normative_element_with_metadata_list(base_file_location), sdc_be_proxy)
+
+    logger.log("Script end ->", "All normatives imported successfully!")
+    logger.error_and_exit(0, None)
+
+
+if __name__ == "__main__":
+    main()
diff --git a/catalog-be/src/main/resources/scripts/sdcBePy/tosca/imports/runGenericNormative.py b/catalog-be/src/main/resources/scripts/sdcBePy/tosca/imports/runGenericNormative.py
new file mode 100644
index 0000000..424c0ca
--- /dev/null
+++ b/catalog-be/src/main/resources/scripts/sdcBePy/tosca/imports/runGenericNormative.py
@@ -0,0 +1,37 @@
+import os
+import sys
+from argparse import ArgumentParser
+
+from sdcBePy.common.normative.toscaTypes import process_and_create_normative_types
+from sdcBePy.tosca.main import usage, get_args
+from sdcBePy.tosca.models.normativeTypeCandidate import NormativeTypeCandidate
+
+
+def get_normative_prams():
+    parser = ArgumentParser()
+
+    path = os.path.dirname(__file__)
+    parser.add_argument('--location', default=path + os.path.sep)
+    parser.add_argument('--element', "-e", required=True)
+
+    args = parser.parse_args()
+
+    return args.location, [args.element]
+
+
+def main():
+    scheme, be_host, be_port, admin_user, _, debug = get_args()
+
+    candidate = NormativeTypeCandidate(*get_normative_prams())
+    try:
+        process_and_create_normative_types(candidate,
+                                           scheme, be_host, be_port, admin_user,
+                                           debug=debug,
+                                           exit_on_success=True)
+    except AttributeError:
+        usage()
+        sys.exit(3)
+
+
+if __name__ == '__main__':
+    main()
diff --git a/catalog-be/src/main/resources/scripts/sdcBePy/tosca/imports/runNormativeElement.py b/catalog-be/src/main/resources/scripts/sdcBePy/tosca/imports/runNormativeElement.py
new file mode 100644
index 0000000..1bdb150
--- /dev/null
+++ b/catalog-be/src/main/resources/scripts/sdcBePy/tosca/imports/runNormativeElement.py
@@ -0,0 +1,71 @@
+#!/usr/bin/env python3
+
+import sys
+
+from sdcBePy.common.normative.toscaElements import process_and_create_normative_element
+from sdcBePy.tosca.main import get_args, usage
+from sdcBePy.tosca.models.normativeElementsList import get_capability, get_data, get_relationship, \
+    get_interface_lifecycle, get_categories, get_group, get_policy, get_annotation
+
+
+def run(candidate):
+    scheme, be_host, be_port, admin_user, _, debug = get_args()
+    try:
+        process_and_create_normative_element(candidate,
+                                             scheme, be_host, be_port, admin_user,
+                                             debug=debug,
+                                             exit_on_success=True)
+    except AttributeError:
+        usage()
+        sys.exit(3)
+
+
+def run_import_data():
+    data_candidate = get_data()
+    run(data_candidate)
+
+
+def run_import_capabilities():
+    capability_candidate = get_capability()
+    run(capability_candidate)
+
+
+def run_import_relationship():
+    relationship_candidate = get_relationship()
+    run(relationship_candidate)
+
+
+def run_import_interface_lifecycle():
+    interface_lifecycle_candidate = get_interface_lifecycle()
+    run(interface_lifecycle_candidate)
+
+
+def run_import_categories():
+    categories_candidate = get_categories()
+    run(categories_candidate)
+
+
+def run_import_group():
+    group_candidate = get_group()
+    run(group_candidate)
+
+
+def run_import_policy():
+    policy_candidate = get_policy()
+    run(policy_candidate)
+
+
+def run_import_annotation():
+    annotation_candidate = get_annotation()
+    run(annotation_candidate)
+
+
+if __name__ == '__main__':
+    run_import_data()
+    # run_import_capabilities()
+    # run_import_relationship()
+    # run_import_interface_lifecycle()
+    # run_import_categories()
+    # run_import_group()
+    # run_import_policy()
+    # run_import_annotation()
diff --git a/catalog-be/src/main/resources/scripts/sdcBePy/tosca/imports/runNormativeType.py b/catalog-be/src/main/resources/scripts/sdcBePy/tosca/imports/runNormativeType.py
new file mode 100644
index 0000000..ee4e05b
--- /dev/null
+++ b/catalog-be/src/main/resources/scripts/sdcBePy/tosca/imports/runNormativeType.py
@@ -0,0 +1,56 @@
+#!/usr/bin/env python3
+
+import sys
+
+from sdcBePy.common.normative.toscaTypes import process_and_create_normative_types
+from sdcBePy.tosca.main import get_args, usage
+from sdcBePy.tosca.models.normativeTypesList import get_normative, get_heat, get_nfv, get_onap, get_sol
+
+
+def run(candidate, exit_on_success=True):
+    scheme, be_host, be_port, admin_user, update_version, debug = get_args()
+    try:
+        process_and_create_normative_types(candidate,
+                                           scheme,
+                                           be_host,
+                                           be_port,
+                                           admin_user,
+                                           update_version=update_version,
+                                           debug=debug,
+                                           exit_on_success=exit_on_success)
+    except AttributeError:
+        usage()
+        sys.exit(3)
+
+
+def run_import_normative():
+    normative_candidate = get_normative()
+    run(normative_candidate)
+
+
+def run_import_heat():
+    heat_candidate = get_heat()
+    run(heat_candidate)
+
+
+def run_import_nfv():
+    nfv_candidate = get_nfv()
+    run(nfv_candidate)
+
+
+def run_import_onap():
+    onap_candidate = get_onap()
+    run(onap_candidate)
+
+
+def run_import_sol():
+    sol_candidate = get_sol()
+    run(sol_candidate)
+
+
+if __name__ == '__main__':
+    run_import_normative()
+    # run_import_heat()
+    # run_import_nfv()
+    # run_import_onap()
+    # run_import_sol()
diff --git a/catalog-be/src/main/resources/scripts/sdcBePy/tosca/main.py b/catalog-be/src/main/resources/scripts/sdcBePy/tosca/main.py
new file mode 100644
index 0000000..2535ba6
--- /dev/null
+++ b/catalog-be/src/main/resources/scripts/sdcBePy/tosca/main.py
@@ -0,0 +1,56 @@
+import json
+import os
+import sys
+from argparse import ArgumentParser
+
+
+def usage():
+    print(sys.argv[0],
+          '[-s <scheme> | --scheme=<scheme> ] [-i <be host> | --ip=<be host>] [-p <be port> | '
+          '--port=<be port> ] [-u <user userId> | --user=<user userId> ] [-d <true|false> | '
+          '--debug=<true|false>] [-v <true|false> | --updateVersion=<true|false>]')
+
+
+def load_be_config(conf_path):
+    with open(conf_path, 'r') as f:
+        return json.load(f)
+
+
+def parse_param():
+    parser = ArgumentParser()
+
+    path = os.path.dirname(__file__)
+    parser.add_argument('--conf', default=os.path.join(path, 'data', 'beConfig.json'))
+
+    parser.add_argument('--ip', "-i")
+    parser.add_argument('--port', "-p")
+    parser.add_argument('--adminUser', "-a")
+    parser.add_argument('--https', action='store_true')
+    parser.add_argument('--updateVersion', action='store_false')
+    parser.add_argument('--debug', action='store_true')
+
+    args, _ = parser.parse_known_args()
+
+    return [args.conf, 'https' if args.https else 'http',
+            args.ip, args.port, args.adminUser, args.updateVersion,
+            args.debug]
+
+
+def get_args():
+    print('Number of arguments:', len(sys.argv), 'arguments.')
+
+    conf_path, scheme, be_host, be_port, admin_user, update_version, debug = parse_param()
+    defaults = load_be_config(conf_path)
+
+    # Use defaults if param not provided by the user
+    if be_host is None:
+        be_host = defaults["beHost"]
+    if be_port is None:
+        be_port = defaults["bePort"]
+    if admin_user is None:
+        admin_user = defaults["adminUser"]
+
+    print('scheme =', scheme, ',be host =', be_host, ', be port =', be_port, ', user =', admin_user,
+          ', debug =', debug, ', update_version =', update_version)
+
+    return scheme, be_host, be_port, admin_user, update_version, debug
diff --git a/catalog-be/src/main/resources/scripts/sdcBePy/tosca/models/__init__.py b/catalog-be/src/main/resources/scripts/sdcBePy/tosca/models/__init__.py
new file mode 100644
index 0000000..e69de29
--- /dev/null
+++ b/catalog-be/src/main/resources/scripts/sdcBePy/tosca/models/__init__.py
diff --git a/catalog-be/src/main/resources/scripts/sdcBePy/tosca/models/normativeElementCandidate.py b/catalog-be/src/main/resources/scripts/sdcBePy/tosca/models/normativeElementCandidate.py
new file mode 100644
index 0000000..96526ce
--- /dev/null
+++ b/catalog-be/src/main/resources/scripts/sdcBePy/tosca/models/normativeElementCandidate.py
@@ -0,0 +1,18 @@
+from sdcBePy.common.helpers import check_arguments_not_none
+
+
+class NormativeElementCandidate:
+
+    def __init__(self, file_dir, url_suffix,
+                 element_name, element_from_name, with_metadata=False):
+        if not check_arguments_not_none(file_dir, url_suffix, element_name, element_from_name):
+            raise AttributeError("The file_dir, url_suffix, element_name, element_from_name are missing")
+
+        self.file_dir = file_dir
+        self.url_suffix = url_suffix
+        self.element_name = element_name
+        self.element_form_name = element_from_name
+        self.with_metadata = with_metadata
+
+    def get_parameters(self):
+        return self.file_dir, self.url_suffix, self.element_name, self.element_form_name, self.with_metadata
diff --git a/catalog-be/src/main/resources/scripts/sdcBePy/tosca/models/normativeElementsList.py b/catalog-be/src/main/resources/scripts/sdcBePy/tosca/models/normativeElementsList.py
new file mode 100644
index 0000000..cfef95d
--- /dev/null
+++ b/catalog-be/src/main/resources/scripts/sdcBePy/tosca/models/normativeElementsList.py
@@ -0,0 +1,76 @@
+from sdcBePy.tosca.models.normativeElementCandidate import NormativeElementCandidate
+
+
+def get_normative_element_candidate_list(base_file_location):
+    return [
+        get_data(base_file_location),
+        get_capability(base_file_location),
+        get_relationship(base_file_location),
+        get_interface_lifecycle(base_file_location),
+        get_categories(base_file_location)
+    ]
+
+
+def get_normative_element_with_metadata_list(base_file_location):
+    return [
+        get_group(base_file_location),
+        get_policy(base_file_location)
+    ]
+
+
+def get_data(base_file_location="/"):
+    return NormativeElementCandidate(base_file_location + "data-types/",
+                                     "/sdc2/rest/v1/catalog/uploadType/datatypes",
+                                     "dataTypes",
+                                     "dataTypesZip")
+
+
+def get_capability(base_file_location="/"):
+    return NormativeElementCandidate(base_file_location + "capability-types/",
+                                     "/sdc2/rest/v1/catalog/uploadType/capability",
+                                     "capabilityTypes",
+                                     "capabilityTypeZip")
+
+
+def get_relationship(base_file_location="/"):
+    return NormativeElementCandidate(base_file_location + "relationship-types/",
+                                     "/sdc2/rest/v1/catalog/uploadType/relationship",
+                                     "relationshipTypes",
+                                     "relationshipTypeZip")
+
+
+def get_interface_lifecycle(base_file_location="../../../import/tosca/"):
+    return NormativeElementCandidate(base_file_location + "interface-lifecycle-types/",
+                                     "/sdc2/rest/v1/catalog/uploadType/interfaceLifecycle",
+                                     "interfaceLifecycleTypes",
+                                     "interfaceLifecycleTypeZip")
+
+
+def get_categories(base_file_location="/"):
+    return NormativeElementCandidate(base_file_location + "categories/",
+                                     "/sdc2/rest/v1/catalog/uploadType/categories",
+                                     "categoryTypes",
+                                     "categoriesZip")
+
+
+def get_group(base_file_location="/"):
+    return NormativeElementCandidate(base_file_location + "group-types/",
+                                     "/sdc2/rest/v1/catalog/uploadType/grouptypes",
+                                     "groupTypes",
+                                     "groupTypesZip",
+                                     with_metadata=True)
+
+
+def get_policy(base_file_location="/"):
+    return NormativeElementCandidate(base_file_location + "policy-types/",
+                                     "/sdc2/rest/v1/catalog/uploadType/policytypes",
+                                     "policyTypes",
+                                     "policyTypesZip",
+                                     with_metadata=True)
+
+
+def get_annotation(base_file_location="/"):
+    return NormativeElementCandidate(base_file_location + "annotation-types",
+                                     "/sdc2/rest/v1/catalog/uploadType/annotationtypes",
+                                     "annotationTypesZip",
+                                     "annotationTypes")
diff --git a/catalog-be/src/main/resources/scripts/sdcBePy/tosca/models/normativeToUpdateList.py b/catalog-be/src/main/resources/scripts/sdcBePy/tosca/models/normativeToUpdateList.py
new file mode 100644
index 0000000..a283018
--- /dev/null
+++ b/catalog-be/src/main/resources/scripts/sdcBePy/tosca/models/normativeToUpdateList.py
@@ -0,0 +1,60 @@
+import json
+
+from sdcBePy.tosca.models.normativeTypeCandidate import NormativeTypeCandidate
+
+
+class TypesToUpdate:
+
+    def __init__(self, files):
+        self.types_list = {}
+        self.load_files(files)
+
+    def load_files(self, files):
+        for file in files:
+            with open(file, 'r') as stream:
+                _types = json.load(stream)
+                for type_key, type_value in _types.items():
+                    self.types_list[type_key] = type_value
+
+    def get_type(self, key):
+        return self.types_list[key]
+
+
+def get_heat_and_normative_to_update_list(types, base_file_location):
+    return [
+        get_heat(types, base_file_location),
+        get_normative(types, base_file_location)
+    ]
+
+
+def get_nfv_onap_sol_to_update_list(types, base_file_location):
+    return [
+        get_nfv(types, base_file_location),
+        get_onap(types, base_file_location),
+        get_sol(types, base_file_location)
+    ]
+
+
+def get_heat(types, base_location="/"):
+    return NormativeTypeCandidate(base_location + "heat-types/",
+                                  types.get_type("heat"))
+
+
+def get_normative(types, base_location="/"):
+    return NormativeTypeCandidate(base_location + "normative-types/",
+                                  types.get_type("normative"))
+
+
+def get_nfv(types, base_location="/"):
+    return NormativeTypeCandidate(base_location + "nfv-types/",
+                                  types.get_type("nfv"))
+
+
+def get_onap(types, base_location="/"):
+    return NormativeTypeCandidate(base_location + "onap-types/",
+                                  types.get_type("onap"))
+
+
+def get_sol(types, base_location="/"):
+    return NormativeTypeCandidate(base_location + "sol-types/",
+                                  types.get_type("sol"))
diff --git a/catalog-be/src/main/resources/scripts/sdcBePy/tosca/models/normativeTypeCandidate.py b/catalog-be/src/main/resources/scripts/sdcBePy/tosca/models/normativeTypeCandidate.py
new file mode 100644
index 0000000..929ec4f
--- /dev/null
+++ b/catalog-be/src/main/resources/scripts/sdcBePy/tosca/models/normativeTypeCandidate.py
@@ -0,0 +1,14 @@
+from sdcBePy.common.helpers import check_arguments_not_none
+
+
+class NormativeTypeCandidate:
+
+    def __init__(self, file_dir, normative_types_list):
+        if not check_arguments_not_none(file_dir, normative_types_list):
+            raise AttributeError("The file_dir, normative_types_list are missing")
+
+        self.file_dir = file_dir
+        self.normative_types_list = normative_types_list
+
+    def get_parameters(self):
+        return self.file_dir, self.normative_types_list
diff --git a/catalog-be/src/main/resources/scripts/sdcBePy/tosca/models/normativeTypesList.py b/catalog-be/src/main/resources/scripts/sdcBePy/tosca/models/normativeTypesList.py
new file mode 100644
index 0000000..eea2543
--- /dev/null
+++ b/catalog-be/src/main/resources/scripts/sdcBePy/tosca/models/normativeTypesList.py
@@ -0,0 +1,161 @@
+from sdcBePy.tosca.models.normativeTypeCandidate import NormativeTypeCandidate
+
+
+def get_normative_type_candidate_list(base_file_location):
+    return [
+        get_normative(base_file_location),
+        get_heat(base_file_location),
+        get_nfv(base_file_location),
+        get_onap(base_file_location),
+        get_sol(base_file_location)
+    ]
+
+
+def get_normative(base_file_location="/"):
+    return NormativeTypeCandidate(base_file_location + "normative-types/",
+                                  ["root",
+                                   "compute",
+                                   "softwareComponent",
+                                   "webServer",
+                                   "webApplication",
+                                   "DBMS",
+                                   "database",
+                                   "objectStorage",
+                                   "blockStorage",
+                                   "containerRuntime",
+                                   "containerApplication",
+                                   "loadBalancer",
+                                   "port", "network"])
+
+
+def get_heat(base_file_location="/"):
+    return NormativeTypeCandidate(base_file_location + "heat-types/",
+                                  ["globalNetwork",
+                                   "globalPort",
+                                   "globalCompute",
+                                   "volume",
+                                   "cinderVolume",
+                                   "contrailVirtualNetwork",
+                                   "neutronNet",
+                                   "neutronPort",
+                                   "novaServer",
+                                   "extVl",
+                                   "internalVl",
+                                   "extCp",
+                                   "vl",
+                                   "eline",
+                                   "abstractSubstitute",
+                                   "Generic_VFC",
+                                   "Generic_VF",
+                                   "Generic_CR",
+                                   "Generic_PNF",
+                                   "Generic_Service",
+                                   "contrailNetworkRules",
+                                   "contrailPort",
+                                   "portMirroring",
+                                   "serviceProxy",
+                                   "contrailV2NetworkRules",
+                                   "contrailV2VirtualNetwork",
+                                   "securityRules",
+                                   "contrailAbstractSubstitute",
+                                   "contrailCompute",
+                                   "contrailV2VirtualMachineInterface",
+                                   "subInterface",
+                                   "contrailV2VLANSubInterface",
+                                   "multiFlavorVFC",
+                                   "vnfConfiguration",
+                                   "extCp2",
+                                   "extNeutronCP",
+                                   "extContrailCP",
+                                   "portMirroringByPolicy",
+                                   "forwardingPath",
+                                   "configuration",
+                                   "VRFObject",
+                                   "extVirtualMachineInterfaceCP",
+                                   "VLANNetworkReceptor",
+                                   "VRFEntry",
+                                   "subInterfaceV2",
+                                   "contrailV2VLANSubInterfaceV2",
+                                   "fabricConfiguration"])
+
+
+def get_nfv(base_file_location="/"):
+    return NormativeTypeCandidate(base_file_location + "nfv-types/",
+                                  ["underlayVpn",
+                                   "overlayTunnel",
+                                   "genericNeutronNet",
+                                   "allottedResource",
+                                   "extImageFile",
+                                   "extLocalStorage",
+                                   "extZteCP",
+                                   "extZteVDU",
+                                   "extZteVL",
+                                   "NSD",
+                                   "VDU",
+                                   "vduCompute",
+                                   "Cp",
+                                   "vduVirtualStorage",
+                                   "vduVirtualBlockStorage",
+                                   "vduVirtualFileStorage",
+                                   "vduVirtualObjectStorage",
+                                   "vduVirtualStorage",
+                                   "vnfVirtualLink",
+                                   "vnfExtCp",
+                                   "vduCp",
+                                   "VNF",
+                                   "PonUni",
+                                   "OltNni",
+                                   "OntNni"])
+
+
+def get_onap(base_file_location="/"):
+    return NormativeTypeCandidate(base_file_location + "onap-types/",
+                                  # Add desired type names to the list
+                                  [])
+
+
+def get_sol(base_file_location="/"):
+    return NormativeTypeCandidate(base_file_location + "onap-types/",
+                                  # Add desired type names to the list
+                                  [])
+
+
+def get_heat1707(base_file_location="/"):
+    return NormativeTypeCandidate(base_file_location + "heat-types/",
+                                  ["volume",
+                                   "cinderVolume",
+                                   "extVl",
+                                   "extCp",
+                                   "Generic_VFC",
+                                   "Generic_VF",
+                                   "Generic_PNF",
+                                   "Generic_Service",
+                                   "globalPort",
+                                   "globalNetwork",
+                                   "contrailV2VirtualMachineInterface",
+                                   "contrailV2VLANSubInterface",
+                                   "contrailPort",
+                                   "contrailV2VirtualNetwork",
+                                   "contrailVirtualNetwork",
+                                   "neutronNet",
+                                   "neutronPort",
+                                   "multiFlavorVFC",
+                                   "vnfConfiguration"])
+
+
+def get_heat1702_3537(base_file_location="/"):
+    return NormativeTypeCandidate(base_file_location + "heat-types/",
+                                  ["contrailPort",
+                                   "contrailV2VirtualMachineInterface",
+                                   "neutronPort",
+                                   "contrailCompute",
+                                   "novaServer",
+                                   "contrailV2VirtualNetwork",
+                                   "contrailVirtualNetwork",
+                                   "neutronNet"])
+
+
+def get_heat_version(base_file_location="/"):
+    return NormativeTypeCandidate(base_file_location + "heat_types/",
+                                  ["contrailV2VirtualMachineInterface",
+                                   "neutronPort"])
diff --git a/catalog-be/src/main/resources/scripts/sdcBePy/tosca/upgrade/__init__.py b/catalog-be/src/main/resources/scripts/sdcBePy/tosca/upgrade/__init__.py
new file mode 100644
index 0000000..e69de29
--- /dev/null
+++ b/catalog-be/src/main/resources/scripts/sdcBePy/tosca/upgrade/__init__.py
diff --git a/catalog-be/src/main/resources/scripts/sdcBePy/tosca/upgrade/run.py b/catalog-be/src/main/resources/scripts/sdcBePy/tosca/upgrade/run.py
new file mode 100644
index 0000000..6d90a1c
--- /dev/null
+++ b/catalog-be/src/main/resources/scripts/sdcBePy/tosca/upgrade/run.py
@@ -0,0 +1,59 @@
+#!/usr/bin/env python3
+
+import os
+import sys
+
+from sdcBePy.common import logger
+from sdcBePy.common.logger import error_and_exit
+from sdcBePy.common.normative.main import process_element_list, process_type_list
+from sdcBePy.common.sdcBeProxy import SdcBeProxy
+from sdcBePy.tosca.main import get_args, usage
+from sdcBePy.tosca.models.normativeElementsList import get_normative_element_candidate_list, \
+    get_normative_element_with_metadata_list
+from sdcBePy.tosca.models.normativeToUpdateList import TypesToUpdate, get_heat_and_normative_to_update_list, \
+    get_nfv_onap_sol_to_update_list
+
+
+def main():
+    scheme, be_host, be_port, admin_user, _, debug = get_args()
+
+    update_version = True
+    update_onap_version = False
+
+    if debug is False:
+        print('Disabling debug mode')
+        logger.debugFlag = debug
+
+    try:
+        sdc_be_proxy = SdcBeProxy(be_host, be_port, scheme, admin_user, debug=debug)
+    except AttributeError:
+        usage()
+        sys.exit(3)
+
+    # use to run script form this dir (not like the command)
+    # base_file_location = os.getcwd() + "/../../../../import/tosca/"
+    base_file_location = os.getcwd() + "/"
+    logger.debug("working directory =" + base_file_location)
+    process_element_list(get_normative_element_candidate_list(base_file_location), sdc_be_proxy)
+    process_element_list(get_normative_element_with_metadata_list(base_file_location), sdc_be_proxy)
+
+    all_types = get_all_types()
+
+    heat_and_normative_list = get_heat_and_normative_to_update_list(all_types, base_file_location)
+    process_type_list(heat_and_normative_list, sdc_be_proxy, update_version)
+
+    nfv_onap_sol_list = get_nfv_onap_sol_to_update_list(all_types, base_file_location)
+    process_type_list(nfv_onap_sol_list, sdc_be_proxy, update_onap_version)
+
+    logger.log("Updating end ->", "All normatives updated successfully!")
+    error_and_exit(0, None)
+
+
+def get_all_types():
+    path = os.path.dirname(__file__)
+    return TypesToUpdate([path + "/../data/typesToUpgrade.json",
+                          path + "/../data/onapTypesToUpgrade.json"])
+
+
+if __name__ == "__main__":
+    main()
diff --git a/catalog-be/src/main/resources/scripts/sdcBePy/tosca/upgrade/runUpgradeNormative.py b/catalog-be/src/main/resources/scripts/sdcBePy/tosca/upgrade/runUpgradeNormative.py
new file mode 100644
index 0000000..4b0d0cc
--- /dev/null
+++ b/catalog-be/src/main/resources/scripts/sdcBePy/tosca/upgrade/runUpgradeNormative.py
@@ -0,0 +1,59 @@
+#!/usr/bin/env python3
+
+from sdcBePy.tosca.imports.runNormativeType import run
+from sdcBePy.tosca.models.normativeToUpdateList import get_heat, get_normative, get_nfv, get_onap, get_sol
+from sdcBePy.tosca.models.normativeTypesList import get_heat1707, get_heat1702_3537, get_heat_version
+from sdcBePy.tosca.upgrade.run import get_all_types
+
+all_types = get_all_types()
+
+
+def run_upgrade_heat():
+    normative_candidate = get_heat(all_types)
+    run(normative_candidate)
+
+
+def run_upgrade_normative():
+    normative_candidate = get_normative(all_types)
+    run(normative_candidate)
+
+
+def run_upgrade_nfv():
+    normative_candidate = get_nfv(all_types)
+    run(normative_candidate)
+
+
+def run_upgrade_onap():
+    normative_candidate = get_onap(all_types)
+    run(normative_candidate)
+
+
+def run_upgrade_sol():
+    normative_candidate = get_sol(all_types)
+    run(normative_candidate)
+
+
+def run_upgrade_heat1707():
+    normative_candidate = get_heat1707()
+    run(normative_candidate)
+
+
+def run_upgrade_heat1707_3537():
+    normative_candidate = get_heat1702_3537()
+    run(normative_candidate)
+
+
+def run_upgrade_heat_version():
+    normative_candidate = get_heat_version()
+    run(normative_candidate)
+
+
+if __name__ == '__main__':
+    run_upgrade_heat()
+    # run_upgrade_normative()
+    # run_upgrade_nfv()
+    # run_upgrade_onap()
+    # run_upgrade_sol()
+    # run_upgrade_heat1707()
+    # run_upgrade_heat1707_3537()
+    # run_upgrade_heat_version()
diff --git a/catalog-be/src/main/resources/scripts/sdcBePy/users/__init__.py b/catalog-be/src/main/resources/scripts/sdcBePy/users/__init__.py
new file mode 100755
index 0000000..e69de29
--- /dev/null
+++ b/catalog-be/src/main/resources/scripts/sdcBePy/users/__init__.py
diff --git a/catalog-be/src/main/resources/scripts/sdcBePy/users/data/users.json b/catalog-be/src/main/resources/scripts/sdcBePy/users/data/users.json
new file mode 100755
index 0000000..9ce2be4
--- /dev/null
+++ b/catalog-be/src/main/resources/scripts/sdcBePy/users/data/users.json
@@ -0,0 +1,44 @@
+[
+  {
+    "userId": "demo",
+    "firstName": "demo",
+    "lastName": "demo",
+    "role": "ADMIN",
+    "email": "demo@openecomp.org"
+  },
+  {
+    "userId": "op0001",
+    "firstName": "Oper",
+    "lastName": "P",
+    "role": "OPS",
+    "email": "op0001@openecomp.org"
+  },
+  {
+    "userId": "gv0001",
+    "firstName": "Giuseppe",
+    "lastName": "Verdi",
+    "role": "GOVERNOR",
+    "email": "gv0001@openecomp.org"
+  },
+  {
+    "userId": "jh0003",
+    "firstName": "Jimmy",
+    "lastName": "Hendrix",
+    "role": "Admin",
+    "email": "jh0003@openecomp.org"
+  },
+  {
+    "userId": "jm0007",
+    "firstName": "Joni",
+    "lastName": "Mitchell",
+    "role": "TESTER",
+    "email": "jm0007@openecomp.org"
+  },
+  {
+    "userId": "cs0008",
+    "firstName": "Carlos",
+    "lastName": "Santana",
+    "role": "DESIGNER",
+    "email": "cs0008r@openecomp.org"
+  }
+]
\ No newline at end of file
diff --git a/catalog-be/src/main/resources/scripts/sdcBePy/users/run.py b/catalog-be/src/main/resources/scripts/sdcBePy/users/run.py
new file mode 100755
index 0000000..b933afe
--- /dev/null
+++ b/catalog-be/src/main/resources/scripts/sdcBePy/users/run.py
@@ -0,0 +1,64 @@
+#!/usr/bin/env python3
+
+import json
+import os
+import time
+from argparse import ArgumentParser
+
+from sdcBePy.common.bColors import BColors
+from sdcBePy.common.healthCheck import check_backend, RETRY_ATTEMPTS
+from sdcBePy.common.sdcBeProxy import SdcBeProxy
+
+colors = BColors()
+
+
+def load_users(conf_path):
+    with open(conf_path, 'r') as f:
+        return json.load(f)
+
+
+def be_user_init(be_ip, be_port, protocol, conf_path):
+    sdc_be_proxy = SdcBeProxy(be_ip, be_port, protocol)
+    if check_backend(sdc_be_proxy, RETRY_ATTEMPTS):
+        users = load_users(conf_path)
+        for user in users:
+            if sdc_be_proxy.check_user(user['userId']) != 200:
+                result = sdc_be_proxy.create_user(user['firstName'],
+                                                  user['lastName'],
+                                                  user['userId'],
+                                                  user['email'],
+                                                  user['role'])
+                if result == 201:
+                    print('[INFO]: ' + user['userId'] +
+                          ' created, result: [' + str(result) + ']')
+                else:
+                    print('[ERROR]: ' + colors.FAIL + user['userId'] + colors.END_C +
+                          ' error creating , result: [' + str(result) + ']')
+            else:
+                print('[INFO]: ' + user['userId'] + ' already exists')
+    else:
+        print('[ERROR]: ' + time.strftime('%Y/%m/%d %H:%M:%S') + colors.FAIL
+              + 'Backend is DOWN :-(' + colors.END_C)
+        raise Exception("Cannot communicate with the backend!")
+
+
+def get_args():
+    parser = ArgumentParser()
+
+    parser.add_argument('-i', '--ip', required=True)
+    parser.add_argument('-p', '--port', required=True)
+    parser.add_argument('--https', action='store_true')
+    path = os.path.dirname(__file__)
+    parser.add_argument('--conf', default=os.path.join(path, 'data', 'users.json'))
+
+    args = parser.parse_args()
+
+    return [args.ip, args.port, 'https' if args.https else 'http', args.conf]
+
+
+def main():
+    be_user_init(*get_args())
+
+
+if __name__ == "__main__":
+    main()
diff --git a/catalog-be/src/main/resources/scripts/setup.py b/catalog-be/src/main/resources/scripts/setup.py
new file mode 100644
index 0000000..9df26a7
--- /dev/null
+++ b/catalog-be/src/main/resources/scripts/setup.py
@@ -0,0 +1,43 @@
+from setuptools import setup, find_packages
+
+setup(
+    name='sdcBePy',
+    version='1.7',
+    packages=find_packages(),
+    url='',
+    license='',
+    author='',
+    author_email='',
+    description='',
+    package_data={'': ['data/*.json']},
+    include_package_data=True,
+    entry_points={
+        "console_scripts": [
+            "sdcuserinit=sdcBePy.users.run:main",
+            "sdcimportall=sdcBePy.tosca.imports.run:main",
+            "sdcimportdata=sdcBePy.tosca.imports.runNormativeElement:run_import_data",
+            "sdcimportcapabilities=sdcBePy.tosca.imports.runNormativeElement:run_import_capabilities",
+            "sdcimportrelationship=sdcBePy.tosca.imports.runNormativeElement:run_import_relationship",
+            "sdcimportinterfacelifecycle=sdcBePy.tosca.imports.runNormativeElement:run_import_interface_lifecycle",
+            "sdcimportcategories=sdcBePy.tosca.imports.runNormativeElement:run_import_categories",
+            "sdcimportgroup=sdcBePy.tosca.imports.runNormativeElement:run_import_group",
+            "sdcimportpolicy=sdcBePy.tosca.imports.runNormativeElement:run_import_policy",
+            "sdcimportnormative=sdcBePy.tosca.imports.runNormativeType:run_import_normative",
+            "sdcimportheat=sdcBePy.tosca.imports.runNormativeType:run_import_heat",
+            "sdcimportnfv=sdcBePy.tosca.imports.runNormativeType:run_import_nfv",
+            "sdcimportonap=sdcBePy.tosca.imports.runNormativeType:run_import_onap",
+            "sdcimportsol=sdcBePy.tosca.imports.runNormativeType:run_import_sol",
+            "sdcimportannotation=sdcBePy.tosca.imports.runNormativeType:run_import_annotation",
+            "sdcimportgeneric=sdcBePy.tosca.imports.runGenericNormative:main",
+            "sdcupgradeall=sdcBePy.tosca.upgrade.run:main",
+            "sdcupgradenfv=sdcBePy.tosca.upgrade.runUpgradeNormative:run_upgrade_nfv",
+            "sdcupgradeonap=sdcBePy.tosca.upgrade.runUpgradeNormative:run_upgrade_onap",
+            "sdcupgradesol=sdcBePy.tosca.upgrade.runUpgradeNormative:run_upgrade_sol",
+            "sdcupgradeheat1707=sdcBePy.tosca.upgrade.runUpgradeNormative:run_upgrade_heat1707",
+            "sdcupgradeheat1707_3537=sdcBePy.tosca.upgrade.runUpgradeNormative:run_upgrade_heat1707_3537",
+            "sdcupgradeheatversion=sdcBePy.tosca.upgrade.runUpgradeNormative:run_upgrade_heat_version",
+            "sdccheckbackend=sdcBePy.common.healthCheck:main",
+            "sdcconsumerinit=sdcBePy.consumers.run:main"
+        ]
+    }, install_requires=['pycurl']
+)
diff --git a/sdc-os-chef/scripts/docker_run.sh b/sdc-os-chef/scripts/docker_run.sh
index e641594..7880578 100755
--- a/sdc-os-chef/scripts/docker_run.sh
+++ b/sdc-os-chef/scripts/docker_run.sh
@@ -23,6 +23,8 @@
 ONBOARD_DEBUG_PORT="--publish 4001:4001"
 CS_PORT=${CS_PORT:-9042}
 
+OS_USER="onap"
+
 
 # Java Options:
 BE_JAVA_OPTIONS="-Xdebug -agentlib:jdwp=transport=dt_socket,address=4000,server=y,suspend=n -Xmx1536m -Xms1536m"
@@ -332,7 +334,7 @@
     if [ ${LOCAL} = false ]; then
         docker pull ${PREFIX}/sdc-backend-init:${RELEASE}
     fi
-    docker run --name ${DOCKER_NAME} --env HOST_IP=${IP} --env ENVNAME="${DEP_ENV}" --log-driver=json-file --log-opt max-size=100m --log-opt max-file=10 --ulimit memlock=-1:-1 --ulimit nofile=4096:100000 ${LOCAL_TIME_MOUNT_CMD} --volume ${WORKSPACE}/data/logs/BE/:${JETTY_BASE}/logs  --volume ${WORKSPACE}/data/environments:/home/sdc/chef-solo/environments ${PREFIX}/sdc-backend-init:${RELEASE} > /dev/null 2>&1
+    docker run --name ${DOCKER_NAME} --env HOST_IP=${IP} --env ENVNAME="${DEP_ENV}" --log-driver=json-file --log-opt max-size=100m --log-opt max-file=10 --ulimit memlock=-1:-1 --ulimit nofile=4096:100000 ${LOCAL_TIME_MOUNT_CMD} --volume ${WORKSPACE}/data/logs/BE/:${JETTY_BASE}/logs  --volume ${WORKSPACE}/data/environments:/home/${OS_USER}/chef-solo/environments ${PREFIX}/sdc-backend-init:${RELEASE} > /dev/null 2>&1
     rc=$?
     docker_logs ${DOCKER_NAME}
     if [[ ${rc} != 0 ]]; then exit ${rc}; fi
