You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@dlab.apache.org by of...@apache.org on 2020/01/09 17:18:25 UTC

[incubator-dlab] branch multiple-cloud created (now 74247b0)

This is an automated email from the ASF dual-hosted git repository.

ofuks pushed a change to branch multiple-cloud
in repository https://gitbox.apache.org/repos/asf/incubator-dlab.git.


      at 74247b0  Updated self-service.yml

This branch includes the following new commits:

     new c9108de  [DLAB-1432](Part 1) Support a multiple cloud functionality
     new d36ccca  [DLAB-1432](Part 2) Support a multiple cloud functionality
     new 74247b0  Updated self-service.yml

The 3 revisions listed above as "new" are entirely new to this
repository and will be described in separate emails.  The revisions
listed as "add" were already present in the repository and have only
been added to this reference.



---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@dlab.apache.org
For additional commands, e-mail: commits-help@dlab.apache.org


[incubator-dlab] 02/03: [DLAB-1432](Part 2) Support a multiple cloud functionality

Posted by of...@apache.org.
This is an automated email from the ASF dual-hosted git repository.

ofuks pushed a commit to branch multiple-cloud
in repository https://gitbox.apache.org/repos/asf/incubator-dlab.git

commit d36cccacdfed788a814536e66215715d8a509ebc
Author: Oleh Fuks <ol...@gmail.com>
AuthorDate: Thu Jan 9 19:14:32 2020 +0200

    [DLAB-1432](Part 2) Support a multiple cloud functionality
---
 .../dlab/backendapi/SelfServiceApplication.java    |   2 -
 .../java/com/epam/dlab/backendapi/dao/KeyDAO.java  | 190 ----------
 .../epam/dlab/backendapi/dao/aws/AwsKeyDao.java    |  45 ---
 .../dlab/backendapi/dao/azure/AzureKeyDao.java     |  47 ---
 .../epam/dlab/backendapi/dao/gcp/GcpKeyDao.java    |  47 ---
 .../backendapi/modules/AwsSelfServiceModule.java   |   7 -
 .../backendapi/modules/AzureSelfServiceModule.java |   7 -
 .../backendapi/modules/CloudProviderModule.java    |   8 -
 .../epam/dlab/backendapi/modules/DevModule.java    |   2 -
 .../backendapi/modules/GcpSelfServiceModule.java   |   8 -
 .../dlab/backendapi/modules/ProductionModule.java  |   2 -
 .../dlab/backendapi/resources/EdgeResource.java    |  74 ----
 .../backendapi/resources/EnvironmentResource.java  |  21 --
 .../backendapi/resources/KeyUploaderResource.java  | 131 -------
 .../resources/callback/aws/EdgeCallbackAws.java    |  65 ----
 .../callback/aws/KeyUploaderCallbackAws.java       |  66 ----
 .../callback/azure/EdgeCallbackAzure.java          |  63 ----
 .../callback/azure/KeyUploaderCallbackAzure.java   |  70 ----
 .../resources/callback/base/EdgeCallback.java      |  78 ----
 .../callback/base/KeyUploaderCallback.java         |  58 ---
 .../resources/callback/gcp/EdgeCallbackGcp.java    |  63 ----
 .../callback/gcp/KeyUploaderCallbackGcp.java       |  68 ----
 .../dlab/backendapi/service/AccessKeyService.java  |   9 -
 .../epam/dlab/backendapi/service/EdgeService.java  |  35 --
 .../backendapi/service/EnvironmentService.java     |   4 -
 .../backendapi/service/ReuploadKeyService.java     |   2 -
 .../backendapi/service/UserResourceService.java    |  33 --
 .../service/impl/AccessKeyServiceImpl.java         | 119 ------
 .../backendapi/service/impl/EdgeServiceImpl.java   | 153 --------
 .../service/impl/EnvironmentServiceImpl.java       |  36 +-
 .../impl/InfrastructureTemplateServiceImpl.java    |  12 +-
 .../service/impl/ReuploadKeyServiceImpl.java       |  33 +-
 .../service/impl/UserResourceServiceImpl.java      |  95 -----
 .../backendapi/resources/EdgeResourceTest.java     | 164 ---------
 .../resources/EnvironmentResourceTest.java         |  98 -----
 .../resources/KeyUploaderResourceTest.java         | 405 ---------------------
 .../service/impl/AccessKeyServiceImplTest.java     | 311 ----------------
 .../service/impl/EdgeServiceImplTest.java          | 241 ------------
 .../service/impl/EnvironmentServiceImplTest.java   | 126 +------
 .../service/impl/ReuploadKeyServiceImplTest.java   | 142 +-------
 .../service/impl/UserResourceServiceImplTest.java  | 109 ------
 41 files changed, 25 insertions(+), 3224 deletions(-)

diff --git a/services/self-service/src/main/java/com/epam/dlab/backendapi/SelfServiceApplication.java b/services/self-service/src/main/java/com/epam/dlab/backendapi/SelfServiceApplication.java
index da6a5c5..cffd327 100644
--- a/services/self-service/src/main/java/com/epam/dlab/backendapi/SelfServiceApplication.java
+++ b/services/self-service/src/main/java/com/epam/dlab/backendapi/SelfServiceApplication.java
@@ -129,8 +129,6 @@ public class SelfServiceApplication extends Application<SelfServiceApplicationCo
 		jersey.register(new ValidationExceptionMapper());
 		jersey.register(new ResourceQuoteReachedExceptionMapper());
 		jersey.register(injector.getInstance(SecurityResource.class));
-		jersey.register(injector.getInstance(KeyUploaderResource.class));
-		jersey.register(injector.getInstance(EdgeResource.class));
 
 		jersey.register(injector.getInstance(InfrastructureTemplateResource.class));
 		jersey.register(injector.getInstance(InfrastructureInfoResource.class));
diff --git a/services/self-service/src/main/java/com/epam/dlab/backendapi/dao/KeyDAO.java b/services/self-service/src/main/java/com/epam/dlab/backendapi/dao/KeyDAO.java
deleted file mode 100644
index 8bce841..0000000
--- a/services/self-service/src/main/java/com/epam/dlab/backendapi/dao/KeyDAO.java
+++ /dev/null
@@ -1,190 +0,0 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements.  See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership.  The ASF licenses this file
- * to you 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.
- */
-
-package com.epam.dlab.backendapi.dao;
-
-
-import com.epam.dlab.dto.UserInstanceStatus;
-import com.epam.dlab.dto.base.edge.EdgeInfo;
-import com.epam.dlab.dto.keyload.KeyLoadStatus;
-import com.epam.dlab.dto.keyload.UserKeyDTO;
-import com.epam.dlab.exceptions.DlabException;
-import com.mongodb.client.model.Updates;
-import org.bson.Document;
-
-import java.util.Date;
-import java.util.Optional;
-
-import static com.epam.dlab.backendapi.dao.MongoCollections.USER_EDGE;
-import static com.epam.dlab.backendapi.dao.MongoCollections.USER_KEYS;
-import static com.mongodb.client.model.Filters.*;
-import static com.mongodb.client.model.Projections.*;
-import static com.mongodb.client.model.Updates.set;
-
-/**
- * DAO for manage the user key.
- */
-public abstract class KeyDAO extends BaseDAO {
-	private static final String EDGE_STATUS = "edge_status";
-	private static final String KEY_CONTENT = "content";
-
-	/**
-	 * Write the status of user key to Mongo database.
-	 *
-	 * @param user   user name
-	 * @param status the status of user key.
-	 */
-	public void updateKey(String user, String status) {
-		updateOne(USER_KEYS, eq(ID, user), set(STATUS, status));
-	}
-
-	/**
-	 * Delete the user key from Mongo database.
-	 *
-	 * @param user user name
-	 */
-	public void deleteKey(String user) {
-		mongoService.getCollection(USER_KEYS).deleteOne(eq(ID, user));
-	}
-
-	/**
-	 * Inserts ('insertRequired' equals 'true') or updates ('insertRequired' equals 'false') the user key to/in Mongo
-	 * database.
-	 *
-	 * @param user           user name
-	 * @param content        key content
-	 * @param insertRequired true/false
-	 */
-	public void upsertKey(final String user, String content, boolean insertRequired) {
-		Document doc = new Document(SET,
-				new Document()
-						.append(ID, user)
-						.append(KEY_CONTENT, content)
-						.append(STATUS, insertRequired ? KeyLoadStatus.NEW.getStatus() :
-								KeyLoadStatus.SUCCESS.getStatus())
-						.append(TIMESTAMP, new Date()));
-		updateOne(USER_KEYS, eq(ID, user), doc, insertRequired);
-	}
-
-	/**
-	 * Finds and returns the user key with the specified status
-	 *
-	 * @param user   user name.
-	 * @param status key status
-	 */
-	public UserKeyDTO fetchKey(String user, KeyLoadStatus status) {
-		return findOne(USER_KEYS,
-				and(eq(ID, user), eq(STATUS, status.getStatus())),
-				UserKeyDTO.class)
-				.orElseThrow(() -> new DlabException(String.format("Key of user %s with status %s not found", user,
-						status.getStatus())));
-	}
-
-	/**
-	 * Store the EDGE of user to Mongo database.
-	 *
-	 * @param user     user name
-	 * @param edgeInfo the EDGE of user
-	 */
-	public void updateEdgeInfo(String user, EdgeInfo edgeInfo) {
-		Document d = new Document(SET,
-				convertToBson(edgeInfo)
-						.append(ID, user));
-		updateOne(USER_EDGE,
-				eq(ID, user),
-				d,
-				true);
-	}
-
-	public abstract EdgeInfo getEdgeInfo(String user);
-
-	public <T extends EdgeInfo> T getEdgeInfo(String user, Class<T> target, T defaultValue) {
-		return findOne(USER_EDGE,
-				eq(ID, user), target)
-				.orElse(defaultValue);
-	}
-
-	public abstract Optional<? extends EdgeInfo> getEdgeInfoWhereStatusIn(String user, UserInstanceStatus... statuses);
-
-	protected <T extends EdgeInfo> Optional<T> getEdgeInfoWhereStatusIn(String user, Class<T> target,
-																		UserInstanceStatus... statuses) {
-		return findOne(USER_EDGE,
-				and(eq(ID, user), in(EDGE_STATUS, statusList(statuses))),
-				target);
-	}
-
-	/**
-	 * Finds and returns the status of user key.
-	 *
-	 * @param user user name
-	 */
-	public KeyLoadStatus findKeyStatus(String user) {
-		return findOne(USER_KEYS, eq(ID, user), UserKeyDTO.class)
-				.map(UserKeyDTO::getStatus)
-				.map(KeyLoadStatus::findByStatus)
-				.orElse(KeyLoadStatus.NONE);
-	}
-
-	/**
-	 * Updates the status of EDGE node.
-	 *
-	 * @param user   user name
-	 * @param status status of EDGE node
-	 */
-	public void updateEdgeStatus(String user, String status) {
-		updateOne(USER_EDGE,
-				eq(ID, user),
-				Updates.set(EDGE_STATUS, status));
-	}
-
-	/**
-	 * Return the status of EDGE node.
-	 *
-	 * @param user user name
-	 */
-	public String getEdgeStatus(String user) {
-		Document d = findOne(USER_EDGE,
-				eq(ID, user),
-				fields(include(EDGE_STATUS), excludeId())).orElse(null);
-		return (d == null ? "" : d.getString(EDGE_STATUS));
-	}
-
-	public void removeEdge(String user) {
-		deleteOne(USER_EDGE, eq(ID, user));
-	}
-
-	public boolean edgeNodeExist(String user) {
-		return findOne(USER_EDGE, and(eq(ID, user), not(in(EDGE_STATUS, UserInstanceStatus.TERMINATING.toString(),
-				UserInstanceStatus.TERMINATED.toString()))))
-				.isPresent();
-	}
-
-	/**
-	 * Updates the field 'reupload_key_required' of EDGE node.
-	 *
-	 * @param user                user name
-	 * @param reuploadKeyRequired true/false
-	 * @param edgeStatuses        allowable edge statuses
-	 */
-	public void updateEdgeReuploadKey(String user, boolean reuploadKeyRequired, UserInstanceStatus... edgeStatuses) {
-		updateOne(USER_EDGE,
-				and(eq(ID, user), in(EDGE_STATUS, statusList(edgeStatuses))),
-				Updates.set(REUPLOAD_KEY_REQUIRED, reuploadKeyRequired));
-	}
-}
diff --git a/services/self-service/src/main/java/com/epam/dlab/backendapi/dao/aws/AwsKeyDao.java b/services/self-service/src/main/java/com/epam/dlab/backendapi/dao/aws/AwsKeyDao.java
deleted file mode 100644
index 745a2cd..0000000
--- a/services/self-service/src/main/java/com/epam/dlab/backendapi/dao/aws/AwsKeyDao.java
+++ /dev/null
@@ -1,45 +0,0 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements.  See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership.  The ASF licenses this file
- * to you 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.
- */
-
-package com.epam.dlab.backendapi.dao.aws;
-
-import com.epam.dlab.backendapi.dao.KeyDAO;
-import com.epam.dlab.dto.UserInstanceStatus;
-import com.epam.dlab.dto.aws.edge.EdgeInfoAws;
-import lombok.extern.slf4j.Slf4j;
-
-import java.util.Optional;
-
-@Slf4j
-public class AwsKeyDao extends KeyDAO {
-
-	public AwsKeyDao() {
-		log.info("{} is initialized", getClass().getSimpleName());
-	}
-
-	@Override
-	public EdgeInfoAws getEdgeInfo(String user) {
-		return super.getEdgeInfo(user, EdgeInfoAws.class, new EdgeInfoAws());
-	}
-
-	@Override
-	public Optional<EdgeInfoAws> getEdgeInfoWhereStatusIn(String user, UserInstanceStatus... statuses) {
-		return super.getEdgeInfoWhereStatusIn(user, EdgeInfoAws.class, statuses);
-	}
-}
diff --git a/services/self-service/src/main/java/com/epam/dlab/backendapi/dao/azure/AzureKeyDao.java b/services/self-service/src/main/java/com/epam/dlab/backendapi/dao/azure/AzureKeyDao.java
deleted file mode 100644
index 4a7ec1b..0000000
--- a/services/self-service/src/main/java/com/epam/dlab/backendapi/dao/azure/AzureKeyDao.java
+++ /dev/null
@@ -1,47 +0,0 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements.  See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership.  The ASF licenses this file
- * to you 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.
- */
-
-package com.epam.dlab.backendapi.dao.azure;
-
-import com.epam.dlab.backendapi.dao.KeyDAO;
-import com.epam.dlab.dto.UserInstanceStatus;
-import com.epam.dlab.dto.azure.edge.EdgeInfoAzure;
-import com.google.inject.Singleton;
-import lombok.extern.slf4j.Slf4j;
-
-import java.util.Optional;
-
-@Slf4j
-@Singleton
-public class AzureKeyDao extends KeyDAO {
-
-	public AzureKeyDao() {
-		log.info("{} is initialized", getClass().getSimpleName());
-	}
-
-	@Override
-	public EdgeInfoAzure getEdgeInfo(String user) {
-		return super.getEdgeInfo(user, EdgeInfoAzure.class, new EdgeInfoAzure());
-	}
-
-	@Override
-	public Optional<EdgeInfoAzure> getEdgeInfoWhereStatusIn(String user, UserInstanceStatus... statuses) {
-		return super.getEdgeInfoWhereStatusIn(user, EdgeInfoAzure.class, statuses);
-	}
-}
diff --git a/services/self-service/src/main/java/com/epam/dlab/backendapi/dao/gcp/GcpKeyDao.java b/services/self-service/src/main/java/com/epam/dlab/backendapi/dao/gcp/GcpKeyDao.java
deleted file mode 100644
index 7057f8d..0000000
--- a/services/self-service/src/main/java/com/epam/dlab/backendapi/dao/gcp/GcpKeyDao.java
+++ /dev/null
@@ -1,47 +0,0 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements.  See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership.  The ASF licenses this file
- * to you 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.
- */
-
-package com.epam.dlab.backendapi.dao.gcp;
-
-import com.epam.dlab.backendapi.dao.KeyDAO;
-import com.epam.dlab.dto.UserInstanceStatus;
-import com.epam.dlab.dto.gcp.edge.EdgeInfoGcp;
-import com.google.inject.Singleton;
-import lombok.extern.slf4j.Slf4j;
-
-import java.util.Optional;
-
-
-@Slf4j
-@Singleton
-public class GcpKeyDao extends KeyDAO {
-	public GcpKeyDao() {
-		log.info("{} is initialized", getClass().getSimpleName());
-	}
-
-	@Override
-	public EdgeInfoGcp getEdgeInfo(String user) {
-		return super.getEdgeInfo(user, EdgeInfoGcp.class, new EdgeInfoGcp());
-	}
-
-	@Override
-	public Optional<EdgeInfoGcp> getEdgeInfoWhereStatusIn(String user, UserInstanceStatus... statuses) {
-		return super.getEdgeInfoWhereStatusIn(user, EdgeInfoGcp.class, statuses);
-	}
-}
diff --git a/services/self-service/src/main/java/com/epam/dlab/backendapi/modules/AwsSelfServiceModule.java b/services/self-service/src/main/java/com/epam/dlab/backendapi/modules/AwsSelfServiceModule.java
index a2f9217..f0b6077 100644
--- a/services/self-service/src/main/java/com/epam/dlab/backendapi/modules/AwsSelfServiceModule.java
+++ b/services/self-service/src/main/java/com/epam/dlab/backendapi/modules/AwsSelfServiceModule.java
@@ -23,14 +23,10 @@ import com.epam.dlab.backendapi.SelfServiceApplication;
 import com.epam.dlab.backendapi.annotation.BudgetLimited;
 import com.epam.dlab.backendapi.conf.SelfServiceApplicationConfiguration;
 import com.epam.dlab.backendapi.dao.BillingDAO;
-import com.epam.dlab.backendapi.dao.KeyDAO;
 import com.epam.dlab.backendapi.dao.aws.AwsBillingDAO;
-import com.epam.dlab.backendapi.dao.aws.AwsKeyDao;
 import com.epam.dlab.backendapi.interceptor.BudgetLimitInterceptor;
 import com.epam.dlab.backendapi.resources.aws.BillingResourceAws;
 import com.epam.dlab.backendapi.resources.aws.ComputationalResourceAws;
-import com.epam.dlab.backendapi.resources.callback.aws.EdgeCallbackAws;
-import com.epam.dlab.backendapi.resources.callback.aws.KeyUploaderCallbackAws;
 import com.epam.dlab.backendapi.service.BillingService;
 import com.epam.dlab.backendapi.service.aws.AwsBillingService;
 import com.epam.dlab.cloud.CloudModule;
@@ -56,7 +52,6 @@ public class AwsSelfServiceModule extends CloudModule {
 	@Override
 	protected void configure() {
 		bind(BillingService.class).to(AwsBillingService.class);
-		bind((KeyDAO.class)).to(AwsKeyDao.class);
 		bind(SchedulerConfiguration.class).toInstance(
 				new SchedulerConfiguration(SelfServiceApplication.class.getPackage().getName()));
 		bind(BillingDAO.class).to(AwsBillingDAO.class);
@@ -67,8 +62,6 @@ public class AwsSelfServiceModule extends CloudModule {
 
 	@Override
 	public void init(Environment environment, Injector injector) {
-		environment.jersey().register(injector.getInstance(EdgeCallbackAws.class));
-		environment.jersey().register(injector.getInstance(KeyUploaderCallbackAws.class));
 		environment.jersey().register(injector.getInstance(ComputationalResourceAws.class));
 		environment.jersey().register(injector.getInstance(BillingResourceAws.class));
 
diff --git a/services/self-service/src/main/java/com/epam/dlab/backendapi/modules/AzureSelfServiceModule.java b/services/self-service/src/main/java/com/epam/dlab/backendapi/modules/AzureSelfServiceModule.java
index b35cdfc..4ebe246 100644
--- a/services/self-service/src/main/java/com/epam/dlab/backendapi/modules/AzureSelfServiceModule.java
+++ b/services/self-service/src/main/java/com/epam/dlab/backendapi/modules/AzureSelfServiceModule.java
@@ -23,14 +23,10 @@ import com.epam.dlab.backendapi.SelfServiceApplication;
 import com.epam.dlab.backendapi.annotation.BudgetLimited;
 import com.epam.dlab.backendapi.conf.SelfServiceApplicationConfiguration;
 import com.epam.dlab.backendapi.dao.BillingDAO;
-import com.epam.dlab.backendapi.dao.KeyDAO;
 import com.epam.dlab.backendapi.dao.azure.AzureBillingDAO;
-import com.epam.dlab.backendapi.dao.azure.AzureKeyDao;
 import com.epam.dlab.backendapi.interceptor.BudgetLimitInterceptor;
 import com.epam.dlab.backendapi.resources.azure.BillingResourceAzure;
 import com.epam.dlab.backendapi.resources.azure.ComputationalResourceAzure;
-import com.epam.dlab.backendapi.resources.callback.azure.EdgeCallbackAzure;
-import com.epam.dlab.backendapi.resources.callback.azure.KeyUploaderCallbackAzure;
 import com.epam.dlab.backendapi.service.BillingService;
 import com.epam.dlab.backendapi.service.azure.AzureBillingService;
 import com.epam.dlab.cloud.CloudModule;
@@ -58,7 +54,6 @@ public class AzureSelfServiceModule extends CloudModule {
 	@Override
 	protected void configure() {
 		bind(BillingService.class).to(AzureBillingService.class);
-		bind((KeyDAO.class)).to(AzureKeyDao.class);
 		bind(SchedulerConfiguration.class).toInstance(
 				new SchedulerConfiguration(SelfServiceApplication.class.getPackage().getName()));
 		bind(BillingDAO.class).to(AzureBillingDAO.class);
@@ -69,8 +64,6 @@ public class AzureSelfServiceModule extends CloudModule {
 
 	@Override
 	public void init(Environment environment, Injector injector) {
-		environment.jersey().register(injector.getInstance(EdgeCallbackAzure.class));
-		environment.jersey().register(injector.getInstance(KeyUploaderCallbackAzure.class));
 		environment.jersey().register(injector.getInstance(ComputationalResourceAzure.class));
 		environment.jersey().register(injector.getInstance(BillingResourceAzure.class));
 
diff --git a/services/self-service/src/main/java/com/epam/dlab/backendapi/modules/CloudProviderModule.java b/services/self-service/src/main/java/com/epam/dlab/backendapi/modules/CloudProviderModule.java
index c41a67d..94e190d 100644
--- a/services/self-service/src/main/java/com/epam/dlab/backendapi/modules/CloudProviderModule.java
+++ b/services/self-service/src/main/java/com/epam/dlab/backendapi/modules/CloudProviderModule.java
@@ -23,14 +23,10 @@ import com.epam.dlab.backendapi.SelfServiceApplication;
 import com.epam.dlab.backendapi.annotation.BudgetLimited;
 import com.epam.dlab.backendapi.conf.SelfServiceApplicationConfiguration;
 import com.epam.dlab.backendapi.dao.BillingDAO;
-import com.epam.dlab.backendapi.dao.KeyDAO;
 import com.epam.dlab.backendapi.dao.aws.AwsBillingDAO;
-import com.epam.dlab.backendapi.dao.aws.AwsKeyDao;
 import com.epam.dlab.backendapi.interceptor.BudgetLimitInterceptor;
 import com.epam.dlab.backendapi.resources.aws.BillingResourceAws;
 import com.epam.dlab.backendapi.resources.aws.ComputationalResourceAws;
-import com.epam.dlab.backendapi.resources.callback.aws.EdgeCallbackAws;
-import com.epam.dlab.backendapi.resources.callback.aws.KeyUploaderCallbackAws;
 import com.epam.dlab.backendapi.service.BillingService;
 import com.epam.dlab.backendapi.service.InfrastructureInfoService;
 import com.epam.dlab.backendapi.service.InfrastructureTemplateService;
@@ -67,8 +63,6 @@ public class CloudProviderModule extends CloudModule {
                 new SchedulerConfiguration(SelfServiceApplication.class.getPackage().getName()));
 
 
-        bind((KeyDAO.class)).to(AwsKeyDao.class);
-
         final BudgetLimitInterceptor budgetLimitInterceptor = new BudgetLimitInterceptor();
         requestInjection(budgetLimitInterceptor);
         bindInterceptor(any(), annotatedWith(BudgetLimited.class), budgetLimitInterceptor);
@@ -76,8 +70,6 @@ public class CloudProviderModule extends CloudModule {
 
     @Override
     public void init(Environment environment, Injector injector) {
-        environment.jersey().register(injector.getInstance(EdgeCallbackAws.class));
-        environment.jersey().register(injector.getInstance(KeyUploaderCallbackAws.class));
         environment.jersey().register(injector.getInstance(ComputationalResourceAws.class));
         environment.jersey().register(injector.getInstance(BillingResourceAws.class));
     }
diff --git a/services/self-service/src/main/java/com/epam/dlab/backendapi/modules/DevModule.java b/services/self-service/src/main/java/com/epam/dlab/backendapi/modules/DevModule.java
index 3594826..cf08d12 100644
--- a/services/self-service/src/main/java/com/epam/dlab/backendapi/modules/DevModule.java
+++ b/services/self-service/src/main/java/com/epam/dlab/backendapi/modules/DevModule.java
@@ -89,9 +89,7 @@ public class DevModule extends ModuleBase<SelfServiceApplicationConfiguration> i
 		bind(LibraryService.class).to(LibraryServiceImpl.class);
 		bind(SchedulerJobService.class).to(SchedulerJobServiceImpl.class);
 		bind(EnvironmentService.class).to(EnvironmentServiceImpl.class);
-		bind(EdgeService.class).to(EdgeServiceImpl.class);
 		bind(ReuploadKeyService.class).to(ReuploadKeyServiceImpl.class);
-		bind(UserResourceService.class).to(UserResourceServiceImpl.class);
 		bind(RESTService.class).annotatedWith(Names.named(ServiceConsts.MAVEN_SEARCH_API))
 				.toInstance(configuration.getMavenApiFactory().build(environment, ServiceConsts.MAVEN_SEARCH_API));
 
diff --git a/services/self-service/src/main/java/com/epam/dlab/backendapi/modules/GcpSelfServiceModule.java b/services/self-service/src/main/java/com/epam/dlab/backendapi/modules/GcpSelfServiceModule.java
index 8c9ff00..d19e3b8 100644
--- a/services/self-service/src/main/java/com/epam/dlab/backendapi/modules/GcpSelfServiceModule.java
+++ b/services/self-service/src/main/java/com/epam/dlab/backendapi/modules/GcpSelfServiceModule.java
@@ -23,12 +23,8 @@ import com.epam.dlab.backendapi.SelfServiceApplication;
 import com.epam.dlab.backendapi.annotation.BudgetLimited;
 import com.epam.dlab.backendapi.conf.SelfServiceApplicationConfiguration;
 import com.epam.dlab.backendapi.dao.BillingDAO;
-import com.epam.dlab.backendapi.dao.KeyDAO;
 import com.epam.dlab.backendapi.dao.gcp.GcpBillingDao;
-import com.epam.dlab.backendapi.dao.gcp.GcpKeyDao;
 import com.epam.dlab.backendapi.interceptor.BudgetLimitInterceptor;
-import com.epam.dlab.backendapi.resources.callback.gcp.EdgeCallbackGcp;
-import com.epam.dlab.backendapi.resources.callback.gcp.KeyUploaderCallbackGcp;
 import com.epam.dlab.backendapi.resources.gcp.BillingResourceGcp;
 import com.epam.dlab.backendapi.resources.gcp.ComputationalResourceGcp;
 import com.epam.dlab.backendapi.resources.gcp.GcpOauthResource;
@@ -57,9 +53,6 @@ public class GcpSelfServiceModule extends CloudModule {
     @Override
     @SuppressWarnings("unchecked")
     public void init(Environment environment, Injector injector) {
-
-		environment.jersey().register(injector.getInstance(EdgeCallbackGcp.class));
-		environment.jersey().register(injector.getInstance(KeyUploaderCallbackGcp.class));
 		environment.jersey().register(injector.getInstance(ComputationalResourceGcp.class));
 		environment.jersey().register(injector.getInstance(BillingResourceGcp.class));
 		if (injector.getInstance(SelfServiceApplicationConfiguration.class).isGcpOuauth2AuthenticationEnabled()) {
@@ -71,7 +64,6 @@ public class GcpSelfServiceModule extends CloudModule {
     @Override
     protected void configure() {
         bind(BillingService.class).to(GcpBillingService.class);
-        bind((KeyDAO.class)).to(GcpKeyDao.class);
         bind(BillingDAO.class).to(GcpBillingDao.class);
         bind(SchedulerConfiguration.class).toInstance(
                 new SchedulerConfiguration(SelfServiceApplication.class.getPackage().getName()));
diff --git a/services/self-service/src/main/java/com/epam/dlab/backendapi/modules/ProductionModule.java b/services/self-service/src/main/java/com/epam/dlab/backendapi/modules/ProductionModule.java
index f66487a..0d0ae1d 100644
--- a/services/self-service/src/main/java/com/epam/dlab/backendapi/modules/ProductionModule.java
+++ b/services/self-service/src/main/java/com/epam/dlab/backendapi/modules/ProductionModule.java
@@ -78,9 +78,7 @@ public class ProductionModule extends ModuleBase<SelfServiceApplicationConfigura
 		bind(LibraryService.class).to(LibraryServiceImpl.class);
 		bind(SchedulerJobService.class).to(SchedulerJobServiceImpl.class);
 		bind(EnvironmentService.class).to(EnvironmentServiceImpl.class);
-		bind(EdgeService.class).to(EdgeServiceImpl.class);
 		bind(ReuploadKeyService.class).to(ReuploadKeyServiceImpl.class);
-		bind(UserResourceService.class).to(UserResourceServiceImpl.class);
 		bind(RESTService.class).annotatedWith(Names.named(ServiceConsts.MAVEN_SEARCH_API))
 				.toInstance(configuration.getMavenApiFactory().build(environment, ServiceConsts.MAVEN_SEARCH_API));
 		bind(ExternalLibraryService.class).to(MavenCentralLibraryService.class);
diff --git a/services/self-service/src/main/java/com/epam/dlab/backendapi/resources/EdgeResource.java b/services/self-service/src/main/java/com/epam/dlab/backendapi/resources/EdgeResource.java
deleted file mode 100644
index 3ae31b3..0000000
--- a/services/self-service/src/main/java/com/epam/dlab/backendapi/resources/EdgeResource.java
+++ /dev/null
@@ -1,74 +0,0 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements.  See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership.  The ASF licenses this file
- * to you 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.
- */
-
-package com.epam.dlab.backendapi.resources;
-
-import com.epam.dlab.auth.UserInfo;
-import com.epam.dlab.backendapi.service.EdgeService;
-import com.epam.dlab.rest.contracts.EdgeAPI;
-import com.google.inject.Inject;
-import io.dropwizard.auth.Auth;
-import lombok.extern.slf4j.Slf4j;
-
-import javax.ws.rs.Consumes;
-import javax.ws.rs.POST;
-import javax.ws.rs.Path;
-import javax.ws.rs.Produces;
-import javax.ws.rs.core.MediaType;
-
-/**
- * Provides the REST API to manage(start/stop) edge node
- */
-@Path("/infrastructure/edge")
-@Consumes(MediaType.APPLICATION_JSON)
-@Produces(MediaType.APPLICATION_JSON)
-@Slf4j
-public class EdgeResource implements EdgeAPI {
-
-	private final EdgeService edgeService;
-
-	@Inject
-	public EdgeResource(EdgeService edgeService) {
-		this.edgeService = edgeService;
-	}
-
-	/**
-	 * Starts EDGE node for user.
-	 *
-	 * @param userInfo user info.
-	 * @return Request Id.
-	 */
-	@POST
-	@Path("/start")
-	public String start(@Auth UserInfo userInfo) {
-		return edgeService.start(userInfo);
-	}
-
-	/**
-	 * Stop EDGE node for user.
-	 *
-	 * @param userInfo user info.
-	 * @return Request Id.
-	 */
-	@POST
-	@Path("/stop")
-	public String stop(@Auth UserInfo userInfo) {
-		return edgeService.stop(userInfo);
-	}
-}
\ No newline at end of file
diff --git a/services/self-service/src/main/java/com/epam/dlab/backendapi/resources/EnvironmentResource.java b/services/self-service/src/main/java/com/epam/dlab/backendapi/resources/EnvironmentResource.java
index 1bd6826..f227f3f 100644
--- a/services/self-service/src/main/java/com/epam/dlab/backendapi/resources/EnvironmentResource.java
+++ b/services/self-service/src/main/java/com/epam/dlab/backendapi/resources/EnvironmentResource.java
@@ -62,17 +62,6 @@ public class EnvironmentResource {
 	@POST
 	@Consumes(MediaType.TEXT_PLAIN)
 	@Produces(MediaType.APPLICATION_JSON)
-	@Path("terminate")
-	public Response terminateEnv(@Auth UserInfo userInfo,
-								 @NotEmpty String user) {
-		log.info("User {} is terminating {} environment", userInfo.getName(), user);
-		environmentService.terminateEnvironment(userInfo, user);
-		return Response.ok().build();
-	}
-
-	@POST
-	@Consumes(MediaType.TEXT_PLAIN)
-	@Produces(MediaType.APPLICATION_JSON)
 	@Path("stop")
 	public Response stopEnv(@Auth UserInfo userInfo,
 							@NotEmpty String user) {
@@ -84,16 +73,6 @@ public class EnvironmentResource {
 	@POST
 	@Consumes(MediaType.TEXT_PLAIN)
 	@Produces(MediaType.APPLICATION_JSON)
-	@Path("stop/edge")
-	public Response stopEdge(@Auth UserInfo userInfo, @NotEmpty String user) {
-		log.info("Admin {} is stopping edge of user {}", userInfo.getName(), user);
-		environmentService.stopEdge(user);
-		return Response.ok().build();
-	}
-
-	@POST
-	@Consumes(MediaType.TEXT_PLAIN)
-	@Produces(MediaType.APPLICATION_JSON)
 	@Path("stop/{exploratoryName}")
 	public Response stopNotebook(@Auth UserInfo userInfo, @NotEmpty String user,
 								 @PathParam("exploratoryName") String exploratoryName) {
diff --git a/services/self-service/src/main/java/com/epam/dlab/backendapi/resources/KeyUploaderResource.java b/services/self-service/src/main/java/com/epam/dlab/backendapi/resources/KeyUploaderResource.java
deleted file mode 100644
index a58f8dc..0000000
--- a/services/self-service/src/main/java/com/epam/dlab/backendapi/resources/KeyUploaderResource.java
+++ /dev/null
@@ -1,131 +0,0 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements.  See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership.  The ASF licenses this file
- * to you 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.
- */
-
-package com.epam.dlab.backendapi.resources;
-
-import com.epam.dlab.auth.UserInfo;
-import com.epam.dlab.backendapi.service.AccessKeyService;
-import com.epam.dlab.dto.keyload.KeyLoadStatus;
-import com.epam.dlab.exceptions.DlabException;
-import com.epam.dlab.exceptions.DlabValidationException;
-import com.epam.dlab.exceptions.ResourceNotFoundException;
-import com.epam.dlab.rest.contracts.EdgeAPI;
-import com.google.inject.Inject;
-import io.dropwizard.auth.Auth;
-import lombok.extern.slf4j.Slf4j;
-import org.glassfish.jersey.media.multipart.FormDataParam;
-
-import javax.ws.rs.*;
-import javax.ws.rs.core.HttpHeaders;
-import javax.ws.rs.core.MediaType;
-import javax.ws.rs.core.Response;
-import javax.ws.rs.core.Response.Status;
-
-/**
- * Provides the REST API for upload the user key.
- */
-@Path("/user/access_key")
-@Consumes(MediaType.APPLICATION_JSON)
-@Produces(MediaType.APPLICATION_JSON)
-@Slf4j
-public class KeyUploaderResource implements EdgeAPI {
-
-	private static final String FILE_ATTACHMENT_FORMAT = "attachment; filename=\"%s.pem\"";
-	private AccessKeyService keyService;
-
-	@Inject
-	public KeyUploaderResource(AccessKeyService keyService) {
-		this.keyService = keyService;
-	}
-
-	/**
-	 * Finds and returns the status of the user key.
-	 *
-	 * @param userInfo user info.
-	 * @return <pre>
-	 * {@link Status#NOT_FOUND} the user key has been not found.
-	 * {@link Status#ACCEPTED} the user key is uploading now.
-	 * {@link Status#OK} the user key is valid.
-	 * {@link Status#INTERNAL_SERVER_ERROR} the check of the status is failed.
-	 * </pre>
-	 */
-	@GET
-	public Response checkKey(@Auth UserInfo userInfo) {
-		final KeyLoadStatus status = keyService.getUserKeyStatus(userInfo.getName());
-		if (KeyLoadStatus.NONE == status) {
-			throw new ResourceNotFoundException("Key for user " + userInfo.getName() + " not found");
-		} else if (KeyLoadStatus.ERROR == status) {
-			throw new DlabException("Key for user " + userInfo.getName() + " is in error state");
-		}
-		return Response.status(status.getHttpStatus()).build();
-	}
-
-	/**
-	 * Uploads/reuploads the user key to server. If param 'isPrimaryUploading' equals 'true', then it stores
-	 * the user key to the database and calls the post method of the provisioning service for the key uploading
-	 * and edge creating for user. Else if this param equals 'false', then only replacing keys in the database
-	 * will be performed (user's key will be reuploaded).
-	 *
-	 * @param userInfo           user info.
-	 * @param fileContent        content of the user key.
-	 * @param isPrimaryUploading true if key is being primarily uploaded, false - in case of reuploading
-	 * @return 200 Ok
-	 */
-	@POST
-	@Consumes(MediaType.MULTIPART_FORM_DATA)
-	public Response loadKey( @Auth UserInfo userInfo,
-							@FormDataParam("file") String fileContent,
-							@QueryParam("is_primary_uploading") @DefaultValue("true") boolean isPrimaryUploading) {
-
-		validate(fileContent);
-		keyService.uploadKey(userInfo, fileContent, isPrimaryUploading);
-		return Response.ok().build();
-	}
-
-	/**
-	 * Creates the EDGE node and upload the user key  for user.
-	 *
-	 * @param userInfo user info.
-	 * @return {@link Response.Status#OK} request for provisioning service has been accepted.<br>
-	 */
-	@POST
-	@Path("/recover")
-	public Response recover(@Auth UserInfo userInfo) {
-		return Response.ok(keyService.recoverEdge(userInfo)).build();
-	}
-
-
-	@POST
-	@Path("/generate")
-	@Produces(MediaType.APPLICATION_OCTET_STREAM)
-	public Response generate(@Auth UserInfo userInfo,
-							 @QueryParam("is_primary_uploading") @DefaultValue("true") boolean isPrimaryUploading) {
-		final Response.ResponseBuilder builder = Response.ok(keyService.generateKey(userInfo, isPrimaryUploading));
-		builder.header(HttpHeaders.CONTENT_DISPOSITION, String.format(FILE_ATTACHMENT_FORMAT, userInfo.getName()));
-		return builder.build();
-	}
-
-	private void validate(String publicKey) {
-		if (!publicKey.startsWith("ssh-")) {
-			log.error("Wrong key format. Key should be in openSSH format");
-			log.trace("Key content:\n{}", publicKey);
-			throw new DlabValidationException("Wrong key format. Key should be in openSSH format");
-		}
-	}
-}
diff --git a/services/self-service/src/main/java/com/epam/dlab/backendapi/resources/callback/aws/EdgeCallbackAws.java b/services/self-service/src/main/java/com/epam/dlab/backendapi/resources/callback/aws/EdgeCallbackAws.java
deleted file mode 100644
index 696e0ed..0000000
--- a/services/self-service/src/main/java/com/epam/dlab/backendapi/resources/callback/aws/EdgeCallbackAws.java
+++ /dev/null
@@ -1,65 +0,0 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements.  See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership.  The ASF licenses this file
- * to you 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.
- */
-
-package com.epam.dlab.backendapi.resources.callback.aws;
-
-import com.epam.dlab.auth.UserInfo;
-import com.epam.dlab.backendapi.domain.RequestId;
-import com.epam.dlab.backendapi.resources.callback.base.EdgeCallback;
-import com.epam.dlab.dto.aws.edge.EdgeInfoAws;
-import com.epam.dlab.dto.base.keyload.UploadFileResult;
-import com.epam.dlab.rest.contracts.ApiCallbacks;
-import com.google.inject.Inject;
-import io.dropwizard.auth.Auth;
-import lombok.extern.slf4j.Slf4j;
-
-import javax.ws.rs.Consumes;
-import javax.ws.rs.POST;
-import javax.ws.rs.Path;
-import javax.ws.rs.Produces;
-import javax.ws.rs.core.MediaType;
-import javax.ws.rs.core.Response;
-
-@Path("/infrastructure/edge")
-@Consumes(MediaType.APPLICATION_JSON)
-@Produces(MediaType.APPLICATION_JSON)
-@Slf4j
-public class EdgeCallbackAws extends EdgeCallback {
-
-	@Inject
-	private RequestId requestId;
-
-    public EdgeCallbackAws() {
-        log.info("{} is initialized", getClass().getSimpleName());
-    }
-
-    /**
-     * Stores the result of the upload the user key.
-     *
-     * @param dto result of the upload the user key.
-     * @return 200 OK
-     */
-    @POST
-    @Path(ApiCallbacks.STATUS_URI)
-    public Response status(@Auth UserInfo ui, UploadFileResult<EdgeInfoAws> dto) {
-		requestId.checkAndRemove(dto.getRequestId());
-        handleEdgeCallback(dto.getUser(), dto.getStatus());
-        return Response.ok().build();
-    }
-}
diff --git a/services/self-service/src/main/java/com/epam/dlab/backendapi/resources/callback/aws/KeyUploaderCallbackAws.java b/services/self-service/src/main/java/com/epam/dlab/backendapi/resources/callback/aws/KeyUploaderCallbackAws.java
deleted file mode 100644
index b3561ed..0000000
--- a/services/self-service/src/main/java/com/epam/dlab/backendapi/resources/callback/aws/KeyUploaderCallbackAws.java
+++ /dev/null
@@ -1,66 +0,0 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements.  See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership.  The ASF licenses this file
- * to you 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.
- */
-
-package com.epam.dlab.backendapi.resources.callback.aws;
-
-import com.epam.dlab.backendapi.domain.RequestId;
-import com.epam.dlab.backendapi.resources.callback.base.KeyUploaderCallback;
-import com.epam.dlab.dto.aws.edge.EdgeInfoAws;
-import com.epam.dlab.dto.base.keyload.UploadFileResult;
-import com.google.inject.Inject;
-import lombok.extern.slf4j.Slf4j;
-
-import javax.ws.rs.Consumes;
-import javax.ws.rs.POST;
-import javax.ws.rs.Path;
-import javax.ws.rs.Produces;
-import javax.ws.rs.core.MediaType;
-import javax.ws.rs.core.Response;
-
-@Path("/user/access_key")
-@Consumes(MediaType.APPLICATION_JSON)
-@Produces(MediaType.APPLICATION_JSON)
-@Slf4j
-public class KeyUploaderCallbackAws {
-	@Inject
-	private KeyUploaderCallback keyUploaderCallback;
-	@Inject
-	private RequestId requestId;
-
-	public KeyUploaderCallbackAws() {
-		log.info("{} is initialized", getClass().getSimpleName());
-	}
-
-	/**
-	 * Stores the result of the upload the user key.
-	 *
-	 * @param dto result of the upload the user key.
-	 * @return 200 OK
-	 */
-	@POST
-	@Path("/callback")
-	public Response loadKeyResponse(UploadFileResult<EdgeInfoAws> dto) {
-		log.debug("Upload the key result and EDGE node info for user {}: {}", dto.getUser(), dto);
-		requestId.checkAndRemove(dto.getRequestId());
-		keyUploaderCallback.handleCallback(dto.getStatus(), dto.getUser(), dto.getEdgeInfo());
-
-		return Response.ok().build();
-
-	}
-}
diff --git a/services/self-service/src/main/java/com/epam/dlab/backendapi/resources/callback/azure/EdgeCallbackAzure.java b/services/self-service/src/main/java/com/epam/dlab/backendapi/resources/callback/azure/EdgeCallbackAzure.java
deleted file mode 100644
index 0fe97b3..0000000
--- a/services/self-service/src/main/java/com/epam/dlab/backendapi/resources/callback/azure/EdgeCallbackAzure.java
+++ /dev/null
@@ -1,63 +0,0 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements.  See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership.  The ASF licenses this file
- * to you 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.
- */
-
-package com.epam.dlab.backendapi.resources.callback.azure;
-
-import com.epam.dlab.backendapi.domain.RequestId;
-import com.epam.dlab.backendapi.resources.callback.base.EdgeCallback;
-import com.epam.dlab.dto.azure.edge.EdgeInfoAzure;
-import com.epam.dlab.dto.base.keyload.UploadFileResult;
-import com.epam.dlab.rest.contracts.ApiCallbacks;
-import com.google.inject.Inject;
-import lombok.extern.slf4j.Slf4j;
-
-import javax.ws.rs.Consumes;
-import javax.ws.rs.POST;
-import javax.ws.rs.Path;
-import javax.ws.rs.Produces;
-import javax.ws.rs.core.MediaType;
-import javax.ws.rs.core.Response;
-
-@Path("/infrastructure/edge")
-@Consumes(MediaType.APPLICATION_JSON)
-@Produces(MediaType.APPLICATION_JSON)
-@Slf4j
-public class EdgeCallbackAzure extends EdgeCallback {
-
-	@Inject
-	private RequestId requestId;
-
-	public EdgeCallbackAzure() {
-		log.info("{} is initialized", getClass().getSimpleName());
-	}
-
-	/**
-	 * Stores the result of the upload the user key.
-	 *
-	 * @param dto result of the upload the user key.
-	 * @return 200 OK
-	 */
-	@POST
-	@Path(ApiCallbacks.STATUS_URI)
-	public Response status(UploadFileResult<EdgeInfoAzure> dto) {
-		requestId.checkAndRemove(dto.getRequestId());
-		handleEdgeCallback(dto.getUser(), dto.getStatus());
-		return Response.ok().build();
-	}
-}
diff --git a/services/self-service/src/main/java/com/epam/dlab/backendapi/resources/callback/azure/KeyUploaderCallbackAzure.java b/services/self-service/src/main/java/com/epam/dlab/backendapi/resources/callback/azure/KeyUploaderCallbackAzure.java
deleted file mode 100644
index b383ce0..0000000
--- a/services/self-service/src/main/java/com/epam/dlab/backendapi/resources/callback/azure/KeyUploaderCallbackAzure.java
+++ /dev/null
@@ -1,70 +0,0 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements.  See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership.  The ASF licenses this file
- * to you 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.
- */
-
-package com.epam.dlab.backendapi.resources.callback.azure;
-
-import com.epam.dlab.auth.UserInfo;
-import com.epam.dlab.backendapi.domain.RequestId;
-import com.epam.dlab.backendapi.resources.callback.base.KeyUploaderCallback;
-import com.epam.dlab.dto.azure.edge.EdgeInfoAzure;
-import com.epam.dlab.dto.base.keyload.UploadFileResult;
-import com.google.inject.Inject;
-import io.dropwizard.auth.Auth;
-import lombok.extern.slf4j.Slf4j;
-
-import javax.ws.rs.Consumes;
-import javax.ws.rs.POST;
-import javax.ws.rs.Path;
-import javax.ws.rs.Produces;
-import javax.ws.rs.core.MediaType;
-import javax.ws.rs.core.Response;
-
-@Path("/user/access_key")
-@Consumes(MediaType.APPLICATION_JSON)
-@Produces(MediaType.APPLICATION_JSON)
-@Slf4j
-public class KeyUploaderCallbackAzure {
-
-    @Inject
-    private KeyUploaderCallback keyUploaderCallback;
-
-	@Inject
-	private RequestId requestId;
-
-    public KeyUploaderCallbackAzure() {
-        log.info("{} is initialized", getClass().getSimpleName());
-    }
-
-    /**
-     * Stores the result of the upload the user key.
-     *
-     * @param dto result of the upload the user key.
-     * @return 200 OK
-     */
-    @POST
-    @Path("/callback")
-	public Response loadKeyResponse(UploadFileResult<EdgeInfoAzure> dto) {
-        log.debug("Upload the key result and EDGE node info for user {}: {}", dto.getUser(), dto);
-		requestId.checkAndRemove(dto.getRequestId());
-        keyUploaderCallback.handleCallback(dto.getStatus(), dto.getUser(), dto.getEdgeInfo());
-
-        return Response.ok().build();
-
-    }
-}
diff --git a/services/self-service/src/main/java/com/epam/dlab/backendapi/resources/callback/base/EdgeCallback.java b/services/self-service/src/main/java/com/epam/dlab/backendapi/resources/callback/base/EdgeCallback.java
deleted file mode 100644
index 48ca592..0000000
--- a/services/self-service/src/main/java/com/epam/dlab/backendapi/resources/callback/base/EdgeCallback.java
+++ /dev/null
@@ -1,78 +0,0 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements.  See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership.  The ASF licenses this file
- * to you 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.
- */
-
-package com.epam.dlab.backendapi.resources.callback.base;
-
-import com.epam.dlab.auth.UserInfo;
-import com.epam.dlab.backendapi.dao.KeyDAO;
-import com.epam.dlab.backendapi.service.ExploratoryService;
-import com.epam.dlab.backendapi.service.ReuploadKeyService;
-import com.epam.dlab.backendapi.service.SecurityService;
-import com.epam.dlab.dto.UserInstanceStatus;
-import com.epam.dlab.dto.base.edge.EdgeInfo;
-import com.epam.dlab.exceptions.DlabException;
-import com.epam.dlab.model.ResourceData;
-import com.google.inject.Inject;
-import lombok.extern.slf4j.Slf4j;
-
-import static com.epam.dlab.dto.UserInstanceStatus.RUNNING;
-
-@Slf4j
-public class EdgeCallback {
-	@Inject
-	private KeyDAO keyDAO;
-	@Inject
-	private ExploratoryService exploratoryService;
-	@Inject
-	private SecurityService securityService;
-	@Inject
-	private ReuploadKeyService reuploadKeyService;
-
-	protected EdgeCallback() {
-		log.info("{} is initialized", getClass().getSimpleName());
-	}
-
-	protected void handleEdgeCallback(String user, String status) {
-		EdgeInfo edgeInfo = keyDAO.getEdgeInfo(user);
-		log.debug("Current status of edge node for user {} is {}", user,
-				UserInstanceStatus.of(edgeInfo.getEdgeStatus()));
-
-		try {
-			if (UserInstanceStatus.of(status) == UserInstanceStatus.TERMINATED) {
-				log.debug("Removing key for user {}", user);
-				keyDAO.deleteKey(user);
-				keyDAO.removeEdge(user);
-			}
-			log.debug("Updating the status of EDGE node for user {} to {}", user, status);
-			keyDAO.updateEdgeStatus(user, status);
-
-		} catch (DlabException e) {
-			log.error("Could not update status of EDGE node for user {} to {}", user, status, e);
-			throw new DlabException(String.format("Could not update status of EDGE node to %s: %s",
-					status, e.getLocalizedMessage()), e);
-		}
-		if (UserInstanceStatus.of(status) == RUNNING && edgeInfo.isReuploadKeyRequired()) {
-			ResourceData resourceData = ResourceData.edgeResource(edgeInfo.getInstanceId());
-			UserInfo userInfo = securityService.getUserInfoOffline(user);
-			reuploadKeyService.reuploadKeyAction(userInfo, resourceData);
-		}
-	}
-
-
-}
diff --git a/services/self-service/src/main/java/com/epam/dlab/backendapi/resources/callback/base/KeyUploaderCallback.java b/services/self-service/src/main/java/com/epam/dlab/backendapi/resources/callback/base/KeyUploaderCallback.java
deleted file mode 100644
index 5c6e81d..0000000
--- a/services/self-service/src/main/java/com/epam/dlab/backendapi/resources/callback/base/KeyUploaderCallback.java
+++ /dev/null
@@ -1,58 +0,0 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements.  See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership.  The ASF licenses this file
- * to you 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.
- */
-
-package com.epam.dlab.backendapi.resources.callback.base;
-
-import com.epam.dlab.backendapi.dao.KeyDAO;
-import com.epam.dlab.dto.UserInstanceStatus;
-import com.epam.dlab.dto.base.edge.EdgeInfo;
-import com.epam.dlab.dto.keyload.KeyLoadStatus;
-import com.epam.dlab.exceptions.DlabException;
-import com.google.inject.Inject;
-import com.google.inject.Singleton;
-import lombok.extern.slf4j.Slf4j;
-
-@Singleton
-@Slf4j
-public class KeyUploaderCallback {
-    @Inject
-    private KeyDAO keyDAO;
-
-    public void handleCallback(String status, String user, EdgeInfo edgeInfo) {
-
-        boolean isSuccess = UserInstanceStatus.of(status) == UserInstanceStatus.RUNNING;
-        try {
-            keyDAO.updateKey(user, KeyLoadStatus.getStatus(isSuccess));
-            if (isSuccess) {
-                keyDAO.updateEdgeInfo(user, edgeInfo);
-            } else {
-                UserInstanceStatus instanceStatus = UserInstanceStatus.of(keyDAO.getEdgeStatus(user));
-                if (instanceStatus == null) {
-                    log.debug("Updating the key status for user {} to error", user);
-                    keyDAO.updateKey(user, "error");
-                } else {
-                    keyDAO.updateEdgeStatus(user, status);
-                }
-            }
-        } catch (DlabException e) {
-            log.error("Could not upload the key result and create EDGE node for user {}", user, e);
-            throw new DlabException("Could not upload the key result and create EDGE node for user " + user + ": " + e.getLocalizedMessage(), e);
-        }
-    }
-}
diff --git a/services/self-service/src/main/java/com/epam/dlab/backendapi/resources/callback/gcp/EdgeCallbackGcp.java b/services/self-service/src/main/java/com/epam/dlab/backendapi/resources/callback/gcp/EdgeCallbackGcp.java
deleted file mode 100644
index 57c521f..0000000
--- a/services/self-service/src/main/java/com/epam/dlab/backendapi/resources/callback/gcp/EdgeCallbackGcp.java
+++ /dev/null
@@ -1,63 +0,0 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements.  See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership.  The ASF licenses this file
- * to you 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.
- */
-
-package com.epam.dlab.backendapi.resources.callback.gcp;
-
-import com.epam.dlab.backendapi.domain.RequestId;
-import com.epam.dlab.backendapi.resources.callback.base.EdgeCallback;
-import com.epam.dlab.dto.base.keyload.UploadFileResult;
-import com.epam.dlab.dto.gcp.edge.EdgeInfoGcp;
-import com.epam.dlab.rest.contracts.ApiCallbacks;
-import com.google.inject.Inject;
-import lombok.extern.slf4j.Slf4j;
-
-import javax.ws.rs.Consumes;
-import javax.ws.rs.POST;
-import javax.ws.rs.Path;
-import javax.ws.rs.Produces;
-import javax.ws.rs.core.MediaType;
-import javax.ws.rs.core.Response;
-
-@Path("/infrastructure/edge")
-@Consumes(MediaType.APPLICATION_JSON)
-@Produces(MediaType.APPLICATION_JSON)
-@Slf4j
-public class EdgeCallbackGcp extends EdgeCallback {
-
-	@Inject
-	private RequestId requestId;
-
-	public EdgeCallbackGcp() {
-		log.info("{} is initialized", getClass().getSimpleName());
-	}
-
-	/**
-	 * Stores the result of the upload the user key.
-	 *
-	 * @param dto result of the upload the user key.
-	 * @return 200 OK
-	 */
-	@POST
-	@Path(ApiCallbacks.STATUS_URI)
-	public Response status(UploadFileResult<EdgeInfoGcp> dto) {
-		requestId.checkAndRemove(dto.getRequestId());
-		handleEdgeCallback(dto.getUser(), dto.getStatus());
-		return Response.ok().build();
-	}
-}
diff --git a/services/self-service/src/main/java/com/epam/dlab/backendapi/resources/callback/gcp/KeyUploaderCallbackGcp.java b/services/self-service/src/main/java/com/epam/dlab/backendapi/resources/callback/gcp/KeyUploaderCallbackGcp.java
deleted file mode 100644
index 3a2ce34..0000000
--- a/services/self-service/src/main/java/com/epam/dlab/backendapi/resources/callback/gcp/KeyUploaderCallbackGcp.java
+++ /dev/null
@@ -1,68 +0,0 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements.  See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership.  The ASF licenses this file
- * to you 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.
- */
-
-package com.epam.dlab.backendapi.resources.callback.gcp;
-
-import com.epam.dlab.backendapi.domain.RequestId;
-import com.epam.dlab.backendapi.resources.callback.base.KeyUploaderCallback;
-import com.epam.dlab.dto.base.keyload.UploadFileResult;
-import com.epam.dlab.dto.gcp.edge.EdgeInfoGcp;
-import com.google.inject.Inject;
-import lombok.extern.slf4j.Slf4j;
-
-import javax.ws.rs.Consumes;
-import javax.ws.rs.POST;
-import javax.ws.rs.Path;
-import javax.ws.rs.Produces;
-import javax.ws.rs.core.MediaType;
-import javax.ws.rs.core.Response;
-
-@Path("/user/access_key")
-@Consumes(MediaType.APPLICATION_JSON)
-@Produces(MediaType.APPLICATION_JSON)
-@Slf4j
-public class KeyUploaderCallbackGcp {
-
-	@Inject
-	private KeyUploaderCallback keyUploaderCallback;
-
-	@Inject
-	private RequestId requestId;
-
-	public KeyUploaderCallbackGcp() {
-		log.info("{} is initialized", getClass().getSimpleName());
-	}
-
-	/**
-	 * Stores the result of the upload the user key.
-	 *
-	 * @param dto result of the upload the user key.
-	 * @return 200 OK
-	 */
-	@POST
-	@Path("/callback")
-	public Response loadKeyResponse(UploadFileResult<EdgeInfoGcp> dto) {
-		log.debug("Upload the key result and EDGE node info for user {}: {}", dto.getUser(), dto);
-		requestId.checkAndRemove(dto.getRequestId());
-		keyUploaderCallback.handleCallback(dto.getStatus(), dto.getUser(), dto.getEdgeInfo());
-
-		return Response.ok().build();
-
-	}
-}
diff --git a/services/self-service/src/main/java/com/epam/dlab/backendapi/service/AccessKeyService.java b/services/self-service/src/main/java/com/epam/dlab/backendapi/service/AccessKeyService.java
index 145079e..c037285 100644
--- a/services/self-service/src/main/java/com/epam/dlab/backendapi/service/AccessKeyService.java
+++ b/services/self-service/src/main/java/com/epam/dlab/backendapi/service/AccessKeyService.java
@@ -21,17 +21,8 @@ package com.epam.dlab.backendapi.service;
 
 import com.epam.dlab.auth.UserInfo;
 import com.epam.dlab.backendapi.resources.dto.KeysDTO;
-import com.epam.dlab.dto.keyload.KeyLoadStatus;
 
 public interface AccessKeyService {
 
-	KeyLoadStatus getUserKeyStatus(String user);
-
-	String uploadKey(UserInfo user, String keyContent, boolean isPrimaryUploading);
-
-	String recoverEdge(UserInfo userInfo);
-
-	String generateKey(UserInfo userInfo, boolean createEdge);
-
 	KeysDTO generateKeys(UserInfo userInfo);
 }
diff --git a/services/self-service/src/main/java/com/epam/dlab/backendapi/service/EdgeService.java b/services/self-service/src/main/java/com/epam/dlab/backendapi/service/EdgeService.java
deleted file mode 100644
index 55661c7..0000000
--- a/services/self-service/src/main/java/com/epam/dlab/backendapi/service/EdgeService.java
+++ /dev/null
@@ -1,35 +0,0 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements.  See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership.  The ASF licenses this file
- * to you 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.
- */
-
-package com.epam.dlab.backendapi.service;
-
-import com.epam.dlab.auth.UserInfo;
-import com.epam.dlab.dto.UserInstanceStatus;
-
-public interface EdgeService {
-	String start(UserInfo userInfo);
-
-	String stop(UserInfo userInfo);
-
-	String terminate(UserInfo userInfo);
-
-	void updateReuploadKeyFlag(String user, boolean reuploadKeyRequired, UserInstanceStatus... edgeStatuses);
-
-	String getEdgeInfo(UserInfo userInfo, String projectName);
-}
diff --git a/services/self-service/src/main/java/com/epam/dlab/backendapi/service/EnvironmentService.java b/services/self-service/src/main/java/com/epam/dlab/backendapi/service/EnvironmentService.java
index 91d0ed7..5ef7cae 100644
--- a/services/self-service/src/main/java/com/epam/dlab/backendapi/service/EnvironmentService.java
+++ b/services/self-service/src/main/java/com/epam/dlab/backendapi/service/EnvironmentService.java
@@ -42,14 +42,10 @@ public interface EnvironmentService {
 
 	void stopProjectEnvironment(String project);
 
-	void stopEdge(String user);
-
 	void stopExploratory(UserInfo userInfo, String user, String exploratoryName);
 
 	void stopComputational(UserInfo userInfo, String user, String exploratoryName, String computationalName);
 
-	void terminateEnvironment(UserInfo userInfo, String user);
-
 	void terminateExploratory(UserInfo userInfo, String user, String exploratoryName);
 
 	void terminateComputational(UserInfo userInfo, String user, String exploratoryName, String computationalName);
diff --git a/services/self-service/src/main/java/com/epam/dlab/backendapi/service/ReuploadKeyService.java b/services/self-service/src/main/java/com/epam/dlab/backendapi/service/ReuploadKeyService.java
index 88f1e9e..45939a0 100644
--- a/services/self-service/src/main/java/com/epam/dlab/backendapi/service/ReuploadKeyService.java
+++ b/services/self-service/src/main/java/com/epam/dlab/backendapi/service/ReuploadKeyService.java
@@ -25,8 +25,6 @@ import com.epam.dlab.model.ResourceData;
 
 public interface ReuploadKeyService {
 
-	String reuploadKey(UserInfo user, String keyContent);
-
 	void reuploadKeyAction(UserInfo userInfo, ResourceData resourceData);
 
 	void updateResourceData(ReuploadKeyStatusDTO dto);
diff --git a/services/self-service/src/main/java/com/epam/dlab/backendapi/service/UserResourceService.java b/services/self-service/src/main/java/com/epam/dlab/backendapi/service/UserResourceService.java
deleted file mode 100644
index 972e78f..0000000
--- a/services/self-service/src/main/java/com/epam/dlab/backendapi/service/UserResourceService.java
+++ /dev/null
@@ -1,33 +0,0 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements.  See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership.  The ASF licenses this file
- * to you 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.
- */
-
-
-package com.epam.dlab.backendapi.service;
-
-import com.epam.dlab.dto.UserInstanceDTO;
-import com.epam.dlab.model.ResourceData;
-
-import java.util.List;
-
-public interface UserResourceService {
-
-	List<ResourceData> convertToResourceData(List<UserInstanceDTO> userInstances);
-
-	void updateReuploadKeyFlagForUserResources(String user, boolean reuploadKeyRequired);
-}
diff --git a/services/self-service/src/main/java/com/epam/dlab/backendapi/service/impl/AccessKeyServiceImpl.java b/services/self-service/src/main/java/com/epam/dlab/backendapi/service/impl/AccessKeyServiceImpl.java
index 193e28a..11c8ef4 100644
--- a/services/self-service/src/main/java/com/epam/dlab/backendapi/service/impl/AccessKeyServiceImpl.java
+++ b/services/self-service/src/main/java/com/epam/dlab/backendapi/service/impl/AccessKeyServiceImpl.java
@@ -21,23 +21,11 @@ package com.epam.dlab.backendapi.service.impl;
 
 import com.epam.dlab.auth.UserInfo;
 import com.epam.dlab.backendapi.conf.SelfServiceApplicationConfiguration;
-import com.epam.dlab.backendapi.annotation.BudgetLimited;
-import com.epam.dlab.backendapi.dao.KeyDAO;
-import com.epam.dlab.backendapi.domain.RequestId;
 import com.epam.dlab.backendapi.resources.dto.KeysDTO;
 import com.epam.dlab.backendapi.service.AccessKeyService;
-import com.epam.dlab.backendapi.service.ReuploadKeyService;
-import com.epam.dlab.backendapi.util.RequestBuilder;
-import com.epam.dlab.dto.UserInstanceStatus;
-import com.epam.dlab.dto.base.edge.EdgeInfo;
-import com.epam.dlab.dto.base.keyload.UploadFile;
-import com.epam.dlab.dto.keyload.KeyLoadStatus;
-import com.epam.dlab.dto.keyload.UserKeyDTO;
 import com.epam.dlab.exceptions.DlabException;
-import com.epam.dlab.rest.client.RESTService;
 import com.google.inject.Inject;
 import com.google.inject.Singleton;
-import com.google.inject.name.Named;
 import com.jcraft.jsch.JSch;
 import com.jcraft.jsch.JSchException;
 import com.jcraft.jsch.KeyPair;
@@ -46,90 +34,12 @@ import lombok.extern.slf4j.Slf4j;
 import java.io.ByteArrayOutputStream;
 import java.io.IOException;
 
-import static com.epam.dlab.constants.ServiceConsts.PROVISIONING_SERVICE_NAME;
-import static com.epam.dlab.dto.UserInstanceStatus.FAILED;
-import static com.epam.dlab.dto.UserInstanceStatus.TERMINATED;
-import static com.epam.dlab.rest.contracts.EdgeAPI.EDGE_CREATE;
-
 @Singleton
 @Slf4j
 public class AccessKeyServiceImpl implements AccessKeyService {
-
-	@Inject
-	private KeyDAO keyDAO;
-	@Inject
-	@Named(PROVISIONING_SERVICE_NAME)
-	private RESTService provisioningService;
-	@Inject
-	private RequestBuilder requestBuilder;
-	@Inject
-	private RequestId requestId;
 	@Inject
 	private SelfServiceApplicationConfiguration configuration;
-	@Inject
-	private ReuploadKeyService reuploadKeyService;
-
-	@Override
-	public KeyLoadStatus getUserKeyStatus(String user) {
-		log.debug("Check the status of the user key for {}", user);
-		try {
-			return keyDAO.findKeyStatus(user);
-		} catch (DlabException e) {
-			log.error("Check the status of the user key for {} fails", user, e);
-			return KeyLoadStatus.ERROR;
-		}
-	}
-
-	@BudgetLimited
-	@Override
-	public String uploadKey(UserInfo user, String keyContent, boolean isPrimaryUploading) {
-		log.debug(isPrimaryUploading ? "The key uploading and EDGE node creating for user {} is starting..." :
-				"The key reuploading for user {} is starting...", user);
-		keyDAO.upsertKey(user.getName(), keyContent, isPrimaryUploading);
-		try {
-			return isPrimaryUploading ? createEdge(user, keyContent) : reuploadKeyService.reuploadKey(user,
-					keyContent);
-		} catch (Exception e) {
-			log.error(isPrimaryUploading ? "The key uploading and EDGE node creating for user {} fails" :
-					"The key reuploading for user {} fails", user.getName(), e);
-			keyDAO.deleteKey(user.getName());
-			throw new DlabException(isPrimaryUploading ? "Could not upload the key and create EDGE node: " :
-					"Could not reupload the key. Previous key has been deleted: " + e.getLocalizedMessage(), e);
-		}
-	}
 
-	@BudgetLimited
-	@Override
-	public String recoverEdge(UserInfo userInfo) {
-		log.debug("Recreating edge node for user {}", userInfo.getName());
-		try {
-			String userName = userInfo.getName();
-			EdgeInfo edgeInfo = getEdgeInfo(userName);
-			UserKeyDTO key = keyDAO.fetchKey(userName, KeyLoadStatus.SUCCESS);
-			updateEdgeStatusToCreating(userName, edgeInfo);
-			return createEdge(userInfo, key.getContent());
-		} catch (Exception e) {
-			log.error("Could not create the EDGE node for user {}", userInfo.getName(), e);
-			keyDAO.updateEdgeStatus(userInfo.getName(), FAILED.toString());
-			throw new DlabException("Could not upload the key and create EDGE node: " + e.getLocalizedMessage(), e);
-		}
-	}
-
-	@Override
-	public String generateKey(UserInfo userInfo, boolean createEdge) {
-		log.debug("Generating new key pair for user {}", userInfo.getName());
-		try (ByteArrayOutputStream publicKeyOut = new ByteArrayOutputStream();
-			 ByteArrayOutputStream privateKeyOut = new ByteArrayOutputStream()) {
-			KeyPair pair = KeyPair.genKeyPair(new JSch(), KeyPair.RSA, configuration.getPrivateKeySize());
-			pair.writePublicKey(publicKeyOut, userInfo.getName());
-			pair.writePrivateKey(privateKeyOut);
-			uploadKey(userInfo, new String(publicKeyOut.toByteArray()), createEdge);
-			return new String(privateKeyOut.toByteArray());
-		} catch (JSchException | IOException e) {
-			log.error("Can not generate private/public key pair due to: {}", e.getMessage());
-			throw new DlabException("Can not generate private/public key pair due to: " + e.getMessage(), e);
-		}
-	}
 
 	@Override
 	public KeysDTO generateKeys(UserInfo userInfo) {
@@ -146,33 +56,4 @@ public class AccessKeyServiceImpl implements AccessKeyService {
 			throw new DlabException("Can not generate private/public key pair due to: " + e.getMessage(), e);
 		}
 	}
-
-	private EdgeInfo getEdgeInfo(String userName) {
-		EdgeInfo edgeInfo = keyDAO.getEdgeInfo(userName);
-		UserInstanceStatus status = UserInstanceStatus.of(edgeInfo.getEdgeStatus());
-		if (status == null || !status.in(FAILED, TERMINATED)) {
-			log.error("Could not create EDGE node for user {} because the status of instance is {}", userName,
-					status);
-			throw new DlabException("Could not create EDGE node because the status of instance is " + status);
-		}
-		return edgeInfo;
-	}
-
-	private void updateEdgeStatusToCreating(String userName, EdgeInfo edgeInfo) {
-		edgeInfo.setInstanceId(null);
-		edgeInfo.setEdgeStatus(UserInstanceStatus.CREATING.toString());
-		try {
-			keyDAO.updateEdgeInfo(userName, edgeInfo);
-		} catch (DlabException e) {
-			log.error("Could not update the status of EDGE node for user {}", userName, e);
-			throw new DlabException("Could not create EDGE node: " + e.getLocalizedMessage(), e);
-		}
-	}
-
-	private String createEdge(UserInfo user, String keyContent) {
-		UploadFile uploadFile = requestBuilder.newEdgeKeyUpload(user, keyContent);
-		String uuid = provisioningService.post(EDGE_CREATE, user.getAccessToken(), uploadFile, String.class);
-		requestId.put(user.getName(), uuid);
-		return uuid;
-	}
 }
diff --git a/services/self-service/src/main/java/com/epam/dlab/backendapi/service/impl/EdgeServiceImpl.java b/services/self-service/src/main/java/com/epam/dlab/backendapi/service/impl/EdgeServiceImpl.java
deleted file mode 100644
index e62b52f..0000000
--- a/services/self-service/src/main/java/com/epam/dlab/backendapi/service/impl/EdgeServiceImpl.java
+++ /dev/null
@@ -1,153 +0,0 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements.  See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership.  The ASF licenses this file
- * to you 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.
- */
-
-package com.epam.dlab.backendapi.service.impl;
-
-import com.epam.dlab.auth.UserInfo;
-import com.epam.dlab.backendapi.annotation.BudgetLimited;
-import com.epam.dlab.backendapi.dao.KeyDAO;
-import com.epam.dlab.backendapi.dao.ProjectDAO;
-import com.epam.dlab.backendapi.domain.RequestId;
-import com.epam.dlab.backendapi.service.EdgeService;
-import com.epam.dlab.backendapi.util.RequestBuilder;
-import com.epam.dlab.constants.ServiceConsts;
-import com.epam.dlab.dto.ResourceSysBaseDTO;
-import com.epam.dlab.dto.UserInstanceStatus;
-import com.epam.dlab.exceptions.DlabException;
-import com.epam.dlab.rest.client.RESTService;
-import com.google.inject.Inject;
-import com.google.inject.Singleton;
-import com.google.inject.name.Named;
-import lombok.extern.slf4j.Slf4j;
-
-import static com.epam.dlab.dto.UserInstanceStatus.*;
-import static com.epam.dlab.rest.contracts.EdgeAPI.*;
-
-@Singleton
-@Slf4j
-public class EdgeServiceImpl implements EdgeService {
-
-	@Inject
-	private KeyDAO keyDAO;
-	@Inject
-	private ProjectDAO projectDAO;
-
-	@Inject
-	@Named(ServiceConsts.PROVISIONING_SERVICE_NAME)
-	private RESTService provisioningService;
-
-	@Inject
-	private RequestBuilder requestBuilder;
-
-	@Inject
-	private RequestId requestId;
-
-
-	@BudgetLimited
-	@Override
-	public String start(UserInfo userInfo) {
-		log.debug("Starting EDGE node for user {}", userInfo.getName());
-		UserInstanceStatus status = UserInstanceStatus.of(keyDAO.getEdgeStatus(userInfo.getName()));
-		if (status == null || !status.in(STOPPED)) {
-			log.error("Could not start EDGE node for user {} because the status of instance is {}",
-					userInfo.getName(), status);
-			throw new DlabException("Could not start EDGE node because the status of instance is " + status);
-		}
-		try {
-			return action(userInfo, EDGE_START, STARTING);
-		} catch (DlabException e) {
-			log.error("Could not start EDGE node for user {}", userInfo.getName(), e);
-			throw new DlabException("Could not start EDGE node: " + e.getLocalizedMessage(), e);
-		}
-	}
-
-	@Override
-	public String stop(UserInfo userInfo) {
-		log.debug("Stopping EDGE node for user {}", userInfo.getName());
-		UserInstanceStatus status = UserInstanceStatus.of(keyDAO.getEdgeStatus(userInfo.getName()));
-		if (status == null || !status.in(RUNNING)) {
-			log.error("Could not stop EDGE node for user {} because the status of instance is {}",
-					userInfo.getName(), status);
-			throw new DlabException("Could not stop EDGE node because the status of instance is " + status);
-		}
-
-		try {
-			return action(userInfo, EDGE_STOP, STOPPING);
-		} catch (DlabException e) {
-			log.error("Could not stop EDGE node for user {}", userInfo.getName(), e);
-			throw new DlabException("Could not stop EDGE node: " + e.getLocalizedMessage(), e);
-		}
-	}
-
-	@Override
-	public String terminate(UserInfo userInfo) {
-		log.debug("Terminating EDGE node for user {}", userInfo.getName());
-		UserInstanceStatus status = UserInstanceStatus.of(keyDAO.getEdgeStatus(userInfo.getName()));
-		if (status == null) {
-			log.error("Could not terminate EDGE node for user {} because the status of instance is null",
-					userInfo.getName());
-			throw new DlabException("Could not terminate EDGE node because the status of instance is null");
-		}
-
-		try {
-			return action(userInfo, EDGE_TERMINATE, TERMINATING);
-		} catch (DlabException e) {
-			log.error("Could not terminate EDGE node for user {}", userInfo.getName(), e);
-			throw new DlabException("Could not terminate EDGE node: " + e.getLocalizedMessage(), e);
-		}
-	}
-
-	/**
-	 * Updates parameter 'reuploadKeyRequired' for user's edge node with allowable statuses.
-	 *
-	 * @param user                user.
-	 * @param reuploadKeyRequired true/false.
-	 * @param edgeStatuses        allowable statuses of edge node.
-	 */
-	@Override
-	public void updateReuploadKeyFlag(String user, boolean reuploadKeyRequired, UserInstanceStatus... edgeStatuses) {
-		keyDAO.updateEdgeReuploadKey(user, reuploadKeyRequired, edgeStatuses);
-	}
-
-	@Override
-	public String getEdgeInfo(UserInfo userInfo, String projectName) {
-		return null;
-	}
-
-	/**
-	 * Sends the post request to the provisioning service and update the status of EDGE node.
-	 *
-	 * @param userInfo user info.
-	 * @param action   action for EDGE node.
-	 * @param status   status of EDGE node.
-	 * @return Request Id.
-	 */
-	private String action(UserInfo userInfo, String action, UserInstanceStatus status) {
-		try {
-			keyDAO.updateEdgeStatus(userInfo.getName(), status.toString());
-			ResourceSysBaseDTO<?> dto = requestBuilder.newEdgeAction(userInfo);
-			String uuid = provisioningService.post(action, userInfo.getAccessToken(), dto, String.class);
-			requestId.put(userInfo.getName(), uuid);
-			return uuid;
-		} catch (Exception t) {
-			keyDAO.updateEdgeStatus(userInfo.getName(), FAILED.toString());
-			throw new DlabException("Could not " + action + " EDGE node " + ": " + t.getLocalizedMessage(), t);
-		}
-	}
-}
diff --git a/services/self-service/src/main/java/com/epam/dlab/backendapi/service/impl/EnvironmentServiceImpl.java b/services/self-service/src/main/java/com/epam/dlab/backendapi/service/impl/EnvironmentServiceImpl.java
index 1d70935..349dfdb 100644
--- a/services/self-service/src/main/java/com/epam/dlab/backendapi/service/impl/EnvironmentServiceImpl.java
+++ b/services/self-service/src/main/java/com/epam/dlab/backendapi/service/impl/EnvironmentServiceImpl.java
@@ -22,7 +22,6 @@ package com.epam.dlab.backendapi.service.impl;
 import com.epam.dlab.auth.UserInfo;
 import com.epam.dlab.backendapi.dao.EnvDAO;
 import com.epam.dlab.backendapi.dao.ExploratoryDAO;
-import com.epam.dlab.backendapi.dao.KeyDAO;
 import com.epam.dlab.backendapi.dao.UserSettingsDAO;
 import com.epam.dlab.backendapi.domain.ProjectDTO;
 import com.epam.dlab.backendapi.resources.dto.UserDTO;
@@ -63,10 +62,6 @@ public class EnvironmentServiceImpl implements EnvironmentService {
 	@Inject
 	private SecurityService securityService;
 	@Inject
-	private KeyDAO keyDAO;
-	@Inject
-	private EdgeService edgeService;
-	@Inject
 	private ProjectService projectService;
 	@Inject
 	private UserSettingsDAO settingsDAO;
@@ -118,7 +113,6 @@ public class EnvironmentServiceImpl implements EnvironmentService {
 		checkState(user, "stop");
 		exploratoryDAO.fetchRunningExploratoryFields(user)
 				.forEach(e -> stopExploratory(userInfo, user, e.getExploratoryName()));
-		stopEdge(user);
 	}
 
 	@Override
@@ -127,7 +121,6 @@ public class EnvironmentServiceImpl implements EnvironmentService {
 		checkState(user, "stop");
 		exploratoryDAO.fetchRunningExploratoryFields(user)
 				.forEach(this::stopNotebookWithServiceAccount);
-		stopEdge(user);
 	}
 
 	@Override
@@ -144,13 +137,6 @@ public class EnvironmentServiceImpl implements EnvironmentService {
 	}
 
 	@Override
-	public void stopEdge(String user) {
-		if (UserInstanceStatus.RUNNING.toString().equals(keyDAO.getEdgeStatus(user))) {
-			edgeService.stop(securityService.getUserInfoOffline(user));
-		}
-	}
-
-	@Override
 	public void stopExploratory(UserInfo userInfo, String user, String exploratoryName) {
 		exploratoryService.stop(new UserInfo(user, userInfo.getAccessToken()), exploratoryName);
 	}
@@ -162,17 +148,6 @@ public class EnvironmentServiceImpl implements EnvironmentService {
 	}
 
 	@Override
-	public void terminateEnvironment(UserInfo userInfo, String user) {
-		log.debug("Terminating environment for user {}", user);
-		checkState(user, "terminate");
-		if (!terminateEdge(user)) {
-			exploratoryDAO.fetchUserExploratoriesWhereStatusNotIn(user, UserInstanceStatus.TERMINATED,
-					UserInstanceStatus.FAILED, UserInstanceStatus.TERMINATING)
-					.forEach(e -> terminateExploratory(userInfo, user, e.getExploratoryName()));
-		}
-	}
-
-	@Override
 	public void terminateExploratory(UserInfo userInfo, String user, String exploratoryName) {
 		exploratoryService.terminate(new UserInfo(user, userInfo.getAccessToken()), exploratoryName);
 	}
@@ -194,7 +169,7 @@ public class EnvironmentServiceImpl implements EnvironmentService {
 								UserInstanceStatus.STARTING, UserInstanceStatus.CREATING_IMAGE),
 						UserInstanceStatus.CREATING,
 						UserInstanceStatus.STARTING, UserInstanceStatus.CREATING_IMAGE);
-		if (UserInstanceStatus.STARTING.toString().equals(keyDAO.getEdgeStatus(user)) || !userInstances.isEmpty()) {
+		if (!userInstances.isEmpty()) {
 			log.error(String.format(ERROR_MSG_FORMAT, action));
 			throw new ResourceConflictException(String.format(ERROR_MSG_FORMAT, action));
 		}
@@ -205,15 +180,6 @@ public class EnvironmentServiceImpl implements EnvironmentService {
 		exploratoryService.stop(userInfo, instance.getExploratoryName());
 	}
 
-	private boolean terminateEdge(String user) {
-		final boolean nodeExists = keyDAO.edgeNodeExist(user);
-		if (nodeExists) {
-			edgeService.terminate(securityService.getUserInfoOffline(user));
-			exploratoryService.updateExploratoryStatuses(user, UserInstanceStatus.TERMINATING);
-		}
-		return nodeExists;
-	}
-
 	private List<UserResourceInfo> getProjectEnv(ProjectDTO projectDTO, List<UserInstanceDTO> allInstances) {
 		final Stream<UserResourceInfo> userResources = allInstances.stream()
 				.filter(instance -> instance.getProject().equals(projectDTO.getName())).map(this::toUserResourceInfo);
diff --git a/services/self-service/src/main/java/com/epam/dlab/backendapi/service/impl/InfrastructureTemplateServiceImpl.java b/services/self-service/src/main/java/com/epam/dlab/backendapi/service/impl/InfrastructureTemplateServiceImpl.java
index b119f95..ca718d4 100644
--- a/services/self-service/src/main/java/com/epam/dlab/backendapi/service/impl/InfrastructureTemplateServiceImpl.java
+++ b/services/self-service/src/main/java/com/epam/dlab/backendapi/service/impl/InfrastructureTemplateServiceImpl.java
@@ -80,15 +80,16 @@ public class InfrastructureTemplateServiceImpl implements InfrastructureTemplate
 
 		log.debug("Loading list of exploratory templates for user {} for project {}", user.getName(), project);
 		try {
+			EndpointDTO endpointDTO = endpointService.get(endpoint);
 			ExploratoryMetadataDTO[] array =
-					provisioningService.get(endpointService.get(endpoint).getUrl() + DOCKER_EXPLORATORY,
+					provisioningService.get(endpointDTO.getUrl() + DOCKER_EXPLORATORY,
 							user.getAccessToken(),
 							ExploratoryMetadataDTO[].class);
 
 			final Set<String> roles = userGroupDao.getUserGroups(user.getName());
 			return Arrays.stream(array)
 					.peek(e -> e.setImage(getSimpleImageName(e.getImage())))
-					.filter(e -> exploratoryGpuIssuesAzureFilter(e) &&
+					.filter(e -> exploratoryGpuIssuesAzureFilter(e, endpointDTO.getCloudProvider()) &&
 							UserRoles.checkAccess(user, RoleType.EXPLORATORY, e.getImage(), roles))
 					.peek(e -> filterShapes(user, e.getExploratoryEnvironmentShapes(), RoleType.EXPLORATORY_SHAPES,
 							roles))
@@ -150,10 +151,9 @@ public class InfrastructureTemplateServiceImpl implements InfrastructureTemplate
 	/**
 	 * Temporary filter for creation of exploratory env due to Azure issues
 	 */
-	private boolean exploratoryGpuIssuesAzureFilter(ExploratoryMetadataDTO e) {
-		return (!"redhat".equals(settingsDAO.getConfOsFamily()) || configuration.getCloudProvider() != CloudProvider
-				.AZURE)
-				|| !(e.getImage().endsWith("deeplearning") || e.getImage().endsWith("tensor"));
+	private boolean exploratoryGpuIssuesAzureFilter(ExploratoryMetadataDTO e, CloudProvider cloudProvider) {
+		return (!"redhat".equals(settingsDAO.getConfOsFamily()) || cloudProvider != CloudProvider.AZURE) ||
+				!(e.getImage().endsWith("deeplearning") || e.getImage().endsWith("tensor"));
 	}
 
 	/**
diff --git a/services/self-service/src/main/java/com/epam/dlab/backendapi/service/impl/ReuploadKeyServiceImpl.java b/services/self-service/src/main/java/com/epam/dlab/backendapi/service/impl/ReuploadKeyServiceImpl.java
index e783d9c..893ddc7 100644
--- a/services/self-service/src/main/java/com/epam/dlab/backendapi/service/impl/ReuploadKeyServiceImpl.java
+++ b/services/self-service/src/main/java/com/epam/dlab/backendapi/service/impl/ReuploadKeyServiceImpl.java
@@ -22,11 +22,9 @@ package com.epam.dlab.backendapi.service.impl;
 import com.epam.dlab.auth.UserInfo;
 import com.epam.dlab.backendapi.dao.ComputationalDAO;
 import com.epam.dlab.backendapi.dao.ExploratoryDAO;
-import com.epam.dlab.backendapi.dao.KeyDAO;
 import com.epam.dlab.backendapi.domain.RequestId;
 import com.epam.dlab.backendapi.service.ExploratoryService;
 import com.epam.dlab.backendapi.service.ReuploadKeyService;
-import com.epam.dlab.backendapi.service.UserResourceService;
 import com.epam.dlab.backendapi.util.RequestBuilder;
 import com.epam.dlab.dto.UserInstanceStatus;
 import com.epam.dlab.dto.base.DataEngineType;
@@ -45,7 +43,6 @@ import org.apache.commons.lang3.StringUtils;
 
 import java.util.Arrays;
 import java.util.Collections;
-import java.util.List;
 import java.util.UUID;
 
 import static com.epam.dlab.constants.ServiceConsts.PROVISIONING_SERVICE_NAME;
@@ -58,8 +55,6 @@ import static com.epam.dlab.rest.contracts.KeyAPI.REUPLOAD_KEY;
 public class ReuploadKeyServiceImpl implements ReuploadKeyService {
 
 	@Inject
-	private KeyDAO keyDAO;
-	@Inject
 	@Named(PROVISIONING_SERVICE_NAME)
 	private RESTService provisioningService;
 	@Inject
@@ -72,32 +67,12 @@ public class ReuploadKeyServiceImpl implements ReuploadKeyService {
 	private ComputationalDAO computationalDAO;
 	@Inject
 	private ExploratoryDAO exploratoryDAO;
-	@Inject
-	private UserResourceService userResourceService;
 
 	private static final String REUPLOAD_KEY_UPDATE_MSG = "Reuploading key process is successfully finished. " +
 			"Updating 'reupload_key_required' flag to 'false' for {}.";
 	private static final String REUPLOAD_KEY_ERROR_MSG = "Reuploading key process is failed for {}. The next attempt" +
 			"starts after resource restarting.";
 
-
-	@Override
-	public String reuploadKey(UserInfo user, String keyContent) {
-		userResourceService.updateReuploadKeyFlagForUserResources(user.getName(), true);
-		List<ResourceData> resourcesForKeyReuploading = userResourceService.convertToResourceData(
-				exploratoryService.getInstancesWithStatuses(user.getName(), RUNNING, RUNNING));
-		keyDAO.getEdgeInfoWhereStatusIn(user.getName(), RUNNING)
-				.ifPresent(edgeInfo -> {
-					resourcesForKeyReuploading.add(ResourceData.edgeResource(edgeInfo.getInstanceId()));
-					keyDAO.updateEdgeStatus(user.getName(), REUPLOADING_KEY.toString());
-				});
-		updateStatusForUserInstances(user.getName(), REUPLOADING_KEY);
-
-		ReuploadKeyDTO reuploadKeyDTO = requestBuilder.newKeyReupload(user, UUID.randomUUID().toString(), keyContent,
-				resourcesForKeyReuploading);
-		return provisioningService.post(REUPLOAD_KEY, user.getAccessToken(), reuploadKeyDTO, String.class);
-	}
-
 	@Override
 	public void updateResourceData(ReuploadKeyStatusDTO dto) {
 		String user = dto.getUser();
@@ -130,9 +105,7 @@ public class ReuploadKeyServiceImpl implements ReuploadKeyService {
 	}
 
 	private void updateResourceStatus(String user, ResourceData resourceData, UserInstanceStatus newStatus) {
-		if (resourceData.getResourceType() == ResourceType.EDGE) {
-			keyDAO.updateEdgeStatus(user, newStatus.toString());
-		} else if (resourceData.getResourceType() == ResourceType.EXPLORATORY) {
+		if (resourceData.getResourceType() == ResourceType.EXPLORATORY) {
 			exploratoryDAO.updateStatusForExploratory(user, resourceData.getExploratoryName(), newStatus);
 		} else if (resourceData.getResourceType() == ResourceType.COMPUTATIONAL) {
 			computationalDAO.updateStatusForComputationalResource(user, resourceData.getExploratoryName(),
@@ -141,9 +114,7 @@ public class ReuploadKeyServiceImpl implements ReuploadKeyService {
 	}
 
 	private void updateResourceReuploadKeyFlag(String user, ResourceData resourceData, boolean reuploadKeyRequired) {
-		if (resourceData.getResourceType() == ResourceType.EDGE) {
-			keyDAO.updateEdgeReuploadKey(user, reuploadKeyRequired, UserInstanceStatus.values());
-		} else if (resourceData.getResourceType() == ResourceType.EXPLORATORY) {
+		if (resourceData.getResourceType() == ResourceType.EXPLORATORY) {
 			exploratoryDAO.updateReuploadKeyForExploratory(user, resourceData.getExploratoryName(),
 					reuploadKeyRequired);
 		} else if (resourceData.getResourceType() == ResourceType.COMPUTATIONAL) {
diff --git a/services/self-service/src/main/java/com/epam/dlab/backendapi/service/impl/UserResourceServiceImpl.java b/services/self-service/src/main/java/com/epam/dlab/backendapi/service/impl/UserResourceServiceImpl.java
deleted file mode 100644
index 7a1c27c..0000000
--- a/services/self-service/src/main/java/com/epam/dlab/backendapi/service/impl/UserResourceServiceImpl.java
+++ /dev/null
@@ -1,95 +0,0 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements.  See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership.  The ASF licenses this file
- * to you 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.
- */
-
-
-package com.epam.dlab.backendapi.service.impl;
-
-import com.epam.dlab.backendapi.service.ComputationalService;
-import com.epam.dlab.backendapi.service.EdgeService;
-import com.epam.dlab.backendapi.service.ExploratoryService;
-import com.epam.dlab.backendapi.service.UserResourceService;
-import com.epam.dlab.dto.UserInstanceDTO;
-import com.epam.dlab.dto.base.DataEngineType;
-import com.epam.dlab.model.ResourceData;
-import com.google.inject.Inject;
-
-import java.util.Arrays;
-import java.util.Collections;
-import java.util.List;
-import java.util.stream.Collectors;
-import java.util.stream.Stream;
-
-import static com.epam.dlab.dto.UserInstanceStatus.*;
-
-public class UserResourceServiceImpl implements UserResourceService {
-
-	@Inject
-	private ExploratoryService exploratoryService;
-	@Inject
-	private ComputationalService computationalService;
-	@Inject
-	private EdgeService edgeService;
-
-	/**
-	 * Converts user's instances to another data type.
-	 *
-	 * @param userInstances list of user instances.
-	 * @return converted list of resources' data.
-	 */
-	@Override
-	public List<ResourceData> convertToResourceData(List<UserInstanceDTO> userInstances) {
-		return userInstances
-				.stream()
-				.flatMap(this::resourceDataStream)
-				.collect(Collectors.toList());
-	}
-
-	/**
-	 * Updates flag 'reuploadKeyRequired' for user's resources with predefined statuses.
-	 *
-	 * @param user                user's name.
-	 * @param reuploadKeyRequired true/false.
-	 */
-	@Override
-	public void updateReuploadKeyFlagForUserResources(String user, boolean reuploadKeyRequired) {
-		exploratoryService.updateExploratoriesReuploadKeyFlag(user, reuploadKeyRequired,
-				CREATING, CONFIGURING, STARTING, RUNNING, STOPPING, STOPPED);
-		computationalService.updateComputationalsReuploadKeyFlag(user,
-				Arrays.asList(STARTING, RUNNING, STOPPING, STOPPED),
-				Collections.singletonList(DataEngineType.SPARK_STANDALONE),
-				reuploadKeyRequired,
-				CREATING, CONFIGURING, STARTING, RUNNING, STOPPING, STOPPED);
-		computationalService.updateComputationalsReuploadKeyFlag(user,
-				Collections.singletonList(RUNNING),
-				Collections.singletonList(DataEngineType.CLOUD_SERVICE),
-				reuploadKeyRequired,
-				CREATING, CONFIGURING, STARTING, RUNNING);
-		edgeService.updateReuploadKeyFlag(user, reuploadKeyRequired, STARTING, RUNNING, STOPPING, STOPPED);
-	}
-
-	private Stream<ResourceData> resourceDataStream(UserInstanceDTO ui) {
-		final Stream<ResourceData> exploratoryStream =
-				Stream.of(ResourceData.exploratoryResource(ui.getExploratoryId(), ui.getExploratoryName()));
-		final Stream<ResourceData> computationalStream = ui.getResources()
-				.stream()
-				.map(cr -> ResourceData.computationalResource(cr.getComputationalId(),
-						ui.getExploratoryName(), cr.getComputationalName()));
-		return Stream.concat(exploratoryStream, computationalStream);
-	}
-}
diff --git a/services/self-service/src/test/java/com/epam/dlab/backendapi/resources/EdgeResourceTest.java b/services/self-service/src/test/java/com/epam/dlab/backendapi/resources/EdgeResourceTest.java
deleted file mode 100644
index 075502e..0000000
--- a/services/self-service/src/test/java/com/epam/dlab/backendapi/resources/EdgeResourceTest.java
+++ /dev/null
@@ -1,164 +0,0 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements.  See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership.  The ASF licenses this file
- * to you 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.
- */
-
-package com.epam.dlab.backendapi.resources;
-
-import com.epam.dlab.auth.UserInfo;
-import com.epam.dlab.backendapi.service.EdgeService;
-import com.epam.dlab.exceptions.DlabException;
-import io.dropwizard.auth.AuthenticationException;
-import io.dropwizard.testing.junit.ResourceTestRule;
-import org.apache.http.HttpStatus;
-import org.junit.Before;
-import org.junit.Rule;
-import org.junit.Test;
-
-import javax.ws.rs.client.Entity;
-import javax.ws.rs.core.HttpHeaders;
-import javax.ws.rs.core.MediaType;
-import javax.ws.rs.core.Response;
-
-import static org.junit.Assert.assertEquals;
-import static org.junit.Assert.assertTrue;
-import static org.mockito.Matchers.any;
-import static org.mockito.Mockito.*;
-
-public class EdgeResourceTest extends TestBase {
-
-	private EdgeService edgeService = mock(EdgeService.class);
-
-	@Rule
-	public final ResourceTestRule resources = getResourceTestRuleInstance(new EdgeResource(edgeService));
-
-	@Before
-	public void setup() throws AuthenticationException {
-		authSetup();
-	}
-
-	@Test
-	public void start() {
-		when(edgeService.start(any(UserInfo.class))).thenReturn("someUuid");
-		final Response response = resources.getJerseyTest()
-				.target("/infrastructure/edge/start")
-				.request()
-				.header("Authorization", "Bearer " + TOKEN)
-				.post(Entity.json(getUserInfo()));
-
-		assertEquals(HttpStatus.SC_OK, response.getStatus());
-		assertEquals("someUuid", response.readEntity(String.class));
-		assertEquals(MediaType.APPLICATION_JSON, response.getHeaderString(HttpHeaders.CONTENT_TYPE));
-
-		verify(edgeService).start(getUserInfo());
-		verifyNoMoreInteractions(edgeService);
-	}
-
-	@Test
-	public void startWithFailedAuth() throws AuthenticationException {
-		authFailSetup();
-		when(edgeService.start(any(UserInfo.class))).thenReturn("someUuid");
-		final Response response = resources.getJerseyTest()
-				.target("/infrastructure/edge/start")
-				.request()
-				.header("Authorization", "Bearer " + TOKEN)
-				.post(Entity.json(getUserInfo()));
-
-		assertEquals(HttpStatus.SC_OK, response.getStatus());
-		assertEquals("someUuid", response.readEntity(String.class));
-		assertEquals(MediaType.APPLICATION_JSON, response.getHeaderString(HttpHeaders.CONTENT_TYPE));
-
-		verify(edgeService).start(getUserInfo());
-		verifyNoMoreInteractions(edgeService);
-	}
-
-	@Test
-	public void startWithException() {
-		when(edgeService.start(any(UserInfo.class))).thenThrow(new DlabException("Could not start edge node"));
-		final Response response = resources.getJerseyTest()
-				.target("/infrastructure/edge/start")
-				.request()
-				.header("Authorization", "Bearer " + TOKEN)
-				.post(Entity.json(getUserInfo()));
-
-		assertEquals(HttpStatus.SC_INTERNAL_SERVER_ERROR, response.getStatus());
-		String expectedJson = "\"code\":500,\"message\":\"There was an error processing your request. " +
-				"It has been logged";
-		String actualJson = response.readEntity(String.class);
-		assertTrue(actualJson.contains(expectedJson));
-		assertEquals(MediaType.APPLICATION_JSON, response.getHeaderString(HttpHeaders.CONTENT_TYPE));
-
-		verify(edgeService).start(getUserInfo());
-		verifyNoMoreInteractions(edgeService);
-	}
-
-	@Test
-	public void stop() {
-		when(edgeService.stop(any(UserInfo.class))).thenReturn("someUuid");
-		final Response response = resources.getJerseyTest()
-				.target("/infrastructure/edge/stop")
-				.request()
-				.header("Authorization", "Bearer " + TOKEN)
-				.post(Entity.json(getUserInfo()));
-
-		assertEquals(HttpStatus.SC_OK, response.getStatus());
-		assertEquals("someUuid", response.readEntity(String.class));
-		assertEquals(MediaType.APPLICATION_JSON, response.getHeaderString(HttpHeaders.CONTENT_TYPE));
-
-		verify(edgeService).stop(getUserInfo());
-		verifyNoMoreInteractions(edgeService);
-	}
-
-	@Test
-	public void stopWithFailedAuth() throws AuthenticationException {
-		authFailSetup();
-		when(edgeService.stop(any(UserInfo.class))).thenReturn("someUuid");
-		final Response response = resources.getJerseyTest()
-				.target("/infrastructure/edge/stop")
-				.request()
-				.header("Authorization", "Bearer " + TOKEN)
-				.post(Entity.json(getUserInfo()));
-
-		assertEquals(HttpStatus.SC_OK, response.getStatus());
-		assertEquals("someUuid", response.readEntity(String.class));
-		assertEquals(MediaType.APPLICATION_JSON, response.getHeaderString(HttpHeaders.CONTENT_TYPE));
-
-		verify(edgeService).stop(getUserInfo());
-		verifyNoMoreInteractions(edgeService);
-	}
-
-	@Test
-	public void stopWithException() {
-		when(edgeService.stop(any(UserInfo.class))).thenThrow(new DlabException("Could not stop edge node"));
-		final Response response = resources.getJerseyTest()
-				.target("/infrastructure/edge/stop")
-				.request()
-				.header("Authorization", "Bearer " + TOKEN)
-				.post(Entity.json(getUserInfo()));
-
-		assertEquals(HttpStatus.SC_INTERNAL_SERVER_ERROR, response.getStatus());
-		String expectedJson = "\"code\":500,\"message\":\"There was an error processing your request. " +
-				"It has been logged";
-		String actualJson = response.readEntity(String.class);
-		assertTrue(actualJson.contains(expectedJson));
-		assertEquals(MediaType.APPLICATION_JSON, response.getHeaderString(HttpHeaders.CONTENT_TYPE));
-
-		verify(edgeService).stop(getUserInfo());
-		verifyNoMoreInteractions(edgeService);
-	}
-
-}
diff --git a/services/self-service/src/test/java/com/epam/dlab/backendapi/resources/EnvironmentResourceTest.java b/services/self-service/src/test/java/com/epam/dlab/backendapi/resources/EnvironmentResourceTest.java
index 2cc49a2..a8b01fa 100644
--- a/services/self-service/src/test/java/com/epam/dlab/backendapi/resources/EnvironmentResourceTest.java
+++ b/services/self-service/src/test/java/com/epam/dlab/backendapi/resources/EnvironmentResourceTest.java
@@ -125,55 +125,6 @@ public class EnvironmentResourceTest extends TestBase {
 	}
 
 	@Test
-	public void terminateEnv() {
-		doNothing().when(environmentService).terminateEnvironment(any(UserInfo.class), anyString());
-		final Response response = resources.getJerseyTest()
-				.target("/environment/terminate")
-				.request()
-				.header("Authorization", "Bearer " + TOKEN)
-				.post(Entity.text(USER));
-
-		assertEquals(HttpStatus.SC_OK, response.getStatus());
-		assertNull(response.getHeaderString(HttpHeaders.CONTENT_TYPE));
-
-		verify(environmentService).terminateEnvironment(new UserInfo(USER, TOKEN), USER);
-		verifyNoMoreInteractions(environmentService);
-	}
-
-	@Test
-	public void terminateEnvWithFailedAuth() throws AuthenticationException {
-		authFailSetup();
-		doNothing().when(environmentService).terminateEnvironment(any(UserInfo.class), anyString());
-		final Response response = resources.getJerseyTest()
-				.target("/environment/terminate")
-				.request()
-				.header("Authorization", "Bearer " + TOKEN)
-				.post(Entity.text(USER));
-
-		assertEquals(HttpStatus.SC_FORBIDDEN, response.getStatus());
-		assertEquals(MediaType.APPLICATION_JSON, response.getHeaderString(HttpHeaders.CONTENT_TYPE));
-
-		verifyZeroInteractions(environmentService);
-	}
-
-	@Test
-	public void terminateEnvWithResourceConflictException() {
-		doThrow(new ResourceConflictException("Can not terminate environment because one of the user resources is in" +
-				"status CREATING or STARTING")).when(environmentService).terminateEnvironment(any(UserInfo.class), anyString());
-		final Response response = resources.getJerseyTest()
-				.target("/environment/terminate")
-				.request()
-				.header("Authorization", "Bearer " + TOKEN)
-				.post(Entity.text(USER));
-
-		assertEquals(HttpStatus.SC_INTERNAL_SERVER_ERROR, response.getStatus());
-		assertEquals(MediaType.APPLICATION_JSON, response.getHeaderString(HttpHeaders.CONTENT_TYPE));
-
-		verify(environmentService).terminateEnvironment(new UserInfo(USER, TOKEN), USER);
-		verifyNoMoreInteractions(environmentService);
-	}
-
-	@Test
 	public void stopEnv() {
 		doNothing().when(environmentService).stopEnvironment(any(UserInfo.class), anyString());
 		final Response response = resources.getJerseyTest()
@@ -223,55 +174,6 @@ public class EnvironmentResourceTest extends TestBase {
 	}
 
 	@Test
-	public void stopEdge() {
-		doNothing().when(environmentService).stopEdge(anyString());
-		final Response response = resources.getJerseyTest()
-				.target("/environment/stop/edge")
-				.request()
-				.header("Authorization", "Bearer " + TOKEN)
-				.post(Entity.text(USER));
-
-		assertEquals(HttpStatus.SC_OK, response.getStatus());
-		assertNull(response.getHeaderString(HttpHeaders.CONTENT_TYPE));
-
-		verify(environmentService).stopEdge(USER);
-		verifyNoMoreInteractions(environmentService);
-	}
-
-	@Test
-	public void stopEdgeWithFailedAuth() throws AuthenticationException {
-		authFailSetup();
-		doNothing().when(environmentService).stopEdge(anyString());
-		final Response response = resources.getJerseyTest()
-				.target("/environment/stop/edge")
-				.request()
-				.header("Authorization", "Bearer " + TOKEN)
-				.post(Entity.text(USER));
-
-		assertEquals(HttpStatus.SC_FORBIDDEN, response.getStatus());
-		assertEquals(MediaType.APPLICATION_JSON, response.getHeaderString(HttpHeaders.CONTENT_TYPE));
-
-		verifyZeroInteractions(environmentService);
-	}
-
-	@Test
-	public void stopEdgeWithResourceConflictException() {
-		doThrow(new ResourceConflictException("Can not stop edge because its status is CREATING or STARTING"))
-				.when(environmentService).stopEdge(anyString());
-		final Response response = resources.getJerseyTest()
-				.target("/environment/stop/edge")
-				.request()
-				.header("Authorization", "Bearer " + TOKEN)
-				.post(Entity.text(USER));
-
-		assertEquals(HttpStatus.SC_INTERNAL_SERVER_ERROR, response.getStatus());
-		assertEquals(MediaType.APPLICATION_JSON, response.getHeaderString(HttpHeaders.CONTENT_TYPE));
-
-		verify(environmentService).stopEdge(USER);
-		verifyNoMoreInteractions(environmentService);
-	}
-
-	@Test
 	public void stopNotebook() {
 		doNothing().when(environmentService).stopExploratory(any(UserInfo.class), anyString(), anyString());
 		final Response response = resources.getJerseyTest()
diff --git a/services/self-service/src/test/java/com/epam/dlab/backendapi/resources/KeyUploaderResourceTest.java b/services/self-service/src/test/java/com/epam/dlab/backendapi/resources/KeyUploaderResourceTest.java
deleted file mode 100644
index 1628cba..0000000
--- a/services/self-service/src/test/java/com/epam/dlab/backendapi/resources/KeyUploaderResourceTest.java
+++ /dev/null
@@ -1,405 +0,0 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements.  See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership.  The ASF licenses this file
- * to you 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.
- */
-
-package com.epam.dlab.backendapi.resources;
-
-import com.epam.dlab.auth.UserInfo;
-import com.epam.dlab.backendapi.service.AccessKeyService;
-import com.epam.dlab.dto.keyload.KeyLoadStatus;
-import com.epam.dlab.exceptions.DlabException;
-import io.dropwizard.auth.AuthenticationException;
-import io.dropwizard.testing.junit.ResourceTestRule;
-import org.apache.http.HttpStatus;
-import org.glassfish.jersey.media.multipart.FormDataMultiPart;
-import org.glassfish.jersey.media.multipart.MultiPartFeature;
-import org.junit.Before;
-import org.junit.Rule;
-import org.junit.Test;
-
-import javax.ws.rs.client.Entity;
-import javax.ws.rs.core.HttpHeaders;
-import javax.ws.rs.core.MediaType;
-import javax.ws.rs.core.Response;
-
-import static org.junit.Assert.assertEquals;
-import static org.junit.Assert.assertNull;
-import static org.mockito.Matchers.any;
-import static org.mockito.Matchers.anyString;
-import static org.mockito.Mockito.*;
-
-public class KeyUploaderResourceTest extends TestBase {
-
-	private AccessKeyService keyService = mock(AccessKeyService.class);
-
-	@Rule
-	public final ResourceTestRule resources = getResourceTestRuleInstance(new KeyUploaderResource(keyService));
-
-	@Before
-	public void setup() throws AuthenticationException {
-		authSetup();
-	}
-
-	@Test
-	public void checkKey() {
-		when(keyService.getUserKeyStatus(anyString())).thenReturn(KeyLoadStatus.SUCCESS);
-		final Response response = resources.getJerseyTest()
-				.target("/user/access_key")
-				.request()
-				.header("Authorization", "Bearer " + TOKEN)
-				.get();
-
-		assertEquals(HttpStatus.SC_OK, response.getStatus());
-		assertNull(response.getHeaderString(HttpHeaders.CONTENT_TYPE));
-
-		verify(keyService).getUserKeyStatus(USER.toLowerCase());
-		verifyNoMoreInteractions(keyService);
-	}
-
-	@Test
-	public void checkKeyWithFailedAuth() throws AuthenticationException {
-		authFailSetup();
-		when(keyService.getUserKeyStatus(anyString())).thenReturn(KeyLoadStatus.SUCCESS);
-		final Response response = resources.getJerseyTest()
-				.target("/user/access_key")
-				.request()
-				.header("Authorization", "Bearer " + TOKEN)
-				.get();
-
-		assertEquals(HttpStatus.SC_OK, response.getStatus());
-		assertNull(response.getHeaderString(HttpHeaders.CONTENT_TYPE));
-
-		verify(keyService).getUserKeyStatus(USER.toLowerCase());
-		verifyNoMoreInteractions(keyService);
-	}
-
-	@Test
-	public void checkKeyWithErrorStatus() {
-		when(keyService.getUserKeyStatus(anyString())).thenReturn(KeyLoadStatus.ERROR);
-		final Response response = resources.getJerseyTest()
-				.target("/user/access_key")
-				.request()
-				.header("Authorization", "Bearer " + TOKEN)
-				.get();
-
-		assertEquals(HttpStatus.SC_INTERNAL_SERVER_ERROR, response.getStatus());
-		assertEquals(MediaType.APPLICATION_JSON, response.getHeaderString(HttpHeaders.CONTENT_TYPE));
-
-		verify(keyService).getUserKeyStatus(USER.toLowerCase());
-		verifyNoMoreInteractions(keyService);
-	}
-
-	@Test
-	public void loadKey() {
-		when(keyService.uploadKey(any(UserInfo.class), anyString(), anyBoolean())).thenReturn("someUuid");
-
-		FormDataMultiPart multiPart = new FormDataMultiPart()
-				.field("file", "ssh-h;glfh;lgfmhgfmmgfkl");
-
-		final Response response = resources.getJerseyTest()
-				.target("/user/access_key")
-				.register(MultiPartFeature.class)
-				.request()
-				.header("Authorization", "Bearer " + TOKEN)
-				.post(Entity.entity(multiPart, multiPart.getMediaType()));
-
-		assertEquals(HttpStatus.SC_OK, response.getStatus());
-		assertNull(response.getHeaderString(HttpHeaders.CONTENT_TYPE));
-
-		verify(keyService).uploadKey(getUserInfo(), "ssh-h;glfh;lgfmhgfmmgfkl", true);
-		verifyNoMoreInteractions(keyService);
-	}
-
-	@Test
-	public void loadKeyWithFailedAuth() throws AuthenticationException {
-		authFailSetup();
-		when(keyService.uploadKey(any(UserInfo.class), anyString(), anyBoolean())).thenReturn("someUuid");
-
-		FormDataMultiPart multiPart = new FormDataMultiPart()
-				.field("file", "ssh-h;glfh;lgfmhgfmmgfkl");
-
-		final Response response = resources.getJerseyTest()
-				.target("/user/access_key")
-				.register(MultiPartFeature.class)
-				.request()
-				.header("Authorization", "Bearer " + TOKEN)
-				.post(Entity.entity(multiPart, multiPart.getMediaType()));
-
-		assertEquals(HttpStatus.SC_OK, response.getStatus());
-		assertNull(response.getHeaderString(HttpHeaders.CONTENT_TYPE));
-
-		verify(keyService).uploadKey(getUserInfo(), "ssh-h;glfh;lgfmhgfmmgfkl", true);
-		verifyNoMoreInteractions(keyService);
-	}
-
-	@Test
-	public void loadKeyWithWrongKeyFormat() {
-		when(keyService.uploadKey(any(UserInfo.class), anyString(), anyBoolean())).thenReturn("someUuid");
-
-		FormDataMultiPart multiPart = new FormDataMultiPart()
-				.field("file", "glfh;lgfmhgfmmgfkl");
-
-		final Response response = resources.getJerseyTest()
-				.target("/user/access_key")
-				.register(MultiPartFeature.class)
-				.request()
-				.header("Authorization", "Bearer " + TOKEN)
-				.post(Entity.entity(multiPart, multiPart.getMediaType()));
-
-		assertEquals(HttpStatus.SC_INTERNAL_SERVER_ERROR, response.getStatus());
-		assertEquals(MediaType.APPLICATION_JSON, response.getHeaderString(HttpHeaders.CONTENT_TYPE));
-
-		verifyZeroInteractions(keyService);
-	}
-
-	@Test
-	public void loadKeyWithException() {
-		doThrow(new DlabException("Could not upload the key and create EDGE node"))
-				.when(keyService).uploadKey(any(UserInfo.class), anyString(), anyBoolean());
-
-		FormDataMultiPart multiPart = new FormDataMultiPart()
-				.field("file", "ssh-h;glfh;lgfmhgfmmgfkl");
-
-		final Response response = resources.getJerseyTest()
-				.target("/user/access_key")
-				.register(MultiPartFeature.class)
-				.request()
-				.header("Authorization", "Bearer " + TOKEN)
-				.post(Entity.entity(multiPart, multiPart.getMediaType()));
-
-		assertEquals(HttpStatus.SC_INTERNAL_SERVER_ERROR, response.getStatus());
-		assertEquals(MediaType.APPLICATION_JSON, response.getHeaderString(HttpHeaders.CONTENT_TYPE));
-
-		verify(keyService).uploadKey(getUserInfo(), "ssh-h;glfh;lgfmhgfmmgfkl", true);
-		verifyNoMoreInteractions(keyService);
-	}
-
-	@Test
-	public void reuploadKey() {
-		when(keyService.uploadKey(any(UserInfo.class), anyString(), anyBoolean())).thenReturn("someUuid");
-
-		FormDataMultiPart multiPart = new FormDataMultiPart()
-				.field("file", "ssh-h;glfh;lgfmhgfmmgfkl");
-
-		final Response response = resources.getJerseyTest()
-				.target("/user/access_key")
-				.queryParam("is_primary_uploading", "false")
-				.register(MultiPartFeature.class)
-				.request()
-				.header("Authorization", "Bearer " + TOKEN)
-				.post(Entity.entity(multiPart, multiPart.getMediaType()));
-
-		assertEquals(HttpStatus.SC_OK, response.getStatus());
-		assertNull(response.getHeaderString(HttpHeaders.CONTENT_TYPE));
-
-		verify(keyService).uploadKey(getUserInfo(), "ssh-h;glfh;lgfmhgfmmgfkl", false);
-		verifyNoMoreInteractions(keyService);
-	}
-
-	@Test
-	public void reuploadKeyWithFailedAuth() throws AuthenticationException {
-		authFailSetup();
-		when(keyService.uploadKey(any(UserInfo.class), anyString(), anyBoolean())).thenReturn("someUuid");
-
-		FormDataMultiPart multiPart = new FormDataMultiPart()
-				.field("file", "ssh-h;glfh;lgfmhgfmmgfkl");
-
-		final Response response = resources.getJerseyTest()
-				.target("/user/access_key")
-				.queryParam("is_primary_uploading", "false")
-				.register(MultiPartFeature.class)
-				.request()
-				.header("Authorization", "Bearer " + TOKEN)
-				.post(Entity.entity(multiPart, multiPart.getMediaType()));
-
-		assertEquals(HttpStatus.SC_OK, response.getStatus());
-		assertNull(response.getHeaderString(HttpHeaders.CONTENT_TYPE));
-
-		verify(keyService).uploadKey(getUserInfo(), "ssh-h;glfh;lgfmhgfmmgfkl", false);
-		verifyNoMoreInteractions(keyService);
-	}
-
-	@Test
-	public void reuploadKeyWithWrongKeyFormat() {
-		when(keyService.uploadKey(any(UserInfo.class), anyString(), anyBoolean())).thenReturn("someUuid");
-
-		FormDataMultiPart multiPart = new FormDataMultiPart()
-				.field("file", "glfh;lgfmhgfmmgfkl");
-
-		final Response response = resources.getJerseyTest()
-				.target("/user/access_key")
-				.queryParam("is_primary_uploading", "false")
-				.register(MultiPartFeature.class)
-				.request()
-				.header("Authorization", "Bearer " + TOKEN)
-				.post(Entity.entity(multiPart, multiPart.getMediaType()));
-
-		assertEquals(HttpStatus.SC_INTERNAL_SERVER_ERROR, response.getStatus());
-		assertEquals(MediaType.APPLICATION_JSON, response.getHeaderString(HttpHeaders.CONTENT_TYPE));
-
-		verifyZeroInteractions(keyService);
-	}
-
-	@Test
-	public void reuploadKeyWithException() {
-		doThrow(new DlabException("Could not reupload the key. Previous key has been deleted"))
-				.when(keyService).uploadKey(any(UserInfo.class), anyString(), anyBoolean());
-
-		FormDataMultiPart multiPart = new FormDataMultiPart()
-				.field("file", "ssh-h;glfh;lgfmhgfmmgfkl");
-
-		final Response response = resources.getJerseyTest()
-				.target("/user/access_key")
-				.queryParam("is_primary_uploading", "false")
-				.register(MultiPartFeature.class)
-				.request()
-				.header("Authorization", "Bearer " + TOKEN)
-				.post(Entity.entity(multiPart, multiPart.getMediaType()));
-
-		assertEquals(HttpStatus.SC_INTERNAL_SERVER_ERROR, response.getStatus());
-		assertEquals(MediaType.APPLICATION_JSON, response.getHeaderString(HttpHeaders.CONTENT_TYPE));
-
-		verify(keyService).uploadKey(getUserInfo(), "ssh-h;glfh;lgfmhgfmmgfkl", false);
-		verifyNoMoreInteractions(keyService);
-	}
-
-	@Test
-	public void recoverEdge() {
-		when(keyService.recoverEdge(any(UserInfo.class))).thenReturn("someUuid");
-
-		final Response response = resources.getJerseyTest()
-				.target("/user/access_key/recover")
-				.request()
-				.header("Authorization", "Bearer " + TOKEN)
-				.post(Entity.json(""));
-
-		assertEquals(HttpStatus.SC_OK, response.getStatus());
-		assertEquals(MediaType.APPLICATION_JSON, response.getHeaderString(HttpHeaders.CONTENT_TYPE));
-
-		verify(keyService).recoverEdge(getUserInfo());
-		verifyNoMoreInteractions(keyService);
-	}
-
-	@Test
-	public void recoverEdgeWithFailedAuth() throws AuthenticationException {
-		authFailSetup();
-		when(keyService.recoverEdge(any(UserInfo.class))).thenReturn("someUuid");
-
-		final Response response = resources.getJerseyTest()
-				.target("/user/access_key/recover")
-				.request()
-				.header("Authorization", "Bearer " + TOKEN)
-				.post(Entity.json(""));
-
-		assertEquals(HttpStatus.SC_OK, response.getStatus());
-		assertEquals(MediaType.APPLICATION_JSON, response.getHeaderString(HttpHeaders.CONTENT_TYPE));
-
-		verify(keyService).recoverEdge(getUserInfo());
-		verifyNoMoreInteractions(keyService);
-	}
-
-	@Test
-	public void recoverEdgeWithException() {
-		doThrow(new DlabException("Could not upload the key and create EDGE node"))
-				.when(keyService).recoverEdge(any(UserInfo.class));
-
-		final Response response = resources.getJerseyTest()
-				.target("/user/access_key/recover")
-				.request()
-				.header("Authorization", "Bearer " + TOKEN)
-				.post(Entity.json(""));
-
-		assertEquals(HttpStatus.SC_INTERNAL_SERVER_ERROR, response.getStatus());
-		assertEquals(MediaType.APPLICATION_JSON, response.getHeaderString(HttpHeaders.CONTENT_TYPE));
-
-		verify(keyService).recoverEdge(getUserInfo());
-		verifyNoMoreInteractions(keyService);
-	}
-
-	@Test
-	public void generateKey() {
-		when(keyService.generateKey(any(UserInfo.class), anyBoolean())).thenReturn("someUuid");
-
-		final Response response = resources.getJerseyTest()
-				.target("/user/access_key/generate")
-				.request()
-				.header("Authorization", "Bearer " + TOKEN)
-				.post(Entity.json(""));
-
-		assertEquals(HttpStatus.SC_OK, response.getStatus());
-		assertEquals(MediaType.APPLICATION_OCTET_STREAM, response.getHeaderString(HttpHeaders.CONTENT_TYPE));
-
-		verify(keyService).generateKey(getUserInfo(), true);
-		verifyNoMoreInteractions(keyService);
-	}
-
-	@Test
-	public void generateKeyWithoutEdgeCreation() {
-		when(keyService.generateKey(any(UserInfo.class), anyBoolean())).thenReturn("someUuid");
-
-		final Response response = resources.getJerseyTest()
-				.target("/user/access_key/generate")
-				.queryParam("is_primary_uploading", "false")
-				.request()
-				.header("Authorization", "Bearer " + TOKEN)
-				.post(Entity.json(""));
-
-		assertEquals(HttpStatus.SC_OK, response.getStatus());
-		assertEquals(MediaType.APPLICATION_OCTET_STREAM, response.getHeaderString(HttpHeaders.CONTENT_TYPE));
-
-		verify(keyService).generateKey(getUserInfo(), false);
-		verifyNoMoreInteractions(keyService);
-	}
-
-	@Test
-	public void generateKeyWithFailedAuth() throws AuthenticationException {
-		authFailSetup();
-		when(keyService.generateKey(any(UserInfo.class), anyBoolean())).thenReturn("someUuid");
-
-		final Response response = resources.getJerseyTest()
-				.target("/user/access_key/generate")
-				.request()
-				.header("Authorization", "Bearer " + TOKEN)
-				.post(Entity.json(""));
-
-		assertEquals(HttpStatus.SC_OK, response.getStatus());
-		assertEquals(MediaType.APPLICATION_OCTET_STREAM, response.getHeaderString(HttpHeaders.CONTENT_TYPE));
-
-		verify(keyService).generateKey(getUserInfo(), true);
-		verifyNoMoreInteractions(keyService);
-	}
-
-	@Test
-	public void generateKeyWithException() {
-		doThrow(new DlabException("Can not generate private/public key pair due to"))
-				.when(keyService).generateKey(any(UserInfo.class), anyBoolean());
-
-		final Response response = resources.getJerseyTest()
-				.target("/user/access_key/generate")
-				.request()
-				.header("Authorization", "Bearer " + TOKEN)
-				.post(Entity.json(""));
-
-		assertEquals(HttpStatus.SC_INTERNAL_SERVER_ERROR, response.getStatus());
-		assertEquals(MediaType.APPLICATION_JSON, response.getHeaderString(HttpHeaders.CONTENT_TYPE));
-
-		verify(keyService).generateKey(getUserInfo(), true);
-		verifyNoMoreInteractions(keyService);
-	}
-
-}
diff --git a/services/self-service/src/test/java/com/epam/dlab/backendapi/service/impl/AccessKeyServiceImplTest.java b/services/self-service/src/test/java/com/epam/dlab/backendapi/service/impl/AccessKeyServiceImplTest.java
deleted file mode 100644
index c68a3d0..0000000
--- a/services/self-service/src/test/java/com/epam/dlab/backendapi/service/impl/AccessKeyServiceImplTest.java
+++ /dev/null
@@ -1,311 +0,0 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements.  See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership.  The ASF licenses this file
- * to you 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.
- */
-
-package com.epam.dlab.backendapi.service.impl;
-
-import com.epam.dlab.auth.UserInfo;
-import com.epam.dlab.backendapi.conf.SelfServiceApplicationConfiguration;
-import com.epam.dlab.backendapi.dao.KeyDAO;
-import com.epam.dlab.backendapi.domain.RequestId;
-import com.epam.dlab.backendapi.service.ExploratoryService;
-import com.epam.dlab.backendapi.service.ReuploadKeyService;
-import com.epam.dlab.backendapi.util.RequestBuilder;
-import com.epam.dlab.dto.UserInstanceStatus;
-import com.epam.dlab.dto.base.edge.EdgeInfo;
-import com.epam.dlab.dto.base.keyload.UploadFile;
-import com.epam.dlab.dto.keyload.KeyLoadStatus;
-import com.epam.dlab.dto.keyload.UserKeyDTO;
-import com.epam.dlab.exceptions.DlabException;
-import com.epam.dlab.rest.client.RESTService;
-import org.apache.commons.lang3.StringUtils;
-import org.junit.Before;
-import org.junit.Rule;
-import org.junit.Test;
-import org.junit.rules.ExpectedException;
-import org.junit.runner.RunWith;
-import org.mockito.InjectMocks;
-import org.mockito.Mock;
-import org.mockito.runners.MockitoJUnitRunner;
-
-import static org.junit.Assert.*;
-import static org.mockito.Mockito.*;
-
-@RunWith(MockitoJUnitRunner.class)
-public class AccessKeyServiceImplTest {
-
-	private final String USER = "test";
-	private final String TOKEN = "token";
-
-	private UserInfo userInfo;
-
-	@Mock
-	private KeyDAO keyDAO;
-	@Mock
-	private RESTService provisioningService;
-	@Mock
-	private RequestBuilder requestBuilder;
-	@Mock
-	private RequestId requestId;
-	@Mock
-	private ExploratoryService exploratoryService;
-	@Mock
-	private SelfServiceApplicationConfiguration configuration;
-	@Mock
-	private ReuploadKeyService reuploadKeyService;
-
-	@InjectMocks
-	private AccessKeyServiceImpl accessKeyService;
-
-	@Rule
-	public ExpectedException expectedException = ExpectedException.none();
-
-	@Before
-	public void setUp() {
-		userInfo = getUserInfo();
-	}
-
-	@Test
-	public void getUserKeyStatus() {
-		when(keyDAO.findKeyStatus(anyString())).thenReturn(KeyLoadStatus.SUCCESS);
-
-		KeyLoadStatus keyLoadStatus = accessKeyService.getUserKeyStatus(USER);
-		assertEquals(KeyLoadStatus.SUCCESS, keyLoadStatus);
-
-		verify(keyDAO).findKeyStatus(USER);
-		verifyNoMoreInteractions(keyDAO);
-	}
-
-	@Test
-	public void getUserKeyStatusWithException() {
-		doThrow(new DlabException("Some message")).when(keyDAO).findKeyStatus(anyString());
-
-		KeyLoadStatus keyLoadStatus = accessKeyService.getUserKeyStatus(USER);
-		assertEquals(KeyLoadStatus.ERROR, keyLoadStatus);
-
-		verify(keyDAO).findKeyStatus(USER);
-		verifyNoMoreInteractions(keyDAO);
-	}
-
-	@Test
-	public void uploadKey() {
-		doNothing().when(keyDAO).upsertKey(anyString(), anyString(), anyBoolean());
-		doNothing().when(exploratoryService).updateExploratoriesReuploadKeyFlag(anyString(), anyBoolean(),
-				anyVararg());
-
-		UploadFile uploadFile = mock(UploadFile.class);
-		when(requestBuilder.newEdgeKeyUpload(any(UserInfo.class), anyString())).thenReturn(uploadFile);
-
-		String expectedUuid = "someUuid";
-		when(provisioningService.post(anyString(), anyString(), any(UploadFile.class), any())).
-				thenReturn(expectedUuid);
-		when(requestId.put(anyString(), anyString())).thenReturn(expectedUuid);
-
-		String keyContent = "keyContent";
-		String actualUuid = accessKeyService.uploadKey(userInfo, keyContent, true);
-		assertNotNull(actualUuid);
-		assertEquals(expectedUuid, actualUuid);
-
-		verify(keyDAO).upsertKey(USER, keyContent, true);
-		verifyZeroInteractions(exploratoryService);
-		verify(requestBuilder).newEdgeKeyUpload(userInfo, keyContent);
-		verify(provisioningService).post("infrastructure/edge/create", TOKEN, uploadFile, String.class);
-		verify(requestId).put(USER, expectedUuid);
-		verifyNoMoreInteractions(keyDAO, requestBuilder, provisioningService, requestId);
-	}
-
-
-	@Test
-	public void uploadKeyWithException() {
-		doNothing().when(keyDAO).upsertKey(anyString(), anyString(), anyBoolean());
-		doNothing().when(exploratoryService).updateExploratoriesReuploadKeyFlag(anyString(), anyBoolean(), anyVararg());
-		doThrow(new RuntimeException()).when(requestBuilder).newEdgeKeyUpload(any(UserInfo.class), anyString());
-
-		expectedException.expect(RuntimeException.class);
-
-		doNothing().when(keyDAO).deleteKey(anyString());
-		expectedException.expect(DlabException.class);
-		expectedException.expectMessage("Could not upload the key and create EDGE node: ");
-
-		accessKeyService.uploadKey(userInfo, "someKeyContent", true);
-	}
-
-	@Test
-	public void reUploadKey() {
-		doNothing().when(keyDAO).upsertKey(anyString(), anyString(), anyBoolean());
-		when(reuploadKeyService.reuploadKey(any(UserInfo.class), anyString())).thenReturn("someString");
-
-		String expectedString = "someString";
-		String keyContent = "keyContent";
-		String actualString = accessKeyService.uploadKey(userInfo, keyContent, false);
-		assertNotNull(actualString);
-		assertEquals(expectedString, actualString);
-
-		verify(keyDAO).upsertKey(USER, keyContent, false);
-		verify(reuploadKeyService).reuploadKey(userInfo, keyContent);
-		verifyNoMoreInteractions(keyDAO, reuploadKeyService);
-	}
-
-	@Test
-	public void reUploadKeyWithException() {
-		doNothing().when(keyDAO).upsertKey(anyString(), anyString(), anyBoolean());
-		doThrow(new RuntimeException()).when(reuploadKeyService).reuploadKey(any(UserInfo.class), anyString());
-
-		expectedException.expect(RuntimeException.class);
-
-		expectedException.expect(DlabException.class);
-		expectedException.expectMessage("Could not reupload the key. Previous key has been deleted:");
-
-		accessKeyService.uploadKey(userInfo, "someKeyContent", false);
-	}
-
-	@Test
-	public void recoverEdge() {
-		EdgeInfo edgeInfo = new EdgeInfo();
-		edgeInfo.setId("someId");
-		edgeInfo.setEdgeStatus("failed");
-		when(keyDAO.getEdgeInfo(anyString())).thenReturn(edgeInfo);
-
-		UserKeyDTO userKeyDTO = new UserKeyDTO();
-		userKeyDTO.withStatus("someStatus");
-		userKeyDTO.withContent("someContent");
-		when(keyDAO.fetchKey(anyString(), any(KeyLoadStatus.class))).thenReturn(userKeyDTO);
-
-		edgeInfo.setEdgeStatus("terminated");
-		edgeInfo.setInstanceId(null);
-
-		doNothing().when(keyDAO).updateEdgeInfo(anyString(), any(EdgeInfo.class));
-
-		UploadFile uploadFile = mock(UploadFile.class);
-		when(requestBuilder.newEdgeKeyUpload(any(UserInfo.class), anyString())).thenReturn(uploadFile);
-
-		String expectedUuid = "someUuid";
-		when(provisioningService.post(anyString(), anyString(), any(UploadFile.class), any()))
-				.thenReturn(expectedUuid);
-		when(requestId.put(anyString(), anyString())).thenReturn(expectedUuid);
-
-		String actualUuid = accessKeyService.recoverEdge(userInfo);
-		assertNotNull(actualUuid);
-		assertEquals(expectedUuid, actualUuid);
-
-		verify(keyDAO).getEdgeInfo(USER);
-		verify(keyDAO).fetchKey(USER, KeyLoadStatus.SUCCESS);
-		verify(keyDAO).updateEdgeInfo(USER, edgeInfo);
-
-		verify(requestBuilder).newEdgeKeyUpload(userInfo, userKeyDTO.getContent());
-		verify(provisioningService).post("infrastructure/edge/create", TOKEN, uploadFile, String.class);
-		verify(requestId).put(USER, expectedUuid);
-		verifyNoMoreInteractions(keyDAO, requestBuilder, provisioningService, requestId);
-	}
-
-	@Test
-	public void recoverEdgeWithExceptionInGetEdgeInfoMethod() {
-		EdgeInfo edgeInfo = new EdgeInfo();
-		edgeInfo.setId("someId");
-		edgeInfo.setEdgeStatus("running");
-		when(keyDAO.getEdgeInfo(anyString())).thenReturn(edgeInfo);
-
-		expectedException.expect(DlabException.class);
-		expectedException.expectMessage("Could not create EDGE node because the status of instance is running");
-
-		doNothing().when(keyDAO).updateEdgeStatus(anyString(), anyString());
-
-		expectedException.expect(DlabException.class);
-		expectedException.expectMessage("Could not upload the key and create EDGE node:");
-
-		accessKeyService.recoverEdge(userInfo);
-
-		verify(keyDAO).getEdgeInfo(USER);
-		verify(keyDAO).updateEdgeStatus(USER, UserInstanceStatus.FAILED.toString());
-		verifyNoMoreInteractions(keyDAO);
-		verifyZeroInteractions(requestBuilder, provisioningService, requestId);
-	}
-
-	@Test
-	public void recoverEdgeWithExceptionInFetchKeyMethod() {
-		EdgeInfo edgeInfo = new EdgeInfo();
-		edgeInfo.setId("someId");
-		edgeInfo.setEdgeStatus("failed");
-		when(keyDAO.getEdgeInfo(anyString())).thenReturn(edgeInfo);
-
-		UserKeyDTO userKeyDTO = new UserKeyDTO();
-		userKeyDTO.withStatus("someStatus");
-		userKeyDTO.withContent("someContent");
-		doThrow(new DlabException(String.format("Key of user %s with status %s not found", USER,
-				KeyLoadStatus.SUCCESS))).when(keyDAO).fetchKey(anyString(), eq(KeyLoadStatus.SUCCESS));
-
-		doNothing().when(keyDAO).updateEdgeStatus(anyString(), anyString());
-
-		expectedException.expect(DlabException.class);
-		expectedException.expectMessage("Could not upload the key and create EDGE node: ");
-
-		accessKeyService.recoverEdge(userInfo);
-
-		verify(keyDAO).getEdgeInfo(USER);
-		verify(keyDAO).fetchKey(USER, KeyLoadStatus.SUCCESS);
-		verify(keyDAO).updateEdgeStatus(USER, UserInstanceStatus.FAILED.toString());
-		verifyNoMoreInteractions(keyDAO);
-		verifyZeroInteractions(requestBuilder, provisioningService, requestId);
-	}
-
-	@Test
-	public void generateKey() {
-		doNothing().when(keyDAO).upsertKey(anyString(), anyString(), anyBoolean());
-
-		UploadFile uploadFile = mock(UploadFile.class);
-		when(requestBuilder.newEdgeKeyUpload(any(UserInfo.class), anyString())).thenReturn(uploadFile);
-
-		String someUuid = "someUuid";
-		when(configuration.getPrivateKeySize()).thenReturn(2048);
-		when(provisioningService.post(anyString(), anyString(), any(UploadFile.class), any())).thenReturn(someUuid);
-		when(requestId.put(anyString(), anyString())).thenReturn(someUuid);
-
-		String actualPrivateKey = accessKeyService.generateKey(userInfo, true);
-		assertTrue(StringUtils.isNotEmpty(actualPrivateKey));
-
-		verify(keyDAO).upsertKey(eq(USER), anyString(), eq(true));
-		verify(requestBuilder).newEdgeKeyUpload(refEq(userInfo), anyString());
-		verify(provisioningService).post("infrastructure/edge/create", TOKEN, uploadFile, String.class);
-		verify(requestId).put(USER, someUuid);
-		verifyNoMoreInteractions(keyDAO, requestBuilder, provisioningService, requestId);
-	}
-
-	@Test
-	public void generateKeyWithException() {
-		doNothing().when(keyDAO).upsertKey(anyString(), anyString(), anyBoolean());
-		when(configuration.getPrivateKeySize()).thenReturn(2048);
-		doThrow(new RuntimeException()).when(requestBuilder).newEdgeKeyUpload(any(UserInfo.class), anyString());
-		doNothing().when(keyDAO).deleteKey(anyString());
-
-		try {
-			accessKeyService.generateKey(userInfo, true);
-		} catch (DlabException e) {
-			assertEquals("Could not upload the key and create EDGE node: ", e.getMessage());
-		}
-
-		verify(keyDAO).upsertKey(eq(USER), anyString(), eq(true));
-		verify(requestBuilder).newEdgeKeyUpload(refEq(userInfo), anyString());
-		verify(keyDAO).deleteKey(USER);
-		verifyNoMoreInteractions(keyDAO, requestBuilder);
-	}
-
-	private UserInfo getUserInfo() {
-		return new UserInfo(USER, TOKEN);
-	}
-
-}
diff --git a/services/self-service/src/test/java/com/epam/dlab/backendapi/service/impl/EdgeServiceImplTest.java b/services/self-service/src/test/java/com/epam/dlab/backendapi/service/impl/EdgeServiceImplTest.java
deleted file mode 100644
index 09784eb..0000000
--- a/services/self-service/src/test/java/com/epam/dlab/backendapi/service/impl/EdgeServiceImplTest.java
+++ /dev/null
@@ -1,241 +0,0 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements.  See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership.  The ASF licenses this file
- * to you 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.
- */
-
-package com.epam.dlab.backendapi.service.impl;
-
-import com.epam.dlab.auth.UserInfo;
-import com.epam.dlab.backendapi.dao.KeyDAO;
-import com.epam.dlab.backendapi.domain.RequestId;
-import com.epam.dlab.backendapi.util.RequestBuilder;
-import com.epam.dlab.dto.ResourceSysBaseDTO;
-import com.epam.dlab.dto.UserInstanceStatus;
-import com.epam.dlab.exceptions.DlabException;
-import com.epam.dlab.rest.client.RESTService;
-import org.junit.Before;
-import org.junit.Rule;
-import org.junit.Test;
-import org.junit.rules.ExpectedException;
-import org.junit.runner.RunWith;
-import org.mockito.InjectMocks;
-import org.mockito.Mock;
-import org.mockito.runners.MockitoJUnitRunner;
-
-import static org.junit.Assert.assertEquals;
-import static org.junit.Assert.assertNotNull;
-import static org.mockito.Mockito.*;
-
-@RunWith(MockitoJUnitRunner.class)
-public class EdgeServiceImplTest {
-
-	private final String USER = "test";
-	private final String TOKEN = "token";
-	private final String UUID = "1234-56789765-4321";
-	private final String STATUS_STOPPED = "stopped";
-	private final String STATUS_RUNNING = "running";
-	private UserInfo userInfo;
-
-	@Mock
-	private KeyDAO keyDAO;
-	@Mock
-	private RESTService provisioningService;
-	@Mock
-	private RequestBuilder requestBuilder;
-	@Mock
-	private RequestId requestId;
-
-	@InjectMocks
-	private EdgeServiceImpl edgeService;
-
-	@Rule
-	public ExpectedException expectedException = ExpectedException.none();
-
-	@Before
-	public void setUp() {
-		userInfo = getUserInfo();
-	}
-
-	@Test
-	public void start() {
-		when(keyDAO.getEdgeStatus(anyString())).thenReturn(STATUS_STOPPED);
-		doNothing().when(keyDAO).updateEdgeStatus(anyString(), anyString());
-		ResourceSysBaseDTO rsbDto = new ResourceSysBaseDTO();
-		when(requestBuilder.newEdgeAction(any(UserInfo.class))).thenReturn(rsbDto);
-		String edgeStart = "infrastructure/edge/start";
-		when(provisioningService.post(anyString(), anyString(), any(ResourceSysBaseDTO.class), any()))
-				.thenReturn(UUID);
-		when(requestId.put(anyString(), anyString())).thenReturn(UUID);
-
-		String uuid = edgeService.start(userInfo);
-		assertNotNull(uuid);
-		assertEquals(UUID, uuid);
-
-		verify(keyDAO).getEdgeStatus(USER);
-		verify(keyDAO).updateEdgeStatus(USER, "starting");
-		verify(requestBuilder).newEdgeAction(userInfo);
-		verify(provisioningService).post(edgeStart, TOKEN, rsbDto, String.class);
-		verify(requestId).put(USER, UUID);
-		verifyNoMoreInteractions(keyDAO, requestBuilder, provisioningService, requestId);
-	}
-
-	@Test
-	public void startWithInappropriateEdgeStatus() {
-		when(keyDAO.getEdgeStatus(anyString())).thenReturn(STATUS_RUNNING);
-		expectedException.expect(DlabException.class);
-		expectedException.expectMessage("Could not start EDGE node because the status of instance is running");
-
-		edgeService.start(userInfo);
-	}
-
-	@Test
-	public void startWhenMethodNewEdgeActionThrowsException() {
-		when(keyDAO.getEdgeStatus(anyString())).thenReturn(STATUS_STOPPED);
-		doNothing().when(keyDAO).updateEdgeStatus(anyString(), anyString());
-
-		doThrow(new DlabException("Cannot create instance of resource class "))
-				.when(requestBuilder).newEdgeAction(any(UserInfo.class));
-		try {
-			edgeService.start(userInfo);
-		} catch (DlabException e) {
-			assertEquals("Could not start EDGE node: Could not infrastructure/edge/start EDGE node : " +
-					"Cannot create instance of resource class ", e.getMessage());
-		}
-		verify(keyDAO).getEdgeStatus(USER);
-		verify(keyDAO).updateEdgeStatus(USER, "starting");
-		verify(keyDAO).updateEdgeStatus(USER, "failed");
-		verify(requestBuilder).newEdgeAction(userInfo);
-		verifyNoMoreInteractions(keyDAO, requestBuilder);
-	}
-
-	@Test
-	public void stop() {
-		when(keyDAO.getEdgeStatus(anyString())).thenReturn(STATUS_RUNNING);
-		doNothing().when(keyDAO).updateEdgeStatus(anyString(), anyString());
-		ResourceSysBaseDTO rsbDto = new ResourceSysBaseDTO();
-		when(requestBuilder.newEdgeAction(any(UserInfo.class))).thenReturn(rsbDto);
-		String edgeStop = "infrastructure/edge/stop";
-		when(provisioningService.post(anyString(), anyString(), any(ResourceSysBaseDTO.class), any())).thenReturn
-				(UUID);
-		when(requestId.put(anyString(), anyString())).thenReturn(UUID);
-
-		String uuid = edgeService.stop(userInfo);
-		assertNotNull(uuid);
-		assertEquals(UUID, uuid);
-
-		verify(keyDAO).getEdgeStatus(USER);
-		verify(keyDAO).updateEdgeStatus(USER, "stopping");
-		verify(requestBuilder).newEdgeAction(userInfo);
-		verify(provisioningService).post(edgeStop, TOKEN, rsbDto, String.class);
-		verify(requestId).put(USER, UUID);
-		verifyNoMoreInteractions(keyDAO, requestBuilder, provisioningService, requestId);
-	}
-
-	@Test
-	public void stopWithInappropriateEdgeStatus() {
-		when(keyDAO.getEdgeStatus(anyString())).thenReturn(STATUS_STOPPED);
-		expectedException.expect(DlabException.class);
-		expectedException.expectMessage("Could not stop EDGE node because the status of instance is stopped");
-
-		edgeService.stop(userInfo);
-	}
-
-	@Test
-	public void stopWhenMethodNewEdgeActionThrowsException() {
-		when(keyDAO.getEdgeStatus(anyString())).thenReturn(STATUS_RUNNING);
-		doNothing().when(keyDAO).updateEdgeStatus(anyString(), anyString());
-
-		doThrow(new DlabException("Cannot create instance of resource class "))
-				.when(requestBuilder).newEdgeAction(any(UserInfo.class));
-		try {
-			edgeService.stop(userInfo);
-		} catch (DlabException e) {
-			assertEquals("Could not stop EDGE node: Could not infrastructure/edge/stop EDGE node : " +
-					"Cannot create instance of resource class ", e.getMessage());
-		}
-		verify(keyDAO).getEdgeStatus(USER);
-		verify(keyDAO).updateEdgeStatus(USER, "stopping");
-		verify(keyDAO).updateEdgeStatus(USER, "failed");
-		verify(requestBuilder).newEdgeAction(userInfo);
-		verifyNoMoreInteractions(keyDAO, requestBuilder);
-	}
-
-	@Test
-	public void terminate() {
-		when(keyDAO.getEdgeStatus(anyString())).thenReturn(STATUS_RUNNING);
-		doNothing().when(keyDAO).updateEdgeStatus(anyString(), anyString());
-		ResourceSysBaseDTO rsbDto = new ResourceSysBaseDTO();
-		when(requestBuilder.newEdgeAction(any(UserInfo.class))).thenReturn(rsbDto);
-		String edgeTerminate = "infrastructure/edge/terminate";
-		when(provisioningService.post(anyString(), anyString(), any(ResourceSysBaseDTO.class), any()))
-				.thenReturn(UUID);
-		when(requestId.put(anyString(), anyString())).thenReturn(UUID);
-
-		String uuid = edgeService.terminate(userInfo);
-		assertNotNull(uuid);
-		assertEquals(UUID, uuid);
-
-		verify(keyDAO).getEdgeStatus(USER);
-		verify(keyDAO).updateEdgeStatus(USER, "terminating");
-		verify(requestBuilder).newEdgeAction(userInfo);
-		verify(provisioningService).post(edgeTerminate, TOKEN, rsbDto, String.class);
-		verify(requestId).put(USER, UUID);
-		verifyNoMoreInteractions(keyDAO, requestBuilder, provisioningService, requestId);
-	}
-
-	@Test
-	public void terminateWithInappropriateEdgeStatus() {
-		when(keyDAO.getEdgeStatus(anyString())).thenReturn(anyString());
-		expectedException.expect(DlabException.class);
-		expectedException.expectMessage("Could not terminate EDGE node because the status of instance is null");
-
-		edgeService.terminate(userInfo);
-	}
-
-	@Test
-	public void terminateWhenMethodNewEdgeActionThrowsException() {
-		when(keyDAO.getEdgeStatus(anyString())).thenReturn(STATUS_RUNNING);
-		doNothing().when(keyDAO).updateEdgeStatus(anyString(), anyString());
-
-		doThrow(new DlabException("Cannot create instance of resource class "))
-				.when(requestBuilder).newEdgeAction(any(UserInfo.class));
-		try {
-			edgeService.terminate(userInfo);
-		} catch (DlabException e) {
-			assertEquals("Could not terminate EDGE node: Could not infrastructure/edge/terminate EDGE node : " +
-					"Cannot create instance of resource class ", e.getMessage());
-		}
-		verify(keyDAO).getEdgeStatus(USER);
-		verify(keyDAO).updateEdgeStatus(USER, "terminating");
-		verify(keyDAO).updateEdgeStatus(USER, "failed");
-		verify(requestBuilder).newEdgeAction(userInfo);
-		verifyNoMoreInteractions(keyDAO, requestBuilder);
-	}
-
-	@Test
-	public void updateReuploadKeyFlag() {
-		doNothing().when(keyDAO).updateEdgeReuploadKey(anyString(), anyBoolean(), anyVararg());
-		edgeService.updateReuploadKeyFlag(USER, true, UserInstanceStatus.RUNNING);
-
-		verify(keyDAO).updateEdgeReuploadKey(USER, true, UserInstanceStatus.RUNNING);
-		verifyNoMoreInteractions(keyDAO);
-	}
-
-	private UserInfo getUserInfo() {
-		return new UserInfo(USER, TOKEN);
-	}
-}
diff --git a/services/self-service/src/test/java/com/epam/dlab/backendapi/service/impl/EnvironmentServiceImplTest.java b/services/self-service/src/test/java/com/epam/dlab/backendapi/service/impl/EnvironmentServiceImplTest.java
index bc8db84..5396ca8 100644
--- a/services/self-service/src/test/java/com/epam/dlab/backendapi/service/impl/EnvironmentServiceImplTest.java
+++ b/services/self-service/src/test/java/com/epam/dlab/backendapi/service/impl/EnvironmentServiceImplTest.java
@@ -22,16 +22,14 @@ package com.epam.dlab.backendapi.service.impl;
 import com.epam.dlab.auth.UserInfo;
 import com.epam.dlab.backendapi.dao.EnvDAO;
 import com.epam.dlab.backendapi.dao.ExploratoryDAO;
-import com.epam.dlab.backendapi.dao.KeyDAO;
 import com.epam.dlab.backendapi.dao.UserSettingsDAO;
 import com.epam.dlab.backendapi.domain.ProjectDTO;
 import com.epam.dlab.backendapi.domain.ProjectEndpointDTO;
 import com.epam.dlab.backendapi.resources.dto.UserDTO;
 import com.epam.dlab.backendapi.service.ComputationalService;
-import com.epam.dlab.backendapi.service.EdgeService;
 import com.epam.dlab.backendapi.service.ExploratoryService;
-import com.epam.dlab.backendapi.service.SecurityService;
 import com.epam.dlab.backendapi.service.ProjectService;
+import com.epam.dlab.backendapi.service.SecurityService;
 import com.epam.dlab.dto.UserInstanceDTO;
 import com.epam.dlab.dto.UserInstanceStatus;
 import com.epam.dlab.dto.base.edge.EdgeInfo;
@@ -76,10 +74,6 @@ public class EnvironmentServiceImplTest {
 	@Mock
 	private ComputationalService computationalService;
 	@Mock
-	private EdgeService edgeService;
-	@Mock
-	private KeyDAO keyDAO;
-	@Mock
 	private UserSettingsDAO userSettingsDAO;
 	@Mock
 	private ProjectService projectService;
@@ -145,24 +139,18 @@ public class EnvironmentServiceImplTest {
 	public void stopEnvironment() {
 		final UserInfo userInfo = getUserInfo();
 		when(exploratoryDAO.fetchRunningExploratoryFields(anyString())).thenReturn(getUserInstances());
-		when(securityService.getUserInfoOffline(anyString())).thenReturn(userInfo);
 		when(exploratoryService.stop(any(UserInfo.class), anyString())).thenReturn(UUID);
-		when(keyDAO.getEdgeStatus(anyString())).thenReturn(RUNNING_STATE);
-		when(edgeService.stop(any(UserInfo.class))).thenReturn(UUID);
 
 		environmentService.stopEnvironment(userInfo, USER);
 
 		verify(exploratoryDAO).fetchRunningExploratoryFields(USER);
-		verify(securityService).getUserInfoOffline(USER);
 		verify(exploratoryService).stop(refEq(userInfo), eq(EXPLORATORY_NAME_1));
 		verify(exploratoryService).stop(refEq(userInfo), eq(EXPLORATORY_NAME_2));
-		verify(keyDAO, times(2)).getEdgeStatus(USER);
-		verify(edgeService).stop(refEq(userInfo));
 		verify(exploratoryDAO).fetchUserExploratoriesWhereStatusIn(USER, Arrays.asList(UserInstanceStatus.CREATING,
 				UserInstanceStatus.STARTING, UserInstanceStatus.CREATING_IMAGE),
 				UserInstanceStatus.CREATING,
 				UserInstanceStatus.STARTING, UserInstanceStatus.CREATING_IMAGE);
-		verifyNoMoreInteractions(keyDAO, exploratoryDAO, edgeService, exploratoryService);
+		verifyNoMoreInteractions(exploratoryDAO, exploratoryService);
 	}
 
 	@Test
@@ -176,32 +164,20 @@ public class EnvironmentServiceImplTest {
 	}
 
 	@Test
-	public void stopEnvironmentWithEdgeStarting() {
-		when(keyDAO.getEdgeStatus(anyString())).thenReturn("starting");
-		expectedException.expect(ResourceConflictException.class);
-
-		environmentService.stopEnvironment(getUserInfo(), USER);
-	}
-
-	@Test
 	public void stopEnvironmentWithoutEdge() {
 		final UserInfo userInfo = getUserInfo();
 		when(exploratoryDAO.fetchRunningExploratoryFields(anyString())).thenReturn(getUserInstances());
 		when(exploratoryService.stop(any(UserInfo.class), anyString())).thenReturn(UUID);
-		when(keyDAO.getEdgeStatus(anyString())).thenReturn(STOPPED_STATE);
-		when(edgeService.stop(any(UserInfo.class))).thenReturn(UUID);
 
 		environmentService.stopEnvironment(userInfo, USER);
 
 		verify(exploratoryDAO).fetchRunningExploratoryFields(USER);
 		verify(exploratoryService).stop(refEq(userInfo), eq(EXPLORATORY_NAME_1));
 		verify(exploratoryService).stop(refEq(userInfo), eq(EXPLORATORY_NAME_2));
-		verify(keyDAO, times(2)).getEdgeStatus(USER);
-		verify(edgeService, never()).stop(refEq(userInfo));
 		verify(exploratoryDAO).fetchUserExploratoriesWhereStatusIn(USER, Arrays.asList(UserInstanceStatus.CREATING,
 				UserInstanceStatus.STARTING, UserInstanceStatus.CREATING_IMAGE),
 				UserInstanceStatus.CREATING, UserInstanceStatus.STARTING, UserInstanceStatus.CREATING_IMAGE);
-		verifyNoMoreInteractions(keyDAO, envDAO, exploratoryDAO, edgeService, exploratoryService);
+		verifyNoMoreInteractions(envDAO, exploratoryDAO, exploratoryService);
 	}
 
 	@Test
@@ -230,32 +206,6 @@ public class EnvironmentServiceImplTest {
 	}
 
 	@Test
-	public void stopEdge() {
-		final UserInfo userInfo = getUserInfo();
-		when(keyDAO.getEdgeStatus(anyString())).thenReturn(RUNNING_STATE);
-		when(securityService.getUserInfoOffline(anyString())).thenReturn(userInfo);
-		when(edgeService.stop(any(UserInfo.class))).thenReturn(UUID);
-
-		environmentService.stopEdge(USER);
-
-		verify(keyDAO).getEdgeStatus(USER);
-		verify(securityService).getUserInfoOffline(USER);
-		verify(edgeService).stop(refEq(userInfo));
-		verifyNoMoreInteractions(keyDAO, securityService, edgeService);
-	}
-
-	@Test
-	public void stopEdgeWhenItIsNotRunning() {
-		when(keyDAO.getEdgeStatus(anyString())).thenReturn("starting");
-
-		environmentService.stopEdge(USER);
-
-		verify(keyDAO).getEdgeStatus(USER);
-		verifyZeroInteractions(securityService, edgeService);
-		verifyNoMoreInteractions(keyDAO);
-	}
-
-	@Test
 	public void stopExploratory() {
 		final UserInfo userInfo = getUserInfo();
 		when(exploratoryService.stop(any(UserInfo.class), anyString())).thenReturn(UUID);
@@ -278,76 +228,6 @@ public class EnvironmentServiceImplTest {
 	}
 
 	@Test
-	@SuppressWarnings("unchecked")
-	public void terminateEnvironment() {
-		final UserInfo userInfo = getUserInfo();
-		when(exploratoryDAO.fetchUserExploratoriesWhereStatusIn(anyString(), any(List.class), anyVararg()))
-				.thenReturn(Collections.emptyList());
-		when(securityService.getUserInfoOffline(anyString())).thenReturn(userInfo);
-		when(exploratoryService.terminate(any(UserInfo.class), anyString())).thenReturn(UUID);
-		when(keyDAO.edgeNodeExist(anyString())).thenReturn(true);
-		when(edgeService.terminate(any(UserInfo.class))).thenReturn(UUID);
-
-		environmentService.terminateEnvironment(userInfo, USER);
-
-		verify(exploratoryDAO).fetchUserExploratoriesWhereStatusIn(anyString(), any(List.class), anyVararg());
-		verify(securityService).getUserInfoOffline(USER);
-		verify(keyDAO).edgeNodeExist(USER);
-		verify(edgeService).terminate(refEq(userInfo));
-		verify(exploratoryService).updateExploratoryStatuses(USER, UserInstanceStatus.TERMINATING);
-		verify(keyDAO).getEdgeStatus(userInfo.getName());
-		verify(exploratoryDAO).fetchUserExploratoriesWhereStatusIn(USER, Arrays.asList(UserInstanceStatus.CREATING,
-				UserInstanceStatus.STARTING, UserInstanceStatus.CREATING_IMAGE),
-				UserInstanceStatus.CREATING, UserInstanceStatus.STARTING, UserInstanceStatus.CREATING_IMAGE);
-		verifyNoMoreInteractions(keyDAO, envDAO, exploratoryDAO, edgeService, exploratoryService);
-	}
-
-	@Test
-	@SuppressWarnings("unchecked")
-	public void terminateEnvironmentWithoutEdge() {
-		final UserInfo userInfo = getUserInfo();
-		when(exploratoryDAO.fetchUserExploratoriesWhereStatusIn(anyString(), any(List.class),
-				eq(UserInstanceStatus.CREATING), eq(UserInstanceStatus.STARTING))).thenReturn(Collections.emptyList());
-		when(exploratoryDAO.fetchUserExploratoriesWhereStatusNotIn(anyString(), eq(UserInstanceStatus.TERMINATED),
-				eq(UserInstanceStatus.FAILED), eq(UserInstanceStatus.TERMINATING))).thenReturn(getUserInstances());
-		when(exploratoryService.terminate(any(UserInfo.class), anyString())).thenReturn(UUID);
-		when(keyDAO.edgeNodeExist(anyString())).thenReturn(false);
-		when(edgeService.terminate(any(UserInfo.class))).thenReturn(UUID);
-
-		environmentService.terminateEnvironment(userInfo, USER);
-
-		verify(exploratoryDAO).fetchUserExploratoriesWhereStatusNotIn(USER, UserInstanceStatus.TERMINATED,
-				UserInstanceStatus.FAILED, UserInstanceStatus.TERMINATING);
-		verify(exploratoryService).terminate(refEq(userInfo), eq(EXPLORATORY_NAME_1));
-		verify(exploratoryService).terminate(refEq(userInfo), eq(EXPLORATORY_NAME_2));
-		verify(keyDAO).edgeNodeExist(USER);
-		verify(edgeService, never()).terminate(refEq(userInfo));
-		verify(keyDAO).getEdgeStatus(USER);
-		verify(exploratoryDAO).fetchUserExploratoriesWhereStatusIn(USER, Arrays.asList(UserInstanceStatus.CREATING,
-				UserInstanceStatus.STARTING, UserInstanceStatus.CREATING_IMAGE),
-				UserInstanceStatus.CREATING, UserInstanceStatus.STARTING, UserInstanceStatus.CREATING_IMAGE);
-		verifyNoMoreInteractions(keyDAO, envDAO, exploratoryDAO, edgeService, exploratoryService);
-	}
-
-	@Test
-	@SuppressWarnings("unchecked")
-	public void terminateEnvironmentWithWrongResourceState() {
-		when(exploratoryDAO.fetchUserExploratoriesWhereStatusIn(anyString(), any(List.class), anyVararg()))
-				.thenReturn(getUserInstances());
-		expectedException.expect(ResourceConflictException.class);
-
-		environmentService.terminateEnvironment(getUserInfo(), USER);
-	}
-
-	@Test
-	public void terminateEnvironmentWithEdgeStarting() {
-		when(keyDAO.getEdgeStatus(anyString())).thenReturn("starting");
-		expectedException.expect(ResourceConflictException.class);
-
-		environmentService.terminateEnvironment(getUserInfo(), USER);
-	}
-
-	@Test
 	public void terminateExploratory() {
 		final UserInfo userInfo = getUserInfo();
 		when(exploratoryService.terminate(any(UserInfo.class), anyString())).thenReturn(UUID);
diff --git a/services/self-service/src/test/java/com/epam/dlab/backendapi/service/impl/ReuploadKeyServiceImplTest.java b/services/self-service/src/test/java/com/epam/dlab/backendapi/service/impl/ReuploadKeyServiceImplTest.java
index 6e4bdc1..7c5d048 100644
--- a/services/self-service/src/test/java/com/epam/dlab/backendapi/service/impl/ReuploadKeyServiceImplTest.java
+++ b/services/self-service/src/test/java/com/epam/dlab/backendapi/service/impl/ReuploadKeyServiceImplTest.java
@@ -22,16 +22,11 @@ package com.epam.dlab.backendapi.service.impl;
 import com.epam.dlab.auth.UserInfo;
 import com.epam.dlab.backendapi.dao.ComputationalDAO;
 import com.epam.dlab.backendapi.dao.ExploratoryDAO;
-import com.epam.dlab.backendapi.dao.KeyDAO;
 import com.epam.dlab.backendapi.domain.RequestId;
 import com.epam.dlab.backendapi.service.ExploratoryService;
-import com.epam.dlab.backendapi.service.UserResourceService;
 import com.epam.dlab.backendapi.util.RequestBuilder;
 import com.epam.dlab.dto.UserInstanceDTO;
 import com.epam.dlab.dto.UserInstanceStatus;
-import com.epam.dlab.dto.aws.edge.EdgeInfoAws;
-import com.epam.dlab.dto.base.DataEngineType;
-import com.epam.dlab.dto.base.edge.EdgeInfo;
 import com.epam.dlab.dto.reuploadkey.ReuploadKeyCallbackDTO;
 import com.epam.dlab.dto.reuploadkey.ReuploadKeyDTO;
 import com.epam.dlab.dto.reuploadkey.ReuploadKeyStatus;
@@ -48,15 +43,15 @@ import org.junit.rules.ExpectedException;
 import org.junit.runner.RunWith;
 import org.mockito.InjectMocks;
 import org.mockito.Mock;
-import org.mockito.Mockito;
 import org.mockito.runners.MockitoJUnitRunner;
 
-import java.util.*;
+import java.util.Collections;
+import java.util.List;
+import java.util.Map;
 
 import static com.epam.dlab.dto.UserInstanceStatus.REUPLOADING_KEY;
 import static com.epam.dlab.dto.UserInstanceStatus.RUNNING;
 import static org.junit.Assert.assertEquals;
-import static org.junit.Assert.assertNotNull;
 import static org.mockito.Mockito.*;
 
 @RunWith(MockitoJUnitRunner.class)
@@ -69,8 +64,6 @@ public class ReuploadKeyServiceImplTest {
 	private UserInfo userInfo;
 
 	@Mock
-	private KeyDAO keyDAO;
-	@Mock
 	private RESTService provisioningService;
 	@Mock
 	private RequestBuilder requestBuilder;
@@ -82,8 +75,6 @@ public class ReuploadKeyServiceImplTest {
 	private ComputationalDAO computationalDAO;
 	@Mock
 	private ExploratoryDAO exploratoryDAO;
-	@Mock
-	private UserResourceService userResourceService;
 
 	@InjectMocks
 	private ReuploadKeyServiceImpl reuploadKeyService;
@@ -97,124 +88,23 @@ public class ReuploadKeyServiceImplTest {
 		userInfo = getUserInfo();
 	}
 
-
-	@Test
-	@SuppressWarnings("unchecked")
-	public void reuploadKey() {
-		doNothing().when(userResourceService).updateReuploadKeyFlagForUserResources(anyString(), anyBoolean());
-		List<UserInstanceDTO> instances = Collections.singletonList(getUserInstance());
-		when(exploratoryService.getInstancesWithStatuses(anyString(), any(UserInstanceStatus.class),
-				any(UserInstanceStatus.class))).thenReturn(instances);
-		List<ResourceData> resourceList = new ArrayList<>();
-		resourceList.add(new ResourceData(ResourceType.EXPLORATORY, "someId", EXPLORATORY_NAME, null));
-		when(userResourceService.convertToResourceData(any(List.class))).thenReturn(resourceList);
-
-		Optional<EdgeInfoAws> edgeInfo = Optional.of(new EdgeInfoAws());
-		Mockito.<Optional<? extends EdgeInfo>>when(keyDAO.getEdgeInfoWhereStatusIn(anyString(), anyVararg()))
-				.thenReturn(edgeInfo);
-		doNothing().when(keyDAO).updateEdgeStatus(anyString(), anyString());
-
-		doNothing().when(exploratoryDAO).updateStatusForExploratories(any(UserInstanceStatus.class), anyString(),
-				any(UserInstanceStatus.class));
-		doNothing().when(computationalDAO).updateStatusForComputationalResources(any(UserInstanceStatus.class),
-				anyString(), any(List.class), any(List.class), any(UserInstanceStatus.class));
-		ReuploadKeyDTO reuploadFile = mock(ReuploadKeyDTO.class);
-		when(requestBuilder.newKeyReupload(any(UserInfo.class), anyString(), anyString(), any(List.class)))
-				.thenReturn(reuploadFile);
-		String expectedUuid = "someUuid";
-		when(provisioningService.post(anyString(), anyString(), any(ReuploadKeyDTO.class), any()))
-				.thenReturn(expectedUuid);
-
-		String keyContent = "keyContent";
-		String actualUuid = reuploadKeyService.reuploadKey(userInfo, keyContent);
-		assertNotNull(actualUuid);
-		assertEquals(expectedUuid, actualUuid);
-		assertEquals(2, resourceList.size());
-
-		verify(userResourceService).updateReuploadKeyFlagForUserResources(USER, true);
-		verify(exploratoryService).getInstancesWithStatuses(USER, RUNNING, RUNNING);
-		verify(userResourceService).convertToResourceData(instances);
-		verify(keyDAO).getEdgeInfoWhereStatusIn(USER, RUNNING);
-		verify(keyDAO).updateEdgeStatus(USER, "reuploading key");
-		verify(exploratoryDAO).updateStatusForExploratories(REUPLOADING_KEY, USER, RUNNING);
-		verify(computationalDAO).updateStatusForComputationalResources(REUPLOADING_KEY, USER,
-				Arrays.asList(RUNNING, REUPLOADING_KEY), Arrays.asList(DataEngineType.SPARK_STANDALONE,
-						DataEngineType.CLOUD_SERVICE), RUNNING);
-		verify(requestBuilder).newKeyReupload(refEq(userInfo), anyString(), eq(keyContent), any(List.class));
-		verify(provisioningService).post("/key/reupload", TOKEN, reuploadFile, String.class);
-		verifyNoMoreInteractions(userResourceService, exploratoryService, keyDAO, exploratoryDAO, computationalDAO,
-				requestBuilder, provisioningService);
-		verifyZeroInteractions(requestId);
-	}
-
-	@Test
-	@SuppressWarnings("unchecked")
-	public void reuploadKeyWithoutEdge() {
-		doNothing().when(userResourceService).updateReuploadKeyFlagForUserResources(anyString(), anyBoolean());
-		List<UserInstanceDTO> instances = Collections.singletonList(getUserInstance());
-		when(exploratoryService.getInstancesWithStatuses(anyString(), any(UserInstanceStatus.class),
-				any(UserInstanceStatus.class))).thenReturn(instances);
-		List<ResourceData> resourceList = new ArrayList<>();
-		resourceList.add(new ResourceData(ResourceType.EXPLORATORY, "someId", EXPLORATORY_NAME, null));
-		when(userResourceService.convertToResourceData(any(List.class))).thenReturn(resourceList);
-		when(keyDAO.getEdgeInfoWhereStatusIn(anyString(), anyVararg())).thenReturn(Optional.empty());
-		doNothing().when(exploratoryDAO).updateStatusForExploratories(any(UserInstanceStatus.class), anyString(),
-				any(UserInstanceStatus.class));
-		doNothing().when(computationalDAO).updateStatusForComputationalResources(any(UserInstanceStatus.class),
-				anyString(), any(List.class), any(List.class), any(UserInstanceStatus.class));
-		ReuploadKeyDTO reuploadFile = mock(ReuploadKeyDTO.class);
-		when(requestBuilder.newKeyReupload(any(UserInfo.class), anyString(), anyString(), any(List.class)))
-				.thenReturn(reuploadFile);
-		String expectedUuid = "someUuid";
-		when(provisioningService.post(anyString(), anyString(), any(ReuploadKeyDTO.class), any()))
-				.thenReturn(expectedUuid);
-
-		String keyContent = "keyContent";
-		String actualUuid = reuploadKeyService.reuploadKey(userInfo, keyContent);
-		assertNotNull(actualUuid);
-		assertEquals(expectedUuid, actualUuid);
-		assertEquals(1, resourceList.size());
-
-		verify(userResourceService).updateReuploadKeyFlagForUserResources(USER, true);
-		verify(exploratoryService).getInstancesWithStatuses(USER, RUNNING, RUNNING);
-		verify(userResourceService).convertToResourceData(instances);
-		verify(keyDAO).getEdgeInfoWhereStatusIn(USER, RUNNING);
-		verify(exploratoryDAO).updateStatusForExploratories(REUPLOADING_KEY, USER, RUNNING);
-		verify(computationalDAO).updateStatusForComputationalResources(REUPLOADING_KEY, USER,
-				Arrays.asList(RUNNING, REUPLOADING_KEY), Arrays.asList(DataEngineType.SPARK_STANDALONE,
-						DataEngineType.CLOUD_SERVICE), RUNNING);
-		verify(requestBuilder).newKeyReupload(refEq(userInfo), anyString(), eq(keyContent), any(List.class));
-		verify(provisioningService).post("/key/reupload", TOKEN, reuploadFile, String.class);
-		verifyNoMoreInteractions(userResourceService, exploratoryService, keyDAO, exploratoryDAO, computationalDAO,
-				requestBuilder, provisioningService);
-		verifyZeroInteractions(requestId);
-	}
-
 	@Test
 	public void updateResourceDataForEdgeWhenStatusCompleted() {
 		ResourceData resource = new ResourceData(ResourceType.EDGE, "someId", null, null);
-		doNothing().when(keyDAO).updateEdgeStatus(anyString(), anyString());
-		doNothing().when(keyDAO).updateEdgeReuploadKey(anyString(), anyBoolean(), anyVararg());
 		ReuploadKeyStatusDTO dto = getReuploadKeyStatusDTO(resource, ReuploadKeyStatus.COMPLETED);
 
 		reuploadKeyService.updateResourceData(dto);
 
-		verify(keyDAO).updateEdgeStatus(USER, "running");
-		verify(keyDAO).updateEdgeReuploadKey(USER, false, UserInstanceStatus.values());
-		verifyNoMoreInteractions(keyDAO);
 		verifyZeroInteractions(exploratoryDAO, computationalDAO);
 	}
 
 	@Test
 	public void updateResourceDataForEdgeWhenStatusFailed() {
 		ResourceData resource = new ResourceData(ResourceType.EDGE, "someId", null, null);
-		doNothing().when(keyDAO).updateEdgeStatus(anyString(), anyString());
 
 		ReuploadKeyStatusDTO dto = getReuploadKeyStatusDTO(resource, ReuploadKeyStatus.FAILED);
 		reuploadKeyService.updateResourceData(dto);
 
-		verify(keyDAO).updateEdgeStatus(USER, "running");
-		verifyNoMoreInteractions(keyDAO);
 		verifyZeroInteractions(exploratoryDAO, computationalDAO);
 	}
 
@@ -232,7 +122,7 @@ public class ReuploadKeyServiceImplTest {
 		verify(exploratoryDAO).updateStatusForExploratory(USER, EXPLORATORY_NAME, RUNNING);
 		verify(exploratoryDAO).updateReuploadKeyForExploratory(USER, EXPLORATORY_NAME, false);
 		verifyNoMoreInteractions(exploratoryDAO);
-		verifyZeroInteractions(keyDAO, computationalDAO);
+		verifyZeroInteractions(computationalDAO);
 	}
 
 	@Test
@@ -247,7 +137,7 @@ public class ReuploadKeyServiceImplTest {
 
 		verify(exploratoryDAO).updateStatusForExploratory(USER, EXPLORATORY_NAME, RUNNING);
 		verifyNoMoreInteractions(exploratoryDAO);
-		verifyZeroInteractions(keyDAO, computationalDAO);
+		verifyZeroInteractions(computationalDAO);
 	}
 
 	@Test
@@ -265,7 +155,7 @@ public class ReuploadKeyServiceImplTest {
 		verify(computationalDAO).updateReuploadKeyFlagForComputationalResource(USER, EXPLORATORY_NAME, "compName",
 				false);
 		verifyNoMoreInteractions(computationalDAO);
-		verifyZeroInteractions(exploratoryDAO, keyDAO);
+		verifyZeroInteractions(exploratoryDAO);
 	}
 
 	@Test
@@ -279,13 +169,12 @@ public class ReuploadKeyServiceImplTest {
 
 		verify(computationalDAO).updateStatusForComputationalResource(USER, EXPLORATORY_NAME, "compName", RUNNING);
 		verifyNoMoreInteractions(computationalDAO);
-		verifyZeroInteractions(exploratoryDAO, keyDAO);
+		verifyZeroInteractions(exploratoryDAO);
 	}
 
 	@Test
 	@SuppressWarnings("unchecked")
 	public void reuploadKeyActionForEdge() {
-		doNothing().when(keyDAO).updateEdgeStatus(anyString(), anyString());
 		ReuploadKeyDTO reuploadFile = mock(ReuploadKeyDTO.class);
 		when(requestBuilder.newKeyReupload(any(UserInfo.class), anyString(), anyString(), any(List.class)))
 				.thenReturn(reuploadFile);
@@ -297,22 +186,19 @@ public class ReuploadKeyServiceImplTest {
 		ResourceData resource = new ResourceData(ResourceType.EDGE, "someId", null, null);
 		reuploadKeyService.reuploadKeyAction(userInfo, resource);
 
-		verify(keyDAO).updateEdgeStatus(USER, "reuploading key");
 		verify(requestBuilder).newKeyReupload(refEq(userInfo), anyString(), eq(""), any(List.class));
 		verify(provisioningService).post("/key/reupload", TOKEN, reuploadFile, String.class,
 				Collections.singletonMap("is_primary_reuploading", false));
 		verify(requestId).put(USER, expectedUuid);
-		verifyNoMoreInteractions(keyDAO, requestBuilder, provisioningService, requestId);
+		verifyNoMoreInteractions(requestBuilder, provisioningService, requestId);
 		verifyZeroInteractions(exploratoryDAO, computationalDAO);
 	}
 
 	@Test
 	@SuppressWarnings("unchecked")
 	public void reuploadKeyActionForEdgeWithException() {
-		doNothing().when(keyDAO).updateEdgeStatus(anyString(), eq("reuploading key"));
 		doThrow(new DlabException("Couldn't reupload key to edge"))
 				.when(requestBuilder).newKeyReupload(any(UserInfo.class), anyString(), anyString(), any(List.class));
-		doNothing().when(keyDAO).updateEdgeStatus(anyString(), eq("running"));
 
 		ResourceData resource = new ResourceData(ResourceType.EDGE, "someId", null, null);
 		try {
@@ -322,10 +208,8 @@ public class ReuploadKeyServiceImplTest {
 					e.getMessage());
 		}
 
-		verify(keyDAO).updateEdgeStatus(USER, "reuploading key");
 		verify(requestBuilder).newKeyReupload(refEq(userInfo), anyString(), eq(""), any(List.class));
-		verify(keyDAO).updateEdgeStatus(USER, "running");
-		verifyNoMoreInteractions(keyDAO, requestBuilder);
+		verifyNoMoreInteractions(requestBuilder);
 		verifyZeroInteractions(exploratoryDAO, computationalDAO, provisioningService, requestId);
 	}
 
@@ -351,7 +235,7 @@ public class ReuploadKeyServiceImplTest {
 				Collections.singletonMap("is_primary_reuploading", false));
 		verify(requestId).put(USER, expectedUuid);
 		verifyNoMoreInteractions(exploratoryDAO, requestBuilder, provisioningService, requestId);
-		verifyZeroInteractions(keyDAO, computationalDAO);
+		verifyZeroInteractions(computationalDAO);
 	}
 
 	@Test
@@ -376,7 +260,7 @@ public class ReuploadKeyServiceImplTest {
 		verify(requestBuilder).newKeyReupload(refEq(userInfo), anyString(), eq(""), any(List.class));
 		verify(exploratoryDAO).updateStatusForExploratory(USER, EXPLORATORY_NAME, RUNNING);
 		verifyNoMoreInteractions(exploratoryDAO, requestBuilder);
-		verifyZeroInteractions(keyDAO, computationalDAO, provisioningService, requestId);
+		verifyZeroInteractions(computationalDAO, provisioningService, requestId);
 	}
 
 	@Test
@@ -403,7 +287,7 @@ public class ReuploadKeyServiceImplTest {
 				Collections.singletonMap("is_primary_reuploading", false));
 		verify(requestId).put(USER, expectedUuid);
 		verifyNoMoreInteractions(computationalDAO, requestBuilder, provisioningService, requestId);
-		verifyZeroInteractions(keyDAO, exploratoryDAO);
+		verifyZeroInteractions(exploratoryDAO);
 	}
 
 	@Test
@@ -431,7 +315,7 @@ public class ReuploadKeyServiceImplTest {
 		verify(computationalDAO).updateStatusForComputationalResource(USER, EXPLORATORY_NAME,
 				"compName", RUNNING);
 		verifyNoMoreInteractions(computationalDAO, requestBuilder);
-		verifyZeroInteractions(keyDAO, exploratoryDAO, provisioningService, requestId);
+		verifyZeroInteractions(exploratoryDAO, provisioningService, requestId);
 	}
 
 	private UserInfo getUserInfo() {
diff --git a/services/self-service/src/test/java/com/epam/dlab/backendapi/service/impl/UserResourceServiceImplTest.java b/services/self-service/src/test/java/com/epam/dlab/backendapi/service/impl/UserResourceServiceImplTest.java
deleted file mode 100644
index 5343c2b..0000000
--- a/services/self-service/src/test/java/com/epam/dlab/backendapi/service/impl/UserResourceServiceImplTest.java
+++ /dev/null
@@ -1,109 +0,0 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements.  See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership.  The ASF licenses this file
- * to you 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.
- */
-package com.epam.dlab.backendapi.service.impl;
-
-
-import com.epam.dlab.backendapi.service.ComputationalService;
-import com.epam.dlab.backendapi.service.EdgeService;
-import com.epam.dlab.backendapi.service.ExploratoryService;
-import com.epam.dlab.dto.UserInstanceDTO;
-import com.epam.dlab.dto.base.DataEngineType;
-import com.epam.dlab.dto.computational.UserComputationalResource;
-import com.epam.dlab.model.ResourceData;
-import org.junit.Test;
-import org.junit.runner.RunWith;
-import org.mockito.InjectMocks;
-import org.mockito.Mock;
-import org.mockito.runners.MockitoJUnitRunner;
-
-import java.util.Arrays;
-import java.util.Collections;
-import java.util.List;
-
-import static com.epam.dlab.dto.UserInstanceStatus.*;
-import static org.junit.Assert.assertEquals;
-import static org.mockito.Mockito.*;
-
-@RunWith(MockitoJUnitRunner.class)
-public class UserResourceServiceImplTest {
-
-	private final String USER = "test";
-	private final String EXPLORATORY_NAME = "explName";
-
-	@Mock
-	private ExploratoryService exploratoryService;
-	@Mock
-	private ComputationalService computationalService;
-	@Mock
-	private EdgeService edgeService;
-
-	@InjectMocks
-	private UserResourceServiceImpl userResourceService;
-
-	@Test
-	public void convertToResourceData() {
-		List<UserInstanceDTO> userInstances = Collections.singletonList(getUserInstance());
-		List<ResourceData> expectedResourceList = Arrays.asList(
-				ResourceData.exploratoryResource("explId", EXPLORATORY_NAME),
-				ResourceData.computationalResource("compId", EXPLORATORY_NAME, "compName")
-		);
-		List<ResourceData> actualResourceList = userResourceService.convertToResourceData(userInstances);
-		assertEquals(2, actualResourceList.size());
-		assertEquals(expectedResourceList.get(0).toString(), actualResourceList.get(0).toString());
-		assertEquals(expectedResourceList.get(1).toString(), actualResourceList.get(1).toString());
-	}
-
-	@Test
-	@SuppressWarnings("unchecked")
-	public void updateReuploadKeyFlagForUserResources() {
-		doNothing().when(exploratoryService).updateExploratoriesReuploadKeyFlag(anyString(), anyBoolean(), anyVararg
-				());
-		doNothing().when(computationalService).updateComputationalsReuploadKeyFlag(anyString(), any(List.class),
-				any(List.class), anyBoolean(), anyVararg());
-		doNothing().when(edgeService).updateReuploadKeyFlag(anyString(), anyBoolean(), anyVararg());
-
-		userResourceService.updateReuploadKeyFlagForUserResources(USER, false);
-
-		verify(exploratoryService).updateExploratoriesReuploadKeyFlag(USER, false,
-				CREATING, CONFIGURING, STARTING, RUNNING, STOPPING, STOPPED);
-		verify(computationalService).updateComputationalsReuploadKeyFlag(USER,
-				Arrays.asList(STARTING, RUNNING, STOPPING, STOPPED),
-				Collections.singletonList(DataEngineType.SPARK_STANDALONE),
-				false,
-				CREATING, CONFIGURING, STARTING, RUNNING, STOPPING, STOPPED);
-		verify(computationalService).updateComputationalsReuploadKeyFlag(USER,
-				Collections.singletonList(RUNNING),
-				Collections.singletonList(DataEngineType.CLOUD_SERVICE),
-				false,
-				CREATING, CONFIGURING, STARTING, RUNNING);
-		verify(edgeService).updateReuploadKeyFlag(USER, false, STARTING, RUNNING, STOPPING, STOPPED);
-		verifyNoMoreInteractions(exploratoryService, computationalService, edgeService);
-	}
-
-	private UserInstanceDTO getUserInstance() {
-		UserComputationalResource computationalResource = new UserComputationalResource();
-		computationalResource.setComputationalId("compId");
-		computationalResource.setComputationalName("compName");
-		return new UserInstanceDTO()
-				.withUser(USER)
-				.withExploratoryId("explId")
-				.withExploratoryName(EXPLORATORY_NAME)
-				.withResources(Collections.singletonList(computationalResource));
-	}
-}


---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@dlab.apache.org
For additional commands, e-mail: commits-help@dlab.apache.org


[incubator-dlab] 01/03: [DLAB-1432](Part 1) Support a multiple cloud functionality

Posted by of...@apache.org.
This is an automated email from the ASF dual-hosted git repository.

ofuks pushed a commit to branch multiple-cloud
in repository https://gitbox.apache.org/repos/asf/incubator-dlab.git

commit c9108de32fa99fbc0454d905a323e03ebb68a0ef
Author: Oleh Fuks <ol...@gmail.com>
AuthorDate: Thu Jan 9 17:32:55 2020 +0200

    [DLAB-1432](Part 1) Support a multiple cloud functionality
---
 .../backendapi/ProvisioningServiceApplication.java |  5 +-
 .../healthcheck/ProvisioningHealthCheck.java       | 30 --------
 .../resources/ProvisioningHealthCheckResource.java | 15 ++--
 .../conf/SelfServiceApplicationConfiguration.java  | 13 ----
 .../epam/dlab/backendapi/dao/BaseBillingDAO.java   |  4 +-
 .../java/com/epam/dlab/backendapi/dao/EnvDAO.java  |  2 +-
 .../com/epam/dlab/backendapi/dao/MongoSetting.java |  2 +-
 .../com/epam/dlab/backendapi/dao/SettingsDAO.java  |  8 +--
 .../dlab/backendapi/dao/aws/AwsBillingDAO.java     |  8 ---
 .../dlab/backendapi/dao/azure/AzureBillingDAO.java |  5 --
 .../dlab/backendapi/dao/gcp/GcpBillingDao.java     |  6 --
 .../epam/dlab/backendapi/domain/EndpointDTO.java   |  7 +-
 .../dropwizard/listeners/MongoStartupListener.java |  4 +-
 .../backendapi/modules/AwsSelfServiceModule.java   |  8 +--
 .../backendapi/modules/AzureSelfServiceModule.java | 15 +---
 ...ServiceModule.java => CloudProviderModule.java} | 57 +++++++--------
 .../backendapi/modules/GcpSelfServiceModule.java   |  6 --
 .../dlab/backendapi/modules/ModuleFactory.java     |  7 +-
 .../dlab/backendapi/service/EndpointService.java   |  3 +-
 .../service/aws/AwsInfrastructureInfoService.java  | 40 -----------
 .../aws/AwsInfrastructureTemplateService.java      | 56 ---------------
 .../azure/AzureInfrastructureInfoService.java      | 45 ------------
 .../azure/AzureInfrastructureTemplateService.java  | 37 ----------
 .../service/gcp/GcpInfrastructureInfoService.java  | 40 -----------
 .../gcp/GcpInfrastructureTemplateService.java      | 55 --------------
 .../service/impl/EndpointServiceImpl.java          | 21 +++---
 ...ase.java => InfrastructureInfoServiceImpl.java} | 42 ++++++++---
 ...java => InfrastructureTemplateServiceImpl.java} | 68 +++++++++++++++---
 .../aws/AwsInfrastructureInfoServiceTest.java      | 47 ------------
 .../aws/AwsInfrastructureTemplateServiceTest.java  | 84 ----------------------
 .../azure/AzureInfrastructureInfoServiceTest.java  | 57 ---------------
 .../AzureInfrastructureTemplateServiceTest.java    | 38 ----------
 .../gcp/GcpInfrastructureInfoServiceTest.java      | 47 ------------
 .../gcp/GcpInfrastructureTemplateServiceTest.java  | 81 ---------------------
 .../service/impl/ComputationalServiceImplTest.java |  3 +-
 .../service/impl/ExploratoryServiceImplTest.java   |  3 +-
 .../service/impl/GitCredentialServiceImplTest.java |  3 +-
 .../impl/ImageExploratoryServiceImplTest.java      |  3 +-
 .../InfrastructureTemplateServiceBaseTest.java     | 22 ++++--
 .../service/impl/LibraryServiceImplTest.java       |  3 +-
 40 files changed, 185 insertions(+), 815 deletions(-)

diff --git a/services/provisioning-service/src/main/java/com/epam/dlab/backendapi/ProvisioningServiceApplication.java b/services/provisioning-service/src/main/java/com/epam/dlab/backendapi/ProvisioningServiceApplication.java
index 5cc0d2d..6f1047b 100644
--- a/services/provisioning-service/src/main/java/com/epam/dlab/backendapi/ProvisioningServiceApplication.java
+++ b/services/provisioning-service/src/main/java/com/epam/dlab/backendapi/ProvisioningServiceApplication.java
@@ -24,7 +24,6 @@ import com.epam.dlab.auth.UserInfo;
 import com.epam.dlab.backendapi.core.DirectoriesCreator;
 import com.epam.dlab.backendapi.core.DockerWarmuper;
 import com.epam.dlab.backendapi.core.response.handlers.ComputationalConfigure;
-import com.epam.dlab.backendapi.healthcheck.ProvisioningHealthCheck;
 import com.epam.dlab.backendapi.modules.CloudModuleConfigurator;
 import com.epam.dlab.backendapi.modules.ModuleFactory;
 import com.epam.dlab.backendapi.resources.*;
@@ -129,7 +128,6 @@ public class ProvisioningServiceApplication extends Application<ProvisioningServ
 			environment.lifecycle().manage(injector.getInstance(RestoreCallbackHandlerServiceImpl.class));
 		}
 		environment.lifecycle().manage(injector.getInstance(DockerWarmuper.class));
-		environment.healthChecks().register("ProvisioningHealthCheck", new ProvisioningHealthCheck());
 
 
 		JerseyEnvironment jersey = environment.jersey();
@@ -146,7 +144,6 @@ public class ProvisioningServiceApplication extends Application<ProvisioningServ
 		jersey.register(injector.getInstance(KeyResource.class));
 		jersey.register(injector.getInstance(CallbackHandlerResource.class));
 		jersey.register(injector.getInstance(ProjectResource.class));
-		jersey.register(new ProvisioningHealthCheckResource(environment.healthChecks()));
-
+		jersey.register(injector.getInstance(ProvisioningHealthCheckResource.class));
 	}
 }
diff --git a/services/provisioning-service/src/main/java/com/epam/dlab/backendapi/healthcheck/ProvisioningHealthCheck.java b/services/provisioning-service/src/main/java/com/epam/dlab/backendapi/healthcheck/ProvisioningHealthCheck.java
deleted file mode 100644
index 75fcb47..0000000
--- a/services/provisioning-service/src/main/java/com/epam/dlab/backendapi/healthcheck/ProvisioningHealthCheck.java
+++ /dev/null
@@ -1,30 +0,0 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements.  See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership.  The ASF licenses this file
- * to you 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.
- */
-
-package com.epam.dlab.backendapi.healthcheck;
-
-import com.codahale.metrics.health.HealthCheck;
-
-public class ProvisioningHealthCheck extends HealthCheck {
-
-    @Override
-    protected Result check() {
-        return Result.healthy();
-    }
-}
\ No newline at end of file
diff --git a/services/provisioning-service/src/main/java/com/epam/dlab/backendapi/resources/ProvisioningHealthCheckResource.java b/services/provisioning-service/src/main/java/com/epam/dlab/backendapi/resources/ProvisioningHealthCheckResource.java
index cf93523..e50d7ae 100644
--- a/services/provisioning-service/src/main/java/com/epam/dlab/backendapi/resources/ProvisioningHealthCheckResource.java
+++ b/services/provisioning-service/src/main/java/com/epam/dlab/backendapi/resources/ProvisioningHealthCheckResource.java
@@ -19,8 +19,10 @@
 
 package com.epam.dlab.backendapi.resources;
 
-import com.codahale.metrics.health.HealthCheckRegistry;
+
 import com.epam.dlab.auth.UserInfo;
+import com.epam.dlab.backendapi.ProvisioningServiceApplicationConfiguration;
+import com.google.inject.Inject;
 import io.dropwizard.auth.Auth;
 
 import javax.ws.rs.GET;
@@ -32,16 +34,13 @@ import javax.ws.rs.core.Response;
 @Path("/healthcheck")
 @Produces(MediaType.APPLICATION_JSON)
 public class ProvisioningHealthCheckResource {
-    private static final String HEALTH_CHECK= "ProvisioningHealthCheck";
-
-    private HealthCheckRegistry registry;
+    private static final String HEALTH_CHECK = "ProvisioningHealthCheck";
 
-    public ProvisioningHealthCheckResource(HealthCheckRegistry registry) {
-        this.registry = registry;
-    }
+    @Inject
+    private ProvisioningServiceApplicationConfiguration configuration;
 
     @GET
     public Response status(@Auth UserInfo ui) {
-        return Response.ok(registry.runHealthCheck(HEALTH_CHECK)).build();
+        return Response.ok(configuration.getCloudProvider()).build();
     }
 }
\ No newline at end of file
diff --git a/services/self-service/src/main/java/com/epam/dlab/backendapi/conf/SelfServiceApplicationConfiguration.java b/services/self-service/src/main/java/com/epam/dlab/backendapi/conf/SelfServiceApplicationConfiguration.java
index 48410d1..4c2f7bf 100644
--- a/services/self-service/src/main/java/com/epam/dlab/backendapi/conf/SelfServiceApplicationConfiguration.java
+++ b/services/self-service/src/main/java/com/epam/dlab/backendapi/conf/SelfServiceApplicationConfiguration.java
@@ -70,9 +70,6 @@ public class SelfServiceApplicationConfiguration extends ServiceConfiguration {
 	private int maxSparkInstanceCount;
 
 	@JsonProperty
-	private boolean azureUseLdap;
-
-	@JsonProperty
 	private String ssnInstanceSize;
 
 	@JsonProperty
@@ -101,8 +98,6 @@ public class SelfServiceApplicationConfiguration extends ServiceConfiguration {
 	@JsonProperty
 	private boolean gcpOuauth2AuthenticationEnabled;
 	@JsonProperty
-	private long maxSessionDurabilityMilliseconds;
-	@JsonProperty
 	private boolean mongoMigrationEnabled;
 	@JsonProperty
 	private int privateKeySize = 2048;
@@ -146,10 +141,6 @@ public class SelfServiceApplicationConfiguration extends ServiceConfiguration {
 		return jerseyClient;
 	}
 
-	public long getMaxSessionDurabilityMilliseconds() {
-		return maxSessionDurabilityMilliseconds;
-	}
-
 	public Map<String, SchedulerConfigurationData> getSchedulers() {
 		return schedulers;
 	}
@@ -245,10 +236,6 @@ public class SelfServiceApplicationConfiguration extends ServiceConfiguration {
 		return privateKeySize;
 	}
 
-	public boolean isAzureUseLdap() {
-		return azureUseLdap;
-	}
-
 	public String getSsnInstanceSize() {
 		return ssnInstanceSize;
 	}
diff --git a/services/self-service/src/main/java/com/epam/dlab/backendapi/dao/BaseBillingDAO.java b/services/self-service/src/main/java/com/epam/dlab/backendapi/dao/BaseBillingDAO.java
index 4fc374a..c3d0255 100644
--- a/services/self-service/src/main/java/com/epam/dlab/backendapi/dao/BaseBillingDAO.java
+++ b/services/self-service/src/main/java/com/epam/dlab/backendapi/dao/BaseBillingDAO.java
@@ -451,7 +451,9 @@ public abstract class BaseBillingDAO<T extends BillingFilter> extends BaseDAO im
 		return settings.getServiceBaseName();
 	}
 
-	protected abstract String getSsnShape();
+	protected String getSsnShape() {
+		return settings.getSsnInstanceSize();
+	}
 
 	protected void usersToLowerCase(List<String> users) {
 		if (users != null) {
diff --git a/services/self-service/src/main/java/com/epam/dlab/backendapi/dao/EnvDAO.java b/services/self-service/src/main/java/com/epam/dlab/backendapi/dao/EnvDAO.java
index bbe0a2f..32065f2 100644
--- a/services/self-service/src/main/java/com/epam/dlab/backendapi/dao/EnvDAO.java
+++ b/services/self-service/src/main/java/com/epam/dlab/backendapi/dao/EnvDAO.java
@@ -421,7 +421,7 @@ public class EnvDAO extends BaseDAO {
 			LOGGER.debug("Computational status for user {} with exploratory {} and computational {} will be updated " +
 							"from {} to {}",
 					user, exploratoryName, computationalName, oldStatus, status);
-			if (configuration.getCloudProvider() == CloudProvider.AWS && status == UserInstanceStatus.TERMINATED &&
+			if (status == UserInstanceStatus.TERMINATED &&
 					terminateComputationalSpot(user, exploratoryName, computationalName)) {
 				return;
 			}
diff --git a/services/self-service/src/main/java/com/epam/dlab/backendapi/dao/MongoSetting.java b/services/self-service/src/main/java/com/epam/dlab/backendapi/dao/MongoSetting.java
index 4656b6b..bfa4e84 100644
--- a/services/self-service/src/main/java/com/epam/dlab/backendapi/dao/MongoSetting.java
+++ b/services/self-service/src/main/java/com/epam/dlab/backendapi/dao/MongoSetting.java
@@ -84,7 +84,7 @@ public enum MongoSetting {
 	AZURE_VPC_NAME("azure_vpc_name"),
 	AZURE_SECURITY_GROUP_NAME("azure_security_group_name"),
 	AZURE_EDGE_INSTANCE_SIZE("edge_instance_size"),
-	AZURE_SSN_INSTANCE_SIZE("ssn_instance_size"),
+	SSN_INSTANCE_SIZE("ssn_instance_size"),
 	AZURE_DATA_LAKE_NAME_TAG("datalake_tag_name"),
 	AZURE_DATA_LAKE_CLIENT_ID("azure_client_id"),
 
diff --git a/services/self-service/src/main/java/com/epam/dlab/backendapi/dao/SettingsDAO.java b/services/self-service/src/main/java/com/epam/dlab/backendapi/dao/SettingsDAO.java
index ff58d4a..d5770e1 100644
--- a/services/self-service/src/main/java/com/epam/dlab/backendapi/dao/SettingsDAO.java
+++ b/services/self-service/src/main/java/com/epam/dlab/backendapi/dao/SettingsDAO.java
@@ -241,8 +241,8 @@ public class SettingsDAO extends BaseDAO {
 		return getSetting(AZURE_EDGE_INSTANCE_SIZE);
 	}
 
-	public String getAzureSsnInstanceSize() {
-		return getSetting(AZURE_SSN_INSTANCE_SIZE);
+	public String getSsnInstanceSize() {
+		return getSetting(SSN_INSTANCE_SIZE);
 	}
 
 	public String getAzureDataLakeNameTag() {
@@ -282,8 +282,8 @@ public class SettingsDAO extends BaseDAO {
 		setSetting(AZURE_EDGE_INSTANCE_SIZE, azureEdgeInstanceSize);
 	}
 
-	public void setAzureSsnInstanceSize(String ssnInstanceSize) {
-		setSetting(AZURE_SSN_INSTANCE_SIZE, ssnInstanceSize);
+	public void setSsnInstanceSize(String ssnInstanceSize) {
+		setSetting(SSN_INSTANCE_SIZE, ssnInstanceSize);
 	}
 
 	public void setAzureDataLakeNameTag(String dataLakeNameTag) {
diff --git a/services/self-service/src/main/java/com/epam/dlab/backendapi/dao/aws/AwsBillingDAO.java b/services/self-service/src/main/java/com/epam/dlab/backendapi/dao/aws/AwsBillingDAO.java
index 5205cc4..6d2208a 100644
--- a/services/self-service/src/main/java/com/epam/dlab/backendapi/dao/aws/AwsBillingDAO.java
+++ b/services/self-service/src/main/java/com/epam/dlab/backendapi/dao/aws/AwsBillingDAO.java
@@ -64,12 +64,4 @@ public class AwsBillingDAO extends BaseBillingDAO<AwsBillingFilter> {
     protected List<Bson> cloudMatchCriteria(AwsBillingFilter filter) {
         return Collections.emptyList();
     }
-
-
-    @Override
-    protected String getSsnShape() {
-        return "t2.medium";
-    }
-
-
 }
\ No newline at end of file
diff --git a/services/self-service/src/main/java/com/epam/dlab/backendapi/dao/azure/AzureBillingDAO.java b/services/self-service/src/main/java/com/epam/dlab/backendapi/dao/azure/AzureBillingDAO.java
index 863f3eb..784ed0e 100644
--- a/services/self-service/src/main/java/com/epam/dlab/backendapi/dao/azure/AzureBillingDAO.java
+++ b/services/self-service/src/main/java/com/epam/dlab/backendapi/dao/azure/AzureBillingDAO.java
@@ -79,11 +79,6 @@ public class AzureBillingDAO extends BaseBillingDAO<AzureBillingFilter> {
 	}
 
 	@Override
-	protected String getSsnShape() {
-		return settings.getAzureSsnInstanceSize();
-	}
-
-	@Override
 	protected String shapeFieldName() {
 		return SIZE;
 	}
diff --git a/services/self-service/src/main/java/com/epam/dlab/backendapi/dao/gcp/GcpBillingDao.java b/services/self-service/src/main/java/com/epam/dlab/backendapi/dao/gcp/GcpBillingDao.java
index b9d1488..8cae0af 100644
--- a/services/self-service/src/main/java/com/epam/dlab/backendapi/dao/gcp/GcpBillingDao.java
+++ b/services/self-service/src/main/java/com/epam/dlab/backendapi/dao/gcp/GcpBillingDao.java
@@ -57,10 +57,4 @@ public class GcpBillingDao extends BaseBillingDAO<GcpBillingFilter> {
     protected List<Bson> cloudMatchCriteria(GcpBillingFilter filter) {
         return Collections.emptyList();
     }
-
-
-    @Override
-    protected String getSsnShape() {
-        return "t2.medium";
-    }
 }
diff --git a/services/self-service/src/main/java/com/epam/dlab/backendapi/domain/EndpointDTO.java b/services/self-service/src/main/java/com/epam/dlab/backendapi/domain/EndpointDTO.java
index c5a2d40..2fac97c 100644
--- a/services/self-service/src/main/java/com/epam/dlab/backendapi/domain/EndpointDTO.java
+++ b/services/self-service/src/main/java/com/epam/dlab/backendapi/domain/EndpointDTO.java
@@ -19,6 +19,7 @@
 
 package com.epam.dlab.backendapi.domain;
 
+import com.epam.dlab.cloud.CloudProvider;
 import com.fasterxml.jackson.annotation.JsonIgnoreProperties;
 import com.fasterxml.jackson.annotation.JsonProperty;
 import lombok.Data;
@@ -35,11 +36,7 @@ public class EndpointDTO {
 	@JsonProperty("endpoint_tag")
 	private final String tag;
 	private final EndpointStatus status;
-
-	public static EndpointDTO withEndpointStatus(EndpointDTO endpointDTO) {
-		return new EndpointDTO(endpointDTO.getName(), endpointDTO.getUrl(), endpointDTO.getAccount(),
-				endpointDTO.getTag(), EndpointDTO.EndpointStatus.ACTIVE);
-	}
+	private final CloudProvider cloudProvider;
 
 	public enum EndpointStatus {
 		ACTIVE,
diff --git a/services/self-service/src/main/java/com/epam/dlab/backendapi/dropwizard/listeners/MongoStartupListener.java b/services/self-service/src/main/java/com/epam/dlab/backendapi/dropwizard/listeners/MongoStartupListener.java
index 9d43df4..d83bfe7 100644
--- a/services/self-service/src/main/java/com/epam/dlab/backendapi/dropwizard/listeners/MongoStartupListener.java
+++ b/services/self-service/src/main/java/com/epam/dlab/backendapi/dropwizard/listeners/MongoStartupListener.java
@@ -40,9 +40,7 @@ public class MongoStartupListener implements ServerLifecycleListener {
 	public void serverStarted(Server server) {
 		settingsDAO.setServiceBaseName(configuration.getServiceBaseName());
 		settingsDAO.setConfOsFamily(configuration.getOs());
-		if (configuration.getCloudProvider() == CloudProvider.AZURE) {
-			settingsDAO.setAzureSsnInstanceSize(configuration.getSsnInstanceSize());
-		}
+		settingsDAO.setSsnInstanceSize(configuration.getSsnInstanceSize());
 		if (userRoleDao.findAll().isEmpty()) {
 			log.debug("Populating DLab roles into database");
 			userRoleDao.insert(getRoles());
diff --git a/services/self-service/src/main/java/com/epam/dlab/backendapi/modules/AwsSelfServiceModule.java b/services/self-service/src/main/java/com/epam/dlab/backendapi/modules/AwsSelfServiceModule.java
index f4db277..a2f9217 100644
--- a/services/self-service/src/main/java/com/epam/dlab/backendapi/modules/AwsSelfServiceModule.java
+++ b/services/self-service/src/main/java/com/epam/dlab/backendapi/modules/AwsSelfServiceModule.java
@@ -20,8 +20,8 @@
 package com.epam.dlab.backendapi.modules;
 
 import com.epam.dlab.backendapi.SelfServiceApplication;
-import com.epam.dlab.backendapi.conf.SelfServiceApplicationConfiguration;
 import com.epam.dlab.backendapi.annotation.BudgetLimited;
+import com.epam.dlab.backendapi.conf.SelfServiceApplicationConfiguration;
 import com.epam.dlab.backendapi.dao.BillingDAO;
 import com.epam.dlab.backendapi.dao.KeyDAO;
 import com.epam.dlab.backendapi.dao.aws.AwsBillingDAO;
@@ -32,11 +32,7 @@ import com.epam.dlab.backendapi.resources.aws.ComputationalResourceAws;
 import com.epam.dlab.backendapi.resources.callback.aws.EdgeCallbackAws;
 import com.epam.dlab.backendapi.resources.callback.aws.KeyUploaderCallbackAws;
 import com.epam.dlab.backendapi.service.BillingService;
-import com.epam.dlab.backendapi.service.InfrastructureInfoService;
-import com.epam.dlab.backendapi.service.InfrastructureTemplateService;
 import com.epam.dlab.backendapi.service.aws.AwsBillingService;
-import com.epam.dlab.backendapi.service.aws.AwsInfrastructureInfoService;
-import com.epam.dlab.backendapi.service.aws.AwsInfrastructureTemplateService;
 import com.epam.dlab.cloud.CloudModule;
 import com.epam.dlab.mongo.MongoServiceFactory;
 import com.fiestacabin.dropwizard.quartz.SchedulerConfiguration;
@@ -61,10 +57,8 @@ public class AwsSelfServiceModule extends CloudModule {
 	protected void configure() {
 		bind(BillingService.class).to(AwsBillingService.class);
 		bind((KeyDAO.class)).to(AwsKeyDao.class);
-		bind(InfrastructureInfoService.class).to(AwsInfrastructureInfoService.class);
 		bind(SchedulerConfiguration.class).toInstance(
 				new SchedulerConfiguration(SelfServiceApplication.class.getPackage().getName()));
-		bind(InfrastructureTemplateService.class).to(AwsInfrastructureTemplateService.class);
 		bind(BillingDAO.class).to(AwsBillingDAO.class);
 		final BudgetLimitInterceptor budgetLimitInterceptor = new BudgetLimitInterceptor();
 		requestInjection(budgetLimitInterceptor);
diff --git a/services/self-service/src/main/java/com/epam/dlab/backendapi/modules/AzureSelfServiceModule.java b/services/self-service/src/main/java/com/epam/dlab/backendapi/modules/AzureSelfServiceModule.java
index f1b62e1..b35cdfc 100644
--- a/services/self-service/src/main/java/com/epam/dlab/backendapi/modules/AzureSelfServiceModule.java
+++ b/services/self-service/src/main/java/com/epam/dlab/backendapi/modules/AzureSelfServiceModule.java
@@ -20,8 +20,8 @@
 package com.epam.dlab.backendapi.modules;
 
 import com.epam.dlab.backendapi.SelfServiceApplication;
-import com.epam.dlab.backendapi.conf.SelfServiceApplicationConfiguration;
 import com.epam.dlab.backendapi.annotation.BudgetLimited;
+import com.epam.dlab.backendapi.conf.SelfServiceApplicationConfiguration;
 import com.epam.dlab.backendapi.dao.BillingDAO;
 import com.epam.dlab.backendapi.dao.KeyDAO;
 import com.epam.dlab.backendapi.dao.azure.AzureBillingDAO;
@@ -32,11 +32,7 @@ import com.epam.dlab.backendapi.resources.azure.ComputationalResourceAzure;
 import com.epam.dlab.backendapi.resources.callback.azure.EdgeCallbackAzure;
 import com.epam.dlab.backendapi.resources.callback.azure.KeyUploaderCallbackAzure;
 import com.epam.dlab.backendapi.service.BillingService;
-import com.epam.dlab.backendapi.service.InfrastructureInfoService;
-import com.epam.dlab.backendapi.service.InfrastructureTemplateService;
 import com.epam.dlab.backendapi.service.azure.AzureBillingService;
-import com.epam.dlab.backendapi.service.azure.AzureInfrastructureInfoService;
-import com.epam.dlab.backendapi.service.azure.AzureInfrastructureTemplateService;
 import com.epam.dlab.cloud.CloudModule;
 import com.epam.dlab.mongo.MongoServiceFactory;
 import com.fiestacabin.dropwizard.quartz.SchedulerConfiguration;
@@ -58,22 +54,13 @@ public class AzureSelfServiceModule extends CloudModule {
 	private static final String MONGO_URI_FORMAT = "mongodb://%s:%s@%s:%d/%s";
 	private static final String QUARTZ_MONGO_URI_PROPERTY = "org.quartz.jobStore.mongoUri";
 	private static final String QUARTZ_DB_NAME = "org.quartz.jobStore.dbName";
-	private boolean useLdap;
-	private long maxSessionDurabilityMilliseconds;
-
-	public AzureSelfServiceModule(boolean useLdap, long maxSessionDurabilityMilliseconds) {
-		this.useLdap = useLdap;
-		this.maxSessionDurabilityMilliseconds = maxSessionDurabilityMilliseconds;
-	}
 
 	@Override
 	protected void configure() {
 		bind(BillingService.class).to(AzureBillingService.class);
 		bind((KeyDAO.class)).to(AzureKeyDao.class);
-		bind(InfrastructureInfoService.class).to(AzureInfrastructureInfoService.class);
 		bind(SchedulerConfiguration.class).toInstance(
 				new SchedulerConfiguration(SelfServiceApplication.class.getPackage().getName()));
-		bind(InfrastructureTemplateService.class).to(AzureInfrastructureTemplateService.class);
 		bind(BillingDAO.class).to(AzureBillingDAO.class);
 		final BudgetLimitInterceptor budgetLimitInterceptor = new BudgetLimitInterceptor();
 		requestInjection(budgetLimitInterceptor);
diff --git a/services/self-service/src/main/java/com/epam/dlab/backendapi/modules/GcpSelfServiceModule.java b/services/self-service/src/main/java/com/epam/dlab/backendapi/modules/CloudProviderModule.java
similarity index 67%
copy from services/self-service/src/main/java/com/epam/dlab/backendapi/modules/GcpSelfServiceModule.java
copy to services/self-service/src/main/java/com/epam/dlab/backendapi/modules/CloudProviderModule.java
index 90c3fde..c41a67d 100644
--- a/services/self-service/src/main/java/com/epam/dlab/backendapi/modules/GcpSelfServiceModule.java
+++ b/services/self-service/src/main/java/com/epam/dlab/backendapi/modules/CloudProviderModule.java
@@ -24,20 +24,19 @@ import com.epam.dlab.backendapi.annotation.BudgetLimited;
 import com.epam.dlab.backendapi.conf.SelfServiceApplicationConfiguration;
 import com.epam.dlab.backendapi.dao.BillingDAO;
 import com.epam.dlab.backendapi.dao.KeyDAO;
-import com.epam.dlab.backendapi.dao.gcp.GcpBillingDao;
-import com.epam.dlab.backendapi.dao.gcp.GcpKeyDao;
+import com.epam.dlab.backendapi.dao.aws.AwsBillingDAO;
+import com.epam.dlab.backendapi.dao.aws.AwsKeyDao;
 import com.epam.dlab.backendapi.interceptor.BudgetLimitInterceptor;
-import com.epam.dlab.backendapi.resources.callback.gcp.EdgeCallbackGcp;
-import com.epam.dlab.backendapi.resources.callback.gcp.KeyUploaderCallbackGcp;
-import com.epam.dlab.backendapi.resources.gcp.BillingResourceGcp;
-import com.epam.dlab.backendapi.resources.gcp.ComputationalResourceGcp;
-import com.epam.dlab.backendapi.resources.gcp.GcpOauthResource;
+import com.epam.dlab.backendapi.resources.aws.BillingResourceAws;
+import com.epam.dlab.backendapi.resources.aws.ComputationalResourceAws;
+import com.epam.dlab.backendapi.resources.callback.aws.EdgeCallbackAws;
+import com.epam.dlab.backendapi.resources.callback.aws.KeyUploaderCallbackAws;
 import com.epam.dlab.backendapi.service.BillingService;
 import com.epam.dlab.backendapi.service.InfrastructureInfoService;
 import com.epam.dlab.backendapi.service.InfrastructureTemplateService;
-import com.epam.dlab.backendapi.service.gcp.GcpBillingService;
-import com.epam.dlab.backendapi.service.gcp.GcpInfrastructureInfoService;
-import com.epam.dlab.backendapi.service.gcp.GcpInfrastructureTemplateService;
+import com.epam.dlab.backendapi.service.aws.AwsBillingService;
+import com.epam.dlab.backendapi.service.impl.InfrastructureInfoServiceImpl;
+import com.epam.dlab.backendapi.service.impl.InfrastructureTemplateServiceImpl;
 import com.epam.dlab.cloud.CloudModule;
 import com.epam.dlab.mongo.MongoServiceFactory;
 import com.fiestacabin.dropwizard.quartz.SchedulerConfiguration;
@@ -52,40 +51,38 @@ import org.quartz.impl.StdSchedulerFactory;
 import static com.google.inject.matcher.Matchers.annotatedWith;
 import static com.google.inject.matcher.Matchers.any;
 
-public class GcpSelfServiceModule extends CloudModule {
+public class CloudProviderModule extends CloudModule {
 
     private static final String MONGO_URI_FORMAT = "mongodb://%s:%s@%s:%d/%s";
     private static final String QUARTZ_MONGO_URI_PROPERTY = "org.quartz.jobStore.mongoUri";
     private static final String QUARTZ_DB_NAME = "org.quartz.jobStore.dbName";
 
     @Override
-    @SuppressWarnings("unchecked")
-    public void init(Environment environment, Injector injector) {
-
-		environment.jersey().register(injector.getInstance(EdgeCallbackGcp.class));
-		environment.jersey().register(injector.getInstance(KeyUploaderCallbackGcp.class));
-		environment.jersey().register(injector.getInstance(ComputationalResourceGcp.class));
-		environment.jersey().register(injector.getInstance(BillingResourceGcp.class));
-		if (injector.getInstance(SelfServiceApplicationConfiguration.class).isGcpOuauth2AuthenticationEnabled()) {
-			environment.jersey().register(injector.getInstance(GcpOauthResource.class));
-		}
-
-    }
-
-    @Override
     protected void configure() {
-        bind(BillingService.class).to(GcpBillingService.class);
-        bind((KeyDAO.class)).to(GcpKeyDao.class);
-        bind(InfrastructureInfoService.class).to(GcpInfrastructureInfoService.class);
-        bind(InfrastructureTemplateService.class).to(GcpInfrastructureTemplateService.class);
-        bind(BillingDAO.class).to(GcpBillingDao.class);
+        bind(BillingService.class).to(AwsBillingService.class);// not done
+        bind(BillingDAO.class).to(AwsBillingDAO.class);//not done
+        bind(InfrastructureInfoService.class).to(InfrastructureInfoServiceImpl.class);
+        bind(InfrastructureTemplateService.class).to(InfrastructureTemplateServiceImpl.class);
         bind(SchedulerConfiguration.class).toInstance(
                 new SchedulerConfiguration(SelfServiceApplication.class.getPackage().getName()));
+
+
+        bind((KeyDAO.class)).to(AwsKeyDao.class);
+
         final BudgetLimitInterceptor budgetLimitInterceptor = new BudgetLimitInterceptor();
         requestInjection(budgetLimitInterceptor);
         bindInterceptor(any(), annotatedWith(BudgetLimited.class), budgetLimitInterceptor);
     }
 
+    @Override
+    public void init(Environment environment, Injector injector) {
+        environment.jersey().register(injector.getInstance(EdgeCallbackAws.class));
+        environment.jersey().register(injector.getInstance(KeyUploaderCallbackAws.class));
+        environment.jersey().register(injector.getInstance(ComputationalResourceAws.class));
+        environment.jersey().register(injector.getInstance(BillingResourceAws.class));
+    }
+
+
     @Provides
     @Singleton
     Scheduler provideScheduler(SelfServiceApplicationConfiguration configuration) throws SchedulerException {
diff --git a/services/self-service/src/main/java/com/epam/dlab/backendapi/modules/GcpSelfServiceModule.java b/services/self-service/src/main/java/com/epam/dlab/backendapi/modules/GcpSelfServiceModule.java
index 90c3fde..8c9ff00 100644
--- a/services/self-service/src/main/java/com/epam/dlab/backendapi/modules/GcpSelfServiceModule.java
+++ b/services/self-service/src/main/java/com/epam/dlab/backendapi/modules/GcpSelfServiceModule.java
@@ -33,11 +33,7 @@ import com.epam.dlab.backendapi.resources.gcp.BillingResourceGcp;
 import com.epam.dlab.backendapi.resources.gcp.ComputationalResourceGcp;
 import com.epam.dlab.backendapi.resources.gcp.GcpOauthResource;
 import com.epam.dlab.backendapi.service.BillingService;
-import com.epam.dlab.backendapi.service.InfrastructureInfoService;
-import com.epam.dlab.backendapi.service.InfrastructureTemplateService;
 import com.epam.dlab.backendapi.service.gcp.GcpBillingService;
-import com.epam.dlab.backendapi.service.gcp.GcpInfrastructureInfoService;
-import com.epam.dlab.backendapi.service.gcp.GcpInfrastructureTemplateService;
 import com.epam.dlab.cloud.CloudModule;
 import com.epam.dlab.mongo.MongoServiceFactory;
 import com.fiestacabin.dropwizard.quartz.SchedulerConfiguration;
@@ -76,8 +72,6 @@ public class GcpSelfServiceModule extends CloudModule {
     protected void configure() {
         bind(BillingService.class).to(GcpBillingService.class);
         bind((KeyDAO.class)).to(GcpKeyDao.class);
-        bind(InfrastructureInfoService.class).to(GcpInfrastructureInfoService.class);
-        bind(InfrastructureTemplateService.class).to(GcpInfrastructureTemplateService.class);
         bind(BillingDAO.class).to(GcpBillingDao.class);
         bind(SchedulerConfiguration.class).toInstance(
                 new SchedulerConfiguration(SelfServiceApplication.class.getPackage().getName()));
diff --git a/services/self-service/src/main/java/com/epam/dlab/backendapi/modules/ModuleFactory.java b/services/self-service/src/main/java/com/epam/dlab/backendapi/modules/ModuleFactory.java
index 06ac774..7ab2ac0 100644
--- a/services/self-service/src/main/java/com/epam/dlab/backendapi/modules/ModuleFactory.java
+++ b/services/self-service/src/main/java/com/epam/dlab/backendapi/modules/ModuleFactory.java
@@ -46,12 +46,15 @@ public class ModuleFactory {
 	}
 
 	public static CloudModule getCloudProviderModule(SelfServiceApplicationConfiguration configuration) {
+		return new CloudProviderModule();
+	}
+
+	private static CloudModule getCloudModule(SelfServiceApplicationConfiguration configuration) {
 		switch (configuration.getCloudProvider()) {
 			case AWS:
 				return new AwsSelfServiceModule();
 			case AZURE:
-				return new AzureSelfServiceModule(configuration.isAzureUseLdap(),
-						configuration.getMaxSessionDurabilityMilliseconds());
+				return new AzureSelfServiceModule();
 			case GCP:
 				return new GcpSelfServiceModule();
 			default:
diff --git a/services/self-service/src/main/java/com/epam/dlab/backendapi/service/EndpointService.java b/services/self-service/src/main/java/com/epam/dlab/backendapi/service/EndpointService.java
index 456d330..dde3547 100644
--- a/services/self-service/src/main/java/com/epam/dlab/backendapi/service/EndpointService.java
+++ b/services/self-service/src/main/java/com/epam/dlab/backendapi/service/EndpointService.java
@@ -4,6 +4,7 @@ import com.epam.dlab.auth.UserInfo;
 import com.epam.dlab.backendapi.domain.EndpointDTO;
 import com.epam.dlab.backendapi.domain.EndpointResourcesDTO;
 import com.epam.dlab.backendapi.domain.ProjectDTO;
+import com.epam.dlab.cloud.CloudProvider;
 
 import java.util.List;
 
@@ -24,5 +25,5 @@ public interface EndpointService {
 
 	void removeEndpointInAllProjects(UserInfo userInfo, String endpointName, List<ProjectDTO> projects);
 
-    void checkEndpointUrl(UserInfo userInfo, String url);
+    CloudProvider checkEndpointUrl(UserInfo userInfo, String url);
 }
diff --git a/services/self-service/src/main/java/com/epam/dlab/backendapi/service/aws/AwsInfrastructureInfoService.java b/services/self-service/src/main/java/com/epam/dlab/backendapi/service/aws/AwsInfrastructureInfoService.java
deleted file mode 100644
index 43335cc..0000000
--- a/services/self-service/src/main/java/com/epam/dlab/backendapi/service/aws/AwsInfrastructureInfoService.java
+++ /dev/null
@@ -1,40 +0,0 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements.  See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership.  The ASF licenses this file
- * to you 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.
- */
-
-package com.epam.dlab.backendapi.service.aws;
-
-import com.epam.dlab.backendapi.service.impl.InfrastructureInfoServiceBase;
-import com.epam.dlab.dto.aws.edge.EdgeInfoAws;
-import com.google.inject.Singleton;
-
-import java.util.HashMap;
-import java.util.Map;
-
-@Singleton
-public class AwsInfrastructureInfoService extends InfrastructureInfoServiceBase<EdgeInfoAws> {
-
-	@Override
-	protected Map<String, String> getSharedInfo(EdgeInfoAws edgeInfo) {
-		Map<String, String> shared = new HashMap<>();
-		shared.put("edge_node_ip", edgeInfo.getPublicIp());
-		shared.put("user_own_bicket_name", edgeInfo.getUserOwnBucketName());
-		shared.put("shared_bucket_name", edgeInfo.getSharedBucketName());
-		return shared;
-	}
-}
diff --git a/services/self-service/src/main/java/com/epam/dlab/backendapi/service/aws/AwsInfrastructureTemplateService.java b/services/self-service/src/main/java/com/epam/dlab/backendapi/service/aws/AwsInfrastructureTemplateService.java
deleted file mode 100644
index 62a8f3f..0000000
--- a/services/self-service/src/main/java/com/epam/dlab/backendapi/service/aws/AwsInfrastructureTemplateService.java
+++ /dev/null
@@ -1,56 +0,0 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements.  See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership.  The ASF licenses this file
- * to you 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.
- */
-
-package com.epam.dlab.backendapi.service.aws;
-
-import com.epam.dlab.backendapi.conf.SelfServiceApplicationConfiguration;
-import com.epam.dlab.backendapi.resources.dto.aws.AwsEmrConfiguration;
-import com.epam.dlab.backendapi.service.impl.InfrastructureTemplateServiceBase;
-import com.epam.dlab.dto.base.computational.FullComputationalTemplate;
-import com.epam.dlab.dto.imagemetadata.ComputationalMetadataDTO;
-import com.fasterxml.jackson.annotation.JsonProperty;
-import com.google.inject.Inject;
-
-public class AwsInfrastructureTemplateService extends InfrastructureTemplateServiceBase {
-
-	@Inject
-	private SelfServiceApplicationConfiguration configuration;
-
-	@Override
-	protected FullComputationalTemplate getCloudFullComputationalTemplate(ComputationalMetadataDTO metadataDTO) {
-		return new AwsFullComputationalTemplate(metadataDTO,
-				AwsEmrConfiguration.builder()
-						.minEmrInstanceCount(configuration.getMinEmrInstanceCount())
-						.maxEmrInstanceCount(configuration.getMaxEmrInstanceCount())
-						.maxEmrSpotInstanceBidPct(configuration.getMaxEmrSpotInstanceBidPct())
-						.minEmrSpotInstanceBidPct(configuration.getMinEmrSpotInstanceBidPct())
-						.build());
-	}
-
-	private class AwsFullComputationalTemplate extends FullComputationalTemplate {
-		@JsonProperty("limits")
-		private AwsEmrConfiguration awsEmrConfiguration;
-
-		AwsFullComputationalTemplate(ComputationalMetadataDTO metadataDTO,
-									 AwsEmrConfiguration awsEmrConfiguration) {
-			super(metadataDTO);
-			this.awsEmrConfiguration = awsEmrConfiguration;
-		}
-	}
-}
diff --git a/services/self-service/src/main/java/com/epam/dlab/backendapi/service/azure/AzureInfrastructureInfoService.java b/services/self-service/src/main/java/com/epam/dlab/backendapi/service/azure/AzureInfrastructureInfoService.java
deleted file mode 100644
index 6338152..0000000
--- a/services/self-service/src/main/java/com/epam/dlab/backendapi/service/azure/AzureInfrastructureInfoService.java
+++ /dev/null
@@ -1,45 +0,0 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements.  See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership.  The ASF licenses this file
- * to you 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.
- */
-
-package com.epam.dlab.backendapi.service.azure;
-
-import com.epam.dlab.backendapi.service.impl.InfrastructureInfoServiceBase;
-import com.epam.dlab.dto.azure.edge.EdgeInfoAzure;
-import com.google.inject.Singleton;
-
-import java.util.HashMap;
-import java.util.Map;
-
-@Singleton
-public class AzureInfrastructureInfoService extends InfrastructureInfoServiceBase<EdgeInfoAzure> {
-
-	@Override
-	protected Map<String, String> getSharedInfo(EdgeInfoAzure edgeInfo) {
-		Map<String, String> shared = new HashMap<>();
-		shared.put("edge_node_ip", edgeInfo.getPublicIp());
-		shared.put("user_container_name", edgeInfo.getUserContainerName());
-		shared.put("shared_container_name", edgeInfo.getSharedContainerName());
-		shared.put("user_storage_account_name", edgeInfo.getUserStorageAccountName());
-		shared.put("shared_storage_account_name", edgeInfo.getSharedStorageAccountName());
-		shared.put("datalake_name", edgeInfo.getDataLakeName());
-		shared.put("datalake_user_directory_name", edgeInfo.getDataLakeDirectoryName());
-		shared.put("datalake_shared_directory_name", edgeInfo.getDataLakeSharedDirectoryName());
-		return shared;
-	}
-}
diff --git a/services/self-service/src/main/java/com/epam/dlab/backendapi/service/azure/AzureInfrastructureTemplateService.java b/services/self-service/src/main/java/com/epam/dlab/backendapi/service/azure/AzureInfrastructureTemplateService.java
deleted file mode 100644
index 595ae2e..0000000
--- a/services/self-service/src/main/java/com/epam/dlab/backendapi/service/azure/AzureInfrastructureTemplateService.java
+++ /dev/null
@@ -1,37 +0,0 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements.  See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership.  The ASF licenses this file
- * to you 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.
- */
-
-package com.epam.dlab.backendapi.service.azure;
-
-import com.epam.dlab.backendapi.service.impl.InfrastructureTemplateServiceBase;
-import com.epam.dlab.dto.base.computational.FullComputationalTemplate;
-import com.epam.dlab.dto.imagemetadata.ComputationalMetadataDTO;
-import com.google.inject.Singleton;
-import lombok.extern.slf4j.Slf4j;
-
-@Singleton
-@Slf4j
-public class AzureInfrastructureTemplateService extends InfrastructureTemplateServiceBase {
-
-	@Override
-	protected FullComputationalTemplate getCloudFullComputationalTemplate(ComputationalMetadataDTO metadataDTO) {
-		log.error("Operation is not supported currently");
-		throw new UnsupportedOperationException("Operation is not supported currently");
-	}
-}
diff --git a/services/self-service/src/main/java/com/epam/dlab/backendapi/service/gcp/GcpInfrastructureInfoService.java b/services/self-service/src/main/java/com/epam/dlab/backendapi/service/gcp/GcpInfrastructureInfoService.java
deleted file mode 100644
index c517486..0000000
--- a/services/self-service/src/main/java/com/epam/dlab/backendapi/service/gcp/GcpInfrastructureInfoService.java
+++ /dev/null
@@ -1,40 +0,0 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements.  See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership.  The ASF licenses this file
- * to you 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.
- */
-
-package com.epam.dlab.backendapi.service.gcp;
-
-import com.epam.dlab.backendapi.service.impl.InfrastructureInfoServiceBase;
-import com.epam.dlab.dto.gcp.edge.EdgeInfoGcp;
-import com.google.inject.Singleton;
-
-import java.util.HashMap;
-import java.util.Map;
-
-@Singleton
-public class GcpInfrastructureInfoService extends InfrastructureInfoServiceBase<EdgeInfoGcp> {
-
-	@Override
-	protected Map<String, String> getSharedInfo(EdgeInfoGcp edgeInfo) {
-		Map<String, String> shared = new HashMap<>();
-		shared.put("edge_node_ip", edgeInfo.getPublicIp());
-		shared.put("user_own_bucket_name", edgeInfo.getUserOwnBucketName());
-		shared.put("shared_bucket_name", edgeInfo.getSharedBucketName());
-		return shared;
-	}
-}
diff --git a/services/self-service/src/main/java/com/epam/dlab/backendapi/service/gcp/GcpInfrastructureTemplateService.java b/services/self-service/src/main/java/com/epam/dlab/backendapi/service/gcp/GcpInfrastructureTemplateService.java
deleted file mode 100644
index 314698d..0000000
--- a/services/self-service/src/main/java/com/epam/dlab/backendapi/service/gcp/GcpInfrastructureTemplateService.java
+++ /dev/null
@@ -1,55 +0,0 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements.  See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership.  The ASF licenses this file
- * to you 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.
- */
-
-package com.epam.dlab.backendapi.service.gcp;
-
-import com.epam.dlab.backendapi.conf.SelfServiceApplicationConfiguration;
-import com.epam.dlab.backendapi.resources.dto.gcp.GcpDataprocConfiguration;
-import com.epam.dlab.backendapi.service.impl.InfrastructureTemplateServiceBase;
-import com.epam.dlab.dto.base.computational.FullComputationalTemplate;
-import com.epam.dlab.dto.imagemetadata.ComputationalMetadataDTO;
-import com.fasterxml.jackson.annotation.JsonProperty;
-import com.google.inject.Inject;
-
-public class GcpInfrastructureTemplateService extends InfrastructureTemplateServiceBase {
-	@Inject
-	private SelfServiceApplicationConfiguration configuration;
-
-	@Override
-	protected FullComputationalTemplate getCloudFullComputationalTemplate(ComputationalMetadataDTO metadataDTO) {
-		return new GcpFullComputationalTemplate(metadataDTO,
-				GcpDataprocConfiguration.builder()
-						.minInstanceCount(configuration.getMinInstanceCount())
-						.maxInstanceCount(configuration.getMaxInstanceCount())
-						.minDataprocPreemptibleInstanceCount(configuration.getMinDataprocPreemptibleCount())
-						.build());
-	}
-
-
-	private class GcpFullComputationalTemplate extends FullComputationalTemplate {
-		@JsonProperty("limits")
-		private GcpDataprocConfiguration gcpDataprocConfiguration;
-
-		GcpFullComputationalTemplate(ComputationalMetadataDTO metadataDTO,
-									 GcpDataprocConfiguration gcpDataprocConfiguration) {
-			super(metadataDTO);
-			this.gcpDataprocConfiguration = gcpDataprocConfiguration;
-		}
-	}
-}
diff --git a/services/self-service/src/main/java/com/epam/dlab/backendapi/service/impl/EndpointServiceImpl.java b/services/self-service/src/main/java/com/epam/dlab/backendapi/service/impl/EndpointServiceImpl.java
index 169857d..812c21b 100644
--- a/services/self-service/src/main/java/com/epam/dlab/backendapi/service/impl/EndpointServiceImpl.java
+++ b/services/self-service/src/main/java/com/epam/dlab/backendapi/service/impl/EndpointServiceImpl.java
@@ -8,6 +8,7 @@ import com.epam.dlab.backendapi.domain.EndpointResourcesDTO;
 import com.epam.dlab.backendapi.domain.ProjectDTO;
 import com.epam.dlab.backendapi.service.EndpointService;
 import com.epam.dlab.backendapi.service.ProjectService;
+import com.epam.dlab.cloud.CloudProvider;
 import com.epam.dlab.constants.ServiceConsts;
 import com.epam.dlab.dto.UserInstanceDTO;
 import com.epam.dlab.dto.UserInstanceStatus;
@@ -26,7 +27,7 @@ import java.util.List;
 
 @Slf4j
 public class EndpointServiceImpl implements EndpointService {
-	private static final String HEALTHCHECK = "healthcheck";
+	private static final String HEALTH_CHECK = "healthcheck";
 	private final EndpointDAO endpointDAO;
 	private final ProjectService projectService;
 	private final ExploratoryDAO exploratoryDAO;
@@ -70,9 +71,10 @@ public class EndpointServiceImpl implements EndpointService {
 
 	@Override
 	public void create(UserInfo userInfo, EndpointDTO endpointDTO) {
-		checkEndpointUrl(userInfo, endpointDTO.getUrl());
+		CloudProvider cloudProvider = checkEndpointUrl(userInfo, endpointDTO.getUrl());
 		if (!endpointDAO.get(endpointDTO.getName()).isPresent()) {
-			endpointDAO.create(EndpointDTO.withEndpointStatus(endpointDTO));
+			endpointDAO.create(new EndpointDTO(endpointDTO.getName(), endpointDTO.getUrl(), endpointDTO.getAccount(),
+					endpointDTO.getTag(), EndpointDTO.EndpointStatus.ACTIVE, cloudProvider));
 		} else {
 			throw new ResourceConflictException("Endpoint with passed name already exist in system");
 		}
@@ -100,18 +102,21 @@ public class EndpointServiceImpl implements EndpointService {
 	}
 
 	@Override
-	public void checkEndpointUrl(UserInfo userInfo, String url) {
+	public CloudProvider checkEndpointUrl(UserInfo userInfo, String url) {
 		Response response;
+		CloudProvider cloudProvider;
 		try {
-			response = provisioningService.get(url + HEALTHCHECK, userInfo.getAccessToken(), Response.class);
+			response = provisioningService.get(url + HEALTH_CHECK, userInfo.getAccessToken(), Response.class);
+			cloudProvider = response.readEntity(CloudProvider.class);
 		} catch (Exception e) {
-			log.error("Cannot connect to url \'{}\'", url);
-			throw new DlabException(String.format("Cannot connect to url \'%s\'", url), e);
+			log.error("Cannot connect to url '{}'", url);
+			throw new DlabException(String.format("Cannot connect to url '%s'", url), e);
 		}
 		if (response.getStatus() != 200) {
 			log.warn("Endpoint url {} is not valid", url);
-			throw new ResourceNotFoundException(String.format("Endpoint url \'%s\' is not valid", url));
+			throw new ResourceNotFoundException(String.format("Endpoint url '%s' is not valid", url));
 		}
+		return cloudProvider;
 	}
 
 	private void checkProjectEndpointResourcesStatuses(List<ProjectDTO> projects, String endpoint) {
diff --git a/services/self-service/src/main/java/com/epam/dlab/backendapi/service/impl/InfrastructureInfoServiceBase.java b/services/self-service/src/main/java/com/epam/dlab/backendapi/service/impl/InfrastructureInfoServiceImpl.java
similarity index 74%
rename from services/self-service/src/main/java/com/epam/dlab/backendapi/service/impl/InfrastructureInfoServiceBase.java
rename to services/self-service/src/main/java/com/epam/dlab/backendapi/service/impl/InfrastructureInfoServiceImpl.java
index 751d399..5eaa21b 100644
--- a/services/self-service/src/main/java/com/epam/dlab/backendapi/service/impl/InfrastructureInfoServiceBase.java
+++ b/services/self-service/src/main/java/com/epam/dlab/backendapi/service/impl/InfrastructureInfoServiceImpl.java
@@ -24,35 +24,36 @@ import com.epam.dlab.backendapi.conf.SelfServiceApplicationConfiguration;
 import com.epam.dlab.backendapi.dao.BillingDAO;
 import com.epam.dlab.backendapi.dao.EnvDAO;
 import com.epam.dlab.backendapi.dao.ExploratoryDAO;
-import com.epam.dlab.backendapi.dao.KeyDAO;
 import com.epam.dlab.backendapi.domain.ProjectEndpointDTO;
 import com.epam.dlab.backendapi.resources.dto.HealthStatusPageDTO;
 import com.epam.dlab.backendapi.resources.dto.ProjectInfrastructureInfo;
 import com.epam.dlab.backendapi.service.InfrastructureInfoService;
 import com.epam.dlab.backendapi.service.ProjectService;
 import com.epam.dlab.dto.InfrastructureMetaInfoDTO;
+import com.epam.dlab.dto.aws.edge.EdgeInfoAws;
+import com.epam.dlab.dto.azure.edge.EdgeInfoAzure;
 import com.epam.dlab.dto.base.edge.EdgeInfo;
+import com.epam.dlab.dto.gcp.edge.EdgeInfoGcp;
 import com.epam.dlab.exceptions.DlabException;
 import com.google.inject.Inject;
 import com.jcabi.manifests.Manifests;
 import lombok.extern.slf4j.Slf4j;
 import org.bson.Document;
 
+import java.util.HashMap;
 import java.util.List;
 import java.util.Map;
 import java.util.stream.Collectors;
 import java.util.stream.StreamSupport;
 
 @Slf4j
-public abstract class InfrastructureInfoServiceBase<T> implements InfrastructureInfoService {
+public class InfrastructureInfoServiceImpl implements InfrastructureInfoService {
 
 	private static final String RELEASE_NOTES_FORMAT = "https://github.com/apache/incubator-dlab/blob/%s" +
 			"/RELEASE_NOTES.md";
 	@Inject
 	private ExploratoryDAO expDAO;
 	@Inject
-	private KeyDAO keyDAO;
-	@Inject
 	private EnvDAO envDAO;
 	@Inject
 	private SelfServiceApplicationConfiguration configuration;
@@ -62,11 +63,6 @@ public abstract class InfrastructureInfoServiceBase<T> implements Infrastructure
 	private ProjectService projectService;
 
 
-	@SuppressWarnings("unchecked")
-	private Map<String, String> getSharedInfo(EdgeInfo edgeInfo) {
-		return getSharedInfo((T) edgeInfo);
-	}
-
 	@Override
 	public List<ProjectInfrastructureInfo> getUserResources(String user) {
 		log.debug("Loading list of provisioned resources for user {}", user);
@@ -124,5 +120,31 @@ public abstract class InfrastructureInfoServiceBase<T> implements Infrastructure
 				.build();
 	}
 
-	protected abstract Map<String, String> getSharedInfo(T sharedInfo);
+	private Map<String, String> getSharedInfo(EdgeInfo edgeInfo) {
+		Map<String, String> shared = new HashMap<>();
+		shared.put("edge_node_ip", edgeInfo.getPublicIp());
+		if (edgeInfo instanceof EdgeInfoAws) {
+			EdgeInfoAws edgeInfoAws = (EdgeInfoAws) edgeInfo;
+
+			shared.put("user_own_bicket_name", edgeInfoAws.getUserOwnBucketName());
+			shared.put("shared_bucket_name", edgeInfoAws.getSharedBucketName());
+		} else if (edgeInfo instanceof EdgeInfoAzure) {
+			EdgeInfoAzure edgeInfoAzure = (EdgeInfoAzure) edgeInfo;
+
+			shared.put("user_container_name", edgeInfoAzure.getUserContainerName());
+			shared.put("shared_container_name", edgeInfoAzure.getSharedContainerName());
+			shared.put("user_storage_account_name", edgeInfoAzure.getUserStorageAccountName());
+			shared.put("shared_storage_account_name", edgeInfoAzure.getSharedStorageAccountName());
+			shared.put("datalake_name", edgeInfoAzure.getDataLakeName());
+			shared.put("datalake_user_directory_name", edgeInfoAzure.getDataLakeDirectoryName());
+			shared.put("datalake_shared_directory_name", edgeInfoAzure.getDataLakeSharedDirectoryName());
+		} else if (edgeInfo instanceof EdgeInfoGcp) {
+			EdgeInfoGcp edgeInfoGcp = (EdgeInfoGcp) edgeInfo;
+
+			shared.put("user_own_bucket_name", edgeInfoGcp.getUserOwnBucketName());
+			shared.put("shared_bucket_name", edgeInfoGcp.getSharedBucketName());
+		}
+
+		return shared;
+	}
 }
diff --git a/services/self-service/src/main/java/com/epam/dlab/backendapi/service/impl/InfrastructureTemplateServiceBase.java b/services/self-service/src/main/java/com/epam/dlab/backendapi/service/impl/InfrastructureTemplateServiceImpl.java
similarity index 72%
rename from services/self-service/src/main/java/com/epam/dlab/backendapi/service/impl/InfrastructureTemplateServiceBase.java
rename to services/self-service/src/main/java/com/epam/dlab/backendapi/service/impl/InfrastructureTemplateServiceImpl.java
index 25fa56b..b119f95 100644
--- a/services/self-service/src/main/java/com/epam/dlab/backendapi/service/impl/InfrastructureTemplateServiceBase.java
+++ b/services/self-service/src/main/java/com/epam/dlab/backendapi/service/impl/InfrastructureTemplateServiceImpl.java
@@ -24,8 +24,11 @@ import com.epam.dlab.backendapi.conf.SelfServiceApplicationConfiguration;
 import com.epam.dlab.backendapi.dao.ProjectDAO;
 import com.epam.dlab.backendapi.dao.SettingsDAO;
 import com.epam.dlab.backendapi.dao.UserGroupDao;
+import com.epam.dlab.backendapi.domain.EndpointDTO;
 import com.epam.dlab.backendapi.domain.ProjectDTO;
 import com.epam.dlab.backendapi.resources.dto.SparkStandaloneConfiguration;
+import com.epam.dlab.backendapi.resources.dto.aws.AwsEmrConfiguration;
+import com.epam.dlab.backendapi.resources.dto.gcp.GcpDataprocConfiguration;
 import com.epam.dlab.backendapi.roles.RoleType;
 import com.epam.dlab.backendapi.roles.UserRoles;
 import com.epam.dlab.backendapi.service.EndpointService;
@@ -54,7 +57,7 @@ import static com.epam.dlab.rest.contracts.DockerAPI.DOCKER_COMPUTATIONAL;
 import static com.epam.dlab.rest.contracts.DockerAPI.DOCKER_EXPLORATORY;
 
 @Slf4j
-public abstract class InfrastructureTemplateServiceBase implements InfrastructureTemplateService {
+public class InfrastructureTemplateServiceImpl implements InfrastructureTemplateService {
 
 	@Inject
 	private SelfServiceApplicationConfiguration configuration;
@@ -116,8 +119,9 @@ public abstract class InfrastructureTemplateServiceBase implements Infrastructur
 
 		log.debug("Loading list of computational templates for user {}", user.getName());
 		try {
+			EndpointDTO endpointDTO = endpointService.get(endpoint);
 			ComputationalMetadataDTO[] array =
-					provisioningService.get(endpointService.get(endpoint).getUrl() + DOCKER_COMPUTATIONAL,
+					provisioningService.get(endpointDTO.getUrl() + DOCKER_COMPUTATIONAL,
 							user.getAccessToken(), ComputationalMetadataDTO[]
 									.class);
 
@@ -128,7 +132,7 @@ public abstract class InfrastructureTemplateServiceBase implements Infrastructur
 					.peek(e -> filterShapes(user, e.getComputationResourceShapes(), RoleType.COMPUTATIONAL_SHAPES,
 							user.getRoles()))
 					.filter(e -> UserRoles.checkAccess(user, RoleType.COMPUTATIONAL, e.getImage(), roles))
-					.map(this::fullComputationalTemplate)
+					.map(comp -> fullComputationalTemplate(comp, endpointDTO.getCloudProvider()))
 					.collect(Collectors.toList());
 
 		} catch (DlabException e) {
@@ -143,9 +147,6 @@ public abstract class InfrastructureTemplateServiceBase implements Infrastructur
 				.orElse(user.getRoles());
 	}
 
-	protected abstract FullComputationalTemplate getCloudFullComputationalTemplate(ComputationalMetadataDTO
-																						   metadataDTO);
-
 	/**
 	 * Temporary filter for creation of exploratory env due to Azure issues
 	 */
@@ -168,16 +169,18 @@ public abstract class InfrastructureTemplateServiceBase implements Infrastructur
 	/**
 	 * Wraps metadata with limits
 	 *
-	 * @param metadataDTO metadata
+	 * @param metadataDTO   metadata
+	 * @param cloudProvider cloudProvider
 	 * @return wrapped object
 	 */
 
-	private FullComputationalTemplate fullComputationalTemplate(ComputationalMetadataDTO metadataDTO) {
+	private FullComputationalTemplate fullComputationalTemplate(ComputationalMetadataDTO metadataDTO,
+																CloudProvider cloudProvider) {
 
 		DataEngineType dataEngineType = DataEngineType.fromDockerImageName(metadataDTO.getImage());
 
 		if (dataEngineType == DataEngineType.CLOUD_SERVICE) {
-			return getCloudFullComputationalTemplate(metadataDTO);
+			return getCloudFullComputationalTemplate(metadataDTO, cloudProvider);
 		} else if (dataEngineType == DataEngineType.SPARK_STANDALONE) {
 			return new SparkFullComputationalTemplate(metadataDTO,
 					SparkStandaloneConfiguration.builder()
@@ -189,6 +192,53 @@ public abstract class InfrastructureTemplateServiceBase implements Infrastructur
 		}
 	}
 
+	protected FullComputationalTemplate getCloudFullComputationalTemplate(ComputationalMetadataDTO metadataDTO,
+																		CloudProvider cloudProvider) {
+		switch (cloudProvider) {
+			case AWS:
+				return new AwsFullComputationalTemplate(metadataDTO,
+						AwsEmrConfiguration.builder()
+								.minEmrInstanceCount(configuration.getMinEmrInstanceCount())
+								.maxEmrInstanceCount(configuration.getMaxEmrInstanceCount())
+								.maxEmrSpotInstanceBidPct(configuration.getMaxEmrSpotInstanceBidPct())
+								.minEmrSpotInstanceBidPct(configuration.getMinEmrSpotInstanceBidPct())
+								.build());
+			case GCP:
+				return new GcpFullComputationalTemplate(metadataDTO,
+						GcpDataprocConfiguration.builder()
+								.minInstanceCount(configuration.getMinInstanceCount())
+								.maxInstanceCount(configuration.getMaxInstanceCount())
+								.minDataprocPreemptibleInstanceCount(configuration.getMinDataprocPreemptibleCount())
+								.build());
+			case AZURE:
+				log.error("Dataengine service is not supported currently for {}", cloudProvider);
+			default:
+				throw new UnsupportedOperationException("Dataengine service is not supported currently for " + cloudProvider);
+		}
+	}
+
+	private class AwsFullComputationalTemplate extends FullComputationalTemplate {
+		@JsonProperty("limits")
+		private AwsEmrConfiguration awsEmrConfiguration;
+
+		AwsFullComputationalTemplate(ComputationalMetadataDTO metadataDTO,
+									 AwsEmrConfiguration awsEmrConfiguration) {
+			super(metadataDTO);
+			this.awsEmrConfiguration = awsEmrConfiguration;
+		}
+	}
+
+	private class GcpFullComputationalTemplate extends FullComputationalTemplate {
+		@JsonProperty("limits")
+		private GcpDataprocConfiguration gcpDataprocConfiguration;
+
+		GcpFullComputationalTemplate(ComputationalMetadataDTO metadataDTO,
+									 GcpDataprocConfiguration gcpDataprocConfiguration) {
+			super(metadataDTO);
+			this.gcpDataprocConfiguration = gcpDataprocConfiguration;
+		}
+	}
+
 	private class SparkFullComputationalTemplate extends FullComputationalTemplate {
 		@JsonProperty("limits")
 		private SparkStandaloneConfiguration sparkStandaloneConfiguration;
diff --git a/services/self-service/src/test/java/com/epam/dlab/backendapi/service/aws/AwsInfrastructureInfoServiceTest.java b/services/self-service/src/test/java/com/epam/dlab/backendapi/service/aws/AwsInfrastructureInfoServiceTest.java
deleted file mode 100644
index 50aeb39..0000000
--- a/services/self-service/src/test/java/com/epam/dlab/backendapi/service/aws/AwsInfrastructureInfoServiceTest.java
+++ /dev/null
@@ -1,47 +0,0 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements.  See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership.  The ASF licenses this file
- * to you 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.
- */
-
-package com.epam.dlab.backendapi.service.aws;
-
-import com.epam.dlab.dto.aws.edge.EdgeInfoAws;
-import org.junit.Test;
-
-import java.util.HashMap;
-import java.util.Map;
-
-import static org.junit.Assert.assertEquals;
-
-public class AwsInfrastructureInfoServiceTest {
-
-	@Test
-	public void getSharedInfo() {
-		EdgeInfoAws edgeInfoAws = new EdgeInfoAws();
-		edgeInfoAws.setPublicIp("ip");
-		edgeInfoAws.setUserOwnBucketName("userOwnBucketName");
-		edgeInfoAws.setSharedBucketName("sharedBucketName");
-
-		Map<String, String> expectedMap = new HashMap<>();
-		expectedMap.put("edge_node_ip", "ip");
-		expectedMap.put("user_own_bicket_name", "userOwnBucketName");
-		expectedMap.put("shared_bucket_name", "sharedBucketName");
-
-		Map<String, String> actualMap = new AwsInfrastructureInfoService().getSharedInfo(edgeInfoAws);
-		assertEquals(expectedMap, actualMap);
-	}
-}
diff --git a/services/self-service/src/test/java/com/epam/dlab/backendapi/service/aws/AwsInfrastructureTemplateServiceTest.java b/services/self-service/src/test/java/com/epam/dlab/backendapi/service/aws/AwsInfrastructureTemplateServiceTest.java
deleted file mode 100644
index 118e7e8..0000000
--- a/services/self-service/src/test/java/com/epam/dlab/backendapi/service/aws/AwsInfrastructureTemplateServiceTest.java
+++ /dev/null
@@ -1,84 +0,0 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements.  See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership.  The ASF licenses this file
- * to you 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.
- */
-
-package com.epam.dlab.backendapi.service.aws;
-
-import com.epam.dlab.backendapi.conf.SelfServiceApplicationConfiguration;
-import com.epam.dlab.backendapi.resources.dto.aws.AwsEmrConfiguration;
-import com.epam.dlab.dto.base.computational.FullComputationalTemplate;
-import com.epam.dlab.dto.imagemetadata.ComputationalMetadataDTO;
-import org.junit.Test;
-import org.junit.runner.RunWith;
-import org.mockito.InjectMocks;
-import org.mockito.Mock;
-import org.mockito.runners.MockitoJUnitRunner;
-
-import java.lang.reflect.Field;
-
-import static org.junit.Assert.assertEquals;
-import static org.junit.Assert.assertNotNull;
-import static org.mockito.Mockito.*;
-
-@RunWith(MockitoJUnitRunner.class)
-public class AwsInfrastructureTemplateServiceTest {
-
-	@Mock
-	private SelfServiceApplicationConfiguration configuration;
-
-	@InjectMocks
-	private AwsInfrastructureTemplateService awsInfrastructureTemplateService;
-
-	@Test
-	public void getCloudFullComputationalTemplate() throws NoSuchFieldException, IllegalAccessException {
-		when(configuration.getMinEmrInstanceCount()).thenReturn(2);
-		when(configuration.getMaxEmrInstanceCount()).thenReturn(1000);
-		when(configuration.getMaxEmrSpotInstanceBidPct()).thenReturn(95);
-		when(configuration.getMinEmrSpotInstanceBidPct()).thenReturn(10);
-
-		AwsEmrConfiguration expectedAwsEmrConfiguration = AwsEmrConfiguration.builder()
-				.minEmrInstanceCount(2)
-				.maxEmrInstanceCount(1000)
-				.maxEmrSpotInstanceBidPct(95)
-				.minEmrSpotInstanceBidPct(10)
-				.build();
-
-		ComputationalMetadataDTO expectedComputationalMetadataDTO =
-				new ComputationalMetadataDTO("someImageName");
-
-		FullComputationalTemplate fullComputationalTemplate =
-				awsInfrastructureTemplateService.getCloudFullComputationalTemplate(expectedComputationalMetadataDTO);
-		assertNotNull(fullComputationalTemplate);
-
-		Field actualAwsEmrConfiguration =
-				fullComputationalTemplate.getClass().getDeclaredField("awsEmrConfiguration");
-		actualAwsEmrConfiguration.setAccessible(true);
-		assertEquals(expectedAwsEmrConfiguration, actualAwsEmrConfiguration.get(fullComputationalTemplate));
-
-		Field actualComputationalMetadataDTO = fullComputationalTemplate.getClass().getSuperclass()
-				.getDeclaredField("computationalMetadataDTO");
-		actualComputationalMetadataDTO.setAccessible(true);
-		assertEquals(expectedComputationalMetadataDTO, actualComputationalMetadataDTO.get(fullComputationalTemplate));
-
-		verify(configuration).getMinEmrInstanceCount();
-		verify(configuration).getMaxEmrInstanceCount();
-		verify(configuration).getMaxEmrSpotInstanceBidPct();
-		verify(configuration).getMinEmrSpotInstanceBidPct();
-		verifyNoMoreInteractions(configuration);
-	}
-}
diff --git a/services/self-service/src/test/java/com/epam/dlab/backendapi/service/azure/AzureInfrastructureInfoServiceTest.java b/services/self-service/src/test/java/com/epam/dlab/backendapi/service/azure/AzureInfrastructureInfoServiceTest.java
deleted file mode 100644
index 37f5e46..0000000
--- a/services/self-service/src/test/java/com/epam/dlab/backendapi/service/azure/AzureInfrastructureInfoServiceTest.java
+++ /dev/null
@@ -1,57 +0,0 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements.  See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership.  The ASF licenses this file
- * to you 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.
- */
-
-package com.epam.dlab.backendapi.service.azure;
-
-import com.epam.dlab.dto.azure.edge.EdgeInfoAzure;
-import org.junit.Test;
-
-import java.util.HashMap;
-import java.util.Map;
-
-import static org.junit.Assert.assertEquals;
-
-public class AzureInfrastructureInfoServiceTest {
-
-	@Test
-	public void getSharedInfo() {
-		EdgeInfoAzure edgeInfoAzure = new EdgeInfoAzure();
-		edgeInfoAzure.setPublicIp("ip");
-		edgeInfoAzure.setUserContainerName("userContainerName");
-		edgeInfoAzure.setSharedContainerName("sharedContainerName");
-		edgeInfoAzure.setUserStorageAccountName("userStorageAccountName");
-		edgeInfoAzure.setSharedStorageAccountName("sharedStorageAccountName");
-		edgeInfoAzure.setDataLakeName("datalakeName");
-		edgeInfoAzure.setDataLakeDirectoryName("datalakeUserDirectoryName");
-		edgeInfoAzure.setDataLakeSharedDirectoryName("datalakeSharedDirectoryName");
-
-		Map<String, String> expectedMap = new HashMap<>();
-		expectedMap.put("edge_node_ip", "ip");
-		expectedMap.put("user_container_name", "userContainerName");
-		expectedMap.put("shared_container_name", "sharedContainerName");
-		expectedMap.put("user_storage_account_name", "userStorageAccountName");
-		expectedMap.put("shared_storage_account_name", "sharedStorageAccountName");
-		expectedMap.put("datalake_name", "datalakeName");
-		expectedMap.put("datalake_user_directory_name", "datalakeUserDirectoryName");
-		expectedMap.put("datalake_shared_directory_name", "datalakeSharedDirectoryName");
-
-		Map<String, String> actualMap = new AzureInfrastructureInfoService().getSharedInfo(edgeInfoAzure);
-		assertEquals(expectedMap, actualMap);
-	}
-}
diff --git a/services/self-service/src/test/java/com/epam/dlab/backendapi/service/azure/AzureInfrastructureTemplateServiceTest.java b/services/self-service/src/test/java/com/epam/dlab/backendapi/service/azure/AzureInfrastructureTemplateServiceTest.java
deleted file mode 100644
index 0da7503..0000000
--- a/services/self-service/src/test/java/com/epam/dlab/backendapi/service/azure/AzureInfrastructureTemplateServiceTest.java
+++ /dev/null
@@ -1,38 +0,0 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements.  See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership.  The ASF licenses this file
- * to you 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.
- */
-
-package com.epam.dlab.backendapi.service.azure;
-
-import com.epam.dlab.dto.imagemetadata.ComputationalMetadataDTO;
-import org.junit.Rule;
-import org.junit.Test;
-import org.junit.rules.ExpectedException;
-
-public class AzureInfrastructureTemplateServiceTest {
-
-	@Rule
-	public ExpectedException expectedException = ExpectedException.none();
-
-	@Test
-	public void getCloudFullComputationalTemplate() {
-		expectedException.expect(UnsupportedOperationException.class);
-		expectedException.expectMessage("Operation is not supported currently");
-		new AzureInfrastructureTemplateService().getCloudFullComputationalTemplate(new ComputationalMetadataDTO());
-	}
-}
diff --git a/services/self-service/src/test/java/com/epam/dlab/backendapi/service/gcp/GcpInfrastructureInfoServiceTest.java b/services/self-service/src/test/java/com/epam/dlab/backendapi/service/gcp/GcpInfrastructureInfoServiceTest.java
deleted file mode 100644
index b57daf3..0000000
--- a/services/self-service/src/test/java/com/epam/dlab/backendapi/service/gcp/GcpInfrastructureInfoServiceTest.java
+++ /dev/null
@@ -1,47 +0,0 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements.  See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership.  The ASF licenses this file
- * to you 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.
- */
-
-package com.epam.dlab.backendapi.service.gcp;
-
-import com.epam.dlab.dto.gcp.edge.EdgeInfoGcp;
-import org.junit.Test;
-
-import java.util.HashMap;
-import java.util.Map;
-
-import static org.junit.Assert.assertEquals;
-
-public class GcpInfrastructureInfoServiceTest {
-
-	@Test
-	public void getSharedInfo() {
-		EdgeInfoGcp edgeInfoGcp = new EdgeInfoGcp();
-		edgeInfoGcp.setPublicIp("ip");
-		edgeInfoGcp.setUserOwnBucketName("userOwnBucketName");
-		edgeInfoGcp.setSharedBucketName("sharedBucketName");
-
-		Map<String, String> expectedMap = new HashMap<>();
-		expectedMap.put("edge_node_ip", "ip");
-		expectedMap.put("user_own_bucket_name", "userOwnBucketName");
-		expectedMap.put("shared_bucket_name", "sharedBucketName");
-
-		Map<String, String> actualMap = new GcpInfrastructureInfoService().getSharedInfo(edgeInfoGcp);
-		assertEquals(expectedMap, actualMap);
-	}
-}
diff --git a/services/self-service/src/test/java/com/epam/dlab/backendapi/service/gcp/GcpInfrastructureTemplateServiceTest.java b/services/self-service/src/test/java/com/epam/dlab/backendapi/service/gcp/GcpInfrastructureTemplateServiceTest.java
deleted file mode 100644
index 2010b76..0000000
--- a/services/self-service/src/test/java/com/epam/dlab/backendapi/service/gcp/GcpInfrastructureTemplateServiceTest.java
+++ /dev/null
@@ -1,81 +0,0 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements.  See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership.  The ASF licenses this file
- * to you 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.
- */
-
-package com.epam.dlab.backendapi.service.gcp;
-
-import com.epam.dlab.backendapi.conf.SelfServiceApplicationConfiguration;
-import com.epam.dlab.backendapi.resources.dto.gcp.GcpDataprocConfiguration;
-import com.epam.dlab.dto.base.computational.FullComputationalTemplate;
-import com.epam.dlab.dto.imagemetadata.ComputationalMetadataDTO;
-import org.junit.Test;
-import org.junit.runner.RunWith;
-import org.mockito.InjectMocks;
-import org.mockito.Mock;
-import org.mockito.runners.MockitoJUnitRunner;
-
-import java.lang.reflect.Field;
-
-import static org.junit.Assert.assertEquals;
-import static org.junit.Assert.assertNotNull;
-import static org.mockito.Mockito.*;
-
-@RunWith(MockitoJUnitRunner.class)
-public class GcpInfrastructureTemplateServiceTest {
-
-	@Mock
-	private SelfServiceApplicationConfiguration configuration;
-
-	@InjectMocks
-	private GcpInfrastructureTemplateService gcpInfrastructureTemplateService;
-
-	@Test
-	public void getCloudFullComputationalTemplate() throws NoSuchFieldException, IllegalAccessException {
-		when(configuration.getMinInstanceCount()).thenReturn(2);
-		when(configuration.getMaxInstanceCount()).thenReturn(100);
-		when(configuration.getMinDataprocPreemptibleCount()).thenReturn(10);
-
-		GcpDataprocConfiguration expectedGcpDataprocConfiguration = GcpDataprocConfiguration.builder()
-				.minInstanceCount(2)
-				.maxInstanceCount(100)
-				.minDataprocPreemptibleInstanceCount(10)
-				.build();
-
-		ComputationalMetadataDTO expectedComputationalMetadataDTO =
-				new ComputationalMetadataDTO("someImageName");
-
-		FullComputationalTemplate fullComputationalTemplate =
-				gcpInfrastructureTemplateService.getCloudFullComputationalTemplate(expectedComputationalMetadataDTO);
-		assertNotNull(fullComputationalTemplate);
-
-		Field actualGcpDataprocConfiguration =
-				fullComputationalTemplate.getClass().getDeclaredField("gcpDataprocConfiguration");
-		actualGcpDataprocConfiguration.setAccessible(true);
-		assertEquals(expectedGcpDataprocConfiguration, actualGcpDataprocConfiguration.get(fullComputationalTemplate));
-
-		Field actualComputationalMetadataDTO = fullComputationalTemplate.getClass().getSuperclass()
-				.getDeclaredField("computationalMetadataDTO");
-		actualComputationalMetadataDTO.setAccessible(true);
-		assertEquals(expectedComputationalMetadataDTO, actualComputationalMetadataDTO.get(fullComputationalTemplate));
-
-		verify(configuration).getMinInstanceCount();
-		verify(configuration).getMaxInstanceCount();
-		verify(configuration).getMinDataprocPreemptibleCount();
-		verifyNoMoreInteractions(configuration);
-	}
-}
diff --git a/services/self-service/src/test/java/com/epam/dlab/backendapi/service/impl/ComputationalServiceImplTest.java b/services/self-service/src/test/java/com/epam/dlab/backendapi/service/impl/ComputationalServiceImplTest.java
index 33821e6..1ad40da 100644
--- a/services/self-service/src/test/java/com/epam/dlab/backendapi/service/impl/ComputationalServiceImplTest.java
+++ b/services/self-service/src/test/java/com/epam/dlab/backendapi/service/impl/ComputationalServiceImplTest.java
@@ -33,6 +33,7 @@ import com.epam.dlab.backendapi.service.EndpointService;
 import com.epam.dlab.backendapi.service.ProjectService;
 import com.epam.dlab.backendapi.service.TagService;
 import com.epam.dlab.backendapi.util.RequestBuilder;
+import com.epam.dlab.cloud.CloudProvider;
 import com.epam.dlab.dto.SchedulerJobDTO;
 import com.epam.dlab.dto.UserInstanceDTO;
 import com.epam.dlab.dto.UserInstanceStatus;
@@ -736,7 +737,7 @@ public class ComputationalServiceImplTest {
 	}
 
 	private EndpointDTO endpointDTO() {
-		return new EndpointDTO("test", "url", "", null, EndpointDTO.EndpointStatus.ACTIVE);
+		return new EndpointDTO("test", "url", "", null, EndpointDTO.EndpointStatus.ACTIVE, CloudProvider.AWS);
 	}
 
 
diff --git a/services/self-service/src/test/java/com/epam/dlab/backendapi/service/impl/ExploratoryServiceImplTest.java b/services/self-service/src/test/java/com/epam/dlab/backendapi/service/impl/ExploratoryServiceImplTest.java
index f37071a..10c7555 100644
--- a/services/self-service/src/test/java/com/epam/dlab/backendapi/service/impl/ExploratoryServiceImplTest.java
+++ b/services/self-service/src/test/java/com/epam/dlab/backendapi/service/impl/ExploratoryServiceImplTest.java
@@ -31,6 +31,7 @@ import com.epam.dlab.backendapi.service.EndpointService;
 import com.epam.dlab.backendapi.service.ProjectService;
 import com.epam.dlab.backendapi.service.TagService;
 import com.epam.dlab.backendapi.util.RequestBuilder;
+import com.epam.dlab.cloud.CloudProvider;
 import com.epam.dlab.dto.StatusEnvBaseDTO;
 import com.epam.dlab.dto.UserInstanceDTO;
 import com.epam.dlab.dto.UserInstanceStatus;
@@ -589,7 +590,7 @@ public class ExploratoryServiceImplTest {
 	}
 
 	private EndpointDTO endpointDTO() {
-		return new EndpointDTO("test", "url", "", null, EndpointDTO.EndpointStatus.ACTIVE);
+		return new EndpointDTO("test", "url", "", null, EndpointDTO.EndpointStatus.ACTIVE, CloudProvider.AWS);
 	}
 
 	private ProjectDTO getProjectDTO() {
diff --git a/services/self-service/src/test/java/com/epam/dlab/backendapi/service/impl/GitCredentialServiceImplTest.java b/services/self-service/src/test/java/com/epam/dlab/backendapi/service/impl/GitCredentialServiceImplTest.java
index cc1b6ad..69f9fca 100644
--- a/services/self-service/src/test/java/com/epam/dlab/backendapi/service/impl/GitCredentialServiceImplTest.java
+++ b/services/self-service/src/test/java/com/epam/dlab/backendapi/service/impl/GitCredentialServiceImplTest.java
@@ -26,6 +26,7 @@ import com.epam.dlab.backendapi.domain.EndpointDTO;
 import com.epam.dlab.backendapi.domain.RequestId;
 import com.epam.dlab.backendapi.service.EndpointService;
 import com.epam.dlab.backendapi.util.RequestBuilder;
+import com.epam.dlab.cloud.CloudProvider;
 import com.epam.dlab.dto.UserInstanceDTO;
 import com.epam.dlab.dto.exploratory.ExploratoryGitCredsDTO;
 import com.epam.dlab.dto.exploratory.ExploratoryGitCredsUpdateDTO;
@@ -168,6 +169,6 @@ public class GitCredentialServiceImplTest {
 	}
 
 	private EndpointDTO endpointDTO() {
-		return new EndpointDTO("test", "url", "", null, EndpointDTO.EndpointStatus.ACTIVE);
+		return new EndpointDTO("test", "url", "", null, EndpointDTO.EndpointStatus.ACTIVE, CloudProvider.AWS);
 	}
 }
diff --git a/services/self-service/src/test/java/com/epam/dlab/backendapi/service/impl/ImageExploratoryServiceImplTest.java b/services/self-service/src/test/java/com/epam/dlab/backendapi/service/impl/ImageExploratoryServiceImplTest.java
index 8082eb7..dd5e27d 100644
--- a/services/self-service/src/test/java/com/epam/dlab/backendapi/service/impl/ImageExploratoryServiceImplTest.java
+++ b/services/self-service/src/test/java/com/epam/dlab/backendapi/service/impl/ImageExploratoryServiceImplTest.java
@@ -27,6 +27,7 @@ import com.epam.dlab.backendapi.domain.EndpointDTO;
 import com.epam.dlab.backendapi.resources.dto.ImageInfoRecord;
 import com.epam.dlab.backendapi.service.EndpointService;
 import com.epam.dlab.backendapi.util.RequestBuilder;
+import com.epam.dlab.cloud.CloudProvider;
 import com.epam.dlab.dto.UserInstanceDTO;
 import com.epam.dlab.dto.exploratory.ExploratoryImageDTO;
 import com.epam.dlab.dto.exploratory.ExploratoryStatusDTO;
@@ -321,6 +322,6 @@ public class ImageExploratoryServiceImplTest {
 	}
 
 	private EndpointDTO endpointDTO() {
-		return new EndpointDTO("test", "url", "", null, EndpointDTO.EndpointStatus.ACTIVE);
+		return new EndpointDTO("test", "url", "", null, EndpointDTO.EndpointStatus.ACTIVE, CloudProvider.AWS);
 	}
 }
diff --git a/services/self-service/src/test/java/com/epam/dlab/backendapi/service/impl/InfrastructureTemplateServiceBaseTest.java b/services/self-service/src/test/java/com/epam/dlab/backendapi/service/impl/InfrastructureTemplateServiceBaseTest.java
index cf18f82..e53b78c 100644
--- a/services/self-service/src/test/java/com/epam/dlab/backendapi/service/impl/InfrastructureTemplateServiceBaseTest.java
+++ b/services/self-service/src/test/java/com/epam/dlab/backendapi/service/impl/InfrastructureTemplateServiceBaseTest.java
@@ -20,12 +20,14 @@
 package com.epam.dlab.backendapi.service.impl;
 
 import com.epam.dlab.auth.UserInfo;
+import com.epam.dlab.backendapi.conf.SelfServiceApplicationConfiguration;
 import com.epam.dlab.backendapi.dao.ProjectDAO;
 import com.epam.dlab.backendapi.dao.SettingsDAO;
 import com.epam.dlab.backendapi.dao.UserGroupDao;
 import com.epam.dlab.backendapi.domain.EndpointDTO;
 import com.epam.dlab.backendapi.domain.ProjectDTO;
 import com.epam.dlab.backendapi.service.EndpointService;
+import com.epam.dlab.cloud.CloudProvider;
 import com.epam.dlab.dto.base.computational.FullComputationalTemplate;
 import com.epam.dlab.dto.imagemetadata.ComputationalMetadataDTO;
 import com.epam.dlab.dto.imagemetadata.ComputationalResourceShapeDto;
@@ -58,6 +60,8 @@ public class InfrastructureTemplateServiceBaseTest {
 	private EndpointService endpointService;
 	@Mock
 	private UserGroupDao userGroupDao;
+	@Mock
+	private SelfServiceApplicationConfiguration configuration;
 
 	@InjectMocks
 	private InfrastructureTemplateServiceBaseChild infrastructureTemplateServiceBaseChild =
@@ -172,6 +176,10 @@ public class InfrastructureTemplateServiceBaseTest {
 		when(provisioningService.get(anyString(), anyString(), any())).thenReturn(expectedCmdDtoList.toArray(new ComputationalMetadataDTO[]{}));
 		when(projectDAO.get(anyString())).thenReturn(Optional.of(new ProjectDTO("project", Collections.emptySet(),
 				null, null, null, null, true)));
+		when(configuration.getMinEmrInstanceCount()).thenReturn(1);
+		when(configuration.getMaxEmrInstanceCount()).thenReturn(2);
+		when(configuration.getMaxEmrSpotInstanceBidPct()).thenReturn(3);
+		when(configuration.getMinEmrSpotInstanceBidPct()).thenReturn(4);
 
 		UserInfo userInfo = new UserInfo("test", "token");
 		try {
@@ -188,19 +196,19 @@ public class InfrastructureTemplateServiceBaseTest {
 			IllegalAccessException {
 		Field computationalMetadataDTO1 = object1.getClass().getDeclaredField("computationalMetadataDTO");
 		computationalMetadataDTO1.setAccessible(true);
-		Field computationalMetadataDTO2 = object2.getClass().getDeclaredField("computationalMetadataDTO");
+		Field computationalMetadataDTO2 = object2.getClass().getSuperclass().getDeclaredField("computationalMetadataDTO");
 		computationalMetadataDTO2.setAccessible(true);
 		return computationalMetadataDTO1.get(object1).equals(computationalMetadataDTO2.get(object2));
 	}
 
-	private class InfrastructureTemplateServiceBaseChild extends InfrastructureTemplateServiceBase {
-		@Override
+	private EndpointDTO endpointDTO() {
+		return new EndpointDTO("test", "url", "", null, EndpointDTO.EndpointStatus.ACTIVE, CloudProvider.AWS);
+	}
+
+	private class InfrastructureTemplateServiceBaseChild extends InfrastructureTemplateServiceImpl {
+
 		protected FullComputationalTemplate getCloudFullComputationalTemplate(ComputationalMetadataDTO metadataDTO) {
 			return new FullComputationalTemplate(metadataDTO);
 		}
 	}
-
-	private EndpointDTO endpointDTO() {
-		return new EndpointDTO("test", "url", "", null, EndpointDTO.EndpointStatus.ACTIVE);
-	}
 }
diff --git a/services/self-service/src/test/java/com/epam/dlab/backendapi/service/impl/LibraryServiceImplTest.java b/services/self-service/src/test/java/com/epam/dlab/backendapi/service/impl/LibraryServiceImplTest.java
index 7a9f734..a9e0b41 100644
--- a/services/self-service/src/test/java/com/epam/dlab/backendapi/service/impl/LibraryServiceImplTest.java
+++ b/services/self-service/src/test/java/com/epam/dlab/backendapi/service/impl/LibraryServiceImplTest.java
@@ -30,6 +30,7 @@ import com.epam.dlab.backendapi.resources.dto.LibKey;
 import com.epam.dlab.backendapi.resources.dto.LibraryStatus;
 import com.epam.dlab.backendapi.service.EndpointService;
 import com.epam.dlab.backendapi.util.RequestBuilder;
+import com.epam.dlab.cloud.CloudProvider;
 import com.epam.dlab.dto.UserInstanceDTO;
 import com.epam.dlab.dto.computational.UserComputationalResource;
 import com.epam.dlab.dto.exploratory.LibInstallDTO;
@@ -420,7 +421,7 @@ public class LibraryServiceImplTest {
 	}
 
 	private EndpointDTO endpointDTO() {
-		return new EndpointDTO("test", "url", "", null, EndpointDTO.EndpointStatus.ACTIVE);
+		return new EndpointDTO("test", "url", "", null, EndpointDTO.EndpointStatus.ACTIVE, CloudProvider.AWS);
 	}
 
 }


---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@dlab.apache.org
For additional commands, e-mail: commits-help@dlab.apache.org


[incubator-dlab] 03/03: Updated self-service.yml

Posted by of...@apache.org.
This is an automated email from the ASF dual-hosted git repository.

ofuks pushed a commit to branch multiple-cloud
in repository https://gitbox.apache.org/repos/asf/incubator-dlab.git

commit 74247b053f968e15b8a93a86923f6321818fca8e
Author: Oleh Fuks <ol...@gmail.com>
AuthorDate: Thu Jan 9 19:18:04 2020 +0200

    Updated self-service.yml
---
 services/self-service/self-service.yml | 8 --------
 1 file changed, 8 deletions(-)

diff --git a/services/self-service/self-service.yml b/services/self-service/self-service.yml
index 9edca97..f61e760 100644
--- a/services/self-service/self-service.yml
+++ b/services/self-service/self-service.yml
@@ -21,16 +21,13 @@
 
 <#include "ssn.yml">
 
-<#if CLOUD_TYPE == "aws">
 # Minimum and maximum number of slave EMR instances than could be created
 minEmrInstanceCount: 2
 maxEmrInstanceCount: 14
 # Minimum and maximum percentage cost for slave EMR spot instances biding
 minEmrSpotInstanceBidPct: 20
 maxEmrSpotInstanceBidPct: 90
-</#if>
 
-<#if CLOUD_TYPE == "gcp">
 # Maximum length for gcp user name (due to gcp restrictions)
 maxUserNameLength: 10
 # Minimum and maximum number of slave Dataproc instances that could be created
@@ -38,7 +35,6 @@ minInstanceCount: 3
 maxInstanceCount: 15
 minDataprocPreemptibleCount: 0
 gcpOuauth2AuthenticationEnabled: false
-</#if>
 
 # Boundaries for Spark cluster creation
 minSparkInstanceCount: 2
@@ -61,11 +57,7 @@ billingConfFile: ${sys['user.dir']}/../billing/billing.yml
 billingConfFile: ${DLAB_CONF_DIR}/billing.yml
 </#if>
 
-<#if CLOUD_TYPE == "azure">
-azureUseLdap: <LOGIN_USE_LDAP>
 ssnInstanceSize: <SSN_INSTANCE_SIZE>
-maxSessionDurabilityMilliseconds: 288000000
-</#if>
 
 serviceBaseName: SERVICE_BASE_NAME
 os: OPERATION_SYSTEM


---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@dlab.apache.org
For additional commands, e-mail: commits-help@dlab.apache.org