Commit 0a987617 authored by Spiros Koulouzis's avatar Spiros Koulouzis

Update documentation

parent a9fd7df7
......@@ -119,6 +119,12 @@ from the machine the keys correspond to.</span>
</td>
<td> <span class="datatype-description">This class hold the pair of public private keys. The kyes may be used for
logging in VMs.</span>
</td>
</tr>
<tr class="clickable-row" data-href="json_KeyType.html">
<td> <span class="datatype-name">KeyType</span>
</td>
<td> <span class="datatype-description">This enu specifies if a key is private or public</span>
</td>
</tr>
<tr class="clickable-row" data-href="json_KeyValueHolder.html">
......@@ -169,13 +175,7 @@ provisioner to request for cloud resources.</span>
<tr class="clickable-row" data-href="json_ToscaRepresentation.html">
<td> <span class="datatype-name">ToscaRepresentation</span>
</td>
<td> <span class="datatype-description"></span>
</td>
</tr>
<tr class="clickable-row" data-href="json_Type.html">
<td> <span class="datatype-name">Type</span>
</td>
<td> <span class="datatype-description"></span>
<td> <span class="datatype-description">This class is a representation of a TOSCA description.</span>
</td>
</tr>
<tr class="clickable-row" data-href="json_User.html">
......@@ -302,10 +302,10 @@ created by the provisiner or by the VM to allow the user to login to the VMs
from the machine the keys correspond to.</span>
</td>
</tr>
<tr class="clickable-row" data-href="xml_ns0_type.html">
<td> <span class="datatype-name">type</span>
<tr class="clickable-row" data-href="xml_ns0_keyType.html">
<td> <span class="datatype-name">keyType</span>
</td>
<td> <span class="datatype-description"></span>
<td> <span class="datatype-description">This enu specifies if a key is private or public</span>
</td>
</tr>
<tr class="clickable-row" data-href="xml_ns0_keyPair.html">
......@@ -363,7 +363,7 @@ provisioner to request for cloud resources.</span>
<tr class="clickable-row" data-href="xml_ns0_toscaRepresentation.html">
<td> <span class="datatype-name">toscaRepresentation</span>
</td>
<td> <span class="datatype-description"></span>
<td> <span class="datatype-description">This class is a representation of a TOSCA description.</span>
</td>
</tr>
<tr class="clickable-row" data-href="xml_ns0_user.html">
......
......@@ -91,7 +91,7 @@
<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">10.43K</span></td>
<td><span class="downloadfile-size">10.50K</span></td>
<td><span class="downloadfile-description">The sources for the GWT JSON overlay.</span></td>
</tr>
</tbody>
......@@ -116,12 +116,12 @@
<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">12.94K</span></td>
<td><span class="downloadfile-size">12.96K</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">10.70K</span></td>
<td><span class="downloadfile-size">10.76K</span></td>
<td><span class="downloadfile-description">The sources for the Java JSON client library.</span></td>
</tr>
</tbody>
......@@ -144,12 +144,12 @@
<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">21.31K</span></td>
<td><span class="downloadfile-size">21.28K</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">19.78K</span></td>
<td><span class="downloadfile-size">19.81K</span></td>
<td><span class="downloadfile-description">The sources for the Java XML client library.</span></td>
</tr>
</tbody>
......@@ -184,7 +184,7 @@
<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">3.69K</span></td>
<td><span class="downloadfile-size">3.71K</span></td>
<td><span class="downloadfile-description">&nbsp;</span></td>
</tr>
</tbody>
......@@ -213,7 +213,7 @@
<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.92K</span></td>
<td><span class="downloadfile-size">3.93K</span></td>
<td><span class="downloadfile-description">&nbsp;</span></td>
</tr>
</tbody>
......@@ -245,7 +245,7 @@
<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">7.62K</span></td>
<td><span class="downloadfile-size">7.57K</span></td>
<td><span class="downloadfile-description">&nbsp;</span></td>
</tr>
</tbody>
......@@ -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">47.40K</span></td>
<td><span class="downloadfile-size">47.43K</span></td>
<td><span class="downloadfile-description">&nbsp;</span></td>
</tr>
</tbody>
......
......@@ -800,44 +800,6 @@ module Data
module V1
module External
# (no documentation provided)
class Type
#
PRIVATE = "PRIVATE"
#
PUBLIC = "PUBLIC"
end
end
end
end
end
end
end
end
module Nl
module Uva
module Sne
module Drip
module Data
module V1
module External
# (no documentation provided)
......@@ -1084,6 +1046,44 @@ module Data
module V1
module External
# (no documentation provided)
class KeyType
# For private keys
PRIVATE = "PRIVATE"
# For public keys
PUBLIC = "PUBLIC"
end
end
end
end
end
end
end
end
module Nl
module Uva
module Sne
module Drip
module Data
module V1
module External
# (no documentation provided)
......
......@@ -272,419 +272,4 @@ based the plan generated by the planner and uploaded by the user</span>
used by the provisoner to run on the created VMs.</span>
</td>
</tr>
<tr class="clickable-row" data-href="resource_ToscaController.html">
<td> <span class="resource-name">ToscaController</span>
</td>
<td class="text-nowrap"><ul class="list-unstyled"><li><samp> <span class="resource-path">/user/v1.0/tosca/all</span>
</samp></li><li><samp> <span class="resource-path">/user/v1.0/tosca/ids</span>
</samp></li><li><samp> <span class="resource-path">/user/v1.0/tosca/post</span>
</samp></li><li><samp> <span class="resource-path">/user/v1.0/tosca/upload</span>
</samp></li><li><samp> <span class="resource-path">/user/v1.0/tosca/{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 TOSCA descriptions that can be
used by the planner.</span>
</td>
</tr>
<tr class="clickable-row" data-href="resource_UserController.html">
<td> <span class="resource-name">UserController</span>
</td>
<td class="text-nowrap"><ul class="list-unstyled"><li><samp> <span class="resource-path">/manager/v1.0/user/all</span>
</samp></li><li><samp> <span class="resource-path">/manager/v1.0/user/ids</span>
</samp></li><li><samp> <span class="resource-path">/manager/v1.0/user/modify</span>
</samp></li><li><samp> <span class="resource-path">/manager/v1.0/user/register</span>
</samp></li><li><samp> <span class="resource-path">/manager/v1.0/user/{id}</span>
</samp></li></ul></td>
<td class="text-nowrap"><ul class="list-unstyled"><li><samp> <span class="label label-default resource-method">GET</span>
</samp></li><li><samp> <span class="label label-default resource-method">GET</span>
</samp></li><li><samp> <span class="label label-default resource-method">POST</span>
</samp></li><li><samp> <span class="label label-default resource-method">POST</span>
</samp></li><li><samp> <span class="label label-default resource-method">DELETE</span> <span class="label label-default resource-method">GET</span>
</samp></li></ul></td>
<td> <span class="resource-description">This controller is responsible for handling user accounts</span>
</td>
</tr>
<tr class="clickable-row" data-href="resource_UserController0.html">
<td> <span class="resource-name">UserController0</span>
</td>
<td class="text-nowrap"><ul class="list-unstyled"><li><samp> <span class="resource-path">/manager/v0.0/switch/account/register</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></ul></td>
<td> <span class="resource-description">This controller is responsible for handling user accounts</span>
</td>
</tr>
<tr class="clickable-row" data-href="resource_UserPublicKeysController0.html">
<td> <span class="resource-name">UserPublicKeysController0</span>
</td>
<td class="text-nowrap"><ul class="list-unstyled"><li><samp> <span class="resource-path">/user/v0.0/switch/provision/confuserkey</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></ul></td>
<td> <span class="resource-description">This controller is responsible for handling user public keys. These keys can
be used by the provisoner to allow the user to login to the VMs from the
machine the keys correspond to.</span>
</td>
</tr>
<tr class="clickable-row" data-href="resource_UserScriptController0.html">
<td> <span class="resource-name">UserScriptController0</span>
</td>
<td class="text-nowrap"><ul class="list-unstyled"><li><samp> <span class="resource-path">/user/v0.0/switch/provision/confscript</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></ul></td>
<td> <span class="resource-description">This controller is responsible for handling user scripts. These user can be
used by the provisoner to run on the created VMs.</span>
</td>
</tr>
</tbody>
</table>
<h1 class="page-header" id="data">Data Types</h1>
<h3 id="syntax_json"><span class="syntax-name">JSON</span></h3>
<table class="table table-hover datatypes">
<thead>
<tr>
<th align="center">type</th>
<th align="center">description</th>
</tr>
</thead>
<tbody data-link="row" class="rowlink">
<tr class="clickable-row" data-href="json_CloudCredentials.html">
<td> <span class="datatype-name">CloudCredentials</span>
</td>
<td> <span class="datatype-description">This class represents the cloud credentials. They are used by the provisoner
to request for resources.</span>
</td>
</tr>
<tr class="clickable-row" data-href="json_DeployParameter.html">
<td> <span class="datatype-name">DeployParameter</span>
</td>
<td> <span class="datatype-description">This class is used by the deployer to deploy software
(swarm,kubernetes,ansible). It is generated by the provisioner to contain VM
information.</span>
</td>
</tr>
<tr class="clickable-row" data-href="json_DeployRequest.html">
<td> <span class="datatype-name">DeployRequest</span>
</td>
<td> <span class="datatype-description">This class holds the necessary POJO IDs to request the deployment of a
software</span>
</td>
</tr>
<tr class="clickable-row" data-href="json_DeployResponse.html">
<td> <span class="datatype-name">DeployResponse</span>
</td>
<td> <span class="datatype-description">This class represents the response of a deploy request. It may hold a key
pair used for logging in and managing a docker cluster. Currently they key
pair is only used by kubernetes</span>
</td>
</tr>
<tr class="clickable-row" data-href="json_Key.html">
<td> <span class="datatype-name">Key</span>
</td>
<td> <span class="datatype-description">This class represents a key. This key can be used to either login to a VM
created by the provisiner or by the VM to allow the user to login to the VMs
from the machine the keys correspond to.</span>
</td>
</tr>
<tr class="clickable-row" data-href="json_KeyPair.html">
<td> <span class="datatype-name">KeyPair</span>
</td>
<td> <span class="datatype-description">This class hold the pair of public private keys. The kyes may be used for
logging in VMs.</span>
</td>
</tr>
<tr class="clickable-row" data-href="json_KeyValueHolder.html">
<td> <span class="datatype-name">KeyValueHolder</span>
</td>
<td> <span class="datatype-description">This is a generic class that hold key-value pairs. It's main usage is to hold
abstract types such as TOSCA.</span>
</td>
</tr>
<tr class="clickable-row" data-href="json_OwnedObject.html">
<td> <span class="datatype-name">OwnedObject</span>
</td>
<td> <span class="datatype-description">This is the base class for users to own resources. Many classes extend this
class</span>
</td>
</tr>
<tr class="clickable-row" data-href="json_PlanResponse.html">
<td> <span class="datatype-name">PlanResponse</span>
</td>
<td> <span class="datatype-description">This class represents a plan generated by the planner.</span>
</td>
</tr>
<tr class="clickable-row" data-href="json_PlaybookRepresentation.html">
<td> <span class="datatype-name">PlaybookRepresentation</span>
</td>
<td> <span class="datatype-description">This class represents a playbook used by ansible manager to deploy software.</span>
</td>
</tr>
<tr class="clickable-row" data-href="json_ProvisionRequest.html">
<td> <span class="datatype-name">ProvisionRequest</span>
</td>
<td> <span class="datatype-description">This class is a holder for the the object IDs that are required by the
provisioner to request for cloud resources.</span>
</td>
</tr>
<tr class="clickable-row" data-href="json_ProvisionResponse.html">
<td> <span class="datatype-name">ProvisionResponse</span>
</td>
<td> <span class="datatype-description">This class represents a description of provisioned resources</span>
</td>
</tr>
<tr class="clickable-row" data-href="json_Script.html">
<td> <span class="datatype-name">Script</span>
</td>
<td> <span class="datatype-description">This class represents a simple script that can run on a provisioned VM.</span>
</td>
</tr>
<tr class="clickable-row" data-href="json_ToscaRepresentation.html">
<td> <span class="datatype-name">ToscaRepresentation</span>
</td>
<td> <span class="datatype-description"></span>
</td>
</tr>
<tr class="clickable-row" data-href="json_Type.html">
<td> <span class="datatype-name">Type</span>
</td>
<td> <span class="datatype-description"></span>
</td>
</tr>
<tr class="clickable-row" data-href="json_User.html">
<td> <span class="datatype-name">User</span>
</td>
<td> <span class="datatype-description">This class represents a user.</span>
</td>
</tr>
</tbody>
</table>
<h3 id="syntax_xml"><span class="syntax-name">XML</span></h3>
<table class="table table-hover datatypes">
<caption>Default Namespace (<a href="ns0.xsd">schema</a>)</caption>
<thead>
<tr>
<th align="center">type</th>
<th align="center">description</th>
</tr>
</thead>
<tbody data-link="row" class="rowlink">
<tr class="clickable-row" data-href="xml_ns0_attribute.html">
<td> <span class="datatype-name">attribute</span>
</td>
<td> <span class="datatype-description"></span>
</td>
</tr>
<tr class="clickable-row" data-href="xml_ns0_confScript.html">
<td> <span class="datatype-name">confScript</span>
</td>
<td> <span class="datatype-description"></span>
</td>
</tr>
<tr class="clickable-row" data-href="xml_ns0_confUserKey.html">
<td> <span class="datatype-name">confUserKey</span>
</td>
<td> <span class="datatype-description"></span>
</td>
</tr>
<tr class="clickable-row" data-href="xml_ns0_configure.html">
<td> <span class="datatype-name">configure</span>
</td>
<td> <span class="datatype-description"></span>
</td>
</tr>
<tr class="clickable-row" data-href="xml_ns0_deploy.html">
<td> <span class="datatype-name">deploy</span>
</td>
<td> <span class="datatype-description"></span>
</td>
</tr>
<tr class="clickable-row" data-href="xml_ns0_execute.html">
<td> <span class="datatype-name">execute</span>
</td>
<td> <span class="datatype-description"></span>
</td>
</tr>
<tr class="clickable-row" data-href="xml_ns0_loginKey0.html">
<td> <span class="datatype-name">loginKey0</span>
</td>
<td> <span class="datatype-description"></span>
</td>
</tr>
<tr class="clickable-row" data-href="xml_ns0_plan.html">
<td> <span class="datatype-name">plan</span>
</td>
<td> <span class="datatype-description">This class represents a plan to be provided to the planner.</span>
</td>
</tr>
<tr class="clickable-row" data-href="xml_ns0_register.html">
<td> <span class="datatype-name">register</span>
</td>
<td> <span class="datatype-description"></span>
</td>
</tr>
<tr class="clickable-row" data-href="xml_ns0_result.html">
<td> <span class="datatype-name">result</span>
</td>
<td> <span class="datatype-description"></span>
</td>
</tr>
<tr class="clickable-row" data-href="xml_ns0_upload.html">
<td> <span class="datatype-name">upload</span>
</td>
<td> <span class="datatype-description"></span>
</td>
</tr>
<tr class="clickable-row" data-href="xml_ns0_cloudCredentials.html">
<td> <span class="datatype-name">cloudCredentials</span>
</td>
<td> <span class="datatype-description">This class represents the cloud credentials. They are used by the provisoner
to request for resources.</span>
</td>
</tr>
<tr class="clickable-row" data-href="xml_ns0_deployParameter.html">
<td> <span class="datatype-name">deployParameter</span>
</td>
<td> <span class="datatype-description">This class is used by the deployer to deploy software
(swarm,kubernetes,ansible). It is generated by the provisioner to contain VM
information.</span>
</td>
</tr>
<tr class="clickable-row" data-href="xml_ns0_deployRequest.html">
<td> <span class="datatype-name">deployRequest</span>
</td>
<td> <span class="datatype-description">This class holds the necessary POJO IDs to request the deployment of a
software</span>
</td>
</tr>
<tr class="clickable-row" data-href="xml_ns0_deployResponse.html">
<td> <span class="datatype-name">deployResponse</span>
</td>
<td> <span class="datatype-description">This class represents the response of a deploy request. It may hold a key
pair used for logging in and managing a docker cluster. Currently they key
pair is only used by kubernetes</span>
</td>
</tr>
<tr class="clickable-row" data-href="xml_ns0_key.html">
<td> <span class="datatype-name">key</span>
</td>
<td> <span class="datatype-description">This class represents a key. This key can be used to either login to a VM
created by the provisiner or by the VM to allow the user to login to the VMs
from the machine the keys correspond to.</span>
</td>
</tr>
<tr class="clickable-row" data-href="xml_ns0_type.html">
<td> <span class="datatype-name">type</span>
</td>
<td> <span class="datatype-description"></span>
</td>
</tr>
<tr class="clickable-row" data-href="xml_ns0_keyPair.html">
<td> <span class="datatype-name">keyPair</span>
</td>
<td> <span class="datatype-description">This class hold the pair of public private keys. The kyes may be used for
logging in VMs.</span>
</td>
</tr>
<tr class="clickable-row" data-href="xml_ns0_keyValueHolder.html">
<td> <span class="datatype-name">keyValueHolder</span>
</td>
<td> <span class="datatype-description">This is a generic class that hold key-value pairs. It's main usage is to hold
abstract types such as TOSCA.</span>
</td>
</tr>
<tr class="clickable-row" data-href="xml_ns0_ownedObject.html">
<td> <span class="datatype-name">ownedObject</span>
</td>
<td> <span class="datatype-description">This is the base class for users to own resources. Many classes extend this
class</span>
</td>
</tr>
<tr class="clickable-row" data-href="xml_ns0_planResponse.html">
<td> <span class="datatype-name">planResponse</span>
</td>
<td> <span class="datatype-description">This class represents a plan generated by the planner.</span>
</td>
</tr>
<tr class="clickable-row" data-href="xml_ns0_playbookRepresentation.html">
<td> <span class="datatype-name">playbookRepresentation</span>
</td>
<td> <span class="datatype-description">This class represents a playbook used by ansible manager to deploy software.</span>
</td>
</tr>
<tr class="clickable-row" data-href="xml_ns0_provisionRequest.html">
<td> <span class="datatype-name">provisionRequest</span>
</td>
<td> <span class="datatype-description">This class is a holder for the the object IDs that are required by the
provisioner to request for cloud resources.</span>
</td>
</tr>
<tr class="clickable-row" data-href="xml_ns0_provisionResponse.html">
<td> <span class="datatype-name">provisionResponse</span>
</td>
<td> <span class="datatype-description">This class represents a description of provisioned resources</span>
</td>
</tr>
<tr class="clickable-row" data-href="xml_ns0_script.html">
<td> <span class="datatype-name">script</span>
</td>
<td> <span class="datatype-description">This class represents a simple script that can run on a provisioned VM.</span>
</td>
</tr>
<tr class="clickable-row" data-href="xml_ns0_toscaRepresentation.html">
<td> <span class="datatype-name">toscaRepresentation</span>
</td>
<td> <span class="datatype-description"></span>
</td>
</tr>
<tr class="clickable-row" data-href="xml_ns0_user.html">
<td> <span class="datatype-name">user</span>
</td>
<td> <span class="datatype-description">This class represents a user.</span>
</td>
</tr>
</tbody>
</table>
<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>
<tr class="clickable-row" data
\ No newline at end of file
......@@ -104,8 +104,7 @@ to request for resources.</p>
<td> <span class="datatype-reference">string
</span>
</td>
<td> <span class="property-description">The access key ID for a cloud provider. Some providers may not use this
field</span>
<td> <span class="property-description">The access key ID for a cloud provider.</span>
</td>
</tr>
<tr>
......
......@@ -93,7 +93,7 @@ from the machine the keys correspond to.</p>
<tr>
<td> <span class="property-name">type</span>
</td>
<td> <span class="datatype-reference"><a href="json_Type.html">Type</a>
<td> <span class="datatype-reference"><a href="json_KeyType.html">KeyType</a>
</span>
</td>
<td> <span class="property-description">The type of key</span>
......
<!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: KeyType</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: KeyType</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_KeyType.html">KeyType</a></li>
</ol>
<h1 class="page-header">KeyType <small>Data Type</small></h1>
<p>This enu specifies if a key is private or public</p>
<dl class="dl-horizontal">
</dl>
<table class="table datatype-values">
<caption>Values</caption>
<thead>
<tr>
<th>value</th>
<th>description</th>
</tr>
</thead>
<tbody>
<tr>
<td><span class="value-value">PRIVATE</span></td>
<td><span class="value-description">For private keys</span></td>
</tr>
<tr>
<td><span class="value-value">PUBLIC</span></td>
<td><span class="value-description">For public keys</span></td>
</tr>
</tbody>
</table>
<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>
......@@ -64,7 +64,7 @@
<h1 class="page-header">ToscaRepresentation <small>Data Type</small></h1>
<p></p>
<p>This class is a representation of a TOSCA description.</p>
<dl class="dl-horizontal">
</dl>
......
......@@ -94,7 +94,8 @@
<td> <span class="datatype-reference">string
</span>
</td>
<td> <span class="property-description"></span>
<td> <span class="property-description">The unique id of this object. This value is auto-generated when the DAO
saves this object</span>
</td>
</tr>
<tr>
......@@ -158,7 +159,7 @@
<pre class="prettyprint language-js example">{
&quot;password&quot; : &quot;...&quot;,
&quot;id&quot; : &quot;...&quot;,
&quot;id&quot; : &quot;58e3946e0fb4f562d84ba1ad&quot;,
&quot;username&quot; : &quot;user&quot;,
&quot;accountNonExpired&quot; : true,
&quot;accountNonLocked&quot; : true,
......
......@@ -272,8 +272,7 @@ to request for resources.]]>
<xs:element name="accessKeyId" type="xs:string" minOccurs="0">
<xs:annotation>
<xs:documentation>
<![CDATA[The access key ID for a cloud provider. Some providers may not use this
field]]>
<![CDATA[The access key ID for a cloud provider.]]>
</xs:documentation>
</xs:annotation>
</xs:element>
......@@ -391,7 +390,7 @@ from the machine the keys correspond to.]]>
</xs:documentation>
</xs:annotation>
</xs:element>
<xs:element name="type" type="type" minOccurs="0">
<xs:element name="type" type="keyType" minOccurs="0">
<xs:annotation>
<xs:documentation>
<![CDATA[The type of key]]>
......@@ -428,7 +427,12 @@ to specify the domain name for ec2]]>
</xs:sequence>
</xs:complexType>
<xs:simpleType name="type">
<xs:simpleType name="keyType">
<xs:annotation>
<xs:documentation>
<![CDATA[This enu specifies if a key is private or public]]>
</xs:documentation>
</xs:annotation>
<xs:restriction base="xs:string">
<xs:enumeration value="PRIVATE"/>
......@@ -623,6 +627,11 @@ provisioner to request for cloud resources.]]>
</xs:complexType>
<xs:complexType name="toscaRepresentation">
<xs:annotation>
<xs:documentation>
<![CDATA[This class is a representation of a TOSCA description.]]>
</xs:documentation>
</xs:annotation>
<xs:complexContent>
<xs:extension base="keyValueHolder">
<xs:sequence>
......@@ -645,8 +654,6 @@ provisioner to request for cloud resources.]]>
</xs:documentation>
</xs:annotation>
<xs:sequence>
<xs:element name="id" type="xs:string" minOccurs="0">
</xs:element>
<xs:element name="password" type="xs:string" minOccurs="0">
</xs:element>
<xs:element name="username" type="xs:string" minOccurs="0">
......
......@@ -99,11 +99,6 @@ provisoner to request for resources (VMs)</p>
<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_CloudCredentials.html">CloudCredentials</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_cloudCredentials.html">cloudCredentials</a>
(XML)</span></td>
</tr>
</tbody>
</table>
......@@ -119,7 +114,11 @@ provisoner to request for resources (VMs)</p>
<tbody>
<tr>
<td><span class="label label-warning response-code">400</span></td>
<td><span class="response-condition">Key can't be empty</span></td>
<td><span class="response-condition">Access key ID can't be empty</span></td>
</tr>
<tr>
<td><span class="label label-success response-code">200</span></td>
<td><span class="response-condition">At least one key ID is posted</span></td>
</tr>
</tbody>
</table>
......@@ -173,7 +172,7 @@ Accept: application/json
<div class="col-md-6">
<h5>Response</h5>
<pre>
HTTP/1.1 201 Looks Good
HTTP/1.1 200 Looks Good
Content-Type: application/json
<code class="prettyprint language-txt">
......
......@@ -125,7 +125,7 @@ Content-Type: application/json
<code class="prettyprint language-js">
[ {
&quot;password&quot; : &quot;...&quot;,
&quot;id&quot; : &quot;...&quot;,
&quot;id&quot; : &quot;58e3946e0fb4f562d84ba1ad&quot;,
&quot;username&quot; : &quot;user&quot;,
&quot;accountNonExpired&quot; : true,
&quot;accountNonLocked&quot; : true,
......@@ -267,7 +267,7 @@ Accept: application/json
<code class="prettyprint language-js">
{
&quot;password&quot; : &quot;...&quot;,
&quot;id&quot; : &quot;...&quot;,
&quot;id&quot; : &quot;58e3946e0fb4f562d84ba1ad&quot;,
&quot;username&quot; : &quot;user&quot;,
&quot;accountNonExpired&quot; : true,
&quot;accountNonLocked&quot; : true,
......@@ -365,7 +365,7 @@ Accept: application/json
<code class="prettyprint language-js">
{
&quot;password&quot; : &quot;...&quot;,
&quot;id&quot; : &quot;...&quot;,
&quot;id&quot; : &quot;58e3946e0fb4f562d84ba1ad&quot;,
&quot;username&quot; : &quot;user&quot;,
&quot;accountNonExpired&quot; : true,
&quot;accountNonLocked&quot; : true,
......@@ -541,7 +541,7 @@ Content-Type: application/json
<code class="prettyprint language-js">
{
&quot;password&quot; : &quot;...&quot;,
&quot;id&quot; : &quot;...&quot;,
&quot;id&quot; : &quot;58e3946e0fb4f562d84ba1ad&quot;,
&quot;username&quot; : &quot;user&quot;,
&quot;accountNonExpired&quot; : true,
&quot;accountNonLocked&quot; : true,
......
......@@ -114,6 +114,12 @@ from the machine the keys correspond to.</span>
</td>
<td> <span class="datatype-description">This class hold the pair of public private keys. The kyes may be used for
logging in VMs.</span>
</td>
</tr>
<tr class="clickable-row" data-href="json_KeyType.html">
<td> <span class="datatype-name">KeyType</span>
</td>
<td> <span class="datatype-description">This enu specifies if a key is private or public</span>
</td>
</tr>
<tr class="clickable-row" data-href="json_KeyValueHolder.html">
......@@ -164,13 +170,7 @@ provisioner to request for cloud resources.</span>
<tr class="clickable-row" data-href="json_ToscaRepresentation.html">
<td> <span class="datatype-name">ToscaRepresentation</span>
</td>
<td> <span class="datatype-description"></span>
</td>
</tr>
<tr class="clickable-row" data-href="json_Type.html">
<td> <span class="datatype-name">Type</span>
</td>
<td> <span class="datatype-description"></span>
<td> <span class="datatype-description">This class is a representation of a TOSCA description.</span>
</td>
</tr>
<tr class="clickable-row" data-href="json_User.html">
......
<!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: XML</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: XML</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="dropdown"><a href="syntax_xml.html">XML</a></li>
</ol>
<h1 class="page-header">XML</h1>
<table class="table table-hover datatypes">
<caption>Default Namespace (<a href="ns0.xsd">schema</a>)</caption>
<thead>
<tr>
<th align="center">type</th>
<th align="center">description</th>
</tr>
</thead>
<tbody data-link="row" class="rowlink">
<tr class="clickable-row" data-href="xml_ns0_attribute.html">
<td> <span class="datatype-name">attribute</span>
</td>
<td> <span class="datatype-description"></span>
</td>
</tr>
<tr class="clickable-row" data-href="xml_ns0_confScript.html">
<td> <span class="datatype-name">confScript</span>
</td>
<td> <span class="datatype-description"></span>
</td>
</tr>
<tr class="clickable-row" data-href="xml_ns0_confUserKey.html">
<td> <span class="datatype-name">confUserKey</span>
</td>
<td> <span class="datatype-description"></span>
</td>
</tr>
<tr class="clickable-row" data-href="xml_ns0_configure.html">
<td> <span class="datatype-name">configure</span>
</td>
<td> <span class="datatype-description"></span>
</td>
</tr>
<tr class="clickable-row" data-href="xml_ns0_deploy.html">
<td> <span class="datatype-name">deploy</span>
</td>
<td> <span class="datatype-description"></span>
</td>
</tr>
<tr class="clickable-row" data-href="xml_ns0_execute.html">
<td> <span class="datatype-name">execute</span>
</td>
<td> <span class="datatype-description"></span>
</td>
</tr>
<tr class="clickable-row" data-href="xml_ns0_loginKey0.html">
<td> <span class="datatype-name">loginKey0</span>
</td>
<td> <span class="datatype-description"></span>
</td>
</tr>
<tr class="clickable-row" data-href="xml_ns0_plan.html">
<td> <span class="datatype-name">plan</span>
</td>
<td> <span class="datatype-description">This class represents a plan to be provided to the planner.</span>
</td>
</tr>
<tr class="clickable-row" data-href="xml_ns0_register.html">
<td> <span class="datatype-name">register</span>
</td>
<td> <span class="datatype-description"></span>
</td>
</tr>
<tr class="clickable-row" data-href="xml_ns0_result.html">
<td> <span class="datatype-name">result</span>
</td>
<td> <span class="datatype-description"></span>
</td>
</tr>
<tr class="clickable-row" data-href="xml_ns0_upload.html">
<td> <span class="datatype-name">upload</span>
</td>
<td> <span class="datatype-description"></span>
</td>
</tr>
<tr class="clickable-row" data-href="xml_ns0_cloudCredentials.html">
<td> <span class="datatype-name">cloudCredentials</span>
</td>
<td> <span class="datatype-description">This class represents the cloud credentials. They are used by the provisoner
to request for resources.</span>
</td>
</tr>
<tr class="clickable-row" data-href="xml_ns0_deployParameter.html">
<td> <span class="datatype-name">deployParameter</span>
</td>
<td> <span class="datatype-description">This class is used by the deployer to deploy software
(swarm,kubernetes,ansible). It is generated by the provisioner to contain VM
information.</span>
</td>
</tr>
<tr class="clickable-row" data-href="xml_ns0_deployRequest.html">
<td> <span class="datatype-name">deployRequest</span>
</td>
<td> <span class="datatype-description">This class holds the necessary POJO IDs to request the deployment of a
software</span>
</td>
</tr>
<tr class="clickable-row" data-href="xml_ns0_deployResponse.html">
<td> <span class="datatype-name">deployResponse</span>
</td>
<td> <span class="datatype-description">This class represents the response of a deploy request. It may hold a key
pair used for logging in and managing a docker cluster. Currently they key
pair is only used by kubernetes</span>
</td>
</tr>
<tr class="clickable-row" data-href="xml_ns0_key.html">
<td> <span class="datatype-name">key</span>
</td>
<td> <span class="datatype-description">This class represents a key. This key can be used to either login to a VM
created by the provisiner or by the VM to allow the user to login to the VMs
from the machine the keys correspond to.</span>
</td>
</tr>
<tr class="clickable-row" data-href="xml_ns0_type.html">
<td> <span class="datatype-name">type</span>
</td>
<td> <span class="datatype-description"></span>
</td>
</tr>
<tr class="clickable-row" data-href="xml_ns0_keyPair.html">
<td> <span class="datatype-name">keyPair</span>
</td>
<td> <span class="datatype-description">This class hold the pair of public private keys. The kyes may be used for
logging in VMs.</span>
</td>
</tr>
<tr class="clickable-row" data-href="xml_ns0_keyValueHolder.html">
<td> <span class="datatype-name">keyValueHolder</span>
</td>
<td> <span class="datatype-description">This is a generic class that hold key-value pairs. It's main usage is to hold
abstract types such as TOSCA.</span>
</td>
</tr>
<tr class="clickable-row" data-href="xml_ns0_ownedObject.html">
<td> <span class="datatype-name">ownedObject</span>
</td>
<td> <span class="datatype-description">This is the base class for users to own resources. Many classes extend this
class</span>
</td>
</tr>
<tr class="clickable-row" data-href="xml_ns0_planResponse.html">
<td> <span class="datatype-name">planResponse</span>
</td>
<td> <span class="datatype-description">This class represents a plan generated by the planner.</span>
</td>
</tr>
<tr class="clickable-row" data-href="xml_ns0_playbookRepresentation.html">
<td> <span class="datatype-name">playbookRepresentation</span>
</td>
<td> <span class="datatype-description">This class represents a playbook used by ansible manager to deploy software.</span>
</td>
</tr>
<tr class="clickable-row" data-href="xml_ns0_provisionRequest.html">
<td> <span class="datatype-name">provisionRequest</span>
</td>
<td> <span class="datatype-description">This class is a holder for the the object IDs that are required by the
provisioner to request for cloud resources.</span>
</td>
</tr>
<tr class="clickable-row" data-href="xml_ns0_provisionResponse.html">
<td> <span class="datatype-name">provisionResponse</span>
</td>
<td> <span class="datatype-description">This class represents a description of provisioned resources</span>
</td>
</tr>
<tr class="clickable-row" data-href="xml_ns0_script.html">
<td> <span class="datatype-name">script</span>
</td>
<td> <span class="datatype-description">This class represents a simple script that can run on a provisioned VM.</span>
</td>
</tr>
<tr class="clickable-row" data-href="xml_ns0_toscaRepresentation.html">
<td> <span class="datatype-name">toscaRepresentation</span>
</td>
<td> <span class="datatype-description"></span>
</td>
</tr>
<tr class="clickable-row" data-href="xml_ns0_user.html">
<td> <span class="datatype-name">user</span>
</td>
<td> <span class="datatype-description">This class represents a user.</span>
</td>
</tr>
</tbody>
</table>
<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>
......@@ -102,8 +102,7 @@ to request for resources.</p>
<td> <span class="property-minMaxOccurs">0/1
</span>
</td>
<td> <span class="property-description">The access key ID for a cloud provider. Some providers may not use this
field</span>
<td> <span class="property-description">The access key ID for a cloud provider.</span>
</td>
</tr>
<tr>
......
......@@ -146,7 +146,7 @@ to specify the domain name for ec2</span>
<tr>
<td> <span class="property-name">type</span>
</td>
<td> <span class="datatype-reference"><a href="xml_ns0_type.html">type</a>
<td> <span class="datatype-reference"><a href="xml_ns0_keyType.html">keyType</a>
</span>
</td>
<td> <span class="property-type">element
......
......@@ -64,7 +64,7 @@
<h1 class="page-header">toscaRepresentation <small>Data Type</small></h1>
<p></p>
<p>This class is a representation of a TOSCA description.</p>
<dl class="dl-horizontal">
<dt>Namespace</dt>
......
......@@ -156,24 +156,6 @@
</span>
</td>
<td> <span class="property-description">If the account is enabled</span>
</td>
</tr>
<tr>
<td> <span class="property-name">id</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</span>
</td>
</tr>
<tr>
......@@ -236,7 +218,6 @@
<p class="lead">Example</p>
<pre class="prettyprint language-xml example">&lt;u-----&gt;
&lt;id&gt;...&lt;/id&gt;
&lt;password&gt;...&lt;/password&gt;
&lt;username&gt;user&lt;/username&gt;
&lt;accountNonExpired&gt;true&lt;/accountNonExpired&gt;
......
......@@ -118,7 +118,7 @@ public class CloudConfigurationController0 {
try {
nl.uva.sne.drip.data.v1.external.Key key1 = new nl.uva.sne.drip.data.v1.external.Key();
key1.setKey(key0.content);
key1.setType(Key.Type.PUBLIC);
key1.setType(Key.KeyType.PUBLIC);
KeyPair pair = new KeyPair();
pair.setPublicKey(key1);
pair = keyService.save(pair);
......@@ -132,7 +132,7 @@ public class CloudConfigurationController0 {
try {
nl.uva.sne.drip.data.v1.external.Key key1 = new nl.uva.sne.drip.data.v1.external.Key();
key1.setKey(key0.content);
key1.setType(Key.Type.PRIVATE);
key1.setType(Key.KeyType.PRIVATE);
KeyPair pair = new KeyPair();
pair.setPrivateKey(key1);
pair = keyService.save(pair);
......
......@@ -65,7 +65,7 @@ public class UserPublicKeysController0 {
Key upk = new Key();
upk.setKey(confUserKey.file.get(0).content);
upk.setName(confUserKey.file.get(0).name);
upk.setType(Key.Type.PUBLIC);
upk.setType(Key.KeyType.PUBLIC);
pair.setPublicKey(upk);
pair = service.save(pair);
......
......@@ -25,6 +25,7 @@ import java.util.Map;
import java.util.logging.Level;
import java.util.logging.Logger;
import javax.annotation.security.RolesAllowed;
import javax.ws.rs.core.MediaType;
import nl.uva.sne.drip.data.v1.external.CloudCredentials;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Component;
......@@ -71,10 +72,11 @@ public class CloudCredentialsController {
* @param cloudCredentials
* @return the CloudCredentials id
*/
@RequestMapping(method = RequestMethod.POST)
@RequestMapping(method = RequestMethod.POST, consumes = MediaType.APPLICATION_JSON)
@RolesAllowed({UserService.USER, UserService.ADMIN})
@StatusCodes({
@ResponseCode(code = 400, condition = "Key can't be empty")
@ResponseCode(code = 400, condition = "Access key ID can't be empty"),
@ResponseCode(code = 200, condition = "At least one key ID is posted")
})
public @ResponseBody
String postCredentials(@RequestBody CloudCredentials cloudCredentials) {
......
......@@ -88,7 +88,7 @@ public class KeyPairController {
// }
// return null;
// }
// curl -H "Content-Type: application/json" -X POST -d '{"key":"ssh-rsa AAAAB3NzaDWBqs75i849MytgwgQcRYMcsXIki0yeYTKABH6JqoiyFBHtYlyh/EV1t6cujb9LyNP4J5EN4fPbtwKYvxecd0LojSPxl4wjQlfrHyg6iKUYB7hVzGqACMvgYZHrtHPfrdEmOGPplPVPpoaX2j+u0BZ0yYhrWMKjzyYZKa68yy5N18+Gq+1p83HfUDwIU9wWaUYdgEvDujqF6b8p3z6LDx9Ob+RanSMZSt+b8eZRcd+F2Oy/gieJEJ8kc152VIOv8UY1xB3hVEwVnSRGgrAsa+9PChfF6efXUGWiKf8KBlWgBOYsSTsOY4ks9zkXMnbcTdC+o7xspOkyIcWjv us@u\n","name":"id_rsa.pub"}' localhost:8080/drip-api/user_key/
// curl -H "Content-KeyType: application/json" -X POST -d '{"key":"ssh-rsa AAAAB3NzaDWBqs75i849MytgwgQcRYMcsXIki0yeYTKABH6JqoiyFBHtYlyh/EV1t6cujb9LyNP4J5EN4fPbtwKYvxecd0LojSPxl4wjQlfrHyg6iKUYB7hVzGqACMvgYZHrtHPfrdEmOGPplPVPpoaX2j+u0BZ0yYhrWMKjzyYZKa68yy5N18+Gq+1p83HfUDwIU9wWaUYdgEvDujqF6b8p3z6LDx9Ob+RanSMZSt+b8eZRcd+F2Oy/gieJEJ8kc152VIOv8UY1xB3hVEwVnSRGgrAsa+9PChfF6efXUGWiKf8KBlWgBOYsSTsOY4ks9zkXMnbcTdC+o7xspOkyIcWjv us@u\n","name":"id_rsa.pub"}' localhost:8080/drip-api/user_key/
/**
* 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
......@@ -136,7 +136,7 @@ public class KeyPairController {
attributes.put("domain_name", "Virginia");
pk.setAttributes(attributes);
pk.setKey("-----BEGIN RSA PRIVATE KEY-----\\nMIIEogIBAAm6AALYxkJFNzD3bfVJ4+hMY5j0/kqM9CURLKXMlYuAysnvoG8wZKx9Bedefm\\neNSse4zTg798ZA2kDMZFIrwp1Asetj8DDu5fhG5DjyI3g6iJltS5zFQdMXneDlHXBX8cncSzNY\\nRx0NdjEMAe7YttvI8FNlxL0VnMFli/HB/ftzYMe5+AmkSROncVGHiwoiUpj+vtobCFOYtXsCf6ri\\nd4lgWA5wv6DZT/JKCYymiBqgSXu3ueFcEzw5SAukARWVjn1xccjZkokFfBbO/FpYY00TrUTBw9S6\\nD3iM+gj8RT6EKILOmhrt71D21S95WAWIT7h2YBsy1KAvMixhNf9VaQIDAQABAoIBAHhVYK3Xl3tr\\nN1Xm0ctJTQg3ijxhR2qsUBgGUokqezpdOoD2zbbX1GLr967U9pwxzUpELexexwiTvk\\nnLv8D7ui6qbRsmc4DSsWBRSophVIVFKQmftO8Xow6x+fuYJAYmsicM1KIYHBILtL+PSzV8anenWq\\nKQ3r0tfCiQhEzKEk4b1uT3SJWQyHE++JAhVkO7lIeb6S9Dg1jAaAeMnJ/NiMxTarpPRnxe6hsTsH\\ngG1iKWo+Skcl4SknOc+CMEfyDjG4FL7MGhKduahsO8vMUrgGsDD7EH3NiX/FweB8La6qpDYAwFpC\\nycrooyhiyzw8Wb5gGaYnmvr9l70CgYEAx74O8JleXaHpxEAmh4h7VbLmJ3mOylfBmOdzcHeedJQw\\nack2SAv65WBI9S9MEQ7J/vFuyw5HNk3C/mcWgzDQXSNIhHLvl/Z9sux/Qpm3SQWLz0RBxKV3dJ4r\\nwcAxzVA93+/L1Nee+VOKnlyRumvVa6+XLsLagpap2AVcTqlerMcCgYEAx3T2pXtqkCE9eU/ov22r\\npdaKjgHoGOUg1CMEfWi/Ch6sYIIRyrHz6dhy+yR1pXNgPbLWdrn8l88F3+IsmbaMupMgRmqwEC3G\\n9Y2FglGIVvRdZaagvRxLzRCcvcN4v6OYs9ST4o1xlv7Qxphld+0XDKv7VSCv/rASuK8BqlFL3E8C\\ngYArMXJRnRjG7qh6g9TRIjZphdI3XxX9s5Rt2D8iZvuhAhqmBZjzY4PR7kxYmO2+EpCjzNnEl0XW\\n/GHaWbiIjhnAykx4N9KP7gGom3O5lzwHUme1XnFKcO2wDjQwJbufRmba8iQF1srN577mF+Z7ha4V\\nJ1duCTzvWF1KFX6sk/uhKQKBgAcDFai7rgNjJ8YcCRKxyFcMM9LKPl6hr4XFtWKzTAQPEABUkkuN\\n9gVClsg9f+VRKRECOIf0Ae1UWeCFEwxUXp4wjfHrzkTDVztKvmbWdvSXorDwKrZ7SC7tZpVFSfly\\nxuuLjadpUZT9YFmbAfY1X5oSccOMYqORjRbxEB3svb4BAoGAGTgFuq9Zojh/KIqY8b4HpEfmh6CQ\\nhLVfD98Nqd6GDbxgvIM0v4mFXE92x2jn35Ia0JdFyh3B8Vkl7sqQZfxDFXI9O9pte2mPJxY9ICaY\\n55+X/SN1pd53BH+gaPZJy/R+Vpvs5MN48ho=\\n-----END RSA PRIVATE KEY-----\\n");
pk.setType(Key.Type.PRIVATE);
pk.setType(Key.KeyType.PRIVATE);
pair.setPrivateKey(pk);
return pair;
} catch (KeyException ex) {
......
......@@ -72,8 +72,7 @@ public class CloudCredentials extends OwnedObject {
}
/**
* The access key ID for a cloud provider. Some providers may not use this
* field
* The access key ID for a cloud provider.
* @return the accessKeyId
*/
@DocumentationExample("AKIKIQY9K1ZUQ6M7YBSQ")
......
......@@ -31,7 +31,7 @@ public class Key{
private String key;
private Type type;
private KeyType type;
private String name;
/**
......@@ -48,8 +48,17 @@ public class Key{
this.name = name;
}
public static enum Type {
/**
* This enu specifies if a key is private or public
*/
public static enum KeyType {
/**
* For private keys
*/
PRIVATE,
/**
* For public keys
*/
PUBLIC
}
......@@ -59,14 +68,14 @@ public class Key{
* @return the type
*/
@DocumentationExample("PRIVATE")
public Type getType() {
public KeyType getType() {
return type;
}
/**
* @param type the type to set
*/
public void setType(Type type) {
public void setType(KeyType type) {
this.type = type;
}
......
......@@ -43,7 +43,7 @@ public class KeyPair extends OwnedObject {
* @throws nl.uva.sne.drip.api.exception.KeyException
*/
public void setPrivateKey(Key privateKey) throws KeyException {
if (privateKey.getType() != Key.Type.PRIVATE) {
if (privateKey.getType() != Key.KeyType.PRIVATE) {
throw new KeyException("Trying to add public key to private");
}
this.privateKey = privateKey;
......@@ -61,7 +61,7 @@ public class KeyPair extends OwnedObject {
* @throws nl.uva.sne.drip.api.exception.KeyException
*/
public void setPublicKey(Key publicKey) throws KeyException {
if (privateKey.getType() != Key.Type.PUBLIC) {
if (privateKey.getType() != Key.KeyType.PUBLIC) {
throw new KeyException("Trying to add private to public");
}
this.publicKey = publicKey;
......
......@@ -19,7 +19,7 @@ import com.webcohesion.enunciate.metadata.DocumentationExample;
import org.springframework.data.mongodb.core.mapping.Document;
/**
*
* This class is a representation of a TOSCA description.
* @author S. Koulouzis
*/
@Document
......
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