Commit 624a3dbd authored by Spiros Koulouzis's avatar Spiros Koulouzis

Fixed name bug

parent 0807c06d
#-------------------------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-management
docker run --name mongo-inst -p 127.0.0.1:27017:27017 -d mongo:3
docker run --name drip-inst -p 127.0.0.1:8080:8080 -d drip-manager
......
version: '3'
services:
input:
container_name: InputDistributor
ports:
- "2000:2000/udp"
environment:
- inPort=2000
- multicastAddrIP=225.2.2.0
- multicastAddrPort=3000
- waitingTime=1000
- videoWidth=176
- videoHeight=100
image: 145.100.133.241:5000/mogswitch/inputdistributor
input2:
container_name: InputDistributor2
ports:
- "2002:2002/udp"
environment:
- inPort=2002
- multicastAddrIP=225.2.2.2
- multicastAddrPort=3002
- waitingTime=1000
- videoWidth=176
- videoHeight=100
image: 145.100.133.241:5000/mogswitch/inputdistributor
proxy:
container_name: ProxyTranscoder
ports:
- "8081:80"
environment:
- multicastAddrIP=225.2.2.0
- multicastAddrPort=3000
- videoWidth=176
- videoHeight=100
image: 145.100.133.241:5000/mogswitch/proxytranscoder
privileged: true
proxy2:
container_name: ProxyTranscoder2
ports:
- "8082:80"
environment:
- multicastAddrIP=225.2.2.2
- multicastAddrPort=3002
- videoWidth=176
- videoHeight=100
image: 145.100.133.241:5000/mogswitch/proxytranscoder
privileged: true
proxyOut:
container_name: ProxyTranscoderOut
ports:
- "8085:80"
environment:
- multicastAddrIP=226.2.2.2
- multicastAddrPort=6000
- videoWidth=176
- videoHeight=100
image: 145.100.133.241:5000/mogswitch/proxytranscoder
privileged: true
switcher:
container_name: VideoSwitcher
ports:
- "8008:8008"
environment:
# PROXY 1
- multicastAddrIP=225.2.2.0
- multicastAddrPort=3000
# PROXY 2
- multicastAddrIP2=225.2.2.2
- multicastAddrPort2=3002
# SWITCHER SETTINGS
- switcherOutAddrIP=226.2.2.2
- switcherOutAddrPort=6000
- switcherREST=8008
- waitingTime=1000
- videoWidth=176
- videoHeight=100
image: 145.100.133.241:5000/mogswitch/videoswitcher
output:
container_name: OutputTranscoder
ports:
- "4000:4000"
environment:
- multicastAddrIP=226.2.2.2
- multicastAddrPort=6000
- videoWidth=176
- videoHeight=100
- OutIP=192.168.1.194
- OutPort=4000
image: 145.100.133.241:5000/mogswitch/outputtranscoder
privileged: true
tosca_definitions_version: tosca_simple_yaml_1_0
description: example file for infrastructure planner
repositories:
MOG_docker_hub:
description: MOG project’s code repository in GitHub
url: https://github.com/switch-project/mog
credential:
protocol: xauth
token_type: X-Auth-Token
# token encoded in Base64
token: 604bbe45ac7143a79e14f3158df67091
artifact_types:
tosca.artifacts.Deployment.Image.Container.Docker:
derived_from: tosca.artifacts.Deployment.Image
data_types:
Switch.datatypes.QoS.AppComponent:
derived_from: tosca.datatypes.Root
properties:
response_time:
type: string
Switch.datatypes.Application.Connection.EndPoint:
derived_from: tosca.datatypes.Root
properties:
address:
type: string
component_name:
type: string
netmask:
type: string
port_name:
type: string
Switch.datatypes.Application.Connection.Multicast:
derived_from: tosca.datatypes.Root
properties:
multicastAddrIP:
type: string
multicastAddrPort:
type: integer
Switch.datatypes.Network.EndPoint:
derived_from: tosca.datatypes.Root
properties:
address:
type: string
host_name:
type: string
netmask:
type: string
port_name:
type: string
Switch.datatypes.Network.Multicast:
derived_from: tosca.datatypes.Root
properties:
multicastAddrIP:
type: string
multicastAddrPort:
type: integer
node_types:
Switch.nodes.Application.Container.Docker:
derived_from: tosca.nodes.Container.Application
properties:
QoS:
type: Switch.datatypes.QoS.AppComponent
artifacts:
docker_image:
type: tosca.artifacts.Deployment.Image.Container.Docker
interfaces:
Standard:
create:
inputs:
command:
type: string
exported_ports:
type: list
entry_schema:
type: string
port_bindings:
type: list
entry_schema:
type: string
Switch.nodes.Application.Container.Docker.MOG.InputDistributor:
derived_from: Switch.nodes.Application.Container.Docker
artifacts:
docker_image:
type: tosca.artifacts.Deployment.Image.Container.Docker
file: "mogswitch/InputDistributor:1.0"
repository: MOG_docker_hub
properties:
inPort:
type: integer
waitingTime:
type: integer
multicastAddrIP:
type: string
multicastAddrPort:
type: integer
videoWidth:
type: integer
videoHeight:
type: integer
Switch.nodes.Application.Container.Docker.MOG.ProxyTranscoder:
derived_from: Switch.nodes.Application.Container.Docker
artifacts:
docker_image:
type: tosca.artifacts.Deployment.Image.Container.Docker
file: "mogswitch/ProxyTranscoder:1.0"
repository: MOG_docker_hub
properties:
multicastAddrIP:
type: string
multicastAddrPort:
type: integer
videoWidth:
type: integer
videoHeight:
type: integer
Switch.nodes.Application.Connection:
derived_from: tosca.nodes.Root
properties:
source:
type: Switch.datatypes.Application.Connection.EndPoint
target:
type: Switch.datatypes.Application.Connection.EndPoint
bandwidth:
type: string
latency:
type: string
jitter:
type: string
multicast:
type: Switch.datatypes.Application.Connection.Multicast
Switch.nodes.Compute:
derived_from: tosca.nodes.Compute
properties:
OStype:
type: string
nodetype:
type: string
domain:
type: string
public_address:
type: string
ethernet_port:
type: list
entry_schema:
type: tosca.datatypes.network.NetworkInfo
script:
type: string
installation:
type: string
ssh_credential:
type: tosca.datatypes.Credential
Switch.nodes.Network:
derived_from: tosca.nodes.network.Network
properties:
bandwidth:
type: string
latency:
type: string
jitter:
type: string
source:
type: Switch.datatypes.Network.EndPoint
target:
type: Switch.datatypes.Network.EndPoint
multicast:
type: Switch.datatypes.Network.Multicast
topology_template:
node_templates:
2d13d708e3a9441ab8336ce874e08dd1:
type: Switch.nodes.Application.Container.Docker.MOG.InputDistributor
artifacts:
docker_image:
file: "mogswitch/InputDistributor:1.0"
type: tosca.artifacts.Deployment.Image.Container.Docker
repository: MOG_docker_hub
properties:
QoS:
response_time: 30ms
inPort: 2000
waitingTime: 5
multicastAddrIP: 255.2.2.0
multicastAddrPort: 3000
videoWidth: 176
videoHeight: 100
interfaces:
Standard:
create:
implementation: docker_image
inputs:
command: InputDistributor
exported_ports:
- 2000
port_bindings:
- "2000:2000"
- "3000:3000"
8fcc1788d9ee462c826572c79fdb2a6a:
type: Switch.nodes.Application.Container.Docker.MOG.ProxyTranscoder
artifacts:
docker_image:
file: "mogswitch/ProxyTranscoder:1.0"
type: tosca.artifacts.Deployment.Image.Container.Docker
repository: MOG_docker_hub
properties:
QoS:
response_time: 30ms
multicastAddrIP: 255.2.2.0
multicastAddrPort: 3000
videoWidth: 176
videoHeight: 100
interfaces:
Standard:
create:
implementation: docker_image
inputs:
command: ProxyTranscoder
exported_ports:
- 80
port_bindings:
- "8080:80"
5e0add703c8a43938a39301f572e46c0:
type: Switch.nodes.Application.Connection
properties:
source:
address: 192.168.21.11
component_name: 2d13d708e3a9441ab8336ce874e08dd1
netmask: 255.255.255.0
port_name: "inputDistributor_out"
target:
address: 192.168.21.12
component_name: 8fcc1788d9ee462c826572c79fdb2a6a
netmask: 255.255.255.0
port_name: "proxyTranscoder_in"
latency: 30ms
bandwidth: 130MB/s
jitter: 500ms
multicast:
multicastAddrIP: 255.2.2.0
multicastAddrPort: 3000
......@@ -121,7 +121,7 @@
</tr>
<tr class="clickable-row" data-href="drip-api-json-client-json-sources.jar">
<td><span class="downloadfile-name">drip-api-json-client-json-sources.jar</span></td>
<td><span class="downloadfile-size">8.27K</span></td>
<td><span class="downloadfile-size">8.26K</span></td>
<td><span class="downloadfile-description">The sources for the Java JSON client library.</span></td>
</tr>
</tbody>
......@@ -144,12 +144,12 @@
<tbody data-link="row" class="rowlink">
<tr class="clickable-row" data-href="drip-api-xml-client.jar">
<td><span class="downloadfile-name">drip-api-xml-client.jar</span></td>
<td><span class="downloadfile-size">17.82K</span></td>
<td><span class="downloadfile-size">17.81K</span></td>
<td><span class="downloadfile-description">The binaries for the Java XML client library.</span></td>
</tr>
<tr class="clickable-row" data-href="drip-api-xml-client-xml-sources.jar">
<td><span class="downloadfile-name">drip-api-xml-client-xml-sources.jar</span></td>
<td><span class="downloadfile-size">16.16K</span></td>
<td><span class="downloadfile-size">16.15K</span></td>
<td><span class="downloadfile-description">The sources for the Java XML client library.</span></td>
</tr>
</tbody>
......@@ -276,7 +276,7 @@
<tbody data-link="row" class="rowlink">
<tr class="clickable-row" data-href="drip-api.rb">
<td><span class="downloadfile-name">drip-api.rb</span></td>
<td><span class="downloadfile-size">44.62K</span></td>
<td><span class="downloadfile-size">44.56K</span></td>
<td><span class="downloadfile-description">&nbsp;</span></td>
</tr>
</tbody>
......
......@@ -177,10 +177,12 @@ provisopned based on a TOSCA description.</span>
</td>
<td class="text-nowrap"><ul class="list-unstyled"><li><samp> <span class="resource-path">/user/v1.0/provisioner/ids</span>
</samp></li><li><samp> <span class="resource-path">/user/v1.0/provisioner/provision</span>
</samp></li><li><samp> <span class="resource-path">/user/v1.0/provisioner/sample</span>
</samp></li><li><samp> <span class="resource-path">/user/v1.0/provisioner/{id}</span>
</samp></li></ul></td>
<td class="text-nowrap"><ul class="list-unstyled"><li><samp> <span class="label label-default resource-method">GET</span>
</samp></li><li><samp> <span class="label label-default resource-method">POST</span>
</samp></li><li><samp> <span class="label label-default resource-method">GET</span>
</samp></li><li><samp> <span class="label label-default resource-method">DELETE</span> <span class="label label-default resource-method">GET</span>
</samp></li></ul></td>
<td> <span class="resource-description">This controller is responsible for obtaining resources from cloud providers
......@@ -207,22 +209,22 @@ based the plan generated by the planner and uploaded by the user</span>
</samp></li><li><samp> <span class="resource-path">/user/v1.0/tosca/upload</span>
</samp></li><li><samp> <span class="resource-path">/user/v1.0/tosca/{id}</span>
</samp></li></ul></td>
<td class="text-nowrap"><ul class="list-unstyled"><li><samp> <span class="label label-default resource-method">DELETE</span> <span class="label label-default resource-method">GET</span> <span class="label label-default resource-method">HEAD</span> <span class="label label-default resource-method">OPTIONS</span> <span class="label label-default resource-method">PATCH</span> <span class="label label-default resource-method">POST</span> <span class="label label-default resource-method">PUT</span> <span class="label label-default resource-method">TRACE</span>
<td class="text-nowrap"><ul class="list-unstyled"><li><samp> <span class="label label-default resource-method">GET</span>
</samp></li><li><samp> <span class="label label-default resource-method">POST</span>
</samp></li><li><samp> <span class="label label-default resource-method">DELETE</span> <span class="label label-default resource-method">GET</span>
</samp></li></ul></td>
<td> <span class="resource-description">This controller is responsible for storing TOSCA descriptions that can be used
by the planner.</span>
<td> <span class="resource-description">This controller is responsible for storing TOSCA descriptions that can be
used by the planner.</span>
</td>
</tr>
<tr class="clickable-row" data-href="resource_UserController.html">
<td> <span class="resource-name">UserController</span>
</td>
<td class="text-nowrap"><ul class="list-unstyled"><li><samp> <span class="resource-path">/manager/v1.0/user//all</span>
</samp></li><li><samp> <span class="resource-path">/manager/v1.0/user//ids</span>
</samp></li><li><samp> <span class="resource-path">/manager/v1.0/user//modify</span>
</samp></li><li><samp> <span class="resource-path">/manager/v1.0/user//register</span>
</samp></li><li><samp> <span class="resource-path">/manager/v1.0/user//{id}</span>
<td class="text-nowrap"><ul class="list-unstyled"><li><samp> <span class="resource-path">/manager/v1.0/user/all</span>
</samp></li><li><samp> <span class="resource-path">/manager/v1.0/user/ids</span>
</samp></li><li><samp> <span class="resource-path">/manager/v1.0/user/modify</span>
</samp></li><li><samp> <span class="resource-path">/manager/v1.0/user/register</span>
</samp></li><li><samp> <span class="resource-path">/manager/v1.0/user/{id}</span>
</samp></li></ul></td>
<td class="text-nowrap"><ul class="list-unstyled"><li><samp> <span class="label label-default resource-method">GET</span>
</samp></li><li><samp> <span class="label label-default resource-method">GET</span>
......
......@@ -80,7 +80,7 @@
</thead>
<tbody>
<tr>
<td> <span class="property-name">cloudcloudCredentialsID</span>
<td> <span class="property-name">cloudCredentialsID</span>
</td>
<td> <span class="datatype-reference">string
</span>
......@@ -158,7 +158,7 @@
<p class="lead">Example</p>
<pre class="prettyprint language-js example">{
&quot;cloudcloudCredentialsID&quot; : &quot;...&quot;,
&quot;cloudCredentialsID&quot; : &quot;...&quot;,
&quot;planID&quot; : &quot;...&quot;,
&quot;scriptID&quot; : &quot;...&quot;,
&quot;userKeyID&quot; : &quot;...&quot;,
......
......@@ -410,7 +410,7 @@ to specify the domain name for ec2]]>
<xs:complexContent>
<xs:extension base="keyValueHolder">
<xs:sequence>
<xs:element name="cloudcloudCredentialsID" type="xs:string" minOccurs="0">
<xs:element name="cloudCredentialsID" type="xs:string" minOccurs="0">
</xs:element>
<xs:element name="planID" type="xs:string" minOccurs="0">
</xs:element>
......
......@@ -53,6 +53,7 @@
<ul class="nav nav-sidebar">
<li><a href="#resource_ProvisionController_getIds_GET">GET /user/v1.0/provisioner/ids</a></li>
<li><a href="#resource_ProvisionController_provision_POST"><abbr title="POST /user/v1.0/provisioner/provision">POST /user/v1.0/provisioner/pr...</abbr></a></li>
<li><a href="#resource_ProvisionController_getSample_GET"><abbr title="GET /user/v1.0/provisioner/sample">GET /user/v1.0/provisioner/sam...</abbr></a></li>
<li><a href="#resource_ProvisionController_delete_DELETE"><abbr title="DELETE /user/v1.0/provisioner/{id}">DELETE /user/v1.0/provisioner/...</abbr></a></li>
<li><a href="#resource_ProvisionController_get_GET"><abbr title="GET /user/v1.0/provisioner/{id}">GET /user/v1.0/provisioner/{id...</abbr></a></li>
<li class="divider"></li>
......@@ -200,7 +201,7 @@ Accept: application/json
<code class="prettyprint language-js">
{
&quot;cloudcloudCredentialsID&quot; : &quot;...&quot;,
&quot;cloudCredentialsID&quot; : &quot;...&quot;,
&quot;planID&quot; : &quot;...&quot;,
&quot;scriptID&quot; : &quot;...&quot;,
&quot;userKeyID&quot; : &quot;...&quot;,
......@@ -240,6 +241,86 @@ Content-Type: application/json
</div>
</div>
<div id="resource_ProvisionController_getSample_GET">
<h3><span class="label label-default resource-method">GET</span> <span class="resource-path">/user/v1.0/provisioner/sample <a href="../user/v1.0/provisioner/sample" class="glyphicon glyphicon-new-window" target="_blank"></a></span></h3>
<p>Returns a sample ProvisionInfo request</p>
<dl class="dl-horizontal">
<dt>Security Roles Allowed</dt>
<dd>ADMIN, USER</dd>
</dl>
<table class="table resource-response-body">
<caption>Response Body</caption>
<thead>
<tr>
<th>media type</th>
<th>data type</th>
</tr>
</thead>
<tbody>
<tr>
<td><abbr data-toggle="tooltip" data-placement="top" title="Use the &quot;Accept: application/json&quot; HTTP header to request that this media type be provided by the server."><span class="response-type">application/json</span></abbr></td>
<td><span class="datatype-reference"><a href="json_ProvisionInfo.html">ProvisionInfo</a>
(JSON)</span></td>
</tr>
<tr>
<td><abbr data-toggle="tooltip" data-placement="top" title="Use the &quot;Accept: application/xml&quot; HTTP header to request that this media type be provided by the server."><span class="response-type">application/xml</span></abbr></td>
<td><span class="datatype-reference"><a href="xml_ns0_provisionInfo.html">provisionInfo</a>
(XML)</span></td>
</tr>
</tbody>
</table>
<h4>Example</h4>
<div class="container-fluid example panel">
<div class="row panel-body">
<div class="col-md-6">
<h5>Request</h5>
<pre>
GET /user/v1.0/provisioner/sample
Accept: application/json
</pre>
</div>
<div class="col-md-6">
<h5>Response</h5>
<pre>
HTTP/1.1 200 Looks Good
Content-Type: application/json
<code class="prettyprint language-js">
{
&quot;cloudCredentialsID&quot; : &quot;...&quot;,
&quot;planID&quot; : &quot;...&quot;,
&quot;scriptID&quot; : &quot;...&quot;,
&quot;userKeyID&quot; : &quot;...&quot;,
&quot;deployParameters&quot; : [ {
&quot;cloudCertificateName&quot; : &quot;...&quot;,
&quot;IP&quot; : &quot;...&quot;,
&quot;user&quot; : &quot;...&quot;,
&quot;role&quot; : &quot;...&quot;
}, {
&quot;cloudCertificateName&quot; : &quot;...&quot;,
&quot;IP&quot; : &quot;...&quot;,
&quot;user&quot; : &quot;...&quot;,
&quot;role&quot; : &quot;...&quot;
} ],
&quot;keyValue&quot; : {
&quot;property1&quot; : { },
&quot;property2&quot; : { }
},
&quot;id&quot; : &quot;...&quot;,
&quot;owner&quot; : &quot;...&quot;
}
</code>
</pre>
</div>
</div>
</div>
</div>
<div id="resource_ProvisionController_delete_DELETE">
<h3><span class="label label-default resource-method">DELETE</span> <span class="resource-path">/user/v1.0/provisioner/{id} <a href="../user/v1.0/provisioner/{id}" class="glyphicon glyphicon-new-window" target="_blank"></a></span></h3>
......@@ -389,7 +470,7 @@ Content-Type: application/json
<code class="prettyprint language-js">
{
&quot;cloudcloudCredentialsID&quot; : &quot;...&quot;,
&quot;cloudCredentialsID&quot; : &quot;...&quot;,
&quot;planID&quot; : &quot;...&quot;,
&quot;scriptID&quot; : &quot;...&quot;,
&quot;userKeyID&quot; : &quot;...&quot;,
......
......@@ -51,12 +51,12 @@
<div class="row">
<div class="col-sm-3 col-md-2 sidebar" id="apinav">
<ul class="nav nav-sidebar">
<li><a href="#resource_UserController_getAll_GET">GET /manager/v1.0/user//all</a></li>
<li><a href="#resource_UserController_getIds_GET">GET /manager/v1.0/user//ids</a></li>
<li><a href="#resource_UserController_modify_POST"><abbr title="POST /manager/v1.0/user//modify">POST /manager/v1.0/user//modif...</abbr></a></li>
<li><a href="#resource_UserController_register_POST"><abbr title="POST /manager/v1.0/user//register">POST /manager/v1.0/user//regis...</abbr></a></li>
<li><a href="#resource_UserController_remove_DELETE"><abbr title="DELETE /manager/v1.0/user//{id}">DELETE /manager/v1.0/user//{id...</abbr></a></li>
<li><a href="#resource_UserController_get_GET">GET /manager/v1.0/user//{id}</a></li>
<li><a href="#resource_UserController_getAll_GET">GET /manager/v1.0/user/all</a></li>
<li><a href="#resource_UserController_getIds_GET">GET /manager/v1.0/user/ids</a></li>
<li><a href="#resource_UserController_modify_POST">POST /manager/v1.0/user/modify</a></li>
<li><a href="#resource_UserController_register_POST"><abbr title="POST /manager/v1.0/user/register">POST /manager/v1.0/user/regist...</abbr></a></li>
<li><a href="#resource_UserController_remove_DELETE">DELETE /manager/v1.0/user/{id}</a></li>
<li><a href="#resource_UserController_get_GET">GET /manager/v1.0/user/{id}</a></li>
<li class="divider"></li>
<li class="text-right"><a href="#top"><small>Back to Top</small></a></li>
</ul>
......@@ -74,7 +74,7 @@
<p>This controller is responsible for handling user accounts</p>
<div id="resource_UserController_getAll_GET">
<h3><span class="label label-default resource-method">GET</span> <span class="resource-path">/manager/v1.0/user//all <a href="../manager/v1.0/user//all" class="glyphicon glyphicon-new-window" target="_blank"></a></span></h3>
<h3><span class="label label-default resource-method">GET</span> <span class="resource-path">/manager/v1.0/user/all <a href="../manager/v1.0/user/all" class="glyphicon glyphicon-new-window" target="_blank"></a></span></h3>
<p></p>
......@@ -111,7 +111,7 @@
<div class="col-md-6">
<h5>Request</h5>
<pre>
GET /manager/v1.0/user//all
GET /manager/v1.0/user/all
Accept: application/json
</pre>
......@@ -141,7 +141,7 @@ Content-Type: application/json
</div>
<div id="resource_UserController_getIds_GET">
<h3><span class="label label-default resource-method">GET</span> <span class="resource-path">/manager/v1.0/user//ids <a href="../manager/v1.0/user//ids" class="glyphicon glyphicon-new-window" target="_blank"></a></span></h3>
<h3><span class="label label-default resource-method">GET</span> <span class="resource-path">/manager/v1.0/user/ids <a href="../manager/v1.0/user/ids" class="glyphicon glyphicon-new-window" target="_blank"></a></span></h3>
<p>Gets the IDs of all the stored users</p>
......@@ -180,7 +180,7 @@ Content-Type: application/json
<div class="col-md-6">
<h5>Request</h5>
<pre>
GET /manager/v1.0/user//ids
GET /manager/v1.0/user/ids
Accept: application/json
</pre>
......@@ -201,7 +201,7 @@ Content-Type: application/json
</div>
<div id="resource_UserController_modify_POST">
<h3><span class="label label-default resource-method">POST</span> <span class="resource-path">/manager/v1.0/user//modify <a href="../manager/v1.0/user//modify" class="glyphicon glyphicon-new-window" target="_blank"></a></span></h3>
<h3><span class="label label-default resource-method">POST</span> <span class="resource-path">/manager/v1.0/user/modify <a href="../manager/v1.0/user/modify" class="glyphicon glyphicon-new-window" target="_blank"></a></span></h3>
<p></p>
......@@ -260,7 +260,7 @@ Content-Type: application/json
<div class="col-md-6">
<h5>Request</h5>
<pre>
POST /manager/v1.0/user//modify
POST /manager/v1.0/user/modify
Content-Type: application/json
Accept: application/json
......@@ -294,7 +294,7 @@ Content-Type: application/json
</div>
<div id="resource_UserController_register_POST">
<h3><span class="label label-default resource-method">POST</span> <span class="resource-path">/manager/v1.0/user//register <a href="../manager/v1.0/user//register" class="glyphicon glyphicon-new-window" target="_blank"></a></span></h3>
<h3><span class="label label-default resource-method">POST</span> <span class="resource-path">/manager/v1.0/user/register <a href="../manager/v1.0/user/register" class="glyphicon glyphicon-new-window" target="_blank"></a></span></h3>
<p>Register new user. A normal user cannot create accounts, only the user
with the 'ADMIN' role can do that.</p>
......@@ -358,7 +358,7 @@ the password is 'null' there will be a 'BadRequestException'</span></td>
<div class="col-md-6">
<h5>Request</h5>
<pre>
POST /manager/v1.0/user//register
POST /manager/v1.0/user/register
Content-Type: application/json
Accept: application/json
......@@ -392,7 +392,7 @@ Content-Type: application/json
</div>
<div id="resource_UserController_remove_DELETE">
<h3><span class="label label-default resource-method">DELETE</span> <span class="resource-path">/manager/v1.0/user//{id} <a href="../manager/v1.0/user//{id}" class="glyphicon glyphicon-new-window" target="_blank"></a></span></h3>
<h3><span class="label label-default resource-method">DELETE</span> <span class="resource-path">/manager/v1.0/user/{id} <a href="../manager/v1.0/user/{id}" class="glyphicon glyphicon-new-window" target="_blank"></a></span></h3>
<p>Deletes a user</p>
......@@ -449,7 +449,7 @@ Content-Type: application/json
<div class="col-md-6">
<h5>Request</h5>
<pre>
DELETE /manager/v1.0/user//{id}
DELETE /manager/v1.0/user/{id}
Accept: application/json
</pre>
......@@ -470,7 +470,7 @@ Content-Type: application/json
</div>
<div id="resource_UserController_get_GET">
<h3><span class="label label-default resource-method">GET</span> <span class="resource-path">/manager/v1.0/user//{id} <a href="../manager/v1.0/user//{id}" class="glyphicon glyphicon-new-window" target="_blank"></a></span></h3>
<h3><span class="label label-default resource-method">GET</span> <span class="resource-path">/manager/v1.0/user/{id} <a href="../manager/v1.0/user/{id}" class="glyphicon glyphicon-new-window" target="_blank"></a></span></h3>
<p>Gets the user.</p>
......@@ -527,7 +527,7 @@ Content-Type: application/json
<div class="col-md-6">
<h5>Request</h5>
<pre>
GET /manager/v1.0/user//{id}
GET /manager/v1.0/user/{id}
Accept: application/json
</pre>
......
......@@ -169,10 +169,12 @@ provisopned based on a TOSCA description.</span>
</td>
<td class="text-nowrap"><ul class="list-unstyled"><li><samp> <span class="resource-path">/user/v1.0/provisioner/ids</span>
</samp></li><li><samp> <span class="resource-path">/user/v1.0/provisioner/provision</span>
</samp></li><li><samp> <span class="resource-path">/user/v1.0/provisioner/sample</span>
</samp></li><li><samp> <span class="resource-path">/user/v1.0/provisioner/{id}</span>
</samp></li></ul></td>
<td class="text-nowrap"><ul class="list-unstyled"><li><samp> <span class="label label-default resource-method">GET</span>
</samp></li><li><samp> <span class="label label-default resource-method">POST</span>
</samp></li><li><samp> <span class="label label-default resource-method">GET</span>
</samp></li><li><samp> <span class="label label-default resource-method">DELETE</span> <span class="label label-default resource-method">GET</span>
</samp></li></ul></td>
<td> <span class="resource-description">This controller is responsible for obtaining resources from cloud providers
......@@ -199,22 +201,22 @@ based the plan generated by the planner and uploaded by the user</span>
</samp></li><li><samp> <span class="resource-path">/user/v1.0/tosca/upload</span>
</samp></li><li><samp> <span class="resource-path">/user/v1.0/tosca/{id}</span>
</samp></li></ul></td>
<td class="text-nowrap"><ul class="list-unstyled"><li><samp> <span class="label label-default resource-method">DELETE</span> <span class="label label-default resource-method">GET</span> <span class="label label-default resource-method">HEAD</span> <span class="label label-default resource-method">OPTIONS</span> <span class="label label-default resource-method">PATCH</span> <span class="label label-default resource-method">POST</span> <span class="label label-default resource-method">PUT</span> <span class="label label-default resource-method">TRACE</span>
<td class="text-nowrap"><ul class="list-unstyled"><li><samp> <span class="label label-default resource-method">GET</span>
</samp></li><li><samp> <span class="label label-default resource-method">POST</span>
</samp></li><li><samp> <span class="label label-default resource-method">DELETE</span> <span class="label label-default resource-method">GET</span>
</samp></li></ul></td>
<td> <span class="resource-description">This controller is responsible for storing TOSCA descriptions that can be used
by the planner.</span>
<td> <span class="resource-description">This controller is responsible for storing TOSCA descriptions that can be
used by the planner.</span>
</td>
</tr>
<tr class="clickable-row" data-href="resource_UserController.html">
<td> <span class="resource-name">UserController</span>
</td>
<td class="text-nowrap"><ul class="list-unstyled"><li><samp> <span class="resource-path">/manager/v1.0/user//all</span>
</samp></li><li><samp> <span class="resource-path">/manager/v1.0/user//ids</span>
</samp></li><li><samp> <span class="resource-path">/manager/v1.0/user//modify</span>
</samp></li><li><samp> <span class="resource-path">/manager/v1.0/user//register</span>
</samp></li><li><samp> <span class="resource-path">/manager/v1.0/user//{id}</span>
<td class="text-nowrap"><ul class="list-unstyled"><li><samp> <span class="resource-path">/manager/v1.0/user/all</span>
</samp></li><li><samp> <span class="resource-path">/manager/v1.0/user/ids</span>
</samp></li><li><samp> <span class="resource-path">/manager/v1.0/user/modify</span>
</samp></li><li><samp> <span class="resource-path">/manager/v1.0/user/register</span>
</samp></li><li><samp> <span class="resource-path">/manager/v1.0/user/{id}</span>
</samp></li></ul></td>
<td class="text-nowrap"><ul class="list-unstyled"><li><samp> <span class="label label-default resource-method">GET</span>
</samp></li><li><samp> <span class="label label-default resource-method">GET</span>
......
......@@ -87,7 +87,7 @@
</thead>
<tbody>
<tr>
<td> <span class="property-name">cloudcloudCredentialsID</span>
<td> <span class="property-name">cloudCredentialsID</span>
</td>
<td> <span class="datatype-reference">string
</span>
......@@ -216,7 +216,7 @@
<p class="lead">Example</p>
<pre class="prettyprint language-xml example">&lt;p-----&gt;
&lt;cloudcloudCredentialsID&gt;...&lt;/cloudcloudCredentialsID&gt;
&lt;cloudCredentialsID&gt;...&lt;/cloudCredentialsID&gt;
&lt;planID&gt;...&lt;/planID&gt;
&lt;scriptID&gt;...&lt;/scriptID&gt;
&lt;userKeyID&gt;...&lt;/userKeyID&gt;
......
......@@ -120,7 +120,7 @@ public class DeployClusterService {
if (pro == null) {
throw new NotFoundException();
}
String cloudConfID = pro.getCloudcloudCredentialsID();
String cloudConfID = pro.getCloudCredentialsID();
CloudCredentials cCred = cloudCredentialsService.findOne(cloudConfID);
List<LoginKey> loginKeys = cCred.getLoginKeys();
List<DeployParameter> deployParams = pro.getDeployParameters();
......
......@@ -171,7 +171,7 @@ public class ProvisionService {
private Message buildProvisionerMessage(ProvisionInfo pReq) throws JSONException, IOException {
Message invokationMessage = new Message();
List<MessageParameter> parameters = new ArrayList();
CloudCredentials cred = cloudCredentialsService.findOne(pReq.getCloudcloudCredentialsID());
CloudCredentials cred = cloudCredentialsService.findOne(pReq.getCloudCredentialsID());
if (cred == null) {
throw new CloudCredentialsNotFoundException();
}
......
......@@ -86,7 +86,7 @@ public class ProvisionController0 {
ProvisionInfo provInfo = new ProvisionInfo();
CloudCredentials cloudCred = cloudCredentialsService.findAll().get(0);
String cloudCredID = cloudCred.getId();
provInfo.setCloudcloudCredentialsID(cloudCredID);
provInfo.setCloudCredentialsID(cloudCredID);
List<nl.uva.sne.drip.commons.v0.types.Attribute> plans = upload.file;
nl.uva.sne.drip.commons.v1.types.Plan topLevelPlan = null;
Set<String> loweLevelPlansIDs = new HashSet<>();
......
......@@ -23,6 +23,7 @@ import java.util.concurrent.TimeoutException;
import java.util.logging.Level;
import java.util.logging.Logger;
import javax.annotation.security.RolesAllowed;
import nl.uva.sne.drip.api.exception.BadRequestException;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Component;
import org.springframework.web.bind.annotation.RequestMapping;
......@@ -47,13 +48,9 @@ import org.springframework.web.bind.annotation.RequestBody;
@Component
public class ProvisionController {
@Autowired
private ProvisionService provisionService;
/**
* Gets the ProvisionInfo
*
......@@ -113,7 +110,12 @@ public class ProvisionController {
@RolesAllowed({UserService.USER, UserService.ADMIN})
public @ResponseBody
String provision(@RequestBody ProvisionInfo req) {
if (req.getCloudCredentialsID() == null) {
throw new BadRequestException();
}
if (req.getPlanID() == null) {
throw new BadRequestException();
}
try {
req = provisionService.provisionResources(req);
......@@ -125,4 +127,21 @@ public class ProvisionController {
return null;
}
/**
* Returns a sample ProvisionInfo request
*
* @return
*/
@RequestMapping(value = "/sample", method = RequestMethod.GET)
@RolesAllowed({UserService.USER, UserService.ADMIN})
public @ResponseBody
ProvisionInfo getSample() {
ProvisionInfo info = new ProvisionInfo();
info.setCloudCredentialsID("58c6a6556dd4bd2f0d71e6fb");
info.setPlanID("58c6b17b65d4d03b29e7db0e");
info.setScriptID("58c6a6556dd4bd2f0d71e6fb");
info.setUserKeyID("58c6b12b65d4d03b29e7db0c");
return info;
}
}
......@@ -37,8 +37,9 @@ import nl.uva.sne.drip.api.service.ToscaService;
import nl.uva.sne.drip.api.service.UserService;
/**
* This controller is responsible for storing TOSCA descriptions that can be used
* by the planner.
* This controller is responsible for storing TOSCA descriptions that can be
* used by the planner.
*
* @author S. Koulouzis
*/
@RestController
......@@ -51,6 +52,7 @@ public class ToscaController {
/**
* Uploads and stores a TOSCA description file
*
* @param file. The TOSCA description file
* @return the ID of the TOSCA description
*/
......@@ -69,9 +71,9 @@ public class ToscaController {
return null;
}
/**
* Gets the TOSCA description.
*
* @param id the ID TOSCA description.
* @param format. the format to display the TOSCA description.
* @return the TOSCA description.
......@@ -90,6 +92,7 @@ public class ToscaController {
/**
* Deletes the TOSCA description.
*
* @param id. The ID of TOSCA description to delete.
* @return The ID of the deleted TOSCA description.
*/
......@@ -101,12 +104,12 @@ public class ToscaController {
return "Deleted : " + id;
}
/**
* Gets the IDs of all the stored TOSCA descriptionss.
*
* @return a list of all the IDs
*/
@RequestMapping(value = "/ids")
@RequestMapping(value = "/ids", method = RequestMethod.GET)
@RolesAllowed({UserService.USER, UserService.ADMIN})
public @ResponseBody
List<String> getIds() {
......
......@@ -44,7 +44,7 @@ import org.springframework.web.bind.annotation.RequestBody;
* @author S. Koulouzis
*/
@RestController
@RequestMapping("/manager/v1.0/user/")
@RequestMapping("/manager/v1.0/user")
@Component
public class UserController {
......
......@@ -38,15 +38,15 @@ public class ProvisionInfo extends KeyValueHolder {
/**
* @return the cloudCredentialsID
*/
public String getCloudcloudCredentialsID() {
public String getCloudCredentialsID() {
return cloudCredentialsID;
}
/**
* @param cloudConfID the cloudCredentialsID to set
* @param cloudCredentialsID the cloudCredentialsID to set
*/
public void setCloudcloudCredentialsID(String cloudConfID) {
this.cloudCredentialsID = cloudConfID;
public void setCloudCredentialsID(String cloudCredentialsID) {
this.cloudCredentialsID = cloudCredentialsID;
}
/**
......@@ -91,8 +91,6 @@ public class ProvisionInfo extends KeyValueHolder {
this.userKeyID = userKeyID;
}
public void setDeployParameters(List<DeployParameter> deployParameters) {
this.deployParameters = deployParameters;
}
......
No preview for this file type
......@@ -38,7 +38,7 @@ def handleDelivery(message):
deadline = 0
for j in json1:
#print json[j]
print json1[j]['type']
if not json1[j]['type'] == "Switch.nodes.Application.Connection":
deadline = int(re.search(r'\d+', json1[j]['properties']['QoS']['response_time']).group())
......
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