Commit 8991bf18 authored by Spiros Koulouzis's avatar Spiros Koulouzis

changed controller name to configure controller

fixed bug of missing ids in provision response 
parent a7d5e9ad
......@@ -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 April 3, 2017</p>
<p class="lead">Created April 4, 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.
......@@ -97,7 +97,7 @@
</tbody>
</table>
<h3 id="artifact_java_json_client_library">Java JSON Client Library</h3>
<p class="lead">Created April 3, 2017</p>
<p class="lead">Created April 4, 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
......@@ -127,7 +127,7 @@
</tbody>
</table>
<h3 id="artifact_java_xml_client_library">Java XML Client Library</h3>
<p class="lead">Created April 3, 2017</p>
<p class="lead">Created April 4, 2017</p>
<p><p>
The Java client-side library is used to access the Web service API for this application using Java.
</p>
......@@ -155,7 +155,7 @@
</tbody>
</table>
<h3 id="artifact_js_client_library">JavaScript Client Library</h3>
<p class="lead">Created April 3, 2017</p>
<p class="lead">Created April 4, 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
......@@ -190,7 +190,7 @@
</tbody>
</table>
<h3 id="artifact_php_json_client_library">PHP JSON Client Library</h3>
<p class="lead">Created April 3, 2017</p>
<p class="lead">Created April 4, 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">3.75K</span></td>
<td><span class="downloadfile-size">3.76K</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 April 3, 2017</p>
<p class="lead">Created April 4, 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
......@@ -251,7 +251,7 @@
</tbody>
</table>
<h3 id="artifact_ruby_json_client_library">Ruby JSON Client Library</h3>
<p class="lead">Created April 3, 2017</p>
<p class="lead">Created April 4, 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
......
......@@ -599,8 +599,8 @@ module Types
# the provisionID
attr_accessor :provisionID
# the clusterType
attr_accessor :clusterType
# the managerType
attr_accessor :managerType
# the configurationID
attr_accessor :configurationID
......@@ -608,7 +608,7 @@ module Types
def to_jaxb_json_hash
_h = super
_h['provisionID'] = provisionID.to_jaxb_json_hash unless provisionID.nil?
_h['clusterType'] = clusterType.to_jaxb_json_hash unless clusterType.nil?
_h['managerType'] = managerType.to_jaxb_json_hash unless managerType.nil?
_h['configurationID'] = configurationID.to_jaxb_json_hash unless configurationID.nil?
return _h
end
......@@ -635,23 +635,23 @@ module Types
@provisionID = _oa
end
end
if !_o['clusterType'].nil?
_oa = _o['clusterType']
if !_o['managerType'].nil?
_oa = _o['managerType']
if(_oa.is_a? Hash)
@clusterType = EnunciateHelpers::LAMB_CLASS_AWARE.call(_oa) if _oa['@class']
@clusterType = String.from_json(_oa) unless _oa['@class']
@managerType = EnunciateHelpers::LAMB_CLASS_AWARE.call(_oa) if _oa['@class']
@managerType = String.from_json(_oa) unless _oa['@class']
elsif (_oa.is_a? Array)
#an array(of hashes hopefully) or scalar
@clusterType = Array.new
@managerType = Array.new
_oa.each { | _item |
if ((_item.nil? || _item['@class'].nil?)rescue true)
@clusterType.push String.from_json(_item)
@managerType.push String.from_json(_item)
else
@clusterType.push EnunciateHelpers::LAMB_CLASS_AWARE.call(_item)
@managerType.push EnunciateHelpers::LAMB_CLASS_AWARE.call(_item)
end
}
else
@clusterType = _oa
@managerType = _oa
end
end
if !_o['configurationID'].nil?
......@@ -1417,43 +1417,65 @@ module V1
module Types
# (no documentation provided)
class ToscaRepresentation < Nl::Uva::Sne::Drip::Commons::V1::Types::KeyValueHolder
class DeployResponse < Nl::Uva::Sne::Drip::Commons::V1::Types::DeployRequest
# the name
attr_accessor :name
# (no documentation provided)
attr_accessor :key
# the id
attr_accessor :id
# the json hash for this ToscaRepresentation
# the json hash for this DeployResponse
def to_jaxb_json_hash
_h = super
_h['name'] = name.to_jaxb_json_hash unless name.nil?
_h['key'] = key.to_jaxb_json_hash unless key.nil?
_h['id'] = id.to_jaxb_json_hash unless id.nil?
return _h
end
#initializes this ToscaRepresentation with a json hash
#initializes this DeployResponse with a json hash
def init_jaxb_json_hash(_o)
super _o
if !_o['name'].nil?
_oa = _o['name']
if !_o['key'].nil?
_oa = _o['key']
if(_oa.is_a? Hash)
@name = EnunciateHelpers::LAMB_CLASS_AWARE.call(_oa) if _oa['@class']
@name = String.from_json(_oa) unless _oa['@class']
@key = EnunciateHelpers::LAMB_CLASS_AWARE.call(_oa) if _oa['@class']
@key = Nl::Uva::Sne::Drip::Commons::V1::Types::Key.from_json(_oa) unless _oa['@class']
elsif (_oa.is_a? Array)
#an array(of hashes hopefully) or scalar
@name = Array.new
@key = Array.new
_oa.each { | _item |
if ((_item.nil? || _item['@class'].nil?)rescue true)
@name.push String.from_json(_item)
@key.push Nl::Uva::Sne::Drip::Commons::V1::Types::Key.from_json(_item)
else
@name.push EnunciateHelpers::LAMB_CLASS_AWARE.call(_item)
@key.push EnunciateHelpers::LAMB_CLASS_AWARE.call(_item)
end
}
else
@name = _oa
@key = _oa
end
end
if !_o['id'].nil?
_oa = _o['id']
if(_oa.is_a? Hash)
@id = EnunciateHelpers::LAMB_CLASS_AWARE.call(_oa) if _oa['@class']
@id = String.from_json(_oa) unless _oa['@class']
elsif (_oa.is_a? Array)
#an array(of hashes hopefully) or scalar
@id = Array.new
_oa.each { | _item |
if ((_item.nil? || _item['@class'].nil?)rescue true)
@id.push String.from_json(_item)
else
@id.push EnunciateHelpers::LAMB_CLASS_AWARE.call(_item)
end
}
else
@id = _oa
end
end
end
# constructs a ToscaRepresentation from a (parsed) JSON hash
# constructs a DeployResponse from a (parsed) JSON hash
def self.from_json(o)
if o.nil?
return nil
......@@ -1494,65 +1516,43 @@ module V1
module Types
# (no documentation provided)
class DeployResponse < Nl::Uva::Sne::Drip::Commons::V1::Types::DeployRequest
class ToscaRepresentation < Nl::Uva::Sne::Drip::Commons::V1::Types::KeyValueHolder
# (no documentation provided)
attr_accessor :key
# the id
attr_accessor :id
# the name
attr_accessor :name
# the json hash for this DeployResponse
# the json hash for this ToscaRepresentation
def to_jaxb_json_hash
_h = super
_h['key'] = key.to_jaxb_json_hash unless key.nil?
_h['id'] = id.to_jaxb_json_hash unless id.nil?
_h['name'] = name.to_jaxb_json_hash unless name.nil?
return _h
end
#initializes this DeployResponse with a json hash
#initializes this ToscaRepresentation with a json hash
def init_jaxb_json_hash(_o)
super _o
if !_o['key'].nil?
_oa = _o['key']
if(_oa.is_a? Hash)
@key = EnunciateHelpers::LAMB_CLASS_AWARE.call(_oa) if _oa['@class']
@key = Nl::Uva::Sne::Drip::Commons::V1::Types::Key.from_json(_oa) unless _oa['@class']
elsif (_oa.is_a? Array)
#an array(of hashes hopefully) or scalar
@key = Array.new
_oa.each { | _item |
if ((_item.nil? || _item['@class'].nil?)rescue true)
@key.push Nl::Uva::Sne::Drip::Commons::V1::Types::Key.from_json(_item)
else
@key.push EnunciateHelpers::LAMB_CLASS_AWARE.call(_item)
end
}
else
@key = _oa
end
end
if !_o['id'].nil?
_oa = _o['id']
if !_o['name'].nil?
_oa = _o['name']
if(_oa.is_a? Hash)
@id = EnunciateHelpers::LAMB_CLASS_AWARE.call(_oa) if _oa['@class']
@id = String.from_json(_oa) unless _oa['@class']
@name = EnunciateHelpers::LAMB_CLASS_AWARE.call(_oa) if _oa['@class']
@name = String.from_json(_oa) unless _oa['@class']
elsif (_oa.is_a? Array)
#an array(of hashes hopefully) or scalar
@id = Array.new
@name = Array.new
_oa.each { | _item |
if ((_item.nil? || _item['@class'].nil?)rescue true)
@id.push String.from_json(_item)
@name.push String.from_json(_item)
else
@id.push EnunciateHelpers::LAMB_CLASS_AWARE.call(_item)
@name.push EnunciateHelpers::LAMB_CLASS_AWARE.call(_item)
end
}
else
@id = _oa
@name = _oa
end
end
end
# constructs a DeployResponse from a (parsed) JSON hash
# constructs a ToscaRepresentation from a (parsed) JSON hash
def self.from_json(o)
if o.nil?
return nil
......
......@@ -118,19 +118,40 @@ provisoner to request for resources (VMs).</span>
<td> <span class="resource-description">This controller is responsible for handling CloudCredentials.
CloudCredentials are a represntation of the credentials that are used by the
provisoner to request for resources (VMs)</span>
</td>
</tr>
<tr class="clickable-row" data-href="resource_ConfigurationController.html">
<td> <span class="resource-name">ConfigurationController</span>
</td>
<td class="text-nowrap"><ul class="list-unstyled"><li><samp> <span class="resource-path">/user/v1.0/deployer/configuration/all</span>
</samp></li><li><samp> <span class="resource-path">/user/v1.0/deployer/configuration/ids</span>
</samp></li><li><samp> <span class="resource-path">/user/v1.0/deployer/configuration/post</span>
</samp></li><li><samp> <span class="resource-path">/user/v1.0/deployer/configuration/upload</span>
</samp></li><li><samp> <span class="resource-path">/user/v1.0/deployer/configuration/{id}</span>
</samp></li></ul></td>
<td class="text-nowrap"><ul class="list-unstyled"><li><samp> <span class="label label-default resource-method">DELETE</span>
</samp></li><li><samp> <span class="label label-default resource-method">GET</span>
</samp></li><li><samp> <span class="label label-default resource-method">POST</span>
</samp></li><li><samp> <span class="label label-default resource-method">POST</span>
</samp></li><li><samp> <span class="label label-default resource-method">DELETE</span> <span class="label label-default resource-method">GET</span>
</samp></li></ul></td>
<td> <span class="resource-description">This controller is responsible for storing PlayBook descriptions that can be
used by the planner.</span>
</td>
</tr>
<tr class="clickable-row" data-href="resource_DeployController.html">
<td> <span class="resource-name">DeployController</span>
</td>
<td class="text-nowrap"><ul class="list-unstyled"><li><samp> <span class="resource-path">/user/v1.0/deployer/all</span>
</samp></li><li><samp> <span class="resource-path">/user/v1.0/deployer/deploy/</span>
</samp></li><li><samp> <span class="resource-path">/user/v1.0/deployer/deploy</span>
</samp></li><li><samp> <span class="resource-path">/user/v1.0/deployer/ids</span>
</samp></li><li><samp> <span class="resource-path">/user/v1.0/deployer/sample</span>
</samp></li><li><samp> <span class="resource-path">/user/v1.0/deployer/{id}</span>
</samp></li></ul></td>
<td class="text-nowrap"><ul class="list-unstyled"><li><samp> <span class="label label-default resource-method">DELETE</span>
</samp></li><li><samp> <span class="label label-default resource-method">POST</span>
</samp></li><li><samp> <span class="label label-default resource-method">GET</span>
</samp></li><li><samp> <span class="label label-default resource-method">GET</span>
</samp></li><li><samp> <span class="label label-default resource-method">DELETE</span> <span class="label label-default resource-method">GET</span>
</samp></li></ul></td>
<td> <span class="resource-description">This controller is responsible for deploying a cluster on provisoned
......@@ -153,12 +174,12 @@ resources.</span>
<tr class="clickable-row" data-href="resource_KeysController.html">
<td> <span class="resource-name">KeysController</span>
</td>
<td class="text-nowrap"><ul class="list-unstyled"><li><samp> <span class="resource-path">/user/v1.0/key</span>
</samp></li><li><samp> <span class="resource-path">/user/v1.0/key/all</span>
</samp></li><li><samp> <span class="resource-path">/user/v1.0/key/ids</span>
</samp></li><li><samp> <span class="resource-path">/user/v1.0/key/sample</span>
</samp></li><li><samp> <span class="resource-path">/user/v1.0/key/upload</span>
</samp></li><li><samp> <span class="resource-path">/user/v1.0/key/{id}</span>
<td class="text-nowrap"><ul class="list-unstyled"><li><samp> <span class="resource-path">/user/v1.0/keys</span>
</samp></li><li><samp> <span class="resource-path">/user/v1.0/keys/all</span>
</samp></li><li><samp> <span class="resource-path">/user/v1.0/keys/ids</span>
</samp></li><li><samp> <span class="resource-path">/user/v1.0/keys/sample</span>
</samp></li><li><samp> <span class="resource-path">/user/v1.0/keys/upload</span>
</samp></li><li><samp> <span class="resource-path">/user/v1.0/keys/{id}</span>
</samp></li></ul></td>
<td class="text-nowrap"><ul class="list-unstyled"><li><samp> <span class="label label-default resource-method">POST</span>
</samp></li><li><samp> <span class="label label-default resource-method">DELETE</span>
......@@ -200,25 +221,6 @@ provisopned based on a TOSCA description.</span>
</samp></li></ul></td>
<td> <span class="resource-description">This controller is responsible for planing the type of resources to be
provisopned based on a TOSCA description.</span>
</td>
</tr>
<tr class="clickable-row" data-href="resource_PlaybookController.html">
<td> <span class="resource-name">PlaybookController</span>
</td>
<td class="text-nowrap"><ul class="list-unstyled"><li><samp> <span class="resource-path">/user/v1.0/playbook/all</span>
</samp></li><li><samp> <span class="resource-path">/user/v1.0/playbook/ids</span>
</samp></li><li><samp> <span class="resource-path">/user/v1.0/playbook/post</span>
</samp></li><li><samp> <span class="resource-path">/user/v1.0/playbook/upload</span>
</samp></li><li><samp> <span class="resource-path">/user/v1.0/playbook/{id}</span>
</samp></li></ul></td>
<td class="text-nowrap"><ul class="list-unstyled"><li><samp> <span class="label label-default resource-method">DELETE</span>
</samp></li><li><samp> <span class="label label-default resource-method">GET</span>
</samp></li><li><samp> <span class="label label-default resource-method">POST</span>
</samp></li><li><samp> <span class="label label-default resource-method">POST</span>
</samp></li><li><samp> <span class="label label-default resource-method">DELETE</span> <span class="label label-default resource-method">GET</span>
</samp></li></ul></td>
<td> <span class="resource-description">This controller is responsible for storing PlayBook descriptions that can be
used by the planner.</span>
</td>
</tr>
<tr class="clickable-row" data-href="resource_ProvisionController.html">
......
......@@ -91,7 +91,7 @@
</td>
</tr>
<tr>
<td> <span class="property-name">clusterType</span>
<td> <span class="property-name">managerType</span>
</td>
<td> <span class="datatype-reference">string
</span>
......@@ -126,7 +126,7 @@
<pre class="prettyprint language-js example">{
&quot;provisionID&quot; : &quot;...&quot;,
&quot;clusterType&quot; : &quot;...&quot;,
&quot;managerType&quot; : &quot;...&quot;,
&quot;configurationID&quot; : &quot;...&quot;,
&quot;owner&quot; : &quot;...&quot;
}</pre>
......
......@@ -109,7 +109,7 @@
<td><span class="property-description"></span></td>
</tr>
<tr>
<td><span class="property-name">clusterType</span></td>
<td><span class="property-name">managerType</span></td>
<td><span class="datatype-reference">string
</span></td>
<td><span class="property-description"></span></td>
......@@ -150,7 +150,7 @@
},
&quot;id&quot; : &quot;...&quot;,
&quot;provisionID&quot; : &quot;...&quot;,
&quot;clusterType&quot; : &quot;...&quot;,
&quot;managerType&quot; : &quot;...&quot;,
&quot;configurationID&quot; : &quot;...&quot;,
&quot;owner&quot; : &quot;...&quot;
}</pre>
......
......@@ -68,7 +68,7 @@
<dl class="dl-horizontal">
<dt>Subtypes</dt>
<dd><a href="json_PlaybookRepresentation.html">PlaybookRepresentation</a>, <a href="json_Script.html">Script</a>, <a href="json_ProvisionRequest.html">ProvisionRequest</a>, <a href="json_ToscaRepresentation.html">ToscaRepresentation</a>, <a href="json_DeployRequest.html">DeployRequest</a>, <a href="json_KeyValueHolder.html">KeyValueHolder</a>, <a href="json_PlanResponse.html">PlanResponse</a>, <a href="json_ProvisionResponse.html">ProvisionResponse</a>, <a href="json_DeployResponse.html">DeployResponse</a>, <a href="json_Key.html">Key</a>, <a href="json_CloudCredentials.html">CloudCredentials</a></dd>
<dd><a href="json_PlaybookRepresentation.html">PlaybookRepresentation</a>, <a href="json_Script.html">Script</a>, <a href="json_ProvisionRequest.html">ProvisionRequest</a>, <a href="json_ToscaRepresentation.html">ToscaRepresentation</a>, <a href="json_DeployRequest.html">DeployRequest</a>, <a href="json_KeyValueHolder.html">KeyValueHolder</a>, <a href="json_PlanResponse.html">PlanResponse</a>, <a href="json_DeployResponse.html">DeployResponse</a>, <a href="json_ProvisionResponse.html">ProvisionResponse</a>, <a href="json_Key.html">Key</a>, <a href="json_CloudCredentials.html">CloudCredentials</a></dd>
</dl>
<table class="table datatype-properties">
......
......@@ -299,7 +299,7 @@ to request for resources.]]>
<xs:sequence>
<xs:element name="provisionID" type="xs:string" minOccurs="0">
</xs:element>
<xs:element name="clusterType" type="xs:string" minOccurs="0">
<xs:element name="managerType" type="xs:string" minOccurs="0">
</xs:element>
<xs:element name="configurationID" type="xs:string" minOccurs="0">
</xs:element>
......
<!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: ConfigurationController</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: ConfigurationController</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><a href="#resource_ConfigurationController_deleteAll_DELETE"><abbr title="DELETE /user/v1.0/deployer/configuration/all">DELETE /user/v1.0/deployer/con...</abbr></a></li>
<li><a href="#resource_ConfigurationController_getIds_GET"><abbr title="GET /user/v1.0/deployer/configuration/ids">GET /user/v1.0/deployer/config...</abbr></a></li>
<li><a href="#resource_ConfigurationController_post_POST"><abbr title="POST /user/v1.0/deployer/configuration/post">POST /user/v1.0/deployer/confi...</abbr></a></li>
<li><a href="#resource_ConfigurationController_toscaUpload_POST"><abbr title="POST /user/v1.0/deployer/configuration/upload">POST /user/v1.0/deployer/confi...</abbr></a></li>
<li><a href="#resource_ConfigurationController_delete_DELETE"><abbr title="DELETE /user/v1.0/deployer/configuration/{id}">DELETE /user/v1.0/deployer/con...</abbr></a></li>
<li><a href="#resource_ConfigurationController_get_GET"><abbr title="GET /user/v1.0/deployer/configuration/{id}">GET /user/v1.0/deployer/config...</abbr></a></li>
<li class="divider"></li>
<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="resources.html">Resources</a></li>
<li class="dropdown"><a href="resource_ConfigurationController.html">ConfigurationController</a></li>
</ol>
<h1 class="page-header">ConfigurationController <small>Resource</small></h1>
<p>This controller is responsible for storing PlayBook descriptions that can be
used by the planner.</p>
<div id="resource_ConfigurationController_deleteAll_DELETE">
<h3><span class="label label-default resource-method">DELETE</span> <span class="resource-path">/user/v1.0/deployer/configuration/all <a href="../user/v1.0/deployer/configuration/all" class="glyphicon glyphicon-new-window" target="_blank"></a></span></h3>
<p>Gets the IDs of all the stored PlayBook descriptions.</p>
<dl class="dl-horizontal">
<dt>Security Roles Allowed</dt>
<dd>ADMIN</dd>
</dl>
<table class="table resource-response-body">
<caption>Response Body</caption>
<thead>
<tr>
<th>media type</th>
<th>data type</th>
<th>description</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>
<td rowspan="2" class="multi-row-description"><span class="response-description">a list of all the IDs</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>
DELETE /user/v1.0/deployer/configuration/all
Accept: application/json
</pre>
</div>
<div class="col-md-6">
<h5>Response</h5>
<pre>
HTTP/1.1 204 Looks Good
Content-Type: application/json
<code class="prettyprint language-txt">
...
</code>
</pre>
</div>
</div>
</div>
</div>
<div id="resource_ConfigurationController_getIds_GET">
<h3><span class="label label-default resource-method">GET</span> <span class="resource-path">/user/v1.0/deployer/configuration/ids <a href="../user/v1.0/deployer/configuration/ids" class="glyphicon glyphicon-new-window" target="_blank"></a></span></h3>
<p>Gets the IDs of all the stored PlayBook descriptions.</p>
<dl class="dl-horizontal">
<dt>Security Roles Allowed</dt>
<dd>ADMIN, USER</dd>
</dl>
<table class="table resource-response-body">
<caption>Response Body</caption>
<thead>
<tr>
<th>media type</th>
<th>data type</th>
<th>description</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">array of string
(JSON)</span></td>
<td rowspan="2" class="multi-row-description"><span class="response-description">a list of all the IDs</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">list of 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>
GET /user/v1.0/deployer/configuration/ids
Accept: application/json
</pre>
</div>
<div class="col-md-6">
<h5>Response</h5>
<pre>
HTTP/1.1 200 Looks Good
Content-Type: application/json
<code class="prettyprint language-txt">
...
</code>
</pre>
</div>
</div>
</div>
</div>
<div id="resource_ConfigurationController_post_POST">
<h3><span class="label label-default resource-method">POST</span> <span class="resource-path">/user/v1.0/deployer/configuration/post <a href="../user/v1.0/deployer/configuration/post" 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">string
(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">string
(XML)</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/deployer/configuration/post
Content-Type: application/json
Accept: application/json
<code class="prettyprint language-txt">
...
</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_ConfigurationController_toscaUpload_POST">
<h3><span class="label label-default resource-method">POST</span> <span class="resource-path">/user/v1.0/deployer/configuration/upload <a href="../user/v1.0/deployer/configuration/upload" class="glyphicon glyphicon-new-window" target="_blank"></a></span></h3>
<p>Uploads and stores a PlayBook description file</p>
<dl class="dl-horizontal">
<dt>Security Roles Allowed</dt>
<dd>ADMIN, USER</dd>
</dl>
<table class="table resource-parameters">
<caption>Request Parameters</caption>
<thead>
<tr>
<th>name</th>
<th>type</th>
<th>description</th>
</tr>
</thead>
<tbody>
<tr>
<td><span class="parameter-name">file</span></td>
<td>query</td>
<td><span class="parameter-description">&nbsp;</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>
<th>description</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>
<td rowspan="2" class="multi-row-description"><span class="response-description">the ID of the PlayBook description</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/deployer/configuration/upload
Accept: application/json
</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_ConfigurationController_delete_DELETE">
<h3><span class="label label-default resource-method">DELETE</span> <span class="resource-path">/user/v1.0/deployer/configuration/{id} <a href="../user/v1.0/deployer/configuration/{id}" class="glyphicon glyphicon-new-window" target="_blank"></a></span></h3>
<p>Deletes the PlayBook description.</p>
<dl class="dl-horizontal">
<dt>Security Roles Allowed</dt>
<dd>ADMIN, USER</dd>
</dl>
<table class="table resource-parameters">
<caption>Request Parameters</caption>
<thead>
<tr>
<th>name</th>
<th>type</th>
<th>description</th>
</tr>
</thead>
<tbody>
<tr>
<td><span class="parameter-name">id</span></td>
<td>path</td>
<td><span class="parameter-description">&nbsp;</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>
<th>description</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>
<td rowspan="2" class="multi-row-description"><span class="response-description">The ID of the deleted PlayBook description.</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>
DELETE /user/v1.0/deployer/configuration/{id}
Accept: application/json
</pre>
</div>
<div class="col-md-6">
<h5>Response</h5>
<pre>
HTTP/1.1 204 Looks Good
Content-Type: application/json
<code class="prettyprint language-txt">
...
</code>
</pre>
</div>
</div>
</div>
</div>
<div id="resource_ConfigurationController_get_GET">
<h3><span class="label label-default resource-method">GET</span> <span class="resource-path">/user/v1.0/deployer/configuration/{id} <a href="../user/v1.0/deployer/configuration/{id}" class="glyphicon glyphicon-new-window" target="_blank"></a></span></h3>
<p>Gets the PlayBook description.</p>
<dl class="dl-horizontal">
<dt>Security Roles Allowed</dt>
<dd>ADMIN, USER</dd>
</dl>
<table class="table resource-parameters">
<caption>Request Parameters</caption>
<thead>
<tr>
<th>name</th>
<th>type</th>
<th>description</th>
</tr>
</thead>
<tbody>
<tr>
<td><span class="parameter-name">id</span></td>
<td>path</td>
<td><span class="parameter-description">the ID PlayBook description.</span></td>
</tr>
<tr>
<td><span class="parameter-name">format</span></td>
<td>query</td>
<td><span class="parameter-description">&nbsp;</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>
<th>description</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>
<td rowspan="2" class="multi-row-description"><span class="response-description">the PlayBook description.</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>
GET /user/v1.0/deployer/configuration/{id}
Accept: application/json
</pre>
</div>
<div class="col-md-6">
<h5>Response</h5>
<pre>
HTTP/1.1 200 Looks Good
Content-Type: application/json
<code class="prettyprint language-txt">
...
</code>
</pre>
</div>
</div>
</div>
</div>
<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>
......@@ -52,8 +52,9 @@
<div class="col-sm-3 col-md-2 sidebar" id="apinav">
<ul class="nav nav-sidebar">
<li><a href="#resource_DeployController_deleteAll_DELETE">DELETE /user/v1.0/deployer/all</a></li>
<li><a href="#resource_DeployController_deploy_POST"><abbr title="POST /user/v1.0/deployer/deploy/">POST /user/v1.0/deployer/deplo...</abbr></a></li>
<li><a href="#resource_DeployController_deploy_POST"><abbr title="POST /user/v1.0/deployer/deploy">POST /user/v1.0/deployer/deplo...</abbr></a></li>
<li><a href="#resource_DeployController_getIds_GET">GET /user/v1.0/deployer/ids</a></li>
<li><a href="#resource_DeployController_sample_GET">GET /user/v1.0/deployer/sample</a></li>
<li><a href="#resource_DeployController_delete_DELETE"><abbr title="DELETE /user/v1.0/deployer/{id}">DELETE /user/v1.0/deployer/{id...</abbr></a></li>
<li><a href="#resource_DeployController_get_GET">GET /user/v1.0/deployer/{id}</a></li>
<li class="divider"></li>
......@@ -132,7 +133,7 @@ Content-Type: application/json
</div>
<div id="resource_DeployController_deploy_POST">
<h3><span class="label label-default resource-method">POST</span> <span class="resource-path">/user/v1.0/deployer/deploy/ <a href="../user/v1.0/deployer/deploy/" class="glyphicon glyphicon-new-window" target="_blank"></a></span></h3>
<h3><span class="label label-default resource-method">POST</span> <span class="resource-path">/user/v1.0/deployer/deploy <a href="../user/v1.0/deployer/deploy" class="glyphicon glyphicon-new-window" target="_blank"></a></span></h3>
<p></p>
......@@ -141,35 +142,24 @@ Content-Type: application/json
<dd>ADMIN, USER</dd>
</dl>
<table class="table resource-parameters">
<caption>Request Parameters</caption>
<table class="table resource-request-body">
<caption>Request Body</caption>
<thead>
<tr>
<th>name</th>
<th>type</th>
<th>description</th>
<th>media type</th>
<th>data type</th>
</tr>
</thead>
<tbody>
<tr>
<td><span class="parameter-name">clusterType</span></td>
<td>form</td>
<td><span class="parameter-description">&nbsp;</span></td>
</tr>
<tr>
<td><span class="parameter-name">configurationID</span></td>
<td>form</td>
<td><span class="parameter-description">&nbsp;</span></td>
</tr>
<tr>
<td><span class="parameter-name">owner</span></td>
<td>form</td>
<td><span class="parameter-description">&nbsp;</span></td>
<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_DeployRequest.html">DeployRequest</a>
(JSON)</span></td>
</tr>
<tr>
<td><span class="parameter-name">provisionID</span></td>
<td>form</td>
<td><span class="parameter-description">&nbsp;</span></td>
<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_deployRequest.html">deployRequest</a>
(XML)</span></td>
</tr>
</tbody>
</table>
......@@ -202,9 +192,18 @@ Content-Type: application/json
<div class="col-md-6">
<h5>Request</h5>
<pre>
POST /user/v1.0/deployer/deploy/
POST /user/v1.0/deployer/deploy
Content-Type: application/json
Accept: application/json
<code class="prettyprint language-js">
{
&quot;provisionID&quot; : &quot;...&quot;,
&quot;managerType&quot; : &quot;...&quot;,
&quot;configurationID&quot; : &quot;...&quot;,
&quot;owner&quot; : &quot;...&quot;
}
</code>
</pre>
</div>
<div class="col-md-6">
......@@ -225,7 +224,7 @@ Content-Type: application/json
<div id="resource_DeployController_getIds_GET">
<h3><span class="label label-default resource-method">GET</span> <span class="resource-path">/user/v1.0/deployer/ids <a href="../user/v1.0/deployer/ids" class="glyphicon glyphicon-new-window" target="_blank"></a></span></h3>
<p>Gets the IDs of all the stored cluster credentials</p>
<p></p>
<dl class="dl-horizontal">
<dt>Security Roles Allowed</dt>
......@@ -238,7 +237,6 @@ Content-Type: application/json
<tr>
<th>media type</th>
<th>data type</th>
<th>description</th>
</tr>
</thead>
<tbody>
......@@ -246,7 +244,6 @@ Content-Type: application/json
<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">array of string
(JSON)</span></td>
<td rowspan="2" class="multi-row-description"><span class="response-description">a list of all the IDs</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>
......@@ -282,10 +279,73 @@ Content-Type: application/json
</div>
</div>
<div id="resource_DeployController_sample_GET">
<h3><span class="label label-default resource-method">GET</span> <span class="resource-path">/user/v1.0/deployer/sample <a href="../user/v1.0/deployer/sample" 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-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"><a href="json_DeployRequest.html">DeployRequest</a>
(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"><a href="xml_ns0_deployRequest.html">deployRequest</a>
(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>
GET /user/v1.0/deployer/sample
Accept: application/json
</pre>
</div>
<div class="col-md-6">
<h5>Response</h5>
<pre>
HTTP/1.1 200 Looks Good
Content-Type: application/json
<code class="prettyprint language-js">
{
&quot;provisionID&quot; : &quot;...&quot;,
&quot;managerType&quot; : &quot;...&quot;,
&quot;configurationID&quot; : &quot;...&quot;,
&quot;owner&quot; : &quot;...&quot;
}
</code>
</pre>
</div>
</div>
</div>
</div>
<div id="resource_DeployController_delete_DELETE">
<h3><span class="label label-default resource-method">DELETE</span> <span class="resource-path">/user/v1.0/deployer/{id} <a href="../user/v1.0/deployer/{id}" class="glyphicon glyphicon-new-window" target="_blank"></a></span></h3>
<p>Deletes a cluster credential</p>
<p></p>
<dl class="dl-horizontal">
<dt>Security Roles Allowed</dt>
......@@ -316,7 +376,6 @@ Content-Type: application/json
<tr>
<th>media type</th>
<th>data type</th>
<th>description</th>
</tr>
</thead>
<tbody>
......@@ -324,7 +383,6 @@ Content-Type: application/json
<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>
<td rowspan="2" class="multi-row-description"><span class="response-description">the id f the deleted cluster credential</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>
......@@ -363,7 +421,7 @@ Content-Type: application/json
<div id="resource_DeployController_get_GET">
<h3><span class="label label-default resource-method">GET</span> <span class="resource-path">/user/v1.0/deployer/{id} <a href="../user/v1.0/deployer/{id}" class="glyphicon glyphicon-new-window" target="_blank"></a></span></h3>
<p>Gets the cluster credentials.</p>
<p></p>
<dl class="dl-horizontal">
<dt>Security Roles Allowed</dt>
......@@ -394,7 +452,6 @@ Content-Type: application/json
<tr>
<th>media type</th>
<th>data type</th>
<th>description</th>
</tr>
</thead>
<tbody>
......@@ -402,7 +459,6 @@ Content-Type: application/json
<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"><a href="json_DeployResponse.html">DeployResponse</a>
(JSON)</span></td>
<td rowspan="2" class="multi-row-description"><span class="response-description">the cluster credentials</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>
......@@ -444,7 +500,7 @@ Content-Type: application/json
},
&quot;id&quot; : &quot;...&quot;,
&quot;provisionID&quot; : &quot;...&quot;,
&quot;clusterType&quot; : &quot;...&quot;,
&quot;managerType&quot; : &quot;...&quot;,
&quot;configurationID&quot; : &quot;...&quot;,
&quot;owner&quot; : &quot;...&quot;
}
......
......@@ -51,13 +51,13 @@
<div class="row">
<div class="col-sm-3 col-md-2 sidebar" id="apinav">
<ul class="nav nav-sidebar">
<li><a href="#resource_KeysController_postKey_POST">POST /user/v1.0/key</a></li>
<li><a href="#resource_KeysController_deleteAll_DELETE">DELETE /user/v1.0/key/all</a></li>
<li><a href="#resource_KeysController_getIds_GET">GET /user/v1.0/key/ids</a></li>
<li><a href="#resource_KeysController_geta_GET">GET /user/v1.0/key/sample</a></li>
<li><a href="#resource_KeysController_upload_POST">POST /user/v1.0/key/upload</a></li>
<li><a href="#resource_KeysController_delete_DELETE">DELETE /user/v1.0/key/{id}</a></li>
<li><a href="#resource_KeysController_get_GET">GET /user/v1.0/key/{id}</a></li>
<li><a href="#resource_KeysController_postKey_POST">POST /user/v1.0/keys</a></li>
<li><a href="#resource_KeysController_deleteAll_DELETE">DELETE /user/v1.0/keys/all</a></li>
<li><a href="#resource_KeysController_getIds_GET">GET /user/v1.0/keys/ids</a></li>
<li><a href="#resource_KeysController_geta_GET">GET /user/v1.0/keys/sample</a></li>
<li><a href="#resource_KeysController_upload_POST">POST /user/v1.0/keys/upload</a></li>
<li><a href="#resource_KeysController_delete_DELETE">DELETE /user/v1.0/keys/{id}</a></li>
<li><a href="#resource_KeysController_get_GET">GET /user/v1.0/keys/{id}</a></li>
<li class="divider"></li>
<li class="text-right"><a href="#top"><small>Back to Top</small></a></li>
</ul>
......@@ -77,7 +77,7 @@ be used by the provisoner to allow the user to login to the VMs from the
machine the keys correspond to.</p>
<div id="resource_KeysController_postKey_POST">
<h3><span class="label label-default resource-method">POST</span> <span class="resource-path">/user/v1.0/key <a href="../user/v1.0/key" class="glyphicon glyphicon-new-window" target="_blank"></a></span></h3>
<h3><span class="label label-default resource-method">POST</span> <span class="resource-path">/user/v1.0/keys <a href="../user/v1.0/keys" class="glyphicon glyphicon-new-window" target="_blank"></a></span></h3>
<p>Posts the Key and stores it. The Key is a container for public key
contents. The public key contents are represented in the 'key' field. All
......@@ -156,7 +156,7 @@ new lines in the 'key' field have to be replaced with the '\n' character.</p>
<div class="col-md-6">
<h5>Request</h5>
<pre>
POST /user/v1.0/key
POST /user/v1.0/keys
Content-Type: application/json
Accept: application/json
......@@ -191,7 +191,7 @@ Content-Type: application/json
</div>
<div id="resource_KeysController_deleteAll_DELETE">
<h3><span class="label label-default resource-method">DELETE</span> <span class="resource-path">/user/v1.0/key/all <a href="../user/v1.0/key/all" class="glyphicon glyphicon-new-window" target="_blank"></a></span></h3>
<h3><span class="label label-default resource-method">DELETE</span> <span class="resource-path">/user/v1.0/keys/all <a href="../user/v1.0/keys/all" class="glyphicon glyphicon-new-window" target="_blank"></a></span></h3>
<p></p>
......@@ -228,7 +228,7 @@ Content-Type: application/json
<div class="col-md-6">
<h5>Request</h5>
<pre>
DELETE /user/v1.0/key/all
DELETE /user/v1.0/keys/all
Accept: application/json
</pre>
......@@ -249,7 +249,7 @@ Content-Type: application/json
</div>
<div id="resource_KeysController_getIds_GET">
<h3><span class="label label-default resource-method">GET</span> <span class="resource-path">/user/v1.0/key/ids <a href="../user/v1.0/key/ids" class="glyphicon glyphicon-new-window" target="_blank"></a></span></h3>
<h3><span class="label label-default resource-method">GET</span> <span class="resource-path">/user/v1.0/keys/ids <a href="../user/v1.0/keys/ids" class="glyphicon glyphicon-new-window" target="_blank"></a></span></h3>
<p>Gets the IDs of all the stored Key</p>
......@@ -288,7 +288,7 @@ Content-Type: application/json
<div class="col-md-6">
<h5>Request</h5>
<pre>
GET /user/v1.0/key/ids
GET /user/v1.0/keys/ids
Accept: application/json
</pre>
......@@ -309,7 +309,7 @@ Content-Type: application/json
</div>
<div id="resource_KeysController_geta_GET">
<h3><span class="label label-default resource-method">GET</span> <span class="resource-path">/user/v1.0/key/sample <a href="../user/v1.0/key/sample" class="glyphicon glyphicon-new-window" target="_blank"></a></span></h3>
<h3><span class="label label-default resource-method">GET</span> <span class="resource-path">/user/v1.0/keys/sample <a href="../user/v1.0/keys/sample" class="glyphicon glyphicon-new-window" target="_blank"></a></span></h3>
<p></p>
......@@ -346,7 +346,7 @@ Content-Type: application/json
<div class="col-md-6">
<h5>Request</h5>
<pre>
GET /user/v1.0/key/sample
GET /user/v1.0/keys/sample
Accept: application/json
</pre>
......@@ -377,7 +377,7 @@ Content-Type: application/json
</div>
<div id="resource_KeysController_upload_POST">
<h3><span class="label label-default resource-method">POST</span> <span class="resource-path">/user/v1.0/key/upload <a href="../user/v1.0/key/upload" class="glyphicon glyphicon-new-window" target="_blank"></a></span></h3>
<h3><span class="label label-default resource-method">POST</span> <span class="resource-path">/user/v1.0/keys/upload <a href="../user/v1.0/keys/upload" class="glyphicon glyphicon-new-window" target="_blank"></a></span></h3>
<p>Uploads a public key (id_dsa.pub,id_rsa.pub)</p>
......@@ -434,7 +434,7 @@ Content-Type: application/json
<div class="col-md-6">
<h5>Request</h5>
<pre>
POST /user/v1.0/key/upload
POST /user/v1.0/keys/upload
Accept: application/json
</pre>
......@@ -455,7 +455,7 @@ Content-Type: application/json
</div>
<div id="resource_KeysController_delete_DELETE">
<h3><span class="label label-default resource-method">DELETE</span> <span class="resource-path">/user/v1.0/key/{id} <a href="../user/v1.0/key/{id}" class="glyphicon glyphicon-new-window" target="_blank"></a></span></h3>
<h3><span class="label label-default resource-method">DELETE</span> <span class="resource-path">/user/v1.0/keys/{id} <a href="../user/v1.0/keys/{id}" class="glyphicon glyphicon-new-window" target="_blank"></a></span></h3>
<p>Deletes a Key</p>
......@@ -512,7 +512,7 @@ Content-Type: application/json
<div class="col-md-6">
<h5>Request</h5>
<pre>
DELETE /user/v1.0/key/{id}
DELETE /user/v1.0/keys/{id}
Accept: application/json
</pre>
......@@ -533,7 +533,7 @@ Content-Type: application/json
</div>
<div id="resource_KeysController_get_GET">
<h3><span class="label label-default resource-method">GET</span> <span class="resource-path">/user/v1.0/key/{id} <a href="../user/v1.0/key/{id}" class="glyphicon glyphicon-new-window" target="_blank"></a></span></h3>
<h3><span class="label label-default resource-method">GET</span> <span class="resource-path">/user/v1.0/keys/{id} <a href="../user/v1.0/keys/{id}" class="glyphicon glyphicon-new-window" target="_blank"></a></span></h3>
<p>Gets the Key.</p>
......@@ -590,7 +590,7 @@ Content-Type: application/json
<div class="col-md-6">
<h5>Request</h5>
<pre>
GET /user/v1.0/key/{id}
GET /user/v1.0/keys/{id}
Accept: application/json
</pre>
......
......@@ -110,19 +110,40 @@ provisoner to request for resources (VMs).</span>
<td> <span class="resource-description">This controller is responsible for handling CloudCredentials.
CloudCredentials are a represntation of the credentials that are used by the
provisoner to request for resources (VMs)</span>
</td>
</tr>
<tr class="clickable-row" data-href="resource_ConfigurationController.html">
<td> <span class="resource-name">ConfigurationController</span>
</td>
<td class="text-nowrap"><ul class="list-unstyled"><li><samp> <span class="resource-path">/user/v1.0/deployer/configuration/all</span>
</samp></li><li><samp> <span class="resource-path">/user/v1.0/deployer/configuration/ids</span>
</samp></li><li><samp> <span class="resource-path">/user/v1.0/deployer/configuration/post</span>
</samp></li><li><samp> <span class="resource-path">/user/v1.0/deployer/configuration/upload</span>
</samp></li><li><samp> <span class="resource-path">/user/v1.0/deployer/configuration/{id}</span>
</samp></li></ul></td>
<td class="text-nowrap"><ul class="list-unstyled"><li><samp> <span class="label label-default resource-method">DELETE</span>
</samp></li><li><samp> <span class="label label-default resource-method">GET</span>
</samp></li><li><samp> <span class="label label-default resource-method">POST</span>
</samp></li><li><samp> <span class="label label-default resource-method">POST</span>
</samp></li><li><samp> <span class="label label-default resource-method">DELETE</span> <span class="label label-default resource-method">GET</span>
</samp></li></ul></td>
<td> <span class="resource-description">This controller is responsible for storing PlayBook descriptions that can be
used by the planner.</span>
</td>
</tr>
<tr class="clickable-row" data-href="resource_DeployController.html">
<td> <span class="resource-name">DeployController</span>
</td>
<td class="text-nowrap"><ul class="list-unstyled"><li><samp> <span class="resource-path">/user/v1.0/deployer/all</span>
</samp></li><li><samp> <span class="resource-path">/user/v1.0/deployer/deploy/</span>
</samp></li><li><samp> <span class="resource-path">/user/v1.0/deployer/deploy</span>
</samp></li><li><samp> <span class="resource-path">/user/v1.0/deployer/ids</span>
</samp></li><li><samp> <span class="resource-path">/user/v1.0/deployer/sample</span>
</samp></li><li><samp> <span class="resource-path">/user/v1.0/deployer/{id}</span>
</samp></li></ul></td>
<td class="text-nowrap"><ul class="list-unstyled"><li><samp> <span class="label label-default resource-method">DELETE</span>
</samp></li><li><samp> <span class="label label-default resource-method">POST</span>
</samp></li><li><samp> <span class="label label-default resource-method">GET</span>
</samp></li><li><samp> <span class="label label-default resource-method">GET</span>
</samp></li><li><samp> <span class="label label-default resource-method">DELETE</span> <span class="label label-default resource-method">GET</span>
</samp></li></ul></td>
<td> <span class="resource-description">This controller is responsible for deploying a cluster on provisoned
......@@ -145,12 +166,12 @@ resources.</span>
<tr class="clickable-row" data-href="resource_KeysController.html">
<td> <span class="resource-name">KeysController</span>
</td>
<td class="text-nowrap"><ul class="list-unstyled"><li><samp> <span class="resource-path">/user/v1.0/key</span>
</samp></li><li><samp> <span class="resource-path">/user/v1.0/key/all</span>
</samp></li><li><samp> <span class="resource-path">/user/v1.0/key/ids</span>
</samp></li><li><samp> <span class="resource-path">/user/v1.0/key/sample</span>
</samp></li><li><samp> <span class="resource-path">/user/v1.0/key/upload</span>
</samp></li><li><samp> <span class="resource-path">/user/v1.0/key/{id}</span>
<td class="text-nowrap"><ul class="list-unstyled"><li><samp> <span class="resource-path">/user/v1.0/keys</span>
</samp></li><li><samp> <span class="resource-path">/user/v1.0/keys/all</span>
</samp></li><li><samp> <span class="resource-path">/user/v1.0/keys/ids</span>
</samp></li><li><samp> <span class="resource-path">/user/v1.0/keys/sample</span>
</samp></li><li><samp> <span class="resource-path">/user/v1.0/keys/upload</span>
</samp></li><li><samp> <span class="resource-path">/user/v1.0/keys/{id}</span>
</samp></li></ul></td>
<td class="text-nowrap"><ul class="list-unstyled"><li><samp> <span class="label label-default resource-method">POST</span>
</samp></li><li><samp> <span class="label label-default resource-method">DELETE</span>
......@@ -192,25 +213,6 @@ provisopned based on a TOSCA description.</span>
</samp></li></ul></td>
<td> <span class="resource-description">This controller is responsible for planing the type of resources to be
provisopned based on a TOSCA description.</span>
</td>
</tr>
<tr class="clickable-row" data-href="resource_PlaybookController.html">
<td> <span class="resource-name">PlaybookController</span>
</td>
<td class="text-nowrap"><ul class="list-unstyled"><li><samp> <span class="resource-path">/user/v1.0/playbook/all</span>
</samp></li><li><samp> <span class="resource-path">/user/v1.0/playbook/ids</span>
</samp></li><li><samp> <span class="resource-path">/user/v1.0/playbook/post</span>
</samp></li><li><samp> <span class="resource-path">/user/v1.0/playbook/upload</span>
</samp></li><li><samp> <span class="resource-path">/user/v1.0/playbook/{id}</span>
</samp></li></ul></td>
<td class="text-nowrap"><ul class="list-unstyled"><li><samp> <span class="label label-default resource-method">DELETE</span>
</samp></li><li><samp> <span class="label label-default resource-method">GET</span>
</samp></li><li><samp> <span class="label label-default resource-method">POST</span>
</samp></li><li><samp> <span class="label label-default resource-method">POST</span>
</samp></li><li><samp> <span class="label label-default resource-method">DELETE</span> <span class="label label-default resource-method">GET</span>
</samp></li></ul></td>
<td> <span class="resource-description">This controller is responsible for storing PlayBook descriptions that can be
used by the planner.</span>
</td>
</tr>
<tr class="clickable-row" data-href="resource_ProvisionController.html">
......
......@@ -89,7 +89,7 @@
</thead>
<tbody>
<tr>
<td> <span class="property-name">clusterType</span>
<td> <span class="property-name">configurationID</span>
</td>
<td> <span class="datatype-reference">string
</span>
......@@ -103,11 +103,11 @@
<td> <span class="property-minMaxOccurs">0/1
</span>
</td>
<td> <span class="property-description">the clusterType</span>
<td> <span class="property-description">the configurationID</span>
</td>
</tr>
<tr>
<td> <span class="property-name">configurationID</span>
<td> <span class="property-name">managerType</span>
</td>
<td> <span class="datatype-reference">string
</span>
......@@ -121,7 +121,7 @@
<td> <span class="property-minMaxOccurs">0/1
</span>
</td>
<td> <span class="property-description">the configurationID</span>
<td> <span class="property-description">the managerType</span>
</td>
</tr>
<tr>
......@@ -166,7 +166,7 @@
<pre class="prettyprint language-xml example">&lt;d-----&gt;
&lt;provisionID&gt;...&lt;/provisionID&gt;
&lt;clusterType&gt;...&lt;/clusterType&gt;
&lt;managerType&gt;...&lt;/managerType&gt;
&lt;configurationID&gt;...&lt;/configurationID&gt;
&lt;owner&gt;...&lt;/owner&gt;
&lt;/d-----&gt;
......
......@@ -128,7 +128,7 @@
</tr>
<tbody>
<tr>
<td><span class="property-name">clusterType</span></td>
<td><span class="property-name">configurationID</span></td>
<td><span class="datatype-reference">string
</span></td>
<td><span class="property-type">element
......@@ -137,10 +137,10 @@
</span></td>
<td><span class="property-minMaxOccurs">0/1
</span></td>
<td><span class="property-description">the clusterType</span></td>
<td><span class="property-description">the configurationID</span></td>
</tr>
<tr>
<td><span class="property-name">configurationID</span></td>
<td><span class="property-name">managerType</span></td>
<td><span class="datatype-reference">string
</span></td>
<td><span class="property-type">element
......@@ -149,7 +149,7 @@
</span></td>
<td><span class="property-minMaxOccurs">0/1
</span></td>
<td><span class="property-description">the configurationID</span></td>
<td><span class="property-description">the managerType</span></td>
</tr>
<tr>
<td><span class="property-name">provisionID</span></td>
......@@ -196,7 +196,7 @@
&lt;/key&gt;
&lt;id&gt;...&lt;/id&gt;
&lt;provisionID&gt;...&lt;/provisionID&gt;
&lt;clusterType&gt;...&lt;/clusterType&gt;
&lt;managerType&gt;...&lt;/managerType&gt;
&lt;configurationID&gt;...&lt;/configurationID&gt;
&lt;owner&gt;...&lt;/owner&gt;
&lt;/d-----&gt;
......
......@@ -15,8 +15,6 @@
*/
package nl.uva.sne.drip.api.service;
import com.fasterxml.jackson.core.JsonParser;
import com.fasterxml.jackson.databind.ObjectMapper;
import java.io.IOException;
import java.util.ArrayList;
import java.util.HashMap;
......@@ -57,7 +55,7 @@ import nl.uva.sne.drip.commons.v1.types.PlaybookRepresentation;
*/
@Service
@PreAuthorize("isAuthenticated()")
public class DeployClusterService {
public class DeployService {
@Autowired
private DeployDao deployDao;
......@@ -112,7 +110,7 @@ public class DeployClusterService {
try (DRIPCaller deployer = new DeployerCaller(messageBrokerHost);) {
Message deployerInvokationMessage = buildDeployerMessage(
deployInfo.getProvisionID(),
deployInfo.getClusterType().toLowerCase(),
deployInfo.getManagerType().toLowerCase(),
deployInfo.getConfigurationID());
// Message deployerInvokationMessage = MessageGenerator.generateArtificialMessage(System.getProperty("user.home")
......@@ -176,42 +174,7 @@ public class DeployClusterService {
deployInvokationMessage.setCreationDate(System.currentTimeMillis());
return deployInvokationMessage;
}
private Message generateFakeResponse() throws IOException, TimeoutException, InterruptedException, JSONException {
String strResponse = "{'creationDate': 1488453891505, 'parameters': "
+ "[{'url': 'null', 'attributes': 'null', 'name': 'credential', "
+ "'value': 'apiVersion: v1\\nclusters:\\n- cluster:\\n "
+ "certificate-authority-data: LS0tLS1CRUdJTi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MUdVbXAvRgpFaHBKOTByM2l3NUJ3M"
+ "nJxOUdRNytOb1lQNENQdXYwd0N3V0wrWXd3ejhFSzhvVi9vdGNxdWxYVWUwUUZ"
+ "lL2txCkN3VGJvS2JBRElXd2xoSDdDd09ZOHo3SnRjREZ2WEtRYnRlTGNyUTY5"
+ "MFYyTUQxeTZyeUdmUUhsaWtsRjA2Sk8KMElXSVhDam1NYXppaG1hNGVHQTRHO"
+ "XZ6R2lMMVlyZGIxVDdYbFd3Zm5iOTg1QmVUWEZvV1JjMUo3RjFvQ3BaVwp2OTN3cko5L01uUzZxN3p2NkdNaUE0Rm5VanZiUDB4OHhWVXpsYjVvVG5HenFycSt2MXJLQklGSlFXdz0KLS0tLS1FTkQgQ0VSVElGSUNBVEUtLS0tLQo=\\n server: https://52.201.84.116:6443\\n name: kubernetes\\ncontexts:\\n- context:\\n cluster: kubernetes\\n user: admin\\n name: admin@kubernetes\\n- context:\\n cluster: kubernetes\\n user: kubelet\\n name: kubelet@kubernetes\\ncurrent-context: admin@kubernetes\\nkind: Config\\npreferences: {}\\nusers:\\n- name: admin\\n user:\\n client-certificate-data: LS0tLS1CRUdJTiBDRVJUSUZJQ0FURS0tLS0tCk1JSUM0ekNDQWN1Z0F3SUJBZ0lJWlR0eVhaRWNRUTh3RFFZSktvWklodmNOQVFFTEJRQXdGVEVUTUJFR0ExVUUKQXhNS2EzVmlaWEp1WlhSbGN6QWVGdzB4TnpBek1ESXhNVEl6TXpoYUZ3MHhPREF6TURJeE1USXpOREJhTUJzeApHVEFYQmdOVkJBTVRFR3QxWW1WeWJtVjBaWE10WVdSdGFXNHdnZ0VpTUEwR0NTcUdTSWIzRFFFQkFRVUFBNElCCkR3QXdnZ0VLQW9JQkFRRFFkOWdJK0liTVhDWlB6d244cGZuK1Vxd0RldXRKZjY5YWFCNFI4ZjZsSHl0dVRyNTkKZWJoZm43Uk5Od0UyTjZmeUdpOXpMdXdrcllpdU1zK3MvcTlDNVBmUXZiWTNaR2xTQk1K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ZGOHhlSStQdTk2bTc4Q2dZQnlteGpUZU9ENjkrSktaOUFmc3BnazU0aUFNL0JIWWcvNkMyc2YKUkZ2U0wvdUdEREp1WUtZTHZUUmtjZ0ptSlF5TjA5NFpyL015WlU1SHprVzRRQ1VvcXd3aUJqRHJwS0hPWG5RSApodzBzSXV6UVc0Tk1lUUNjS0luR2dEQ1F4bVZWL2Mvd1h0dXYySWVJeWlnUnRzZ1dtNmFScElFS1lXRXJlV2pkCmlPZ0JjUUtCZ0ZZeTJYMmRubHVnUUI5TDhDWVRYMDZ2Q3ZNM3BsOWIwZXN3MFcxTzljVGJEbmViYXRUdW1lUy8KMEtpUHh5b2tBS1pCM3NDTUl3ZC9ZbTdtbEdjRU9aNEhCLzJCWURHaTdUWFdyTjkwRmVGZFlPVVRXWEpQaHNwQwpQRXVET2hGSHBMZTN6Smxyck9ySG1Ebm5aOFdtWU4rdGZzNnVuVHVsSXZPQWFKd01xVlZ4Ci0tLS0tRU5EIFJTQSBQUklWQVRFIEtFWS0tLS0tCg==\\n', "
+ "'encoding': 'UTF-8'}]}";
strResponse = strResponse.replaceAll("'null'", "null").replaceAll("\'", "\"").replaceAll(" ", "");
ObjectMapper mapper = new ObjectMapper();
mapper.configure(JsonParser.Feature.ALLOW_SINGLE_QUOTES, true);
return mapper.readValue(strResponse, Message.class);
}
@PostAuthorize("(hasRole('ROLE_ADMIN'))")
public void deleteAll() {
deployDao.deleteAll();
......
......@@ -165,6 +165,9 @@ public class ProvisionService {
provisionResponse.setDeployParameters(deployParameters);
}
}
provisionResponse.setCloudCredentialsID(provisionRequest.getCloudCredentialsID());
provisionResponse.setPublicKeyID(provisionRequest.getPublicKeyID());
provisionResponse = save(provisionResponse);
return provisionResponse;
}
......
......@@ -23,7 +23,7 @@ import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestMethod;
import org.springframework.web.bind.annotation.ResponseBody;
import org.springframework.web.bind.annotation.RestController;
import nl.uva.sne.drip.api.service.DeployClusterService;
import nl.uva.sne.drip.api.service.DeployService;
import nl.uva.sne.drip.api.service.UserService;
import nl.uva.sne.drip.commons.v0.types.Deploy;
import nl.uva.sne.drip.commons.v0.types.Attribute;
......@@ -49,14 +49,14 @@ import org.springframework.web.bind.annotation.RequestBody;
public class DeployController0 {
@Autowired
private DeployClusterService deployService;
private DeployService deployService;
@RequestMapping(value = "/kubernetes", method = RequestMethod.POST, consumes = MediaType.TEXT_XML_VALUE, produces = MediaType.TEXT_XML_VALUE)
@RolesAllowed({UserService.USER, UserService.ADMIN})
public @ResponseBody
Result deployKubernetes(@RequestBody Deploy deploy) {
DeployRequest deployReq = new DeployRequest();
deployReq.setClusterType("kubernetes");
deployReq.setManagerType("kubernetes");
deployReq.setProvisionID(deploy.action);
return deploy(deployReq);
}
......@@ -66,7 +66,7 @@ public class DeployController0 {
public @ResponseBody
Result deploySwarm(@RequestBody Deploy deploy) {
DeployRequest deployReq = new DeployRequest();
deployReq.setClusterType("swarm");
deployReq.setManagerType("swarm");
deployReq.setProvisionID(deploy.action);
return deploy(deployReq);
}
......
......@@ -44,9 +44,9 @@ import org.springframework.web.bind.annotation.RequestBody;
* @author S. Koulouzis
*/
@RestController
@RequestMapping("/user/v1.0/playbook")
@RequestMapping("/user/v1.0/deployer/configuration")
@Component
public class PlaybookController {
public class ConfigurationController {
@Autowired
private PlaybookService playbookService;
......@@ -59,7 +59,7 @@ public class PlaybookController {
return playbookService.saveStringContents(toscaContents, String.valueOf(System.currentTimeMillis()));
} catch (IOException ex) {
Logger.getLogger(PlaybookController.class.getName()).log(Level.SEVERE, null, ex);
Logger.getLogger(ConfigurationController.class.getName()).log(Level.SEVERE, null, ex);
}
return null;
}
......@@ -80,7 +80,7 @@ public class PlaybookController {
try {
return playbookService.saveFile(file);
} catch (IOException | IllegalStateException ex) {
Logger.getLogger(PlaybookController.class.getName()).log(Level.SEVERE, null, ex);
Logger.getLogger(ConfigurationController.class.getName()).log(Level.SEVERE, null, ex);
}
return null;
}
......@@ -99,7 +99,7 @@ public class PlaybookController {
try {
return playbookService.get(id, format);
} catch (JSONException ex) {
Logger.getLogger(PlaybookController.class.getName()).log(Level.SEVERE, null, ex);
Logger.getLogger(ConfigurationController.class.getName()).log(Level.SEVERE, null, ex);
}
return null;
}
......
......@@ -18,18 +18,20 @@ package nl.uva.sne.drip.api.v1.rest;
import java.util.ArrayList;
import java.util.List;
import javax.annotation.security.RolesAllowed;
import nl.uva.sne.drip.api.exception.BadRequestException;
import nl.uva.sne.drip.api.exception.NotFoundException;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestMethod;
import org.springframework.web.bind.annotation.ResponseBody;
import org.springframework.web.bind.annotation.RestController;
import nl.uva.sne.drip.api.service.DeployClusterService;
import nl.uva.sne.drip.api.service.DeployService;
import nl.uva.sne.drip.api.service.UserService;
import nl.uva.sne.drip.commons.v1.types.DeployRequest;
import nl.uva.sne.drip.commons.v1.types.DeployResponse;
import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.PathVariable;
import org.springframework.web.bind.annotation.RequestBody;
/**
* This controller is responsible for deploying a cluster on provisoned
......@@ -43,22 +45,33 @@ import org.springframework.web.bind.annotation.PathVariable;
public class DeployController {
@Autowired
private DeployClusterService deployService;
private DeployService deployService;
@RequestMapping(value = "/deploy/", method = RequestMethod.POST)
@RequestMapping(value = "/deploy", method = RequestMethod.POST)
@RolesAllowed({UserService.USER, UserService.ADMIN})
public @ResponseBody
String deploy(DeployRequest deployRequest) {
String deploy(@RequestBody DeployRequest deployRequest) {
if (deployRequest.getManagerType() == null) {
throw new BadRequestException("Must provide manager type. Aveliable: ansible, swarm ,kubernetes");
}
if (deployRequest.getProvisionID() == null) {
throw new BadRequestException("Must provide provision ID");
}
DeployResponse key = deployService.deployCluster(deployRequest);
return key.getId();
}
/**
* Gets the cluster credentials.
*
* @param id
* @return the cluster credentials
*/
@RequestMapping(value = "/sample", method = RequestMethod.GET)
@RolesAllowed({UserService.USER, UserService.ADMIN})
public @ResponseBody
DeployRequest sample() {
DeployRequest req = new DeployRequest();
req.setManagerType("ansible");
req.setConfigurationID("Configuration_ID");
req.setProvisionID("Provision_ID");
return req;
}
@RequestMapping(value = "/{id}", method = RequestMethod.GET)
@RolesAllowed({UserService.USER, UserService.ADMIN})
public @ResponseBody
......@@ -70,11 +83,6 @@ public class DeployController {
return resp;
}
/**
* Gets the IDs of all the stored cluster credentials
*
* @return a list of all the IDs
*/
@RequestMapping(value = "/ids", method = RequestMethod.GET)
@RolesAllowed({UserService.USER, UserService.ADMIN})
public @ResponseBody
......@@ -87,12 +95,6 @@ public class DeployController {
return ids;
}
/**
* Deletes a cluster credential
*
* @param id. The id of the cluster credential
* @return the id f the deleted cluster credential
*/
@RequestMapping(value = "/{id}", method = RequestMethod.DELETE)
@RolesAllowed({UserService.USER, UserService.ADMIN})
public @ResponseBody
......
......@@ -49,7 +49,7 @@ import org.springframework.web.bind.annotation.RequestBody;
* @author S. Koulouzis
*/
@RestController
@RequestMapping("/user/v1.0/key")
@RequestMapping("/user/v1.0/keys")
@Component
public class KeysController {
......
......@@ -31,8 +31,6 @@ import org.springframework.web.bind.annotation.RequestMethod;
import org.springframework.web.bind.annotation.ResponseBody;
import org.springframework.web.bind.annotation.RestController;
import nl.uva.sne.drip.api.exception.NotFoundException;
import nl.uva.sne.drip.api.service.CloudCredentialsService;
import nl.uva.sne.drip.api.service.PlannerService;
import nl.uva.sne.drip.api.service.ProvisionService;
import nl.uva.sne.drip.api.service.UserService;
import nl.uva.sne.drip.commons.v1.types.ProvisionResponse;
......@@ -54,12 +52,11 @@ public class ProvisionController {
@Autowired
private ProvisionService provisionService;
@Autowired
private CloudCredentialsService cloudCredentialService;
@Autowired
private PlannerService plannServcie;
// @Autowired
// private CloudCredentialsService cloudCredentialService;
//
// @Autowired
// private PlannerService plannServcie;
/**
* Gets the ProvisionRequest
*
......
......@@ -22,7 +22,7 @@ package nl.uva.sne.drip.commons.v1.types;
public class DeployRequest extends OwnedObject {
private String provisionID;
private String clusterType;
private String managerType;
private String configurationID;
/**
......@@ -40,17 +40,17 @@ public class DeployRequest extends OwnedObject {
}
/**
* @return the clusterType
* @return the managerType
*/
public String getClusterType() {
return clusterType;
public String getManagerType() {
return managerType;
}
/**
* @param clusterType the clusterType to set
* @param managerType the managerType to set
*/
public void setClusterType(String clusterType) {
this.clusterType = clusterType;
public void setManagerType(String managerType) {
this.managerType = managerType;
}
/**
......
#!/usr/bin/env python
import pika
import json
import os
import time
from vm_info import VmInfo
import docker_kubernetes
import docker_engine
import docker_swarm
import control_agent
import sys, argparse
from threading import Thread
from time import sleep
print sys.argv
if len(sys.argv) > 1:
rabbitmq_host = sys.argv[1]
else:
rabbitmq_host = '127.0.0.1'
connection = pika.BlockingConnection(pika.ConnectionParameters(host=rabbitmq_host))
channel = connection.channel()
channel.queue_declare(queue='profiler_queue')
path = os.path.dirname(os.path.abspath(__file__)) + "/"
def threaded_function(args):
while True:
#print "processing data events"
connection.process_data_events()
sleep(30)
def handleDelivery(message):
def on_request(ch, method, props, body):
ret = handleDelivery(body)
ch.basic_publish(exchange='',
routing_key=props.reply_to,
properties=pika.BasicProperties(correlation_id = \
props.correlation_id),
body=str(response))
ch.basic_ack(delivery_tag = method.delivery_tag)
channel.basic_qos(prefetch_count=1)
channel.basic_consume(on_request, queue='deployer_queue')
thread = Thread(target = threaded_function, args = (1, ))
thread.start()
print("[x] Awaiting RPC requests")
channel.start_consuming()
thread.stop()
\ No newline at end of file
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment