Commit 5edac92e authored by Spiros Koulouzis's avatar Spiros Koulouzis

add methods to make code more readable

parent ad703cc7
...@@ -72,7 +72,7 @@ ...@@ -72,7 +72,7 @@
<h1 class="page-header">Files and Libraries</h1> <h1 class="page-header">Files and Libraries</h1>
<h3 id="artifact_gwt_json_overlay">GWT JSON Overlay</h3> <h3 id="artifact_gwt_json_overlay">GWT JSON Overlay</h3>
<p class="lead">Created October 10, 2017</p> <p class="lead">Created October 11, 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 October 10, 2017</p> <p class="lead">Created October 11, 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 October 10, 2017</p> <p class="lead">Created October 11, 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 October 10, 2017</p> <p class="lead">Created October 11, 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
...@@ -190,7 +190,7 @@ ...@@ -190,7 +190,7 @@
</tbody> </tbody>
</table> </table>
<h3 id="artifact_php_json_client_library">PHP JSON Client Library</h3> <h3 id="artifact_php_json_client_library">PHP JSON Client Library</h3>
<p class="lead">Created October 10, 2017</p> <p class="lead">Created October 11, 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
...@@ -219,7 +219,7 @@ ...@@ -219,7 +219,7 @@
</tbody> </tbody>
</table> </table>
<h3 id="artifact_php_xml_client_library">PHP XML Client Library</h3> <h3 id="artifact_php_xml_client_library">PHP XML Client Library</h3>
<p class="lead">Created October 10, 2017</p> <p class="lead">Created October 11, 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
...@@ -251,7 +251,7 @@ ...@@ -251,7 +251,7 @@
</tbody> </tbody>
</table> </table>
<h3 id="artifact_ruby_json_client_library">Ruby JSON Client Library</h3> <h3 id="artifact_ruby_json_client_library">Ruby JSON Client Library</h3>
<p class="lead">Created October 10, 2017</p> <p class="lead">Created October 11, 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
......
...@@ -81,36 +81,36 @@ class</p> ...@@ -81,36 +81,36 @@ 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">start</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">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">delta</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>
...@@ -126,7 +126,7 @@ class</p> ...@@ -126,7 +126,7 @@ class</p>
</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>
...@@ -165,12 +165,12 @@ object is saved.</span></td> ...@@ -165,12 +165,12 @@ object is saved.</span></td>
<p class="lead">Example</p> <p class="lead">Example</p>
<pre class="prettyprint language-js example">{ <pre class="prettyprint language-js example">{
&quot;host&quot; : &quot;147.228.242.58&quot;,
&quot;start&quot; : 12345, &quot;start&quot; : 12345,
&quot;cloudDeploymentDomain&quot; : &quot;us-east-1&quot;, &quot;vmType&quot; : &quot;...&quot;,
&quot;delta&quot; : 12345, &quot;delta&quot; : 12345,
&quot;host&quot; : &quot;147.228.242.58&quot;,
&quot;end&quot; : 12345, &quot;end&quot; : 12345,
&quot;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_CloudCredentials.html">CloudCredentials</a>, <a href="json_BenchmarkResult.html">BenchmarkResult</a>, <a href="json_DeployResponse.html">DeployResponse</a>, <a href="json_ProvisionRequest.html">ProvisionRequest</a>, <a href="json_Script.html">Script</a>, <a href="json_KeyValueHolder.html">KeyValueHolder</a>, <a href="json_DeployRequest.html">DeployRequest</a>, <a href="json_ProvisionResponse.html">ProvisionResponse</a></dd> <dd><a href="json_KeyPair.html">KeyPair</a>, <a href="json_AnsibleOutput.html">AnsibleOutput</a>, <a href="json_ScaleRequest.html">ScaleRequest</a>, <a href="json_BenchmarkResult.html">BenchmarkResult</a>, <a href="json_CloudCredentials.html">CloudCredentials</a>, <a href="json_DeployResponse.html">DeployResponse</a>, <a href="json_ProvisionRequest.html">ProvisionRequest</a>, <a href="json_Script.html">Script</a>, <a href="json_KeyValueHolder.html">KeyValueHolder</a>, <a href="json_DeployRequest.html">DeployRequest</a>, <a href="json_ProvisionResponse.html">ProvisionResponse</a></dd>
</dl> </dl>
<table class="table datatype-properties"> <table class="table datatype-properties">
......
...@@ -823,17 +823,17 @@ class]]> ...@@ -823,17 +823,17 @@ class]]>
<xs:complexContent> <xs:complexContent>
<xs:extension base="ownedObject"> <xs:extension base="ownedObject">
<xs:sequence> <xs:sequence>
<xs:element name="cloudDeploymentDomain" type="xs:string" minOccurs="0"> <xs:element name="vmType" type="xs:string" minOccurs="0">
</xs:element>
<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="host" type="xs:string" minOccurs="0">
</xs:element> </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="vmType" type="xs:string" minOccurs="0"> <xs:element name="start" type="xs:dateTime" minOccurs="0">
</xs:element> </xs:element>
<xs:element name="host" type="xs:string" minOccurs="0"> <xs:element name="cloudDeploymentDomain" type="xs:string" minOccurs="0">
</xs:element>
<xs:element name="delta" 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;host&quot; : &quot;147.228.242.58&quot;,
&quot;start&quot; : 12345, &quot;start&quot; : 12345,
&quot;cloudDeploymentDomain&quot; : &quot;us-east-1&quot;, &quot;vmType&quot; : &quot;...&quot;,
&quot;delta&quot; : 12345, &quot;delta&quot; : 12345,
&quot;host&quot; : &quot;147.228.242.58&quot;,
&quot;end&quot; : 12345, &quot;end&quot; : 12345,
&quot;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;host&quot; : &quot;147.228.242.58&quot;,
&quot;start&quot; : 12345, &quot;start&quot; : 12345,
&quot;cloudDeploymentDomain&quot; : &quot;us-east-1&quot;, &quot;vmType&quot; : &quot;...&quot;,
&quot;delta&quot; : 12345, &quot;delta&quot; : 12345,
&quot;host&quot; : &quot;147.228.242.58&quot;,
&quot;end&quot; : 12345, &quot;end&quot; : 12345,
&quot;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
......
...@@ -231,12 +231,12 @@ the DAO saves the object based on the principal how made the call</span></td> ...@@ -231,12 +231,12 @@ the DAO saves the object based on the principal how made the call</span></td>
<p class="lead">Example</p> <p class="lead">Example</p>
<pre class="prettyprint language-xml example">&lt;b-----&gt; <pre class="prettyprint language-xml example">&lt;b-----&gt;
&lt;cloudDeploymentDomain&gt;us-east-1&lt;/cloudDeploymentDomain&gt;
&lt;delta&gt;...&lt;/delta&gt;
&lt;start&gt;...&lt;/start&gt;
&lt;end&gt;...&lt;/end&gt;
&lt;vmType&gt;...&lt;/vmType&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;end&gt;...&lt;/end&gt;
&lt;start&gt;...&lt;/start&gt;
&lt;cloudDeploymentDomain&gt;us-east-1&lt;/cloudDeploymentDomain&gt;
&lt;delta&gt;...&lt;/delta&gt;
&lt;owner&gt;user1&lt;/owner&gt; &lt;owner&gt;user1&lt;/owner&gt;
&lt;timestamp&gt;1499793079011&lt;/timestamp&gt; &lt;timestamp&gt;1499793079011&lt;/timestamp&gt;
&lt;/b-----&gt; &lt;/b-----&gt;
......
...@@ -72,7 +72,7 @@ ...@@ -72,7 +72,7 @@
<h1 class="page-header">Files and Libraries</h1> <h1 class="page-header">Files and Libraries</h1>
<h3 id="artifact_gwt_json_overlay">GWT JSON Overlay</h3> <h3 id="artifact_gwt_json_overlay">GWT JSON Overlay</h3>
<p class="lead">Created October 10, 2017</p> <p class="lead">Created October 11, 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 October 10, 2017</p> <p class="lead">Created October 11, 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 October 10, 2017</p> <p class="lead">Created October 11, 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 October 10, 2017</p> <p class="lead">Created October 11, 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
...@@ -190,7 +190,7 @@ ...@@ -190,7 +190,7 @@
</tbody> </tbody>
</table> </table>
<h3 id="artifact_php_json_client_library">PHP JSON Client Library</h3> <h3 id="artifact_php_json_client_library">PHP JSON Client Library</h3>
<p class="lead">Created October 10, 2017</p> <p class="lead">Created October 11, 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
...@@ -219,7 +219,7 @@ ...@@ -219,7 +219,7 @@
</tbody> </tbody>
</table> </table>
<h3 id="artifact_php_xml_client_library">PHP XML Client Library</h3> <h3 id="artifact_php_xml_client_library">PHP XML Client Library</h3>
<p class="lead">Created October 10, 2017</p> <p class="lead">Created October 11, 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
...@@ -251,7 +251,7 @@ ...@@ -251,7 +251,7 @@
</tbody> </tbody>
</table> </table>
<h3 id="artifact_ruby_json_client_library">Ruby JSON Client Library</h3> <h3 id="artifact_ruby_json_client_library">Ruby JSON Client Library</h3>
<p class="lead">Created October 10, 2017</p> <p class="lead">Created October 11, 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
......
...@@ -81,25 +81,25 @@ class</p> ...@@ -81,25 +81,25 @@ class</p>
</thead> </thead>
<tbody> <tbody>
<tr> <tr>
<td> <span class="property-name">delta</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">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">host</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">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>
...@@ -117,18 +117,18 @@ class</p> ...@@ -117,18 +117,18 @@ class</p>
</td> </td>
</tr> </tr>
<tr> <tr>
<td> <span class="property-name">end</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">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>
...@@ -165,12 +165,12 @@ object is saved.</span></td> ...@@ -165,12 +165,12 @@ object is saved.</span></td>
<p class="lead">Example</p> <p class="lead">Example</p>
<pre class="prettyprint language-js example">{ <pre class="prettyprint language-js example">{
&quot;vmType&quot; : &quot;...&quot;,
&quot;delta&quot; : 12345, &quot;delta&quot; : 12345,
&quot;cloudDeploymentDomain&quot; : &quot;us-east-1&quot;, &quot;cloudDeploymentDomain&quot; : &quot;us-east-1&quot;,
&quot;end&quot; : 12345,
&quot;host&quot; : &quot;147.228.242.58&quot;, &quot;host&quot; : &quot;147.228.242.58&quot;,
&quot;start&quot; : 12345, &quot;start&quot; : 12345,
&quot;end&quot; : 12345,
&quot;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_AnsibleOutput.html">AnsibleOutput</a>, <a href="json_ScaleRequest.html">ScaleRequest</a>, <a href="json_CloudCredentials.html">CloudCredentials</a>, <a href="json_BenchmarkResult.html">BenchmarkResult</a>, <a href="json_DeployResponse.html">DeployResponse</a>, <a href="json_ProvisionRequest.html">ProvisionRequest</a>, <a href="json_Script.html">Script</a>, <a href="json_KeyValueHolder.html">KeyValueHolder</a>, <a href="json_DeployRequest.html">DeployRequest</a>, <a href="json_ProvisionResponse.html">ProvisionResponse</a></dd> <dd><a href="json_KeyPair.html">KeyPair</a>, <a href="json_ScaleRequest.html">ScaleRequest</a>, <a href="json_AnsibleOutput.html">AnsibleOutput</a>, <a href="json_CloudCredentials.html">CloudCredentials</a>, <a href="json_BenchmarkResult.html">BenchmarkResult</a>, <a href="json_DeployResponse.html">DeployResponse</a>, <a href="json_ProvisionRequest.html">ProvisionRequest</a>, <a href="json_Script.html">Script</a>, <a href="json_KeyValueHolder.html">KeyValueHolder</a>, <a href="json_DeployRequest.html">DeployRequest</a>, <a href="json_ProvisionResponse.html">ProvisionResponse</a></dd>
</dl> </dl>
<table class="table datatype-properties"> <table class="table datatype-properties">
......
...@@ -823,18 +823,18 @@ class]]> ...@@ -823,18 +823,18 @@ class]]>
<xs:complexContent> <xs:complexContent>
<xs:extension base="ownedObject"> <xs:extension base="ownedObject">
<xs:sequence> <xs:sequence>
<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="host" type="xs:string" minOccurs="0"> <xs:element name="start" 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="delta" type="xs:dateTime" minOccurs="0"> <xs:element name="cloudDeploymentDomain" type="xs:string" minOccurs="0">
</xs:element>
<xs:element name="start" type="xs:dateTime" minOccurs="0">
</xs:element> </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="host" 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;vmType&quot; : &quot;...&quot;,
&quot;delta&quot; : 12345, &quot;delta&quot; : 12345,
&quot;cloudDeploymentDomain&quot; : &quot;us-east-1&quot;, &quot;cloudDeploymentDomain&quot; : &quot;us-east-1&quot;,
&quot;end&quot; : 12345,
&quot;host&quot; : &quot;147.228.242.58&quot;, &quot;host&quot; : &quot;147.228.242.58&quot;,
&quot;start&quot; : 12345, &quot;start&quot; : 12345,
&quot;end&quot; : 12345,
&quot;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;vmType&quot; : &quot;...&quot;,
&quot;delta&quot; : 12345, &quot;delta&quot; : 12345,
&quot;cloudDeploymentDomain&quot; : &quot;us-east-1&quot;, &quot;cloudDeploymentDomain&quot; : &quot;us-east-1&quot;,
&quot;end&quot; : 12345,
&quot;host&quot; : &quot;147.228.242.58&quot;, &quot;host&quot; : &quot;147.228.242.58&quot;,
&quot;start&quot; : 12345, &quot;start&quot; : 12345,
&quot;end&quot; : 12345,
&quot;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
......
...@@ -231,12 +231,12 @@ the DAO saves the object based on the principal how made the call</span></td> ...@@ -231,12 +231,12 @@ the DAO saves the object based on the principal how made the call</span></td>
<p class="lead">Example</p> <p class="lead">Example</p>
<pre class="prettyprint language-xml example">&lt;b-----&gt; <pre class="prettyprint language-xml example">&lt;b-----&gt;
&lt;cloudDeploymentDomain&gt;us-east-1&lt;/cloudDeploymentDomain&gt;
&lt;host&gt;147.228.242.58&lt;/host&gt;
&lt;vmType&gt;...&lt;/vmType&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;vmType&gt;...&lt;/vmType&gt;
&lt;cloudDeploymentDomain&gt;us-east-1&lt;/cloudDeploymentDomain&gt;
&lt;end&gt;...&lt;/end&gt; &lt;end&gt;...&lt;/end&gt;
&lt;host&gt;147.228.242.58&lt;/host&gt;
&lt;owner&gt;user1&lt;/owner&gt; &lt;owner&gt;user1&lt;/owner&gt;
&lt;timestamp&gt;1499793079011&lt;/timestamp&gt; &lt;timestamp&gt;1499793079011&lt;/timestamp&gt;
&lt;/b-----&gt; &lt;/b-----&gt;
......
...@@ -4,7 +4,7 @@ topology_template: ...@@ -4,7 +4,7 @@ topology_template:
artifacts: artifacts:
"inputdistributor.cardiff_image": "inputdistributor.cardiff_image":
type: "tosca.artifacts.Deployment.Image.Container.Docker" type: "tosca.artifacts.Deployment.Image.Container.Docker"
file: null file: "mogswitch/InputDistributor:1.0"
repository: SWITCH_docker_hub repository: SWITCH_docker_hub
requirements: requirements:
- host: - host:
...@@ -46,7 +46,7 @@ topology_template: ...@@ -46,7 +46,7 @@ topology_template:
artifacts: artifacts:
"inputdistributor.cardiff_image": "inputdistributor.cardiff_image":
type: "tosca.artifacts.Deployment.Image.Container.Docker" type: "tosca.artifacts.Deployment.Image.Container.Docker"
file: null file: "mogswitch/InputDistributor:1.0"
repository: SWITCH_docker_hub repository: SWITCH_docker_hub
requirements: requirements:
- host: - host:
...@@ -243,6 +243,9 @@ topology_template: ...@@ -243,6 +243,9 @@ topology_template:
port_mapping_0: port_mapping_0:
host_port: 8085 host_port: 8085
container_port: 80 container_port: 80
port_mapping_1:
host_port: 8086
container_port: 81
"849ea5ba-9938-46aa-8d3d-d525f5d87102": "849ea5ba-9938-46aa-8d3d-d525f5d87102":
type: "Switch.nodes.Application.Connection" type: "Switch.nodes.Application.Connection"
properties: properties:
......
...@@ -27,54 +27,78 @@ class DockerComposeTransformer: ...@@ -27,54 +27,78 @@ class DockerComposeTransformer:
return self.yaml_dict_tpl['node_types'] return self.yaml_dict_tpl['node_types']
def get_docker_types(self): def get_docker_types(self):
docker_types = [] docker_types = set([])
node_types = self.get_node_types() node_types = self.get_node_types()
for node_type_key in node_types: for node_type_key in node_types:
if node_types[node_type_key] and 'derived_from' in node_types[node_type_key].keys(): if node_types[node_type_key] and 'derived_from' in node_types[node_type_key].keys():
if node_types[node_type_key]['derived_from'] == self.DOCKER_TYPE: if node_types[node_type_key]['derived_from'] == self.DOCKER_TYPE:
docker_types.append(node_type_key) docker_types.add(node_type_key)
return docker_types return docker_types
def get_node_templates(self): def get_node_templates(self):
return self.yaml_dict_tpl['topology_template']['node_templates'] return self.yaml_dict_tpl['topology_template']['node_templates']
def get_artifacts(self,node):
if 'artifacts' in node:
return node['artifacts']
def get_properties(self,node):
if 'properties' in node:
return node['properties']
def get_enviroment_vars(self,properties):
environment = []
for prop in properties:
if properties[prop] and not isinstance(properties[prop],dict):
environment.append(prop+"="+str(properties[prop]))
return environment
def get_port_map(self,properties):
if 'ports_mapping' in properties:
ports_mappings = properties['ports_mapping']
port_maps = []
for port_map_key in ports_mappings:
host_port = ports_mappings[port_map_key]['host_port']
if not isinstance(host_port, (int, long, float, complex)):
host_port_var = host_port.replace('${','').replace('}','')
host_port = properties[host_port_var]
container_port = ports_mappings[port_map_key]['container_port']
if not isinstance(container_port, (int, long, float, complex)):
container_port_var = container_port.replace('${','').replace('}','')
container_port = properties[container_port_var]
port_maps.append(str(host_port)+':'+str(container_port))
return port_maps
def analyze_yaml(self): def analyze_yaml(self):
docker_types = self.get_docker_types() docker_types = self.get_docker_types()
node_templates = self.get_node_templates() node_templates = self.get_node_templates()
services = []
services = {}
for node_template_key in node_templates: for node_template_key in node_templates:
for docker_type in docker_types: for docker_type in docker_types:
if docker_type in node_templates[node_template_key]['type']: if docker_type in node_templates[node_template_key]['type']:
if 'artifacts' in node_templates[node_template_key]: service = {}
artifacts = node_templates[node_template_key]['artifacts'] service['id'] = node_template_key
artifacts = self.get_artifacts(node_templates[node_template_key])
if artifacts:
key = next(iter(artifacts)) key = next(iter(artifacts))
docker_file = artifacts[key]['file'] docker_file = artifacts[key]['file']
services['name'] = docker_file service['name'] = docker_file
services['image'] = docker_file service['image'] = docker_file
services['id'] = node_template_key
if 'properties' in node_templates[node_template_key]: properties = self.get_properties(node_templates[node_template_key])
properties = node_templates[node_template_key]['properties'] environment = self.get_enviroment_vars(properties)
environment = [] service['environment'] = environment
for prop in properties:
if not isinstance(properties[prop],dict): port_maps = self.get_port_map(properties)
environment.append(prop+"="+str(properties[prop])) service['ports'] = port_maps
services['environment'] = environment services.append(service)
if 'ports_mapping' in properties: # print service
ports_mappings = properties['ports_mapping'] break
key = next(iter(ports_mappings)) return services
host_port = ports_mappings[key]['host_port']
if not isinstance(host_port, (int, long, float, complex)):
host_port_var = host_port.replace('${','').replace('}','')
host_port = properties[host_port_var]
container_port = ports_mappings[key]['container_port']
if not isinstance(container_port, (int, long, float, complex)):
container_port_var = container_port.replace('${','').replace('}','')
container_port = properties[container_port_var]
ports = []
ports.append(str(host_port)+':'+str(container_port))
services['ports'] = ports
print services
def analize_tosca(): def analize_tosca():
dockers = [] dockers = []
......
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