You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@dlab.apache.org by bh...@apache.org on 2019/10/21 08:03:29 UTC
[incubator-dlab] branch develop updated: DLAB-000 added endpoint
parameter for exploratory start/stop
This is an automated email from the ASF dual-hosted git repository.
bhliva pushed a commit to branch develop
in repository https://gitbox.apache.org/repos/asf/incubator-dlab.git
The following commit(s) were added to refs/heads/develop by this push:
new 32021a5 DLAB-000 added endpoint parameter for exploratory start/stop
32021a5 is described below
commit 32021a5eb7da93991bb03c30fe95f1ff8fcc5a26
Author: bhliva <bo...@epam.com>
AuthorDate: Mon Oct 21 11:03:11 2019 +0300
DLAB-000 added endpoint parameter for exploratory start/stop
---
.../com/epam/dlab/dto/exploratory/ExploratoryBaseDTO.java | 14 ++++++++++++++
.../java/com/epam/dlab/backendapi/util/RequestBuilder.java | 9 ++++++---
2 files changed, 20 insertions(+), 3 deletions(-)
diff --git a/services/dlab-model/src/main/java/com/epam/dlab/dto/exploratory/ExploratoryBaseDTO.java b/services/dlab-model/src/main/java/com/epam/dlab/dto/exploratory/ExploratoryBaseDTO.java
index 6550320..37d0af3 100644
--- a/services/dlab-model/src/main/java/com/epam/dlab/dto/exploratory/ExploratoryBaseDTO.java
+++ b/services/dlab-model/src/main/java/com/epam/dlab/dto/exploratory/ExploratoryBaseDTO.java
@@ -30,6 +30,8 @@ public class ExploratoryBaseDTO<T extends ExploratoryBaseDTO<?>> extends Resourc
private String notebookImage;
@JsonProperty("project_name")
private String project;
+ @JsonProperty("endpoint_name")
+ private String endpoint;
public String getNotebookImage() {
return notebookImage;
@@ -48,6 +50,10 @@ public class ExploratoryBaseDTO<T extends ExploratoryBaseDTO<?>> extends Resourc
setProject(project);
return self;
}
+ public T withEndpoint(String endpoint) {
+ setEndpoint(project);
+ return self;
+ }
@Override
public ToStringHelper toStringHelper(Object self) {
@@ -63,6 +69,14 @@ public class ExploratoryBaseDTO<T extends ExploratoryBaseDTO<?>> extends Resourc
this.project = project;
}
+ public String getEndpoint() {
+ return endpoint;
+ }
+
+ public void setEndpoint(String endpoint) {
+ this.endpoint = endpoint;
+ }
+
@Override
public String toString() {
return toStringHelper(this).toString();
diff --git a/services/self-service/src/main/java/com/epam/dlab/backendapi/util/RequestBuilder.java b/services/self-service/src/main/java/com/epam/dlab/backendapi/util/RequestBuilder.java
index 9f450c8..48a9b8d 100644
--- a/services/self-service/src/main/java/com/epam/dlab/backendapi/util/RequestBuilder.java
+++ b/services/self-service/src/main/java/com/epam/dlab/backendapi/util/RequestBuilder.java
@@ -242,7 +242,8 @@ public class RequestBuilder {
.withNotebookImage(userInstance.getImageName())
.withExploratoryName(userInstance.getExploratoryName())
.withReuploadKeyRequired(userInstance.isReuploadKeyRequired())
- .withProject(userInstance.getProject());
+ .withProject(userInstance.getProject())
+ .withEndpoint(userInstance.getEndpoint());
case AZURE:
T exploratoryStart = (T) newResourceSysBaseDTO(userInfo, ExploratoryActionStartAzure.class)
.withNotebookInstanceName(userInstance.getExploratoryId())
@@ -250,7 +251,8 @@ public class RequestBuilder {
.withNotebookImage(userInstance.getImageName())
.withExploratoryName(userInstance.getExploratoryName())
.withReuploadKeyRequired(userInstance.isReuploadKeyRequired())
- .withProject(userInstance.getProject());
+ .withProject(userInstance.getProject())
+ .withEndpoint(userInstance.getEndpoint());
if (settingsDAO.isAzureDataLakeEnabled()) {
((ExploratoryActionStartAzure) exploratoryStart)
@@ -289,7 +291,8 @@ public class RequestBuilder {
.withExploratoryName(userInstance.getExploratoryName())
.withNotebookImage(userInstance.getImageName())
.withReuploadKeyRequired(userInstance.isReuploadKeyRequired())
- .withProject(userInstance.getProject());
+ .withProject(userInstance.getProject())
+ .withEndpoint(userInstance.getEndpoint());
}
public ExploratoryGitCredsUpdateDTO newGitCredentialsUpdate(UserInfo userInfo, UserInstanceDTO instanceDTO,
---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@dlab.apache.org
For additional commands, e-mail: commits-help@dlab.apache.org