Commit afb495a3 authored by Spiros Koulouzis's avatar Spiros Koulouzis

Added nice yml format for converter

parent f1c6b279
...@@ -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 4, 2017</p> <p class="lead">Created November 7, 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">14.46K</span></td> <td><span class="downloadfile-size">14.45K</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 November 4, 2017</p> <p class="lead">Created November 7, 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 4, 2017</p> <p class="lead">Created November 7, 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>
...@@ -155,7 +155,7 @@ ...@@ -155,7 +155,7 @@
</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 4, 2017</p> <p class="lead">Created November 7, 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">6.04K</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 4, 2017</p> <p class="lead">Created November 7, 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.67K</span></td> <td><span class="downloadfile-size">6.74K</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 4, 2017</p> <p class="lead">Created November 7, 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 4, 2017</p> <p class="lead">Created November 7, 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.
...@@ -81,25 +81,25 @@ class</p> ...@@ -81,25 +81,25 @@ 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>
</td> </td>
</tr> </tr>
<tr> <tr>
<td> <span class="property-name">cloudDeploymentDomain</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">vmType</span> <td> <span class="property-name">cloudDeploymentDomain</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">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,7 +117,7 @@ class</p> ...@@ -117,7 +117,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>
...@@ -126,7 +126,7 @@ class</p> ...@@ -126,7 +126,7 @@ class</p>
</td> </td>
</tr> </tr>
<tr> <tr>
<td> <span class="property-name">host</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;host&quot; : &quot;147.228.242.58&quot;,
&quot;cloudDeploymentDomain&quot; : &quot;us-east-1&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;end&quot; : 12345,
&quot;host&quot; : &quot;147.228.242.58&quot;, &quot;start&quot; : 12345,
&quot;vmType&quot; : &quot;...&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="vmType" type="xs:string" minOccurs="0"> <xs:element name="end" type="xs:dateTime" minOccurs="0">
</xs:element>
<xs:element name="host" type="xs:string" 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="end" type="xs:dateTime" 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="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>
</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;cloudDeploymentDomain&quot; : &quot;us-east-1&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;end&quot; : 12345,
&quot;host&quot; : &quot;147.228.242.58&quot;, &quot;start&quot; : 12345,
&quot;vmType&quot; : &quot;...&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;cloudDeploymentDomain&quot; : &quot;us-east-1&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;end&quot; : 12345,
&quot;host&quot; : &quot;147.228.242.58&quot;, &quot;start&quot; : 12345,
&quot;vmType&quot; : &quot;...&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
......
...@@ -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;vmType&gt;...&lt;/vmType&gt;
&lt;host&gt;147.228.242.58&lt;/host&gt;
&lt;cloudDeploymentDomain&gt;us-east-1&lt;/cloudDeploymentDomain&gt;
&lt;end&gt;...&lt;/end&gt; &lt;end&gt;...&lt;/end&gt;
&lt;cloudDeploymentDomain&gt;us-east-1&lt;/cloudDeploymentDomain&gt;
&lt;delta&gt;...&lt;/delta&gt; &lt;delta&gt;...&lt;/delta&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;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 4, 2017</p> <p class="lead">Created November 7, 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">14.46K</span></td> <td><span class="downloadfile-size">14.45K</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 November 4, 2017</p> <p class="lead">Created November 7, 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 4, 2017</p> <p class="lead">Created November 7, 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>
...@@ -155,7 +155,7 @@ ...@@ -155,7 +155,7 @@
</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 4, 2017</p> <p class="lead">Created November 7, 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">6.04K</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 4, 2017</p> <p class="lead">Created November 7, 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.67K</span></td> <td><span class="downloadfile-size">6.74K</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 4, 2017</p> <p class="lead">Created November 7, 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 4, 2017</p> <p class="lead">Created November 7, 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.
...@@ -81,7 +81,7 @@ class</p> ...@@ -81,7 +81,7 @@ class</p>
</thead> </thead>
<tbody> <tbody>
<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>
...@@ -90,7 +90,7 @@ class</p> ...@@ -90,7 +90,7 @@ class</p>
</td> </td>
</tr> </tr>
<tr> <tr>
<td> <span class="property-name">host</span> <td> <span class="property-name">vmType</span>
</td> </td>
<td> <span class="datatype-reference">string <td> <span class="datatype-reference">string
</span> </span>
...@@ -99,16 +99,16 @@ class</p> ...@@ -99,16 +99,16 @@ 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">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>
...@@ -117,7 +117,7 @@ class</p> ...@@ -117,7 +117,7 @@ class</p>
</td> </td>
</tr> </tr>
<tr> <tr>
<td> <span class="property-name">start</span> <td> <span class="property-name">end</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">vmType</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>
...@@ -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;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;vmType&quot; : &quot;...&quot;,
&quot;cloudDeploymentDomain&quot; : &quot;us-east-1&quot;,
&quot;delta&quot; : 12345, &quot;delta&quot; : 12345,
&quot;end&quot; : 12345, &quot;end&quot; : 12345,
&quot;start&quot; : 12345, &quot;start&quot; : 12345,
&quot;vmType&quot; : &quot;...&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_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_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>
</dl> </dl>
<table class="table datatype-properties"> <table class="table datatype-properties">
......
...@@ -821,17 +821,17 @@ class]]> ...@@ -821,17 +821,17 @@ class]]>
<xs:complexContent> <xs:complexContent>
<xs:extension base="ownedObject"> <xs:extension base="ownedObject">
<xs:sequence> <xs:sequence>
<xs:element name="host" type="xs:string" 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="vmType" type="xs:string" minOccurs="0">
</xs:element> </xs:element>
<xs:element name="start" type="xs:dateTime" 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 name="host" type="xs:string" minOccurs="0">
</xs:element> </xs:element>
<xs:element name="cloudDeploymentDomain" type="xs:string" 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 name="start" type="xs:dateTime" minOccurs="0">
</xs:element> </xs:element>
</xs:sequence> </xs:sequence>
</xs:extension> </xs:extension>
......
...@@ -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;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;vmType&quot; : &quot;...&quot;,
&quot;cloudDeploymentDomain&quot; : &quot;us-east-1&quot;,
&quot;delta&quot; : 12345, &quot;delta&quot; : 12345,
&quot;end&quot; : 12345, &quot;end&quot; : 12345,
&quot;start&quot; : 12345, &quot;start&quot; : 12345,
&quot;vmType&quot; : &quot;...&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;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;vmType&quot; : &quot;...&quot;,
&quot;cloudDeploymentDomain&quot; : &quot;us-east-1&quot;,
&quot;delta&quot; : 12345, &quot;delta&quot; : 12345,
&quot;end&quot; : 12345, &quot;end&quot; : 12345,
&quot;start&quot; : 12345, &quot;start&quot; : 12345,
&quot;vmType&quot; : &quot;...&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
......
...@@ -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;host&gt;147.228.242.58&lt;/host&gt; &lt;end&gt;...&lt;/end&gt;
&lt;vmType&gt;...&lt;/vmType&gt; &lt;vmType&gt;...&lt;/vmType&gt;
&lt;start&gt;...&lt;/start&gt;
&lt;delta&gt;...&lt;/delta&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;delta&gt;...&lt;/delta&gt;
&lt;start&gt;...&lt;/start&gt;
&lt;owner&gt;user1&lt;/owner&gt; &lt;owner&gt;user1&lt;/owner&gt;
&lt;/b-----&gt; &lt;/b-----&gt;
</pre> </pre>
......
...@@ -93,7 +93,7 @@ public class ProvisionService { ...@@ -93,7 +93,7 @@ public class ProvisionService {
@Autowired @Autowired
public ProvisionService(@Value("${message.broker.host}") String messageBrokerHost) throws IOException, TimeoutException { public ProvisionService(@Value("${message.broker.host}") String messageBrokerHost) throws IOException, TimeoutException {
logger = Logger.getLogger(DeployService.class.getName()); logger = Logger.getLogger(ProvisionService.class.getName());
logger.addHandler(new DRIPLogHandler(messageBrokerHost)); logger.addHandler(new DRIPLogHandler(messageBrokerHost));
} }
......
...@@ -21,8 +21,6 @@ import nl.uva.sne.drip.drip.commons.data.v1.external.ConfigurationRepresentation ...@@ -21,8 +21,6 @@ import nl.uva.sne.drip.drip.commons.data.v1.external.ConfigurationRepresentation
import java.io.IOException; import java.io.IOException;
import java.util.ArrayList; import java.util.ArrayList;
import java.util.List; import java.util.List;
import java.util.logging.Level;
import java.util.logging.Logger;
import javax.annotation.security.RolesAllowed; import javax.annotation.security.RolesAllowed;
import org.json.JSONException; import org.json.JSONException;
import org.springframework.beans.factory.annotation.Autowired; import org.springframework.beans.factory.annotation.Autowired;
......
...@@ -4,20 +4,9 @@ ...@@ -4,20 +4,9 @@
# Set root logger level to DEBUG and its only appender to A1. # Set root logger level to DEBUG and its only appender to A1.
log4j.rootLogger=FINE, A1 log4j.rootLogger=FINE, A1
log4j.category.org.apache.http=OFF
log4j.category.io.milton=OFF
log4j.category.org.apache.commons=OFF
log4j.category.org.globus=OFF
log4j.org.apache.axis=OFF
log4j.org.apache.http=OFF
log4j.org.apache.jackrabbit=OFF
log4j.logger.org.apache.jackrabbit=OFF
log4j.logger.httpclient.wire.header=OFF log4j.logger.httpclient.wire.header=OFF
log4j.logger.httpclient.wire.content=OFF log4j.logger.httpclient.wire.content=OFF
log4j.logger.org.globus=OFF log4j.logger.org.globus=OFF
log4j.logger.io.milton=SEVERE
log4j.io.milton=SEVERE
# A1 is set to be a ConsoleAppender. # A1 is set to be a ConsoleAppender.
log4j.appender.A1=org.apache.log4j.ConsoleAppender log4j.appender.A1=org.apache.log4j.ConsoleAppender
......
...@@ -37,6 +37,7 @@ import nl.uva.sne.drip.drip.commons.data.internal.Message; ...@@ -37,6 +37,7 @@ 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.v0.external.Attribute; import nl.uva.sne.drip.drip.commons.data.v0.external.Attribute;
import nl.uva.sne.drip.drip.commons.data.v1.external.PlanResponse; import nl.uva.sne.drip.drip.commons.data.v1.external.PlanResponse;
import org.yaml.snakeyaml.DumperOptions;
/** /**
* *
...@@ -138,7 +139,11 @@ public class Converter { ...@@ -138,7 +139,11 @@ public class Converter {
} }
public static String json2Yml2(String jsonString) throws JSONException { public static String json2Yml2(String jsonString) throws JSONException {
Yaml yaml = new Yaml(); DumperOptions options = new DumperOptions();
options.setDefaultFlowStyle(DumperOptions.FlowStyle.BLOCK);
options.setPrettyFlow(true);
options.setDefaultScalarStyle(DumperOptions.ScalarStyle.SINGLE_QUOTED);
Yaml yaml = new Yaml(options);
String yamlStr = yaml.dump(ymlString2Map(jsonString)); String yamlStr = yaml.dump(ymlString2Map(jsonString));
return yamlStr; return yamlStr;
} }
......
...@@ -32,6 +32,8 @@ import java.util.logging.StreamHandler; ...@@ -32,6 +32,8 @@ import java.util.logging.StreamHandler;
import nl.uva.sne.drip.commons.utils.DRIPLogRecordFactory; import nl.uva.sne.drip.commons.utils.DRIPLogRecordFactory;
import nl.uva.sne.drip.drip.commons.data.v1.external.DRIPLogRecord; import nl.uva.sne.drip.drip.commons.data.v1.external.DRIPLogRecord;
import nl.uva.sne.drip.drip.commons.data.v1.external.User; import nl.uva.sne.drip.drip.commons.data.v1.external.User;
import org.springframework.security.core.Authentication;
import org.springframework.security.core.context.SecurityContext;
import org.springframework.security.core.context.SecurityContextHolder; import org.springframework.security.core.context.SecurityContextHolder;
/** /**
...@@ -43,6 +45,7 @@ public class DRIPLogHandler extends StreamHandler { ...@@ -43,6 +45,7 @@ public class DRIPLogHandler extends StreamHandler {
private final String qeueName; private final String qeueName;
private final ObjectMapper mapper; private final ObjectMapper mapper;
private final ConnectionFactory factory; private final ConnectionFactory factory;
private String owner;
public DRIPLogHandler(String messageBrokerHost) throws IOException, TimeoutException { public DRIPLogHandler(String messageBrokerHost) throws IOException, TimeoutException {
factory = new ConnectionFactory(); factory = new ConnectionFactory();
...@@ -62,16 +65,21 @@ public class DRIPLogHandler extends StreamHandler { ...@@ -62,16 +65,21 @@ public class DRIPLogHandler extends StreamHandler {
try (Connection connection = factory.newConnection()) { try (Connection connection = factory.newConnection()) {
Channel channel = connection.createChannel(); Channel channel = connection.createChannel();
User user = (User) SecurityContextHolder.getContext().getAuthentication().getPrincipal(); SecurityContext ctx = SecurityContextHolder.getContext();
String owner = user.getUsername(); Authentication auth = ctx.getAuthentication();
if (auth != null) {
User user = (User) auth.getPrincipal();
setOwner(user.getUsername());
}
DRIPLogRecord dripLog = DRIPLogRecordFactory.create(record); DRIPLogRecord dripLog = DRIPLogRecordFactory.create(record);
dripLog.setOwner(owner); dripLog.setOwner(getOwner());
String jsonInString = mapper.writeValueAsString(dripLog); String jsonInString = mapper.writeValueAsString(dripLog);
// channel.basicPublish(qeueName, owner, null, jsonInString.getBytes()); // channel.basicPublish(qeueName, owner, null, jsonInString.getBytes());
// channel.basicPublish(qeueName, owner, MessageProperties.PERSISTENT_TEXT_PLAIN, jsonInString.getBytes("UTF-8")); // channel.basicPublish(qeueName, owner, MessageProperties.PERSISTENT_TEXT_PLAIN, jsonInString.getBytes("UTF-8"));
String qeueNameUser = qeueName + "_" + owner; String qeueNameUser = qeueName + "_" + getOwner();
channel.queueDeclare(qeueNameUser, true, false, false, null); channel.queueDeclare(qeueNameUser, true, false, false, null);
channel.basicPublish("", qeueNameUser, MessageProperties.PERSISTENT_TEXT_PLAIN, jsonInString.getBytes("UTF-8")); channel.basicPublish("", qeueNameUser, MessageProperties.PERSISTENT_TEXT_PLAIN, jsonInString.getBytes("UTF-8"));
...@@ -97,4 +105,17 @@ public class DRIPLogHandler extends StreamHandler { ...@@ -97,4 +105,17 @@ public class DRIPLogHandler extends StreamHandler {
// } // }
// super.close(); // super.close();
// } // }
/**
* @return the owner
*/
public String getOwner() {
return owner;
}
/**
* @param owner the owner to set
*/
public void setOwner(String owner) {
this.owner = owner;
}
} }
...@@ -25,6 +25,7 @@ import linecache ...@@ -25,6 +25,7 @@ import linecache
import sys import sys
import ast import ast
import re import re
from drip_logging.drip_logging_handler import *
logger = logging.getLogger(__name__) logger = logging.getLogger(__name__)
if not getattr(logger, 'handler_set', None): if not getattr(logger, 'handler_set', None):
...@@ -140,7 +141,9 @@ def docker_check(vm, compose_name): ...@@ -140,7 +141,9 @@ def docker_check(vm, compose_name):
def run(vm_list, compose_name): def run(vm_list, compose_name,rabbitmq_host,owner):
rabbit = DRIPLoggingHandler(host=rabbitmq_host, port=5672,user=owner)
logger.addHandler(rabbit)
for i in vm_list: for i in vm_list:
if i.role == "master": if i.role == "master":
ret = docker_check(i, compose_name) ret = docker_check(i, compose_name)
......
...@@ -20,6 +20,8 @@ __author__ = 'Yang Hu' ...@@ -20,6 +20,8 @@ __author__ = 'Yang Hu'
import paramiko, os import paramiko, os
from vm_info import VmInfo from vm_info import VmInfo
import logging import logging
from drip_logging.drip_logging_handler import *
logger = logging.getLogger(__name__) logger = logging.getLogger(__name__)
if not getattr(logger, 'handler_set', None): if not getattr(logger, 'handler_set', None):
...@@ -53,7 +55,9 @@ def deploy_compose(vm, compose_file, compose_name): ...@@ -53,7 +55,9 @@ def deploy_compose(vm, compose_file, compose_name):
def run(vm_list, compose_file, compose_name): def run(vm_list, compose_file, compose_name,rabbitmq_host,owner):
rabbit = DRIPLoggingHandler(host=rabbitmq_host, port=5672,user=owner)
logger.addHandler(rabbit)
for i in vm_list: for i in vm_list:
if i.role == "master": if i.role == "master":
ret = deploy_compose(i, compose_file, compose_name) ret = deploy_compose(i, compose_file, compose_name)
......
...@@ -20,6 +20,7 @@ __author__ = 'Yang Hu' ...@@ -20,6 +20,7 @@ __author__ = 'Yang Hu'
import paramiko, os import paramiko, os
import threading import threading
import logging import logging
from drip_logging.drip_logging_handler import *
logger = logging.getLogger(__name__) logger = logging.getLogger(__name__)
if not getattr(logger, 'handler_set', None): if not getattr(logger, 'handler_set', None):
...@@ -58,8 +59,10 @@ def install_engine(vm): ...@@ -58,8 +59,10 @@ def install_engine(vm):
ssh.close() ssh.close()
return "SUCCESS" return "SUCCESS"
def run(vm_list): def run(vm_list,rabbitmq_host,owner):
for i in vm_list: rabbit = DRIPLoggingHandler(host=rabbitmq_host, port=5672,user=owner)
ret = install_engine(i) logger.addHandler(rabbit)
if "ERROR" in ret: return ret for i in vm_list:
return "SUCCESS" ret = install_engine(i)
\ No newline at end of file if "ERROR" in ret: return ret
return "SUCCESS"
\ No newline at end of file
...@@ -20,6 +20,7 @@ __author__ = 'Yang Hu' ...@@ -20,6 +20,7 @@ __author__ = 'Yang Hu'
import paramiko, os import paramiko, os
from vm_info import VmInfo from vm_info import VmInfo
import logging import logging
from drip_logging.drip_logging_handler import *
logger = logging.getLogger(__name__) logger = logging.getLogger(__name__)
...@@ -83,7 +84,9 @@ def install_worker(join_cmd, vm): ...@@ -83,7 +84,9 @@ def install_worker(join_cmd, vm):
ssh.close() ssh.close()
return "SUCCESS" return "SUCCESS"
def run(vm_list): def run(vm_list,rabbitmq_host,owner):
rabbit = DRIPLoggingHandler(host=rabbitmq_host, port=5672,user=owner)
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)
......
import json
import logging
import pika
from python_logging_rabbitmq import RabbitMQHandler
class DRIPLoggingHandler(RabbitMQHandler):
def __init__(self, host='localhost', port=5672, username=None, password=None, user=None):
super(DRIPLoggingHandler, self).__init__(host=host, port=port, username=username, password=password)
self.user = user
def open_connection(self):
self.sequenceNumber = 0
"""
Connect to RabbitMQ.
"""
# Set logger for pika.
# See if something went wrong connecting to RabbitMQ.
handler = logging.StreamHandler()
handler.setFormatter(self.formatter)
rabbitmq_logger = logging.getLogger('pika')
rabbitmq_logger.addHandler(handler)
rabbitmq_logger.propagate = False
rabbitmq_logger.setLevel(logging.WARNING)
if not self.connection or self.connection.is_closed:
self.connection = pika.BlockingConnection(pika.ConnectionParameters(** self.connection_params))
if not self.channel or self.channel.is_closed:
self.channel = self.connection.channel()
self.channel.queue_declare(queue='log_qeue_' + self.user, durable=True)
# Manually remove logger to avoid shutdown message.
rabbitmq_logger.removeHandler(handler)
def emit(self, record):
self.acquire()
try:
if not self.connection or self.connection.is_closed or not self.channel or self.channel.is_closed:
self.open_connection()
self.channel.basic_publish(
exchange='',
routing_key='log_qeue_user',
body=self.format(record),
properties=pika.BasicProperties(
delivery_mode=2)
)
except Exception:
self.channel, self.connection = None, None
self.handleError(record)
finally:
if self.close_after_emit:
self.close_connection()
self.release()
def format(self, record):
drip_record = {}
drip_record['timestamp'] = record.created
drip_record['owner'] = 'user'
drip_record['level'] = record.levelname
drip_record['loggerName'] = record.module
drip_record['message'] = record.message
drip_record['millis'] = record.created
self.sequenceNumber += 1
drip_record['sequenceNumber'] = self.sequenceNumber
drip_record['sourceClassName'] = record.module
drip_record['sourceMethodName'] = record.funcName
return json.dumps(drip_record)
\ No newline at end of file
This diff is collapsed.
This source diff could not be displayed because it is too large. You can view the blob instead.
...@@ -18,7 +18,7 @@ from time import sleep ...@@ -18,7 +18,7 @@ from time import sleep
import os.path import os.path
import logging import logging
global rabbitmq_host
if len(sys.argv) > 1: if len(sys.argv) > 1:
rabbitmq_host = sys.argv[1] rabbitmq_host = sys.argv[1]
else: else:
...@@ -49,6 +49,7 @@ def threaded_function(args): ...@@ -49,6 +49,7 @@ def threaded_function(args):
def handleDelivery(message): def handleDelivery(message):
parsed_json = json.loads(message) parsed_json = json.loads(message)
owner = parsed_json['owner']
params = parsed_json["parameters"] params = parsed_json["parameters"]
node_num = 0 node_num = 0
vm_list = set() vm_list = set()
...@@ -112,20 +113,20 @@ def handleDelivery(message): ...@@ -112,20 +113,20 @@ def handleDelivery(message):
ret = docker_kubernetes.run(vm_list) ret = docker_kubernetes.run(vm_list)
return ret return ret
elif manager_type == "swarm": elif manager_type == "swarm":
ret = docker_engine.run(vm_list) ret = docker_engine.run(vm_list,rabbitmq_host,owner)
if "ERROR" in ret: return ret if "ERROR" in ret: return ret
ret = docker_swarm.run(vm_list) ret = docker_swarm.run(vm_list,rabbitmq_host,owner)
if "ERROR" in ret: return ret if "ERROR" in ret: return ret
ret = docker_compose.run(vm_list, compose_file, compose_name) ret = docker_compose.run(vm_list, compose_file, compose_name,rabbitmq_host,owner)
return ret return ret
elif manager_type == "ansible": elif manager_type == "ansible":
ret = ansible_playbook.run(vm_list,playbook) ret = ansible_playbook.run(vm_list,playbook,rabbitmq_host,owner)
return ret return ret
elif manager_type == "scale": elif manager_type == "scale":
ret = docker_service.run(vm_list, name_of_deployment, name_of_service, number_of_containers) ret = docker_service.run(vm_list, name_of_deployment, name_of_service, number_of_containers,rabbitmq_host,owner)
return ret return ret
elif manager_type == "swarm_info": elif manager_type == "swarm_info":
ret = docker_check.run(vm_list, compose_name) ret = docker_check.run(vm_list, compose_name,rabbitmq_host,owner)
ret = '"'+json.dumps(ret)+'"' ret = '"'+json.dumps(ret)+'"'
return ret return ret
else: else:
......
"version": "3"
"services":
"server":
"image": "salmant/ul_monitoring_server_container_image2"
"ports":
- "8080:8080"
- "4242:4242"
- "4245:4245"
- "7199:7199"
- "7000:7000"
- "7001:7001"
- "9160:9160"
- "9042:9042"
- "8012:8012"
- "61621:61621"
"environment":
- "MONITORING_SERVER=server"
"agent":
"image": "salmant/monitoring_agent"
"depends_on":
- "server"
...@@ -73,7 +73,7 @@ public class RPCServer { ...@@ -73,7 +73,7 @@ public class RPCServer {
if (PropertyValues.RPC_QUEUE_NAME.endsWith("v0")) { if (PropertyValues.RPC_QUEUE_NAME.endsWith("v0")) {
c = new nl.uva.sne.drip.drip.provisioner.v0.Consumer(channel); c = new nl.uva.sne.drip.drip.provisioner.v0.Consumer(channel);
} else { } else {
c = new nl.uva.sne.drip.drip.provisioner.v1.Consumer(channel); c = new nl.uva.sne.drip.drip.provisioner.v1.Consumer(channel, PropertyValues.HOST);
} }
//Start listening for messages //Start listening for messages
......
...@@ -34,9 +34,11 @@ import java.util.ArrayList; ...@@ -34,9 +34,11 @@ import java.util.ArrayList;
import java.util.HashMap; import java.util.HashMap;
import java.util.List; import java.util.List;
import java.util.Map; import java.util.Map;
import java.util.concurrent.TimeoutException;
import java.util.logging.Level; import java.util.logging.Level;
import java.util.logging.Logger; import java.util.logging.Logger;
import nl.uva.sne.drip.commons.utils.Converter; import nl.uva.sne.drip.commons.utils.Converter;
import nl.uva.sne.drip.commons.utils.DRIPLogHandler;
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.provisioner.utils.MessageParsing; import nl.uva.sne.drip.drip.provisioner.utils.MessageParsing;
...@@ -74,10 +76,15 @@ public class Consumer extends DefaultConsumer { ...@@ -74,10 +76,15 @@ public class Consumer extends DefaultConsumer {
private final Channel channel; private final Channel channel;
// Map<String, String> em = new HashMap<>(); // Map<String, String> em = new HashMap<>();
private final Logger logger;
private final String messageBrokerHost;
public Consumer(Channel channel) throws IOException { public Consumer(Channel channel, String messageBrokerHost) throws IOException, TimeoutException {
super(channel); super(channel);
this.channel = channel; this.channel = channel;
this.messageBrokerHost = messageBrokerHost;
logger = Logger.getLogger(Consumer.class.getName());
} }
@Override @Override
...@@ -102,12 +109,18 @@ public class Consumer extends DefaultConsumer { ...@@ -102,12 +109,18 @@ public class Consumer extends DefaultConsumer {
ObjectMapper mapper = new ObjectMapper(); ObjectMapper mapper = new ObjectMapper();
mapper.configure(JsonParser.Feature.ALLOW_SINGLE_QUOTES, true); mapper.configure(JsonParser.Feature.ALLOW_SINGLE_QUOTES, true);
String owner = mapper.readValue(message, Message.class).getOwner();
DRIPLogHandler handler = new DRIPLogHandler(messageBrokerHost);
handler.setOwner(owner);
logger.addHandler(handler);
response = mapper.writeValueAsString(invokeProvisioner(message, tempInputDirPath)); response = mapper.writeValueAsString(invokeProvisioner(message, tempInputDirPath));
} catch (Throwable ex) { } catch (Throwable ex) {
try { try {
response = generateExeptionResponse(ex); response = generateExeptionResponse(ex);
Logger.getLogger(Consumer.class.getName()).log(Level.SEVERE, null, ex); // Logger.getLogger(Consumer.class.getName())
logger.log(Level.SEVERE, null, ex);
} catch (JSONException ex1) { } catch (JSONException ex1) {
response = "{\"creationDate\": " + System.currentTimeMillis() response = "{\"creationDate\": " + System.currentTimeMillis()
+ ",\"parameters\": [{\"url\": null,\"encoding\": UTF-8," + ",\"parameters\": [{\"url\": null,\"encoding\": UTF-8,"
...@@ -115,7 +128,8 @@ public class Consumer extends DefaultConsumer { ...@@ -115,7 +128,8 @@ public class Consumer extends DefaultConsumer {
+ ex.getClass().getName() + "\",\"attributes\": null}]}"; + ex.getClass().getName() + "\",\"attributes\": null}]}";
} }
} finally { } finally {
Logger.getLogger(Consumer.class.getName()).log(Level.INFO, "Sending Response: {0}", response); logger.fine("Sending Response: {0}" + response);
// Logger.getLogger(Consumer.class.getName()).log(Level.INFO, "Sending Response: {0}", response);
//We send the response back. No need to change anything here //We send the response back. No need to change anything here
channel.basicPublish("", properties.getReplyTo(), replyProps, response.getBytes("UTF-8")); channel.basicPublish("", properties.getReplyTo(), replyProps, response.getBytes("UTF-8"));
channel.basicAck(envelope.getDeliveryTag(), false); channel.basicAck(envelope.getDeliveryTag(), false);
...@@ -152,7 +166,8 @@ public class Consumer extends DefaultConsumer { ...@@ -152,7 +166,8 @@ public class Consumer extends DefaultConsumer {
} }
private Message startTopology(JSONArray parameters, String tempInputDirPath) throws Exception { private Message startTopology(JSONArray parameters, String tempInputDirPath) throws Exception {
Logger.getLogger(Consumer.class.getName()).log(Level.INFO, "Starting topology"); // Logger.getLogger(Consumer.class.getName()).log(Level.INFO, "Starting topology");
logger.info("Starting topology");
TEngine tEngine = new TEngine(); TEngine tEngine = new TEngine();
TopologyAnalysisMain tam = null; TopologyAnalysisMain tam = null;
UserCredential userCredential = new UserCredential(); UserCredential userCredential = new UserCredential();
...@@ -167,7 +182,8 @@ public class Consumer extends DefaultConsumer { ...@@ -167,7 +182,8 @@ public class Consumer extends DefaultConsumer {
// File secondaryTopologyFile = new File(tempInputDirPath + File.separator + lowLevelTopologyFile.getName() + ".yml"); // File secondaryTopologyFile = new File(tempInputDirPath + File.separator + lowLevelTopologyFile.getName() + ".yml");
// FileUtils.moveFile(lowLevelTopologyFile, secondaryTopologyFile); // FileUtils.moveFile(lowLevelTopologyFile, secondaryTopologyFile);
// } // }
Logger.getLogger(Consumer.class.getName()).log(Level.INFO, "Saved topology file"); // Logger.getLogger(Consumer.class.getName()).log(Level.INFO, "Saved topology file");
logger.info("Saved topology file");
Map<String, Object> map = Converter.ymlStream2Map(new FileInputStream(topTopologyLoadingPath)); Map<String, Object> map = Converter.ymlStream2Map(new FileInputStream(topTopologyLoadingPath));
String userPublicKeyName = ((String) map.get("publicKeyPath")); String userPublicKeyName = ((String) map.get("publicKeyPath"));
if (userPublicKeyName != null) { if (userPublicKeyName != null) {
...@@ -178,7 +194,8 @@ public class Consumer extends DefaultConsumer { ...@@ -178,7 +194,8 @@ public class Consumer extends DefaultConsumer {
String cont = Converter.map2YmlString(map); String cont = Converter.map2YmlString(map);
MessageParsing.writeValueToFile(cont, new File(topTopologyLoadingPath)); MessageParsing.writeValueToFile(cont, new File(topTopologyLoadingPath));
} }
Logger.getLogger(Consumer.class.getName()).log(Level.INFO, "Generated id_rsa.pub");
logger.info("Generated id_rsa.pub");
String userPrivateName = FilenameUtils.removeExtension(userPublicKeyName); String userPrivateName = FilenameUtils.removeExtension(userPublicKeyName);
List<File> sshKeys = MessageParsing.getSSHKeys(parameters, tempInputDirPath, userPublicKeyName, "user_ssh_key"); List<File> sshKeys = MessageParsing.getSSHKeys(parameters, tempInputDirPath, userPublicKeyName, "user_ssh_key");
if (sshKeys == null || sshKeys.isEmpty()) { if (sshKeys == null || sshKeys.isEmpty()) {
...@@ -205,11 +222,11 @@ public class Consumer extends DefaultConsumer { ...@@ -205,11 +222,11 @@ public class Consumer extends DefaultConsumer {
} else if (!userCredential.initial(sshKeyPairs, tam.wholeTopology)) { } else if (!userCredential.initial(sshKeyPairs, tam.wholeTopology)) {
throw new IOException("ssh key pair initilaziation error"); throw new IOException("ssh key pair initilaziation error");
} }
Logger.getLogger(Consumer.class.getName()).log(Level.INFO, "Generated ssh keys"); logger.info("Generated ssh keys");
userDatabase = getUserDB(); userDatabase = getUserDB();
tEngine.provisionAll(tam.wholeTopology, userCredential, userDatabase); tEngine.provisionAll(tam.wholeTopology, userCredential, userDatabase);
Logger.getLogger(Consumer.class.getName()).log(Level.INFO, "Provisioned resources"); logger.info("Provisioned resources");
return buildTopologuResponse(tam, tempInputDirPath, userPublicKeyName, userPrivateName); return buildTopologuResponse(tam, tempInputDirPath, userPublicKeyName, userPrivateName);
} catch (Throwable ex) { } catch (Throwable ex) {
......
# LOG4J Configuration
# ===================
# Set root logger level to DEBUG and its only appender to A1.
log4j.rootLogger=FINE, A1
# A1 is set to be a ConsoleAppender.
log4j.appender.A1=org.apache.log4j.ConsoleAppender
# A1 uses PatternLayout.
log4j.appender.A1.layout=org.apache.log4j.PatternLayout
log4j.appender.A1.layout.ConversionPattern=%d{HH:mm:ss,SSS} (%t) %-5p [%c] - %m%n
\ No newline at end of file
handlers = java.util.logging.ConsoleHandler
nl.uva.cs.level = FINE
############################################################
# Handler specific properties.
# Describes specific configuration info for Handlers.
############################################################
java.util.logging.ConsoleHandler.level = FINE
java.util.logging.ConsoleHandler.formatter = java.util.logging.SimpleFormatter
\ No newline at end of file
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