Commit bf83e2b3 authored by Spiros Koulouzis's avatar Spiros Koulouzis

Added docker compose file

Created test module 
parent 15261762
......@@ -8,4 +8,5 @@
/drip-planner2provisioner/target/
/drip-component_example/target/
/deleteme/target/
/drip-api/nbproject/
\ No newline at end of file
/drip-api/nbproject/
/drip-tests/nbproject/
\ No newline at end of file
version: '2'
services:
mongo:
image: mongo:3
ports:
- "27017:27017"
command: "mongod --port 27017"
restart: always
rabbit:
image: rabbitmq:latest
ports:
- "5671-5672:5671-5672"
- "15671:15671"
restart: always
drip-planner:
depends_on:
- rabbit
build: planner/Dockerfile
image: drip-planner:latest
restart: always
environment:
RABBITMQ_HOST: rabbit
command: "python rpc_server.py $RABBITMQ_HOST"
\ No newline at end of file
......@@ -32,7 +32,7 @@ RUN ls
# WORKDIR drip-planner
# ARG RABBITMQ_HOST=172.17.0.2
# RUN echo $RABBITMQ_HOST > hostFile
# ENTRYPOINT python rpc_server.py 172.17.0.2
ENTRYPOINT python rpc_server.py $RABBITMQ_HOST
# docker build -t drip-planner .
# docker run --name drip-planner-inst -d drip-planner
......@@ -69,7 +69,7 @@ class</p>
<dl class="dl-horizontal">
<dt>Subtypes</dt>
<dd><a href="json_DeployRequest.html">DeployRequest</a>, <a href="json_ProvisionRequest.html">ProvisionRequest</a>, <a href="json_KeyPair.html">KeyPair</a>, <a href="json_KeyValueHolder.html">KeyValueHolder</a>, <a href="json_PlanResponse.html">PlanResponse</a>, <a href="json_PlaybookRepresentation.html">PlaybookRepresentation</a>, <a href="json_ProvisionResponse.html">ProvisionResponse</a>, <a href="json_Script.html">Script</a>, <a href="json_DeployResponse.html">DeployResponse</a>, <a href="json_ToscaRepresentation.html">ToscaRepresentation</a>, <a href="json_CloudCredentials.html">CloudCredentials</a></dd>
<dd><a href="json_DeployRequest.html">DeployRequest</a>, <a href="json_KeyPair.html">KeyPair</a>, <a href="json_ProvisionRequest.html">ProvisionRequest</a>, <a href="json_KeyValueHolder.html">KeyValueHolder</a>, <a href="json_PlanResponse.html">PlanResponse</a>, <a href="json_PlaybookRepresentation.html">PlaybookRepresentation</a>, <a href="json_Script.html">Script</a>, <a href="json_ProvisionResponse.html">ProvisionResponse</a>, <a href="json_DeployResponse.html">DeployResponse</a>, <a href="json_ToscaRepresentation.html">ToscaRepresentation</a>, <a href="json_CloudCredentials.html">CloudCredentials</a></dd>
</dl>
<table class="table datatype-properties">
......
......@@ -120,6 +120,10 @@ provisoner to request for resources (VMs)</p>
<td><span class="label label-success response-code">200</span></td>
<td><span class="response-condition">At least one key ID is posted</span></td>
</tr>
<tr>
<td><span class="label label-warning response-code">401</span></td>
<td><span class="response-condition">Bad credentials</span></td>
</tr>
</tbody>
</table>
......@@ -194,6 +198,22 @@ Content-Type: application/json
<dd>ADMIN</dd>
</dl>
<table class="table resource-response-codes">
<caption>Response Codes</caption>
<thead>
<tr>
<th>code</th>
<th>condition</th>
</tr>
</thead>
<tbody>
<tr>
<td><span class="label label-warning response-code">401</span></td>
<td><span class="response-condition">Bad credentials</span></td>
</tr>
</tbody>
</table>
<table class="table resource-response-body">
<caption>Response Body</caption>
<thead>
......@@ -252,6 +272,22 @@ Content-Type: application/json
<dd>ADMIN, USER</dd>
</dl>
<table class="table resource-response-codes">
<caption>Response Codes</caption>
<thead>
<tr>
<th>code</th>
<th>condition</th>
</tr>
</thead>
<tbody>
<tr>
<td><span class="label label-warning response-code">401</span></td>
<td><span class="response-condition">Bad credentials</span></td>
</tr>
</tbody>
</table>
<table class="table resource-response-body">
<caption>Response Body</caption>
<thead>
......@@ -312,6 +348,22 @@ Content-Type: application/json
<dd>ADMIN, USER</dd>
</dl>
<table class="table resource-response-codes">
<caption>Response Codes</caption>
<thead>
<tr>
<th>code</th>
<th>condition</th>
</tr>
</thead>
<tbody>
<tr>
<td><span class="label label-warning response-code">401</span></td>
<td><span class="response-condition">Bad credentials</span></td>
</tr>
</tbody>
</table>
<table class="table resource-response-body">
<caption>Response Body</caption>
<thead>
......@@ -395,6 +447,22 @@ Content-Type: application/json
</tbody>
</table>
<table class="table resource-response-codes">
<caption>Response Codes</caption>
<thead>
<tr>
<th>code</th>
<th>condition</th>
</tr>
</thead>
<tbody>
<tr>
<td><span class="label label-warning response-code">401</span></td>
<td><span class="response-condition">Bad credentials</span></td>
</tr>
</tbody>
</table>
<table class="table resource-response-body">
<caption>Response Body</caption>
<thead>
......@@ -473,6 +541,22 @@ Content-Type: application/json
</tbody>
</table>
<table class="table resource-response-codes">
<caption>Response Codes</caption>
<thead>
<tr>
<th>code</th>
<th>condition</th>
</tr>
</thead>
<tbody>
<tr>
<td><span class="label label-warning response-code">401</span></td>
<td><span class="response-condition">Bad credentials</span></td>
</tr>
</tbody>
</table>
<table class="table resource-response-body">
<caption>Response Body</caption>
<thead>
......@@ -564,6 +648,22 @@ be created</p>
</tbody>
</table>
<table class="table resource-response-codes">
<caption>Response Codes</caption>
<thead>
<tr>
<th>code</th>
<th>condition</th>
</tr>
</thead>
<tbody>
<tr>
<td><span class="label label-warning response-code">401</span></td>
<td><span class="response-condition">Bad credentials</span></td>
</tr>
</tbody>
</table>
<table class="table resource-response-body">
<caption>Response Body</caption>
<thead>
......
......@@ -84,6 +84,22 @@ used by the planner.</p>
<dd>ADMIN</dd>
</dl>
<table class="table resource-response-codes">
<caption>Response Codes</caption>
<thead>
<tr>
<th>code</th>
<th>condition</th>
</tr>
</thead>
<tbody>
<tr>
<td><span class="label label-warning response-code">401</span></td>
<td><span class="response-condition">Bad credentials</span></td>
</tr>
</tbody>
</table>
<table class="table resource-response-body">
<caption>Response Body</caption>
<thead>
......@@ -144,6 +160,22 @@ Content-Type: application/json
<dd>ADMIN, USER</dd>
</dl>
<table class="table resource-response-codes">
<caption>Response Codes</caption>
<thead>
<tr>
<th>code</th>
<th>condition</th>
</tr>
</thead>
<tbody>
<tr>
<td><span class="label label-warning response-code">401</span></td>
<td><span class="response-condition">Bad credentials</span></td>
</tr>
</tbody>
</table>
<table class="table resource-response-body">
<caption>Response Body</caption>
<thead>
......@@ -226,6 +258,22 @@ Content-Type: application/json
</tbody>
</table>
<table class="table resource-response-codes">
<caption>Response Codes</caption>
<thead>
<tr>
<th>code</th>
<th>condition</th>
</tr>
</thead>
<tbody>
<tr>
<td><span class="label label-warning response-code">401</span></td>
<td><span class="response-condition">Bad credentials</span></td>
</tr>
</tbody>
</table>
<table class="table resource-response-body">
<caption>Response Body</caption>
<thead>
......@@ -306,6 +354,22 @@ Content-Type: application/json
</tbody>
</table>
<table class="table resource-response-codes">
<caption>Response Codes</caption>
<thead>
<tr>
<th>code</th>
<th>condition</th>
</tr>
</thead>
<tbody>
<tr>
<td><span class="label label-warning response-code">401</span></td>
<td><span class="response-condition">Bad credentials</span></td>
</tr>
</tbody>
</table>
<table class="table resource-response-body">
<caption>Response Body</caption>
<thead>
......@@ -384,6 +448,22 @@ Content-Type: application/json
</tbody>
</table>
<table class="table resource-response-codes">
<caption>Response Codes</caption>
<thead>
<tr>
<th>code</th>
<th>condition</th>
</tr>
</thead>
<tbody>
<tr>
<td><span class="label label-warning response-code">401</span></td>
<td><span class="response-condition">Bad credentials</span></td>
</tr>
</tbody>
</table>
<table class="table resource-response-body">
<caption>Response Body</caption>
<thead>
......@@ -467,6 +547,22 @@ Content-Type: application/json
</tbody>
</table>
<table class="table resource-response-codes">
<caption>Response Codes</caption>
<thead>
<tr>
<th>code</th>
<th>condition</th>
</tr>
</thead>
<tbody>
<tr>
<td><span class="label label-warning response-code">401</span></td>
<td><span class="response-condition">Bad credentials</span></td>
</tr>
</tbody>
</table>
<table class="table resource-response-body">
<caption>Response Body</caption>
<thead>
......
......@@ -84,6 +84,22 @@ resources.</p>
<dd>ADMIN</dd>
</dl>
<table class="table resource-response-codes">
<caption>Response Codes</caption>
<thead>
<tr>
<th>code</th>
<th>condition</th>
</tr>
</thead>
<tbody>
<tr>
<td><span class="label label-warning response-code">401</span></td>
<td><span class="response-condition">Bad credentials</span></td>
</tr>
</tbody>
</table>
<table class="table resource-response-body">
<caption>Response Body</caption>
<thead>
......@@ -164,6 +180,22 @@ Content-Type: application/json
</tbody>
</table>
<table class="table resource-response-codes">
<caption>Response Codes</caption>
<thead>
<tr>
<th>code</th>
<th>condition</th>
</tr>
</thead>
<tbody>
<tr>
<td><span class="label label-warning response-code">401</span></td>
<td><span class="response-condition">Bad credentials</span></td>
</tr>
</tbody>
</table>
<table class="table resource-response-body">
<caption>Response Body</caption>
<thead>
......@@ -232,6 +264,22 @@ Content-Type: application/json
<dd>ADMIN, USER</dd>
</dl>
<table class="table resource-response-codes">
<caption>Response Codes</caption>
<thead>
<tr>
<th>code</th>
<th>condition</th>
</tr>
</thead>
<tbody>
<tr>
<td><span class="label label-warning response-code">401</span></td>
<td><span class="response-condition">Bad credentials</span></td>
</tr>
</tbody>
</table>
<table class="table resource-response-body">
<caption>Response Body</caption>
<thead>
......@@ -290,6 +338,22 @@ Content-Type: application/json
<dd>ADMIN, USER</dd>
</dl>
<table class="table resource-response-codes">
<caption>Response Codes</caption>
<thead>
<tr>
<th>code</th>
<th>condition</th>
</tr>
</thead>
<tbody>
<tr>
<td><span class="label label-warning response-code">401</span></td>
<td><span class="response-condition">Bad credentials</span></td>
</tr>
</tbody>
</table>
<table class="table resource-response-body">
<caption>Response Body</caption>
<thead>
......@@ -372,6 +436,22 @@ Content-Type: application/json
</tbody>
</table>
<table class="table resource-response-codes">
<caption>Response Codes</caption>
<thead>
<tr>
<th>code</th>
<th>condition</th>
</tr>
</thead>
<tbody>
<tr>
<td><span class="label label-warning response-code">401</span></td>
<td><span class="response-condition">Bad credentials</span></td>
</tr>
</tbody>
</table>
<table class="table resource-response-body">
<caption>Response Body</caption>
<thead>
......@@ -448,6 +528,22 @@ Content-Type: application/json
</tbody>
</table>
<table class="table resource-response-codes">
<caption>Response Codes</caption>
<thead>
<tr>
<th>code</th>
<th>condition</th>
</tr>
</thead>
<tbody>
<tr>
<td><span class="label label-warning response-code">401</span></td>
<td><span class="response-condition">Bad credentials</span></td>
</tr>
</tbody>
</table>
<table class="table resource-response-body">
<caption>Response Body</caption>
<thead>
......
......@@ -122,6 +122,10 @@ new lines in the 'key' field have to be replaced with the '\n' character.</p>
<td><span class="label label-warning response-code">400</span></td>
<td><span class="response-condition">Key can't be empty</span></td>
</tr>
<tr>
<td><span class="label label-warning response-code">401</span></td>
<td><span class="response-condition">Bad credentials</span></td>
</tr>
</tbody>
</table>
......@@ -210,6 +214,22 @@ Content-Type: application/json
<dd>ADMIN</dd>
</dl>
<table class="table resource-response-codes">
<caption>Response Codes</caption>
<thead>
<tr>
<th>code</th>
<th>condition</th>
</tr>
</thead>
<tbody>
<tr>
<td><span class="label label-warning response-code">401</span></td>
<td><span class="response-condition">Bad credentials</span></td>
</tr>
</tbody>
</table>
<table class="table resource-response-body">
<caption>Response Body</caption>
<thead>
......@@ -268,6 +288,22 @@ Content-Type: application/json
<dd>ADMIN, USER</dd>
</dl>
<table class="table resource-response-codes">
<caption>Response Codes</caption>
<thead>
<tr>
<th>code</th>
<th>condition</th>
</tr>
</thead>
<tbody>
<tr>
<td><span class="label label-warning response-code">401</span></td>
<td><span class="response-condition">Bad credentials</span></td>
</tr>
</tbody>
</table>
<table class="table resource-response-body">
<caption>Response Body</caption>
<thead>
......@@ -328,6 +364,22 @@ Content-Type: application/json
<dd>ADMIN, USER</dd>
</dl>
<table class="table resource-response-codes">
<caption>Response Codes</caption>
<thead>
<tr>
<th>code</th>
<th>condition</th>
</tr>
</thead>
<tbody>
<tr>
<td><span class="label label-warning response-code">401</span></td>
<td><span class="response-condition">Bad credentials</span></td>
</tr>
</tbody>
</table>
<table class="table resource-response-body">
<caption>Response Body</caption>
<thead>
......@@ -425,6 +477,22 @@ Content-Type: application/json
</tbody>
</table>
<table class="table resource-response-codes">
<caption>Response Codes</caption>
<thead>
<tr>
<th>code</th>
<th>condition</th>
</tr>
</thead>
<tbody>
<tr>
<td><span class="label label-warning response-code">401</span></td>
<td><span class="response-condition">Bad credentials</span></td>
</tr>
</tbody>
</table>
<table class="table resource-response-body">
<caption>Response Body</caption>
<thead>
......@@ -503,6 +571,22 @@ Content-Type: application/json
</tbody>
</table>
<table class="table resource-response-codes">
<caption>Response Codes</caption>
<thead>
<tr>
<th>code</th>
<th>condition</th>
</tr>
</thead>
<tbody>
<tr>
<td><span class="label label-warning response-code">401</span></td>
<td><span class="response-condition">Bad credentials</span></td>
</tr>
</tbody>
</table>
<table class="table resource-response-body">
<caption>Response Body</caption>
<thead>
......
......@@ -84,6 +84,22 @@ provisopned based on a TOSCA description.</p>
<dd>ADMIN</dd>
</dl>
<table class="table resource-response-codes">
<caption>Response Codes</caption>
<thead>
<tr>
<th>code</th>
<th>condition</th>
</tr>
</thead>
<tbody>
<tr>
<td><span class="label label-warning response-code">401</span></td>
<td><span class="response-condition">Bad credentials</span></td>
</tr>
</tbody>
</table>
<table class="table resource-response-body">
<caption>Response Body</caption>
<thead>
......@@ -142,6 +158,22 @@ Content-Type: application/json
<dd>ADMIN, USER</dd>
</dl>
<table class="table resource-response-codes">
<caption>Response Codes</caption>
<thead>
<tr>
<th>code</th>
<th>condition</th>
</tr>
</thead>
<tbody>
<tr>
<td><span class="label label-warning response-code">401</span></td>
<td><span class="response-condition">Bad credentials</span></td>
</tr>
</tbody>
</table>
<table class="table resource-response-body">
<caption>Response Body</caption>
<thead>
......@@ -220,6 +252,22 @@ Content-Type: application/json
</tbody>
</table>
<table class="table resource-response-codes">
<caption>Response Codes</caption>
<thead>
<tr>
<th>code</th>
<th>condition</th>
</tr>
</thead>
<tbody>
<tr>
<td><span class="label label-warning response-code">401</span></td>
<td><span class="response-condition">Bad credentials</span></td>
</tr>
</tbody>
</table>
<table class="table resource-response-body">
<caption>Response Body</caption>
<thead>
......@@ -303,6 +351,22 @@ Content-Type: application/json
</tbody>
</table>
<table class="table resource-response-codes">
<caption>Response Codes</caption>
<thead>
<tr>
<th>code</th>
<th>condition</th>
</tr>
</thead>
<tbody>
<tr>
<td><span class="label label-warning response-code">401</span></td>
<td><span class="response-condition">Bad credentials</span></td>
</tr>
</tbody>
</table>
<table class="table resource-response-body">
<caption>Response Body</caption>
<thead>
......@@ -381,6 +445,22 @@ Content-Type: application/json
</tbody>
</table>
<table class="table resource-response-codes">
<caption>Response Codes</caption>
<thead>
<tr>
<th>code</th>
<th>condition</th>
</tr>
</thead>
<tbody>
<tr>
<td><span class="label label-warning response-code">401</span></td>
<td><span class="response-condition">Bad credentials</span></td>
</tr>
</tbody>
</table>
<table class="table resource-response-body">
<caption>Response Body</caption>
<thead>
......@@ -460,6 +540,22 @@ The plan is represented by its ID</p>
</tbody>
</table>
<table class="table resource-response-codes">
<caption>Response Codes</caption>
<thead>
<tr>
<th>code</th>
<th>condition</th>
</tr>
</thead>
<tbody>
<tr>
<td><span class="label label-warning response-code">401</span></td>
<td><span class="response-condition">Bad credentials</span></td>
</tr>
</tbody>
</table>
<table class="table resource-response-body">
<caption>Response Body</caption>
<thead>
......
......@@ -83,6 +83,22 @@ based the plan generated by the planner</p>
<dd>ADMIN</dd>
</dl>
<table class="table resource-response-codes">
<caption>Response Codes</caption>
<thead>
<tr>
<th>code</th>
<th>condition</th>
</tr>
</thead>
<tbody>
<tr>
<td><span class="label label-warning response-code">401</span></td>
<td><span class="response-condition">Bad credentials</span></td>
</tr>
</tbody>
</table>
<table class="table resource-response-body">
<caption>Response Body</caption>
<thead>
......@@ -141,6 +157,22 @@ Content-Type: application/json
<dd>ADMIN, USER</dd>
</dl>
<table class="table resource-response-codes">
<caption>Response Codes</caption>
<thead>
<tr>
<th>code</th>
<th>condition</th>
</tr>
</thead>
<tbody>
<tr>
<td><span class="label label-warning response-code">401</span></td>
<td><span class="response-condition">Bad credentials</span></td>
</tr>
</tbody>
</table>
<table class="table resource-response-body">
<caption>Response Body</caption>
<thead>
......@@ -223,6 +255,22 @@ Content-Type: application/json
</tbody>
</table>
<table class="table resource-response-codes">
<caption>Response Codes</caption>
<thead>
<tr>
<th>code</th>
<th>condition</th>
</tr>
</thead>
<tbody>
<tr>
<td><span class="label label-warning response-code">401</span></td>
<td><span class="response-condition">Bad credentials</span></td>
</tr>
</tbody>
</table>
<table class="table resource-response-body">
<caption>Response Body</caption>
<thead>
......@@ -315,6 +363,22 @@ Content-Type: application/json
</tbody>
</table>
<table class="table resource-response-codes">
<caption>Response Codes</caption>
<thead>
<tr>
<th>code</th>
<th>condition</th>
</tr>
</thead>
<tbody>
<tr>
<td><span class="label label-warning response-code">401</span></td>
<td><span class="response-condition">Bad credentials</span></td>
</tr>
</tbody>
</table>
<table class="table resource-response-body">
<caption>Response Body</caption>
<thead>
......@@ -393,6 +457,22 @@ Content-Type: application/json
</tbody>
</table>
<table class="table resource-response-codes">
<caption>Response Codes</caption>
<thead>
<tr>
<th>code</th>
<th>condition</th>
</tr>
</thead>
<tbody>
<tr>
<td><span class="label label-warning response-code">401</span></td>
<td><span class="response-condition">Bad credentials</span></td>
</tr>
</tbody>
</table>
<table class="table resource-response-body">
<caption>Response Body</caption>
<thead>
......
......@@ -107,6 +107,22 @@ used by the provisoner to run on the created VMs.</p>
</tbody>
</table>
<table class="table resource-response-codes">
<caption>Response Codes</caption>
<thead>
<tr>
<th>code</th>
<th>condition</th>
</tr>
</thead>
<tbody>
<tr>
<td><span class="label label-warning response-code">401</span></td>
<td><span class="response-condition">Bad credentials</span></td>
</tr>
</tbody>
</table>
<table class="table resource-response-body">
<caption>Response Body</caption>
<thead>
......@@ -174,6 +190,22 @@ Content-Type: application/json
<dd>ADMIN</dd>
</dl>
<table class="table resource-response-codes">
<caption>Response Codes</caption>
<thead>
<tr>
<th>code</th>
<th>condition</th>
</tr>
</thead>
<tbody>
<tr>
<td><span class="label label-warning response-code">401</span></td>
<td><span class="response-condition">Bad credentials</span></td>
</tr>
</tbody>
</table>
<table class="table resource-response-body">
<caption>Response Body</caption>
<thead>
......@@ -227,6 +259,22 @@ Content-Type: application/json
<p>Gets the IDs of all the stored scripts</p>
<table class="table resource-response-codes">
<caption>Response Codes</caption>
<thead>
<tr>
<th>code</th>
<th>condition</th>
</tr>
</thead>
<tbody>
<tr>
<td><span class="label label-warning response-code">401</span></td>
<td><span class="response-condition">Bad credentials</span></td>
</tr>
</tbody>
</table>
<table class="table resource-response-body">
<caption>Response Body</caption>
<thead>
......@@ -287,6 +335,22 @@ Content-Type: application/json
<dd>ADMIN, USER</dd>
</dl>
<table class="table resource-response-codes">
<caption>Response Codes</caption>
<thead>
<tr>
<th>code</th>
<th>condition</th>
</tr>
</thead>
<tbody>
<tr>
<td><span class="label label-warning response-code">401</span></td>
<td><span class="response-condition">Bad credentials</span></td>
</tr>
</tbody>
</table>
<table class="table resource-response-body">
<caption>Response Body</caption>
<thead>
......@@ -368,6 +432,22 @@ Content-Type: application/json
</tbody>
</table>
<table class="table resource-response-codes">
<caption>Response Codes</caption>
<thead>
<tr>
<th>code</th>
<th>condition</th>
</tr>
</thead>
<tbody>
<tr>
<td><span class="label label-warning response-code">401</span></td>
<td><span class="response-condition">Bad credentials</span></td>
</tr>
</tbody>
</table>
<table class="table resource-response-body">
<caption>Response Body</caption>
<thead>
......@@ -446,6 +526,22 @@ Content-Type: application/json
</tbody>
</table>
<table class="table resource-response-codes">
<caption>Response Codes</caption>
<thead>
<tr>
<th>code</th>
<th>condition</th>
</tr>
</thead>
<tbody>
<tr>
<td><span class="label label-warning response-code">401</span></td>
<td><span class="response-condition">Bad credentials</span></td>
</tr>
</tbody>
</table>
<table class="table resource-response-body">
<caption>Response Body</caption>
<thead>
......@@ -522,6 +618,22 @@ Content-Type: application/json
</tbody>
</table>
<table class="table resource-response-codes">
<caption>Response Codes</caption>
<thead>
<tr>
<th>code</th>
<th>condition</th>
</tr>
</thead>
<tbody>
<tr>
<td><span class="label label-warning response-code">401</span></td>
<td><span class="response-condition">Bad credentials</span></td>
</tr>
</tbody>
</table>
<table class="table resource-response-body">
<caption>Response Body</caption>
<thead>
......
......@@ -84,6 +84,22 @@ used by the planner.</p>
<dd>ADMIN</dd>
</dl>
<table class="table resource-response-codes">
<caption>Response Codes</caption>
<thead>
<tr>
<th>code</th>
<th>condition</th>
</tr>
</thead>
<tbody>
<tr>
<td><span class="label label-warning response-code">401</span></td>
<td><span class="response-condition">Bad credentials</span></td>
</tr>
</tbody>
</table>
<table class="table resource-response-body">
<caption>Response Body</caption>
<thead>
......@@ -144,6 +160,22 @@ Content-Type: application/json
<dd>ADMIN, USER</dd>
</dl>
<table class="table resource-response-codes">
<caption>Response Codes</caption>
<thead>
<tr>
<th>code</th>
<th>condition</th>
</tr>
</thead>
<tbody>
<tr>
<td><span class="label label-warning response-code">401</span></td>
<td><span class="response-condition">Bad credentials</span></td>
</tr>
</tbody>
</table>
<table class="table resource-response-body">
<caption>Response Body</caption>
<thead>
......@@ -226,6 +258,22 @@ Content-Type: application/json
</tbody>
</table>
<table class="table resource-response-codes">
<caption>Response Codes</caption>
<thead>
<tr>
<th>code</th>
<th>condition</th>
</tr>
</thead>
<tbody>
<tr>
<td><span class="label label-warning response-code">401</span></td>
<td><span class="response-condition">Bad credentials</span></td>
</tr>
</tbody>
</table>
<table class="table resource-response-body">
<caption>Response Body</caption>
<thead>
......@@ -306,6 +354,22 @@ Content-Type: application/json
</tbody>
</table>
<table class="table resource-response-codes">
<caption>Response Codes</caption>
<thead>
<tr>
<th>code</th>
<th>condition</th>
</tr>
</thead>
<tbody>
<tr>
<td><span class="label label-warning response-code">401</span></td>
<td><span class="response-condition">Bad credentials</span></td>
</tr>
</tbody>
</table>
<table class="table resource-response-body">
<caption>Response Body</caption>
<thead>
......@@ -384,6 +448,22 @@ Content-Type: application/json
</tbody>
</table>
<table class="table resource-response-codes">
<caption>Response Codes</caption>
<thead>
<tr>
<th>code</th>
<th>condition</th>
</tr>
</thead>
<tbody>
<tr>
<td><span class="label label-warning response-code">401</span></td>
<td><span class="response-condition">Bad credentials</span></td>
</tr>
</tbody>
</table>
<table class="table resource-response-body">
<caption>Response Body</caption>
<thead>
......@@ -467,6 +547,22 @@ Content-Type: application/json
</tbody>
</table>
<table class="table resource-response-codes">
<caption>Response Codes</caption>
<thead>
<tr>
<th>code</th>
<th>condition</th>
</tr>
</thead>
<tbody>
<tr>
<td><span class="label label-warning response-code">401</span></td>
<td><span class="response-condition">Bad credentials</span></td>
</tr>
</tbody>
</table>
<table class="table resource-response-body">
<caption>Response Body</caption>
<thead>
......
......@@ -83,6 +83,22 @@
<dd>ADMIN</dd>
</dl>
<table class="table resource-response-codes">
<caption>Response Codes</caption>
<thead>
<tr>
<th>code</th>
<th>condition</th>
</tr>
</thead>
<tbody>
<tr>
<td><span class="label label-warning response-code">401</span></td>
<td><span class="response-condition">Bad credentials</span></td>
</tr>
</tbody>
</table>
<table class="table resource-response-body">
<caption>Response Body</caption>
<thead>
......@@ -150,6 +166,22 @@ Content-Type: application/json
<dd>ADMIN</dd>
</dl>
<table class="table resource-response-codes">
<caption>Response Codes</caption>
<thead>
<tr>
<th>code</th>
<th>condition</th>
</tr>
</thead>
<tbody>
<tr>
<td><span class="label label-warning response-code">401</span></td>
<td><span class="response-condition">Bad credentials</span></td>
</tr>
</tbody>
</table>
<table class="table resource-response-body">
<caption>Response Body</caption>
<thead>
......@@ -232,6 +264,22 @@ Content-Type: application/json
</tbody>
</table>
<table class="table resource-response-codes">
<caption>Response Codes</caption>
<thead>
<tr>
<th>code</th>
<th>condition</th>
</tr>
</thead>
<tbody>
<tr>
<td><span class="label label-warning response-code">401</span></td>
<td><span class="response-condition">Bad credentials</span></td>
</tr>
</tbody>
</table>
<table class="table resource-response-body">
<caption>Response Body</caption>
<thead>
......@@ -326,6 +374,22 @@ with the 'ADMIN' role can do that.</p>
</tbody>
</table>
<table class="table resource-response-codes">
<caption>Response Codes</caption>
<thead>
<tr>
<th>code</th>
<th>condition</th>
</tr>
</thead>
<tbody>
<tr>
<td><span class="label label-warning response-code">401</span></td>
<td><span class="response-condition">Bad credentials</span></td>
</tr>
</tbody>
</table>
<table class="table resource-response-body">
<caption>Response Body</caption>
<thead>
......@@ -419,6 +483,22 @@ Content-Type: application/json
</tbody>
</table>
<table class="table resource-response-codes">
<caption>Response Codes</caption>
<thead>
<tr>
<th>code</th>
<th>condition</th>
</tr>
</thead>
<tbody>
<tr>
<td><span class="label label-warning response-code">401</span></td>
<td><span class="response-condition">Bad credentials</span></td>
</tr>
</tbody>
</table>
<table class="table resource-response-body">
<caption>Response Body</caption>
<thead>
......@@ -497,6 +577,22 @@ Content-Type: application/json
</tbody>
</table>
<table class="table resource-response-codes">
<caption>Response Codes</caption>
<thead>
<tr>
<th>code</th>
<th>condition</th>
</tr>
</thead>
<tbody>
<tr>
<td><span class="label label-warning response-code">401</span></td>
<td><span class="response-condition">Bad credentials</span></td>
</tr>
</tbody>
</table>
<table class="table resource-response-body">
<caption>Response Body</caption>
<thead>
......
......@@ -59,6 +59,9 @@ import org.springframework.web.multipart.MultipartFile;
@RestController
@RequestMapping("/user/v1.0/credentials/cloud")
@Component
@StatusCodes({
@ResponseCode(code = 401, condition = "Bad credentials")
})
public class CloudCredentialsController {
@Autowired
......
......@@ -15,6 +15,8 @@
*/
package nl.uva.sne.drip.api.v1.rest;
import com.webcohesion.enunciate.metadata.rs.ResponseCode;
import com.webcohesion.enunciate.metadata.rs.StatusCodes;
import nl.uva.sne.drip.data.v1.external.PlaybookRepresentation;
import java.io.IOException;
import java.util.ArrayList;
......@@ -46,6 +48,9 @@ import org.springframework.web.bind.annotation.RequestBody;
@RestController
@RequestMapping("/user/v1.0/deployer/configuration")
@Component
@StatusCodes({
@ResponseCode(code = 401, condition = "Bad credentials")
})
public class ConfigurationController {
@Autowired
......
......@@ -15,6 +15,8 @@
*/
package nl.uva.sne.drip.api.v1.rest;
import com.webcohesion.enunciate.metadata.rs.ResponseCode;
import com.webcohesion.enunciate.metadata.rs.StatusCodes;
import java.util.ArrayList;
import java.util.List;
import javax.annotation.security.RolesAllowed;
......@@ -42,6 +44,9 @@ import org.springframework.web.bind.annotation.RequestBody;
@RestController
@RequestMapping("/user/v1.0/deployer")
@Controller
@StatusCodes({
@ResponseCode(code = 401, condition = "Bad credentials")
})
public class DeployController {
@Autowired
......
......@@ -33,6 +33,7 @@ import org.springframework.web.bind.annotation.ResponseBody;
import org.springframework.web.bind.annotation.RestController;
import nl.uva.sne.drip.api.exception.KeyException;
import nl.uva.sne.drip.api.exception.NotFoundException;
import nl.uva.sne.drip.api.exception.NullKeyException;
import nl.uva.sne.drip.api.service.KeyPairService;
import nl.uva.sne.drip.api.service.UserService;
import nl.uva.sne.drip.data.v1.external.KeyPair;
......@@ -49,6 +50,9 @@ import org.springframework.web.bind.annotation.RequestBody;
@RestController
@RequestMapping("/user/v1.0/keys")
@Component
@StatusCodes({
@ResponseCode(code = 401, condition = "Bad credentials")
})
public class KeyPairController {
@Autowired
......@@ -90,11 +94,12 @@ public class KeyPairController {
// }
// curl -H "Content-KeyType: application/json" -X POST -d '{"key":"ssh-rsa AAAAB3NzaDWBqs75i849MytgwgQcRYMcsXIki0yeYTKABH6JqoiyFBHtYlyh/EV1t6cujb9LyNP4J5EN4fPbtwKYvxecd0LojSPxl4wjQlfrHyg6iKUYB7hVzGqACMvgYZHrtHPfrdEmOGPplPVPpoaX2j+u0BZ0yYhrWMKjzyYZKa68yy5N18+Gq+1p83HfUDwIU9wWaUYdgEvDujqF6b8p3z6LDx9Ob+RanSMZSt+b8eZRcd+F2Oy/gieJEJ8kc152VIOv8UY1xB3hVEwVnSRGgrAsa+9PChfF6efXUGWiKf8KBlWgBOYsSTsOY4ks9zkXMnbcTdC+o7xspOkyIcWjv us@u\n","name":"id_rsa.pub"}' localhost:8080/drip-api/user_key/
/**
* Posts the Key and stores it. The Key is a container for public key
* contents. The public key contents are represented in the 'key' field. All
* new lines in the 'key' field have to be replaced with the '\n' character.
* Posts the Key and stores it. The Key is a container for public pair
* contents. The public pair contents are represented in the 'pair' field.
* All new lines in the 'pair' field have to be replaced with the '\n'
* character.
*
* @param key. The Key
* @param pair. The Key
* @return the ID of the Key
*/
@RequestMapping(method = RequestMethod.POST)
......@@ -103,9 +108,12 @@ public class KeyPairController {
@ResponseCode(code = 400, condition = "Key can't be empty")
})
public @ResponseBody
String postKey(@RequestBody KeyPair key) {
service.save(key);
return key.getId();
String postKey(@RequestBody KeyPair pair) {
if (pair.getPrivateKey() == null && pair.getPublicKey() == null) {
throw new NullKeyException();
}
service.save(pair);
return pair.getId();
}
/**
......
......@@ -15,6 +15,8 @@
*/
package nl.uva.sne.drip.api.v1.rest;
import com.webcohesion.enunciate.metadata.rs.ResponseCode;
import com.webcohesion.enunciate.metadata.rs.StatusCodes;
import java.io.IOException;
import java.util.ArrayList;
import java.util.List;
......@@ -45,6 +47,9 @@ import org.springframework.web.bind.annotation.RequestParam;
@RestController
@RequestMapping("/user/v1.0/planner")
@Controller
@StatusCodes({
@ResponseCode(code = 401, condition = "Bad credentials")
})
public class PlannerController {
// @Autowired
......
......@@ -15,6 +15,8 @@
*/
package nl.uva.sne.drip.api.v1.rest;
import com.webcohesion.enunciate.metadata.rs.ResponseCode;
import com.webcohesion.enunciate.metadata.rs.StatusCodes;
import nl.uva.sne.drip.data.v1.external.ProvisionRequest;
import java.io.IOException;
import java.util.ArrayList;
......@@ -47,6 +49,9 @@ import org.springframework.web.bind.annotation.RequestBody;
@RestController
@RequestMapping("/user/v1.0/provisioner")
@Component
@StatusCodes({
@ResponseCode(code = 401, condition = "Bad credentials")
})
public class ProvisionController {
@Autowired
......
......@@ -15,6 +15,8 @@
*/
package nl.uva.sne.drip.api.v1.rest;
import com.webcohesion.enunciate.metadata.rs.ResponseCode;
import com.webcohesion.enunciate.metadata.rs.StatusCodes;
import java.io.IOException;
import java.util.ArrayList;
import java.util.List;
......@@ -45,6 +47,9 @@ import org.springframework.web.bind.annotation.RequestBody;
@RestController
@RequestMapping("/user/v1.0/script")
@Component
@StatusCodes({
@ResponseCode(code = 401, condition = "Bad credentials")
})
public class ScriptController {
@Autowired
......
......@@ -15,6 +15,8 @@
*/
package nl.uva.sne.drip.api.v1.rest;
import com.webcohesion.enunciate.metadata.rs.ResponseCode;
import com.webcohesion.enunciate.metadata.rs.StatusCodes;
import nl.uva.sne.drip.data.v1.external.ToscaRepresentation;
import java.io.IOException;
import java.util.ArrayList;
......@@ -46,6 +48,9 @@ import org.springframework.web.bind.annotation.RequestBody;
@RestController
@RequestMapping("/user/v1.0/tosca")
@Component
@StatusCodes({
@ResponseCode(code = 401, condition = "Bad credentials")
})
public class ToscaController {
@Autowired
......
......@@ -15,6 +15,8 @@
*/
package nl.uva.sne.drip.api.v1.rest;
import com.webcohesion.enunciate.metadata.rs.ResponseCode;
import com.webcohesion.enunciate.metadata.rs.StatusCodes;
import java.util.ArrayList;
import java.util.List;
import java.util.logging.Level;
......@@ -45,6 +47,9 @@ import org.springframework.web.bind.annotation.RequestBody;
@RestController
@RequestMapping("/manager/v1.0/user")
@Component
@StatusCodes({
@ResponseCode(code = 401, condition = "Bad credentials")
})
public class UserController {
@Autowired
......
<?xml version="1.0" encoding="UTF-8"?>
<project-shared-configuration>
<!--
This file contains additional configuration written by modules in the NetBeans IDE.
The configuration is intended to be shared among all the users of project and
therefore it is assumed to be part of version control checkout.
Without this configuration present, some functionality in the IDE may be limited or fail altogether.
-->
<properties xmlns="http://www.netbeans.org/ns/maven-properties-data/1">
<!--
Properties that influence various parts of the IDE, especially code formatting and the like.
You can copy and paste the single properties, into the pom.xml file and the IDE will pick them up.
That way multiple projects can share the same settings (useful for formatting rules for example).
Any value defined here will override the pom.xml file value but is only applicable to the current project.
-->
<netbeans.hint.licensePath>${project.basedir}/../licenseheader.txt</netbeans.hint.licensePath>
</properties>
</project-shared-configuration>
<?xml version="1.0" encoding="UTF-8"?>
<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>
<groupId>nl.uva.sne.drip</groupId>
<artifactId>drip</artifactId>
<version>1.0-SNAPSHOT</version>
</parent>
<artifactId>drip-tests</artifactId>
<packaging>jar</packaging>
<dependencies>
<dependency>
<groupId>junit</groupId>
<artifactId>junit</artifactId>
<version>4.12</version>
<scope>test</scope>
</dependency>
<dependency>
<groupId>org.hamcrest</groupId>
<artifactId>hamcrest-core</artifactId>
<version>1.3</version>
<scope>test</scope>
</dependency>
<dependency>
<groupId>javax.ws.rs</groupId>
<artifactId>javax.ws.rs-api</artifactId>
<version>2.0.1</version>
<scope>test</scope>
<type>jar</type>
</dependency>
<dependency>
<groupId>javax</groupId>
<artifactId>javaee-web-api</artifactId>
<version>7.0</version>
<scope>test</scope>
<type>jar</type>
</dependency>
</dependencies>
<properties>
<maven.compiler.source>1.8</maven.compiler.source>
<maven.compiler.target>1.8</maven.compiler.target>
</properties>
</project>
\ No newline at end of file
/*
* Copyright 2017 S. Koulouzis.
*
* 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 nl.uva.sne.drip.test.manager;
import org.junit.After;
import org.junit.AfterClass;
import static org.junit.Assert.assertEquals;
import org.junit.Before;
import org.junit.BeforeClass;
import javax.ws.rs.client.Entity;
import javax.ws.rs.client.Invocation;
import javax.ws.rs.core.Response;
/**
*
* @author S. Koulouzis.
*/
public class CloudCredentialsController {
public CloudCredentialsController() {
}
@BeforeClass
public static void setUpClass() {
}
@AfterClass
public static void tearDownClass() {
}
@Before
public void setUp() {
}
@After
public void tearDown() {
}
// TODO add test methods here.
// The methods must be annotated with annotation @Test. For example:
//
// @Test
// public void hello() {}
private void post(String lcmId, String metadataId, String storageId, int expected) {
// String payload = "{\"local-storage-id\" : \"" + storageId + "\"}";
// Entity<String> entity = Entity.entity(payload, "application/json");
// Response resp = getWebTarget().path(TRIGGER_PATH).path(lcmId).path("metadata").path(metadataId)
// .request().header(AUTH_USER_HEADER, "admin")
// .header(BasicAuthenticationManager.BASIC_AUTHENTICATION_HEADER, basicAuthTokenAdmin)
// .post(entity);
// assertEquals(expected, resp.getStatus());
}
}
/*
* Copyright 2017 S. Koulouzis, Wang Junchao, Huan Zhou, Yang Hu
*
* 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 nl.uva.sne.drip.test.manager;
import javax.net.ssl.SSLContext;
import javax.ws.rs.client.Client;
import javax.ws.rs.client.ClientBuilder;
import org.junit.After;
import org.junit.AfterClass;
import org.junit.Before;
import org.junit.BeforeClass;
import org.junit.Test;
import static org.junit.Assert.*;
/**
*
* @author alogo
*/
public class DRIPTest {
public DRIPTest() {
}
@BeforeClass
public static void setUpClass() {
}
@AfterClass
public static void tearDownClass() {
}
@Before
public void setUp() {
}
@After
public void tearDown() {
}
// TODO add test methods here.
// The methods must be annotated with annotation @Test. For example:
//
// @Test
// public void hello() {}
private Client create(String host) {
// SSLContext sc;
// ClientBuilder builder = ClientBuilder.newBuilder();
//
// try {
// builder.hostnameVerifier(new javax.net.ssl.HostnameVerifier() {
// public boolean verify(String hostname, javax.net.ssl.SSLSession sslSession) {
// if (hostname.equals(host)) {
// return true;
// }
// return false;
// }
// });
// builder = builder.sslContext(sc);
// if (basicAutorization != null) {
// builder.register(basicAutorization);
// }
// } catch (NullPointerException npe) {
// LOGGER.warn("Null SSL context, skipping client SSL configuration", npe);
// }
// return builder.build();
return null;
}
}
......@@ -12,5 +12,6 @@
<modules>
<module>drip-api</module>
<module>drip-planner2provisioner</module>
<module>drip-tests</module>
</modules>
</project>
\ No newline at end of file
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