Skip to content
Snippets Groups Projects
Commit a28d6669 authored by Martin Weise's avatar Martin Weise
Browse files

WIP

parent e323d874
Branches
Tags
2 merge requests!81New stable release,!80Multiple features connected with user management and ownership of databases
Showing
with 39 additions and 42 deletions
......@@ -4,7 +4,6 @@ import time
import os
import shutil
import uuid
import sys
import api_query.rest
from api_authentication.api.authentication_endpoint_api import AuthenticationEndpointApi
......@@ -214,6 +213,12 @@ def create_identifier(container_id, database_id, query_id, visibility="everyone"
return response
def delete_tuple(container_id, database_id, table_id, keys):
response = data.delete(keys, container_id, database_id, table_id)
print("deleted tuples for table with id %d" % table_id)
return response
if __name__ == '__main__':
#
# create 1 user and 3 containers (public, private, public)
......@@ -245,7 +250,19 @@ if __name__ == '__main__':
create_identifier(cid, dbid, qid, visibility="self")
qid = create_query(cid, dbid, "select `id` from `" + tname + "`").id
create_identifier(cid, dbid, qid)
# container 3 with 3 tables
for i in range(5, 10):
delete_tuple(cid, dbid, tid, {
"keys": {
"id": i
}
})
time.sleep(1)
delete_tuple(cid, dbid, tid, {
"keys": {
"location": "Schimmelstrasse"
}
})
# container 3 with 4 tables
cid = create_container().id
start_container(cid)
dbid = create_database(cid).id
......@@ -258,13 +275,13 @@ if __name__ == '__main__':
"primary_key": True,
"null_allowed": False,
}])
create_table(cid, dbid, columns=[{
tid = create_table(cid, dbid, columns=[{
"name": "primary",
"type": "number",
"unique": True,
"primary_key": True,
"null_allowed": False,
}])
}]).id
create_table(cid, dbid, columns=[{
"name": "primary",
"type": "date",
......@@ -289,7 +306,7 @@ if __name__ == '__main__':
create_query(cid, dbid, "select `date` from `" + tname + "`")
qid = create_query(cid, dbid, "select `date`, `location`, `status` from `" + tname + "`").id
create_identifier(cid, dbid, qid)
# container 1
# container 1 (foreign container query)
tname = find_table(1, 1, 1).internal_name
qid = create_query(1, 1, "select `id` from `" + tname + "`").id
create_identifier(1, 1, qid)
......@@ -50,7 +50,6 @@ services:
fda-public:
environment:
SPRING_PROFILES_ACTIVE: docker
TZ: Europe/Vienna
ports:
- "9090:9090"
logging:
......@@ -66,7 +65,6 @@ services:
fda-public:
environment:
SPRING_PROFILES_ACTIVE: docker
TZ: Europe/Vienna
ports:
- "9095:9095"
depends_on:
......@@ -88,7 +86,6 @@ services:
GATEWAY_ENDPOINT: http://fda-gateway-service:9095
SEARCH_ENDPOINT: fda-search-service:9200
SPRING_PROFILES_ACTIVE: docker
TZ: Europe/Vienna
ports:
- "9092:9092"
volumes:
......@@ -114,7 +111,6 @@ services:
environment:
GATEWAY_ENDPOINT: http://fda-gateway-service:9095
SPRING_PROFILES_ACTIVE: docker
TZ: Europe/Vienna
ports:
- "9091:9091"
volumes:
......@@ -146,7 +142,6 @@ services:
SMTP_PORT: ${MAIL_PORT}
SMTP_USERNAME: ${MAIL_USERNAME}
SMTP_PASSWORD: ${MAIL_PASSWORD}
TZ: Europe/Vienna
ports:
- "9097:9097"
depends_on:
......@@ -171,7 +166,6 @@ services:
environment:
SPRING_PROFILES_ACTIVE: docker
GATEWAY_ENDPOINT: http://fda-gateway-service:9095
TZ: Europe/Vienna
ports:
- "9093:9093"
volumes:
......@@ -198,7 +192,6 @@ services:
SEARCH_ENDPOINT: fda-search-service:9200
SPRING_PROFILES_ACTIVE: docker
multipart.location: /tmp
TZ: Europe/Vienna
ports:
- "9094:9094"
volumes:
......@@ -225,7 +218,6 @@ services:
environment:
GATEWAY_ENDPOINT: http://fda-gateway-service:9095
SPRING_PROFILES_ACTIVE: docker
TZ: Europe/Vienna
ports:
- "9096:9096"
depends_on:
......@@ -269,7 +261,6 @@ services:
fda-public:
environment:
EUREKA_SERVER: http://fda-discovery-service:9090/eureka/
TZ: Europe/Vienna
ports:
- "5010:5010"
volumes:
......@@ -290,7 +281,6 @@ services:
environment:
SPRING_PROFILES_ACTIVE: docker
GATEWAY_ENDPOINT: http://fda-gateway-service:9095
TZ: Europe/Vienna
networks:
fda-public:
ports:
......
......@@ -50,7 +50,6 @@ services:
fda-public:
environment:
SPRING_PROFILES_ACTIVE: docker
TZ: Europe/Vienna
ports:
- "9090:9090"
logging:
......@@ -66,7 +65,6 @@ services:
fda-public:
environment:
SPRING_PROFILES_ACTIVE: docker
TZ: Europe/Vienna
ports:
- "9095:9095"
depends_on:
......@@ -88,7 +86,6 @@ services:
GATEWAY_ENDPOINT: http://fda-gateway-service:9095
SEARCH_ENDPOINT: fda-search-service:9200
SPRING_PROFILES_ACTIVE: docker
TZ: Europe/Vienna
ports:
- "9092:9092"
volumes:
......@@ -114,7 +111,6 @@ services:
environment:
GATEWAY_ENDPOINT: http://fda-gateway-service:9095
SPRING_PROFILES_ACTIVE: docker
TZ: Europe/Vienna
ports:
- "9091:9091"
volumes:
......@@ -146,7 +142,6 @@ services:
SMTP_PORT: ""
SMTP_USERNAME: ""
SMTP_PASSWORD: ""
TZ: Europe/Vienna
ports:
- "9097:9097"
depends_on:
......@@ -171,7 +166,6 @@ services:
environment:
SPRING_PROFILES_ACTIVE: docker
GATEWAY_ENDPOINT: http://fda-gateway-service:9095
TZ: Europe/Vienna
ports:
- "9093:9093"
volumes:
......@@ -198,7 +192,6 @@ services:
SEARCH_ENDPOINT: fda-search-service:9200
SPRING_PROFILES_ACTIVE: docker
multipart.location: /tmp
TZ: Europe/Vienna
ports:
- "9094:9094"
volumes:
......@@ -225,7 +218,6 @@ services:
environment:
GATEWAY_ENDPOINT: http://fda-gateway-service:9095
SPRING_PROFILES_ACTIVE: docker
TZ: Europe/Vienna
ports:
- "9096:9096"
depends_on:
......@@ -269,7 +261,6 @@ services:
fda-public:
environment:
EUREKA_SERVER: http://fda-discovery-service:9090/eureka/
TZ: Europe/Vienna
ports:
- "5010:5010"
volumes:
......@@ -290,7 +281,6 @@ services:
environment:
SPRING_PROFILES_ACTIVE: docker
GATEWAY_ENDPOINT: http://fda-gateway-service:9095
TZ: Europe/Vienna
networks:
fda-public:
ports:
......
......@@ -15,7 +15,7 @@ spring:
properties:
hibernate:
jdbc:
time_zone: Europe/Vienna
time_zone: UTC
application:
name: fda-authentication-service
cloud:
......
......@@ -15,7 +15,7 @@ spring:
properties:
hibernate:
jdbc:
time_zone: Europe/Vienna
time_zone: UTC
application:
name: fda-authentication-service
cloud:
......
......@@ -23,7 +23,7 @@ public class JacksonConfig {
objectMapper.registerModule(new Jdk8Module());
objectMapper.registerModule(new JavaTimeModule());
objectMapper.configure(SerializationFeature.WRITE_DATES_AS_TIMESTAMPS, false);
objectMapper.setTimeZone(TimeZone.getTimeZone("Europe/Vienna"));
objectMapper.setTimeZone(TimeZone.getTimeZone("UTC"));
log.debug("current time is {}", objectMapper.writeValueAsString(new Date()));
return objectMapper;
}
......
......@@ -23,7 +23,7 @@ public class JacksonConfig {
objectMapper.registerModule(new Jdk8Module());
objectMapper.registerModule(new JavaTimeModule());
objectMapper.configure(SerializationFeature.WRITE_DATES_AS_TIMESTAMPS, false);
objectMapper.setTimeZone(TimeZone.getTimeZone("Europe/Vienna"));
objectMapper.setTimeZone(TimeZone.getTimeZone("UTC"));
log.debug("current time is {}", objectMapper.writeValueAsString(new Date()));
return objectMapper;
}
......
......@@ -11,7 +11,7 @@ spring:
properties:
hibernate:
jdbc:
time_zone: Europe/Vienna
time_zone: UTC
application:
name: fda-broker-service
rabbitmq:
......
......@@ -11,7 +11,7 @@ spring:
properties:
hibernate:
jdbc:
time_zone: Europe/Vienna
time_zone: UTC
application:
name: fda-broker-service
rabbitmq:
......
......@@ -15,7 +15,7 @@ spring:
properties:
hibernate:
jdbc:
time_zone: Europe/Vienna
time_zone: UTC
application:
name: fda-container-service
cloud:
......
......@@ -15,7 +15,7 @@ spring:
properties:
hibernate:
jdbc:
time_zone: Europe/Vienna
time_zone: UTC
application:
name: fda-container-service
cloud:
......
......@@ -23,7 +23,7 @@ public class JacksonConfig {
objectMapper.registerModule(new Jdk8Module());
objectMapper.registerModule(new JavaTimeModule());
objectMapper.configure(SerializationFeature.WRITE_DATES_AS_TIMESTAMPS, false);
objectMapper.setTimeZone(TimeZone.getTimeZone("Europe/Vienna"));
objectMapper.setTimeZone(TimeZone.getTimeZone("UTC"));
log.debug("current time is {}", objectMapper.writeValueAsString(new Date()));
return objectMapper;
}
......
......@@ -15,7 +15,7 @@ spring:
properties:
hibernate:
jdbc:
time_zone: Europe/Vienna
time_zone: UTC
application:
name: fda-database-service
cloud:
......
......@@ -15,7 +15,7 @@ spring:
properties:
hibernate:
jdbc:
time_zone: Europe/Vienna
time_zone: UTC
application:
name: fda-database-service
cloud:
......
......@@ -23,7 +23,7 @@ public class JacksonConfig {
objectMapper.registerModule(new Jdk8Module());
objectMapper.registerModule(new JavaTimeModule());
objectMapper.configure(SerializationFeature.WRITE_DATES_AS_TIMESTAMPS, false);
objectMapper.setTimeZone(TimeZone.getTimeZone("Europe/Vienna"));
objectMapper.setTimeZone(TimeZone.getTimeZone("UTC"));
log.debug("current time is {}", objectMapper.writeValueAsString(new Date()));
return objectMapper;
}
......
......@@ -23,7 +23,7 @@ public class JacksonConfig {
objectMapper.registerModule(new Jdk8Module());
objectMapper.registerModule(new JavaTimeModule());
objectMapper.configure(SerializationFeature.WRITE_DATES_AS_TIMESTAMPS, false);
objectMapper.setTimeZone(TimeZone.getTimeZone("Europe/Vienna"));
objectMapper.setTimeZone(TimeZone.getTimeZone("UTC"));
log.debug("current time is {}", objectMapper.writeValueAsString(new Date()));
return objectMapper;
}
......
......@@ -14,7 +14,7 @@ spring:
properties:
hibernate:
jdbc:
time_zone: Europe/Vienna
time_zone: UTC
application:
name: fda-discovery-service
server.port: 9090
......
......@@ -14,7 +14,7 @@ spring:
properties:
hibernate:
jdbc:
time_zone: Europe/Vienna
time_zone: UTC
application:
name: fda-discovery-service
server.port: 9090
......
......@@ -23,7 +23,7 @@ public class JacksonConfig {
objectMapper.registerModule(new Jdk8Module());
objectMapper.registerModule(new JavaTimeModule());
objectMapper.configure(SerializationFeature.WRITE_DATES_AS_TIMESTAMPS, false);
objectMapper.setTimeZone(TimeZone.getTimeZone("Europe/Vienna"));
objectMapper.setTimeZone(TimeZone.getTimeZone("UTC"));
log.debug("current time is {}", objectMapper.writeValueAsString(new Date()));
return objectMapper;
}
......
......@@ -20,7 +20,7 @@ public class ReadyConfig {
@EventListener(ApplicationReadyEvent.class)
public void init() throws IOException, InterruptedException {
log.info("Wait more for gateway start");
Thread.sleep(10 * 1000L);
Thread.sleep(20 * 1000L);
Files.touch(new File(readyPath));
}
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please to comment