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

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


The following commit(s) were added to refs/heads/DLAB-384 by this push:
     new a782f22  Added type of role for gcp
a782f22 is described below

commit a782f222e57f9b6d23b84fa299944fd68a004184
Author: Oleh Fuks <[email protected]>
AuthorDate: Thu Mar 5 16:33:55 2020 +0200

    Added type of role for gcp
---
 .../dlab/backendapi/resources/dto/UserRoleDto.java | 10 ++++++++-
 .../src/main/resources/mongo/gcp/mongo_roles.json  | 26 ++++++++++++++++++++++
 2 files changed, 35 insertions(+), 1 deletion(-)

diff --git 
a/services/self-service/src/main/java/com/epam/dlab/backendapi/resources/dto/UserRoleDto.java
 
b/services/self-service/src/main/java/com/epam/dlab/backendapi/resources/dto/UserRoleDto.java
index 21ce26d..b1d3337 100644
--- 
a/services/self-service/src/main/java/com/epam/dlab/backendapi/resources/dto/UserRoleDto.java
+++ 
b/services/self-service/src/main/java/com/epam/dlab/backendapi/resources/dto/UserRoleDto.java
@@ -31,10 +31,10 @@ import java.util.Set;
 @ToString
 @JsonIgnoreProperties(ignoreUnknown = true)
 public class UserRoleDto {
-
        @JsonProperty("_id")
        private String id;
        private String description;
+       private Type type;
        private Set<String> pages;
        private Set<String> computationals;
        private Set<String> exploratories;
@@ -42,4 +42,12 @@ public class UserRoleDto {
        private Set<String> exploratoryShapes;
        private Set<String> groups;
 
+       private enum Type {
+               NOTEBOOK,
+               COMPUTATIONAL,
+               NOTEBOOK_SHAPE,
+               COMPUTATIONAL_SHAPE,
+               BILLING,
+               ADMINISTRATION
+       }
 }
diff --git 
a/services/self-service/src/main/resources/mongo/gcp/mongo_roles.json 
b/services/self-service/src/main/resources/mongo/gcp/mongo_roles.json
index 43d12e3..d3c22ba 100644
--- a/services/self-service/src/main/resources/mongo/gcp/mongo_roles.json
+++ b/services/self-service/src/main/resources/mongo/gcp/mongo_roles.json
@@ -2,6 +2,7 @@
   {
     "_id": "nbShapes_n1-highcpu-2_fetching",
     "description": "Use n1-highcpu-2 instance shape for notebook",
+    "type": "NOTEBOOK_SHAPE",
     "exploratory_shapes": [
       "n1-highcpu-2"
     ],
@@ -12,6 +13,7 @@
   {
     "_id": "nbShapes_n1-highcpu-8_fetching",
     "description": "Use n1-highcpu-8 instance shape for notebook",
+    "type": "NOTEBOOK_SHAPE",
     "exploratory_shapes": [
       "n1-highcpu-8"
     ],
@@ -22,6 +24,7 @@
   {
     "_id": "nbShapes_n1-highcpu-32_fetching",
     "description": "Use n1-highcpu-32 instance shape for notebook",
+    "type": "NOTEBOOK_SHAPE",
     "exploratory_shapes": [
       "n1-highcpu-32"
     ],
@@ -32,6 +35,7 @@
   {
     "_id": "nbShapes_n1-highmem-4_fetching",
     "description": "Use n1-highmem-4 instance shape for notebook",
+    "type": "NOTEBOOK_SHAPE",
     "exploratory_shapes": [
       "n1-highmem-4"
     ],
@@ -42,6 +46,7 @@
   {
     "_id": "nbShapes_n1-highmem-16_fetching",
     "description": "Use n1-highmem-16 instance shape for notebook",
+    "type": "NOTEBOOK_SHAPE",
     "exploratory_shapes": [
       "n1-highmem-16"
     ],
@@ -52,6 +57,7 @@
   {
     "_id": "nbShapes_n1-highmem-32_fetching",
     "description": "Use n1-highmem-32 instance shape for notebook",
+    "type": "NOTEBOOK_SHAPE",
     "exploratory_shapes": [
       "n1-highmem-32"
     ],
@@ -62,6 +68,7 @@
   {
     "_id": "nbShapes_n1-standard-2_fetching",
     "description": "Use n1-standard-2 instance shape for notebook",
+    "type": "NOTEBOOK_SHAPE",
     "exploratory_shapes": [
       "n1-standard-2"
     ],
@@ -72,6 +79,7 @@
   {
     "_id": "nbCreateDeeplearning",
     "description": "Create Notebook Deep Learning",
+    "type": "NOTEBOOK",
     "exploratories": [
       "docker.dlab-deeplearning"
     ],
@@ -82,6 +90,7 @@
   {
     "_id": "nbCreateJupyter",
     "description": "Create Notebook Jupyter",
+    "type": "NOTEBOOK",
     "exploratories": [
       "docker.dlab-jupyter"
     ],
@@ -92,6 +101,7 @@
   {
     "_id": "nbCreateJupyterLab",
     "description": "Create Notebook JupyterLab",
+    "type": "NOTEBOOK",
     "exploratories": [
       "docker.dlab-jupyterlab"
     ],
@@ -102,6 +112,7 @@
   {
     "_id": "nbCreateSuperset",
     "description": "Create Notebook Superset",
+    "type": "NOTEBOOK",
     "exploratories": [
       "docker.dlab-superset"
     ],
@@ -112,6 +123,7 @@
   {
     "_id": "nbCreateRstudio",
     "description": "Create Notebook RStudio",
+    "type": "NOTEBOOK",
     "exploratories": [
       "docker.dlab-rstudio"
     ],
@@ -122,6 +134,7 @@
   {
     "_id": "nbCreateTensor",
     "description": "Create Notebook Jupyter with TensorFlow",
+    "type": "NOTEBOOK",
     "exploratories": [
       "docker.dlab-tensor"
     ],
@@ -132,6 +145,7 @@
   {
     "_id": "nbCreateTensorRstudio",
     "description": "Create Notebook RStudio with TensorFlow",
+    "type": "NOTEBOOK",
     "exploratories": [
       "docker.dlab-tensor-rstudio"
     ],
@@ -142,6 +156,7 @@
   {
     "_id": "nbCreateZeppelin",
     "description": "Create Notebook Apache Zeppelin",
+    "type": "NOTEBOOK",
     "exploratories": [
       "docker.dlab-zeppelin"
     ],
@@ -152,6 +167,7 @@
   {
     "_id": "nbCreateDataEngine",
     "description": "Create Data Engine",
+    "type": "COMPUTATIONAL",
     "computationals": [
       "docker.dlab-dataengine"
     ],
@@ -162,6 +178,7 @@
   {
     "_id": "nbCreateDataEngineService",
     "description": "Create Data Engine Service",
+    "type": "COMPUTATIONAL",
     "computationals": [
       "docker.dlab-dataengine-service"
     ],
@@ -172,6 +189,7 @@
   {
     "_id": "compShapes_n1-standard-2_fetching",
     "description": "Use n1-standard-2 instance shape for cluster",
+    "type": "COMPUTATIONAL_SHAPE",
     "computational_shapes": [
       "n1-standard-2"
     ],
@@ -182,6 +200,7 @@
   {
     "_id": "compShapes_n1-highmem-4_fetching",
     "description": "Use n1-highmem-4 instance shape for cluster",
+    "type": "COMPUTATIONAL_SHAPE",
     "computational_shapes": [
       "n1-highmem-4"
     ],
@@ -192,6 +211,7 @@
   {
     "_id": "compShapes_n1-highmem-16_fetching",
     "description": "Use n1-highmem-16 instance shape for cluster",
+    "type": "COMPUTATIONAL_SHAPE",
     "computational_shapes": [
       "n1-highmem-16"
     ],
@@ -202,6 +222,7 @@
   {
     "_id": "compShapes_n1-highmem-32_fetching",
     "description": "Use n1-highmem-32 instance shape for cluster",
+    "type": "COMPUTATIONAL_SHAPE",
     "computational_shapes": [
       "n1-highmem-32"
     ],
@@ -212,6 +233,7 @@
   {
     "_id": "compShapes_n1-highcpu-8_fetching",
     "description": "Use n1-highcpu-8 instance shape for cluster",
+    "type": "COMPUTATIONAL_SHAPE",
     "computational_shapes": [
       "n1-highcpu-8"
     ],
@@ -222,6 +244,7 @@
   {
     "_id": "compShapes_n1-highcpu-2_fetching",
     "description": "Use n1-highcpu-2 instance shape for cluster",
+    "type": "COMPUTATIONAL_SHAPE",
     "computational_shapes": [
       "n1-highcpu-2"
     ],
@@ -232,6 +255,7 @@
   {
     "_id": "compShapes_n1-highcpu-32_fetching",
     "description": "Use n1-highcpu-32 instance shape for cluster",
+    "type": "COMPUTATIONAL_SHAPE",
     "computational_shapes": [
       "n1-highcpu-32"
     ],
@@ -242,6 +266,7 @@
   {
     "_id": "nbBillingReportFull",
     "description": "View full billing report for all users",
+    "type": "BILLING",
     "pages": [
       "/api/infrastructure_provision/billing"
     ],
@@ -252,6 +277,7 @@
   {
     "_id": "admin",
     "description": "Allow to execute administration operation",
+    "type": "ADMINISTRATION",
     "pages": [
       "environment/*",
       "/api/infrastructure/backup",


---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to