Commit bcb9c16f authored by Spiros Koulouzis's avatar Spiros Koulouzis

added endpoint to get container ids

parent 64511f5b
...@@ -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 November 22, 2017</p> <p class="lead">Created November 24, 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.
...@@ -97,7 +97,7 @@ ...@@ -97,7 +97,7 @@
</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 November 22, 2017</p> <p class="lead">Created November 24, 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
...@@ -127,7 +127,7 @@ ...@@ -127,7 +127,7 @@
</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 November 22, 2017</p> <p class="lead">Created November 24, 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>
...@@ -149,13 +149,13 @@ ...@@ -149,13 +149,13 @@
</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">23.28K</span></td> <td><span class="downloadfile-size">23.27K</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 November 22, 2017</p> <p class="lead">Created November 24, 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.92K</span></td> <td><span class="downloadfile-size">5.90K</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 November 22, 2017</p> <p class="lead">Created November 24, 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">6.77K</span></td> <td><span class="downloadfile-size">6.57K</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 November 22, 2017</p> <p class="lead">Created November 24, 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.61K</span></td> <td><span class="downloadfile-size">9.62K</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 November 22, 2017</p> <p class="lead">Created November 24, 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
......
This diff is collapsed.
...@@ -183,6 +183,8 @@ used by the planner.</span> ...@@ -183,6 +183,8 @@ used by the planner.</span>
</samp></li><li><samp> <span class="resource-path">/user/v1.0/deployer/sample</span> </samp></li><li><samp> <span class="resource-path">/user/v1.0/deployer/sample</span>
</samp></li><li><samp> <span class="resource-path">/user/v1.0/deployer/scale</span> </samp></li><li><samp> <span class="resource-path">/user/v1.0/deployer/scale</span>
</samp></li><li><samp> <span class="resource-path">/user/v1.0/deployer/{id}</span> </samp></li><li><samp> <span class="resource-path">/user/v1.0/deployer/{id}</span>
</samp></li><li><samp> <span class="resource-path">/user/v1.0/deployer/{id}/container_status</span>
</samp></li><li><samp> <span class="resource-path">/user/v1.0/deployer/{id}/service_names</span>
</samp></li></ul></td> </samp></li></ul></td>
<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">POST</span> </samp></li><li><samp> <span class="label label-default resource-method">POST</span>
...@@ -190,6 +192,8 @@ used by the planner.</span> ...@@ -190,6 +192,8 @@ used by the planner.</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">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></ul></td> </samp></li></ul></td>
<td> <span class="resource-description">This controller is responsible for deploying a cluster on provisoned <td> <span class="resource-description">This controller is responsible for deploying a cluster on provisoned
resources.</span> resources.</span>
......
...@@ -81,34 +81,34 @@ class</p> ...@@ -81,34 +81,34 @@ class</p>
</thead> </thead>
<tbody> <tbody>
<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">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">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>
</td> </td>
</tr> </tr>
<tr> <tr>
<td> <span class="property-name">delta</span> <td> <span class="property-name">end</span>
</td> </td>
<td> <span class="datatype-reference">number <td> <span class="datatype-reference">number
</span> </span>
...@@ -117,16 +117,16 @@ class</p> ...@@ -117,16 +117,16 @@ class</p>
</td> </td>
</tr> </tr>
<tr> <tr>
<td> <span class="property-name">vmType</span> <td> <span class="property-name">delta</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">cloudDeploymentDomain</span> <td> <span class="property-name">vmType</span>
</td> </td>
<td> <span class="datatype-reference">string <td> <span class="datatype-reference">string
</span> </span>
...@@ -167,12 +167,12 @@ No need to set during a POST</span></td> ...@@ -167,12 +167,12 @@ No need to set during a POST</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;cloudDeploymentDomain&quot; : &quot;us-east-1&quot;,
&quot;host&quot; : &quot;147.228.242.58&quot;, &quot;host&quot; : &quot;147.228.242.58&quot;,
&quot;end&quot; : 12345, &quot;end&quot; : 12345,
&quot;start&quot; : 12345,
&quot;delta&quot; : 12345, &quot;delta&quot; : 12345,
&quot;vmType&quot; : &quot;...&quot;, &quot;vmType&quot; : &quot;...&quot;,
&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_BenchmarkResult.html">BenchmarkResult</a>, <a href="json_CloudCredentials.html">CloudCredentials</a>, <a href="json_DeployResponse.html">DeployResponse</a>, <a href="json_DRIPLogRecord.html">DRIPLogRecord</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_MonitorringMessage.html">MonitorringMessage</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_DRIPLogRecord.html">DRIPLogRecord</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_MonitorringMessage.html">MonitorringMessage</a>, <a href="json_ProvisionResponse.html">ProvisionResponse</a></dd>
</dl> </dl>
<table class="table datatype-properties"> <table class="table datatype-properties">
......
...@@ -821,18 +821,18 @@ class]]> ...@@ -821,18 +821,18 @@ 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>
<xs:element name="host" type="xs:string" minOccurs="0">
</xs:element>
<xs:element name="end" type="xs:dateTime" minOccurs="0"> <xs:element name="end" type="xs:dateTime" minOccurs="0">
</xs:element> </xs:element>
<xs:element name="cloudDeploymentDomain" type="xs:string" 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="host" type="xs:string" minOccurs="0">
</xs:element>
<xs:element name="vmType" type="xs:string" minOccurs="0"> <xs:element name="vmType" type="xs:string" minOccurs="0">
</xs:element> </xs:element>
<xs:element name="delta" type="xs:dateTime" minOccurs="0">
</xs:element>
<xs:element name="cloudDeploymentDomain" 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;cloudDeploymentDomain&quot; : &quot;us-east-1&quot;,
&quot;host&quot; : &quot;147.228.242.58&quot;, &quot;host&quot; : &quot;147.228.242.58&quot;,
&quot;end&quot; : 12345, &quot;end&quot; : 12345,
&quot;start&quot; : 12345,
&quot;delta&quot; : 12345, &quot;delta&quot; : 12345,
&quot;vmType&quot; : &quot;...&quot;, &quot;vmType&quot; : &quot;...&quot;,
&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;cloudDeploymentDomain&quot; : &quot;us-east-1&quot;,
&quot;host&quot; : &quot;147.228.242.58&quot;, &quot;host&quot; : &quot;147.228.242.58&quot;,
&quot;end&quot; : 12345, &quot;end&quot; : 12345,
&quot;start&quot; : 12345,
&quot;delta&quot; : 12345, &quot;delta&quot; : 12345,
&quot;vmType&quot; : &quot;...&quot;, &quot;vmType&quot; : &quot;...&quot;,
&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
......
...@@ -175,6 +175,8 @@ used by the planner.</span> ...@@ -175,6 +175,8 @@ used by the planner.</span>
</samp></li><li><samp> <span class="resource-path">/user/v1.0/deployer/sample</span> </samp></li><li><samp> <span class="resource-path">/user/v1.0/deployer/sample</span>
</samp></li><li><samp> <span class="resource-path">/user/v1.0/deployer/scale</span> </samp></li><li><samp> <span class="resource-path">/user/v1.0/deployer/scale</span>
</samp></li><li><samp> <span class="resource-path">/user/v1.0/deployer/{id}</span> </samp></li><li><samp> <span class="resource-path">/user/v1.0/deployer/{id}</span>
</samp></li><li><samp> <span class="resource-path">/user/v1.0/deployer/{id}/container_status</span>
</samp></li><li><samp> <span class="resource-path">/user/v1.0/deployer/{id}/service_names</span>
</samp></li></ul></td> </samp></li></ul></td>
<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">POST</span> </samp></li><li><samp> <span class="label label-default resource-method">POST</span>
...@@ -182,6 +184,8 @@ used by the planner.</span> ...@@ -182,6 +184,8 @@ used by the planner.</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">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></ul></td> </samp></li></ul></td>
<td> <span class="resource-description">This controller is responsible for deploying a cluster on provisoned <td> <span class="resource-description">This controller is responsible for deploying a cluster on provisoned
resources.</span> resources.</span>
......
...@@ -220,12 +220,12 @@ It is created automatically. No need to set during a POST</span></td> ...@@ -220,12 +220,12 @@ It is created automatically. No need to set during a POST</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;delta&gt;...&lt;/delta&gt;
&lt;host&gt;147.228.242.58&lt;/host&gt;
&lt;end&gt;...&lt;/end&gt; &lt;end&gt;...&lt;/end&gt;
&lt;cloudDeploymentDomain&gt;us-east-1&lt;/cloudDeploymentDomain&gt;
&lt;start&gt;...&lt;/start&gt; &lt;start&gt;...&lt;/start&gt;
&lt;host&gt;147.228.242.58&lt;/host&gt;
&lt;vmType&gt;...&lt;/vmType&gt; &lt;vmType&gt;...&lt;/vmType&gt;
&lt;delta&gt;...&lt;/delta&gt;
&lt;cloudDeploymentDomain&gt;us-east-1&lt;/cloudDeploymentDomain&gt;
&lt;owner&gt;user1&lt;/owner&gt; &lt;owner&gt;user1&lt;/owner&gt;
&lt;/b-----&gt; &lt;/b-----&gt;
</pre> </pre>
......
...@@ -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 November 22, 2017</p> <p class="lead">Created November 24, 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.
...@@ -97,7 +97,7 @@ ...@@ -97,7 +97,7 @@
</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 November 22, 2017</p> <p class="lead">Created November 24, 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
...@@ -127,7 +127,7 @@ ...@@ -127,7 +127,7 @@
</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 November 22, 2017</p> <p class="lead">Created November 24, 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>
...@@ -149,13 +149,13 @@ ...@@ -149,13 +149,13 @@
</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">23.28K</span></td> <td><span class="downloadfile-size">23.27K</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 November 22, 2017</p> <p class="lead">Created November 24, 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.92K</span></td> <td><span class="downloadfile-size">5.90K</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 November 22, 2017</p> <p class="lead">Created November 24, 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">6.77K</span></td> <td><span class="downloadfile-size">6.57K</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 November 22, 2017</p> <p class="lead">Created November 24, 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.61K</span></td> <td><span class="downloadfile-size">9.62K</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 November 22, 2017</p> <p class="lead">Created November 24, 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
......
This diff is collapsed.
...@@ -183,6 +183,8 @@ used by the planner.</span> ...@@ -183,6 +183,8 @@ used by the planner.</span>
</samp></li><li><samp> <span class="resource-path">/user/v1.0/deployer/sample</span> </samp></li><li><samp> <span class="resource-path">/user/v1.0/deployer/sample</span>
</samp></li><li><samp> <span class="resource-path">/user/v1.0/deployer/scale</span> </samp></li><li><samp> <span class="resource-path">/user/v1.0/deployer/scale</span>
</samp></li><li><samp> <span class="resource-path">/user/v1.0/deployer/{id}</span> </samp></li><li><samp> <span class="resource-path">/user/v1.0/deployer/{id}</span>
</samp></li><li><samp> <span class="resource-path">/user/v1.0/deployer/{id}/container_status</span>
</samp></li><li><samp> <span class="resource-path">/user/v1.0/deployer/{id}/service_names</span>
</samp></li></ul></td> </samp></li></ul></td>
<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">POST</span> </samp></li><li><samp> <span class="label label-default resource-method">POST</span>
...@@ -190,6 +192,8 @@ used by the planner.</span> ...@@ -190,6 +192,8 @@ used by the planner.</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">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></ul></td> </samp></li></ul></td>
<td> <span class="resource-description">This controller is responsible for deploying a cluster on provisoned <td> <span class="resource-description">This controller is responsible for deploying a cluster on provisoned
resources.</span> resources.</span>
......
...@@ -81,16 +81,16 @@ class</p> ...@@ -81,16 +81,16 @@ class</p>
</thead> </thead>
<tbody> <tbody>
<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">vmType</span> <td> <span class="property-name">host</span>
</td> </td>
<td> <span class="datatype-reference">string <td> <span class="datatype-reference">string
</span> </span>
...@@ -99,34 +99,34 @@ class</p> ...@@ -99,34 +99,34 @@ class</p>
</td> </td>
</tr> </tr>
<tr> <tr>
<td> <span class="property-name">end</span> <td> <span class="property-name">vmType</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">cloudDeploymentDomain</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">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">start</span> <td> <span class="property-name">delta</span>
</td> </td>
<td> <span class="datatype-reference">number <td> <span class="datatype-reference">number
</span> </span>
...@@ -167,12 +167,12 @@ No need to set during a POST</span></td> ...@@ -167,12 +167,12 @@ No need to set during a POST</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;end&quot; : 12345,
&quot;host&quot; : &quot;147.228.242.58&quot;, &quot;host&quot; : &quot;147.228.242.58&quot;,
&quot;vmType&quot; : &quot;...&quot;, &quot;vmType&quot; : &quot;...&quot;,
&quot;end&quot; : 12345, &quot;start&quot; : 12345,
&quot;cloudDeploymentDomain&quot; : &quot;us-east-1&quot;, &quot;cloudDeploymentDomain&quot; : &quot;us-east-1&quot;,
&quot;delta&quot; : 12345, &quot;delta&quot; : 12345,
&quot;start&quot; : 12345,
&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_BenchmarkResult.html">BenchmarkResult</a>, <a href="json_CloudCredentials.html">CloudCredentials</a>, <a href="json_DeployResponse.html">DeployResponse</a>, <a href="json_DRIPLogRecord.html">DRIPLogRecord</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>, <a href="json_MonitorringMessage.html">MonitorringMessage</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_DRIPLogRecord.html">DRIPLogRecord</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_MonitorringMessage.html">MonitorringMessage</a>, <a href="json_ProvisionResponse.html">ProvisionResponse</a></dd>
</dl> </dl>
<table class="table datatype-properties"> <table class="table datatype-properties">
......
...@@ -821,15 +821,15 @@ class]]> ...@@ -821,15 +821,15 @@ 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="end" type="xs:dateTime" minOccurs="0"> <xs:element name="end" 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="delta" 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="delta" type="xs:dateTime" minOccurs="0"> <xs:element name="vmType" type="xs:string" minOccurs="0">
</xs:element> </xs:element>
<xs:element name="host" type="xs:string" minOccurs="0"> <xs:element name="host" type="xs:string" minOccurs="0">
</xs:element> </xs:element>
......
...@@ -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;end&quot; : 12345,
&quot;host&quot; : &quot;147.228.242.58&quot;, &quot;host&quot; : &quot;147.228.242.58&quot;,
&quot;vmType&quot; : &quot;...&quot;, &quot;vmType&quot; : &quot;...&quot;,
&quot;end&quot; : 12345, &quot;start&quot; : 12345,
&quot;cloudDeploymentDomain&quot; : &quot;us-east-1&quot;, &quot;cloudDeploymentDomain&quot; : &quot;us-east-1&quot;,
&quot;delta&quot; : 12345, &quot;delta&quot; : 12345,
&quot;start&quot; : 12345,
&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;end&quot; : 12345,
&quot;host&quot; : &quot;147.228.242.58&quot;, &quot;host&quot; : &quot;147.228.242.58&quot;,
&quot;vmType&quot; : &quot;...&quot;, &quot;vmType&quot; : &quot;...&quot;,
&quot;end&quot; : 12345, &quot;start&quot; : 12345,
&quot;cloudDeploymentDomain&quot; : &quot;us-east-1&quot;, &quot;cloudDeploymentDomain&quot; : &quot;us-east-1&quot;,
&quot;delta&quot; : 12345, &quot;delta&quot; : 12345,
&quot;start&quot; : 12345,
&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
......
This diff is collapsed.
...@@ -175,6 +175,8 @@ used by the planner.</span> ...@@ -175,6 +175,8 @@ used by the planner.</span>
</samp></li><li><samp> <span class="resource-path">/user/v1.0/deployer/sample</span> </samp></li><li><samp> <span class="resource-path">/user/v1.0/deployer/sample</span>
</samp></li><li><samp> <span class="resource-path">/user/v1.0/deployer/scale</span> </samp></li><li><samp> <span class="resource-path">/user/v1.0/deployer/scale</span>
</samp></li><li><samp> <span class="resource-path">/user/v1.0/deployer/{id}</span> </samp></li><li><samp> <span class="resource-path">/user/v1.0/deployer/{id}</span>
</samp></li><li><samp> <span class="resource-path">/user/v1.0/deployer/{id}/container_status</span>
</samp></li><li><samp> <span class="resource-path">/user/v1.0/deployer/{id}/service_names</span>
</samp></li></ul></td> </samp></li></ul></td>
<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">POST</span> </samp></li><li><samp> <span class="label label-default resource-method">POST</span>
...@@ -182,6 +184,8 @@ used by the planner.</span> ...@@ -182,6 +184,8 @@ used by the planner.</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">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></ul></td> </samp></li></ul></td>
<td> <span class="resource-description">This controller is responsible for deploying a cluster on provisoned <td> <span class="resource-description">This controller is responsible for deploying a cluster on provisoned
resources.</span> resources.</span>
......
...@@ -220,11 +220,11 @@ It is created automatically. No need to set during a POST</span></td> ...@@ -220,11 +220,11 @@ It is created automatically. No need to set during a POST</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;end&gt;...&lt;/end&gt; &lt;end&gt;...&lt;/end&gt;
&lt;cloudDeploymentDomain&gt;us-east-1&lt;/cloudDeploymentDomain&gt; &lt;cloudDeploymentDomain&gt;us-east-1&lt;/cloudDeploymentDomain&gt;
&lt;start&gt;...&lt;/start&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;host&gt;147.228.242.58&lt;/host&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;/b-----&gt; &lt;/b-----&gt;
......
...@@ -626,4 +626,51 @@ public class DeployService { ...@@ -626,4 +626,51 @@ public class DeployService {
return info; return info;
} }
public List<String> getServiceNames(String id) throws JSONException, IOException, TimeoutException, InterruptedException {
DeployResponse resp = findOne(id);
if (resp.getManagerType().equals("swarm")) {
Map<String, Object> swarmInfo = getSwarmInfo(resp);
List< Map<String, Object>> stackInfo = (List) swarmInfo.get("stack_info");
List<String> serviceNames = new ArrayList<>();
for (Map<String, Object> map : stackInfo) {
if (map.containsKey("name")) {
serviceNames.add(((String) map.get("name")));
}
}
return serviceNames;
}
return null;
}
public DeployResponse getContainersStatus(String id, String serviceName) throws JSONException, IOException, TimeoutException, InterruptedException {
DeployResponse resp = findOne(id);
Map<String, Object> result = new HashMap<>();
if (resp.getManagerType().equals("swarm")) {
Map<String, Object> swarmInfo = getSwarmInfo(resp);
List< Map<String, Object>> servicesInfo = (List) swarmInfo.get("services_info");
List<String> taskIDs = new ArrayList<>();
for (Map<String, Object> map : servicesInfo) {
if (map.containsKey("name") && ((String) map.get("name")).startsWith(serviceName)) {
taskIDs.add(((String) map.get("ID")));
}
}
List< Map<String, Object>> inspecInfo = (List) swarmInfo.get("inspect_info");
List< Map<String, Object>> inspecInfoResult = new ArrayList<>();
for (String taskID : taskIDs) {
for (Map<String, Object> map : inspecInfo) {
if (map.containsKey("ID") && ((String) map.get("ID")).startsWith(taskID)) {
inspecInfoResult.add((Map<String, Object>) map.get("Status"));
}
}
}
result.put("inspect_info", inspecInfoResult);
resp.setManagerInfo(result);
resp.setKey(null);
resp.setScale(null);
}
return resp;
}
} }
...@@ -42,6 +42,7 @@ import org.json.JSONException; ...@@ -42,6 +42,7 @@ import org.json.JSONException;
import org.springframework.stereotype.Controller; import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.PathVariable; import org.springframework.web.bind.annotation.PathVariable;
import org.springframework.web.bind.annotation.RequestBody; import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestParam;
/** /**
* This controller is responsible for deploying a cluster on provisoned * This controller is responsible for deploying a cluster on provisoned
...@@ -152,6 +153,64 @@ public class DeployController { ...@@ -152,6 +153,64 @@ public class DeployController {
return resp; return resp;
} }
/**
* For a given service name returns the container status on all nodes
*
* @param id
* @param serviceName
* @return
*/
@RequestMapping(value = "/{id}/container_status", method = RequestMethod.GET, params = {"service_name"})
@RolesAllowed({UserService.USER, UserService.ADMIN})
@StatusCodes({
@ResponseCode(code = 404, condition = "Object not found"),
@ResponseCode(code = 200, condition = "Object found")
})
public @ResponseBody
DeployResponse getContainerStatus(@PathVariable("id") String id,
@RequestParam(value = "service_name", required = true) String serviceName) {
DeployResponse resp = null;
try {
resp = deployService.getContainersStatus(id, serviceName);
} catch (JSONException | IOException | TimeoutException | InterruptedException ex) {
Logger.getLogger(DeployController.class.getName()).log(Level.SEVERE, null, ex);
}
if (resp == null) {
throw new NotFoundException();
}
return resp;
}
/**
* Returns the service names running on the cluster
* @param id
* @return
*/
@RequestMapping(value = "/{id}/service_names", method = RequestMethod.GET)
@RolesAllowed({UserService.USER, UserService.ADMIN})
@StatusCodes({
@ResponseCode(code = 404, condition = "Object not found"),
@ResponseCode(code = 200, condition = "Object found")
})
public @ResponseBody
List<String> getContainerStatus(@PathVariable("id") String id) {
List<String> names = null;
try {
names = deployService.getServiceNames(id);
} catch (JSONException | IOException | TimeoutException | InterruptedException ex) {
Logger.getLogger(DeployController.class.getName()).log(Level.SEVERE, null, ex);
}
if (names == null) {
throw new NotFoundException();
}
return names;
}
/** /**
* Gets the IDs of all the stored deployment descriptions. * Gets the IDs of all the stored deployment descriptions.
* *
......
...@@ -72,6 +72,7 @@ def docker_check(vm, compose_name): ...@@ -72,6 +72,7 @@ def docker_check(vm, compose_name):
stdin, stdout, stderr = ssh.exec_command(cmd) stdin, stdout, stderr = ssh.exec_command(cmd)
stack_ps_resp = stdout.readlines() stack_ps_resp = stdout.readlines()
services_info = [] services_info = []
services_ids = []
nodes_hostname = set() nodes_hostname = set()
for i in stack_ps_resp: for i in stack_ps_resp:
line = get_resp_line(i) line = get_resp_line(i)
...@@ -88,6 +89,7 @@ def docker_check(vm, compose_name): ...@@ -88,6 +89,7 @@ def docker_check(vm, compose_name):
json_dict = json.loads(json_dict) json_dict = json.loads(json_dict)
nodes_hostname.add(json_dict['node']) nodes_hostname.add(json_dict['node'])
services_info.append(json_dict) services_info.append(json_dict)
services_ids.append(json_dict['ID'])
json_response ['services_info'] = services_info json_response ['services_info'] = services_info
stack_format = '\'{"ID":"{{.ID}}","name":"{{.Name}}","mode":"{{.Mode}}","replicas":"{{.Replicas}}","image":"{{.Image}}"}\'' stack_format = '\'{"ID":"{{.ID}}","name":"{{.Name}}","mode":"{{.Mode}}","replicas":"{{.Replicas}}","image":"{{.Image}}"}\''
...@@ -102,15 +104,12 @@ def docker_check(vm, compose_name): ...@@ -102,15 +104,12 @@ def docker_check(vm, compose_name):
json_dict = json.loads(line) json_dict = json.loads(line)
if not isinstance(json_dict, dict): if not isinstance(json_dict, dict):
json_dict = json.loads(json_dict) json_dict = json.loads(json_dict)
stack_info.append(json_dict) stack_info.append(json_dict)
json_response ['stack_info'] = stack_info json_response ['stack_info'] = stack_info
cmd = 'sudo docker node inspect ' cmd = 'sudo docker node inspect '
for hostname in nodes_hostname: for hostname in nodes_hostname:
cmd += ' '+hostname cmd += ' '+hostname
stdin, stdout, stderr = ssh.exec_command(cmd) stdin, stdout, stderr = ssh.exec_command(cmd)
inspect_resp = stdout.readlines() inspect_resp = stdout.readlines()
...@@ -119,11 +118,29 @@ def docker_check(vm, compose_name): ...@@ -119,11 +118,29 @@ def docker_check(vm, compose_name):
line = i.rstrip("\n\r").encode() line = i.rstrip("\n\r").encode()
if line: if line:
response_str+=line response_str+=line
json_dict = {} json_dict = {}
response_str = response_str.rstrip("\n\r").strip(' \t\n\r').strip().encode('string_escape') response_str = response_str.rstrip("\n\r").strip(' \t\n\r').strip().encode('string_escape')
json_dict = json.loads(response_str) json_dict = json.loads(response_str)
json_response['nodes_info'] = json_dict json_response['nodes_info'] = json_dict
#"{{.Status.ContainerStatus.ContainerID}}"
cmd = 'sudo docker inspect '
for id in services_ids:
cmd += ' '+id
stdin, stdout, stderr = ssh.exec_command(cmd)
inspect_resp = stdout.readlines()
response_str = ""
for i in inspect_resp:
line = i.rstrip("\n\r").encode()
if line:
response_str+=line
json_dict = {}
response_str = response_str.rstrip("\n\r").strip(' \t\n\r').strip().encode('string_escape')
json_dict = json.loads(response_str)
json_response['inspect_info'] = json_dict
logger.info("Finished docker info services on: "+vm.ip) logger.info("Finished docker info services on: "+vm.ip)
except Exception as e: except Exception as e:
......
...@@ -21,6 +21,7 @@ import paramiko, os ...@@ -21,6 +21,7 @@ import paramiko, os
import threading import threading
import logging import logging
from drip_logging.drip_logging_handler import * from drip_logging.drip_logging_handler import *
import multiprocessing
logger = logging.getLogger(__name__) logger = logging.getLogger(__name__)
if not getattr(logger, 'handler_set', None): if not getattr(logger, 'handler_set', None):
...@@ -34,7 +35,7 @@ if not getattr(logger, 'handler_set', None): ...@@ -34,7 +35,7 @@ if not getattr(logger, 'handler_set', None):
retry=0 retry=0
def install_engine(vm): def install_engine(vm,return_dict):
try: try:
logger.info("Starting docker engine installation on: "+(vm.ip)) logger.info("Starting docker engine installation on: "+(vm.ip))
paramiko.util.log_to_file("deployment.log") paramiko.util.log_to_file("deployment.log")
...@@ -47,6 +48,7 @@ def install_engine(vm): ...@@ -47,6 +48,7 @@ def install_engine(vm):
for i in temp_list: temp_str += i for i in temp_list: temp_str += i
if temp_str.find("docker") != -1: if temp_str.find("docker") != -1:
logger.info("Docker engine arleady installated on: "+(vm.ip)+" Skiping") logger.info("Docker engine arleady installated on: "+(vm.ip)+" Skiping")
return_dict[vm.ip] = "SUCCESS"
return "SUCCESS" return "SUCCESS"
sftp = ssh.open_sftp() sftp = ssh.open_sftp()
sftp.chdir('/tmp/') sftp.chdir('/tmp/')
...@@ -61,18 +63,32 @@ def install_engine(vm): ...@@ -61,18 +63,32 @@ def install_engine(vm):
if retry < 10: if retry < 10:
logger.warning(vm.ip + " " + str(e)+". Retrying") logger.warning(vm.ip + " " + str(e)+". Retrying")
retry+=1 retry+=1
return install_engine(vm) return install_engine(vm,procnum)
logger.error(vm.ip + " " + str(e)) logger.error(vm.ip + " " + str(e))
return_dict[vm.ip] = "ERROR:"+vm.ip+" "+str(e)
return "ERROR:"+vm.ip+" "+str(e) return "ERROR:"+vm.ip+" "+str(e)
ssh.close() ssh.close()
retry=0 retry=0
return_dict[vm.ip] = "SUCCESS"
return "SUCCESS" return "SUCCESS"
def run(vm_list,rabbitmq_host,owner): def run(vm_list,rabbitmq_host,owner):
rabbit = DRIPLoggingHandler(host=rabbitmq_host, port=5672,user=owner) rabbit = DRIPLoggingHandler(host=rabbitmq_host, port=5672,user=owner)
logger.addHandler(rabbit) logger.addHandler(rabbit)
manager = multiprocessing.Manager()
return_dict = manager.dict()
jobs = []
for i in vm_list: for i in vm_list:
ret = install_engine(i) #ret = install_engine(i)
if "ERROR" in ret: return ret p = multiprocessing.Process(target=install_engine, args=(i,return_dict,))
jobs.append(p)
p.start()
for proc in jobs:
proc.join()
if "ERROR" in return_dict.values(): return "ERROR"
#if "ERROR" in ret: return ret
return "SUCCESS" return "SUCCESS"
\ No newline at end of file
...@@ -21,6 +21,7 @@ import paramiko, os ...@@ -21,6 +21,7 @@ import paramiko, os
from vm_info import VmInfo from vm_info import VmInfo
import logging import logging
from drip_logging.drip_logging_handler import * from drip_logging.drip_logging_handler import *
import multiprocessing
logger = logging.getLogger(__name__) logger = logging.getLogger(__name__)
if not getattr(logger, 'handler_set', None): if not getattr(logger, 'handler_set', None):
......
...@@ -21,6 +21,8 @@ import paramiko, os ...@@ -21,6 +21,8 @@ import paramiko, os
from vm_info import VmInfo from vm_info import VmInfo
import logging import logging
from drip_logging.drip_logging_handler import * from drip_logging.drip_logging_handler import *
import multiprocessing
logger = logging.getLogger(__name__) logger = logging.getLogger(__name__)
...@@ -71,7 +73,7 @@ def install_manager(vm): ...@@ -71,7 +73,7 @@ def install_manager(vm):
retry=0 retry=0
return ret return ret
def install_worker(join_cmd, vm): def install_worker(join_cmd, vm,return_dict):
try: try:
logger.info("Starting swarm worker installation on: "+(vm.ip)) logger.info("Starting swarm worker installation on: "+(vm.ip))
paramiko.util.log_to_file("deployment.log") paramiko.util.log_to_file("deployment.log")
...@@ -82,6 +84,7 @@ def install_worker(join_cmd, vm): ...@@ -82,6 +84,7 @@ def install_worker(join_cmd, vm):
temp_list1 = stdout.readlines() temp_list1 = stdout.readlines()
if temp_list1[0].find("Swarm: active") != -1: if temp_list1[0].find("Swarm: active") != -1:
logger.info("Swarm worker arleady installated on: "+(vm.ip)+" Skiping") logger.info("Swarm worker arleady installated on: "+(vm.ip)+" Skiping")
return_dict[vm.ip] = "SUCCESS"
return "SUCCESS" return "SUCCESS"
stdin, stdout, stderr = ssh.exec_command("sudo docker swarm leave --force") stdin, stdout, stderr = ssh.exec_command("sudo docker swarm leave --force")
stdout.read() stdout.read()
...@@ -95,14 +98,18 @@ def install_worker(join_cmd, vm): ...@@ -95,14 +98,18 @@ def install_worker(join_cmd, vm):
retry+=1 retry+=1
return install_worker(join_cmd, vm) return install_worker(join_cmd, vm)
logger.error(vm.ip + " " + str(e)) logger.error(vm.ip + " " + str(e))
return_dict[vm.ip] = "ERROR:"+vm.ip+" "+str(e)
return "ERROR:" + vm.ip + " " + str(e) return "ERROR:" + vm.ip + " " + str(e)
ssh.close() ssh.close()
retry=0 retry=0
return_dict[vm.ip] = "SUCCESS"
return "SUCCESS" return "SUCCESS"
def run(vm_list,rabbitmq_host,owner): def run(vm_list,rabbitmq_host,owner):
rabbit = DRIPLoggingHandler(host=rabbitmq_host, port=5672,user=owner) rabbit = DRIPLoggingHandler(host=rabbitmq_host, port=5672,user=owner)
logger.addHandler(rabbit) logger.addHandler(rabbit)
for i in vm_list: for i in vm_list:
if i.role == "master": if i.role == "master":
join_cmd = install_manager(i) join_cmd = install_manager(i)
...@@ -115,11 +122,21 @@ def run(vm_list,rabbitmq_host,owner): ...@@ -115,11 +122,21 @@ def run(vm_list,rabbitmq_host,owner):
swarm_string = swarm_file.read() swarm_string = swarm_file.read()
swarm_file.close() swarm_file.close()
break break
manager = multiprocessing.Manager()
return_dict = manager.dict()
jobs = []
for i in vm_list: for i in vm_list:
if i.role == "slave": if i.role == "slave":
worker_cmd = install_worker(join_cmd, i) p = multiprocessing.Process(target=install_worker, args=(join_cmd, i,return_dict,))
if "ERROR:" in worker_cmd: jobs.append(p)
return worker_cmd p.start()
#worker_cmd = install_worker(join_cmd, i)
#if "ERROR:" in worker_cmd:
#return worker_cmd
for proc in jobs:
proc.join()
if "ERROR" in return_dict.values(): return "ERROR"
return swarm_string return swarm_string
\ No newline at end of file
...@@ -59,7 +59,7 @@ class DockerComposeTransformer: ...@@ -59,7 +59,7 @@ class DockerComposeTransformer:
return node['properties'] return node['properties']
def get_enviroment_vars(self,properties): def get_enviroment_vars(self,properties):
environments = [] environments = {}
for prop in properties: for prop in properties:
if prop == 'Environment_variables' or prop == 'Live_variables' or prop =='Environment': if prop == 'Environment_variables' or prop == 'Live_variables' or prop =='Environment':
for var in properties[prop]: for var in properties[prop]:
...@@ -67,11 +67,11 @@ class DockerComposeTransformer: ...@@ -67,11 +67,11 @@ class DockerComposeTransformer:
for key in properties[prop]['Environment']: for key in properties[prop]['Environment']:
environment ={} environment ={}
environment[str(key)] = str(properties[prop]['Environment'][key]) environment[str(key)] = str(properties[prop]['Environment'][key])
environments.append(environment) environments.update(environment)
else: else:
environment ={} environment ={}
environment[str(var)] = str(properties[prop][var]) environment[str(var)] = str(properties[prop][var])
environments.append(environment) environments.update(environment)
# environments.append(str(var)+"="+str(properties[prop][var])) # environments.append(str(var)+"="+str(properties[prop][var]))
# if properties[prop] and not isinstance(properties[prop],dict): # if properties[prop] and not isinstance(properties[prop],dict):
# environment.append(prop+"="+str(properties[prop])) # environment.append(prop+"="+str(properties[prop]))
...@@ -169,10 +169,7 @@ class DockerComposeTransformer: ...@@ -169,10 +169,7 @@ class DockerComposeTransformer:
properties = self.get_properties(node_templates[node_template_key]) properties = self.get_properties(node_templates[node_template_key])
environment = self.get_enviroment_vars(properties) environment = self.get_enviroment_vars(properties)
if environment: if environment:
for env in environment: service['environment'] = environment
service['environment'] = env
# service['environment'] = environment
port_maps = self.get_port_map(properties) port_maps = self.get_port_map(properties)
if port_maps: if port_maps:
service['ports'] = port_maps service['ports'] = port_maps
......
...@@ -99,14 +99,14 @@ def handle_delivery(message): ...@@ -99,14 +99,14 @@ def handle_delivery(message):
return 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/BEIAv3.yml") # planner = DumpPlanner(home+"/workspace/DRIP/docs/input_tosca_files/BEIAv3.yml")
print planner.plan() # print planner.plan()
# logger.info("Input args: " + sys.argv[0] + ' ' + sys.argv[1] + ' ' + sys.argv[2]) logger.info("Input args: " + sys.argv[0] + ' ' + sys.argv[1] + ' ' + sys.argv[2])
# channel = init_chanel(sys.argv) channel = init_chanel(sys.argv)
# global queue_name global queue_name
# queue_name = sys.argv[2] queue_name = sys.argv[2]
# start(channel) start(channel)
# #
......
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