Commit fd2b529b authored by Spiros Koulouzis's avatar Spiros Koulouzis

Added delete all

parent 7cac1807
......@@ -206,6 +206,12 @@ VMs from the machine the keys correspond to.</span>
<td> <span class="datatype-name">loginKey0</span>
</td>
<td> <span class="datatype-description"></span>
</td>
</tr>
<tr class="clickable-row" data-href="xml_ns0_plan.html">
<td> <span class="datatype-name">plan</span>
</td>
<td> <span class="datatype-description">This class represents a plan to be provided to the planner.</span>
</td>
</tr>
<tr class="clickable-row" data-href="xml_ns0_register.html">
......@@ -270,12 +276,6 @@ VMs from the machine the keys correspond to.</span>
<td> <span class="datatype-name">ownedObject</span>
</td>
<td> <span class="datatype-description"></span>
</td>
</tr>
<tr class="clickable-row" data-href="xml_ns0_plan.html">
<td> <span class="datatype-name">plan</span>
</td>
<td> <span class="datatype-description">This class represents a plan generated by the planner.</span>
</td>
</tr>
<tr class="clickable-row" data-href="xml_ns0_provisionInfo.html">
......
......@@ -72,7 +72,7 @@
<h1 class="page-header">Files and Libraries</h1>
<h3 id="artifact_gwt_json_overlay">GWT JSON Overlay</h3>
<p class="lead">Created March 13, 2017</p>
<p class="lead">Created March 14, 2017</p>
<p> <p>
The <a href="http://code.google.com/webtoolkit/">Google Web Toolkit</a> JSON Overlay library provides the JSON Overlays that
can be used to access the Web service API for this application.
......@@ -97,7 +97,7 @@
</tbody>
</table>
<h3 id="artifact_java_json_client_library">Java JSON Client Library</h3>
<p class="lead">Created March 13, 2017</p>
<p class="lead">Created March 14, 2017</p>
<p><p>
The Java client-side library is used to provide the set of Java objects that can be serialized
to/from JSON using <a href="http://jackson.codehaus.org/">Jackson</a>. This is useful for accessing the
......@@ -127,7 +127,7 @@
</tbody>
</table>
<h3 id="artifact_java_xml_client_library">Java XML Client Library</h3>
<p class="lead">Created March 13, 2017</p>
<p class="lead">Created March 14, 2017</p>
<p><p>
The Java client-side library is used to access the Web service API for this application using Java.
</p>
......@@ -144,18 +144,18 @@
<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.79K</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.07K</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>
</table>
<h3 id="artifact_js_client_library">JavaScript Client Library</h3>
<p class="lead">Created March 13, 2017</p>
<p class="lead">Created March 14, 2017</p>
<p><p>
The JavaScript client-side library defines classes that can be (de)serialized to/from JSON.
This is useful for accessing the resources that are published by this application, but only
......@@ -190,7 +190,7 @@
</tbody>
</table>
<h3 id="artifact_php_json_client_library">PHP JSON Client Library</h3>
<p class="lead">Created March 13, 2017</p>
<p class="lead">Created March 14, 2017</p>
<p><p>
The PHP JSON client-side library defines the PHP classes that can be (de)serialized to/from JSON.
This is useful for accessing the resources that are published by this application, but only
......@@ -219,7 +219,7 @@
</tbody>
</table>
<h3 id="artifact_php_xml_client_library">PHP XML Client Library</h3>
<p class="lead">Created March 13, 2017</p>
<p class="lead">Created March 14, 2017</p>
<p><p>
The PHP client-side library defines the PHP classes that can be (de)serialized to/from XML.
This is useful for accessing the resources that are published by this application, but only
......@@ -245,13 +245,13 @@
<tbody data-link="row" class="rowlink">
<tr class="clickable-row" data-href="drip-api-php.zip">
<td><span class="downloadfile-name">drip-api-php.zip</span></td>
<td><span class="downloadfile-size">6.92K</span></td>
<td><span class="downloadfile-size">6.95K</span></td>
<td><span class="downloadfile-description">&nbsp;</span></td>
</tr>
</tbody>
</table>
<h3 id="artifact_ruby_json_client_library">Ruby JSON Client Library</h3>
<p class="lead">Created March 13, 2017</p>
<p class="lead">Created March 14, 2017</p>
<p><p>
The Ruby JSON client-side library defines the Ruby classes that can be (de)serialized to/from JSON.
This is useful for accessing the REST endpoints that are published by this application, but only
......
......@@ -147,18 +147,20 @@ resources.</span>
<tr class="clickable-row" data-href="resource_PlannerController.html">
<td> <span class="resource-name">PlannerController</span>
</td>
<td class="text-nowrap"><ul class="list-unstyled"><li><samp> <span class="resource-path">/user/v1.0/planner/ids</span>
<td class="text-nowrap"><ul class="list-unstyled"><li><samp> <span class="resource-path">/user/v1.0/planner/all</span>
</samp></li><li><samp> <span class="resource-path">/user/v1.0/planner/ids</span>
</samp></li><li><samp> <span class="resource-path">/user/v1.0/planner/{id}</span>
</samp></li><li><samp> <span class="resource-path">/user/v1.0/planner/plan/{tosca_id}</span>
</samp></li><li><samp> <span class="resource-path">/user/v1.0/planner/tosca/{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>
<td class="text-nowrap"><ul class="list-unstyled"><li><samp> <span class="label label-default resource-method">DELETE</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><li><samp> <span class="label label-default resource-method">GET</span>
</samp></li><li><samp> <span class="label label-default resource-method">GET</span>
</samp></li></ul></td>
<td> <span class="resource-description">This controller is responsible for planing the type of resources to be provisopned
based on a TOSCA description.</span>
<td> <span class="resource-description">This controller is responsible for planing the type of resources to be
provisopned based on a TOSCA description.</span>
</td>
</tr>
<tr class="clickable-row" data-href="resource_PlannerController0.html">
......@@ -203,11 +205,13 @@ based the plan generated by the planner and uploaded by the user</span>
<tr class="clickable-row" data-href="resource_ToscaController.html">
<td> <span class="resource-name">ToscaController</span>
</td>
<td class="text-nowrap"><ul class="list-unstyled"><li><samp> <span class="resource-path">/user/v1.0/tosca/ids</span>
<td class="text-nowrap"><ul class="list-unstyled"><li><samp> <span class="resource-path">/user/v1.0/tosca/all</span>
</samp></li><li><samp> <span class="resource-path">/user/v1.0/tosca/ids</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">GET</span>
<td class="text-nowrap"><ul class="list-unstyled"><li><samp> <span class="label label-default resource-method">DELETE</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">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>
......@@ -444,6 +448,12 @@ VMs from the machine the keys correspond to.</span>
<td> <span class="datatype-name">loginKey0</span>
</td>
<td> <span class="datatype-description"></span>
</td>
</tr>
<tr class="clickable-row" data-href="xml_ns0_plan.html">
<td> <span class="datatype-name">plan</span>
</td>
<td> <span class="datatype-description">This class represents a plan to be provided to the planner.</span>
</td>
</tr>
<tr class="clickable-row" data-href="xml_ns0_register.html">
......@@ -508,12 +518,6 @@ VMs from the machine the keys correspond to.</span>
<td> <span class="datatype-name">ownedObject</span>
</td>
<td> <span class="datatype-description"></span>
</td>
</tr>
<tr class="clickable-row" data-href="xml_ns0_plan.html">
<td> <span class="datatype-name">plan</span>
</td>
<td> <span class="datatype-description">This class represents a plan generated by the planner.</span>
</td>
</tr>
<tr class="clickable-row" data-href="xml_ns0_provisionInfo.html">
......
......@@ -167,7 +167,7 @@ provisoner to request for resources.</p>
}, {
&quot;name&quot; : &quot;...&quot;,
&quot;id&quot; : &quot;...&quot;,
&quot;type&quot; : &quot;PRIVATE&quot;,
&quot;type&quot; : &quot;PUBLIC&quot;,
&quot;attributes&quot; : {
&quot;property1&quot; : &quot;...&quot;,
&quot;property2&quot; : &quot;...&quot;
......
......@@ -163,6 +163,37 @@ sub-topology name appeared in the high-level description file. (For example, her
</xs:simpleContent>
</xs:complexType>
<xs:complexType name="plan">
<xs:annotation>
<xs:documentation>
<![CDATA[This class represents a plan to be provided to the planner.]]>
</xs:documentation>
</xs:annotation>
<xs:sequence>
<xs:element name="user" type="xs:string" minOccurs="0">
<xs:annotation>
<xs:documentation>
<![CDATA[Not used. It's only there for backwords compatibility]]>
</xs:documentation>
</xs:annotation>
</xs:element>
<xs:element name="pwd" type="xs:string" minOccurs="0">
<xs:annotation>
<xs:documentation>
<![CDATA[Not used. It's only there for backwords compatibility]]>
</xs:documentation>
</xs:annotation>
</xs:element>
<xs:element name="file" type="xs:string" minOccurs="0">
<xs:annotation>
<xs:documentation>
<![CDATA[The contents of the TOSCA description]]>
</xs:documentation>
</xs:annotation>
</xs:element>
</xs:sequence>
</xs:complexType>
<xs:complexType name="register">
<xs:sequence>
<xs:element name="user" type="xs:string" minOccurs="0">
......@@ -375,26 +406,6 @@ to specify the domain name for ec2]]>
</xs:sequence>
</xs:complexType>
<xs:complexType name="plan">
<xs:annotation>
<xs:documentation>
<![CDATA[This class represents a plan generated by the planner.]]>
</xs:documentation>
</xs:annotation>
<xs:complexContent>
<xs:extension base="keyValueHolder">
<xs:sequence>
<xs:element name="name" type="xs:string" minOccurs="0">
</xs:element>
<xs:element name="toscaID" type="xs:string" minOccurs="0">
</xs:element>
<xs:element name="level" type="xs:int" minOccurs="0">
</xs:element>
</xs:sequence>
</xs:extension>
</xs:complexContent>
</xs:complexType>
<xs:complexType name="provisionInfo">
<xs:complexContent>
<xs:extension base="keyValueHolder">
......
......@@ -174,7 +174,7 @@ Accept: application/json
}, {
&quot;name&quot; : &quot;...&quot;,
&quot;id&quot; : &quot;...&quot;,
&quot;type&quot; : &quot;PUBLIC&quot;,
&quot;type&quot; : &quot;PRIVATE&quot;,
&quot;attributes&quot; : {
&quot;property1&quot; : &quot;...&quot;,
&quot;property2&quot; : &quot;...&quot;
......
......@@ -51,6 +51,7 @@
<div class="row">
<div class="col-sm-3 col-md-2 sidebar" id="apinav">
<ul class="nav nav-sidebar">
<li><a href="#resource_PlannerController_deleteAll_DELETE">DELETE /user/v1.0/planner/all</a></li>
<li><a href="#resource_PlannerController_getIds_GET">GET /user/v1.0/planner/ids</a></li>
<li><a href="#resource_PlannerController_delete_DELETE">DELETE /user/v1.0/planner/{id}</a></li>
<li><a href="#resource_PlannerController_get_GET">GET /user/v1.0/planner/{id}</a></li>
......@@ -70,8 +71,66 @@
<h1 class="page-header">PlannerController <small>Resource</small></h1>
<p>This controller is responsible for planing the type of resources to be provisopned
based on a TOSCA description.</p>
<p>This controller is responsible for planing the type of resources to be
provisopned based on a TOSCA description.</p>
<div id="resource_PlannerController_deleteAll_DELETE">
<h3><span class="label label-default resource-method">DELETE</span> <span class="resource-path">/user/v1.0/planner/all <a href="../user/v1.0/planner/all" class="glyphicon glyphicon-new-window" target="_blank"></a></span></h3>
<p></p>
<dl class="dl-horizontal">
<dt>Security Roles Allowed</dt>
<dd>ADMIN</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">string
(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">string
(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>
DELETE /user/v1.0/planner/all
Accept: application/json
</pre>
</div>
<div class="col-md-6">
<h5>Response</h5>
<pre>
HTTP/1.1 204 Looks Good
Content-Type: application/json
<code class="prettyprint language-txt">
...
</code>
</pre>
</div>
</div>
</div>
</div>
<div id="resource_PlannerController_getIds_GET">
<h3><span class="label label-default resource-method">GET</span> <span class="resource-path">/user/v1.0/planner/ids <a href="../user/v1.0/planner/ids" class="glyphicon glyphicon-new-window" target="_blank"></a></span></h3>
......
......@@ -90,7 +90,7 @@ provisopned based on a TOSCA description.</p>
<tbody>
<tr>
<td><abbr data-toggle="tooltip" data-placement="top" title="Use the &quot;Content-Type: text/xml&quot; HTTP header to specify this media type to the server."><span class="request-type">text/xml</span></abbr></td>
<td><span class="datatype-reference">anyType
<td><span class="datatype-reference"><a href="xml_ns0_plan.html">plan</a>
(XML)</span></td>
</tr>
</tbody>
......@@ -123,8 +123,14 @@ POST /user/v0.0/switch/plan/planning
Content-Type: text/xml
Accept: text/xml
<code class="prettyprint language-txt">
...
<code class="prettyprint language-xml">
&lt;plan&gt;
&lt;user&gt;user&lt;/user&gt;
&lt;pwd&gt;123&lt;/pwd&gt;
&lt;file&gt;tosca_definitions_version: tosca_simple_yaml_1_0\n\n\ndescription: example file for infrastructure planner\n\n\nrepositories:\n MOG_docker_hub: \n description: MOG project’s code repository in GitHub\n url: https://github.com/switch-project/mog\n credential:\n protocol: xauth\n token_type: X-Auth-Token\n # token encoded in Base64\n token: 604bbe45ac7143a79e14f3158df67091\n\n\nartifact_types:\n tosca.artifacts.Deployment.Image.Container.Docker:\n derived_from: tosca.artifacts.Deployment.Image\n\n\ndata_types:\n Switch.datatypes.QoS.AppComponent:\n derived_from: tosca.datatypes.Root\n properties:\n response_time:\n type: string\n\n Switch.datatypes.Application.Connection.EndPoint:\n derived_from: tosca.datatypes.Root\n properties:\n address:\n type: string\n component_name:\n type: string\n netmask:\n type: string\n port_name:\n type: string\n\n Switch.datatypes.Application.Connection.Multicast:\n derived_from: tosca.datatypes.Root\n properties:\n multicastAddrIP:\n type: string\n multicastAddrPort:\n type: integer\n\n Switch.datatypes.Network.EndPoint:\n derived_from: tosca.datatypes.Root\n properties:\n address:\n type: string\n host_name:\n type: string\n netmask:\n type: string\n port_name:\n type: string\n\n Switch.datatypes.Network.Multicast:\n derived_from: tosca.datatypes.Root\n properties:\n multicastAddrIP:\n type: string\n multicastAddrPort:\n type: integer\n\n\nnode_types:\n\n Switch.nodes.Application.Container.Docker:\n derived_from: tosca.nodes.Container.Application\n properties:\n QoS:\n type: Switch.datatypes.QoS.AppComponent\n artifacts:\n docker_image:\n type: tosca.artifacts.Deployment.Image.Container.Docker\n interfaces:\n Standard:\n create:\n inputs:\n command:\n type: string\n exported_ports:\n type: list\n entry_schema:\n type: string\n port_bindings:\n type: list\n entry_schema:\n type: string\n\n Switch.nodes.Application.Container.Docker.MOG.InputDistributor:\n derived_from: Switch.nodes.Application.Container.Docker\n artifacts:\n docker_image:\n type: tosca.artifacts.Deployment.Image.Container.Docker\n file: &quot;mogswitch/InputDistributor:1.0&quot;\n repository: MOG_docker_hub\n properties:\n inPort: \n type: integer\n waitingTime:\n type: integer\n multicastAddrIP:\n type: string\n multicastAddrPort:\n type: integer\n videoWidth:\n type: integer\n videoHeight:\n type: integer\n\n Switch.nodes.Application.Container.Docker.MOG.ProxyTranscoder:\n derived_from: Switch.nodes.Application.Container.Docker \n artifacts:\n docker_image:\n type: tosca.artifacts.Deployment.Image.Container.Docker\n file: &quot;mogswitch/ProxyTranscoder:1.0&quot;\n repository: MOG_docker_hub\n properties:\n multicastAddrIP: \n type: string\n multicastAddrPort:\n type: integer\n videoWidth:\n type: integer\n videoHeight:\n type: integer\n\n Switch.nodes.Application.Connection:\n derived_from: tosca.nodes.Root \n properties:\n source:\n type: Switch.datatypes.Application.Connection.EndPoint\n target:\n type: Switch.datatypes.Application.Connection.EndPoint\n bandwidth:\n type: string\n latency: \n type: string\n jitter: \n type: string\n multicast:\n type: Switch.datatypes.Application.Connection.Multicast\n\n Switch.nodes.Compute:\n derived_from: tosca.nodes.Compute\n properties:\n OStype:\n type: string\n nodetype:\n type: string\n domain:\n type: string\n public_address:\n type: string\n
ethernet_port:\n type: list\n entry_schema:\n type: tosca.datatypes.network.NetworkInfo\n script:\n type: string\n installation:\n type: string\n ssh_credential:\n type: tosca.datatypes.Credential\n\n Switch.nodes.Network:\n derived_from: tosca.nodes.network.Network\n properties:\n bandwidth:\n type: string\n latency:\n type: string\n jitter:\n type: string\n source:\n type: Switch.datatypes.Network.EndPoint\n target:\n type: Switch.datatypes.Network.EndPoint\n multicast:\n type: Switch.datatypes.Network.Multicast\n\n\ntopology_template:\n \n node_templates:\n 2d13d708e3a9441ab8336ce874e08dd1:\n type: Switch.nodes.Application.Container.Docker.MOG.InputDistributor\n artifacts:\n docker_image:\n file: &quot;mogswitch/InputDistributor:1.0&quot;\n type: tosca.artifacts.Deployment.Image.Container.Docker\n repository: MOG_docker_hub\n properties:\n QoS:\n response_time: 30ms\n inPort: 2000\n waitingTime: 5\n multicastAddrIP: 255.2.2.0\n multicastAddrPort: 3000\n videoWidth: 176\n videoHeight: 100\n interfaces:\n Standard:\n create:\n implementation: docker_image\n inputs:\n command: InputDistributor\n exported_ports:\n - 2000\n port_bindings:\n - &quot;2000:2000&quot;\n - &quot;3000:3000&quot;\n\n 8fcc1788d9ee462c826572c79fdb2a6a:\n type: Switch.nodes.Application.Container.Docker.MOG.ProxyTranscoder\n artifacts:\n docker_image:\n file: &quot;mogswitch/ProxyTranscoder:1.0&quot;\n type: tosca.artifacts.Deployment.Image.Container.Docker\n repository: MOG_docker_hub\n properties:\n QoS:\n response_time: 30ms\n multicastAddrIP: 255.2.2.0\n multicastAddrPort: 3000\n videoWidth: 176\n videoHeight: 100\n interfaces:\n Standard:\n create:\n implementation: docker_image\n inputs:\n command: ProxyTranscoder\n exported_ports:\n - 80\n port_bindings:\n - &quot;8080:80&quot;\n\n 5e0add703c8a43938a39301f572e46c0:\n type: Switch.nodes.Application.Connection\n properties:\n source:\n address: 192.168.21.11\n component_name: 2d13d708e3a9441ab8336ce874e08dd1\n netmask: 255.255.255.0\n port_name: &quot;inputDistributor_out&quot;\n target:\n address: 192.168.21.12\n component_name: 8fcc1788d9ee462c826572c79fdb2a6a\n netmask: 255.255.255.0\n port_name: &quot;proxyTranscoder_in&quot;\n latency: 30ms\n bandwidth: 130MB/s\n jitter: 500ms\n multicast:\n multicastAddrIP: 255.2.2.0\n multicastAddrPort: 3000\n&lt;/file&gt;
&lt;/plan&gt;
</code>
</pre>
</div>
......
......@@ -51,6 +51,7 @@
<div class="row">
<div class="col-sm-3 col-md-2 sidebar" id="apinav">
<ul class="nav nav-sidebar">
<li><a href="#resource_ToscaController_deleteAll_DELETE">DELETE /user/v1.0/tosca/all</a></li>
<li><a href="#resource_ToscaController_getIds_GET">GET /user/v1.0/tosca/ids</a></li>
<li><a href="#resource_ToscaController_toscaUpload_POST">POST /user/v1.0/tosca/upload</a></li>
<li><a href="#resource_ToscaController_delete_DELETE">DELETE /user/v1.0/tosca/{id}</a></li>
......@@ -72,6 +73,66 @@
<p>This controller is responsible for storing TOSCA descriptions that can be
used by the planner.</p>
<div id="resource_ToscaController_deleteAll_DELETE">
<h3><span class="label label-default resource-method">DELETE</span> <span class="resource-path">/user/v1.0/tosca/all <a href="../user/v1.0/tosca/all" class="glyphicon glyphicon-new-window" target="_blank"></a></span></h3>
<p>Gets the IDs of all the stored TOSCA descriptionss.</p>
<dl class="dl-horizontal">
<dt>Security Roles Allowed</dt>
<dd>ADMIN</dd>
</dl>
<table class="table resource-response-body">
<caption>Response Body</caption>
<thead>
<tr>
<th>media type</th>
<th>data type</th>
<th>description</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">string
(JSON)</span></td>
<td rowspan="2" class="multi-row-description"><span class="response-description">a list of all the IDs</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">string
(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>
DELETE /user/v1.0/tosca/all
Accept: application/json
</pre>
</div>
<div class="col-md-6">
<h5>Response</h5>
<pre>
HTTP/1.1 204 Looks Good
Content-Type: application/json
<code class="prettyprint language-txt">
...
</code>
</pre>
</div>
</div>
</div>
</div>
<div id="resource_ToscaController_getIds_GET">
<h3><span class="label label-default resource-method">GET</span> <span class="resource-path">/user/v1.0/tosca/ids <a href="../user/v1.0/tosca/ids" class="glyphicon glyphicon-new-window" target="_blank"></a></span></h3>
......
......@@ -139,18 +139,20 @@ resources.</span>
<tr class="clickable-row" data-href="resource_PlannerController.html">
<td> <span class="resource-name">PlannerController</span>
</td>
<td class="text-nowrap"><ul class="list-unstyled"><li><samp> <span class="resource-path">/user/v1.0/planner/ids</span>
<td class="text-nowrap"><ul class="list-unstyled"><li><samp> <span class="resource-path">/user/v1.0/planner/all</span>
</samp></li><li><samp> <span class="resource-path">/user/v1.0/planner/ids</span>
</samp></li><li><samp> <span class="resource-path">/user/v1.0/planner/{id}</span>
</samp></li><li><samp> <span class="resource-path">/user/v1.0/planner/plan/{tosca_id}</span>
</samp></li><li><samp> <span class="resource-path">/user/v1.0/planner/tosca/{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>
<td class="text-nowrap"><ul class="list-unstyled"><li><samp> <span class="label label-default resource-method">DELETE</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><li><samp> <span class="label label-default resource-method">GET</span>
</samp></li><li><samp> <span class="label label-default resource-method">GET</span>
</samp></li></ul></td>
<td> <span class="resource-description">This controller is responsible for planing the type of resources to be provisopned
based on a TOSCA description.</span>
<td> <span class="resource-description">This controller is responsible for planing the type of resources to be
provisopned based on a TOSCA description.</span>
</td>
</tr>
<tr class="clickable-row" data-href="resource_PlannerController0.html">
......@@ -195,11 +197,13 @@ based the plan generated by the planner and uploaded by the user</span>
<tr class="clickable-row" data-href="resource_ToscaController.html">
<td> <span class="resource-name">ToscaController</span>
</td>
<td class="text-nowrap"><ul class="list-unstyled"><li><samp> <span class="resource-path">/user/v1.0/tosca/ids</span>
<td class="text-nowrap"><ul class="list-unstyled"><li><samp> <span class="resource-path">/user/v1.0/tosca/all</span>
</samp></li><li><samp> <span class="resource-path">/user/v1.0/tosca/ids</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">GET</span>
<td class="text-nowrap"><ul class="list-unstyled"><li><samp> <span class="label label-default resource-method">DELETE</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">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>
......
......@@ -112,6 +112,12 @@
<td> <span class="datatype-name">loginKey0</span>
</td>
<td> <span class="datatype-description"></span>
</td>
</tr>
<tr class="clickable-row" data-href="xml_ns0_plan.html">
<td> <span class="datatype-name">plan</span>
</td>
<td> <span class="datatype-description">This class represents a plan to be provided to the planner.</span>
</td>
</tr>
<tr class="clickable-row" data-href="xml_ns0_register.html">
......@@ -176,12 +182,6 @@ VMs from the machine the keys correspond to.</span>
<td> <span class="datatype-name">ownedObject</span>
</td>
<td> <span class="datatype-description"></span>
</td>
</tr>
<tr class="clickable-row" data-href="xml_ns0_plan.html">
<td> <span class="datatype-name">plan</span>
</td>
<td> <span class="datatype-description">This class represents a plan generated by the planner.</span>
</td>
</tr>
<tr class="clickable-row" data-href="xml_ns0_provisionInfo.html">
......
......@@ -72,7 +72,7 @@
<dt>Schema</dt>
<dd><a href="ns0.xsd">ns0.xsd</a></dd>
<dt>Subtypes</dt>
<dd><a href="xml_ns0_plan.html">plan</a>, <a href="xml_ns0_provisionInfo.html">provisionInfo</a>, <a href="xml_ns0_toscaRepresentation.html">toscaRepresentation</a></dd>
<dd><a href="xml_ns0_provisionInfo.html">provisionInfo</a>, <a href="xml_ns0_toscaRepresentation.html">toscaRepresentation</a></dd>
</dl>
<table class="table datatype-properties">
......
......@@ -72,7 +72,7 @@
<dt>Schema</dt>
<dd><a href="ns0.xsd">ns0.xsd</a></dd>
<dt>Subtypes</dt>
<dd><a href="xml_ns0_cloudCredentials.html">cloudCredentials</a>, <a href="xml_ns0_clusterCredentials.html">clusterCredentials</a>, <a href="xml_ns0_keyValueHolder.html">keyValueHolder</a>, <a href="xml_ns0_loginKey.html">loginKey</a>, <a href="xml_ns0_plan.html">plan</a>, <a href="xml_ns0_provisionInfo.html">provisionInfo</a>, <a href="xml_ns0_script.html">script</a>, <a href="xml_ns0_toscaRepresentation.html">toscaRepresentation</a></dd>
<dd><a href="xml_ns0_cloudCredentials.html">cloudCredentials</a>, <a href="xml_ns0_clusterCredentials.html">clusterCredentials</a>, <a href="xml_ns0_keyValueHolder.html">keyValueHolder</a>, <a href="xml_ns0_loginKey.html">loginKey</a>, <a href="xml_ns0_provisionInfo.html">provisionInfo</a>, <a href="xml_ns0_script.html">script</a>, <a href="xml_ns0_toscaRepresentation.html">toscaRepresentation</a></dd>
</dl>
<table class="table datatype-properties">
......
This diff is collapsed.
......@@ -200,4 +200,9 @@ public class PlannerService {
return plan;
}
@PostAuthorize("(hasRole('ROLE_ADMIN'))")
public void deleteAll() {
planDao.deleteAll();
}
}
......@@ -117,4 +117,9 @@ public class ToscaService {
t.setOwner(owner);
return dao.save(t);
}
@PostAuthorize("(hasRole('ROLE_ADMIN'))")
public void deleteAll() {
dao.deleteAll();
}
}
......@@ -37,9 +37,9 @@ import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.RequestParam;
/**
* This controller is responsible for planing the type of resources to be provisopned
* based on a TOSCA description.
*
* This controller is responsible for planing the type of resources to be
* provisopned based on a TOSCA description.
*
* @author S. Koulouzis
*/
@RestController
......@@ -52,10 +52,10 @@ public class PlannerController {
@Autowired
private PlannerService plannerService;
/**
* Plans resources (number, size of VMs etc).
* @param toscaId. The id of the TOSCA description
* Plans resources (number, size of VMs etc).
*
* @param toscaId. The id of the TOSCA description
* @return the id of the created plan
*/
@RequestMapping(value = "/plan/{tosca_id}", method = RequestMethod.GET)
......@@ -77,10 +77,11 @@ public class PlannerController {
}
/**
* Gets a plan
* Gets a plan
*
* @param id. The id iof the plan
* @param format. The format (yml,json)
* @return the plan
* @return the plan
*/
@RequestMapping(value = "/{id}", method = RequestMethod.GET, params = {"format"})
@RolesAllowed({UserService.USER, UserService.ADMIN})
......@@ -95,9 +96,10 @@ public class PlannerController {
}
/**
* Gets the ID of the TOSCA description that was used to generate the plan.
* Gets the ID of the TOSCA description that was used to generate the plan.
* The plan is represented by its ID
* @param id. The plan id
*
* @param id. The plan id
* @return the TOSCA description ID
*/
@RequestMapping(value = "/tosca/{id}", method = RequestMethod.GET)
......@@ -108,7 +110,8 @@ public class PlannerController {
}
/**
* Deletes the plan.
* Deletes the plan.
*
* @param id . The ID of the plan
* @return The ID of the deleted plan
*/
......@@ -120,10 +123,18 @@ public class PlannerController {
return "Deleted : " + id;
}
@RequestMapping(value = "/all", method = RequestMethod.DELETE)
@RolesAllowed({UserService.ADMIN})
public @ResponseBody
String deleteAll() {
plannerService.deleteAll();
return "Done";
}
/**
* Gets the IDs of all the stored plans
* @return a list of IDs
* Gets the IDs of all the stored plans
*
* @return a list of IDs
*/
@RequestMapping(value = "/ids", method = RequestMethod.GET)
@RolesAllowed({UserService.USER, UserService.ADMIN})
......
......@@ -120,5 +120,18 @@ public class ToscaController {
}
return ids;
}
/**
* Gets the IDs of all the stored TOSCA descriptionss.
*
* @return a list of all the IDs
*/
@RequestMapping(value = "/all", method = RequestMethod.DELETE)
@RolesAllowed({UserService.ADMIN})
public @ResponseBody
String deleteAll() {
toscaService.deleteAll();
return "Done";
}
}
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