Commit ade73225 authored by Spiros Koulouzis's avatar Spiros Koulouzis

parse planner's output

parent fd197056
......@@ -161,12 +161,6 @@ abstract types such as TOSCA.</span>
</td>
<td> <span class="datatype-description">This is the base class for users to own resources. Many classes extend this
class</span>
</td>
</tr>
<tr class="clickable-row" data-href="json_PlanRequest.html">
<td> <span class="datatype-name">PlanRequest</span>
</td>
<td> <span class="datatype-description">This class represents a plan request sent to the planner.</span>
</td>
</tr>
<tr class="clickable-row" data-href="json_ProvisionRequest.html">
......@@ -344,12 +338,6 @@ abstract types such as TOSCA.</span>
</td>
<td> <span class="datatype-description">This is the base class for users to own resources. Many classes extend this
class</span>
</td>
</tr>
<tr class="clickable-row" data-href="xml_ns0_planRequest.html">
<td> <span class="datatype-name">planRequest</span>
</td>
<td> <span class="datatype-description">This class represents a plan request sent to the planner.</span>
</td>
</tr>
<tr class="clickable-row" data-href="xml_ns0_provisionRequest.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 October 11, 2017</p>
<p class="lead">Created October 13, 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.
......@@ -91,13 +91,13 @@
<tbody data-link="row" class="rowlink">
<tr class="clickable-row" data-href="drip-api-gwt-json-overlay.jar">
<td><span class="downloadfile-name">drip-api-gwt-json-overlay.jar</span></td>
<td><span class="downloadfile-size">13.58K</span></td>
<td><span class="downloadfile-size">12.80K</span></td>
<td><span class="downloadfile-description">The sources for the GWT JSON overlay.</span></td>
</tr>
</tbody>
</table>
<h3 id="artifact_java_json_client_library">Java JSON Client Library</h3>
<p class="lead">Created October 11, 2017</p>
<p class="lead">Created October 13, 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
......@@ -116,18 +116,18 @@
<tbody data-link="row" class="rowlink">
<tr class="clickable-row" data-href="drip-api-json-client.jar">
<td><span class="downloadfile-name">drip-api-json-client.jar</span></td>
<td><span class="downloadfile-size">16.92K</span></td>
<td><span class="downloadfile-size">15.91K</span></td>
<td><span class="downloadfile-description">The binaries for the Java JSON client library.</span></td>
</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">14.03K</span></td>
<td><span class="downloadfile-size">13.19K</span></td>
<td><span class="downloadfile-description">The sources for the Java JSON client library.</span></td>
</tr>
</tbody>
</table>
<h3 id="artifact_java_xml_client_library">Java XML Client Library</h3>
<p class="lead">Created October 11, 2017</p>
<p class="lead">Created October 13, 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">24.75K</span></td>
<td><span class="downloadfile-size">23.76K</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">22.49K</span></td>
<td><span class="downloadfile-size">21.58K</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 October 11, 2017</p>
<p class="lead">Created October 13, 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
......@@ -184,13 +184,13 @@
<tbody data-link="row" class="rowlink">
<tr class="clickable-row" data-href="drip-api-js.zip">
<td><span class="downloadfile-name">drip-api-js.zip</span></td>
<td><span class="downloadfile-size">5.33K</span></td>
<td><span class="downloadfile-size">5.05K</span></td>
<td><span class="downloadfile-description">&nbsp;</span></td>
</tr>
</tbody>
</table>
<h3 id="artifact_php_json_client_library">PHP JSON Client Library</h3>
<p class="lead">Created October 11, 2017</p>
<p class="lead">Created October 13, 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
......@@ -213,13 +213,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">5.96K</span></td>
<td><span class="downloadfile-size">5.53K</span></td>
<td><span class="downloadfile-description">&nbsp;</span></td>
</tr>
</tbody>
</table>
<h3 id="artifact_php_xml_client_library">PHP XML Client Library</h3>
<p class="lead">Created October 11, 2017</p>
<p class="lead">Created October 13, 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">9.07K</span></td>
<td><span class="downloadfile-size">8.63K</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 October 11, 2017</p>
<p class="lead">Created October 13, 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
......@@ -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">76.58K</span></td>
<td><span class="downloadfile-size">70.62K</span></td>
<td><span class="downloadfile-description">&nbsp;</span></td>
</tr>
</tbody>
......
This diff is collapsed.
......@@ -233,7 +233,6 @@ machine the keys correspond to.</span>
</td>
<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/plan/</span>
</samp></li><li><samp> <span class="resource-path">/user/v1.0/planner/vereify_plan</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>
......@@ -244,7 +243,6 @@ machine the keys correspond to.</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">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><li><samp> <span class="label label-default resource-method">GET</span>
</samp></li><li><samp> <span class="label label-default resource-method">POST</span>
......@@ -495,12 +493,6 @@ abstract types such as TOSCA.</span>
</td>
<td> <span class="datatype-description">This is the base class for users to own resources. Many classes extend this
class</span>
</td>
</tr>
<tr class="clickable-row" data-href="json_PlanRequest.html">
<td> <span class="datatype-name">PlanRequest</span>
</td>
<td> <span class="datatype-description">This class represents a plan request sent to the planner.</span>
</td>
</tr>
<tr class="clickable-row" data-href="json_ProvisionRequest.html">
......@@ -678,12 +670,6 @@ abstract types such as TOSCA.</span>
</td>
<td> <span class="datatype-description">This is the base class for users to own resources. Many classes extend this
class</span>
</td>
</tr>
<tr class="clickable-row" data-href="xml_ns0_planRequest.html">
<td> <span class="datatype-name">planRequest</span>
</td>
<td> <span class="datatype-description">This class represents a plan request sent to the planner.</span>
</td>
</tr>
<tr class="clickable-row" data-href="xml_ns0_provisionRequest.html">
......
......@@ -81,9 +81,9 @@ class</p>
</thead>
<tbody>
<tr>
<td> <span class="property-name">start</span>
<td> <span class="property-name">host</span>
</td>
<td> <span class="datatype-reference">number
<td> <span class="datatype-reference">string
</span>
</td>
<td> <span class="property-description"></span>
......@@ -99,25 +99,25 @@ class</p>
</td>
</tr>
<tr>
<td> <span class="property-name">delta</span>
<td> <span class="property-name">cloudDeploymentDomain</span>
</td>
<td> <span class="datatype-reference">number
<td> <span class="datatype-reference">string
</span>
</td>
<td> <span class="property-description"></span>
</td>
</tr>
<tr>
<td> <span class="property-name">host</span>
<td> <span class="property-name">start</span>
</td>
<td> <span class="datatype-reference">string
<td> <span class="datatype-reference">number
</span>
</td>
<td> <span class="property-description"></span>
</td>
</tr>
<tr>
<td> <span class="property-name">end</span>
<td> <span class="property-name">delta</span>
</td>
<td> <span class="datatype-reference">number
</span>
......@@ -126,9 +126,9 @@ class</p>
</td>
</tr>
<tr>
<td> <span class="property-name">cloudDeploymentDomain</span>
<td> <span class="property-name">end</span>
</td>
<td> <span class="datatype-reference">string
<td> <span class="datatype-reference">number
</span>
</td>
<td> <span class="property-description"></span>
......@@ -165,12 +165,12 @@ object is saved.</span></td>
<p class="lead">Example</p>
<pre class="prettyprint language-js example">{
&quot;start&quot; : 12345,
&quot;host&quot; : &quot;147.228.242.58&quot;,
&quot;vmType&quot; : &quot;...&quot;,
&quot;cloudDeploymentDomain&quot; : &quot;us-east-1&quot;,
&quot;start&quot; : 12345,
&quot;delta&quot; : 12345,
&quot;host&quot; : &quot;147.228.242.58&quot;,
&quot;end&quot; : 12345,
&quot;cloudDeploymentDomain&quot; : &quot;us-east-1&quot;,
&quot;owner&quot; : &quot;user1&quot;,
&quot;id&quot; : &quot;58e3946e0fb4f562d84ba1ad&quot;,
&quot;timestamp&quot; : 1499793079011
......
......@@ -521,58 +521,6 @@ the DAO saves the object based on the principal how made the call]]>
</xs:sequence>
</xs:complexType>
<xs:complexType name="planRequest">
<xs:annotation>
<xs:documentation>
<![CDATA[This class represents a plan request sent to the planner.]]>
</xs:documentation>
</xs:annotation>
<xs:sequence>
<xs:element name="toscaID" type="xs:string" minOccurs="0">
<xs:annotation>
<xs:documentation>
<![CDATA[The ID of the tosca file the generated this plan]]>
</xs:documentation>
</xs:annotation>
</xs:element>
<xs:element name="managerType" type="xs:string" minOccurs="0">
<xs:annotation>
<xs:documentation>
<![CDATA[The type of cluster manager]]>
</xs:documentation>
</xs:annotation>
</xs:element>
<xs:element name="vmUserName" type="xs:string" minOccurs="0">
<xs:annotation>
<xs:documentation>
<![CDATA[The default username to be set to all VMs]]>
</xs:documentation>
</xs:annotation>
</xs:element>
<xs:element name="cloudProvider" type="xs:string" minOccurs="0">
<xs:annotation>
<xs:documentation>
<![CDATA[The cloud provider]]>
</xs:documentation>
</xs:annotation>
</xs:element>
<xs:element name="osType" type="xs:string" minOccurs="0">
<xs:annotation>
<xs:documentation>
<![CDATA[The type of OS for the VMs]]>
</xs:documentation>
</xs:annotation>
</xs:element>
<xs:element name="domain" type="xs:string" minOccurs="0">
<xs:annotation>
<xs:documentation>
<![CDATA[The domain to request the VMs]]>
</xs:documentation>
</xs:annotation>
</xs:element>
</xs:sequence>
</xs:complexType>
<xs:complexType name="provisionRequest">
<xs:annotation>
<xs:documentation>
......@@ -823,18 +771,18 @@ class]]>
<xs:complexContent>
<xs:extension base="ownedObject">
<xs:sequence>
<xs:element name="vmType" type="xs:string" minOccurs="0">
</xs:element>
<xs:element name="host" type="xs:string" minOccurs="0">
</xs:element>
<xs:element name="end" type="xs:dateTime" minOccurs="0">
</xs:element>
<xs:element name="start" type="xs:dateTime" minOccurs="0">
</xs:element>
<xs:element name="cloudDeploymentDomain" type="xs:string" minOccurs="0">
</xs:element>
<xs:element name="host" type="xs:string" minOccurs="0">
</xs:element>
<xs:element name="delta" type="xs:dateTime" minOccurs="0">
</xs:element>
<xs:element name="end" type="xs:dateTime" minOccurs="0">
</xs:element>
<xs:element name="vmType" type="xs:string" minOccurs="0">
</xs:element>
</xs:sequence>
</xs:extension>
</xs:complexContent>
......
......@@ -144,12 +144,12 @@ Content-Type: application/json
<code class="prettyprint language-js">
[ {
&quot;start&quot; : 12345,
&quot;host&quot; : &quot;147.228.242.58&quot;,
&quot;vmType&quot; : &quot;...&quot;,
&quot;cloudDeploymentDomain&quot; : &quot;us-east-1&quot;,
&quot;start&quot; : 12345,
&quot;delta&quot; : 12345,
&quot;host&quot; : &quot;147.228.242.58&quot;,
&quot;end&quot; : 12345,
&quot;cloudDeploymentDomain&quot; : &quot;us-east-1&quot;,
&quot;owner&quot; : &quot;user1&quot;,
&quot;id&quot; : &quot;58e3946e0fb4f562d84ba1ad&quot;,
&quot;timestamp&quot; : 1499793079011
......@@ -514,12 +514,12 @@ Content-Type: application/json
<code class="prettyprint language-js">
{
&quot;start&quot; : 12345,
&quot;host&quot; : &quot;147.228.242.58&quot;,
&quot;vmType&quot; : &quot;...&quot;,
&quot;cloudDeploymentDomain&quot; : &quot;us-east-1&quot;,
&quot;start&quot; : 12345,
&quot;delta&quot; : 12345,
&quot;host&quot; : &quot;147.228.242.58&quot;,
&quot;end&quot; : 12345,
&quot;cloudDeploymentDomain&quot; : &quot;us-east-1&quot;,
&quot;owner&quot; : &quot;user1&quot;,
&quot;id&quot; : &quot;58e3946e0fb4f562d84ba1ad&quot;,
&quot;timestamp&quot; : 1499793079011
......
......@@ -53,7 +53,6 @@
<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_plan_POST">POST /user/v1.0/planner/plan/</a></li>
<li><a href="#resource_PlannerController_verifyPlan_POST"><abbr title="POST /user/v1.0/planner/vereify_plan">POST /user/v1.0/planner/vereif...</abbr></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>
......@@ -228,113 +227,6 @@ Content-Type: application/json
</div>
</div>
<div id="resource_PlannerController_plan_POST">
<h3><span class="label label-default resource-method">POST</span> <span class="resource-path">/user/v1.0/planner/plan/ <a href="../user/v1.0/planner/plan/" class="glyphicon glyphicon-new-window" target="_blank"></a></span></h3>
<p></p>
<dl class="dl-horizontal">
<dt>Security Roles Allowed</dt>
<dd>ADMIN, USER</dd>
</dl>
<table class="table resource-request-body">
<caption>Request 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;Content-Type: application/json&quot; HTTP header to specify this media type to the server."><span class="request-type">application/json</span></abbr></td>
<td><span class="datatype-reference"><a href="json_PlanRequest.html">PlanRequest</a>
(JSON)</span></td>
</tr>
<tr>
<td><abbr data-toggle="tooltip" data-placement="top" title="Use the &quot;Content-Type: application/xml&quot; HTTP header to specify this media type to the server."><span class="request-type">application/xml</span></abbr></td>
<td><span class="datatype-reference"><a href="xml_ns0_planRequest.html">planRequest</a>
(XML)</span></td>
</tr>
</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>
<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>
POST /user/v1.0/planner/plan/
Content-Type: application/json
Accept: application/json
<code class="prettyprint language-js">
{
&quot;toscaID&quot; : &quot;592d5884e452f1b9b666a657&quot;,
&quot;managerType&quot; : &quot;swarm&quot;,
&quot;vmUserName&quot; : &quot;vm_user&quot;,
&quot;cloudProvider&quot; : &quot;egi&quot;,
&quot;osType&quot; : &quot;Ubuntu16.04&quot;,
&quot;domain&quot; : &quot;us-east-1&quot;
}
</code>
</pre>
</div>
<div class="col-md-6">
<h5>Response</h5>
<pre>
HTTP/1.1 201 Looks Good
Content-Type: application/json
<code class="prettyprint language-txt">
...
</code>
</pre>
</div>
</div>
</div>
</div>
<div id="resource_PlannerController_verifyPlan_POST">
<h3><span class="label label-default resource-method">POST</span> <span class="resource-path">/user/v1.0/planner/vereify_plan <a href="../user/v1.0/planner/vereify_plan" class="glyphicon glyphicon-new-window" target="_blank"></a></span></h3>
......
......@@ -225,7 +225,6 @@ machine the keys correspond to.</span>
</td>
<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/plan/</span>
</samp></li><li><samp> <span class="resource-path">/user/v1.0/planner/vereify_plan</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>
......@@ -236,7 +235,6 @@ machine the keys correspond to.</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">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><li><samp> <span class="label label-default resource-method">GET</span>
</samp></li><li><samp> <span class="label label-default resource-method">POST</span>
......
......@@ -156,12 +156,6 @@ abstract types such as TOSCA.</span>
</td>
<td> <span class="datatype-description">This is the base class for users to own resources. Many classes extend this
class</span>
</td>
</tr>
<tr class="clickable-row" data-href="json_PlanRequest.html">
<td> <span class="datatype-name">PlanRequest</span>
</td>
<td> <span class="datatype-description">This class represents a plan request sent to the planner.</span>
</td>
</tr>
<tr class="clickable-row" data-href="json_ProvisionRequest.html">
......
......@@ -201,12 +201,6 @@ abstract types such as TOSCA.</span>
</td>
<td> <span class="datatype-description">This is the base class for users to own resources. Many classes extend this
class</span>
</td>
</tr>
<tr class="clickable-row" data-href="xml_ns0_planRequest.html">
<td> <span class="datatype-name">planRequest</span>
</td>
<td> <span class="datatype-description">This class represents a plan request sent to the planner.</span>
</td>
</tr>
<tr class="clickable-row" data-href="xml_ns0_provisionRequest.html">
......
......@@ -231,12 +231,12 @@ the DAO saves the object based on the principal how made the call</span></td>
<p class="lead">Example</p>
<pre class="prettyprint language-xml example">&lt;b-----&gt;
&lt;vmType&gt;...&lt;/vmType&gt;
&lt;host&gt;147.228.242.58&lt;/host&gt;
&lt;end&gt;...&lt;/end&gt;
&lt;start&gt;...&lt;/start&gt;
&lt;cloudDeploymentDomain&gt;us-east-1&lt;/cloudDeploymentDomain&gt;
&lt;host&gt;147.228.242.58&lt;/host&gt;
&lt;delta&gt;...&lt;/delta&gt;
&lt;end&gt;...&lt;/end&gt;
&lt;vmType&gt;...&lt;/vmType&gt;
&lt;owner&gt;user1&lt;/owner&gt;
&lt;timestamp&gt;1499793079011&lt;/timestamp&gt;
&lt;/b-----&gt;
......
......@@ -161,12 +161,6 @@ abstract types such as TOSCA.</span>
</td>
<td> <span class="datatype-description">This is the base class for users to own resources. Many classes extend this
class</span>
</td>
</tr>
<tr class="clickable-row" data-href="json_PlanRequest.html">
<td> <span class="datatype-name">PlanRequest</span>
</td>
<td> <span class="datatype-description">This class represents a plan request sent to the planner.</span>
</td>
</tr>
<tr class="clickable-row" data-href="json_ProvisionRequest.html">
......@@ -344,12 +338,6 @@ abstract types such as TOSCA.</span>
</td>
<td> <span class="datatype-description">This is the base class for users to own resources. Many classes extend this
class</span>
</td>
</tr>
<tr class="clickable-row" data-href="xml_ns0_planRequest.html">
<td> <span class="datatype-name">planRequest</span>
</td>
<td> <span class="datatype-description">This class represents a plan request sent to the planner.</span>
</td>
</tr>
<tr class="clickable-row" data-href="xml_ns0_provisionRequest.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 October 11, 2017</p>
<p class="lead">Created October 13, 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.
......@@ -91,13 +91,13 @@
<tbody data-link="row" class="rowlink">
<tr class="clickable-row" data-href="drip-api-gwt-json-overlay.jar">
<td><span class="downloadfile-name">drip-api-gwt-json-overlay.jar</span></td>
<td><span class="downloadfile-size">13.58K</span></td>
<td><span class="downloadfile-size">12.80K</span></td>
<td><span class="downloadfile-description">The sources for the GWT JSON overlay.</span></td>
</tr>
</tbody>
</table>
<h3 id="artifact_java_json_client_library">Java JSON Client Library</h3>
<p class="lead">Created October 11, 2017</p>
<p class="lead">Created October 13, 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
......@@ -116,18 +116,18 @@
<tbody data-link="row" class="rowlink">
<tr class="clickable-row" data-href="drip-api-json-client.jar">
<td><span class="downloadfile-name">drip-api-json-client.jar</span></td>
<td><span class="downloadfile-size">16.92K</span></td>
<td><span class="downloadfile-size">15.91K</span></td>
<td><span class="downloadfile-description">The binaries for the Java JSON client library.</span></td>
</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">14.03K</span></td>
<td><span class="downloadfile-size">13.19K</span></td>
<td><span class="downloadfile-description">The sources for the Java JSON client library.</span></td>
</tr>
</tbody>
</table>
<h3 id="artifact_java_xml_client_library">Java XML Client Library</h3>
<p class="lead">Created October 11, 2017</p>
<p class="lead">Created October 13, 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">24.75K</span></td>
<td><span class="downloadfile-size">23.76K</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">22.49K</span></td>
<td><span class="downloadfile-size">21.58K</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 October 11, 2017</p>
<p class="lead">Created October 13, 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
......@@ -184,13 +184,13 @@
<tbody data-link="row" class="rowlink">
<tr class="clickable-row" data-href="drip-api-js.zip">
<td><span class="downloadfile-name">drip-api-js.zip</span></td>
<td><span class="downloadfile-size">5.33K</span></td>
<td><span class="downloadfile-size">5.05K</span></td>
<td><span class="downloadfile-description">&nbsp;</span></td>
</tr>
</tbody>
</table>
<h3 id="artifact_php_json_client_library">PHP JSON Client Library</h3>
<p class="lead">Created October 11, 2017</p>
<p class="lead">Created October 13, 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
......@@ -213,13 +213,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">5.96K</span></td>
<td><span class="downloadfile-size">5.53K</span></td>
<td><span class="downloadfile-description">&nbsp;</span></td>
</tr>
</tbody>
</table>
<h3 id="artifact_php_xml_client_library">PHP XML Client Library</h3>
<p class="lead">Created October 11, 2017</p>
<p class="lead">Created October 13, 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">9.07K</span></td>
<td><span class="downloadfile-size">8.63K</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 October 11, 2017</p>
<p class="lead">Created October 13, 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
......@@ -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">76.58K</span></td>
<td><span class="downloadfile-size">70.62K</span></td>
<td><span class="downloadfile-description">&nbsp;</span></td>
</tr>
</tbody>
......
This diff is collapsed.
......@@ -233,7 +233,6 @@ machine the keys correspond to.</span>
</td>
<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/plan/</span>
</samp></li><li><samp> <span class="resource-path">/user/v1.0/planner/vereify_plan</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>
......@@ -244,7 +243,6 @@ machine the keys correspond to.</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">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><li><samp> <span class="label label-default resource-method">GET</span>
</samp></li><li><samp> <span class="label label-default resource-method">POST</span>
......@@ -495,12 +493,6 @@ abstract types such as TOSCA.</span>
</td>
<td> <span class="datatype-description">This is the base class for users to own resources. Many classes extend this
class</span>
</td>
</tr>
<tr class="clickable-row" data-href="json_PlanRequest.html">
<td> <span class="datatype-name">PlanRequest</span>
</td>
<td> <span class="datatype-description">This class represents a plan request sent to the planner.</span>
</td>
</tr>
<tr class="clickable-row" data-href="json_ProvisionRequest.html">
......@@ -678,12 +670,6 @@ abstract types such as TOSCA.</span>
</td>
<td> <span class="datatype-description">This is the base class for users to own resources. Many classes extend this
class</span>
</td>
</tr>
<tr class="clickable-row" data-href="xml_ns0_planRequest.html">
<td> <span class="datatype-name">planRequest</span>
</td>
<td> <span class="datatype-description">This class represents a plan request sent to the planner.</span>
</td>
</tr>
<tr class="clickable-row" data-href="xml_ns0_provisionRequest.html">
......
......@@ -99,7 +99,7 @@ class</p>
</td>
</tr>
<tr>
<td> <span class="property-name">cloudDeploymentDomain</span>
<td> <span class="property-name">host</span>
</td>
<td> <span class="datatype-reference">string
</span>
......@@ -108,7 +108,7 @@ class</p>
</td>
</tr>
<tr>
<td> <span class="property-name">end</span>
<td> <span class="property-name">start</span>
</td>
<td> <span class="datatype-reference">number
</span>
......@@ -117,18 +117,18 @@ class</p>
</td>
</tr>
<tr>
<td> <span class="property-name">host</span>
<td> <span class="property-name">end</span>
</td>
<td> <span class="datatype-reference">string
<td> <span class="datatype-reference">number
</span>
</td>
<td> <span class="property-description"></span>
</td>
</tr>
<tr>
<td> <span class="property-name">start</span>
<td> <span class="property-name">cloudDeploymentDomain</span>
</td>
<td> <span class="datatype-reference">number
<td> <span class="datatype-reference">string
</span>
</td>
<td> <span class="property-description"></span>
......@@ -167,10 +167,10 @@ object is saved.</span></td>
<pre class="prettyprint language-js example">{
&quot;vmType&quot; : &quot;...&quot;,
&quot;delta&quot; : 12345,
&quot;cloudDeploymentDomain&quot; : &quot;us-east-1&quot;,
&quot;end&quot; : 12345,
&quot;host&quot; : &quot;147.228.242.58&quot;,
&quot;start&quot; : 12345,
&quot;end&quot; : 12345,
&quot;cloudDeploymentDomain&quot; : &quot;us-east-1&quot;,
&quot;owner&quot; : &quot;user1&quot;,
&quot;id&quot; : &quot;58e3946e0fb4f562d84ba1ad&quot;,
&quot;timestamp&quot; : 1499793079011
......
......@@ -69,7 +69,7 @@ class</p>
<dl class="dl-horizontal">
<dt>Subtypes</dt>
<dd><a href="json_KeyPair.html">KeyPair</a>, <a href="json_ScaleRequest.html">ScaleRequest</a>, <a href="json_AnsibleOutput.html">AnsibleOutput</a>, <a href="json_CloudCredentials.html">CloudCredentials</a>, <a href="json_BenchmarkResult.html">BenchmarkResult</a>, <a href="json_DeployResponse.html">DeployResponse</a>, <a href="json_ProvisionRequest.html">ProvisionRequest</a>, <a href="json_Script.html">Script</a>, <a href="json_KeyValueHolder.html">KeyValueHolder</a>, <a href="json_DeployRequest.html">DeployRequest</a>, <a href="json_ProvisionResponse.html">ProvisionResponse</a></dd>
<dd><a href="json_KeyPair.html">KeyPair</a>, <a href="json_AnsibleOutput.html">AnsibleOutput</a>, <a href="json_ScaleRequest.html">ScaleRequest</a>, <a href="json_CloudCredentials.html">CloudCredentials</a>, <a href="json_BenchmarkResult.html">BenchmarkResult</a>, <a href="json_DeployResponse.html">DeployResponse</a>, <a href="json_ProvisionRequest.html">ProvisionRequest</a>, <a href="json_Script.html">Script</a>, <a href="json_KeyValueHolder.html">KeyValueHolder</a>, <a href="json_DeployRequest.html">DeployRequest</a>, <a href="json_ProvisionResponse.html">ProvisionResponse</a></dd>
</dl>
<table class="table datatype-properties">
......
......@@ -521,58 +521,6 @@ the DAO saves the object based on the principal how made the call]]>
</xs:sequence>
</xs:complexType>
<xs:complexType name="planRequest">
<xs:annotation>
<xs:documentation>
<![CDATA[This class represents a plan request sent to the planner.]]>
</xs:documentation>
</xs:annotation>
<xs:sequence>
<xs:element name="toscaID" type="xs:string" minOccurs="0">
<xs:annotation>
<xs:documentation>
<![CDATA[The ID of the tosca file the generated this plan]]>
</xs:documentation>
</xs:annotation>
</xs:element>
<xs:element name="managerType" type="xs:string" minOccurs="0">
<xs:annotation>
<xs:documentation>
<![CDATA[The type of cluster manager]]>
</xs:documentation>
</xs:annotation>
</xs:element>
<xs:element name="vmUserName" type="xs:string" minOccurs="0">
<xs:annotation>
<xs:documentation>
<![CDATA[The default username to be set to all VMs]]>
</xs:documentation>
</xs:annotation>
</xs:element>
<xs:element name="cloudProvider" type="xs:string" minOccurs="0">
<xs:annotation>
<xs:documentation>
<![CDATA[The cloud provider]]>
</xs:documentation>
</xs:annotation>
</xs:element>
<xs:element name="osType" type="xs:string" minOccurs="0">
<xs:annotation>
<xs:documentation>
<![CDATA[The type of OS for the VMs]]>
</xs:documentation>
</xs:annotation>
</xs:element>
<xs:element name="domain" type="xs:string" minOccurs="0">
<xs:annotation>
<xs:documentation>
<![CDATA[The domain to request the VMs]]>
</xs:documentation>
</xs:annotation>
</xs:element>
</xs:sequence>
</xs:complexType>
<xs:complexType name="provisionRequest">
<xs:annotation>
<xs:documentation>
......@@ -823,17 +771,17 @@ class]]>
<xs:complexContent>
<xs:extension base="ownedObject">
<xs:sequence>
<xs:element name="delta" type="xs:dateTime" minOccurs="0">
<xs:element name="host" type="xs:string" minOccurs="0">
</xs:element>
<xs:element name="start" type="xs:dateTime" minOccurs="0">
<xs:element name="end" type="xs:dateTime" minOccurs="0">
</xs:element>
<xs:element name="vmType" type="xs:string" minOccurs="0">
<xs:element name="delta" type="xs:dateTime" minOccurs="0">
</xs:element>
<xs:element name="cloudDeploymentDomain" type="xs:string" minOccurs="0">
<xs:element name="vmType" type="xs:string" minOccurs="0">
</xs:element>
<xs:element name="end" type="xs:dateTime" minOccurs="0">
<xs:element name="start" type="xs:dateTime" minOccurs="0">
</xs:element>
<xs:element name="host" type="xs:string" minOccurs="0">
<xs:element name="cloudDeploymentDomain" type="xs:string" minOccurs="0">
</xs:element>
</xs:sequence>
</xs:extension>
......
......@@ -146,10 +146,10 @@ Content-Type: application/json
[ {
&quot;vmType&quot; : &quot;...&quot;,
&quot;delta&quot; : 12345,
&quot;cloudDeploymentDomain&quot; : &quot;us-east-1&quot;,
&quot;end&quot; : 12345,
&quot;host&quot; : &quot;147.228.242.58&quot;,
&quot;start&quot; : 12345,
&quot;end&quot; : 12345,
&quot;cloudDeploymentDomain&quot; : &quot;us-east-1&quot;,
&quot;owner&quot; : &quot;user1&quot;,
&quot;id&quot; : &quot;58e3946e0fb4f562d84ba1ad&quot;,
&quot;timestamp&quot; : 1499793079011
......@@ -516,10 +516,10 @@ Content-Type: application/json
{
&quot;vmType&quot; : &quot;...&quot;,
&quot;delta&quot; : 12345,
&quot;cloudDeploymentDomain&quot; : &quot;us-east-1&quot;,
&quot;end&quot; : 12345,
&quot;host&quot; : &quot;147.228.242.58&quot;,
&quot;start&quot; : 12345,
&quot;end&quot; : 12345,
&quot;cloudDeploymentDomain&quot; : &quot;us-east-1&quot;,
&quot;owner&quot; : &quot;user1&quot;,
&quot;id&quot; : &quot;58e3946e0fb4f562d84ba1ad&quot;,
&quot;timestamp&quot; : 1499793079011
......
......@@ -53,7 +53,6 @@
<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_plan_POST">POST /user/v1.0/planner/plan/</a></li>
<li><a href="#resource_PlannerController_verifyPlan_POST"><abbr title="POST /user/v1.0/planner/vereify_plan">POST /user/v1.0/planner/vereif...</abbr></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>
......@@ -228,113 +227,6 @@ Content-Type: application/json
</div>
</div>
<div id="resource_PlannerController_plan_POST">
<h3><span class="label label-default resource-method">POST</span> <span class="resource-path">/user/v1.0/planner/plan/ <a href="./user/v1.0/planner/plan/" class="glyphicon glyphicon-new-window" target="_blank"></a></span></h3>
<p></p>
<dl class="dl-horizontal">
<dt>Security Roles Allowed</dt>
<dd>ADMIN, USER</dd>
</dl>
<table class="table resource-request-body">
<caption>Request 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;Content-Type: application/json&quot; HTTP header to specify this media type to the server."><span class="request-type">application/json</span></abbr></td>
<td><span class="datatype-reference"><a href="json_PlanRequest.html">PlanRequest</a>
(JSON)</span></td>
</tr>
<tr>
<td><abbr data-toggle="tooltip" data-placement="top" title="Use the &quot;Content-Type: application/xml&quot; HTTP header to specify this media type to the server."><span class="request-type">application/xml</span></abbr></td>
<td><span class="datatype-reference"><a href="xml_ns0_planRequest.html">planRequest</a>
(XML)</span></td>
</tr>
</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>
<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>
POST /user/v1.0/planner/plan/
Content-Type: application/json
Accept: application/json
<code class="prettyprint language-js">
{
&quot;toscaID&quot; : &quot;592d5884e452f1b9b666a657&quot;,
&quot;managerType&quot; : &quot;swarm&quot;,
&quot;vmUserName&quot; : &quot;vm_user&quot;,
&quot;cloudProvider&quot; : &quot;egi&quot;,
&quot;osType&quot; : &quot;Ubuntu16.04&quot;,
&quot;domain&quot; : &quot;us-east-1&quot;
}
</code>
</pre>
</div>
<div class="col-md-6">
<h5>Response</h5>
<pre>
HTTP/1.1 201 Looks Good
Content-Type: application/json
<code class="prettyprint language-txt">
...
</code>
</pre>
</div>
</div>
</div>
</div>
<div id="resource_PlannerController_verifyPlan_POST">
<h3><span class="label label-default resource-method">POST</span> <span class="resource-path">/user/v1.0/planner/vereify_plan <a href="./user/v1.0/planner/vereify_plan" class="glyphicon glyphicon-new-window" target="_blank"></a></span></h3>
......
......@@ -225,7 +225,6 @@ machine the keys correspond to.</span>
</td>
<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/plan/</span>
</samp></li><li><samp> <span class="resource-path">/user/v1.0/planner/vereify_plan</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>
......@@ -236,7 +235,6 @@ machine the keys correspond to.</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">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><li><samp> <span class="label label-default resource-method">GET</span>
</samp></li><li><samp> <span class="label label-default resource-method">POST</span>
......
......@@ -156,12 +156,6 @@ abstract types such as TOSCA.</span>
</td>
<td> <span class="datatype-description">This is the base class for users to own resources. Many classes extend this
class</span>
</td>
</tr>
<tr class="clickable-row" data-href="json_PlanRequest.html">
<td> <span class="datatype-name">PlanRequest</span>
</td>
<td> <span class="datatype-description">This class represents a plan request sent to the planner.</span>
</td>
</tr>
<tr class="clickable-row" data-href="json_ProvisionRequest.html">
......
......@@ -201,12 +201,6 @@ abstract types such as TOSCA.</span>
</td>
<td> <span class="datatype-description">This is the base class for users to own resources. Many classes extend this
class</span>
</td>
</tr>
<tr class="clickable-row" data-href="xml_ns0_planRequest.html">
<td> <span class="datatype-name">planRequest</span>
</td>
<td> <span class="datatype-description">This class represents a plan request sent to the planner.</span>
</td>
</tr>
<tr class="clickable-row" data-href="xml_ns0_provisionRequest.html">
......
......@@ -231,12 +231,12 @@ the DAO saves the object based on the principal how made the call</span></td>
<p class="lead">Example</p>
<pre class="prettyprint language-xml example">&lt;b-----&gt;
&lt;host&gt;147.228.242.58&lt;/host&gt;
&lt;end&gt;...&lt;/end&gt;
&lt;delta&gt;...&lt;/delta&gt;
&lt;start&gt;...&lt;/start&gt;
&lt;vmType&gt;...&lt;/vmType&gt;
&lt;start&gt;...&lt;/start&gt;
&lt;cloudDeploymentDomain&gt;us-east-1&lt;/cloudDeploymentDomain&gt;
&lt;end&gt;...&lt;/end&gt;
&lt;host&gt;147.228.242.58&lt;/host&gt;
&lt;owner&gt;user1&lt;/owner&gt;
&lt;timestamp&gt;1499793079011&lt;/timestamp&gt;
&lt;/b-----&gt;
......
......@@ -29,7 +29,6 @@ import nl.uva.sne.drip.api.dao.PlanDao;
import nl.uva.sne.drip.api.exception.BadRequestException;
import nl.uva.sne.drip.api.exception.NotFoundException;
import nl.uva.sne.drip.api.rpc.PlannerCaller;
import nl.uva.sne.drip.commons.utils.Constants;
import nl.uva.sne.drip.drip.commons.data.internal.Message;
import nl.uva.sne.drip.drip.commons.data.internal.MessageParameter;
import nl.uva.sne.drip.drip.commons.data.v1.external.PlanResponse;
......@@ -38,8 +37,6 @@ import nl.uva.sne.drip.commons.utils.Converter;
import nl.uva.sne.drip.drip.commons.data.v1.external.User;
import nl.uva.sne.drip.drip.converter.P2PConverter;
import nl.uva.sne.drip.drip.converter.SimplePlanContainer;
import nl.uva.sne.drip.drip.converter.plannerOut.Parameter;
import nl.uva.sne.drip.drip.converter.plannerOut.PlannerOutput;
import org.json.JSONException;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.beans.factory.annotation.Value;
......@@ -66,8 +63,7 @@ public class PlannerService {
@Value("${message.broker.host}")
private String messageBrokerHost;
public PlanResponse getPlan(String toscaId, String clusterType, String vmUser, String cloudProvider, String OSType, String domainName) throws JSONException, UnsupportedEncodingException, IOException, TimeoutException, InterruptedException {
public PlanResponse getPlan(String toscaId, String vmUser, String cloudProvider, String domainName) throws JSONException, UnsupportedEncodingException, IOException, TimeoutException, InterruptedException {
try (PlannerCaller planner = new PlannerCaller(messageBrokerHost)) {
Message plannerInvokationMessage = buildPlannerMessage(toscaId);
Message plannerReturnedMessage = (planner.call(plannerInvokationMessage));
......@@ -88,7 +84,7 @@ public class PlannerService {
jsonArrayString.append("]");
// SimplePlanContainer simplePlan = P2PConverter.convert(jsonArrayString.toString(), "vm_user", "Ubuntu 16.04", clusterType);
SimplePlanContainer simplePlan = P2PConverter.transfer(jsonArrayString.toString(), vmUser, OSType, domainName, clusterType, cloudProvider);
SimplePlanContainer simplePlan = P2PConverter.transfer(jsonArrayString.toString(), vmUser, domainName, cloudProvider);
PlanResponse topLevel = new PlanResponse();
topLevel.setTimestamp(System.currentTimeMillis());
......
......@@ -16,6 +16,7 @@
package nl.uva.sne.drip.api.v0.rest;
import java.io.IOException;
import java.io.UnsupportedEncodingException;
import java.util.ArrayList;
import java.util.List;
import java.util.concurrent.TimeoutException;
......@@ -65,16 +66,13 @@ public class PlannerController0 {
String yaml = plan0.file;
yaml = yaml.replaceAll("\\\\n", "\n");
String id = toscaService.saveYamlString(yaml, null);
nl.uva.sne.drip.drip.commons.data.v1.external.PlanResponse plan1 = plannerService.getPlan(id, "swarm", "vm_user", "EC2", "Ubuntu 16.04", "Virginia");
nl.uva.sne.drip.drip.commons.data.v1.external.PlanResponse plan1 = plannerService.getPlan(id, "vm_user", "EC2", "Virginia");
Result r = new Result();
r.info = ("INFO");
r.status = ("Success");
List<Attribute> files = new ArrayList<>();
Attribute e = Converter.plan1toFile(plan1);
files.add(e);
for (String lowiID : plan1.getLoweLevelPlanIDs()) {
nl.uva.sne.drip.drip.commons.data.v1.external.PlanResponse lowPlan1 = plannerService.findOne(lowiID);
e = Converter.plan1toFile(lowPlan1);
......
......@@ -37,7 +37,6 @@ import org.springframework.web.bind.annotation.RestController;
import nl.uva.sne.drip.api.service.PlannerService;
import nl.uva.sne.drip.api.service.ToscaService;
import nl.uva.sne.drip.api.service.UserService;
import nl.uva.sne.drip.drip.commons.data.v1.external.PlanRequest;
import nl.uva.sne.drip.drip.commons.data.v1.external.PlanResponse;
import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.RequestBody;
......@@ -88,28 +87,8 @@ public class PlannerController {
String plan(@PathVariable("tosca_id") String toscaId) {
try {
PlanResponse plan = plannerService.getPlan(toscaId, "swarm",
"vm_user", "EC2", "Ubuntu 16.04", "Virginia");
if (plan == null) {
throw new NotFoundException("Could not make plan");
}
return plan.getId();
} catch (JSONException | IOException | TimeoutException | InterruptedException ex) {
Logger.getLogger(PlannerController.class.getName()).log(Level.SEVERE, null, ex);
}
return null;
}
@RequestMapping(value = "/plan/", method = RequestMethod.POST)
@RolesAllowed({UserService.USER, UserService.ADMIN})
public @ResponseBody
String plan(@RequestBody PlanRequest planRequest) {
try {
PlanResponse plan = plannerService.getPlan(planRequest.getToscaID(),
planRequest.getManagerType(), planRequest.getVmUserName(),
planRequest.getCloudProvider(), planRequest.getOsType(), planRequest.getDomain());
PlanResponse plan = plannerService.getPlan(toscaId,
"vm_user", "EC2", "Virginia");
if (plan == null) {
throw new NotFoundException("Could not make plan");
}
......@@ -120,6 +99,24 @@ public class PlannerController {
return null;
}
// @RequestMapping(value = "/plan/", method = RequestMethod.POST)
// @RolesAllowed({UserService.USER, UserService.ADMIN})
// public @ResponseBody
// String plan(@RequestBody PlanRequest planRequest) {
//
// try {
// PlanResponse plan = plannerService.getPlan(planRequest.getToscaID(),
// planRequest.getManagerType(), planRequest.getVmUserName(),
// planRequest.getCloudProvider(), planRequest.getOsType(), planRequest.getDomain());
// if (plan == null) {
// throw new NotFoundException("Could not make plan");
// }
// return plan.getId();
// } catch (JSONException | IOException | TimeoutException | InterruptedException ex) {
// Logger.getLogger(PlannerController.class.getName()).log(Level.SEVERE, null, ex);
// }
// return null;
// }
/**
* Gets a plan
*
......
......@@ -85,6 +85,11 @@ public class Converter {
return jsonObject2Map(jsonObject);
}
public static List<Object> jsonString2List(String jsonString) throws JSONException {
JSONArray jSONArray = new JSONArray(jsonString);
return jsonArray2List(jSONArray);
}
public static Map<String, Object> jsonObject2Map(JSONObject object) throws JSONException {
Map<String, Object> map = new HashMap();
......@@ -115,7 +120,6 @@ public class Converter {
list.add(value);
}
return list;
}
public static String json2Yml2(String jsonString) throws JSONException {
......
......@@ -8,22 +8,36 @@ import java.util.UUID;
import com.fasterxml.jackson.core.JsonParseException;
import com.fasterxml.jackson.core.JsonProcessingException;
import com.fasterxml.jackson.core.type.TypeReference;
import com.fasterxml.jackson.databind.JsonMappingException;
import com.fasterxml.jackson.databind.ObjectMapper;
import com.fasterxml.jackson.dataformat.yaml.YAMLFactory;
import java.util.List;
import nl.uva.sne.drip.drip.converter.plannerOut.*;
import java.util.logging.Level;
import java.util.logging.Logger;
import nl.uva.sne.drip.commons.utils.Converter;
import nl.uva.sne.drip.drip.converter.provisionerIn.*;
import nl.uva.sne.drip.drip.converter.provisionerIn.EC2.*;
import nl.uva.sne.drip.drip.converter.provisionerIn.provisionerIn.EGI.*;
import org.json.JSONException;
public class P2PConverter {
public static SimplePlanContainer transfer(String plannerOutputJson,
String userName, String OStype, String domainName, String clusterType, String cloudProvider) throws JsonParseException, JsonMappingException, IOException {
public static SimplePlanContainer transfer(String plannerOutputJson,
String userName, String domainName, String cloudProvider) throws JsonParseException, JsonMappingException, IOException, JSONException {
Parameter plannerOutput = getInfoFromPlanner(plannerOutputJson);
List<Object> vmList = Converter.jsonString2List(plannerOutputJson);
String provisionerScalingMode = "fixed";
for (Object element : vmList) {
Map<String, Object> map = (Map<String, Object>) element;
if (map.containsKey("scaling_mode")) {
String scalingMode = (String) map.get("scaling_mode");
if (!scalingMode.equals("single")) {
provisionerScalingMode = "scaling";
break;
}
}
}
TopTopology topTopology = new TopTopology();
SubTopology subTopology = null;
......@@ -35,16 +49,15 @@ public class P2PConverter {
subTopology = new EGISubTopology();
break;
default:
System.out.println("The " + cloudProvider + " is not supported yet!");
Logger.getLogger(P2PConverter.class.getName()).log(Level.WARNING, "The {0} is not supported yet!", cloudProvider);
return null;
}
SubTopologyInfo sti = new SubTopologyInfo();
sti.cloudProvider = cloudProvider;
sti.topology = UUID.randomUUID().toString();
sti.domain = domainName;
sti.status = "fresh";
sti.tag = "fixed";
sti.tag = provisionerScalingMode;
topTopology.publicKeyPath = null;
topTopology.userName = userName;
......@@ -66,13 +79,13 @@ public class P2PConverter {
((EGISubTopology) subTopology).components = new ArrayList<>();
break;
default:
System.out.println("The " + cloudProvider + " is not supported yet!");
Logger.getLogger(P2PConverter.class.getName()).log(Level.WARNING, "The {0} is not supported yet!", cloudProvider);
return null;
}
boolean firstVM = true;
for (int vi = 0; vi < plannerOutput.value.size(); vi++) {
Value curValue = plannerOutput.value.get(vi);
for (Object element : vmList) {
Map<String, Object> map = (Map<String, Object>) element;
VM curVM;
switch (cloudProvider.trim().toLowerCase()) {
case "ec2":
......@@ -82,63 +95,30 @@ public class P2PConverter {
curVM = new EGIVM();
break;
default:
System.out.println("The " + cloudProvider + " is not supported yet!");
Logger.getLogger(P2PConverter.class.getName()).log(Level.WARNING, "The {0} is not supported yet!", cloudProvider);
return null;
}
curVM.name = curValue.getName();
curVM.type = "Switch.nodes.Compute";
curVM.OStype = OStype;
curVM.clusterType = clusterType;
curVM.dockers = curValue.getDocker();
if (cloudProvider.trim().toLowerCase().equals("ec2")) {
switch (curValue.getSize().trim().toLowerCase()) {
case "small":
curVM.nodeType = "t2.small";
break;
case "medium":
curVM.nodeType = "t2.medium";
break;
case "large":
curVM.nodeType = "t2.large";
break;
default:
throw new IllegalArgumentException("Invalid value for field 'size' in input JSON String");
}
Eth eth = new Eth();
eth.name = "p1";
eth.subnetName = "s1";
int hostNum = 10 + vi;
String priAddress = "192.168.10." + hostNum;
eth.address = priAddress;
curVM.ethernetPort = new ArrayList<Eth>();
curVM.ethernetPort.add(eth);
}
if (cloudProvider.trim().toLowerCase().equals("egi")) {
switch (curValue.getSize().trim().toLowerCase()) {
case "small":
curVM.nodeType = "small";
break;
case "medium":
curVM.nodeType = "medium";
break;
case "large":
curVM.nodeType = "large";
break;
default:
throw new IllegalArgumentException("Invalid value for field 'size' in input JSON String");
}
}
curVM.name = (String) map.get("name");
curVM.type = (String) map.get("type");
curVM.OStype = ((Map<String, String>) map.get("os")).get("distribution") + " " + ((Map<String, Double>) map.get("os")).get("os_version");
// curVM.clusterType = clusterType;
// curVM.dockers = curValue.getDocker();
curVM.nodeType = getSize((Map<String, String>) map.get("host"), cloudProvider);
// Eth eth = new Eth();
// eth.name = "p1";
// eth.subnetName = "s1";
// int hostNum = 10 + vi;
// String priAddress = "192.168.10." + hostNum;
// eth.address = priAddress;
// curVM.ethernetPort = new ArrayList<Eth>();
// curVM.ethernetPort.add(eth);
if (firstVM) {
curVM.role = "master";
firstVM = false;
} else {
curVM.role = "slave";
}
switch (cloudProvider.trim().toLowerCase()) {
case "ec2":
((EC2SubTopology) subTopology).components.add((EC2VM) curVM);
......@@ -147,11 +127,10 @@ public class P2PConverter {
((EGISubTopology) subTopology).components.add((EGIVM) curVM);
break;
default:
System.out.println("The " + cloudProvider + " is not supported yet!");
Logger.getLogger(P2PConverter.class.getName()).log(Level.WARNING, "The {0} is not supported yet!", cloudProvider);
return null;
}
}
sti.subTopology = subTopology;
topTopology.topologies = new ArrayList<>();
......@@ -162,18 +141,6 @@ public class P2PConverter {
return spc;
}
private static Parameter getInfoFromPlanner(String json) throws JsonParseException, JsonMappingException, IOException {
ObjectMapper mapper = new ObjectMapper();
List<Value> outputList = mapper.readValue(json, new TypeReference<List<Value>>() {
});
// PlannerOutput po = mapper.readValue(json, PlannerOutput.class);
// System.out.println("");
Parameter param = new Parameter();
param.value = outputList;
return param;
}
private static SimplePlanContainer generateInfo(TopTopology topTopology) throws JsonProcessingException {
SimplePlanContainer spc = new SimplePlanContainer();
ObjectMapper mapper = new ObjectMapper(new YAMLFactory());
......@@ -193,4 +160,16 @@ public class P2PConverter {
return spc;
}
private static String getSize(Map<String, String> map, String cloudProvider) {
switch (cloudProvider.trim().toLowerCase()) {
case "ec2":
return "t2.medium";
case "egi":
return "medium";
default:
Logger.getLogger(P2PConverter.class.getName()).log(Level.WARNING, "The {0} is not supported yet!", cloudProvider);
return null;
}
}
}
......@@ -24,11 +24,11 @@ public abstract class VM {
//This is not case sensitive.
public String role;
//The name of the docker in repository, which can be "null".
public String dockers;
// //The name of the docker in repository, which can be "null".
// public String dockers;
////Identify the type of the docker cluster used.
public String clusterType;
// ////Identify the type of the docker cluster used.
// public String clusterType;
//Do not need to be the same with the node name any more.
//The initial value should be "null", which means the public is not determined.
......
package nl.uva.sne.drip.drip.converter;
import com.fasterxml.jackson.core.JsonParseException;
import com.fasterxml.jackson.databind.JsonMappingException;
import java.io.File;
import java.io.IOException;
import java.util.Map;
import org.apache.commons.io.FileUtils;
import org.json.JSONException;
public class testConverter {
public static void main(String[] args) {
public static void main(String[] args) throws JsonParseException, JsonMappingException, JSONException {
File jsonFile = new File("input.json");
String json = "";
try {
......@@ -18,7 +21,7 @@ public class testConverter {
}
try {
SimplePlanContainer spc = P2PConverter.transfer(json, "zh9314", "Ubuntu 16.04", "Virginia", "kubernetes", "EC2");
SimplePlanContainer spc = P2PConverter.transfer(json, "zh9314", "Virginia", "EC2");
System.out.println("--topLevel:\n" + spc.topLevelContents);
System.out.println("--lowLevel:");
for (Map.Entry<String, String> entry : spc.lowerLevelContents.entrySet()) {
......
......@@ -41,35 +41,8 @@ class DumpPlanner:
def get_artifacts(self, node):
if 'artifacts' in node:
return node['artifacts']
def get_properties(self, node):
if 'properties' in node:
return node['properties']
def get_enviroment_vars(self, properties):
environment = []
for prop in properties:
if properties[prop] and not isinstance(properties[prop], dict):
environment.append(prop + "=" + str(properties[prop]))
return environment
def get_port_map(self, properties):
if 'ports_mapping' in properties:
ports_mappings = properties['ports_mapping']
port_maps = []
for port_map_key in ports_mappings:
host_port = ports_mappings[port_map_key]['host_port']
if not isinstance(host_port, (int, long, float, complex)):
host_port_var = host_port.replace('${', '').replace('}', '')
host_port = properties[host_port_var]
container_port = ports_mappings[port_map_key]['container_port']
if not isinstance(container_port, (int, long, float, complex)):
container_port_var = container_port.replace('${', '').replace('}', '')
container_port = properties[container_port_var]
port_maps.append(str(host_port) + ':' + str(container_port))
return port_maps
def get_hosted_nodes(self, node_templates):
docker_types = self.get_docker_types()
......@@ -84,6 +57,10 @@ class DumpPlanner:
break
return hosted_nodes
def get_properties(self, node):
if 'properties' in node:
return node['properties']
def plan(self):
node_templates = self.get_node_templates()
hosted_nodes = self.get_hosted_nodes(node_templates)
......@@ -93,17 +70,30 @@ class DumpPlanner:
vm['name'] = node['id']
vm['type'] = self.COMPUTE_TYPE
for req in node['requirements']:
vm['host'] = req['host']['node_filter']['capabilities']['host']
vm['OStype'] = req['host']['node_filter']['capabilities']['os']['distribution'] + " " + str(req['host']['node_filter']['capabilities']['os']['os_version'])
# vm['nodeType'] = 'medium'
# vm['dockers'] =
# artifacts = self.get_artifacts(node)
# if artifacts:
# key = next(iter(artifacts))
# docker_file = artifacts[key]['file']
# vm['dockers'] = docker_file
# vm['cloudProvider']
if 'requirements' in node:
for req in node['requirements']:
if 'host' in req and 'node_filter' in req['host']:
vm['host'] = req['host']['node_filter']['capabilities']['host']
vm['os'] = req['host']['node_filter']['capabilities']['os']
if 'host' not in vm:
host = {}
host['cpu_frequency'] = '2GHz'
host['mem_size'] = '4GB'
host['num_cpus'] = '1'
host['disk_size'] = '10GB'
vm['host'] = host
if 'os' not in vm:
os = {}
os['os_version'] = 16.04
os['distribution'] = 'ubuntu'
os['type'] = 'linux'
os['architecture'] = 'x86_64'
vm['os'] = os
properties = self.get_properties(node)
if properties and 'scaling_mode' in properties:
vm['scaling_mode'] = properties['scaling_mode']
else:
vm['scaling_mode'] = 'single'
vms.append(vm)
print len(vms)
return vms
......@@ -17,7 +17,7 @@ from os.path import expanduser
def init_chanel(args):
if len(args) > 1:
rabbitmq_host = args[1]
queue_name = args[2] #tosca_2_docker_compose_queue
queue_name = args[2] #planner_queue
else:
rabbitmq_host = '127.0.0.1'
......@@ -48,75 +48,49 @@ def handle_delivery(message):
parsed_json_message = json.loads(message)
params = parsed_json_message["parameters"]
param = params[0]
value = param["value"]
value = json.loads( param['value'])
tosca_file_name = param["name"]
current_milli_time = lambda: int(round(time.time() * 1000))
try:
tosca_file_path = tempfile.gettempdir() + "/transformer_files/" + str(current_milli_time()) + "/"
tosca_file_path = tempfile.gettempdir() + "/planner_files/" + str(current_milli_time()) + "/"
except NameError:
import sys
tosca_file_path = os.path.dirname(os.path.abspath(sys.argv[0])) + "/transformer_files/" + str(current_milli_time()) + "/"
tosca_file_path = os.path.dirname(os.path.abspath(sys.argv[0])) + "/planner_files/" + str(current_milli_time()) + "/"
if not os.path.exists(tosca_file_path):
os.makedirs(tosca_file_path)
with open(tosca_file_path + "/" + tosca_file_name + ".yml", 'w') as outfile:
outfile.write(str(value))
outfile.write(json.dumps(value))
if queue_name == "tosca_2_docker_compose_queue":
response = {}
current_milli_time = lambda: int(round(time.time() * 1000))
response["creationDate"] = current_milli_time()
response["parameters"] = []
if queue_name == "planner_queue":
planner = DumpPlanner(tosca_file_path + "/" + tosca_file_name + ".yml");
planner.plan()
return "response"
vm_nodes = planner.plan()
for vm in vm_nodes:
parameter = {}
parameter['value'] = str(json.dumps(vm))
parameter['name'] = 'vm'
parameter['encoding'] = 'UTF-8'
response["parameters"].append(parameter)
print ("Output message: %s" % json.dumps(response))
return json.dumps(response)
if __name__ == "__main__":
home = expanduser("~")
planner = DumpPlanner(home+"/workspace/DRIP/docs/input_tosca_files/MOG_cardif.yml")
planner.plan()
# home = expanduser("~")
# planner = DumpPlanner(home+"/workspace/DRIP/docs/input_tosca_files/MOG_cardif.yml")
# planner.plan()
print sys.argv
channel = init_chanel(sys.argv)
global queue_name
queue_name = sys.argv[2]
start(channel)
# print sys.argv
# channel = init_chanel(sys.argv)
# global queue_name
# queue_name = sys.argv[2]
# start(channel)
# try:
## for node in tosca.nodetemplates:
## print "Name %s Type: %s " %(node.name,node.type)
##
## for input in tosca.inputs:
## print input.name
#
## for node in tosca.nodetemplates:
## for relationship, trgt in node.relationships.items():
## rel_template = trgt.get_relationship_template()
## for rel in rel_template:
## print "source %s Relationship: %s target: %s" %(rel.source.type,rel.type,rel.target.type)
## print dir(rel)
# response = {}
# current_milli_time = lambda: int(round(time.time() * 1000))
# response["creationDate"] = current_milli_time()
# response["parameters"] = []
# vm_nodes = []
#
# for node in tosca.nodetemplates:
# if not node.relationships.items() and 'docker' in node.type.lower():
# print "1Adding: %s , %s" %(node.name,node.type)
# vm_nodes.append(node)
## else:
# for relationship, trgt in node.relationships.items():
# if relationship.type == EntityType.HOSTEDON:
# rel_template = trgt.get_relationship_template()
# for rel in rel_template:
# print "2Adding: %s , %s" %(rel.target.name,rel.target.type)
## print "Name: %s Type: %s " %(node.name, node.type)
# vm_nodes.append(rel.target)
#
#
## if not compute_nodes:
## for node in tosca.nodetemplates:
### print dir(node)
## print "Name: %s Type: %s props: %s"%(node.name,node.type,node.get_properties().keys())
#
# for vm in vm_nodes:
# result = {}
......
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