diff --git a/openecomp-be/tools/build/scripts/cassandra-commands.json b/openecomp-be/tools/build/scripts/cassandra-commands.json
index 2935aca..34916fe 100644
--- a/openecomp-be/tools/build/scripts/cassandra-commands.json
+++ b/openecomp-be/tools/build/scripts/cassandra-commands.json
@@ -5,22 +5,7 @@
     "version_info": "CREATE TABLE IF NOT EXISTS version_info (entity_type text, entity_id text, active_version frozen<version>, status text, candidate frozen<user_candidate_version>, viewable_versions set<frozen<version>>, latest_final_version frozen<version>, PRIMARY KEY (entity_type, entity_id))",
     "version_info_deleted": "CREATE TABLE IF NOT EXISTS version_info_deleted (entity_type text, entity_id text, active_version frozen<version>, status text, candidate frozen<user_candidate_version>, viewable_versions set<frozen<version>>, latest_final_version frozen<version>, PRIMARY KEY (entity_type, entity_id))",
     "unique_value" : "CREATE TABLE IF NOT EXISTS unique_value (type text, value text, PRIMARY KEY ((type, value)))",
-    "choice_or_other": "CREATE TYPE IF NOT EXISTS choice_or_other (result text)",
-    "multi_choice_or_other": "CREATE TYPE IF NOT EXISTS multi_choice_or_other (results set<text>)",
-    "vendor_license_model": "CREATE TABLE IF NOT EXISTS vendor_license_model (vlm_id text, version frozen<version>, vendor_name text, description text, icon text, PRIMARY KEY ((vlm_id, version)))",
-    "license_agreement": "CREATE TABLE IF NOT EXISTS license_agreement (vlm_id text, version frozen<version>, la_id text, name text, description text, lic_term frozen<choice_or_other>, req_const text, fg_ids set<text>, PRIMARY KEY ((vlm_id, version), la_id))",
-    "feature_group": "CREATE TABLE IF NOT EXISTS feature_group (vlm_id text, version frozen<version>, fg_id text, name text, description text, part_num text, ep_ids set<text>, lkg_ids set<text>, ref_la_ids set<text>, PRIMARY KEY ((vlm_id, version), fg_id))",
-    "license_key_group": "CREATE TABLE IF NOT EXISTS license_key_group (vlm_id text, version frozen<version>, lkg_id text,name text,description text, type text, operational_scope frozen<multi_choice_or_other>, ref_fg_ids set<text>, version_uuid text, PRIMARY KEY ((vlm_id, version), lkg_id))",
-    "entitlement_pool": "CREATE TABLE IF NOT EXISTS entitlement_pool (vlm_id text, version frozen<version>, ep_id text,name text,description text,threshold float,threshold_unit text,entitlement_metric frozen<choice_or_other>,increments text,aggregation_func frozen<choice_or_other>, operational_scope frozen<multi_choice_or_other>, time frozen<choice_or_other>,manufacturer_ref_num text,ref_fg_ids set<text>, version_uuid text, PRIMARY KEY ((vlm_id, version), ep_id))",
-    "vsp_information": "CREATE TABLE IF NOT EXISTS vsp_information (VSP_ID text, version frozen<version>, NAME text,DESCRIPTION text,CATEGORY text,SUB_CATEGORY text,ICON text,PACKAGE_NAME text,PACKAGE_VERSION text,vendor_name text, vendor_id text,LICENSE_AGREEMENT text,FEATURE_GROUPS list<text>,VALIDATION_DATA text,CONTENT_DATA blob, questionnaire_data text, vlm_version frozen<version>, is_old_version text, onboarding_method text, PRIMARY KEY ((VSP_ID, version)))",
-    "package_details": "CREATE TABLE IF NOT EXISTS package_details (VSP_ID text, version frozen<version>,DISPLAY_NAME text,vsp_name text,vsp_description text,VENDOR_NAME text,CATEGORY text,SUB_CATEGORY text,VENDOR_RELEASE text,PACKAGE_CHECKSUM text,PACKAGE_TYPE text,TRANSLATE_CONTENT blob,PRIMARY KEY ((VSP_ID, version)))",
-    "vsp_network": "CREATE TABLE IF NOT EXISTS vsp_network (vsp_id text, version frozen<version>, network_id text, composition_data text, questionnaire_data text, PRIMARY KEY ((vsp_id, version), network_id))",
-    "vsp_component": "CREATE TABLE IF NOT EXISTS vsp_component (vsp_id text, version frozen<version>, component_id text, composition_data text, questionnaire_data text, PRIMARY KEY ((vsp_id, version), component_id))",
-    "vsp_component_nic": "CREATE TABLE IF NOT EXISTS vsp_component_nic (vsp_id text, version frozen<version>, component_id text, nic_id text, composition_data text, questionnaire_data text, PRIMARY KEY ((vsp_id, version), component_id, nic_id))",
-    "vsp_component_image": "CREATE TABLE IF NOT EXISTS vsp_component_image (vsp_id text, version frozen<version>, component_id text, image_id text, composition_data text, questionnaire_data text, PRIMARY KEY ((vsp_id, version), component_id, image_id))",
-    "vsp_process" : "CREATE TABLE IF NOT EXISTS vsp_process (vsp_id text, version frozen<version>, component_id text, process_id text, name text, description text, type text, artifact_name text, artifact blob, PRIMARY KEY ((vsp_id, version), component_id, process_id))",
-    "vsp_service_artifact" : "CREATE TABLE IF NOT EXISTS vsp_service_artifact (vsp_id text, version frozen<version>, name text, content_data blob, PRIMARY KEY ((vsp_id, version), name))",
-    "vsp_service_template" : "CREATE TABLE IF NOT EXISTS vsp_service_template (vsp_id text, version frozen<version>, base_name text static, name text, content_data blob, PRIMARY KEY ((vsp_id, version), name))",
+    "package_details": "CREATE TABLE IF NOT EXISTS package_details (VSP_ID text, version text,DISPLAY_NAME text,vsp_name text,vsp_description text,VENDOR_NAME text,CATEGORY text,SUB_CATEGORY text,VENDOR_RELEASE text,PACKAGE_CHECKSUM text,PACKAGE_TYPE text,TRANSLATE_CONTENT blob,PRIMARY KEY ((VSP_ID, version)))",
     "vsp_enriched_service_template" : "CREATE TABLE IF NOT EXISTS vsp_enriched_service_template (vsp_id text, version frozen<version>, base_name text static, name text, content_data blob, PRIMARY KEY ((vsp_id, version), name))",
     "vsp_enriched_service_artifact" : "CREATE TABLE IF NOT EXISTS vsp_enriched_service_artifact (vsp_id text, version frozen<version>, name text, content_data blob, PRIMARY KEY ((vsp_id, version), name))",
     "application_config" : "CREATE TABLE IF NOT EXISTS application_config (namespace text, key text, value text, PRIMARY KEY (namespace, key))",
@@ -31,37 +16,22 @@
     "vendor_list_index" : "CREATE INDEX IF NOT EXISTS action_vendor_list ON dox.Action (vendor_list)",
     "actionUUID_index" : "CREATE INDEX IF NOT EXISTS action_actionUUID ON dox.Action (actionUUID)",
     "ecomp_component": "CREATE TABLE IF NOT EXISTS dox.ecompcomponent(id text PRIMARY KEY, name text)",
-    "vsp_component_artifact": "CREATE TABLE IF NOT EXISTS vsp_component_artifact (vsp_id text, version frozen<version>, component_id text, artifact_type text, artifact_id text, name text, description text, artifact blob,  PRIMARY KEY ((vsp_id, version), component_id, artifact_type, artifact_id))",
     "name_index": "CREATE INDEX IF NOT EXISTS action_name ON dox.Action (name)",
     "action_artifact":"CREATE TABLE IF NOT EXISTS action_artifact(artifactuuid text, effective_version int, artifact blob, PRIMARY KEY(artifactuuid, effective_version)) WITH CLUSTERING ORDER BY (effective_version DESC)",
-    "vsp_orchestration_template_candidate" : "CREATE TABLE IF NOT EXISTS vsp_orchestration_template_candidate (vsp_id text, version frozen<version>, files_data_structure text, content_data blob, PRIMARY KEY ((vsp_id, version)))",
-    "vsp_deployment_flavor" : "CREATE TABLE IF NOT EXISTS vsp_deployment_flavor (vsp_id text, version frozen<version>, deployment_flavor_id text, composition_data text, questionnaire_data text, PRIMARY KEY ((vsp_id, version), deployment_flavor_id))",
-    "vsp_component_compute": "CREATE TABLE IF NOT EXISTS vsp_component_compute (vsp_id text, version frozen<version>, component_id text, compute_id text, composition_data text, questionnaire_data text, PRIMARY KEY ((vsp_id, version), component_id, compute_id))",
-    "vsp_component_dependency_model" : "CREATE TABLE IF NOT EXISTS vsp_component_dependency_model (vsp_id text, version frozen<version>, dependency_id text, sourcecomponent_id text, targetcomponent_id text, relation text, PRIMARY KEY ((vsp_id, version), dependency_id))",
     "activity_log" : "CREATE TABLE IF NOT EXISTS activity_log (item_id text, version_id text, activity_id text, type text, user text, timestamp timestamp, success boolean, message text, comment text, PRIMARY KEY (item_id, version_id, activity_id))",
-    "migration": "CREATE TABLE IF NOT EXISTS migration (id text, ismigrated boolean, primary key(id))"
+    "healing" : "CREATE TABLE IF NOT EXISTS healing (space text,item_id text,version_id text, healing_needed boolean,old_version text, PRIMARY KEY((space,item_id),version_id))",
+    "migration": "CREATE TABLE IF NOT EXISTS migration (id text, ismigrated boolean, primary key (id))",
+    "item_permissions" : "CREATE TABLE IF NOT EXISTS item_permissions (item_id text,user_id text, permission text, PRIMARY KEY(item_id,user_id)) WITH CLUSTERING ORDER BY (user_id DESC)",
+    "notification_subscribers": "CREATE TABLE IF NOT EXISTS NOTIFICATION_SUBSCRIBERS (entity_id text PRIMARY KEY, subscribers set<text>)",
+    "last_notification": "CREATE TABLE IF NOT EXISTS last_notification (owner_id text PRIMARY KEY, event_id timeuuid)",
+    "notifications": "CREATE TABLE IF NOT EXISTS notifications (owner_id text, event_id timeuuid, read boolean, originator_id text, event_type text, event_attributes text, PRIMARY KEY (owner_id, event_id)) WITH CLUSTERING ORDER BY (event_id DESC)",
+    "vsp_merge_hint": "CREATE TABLE IF NOT EXISTS vsp_merge_hint (space text, item_id text, version_id text, model_id text, model_resolution text, PRIMARY KEY ((space, item_id, version_id)))"
   },
   "drop": {
-    "version_info": "DROP TABLE IF EXISTS version_info",
     "version_info_deleted": "DROP TABLE IF EXISTS version_info_deleted",
     "unique_value": "DROP TABLE IF EXISTS unique_value",
-    "entitlement_pool": "DROP TABLE IF EXISTS entitlement_pool",
-    "vendor_license_model": "DROP TABLE IF EXISTS vendor_license_model",
-    "license_agreement": "DROP TABLE IF EXISTS license_agreement",
-    "feature_group": "DROP TABLE IF EXISTS feature_group",
-    "license_key_group": "DROP TABLE IF EXISTS license_key_group",
-    "vsp_information": "DROP   TABLE IF EXISTS vsp_information",
     "package_details": "DROP TABLE IF EXISTS package_details",
-    "vsp_network": "DROP TABLE IF EXISTS vsp_network",
-    "vsp_component_image": "DROP TABLE IF EXISTS vsp_component_image",
-    "vsp_component": "DROP TABLE IF EXISTS vsp_component",
-    "vsp_component_nic": "DROP TABLE IF EXISTS vsp_component_nic",
-    "vsp_process":"DROP TABLE IF EXISTS vsp_process",
-    "choice_or_other": "DROP TYPE IF EXISTS choice_or_other",
-    "multi_choice_or_other": "DROP TYPE IF EXISTS multi_choice_or_other",
     "application_config" : "DROP TABLE IF EXISTS application_config",
-    "vsp_service_artifact" :"DROP TABLE IF EXISTS vsp_service_artifact",
-    "vsp_service_template" :"DROP TABLE IF EXISTS vsp_service_template",
     "vsp_enriched_service_artifact" :"DROP TABLE IF EXISTS vsp_enriched_service_artifact",
     "vsp_enriched_service_template" :"DROP TABLE IF EXISTS vsp_enriched_service_template",
     "action" : "DROP TABLE IF EXISTS action",
@@ -72,22 +42,16 @@
     "actionUUID_index" : "DROP INDEX IF EXISTS dox.action_actionUUID",
     "name_index" : "DROP INDEX IF EXISTS dox.action_name",
     "ecomp_component": "DROP TABLE IF EXISTS dox.ecompcomponent",
-    "vsp_component_artifact": "DROP TABLE IF EXISTS dox.vsp_component_artifact",
     "action_artifact":"DROP TABLE IF EXISTS action_artifact",
-    "vsp_orchestration_template_candidate":"DROP TABLE IF EXISTS vsp_orchestration_template_candidate",
-    "vsp_deployment_flavor":"DROP TABLE IF EXISTS vsp_deployment_flavor",
-    "vsp_component_dependency_model":"DROP TABLE IF EXISTS vsp_component_dependency_model",
     "activity_log": "DROP TABLE IF EXISTS activity_log",
-    "migration": "DROP TABLE IF EXISTS migration"
+    "migration": "DROP TABLE IF EXISTS migration",
+    "item_permissions": "DROP TABLE IF EXISTS item_permissions",
+    "notification_subscribers": "DROP TABLE IF EXISTS notification_subscribers",
+    "last_notification": "DROP TABLE IF EXISTS last_notification",
+    "notifications": "DROP TABLE IF EXISTS notifications",
+    "vsp_merge_hint": "DROP TABLE IF EXISTS vsp_merge_hint"
   },
   "alter": {
-    "vsp_information": "ALTER TABLE vsp_information ADD questionnaire_data text",
-    "vsp_information_1": "ALTER TABLE vsp_information ADD vlm_version frozen<version>",
-    "vsp_information_2": "ALTER TABLE vsp_information ADD onboarding_method text",
-    "vsp_process": "ALTER TABLE vsp_process ADD type text",
-    "entitlement_pool": "alter table entitlement_pool ADD version_uuid text",
-    "license_key_group": "alter table license_key_group ADD version_uuid text",
-    "application_config": "delete from application_config where namespace='vsp.monitoring' and key = 'component.ceilometer'"
   },
   "actions": {
     "truncate_configuration": "truncate configuration"
diff --git a/openecomp-be/tools/build/scripts/zusammen-cassandra-commands.json b/openecomp-be/tools/build/scripts/zusammen-cassandra-commands.json
index 1395fec..5ddb1d7 100644
--- a/openecomp-be/tools/build/scripts/zusammen-cassandra-commands.json
+++ b/openecomp-be/tools/build/scripts/zusammen-cassandra-commands.json
@@ -1,19 +1,26 @@
 {
   "create": {
     "item": "CREATE TABLE IF NOT EXISTS item (item_id text primary key, item_info text, creation_time timestamp, modification_time timestamp)",
-    "version": "CREATE TABLE IF NOT EXISTS version (space text, item_id text, version_id text,base_version_id text,info text,relations text,creation_time timestamp,modification_time timestamp,PRIMARY KEY (( space, item_id ), version_id))",
-    "version_elements": "CREATE TABLE IF NOT EXISTS version_elements (space text,item_id text,version_id text,element_ids set<text>,PRIMARY KEY (( space, item_id, version_id )))",
-    "element_namespace": "CREATE TABLE IF NOT EXISTS element_namespace (space text, item_id text, element_id text, namespace text, PRIMARY KEY ((space, item_id, element_id)))",
-    "element": "CREATE TABLE IF NOT EXISTS element (space text,item_id text,version_id text,element_id text,parent_id text,namespace text,info text,relations text,data blob,searchable_data blob,visualization blob,sub_element_ids set<text>,PRIMARY KEY (( space, item_id, version_id, element_id )))"
+    "version": "CREATE TABLE IF NOT EXISTS version (space text, item_id text, version_id text,base_version_id text,info text,relations text,creation_time timestamp,modification_time timestamp ,PRIMARY KEY (( space, item_id ), version_id))",
+    "version_elements": "CREATE TABLE IF NOT EXISTS version_elements (space text,item_id text,version_id text,revision_id text,element_ids Map<text,text>, dirty_element_ids set<text>,stage_element_ids set<text>, conflict_element_ids set<text>, publish_time timestamp,user text,message text, PRIMARY KEY (( space, item_id, version_id ),revision_id))",
+    "element_namespace": "CREATE TABLE IF NOT EXISTS element_namespace (item_id text, element_id text, namespace text, PRIMARY KEY ((item_id, element_id)))",
+    "element": "CREATE TABLE IF NOT EXISTS element (space text,item_id text,version_id text,element_id text,revision_id text,parent_id text,namespace text,info text,relations text,data blob,searchable_data blob,visualization blob,sub_element_ids set<text> ,element_hash text,PRIMARY KEY (( space, item_id, version_id, element_id ),revision_id))",
+    "element_synchronization_state": "CREATE TABLE IF NOT EXISTS element_synchronization_state (space text, item_id text, version_id text, element_id text,revision_id text, publish_time timestamp, dirty boolean, PRIMARY KEY (( space, item_id, version_id ), element_id,revision_id))",
+    "element_stage": "CREATE TABLE IF NOT EXISTS element_stage (space text, item_id text,version_id text, element_id text, parent_id text, namespace text, info text, relations text,data blob, searchable_data blob, visualization blob, sub_element_ids set<text>,element_hash text, publish_time timestamp, action text, conflicted boolean,conflict_dependent_ids set<text>, PRIMARY KEY (( space, item_id, version_id, element_id )))",
+    "version_stage": "CREATE TABLE IF NOT EXISTS version_stage (space text, item_id text, version_id text, base_version_id text, creation_time timestamp,modification_time timestamp, publish_time timestamp, action text, PRIMARY KEY (( space, item_id ), version_id))"
   },
   "drop": {
     "item": "DROP TABLE IF EXISTS item",
     "version": "DROP TABLE IF EXISTS version",
     "version_elements": "DROP TABLE IF EXISTS version_elements",
     "element_namespace": "DROP TABLE IF EXISTS element_namespace",
-    "element": "DROP TABLE IF EXISTS element"
+    "element": "DROP TABLE IF EXISTS element",
+    "element_synchronization_state": "DROP TABLE IF EXISTS element_synchronization_state",
+    "element_stage": "DROP TABLE IF EXISTS element_stage",
+    "version_stage": "DROP TABLE IF EXISTS version_stage"
   },
   "alter": {
+
   },
   "actions": {
   }
diff --git a/openecomp-be/tools/install/database/schemaTemplates/questionnaire/vsp.ftl b/openecomp-be/tools/install/database/schemaTemplates/questionnaire/vsp.ftl
index 96f77b7..0f9be1c 100644
--- a/openecomp-be/tools/install/database/schemaTemplates/questionnaire/vsp.ftl
+++ b/openecomp-be/tools/install/database/schemaTemplates/questionnaire/vsp.ftl
@@ -63,6 +63,7 @@
             },
             "storageReplicationSize": {
               "type": "number",
+			  "minimum": 0,
               "maximum": 100,
               "exclusiveMaximum": true
             },
diff --git a/openecomp-be/tools/migration/1702_to_1707_zusammen/pom.xml b/openecomp-be/tools/migration/1702_to_1707_zusammen/pom.xml
deleted file mode 100644
index c2dbc94..0000000
--- a/openecomp-be/tools/migration/1702_to_1707_zusammen/pom.xml
+++ /dev/null
@@ -1,241 +0,0 @@
-<project xmlns="http://maven.apache.org/POM/4.0.0"
-         xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
-         xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
-    <modelVersion>4.0.0</modelVersion>
-
-    <properties>
-
-        <groovy.version>2.4.7</groovy.version>
-        <janino.version>2.7.7</janino.version>
-
-    </properties>
-
-
-
-    <name>openecomp-zusammen-migration</name>
-    <dependencies>
-        <dependency>
-            <groupId>org.openecomp.sdc</groupId>
-            <artifactId>openecomp-sdc-vendor-software-product-api</artifactId>
-            <version>${project.version}</version>
-        </dependency>
-        <dependency>
-            <artifactId>openecomp-zusammen-plugin</artifactId>
-            <groupId>org.openecomp.sdc.core</groupId>
-            <version>${project.version}</version>
-        </dependency>
-        <dependency>
-            <groupId>org.openecomp.sdc</groupId>
-            <artifactId>openecomp-sdc-vendor-software-product-core</artifactId>
-            <version>${project.version}</version>
-        </dependency>
-        <dependency>
-            <groupId>org.openecomp.sdc</groupId>
-            <artifactId>openecomp-sdc-vendor-license-api</artifactId>
-            <version>${project.version}</version>
-        </dependency>
-        <dependency>
-            <groupId>org.openecomp.sdc</groupId>
-            <artifactId>openecomp-sdc-model-impl</artifactId>
-            <version>${project.version}</version>
-        </dependency>
-        <dependency>
-            <groupId>org.openecomp.sdc.core</groupId>
-            <artifactId>openecomp-zusammen-core</artifactId>
-            <version>${project.version}</version>
-        </dependency>
-        <dependency>
-            <groupId>com.amdocs.zusammen.plugin</groupId>
-            <artifactId>zusammen-state-store-cassandra-plugin</artifactId>
-              <version>${zusammen-state-store.version}</version>
-        </dependency>
-        <dependency>
-            <groupId>org.hibernate</groupId>
-            <artifactId>hibernate-validator</artifactId>
-            <version>${hibernate.validator.version}</version>
-        </dependency>
-        <dependency>
-            <groupId>org.openecomp.sdc</groupId>
-            <artifactId>openecomp-sdc-vendor-license-core</artifactId>
-            <version>${project.version}</version>
-        </dependency>
-    </dependencies>
-    <artifactId>openecomp-zusammen-migration</artifactId>
-    <groupId>org.openecomp.sdc.core.migration</groupId>
-    <version>1.2.0-SNAPSHOT</version>
-    <parent>
-        <groupId>org.openecomp.sdc</groupId>
-        <artifactId>openecomp-sdc-lib</artifactId>
-        <relativePath>../../../lib</relativePath>
-        <version>1.2.0-SNAPSHOT</version>
-    </parent>
-    <build>
-        <plugins>
-
-            <!-- ================================================== -->
-            <!-- Set the JDK compiler version.                      -->
-            <!-- ================================================== -->
-            <plugin>
-                <groupId>org.apache.maven.plugins</groupId>
-                <artifactId>maven-compiler-plugin</artifactId>
-                <version>2.5.1</version>
-                <inherited>true</inherited>
-                <configuration>
-                    <source>1.8</source>
-                    <target>1.8</target>
-                </configuration>
-            </plugin>
-
-            <plugin>
-                <groupId>org.codehaus.mojo</groupId>
-                <artifactId>license-maven-plugin</artifactId>
-                <version>1.10</version>
-                <configuration>
-                    <addJavaLicenseAfterPackage>false</addJavaLicenseAfterPackage>
-                    <processStartTag>
-                        ============LICENSE_START=======================================================
-                    </processStartTag>
-                    <processEndTag>
-                        ============LICENSE_END=========================================================
-                    </processEndTag>
-                    <sectionDelimiter>
-                        ================================================================================
-                    </sectionDelimiter>
-                    <licenseName>apache_v2</licenseName>
-                    <inceptionYear>2017</inceptionYear>
-                    <organizationName>AT&amp;T Intellectual Property. All rights reserved.
-                    </organizationName>
-                    <projectName>SDC</projectName>
-                    <canUpdateCopyright>true</canUpdateCopyright>
-                    <canUpdateDescription>true</canUpdateDescription>
-                    <canUpdateLicense>true</canUpdateLicense>
-                    <emptyLineAfterHeader>true</emptyLineAfterHeader>
-                    <verbose>false</verbose>
-                    <includes>
-                        <include>**/*.java</include>
-                        <include>**/*.js</include>
-                        <include>**/*.ts</include>
-                    </includes>
-                    <roots>
-                        <root>src</root>
-                        <root>app</root>
-                        <root>server-mock</root>
-                        <root>typings</root>
-                    </roots>
-                </configuration>
-                <executions>
-                    <execution>
-                        <id>first</id>
-                        <goals>
-                            <goal>update-file-header</goal>
-                        </goals>
-                        <!--phase>process-sources</phase-->
-                    </execution>
-                </executions>
-            </plugin>
-
-
-            <plugin>
-                <groupId>org.apache.maven.plugins</groupId>
-                <artifactId>maven-dependency-plugin</artifactId>
-                <version>2.8</version>
-                <executions>
-                    <execution>
-                        <id>copy-dependencies</id>
-                        <phase>install</phase>
-                        <goals>
-                            <goal>copy-dependencies</goal>
-                        </goals>
-                        <configuration>
-                            <outputDirectory>${project.build.directory}/lib</outputDirectory>
-                            <overWriteReleases>false</overWriteReleases>
-                            <overWriteSnapshots>false</overWriteSnapshots>
-                            <overWriteIfNewer>true</overWriteIfNewer>
-                            <!--includeScope>runtime</includeScope-->
-                        </configuration>
-                    </execution>
-                </executions>
-            </plugin>
-
-            <plugin>
-                <groupId>org.apache.maven.plugins</groupId>
-                <artifactId>maven-jar-plugin</artifactId>
-                <version>2.4</version>
-                <executions>
-                    <execution>
-                        <phase>package</phase>
-                    </execution>
-                </executions>
-                <configuration>
-                    <archive>
-                        <manifest>
-                            <addClasspath>true</addClasspath>
-                            <classpathLayoutType>custom</classpathLayoutType>
-                            <customClasspathLayout>
-                                lib/${artifact.artifactId}-${baseVersion}.${artifact.extension}
-                            </customClasspathLayout>
-                            <mainClass>org.openecomp.core.migration.MigrationMain
-                            </mainClass>
-                        </manifest>
-                        <manifestEntries>
-                            <Class-Path>lib/</Class-Path>
-                        </manifestEntries>
-                    </archive>
-                </configuration>
-            </plugin>
-
-            <plugin>
-                <groupId>org.apache.maven.plugins</groupId>
-                <artifactId>maven-surefire-plugin</artifactId>
-                <version>2.19.1</version>
-                <configuration>
-                    <useSystemClassLoader>false</useSystemClassLoader>
-                    <redirectTestOutputToFile>true</redirectTestOutputToFile>
-                </configuration>
-            </plugin>
-
-
-            <plugin>
-                <groupId>org.apache.maven.plugins</groupId>
-                <artifactId>maven-antrun-plugin</artifactId>
-                <executions>
-                    <execution>
-                        <id>ant-test</id>
-                        <phase>package</phase>
-                        <configuration>
-                            <tasks>
-                                <fixcrlf srcdir="./" eol="unix"
-                                         includes="cassandra2zusammen.sh"/>
-                            </tasks>
-                        </configuration>
-                        <goals>
-                            <goal>run</goal>
-                        </goals>
-                    </execution>
-                </executions>
-            </plugin>
-            <plugin>
-                <artifactId>maven-assembly-plugin</artifactId>
-		<version>${mvn.assembly.version}</version>
-                <executions>
-                    <execution>
-                        <id>Generate assembly</id>
-                        <phase>install</phase>
-                        <goals>
-                            <goal>single</goal>
-                        </goals>
-                    </execution>
-                </executions>
-                <configuration>
-                    <descriptors>
-                        <descriptor>${basedir}/src/main/assembly/migration-lib-assembly.xml
-                        </descriptor>
-                    </descriptors>
-                    <finalName>openecomp-zusammen-migration-lib</finalName>
-                </configuration>
-            </plugin>
-
-        </plugins>
-    </build>
-
-</project>
diff --git a/openecomp-be/tools/migration/1702_to_1707_zusammen/src/main/assembly/migration-lib-assembly.xml b/openecomp-be/tools/migration/1702_to_1707_zusammen/src/main/assembly/migration-lib-assembly.xml
deleted file mode 100644
index 42296ba..0000000
--- a/openecomp-be/tools/migration/1702_to_1707_zusammen/src/main/assembly/migration-lib-assembly.xml
+++ /dev/null
@@ -1,41 +0,0 @@
-<assembly xmlns="http://maven.apache.org/plugins/maven-assembly-plugin/assembly/1.1.2"
-		  xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
-		  xsi:schemaLocation="http://maven.apache.org/plugins/maven-assembly-plugin/assembly/1.1.2 http://maven.apache.org/xsd/assembly-1.1.2.xsd">
-
-	<formats>
-		<format>zip</format>
-	</formats>
-
-	<includeBaseDirectory>false</includeBaseDirectory>
-
-	<!--files>
-		<file>
-			<source>../cassandra2zusammen.sh</source>
-		</file>
-	</files-->
-
-	<fileSets>
-		<fileSet>
-			<directory>${basedir}/..</directory>
-			<includes>
-				<include>cassandra2zusammen.sh</include>
-			</includes>
-			<outputDirectory>/</outputDirectory>
-			<fileMode>0755</fileMode>
-		</fileSet>
-		<fileSet>
-			<directory>${basedir}/target</directory>
-			<includes>
-				<include>
-					openecomp-zusammen*.jar
-				</include>
-			</includes>
-			<outputDirectory>/</outputDirectory>
-		</fileSet>
-		<fileSet>
-			<directory>${basedir}/target/lib</directory>
-			<outputDirectory>/lib</outputDirectory>
-		</fileSet>
-	</fileSets>
-</assembly>
-
diff --git a/openecomp-be/tools/migration/1702_to_1707_zusammen/src/main/java/org/openecomp/core/migration/MigrationMain.java b/openecomp-be/tools/migration/1702_to_1707_zusammen/src/main/java/org/openecomp/core/migration/MigrationMain.java
deleted file mode 100644
index 1711e41..0000000
--- a/openecomp-be/tools/migration/1702_to_1707_zusammen/src/main/java/org/openecomp/core/migration/MigrationMain.java
+++ /dev/null
@@ -1,469 +0,0 @@
-package org.openecomp.core.migration;
-
-import com.amdocs.zusammen.datatypes.SessionContext;
-import com.amdocs.zusammen.datatypes.UserInfo;
-import com.amdocs.zusammen.plugin.statestore.cassandra.dao.impl.ItemCassandraDao;
-import com.amdocs.zusammen.plugin.statestore.cassandra.dao.impl.VersionCassandraDao;
-import org.openecomp.core.migration.convertors.ComponentConvertor;
-import org.openecomp.core.migration.convertors.EntitlementPoolConvertor;
-import org.openecomp.core.migration.convertors.FeatureGroupConvertor;
-import org.openecomp.core.migration.convertors.LKGConvertor;
-import org.openecomp.core.migration.convertors.LicenseAgreementConvertor;
-import org.openecomp.core.migration.convertors.MibConvertor;
-import org.openecomp.core.migration.convertors.NetworkConvertor;
-import org.openecomp.core.migration.convertors.NicConvertor;
-import org.openecomp.core.migration.convertors.OrchestrationTemplateCandidateConvertor;
-import org.openecomp.core.migration.convertors.ProcessConvertor;
-import org.openecomp.core.migration.convertors.VlmConvertor;
-import org.openecomp.core.migration.convertors.VspInformationConvertor;
-import org.openecomp.core.migration.convertors.VspServiceArtifactConvertor;
-import org.openecomp.core.migration.convertors.VspServiceTemplateConvertor;
-import org.openecomp.core.migration.loaders.ComponentCassandraLoader;
-import org.openecomp.core.migration.loaders.EntitlementPoolCassandraLoader;
-import org.openecomp.core.migration.loaders.FeatureGroupCassandraLoader;
-import org.openecomp.core.migration.loaders.LKGCassandraLoader;
-import org.openecomp.core.migration.loaders.LicenseAgreementCassandraLoader;
-import org.openecomp.core.migration.loaders.MibCassandraLoader;
-import org.openecomp.core.migration.loaders.NetworkCassandraLoader;
-import org.openecomp.core.migration.loaders.NicCassandraLoader;
-import org.openecomp.core.migration.loaders.OrchestrationTemplateCandidateCassandraLoader;
-import org.openecomp.core.migration.loaders.ProcessCassandraLoader;
-import org.openecomp.core.migration.loaders.ServiceArtifactCassandraLoader;
-import org.openecomp.core.migration.loaders.ServiceTemplateCassandraLoader;
-import org.openecomp.core.migration.loaders.VendorLicenseModelCassandraLoader;
-import org.openecomp.core.migration.loaders.VendorSoftwareProductInfoLoader;
-import org.openecomp.core.migration.loaders.VersionInfoCassandraLoader;
-import org.openecomp.core.migration.loaders.VspInformation;
-import org.openecomp.core.migration.store.ElementHandler;
-import org.openecomp.core.migration.store.ItemHandler;
-import org.openecomp.core.migration.util.marker.MigrationMarker;
-import org.openecomp.core.model.types.ServiceArtifact;
-import org.openecomp.core.model.types.ServiceTemplate;
-import org.openecomp.core.zusammen.impl.CassandraConnectionInitializer;
-import org.openecomp.core.zusammen.plugin.dao.impl.CassandraElementRepository;
-import org.openecomp.sdc.logging.api.Logger;
-import org.openecomp.sdc.logging.api.LoggerFactory;
-import org.openecomp.sdc.vendorlicense.dao.types.EntitlementPoolEntity;
-import org.openecomp.sdc.vendorlicense.dao.types.FeatureGroupEntity;
-import org.openecomp.sdc.vendorlicense.dao.types.LicenseAgreementEntity;
-import org.openecomp.sdc.vendorlicense.dao.types.LicenseKeyGroupEntity;
-import org.openecomp.sdc.vendorlicense.dao.types.VendorLicenseModelEntity;
-import org.openecomp.sdc.vendorsoftwareproduct.dao.type.ComponentEntity;
-import org.openecomp.sdc.vendorsoftwareproduct.dao.type.ComponentMonitoringUploadEntity;
-import org.openecomp.sdc.vendorsoftwareproduct.dao.type.NetworkEntity;
-import org.openecomp.sdc.vendorsoftwareproduct.dao.type.NicEntity;
-import org.openecomp.sdc.vendorsoftwareproduct.dao.type.ProcessEntity;
-import org.openecomp.sdc.versioning.dao.types.Version;
-import org.openecomp.sdc.versioning.dao.types.VersionInfoEntity;
-
-import java.time.Duration;
-import java.time.Instant;
-import java.util.Collection;
-import java.util.Date;
-import java.util.HashMap;
-import java.util.Map;
-
-import static org.openecomp.core.migration.util.Utils.printMessage;
-
-public class MigrationMain {
-  private static final String GLOBAL_USER = "GLOBAL_USER";
-  private static Logger logger = LoggerFactory.getLogger(MigrationMain.class);
-  private static int status = 0;
-
-  private static Map<String, VersionInfoEntity> versionInfoMap = new HashMap<>();
-
-  public static void main(String[] args) {
-    CassandraElementRepository cassandraElementRepository = new CassandraElementRepository();
-    CassandraConnectionInitializer.setCassandraConnectionPropertiesToSystem();
-    printMessage(logger, "Checking whether a migration has already been run.");
-    if (MigrationMarker.isMigrated()) {
-      printMessage(logger, "The DB has already been migrated, this script will now exit.");
-      System.exit(status);
-    }
-    ItemCassandraDao itemCassandraDao = new ItemCassandraDao();
-    VersionCassandraDao versionCassandraDao = new VersionCassandraDao();
-    SessionContext context = new SessionContext();
-    context.setUser(new UserInfo(GLOBAL_USER));
-    context.setTenant("dox");
-    printMessage(logger, "Starting migration.\n");
-    Instant startTime = Instant.now();
-
-    migrateToZusammen(cassandraElementRepository, itemCassandraDao, versionCassandraDao, context);
-
-    Instant stopTime = Instant.now();
-    Duration duration = Duration.between(startTime, stopTime);
-    long minutesPart = duration.toMinutes();
-    long secondsPart = duration.minusMinutes(minutesPart).getSeconds();
-
-    if (status == 0) {
-      MigrationMarker.markMigrated();
-    }
-    printMessage(logger,
-        "Migration finished . Total run time was : " + minutesPart + ":" + secondsPart
-            + " minutes");
-    System.exit(status);
-  }
-
-
-  private static void migrateToZusammen(CassandraElementRepository cassandraElementRepository,
-                                        ItemCassandraDao itemCassandraDao,
-                                        VersionCassandraDao versionCassandraDao,
-                                        SessionContext context) {
-    loadVersionInfo();
-
-
-    try {
-      convertVsp(context, itemCassandraDao, versionCassandraDao, cassandraElementRepository);
-      printMessage(logger, "Converted VSPs\n");
-    } catch (Exception e) {
-      logger.debug(e.getMessage(), e);
-      status = -1;
-    }
-
-    try {
-      convertOrchestrationTemplateCandidate(context, cassandraElementRepository);
-      printMessage(logger, "Converted OrchestrationTemplateCandidates\n");
-    } catch (Exception e) {
-      logger.debug(e.getMessage(), e);
-      status = -1;
-    }
-
-
-    try {
-      convertComponent(context, cassandraElementRepository);
-      printMessage(logger, "Converted Components\n");
-    } catch (Exception e) {
-      logger.debug(e.getMessage(), e);
-      status = -1;
-    }
-    try {
-      convertNic(context, cassandraElementRepository);
-      printMessage(logger, "Converted Nics\n");
-    } catch (Exception e) {
-      logger.debug(e.getMessage(), e);
-      status = -1;
-    }
-    try {
-      convertNetwork(context, cassandraElementRepository);
-      printMessage(logger, "Converted Networks\n");
-    } catch (Exception e) {
-      logger.debug(e.getMessage(), e);
-      status = -1;
-    }
-    try {
-      convertMibs(context, cassandraElementRepository);
-      printMessage(logger, "Converted MIBs\n");
-    } catch (Exception e) {
-      logger.debug(e.getMessage(), e);
-      status = -1;
-    }
-    try {
-      convertServiceArtifact(context, cassandraElementRepository);
-      printMessage(logger, "Converted Service Artifacts\n");
-    } catch (Exception e) {
-      logger.debug(e.getMessage(), e);
-      status = -1;
-    }
-    try {
-      convertServiceTemplate(context, cassandraElementRepository);
-      printMessage(logger, "Converted Service Templates\n");
-    } catch (Exception e) {
-      logger.debug(e.getMessage(), e);
-      status = -1;
-    }
-    try {
-      convertProcesses(context, cassandraElementRepository);
-      printMessage(logger, "Converted Processes\n");
-    } catch (Exception e) {
-      logger.debug(e.getMessage(), e);
-      status = -1;
-    }
-
-
-    try {
-      convertVlm(context, itemCassandraDao, versionCassandraDao, cassandraElementRepository);
-      printMessage(logger, "Converted VLMs\n");
-    } catch (Exception e) {
-      logger.debug(e.getMessage(), e);
-      status = -1;
-    }
-    try {
-      convertLKG(context, cassandraElementRepository);
-      printMessage(logger, "Converted LKGs\n");
-    } catch (Exception e) {
-      logger.debug(e.getMessage(), e);
-      status = -1;
-    }
-    try {
-      convertFeatureGroup(context, cassandraElementRepository);
-      printMessage(logger, "Converted Feature Groups\n");
-    } catch (Exception e) {
-      logger.debug(e.getMessage(), e);
-      status = -1;
-    }
-    try {
-      convertEP(context, cassandraElementRepository);
-      printMessage(logger, "Converted EPs\n");
-    } catch (Exception e) {
-      logger.debug(e.getMessage(), e);
-      status = -1;
-    }
-    try {
-      convertLicenseAgreement(context, cassandraElementRepository);
-      printMessage(logger, "Converted License Agreements\n");
-    } catch (Exception e) {
-      logger.debug(e.getMessage(), e);
-      status = -1;
-    }
-  }
-
-  private static void convertOrchestrationTemplateCandidate(SessionContext context,
-                                                            CassandraElementRepository cassandraElementRepository) {
-    OrchestrationTemplateCandidateCassandraLoader orchestrationTemplateCandidateCassandraLoader =
-        new OrchestrationTemplateCandidateCassandraLoader();
-
-    orchestrationTemplateCandidateCassandraLoader.list().stream()
-        .filter(entity -> needMigration(entity.getId(), entity.getVersion()) &&
-            entity.getContentData()!=null && entity.getFilesDataStructure()!=null)
-        .forEach(entity -> ElementHandler
-            .save(context, cassandraElementRepository, entity.getId(), entity.getVersion(),
-                OrchestrationTemplateCandidateConvertor
-                    .convertOrchestrationTemplateCandidateToElement(entity)));
-  }
-
-  private static void loadVersionInfo() {
-
-    VersionInfoCassandraLoader versionInfoCassandraLoader = new VersionInfoCassandraLoader();
-    Collection<VersionInfoEntity> versions =
-        versionInfoCassandraLoader.list();
-
-    versions.forEach(versionInfoEntity -> versionInfoMap.put(versionInfoEntity.getEntityId
-        (), versionInfoEntity));
-
-
-  }
-
-  private static void convertMibs(SessionContext context,
-                                  CassandraElementRepository cassandraElementRepository) {
-    MibCassandraLoader cassandraLoader = new MibCassandraLoader();
-    Collection<ComponentMonitoringUploadEntity> mibs = cassandraLoader.list();
-    mibs.stream().filter(mibEntity -> needMigration(mibEntity.getVspId(), mibEntity.getVersion()))
-        .forEach
-            (mibEntity -> {
-              ElementHandler.save(context, cassandraElementRepository,
-                  mibEntity
-                      .getVspId(), mibEntity.getVersion(),
-                  MibConvertor.convertMibToElement
-                      (mibEntity));
-            });
-  }
-
-  private static void convertProcesses(SessionContext context,
-                                       CassandraElementRepository cassandraElementRepository) {
-    ProcessCassandraLoader cassandraLoader = new ProcessCassandraLoader();
-    Collection<ProcessEntity> processes = cassandraLoader.list();
-    processes.stream()
-        .filter(processEntity -> needMigration(processEntity.getVspId(), processEntity.getVersion
-            ())).forEach(processEntity -> {
-      ElementHandler.save(
-          context,
-          cassandraElementRepository,
-          processEntity
-              .getId(), processEntity.getVersion(),
-          ProcessConvertor.convertProcessToElement(processEntity));
-    });
-  }
-
-  private static void convertVsp(SessionContext context, ItemCassandraDao itemCassandraDao,
-                                 VersionCassandraDao versionCassandraDao,
-                                 CassandraElementRepository cassandraElementRepository) {
-    VendorSoftwareProductInfoLoader vendorSoftwareProductInfoLoader = new
-        VendorSoftwareProductInfoLoader();
-    Collection<VspInformation> vsps =
-        vendorSoftwareProductInfoLoader.list();
-    vsps.stream().filter(vspInformation -> needMigration(vspInformation.getId(),
-        vspInformation.getVersion())).forEach
-        (vspInformation
-            ->
-            ItemHandler.save(context,
-                itemCassandraDao,
-                versionCassandraDao,
-                vspInformation.getId(), vspInformation
-                    .getVersion(),
-                VspInformationConvertor
-                    .getVspInfo
-                        (vspInformation),
-                VspInformationConvertor.getItemVersionData(vspInformation),
-                vspInformation.getWritetimeMicroSeconds()));
-
-    vsps.stream().filter(vspInformation -> needMigration(vspInformation.getId(),
-        vspInformation.getVersion()))
-        .forEach(vspInformation -> ElementHandler.save(context, cassandraElementRepository,
-            vspInformation.getId(), vspInformation.getVersion(),
-            VspInformationConvertor.convertVspToElement
-                (vspInformation)));
-  }
-
-  private static void convertVlm(SessionContext context, ItemCassandraDao itemCassandraDao,
-                                 VersionCassandraDao versionCassandraDao,
-                                 CassandraElementRepository cassandraElementRepository) {
-    VendorLicenseModelCassandraLoader
-        vendorLicenseModelCassandraDao = new VendorLicenseModelCassandraLoader();
-    Collection<VendorLicenseModelEntity> vlms =
-        vendorLicenseModelCassandraDao.list();
-    vlms.stream().filter(vlm -> needMigration(vlm.getId(), vlm.getVersion())).forEach(vlmEntity ->
-        ItemHandler.save
-            (context, itemCassandraDao,
-                versionCassandraDao,
-                vlmEntity.getId(), vlmEntity.getVersion(),
-                VlmConvertor.getVlmInfo
-                    (vlmEntity),
-                VlmConvertor.getItemVersionData(vlmEntity), new Date().getTime()));
-    vlms.stream().filter(vlm -> needMigration(vlm.getId(), vlm.getVersion()))
-        .forEach(vlmEntity -> ElementHandler.save(context, cassandraElementRepository,
-            vlmEntity.getId(), vlmEntity.getVersion(),
-            VlmConvertor.convertVlmToElement
-                (vlmEntity)));
-
-  }
-
-  private static void convertNic(SessionContext context,
-                                 CassandraElementRepository cassandraElementRepository) {
-    NicCassandraLoader nicCassandraLoader = new NicCassandraLoader();
-    Collection<NicEntity> nics = nicCassandraLoader.list();
-    nics.stream().filter(entity -> needMigration(entity.getVspId(), entity.getVersion
-        ())).forEach(nicEntity -> ElementHandler.save(context, cassandraElementRepository,
-        nicEntity.getVspId(), nicEntity.getVersion(), NicConvertor.convertNicToElement
-            (nicEntity)));
-
-  }
-
-  private static void convertNetwork(SessionContext context,
-                                     CassandraElementRepository cassandraElementRepository) {
-    NetworkCassandraLoader networkCassandraLoader = new NetworkCassandraLoader();
-    Collection<NetworkEntity> networks = networkCassandraLoader.list();
-    networks.stream().filter(entity -> needMigration(entity.getVspId(), entity.getVersion
-        ())).forEach(networkEntity -> ElementHandler.save(context, cassandraElementRepository,
-        networkEntity.getVspId(), networkEntity.getVersion(), NetworkConvertor
-            .convertNetworkToElement(networkEntity)));
-
-  }
-
-  private static void convertComponent(SessionContext context,
-                                       CassandraElementRepository cassandraElementRepository) {
-    ComponentCassandraLoader componentCassandraLoader = new ComponentCassandraLoader();
-    Collection<ComponentEntity> components = componentCassandraLoader.list();
-    components.stream().filter(entity -> needMigration(entity.getVspId(), entity.getVersion
-        ())).forEach(componentEntity -> ElementHandler.save(context, cassandraElementRepository,
-        componentEntity
-            .getVspId(), componentEntity.getVersion(), ComponentConvertor
-            .convertComponentToElement(componentEntity)));
-
-  }
-
-  private static void convertServiceArtifact(SessionContext context,
-                                             CassandraElementRepository cassandraElementRepository) {
-    ServiceArtifactCassandraLoader serviceArtifactCassandraLoader =
-        new ServiceArtifactCassandraLoader();
-    Collection<ServiceArtifact> serviceArtifacts = serviceArtifactCassandraLoader.list();
-    serviceArtifacts.stream().filter(entity -> needMigration(entity.getVspId(), entity.getVersion
-        ())).forEach(serviceArtifact -> ElementHandler.save(context,
-        cassandraElementRepository,
-        serviceArtifact
-            .getVspId(), serviceArtifact.getVersion(),
-        VspServiceArtifactConvertor
-            .convertServiceArtifactToElement(serviceArtifact)));
-
-  }
-
-  private static void convertServiceTemplate(SessionContext context,
-                                             CassandraElementRepository cassandraElementRepository) {
-    ServiceTemplateCassandraLoader serviceTemplateCassandraLoader =
-        new ServiceTemplateCassandraLoader();
-    Collection<ServiceTemplate> serviceTemplates = serviceTemplateCassandraLoader.list();
-    serviceTemplates.stream().filter(entity -> needMigration(entity.getVspId(), entity.getVersion
-        ())).forEach(serviceTemplate -> ElementHandler.save(context,
-        cassandraElementRepository,
-        serviceTemplate
-            .getVspId(), serviceTemplate.getVersion(),
-        VspServiceTemplateConvertor
-            .convertServiceTemplateToElement(serviceTemplate)));
-
-  }
-
-  private static void convertLKG(SessionContext context,
-                                 CassandraElementRepository cassandraElementRepository) {
-    LKGCassandraLoader LKGCassandraLoader = new LKGCassandraLoader();
-    Collection<LicenseKeyGroupEntity> lkgs = LKGCassandraLoader.list();
-    lkgs.stream().filter(entity -> needMigration(entity.getVendorLicenseModelId(), entity.getVersion
-        ()))
-        .forEach(licenseKeyGroupEntity -> ElementHandler.save(context, cassandraElementRepository,
-            licenseKeyGroupEntity
-                .getVendorLicenseModelId(), licenseKeyGroupEntity.getVersion(),
-            LKGConvertor.convertLKGToElement
-                (licenseKeyGroupEntity)));
-  }
-
-  private static void convertEP(SessionContext context,
-                                CassandraElementRepository cassandraElementRepository) {
-    EntitlementPoolCassandraLoader entitlementPoolCassandraLoader =
-        new EntitlementPoolCassandraLoader();
-    Collection<EntitlementPoolEntity> entitlementPools = entitlementPoolCassandraLoader.list();
-    entitlementPools.stream()
-        .filter(entity -> needMigration(entity.getVendorLicenseModelId(), entity.getVersion
-            ()))
-        .forEach(entitlementPoolEntity -> ElementHandler.save(context, cassandraElementRepository,
-            entitlementPoolEntity
-                .getVendorLicenseModelId(), entitlementPoolEntity.getVersion(),
-            EntitlementPoolConvertor.convertEntitlementPoolToElement(entitlementPoolEntity)));
-  }
-
-  private static void convertFeatureGroup(SessionContext context,
-                                          CassandraElementRepository cassandraElementRepository) {
-    FeatureGroupCassandraLoader featureGroupCassandraLoader = new FeatureGroupCassandraLoader();
-    Collection<FeatureGroupEntity> featureGroupEntities = featureGroupCassandraLoader.list();
-    featureGroupEntities.stream()
-        .filter(entity -> needMigration(entity.getVendorLicenseModelId(), entity.getVersion
-            ()))
-        .forEach(featureGroupEntity -> ElementHandler.save(context, cassandraElementRepository,
-            featureGroupEntity
-                .getVendorLicenseModelId(), featureGroupEntity.getVersion(),
-            FeatureGroupConvertor.convertFeatureGroupToElement(featureGroupEntity)));
-  }
-
-  private static void convertLicenseAgreement(SessionContext context,
-                                              CassandraElementRepository cassandraElementRepository) {
-    LicenseAgreementCassandraLoader licenseAgreementCassandraLoader =
-        new LicenseAgreementCassandraLoader();
-    Collection<LicenseAgreementEntity> licenseAgreementEntities =
-        licenseAgreementCassandraLoader.list();
-    licenseAgreementEntities.stream()
-        .filter(entity -> needMigration(entity.getVendorLicenseModelId(), entity.getVersion
-            ()))
-        .forEach(licenseAgreementEntity -> ElementHandler.save(context, cassandraElementRepository,
-            licenseAgreementEntity
-                .getVendorLicenseModelId(), licenseAgreementEntity.getVersion(),
-            LicenseAgreementConvertor.convertLicenseAgreementToElement(licenseAgreementEntity)));
-  }
-
-
-  private static boolean needMigration(String itemId, Version versionId) {
-
-    VersionInfoEntity versionInfo =
-        MigrationMain.versionInfoMap.get(itemId);
-    if (versionInfo == null) {
-      printMessage(logger, "ItemId: " + itemId + " is not in version_info table.");
-      return false;
-    }
-    return (versionInfo.getCandidate() != null && versionId.equals(versionInfo.getCandidate()
-        .getVersion()))
-        || (versionInfo
-        .getViewableVersions() != null && versionInfo
-        .getViewableVersions().contains(versionId));
-  }
-
-  public static Map<String, VersionInfoEntity> getVersionInfoMap()
-  {
-    return versionInfoMap;
-  }
-}
diff --git a/openecomp-be/tools/migration/1702_to_1707_zusammen/src/main/java/org/openecomp/core/migration/convertors/ComponentConvertor.java b/openecomp-be/tools/migration/1702_to_1707_zusammen/src/main/java/org/openecomp/core/migration/convertors/ComponentConvertor.java
deleted file mode 100644
index fb597d5..0000000
--- a/openecomp-be/tools/migration/1702_to_1707_zusammen/src/main/java/org/openecomp/core/migration/convertors/ComponentConvertor.java
+++ /dev/null
@@ -1,102 +0,0 @@
-package org.openecomp.core.migration.convertors;
-
-import com.amdocs.zusammen.datatypes.item.ElementContext;
-import com.amdocs.zusammen.datatypes.item.Info;
-import com.amdocs.zusammen.plugin.statestore.cassandra.dao.types.ElementEntityContext;
-import com.amdocs.zusammen.sdk.collaboration.types.CollaborationElement;
-import org.openecomp.core.migration.MigrationMain;
-import org.openecomp.core.migration.store.ElementHandler;
-import org.openecomp.sdc.logging.api.Logger;
-import org.openecomp.sdc.logging.api.LoggerFactory;
-import org.openecomp.sdc.vendorsoftwareproduct.dao.impl.zusammen.ElementPropertyName;
-import org.openecomp.sdc.vendorsoftwareproduct.dao.impl.zusammen.ElementType;
-import org.openecomp.sdc.vendorsoftwareproduct.dao.impl.zusammen.StructureElement;
-import org.openecomp.sdc.vendorsoftwareproduct.dao.type.ComponentEntity;
-
-import java.util.HashSet;
-import java.util.List;
-import java.util.Set;
-
-/**
- * @author katyr
- * @since April 23, 2017
- */
-
-public class ComponentConvertor {
-
-  private static Set<String> componentsLoaded = new HashSet<>();
-  private static Logger logger = LoggerFactory.getLogger(MigrationMain.class);
-
-  public static CollaborationElement[] convertComponentToElement(ComponentEntity componentEntity) {
-
-    CollaborationElement[] componentElements;
-    List<String> componentNamespace = getComponentNamespace();
-
-    int index = 0;
-    String componentsEntityId = StructureElement.Components.name();
-    String uniqueId = componentEntity.getVspId()+"_"+componentEntity.getVersion().toString();
-    if (componentsLoaded.contains(uniqueId)) {
-//      printMessage(logger, "Components structural elements exist for component " +
-//          componentEntity.getId());
-      componentElements = new CollaborationElement[2];
-    } else {
-      componentsLoaded.add(uniqueId);
-//      printMessage(logger, "Creating Components structural elements for component " +
-//          componentEntity.getId());
-      componentElements = new CollaborationElement[3];
-      componentElements[index] = ElementHandler.getElementEntity(
-          componentEntity.getVspId(), componentEntity.getVersion().toString(), componentsEntityId,
-          componentNamespace,
-          ElementHandler.getStructuralElementInfo(StructureElement.Components.name()),
-          null,
-          null,
-          null);
-      index++;
-    }
-
-    componentNamespace.add(componentsEntityId);
-    componentElements[index] = ElementHandler.getElementEntity(
-        componentEntity.getVspId(), componentEntity.getVersion().toString(),
-        componentEntity.getId(),
-        componentNamespace,
-        getComponentInfo(componentEntity),
-        null,
-        null,
-        (componentEntity.getCompositionData() != null) ? componentEntity.getCompositionData().getBytes()
-            : null);
-    index++;
-
-    componentNamespace.add(componentEntity.getId());
-    componentElements[index] = ElementHandler.getElementEntity(
-        componentEntity.getVspId(), componentEntity.getVersion().toString(),StructureElement.Questionnaire.name() + "_" + componentEntity.getId(),
-        componentNamespace,
-        ElementHandler.getStructuralElementInfo(StructureElement.Questionnaire.name()),
-        null,
-        null,
-        (componentEntity.getQuestionnaireData() != null) ? componentEntity.getQuestionnaireData().getBytes()
-            : null);
-
-    return componentElements;
-  }
-
-  private static Info getComponentInfo(ComponentEntity componentEntity) {
-    Info info = new Info();
-    info.addProperty(ElementPropertyName.type.name(), ElementType.Component);
-    info.addProperty(ElementPropertyName.compositionData.name(),
-        componentEntity.getCompositionData());
-
-    return info;
-  }
-
-  private static List<String> getComponentNamespace() {
-    return ElementHandler.getElementPath();
-  }
-
-  public static ElementEntityContext convertComponentToElementContext(
-      ComponentEntity componentEntity) {
-
-    return new ElementEntityContext("GLOBAL_USER", new
-        ElementContext(componentEntity.getVspId(), componentEntity.getVersion().toString()));
-  }
-
-}
diff --git a/openecomp-be/tools/migration/1702_to_1707_zusammen/src/main/java/org/openecomp/core/migration/convertors/EntitlementPoolConvertor.java b/openecomp-be/tools/migration/1702_to_1707_zusammen/src/main/java/org/openecomp/core/migration/convertors/EntitlementPoolConvertor.java
deleted file mode 100644
index 86faf15..0000000
--- a/openecomp-be/tools/migration/1702_to_1707_zusammen/src/main/java/org/openecomp/core/migration/convertors/EntitlementPoolConvertor.java
+++ /dev/null
@@ -1,92 +0,0 @@
-package org.openecomp.core.migration.convertors;
-
-import com.amdocs.zusammen.datatypes.item.ElementContext;
-import com.amdocs.zusammen.datatypes.item.Info;
-import com.amdocs.zusammen.plugin.statestore.cassandra.dao.types.ElementEntityContext;
-import com.amdocs.zusammen.sdk.collaboration.types.CollaborationElement;
-import org.openecomp.core.migration.store.ElementHandler;
-import org.openecomp.sdc.vendorlicense.dao.impl.zusammen.RelationType;
-import org.openecomp.sdc.vendorlicense.dao.impl.zusammen.StructureElement;
-import org.openecomp.sdc.vendorlicense.dao.impl.zusammen.VlmZusammenUtil;
-import org.openecomp.sdc.vendorlicense.dao.types.EntitlementPoolEntity;
-
-import java.util.HashSet;
-import java.util.List;
-import java.util.Set;
-import java.util.stream.Collectors;
-
-/**
- * Created by ayalaben on 4/24/2017
- */
-public class EntitlementPoolConvertor {
-
-  private static Set<String> EntitlementPoolsLoaded = new HashSet<>();
-
-  public static ElementEntityContext convertEntitlementPoolToElementContext(
-      EntitlementPoolEntity entitlementPoolEntity) {
-
-    return new ElementEntityContext("GLOBAL_USER", new
-        ElementContext(entitlementPoolEntity.getVendorLicenseModelId(),
-        entitlementPoolEntity.getVersion().toString()));
-  }
-
-  public static CollaborationElement[] convertEntitlementPoolToElement(
-      EntitlementPoolEntity entitlementPoolEntity) {
-//    printMessage(logger, "source EntitlementPoolEntity -> " + entitlementPoolEntity.toString());
-    CollaborationElement[] elements;
-    List<String> entitlementPoolNamespace = getEntitlementPoolNamespace(entitlementPoolEntity);
-
-    int index = 0;
-    String entitlememtPoolsEntityId = StructureElement.EntitlementPools.name();
-    String uniqueId = entitlementPoolEntity.getVendorLicenseModelId() + "_" +
-        entitlementPoolEntity.getVersion().toString();
-
-    if (EntitlementPoolsLoaded.contains(uniqueId)) {
-      elements = new CollaborationElement[1];
-    } else {
-      EntitlementPoolsLoaded.add(uniqueId);
-      elements = new CollaborationElement[2];
-      elements[index] = ElementHandler.getElementEntity(
-          entitlementPoolEntity.getVendorLicenseModelId(),
-          entitlementPoolEntity.getVersion().toString(),
-          entitlememtPoolsEntityId, entitlementPoolNamespace,
-              ElementHandler.getStructuralElementInfo(StructureElement.EntitlementPools.name()),
-          null, null, null);
-      index++;
-    }
-
-    entitlementPoolNamespace.add(entitlememtPoolsEntityId);
-
-    elements[index] = ElementHandler.getElementEntity(
-        entitlementPoolEntity.getVendorLicenseModelId(),
-        entitlementPoolEntity.getVersion().toString(),
-        entitlementPoolEntity.getId(), entitlementPoolNamespace,
-        getEntitelementPoolInfo(entitlementPoolEntity),
-        entitlementPoolEntity.getReferencingFeatureGroups().stream().map(rel ->
-            VlmZusammenUtil
-                .createRelation( RelationType.EntitlmentPoolToReferencingFeatureGroup, rel))
-            .collect(Collectors.toList()), null, null);
-
-    return elements;
-  }
-
-  private static Info getEntitelementPoolInfo(EntitlementPoolEntity entitlementPool) {
-
-    Info info = new Info();
-    info.setName(entitlementPool.getName());
-    info.setDescription(entitlementPool.getDescription());
-    info.addProperty("thresholdValue", entitlementPool.getThresholdValue());
-    info.addProperty("threshold_unit", entitlementPool.getThresholdUnit());
-    //info.addProperty("entitlement_metric", entitlementPool.getEntitlementMetric());
-    info.addProperty("increments", entitlementPool.getIncrements());
-    info.addProperty("operational_scope", entitlementPool.getOperationalScope());
-
-    return info;
-  }
-
-  private static List<String> getEntitlementPoolNamespace(
-      EntitlementPoolEntity entitlementPoolEntity) {
-    return ElementHandler.getElementPath("");
-  }
-
-}
diff --git a/openecomp-be/tools/migration/1702_to_1707_zusammen/src/main/java/org/openecomp/core/migration/convertors/FeatureGroupConvertor.java b/openecomp-be/tools/migration/1702_to_1707_zusammen/src/main/java/org/openecomp/core/migration/convertors/FeatureGroupConvertor.java
deleted file mode 100644
index eac5ce6..0000000
--- a/openecomp-be/tools/migration/1702_to_1707_zusammen/src/main/java/org/openecomp/core/migration/convertors/FeatureGroupConvertor.java
+++ /dev/null
@@ -1,102 +0,0 @@
-package org.openecomp.core.migration.convertors;
-
-import com.amdocs.zusammen.datatypes.item.ElementContext;
-import com.amdocs.zusammen.datatypes.item.Info;
-import com.amdocs.zusammen.datatypes.item.Relation;
-import com.amdocs.zusammen.plugin.statestore.cassandra.dao.types.ElementEntityContext;
-import com.amdocs.zusammen.sdk.collaboration.types.CollaborationElement;
-import org.openecomp.core.migration.store.ElementHandler;
-import org.openecomp.sdc.logging.api.Logger;
-import org.openecomp.sdc.logging.api.LoggerFactory;
-import org.openecomp.sdc.vendorlicense.dao.impl.zusammen.RelationType;
-import org.openecomp.sdc.vendorlicense.dao.impl.zusammen.StructureElement;
-import org.openecomp.sdc.vendorlicense.dao.impl.zusammen.VlmZusammenUtil;
-import org.openecomp.sdc.vendorlicense.dao.types.FeatureGroupEntity;
-
-import java.util.ArrayList;
-import java.util.Collection;
-import java.util.HashSet;
-import java.util.List;
-import java.util.Set;
-import java.util.stream.Collectors;
-
-/**
- * Created by ayalaben on 4/25/2017
- */
-public class FeatureGroupConvertor {
-
-    private static Logger logger = LoggerFactory.getLogger(FeatureGroupConvertor.class);
-    private static Set<String> FeatureGroupsLoaded = new HashSet<>();
-
-    public static ElementEntityContext convertFeatureGroupToElementContext(FeatureGroupEntity featureGroupEntity) {
-
-        return new ElementEntityContext("GLOBAL_USER", new
-                ElementContext(featureGroupEntity.getVendorLicenseModelId(), featureGroupEntity.getVersion().toString()));
-    }
-
-    public static CollaborationElement[] convertFeatureGroupToElement(FeatureGroupEntity featureGroupEntity) {
-//        printMessage(logger, "source FeatureGroupEntity -> " + featureGroupEntity.toString());
-        CollaborationElement[] elements;
-        List<String> featureGroupNamespace = getFeatureGroupNamespace(featureGroupEntity);
-
-        int index = 0;
-        String featureGroupsEntityId = StructureElement.FeatureGroups.name();
-        String uniqueId = featureGroupEntity.getVendorLicenseModelId() + "_" + featureGroupEntity.getVersion().toString();
-
-        if (FeatureGroupsLoaded.contains(uniqueId)) {
-            elements = new CollaborationElement[1];
-        } else {
-            FeatureGroupsLoaded.add(uniqueId);
-            elements = new CollaborationElement[2];
-            elements[index] = ElementHandler.getElementEntity(
-                    featureGroupEntity.getVendorLicenseModelId(), featureGroupEntity.getVersion().toString(),
-                    featureGroupsEntityId, featureGroupNamespace,
-                    ElementHandler.getStructuralElementInfo(StructureElement.FeatureGroups.name()),
-                    null, null, null);
-            index++;
-        }
-
-        featureGroupNamespace.add(featureGroupsEntityId);
-
-        elements[index] = ElementHandler.getElementEntity(
-                featureGroupEntity.getVendorLicenseModelId(), featureGroupEntity.getVersion().toString(),
-                featureGroupEntity.getId(), featureGroupNamespace, getFeatureGroupInfo(featureGroupEntity),
-                getAllFeatureGroupRelations(featureGroupEntity), null, null);
-
-        return elements;
-    }
-
-    private static Collection<Relation> getAllFeatureGroupRelations(FeatureGroupEntity featureGroup) {
-        Collection<Relation> relations = new ArrayList<>();
-
-        relations.addAll(featureGroup.getEntitlementPoolIds().stream().map(rel ->
-                VlmZusammenUtil.createRelation( RelationType.FeatureGroupToEntitlmentPool, rel))
-                .collect(Collectors.toList()));
-
-        relations.addAll(featureGroup.getLicenseKeyGroupIds().stream().map(rel ->
-                VlmZusammenUtil.createRelation( RelationType.FeatureGroupToLicenseKeyGroup, rel))
-                .collect(Collectors.toList()));
-
-        relations.addAll(featureGroup.getReferencingLicenseAgreements().stream().map(rel ->
-                VlmZusammenUtil.createRelation( RelationType.FeatureGroupToReferencingLicenseAgreement,
-                        rel)).collect(Collectors.toList()));
-
-        return relations;
-    }
-
-    private static Info getFeatureGroupInfo(FeatureGroupEntity featureGroup) {
-
-        Info info = new Info();
-        info.setName(featureGroup.getName());
-        info.setDescription(featureGroup.getDescription());
-        info.addProperty("partNumber", featureGroup.getPartNumber());
-        info.addProperty("manufacturerReferenceNumber", featureGroup.getManufacturerReferenceNumber());
-
-        return info;
-    }
-
-
-    private static List<String> getFeatureGroupNamespace(FeatureGroupEntity featureGroupEntity) {
-        return ElementHandler.getElementPath("");
-    }
-}
diff --git a/openecomp-be/tools/migration/1702_to_1707_zusammen/src/main/java/org/openecomp/core/migration/convertors/LKGConvertor.java b/openecomp-be/tools/migration/1702_to_1707_zusammen/src/main/java/org/openecomp/core/migration/convertors/LKGConvertor.java
deleted file mode 100644
index 7fd640b..0000000
--- a/openecomp-be/tools/migration/1702_to_1707_zusammen/src/main/java/org/openecomp/core/migration/convertors/LKGConvertor.java
+++ /dev/null
@@ -1,79 +0,0 @@
-package org.openecomp.core.migration.convertors;
-
-import com.amdocs.zusammen.datatypes.item.ElementContext;
-import com.amdocs.zusammen.datatypes.item.Info;
-import com.amdocs.zusammen.plugin.statestore.cassandra.dao.types.ElementEntityContext;
-import com.amdocs.zusammen.sdk.collaboration.types.CollaborationElement;
-import org.openecomp.core.migration.store.ElementHandler;
-import org.openecomp.sdc.logging.api.Logger;
-import org.openecomp.sdc.logging.api.LoggerFactory;
-import org.openecomp.sdc.vendorlicense.dao.impl.zusammen.RelationType;
-import org.openecomp.sdc.vendorlicense.dao.impl.zusammen.StructureElement;
-import org.openecomp.sdc.vendorlicense.dao.impl.zusammen.VlmZusammenUtil;
-import org.openecomp.sdc.vendorlicense.dao.types.LicenseKeyGroupEntity;
-
-import java.util.HashSet;
-import java.util.List;
-import java.util.Set;
-import java.util.stream.Collectors;
-
-/**
- * Created by ayalaben on 4/24/2017
- */
-public class LKGConvertor {
-
-    private static Logger logger = LoggerFactory.getLogger(LKGConvertor.class);
-    private static Set<String> compLKGLoaded = new HashSet<>();
-
-    public static CollaborationElement[] convertLKGToElement(LicenseKeyGroupEntity licenseKeyGroupEntity) {
-        CollaborationElement[] elements;
-        List<String> lkgNamespace = getLKGNamespace(licenseKeyGroupEntity);
-
-        int index = 0;
-        String lkgsEntityId = StructureElement.LicenseKeyGroups.name();
-        String uniqueId = licenseKeyGroupEntity.getVendorLicenseModelId() + "_" + licenseKeyGroupEntity.getVersion().toString();
-
-        if (compLKGLoaded.contains(uniqueId)) {
-            elements = new CollaborationElement[1];
-        } else {
-            compLKGLoaded.add(uniqueId);
-            elements = new CollaborationElement[2];
-            elements[index] = ElementHandler.getElementEntity(
-                    licenseKeyGroupEntity.getVendorLicenseModelId(), licenseKeyGroupEntity.getVersion().toString(), lkgsEntityId, lkgNamespace,
-                    ElementHandler.getStructuralElementInfo(StructureElement.LicenseKeyGroups.name()), null, null, null);
-            index++;
-        }
-
-        lkgNamespace.add(lkgsEntityId);
-
-        elements[index] = ElementHandler.getElementEntity(
-                licenseKeyGroupEntity.getVendorLicenseModelId(), licenseKeyGroupEntity.getVersion().toString(), licenseKeyGroupEntity.getId(), lkgNamespace,
-                getLKGInfo(licenseKeyGroupEntity), licenseKeyGroupEntity.getReferencingFeatureGroups().stream().map(rel ->
-                VlmZusammenUtil.createRelation( RelationType.LicenseKeyGroupToReferencingFeatureGroup, rel))
-                        .collect(Collectors.toList()), null, null);
-
-        return elements;
-    }
-
-    private static Info getLKGInfo(LicenseKeyGroupEntity licenseKeyGroupEntity) {
-
-        Info info = new Info();
-        info.setName(licenseKeyGroupEntity.getName());
-        info.setDescription(licenseKeyGroupEntity.getDescription());
-        info.addProperty("LicenseKeyType", licenseKeyGroupEntity.getType());
-        info.addProperty("operational_scope", licenseKeyGroupEntity.getOperationalScope());
-
-        return info;
-    }
-
-    private static List<String> getLKGNamespace(LicenseKeyGroupEntity LKGEntity) {
-        return ElementHandler.getElementPath("");
-    }
-
-    public static ElementEntityContext convertLKGToElementContext(LicenseKeyGroupEntity licenseKeyGroupEntity) {
-
-        return new ElementEntityContext("GLOBAL_USER", new
-                ElementContext(licenseKeyGroupEntity.getVendorLicenseModelId(), licenseKeyGroupEntity.getVersion().toString()));
-    }
-
-}
diff --git a/openecomp-be/tools/migration/1702_to_1707_zusammen/src/main/java/org/openecomp/core/migration/convertors/LicenseAgreementConvertor.java b/openecomp-be/tools/migration/1702_to_1707_zusammen/src/main/java/org/openecomp/core/migration/convertors/LicenseAgreementConvertor.java
deleted file mode 100644
index 25564c3..0000000
--- a/openecomp-be/tools/migration/1702_to_1707_zusammen/src/main/java/org/openecomp/core/migration/convertors/LicenseAgreementConvertor.java
+++ /dev/null
@@ -1,84 +0,0 @@
-package org.openecomp.core.migration.convertors;
-
-import com.amdocs.zusammen.datatypes.item.ElementContext;
-import com.amdocs.zusammen.datatypes.item.Info;
-import com.amdocs.zusammen.plugin.statestore.cassandra.dao.types.ElementEntityContext;
-import com.amdocs.zusammen.sdk.collaboration.types.CollaborationElement;
-import org.openecomp.core.migration.store.ElementHandler;
-import org.openecomp.sdc.logging.api.Logger;
-import org.openecomp.sdc.logging.api.LoggerFactory;
-import org.openecomp.sdc.vendorlicense.dao.impl.zusammen.RelationType;
-import org.openecomp.sdc.vendorlicense.dao.impl.zusammen.StructureElement;
-import org.openecomp.sdc.vendorlicense.dao.impl.zusammen.VlmZusammenUtil;
-import org.openecomp.sdc.vendorlicense.dao.types.LicenseAgreementEntity;
-
-import java.util.HashSet;
-import java.util.List;
-import java.util.Set;
-import java.util.stream.Collectors;
-
-/**
- * Created by ayalaben on 4/25/2017
- */
-public class LicenseAgreementConvertor {
-
-    private static Logger logger = LoggerFactory.getLogger(LicenseAgreementConvertor.class);
-    private static Set<String> LicenseAgreementsLoaded = new HashSet<>();
-
-    public static ElementEntityContext convertLicenseAgreementToElementContext(LicenseAgreementEntity licenseAgreementEntity) {
-
-        return new ElementEntityContext("GLOBAL_USER", new
-                ElementContext(licenseAgreementEntity.getVendorLicenseModelId(), licenseAgreementEntity.getVersion().toString()));
-    }
-
-
-    public static CollaborationElement[] convertLicenseAgreementToElement(LicenseAgreementEntity licenseAgreementEntity) {
-//        printMessage(logger, "source LicenseAgreementEntity -> " + licenseAgreementEntity.toString());
-        CollaborationElement[] elements;
-        List<String> featureGroupNamespace = getLicenseAgreementNamespace(licenseAgreementEntity);
-
-        int index = 0;
-        String featureGroupsEntityId = StructureElement.LicenseAgreements.name();
-        String uniqueId = licenseAgreementEntity.getVendorLicenseModelId() + "_" + licenseAgreementEntity.getVersion().toString();
-
-        if (LicenseAgreementsLoaded.contains(uniqueId)) {
-            elements = new CollaborationElement[1];
-        } else {
-            LicenseAgreementsLoaded.add(uniqueId);
-            elements = new CollaborationElement[2];
-            elements[index] = ElementHandler.getElementEntity(
-                    licenseAgreementEntity.getVendorLicenseModelId(), licenseAgreementEntity.getVersion().toString(),
-                    featureGroupsEntityId, featureGroupNamespace,
-                    ElementHandler.getStructuralElementInfo(StructureElement.LicenseAgreements.name()),
-                    null, null, null);
-            index++;
-        }
-
-        featureGroupNamespace.add(featureGroupsEntityId);
-
-        elements[index] = ElementHandler.getElementEntity(
-                licenseAgreementEntity.getVendorLicenseModelId(), licenseAgreementEntity.getVersion().toString(),
-                licenseAgreementEntity.getId(), featureGroupNamespace, getLicenseAgreementInfo(licenseAgreementEntity),
-                licenseAgreementEntity.getFeatureGroupIds().stream().map(rel ->
-                    VlmZusammenUtil.createRelation( RelationType.LicenseAgreementToFeatureGroup, rel))
-                        .collect(Collectors.toList()), null, null);
-
-        return elements;
-    }
-
-    private static Info getLicenseAgreementInfo(LicenseAgreementEntity licenseAgreement) {
-
-        Info info = new Info();
-        info.setName(licenseAgreement.getName());
-        info.setDescription(licenseAgreement.getDescription());
-        info.addProperty("licenseTerm", licenseAgreement.getLicenseTerm());
-        info.addProperty("requirementsAndConstrains", licenseAgreement.getRequirementsAndConstrains());
-
-        return info;
-    }
-
-    private static List<String> getLicenseAgreementNamespace(LicenseAgreementEntity licenseAgreement) {
-        return ElementHandler.getElementPath("");
-    }
-
-}
diff --git a/openecomp-be/tools/migration/1702_to_1707_zusammen/src/main/java/org/openecomp/core/migration/convertors/MibConvertor.java b/openecomp-be/tools/migration/1702_to_1707_zusammen/src/main/java/org/openecomp/core/migration/convertors/MibConvertor.java
deleted file mode 100644
index f145e51..0000000
--- a/openecomp-be/tools/migration/1702_to_1707_zusammen/src/main/java/org/openecomp/core/migration/convertors/MibConvertor.java
+++ /dev/null
@@ -1,77 +0,0 @@
-package org.openecomp.core.migration.convertors;
-
-import com.amdocs.zusammen.datatypes.item.ElementContext;
-import com.amdocs.zusammen.datatypes.item.Info;
-import com.amdocs.zusammen.plugin.statestore.cassandra.dao.types.ElementEntityContext;
-import com.amdocs.zusammen.sdk.collaboration.types.CollaborationElement;
-import org.openecomp.core.migration.MigrationMain;
-import org.openecomp.core.migration.store.ElementHandler;
-import org.openecomp.sdc.logging.api.Logger;
-import org.openecomp.sdc.logging.api.LoggerFactory;
-import org.openecomp.sdc.vendorsoftwareproduct.dao.impl.zusammen.StructureElement;
-import org.openecomp.sdc.vendorsoftwareproduct.dao.type.ComponentMonitoringUploadEntity;
-
-import java.util.HashSet;
-import java.util.List;
-import java.util.Set;
-
-public class MibConvertor {
-  private static Logger logger = LoggerFactory.getLogger(MigrationMain.class);
-
-  private static Set<String> compMibLoaded = new HashSet<>();
-
-
-  public static CollaborationElement[] convertMibToElement(
-      ComponentMonitoringUploadEntity componentMonitoringUploadEntity) {
-    CollaborationElement[] elements;
-    List<String> mibNamespace = getMibNamespace(componentMonitoringUploadEntity);
-
-    int index = 0;
-    String mibsEntityId =
-        StructureElement.Mibs.name() + "_" + componentMonitoringUploadEntity.getComponentId();
-    if (compMibLoaded.contains(mibsEntityId)) {
-      elements = new CollaborationElement[1];
-    } else {
-      compMibLoaded.add(mibsEntityId);
-      elements = new CollaborationElement[2];
-      elements[index++] = ElementHandler.getElementEntity(
-          componentMonitoringUploadEntity.getVspId(),
-          componentMonitoringUploadEntity.getVersion().toString(), mibsEntityId, mibNamespace,
-          ElementHandler.getStructuralElementInfo(StructureElement.Mibs.name()), null, null, null);
-    }
-
-    mibNamespace.add(mibsEntityId);
-    elements[index] = ElementHandler.getElementEntity(
-        componentMonitoringUploadEntity.getVspId(),
-        componentMonitoringUploadEntity.getVersion().toString(), componentMonitoringUploadEntity
-            .getId(), mibNamespace,
-        getMibInfo(componentMonitoringUploadEntity), null, null, componentMonitoringUploadEntity
-            .getArtifact().array());
-
-    return elements;
-  }
-
-  private static Info getMibInfo(
-      ComponentMonitoringUploadEntity componentMonitoringUploadEntity) {
-    Info info = new Info();
-    info.setName(componentMonitoringUploadEntity.getType().toString());
-    info.getProperties().put("name", componentMonitoringUploadEntity.getArtifactName());
-    return info;
-  }
-
-  private static List<String> getMibNamespace(
-      ComponentMonitoringUploadEntity componentMonitoringUploadEntity) {
-    return ElementHandler
-        .getElementPath(StructureElement.Components.name(), componentMonitoringUploadEntity
-        .getComponentId());
-  }
-
-  public static ElementEntityContext convertMibToElementContext(
-      ComponentMonitoringUploadEntity componentMonitoringUploadEntity) {
-
-    return new ElementEntityContext("GLOBAL_USER", new
-        ElementContext(componentMonitoringUploadEntity.getVspId(),
-        componentMonitoringUploadEntity
-            .getVersion().toString()));
-  }
-}
diff --git a/openecomp-be/tools/migration/1702_to_1707_zusammen/src/main/java/org/openecomp/core/migration/convertors/NetworkConvertor.java b/openecomp-be/tools/migration/1702_to_1707_zusammen/src/main/java/org/openecomp/core/migration/convertors/NetworkConvertor.java
deleted file mode 100644
index 3d4f157..0000000
--- a/openecomp-be/tools/migration/1702_to_1707_zusammen/src/main/java/org/openecomp/core/migration/convertors/NetworkConvertor.java
+++ /dev/null
@@ -1,91 +0,0 @@
-package org.openecomp.core.migration.convertors;
-
-import com.amdocs.zusammen.datatypes.item.ElementContext;
-import com.amdocs.zusammen.datatypes.item.Info;
-import com.amdocs.zusammen.plugin.statestore.cassandra.dao.types.ElementEntityContext;
-import com.amdocs.zusammen.sdk.collaboration.types.CollaborationElement;
-import org.openecomp.core.migration.MigrationMain;
-import org.openecomp.core.migration.store.ElementHandler;
-import org.openecomp.sdc.logging.api.Logger;
-import org.openecomp.sdc.logging.api.LoggerFactory;
-import org.openecomp.sdc.vendorsoftwareproduct.dao.impl.zusammen.ElementPropertyName;
-import org.openecomp.sdc.vendorsoftwareproduct.dao.impl.zusammen.ElementType;
-import org.openecomp.sdc.vendorsoftwareproduct.dao.impl.zusammen.StructureElement;
-import org.openecomp.sdc.vendorsoftwareproduct.dao.type.NetworkEntity;
-
-import java.util.HashSet;
-import java.util.List;
-import java.util.Set;
-
-/**
- * @author katyr
- * @since April 23, 2017
- */
-
-public class NetworkConvertor {
-
-  private static Set<String> networksLoaded = new HashSet<>();
-  private static Logger logger = LoggerFactory.getLogger(MigrationMain.class);
-
-
-
-  public static CollaborationElement[] convertNetworkToElement(NetworkEntity networkEntity) {
-
-    CollaborationElement[] networkElements;
-    List<String> networkNamespace = getNetworkNamespace();
-
-    int index = 0;
-    String networksEntityId = StructureElement.Networks.name();
-    String uniqueId = networkEntity.getVspId()+"_"+networkEntity.getVersion().toString();
-    if (networksLoaded.contains(uniqueId)) {
-//      printMessage(logger, "Networks structural elements exist for network " +
-//          networkEntity.getId());
-      networkElements = new CollaborationElement[1];
-    } else {
-//      printMessage(logger, "Creating Networks structural element for network " +
-//          networkEntity.getId());
-      networksLoaded.add(uniqueId);
-      networkElements = new CollaborationElement[2];
-      networkElements[index] = ElementHandler.getElementEntity(
-          networkEntity.getVspId(), networkEntity.getVersion().toString(), networksEntityId,
-          networkNamespace,
-          ElementHandler.getStructuralElementInfo(StructureElement.Networks.name()),
-          null,
-          null,
-          null);
-      index++;
-    }
-
-    networkNamespace.add(networksEntityId);
-
-    networkElements[index] = ElementHandler.getElementEntity(
-        networkEntity.getVspId(), networkEntity.getVersion().toString(), networkEntity.getId(),
-        networkNamespace,
-        getNetworkInfo(networkEntity),
-        null,
-        null,
-        networkEntity.getCompositionData().getBytes());
-
-
-    return networkElements;
-  }
-
-  private static Info getNetworkInfo(NetworkEntity networkEntity) {
-    Info info = new Info();
-    info.addProperty(ElementPropertyName.type.name(), ElementType.Network);
-    info.addProperty(ElementPropertyName.compositionData.name(), networkEntity.getCompositionData());
-
-    return info;
-  }
-
-  private static List<String> getNetworkNamespace() {
-    return ElementHandler.getElementPath();
-  }
-
-  public static ElementEntityContext convertNetworkToElementContext(NetworkEntity networkEntity) {
-
-    return new ElementEntityContext("GLOBAL_USER", new
-        ElementContext(networkEntity.getVspId(), networkEntity.getVersion().toString()));
-  }
-
-}
diff --git a/openecomp-be/tools/migration/1702_to_1707_zusammen/src/main/java/org/openecomp/core/migration/convertors/NicConvertor.java b/openecomp-be/tools/migration/1702_to_1707_zusammen/src/main/java/org/openecomp/core/migration/convertors/NicConvertor.java
deleted file mode 100644
index b17e68c..0000000
--- a/openecomp-be/tools/migration/1702_to_1707_zusammen/src/main/java/org/openecomp/core/migration/convertors/NicConvertor.java
+++ /dev/null
@@ -1,95 +0,0 @@
-package org.openecomp.core.migration.convertors;
-
-import com.amdocs.zusammen.datatypes.item.ElementContext;
-import com.amdocs.zusammen.datatypes.item.Info;
-import com.amdocs.zusammen.plugin.statestore.cassandra.dao.types.ElementEntityContext;
-import com.amdocs.zusammen.sdk.collaboration.types.CollaborationElement;
-import org.openecomp.core.migration.MigrationMain;
-import org.openecomp.core.migration.store.ElementHandler;
-import org.openecomp.sdc.logging.api.Logger;
-import org.openecomp.sdc.logging.api.LoggerFactory;
-import org.openecomp.sdc.vendorsoftwareproduct.dao.impl.zusammen.ElementPropertyName;
-import org.openecomp.sdc.vendorsoftwareproduct.dao.impl.zusammen.ElementType;
-import org.openecomp.sdc.vendorsoftwareproduct.dao.impl.zusammen.StructureElement;
-import org.openecomp.sdc.vendorsoftwareproduct.dao.type.NicEntity;
-
-import java.util.HashSet;
-import java.util.List;
-import java.util.Set;
-
-public class NicConvertor {
-
-
-  private static Set<String> compNicLoaded = new HashSet<>();
-  private static Logger logger = LoggerFactory.getLogger(MigrationMain.class);
-
-
-
-  public static CollaborationElement[] convertNicToElement(NicEntity nicEntity) {
-
-    CollaborationElement[] nicElements;
-    List<String> nicNamespace = getNicNamespace(nicEntity);
-
-    int index = 0;
-    String nicsEntityId = StructureElement.Nics.name() + "_" + nicEntity.getComponentId();
-    if (compNicLoaded.contains(nicsEntityId)) {
-//      printMessage(logger, "Nics structural element exists for nic " +
-//          nicEntity.getId());
-      nicElements = new CollaborationElement[2];
-    } else {
-//      printMessage(logger, "Creating Nics structural element for nic " +
-//          nicEntity.getId());
-      compNicLoaded.add(nicsEntityId);
-      nicElements = new CollaborationElement[3];
-      nicElements[index] = ElementHandler.getElementEntity(
-          nicEntity.getVspId(), nicEntity.getVersion().toString(), nicsEntityId,
-          nicNamespace,
-          ElementHandler.getStructuralElementInfo(StructureElement.Nics.name()),
-          null,
-          null,
-          null);
-      index++;
-    }
-
-    nicNamespace.add(nicsEntityId);
-    nicElements[index] = ElementHandler.getElementEntity(
-        nicEntity.getVspId(), nicEntity.getVersion().toString(), nicEntity.getId(),
-        nicNamespace,
-        getNicInfo(nicEntity),
-        null,
-        null,
-        nicEntity.getCompositionData().getBytes());
-    index++;
-
-    nicNamespace.add(nicEntity.getId());
-    nicElements[index] = ElementHandler.getElementEntity(
-        nicEntity.getVspId(), nicEntity.getVersion().toString(),StructureElement.Questionnaire.name() + "_" + nicEntity.getId(),
-        nicNamespace,
-        ElementHandler.getStructuralElementInfo(StructureElement.Questionnaire.name()),
-        null,
-        null,
-        (nicEntity.getQuestionnaireData() != null) ? nicEntity.getQuestionnaireData().getBytes()
-            : null);
-    return nicElements;
-  }
-
-  private static Info getNicInfo(NicEntity nicEntity) {
-    Info info = new Info();
-    info.addProperty(ElementPropertyName.type.name(), ElementType.Nic);
-    info.addProperty(ElementPropertyName.compositionData.name(), nicEntity.getCompositionData());
-    return info;
-  }
-
-  private static List<String> getNicNamespace(NicEntity nicEntity) {
-    return ElementHandler.getElementPath(StructureElement.Components.name(), nicEntity
-        .getComponentId());
-  }
-
-  public static ElementEntityContext convertNicToElementContext(NicEntity nicEntity) {
-
-    return new ElementEntityContext("GLOBAL_USER", new
-        ElementContext(nicEntity.getVspId(), nicEntity.getVersion().toString()));
-  }
-
-
-}
diff --git a/openecomp-be/tools/migration/1702_to_1707_zusammen/src/main/java/org/openecomp/core/migration/convertors/OrchestrationTemplateCandidateConvertor.java b/openecomp-be/tools/migration/1702_to_1707_zusammen/src/main/java/org/openecomp/core/migration/convertors/OrchestrationTemplateCandidateConvertor.java
deleted file mode 100644
index e6ceb36..0000000
--- a/openecomp-be/tools/migration/1702_to_1707_zusammen/src/main/java/org/openecomp/core/migration/convertors/OrchestrationTemplateCandidateConvertor.java
+++ /dev/null
@@ -1,70 +0,0 @@
-package org.openecomp.core.migration.convertors;
-
-import com.amdocs.zusammen.datatypes.item.ElementContext;
-import com.amdocs.zusammen.plugin.statestore.cassandra.dao.types.ElementEntityContext;
-import com.amdocs.zusammen.sdk.collaboration.types.CollaborationElement;
-import org.openecomp.core.migration.MigrationMain;
-import org.openecomp.core.migration.store.ElementHandler;
-import org.openecomp.sdc.logging.api.Logger;
-import org.openecomp.sdc.logging.api.LoggerFactory;
-import org.openecomp.sdc.vendorsoftwareproduct.dao.impl.zusammen.StructureElement;
-import org.openecomp.sdc.vendorsoftwareproduct.dao.type.ComponentEntity;
-import org.openecomp.sdc.vendorsoftwareproduct.dao.type.OrchestrationTemplateCandidateDataEntity;
-
-import java.util.List;
-
-public class OrchestrationTemplateCandidateConvertor {
-
-
-
-
-  private static Logger logger = LoggerFactory.getLogger(MigrationMain.class);
-
-  public static CollaborationElement[] convertOrchestrationTemplateCandidateToElement(
-      OrchestrationTemplateCandidateDataEntity entity) {
-
-
-    CollaborationElement[] orchestrationTemplateCandidateElements = new CollaborationElement[2];
-    List<String> orchestrationTemplateCandidateNamespace =
-        getOrchestrationTemplateCandidateNamespace();
-
-
-
-    orchestrationTemplateCandidateElements[0] = ElementHandler.getElementEntity(
-        entity.getId(), entity.getVersion().toString(), StructureElement.OrchestrationTemplateCandidate.name(),
-        orchestrationTemplateCandidateNamespace,
-        ElementHandler.getStructuralElementInfo(StructureElement.OrchestrationTemplateCandidate.name()),
-        null,
-        null,
-        entity.getFilesDataStructure().getBytes());
-
-    orchestrationTemplateCandidateNamespace.add(StructureElement.OrchestrationTemplateCandidate.name());
-    orchestrationTemplateCandidateElements[1] = ElementHandler.getElementEntity(
-        entity.getId(), entity.getVersion().toString(), StructureElement.OrchestrationTemplateCandidateContent.name(),
-        orchestrationTemplateCandidateNamespace,
-        ElementHandler.getStructuralElementInfo(StructureElement.OrchestrationTemplateCandidateContent.name()),
-        null,
-        null,
-        entity.getContentData().array());
-
-
-
-    return orchestrationTemplateCandidateElements;
-  }
-
-
-  private static List<String> getOrchestrationTemplateCandidateNamespace() {
-    return ElementHandler.getElementPath();
-  }
-
-  public static ElementEntityContext convertComponentToElementContext(
-      ComponentEntity componentEntity) {
-
-    return new ElementEntityContext("GLOBAL_USER", new
-        ElementContext(componentEntity.getVspId(), componentEntity.getVersion().toString()));
-  }
-
-
-
-
-}
diff --git a/openecomp-be/tools/migration/1702_to_1707_zusammen/src/main/java/org/openecomp/core/migration/convertors/ProcessConvertor.java b/openecomp-be/tools/migration/1702_to_1707_zusammen/src/main/java/org/openecomp/core/migration/convertors/ProcessConvertor.java
deleted file mode 100644
index 0a145c4..0000000
--- a/openecomp-be/tools/migration/1702_to_1707_zusammen/src/main/java/org/openecomp/core/migration/convertors/ProcessConvertor.java
+++ /dev/null
@@ -1,98 +0,0 @@
-package org.openecomp.core.migration.convertors;
-
-import com.amdocs.zusammen.datatypes.item.ElementContext;
-import com.amdocs.zusammen.datatypes.item.Info;
-import com.amdocs.zusammen.plugin.statestore.cassandra.dao.types.ElementEntityContext;
-import com.amdocs.zusammen.sdk.collaboration.types.CollaborationElement;
-import org.openecomp.core.migration.MigrationMain;
-import org.openecomp.core.migration.store.ElementHandler;
-import org.openecomp.sdc.logging.api.Logger;
-import org.openecomp.sdc.logging.api.LoggerFactory;
-import org.openecomp.sdc.vendorsoftwareproduct.dao.impl.zusammen.ElementType;
-import org.openecomp.sdc.vendorsoftwareproduct.dao.impl.zusammen.StructureElement;
-import org.openecomp.sdc.vendorsoftwareproduct.dao.type.ProcessEntity;
-
-import java.util.HashSet;
-import java.util.List;
-import java.util.Set;
-
-public class ProcessConvertor {
-  private static final String NAME = "name";
-  private static final String ELEMENT_TYPE = "type";
-  private static final String ARTIFACT_NAME = "artifactName";
-  private static final String DESCRIPTION = "description";
-  private static final String PROCESS_TYPE = "processType";
-  private static Set<String> compProcessesLoaded = new HashSet<>();
-
-  private static Logger logger = LoggerFactory.getLogger(MigrationMain.class);
-
-
-  public static CollaborationElement[] convertProcessToElement(ProcessEntity processEntity) {
-    CollaborationElement[] elements;
-    boolean isGeneralComponentId = isGeneralComponentId(processEntity);
-    List<String> processNamespace = getProcessNamespace(processEntity);
-    int index = 0;
-    String uniqueId = getUniqueId(processEntity, isGeneralComponentId);
-    String processesEntityId = isGeneralComponentId ? StructureElement.Processes.name() :
-        (StructureElement.Processes.name() + "_" +processEntity.getComponentId());
-    if (compProcessesLoaded.contains(uniqueId)) {
-      elements = new CollaborationElement[1];
-    } else {
-      compProcessesLoaded.add(uniqueId);
-      elements = new CollaborationElement[2];
-      elements[index++] = ElementHandler.getElementEntity(
-          processEntity.getVspId(), processEntity.getVersion().toString(), processesEntityId,
-          processNamespace,
-          ElementHandler.getStructuralElementInfo(StructureElement.Processes.name()), null, null, null);
-    }
-
-    processNamespace.add(processesEntityId);
-    elements[index] = ElementHandler.getElementEntity(
-        processEntity.getVspId(), processEntity.getVersion().toString(), processEntity.getId(),
-        processNamespace,
-        getProcessInfo(processEntity), null, null, processEntity.getArtifact() ==
-            null ? null : processEntity.getArtifact().array());
-
-    return elements;
-  }
-
-  private static String getUniqueId(ProcessEntity processEntity, boolean isGeneralComponentId) {
-    if (isGeneralComponentId) {
-      return processEntity.getVspId() + "_" + processEntity.getVersion().toString();
-    } else {
-      return StructureElement.Processes.name() + "_" + processEntity
-          .getComponentId();
-    }
-  }
-
-  private static Info getProcessInfo(ProcessEntity processEntity) {
-    Info info = new Info();
-    info.setName(processEntity.getName());
-    info.addProperty(NAME, processEntity.getName());
-    info.addProperty(ELEMENT_TYPE, ElementType.Process);
-    info.addProperty(ARTIFACT_NAME, processEntity.getArtifactName());
-    info.addProperty(DESCRIPTION, processEntity.getDescription());
-    info.addProperty(PROCESS_TYPE,
-        processEntity.getType() != null ? processEntity.getType().name() : null);
-    return info;
-  }
-
-  private static List<String> getProcessNamespace(ProcessEntity processEntity) {
-    if (isGeneralComponentId(processEntity)) {
-      return ElementHandler.getElementPath();
-    } else {
-      return ElementHandler
-          .getElementPath(StructureElement.Components.name(), processEntity.getComponentId());
-    }
-  }
-
-  private static boolean isGeneralComponentId(ProcessEntity processEntity) {
-    return processEntity.getComponentId().equals("General");
-  }
-
-  public static ElementEntityContext convertProcessToElementContext(ProcessEntity processEntity) {
-
-    return new ElementEntityContext("GLOBAL_USER", new
-        ElementContext(processEntity.getVspId(), processEntity.getVersion().toString()));
-  }
-}
diff --git a/openecomp-be/tools/migration/1702_to_1707_zusammen/src/main/java/org/openecomp/core/migration/convertors/VlmConvertor.java b/openecomp-be/tools/migration/1702_to_1707_zusammen/src/main/java/org/openecomp/core/migration/convertors/VlmConvertor.java
deleted file mode 100644
index 2e48374..0000000
--- a/openecomp-be/tools/migration/1702_to_1707_zusammen/src/main/java/org/openecomp/core/migration/convertors/VlmConvertor.java
+++ /dev/null
@@ -1,92 +0,0 @@
-package org.openecomp.core.migration.convertors;
-
-import com.amdocs.zusammen.datatypes.item.ElementContext;
-import com.amdocs.zusammen.datatypes.item.Info;
-import com.amdocs.zusammen.datatypes.item.ItemVersionData;
-import com.amdocs.zusammen.plugin.statestore.cassandra.dao.types.ElementEntityContext;
-import com.amdocs.zusammen.sdk.collaboration.types.CollaborationElement;
-import org.openecomp.core.migration.store.ElementHandler;
-import org.openecomp.sdc.vendorlicense.dao.types.VendorLicenseModelEntity;
-import org.openecomp.sdc.vendorsoftwareproduct.dao.impl.zusammen.StructureElement;
-
-import java.util.HashSet;
-import java.util.List;
-import java.util.Set;
-
-public class VlmConvertor {
-
-  private static Set<String> compNicLoaded = new HashSet<>();
-
-  public static CollaborationElement[] convertVlmToElement(VendorLicenseModelEntity vendorLicenseModel) {
-
-    CollaborationElement[] vspElements = new CollaborationElement[1];
-    List<String> vspNamespace = getVlmNamespace(vendorLicenseModel);
-
-
-    String vspEntityId = StructureElement.General.name();
-
-    vspElements[0] = ElementHandler.getElementEntity(
-        vendorLicenseModel.getId(), vendorLicenseModel.getVersion().toString(),
-        vspEntityId,
-        vspNamespace,
-        getVlmGeneralInfo(vendorLicenseModel),
-        null,
-        null,
-        null);
-    return vspElements;
-  }
-
-
-  public static ItemVersionData getItemVersionData(
-      VendorLicenseModelEntity vendorLicenseModel) {
-    ItemVersionData itemVersionData = new ItemVersionData();
-    Info info = new Info();
-    info.setName("main version");
-    itemVersionData.setInfo(info);
-    return itemVersionData;
-  }
-
-  public static Info getVlmInfo(VendorLicenseModelEntity vendorLicenseModel) {
-
-    Info info = new Info();
-    info.setName(vendorLicenseModel.getVendorName());
-    info.setDescription(vendorLicenseModel.getDescription());
-    info.addProperty("type", "vlm");
-    info.addProperty("version", vendorLicenseModel.getVersion());
-    info.addProperty("iconRef", vendorLicenseModel.getIconRef());
-    return info;
-  }
-
-  private static List<String> getVlmNamespace(VendorLicenseModelEntity vlmEntity) {
-    return ElementHandler.getElementPath("");
-  }
-
-  private static Info getVlmGeneralInfo(VendorLicenseModelEntity vendorLicenseModel) {
-
-
-    Info info = new Info();
-    info.setName(StructureElement.General.name());
-    info.addProperty(InfoPropertyName.type.name(), InfoPropertyName.vlm.name());
-    info.addProperty(InfoPropertyName.iconRef.name(), vendorLicenseModel.getIconRef());
-    info.addProperty(InfoPropertyName.name.name(), vendorLicenseModel.getVendorName());
-    info.addProperty(InfoPropertyName.description.name(), vendorLicenseModel.getDescription());
-    return info;
-  }
-
-  public static ElementEntityContext convertVlmToElementContext(VendorLicenseModelEntity
-                                                                   vendorLicenseModel) {
-
-    return new ElementEntityContext("GLOBAL_USER", new
-        ElementContext(vendorLicenseModel.getId(), vendorLicenseModel.getVersion().toString()));
-  }
-
-
-  private enum InfoPropertyName {
-    name,
-    description,
-    iconRef,
-    type,
-    vlm
-  }
-
-}
diff --git a/openecomp-be/tools/migration/1702_to_1707_zusammen/src/main/java/org/openecomp/core/migration/convertors/VspInformationConvertor.java b/openecomp-be/tools/migration/1702_to_1707_zusammen/src/main/java/org/openecomp/core/migration/convertors/VspInformationConvertor.java
deleted file mode 100644
index 59fba5f..0000000
--- a/openecomp-be/tools/migration/1702_to_1707_zusammen/src/main/java/org/openecomp/core/migration/convertors/VspInformationConvertor.java
+++ /dev/null
@@ -1,162 +0,0 @@
-package org.openecomp.core.migration.convertors;
-
-import com.amdocs.zusammen.datatypes.item.ElementContext;
-import com.amdocs.zusammen.datatypes.item.Info;
-import com.amdocs.zusammen.datatypes.item.ItemVersionData;
-import com.amdocs.zusammen.plugin.statestore.cassandra.dao.types.ElementEntityContext;
-import com.amdocs.zusammen.sdk.collaboration.types.CollaborationElement;
-import org.openecomp.core.migration.loaders.VspInformation;
-import org.openecomp.core.migration.store.ElementHandler;
-import org.openecomp.sdc.vendorlicense.dao.types.VendorLicenseModelEntity;
-import org.openecomp.sdc.vendorsoftwareproduct.dao.impl.zusammen.StructureElement;
-
-import java.util.List;
-
-public class VspInformationConvertor {
-
-  public static ItemVersionData getItemVersionData(
-      VspInformation vspInformation) {
-    Info info = new Info();
-    info.setName("main version");
-    ItemVersionData itemVersionData = new ItemVersionData();
-    itemVersionData.setInfo(info);
-    return itemVersionData;
-  }
-
-  public static Info getVspInfo(VspInformation vspInformation) {
-
-    Info info = new Info();
-    info.setName(vspInformation.getName());
-    info.setDescription(vspInformation.getDescription());
-    info.addProperty("type", "vsp");
-    addVspDetailsToInfo(info, vspInformation);
-    return info;
-  }
-
-  private static List<String> getVspNamespace(VendorLicenseModelEntity vlmEntity) {
-    return ElementHandler.getElementPath("");
-  }
-
-  private static void addVspDetailsToInfo(Info info, VspInformation vspInformation) {
-    info.addProperty("name", vspInformation.getName());
-    info.addProperty("description", vspInformation.getDescription());
-    info.addProperty("category", vspInformation.getCategory());
-    info.addProperty("subCategory", vspInformation.getSubCategory());
-    info.addProperty("vendorId", vspInformation.getVendorId());
-    info.addProperty("vendorName", vspInformation.getVendorName());
-    if (vspInformation.getVlmVersion() != null) {
-      info.addProperty("vendorVersion", vspInformation.getVlmVersion().toString());
-    }
-    info.addProperty("featureGroups", vspInformation.getFeatureGroups());
-    info.addProperty("licenseAgreement", vspInformation.getLicenseAgreement());
-    String oldVersion = vspInformation.getIsOldVersion() == null? "1702":"1610";
-    info.addProperty("oldVersion", oldVersion);
-  }
-
-  public static CollaborationElement[] convertVspToElement(VspInformation vspInformation) {
-
-    CollaborationElement[] vspElements;
-    if(vspInformation.getQuestionnaireData() == null){
-      vspElements = new CollaborationElement[4];
-    }else{
-      vspElements = new CollaborationElement[5];
-    }
-
-    int index=0;
-
-    List<String> vspNamespace = getVspNamespace(vspInformation);
-
-
-    String vspEntityId = StructureElement.General.name();
-
-    vspElements[index] = ElementHandler.getElementEntity(
-        vspInformation.getId(), vspInformation.getVersion().toString(),
-        vspEntityId,
-        vspNamespace,
-        getVspGeneralInfo(vspInformation),
-        null,
-        null,
-        null);
-
-    index++;
-    String vspOrchestrationTemplateEntityId = StructureElement.OrchestrationTemplate.name();
-    vspElements[index] = ElementHandler.getElementEntity(
-        vspInformation.getId(), vspInformation.getVersion().toString(),
-        vspOrchestrationTemplateEntityId,
-        vspNamespace,
-        ElementHandler.getStructuralElementInfo(vspOrchestrationTemplateEntityId),
-        null,
-        null,
-        null);
-
-    if(vspInformation.getQuestionnaireData()!= null) {
-      index++;
-      String vspQuestionnaireEntityId = StructureElement.Questionnaire.name();
-      vspElements[index] = ElementHandler.getElementEntity(
-          vspInformation.getId(), vspInformation.getVersion().toString(),
-          vspQuestionnaireEntityId,
-          vspNamespace,
-          ElementHandler.getStructuralElementInfo(vspQuestionnaireEntityId),
-          null,
-          null,
-          vspInformation.getQuestionnaireData().getBytes() != null ? vspInformation
-              .getQuestionnaireData().getBytes() : null);
-    }
-    vspNamespace.add(vspOrchestrationTemplateEntityId);
-    index++;
-    String vspOrchestrationTemplateValidationDataEntityId = StructureElement.OrchestrationTemplateValidationData.name();
-    vspElements[index] = ElementHandler.getElementEntity(
-        vspInformation.getId(), vspInformation.getVersion().toString(),
-        vspOrchestrationTemplateValidationDataEntityId,
-        vspNamespace,
-        ElementHandler.getStructuralElementInfo(vspOrchestrationTemplateValidationDataEntityId),
-        null,
-        null,
-        vspInformation.getValidationData()!= null?vspInformation.getValidationData().getBytes()
-            :null);
-    index++;
-    String vspOrchestrationTemplateContentEntityId = StructureElement.OrchestrationTemplateContent.name();
-    vspElements[index] = ElementHandler.getElementEntity(
-        vspInformation.getId(), vspInformation.getVersion().toString(),
-        vspOrchestrationTemplateContentEntityId,
-        vspNamespace,
-        ElementHandler.getStructuralElementInfo(vspOrchestrationTemplateContentEntityId),
-        null,
-        null,
-        vspInformation.getContentData()!= null?vspInformation.getContentData().array()
-            :null);
-
-    return vspElements;
-  }
-
-  private static Info getVspGeneralInfo(VspInformation vspInformation) {
-
-
-    Info info = new Info();
-    info.setName(StructureElement.General.name());
-    info.addProperty("name", vspInformation.getName());
-    info.addProperty("description", vspInformation.getDescription());
-    info.addProperty("category", vspInformation.getCategory());
-    info.addProperty("subCategory", vspInformation.getSubCategory());
-    info.addProperty("vendorId", vspInformation.getVendorId());
-    info.addProperty("vendorName", vspInformation.getVendorName());
-    if (vspInformation.getVlmVersion() != null) {
-      info.addProperty("vendorVersion", vspInformation.getVlmVersion().toString());
-    }
-    info.addProperty("featureGroups", vspInformation.getFeatureGroups());
-    info.addProperty("licenseAgreement", vspInformation.getLicenseAgreement());
-    String oldVersion = vspInformation.getIsOldVersion() == null? "1702":"1610";
-    info.addProperty("oldVersion", oldVersion);
-    return info;
-  }
-
-  private static List<String> getVspNamespace(VspInformation vspEntity) {
-    return ElementHandler.getElementPath("");
-  }
-
-  public static ElementEntityContext convertVspToElementContext(VspInformation vspEntity) {
-
-    return new ElementEntityContext("GLOBAL_USER", new
-        ElementContext(vspEntity.getId(), vspEntity.getVersion().toString()));
-  }
-}
diff --git a/openecomp-be/tools/migration/1702_to_1707_zusammen/src/main/java/org/openecomp/core/migration/convertors/VspServiceArtifactConvertor.java b/openecomp-be/tools/migration/1702_to_1707_zusammen/src/main/java/org/openecomp/core/migration/convertors/VspServiceArtifactConvertor.java
deleted file mode 100644
index 15b8ad7..0000000
--- a/openecomp-be/tools/migration/1702_to_1707_zusammen/src/main/java/org/openecomp/core/migration/convertors/VspServiceArtifactConvertor.java
+++ /dev/null
@@ -1,83 +0,0 @@
-package org.openecomp.core.migration.convertors;
-
-import com.amdocs.zusammen.datatypes.item.ElementContext;
-import com.amdocs.zusammen.datatypes.item.Info;
-import com.amdocs.zusammen.plugin.statestore.cassandra.dao.types.ElementEntityContext;
-import com.amdocs.zusammen.sdk.collaboration.types.CollaborationElement;
-import org.openecomp.core.migration.store.ElementHandler;
-import org.openecomp.core.model.types.ServiceArtifact;
-import org.openecomp.core.utilities.file.FileUtils;
-import org.openecomp.sdc.model.impl.zusammen.StructureElement;
-
-import java.util.HashSet;
-import java.util.List;
-import java.util.Set;
-
-/**
- * @author katyr
- * @since April 23, 2017
- */
-
-public class VspServiceArtifactConvertor 
-{
-    private static Set<String> serviceArtifactsLoaded = new HashSet<>();
- 
-
-
-  public static CollaborationElement[] convertServiceArtifactToElement(ServiceArtifact serviceArtifact) {
-
-    CollaborationElement[] serviceArtifactElements;
-    List<String> serviceArtifactNamespace = getServiceArtifactNamespace();
-
-    int index = 0;
-    String serviceArtifactsEntityId = StructureElement.Artifacts.name();
-    String uniqueId = serviceArtifact.getVspId()+"_"+serviceArtifact.getVersion().toString();
-    if (serviceArtifactsLoaded.contains(uniqueId)) {
-      serviceArtifactElements = new CollaborationElement[1];
-    } else {
-      serviceArtifactsLoaded.add(uniqueId);
-      serviceArtifactElements = new CollaborationElement[2];
-      serviceArtifactElements[index] = ElementHandler.getElementEntity(
-          serviceArtifact.getVspId(), serviceArtifact.getVersion().toString(), serviceArtifactsEntityId,
-          serviceArtifactNamespace,
-          ElementHandler.getStructuralElementInfo(StructureElement.Artifacts.name()),
-          null,
-          null,
-          null);
-      index++;
-    }
-
-    serviceArtifactNamespace.add(serviceArtifactsEntityId);
-    String elementId = serviceArtifact.getVspId()+"_"+serviceArtifact.getVersion().toString()
-        +"_"+serviceArtifact.getName();
-    serviceArtifactElements[index] = ElementHandler.getElementEntity(
-        serviceArtifact.getVspId(), serviceArtifact.getVersion().toString(), elementId,
-        serviceArtifactNamespace,
-        getServiceArtifactInfo(serviceArtifact),
-        null,
-        null,
-        FileUtils.toByteArray(serviceArtifact.getContent()));
-
-    return serviceArtifactElements;
-  }
-
-  private static Info getServiceArtifactInfo(ServiceArtifact serviceArtifactEntity) {
-    Info info = new Info();
-    info.setName(serviceArtifactEntity.getName());
-    info.addProperty("type", org.openecomp.sdc.model.impl.zusammen.ElementType.Artifact.name());
-
-    return info;
-  }
-
-  private static List<String> getServiceArtifactNamespace() {
-    return ElementHandler.getElementPath(StructureElement.ServiceModel.name());
-  }
-
-  public static ElementEntityContext convertServiceArtifactToElementContext(ServiceArtifact
-                                                                                serviceArtifactEntity) {
-
-    return new ElementEntityContext("GLOBAL_USER", new
-        ElementContext(serviceArtifactEntity.getVspId(), serviceArtifactEntity.getVersion().toString()));
-  }
-
-}
diff --git a/openecomp-be/tools/migration/1702_to_1707_zusammen/src/main/java/org/openecomp/core/migration/convertors/VspServiceTemplateConvertor.java b/openecomp-be/tools/migration/1702_to_1707_zusammen/src/main/java/org/openecomp/core/migration/convertors/VspServiceTemplateConvertor.java
deleted file mode 100644
index a767246..0000000
--- a/openecomp-be/tools/migration/1702_to_1707_zusammen/src/main/java/org/openecomp/core/migration/convertors/VspServiceTemplateConvertor.java
+++ /dev/null
@@ -1,100 +0,0 @@
-package org.openecomp.core.migration.convertors;
-
-import com.amdocs.zusammen.datatypes.item.ElementContext;
-import com.amdocs.zusammen.datatypes.item.Info;
-import com.amdocs.zusammen.plugin.statestore.cassandra.dao.types.ElementEntityContext;
-import com.amdocs.zusammen.sdk.collaboration.types.CollaborationElement;
-import org.openecomp.core.migration.store.ElementHandler;
-import org.openecomp.core.model.types.ServiceTemplate;
-import org.openecomp.core.utilities.file.FileUtils;
-import org.openecomp.sdc.model.impl.zusammen.ElementType;
-import org.openecomp.sdc.model.impl.zusammen.StructureElement;
-
-import java.util.HashSet;
-import java.util.List;
-import java.util.Set;
-
-/**
- * @author katyr
- * @since April 23, 2017
- */
-
-public class VspServiceTemplateConvertor 
-{
-    private static Set<String> serviceTemplatesLoaded = new HashSet<>();
- 
-
-
-  public static CollaborationElement[] convertServiceTemplateToElement(ServiceTemplate serviceTemplate) {
-
-    CollaborationElement[] serviceTemplateElements;
-    List<String> serviceTemplateNamespace = getServiceTemplateNamespace();
-
-    int index = 0;
-    String serviceTemplatesEntityId = StructureElement.Templates.name();
-    String uniqueId = serviceTemplate.getVspId()+"_"+serviceTemplate.getVersion().toString();
-    if (serviceTemplatesLoaded.contains(uniqueId)) {
-      serviceTemplateElements = new CollaborationElement[1];
-    } else {
-      serviceTemplatesLoaded.add(uniqueId);
-      String vspServiceModelEntityId = StructureElement.ServiceModel.name();
-
-      serviceTemplateElements = new CollaborationElement[3];
-      serviceTemplateElements[index] = ElementHandler.getElementEntity(
-          serviceTemplate.getVspId(),
-          serviceTemplate.getVersion().toString(),
-          vspServiceModelEntityId,
-          serviceTemplateNamespace,
-          ElementHandler.getServiceModelElementInfo(vspServiceModelEntityId,serviceTemplate),
-          null,
-          null,
-          null);
-     index++;
-      serviceTemplateNamespace.add(vspServiceModelEntityId);
-      serviceTemplateElements[index] = ElementHandler.getElementEntity(
-          serviceTemplate.getVspId(), serviceTemplate.getVersion().toString(), serviceTemplatesEntityId,
-          serviceTemplateNamespace,
-          ElementHandler.getStructuralElementInfo(StructureElement.Templates.name()),
-          null,
-          null,
-          null);
-      index++;
-    }
-
-    serviceTemplateNamespace.add(serviceTemplatesEntityId);
-    String elementId = serviceTemplate.getVspId()+"_"+serviceTemplate.getVersion().toString()
-        +"_"+serviceTemplate.getName();
-    serviceTemplateElements[index] = ElementHandler.getElementEntity(
-        serviceTemplate.getVspId(), serviceTemplate.getVersion().toString(), elementId,
-        serviceTemplateNamespace,
-        getServiceTemplateInfo(serviceTemplate),
-        null,
-        null,
-        FileUtils.toByteArray(serviceTemplate.getContent()));
-
-    return serviceTemplateElements;
-  }
-
-  private static Info getServiceTemplateInfo(ServiceTemplate serviceTemplateEntity) {
-    Info info = new Info();
-    info.setName(serviceTemplateEntity.getName());
-    info.addProperty("type", ElementType.Servicetemplate.name());
-    info.addProperty("base", serviceTemplateEntity.getBaseName());
-
-
-
-    return info;
-  }
-
-  private static List<String> getServiceTemplateNamespace() {
-    return ElementHandler.getElementPath();
-  }
-
-  public static ElementEntityContext convertServiceTemplateToElementContext(ServiceTemplate
-                                                                                serviceTemplateEntity) {
-
-    return new ElementEntityContext("GLOBAL_USER", new
-        ElementContext(serviceTemplateEntity.getVspId(), serviceTemplateEntity.getVersion().toString()));
-  }
-
-}
diff --git a/openecomp-be/tools/migration/1702_to_1707_zusammen/src/main/java/org/openecomp/core/migration/loaders/ComponentCassandraLoader.java b/openecomp-be/tools/migration/1702_to_1707_zusammen/src/main/java/org/openecomp/core/migration/loaders/ComponentCassandraLoader.java
deleted file mode 100644
index 3e00f9d..0000000
--- a/openecomp-be/tools/migration/1702_to_1707_zusammen/src/main/java/org/openecomp/core/migration/loaders/ComponentCassandraLoader.java
+++ /dev/null
@@ -1,55 +0,0 @@
-/*-
- * ============LICENSE_START=======================================================
- * SDC
- * ================================================================================
- * Copyright (C) 2017 AT&T Intellectual Property. All rights reserved.
- * ================================================================================
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- * 
- *      http://www.apache.org/licenses/LICENSE-2.0
- * 
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- * ============LICENSE_END=========================================================
- */
-
-package org.openecomp.core.migration.loaders;
-
-import com.datastax.driver.mapping.Result;
-import com.datastax.driver.mapping.annotations.Accessor;
-import com.datastax.driver.mapping.annotations.Query;
-import org.openecomp.core.nosqldb.api.NoSqlDb;
-import org.openecomp.core.nosqldb.factory.NoSqlDbFactory;
-import org.openecomp.sdc.vendorsoftwareproduct.dao.type.ComponentEntity;
-
-import java.util.Collection;
-
-public class ComponentCassandraLoader  {
-
-  private static final NoSqlDb noSqlDb = NoSqlDbFactory.getInstance().createInterface();
-  private static final ComponentAccessor accessor =
-      noSqlDb.getMappingManager().createAccessor(ComponentAccessor.class);
-
-
-  public Collection<ComponentEntity> list() {
-    return accessor.list().all();
-  }
-
-  @Accessor
-  interface ComponentAccessor {
-
-    @Query(
-        "select * from vsp_component ")
-    Result<ComponentEntity> list();
-
-
-  }
-
-
-
-}
diff --git a/openecomp-be/tools/migration/1702_to_1707_zusammen/src/main/java/org/openecomp/core/migration/loaders/EntitlementPoolCassandraLoader.java b/openecomp-be/tools/migration/1702_to_1707_zusammen/src/main/java/org/openecomp/core/migration/loaders/EntitlementPoolCassandraLoader.java
deleted file mode 100644
index c307bfc..0000000
--- a/openecomp-be/tools/migration/1702_to_1707_zusammen/src/main/java/org/openecomp/core/migration/loaders/EntitlementPoolCassandraLoader.java
+++ /dev/null
@@ -1,31 +0,0 @@
-package org.openecomp.core.migration.loaders;
-
-import com.datastax.driver.mapping.Result;
-import com.datastax.driver.mapping.annotations.Accessor;
-import com.datastax.driver.mapping.annotations.Query;
-import org.openecomp.core.nosqldb.api.NoSqlDb;
-import org.openecomp.core.nosqldb.factory.NoSqlDbFactory;
-import org.openecomp.sdc.vendorlicense.dao.types.EntitlementPoolEntity;
-
-import java.util.Collection;
-
-/**
- * Created by ayalaben on 4/24/2017
- */
-public class EntitlementPoolCassandraLoader {
-
-    private static final NoSqlDb noSqlDb = NoSqlDbFactory.getInstance().createInterface();
-
-    private static final EntitlementPoolCassandraLoader.EntitlementPoolAccessor accessor =
-            noSqlDb.getMappingManager().createAccessor(EntitlementPoolCassandraLoader.EntitlementPoolAccessor.class);
-
-    public Collection<EntitlementPoolEntity> list() {
-        return accessor.list().all();
-    }
-
-    @Accessor
-    interface EntitlementPoolAccessor {
-        @Query("select * from entitlement_pool ")
-        Result<EntitlementPoolEntity> list();
-    }
-}
diff --git a/openecomp-be/tools/migration/1702_to_1707_zusammen/src/main/java/org/openecomp/core/migration/loaders/FeatureGroupCassandraLoader.java b/openecomp-be/tools/migration/1702_to_1707_zusammen/src/main/java/org/openecomp/core/migration/loaders/FeatureGroupCassandraLoader.java
deleted file mode 100644
index 0c7627f..0000000
--- a/openecomp-be/tools/migration/1702_to_1707_zusammen/src/main/java/org/openecomp/core/migration/loaders/FeatureGroupCassandraLoader.java
+++ /dev/null
@@ -1,30 +0,0 @@
-package org.openecomp.core.migration.loaders;
-
-import com.datastax.driver.mapping.Result;
-import com.datastax.driver.mapping.annotations.Accessor;
-import com.datastax.driver.mapping.annotations.Query;
-import org.openecomp.core.nosqldb.api.NoSqlDb;
-import org.openecomp.core.nosqldb.factory.NoSqlDbFactory;
-import org.openecomp.sdc.vendorlicense.dao.types.FeatureGroupEntity;
-
-import java.util.Collection;
-
-/**
- * Created by ayalaben on 4/25/2017.
- */
-public class FeatureGroupCassandraLoader {
-
-    private static final NoSqlDb noSqlDb = NoSqlDbFactory.getInstance().createInterface();
-    private static final FeatureGroupCassandraLoader.FGAccessor accessor =
-            noSqlDb.getMappingManager().createAccessor(FeatureGroupCassandraLoader.FGAccessor.class);
-
-    public Collection<FeatureGroupEntity> list() {
-        return accessor.getAll().all();
-    }
-
-    @Accessor
-    interface FGAccessor {
-        @Query("SELECT * FROM feature_group")
-        Result<FeatureGroupEntity> getAll();
-    }
-}
diff --git a/openecomp-be/tools/migration/1702_to_1707_zusammen/src/main/java/org/openecomp/core/migration/loaders/LKGCassandraLoader.java b/openecomp-be/tools/migration/1702_to_1707_zusammen/src/main/java/org/openecomp/core/migration/loaders/LKGCassandraLoader.java
deleted file mode 100644
index 891a69e..0000000
--- a/openecomp-be/tools/migration/1702_to_1707_zusammen/src/main/java/org/openecomp/core/migration/loaders/LKGCassandraLoader.java
+++ /dev/null
@@ -1,31 +0,0 @@
-package org.openecomp.core.migration.loaders;
-
-import com.datastax.driver.mapping.Result;
-import com.datastax.driver.mapping.annotations.Accessor;
-import com.datastax.driver.mapping.annotations.Query;
-import org.openecomp.core.nosqldb.api.NoSqlDb;
-import org.openecomp.core.nosqldb.factory.NoSqlDbFactory;
-import org.openecomp.sdc.vendorlicense.dao.types.LicenseKeyGroupEntity;
-
-import java.util.Collection;
-
-/**
- * Created by ayalaben on 4/24/2017
- */
-public class LKGCassandraLoader {
-
-    private static final NoSqlDb noSqlDb = NoSqlDbFactory.getInstance().createInterface();
-    private static final LKGCassandraLoader.LKGAccessor accessor =
-            noSqlDb.getMappingManager().createAccessor(LKGCassandraLoader.LKGAccessor.class);
-
-    public Collection<LicenseKeyGroupEntity> list() {
-        return accessor.getAll().all();
-    }
-
-    @Accessor
-    interface LKGAccessor {
-        @Query("SELECT * FROM license_key_group")
-        Result<LicenseKeyGroupEntity> getAll();
-
-    }
-}
diff --git a/openecomp-be/tools/migration/1702_to_1707_zusammen/src/main/java/org/openecomp/core/migration/loaders/LicenseAgreementCassandraLoader.java b/openecomp-be/tools/migration/1702_to_1707_zusammen/src/main/java/org/openecomp/core/migration/loaders/LicenseAgreementCassandraLoader.java
deleted file mode 100644
index ca44209..0000000
--- a/openecomp-be/tools/migration/1702_to_1707_zusammen/src/main/java/org/openecomp/core/migration/loaders/LicenseAgreementCassandraLoader.java
+++ /dev/null
@@ -1,31 +0,0 @@
-package org.openecomp.core.migration.loaders;
-
-import com.datastax.driver.mapping.Result;
-import com.datastax.driver.mapping.annotations.Accessor;
-import com.datastax.driver.mapping.annotations.Query;
-import org.openecomp.core.nosqldb.api.NoSqlDb;
-import org.openecomp.core.nosqldb.factory.NoSqlDbFactory;
-import org.openecomp.sdc.vendorlicense.dao.types.LicenseAgreementEntity;
-
-import java.util.Collection;
-
-/**
- * Created by ayalaben on 4/25/2017.
- */
-public class LicenseAgreementCassandraLoader {
-
-    private static final NoSqlDb noSqlDb = NoSqlDbFactory.getInstance().createInterface();
-    private static final LicenseAgreementCassandraLoader.LicenseAgreementAccessor accessor =
-            noSqlDb.getMappingManager().createAccessor(LicenseAgreementCassandraLoader.LicenseAgreementAccessor.class);
-
-    public Collection<LicenseAgreementEntity> list() {
-        return accessor.getAll().all();
-    }
-
-    @Accessor
-    interface LicenseAgreementAccessor {
-        @Query("SELECT * FROM license_agreement")
-        Result<LicenseAgreementEntity> getAll();
-
-    }
-}
diff --git a/openecomp-be/tools/migration/1702_to_1707_zusammen/src/main/java/org/openecomp/core/migration/loaders/MibCassandraLoader.java b/openecomp-be/tools/migration/1702_to_1707_zusammen/src/main/java/org/openecomp/core/migration/loaders/MibCassandraLoader.java
deleted file mode 100644
index b93033c..0000000
--- a/openecomp-be/tools/migration/1702_to_1707_zusammen/src/main/java/org/openecomp/core/migration/loaders/MibCassandraLoader.java
+++ /dev/null
@@ -1,55 +0,0 @@
-/*-
- * ============LICENSE_START=======================================================
- * SDC
- * ================================================================================
- * Copyright (C) 2017 AT&T Intellectual Property. All rights reserved.
- * ================================================================================
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- * 
- *      http://www.apache.org/licenses/LICENSE-2.0
- * 
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- * ============LICENSE_END=========================================================
- */
-
-package org.openecomp.core.migration.loaders;
-
-import com.datastax.driver.mapping.Result;
-import com.datastax.driver.mapping.annotations.Accessor;
-import com.datastax.driver.mapping.annotations.Query;
-import org.openecomp.core.nosqldb.api.NoSqlDb;
-import org.openecomp.core.nosqldb.factory.NoSqlDbFactory;
-import org.openecomp.sdc.vendorsoftwareproduct.dao.type.ComponentMonitoringUploadEntity;
-
-import java.util.Collection;
-
-public class MibCassandraLoader {
-
-  private static final NoSqlDb noSqlDb = NoSqlDbFactory.getInstance().createInterface();
-  private static final MibAccessor accessor =
-      noSqlDb.getMappingManager().createAccessor(MibAccessor.class);
-
-
-  public Collection<ComponentMonitoringUploadEntity> list() {
-    return accessor.list().all();
-  }
-
-  @Accessor
-  interface MibAccessor {
-
-    @Query(
-        "select * from vsp_component_artifact")
-    Result<ComponentMonitoringUploadEntity> list();
-
-
-  }
-
-
-
-}
diff --git a/openecomp-be/tools/migration/1702_to_1707_zusammen/src/main/java/org/openecomp/core/migration/loaders/NetworkCassandraLoader.java b/openecomp-be/tools/migration/1702_to_1707_zusammen/src/main/java/org/openecomp/core/migration/loaders/NetworkCassandraLoader.java
deleted file mode 100644
index 7ce93bc..0000000
--- a/openecomp-be/tools/migration/1702_to_1707_zusammen/src/main/java/org/openecomp/core/migration/loaders/NetworkCassandraLoader.java
+++ /dev/null
@@ -1,35 +0,0 @@
-package org.openecomp.core.migration.loaders;
-
-import com.datastax.driver.mapping.Result;
-import com.datastax.driver.mapping.annotations.Accessor;
-import com.datastax.driver.mapping.annotations.Query;
-import org.openecomp.core.nosqldb.api.NoSqlDb;
-import org.openecomp.core.nosqldb.factory.NoSqlDbFactory;
-import org.openecomp.sdc.vendorsoftwareproduct.dao.type.NetworkEntity;
-
-import java.util.Collection;
-
-/**
- * @author katyr
- * @since April 23, 2017
- */
-
-public class NetworkCassandraLoader {
-
-  private static final NoSqlDb noSqlDb = NoSqlDbFactory.getInstance().createInterface();
-  private static final NetworkCassandraLoader.NetworkAccessor accessor =
-      noSqlDb.getMappingManager().createAccessor(NetworkCassandraLoader.NetworkAccessor.class);
-
-
-  public Collection<NetworkEntity> list() {
-    return accessor.list().all();
-  }
-
-  @Accessor
-  interface NetworkAccessor {
-
-    @Query(
-        "select * from vsp_network ")
-    Result<NetworkEntity> list();
-  }
-}
diff --git a/openecomp-be/tools/migration/1702_to_1707_zusammen/src/main/java/org/openecomp/core/migration/loaders/NicCassandraLoader.java b/openecomp-be/tools/migration/1702_to_1707_zusammen/src/main/java/org/openecomp/core/migration/loaders/NicCassandraLoader.java
deleted file mode 100644
index fea9c08..0000000
--- a/openecomp-be/tools/migration/1702_to_1707_zusammen/src/main/java/org/openecomp/core/migration/loaders/NicCassandraLoader.java
+++ /dev/null
@@ -1,63 +0,0 @@
-/*-
- * ============LICENSE_START=======================================================
- * SDC
- * ================================================================================
- * Copyright (C) 2017 AT&T Intellectual Property. All rights reserved.
- * ================================================================================
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- * 
- *      http://www.apache.org/licenses/LICENSE-2.0
- * 
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- * ============LICENSE_END=========================================================
- */
-
-package org.openecomp.core.migration.loaders;
-
-import com.datastax.driver.mapping.Mapper;
-import com.datastax.driver.mapping.Result;
-import com.datastax.driver.mapping.UDTMapper;
-import com.datastax.driver.mapping.annotations.Accessor;
-import com.datastax.driver.mapping.annotations.Query;
-import org.openecomp.core.nosqldb.api.NoSqlDb;
-import org.openecomp.core.nosqldb.factory.NoSqlDbFactory;
-import org.openecomp.sdc.vendorsoftwareproduct.dao.type.NicEntity;
-import org.openecomp.sdc.versioning.dao.types.Version;
-
-import java.util.Collection;
-
-public class NicCassandraLoader {
-
-  private static final NoSqlDb noSqlDb = NoSqlDbFactory.getInstance().createInterface();
-  private static final Mapper<NicEntity> mapper =
-      noSqlDb.getMappingManager().mapper(NicEntity.class);
-  private static final NicAccessor accessor =
-      noSqlDb.getMappingManager().createAccessor(NicAccessor.class);
-  private static final UDTMapper<Version> versionMapper =
-      noSqlDb.getMappingManager().udtMapper(Version.class);
-
-
-  public Collection<NicEntity> list() {
-    return accessor.list().all();
-  }
-
-  @Accessor
-  interface NicAccessor {
-
-    @Query(
-        "select vsp_id, version, component_id, nic_id, composition_data,questionnaire_data "
-            + " from vsp_component_nic ")
-    Result<NicEntity> list();
-
-
-  }
-
-
-
-}
diff --git a/openecomp-be/tools/migration/1702_to_1707_zusammen/src/main/java/org/openecomp/core/migration/loaders/OrchestrationTemplateCandidateCassandraLoader.java b/openecomp-be/tools/migration/1702_to_1707_zusammen/src/main/java/org/openecomp/core/migration/loaders/OrchestrationTemplateCandidateCassandraLoader.java
deleted file mode 100644
index 09da455..0000000
--- a/openecomp-be/tools/migration/1702_to_1707_zusammen/src/main/java/org/openecomp/core/migration/loaders/OrchestrationTemplateCandidateCassandraLoader.java
+++ /dev/null
@@ -1,55 +0,0 @@
-/*-
- * ============LICENSE_START=======================================================
- * SDC
- * ================================================================================
- * Copyright (C) 2017 AT&T Intellectual Property. All rights reserved.
- * ================================================================================
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- * 
- *      http://www.apache.org/licenses/LICENSE-2.0
- * 
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- * ============LICENSE_END=========================================================
- */
-
-package org.openecomp.core.migration.loaders;
-
-import com.datastax.driver.mapping.Result;
-import com.datastax.driver.mapping.annotations.Accessor;
-import com.datastax.driver.mapping.annotations.Query;
-import org.openecomp.core.nosqldb.api.NoSqlDb;
-import org.openecomp.core.nosqldb.factory.NoSqlDbFactory;
-import org.openecomp.sdc.vendorsoftwareproduct.dao.type.OrchestrationTemplateCandidateDataEntity;
-
-import java.util.Collection;
-
-public class OrchestrationTemplateCandidateCassandraLoader {
-
-  private static final NoSqlDb noSqlDb = NoSqlDbFactory.getInstance().createInterface();
-  private static final OrchestrationTemplateCandidateAccessor accessor =
-      noSqlDb.getMappingManager().createAccessor(OrchestrationTemplateCandidateAccessor.class);
-
-
-  public Collection<OrchestrationTemplateCandidateDataEntity> list() {
-    return accessor.list().all();
-  }
-
-  @Accessor
-  interface OrchestrationTemplateCandidateAccessor {
-
-    @Query(
-        "select * from vsp_orchestration_template_candidate ")
-    Result<OrchestrationTemplateCandidateDataEntity> list();
-
-
-  }
-
-
-
-}
diff --git a/openecomp-be/tools/migration/1702_to_1707_zusammen/src/main/java/org/openecomp/core/migration/loaders/ProcessCassandraLoader.java b/openecomp-be/tools/migration/1702_to_1707_zusammen/src/main/java/org/openecomp/core/migration/loaders/ProcessCassandraLoader.java
deleted file mode 100644
index 6672af5..0000000
--- a/openecomp-be/tools/migration/1702_to_1707_zusammen/src/main/java/org/openecomp/core/migration/loaders/ProcessCassandraLoader.java
+++ /dev/null
@@ -1,55 +0,0 @@
-/*-
- * ============LICENSE_START=======================================================
- * SDC
- * ================================================================================
- * Copyright (C) 2017 AT&T Intellectual Property. All rights reserved.
- * ================================================================================
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- * 
- *      http://www.apache.org/licenses/LICENSE-2.0
- * 
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- * ============LICENSE_END=========================================================
- */
-
-package org.openecomp.core.migration.loaders;
-
-import com.datastax.driver.mapping.Result;
-import com.datastax.driver.mapping.annotations.Accessor;
-import com.datastax.driver.mapping.annotations.Query;
-import org.openecomp.core.nosqldb.api.NoSqlDb;
-import org.openecomp.core.nosqldb.factory.NoSqlDbFactory;
-import org.openecomp.sdc.vendorsoftwareproduct.dao.type.ProcessEntity;
-
-import java.util.Collection;
-
-public class ProcessCassandraLoader {
-
-  private static final NoSqlDb noSqlDb = NoSqlDbFactory.getInstance().createInterface();
-  private static final ProcessAccessor accessor =
-      noSqlDb.getMappingManager().createAccessor(ProcessAccessor.class);
-
-
-  public Collection<ProcessEntity> list() {
-    return accessor.list().all();
-  }
-
-  @Accessor
-  interface ProcessAccessor {
-
-    @Query(
-        "select * from vsp_process")
-    Result<ProcessEntity> list();
-
-
-  }
-
-
-
-}
diff --git a/openecomp-be/tools/migration/1702_to_1707_zusammen/src/main/java/org/openecomp/core/migration/loaders/ServiceArtifactCassandraLoader.java b/openecomp-be/tools/migration/1702_to_1707_zusammen/src/main/java/org/openecomp/core/migration/loaders/ServiceArtifactCassandraLoader.java
deleted file mode 100644
index 5231662..0000000
--- a/openecomp-be/tools/migration/1702_to_1707_zusammen/src/main/java/org/openecomp/core/migration/loaders/ServiceArtifactCassandraLoader.java
+++ /dev/null
@@ -1,61 +0,0 @@
-/*-
- * ============LICENSE_START=======================================================
- * SDC
- * ================================================================================
- * Copyright (C) 2017 AT&T Intellectual Property. All rights reserved.
- * ================================================================================
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- * 
- *      http://www.apache.org/licenses/LICENSE-2.0
- * 
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- * ============LICENSE_END=========================================================
- */
-
-package org.openecomp.core.migration.loaders;
-
-import com.datastax.driver.mapping.Result;
-import com.datastax.driver.mapping.annotations.Accessor;
-import com.datastax.driver.mapping.annotations.Query;
-import org.openecomp.core.model.types.ServiceArtifact;
-import org.openecomp.core.model.types.ServiceArtifactEntity;
-import org.openecomp.core.nosqldb.api.NoSqlDb;
-import org.openecomp.core.nosqldb.factory.NoSqlDbFactory;
-
-import java.util.Collection;
-import java.util.List;
-import java.util.stream.Collectors;
-
-public class ServiceArtifactCassandraLoader {
-
-  private static final NoSqlDb noSqlDb = NoSqlDbFactory.getInstance().createInterface();
-  private static final VspServiceArtifactAccessor accessor =
-      noSqlDb.getMappingManager().createAccessor(
-          VspServiceArtifactAccessor.class);
-
-
-  public Collection<ServiceArtifact> list() {
-
-
-    List<ServiceArtifactEntity> entityList = accessor.listAll().all();
-
-    return entityList.stream().map(entity -> entity.getServiceArtifact())
-        .collect(Collectors.toList());
-  }
-
-  @Accessor
-  interface VspServiceArtifactAccessor {
-
-    @Query("SELECT * FROM vsp_service_artifact")
-    Result<ServiceArtifactEntity> listAll();
-
-
-  }
-
-}
diff --git a/openecomp-be/tools/migration/1702_to_1707_zusammen/src/main/java/org/openecomp/core/migration/loaders/ServiceTemplateCassandraLoader.java b/openecomp-be/tools/migration/1702_to_1707_zusammen/src/main/java/org/openecomp/core/migration/loaders/ServiceTemplateCassandraLoader.java
deleted file mode 100644
index f7e5853..0000000
--- a/openecomp-be/tools/migration/1702_to_1707_zusammen/src/main/java/org/openecomp/core/migration/loaders/ServiceTemplateCassandraLoader.java
+++ /dev/null
@@ -1,61 +0,0 @@
-/*-
- * ============LICENSE_START=======================================================
- * SDC
- * ================================================================================
- * Copyright (C) 2017 AT&T Intellectual Property. All rights reserved.
- * ================================================================================
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- * 
- *      http://www.apache.org/licenses/LICENSE-2.0
- * 
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- * ============LICENSE_END=========================================================
- */
-
-package org.openecomp.core.migration.loaders;
-
-import com.datastax.driver.mapping.Result;
-import com.datastax.driver.mapping.annotations.Accessor;
-import com.datastax.driver.mapping.annotations.Query;
-import org.openecomp.core.model.types.ServiceTemplate;
-import org.openecomp.core.model.types.ServiceTemplateEntity;
-import org.openecomp.core.nosqldb.api.NoSqlDb;
-import org.openecomp.core.nosqldb.factory.NoSqlDbFactory;
-
-import java.util.Collection;
-import java.util.List;
-import java.util.stream.Collectors;
-
-public class ServiceTemplateCassandraLoader {
-
-  private static final NoSqlDb noSqlDb = NoSqlDbFactory.getInstance().createInterface();
-  private static final VspServiceTemplateAccessor accessor =
-      noSqlDb.getMappingManager().createAccessor(
-          VspServiceTemplateAccessor.class);
-
-
-  public Collection<ServiceTemplate> list() {
-
-
-    List<ServiceTemplateEntity> entityList = accessor.listAll().all();
-
-    return entityList.stream().map(entity -> entity.getServiceTemplate())
-        .collect(Collectors.toList());
-  }
-
-  @Accessor
-  interface VspServiceTemplateAccessor {
-
-    @Query("SELECT * FROM vsp_service_template")
-    Result<ServiceTemplateEntity> listAll();
-
-
-  }
-
-}
diff --git a/openecomp-be/tools/migration/1702_to_1707_zusammen/src/main/java/org/openecomp/core/migration/loaders/VendorLicenseModelCassandraLoader.java b/openecomp-be/tools/migration/1702_to_1707_zusammen/src/main/java/org/openecomp/core/migration/loaders/VendorLicenseModelCassandraLoader.java
deleted file mode 100644
index c02cc1e..0000000
--- a/openecomp-be/tools/migration/1702_to_1707_zusammen/src/main/java/org/openecomp/core/migration/loaders/VendorLicenseModelCassandraLoader.java
+++ /dev/null
@@ -1,50 +0,0 @@
-/*-
- * ============LICENSE_START=======================================================
- * SDC
- * ================================================================================
- * Copyright (C) 2017 AT&T Intellectual Property. All rights reserved.
- * ================================================================================
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- * 
- *      http://www.apache.org/licenses/LICENSE-2.0
- * 
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- * ============LICENSE_END=========================================================
- */
-
-package org.openecomp.core.migration.loaders;
-
-import com.datastax.driver.mapping.Result;
-import com.datastax.driver.mapping.annotations.Accessor;
-import com.datastax.driver.mapping.annotations.Query;
-import org.openecomp.core.nosqldb.api.NoSqlDb;
-import org.openecomp.core.nosqldb.factory.NoSqlDbFactory;
-import org.openecomp.sdc.vendorlicense.dao.types.VendorLicenseModelEntity;
-
-import java.util.Collection;
-
-public class VendorLicenseModelCassandraLoader {
-
-  private static NoSqlDb noSqlDb = NoSqlDbFactory.getInstance().createInterface();
-  private static VendorLicenseModelAccessor accessor =
-      noSqlDb.getMappingManager().createAccessor(VendorLicenseModelAccessor.class);
-
-
-  public Collection<VendorLicenseModelEntity> list() {
-    return accessor.getAll().all();
-  }
-
-  @Accessor
-  interface VendorLicenseModelAccessor {
-
-    @Query("SELECT * FROM vendor_license_model")
-    Result<VendorLicenseModelEntity> getAll();
-
-  }
-}
diff --git a/openecomp-be/tools/migration/1702_to_1707_zusammen/src/main/java/org/openecomp/core/migration/loaders/VendorSoftwareProductInfoLoader.java b/openecomp-be/tools/migration/1702_to_1707_zusammen/src/main/java/org/openecomp/core/migration/loaders/VendorSoftwareProductInfoLoader.java
deleted file mode 100644
index 26fc23c..0000000
--- a/openecomp-be/tools/migration/1702_to_1707_zusammen/src/main/java/org/openecomp/core/migration/loaders/VendorSoftwareProductInfoLoader.java
+++ /dev/null
@@ -1,61 +0,0 @@
-/*-
- * ============LICENSE_START=======================================================
- * SDC
- * ================================================================================
- * Copyright (C) 2017 AT&T Intellectual Property. All rights reserved.
- * ================================================================================
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- * 
- *      http://www.apache.org/licenses/LICENSE-2.0
- * 
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- * ============LICENSE_END=========================================================
- */
-
-package org.openecomp.core.migration.loaders;
-
-import com.datastax.driver.mapping.Mapper;
-import com.datastax.driver.mapping.Result;
-import com.datastax.driver.mapping.UDTMapper;
-import com.datastax.driver.mapping.annotations.Accessor;
-import com.datastax.driver.mapping.annotations.Query;
-import org.openecomp.core.nosqldb.api.NoSqlDb;
-import org.openecomp.core.nosqldb.factory.NoSqlDbFactory;
-import org.openecomp.sdc.versioning.dao.types.Version;
-
-import java.util.Collection;
-
-public class VendorSoftwareProductInfoLoader {
-
-  private static final NoSqlDb noSqlDb = NoSqlDbFactory.getInstance().createInterface();
-  private static final Mapper<VspInformation> mapper =
-      noSqlDb.getMappingManager().mapper(VspInformation.class);
-  private static final VendorSoftwareProductInfoAccessor accessor =
-      noSqlDb.getMappingManager().createAccessor(VendorSoftwareProductInfoAccessor.class);
-  private static final UDTMapper<Version> versionMapper =
-      noSqlDb.getMappingManager().udtMapper(Version.class);
-
-
-  public Collection<VspInformation> list() {
-    return accessor.listAll().all();
-  }
-
-
-  @Accessor
-  interface VendorSoftwareProductInfoAccessor {
-
-    @Query(
-        "SELECT * " +
-            "FROM " +
-            "vsp_information")
-    Result<VspInformation> listAll();
-
-
-  }
-}
diff --git a/openecomp-be/tools/migration/1702_to_1707_zusammen/src/main/java/org/openecomp/core/migration/loaders/VersionInfoCassandraLoader.java b/openecomp-be/tools/migration/1702_to_1707_zusammen/src/main/java/org/openecomp/core/migration/loaders/VersionInfoCassandraLoader.java
deleted file mode 100644
index 725298b..0000000
--- a/openecomp-be/tools/migration/1702_to_1707_zusammen/src/main/java/org/openecomp/core/migration/loaders/VersionInfoCassandraLoader.java
+++ /dev/null
@@ -1,53 +0,0 @@
-/*-
- * ============LICENSE_START=======================================================
- * SDC
- * ================================================================================
- * Copyright (C) 2017 AT&T Intellectual Property. All rights reserved.
- * ================================================================================
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- * 
- *      http://www.apache.org/licenses/LICENSE-2.0
- * 
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- * ============LICENSE_END=========================================================
- */
-
-package org.openecomp.core.migration.loaders;
-
-import com.datastax.driver.mapping.Mapper;
-import com.datastax.driver.mapping.Result;
-import com.datastax.driver.mapping.annotations.Accessor;
-import com.datastax.driver.mapping.annotations.Query;
-import org.openecomp.core.nosqldb.api.NoSqlDb;
-import org.openecomp.core.nosqldb.factory.NoSqlDbFactory;
-import org.openecomp.sdc.versioning.dao.types.VersionInfoEntity;
-
-import java.util.Collection;
-
-public class VersionInfoCassandraLoader  {
-
-  private static NoSqlDb noSqlDb = NoSqlDbFactory.getInstance().createInterface();
-  private static Mapper<VersionInfoEntity> mapper =
-      noSqlDb.getMappingManager().mapper(VersionInfoEntity.class);
-  private static VersionInfoAccessor accessor =
-      noSqlDb.getMappingManager().createAccessor(VersionInfoAccessor.class);
-
-
-
-
-  public Collection<VersionInfoEntity> list() {
-    return accessor.getAll().all();
-  }
-
-  @Accessor
-  interface VersionInfoAccessor {
-    @Query("select * from version_info ")
-    Result<VersionInfoEntity> getAll();
-  }
-}
diff --git a/openecomp-be/tools/migration/1702_to_1707_zusammen/src/main/java/org/openecomp/core/migration/loaders/VspInformation.java b/openecomp-be/tools/migration/1702_to_1707_zusammen/src/main/java/org/openecomp/core/migration/loaders/VspInformation.java
deleted file mode 100644
index 2db1b09..0000000
--- a/openecomp-be/tools/migration/1702_to_1707_zusammen/src/main/java/org/openecomp/core/migration/loaders/VspInformation.java
+++ /dev/null
@@ -1,276 +0,0 @@
-/*-
- * ============LICENSE_START=======================================================
- * SDC
- * ================================================================================
- * Copyright (C) 2017 AT&T Intellectual Property. All rights reserved.
- * ================================================================================
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- * 
- *      http://www.apache.org/licenses/LICENSE-2.0
- * 
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- * ============LICENSE_END=========================================================
- */
-
-package org.openecomp.core.migration.loaders;
-
-import com.datastax.driver.mapping.annotations.Column;
-import com.datastax.driver.mapping.annotations.Computed;
-import com.datastax.driver.mapping.annotations.Frozen;
-import com.datastax.driver.mapping.annotations.PartitionKey;
-import com.datastax.driver.mapping.annotations.Table;
-import org.openecomp.core.utilities.json.JsonUtil;
-import org.openecomp.sdc.heat.datatypes.structure.ValidationStructureList;
-import org.openecomp.sdc.versioning.dao.types.Version;
-
-import java.nio.ByteBuffer;
-import java.util.List;
-
-@Table(keyspace = "dox", name = "vsp_information")
-public class VspInformation {
-  public static final String ENTITY_TYPE = "Vendor Software Product";
-
-  @PartitionKey
-  @Column(name = "vsp_id")
-  private String id;
-
-  @PartitionKey(value = 1)
-  @Frozen
-  private Version version;
-
-  private String name;
-  private String description;
-
-  private String category;
-
-  @Column(name = "sub_category")
-  private String subCategory;
-
-  private String icon;
-
-  @Column(name = "vendor_name")
-  private String vendorName;
-
-  @Column(name = "vendor_id")
-  private String vendorId;
-
-  @Column(name = "vlm_version")
-  @Frozen
-  private Version vlmVersion;
-
-  @Column(name = "license_agreement")
-  private String licenseAgreement;
-
-  @Column(name = "feature_groups")
-  private List<String> featureGroups;
-
-  @Column(name = "package_name")
-  private String packageName;
-
-  @Column(name = "package_version")
-  private String packageVersion;
-
-  @Column(name = "validation_data")
-  private String validationData;
-
-  @Column(name = "is_old_version")
-  private String isOldVersion;
-
-  @Column(name = "questionnaire_data")
-  private String questionnaireData;
-
-  @Column(name = "content_data")
-  private ByteBuffer contentData;
-
-
-  @Computed("writetime(name)")
-  private Long writetimeMicroSeconds;
-
-
-  public VspInformation() {
-  }
-
-  public VspInformation(String id, Version version) {
-    this.id = id;
-    this.version = version;
-  }
-
-
-  public String getId() {
-    return id;
-  }
-
-  public void setId(String id) {
-    this.id = id;
-  }
-
-
-  public String getName() {
-    return name;
-  }
-
-  public void setName(String name) {
-    this.name = name;
-  }
-
-  public String getDescription() {
-    return description;
-  }
-
-  public void setDescription(String description) {
-    this.description = description;
-  }
-
-  public String getCategory() {
-    return category;
-  }
-
-  public void setCategory(String category) {
-    this.category = category;
-  }
-
-  public String getSubCategory() {
-    return subCategory;
-  }
-
-  public void setSubCategory(String subCategory) {
-    this.subCategory = subCategory;
-  }
-
-  public String getIcon() {
-    return icon;
-  }
-
-  public void setIcon(String icon) {
-    this.icon = icon;
-  }
-
-  public String getVendorName() {
-    return vendorName;
-  }
-
-  public void setVendorName(String vendorName) {
-    this.vendorName = vendorName;
-  }
-
-  public String getVendorId() {
-    return vendorId;
-  }
-
-  public void setVendorId(String vendorId) {
-    this.vendorId = vendorId;
-  }
-
-  public Version getVlmVersion() {
-    return vlmVersion;
-  }
-
-  public void setVlmVersion(Version vlmVersion) {
-    this.vlmVersion = vlmVersion;
-  }
-
-  public String getLicenseAgreement() {
-    return licenseAgreement;
-  }
-
-  public void setLicenseAgreement(String licenseAgreement) {
-    this.licenseAgreement = licenseAgreement;
-  }
-
-  public List<String> getFeatureGroups() {
-    return featureGroups;
-  }
-
-  public void setFeatureGroups(List<String> featureGroups) {
-    this.featureGroups = featureGroups;
-  }
-
-  public String getPackageName() {
-    return packageName;
-  }
-
-  public void setPackageName(String packageName) {
-    this.packageName = packageName;
-  }
-
-  public String getPackageVersion() {
-    return packageVersion;
-  }
-
-  public void setPackageVersion(String packageVersion) {
-    this.packageVersion = packageVersion;
-  }
-
-  public String getValidationData() {
-    return validationData;
-  }
-
-  public void setValidationData(String validationData) {
-    this.validationData = validationData;
-  }
-
-  public ValidationStructureList getValidationDataStructure() {
-    return validationData == null ? null
-        : JsonUtil.json2Object(validationData, ValidationStructureList.class);
-  }
-
-  public void setValidationDataStructure(ValidationStructureList validationData) {
-    this.validationData = validationData == null ? null
-        : JsonUtil.object2Json(validationData);
-  }
-
-  public Long getWritetimeMicroSeconds() {
-    return this.writetimeMicroSeconds;
-  }
-
-  public void setWritetimeMicroSeconds(Long writetimeMicroSeconds) {
-    this.writetimeMicroSeconds = writetimeMicroSeconds;
-  }
-
-  public String getIsOldVersion() {
-    return this.isOldVersion;
-  }
-
-  public void setIsOldVersion(String oldVersion) {
-    this.isOldVersion = oldVersion;
-  }
-
-  public void setVersion(Version version) {
-    this.version = version;
-  }
-
-  public Version getVersion() {
-    return version;
-  }
-
-  public String getQuestionnaireData() {
-    return questionnaireData;
-  }
-
-  public void setQuestionnaireData(String questionnaireData) {
-    this.questionnaireData = questionnaireData;
-  }
-
-  public ByteBuffer getContentData() {
-    return contentData;
-  }
-
-  public void setContentData(ByteBuffer contentData) {
-    this.contentData = contentData;
-  }
-
-  @Override
-  public String toString() {
-    StringBuilder sb = new StringBuilder();
-    sb.append("Vsp id = ").append(this.id);
-    sb.append("Version = ").append(this.version);
-
-    return sb.toString();
-  }
-}
diff --git a/openecomp-be/tools/migration/1702_to_1707_zusammen/src/main/java/org/openecomp/core/migration/store/ElementHandler.java b/openecomp-be/tools/migration/1702_to_1707_zusammen/src/main/java/org/openecomp/core/migration/store/ElementHandler.java
deleted file mode 100644
index 548a8d9..0000000
--- a/openecomp-be/tools/migration/1702_to_1707_zusammen/src/main/java/org/openecomp/core/migration/store/ElementHandler.java
+++ /dev/null
@@ -1,136 +0,0 @@
-package org.openecomp.core.migration.store;
-
-import com.amdocs.zusammen.datatypes.Id;
-import com.amdocs.zusammen.datatypes.Namespace;
-import com.amdocs.zusammen.datatypes.SessionContext;
-import com.amdocs.zusammen.datatypes.item.Info;
-import com.amdocs.zusammen.datatypes.item.Relation;
-import com.amdocs.zusammen.plugin.statestore.cassandra.dao.types.ElementEntityContext;
-import com.amdocs.zusammen.sdk.collaboration.types.CollaborationElement;
-import org.openecomp.core.migration.MigrationMain;
-import org.openecomp.core.model.types.ServiceTemplate;
-import org.openecomp.core.zusammen.plugin.ZusammenPluginUtil;
-import org.openecomp.core.zusammen.plugin.dao.impl.CassandraElementRepository;
-import org.openecomp.core.zusammen.plugin.dao.types.ElementEntity;
-import org.openecomp.sdc.versioning.dao.types.Version;
-import org.openecomp.sdc.versioning.dao.types.VersionInfoEntity;
-
-import java.io.ByteArrayInputStream;
-import java.util.ArrayList;
-import java.util.Collection;
-import java.util.Collections;
-import java.util.HashSet;
-import java.util.List;
-import java.util.Set;
-
-public class ElementHandler {
-
-  private static final String GLOBAL_USER = "GLOBAL_USER";
-
-  public static void save(SessionContext context,
-                          CassandraElementRepository cassandraElementRepository,
-                          String itemId, Version versionId,
-                          CollaborationElement[] elements) {
-
-    ElementEntityContext elementContext;
-    for (CollaborationElement element : elements) {
-
-      elementContext = new ElementEntityContext(GLOBAL_USER, new Id(itemId), getVersionId(itemId,
-          versionId));
-      ElementEntity elementEntity = ZusammenPluginUtil.getElementEntity(element);
-
-      cassandraElementRepository.createNamespace(context, elementContext, elementEntity);
-
-      cassandraElementRepository.create(context, elementContext, elementEntity);
-
-      if (isActiveVersion(itemId, versionId)) {
-        elementContext =
-            new ElementEntityContext(GLOBAL_USER, new Id(itemId), new Id(versionId.toString()));
-        cassandraElementRepository.create(context, elementContext, elementEntity);
-
-      }
-    }
-  }
-
-  public static CollaborationElement getElementEntity(String itemId,
-                                                      String versionId,
-                                                      String elementId,
-                                                      List<String> elementPath,
-                                                      Info info,
-                                                      Collection<Relation> relations,
-                                                      List<String> subElements,
-                                                      byte[] data) {
-    Namespace namespace = new Namespace();
-    for (String pathElementId : elementPath) {
-      namespace = new Namespace(namespace, new Id(pathElementId));
-    }
-    if (namespace.getValue() == null || namespace.getValue().equals("")) {
-      namespace = Namespace.ROOT_NAMESPACE;
-    }
-    CollaborationElement elementEntity = new CollaborationElement(new Id(itemId), new Id(versionId),
-        namespace, new Id(elementId));
-
-    Id parentId = namespace.getParentElementId() != null ? namespace.getParentElementId() : Id.ZERO;
-    elementEntity.setParentId(parentId);
-    elementEntity.setInfo(info);
-    elementEntity.setRelations(relations);
-    if (subElements != null) {
-      Set<Id> subElementSet = new HashSet<>();
-
-      subElements.forEach(subElement -> subElementSet.add(new Id(subElement)));
-
-    }
-    if (data != null) {
-      elementEntity.setData(new ByteArrayInputStream(data));
-    }
-
-    return elementEntity;
-  }
-
-  public static List<String> getElementPath(String... paths) {
-    List<String> pathList = new ArrayList<>();
-    if (paths != null) {
-      Collections.addAll(pathList, paths);
-    }
-    return pathList;
-  }
-
-  public static Info getStructuralElementInfo(String elementName) {
-    Info info = new Info();
-    info.setName(elementName);
-    return info;
-  }
-
-
-  private static Id getVersionId(String itemId, Version versionId) {
-    VersionInfoEntity versionInfo =
-        MigrationMain.getVersionInfoMap().get(itemId);
-    if (versionInfo == null) {
-      return new Id(versionId.toString());
-    }
-    Version lastVersion = versionInfo.getCandidate() != null ? versionInfo.getCandidate()
-        .getVersion()
-        : versionInfo.getActiveVersion();
-
-    if (lastVersion.equals(versionId)) {
-      return new Id(itemId);
-    } else {
-      return new Id(versionId.toString());
-    }
-  }
-
-  private static boolean isActiveVersion(String itemId, Version versionId) {
-    VersionInfoEntity versionInfo =
-        MigrationMain.getVersionInfoMap().get(itemId);
-    return versionInfo != null && versionInfo.getActiveVersion().equals(versionId);
-  }
-
-
-  public static Info getServiceModelElementInfo(String vspServiceModelEntityId,
-                                                ServiceTemplate serviceTemplate) {
-    Info info = ElementHandler.getStructuralElementInfo(vspServiceModelEntityId);
-    info.addProperty("base", serviceTemplate.getBaseName());
-    return info;
-
-  }
-}
\ No newline at end of file
diff --git a/openecomp-be/tools/migration/1702_to_1707_zusammen/src/main/java/org/openecomp/core/migration/store/ItemHandler.java b/openecomp-be/tools/migration/1702_to_1707_zusammen/src/main/java/org/openecomp/core/migration/store/ItemHandler.java
deleted file mode 100644
index 801984a..0000000
--- a/openecomp-be/tools/migration/1702_to_1707_zusammen/src/main/java/org/openecomp/core/migration/store/ItemHandler.java
+++ /dev/null
@@ -1,122 +0,0 @@
-package org.openecomp.core.migration.store;
-
-import com.amdocs.zusammen.datatypes.Id;
-import com.amdocs.zusammen.datatypes.Namespace;
-import com.amdocs.zusammen.datatypes.SessionContext;
-import com.amdocs.zusammen.datatypes.item.Info;
-import com.amdocs.zusammen.datatypes.item.ItemVersionData;
-import com.amdocs.zusammen.datatypes.item.Relation;
-import com.amdocs.zusammen.plugin.statestore.cassandra.dao.impl.ItemCassandraDao;
-import com.amdocs.zusammen.plugin.statestore.cassandra.dao.impl.VersionCassandraDao;
-import com.amdocs.zusammen.plugin.statestore.cassandra.dao.types.ElementEntity;
-
-import org.openecomp.core.migration.MigrationMain;
-import org.openecomp.sdc.vendorlicense.dao.types.VendorLicenseModelEntity;
-import org.openecomp.sdc.versioning.dao.types.Version;
-import org.openecomp.sdc.versioning.dao.types.VersionInfoEntity;
-
-import java.util.ArrayList;
-import java.util.Collection;
-import java.util.Date;
-import java.util.HashSet;
-import java.util.List;
-import java.util.Set;
-
-public class ItemHandler {
-
-    public static ElementEntity getElementEntity(String id, List<String>
-      elementPath, Info info, Collection<Relation> relations, List<String> subElements,
-                                                byte[] data) {
-    ElementEntity elementEntity = new ElementEntity(new Id(id));
-
-    Namespace namespace = new Namespace();
-    for (String elementId : elementPath) {
-      namespace = new Namespace(namespace, new Id(elementId));
-    }
-    elementEntity.setNamespace(namespace);
-    elementEntity.setParentId(namespace.getParentElementId());
-    elementEntity.setInfo(info);
-    elementEntity.setRelations(relations);
-    if(subElements!=null) {
-      Set<Id> subElementSet = new HashSet<>();
-
-      subElements.forEach(subElement -> subElementSet.add(new Id(subElement)));
-
-      elementEntity.setSubElementIds(subElementSet);
-    }
-
-    //elementEntity.setData(new ByteArrayInputStream(data));
-    return elementEntity;
-  }
-
-  public static List<String> getElementPath(String... paths) {
-    List<String> pathList = new ArrayList<>();
-    for (String path : paths) {
-      pathList.add(path);
-    }
-    return pathList;
-  }
-
-  public static Info getStractualElementInfo(String elementName) {
-    Info info = new Info();
-    info.setName(elementName);
-    return info;
-  }
-
-  public static void save(SessionContext context, ItemCassandraDao itemCassandraDao,
-                          VersionCassandraDao versionCassandraDao,
-                          String itemId, Version versionId, Info info,
-                          ItemVersionData itemVersionData, Long writetimeMicroSeconds) {
-
-    Date date = writetimeMicroSeconds==null?new Date():new Date(writetimeMicroSeconds);
-    itemCassandraDao.create(context,new Id(itemId),info,date);
-
-    versionCassandraDao.create(context, context.getUser().getUserName(),new Id(itemId),
-        null,getVersionId(itemId,versionId),itemVersionData,date);
-
-    if(isActiveVersion(itemId,versionId)){
-      versionCassandraDao.create(context, context.getUser().getUserName(),new Id(itemId),
-          null,new Id(versionId.toString()),itemVersionData,date);
-    }
-  }
-
-
-
-  private static Info getInfo(VendorLicenseModelEntity vlmEntity) {
-    Info info = new Info();
-
-    info.setName(vlmEntity.getVendorName());
-    info.setDescription(vlmEntity.getDescription());
-    info.addProperty("iconRef",vlmEntity.getIconRef());
-    info.addProperty("type",vlmEntity.getIconRef());
-    return info;
-  }
-
-  private static Id getVersionId(String itemId, Version versionId) {
-    VersionInfoEntity versionInfo =
-        MigrationMain.getVersionInfoMap().get(itemId);
-    if (versionInfo == null) {
-      return new Id(versionId.toString());
-    }
-    Version lastVersion = versionInfo.getCandidate() != null ? versionInfo.getCandidate()
-        .getVersion()
-        : versionInfo.getActiveVersion();
-
-    if (lastVersion.equals(versionId)) {
-      return new Id(itemId);
-    } else {
-      return new Id(versionId.toString());
-    }
-  }
-  private static boolean isActiveVersion(String itemId, Version versionId) {
-    VersionInfoEntity versionInfo =
-        MigrationMain.getVersionInfoMap().get(itemId);
-    if (versionInfo == null) {
-      return false;
-    }
-
-    return versionInfo.getActiveVersion().equals(versionId);
-  }
-
-
-}
\ No newline at end of file
diff --git a/openecomp-be/tools/migration/1702_to_1707_zusammen/src/main/java/org/openecomp/core/migration/util/Utils.java b/openecomp-be/tools/migration/1702_to_1707_zusammen/src/main/java/org/openecomp/core/migration/util/Utils.java
deleted file mode 100644
index ea026e5..0000000
--- a/openecomp-be/tools/migration/1702_to_1707_zusammen/src/main/java/org/openecomp/core/migration/util/Utils.java
+++ /dev/null
@@ -1,15 +0,0 @@
-package org.openecomp.core.migration.util;
-
-import org.openecomp.sdc.logging.api.Logger;
-
-/**
- * @author Avrahamg
- * @since April 24, 2017
- */
-public class Utils {
-  public static void printMessage(Logger logger, String message) {
-    System.out.println(message);
-    logger.debug(message);
-  }
-}
-
diff --git a/openecomp-be/tools/migration/1702_to_1707_zusammen/src/main/java/org/openecomp/core/migration/util/marker/MigrationMarker.java b/openecomp-be/tools/migration/1702_to_1707_zusammen/src/main/java/org/openecomp/core/migration/util/marker/MigrationMarker.java
deleted file mode 100644
index 4481b43..0000000
--- a/openecomp-be/tools/migration/1702_to_1707_zusammen/src/main/java/org/openecomp/core/migration/util/marker/MigrationMarker.java
+++ /dev/null
@@ -1,49 +0,0 @@
-package org.openecomp.core.migration.util.marker;
-
-import com.datastax.driver.mapping.annotations.Accessor;
-import com.datastax.driver.mapping.annotations.Query;
-import org.openecomp.core.migration.MigrationMain;
-import org.openecomp.core.nosqldb.api.NoSqlDb;
-import org.openecomp.core.nosqldb.factory.NoSqlDbFactory;
-import org.openecomp.sdc.logging.api.Logger;
-import org.openecomp.sdc.logging.api.LoggerFactory;
-
-/**
- * @author katyr
- * @since May 01, 2017
- */
-
-public class MigrationMarker {
-
-  private static Logger logger = LoggerFactory.getLogger(MigrationMain.class);
-
-  private static final NoSqlDb noSqlDb = NoSqlDbFactory.getInstance().createInterface();
-  private static final MigrationTableAccessor accessor =
-      noSqlDb.getMappingManager().createAccessor(MigrationMarker.MigrationTableAccessor.class);
-
-  public static Boolean isMigrated() {
-
-    MigrationMarkerEntity result = accessor.isMigrated();
-    if (result == null) {
-      return false;
-    } else {
-      return result.getMigrated();
-    }
-  }
-
-  public static void markMigrated() {
-    accessor.markMigrated();
-  }
-
-  @Accessor
-  interface MigrationTableAccessor {
-    @Query("SELECT * FROM migration where id='1'")
-    MigrationMarkerEntity isMigrated();
-
-
-    @Query("insert into migration (id,isMigrated) values('1',true)")
-    void markMigrated();
-
-  }
-
-}
diff --git a/openecomp-be/tools/migration/1702_to_1707_zusammen/src/main/java/org/openecomp/core/migration/util/marker/MigrationMarkerEntity.java b/openecomp-be/tools/migration/1702_to_1707_zusammen/src/main/java/org/openecomp/core/migration/util/marker/MigrationMarkerEntity.java
deleted file mode 100644
index 47bb91d..0000000
--- a/openecomp-be/tools/migration/1702_to_1707_zusammen/src/main/java/org/openecomp/core/migration/util/marker/MigrationMarkerEntity.java
+++ /dev/null
@@ -1,45 +0,0 @@
-package org.openecomp.core.migration.util.marker;
-
-import com.datastax.driver.mapping.annotations.ClusteringColumn;
-import com.datastax.driver.mapping.annotations.Column;
-import com.datastax.driver.mapping.annotations.Table;
-
-/**
- * @author katyr
- * @since May 03, 2017
- */
-
-@Table(keyspace = "dox", name = "migration")
-public class MigrationMarkerEntity {
-
-  @ClusteringColumn
-  private String id;
-
-  @Column(name = "ismigrated")
-  private Boolean migrated;
-
-  public Boolean getMigrated() {
-    return migrated;
-  }
-
-  public void setMigrated(Boolean migrated) {
-    this.migrated = migrated;
-  }
-
-  public String getId() {
-    return id;
-  }
-
-  public void setId(String id) {
-    this.id = id;
-  }
-
-  @Override
-  public String toString() {
-    final StringBuilder sb = new StringBuilder("MigrationMarkerEntity{");
-    sb.append("id='").append(id).append('\'');
-    sb.append(", migrated=").append(migrated);
-    sb.append('}');
-    return sb.toString();
-  }
-}
diff --git a/openecomp-be/tools/migration/1702_to_1707_zusammen/src/main/resources/logback.xml b/openecomp-be/tools/migration/1702_to_1707_zusammen/src/main/resources/logback.xml
deleted file mode 100644
index 9c9c06c..0000000
--- a/openecomp-be/tools/migration/1702_to_1707_zusammen/src/main/resources/logback.xml
+++ /dev/null
@@ -1,15 +0,0 @@
-<configuration>
-
-    <appender name="STDOUT" class="ch.qos.logback.core.ConsoleAppender">
-        <!-- encoders are assigned the type
-             ch.qos.logback.classic.encoder.PatternLayoutEncoder by default -->
-        <encoder>
-            <pattern>%d{HH:mm:ss.SSS} [%thread] %-5level %logger{36} - %msg%n</pattern>
-        </encoder>
-    </appender>
-
-    <root level="warn">
-        <appender-ref ref="STDOUT"/>
-    </root>
-
-</configuration>
\ No newline at end of file
diff --git a/openecomp-be/tools/zusammen-tools/src/main/java/org/openecomp/core/tools/Commands/ExportDataCommand.java b/openecomp-be/tools/zusammen-tools/src/main/java/org/openecomp/core/tools/Commands/ExportDataCommand.java
deleted file mode 100644
index 487b413..0000000
--- a/openecomp-be/tools/zusammen-tools/src/main/java/org/openecomp/core/tools/Commands/ExportDataCommand.java
+++ /dev/null
@@ -1,67 +0,0 @@
-package org.openecomp.core.tools.Commands;
-
-import static java.nio.file.Files.createDirectories;
-
-import com.amdocs.zusammen.datatypes.SessionContext;
-import org.apache.commons.io.FileUtils;
-import org.openecomp.core.tools.Commands.exportdata.ElementHandler;
-import org.openecomp.core.tools.Commands.exportdata.ImportProperties;
-import org.openecomp.core.tools.Commands.exportdata.ItemHandler;
-import org.openecomp.core.tools.Commands.exportdata.VersionHandler;
-import org.openecomp.core.tools.util.ZipUtils;
-import org.openecomp.core.zusammen.impl.CassandraConnectionInitializer;
-import org.openecomp.sdc.logging.api.Logger;
-import org.openecomp.sdc.logging.api.LoggerFactory;
-
-import java.io.File;
-import java.io.IOException;
-import java.nio.file.Files;
-import java.nio.file.Path;
-import java.nio.file.Paths;
-import java.time.LocalDateTime;
-import java.time.format.DateTimeFormatter;
-import java.util.HashSet;
-import java.util.Set;
-public class ExportDataCommand {
-    private static final Logger logger = LoggerFactory.getLogger(ExportDataCommand.class);
-
-    public static void exportData(SessionContext context, String filterItem) {
-        try {
-            Set<String> filteredItem = new HashSet<>();
-            filteredItem.add(filterItem);
-            ImportProperties.initParams();
-            CassandraConnectionInitializer.setCassandraConnectionPropertiesToSystem();
-            Path rootDir = Paths.get(ImportProperties.ROOT_DIRECTORY);
-            initDir(rootDir);
-            if (filterItem != null) {
-                filterItem = filterItem.replaceAll("\\r", "");
-            }
-            new ItemHandler().createItemsData(context, filteredItem);
-            new VersionHandler().loadVersions(filteredItem);
-            new ElementHandler().loadElements(filteredItem);
-            zipPath(rootDir,filteredItem);
-            FileUtils.forceDelete(rootDir.toFile());
-        } catch (Exception ex) {
-            logger.error(ex.getMessage(), ex);
-        }
-
-    }
-    private static void zipPath(Path rootDir,Set<String> filterItem ) throws Exception{
-        LocalDateTime date = LocalDateTime.now();
-        DateTimeFormatter formatter = DateTimeFormatter.ISO_LOCAL_DATE_TIME;
-        String dateStr = date.format(formatter);
-        String zipFile = System.getProperty("user.home")+ File.separatorChar+"onboarding_import"+ dateStr + ".zip";
-        ZipUtils.createZip(zipFile, rootDir,filterItem);
-        logger.info("Exported file :" + zipFile);
-        System.out.println("Exported file :" + zipFile);
-    }
-
-
-    public static void initDir(Path rootDir ) throws IOException{
-        if (Files.exists(rootDir)) {
-            FileUtils.forceDelete(rootDir.toFile());
-        }
-        createDirectories(rootDir);
-    }
-
-}
\ No newline at end of file
diff --git a/openecomp-be/tools/zusammen-tools/src/main/java/org/openecomp/core/tools/Commands/HealAll.java b/openecomp-be/tools/zusammen-tools/src/main/java/org/openecomp/core/tools/Commands/HealAll.java
index 2bc48bd..40a56ed 100644
--- a/openecomp-be/tools/zusammen-tools/src/main/java/org/openecomp/core/tools/Commands/HealAll.java
+++ b/openecomp-be/tools/zusammen-tools/src/main/java/org/openecomp/core/tools/Commands/HealAll.java
@@ -3,6 +3,8 @@
 import org.apache.commons.collections.CollectionUtils;
 import org.openecomp.core.tools.concurrent.ItemHealingTask;
 import org.openecomp.core.tools.loaders.VersionInfoCassandraLoader;
+import org.openecomp.sdc.healing.api.HealingManager;
+import org.openecomp.sdc.healing.factory.HealingManagerFactory;
 import org.openecomp.sdc.vendorsoftwareproduct.VendorSoftwareProductConstants;
 import org.openecomp.sdc.vendorsoftwareproduct.VendorSoftwareProductManager;
 import org.openecomp.sdc.vendorsoftwareproduct.VspManagerFactory;
@@ -31,18 +33,20 @@
 public class HealAll {
 
   private static final String HEALING_USER = "healing_user";
-  private static final int defaulThreadNumber =100;
+  private static final int defaulThreadNumber = 100;
   private static BufferedWriter log;
   private static List<ItemHealingTask> tasks = new ArrayList<>();
   private static VendorSoftwareProductManager vspManager = VspManagerFactory
       .getInstance().createInterface();
+  private static HealingManager healingManager = HealingManagerFactory.getInstance()
+      .createInterface();
   private static VersioningManager versioningManager = VersioningManagerFactory.getInstance()
       .createInterface();
 
   static {
     try {
       log =
-          new BufferedWriter(new FileWriter("healing.log",true));
+          new BufferedWriter(new FileWriter("healing.log", true));
     } catch (IOException e) {
       if (log != null) {
         try {
@@ -64,13 +68,13 @@
         defaulThreadNumber;
     ExecutorService executor = Executors.newFixedThreadPool(numberOfThreads);
 
-   filterByEntityType(VersionInfoCassandraLoader.list(),
+    filterByEntityType(VersionInfoCassandraLoader.list(),
         VendorSoftwareProductConstants.VENDOR_SOFTWARE_PRODUCT_VERSIONABLE_TYPE).forEach
-       (HealAll::addTaskToTasks);
+        (HealAll::addTaskToTasks);
 
     executeAllTasks(executor);
 
-    writeToLog("----finished healing------" );
+    writeToLog("----finished healing------");
     Instant endTime = Instant.now();
     writeToLog("Total runtime was: " + Duration.between(startTime, endTime));
 
@@ -112,7 +116,7 @@
     if (Objects.nonNull(versionInfoEntity.getCandidate())) {
       return versionInfoEntity.getCandidate().getVersion();
     } else if (!CollectionUtils.isEmpty(versionInfoEntity.getViewableVersions())) {
-     return versionInfoEntity.getViewableVersions().stream().max(Version::compateTo).get();
+      return versionInfoEntity.getViewableVersions().stream().max(Version::compateTo).get();
     }
     return versionInfoEntity.getActiveVersion();
   }
@@ -126,17 +130,16 @@
     }
   }
 
-  private static Stream<VersionInfoEntity> filterByEntityType(Collection<VersionInfoEntity>
-                                                             versionInfoEntities,
-                                                     String entityType){
+  private static Stream<VersionInfoEntity> filterByEntityType(
+      Collection<VersionInfoEntity> versionInfoEntities, String entityType) {
     return versionInfoEntities.stream().filter(versionInfoEntity -> versionInfoEntity
         .getEntityType().equals(entityType));
   }
-  private static void addTaskToTasks(VersionInfoEntity versionInfoEntity){
+
+  private static void addTaskToTasks(VersionInfoEntity versionInfoEntity) {
     tasks.add(new ItemHealingTask(versionInfoEntity.getEntityId(), resolveVersion
-            (versionInfoEntity).toString(), versionInfoEntity.getCandidate() == null ?
-            HEALING_USER : versionInfoEntity.getCandidate().getUser(),
-            vspManager, versioningManager));
+        (versionInfoEntity).toString(),
+        vspManager, healingManager));
   }
 
 }
diff --git a/openecomp-be/tools/zusammen-tools/src/main/java/org/openecomp/core/tools/Commands/ImportCommand.java b/openecomp-be/tools/zusammen-tools/src/main/java/org/openecomp/core/tools/Commands/ImportCommand.java
deleted file mode 100644
index cebff91..0000000
--- a/openecomp-be/tools/zusammen-tools/src/main/java/org/openecomp/core/tools/Commands/ImportCommand.java
+++ /dev/null
@@ -1,45 +0,0 @@
-package org.openecomp.core.tools.Commands;
-
-import com.amdocs.zusammen.datatypes.SessionContext;
-import org.apache.commons.io.FileUtils;
-import org.openecomp.core.tools.Commands.importdata.TreeWalker;
-import org.openecomp.core.tools.Commands.exportdata.ImportProperties;
-import org.openecomp.core.tools.util.ZipUtils;
-import org.openecomp.core.zusammen.impl.CassandraConnectionInitializer;
-import org.openecomp.sdc.logging.api.Logger;
-import org.openecomp.sdc.logging.api.LoggerFactory;
-
-import java.nio.file.Path;
-import java.nio.file.Paths;
-
-public class ImportCommand {
-
-    private static final Logger logger = LoggerFactory.getLogger(ImportCommand.class);
-
-
-    public static void importData(SessionContext context, String zippedFile, String filterItem) {
-        try {
-            ImportProperties.initParams();
-            CassandraConnectionInitializer.setCassandraConnectionPropertiesToSystem();
-            if (zippedFile == null){
-                logger.error("Import must have a valid file as an input.");
-            }
-            if (zippedFile != null) {
-                zippedFile = zippedFile.replaceAll("\\r", "");
-                if (filterItem != null) {
-                    filterItem = filterItem.replaceAll("\\r", "");
-                }
-                Path rootDir = Paths.get(ImportProperties.ROOT_DIRECTORY);
-                ExportDataCommand.initDir(rootDir);
-                ZipUtils.unzip(Paths.get(zippedFile), rootDir);
-                TreeWalker.walkFiles(context, rootDir, filterItem);
-                FileUtils.forceDelete(rootDir.toFile()); // clear all unzip data at the end.
-            }
-
-
-        } catch (Exception ex) {
-            logger.error(ex.getMessage(), ex);
-        }
-    }
-
-}
diff --git a/openecomp-be/tools/zusammen-tools/src/main/java/org/openecomp/core/tools/Commands/SetHealingFlag.java b/openecomp-be/tools/zusammen-tools/src/main/java/org/openecomp/core/tools/Commands/SetHealingFlag.java
new file mode 100644
index 0000000..b885ac5
--- /dev/null
+++ b/openecomp-be/tools/zusammen-tools/src/main/java/org/openecomp/core/tools/Commands/SetHealingFlag.java
@@ -0,0 +1,31 @@
+package org.openecomp.core.tools.Commands;
+
+import com.datastax.driver.core.ResultSet;
+import org.openecomp.core.tools.store.HealingHandler;
+import org.openecomp.core.tools.store.VersionCassandraLoader;
+import org.openecomp.core.tools.store.zusammen.datatypes.HealingEntity;
+
+import java.util.ArrayList;
+
+
+/**
+ * Created by ayalaben on 10/15/2017
+ */
+public class SetHealingFlag {
+
+
+  public static void populateHealingTable(String oldVersion) {
+
+    VersionCassandraLoader versionCassandraLoader = new VersionCassandraLoader();
+    ResultSet listItemVersion = versionCassandraLoader.listItemVersion();
+
+    ArrayList<HealingEntity> healingEntities = new ArrayList<HealingEntity>();
+
+    listItemVersion.iterator().forEachRemaining(entry -> healingEntities.add(new HealingEntity
+        (entry.getString(0),entry.getString(1),entry.getString(2),true,oldVersion)));
+
+    HealingHandler healingHandler = new HealingHandler();
+    healingHandler.populateHealingTable(healingEntities);
+
+  }
+}
diff --git a/openecomp-be/tools/zusammen-tools/src/main/java/org/openecomp/core/tools/Commands/exportdata/ElementHandler.java b/openecomp-be/tools/zusammen-tools/src/main/java/org/openecomp/core/tools/Commands/exportdata/ElementHandler.java
deleted file mode 100644
index e03b7ff..0000000
--- a/openecomp-be/tools/zusammen-tools/src/main/java/org/openecomp/core/tools/Commands/exportdata/ElementHandler.java
+++ /dev/null
@@ -1,108 +0,0 @@
-package org.openecomp.core.tools.Commands.exportdata;
-
-
-import org.openecomp.core.tools.store.ElementCassandraLoader;
-import org.openecomp.core.tools.store.zusammen.datatypes.ElementEntity;
-import org.openecomp.sdc.logging.api.Logger;
-import org.openecomp.sdc.logging.api.LoggerFactory;
-
-import java.nio.ByteBuffer;
-import java.nio.file.Path;
-import java.nio.file.Paths;
-import java.util.Objects;
-import java.util.Set;
-
-import static java.io.File.separator;
-import static java.nio.file.Files.*;
-import static org.openecomp.core.tools.Commands.exportdata.ImportProperties.*;
-
-public class ElementHandler {
-
-    private static final Logger logger = LoggerFactory.getLogger(ElementHandler.class);
-
-    public ElementHandler() {
-    }
-
-    public void loadElements(Set<String> filteredItem) {
-        ElementCassandraLoader elementCassandraLoader = new ElementCassandraLoader();
-          elementCassandraLoader.list().forEach(elementEntity ->  handleElementEntity(elementEntity,filteredItem));
-    }
-
-    private void handleElementEntity(ElementEntity elementEntity, Set<String> filteredItem) {
-        try {
-            String itemId = elementEntity.getItemId();
-
-            if (!filteredItem.isEmpty() && !filteredItem.contains(itemId)){
-                return;
-            }
-            String versionId = elementEntity.getVersionId();
-            String space = elementEntity.getSpace();
-            String namespace = elementEntity.getNamespace();
-            String elementId = elementEntity.getElement_id();
-
-            String namespacePath = separator;
-            if (!isNull(namespace)){
-                namespacePath =  namespace.replace(ELEMENT_NAMESPACE_SPLITTER,separator)+separator;
-            }
-            Path elementDirectoryPath;
-            if (!isNull(namespace)){
-                elementDirectoryPath = Paths.get( ROOT_DIRECTORY + separator + itemId
-                        + separator + versionId + separator + space + separator + namespacePath+ separator + elementId);
-            } else {
-                elementDirectoryPath = Paths.get( ROOT_DIRECTORY + separator + itemId
-                        + separator + versionId + separator + space + separator + elementId);
-              }
-
-            if (notExists(elementDirectoryPath)) {
-                 Path created = createDirectories(elementDirectoryPath);
-             }
-
-            String info = elementEntity.getInfo();
-            if (!isNull(info)) {
-                Path infoFilePath = Paths.get(elementDirectoryPath.toString() + separator + ELEMENT_INFO_PREFIX
-                        + elementId + JSON_POSTFIX);
-                write(infoFilePath, info.getBytes());
-            }
-
-            String relations = elementEntity.getRelations();
-            if (!isNull(relations)) {
-                Path realtionsFilePath = Paths.get(elementDirectoryPath.toString() + separator
-                        + ELEMENT_RELATION_PREFIX + elementId + JSON_POSTFIX);
-                write(realtionsFilePath, relations.getBytes());
-            }
-
-            ByteBuffer data = elementEntity.getData();
-            if (!Objects.isNull(data)) {
-                Path dataFilePath = Paths.get(elementDirectoryPath.toString() + separator
-                        + ELEMENT_DATA_PREFIX + elementId + JSON_POSTFIX);
-                write(dataFilePath, data.array());
-            }
-
-            ByteBuffer visualization = elementEntity.getVisualization();
-            if (!Objects.isNull(visualization)) {
-                Path visualFilePath = Paths.get(elementDirectoryPath.toString() + separator
-                        + ELEMENT_VISUALIZATION_PREFIX + elementId );
-                write(visualFilePath, visualization.array());
-            }
-
-            ByteBuffer searchableData = elementEntity.getSearchableData();
-            if (!Objects.isNull(searchableData)) {
-                Path searchableFilePath = Paths.get(elementDirectoryPath.toString() + separator
-                        + ELEMENT_SEARCHABLE_PREFIX + elementId);
-                write(searchableFilePath, searchableData.array());
-            }
-
-        } catch (Exception ex) {
-            logger.error(ex.getMessage(), ex);
-        }
-
-    }
-
-    private boolean isNull(String inStr){
-        if (Objects.isNull(inStr)){
-            return true;
-        }
-        return inStr.trim().equalsIgnoreCase("null");
-    }
-
-}
diff --git a/openecomp-be/tools/zusammen-tools/src/main/java/org/openecomp/core/tools/Commands/exportdata/ImportProperties.java b/openecomp-be/tools/zusammen-tools/src/main/java/org/openecomp/core/tools/Commands/exportdata/ImportProperties.java
deleted file mode 100644
index 3b7566f..0000000
--- a/openecomp-be/tools/zusammen-tools/src/main/java/org/openecomp/core/tools/Commands/exportdata/ImportProperties.java
+++ /dev/null
@@ -1,20 +0,0 @@
-package org.openecomp.core.tools.Commands.exportdata;
-
-import java.io.File;
-
-public class ImportProperties {
-    public static final String VERSION_FILE_PREFIX = "version_";
-    public static final String VERSION_INFO_FILE_PREFIX = "version_info_";
-    public static final String JSON_POSTFIX = ".json";
-
-    public static final String ELEMENT_INFO_PREFIX = "elem_info";
-    public static final String ELEMENT_RELATION_PREFIX = "elem_relations";
-    public static final String ELEMENT_DATA_PREFIX = "elem_data";
-    public static final String ELEMENT_VISUALIZATION_PREFIX = "elem_visualization";
-    public static final String ELEMENT_SEARCHABLE_PREFIX = "elem_searchableData";
-    public static final String ELEMENT_NAMESPACE_SPLITTER = "/";
-    public static String ROOT_DIRECTORY;
-    public static final void initParams(){
-         ROOT_DIRECTORY = System.getProperty("user.home")+File.separator+ "onboarding_import";
-    }
-}
diff --git a/openecomp-be/tools/zusammen-tools/src/main/java/org/openecomp/core/tools/Commands/exportdata/ItemHandler.java b/openecomp-be/tools/zusammen-tools/src/main/java/org/openecomp/core/tools/Commands/exportdata/ItemHandler.java
deleted file mode 100644
index ebbfb56..0000000
--- a/openecomp-be/tools/zusammen-tools/src/main/java/org/openecomp/core/tools/Commands/exportdata/ItemHandler.java
+++ /dev/null
@@ -1,87 +0,0 @@
-package org.openecomp.core.tools.Commands.exportdata;
-
-import com.amdocs.zusammen.datatypes.Id;
-import com.amdocs.zusammen.datatypes.SessionContext;
-import com.amdocs.zusammen.datatypes.item.Item;
-import com.amdocs.zusammen.plugin.statestore.cassandra.dao.ItemDao;
-import com.amdocs.zusammen.plugin.statestore.cassandra.dao.ItemDaoFactory;
-import com.google.common.base.Strings;
-import org.openecomp.core.tools.Commands.ExportDataCommand;
-import org.openecomp.core.utilities.json.JsonUtil;
-import org.openecomp.sdc.logging.api.Logger;
-import org.openecomp.sdc.logging.api.LoggerFactory;
-
-import java.io.IOException;
-import java.net.URISyntaxException;
-import java.nio.file.Path;
-import java.nio.file.Paths;
-import java.util.ArrayList;
-import java.util.List;
-import java.util.Optional;
-import java.util.Set;
-
-import static java.io.File.separator;
-import static java.nio.file.Files.*;
-import static org.openecomp.core.tools.Commands.exportdata.ImportProperties.JSON_POSTFIX;
-
-public class ItemHandler {
-    private static final Logger logger = LoggerFactory.getLogger(ExportDataCommand.class);
-
-
-    public ItemHandler() {
-        ImportProperties.initParams();
-    }
-
-    public void createItemsData(SessionContext context, Set<String> filteredItem) throws URISyntaxException, IOException {
-        final List<Item> items = new ArrayList<>();
-        if (filteredItem.isEmpty()) {
-            items.addAll(getItemDao(context).list(context));
-        } else {
-            Optional<Item> item = addItem(context, filteredItem.iterator().next(), items);
-            item.ifPresent(foundedItem -> {
-                Object vendorId =  foundedItem.getInfo().getProperty("vendorId");
-                if (vendorId != null) {
-                    String vendorIdStr = vendorId.toString();
-                    addItem(context, vendorIdStr, items);
-                    filteredItem.add(vendorIdStr);
-                }
-            });
-        }
-
-        items.parallelStream().forEach(item -> createItemDirectoryAndFiles(item, filteredItem));
-
-    }
-
-
-
-    private Optional<Item> addItem(SessionContext context, String filteredItem, List<Item> items) {
-        Optional<Item> item = getItemDao(context).get(context, new Id(filteredItem));
-        item.ifPresent(itemData -> items.add(itemData));
-        return item;
-    }
-
-    private final void createItemDirectoryAndFiles(Item item, Set<String> filteredItem) {
-        try {
-            String itemId = item.getId().getValue();
-            if (!filteredItem.isEmpty() && !filteredItem.contains(itemId)) {
-                return;
-            }
-            Path itemPath = Paths.get(ImportProperties.ROOT_DIRECTORY + separator + itemId);
-            Path itemFilePath = Paths.get(ImportProperties.ROOT_DIRECTORY + separator +
-                    itemId + separator + itemId + JSON_POSTFIX);
-            if (notExists(itemPath)) {
-                createDirectories(itemPath);
-            }
-            String itemJson = JsonUtil.object2Json(item);
-            write(itemFilePath, itemJson.getBytes());
-        } catch (Exception ex) {
-            logger.error(ex.getMessage(), ex);
-        }
-
-    }
-
-
-    private ItemDao getItemDao(SessionContext context) {
-        return ItemDaoFactory.getInstance().createInterface(context);
-    }
-}
diff --git a/openecomp-be/tools/zusammen-tools/src/main/java/org/openecomp/core/tools/Commands/exportdata/VersionHandler.java b/openecomp-be/tools/zusammen-tools/src/main/java/org/openecomp/core/tools/Commands/exportdata/VersionHandler.java
deleted file mode 100644
index 4ff5624..0000000
--- a/openecomp-be/tools/zusammen-tools/src/main/java/org/openecomp/core/tools/Commands/exportdata/VersionHandler.java
+++ /dev/null
@@ -1,73 +0,0 @@
-package org.openecomp.core.tools.Commands.exportdata;
-
-import org.openecomp.core.tools.Commands.ExportDataCommand;
-import org.openecomp.core.tools.store.VersionInfoCassandraLoader;
-import org.openecomp.core.tools.store.VersionCassandraLoader;
-
-import org.openecomp.core.tools.store.zusammen.datatypes.VersionEntity;
-import org.openecomp.core.utilities.json.JsonUtil;
-import org.openecomp.sdc.logging.api.Logger;
-import org.openecomp.sdc.logging.api.LoggerFactory;
-import org.openecomp.sdc.versioning.dao.types.VersionInfoEntity;
-
-import static java.io.File.separator;
-import static java.nio.file.Files.*;
-import static org.openecomp.core.tools.Commands.exportdata.ImportProperties.*;
-import static org.openecomp.core.tools.Commands.exportdata.ImportProperties.ROOT_DIRECTORY;
-
-import java.nio.file.Path;
-import java.nio.file.Paths;
-import java.util.Set;
-
-public class VersionHandler {
-    private static final Logger logger = LoggerFactory.getLogger(ExportDataCommand.class);
-
-    public VersionHandler() {
-    }
-
-    public void loadVersions(Set<String> filteredItem) {
-        VersionCassandraLoader versionCassandraLoader = new VersionCassandraLoader();
-        versionCassandraLoader.list().forEach(versionEntity -> handleVersionEntity(versionEntity,filteredItem));
-        VersionInfoCassandraLoader versionInfoCassandraLoader = new VersionInfoCassandraLoader();
-        versionInfoCassandraLoader.list().forEach(versionInfoEntity ->  handleVersionInfo(versionInfoEntity,filteredItem));
-    }
-
-    private void handleVersionEntity(VersionEntity versionEntity, Set<String> filteredItem) {
-        try {
-            String itemId = versionEntity.getItemId();
-            if (!filteredItem.isEmpty()  && !filteredItem.contains(itemId)){
-                return;
-            }
-            String versionId = versionEntity.getVersionId();
-            String space = versionEntity.getSpace();
-            Path versionDirectoryPath = Paths.get( ROOT_DIRECTORY + separator + itemId
-                    + separator + versionId + separator + space);
-            Path versionFilePath = Paths.get(versionDirectoryPath.toString() + separator + VERSION_FILE_PREFIX
-                    + versionId + JSON_POSTFIX);
-            if (notExists(versionDirectoryPath)) {
-                createDirectories(versionDirectoryPath);
-            }
-            String versionJson = JsonUtil.object2Json(versionEntity);
-            write(versionFilePath, versionJson.getBytes());
-        } catch (Exception ex) {
-            logger.error(ex.getMessage(), ex);
-        }
-
-    }
-
-    private void handleVersionInfo(VersionInfoEntity versionInfoEntity, Set<String> filteredItem) {
-        try {
-            String itemId = versionInfoEntity.getEntityId();
-            Path itemDirectory = Paths.get( ROOT_DIRECTORY + separator + itemId);
-            Path versionInfoFilePath = Paths.get(itemDirectory.toString() + separator + VERSION_INFO_FILE_PREFIX
-                    + itemId + JSON_POSTFIX);
-            if (exists(itemDirectory)) {
-                String versionJson = JsonUtil.object2Json(versionInfoEntity);
-                write(versionInfoFilePath, versionJson.getBytes());
-            }
-        } catch (Exception ex) {
-            logger.error(ex.getMessage(), ex);
-        }
-
-    }
-}
diff --git a/openecomp-be/tools/zusammen-tools/src/main/java/org/openecomp/core/tools/Commands/importdata/ElementImport.java b/openecomp-be/tools/zusammen-tools/src/main/java/org/openecomp/core/tools/Commands/importdata/ElementImport.java
deleted file mode 100644
index d439468..0000000
--- a/openecomp-be/tools/zusammen-tools/src/main/java/org/openecomp/core/tools/Commands/importdata/ElementImport.java
+++ /dev/null
@@ -1,135 +0,0 @@
-package org.openecomp.core.tools.Commands.importdata;
-
-import com.amdocs.zusammen.datatypes.Id;
-import com.amdocs.zusammen.datatypes.SessionContext;
-import org.openecomp.core.tools.store.ElementCassandraLoader;
-import org.openecomp.core.tools.store.ElementNamespaceHandler;
-import org.openecomp.core.tools.store.VersionCassandraLoader;
-import org.openecomp.core.tools.store.zusammen.datatypes.ElementEntity;
-import org.openecomp.sdc.logging.api.Logger;
-import org.openecomp.sdc.logging.api.LoggerFactory;
-
-import java.io.File;
-import java.io.IOException;
-import java.nio.ByteBuffer;
-import java.nio.file.Files;
-import java.nio.file.Path;
-import java.nio.file.Paths;
-import java.util.Arrays;
-import java.util.HashSet;
-import java.util.Set;
-
-import static java.io.File.separator;
-import static org.openecomp.core.tools.Commands.exportdata.ImportProperties.*;
-
-public class ElementImport {
-    private static final Logger logger = LoggerFactory.getLogger(ElementImport.class);
-    public static final String ROOT_ITEM = Id.ZERO.getValue();
-
-    private ElementCassandraLoader elementCassandraLoader = new ElementCassandraLoader();
-    private ElementNamespaceHandler cassandraElementRepository = new ElementNamespaceHandler();
-    private VersionCassandraLoader versionCassandraLoader = new VersionCassandraLoader();
-
-    public void loadPath(SessionContext sessionContext, Path elementDir, String elementId, String[]
-            pathObjects) {
-        try {
-            if (!Files.isDirectory(elementDir)){
-                return;
-            }
-            // load info file
-            ElementEntity elementEntity = new ElementEntity();
-            Path infoFilePath = Paths.get(elementDir.toString() + separator + ELEMENT_INFO_PREFIX
-                    + elementId + JSON_POSTFIX);
-            if (Files.exists(infoFilePath)) {
-                String info = new String(Files.readAllBytes(infoFilePath));
-                elementEntity.setInfo(info);
-            }
-            // load relation file
-            Path realtionsFilePath = Paths.get(elementDir.toString() + separator
-                    + ELEMENT_RELATION_PREFIX + elementId + JSON_POSTFIX);
-            if (Files.exists(realtionsFilePath)) {
-                String relations = new String(Files.readAllBytes(realtionsFilePath));
-                elementEntity.setRelations(relations);
-            }
-
-            //load entity data
-            Path dataFilePath = Paths.get(elementDir.toString() + separator
-                    + ELEMENT_DATA_PREFIX + elementId + JSON_POSTFIX);
-            if (Files.exists(dataFilePath)) {
-                byte[] bytes = Files.readAllBytes(dataFilePath);
-                ByteBuffer data = ByteBuffer.wrap(bytes);
-                elementEntity.setData(data);
-            }
-
-            //load visualization
-            Path visualFilePath = Paths.get(elementDir.toString() + separator
-                    + ELEMENT_VISUALIZATION_PREFIX + elementId);
-            if (Files.exists(visualFilePath)) {
-                byte[] bytes = Files.readAllBytes(visualFilePath);
-                ByteBuffer visualization = ByteBuffer.wrap(bytes);
-                elementEntity.setVisualization(visualization);
-            }
-
-            //load searchable
-            Path searchableFilePath = Paths.get(elementDir.toString() + separator
-                    + ELEMENT_SEARCHABLE_PREFIX + elementId);
-            if (Files.exists(searchableFilePath)) {
-                byte[] bytes = Files.readAllBytes(searchableFilePath);
-                ByteBuffer searchable = ByteBuffer.wrap(bytes);
-                elementEntity.setSearchableData(searchable);
-            }
-            String element_Id = pathObjects[pathObjects.length - 1];
-            elementEntity.setSpace(pathObjects[2]);
-            elementEntity.setItemId(pathObjects[0]);
-            elementEntity.setVersionId(pathObjects[1]);
-            elementEntity.setElement_id(element_Id);
-            elementEntity.setNamespace(getNameSpace(pathObjects));
-            elementEntity.setParentId(getParentId(pathObjects));
-            elementEntity.setSubElementIds(getAllSubElementsIds(elementDir, element_Id));
-            elementCassandraLoader.createEntity(elementEntity);
-            cassandraElementRepository.createElementNamespace(elementEntity);
-            versionCassandraLoader.insertElementToVersion(elementEntity);
-        } catch (Exception ex) {
-            logger.error(ex.getMessage(), ex);
-        }
-    }
-
-    private String getParentId(String[] pathObjects) {
-
-        if (pathObjects[pathObjects.length - 1].equals(ROOT_ITEM)) {
-            return null;
-        }
-        if (pathObjects.length == 4) {
-            return ROOT_ITEM;
-        }
-        return pathObjects[pathObjects.length - 2];
-    }
-
-    private Set<String> getAllSubElementsIds(Path root, String elementId) throws IOException {
-        if (elementId.equals(ROOT_ITEM)) {
-            root = root.getParent();
-        }
-        File file = root.toFile();
-        Set<String> retVal = new HashSet<>();
-        File[] files = file.listFiles();
-        for (File f : files){
-            if (f.isDirectory()){
-                retVal.add(f.getName());
-            }
-        }
-        retVal.remove(ROOT_ITEM);
-        return retVal;
-
-    }
-
-    private String getNameSpace(String[] pathObjects) {
-        if (pathObjects.length <= 4) {
-            return "";
-        }
-        if (pathObjects.length == 5) {
-            return pathObjects[3];
-        }
-        return Arrays.stream(pathObjects, 3, pathObjects.length - 1)
-                .reduce("", (s1, s2) -> s1 + File.separator + s2);
-    }
-}
diff --git a/openecomp-be/tools/zusammen-tools/src/main/java/org/openecomp/core/tools/Commands/importdata/ItemImport.java b/openecomp-be/tools/zusammen-tools/src/main/java/org/openecomp/core/tools/Commands/importdata/ItemImport.java
deleted file mode 100644
index 4dd4a1f..0000000
--- a/openecomp-be/tools/zusammen-tools/src/main/java/org/openecomp/core/tools/Commands/importdata/ItemImport.java
+++ /dev/null
@@ -1,44 +0,0 @@
-package org.openecomp.core.tools.Commands.importdata;
-
-import com.amdocs.zusammen.datatypes.SessionContext;
-import com.amdocs.zusammen.datatypes.item.Item;
-import com.amdocs.zusammen.plugin.statestore.cassandra.dao.ItemDao;
-import com.amdocs.zusammen.plugin.statestore.cassandra.dao.ItemDaoFactory;
-import org.openecomp.core.utilities.json.JsonUtil;
-import org.openecomp.sdc.logging.api.Logger;
-import org.openecomp.sdc.logging.api.LoggerFactory;
-
-import java.io.File;
-import java.nio.file.Files;
-import java.nio.file.Path;
-import java.nio.file.Paths;
-
-import static org.openecomp.core.tools.Commands.exportdata.ImportProperties.JSON_POSTFIX;
-
-public class ItemImport {
-    private static final Logger logger = LoggerFactory.getLogger(ItemImport.class);
-
-    public void loadPath(SessionContext sessionContext, Path itemDir, String itemName) {
-        try {
-            Path itemPath = Paths.get(itemDir.toString() + File.separator + itemName + JSON_POSTFIX);
-            if (!Files.exists(itemPath)) {
-                return;
-            }
-            String itemJson = new String(Files.readAllBytes(itemPath));
-            if (itemJson.trim().isEmpty()) {
-                return;
-            }
-            Item item = JsonUtil.json2Object(itemJson, Item.class);
-            ItemDao itemDao = getItemDao(sessionContext);
-            itemDao.create(sessionContext, item.getId(), item.getInfo(), item.getCreationTime());
-            logger.info("Item Created :"+item.getInfo().getName()+" , "+item.getId());
-            System.out.println("Item Created :"+item.getInfo().getName()+" , "+item.getId());
-        } catch (Exception ex) {
-            logger.error(ex.getMessage(), ex);
-        }
-    }
-
-    private ItemDao getItemDao(SessionContext context) {
-        return ItemDaoFactory.getInstance().createInterface(context);
-    }
-}
diff --git a/openecomp-be/tools/zusammen-tools/src/main/java/org/openecomp/core/tools/Commands/importdata/TreeWalker.java b/openecomp-be/tools/zusammen-tools/src/main/java/org/openecomp/core/tools/Commands/importdata/TreeWalker.java
deleted file mode 100644
index 30c4152..0000000
--- a/openecomp-be/tools/zusammen-tools/src/main/java/org/openecomp/core/tools/Commands/importdata/TreeWalker.java
+++ /dev/null
@@ -1,54 +0,0 @@
-package org.openecomp.core.tools.Commands.importdata;
-
-import com.amdocs.zusammen.datatypes.SessionContext;
-import org.openecomp.sdc.logging.api.Logger;
-import org.openecomp.sdc.logging.api.LoggerFactory;
-
-import java.io.File;
-import java.io.IOException;
-import java.nio.file.Files;
-import java.nio.file.Path;
-import java.util.stream.Stream;
-
-public class TreeWalker {
-    private static final Logger logger = LoggerFactory.getLogger(TreeWalker.class);
-
-    public static final void walkFiles(SessionContext sessionContext,Path rootDir, String filterItem) throws IOException {
-        try (Stream<Path> walk = Files.walk(rootDir)) {
-            walk.parallel().filter(path -> Files.isDirectory(path)).
-                    forEach(path -> handlePath(sessionContext,path, rootDir, filterItem));
-        }
-    }
-
-    private static final void handlePath(SessionContext sessionContext, Path path, Path root,String filterItem) {
-        String logicalPath = path.toString().replace(root.toString(), "");
-        if (logicalPath.startsWith(File.separator)){
-            logicalPath = logicalPath.substring(1);
-        }
-        String[] splitted = logicalPath.split(File.separator);
-        if(filterItem != null && splitted.length > 0 && !splitted[0].contains(filterItem)){
-            return;
-        }
-        switch (splitted.length) {
-            case 0:
-                //root - ignore
-                break;
-            case 1:     // handle Item
-                new ItemImport().loadPath(sessionContext,path,splitted[splitted.length -1]);
-                new VersionInfoImport().loadPath(sessionContext,path,splitted[splitted.length -1]);
-                break;
-            case 2:
-                //ignore this level
-                break;
-            case 3: // handle version
-                new VersionImport().loadPath(sessionContext,path,splitted[splitted.length -2]);
-                break;
-            default:
-                //handle elements
-                 new ElementImport().loadPath(sessionContext,path,splitted[splitted.length -1],splitted);
-                break;
-        }
-
-    }
-
-}
diff --git a/openecomp-be/tools/zusammen-tools/src/main/java/org/openecomp/core/tools/Commands/importdata/VersionImport.java b/openecomp-be/tools/zusammen-tools/src/main/java/org/openecomp/core/tools/Commands/importdata/VersionImport.java
deleted file mode 100644
index 48433d8..0000000
--- a/openecomp-be/tools/zusammen-tools/src/main/java/org/openecomp/core/tools/Commands/importdata/VersionImport.java
+++ /dev/null
@@ -1,41 +0,0 @@
-package org.openecomp.core.tools.Commands.importdata;
-
-import com.amdocs.zusammen.datatypes.SessionContext;
-import org.openecomp.core.tools.store.VersionCassandraLoader;
-import org.openecomp.core.tools.store.zusammen.datatypes.VersionEntity;
-import org.openecomp.core.utilities.json.JsonUtil;
-import org.openecomp.sdc.logging.api.Logger;
-import org.openecomp.sdc.logging.api.LoggerFactory;
-
-import java.nio.file.Files;
-import java.nio.file.Path;
-import java.nio.file.Paths;
-
-import static java.io.File.separator;
-import static org.openecomp.core.tools.Commands.exportdata.ImportProperties.JSON_POSTFIX;
-import static org.openecomp.core.tools.Commands.exportdata.ImportProperties.VERSION_FILE_PREFIX;
-
-public class VersionImport {
-    private static final Logger logger = LoggerFactory.getLogger(VersionImport.class);
-
-    public void loadPath(SessionContext sessionContext, Path versionDir , String versionId){
-        try {
-            Path versionPath = Paths.get(versionDir.toString() + separator + VERSION_FILE_PREFIX
-                    + versionId + JSON_POSTFIX);
-            if (!Files.exists(versionPath)) {
-                return;
-            }
-            String versionJson = new String(Files.readAllBytes(versionPath));
-            if (versionJson.trim().isEmpty()) {
-                return;
-            }
-            VersionEntity versionEntity = JsonUtil.json2Object(versionJson, VersionEntity.class);
-            VersionCassandraLoader versionCassandraLoader = new VersionCassandraLoader();
-            versionCassandraLoader.insertVersion(versionEntity);
-        } catch (Exception ex) {
-            logger.error(ex.getMessage(), ex);
-        }
-    }
-
-
-}
diff --git a/openecomp-be/tools/zusammen-tools/src/main/java/org/openecomp/core/tools/Commands/importdata/VersionInfoImport.java b/openecomp-be/tools/zusammen-tools/src/main/java/org/openecomp/core/tools/Commands/importdata/VersionInfoImport.java
deleted file mode 100644
index e9d4174..0000000
--- a/openecomp-be/tools/zusammen-tools/src/main/java/org/openecomp/core/tools/Commands/importdata/VersionInfoImport.java
+++ /dev/null
@@ -1,41 +0,0 @@
-package org.openecomp.core.tools.Commands.importdata;
-
-import com.amdocs.zusammen.datatypes.SessionContext;
-import org.openecomp.core.tools.store.VersionInfoCassandraLoader;
-import org.openecomp.core.utilities.json.JsonUtil;
-import org.openecomp.sdc.logging.api.Logger;
-import org.openecomp.sdc.logging.api.LoggerFactory;
-import org.openecomp.sdc.versioning.dao.types.VersionInfoEntity;
-
-import java.nio.file.Files;
-import java.nio.file.Path;
-import java.nio.file.Paths;
-
-import static java.io.File.separator;
-import static org.openecomp.core.tools.Commands.exportdata.ImportProperties.JSON_POSTFIX;
-import static org.openecomp.core.tools.Commands.exportdata.ImportProperties.VERSION_INFO_FILE_PREFIX;
-
-public class VersionInfoImport {
-    private static final Logger logger = LoggerFactory.getLogger(VersionInfoImport.class);
-
-    public void loadPath(SessionContext sessionContext, Path itemPath, String itemId) {
-        try {
-             Path versionInfoFilePath = Paths.get(itemPath.toString() + separator + VERSION_INFO_FILE_PREFIX
-                    + itemId + JSON_POSTFIX);
-            if (!Files.exists(versionInfoFilePath)) {
-                return;
-            }
-            String versionInfoJson = new String(Files.readAllBytes(versionInfoFilePath));
-            if (versionInfoJson.trim().isEmpty()) {
-                return;
-            }
-            VersionInfoEntity versionInfoEntity = JsonUtil.json2Object(versionInfoJson, VersionInfoEntity.class);
-            VersionInfoCassandraLoader versionInfoCassandraLoader = new VersionInfoCassandraLoader();
-            versionInfoCassandraLoader.insertVersionInfo(versionInfoEntity);
-        } catch (Exception ex) {
-            logger.error(ex.getMessage(), ex);
-        }
-    }
-
-
-}
diff --git a/openecomp-be/tools/zusammen-tools/src/main/java/org/openecomp/core/tools/concurrent/ItemHealingTask.java b/openecomp-be/tools/zusammen-tools/src/main/java/org/openecomp/core/tools/concurrent/ItemHealingTask.java
index 39b62d4..878390f 100644
--- a/openecomp-be/tools/zusammen-tools/src/main/java/org/openecomp/core/tools/concurrent/ItemHealingTask.java
+++ b/openecomp-be/tools/zusammen-tools/src/main/java/org/openecomp/core/tools/concurrent/ItemHealingTask.java
@@ -1,13 +1,8 @@
 package org.openecomp.core.tools.concurrent;
 
-import org.openecomp.sdc.vendorsoftwareproduct.VendorSoftwareProductConstants;
+import org.openecomp.sdc.healing.api.HealingManager;
 import org.openecomp.sdc.vendorsoftwareproduct.VendorSoftwareProductManager;
-import org.openecomp.sdc.vendorsoftwareproduct.dao.type.VspDetails;
-import org.openecomp.sdc.versioning.VersioningManager;
-import org.openecomp.sdc.versioning.VersioningUtil;
 import org.openecomp.sdc.versioning.dao.types.Version;
-import org.openecomp.sdc.versioning.types.VersionInfo;
-import org.openecomp.sdc.versioning.types.VersionableEntityAction;
 
 import java.util.concurrent.Callable;
 
@@ -17,55 +12,44 @@
 public class ItemHealingTask implements Callable<String> {
 
   private String itemId;
-  private String versionId;
-  private String user;
+  private Version version;
   private VendorSoftwareProductManager vspManager;
-  private VersioningManager versioningManager;
+  private HealingManager healingManager;
 
   public String getItemId() {
     return itemId;
   }
 
   public String getVersionId() {
-    return versionId;
+//    return version.getId();
+    return null;
   }
 
 
-  public ItemHealingTask(String itemId, String versionId, String user,
+  public ItemHealingTask(String itemId, String versionId,
                          VendorSoftwareProductManager vspManager,
-                         VersioningManager versioningManager) {
-    this.itemId = itemId;
-    this.versionId = versionId;
-    this.user = user;
-    this.versioningManager = versioningManager;
+                         HealingManager healingManager) {
+//    this.itemId = itemId;
+//    this.version = new Version(versionId);
     this.vspManager = vspManager;
+    this.healingManager = healingManager;
+
   }
 
   @Override
   public String call() throws Exception {
-
-    VersionInfo versionInfo = getVersionInfo(itemId, VersionableEntityAction.Read, user);
-    Version resolvedVersion = VersioningUtil.resolveVersion(Version.valueOf(versionId),
-        versionInfo, user);
-    VspDetails vspDetails = vspManager.getVsp(itemId, resolvedVersion, user);
-
-    try {
-      vspManager.callAutoHeal(itemId, versionInfo, vspDetails, user);
-
-    } catch (Exception e) {
-      return (String.format("healing failed on vsp: %s with id: %s, versionId: %s, resolved " +
-              "Version: %s, with message: %s",vspDetails.getName(),itemId,
-          versionId,resolvedVersion,e.getMessage()));
-    }
-
-    return String.format("healed vsp: %s, with id: %s, versionId:%s, resolved version: %s",
-        vspDetails.getName(), itemId, versionId,resolvedVersion );
-  }
-
-  private VersionInfo getVersionInfo(String vendorSoftwareProductId, VersionableEntityAction action,
-                                     String user) {
-    return versioningManager.getEntityVersionInfo(
-        VendorSoftwareProductConstants.VENDOR_SOFTWARE_PRODUCT_VERSIONABLE_TYPE,
-        vendorSoftwareProductId, user, action);
+//    VspDetails vspDetails = vspManager.getVsp(itemId, version);
+//
+//    try {
+//      healingManager.healItemVersion(itemId, version, ItemType.vsp, true);
+//    } catch (Exception e) {
+//      return (String
+//          .format("healing failed on vsp: %s with id: %s, versionId: %s, with message: %s",
+//              vspDetails.getName(), itemId, version.getId(), e.getMessage()));
+//    }
+//
+//    return String.format("healed vsp: %s, with id: %s, versionId: %s",
+//        vspDetails.getName(), itemId, version.getId());
+    return null;
   }
 }
diff --git a/openecomp-be/tools/zusammen-tools/src/main/java/org/openecomp/core/tools/exportinfo/ExportDataCommand.java b/openecomp-be/tools/zusammen-tools/src/main/java/org/openecomp/core/tools/exportinfo/ExportDataCommand.java
new file mode 100644
index 0000000..5dcc72d
--- /dev/null
+++ b/openecomp-be/tools/zusammen-tools/src/main/java/org/openecomp/core/tools/exportinfo/ExportDataCommand.java
@@ -0,0 +1,125 @@
+/**
+ * Copyright © 2016-2017 European Support Limited.
+ */
+package org.openecomp.core.tools.exportinfo;
+
+import com.amdocs.zusammen.datatypes.SessionContext;
+import com.datastax.driver.core.ResultSet;
+import com.datastax.driver.core.ResultSetFuture;
+import com.datastax.driver.core.Session;
+import com.google.common.collect.Sets;
+import com.google.common.util.concurrent.FutureCallback;
+import com.google.common.util.concurrent.Futures;
+import org.apache.commons.io.FileUtils;
+import org.openecomp.core.nosqldb.impl.cassandra.CassandraSessionFactory;
+import org.openecomp.core.tools.importinfo.ImportProperties;
+import org.openecomp.core.tools.util.Utils;
+import org.openecomp.core.tools.util.ZipUtils;
+import org.openecomp.core.zusammen.impl.CassandraConnectionInitializer;
+import org.openecomp.sdc.logging.api.Logger;
+import org.openecomp.sdc.logging.api.LoggerFactory;
+import org.yaml.snakeyaml.Yaml;
+
+import java.io.File;
+import java.io.IOException;
+import java.io.InputStream;
+import java.nio.file.Path;
+import java.nio.file.Paths;
+import java.time.LocalDateTime;
+import java.time.format.DateTimeFormatter;
+import java.util.HashSet;
+import java.util.List;
+import java.util.Map;
+import java.util.Set;
+import java.util.concurrent.CountDownLatch;
+import java.util.stream.Collectors;
+
+import static java.nio.file.Files.createDirectories;
+
+
+public class ExportDataCommand {
+    private static final Logger logger = LoggerFactory.getLogger(ExportDataCommand.class);
+    public static final String JOIN_DELIMITER = "$#";
+    public static final String JOIN_DELIMITER_SPILTTER = "\\$\\#";
+    public static final String MAP_DELIMITER = "!@";
+    public static final String MAP_DELIMITER_SPLITTER = "\\!\\@";
+    public static final String EXPORT_FILE_NAME = "ITEM_EXPORT";
+
+    public static void exportData(SessionContext sessionContext, String filterItem) {
+        try {
+            CassandraConnectionInitializer.setCassandraConnectionPropertiesToSystem();
+            final Set<String> filteredItems = Sets.newHashSet(filterItem);
+            Path rootDir = Paths.get(ImportProperties.ROOT_DIRECTORY);
+            initDir(rootDir);
+            Set<String> fis = filteredItems.stream().map(fi -> fi.replaceAll("\\r", "")).collect(Collectors.toSet());
+
+            Map<String, List<String>> queries;
+            Yaml yaml = new Yaml();
+            try (InputStream is = ExportDataCommand.class.getResourceAsStream("/queries.yaml")) {
+                queries = (Map<String, List<String>>) yaml.load(is);
+            }
+            List<String> queriesList = queries.get("queries");
+            List<String> itempsColumns = queries.get("item_columns");
+            Set<String> vlms = new HashSet<>();
+            CountDownLatch doneQueries = new CountDownLatch(queriesList.size());
+            for (int i = 0; i < queriesList.size(); i++) {
+                executeQuery(queriesList.get(i), fis, itempsColumns.get(i), vlms, doneQueries);
+            }
+            doneQueries.await();
+            if (!vlms.isEmpty()) {
+                CountDownLatch doneVmls = new CountDownLatch(queriesList.size());
+
+                for (int i = 0; i < queriesList.size(); i++) {
+                    executeQuery(queriesList.get(i), vlms, itempsColumns.get(i), null, doneVmls);
+                }
+
+                doneVmls.await();
+            }
+            zipPath(rootDir);
+            FileUtils.forceDelete(rootDir.toFile());
+        } catch (Exception ex) {
+            Utils.logError(logger, ex);
+        }
+
+    }
+
+
+    private static boolean executeQuery(final String query, final Set<String> filteredItems, final String filteredColumn,
+                                        final Set<String> vlms, final CountDownLatch donequerying) {
+        Session session = CassandraSessionFactory.getSession();
+        ResultSetFuture resultSetFuture = session.executeAsync(query);
+        Futures.addCallback(resultSetFuture, new FutureCallback<ResultSet>() {
+            @Override
+            public void onSuccess(ResultSet resultSet) {
+                new ExportSerializer().serializeResult(resultSet, filteredItems, filteredColumn, vlms);
+                donequerying.countDown();
+            }
+
+            @Override
+            public void onFailure(Throwable t) {
+                Utils.logError(logger, "Query failed :" + query, t);
+                donequerying.countDown();
+            }
+        });
+        return true;
+    }
+
+    private static void zipPath(Path rootDir) throws Exception {
+        LocalDateTime date = LocalDateTime.now();
+        DateTimeFormatter formatter = DateTimeFormatter.ISO_LOCAL_DATE_TIME;
+        String dateStr = date.format(formatter);
+        dateStr = dateStr.replaceAll(":", "_");
+        String zipFile = System.getProperty("user.home") + File.separatorChar + "onboarding_import" + dateStr + ".zip";
+        ZipUtils.createZip(zipFile, rootDir);
+        Utils.printMessage(logger, "Exported file :" + zipFile);
+    }
+
+
+    public static void initDir(Path rootDir) throws IOException {
+        if (rootDir.toFile().exists()) {
+            FileUtils.forceDelete(rootDir.toFile());
+        }
+        createDirectories(rootDir);
+    }
+
+}
\ No newline at end of file
diff --git a/openecomp-be/tools/zusammen-tools/src/main/java/org/openecomp/core/tools/exportinfo/ExportSerializer.java b/openecomp-be/tools/zusammen-tools/src/main/java/org/openecomp/core/tools/exportinfo/ExportSerializer.java
new file mode 100644
index 0000000..3c917b1
--- /dev/null
+++ b/openecomp-be/tools/zusammen-tools/src/main/java/org/openecomp/core/tools/exportinfo/ExportSerializer.java
@@ -0,0 +1,152 @@
+/**
+ * Copyright © 2016-2017 European Support Limited.
+ */
+package org.openecomp.core.tools.exportinfo;
+
+import com.datastax.driver.core.DataType.Name;
+import com.datastax.driver.core.ResultSet;
+import com.datastax.driver.core.Row;
+import com.google.gson.JsonElement;
+import com.google.gson.JsonParser;
+import org.codehaus.jackson.map.ObjectMapper;
+import org.openecomp.core.tools.importinfo.ImportProperties;
+import org.openecomp.core.tools.model.ColumnDefinition;
+import org.openecomp.core.tools.model.TableData;
+import org.openecomp.core.tools.util.Utils;
+import org.openecomp.sdc.logging.api.Logger;
+import org.openecomp.sdc.logging.api.LoggerFactory;
+
+import java.io.File;
+import java.io.IOException;
+import java.nio.ByteBuffer;
+import java.nio.file.Paths;
+import java.util.ArrayList;
+import java.util.Base64;
+import java.util.Iterator;
+import java.util.List;
+import java.util.Map;
+import java.util.Set;
+import java.util.stream.Collectors;
+
+import static org.openecomp.core.tools.importinfo.ImportSingleTable.dataTypesMap;
+
+public class ExportSerializer {
+
+    private static final Logger logger = LoggerFactory.getLogger(ExportDataCommand.class);
+    private static final String ELEMENT_TABLE_NAME = "element";
+    private static final String ELEMENT_INFO_COLUMN_NAME = "info";
+
+    public void serializeResult(final ResultSet resultSet, final Set<String> filteredItems, final String filteredColumn, Set<String> vlms) {
+        try {
+            TableData tableData = new TableData();
+            tableData.definitions = resultSet.getColumnDefinitions().asList().stream().map(column -> new ColumnDefinition(column)).collect(Collectors.toList());
+            String table = tableData.definitions.iterator().next().getTable();
+            boolean isElementTable = table.equals(ELEMENT_TABLE_NAME);
+            Iterator<Row> iterator = resultSet.iterator();
+            iterator.forEachRemaining(row -> {
+                if (!filteredItems.contains(row.getString(filteredColumn))) {
+                    return;
+                }
+                List<String> rowData = new ArrayList<>();
+                for (int i = 0; i < tableData.definitions.size(); i++) {
+                    ColumnDefinition columnDefinition = tableData.definitions.get(i);
+                    Name name = dataTypesMap.get(columnDefinition.getType());
+                    boolean checkForVLM = isElementTable && columnDefinition.getName().equals(ELEMENT_INFO_COLUMN_NAME);
+                    Object data;
+                    data = convertByType(vlms, row, i, name, checkForVLM);
+                    rowData.add(data.toString());
+                }
+                tableData.rows.add(rowData);
+            });
+            ObjectMapper objectMapper = new ObjectMapper();
+            String fileName = ImportProperties.ROOT_DIRECTORY + File.separator + table + "_" + System.currentTimeMillis() + ".json";
+            objectMapper.writeValue(Paths.get(fileName).toFile(), tableData);
+            Utils.printMessage(logger, "File exported is :" + fileName);
+
+        } catch (IOException e) {
+            Utils.logError(logger, e);
+            System.exit(1);
+        }
+    }
+
+    private Object convertByType(Set<String> vlms, Row row, int i, Name name, boolean checkForVLM) {
+        Object data;
+        switch (name) {
+            case VARCHAR:
+            case TEXT:
+            case ASCII:
+                String string = row.getString(i);
+                if (string == null) {
+                    string = "";
+                }
+                if (checkForVLM && vlms != null){
+                    String vlm = extractVlm(string);
+                    if (vlm!= null) {
+                        vlms.add(vlm);
+                    }
+                }
+                data = Base64.getEncoder().encodeToString(string.getBytes());
+                break;
+            case BLOB:
+                ByteBuffer bytes = row.getBytes(i);
+                if (bytes == null) {
+                    bytes = ByteBuffer.wrap("".getBytes());
+                }
+                data = Base64.getEncoder().encodeToString(bytes.array());
+                break;
+            case TIMESTAMP:
+                data = row.getDate(i).getTime();
+                break;
+            case BOOLEAN:
+                data = row.getBool(i);
+                break;
+            case COUNTER:
+                data = row.getLong(i);
+                break;
+            case INT:
+                data = row.getInt(i);
+                break;
+            case FLOAT:
+                data = row.getFloat(i);
+                break;
+            case SET:
+                Set set = row.getSet(i, Object.class);
+                Object joined = set.stream().map(o -> o.toString()).collect(Collectors.joining(ExportDataCommand.JOIN_DELIMITER));
+                data = Base64.getEncoder().encodeToString(joined.toString().getBytes());
+                break;
+            case MAP:
+                Map<Object,Object> map = row.getMap(i, Object.class, Object.class);
+                Set<Map.Entry<Object,Object>> entrySet = map.entrySet();
+                Object mapAsString = entrySet.parallelStream().map(entry -> entry.getKey().toString() + ExportDataCommand.MAP_DELIMITER +entry.getValue().toString())
+                        .collect(Collectors.joining(ExportDataCommand.MAP_DELIMITER));
+                data = Base64.getEncoder().encodeToString(mapAsString.toString().getBytes());
+                break;
+            default:
+                throw new UnsupportedOperationException("Name is not supported :" + name);
+        }
+        return data;
+    }
+
+    protected String extractVlm(String injson) {
+        try {
+            if (injson == null){
+                return null;
+            }
+            JsonElement root = new JsonParser().parse(injson);
+            if (root == null){
+                return null;
+            }
+            JsonElement properties = root.getAsJsonObject().get("properties");
+            if (properties == null){
+                return null;
+            }
+            JsonElement vendorId = properties.getAsJsonObject().get("vendorId");
+            if (vendorId == null){
+                return null;
+            }
+            return vendorId.getAsString();
+        } catch (Exception ex){
+            return null;
+        }
+    }
+}
diff --git a/openecomp-be/tools/zusammen-tools/src/main/java/org/openecomp/core/tools/importinfo/ImportDataCommand.java b/openecomp-be/tools/zusammen-tools/src/main/java/org/openecomp/core/tools/importinfo/ImportDataCommand.java
new file mode 100644
index 0000000..bae6cfa
--- /dev/null
+++ b/openecomp-be/tools/zusammen-tools/src/main/java/org/openecomp/core/tools/importinfo/ImportDataCommand.java
@@ -0,0 +1,37 @@
+package org.openecomp.core.tools.importinfo;
+
+
+import com.amdocs.zusammen.datatypes.SessionContext;
+import org.apache.commons.io.FileUtils;
+import org.openecomp.core.tools.exportinfo.ExportDataCommand;
+import org.openecomp.core.tools.util.Utils;
+import org.openecomp.core.tools.util.ZipUtils;
+import org.openecomp.core.zusammen.impl.CassandraConnectionInitializer;
+import org.openecomp.sdc.logging.api.Logger;
+import org.openecomp.sdc.logging.api.LoggerFactory;
+
+import java.io.IOException;
+import java.nio.file.Files;
+import java.nio.file.Path;
+import java.nio.file.Paths;
+import java.util.stream.Stream;
+
+public class ImportDataCommand {
+
+    private static final Logger logger = LoggerFactory.getLogger(ImportDataCommand.class);
+
+    public static final void execute(SessionContext sessionContext, String uploadFile) {
+        try {
+            CassandraConnectionInitializer.setCassandraConnectionPropertiesToSystem();
+            Path outputFolder = Paths.get(ImportProperties.ROOT_DIRECTORY);
+            ExportDataCommand.initDir(outputFolder); //clear old imports.
+            ZipUtils.unzip(Paths.get(uploadFile), outputFolder);
+            try( Stream<Path> files = Files.list(outputFolder)) {
+                files.forEach(file -> new ImportSingleTable().importFile(file));
+            }
+            FileUtils.forceDelete(outputFolder.toFile()); // leaves directory clean
+        } catch (IOException e) {
+            Utils.logError(logger, e);
+        }
+    }
+}
diff --git a/openecomp-be/tools/zusammen-tools/src/main/java/org/openecomp/core/tools/importinfo/ImportProperties.java b/openecomp-be/tools/zusammen-tools/src/main/java/org/openecomp/core/tools/importinfo/ImportProperties.java
new file mode 100644
index 0000000..b9a27fa
--- /dev/null
+++ b/openecomp-be/tools/zusammen-tools/src/main/java/org/openecomp/core/tools/importinfo/ImportProperties.java
@@ -0,0 +1,7 @@
+package org.openecomp.core.tools.importinfo;
+
+import java.io.File;
+
+public class ImportProperties {
+    public static final String ROOT_DIRECTORY = System.getProperty("user.home")+File.separator+ "onboarding_import";
+}
diff --git a/openecomp-be/tools/zusammen-tools/src/main/java/org/openecomp/core/tools/importinfo/ImportSingleTable.java b/openecomp-be/tools/zusammen-tools/src/main/java/org/openecomp/core/tools/importinfo/ImportSingleTable.java
new file mode 100644
index 0000000..7504ad1
--- /dev/null
+++ b/openecomp-be/tools/zusammen-tools/src/main/java/org/openecomp/core/tools/importinfo/ImportSingleTable.java
@@ -0,0 +1,166 @@
+package org.openecomp.core.tools.importinfo;
+
+import com.datastax.driver.core.BoundStatement;
+import com.datastax.driver.core.DataType.Name;
+import com.datastax.driver.core.PreparedStatement;
+import com.datastax.driver.core.ResultSet;
+import com.datastax.driver.core.ResultSetFuture;
+import com.datastax.driver.core.Session;
+import com.google.common.collect.ImmutableMap;
+import com.google.common.collect.ImmutableMap.Builder;
+import com.google.common.collect.Sets;
+import com.google.common.util.concurrent.FutureCallback;
+import com.google.common.util.concurrent.Futures;
+import org.apache.commons.lang3.StringUtils;
+import org.codehaus.jackson.map.ObjectMapper;
+import org.openecomp.core.nosqldb.impl.cassandra.CassandraSessionFactory;
+import org.openecomp.core.tools.exportinfo.ExportDataCommand;
+import org.openecomp.core.tools.model.ColumnDefinition;
+import org.openecomp.core.tools.model.TableData;
+import org.openecomp.core.tools.util.Utils;
+import org.openecomp.sdc.logging.api.Logger;
+import org.openecomp.sdc.logging.api.LoggerFactory;
+
+import java.io.IOException;
+import java.nio.ByteBuffer;
+import java.nio.file.Path;
+import java.util.Base64;
+import java.util.Date;
+import java.util.HashMap;
+import java.util.List;
+import java.util.Map;
+import java.util.Set;
+import java.util.stream.Collectors;
+
+public class ImportSingleTable {
+
+    private static final Logger logger = LoggerFactory.getLogger(ImportSingleTable.class);
+
+    public static final String INSERT_INTO = "INSERT INTO ";
+    public static final String VALUES = " VALUES ";
+    private static final Map<String, PreparedStatement> statementsCache = new HashMap<>();
+
+    public void importFile(Path file) {
+        try {
+            ObjectMapper objectMapper = new ObjectMapper();
+            TableData tableData = objectMapper.readValue(file.toFile(), TableData.class);
+            Session session = CassandraSessionFactory.getSession();
+            PreparedStatement ps = getPrepareStatement(tableData, session);
+            tableData.rows.parallelStream().forEach(row -> executeQuery(session, ps, tableData.definitions, row));
+        } catch (IOException e) {
+            Utils.logError(logger, e);
+        }
+
+    }
+
+    private PreparedStatement getPrepareStatement(TableData tableData, Session session) {
+        String query = createQuery(tableData);
+        if (statementsCache.containsKey(query)) {
+            return statementsCache.get(query);
+        }
+        PreparedStatement preparedStatement = session.prepare(query);
+        statementsCache.put(query, preparedStatement);
+        return preparedStatement;
+    }
+
+    private void executeQuery(Session session, PreparedStatement ps, List<ColumnDefinition> definitions, List<String> rows) {
+        BoundStatement bind = ps.bind();
+        for (int i = 0; i < definitions.size(); i++) {
+            ColumnDefinition columnDefinition = definitions.get(i);
+            String rowData = rows.get(i);
+            Name name = dataTypesMap.get(columnDefinition.getType());
+            handleByType(bind, i, rowData, name);
+        }
+        ResultSetFuture resultSetFuture = session.executeAsync(bind);
+        Futures.addCallback(resultSetFuture, new FutureCallback<ResultSet>() {
+            @Override
+            public void onSuccess(ResultSet resultSet) {
+                Utils.printMessage(logger, "successful write ");
+            }
+
+            @Override
+            public void onFailure(Throwable t) {
+                Utils.logError(logger, t);
+            }
+        });
+    }
+
+    private void handleByType(BoundStatement bind, int i, String rowData, Name name) {
+        switch (name) {
+            case VARCHAR:
+            case TEXT:
+            case ASCII:
+                bind.setString(i, new String(Base64.getDecoder().decode(rowData)));
+                break;
+            case BLOB:
+                bind.setBytes(i, ByteBuffer.wrap(Base64.getDecoder().decode(rowData.getBytes())));
+                break;
+            case TIMESTAMP:
+                bind.setDate(i, new Date(Long.parseLong(rowData)));
+                break;
+            case BOOLEAN:
+                bind.setBool(i, Boolean.parseBoolean(rowData));
+                break;
+            case COUNTER:
+                bind.setLong(i, Long.parseLong(rowData));
+                break;
+            case INT:
+                bind.setInt(i, Integer.parseInt(rowData));
+                break;
+            case FLOAT:
+                bind.setFloat(i, Float.parseFloat(rowData));
+                break;
+            case SET:
+                byte[] decoded = Base64.getDecoder().decode(rowData);
+                String decodedStr = new String(decoded);
+                if (!StringUtils.isEmpty(decodedStr)) {
+                    String[] splitted = decodedStr.split(ExportDataCommand.JOIN_DELIMITER_SPILTTER);
+                    Set set = Sets.newHashSet(splitted);
+                    set.remove("");
+                    bind.setSet(i, set);
+                } else {
+                    bind.setSet(i, null);
+                }
+                break;
+            case MAP:
+                byte[] decodedMap = Base64.getDecoder().decode(rowData);
+                String mapStr = new String(decodedMap);
+                if (!StringUtils.isEmpty(mapStr)) {
+                    String[] splittedMap = mapStr.split(ExportDataCommand.JOIN_DELIMITER_SPILTTER);
+                    Map<String, String> map = new HashMap<>();
+                    for (String keyValue : splittedMap) {
+                        String[] split = keyValue.split(ExportDataCommand.MAP_DELIMITER_SPLITTER);
+                        map.put(split[0], split[1]);
+                    }
+                    bind.setMap(i, map);
+                } else {
+                    bind.setMap(i, null);
+                }
+                break;
+            default:
+                throw new UnsupportedOperationException("Name is not supported :" + name);
+
+        }
+    }
+
+    private String createQuery(TableData tableData) {
+        ColumnDefinition def = tableData.definitions.iterator().next();
+        StringBuilder sb = new StringBuilder();
+        sb.append(INSERT_INTO).append(def.getKeyspace()).append(".").append(def.getTable());
+        sb.append(tableData.definitions.stream().map(definition -> definition.getName()).collect(Collectors.joining(" , ", " ( ", " ) ")));
+        sb.append(VALUES).append(tableData.definitions.stream().map(definition -> "?").collect(Collectors.joining(" , ", " ( ", " ) "))).append(";");
+        return sb.toString();
+    }
+
+    public static final ImmutableMap<String, Name> dataTypesMap;
+
+    static {
+        Builder<String, Name> builder = ImmutableMap.builder();
+        Name[] values = Name.values();
+        for (Name name : values) {
+            builder.put(name.name().toLowerCase(), name);
+        }
+        dataTypesMap = builder.build();
+    }
+
+}
diff --git a/openecomp-be/tools/zusammen-tools/src/main/java/org/openecomp/core/tools/loaders/zusammen/VspGeneralLoader.java b/openecomp-be/tools/zusammen-tools/src/main/java/org/openecomp/core/tools/loaders/zusammen/VspGeneralLoader.java
deleted file mode 100644
index d92866b..0000000
--- a/openecomp-be/tools/zusammen-tools/src/main/java/org/openecomp/core/tools/loaders/zusammen/VspGeneralLoader.java
+++ /dev/null
@@ -1,40 +0,0 @@
-package org.openecomp.core.tools.loaders.zusammen;
-
-import com.amdocs.zusammen.datatypes.Id;
-import com.amdocs.zusammen.datatypes.SessionContext;
-import com.amdocs.zusammen.plugin.statestore.cassandra.dao.types.ElementEntityContext;
-import org.openecomp.core.zusammen.plugin.dao.impl.CassandraElementRepository;
-import org.openecomp.core.zusammen.plugin.dao.types.ElementEntity;
-import org.openecomp.sdc.vendorsoftwareproduct.dao.impl.zusammen.StructureElement;
-
-import java.util.HashMap;
-import java.util.List;
-import java.util.Map;
-import java.util.Optional;
-
-public class VspGeneralLoader {
-  public static Map<String, ElementEntity> load(SessionContext context,
-                                                Map<String, List<String>> vspItemVersionsMap) {
-    Map<String, ElementEntity> elementEntityMap = new HashMap<>();
-    System.setProperty("cassandra.dox.keystore", "zusammen_dox");
-    CassandraElementRepository cassandraElementRepository = new CassandraElementRepository();
-    for (Map.Entry<String, List<String>> entry : vspItemVersionsMap.entrySet()) {
-
-      for (String version : entry.getValue()) {
-
-        Optional<ElementEntity> result =
-            cassandraElementRepository.get(context, new ElementEntityContext(
-                    context.getUser().getUserName(),
-                    new Id(entry.getKey()),
-                    new Id(version)),
-                new ElementEntity(new Id(StructureElement.General.name())));
-        if (result.isPresent()) {
-          elementEntityMap.put(context.getUser().getUserName() + "_" + entry.getKey()
-              + "_" + version, result.get());
-        }
-      }
-    }
-
-    return elementEntityMap;
-  }
-}
diff --git a/openecomp-be/tools/zusammen-tools/src/main/java/org/openecomp/core/tools/loaders/zusammen/VspItemLoader.java b/openecomp-be/tools/zusammen-tools/src/main/java/org/openecomp/core/tools/loaders/zusammen/VspItemLoader.java
deleted file mode 100644
index 78b915c..0000000
--- a/openecomp-be/tools/zusammen-tools/src/main/java/org/openecomp/core/tools/loaders/zusammen/VspItemLoader.java
+++ /dev/null
@@ -1,4 +0,0 @@
-package org.openecomp.core.tools.loaders.zusammen;
-
-public class VspItemLoader {
-}
diff --git a/openecomp-be/tools/zusammen-tools/src/main/java/org/openecomp/core/tools/main/ZusammenMainTool.java b/openecomp-be/tools/zusammen-tools/src/main/java/org/openecomp/core/tools/main/ZusammenMainTool.java
index b55d517..1829887 100644
--- a/openecomp-be/tools/zusammen-tools/src/main/java/org/openecomp/core/tools/main/ZusammenMainTool.java
+++ b/openecomp-be/tools/zusammen-tools/src/main/java/org/openecomp/core/tools/main/ZusammenMainTool.java
@@ -3,9 +3,9 @@
 import com.amdocs.zusammen.datatypes.SessionContext;
 import com.amdocs.zusammen.datatypes.UserInfo;
 import org.openecomp.core.tools.Commands.HealAll;
-import org.openecomp.core.tools.Commands.ImportCommand;
-import org.openecomp.core.tools.Commands.ExportDataCommand;
-import org.openecomp.core.tools.Commands.ResetOldVersion;
+import org.openecomp.core.tools.Commands.SetHealingFlag;
+import org.openecomp.core.tools.exportinfo.ExportDataCommand;
+import org.openecomp.core.tools.importinfo.ImportDataCommand;
 import org.openecomp.core.tools.util.ToolsUtil;
 import org.openecomp.sdc.logging.api.Logger;
 import org.openecomp.sdc.logging.api.LoggerFactory;
@@ -39,13 +39,13 @@
 
     switch (COMMANDS.valueOf(command)){
       case RESET_OLD_VERSION:
-        ResetOldVersion.reset(context,ToolsUtil.getParam("v",args),ToolsUtil.getParam("n",args));
+        SetHealingFlag.populateHealingTable(ToolsUtil.getParam("v",args));
         break;
       case EXPORT:
         ExportDataCommand.exportData(context,ToolsUtil.getParam("i",args));
         break;
       case IMPORT:
-        ImportCommand.importData(context, ToolsUtil.getParam("f",args),ToolsUtil.getParam("i",args));
+        ImportDataCommand.execute(context, ToolsUtil.getParam("f",args));
         break;
       case HEAL_ALL:
         HealAll.healAll(ToolsUtil.getParam("t",args));
diff --git a/openecomp-be/tools/zusammen-tools/src/main/java/org/openecomp/core/tools/model/ColumnDefinition.java b/openecomp-be/tools/zusammen-tools/src/main/java/org/openecomp/core/tools/model/ColumnDefinition.java
new file mode 100644
index 0000000..846392c
--- /dev/null
+++ b/openecomp-be/tools/zusammen-tools/src/main/java/org/openecomp/core/tools/model/ColumnDefinition.java
@@ -0,0 +1,84 @@
+/**
+ * Copyright © 2016-2017 European Support Limited.
+ */
+package org.openecomp.core.tools.model;
+
+import com.datastax.driver.core.ColumnDefinitions.Definition;
+import com.datastax.driver.core.DataType;
+
+import java.util.Arrays;
+
+public class ColumnDefinition {
+
+    private String keyspace;
+    private String table;
+    private String name;
+    private String type;
+
+    public ColumnDefinition() {
+    }
+
+    public ColumnDefinition(String keyspace, String table, String name, DataType type) {
+        this.keyspace = keyspace;
+        this.table = table;
+        this.name = name;
+        this.type = type.getName().toString();
+    }
+
+    public ColumnDefinition(Definition definition) {
+        this(definition.getKeyspace(), definition.getTable(), definition.getName(), definition.getType());
+    }
+
+    /**
+     * The name of the keyspace this column is part of.
+     *
+     * @return the name of the keyspace this column is part of.
+     */
+    public String getKeyspace() {
+        return keyspace;
+    }
+
+    /**
+     * Returns the name of the table this column is part of.
+     *
+     * @return the name of the table this column is part of.
+     */
+    public String getTable() {
+        return table;
+    }
+
+    /**
+     * Returns the name of the column.
+     *
+     * @return the name of the column.
+     */
+    public String getName() {
+        return name;
+    }
+
+    /**
+     * Returns the type of the column.
+     *
+     * @return the type of the column.
+     */
+    public String getType() {
+        return type;
+    }
+
+    @Override
+    public final int hashCode() {
+        return Arrays.hashCode(new Object[]{keyspace, table, name, type});
+    }
+
+    @Override
+    public final boolean equals(Object o) {
+        if (!(o instanceof ColumnDefinition))
+            return false;
+
+        ColumnDefinition other = (ColumnDefinition) o;
+        return keyspace.equals(other.keyspace)
+                && table.equals(other.table)
+                && name.equals(other.name)
+                && type.equals(other.type);
+    }
+}
diff --git a/openecomp-be/tools/zusammen-tools/src/main/java/org/openecomp/core/tools/model/TableData.java b/openecomp-be/tools/zusammen-tools/src/main/java/org/openecomp/core/tools/model/TableData.java
new file mode 100644
index 0000000..155f35c
--- /dev/null
+++ b/openecomp-be/tools/zusammen-tools/src/main/java/org/openecomp/core/tools/model/TableData.java
@@ -0,0 +1,12 @@
+/**
+ * Copyright © 2016-2017 European Support Limited.
+ */
+package org.openecomp.core.tools.model;
+
+import java.util.ArrayList;
+import java.util.List;
+
+public class TableData {
+    public List<ColumnDefinition> definitions = new ArrayList<>();
+    public List<List<String>> rows = new ArrayList<>();
+}
diff --git a/openecomp-be/tools/zusammen-tools/src/main/java/org/openecomp/core/tools/store/CassandraElementRepository.java b/openecomp-be/tools/zusammen-tools/src/main/java/org/openecomp/core/tools/store/CassandraElementRepository.java
index c41b46e..fcc67e1 100644
--- a/openecomp-be/tools/zusammen-tools/src/main/java/org/openecomp/core/tools/store/CassandraElementRepository.java
+++ b/openecomp-be/tools/zusammen-tools/src/main/java/org/openecomp/core/tools/store/CassandraElementRepository.java
@@ -34,7 +34,12 @@
 
 import java.lang.reflect.Type;
 import java.nio.ByteBuffer;
-import java.util.*;
+import java.util.ArrayList;
+import java.util.Collection;
+import java.util.HashSet;
+import java.util.Objects;
+import java.util.Optional;
+import java.util.Set;
 import java.util.stream.Collectors;
 
 public class CassandraElementRepository {
@@ -61,18 +66,18 @@
                                      ElementEntity element) {
     Row row = getElementAccessor(context).get(
         elementContext.getSpace(),
-        elementContext.getItemId().toString(),
+        elementContext.getItemId().getValue(),
         getVersionId(elementContext),
-        element.getId().toString()).one();
+        element.getId().getValue()).one();
 
     return row == null ? Optional.empty() : Optional.of(getElementEntity(element, row));
   }
 
 
   private String getVersionId(ElementEntityContext elementContext) {
-    return elementContext.getChangeRef() == null
-        ? elementContext.getVersionId().toString()
-        : elementContext.getChangeRef();
+    return elementContext.getRevisionId() == null
+        ? elementContext.getVersionId().getValue()
+        : elementContext.getRevisionId().getValue();
   }
 
 
@@ -92,7 +97,7 @@
   private void updateElement(SessionContext context, ElementEntityContext elementContext,
                              ElementEntity element) {
 
-    if (elementContext.getChangeRef() == null) {
+    if (elementContext.getRevisionId() == null) {
 
       getElementAccessor(context).update(
           JsonUtil.object2Json(element.getInfo()),
@@ -113,7 +118,7 @@
           element.getVisualization(),
           elementContext.getSpace(),
           elementContext.getItemId().toString(),
-          elementContext.getChangeRef(),
+          elementContext.getRevisionId().getValue(),
           element.getId().toString());
     }
   }
@@ -154,7 +159,7 @@
         getVersionId(elementContext)).one();
     return row == null
         ? new HashSet<>()
-        : row.getSet(CassandraElementRepository.VersionElementsField.ELEMENT_IDS, String.class);
+        : row.getSet(VersionElementsField.ELEMENT_IDS, String.class);
   }
 
   /*
diff --git a/openecomp-be/tools/zusammen-tools/src/main/java/org/openecomp/core/tools/store/ElementHandler.java b/openecomp-be/tools/zusammen-tools/src/main/java/org/openecomp/core/tools/store/ElementHandler.java
index 5c72c95..d8929ea 100644
--- a/openecomp-be/tools/zusammen-tools/src/main/java/org/openecomp/core/tools/store/ElementHandler.java
+++ b/openecomp-be/tools/zusammen-tools/src/main/java/org/openecomp/core/tools/store/ElementHandler.java
@@ -2,7 +2,6 @@
 
 import com.amdocs.zusammen.datatypes.Id;
 import com.amdocs.zusammen.datatypes.SessionContext;
-import com.amdocs.zusammen.datatypes.item.ElementContext;
 import com.amdocs.zusammen.plugin.statestore.cassandra.dao.types.ElementEntityContext;
 import org.openecomp.core.zusammen.plugin.dao.types.ElementEntity;
 
@@ -11,23 +10,17 @@
     private static final String GLOBAL_USER = "GLOBAL_USER";
 
     public static void update(SessionContext context,
-                              String itemId, String versionId, String changeRef,
+                              String itemId, String versionId, String revisionId,
                               ElementEntity elementEntity) {
 
         ElementEntityContext elementContext;
         CassandraElementRepository cassandraElementRepository = new CassandraElementRepository();
-        if (changeRef == null) {
+        if (revisionId == null) {
 
             elementContext = new ElementEntityContext(GLOBAL_USER, new Id(itemId),
-                    new Id(versionId));
+                new Id(versionId));
 
-        } else {
-            elementContext = new ElementEntityContext(GLOBAL_USER, new ElementContext(new Id(itemId),
-                    new Id(versionId),
-                    changeRef));
         }
-        cassandraElementRepository.update(context, elementContext, elementEntity);
-
     }
 }
 
diff --git a/openecomp-be/tools/zusammen-tools/src/main/java/org/openecomp/core/tools/store/HealingHandler.java b/openecomp-be/tools/zusammen-tools/src/main/java/org/openecomp/core/tools/store/HealingHandler.java
new file mode 100644
index 0000000..78bbdf0
--- /dev/null
+++ b/openecomp-be/tools/zusammen-tools/src/main/java/org/openecomp/core/tools/store/HealingHandler.java
@@ -0,0 +1,54 @@
+package org.openecomp.core.tools.store;
+
+import com.datastax.driver.core.ResultSet;
+import com.datastax.driver.mapping.annotations.Accessor;
+import com.datastax.driver.mapping.annotations.Query;
+import org.openecomp.core.nosqldb.api.NoSqlDb;
+import org.openecomp.core.nosqldb.factory.NoSqlDbFactory;
+import org.openecomp.core.tools.store.zusammen.datatypes.HealingEntity;
+
+import java.util.ArrayList;
+
+/**
+ * Created by ayalaben on 10/15/2017
+ */
+public class HealingHandler {
+
+  private static NoSqlDb nnoSqlDb = NoSqlDbFactory.getInstance().createInterface();
+  private static HealingAccessor accessor =
+      nnoSqlDb.getMappingManager().createAccessor(HealingAccessor.class);
+
+
+  public void populateHealingTable(ArrayList<HealingEntity> healingEntities) {
+    healingEntities.forEach(healingEntity -> {
+      if (isHealingRecordExist(healingEntity)) {
+        accessor.updateFlag(healingEntity.getHealingFlag(), healingEntity.getSpace(),
+            healingEntity.getItemId(), healingEntity.getVersionId());
+      } else {
+        accessor.create(healingEntity.getSpace(), healingEntity.getItemId(),
+            healingEntity.getVersionId(), healingEntity.getHealingFlag(),
+            healingEntity.getOldVersion());
+      }
+    });
+  }
+
+  private boolean isHealingRecordExist(HealingEntity healingEntity) {
+    return accessor.getFlag(healingEntity.getSpace(), healingEntity.getItemId(),
+        healingEntity.getVersionId()).getAvailableWithoutFetching() == 1;
+  }
+
+  @Accessor
+  interface HealingAccessor {
+
+    @Query("SELECT healing_needed FROM healing WHERE space=? AND item_id=? AND version_id=?")
+    ResultSet getFlag(String space, String itemId, String versionId);
+
+    @Query("Insert into healing (space, item_id, version_id, healing_needed, old_version) " +
+        "values (?,?,?,?,?)")
+    void create(String space, String itemId, String versionId, boolean flag, String oldVersion);
+
+    @Query("UPDATE healing SET healing_needed=? WHERE space=? AND item_id=? AND version_id=?")
+    void updateFlag(boolean flag, String space, String itemId, String versionId);
+  }
+
+}
\ No newline at end of file
diff --git a/openecomp-be/tools/zusammen-tools/src/main/java/org/openecomp/core/tools/store/VersionCassandraLoader.java b/openecomp-be/tools/zusammen-tools/src/main/java/org/openecomp/core/tools/store/VersionCassandraLoader.java
index 851e92d..fd9dc25 100644
--- a/openecomp-be/tools/zusammen-tools/src/main/java/org/openecomp/core/tools/store/VersionCassandraLoader.java
+++ b/openecomp-be/tools/zusammen-tools/src/main/java/org/openecomp/core/tools/store/VersionCassandraLoader.java
@@ -20,6 +20,7 @@
 
 package org.openecomp.core.tools.store;
 
+import com.datastax.driver.core.ResultSet;
 import com.datastax.driver.mapping.Mapper;
 import com.datastax.driver.mapping.Result;
 import com.datastax.driver.mapping.annotations.Accessor;
@@ -60,6 +61,8 @@
         return accessor.getAll();
     }
 
+    public ResultSet listItemVersion() { return accessor.getAllItemVersion();}
+
     @Accessor
     interface VersionAccessor {
 
@@ -74,5 +77,8 @@
         @Query("select * from zusammen_dox.version ")
         @QueryParameters(fetchSize = 400)
         Result<VersionEntity> getAll();
+
+        @Query("select space,item_id,version_id from zusammen_dox.version ")
+        ResultSet getAllItemVersion();
     }
 }
diff --git a/openecomp-be/tools/zusammen-tools/src/main/java/org/openecomp/core/tools/store/VspGeneralLoader.java b/openecomp-be/tools/zusammen-tools/src/main/java/org/openecomp/core/tools/store/VspGeneralLoader.java
index 1d9d2d9..b8620b8 100644
--- a/openecomp-be/tools/zusammen-tools/src/main/java/org/openecomp/core/tools/store/VspGeneralLoader.java
+++ b/openecomp-be/tools/zusammen-tools/src/main/java/org/openecomp/core/tools/store/VspGeneralLoader.java
@@ -4,14 +4,13 @@
 import com.amdocs.zusammen.datatypes.SessionContext;
 import com.amdocs.zusammen.datatypes.item.Info;
 import com.amdocs.zusammen.plugin.statestore.cassandra.dao.types.ElementEntityContext;
-import org.openecomp.core.zusammen.plugin.dao.impl.CassandraElementRepository;
 import org.openecomp.core.zusammen.plugin.dao.types.ElementEntity;
 
 import java.util.HashMap;
 import java.util.List;
 import java.util.Map;
-import java.util.Optional;
 import java.util.Objects;
+import java.util.Optional;
 
 public class VspGeneralLoader {
 
@@ -56,24 +55,24 @@
 
     for (Map.Entry<String, List<String>> entry : vspItemChangeRefssMap.entrySet()) {
 
-      for (String changeRef : entry.getValue()) {
+      for (String revisionId : entry.getValue()) {
 
 
         itemId = new Id(entry.getKey());
 
-        entityId = getEntityIdByInfoNameValue(context, itemId, null, changeRef,null, NAME,
+        entityId = getEntityIdByInfoNameValue(context, itemId, null, revisionId,null, NAME,
                 GENERAL);
         if (entityId != null) {
           ElementEntityContext elementContext = new ElementEntityContext(
                   context.getUser().getUserName(),
                   itemId,
                   null);
-          elementContext.setChangeRef(changeRef);
+          elementContext.setRevisionId(new Id(revisionId));
           Optional<ElementEntity> result =
                   cassandraElementRepository.get(context, elementContext,
                           new ElementEntity(entityId));
           if (result.isPresent()) {
-            elementEntityMap.put(buildKey(context, entry, changeRef), result.get());
+            elementEntityMap.put(buildKey(context, entry, revisionId), result.get());
           }
         }
       }
@@ -90,7 +89,7 @@
   private static Id getEntityIdByInfoNameValue(SessionContext context,
                                                Id itemId,
                                                Id versionId,
-                                               String changeRef,
+                                               String revisionId,
                                                Id elementId,
                                                String name,
                                                String value) {
@@ -100,8 +99,8 @@
             context.getUser().getUserName(),
             itemId,
             versionId);
-    if (changeRef != null) {
-      elementContext.setChangeRef(changeRef);
+    if (revisionId != null) {
+      elementContext.setRevisionId(new Id(revisionId));
     }
     Optional<ElementEntity> result =
             cassandraElementRepository.get(context, elementContext,
@@ -113,8 +112,8 @@
                 context.getUser().getUserName(),
                 itemId,
                 versionId);
-        if(changeRef!= null){
-          subElementContext.setChangeRef(changeRef);
+        if(revisionId!= null){
+          subElementContext.setRevisionId(new Id(revisionId));
         }
         Optional<ElementEntity> subElementEntityOptional =
                 cassandraElementRepository.get(context, subElementContext,
diff --git a/openecomp-be/tools/zusammen-tools/src/main/java/org/openecomp/core/tools/store/zusammen/datatypes/HealingEntity.java b/openecomp-be/tools/zusammen-tools/src/main/java/org/openecomp/core/tools/store/zusammen/datatypes/HealingEntity.java
new file mode 100644
index 0000000..8c95f79
--- /dev/null
+++ b/openecomp-be/tools/zusammen-tools/src/main/java/org/openecomp/core/tools/store/zusammen/datatypes/HealingEntity.java
@@ -0,0 +1,78 @@
+package org.openecomp.core.tools.store.zusammen.datatypes;
+
+import com.datastax.driver.mapping.annotations.Column;
+import com.datastax.driver.mapping.annotations.PartitionKey;
+import com.datastax.driver.mapping.annotations.Table;
+
+/**
+ * Created by ayalaben on 10/15/2017
+ */
+@Table(keyspace = "dox", name = "healing")
+public class HealingEntity {
+  @Column(name = "space")
+  @PartitionKey(0)
+  private String space;
+
+  @Column(name = "item_id")
+  @PartitionKey(1)
+  private String itemId;
+
+  @Column(name = "version_id")
+  @PartitionKey(2)
+  private String versionId;
+
+  @Column(name = "healing_needed")
+  private boolean healingFlag;
+
+  @Column(name = "old_version")
+  private String old_version;
+
+  public String getSpace() {
+    return space;
+  }
+
+  public void setSpace(String space) {
+    this.space = space;
+  }
+
+  public String getItemId() {
+    return itemId;
+  }
+
+  public void setItemId(String itemId) {
+    this.itemId = itemId;
+  }
+
+  public String getVersionId() {
+    return versionId;
+  }
+
+  public void setVersionId(String versionId) {
+    this.versionId = versionId;
+  }
+
+  public boolean getHealingFlag() {
+    return healingFlag;
+  }
+
+  public void setHealingFlag(boolean healingFlag) {
+    this.healingFlag = healingFlag;
+  }
+
+  public HealingEntity(String space, String itemId, String versionId, boolean healingFlag,String
+      oldVersion) {
+    this.space = space;
+    this.itemId = itemId;
+    this.versionId = versionId;
+    this.healingFlag = healingFlag;
+    this.old_version = oldVersion;
+  }
+
+  public String getOldVersion() {
+    return old_version;
+  }
+
+  public void setOldVersion(String old_version) {
+    this.old_version = old_version;
+  }
+}
\ No newline at end of file
diff --git a/openecomp-be/tools/zusammen-tools/src/main/java/org/openecomp/core/tools/store/zusammen/datatypes/VersionEntity.java b/openecomp-be/tools/zusammen-tools/src/main/java/org/openecomp/core/tools/store/zusammen/datatypes/VersionEntity.java
index c7280c8..946c05e 100644
--- a/openecomp-be/tools/zusammen-tools/src/main/java/org/openecomp/core/tools/store/zusammen/datatypes/VersionEntity.java
+++ b/openecomp-be/tools/zusammen-tools/src/main/java/org/openecomp/core/tools/store/zusammen/datatypes/VersionEntity.java
@@ -1,6 +1,8 @@
 package org.openecomp.core.tools.store.zusammen.datatypes;
 
-import com.datastax.driver.mapping.annotations.*;
+import com.datastax.driver.mapping.annotations.Column;
+import com.datastax.driver.mapping.annotations.PartitionKey;
+import com.datastax.driver.mapping.annotations.Table;
 
 import java.util.Date;
 
diff --git a/openecomp-be/tools/zusammen-tools/src/main/java/org/openecomp/core/tools/util/Utils.java b/openecomp-be/tools/zusammen-tools/src/main/java/org/openecomp/core/tools/util/Utils.java
index d1621ad..f48b212 100644
--- a/openecomp-be/tools/zusammen-tools/src/main/java/org/openecomp/core/tools/util/Utils.java
+++ b/openecomp-be/tools/zusammen-tools/src/main/java/org/openecomp/core/tools/util/Utils.java
@@ -3,13 +3,36 @@
 import org.openecomp.sdc.logging.api.Logger;
 
 /**
+ * Copyright © 2016-2017 European Support Limited.
  * @author Avrahamg
  * @since April 24, 2017
+ * Since it is a command line tools writing to console will be helpful to users.
  */
 public class Utils {
   public static void printMessage(Logger logger, String message) {
+    /**
+     * Since it is a command line tools writing to console will be helpful to users.
+     */
     System.out.println(message);
     logger.debug(message);
   }
+
+
+  public static void logError(Logger logger, Throwable ex) {
+    /**
+     * Since it is a command line tools writing to console will be helpful to users.
+     */
+    ex.printStackTrace();
+    logger.error(ex.getMessage(),ex);
+  }
+
+  public static void logError(Logger logger, String message, Throwable ex) {
+    /**
+     * Since it is a command line tools writing to console will be helpful to users.
+     */
+    System.out.println(message);
+    ex.printStackTrace();
+    logger.error(message,ex);
+  }
 }
 
diff --git a/openecomp-be/tools/zusammen-tools/src/main/java/org/openecomp/core/tools/util/ZipUtils.java b/openecomp-be/tools/zusammen-tools/src/main/java/org/openecomp/core/tools/util/ZipUtils.java
index 2f6693d..e0fd1a7 100644
--- a/openecomp-be/tools/zusammen-tools/src/main/java/org/openecomp/core/tools/util/ZipUtils.java
+++ b/openecomp-be/tools/zusammen-tools/src/main/java/org/openecomp/core/tools/util/ZipUtils.java
@@ -1,13 +1,17 @@
 package org.openecomp.core.tools.util;
 
 import com.google.common.io.ByteStreams;
+import org.openecomp.sdc.logging.api.Logger;
+import org.openecomp.sdc.logging.api.LoggerFactory;
 
+import java.io.BufferedOutputStream;
 import java.io.File;
 import java.io.FileInputStream;
 import java.io.FileOutputStream;
 import java.io.IOException;
 import java.nio.file.Files;
 import java.nio.file.Path;
+import java.nio.file.Paths;
 import java.util.Objects;
 import java.util.Scanner;
 import java.util.Set;
@@ -17,12 +21,23 @@
 import java.util.zip.ZipOutputStream;
 
 public class ZipUtils {
-    public static void createZip(String zipFileName, Path dir, Set<String> filterItem) throws Exception {
+
+    private static final Logger logger = LoggerFactory.getLogger(ZipUtils.class);
+
+    public static void createZip(String zipFileName, Path dir) throws IOException {
         File dirObj = dir.toFile();
+        Path zippedFile = Files.createFile(Paths.get(zipFileName));
         try (
-                FileOutputStream fileOutputStream = new FileOutputStream(zipFileName);
-                ZipOutputStream out = new ZipOutputStream(fileOutputStream)) {
-            addDir(dirObj, out, dir.toString(), filterItem);
+                FileOutputStream fileOutputStream = new FileOutputStream(File.separator + zippedFile.toFile());
+                BufferedOutputStream bos = new BufferedOutputStream(fileOutputStream);
+                ZipOutputStream out = new ZipOutputStream(bos)) {
+            File[] files = dirObj.listFiles();
+            for (File file : files) {
+                out.putNextEntry(new ZipEntry(file.getName()));
+                Files.copy(Paths.get(file.getPath()), out);
+                out.closeEntry();
+            }
+            Utils.printMessage(logger, "Zip file was created " + zipFileName);
         }
     }
 
@@ -47,7 +62,7 @@
         for (int i = 0; i < files.length; i++) {
             if (files[i].isDirectory()) {
                 addDir(files[i], out, root, filterItem);
-                String filePath = files[i].getAbsolutePath().replace(root + File.separator, "") + "/";
+                String filePath = files[i].getAbsolutePath().replace(root + File.separator, "") + File.separator;
                 out.putNextEntry(new ZipEntry(filePath));
                 continue;
             }
@@ -57,7 +72,6 @@
                     out.putNextEntry(new ZipEntry(filePath));
                     try {
                         ByteStreams.copy(in, out);
-
                     } finally {
                         out.closeEntry();
                     }
@@ -71,7 +85,7 @@
         if (zipFile == null || outputFolder == null) {
             return;
         }
-        if (!Files.exists(outputFolder)) {
+        if (!outputFolder.toFile().exists()) {
             Files.createDirectories(outputFolder);
         }
 
@@ -83,7 +97,7 @@
                 File newFile = new File(outputFolder.toString() + File.separator + fileName);
                 if (ze.isDirectory()) {
                     Path path = newFile.toPath();
-                    if (!Files.exists(path)) {
+                    if (!path.toFile().exists()) {
                         Files.createDirectories(path);
                     }
                 } else {
diff --git a/openecomp-be/tools/zusammen-tools/src/main/resources/logback.xml b/openecomp-be/tools/zusammen-tools/src/main/resources/logback.xml
index a13dc82..2461aed 100644
--- a/openecomp-be/tools/zusammen-tools/src/main/resources/logback.xml
+++ b/openecomp-be/tools/zusammen-tools/src/main/resources/logback.xml
@@ -1,5 +1,6 @@
 <configuration>
 
+
     <appender name="STDOUT" class="ch.qos.logback.core.ConsoleAppender">
         <!-- encoders are assigned the type
              ch.qos.logback.classic.encoder.PatternLayoutEncoder by default -->
diff --git a/openecomp-be/tools/zusammen-tools/src/main/resources/queries.yaml b/openecomp-be/tools/zusammen-tools/src/main/resources/queries.yaml
new file mode 100644
index 0000000..a93a5a4
--- /dev/null
+++ b/openecomp-be/tools/zusammen-tools/src/main/resources/queries.yaml
@@ -0,0 +1,16 @@
+queries:
+  - select * from zusammen_dox.element;
+  - select * from zusammen_dox.element_namespace;
+  - select * from zusammen_dox.item;
+  - select * from zusammen_dox.version;
+  - select * from zusammen_dox.version_elements;
+  - select * from dox.item_permissions;
+  - select * from dox.vsp_merge_hint ;
+item_columns:
+  - item_id
+  - item_id
+  - item_id
+  - item_id
+  - item_id
+  - item_id
+  - item_id
\ No newline at end of file
diff --git a/openecomp-be/tools/zusammen-tools/src/test/java/org/openecomp/core/tools/Commands/exportinfo/serialize/VLMExtractTest.java b/openecomp-be/tools/zusammen-tools/src/test/java/org/openecomp/core/tools/Commands/exportinfo/serialize/VLMExtractTest.java
new file mode 100644
index 0000000..7b43c46
--- /dev/null
+++ b/openecomp-be/tools/zusammen-tools/src/test/java/org/openecomp/core/tools/Commands/exportinfo/serialize/VLMExtractTest.java
@@ -0,0 +1,48 @@
+package org.openecomp.core.tools.Commands.exportinfo.serialize;
+
+import org.openecomp.core.tools.exportinfo.ExportSerializer;
+import org.testng.annotations.Test;
+
+import static org.testng.Assert.assertEquals;
+import static org.testng.Assert.assertNotNull;
+import static org.testng.Assert.assertNull;
+public class VLMExtractTest {
+
+
+
+    @Test
+    public void extractVLM(){
+        String vlmId = "979a56c7b2fa41e6a5742137f53a5c1b";
+        String elemenet_info_string = "{\n" +
+                "  \"name\": \"VendorSoftwareProduct\",\n" +
+                "  \"properties\": {\n" +
+                "    \"subCategory\": \"resourceNewCategory.dcae component.collector\",\n" +
+                "    \"name\": \"vsp1\",\n" +
+                "    \"icon\": \"icon\",\n" +
+                "    \"onboardingMethod\": \"NetworkPackage\",\n" +
+                "    \"description\": \"d\",\n" +
+                "    \"vendorId\": \""+vlmId+"\",\n" +
+                "    \"category\": \"resourceNewCategory.dcae component\",\n" +
+                "    \"vendorName\": \"vlm1\",\n" +
+                "    \"elementType\": \"VendorSoftwareProduct\"\n" +
+                "  }\n" +
+                "}\n"    ;
+        String extractedVlmId = new CustomExportSerializer().extractVlm(elemenet_info_string);
+        assertNotNull(extractedVlmId);
+        assertEquals(extractedVlmId,vlmId);
+
+    }
+
+    @Test
+    public void failToExtractVLMBecauseJsonIsCorrupted(){
+        String elemenet_info_string = "gfhhhghgh";
+        String extractedVlmId = new CustomExportSerializer().extractVlm(elemenet_info_string);
+        assertNull(extractedVlmId);
+    }
+
+    private static final class CustomExportSerializer extends ExportSerializer{
+        public String extractVlm(String injson) {
+            return super.extractVlm(injson);
+        }
+    }
+}
diff --git a/openecomp-be/tools/zusammen-tools/src/test/resources/configuration.yaml b/openecomp-be/tools/zusammen-tools/src/test/resources/configuration.yaml
new file mode 100644
index 0000000..6636e20
--- /dev/null
+++ b/openecomp-be/tools/zusammen-tools/src/test/resources/configuration.yaml
@@ -0,0 +1,251 @@
+identificationHeaderFields:
+   - HTTP_IV_USER
+   - HTTP_CSP_FIRSTNAME
+   - HTTP_CSP_LASTNAME
+   - HTTP_IV_REMOTE_ADDRESS
+   - HTTP_CSP_WSTYPE
+
+
+
+# catalog backend http port
+beHttpPort: 8080
+
+# catalog backend http context
+beContext: /sdc/rest/config/get
+
+# catalog backend protocol
+beProtocol: http
+
+# catalog backend ssl port
+beSslPort: 8443
+
+version: 1.0
+released: 2012-11-30
+
+titanCfgFile: /home/vagrant/catalog-be/config/catalog-be/titan.properties
+titanInMemoryGraph: false
+titanLockTimeout: 30
+titanReconnectIntervalInSeconds: 3
+titanHealthCheckReadTimeout: 1
+esReconnectIntervalInSeconds: 3
+uebHealthCheckReconnectIntervalInSeconds: 15
+uebHealthCheckReadTimeout: 4
+
+# Protocols
+protocols:
+   - http
+   - https
+
+# Users
+users:
+    tom: passwd
+    bob: passwd
+
+neo4j:
+    host: neo4jhost
+    port: 7474
+    user: neo4j
+    password: "12345"
+
+cassandraConfig:
+    cassandraHosts: ['localhost']
+    reconnectTimeout : 30000
+    authenticate: true
+    username: asdc_user
+    password: password
+    ssl: false
+    truststorePath : /path/path
+    truststorePassword : password
+    keySpaces:
+        - { name: dox, replicationStrategy: SimpleStrategy, replicationInfo: ['1']}
+        - { name:  zusammen_dox, replicationStrategy: SimpleStrategy, replicationInfo: ['1']}
+        - { name: sdcartifact, replicationStrategy: SimpleStrategy, replicationInfo: ['1']}
+
+#Application-specific settings of ES
+elasticSearch:
+    # Mapping of index prefix to time-based frame. For example, if below is configured:
+    #
+    # - indexPrefix: auditingevents
+    #    creationPeriod: minute
+    #
+    # then ES object of type which is mapped to "auditingevents-*" template, and created on 2015-12-23 13:24:54, will enter "auditingevents-2015-12-23-13-24" index.
+    # Another object created on 2015-12-23 13:25:54, will enter "auditingevents-2015-12-23-13-25" index.
+    # If creationPeriod: month, both of the above will enter "auditingevents-2015-12" index.
+    #
+    # PLEASE NOTE: the timestamps are created in UTC/GMT timezone! This is needed so that timestamps will be correctly presented in Kibana.
+    #
+    # Legal values for creationPeriod - year, month, day, hour, minute, none (meaning no time-based behaviour).
+    #
+    # If no creationPeriod is configured for indexPrefix, default behavour is creationPeriod: month.
+
+    indicesTimeFrequency:
+      - indexPrefix: auditingevents
+        creationPeriod: month
+      - indexPrefix: monitoring_events
+        creationPeriod: month
+
+artifactTypes:
+   - CHEF
+   - PUPPET
+   - SHELL
+   - YANG
+   - YANG_XML
+   - HEAT
+   - BPEL
+   - DG_XML
+   - MURANO_PKG
+   - OTHER
+
+licenseTypes:
+   - User
+   - Installation
+   - CPU
+
+#Deployment artifacts placeHolder
+deploymentResourceArtifacts:
+  heat:
+      displayName: "HEAT Template"
+      type: HEAT
+
+deploymentResourceInstanceArtifacts:
+  heatEnv:
+      displayName: "HEAT ENV"
+      type: HEAT_ENV
+      description: "Auto-generated HEAT Environment deployment artifact"
+      fileExtension: "env"
+
+#Informational artifacts placeHolder
+excludeResourceCategory:
+  - Generic
+informationalResourceArtifacts:
+  features:
+      displayName: Features
+      type: OTHER
+  capacity:
+      displayName: Capacity
+      type: OTHER
+  vendorTestResult:
+      displayName: Vendor Test Result
+      type: OTHER
+  testScripts:
+      displayName: Test Scripts
+      type: OTHER
+  cloudQuestionnaire:
+      displayName: Cloud Questionnaire (completed)
+      type: OTHER
+  HEATTemplateFromVendor:
+      displayName: HEAT Template from Vendor
+      type: HEAT
+
+excludeServiceCategory:
+
+informationalServiceArtifacts:
+  messageFlows:
+      displayName: Message Flows
+      type: OTHER
+  instantiationFlows:
+      displayName: Management Flows
+      type: OTHER
+  serviceArtifactPlan:
+      displayName: Service Artifact Plan
+      type: OTHER
+  summaryOfImpactsToECOMPElements:
+      displayName: Summary of impacts to OPENECOMP elements,OSSs, BSSs
+      type: OTHER
+  controlLoopFunctions:
+      displayName: Control Loop Functions
+      type: OTHER
+  dimensioningInfo:
+      displayName: Dimensioning Info
+      type: OTHER
+  affinityRules:
+      displayName: Affinity Rules
+      type: OTHER
+  operationalPolicies:
+      displayName: Operational Policies
+      type: OTHER
+  serviceSpecificPolicies:
+      displayName: Service-specific Policies
+      type: OTHER
+  engineeringRules:
+      displayName: Engineering Rules (ERD)
+      type: OTHER
+  distributionInstructions:
+      displayName: Distribution Instructions
+      type: OTHER
+  certificationTestResults:
+      displayName: TD Certification Test Results
+      type: OTHER
+  deploymentVotingRecord:
+      displayName: Deployment Voting Record
+      type: OTHER
+  serviceQuestionnaire:
+      displayName: Service Questionnaire
+      type: OTHER
+
+serviceApiArtifacts:
+  configuration:
+      displayName: Configuration
+      type: OTHER
+  instantiation:
+      displayName: Instantiation
+      type: OTHER
+  monitoring:
+      displayName: Monitoring
+      type: OTHER
+  reporting:
+      displayName: Reporting
+      type: OTHER
+  logging:
+      displayName: Logging
+      type: OTHER
+  testing:
+      displayName: Testing
+      type: OTHER
+
+
+additionalInformationMaxNumberOfKeys: 50
+
+systemMonitoring:
+    enabled: false
+    isProxy: false
+    probeIntervalInSeconds: 15
+
+defaultHeatArtifactTimeoutMinutes: 60
+
+serviceDeploymentArtifacts:
+
+resourceDeploymentArtifacts:
+    HEAT:
+        acceptedTypes:
+            - yaml
+            - yml
+
+resourceInformationalDeployedArtifacts:
+    YANG_XML:
+        acceptedTypes:
+            - xml
+
+
+unLoggedUrls:
+   - /sdc2/rest/healthCheck
+
+cleanComponentsConfiguration:
+    cleanIntervalInMinutes: 1440
+    componentsToClean:
+       - Resource
+
+artifactsIndex: resources
+
+heatEnvArtifactHeader:
+    " # _______________________________________________________________________________________________________________________________________\n
+  #|                                    					    AT&T Proprietary (Restricted)           								 	  |\n
+  #|                                     Only for use by authorized individuals or any above-designated team(s)                            |\n
+  #|                                          within the AT&T companies and not for general distribution      							  |\n
+  #|_______________________________________________________________________________________________________________________________________|\n"
+heatEnvArtifactFooter:
+    " # _______________________________________________________________________________________________________________________________________\n
+  #|                                    					    AT&T Proprietary (Restricted)           								 	  |\n
+  #|                                     Only for use by authorized individuals or any above-designated team(s)                            |\n
+  #|                                          within the AT&T companies and not for general distribution      							  |\n
+  #|_______________________________________________________________________________________________________________________________________|\n"
diff --git a/openecomp-be/tools/zusammen-tools/src/test/resources/queries.yaml b/openecomp-be/tools/zusammen-tools/src/test/resources/queries.yaml
new file mode 100644
index 0000000..6ca8cd6
--- /dev/null
+++ b/openecomp-be/tools/zusammen-tools/src/test/resources/queries.yaml
@@ -0,0 +1,16 @@
+queries:
+  - select * from zusammen_dox.element;
+  - select * from zusammen_dox.element_namespace;
+  - select * from zusammen_dox.item;
+  - select * from zusammen_dox.version;
+  - select * from zusammen_dox.version_elements;
+  - select * from dox.item_permissions;
+  - select * from dox.vsp_merge_hint;
+item_columns:
+  - item_id
+  - item_id
+  - item_id
+  - item_id
+  - item_id
+  - item_id
+  - item_id
\ No newline at end of file
