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> ...@@ -161,12 +161,6 @@ abstract types such as TOSCA.</span>
</td> </td>
<td> <span class="datatype-description">This is the base class for users to own resources. Many classes extend this <td> <span class="datatype-description">This is the base class for users to own resources. Many classes extend this
class</span> 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> </td>
</tr> </tr>
<tr class="clickable-row" data-href="json_ProvisionRequest.html"> <tr class="clickable-row" data-href="json_ProvisionRequest.html">
...@@ -344,12 +338,6 @@ abstract types such as TOSCA.</span> ...@@ -344,12 +338,6 @@ abstract types such as TOSCA.</span>
</td> </td>
<td> <span class="datatype-description">This is the base class for users to own resources. Many classes extend this <td> <span class="datatype-description">This is the base class for users to own resources. Many classes extend this
class</span> 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> </td>
</tr> </tr>
<tr class="clickable-row" data-href="xml_ns0_provisionRequest.html"> <tr class="clickable-row" data-href="xml_ns0_provisionRequest.html">
......
...@@ -72,7 +72,7 @@ ...@@ -72,7 +72,7 @@
<h1 class="page-header">Files and Libraries</h1> <h1 class="page-header">Files and Libraries</h1>
<h3 id="artifact_gwt_json_overlay">GWT JSON Overlay</h3> <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> <p> <p>
The <a href="http://code.google.com/webtoolkit/">Google Web Toolkit</a> JSON Overlay library provides the JSON Overlays that 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. can be used to access the Web service API for this application.
...@@ -91,13 +91,13 @@ ...@@ -91,13 +91,13 @@
<tbody data-link="row" class="rowlink"> <tbody data-link="row" class="rowlink">
<tr class="clickable-row" data-href="drip-api-gwt-json-overlay.jar"> <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-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> <td><span class="downloadfile-description">The sources for the GWT JSON overlay.</span></td>
</tr> </tr>
</tbody> </tbody>
</table> </table>
<h3 id="artifact_java_json_client_library">Java JSON Client Library</h3> <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> <p><p>
The Java client-side library is used to provide the set of Java objects that can be serialized 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 to/from JSON using <a href="http://jackson.codehaus.org/">Jackson</a>. This is useful for accessing the
...@@ -116,18 +116,18 @@ ...@@ -116,18 +116,18 @@
<tbody data-link="row" class="rowlink"> <tbody data-link="row" class="rowlink">
<tr class="clickable-row" data-href="drip-api-json-client.jar"> <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-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> <td><span class="downloadfile-description">The binaries for the Java JSON client library.</span></td>
</tr> </tr>
<tr class="clickable-row" data-href="drip-api-json-client-json-sources.jar"> <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-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> <td><span class="downloadfile-description">The sources for the Java JSON client library.</span></td>
</tr> </tr>
</tbody> </tbody>
</table> </table>
<h3 id="artifact_java_xml_client_library">Java XML Client Library</h3> <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> <p><p>
The Java client-side library is used to access the Web service API for this application using Java. The Java client-side library is used to access the Web service API for this application using Java.
</p> </p>
...@@ -144,18 +144,18 @@ ...@@ -144,18 +144,18 @@
<tbody data-link="row" class="rowlink"> <tbody data-link="row" class="rowlink">
<tr class="clickable-row" data-href="drip-api-xml-client.jar"> <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-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> <td><span class="downloadfile-description">The binaries for the Java XML client library.</span></td>
</tr> </tr>
<tr class="clickable-row" data-href="drip-api-xml-client-xml-sources.jar"> <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-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> <td><span class="downloadfile-description">The sources for the Java XML client library.</span></td>
</tr> </tr>
</tbody> </tbody>
</table> </table>
<h3 id="artifact_js_client_library">JavaScript Client Library</h3> <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> <p><p>
The JavaScript client-side library defines classes that can be (de)serialized to/from JSON. 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 This is useful for accessing the resources that are published by this application, but only
...@@ -184,13 +184,13 @@ ...@@ -184,13 +184,13 @@
<tbody data-link="row" class="rowlink"> <tbody data-link="row" class="rowlink">
<tr class="clickable-row" data-href="drip-api-js.zip"> <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-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> <td><span class="downloadfile-description">&nbsp;</span></td>
</tr> </tr>
</tbody> </tbody>
</table> </table>
<h3 id="artifact_php_json_client_library">PHP JSON Client Library</h3> <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> <p><p>
The PHP JSON client-side library defines the PHP classes that can be (de)serialized to/from JSON. 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 This is useful for accessing the resources that are published by this application, but only
...@@ -213,13 +213,13 @@ ...@@ -213,13 +213,13 @@
<tbody data-link="row" class="rowlink"> <tbody data-link="row" class="rowlink">
<tr class="clickable-row" data-href="drip-api-php.zip"> <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-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> <td><span class="downloadfile-description">&nbsp;</span></td>
</tr> </tr>
</tbody> </tbody>
</table> </table>
<h3 id="artifact_php_xml_client_library">PHP XML Client Library</h3> <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> <p><p>
The PHP client-side library defines the PHP classes that can be (de)serialized to/from XML. 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 This is useful for accessing the resources that are published by this application, but only
...@@ -245,13 +245,13 @@ ...@@ -245,13 +245,13 @@
<tbody data-link="row" class="rowlink"> <tbody data-link="row" class="rowlink">
<tr class="clickable-row" data-href="drip-api-php.zip"> <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-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> <td><span class="downloadfile-description">&nbsp;</span></td>
</tr> </tr>
</tbody> </tbody>
</table> </table>
<h3 id="artifact_ruby_json_client_library">Ruby JSON Client Library</h3> <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> <p><p>
The Ruby JSON client-side library defines the Ruby classes that can be (de)serialized to/from JSON. 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 This is useful for accessing the REST endpoints that are published by this application, but only
...@@ -276,7 +276,7 @@ ...@@ -276,7 +276,7 @@
<tbody data-link="row" class="rowlink"> <tbody data-link="row" class="rowlink">
<tr class="clickable-row" data-href="drip-api.rb"> <tr class="clickable-row" data-href="drip-api.rb">
<td><span class="downloadfile-name">drip-api.rb</span></td> <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> <td><span class="downloadfile-description">&nbsp;</span></td>
</tr> </tr>
</tbody> </tbody>
......
This diff is collapsed.
...@@ -233,7 +233,6 @@ machine the keys correspond to.</span> ...@@ -233,7 +233,6 @@ machine the keys correspond to.</span>
</td> </td>
<td class="text-nowrap"><ul class="list-unstyled"><li><samp> <span class="resource-path">/user/v1.0/planner/all</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/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/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/{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/plan/{tosca_id}</span>
...@@ -244,7 +243,6 @@ machine the keys correspond to.</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> <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">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">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">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><li><samp> <span class="label label-default resource-method">POST</span> </samp></li><li><samp> <span class="label label-default resource-method">POST</span>
...@@ -495,12 +493,6 @@ abstract types such as TOSCA.</span> ...@@ -495,12 +493,6 @@ abstract types such as TOSCA.</span>
</td> </td>
<td> <span class="datatype-description">This is the base class for users to own resources. Many classes extend this <td> <span class="datatype-description">This is the base class for users to own resources. Many classes extend this
class</span> 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> </td>
</tr> </tr>
<tr class="clickable-row" data-href="json_ProvisionRequest.html"> <tr class="clickable-row" data-href="json_ProvisionRequest.html">
...@@ -678,12 +670,6 @@ abstract types such as TOSCA.</span> ...@@ -678,12 +670,6 @@ abstract types such as TOSCA.</span>
</td> </td>
<td> <span class="datatype-description">This is the base class for users to own resources. Many classes extend this <td> <span class="datatype-description">This is the base class for users to own resources. Many classes extend this
class</span> 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> </td>
</tr> </tr>
<tr class="clickable-row" data-href="xml_ns0_provisionRequest.html"> <tr class="clickable-row" data-href="xml_ns0_provisionRequest.html">
......
...@@ -81,9 +81,9 @@ class</p> ...@@ -81,9 +81,9 @@ class</p>
</thead> </thead>
<tbody> <tbody>
<tr> <tr>
<td> <span class="property-name">start</span> <td> <span class="property-name">host</span>
</td> </td>
<td> <span class="datatype-reference">number <td> <span class="datatype-reference">string
</span> </span>
</td> </td>
<td> <span class="property-description"></span> <td> <span class="property-description"></span>
...@@ -99,25 +99,25 @@ class</p> ...@@ -99,25 +99,25 @@ class</p>
</td> </td>
</tr> </tr>
<tr> <tr>
<td> <span class="property-name">delta</span> <td> <span class="property-name">cloudDeploymentDomain</span>
</td> </td>
<td> <span class="datatype-reference">number <td> <span class="datatype-reference">string
</span> </span>
</td> </td>
<td> <span class="property-description"></span> <td> <span class="property-description"></span>
</td> </td>
</tr> </tr>
<tr> <tr>
<td> <span class="property-name">host</span> <td> <span class="property-name">start</span>
</td> </td>
<td> <span class="datatype-reference">string <td> <span class="datatype-reference">number
</span> </span>
</td> </td>
<td> <span class="property-description"></span> <td> <span class="property-description"></span>
</td> </td>
</tr> </tr>
<tr> <tr>
<td> <span class="property-name">end</span> <td> <span class="property-name">delta</span>
</td> </td>
<td> <span class="datatype-reference">number <td> <span class="datatype-reference">number
</span> </span>
...@@ -126,9 +126,9 @@ class</p> ...@@ -126,9 +126,9 @@ class</p>
</td> </td>
</tr> </tr>
<tr> <tr>
<td> <span class="property-name">cloudDeploymentDomain</span> <td> <span class="property-name">end</span>
</td> </td>
<td> <span class="datatype-reference">string <td> <span class="datatype-reference">number
</span> </span>
</td> </td>
<td> <span class="property-description"></span> <td> <span class="property-description"></span>
...@@ -165,12 +165,12 @@ object is saved.</span></td> ...@@ -165,12 +165,12 @@ object is saved.</span></td>
<p class="lead">Example</p> <p class="lead">Example</p>
<pre class="prettyprint language-js example">{ <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;vmType&quot; : &quot;...&quot;,
&quot;cloudDeploymentDomain&quot; : &quot;us-east-1&quot;,
&quot;start&quot; : 12345,
&quot;delta&quot; : 12345, &quot;delta&quot; : 12345,
&quot;host&quot; : &quot;147.228.242.58&quot;,
&quot;end&quot; : 12345, &quot;end&quot; : 12345,
&quot;cloudDeploymentDomain&quot; : &quot;us-east-1&quot;,
&quot;owner&quot; : &quot;user1&quot;, &quot;owner&quot; : &quot;user1&quot;,
&quot;id&quot; : &quot;58e3946e0fb4f562d84ba1ad&quot;, &quot;id&quot; : &quot;58e3946e0fb4f562d84ba1ad&quot;,
&quot;timestamp&quot; : 1499793079011 &quot;timestamp&quot; : 1499793079011
......
...@@ -521,58 +521,6 @@ the DAO saves the object based on the principal how made the call]]> ...@@ -521,58 +521,6 @@ the DAO saves the object based on the principal how made the call]]>
</xs:sequence> </xs:sequence>
</xs:complexType> </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:complexType name="provisionRequest">
<xs:annotation> <xs:annotation>
<xs:documentation> <xs:documentation>
...@@ -823,18 +771,18 @@ class]]> ...@@ -823,18 +771,18 @@ class]]>
<xs:complexContent> <xs:complexContent>
<xs:extension base="ownedObject"> <xs:extension base="ownedObject">
<xs:sequence> <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 name="start" type="xs:dateTime" minOccurs="0">
</xs:element> </xs:element>
<xs:element name="cloudDeploymentDomain" type="xs:string" minOccurs="0"> <xs:element name="cloudDeploymentDomain" type="xs:string" minOccurs="0">
</xs:element> </xs:element>
<xs:element name="host" type="xs:string" minOccurs="0">
</xs:element>
<xs:element name="delta" type="xs:dateTime" minOccurs="0"> <xs:element name="delta" type="xs:dateTime" minOccurs="0">
</xs:element> </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:sequence>
</xs:extension> </xs:extension>
</xs:complexContent> </xs:complexContent>
......
...@@ -144,12 +144,12 @@ Content-Type: application/json ...@@ -144,12 +144,12 @@ Content-Type: application/json
<code class="prettyprint language-js"> <code class="prettyprint language-js">
[ { [ {
&quot;start&quot; : 12345, &quot;host&quot; : &quot;147.228.242.58&quot;,
&quot;vmType&quot; : &quot;...&quot;, &quot;vmType&quot; : &quot;...&quot;,
&quot;cloudDeploymentDomain&quot; : &quot;us-east-1&quot;,
&quot;start&quot; : 12345,
&quot;delta&quot; : 12345, &quot;delta&quot; : 12345,
&quot;host&quot; : &quot;147.228.242.58&quot;,
&quot;end&quot; : 12345, &quot;end&quot; : 12345,
&quot;cloudDeploymentDomain&quot; : &quot;us-east-1&quot;,
&quot;owner&quot; : &quot;user1&quot;, &quot;owner&quot; : &quot;user1&quot;,
&quot;id&quot; : &quot;58e3946e0fb4f562d84ba1ad&quot;, &quot;id&quot; : &quot;58e3946e0fb4f562d84ba1ad&quot;,
&quot;timestamp&quot; : 1499793079011 &quot;timestamp&quot; : 1499793079011
...@@ -514,12 +514,12 @@ Content-Type: application/json ...@@ -514,12 +514,12 @@ Content-Type: application/json
<code class="prettyprint language-js"> <code class="prettyprint language-js">
{ {
&quot;start&quot; : 12345, &quot;host&quot; : &quot;147.228.242.58&quot;,
&quot;vmType&quot; : &quot;...&quot;, &quot;vmType&quot; : &quot;...&quot;,
&quot;cloudDeploymentDomain&quot; : &quot;us-east-1&quot;,
&quot;start&quot; : 12345,
&quot;delta&quot; : 12345, &quot;delta&quot; : 12345,
&quot;host&quot; : &quot;147.228.242.58&quot;,
&quot;end&quot; : 12345, &quot;end&quot; : 12345,
&quot;cloudDeploymentDomain&quot; : &quot;us-east-1&quot;,
&quot;owner&quot; : &quot;user1&quot;, &quot;owner&quot; : &quot;user1&quot;,
&quot;id&quot; : &quot;58e3946e0fb4f562d84ba1ad&quot;, &quot;id&quot; : &quot;58e3946e0fb4f562d84ba1ad&quot;,
&quot;timestamp&quot; : 1499793079011 &quot;timestamp&quot; : 1499793079011
......
...@@ -53,7 +53,6 @@ ...@@ -53,7 +53,6 @@
<ul class="nav nav-sidebar"> <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_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_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_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_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> <li><a href="#resource_PlannerController_get_GET">GET /user/v1.0/planner/{id}</a></li>
...@@ -228,113 +227,6 @@ Content-Type: application/json ...@@ -228,113 +227,6 @@ Content-Type: application/json
</div> </div>
</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"> <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> <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> ...@@ -225,7 +225,6 @@ machine the keys correspond to.</span>
</td> </td>
<td class="text-nowrap"><ul class="list-unstyled"><li><samp> <span class="resource-path">/user/v1.0/planner/all</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/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/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/{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/plan/{tosca_id}</span>
...@@ -236,7 +235,6 @@ machine the keys correspond to.</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> <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">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">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">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><li><samp> <span class="label label-default resource-method">POST</span> </samp></li><li><samp> <span class="label label-default resource-method">POST</span>
......
...@@ -156,12 +156,6 @@ abstract types such as TOSCA.</span> ...@@ -156,12 +156,6 @@ abstract types such as TOSCA.</span>
</td> </td>
<td> <span class="datatype-description">This is the base class for users to own resources. Many classes extend this <td> <span class="datatype-description">This is the base class for users to own resources. Many classes extend this
class</span> 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> </td>
</tr> </tr>
<tr class="clickable-row" data-href="json_ProvisionRequest.html"> <tr class="clickable-row" data-href="json_ProvisionRequest.html">
......
...@@ -201,12 +201,6 @@ abstract types such as TOSCA.</span> ...@@ -201,12 +201,6 @@ abstract types such as TOSCA.</span>
</td> </td>
<td> <span class="datatype-description">This is the base class for users to own resources. Many classes extend this <td> <span class="datatype-description">This is the base class for users to own resources. Many classes extend this
class</span> 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> </td>
</tr> </tr>
<tr class="clickable-row" data-href="xml_ns0_provisionRequest.html"> <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> ...@@ -231,12 +231,12 @@ the DAO saves the object based on the principal how made the call</span></td>
<p class="lead">Example</p> <p class="lead">Example</p>
<pre class="prettyprint language-xml example">&lt;b-----&gt; <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;start&gt;...&lt;/start&gt;
&lt;cloudDeploymentDomain&gt;us-east-1&lt;/cloudDeploymentDomain&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;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;owner&gt;user1&lt;/owner&gt;
&lt;timestamp&gt;1499793079011&lt;/timestamp&gt; &lt;timestamp&gt;1499793079011&lt;/timestamp&gt;
&lt;/b-----&gt; &lt;/b-----&gt;
......
...@@ -161,12 +161,6 @@ abstract types such as TOSCA.</span> ...@@ -161,12 +161,6 @@ abstract types such as TOSCA.</span>
</td> </td>
<td> <span class="datatype-description">This is the base class for users to own resources. Many classes extend this <td> <span class="datatype-description">This is the base class for users to own resources. Many classes extend this
class</span> 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> </td>
</tr> </tr>
<tr class="clickable-row" data-href="json_ProvisionRequest.html"> <tr class="clickable-row" data-href="json_ProvisionRequest.html">
...@@ -344,12 +338,6 @@ abstract types such as TOSCA.</span> ...@@ -344,12 +338,6 @@ abstract types such as TOSCA.</span>
</td> </td>
<td> <span class="datatype-description">This is the base class for users to own resources. Many classes extend this <td> <span class="datatype-description">This is the base class for users to own resources. Many classes extend this
class</span> 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> </td>
</tr> </tr>
<tr class="clickable-row" data-href="xml_ns0_provisionRequest.html"> <tr class="clickable-row" data-href="xml_ns0_provisionRequest.html">
......
...@@ -72,7 +72,7 @@ ...@@ -72,7 +72,7 @@
<h1 class="page-header">Files and Libraries</h1> <h1 class="page-header">Files and Libraries</h1>
<h3 id="artifact_gwt_json_overlay">GWT JSON Overlay</h3> <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> <p> <p>
The <a href="http://code.google.com/webtoolkit/">Google Web Toolkit</a> JSON Overlay library provides the JSON Overlays that 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. can be used to access the Web service API for this application.
...@@ -91,13 +91,13 @@ ...@@ -91,13 +91,13 @@
<tbody data-link="row" class="rowlink"> <tbody data-link="row" class="rowlink">
<tr class="clickable-row" data-href="drip-api-gwt-json-overlay.jar"> <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-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> <td><span class="downloadfile-description">The sources for the GWT JSON overlay.</span></td>
</tr> </tr>
</tbody> </tbody>
</table> </table>
<h3 id="artifact_java_json_client_library">Java JSON Client Library</h3> <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> <p><p>
The Java client-side library is used to provide the set of Java objects that can be serialized 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 to/from JSON using <a href="http://jackson.codehaus.org/">Jackson</a>. This is useful for accessing the
...@@ -116,18 +116,18 @@ ...@@ -116,18 +116,18 @@
<tbody data-link="row" class="rowlink"> <tbody data-link="row" class="rowlink">
<tr class="clickable-row" data-href="drip-api-json-client.jar"> <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-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> <td><span class="downloadfile-description">The binaries for the Java JSON client library.</span></td>
</tr> </tr>
<tr class="clickable-row" data-href="drip-api-json-client-json-sources.jar"> <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-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> <td><span class="downloadfile-description">The sources for the Java JSON client library.</span></td>
</tr> </tr>
</tbody> </tbody>
</table> </table>
<h3 id="artifact_java_xml_client_library">Java XML Client Library</h3> <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> <p><p>
The Java client-side library is used to access the Web service API for this application using Java. The Java client-side library is used to access the Web service API for this application using Java.
</p> </p>
...@@ -144,18 +144,18 @@ ...@@ -144,18 +144,18 @@
<tbody data-link="row" class="rowlink"> <tbody data-link="row" class="rowlink">
<tr class="clickable-row" data-href="drip-api-xml-client.jar"> <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-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> <td><span class="downloadfile-description">The binaries for the Java XML client library.</span></td>
</tr> </tr>
<tr class="clickable-row" data-href="drip-api-xml-client-xml-sources.jar"> <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-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> <td><span class="downloadfile-description">The sources for the Java XML client library.</span></td>
</tr> </tr>
</tbody> </tbody>
</table> </table>
<h3 id="artifact_js_client_library">JavaScript Client Library</h3> <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> <p><p>
The JavaScript client-side library defines classes that can be (de)serialized to/from JSON. 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 This is useful for accessing the resources that are published by this application, but only
...@@ -184,13 +184,13 @@ ...@@ -184,13 +184,13 @@
<tbody data-link="row" class="rowlink"> <tbody data-link="row" class="rowlink">
<tr class="clickable-row" data-href="drip-api-js.zip"> <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-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> <td><span class="downloadfile-description">&nbsp;</span></td>
</tr> </tr>
</tbody> </tbody>
</table> </table>
<h3 id="artifact_php_json_client_library">PHP JSON Client Library</h3> <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> <p><p>
The PHP JSON client-side library defines the PHP classes that can be (de)serialized to/from JSON. 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 This is useful for accessing the resources that are published by this application, but only
...@@ -213,13 +213,13 @@ ...@@ -213,13 +213,13 @@
<tbody data-link="row" class="rowlink"> <tbody data-link="row" class="rowlink">
<tr class="clickable-row" data-href="drip-api-php.zip"> <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-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> <td><span class="downloadfile-description">&nbsp;</span></td>
</tr> </tr>
</tbody> </tbody>
</table> </table>
<h3 id="artifact_php_xml_client_library">PHP XML Client Library</h3> <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> <p><p>
The PHP client-side library defines the PHP classes that can be (de)serialized to/from XML. 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 This is useful for accessing the resources that are published by this application, but only
...@@ -245,13 +245,13 @@ ...@@ -245,13 +245,13 @@
<tbody data-link="row" class="rowlink"> <tbody data-link="row" class="rowlink">
<tr class="clickable-row" data-href="drip-api-php.zip"> <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-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> <td><span class="downloadfile-description">&nbsp;</span></td>
</tr> </tr>
</tbody> </tbody>
</table> </table>
<h3 id="artifact_ruby_json_client_library">Ruby JSON Client Library</h3> <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> <p><p>
The Ruby JSON client-side library defines the Ruby classes that can be (de)serialized to/from JSON. 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 This is useful for accessing the REST endpoints that are published by this application, but only
...@@ -276,7 +276,7 @@ ...@@ -276,7 +276,7 @@
<tbody data-link="row" class="rowlink"> <tbody data-link="row" class="rowlink">
<tr class="clickable-row" data-href="drip-api.rb"> <tr class="clickable-row" data-href="drip-api.rb">
<td><span class="downloadfile-name">drip-api.rb</span></td> <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> <td><span class="downloadfile-description">&nbsp;</span></td>
</tr> </tr>
</tbody> </tbody>
......
This diff is collapsed.
...@@ -233,7 +233,6 @@ machine the keys correspond to.</span> ...@@ -233,7 +233,6 @@ machine the keys correspond to.</span>
</td> </td>
<td class="text-nowrap"><ul class="list-unstyled"><li><samp> <span class="resource-path">/user/v1.0/planner/all</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/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/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/{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/plan/{tosca_id}</span>
...@@ -244,7 +243,6 @@ machine the keys correspond to.</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> <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">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">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">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><li><samp> <span class="label label-default resource-method">POST</span> </samp></li><li><samp> <span class="label label-default resource-method">POST</span>
...@@ -495,12 +493,6 @@ abstract types such as TOSCA.</span> ...@@ -495,12 +493,6 @@ abstract types such as TOSCA.</span>
</td> </td>
<td> <span class="datatype-description">This is the base class for users to own resources. Many classes extend this <td> <span class="datatype-description">This is the base class for users to own resources. Many classes extend this
class</span> 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> </td>
</tr> </tr>
<tr class="clickable-row" data-href="json_ProvisionRequest.html"> <tr class="clickable-row" data-href="json_ProvisionRequest.html">
...@@ -678,12 +670,6 @@ abstract types such as TOSCA.</span> ...@@ -678,12 +670,6 @@ abstract types such as TOSCA.</span>
</td> </td>
<td> <span class="datatype-description">This is the base class for users to own resources. Many classes extend this <td> <span class="datatype-description">This is the base class for users to own resources. Many classes extend this
class</span> 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> </td>
</tr> </tr>
<tr class="clickable-row" data-href="xml_ns0_provisionRequest.html"> <tr class="clickable-row" data-href="xml_ns0_provisionRequest.html">
......
...@@ -99,7 +99,7 @@ class</p> ...@@ -99,7 +99,7 @@ class</p>
</td> </td>
</tr> </tr>
<tr> <tr>
<td> <span class="property-name">cloudDeploymentDomain</span> <td> <span class="property-name">host</span>
</td> </td>
<td> <span class="datatype-reference">string <td> <span class="datatype-reference">string
</span> </span>
...@@ -108,7 +108,7 @@ class</p> ...@@ -108,7 +108,7 @@ class</p>
</td> </td>
</tr> </tr>
<tr> <tr>
<td> <span class="property-name">end</span> <td> <span class="property-name">start</span>
</td> </td>
<td> <span class="datatype-reference">number <td> <span class="datatype-reference">number
</span> </span>
...@@ -117,18 +117,18 @@ class</p> ...@@ -117,18 +117,18 @@ class</p>
</td> </td>
</tr> </tr>
<tr> <tr>
<td> <span class="property-name">host</span> <td> <span class="property-name">end</span>
</td> </td>
<td> <span class="datatype-reference">string <td> <span class="datatype-reference">number
</span> </span>
</td> </td>
<td> <span class="property-description"></span> <td> <span class="property-description"></span>
</td> </td>
</tr> </tr>
<tr> <tr>
<td> <span class="property-name">start</span> <td> <span class="property-name">cloudDeploymentDomain</span>
</td> </td>
<td> <span class="datatype-reference">number <td> <span class="datatype-reference">string
</span> </span>
</td> </td>
<td> <span class="property-description"></span> <td> <span class="property-description"></span>
...@@ -167,10 +167,10 @@ object is saved.</span></td> ...@@ -167,10 +167,10 @@ object is saved.</span></td>
<pre class="prettyprint language-js example">{ <pre class="prettyprint language-js example">{
&quot;vmType&quot; : &quot;...&quot;, &quot;vmType&quot; : &quot;...&quot;,
&quot;delta&quot; : 12345, &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;host&quot; : &quot;147.228.242.58&quot;,
&quot;start&quot; : 12345, &quot;start&quot; : 12345,
&quot;end&quot; : 12345,
&quot;cloudDeploymentDomain&quot; : &quot;us-east-1&quot;,
&quot;owner&quot; : &quot;user1&quot;, &quot;owner&quot; : &quot;user1&quot;,
&quot;id&quot; : &quot;58e3946e0fb4f562d84ba1ad&quot;, &quot;id&quot; : &quot;58e3946e0fb4f562d84ba1ad&quot;,
&quot;timestamp&quot; : 1499793079011 &quot;timestamp&quot; : 1499793079011
......
...@@ -69,7 +69,7 @@ class</p> ...@@ -69,7 +69,7 @@ class</p>
<dl class="dl-horizontal"> <dl class="dl-horizontal">
<dt>Subtypes</dt> <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> </dl>
<table class="table datatype-properties"> <table class="table datatype-properties">
......
...@@ -521,58 +521,6 @@ the DAO saves the object based on the principal how made the call]]> ...@@ -521,58 +521,6 @@ the DAO saves the object based on the principal how made the call]]>
</xs:sequence> </xs:sequence>
</xs:complexType> </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:complexType name="provisionRequest">
<xs:annotation> <xs:annotation>
<xs:documentation> <xs:documentation>
...@@ -823,17 +771,17 @@ class]]> ...@@ -823,17 +771,17 @@ class]]>
<xs:complexContent> <xs:complexContent>
<xs:extension base="ownedObject"> <xs:extension base="ownedObject">
<xs:sequence> <xs:sequence>
<xs:element name="delta" type="xs:dateTime" minOccurs="0"> <xs:element name="host" type="xs:string" minOccurs="0">
</xs:element> </xs:element>
<xs:element name="start" type="xs:dateTime" minOccurs="0"> <xs:element name="end" type="xs:dateTime" minOccurs="0">
</xs:element> </xs:element>
<xs:element name="vmType" type="xs:string" minOccurs="0"> <xs:element name="delta" type="xs:dateTime" minOccurs="0">
</xs:element> </xs:element>
<xs:element name="cloudDeploymentDomain" type="xs:string" minOccurs="0"> <xs:element name="vmType" type="xs:string" minOccurs="0">
</xs:element> </xs:element>
<xs:element name="end" type="xs:dateTime" minOccurs="0"> <xs:element name="start" type="xs:dateTime" minOccurs="0">
</xs:element> </xs:element>
<xs:element name="host" type="xs:string" minOccurs="0"> <xs:element name="cloudDeploymentDomain" type="xs:string" minOccurs="0">
</xs:element> </xs:element>
</xs:sequence> </xs:sequence>
</xs:extension> </xs:extension>
......
...@@ -146,10 +146,10 @@ Content-Type: application/json ...@@ -146,10 +146,10 @@ Content-Type: application/json
[ { [ {
&quot;vmType&quot; : &quot;...&quot;, &quot;vmType&quot; : &quot;...&quot;,
&quot;delta&quot; : 12345, &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;host&quot; : &quot;147.228.242.58&quot;,
&quot;start&quot; : 12345, &quot;start&quot; : 12345,
&quot;end&quot; : 12345,
&quot;cloudDeploymentDomain&quot; : &quot;us-east-1&quot;,
&quot;owner&quot; : &quot;user1&quot;, &quot;owner&quot; : &quot;user1&quot;,
&quot;id&quot; : &quot;58e3946e0fb4f562d84ba1ad&quot;, &quot;id&quot; : &quot;58e3946e0fb4f562d84ba1ad&quot;,
&quot;timestamp&quot; : 1499793079011 &quot;timestamp&quot; : 1499793079011
...@@ -516,10 +516,10 @@ Content-Type: application/json ...@@ -516,10 +516,10 @@ Content-Type: application/json
{ {
&quot;vmType&quot; : &quot;...&quot;, &quot;vmType&quot; : &quot;...&quot;,
&quot;delta&quot; : 12345, &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;host&quot; : &quot;147.228.242.58&quot;,
&quot;start&quot; : 12345, &quot;start&quot; : 12345,
&quot;end&quot; : 12345,
&quot;cloudDeploymentDomain&quot; : &quot;us-east-1&quot;,
&quot;owner&quot; : &quot;user1&quot;, &quot;owner&quot; : &quot;user1&quot;,
&quot;id&quot; : &quot;58e3946e0fb4f562d84ba1ad&quot;, &quot;id&quot; : &quot;58e3946e0fb4f562d84ba1ad&quot;,
&quot;timestamp&quot; : 1499793079011 &quot;timestamp&quot; : 1499793079011
......
...@@ -53,7 +53,6 @@ ...@@ -53,7 +53,6 @@
<ul class="nav nav-sidebar"> <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_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_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_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_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> <li><a href="#resource_PlannerController_get_GET">GET /user/v1.0/planner/{id}</a></li>
...@@ -228,113 +227,6 @@ Content-Type: application/json ...@@ -228,113 +227,6 @@ Content-Type: application/json
</div> </div>
</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"> <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> <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> ...@@ -225,7 +225,6 @@ machine the keys correspond to.</span>
</td> </td>
<td class="text-nowrap"><ul class="list-unstyled"><li><samp> <span class="resource-path">/user/v1.0/planner/all</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/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/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/{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/plan/{tosca_id}</span>
...@@ -236,7 +235,6 @@ machine the keys correspond to.</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> <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">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">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">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><li><samp> <span class="label label-default resource-method">POST</span> </samp></li><li><samp> <span class="label label-default resource-method">POST</span>
......
...@@ -156,12 +156,6 @@ abstract types such as TOSCA.</span> ...@@ -156,12 +156,6 @@ abstract types such as TOSCA.</span>
</td> </td>
<td> <span class="datatype-description">This is the base class for users to own resources. Many classes extend this <td> <span class="datatype-description">This is the base class for users to own resources. Many classes extend this
class</span> 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> </td>
</tr> </tr>
<tr class="clickable-row" data-href="json_ProvisionRequest.html"> <tr class="clickable-row" data-href="json_ProvisionRequest.html">
......
...@@ -201,12 +201,6 @@ abstract types such as TOSCA.</span> ...@@ -201,12 +201,6 @@ abstract types such as TOSCA.</span>
</td> </td>
<td> <span class="datatype-description">This is the base class for users to own resources. Many classes extend this <td> <span class="datatype-description">This is the base class for users to own resources. Many classes extend this
class</span> 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> </td>
</tr> </tr>
<tr class="clickable-row" data-href="xml_ns0_provisionRequest.html"> <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> ...@@ -231,12 +231,12 @@ the DAO saves the object based on the principal how made the call</span></td>
<p class="lead">Example</p> <p class="lead">Example</p>
<pre class="prettyprint language-xml example">&lt;b-----&gt; <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;delta&gt;...&lt;/delta&gt;
&lt;start&gt;...&lt;/start&gt;
&lt;vmType&gt;...&lt;/vmType&gt; &lt;vmType&gt;...&lt;/vmType&gt;
&lt;start&gt;...&lt;/start&gt;
&lt;cloudDeploymentDomain&gt;us-east-1&lt;/cloudDeploymentDomain&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;owner&gt;user1&lt;/owner&gt;
&lt;timestamp&gt;1499793079011&lt;/timestamp&gt; &lt;timestamp&gt;1499793079011&lt;/timestamp&gt;
&lt;/b-----&gt; &lt;/b-----&gt;
......
...@@ -29,7 +29,6 @@ import nl.uva.sne.drip.api.dao.PlanDao; ...@@ -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.BadRequestException;
import nl.uva.sne.drip.api.exception.NotFoundException; import nl.uva.sne.drip.api.exception.NotFoundException;
import nl.uva.sne.drip.api.rpc.PlannerCaller; 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.Message;
import nl.uva.sne.drip.drip.commons.data.internal.MessageParameter; import nl.uva.sne.drip.drip.commons.data.internal.MessageParameter;
import nl.uva.sne.drip.drip.commons.data.v1.external.PlanResponse; import nl.uva.sne.drip.drip.commons.data.v1.external.PlanResponse;
...@@ -38,8 +37,6 @@ import nl.uva.sne.drip.commons.utils.Converter; ...@@ -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.commons.data.v1.external.User;
import nl.uva.sne.drip.drip.converter.P2PConverter; import nl.uva.sne.drip.drip.converter.P2PConverter;
import nl.uva.sne.drip.drip.converter.SimplePlanContainer; 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.json.JSONException;
import org.springframework.beans.factory.annotation.Autowired; import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.beans.factory.annotation.Value; import org.springframework.beans.factory.annotation.Value;
...@@ -66,8 +63,7 @@ public class PlannerService { ...@@ -66,8 +63,7 @@ public class PlannerService {
@Value("${message.broker.host}") @Value("${message.broker.host}")
private String messageBrokerHost; 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)) { try (PlannerCaller planner = new PlannerCaller(messageBrokerHost)) {
Message plannerInvokationMessage = buildPlannerMessage(toscaId); Message plannerInvokationMessage = buildPlannerMessage(toscaId);
Message plannerReturnedMessage = (planner.call(plannerInvokationMessage)); Message plannerReturnedMessage = (planner.call(plannerInvokationMessage));
...@@ -88,7 +84,7 @@ public class PlannerService { ...@@ -88,7 +84,7 @@ public class PlannerService {
jsonArrayString.append("]"); jsonArrayString.append("]");
// SimplePlanContainer simplePlan = P2PConverter.convert(jsonArrayString.toString(), "vm_user", "Ubuntu 16.04", clusterType); // 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(); PlanResponse topLevel = new PlanResponse();
topLevel.setTimestamp(System.currentTimeMillis()); topLevel.setTimestamp(System.currentTimeMillis());
......
...@@ -16,6 +16,7 @@ ...@@ -16,6 +16,7 @@
package nl.uva.sne.drip.api.v0.rest; package nl.uva.sne.drip.api.v0.rest;
import java.io.IOException; import java.io.IOException;
import java.io.UnsupportedEncodingException;
import java.util.ArrayList; import java.util.ArrayList;
import java.util.List; import java.util.List;
import java.util.concurrent.TimeoutException; import java.util.concurrent.TimeoutException;
...@@ -65,16 +66,13 @@ public class PlannerController0 { ...@@ -65,16 +66,13 @@ public class PlannerController0 {
String yaml = plan0.file; String yaml = plan0.file;
yaml = yaml.replaceAll("\\\\n", "\n"); yaml = yaml.replaceAll("\\\\n", "\n");
String id = toscaService.saveYamlString(yaml, null); 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(); Result r = new Result();
r.info = ("INFO"); r.info = ("INFO");
r.status = ("Success"); r.status = ("Success");
List<Attribute> files = new ArrayList<>(); List<Attribute> files = new ArrayList<>();
Attribute e = Converter.plan1toFile(plan1); Attribute e = Converter.plan1toFile(plan1);
files.add(e); files.add(e);
for (String lowiID : plan1.getLoweLevelPlanIDs()) { for (String lowiID : plan1.getLoweLevelPlanIDs()) {
nl.uva.sne.drip.drip.commons.data.v1.external.PlanResponse lowPlan1 = plannerService.findOne(lowiID); nl.uva.sne.drip.drip.commons.data.v1.external.PlanResponse lowPlan1 = plannerService.findOne(lowiID);
e = Converter.plan1toFile(lowPlan1); e = Converter.plan1toFile(lowPlan1);
......
...@@ -37,7 +37,6 @@ import org.springframework.web.bind.annotation.RestController; ...@@ -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.PlannerService;
import nl.uva.sne.drip.api.service.ToscaService; import nl.uva.sne.drip.api.service.ToscaService;
import nl.uva.sne.drip.api.service.UserService; 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 nl.uva.sne.drip.drip.commons.data.v1.external.PlanResponse;
import org.springframework.stereotype.Controller; import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.RequestBody; import org.springframework.web.bind.annotation.RequestBody;
...@@ -88,28 +87,8 @@ public class PlannerController { ...@@ -88,28 +87,8 @@ public class PlannerController {
String plan(@PathVariable("tosca_id") String toscaId) { String plan(@PathVariable("tosca_id") String toscaId) {
try { try {
PlanResponse plan = plannerService.getPlan(toscaId, "swarm", PlanResponse plan = plannerService.getPlan(toscaId,
"vm_user", "EC2", "Ubuntu 16.04", "Virginia"); "vm_user", "EC2", "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());
if (plan == null) { if (plan == null) {
throw new NotFoundException("Could not make plan"); throw new NotFoundException("Could not make plan");
} }
...@@ -120,6 +99,24 @@ public class PlannerController { ...@@ -120,6 +99,24 @@ public class PlannerController {
return null; 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 * Gets a plan
* *
......
...@@ -85,6 +85,11 @@ public class Converter { ...@@ -85,6 +85,11 @@ public class Converter {
return jsonObject2Map(jsonObject); 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 { public static Map<String, Object> jsonObject2Map(JSONObject object) throws JSONException {
Map<String, Object> map = new HashMap(); Map<String, Object> map = new HashMap();
...@@ -115,7 +120,6 @@ public class Converter { ...@@ -115,7 +120,6 @@ public class Converter {
list.add(value); list.add(value);
} }
return list; return list;
} }
public static String json2Yml2(String jsonString) throws JSONException { public static String json2Yml2(String jsonString) throws JSONException {
......
...@@ -8,22 +8,36 @@ import java.util.UUID; ...@@ -8,22 +8,36 @@ import java.util.UUID;
import com.fasterxml.jackson.core.JsonParseException; import com.fasterxml.jackson.core.JsonParseException;
import com.fasterxml.jackson.core.JsonProcessingException; import com.fasterxml.jackson.core.JsonProcessingException;
import com.fasterxml.jackson.core.type.TypeReference;
import com.fasterxml.jackson.databind.JsonMappingException; import com.fasterxml.jackson.databind.JsonMappingException;
import com.fasterxml.jackson.databind.ObjectMapper; import com.fasterxml.jackson.databind.ObjectMapper;
import com.fasterxml.jackson.dataformat.yaml.YAMLFactory; import com.fasterxml.jackson.dataformat.yaml.YAMLFactory;
import java.util.List; 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.*;
import nl.uva.sne.drip.drip.converter.provisionerIn.EC2.*; import nl.uva.sne.drip.drip.converter.provisionerIn.EC2.*;
import nl.uva.sne.drip.drip.converter.provisionerIn.provisionerIn.EGI.*; import nl.uva.sne.drip.drip.converter.provisionerIn.provisionerIn.EGI.*;
import org.json.JSONException;
public class P2PConverter { public class P2PConverter {
public static SimplePlanContainer transfer(String plannerOutputJson, public static SimplePlanContainer transfer(String plannerOutputJson,
String userName, String OStype, String domainName, String clusterType, String cloudProvider) throws JsonParseException, JsonMappingException, IOException { 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(); TopTopology topTopology = new TopTopology();
SubTopology subTopology = null; SubTopology subTopology = null;
...@@ -35,16 +49,15 @@ public class P2PConverter { ...@@ -35,16 +49,15 @@ public class P2PConverter {
subTopology = new EGISubTopology(); subTopology = new EGISubTopology();
break; break;
default: 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; return null;
} }
SubTopologyInfo sti = new SubTopologyInfo(); SubTopologyInfo sti = new SubTopologyInfo();
sti.cloudProvider = cloudProvider; sti.cloudProvider = cloudProvider;
sti.topology = UUID.randomUUID().toString(); sti.topology = UUID.randomUUID().toString();
sti.domain = domainName; sti.domain = domainName;
sti.status = "fresh"; sti.status = "fresh";
sti.tag = "fixed"; sti.tag = provisionerScalingMode;
topTopology.publicKeyPath = null; topTopology.publicKeyPath = null;
topTopology.userName = userName; topTopology.userName = userName;
...@@ -66,13 +79,13 @@ public class P2PConverter { ...@@ -66,13 +79,13 @@ public class P2PConverter {
((EGISubTopology) subTopology).components = new ArrayList<>(); ((EGISubTopology) subTopology).components = new ArrayList<>();
break; break;
default: 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; return null;
} }
boolean firstVM = true; boolean firstVM = true;
for (int vi = 0; vi < plannerOutput.value.size(); vi++) { for (Object element : vmList) {
Value curValue = plannerOutput.value.get(vi); Map<String, Object> map = (Map<String, Object>) element;
VM curVM; VM curVM;
switch (cloudProvider.trim().toLowerCase()) { switch (cloudProvider.trim().toLowerCase()) {
case "ec2": case "ec2":
...@@ -82,63 +95,30 @@ public class P2PConverter { ...@@ -82,63 +95,30 @@ public class P2PConverter {
curVM = new EGIVM(); curVM = new EGIVM();
break; break;
default: 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; return null;
} }
curVM.name = curValue.getName(); curVM.name = (String) map.get("name");
curVM.type = "Switch.nodes.Compute"; curVM.type = (String) map.get("type");
curVM.OStype = OStype; curVM.OStype = ((Map<String, String>) map.get("os")).get("distribution") + " " + ((Map<String, Double>) map.get("os")).get("os_version");
curVM.clusterType = clusterType; // curVM.clusterType = clusterType;
curVM.dockers = curValue.getDocker(); // curVM.dockers = curValue.getDocker();
curVM.nodeType = getSize((Map<String, String>) map.get("host"), cloudProvider);
if (cloudProvider.trim().toLowerCase().equals("ec2")) {
switch (curValue.getSize().trim().toLowerCase()) { // Eth eth = new Eth();
case "small": // eth.name = "p1";
curVM.nodeType = "t2.small"; // eth.subnetName = "s1";
break; // int hostNum = 10 + vi;
case "medium": // String priAddress = "192.168.10." + hostNum;
curVM.nodeType = "t2.medium"; // eth.address = priAddress;
break; // curVM.ethernetPort = new ArrayList<Eth>();
case "large": // curVM.ethernetPort.add(eth);
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");
}
}
if (firstVM) { if (firstVM) {
curVM.role = "master"; curVM.role = "master";
firstVM = false; firstVM = false;
} else { } else {
curVM.role = "slave"; curVM.role = "slave";
} }
switch (cloudProvider.trim().toLowerCase()) { switch (cloudProvider.trim().toLowerCase()) {
case "ec2": case "ec2":
((EC2SubTopology) subTopology).components.add((EC2VM) curVM); ((EC2SubTopology) subTopology).components.add((EC2VM) curVM);
...@@ -147,11 +127,10 @@ public class P2PConverter { ...@@ -147,11 +127,10 @@ public class P2PConverter {
((EGISubTopology) subTopology).components.add((EGIVM) curVM); ((EGISubTopology) subTopology).components.add((EGIVM) curVM);
break; break;
default: 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; return null;
} }
} }
sti.subTopology = subTopology; sti.subTopology = subTopology;
topTopology.topologies = new ArrayList<>(); topTopology.topologies = new ArrayList<>();
...@@ -162,18 +141,6 @@ public class P2PConverter { ...@@ -162,18 +141,6 @@ public class P2PConverter {
return spc; 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 { private static SimplePlanContainer generateInfo(TopTopology topTopology) throws JsonProcessingException {
SimplePlanContainer spc = new SimplePlanContainer(); SimplePlanContainer spc = new SimplePlanContainer();
ObjectMapper mapper = new ObjectMapper(new YAMLFactory()); ObjectMapper mapper = new ObjectMapper(new YAMLFactory());
...@@ -193,4 +160,16 @@ public class P2PConverter { ...@@ -193,4 +160,16 @@ public class P2PConverter {
return spc; 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 { ...@@ -24,11 +24,11 @@ public abstract class VM {
//This is not case sensitive. //This is not case sensitive.
public String role; public String role;
//The name of the docker in repository, which can be "null". // //The name of the docker in repository, which can be "null".
public String dockers; // public String dockers;
////Identify the type of the docker cluster used. // ////Identify the type of the docker cluster used.
public String clusterType; // public String clusterType;
//Do not need to be the same with the node name any more. //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. //The initial value should be "null", which means the public is not determined.
......
package nl.uva.sne.drip.drip.converter; 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.File;
import java.io.IOException; import java.io.IOException;
import java.util.Map; import java.util.Map;
import org.apache.commons.io.FileUtils; import org.apache.commons.io.FileUtils;
import org.json.JSONException;
public class testConverter { 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"); File jsonFile = new File("input.json");
String json = ""; String json = "";
try { try {
...@@ -18,7 +21,7 @@ public class testConverter { ...@@ -18,7 +21,7 @@ public class testConverter {
} }
try { 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("--topLevel:\n" + spc.topLevelContents);
System.out.println("--lowLevel:"); System.out.println("--lowLevel:");
for (Map.Entry<String, String> entry : spc.lowerLevelContents.entrySet()) { for (Map.Entry<String, String> entry : spc.lowerLevelContents.entrySet()) {
......
...@@ -42,34 +42,7 @@ class DumpPlanner: ...@@ -42,34 +42,7 @@ class DumpPlanner:
if 'artifacts' in node: if 'artifacts' in node:
return node['artifacts'] 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): def get_hosted_nodes(self, node_templates):
docker_types = self.get_docker_types() docker_types = self.get_docker_types()
...@@ -84,6 +57,10 @@ class DumpPlanner: ...@@ -84,6 +57,10 @@ class DumpPlanner:
break break
return hosted_nodes return hosted_nodes
def get_properties(self, node):
if 'properties' in node:
return node['properties']
def plan(self): def plan(self):
node_templates = self.get_node_templates() node_templates = self.get_node_templates()
hosted_nodes = self.get_hosted_nodes(node_templates) hosted_nodes = self.get_hosted_nodes(node_templates)
...@@ -93,17 +70,30 @@ class DumpPlanner: ...@@ -93,17 +70,30 @@ class DumpPlanner:
vm['name'] = node['id'] vm['name'] = node['id']
vm['type'] = self.COMPUTE_TYPE vm['type'] = self.COMPUTE_TYPE
if 'requirements' in node:
for req in node['requirements']: for req in node['requirements']:
if 'host' in req and 'node_filter' in req['host']:
vm['host'] = req['host']['node_filter']['capabilities']['host'] 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['os'] = req['host']['node_filter']['capabilities']['os']
# vm['nodeType'] = 'medium' if 'host' not in vm:
# vm['dockers'] = host = {}
# artifacts = self.get_artifacts(node) host['cpu_frequency'] = '2GHz'
# if artifacts: host['mem_size'] = '4GB'
# key = next(iter(artifacts)) host['num_cpus'] = '1'
# docker_file = artifacts[key]['file'] host['disk_size'] = '10GB'
# vm['dockers'] = docker_file vm['host'] = host
# vm['cloudProvider'] 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) vms.append(vm)
print len(vms)
return vms return vms
...@@ -17,7 +17,7 @@ from os.path import expanduser ...@@ -17,7 +17,7 @@ from os.path import expanduser
def init_chanel(args): def init_chanel(args):
if len(args) > 1: if len(args) > 1:
rabbitmq_host = args[1] rabbitmq_host = args[1]
queue_name = args[2] #tosca_2_docker_compose_queue queue_name = args[2] #planner_queue
else: else:
rabbitmq_host = '127.0.0.1' rabbitmq_host = '127.0.0.1'
...@@ -48,75 +48,49 @@ def handle_delivery(message): ...@@ -48,75 +48,49 @@ def handle_delivery(message):
parsed_json_message = json.loads(message) parsed_json_message = json.loads(message)
params = parsed_json_message["parameters"] params = parsed_json_message["parameters"]
param = params[0] param = params[0]
value = param["value"] value = json.loads( param['value'])
tosca_file_name = param["name"] tosca_file_name = param["name"]
current_milli_time = lambda: int(round(time.time() * 1000)) current_milli_time = lambda: int(round(time.time() * 1000))
try: 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: except NameError:
import sys 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): if not os.path.exists(tosca_file_path):
os.makedirs(tosca_file_path) os.makedirs(tosca_file_path)
with open(tosca_file_path + "/" + tosca_file_name + ".yml", 'w') as outfile: 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 = DumpPlanner(tosca_file_path + "/" + tosca_file_name + ".yml");
planner.plan() 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)
return "response" print ("Output message: %s" % json.dumps(response))
return json.dumps(response)
if __name__ == "__main__": if __name__ == "__main__":
home = expanduser("~") # home = expanduser("~")
planner = DumpPlanner(home+"/workspace/DRIP/docs/input_tosca_files/MOG_cardif.yml") # planner = DumpPlanner(home+"/workspace/DRIP/docs/input_tosca_files/MOG_cardif.yml")
planner.plan() # planner.plan()
print sys.argv
channel = init_chanel(sys.argv)
# print sys.argv global queue_name
# channel = init_chanel(sys.argv) queue_name = sys.argv[2]
# global queue_name start(channel)
# 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: # for vm in vm_nodes:
# result = {} # 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