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

implementing vm scaling. We hit null pointer exception at EGISEngine line 654

parent 97fcf58a
......@@ -182,8 +182,8 @@ provisioner to request for cloud resources.</span>
<td> <span class="datatype-description">This class represents a description of provisioned resources</span>
</td>
</tr>
<tr class="clickable-row" data-href="json_ScaleDeploymetRequest.html">
<td> <span class="datatype-name">ScaleDeploymetRequest</span>
<tr class="clickable-row" data-href="json_ScaleRequest.html">
<td> <span class="datatype-name">ScaleRequest</span>
</td>
<td> <span class="datatype-description">This class represents a scale request for a deployment. At the moment we only
support swarm.</span>
......@@ -365,8 +365,8 @@ provisioner to request for cloud resources.</span>
<td> <span class="datatype-description">This class represents a description of provisioned resources</span>
</td>
</tr>
<tr class="clickable-row" data-href="xml_ns0_scaleDeploymetRequest.html">
<td> <span class="datatype-name">scaleDeploymetRequest</span>
<tr class="clickable-row" data-href="xml_ns0_scaleRequest.html">
<td> <span class="datatype-name">scaleRequest</span>
</td>
<td> <span class="datatype-description">This class represents a scale request for a deployment. At the moment we only
support swarm.</span>
......
......@@ -72,7 +72,7 @@
<h1 class="page-header">Files and Libraries</h1>
<h3 id="artifact_gwt_json_overlay">GWT JSON Overlay</h3>
<p class="lead">Created July 12, 2017</p>
<p class="lead">Created July 14, 2017</p>
<p> <p>
The <a href="http://code.google.com/webtoolkit/">Google Web Toolkit</a> JSON Overlay library provides the JSON Overlays that
can be used to access the Web service API for this application.
......@@ -91,13 +91,13 @@
<tbody data-link="row" class="rowlink">
<tr class="clickable-row" data-href="drip-api-gwt-json-overlay.jar">
<td><span class="downloadfile-name">drip-api-gwt-json-overlay.jar</span></td>
<td><span class="downloadfile-size">13.55K</span></td>
<td><span class="downloadfile-size">13.51K</span></td>
<td><span class="downloadfile-description">The sources for the GWT JSON overlay.</span></td>
</tr>
</tbody>
</table>
<h3 id="artifact_java_json_client_library">Java JSON Client Library</h3>
<p class="lead">Created July 12, 2017</p>
<p class="lead">Created July 14, 2017</p>
<p><p>
The Java client-side library is used to provide the set of Java objects that can be serialized
to/from JSON using <a href="http://jackson.codehaus.org/">Jackson</a>. This is useful for accessing the
......@@ -116,18 +116,18 @@
<tbody data-link="row" class="rowlink">
<tr class="clickable-row" data-href="drip-api-json-client.jar">
<td><span class="downloadfile-name">drip-api-json-client.jar</span></td>
<td><span class="downloadfile-size">16.84K</span></td>
<td><span class="downloadfile-size">16.80K</span></td>
<td><span class="downloadfile-description">The binaries for the Java JSON client library.</span></td>
</tr>
<tr class="clickable-row" data-href="drip-api-json-client-json-sources.jar">
<td><span class="downloadfile-name">drip-api-json-client-json-sources.jar</span></td>
<td><span class="downloadfile-size">14.00K</span></td>
<td><span class="downloadfile-size">13.97K</span></td>
<td><span class="downloadfile-description">The sources for the Java JSON client library.</span></td>
</tr>
</tbody>
</table>
<h3 id="artifact_java_xml_client_library">Java XML Client Library</h3>
<p class="lead">Created July 12, 2017</p>
<p class="lead">Created July 14, 2017</p>
<p><p>
The Java client-side library is used to access the Web service API for this application using Java.
</p>
......@@ -144,18 +144,18 @@
<tbody data-link="row" class="rowlink">
<tr class="clickable-row" data-href="drip-api-xml-client.jar">
<td><span class="downloadfile-name">drip-api-xml-client.jar</span></td>
<td><span class="downloadfile-size">24.61K</span></td>
<td><span class="downloadfile-size">24.60K</span></td>
<td><span class="downloadfile-description">The binaries for the Java XML client library.</span></td>
</tr>
<tr class="clickable-row" data-href="drip-api-xml-client-xml-sources.jar">
<td><span class="downloadfile-name">drip-api-xml-client-xml-sources.jar</span></td>
<td><span class="downloadfile-size">22.41K</span></td>
<td><span class="downloadfile-size">22.39K</span></td>
<td><span class="downloadfile-description">The sources for the Java XML client library.</span></td>
</tr>
</tbody>
</table>
<h3 id="artifact_js_client_library">JavaScript Client Library</h3>
<p class="lead">Created July 12, 2017</p>
<p class="lead">Created July 14, 2017</p>
<p><p>
The JavaScript client-side library defines classes that can be (de)serialized to/from JSON.
This is useful for accessing the resources that are published by this application, but only
......@@ -184,13 +184,13 @@
<tbody data-link="row" class="rowlink">
<tr class="clickable-row" data-href="drip-api-js.zip">
<td><span class="downloadfile-name">drip-api-js.zip</span></td>
<td><span class="downloadfile-size">5.26K</span></td>
<td><span class="downloadfile-size">5.27K</span></td>
<td><span class="downloadfile-description">&nbsp;</span></td>
</tr>
</tbody>
</table>
<h3 id="artifact_php_json_client_library">PHP JSON Client Library</h3>
<p class="lead">Created July 12, 2017</p>
<p class="lead">Created July 14, 2017</p>
<p><p>
The PHP JSON client-side library defines the PHP classes that can be (de)serialized to/from JSON.
This is useful for accessing the resources that are published by this application, but only
......@@ -213,13 +213,13 @@
<tbody data-link="row" class="rowlink">
<tr class="clickable-row" data-href="drip-api-php.zip">
<td><span class="downloadfile-name">drip-api-php.zip</span></td>
<td><span class="downloadfile-size">5.90K</span></td>
<td><span class="downloadfile-size">5.89K</span></td>
<td><span class="downloadfile-description">&nbsp;</span></td>
</tr>
</tbody>
</table>
<h3 id="artifact_php_xml_client_library">PHP XML Client Library</h3>
<p class="lead">Created July 12, 2017</p>
<p class="lead">Created July 14, 2017</p>
<p><p>
The PHP client-side library defines the PHP classes that can be (de)serialized to/from XML.
This is useful for accessing the resources that are published by this application, but only
......@@ -245,13 +245,13 @@
<tbody data-link="row" class="rowlink">
<tr class="clickable-row" data-href="drip-api-php.zip">
<td><span class="downloadfile-name">drip-api-php.zip</span></td>
<td><span class="downloadfile-size">9.01K</span></td>
<td><span class="downloadfile-size">8.99K</span></td>
<td><span class="downloadfile-description">&nbsp;</span></td>
</tr>
</tbody>
</table>
<h3 id="artifact_ruby_json_client_library">Ruby JSON Client Library</h3>
<p class="lead">Created July 12, 2017</p>
<p class="lead">Created July 14, 2017</p>
<p><p>
The Ruby JSON client-side library defines the Ruby classes that can be (de)serialized to/from JSON.
This is useful for accessing the REST endpoints that are published by this application, but only
......@@ -276,7 +276,7 @@
<tbody data-link="row" class="rowlink">
<tr class="clickable-row" data-href="drip-api.rb">
<td><span class="downloadfile-name">drip-api.rb</span></td>
<td><span class="downloadfile-size">75.64K</span></td>
<td><span class="downloadfile-size">75.70K</span></td>
<td><span class="downloadfile-description">&nbsp;</span></td>
</tr>
</tbody>
......
This diff is collapsed.
......@@ -273,6 +273,7 @@ provisopned based on a TOSCA description.</span>
</samp></li><li><samp> <span class="resource-path">/user/v1.0/provisioner/ids</span>
</samp></li><li><samp> <span class="resource-path">/user/v1.0/provisioner/provision</span>
</samp></li><li><samp> <span class="resource-path">/user/v1.0/provisioner/sample</span>
</samp></li><li><samp> <span class="resource-path">/user/v1.0/provisioner/scale</span>
</samp></li><li><samp> <span class="resource-path">/user/v1.0/provisioner/{id}</span>
</samp></li><li><samp> <span class="resource-path">/user/v1.0/provisioner/post/provision</span>
</samp></li></ul></td>
......@@ -280,6 +281,7 @@ provisopned based on a TOSCA description.</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">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">DELETE</span> <span class="label label-default resource-method">GET</span>
</samp></li><li><samp> <span class="label label-default resource-method">POST</span>
</samp></li></ul></td>
......@@ -512,8 +514,8 @@ provisioner to request for cloud resources.</span>
<td> <span class="datatype-description">This class represents a description of provisioned resources</span>
</td>
</tr>
<tr class="clickable-row" data-href="json_ScaleDeploymetRequest.html">
<td> <span class="datatype-name">ScaleDeploymetRequest</span>
<tr class="clickable-row" data-href="json_ScaleRequest.html">
<td> <span class="datatype-name">ScaleRequest</span>
</td>
<td> <span class="datatype-description">This class represents a scale request for a deployment. At the moment we only
support swarm.</span>
......@@ -695,8 +697,8 @@ provisioner to request for cloud resources.</span>
<td> <span class="datatype-description">This class represents a description of provisioned resources</span>
</td>
</tr>
<tr class="clickable-row" data-href="xml_ns0_scaleDeploymetRequest.html">
<td> <span class="datatype-name">scaleDeploymetRequest</span>
<tr class="clickable-row" data-href="xml_ns0_scaleRequest.html">
<td> <span class="datatype-name">scaleRequest</span>
</td>
<td> <span class="datatype-description">This class represents a scale request for a deployment. At the moment we only
support swarm.</span>
......
......@@ -81,7 +81,7 @@ class</p>
</thead>
<tbody>
<tr>
<td> <span class="property-name">vmType</span>
<td> <span class="property-name">host</span>
</td>
<td> <span class="datatype-reference">string
</span>
......@@ -90,43 +90,43 @@ class</p>
</td>
</tr>
<tr>
<td> <span class="property-name">delta</span>
<td> <span class="property-name">cloudDeploymentDomain</span>
</td>
<td> <span class="datatype-reference">number
<td> <span class="datatype-reference">string
</span>
</td>
<td> <span class="property-description"></span>
</td>
</tr>
<tr>
<td> <span class="property-name">cloudDeploymentDomain</span>
<td> <span class="property-name">delta</span>
</td>
<td> <span class="datatype-reference">string
<td> <span class="datatype-reference">number
</span>
</td>
<td> <span class="property-description"></span>
</td>
</tr>
<tr>
<td> <span class="property-name">start</span>
<td> <span class="property-name">vmType</span>
</td>
<td> <span class="datatype-reference">number
<td> <span class="datatype-reference">string
</span>
</td>
<td> <span class="property-description"></span>
</td>
</tr>
<tr>
<td> <span class="property-name">host</span>
<td> <span class="property-name">end</span>
</td>
<td> <span class="datatype-reference">string
<td> <span class="datatype-reference">number
</span>
</td>
<td> <span class="property-description"></span>
</td>
</tr>
<tr>
<td> <span class="property-name">end</span>
<td> <span class="property-name">start</span>
</td>
<td> <span class="datatype-reference">number
</span>
......@@ -165,12 +165,12 @@ object is saved.</span></td>
<p class="lead">Example</p>
<pre class="prettyprint language-js example">{
&quot;vmType&quot; : &quot;...&quot;,
&quot;delta&quot; : 12345,
&quot;cloudDeploymentDomain&quot; : &quot;us-east-1&quot;,
&quot;start&quot; : 12345,
&quot;host&quot; : &quot;147.228.242.58&quot;,
&quot;cloudDeploymentDomain&quot; : &quot;us-east-1&quot;,
&quot;delta&quot; : 12345,
&quot;vmType&quot; : &quot;...&quot;,
&quot;end&quot; : 12345,
&quot;start&quot; : 12345,
&quot;owner&quot; : &quot;user1&quot;,
&quot;id&quot; : &quot;58e3946e0fb4f562d84ba1ad&quot;,
&quot;timestamp&quot; : 1499793079011
......
......@@ -102,7 +102,7 @@ pair is only used by kubernetes</p>
<tr>
<td> <span class="property-name">scale</span>
</td>
<td> <span class="datatype-reference"><a href="json_ScaleDeploymetRequest.html">ScaleDeploymetRequest</a>
<td> <span class="datatype-reference"><a href="json_ScaleRequest.html">ScaleRequest</a>
</span>
</td>
<td> <span class="property-description">The scale information if any for this deployment</span>
......@@ -190,8 +190,8 @@ object is saved.</span></td>
&quot;timestamp&quot; : 1499793079011
},
&quot;scale&quot; : {
&quot;deployID&quot; : &quot;58e3946e0fb4f562d84ba1ad&quot;,
&quot;serviceName&quot; : &quot;telegreen_db&quot;,
&quot;scaleTargetID&quot; : &quot;58e3946e0fb4f562d84ba1ad&quot;,
&quot;scaleTargetName&quot; : &quot;telegreen_db&quot;,
&quot;numOfInstances&quot; : 5,
&quot;owner&quot; : &quot;user1&quot;,
&quot;id&quot; : &quot;58e3946e0fb4f562d84ba1ad&quot;,
......
......@@ -69,7 +69,7 @@ class</p>
<dl class="dl-horizontal">
<dt>Subtypes</dt>
<dd><a href="json_KeyPair.html">KeyPair</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>, <a href="json_ScaleDeploymetRequest.html">ScaleDeploymetRequest</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_ProvisionRequest.html">ProvisionRequest</a>, <a href="json_Script.html">Script</a>, <a href="json_KeyValueHolder.html">KeyValueHolder</a>, <a href="json_DeployRequest.html">DeployRequest</a>, <a href="json_ProvisionResponse.html">ProvisionResponse</a></dd>
</dl>
<table class="table datatype-properties">
......
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="utf-8">
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<meta name="viewport" content="width=device-width, initial-scale=1">
<!-- The above 3 meta tags *must* come first in the head; any other head content must come *after* these tags -->
<title>drip-api: ScaleRequest</title>
<!-- Mobile viewport optimized: j.mp/bplateviewport -->
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<!-- Bootstrap core CSS -->
<link rel="stylesheet" href="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.4/css/bootstrap.min.css">
<!--custom css for these pages-->
<link rel="stylesheet" href="css/style.css">
<!-- HTML5 shim and Respond.js for IE8 support of HTML5 elements and media queries -->
<!--[if lt IE 9]>
<script src="https://oss.maxcdn.com/html5shiv/3.7.2/html5shiv.min.js"></script>
<script src="https://oss.maxcdn.com/respond/1.4.2/respond.min.js"></script>
<![endif]-->
</head>
<body data-spy="scroll" data-target="#apinav">
<nav class="navbar navbar-inverse navbar-fixed-top">
<div class="container-fluid">
<div class="navbar-header">
<button type="button" class="navbar-toggle collapsed" data-toggle="collapse" data-target="#navbar">
<span class="sr-only">Toggle navigation</span>
<span class="icon-bar"></span>
<span class="icon-bar"></span>
<span class="icon-bar"></span>
</button>
<a class="navbar-brand" href="index.html">drip-api: ScaleRequest</a>
</div>
<div id="navbar" class="navbar-collapse collapse">
<ul class="nav navbar-nav navbar-right">
<li><a href="resources.html">Resources</a></li>
<li><a href="data.html">Data Types</a></li>
<li><a href="downloads.html">Files and Libraries</a></li>
</ul>
</div>
</div>
</nav>
<div class="container-fluid">
<div class="row">
<div class="col-sm-3 col-md-2 sidebar" id="apinav">
<ul class="nav nav-sidebar">
<li class="text-right"><a href="#top"><small>Back to Top</small></a></li>
</ul>
</div>
<div class="col-sm-9 col-sm-offset-3 col-md-10 col-md-offset-2 main">
<ol class="breadcrumb" id="top">
<li class="active dropdown"><a href="index.html">Home</a></li>
<li class="active dropdown"><a href="syntax_json.html">JSON</a></li>
<li class="dropdown"><a href="json_ScaleRequest.html">ScaleRequest</a></li>
</ol>
<h1 class="page-header">ScaleRequest <small>Data Type</small></h1>
<p>This class represents a scale request for a deployment. At the moment we only
support swarm.</p>
<dl class="dl-horizontal">
</dl>
<table class="table datatype-properties">
<caption>Properties</caption>
<thead>
<tr>
<th>name</th>
<th>data type</th>
<th>description</th>
</tr>
</thead>
<tbody>
<tr>
<td> <span class="property-name">scaleTargetID</span>
</td>
<td> <span class="datatype-reference">string
</span>
</td>
<td> <span class="property-description">The ID of the deployment or provisioned resources to scale. For
deployment scale only swarm deployments are supported.</span>
</td>
</tr>
<tr>
<td> <span class="property-name">scaleTargetName</span>
</td>
<td> <span class="datatype-reference">string
</span>
</td>
<td> <span class="property-description">The name of the service or topology to scale.</span>
</td>
</tr>
<tr>
<td> <span class="property-name">numOfInstances</span>
</td>
<td> <span class="datatype-reference">number
</span>
</td>
<td> <span class="property-description">The number of instances to start. This number is absolute not cumulative.
If we have 2 instances running and we request for 3 we'll have 3 if we
request 1 we'll have 1</span>
</td>
</tr>
</tbody>
<tr>
<td colspan="3"><h5 class="text-muted">Properties inherited from <a href="json_OwnedObject.html">OwnedObject</a></h5></td>
</tr>
<tbody>
<tr>
<td><span class="property-name">owner</span></td>
<td><span class="datatype-reference">string
</span></td>
<td><span class="property-description">The owner (username) for the particular object. This value is set when
the DAO saves the object based on the principal how made the call</span></td>
</tr>
<tr>
<td><span class="property-name">id</span></td>
<td><span class="datatype-reference">string
</span></td>
<td><span class="property-description">The UID of this object. This value is auto generated by the DAO when the
object is saved.</span></td>
</tr>
<tr>
<td><span class="property-name">timestamp</span></td>
<td><span class="datatype-reference">number
</span></td>
<td><span class="property-description">The object's creation date in unix time stamp</span></td>
</tr>
</tbody>
</table>
<p class="lead">Example</p>
<pre class="prettyprint language-js example">{
&quot;scaleTargetID&quot; : &quot;58e3946e0fb4f562d84ba1ad&quot;,
&quot;scaleTargetName&quot; : &quot;telegreen_db&quot;,
&quot;numOfInstances&quot; : 5,
&quot;owner&quot; : &quot;user1&quot;,
&quot;id&quot; : &quot;58e3946e0fb4f562d84ba1ad&quot;,
&quot;timestamp&quot; : 1499793079011
}</pre>
<footer class="footer">
<div class="container">
<p class="text-muted">Generated by <a href="http://enunciate.webcohesion.com">Enunciate</a>.</p>
</div>
</footer>
</div>
</div>
</div>
<!-- JavaScript placed at the end of the document so the pages load faster. -->
<script src="https://cdnjs.cloudflare.com/ajax/libs/jquery/1.11.2/jquery.min.js"></script>
<!-- Bootstrap core JavaScript
================================================== -->
<script src="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.4/js/bootstrap.min.js"></script>
<!-- prettify code blocks. see http://code.google.com/p/google-code-prettify/ -->
<script src="https://cdn.rawgit.com/google/code-prettify/master/loader/run_prettify.js" type="text/javascript"></script>
<script>
$(function() {
$(".clickable-row").click(function() {
window.document.location = $(this).data("href");
});
$('[data-toggle="tooltip"]').tooltip()
});
</script>
</body>
</html>
......@@ -363,7 +363,7 @@ pair is only used by kubernetes]]>
<xs:sequence>
<xs:element name="ansibleOutputList" type="xs:string" minOccurs="0" maxOccurs="unbounded">
</xs:element>
<xs:element name="scale" type="scaleDeploymetRequest" minOccurs="0">
<xs:element name="scale" type="scaleRequest" minOccurs="0">
<xs:annotation>
<xs:documentation>
<![CDATA[The scale information if any for this deployment]]>
......@@ -615,7 +615,7 @@ provisioner to request for cloud resources.]]>
</xs:complexContent>
</xs:complexType>
<xs:complexType name="scaleDeploymetRequest">
<xs:complexType name="scaleRequest">
<xs:annotation>
<xs:documentation>
<![CDATA[This class represents a scale request for a deployment. At the moment we only
......@@ -625,26 +625,27 @@ support swarm.]]>
<xs:complexContent>
<xs:extension base="ownedObject">
<xs:sequence>
<xs:element name="deployID" type="xs:string" minOccurs="0">
<xs:element name="scaleTargetID" type="xs:string" minOccurs="0">
<xs:annotation>
<xs:documentation>
<![CDATA[The deployment ID. At the moment only swarm deployments are supported.]]>
<![CDATA[The ID of the deployment or provisioned resources to scale. For
deployment scale only swarm deployments are supported.]]>
</xs:documentation>
</xs:annotation>
</xs:element>
<xs:element name="serviceName" type="xs:string" minOccurs="0">
<xs:element name="scaleTargetName" type="xs:string" minOccurs="0">
<xs:annotation>
<xs:documentation>
<![CDATA[The name of the service to scale.]]>
<![CDATA[The name of the service or topology to scale.]]>
</xs:documentation>
</xs:annotation>
</xs:element>
<xs:element name="numOfInstances" type="xs:int" minOccurs="1">
<xs:annotation>
<xs:documentation>
<![CDATA[The number of services to start. This number is absolute not cumulative.
If we have 2 service numbers running and we request for 3 we'll have 3 if
we request 1 we'll have 1]]>
<![CDATA[The number of instances to start. This number is absolute not cumulative.
If we have 2 instances running and we request for 3 we'll have 3 if we
request 1 we'll have 1]]>
</xs:documentation>
</xs:annotation>
</xs:element>
......@@ -807,14 +808,14 @@ class]]>
</xs:element>
<xs:element name="host" type="xs:string" minOccurs="0">
</xs:element>
<xs:element name="delta" type="xs:dateTime" minOccurs="0">
</xs:element>
<xs:element name="end" type="xs:dateTime" minOccurs="0">
</xs:element>
<xs:element name="cloudDeploymentDomain" type="xs:string" minOccurs="0">
</xs:element>
<xs:element name="vmType" type="xs:string" minOccurs="0">
</xs:element>
<xs:element name="end" type="xs:dateTime" minOccurs="0">
</xs:element>
<xs:element name="delta" type="xs:dateTime" minOccurs="0">
</xs:element>
</xs:sequence>
</xs:extension>
</xs:complexContent>
......
......@@ -144,12 +144,12 @@ Content-Type: application/json
<code class="prettyprint language-js">
[ {
&quot;vmType&quot; : &quot;...&quot;,
&quot;delta&quot; : 12345,
&quot;cloudDeploymentDomain&quot; : &quot;us-east-1&quot;,
&quot;start&quot; : 12345,
&quot;host&quot; : &quot;147.228.242.58&quot;,
&quot;cloudDeploymentDomain&quot; : &quot;us-east-1&quot;,
&quot;delta&quot; : 12345,
&quot;vmType&quot; : &quot;...&quot;,
&quot;end&quot; : 12345,
&quot;start&quot; : 12345,
&quot;owner&quot; : &quot;user1&quot;,
&quot;id&quot; : &quot;58e3946e0fb4f562d84ba1ad&quot;,
&quot;timestamp&quot; : 1499793079011
......@@ -514,12 +514,12 @@ Content-Type: application/json
<code class="prettyprint language-js">
{
&quot;vmType&quot; : &quot;...&quot;,
&quot;delta&quot; : 12345,
&quot;cloudDeploymentDomain&quot; : &quot;us-east-1&quot;,
&quot;start&quot; : 12345,
&quot;host&quot; : &quot;147.228.242.58&quot;,
&quot;cloudDeploymentDomain&quot; : &quot;us-east-1&quot;,
&quot;delta&quot; : 12345,
&quot;vmType&quot; : &quot;...&quot;,
&quot;end&quot; : 12345,
&quot;start&quot; : 12345,
&quot;owner&quot; : &quot;user1&quot;,
&quot;id&quot; : &quot;58e3946e0fb4f562d84ba1ad&quot;,
&quot;timestamp&quot; : 1499793079011
......
......@@ -458,12 +458,12 @@ Content-Type: application/json
<tbody>
<tr>
<td><abbr data-toggle="tooltip" data-placement="top" title="Use the &quot;Content-Type: application/json&quot; HTTP header to specify this media type to the server."><span class="request-type">application/json</span></abbr></td>
<td><span class="datatype-reference"><a href="json_ScaleDeploymetRequest.html">ScaleDeploymetRequest</a>
<td><span class="datatype-reference"><a href="json_ScaleRequest.html">ScaleRequest</a>
(JSON)</span></td>
</tr>
<tr>
<td><abbr data-toggle="tooltip" data-placement="top" title="Use the &quot;Content-Type: application/xml&quot; HTTP header to specify this media type to the server."><span class="request-type">application/xml</span></abbr></td>
<td><span class="datatype-reference"><a href="xml_ns0_scaleDeploymetRequest.html">scaleDeploymetRequest</a>
<td><span class="datatype-reference"><a href="xml_ns0_scaleRequest.html">scaleRequest</a>
(XML)</span></td>
</tr>
</tbody>
......@@ -519,8 +519,8 @@ Accept: application/json
<code class="prettyprint language-js">
{
&quot;deployID&quot; : &quot;58e3946e0fb4f562d84ba1ad&quot;,
&quot;serviceName&quot; : &quot;telegreen_db&quot;,
&quot;scaleTargetID&quot; : &quot;58e3946e0fb4f562d84ba1ad&quot;,
&quot;scaleTargetName&quot; : &quot;telegreen_db&quot;,
&quot;numOfInstances&quot; : 5,
&quot;owner&quot; : &quot;user1&quot;,
&quot;id&quot; : &quot;58e3946e0fb4f562d84ba1ad&quot;,
......@@ -767,8 +767,8 @@ Content-Type: application/json
&quot;timestamp&quot; : 1499793079011
},
&quot;scale&quot; : {
&quot;deployID&quot; : &quot;58e3946e0fb4f562d84ba1ad&quot;,
&quot;serviceName&quot; : &quot;telegreen_db&quot;,
&quot;scaleTargetID&quot; : &quot;58e3946e0fb4f562d84ba1ad&quot;,
&quot;scaleTargetName&quot; : &quot;telegreen_db&quot;,
&quot;numOfInstances&quot; : 5,
&quot;owner&quot; : &quot;user1&quot;,
&quot;id&quot; : &quot;58e3946e0fb4f562d84ba1ad&quot;,
......
......@@ -55,6 +55,7 @@
<li><a href="#resource_ProvisionController_getIds_GET">GET /user/v1.0/provisioner/ids</a></li>
<li><a href="#resource_ProvisionController_provision_POST"><abbr title="POST /user/v1.0/provisioner/provision">POST /user/v1.0/provisioner/pr...</abbr></a></li>
<li><a href="#resource_ProvisionController_sample_GET"><abbr title="GET /user/v1.0/provisioner/sample">GET /user/v1.0/provisioner/sam...</abbr></a></li>
<li><a href="#resource_ProvisionController_scaleDeployment_POST"><abbr title="POST /user/v1.0/provisioner/scale">POST /user/v1.0/provisioner/sc...</abbr></a></li>
<li><a href="#resource_ProvisionController_delete_DELETE"><abbr title="DELETE /user/v1.0/provisioner/{id}">DELETE /user/v1.0/provisioner/...</abbr></a></li>
<li><a href="#resource_ProvisionController_get_GET"><abbr title="GET /user/v1.0/provisioner/{id}">GET /user/v1.0/provisioner/{id...</abbr></a></li>
<li><a href="#resource_ProvisionController_postProvisionResponse_POST"><abbr title="POST /user/v1.0/provisioner/post/provision">POST /user/v1.0/provisioner/po...</abbr></a></li>
......@@ -433,6 +434,113 @@ Content-Type: application/json
</div>
</div>
<div id="resource_ProvisionController_scaleDeployment_POST">
<h3><span class="label label-default resource-method">POST</span> <span class="resource-path">/user/v1.0/provisioner/scale <a href="../user/v1.0/provisioner/scale" class="glyphicon glyphicon-new-window" target="_blank"></a></span></h3>
<p></p>
<dl class="dl-horizontal">
<dt>Security Roles Allowed</dt>
<dd>ADMIN, USER</dd>
</dl>
<table class="table resource-request-body">
<caption>Request Body</caption>
<thead>
<tr>
<th>media type</th>
<th>data type</th>
</tr>
</thead>
<tbody>
<tr>
<td><abbr data-toggle="tooltip" data-placement="top" title="Use the &quot;Content-Type: application/json&quot; HTTP header to specify this media type to the server."><span class="request-type">application/json</span></abbr></td>
<td><span class="datatype-reference"><a href="json_ScaleRequest.html">ScaleRequest</a>
(JSON)</span></td>
</tr>
<tr>
<td><abbr data-toggle="tooltip" data-placement="top" title="Use the &quot;Content-Type: application/xml&quot; HTTP header to specify this media type to the server."><span class="request-type">application/xml</span></abbr></td>
<td><span class="datatype-reference"><a href="xml_ns0_scaleRequest.html">scaleRequest</a>
(XML)</span></td>
</tr>
</tbody>
</table>
<table class="table resource-response-codes">
<caption>Response Codes</caption>
<thead>
<tr>
<th>code</th>
<th>condition</th>
</tr>
</thead>
<tbody>
<tr>
<td><span class="label label-warning response-code">401</span></td>
<td><span class="response-condition">Bad credentials</span></td>
</tr>
</tbody>
</table>
<table class="table resource-response-body">
<caption>Response Body</caption>
<thead>
<tr>
<th>media type</th>
<th>data type</th>
</tr>
</thead>
<tbody>
<tr>
<td><abbr data-toggle="tooltip" data-placement="top" title="Use the &quot;Accept: application/json&quot; HTTP header to request that this media type be provided by the server."><span class="response-type">application/json</span></abbr></td>
<td><span class="datatype-reference">string
(JSON)</span></td>
</tr>
<tr>
<td><abbr data-toggle="tooltip" data-placement="top" title="Use the &quot;Accept: application/xml&quot; HTTP header to request that this media type be provided by the server."><span class="response-type">application/xml</span></abbr></td>
<td><span class="datatype-reference">string
(XML)</span></td>
</tr>
</tbody>
</table>
<h4>Example</h4>
<div class="container-fluid example panel">
<div class="row panel-body">
<div class="col-md-6">
<h5>Request</h5>
<pre>
POST /user/v1.0/provisioner/scale
Content-Type: application/json
Accept: application/json
<code class="prettyprint language-js">
{
&quot;scaleTargetID&quot; : &quot;58e3946e0fb4f562d84ba1ad&quot;,
&quot;scaleTargetName&quot; : &quot;telegreen_db&quot;,
&quot;numOfInstances&quot; : 5,
&quot;owner&quot; : &quot;user1&quot;,
&quot;id&quot; : &quot;58e3946e0fb4f562d84ba1ad&quot;,
&quot;timestamp&quot; : 1499793079011
}
</code>
</pre>
</div>
<div class="col-md-6">
<h5>Response</h5>
<pre>
HTTP/1.1 201 Looks Good
Content-Type: application/json
<code class="prettyprint language-txt">
...
</code>
</pre>
</div>
</div>
</div>
</div>
<div id="resource_ProvisionController_delete_DELETE">
<h3><span class="label label-default resource-method">DELETE</span> <span class="resource-path">/user/v1.0/provisioner/{id} <a href="../user/v1.0/provisioner/{id}" class="glyphicon glyphicon-new-window" target="_blank"></a></span></h3>
......
......@@ -265,6 +265,7 @@ provisopned based on a TOSCA description.</span>
</samp></li><li><samp> <span class="resource-path">/user/v1.0/provisioner/ids</span>
</samp></li><li><samp> <span class="resource-path">/user/v1.0/provisioner/provision</span>
</samp></li><li><samp> <span class="resource-path">/user/v1.0/provisioner/sample</span>
</samp></li><li><samp> <span class="resource-path">/user/v1.0/provisioner/scale</span>
</samp></li><li><samp> <span class="resource-path">/user/v1.0/provisioner/{id}</span>
</samp></li><li><samp> <span class="resource-path">/user/v1.0/provisioner/post/provision</span>
</samp></li></ul></td>
......@@ -272,6 +273,7 @@ provisopned based on a TOSCA description.</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">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">DELETE</span> <span class="label label-default resource-method">GET</span>
</samp></li><li><samp> <span class="label label-default resource-method">POST</span>
</samp></li></ul></td>
......
......@@ -177,8 +177,8 @@ provisioner to request for cloud resources.</span>
<td> <span class="datatype-description">This class represents a description of provisioned resources</span>
</td>
</tr>
<tr class="clickable-row" data-href="json_ScaleDeploymetRequest.html">
<td> <span class="datatype-name">ScaleDeploymetRequest</span>
<tr class="clickable-row" data-href="json_ScaleRequest.html">
<td> <span class="datatype-name">ScaleRequest</span>
</td>
<td> <span class="datatype-description">This class represents a scale request for a deployment. At the moment we only
support swarm.</span>
......
......@@ -222,8 +222,8 @@ provisioner to request for cloud resources.</span>
<td> <span class="datatype-description">This class represents a description of provisioned resources</span>
</td>
</tr>
<tr class="clickable-row" data-href="xml_ns0_scaleDeploymetRequest.html">
<td> <span class="datatype-name">scaleDeploymetRequest</span>
<tr class="clickable-row" data-href="xml_ns0_scaleRequest.html">
<td> <span class="datatype-name">scaleRequest</span>
</td>
<td> <span class="datatype-description">This class represents a scale request for a deployment. At the moment we only
support swarm.</span>
......
......@@ -233,10 +233,10 @@ the DAO saves the object based on the principal how made the call</span></td>
<pre class="prettyprint language-xml example">&lt;b-----&gt;
&lt;start&gt;...&lt;/start&gt;
&lt;host&gt;147.228.242.58&lt;/host&gt;
&lt;delta&gt;...&lt;/delta&gt;
&lt;end&gt;...&lt;/end&gt;
&lt;cloudDeploymentDomain&gt;us-east-1&lt;/cloudDeploymentDomain&gt;
&lt;vmType&gt;...&lt;/vmType&gt;
&lt;end&gt;...&lt;/end&gt;
&lt;delta&gt;...&lt;/delta&gt;
&lt;owner&gt;user1&lt;/owner&gt;
&lt;timestamp&gt;1499793079011&lt;/timestamp&gt;
&lt;/b-----&gt;
......
......@@ -109,7 +109,7 @@ pair is only used by kubernetes</p>
<tr>
<td> <span class="property-name">scale</span>
</td>
<td> <span class="datatype-reference"><a href="xml_ns0_scaleDeploymetRequest.html">scaleDeploymetRequest</a>
<td> <span class="datatype-reference"><a href="xml_ns0_scaleRequest.html">scaleRequest</a>
</span>
</td>
<td> <span class="property-type">element
......@@ -205,8 +205,8 @@ the DAO saves the object based on the principal how made the call</span></td>
<pre class="prettyprint language-xml example">&lt;d-----&gt;
&lt;ansibleOutputList&gt;...&lt;/ansibleOutputList&gt;
&lt;scale&gt;
&lt;deployID&gt;58e3946e0fb4f562d84ba1ad&lt;/deployID&gt;
&lt;serviceName&gt;telegreen_db&lt;/serviceName&gt;
&lt;scaleTargetID&gt;58e3946e0fb4f562d84ba1ad&lt;/scaleTargetID&gt;
&lt;scaleTargetName&gt;telegreen_db&lt;/scaleTargetName&gt;
&lt;numOfInstances&gt;5&lt;/numOfInstances&gt;
&lt;owner&gt;user1&lt;/owner&gt;
&lt;timestamp&gt;1499793079011&lt;/timestamp&gt;
......
......@@ -73,7 +73,7 @@ class</p>
<dt>Schema</dt>
<dd><a href="ns0.xsd">ns0.xsd</a></dd>
<dt>Subtypes</dt>
<dd><a href="xml_ns0_cloudCredentials.html">cloudCredentials</a>, <a href="xml_ns0_deployRequest.html">deployRequest</a>, <a href="xml_ns0_deployResponse.html">deployResponse</a>, <a href="xml_ns0_keyPair.html">keyPair</a>, <a href="xml_ns0_keyValueHolder.html">keyValueHolder</a>, <a href="xml_ns0_provisionRequest.html">provisionRequest</a>, <a href="xml_ns0_provisionResponse.html">provisionResponse</a>, <a href="xml_ns0_scaleDeploymetRequest.html">scaleDeploymetRequest</a>, <a href="xml_ns0_script.html">script</a>, <a href="xml_ns0_ansibleOutput.html">ansibleOutput</a>, <a href="xml_ns0_benchmarkResult.html">benchmarkResult</a></dd>
<dd><a href="xml_ns0_cloudCredentials.html">cloudCredentials</a>, <a href="xml_ns0_deployRequest.html">deployRequest</a>, <a href="xml_ns0_deployResponse.html">deployResponse</a>, <a href="xml_ns0_keyPair.html">keyPair</a>, <a href="xml_ns0_keyValueHolder.html">keyValueHolder</a>, <a href="xml_ns0_provisionRequest.html">provisionRequest</a>, <a href="xml_ns0_provisionResponse.html">provisionResponse</a>, <a href="xml_ns0_scaleRequest.html">scaleRequest</a>, <a href="xml_ns0_script.html">script</a>, <a href="xml_ns0_ansibleOutput.html">ansibleOutput</a>, <a href="xml_ns0_benchmarkResult.html">benchmarkResult</a></dd>
</dl>
<table class="table datatype-properties">
......
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="utf-8">
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<meta name="viewport" content="width=device-width, initial-scale=1">
<!-- The above 3 meta tags *must* come first in the head; any other head content must come *after* these tags -->
<title>drip-api: scaleRequest</title>
<!-- Mobile viewport optimized: j.mp/bplateviewport -->
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<!-- Bootstrap core CSS -->
<link rel="stylesheet" href="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.4/css/bootstrap.min.css">
<!--custom css for these pages-->
<link rel="stylesheet" href="css/style.css">
<!-- HTML5 shim and Respond.js for IE8 support of HTML5 elements and media queries -->
<!--[if lt IE 9]>
<script src="https://oss.maxcdn.com/html5shiv/3.7.2/html5shiv.min.js"></script>
<script src="https://oss.maxcdn.com/respond/1.4.2/respond.min.js"></script>
<![endif]-->
</head>
<body data-spy="scroll" data-target="#apinav">
<nav class="navbar navbar-inverse navbar-fixed-top">
<div class="container-fluid">
<div class="navbar-header">
<button type="button" class="navbar-toggle collapsed" data-toggle="collapse" data-target="#navbar">
<span class="sr-only">Toggle navigation</span>
<span class="icon-bar"></span>
<span class="icon-bar"></span>
<span class="icon-bar"></span>
</button>
<a class="navbar-brand" href="index.html">drip-api: scaleRequest</a>
</div>
<div id="navbar" class="navbar-collapse collapse">
<ul class="nav navbar-nav navbar-right">
<li><a href="resources.html">Resources</a></li>
<li><a href="data.html">Data Types</a></li>
<li><a href="downloads.html">Files and Libraries</a></li>
</ul>
</div>
</div>
</nav>
<div class="container-fluid">
<div class="row">
<div class="col-sm-3 col-md-2 sidebar" id="apinav">
<ul class="nav nav-sidebar">
<li class="text-right"><a href="#top"><small>Back to Top</small></a></li>
</ul>
</div>
<div class="col-sm-9 col-sm-offset-3 col-md-10 col-md-offset-2 main">
<ol class="breadcrumb" id="top">
<li class="active dropdown"><a href="index.html">Home</a></li>
<li class="active dropdown"><a href="syntax_xml.html">XML</a></li>
<li class="dropdown"><a href="xml_ns0_scaleRequest.html">scaleRequest</a></li>
</ol>
<h1 class="page-header">scaleRequest <small>Data Type</small></h1>
<p>This class represents a scale request for a deployment. At the moment we only
support swarm.</p>
<dl class="dl-horizontal">
<dt>Namespace</dt>
<dd>(Default)</dd>
<dt>Schema</dt>
<dd><a href="ns0.xsd">ns0.xsd</a></dd>
</dl>
<table class="table datatype-properties">
<caption>Properties</caption>
<thead>
<tr>
<th>name</th>
<th>data type</th>
<th>type</th>
<th>namespace</th>
<th>min/max occurs</th>
<th>description</th>
</tr>
</thead>
<tbody>
<tr>
<td> <span class="property-name">numOfInstances</span>
</td>
<td> <span class="datatype-reference">int
</span>
</td>
<td> <span class="property-type">element
</span>
</td>
<td> <span class="property-namespaceInfo">
</span>
</td>
<td> <span class="property-minMaxOccurs">1/1
</span>
</td>
<td> <span class="property-description">The number of instances to start. This number is absolute not cumulative.
If we have 2 instances running and we request for 3 we'll have 3 if we
request 1 we'll have 1</span>
</td>
</tr>
<tr>
<td> <span class="property-name">scaleTargetID</span>
</td>
<td> <span class="datatype-reference">string
</span>
</td>
<td> <span class="property-type">element
</span>
</td>
<td> <span class="property-namespaceInfo">
</span>
</td>
<td> <span class="property-minMaxOccurs">0/1
</span>
</td>
<td> <span class="property-description">The ID of the deployment or provisioned resources to scale. For
deployment scale only swarm deployments are supported.</span>
</td>
</tr>
<tr>
<td> <span class="property-name">scaleTargetName</span>
</td>
<td> <span class="datatype-reference">string
</span>
</td>
<td> <span class="property-type">element
</span>
</td>
<td> <span class="property-namespaceInfo">
</span>
</td>
<td> <span class="property-minMaxOccurs">0/1
</span>
</td>
<td> <span class="property-description">The name of the service or topology to scale.</span>
</td>
</tr>
</tbody>
<tr>
<td colspan="6"><h5 class="text-muted">Properties inherited from <a href="xml_ns0_ownedObject.html">ownedObject</a></h5></td>
</tr>
<tbody>
<tr>
<td><span class="property-name">owner</span></td>
<td><span class="datatype-reference">string
</span></td>
<td><span class="property-type">element
</span></td>
<td><span class="property-namespaceInfo">
</span></td>
<td><span class="property-minMaxOccurs">0/1
</span></td>
<td><span class="property-description">The owner (username) for the particular object. This value is set when
the DAO saves the object based on the principal how made the call</span></td>
</tr>
<tr>
<td><span class="property-name">timestamp</span></td>
<td><span class="datatype-reference">long
</span></td>
<td><span class="property-type">element
</span></td>
<td><span class="property-namespaceInfo">
</span></td>
<td><span class="property-minMaxOccurs">0/1
</span></td>
<td><span class="property-description">The object's creation date in unix time stamp</span></td>
</tr>
</tbody>
</table>
<p class="lead">Example</p>
<pre class="prettyprint language-xml example">&lt;s-----&gt;
&lt;scaleTargetID&gt;58e3946e0fb4f562d84ba1ad&lt;/scaleTargetID&gt;
&lt;scaleTargetName&gt;telegreen_db&lt;/scaleTargetName&gt;
&lt;numOfInstances&gt;5&lt;/numOfInstances&gt;
&lt;owner&gt;user1&lt;/owner&gt;
&lt;timestamp&gt;1499793079011&lt;/timestamp&gt;
&lt;/s-----&gt;
</pre>
<footer class="footer">
<div class="container">
<p class="text-muted">Generated by <a href="http://enunciate.webcohesion.com">Enunciate</a>.</p>
</div>
</footer>
</div>
</div>
</div>
<!-- JavaScript placed at the end of the document so the pages load faster. -->
<script src="https://cdnjs.cloudflare.com/ajax/libs/jquery/1.11.2/jquery.min.js"></script>
<!-- Bootstrap core JavaScript
================================================== -->
<script src="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.4/js/bootstrap.min.js"></script>
<!-- prettify code blocks. see http://code.google.com/p/google-code-prettify/ -->
<script src="https://cdn.rawgit.com/google/code-prettify/master/loader/run_prettify.js" type="text/javascript"></script>
<script>
$(function() {
$(".clickable-row").click(function() {
window.document.location = $(this).data("href");
});
$('[data-toggle="tooltip"]').tooltip()
});
</script>
</body>
</html>
......@@ -182,8 +182,8 @@ provisioner to request for cloud resources.</span>
<td> <span class="datatype-description">This class represents a description of provisioned resources</span>
</td>
</tr>
<tr class="clickable-row" data-href="json_ScaleDeploymetRequest.html">
<td> <span class="datatype-name">ScaleDeploymetRequest</span>
<tr class="clickable-row" data-href="json_ScaleRequest.html">
<td> <span class="datatype-name">ScaleRequest</span>
</td>
<td> <span class="datatype-description">This class represents a scale request for a deployment. At the moment we only
support swarm.</span>
......@@ -365,8 +365,8 @@ provisioner to request for cloud resources.</span>
<td> <span class="datatype-description">This class represents a description of provisioned resources</span>
</td>
</tr>
<tr class="clickable-row" data-href="xml_ns0_scaleDeploymetRequest.html">
<td> <span class="datatype-name">scaleDeploymetRequest</span>
<tr class="clickable-row" data-href="xml_ns0_scaleRequest.html">
<td> <span class="datatype-name">scaleRequest</span>
</td>
<td> <span class="datatype-description">This class represents a scale request for a deployment. At the moment we only
support swarm.</span>
......
......@@ -72,7 +72,7 @@
<h1 class="page-header">Files and Libraries</h1>
<h3 id="artifact_gwt_json_overlay">GWT JSON Overlay</h3>
<p class="lead">Created July 12, 2017</p>
<p class="lead">Created July 14, 2017</p>
<p> <p>
The <a href="http://code.google.com/webtoolkit/">Google Web Toolkit</a> JSON Overlay library provides the JSON Overlays that
can be used to access the Web service API for this application.
......@@ -91,13 +91,13 @@
<tbody data-link="row" class="rowlink">
<tr class="clickable-row" data-href="drip-api-gwt-json-overlay.jar">
<td><span class="downloadfile-name">drip-api-gwt-json-overlay.jar</span></td>
<td><span class="downloadfile-size">13.55K</span></td>
<td><span class="downloadfile-size">13.51K</span></td>
<td><span class="downloadfile-description">The sources for the GWT JSON overlay.</span></td>
</tr>
</tbody>
</table>
<h3 id="artifact_java_json_client_library">Java JSON Client Library</h3>
<p class="lead">Created July 12, 2017</p>
<p class="lead">Created July 14, 2017</p>
<p><p>
The Java client-side library is used to provide the set of Java objects that can be serialized
to/from JSON using <a href="http://jackson.codehaus.org/">Jackson</a>. This is useful for accessing the
......@@ -116,18 +116,18 @@
<tbody data-link="row" class="rowlink">
<tr class="clickable-row" data-href="drip-api-json-client.jar">
<td><span class="downloadfile-name">drip-api-json-client.jar</span></td>
<td><span class="downloadfile-size">16.84K</span></td>
<td><span class="downloadfile-size">16.80K</span></td>
<td><span class="downloadfile-description">The binaries for the Java JSON client library.</span></td>
</tr>
<tr class="clickable-row" data-href="drip-api-json-client-json-sources.jar">
<td><span class="downloadfile-name">drip-api-json-client-json-sources.jar</span></td>
<td><span class="downloadfile-size">14.00K</span></td>
<td><span class="downloadfile-size">13.97K</span></td>
<td><span class="downloadfile-description">The sources for the Java JSON client library.</span></td>
</tr>
</tbody>
</table>
<h3 id="artifact_java_xml_client_library">Java XML Client Library</h3>
<p class="lead">Created July 12, 2017</p>
<p class="lead">Created July 14, 2017</p>
<p><p>
The Java client-side library is used to access the Web service API for this application using Java.
</p>
......@@ -144,18 +144,18 @@
<tbody data-link="row" class="rowlink">
<tr class="clickable-row" data-href="drip-api-xml-client.jar">
<td><span class="downloadfile-name">drip-api-xml-client.jar</span></td>
<td><span class="downloadfile-size">24.61K</span></td>
<td><span class="downloadfile-size">24.60K</span></td>
<td><span class="downloadfile-description">The binaries for the Java XML client library.</span></td>
</tr>
<tr class="clickable-row" data-href="drip-api-xml-client-xml-sources.jar">
<td><span class="downloadfile-name">drip-api-xml-client-xml-sources.jar</span></td>
<td><span class="downloadfile-size">22.41K</span></td>
<td><span class="downloadfile-size">22.39K</span></td>
<td><span class="downloadfile-description">The sources for the Java XML client library.</span></td>
</tr>
</tbody>
</table>
<h3 id="artifact_js_client_library">JavaScript Client Library</h3>
<p class="lead">Created July 12, 2017</p>
<p class="lead">Created July 14, 2017</p>
<p><p>
The JavaScript client-side library defines classes that can be (de)serialized to/from JSON.
This is useful for accessing the resources that are published by this application, but only
......@@ -184,13 +184,13 @@
<tbody data-link="row" class="rowlink">
<tr class="clickable-row" data-href="drip-api-js.zip">
<td><span class="downloadfile-name">drip-api-js.zip</span></td>
<td><span class="downloadfile-size">5.26K</span></td>
<td><span class="downloadfile-size">5.27K</span></td>
<td><span class="downloadfile-description">&nbsp;</span></td>
</tr>
</tbody>
</table>
<h3 id="artifact_php_json_client_library">PHP JSON Client Library</h3>
<p class="lead">Created July 12, 2017</p>
<p class="lead">Created July 14, 2017</p>
<p><p>
The PHP JSON client-side library defines the PHP classes that can be (de)serialized to/from JSON.
This is useful for accessing the resources that are published by this application, but only
......@@ -213,13 +213,13 @@
<tbody data-link="row" class="rowlink">
<tr class="clickable-row" data-href="drip-api-php.zip">
<td><span class="downloadfile-name">drip-api-php.zip</span></td>
<td><span class="downloadfile-size">5.90K</span></td>
<td><span class="downloadfile-size">5.89K</span></td>
<td><span class="downloadfile-description">&nbsp;</span></td>
</tr>
</tbody>
</table>
<h3 id="artifact_php_xml_client_library">PHP XML Client Library</h3>
<p class="lead">Created July 12, 2017</p>
<p class="lead">Created July 14, 2017</p>
<p><p>
The PHP client-side library defines the PHP classes that can be (de)serialized to/from XML.
This is useful for accessing the resources that are published by this application, but only
......@@ -245,13 +245,13 @@
<tbody data-link="row" class="rowlink">
<tr class="clickable-row" data-href="drip-api-php.zip">
<td><span class="downloadfile-name">drip-api-php.zip</span></td>
<td><span class="downloadfile-size">9.01K</span></td>
<td><span class="downloadfile-size">8.99K</span></td>
<td><span class="downloadfile-description">&nbsp;</span></td>
</tr>
</tbody>
</table>
<h3 id="artifact_ruby_json_client_library">Ruby JSON Client Library</h3>
<p class="lead">Created July 12, 2017</p>
<p class="lead">Created July 14, 2017</p>
<p><p>
The Ruby JSON client-side library defines the Ruby classes that can be (de)serialized to/from JSON.
This is useful for accessing the REST endpoints that are published by this application, but only
......@@ -276,7 +276,7 @@
<tbody data-link="row" class="rowlink">
<tr class="clickable-row" data-href="drip-api.rb">
<td><span class="downloadfile-name">drip-api.rb</span></td>
<td><span class="downloadfile-size">75.64K</span></td>
<td><span class="downloadfile-size">75.70K</span></td>
<td><span class="downloadfile-description">&nbsp;</span></td>
</tr>
</tbody>
......
This diff is collapsed.
......@@ -273,6 +273,7 @@ provisopned based on a TOSCA description.</span>
</samp></li><li><samp> <span class="resource-path">/user/v1.0/provisioner/ids</span>
</samp></li><li><samp> <span class="resource-path">/user/v1.0/provisioner/provision</span>
</samp></li><li><samp> <span class="resource-path">/user/v1.0/provisioner/sample</span>
</samp></li><li><samp> <span class="resource-path">/user/v1.0/provisioner/scale</span>
</samp></li><li><samp> <span class="resource-path">/user/v1.0/provisioner/{id}</span>
</samp></li><li><samp> <span class="resource-path">/user/v1.0/provisioner/post/provision</span>
</samp></li></ul></td>
......@@ -280,6 +281,7 @@ provisopned based on a TOSCA description.</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">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">DELETE</span> <span class="label label-default resource-method">GET</span>
</samp></li><li><samp> <span class="label label-default resource-method">POST</span>
</samp></li></ul></td>
......@@ -512,8 +514,8 @@ provisioner to request for cloud resources.</span>
<td> <span class="datatype-description">This class represents a description of provisioned resources</span>
</td>
</tr>
<tr class="clickable-row" data-href="json_ScaleDeploymetRequest.html">
<td> <span class="datatype-name">ScaleDeploymetRequest</span>
<tr class="clickable-row" data-href="json_ScaleRequest.html">
<td> <span class="datatype-name">ScaleRequest</span>
</td>
<td> <span class="datatype-description">This class represents a scale request for a deployment. At the moment we only
support swarm.</span>
......@@ -695,8 +697,8 @@ provisioner to request for cloud resources.</span>
<td> <span class="datatype-description">This class represents a description of provisioned resources</span>
</td>
</tr>
<tr class="clickable-row" data-href="xml_ns0_scaleDeploymetRequest.html">
<td> <span class="datatype-name">scaleDeploymetRequest</span>
<tr class="clickable-row" data-href="xml_ns0_scaleRequest.html">
<td> <span class="datatype-name">scaleRequest</span>
</td>
<td> <span class="datatype-description">This class represents a scale request for a deployment. At the moment we only
support swarm.</span>
......
......@@ -81,7 +81,7 @@ class</p>
</thead>
<tbody>
<tr>
<td> <span class="property-name">cloudDeploymentDomain</span>
<td> <span class="property-name">vmType</span>
</td>
<td> <span class="datatype-reference">string
</span>
......@@ -90,7 +90,7 @@ class</p>
</td>
</tr>
<tr>
<td> <span class="property-name">start</span>
<td> <span class="property-name">end</span>
</td>
<td> <span class="datatype-reference">number
</span>
......@@ -99,25 +99,25 @@ class</p>
</td>
</tr>
<tr>
<td> <span class="property-name">vmType</span>
<td> <span class="property-name">delta</span>
</td>
<td> <span class="datatype-reference">string
<td> <span class="datatype-reference">number
</span>
</td>
<td> <span class="property-description"></span>
</td>
</tr>
<tr>
<td> <span class="property-name">delta</span>
<td> <span class="property-name">cloudDeploymentDomain</span>
</td>
<td> <span class="datatype-reference">number
<td> <span class="datatype-reference">string
</span>
</td>
<td> <span class="property-description"></span>
</td>
</tr>
<tr>
<td> <span class="property-name">end</span>
<td> <span class="property-name">start</span>
</td>
<td> <span class="datatype-reference">number
</span>
......@@ -165,11 +165,11 @@ object is saved.</span></td>
<p class="lead">Example</p>
<pre class="prettyprint language-js example">{
&quot;cloudDeploymentDomain&quot; : &quot;us-east-1&quot;,
&quot;start&quot; : 12345,
&quot;vmType&quot; : &quot;...&quot;,
&quot;delta&quot; : 12345,
&quot;end&quot; : 12345,
&quot;delta&quot; : 12345,
&quot;cloudDeploymentDomain&quot; : &quot;us-east-1&quot;,
&quot;start&quot; : 12345,
&quot;host&quot; : &quot;147.228.242.58&quot;,
&quot;owner&quot; : &quot;user1&quot;,
&quot;id&quot; : &quot;58e3946e0fb4f562d84ba1ad&quot;,
......
......@@ -102,7 +102,7 @@ pair is only used by kubernetes</p>
<tr>
<td> <span class="property-name">scale</span>
</td>
<td> <span class="datatype-reference"><a href="json_ScaleDeploymetRequest.html">ScaleDeploymetRequest</a>
<td> <span class="datatype-reference"><a href="json_ScaleRequest.html">ScaleRequest</a>
</span>
</td>
<td> <span class="property-description">The scale information if any for this deployment</span>
......@@ -190,8 +190,8 @@ object is saved.</span></td>
&quot;timestamp&quot; : 1499793079011
},
&quot;scale&quot; : {
&quot;deployID&quot; : &quot;58e3946e0fb4f562d84ba1ad&quot;,
&quot;serviceName&quot; : &quot;telegreen_db&quot;,
&quot;scaleTargetID&quot; : &quot;58e3946e0fb4f562d84ba1ad&quot;,
&quot;scaleTargetName&quot; : &quot;telegreen_db&quot;,
&quot;numOfInstances&quot; : 5,
&quot;owner&quot; : &quot;user1&quot;,
&quot;id&quot; : &quot;58e3946e0fb4f562d84ba1ad&quot;,
......
......@@ -69,7 +69,7 @@ class</p>
<dl class="dl-horizontal">
<dt>Subtypes</dt>
<dd><a href="json_KeyPair.html">KeyPair</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_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_ScaleDeploymetRequest.html">ScaleDeploymetRequest</a></dd>
<dd><a href="json_KeyPair.html">KeyPair</a>, <a href="json_AnsibleOutput.html">AnsibleOutput</a>, <a href="json_ScaleRequest.html">ScaleRequest</a>, <a href="json_CloudCredentials.html">CloudCredentials</a>, <a href="json_BenchmarkResult.html">BenchmarkResult</a>, <a href="json_DeployResponse.html">DeployResponse</a>, <a href="json_ProvisionRequest.html">ProvisionRequest</a>, <a href="json_Script.html">Script</a>, <a href="json_KeyValueHolder.html">KeyValueHolder</a>, <a href="json_DeployRequest.html">DeployRequest</a>, <a href="json_ProvisionResponse.html">ProvisionResponse</a></dd>
</dl>
<table class="table datatype-properties">
......
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="utf-8">
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<meta name="viewport" content="width=device-width, initial-scale=1">
<!-- The above 3 meta tags *must* come first in the head; any other head content must come *after* these tags -->
<title>drip-api: ScaleRequest</title>
<!-- Mobile viewport optimized: j.mp/bplateviewport -->
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<!-- Bootstrap core CSS -->
<link rel="stylesheet" href="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.4/css/bootstrap.min.css">
<!--custom css for these pages-->
<link rel="stylesheet" href="css/style.css">
<!-- HTML5 shim and Respond.js for IE8 support of HTML5 elements and media queries -->
<!--[if lt IE 9]>
<script src="https://oss.maxcdn.com/html5shiv/3.7.2/html5shiv.min.js"></script>
<script src="https://oss.maxcdn.com/respond/1.4.2/respond.min.js"></script>
<![endif]-->
</head>
<body data-spy="scroll" data-target="#apinav">
<nav class="navbar navbar-inverse navbar-fixed-top">
<div class="container-fluid">
<div class="navbar-header">
<button type="button" class="navbar-toggle collapsed" data-toggle="collapse" data-target="#navbar">
<span class="sr-only">Toggle navigation</span>
<span class="icon-bar"></span>
<span class="icon-bar"></span>
<span class="icon-bar"></span>
</button>
<a class="navbar-brand" href="index.html">drip-api: ScaleRequest</a>
</div>
<div id="navbar" class="navbar-collapse collapse">
<ul class="nav navbar-nav navbar-right">
<li><a href="resources.html">Resources</a></li>
<li><a href="data.html">Data Types</a></li>
<li><a href="downloads.html">Files and Libraries</a></li>
</ul>
</div>
</div>
</nav>
<div class="container-fluid">
<div class="row">
<div class="col-sm-3 col-md-2 sidebar" id="apinav">
<ul class="nav nav-sidebar">
<li class="text-right"><a href="#top"><small>Back to Top</small></a></li>
</ul>
</div>
<div class="col-sm-9 col-sm-offset-3 col-md-10 col-md-offset-2 main">
<ol class="breadcrumb" id="top">
<li class="active dropdown"><a href="index.html">Home</a></li>
<li class="active dropdown"><a href="syntax_json.html">JSON</a></li>
<li class="dropdown"><a href="json_ScaleRequest.html">ScaleRequest</a></li>
</ol>
<h1 class="page-header">ScaleRequest <small>Data Type</small></h1>
<p>This class represents a scale request for a deployment. At the moment we only
support swarm.</p>
<dl class="dl-horizontal">
</dl>
<table class="table datatype-properties">
<caption>Properties</caption>
<thead>
<tr>
<th>name</th>
<th>data type</th>
<th>description</th>
</tr>
</thead>
<tbody>
<tr>
<td> <span class="property-name">scaleTargetID</span>
</td>
<td> <span class="datatype-reference">string
</span>
</td>
<td> <span class="property-description">The ID of the deployment or provisioned resources to scale. For
deployment scale only swarm deployments are supported.</span>
</td>
</tr>
<tr>
<td> <span class="property-name">scaleTargetName</span>
</td>
<td> <span class="datatype-reference">string
</span>
</td>
<td> <span class="property-description">The name of the service or topology to scale.</span>
</td>
</tr>
<tr>
<td> <span class="property-name">numOfInstances</span>
</td>
<td> <span class="datatype-reference">number
</span>
</td>
<td> <span class="property-description">The number of instances to start. This number is absolute not cumulative.
If we have 2 instances running and we request for 3 we'll have 3 if we
request 1 we'll have 1</span>
</td>
</tr>
</tbody>
<tr>
<td colspan="3"><h5 class="text-muted">Properties inherited from <a href="json_OwnedObject.html">OwnedObject</a></h5></td>
</tr>
<tbody>
<tr>
<td><span class="property-name">owner</span></td>
<td><span class="datatype-reference">string
</span></td>
<td><span class="property-description">The owner (username) for the particular object. This value is set when
the DAO saves the object based on the principal how made the call</span></td>
</tr>
<tr>
<td><span class="property-name">id</span></td>
<td><span class="datatype-reference">string
</span></td>
<td><span class="property-description">The UID of this object. This value is auto generated by the DAO when the
object is saved.</span></td>
</tr>
<tr>
<td><span class="property-name">timestamp</span></td>
<td><span class="datatype-reference">number
</span></td>
<td><span class="property-description">The object's creation date in unix time stamp</span></td>
</tr>
</tbody>
</table>
<p class="lead">Example</p>
<pre class="prettyprint language-js example">{
&quot;scaleTargetID&quot; : &quot;58e3946e0fb4f562d84ba1ad&quot;,
&quot;scaleTargetName&quot; : &quot;telegreen_db&quot;,
&quot;numOfInstances&quot; : 5,
&quot;owner&quot; : &quot;user1&quot;,
&quot;id&quot; : &quot;58e3946e0fb4f562d84ba1ad&quot;,
&quot;timestamp&quot; : 1499793079011
}</pre>
<footer class="footer">
<div class="container">
<p class="text-muted">Generated by <a href="http://enunciate.webcohesion.com">Enunciate</a>.</p>
</div>
</footer>
</div>
</div>
</div>
<!-- JavaScript placed at the end of the document so the pages load faster. -->
<script src="https://cdnjs.cloudflare.com/ajax/libs/jquery/1.11.2/jquery.min.js"></script>
<!-- Bootstrap core JavaScript
================================================== -->
<script src="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.4/js/bootstrap.min.js"></script>
<!-- prettify code blocks. see http://code.google.com/p/google-code-prettify/ -->
<script src="https://cdn.rawgit.com/google/code-prettify/master/loader/run_prettify.js" type="text/javascript"></script>
<script>
$(function() {
$(".clickable-row").click(function() {
window.document.location = $(this).data("href");
});
$('[data-toggle="tooltip"]').tooltip()
});
</script>
</body>
</html>
......@@ -363,7 +363,7 @@ pair is only used by kubernetes]]>
<xs:sequence>
<xs:element name="ansibleOutputList" type="xs:string" minOccurs="0" maxOccurs="unbounded">
</xs:element>
<xs:element name="scale" type="scaleDeploymetRequest" minOccurs="0">
<xs:element name="scale" type="scaleRequest" minOccurs="0">
<xs:annotation>
<xs:documentation>
<![CDATA[The scale information if any for this deployment]]>
......@@ -615,7 +615,7 @@ provisioner to request for cloud resources.]]>
</xs:complexContent>
</xs:complexType>
<xs:complexType name="scaleDeploymetRequest">
<xs:complexType name="scaleRequest">
<xs:annotation>
<xs:documentation>
<![CDATA[This class represents a scale request for a deployment. At the moment we only
......@@ -625,26 +625,27 @@ support swarm.]]>
<xs:complexContent>
<xs:extension base="ownedObject">
<xs:sequence>
<xs:element name="deployID" type="xs:string" minOccurs="0">
<xs:element name="scaleTargetID" type="xs:string" minOccurs="0">
<xs:annotation>
<xs:documentation>
<![CDATA[The deployment ID. At the moment only swarm deployments are supported.]]>
<![CDATA[The ID of the deployment or provisioned resources to scale. For
deployment scale only swarm deployments are supported.]]>
</xs:documentation>
</xs:annotation>
</xs:element>
<xs:element name="serviceName" type="xs:string" minOccurs="0">
<xs:element name="scaleTargetName" type="xs:string" minOccurs="0">
<xs:annotation>
<xs:documentation>
<![CDATA[The name of the service to scale.]]>
<![CDATA[The name of the service or topology to scale.]]>
</xs:documentation>
</xs:annotation>
</xs:element>
<xs:element name="numOfInstances" type="xs:int" minOccurs="1">
<xs:annotation>
<xs:documentation>
<![CDATA[The number of services to start. This number is absolute not cumulative.
If we have 2 service numbers running and we request for 3 we'll have 3 if
we request 1 we'll have 1]]>
<![CDATA[The number of instances to start. This number is absolute not cumulative.
If we have 2 instances running and we request for 3 we'll have 3 if we
request 1 we'll have 1]]>
</xs:documentation>
</xs:annotation>
</xs:element>
......@@ -803,17 +804,17 @@ class]]>
<xs:complexContent>
<xs:extension base="ownedObject">
<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="start" type="xs:dateTime" minOccurs="0">
<xs:element name="delta" type="xs:dateTime" minOccurs="0">
</xs:element>
<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 name="delta" type="xs:dateTime" minOccurs="0">
<xs:element name="start" type="xs:dateTime" minOccurs="0">
</xs:element>
<xs:element name="end" type="xs:dateTime" minOccurs="0">
<xs:element name="cloudDeploymentDomain" type="xs:string" minOccurs="0">
</xs:element>
</xs:sequence>
</xs:extension>
......
......@@ -144,11 +144,11 @@ Content-Type: application/json
<code class="prettyprint language-js">
[ {
&quot;cloudDeploymentDomain&quot; : &quot;us-east-1&quot;,
&quot;start&quot; : 12345,
&quot;vmType&quot; : &quot;...&quot;,
&quot;delta&quot; : 12345,
&quot;end&quot; : 12345,
&quot;delta&quot; : 12345,
&quot;cloudDeploymentDomain&quot; : &quot;us-east-1&quot;,
&quot;start&quot; : 12345,
&quot;host&quot; : &quot;147.228.242.58&quot;,
&quot;owner&quot; : &quot;user1&quot;,
&quot;id&quot; : &quot;58e3946e0fb4f562d84ba1ad&quot;,
......@@ -514,11 +514,11 @@ Content-Type: application/json
<code class="prettyprint language-js">
{
&quot;cloudDeploymentDomain&quot; : &quot;us-east-1&quot;,
&quot;start&quot; : 12345,
&quot;vmType&quot; : &quot;...&quot;,
&quot;delta&quot; : 12345,
&quot;end&quot; : 12345,
&quot;delta&quot; : 12345,
&quot;cloudDeploymentDomain&quot; : &quot;us-east-1&quot;,
&quot;start&quot; : 12345,
&quot;host&quot; : &quot;147.228.242.58&quot;,
&quot;owner&quot; : &quot;user1&quot;,
&quot;id&quot; : &quot;58e3946e0fb4f562d84ba1ad&quot;,
......
......@@ -458,12 +458,12 @@ Content-Type: application/json
<tbody>
<tr>
<td><abbr data-toggle="tooltip" data-placement="top" title="Use the &quot;Content-Type: application/json&quot; HTTP header to specify this media type to the server."><span class="request-type">application/json</span></abbr></td>
<td><span class="datatype-reference"><a href="json_ScaleDeploymetRequest.html">ScaleDeploymetRequest</a>
<td><span class="datatype-reference"><a href="json_ScaleRequest.html">ScaleRequest</a>
(JSON)</span></td>
</tr>
<tr>
<td><abbr data-toggle="tooltip" data-placement="top" title="Use the &quot;Content-Type: application/xml&quot; HTTP header to specify this media type to the server."><span class="request-type">application/xml</span></abbr></td>
<td><span class="datatype-reference"><a href="xml_ns0_scaleDeploymetRequest.html">scaleDeploymetRequest</a>
<td><span class="datatype-reference"><a href="xml_ns0_scaleRequest.html">scaleRequest</a>
(XML)</span></td>
</tr>
</tbody>
......@@ -519,8 +519,8 @@ Accept: application/json
<code class="prettyprint language-js">
{
&quot;deployID&quot; : &quot;58e3946e0fb4f562d84ba1ad&quot;,
&quot;serviceName&quot; : &quot;telegreen_db&quot;,
&quot;scaleTargetID&quot; : &quot;58e3946e0fb4f562d84ba1ad&quot;,
&quot;scaleTargetName&quot; : &quot;telegreen_db&quot;,
&quot;numOfInstances&quot; : 5,
&quot;owner&quot; : &quot;user1&quot;,
&quot;id&quot; : &quot;58e3946e0fb4f562d84ba1ad&quot;,
......@@ -767,8 +767,8 @@ Content-Type: application/json
&quot;timestamp&quot; : 1499793079011
},
&quot;scale&quot; : {
&quot;deployID&quot; : &quot;58e3946e0fb4f562d84ba1ad&quot;,
&quot;serviceName&quot; : &quot;telegreen_db&quot;,
&quot;scaleTargetID&quot; : &quot;58e3946e0fb4f562d84ba1ad&quot;,
&quot;scaleTargetName&quot; : &quot;telegreen_db&quot;,
&quot;numOfInstances&quot; : 5,
&quot;owner&quot; : &quot;user1&quot;,
&quot;id&quot; : &quot;58e3946e0fb4f562d84ba1ad&quot;,
......
......@@ -55,6 +55,7 @@
<li><a href="#resource_ProvisionController_getIds_GET">GET /user/v1.0/provisioner/ids</a></li>
<li><a href="#resource_ProvisionController_provision_POST"><abbr title="POST /user/v1.0/provisioner/provision">POST /user/v1.0/provisioner/pr...</abbr></a></li>
<li><a href="#resource_ProvisionController_sample_GET"><abbr title="GET /user/v1.0/provisioner/sample">GET /user/v1.0/provisioner/sam...</abbr></a></li>
<li><a href="#resource_ProvisionController_scaleDeployment_POST"><abbr title="POST /user/v1.0/provisioner/scale">POST /user/v1.0/provisioner/sc...</abbr></a></li>
<li><a href="#resource_ProvisionController_delete_DELETE"><abbr title="DELETE /user/v1.0/provisioner/{id}">DELETE /user/v1.0/provisioner/...</abbr></a></li>
<li><a href="#resource_ProvisionController_get_GET"><abbr title="GET /user/v1.0/provisioner/{id}">GET /user/v1.0/provisioner/{id...</abbr></a></li>
<li><a href="#resource_ProvisionController_postProvisionResponse_POST"><abbr title="POST /user/v1.0/provisioner/post/provision">POST /user/v1.0/provisioner/po...</abbr></a></li>
......@@ -433,6 +434,113 @@ Content-Type: application/json
</div>
</div>
<div id="resource_ProvisionController_scaleDeployment_POST">
<h3><span class="label label-default resource-method">POST</span> <span class="resource-path">/user/v1.0/provisioner/scale <a href="./user/v1.0/provisioner/scale" class="glyphicon glyphicon-new-window" target="_blank"></a></span></h3>
<p></p>
<dl class="dl-horizontal">
<dt>Security Roles Allowed</dt>
<dd>ADMIN, USER</dd>
</dl>
<table class="table resource-request-body">
<caption>Request Body</caption>
<thead>
<tr>
<th>media type</th>
<th>data type</th>
</tr>
</thead>
<tbody>
<tr>
<td><abbr data-toggle="tooltip" data-placement="top" title="Use the &quot;Content-Type: application/json&quot; HTTP header to specify this media type to the server."><span class="request-type">application/json</span></abbr></td>
<td><span class="datatype-reference"><a href="json_ScaleRequest.html">ScaleRequest</a>
(JSON)</span></td>
</tr>
<tr>
<td><abbr data-toggle="tooltip" data-placement="top" title="Use the &quot;Content-Type: application/xml&quot; HTTP header to specify this media type to the server."><span class="request-type">application/xml</span></abbr></td>
<td><span class="datatype-reference"><a href="xml_ns0_scaleRequest.html">scaleRequest</a>
(XML)</span></td>
</tr>
</tbody>
</table>
<table class="table resource-response-codes">
<caption>Response Codes</caption>
<thead>
<tr>
<th>code</th>
<th>condition</th>
</tr>
</thead>
<tbody>
<tr>
<td><span class="label label-warning response-code">401</span></td>
<td><span class="response-condition">Bad credentials</span></td>
</tr>
</tbody>
</table>
<table class="table resource-response-body">
<caption>Response Body</caption>
<thead>
<tr>
<th>media type</th>
<th>data type</th>
</tr>
</thead>
<tbody>
<tr>
<td><abbr data-toggle="tooltip" data-placement="top" title="Use the &quot;Accept: application/json&quot; HTTP header to request that this media type be provided by the server."><span class="response-type">application/json</span></abbr></td>
<td><span class="datatype-reference">string
(JSON)</span></td>
</tr>
<tr>
<td><abbr data-toggle="tooltip" data-placement="top" title="Use the &quot;Accept: application/xml&quot; HTTP header to request that this media type be provided by the server."><span class="response-type">application/xml</span></abbr></td>
<td><span class="datatype-reference">string
(XML)</span></td>
</tr>
</tbody>
</table>
<h4>Example</h4>
<div class="container-fluid example panel">
<div class="row panel-body">
<div class="col-md-6">
<h5>Request</h5>
<pre>
POST /user/v1.0/provisioner/scale
Content-Type: application/json
Accept: application/json
<code class="prettyprint language-js">
{
&quot;scaleTargetID&quot; : &quot;58e3946e0fb4f562d84ba1ad&quot;,
&quot;scaleTargetName&quot; : &quot;telegreen_db&quot;,
&quot;numOfInstances&quot; : 5,
&quot;owner&quot; : &quot;user1&quot;,
&quot;id&quot; : &quot;58e3946e0fb4f562d84ba1ad&quot;,
&quot;timestamp&quot; : 1499793079011
}
</code>
</pre>
</div>
<div class="col-md-6">
<h5>Response</h5>
<pre>
HTTP/1.1 201 Looks Good
Content-Type: application/json
<code class="prettyprint language-txt">
...
</code>
</pre>
</div>
</div>
</div>
</div>
<div id="resource_ProvisionController_delete_DELETE">
<h3><span class="label label-default resource-method">DELETE</span> <span class="resource-path">/user/v1.0/provisioner/{id} <a href="./user/v1.0/provisioner/{id}" class="glyphicon glyphicon-new-window" target="_blank"></a></span></h3>
......
......@@ -265,6 +265,7 @@ provisopned based on a TOSCA description.</span>
</samp></li><li><samp> <span class="resource-path">/user/v1.0/provisioner/ids</span>
</samp></li><li><samp> <span class="resource-path">/user/v1.0/provisioner/provision</span>
</samp></li><li><samp> <span class="resource-path">/user/v1.0/provisioner/sample</span>
</samp></li><li><samp> <span class="resource-path">/user/v1.0/provisioner/scale</span>
</samp></li><li><samp> <span class="resource-path">/user/v1.0/provisioner/{id}</span>
</samp></li><li><samp> <span class="resource-path">/user/v1.0/provisioner/post/provision</span>
</samp></li></ul></td>
......@@ -272,6 +273,7 @@ provisopned based on a TOSCA description.</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">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">DELETE</span> <span class="label label-default resource-method">GET</span>
</samp></li><li><samp> <span class="label label-default resource-method">POST</span>
</samp></li></ul></td>
......
......@@ -177,8 +177,8 @@ provisioner to request for cloud resources.</span>
<td> <span class="datatype-description">This class represents a description of provisioned resources</span>
</td>
</tr>
<tr class="clickable-row" data-href="json_ScaleDeploymetRequest.html">
<td> <span class="datatype-name">ScaleDeploymetRequest</span>
<tr class="clickable-row" data-href="json_ScaleRequest.html">
<td> <span class="datatype-name">ScaleRequest</span>
</td>
<td> <span class="datatype-description">This class represents a scale request for a deployment. At the moment we only
support swarm.</span>
......
......@@ -222,8 +222,8 @@ provisioner to request for cloud resources.</span>
<td> <span class="datatype-description">This class represents a description of provisioned resources</span>
</td>
</tr>
<tr class="clickable-row" data-href="xml_ns0_scaleDeploymetRequest.html">
<td> <span class="datatype-name">scaleDeploymetRequest</span>
<tr class="clickable-row" data-href="xml_ns0_scaleRequest.html">
<td> <span class="datatype-name">scaleRequest</span>
</td>
<td> <span class="datatype-description">This class represents a scale request for a deployment. At the moment we only
support swarm.</span>
......
......@@ -231,12 +231,12 @@ the DAO saves the object based on the principal how made the call</span></td>
<p class="lead">Example</p>
<pre class="prettyprint language-xml example">&lt;b-----&gt;
&lt;cloudDeploymentDomain&gt;us-east-1&lt;/cloudDeploymentDomain&gt;
&lt;start&gt;...&lt;/start&gt;
&lt;vmType&gt;...&lt;/vmType&gt;
&lt;host&gt;147.228.242.58&lt;/host&gt;
&lt;delta&gt;...&lt;/delta&gt;
&lt;end&gt;...&lt;/end&gt;
&lt;host&gt;147.228.242.58&lt;/host&gt;
&lt;start&gt;...&lt;/start&gt;
&lt;cloudDeploymentDomain&gt;us-east-1&lt;/cloudDeploymentDomain&gt;
&lt;owner&gt;user1&lt;/owner&gt;
&lt;timestamp&gt;1499793079011&lt;/timestamp&gt;
&lt;/b-----&gt;
......
......@@ -109,7 +109,7 @@ pair is only used by kubernetes</p>
<tr>
<td> <span class="property-name">scale</span>
</td>
<td> <span class="datatype-reference"><a href="xml_ns0_scaleDeploymetRequest.html">scaleDeploymetRequest</a>
<td> <span class="datatype-reference"><a href="xml_ns0_scaleRequest.html">scaleRequest</a>
</span>
</td>
<td> <span class="property-type">element
......@@ -205,8 +205,8 @@ the DAO saves the object based on the principal how made the call</span></td>
<pre class="prettyprint language-xml example">&lt;d-----&gt;
&lt;ansibleOutputList&gt;...&lt;/ansibleOutputList&gt;
&lt;scale&gt;
&lt;deployID&gt;58e3946e0fb4f562d84ba1ad&lt;/deployID&gt;
&lt;serviceName&gt;telegreen_db&lt;/serviceName&gt;
&lt;scaleTargetID&gt;58e3946e0fb4f562d84ba1ad&lt;/scaleTargetID&gt;
&lt;scaleTargetName&gt;telegreen_db&lt;/scaleTargetName&gt;
&lt;numOfInstances&gt;5&lt;/numOfInstances&gt;
&lt;owner&gt;user1&lt;/owner&gt;
&lt;timestamp&gt;1499793079011&lt;/timestamp&gt;
......
......@@ -73,7 +73,7 @@ class</p>
<dt>Schema</dt>
<dd><a href="ns0.xsd">ns0.xsd</a></dd>
<dt>Subtypes</dt>
<dd><a href="xml_ns0_cloudCredentials.html">cloudCredentials</a>, <a href="xml_ns0_deployRequest.html">deployRequest</a>, <a href="xml_ns0_deployResponse.html">deployResponse</a>, <a href="xml_ns0_keyPair.html">keyPair</a>, <a href="xml_ns0_keyValueHolder.html">keyValueHolder</a>, <a href="xml_ns0_provisionRequest.html">provisionRequest</a>, <a href="xml_ns0_provisionResponse.html">provisionResponse</a>, <a href="xml_ns0_scaleDeploymetRequest.html">scaleDeploymetRequest</a>, <a href="xml_ns0_script.html">script</a>, <a href="xml_ns0_ansibleOutput.html">ansibleOutput</a>, <a href="xml_ns0_benchmarkResult.html">benchmarkResult</a></dd>
<dd><a href="xml_ns0_cloudCredentials.html">cloudCredentials</a>, <a href="xml_ns0_deployRequest.html">deployRequest</a>, <a href="xml_ns0_deployResponse.html">deployResponse</a>, <a href="xml_ns0_keyPair.html">keyPair</a>, <a href="xml_ns0_keyValueHolder.html">keyValueHolder</a>, <a href="xml_ns0_provisionRequest.html">provisionRequest</a>, <a href="xml_ns0_provisionResponse.html">provisionResponse</a>, <a href="xml_ns0_scaleRequest.html">scaleRequest</a>, <a href="xml_ns0_script.html">script</a>, <a href="xml_ns0_ansibleOutput.html">ansibleOutput</a>, <a href="xml_ns0_benchmarkResult.html">benchmarkResult</a></dd>
</dl>
<table class="table datatype-properties">
......
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="utf-8">
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<meta name="viewport" content="width=device-width, initial-scale=1">
<!-- The above 3 meta tags *must* come first in the head; any other head content must come *after* these tags -->
<title>drip-api: scaleRequest</title>
<!-- Mobile viewport optimized: j.mp/bplateviewport -->
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<!-- Bootstrap core CSS -->
<link rel="stylesheet" href="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.4/css/bootstrap.min.css">
<!--custom css for these pages-->
<link rel="stylesheet" href="css/style.css">
<!-- HTML5 shim and Respond.js for IE8 support of HTML5 elements and media queries -->
<!--[if lt IE 9]>
<script src="https://oss.maxcdn.com/html5shiv/3.7.2/html5shiv.min.js"></script>
<script src="https://oss.maxcdn.com/respond/1.4.2/respond.min.js"></script>
<![endif]-->
</head>
<body data-spy="scroll" data-target="#apinav">
<nav class="navbar navbar-inverse navbar-fixed-top">
<div class="container-fluid">
<div class="navbar-header">
<button type="button" class="navbar-toggle collapsed" data-toggle="collapse" data-target="#navbar">
<span class="sr-only">Toggle navigation</span>
<span class="icon-bar"></span>
<span class="icon-bar"></span>
<span class="icon-bar"></span>
</button>
<a class="navbar-brand" href="index.html">drip-api: scaleRequest</a>
</div>
<div id="navbar" class="navbar-collapse collapse">
<ul class="nav navbar-nav navbar-right">
<li><a href="resources.html">Resources</a></li>
<li><a href="data.html">Data Types</a></li>
<li><a href="downloads.html">Files and Libraries</a></li>
</ul>
</div>
</div>
</nav>
<div class="container-fluid">
<div class="row">
<div class="col-sm-3 col-md-2 sidebar" id="apinav">
<ul class="nav nav-sidebar">
<li class="text-right"><a href="#top"><small>Back to Top</small></a></li>
</ul>
</div>
<div class="col-sm-9 col-sm-offset-3 col-md-10 col-md-offset-2 main">
<ol class="breadcrumb" id="top">
<li class="active dropdown"><a href="index.html">Home</a></li>
<li class="active dropdown"><a href="syntax_xml.html">XML</a></li>
<li class="dropdown"><a href="xml_ns0_scaleRequest.html">scaleRequest</a></li>
</ol>
<h1 class="page-header">scaleRequest <small>Data Type</small></h1>
<p>This class represents a scale request for a deployment. At the moment we only
support swarm.</p>
<dl class="dl-horizontal">
<dt>Namespace</dt>
<dd>(Default)</dd>
<dt>Schema</dt>
<dd><a href="ns0.xsd">ns0.xsd</a></dd>
</dl>
<table class="table datatype-properties">
<caption>Properties</caption>
<thead>
<tr>
<th>name</th>
<th>data type</th>
<th>type</th>
<th>namespace</th>
<th>min/max occurs</th>
<th>description</th>
</tr>
</thead>
<tbody>
<tr>
<td> <span class="property-name">numOfInstances</span>
</td>
<td> <span class="datatype-reference">int
</span>
</td>
<td> <span class="property-type">element
</span>
</td>
<td> <span class="property-namespaceInfo">
</span>
</td>
<td> <span class="property-minMaxOccurs">1/1
</span>
</td>
<td> <span class="property-description">The number of instances to start. This number is absolute not cumulative.
If we have 2 instances running and we request for 3 we'll have 3 if we
request 1 we'll have 1</span>
</td>
</tr>
<tr>
<td> <span class="property-name">scaleTargetID</span>
</td>
<td> <span class="datatype-reference">string
</span>
</td>
<td> <span class="property-type">element
</span>
</td>
<td> <span class="property-namespaceInfo">
</span>
</td>
<td> <span class="property-minMaxOccurs">0/1
</span>
</td>
<td> <span class="property-description">The ID of the deployment or provisioned resources to scale. For
deployment scale only swarm deployments are supported.</span>
</td>
</tr>
<tr>
<td> <span class="property-name">scaleTargetName</span>
</td>
<td> <span class="datatype-reference">string
</span>
</td>
<td> <span class="property-type">element
</span>
</td>
<td> <span class="property-namespaceInfo">
</span>
</td>
<td> <span class="property-minMaxOccurs">0/1
</span>
</td>
<td> <span class="property-description">The name of the service or topology to scale.</span>
</td>
</tr>
</tbody>
<tr>
<td colspan="6"><h5 class="text-muted">Properties inherited from <a href="xml_ns0_ownedObject.html">ownedObject</a></h5></td>
</tr>
<tbody>
<tr>
<td><span class="property-name">owner</span></td>
<td><span class="datatype-reference">string
</span></td>
<td><span class="property-type">element
</span></td>
<td><span class="property-namespaceInfo">
</span></td>
<td><span class="property-minMaxOccurs">0/1
</span></td>
<td><span class="property-description">The owner (username) for the particular object. This value is set when
the DAO saves the object based on the principal how made the call</span></td>
</tr>
<tr>
<td><span class="property-name">timestamp</span></td>
<td><span class="datatype-reference">long
</span></td>
<td><span class="property-type">element
</span></td>
<td><span class="property-namespaceInfo">
</span></td>
<td><span class="property-minMaxOccurs">0/1
</span></td>
<td><span class="property-description">The object's creation date in unix time stamp</span></td>
</tr>
</tbody>
</table>
<p class="lead">Example</p>
<pre class="prettyprint language-xml example">&lt;s-----&gt;
&lt;scaleTargetID&gt;58e3946e0fb4f562d84ba1ad&lt;/scaleTargetID&gt;
&lt;scaleTargetName&gt;telegreen_db&lt;/scaleTargetName&gt;
&lt;numOfInstances&gt;5&lt;/numOfInstances&gt;
&lt;owner&gt;user1&lt;/owner&gt;
&lt;timestamp&gt;1499793079011&lt;/timestamp&gt;
&lt;/s-----&gt;
</pre>
<footer class="footer">
<div class="container">
<p class="text-muted">Generated by <a href="http://enunciate.webcohesion.com">Enunciate</a>.</p>
</div>
</footer>
</div>
</div>
</div>
<!-- JavaScript placed at the end of the document so the pages load faster. -->
<script src="https://cdnjs.cloudflare.com/ajax/libs/jquery/1.11.2/jquery.min.js"></script>
<!-- Bootstrap core JavaScript
================================================== -->
<script src="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.4/js/bootstrap.min.js"></script>
<!-- prettify code blocks. see http://code.google.com/p/google-code-prettify/ -->
<script src="https://cdn.rawgit.com/google/code-prettify/master/loader/run_prettify.js" type="text/javascript"></script>
<script>
$(function() {
$(".clickable-row").click(function() {
window.document.location = $(this).data("href");
});
$('[data-toggle="tooltip"]').tooltip()
});
</script>
</body>
</html>
......@@ -34,7 +34,7 @@ public class DeployResponse extends DeployRequest {
private List<String> ansibleOutputListIDs;
private ScaleDeploymetRequest scale;
private ScaleRequest scale;
public void setAnsibleOutputList(List<String> outputListIDs) {
this.ansibleOutputListIDs = outputListIDs;
......@@ -64,14 +64,14 @@ public class DeployResponse extends DeployRequest {
* The scale information if any for this deployment
* @return the scale
*/
public ScaleDeploymetRequest getScale() {
public ScaleRequest getScale() {
return scale;
}
/**
* @param scale the scale to set
*/
public void setScale(ScaleDeploymetRequest scale) {
public void setScale(ScaleRequest scale) {
this.scale = scale;
}
......
/*
* Copyright 2017 S. Koulouzis, Wang Junchao, Huan Zhou, Yang Hu
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package nl.uva.sne.drip.drip.commons.data.v1.external;
import com.fasterxml.jackson.annotation.JsonInclude;
import com.webcohesion.enunciate.metadata.DocumentationExample;
/**
*
* This class represents a scale request for a deployment. At the moment we only
* support swarm.
*
*
* @author S. Koulouzis
*/
@JsonInclude(JsonInclude.Include.NON_NULL)
public class ScaleDeploymetRequest extends OwnedObject {
private String deployID;
private String serviceName;
private int numOfInstances;
/**
* The deployment ID. At the moment only swarm deployments are supported.
*
* @return the deployID
*/
@DocumentationExample("58e3946e0fb4f562d84ba1ad")
public String getDeployID() {
return deployID;
}
/**
*
* @param deployID the deployID to set
*/
public void setDeployID(String deployID) {
this.deployID = deployID;
}
/**
* The name of the service to scale.
*
* @return the serviceName
*/
@DocumentationExample("telegreen_db")
public String getServiceName() {
return serviceName;
}
/**
* @param serviceName the serviceName to set
*/
public void setServiceName(String serviceName) {
this.serviceName = serviceName;
}
/**
* The number of services to start. This number is absolute not cumulative.
* If we have 2 service numbers running and we request for 3 we'll have 3 if
* we request 1 we'll have 1
*
* @return the numOfInstances
*/
@DocumentationExample("5")
public int getNumOfInstances() {
return numOfInstances;
}
/**
* @param numOfInstances the numOfInstances to set
*/
public void setNumOfInstances(int numOfInstances) {
this.numOfInstances = numOfInstances;
}
}
......@@ -26,6 +26,6 @@ import com.fasterxml.jackson.annotation.JsonInclude;
* @author S. Koulouzis
*/
@JsonInclude(JsonInclude.Include.NON_NULL)
public class ScaleDeploymetResponse extends ScaleDeploymetRequest {
public class ScaleDeploymetResponse extends ScaleRequest {
}
......@@ -16,10 +16,12 @@
package nl.uva.sne.drip.drip.commons.data.v1.external;
import com.fasterxml.jackson.annotation.JsonInclude;
import com.webcohesion.enunciate.metadata.DocumentationExample;
/**
*
* This class represents a scale request for either a deployment of a provision.
* This class represents a scale request for a deployment. At the moment we only
* support swarm.
*
*
* @author S. Koulouzis
......@@ -27,6 +29,65 @@ import com.fasterxml.jackson.annotation.JsonInclude;
@JsonInclude(JsonInclude.Include.NON_NULL)
public class ScaleRequest extends OwnedObject {
private String scaleTargetID;
private String scaleTargetName;
private int numOfInstances;
/**
* The ID of the deployment or provisioned resources to scale. For
* deployment scale only swarm deployments are supported.
*
* @return the scaleTargetID
*/
@DocumentationExample("58e3946e0fb4f562d84ba1ad")
public String getScaleTargetID() {
return scaleTargetID;
}
/**
*
* @param deployID the scaleTargetID to set
*/
public void setScaleTargetID(String deployID) {
this.scaleTargetID = deployID;
}
/**
* The name of the service or topology to scale.
*
* @return the scaleTargetName
*/
@DocumentationExample("telegreen_db")
public String getScaleTargetName() {
return scaleTargetName;
}
/**
* @param serviceName the scaleTargetName to set
*/
public void setScaleTargetName(String serviceName) {
this.scaleTargetName = serviceName;
}
/**
* The number of instances to start. This number is absolute not cumulative.
* If we have 2 instances running and we request for 3 we'll have 3 if we
* request 1 we'll have 1
*
* @return the numOfInstances
*/
@DocumentationExample("5")
public int getNumOfInstances() {
return numOfInstances;
}
/**
* @param numOfInstances the numOfInstances to set
*/
public void setNumOfInstances(int numOfInstances) {
this.numOfInstances = numOfInstances;
}
}
......@@ -17,18 +17,12 @@ package nl.uva.sne.drip.drip.provisioner.utils;
import com.fasterxml.jackson.core.JsonParser;
import com.fasterxml.jackson.databind.ObjectMapper;
import java.io.BufferedReader;
import java.io.File;
import java.io.FileNotFoundException;
import java.io.FileOutputStream;
import java.io.IOException;
import java.io.InputStream;
import java.io.InputStreamReader;
import java.io.PrintWriter;
import java.net.MalformedURLException;
import java.net.URL;
import java.nio.channels.Channels;
import java.nio.channels.ReadableByteChannel;
import java.security.cert.CertificateEncodingException;
import java.util.ArrayList;
import java.util.Arrays;
......@@ -132,13 +126,30 @@ public class MessageParsing {
return sshKeys;
}
public static MessageParameter getScaleInfo(JSONArray parameters) throws JSONException, IOException {
ObjectMapper mapper = new ObjectMapper();
mapper.configure(JsonParser.Feature.ALLOW_SINGLE_QUOTES, true);
for (int i = 0; i < parameters.length(); i++) {
JSONObject param = (JSONObject) parameters.get(i);
MessageParameter messageParam = mapper.readValue(param.toString(), MessageParameter.class);
String name = messageParam.getName();
String value = messageParam.getValue();
if(name.equals("scale_topology_name")){
return messageParam;
}
}
return null;
}
public static Map<String, Object> ymlStream2Map(InputStream in) {
Yaml yaml = new Yaml();
Map<String, Object> map = (Map<String, Object>) yaml.load(in);
return map;
}
public static List<Credential> getCloudCredentials(JSONArray parameters, String tempInputDirPath) throws JSONException, FileNotFoundException, IOException, CertificateEncodingException, GSSException {
public static List<Credential> getCloudCredentials(JSONArray parameters, String tempInputDirPath) throws JSONException, FileNotFoundException, IOException, CertificateEncodingException, GSSException {
List<Credential> credentials = new ArrayList<>();
for (int i = 0; i < parameters.length(); i++) {
JSONObject param = (JSONObject) parameters.get(i);
......
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