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/04/03 09:21:51 UTC

[incubator-dlab] branch demo_gcp_billing created (now ed76ebb)

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

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


      at ed76ebb  DLAB-000 added possibility to download billing report on gcp

This branch includes the following new commits:

     new 105ef3a  DLAB-23 billing updated for aws
     new ccfa823  DLAB-23 dictionary updated
     new 236e8b6  DLAB-23 added billing for gcp
     new 0522016  DLAB-000 license headers updated
     new 217462d  DLAB-23 billing updated
     new 12757e7  Merge remote-tracking branch 'remotes/origin/develop' into demo_gcp_billing
     new ed76ebb  DLAB-000 added possibility to download billing report on gcp

The 7 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] 03/07: DLAB-23 added billing for gcp

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

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

commit 236e8b64def5a9909a7af1b999137b1bae638c6b
Author: bhliva <bo...@epam.com>
AuthorDate: Thu Mar 14 14:47:56 2019 +0200

    DLAB-23 added billing for gcp
---
 pom.xml                                            |  18 ++-
 services/billing-gcp/billing.yml                   |  15 --
 services/billing-gcp/pom.xml                       | 109 ++++++--------
 .../dlab/billing/gcp/BillingApplicationGcp.java    |  24 ---
 .../dlab/billing/gcp/BillingGcpApplication.java    |  36 +++++
 .../com/epam/dlab/billing/gcp/dao/BillingDAO.java  |  29 ++++
 .../billing/gcp/dao/impl/BigQueryBillingDAO.java   |  78 ++++++++++
 .../com/epam/dlab/billing/gcp/documents/Edge.java  |  32 ++++
 .../dlab/billing/gcp/documents/UserInstance.java   |  54 +++++++
 .../epam/dlab/billing/gcp/model/BillingData.java   |  69 +++++++++
 .../dlab/billing/gcp/model/GcpBillingData.java     |  38 +++++
 .../billing/gcp/repository/BillingRepository.java  |  26 ++++
 .../billing/gcp/repository/EdgeRepository.java     |  26 ++++
 .../gcp/repository/UserInstanceRepository.java     |  30 ++++
 .../billing/gcp/scheduler/BillingScheduler.java    |  44 ++++++
 .../dlab/billing/gcp/service/BillingService.java   |  25 ++++
 .../billing/gcp/service/BillingServiceImpl.java    | 164 +++++++++++++++++++++
 .../epam/dlab/billing/gcp/util/BillingUtils.java   |  97 ++++++++++++
 .../billing-gcp/src/main/resources/application.yml |  12 ++
 19 files changed, 818 insertions(+), 108 deletions(-)

diff --git a/pom.xml b/pom.xml
index 537de40..6d20c4b 100644
--- a/pom.xml
+++ b/pom.xml
@@ -35,25 +35,31 @@ limitations under the License.
     <profiles>
         <profile>
             <id>aws</id>
+            <modules>
+                <module>services/billing-aws</module>
+                <module>services/security-aws</module>
+            </modules>
         </profile>
         <profile>
             <id>azure</id>
+            <modules>
+                <module>services/billing-azure</module>
+                <module>services/security-azure</module>
+            </modules>
         </profile>
         <profile>
             <id>gcp</id>
+            <modules>
+                <module>services/billing-gcp</module>
+                <module>services/security-gcp</module>
+            </modules>
         </profile>
     </profiles>
 
     <modules>
         <module>services/common</module>
-        <module>services/billing-aws</module>
         <module>services/provisioning-service</module>
         <module>services/self-service</module>
-        <module>services/billing-azure</module>
-        <module>services/billing-gcp</module>
-        <module>services/security-azure</module>
-        <module>services/security-gcp</module>
-        <module>services/security-aws</module>
         <module>services/security-service</module>
         <module>services/dlab-process</module>
         <module>services/dlab-auth-common</module>
diff --git a/services/billing-gcp/billing.yml b/services/billing-gcp/billing.yml
deleted file mode 100644
index 633ecda..0000000
--- a/services/billing-gcp/billing.yml
+++ /dev/null
@@ -1,15 +0,0 @@
-#/*
-# * Copyright (c) 2017, EPAM SYSTEMS INC
-# *
-# * Licensed under the Apache License, Version 2.0 (the "License");
-# * you may not use this file except in compliance with the License.
-# * You may obtain a copy of the License at
-# *
-# *     http://www.apache.org/licenses/LICENSE-2.0
-# *
-# * Unless required by applicable law or agreed to in writing, software
-# * distributed under the License is distributed on an "AS IS" BASIS,
-# * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-# * See the License for the specific language governing permissions and
-# * limitations under the License.
-# */
diff --git a/services/billing-gcp/pom.xml b/services/billing-gcp/pom.xml
index fb831cb..928b77f 100644
--- a/services/billing-gcp/pom.xml
+++ b/services/billing-gcp/pom.xml
@@ -1,88 +1,71 @@
 <?xml version="1.0" encoding="UTF-8"?>
 <!--
-  ~ Copyright (c) 2017, EPAM SYSTEMS INC
+  ~ 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
   ~
-  ~ Licensed under the Apache License, Version 2.0 (the "License");
-  ~ you may not use this file except in compliance with the License.
-  ~ You may obtain a copy of the License at
+  ~   http://www.apache.org/licenses/LICENSE-2.0
   ~
-  ~     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.
+  ~ 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.
   -->
 
-<project xmlns="http://maven.apache.org/POM/4.0.0"
-         xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
          xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
+    <modelVersion>4.0.0</modelVersion>
     <parent>
-        <artifactId>dlab</artifactId>
         <groupId>com.epam.dlab</groupId>
+        <artifactId>dlab</artifactId>
         <version>1.0</version>
         <relativePath>../../pom.xml</relativePath>
     </parent>
-    <modelVersion>4.0.0</modelVersion>
-
     <artifactId>billing-gcp</artifactId>
+    <name>billing-gcp</name>
+
+    <dependencyManagement>
+        <dependencies>
+            <dependency>
+                <groupId>org.springframework.boot</groupId>
+                <artifactId>spring-boot-dependencies</artifactId>
+                <version>2.1.3.RELEASE</version>
+                <type>pom</type>
+                <scope>import</scope>
+            </dependency>
+        </dependencies>
+    </dependencyManagement>
 
     <dependencies>
         <dependency>
-            <groupId>com.epam.dlab</groupId>
-            <artifactId>common</artifactId>
+            <groupId>org.springframework.boot</groupId>
+            <artifactId>spring-boot-starter-data-mongodb</artifactId>
+        </dependency>
+
+        <dependency>
+            <groupId>org.springframework.boot</groupId>
+            <artifactId>spring-boot-starter-web</artifactId>
+        </dependency>
+        <dependency>
+            <groupId>com.google.cloud</groupId>
+            <artifactId>google-cloud-bigquery</artifactId>
+            <version>1.59.0</version>
         </dependency>
     </dependencies>
 
     <build>
         <plugins>
             <plugin>
-                <artifactId>maven-shade-plugin</artifactId>
-                <version>${maven-shade-plugin.version}</version>
-                <executions>
-                    <execution>
-                        <phase>package</phase>
-                        <goals>
-                            <goal>shade</goal>
-                        </goals>
-                        <configuration>
-                            <createDependencyReducedPom>false</createDependencyReducedPom>
-                            <minimizeJar>true</minimizeJar>
-                            <filters>
-                                <filter>
-                                    <artifact>*:*</artifact>
-                                    <excludes>
-                                        <exclude>META-INF/*.SF</exclude>
-                                        <exclude>META-INF/*.DSA</exclude>
-                                        <exclude>META-INF/*.RSA</exclude>
-                                    </excludes>
-                                </filter>
-                            </filters>
-                            <transformers>
-                                <transformer
-                                        implementation="org.apache.maven.plugins.shade.resource.ServicesResourceTransformer"/>
-                                <transformer
-                                        implementation="org.apache.maven.plugins.shade.resource.ManifestResourceTransformer">
-                                    <mainClass>com.epam.dlab.billing.gcp.BillingApplicationGcp</mainClass>
-                                    <manifestEntries>
-                                        <Created-By>&lt;EPAM&gt; Systems</Created-By>
-                                        <Name>com/epam/dlab</Name>
-                                        <Implementation-Title>DLab GCP Billing Module</Implementation-Title>
-                                        <Implementation-Version>${dlab.version}</Implementation-Version>
-                                        <Implementation-Vendor>&lt;EPAM&gt; Systems</Implementation-Vendor>
-                                        <Build-Time>${maven.build.timestamp}</Build-Time>
-                                        <Build-OS>${os.name}</Build-OS>
-                                        <GIT-Branch>${scmBranch}</GIT-Branch>
-                                        <GIT-Commit>${buildNumber}</GIT-Commit>
-                                    </manifestEntries>
-                                </transformer>
-                            </transformers>
-                        </configuration>
-                    </execution>
-                </executions>
+                <groupId>org.springframework.boot</groupId>
+                <artifactId>spring-boot-maven-plugin</artifactId>
             </plugin>
         </plugins>
     </build>
-    
-</project>
\ No newline at end of file
+
+</project>
diff --git a/services/billing-gcp/src/main/java/com/epam/dlab/billing/gcp/BillingApplicationGcp.java b/services/billing-gcp/src/main/java/com/epam/dlab/billing/gcp/BillingApplicationGcp.java
deleted file mode 100644
index f5c7921..0000000
--- a/services/billing-gcp/src/main/java/com/epam/dlab/billing/gcp/BillingApplicationGcp.java
+++ /dev/null
@@ -1,24 +0,0 @@
-/*
- * Copyright (c) 2017, EPAM SYSTEMS INC
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- *     http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-
-package com.epam.dlab.billing.gcp;
-
-public class BillingApplicationGcp {
-
-	public static void main(String[] args) {
-
-	}
-}
diff --git a/services/billing-gcp/src/main/java/com/epam/dlab/billing/gcp/BillingGcpApplication.java b/services/billing-gcp/src/main/java/com/epam/dlab/billing/gcp/BillingGcpApplication.java
new file mode 100644
index 0000000..74310b1
--- /dev/null
+++ b/services/billing-gcp/src/main/java/com/epam/dlab/billing/gcp/BillingGcpApplication.java
@@ -0,0 +1,36 @@
+/*
+ * 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.billing.gcp;
+
+import org.springframework.boot.SpringApplication;
+import org.springframework.boot.autoconfigure.SpringBootApplication;
+import org.springframework.data.mongodb.repository.config.EnableMongoRepositories;
+import org.springframework.scheduling.annotation.EnableScheduling;
+
+@SpringBootApplication
+@EnableScheduling
+@EnableMongoRepositories
+public class BillingGcpApplication {
+
+    public static void main(String[] args) {
+        SpringApplication.run(BillingGcpApplication.class, args);
+    }
+
+}
diff --git a/services/billing-gcp/src/main/java/com/epam/dlab/billing/gcp/dao/BillingDAO.java b/services/billing-gcp/src/main/java/com/epam/dlab/billing/gcp/dao/BillingDAO.java
new file mode 100644
index 0000000..99ed367
--- /dev/null
+++ b/services/billing-gcp/src/main/java/com/epam/dlab/billing/gcp/dao/BillingDAO.java
@@ -0,0 +1,29 @@
+/*
+ * 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.billing.gcp.dao;
+
+import com.epam.dlab.billing.gcp.model.GcpBillingData;
+
+import java.util.List;
+
+public interface BillingDAO {
+
+    List<GcpBillingData> getBillingData(String ssnBaseName) throws InterruptedException;
+}
diff --git a/services/billing-gcp/src/main/java/com/epam/dlab/billing/gcp/dao/impl/BigQueryBillingDAO.java b/services/billing-gcp/src/main/java/com/epam/dlab/billing/gcp/dao/impl/BigQueryBillingDAO.java
new file mode 100644
index 0000000..357e5ac
--- /dev/null
+++ b/services/billing-gcp/src/main/java/com/epam/dlab/billing/gcp/dao/impl/BigQueryBillingDAO.java
@@ -0,0 +1,78 @@
+/*
+ * 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.billing.gcp.dao.impl;
+
+import com.epam.dlab.billing.gcp.dao.BillingDAO;
+import com.epam.dlab.billing.gcp.model.GcpBillingData;
+import com.google.cloud.bigquery.*;
+import org.springframework.beans.factory.annotation.Value;
+import org.springframework.stereotype.Component;
+
+import java.time.Instant;
+import java.time.LocalDate;
+import java.time.ZoneId;
+import java.util.List;
+import java.util.stream.Collectors;
+import java.util.stream.StreamSupport;
+
+@Component
+public class BigQueryBillingDAO implements BillingDAO {
+
+    public final String tableName;
+
+    private static final String QUERY = "SELECT b.sku.description usageType,TIMESTAMP_TRUNC(usage_start_time, DAY, 'UTC') usage_date_from, TIMESTAMP_TRUNC(usage_end_time, DAY, 'UTC') usage_date_to, sum(b.cost) cost, b.service.description product, label.value, currency\n" +
+            "FROM `" + "%s" + "` b\n" +
+            "CROSS JOIN UNNEST(b.labels) as label\n" +
+            "where label.key = 'name' and cost != 0 and label.value like @ssnBaseName\n" +
+            "group by usageType, usage_date_from, usage_date_to, product, value, currency";
+    private final BigQuery service = BigQueryOptions.getDefaultInstance().getService();
+
+    public BigQueryBillingDAO(@Value("${tableName}") String tableName) {
+        this.tableName = tableName;
+    }
+
+    @Override
+    public List<GcpBillingData> getBillingData(String ssnBaseName) throws InterruptedException {
+        QueryJobConfiguration queryConfig = QueryJobConfiguration.newBuilder(String.format(QUERY, tableName))
+                .addNamedParameter("ssnBaseName", QueryParameterValue.string(ssnBaseName + "%"))
+                .addNamedParameter("dataset", QueryParameterValue.string(tableName))
+                .build();
+        return StreamSupport.stream(service.query(queryConfig).getValues().spliterator(), false)
+                .map(this::toBillingData)
+                .collect(Collectors.toList());
+    }
+
+    private GcpBillingData toBillingData(FieldValueList fields) {
+
+        return GcpBillingData.builder()
+                .usageDateFrom(toLocalDate(fields, "usage_date_from"))
+                .usageDateTo(toLocalDate(fields, "usage_date_to"))
+                .cost(fields.get("cost").getNumericValue())
+                .product(fields.get("product").getStringValue())
+                .usageType(fields.get("usageType").getStringValue())
+                .currency(fields.get("currency").getStringValue())
+                .tag(fields.get("value").getStringValue()).build();
+    }
+
+    private LocalDate toLocalDate(FieldValueList fieldValues, String timestampFieldName) {
+        return LocalDate.from(Instant.ofEpochMilli(fieldValues.get(timestampFieldName).getTimestampValue() / 1000)
+                .atZone(ZoneId.systemDefault()));
+    }
+}
diff --git a/services/billing-gcp/src/main/java/com/epam/dlab/billing/gcp/documents/Edge.java b/services/billing-gcp/src/main/java/com/epam/dlab/billing/gcp/documents/Edge.java
new file mode 100644
index 0000000..26c0a58
--- /dev/null
+++ b/services/billing-gcp/src/main/java/com/epam/dlab/billing/gcp/documents/Edge.java
@@ -0,0 +1,32 @@
+/*
+ * 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.billing.gcp.documents;
+
+import com.fasterxml.jackson.annotation.JsonProperty;
+import lombok.Data;
+import org.springframework.data.mongodb.core.mapping.Document;
+
+@Document(collection = "userCloudCredentials")
+@Data
+public class Edge {
+
+    @JsonProperty("_id")
+    private String id;
+}
diff --git a/services/billing-gcp/src/main/java/com/epam/dlab/billing/gcp/documents/UserInstance.java b/services/billing-gcp/src/main/java/com/epam/dlab/billing/gcp/documents/UserInstance.java
new file mode 100644
index 0000000..b6680a0
--- /dev/null
+++ b/services/billing-gcp/src/main/java/com/epam/dlab/billing/gcp/documents/UserInstance.java
@@ -0,0 +1,54 @@
+/*
+ * 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.billing.gcp.documents;
+
+import com.epam.dlab.billing.gcp.model.BillingData;
+import lombok.Data;
+import org.springframework.data.annotation.Id;
+import org.springframework.data.mongodb.core.mapping.Document;
+import org.springframework.data.mongodb.core.mapping.Field;
+
+import java.util.List;
+
+@Document(collection = "userInstances")
+@Data
+public class UserInstance {
+
+    @Id
+    private String id;
+    @Field("user")
+    private String user;
+    @Field("exploratory_name")
+    private String exploratoryName;
+    @Field("exploratory_id")
+    private String exploratoryId;
+    private List<BillingData> billing;
+    private Double cost;
+    @Field("computational_resources")
+    private List<ComputationalResource> computationalResources;
+
+    @Data
+    public class ComputationalResource {
+        @Field("computational_name")
+        private String computationalName;
+        @Field("computational_id")
+        private String computationalId;
+    }
+}
diff --git a/services/billing-gcp/src/main/java/com/epam/dlab/billing/gcp/model/BillingData.java b/services/billing-gcp/src/main/java/com/epam/dlab/billing/gcp/model/BillingData.java
new file mode 100644
index 0000000..1039e8b
--- /dev/null
+++ b/services/billing-gcp/src/main/java/com/epam/dlab/billing/gcp/model/BillingData.java
@@ -0,0 +1,69 @@
+/*
+ * 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.billing.gcp.model;
+
+import lombok.Builder;
+import lombok.Data;
+import org.springframework.data.annotation.Id;
+import org.springframework.data.mongodb.core.mapping.Document;
+import org.springframework.data.mongodb.core.mapping.Field;
+
+import java.time.LocalDate;
+
+@Data
+@Builder
+@Document(collection = "billing")
+public class BillingData {
+    @Id
+    private String id;
+    private String user;
+    @Field("resource_name")
+    private String displayName;
+    private String resourceName;
+    @Field("usage_date_start")
+    private LocalDate usageDateFrom;
+    @Field("usage_date_end")
+    private LocalDate usageDateTo;
+    @Field("usage_date")
+    private String usageDate;
+    private String product;
+    private String usageType;
+    private Double cost;
+    @Field("currency_code")
+    private String currency;
+    private String exploratoryName;
+    private String computationalName;
+    @Field("dlab_id")
+    private String dlabId;
+    @Field("dlab_resource_type")
+    private ResourceType resourceType;
+
+
+    public enum ResourceType {
+        EDGE,
+        SSN,
+        SHARED_BUCKET,
+        SSN_BUCKET,
+        EDGE_BUCKET,
+        VOLUME,
+        EXPLORATORY,
+        COMPUTATIONAL
+    }
+}
diff --git a/services/billing-gcp/src/main/java/com/epam/dlab/billing/gcp/model/GcpBillingData.java b/services/billing-gcp/src/main/java/com/epam/dlab/billing/gcp/model/GcpBillingData.java
new file mode 100644
index 0000000..a11dcce
--- /dev/null
+++ b/services/billing-gcp/src/main/java/com/epam/dlab/billing/gcp/model/GcpBillingData.java
@@ -0,0 +1,38 @@
+/*
+ * 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.billing.gcp.model;
+
+import lombok.Builder;
+import lombok.Data;
+
+import java.math.BigDecimal;
+import java.time.LocalDate;
+
+@Data
+@Builder
+public class GcpBillingData {
+    private final LocalDate usageDateFrom;
+    private final LocalDate usageDateTo;
+    private final String product;
+    private final String usageType;
+    private final BigDecimal cost;
+    private final String currency;
+    private final String tag;
+}
diff --git a/services/billing-gcp/src/main/java/com/epam/dlab/billing/gcp/repository/BillingRepository.java b/services/billing-gcp/src/main/java/com/epam/dlab/billing/gcp/repository/BillingRepository.java
new file mode 100644
index 0000000..5ae66e2
--- /dev/null
+++ b/services/billing-gcp/src/main/java/com/epam/dlab/billing/gcp/repository/BillingRepository.java
@@ -0,0 +1,26 @@
+/*
+ * 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.billing.gcp.repository;
+
+import com.epam.dlab.billing.gcp.model.BillingData;
+import org.springframework.data.mongodb.repository.MongoRepository;
+
+public interface BillingRepository extends MongoRepository<BillingData, String> {
+}
diff --git a/services/billing-gcp/src/main/java/com/epam/dlab/billing/gcp/repository/EdgeRepository.java b/services/billing-gcp/src/main/java/com/epam/dlab/billing/gcp/repository/EdgeRepository.java
new file mode 100644
index 0000000..9622fa7
--- /dev/null
+++ b/services/billing-gcp/src/main/java/com/epam/dlab/billing/gcp/repository/EdgeRepository.java
@@ -0,0 +1,26 @@
+/*
+ * 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.billing.gcp.repository;
+
+import com.epam.dlab.billing.gcp.documents.Edge;
+import org.springframework.data.mongodb.repository.MongoRepository;
+
+public interface EdgeRepository extends MongoRepository<Edge, String> {
+}
diff --git a/services/billing-gcp/src/main/java/com/epam/dlab/billing/gcp/repository/UserInstanceRepository.java b/services/billing-gcp/src/main/java/com/epam/dlab/billing/gcp/repository/UserInstanceRepository.java
new file mode 100644
index 0000000..a95d033
--- /dev/null
+++ b/services/billing-gcp/src/main/java/com/epam/dlab/billing/gcp/repository/UserInstanceRepository.java
@@ -0,0 +1,30 @@
+/*
+ * 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.billing.gcp.repository;
+
+import com.epam.dlab.billing.gcp.documents.UserInstance;
+import org.springframework.data.mongodb.repository.MongoRepository;
+
+import java.util.Optional;
+
+public interface UserInstanceRepository extends MongoRepository<UserInstance, String> {
+
+    Optional<UserInstance> findByUserAndExploratoryName(String user, String exploratoryName);
+}
diff --git a/services/billing-gcp/src/main/java/com/epam/dlab/billing/gcp/scheduler/BillingScheduler.java b/services/billing-gcp/src/main/java/com/epam/dlab/billing/gcp/scheduler/BillingScheduler.java
new file mode 100644
index 0000000..f649d4c
--- /dev/null
+++ b/services/billing-gcp/src/main/java/com/epam/dlab/billing/gcp/scheduler/BillingScheduler.java
@@ -0,0 +1,44 @@
+/*
+ * 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.billing.gcp.scheduler;
+
+import com.epam.dlab.billing.gcp.service.BillingService;
+import lombok.extern.slf4j.Slf4j;
+import org.springframework.beans.factory.annotation.Autowired;
+import org.springframework.scheduling.annotation.Scheduled;
+import org.springframework.stereotype.Component;
+
+@Component
+@Slf4j
+public class BillingScheduler {
+
+    private final BillingService billingService;
+
+    @Autowired
+    public BillingScheduler(BillingService billingService) {
+        this.billingService = billingService;
+    }
+
+
+    @Scheduled(cron = "${cron}")
+    public void getBillingReport() {
+        billingService.updateBillingData();
+    }
+}
diff --git a/services/billing-gcp/src/main/java/com/epam/dlab/billing/gcp/service/BillingService.java b/services/billing-gcp/src/main/java/com/epam/dlab/billing/gcp/service/BillingService.java
new file mode 100644
index 0000000..71015aa
--- /dev/null
+++ b/services/billing-gcp/src/main/java/com/epam/dlab/billing/gcp/service/BillingService.java
@@ -0,0 +1,25 @@
+/*
+ * 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.billing.gcp.service;
+
+public interface BillingService {
+
+    void updateBillingData();
+}
diff --git a/services/billing-gcp/src/main/java/com/epam/dlab/billing/gcp/service/BillingServiceImpl.java b/services/billing-gcp/src/main/java/com/epam/dlab/billing/gcp/service/BillingServiceImpl.java
new file mode 100644
index 0000000..3c81b60
--- /dev/null
+++ b/services/billing-gcp/src/main/java/com/epam/dlab/billing/gcp/service/BillingServiceImpl.java
@@ -0,0 +1,164 @@
+/*
+ * 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.billing.gcp.service;
+
+import com.epam.dlab.billing.gcp.dao.BillingDAO;
+import com.epam.dlab.billing.gcp.documents.Edge;
+import com.epam.dlab.billing.gcp.documents.UserInstance;
+import com.epam.dlab.billing.gcp.model.BillingData;
+import com.epam.dlab.billing.gcp.model.GcpBillingData;
+import com.epam.dlab.billing.gcp.repository.BillingRepository;
+import com.epam.dlab.billing.gcp.repository.EdgeRepository;
+import com.epam.dlab.billing.gcp.repository.UserInstanceRepository;
+import com.epam.dlab.billing.gcp.util.BillingUtils;
+import com.google.common.collect.Iterables;
+import lombok.extern.slf4j.Slf4j;
+import org.springframework.beans.factory.annotation.Autowired;
+import org.springframework.beans.factory.annotation.Value;
+import org.springframework.data.mongodb.core.MongoTemplate;
+import org.springframework.data.mongodb.core.query.Query;
+import org.springframework.data.mongodb.core.query.Update;
+import org.springframework.stereotype.Service;
+
+import java.math.BigDecimal;
+import java.time.format.DateTimeFormatter;
+import java.util.LinkedList;
+import java.util.List;
+import java.util.Map;
+import java.util.Objects;
+import java.util.stream.Collector;
+import java.util.stream.Collectors;
+import java.util.stream.Stream;
+
+import static com.epam.dlab.billing.gcp.util.BillingUtils.edgeBillingDataStream;
+import static org.springframework.data.mongodb.core.query.Criteria.where;
+
+@Service
+@Slf4j
+public class BillingServiceImpl implements BillingService {
+
+    private final BillingDAO billingDAO;
+    private final EdgeRepository edgeRepository;
+    private final UserInstanceRepository userInstanceRepository;
+    private final BillingRepository billingRepository;
+    private final MongoTemplate mongoTemplate;
+    @Value("${ssnBaseName}")
+    private String ssnBaseName;
+
+    @Autowired
+    public BillingServiceImpl(BillingDAO billingDAO, EdgeRepository edgeRepository,
+                              UserInstanceRepository userInstanceRepository, BillingRepository billingRepository,
+                              MongoTemplate mongoTemplate) {
+        this.billingDAO = billingDAO;
+        this.edgeRepository = edgeRepository;
+        this.userInstanceRepository = userInstanceRepository;
+        this.billingRepository = billingRepository;
+        this.mongoTemplate = mongoTemplate;
+    }
+
+    @Override
+    public void updateBillingData() {
+        try {
+
+            final Stream<BillingData> ssnBillingDataStream = BillingUtils.ssnBillingDataStream(ssnBaseName);
+            final Stream<BillingData> billableUserInstances = userInstanceRepository.findAll()
+                    .stream()
+                    .flatMap(BillingUtils::exploratoryBillingDataStream);
+
+            final Stream<BillingData> billableEdges = edgeRepository.findAll()
+                    .stream()
+                    .map(Edge::getId)
+                    .flatMap(e -> edgeBillingDataStream(e, ssnBaseName));
+
+            final Map<String, BillingData> billableResources = Stream.of(billableUserInstances, billableEdges, ssnBillingDataStream)
+                    .flatMap(s -> s)
+                    .collect(Collectors.toMap(BillingData::getDlabId, b -> b));
+            log.trace("Billable resources are: {}", billableResources);
+            final List<BillingData> billingDataList = billingDAO.getBillingData(ssnBaseName)
+                    .stream()
+                    .map(bd -> toBillingData(bd, getOrDefault(billableResources, bd.getTag())))
+                    .collect(Collectors.toList());
+
+            billingRepository.insert(billingDataList);
+            updateExploratoryCost(billingDataList);
+
+
+        } catch (Exception e) {
+            log.error("Can not update billing due to: {}", e.getMessage());
+        }
+    }
+
+    private BillingData getOrDefault(Map<String, BillingData> billableResources, String tag) {
+        return billableResources.getOrDefault(tag, BillingData.builder().dlabId(tag).build());
+    }
+
+    private void updateExploratoryCost(List<BillingData> billingDataList) {
+        billingDataList.stream()
+                .filter(this::userAndExploratoryNamePresent)
+                .collect(groupByUserNameExploratoryNameCollector())
+                .forEach(this::updateUserExploratoryBillingData);
+    }
+
+    private void updateUserExploratoryBillingData(String user, Map<String, List<BillingData>> billableExploratoriesMap) {
+        billableExploratoriesMap.forEach((exploratoryName, billingInfoList) ->
+                updateExploratoryBillingData(user, exploratoryName, billingInfoList)
+        );
+    }
+
+    private Collector<BillingData, ?, Map<String, Map<String, List<BillingData>>>> groupByUserNameExploratoryNameCollector() {
+        return Collectors.groupingBy(BillingData::getUser, Collectors.groupingBy(BillingData::getExploratoryName));
+    }
+
+    private boolean userAndExploratoryNamePresent(BillingData bd) {
+        return Objects.nonNull(bd.getUser()) && Objects.nonNull(bd.getExploratoryName());
+    }
+
+    private void updateExploratoryBillingData(String user, String exploratoryName, List<BillingData> billingInfoList) {
+        userInstanceRepository.findByUserAndExploratoryName(user, exploratoryName).ifPresent(userInstance ->
+                mongoTemplate.updateFirst(Query.query(where("user").is(user).and("exploratory_name").is(exploratoryName)),
+                        Update.update("cost", getTotalCost(billingInfoList)).set("billing", billingInfoList), UserInstance.class));
+    }
+
+    private double getTotalCost(List<BillingData> billingInfoList) {
+        return new BigDecimal(billingInfoList.stream().mapToDouble(BillingData::getCost).sum())
+                .setScale(2, BigDecimal.ROUND_HALF_UP)
+                .doubleValue();
+
+    }
+
+    private BillingData toBillingData(GcpBillingData bd, BillingData billableResource) {
+
+        return BillingData.builder()
+                .displayName(billableResource.getDisplayName())
+                .cost(bd.getCost().doubleValue())
+                .currency(bd.getCurrency())
+                .product(bd.getProduct())
+                .usageDateTo(bd.getUsageDateTo())
+                .usageDateFrom(bd.getUsageDateFrom())
+                .usageDate(bd.getUsageDateFrom().format((DateTimeFormatter.ofPattern("yyyy-MM-dd"))))
+                .usageType(bd.getUsageType())
+                .user(billableResource.getUser())
+                .exploratoryName(billableResource.getExploratoryName())
+                .computationalName(billableResource.getComputationalName())
+                .dlabId(bd.getTag())
+                .resourceType(billableResource.getResourceType())
+                .build();
+    }
+}
diff --git a/services/billing-gcp/src/main/java/com/epam/dlab/billing/gcp/util/BillingUtils.java b/services/billing-gcp/src/main/java/com/epam/dlab/billing/gcp/util/BillingUtils.java
new file mode 100644
index 0000000..b3200e0
--- /dev/null
+++ b/services/billing-gcp/src/main/java/com/epam/dlab/billing/gcp/util/BillingUtils.java
@@ -0,0 +1,97 @@
+/*
+ * 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.billing.gcp.util;
+
+import com.epam.dlab.billing.gcp.documents.UserInstance;
+import com.epam.dlab.billing.gcp.model.BillingData;
+
+import java.util.UUID;
+import java.util.stream.Stream;
+
+public class BillingUtils {
+
+    private static final String EDGE_FORMAT = "%s-%s-edge";
+    private static final String EDGE_VOLUME_FORMAT = "%s-%s-edge-volume-primary";
+    private static final String EDGE_BUCKET_FORMAT = "%s-%s-bucket";
+    private static final String VOLUME_PRIMARY_FORMAT = "%s-volume-primary";
+    private static final String VOLUME_SECONDARY_FORMAT = "%s-volume-secondary";
+    private static final String VOLUME_PRIMARY = "Volume primary";
+    private static final String VOLUME_SECONDARY = "Volume secondary";
+    private static final String SHARED_RESOURCE = "Shared resource";
+    private static final String SSN_BUCKET_FORMAT = "%s-bucket";
+
+    public static Stream<BillingData> edgeBillingDataStream(String user, String sbn) {
+        final String adjustedUserName = adjustUserName(10, user);
+        final String userEdgeId = String.format(EDGE_FORMAT, sbn, adjustedUserName);
+        final String edgeVolumeId = String.format(EDGE_VOLUME_FORMAT, sbn, adjustedUserName);
+        final String edgeBucketId = String.format(EDGE_BUCKET_FORMAT, sbn, adjustedUserName);
+        return Stream.of(
+                BillingData.builder().displayName("EDGE node").user(user).dlabId(userEdgeId).resourceType(BillingData.ResourceType.EDGE).build(),
+                BillingData.builder().displayName("EDGE volume").user(user).dlabId(edgeVolumeId).resourceType(BillingData.ResourceType.VOLUME).build(),
+                BillingData.builder().displayName("EDGE bucket").user(user).dlabId(edgeBucketId).resourceType(BillingData.ResourceType.EDGE_BUCKET).build()
+        );
+    }
+
+    public static Stream<BillingData> ssnBillingDataStream(String sbn) {
+        final String ssnId = sbn + "-ssn";
+        final String bucketName = sbn.replaceAll("_", "-");
+        return Stream.of(
+                BillingData.builder().user(SHARED_RESOURCE).displayName("SSN").dlabId(ssnId).resourceType(BillingData.ResourceType.SSN).build(),
+                BillingData.builder().user(SHARED_RESOURCE).displayName("SSN Volume").dlabId(String.format(VOLUME_PRIMARY_FORMAT, ssnId)).resourceType(BillingData.ResourceType.VOLUME).build(),
+                BillingData.builder().user(SHARED_RESOURCE).displayName("SSN bucket").dlabId(bucketName + "-ssn-bucket").resourceType(BillingData.ResourceType.SSN_BUCKET).build(),
+                BillingData.builder().user(SHARED_RESOURCE).displayName("Collaboration bucket").dlabId(bucketName + "-shared-bucket").resourceType(BillingData.ResourceType.SHARED_BUCKET).build()
+        );
+    }
+
+    public static Stream<BillingData> exploratoryBillingDataStream(UserInstance userInstance) {
+        final Stream<BillingData> computationalStream = userInstance.getComputationalResources()
+                .stream()
+                .flatMap(cr -> Stream.of(computationalBillableResource(userInstance, cr)));
+        final String exploratoryId = userInstance.getExploratoryId();
+        final String primaryVolumeId = String.format(VOLUME_PRIMARY_FORMAT, exploratoryId);
+        final String secondaryVolumeId = String.format(VOLUME_SECONDARY_FORMAT, exploratoryId);
+        final Stream<BillingData> exploratoryStream = Stream.of(
+                withExploratoryName(userInstance).displayName(userInstance.getExploratoryName()).dlabId(exploratoryId).resourceType(BillingData.ResourceType.EXPLORATORY).build(),
+                withExploratoryName(userInstance).displayName(VOLUME_PRIMARY).dlabId(primaryVolumeId).resourceType(BillingData.ResourceType.VOLUME).build(),
+                withExploratoryName(userInstance).displayName(VOLUME_SECONDARY).dlabId(secondaryVolumeId).resourceType(BillingData.ResourceType.VOLUME).build());
+        return Stream.concat(computationalStream, exploratoryStream);
+    }
+
+    private static BillingData computationalBillableResource(UserInstance userInstance, UserInstance.ComputationalResource cr) {
+        return withExploratoryName(userInstance)
+                .dlabId(cr.getComputationalId())
+                .displayName(cr.getComputationalName())
+                .resourceType(BillingData.ResourceType.COMPUTATIONAL)
+                .computationalName(cr.getComputationalName())
+                .build();
+    }
+
+    private static BillingData.BillingDataBuilder withExploratoryName(UserInstance userInstance) {
+        return BillingData.builder().user(userInstance.getUser()).exploratoryName(userInstance.getExploratoryName());
+    }
+
+    private static String adjustUserName(int maxLength, String userName) {
+        String newName = userName.replaceAll("\\s", "_").replaceAll("@.*", "");
+
+        return newName.length() > maxLength ?
+                UUID.nameUUIDFromBytes(newName.getBytes()).toString().substring(0, maxLength) : newName;
+    }
+
+}
diff --git a/services/billing-gcp/src/main/resources/application.yml b/services/billing-gcp/src/main/resources/application.yml
new file mode 100644
index 0000000..be25237
--- /dev/null
+++ b/services/billing-gcp/src/main/resources/application.yml
@@ -0,0 +1,12 @@
+spring:
+  data:
+    mongodb:
+      username: admin
+      password: admin
+      database: DLAB
+      port: 27017
+      host: localhost
+
+ssnBaseName: it78
+tableName: test_dataset.test
+cron: 0 * * * * *
\ No newline at end of file


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


[incubator-dlab] 01/07: DLAB-23 billing updated for aws

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

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

commit 105ef3a9f81ccac3977debc13eed340b82c70416
Author: bhliva <bo...@epam.com>
AuthorDate: Wed Mar 13 12:54:31 2019 +0200

    DLAB-23 billing updated for aws
---
 .../epam/dlab/backendapi/dao/BaseBillingDAO.java    | 21 ++++++++++-----------
 .../epam/dlab/backendapi/dao/aws/AwsBillingDAO.java |  6 +++---
 .../webapp/src/dictionary/aws.dictionary.ts         |  4 ++--
 3 files changed, 15 insertions(+), 16 deletions(-)

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 11b45ed..25e9a8b 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
@@ -104,8 +104,8 @@ public abstract class BaseBillingDAO<T extends BillingFilter> extends BaseDAO im
 
         List<Document> reportItems = new ArrayList<>();
 
-        Date usageDateStart = null;
-        Date usageDateEnd = null;
+        String usageDateStart = null;
+        String usageDateEnd = null;
         double costTotal = 0D;
 
         for (Document d : agg) {
@@ -119,15 +119,16 @@ public abstract class BaseBillingDAO<T extends BillingFilter> extends BaseDAO im
             }
 
 
-            final Date dateStart = d.getDate(usageDateFromFieldName());
-            if (usageDateStart == null || dateStart.before(usageDateStart)) {
+            String dateStart = d.getString(MongoKeyWords.USAGE_FROM);
+            if (StringUtils.compare(usageDateStart, dateStart, false) > 0) {
                 usageDateStart = dateStart;
             }
-            Date dateEnd = d.getDate(usageDateToFieldName());
-            if (usageDateEnd == null || dateEnd.after(usageDateEnd)) {
+            String dateEnd = d.getString(MongoKeyWords.USAGE_TO);
+            if (StringUtils.compare(usageDateEnd, dateEnd) < 0) {
                 usageDateEnd = dateEnd;
             }
 
+
             costTotal += d.getDouble(MongoKeyWords.COST);
 
             final String statusString = Optional
@@ -138,9 +139,9 @@ public abstract class BaseBillingDAO<T extends BillingFilter> extends BaseDAO im
                     .append(MongoKeyWords.DLAB_USER, getUserOrDefault(id.getString(USER)))
                     .append(dlabIdFieldName(), resourceId)
                     .append(shapeFieldName(), generateShapeName(shape))
-                    .append(FIELD_RESOURCE_TYPE, DlabResourceType.getResourceTypeName(id.getString("dlab_resource_type"))) //todo check on azure!!!
-                    .append(STATUS,
-                            statusString)
+                    .append("dlab_resource_type", DlabResourceType.getResourceTypeName(id.getString("dlab_resource_type"))) //todo check on azure!!!
+                    .append(STATUS, statusString)
+                    .append(FIELD_RESOURCE_TYPE, id.getString(FIELD_RESOURCE_TYPE))
                     .append(productFieldName(), id.getString(productFieldName()))
                     .append(MongoKeyWords.COST, d.getDouble(MongoKeyWords.COST))
                     .append(costFieldName(), BillingCalculationUtils.formatDouble(d.getDouble(MongoKeyWords
@@ -282,11 +283,9 @@ public abstract class BaseBillingDAO<T extends BillingFilter> extends BaseDAO im
         }
 
         if (filter.getDateStart() != null && !filter.getDateStart().isEmpty()) {
-            searchCriteria.add(gte(MongoKeyWords.USAGE_DAY, filter.getDateStart()));
             searchCriteria.add(gte(FIELD_USAGE_DATE, filter.getDateStart()));
         }
         if (filter.getDateEnd() != null && !filter.getDateEnd().isEmpty()) {
-            searchCriteria.add(lte(MongoKeyWords.USAGE_DAY, filter.getDateEnd()));
             searchCriteria.add(lte(FIELD_USAGE_DATE, filter.getDateEnd()));
         }
 
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 fa898b5..b4cf6f2 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
@@ -16,6 +16,7 @@
 
 package com.epam.dlab.backendapi.dao.aws;
 
+import com.epam.dlab.MongoKeyWords;
 import com.epam.dlab.backendapi.dao.BaseBillingDAO;
 import com.epam.dlab.backendapi.resources.dto.aws.AwsBillingFilter;
 import com.epam.dlab.util.UsernameUtils;
@@ -53,8 +54,8 @@ public class AwsBillingDAO extends BaseBillingDAO<AwsBillingFilter> {
         return group(getGroupingFields(USER, FIELD_DLAB_ID, DLAB_RESOURCE_TYPE, FIELD_PRODUCT, FIELD_RESOURCE_TYPE,
                 FIELD_CURRENCY_CODE),
                 sum(FIELD_COST, "$" + FIELD_COST),
-                min(USAGE_DATE_START, "$" + FIELD_USAGE_DATE),
-                max(USAGE_DATE_END, "$" + FIELD_USAGE_DATE));
+                min(MongoKeyWords.USAGE_FROM, "$" + FIELD_USAGE_DATE),
+                max(MongoKeyWords.USAGE_TO, "$" + FIELD_USAGE_DATE));
     }
 
     @Override
@@ -78,5 +79,4 @@ public class AwsBillingDAO extends BaseBillingDAO<AwsBillingFilter> {
     }
 
 
-
 }
\ No newline at end of file
diff --git a/services/self-service/src/main/resources/webapp/src/dictionary/aws.dictionary.ts b/services/self-service/src/main/resources/webapp/src/dictionary/aws.dictionary.ts
index 3a8f568..e7bd59c 100644
--- a/services/self-service/src/main/resources/webapp/src/dictionary/aws.dictionary.ts
+++ b/services/self-service/src/main/resources/webapp/src/dictionary/aws.dictionary.ts
@@ -37,8 +37,8 @@ export const NAMING_CONVENTION = {
         'cost': 'cost',
         'costTotal': 'cost_total',
         'currencyCode': 'currency_code',
-        'dateFrom': 'usage_date_start',
-        'dateTo': 'usage_date_end',
+        'dateFrom': 'from',
+        'dateTo': 'to',
         'service': 'product',
         'service_filter_key': 'product',
         'type': 'resource_type',


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


[incubator-dlab] 04/07: DLAB-000 license headers updated

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

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

commit 05220160e6e2500204f1f145b2f25999bed035ea
Merge: 236e8b6 e7cf207
Author: bhliva <bo...@epam.com>
AuthorDate: Thu Mar 14 14:51:24 2019 +0200

    DLAB-000 license headers updated

 LICENSE                                            |  50 +-
 NOTICE                                             |  58 +--
 build.properties                                   |  30 +-
 infrastructure-provisioning/scripts/deploy_dlab.py |  24 +-
 infrastructure-provisioning/src/base/entrypoint.py |  25 +-
 .../src/base/scripts/create_ssh_user.py            |  29 +-
 .../src/base/scripts/install_prerequisites.py      |  28 +-
 .../src/base/scripts/install_user_key.py           |  25 +-
 .../src/dataengine-service/fabfile.py              |  29 +-
 .../src/dataengine/fabfile.py                      |  29 +-
 .../src/dataengine/scripts/configure_dataengine.py |  25 +-
 .../src/deeplearning/fabfile.py                    |  29 +-
 .../scripts/configure_deep_learning_node.py        |  25 +-
 infrastructure-provisioning/src/edge/fabfile.py    |  29 +-
 .../src/edge/scripts/configure_http_proxy.py       |  29 +-
 .../edge/scripts/configure_nginx_reverse_proxy.py  |  25 +-
 .../src/edge/scripts/reupload_ssh_key.py           |  29 +-
 .../src/edge/templates/conf.d/proxy.conf           |  25 +-
 .../src/edge/templates/locations/emr.conf          |  25 +-
 .../src/edge/templates/locations/jupyter.conf      |  25 +-
 .../src/edge/templates/locations/rstudio.conf      |  25 +-
 .../src/edge/templates/locations/spark.conf        |  25 +-
 .../src/edge/templates/locations/tensor.conf       |  25 +-
 .../src/edge/templates/locations/ungit.conf        |  25 +-
 .../src/edge/templates/locations/zeppelin.conf     |  25 +-
 .../src/edge/templates/nginx.conf                  |  26 +-
 .../src/edge/templates/nginx_debian                |  25 +-
 .../src/edge/templates/nginx_redhat                |  26 +-
 .../src/edge/templates/squid.conf                  |  26 +-
 .../src/general/api/configure.py                   |  25 +-
 .../src/general/api/create.py                      |  25 +-
 .../src/general/api/create_image.py                |  29 +-
 .../src/general/api/git_creds.py                   |  25 +-
 .../src/general/api/install_libs.py                |  25 +-
 .../src/general/api/list_libs.py                   |  25 +-
 .../src/general/api/reconfigure_spark.py           |  29 +-
 .../src/general/api/recreate.py                    |  29 +-
 .../src/general/api/reupload_key.py                |  25 +-
 .../src/general/api/start.py                       |  29 +-
 .../src/general/api/status.py                      |  25 +-
 .../src/general/api/stop.py                        |  29 +-
 .../src/general/api/terminate.py                   |  25 +-
 .../src/general/api/terminate_image.py             |  25 +-
 .../src/general/conf/dlab.ini                      |  27 +-
 .../src/general/files/aws/base_Dockerfile          |  25 +-
 .../files/aws/dataengine-service_Dockerfile        |  25 +-
 .../src/general/files/aws/dataengine_Dockerfile    |  25 +-
 .../src/general/files/aws/deeplearning_Dockerfile  |  25 +-
 .../src/general/files/aws/edge_Dockerfile          |  25 +-
 .../src/general/files/aws/jupyter_Dockerfile       |  25 +-
 .../src/general/files/aws/rstudio_Dockerfile       |  25 +-
 .../src/general/files/aws/ssn_Dockerfile           |  25 +-
 .../general/files/aws/tensor-rstudio_Dockerfile    |  25 +-
 .../src/general/files/aws/tensor_Dockerfile        |  25 +-
 .../src/general/files/aws/zeppelin_Dockerfile      |  25 +-
 .../src/general/files/azure/base_Dockerfile        |  25 +-
 .../src/general/files/azure/dataengine_Dockerfile  |  25 +-
 .../general/files/azure/deeplearning_Dockerfile    |  25 +-
 .../src/general/files/azure/edge_Dockerfile        |  25 +-
 .../src/general/files/azure/jupyter_Dockerfile     |  25 +-
 .../src/general/files/azure/rstudio_Dockerfile     |  25 +-
 .../src/general/files/azure/ssn_Dockerfile         |  25 +-
 .../src/general/files/azure/tensor_Dockerfile      |  25 +-
 .../src/general/files/azure/zeppelin_Dockerfile    |  25 +-
 .../src/general/files/gcp/base_Dockerfile          |  25 +-
 .../files/gcp/dataengine-service_Dockerfile        |  25 +-
 .../src/general/files/gcp/dataengine_Dockerfile    |  25 +-
 .../src/general/files/gcp/deeplearning_Dockerfile  |  25 +-
 .../src/general/files/gcp/edge_Dockerfile          |  25 +-
 .../src/general/files/gcp/jupyter_Dockerfile       |  25 +-
 .../src/general/files/gcp/rstudio_Dockerfile       |  25 +-
 .../src/general/files/gcp/ssn_Dockerfile           |  25 +-
 .../src/general/files/gcp/tensor_Dockerfile        |  25 +-
 .../src/general/files/gcp/zeppelin_Dockerfile      |  25 +-
 .../src/general/files/os/debian/sources.list       |  25 +-
 .../src/general/files/os/ivysettings.xml           |  29 +-
 .../src/general/files/os/redhat/sources.list       |  25 +-
 .../src/general/files/os/toree-assembly-0.2.0.jar  | Bin 25203040 -> 0 bytes
 .../src/general/files/os/toree_kernel.tar.gz       | Bin 22047671 -> 0 bytes
 .../src/general/lib/aws/__init__.py                |  27 +-
 .../src/general/lib/aws/actions_lib.py             |  25 +-
 .../src/general/lib/aws/meta_lib.py                |  29 +-
 .../src/general/lib/azure/__init__.py              |  25 +-
 .../src/general/lib/azure/actions_lib.py           |  25 +-
 .../src/general/lib/azure/meta_lib.py              |  25 +-
 .../src/general/lib/gcp/__init__.py                |  25 +-
 .../src/general/lib/gcp/actions_lib.py             |  25 +-
 .../src/general/lib/gcp/meta_lib.py                |  25 +-
 .../src/general/lib/os/debian/common_lib.py        |  30 +-
 .../src/general/lib/os/debian/edge_lib.py          |  25 +-
 .../src/general/lib/os/debian/notebook_lib.py      |  25 +-
 .../src/general/lib/os/debian/ssn_lib.py           |  29 +-
 .../src/general/lib/os/fab.py                      |  25 +-
 .../src/general/lib/os/redhat/common_lib.py        |  29 +-
 .../src/general/lib/os/redhat/edge_lib.py          |  29 +-
 .../src/general/lib/os/redhat/notebook_lib.py      |  27 +-
 .../src/general/lib/os/redhat/ssn_lib.py           |  25 +-
 .../src/general/scripts/aws/common_collect_data.py |  25 +-
 .../general/scripts/aws/common_create_bucket.py    |  25 +-
 .../general/scripts/aws/common_create_instance.py  |  29 +-
 .../scripts/aws/common_create_notebook_image.py    |  25 +-
 .../general/scripts/aws/common_create_policy.py    |  25 +-
 .../scripts/aws/common_create_role_policy.py       |  25 +-
 .../scripts/aws/common_create_security_group.py    |  25 +-
 .../general/scripts/aws/common_create_subnet.py    |  25 +-
 .../scripts/aws/common_download_git_certfile.py    |  25 +-
 ...common_notebook_configure_dataengine-service.py |  25 +-
 .../aws/common_notebook_configure_dataengine.py    |  25 +-
 .../general/scripts/aws/common_prepare_notebook.py |  25 +-
 .../general/scripts/aws/common_put_to_bucket.py    |  29 +-
 .../scripts/aws/common_remove_remote_kernels.py    |  25 +-
 .../src/general/scripts/aws/common_reupload_key.py |  29 +-
 .../general/scripts/aws/common_start_notebook.py   |  25 +-
 .../general/scripts/aws/common_stop_notebook.py    |  25 +-
 .../scripts/aws/common_terminate_notebook.py       |  25 +-
 .../scripts/aws/common_terminate_notebook_image.py |  25 +-
 .../scripts/aws/dataengine-service_configure.py    |  25 +-
 .../scripts/aws/dataengine-service_create.py       |  25 +-
 .../scripts/aws/dataengine-service_install_libs.py |  25 +-
 .../scripts/aws/dataengine-service_jars_parser.py  |  25 +-
 .../scripts/aws/dataengine-service_key_importer.py |  25 +-
 .../scripts/aws/dataengine-service_list_libs.py    |  25 +-
 .../scripts/aws/dataengine-service_prepare.py      |  29 +-
 .../scripts/aws/dataengine-service_terminate.py    |  29 +-
 .../general/scripts/aws/dataengine_configure.py    |  25 +-
 .../src/general/scripts/aws/dataengine_prepare.py  |  29 +-
 .../src/general/scripts/aws/dataengine_start.py    |  29 +-
 .../src/general/scripts/aws/dataengine_stop.py     |  25 +-
 .../general/scripts/aws/dataengine_terminate.py    |  29 +-
 .../general/scripts/aws/deeplearning_configure.py  |  25 +-
 .../scripts/aws/edge_associate_elastic_ip.py       |  25 +-
 .../src/general/scripts/aws/edge_configure.py      |  29 +-
 .../src/general/scripts/aws/edge_prepare.py        |  25 +-
 .../src/general/scripts/aws/edge_start.py          |  25 +-
 .../src/general/scripts/aws/edge_status.py         |  25 +-
 .../src/general/scripts/aws/edge_stop.py           |  29 +-
 .../src/general/scripts/aws/edge_terminate.py      |  25 +-
 .../src/general/scripts/aws/jupyter_configure.py   |  25 +-
 .../jupyter_dataengine-service_create_configs.py   |  27 +-
 .../jupyter_install_dataengine-service_kernels.py  |  25 +-
 .../src/general/scripts/aws/rstudio_configure.py   |  25 +-
 .../rstudio_dataengine-service_create_configs.py   |  25 +-
 .../rstudio_install_dataengine-service_kernels.py  |  29 +-
 .../scripts/aws/ssn_associate_elastic_ip.py        |  29 +-
 .../src/general/scripts/aws/ssn_configure.py       |  25 +-
 .../src/general/scripts/aws/ssn_create_endpoint.py |  29 +-
 .../src/general/scripts/aws/ssn_create_vpc.py      |  25 +-
 .../src/general/scripts/aws/ssn_finalize.py        |  25 +-
 .../src/general/scripts/aws/ssn_prepare.py         |  29 +-
 .../src/general/scripts/aws/ssn_terminate.py       |  25 +-
 .../scripts/aws/ssn_terminate_aws_resources.py     |  29 +-
 .../scripts/aws/tensor-rstudio_configure.py        |  29 +-
 .../src/general/scripts/aws/tensor_configure.py    |  25 +-
 .../src/general/scripts/aws/zeppelin_configure.py  |  25 +-
 .../zeppelin_dataengine-service_create_configs.py  |  25 +-
 .../zeppelin_install_dataengine-service_kernels.py |  29 +-
 .../general/scripts/azure/common_collect_data.py   |  25 +-
 .../azure/common_create_datalake_directory.py      |  25 +-
 .../scripts/azure/common_create_instance.py        |  25 +-
 .../scripts/azure/common_create_notebook_image.py  |  25 +-
 .../scripts/azure/common_create_security_group.py  |  25 +-
 .../scripts/azure/common_create_storage_account.py |  29 +-
 .../general/scripts/azure/common_create_subnet.py  |  25 +-
 .../scripts/azure/common_download_git_certfile.py  |  25 +-
 .../azure/common_notebook_configure_dataengine.py  |  25 +-
 .../azure/common_notebook_update_refresh_token.py  |  29 +-
 .../scripts/azure/common_prepare_notebook.py       |  29 +-
 .../scripts/azure/common_remove_remote_kernels.py  |  25 +-
 .../general/scripts/azure/common_reupload_key.py   |  25 +-
 .../general/scripts/azure/common_start_notebook.py |  29 +-
 .../general/scripts/azure/common_stop_notebook.py  |  25 +-
 .../scripts/azure/common_terminate_notebook.py     |  25 +-
 .../azure/common_terminate_notebook_image.py       |  25 +-
 .../general/scripts/azure/dataengine_configure.py  |  25 +-
 .../general/scripts/azure/dataengine_prepare.py    |  25 +-
 .../src/general/scripts/azure/dataengine_start.py  |  25 +-
 .../src/general/scripts/azure/dataengine_stop.py   |  29 +-
 .../general/scripts/azure/dataengine_terminate.py  |  29 +-
 .../scripts/azure/deeplearning_configure.py        |  25 +-
 .../src/general/scripts/azure/edge_configure.py    |  29 +-
 .../src/general/scripts/azure/edge_prepare.py      |  29 +-
 .../src/general/scripts/azure/edge_start.py        |  29 +-
 .../src/general/scripts/azure/edge_status.py       |  25 +-
 .../src/general/scripts/azure/edge_stop.py         |  29 +-
 .../src/general/scripts/azure/edge_terminate.py    |  29 +-
 .../src/general/scripts/azure/jupyter_configure.py |  25 +-
 .../general/scripts/azure/rstudio_change_pass.py   |  25 +-
 .../src/general/scripts/azure/rstudio_configure.py |  29 +-
 .../src/general/scripts/azure/ssn_configure.py     |  25 +-
 .../general/scripts/azure/ssn_create_datalake.py   |  25 +-
 .../general/scripts/azure/ssn_create_peering.py    |  25 +-
 .../scripts/azure/ssn_create_resource_group.py     |  25 +-
 .../src/general/scripts/azure/ssn_create_vpc.py    |  29 +-
 .../src/general/scripts/azure/ssn_prepare.py       |  29 +-
 .../src/general/scripts/azure/ssn_terminate.py     |  29 +-
 .../src/general/scripts/azure/tensor_configure.py  |  25 +-
 .../general/scripts/azure/zeppelin_configure.py    |  29 +-
 .../src/general/scripts/gcp/common_collect_data.py |  29 +-
 .../general/scripts/gcp/common_create_bucket.py    |  29 +-
 .../general/scripts/gcp/common_create_firewall.py  |  25 +-
 .../general/scripts/gcp/common_create_instance.py  |  25 +-
 .../scripts/gcp/common_create_service_account.py   |  29 +-
 .../general/scripts/gcp/common_create_subnet.py    |  29 +-
 .../scripts/gcp/common_download_git_certfile.py    |  25 +-
 ...common_notebook_configure_dataengine-service.py |  29 +-
 .../gcp/common_notebook_configure_dataengine.py    |  29 +-
 .../general/scripts/gcp/common_prepare_notebook.py |  29 +-
 .../general/scripts/gcp/common_put_to_bucket.py    |  25 +-
 .../src/general/scripts/gcp/common_reupload_key.py |  25 +-
 .../general/scripts/gcp/common_start_notebook.py   |  25 +-
 .../general/scripts/gcp/common_stop_notebook.py    |  25 +-
 .../scripts/gcp/common_terminate_notebook.py       |  25 +-
 .../scripts/gcp/dataengine-service_configure.py    |  25 +-
 .../scripts/gcp/dataengine-service_create.py       |  25 +-
 .../scripts/gcp/dataengine-service_install_libs.py |  29 +-
 .../scripts/gcp/dataengine-service_jars_parser.py  |  25 +-
 .../scripts/gcp/dataengine-service_key_importer.py |  25 +-
 .../scripts/gcp/dataengine-service_list_libs.py    |  25 +-
 .../scripts/gcp/dataengine-service_prepare.py      |  29 +-
 .../scripts/gcp/dataengine-service_terminate.py    |  29 +-
 .../general/scripts/gcp/dataengine_configure.py    |  29 +-
 .../src/general/scripts/gcp/dataengine_prepare.py  |  25 +-
 .../src/general/scripts/gcp/dataengine_start.py    |  29 +-
 .../src/general/scripts/gcp/dataengine_stop.py     |  25 +-
 .../general/scripts/gcp/dataengine_terminate.py    |  25 +-
 .../general/scripts/gcp/deeplearning_configure.py  |  29 +-
 .../src/general/scripts/gcp/edge_configure.py      |  33 +-
 .../general/scripts/gcp/edge_create_static_ip.py   |  25 +-
 .../src/general/scripts/gcp/edge_prepare.py        |  29 +-
 .../src/general/scripts/gcp/edge_start.py          |  25 +-
 .../src/general/scripts/gcp/edge_status.py         |  29 +-
 .../src/general/scripts/gcp/edge_stop.py           |  29 +-
 .../src/general/scripts/gcp/edge_terminate.py      |  25 +-
 .../src/general/scripts/gcp/jupyter_configure.py   |  25 +-
 .../jupyter_dataengine-service_create_configs.py   |  27 +-
 .../jupyter_install_dataengine-service_kernels.py  |  29 +-
 .../src/general/scripts/gcp/rstudio_configure.py   |  29 +-
 .../rstudio_dataengine-service_create_configs.py   |  29 +-
 .../rstudio_install_dataengine-service_kernels.py  |  25 +-
 .../src/general/scripts/gcp/ssn_configure.py       |  25 +-
 .../general/scripts/gcp/ssn_create_static_ip.py    |  25 +-
 .../src/general/scripts/gcp/ssn_create_vpc.py      |  29 +-
 .../src/general/scripts/gcp/ssn_finalize.py        |  29 +-
 .../src/general/scripts/gcp/ssn_prepare.py         |  29 +-
 .../src/general/scripts/gcp/ssn_terminate.py       |  25 +-
 .../scripts/gcp/ssn_terminate_gcp_resources.py     |  25 +-
 .../src/general/scripts/gcp/tensor_configure.py    |  25 +-
 .../src/general/scripts/gcp/zeppelin_configure.py  |  29 +-
 .../zeppelin_dataengine-service_create_configs.py  |  25 +-
 .../zeppelin_install_dataengine-service_kernels.py |  25 +-
 .../general/scripts/os/common_clean_instance.py    |  25 +-
 .../general/scripts/os/common_configure_proxy.py   |  25 +-
 .../scripts/os/common_configure_reverse_proxy.py   |  25 +-
 .../general/scripts/os/common_configure_spark.py   |  25 +-
 .../general/scripts/os/dataengine_install_libs.py  |  29 +-
 .../src/general/scripts/os/dataengine_list_libs.py |  25 +-
 .../scripts/os/dataengine_reconfigure_spark.py     |  25 +-
 .../os/deeplearning_dataengine_create_configs.py   |  29 +-
 .../os/deeplearning_install_dataengine_kernels.py  |  25 +-
 .../general/scripts/os/get_list_available_pkgs.py  |  25 +-
 .../src/general/scripts/os/git_pre_commit.py       |  25 +-
 .../general/scripts/os/install_additional_libs.py  |  29 +-
 .../src/general/scripts/os/ipynb_output_filter.py  |  25 +-
 .../os/jupyter_dataengine_create_configs.py        |  27 +-
 .../os/jupyter_install_dataengine_kernels.py       |  25 +-
 .../src/general/scripts/os/manage_git_creds.py     |  25 +-
 .../src/general/scripts/os/notebook_git_creds.py   |  29 +-
 .../general/scripts/os/notebook_install_libs.py    |  29 +-
 .../src/general/scripts/os/notebook_list_libs.py   |  29 +-
 .../os/notebook_reconfigure_dataengine_spark.py    |  25 +-
 .../scripts/os/notebook_reconfigure_spark.py       |  25 +-
 .../src/general/scripts/os/reconfigure_spark.py    |  25 +-
 .../os/rstudio_dataengine_create_configs.py        |  25 +-
 .../os/rstudio_install_dataengine_kernels.py       |  25 +-
 .../os/tensor-rstudio_dataengine_create_configs.py |  25 +-
 .../tensor-rstudio_install_dataengine_kernels.py   |  29 +-
 .../scripts/os/tensor_dataengine_create_configs.py |  25 +-
 .../os/tensor_install_dataengine_kernels.py        |  29 +-
 .../os/zeppelin_dataengine_create_configs.py       |  25 +-
 .../os/zeppelin_install_dataengine_kernels.py      |  29 +-
 .../aws/jenkins_jobs/create_data_engine/config.xml |  25 +-
 .../create_dataengine-service/config.xml           |  25 +-
 .../aws/jenkins_jobs/create_edge_node/config.xml   |  25 +-
 .../jenkins_jobs/create_notebook_image/config.xml  |  25 +-
 .../jenkins_jobs/create_notebook_server/config.xml |  25 +-
 .../config.xml                                     |  25 +-
 .../config.xml                                     |  25 +-
 .../dataengine_install_additional_libs/config.xml  |  25 +-
 .../dataengine_list_available_libs/config.xml      |  25 +-
 .../dataengine_reconfigure_spark/config.xml        |  25 +-
 .../aws/jenkins_jobs/gitlab_server/config.xml      |  25 +-
 .../jenkins_jobs/manage_git_credentials/config.xml |  25 +-
 .../notebook_install_additional_libs/config.xml    |  25 +-
 .../notebook_list_available_libs/config.xml        |  25 +-
 .../notebook_reconfigure_spark/config.xml          |  25 +-
 .../aws/jenkins_jobs/recreate_edge_node/config.xml |  25 +-
 .../aws/jenkins_jobs/reupload_ssh_key/config.xml   |  25 +-
 .../aws/jenkins_jobs/start_data_engine/config.xml  |  25 +-
 .../aws/jenkins_jobs/start_edge_node/config.xml    |  25 +-
 .../jenkins_jobs/start_notebook_server/config.xml  |  25 +-
 .../aws/jenkins_jobs/stop_data_engine/config.xml   |  25 +-
 .../aws/jenkins_jobs/stop_edge_node/config.xml     |  25 +-
 .../jenkins_jobs/stop_notebook_server/config.xml   |  25 +-
 .../jenkins_jobs/terminate_data_engine/config.xml  |  25 +-
 .../terminate_dataengine-service/config.xml        |  25 +-
 .../jenkins_jobs/terminate_edge_node/config.xml    |  25 +-
 .../terminate_notebook_image/config.xml            |  25 +-
 .../terminate_notebook_server/config.xml           |  25 +-
 .../general/templates/azure/core-site-datalake.xml |  25 +-
 .../general/templates/azure/core-site-storage.xml  |  25 +-
 .../jenkins_jobs/create_data_engine/config.xml     |  25 +-
 .../azure/jenkins_jobs/create_edge_node/config.xml |  25 +-
 .../jenkins_jobs/create_notebook_image/config.xml  |  25 +-
 .../jenkins_jobs/create_notebook_server/config.xml |  25 +-
 .../dataengine_install_additional_libs/config.xml  |  25 +-
 .../dataengine_list_available_libs/config.xml      |  25 +-
 .../dataengine_reconfigure_spark/config.xml        |  25 +-
 .../jenkins_jobs/manage_git_credentials/config.xml |  25 +-
 .../notebook_install_additional_libs/config.xml    |  25 +-
 .../notebook_list_available_libs/config.xml        |  25 +-
 .../notebook_reconfigure_spark/config.xml          |  25 +-
 .../jenkins_jobs/recreate_edge_node/config.xml     |  25 +-
 .../jenkins_jobs/start_data_engine/config.xml      |  25 +-
 .../azure/jenkins_jobs/start_edge_node/config.xml  |  25 +-
 .../jenkins_jobs/start_notebook_server/config.xml  |  25 +-
 .../azure/jenkins_jobs/stop_data_engine/config.xml |  25 +-
 .../azure/jenkins_jobs/stop_edge_node/config.xml   |  25 +-
 .../jenkins_jobs/stop_notebook_server/config.xml   |  25 +-
 .../jenkins_jobs/terminate_data_engine/config.xml  |  25 +-
 .../jenkins_jobs/terminate_edge_node/config.xml    |  25 +-
 .../terminate_notebook_image/config.xml            |  25 +-
 .../terminate_notebook_server/config.xml           |  25 +-
 .../src/general/templates/gcp/core-site.xml        |  28 +-
 .../gcp/jenkins_jobs/create_data_engine/config.xml |  25 +-
 .../create_dataengine-service/config.xml           |  25 +-
 .../gcp/jenkins_jobs/create_edge_node/config.xml   |  25 +-
 .../jenkins_jobs/create_notebook_server/config.xml |  25 +-
 .../config.xml                                     |  25 +-
 .../config.xml                                     |  25 +-
 .../dataengine_install_additional_libs/config.xml  |  25 +-
 .../dataengine_list_available_libs/config.xml      |  25 +-
 .../dataengine_reconfigure_spark/config.xml        |  25 +-
 .../gcp/jenkins_jobs/gitlab_server/config.xml      |  25 +-
 .../jenkins_jobs/manage_git_credentials/config.xml |  25 +-
 .../notebook_install_additional_libs/config.xml    |  25 +-
 .../notebook_list_available_libs/config.xml        |  25 +-
 .../notebook_reconfigure_spark/config.xml          |  25 +-
 .../gcp/jenkins_jobs/recreate_edge_node/config.xml |  25 +-
 .../gcp/jenkins_jobs/start_data_engine/config.xml  |  25 +-
 .../gcp/jenkins_jobs/start_edge_node/config.xml    |  25 +-
 .../jenkins_jobs/start_notebook_server/config.xml  |  25 +-
 .../gcp/jenkins_jobs/stop_data_engine/config.xml   |  25 +-
 .../gcp/jenkins_jobs/stop_edge_node/config.xml     |  25 +-
 .../jenkins_jobs/stop_notebook_server/config.xml   |  25 +-
 .../jenkins_jobs/terminate_data_engine/config.xml  |  25 +-
 .../terminate_dataengine-service/config.xml        |  25 +-
 .../jenkins_jobs/terminate_edge_node/config.xml    |  25 +-
 .../terminate_notebook_server/config.xml           |  25 +-
 .../templates/os/debian/jupyter-notebook.service   |  25 +-
 .../templates/os/debian/spark-master.service       |  25 +-
 .../templates/os/debian/spark-slave.service        |  25 +-
 .../src/general/templates/os/debian/ungit.service  |  25 +-
 .../os/notebook_spark-defaults_local.conf          |  25 +-
 .../templates/os/redhat/jupyter-notebook.service   |  25 +-
 .../templates/os/redhat/spark-master.service       |  25 +-
 .../templates/os/redhat/spark-slave.service        |  25 +-
 .../src/general/templates/os/redhat/ungit.service  |  25 +-
 .../src/general/templates/os/run_template.sh       |  25 +-
 .../src/general/templates/os/tensorboard.service   |  25 +-
 infrastructure-provisioning/src/jupyter/fabfile.py |  29 +-
 .../src/jupyter/scripts/configure_jupyter_node.py  |  25 +-
 infrastructure-provisioning/src/rstudio/fabfile.py |  25 +-
 .../src/rstudio/scripts/configure_rstudio_node.py  |  25 +-
 infrastructure-provisioning/src/ssn/fabfile.py     |  25 +-
 .../src/ssn/scripts/backup.py                      |  29 +-
 .../src/ssn/scripts/configure_billing.py           | 273 +++++-----
 .../src/ssn/scripts/configure_conf_file.py         |  25 +-
 .../src/ssn/scripts/configure_docker.py            |  41 +-
 .../src/ssn/scripts/configure_gitlab.py            |  24 +-
 .../src/ssn/scripts/configure_mongo.py             |  25 +-
 .../src/ssn/scripts/configure_ssn_node.py          |  27 +-
 .../src/ssn/scripts/configure_ui.py                |  29 +-
 .../src/ssn/scripts/gitlab_deploy.py               |  24 +-
 .../src/ssn/scripts/resource_status.py             |  25 +-
 .../src/ssn/scripts/restore.py                     |  25 +-
 .../src/ssn/scripts/upload_response_file.py        |  25 +-
 .../src/ssn/templates/gitlab.ini                   |  25 +-
 .../src/ssn/templates/gitlab.rb                    |  25 +-
 .../src/ssn/templates/mongod.service_template      |  25 +-
 .../src/ssn/templates/nginx_proxy.conf             |  25 +-
 .../templates/proxy_location_jenkins_template.conf |  25 +-
 .../templates/proxy_location_webapp_template.conf  |  25 +-
 .../src/ssn/templates/squid.conf                   |  25 +-
 .../src/ssn/templates/ssn.yml                      |  25 +-
 .../src/ssn/templates/ssn_nginx.conf               |  25 +-
 .../src/ssn/templates/supervisor_svc.conf          |  25 +-
 .../src/tensor-rstudio/fabfile.py                  |  25 +-
 .../scripts/configure_tensor-rstudio_node.py       |  25 +-
 infrastructure-provisioning/src/tensor/fabfile.py  |  25 +-
 .../src/tensor/scripts/configure_tensor_node.py    |  29 +-
 .../src/zeppelin/fabfile.py                        |  29 +-
 .../zeppelin/scripts/configure_zeppelin_node.py    |  29 +-
 .../zeppelin/templates/livy-server-cluster.service |  25 +-
 .../src/zeppelin/templates/livy-server.service     |  25 +-
 .../zeppelin/templates/zeppelin-notebook.service   |  25 +-
 integration-tests/examples/config.properties       |  27 +-
 integration-tests/examples/copy_files.py           |  25 +-
 .../scenario_deeplearning/deeplearning_tests.py    |  25 +-
 .../examples/scenario_jupyter/jupyter_tests.py     |  25 +-
 .../examples/scenario_rstudio/rstudio_tests.py     |  25 +-
 .../examples/scenario_tensor/tensor_tests.py       |  29 +-
 .../examples/scenario_zeppelin/zeppelin_tests.py   |  29 +-
 integration-tests/pom.xml                          |  33 +-
 .../cloud/VirtualMachineStatusChecker.java         |  35 +-
 .../dlab/automation/cloud/aws/AmazonHelper.java    |  35 +-
 .../automation/cloud/aws/AmazonInstanceState.java  |  35 +-
 .../dlab/automation/cloud/azure/AzureHelper.java   |  35 +-
 .../epam/dlab/automation/cloud/gcp/GcpHelper.java  |  25 +-
 .../automation/cloud/gcp/GcpInstanceState.java     |  25 +-
 .../com/epam/dlab/automation/docker/AckStatus.java |  35 +-
 .../com/epam/dlab/automation/docker/Bridge.java    |  35 +-
 .../com/epam/dlab/automation/docker/Docker.java    |  35 +-
 .../dlab/automation/docker/DockerContainer.java    |  35 +-
 .../epam/dlab/automation/docker/HostConfig.java    |  35 +-
 .../com/epam/dlab/automation/docker/Labels.java    |  35 +-
 .../dlab/automation/docker/NetworkSettings.java    |  35 +-
 .../com/epam/dlab/automation/docker/Networks.java  |  35 +-
 .../epam/dlab/automation/docker/SSHConnect.java    |  35 +-
 .../dlab/automation/exceptions/CloudException.java |  35 +-
 .../automation/exceptions/DockerException.java     |  25 +-
 .../automation/exceptions/JenkinsException.java    |  25 +-
 .../automation/exceptions/LoadFailException.java   |  25 +-
 .../epam/dlab/automation/helper/CloudHelper.java   |  35 +-
 .../epam/dlab/automation/helper/CloudProvider.java |  25 +-
 .../automation/helper/ConfigPropertyValue.java     |  35 +-
 .../epam/dlab/automation/helper/NamingHelper.java  |  35 +-
 .../dlab/automation/helper/PropertiesResolver.java |  35 +-
 .../epam/dlab/automation/helper/WaitForStatus.java |  35 +-
 .../com/epam/dlab/automation/http/ApiPath.java     |  35 +-
 .../com/epam/dlab/automation/http/ContentType.java |  35 +-
 .../com/epam/dlab/automation/http/HttpRequest.java |  35 +-
 .../epam/dlab/automation/http/HttpStatusCode.java  |  35 +-
 .../jenkins/JenkinsConfigProperties.java           |  35 +-
 .../jenkins/JenkinsResponseElements.java           |  35 +-
 .../dlab/automation/jenkins/JenkinsService.java    |  35 +-
 .../epam/dlab/automation/jenkins/JenkinsUrls.java  |  35 +-
 .../dlab/automation/model/CreateNotebookDto.java   |  35 +-
 .../dlab/automation/model/DeployClusterDto.java    |  35 +-
 .../dlab/automation/model/DeployDataProcDto.java   |  25 +-
 .../epam/dlab/automation/model/DeployEMRDto.java   |  35 +-
 .../epam/dlab/automation/model/DeploySparkDto.java |  35 +-
 .../dlab/automation/model/ExploratoryImageDto.java |  25 +-
 .../com/epam/dlab/automation/model/ImageDto.java   |  25 +-
 .../epam/dlab/automation/model/JsonMapperDto.java  |  35 +-
 .../java/com/epam/dlab/automation/model/Lib.java   |  27 +-
 .../com/epam/dlab/automation/model/LoginDto.java   |  35 +-
 .../epam/dlab/automation/model/NotebookConfig.java |  35 +-
 .../src/main/resources/application.properties      |  27 +-
 integration-tests/src/main/resources/log4j2.xml    |  33 +-
 .../epam/dlab/automation/test/TestCallable.java    |  33 +-
 .../automation/test/TestDataEngineService.java     |  35 +-
 .../epam/dlab/automation/test/TestServices.java    |  34 +-
 .../test/libs/LibraryNotFoundException.java        |  25 +-
 .../epam/dlab/automation/test/libs/LibsHelper.java |  35 +-
 .../dlab/automation/test/libs/TestDescription.java |  35 +-
 .../automation/test/libs/TestLibGroupStep.java     |  35 +-
 .../automation/test/libs/TestLibInstallStep.java   |  35 +-
 .../dlab/automation/test/libs/TestLibListStep.java |  34 +-
 .../dlab/automation/test/libs/TestLibStep.java     |  35 +-
 .../test/libs/models/LibInstallRequest.java        |  25 +-
 .../test/libs/models/LibSearchRequest.java         |  35 +-
 .../test/libs/models/LibStatusResponse.java        |  35 +-
 .../test/libs/models/LibToSearchData.java          |  35 +-
 .../automation/test/libs/models/LibraryStatus.java |  35 +-
 integration-tests/src/test/resources/log4j2.xml    |  33 +-
 pom.xml                                            |  33 +-
 services/billing-aws/billing.yml                   |  25 +-
 services/billing-aws/pom.xml                       |  26 +-
 .../main/java/com/epam/dlab/BillingScheduler.java  |  35 +-
 .../src/main/java/com/epam/dlab/BillingTool.java   |  35 +-
 .../src/main/java/com/epam/dlab/Help.java          |  35 +-
 .../configuration/BillingToolConfiguration.java    |  35 +-
 .../BillingToolConfigurationFactory.java           |  35 +-
 .../dlab/configuration/ConfigJsonGenerator.java    |  35 +-
 .../dlab/configuration/ConfigurationValidator.java |  35 +-
 .../epam/dlab/configuration/FreeMarkerConfig.java  |  35 +-
 .../configuration/LoggingConfigurationFactory.java |  35 +-
 .../dlab/configuration/SchedulerConfiguration.java |  35 +-
 .../main/java/com/epam/dlab/core/AdapterBase.java  |  35 +-
 .../main/java/com/epam/dlab/core/BillingUtils.java |  35 +-
 .../java/com/epam/dlab/core/DBAdapterBase.java     |  35 +-
 .../main/java/com/epam/dlab/core/FilterBase.java   |  35 +-
 .../main/java/com/epam/dlab/core/ModuleBase.java   |  35 +-
 .../main/java/com/epam/dlab/core/ModuleData.java   |  35 +-
 .../main/java/com/epam/dlab/core/ModuleType.java   |  35 +-
 .../dlab/core/aggregate/AggregateGranularity.java  |  35 +-
 .../epam/dlab/core/aggregate/DataAggregator.java   |  35 +-
 .../epam/dlab/core/aggregate/UsageDataList.java    |  35 +-
 .../java/com/epam/dlab/core/parser/ColumnInfo.java |  35 +-
 .../java/com/epam/dlab/core/parser/ColumnMeta.java |  35 +-
 .../com/epam/dlab/core/parser/CommonFormat.java    |  35 +-
 .../epam/dlab/core/parser/ConditionEvaluate.java   |  35 +-
 .../java/com/epam/dlab/core/parser/ParserBase.java |  35 +-
 .../com/epam/dlab/core/parser/ParserByLine.java    |  35 +-
 .../epam/dlab/core/parser/ParserStatistics.java    |  35 +-
 .../java/com/epam/dlab/logging/AppenderBase.java   |  35 +-
 .../com/epam/dlab/logging/AppenderConsole.java     |  35 +-
 .../java/com/epam/dlab/logging/AppenderFile.java   |  35 +-
 .../java/com/epam/dlab/module/AdapterConsole.java  |  35 +-
 .../java/com/epam/dlab/module/AdapterFile.java     |  35 +-
 .../main/java/com/epam/dlab/module/ModuleName.java |  35 +-
 .../main/java/com/epam/dlab/module/ParserCsv.java  |  35 +-
 .../com/epam/dlab/module/aws/AdapterS3File.java    |  35 +-
 .../java/com/epam/dlab/module/aws/FilterAWS.java   |  35 +-
 .../java/com/epam/dlab/module/aws/S3FileList.java  |  35 +-
 .../java/com/epam/dlab/mongo/AdapterMongoDb.java   |  35 +-
 .../com/epam/dlab/mongo/DlabResourceTypeDAO.java   |  35 +-
 .../java/com/epam/dlab/mongo/MongoConstants.java   |  35 +-
 .../com/epam/dlab/mongo/MongoDbConnection.java     |  35 +-
 .../java/com/epam/dlab/mongo/ResourceItem.java     |  35 +-
 .../java/com/epam/dlab/mongo/ResourceItemList.java |  35 +-
 .../BillingToolConfigurationTest.java              |  35 +-
 .../configuration/ConfigJsonGeneratorTest.java     |  35 +-
 .../configuration/ConfigurationValidatorTest.java  |  35 +-
 .../LoggingConfigurationFactoryTest.java           |  35 +-
 .../java/com/epam/dlab/core/BillingUtilsTest.java  |  35 +-
 .../dlab/core/aggregate/DataAggregatorTest.java    |  35 +-
 .../dlab/core/aggregate/UsageDataListTest.java     |  35 +-
 .../dlab/core/parser/BillingResourceTypeTest.java  |  35 +-
 .../com/epam/dlab/core/parser/ColumnInfoTest.java  |  35 +-
 .../com/epam/dlab/core/parser/ColumnMetaTest.java  |  35 +-
 .../epam/dlab/core/parser/CommonFormatTest.java    |  35 +-
 .../dlab/core/parser/ConditionEvaluateTest.java    |  35 +-
 .../dlab/core/parser/ParserStatisticsTest.java     |  35 +-
 .../com/epam/dlab/core/parser/ReportLineTest.java  |  35 +-
 .../com/epam/dlab/logging/AppenderConsoleTest.java |  35 +-
 .../com/epam/dlab/logging/AppenderFileTest.java    |  35 +-
 .../com/epam/dlab/module/AdapterConsoleTest.java   |  35 +-
 .../java/com/epam/dlab/module/AdapterFileTest.java |  35 +-
 .../com/epam/dlab/module/AdapterMongoDBTest.java   |  35 +-
 .../java/com/epam/dlab/module/ParserCsvTest.java   |  35 +-
 .../epam/dlab/module/aws/AdapterS3FileTest.java    |  35 +-
 .../com/epam/dlab/module/aws/FilterAWSTest.java    |  35 +-
 .../com/epam/dlab/module/aws/S3FileListTest.java   |  35 +-
 .../com/epam/dlab/mongo/ResourceItemListTest.java  |  35 +-
 services/billing-azure/billing.yml                 |  35 +-
 services/billing-azure/pom.xml                     |  25 +-
 .../azure/AzureBillableResourcesService.java       |  25 +-
 .../billing/azure/AzureBillingDetailsService.java  |  25 +-
 .../azure/AzureInvoiceCalculationService.java      |  25 +-
 .../dlab/billing/azure/BillingSchedulerAzure.java  |  25 +-
 .../dlab/billing/azure/MongoDbBillingClient.java   |  25 +-
 .../com/epam/dlab/billing/azure/MongoDocument.java |  25 +-
 .../config/AggregationOutputMongoDataSource.java   |  25 +-
 .../dlab/billing/azure/config/AzureAuthFile.java   |  25 +-
 .../azure/config/BillingConfigurationAzure.java    |  25 +-
 .../azure/config/LoggingConfigurationFactory.java  |  35 +-
 .../dlab/billing/azure/logging/AppenderBase.java   |  35 +-
 .../billing/azure/logging/AppenderConsole.java     |  35 +-
 .../dlab/billing/azure/logging/AppenderFile.java   |  35 +-
 .../azure/model/AzureDailyResourceInvoice.java     |  25 +-
 .../azure/model/AzureDlabBillableResource.java     |  25 +-
 .../dlab/billing/azure/model/BillingPeriod.java    |  25 +-
 .../billing/azure/rate/AzureRateCardClient.java    |  25 +-
 .../com/epam/dlab/billing/azure/rate/Meter.java    |  25 +-
 .../dlab/billing/azure/rate/RateCardResponse.java  |  25 +-
 .../azure/usage/AzureUsageAggregateClient.java     |  25 +-
 .../dlab/billing/azure/usage/InstanceData.java     |  25 +-
 .../billing/azure/usage/MicrosoftResources.java    |  25 +-
 .../billing/azure/usage/UsageAggregateRecord.java  |  25 +-
 .../usage/UsageAggregateRecordProperties.java      |  25 +-
 .../azure/usage/UsageAggregateResponse.java        |  25 +-
 services/common/pom.xml                            |  25 +-
 .../dlab/auth/conf/AzureLoginConfiguration.java    |  25 +-
 .../epam/dlab/auth/conf/GcpLoginConfiguration.java |  25 +-
 .../epam/dlab/billing/BillingCalculationUtils.java |  25 +-
 .../com/epam/dlab/billing/DlabResourceType.java    |  25 +-
 .../com/epam/dlab/exceptions/AdapterException.java |  35 +-
 .../exceptions/DlabAuthenticationException.java    |  25 +-
 .../com/epam/dlab/exceptions/DlabException.java    |  35 +-
 .../dlab/exceptions/DlabValidationException.java   |  25 +-
 .../com/epam/dlab/exceptions/GenericException.java |  35 +-
 .../dlab/exceptions/InitializationException.java   |  35 +-
 .../com/epam/dlab/exceptions/ParseException.java   |  35 +-
 .../exceptions/ResourceAlreadyExistException.java  |  25 +-
 .../dlab/exceptions/ResourceConflictException.java |  25 +-
 .../ResourceInappropriateStateException.java       |  25 +-
 .../dlab/exceptions/ResourceNotFoundException.java |  25 +-
 .../exceptions/ResourceQuoteReachedException.java  |  27 +-
 services/dlab-auth-common/pom.xml                  |  25 +-
 .../com/epam/dlab/auth/SecurityAuthorizer.java     |  35 +-
 .../dlab/auth/SecurityUnauthorizedHandler.java     |  35 +-
 .../src/main/java/com/epam/dlab/auth/UserInfo.java |  35 +-
 .../main/java/com/epam/dlab/auth/UserInfoDAO.java  |  35 +-
 .../epam/dlab/auth/UserVerificationService.java    |  25 +-
 .../com/epam/dlab/auth/contract/SecurityAPI.java   |  35 +-
 .../com/epam/dlab/auth/dto/UserCredentialDTO.java  |  35 +-
 .../auth/oauth2/Oauth2AuthenticationService.java   |  25 +-
 .../auth/rest/AbstractAuthenticationService.java   |  35 +-
 .../epam/dlab/auth/rest/ConfigurableResource.java  |  35 +-
 .../auth/rest/UserSessionDurationAuthorizer.java   |  25 +-
 .../auth/rest/UserSessionDurationCallback.java     |  25 +-
 services/dlab-model/pom.xml                        |  25 +-
 .../src/main/java/com/epam/dlab/MongoKeyWords.java |  25 +-
 .../com/epam/dlab/dto/LibListComputationalDTO.java |  25 +-
 .../java/com/epam/dlab/dto/ResourceBaseDTO.java    |  25 +-
 .../java/com/epam/dlab/dto/ResourceEnvBaseDTO.java |  35 +-
 .../java/com/epam/dlab/dto/ResourceSysBaseDTO.java |  25 +-
 .../main/java/com/epam/dlab/dto/ResourceURL.java   |  27 +-
 .../java/com/epam/dlab/dto/SchedulerJobDTO.java    |  25 +-
 .../main/java/com/epam/dlab/dto/StatusBaseDTO.java |  35 +-
 .../java/com/epam/dlab/dto/StatusEnvBaseDTO.java   |  35 +-
 .../epam/dlab/dto/UserEnvironmentResources.java    |  25 +-
 .../java/com/epam/dlab/dto/UserInstanceDTO.java    |  25 +-
 .../java/com/epam/dlab/dto/UserInstanceStatus.java |  34 +-
 .../com/epam/dlab/dto/aws/AwsCloudSettings.java    |  25 +-
 .../computational/AwsComputationalResource.java    |  25 +-
 .../AwsComputationalTerminateDTO.java              |  25 +-
 .../dlab/dto/aws/computational/ClusterConfig.java  |  27 +-
 .../aws/computational/ComputationalConfigAws.java  |  25 +-
 .../aws/computational/ComputationalCreateAws.java  |  25 +-
 .../computational/SparkComputationalConfigAws.java |  25 +-
 .../computational/SparkComputationalCreateAws.java |  25 +-
 .../com/epam/dlab/dto/aws/edge/EdgeCreateAws.java  |  25 +-
 .../com/epam/dlab/dto/aws/edge/EdgeInfoAws.java    |  25 +-
 .../dto/aws/exploratory/ExploratoryCreateAws.java  |  25 +-
 .../epam/dlab/dto/aws/keyload/UploadFileAws.java   |  25 +-
 .../epam/dlab/dto/azure/AzureCloudSettings.java    |  25 +-
 .../azure/auth/AuthorizationCodeFlowResponse.java  |  25 +-
 .../SparkComputationalConfigAzure.java             |  25 +-
 .../SparkComputationalCreateAzure.java             |  25 +-
 .../epam/dlab/dto/azure/edge/EdgeCreateAzure.java  |  25 +-
 .../epam/dlab/dto/azure/edge/EdgeInfoAzure.java    |  25 +-
 .../exploratory/ExploratoryActionStartAzure.java   |  25 +-
 .../exploratory/ExploratoryActionStopAzure.java    |  25 +-
 .../azure/exploratory/ExploratoryCreateAzure.java  |  25 +-
 .../dlab/dto/azure/keyload/UploadFileAzure.java    |  25 +-
 .../com/epam/dlab/dto/backup/EnvBackupDTO.java     |  25 +-
 .../com/epam/dlab/dto/backup/EnvBackupStatus.java  |  25 +-
 .../epam/dlab/dto/backup/EnvBackupStatusDTO.java   |  25 +-
 .../java/com/epam/dlab/dto/base/CloudSettings.java |  25 +-
 .../com/epam/dlab/dto/base/DataEngineType.java     |  25 +-
 .../dto/base/computational/ComputationalBase.java  |  25 +-
 .../computational/FullComputationalTemplate.java   |  25 +-
 .../java/com/epam/dlab/dto/base/edge/EdgeInfo.java |  25 +-
 .../epam/dlab/dto/base/keyload/ReuploadFile.java   |  25 +-
 .../com/epam/dlab/dto/base/keyload/UploadFile.java |  25 +-
 .../dlab/dto/base/keyload/UploadFileResult.java    |  25 +-
 .../computational/CheckInactivityCallbackDTO.java  |  27 +-
 .../dto/computational/CheckInactivityStatus.java   |  27 +-
 .../computational/CheckInactivityStatusDTO.java    |  27 +-
 .../ComputationalClusterConfigDTO.java             |  27 +-
 .../dto/computational/ComputationalStartDTO.java   |  25 +-
 .../dto/computational/ComputationalStatusDTO.java  |  34 +-
 .../dto/computational/ComputationalStopDTO.java    |  25 +-
 .../computational/ComputationalTerminateDTO.java   |  25 +-
 .../SparkStandaloneClusterResource.java            |  25 +-
 .../computational/UserComputationalResource.java   |  25 +-
 .../dlab/dto/exploratory/ExploratoryActionDTO.java |  35 +-
 .../dlab/dto/exploratory/ExploratoryBaseDTO.java   |  35 +-
 .../dlab/dto/exploratory/ExploratoryCreateDTO.java |  34 +-
 .../dlab/dto/exploratory/ExploratoryGitCreds.java  |  25 +-
 .../dto/exploratory/ExploratoryGitCredsDTO.java    |  35 +-
 .../exploratory/ExploratoryGitCredsUpdateDTO.java  |  35 +-
 .../dlab/dto/exploratory/ExploratoryImageDTO.java  |  25 +-
 ...xploratoryReconfigureSparkClusterActionDTO.java |  27 +-
 .../dlab/dto/exploratory/ExploratoryStatusDTO.java |  34 +-
 .../dlab/dto/exploratory/ImageCreateStatusDTO.java |  25 +-
 .../com/epam/dlab/dto/exploratory/ImageStatus.java |  25 +-
 .../epam/dlab/dto/exploratory/LibInstallDTO.java   |  34 +-
 .../dlab/dto/exploratory/LibInstallStatusDTO.java  |  25 +-
 .../dlab/dto/exploratory/LibListStatusDTO.java     |  25 +-
 .../com/epam/dlab/dto/exploratory/LibStatus.java   |  35 +-
 .../dlab/dto/exploratory/LibraryInstallDTO.java    |  25 +-
 .../com/epam/dlab/dto/gcp/GcpCloudSettings.java    |  25 +-
 .../auth/GcpOauth2AuthorizationCodeResponse.java   |  25 +-
 .../gcp/computational/ComputationalCreateGcp.java  |  25 +-
 .../computational/GcpComputationalResource.java    |  25 +-
 .../GcpComputationalTerminateDTO.java              |  25 +-
 .../computational/SparkComputationalCreateGcp.java |  25 +-
 .../com/epam/dlab/dto/gcp/edge/EdgeCreateGcp.java  |  25 +-
 .../com/epam/dlab/dto/gcp/edge/EdgeInfoGcp.java    |  25 +-
 .../dto/gcp/exploratory/ExploratoryCreateGcp.java  |  25 +-
 .../epam/dlab/dto/gcp/keyload/UploadFileGcp.java   |  25 +-
 .../dlab/dto/imagemetadata/ApplicationDto.java     |  35 +-
 .../imagemetadata/ComputationalMetadataDTO.java    |  25 +-
 .../ComputationalResourceShapeDto.java             |  35 +-
 .../ExploratoryEnvironmentVersion.java             |  35 +-
 .../dto/imagemetadata/ExploratoryMetadataDTO.java  |  25 +-
 .../dlab/dto/imagemetadata/ImageMetadataDTO.java   |  25 +-
 .../com/epam/dlab/dto/imagemetadata/ImageType.java |  35 +-
 .../epam/dlab/dto/imagemetadata/TemplateDTO.java   |  35 +-
 .../com/epam/dlab/dto/keyload/KeyLoadStatus.java   |  35 +-
 .../java/com/epam/dlab/dto/keyload/UserKeyDTO.java |  35 +-
 .../dto/reuploadkey/ReuploadKeyCallbackDTO.java    |  25 +-
 .../epam/dlab/dto/reuploadkey/ReuploadKeyDTO.java  |  25 +-
 .../dlab/dto/reuploadkey/ReuploadKeyStatus.java    |  27 +-
 .../dlab/dto/reuploadkey/ReuploadKeyStatusDTO.java |  27 +-
 .../java/com/epam/dlab/dto/status/EnvResource.java |  34 +-
 .../com/epam/dlab/dto/status/EnvResourceList.java  |  35 +-
 .../com/epam/dlab/dto/status/EnvStatusDTO.java     |  35 +-
 .../java/com/epam/dlab/model/ResourceData.java     |  25 +-
 .../java/com/epam/dlab/model/ResourceEnum.java     |  27 +-
 .../java/com/epam/dlab/model/ResourceType.java     |  25 +-
 .../epam/dlab/model/aws/BillingResourceType.java   |  35 +-
 .../java/com/epam/dlab/model/aws/ReportLine.java   |  35 +-
 .../epam/dlab/model/exploratory/Exploratory.java   |  25 +-
 .../com/epam/dlab/model/exploratory/Image.java     |  25 +-
 .../java/com/epam/dlab/model/library/Library.java  |  25 +-
 .../dlab/model/scheduler/SchedulerJobData.java     |  25 +-
 .../com/epam/dlab/model/systeminfo/DiskInfo.java   |  27 +-
 .../com/epam/dlab/model/systeminfo/MemoryInfo.java |  27 +-
 .../com/epam/dlab/model/systeminfo/OsInfo.java     |  27 +-
 .../epam/dlab/model/systeminfo/ProcessorInfo.java  |  27 +-
 .../epam/dlab/util/CloudSettingsDeserializer.java  |  25 +-
 .../java/com/epam/dlab/util/JsonGenerator.java     |  25 +-
 .../epam/dlab/dto/status/EnvResourceDTOTest.java   |  35 +-
 .../com/epam/dlab/dto/status/EnvStatusDTOTest.java |  35 +-
 .../java/com/epam/dlab/util/JsonGeneratorTest.java |  27 +-
 services/dlab-mongo-migration/pom.xml              |  29 +-
 .../java/com/epam/dlab/migration/DbMigration.java  |  29 +-
 .../exception/DlabDbMigrationException.java        |  29 +-
 .../dlab/migration/mongo/DlabMongoMigration.java   |  29 +-
 .../migration/mongo/changelog/DlabChangeLog.java   |  29 +-
 services/dlab-process/pom.xml                      |  25 +-
 .../com/epam/dlab/process/ProcessConveyor.java     |  31 +-
 .../dlab/process/builder/ProcessInfoBuilder.java   |  31 +-
 .../process/exception/DlabProcessException.java    |  31 +-
 .../com/epam/dlab/process/model/DlabProcess.java   |  31 +-
 .../com/epam/dlab/process/model/ProcessId.java     |  31 +-
 .../com/epam/dlab/process/model/ProcessInfo.java   |  31 +-
 .../com/epam/dlab/process/model/ProcessStatus.java |  31 +-
 .../com/epam/dlab/process/model/ProcessStep.java   |  31 +-
 .../com/epam/dlab/process/ProcessConveyorTest.java |  31 +-
 services/dlab-rest-client/pom.xml                  |  25 +-
 .../com/epam/dlab/rest/client/RESTService.java     |  34 +-
 .../epam/dlab/rest/client/RESTServiceFactory.java  |  35 +-
 services/dlab-utils/pom.xml                        |  25 +-
 .../java/com/epam/dlab/util/AnnotationUtils.java   |  27 +-
 .../main/java/com/epam/dlab/util/FileUtils.java    |  25 +-
 .../main/java/com/epam/dlab/util/ObjectUtils.java  |  35 +-
 .../java/com/epam/dlab/util/SecurityUtils.java     |  27 +-
 .../main/java/com/epam/dlab/util/ServiceUtils.java |  25 +-
 .../java/com/epam/dlab/util/UsernameUtils.java     |  35 +-
 .../epam/dlab/util/mongo/IsoDateDeSerializer.java  |  25 +-
 .../epam/dlab/util/mongo/IsoDateSerializer.java    |  25 +-
 .../dlab/util/mongo/IsoLocalDateDeSerializer.java  |  25 +-
 .../dlab/util/mongo/IsoLocalDateSerializer.java    |  25 +-
 .../util/mongo/IsoLocalDateTimeDeSerializer.java   |  25 +-
 .../util/mongo/IsoLocalDateTimeSerializer.java     |  25 +-
 .../com/epam/dlab/util/mongo/LongDeSerializer.java |  27 +-
 .../dlab/util/mongo/MongoStringDeserializer.java   |  27 +-
 .../dlab/util/mongo/MongoStringSerializaer.java    |  27 +-
 .../dlab/util/mongo/modules/IsoDateModule.java     |  25 +-
 .../util/mongo/modules/JavaPrimitiveModule.java    |  27 +-
 .../epam/dlab/util/mongo/modules/MongoModule.java  |  27 +-
 .../java/com/epam/dlab/util/SecurityUtilsTest.java |  27 +-
 .../mongo/IsoLocalDateTimeDeSerializerTest.java    |  25 +-
 .../dlab/util/mongo/IsoLocalDateTimeSerDeTest.java |  25 +-
 .../util/mongo/IsoLocalDateTimeSerializerTest.java |  25 +-
 services/dlab-webapp-common/pom.xml                |  25 +-
 .../src/main/java/com/epam/dlab/ModuleBase.java    |  35 +-
 .../java/com/epam/dlab/ServiceConfiguration.java   |  35 +-
 .../java/com/epam/dlab/auth/SecurityFactory.java   |  35 +-
 .../epam/dlab/auth/SecurityRestAuthenticator.java  |  34 +-
 .../com/epam/dlab/auth/SystemUserInfoService.java  |  25 +-
 .../epam/dlab/auth/SystemUserInfoServiceImpl.java  |  25 +-
 .../main/java/com/epam/dlab/cloud/CloudModule.java |  25 +-
 .../java/com/epam/dlab/cloud/CloudProvider.java    |  25 +-
 .../com/epam/dlab/constants/ServiceConsts.java     |  25 +-
 .../java/com/epam/dlab/mongo/MongoService.java     |  35 +-
 .../com/epam/dlab/mongo/MongoServiceFactory.java   |  35 +-
 .../com/epam/dlab/rest/contracts/ApiCallbacks.java |  25 +-
 .../com/epam/dlab/rest/contracts/BackupAPI.java    |  25 +-
 .../epam/dlab/rest/contracts/ComputationalAPI.java |  25 +-
 .../com/epam/dlab/rest/contracts/DockerAPI.java    |  35 +-
 .../java/com/epam/dlab/rest/contracts/EdgeAPI.java |  35 +-
 .../epam/dlab/rest/contracts/ExploratoryAPI.java   |  35 +-
 .../dlab/rest/contracts/InfrasctructureAPI.java    |  35 +-
 .../java/com/epam/dlab/rest/contracts/KeyAPI.java  |  25 +-
 .../main/java/com/epam/dlab/rest/dto/ErrorDTO.java |  29 +-
 .../mappers/AuthenticationExceptionMapper.java     |  25 +-
 .../mappers/DlabValidationExceptionMapper.java     |  25 +-
 .../dlab/rest/mappers/GenericExceptionMapper.java  |  34 +-
 .../mappers/JsonProcessingExceptionMapper.java     |  35 +-
 .../mappers/ResourceConflictExceptionMapper.java   |  25 +-
 .../mappers/ResourceNotFoundExceptionMapper.java   |  25 +-
 .../ResourceQuoteReachedExceptionMapper.java       |  27 +-
 .../dlab/rest/mappers/RuntimeExceptionMapper.java  |  34 +-
 .../rest/mappers/ValidationExceptionMapper.java    |  25 +-
 .../com/epam/dlab/validation/AwsValidation.java    |  25 +-
 .../com/epam/dlab/validation/AzureValidation.java  |  25 +-
 .../CloudConfigurationSequenceProvider.java        |  25 +-
 .../com/epam/dlab/validation/GcpValidation.java    |  25 +-
 services/provisioning-service/pom.xml              |  33 +-
 .../backendapi/ProvisioningServiceApplication.java |  25 +-
 ...rovisioningServiceApplicationConfiguration.java |  25 +-
 .../com/epam/dlab/backendapi/core/Constants.java   |  35 +-
 .../com/epam/dlab/backendapi/core/Directories.java |  35 +-
 .../dlab/backendapi/core/DirectoriesCreator.java   |  35 +-
 .../epam/dlab/backendapi/core/DockerWarmuper.java  |  34 +-
 .../dlab/backendapi/core/FileHandlerCallback.java  |  34 +-
 .../epam/dlab/backendapi/core/MetadataHolder.java  |  35 +-
 .../dlab/backendapi/core/commands/CmdCommand.java  |  35 +-
 .../backendapi/core/commands/CommandBuilder.java   |  35 +-
 .../backendapi/core/commands/CommandExecutor.java  |  34 +-
 .../core/commands/CommandExecutorMock.java         |  34 +-
 .../core/commands/CommandExecutorMockAsync.java    |  34 +-
 .../core/commands/CommandParserMock.java           |  35 +-
 .../backendapi/core/commands/DockerAction.java     |  25 +-
 .../backendapi/core/commands/DockerCommands.java   |  25 +-
 .../backendapi/core/commands/ICommandExecutor.java |  35 +-
 .../core/commands/ImagesDockerCommand.java         |  35 +-
 .../core/commands/PythonBackupCommand.java         |  25 +-
 .../backendapi/core/commands/PythonCommand.java    |  25 +-
 .../backendapi/core/commands/RunDockerCommand.java |  35 +-
 .../dlab/backendapi/core/commands/UnixCommand.java |  35 +-
 .../response/folderlistener/AsyncFileHandler.java  |  34 +-
 .../response/folderlistener/FolderListener.java    |  35 +-
 .../folderlistener/FolderListenerExecutor.java     |  35 +-
 .../core/response/folderlistener/WatchItem.java    |  35 +-
 .../response/folderlistener/WatchItemList.java     |  34 +-
 .../response/handlers/BackupCallbackHandler.java   |  25 +-
 .../handlers/CheckInactivityCallbackHandler.java   |  27 +-
 .../handlers/ComputationalCallbackHandler.java     |  25 +-
 .../response/handlers/ComputationalConfigure.java  |  25 +-
 .../ComputationalConfigureCallbackHandler.java     |  29 +-
 .../response/handlers/EdgeCallbackHandler.java     |  34 +-
 .../handlers/ExploratoryCallbackHandler.java       |  34 +-
 .../ExploratoryGitCredsCallbackHandler.java        |  25 +-
 .../handlers/ImageCreateCallbackHandler.java       |  25 +-
 .../handlers/LibInstallCallbackHandler.java        |  25 +-
 .../response/handlers/LibListCallbackHandler.java  |  25 +-
 .../response/handlers/PersistentFileHandler.java   |  29 +-
 .../response/handlers/ResourceCallbackHandler.java |  34 +-
 .../handlers/ResourcesStatusCallbackHandler.java   |  25 +-
 .../handlers/ReuploadKeyCallbackHandler.java       |  27 +-
 .../response/handlers/dao/CallbackHandlerDao.java  |  29 +-
 .../handlers/dao/FileSystemCallbackHandlerDao.java |  29 +-
 .../backendapi/modules/AwsProvisioningModule.java  |  25 +-
 .../modules/AzureProvisioningModule.java           |  25 +-
 .../modules/CloudModuleConfigurator.java           |  25 +-
 .../backendapi/modules/GcpProvisioningModule.java  |  25 +-
 .../dlab/backendapi/modules/ModuleFactory.java     |  25 +-
 .../dlab/backendapi/modules/ProductionModule.java  |  35 +-
 .../backendapi/modules/ProvisioningDevModule.java  |  25 +-
 .../dlab/backendapi/resources/BackupResource.java  |  25 +-
 .../resources/CallbackHandlerResource.java         |  29 +-
 .../dlab/backendapi/resources/DockerResource.java  |  35 +-
 .../resources/GitExploratoryResource.java          |  34 +-
 .../dlab/backendapi/resources/ImageResource.java   |  25 +-
 .../resources/InfrastructureResource.java          |  25 +-
 .../dlab/backendapi/resources/LibraryResource.java |  25 +-
 .../resources/aws/ComputationalResourceAws.java    |  25 +-
 .../backendapi/resources/aws/EdgeResourceAws.java  |  25 +-
 .../resources/aws/ExploratoryResourceAws.java      |  25 +-
 .../resources/aws/InfrastructureResourceAws.java   |  25 +-
 .../azure/ComputationalResourceAzure.java          |  25 +-
 .../resources/azure/EdgeResourceAzure.java         |  25 +-
 .../resources/azure/ExploratoryResourceAzure.java  |  25 +-
 .../azure/InfrastructureResourceAzure.java         |  25 +-
 .../backendapi/resources/base/EdgeService.java     |  25 +-
 .../resources/base/ExploratoryService.java         |  25 +-
 .../resources/base/InfrastructureService.java      |  25 +-
 .../backendapi/resources/base/KeyResource.java     |  25 +-
 .../resources/gcp/ComputationalResourceGcp.java    |  25 +-
 .../backendapi/resources/gcp/EdgeResourceGcp.java  |  25 +-
 .../resources/gcp/ExploratoryResourceGcp.java      |  25 +-
 .../resources/gcp/InfrastructureResourceGcp.java   |  25 +-
 .../service/RestoreCallbackHandlerService.java     |  29 +-
 .../service/impl/CheckInactivityService.java       |  29 +-
 .../backendapi/service/impl/DockerService.java     |  29 +-
 .../impl/RestoreCallbackHandlerServiceImpl.java    |  29 +-
 .../service/impl/ReuploadKeyService.java           |  29 +-
 .../service/impl/SparkClusterService.java          |  29 +-
 ...gServiceCloudConfigurationSequenceProvider.java |  25 +-
 .../dlab/backendapi/core/CommandBuilderTest.java   |  35 +-
 .../dlab/backendapi/core/DockerWarmuperTest.java   |  35 +-
 .../core/commands/CommandExecutorMockTest.java     |  34 +-
 .../docker/command/ImagesDockerCommandTest.java    |  35 +-
 .../core/docker/command/RunDockerCommandTest.java  |  35 +-
 .../folderlistener/FolderListenerTest.java         |  35 +-
 .../response/folderlistener/WatchItemListTest.java |  35 +-
 .../response/folderlistener/WatchItemTest.java     |  35 +-
 .../dao/FileSystemCallbackHandlerDaoTest.java      |  29 +-
 .../RestoreCallbackHandlerServiceImplTest.java     |  29 +-
 .../com/epam/dlab/rest/client/RESTServiceMock.java |  35 +-
 services/readme.txt                                |  25 +-
 services/security-aws/pom.xml                      |  25 +-
 .../com/epam/dlab/auth/aws/dao/AwsUserDAO.java     |  35 +-
 .../com/epam/dlab/auth/aws/dao/AwsUserDAOImpl.java |  35 +-
 .../aws/service/AwsCredentialRefreshService.java   |  25 +-
 .../aws/service/AwsUserVerificationService.java    |  25 +-
 services/security-azure/pom.xml                    |  25 +-
 .../dlab/auth/azure/AuthorizationCodeSupplier.java |  25 +-
 .../dlab/auth/azure/AuthorizationSupplier.java     |  26 +-
 .../auth/azure/AzureAuthenticationResource.java    |  25 +-
 .../dlab/auth/azure/AzureLocalAuthResponse.java    |  25 +-
 .../epam/dlab/auth/azure/AzureLoginUrlBuilder.java |  25 +-
 .../dlab/auth/azure/AzureSecurityResource.java     |  25 +-
 .../com/epam/dlab/auth/azure/RoleAssignment.java   |  25 +-
 .../dlab/auth/azure/RoleAssignmentProperties.java  |  25 +-
 .../dlab/auth/azure/RoleAssignmentResponse.java    |  25 +-
 .../dlab/auth/azure/UsernamePasswordSupplier.java  |  25 +-
 .../service/AzureAuthorizationCodeService.java     |  25 +-
 .../service/AzureAuthorizationCodeServiceImpl.java |  27 +-
 services/security-gcp/pom.xml                      |  25 +-
 .../gcp/resources/GcpOauth2SecurityResource.java   |  25 +-
 .../auth/gcp/service/GcpAuthenticationService.java |  25 +-
 services/security-service/pom.xml                  |  33 +-
 services/security-service/security.yml             |  25 +-
 .../epam/dlab/auth/SecurityServiceApplication.java |  35 +-
 .../dlab/auth/SecurityServiceConfiguration.java    |  25 +-
 .../epam/dlab/auth/core/CacheableReference.java    |  25 +-
 .../epam/dlab/auth/core/DlabLdapConnection.java    |  25 +-
 .../com/epam/dlab/auth/core/LdapFilterCache.java   |  35 +-
 .../java/com/epam/dlab/auth/core/LoginCache.java   |  35 +-
 .../com/epam/dlab/auth/core/LoginConveyor.java     |  35 +-
 .../java/com/epam/dlab/auth/core/LoginStep.java    |  35 +-
 .../epam/dlab/auth/core/ReturnableConnection.java  |  35 +-
 .../com/epam/dlab/auth/core/SimpleConnection.java  |  25 +-
 .../com/epam/dlab/auth/core/UserInfoBuilder.java   |  35 +-
 .../java/com/epam/dlab/auth/dao/LdapUserDAO.java   |  35 +-
 .../main/java/com/epam/dlab/auth/dao/Request.java  |  35 +-
 .../epam/dlab/auth/dao/SearchRequestBuilder.java   |  35 +-
 .../epam/dlab/auth/dao/UserInfoDAODumbImpl.java    |  35 +-
 .../epam/dlab/auth/dao/UserInfoDAOMongoImpl.java   |  35 +-
 .../dlab/auth/dao/filter/SearchResultMapper.java   |  35 +-
 .../auth/dao/filter/SearchResultProcessor.java     |  35 +-
 .../com/epam/dlab/auth/dao/script/DeepMap.java     |  35 +-
 .../epam/dlab/auth/dao/script/ScriptHolder.java    |  35 +-
 .../dao/script/SearchResultToDictionaryMapper.java |  35 +-
 .../auth/modules/AwsSecurityServiceModule.java     |  25 +-
 .../auth/modules/AzureSecurityServiceModule.java   |  25 +-
 .../auth/modules/GcpSecurityServiceModule.java     |  25 +-
 .../com/epam/dlab/auth/modules/ModuleFactory.java  |  25 +-
 .../dlab/auth/modules/SecurityServiceModule.java   |  25 +-
 .../SynchronousLdapAuthenticationService.java      |  25 +-
 .../test/java/com/epam/dlab/auth/aws/AwsTest.java  |  35 +-
 .../com/epam/dlab/auth/core/LoginConveyorTest.java |  35 +-
 .../dlab/auth/dao/script/ScriptHolderTest.java     |  35 +-
 .../java/com/epam/dlab/auth/ldap/AuthTest.java     |  35 +-
 .../java/com/epam/dlab/auth/ldap/BasicTest.java    |  35 +-
 .../java/com/epam/dlab/auth/ldap/JsonTest.java     |  35 +-
 .../java/com/epam/dlab/auth/ldap/ScriptList.java   |  35 +-
 services/self-service/pom.xml                      |  33 +-
 services/self-service/self-service.yml             |  25 +-
 .../dlab/backendapi/SelfServiceApplication.java    |  25 +-
 .../SelfServiceApplicationConfiguration.java       |  34 +-
 .../dlab/backendapi/annotation/BudgetLimited.java  |  27 +-
 .../auth/SelfServiceSecurityAuthenticator.java     |  25 +-
 .../auth/SelfServiceSecurityAuthorizer.java        |  25 +-
 .../com/epam/dlab/backendapi/dao/BackupDao.java    |  25 +-
 .../epam/dlab/backendapi/dao/BackupDaoImpl.java    |  25 +-
 .../epam/dlab/backendapi/dao/BaseBillingDAO.java   |  25 +-
 .../java/com/epam/dlab/backendapi/dao/BaseDAO.java |  34 +-
 .../com/epam/dlab/backendapi/dao/BillingDAO.java   |  27 +-
 .../epam/dlab/backendapi/dao/ComputationalDAO.java |  25 +-
 .../com/epam/dlab/backendapi/dao/DockerDAO.java    |  35 +-
 .../java/com/epam/dlab/backendapi/dao/EnvDAO.java  |  34 +-
 .../epam/dlab/backendapi/dao/ExploratoryDAO.java   |  34 +-
 .../dlab/backendapi/dao/ExploratoryLibDAO.java     |  34 +-
 .../com/epam/dlab/backendapi/dao/GitCredsDAO.java  |  35 +-
 .../dlab/backendapi/dao/ImageExploratoryDao.java   |  25 +-
 .../backendapi/dao/ImageExploratoryDaoImpl.java    |  25 +-
 .../com/epam/dlab/backendapi/dao/IndexCreator.java |  35 +-
 .../java/com/epam/dlab/backendapi/dao/KeyDAO.java  |  34 +-
 .../epam/dlab/backendapi/dao/MongoCollections.java |  35 +-
 .../com/epam/dlab/backendapi/dao/MongoSetting.java |  35 +-
 .../com/epam/dlab/backendapi/dao/RequestIdDAO.java |  35 +-
 .../epam/dlab/backendapi/dao/SchedulerJobDAO.java  |  34 +-
 .../com/epam/dlab/backendapi/dao/SecurityDAO.java  |  34 +-
 .../com/epam/dlab/backendapi/dao/SettingsDAO.java  |  34 +-
 .../com/epam/dlab/backendapi/dao/UserGroupDao.java |  27 +-
 .../epam/dlab/backendapi/dao/UserGroupDaoImpl.java |  27 +-
 .../com/epam/dlab/backendapi/dao/UserRoleDao.java  |  29 +-
 .../epam/dlab/backendapi/dao/UserRoleDaoImpl.java  |  27 +-
 .../epam/dlab/backendapi/dao/UserSettingsDAO.java  |  34 +-
 .../dlab/backendapi/dao/aws/AwsBillingDAO.java     |  25 +-
 .../epam/dlab/backendapi/dao/aws/AwsKeyDao.java    |  25 +-
 .../dlab/backendapi/dao/azure/AzureBillingDAO.java |  25 +-
 .../dlab/backendapi/dao/azure/AzureKeyDao.java     |  25 +-
 .../dlab/backendapi/dao/gcp/GcpBillingDao.java     |  27 +-
 .../epam/dlab/backendapi/dao/gcp/GcpKeyDao.java    |  25 +-
 .../dlab/backendapi/domain/EnvStatusListener.java  |  35 +-
 .../backendapi/domain/ExploratoryLibCache.java     |  34 +-
 .../dlab/backendapi/domain/ExploratoryLibList.java |  34 +-
 .../domain/MavenSearchArtifactResponse.java        |  29 +-
 .../com/epam/dlab/backendapi/domain/RequestId.java |  35 +-
 .../epam/dlab/backendapi/domain/RequestIdDTO.java  |  35 +-
 .../domain/SchedulerConfigurationData.java         |  29 +-
 .../backendapi/healthcheck/MongoHealthCheck.java   |  25 +-
 .../ProvisioningServiceHealthCheck.java            |  25 +-
 .../interceptor/BudgetLimitInterceptor.java        |  27 +-
 .../listeners/RestoreHandlerStartupListener.java   |  29 +-
 .../backendapi/modules/AwsSelfServiceModule.java   |  25 +-
 .../backendapi/modules/AzureSelfServiceModule.java |  25 +-
 .../epam/dlab/backendapi/modules/DevModule.java    |  25 +-
 .../backendapi/modules/GcpSelfServiceModule.java   |  25 +-
 .../dlab/backendapi/modules/ModuleFactory.java     |  35 +-
 .../dlab/backendapi/modules/ProductionModule.java  |  25 +-
 .../resources/ApplicationSettingResource.java      |  27 +-
 .../dlab/backendapi/resources/BackupResource.java  |  25 +-
 .../dlab/backendapi/resources/EdgeResource.java    |  25 +-
 .../backendapi/resources/EnvironmentResource.java  |  25 +-
 .../backendapi/resources/ExploratoryResource.java  |  34 +-
 .../backendapi/resources/GitCredsResource.java     |  25 +-
 .../resources/ImageExploratoryResource.java        |  25 +-
 .../resources/InfrastructureInfoResource.java      |  25 +-
 .../resources/InfrastructureTemplateResource.java  |  25 +-
 .../backendapi/resources/KeyUploaderResource.java  |  25 +-
 .../resources/LibExploratoryResource.java          |  25 +-
 .../backendapi/resources/SchedulerJobResource.java |  25 +-
 .../backendapi/resources/SecurityResource.java     |  34 +-
 .../backendapi/resources/SystemInfoResource.java   |  27 +-
 .../backendapi/resources/UserGroupResource.java    |  27 +-
 .../backendapi/resources/UserRoleResource.java     |  27 +-
 .../backendapi/resources/UserSettingsResource.java |  34 +-
 .../resources/aws/BillingResourceAws.java          |  25 +-
 .../resources/aws/ComputationalResourceAws.java    |  25 +-
 .../resources/azure/AzureOauthResource.java        |  27 +-
 .../resources/azure/BillingResourceAzure.java      |  25 +-
 .../azure/ComputationalResourceAzure.java          |  25 +-
 .../resources/callback/BackupCallback.java         |  25 +-
 .../callback/CheckInactivityCallback.java          |  27 +-
 .../resources/callback/ComputationalCallback.java  |  25 +-
 .../callback/EnvironmentStatusCallback.java        |  25 +-
 .../resources/callback/ExploratoryCallback.java    |  25 +-
 .../resources/callback/GitCredsCallback.java       |  25 +-
 .../resources/callback/ImageCallback.java          |  25 +-
 .../resources/callback/LibraryCallback.java        |  25 +-
 .../resources/callback/ReuploadKeyCallback.java    |  25 +-
 .../resources/callback/aws/EdgeCallbackAws.java    |  25 +-
 .../callback/aws/KeyUploaderCallbackAws.java       |  25 +-
 .../callback/azure/EdgeCallbackAzure.java          |  25 +-
 .../callback/azure/KeyUploaderCallbackAzure.java   |  25 +-
 .../resources/callback/base/EdgeCallback.java      |  25 +-
 .../callback/base/KeyUploaderCallback.java         |  25 +-
 .../resources/callback/gcp/EdgeCallbackGcp.java    |  25 +-
 .../callback/gcp/KeyUploaderCallbackGcp.java       |  25 +-
 .../backendapi/resources/dto/BackupFormDTO.java    |  25 +-
 .../backendapi/resources/dto/BackupInfoRecord.java |  25 +-
 .../resources/dto/ComputationalCreateFormDTO.java  |  34 +-
 .../resources/dto/ExploratoryActionFormDTO.java    |  35 +-
 .../resources/dto/ExploratoryCreateFormDTO.java    |  34 +-
 .../dto/ExploratoryImageCreateFormDTO.java         |  25 +-
 .../dlab/backendapi/resources/dto/GroupDTO.java    |  27 +-
 .../backendapi/resources/dto/HealthStatusDTO.java  |  35 +-
 .../backendapi/resources/dto/HealthStatusEnum.java |  35 +-
 .../resources/dto/HealthStatusPageDTO.java         |  34 +-
 .../resources/dto/HealthStatusResource.java        |  35 +-
 .../backendapi/resources/dto/ImageInfoRecord.java  |  25 +-
 .../resources/dto/InfrastructureInfo.java          |  25 +-
 .../backendapi/resources/dto/LibInfoRecord.java    |  25 +-
 .../resources/dto/LibInstallFormDTO.java           |  25 +-
 .../epam/dlab/backendapi/resources/dto/LibKey.java |  25 +-
 .../dlab/backendapi/resources/dto/LibraryDTO.java  |  29 +-
 .../backendapi/resources/dto/LibraryStatus.java    |  25 +-
 .../resources/dto/SearchLibsFormDTO.java           |  25 +-
 .../dto/SparkStandaloneClusterCreateForm.java      |  25 +-
 .../dto/SparkStandaloneConfiguration.java          |  25 +-
 .../backendapi/resources/dto/SystemInfoDto.java    |  27 +-
 .../resources/dto/UpdateRoleGroupDto.java          |  29 +-
 .../resources/dto/UpdateUserGroupDto.java          |  29 +-
 .../dlab/backendapi/resources/dto/UserDTO.java     |  25 +-
 .../backendapi/resources/dto/UserGroupDto.java     |  29 +-
 .../backendapi/resources/dto/UserResourceInfo.java |  27 +-
 .../dlab/backendapi/resources/dto/UserRoleDto.java |  27 +-
 .../resources/dto/aws/AwsBillingFilter.java        |  25 +-
 .../dto/aws/AwsComputationalCreateForm.java        |  25 +-
 .../resources/dto/aws/AwsEmrConfiguration.java     |  25 +-
 .../resources/dto/azure/AzureBillingFilter.java    |  25 +-
 .../dto/gcp/GcpComputationalCreateForm.java        |  25 +-
 .../dto/gcp/GcpDataprocConfiguration.java          |  25 +-
 .../resources/gcp/ComputationalResourceGcp.java    |  25 +-
 .../backendapi/resources/gcp/GcpOauthResource.java |  25 +-
 .../resources/swagger/SwaggerSecurityInfo.java     |  29 +-
 .../com/epam/dlab/backendapi/roles/RoleType.java   | 109 ++--
 .../com/epam/dlab/backendapi/roles/UserGroup.java  |  27 +-
 .../com/epam/dlab/backendapi/roles/UserRole.java   | 277 +++++-----
 .../com/epam/dlab/backendapi/roles/UserRoles.java  | 572 +++++++++++----------
 .../schedulers/CheckApplicationQuoteScheduler.java |  27 +-
 .../schedulers/CheckInactivityScheduledJob.java    |  27 +-
 .../schedulers/CheckUserQuoteScheduler.java        |  27 +-
 .../computational/StartComputationalJob.java       |  25 +-
 .../computational/StopComputationalJob.java        |  25 +-
 .../exploratory/StartExploratoryJob.java           |  25 +-
 .../schedulers/exploratory/StopExploratoryJob.java |  25 +-
 .../schedulers/internal/ManagedScheduler.java      |  29 +-
 .../backendapi/schedulers/internal/Scheduled.java  |  29 +-
 .../dlab/backendapi/service/AccessKeyService.java  |  25 +-
 .../service/ApplicationSettingService.java         |  31 +-
 .../service/ApplicationSettingServiceImpl.java     |  30 +-
 .../dlab/backendapi/service/BackupService.java     |  25 +-
 .../dlab/backendapi/service/BillingService.java    |  25 +-
 .../backendapi/service/ComputationalService.java   |  25 +-
 .../epam/dlab/backendapi/service/EdgeService.java  |  25 +-
 .../backendapi/service/EnvironmentService.java     |  25 +-
 .../backendapi/service/ExploratoryService.java     |  25 +-
 .../backendapi/service/ExternalLibraryService.java |  29 +-
 .../backendapi/service/GitCredentialService.java   |  25 +-
 .../service/ImageExploratoryService.java           |  25 +-
 .../dlab/backendapi/service/InactivityService.java |  27 +-
 .../service/InfrastructureInfoService.java         |  25 +-
 .../service/InfrastructureTemplateService.java     |  25 +-
 .../dlab/backendapi/service/LibraryService.java    |  25 +-
 .../backendapi/service/ReuploadKeyService.java     |  25 +-
 .../backendapi/service/SchedulerJobService.java    |  25 +-
 .../dlab/backendapi/service/SystemInfoService.java |  27 +-
 .../dlab/backendapi/service/UserGroupService.java  |  27 +-
 .../backendapi/service/UserResourceService.java    |  25 +-
 .../dlab/backendapi/service/UserRoleService.java   |  27 +-
 .../backendapi/service/UserRoleServiceImpl.java    |  27 +-
 .../backendapi/service/UserSettingService.java     |  25 +-
 .../backendapi/service/UserSettingServiceImpl.java |  25 +-
 .../backendapi/service/aws/AwsBillingService.java  |  25 +-
 .../service/aws/AwsInfrastructureInfoService.java  |  25 +-
 .../aws/AwsInfrastructureTemplateService.java      |  25 +-
 .../service/azure/AzureBillingService.java         |  25 +-
 .../azure/AzureInfrastructureInfoService.java      |  25 +-
 .../azure/AzureInfrastructureTemplateService.java  |  25 +-
 .../service/gcp/GcpInfrastructureInfoService.java  |  25 +-
 .../gcp/GcpInfrastructureTemplateService.java      |  25 +-
 .../service/impl/AccessKeyServiceImpl.java         |  25 +-
 .../backendapi/service/impl/BackupServiceImpl.java |  25 +-
 .../service/impl/ComputationalServiceImpl.java     |  25 +-
 .../backendapi/service/impl/EdgeServiceImpl.java   |  25 +-
 .../service/impl/EnvironmentServiceImpl.java       |  25 +-
 .../service/impl/ExploratoryServiceImpl.java       |  25 +-
 .../service/impl/GitCredentialServiceImpl.java     |  25 +-
 .../service/impl/ImageExploratoryServiceImpl.java  |  25 +-
 .../service/impl/InactivityServiceImpl.java        |  27 +-
 .../impl/InfrastructureInfoServiceBase.java        |  25 +-
 .../impl/InfrastructureTemplateServiceBase.java    |  25 +-
 .../service/impl/LibraryServiceImpl.java           |  25 +-
 .../service/impl/MavenCentralLibraryService.java   |  29 +-
 .../service/impl/ReuploadKeyServiceImpl.java       |  25 +-
 .../service/impl/SchedulerJobServiceImpl.java      |  25 +-
 .../service/impl/SystemInfoServiceImpl.java        |  27 +-
 .../service/impl/UserGroupServiceImpl.java         |  27 +-
 .../service/impl/UserResourceServiceImpl.java      |  25 +-
 .../epam/dlab/backendapi/util/CSVFormatter.java    |  25 +-
 .../epam/dlab/backendapi/util/DateRemoverUtil.java |  35 +-
 .../epam/dlab/backendapi/util/RequestBuilder.java  |  25 +-
 .../validation/MavenLibraryNameValidator.java      |  29 +-
 .../validation/SchedulerJobDTOValidator.java       |  29 +-
 ...fServiceCloudConfigurationSequenceProvider.java |  25 +-
 .../validation/annotation/LibNameValid.java        |  29 +-
 .../annotation/SchedulerJobDTOValid.java           |  29 +-
 .../src/main/resources/quartz.properties           |  31 +-
 .../app/access-denied/access-denied.component.html |  33 +-
 .../app/access-denied/access-denied.component.scss |  36 +-
 .../app/access-denied/access-denied.component.ts   |  34 +-
 .../src/app/access-denied/access-denied.module.ts  |  35 +-
 .../resources/webapp/src/app/app.component.html    |  35 +-
 .../main/resources/webapp/src/app/app.component.ts |  35 +-
 .../main/resources/webapp/src/app/app.module.ts    |  37 +-
 .../resources/webapp/src/app/app.routing.module.ts |  40 +-
 .../webapp/src/app/core/collections/dictionary.ts  |  35 +-
 .../webapp/src/app/core/collections/index.ts       |  35 +-
 .../resources/webapp/src/app/core/core.module.ts   |  35 +-
 .../app/core/directives/click-outside.directive.ts |  35 +-
 .../webapp/src/app/core/directives/index.ts        |  35 +-
 .../src/app/core/directives/scrollTo.directive.ts  |  35 +-
 .../src/app/core/interceptors/error.interceptor.ts |  35 +-
 .../core/interceptors/http.token.interceptor.ts    |  35 +-
 .../core/interceptors/httpInterceptor.service.ts   |   0
 .../core/interceptors/logInterceptor.factory.ts    |   0
 .../app/core/interceptors/nocache.interceptor.ts   |  35 +-
 .../computationalResourceApplication.model.ts      |  35 +-
 ...mputationalResourceApplicationTemplate.model.ts |  35 +-
 .../models/computationalResourceImage.model.ts     |  35 +-
 .../models/exploratoryEnvironmentVersion.model.ts  |  35 +-
 .../webapp/src/app/core/models/imageType.enum.ts   |  35 +-
 .../resources/webapp/src/app/core/models/index.ts  |  35 +-
 .../src/app/core/models/resourceShape.model.ts     |  35 +-
 .../app/core/models/resourceShapeTypes.model.ts    |  35 +-
 .../webapp/src/app/core/pipes/highlight.pipe.ts    |  35 +-
 .../resources/webapp/src/app/core/pipes/index.ts   |  35 +-
 .../webapp/src/app/core/pipes/keys-pipe/index.ts   |  35 +-
 .../src/app/core/pipes/keys-pipe/keys.pipe.ts      |  35 +-
 .../src/app/core/pipes/lib-sort-pipe/index.ts      |  35 +-
 .../app/core/pipes/lib-sort-pipe/lib-sort.pipe.ts  |  37 +-
 .../app/core/pipes/replace-breaks-pipe/index.ts    |  35 +-
 .../replace-breaks-pipe/replace-breaks.pipe.ts     |  35 +-
 .../app/core/pipes/underscoreless-pipe/index.ts    |  35 +-
 .../underscoreless-pipe/underscoreless.pipe.ts     |  35 +-
 .../src/app/core/services/appRouting.service.ts    |  37 +-
 .../core/services/applicationSecurity.service.ts   |  35 +-
 .../services/applicationServiceFacade.service.ts   |  35 +-
 .../src/app/core/services/authorization.guard.ts   |  35 +-
 .../webapp/src/app/core/services/backup.service.ts |  35 +-
 .../src/app/core/services/billingReport.service.ts |  35 +-
 .../src/app/core/services/checkParams.guard.ts     |  35 +-
 .../src/app/core/services/cloudProvider.guard.ts   |  37 +-
 .../services/dataengineConfiguration.service.ts    |  35 +-
 .../src/app/core/services/healthStatus.service.ts  |  39 +-
 .../webapp/src/app/core/services/index.ts          |  35 +-
 .../core/services/librariesInstallation.service.ts |  35 +-
 .../src/app/core/services/manageUngit.service.ts   |  35 +-
 .../services/managementEnvironments.service.ts     |  35 +-
 .../app/core/services/rolesManagement.service.ts   |  35 +-
 .../src/app/core/services/scheduler.service.ts     |  35 +-
 .../src/app/core/services/storage.service.ts       |  35 +-
 .../src/app/core/services/userAccessKey.service.ts |  35 +-
 .../src/app/core/services/userResource.service.ts  |  35 +-
 .../webapp/src/app/core/util/checkUtils.ts         |  35 +-
 .../webapp/src/app/core/util/dateUtils.ts          |  35 +-
 .../webapp/src/app/core/util/errorUtils.ts         |  35 +-
 .../webapp/src/app/core/util/fileUtils.ts          |  35 +-
 .../webapp/src/app/core/util/http-status-codes.ts  |  35 +-
 .../resources/webapp/src/app/core/util/index.ts    |  35 +-
 .../resources/webapp/src/app/core/util/sortUtil.ts |  35 +-
 .../backup-dilog/backup-dilog.component.scss       |  25 -
 .../app/health-status/environment-status.model.ts  |  53 --
 .../health-status-grid.component.html              |  68 ---
 .../health-status-grid.component.scss              |  23 -
 .../health-status-grid.component.ts                |  86 ----
 .../app/health-status/health-status.component.html |  49 --
 .../app/health-status/health-status.component.scss |  36 --
 .../app/health-status/health-status.component.ts   | 230 ---------
 .../src/app/health-status/health-status.module.ts  |  70 ---
 .../group-name-validarion.directive.ts             |  36 --
 .../ssn-monitor/ssn-monitor.component.scss         |  49 --
 .../accessnotebookguide.component.html             |  35 +-
 .../accessnotebookguide.component.ts               |  35 +-
 .../webapp/src/app/help/guides.component.css       |  35 +-
 .../main/resources/webapp/src/app/help/index.ts    |  35 +-
 .../publickeyguide/publickeyguide.component.html   |  33 +-
 .../publickeyguide/publickeyguide.component.ts     |  35 +-
 .../webapp/src/app/login/login.component.css       |  35 +-
 .../webapp/src/app/login/login.component.html      |  33 +-
 .../webapp/src/app/login/login.component.ts        |  35 +-
 .../resources/webapp/src/app/login/login.model.ts  |  35 +-
 .../resources/webapp/src/app/login/login.module.ts |  35 +-
 .../backup-dilog/backup-dilog.component.html       |  33 +-
 .../backup-dilog/backup-dilog.component.scss       |  26 +
 .../backup-dilog/backup-dilog.component.ts         |  37 +-
 .../resources/webapp/src/app/management/index.ts   |  94 +++-
 .../manage-environment-dilog.component.html        |  33 +-
 .../manage-environment-dilog.component.scss        |  37 +-
 .../manage-environment-dilog.component.ts          |  35 +-
 .../group-name-validarion.directive.ts             |  37 ++
 .../manage-roles-groups.component.html             |  33 +-
 .../manage-roles-groups.component.scss             |  35 +-
 .../manage-roles-groups.component.ts               |  35 +-
 .../management-grid/management-grid.component.html | 102 +++-
 .../management-grid/management-grid.component.scss |  37 +-
 .../management-grid/management-grid.component.ts   |  89 +++-
 .../src/app/management/management.component.html   |  79 ++-
 .../src/app/management/management.component.scss   |  43 +-
 .../src/app/management/management.component.ts     | 264 ++++++++--
 .../webapp/src/app/management/management.model.ts  |  65 ++-
 .../ssn-monitor/ssn-monitor.component.html         |  33 +-
 .../ssn-monitor/ssn-monitor.component.scss         |  50 ++
 .../ssn-monitor/ssn-monitor.component.ts           |  35 +-
 .../src/app/not-found/not-found.component.html     |  33 +-
 .../src/app/not-found/not-found.component.scss     |  35 +-
 .../src/app/not-found/not-found.component.ts       |  35 +-
 .../webapp/src/app/not-found/not-found.module.ts   |  35 +-
 .../src/main/resources/webapp/src/app/operators.ts |  35 +-
 .../reporting-grid/reporting-grid.component.html   |  33 +-
 .../reporting-grid/reporting-grid.component.scss   |  35 +-
 .../reporting-grid/reporting-grid.component.ts     |  35 +-
 .../src/app/reporting/reporting.component.ts       |  35 +-
 .../webapp/src/app/reporting/reporting.module.ts   |  35 +-
 .../app/reporting/toolbar/toolbar.component.css    |  37 +-
 .../app/reporting/toolbar/toolbar.component.html   |  33 +-
 .../src/app/reporting/toolbar/toolbar.component.ts |  35 +-
 .../cost-details-dialog.component.html             |  33 +-
 .../cost-details-dialog.component.scss             |  37 +-
 .../cost-details-dialog.component.ts               |  35 +-
 .../resources/billing/cost-details-dialog/index.ts |  35 +-
 .../cluster-details/cluster-details.component.html |  33 +-
 .../cluster-details/cluster-details.component.scss |  37 +-
 .../cluster-details/cluster-details.component.ts   |  35 +-
 .../computational/cluster-details/index.ts         |  35 +-
 .../cluster-configuration-templates.ts             |  35 +-
 ...utational-resource-create-dialog.component.html |  33 +-
 ...utational-resource-create-dialog.component.scss |  35 +-
 ...mputational-resource-create-dialog.component.ts |  35 +-
 .../computational-resource-create.model.ts         |  35 +-
 .../computational-resource-create-dialog/index.ts  |  35 +-
 .../computational-resources-list.component.html    |  35 +-
 .../computational-resources-list.component.scss    |  35 +-
 .../computational-resources-list.component.ts      |  35 +-
 .../computational-resources-list/index.ts          |  35 +-
 .../ami-create-dialog.component.html               |  35 +-
 .../ami-create-dialog.component.scss               |  35 +-
 .../ami-create-dialog.component.ts                 |  35 +-
 .../exploratory/ami-create-dialog/index.ts         |  35 +-
 .../detail-dialog/detail-dialog.component.html     |  33 +-
 .../detail-dialog/detail-dialog.component.scss     |  35 +-
 .../detail-dialog/detail-dialog.component.ts       |  35 +-
 .../resources/exploratory/detail-dialog/index.ts   |  35 +-
 .../create-environment.component.scss              |  37 +-
 ...ratory-environment-create-dialog.component.html |  35 +-
 ...loratory-environment-create-dialog.component.ts |  35 +-
 .../exploratory-environment-create.model.ts        |  35 +-
 .../exploratory-environment-create-dialog/index.ts |  35 +-
 .../exploratory/install-libraries/index.ts         |  35 +-
 .../install-libraries.component.html               |  35 +-
 .../install-libraries.component.scss               |  35 +-
 .../install-libraries.component.ts                 |  35 +-
 .../install-libraries/install-libraries.model.ts   |  35 +-
 .../manage-ungit/manage-ungit.component.html       |  33 +-
 .../manage-ungit/manage-ungit.component.scss       |  35 +-
 .../manage-ungit/manage-ungit.component.ts         |  35 +-
 .../resources/manage-ungit/manage-ungit.model.ts   |  35 +-
 .../resources-grid/create-resource.model.ts        |  35 +-
 .../resources-grid/filter-configuration.model.ts   |  35 +-
 .../src/app/resources/resources-grid/index.ts      |  35 +-
 .../resources-grid/resources-grid.component.css    |  38 +-
 .../resources-grid/resources-grid.component.html   |  33 +-
 .../resources-grid/resources-grid.component.ts     |  57 +-
 .../resources-grid/resources-grid.model.ts         |  35 +-
 .../src/app/resources/resources.component.html     |  33 +-
 .../src/app/resources/resources.component.scss     |  35 +-
 .../src/app/resources/resources.component.ts       |  43 +-
 .../webapp/src/app/resources/resources.module.ts   |  35 +-
 .../webapp/src/app/resources/scheduler/index.ts    |  35 +-
 .../resources/scheduler/scheduler.component.html   |  35 +-
 .../resources/scheduler/scheduler.component.scss   |  35 +-
 .../app/resources/scheduler/scheduler.component.ts |  35 +-
 .../src/app/resources/scheduler/scheduler.model.ts |  35 +-
 .../src/app/shared/bubble/bubble.component.css     |  35 +-
 .../src/app/shared/bubble/bubble.component.ts      |  35 +-
 .../webapp/src/app/shared/bubble/bubble.service.ts |  35 +-
 .../webapp/src/app/shared/bubble/index.ts          |  37 +-
 .../dropdown-list/dropdown-list.component.html     |  33 +-
 .../dropdown-list/dropdown-list.component.ts       |  35 +-
 .../shared/form-controls/dropdowns.component.scss  |  35 +-
 .../webapp/src/app/shared/form-controls/index.ts   |  35 +-
 .../multi-select-dropdown.component.html           |  33 +-
 .../multi-select-dropdown.component.ts             |  35 +-
 .../main/resources/webapp/src/app/shared/index.ts  |  35 +-
 .../webapp/src/app/shared/material.module.ts       |  35 +-
 .../confirmation-dialog-type.enum.ts               |  35 +-
 .../confirmation-dialog.component.html             |  33 +-
 .../confirmation-dialog.component.scss             |  35 +-
 .../confirmation-dialog.component.ts               |  35 +-
 .../confirmation-dialog.model.ts                   |  35 +-
 .../modal-dialog/confirmation-dialog/index.ts      |  35 +-
 .../webapp/src/app/shared/modal-dialog/index.ts    |  35 +-
 .../shared/modal-dialog/key-upload-dialog/index.ts |  35 +-
 .../key-upload-dialog.component.html               |  33 +-
 .../key-upload-dialog.component.ts                 |  35 +-
 .../key-upload-dialog/key-upload.model.ts          |  35 +-
 .../app/shared/modal-dialog/modal.component.html   |  33 +-
 .../app/shared/modal-dialog/modal.component.scss   |  37 +-
 .../src/app/shared/modal-dialog/modal.component.ts |  35 +-
 .../modal-dialog/notification-dialog/index.ts      |  35 +-
 .../notification-dialog.component.ts               |  35 +-
 .../shared/modal-dialog/progress-dialog/index.ts   |  35 +-
 .../progress-dialog/progress-dialog.component.html |  35 +-
 .../progress-dialog/progress-dialog.component.ts   |  35 +-
 .../webapp/src/app/shared/navbar/index.ts          |  35 +-
 .../src/app/shared/navbar/navbar.component.html    |  38 +-
 .../src/app/shared/navbar/navbar.component.scss    |  37 +-
 .../src/app/shared/navbar/navbar.component.ts      |  37 +-
 .../webapp/src/app/shared/time-picker/index.ts     |  35 +-
 .../src/app/shared/time-picker/ticker.component.ts |  35 +-
 .../app/shared/time-picker/time-cover.component.ts |  35 +-
 .../shared/time-picker/time-picker.component.scss  |  35 +-
 .../shared/time-picker/time-picker.component.ts    |  35 +-
 .../assets/fonts/Material_Icons/material-icons.css |  19 +
 .../src/assets/fonts/Open_Sans/open-sans.css       |  21 +-
 .../webapp/src/assets/styles/_general.scss         |  37 +-
 .../resources/webapp/src/assets/styles/_reset.scss |  37 +-
 .../resources/webapp/src/assets/styles/_theme.scss |  37 +-
 .../webapp/src/dictionary/aws.dictionary.ts        |  35 +-
 .../webapp/src/dictionary/azure.dictionary.ts      |  35 +-
 .../webapp/src/dictionary/gcp.dictionary.ts        |  35 +-
 .../webapp/src/dictionary/global.dictionary.ts     |  35 +-
 .../webapp/src/environments/environment.prod.ts    |  33 +-
 .../webapp/src/environments/environment.ts         |  33 +-
 .../src/main/resources/webapp/src/index.html       |  35 +-
 .../src/main/resources/webapp/src/main.ts          |  35 +-
 .../src/main/resources/webapp/src/polyfills.ts     |  33 +-
 .../src/main/resources/webapp/src/styles.scss      |  37 +-
 .../backendapi/domain/ExploratoryLibListTest.java  |  35 +-
 .../resources/ApplicationSettingResourceTest.java  |  27 +-
 .../backendapi/resources/BackupResourceTest.java   |  25 +-
 .../backendapi/resources/EdgeResourceTest.java     |  25 +-
 .../resources/EnvironmentResourceTest.java         |  25 +-
 .../resources/ExploratoryResourceTest.java         |  25 +-
 .../backendapi/resources/GitCredsResourceTest.java |  25 +-
 .../resources/ImageExploratoryResourceTest.java    |  25 +-
 .../resources/InfrastructureInfoResourceTest.java  |  25 +-
 .../InfrastructureTemplateResourceTest.java        |  25 +-
 .../resources/KeyUploaderResourceTest.java         |  25 +-
 .../resources/LibExploratoryResourceTest.java      |  25 +-
 .../resources/SchedulerJobResourceTest.java        |  25 +-
 .../backendapi/resources/SecurityResourceTest.java |  25 +-
 .../resources/SystemInfoResourceTest.java          |  27 +-
 .../epam/dlab/backendapi/resources/TestBase.java   |  25 +-
 .../resources/UserGroupResourceTest.java           |  29 +-
 .../backendapi/resources/UserRoleResourceTest.java |  27 +-
 .../resources/UserSettingsResourceTest.java        |  25 +-
 .../epam/dlab/backendapi/roles/UserRolesTest.java  |  25 +-
 .../CheckApplicationQuoteSchedulerTest.java        |  27 +-
 .../schedulers/CheckUserQuoteSchedulerTest.java    |  27 +-
 .../service/ApplicationSettingServiceImplTest.java |  27 +-
 .../service/UserRoleServiceImplTest.java           |  27 +-
 .../service/UserSettingServiceImplTest.java        |  27 +-
 .../service/aws/AwsBillingServiceTest.java         |  25 +-
 .../aws/AwsInfrastructureInfoServiceTest.java      |  25 +-
 .../aws/AwsInfrastructureTemplateServiceTest.java  |  25 +-
 .../service/azure/AzureBillingServiceTest.java     |  25 +-
 .../azure/AzureInfrastructureInfoServiceTest.java  |  25 +-
 .../AzureInfrastructureTemplateServiceTest.java    |  25 +-
 .../gcp/GcpInfrastructureInfoServiceTest.java      |  25 +-
 .../gcp/GcpInfrastructureTemplateServiceTest.java  |  25 +-
 .../service/impl/AccessKeyServiceImplTest.java     |  25 +-
 .../service/impl/BackupServiceImplTest.java        |  25 +-
 .../service/impl/ComputationalServiceImplTest.java |  25 +-
 .../service/impl/EdgeServiceImplTest.java          |  25 +-
 .../service/impl/EnvironmentServiceImplTest.java   |  25 +-
 .../service/impl/ExploratoryServiceImplTest.java   |  25 +-
 .../service/impl/GitCredentialServiceImplTest.java |  25 +-
 .../impl/ImageExploratoryServiceImplTest.java      |  25 +-
 .../service/impl/InactivityServiceImplTest.java    |  27 +-
 .../impl/InfrastructureInfoServiceBaseTest.java    |  25 +-
 .../InfrastructureTemplateServiceBaseTest.java     |  25 +-
 .../service/impl/LibraryServiceImplTest.java       |  25 +-
 .../impl/MavenCentralLibraryServiceTest.java       |  29 +-
 .../service/impl/ReuploadKeyServiceImplTest.java   |  27 +-
 .../service/impl/SchedulerJobServiceImplTest.java  |  25 +-
 .../service/impl/SystemInfoServiceImplTest.java    |  27 +-
 .../service/impl/UserGroupServiceImplTest.java     |  29 +-
 .../service/impl/UserResourceServiceImplTest.java  |  27 +-
 .../dlab/backendapi/util/CSVFormatterTest.java     |  25 +-
 .../dlab/backendapi/util/DateRemoverUtilTest.java  |  25 +-
 .../dlab/backendapi/util/RequestBuilderTest.java   |  25 +-
 1434 files changed, 23201 insertions(+), 20379 deletions(-)



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


[incubator-dlab] 07/07: DLAB-000 added possibility to download billing report on gcp

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

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

commit ed76ebbf78a3a799dc3cade8602fcfd775d7d6a3
Author: bhliva <bo...@epam.com>
AuthorDate: Thu Mar 28 11:35:15 2019 +0200

    DLAB-000 added possibility to download billing report on gcp
---
 .../resources/gcp/BillingResourceGcp.java          | 20 ++++++++
 .../backendapi/service/gcp/GcpBillingService.java  | 57 ++++++++++++++++++++--
 2 files changed, 72 insertions(+), 5 deletions(-)

diff --git a/services/self-service/src/main/java/com/epam/dlab/backendapi/resources/gcp/BillingResourceGcp.java b/services/self-service/src/main/java/com/epam/dlab/backendapi/resources/gcp/BillingResourceGcp.java
index 8218ba6..7195c75 100644
--- a/services/self-service/src/main/java/com/epam/dlab/backendapi/resources/gcp/BillingResourceGcp.java
+++ b/services/self-service/src/main/java/com/epam/dlab/backendapi/resources/gcp/BillingResourceGcp.java
@@ -31,7 +31,9 @@ import javax.validation.constraints.NotNull;
 import javax.ws.rs.POST;
 import javax.ws.rs.Path;
 import javax.ws.rs.Produces;
+import javax.ws.rs.core.HttpHeaders;
 import javax.ws.rs.core.MediaType;
+import javax.ws.rs.core.Response;
 
 @Path("/billing")
 public class BillingResourceGcp {
@@ -53,4 +55,22 @@ public class BillingResourceGcp {
         return billingService.getBillingReport(userInfo, formDTO);
     }
 
+    /**
+     * Returns the billing report in csv file.
+     *
+     * @param userInfo user info.
+     * @param formDTO  filter for report data.
+     */
+
+    @POST
+    @Path("/report/download")
+    @Produces(MediaType.APPLICATION_OCTET_STREAM)
+    @SuppressWarnings("unchecked")
+    public Response downloadBillingReport(@Auth UserInfo userInfo, @Valid @NotNull GcpBillingFilter formDTO) {
+        return Response.ok(billingService.downloadReport(userInfo, formDTO))
+                .header(HttpHeaders.CONTENT_DISPOSITION,
+                        "attachment; filename=\"" + billingService.getReportFileName(userInfo, formDTO) + "\"")
+                .build();
+    }
+
 }
diff --git a/services/self-service/src/main/java/com/epam/dlab/backendapi/service/gcp/GcpBillingService.java b/services/self-service/src/main/java/com/epam/dlab/backendapi/service/gcp/GcpBillingService.java
index 42d2095..6851f33 100644
--- a/services/self-service/src/main/java/com/epam/dlab/backendapi/service/gcp/GcpBillingService.java
+++ b/services/self-service/src/main/java/com/epam/dlab/backendapi/service/gcp/GcpBillingService.java
@@ -20,36 +20,83 @@
 package com.epam.dlab.backendapi.service.gcp;
 
 import com.epam.dlab.auth.UserInfo;
+import com.epam.dlab.backendapi.dao.aws.AwsBillingDAO;
 import com.epam.dlab.backendapi.resources.dto.gcp.GcpBillingFilter;
 import com.epam.dlab.backendapi.service.BillingService;
+import com.epam.dlab.backendapi.util.CSVFormatter;
+import com.epam.dlab.model.aws.ReportLine;
 import org.bson.Document;
 
 import java.text.ParseException;
+import java.text.SimpleDateFormat;
+import java.util.ArrayList;
 import java.util.List;
 
 public class GcpBillingService extends BillingService<GcpBillingFilter> {
     @Override
     public String getFirstLine(Document document) throws ParseException {
-        return null;
+        SimpleDateFormat from = new SimpleDateFormat("yyyy-MM-dd");
+        SimpleDateFormat to = new SimpleDateFormat("MMM dd, yyyy");
+
+        return String.format("Service base name: %s Available reporting period from: %s to: %s",
+                document.get(AwsBillingDAO.SERVICE_BASE_NAME),
+                to.format(from.parse((String) document.get("from"))),
+                to.format(from.parse((String) document.get("to"))));
     }
 
     @Override
     public List<String> getHeadersList(boolean full) {
-        return null;
+        List<String> headers = new ArrayList<>();
+
+        if (full) {
+            headers.add("USER");
+        }
+
+        headers.add("ENVIRONMENT NAME");
+        headers.add("RESOURCE TYPE");
+        headers.add("SHAPE");
+        headers.add("SERVICE");
+        headers.add("SERVICE CHARGES");
+
+        return headers;
     }
 
     @Override
     public String getLine(boolean full, Document document) {
-        return null;
+        List<String> items = new ArrayList<>();
+
+        if (full) {
+            items.add(getValueOrEmpty(document, ReportLine.FIELD_USER_ID));
+        }
+
+        items.add(getValueOrEmpty(document, ReportLine.FIELD_DLAB_ID));
+        items.add(getValueOrEmpty(document, AwsBillingDAO.DLAB_RESOURCE_TYPE));
+        items.add(getValueOrEmpty(document, AwsBillingDAO.SHAPE).replace(System.lineSeparator(), " "));
+        items.add(getValueOrEmpty(document, ReportLine.FIELD_PRODUCT));
+
+        items.add(getValueOrEmpty(document, ReportLine.FIELD_COST)
+                + " " + getValueOrEmpty(document, ReportLine.FIELD_CURRENCY_CODE));
+
+        return CSVFormatter.formatLine(items, CSVFormatter.SEPARATOR);
     }
 
     @Override
     public String getTotal(boolean full, Document document) {
-        return null;
+        int padding = getHeadersList(full).size() - 1;
+
+        List<String> items = new ArrayList<>();
+        while (padding-- > 0) {
+            items.add("");
+        }
+
+        items.add(String.format("Total: %s %s", getValueOrEmpty(document, AwsBillingDAO.COST_TOTAL),
+                getValueOrEmpty(document, ReportLine.FIELD_CURRENCY_CODE)));
+
+        return CSVFormatter.formatLine(items, CSVFormatter.SEPARATOR);
     }
 
     @Override
     public String getReportFileName(UserInfo userInfo, GcpBillingFilter filter) {
-        return null;
+        return "gcp-billing-report.csv";
     }
 }


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


[incubator-dlab] 06/07: Merge remote-tracking branch 'remotes/origin/develop' into demo_gcp_billing

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

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

commit 12757e7f6e3021b1a798b6022a4fc9e5a89934ea
Merge: 217462d 24d92a7
Author: bhliva <bo...@epam.com>
AuthorDate: Thu Mar 28 10:47:29 2019 +0200

    Merge remote-tracking branch 'remotes/origin/develop' into demo_gcp_billing

 RELEASE_NOTES.md                                   |   10 +-
 .../edge/scripts/configure_nginx_reverse_proxy.py  |    3 +-
 .../{emr.conf => dataengine-service.conf}          |    0
 .../src/edge/templates/nginx.conf                  |    7 +-
 .../src/general/conf/dlab.ini                      |    4 +-
 .../src/general/files/azure/base_Dockerfile        |    1 +
 .../src/general/files/gcp/base_Dockerfile          |    1 +
 .../files/gcp/dataengine-service_Dockerfile        |    2 +-
 .../src/general/files/gcp/dataengine_Dockerfile    |    2 +-
 .../src/general/files/gcp/ssn_policy.json          |    7 +-
 .../src/general/files/gcp/ssn_roles.json           |    4 +-
 .../src/general/lib/aws/actions_lib.py             |  307 ++++--
 .../src/general/lib/azure/actions_lib.py           |   14 +-
 .../src/general/lib/gcp/actions_lib.py             |   65 +-
 .../src/general/lib/gcp/meta_lib.py                |   69 +-
 .../src/general/lib/os/debian/common_lib.py        |    3 +
 .../src/general/lib/os/debian/notebook_lib.py      |    8 +-
 .../general/scripts/aws/common_create_bucket.py    |    3 +-
 .../scripts/aws/dataengine-service_configure.py    |    8 +-
 .../src/general/scripts/aws/edge_configure.py      |    2 +-
 .../src/general/scripts/aws/edge_prepare.py        |   59 +-
 .../src/general/scripts/aws/ssn_configure.py       |   12 +-
 .../src/general/scripts/aws/ssn_prepare.py         |   38 +-
 .../general/scripts/azure/dataengine_configure.py  |   65 +-
 .../scripts/azure/deeplearning_configure.py        |   86 +-
 .../src/general/scripts/azure/edge_configure.py    |   67 +-
 .../src/general/scripts/azure/edge_prepare.py      |   22 +
 .../src/general/scripts/azure/jupyter_configure.py |   60 +-
 .../src/general/scripts/azure/rstudio_configure.py |   60 +-
 .../src/general/scripts/azure/ssn_configure.py     |    2 +
 .../src/general/scripts/azure/tensor_configure.py  |   68 +-
 .../general/scripts/azure/zeppelin_configure.py    |   64 +-
 .../general/scripts/gcp/common_create_instance.py  |    7 +-
 .../general/scripts/gcp/common_prepare_notebook.py |   36 +-
 .../general/scripts/gcp/common_stop_notebook.py    |   17 +-
 .../scripts/gcp/common_terminate_notebook.py       |   14 +-
 .../scripts/gcp/dataengine-service_configure.py    |   79 +-
 .../general/scripts/gcp/dataengine_configure.py    |   51 +-
 .../general/scripts/gcp/deeplearning_configure.py  |   85 +-
 .../src/general/scripts/gcp/edge_configure.py      |   39 +-
 .../src/general/scripts/gcp/edge_prepare.py        |    6 +-
 .../src/general/scripts/gcp/jupyter_configure.py   |   80 +-
 .../src/general/scripts/gcp/rstudio_configure.py   |   77 +-
 .../src/general/scripts/gcp/ssn_configure.py       |    2 +
 .../scripts/gcp/ssn_terminate_gcp_resources.py     |   10 +
 .../src/general/scripts/gcp/tensor_configure.py    |   85 +-
 .../src/general/scripts/gcp/zeppelin_configure.py  |   79 +-
 .../scripts/os/common_configure_reverse_proxy.py   |    8 +-
 .../src/general/scripts/os/reconfigure_spark.py    |    3 +
 .../dataengine_reconfigure_spark/template.json     |    1 +
 .../notebook_reconfigure_spark/template.json       |    1 +
 .../dlab/core/parser/ParserStatisticsTest.java     |   64 --
 .../ComputationalClusterConfigDTO.java             |   12 +-
 ...xploratoryReconfigureSparkClusterActionDTO.java |   19 +-
 services/provisioning-service/provisioning.yml     |    2 +-
 .../epam/dlab/backendapi/core/DockerWarmuper.java  |    2 +-
 .../service/impl/MavenCentralLibraryService.java   |    6 +-
 .../epam/dlab/backendapi/util/RequestBuilder.java  | 1046 ++++++++++----------
 .../manage-roles-groups.component.html             |    7 +-
 .../manage-roles-groups.component.scss             |    7 +
 .../impl/MavenCentralLibraryServiceTest.java       |    3 +-
 61 files changed, 2040 insertions(+), 931 deletions(-)



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


[incubator-dlab] 02/07: DLAB-23 dictionary updated

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

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

commit ccfa823ece76c214e2b87b3fc161ef4b5ce3b363
Author: bhliva <bo...@epam.com>
AuthorDate: Wed Mar 13 17:47:06 2019 +0200

    DLAB-23 dictionary updated
---
 .../src/main/java/com/epam/dlab/backendapi/dao/BaseBillingDAO.java | 6 +++++-
 .../java/com/epam/dlab/backendapi/dao/azure/AzureBillingDAO.java   | 7 +++++++
 .../src/main/resources/webapp/src/dictionary/azure.dictionary.ts   | 2 +-
 .../src/main/resources/webapp/src/dictionary/gcp.dictionary.ts     | 2 +-
 4 files changed, 14 insertions(+), 3 deletions(-)

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 25e9a8b..41235b6 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
@@ -141,7 +141,7 @@ public abstract class BaseBillingDAO<T extends BillingFilter> extends BaseDAO im
                     .append(shapeFieldName(), generateShapeName(shape))
                     .append("dlab_resource_type", DlabResourceType.getResourceTypeName(id.getString("dlab_resource_type"))) //todo check on azure!!!
                     .append(STATUS, statusString)
-                    .append(FIELD_RESOURCE_TYPE, id.getString(FIELD_RESOURCE_TYPE))
+                    .append(FIELD_RESOURCE_TYPE, resourceType(id))
                     .append(productFieldName(), id.getString(productFieldName()))
                     .append(MongoKeyWords.COST, d.getDouble(MongoKeyWords.COST))
                     .append(costFieldName(), BillingCalculationUtils.formatDouble(d.getDouble(MongoKeyWords
@@ -167,6 +167,10 @@ public abstract class BaseBillingDAO<T extends BillingFilter> extends BaseDAO im
 
     }
 
+    protected String resourceType(Document id) {
+        return id.getString(FIELD_RESOURCE_TYPE);
+    }
+
     protected String currencyCodeFieldName() {
         return "currency_code";
     }
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 c241b06..cc02774 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
@@ -19,6 +19,7 @@ package com.epam.dlab.backendapi.dao.azure;
 import com.epam.dlab.MongoKeyWords;
 import com.epam.dlab.backendapi.dao.BaseBillingDAO;
 import com.epam.dlab.backendapi.resources.dto.azure.AzureBillingFilter;
+import com.epam.dlab.billing.DlabResourceType;
 import com.google.inject.Singleton;
 import com.mongodb.client.model.Accumulators;
 import com.mongodb.client.model.Aggregates;
@@ -122,4 +123,10 @@ public class AzureBillingDAO extends BaseBillingDAO<AzureBillingFilter> {
     protected String currencyCodeFieldName() {
         return MongoKeyWords.CURRENCY_CODE;
     }
+
+    @Override
+    protected String resourceType(Document id) {
+        return DlabResourceType.getResourceTypeName(id.getString(MongoKeyWords.RESOURCE_TYPE));
+    }
+
 }
diff --git a/services/self-service/src/main/resources/webapp/src/dictionary/azure.dictionary.ts b/services/self-service/src/main/resources/webapp/src/dictionary/azure.dictionary.ts
index 00379fc..b247012 100644
--- a/services/self-service/src/main/resources/webapp/src/dictionary/azure.dictionary.ts
+++ b/services/self-service/src/main/resources/webapp/src/dictionary/azure.dictionary.ts
@@ -43,7 +43,7 @@ export const NAMING_CONVENTION = {
         'service': 'meterCategory',
         'service_filter_key': 'category',
         'type': '',
-        'resourceType': 'resourceType',
+        'resourceType': 'resource_type',
         'instance_size': 'size',
         'dlabId': 'dlabId'
     },
diff --git a/services/self-service/src/main/resources/webapp/src/dictionary/gcp.dictionary.ts b/services/self-service/src/main/resources/webapp/src/dictionary/gcp.dictionary.ts
index 1bf1111..4e5019a 100644
--- a/services/self-service/src/main/resources/webapp/src/dictionary/gcp.dictionary.ts
+++ b/services/self-service/src/main/resources/webapp/src/dictionary/gcp.dictionary.ts
@@ -44,7 +44,7 @@ export const NAMING_CONVENTION = {
       'service': 'product',
       'service_filter_key': 'product',
       'type': 'dlab_resource_type',
-      'resourceType': 'resource_type',
+      'resourceType': 'dlab_resource_type',
       'instance_size': 'shape',
       'dlabId': 'dlab_id'
   },


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


[incubator-dlab] 05/07: DLAB-23 billing updated

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

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

commit 217462d97c38743b5fb3f070274412defab87413
Author: bhliva <bo...@epam.com>
AuthorDate: Thu Mar 14 16:21:34 2019 +0200

    DLAB-23 billing updated
---
 services/billing-gcp/pom.xml                       | 12 +++++++
 .../dlab/billing/gcp/BillingGcpApplication.java    |  2 ++
 .../BillingApplicationConfiguration.java}          | 22 ++++++-------
 .../DlabConfiguration.java}                        | 25 +++++++-------
 .../billing/gcp/dao/impl/BigQueryBillingDAO.java   | 38 ++++++++++++++--------
 .../epam/dlab/billing/gcp/model/BillingData.java   |  4 +--
 .../billing/gcp/scheduler/BillingScheduler.java    |  2 +-
 .../billing/gcp/service/BillingServiceImpl.java    | 25 +++++++-------
 .../epam/dlab/billing/gcp/util/BillingUtils.java   | 10 +++---
 .../billing-gcp/src/main/resources/application.yml |  9 ++---
 .../dlab/backendapi/dao/gcp/GcpBillingDao.java     | 30 -----------------
 11 files changed, 90 insertions(+), 89 deletions(-)

diff --git a/services/billing-gcp/pom.xml b/services/billing-gcp/pom.xml
index 928b77f..936ff93 100644
--- a/services/billing-gcp/pom.xml
+++ b/services/billing-gcp/pom.xml
@@ -45,6 +45,11 @@
     <dependencies>
         <dependency>
             <groupId>org.springframework.boot</groupId>
+            <artifactId>spring-boot-configuration-processor</artifactId>
+            <optional>true</optional>
+        </dependency>
+        <dependency>
+            <groupId>org.springframework.boot</groupId>
             <artifactId>spring-boot-starter-data-mongodb</artifactId>
         </dependency>
 
@@ -64,6 +69,13 @@
             <plugin>
                 <groupId>org.springframework.boot</groupId>
                 <artifactId>spring-boot-maven-plugin</artifactId>
+                <executions>
+                    <execution>
+                        <goals>
+                            <goal>repackage</goal>
+                        </goals>
+                    </execution>
+                </executions>
             </plugin>
         </plugins>
     </build>
diff --git a/services/billing-gcp/src/main/java/com/epam/dlab/billing/gcp/BillingGcpApplication.java b/services/billing-gcp/src/main/java/com/epam/dlab/billing/gcp/BillingGcpApplication.java
index 74310b1..0e31323 100644
--- a/services/billing-gcp/src/main/java/com/epam/dlab/billing/gcp/BillingGcpApplication.java
+++ b/services/billing-gcp/src/main/java/com/epam/dlab/billing/gcp/BillingGcpApplication.java
@@ -21,12 +21,14 @@ package com.epam.dlab.billing.gcp;
 
 import org.springframework.boot.SpringApplication;
 import org.springframework.boot.autoconfigure.SpringBootApplication;
+import org.springframework.boot.context.properties.EnableConfigurationProperties;
 import org.springframework.data.mongodb.repository.config.EnableMongoRepositories;
 import org.springframework.scheduling.annotation.EnableScheduling;
 
 @SpringBootApplication
 @EnableScheduling
 @EnableMongoRepositories
+@EnableConfigurationProperties
 public class BillingGcpApplication {
 
     public static void main(String[] args) {
diff --git a/services/billing-gcp/src/main/java/com/epam/dlab/billing/gcp/BillingGcpApplication.java b/services/billing-gcp/src/main/java/com/epam/dlab/billing/gcp/conf/BillingApplicationConfiguration.java
similarity index 61%
copy from services/billing-gcp/src/main/java/com/epam/dlab/billing/gcp/BillingGcpApplication.java
copy to services/billing-gcp/src/main/java/com/epam/dlab/billing/gcp/conf/BillingApplicationConfiguration.java
index 74310b1..f565c6f 100644
--- a/services/billing-gcp/src/main/java/com/epam/dlab/billing/gcp/BillingGcpApplication.java
+++ b/services/billing-gcp/src/main/java/com/epam/dlab/billing/gcp/conf/BillingApplicationConfiguration.java
@@ -17,20 +17,20 @@
  * under the License.
  */
 
-package com.epam.dlab.billing.gcp;
+package com.epam.dlab.billing.gcp.conf;
 
-import org.springframework.boot.SpringApplication;
-import org.springframework.boot.autoconfigure.SpringBootApplication;
-import org.springframework.data.mongodb.repository.config.EnableMongoRepositories;
-import org.springframework.scheduling.annotation.EnableScheduling;
+import com.google.cloud.bigquery.BigQuery;
+import com.google.cloud.bigquery.BigQueryOptions;
+import org.springframework.context.annotation.Bean;
+import org.springframework.context.annotation.Configuration;
 
-@SpringBootApplication
-@EnableScheduling
-@EnableMongoRepositories
-public class BillingGcpApplication {
+@Configuration
+public class BillingApplicationConfiguration {
 
-    public static void main(String[] args) {
-        SpringApplication.run(BillingGcpApplication.class, args);
+
+    @Bean
+    public BigQuery bigQueryService() {
+        return BigQueryOptions.getDefaultInstance().getService();
     }
 
 }
diff --git a/services/billing-gcp/src/main/java/com/epam/dlab/billing/gcp/BillingGcpApplication.java b/services/billing-gcp/src/main/java/com/epam/dlab/billing/gcp/conf/DlabConfiguration.java
similarity index 60%
copy from services/billing-gcp/src/main/java/com/epam/dlab/billing/gcp/BillingGcpApplication.java
copy to services/billing-gcp/src/main/java/com/epam/dlab/billing/gcp/conf/DlabConfiguration.java
index 74310b1..08cff97 100644
--- a/services/billing-gcp/src/main/java/com/epam/dlab/billing/gcp/BillingGcpApplication.java
+++ b/services/billing-gcp/src/main/java/com/epam/dlab/billing/gcp/conf/DlabConfiguration.java
@@ -17,20 +17,19 @@
  * under the License.
  */
 
-package com.epam.dlab.billing.gcp;
+package com.epam.dlab.billing.gcp.conf;
 
-import org.springframework.boot.SpringApplication;
-import org.springframework.boot.autoconfigure.SpringBootApplication;
-import org.springframework.data.mongodb.repository.config.EnableMongoRepositories;
-import org.springframework.scheduling.annotation.EnableScheduling;
+import lombok.Data;
+import org.springframework.boot.context.properties.ConfigurationProperties;
+import org.springframework.context.annotation.Configuration;
 
-@SpringBootApplication
-@EnableScheduling
-@EnableMongoRepositories
-public class BillingGcpApplication {
-
-    public static void main(String[] args) {
-        SpringApplication.run(BillingGcpApplication.class, args);
-    }
+@Configuration
+@ConfigurationProperties("dlab")
+@Data
+public class DlabConfiguration {
 
+    private String sbn;
+    private String bigQueryDataset;
+    private String bigQueryTable;
+    private String cron;
 }
diff --git a/services/billing-gcp/src/main/java/com/epam/dlab/billing/gcp/dao/impl/BigQueryBillingDAO.java b/services/billing-gcp/src/main/java/com/epam/dlab/billing/gcp/dao/impl/BigQueryBillingDAO.java
index 357e5ac..7f8bc57 100644
--- a/services/billing-gcp/src/main/java/com/epam/dlab/billing/gcp/dao/impl/BigQueryBillingDAO.java
+++ b/services/billing-gcp/src/main/java/com/epam/dlab/billing/gcp/dao/impl/BigQueryBillingDAO.java
@@ -19,10 +19,14 @@
 
 package com.epam.dlab.billing.gcp.dao.impl;
 
+import com.epam.dlab.billing.gcp.conf.DlabConfiguration;
 import com.epam.dlab.billing.gcp.dao.BillingDAO;
 import com.epam.dlab.billing.gcp.model.GcpBillingData;
-import com.google.cloud.bigquery.*;
-import org.springframework.beans.factory.annotation.Value;
+import com.google.cloud.bigquery.BigQuery;
+import com.google.cloud.bigquery.FieldValueList;
+import com.google.cloud.bigquery.QueryJobConfiguration;
+import com.google.cloud.bigquery.QueryParameterValue;
+import org.springframework.beans.factory.annotation.Autowired;
 import org.springframework.stereotype.Component;
 
 import java.time.Instant;
@@ -35,24 +39,32 @@ import java.util.stream.StreamSupport;
 @Component
 public class BigQueryBillingDAO implements BillingDAO {
 
-    public final String tableName;
+    private static final String SBN_PARAM = "sbn";
+    private static final String DATASET_PARAM = "dataset";
+    private final String tableId;
 
-    private static final String QUERY = "SELECT b.sku.description usageType,TIMESTAMP_TRUNC(usage_start_time, DAY, 'UTC') usage_date_from, TIMESTAMP_TRUNC(usage_end_time, DAY, 'UTC') usage_date_to, sum(b.cost) cost, b.service.description product, label.value, currency\n" +
-            "FROM `" + "%s" + "` b\n" +
+    private static final String GET_BILLING_DATA_QUERY = "SELECT b.sku.description usageType," +
+            "TIMESTAMP_TRUNC(usage_start_time, DAY, 'UTC') usage_date_from, TIMESTAMP_TRUNC(usage_end_time, DAY, " +
+            "'UTC')" +
+            " usage_date_to, sum(b.cost) cost, b.service.description product, label.value, currency\n" +
+            "FROM `%s` b\n" +
             "CROSS JOIN UNNEST(b.labels) as label\n" +
-            "where label.key = 'name' and cost != 0 and label.value like @ssnBaseName\n" +
+            "where label.key = 'name' and cost != 0 and label.value like @sbn\n" +
             "group by usageType, usage_date_from, usage_date_to, product, value, currency";
-    private final BigQuery service = BigQueryOptions.getDefaultInstance().getService();
+    private final BigQuery service;
 
-    public BigQueryBillingDAO(@Value("${tableName}") String tableName) {
-        this.tableName = tableName;
+    @Autowired
+    public BigQueryBillingDAO(DlabConfiguration conf, BigQuery service) {
+        this.tableId = String.join(".", conf.getBigQueryDataset(), conf.getBigQueryTable());
+        this.service = service;
     }
 
     @Override
-    public List<GcpBillingData> getBillingData(String ssnBaseName) throws InterruptedException {
-        QueryJobConfiguration queryConfig = QueryJobConfiguration.newBuilder(String.format(QUERY, tableName))
-                .addNamedParameter("ssnBaseName", QueryParameterValue.string(ssnBaseName + "%"))
-                .addNamedParameter("dataset", QueryParameterValue.string(tableName))
+    public List<GcpBillingData> getBillingData(String sbn) throws InterruptedException {
+        QueryJobConfiguration queryConfig = QueryJobConfiguration
+                .newBuilder(String.format(GET_BILLING_DATA_QUERY, tableId))
+                .addNamedParameter(SBN_PARAM, QueryParameterValue.string(sbn + "%"))
+                .addNamedParameter(DATASET_PARAM, QueryParameterValue.string(tableId))
                 .build();
         return StreamSupport.stream(service.query(queryConfig).getValues().spliterator(), false)
                 .map(this::toBillingData)
diff --git a/services/billing-gcp/src/main/java/com/epam/dlab/billing/gcp/model/BillingData.java b/services/billing-gcp/src/main/java/com/epam/dlab/billing/gcp/model/BillingData.java
index 1039e8b..b966f7b 100644
--- a/services/billing-gcp/src/main/java/com/epam/dlab/billing/gcp/model/BillingData.java
+++ b/services/billing-gcp/src/main/java/com/epam/dlab/billing/gcp/model/BillingData.java
@@ -37,9 +37,9 @@ public class BillingData {
     @Field("resource_name")
     private String displayName;
     private String resourceName;
-    @Field("usage_date_start")
+    @Field("from")
     private LocalDate usageDateFrom;
-    @Field("usage_date_end")
+    @Field("to")
     private LocalDate usageDateTo;
     @Field("usage_date")
     private String usageDate;
diff --git a/services/billing-gcp/src/main/java/com/epam/dlab/billing/gcp/scheduler/BillingScheduler.java b/services/billing-gcp/src/main/java/com/epam/dlab/billing/gcp/scheduler/BillingScheduler.java
index f649d4c..49664f6 100644
--- a/services/billing-gcp/src/main/java/com/epam/dlab/billing/gcp/scheduler/BillingScheduler.java
+++ b/services/billing-gcp/src/main/java/com/epam/dlab/billing/gcp/scheduler/BillingScheduler.java
@@ -37,7 +37,7 @@ public class BillingScheduler {
     }
 
 
-    @Scheduled(cron = "${cron}")
+    @Scheduled(cron = "${dlab.cron}")
     public void getBillingReport() {
         billingService.updateBillingData();
     }
diff --git a/services/billing-gcp/src/main/java/com/epam/dlab/billing/gcp/service/BillingServiceImpl.java b/services/billing-gcp/src/main/java/com/epam/dlab/billing/gcp/service/BillingServiceImpl.java
index 3c81b60..b91d8c6 100644
--- a/services/billing-gcp/src/main/java/com/epam/dlab/billing/gcp/service/BillingServiceImpl.java
+++ b/services/billing-gcp/src/main/java/com/epam/dlab/billing/gcp/service/BillingServiceImpl.java
@@ -28,7 +28,6 @@ import com.epam.dlab.billing.gcp.repository.BillingRepository;
 import com.epam.dlab.billing.gcp.repository.EdgeRepository;
 import com.epam.dlab.billing.gcp.repository.UserInstanceRepository;
 import com.epam.dlab.billing.gcp.util.BillingUtils;
-import com.google.common.collect.Iterables;
 import lombok.extern.slf4j.Slf4j;
 import org.springframework.beans.factory.annotation.Autowired;
 import org.springframework.beans.factory.annotation.Value;
@@ -39,7 +38,6 @@ import org.springframework.stereotype.Service;
 
 import java.math.BigDecimal;
 import java.time.format.DateTimeFormatter;
-import java.util.LinkedList;
 import java.util.List;
 import java.util.Map;
 import java.util.Objects;
@@ -54,13 +52,14 @@ import static org.springframework.data.mongodb.core.query.Criteria.where;
 @Slf4j
 public class BillingServiceImpl implements BillingService {
 
+    private static final String DATE_FORMAT = "yyyy-MM-dd";
     private final BillingDAO billingDAO;
     private final EdgeRepository edgeRepository;
     private final UserInstanceRepository userInstanceRepository;
     private final BillingRepository billingRepository;
     private final MongoTemplate mongoTemplate;
-    @Value("${ssnBaseName}")
-    private String ssnBaseName;
+    @Value("${dlab.sbn}")
+    private String sbn;
 
     @Autowired
     public BillingServiceImpl(BillingDAO billingDAO, EdgeRepository edgeRepository,
@@ -77,7 +76,7 @@ public class BillingServiceImpl implements BillingService {
     public void updateBillingData() {
         try {
 
-            final Stream<BillingData> ssnBillingDataStream = BillingUtils.ssnBillingDataStream(ssnBaseName);
+            final Stream<BillingData> ssnBillingDataStream = BillingUtils.ssnBillingDataStream(sbn);
             final Stream<BillingData> billableUserInstances = userInstanceRepository.findAll()
                     .stream()
                     .flatMap(BillingUtils::exploratoryBillingDataStream);
@@ -85,17 +84,19 @@ public class BillingServiceImpl implements BillingService {
             final Stream<BillingData> billableEdges = edgeRepository.findAll()
                     .stream()
                     .map(Edge::getId)
-                    .flatMap(e -> edgeBillingDataStream(e, ssnBaseName));
+                    .flatMap(e -> edgeBillingDataStream(e, sbn));
 
-            final Map<String, BillingData> billableResources = Stream.of(billableUserInstances, billableEdges, ssnBillingDataStream)
+            final Map<String, BillingData> billableResources = Stream.of(billableUserInstances, billableEdges,
+                    ssnBillingDataStream)
                     .flatMap(s -> s)
                     .collect(Collectors.toMap(BillingData::getDlabId, b -> b));
             log.trace("Billable resources are: {}", billableResources);
-            final List<BillingData> billingDataList = billingDAO.getBillingData(ssnBaseName)
+            final List<BillingData> billingDataList = billingDAO.getBillingData(sbn)
                     .stream()
                     .map(bd -> toBillingData(bd, getOrDefault(billableResources, bd.getTag())))
                     .collect(Collectors.toList());
 
+            log.debug("Inserting new billing data with size: {}", billingDataList.size());
             billingRepository.insert(billingDataList);
             updateExploratoryCost(billingDataList);
 
@@ -116,7 +117,8 @@ public class BillingServiceImpl implements BillingService {
                 .forEach(this::updateUserExploratoryBillingData);
     }
 
-    private void updateUserExploratoryBillingData(String user, Map<String, List<BillingData>> billableExploratoriesMap) {
+    private void updateUserExploratoryBillingData(String user,
+                                                  Map<String, List<BillingData>> billableExploratoriesMap) {
         billableExploratoriesMap.forEach((exploratoryName, billingInfoList) ->
                 updateExploratoryBillingData(user, exploratoryName, billingInfoList)
         );
@@ -133,7 +135,8 @@ public class BillingServiceImpl implements BillingService {
     private void updateExploratoryBillingData(String user, String exploratoryName, List<BillingData> billingInfoList) {
         userInstanceRepository.findByUserAndExploratoryName(user, exploratoryName).ifPresent(userInstance ->
                 mongoTemplate.updateFirst(Query.query(where("user").is(user).and("exploratory_name").is(exploratoryName)),
-                        Update.update("cost", getTotalCost(billingInfoList)).set("billing", billingInfoList), UserInstance.class));
+                        Update.update("cost", getTotalCost(billingInfoList)).set("billing", billingInfoList),
+                        UserInstance.class));
     }
 
     private double getTotalCost(List<BillingData> billingInfoList) {
@@ -152,7 +155,7 @@ public class BillingServiceImpl implements BillingService {
                 .product(bd.getProduct())
                 .usageDateTo(bd.getUsageDateTo())
                 .usageDateFrom(bd.getUsageDateFrom())
-                .usageDate(bd.getUsageDateFrom().format((DateTimeFormatter.ofPattern("yyyy-MM-dd"))))
+                .usageDate(bd.getUsageDateFrom().format((DateTimeFormatter.ofPattern(DATE_FORMAT))))
                 .usageType(bd.getUsageType())
                 .user(billableResource.getUser())
                 .exploratoryName(billableResource.getExploratoryName())
diff --git a/services/billing-gcp/src/main/java/com/epam/dlab/billing/gcp/util/BillingUtils.java b/services/billing-gcp/src/main/java/com/epam/dlab/billing/gcp/util/BillingUtils.java
index b3200e0..12c362e 100644
--- a/services/billing-gcp/src/main/java/com/epam/dlab/billing/gcp/util/BillingUtils.java
+++ b/services/billing-gcp/src/main/java/com/epam/dlab/billing/gcp/util/BillingUtils.java
@@ -35,7 +35,6 @@ public class BillingUtils {
     private static final String VOLUME_PRIMARY = "Volume primary";
     private static final String VOLUME_SECONDARY = "Volume secondary";
     private static final String SHARED_RESOURCE = "Shared resource";
-    private static final String SSN_BUCKET_FORMAT = "%s-bucket";
 
     public static Stream<BillingData> edgeBillingDataStream(String user, String sbn) {
         final String adjustedUserName = adjustUserName(10, user);
@@ -55,8 +54,10 @@ public class BillingUtils {
         return Stream.of(
                 BillingData.builder().user(SHARED_RESOURCE).displayName("SSN").dlabId(ssnId).resourceType(BillingData.ResourceType.SSN).build(),
                 BillingData.builder().user(SHARED_RESOURCE).displayName("SSN Volume").dlabId(String.format(VOLUME_PRIMARY_FORMAT, ssnId)).resourceType(BillingData.ResourceType.VOLUME).build(),
-                BillingData.builder().user(SHARED_RESOURCE).displayName("SSN bucket").dlabId(bucketName + "-ssn-bucket").resourceType(BillingData.ResourceType.SSN_BUCKET).build(),
-                BillingData.builder().user(SHARED_RESOURCE).displayName("Collaboration bucket").dlabId(bucketName + "-shared-bucket").resourceType(BillingData.ResourceType.SHARED_BUCKET).build()
+                BillingData.builder().user(SHARED_RESOURCE).displayName("SSN bucket").dlabId(bucketName + "-ssn" +
+                        "-bucket").resourceType(BillingData.ResourceType.SSN_BUCKET).build(),
+                BillingData.builder().user(SHARED_RESOURCE).displayName("Collaboration bucket").dlabId(bucketName +
+                        "-shared-bucket").resourceType(BillingData.ResourceType.SHARED_BUCKET).build()
         );
     }
 
@@ -74,7 +75,8 @@ public class BillingUtils {
         return Stream.concat(computationalStream, exploratoryStream);
     }
 
-    private static BillingData computationalBillableResource(UserInstance userInstance, UserInstance.ComputationalResource cr) {
+    private static BillingData computationalBillableResource(UserInstance userInstance,
+                                                             UserInstance.ComputationalResource cr) {
         return withExploratoryName(userInstance)
                 .dlabId(cr.getComputationalId())
                 .displayName(cr.getComputationalName())
diff --git a/services/billing-gcp/src/main/resources/application.yml b/services/billing-gcp/src/main/resources/application.yml
index be25237..e315e40 100644
--- a/services/billing-gcp/src/main/resources/application.yml
+++ b/services/billing-gcp/src/main/resources/application.yml
@@ -6,7 +6,8 @@ spring:
       database: DLAB
       port: 27017
       host: localhost
-
-ssnBaseName: it78
-tableName: test_dataset.test
-cron: 0 * * * * *
\ No newline at end of file
+dlab:
+  sbn: it78
+  bigQueryDataset: test_dataset
+  bigQueryTable: test
+  cron: 0 * * * * *
\ No newline at end of file
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 5214144..70ae6d5 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
@@ -55,36 +55,6 @@ public class GcpBillingDao extends BaseBillingDAO<GcpBillingFilter> {
     }
 
     @Override
-    public Double getTotalCost() {
-        return null;
-    }
-
-    @Override
-    public Double getUserCost(String user) {
-        return null;
-    }
-
-    @Override
-    public int getBillingQuoteUsed() {
-        return 0;
-    }
-
-    @Override
-    public int getBillingUserQuoteUsed(String user) {
-        return 0;
-    }
-
-    @Override
-    public boolean isBillingQuoteReached() {
-        return false;
-    }
-
-    @Override
-    public boolean isUserQuoteReached(String user) {
-        return false;
-    }
-
-    @Override
     protected List<Bson> cloudMatchCriteria(GcpBillingFilter filter) {
         return Collections.emptyList();
     }


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