Commit 4290235d authored by Spiros Koulouzis's avatar Spiros Koulouzis

passed all tests

parent a5d45408
...@@ -33,3 +33,4 @@ ...@@ -33,3 +33,4 @@
/drip-deployer/venv/ /drip-deployer/venv/
/drip/target/ /drip/target/
/drip-manager/target/ /drip-manager/target/
/drip-manager/nbproject/
\ No newline at end of file
tosca_definitions_version: tosca_simple_yaml_1_0
imports:
- nodes: https://raw.githubusercontent.com/skoulouzis/DRIP/DRIP_3.0/TOSCA/types/nodes.yaml
- capabilities: https://raw.githubusercontent.com/skoulouzis/DRIP/DRIP_3.0/TOSCA/types/capabilities.yaml
- policies: https://raw.githubusercontent.com/skoulouzis/DRIP/DRIP_3.0/TOSCA/types/policies.yaml
repositories:
docker_hub: https://hub.docker.com/
description: >
TOSCA example
topology_template:
node_templates:
wordpress:
type: tosca.nodes.ARTICONF.Container.Application.Docker
requirements:
- service:
node: mysql
relationship:
#type: tosca.relationships.ConnectsTo
type: tosca.relationships.DependsOn
artifacts:
image:
file: wordpress:latest
type: tosca.artifacts.Deployment.Image.Container.Docker
repository: docker_hub
properties:
ports:
- "8000:80"
environment:
WORDPRESS_DB_HOST: mysql:3306
WORDPRESS_DB_USER: wordpress
WORDPRESS_DB_PASSWORD: wordpress
WORDPRESS_DB_NAME: wordpress
mysql:
type: tosca.nodes.ARTICONF.Container.Application.Docker
properties:
ports:
- "3306:3306"
volumes:
- db_data:/var/lib/mysql
environment:
MYSQL_ROOT_PASSWORD: somewordpress
MYSQL_DATABASE: wordpress
MYSQL_USER: wordpress
MYSQL_PASSWORD: wordpress
artifacts:
image:
type: tosca.artifacts.Deployment.Image.Container.Docker
file: mysql:5.7
repository: docker_hub
logspout:
type: tosca.nodes.ARTICONF.Container.Application.Docker
properties:
ports:
- "8000:80"
volumes:
- /etc/hostname:/etc/host_hostname:ro
- /var/run/docker.sock:/var/run/docker.sock
environment:
publish: "127.0.0.1:8000:80"
artifacts:
image:
type: tosca.artifacts.Deployment.Image.Container.Docker
file: gliderlabs/logspout:latest
repository: docker_hub
policies:
- scalability:
type: tosca.policies.ARTICONF.Performance
targets: [ wordpress ]
#-------------------------Dockers-------------------------------------------- #-------------------------Dockers--------------------------------------------
docker run --hostname my-rabbit --name some-rabbit -p 127.0.0.1:15672:15672 -p 127.0.0.1:4369:4369 -p 127.0.0.1:5671-5672:5671-5672 -p 127.0.0.1:15671:15671 -d rabbitmq:3-management docker run --hostname my-rabbit --name some-rabbit -p 127.0.0.1:15672:15672 -p 127.0.0.1:4369:4369 -p 127.0.0.1:5671-5672:5671-5672 -p 127.0.0.1:15671:15671 -d rabbitmq:3.8-management
docker run --name mongo-inst -p 127.0.0.1:27017:27017 -d mongo:3 docker run --name mongo-inst -p 127.0.0.1:27017:27017 -d mongo:4
docker run --name drip-inst -p 127.0.0.1:8080:8080 -d drip-manager docker run --name drip-inst -p 127.0.0.1:8080:8080 -d drip-manager
docker run --hostname my-proxy --name some-myproxy -p 7512:7512 -p 7513:7513 -p 10022:22 agaveapi/myproxy docker run --hostname my-proxy --name some-myproxy -p 7512:7512 -p 7513:7513 -p 10022:22 agaveapi/myproxy
......
...@@ -169,8 +169,8 @@ ...@@ -169,8 +169,8 @@
<artifactId>maven-compiler-plugin</artifactId> <artifactId>maven-compiler-plugin</artifactId>
<version>2.3.2</version> <version>2.3.2</version>
<configuration> <configuration>
<source>1.8</source> <source>9</source>
<target>1.8</target> <target>9</target>
<compilerArguments> <compilerArguments>
<endorseddirs>${endorsed.dir}</endorseddirs> <endorseddirs>${endorsed.dir}</endorseddirs>
</compilerArguments> </compilerArguments>
......
...@@ -150,25 +150,16 @@ public class ToscaTemplateServiceTest { ...@@ -150,25 +150,16 @@ public class ToscaTemplateServiceTest {
* Test of updateToscaTemplateByID method, of class ToscaTemplateService. * Test of updateToscaTemplateByID method, of class ToscaTemplateService.
*/ */
@Test @Test
public void testUpdateToscaTemplateByID_Exception_MultipartFile() { public void testUpdateToscaTemplateByID_Exception_MultipartFile() throws FileNotFoundException, IOException {
FileInputStream in = null; FileInputStream in = null;
try {
in = new FileInputStream(testUpdatedApplicationExampleToscaFilePath); in = new FileInputStream(testUpdatedApplicationExampleToscaFilePath);
MultipartFile file = new MockMultipartFile("file", in); MultipartFile file = new MockMultipartFile("file", in);
try {
String result = instance.updateToscaTemplateByID("0", file); String result = instance.updateToscaTemplateByID("0", file);
} catch (FileNotFoundException ex) { } catch (Exception ex) {
Logger.getLogger(ToscaTemplateServiceTest.class.getName()).log(Level.SEVERE, null, ex);
} catch (IOException | ApiException ex) {
if (!(ex instanceof NoSuchElementException)) { if (!(ex instanceof NoSuchElementException)) {
fail(ex.getMessage()); fail(ex.getMessage());
Logger.getLogger(ToscaTemplateServiceTest.class.getName()).log(Level.SEVERE, null, ex);
}
} finally {
try {
in.close();
} catch (IOException ex) {
fail(ex.getMessage());
Logger.getLogger(ToscaTemplateServiceTest.class.getName()).log(Level.SEVERE, null, ex);
} }
} }
} }
......
...@@ -2,6 +2,28 @@ ...@@ -2,6 +2,28 @@
<project version="4"> <project version="4">
<component name="ChangeListManager"> <component name="ChangeListManager">
<list default="true" id="462ede19-adfe-472b-975e-fefefa973fe0" name="Default Changelist" comment="slolved cap error"> <list default="true" id="462ede19-adfe-472b-975e-fefefa973fe0" name="Default Changelist" comment="slolved cap error">
<change beforePath="$PROJECT_DIR$/../docs/NOTES" beforeDir="false" afterPath="$PROJECT_DIR$/../docs/NOTES" afterDir="false" />
<change beforePath="$PROJECT_DIR$/../drip-manager/nb-configuration.xml" beforeDir="false" />
<change beforePath="$PROJECT_DIR$/../drip-manager/pom.xml" beforeDir="false" afterPath="$PROJECT_DIR$/../drip-manager/pom.xml" afterDir="false" />
<change beforePath="$PROJECT_DIR$/../drip-manager/src/main/java/nl/uva/sne/drip/Swagger2SpringBoot.java" beforeDir="false" afterPath="$PROJECT_DIR$/../drip-manager/src/main/java/nl/uva/sne/drip/Swagger2SpringBoot.java" afterDir="false" />
<change beforePath="$PROJECT_DIR$/../drip-manager/src/main/java/nl/uva/sne/drip/api/ApiException.java" beforeDir="false" afterPath="$PROJECT_DIR$/../drip-manager/src/main/java/nl/uva/sne/drip/api/ApiException.java" afterDir="false" />
<change beforePath="$PROJECT_DIR$/../drip-manager/src/main/java/nl/uva/sne/drip/api/ApiOriginFilter.java" beforeDir="false" afterPath="$PROJECT_DIR$/../drip-manager/src/main/java/nl/uva/sne/drip/api/ApiOriginFilter.java" afterDir="false" />
<change beforePath="$PROJECT_DIR$/../drip-manager/src/main/java/nl/uva/sne/drip/api/ApiResponseMessage.java" beforeDir="false" afterPath="$PROJECT_DIR$/../drip-manager/src/main/java/nl/uva/sne/drip/api/ApiResponseMessage.java" afterDir="false" />
<change beforePath="$PROJECT_DIR$/../drip-manager/src/main/java/nl/uva/sne/drip/api/NotFoundException.java" beforeDir="false" afterPath="$PROJECT_DIR$/../drip-manager/src/main/java/nl/uva/sne/drip/api/NotFoundException.java" afterDir="false" />
<change beforePath="$PROJECT_DIR$/../drip-manager/src/main/java/nl/uva/sne/drip/api/TopologTemplateApi.java" beforeDir="false" />
<change beforePath="$PROJECT_DIR$/../drip-manager/src/main/java/nl/uva/sne/drip/api/TopologTemplateApiController.java" beforeDir="false" />
<change beforePath="$PROJECT_DIR$/../drip-manager/src/main/java/nl/uva/sne/drip/api/UserApi.java" beforeDir="false" afterPath="$PROJECT_DIR$/../drip-manager/src/main/java/nl/uva/sne/drip/api/UserApi.java" afterDir="false" />
<change beforePath="$PROJECT_DIR$/../drip-manager/src/main/java/nl/uva/sne/drip/api/UserApiController.java" beforeDir="false" afterPath="$PROJECT_DIR$/../drip-manager/src/main/java/nl/uva/sne/drip/api/UserApiController.java" afterDir="false" />
<change beforePath="$PROJECT_DIR$/../drip-manager/src/main/java/nl/uva/sne/drip/configuration/CustomInstantDeserializer.java" beforeDir="false" afterPath="$PROJECT_DIR$/../drip-manager/src/main/java/nl/uva/sne/drip/configuration/CustomInstantDeserializer.java" afterDir="false" />
<change beforePath="$PROJECT_DIR$/../drip-manager/src/main/java/nl/uva/sne/drip/configuration/MongoConfig.java" beforeDir="false" afterPath="$PROJECT_DIR$/../drip-manager/src/main/java/nl/uva/sne/drip/configuration/MongoConfig.java" afterDir="false" />
<change beforePath="$PROJECT_DIR$/../drip-manager/src/main/java/nl/uva/sne/drip/configuration/SwaggerDocumentationConfig.java" beforeDir="false" afterPath="$PROJECT_DIR$/../drip-manager/src/main/java/nl/uva/sne/drip/configuration/SwaggerDocumentationConfig.java" afterDir="false" />
<change beforePath="$PROJECT_DIR$/../drip-manager/src/main/java/nl/uva/sne/drip/dao/TopologTemplateDAO.java" beforeDir="false" />
<change beforePath="$PROJECT_DIR$/../drip-manager/src/main/java/nl/uva/sne/drip/model/NodeTemplate.java" beforeDir="false" afterPath="$PROJECT_DIR$/../drip-manager/src/main/java/nl/uva/sne/drip/model/NodeTemplate.java" afterDir="false" />
<change beforePath="$PROJECT_DIR$/../drip-manager/src/main/java/nl/uva/sne/drip/model/TopologyTemplate.java" beforeDir="false" afterPath="$PROJECT_DIR$/../drip-manager/src/main/java/nl/uva/sne/drip/model/TopologyTemplate.java" afterDir="false" />
<change beforePath="$PROJECT_DIR$/../drip-manager/src/main/java/nl/uva/sne/drip/model/ToscaTemplate.java" beforeDir="false" afterPath="$PROJECT_DIR$/../drip-manager/src/main/java/nl/uva/sne/drip/model/ToscaTemplate.java" afterDir="false" />
<change beforePath="$PROJECT_DIR$/../drip-manager/src/main/java/nl/uva/sne/drip/model/User.java" beforeDir="false" afterPath="$PROJECT_DIR$/../drip-manager/src/main/java/nl/uva/sne/drip/model/User.java" afterDir="false" />
<change beforePath="$PROJECT_DIR$/../drip-manager/src/main/java/nl/uva/sne/drip/service/TopologTemplateService.java" beforeDir="false" />
<change beforePath="$PROJECT_DIR$/../drip-manager/swagger.yaml" beforeDir="false" afterPath="$PROJECT_DIR$/../drip-manager/swagger.yaml" afterDir="false" />
<change beforePath="$PROJECT_DIR$/.idea/workspace.xml" beforeDir="false" afterPath="$PROJECT_DIR$/.idea/workspace.xml" afterDir="false" /> <change beforePath="$PROJECT_DIR$/.idea/workspace.xml" beforeDir="false" afterPath="$PROJECT_DIR$/.idea/workspace.xml" afterDir="false" />
<change beforePath="$PROJECT_DIR$/venv/lib/python3.6/site-packages/setuptools-40.8.0-py3.6.egg" beforeDir="false" afterPath="$PROJECT_DIR$/venv/lib/python3.6/site-packages/setuptools-40.8.0-py3.6.egg" afterDir="false" /> <change beforePath="$PROJECT_DIR$/venv/lib/python3.6/site-packages/setuptools-40.8.0-py3.6.egg" beforeDir="false" afterPath="$PROJECT_DIR$/venv/lib/python3.6/site-packages/setuptools-40.8.0-py3.6.egg" afterDir="false" />
</list> </list>
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment