<?xml version="1.0"?>
<feed xmlns="http://www.w3.org/2005/Atom" xml:lang="en">
		<id>https://wiki.openstack.org/w/api.php?action=feedcontributions&amp;feedformat=atom&amp;user=Dagnello</id>
		<title>OpenStack - User contributions [en]</title>
		<link rel="self" type="application/atom+xml" href="https://wiki.openstack.org/w/api.php?action=feedcontributions&amp;feedformat=atom&amp;user=Dagnello"/>
		<link rel="alternate" type="text/html" href="https://wiki.openstack.org/wiki/Special:Contributions/Dagnello"/>
		<updated>2026-06-28T12:58:31Z</updated>
		<subtitle>User contributions</subtitle>
		<generator>MediaWiki 1.28.2</generator>

	<entry>
		<id>https://wiki.openstack.org/w/index.php?title=Meetings/Cue&amp;diff=90037</id>
		<title>Meetings/Cue</title>
		<link rel="alternate" type="text/html" href="https://wiki.openstack.org/w/index.php?title=Meetings/Cue&amp;diff=90037"/>
				<updated>2015-09-11T19:28:11Z</updated>
		
		<summary type="html">&lt;p&gt;Dagnello: /* Next meeting */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;= Weekly Cue meeting =&lt;br /&gt;
&lt;br /&gt;
The [https://launchpad.net/cue Cue] project holds a weekly team meeting every Tuesday at following time/place:&lt;br /&gt;
* [http://www.timeanddate.com/worldclock/fixedtime.html?hour=18&amp;amp;min=0&amp;amp;sec=0%201900%20UTC 18:00 UTC] in &amp;lt;code&amp;gt;&amp;lt;nowiki&amp;gt;#openstack-meeting-alt&amp;lt;/nowiki&amp;gt;&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== Next meeting ==&lt;br /&gt;
September 15, 2015 - http://www.timeanddate.com/worldclock/fixedtime.html?msg=Cue+Weekly+Meeting&amp;amp;iso=20150915T18&amp;amp;p1=1440&amp;amp;ah=1&lt;br /&gt;
&lt;br /&gt;
==== Agenda ====&lt;br /&gt;
* Action Items&lt;br /&gt;
** http://eavesdrop.openstack.org/meetings/cue/2015/cue.2015-09-01-18.01.html&lt;br /&gt;
* Discussion Topics&lt;br /&gt;
&lt;br /&gt;
* Bugs&lt;br /&gt;
** [https://bugs.launchpad.net/cue/+bugs?field.searchtext=&amp;amp;orderby=-importance&amp;amp;field.status%3Alist=NEW&amp;amp;field.status%3Alist=INCOMPLETE_WITH_RESPONSE&amp;amp;field.status%3Alist=INCOMPLETE_WITHOUT_RESPONSE&amp;amp;field.importance%3Alist=CRITICAL&amp;amp;field.importance%3Alist=HIGH&amp;amp;field.importance%3Alist=MEDIUM&amp;amp;assignee_option=any&amp;amp;field.assignee=&amp;amp;field.bug_reporter=&amp;amp;field.bug_commenter=&amp;amp;field.subscriber=&amp;amp;field.structural_subscriber=&amp;amp;field.tag=&amp;amp;field.tags_combinator=ANY&amp;amp;field.has_cve.used=&amp;amp;field.omit_dupes.used=&amp;amp;field.omit_dupes=on&amp;amp;field.affects_me.used=&amp;amp;field.has_patch.used=&amp;amp;field.has_branches.used=&amp;amp;field.has_branches=on&amp;amp;field.has_no_branches.used=&amp;amp;field.has_no_branches=on&amp;amp;field.has_blueprints.used=&amp;amp;field.has_blueprints=on&amp;amp;field.has_no_blueprints.used=&amp;amp;field.has_no_blueprints=on&amp;amp;search=Search New [Critical | High | Medium&amp;lt;nowiki&amp;gt;]&amp;lt;/nowiki&amp;gt; Bugs]&lt;br /&gt;
&lt;br /&gt;
* Open discussion&lt;/div&gt;</summary>
		<author><name>Dagnello</name></author>	</entry>

	<entry>
		<id>https://wiki.openstack.org/w/index.php?title=Meetings/Cue&amp;diff=90036</id>
		<title>Meetings/Cue</title>
		<link rel="alternate" type="text/html" href="https://wiki.openstack.org/w/index.php?title=Meetings/Cue&amp;diff=90036"/>
				<updated>2015-09-11T19:27:56Z</updated>
		
		<summary type="html">&lt;p&gt;Dagnello: /* Next meeting */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;= Weekly Cue meeting =&lt;br /&gt;
&lt;br /&gt;
The [https://launchpad.net/cue Cue] project holds a weekly team meeting every Tuesday at following time/place:&lt;br /&gt;
* [http://www.timeanddate.com/worldclock/fixedtime.html?hour=18&amp;amp;min=0&amp;amp;sec=0%201900%20UTC 18:00 UTC] in &amp;lt;code&amp;gt;&amp;lt;nowiki&amp;gt;#openstack-meeting-alt&amp;lt;/nowiki&amp;gt;&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== Next meeting ==&lt;br /&gt;
September 15, 2015 - http://www.timeanddate.com/worldclock/fixedtime.html?msg=Cue+Weekly+Meeting&amp;amp;iso=20150901T18&amp;amp;p1=1440&amp;amp;ah=1&lt;br /&gt;
&lt;br /&gt;
==== Agenda ====&lt;br /&gt;
* Action Items&lt;br /&gt;
** http://eavesdrop.openstack.org/meetings/cue/2015/cue.2015-09-01-18.01.html&lt;br /&gt;
* Discussion Topics&lt;br /&gt;
&lt;br /&gt;
* Bugs&lt;br /&gt;
** [https://bugs.launchpad.net/cue/+bugs?field.searchtext=&amp;amp;orderby=-importance&amp;amp;field.status%3Alist=NEW&amp;amp;field.status%3Alist=INCOMPLETE_WITH_RESPONSE&amp;amp;field.status%3Alist=INCOMPLETE_WITHOUT_RESPONSE&amp;amp;field.importance%3Alist=CRITICAL&amp;amp;field.importance%3Alist=HIGH&amp;amp;field.importance%3Alist=MEDIUM&amp;amp;assignee_option=any&amp;amp;field.assignee=&amp;amp;field.bug_reporter=&amp;amp;field.bug_commenter=&amp;amp;field.subscriber=&amp;amp;field.structural_subscriber=&amp;amp;field.tag=&amp;amp;field.tags_combinator=ANY&amp;amp;field.has_cve.used=&amp;amp;field.omit_dupes.used=&amp;amp;field.omit_dupes=on&amp;amp;field.affects_me.used=&amp;amp;field.has_patch.used=&amp;amp;field.has_branches.used=&amp;amp;field.has_branches=on&amp;amp;field.has_no_branches.used=&amp;amp;field.has_no_branches=on&amp;amp;field.has_blueprints.used=&amp;amp;field.has_blueprints=on&amp;amp;field.has_no_blueprints.used=&amp;amp;field.has_no_blueprints=on&amp;amp;search=Search New [Critical | High | Medium&amp;lt;nowiki&amp;gt;]&amp;lt;/nowiki&amp;gt; Bugs]&lt;br /&gt;
&lt;br /&gt;
* Open discussion&lt;/div&gt;</summary>
		<author><name>Dagnello</name></author>	</entry>

	<entry>
		<id>https://wiki.openstack.org/w/index.php?title=Meetings/Cue&amp;diff=90035</id>
		<title>Meetings/Cue</title>
		<link rel="alternate" type="text/html" href="https://wiki.openstack.org/w/index.php?title=Meetings/Cue&amp;diff=90035"/>
				<updated>2015-09-11T19:26:41Z</updated>
		
		<summary type="html">&lt;p&gt;Dagnello: /* Weekly Cue meeting */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;= Weekly Cue meeting =&lt;br /&gt;
&lt;br /&gt;
The [https://launchpad.net/cue Cue] project holds a weekly team meeting every Tuesday at following time/place:&lt;br /&gt;
* [http://www.timeanddate.com/worldclock/fixedtime.html?hour=18&amp;amp;min=0&amp;amp;sec=0%201900%20UTC 18:00 UTC] in &amp;lt;code&amp;gt;&amp;lt;nowiki&amp;gt;#openstack-meeting-alt&amp;lt;/nowiki&amp;gt;&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== Next meeting ==&lt;br /&gt;
September 1, 2015 - http://www.timeanddate.com/worldclock/fixedtime.html?msg=Cue+Weekly+Meeting&amp;amp;iso=20150901T18&amp;amp;p1=1440&amp;amp;ah=1&lt;br /&gt;
&lt;br /&gt;
==== Agenda ====&lt;br /&gt;
* Action Items&lt;br /&gt;
** http://eavesdrop.openstack.org/meetings/cue/2015/cue.2015-09-01-18.01.html&lt;br /&gt;
* Discussion Topics&lt;br /&gt;
&lt;br /&gt;
* Bugs&lt;br /&gt;
** [https://bugs.launchpad.net/cue/+bugs?field.searchtext=&amp;amp;orderby=-importance&amp;amp;field.status%3Alist=NEW&amp;amp;field.status%3Alist=INCOMPLETE_WITH_RESPONSE&amp;amp;field.status%3Alist=INCOMPLETE_WITHOUT_RESPONSE&amp;amp;field.importance%3Alist=CRITICAL&amp;amp;field.importance%3Alist=HIGH&amp;amp;field.importance%3Alist=MEDIUM&amp;amp;assignee_option=any&amp;amp;field.assignee=&amp;amp;field.bug_reporter=&amp;amp;field.bug_commenter=&amp;amp;field.subscriber=&amp;amp;field.structural_subscriber=&amp;amp;field.tag=&amp;amp;field.tags_combinator=ANY&amp;amp;field.has_cve.used=&amp;amp;field.omit_dupes.used=&amp;amp;field.omit_dupes=on&amp;amp;field.affects_me.used=&amp;amp;field.has_patch.used=&amp;amp;field.has_branches.used=&amp;amp;field.has_branches=on&amp;amp;field.has_no_branches.used=&amp;amp;field.has_no_branches=on&amp;amp;field.has_blueprints.used=&amp;amp;field.has_blueprints=on&amp;amp;field.has_no_blueprints.used=&amp;amp;field.has_no_blueprints=on&amp;amp;search=Search New [Critical | High | Medium&amp;lt;nowiki&amp;gt;]&amp;lt;/nowiki&amp;gt; Bugs]&lt;br /&gt;
&lt;br /&gt;
* Open discussion&lt;/div&gt;</summary>
		<author><name>Dagnello</name></author>	</entry>

	<entry>
		<id>https://wiki.openstack.org/w/index.php?title=Cue/api1vsapi2&amp;diff=70513</id>
		<title>Cue/api1vsapi2</title>
		<link rel="alternate" type="text/html" href="https://wiki.openstack.org/w/index.php?title=Cue/api1vsapi2&amp;diff=70513"/>
				<updated>2014-12-17T00:51:32Z</updated>
		
		<summary type="html">&lt;p&gt;Dagnello: /* 'Questions/discussions:' */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;== API Approach 1 Vs API Approach 2 ==&lt;br /&gt;
&lt;br /&gt;
This page will analyze the comparison between the two main API approaches for project Cue.  &lt;br /&gt;
&lt;br /&gt;
The first approach is located here: https://wiki.openstack.org/wiki/Cue/api&lt;br /&gt;
&lt;br /&gt;
The second approach is located here: https://wiki.openstack.org/wiki/Cue/api_2&lt;br /&gt;
&lt;br /&gt;
=== API Approach 1 Summary ===&lt;br /&gt;
&lt;br /&gt;
The first approach to the API provides more visibility on the inner structures and configuration of the messaging clusters deployed by Cue.  This exposure would allow the user additional control on a per-node configuration before and after cluster deployment.  This lends to a more hands-on deployment and configuration structure allowing the user finer level control.  On the other hand, this can lead to miss-configured and unstable clusters.&lt;br /&gt;
&lt;br /&gt;
When the user creates a new cluster (POST), the API accepts the general cluster settings and a list of &amp;quot;nodes&amp;quot; which currently only contains VM flavor (e.g. small, medium, large).  The reasoning to accept a node list of flavors even though it only makes sense to have all nodes in a cluster be the same flavor is with respect to consistency with the JSON response.  The response body contains the same structure as the request body, where the nodes list now holds additional information about the nodes in the new cluster (e.g. node id, status, flavor..).  The overall API is well positioned to expose full node by node control of Messaging clusters for the user.  For a cluster update, the user can specify exactly which node to update, add or remove.&lt;br /&gt;
&lt;br /&gt;
=== API Approach 2 Summary ===&lt;br /&gt;
&lt;br /&gt;
The second approach to the API hides per-node details in a cluster.  The API accepts configuration settings for a cluster as a whole, for example flavor and size which denote the overall node flavor and number of nodes respectively.  This design minimizes internal per-node configuration and therefore lends to a messaging deployment system that will automate the full deployment process with minimal user intervention and therefore reducing possible user related errors.&lt;br /&gt;
&lt;br /&gt;
An update to a cluster is issued by changing cluster-level parameters such as size or flavor.  For example, Cue decides which node(s) to remove in the case of a down-size.&lt;br /&gt;
&lt;br /&gt;
=== API Approach 1 Pros/Cons ===&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
! Pros !! Cons&lt;br /&gt;
|-&lt;br /&gt;
| &lt;br /&gt;
* Full exposure to node configuration and settings in a given cluster.&lt;br /&gt;
* Request and response bodies follow a consistent format with respective node list, this is then followed to end point lists in respective nodes.&lt;br /&gt;
* Per-node update control to user.&lt;br /&gt;
|| &lt;br /&gt;
* Possible confusion with current node list requiring node flavor, which have to be all the same for a given cluster.&lt;br /&gt;
* The more exposed knobs for the user, greater chance for miss-configuration and therefore cluster downtime, additional required support, etc.&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
=== API Approach 2 Pros/Cons ===&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
! Pros !! Cons&lt;br /&gt;
|-&lt;br /&gt;
| &lt;br /&gt;
* Node specific details to get a cluster up and running are managed by Cue.&lt;br /&gt;
* Minimizes chances of miss-configured clusters.&lt;br /&gt;
* In the future, node-specific configuration can be added if use cases are present.&lt;br /&gt;
|| &lt;br /&gt;
* User cannot change specific configuration on a given node.  Cue will manage any updates to nodes in cluster.&lt;br /&gt;
* Endpoint list mapping to specific node(s) not as clear.&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
=== Extending to Custom Messaging Cluster Configurations ===&lt;br /&gt;
&lt;br /&gt;
The main goal of Cue is to provide users a simple, efficient, reliable and HA cluster messaging provisioning/maintenance service.  The user-facing API should therefore allow for simple deployment of mainstream messaging clusters, while at the same time allow for the provisioning of custom (node-level) user define clusters.&lt;br /&gt;
&lt;br /&gt;
One possible approach is to keep the API configurable at the cluster-level, and allow a user-specified link to a custom configuration template file.  The configuration template file would allow the user to define fine grain cluster/node configuration.  There would be a configuration template file format for each supported messaging technology (e.g. RabbitMQ, Kafka, Qpid, etc..).  If the user does not provide an input configuration template file, Cue would use a pre-define template file for the given messaging technology.  &lt;br /&gt;
&lt;br /&gt;
This would allow the mainstream user without in-depth messaging technology knowledge the ability to quickly/easily deploy their messaging cluster, and allow power users to deploy fully customizable clusters as per specified configurations.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
'''In summary:'''&lt;br /&gt;
* Simple API to deploy cluster-level configurable messaging clusters&lt;br /&gt;
* API can accept an optional template configuration file for full node-level configuration&lt;br /&gt;
* One template configuration file per messaging technology supported&lt;br /&gt;
* Default template configuration file is used by Cue when one is not provided through API&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=== Questions/discussions: ===&lt;br /&gt;
# Where do users acquire the configuration template files from?&lt;br /&gt;
# How do users know which endpoint is up/down with the second approach?&lt;/div&gt;</summary>
		<author><name>Dagnello</name></author>	</entry>

	<entry>
		<id>https://wiki.openstack.org/w/index.php?title=Cue/api1vsapi2&amp;diff=70512</id>
		<title>Cue/api1vsapi2</title>
		<link rel="alternate" type="text/html" href="https://wiki.openstack.org/w/index.php?title=Cue/api1vsapi2&amp;diff=70512"/>
				<updated>2014-12-17T00:51:19Z</updated>
		
		<summary type="html">&lt;p&gt;Dagnello: /* Extending to Custom Messaging Cluster Configurations */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;== API Approach 1 Vs API Approach 2 ==&lt;br /&gt;
&lt;br /&gt;
This page will analyze the comparison between the two main API approaches for project Cue.  &lt;br /&gt;
&lt;br /&gt;
The first approach is located here: https://wiki.openstack.org/wiki/Cue/api&lt;br /&gt;
&lt;br /&gt;
The second approach is located here: https://wiki.openstack.org/wiki/Cue/api_2&lt;br /&gt;
&lt;br /&gt;
=== API Approach 1 Summary ===&lt;br /&gt;
&lt;br /&gt;
The first approach to the API provides more visibility on the inner structures and configuration of the messaging clusters deployed by Cue.  This exposure would allow the user additional control on a per-node configuration before and after cluster deployment.  This lends to a more hands-on deployment and configuration structure allowing the user finer level control.  On the other hand, this can lead to miss-configured and unstable clusters.&lt;br /&gt;
&lt;br /&gt;
When the user creates a new cluster (POST), the API accepts the general cluster settings and a list of &amp;quot;nodes&amp;quot; which currently only contains VM flavor (e.g. small, medium, large).  The reasoning to accept a node list of flavors even though it only makes sense to have all nodes in a cluster be the same flavor is with respect to consistency with the JSON response.  The response body contains the same structure as the request body, where the nodes list now holds additional information about the nodes in the new cluster (e.g. node id, status, flavor..).  The overall API is well positioned to expose full node by node control of Messaging clusters for the user.  For a cluster update, the user can specify exactly which node to update, add or remove.&lt;br /&gt;
&lt;br /&gt;
=== API Approach 2 Summary ===&lt;br /&gt;
&lt;br /&gt;
The second approach to the API hides per-node details in a cluster.  The API accepts configuration settings for a cluster as a whole, for example flavor and size which denote the overall node flavor and number of nodes respectively.  This design minimizes internal per-node configuration and therefore lends to a messaging deployment system that will automate the full deployment process with minimal user intervention and therefore reducing possible user related errors.&lt;br /&gt;
&lt;br /&gt;
An update to a cluster is issued by changing cluster-level parameters such as size or flavor.  For example, Cue decides which node(s) to remove in the case of a down-size.&lt;br /&gt;
&lt;br /&gt;
=== API Approach 1 Pros/Cons ===&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
! Pros !! Cons&lt;br /&gt;
|-&lt;br /&gt;
| &lt;br /&gt;
* Full exposure to node configuration and settings in a given cluster.&lt;br /&gt;
* Request and response bodies follow a consistent format with respective node list, this is then followed to end point lists in respective nodes.&lt;br /&gt;
* Per-node update control to user.&lt;br /&gt;
|| &lt;br /&gt;
* Possible confusion with current node list requiring node flavor, which have to be all the same for a given cluster.&lt;br /&gt;
* The more exposed knobs for the user, greater chance for miss-configuration and therefore cluster downtime, additional required support, etc.&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
=== API Approach 2 Pros/Cons ===&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
! Pros !! Cons&lt;br /&gt;
|-&lt;br /&gt;
| &lt;br /&gt;
* Node specific details to get a cluster up and running are managed by Cue.&lt;br /&gt;
* Minimizes chances of miss-configured clusters.&lt;br /&gt;
* In the future, node-specific configuration can be added if use cases are present.&lt;br /&gt;
|| &lt;br /&gt;
* User cannot change specific configuration on a given node.  Cue will manage any updates to nodes in cluster.&lt;br /&gt;
* Endpoint list mapping to specific node(s) not as clear.&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
=== Extending to Custom Messaging Cluster Configurations ===&lt;br /&gt;
&lt;br /&gt;
The main goal of Cue is to provide users a simple, efficient, reliable and HA cluster messaging provisioning/maintenance service.  The user-facing API should therefore allow for simple deployment of mainstream messaging clusters, while at the same time allow for the provisioning of custom (node-level) user define clusters.&lt;br /&gt;
&lt;br /&gt;
One possible approach is to keep the API configurable at the cluster-level, and allow a user-specified link to a custom configuration template file.  The configuration template file would allow the user to define fine grain cluster/node configuration.  There would be a configuration template file format for each supported messaging technology (e.g. RabbitMQ, Kafka, Qpid, etc..).  If the user does not provide an input configuration template file, Cue would use a pre-define template file for the given messaging technology.  &lt;br /&gt;
&lt;br /&gt;
This would allow the mainstream user without in-depth messaging technology knowledge the ability to quickly/easily deploy their messaging cluster, and allow power users to deploy fully customizable clusters as per specified configurations.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
'''In summary:'''&lt;br /&gt;
* Simple API to deploy cluster-level configurable messaging clusters&lt;br /&gt;
* API can accept an optional template configuration file for full node-level configuration&lt;br /&gt;
* One template configuration file per messaging technology supported&lt;br /&gt;
* Default template configuration file is used by Cue when one is not provided through API&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=== 'Questions/discussions:' ===&lt;br /&gt;
# Where do users acquire the configuration template files from?&lt;br /&gt;
# How do users know which endpoint is up/down with the second approach?&lt;/div&gt;</summary>
		<author><name>Dagnello</name></author>	</entry>

	<entry>
		<id>https://wiki.openstack.org/w/index.php?title=Cue/api1vsapi2&amp;diff=70415</id>
		<title>Cue/api1vsapi2</title>
		<link rel="alternate" type="text/html" href="https://wiki.openstack.org/w/index.php?title=Cue/api1vsapi2&amp;diff=70415"/>
				<updated>2014-12-16T05:35:55Z</updated>
		
		<summary type="html">&lt;p&gt;Dagnello: /* Extending to Custom Messaging Cluster Configurations */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;== API Approach 1 Vs API Approach 2 ==&lt;br /&gt;
&lt;br /&gt;
This page will analyze the comparison between the two main API approaches for project Cue.  &lt;br /&gt;
&lt;br /&gt;
The first approach is located here: https://wiki.openstack.org/wiki/Cue/api&lt;br /&gt;
&lt;br /&gt;
The second approach is located here: https://wiki.openstack.org/wiki/Cue/api_2&lt;br /&gt;
&lt;br /&gt;
=== API Approach 1 Summary ===&lt;br /&gt;
&lt;br /&gt;
The first approach to the API provides more visibility on the inner structures and configuration of the messaging clusters deployed by Cue.  This exposure would allow the user additional control on a per-node configuration before and after cluster deployment.  This lends to a more hands-on deployment and configuration structure allowing the user finer level control.  On the other hand, this can lead to miss-configured and unstable clusters.&lt;br /&gt;
&lt;br /&gt;
When the user creates a new cluster (POST), the API accepts the general cluster settings and a list of &amp;quot;nodes&amp;quot; which currently only contains VM flavor (e.g. small, medium, large).  The reasoning to accept a node list of flavors even though it only makes sense to have all nodes in a cluster be the same flavor is with respect to consistency with the JSON response.  The response body contains the same structure as the request body, where the nodes list now holds additional information about the nodes in the new cluster (e.g. node id, status, flavor..).  The overall API is well positioned to expose full node by node control of Messaging clusters for the user.  For a cluster update, the user can specify exactly which node to update, add or remove.&lt;br /&gt;
&lt;br /&gt;
=== API Approach 2 Summary ===&lt;br /&gt;
&lt;br /&gt;
The second approach to the API hides per-node details in a cluster.  The API accepts configuration settings for a cluster as a whole, for example flavor and size which denote the overall node flavor and number of nodes respectively.  This design minimizes internal per-node configuration and therefore lends to a messaging deployment system that will automate the full deployment process with minimal user intervention and therefore reducing possible user related errors.&lt;br /&gt;
&lt;br /&gt;
An update to a cluster is issued by changing cluster-level parameters such as size or flavor.  For example, Cue decides which node(s) to remove in the case of a down-size.&lt;br /&gt;
&lt;br /&gt;
=== API Approach 1 Pros/Cons ===&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
! Pros !! Cons&lt;br /&gt;
|-&lt;br /&gt;
| &lt;br /&gt;
* Full exposure to node configuration and settings in a given cluster.&lt;br /&gt;
* Request and response bodies follow a consistent format with respective node list, this is then followed to end point lists in respective nodes.&lt;br /&gt;
* Per-node update control to user.&lt;br /&gt;
|| &lt;br /&gt;
* Possible confusion with current node list requiring node flavor, which have to be all the same for a given cluster.&lt;br /&gt;
* The more exposed knobs for the user, greater chance for miss-configuration and therefore cluster downtime, additional required support, etc.&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
=== API Approach 2 Pros/Cons ===&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
! Pros !! Cons&lt;br /&gt;
|-&lt;br /&gt;
| &lt;br /&gt;
* Node specific details to get a cluster up and running are managed by Cue.&lt;br /&gt;
* Minimizes chances of miss-configured clusters.&lt;br /&gt;
* In the future, node-specific configuration can be added if use cases are present.&lt;br /&gt;
|| &lt;br /&gt;
* User cannot change specific configuration on a given node.  Cue will manage any updates to nodes in cluster.&lt;br /&gt;
* Endpoint list mapping to specific node(s) not as clear.&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
=== Extending to Custom Messaging Cluster Configurations ===&lt;br /&gt;
&lt;br /&gt;
The main goal of Cue is to provide users a simple, efficient, reliable and HA cluster messaging provisioning/maintenance service.  The user-facing API should therefore allow for simple deployment of mainstream messaging clusters, while at the same time allow for the provisioning of custom (node-level) user define clusters.&lt;br /&gt;
&lt;br /&gt;
One possible approach is to keep the API configurable at the cluster-level, and allow a user-specified link to a custom configuration template file.  The configuration template file would allow the user to define fine grain cluster/node configuration.  There would be a configuration template file format for each supported messaging technology (e.g. RabbitMQ, Kafka, Qpid, etc..).  If the user does not provide an input configuration template file, Cue would use a pre-define template file for the given messaging technology.  &lt;br /&gt;
&lt;br /&gt;
This would allow the mainstream user without in-depth messaging technology knowledge the ability to quickly/easily deploy their messaging cluster, and allow power users to deploy fully customizable clusters as per specified configurations.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
'''In summary:'''&lt;br /&gt;
* Simple API to deploy cluster-level configurable messaging clusters&lt;br /&gt;
* API can accept an optional template configuration file for full node-level configuration&lt;br /&gt;
* One template configuration file per messaging technology supported&lt;br /&gt;
* Default template configuration file is used by Cue when one is not provided through API&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
'''Questions/discussions:'''&lt;br /&gt;
# Where does the user acquire the configuration template files from?&lt;/div&gt;</summary>
		<author><name>Dagnello</name></author>	</entry>

	<entry>
		<id>https://wiki.openstack.org/w/index.php?title=Cue/api1vsapi2&amp;diff=70370</id>
		<title>Cue/api1vsapi2</title>
		<link rel="alternate" type="text/html" href="https://wiki.openstack.org/w/index.php?title=Cue/api1vsapi2&amp;diff=70370"/>
				<updated>2014-12-15T20:11:28Z</updated>
		
		<summary type="html">&lt;p&gt;Dagnello: /* Extending to Custom Messaging Cluster Configurations */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;== API Approach 1 Vs API Approach 2 ==&lt;br /&gt;
&lt;br /&gt;
This page will analyze the comparison between the two main API approaches for project Cue.  &lt;br /&gt;
&lt;br /&gt;
The first approach is located here: https://wiki.openstack.org/wiki/Cue/api&lt;br /&gt;
&lt;br /&gt;
The second approach is located here: https://wiki.openstack.org/wiki/Cue/api_2&lt;br /&gt;
&lt;br /&gt;
=== API Approach 1 Summary ===&lt;br /&gt;
&lt;br /&gt;
The first approach to the API provides more visibility on the inner structures and configuration of the messaging clusters deployed by Cue.  This exposure would allow the user additional control on a per-node configuration before and after cluster deployment.  This lends to a more hands-on deployment and configuration structure allowing the user finer level control.  On the other hand, this can lead to miss-configured and unstable clusters.&lt;br /&gt;
&lt;br /&gt;
When the user creates a new cluster (POST), the API accepts the general cluster settings and a list of &amp;quot;nodes&amp;quot; which currently only contains VM flavor (e.g. small, medium, large).  The reasoning to accept a node list of flavors even though it only makes sense to have all nodes in a cluster be the same flavor is with respect to consistency with the JSON response.  The response body contains the same structure as the request body, where the nodes list now holds additional information about the nodes in the new cluster (e.g. node id, status, flavor..).  The overall API is well positioned to expose full node by node control of Messaging clusters for the user.  For a cluster update, the user can specify exactly which node to update, add or remove.&lt;br /&gt;
&lt;br /&gt;
=== API Approach 2 Summary ===&lt;br /&gt;
&lt;br /&gt;
The second approach to the API hides per-node details in a cluster.  The API accepts configuration settings for a cluster as a whole, for example flavor and size which denote the overall node flavor and number of nodes respectively.  This design minimizes internal per-node configuration and therefore lends to a messaging deployment system that will automate the full deployment process with minimal user intervention and therefore reducing possible user related errors.&lt;br /&gt;
&lt;br /&gt;
An update to a cluster is issued by changing cluster-level parameters such as size or flavor.  For example, Cue decides which node(s) to remove in the case of a down-size.&lt;br /&gt;
&lt;br /&gt;
=== API Approach 1 Pros/Cons ===&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
! Pros !! Cons&lt;br /&gt;
|-&lt;br /&gt;
| &lt;br /&gt;
* Full exposure to node configuration and settings in a given cluster.&lt;br /&gt;
* Request and response bodies follow a consistent format with respective node list, this is then followed to end point lists in respective nodes.&lt;br /&gt;
* Per-node update control to user.&lt;br /&gt;
|| &lt;br /&gt;
* Possible confusion with current node list requiring node flavor, which have to be all the same for a given cluster.&lt;br /&gt;
* The more exposed knobs for the user, greater chance for miss-configuration and therefore cluster downtime, additional required support, etc.&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
=== API Approach 2 Pros/Cons ===&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
! Pros !! Cons&lt;br /&gt;
|-&lt;br /&gt;
| &lt;br /&gt;
* Node specific details to get a cluster up and running are managed by Cue.&lt;br /&gt;
* Minimizes chances of miss-configured clusters.&lt;br /&gt;
* In the future, node-specific configuration can be added if use cases are present.&lt;br /&gt;
|| &lt;br /&gt;
* User cannot change specific configuration on a given node.  Cue will manage any updates to nodes in cluster.&lt;br /&gt;
* Endpoint list mapping to specific node(s) not as clear.&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
=== Extending to Custom Messaging Cluster Configurations ===&lt;br /&gt;
&lt;br /&gt;
The main goal of Cue is to provide users a simple, efficient, reliable and HA cluster messaging provisioning/maintenance service.  The user-facing API should therefore allow for simple deployment of mainstream messaging clusters, while at the same time allow for the provisioning of custom (node-level) user define clusters.&lt;br /&gt;
&lt;br /&gt;
One possible approach is to keep the API configurable at the cluster-level, and allow a user-specified link to a custom configuration template file.  The configuration template file would allow the user to define fine grain cluster/node configuration.  There would be a configuration template file format for each supported messaging technology (e.g. RabbitMQ, Kafka, Qpid, etc..).  If the user does not provide an input configuration template file, Cue would use a pre-define template file for the given messaging technology.  &lt;br /&gt;
&lt;br /&gt;
This would allow the mainstream user without in-depth messaging technology knowledge the ability to quickly/easily deploy their messaging cluster, and allow power users to deploy fully customizable clusters as per specified configurations.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
'''In summary:'''&lt;br /&gt;
* Simple API to deploy cluster-level configurable clusters&lt;br /&gt;
* API can accept an optional template configuration file for full node-level configuration&lt;br /&gt;
* One template configuration file per messaging technology supported&lt;br /&gt;
* Default template configuration file is used by Cue when one is not provided through API&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
'''Questions/discussions:'''&lt;br /&gt;
# Where does the user acquire the configuration template files from?&lt;/div&gt;</summary>
		<author><name>Dagnello</name></author>	</entry>

	<entry>
		<id>https://wiki.openstack.org/w/index.php?title=Cue/api1vsapi2&amp;diff=70369</id>
		<title>Cue/api1vsapi2</title>
		<link rel="alternate" type="text/html" href="https://wiki.openstack.org/w/index.php?title=Cue/api1vsapi2&amp;diff=70369"/>
				<updated>2014-12-15T20:10:59Z</updated>
		
		<summary type="html">&lt;p&gt;Dagnello: /* Extending to Custom Messaging Cluster Configurations */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;== API Approach 1 Vs API Approach 2 ==&lt;br /&gt;
&lt;br /&gt;
This page will analyze the comparison between the two main API approaches for project Cue.  &lt;br /&gt;
&lt;br /&gt;
The first approach is located here: https://wiki.openstack.org/wiki/Cue/api&lt;br /&gt;
&lt;br /&gt;
The second approach is located here: https://wiki.openstack.org/wiki/Cue/api_2&lt;br /&gt;
&lt;br /&gt;
=== API Approach 1 Summary ===&lt;br /&gt;
&lt;br /&gt;
The first approach to the API provides more visibility on the inner structures and configuration of the messaging clusters deployed by Cue.  This exposure would allow the user additional control on a per-node configuration before and after cluster deployment.  This lends to a more hands-on deployment and configuration structure allowing the user finer level control.  On the other hand, this can lead to miss-configured and unstable clusters.&lt;br /&gt;
&lt;br /&gt;
When the user creates a new cluster (POST), the API accepts the general cluster settings and a list of &amp;quot;nodes&amp;quot; which currently only contains VM flavor (e.g. small, medium, large).  The reasoning to accept a node list of flavors even though it only makes sense to have all nodes in a cluster be the same flavor is with respect to consistency with the JSON response.  The response body contains the same structure as the request body, where the nodes list now holds additional information about the nodes in the new cluster (e.g. node id, status, flavor..).  The overall API is well positioned to expose full node by node control of Messaging clusters for the user.  For a cluster update, the user can specify exactly which node to update, add or remove.&lt;br /&gt;
&lt;br /&gt;
=== API Approach 2 Summary ===&lt;br /&gt;
&lt;br /&gt;
The second approach to the API hides per-node details in a cluster.  The API accepts configuration settings for a cluster as a whole, for example flavor and size which denote the overall node flavor and number of nodes respectively.  This design minimizes internal per-node configuration and therefore lends to a messaging deployment system that will automate the full deployment process with minimal user intervention and therefore reducing possible user related errors.&lt;br /&gt;
&lt;br /&gt;
An update to a cluster is issued by changing cluster-level parameters such as size or flavor.  For example, Cue decides which node(s) to remove in the case of a down-size.&lt;br /&gt;
&lt;br /&gt;
=== API Approach 1 Pros/Cons ===&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
! Pros !! Cons&lt;br /&gt;
|-&lt;br /&gt;
| &lt;br /&gt;
* Full exposure to node configuration and settings in a given cluster.&lt;br /&gt;
* Request and response bodies follow a consistent format with respective node list, this is then followed to end point lists in respective nodes.&lt;br /&gt;
* Per-node update control to user.&lt;br /&gt;
|| &lt;br /&gt;
* Possible confusion with current node list requiring node flavor, which have to be all the same for a given cluster.&lt;br /&gt;
* The more exposed knobs for the user, greater chance for miss-configuration and therefore cluster downtime, additional required support, etc.&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
=== API Approach 2 Pros/Cons ===&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
! Pros !! Cons&lt;br /&gt;
|-&lt;br /&gt;
| &lt;br /&gt;
* Node specific details to get a cluster up and running are managed by Cue.&lt;br /&gt;
* Minimizes chances of miss-configured clusters.&lt;br /&gt;
* In the future, node-specific configuration can be added if use cases are present.&lt;br /&gt;
|| &lt;br /&gt;
* User cannot change specific configuration on a given node.  Cue will manage any updates to nodes in cluster.&lt;br /&gt;
* Endpoint list mapping to specific node(s) not as clear.&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
=== Extending to Custom Messaging Cluster Configurations ===&lt;br /&gt;
&lt;br /&gt;
The main goal of Cue is to provide users a simple, efficient, reliable and HA cluster messaging provisioning/maintenance service.  The user-facing API should therefore allow for simple deployment of mainstream messaging clusters, while at the same time allow for the provisioning of custom (node-level) user define clusters.&lt;br /&gt;
&lt;br /&gt;
One possible approach is to keep the API configurable at the cluster-level, and allow a user-specified link to a custom configuration template file.  The configuration template file would allow the user to define fine grain cluster/node configuration.  There would be a configuration template file format for each supported messaging technology (e.g. RabbitMQ, Kafka, Qpid, etc..).  If the user does not provide an input configuration template file, Cue would use a pre-define template file for the given messaging technology.  &lt;br /&gt;
&lt;br /&gt;
This would allow the mainstream user without in-depth messaging technology knowledge the ability to quickly/easily deploy their messaging cluster, and allow power users to deploy fully customizable clusters as per specified configurations.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
'''In summary:'''&lt;br /&gt;
* Simple API to deploy cluster-level configurable clusters&lt;br /&gt;
* API can accept an optional template configuration file for full node-level configuration&lt;br /&gt;
* One template configuration file per messaging technology supported&lt;br /&gt;
* Default template configuration file is used by Cue when one is not provided&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
'''Questions/discussions:'''&lt;br /&gt;
# Where does the user acquire the configuration template files from?&lt;/div&gt;</summary>
		<author><name>Dagnello</name></author>	</entry>

	<entry>
		<id>https://wiki.openstack.org/w/index.php?title=Cue/api1vsapi2&amp;diff=70368</id>
		<title>Cue/api1vsapi2</title>
		<link rel="alternate" type="text/html" href="https://wiki.openstack.org/w/index.php?title=Cue/api1vsapi2&amp;diff=70368"/>
				<updated>2014-12-15T20:10:19Z</updated>
		
		<summary type="html">&lt;p&gt;Dagnello: /* Extending to Custom Messaging Cluster Configurations */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;== API Approach 1 Vs API Approach 2 ==&lt;br /&gt;
&lt;br /&gt;
This page will analyze the comparison between the two main API approaches for project Cue.  &lt;br /&gt;
&lt;br /&gt;
The first approach is located here: https://wiki.openstack.org/wiki/Cue/api&lt;br /&gt;
&lt;br /&gt;
The second approach is located here: https://wiki.openstack.org/wiki/Cue/api_2&lt;br /&gt;
&lt;br /&gt;
=== API Approach 1 Summary ===&lt;br /&gt;
&lt;br /&gt;
The first approach to the API provides more visibility on the inner structures and configuration of the messaging clusters deployed by Cue.  This exposure would allow the user additional control on a per-node configuration before and after cluster deployment.  This lends to a more hands-on deployment and configuration structure allowing the user finer level control.  On the other hand, this can lead to miss-configured and unstable clusters.&lt;br /&gt;
&lt;br /&gt;
When the user creates a new cluster (POST), the API accepts the general cluster settings and a list of &amp;quot;nodes&amp;quot; which currently only contains VM flavor (e.g. small, medium, large).  The reasoning to accept a node list of flavors even though it only makes sense to have all nodes in a cluster be the same flavor is with respect to consistency with the JSON response.  The response body contains the same structure as the request body, where the nodes list now holds additional information about the nodes in the new cluster (e.g. node id, status, flavor..).  The overall API is well positioned to expose full node by node control of Messaging clusters for the user.  For a cluster update, the user can specify exactly which node to update, add or remove.&lt;br /&gt;
&lt;br /&gt;
=== API Approach 2 Summary ===&lt;br /&gt;
&lt;br /&gt;
The second approach to the API hides per-node details in a cluster.  The API accepts configuration settings for a cluster as a whole, for example flavor and size which denote the overall node flavor and number of nodes respectively.  This design minimizes internal per-node configuration and therefore lends to a messaging deployment system that will automate the full deployment process with minimal user intervention and therefore reducing possible user related errors.&lt;br /&gt;
&lt;br /&gt;
An update to a cluster is issued by changing cluster-level parameters such as size or flavor.  For example, Cue decides which node(s) to remove in the case of a down-size.&lt;br /&gt;
&lt;br /&gt;
=== API Approach 1 Pros/Cons ===&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
! Pros !! Cons&lt;br /&gt;
|-&lt;br /&gt;
| &lt;br /&gt;
* Full exposure to node configuration and settings in a given cluster.&lt;br /&gt;
* Request and response bodies follow a consistent format with respective node list, this is then followed to end point lists in respective nodes.&lt;br /&gt;
* Per-node update control to user.&lt;br /&gt;
|| &lt;br /&gt;
* Possible confusion with current node list requiring node flavor, which have to be all the same for a given cluster.&lt;br /&gt;
* The more exposed knobs for the user, greater chance for miss-configuration and therefore cluster downtime, additional required support, etc.&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
=== API Approach 2 Pros/Cons ===&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
! Pros !! Cons&lt;br /&gt;
|-&lt;br /&gt;
| &lt;br /&gt;
* Node specific details to get a cluster up and running are managed by Cue.&lt;br /&gt;
* Minimizes chances of miss-configured clusters.&lt;br /&gt;
* In the future, node-specific configuration can be added if use cases are present.&lt;br /&gt;
|| &lt;br /&gt;
* User cannot change specific configuration on a given node.  Cue will manage any updates to nodes in cluster.&lt;br /&gt;
* Endpoint list mapping to specific node(s) not as clear.&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
=== Extending to Custom Messaging Cluster Configurations ===&lt;br /&gt;
&lt;br /&gt;
The main goal of Cue is to provide users a simple, efficient, reliable and HA cluster messaging provisioning/maintenance service.  The user-facing API should therefore allow for simple deployment of mainstream messaging clusters, while at the same time allow for the provisioning of custom (node-level) user define clusters.&lt;br /&gt;
&lt;br /&gt;
One possible approach is to keep the API configurable at the cluster-level, and allow a user-specified link to a custom configuration template file.  The configuration template file would allow the user to define fine grain cluster/node configuration.  There would be a configuration template file format for each supported messaging technology (e.g. RabbitMQ, Kafka, Qpid, etc..).  If the user does not provide an input configuration template file, Cue would use a pre-define template file for the given messaging technology.  &lt;br /&gt;
&lt;br /&gt;
This would allow the mainstream user without in-depth messaging technology knowledge the ability to quickly/easily deploy their messaging cluster, and allow power users to deploy a fully customizable cluster as per specified configuration.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
'''In summary:'''&lt;br /&gt;
* Simple API to deploy cluster-level configurable clusters&lt;br /&gt;
* API can accept an optional template configuration file for full node-level configuration&lt;br /&gt;
* One template configuration file per messaging technology supported&lt;br /&gt;
* Default template configuration file is used by Cue when one is not provided&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
'''Questions/discussions:'''&lt;br /&gt;
# Where does the user acquire the configuration template files from?&lt;/div&gt;</summary>
		<author><name>Dagnello</name></author>	</entry>

	<entry>
		<id>https://wiki.openstack.org/w/index.php?title=Cue/api1vsapi2&amp;diff=70367</id>
		<title>Cue/api1vsapi2</title>
		<link rel="alternate" type="text/html" href="https://wiki.openstack.org/w/index.php?title=Cue/api1vsapi2&amp;diff=70367"/>
				<updated>2014-12-15T20:09:18Z</updated>
		
		<summary type="html">&lt;p&gt;Dagnello: /* Extending to Custom Messaging Cluster Configurations */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;== API Approach 1 Vs API Approach 2 ==&lt;br /&gt;
&lt;br /&gt;
This page will analyze the comparison between the two main API approaches for project Cue.  &lt;br /&gt;
&lt;br /&gt;
The first approach is located here: https://wiki.openstack.org/wiki/Cue/api&lt;br /&gt;
&lt;br /&gt;
The second approach is located here: https://wiki.openstack.org/wiki/Cue/api_2&lt;br /&gt;
&lt;br /&gt;
=== API Approach 1 Summary ===&lt;br /&gt;
&lt;br /&gt;
The first approach to the API provides more visibility on the inner structures and configuration of the messaging clusters deployed by Cue.  This exposure would allow the user additional control on a per-node configuration before and after cluster deployment.  This lends to a more hands-on deployment and configuration structure allowing the user finer level control.  On the other hand, this can lead to miss-configured and unstable clusters.&lt;br /&gt;
&lt;br /&gt;
When the user creates a new cluster (POST), the API accepts the general cluster settings and a list of &amp;quot;nodes&amp;quot; which currently only contains VM flavor (e.g. small, medium, large).  The reasoning to accept a node list of flavors even though it only makes sense to have all nodes in a cluster be the same flavor is with respect to consistency with the JSON response.  The response body contains the same structure as the request body, where the nodes list now holds additional information about the nodes in the new cluster (e.g. node id, status, flavor..).  The overall API is well positioned to expose full node by node control of Messaging clusters for the user.  For a cluster update, the user can specify exactly which node to update, add or remove.&lt;br /&gt;
&lt;br /&gt;
=== API Approach 2 Summary ===&lt;br /&gt;
&lt;br /&gt;
The second approach to the API hides per-node details in a cluster.  The API accepts configuration settings for a cluster as a whole, for example flavor and size which denote the overall node flavor and number of nodes respectively.  This design minimizes internal per-node configuration and therefore lends to a messaging deployment system that will automate the full deployment process with minimal user intervention and therefore reducing possible user related errors.&lt;br /&gt;
&lt;br /&gt;
An update to a cluster is issued by changing cluster-level parameters such as size or flavor.  For example, Cue decides which node(s) to remove in the case of a down-size.&lt;br /&gt;
&lt;br /&gt;
=== API Approach 1 Pros/Cons ===&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
! Pros !! Cons&lt;br /&gt;
|-&lt;br /&gt;
| &lt;br /&gt;
* Full exposure to node configuration and settings in a given cluster.&lt;br /&gt;
* Request and response bodies follow a consistent format with respective node list, this is then followed to end point lists in respective nodes.&lt;br /&gt;
* Per-node update control to user.&lt;br /&gt;
|| &lt;br /&gt;
* Possible confusion with current node list requiring node flavor, which have to be all the same for a given cluster.&lt;br /&gt;
* The more exposed knobs for the user, greater chance for miss-configuration and therefore cluster downtime, additional required support, etc.&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
=== API Approach 2 Pros/Cons ===&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
! Pros !! Cons&lt;br /&gt;
|-&lt;br /&gt;
| &lt;br /&gt;
* Node specific details to get a cluster up and running are managed by Cue.&lt;br /&gt;
* Minimizes chances of miss-configured clusters.&lt;br /&gt;
* In the future, node-specific configuration can be added if use cases are present.&lt;br /&gt;
|| &lt;br /&gt;
* User cannot change specific configuration on a given node.  Cue will manage any updates to nodes in cluster.&lt;br /&gt;
* Endpoint list mapping to specific node(s) not as clear.&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
=== Extending to Custom Messaging Cluster Configurations ===&lt;br /&gt;
&lt;br /&gt;
The main goal of Cue is to provide users a simple, efficient, reliable and HA cluster messaging provisioning/maintenance service.  The user-facing API should therefore allow for simple deployment of mainstream messaging clusters, while at the same time allow for the provisioning of custom (node-level) user define clusters.&lt;br /&gt;
&lt;br /&gt;
One possible approach is to keep the API configurable at the cluster-level, and allow a user-specified link to a custom configuration template file.  The configuration template file would allow the user to define fine grain cluster/node configuration.  There would be a configuration template file format for each supported messaging technology (e.g. RabbitMQ, Kafka, Qpid, etc..).  If the user does not provide an input configuration template file, Cue would use a pre-define template file for the given messaging technology.  &lt;br /&gt;
&lt;br /&gt;
This would allow the mainstream user without in-depth messaging technology knowledge the ability to quickly/easily deploy their messaging cluster, and allow the power-user to deploy a fully customizable cluster as per specified configuration.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
'''In summary:'''&lt;br /&gt;
* Simple API to deploy cluster-level configurable clusters&lt;br /&gt;
* API can accept an optional template configuration file for full node-level configuration&lt;br /&gt;
* One template configuration file per messaging technology supported&lt;br /&gt;
* Default template configuration file is used by Cue when one is not provided&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
'''Questions/discussions:'''&lt;br /&gt;
# Where does the user acquire the configuration template files from?&lt;/div&gt;</summary>
		<author><name>Dagnello</name></author>	</entry>

	<entry>
		<id>https://wiki.openstack.org/w/index.php?title=Cue/api1vsapi2&amp;diff=70366</id>
		<title>Cue/api1vsapi2</title>
		<link rel="alternate" type="text/html" href="https://wiki.openstack.org/w/index.php?title=Cue/api1vsapi2&amp;diff=70366"/>
				<updated>2014-12-15T20:08:12Z</updated>
		
		<summary type="html">&lt;p&gt;Dagnello: /* Extending to Custom Messaging Cluster Configurations */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;== API Approach 1 Vs API Approach 2 ==&lt;br /&gt;
&lt;br /&gt;
This page will analyze the comparison between the two main API approaches for project Cue.  &lt;br /&gt;
&lt;br /&gt;
The first approach is located here: https://wiki.openstack.org/wiki/Cue/api&lt;br /&gt;
&lt;br /&gt;
The second approach is located here: https://wiki.openstack.org/wiki/Cue/api_2&lt;br /&gt;
&lt;br /&gt;
=== API Approach 1 Summary ===&lt;br /&gt;
&lt;br /&gt;
The first approach to the API provides more visibility on the inner structures and configuration of the messaging clusters deployed by Cue.  This exposure would allow the user additional control on a per-node configuration before and after cluster deployment.  This lends to a more hands-on deployment and configuration structure allowing the user finer level control.  On the other hand, this can lead to miss-configured and unstable clusters.&lt;br /&gt;
&lt;br /&gt;
When the user creates a new cluster (POST), the API accepts the general cluster settings and a list of &amp;quot;nodes&amp;quot; which currently only contains VM flavor (e.g. small, medium, large).  The reasoning to accept a node list of flavors even though it only makes sense to have all nodes in a cluster be the same flavor is with respect to consistency with the JSON response.  The response body contains the same structure as the request body, where the nodes list now holds additional information about the nodes in the new cluster (e.g. node id, status, flavor..).  The overall API is well positioned to expose full node by node control of Messaging clusters for the user.  For a cluster update, the user can specify exactly which node to update, add or remove.&lt;br /&gt;
&lt;br /&gt;
=== API Approach 2 Summary ===&lt;br /&gt;
&lt;br /&gt;
The second approach to the API hides per-node details in a cluster.  The API accepts configuration settings for a cluster as a whole, for example flavor and size which denote the overall node flavor and number of nodes respectively.  This design minimizes internal per-node configuration and therefore lends to a messaging deployment system that will automate the full deployment process with minimal user intervention and therefore reducing possible user related errors.&lt;br /&gt;
&lt;br /&gt;
An update to a cluster is issued by changing cluster-level parameters such as size or flavor.  For example, Cue decides which node(s) to remove in the case of a down-size.&lt;br /&gt;
&lt;br /&gt;
=== API Approach 1 Pros/Cons ===&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
! Pros !! Cons&lt;br /&gt;
|-&lt;br /&gt;
| &lt;br /&gt;
* Full exposure to node configuration and settings in a given cluster.&lt;br /&gt;
* Request and response bodies follow a consistent format with respective node list, this is then followed to end point lists in respective nodes.&lt;br /&gt;
* Per-node update control to user.&lt;br /&gt;
|| &lt;br /&gt;
* Possible confusion with current node list requiring node flavor, which have to be all the same for a given cluster.&lt;br /&gt;
* The more exposed knobs for the user, greater chance for miss-configuration and therefore cluster downtime, additional required support, etc.&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
=== API Approach 2 Pros/Cons ===&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
! Pros !! Cons&lt;br /&gt;
|-&lt;br /&gt;
| &lt;br /&gt;
* Node specific details to get a cluster up and running are managed by Cue.&lt;br /&gt;
* Minimizes chances of miss-configured clusters.&lt;br /&gt;
* In the future, node-specific configuration can be added if use cases are present.&lt;br /&gt;
|| &lt;br /&gt;
* User cannot change specific configuration on a given node.  Cue will manage any updates to nodes in cluster.&lt;br /&gt;
* Endpoint list mapping to specific node(s) not as clear.&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
=== Extending to Custom Messaging Cluster Configurations ===&lt;br /&gt;
&lt;br /&gt;
The main goal of Cue is to provide users a simple, efficient, reliable and HA cluster messaging provisioning/maintenance service.  The user-facing API should therefore allow for simple deployment of mainstream messaging clusters, while at the same time allow for the provisioning of custom (node-level) user define clusters.&lt;br /&gt;
&lt;br /&gt;
One possible approach is to keep the API configurable at the cluster-level, and allow a user-specified link to a custom configuration template file.  The configuration template file would provide the user to define fine grain cluster/node configuration.  There would be a configuration template file format for each supported messaging technology (e.g. RabbitMQ, Kafka, Qpid, etc..).  If the user does not provide an input configuration template file, Cue would use a pre-define template file for the given messaging technology.  &lt;br /&gt;
&lt;br /&gt;
This would allow the mainstream user without in-depth messaging technology knowledge the ability to quickly/easily deploy their messaging cluster, and allow the power-user to deploy a fully customizable cluster as per specified configuration.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
'''In summary:'''&lt;br /&gt;
* Simple API to deploy cluster-level configurable clusters&lt;br /&gt;
* API can accept an optional template configuration file for full node-level configuration&lt;br /&gt;
* One template configuration file per messaging technology supported&lt;br /&gt;
* Default template configuration file is used by Cue when one is not provided&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
'''Questions/discussions:'''&lt;br /&gt;
# Where does the user acquire the configuration template files from?&lt;/div&gt;</summary>
		<author><name>Dagnello</name></author>	</entry>

	<entry>
		<id>https://wiki.openstack.org/w/index.php?title=Cue/api1vsapi2&amp;diff=70365</id>
		<title>Cue/api1vsapi2</title>
		<link rel="alternate" type="text/html" href="https://wiki.openstack.org/w/index.php?title=Cue/api1vsapi2&amp;diff=70365"/>
				<updated>2014-12-15T20:08:00Z</updated>
		
		<summary type="html">&lt;p&gt;Dagnello: /* Extending to Custom Messaging Cluster Configurations */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;== API Approach 1 Vs API Approach 2 ==&lt;br /&gt;
&lt;br /&gt;
This page will analyze the comparison between the two main API approaches for project Cue.  &lt;br /&gt;
&lt;br /&gt;
The first approach is located here: https://wiki.openstack.org/wiki/Cue/api&lt;br /&gt;
&lt;br /&gt;
The second approach is located here: https://wiki.openstack.org/wiki/Cue/api_2&lt;br /&gt;
&lt;br /&gt;
=== API Approach 1 Summary ===&lt;br /&gt;
&lt;br /&gt;
The first approach to the API provides more visibility on the inner structures and configuration of the messaging clusters deployed by Cue.  This exposure would allow the user additional control on a per-node configuration before and after cluster deployment.  This lends to a more hands-on deployment and configuration structure allowing the user finer level control.  On the other hand, this can lead to miss-configured and unstable clusters.&lt;br /&gt;
&lt;br /&gt;
When the user creates a new cluster (POST), the API accepts the general cluster settings and a list of &amp;quot;nodes&amp;quot; which currently only contains VM flavor (e.g. small, medium, large).  The reasoning to accept a node list of flavors even though it only makes sense to have all nodes in a cluster be the same flavor is with respect to consistency with the JSON response.  The response body contains the same structure as the request body, where the nodes list now holds additional information about the nodes in the new cluster (e.g. node id, status, flavor..).  The overall API is well positioned to expose full node by node control of Messaging clusters for the user.  For a cluster update, the user can specify exactly which node to update, add or remove.&lt;br /&gt;
&lt;br /&gt;
=== API Approach 2 Summary ===&lt;br /&gt;
&lt;br /&gt;
The second approach to the API hides per-node details in a cluster.  The API accepts configuration settings for a cluster as a whole, for example flavor and size which denote the overall node flavor and number of nodes respectively.  This design minimizes internal per-node configuration and therefore lends to a messaging deployment system that will automate the full deployment process with minimal user intervention and therefore reducing possible user related errors.&lt;br /&gt;
&lt;br /&gt;
An update to a cluster is issued by changing cluster-level parameters such as size or flavor.  For example, Cue decides which node(s) to remove in the case of a down-size.&lt;br /&gt;
&lt;br /&gt;
=== API Approach 1 Pros/Cons ===&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
! Pros !! Cons&lt;br /&gt;
|-&lt;br /&gt;
| &lt;br /&gt;
* Full exposure to node configuration and settings in a given cluster.&lt;br /&gt;
* Request and response bodies follow a consistent format with respective node list, this is then followed to end point lists in respective nodes.&lt;br /&gt;
* Per-node update control to user.&lt;br /&gt;
|| &lt;br /&gt;
* Possible confusion with current node list requiring node flavor, which have to be all the same for a given cluster.&lt;br /&gt;
* The more exposed knobs for the user, greater chance for miss-configuration and therefore cluster downtime, additional required support, etc.&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
=== API Approach 2 Pros/Cons ===&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
! Pros !! Cons&lt;br /&gt;
|-&lt;br /&gt;
| &lt;br /&gt;
* Node specific details to get a cluster up and running are managed by Cue.&lt;br /&gt;
* Minimizes chances of miss-configured clusters.&lt;br /&gt;
* In the future, node-specific configuration can be added if use cases are present.&lt;br /&gt;
|| &lt;br /&gt;
* User cannot change specific configuration on a given node.  Cue will manage any updates to nodes in cluster.&lt;br /&gt;
* Endpoint list mapping to specific node(s) not as clear.&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
=== Extending to Custom Messaging Cluster Configurations ===&lt;br /&gt;
&lt;br /&gt;
The main goal of Cue is to provide users a simple, efficient, reliable and HA cluster messaging provisioning/maintenance service.  The user-facing API should therefore allow for simple deployment of mainstream messaging clusters, while at the same time allow for the provisioning of custom (node-level) user define clusters.&lt;br /&gt;
&lt;br /&gt;
One possible approach is to keep the API configurable at the cluster-level, and allow a user-specified link to a custom configuration template file.  The configuration template file would provide the user to define fine grain cluster/node configuration.  There would be a configuration template file format for each supported messaging technology (e.g. RabbitMQ, Kafka, Qpid, etc..).  If the user does not provide an input configuration template file, Cue would use a pre-define template file for the given messaging technology.  &lt;br /&gt;
&lt;br /&gt;
This would allow the mainstream user without in-depth messaging technology knowledge the ability to quickly/easily deploy their messaging cluster, and allow the power-user to deploy a fully customizable cluster as per specified configuration.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
'''In summary:'''&lt;br /&gt;
* Simple API to deploy cluster-level configurable clusters&lt;br /&gt;
* API can accept an optional template configuration file for full node-level configuration&lt;br /&gt;
* One template configuration file per messaging technology supported&lt;br /&gt;
* Default template configuration file is used by Cue when one is not provided&lt;br /&gt;
&lt;br /&gt;
'''Questions/discussions:'''&lt;br /&gt;
# Where does the user acquire the configuration template files from?&lt;/div&gt;</summary>
		<author><name>Dagnello</name></author>	</entry>

	<entry>
		<id>https://wiki.openstack.org/w/index.php?title=Cue/api1vsapi2&amp;diff=70364</id>
		<title>Cue/api1vsapi2</title>
		<link rel="alternate" type="text/html" href="https://wiki.openstack.org/w/index.php?title=Cue/api1vsapi2&amp;diff=70364"/>
				<updated>2014-12-15T20:07:30Z</updated>
		
		<summary type="html">&lt;p&gt;Dagnello: /* Extending to Custom Messaging Cluster Configurations */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;== API Approach 1 Vs API Approach 2 ==&lt;br /&gt;
&lt;br /&gt;
This page will analyze the comparison between the two main API approaches for project Cue.  &lt;br /&gt;
&lt;br /&gt;
The first approach is located here: https://wiki.openstack.org/wiki/Cue/api&lt;br /&gt;
&lt;br /&gt;
The second approach is located here: https://wiki.openstack.org/wiki/Cue/api_2&lt;br /&gt;
&lt;br /&gt;
=== API Approach 1 Summary ===&lt;br /&gt;
&lt;br /&gt;
The first approach to the API provides more visibility on the inner structures and configuration of the messaging clusters deployed by Cue.  This exposure would allow the user additional control on a per-node configuration before and after cluster deployment.  This lends to a more hands-on deployment and configuration structure allowing the user finer level control.  On the other hand, this can lead to miss-configured and unstable clusters.&lt;br /&gt;
&lt;br /&gt;
When the user creates a new cluster (POST), the API accepts the general cluster settings and a list of &amp;quot;nodes&amp;quot; which currently only contains VM flavor (e.g. small, medium, large).  The reasoning to accept a node list of flavors even though it only makes sense to have all nodes in a cluster be the same flavor is with respect to consistency with the JSON response.  The response body contains the same structure as the request body, where the nodes list now holds additional information about the nodes in the new cluster (e.g. node id, status, flavor..).  The overall API is well positioned to expose full node by node control of Messaging clusters for the user.  For a cluster update, the user can specify exactly which node to update, add or remove.&lt;br /&gt;
&lt;br /&gt;
=== API Approach 2 Summary ===&lt;br /&gt;
&lt;br /&gt;
The second approach to the API hides per-node details in a cluster.  The API accepts configuration settings for a cluster as a whole, for example flavor and size which denote the overall node flavor and number of nodes respectively.  This design minimizes internal per-node configuration and therefore lends to a messaging deployment system that will automate the full deployment process with minimal user intervention and therefore reducing possible user related errors.&lt;br /&gt;
&lt;br /&gt;
An update to a cluster is issued by changing cluster-level parameters such as size or flavor.  For example, Cue decides which node(s) to remove in the case of a down-size.&lt;br /&gt;
&lt;br /&gt;
=== API Approach 1 Pros/Cons ===&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
! Pros !! Cons&lt;br /&gt;
|-&lt;br /&gt;
| &lt;br /&gt;
* Full exposure to node configuration and settings in a given cluster.&lt;br /&gt;
* Request and response bodies follow a consistent format with respective node list, this is then followed to end point lists in respective nodes.&lt;br /&gt;
* Per-node update control to user.&lt;br /&gt;
|| &lt;br /&gt;
* Possible confusion with current node list requiring node flavor, which have to be all the same for a given cluster.&lt;br /&gt;
* The more exposed knobs for the user, greater chance for miss-configuration and therefore cluster downtime, additional required support, etc.&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
=== API Approach 2 Pros/Cons ===&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
! Pros !! Cons&lt;br /&gt;
|-&lt;br /&gt;
| &lt;br /&gt;
* Node specific details to get a cluster up and running are managed by Cue.&lt;br /&gt;
* Minimizes chances of miss-configured clusters.&lt;br /&gt;
* In the future, node-specific configuration can be added if use cases are present.&lt;br /&gt;
|| &lt;br /&gt;
* User cannot change specific configuration on a given node.  Cue will manage any updates to nodes in cluster.&lt;br /&gt;
* Endpoint list mapping to specific node(s) not as clear.&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
=== Extending to Custom Messaging Cluster Configurations ===&lt;br /&gt;
&lt;br /&gt;
The main goal of Cue is to provide users a simple, efficient, reliable and HA cluster messaging provisioning/maintenance service.  The user-facing API should therefore allow for simple deployment of mainstream messaging clusters, while at the same time allow for the provisioning of custom (node-level) user define clusters.&lt;br /&gt;
&lt;br /&gt;
One possible approach is to keep the API configurable at the cluster-level, and allow a user-specified link to a custom configuration template file.  The configuration template file would provide the user to define fine grain cluster/node configuration.  There would be a configuration template file format for each supported messaging technology (e.g. RabbitMQ, Kafka, Qpid, etc..).  If the user does not provide an input configuration template file, Cue would use a pre-define template file for the given messaging technology.  &lt;br /&gt;
&lt;br /&gt;
This would allow the mainstream user without in-depth messaging technology knowledge the ability to quickly/easily deploy their messaging cluster, and allow the power-user to deploy a fully customizable cluster as per specified configuration.&lt;br /&gt;
&lt;br /&gt;
In summary:&lt;br /&gt;
* Simple API to deploy cluster-level configurable clusters&lt;br /&gt;
* API can accept an optional template configuration file for full node-level configuration&lt;br /&gt;
* One template configuration file per messaging technology supported&lt;br /&gt;
* Default template configuration file is used by Cue when one is not provided&lt;br /&gt;
&lt;br /&gt;
Questions/discussions:&lt;br /&gt;
# Where does the user acquire the configuration template files from?&lt;/div&gt;</summary>
		<author><name>Dagnello</name></author>	</entry>

	<entry>
		<id>https://wiki.openstack.org/w/index.php?title=Cue/api1vsapi2&amp;diff=70363</id>
		<title>Cue/api1vsapi2</title>
		<link rel="alternate" type="text/html" href="https://wiki.openstack.org/w/index.php?title=Cue/api1vsapi2&amp;diff=70363"/>
				<updated>2014-12-15T19:57:18Z</updated>
		
		<summary type="html">&lt;p&gt;Dagnello: /* API Approach 1 Vs API Approach 2 */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;== API Approach 1 Vs API Approach 2 ==&lt;br /&gt;
&lt;br /&gt;
This page will analyze the comparison between the two main API approaches for project Cue.  &lt;br /&gt;
&lt;br /&gt;
The first approach is located here: https://wiki.openstack.org/wiki/Cue/api&lt;br /&gt;
&lt;br /&gt;
The second approach is located here: https://wiki.openstack.org/wiki/Cue/api_2&lt;br /&gt;
&lt;br /&gt;
=== API Approach 1 Summary ===&lt;br /&gt;
&lt;br /&gt;
The first approach to the API provides more visibility on the inner structures and configuration of the messaging clusters deployed by Cue.  This exposure would allow the user additional control on a per-node configuration before and after cluster deployment.  This lends to a more hands-on deployment and configuration structure allowing the user finer level control.  On the other hand, this can lead to miss-configured and unstable clusters.&lt;br /&gt;
&lt;br /&gt;
When the user creates a new cluster (POST), the API accepts the general cluster settings and a list of &amp;quot;nodes&amp;quot; which currently only contains VM flavor (e.g. small, medium, large).  The reasoning to accept a node list of flavors even though it only makes sense to have all nodes in a cluster be the same flavor is with respect to consistency with the JSON response.  The response body contains the same structure as the request body, where the nodes list now holds additional information about the nodes in the new cluster (e.g. node id, status, flavor..).  The overall API is well positioned to expose full node by node control of Messaging clusters for the user.  For a cluster update, the user can specify exactly which node to update, add or remove.&lt;br /&gt;
&lt;br /&gt;
=== API Approach 2 Summary ===&lt;br /&gt;
&lt;br /&gt;
The second approach to the API hides per-node details in a cluster.  The API accepts configuration settings for a cluster as a whole, for example flavor and size which denote the overall node flavor and number of nodes respectively.  This design minimizes internal per-node configuration and therefore lends to a messaging deployment system that will automate the full deployment process with minimal user intervention and therefore reducing possible user related errors.&lt;br /&gt;
&lt;br /&gt;
An update to a cluster is issued by changing cluster-level parameters such as size or flavor.  For example, Cue decides which node(s) to remove in the case of a down-size.&lt;br /&gt;
&lt;br /&gt;
=== API Approach 1 Pros/Cons ===&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
! Pros !! Cons&lt;br /&gt;
|-&lt;br /&gt;
| &lt;br /&gt;
* Full exposure to node configuration and settings in a given cluster.&lt;br /&gt;
* Request and response bodies follow a consistent format with respective node list, this is then followed to end point lists in respective nodes.&lt;br /&gt;
* Per-node update control to user.&lt;br /&gt;
|| &lt;br /&gt;
* Possible confusion with current node list requiring node flavor, which have to be all the same for a given cluster.&lt;br /&gt;
* The more exposed knobs for the user, greater chance for miss-configuration and therefore cluster downtime, additional required support, etc.&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
=== API Approach 2 Pros/Cons ===&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
! Pros !! Cons&lt;br /&gt;
|-&lt;br /&gt;
| &lt;br /&gt;
* Node specific details to get a cluster up and running are managed by Cue.&lt;br /&gt;
* Minimizes chances of miss-configured clusters.&lt;br /&gt;
* In the future, node-specific configuration can be added if use cases are present.&lt;br /&gt;
|| &lt;br /&gt;
* User cannot change specific configuration on a given node.  Cue will manage any updates to nodes in cluster.&lt;br /&gt;
* Endpoint list mapping to specific node(s) not as clear.&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
=== Extending to Custom Messaging Cluster Configurations ===&lt;br /&gt;
&lt;br /&gt;
The main goal of Cue is to provide users a simple, efficient, reliable and HA cluster messaging provisioning/maintenance service.  The user-facing API should therefore be simple to use to deploy mainstream messaging clusters, while at the same time have enough substance to provision custom user defined messaging clusters.  One possible approach is to keep the API configurable at the cluster-level, and allow a user-specified link to a custom configuration template file.  The configuration template file would provide the user to define fine grain cluster/node configuration.  There would be a configuration template file format for each supported messaging technology (e.g. RabbitMQ, Kafka, Qpid, etc..).  When the user does not provide an input configuration template file, Cue would use a pre-define template file for the given messaging technology.  This would allow the mainstream user without in-depth messaging technology deployment knowledge the ability to quickly/easily deploy their messaging cluster, and allow the power-user to deploy a fully customizable cluster as per specified configuration.&lt;/div&gt;</summary>
		<author><name>Dagnello</name></author>	</entry>

	<entry>
		<id>https://wiki.openstack.org/w/index.php?title=Cue/api1vsapi2&amp;diff=70360</id>
		<title>Cue/api1vsapi2</title>
		<link rel="alternate" type="text/html" href="https://wiki.openstack.org/w/index.php?title=Cue/api1vsapi2&amp;diff=70360"/>
				<updated>2014-12-15T19:30:04Z</updated>
		
		<summary type="html">&lt;p&gt;Dagnello: /* Extending to Custom Messaging Cluster Configurations */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;== API Approach 1 Vs API Approach 2 ==&lt;br /&gt;
&lt;br /&gt;
This page will analyze the comparison between the two main API approaches for project Cue.  &lt;br /&gt;
&lt;br /&gt;
The first approach is located here: https://wiki.openstack.org/wiki/Cue/api&lt;br /&gt;
&lt;br /&gt;
The second approach is located here: https://wiki.openstack.org/wiki/Cue/api_2&lt;br /&gt;
&lt;br /&gt;
=== API Approach 1 Summary ===&lt;br /&gt;
&lt;br /&gt;
The first approach to the API provides more visibility on the inner structures and configuration of the messaging clusters deployed by Cue.  This exposure would allow the user additional control on a per-node configuration before and after cluster deployment.  This lends to a more hands-on deployment and configuration structure allowing the user finer level control.  On the other hand, this can lead to miss-configured and unstable clusters.&lt;br /&gt;
&lt;br /&gt;
When the user creates a new cluster (POST), the API accepts the general cluster settings and a list of &amp;quot;nodes&amp;quot; which currently only contains VM flavor (e.g. small, medium, large).  The reasoning to accept a node list of flavors even though it only makes sense to have all nodes in a cluster be the same flavor is with respect to consistency with the JSON response.  The response body contains the same structure as the request body, where the nodes list now holds additional information about the nodes in the new cluster (e.g. node id, status, flavor..).  The overall API is well positioned to expose full node by node control of Messaging clusters for the user.  For a cluster update, the user can specify exactly which node to update, add or remove.&lt;br /&gt;
&lt;br /&gt;
=== API Approach 2 Summary ===&lt;br /&gt;
&lt;br /&gt;
The second approach to the API hides per-node details in a cluster.  The API accepts configuration settings for a cluster as a whole, for example flavor and size which denote the overall node flavor and number of nodes respectively.  This design minimizes internal per-node configuration and therefore lends to a messaging deployment system that will automate the full deployment process with minimal user intervention and therefore reducing possible user related errors.&lt;br /&gt;
&lt;br /&gt;
An update to a cluster is issued by changing cluster-level parameters such as size or flavor.  For example, Cue decides which node(s) to remove in the case of a down-size.&lt;br /&gt;
&lt;br /&gt;
=== API Approach 1 Pros/Cons ===&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
! Pros !! Cons&lt;br /&gt;
|-&lt;br /&gt;
| &lt;br /&gt;
* Full exposure to node configuration and settings in a given cluster.&lt;br /&gt;
* Request and response bodies follow a consistent format with respective node list, this is then followed to end point lists in respective nodes.&lt;br /&gt;
* Per-node update control to user.&lt;br /&gt;
|| &lt;br /&gt;
* Possible confusion with current node list requiring node flavor, which have to be all the same for a given cluster.&lt;br /&gt;
* The more exposed knobs for the user, greater chance for miss-configuration and therefore cluster downtime, additional required support, etc.&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
=== API Approach 2 Pros/Cons ===&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
! Pros !! Cons&lt;br /&gt;
|-&lt;br /&gt;
| &lt;br /&gt;
* Node specific details to get a cluster up and running are managed by Cue.&lt;br /&gt;
* Minimizes chances of miss-configured clusters.&lt;br /&gt;
* In the future, node-specific configuration can be added if use cases are present.&lt;br /&gt;
|| &lt;br /&gt;
* User cannot change specific configuration on a given node.  Cue will manage any updates to nodes in cluster.&lt;br /&gt;
* Endpoint list mapping to specific node(s) not as clear.&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
=== Extending to Custom Messaging Cluster Configurations ===&lt;/div&gt;</summary>
		<author><name>Dagnello</name></author>	</entry>

	<entry>
		<id>https://wiki.openstack.org/w/index.php?title=Cue/api1vsapi2&amp;diff=70359</id>
		<title>Cue/api1vsapi2</title>
		<link rel="alternate" type="text/html" href="https://wiki.openstack.org/w/index.php?title=Cue/api1vsapi2&amp;diff=70359"/>
				<updated>2014-12-15T19:29:38Z</updated>
		
		<summary type="html">&lt;p&gt;Dagnello: /* API Approach 1 Vs API Approach 2 */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;== API Approach 1 Vs API Approach 2 ==&lt;br /&gt;
&lt;br /&gt;
This page will analyze the comparison between the two main API approaches for project Cue.  &lt;br /&gt;
&lt;br /&gt;
The first approach is located here: https://wiki.openstack.org/wiki/Cue/api&lt;br /&gt;
&lt;br /&gt;
The second approach is located here: https://wiki.openstack.org/wiki/Cue/api_2&lt;br /&gt;
&lt;br /&gt;
=== API Approach 1 Summary ===&lt;br /&gt;
&lt;br /&gt;
The first approach to the API provides more visibility on the inner structures and configuration of the messaging clusters deployed by Cue.  This exposure would allow the user additional control on a per-node configuration before and after cluster deployment.  This lends to a more hands-on deployment and configuration structure allowing the user finer level control.  On the other hand, this can lead to miss-configured and unstable clusters.&lt;br /&gt;
&lt;br /&gt;
When the user creates a new cluster (POST), the API accepts the general cluster settings and a list of &amp;quot;nodes&amp;quot; which currently only contains VM flavor (e.g. small, medium, large).  The reasoning to accept a node list of flavors even though it only makes sense to have all nodes in a cluster be the same flavor is with respect to consistency with the JSON response.  The response body contains the same structure as the request body, where the nodes list now holds additional information about the nodes in the new cluster (e.g. node id, status, flavor..).  The overall API is well positioned to expose full node by node control of Messaging clusters for the user.  For a cluster update, the user can specify exactly which node to update, add or remove.&lt;br /&gt;
&lt;br /&gt;
=== API Approach 2 Summary ===&lt;br /&gt;
&lt;br /&gt;
The second approach to the API hides per-node details in a cluster.  The API accepts configuration settings for a cluster as a whole, for example flavor and size which denote the overall node flavor and number of nodes respectively.  This design minimizes internal per-node configuration and therefore lends to a messaging deployment system that will automate the full deployment process with minimal user intervention and therefore reducing possible user related errors.&lt;br /&gt;
&lt;br /&gt;
An update to a cluster is issued by changing cluster-level parameters such as size or flavor.  For example, Cue decides which node(s) to remove in the case of a down-size.&lt;br /&gt;
&lt;br /&gt;
=== API Approach 1 Pros/Cons ===&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
! Pros !! Cons&lt;br /&gt;
|-&lt;br /&gt;
| &lt;br /&gt;
* Full exposure to node configuration and settings in a given cluster.&lt;br /&gt;
* Request and response bodies follow a consistent format with respective node list, this is then followed to end point lists in respective nodes.&lt;br /&gt;
* Per-node update control to user.&lt;br /&gt;
|| &lt;br /&gt;
* Possible confusion with current node list requiring node flavor, which have to be all the same for a given cluster.&lt;br /&gt;
* The more exposed knobs for the user, greater chance for miss-configuration and therefore cluster downtime, additional required support, etc.&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
=== API Approach 2 Pros/Cons ===&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
! Pros !! Cons&lt;br /&gt;
|-&lt;br /&gt;
| &lt;br /&gt;
* Node specific details to get a cluster up and running are managed by Cue.&lt;br /&gt;
* Minimizes chances of miss-configured clusters.&lt;br /&gt;
* In the future, node-specific configuration can be added if use cases are present.&lt;br /&gt;
|| &lt;br /&gt;
* User cannot change specific configuration on a given node.  Cue will manage any updates to nodes in cluster.&lt;br /&gt;
* Endpoint list mapping to specific node(s) not as clear.&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
== Extending to Custom Messaging Cluster Configurations ==&lt;/div&gt;</summary>
		<author><name>Dagnello</name></author>	</entry>

	<entry>
		<id>https://wiki.openstack.org/w/index.php?title=Cue/api1vsapi2&amp;diff=70353</id>
		<title>Cue/api1vsapi2</title>
		<link rel="alternate" type="text/html" href="https://wiki.openstack.org/w/index.php?title=Cue/api1vsapi2&amp;diff=70353"/>
				<updated>2014-12-15T17:13:12Z</updated>
		
		<summary type="html">&lt;p&gt;Dagnello: /* API Approach 2 Pros/Cons */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;== API Approach 1 Vs API Approach 2 ==&lt;br /&gt;
&lt;br /&gt;
This page will analyze the comparison between the two main API approaches for project Cue.  &lt;br /&gt;
&lt;br /&gt;
The first approach is located here: https://wiki.openstack.org/wiki/Cue/api&lt;br /&gt;
&lt;br /&gt;
The second approach is located here: https://wiki.openstack.org/wiki/Cue/api_2&lt;br /&gt;
&lt;br /&gt;
=== API Approach 1 Summary ===&lt;br /&gt;
&lt;br /&gt;
The first approach to the API provides more visibility on the inner structures and configuration of the messaging clusters deployed by Cue.  This exposure would allow the user additional control on a per-node configuration before and after cluster deployment.  This lends to a more hands-on deployment and configuration structure allowing the user finer level control.  On the other hand, this can lead to miss-configured and unstable clusters.&lt;br /&gt;
&lt;br /&gt;
When the user creates a new cluster (POST), the API accepts the general cluster settings and a list of &amp;quot;nodes&amp;quot; which currently only contains VM flavor (e.g. small, medium, large).  The reasoning to accept a node list of flavors even though it only makes sense to have all nodes in a cluster be the same flavor is with respect to consistency with the JSON response.  The response body contains the same structure as the request body, where the nodes list now holds additional information about the nodes in the new cluster (e.g. node id, status, flavor..).  The overall API is well positioned to expose full node by node control of Messaging clusters for the user.  For a cluster update, the user can specify exactly which node to update, add or remove.&lt;br /&gt;
&lt;br /&gt;
=== API Approach 2 Summary ===&lt;br /&gt;
&lt;br /&gt;
The second approach to the API hides per-node details in a cluster.  The API accepts configuration settings for a cluster as a whole, for example flavor and size which denote the overall node flavor and number of nodes respectively.  This design minimizes internal per-node configuration and therefore lends to a messaging deployment system that will automate the full deployment process with minimal user intervention and therefore reducing possible user related errors.&lt;br /&gt;
&lt;br /&gt;
An update to a cluster is issued by changing cluster-level parameters such as size or flavor.  For example, Cue decides which node(s) to remove in the case of a down-size.&lt;br /&gt;
&lt;br /&gt;
=== API Approach 1 Pros/Cons ===&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
! Pros !! Cons&lt;br /&gt;
|-&lt;br /&gt;
| &lt;br /&gt;
* Full exposure to node configuration and settings in a given cluster.&lt;br /&gt;
* Request and response bodies follow a consistent format with respective node list, this is then followed to end point lists in respective nodes.&lt;br /&gt;
* Per-node update control to user.&lt;br /&gt;
|| &lt;br /&gt;
* Possible confusion with current node list requiring node flavor, which have to be all the same for a given cluster.&lt;br /&gt;
* The more exposed knobs for the user, greater chance for miss-configuration and therefore cluster downtime, additional required support, etc.&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
=== API Approach 2 Pros/Cons ===&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
! Pros !! Cons&lt;br /&gt;
|-&lt;br /&gt;
| &lt;br /&gt;
* Node specific details to get a cluster up and running are managed by Cue.&lt;br /&gt;
* Minimizes chances of miss-configured clusters.&lt;br /&gt;
* In the future, node-specific configuration can be added if use cases are present.&lt;br /&gt;
|| &lt;br /&gt;
* User cannot change specific configuration on a given node.  Cue will manage any updates to nodes in cluster.&lt;br /&gt;
* Endpoint list mapping to specific node(s) not as clear.&lt;br /&gt;
|}&lt;/div&gt;</summary>
		<author><name>Dagnello</name></author>	</entry>

	<entry>
		<id>https://wiki.openstack.org/w/index.php?title=Cue/api1vsapi2&amp;diff=70352</id>
		<title>Cue/api1vsapi2</title>
		<link rel="alternate" type="text/html" href="https://wiki.openstack.org/w/index.php?title=Cue/api1vsapi2&amp;diff=70352"/>
				<updated>2014-12-15T17:11:43Z</updated>
		
		<summary type="html">&lt;p&gt;Dagnello: /* API Approach 2 Summary */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;== API Approach 1 Vs API Approach 2 ==&lt;br /&gt;
&lt;br /&gt;
This page will analyze the comparison between the two main API approaches for project Cue.  &lt;br /&gt;
&lt;br /&gt;
The first approach is located here: https://wiki.openstack.org/wiki/Cue/api&lt;br /&gt;
&lt;br /&gt;
The second approach is located here: https://wiki.openstack.org/wiki/Cue/api_2&lt;br /&gt;
&lt;br /&gt;
=== API Approach 1 Summary ===&lt;br /&gt;
&lt;br /&gt;
The first approach to the API provides more visibility on the inner structures and configuration of the messaging clusters deployed by Cue.  This exposure would allow the user additional control on a per-node configuration before and after cluster deployment.  This lends to a more hands-on deployment and configuration structure allowing the user finer level control.  On the other hand, this can lead to miss-configured and unstable clusters.&lt;br /&gt;
&lt;br /&gt;
When the user creates a new cluster (POST), the API accepts the general cluster settings and a list of &amp;quot;nodes&amp;quot; which currently only contains VM flavor (e.g. small, medium, large).  The reasoning to accept a node list of flavors even though it only makes sense to have all nodes in a cluster be the same flavor is with respect to consistency with the JSON response.  The response body contains the same structure as the request body, where the nodes list now holds additional information about the nodes in the new cluster (e.g. node id, status, flavor..).  The overall API is well positioned to expose full node by node control of Messaging clusters for the user.  For a cluster update, the user can specify exactly which node to update, add or remove.&lt;br /&gt;
&lt;br /&gt;
=== API Approach 2 Summary ===&lt;br /&gt;
&lt;br /&gt;
The second approach to the API hides per-node details in a cluster.  The API accepts configuration settings for a cluster as a whole, for example flavor and size which denote the overall node flavor and number of nodes respectively.  This design minimizes internal per-node configuration and therefore lends to a messaging deployment system that will automate the full deployment process with minimal user intervention and therefore reducing possible user related errors.&lt;br /&gt;
&lt;br /&gt;
An update to a cluster is issued by changing cluster-level parameters such as size or flavor.  For example, Cue decides which node(s) to remove in the case of a down-size.&lt;br /&gt;
&lt;br /&gt;
=== API Approach 1 Pros/Cons ===&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
! Pros !! Cons&lt;br /&gt;
|-&lt;br /&gt;
| &lt;br /&gt;
* Full exposure to node configuration and settings in a given cluster.&lt;br /&gt;
* Request and response bodies follow a consistent format with respective node list, this is then followed to end point lists in respective nodes.&lt;br /&gt;
* Per-node update control to user.&lt;br /&gt;
|| &lt;br /&gt;
* Possible confusion with current node list requiring node flavor, which have to be all the same for a given cluster.&lt;br /&gt;
* The more exposed knobs for the user, greater chance for miss-configuration and therefore cluster downtime, additional required support, etc.&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
=== API Approach 2 Pros/Cons ===&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
! Pros !! Cons&lt;br /&gt;
|-&lt;br /&gt;
| &lt;br /&gt;
* Node specific details to get a cluster up and running are managed by Cue.&lt;br /&gt;
* Minimizes chances of miss-configured clusters.&lt;br /&gt;
|| &lt;br /&gt;
* User cannot change specific configuration on a given node.  Cue will manage any updates to nodes in cluster.&lt;br /&gt;
* Endpoint list mapping to specific node(s) not as clear.&lt;br /&gt;
|}&lt;/div&gt;</summary>
		<author><name>Dagnello</name></author>	</entry>

	<entry>
		<id>https://wiki.openstack.org/w/index.php?title=Cue/api1vsapi2&amp;diff=70351</id>
		<title>Cue/api1vsapi2</title>
		<link rel="alternate" type="text/html" href="https://wiki.openstack.org/w/index.php?title=Cue/api1vsapi2&amp;diff=70351"/>
				<updated>2014-12-15T17:10:21Z</updated>
		
		<summary type="html">&lt;p&gt;Dagnello: /* API Approach 1 Vs API Approach 2 */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;== API Approach 1 Vs API Approach 2 ==&lt;br /&gt;
&lt;br /&gt;
This page will analyze the comparison between the two main API approaches for project Cue.  &lt;br /&gt;
&lt;br /&gt;
The first approach is located here: https://wiki.openstack.org/wiki/Cue/api&lt;br /&gt;
&lt;br /&gt;
The second approach is located here: https://wiki.openstack.org/wiki/Cue/api_2&lt;br /&gt;
&lt;br /&gt;
=== API Approach 1 Summary ===&lt;br /&gt;
&lt;br /&gt;
The first approach to the API provides more visibility on the inner structures and configuration of the messaging clusters deployed by Cue.  This exposure would allow the user additional control on a per-node configuration before and after cluster deployment.  This lends to a more hands-on deployment and configuration structure allowing the user finer level control.  On the other hand, this can lead to miss-configured and unstable clusters.&lt;br /&gt;
&lt;br /&gt;
When the user creates a new cluster (POST), the API accepts the general cluster settings and a list of &amp;quot;nodes&amp;quot; which currently only contains VM flavor (e.g. small, medium, large).  The reasoning to accept a node list of flavors even though it only makes sense to have all nodes in a cluster be the same flavor is with respect to consistency with the JSON response.  The response body contains the same structure as the request body, where the nodes list now holds additional information about the nodes in the new cluster (e.g. node id, status, flavor..).  The overall API is well positioned to expose full node by node control of Messaging clusters for the user.  For a cluster update, the user can specify exactly which node to update, add or remove.&lt;br /&gt;
&lt;br /&gt;
=== API Approach 2 Summary ===&lt;br /&gt;
&lt;br /&gt;
The second approach to the API hides per-node details in a cluster.  The API accepts configuration settings for a cluster as a whole, for example flavor and size which denote the overall node flavor and number of nodes respectively.  This design minimizes internal per-node configuration and therefore lends to a messaging deployment system that will automate the full deployment process with minimal user intervention and therefore reducing possible user related errors.&lt;br /&gt;
&lt;br /&gt;
An update to a cluster is issued by changing cluster-level parameters such as size or flavor, for example, Cue would then decide and figure out which node(s) to remove in the case of a down-size.&lt;br /&gt;
&lt;br /&gt;
=== API Approach 1 Pros/Cons ===&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
! Pros !! Cons&lt;br /&gt;
|-&lt;br /&gt;
| &lt;br /&gt;
* Full exposure to node configuration and settings in a given cluster.&lt;br /&gt;
* Request and response bodies follow a consistent format with respective node list, this is then followed to end point lists in respective nodes.&lt;br /&gt;
* Per-node update control to user.&lt;br /&gt;
|| &lt;br /&gt;
* Possible confusion with current node list requiring node flavor, which have to be all the same for a given cluster.&lt;br /&gt;
* The more exposed knobs for the user, greater chance for miss-configuration and therefore cluster downtime, additional required support, etc.&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
=== API Approach 2 Pros/Cons ===&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
! Pros !! Cons&lt;br /&gt;
|-&lt;br /&gt;
| &lt;br /&gt;
* Node specific details to get a cluster up and running are managed by Cue.&lt;br /&gt;
* Minimizes chances of miss-configured clusters.&lt;br /&gt;
|| &lt;br /&gt;
* User cannot change specific configuration on a given node.  Cue will manage any updates to nodes in cluster.&lt;br /&gt;
* Endpoint list mapping to specific node(s) not as clear.&lt;br /&gt;
|}&lt;/div&gt;</summary>
		<author><name>Dagnello</name></author>	</entry>

	<entry>
		<id>https://wiki.openstack.org/w/index.php?title=Cue/api1vsapi2&amp;diff=70313</id>
		<title>Cue/api1vsapi2</title>
		<link rel="alternate" type="text/html" href="https://wiki.openstack.org/w/index.php?title=Cue/api1vsapi2&amp;diff=70313"/>
				<updated>2014-12-15T01:29:38Z</updated>
		
		<summary type="html">&lt;p&gt;Dagnello: /* API Approach 2 Summary */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;== API Approach 1 Vs API Approach 2 ==&lt;br /&gt;
&lt;br /&gt;
This page will analyze the comparison between the two main API approaches for project Cue.  &lt;br /&gt;
&lt;br /&gt;
The first approach is located here: https://wiki.openstack.org/wiki/Cue/api&lt;br /&gt;
&lt;br /&gt;
The second approach is located here: https://wiki.openstack.org/wiki/Cue/api_2&lt;br /&gt;
&lt;br /&gt;
=== API Approach 1 Summary ===&lt;br /&gt;
&lt;br /&gt;
The first approach to the API provides more visibility on the inner structures and configuration of the messaging clusters deployed by Cue.  This exposure would allow the user additional control on a per-node configuration before and after cluster deployment.  This lends to a more hands-on deployment and configuration structure allowing the user finer level control.  On the other hand, this can lead to miss-configured and unstable clusters.&lt;br /&gt;
&lt;br /&gt;
When the user creates a new cluster (POST), the API accepts the general cluster settings and a list of &amp;quot;nodes&amp;quot; which currently only contains VM flavor (e.g. small, medium, large).  The reasoning to accept a node list of flavors even though it only makes sense to have all nodes in a cluster be the same flavor is with respect to consistency with the JSON response.  The response body contains the same structure as the request body, where the nodes list now holds additional information about the nodes in the new cluster (e.g. node id, status, flavor..).  The overall API is well positioned to expose full node by node control of Messaging clusters for the user.&lt;br /&gt;
&lt;br /&gt;
=== API Approach 2 Summary ===&lt;br /&gt;
&lt;br /&gt;
The second approach to the API hides per-node details in a cluster.  The API accepts configuration settings for a cluster as a whole, for example flavor and size which denote the node flavor and number of nodes respectively.  This design minimizes internal per-node specific configuration to the user and therefore lends well for a messaging deployment system that will&lt;br /&gt;
&lt;br /&gt;
=== API Approach 1 Pros/Cons ===&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
! Pros !! Cons&lt;br /&gt;
|-&lt;br /&gt;
| &lt;br /&gt;
* &lt;br /&gt;
|| &lt;br /&gt;
* &lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
=== API Approach 2 Pros/Cons ===&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
! Pros !! Cons&lt;br /&gt;
|-&lt;br /&gt;
| &lt;br /&gt;
* &lt;br /&gt;
|| &lt;br /&gt;
* &lt;br /&gt;
|}&lt;/div&gt;</summary>
		<author><name>Dagnello</name></author>	</entry>

	<entry>
		<id>https://wiki.openstack.org/w/index.php?title=Cue/api1vsapi2&amp;diff=70312</id>
		<title>Cue/api1vsapi2</title>
		<link rel="alternate" type="text/html" href="https://wiki.openstack.org/w/index.php?title=Cue/api1vsapi2&amp;diff=70312"/>
				<updated>2014-12-15T01:06:01Z</updated>
		
		<summary type="html">&lt;p&gt;Dagnello: /* API Approach 2 Pros/Cons */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;== API Approach 1 Vs API Approach 2 ==&lt;br /&gt;
&lt;br /&gt;
This page will analyze the comparison between the two main API approaches for project Cue.  &lt;br /&gt;
&lt;br /&gt;
The first approach is located here: https://wiki.openstack.org/wiki/Cue/api&lt;br /&gt;
&lt;br /&gt;
The second approach is located here: https://wiki.openstack.org/wiki/Cue/api_2&lt;br /&gt;
&lt;br /&gt;
=== API Approach 1 Summary ===&lt;br /&gt;
&lt;br /&gt;
The first approach to the API provides more visibility on the inner structures and configuration of the messaging clusters deployed by Cue.  This exposure would allow the user additional control on a per-node configuration before and after cluster deployment.  This lends to a more hands-on deployment and configuration structure allowing the user finer level control.  On the other hand, this can lead to miss-configured and unstable clusters.&lt;br /&gt;
&lt;br /&gt;
When the user creates a new cluster (POST), the API accepts the general cluster settings and a list of &amp;quot;nodes&amp;quot; which currently only contains VM flavor (e.g. small, medium, large).  The reasoning to accept a node list of flavors even though it only makes sense to have all nodes in a cluster be the same flavor is with respect to consistency with the JSON response.  The response body contains the same structure as the request body, where the nodes list now holds additional information about the nodes in the new cluster (e.g. node id, status, flavor..).  The overall API is well positioned to expose full node by node control of Messaging clusters for the user.&lt;br /&gt;
&lt;br /&gt;
=== API Approach 2 Summary ===&lt;br /&gt;
&lt;br /&gt;
=== API Approach 1 Pros/Cons ===&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
! Pros !! Cons&lt;br /&gt;
|-&lt;br /&gt;
| &lt;br /&gt;
* &lt;br /&gt;
|| &lt;br /&gt;
* &lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
=== API Approach 2 Pros/Cons ===&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
! Pros !! Cons&lt;br /&gt;
|-&lt;br /&gt;
| &lt;br /&gt;
* &lt;br /&gt;
|| &lt;br /&gt;
* &lt;br /&gt;
|}&lt;/div&gt;</summary>
		<author><name>Dagnello</name></author>	</entry>

	<entry>
		<id>https://wiki.openstack.org/w/index.php?title=Cue/api1vsapi2&amp;diff=70311</id>
		<title>Cue/api1vsapi2</title>
		<link rel="alternate" type="text/html" href="https://wiki.openstack.org/w/index.php?title=Cue/api1vsapi2&amp;diff=70311"/>
				<updated>2014-12-15T01:05:42Z</updated>
		
		<summary type="html">&lt;p&gt;Dagnello: /* API Approach 1 Pros/Cons */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;== API Approach 1 Vs API Approach 2 ==&lt;br /&gt;
&lt;br /&gt;
This page will analyze the comparison between the two main API approaches for project Cue.  &lt;br /&gt;
&lt;br /&gt;
The first approach is located here: https://wiki.openstack.org/wiki/Cue/api&lt;br /&gt;
&lt;br /&gt;
The second approach is located here: https://wiki.openstack.org/wiki/Cue/api_2&lt;br /&gt;
&lt;br /&gt;
=== API Approach 1 Summary ===&lt;br /&gt;
&lt;br /&gt;
The first approach to the API provides more visibility on the inner structures and configuration of the messaging clusters deployed by Cue.  This exposure would allow the user additional control on a per-node configuration before and after cluster deployment.  This lends to a more hands-on deployment and configuration structure allowing the user finer level control.  On the other hand, this can lead to miss-configured and unstable clusters.&lt;br /&gt;
&lt;br /&gt;
When the user creates a new cluster (POST), the API accepts the general cluster settings and a list of &amp;quot;nodes&amp;quot; which currently only contains VM flavor (e.g. small, medium, large).  The reasoning to accept a node list of flavors even though it only makes sense to have all nodes in a cluster be the same flavor is with respect to consistency with the JSON response.  The response body contains the same structure as the request body, where the nodes list now holds additional information about the nodes in the new cluster (e.g. node id, status, flavor..).  The overall API is well positioned to expose full node by node control of Messaging clusters for the user.&lt;br /&gt;
&lt;br /&gt;
=== API Approach 2 Summary ===&lt;br /&gt;
&lt;br /&gt;
=== API Approach 1 Pros/Cons ===&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
! Pros !! Cons&lt;br /&gt;
|-&lt;br /&gt;
| &lt;br /&gt;
* &lt;br /&gt;
|| &lt;br /&gt;
* &lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
=== API Approach 2 Pros/Cons ===&lt;/div&gt;</summary>
		<author><name>Dagnello</name></author>	</entry>

	<entry>
		<id>https://wiki.openstack.org/w/index.php?title=Cue/api1vsapi2&amp;diff=70310</id>
		<title>Cue/api1vsapi2</title>
		<link rel="alternate" type="text/html" href="https://wiki.openstack.org/w/index.php?title=Cue/api1vsapi2&amp;diff=70310"/>
				<updated>2014-12-15T01:05:29Z</updated>
		
		<summary type="html">&lt;p&gt;Dagnello: /* API Approach 2 Summary */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;== API Approach 1 Vs API Approach 2 ==&lt;br /&gt;
&lt;br /&gt;
This page will analyze the comparison between the two main API approaches for project Cue.  &lt;br /&gt;
&lt;br /&gt;
The first approach is located here: https://wiki.openstack.org/wiki/Cue/api&lt;br /&gt;
&lt;br /&gt;
The second approach is located here: https://wiki.openstack.org/wiki/Cue/api_2&lt;br /&gt;
&lt;br /&gt;
=== API Approach 1 Summary ===&lt;br /&gt;
&lt;br /&gt;
The first approach to the API provides more visibility on the inner structures and configuration of the messaging clusters deployed by Cue.  This exposure would allow the user additional control on a per-node configuration before and after cluster deployment.  This lends to a more hands-on deployment and configuration structure allowing the user finer level control.  On the other hand, this can lead to miss-configured and unstable clusters.&lt;br /&gt;
&lt;br /&gt;
When the user creates a new cluster (POST), the API accepts the general cluster settings and a list of &amp;quot;nodes&amp;quot; which currently only contains VM flavor (e.g. small, medium, large).  The reasoning to accept a node list of flavors even though it only makes sense to have all nodes in a cluster be the same flavor is with respect to consistency with the JSON response.  The response body contains the same structure as the request body, where the nodes list now holds additional information about the nodes in the new cluster (e.g. node id, status, flavor..).  The overall API is well positioned to expose full node by node control of Messaging clusters for the user.&lt;br /&gt;
&lt;br /&gt;
=== API Approach 2 Summary ===&lt;br /&gt;
&lt;br /&gt;
=== API Approach 1 Pros/Cons ===&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
! Pros !! Cons&lt;br /&gt;
|-&lt;br /&gt;
| &lt;br /&gt;
* Example &lt;br /&gt;
|| &lt;br /&gt;
* Example&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
=== API Approach 2 Pros/Cons ===&lt;/div&gt;</summary>
		<author><name>Dagnello</name></author>	</entry>

	<entry>
		<id>https://wiki.openstack.org/w/index.php?title=Cue/api1vsapi2&amp;diff=70309</id>
		<title>Cue/api1vsapi2</title>
		<link rel="alternate" type="text/html" href="https://wiki.openstack.org/w/index.php?title=Cue/api1vsapi2&amp;diff=70309"/>
				<updated>2014-12-15T01:04:46Z</updated>
		
		<summary type="html">&lt;p&gt;Dagnello: /* API Approach 1 Summary */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;== API Approach 1 Vs API Approach 2 ==&lt;br /&gt;
&lt;br /&gt;
This page will analyze the comparison between the two main API approaches for project Cue.  &lt;br /&gt;
&lt;br /&gt;
The first approach is located here: https://wiki.openstack.org/wiki/Cue/api&lt;br /&gt;
&lt;br /&gt;
The second approach is located here: https://wiki.openstack.org/wiki/Cue/api_2&lt;br /&gt;
&lt;br /&gt;
=== API Approach 1 Summary ===&lt;br /&gt;
&lt;br /&gt;
The first approach to the API provides more visibility on the inner structures and configuration of the messaging clusters deployed by Cue.  This exposure would allow the user additional control on a per-node configuration before and after cluster deployment.  This lends to a more hands-on deployment and configuration structure allowing the user finer level control.  On the other hand, this can lead to miss-configured and unstable clusters.&lt;br /&gt;
&lt;br /&gt;
When the user creates a new cluster (POST), the API accepts the general cluster settings and a list of &amp;quot;nodes&amp;quot; which currently only contains VM flavor (e.g. small, medium, large).  The reasoning to accept a node list of flavors even though it only makes sense to have all nodes in a cluster be the same flavor is with respect to consistency with the JSON response.  The response body contains the same structure as the request body, where the nodes list now holds additional information about the nodes in the new cluster (e.g. node id, status, flavor..).  The overall API is well positioned to expose full node by node control of Messaging clusters for the user.&lt;br /&gt;
&lt;br /&gt;
=== API Approach 2 Summary ===&lt;br /&gt;
&lt;br /&gt;
The second &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=== API Approach 1 Pros/Cons ===&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
! Pros !! Cons&lt;br /&gt;
|-&lt;br /&gt;
| &lt;br /&gt;
* Example &lt;br /&gt;
|| &lt;br /&gt;
* Example&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
=== API Approach 2 Pros/Cons ===&lt;/div&gt;</summary>
		<author><name>Dagnello</name></author>	</entry>

	<entry>
		<id>https://wiki.openstack.org/w/index.php?title=Cue/api1vsapi2&amp;diff=70308</id>
		<title>Cue/api1vsapi2</title>
		<link rel="alternate" type="text/html" href="https://wiki.openstack.org/w/index.php?title=Cue/api1vsapi2&amp;diff=70308"/>
				<updated>2014-12-15T01:03:48Z</updated>
		
		<summary type="html">&lt;p&gt;Dagnello: /* API Approach 1 Summary */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;== API Approach 1 Vs API Approach 2 ==&lt;br /&gt;
&lt;br /&gt;
This page will analyze the comparison between the two main API approaches for project Cue.  &lt;br /&gt;
&lt;br /&gt;
The first approach is located here: https://wiki.openstack.org/wiki/Cue/api&lt;br /&gt;
&lt;br /&gt;
The second approach is located here: https://wiki.openstack.org/wiki/Cue/api_2&lt;br /&gt;
&lt;br /&gt;
=== API Approach 1 Summary ===&lt;br /&gt;
&lt;br /&gt;
The first approach to the API provides more visibility on the inner structures and configuration of the messaging clusters deployed by Cue.  This exposure would allow the user additional control on a per-node configuration before and after cluster deployment.  This lends to a more hands-on deployment and configuration structure allowing the user finer level control.  On the other hand, this can lead to miss-configured and unstable clusters.&lt;br /&gt;
&lt;br /&gt;
When the user creates a new cluster (POST), the API accepts the general cluster settings and a list of &amp;quot;nodes&amp;quot; which currently only contains VM flavor (e.g. small, medium, large).  The reasoning to accept a node list of flavors even though it only makes sense to have all nodes in a cluster to have the same flavor is with respect to consistency with the JSON response.  The response body contains the same structure as the request body, where the nodes list now holds additional information about the nodes in the new cluster (e.g. node id, status, flavor..).  The overall API is well positioned to expose full node by node control of Messaging clusters for the user.&lt;br /&gt;
&lt;br /&gt;
=== API Approach 2 Summary ===&lt;br /&gt;
&lt;br /&gt;
The second &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=== API Approach 1 Pros/Cons ===&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
! Pros !! Cons&lt;br /&gt;
|-&lt;br /&gt;
| &lt;br /&gt;
* Example &lt;br /&gt;
|| &lt;br /&gt;
* Example&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
=== API Approach 2 Pros/Cons ===&lt;/div&gt;</summary>
		<author><name>Dagnello</name></author>	</entry>

	<entry>
		<id>https://wiki.openstack.org/w/index.php?title=Cue/api1vsapi2&amp;diff=70307</id>
		<title>Cue/api1vsapi2</title>
		<link rel="alternate" type="text/html" href="https://wiki.openstack.org/w/index.php?title=Cue/api1vsapi2&amp;diff=70307"/>
				<updated>2014-12-15T01:02:58Z</updated>
		
		<summary type="html">&lt;p&gt;Dagnello: /* API Approach 1 Summary */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;== API Approach 1 Vs API Approach 2 ==&lt;br /&gt;
&lt;br /&gt;
This page will analyze the comparison between the two main API approaches for project Cue.  &lt;br /&gt;
&lt;br /&gt;
The first approach is located here: https://wiki.openstack.org/wiki/Cue/api&lt;br /&gt;
&lt;br /&gt;
The second approach is located here: https://wiki.openstack.org/wiki/Cue/api_2&lt;br /&gt;
&lt;br /&gt;
=== API Approach 1 Summary ===&lt;br /&gt;
&lt;br /&gt;
The first approach to the API provides more visibility on the inner structures and configuration of the messaging clusters deployed by Cue.  This exposure would allow the user additional control on a per-node configuration before and after cluster deployment.  This lends to a more hands-on deployment and configuration structure allowing the user finer level control.  On the other hand, this can lead to miss-configured, unstable clusters and an overall poor user experience.&lt;br /&gt;
&lt;br /&gt;
When the user creates a new cluster (POST), the API accepts the general cluster settings and a list of &amp;quot;nodes&amp;quot; which currently only contains VM flavor (e.g. small, medium, large).  The reasoning to accept a node list of flavors even though it only makes sense to have all nodes in a cluster to have the same flavor is with respect to consistency with the JSON response.  The response body contains the same structure as the request body, where the nodes list now holds additional information about the nodes in the new cluster (e.g. node id, status, flavor..).  The overall API is well positioned to expose full node by node control of Messaging clusters for the user.&lt;br /&gt;
&lt;br /&gt;
=== API Approach 2 Summary ===&lt;br /&gt;
&lt;br /&gt;
The second &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=== API Approach 1 Pros/Cons ===&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
! Pros !! Cons&lt;br /&gt;
|-&lt;br /&gt;
| &lt;br /&gt;
* Example &lt;br /&gt;
|| &lt;br /&gt;
* Example&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
=== API Approach 2 Pros/Cons ===&lt;/div&gt;</summary>
		<author><name>Dagnello</name></author>	</entry>

	<entry>
		<id>https://wiki.openstack.org/w/index.php?title=Cue/api1vsapi2&amp;diff=70306</id>
		<title>Cue/api1vsapi2</title>
		<link rel="alternate" type="text/html" href="https://wiki.openstack.org/w/index.php?title=Cue/api1vsapi2&amp;diff=70306"/>
				<updated>2014-12-15T01:02:21Z</updated>
		
		<summary type="html">&lt;p&gt;Dagnello: /* API Approach 1 Vs API Approach 2 */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;== API Approach 1 Vs API Approach 2 ==&lt;br /&gt;
&lt;br /&gt;
This page will analyze the comparison between the two main API approaches for project Cue.  &lt;br /&gt;
&lt;br /&gt;
The first approach is located here: https://wiki.openstack.org/wiki/Cue/api&lt;br /&gt;
&lt;br /&gt;
The second approach is located here: https://wiki.openstack.org/wiki/Cue/api_2&lt;br /&gt;
&lt;br /&gt;
=== API Approach 1 Summary ===&lt;br /&gt;
&lt;br /&gt;
The first approach to the API for project Cue provides more visibility on the inner structures and configuration of the messaging clusters deployed by Cue.  This exposure would allow the user additional control on a per-node configuration before and after cluster deployment.  This lends to a more hands-on deployment and configuration structure allowing the user finer level control.  On the other hand, this can lead to miss-configured, unstable clusters and an overall poor user experience.&lt;br /&gt;
&lt;br /&gt;
When the user creates a new cluster (POST), the API accepts the general cluster settings and a list of &amp;quot;nodes&amp;quot; which currently only contains VM flavor (e.g. small, medium, large).  The reasoning to accept a node list of flavors even though it only makes sense to have all nodes in a cluster to have the same flavor is with respect to consistency with the JSON response.  The response body contains the same structure as the request body, where the nodes list now holds additional information about the nodes in the new cluster (e.g. node id, status, flavor..).  The overall API is well positioned to expose full node by node control of Messaging clusters for the user.&lt;br /&gt;
&lt;br /&gt;
=== API Approach 2 Summary ===&lt;br /&gt;
&lt;br /&gt;
The second &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=== API Approach 1 Pros/Cons ===&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
! Pros !! Cons&lt;br /&gt;
|-&lt;br /&gt;
| &lt;br /&gt;
* Example &lt;br /&gt;
|| &lt;br /&gt;
* Example&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
=== API Approach 2 Pros/Cons ===&lt;/div&gt;</summary>
		<author><name>Dagnello</name></author>	</entry>

	<entry>
		<id>https://wiki.openstack.org/w/index.php?title=Cue/api1vsapi2&amp;diff=70305</id>
		<title>Cue/api1vsapi2</title>
		<link rel="alternate" type="text/html" href="https://wiki.openstack.org/w/index.php?title=Cue/api1vsapi2&amp;diff=70305"/>
				<updated>2014-12-15T00:28:37Z</updated>
		
		<summary type="html">&lt;p&gt;Dagnello: /* API Approach 1 Pros/Cons */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;== API Approach 1 Vs API Approach 2 ==&lt;br /&gt;
&lt;br /&gt;
This page will analyze the comparison between the two main API approaches for project Cue.  &lt;br /&gt;
&lt;br /&gt;
The first approach is located here: https://wiki.openstack.org/wiki/Cue/api&lt;br /&gt;
&lt;br /&gt;
The second approach is located here: https://wiki.openstack.org/wiki/Cue/api_2&lt;br /&gt;
&lt;br /&gt;
=== API Approach 1 Pros/Cons ===&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
! Pros !! Cons&lt;br /&gt;
|-&lt;br /&gt;
| &lt;br /&gt;
* Example &lt;br /&gt;
|| &lt;br /&gt;
* Example&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
=== API Approach 2 Pros/Cons ===&lt;/div&gt;</summary>
		<author><name>Dagnello</name></author>	</entry>

	<entry>
		<id>https://wiki.openstack.org/w/index.php?title=Cue/api1vsapi2&amp;diff=70304</id>
		<title>Cue/api1vsapi2</title>
		<link rel="alternate" type="text/html" href="https://wiki.openstack.org/w/index.php?title=Cue/api1vsapi2&amp;diff=70304"/>
				<updated>2014-12-15T00:28:05Z</updated>
		
		<summary type="html">&lt;p&gt;Dagnello: /* API Approach 1 Vs API Approach 2 */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;== API Approach 1 Vs API Approach 2 ==&lt;br /&gt;
&lt;br /&gt;
This page will analyze the comparison between the two main API approaches for project Cue.  &lt;br /&gt;
&lt;br /&gt;
The first approach is located here: https://wiki.openstack.org/wiki/Cue/api&lt;br /&gt;
&lt;br /&gt;
The second approach is located here: https://wiki.openstack.org/wiki/Cue/api_2&lt;br /&gt;
&lt;br /&gt;
=== API Approach 1 Pros/Cons ===&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
! Pros !! Cons&lt;br /&gt;
|-&lt;br /&gt;
| &lt;br /&gt;
Example &lt;br /&gt;
|| &lt;br /&gt;
Example&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
=== API Approach 2 Pros/Cons ===&lt;/div&gt;</summary>
		<author><name>Dagnello</name></author>	</entry>

	<entry>
		<id>https://wiki.openstack.org/w/index.php?title=Cue/api1vsapi2&amp;diff=70303</id>
		<title>Cue/api1vsapi2</title>
		<link rel="alternate" type="text/html" href="https://wiki.openstack.org/w/index.php?title=Cue/api1vsapi2&amp;diff=70303"/>
				<updated>2014-12-15T00:27:43Z</updated>
		
		<summary type="html">&lt;p&gt;Dagnello: /* API Approach 1 Vs API Approach 2 */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;== API Approach 1 Vs API Approach 2 ==&lt;br /&gt;
&lt;br /&gt;
This page will analyze the comparison between the two main API approaches for project Cue.  &lt;br /&gt;
The first approach is located here: https://wiki.openstack.org/wiki/Cue/api&lt;br /&gt;
The second approach is located here: https://wiki.openstack.org/wiki/Cue/api_2&lt;br /&gt;
&lt;br /&gt;
=== API Approach 1 Pros/Cons ===&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
! Pros !! Cons&lt;br /&gt;
|-&lt;br /&gt;
| &lt;br /&gt;
Example &lt;br /&gt;
|| &lt;br /&gt;
Example&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
=== API Approach 2 Pros/Cons ===&lt;/div&gt;</summary>
		<author><name>Dagnello</name></author>	</entry>

	<entry>
		<id>https://wiki.openstack.org/w/index.php?title=Cue/api&amp;diff=70295</id>
		<title>Cue/api</title>
		<link rel="alternate" type="text/html" href="https://wiki.openstack.org/w/index.php?title=Cue/api&amp;diff=70295"/>
				<updated>2014-12-12T23:35:56Z</updated>
		
		<summary type="html">&lt;p&gt;Dagnello: /* Cue API Design */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;== Cue API Design ==&lt;br /&gt;
=== Acronyms ===&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
! '''Acronym''' !! '''Definition'''&lt;br /&gt;
|-&lt;br /&gt;
| SSL || Secure Sockets Layer&lt;br /&gt;
|-&lt;br /&gt;
| REST || Representational State Transfer&lt;br /&gt;
|-&lt;br /&gt;
| URI || Uniform Resource Identifier&lt;br /&gt;
|-&lt;br /&gt;
| UUID || Universally Unique Identifier&lt;br /&gt;
|-&lt;br /&gt;
| AMQP || Advanced Messaging Queuing Protocol&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
=== Requirements ===&lt;br /&gt;
&lt;br /&gt;
API Requirements for Cue - Kilo timeframe.&lt;br /&gt;
&lt;br /&gt;
* Keystone integration&lt;br /&gt;
* CRUD on Cluster&lt;br /&gt;
* Cluster Management – Scale up/down&lt;br /&gt;
* Devstack integration&lt;br /&gt;
* Gate Tests&lt;br /&gt;
&lt;br /&gt;
=== System Context Diagram ===&lt;br /&gt;
&lt;br /&gt;
[[File:SCD.jpg]]&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
! '''Component''' !! '''Description'''&lt;br /&gt;
|-&lt;br /&gt;
| User || Direct customer of Cue.&lt;br /&gt;
|-&lt;br /&gt;
| Horizon || Cue functionality will be added to Horizon, which will provide a web-based portal for Cue control.&lt;br /&gt;
|-&lt;br /&gt;
| CLI || Command Line Interface to Cue, provides user access to provisioning and deploying messaging clusters.&lt;br /&gt;
|-&lt;br /&gt;
| REST_API || Provides user access to provisioning and deploying messaging clusters through REST interface.  This is a light-weight interface, provisioning and configuration of clusters/nodes is delegated to the TaskWorker process.&lt;br /&gt;
|-&lt;br /&gt;
| TaskScheduler || Used to synchronize work tasks between the REST_API and TaskWorker processes.&lt;br /&gt;
|-&lt;br /&gt;
| TaskWorker || Carries out work associated with all provisioning, configuration and management of RabbitMQ clusters and nodes.  Makes use of heat for initial provisioning/deployment.&lt;br /&gt;
|-&lt;br /&gt;
| DB || Database to store information on clusters and nodes.  Example, in cluster creation, when request is initially received through REST_API, this DB is updated accordingly and the work is delegated to TaskWorker.  TaskWorker then updates this DB as provisioning and configuration takes place.  Subsequent calls to check on status of cluster creation, will return updated information from this DB.&lt;br /&gt;
|-&lt;br /&gt;
| Heat || Used cloud instance orchestration in deploying RabbitMQ cluster images.&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
=== REST API ===&lt;br /&gt;
&lt;br /&gt;
General requirement, REST API must respond within 500ms.&lt;br /&gt;
==== List Clusters ====&lt;br /&gt;
&lt;br /&gt;
'''''GET /v1/clusters'''''&lt;br /&gt;
&lt;br /&gt;
This operation synchronously returns all clusters provisioned within the associated project id.&lt;br /&gt;
&lt;br /&gt;
'''Request Parameters'''&lt;br /&gt;
N/A&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
! Response !! Code(s)&lt;br /&gt;
|-&lt;br /&gt;
| Normal || ok (200)&lt;br /&gt;
|-&lt;br /&gt;
| Error || unauthorized (401)&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
'''Response Parameters'''&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
! Parameter !! Type !! Description&lt;br /&gt;
|-&lt;br /&gt;
| cluster(list) || string || List of clusters, detailing respective cluster id, name, status, created time stamp and updated time stamp.&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
	&lt;br /&gt;
&lt;br /&gt;
'''JSON Request'''&lt;br /&gt;
&lt;br /&gt;
N/A&lt;br /&gt;
&lt;br /&gt;
'''JSON Response'''&lt;br /&gt;
&lt;br /&gt;
{&lt;br /&gt;
    &amp;quot;clusters&amp;quot;: &amp;lt;nowiki&amp;gt;[&amp;lt;/nowiki&amp;gt;&lt;br /&gt;
        {&lt;br /&gt;
            &amp;quot;cluster_id&amp;quot;: &amp;quot;b51948c9-1ac5-4c28-a580-6f7c500d82f8&amp;quot;,&lt;br /&gt;
            &amp;quot;network_id&amp;quot;: &amp;quot;d32019d3-bc6e-4319-9c1d-6722fc136a22&amp;quot;,&lt;br /&gt;
            &amp;quot;name&amp;quot;: &amp;quot;Message Cluster 1&amp;quot;,&lt;br /&gt;
            &amp;quot;status&amp;quot;: &amp;quot;ACTIVE&amp;quot;,&lt;br /&gt;
            &amp;quot;created&amp;quot;: &amp;quot;2014-11-11T01:02:03Z&amp;quot;,&lt;br /&gt;
            &amp;quot;updated&amp;quot;: &amp;quot;2014-11-11T01:02:03Z&amp;quot;&lt;br /&gt;
        },&lt;br /&gt;
        {&lt;br /&gt;
            &amp;quot;cluster_id&amp;quot;: &amp;quot;13c456c9-bbfc-4c31-b26d-3ae5c3cd7a77&amp;quot;,&lt;br /&gt;
            &amp;quot;network_id&amp;quot;: &amp;quot;d32019d3-bc6e-4319-9c1d-6722fc136a22&amp;quot;,&lt;br /&gt;
            &amp;quot;name&amp;quot;: &amp;quot;Message Cluster 2&amp;quot;,&lt;br /&gt;
            &amp;quot;status&amp;quot;: &amp;quot;ACTIVE&amp;quot;,&lt;br /&gt;
            &amp;quot;created&amp;quot;: &amp;quot;2014-11-12T13:23:54Z&amp;quot;,&lt;br /&gt;
            &amp;quot;updated&amp;quot;: &amp;quot;2014-11-13T19:55:01Z&amp;quot;&lt;br /&gt;
        }&lt;br /&gt;
    ]&lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
==== Create Cluster ====&lt;br /&gt;
&lt;br /&gt;
'''''POST /v1/clusters'''''&lt;br /&gt;
&lt;br /&gt;
This operation asynchronously creates a new cluster of Nova instances provisioned with the required message brokers in a central project id. &lt;br /&gt;
&lt;br /&gt;
'''Request Parameters'''&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
! Parameter !! Type !! Description&lt;br /&gt;
|-&lt;br /&gt;
| nic || UUID || Network Identification for a Neutron network where cluster will be created in.&lt;br /&gt;
|-&lt;br /&gt;
| name || string || Name of cluster.&lt;br /&gt;
|-&lt;br /&gt;
| volume_size || int || Optional parameter to indicate size of volume for node instance.  If volumes are supported, then this parameter will be used.  If ephmeral disk are not supported, volume support will be required.&lt;br /&gt;
|-&lt;br /&gt;
| flavor (list) || string || List of node flavors, which specify VM type in terms of CPU/memory/disk resources.  See http://docs.openstack.org/openstack-ops/content/flavors.html for more information.&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
'''Response Codes'''&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
! Response !! Code(s)&lt;br /&gt;
|-&lt;br /&gt;
| Normal || 202 (accepted)&lt;br /&gt;
|-&lt;br /&gt;
| Error || badRequest (400), unauthorized (401), itemNotFound (404)&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
'''Response Parameters'''&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
! Parameter !! Type !! Description&lt;br /&gt;
|-&lt;br /&gt;
| cluster_id || UUID || ID of cluster to be created.&lt;br /&gt;
|-&lt;br /&gt;
| name || string || Name of cluster (same as provided name in request parameters).&lt;br /&gt;
|-&lt;br /&gt;
| status || string || Current status of cluster.&lt;br /&gt;
&lt;br /&gt;
BUILDING: Cluster is in progress of being provisioned.&lt;br /&gt;
&lt;br /&gt;
UPDATING:  Cluster in process of being updated.&lt;br /&gt;
&lt;br /&gt;
ACTIVE:  Cluster is running.&lt;br /&gt;
&lt;br /&gt;
ERROR: Provisioning error(s) encountered.&lt;br /&gt;
&lt;br /&gt;
DELETING: Cluster is in process of being deleted.&lt;br /&gt;
&lt;br /&gt;
DELETED:  Cluster has been deleted.&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
'''JSON Request'''&lt;br /&gt;
&lt;br /&gt;
{&lt;br /&gt;
    &amp;quot;network_id&amp;quot;: &amp;quot;d32019d3-bc6e-4319-9c1d-6722fc136a22&amp;quot;,&lt;br /&gt;
    &amp;quot;name&amp;quot;: &amp;quot;MessageCluster1&amp;quot;,&lt;br /&gt;
    &amp;quot;volume_size&amp;quot;: &amp;quot;100&amp;quot;,&lt;br /&gt;
    &amp;quot;nodes&amp;quot;: [&lt;br /&gt;
        {&lt;br /&gt;
            &amp;quot;flavor&amp;quot;: &amp;quot;large&amp;quot;&lt;br /&gt;
        },&lt;br /&gt;
        {&lt;br /&gt;
            &amp;quot;flavor&amp;quot;: &amp;quot;large&amp;quot;&lt;br /&gt;
        },&lt;br /&gt;
        {&lt;br /&gt;
            &amp;quot;flavor&amp;quot;: &amp;quot;large&amp;quot;&lt;br /&gt;
        }&lt;br /&gt;
    ]&lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
'''JSON Response'''&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
{&lt;br /&gt;
    &amp;quot;cluster&amp;quot;: {&lt;br /&gt;
        &amp;quot;cluster_id&amp;quot;: &amp;quot;dd745f4a-9333-417e-bb89-9c989c84c068&amp;quot;,&lt;br /&gt;
        &amp;quot;network_id&amp;quot;: &amp;quot;d32019d3-bc6e-4319-9c1d-6722fc136a22&amp;quot;,&lt;br /&gt;
        &amp;quot;name&amp;quot;: &amp;quot;Message Cluster 1&amp;quot;,&lt;br /&gt;
        &amp;quot;status&amp;quot;: &amp;quot;BUILDING&amp;quot;,&lt;br /&gt;
        &amp;quot;created&amp;quot;: &amp;quot;2014-11-11T01:02:03Z&amp;quot;,&lt;br /&gt;
        &amp;quot;updated&amp;quot;: &amp;quot;2014-11-11T01:02:03Z&amp;quot;,&lt;br /&gt;
        &amp;quot;nodes&amp;quot;: [&lt;br /&gt;
            {&lt;br /&gt;
                &amp;quot;node_id&amp;quot;: &amp;quot;616fb98f-46ca-475e-917e-2563e5a8cd19&amp;quot;,&lt;br /&gt;
                &amp;quot;status&amp;quot;: &amp;quot;BUILDING&amp;quot;,&lt;br /&gt;
                &amp;quot;flavor&amp;quot;: &amp;quot;large&amp;quot;&lt;br /&gt;
            },&lt;br /&gt;
            {&lt;br /&gt;
                &amp;quot;node_id&amp;quot;: &amp;quot;e90c9d13-c4b8-4a08-992a-dad6109b8ac2&amp;quot;,&lt;br /&gt;
                &amp;quot;status&amp;quot;: &amp;quot;BUILDING&amp;quot;,&lt;br /&gt;
                &amp;quot;flavor&amp;quot;: &amp;quot;large&amp;quot;&lt;br /&gt;
            },&lt;br /&gt;
            {&lt;br /&gt;
                &amp;quot;node_id&amp;quot;: &amp;quot;372f8f47-6818-4d83-aa42-8744c0e689b8&amp;quot;,&lt;br /&gt;
                &amp;quot;status&amp;quot;: &amp;quot;BUILDING&amp;quot;,&lt;br /&gt;
                &amp;quot;flavor&amp;quot;: &amp;quot;large&amp;quot;&lt;br /&gt;
            }&lt;br /&gt;
        ]&lt;br /&gt;
    }&lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
==== Show Cluster ====&lt;br /&gt;
&lt;br /&gt;
'''''GET /v1/clusters/{cluster_id}'''''&lt;br /&gt;
&lt;br /&gt;
This operation synchronously returns the status and information on the specified cluster within the provided project id.&lt;br /&gt;
&lt;br /&gt;
'''Request Parameters'''&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
! Parameter !! Type !! Description&lt;br /&gt;
|-&lt;br /&gt;
| cluster_id (URI) || UUID || Cluster ID.  This value is returned when a new cluster is created.&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
'''Response Codes'''&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
! Response !! Code(s)&lt;br /&gt;
|-&lt;br /&gt;
| Normal || ok (200)&lt;br /&gt;
|-&lt;br /&gt;
| Error || unauthorized (401), itemNotFound (404)&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
'''Response Parameters'''&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
! Parameter !! Type !! Description&lt;br /&gt;
|-&lt;br /&gt;
| cluster_id || UUID || ID of requested cluster.&lt;br /&gt;
|-&lt;br /&gt;
| name || string || Name of cluster.&lt;br /&gt;
|-&lt;br /&gt;
| status || string || Current status of cluster.&lt;br /&gt;
&lt;br /&gt;
BUILDING: Cluster is in progress of being provisioned.&lt;br /&gt;
&lt;br /&gt;
UPDATING:  Cluster in process of being updated.&lt;br /&gt;
&lt;br /&gt;
ACTIVE:  Cluster is running.&lt;br /&gt;
&lt;br /&gt;
ERROR: Provisioning error(s) encountered.&lt;br /&gt;
&lt;br /&gt;
DELETING: Cluster is in process of being deleted.&lt;br /&gt;
&lt;br /&gt;
DELETED:  Cluster has been deleted.&lt;br /&gt;
|-&lt;br /&gt;
| created || string || Created time stamp in format: yyyy-mm-ddThh:mm:ssZ&lt;br /&gt;
|-&lt;br /&gt;
| updated || string || Last updated time stamp in format: yyyy-mm-ddThh:mm:ssZ&lt;br /&gt;
|-&lt;br /&gt;
| nodes(list) || node || List of nodes, which includes node id, instance state, and flavor.&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
'''JSON Request'''&lt;br /&gt;
&lt;br /&gt;
N/A&lt;br /&gt;
&lt;br /&gt;
'''JSON Response'''&lt;br /&gt;
&lt;br /&gt;
{&lt;br /&gt;
    &amp;quot;cluster&amp;quot;: {&lt;br /&gt;
        &amp;quot;cluster_id&amp;quot;: &amp;quot;dd745f4a-9333-417e-bb89-9c989c84c068&amp;quot;,&lt;br /&gt;
        &amp;quot;network_id&amp;quot;: &amp;quot;d32019d3-bc6e-4319-9c1d-6722fc136a22&amp;quot;,&lt;br /&gt;
        &amp;quot;name&amp;quot;: &amp;quot;Message Cluster 1&amp;quot;,&lt;br /&gt;
        &amp;quot;status&amp;quot;: &amp;quot;ACTIVE&amp;quot;,&lt;br /&gt;
        &amp;quot;created&amp;quot;: &amp;quot;2014-11-11T01:02:03Z&amp;quot;,&lt;br /&gt;
        &amp;quot;updated&amp;quot;: &amp;quot;2014-11-11T01:02:03Z&amp;quot;,&lt;br /&gt;
        &amp;quot;nodes&amp;quot;: [&lt;br /&gt;
            {&lt;br /&gt;
                &amp;quot;node_id&amp;quot;: &amp;quot;616fb98f-46ca-475e-917e-2563e5a8cd19&amp;quot;,&lt;br /&gt;
                &amp;quot;status&amp;quot;: &amp;quot;ACTIVE&amp;quot;,&lt;br /&gt;
                &amp;quot;flavor&amp;quot;: &amp;quot;large&amp;quot;,&lt;br /&gt;
                &amp;quot;endpoints&amp;quot;: [&lt;br /&gt;
                    {&lt;br /&gt;
                        &amp;quot;type&amp;quot;: &amp;quot;AMQP&amp;quot;,&lt;br /&gt;
                        &amp;quot;value&amp;quot;: &amp;quot;amqp://10.20.30.40:10000&amp;quot;&lt;br /&gt;
                    },&lt;br /&gt;
                    {&lt;br /&gt;
                        &amp;quot;type&amp;quot;: &amp;quot;console&amp;quot;,&lt;br /&gt;
                        &amp;quot;value&amp;quot;: &amp;quot;http://10.20.30.40:5672&amp;quot;&lt;br /&gt;
                    }&lt;br /&gt;
                ],&lt;br /&gt;
                &amp;quot;created&amp;quot;: &amp;quot;2014-11-11T01:06:03Z&amp;quot;,&lt;br /&gt;
                &amp;quot;updated&amp;quot;: &amp;quot;2014-11-11T01:06:03Z&amp;quot;&lt;br /&gt;
            },&lt;br /&gt;
            {&lt;br /&gt;
                &amp;quot;node_id&amp;quot;: &amp;quot;e90c9d13-c4b8-4a08-992a-dad6109b8ac2&amp;quot;,&lt;br /&gt;
                &amp;quot;status&amp;quot;: &amp;quot;ACTIVE&amp;quot;,&lt;br /&gt;
                &amp;quot;flavor&amp;quot;: &amp;quot;large&amp;quot;,&lt;br /&gt;
                &amp;quot;endpoints&amp;quot;: [&lt;br /&gt;
                    {&lt;br /&gt;
                        &amp;quot;type&amp;quot;: &amp;quot;AMQP&amp;quot;,&lt;br /&gt;
                        &amp;quot;value&amp;quot;: &amp;quot;amqp://10.20.30.41:10000&amp;quot;&lt;br /&gt;
                    },&lt;br /&gt;
                    {&lt;br /&gt;
                        &amp;quot;type&amp;quot;: &amp;quot;console&amp;quot;,&lt;br /&gt;
                        &amp;quot;value&amp;quot;: &amp;quot;http://10.20.30.41:5672&amp;quot;&lt;br /&gt;
                    }&lt;br /&gt;
                ],&lt;br /&gt;
                &amp;quot;created&amp;quot;: &amp;quot;2014-11-11T01:08:03Z&amp;quot;,&lt;br /&gt;
                &amp;quot;updated&amp;quot;: &amp;quot;2014-11-11T01:08:03Z&amp;quot;&lt;br /&gt;
            },&lt;br /&gt;
            {&lt;br /&gt;
                &amp;quot;node_id&amp;quot;: &amp;quot;372f8f47-6818-4d83-aa42-8744c0e689b8&amp;quot;,&lt;br /&gt;
                &amp;quot;status&amp;quot;: &amp;quot;ACTIVE&amp;quot;,&lt;br /&gt;
                &amp;quot;flavor&amp;quot;: &amp;quot;large&amp;quot;,&lt;br /&gt;
                &amp;quot;endpoints&amp;quot;: [&lt;br /&gt;
                    {&lt;br /&gt;
                        &amp;quot;type&amp;quot;: &amp;quot;AMQP&amp;quot;,&lt;br /&gt;
                        &amp;quot;value&amp;quot;: &amp;quot;amqp://10.20.30.42:10000&amp;quot;&lt;br /&gt;
                    },&lt;br /&gt;
                    {&lt;br /&gt;
                        &amp;quot;type&amp;quot;: &amp;quot;console&amp;quot;,&lt;br /&gt;
                        &amp;quot;value&amp;quot;: &amp;quot;http://10.20.30.42:5672&amp;quot;&lt;br /&gt;
                    }&lt;br /&gt;
                ],&lt;br /&gt;
                &amp;quot;created&amp;quot;: &amp;quot;2014-11-11T01:12:03Z&amp;quot;,&lt;br /&gt;
                &amp;quot;updated&amp;quot;: &amp;quot;2014-11-11T01:12:03Z&amp;quot;&lt;br /&gt;
            }&lt;br /&gt;
        ]&lt;br /&gt;
    }&lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
==== Delete Cluster ====&lt;br /&gt;
&lt;br /&gt;
'''''DELETE /v1/clusters/{cluster_id}'''''''&lt;br /&gt;
&lt;br /&gt;
This operation will asynchronously delete the indicated cluster within the provided project id.&lt;br /&gt;
&lt;br /&gt;
'''Request Parameters'''&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
! Parameter !! Type !! Description&lt;br /&gt;
|-&lt;br /&gt;
| cluster_id (URI) || UUID || Cluster ID.  This value is returned when a new cluster is created.&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
'''Response Codes'''&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
! Response !! Code(s)&lt;br /&gt;
|-&lt;br /&gt;
| Normal || accepted (202)&lt;br /&gt;
|-&lt;br /&gt;
| Error || unauthorized (401), itemNotFound (404)&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
'''Response Parameters'''&lt;br /&gt;
&lt;br /&gt;
N/A&lt;br /&gt;
&lt;br /&gt;
'''JSON Request'''&lt;br /&gt;
&lt;br /&gt;
N/A&lt;br /&gt;
&lt;br /&gt;
'''JSON Response'''&lt;br /&gt;
&lt;br /&gt;
N/A&lt;br /&gt;
&lt;br /&gt;
===Testing===&lt;br /&gt;
&lt;br /&gt;
Cue API testing will verify the expected functionality of the Cue user interface with both positive/negative tests.  The overall scope will cover testing from the HTTP REST request to required database interactions and work-flow task submission for RPC workers.&lt;br /&gt;
&lt;br /&gt;
====Unit Tests====&lt;br /&gt;
&lt;br /&gt;
Unit tests will verify the resulting function calls for each REST-ful URI and action(s).  The Python Mock library will be used to replace external system dependencies with placeholder objects.&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
! Function !! Tests !! Input Data !! Expected Result(s)&lt;br /&gt;
|-&lt;br /&gt;
| List Clusters || &lt;br /&gt;
# Create 'n' cluster(s), then call list clusters and verify expected return object&lt;br /&gt;
# Call list clusters when no clusters exist within the project id and verify expected return object&lt;br /&gt;
|| &lt;br /&gt;
* n = # of clusters to create&lt;br /&gt;
||&lt;br /&gt;
# List of 'n' clusters is returned with appropriate fields, HTTP Ok (200)&lt;br /&gt;
# Empty list of clusters is returned, HTTP Ok (200)&lt;br /&gt;
|-&lt;br /&gt;
| Create Cluster || &lt;br /&gt;
# Create standard cluster 'c' and verify expected return object&lt;br /&gt;
# Create cluster with invalid flavor and verify expected return value&lt;br /&gt;
# Create cluster with invalid volume size and verify expected return value&lt;br /&gt;
||&lt;br /&gt;
* n = cluster size (number of nodes)&lt;br /&gt;
* m = cluster name&lt;br /&gt;
* f = flavor&lt;br /&gt;
* s = volume size&lt;br /&gt;
* nic = Network UUID&lt;br /&gt;
||&lt;br /&gt;
# Cluster ID, name and status for newly created cluster is returned, HTTP Accepted (202)&lt;br /&gt;
# HTTP Bad request is returned (400)&lt;br /&gt;
# HTTP Bad request is returned (400)&lt;br /&gt;
|-&lt;br /&gt;
| Show Cluster ||&lt;br /&gt;
# Create cluster, then call get cluster and verify expected return object&lt;br /&gt;
# Get cluster with invalid cluster_id&lt;br /&gt;
||&lt;br /&gt;
* cluster_id = cluster ID&lt;br /&gt;
||&lt;br /&gt;
# Cluster ID, name, status, created/updated date stamp and list of nodes is returned, HTTP Ok (200).&lt;br /&gt;
# HTTP Bad request is returned (400)&lt;br /&gt;
|-&lt;br /&gt;
| Delete Cluster || &lt;br /&gt;
# Create a cluster, then call delete cluster and verify expected return value&lt;br /&gt;
# Delete cluster with invalid cluster_id&lt;br /&gt;
||&lt;br /&gt;
* cluster_id = cluster ID&lt;br /&gt;
||&lt;br /&gt;
# HTTP accepted is returned (202)&lt;br /&gt;
# HTTP Bad request is returned (400)&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
====Functional Tests====&lt;br /&gt;
&lt;br /&gt;
The functional tests will verify the HTTP REST URI request lifecycle from controller routing to HTTP response.  These tests will make use of Pecan's testing utility; pecan.testing module.&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
! Operation !! URI !! Tests !! Input Data !! Expected Data (JSON)&lt;br /&gt;
|-&lt;br /&gt;
| GET || /v1/clusters || &lt;br /&gt;
# Call when clusters exist&lt;br /&gt;
# Call when no clusters exist&lt;br /&gt;
|| &lt;br /&gt;
* n/a&lt;br /&gt;
||&lt;br /&gt;
# List of 'n' clusters is returned with appropriate fields, HTTP Ok (200)&lt;br /&gt;
# Empty list of clusters is returned, HTTP Ok (200)&lt;br /&gt;
|-&lt;br /&gt;
| POST || /v1/clusters ||&lt;br /&gt;
# Create standard cluster 'c' and verify expected return object&lt;br /&gt;
# Create cluster with invalid flavor and verify expected return value&lt;br /&gt;
# Create cluster with invalid volume size and verify expected return value&lt;br /&gt;
|| &lt;br /&gt;
* n = cluster size (number of nodes)&lt;br /&gt;
* m = cluster name&lt;br /&gt;
* f = flavor&lt;br /&gt;
* s = volume size&lt;br /&gt;
* nic = Network UUID&lt;br /&gt;
||&lt;br /&gt;
# Cluster ID, name and status for newly created cluster is returned, HTTP Accepted (202)&lt;br /&gt;
# HTTP Bad request is returned (400)&lt;br /&gt;
# HTTP Bad request is returned (400)&lt;br /&gt;
||&lt;br /&gt;
|-&lt;br /&gt;
| GET || /v1/clusters/{cluster_id} || &lt;br /&gt;
# Create cluster, then call get cluster and verify expected return object&lt;br /&gt;
# Get cluster with invalid cluster_id&lt;br /&gt;
|| &lt;br /&gt;
* cluster_id = cluster &lt;br /&gt;
||&lt;br /&gt;
# Cluster ID, name, status, created/updated date stamp and list of nodes is returned, HTTP Ok (200).&lt;br /&gt;
# HTTP Bad request is returned (400)&lt;br /&gt;
||&lt;br /&gt;
|-&lt;br /&gt;
| DELETE || /v1/clusters/{cluster_id} ||&lt;br /&gt;
# Create a cluster, then call delete cluster and verify expected return value&lt;br /&gt;
# Delete cluster with invalid cluster_id&lt;br /&gt;
||&lt;br /&gt;
* cluster_id = cluster ID&lt;br /&gt;
||&lt;br /&gt;
# HTTP accepted is returned (202)&lt;br /&gt;
# HTTP Bad request is returned (400)&lt;br /&gt;
||&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
====Integration Tests====&lt;br /&gt;
&lt;br /&gt;
The integration tests will cover API functionality from HTTP request to database access and task submission for RPC workers.  The Pecan test utility will be used to route test request URI to appropriate controllers, then database record(s) will be verified for applicable change.  Finally the creation of task objections will be verified to ensure valid task flows.&lt;/div&gt;</summary>
		<author><name>Dagnello</name></author>	</entry>

	<entry>
		<id>https://wiki.openstack.org/w/index.php?title=Cue&amp;diff=70294</id>
		<title>Cue</title>
		<link rel="alternate" type="text/html" href="https://wiki.openstack.org/w/index.php?title=Cue&amp;diff=70294"/>
				<updated>2014-12-12T23:34:30Z</updated>
		
		<summary type="html">&lt;p&gt;Dagnello: /* API */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;= Cue =&lt;br /&gt;
== Mission Statement ==&lt;br /&gt;
The OpenStack Message Broker Provisioning as a Service Mission: To provide scalable and reliable Message Broker provisioning functionality for off the shelf messaging technologies, as well as to provide advanced management, tuning, and administration of underlying message brokers.&lt;br /&gt;
&lt;br /&gt;
== Description ==&lt;br /&gt;
&lt;br /&gt;
Cue is a Message Broker provisioning service for Openstack.  Its goal is to simplify and automate the complex tasks of provisioning, management, and administration of message brokers.  Users of the service can create and manage multiple clusters of Message brokers, of various types as needed.  The service will provide resource isolation at the VM level, and does not attempt to implement multi-tenancy at the message broker layer.&lt;br /&gt;
&lt;br /&gt;
== Why ==&lt;br /&gt;
Messaging is a common development pattern for building loosely coupled distributed systems.  Messaging systems also act as glue between independent applications.  Several off-the-shelf products exist that implement messaging and queuing semantics.&lt;br /&gt;
  &lt;br /&gt;
Provisioning and supporting Messaging systems for an individual application can be a time consuming and painful experience.  This product aims to simplify the provisioning and management of messaging systems, providing High Availability and auto-healing capabilities to the end user, while providing tenant-level isolation.&lt;br /&gt;
  &lt;br /&gt;
The main goal of this service is to simplify the end user Application development lifecycle and allow the developer to focus on their application, instead of the backend middleware services.&lt;br /&gt;
&lt;br /&gt;
== Use Cases (in-work) ==&lt;br /&gt;
'''Macro'''&lt;br /&gt;
# IT teams providing managed, highly available message brokers to their app development teams, on private clouds they own and operate.&lt;br /&gt;
# OpenStack service providers seeking to provide a managed, highly available messaging service with multiple backends such as RabbitMQ and Kafka to their end users.&lt;br /&gt;
&lt;br /&gt;
'''Micro'''&lt;br /&gt;
# Distributing work between micro-services deployed on top of OpenStack via PaaS offerings like Cloud Foundry.&lt;br /&gt;
# Sending messages between legacy systems and cloud native applications.&lt;br /&gt;
&lt;br /&gt;
== Goals ==&lt;br /&gt;
&lt;br /&gt;
# Produce a Message Broker Provisioning Service for Openstack&lt;br /&gt;
# Protocol Agnostic&lt;br /&gt;
# Support multiple Broker backends&lt;br /&gt;
# Provide HA and Fault Tolerance by leveraging underlying Broker Cluster capabilities&lt;br /&gt;
# Provide tuned and properly configured Message Brokers on-demand&lt;br /&gt;
# Support Broker management operations such as Backup of Configuration, Scale Up, Scale Down&lt;br /&gt;
&lt;br /&gt;
== Non-Goals ==&lt;br /&gt;
&lt;br /&gt;
# Data plane API&lt;br /&gt;
# Multi-tenancy at the Message Broker layer&lt;br /&gt;
&lt;br /&gt;
== Brokers ==&lt;br /&gt;
Cue will support the following brokers (in order of priority):&lt;br /&gt;
# RabbitMQ&lt;br /&gt;
# qpid&lt;br /&gt;
# Kafka&lt;br /&gt;
# .. others?&lt;br /&gt;
&lt;br /&gt;
== API == &lt;br /&gt;
API documentation is located here:&lt;br /&gt;
&lt;br /&gt;
[https://wiki.openstack.org/wiki/Cue/api Cue API Approach 1]&lt;br /&gt;
&lt;br /&gt;
[https://wiki.openstack.org/wiki/Cue/api_2 Cue API Approach 2]&lt;br /&gt;
&lt;br /&gt;
[https://wiki.openstack.org/wiki/Cue/api1vsapi2 Comparison]&lt;br /&gt;
&lt;br /&gt;
== Code ==&lt;br /&gt;
We've started building the project, it now lives on Stackforge.&lt;br /&gt;
&lt;br /&gt;
https://github.com/stackforge/cue&lt;br /&gt;
&lt;br /&gt;
Code Reviews:&lt;br /&gt;
&lt;br /&gt;
https://review.openstack.org/#/q/project:stackforge/cue,n,z&lt;br /&gt;
&lt;br /&gt;
== Find Us ==&lt;br /&gt;
Come talk to us on #openstack-cue on Freenode.&lt;/div&gt;</summary>
		<author><name>Dagnello</name></author>	</entry>

	<entry>
		<id>https://wiki.openstack.org/w/index.php?title=Cue/api1vsapi2&amp;diff=70293</id>
		<title>Cue/api1vsapi2</title>
		<link rel="alternate" type="text/html" href="https://wiki.openstack.org/w/index.php?title=Cue/api1vsapi2&amp;diff=70293"/>
				<updated>2014-12-12T23:34:00Z</updated>
		
		<summary type="html">&lt;p&gt;Dagnello: Created page with &amp;quot;== API Approach 1 Vs API Approach 2 ==&amp;quot;&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;== API Approach 1 Vs API Approach 2 ==&lt;/div&gt;</summary>
		<author><name>Dagnello</name></author>	</entry>

	<entry>
		<id>https://wiki.openstack.org/w/index.php?title=Cue/api&amp;diff=70292</id>
		<title>Cue/api</title>
		<link rel="alternate" type="text/html" href="https://wiki.openstack.org/w/index.php?title=Cue/api&amp;diff=70292"/>
				<updated>2014-12-12T23:32:43Z</updated>
		
		<summary type="html">&lt;p&gt;Dagnello: /* Cue API Design */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;== Cue API Design ==&lt;br /&gt;
=== Acronyms ===&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
! '''Acronym''' !! '''Definition'''&lt;br /&gt;
|-&lt;br /&gt;
| SSL || Secure Sockets Layer&lt;br /&gt;
|-&lt;br /&gt;
| REST || Representational State Transfer&lt;br /&gt;
|-&lt;br /&gt;
| URI || Uniform Resource Identifier&lt;br /&gt;
|-&lt;br /&gt;
| UUID || Universally Unique Identifier&lt;br /&gt;
|-&lt;br /&gt;
| AMQP || Advanced Messaging Queuing Protocol&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
=== Requirements ===&lt;br /&gt;
&lt;br /&gt;
API Requirements for Cue - Kilo timeframe.&lt;br /&gt;
&lt;br /&gt;
* Keystone integration&lt;br /&gt;
* CRUD on Cluster&lt;br /&gt;
* Cluster Management – Scale up/down&lt;br /&gt;
* Devstack integration&lt;br /&gt;
* Gate Tests&lt;br /&gt;
&lt;br /&gt;
=== System Context Diagram ===&lt;br /&gt;
&lt;br /&gt;
[[File:SCD.jpg]]&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
! '''Component''' !! '''Description'''&lt;br /&gt;
|-&lt;br /&gt;
| User || Direct customer of Cue.&lt;br /&gt;
|-&lt;br /&gt;
| Horizon || Cue functionality will be added to Horizon, which will provide a web-based portal for Cue control.&lt;br /&gt;
|-&lt;br /&gt;
| CLI || Command Line Interface to Cue, provides user access to provisioning and deploying messaging clusters.&lt;br /&gt;
|-&lt;br /&gt;
| REST_API || Provides user access to provisioning and deploying messaging clusters through REST interface.  This is a light-weight interface, provisioning and configuration of clusters/nodes is delegated to the TaskWorker process.&lt;br /&gt;
|-&lt;br /&gt;
| TaskScheduler || Used to synchronize work tasks between the REST_API and TaskWorker processes.&lt;br /&gt;
|-&lt;br /&gt;
| TaskWorker || Carries out work associated with all provisioning, configuration and management of RabbitMQ clusters and nodes.  Makes use of heat for initial provisioning/deployment.&lt;br /&gt;
|-&lt;br /&gt;
| DB || Database to store information on clusters and nodes.  Example, in cluster creation, when request is initially received through REST_API, this DB is updated accordingly and the work is delegated to TaskWorker.  TaskWorker then updates this DB as provisioning and configuration takes place.  Subsequent calls to check on status of cluster creation, will return updated information from this DB.&lt;br /&gt;
|-&lt;br /&gt;
| Heat || Used cloud instance orchestration in deploying RabbitMQ cluster images.&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
=== REST API ===&lt;br /&gt;
&lt;br /&gt;
General requirement, REST API must respond within 500ms.&lt;br /&gt;
==== List Clusters ====&lt;br /&gt;
&lt;br /&gt;
'''''GET /v1/clusters'''''&lt;br /&gt;
&lt;br /&gt;
This operation synchronously returns all clusters provisioned within the associated project id.&lt;br /&gt;
&lt;br /&gt;
'''Request Parameters'''&lt;br /&gt;
N/A&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
! Response !! Code(s)&lt;br /&gt;
|-&lt;br /&gt;
| Normal || ok (200)&lt;br /&gt;
|-&lt;br /&gt;
| Error || unauthorized (401)&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
'''Response Parameters'''&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
! Parameter !! Type !! Description&lt;br /&gt;
|-&lt;br /&gt;
| cluster(list) || string || List of clusters, detailing respective cluster id, name, status, created time stamp and updated time stamp.&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
	&lt;br /&gt;
&lt;br /&gt;
'''JSON Request'''&lt;br /&gt;
&lt;br /&gt;
N/A&lt;br /&gt;
&lt;br /&gt;
'''JSON Response'''&lt;br /&gt;
&lt;br /&gt;
{&lt;br /&gt;
    &amp;quot;clusters&amp;quot;: &amp;lt;nowiki&amp;gt;[&amp;lt;/nowiki&amp;gt;&lt;br /&gt;
        {&lt;br /&gt;
            &amp;quot;cluster_id&amp;quot;: &amp;quot;b51948c9-1ac5-4c28-a580-6f7c500d82f8&amp;quot;,&lt;br /&gt;
            &amp;quot;network_id&amp;quot;: &amp;quot;d32019d3-bc6e-4319-9c1d-6722fc136a22&amp;quot;,&lt;br /&gt;
            &amp;quot;name&amp;quot;: &amp;quot;Message Cluster 1&amp;quot;,&lt;br /&gt;
            &amp;quot;status&amp;quot;: &amp;quot;ACTIVE&amp;quot;,&lt;br /&gt;
            &amp;quot;created&amp;quot;: &amp;quot;2014-11-11T01:02:03Z&amp;quot;,&lt;br /&gt;
            &amp;quot;updated&amp;quot;: &amp;quot;2014-11-11T01:02:03Z&amp;quot;&lt;br /&gt;
        },&lt;br /&gt;
        {&lt;br /&gt;
            &amp;quot;cluster_id&amp;quot;: &amp;quot;13c456c9-bbfc-4c31-b26d-3ae5c3cd7a77&amp;quot;,&lt;br /&gt;
            &amp;quot;network_id&amp;quot;: &amp;quot;d32019d3-bc6e-4319-9c1d-6722fc136a22&amp;quot;,&lt;br /&gt;
            &amp;quot;name&amp;quot;: &amp;quot;Message Cluster 2&amp;quot;,&lt;br /&gt;
            &amp;quot;status&amp;quot;: &amp;quot;ACTIVE&amp;quot;,&lt;br /&gt;
            &amp;quot;created&amp;quot;: &amp;quot;2014-11-12T13:23:54Z&amp;quot;,&lt;br /&gt;
            &amp;quot;updated&amp;quot;: &amp;quot;2014-11-13T19:55:01Z&amp;quot;&lt;br /&gt;
        }&lt;br /&gt;
    ]&lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
==== Create Cluster ====&lt;br /&gt;
&lt;br /&gt;
'''''POST /v1/clusters'''''&lt;br /&gt;
&lt;br /&gt;
This operation asynchronously creates a new cluster of Nova instances provisioned with the required message brokers in a central project id. &lt;br /&gt;
&lt;br /&gt;
'''Request Parameters'''&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
! Parameter !! Type !! Description&lt;br /&gt;
|-&lt;br /&gt;
| nic || UUID || Network Identification for a Neutron network where cluster will be created in.&lt;br /&gt;
|-&lt;br /&gt;
| name || string || Name of cluster.&lt;br /&gt;
|-&lt;br /&gt;
| volume_size || int || Optional parameter to indicate size of volume for node instance.  If volumes are supported, then this parameter will be used.  If ephmeral disk are not supported, volume support will be required.&lt;br /&gt;
|-&lt;br /&gt;
| flavor (list) || string || List of node flavors, which specify VM type in terms of CPU/memory/disk resources.  See http://docs.openstack.org/openstack-ops/content/flavors.html for more information.&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
'''Response Codes'''&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
! Response !! Code(s)&lt;br /&gt;
|-&lt;br /&gt;
| Normal || 202 (accepted)&lt;br /&gt;
|-&lt;br /&gt;
| Error || badRequest (400), unauthorized (401), itemNotFound (404)&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
'''Response Parameters'''&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
! Parameter !! Type !! Description&lt;br /&gt;
|-&lt;br /&gt;
| cluster_id || UUID || ID of cluster to be created.&lt;br /&gt;
|-&lt;br /&gt;
| name || string || Name of cluster (same as provided name in request parameters).&lt;br /&gt;
|-&lt;br /&gt;
| status || string || Current status of cluster.&lt;br /&gt;
&lt;br /&gt;
BUILDING: Cluster is in progress of being provisioned.&lt;br /&gt;
&lt;br /&gt;
ACTIVE:  Cluster is running.&lt;br /&gt;
&lt;br /&gt;
ERROR: Provisioning error(s) encountered.&lt;br /&gt;
&lt;br /&gt;
DELETED:  Cluster has been deleted.&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
'''JSON Request'''&lt;br /&gt;
&lt;br /&gt;
{&lt;br /&gt;
    &amp;quot;network_id&amp;quot;: &amp;quot;d32019d3-bc6e-4319-9c1d-6722fc136a22&amp;quot;,&lt;br /&gt;
    &amp;quot;name&amp;quot;: &amp;quot;MessageCluster1&amp;quot;,&lt;br /&gt;
    &amp;quot;volume_size&amp;quot;: &amp;quot;100&amp;quot;,&lt;br /&gt;
    &amp;quot;nodes&amp;quot;: [&lt;br /&gt;
        {&lt;br /&gt;
            &amp;quot;flavor&amp;quot;: &amp;quot;large&amp;quot;&lt;br /&gt;
        },&lt;br /&gt;
        {&lt;br /&gt;
            &amp;quot;flavor&amp;quot;: &amp;quot;large&amp;quot;&lt;br /&gt;
        },&lt;br /&gt;
        {&lt;br /&gt;
            &amp;quot;flavor&amp;quot;: &amp;quot;large&amp;quot;&lt;br /&gt;
        }&lt;br /&gt;
    ]&lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
'''JSON Response'''&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
{&lt;br /&gt;
    &amp;quot;cluster&amp;quot;: {&lt;br /&gt;
        &amp;quot;cluster_id&amp;quot;: &amp;quot;dd745f4a-9333-417e-bb89-9c989c84c068&amp;quot;,&lt;br /&gt;
        &amp;quot;network_id&amp;quot;: &amp;quot;d32019d3-bc6e-4319-9c1d-6722fc136a22&amp;quot;,&lt;br /&gt;
        &amp;quot;name&amp;quot;: &amp;quot;Message Cluster 1&amp;quot;,&lt;br /&gt;
        &amp;quot;status&amp;quot;: &amp;quot;BUILDING&amp;quot;,&lt;br /&gt;
        &amp;quot;created&amp;quot;: &amp;quot;2014-11-11T01:02:03Z&amp;quot;,&lt;br /&gt;
        &amp;quot;updated&amp;quot;: &amp;quot;2014-11-11T01:02:03Z&amp;quot;,&lt;br /&gt;
        &amp;quot;nodes&amp;quot;: [&lt;br /&gt;
            {&lt;br /&gt;
                &amp;quot;node_id&amp;quot;: &amp;quot;616fb98f-46ca-475e-917e-2563e5a8cd19&amp;quot;,&lt;br /&gt;
                &amp;quot;status&amp;quot;: &amp;quot;BUILDING&amp;quot;,&lt;br /&gt;
                &amp;quot;flavor&amp;quot;: &amp;quot;large&amp;quot;&lt;br /&gt;
            },&lt;br /&gt;
            {&lt;br /&gt;
                &amp;quot;node_id&amp;quot;: &amp;quot;e90c9d13-c4b8-4a08-992a-dad6109b8ac2&amp;quot;,&lt;br /&gt;
                &amp;quot;status&amp;quot;: &amp;quot;BUILDING&amp;quot;,&lt;br /&gt;
                &amp;quot;flavor&amp;quot;: &amp;quot;large&amp;quot;&lt;br /&gt;
            },&lt;br /&gt;
            {&lt;br /&gt;
                &amp;quot;node_id&amp;quot;: &amp;quot;372f8f47-6818-4d83-aa42-8744c0e689b8&amp;quot;,&lt;br /&gt;
                &amp;quot;status&amp;quot;: &amp;quot;BUILDING&amp;quot;,&lt;br /&gt;
                &amp;quot;flavor&amp;quot;: &amp;quot;large&amp;quot;&lt;br /&gt;
            }&lt;br /&gt;
        ]&lt;br /&gt;
    }&lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
==== Show Cluster ====&lt;br /&gt;
&lt;br /&gt;
'''''GET /v1/clusters/{cluster_id}'''''&lt;br /&gt;
&lt;br /&gt;
This operation synchronously returns the status and information on the specified cluster within the provided project id.&lt;br /&gt;
&lt;br /&gt;
'''Request Parameters'''&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
! Parameter !! Type !! Description&lt;br /&gt;
|-&lt;br /&gt;
| cluster_id (URI) || UUID || Cluster ID.  This value is returned when a new cluster is created.&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
'''Response Codes'''&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
! Response !! Code(s)&lt;br /&gt;
|-&lt;br /&gt;
| Normal || ok (200)&lt;br /&gt;
|-&lt;br /&gt;
| Error || unauthorized (401), itemNotFound (404)&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
'''Response Parameters'''&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
! Parameter !! Type !! Description&lt;br /&gt;
|-&lt;br /&gt;
| cluster_id || UUID || ID of requested cluster.&lt;br /&gt;
|-&lt;br /&gt;
| name || string || Name of cluster.&lt;br /&gt;
|-&lt;br /&gt;
| status || string || Current status of cluster.&lt;br /&gt;
&lt;br /&gt;
BUILDING: Cluster is in progress of being provisioned.&lt;br /&gt;
&lt;br /&gt;
ACTIVE:  Cluster is running.&lt;br /&gt;
&lt;br /&gt;
ERROR: Provisioning error(s) encountered.&lt;br /&gt;
&lt;br /&gt;
DELETED:  Cluster has been deleted.&lt;br /&gt;
|-&lt;br /&gt;
| created || string || Created time stamp in format: yyyy-mm-ddThh:mm:ssZ&lt;br /&gt;
|-&lt;br /&gt;
| updated || string || Last updated time stamp in format: yyyy-mm-ddThh:mm:ssZ&lt;br /&gt;
|-&lt;br /&gt;
| nodes(list) || node || List of nodes, which includes node id, instance state, and flavor.&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
'''JSON Request'''&lt;br /&gt;
&lt;br /&gt;
N/A&lt;br /&gt;
&lt;br /&gt;
'''JSON Response'''&lt;br /&gt;
&lt;br /&gt;
{&lt;br /&gt;
    &amp;quot;cluster&amp;quot;: {&lt;br /&gt;
        &amp;quot;cluster_id&amp;quot;: &amp;quot;dd745f4a-9333-417e-bb89-9c989c84c068&amp;quot;,&lt;br /&gt;
        &amp;quot;network_id&amp;quot;: &amp;quot;d32019d3-bc6e-4319-9c1d-6722fc136a22&amp;quot;,&lt;br /&gt;
        &amp;quot;name&amp;quot;: &amp;quot;Message Cluster 1&amp;quot;,&lt;br /&gt;
        &amp;quot;status&amp;quot;: &amp;quot;ACTIVE&amp;quot;,&lt;br /&gt;
        &amp;quot;created&amp;quot;: &amp;quot;2014-11-11T01:02:03Z&amp;quot;,&lt;br /&gt;
        &amp;quot;updated&amp;quot;: &amp;quot;2014-11-11T01:02:03Z&amp;quot;,&lt;br /&gt;
        &amp;quot;nodes&amp;quot;: [&lt;br /&gt;
            {&lt;br /&gt;
                &amp;quot;node_id&amp;quot;: &amp;quot;616fb98f-46ca-475e-917e-2563e5a8cd19&amp;quot;,&lt;br /&gt;
                &amp;quot;status&amp;quot;: &amp;quot;ACTIVE&amp;quot;,&lt;br /&gt;
                &amp;quot;flavor&amp;quot;: &amp;quot;large&amp;quot;,&lt;br /&gt;
                &amp;quot;endpoints&amp;quot;: [&lt;br /&gt;
                    {&lt;br /&gt;
                        &amp;quot;type&amp;quot;: &amp;quot;AMQP&amp;quot;,&lt;br /&gt;
                        &amp;quot;value&amp;quot;: &amp;quot;amqp://10.20.30.40:10000&amp;quot;&lt;br /&gt;
                    },&lt;br /&gt;
                    {&lt;br /&gt;
                        &amp;quot;type&amp;quot;: &amp;quot;console&amp;quot;,&lt;br /&gt;
                        &amp;quot;value&amp;quot;: &amp;quot;http://10.20.30.40:5672&amp;quot;&lt;br /&gt;
                    }&lt;br /&gt;
                ],&lt;br /&gt;
                &amp;quot;created&amp;quot;: &amp;quot;2014-11-11T01:06:03Z&amp;quot;,&lt;br /&gt;
                &amp;quot;updated&amp;quot;: &amp;quot;2014-11-11T01:06:03Z&amp;quot;&lt;br /&gt;
            },&lt;br /&gt;
            {&lt;br /&gt;
                &amp;quot;node_id&amp;quot;: &amp;quot;e90c9d13-c4b8-4a08-992a-dad6109b8ac2&amp;quot;,&lt;br /&gt;
                &amp;quot;status&amp;quot;: &amp;quot;ACTIVE&amp;quot;,&lt;br /&gt;
                &amp;quot;flavor&amp;quot;: &amp;quot;large&amp;quot;,&lt;br /&gt;
                &amp;quot;endpoints&amp;quot;: [&lt;br /&gt;
                    {&lt;br /&gt;
                        &amp;quot;type&amp;quot;: &amp;quot;AMQP&amp;quot;,&lt;br /&gt;
                        &amp;quot;value&amp;quot;: &amp;quot;amqp://10.20.30.41:10000&amp;quot;&lt;br /&gt;
                    },&lt;br /&gt;
                    {&lt;br /&gt;
                        &amp;quot;type&amp;quot;: &amp;quot;console&amp;quot;,&lt;br /&gt;
                        &amp;quot;value&amp;quot;: &amp;quot;http://10.20.30.41:5672&amp;quot;&lt;br /&gt;
                    }&lt;br /&gt;
                ],&lt;br /&gt;
                &amp;quot;created&amp;quot;: &amp;quot;2014-11-11T01:08:03Z&amp;quot;,&lt;br /&gt;
                &amp;quot;updated&amp;quot;: &amp;quot;2014-11-11T01:08:03Z&amp;quot;&lt;br /&gt;
            },&lt;br /&gt;
            {&lt;br /&gt;
                &amp;quot;node_id&amp;quot;: &amp;quot;372f8f47-6818-4d83-aa42-8744c0e689b8&amp;quot;,&lt;br /&gt;
                &amp;quot;status&amp;quot;: &amp;quot;ACTIVE&amp;quot;,&lt;br /&gt;
                &amp;quot;flavor&amp;quot;: &amp;quot;large&amp;quot;,&lt;br /&gt;
                &amp;quot;endpoints&amp;quot;: [&lt;br /&gt;
                    {&lt;br /&gt;
                        &amp;quot;type&amp;quot;: &amp;quot;AMQP&amp;quot;,&lt;br /&gt;
                        &amp;quot;value&amp;quot;: &amp;quot;amqp://10.20.30.42:10000&amp;quot;&lt;br /&gt;
                    },&lt;br /&gt;
                    {&lt;br /&gt;
                        &amp;quot;type&amp;quot;: &amp;quot;console&amp;quot;,&lt;br /&gt;
                        &amp;quot;value&amp;quot;: &amp;quot;http://10.20.30.42:5672&amp;quot;&lt;br /&gt;
                    }&lt;br /&gt;
                ],&lt;br /&gt;
                &amp;quot;created&amp;quot;: &amp;quot;2014-11-11T01:12:03Z&amp;quot;,&lt;br /&gt;
                &amp;quot;updated&amp;quot;: &amp;quot;2014-11-11T01:12:03Z&amp;quot;&lt;br /&gt;
            }&lt;br /&gt;
        ]&lt;br /&gt;
    }&lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
==== Delete Cluster ====&lt;br /&gt;
&lt;br /&gt;
'''''DELETE /v1/clusters/{cluster_id}'''''''&lt;br /&gt;
&lt;br /&gt;
This operation will asynchronously delete the indicated cluster within the provided project id.&lt;br /&gt;
&lt;br /&gt;
'''Request Parameters'''&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
! Parameter !! Type !! Description&lt;br /&gt;
|-&lt;br /&gt;
| cluster_id (URI) || UUID || Cluster ID.  This value is returned when a new cluster is created.&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
'''Response Codes'''&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
! Response !! Code(s)&lt;br /&gt;
|-&lt;br /&gt;
| Normal || accepted (202)&lt;br /&gt;
|-&lt;br /&gt;
| Error || unauthorized (401), itemNotFound (404)&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
'''Response Parameters'''&lt;br /&gt;
&lt;br /&gt;
N/A&lt;br /&gt;
&lt;br /&gt;
'''JSON Request'''&lt;br /&gt;
&lt;br /&gt;
N/A&lt;br /&gt;
&lt;br /&gt;
'''JSON Response'''&lt;br /&gt;
&lt;br /&gt;
N/A&lt;br /&gt;
&lt;br /&gt;
===Testing===&lt;br /&gt;
&lt;br /&gt;
Cue API testing will verify the expected functionality of the Cue user interface with both positive/negative tests.  The overall scope will cover testing from the HTTP REST request to required database interactions and work-flow task submission for RPC workers.&lt;br /&gt;
&lt;br /&gt;
====Unit Tests====&lt;br /&gt;
&lt;br /&gt;
Unit tests will verify the resulting function calls for each REST-ful URI and action(s).  The Python Mock library will be used to replace external system dependencies with placeholder objects.&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
! Function !! Tests !! Input Data !! Expected Result(s)&lt;br /&gt;
|-&lt;br /&gt;
| List Clusters || &lt;br /&gt;
# Create 'n' cluster(s), then call list clusters and verify expected return object&lt;br /&gt;
# Call list clusters when no clusters exist within the project id and verify expected return object&lt;br /&gt;
|| &lt;br /&gt;
* n = # of clusters to create&lt;br /&gt;
||&lt;br /&gt;
# List of 'n' clusters is returned with appropriate fields, HTTP Ok (200)&lt;br /&gt;
# Empty list of clusters is returned, HTTP Ok (200)&lt;br /&gt;
|-&lt;br /&gt;
| Create Cluster || &lt;br /&gt;
# Create standard cluster 'c' and verify expected return object&lt;br /&gt;
# Create cluster with invalid flavor and verify expected return value&lt;br /&gt;
# Create cluster with invalid volume size and verify expected return value&lt;br /&gt;
||&lt;br /&gt;
* n = cluster size (number of nodes)&lt;br /&gt;
* m = cluster name&lt;br /&gt;
* f = flavor&lt;br /&gt;
* s = volume size&lt;br /&gt;
* nic = Network UUID&lt;br /&gt;
||&lt;br /&gt;
# Cluster ID, name and status for newly created cluster is returned, HTTP Accepted (202)&lt;br /&gt;
# HTTP Bad request is returned (400)&lt;br /&gt;
# HTTP Bad request is returned (400)&lt;br /&gt;
|-&lt;br /&gt;
| Show Cluster ||&lt;br /&gt;
# Create cluster, then call get cluster and verify expected return object&lt;br /&gt;
# Get cluster with invalid cluster_id&lt;br /&gt;
||&lt;br /&gt;
* cluster_id = cluster ID&lt;br /&gt;
||&lt;br /&gt;
# Cluster ID, name, status, created/updated date stamp and list of nodes is returned, HTTP Ok (200).&lt;br /&gt;
# HTTP Bad request is returned (400)&lt;br /&gt;
|-&lt;br /&gt;
| Delete Cluster || &lt;br /&gt;
# Create a cluster, then call delete cluster and verify expected return value&lt;br /&gt;
# Delete cluster with invalid cluster_id&lt;br /&gt;
||&lt;br /&gt;
* cluster_id = cluster ID&lt;br /&gt;
||&lt;br /&gt;
# HTTP accepted is returned (202)&lt;br /&gt;
# HTTP Bad request is returned (400)&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
====Functional Tests====&lt;br /&gt;
&lt;br /&gt;
The functional tests will verify the HTTP REST URI request lifecycle from controller routing to HTTP response.  These tests will make use of Pecan's testing utility; pecan.testing module.&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
! Operation !! URI !! Tests !! Input Data !! Expected Data (JSON)&lt;br /&gt;
|-&lt;br /&gt;
| GET || /v1/clusters || &lt;br /&gt;
# Call when clusters exist&lt;br /&gt;
# Call when no clusters exist&lt;br /&gt;
|| &lt;br /&gt;
* n/a&lt;br /&gt;
||&lt;br /&gt;
# List of 'n' clusters is returned with appropriate fields, HTTP Ok (200)&lt;br /&gt;
# Empty list of clusters is returned, HTTP Ok (200)&lt;br /&gt;
|-&lt;br /&gt;
| POST || /v1/clusters ||&lt;br /&gt;
# Create standard cluster 'c' and verify expected return object&lt;br /&gt;
# Create cluster with invalid flavor and verify expected return value&lt;br /&gt;
# Create cluster with invalid volume size and verify expected return value&lt;br /&gt;
|| &lt;br /&gt;
* n = cluster size (number of nodes)&lt;br /&gt;
* m = cluster name&lt;br /&gt;
* f = flavor&lt;br /&gt;
* s = volume size&lt;br /&gt;
* nic = Network UUID&lt;br /&gt;
||&lt;br /&gt;
# Cluster ID, name and status for newly created cluster is returned, HTTP Accepted (202)&lt;br /&gt;
# HTTP Bad request is returned (400)&lt;br /&gt;
# HTTP Bad request is returned (400)&lt;br /&gt;
||&lt;br /&gt;
|-&lt;br /&gt;
| GET || /v1/clusters/{cluster_id} || &lt;br /&gt;
# Create cluster, then call get cluster and verify expected return object&lt;br /&gt;
# Get cluster with invalid cluster_id&lt;br /&gt;
|| &lt;br /&gt;
* cluster_id = cluster &lt;br /&gt;
||&lt;br /&gt;
# Cluster ID, name, status, created/updated date stamp and list of nodes is returned, HTTP Ok (200).&lt;br /&gt;
# HTTP Bad request is returned (400)&lt;br /&gt;
||&lt;br /&gt;
|-&lt;br /&gt;
| DELETE || /v1/clusters/{cluster_id} ||&lt;br /&gt;
# Create a cluster, then call delete cluster and verify expected return value&lt;br /&gt;
# Delete cluster with invalid cluster_id&lt;br /&gt;
||&lt;br /&gt;
* cluster_id = cluster ID&lt;br /&gt;
||&lt;br /&gt;
# HTTP accepted is returned (202)&lt;br /&gt;
# HTTP Bad request is returned (400)&lt;br /&gt;
||&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
====Integration Tests====&lt;br /&gt;
&lt;br /&gt;
The integration tests will cover API functionality from HTTP request to database access and task submission for RPC workers.  The Pecan test utility will be used to route test request URI to appropriate controllers, then database record(s) will be verified for applicable change.  Finally the creation of task objections will be verified to ensure valid task flows.&lt;/div&gt;</summary>
		<author><name>Dagnello</name></author>	</entry>

	<entry>
		<id>https://wiki.openstack.org/w/index.php?title=Cue/api_2&amp;diff=70291</id>
		<title>Cue/api 2</title>
		<link rel="alternate" type="text/html" href="https://wiki.openstack.org/w/index.php?title=Cue/api_2&amp;diff=70291"/>
				<updated>2014-12-12T23:32:00Z</updated>
		
		<summary type="html">&lt;p&gt;Dagnello: /* Cue API Design */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;== Cue API Design ==&lt;br /&gt;
=== Acronyms ===&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
! '''Acronym''' !! '''Definition'''&lt;br /&gt;
|-&lt;br /&gt;
| SSL || Secure Sockets Layer&lt;br /&gt;
|-&lt;br /&gt;
| REST || Representational State Transfer&lt;br /&gt;
|-&lt;br /&gt;
| URI || Uniform Resource Identifier&lt;br /&gt;
|-&lt;br /&gt;
| UUID || Universally Unique Identifier&lt;br /&gt;
|-&lt;br /&gt;
| AMQP || Advanced Messaging Queuing Protocol&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
=== Requirements ===&lt;br /&gt;
&lt;br /&gt;
API Requirements for Cue - Kilo timeframe.&lt;br /&gt;
&lt;br /&gt;
* Keystone integration&lt;br /&gt;
* CRUD on Cluster&lt;br /&gt;
* Cluster Management – Scale up/down&lt;br /&gt;
* Devstack integration&lt;br /&gt;
* Gate Tests&lt;br /&gt;
&lt;br /&gt;
=== System Context Diagram ===&lt;br /&gt;
&lt;br /&gt;
[[File:SCD.jpg]]&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
! '''Component''' !! '''Description'''&lt;br /&gt;
|-&lt;br /&gt;
| User || Direct customer of Cue.&lt;br /&gt;
|-&lt;br /&gt;
| Horizon || Cue functionality will be added to Horizon, which will provide a web-based portal for Cue control.&lt;br /&gt;
|-&lt;br /&gt;
| CLI || Command Line Interface to Cue, provides user access to provisioning and deploying messaging clusters.&lt;br /&gt;
|-&lt;br /&gt;
| REST_API || Provides user access to provisioning and deploying messaging clusters through REST interface.  This is a light-weight interface, provisioning and configuration of clusters/nodes is delegated to the TaskWorker process.&lt;br /&gt;
|-&lt;br /&gt;
| TaskScheduler || Used to synchronize work tasks between the REST_API and TaskWorker processes.&lt;br /&gt;
|-&lt;br /&gt;
| TaskWorker || Carries out work associated with all provisioning, configuration and management of RabbitMQ clusters and nodes.  Makes use of heat for initial provisioning/deployment.&lt;br /&gt;
|-&lt;br /&gt;
| DB || Database to store information on clusters and nodes.  Example, in cluster creation, when request is initially received through REST_API, this DB is updated accordingly and the work is delegated to TaskWorker.  TaskWorker then updates this DB as provisioning and configuration takes place.  Subsequent calls to check on status of cluster creation, will return updated information from this DB.&lt;br /&gt;
|-&lt;br /&gt;
| Heat || Used cloud instance orchestration in deploying RabbitMQ cluster images.&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
=== REST API ===&lt;br /&gt;
&lt;br /&gt;
General requirement, REST API must respond within 500ms.&lt;br /&gt;
==== List Clusters ====&lt;br /&gt;
&lt;br /&gt;
'''''GET /v1/clusters'''''&lt;br /&gt;
&lt;br /&gt;
This operation synchronously returns all clusters provisioned within the associated project id.&lt;br /&gt;
&lt;br /&gt;
'''Request Parameters'''&lt;br /&gt;
N/A&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
! Response !! Code(s)&lt;br /&gt;
|-&lt;br /&gt;
| Normal || ok (200)&lt;br /&gt;
|-&lt;br /&gt;
| Error || unauthorized (401)&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
'''Response Parameters'''&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
! Parameter !! Type !! Description&lt;br /&gt;
|-&lt;br /&gt;
| cluster(list) || string || List of clusters, detailing respective cluster id, name, status, created time stamp and updated time stamp.&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
	&lt;br /&gt;
&lt;br /&gt;
'''JSON Request'''&lt;br /&gt;
&lt;br /&gt;
N/A&lt;br /&gt;
&lt;br /&gt;
'''JSON Response'''&lt;br /&gt;
&lt;br /&gt;
{&lt;br /&gt;
    &amp;quot;clusters&amp;quot;: &amp;lt;nowiki&amp;gt;[&amp;lt;/nowiki&amp;gt;&lt;br /&gt;
        {&lt;br /&gt;
            &amp;quot;cluster_id&amp;quot;: &amp;quot;b51948c9-1ac5-4c28-a580-6f7c500d82f8&amp;quot;,&lt;br /&gt;
            &amp;quot;network_id&amp;quot;: &amp;quot;d32019d3-bc6e-4319-9c1d-6722fc136a22&amp;quot;,&lt;br /&gt;
            &amp;quot;name&amp;quot;: &amp;quot;Message Cluster 1&amp;quot;,&lt;br /&gt;
            &amp;quot;status&amp;quot;: &amp;quot;ACTIVE&amp;quot;,&lt;br /&gt;
            &amp;quot;flavor&amp;quot;: &amp;quot;medium&amp;quot;,&lt;br /&gt;
            &amp;quot;size&amp;quot;: &amp;quot;3&amp;quot;,&lt;br /&gt;
            &amp;quot;created&amp;quot;: &amp;quot;2014-11-11T01:02:03Z&amp;quot;,&lt;br /&gt;
            &amp;quot;updated&amp;quot;: &amp;quot;2014-11-11T01:02:03Z&amp;quot;&lt;br /&gt;
        },&lt;br /&gt;
        {&lt;br /&gt;
            &amp;quot;cluster_id&amp;quot;: &amp;quot;13c456c9-bbfc-4c31-b26d-3ae5c3cd7a77&amp;quot;,&lt;br /&gt;
            &amp;quot;network_id&amp;quot;: &amp;quot;d32019d3-bc6e-4319-9c1d-6722fc136a22&amp;quot;,&lt;br /&gt;
            &amp;quot;name&amp;quot;: &amp;quot;Message Cluster 2&amp;quot;,&lt;br /&gt;
            &amp;quot;status&amp;quot;: &amp;quot;BUILDING&amp;quot;,&lt;br /&gt;
            &amp;quot;flavor&amp;quot;: &amp;quot;small&amp;quot;,&lt;br /&gt;
            &amp;quot;size&amp;quot;: &amp;quot;5&amp;quot;,&lt;br /&gt;
            &amp;quot;created&amp;quot;: &amp;quot;2014-11-12T13:23:54Z&amp;quot;,&lt;br /&gt;
            &amp;quot;updated&amp;quot;: &amp;quot;2014-11-13T19:55:01Z&amp;quot;&lt;br /&gt;
        }&lt;br /&gt;
    ]&lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
==== Create Cluster ====&lt;br /&gt;
&lt;br /&gt;
'''''POST /v1/clusters'''''&lt;br /&gt;
&lt;br /&gt;
This operation asynchronously creates a new cluster of Nova instances provisioned with the required message brokers in a central project id. &lt;br /&gt;
&lt;br /&gt;
'''Request Parameters'''&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
! Parameter !! Type !! Description&lt;br /&gt;
|-&lt;br /&gt;
| network_id || UUID || Network Identification for a Neutron network where cluster will be created in.&lt;br /&gt;
|-&lt;br /&gt;
| name || string || Name of cluster.&lt;br /&gt;
|-&lt;br /&gt;
| flavor || string || Cluster node flavor, which specify VM type in terms of CPU/memory/disk resources.  See http://docs.openstack.org/openstack-ops/content/flavors.html for more information.&lt;br /&gt;
|-&lt;br /&gt;
| size || int || Number of nodes in cluster.&lt;br /&gt;
|-&lt;br /&gt;
| volume_size || int || Optional parameter to indicate size of volume for node instance.  If volumes are supported, then this parameter will be used.  If ephmeral disk are not supported, volume support will be required.&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
'''Response Codes'''&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
! Response !! Code(s)&lt;br /&gt;
|-&lt;br /&gt;
| Normal || 202 (accepted)&lt;br /&gt;
|-&lt;br /&gt;
| Error || badRequest (400), unauthorized (401), itemNotFound (404)&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
'''Response Parameters'''&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
! Parameter !! Type !! Description&lt;br /&gt;
|-&lt;br /&gt;
| cluster_id || UUID || ID of cluster to be created.&lt;br /&gt;
|-&lt;br /&gt;
| network_id || UUID || Network Identification for a Neutron network where cluster will be created in.&lt;br /&gt;
|-&lt;br /&gt;
| name || string || Name of cluster (same as provided name in request parameters).&lt;br /&gt;
|-&lt;br /&gt;
| status || string || Current status of cluster.&lt;br /&gt;
&lt;br /&gt;
BUILDING: Cluster is in progress of being provisioned.&lt;br /&gt;
&lt;br /&gt;
UPDATING:  Cluster in process of being updated.&lt;br /&gt;
&lt;br /&gt;
ACTIVE:  Cluster is running.&lt;br /&gt;
&lt;br /&gt;
ERROR: Provisioning error(s) encountered.&lt;br /&gt;
&lt;br /&gt;
DELETING: Cluster is in process of being deleted.&lt;br /&gt;
&lt;br /&gt;
DELETED:  Cluster has been deleted.&lt;br /&gt;
|-&lt;br /&gt;
| flavor || string || Cluster node flavor, which specify VM type in terms of CPU/memory/disk resources.  See http://docs.openstack.org/openstack-ops/content/flavors.html for more information.&lt;br /&gt;
|-&lt;br /&gt;
| size || int || Number of nodes in cluster.&lt;br /&gt;
|-&lt;br /&gt;
| volume_size || int || Indicate size of volume for node instance.&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
'''JSON Request'''&lt;br /&gt;
&lt;br /&gt;
{&lt;br /&gt;
    &amp;quot;network_id&amp;quot;: &amp;quot;d32019d3-bc6e-4319-9c1d-6722fc136a22&amp;quot;,&lt;br /&gt;
    &amp;quot;name&amp;quot;: &amp;quot;MessageCluster1&amp;quot;,&lt;br /&gt;
    &amp;quot;flavor&amp;quot;: &amp;quot;large&amp;quot;,&lt;br /&gt;
    &amp;quot;size&amp;quot;: &amp;quot;3&amp;quot;,&lt;br /&gt;
    &amp;quot;volume_size&amp;quot;: &amp;quot;100&amp;quot;&lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
'''JSON Response'''&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
{&lt;br /&gt;
    &amp;quot;cluster&amp;quot;: {&lt;br /&gt;
        &amp;quot;cluster_id&amp;quot;: &amp;quot;dd745f4a-9333-417e-bb89-9c989c84c068&amp;quot;,&lt;br /&gt;
        &amp;quot;network_id&amp;quot;: &amp;quot;d32019d3-bc6e-4319-9c1d-6722fc136a22&amp;quot;,&lt;br /&gt;
        &amp;quot;name&amp;quot;: &amp;quot;Message Cluster 1&amp;quot;,&lt;br /&gt;
        &amp;quot;status&amp;quot;: &amp;quot;BUILDING&amp;quot;,&lt;br /&gt;
        &amp;quot;flavor&amp;quot;: &amp;quot;large&amp;quot;,&lt;br /&gt;
        &amp;quot;size&amp;quot;: &amp;quot;3&amp;quot;,&lt;br /&gt;
        &amp;quot;volume_size&amp;quot;: &amp;quot;100&amp;quot;,&lt;br /&gt;
        &amp;quot;created&amp;quot;: &amp;quot;2014-11-11T01:02:03Z&amp;quot;,&lt;br /&gt;
        &amp;quot;updated&amp;quot;: &amp;quot;2014-11-11T01:02:03Z&amp;quot;&lt;br /&gt;
    }&lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
==== Show Cluster ====&lt;br /&gt;
&lt;br /&gt;
'''''GET /v1/clusters/{cluster_id}'''''&lt;br /&gt;
&lt;br /&gt;
This operation synchronously returns the status and information on the specified cluster within the provided project id.&lt;br /&gt;
&lt;br /&gt;
'''Request Parameters'''&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
! Parameter !! Type !! Description&lt;br /&gt;
|-&lt;br /&gt;
| cluster_id (URI) || UUID || Cluster ID.  This value is returned when a new cluster is created.&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
'''Response Codes'''&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
! Response !! Code(s)&lt;br /&gt;
|-&lt;br /&gt;
| Normal || ok (200)&lt;br /&gt;
|-&lt;br /&gt;
| Error || unauthorized (401), itemNotFound (404)&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
'''Response Parameters'''&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
! Parameter !! Type !! Description&lt;br /&gt;
|-&lt;br /&gt;
| cluster_id || UUID || ID of requested cluster.&lt;br /&gt;
|-&lt;br /&gt;
| name || string || Name of cluster.&lt;br /&gt;
|-&lt;br /&gt;
| status || string || Current status of cluster.&lt;br /&gt;
&lt;br /&gt;
BUILDING: Cluster is in progress of being provisioned.&lt;br /&gt;
&lt;br /&gt;
UPDATING:  Cluster in process of being updated.&lt;br /&gt;
&lt;br /&gt;
ACTIVE:  Cluster is running.&lt;br /&gt;
&lt;br /&gt;
ERROR: Provisioning error(s) encountered.&lt;br /&gt;
&lt;br /&gt;
DELETING: Cluster is in process of being deleted.&lt;br /&gt;
&lt;br /&gt;
DELETED:  Cluster has been deleted.&lt;br /&gt;
|-&lt;br /&gt;
| created || string || Created time stamp in format: yyyy-mm-ddThh:mm:ssZ&lt;br /&gt;
|-&lt;br /&gt;
| updated || string || Last updated time stamp in format: yyyy-mm-ddThh:mm:ssZ&lt;br /&gt;
|-&lt;br /&gt;
| nodes(list) || node || List of nodes, which includes node id, instance state, and flavor.&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
'''JSON Request'''&lt;br /&gt;
&lt;br /&gt;
N/A&lt;br /&gt;
&lt;br /&gt;
'''JSON Response'''&lt;br /&gt;
&lt;br /&gt;
{&lt;br /&gt;
    &amp;quot;cluster&amp;quot;: {&lt;br /&gt;
        &amp;quot;cluster_id&amp;quot;: &amp;quot;dd745f4a-9333-417e-bb89-9c989c84c068&amp;quot;,&lt;br /&gt;
        &amp;quot;network_id&amp;quot;: &amp;quot;d32019d3-bc6e-4319-9c1d-6722fc136a22&amp;quot;,&lt;br /&gt;
        &amp;quot;name&amp;quot;: &amp;quot;Message Cluster 1&amp;quot;,&lt;br /&gt;
        &amp;quot;status&amp;quot;: &amp;quot;ACTIVE&amp;quot;,&lt;br /&gt;
        &amp;quot;flavor&amp;quot;: &amp;quot;large&amp;quot;,&lt;br /&gt;
        &amp;quot;size&amp;quot;: &amp;quot;3&amp;quot;,&lt;br /&gt;
        &amp;quot;volume_size&amp;quot;: &amp;quot;100&amp;quot;,&lt;br /&gt;
        &amp;quot;created&amp;quot;: &amp;quot;2014-11-11T01:02:03Z&amp;quot;,&lt;br /&gt;
        &amp;quot;updated&amp;quot;: &amp;quot;2014-11-11T01:02:03Z&amp;quot;,&lt;br /&gt;
        &amp;quot;endpoints&amp;quot;: [&lt;br /&gt;
            {&lt;br /&gt;
                &amp;quot;type&amp;quot;: &amp;quot;AMQP&amp;quot;,&lt;br /&gt;
                &amp;quot;value&amp;quot;: &amp;quot;amqp://10.20.30.40:10000&amp;quot;&lt;br /&gt;
            },&lt;br /&gt;
            {&lt;br /&gt;
                &amp;quot;type&amp;quot;: &amp;quot;console&amp;quot;,&lt;br /&gt;
                &amp;quot;value&amp;quot;: &amp;quot;http://10.20.30.40:5672&amp;quot;&lt;br /&gt;
            },&lt;br /&gt;
            {&lt;br /&gt;
                &amp;quot;type&amp;quot;: &amp;quot;AMQP&amp;quot;,&lt;br /&gt;
                &amp;quot;value&amp;quot;: &amp;quot;amqp://10.20.30.41:10000&amp;quot;&lt;br /&gt;
            },&lt;br /&gt;
            {&lt;br /&gt;
                &amp;quot;type&amp;quot;: &amp;quot;console&amp;quot;,&lt;br /&gt;
                &amp;quot;value&amp;quot;: &amp;quot;http://10.20.30.41:5672&amp;quot;&lt;br /&gt;
            },&lt;br /&gt;
            {&lt;br /&gt;
                &amp;quot;type&amp;quot;: &amp;quot;AMQP&amp;quot;,&lt;br /&gt;
                &amp;quot;value&amp;quot;: &amp;quot;amqp://10.20.30.42:10000&amp;quot;&lt;br /&gt;
            },&lt;br /&gt;
            {&lt;br /&gt;
                &amp;quot;type&amp;quot;: &amp;quot;console&amp;quot;,&lt;br /&gt;
                &amp;quot;value&amp;quot;: &amp;quot;http://10.20.30.42:5672&amp;quot;&lt;br /&gt;
            }&lt;br /&gt;
        ]&lt;br /&gt;
    }&lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
==== Delete Cluster ====&lt;br /&gt;
&lt;br /&gt;
'''''DELETE /v1/clusters/{cluster_id}'''''''&lt;br /&gt;
&lt;br /&gt;
This operation will asynchronously delete the indicated cluster within the provided project id.&lt;br /&gt;
&lt;br /&gt;
'''Request Parameters'''&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
! Parameter !! Type !! Description&lt;br /&gt;
|-&lt;br /&gt;
| cluster_id (URI) || UUID || Cluster ID.  This value is returned when a new cluster is created.&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
'''Response Codes'''&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
! Response !! Code(s)&lt;br /&gt;
|-&lt;br /&gt;
| Normal || accepted (202)&lt;br /&gt;
|-&lt;br /&gt;
| Error || unauthorized (401), itemNotFound (404)&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
'''Response Parameters'''&lt;br /&gt;
&lt;br /&gt;
N/A&lt;br /&gt;
&lt;br /&gt;
'''JSON Request'''&lt;br /&gt;
&lt;br /&gt;
N/A&lt;br /&gt;
&lt;br /&gt;
'''JSON Response'''&lt;br /&gt;
&lt;br /&gt;
N/A&lt;br /&gt;
&lt;br /&gt;
==== Update Cluster ====&lt;br /&gt;
&lt;br /&gt;
'''''PATCH /v1/clusters/{cluster_id}'''''&lt;br /&gt;
&lt;br /&gt;
This operation will asynchronously updated the indicated cluster (cluster_id) based on the request body received.  The request body structure is the same as create cluster api.  Cue will automatically detect differences and perform appropriate actions in order to update cluster accordingly.&lt;br /&gt;
&lt;br /&gt;
'''Request Parameters'''&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
! Parameter !! Type !! Description&lt;br /&gt;
|-&lt;br /&gt;
| network_id || UUID || Network Identification for a Neutron network where cluster will be created in.&lt;br /&gt;
|-&lt;br /&gt;
| name || string || Name of cluster.&lt;br /&gt;
|-&lt;br /&gt;
| flavor || string || Cluster node flavor, which specify VM type in terms of CPU/memory/disk resources.  See http://docs.openstack.org/openstack-ops/content/flavors.html for more information.&lt;br /&gt;
&lt;br /&gt;
small:  1 GHz dual-core CPU; 512 MB memory; 250 GB disk&lt;br /&gt;
&lt;br /&gt;
medium: 2.8 GHz dual-core CPU; 4 GB memory; 1 TB disk&lt;br /&gt;
&lt;br /&gt;
large: 3.6 GHz quad-core CPU; 32 GB memory; 5 TB disk&lt;br /&gt;
|-&lt;br /&gt;
| size || int || Number of nodes in cluster.&lt;br /&gt;
|-&lt;br /&gt;
| volume_size || int || Optional parameter to indicate size of volume for node instance.  If volumes are supported, then this parameter will be used.  If ephmeral disk are not supported, volume support will be required.&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
'''Response Codes'''&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
! Response !! Code(s)&lt;br /&gt;
|-&lt;br /&gt;
| Normal || 202 (accepted)&lt;br /&gt;
|-&lt;br /&gt;
| Error || badRequest (400), unauthorized (401), itemNotFound (404)&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
'''Response Parameters'''&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
! Parameter !! Type !! Description&lt;br /&gt;
|-&lt;br /&gt;
| cluster_id || UUID || ID of cluster to be created.&lt;br /&gt;
|-&lt;br /&gt;
| network_id || UUID || Network Identification for a Neutron network where cluster will be created in.&lt;br /&gt;
|-&lt;br /&gt;
| name || string || Name of cluster (same as provided name in request parameters).&lt;br /&gt;
|-&lt;br /&gt;
| status || string || Current status of cluster.&lt;br /&gt;
&lt;br /&gt;
BUILDING: Cluster is in progress of being provisioned.&lt;br /&gt;
&lt;br /&gt;
UPDATING:  Cluster in process of being updated.&lt;br /&gt;
&lt;br /&gt;
ACTIVE:  Cluster is running.&lt;br /&gt;
&lt;br /&gt;
ERROR: Provisioning error(s) encountered.&lt;br /&gt;
&lt;br /&gt;
DELETING: Cluster is in process of being deleted.&lt;br /&gt;
&lt;br /&gt;
DELETED:  Cluster has been deleted.&lt;br /&gt;
|-&lt;br /&gt;
| flavor || string || Cluster node flavor, which specify VM type in terms of CPU/memory/disk resources.  See http://docs.openstack.org/openstack-ops/content/flavors.html for more information.&lt;br /&gt;
|-&lt;br /&gt;
| size || int || Number of nodes in cluster.&lt;br /&gt;
|-&lt;br /&gt;
| volume_size || int || Optional parameter to indicate size of volume for node instance.  If volumes are supported, then this parameter will be used.  If ephmeral disk are not supported, volume support will be required.&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
'''JSON Request'''&lt;br /&gt;
&lt;br /&gt;
{&lt;br /&gt;
    &amp;quot;network_id&amp;quot;: &amp;quot;d32019d3-bc6e-4319-9c1d-6722fc136a22&amp;quot;,&lt;br /&gt;
    &amp;quot;name&amp;quot;: &amp;quot;MessageCluster1&amp;quot;,&lt;br /&gt;
    &amp;quot;flavor&amp;quot;: &amp;quot;medium&amp;quot;,&lt;br /&gt;
    &amp;quot;size&amp;quot;: &amp;quot;5&amp;quot;,&lt;br /&gt;
    &amp;quot;volume_size&amp;quot;: &amp;quot;200&amp;quot;&lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
'''JSON Response'''&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
{&lt;br /&gt;
    &amp;quot;cluster&amp;quot;: {&lt;br /&gt;
        &amp;quot;cluster_id&amp;quot;: &amp;quot;dd745f4a-9333-417e-bb89-9c989c84c068&amp;quot;,&lt;br /&gt;
        &amp;quot;network_id&amp;quot;: &amp;quot;d32019d3-bc6e-4319-9c1d-6722fc136a22&amp;quot;,&lt;br /&gt;
        &amp;quot;name&amp;quot;: &amp;quot;Message Cluster 1&amp;quot;,&lt;br /&gt;
        &amp;quot;status&amp;quot;: &amp;quot;UPDATING&amp;quot;,&lt;br /&gt;
        &amp;quot;flavor&amp;quot;: &amp;quot;medium&amp;quot;,&lt;br /&gt;
        &amp;quot;size&amp;quot;: &amp;quot;5&amp;quot;,&lt;br /&gt;
        &amp;quot;volume_size&amp;quot;: &amp;quot;200&amp;quot;,&lt;br /&gt;
        &amp;quot;created&amp;quot;: &amp;quot;2014-11-11T01:02:03Z&amp;quot;,&lt;br /&gt;
        &amp;quot;updated&amp;quot;: &amp;quot;2014-11-11T01:02:03Z&amp;quot;&lt;br /&gt;
    }&lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
===Testing===&lt;br /&gt;
&lt;br /&gt;
Cue API testing will verify the expected functionality of the Cue user interface with both positive/negative tests.  The overall scope will cover testing from the HTTP REST request to required database interactions and work-flow task submission for RPC workers.&lt;br /&gt;
&lt;br /&gt;
====Unit Tests====&lt;br /&gt;
&lt;br /&gt;
Unit tests will verify the resulting function calls for each REST-ful URI and action(s).  The Python Mock library will be used to replace external system dependencies with placeholder objects.&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
! Function !! Tests !! Input Data !! Expected Result(s)&lt;br /&gt;
|-&lt;br /&gt;
| List Clusters || &lt;br /&gt;
# Create 'n' cluster(s), then call list clusters and verify expected return object&lt;br /&gt;
# Call list clusters when no clusters exist within a project id and verify expected return object&lt;br /&gt;
|| &lt;br /&gt;
* n = # of clusters to create&lt;br /&gt;
||&lt;br /&gt;
# List of 'n' clusters is returned with appropriate fields, HTTP Ok (200)&lt;br /&gt;
# Empty list of clusters is returned, HTTP Ok (200)&lt;br /&gt;
|-&lt;br /&gt;
| Create Cluster || &lt;br /&gt;
# Create standard cluster 'c' and verify expected return object&lt;br /&gt;
# Create cluster with invalid flavor and verify expected return value&lt;br /&gt;
# Create cluster with invalid volume size and verify expected return value&lt;br /&gt;
||&lt;br /&gt;
* n = cluster size (number of nodes)&lt;br /&gt;
* m = cluster name&lt;br /&gt;
* f = flavor&lt;br /&gt;
* s = volume size&lt;br /&gt;
* nic = Network UUID&lt;br /&gt;
||&lt;br /&gt;
# Cluster ID, name and status for newly created cluster is returned, HTTP Accepted (202)&lt;br /&gt;
# HTTP Bad request is returned (400)&lt;br /&gt;
# HTTP Bad request is returned (400)&lt;br /&gt;
|-&lt;br /&gt;
| Show Cluster ||&lt;br /&gt;
# Create cluster, then call get cluster and verify expected return object&lt;br /&gt;
# Get cluster with invalid cluster_id&lt;br /&gt;
||&lt;br /&gt;
* cluster_id = cluster ID&lt;br /&gt;
||&lt;br /&gt;
# Cluster ID, name, status, created/updated date stamp and list of nodes is returned, HTTP Ok (200).&lt;br /&gt;
# HTTP Bad request is returned (400)&lt;br /&gt;
|-&lt;br /&gt;
| Delete Cluster || &lt;br /&gt;
# Create a cluster, then call delete cluster and verify expected return value&lt;br /&gt;
# Delete cluster with invalid cluster_id&lt;br /&gt;
||&lt;br /&gt;
* cluster_id = cluster ID&lt;br /&gt;
||&lt;br /&gt;
# HTTP accepted is returned (202)&lt;br /&gt;
# HTTP Bad request is returned (400)&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
====Functional Tests====&lt;br /&gt;
&lt;br /&gt;
The functional tests will verify the HTTP REST URI request lifecycle from controller routing to HTTP response.  These tests will make use of Pecan's testing utility; pecan.testing module.&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
! Operation !! URI !! Tests !! Input Data !! Expected Data (JSON)&lt;br /&gt;
|-&lt;br /&gt;
| GET || /v1/clusters || &lt;br /&gt;
# Call when clusters exist&lt;br /&gt;
# Call when no clusters exist&lt;br /&gt;
|| &lt;br /&gt;
* n/a&lt;br /&gt;
||&lt;br /&gt;
# List of 'n' clusters is returned with appropriate fields, HTTP Ok (200)&lt;br /&gt;
# Empty list of clusters is returned, HTTP Ok (200)&lt;br /&gt;
|-&lt;br /&gt;
| POST || /v1/clusters ||&lt;br /&gt;
# Create standard cluster 'c' and verify expected return object&lt;br /&gt;
# Create cluster with invalid flavor and verify expected return value&lt;br /&gt;
# Create cluster with invalid volume size and verify expected return value&lt;br /&gt;
|| &lt;br /&gt;
* n = cluster size (number of nodes)&lt;br /&gt;
* m = cluster name&lt;br /&gt;
* f = flavor&lt;br /&gt;
* s = volume size&lt;br /&gt;
* nic = Network UUID&lt;br /&gt;
||&lt;br /&gt;
# Cluster ID, name and status for newly created cluster is returned, HTTP Accepted (202)&lt;br /&gt;
# HTTP Bad request is returned (400)&lt;br /&gt;
# HTTP Bad request is returned (400)&lt;br /&gt;
||&lt;br /&gt;
|-&lt;br /&gt;
| GET || /v1/clusters/{cluster_id} || &lt;br /&gt;
# Create cluster, then call get cluster and verify expected return object&lt;br /&gt;
# Get cluster with invalid cluster_id&lt;br /&gt;
|| &lt;br /&gt;
* cluster_id = cluster &lt;br /&gt;
||&lt;br /&gt;
# Cluster ID, name, status, created/updated date stamp and list of nodes is returned, HTTP Ok (200).&lt;br /&gt;
# HTTP Bad request is returned (400)&lt;br /&gt;
||&lt;br /&gt;
|-&lt;br /&gt;
| DELETE || /v1/clusters/{cluster_id} ||&lt;br /&gt;
# Create a cluster, then call delete cluster and verify expected return value&lt;br /&gt;
# Delete cluster with invalid cluster_id&lt;br /&gt;
||&lt;br /&gt;
* cluster_id = cluster ID&lt;br /&gt;
||&lt;br /&gt;
# HTTP accepted is returned (202)&lt;br /&gt;
# HTTP Bad request is returned (400)&lt;br /&gt;
||&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
====Integration Tests====&lt;br /&gt;
&lt;br /&gt;
The integration tests will cover API functionality from HTTP request to database access and task submission for RPC workers.  The Pecan test utility will be used to route test request URI to appropriate controllers, then database record(s) will be verified for applicable change.  Finally the creation of task objections will be verified to ensure valid task flows.&lt;/div&gt;</summary>
		<author><name>Dagnello</name></author>	</entry>

	<entry>
		<id>https://wiki.openstack.org/w/index.php?title=Cue/api_2&amp;diff=70290</id>
		<title>Cue/api 2</title>
		<link rel="alternate" type="text/html" href="https://wiki.openstack.org/w/index.php?title=Cue/api_2&amp;diff=70290"/>
				<updated>2014-12-12T23:30:37Z</updated>
		
		<summary type="html">&lt;p&gt;Dagnello: /* Cue API Design */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;== Cue API Design ==&lt;br /&gt;
=== Acronyms ===&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
! '''Acronym''' !! '''Definition'''&lt;br /&gt;
|-&lt;br /&gt;
| SSL || Secure Sockets Layer&lt;br /&gt;
|-&lt;br /&gt;
| REST || Representational State Transfer&lt;br /&gt;
|-&lt;br /&gt;
| URI || Uniform Resource Identifier&lt;br /&gt;
|-&lt;br /&gt;
| UUID || Universally Unique Identifier&lt;br /&gt;
|-&lt;br /&gt;
| AMQP || Advanced Messaging Queuing Protocol&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
=== Requirements ===&lt;br /&gt;
&lt;br /&gt;
API Requirements for Cue - Kilo timeframe.&lt;br /&gt;
&lt;br /&gt;
* Keystone integration&lt;br /&gt;
* CRUD on Cluster&lt;br /&gt;
* Cluster Management – Scale up/down&lt;br /&gt;
* Devstack integration&lt;br /&gt;
* Gate Tests&lt;br /&gt;
&lt;br /&gt;
=== System Context Diagram ===&lt;br /&gt;
&lt;br /&gt;
[[File:SCD.jpg]]&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
! '''Component''' !! '''Description'''&lt;br /&gt;
|-&lt;br /&gt;
| User || Direct customer of Cue.&lt;br /&gt;
|-&lt;br /&gt;
| Horizon || Cue functionality will be added to Horizon, which will provide a web-based portal for Cue control.&lt;br /&gt;
|-&lt;br /&gt;
| CLI || Command Line Interface to Cue, provides user access to provisioning and deploying messaging clusters.&lt;br /&gt;
|-&lt;br /&gt;
| REST_API || Provides user access to provisioning and deploying messaging clusters through REST interface.  This is a light-weight interface, provisioning and configuration of clusters/nodes is delegated to the TaskWorker process.&lt;br /&gt;
|-&lt;br /&gt;
| TaskScheduler || Used to synchronize work tasks between the REST_API and TaskWorker processes.&lt;br /&gt;
|-&lt;br /&gt;
| TaskWorker || Carries out work associated with all provisioning, configuration and management of RabbitMQ clusters and nodes.  Makes use of heat for initial provisioning/deployment.&lt;br /&gt;
|-&lt;br /&gt;
| DB || Database to store information on clusters and nodes.  Example, in cluster creation, when request is initially received through REST_API, this DB is updated accordingly and the work is delegated to TaskWorker.  TaskWorker then updates this DB as provisioning and configuration takes place.  Subsequent calls to check on status of cluster creation, will return updated information from this DB.&lt;br /&gt;
|-&lt;br /&gt;
| Heat || Used cloud instance orchestration in deploying RabbitMQ cluster images.&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
=== REST API ===&lt;br /&gt;
&lt;br /&gt;
General requirement, REST API must respond within 500ms.&lt;br /&gt;
==== List Clusters ====&lt;br /&gt;
&lt;br /&gt;
'''''GET /v1/clusters'''''&lt;br /&gt;
&lt;br /&gt;
This operation synchronously returns all clusters provisioned within the associated project id.&lt;br /&gt;
&lt;br /&gt;
'''Request Parameters'''&lt;br /&gt;
N/A&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
! Response !! Code(s)&lt;br /&gt;
|-&lt;br /&gt;
| Normal || ok (200)&lt;br /&gt;
|-&lt;br /&gt;
| Error || unauthorized (401)&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
'''Response Parameters'''&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
! Parameter !! Type !! Description&lt;br /&gt;
|-&lt;br /&gt;
| cluster(list) || string || List of clusters, detailing respective cluster id, name, status, created time stamp and updated time stamp.&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
	&lt;br /&gt;
&lt;br /&gt;
'''JSON Request'''&lt;br /&gt;
&lt;br /&gt;
N/A&lt;br /&gt;
&lt;br /&gt;
'''JSON Response'''&lt;br /&gt;
&lt;br /&gt;
{&lt;br /&gt;
    &amp;quot;clusters&amp;quot;: &amp;lt;nowiki&amp;gt;[&amp;lt;/nowiki&amp;gt;&lt;br /&gt;
        {&lt;br /&gt;
            &amp;quot;cluster_id&amp;quot;: &amp;quot;b51948c9-1ac5-4c28-a580-6f7c500d82f8&amp;quot;,&lt;br /&gt;
            &amp;quot;network_id&amp;quot;: &amp;quot;d32019d3-bc6e-4319-9c1d-6722fc136a22&amp;quot;,&lt;br /&gt;
            &amp;quot;name&amp;quot;: &amp;quot;Message Cluster 1&amp;quot;,&lt;br /&gt;
            &amp;quot;status&amp;quot;: &amp;quot;ACTIVE&amp;quot;,&lt;br /&gt;
            &amp;quot;flavor&amp;quot;: &amp;quot;medium&amp;quot;,&lt;br /&gt;
            &amp;quot;size&amp;quot;: &amp;quot;3&amp;quot;,&lt;br /&gt;
            &amp;quot;created&amp;quot;: &amp;quot;2014-11-11T01:02:03Z&amp;quot;,&lt;br /&gt;
            &amp;quot;updated&amp;quot;: &amp;quot;2014-11-11T01:02:03Z&amp;quot;&lt;br /&gt;
        },&lt;br /&gt;
        {&lt;br /&gt;
            &amp;quot;cluster_id&amp;quot;: &amp;quot;13c456c9-bbfc-4c31-b26d-3ae5c3cd7a77&amp;quot;,&lt;br /&gt;
            &amp;quot;network_id&amp;quot;: &amp;quot;d32019d3-bc6e-4319-9c1d-6722fc136a22&amp;quot;,&lt;br /&gt;
            &amp;quot;name&amp;quot;: &amp;quot;Message Cluster 2&amp;quot;,&lt;br /&gt;
            &amp;quot;status&amp;quot;: &amp;quot;BUILDING&amp;quot;,&lt;br /&gt;
            &amp;quot;flavor&amp;quot;: &amp;quot;small&amp;quot;,&lt;br /&gt;
            &amp;quot;size&amp;quot;: &amp;quot;5&amp;quot;,&lt;br /&gt;
            &amp;quot;created&amp;quot;: &amp;quot;2014-11-12T13:23:54Z&amp;quot;,&lt;br /&gt;
            &amp;quot;updated&amp;quot;: &amp;quot;2014-11-13T19:55:01Z&amp;quot;&lt;br /&gt;
        }&lt;br /&gt;
    ]&lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
==== Create Cluster ====&lt;br /&gt;
&lt;br /&gt;
'''''POST /v1/clusters'''''&lt;br /&gt;
&lt;br /&gt;
This operation asynchronously creates a new cluster of Nova instances provisioned with the required message brokers in a central project id. &lt;br /&gt;
&lt;br /&gt;
'''Request Parameters'''&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
! Parameter !! Type !! Description&lt;br /&gt;
|-&lt;br /&gt;
| network_id || UUID || Network Identification for a Neutron network where cluster will be created in.&lt;br /&gt;
|-&lt;br /&gt;
| name || string || Name of cluster.&lt;br /&gt;
|-&lt;br /&gt;
| flavor || string || Cluster node flavor, which specify VM type in terms of CPU/memory/disk resources.  See http://docs.openstack.org/openstack-ops/content/flavors.html for more information.&lt;br /&gt;
|-&lt;br /&gt;
| size || int || Number of nodes in cluster.&lt;br /&gt;
|-&lt;br /&gt;
| volume_size || int || Optional parameter to indicate size of volume for node instance.  If volumes are supported, then this parameter will be used.  If ephmeral disk are not supported, volume support will be required.&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
'''Response Codes'''&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
! Response !! Code(s)&lt;br /&gt;
|-&lt;br /&gt;
| Normal || 202 (accepted)&lt;br /&gt;
|-&lt;br /&gt;
| Error || badRequest (400), unauthorized (401), itemNotFound (404)&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
'''Response Parameters'''&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
! Parameter !! Type !! Description&lt;br /&gt;
|-&lt;br /&gt;
| cluster_id || UUID || ID of cluster to be created.&lt;br /&gt;
|-&lt;br /&gt;
| network_id || UUID || Network Identification for a Neutron network where cluster will be created in.&lt;br /&gt;
|-&lt;br /&gt;
| name || string || Name of cluster (same as provided name in request parameters).&lt;br /&gt;
|-&lt;br /&gt;
| status || string || Current status of cluster.&lt;br /&gt;
&lt;br /&gt;
BUILDING: Cluster is in progress of being provisioned.&lt;br /&gt;
&lt;br /&gt;
UPDATING:  Cluster in process of being updated.&lt;br /&gt;
&lt;br /&gt;
ACTIVE:  Cluster is running.&lt;br /&gt;
&lt;br /&gt;
ERROR: Provisioning error(s) encountered.&lt;br /&gt;
&lt;br /&gt;
DELETING: Cluster is in process of being deleted.&lt;br /&gt;
&lt;br /&gt;
DELETED:  Cluster has been deleted.&lt;br /&gt;
|-&lt;br /&gt;
| flavor || string || Cluster node flavor, which specify VM type in terms of CPU/memory/disk resources (e.g. small, medium, large).&lt;br /&gt;
|-&lt;br /&gt;
| size || int || Number of nodes in cluster.&lt;br /&gt;
|-&lt;br /&gt;
| volume_size || int || Indicate size of volume for node instance.&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
'''JSON Request'''&lt;br /&gt;
&lt;br /&gt;
{&lt;br /&gt;
    &amp;quot;network_id&amp;quot;: &amp;quot;d32019d3-bc6e-4319-9c1d-6722fc136a22&amp;quot;,&lt;br /&gt;
    &amp;quot;name&amp;quot;: &amp;quot;MessageCluster1&amp;quot;,&lt;br /&gt;
    &amp;quot;flavor&amp;quot;: &amp;quot;large&amp;quot;,&lt;br /&gt;
    &amp;quot;size&amp;quot;: &amp;quot;3&amp;quot;,&lt;br /&gt;
    &amp;quot;volume_size&amp;quot;: &amp;quot;100&amp;quot;&lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
'''JSON Response'''&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
{&lt;br /&gt;
    &amp;quot;cluster&amp;quot;: {&lt;br /&gt;
        &amp;quot;cluster_id&amp;quot;: &amp;quot;dd745f4a-9333-417e-bb89-9c989c84c068&amp;quot;,&lt;br /&gt;
        &amp;quot;network_id&amp;quot;: &amp;quot;d32019d3-bc6e-4319-9c1d-6722fc136a22&amp;quot;,&lt;br /&gt;
        &amp;quot;name&amp;quot;: &amp;quot;Message Cluster 1&amp;quot;,&lt;br /&gt;
        &amp;quot;status&amp;quot;: &amp;quot;BUILDING&amp;quot;,&lt;br /&gt;
        &amp;quot;flavor&amp;quot;: &amp;quot;large&amp;quot;,&lt;br /&gt;
        &amp;quot;size&amp;quot;: &amp;quot;3&amp;quot;,&lt;br /&gt;
        &amp;quot;volume_size&amp;quot;: &amp;quot;100&amp;quot;,&lt;br /&gt;
        &amp;quot;created&amp;quot;: &amp;quot;2014-11-11T01:02:03Z&amp;quot;,&lt;br /&gt;
        &amp;quot;updated&amp;quot;: &amp;quot;2014-11-11T01:02:03Z&amp;quot;&lt;br /&gt;
    }&lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
==== Show Cluster ====&lt;br /&gt;
&lt;br /&gt;
'''''GET /v1/clusters/{cluster_id}'''''&lt;br /&gt;
&lt;br /&gt;
This operation synchronously returns the status and information on the specified cluster within the provided project id.&lt;br /&gt;
&lt;br /&gt;
'''Request Parameters'''&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
! Parameter !! Type !! Description&lt;br /&gt;
|-&lt;br /&gt;
| cluster_id (URI) || UUID || Cluster ID.  This value is returned when a new cluster is created.&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
'''Response Codes'''&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
! Response !! Code(s)&lt;br /&gt;
|-&lt;br /&gt;
| Normal || ok (200)&lt;br /&gt;
|-&lt;br /&gt;
| Error || unauthorized (401), itemNotFound (404)&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
'''Response Parameters'''&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
! Parameter !! Type !! Description&lt;br /&gt;
|-&lt;br /&gt;
| cluster_id || UUID || ID of requested cluster.&lt;br /&gt;
|-&lt;br /&gt;
| name || string || Name of cluster.&lt;br /&gt;
|-&lt;br /&gt;
| status || string || Current status of cluster.&lt;br /&gt;
&lt;br /&gt;
BUILDING: Cluster is in progress of being provisioned.&lt;br /&gt;
&lt;br /&gt;
UPDATING:  Cluster in process of being updated.&lt;br /&gt;
&lt;br /&gt;
ACTIVE:  Cluster is running.&lt;br /&gt;
&lt;br /&gt;
ERROR: Provisioning error(s) encountered.&lt;br /&gt;
&lt;br /&gt;
DELETING: Cluster is in process of being deleted.&lt;br /&gt;
&lt;br /&gt;
DELETED:  Cluster has been deleted.&lt;br /&gt;
|-&lt;br /&gt;
| created || string || Created time stamp in format: yyyy-mm-ddThh:mm:ssZ&lt;br /&gt;
|-&lt;br /&gt;
| updated || string || Last updated time stamp in format: yyyy-mm-ddThh:mm:ssZ&lt;br /&gt;
|-&lt;br /&gt;
| nodes(list) || node || List of nodes, which includes node id, instance state, and flavor.&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
'''JSON Request'''&lt;br /&gt;
&lt;br /&gt;
N/A&lt;br /&gt;
&lt;br /&gt;
'''JSON Response'''&lt;br /&gt;
&lt;br /&gt;
{&lt;br /&gt;
    &amp;quot;cluster&amp;quot;: {&lt;br /&gt;
        &amp;quot;cluster_id&amp;quot;: &amp;quot;dd745f4a-9333-417e-bb89-9c989c84c068&amp;quot;,&lt;br /&gt;
        &amp;quot;network_id&amp;quot;: &amp;quot;d32019d3-bc6e-4319-9c1d-6722fc136a22&amp;quot;,&lt;br /&gt;
        &amp;quot;name&amp;quot;: &amp;quot;Message Cluster 1&amp;quot;,&lt;br /&gt;
        &amp;quot;status&amp;quot;: &amp;quot;ACTIVE&amp;quot;,&lt;br /&gt;
        &amp;quot;flavor&amp;quot;: &amp;quot;large&amp;quot;,&lt;br /&gt;
        &amp;quot;size&amp;quot;: &amp;quot;3&amp;quot;,&lt;br /&gt;
        &amp;quot;volume_size&amp;quot;: &amp;quot;100&amp;quot;,&lt;br /&gt;
        &amp;quot;created&amp;quot;: &amp;quot;2014-11-11T01:02:03Z&amp;quot;,&lt;br /&gt;
        &amp;quot;updated&amp;quot;: &amp;quot;2014-11-11T01:02:03Z&amp;quot;,&lt;br /&gt;
        &amp;quot;endpoints&amp;quot;: [&lt;br /&gt;
            {&lt;br /&gt;
                &amp;quot;type&amp;quot;: &amp;quot;AMQP&amp;quot;,&lt;br /&gt;
                &amp;quot;value&amp;quot;: &amp;quot;amqp://10.20.30.40:10000&amp;quot;&lt;br /&gt;
            },&lt;br /&gt;
            {&lt;br /&gt;
                &amp;quot;type&amp;quot;: &amp;quot;console&amp;quot;,&lt;br /&gt;
                &amp;quot;value&amp;quot;: &amp;quot;http://10.20.30.40:5672&amp;quot;&lt;br /&gt;
            },&lt;br /&gt;
            {&lt;br /&gt;
                &amp;quot;type&amp;quot;: &amp;quot;AMQP&amp;quot;,&lt;br /&gt;
                &amp;quot;value&amp;quot;: &amp;quot;amqp://10.20.30.41:10000&amp;quot;&lt;br /&gt;
            },&lt;br /&gt;
            {&lt;br /&gt;
                &amp;quot;type&amp;quot;: &amp;quot;console&amp;quot;,&lt;br /&gt;
                &amp;quot;value&amp;quot;: &amp;quot;http://10.20.30.41:5672&amp;quot;&lt;br /&gt;
            },&lt;br /&gt;
            {&lt;br /&gt;
                &amp;quot;type&amp;quot;: &amp;quot;AMQP&amp;quot;,&lt;br /&gt;
                &amp;quot;value&amp;quot;: &amp;quot;amqp://10.20.30.42:10000&amp;quot;&lt;br /&gt;
            },&lt;br /&gt;
            {&lt;br /&gt;
                &amp;quot;type&amp;quot;: &amp;quot;console&amp;quot;,&lt;br /&gt;
                &amp;quot;value&amp;quot;: &amp;quot;http://10.20.30.42:5672&amp;quot;&lt;br /&gt;
            }&lt;br /&gt;
        ]&lt;br /&gt;
    }&lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
==== Delete Cluster ====&lt;br /&gt;
&lt;br /&gt;
'''''DELETE /v1/clusters/{cluster_id}'''''''&lt;br /&gt;
&lt;br /&gt;
This operation will asynchronously delete the indicated cluster within the provided project id.&lt;br /&gt;
&lt;br /&gt;
'''Request Parameters'''&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
! Parameter !! Type !! Description&lt;br /&gt;
|-&lt;br /&gt;
| cluster_id (URI) || UUID || Cluster ID.  This value is returned when a new cluster is created.&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
'''Response Codes'''&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
! Response !! Code(s)&lt;br /&gt;
|-&lt;br /&gt;
| Normal || accepted (202)&lt;br /&gt;
|-&lt;br /&gt;
| Error || unauthorized (401), itemNotFound (404)&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
'''Response Parameters'''&lt;br /&gt;
&lt;br /&gt;
N/A&lt;br /&gt;
&lt;br /&gt;
'''JSON Request'''&lt;br /&gt;
&lt;br /&gt;
N/A&lt;br /&gt;
&lt;br /&gt;
'''JSON Response'''&lt;br /&gt;
&lt;br /&gt;
N/A&lt;br /&gt;
&lt;br /&gt;
==== Update Cluster ====&lt;br /&gt;
&lt;br /&gt;
'''''PATCH /v1/clusters/{cluster_id}'''''&lt;br /&gt;
&lt;br /&gt;
This operation will asynchronously updated the indicated cluster (cluster_id) based on the request body received.  The request body structure is the same as create cluster api.  Cue will automatically detect differences and perform appropriate actions in order to update cluster accordingly.&lt;br /&gt;
&lt;br /&gt;
'''Request Parameters'''&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
! Parameter !! Type !! Description&lt;br /&gt;
|-&lt;br /&gt;
| network_id || UUID || Network Identification for a Neutron network where cluster will be created in.&lt;br /&gt;
|-&lt;br /&gt;
| name || string || Name of cluster.&lt;br /&gt;
|-&lt;br /&gt;
| flavor || string || Cluster node flavor, which specify VM type in terms of CPU/memory/disk resources (e.g. small, medium, large).&lt;br /&gt;
&lt;br /&gt;
small:  1 GHz dual-core CPU; 512 MB memory; 250 GB disk&lt;br /&gt;
&lt;br /&gt;
medium: 2.8 GHz dual-core CPU; 4 GB memory; 1 TB disk&lt;br /&gt;
&lt;br /&gt;
large: 3.6 GHz quad-core CPU; 32 GB memory; 5 TB disk&lt;br /&gt;
|-&lt;br /&gt;
| size || int || Number of nodes in cluster.&lt;br /&gt;
|-&lt;br /&gt;
| volume_size || int || Optional parameter to indicate size of volume for node instance.  If volumes are supported, then this parameter will be used.  If ephmeral disk are not supported, volume support will be required.&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
'''Response Codes'''&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
! Response !! Code(s)&lt;br /&gt;
|-&lt;br /&gt;
| Normal || 202 (accepted)&lt;br /&gt;
|-&lt;br /&gt;
| Error || badRequest (400), unauthorized (401), itemNotFound (404)&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
'''Response Parameters'''&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
! Parameter !! Type !! Description&lt;br /&gt;
|-&lt;br /&gt;
| cluster_id || UUID || ID of cluster to be created.&lt;br /&gt;
|-&lt;br /&gt;
| network_id || UUID || Network Identification for a Neutron network where cluster will be created in.&lt;br /&gt;
|-&lt;br /&gt;
| name || string || Name of cluster (same as provided name in request parameters).&lt;br /&gt;
|-&lt;br /&gt;
| status || string || Current status of cluster.&lt;br /&gt;
&lt;br /&gt;
BUILDING: Cluster is in progress of being provisioned.&lt;br /&gt;
&lt;br /&gt;
UPDATING:  Cluster in process of being updated.&lt;br /&gt;
&lt;br /&gt;
ACTIVE:  Cluster is running.&lt;br /&gt;
&lt;br /&gt;
ERROR: Provisioning error(s) encountered.&lt;br /&gt;
&lt;br /&gt;
DELETING: Cluster is in process of being deleted.&lt;br /&gt;
&lt;br /&gt;
DELETED:  Cluster has been deleted.&lt;br /&gt;
|-&lt;br /&gt;
| flavor || string || Cluster node flavor, which specify VM type in terms of CPU/memory/disk resources (e.g. small, medium, large).&lt;br /&gt;
|-&lt;br /&gt;
| size || int || Number of nodes in cluster.&lt;br /&gt;
|-&lt;br /&gt;
| volume_size || int || Optional parameter to indicate size of volume for node instance.  If volumes are supported, then this parameter will be used.  If ephmeral disk are not supported, volume support will be required.&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
'''JSON Request'''&lt;br /&gt;
&lt;br /&gt;
{&lt;br /&gt;
    &amp;quot;network_id&amp;quot;: &amp;quot;d32019d3-bc6e-4319-9c1d-6722fc136a22&amp;quot;,&lt;br /&gt;
    &amp;quot;name&amp;quot;: &amp;quot;MessageCluster1&amp;quot;,&lt;br /&gt;
    &amp;quot;flavor&amp;quot;: &amp;quot;medium&amp;quot;,&lt;br /&gt;
    &amp;quot;size&amp;quot;: &amp;quot;5&amp;quot;,&lt;br /&gt;
    &amp;quot;volume_size&amp;quot;: &amp;quot;200&amp;quot;&lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
'''JSON Response'''&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
{&lt;br /&gt;
    &amp;quot;cluster&amp;quot;: {&lt;br /&gt;
        &amp;quot;cluster_id&amp;quot;: &amp;quot;dd745f4a-9333-417e-bb89-9c989c84c068&amp;quot;,&lt;br /&gt;
        &amp;quot;network_id&amp;quot;: &amp;quot;d32019d3-bc6e-4319-9c1d-6722fc136a22&amp;quot;,&lt;br /&gt;
        &amp;quot;name&amp;quot;: &amp;quot;Message Cluster 1&amp;quot;,&lt;br /&gt;
        &amp;quot;status&amp;quot;: &amp;quot;UPDATING&amp;quot;,&lt;br /&gt;
        &amp;quot;flavor&amp;quot;: &amp;quot;medium&amp;quot;,&lt;br /&gt;
        &amp;quot;size&amp;quot;: &amp;quot;5&amp;quot;,&lt;br /&gt;
        &amp;quot;volume_size&amp;quot;: &amp;quot;200&amp;quot;,&lt;br /&gt;
        &amp;quot;created&amp;quot;: &amp;quot;2014-11-11T01:02:03Z&amp;quot;,&lt;br /&gt;
        &amp;quot;updated&amp;quot;: &amp;quot;2014-11-11T01:02:03Z&amp;quot;&lt;br /&gt;
    }&lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
===Testing===&lt;br /&gt;
&lt;br /&gt;
Cue API testing will verify the expected functionality of the Cue user interface with both positive/negative tests.  The overall scope will cover testing from the HTTP REST request to required database interactions and work-flow task submission for RPC workers.&lt;br /&gt;
&lt;br /&gt;
====Unit Tests====&lt;br /&gt;
&lt;br /&gt;
Unit tests will verify the resulting function calls for each REST-ful URI and action(s).  The Python Mock library will be used to replace external system dependencies with placeholder objects.&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
! Function !! Tests !! Input Data !! Expected Result(s)&lt;br /&gt;
|-&lt;br /&gt;
| List Clusters || &lt;br /&gt;
# Create 'n' cluster(s), then call list clusters and verify expected return object&lt;br /&gt;
# Call list clusters when no clusters exist within a project id and verify expected return object&lt;br /&gt;
|| &lt;br /&gt;
* n = # of clusters to create&lt;br /&gt;
||&lt;br /&gt;
# List of 'n' clusters is returned with appropriate fields, HTTP Ok (200)&lt;br /&gt;
# Empty list of clusters is returned, HTTP Ok (200)&lt;br /&gt;
|-&lt;br /&gt;
| Create Cluster || &lt;br /&gt;
# Create standard cluster 'c' and verify expected return object&lt;br /&gt;
# Create cluster with invalid flavor and verify expected return value&lt;br /&gt;
# Create cluster with invalid volume size and verify expected return value&lt;br /&gt;
||&lt;br /&gt;
* n = cluster size (number of nodes)&lt;br /&gt;
* m = cluster name&lt;br /&gt;
* f = flavor&lt;br /&gt;
* s = volume size&lt;br /&gt;
* nic = Network UUID&lt;br /&gt;
||&lt;br /&gt;
# Cluster ID, name and status for newly created cluster is returned, HTTP Accepted (202)&lt;br /&gt;
# HTTP Bad request is returned (400)&lt;br /&gt;
# HTTP Bad request is returned (400)&lt;br /&gt;
|-&lt;br /&gt;
| Show Cluster ||&lt;br /&gt;
# Create cluster, then call get cluster and verify expected return object&lt;br /&gt;
# Get cluster with invalid cluster_id&lt;br /&gt;
||&lt;br /&gt;
* cluster_id = cluster ID&lt;br /&gt;
||&lt;br /&gt;
# Cluster ID, name, status, created/updated date stamp and list of nodes is returned, HTTP Ok (200).&lt;br /&gt;
# HTTP Bad request is returned (400)&lt;br /&gt;
|-&lt;br /&gt;
| Delete Cluster || &lt;br /&gt;
# Create a cluster, then call delete cluster and verify expected return value&lt;br /&gt;
# Delete cluster with invalid cluster_id&lt;br /&gt;
||&lt;br /&gt;
* cluster_id = cluster ID&lt;br /&gt;
||&lt;br /&gt;
# HTTP accepted is returned (202)&lt;br /&gt;
# HTTP Bad request is returned (400)&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
====Functional Tests====&lt;br /&gt;
&lt;br /&gt;
The functional tests will verify the HTTP REST URI request lifecycle from controller routing to HTTP response.  These tests will make use of Pecan's testing utility; pecan.testing module.&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
! Operation !! URI !! Tests !! Input Data !! Expected Data (JSON)&lt;br /&gt;
|-&lt;br /&gt;
| GET || /v1/clusters || &lt;br /&gt;
# Call when clusters exist&lt;br /&gt;
# Call when no clusters exist&lt;br /&gt;
|| &lt;br /&gt;
* n/a&lt;br /&gt;
||&lt;br /&gt;
# List of 'n' clusters is returned with appropriate fields, HTTP Ok (200)&lt;br /&gt;
# Empty list of clusters is returned, HTTP Ok (200)&lt;br /&gt;
|-&lt;br /&gt;
| POST || /v1/clusters ||&lt;br /&gt;
# Create standard cluster 'c' and verify expected return object&lt;br /&gt;
# Create cluster with invalid flavor and verify expected return value&lt;br /&gt;
# Create cluster with invalid volume size and verify expected return value&lt;br /&gt;
|| &lt;br /&gt;
* n = cluster size (number of nodes)&lt;br /&gt;
* m = cluster name&lt;br /&gt;
* f = flavor&lt;br /&gt;
* s = volume size&lt;br /&gt;
* nic = Network UUID&lt;br /&gt;
||&lt;br /&gt;
# Cluster ID, name and status for newly created cluster is returned, HTTP Accepted (202)&lt;br /&gt;
# HTTP Bad request is returned (400)&lt;br /&gt;
# HTTP Bad request is returned (400)&lt;br /&gt;
||&lt;br /&gt;
|-&lt;br /&gt;
| GET || /v1/clusters/{cluster_id} || &lt;br /&gt;
# Create cluster, then call get cluster and verify expected return object&lt;br /&gt;
# Get cluster with invalid cluster_id&lt;br /&gt;
|| &lt;br /&gt;
* cluster_id = cluster &lt;br /&gt;
||&lt;br /&gt;
# Cluster ID, name, status, created/updated date stamp and list of nodes is returned, HTTP Ok (200).&lt;br /&gt;
# HTTP Bad request is returned (400)&lt;br /&gt;
||&lt;br /&gt;
|-&lt;br /&gt;
| DELETE || /v1/clusters/{cluster_id} ||&lt;br /&gt;
# Create a cluster, then call delete cluster and verify expected return value&lt;br /&gt;
# Delete cluster with invalid cluster_id&lt;br /&gt;
||&lt;br /&gt;
* cluster_id = cluster ID&lt;br /&gt;
||&lt;br /&gt;
# HTTP accepted is returned (202)&lt;br /&gt;
# HTTP Bad request is returned (400)&lt;br /&gt;
||&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
====Integration Tests====&lt;br /&gt;
&lt;br /&gt;
The integration tests will cover API functionality from HTTP request to database access and task submission for RPC workers.  The Pecan test utility will be used to route test request URI to appropriate controllers, then database record(s) will be verified for applicable change.  Finally the creation of task objections will be verified to ensure valid task flows.&lt;/div&gt;</summary>
		<author><name>Dagnello</name></author>	</entry>

	<entry>
		<id>https://wiki.openstack.org/w/index.php?title=Cue/api_2&amp;diff=70289</id>
		<title>Cue/api 2</title>
		<link rel="alternate" type="text/html" href="https://wiki.openstack.org/w/index.php?title=Cue/api_2&amp;diff=70289"/>
				<updated>2014-12-12T23:27:38Z</updated>
		
		<summary type="html">&lt;p&gt;Dagnello: /* Cue API Design */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;== Cue API Design ==&lt;br /&gt;
=== Acronyms ===&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
! '''Acronym''' !! '''Definition'''&lt;br /&gt;
|-&lt;br /&gt;
| SSL || Secure Sockets Layer&lt;br /&gt;
|-&lt;br /&gt;
| REST || Representational State Transfer&lt;br /&gt;
|-&lt;br /&gt;
| URI || Uniform Resource Identifier&lt;br /&gt;
|-&lt;br /&gt;
| UUID || Universally Unique Identifier&lt;br /&gt;
|-&lt;br /&gt;
| AMQP || Advanced Messaging Queuing Protocol&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
=== Requirements ===&lt;br /&gt;
&lt;br /&gt;
API Requirements for Cue - Kilo timeframe.&lt;br /&gt;
&lt;br /&gt;
* Keystone integration&lt;br /&gt;
* CRUD on Cluster&lt;br /&gt;
* Cluster Management – Scale up/down&lt;br /&gt;
* Devstack integration&lt;br /&gt;
* Gate Tests&lt;br /&gt;
&lt;br /&gt;
=== System Context Diagram ===&lt;br /&gt;
&lt;br /&gt;
[[File:SCD.jpg]]&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
! '''Component''' !! '''Description'''&lt;br /&gt;
|-&lt;br /&gt;
| User || Direct customer of Cue.&lt;br /&gt;
|-&lt;br /&gt;
| Horizon || Cue functionality will be added to Horizon, which will provide a web-based portal for Cue control.&lt;br /&gt;
|-&lt;br /&gt;
| CLI || Command Line Interface to Cue, provides user access to provisioning and deploying messaging clusters.&lt;br /&gt;
|-&lt;br /&gt;
| REST_API || Provides user access to provisioning and deploying messaging clusters through REST interface.  This is a light-weight interface, provisioning and configuration of clusters/nodes is delegated to the TaskWorker process.&lt;br /&gt;
|-&lt;br /&gt;
| TaskScheduler || Used to synchronize work tasks between the REST_API and TaskWorker processes.&lt;br /&gt;
|-&lt;br /&gt;
| TaskWorker || Carries out work associated with all provisioning, configuration and management of RabbitMQ clusters and nodes.  Makes use of heat for initial provisioning/deployment.&lt;br /&gt;
|-&lt;br /&gt;
| DB || Database to store information on clusters and nodes.  Example, in cluster creation, when request is initially received through REST_API, this DB is updated accordingly and the work is delegated to TaskWorker.  TaskWorker then updates this DB as provisioning and configuration takes place.  Subsequent calls to check on status of cluster creation, will return updated information from this DB.&lt;br /&gt;
|-&lt;br /&gt;
| Heat || Used cloud instance orchestration in deploying RabbitMQ cluster images.&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
=== REST API ===&lt;br /&gt;
&lt;br /&gt;
General requirement, REST API must respond within 500ms.&lt;br /&gt;
==== List Clusters ====&lt;br /&gt;
&lt;br /&gt;
'''''GET /v1/clusters'''''&lt;br /&gt;
&lt;br /&gt;
This operation synchronously returns all clusters provisioned within the associated project id.&lt;br /&gt;
&lt;br /&gt;
'''Request Parameters'''&lt;br /&gt;
N/A&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
! Response !! Code(s)&lt;br /&gt;
|-&lt;br /&gt;
| Normal || ok (200)&lt;br /&gt;
|-&lt;br /&gt;
| Error || unauthorized (401)&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
'''Response Parameters'''&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
! Parameter !! Type !! Description&lt;br /&gt;
|-&lt;br /&gt;
| cluster(list) || string || List of clusters, detailing respective cluster id, name, status, created time stamp and updated time stamp.&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
	&lt;br /&gt;
&lt;br /&gt;
'''JSON Request'''&lt;br /&gt;
&lt;br /&gt;
N/A&lt;br /&gt;
&lt;br /&gt;
'''JSON Response'''&lt;br /&gt;
&lt;br /&gt;
{&lt;br /&gt;
    &amp;quot;clusters&amp;quot;: &amp;lt;nowiki&amp;gt;[&amp;lt;/nowiki&amp;gt;&lt;br /&gt;
        {&lt;br /&gt;
            &amp;quot;cluster_id&amp;quot;: &amp;quot;b51948c9-1ac5-4c28-a580-6f7c500d82f8&amp;quot;,&lt;br /&gt;
            &amp;quot;network_id&amp;quot;: &amp;quot;d32019d3-bc6e-4319-9c1d-6722fc136a22&amp;quot;,&lt;br /&gt;
            &amp;quot;name&amp;quot;: &amp;quot;Message Cluster 1&amp;quot;,&lt;br /&gt;
            &amp;quot;status&amp;quot;: &amp;quot;ACTIVE&amp;quot;,&lt;br /&gt;
            &amp;quot;flavor&amp;quot;: &amp;quot;medium&amp;quot;,&lt;br /&gt;
            &amp;quot;size&amp;quot;: &amp;quot;3&amp;quot;,&lt;br /&gt;
            &amp;quot;created&amp;quot;: &amp;quot;2014-11-11T01:02:03Z&amp;quot;,&lt;br /&gt;
            &amp;quot;updated&amp;quot;: &amp;quot;2014-11-11T01:02:03Z&amp;quot;&lt;br /&gt;
        },&lt;br /&gt;
        {&lt;br /&gt;
            &amp;quot;cluster_id&amp;quot;: &amp;quot;13c456c9-bbfc-4c31-b26d-3ae5c3cd7a77&amp;quot;,&lt;br /&gt;
            &amp;quot;network_id&amp;quot;: &amp;quot;d32019d3-bc6e-4319-9c1d-6722fc136a22&amp;quot;,&lt;br /&gt;
            &amp;quot;name&amp;quot;: &amp;quot;Message Cluster 2&amp;quot;,&lt;br /&gt;
            &amp;quot;status&amp;quot;: &amp;quot;BUILDING&amp;quot;,&lt;br /&gt;
            &amp;quot;flavor&amp;quot;: &amp;quot;small&amp;quot;,&lt;br /&gt;
            &amp;quot;size&amp;quot;: &amp;quot;5&amp;quot;,&lt;br /&gt;
            &amp;quot;created&amp;quot;: &amp;quot;2014-11-12T13:23:54Z&amp;quot;,&lt;br /&gt;
            &amp;quot;updated&amp;quot;: &amp;quot;2014-11-13T19:55:01Z&amp;quot;&lt;br /&gt;
        }&lt;br /&gt;
    ]&lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
==== Create Cluster ====&lt;br /&gt;
&lt;br /&gt;
'''''POST /v1/clusters'''''&lt;br /&gt;
&lt;br /&gt;
This operation asynchronously creates a new cluster of Nova instances provisioned with the required message brokers in a central project id. &lt;br /&gt;
&lt;br /&gt;
'''Request Parameters'''&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
! Parameter !! Type !! Description&lt;br /&gt;
|-&lt;br /&gt;
| network_id || UUID || Network Identification for a Neutron network where cluster will be created in.&lt;br /&gt;
|-&lt;br /&gt;
| name || string || Name of cluster.&lt;br /&gt;
|-&lt;br /&gt;
| flavor || string || Cluster node flavor, which specify VM type in terms of CPU/memory/disk resources (e.g. small, medium, large).&lt;br /&gt;
&lt;br /&gt;
small:  1 GHz dual-core CPU; 512 MB memory; 250 GB disk&lt;br /&gt;
&lt;br /&gt;
medium: 2.8 GHz dual-core CPU; 4 GB memory; 1 TB disk&lt;br /&gt;
&lt;br /&gt;
large: 3.6 GHz quad-core CPU; 32 GB memory; 5 TB disk&lt;br /&gt;
|-&lt;br /&gt;
| size || int || Number of nodes in cluster.&lt;br /&gt;
|-&lt;br /&gt;
| volume_size || int || Optional parameter to indicate size of volume for node instance.  If volumes are supported, then this parameter will be used.  If ephmeral disk are not supported, volume support will be required.&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
'''Response Codes'''&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
! Response !! Code(s)&lt;br /&gt;
|-&lt;br /&gt;
| Normal || 202 (accepted)&lt;br /&gt;
|-&lt;br /&gt;
| Error || badRequest (400), unauthorized (401), itemNotFound (404)&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
'''Response Parameters'''&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
! Parameter !! Type !! Description&lt;br /&gt;
|-&lt;br /&gt;
| cluster_id || UUID || ID of cluster to be created.&lt;br /&gt;
|-&lt;br /&gt;
| network_id || UUID || Network Identification for a Neutron network where cluster will be created in.&lt;br /&gt;
|-&lt;br /&gt;
| name || string || Name of cluster (same as provided name in request parameters).&lt;br /&gt;
|-&lt;br /&gt;
| status || string || Current status of cluster.&lt;br /&gt;
&lt;br /&gt;
BUILDING: Cluster is in progress of being provisioned.&lt;br /&gt;
&lt;br /&gt;
UPDATING:  Cluster in process of being updated.&lt;br /&gt;
&lt;br /&gt;
ACTIVE:  Cluster is running.&lt;br /&gt;
&lt;br /&gt;
ERROR: Provisioning error(s) encountered.&lt;br /&gt;
&lt;br /&gt;
DELETING: Cluster is in process of being deleted.&lt;br /&gt;
&lt;br /&gt;
DELETED:  Cluster has been deleted.&lt;br /&gt;
|-&lt;br /&gt;
| flavor || string || Cluster node flavor, which specify VM type in terms of CPU/memory/disk resources (e.g. small, medium, large).&lt;br /&gt;
|-&lt;br /&gt;
| size || int || Number of nodes in cluster.&lt;br /&gt;
|-&lt;br /&gt;
| volume_size || int || Indicate size of volume for node instance.&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
'''JSON Request'''&lt;br /&gt;
&lt;br /&gt;
{&lt;br /&gt;
    &amp;quot;network_id&amp;quot;: &amp;quot;d32019d3-bc6e-4319-9c1d-6722fc136a22&amp;quot;,&lt;br /&gt;
    &amp;quot;name&amp;quot;: &amp;quot;MessageCluster1&amp;quot;,&lt;br /&gt;
    &amp;quot;flavor&amp;quot;: &amp;quot;large&amp;quot;,&lt;br /&gt;
    &amp;quot;size&amp;quot;: &amp;quot;3&amp;quot;,&lt;br /&gt;
    &amp;quot;volume_size&amp;quot;: &amp;quot;100&amp;quot;&lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
'''JSON Response'''&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
{&lt;br /&gt;
    &amp;quot;cluster&amp;quot;: {&lt;br /&gt;
        &amp;quot;cluster_id&amp;quot;: &amp;quot;dd745f4a-9333-417e-bb89-9c989c84c068&amp;quot;,&lt;br /&gt;
        &amp;quot;network_id&amp;quot;: &amp;quot;d32019d3-bc6e-4319-9c1d-6722fc136a22&amp;quot;,&lt;br /&gt;
        &amp;quot;name&amp;quot;: &amp;quot;Message Cluster 1&amp;quot;,&lt;br /&gt;
        &amp;quot;status&amp;quot;: &amp;quot;BUILDING&amp;quot;,&lt;br /&gt;
        &amp;quot;flavor&amp;quot;: &amp;quot;large&amp;quot;,&lt;br /&gt;
        &amp;quot;size&amp;quot;: &amp;quot;3&amp;quot;,&lt;br /&gt;
        &amp;quot;volume_size&amp;quot;: &amp;quot;100&amp;quot;,&lt;br /&gt;
        &amp;quot;created&amp;quot;: &amp;quot;2014-11-11T01:02:03Z&amp;quot;,&lt;br /&gt;
        &amp;quot;updated&amp;quot;: &amp;quot;2014-11-11T01:02:03Z&amp;quot;&lt;br /&gt;
    }&lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
==== Show Cluster ====&lt;br /&gt;
&lt;br /&gt;
'''''GET /v1/clusters/{cluster_id}'''''&lt;br /&gt;
&lt;br /&gt;
This operation synchronously returns the status and information on the specified cluster within the provided project id.&lt;br /&gt;
&lt;br /&gt;
'''Request Parameters'''&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
! Parameter !! Type !! Description&lt;br /&gt;
|-&lt;br /&gt;
| cluster_id (URI) || UUID || Cluster ID.  This value is returned when a new cluster is created.&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
'''Response Codes'''&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
! Response !! Code(s)&lt;br /&gt;
|-&lt;br /&gt;
| Normal || ok (200)&lt;br /&gt;
|-&lt;br /&gt;
| Error || unauthorized (401), itemNotFound (404)&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
'''Response Parameters'''&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
! Parameter !! Type !! Description&lt;br /&gt;
|-&lt;br /&gt;
| cluster_id || UUID || ID of requested cluster.&lt;br /&gt;
|-&lt;br /&gt;
| name || string || Name of cluster.&lt;br /&gt;
|-&lt;br /&gt;
| status || string || Current status of cluster.&lt;br /&gt;
&lt;br /&gt;
BUILDING: Cluster is in progress of being provisioned.&lt;br /&gt;
&lt;br /&gt;
UPDATING:  Cluster in process of being updated.&lt;br /&gt;
&lt;br /&gt;
ACTIVE:  Cluster is running.&lt;br /&gt;
&lt;br /&gt;
ERROR: Provisioning error(s) encountered.&lt;br /&gt;
&lt;br /&gt;
DELETING: Cluster is in process of being deleted.&lt;br /&gt;
&lt;br /&gt;
DELETED:  Cluster has been deleted.&lt;br /&gt;
|-&lt;br /&gt;
| created || string || Created time stamp in format: yyyy-mm-ddThh:mm:ssZ&lt;br /&gt;
|-&lt;br /&gt;
| updated || string || Last updated time stamp in format: yyyy-mm-ddThh:mm:ssZ&lt;br /&gt;
|-&lt;br /&gt;
| nodes(list) || node || List of nodes, which includes node id, instance state, and flavor.&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
'''JSON Request'''&lt;br /&gt;
&lt;br /&gt;
N/A&lt;br /&gt;
&lt;br /&gt;
'''JSON Response'''&lt;br /&gt;
&lt;br /&gt;
{&lt;br /&gt;
    &amp;quot;cluster&amp;quot;: {&lt;br /&gt;
        &amp;quot;cluster_id&amp;quot;: &amp;quot;dd745f4a-9333-417e-bb89-9c989c84c068&amp;quot;,&lt;br /&gt;
        &amp;quot;network_id&amp;quot;: &amp;quot;d32019d3-bc6e-4319-9c1d-6722fc136a22&amp;quot;,&lt;br /&gt;
        &amp;quot;name&amp;quot;: &amp;quot;Message Cluster 1&amp;quot;,&lt;br /&gt;
        &amp;quot;status&amp;quot;: &amp;quot;ACTIVE&amp;quot;,&lt;br /&gt;
        &amp;quot;flavor&amp;quot;: &amp;quot;large&amp;quot;,&lt;br /&gt;
        &amp;quot;size&amp;quot;: &amp;quot;3&amp;quot;,&lt;br /&gt;
        &amp;quot;volume_size&amp;quot;: &amp;quot;100&amp;quot;,&lt;br /&gt;
        &amp;quot;created&amp;quot;: &amp;quot;2014-11-11T01:02:03Z&amp;quot;,&lt;br /&gt;
        &amp;quot;updated&amp;quot;: &amp;quot;2014-11-11T01:02:03Z&amp;quot;,&lt;br /&gt;
        &amp;quot;endpoints&amp;quot;: [&lt;br /&gt;
            {&lt;br /&gt;
                &amp;quot;type&amp;quot;: &amp;quot;AMQP&amp;quot;,&lt;br /&gt;
                &amp;quot;value&amp;quot;: &amp;quot;amqp://10.20.30.40:10000&amp;quot;&lt;br /&gt;
            },&lt;br /&gt;
            {&lt;br /&gt;
                &amp;quot;type&amp;quot;: &amp;quot;console&amp;quot;,&lt;br /&gt;
                &amp;quot;value&amp;quot;: &amp;quot;http://10.20.30.40:5672&amp;quot;&lt;br /&gt;
            },&lt;br /&gt;
            {&lt;br /&gt;
                &amp;quot;type&amp;quot;: &amp;quot;AMQP&amp;quot;,&lt;br /&gt;
                &amp;quot;value&amp;quot;: &amp;quot;amqp://10.20.30.41:10000&amp;quot;&lt;br /&gt;
            },&lt;br /&gt;
            {&lt;br /&gt;
                &amp;quot;type&amp;quot;: &amp;quot;console&amp;quot;,&lt;br /&gt;
                &amp;quot;value&amp;quot;: &amp;quot;http://10.20.30.41:5672&amp;quot;&lt;br /&gt;
            },&lt;br /&gt;
            {&lt;br /&gt;
                &amp;quot;type&amp;quot;: &amp;quot;AMQP&amp;quot;,&lt;br /&gt;
                &amp;quot;value&amp;quot;: &amp;quot;amqp://10.20.30.42:10000&amp;quot;&lt;br /&gt;
            },&lt;br /&gt;
            {&lt;br /&gt;
                &amp;quot;type&amp;quot;: &amp;quot;console&amp;quot;,&lt;br /&gt;
                &amp;quot;value&amp;quot;: &amp;quot;http://10.20.30.42:5672&amp;quot;&lt;br /&gt;
            }&lt;br /&gt;
        ]&lt;br /&gt;
    }&lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
==== Delete Cluster ====&lt;br /&gt;
&lt;br /&gt;
'''''DELETE /v1/clusters/{cluster_id}'''''''&lt;br /&gt;
&lt;br /&gt;
This operation will asynchronously delete the indicated cluster within the provided project id.&lt;br /&gt;
&lt;br /&gt;
'''Request Parameters'''&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
! Parameter !! Type !! Description&lt;br /&gt;
|-&lt;br /&gt;
| cluster_id (URI) || UUID || Cluster ID.  This value is returned when a new cluster is created.&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
'''Response Codes'''&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
! Response !! Code(s)&lt;br /&gt;
|-&lt;br /&gt;
| Normal || accepted (202)&lt;br /&gt;
|-&lt;br /&gt;
| Error || unauthorized (401), itemNotFound (404)&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
'''Response Parameters'''&lt;br /&gt;
&lt;br /&gt;
N/A&lt;br /&gt;
&lt;br /&gt;
'''JSON Request'''&lt;br /&gt;
&lt;br /&gt;
N/A&lt;br /&gt;
&lt;br /&gt;
'''JSON Response'''&lt;br /&gt;
&lt;br /&gt;
N/A&lt;br /&gt;
&lt;br /&gt;
==== Update Cluster ====&lt;br /&gt;
&lt;br /&gt;
'''''PATCH /v1/clusters/{cluster_id}'''''&lt;br /&gt;
&lt;br /&gt;
This operation will asynchronously updated the indicated cluster (cluster_id) based on the request body received.  The request body structure is the same as create cluster api.  Cue will automatically detect differences and perform appropriate actions in order to update cluster accordingly.&lt;br /&gt;
&lt;br /&gt;
'''Request Parameters'''&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
! Parameter !! Type !! Description&lt;br /&gt;
|-&lt;br /&gt;
| network_id || UUID || Network Identification for a Neutron network where cluster will be created in.&lt;br /&gt;
|-&lt;br /&gt;
| name || string || Name of cluster.&lt;br /&gt;
|-&lt;br /&gt;
| flavor || string || Cluster node flavor, which specify VM type in terms of CPU/memory/disk resources (e.g. small, medium, large).&lt;br /&gt;
&lt;br /&gt;
small:  1 GHz dual-core CPU; 512 MB memory; 250 GB disk&lt;br /&gt;
&lt;br /&gt;
medium: 2.8 GHz dual-core CPU; 4 GB memory; 1 TB disk&lt;br /&gt;
&lt;br /&gt;
large: 3.6 GHz quad-core CPU; 32 GB memory; 5 TB disk&lt;br /&gt;
|-&lt;br /&gt;
| size || int || Number of nodes in cluster.&lt;br /&gt;
|-&lt;br /&gt;
| volume_size || int || Optional parameter to indicate size of volume for node instance.  If volumes are supported, then this parameter will be used.  If ephmeral disk are not supported, volume support will be required.&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
'''Response Codes'''&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
! Response !! Code(s)&lt;br /&gt;
|-&lt;br /&gt;
| Normal || 202 (accepted)&lt;br /&gt;
|-&lt;br /&gt;
| Error || badRequest (400), unauthorized (401), itemNotFound (404)&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
'''Response Parameters'''&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
! Parameter !! Type !! Description&lt;br /&gt;
|-&lt;br /&gt;
| cluster_id || UUID || ID of cluster to be created.&lt;br /&gt;
|-&lt;br /&gt;
| network_id || UUID || Network Identification for a Neutron network where cluster will be created in.&lt;br /&gt;
|-&lt;br /&gt;
| name || string || Name of cluster (same as provided name in request parameters).&lt;br /&gt;
|-&lt;br /&gt;
| status || string || Current status of cluster.&lt;br /&gt;
&lt;br /&gt;
BUILDING: Cluster is in progress of being provisioned.&lt;br /&gt;
&lt;br /&gt;
UPDATING:  Cluster in process of being updated.&lt;br /&gt;
&lt;br /&gt;
ACTIVE:  Cluster is running.&lt;br /&gt;
&lt;br /&gt;
ERROR: Provisioning error(s) encountered.&lt;br /&gt;
&lt;br /&gt;
DELETING: Cluster is in process of being deleted.&lt;br /&gt;
&lt;br /&gt;
DELETED:  Cluster has been deleted.&lt;br /&gt;
|-&lt;br /&gt;
| flavor || string || Cluster node flavor, which specify VM type in terms of CPU/memory/disk resources (e.g. small, medium, large).&lt;br /&gt;
|-&lt;br /&gt;
| size || int || Number of nodes in cluster.&lt;br /&gt;
|-&lt;br /&gt;
| volume_size || int || Optional parameter to indicate size of volume for node instance.  If volumes are supported, then this parameter will be used.  If ephmeral disk are not supported, volume support will be required.&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
'''JSON Request'''&lt;br /&gt;
&lt;br /&gt;
{&lt;br /&gt;
    &amp;quot;network_id&amp;quot;: &amp;quot;d32019d3-bc6e-4319-9c1d-6722fc136a22&amp;quot;,&lt;br /&gt;
    &amp;quot;name&amp;quot;: &amp;quot;MessageCluster1&amp;quot;,&lt;br /&gt;
    &amp;quot;flavor&amp;quot;: &amp;quot;medium&amp;quot;,&lt;br /&gt;
    &amp;quot;size&amp;quot;: &amp;quot;5&amp;quot;,&lt;br /&gt;
    &amp;quot;volume_size&amp;quot;: &amp;quot;200&amp;quot;&lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
'''JSON Response'''&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
{&lt;br /&gt;
    &amp;quot;cluster&amp;quot;: {&lt;br /&gt;
        &amp;quot;cluster_id&amp;quot;: &amp;quot;dd745f4a-9333-417e-bb89-9c989c84c068&amp;quot;,&lt;br /&gt;
        &amp;quot;network_id&amp;quot;: &amp;quot;d32019d3-bc6e-4319-9c1d-6722fc136a22&amp;quot;,&lt;br /&gt;
        &amp;quot;name&amp;quot;: &amp;quot;Message Cluster 1&amp;quot;,&lt;br /&gt;
        &amp;quot;status&amp;quot;: &amp;quot;UPDATING&amp;quot;,&lt;br /&gt;
        &amp;quot;flavor&amp;quot;: &amp;quot;medium&amp;quot;,&lt;br /&gt;
        &amp;quot;size&amp;quot;: &amp;quot;5&amp;quot;,&lt;br /&gt;
        &amp;quot;volume_size&amp;quot;: &amp;quot;200&amp;quot;,&lt;br /&gt;
        &amp;quot;created&amp;quot;: &amp;quot;2014-11-11T01:02:03Z&amp;quot;,&lt;br /&gt;
        &amp;quot;updated&amp;quot;: &amp;quot;2014-11-11T01:02:03Z&amp;quot;&lt;br /&gt;
    }&lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
===Testing===&lt;br /&gt;
&lt;br /&gt;
Cue API testing will verify the expected functionality of the Cue user interface with both positive/negative tests.  The overall scope will cover testing from the HTTP REST request to required database interactions and work-flow task submission for RPC workers.&lt;br /&gt;
&lt;br /&gt;
====Unit Tests====&lt;br /&gt;
&lt;br /&gt;
Unit tests will verify the resulting function calls for each REST-ful URI and action(s).  The Python Mock library will be used to replace external system dependencies with placeholder objects.&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
! Function !! Tests !! Input Data !! Expected Result(s)&lt;br /&gt;
|-&lt;br /&gt;
| List Clusters || &lt;br /&gt;
# Create 'n' cluster(s), then call list clusters and verify expected return object&lt;br /&gt;
# Call list clusters when no clusters exist within a project id and verify expected return object&lt;br /&gt;
|| &lt;br /&gt;
* n = # of clusters to create&lt;br /&gt;
||&lt;br /&gt;
# List of 'n' clusters is returned with appropriate fields, HTTP Ok (200)&lt;br /&gt;
# Empty list of clusters is returned, HTTP Ok (200)&lt;br /&gt;
|-&lt;br /&gt;
| Create Cluster || &lt;br /&gt;
# Create standard cluster 'c' and verify expected return object&lt;br /&gt;
# Create cluster with invalid flavor and verify expected return value&lt;br /&gt;
# Create cluster with invalid volume size and verify expected return value&lt;br /&gt;
||&lt;br /&gt;
* n = cluster size (number of nodes)&lt;br /&gt;
* m = cluster name&lt;br /&gt;
* f = flavor&lt;br /&gt;
* s = volume size&lt;br /&gt;
* nic = Network UUID&lt;br /&gt;
||&lt;br /&gt;
# Cluster ID, name and status for newly created cluster is returned, HTTP Accepted (202)&lt;br /&gt;
# HTTP Bad request is returned (400)&lt;br /&gt;
# HTTP Bad request is returned (400)&lt;br /&gt;
|-&lt;br /&gt;
| Show Cluster ||&lt;br /&gt;
# Create cluster, then call get cluster and verify expected return object&lt;br /&gt;
# Get cluster with invalid cluster_id&lt;br /&gt;
||&lt;br /&gt;
* cluster_id = cluster ID&lt;br /&gt;
||&lt;br /&gt;
# Cluster ID, name, status, created/updated date stamp and list of nodes is returned, HTTP Ok (200).&lt;br /&gt;
# HTTP Bad request is returned (400)&lt;br /&gt;
|-&lt;br /&gt;
| Delete Cluster || &lt;br /&gt;
# Create a cluster, then call delete cluster and verify expected return value&lt;br /&gt;
# Delete cluster with invalid cluster_id&lt;br /&gt;
||&lt;br /&gt;
* cluster_id = cluster ID&lt;br /&gt;
||&lt;br /&gt;
# HTTP accepted is returned (202)&lt;br /&gt;
# HTTP Bad request is returned (400)&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
====Functional Tests====&lt;br /&gt;
&lt;br /&gt;
The functional tests will verify the HTTP REST URI request lifecycle from controller routing to HTTP response.  These tests will make use of Pecan's testing utility; pecan.testing module.&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
! Operation !! URI !! Tests !! Input Data !! Expected Data (JSON)&lt;br /&gt;
|-&lt;br /&gt;
| GET || /v1/clusters || &lt;br /&gt;
# Call when clusters exist&lt;br /&gt;
# Call when no clusters exist&lt;br /&gt;
|| &lt;br /&gt;
* n/a&lt;br /&gt;
||&lt;br /&gt;
# List of 'n' clusters is returned with appropriate fields, HTTP Ok (200)&lt;br /&gt;
# Empty list of clusters is returned, HTTP Ok (200)&lt;br /&gt;
|-&lt;br /&gt;
| POST || /v1/clusters ||&lt;br /&gt;
# Create standard cluster 'c' and verify expected return object&lt;br /&gt;
# Create cluster with invalid flavor and verify expected return value&lt;br /&gt;
# Create cluster with invalid volume size and verify expected return value&lt;br /&gt;
|| &lt;br /&gt;
* n = cluster size (number of nodes)&lt;br /&gt;
* m = cluster name&lt;br /&gt;
* f = flavor&lt;br /&gt;
* s = volume size&lt;br /&gt;
* nic = Network UUID&lt;br /&gt;
||&lt;br /&gt;
# Cluster ID, name and status for newly created cluster is returned, HTTP Accepted (202)&lt;br /&gt;
# HTTP Bad request is returned (400)&lt;br /&gt;
# HTTP Bad request is returned (400)&lt;br /&gt;
||&lt;br /&gt;
|-&lt;br /&gt;
| GET || /v1/clusters/{cluster_id} || &lt;br /&gt;
# Create cluster, then call get cluster and verify expected return object&lt;br /&gt;
# Get cluster with invalid cluster_id&lt;br /&gt;
|| &lt;br /&gt;
* cluster_id = cluster &lt;br /&gt;
||&lt;br /&gt;
# Cluster ID, name, status, created/updated date stamp and list of nodes is returned, HTTP Ok (200).&lt;br /&gt;
# HTTP Bad request is returned (400)&lt;br /&gt;
||&lt;br /&gt;
|-&lt;br /&gt;
| DELETE || /v1/clusters/{cluster_id} ||&lt;br /&gt;
# Create a cluster, then call delete cluster and verify expected return value&lt;br /&gt;
# Delete cluster with invalid cluster_id&lt;br /&gt;
||&lt;br /&gt;
* cluster_id = cluster ID&lt;br /&gt;
||&lt;br /&gt;
# HTTP accepted is returned (202)&lt;br /&gt;
# HTTP Bad request is returned (400)&lt;br /&gt;
||&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
====Integration Tests====&lt;br /&gt;
&lt;br /&gt;
The integration tests will cover API functionality from HTTP request to database access and task submission for RPC workers.  The Pecan test utility will be used to route test request URI to appropriate controllers, then database record(s) will be verified for applicable change.  Finally the creation of task objections will be verified to ensure valid task flows.&lt;/div&gt;</summary>
		<author><name>Dagnello</name></author>	</entry>

	<entry>
		<id>https://wiki.openstack.org/w/index.php?title=Cue/api_2&amp;diff=70288</id>
		<title>Cue/api 2</title>
		<link rel="alternate" type="text/html" href="https://wiki.openstack.org/w/index.php?title=Cue/api_2&amp;diff=70288"/>
				<updated>2014-12-12T23:25:01Z</updated>
		
		<summary type="html">&lt;p&gt;Dagnello: /* Create Cluster */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;== Cue API Design ==&lt;br /&gt;
=== Acronyms ===&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
! '''Acronym''' !! '''Definition'''&lt;br /&gt;
|-&lt;br /&gt;
| SSL || Secure Sockets Layer&lt;br /&gt;
|-&lt;br /&gt;
| REST || Representational State Transfer&lt;br /&gt;
|-&lt;br /&gt;
| URI || Uniform Resource Identifier&lt;br /&gt;
|-&lt;br /&gt;
| UUID || Universally Unique Identifier&lt;br /&gt;
|-&lt;br /&gt;
| AMQP || Advanced Messaging Queuing Protocol&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
=== Requirements ===&lt;br /&gt;
&lt;br /&gt;
API Requirements for Cue - Kilo timeframe.&lt;br /&gt;
&lt;br /&gt;
* Keystone integration&lt;br /&gt;
* CRUD on Cluster&lt;br /&gt;
* Cluster Management – Scale up/down&lt;br /&gt;
* Devstack integration&lt;br /&gt;
* Gate Tests&lt;br /&gt;
&lt;br /&gt;
=== System Context Diagram ===&lt;br /&gt;
&lt;br /&gt;
[[File:SCD.jpg]]&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
! '''Component''' !! '''Description'''&lt;br /&gt;
|-&lt;br /&gt;
| User || Direct customer of Cue.&lt;br /&gt;
|-&lt;br /&gt;
| Horizon || Cue functionality will be added to Horizon, which will provide a web-based portal for Cue control.&lt;br /&gt;
|-&lt;br /&gt;
| CLI || Command Line Interface to Cue, provides user access to provisioning and deploying messaging clusters.&lt;br /&gt;
|-&lt;br /&gt;
| REST_API || Provides user access to provisioning and deploying messaging clusters through REST interface.  This is a light-weight interface, provisioning and configuration of clusters/nodes is delegated to the TaskWorker process.&lt;br /&gt;
|-&lt;br /&gt;
| TaskScheduler || Used to synchronize work tasks between the REST_API and TaskWorker processes.&lt;br /&gt;
|-&lt;br /&gt;
| TaskWorker || Carries out work associated with all provisioning, configuration and management of RabbitMQ clusters and nodes.  Makes use of heat for initial provisioning/deployment.&lt;br /&gt;
|-&lt;br /&gt;
| DB || Database to store information on clusters and nodes.  Example, in cluster creation, when request is initially received through REST_API, this DB is updated accordingly and the work is delegated to TaskWorker.  TaskWorker then updates this DB as provisioning and configuration takes place.  Subsequent calls to check on status of cluster creation, will return updated information from this DB.&lt;br /&gt;
|-&lt;br /&gt;
| Heat || Used cloud instance orchestration in deploying RabbitMQ cluster images.&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
=== REST API ===&lt;br /&gt;
&lt;br /&gt;
General requirement, REST API must respond within 500ms.&lt;br /&gt;
==== List Clusters ====&lt;br /&gt;
&lt;br /&gt;
'''''GET /v1/clusters'''''&lt;br /&gt;
&lt;br /&gt;
This operation synchronously returns all clusters provisioned within the associated project id.&lt;br /&gt;
&lt;br /&gt;
'''Request Parameters'''&lt;br /&gt;
N/A&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
! Response !! Code(s)&lt;br /&gt;
|-&lt;br /&gt;
| Normal || ok (200)&lt;br /&gt;
|-&lt;br /&gt;
| Error || unauthorized (401)&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
'''Response Parameters'''&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
! Parameter !! Type !! Description&lt;br /&gt;
|-&lt;br /&gt;
| cluster(list) || string || List of clusters, detailing respective cluster id, name, status, created time stamp and updated time stamp.&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
	&lt;br /&gt;
&lt;br /&gt;
'''JSON Request'''&lt;br /&gt;
&lt;br /&gt;
N/A&lt;br /&gt;
&lt;br /&gt;
'''JSON Response'''&lt;br /&gt;
&lt;br /&gt;
{&lt;br /&gt;
    &amp;quot;clusters&amp;quot;: &amp;lt;nowiki&amp;gt;[&amp;lt;/nowiki&amp;gt;&lt;br /&gt;
        {&lt;br /&gt;
            &amp;quot;cluster_id&amp;quot;: &amp;quot;b51948c9-1ac5-4c28-a580-6f7c500d82f8&amp;quot;,&lt;br /&gt;
            &amp;quot;network_id&amp;quot;: &amp;quot;d32019d3-bc6e-4319-9c1d-6722fc136a22&amp;quot;,&lt;br /&gt;
            &amp;quot;name&amp;quot;: &amp;quot;Message Cluster 1&amp;quot;,&lt;br /&gt;
            &amp;quot;status&amp;quot;: &amp;quot;ACTIVE&amp;quot;,&lt;br /&gt;
            &amp;quot;flavor&amp;quot;: &amp;quot;medium&amp;quot;,&lt;br /&gt;
            &amp;quot;size&amp;quot;: &amp;quot;3&amp;quot;,&lt;br /&gt;
            &amp;quot;created&amp;quot;: &amp;quot;2014-11-11T01:02:03Z&amp;quot;,&lt;br /&gt;
            &amp;quot;updated&amp;quot;: &amp;quot;2014-11-11T01:02:03Z&amp;quot;&lt;br /&gt;
        },&lt;br /&gt;
        {&lt;br /&gt;
            &amp;quot;cluster_id&amp;quot;: &amp;quot;13c456c9-bbfc-4c31-b26d-3ae5c3cd7a77&amp;quot;,&lt;br /&gt;
            &amp;quot;network_id&amp;quot;: &amp;quot;d32019d3-bc6e-4319-9c1d-6722fc136a22&amp;quot;,&lt;br /&gt;
            &amp;quot;name&amp;quot;: &amp;quot;Message Cluster 2&amp;quot;,&lt;br /&gt;
            &amp;quot;status&amp;quot;: &amp;quot;BUILDING&amp;quot;,&lt;br /&gt;
            &amp;quot;flavor&amp;quot;: &amp;quot;small&amp;quot;,&lt;br /&gt;
            &amp;quot;size&amp;quot;: &amp;quot;5&amp;quot;,&lt;br /&gt;
            &amp;quot;created&amp;quot;: &amp;quot;2014-11-12T13:23:54Z&amp;quot;,&lt;br /&gt;
            &amp;quot;updated&amp;quot;: &amp;quot;2014-11-13T19:55:01Z&amp;quot;&lt;br /&gt;
        }&lt;br /&gt;
    ]&lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
==== Create Cluster ====&lt;br /&gt;
&lt;br /&gt;
'''''POST /v1/clusters'''''&lt;br /&gt;
&lt;br /&gt;
This operation asynchronously creates a new cluster of Nova instances provisioned with the required message brokers in a central project id. &lt;br /&gt;
&lt;br /&gt;
'''Request Parameters'''&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
! Parameter !! Type !! Description&lt;br /&gt;
|-&lt;br /&gt;
| network_id || UUID || Network Identification for a Neutron network where cluster will be created in.&lt;br /&gt;
|-&lt;br /&gt;
| name || string || Name of cluster.&lt;br /&gt;
|-&lt;br /&gt;
| flavor || string || Cluster node flavor, which specify VM type in terms of CPU/memory/disk resources (e.g. small, medium, large).&lt;br /&gt;
&lt;br /&gt;
small:  1 GHz dual-core CPU; 512 MB memory; 250 GB disk&lt;br /&gt;
&lt;br /&gt;
medium: 2.8 GHz dual-core CPU; 4 GB memory; 1 TB disk&lt;br /&gt;
&lt;br /&gt;
large: 3.6 GHz quad-core CPU; 32 GB memory; 5 TB disk&lt;br /&gt;
|-&lt;br /&gt;
| size || int || Number of nodes in cluster.&lt;br /&gt;
|-&lt;br /&gt;
| volume_size || int || Optional parameter to indicate size of volume for node instance.  If volumes are supported, then this parameter will be used.  If ephmeral disk are not supported, volume support will be required.&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
'''Response Codes'''&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
! Response !! Code(s)&lt;br /&gt;
|-&lt;br /&gt;
| Normal || 202 (accepted)&lt;br /&gt;
|-&lt;br /&gt;
| Error || badRequest (400), unauthorized (401), itemNotFound (404)&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
'''Response Parameters'''&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
! Parameter !! Type !! Description&lt;br /&gt;
|-&lt;br /&gt;
| cluster_id || UUID || ID of cluster to be created.&lt;br /&gt;
|-&lt;br /&gt;
| network_id || UUID || Network Identification for a Neutron network where cluster will be created in.&lt;br /&gt;
|-&lt;br /&gt;
| name || string || Name of cluster (same as provided name in request parameters).&lt;br /&gt;
|-&lt;br /&gt;
| status || string || Current status of cluster.&lt;br /&gt;
&lt;br /&gt;
BUILDING: Cluster is in progress of being provisioned.&lt;br /&gt;
&lt;br /&gt;
ACTIVE:  Cluster is running.&lt;br /&gt;
&lt;br /&gt;
ERROR: Provisioning error(s) encountered.&lt;br /&gt;
&lt;br /&gt;
DELETING: Cluster is in process of being deleted.&lt;br /&gt;
&lt;br /&gt;
DELETED:  Cluster has been deleted.&lt;br /&gt;
|-&lt;br /&gt;
| flavor || string || Cluster node flavor, which specify VM type in terms of CPU/memory/disk resources (e.g. small, medium, large).&lt;br /&gt;
|-&lt;br /&gt;
| size || int || Number of nodes in cluster.&lt;br /&gt;
|-&lt;br /&gt;
| volume_size || int || Indicate size of volume for node instance.&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
'''JSON Request'''&lt;br /&gt;
&lt;br /&gt;
{&lt;br /&gt;
    &amp;quot;network_id&amp;quot;: &amp;quot;d32019d3-bc6e-4319-9c1d-6722fc136a22&amp;quot;,&lt;br /&gt;
    &amp;quot;name&amp;quot;: &amp;quot;MessageCluster1&amp;quot;,&lt;br /&gt;
    &amp;quot;flavor&amp;quot;: &amp;quot;large&amp;quot;,&lt;br /&gt;
    &amp;quot;size&amp;quot;: &amp;quot;3&amp;quot;,&lt;br /&gt;
    &amp;quot;volume_size&amp;quot;: &amp;quot;100&amp;quot;&lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
'''JSON Response'''&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
{&lt;br /&gt;
    &amp;quot;cluster&amp;quot;: {&lt;br /&gt;
        &amp;quot;cluster_id&amp;quot;: &amp;quot;dd745f4a-9333-417e-bb89-9c989c84c068&amp;quot;,&lt;br /&gt;
        &amp;quot;network_id&amp;quot;: &amp;quot;d32019d3-bc6e-4319-9c1d-6722fc136a22&amp;quot;,&lt;br /&gt;
        &amp;quot;name&amp;quot;: &amp;quot;Message Cluster 1&amp;quot;,&lt;br /&gt;
        &amp;quot;status&amp;quot;: &amp;quot;BUILDING&amp;quot;,&lt;br /&gt;
        &amp;quot;flavor&amp;quot;: &amp;quot;large&amp;quot;,&lt;br /&gt;
        &amp;quot;size&amp;quot;: &amp;quot;3&amp;quot;,&lt;br /&gt;
        &amp;quot;volume_size&amp;quot;: &amp;quot;100&amp;quot;,&lt;br /&gt;
        &amp;quot;created&amp;quot;: &amp;quot;2014-11-11T01:02:03Z&amp;quot;,&lt;br /&gt;
        &amp;quot;updated&amp;quot;: &amp;quot;2014-11-11T01:02:03Z&amp;quot;&lt;br /&gt;
    }&lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
==== Show Cluster ====&lt;br /&gt;
&lt;br /&gt;
'''''GET /v1/clusters/{cluster_id}'''''&lt;br /&gt;
&lt;br /&gt;
This operation synchronously returns the status and information on the specified cluster within the provided project id.&lt;br /&gt;
&lt;br /&gt;
'''Request Parameters'''&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
! Parameter !! Type !! Description&lt;br /&gt;
|-&lt;br /&gt;
| cluster_id (URI) || UUID || Cluster ID.  This value is returned when a new cluster is created.&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
'''Response Codes'''&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
! Response !! Code(s)&lt;br /&gt;
|-&lt;br /&gt;
| Normal || ok (200)&lt;br /&gt;
|-&lt;br /&gt;
| Error || unauthorized (401), itemNotFound (404)&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
'''Response Parameters'''&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
! Parameter !! Type !! Description&lt;br /&gt;
|-&lt;br /&gt;
| cluster_id || UUID || ID of requested cluster.&lt;br /&gt;
|-&lt;br /&gt;
| name || string || Name of cluster.&lt;br /&gt;
|-&lt;br /&gt;
| status || string || Current status of cluster.&lt;br /&gt;
&lt;br /&gt;
BUILDING: Cluster is in progress of being provisioned.&lt;br /&gt;
&lt;br /&gt;
ACTIVE:  Cluster is running.&lt;br /&gt;
&lt;br /&gt;
ERROR: Provisioning error(s) encountered.&lt;br /&gt;
&lt;br /&gt;
DELETED:  Cluster has been deleted.&lt;br /&gt;
|-&lt;br /&gt;
| created || string || Created time stamp in format: yyyy-mm-ddThh:mm:ssZ&lt;br /&gt;
|-&lt;br /&gt;
| updated || string || Last updated time stamp in format: yyyy-mm-ddThh:mm:ssZ&lt;br /&gt;
|-&lt;br /&gt;
| nodes(list) || node || List of nodes, which includes node id, instance state, and flavor.&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
'''JSON Request'''&lt;br /&gt;
&lt;br /&gt;
N/A&lt;br /&gt;
&lt;br /&gt;
'''JSON Response'''&lt;br /&gt;
&lt;br /&gt;
{&lt;br /&gt;
    &amp;quot;cluster&amp;quot;: {&lt;br /&gt;
        &amp;quot;cluster_id&amp;quot;: &amp;quot;dd745f4a-9333-417e-bb89-9c989c84c068&amp;quot;,&lt;br /&gt;
        &amp;quot;network_id&amp;quot;: &amp;quot;d32019d3-bc6e-4319-9c1d-6722fc136a22&amp;quot;,&lt;br /&gt;
        &amp;quot;name&amp;quot;: &amp;quot;Message Cluster 1&amp;quot;,&lt;br /&gt;
        &amp;quot;status&amp;quot;: &amp;quot;ACTIVE&amp;quot;,&lt;br /&gt;
        &amp;quot;flavor&amp;quot;: &amp;quot;large&amp;quot;,&lt;br /&gt;
        &amp;quot;size&amp;quot;: &amp;quot;3&amp;quot;,&lt;br /&gt;
        &amp;quot;volume_size&amp;quot;: &amp;quot;100&amp;quot;,&lt;br /&gt;
        &amp;quot;created&amp;quot;: &amp;quot;2014-11-11T01:02:03Z&amp;quot;,&lt;br /&gt;
        &amp;quot;updated&amp;quot;: &amp;quot;2014-11-11T01:02:03Z&amp;quot;,&lt;br /&gt;
        &amp;quot;endpoints&amp;quot;: [&lt;br /&gt;
            {&lt;br /&gt;
                &amp;quot;type&amp;quot;: &amp;quot;AMQP&amp;quot;,&lt;br /&gt;
                &amp;quot;value&amp;quot;: &amp;quot;amqp://10.20.30.40:10000&amp;quot;&lt;br /&gt;
            },&lt;br /&gt;
            {&lt;br /&gt;
                &amp;quot;type&amp;quot;: &amp;quot;console&amp;quot;,&lt;br /&gt;
                &amp;quot;value&amp;quot;: &amp;quot;http://10.20.30.40:5672&amp;quot;&lt;br /&gt;
            },&lt;br /&gt;
            {&lt;br /&gt;
                &amp;quot;type&amp;quot;: &amp;quot;AMQP&amp;quot;,&lt;br /&gt;
                &amp;quot;value&amp;quot;: &amp;quot;amqp://10.20.30.41:10000&amp;quot;&lt;br /&gt;
            },&lt;br /&gt;
            {&lt;br /&gt;
                &amp;quot;type&amp;quot;: &amp;quot;console&amp;quot;,&lt;br /&gt;
                &amp;quot;value&amp;quot;: &amp;quot;http://10.20.30.41:5672&amp;quot;&lt;br /&gt;
            },&lt;br /&gt;
            {&lt;br /&gt;
                &amp;quot;type&amp;quot;: &amp;quot;AMQP&amp;quot;,&lt;br /&gt;
                &amp;quot;value&amp;quot;: &amp;quot;amqp://10.20.30.42:10000&amp;quot;&lt;br /&gt;
            },&lt;br /&gt;
            {&lt;br /&gt;
                &amp;quot;type&amp;quot;: &amp;quot;console&amp;quot;,&lt;br /&gt;
                &amp;quot;value&amp;quot;: &amp;quot;http://10.20.30.42:5672&amp;quot;&lt;br /&gt;
            }&lt;br /&gt;
        ]&lt;br /&gt;
    }&lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
==== Delete Cluster ====&lt;br /&gt;
&lt;br /&gt;
'''''DELETE /v1/clusters/{cluster_id}'''''''&lt;br /&gt;
&lt;br /&gt;
This operation will asynchronously delete the indicated cluster within the provided project id.&lt;br /&gt;
&lt;br /&gt;
'''Request Parameters'''&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
! Parameter !! Type !! Description&lt;br /&gt;
|-&lt;br /&gt;
| cluster_id (URI) || UUID || Cluster ID.  This value is returned when a new cluster is created.&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
'''Response Codes'''&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
! Response !! Code(s)&lt;br /&gt;
|-&lt;br /&gt;
| Normal || accepted (202)&lt;br /&gt;
|-&lt;br /&gt;
| Error || unauthorized (401), itemNotFound (404)&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
'''Response Parameters'''&lt;br /&gt;
&lt;br /&gt;
N/A&lt;br /&gt;
&lt;br /&gt;
'''JSON Request'''&lt;br /&gt;
&lt;br /&gt;
N/A&lt;br /&gt;
&lt;br /&gt;
'''JSON Response'''&lt;br /&gt;
&lt;br /&gt;
N/A&lt;br /&gt;
&lt;br /&gt;
==== Update Cluster ====&lt;br /&gt;
&lt;br /&gt;
'''''PATCH /v1/clusters/{cluster_id}'''''&lt;br /&gt;
&lt;br /&gt;
This operation will asynchronously updated the indicated cluster (cluster_id) based on the request body received.  The request body structure is the same as create cluster api.  Cue will automatically detect differences and perform appropriate actions in order to update cluster accordingly.&lt;br /&gt;
&lt;br /&gt;
'''Request Parameters'''&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
! Parameter !! Type !! Description&lt;br /&gt;
|-&lt;br /&gt;
| network_id || UUID || Network Identification for a Neutron network where cluster will be created in.&lt;br /&gt;
|-&lt;br /&gt;
| name || string || Name of cluster.&lt;br /&gt;
|-&lt;br /&gt;
| flavor || string || Cluster node flavor, which specify VM type in terms of CPU/memory/disk resources (e.g. small, medium, large).&lt;br /&gt;
&lt;br /&gt;
small:  1 GHz dual-core CPU; 512 MB memory; 250 GB disk&lt;br /&gt;
&lt;br /&gt;
medium: 2.8 GHz dual-core CPU; 4 GB memory; 1 TB disk&lt;br /&gt;
&lt;br /&gt;
large: 3.6 GHz quad-core CPU; 32 GB memory; 5 TB disk&lt;br /&gt;
|-&lt;br /&gt;
| size || int || Number of nodes in cluster.&lt;br /&gt;
|-&lt;br /&gt;
| volume_size || int || Optional parameter to indicate size of volume for node instance.  If volumes are supported, then this parameter will be used.  If ephmeral disk are not supported, volume support will be required.&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
'''Response Codes'''&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
! Response !! Code(s)&lt;br /&gt;
|-&lt;br /&gt;
| Normal || 202 (accepted)&lt;br /&gt;
|-&lt;br /&gt;
| Error || badRequest (400), unauthorized (401), itemNotFound (404)&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
'''Response Parameters'''&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
! Parameter !! Type !! Description&lt;br /&gt;
|-&lt;br /&gt;
| cluster_id || UUID || ID of cluster to be created.&lt;br /&gt;
|-&lt;br /&gt;
| network_id || UUID || Network Identification for a Neutron network where cluster will be created in.&lt;br /&gt;
|-&lt;br /&gt;
| name || string || Name of cluster (same as provided name in request parameters).&lt;br /&gt;
|-&lt;br /&gt;
| status || string || Current status of cluster.&lt;br /&gt;
&lt;br /&gt;
BUILDING: Cluster is in progress of being provisioned.&lt;br /&gt;
&lt;br /&gt;
ACTIVE:  Cluster is running.&lt;br /&gt;
&lt;br /&gt;
ERROR: Provisioning error(s) encountered.&lt;br /&gt;
&lt;br /&gt;
DELETING: Cluster is in process of being deleted.&lt;br /&gt;
&lt;br /&gt;
DELETED:  Cluster has been deleted.&lt;br /&gt;
|-&lt;br /&gt;
| flavor || string || Cluster node flavor, which specify VM type in terms of CPU/memory/disk resources (e.g. small, medium, large).&lt;br /&gt;
|-&lt;br /&gt;
| size || int || Number of nodes in cluster.&lt;br /&gt;
|-&lt;br /&gt;
| volume_size || int || Optional parameter to indicate size of volume for node instance.  If volumes are supported, then this parameter will be used.  If ephmeral disk are not supported, volume support will be required.&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
'''JSON Request'''&lt;br /&gt;
&lt;br /&gt;
{&lt;br /&gt;
    &amp;quot;network_id&amp;quot;: &amp;quot;d32019d3-bc6e-4319-9c1d-6722fc136a22&amp;quot;,&lt;br /&gt;
    &amp;quot;name&amp;quot;: &amp;quot;MessageCluster1&amp;quot;,&lt;br /&gt;
    &amp;quot;flavor&amp;quot;: &amp;quot;large&amp;quot;,&lt;br /&gt;
    &amp;quot;size&amp;quot;: &amp;quot;3&amp;quot;,&lt;br /&gt;
    &amp;quot;volume_size&amp;quot;: &amp;quot;100&amp;quot;&lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
'''JSON Response'''&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
{&lt;br /&gt;
    &amp;quot;cluster&amp;quot;: {&lt;br /&gt;
        &amp;quot;cluster_id&amp;quot;: &amp;quot;dd745f4a-9333-417e-bb89-9c989c84c068&amp;quot;,&lt;br /&gt;
        &amp;quot;network_id&amp;quot;: &amp;quot;d32019d3-bc6e-4319-9c1d-6722fc136a22&amp;quot;,&lt;br /&gt;
        &amp;quot;name&amp;quot;: &amp;quot;Message Cluster 1&amp;quot;,&lt;br /&gt;
        &amp;quot;status&amp;quot;: &amp;quot;BUILDING&amp;quot;,&lt;br /&gt;
        &amp;quot;flavor&amp;quot;: &amp;quot;large&amp;quot;,&lt;br /&gt;
        &amp;quot;size&amp;quot;: &amp;quot;3&amp;quot;,&lt;br /&gt;
        &amp;quot;volume_size&amp;quot;: &amp;quot;100&amp;quot;,&lt;br /&gt;
        &amp;quot;created&amp;quot;: &amp;quot;2014-11-11T01:02:03Z&amp;quot;,&lt;br /&gt;
        &amp;quot;updated&amp;quot;: &amp;quot;2014-11-11T01:02:03Z&amp;quot;&lt;br /&gt;
    }&lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
===Testing===&lt;br /&gt;
&lt;br /&gt;
Cue API testing will verify the expected functionality of the Cue user interface with both positive/negative tests.  The overall scope will cover testing from the HTTP REST request to required database interactions and work-flow task submission for RPC workers.&lt;br /&gt;
&lt;br /&gt;
====Unit Tests====&lt;br /&gt;
&lt;br /&gt;
Unit tests will verify the resulting function calls for each REST-ful URI and action(s).  The Python Mock library will be used to replace external system dependencies with placeholder objects.&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
! Function !! Tests !! Input Data !! Expected Result(s)&lt;br /&gt;
|-&lt;br /&gt;
| List Clusters || &lt;br /&gt;
# Create 'n' cluster(s), then call list clusters and verify expected return object&lt;br /&gt;
# Call list clusters when no clusters exist within a project id and verify expected return object&lt;br /&gt;
|| &lt;br /&gt;
* n = # of clusters to create&lt;br /&gt;
||&lt;br /&gt;
# List of 'n' clusters is returned with appropriate fields, HTTP Ok (200)&lt;br /&gt;
# Empty list of clusters is returned, HTTP Ok (200)&lt;br /&gt;
|-&lt;br /&gt;
| Create Cluster || &lt;br /&gt;
# Create standard cluster 'c' and verify expected return object&lt;br /&gt;
# Create cluster with invalid flavor and verify expected return value&lt;br /&gt;
# Create cluster with invalid volume size and verify expected return value&lt;br /&gt;
||&lt;br /&gt;
* n = cluster size (number of nodes)&lt;br /&gt;
* m = cluster name&lt;br /&gt;
* f = flavor&lt;br /&gt;
* s = volume size&lt;br /&gt;
* nic = Network UUID&lt;br /&gt;
||&lt;br /&gt;
# Cluster ID, name and status for newly created cluster is returned, HTTP Accepted (202)&lt;br /&gt;
# HTTP Bad request is returned (400)&lt;br /&gt;
# HTTP Bad request is returned (400)&lt;br /&gt;
|-&lt;br /&gt;
| Show Cluster ||&lt;br /&gt;
# Create cluster, then call get cluster and verify expected return object&lt;br /&gt;
# Get cluster with invalid cluster_id&lt;br /&gt;
||&lt;br /&gt;
* cluster_id = cluster ID&lt;br /&gt;
||&lt;br /&gt;
# Cluster ID, name, status, created/updated date stamp and list of nodes is returned, HTTP Ok (200).&lt;br /&gt;
# HTTP Bad request is returned (400)&lt;br /&gt;
|-&lt;br /&gt;
| Delete Cluster || &lt;br /&gt;
# Create a cluster, then call delete cluster and verify expected return value&lt;br /&gt;
# Delete cluster with invalid cluster_id&lt;br /&gt;
||&lt;br /&gt;
* cluster_id = cluster ID&lt;br /&gt;
||&lt;br /&gt;
# HTTP accepted is returned (202)&lt;br /&gt;
# HTTP Bad request is returned (400)&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
====Functional Tests====&lt;br /&gt;
&lt;br /&gt;
The functional tests will verify the HTTP REST URI request lifecycle from controller routing to HTTP response.  These tests will make use of Pecan's testing utility; pecan.testing module.&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
! Operation !! URI !! Tests !! Input Data !! Expected Data (JSON)&lt;br /&gt;
|-&lt;br /&gt;
| GET || /v1/clusters || &lt;br /&gt;
# Call when clusters exist&lt;br /&gt;
# Call when no clusters exist&lt;br /&gt;
|| &lt;br /&gt;
* n/a&lt;br /&gt;
||&lt;br /&gt;
# List of 'n' clusters is returned with appropriate fields, HTTP Ok (200)&lt;br /&gt;
# Empty list of clusters is returned, HTTP Ok (200)&lt;br /&gt;
|-&lt;br /&gt;
| POST || /v1/clusters ||&lt;br /&gt;
# Create standard cluster 'c' and verify expected return object&lt;br /&gt;
# Create cluster with invalid flavor and verify expected return value&lt;br /&gt;
# Create cluster with invalid volume size and verify expected return value&lt;br /&gt;
|| &lt;br /&gt;
* n = cluster size (number of nodes)&lt;br /&gt;
* m = cluster name&lt;br /&gt;
* f = flavor&lt;br /&gt;
* s = volume size&lt;br /&gt;
* nic = Network UUID&lt;br /&gt;
||&lt;br /&gt;
# Cluster ID, name and status for newly created cluster is returned, HTTP Accepted (202)&lt;br /&gt;
# HTTP Bad request is returned (400)&lt;br /&gt;
# HTTP Bad request is returned (400)&lt;br /&gt;
||&lt;br /&gt;
|-&lt;br /&gt;
| GET || /v1/clusters/{cluster_id} || &lt;br /&gt;
# Create cluster, then call get cluster and verify expected return object&lt;br /&gt;
# Get cluster with invalid cluster_id&lt;br /&gt;
|| &lt;br /&gt;
* cluster_id = cluster &lt;br /&gt;
||&lt;br /&gt;
# Cluster ID, name, status, created/updated date stamp and list of nodes is returned, HTTP Ok (200).&lt;br /&gt;
# HTTP Bad request is returned (400)&lt;br /&gt;
||&lt;br /&gt;
|-&lt;br /&gt;
| DELETE || /v1/clusters/{cluster_id} ||&lt;br /&gt;
# Create a cluster, then call delete cluster and verify expected return value&lt;br /&gt;
# Delete cluster with invalid cluster_id&lt;br /&gt;
||&lt;br /&gt;
* cluster_id = cluster ID&lt;br /&gt;
||&lt;br /&gt;
# HTTP accepted is returned (202)&lt;br /&gt;
# HTTP Bad request is returned (400)&lt;br /&gt;
||&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
====Integration Tests====&lt;br /&gt;
&lt;br /&gt;
The integration tests will cover API functionality from HTTP request to database access and task submission for RPC workers.  The Pecan test utility will be used to route test request URI to appropriate controllers, then database record(s) will be verified for applicable change.  Finally the creation of task objections will be verified to ensure valid task flows.&lt;/div&gt;</summary>
		<author><name>Dagnello</name></author>	</entry>

	<entry>
		<id>https://wiki.openstack.org/w/index.php?title=Cue/api_2&amp;diff=70287</id>
		<title>Cue/api 2</title>
		<link rel="alternate" type="text/html" href="https://wiki.openstack.org/w/index.php?title=Cue/api_2&amp;diff=70287"/>
				<updated>2014-12-12T23:24:14Z</updated>
		
		<summary type="html">&lt;p&gt;Dagnello: /* Update Cluster */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;== Cue API Design ==&lt;br /&gt;
=== Acronyms ===&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
! '''Acronym''' !! '''Definition'''&lt;br /&gt;
|-&lt;br /&gt;
| SSL || Secure Sockets Layer&lt;br /&gt;
|-&lt;br /&gt;
| REST || Representational State Transfer&lt;br /&gt;
|-&lt;br /&gt;
| URI || Uniform Resource Identifier&lt;br /&gt;
|-&lt;br /&gt;
| UUID || Universally Unique Identifier&lt;br /&gt;
|-&lt;br /&gt;
| AMQP || Advanced Messaging Queuing Protocol&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
=== Requirements ===&lt;br /&gt;
&lt;br /&gt;
API Requirements for Cue - Kilo timeframe.&lt;br /&gt;
&lt;br /&gt;
* Keystone integration&lt;br /&gt;
* CRUD on Cluster&lt;br /&gt;
* Cluster Management – Scale up/down&lt;br /&gt;
* Devstack integration&lt;br /&gt;
* Gate Tests&lt;br /&gt;
&lt;br /&gt;
=== System Context Diagram ===&lt;br /&gt;
&lt;br /&gt;
[[File:SCD.jpg]]&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
! '''Component''' !! '''Description'''&lt;br /&gt;
|-&lt;br /&gt;
| User || Direct customer of Cue.&lt;br /&gt;
|-&lt;br /&gt;
| Horizon || Cue functionality will be added to Horizon, which will provide a web-based portal for Cue control.&lt;br /&gt;
|-&lt;br /&gt;
| CLI || Command Line Interface to Cue, provides user access to provisioning and deploying messaging clusters.&lt;br /&gt;
|-&lt;br /&gt;
| REST_API || Provides user access to provisioning and deploying messaging clusters through REST interface.  This is a light-weight interface, provisioning and configuration of clusters/nodes is delegated to the TaskWorker process.&lt;br /&gt;
|-&lt;br /&gt;
| TaskScheduler || Used to synchronize work tasks between the REST_API and TaskWorker processes.&lt;br /&gt;
|-&lt;br /&gt;
| TaskWorker || Carries out work associated with all provisioning, configuration and management of RabbitMQ clusters and nodes.  Makes use of heat for initial provisioning/deployment.&lt;br /&gt;
|-&lt;br /&gt;
| DB || Database to store information on clusters and nodes.  Example, in cluster creation, when request is initially received through REST_API, this DB is updated accordingly and the work is delegated to TaskWorker.  TaskWorker then updates this DB as provisioning and configuration takes place.  Subsequent calls to check on status of cluster creation, will return updated information from this DB.&lt;br /&gt;
|-&lt;br /&gt;
| Heat || Used cloud instance orchestration in deploying RabbitMQ cluster images.&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
=== REST API ===&lt;br /&gt;
&lt;br /&gt;
General requirement, REST API must respond within 500ms.&lt;br /&gt;
==== List Clusters ====&lt;br /&gt;
&lt;br /&gt;
'''''GET /v1/clusters'''''&lt;br /&gt;
&lt;br /&gt;
This operation synchronously returns all clusters provisioned within the associated project id.&lt;br /&gt;
&lt;br /&gt;
'''Request Parameters'''&lt;br /&gt;
N/A&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
! Response !! Code(s)&lt;br /&gt;
|-&lt;br /&gt;
| Normal || ok (200)&lt;br /&gt;
|-&lt;br /&gt;
| Error || unauthorized (401)&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
'''Response Parameters'''&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
! Parameter !! Type !! Description&lt;br /&gt;
|-&lt;br /&gt;
| cluster(list) || string || List of clusters, detailing respective cluster id, name, status, created time stamp and updated time stamp.&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
	&lt;br /&gt;
&lt;br /&gt;
'''JSON Request'''&lt;br /&gt;
&lt;br /&gt;
N/A&lt;br /&gt;
&lt;br /&gt;
'''JSON Response'''&lt;br /&gt;
&lt;br /&gt;
{&lt;br /&gt;
    &amp;quot;clusters&amp;quot;: &amp;lt;nowiki&amp;gt;[&amp;lt;/nowiki&amp;gt;&lt;br /&gt;
        {&lt;br /&gt;
            &amp;quot;cluster_id&amp;quot;: &amp;quot;b51948c9-1ac5-4c28-a580-6f7c500d82f8&amp;quot;,&lt;br /&gt;
            &amp;quot;network_id&amp;quot;: &amp;quot;d32019d3-bc6e-4319-9c1d-6722fc136a22&amp;quot;,&lt;br /&gt;
            &amp;quot;name&amp;quot;: &amp;quot;Message Cluster 1&amp;quot;,&lt;br /&gt;
            &amp;quot;status&amp;quot;: &amp;quot;ACTIVE&amp;quot;,&lt;br /&gt;
            &amp;quot;flavor&amp;quot;: &amp;quot;medium&amp;quot;,&lt;br /&gt;
            &amp;quot;size&amp;quot;: &amp;quot;3&amp;quot;,&lt;br /&gt;
            &amp;quot;created&amp;quot;: &amp;quot;2014-11-11T01:02:03Z&amp;quot;,&lt;br /&gt;
            &amp;quot;updated&amp;quot;: &amp;quot;2014-11-11T01:02:03Z&amp;quot;&lt;br /&gt;
        },&lt;br /&gt;
        {&lt;br /&gt;
            &amp;quot;cluster_id&amp;quot;: &amp;quot;13c456c9-bbfc-4c31-b26d-3ae5c3cd7a77&amp;quot;,&lt;br /&gt;
            &amp;quot;network_id&amp;quot;: &amp;quot;d32019d3-bc6e-4319-9c1d-6722fc136a22&amp;quot;,&lt;br /&gt;
            &amp;quot;name&amp;quot;: &amp;quot;Message Cluster 2&amp;quot;,&lt;br /&gt;
            &amp;quot;status&amp;quot;: &amp;quot;BUILDING&amp;quot;,&lt;br /&gt;
            &amp;quot;flavor&amp;quot;: &amp;quot;small&amp;quot;,&lt;br /&gt;
            &amp;quot;size&amp;quot;: &amp;quot;5&amp;quot;,&lt;br /&gt;
            &amp;quot;created&amp;quot;: &amp;quot;2014-11-12T13:23:54Z&amp;quot;,&lt;br /&gt;
            &amp;quot;updated&amp;quot;: &amp;quot;2014-11-13T19:55:01Z&amp;quot;&lt;br /&gt;
        }&lt;br /&gt;
    ]&lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
==== Create Cluster ====&lt;br /&gt;
&lt;br /&gt;
'''''POST /v1/clusters'''''&lt;br /&gt;
&lt;br /&gt;
This operation asynchronously creates a new cluster of Nova instances provisioned with the required message brokers in a central project id. &lt;br /&gt;
&lt;br /&gt;
'''Request Parameters'''&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
! Parameter !! Type !! Description&lt;br /&gt;
|-&lt;br /&gt;
| network_id || UUID || Network Identification for a Neutron network where cluster will be created in.&lt;br /&gt;
|-&lt;br /&gt;
| name || string || Name of cluster.&lt;br /&gt;
|-&lt;br /&gt;
| flavor || string || Cluster node flavor, which specify VM type in terms of CPU/memory/disk resources (e.g. small, medium, large).&lt;br /&gt;
&lt;br /&gt;
small:  1 GHz dual-core CPU; 512 MB memory; 250 GB disk&lt;br /&gt;
&lt;br /&gt;
medium: 2.8 GHz dual-core CPU; 4 GB memory; 1 TB disk&lt;br /&gt;
&lt;br /&gt;
large: 3.6 GHz quad-core CPU; 32 GB memory; 5 TB disk&lt;br /&gt;
|-&lt;br /&gt;
| size || int || Number of nodes in cluster.&lt;br /&gt;
|-&lt;br /&gt;
| volume_size || int || Optional parameter to indicate size of volume for node instance.  If volumes are supported, then this parameter will be used.  If ephmeral disk are not supported, volume support will be required.&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
'''Response Codes'''&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
! Response !! Code(s)&lt;br /&gt;
|-&lt;br /&gt;
| Normal || 202 (accepted)&lt;br /&gt;
|-&lt;br /&gt;
| Error || badRequest (400), unauthorized (401), itemNotFound (404)&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
'''Response Parameters'''&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
! Parameter !! Type !! Description&lt;br /&gt;
|-&lt;br /&gt;
| cluster_id || UUID || ID of cluster to be created.&lt;br /&gt;
|-&lt;br /&gt;
| network_id || UUID || Network Identification for a Neutron network where cluster will be created in.&lt;br /&gt;
|-&lt;br /&gt;
| name || string || Name of cluster (same as provided name in request parameters).&lt;br /&gt;
|-&lt;br /&gt;
| status || string || Current status of cluster.&lt;br /&gt;
|-&lt;br /&gt;
| flavor || string || Cluster node flavor, which specify VM type in terms of CPU/memory/disk resources (e.g. small, medium, large).&lt;br /&gt;
|-&lt;br /&gt;
| size || int || Number of nodes in cluster.&lt;br /&gt;
|-&lt;br /&gt;
| volume_size || int || Indicate size of volume for node instance.&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
'''JSON Request'''&lt;br /&gt;
&lt;br /&gt;
{&lt;br /&gt;
    &amp;quot;network_id&amp;quot;: &amp;quot;d32019d3-bc6e-4319-9c1d-6722fc136a22&amp;quot;,&lt;br /&gt;
    &amp;quot;name&amp;quot;: &amp;quot;MessageCluster1&amp;quot;,&lt;br /&gt;
    &amp;quot;flavor&amp;quot;: &amp;quot;large&amp;quot;,&lt;br /&gt;
    &amp;quot;size&amp;quot;: &amp;quot;3&amp;quot;,&lt;br /&gt;
    &amp;quot;volume_size&amp;quot;: &amp;quot;100&amp;quot;&lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
'''JSON Response'''&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
{&lt;br /&gt;
    &amp;quot;cluster&amp;quot;: {&lt;br /&gt;
        &amp;quot;cluster_id&amp;quot;: &amp;quot;dd745f4a-9333-417e-bb89-9c989c84c068&amp;quot;,&lt;br /&gt;
        &amp;quot;network_id&amp;quot;: &amp;quot;d32019d3-bc6e-4319-9c1d-6722fc136a22&amp;quot;,&lt;br /&gt;
        &amp;quot;name&amp;quot;: &amp;quot;Message Cluster 1&amp;quot;,&lt;br /&gt;
        &amp;quot;status&amp;quot;: &amp;quot;BUILDING&amp;quot;,&lt;br /&gt;
        &amp;quot;flavor&amp;quot;: &amp;quot;large&amp;quot;,&lt;br /&gt;
        &amp;quot;size&amp;quot;: &amp;quot;3&amp;quot;,&lt;br /&gt;
        &amp;quot;volume_size&amp;quot;: &amp;quot;100&amp;quot;,&lt;br /&gt;
        &amp;quot;created&amp;quot;: &amp;quot;2014-11-11T01:02:03Z&amp;quot;,&lt;br /&gt;
        &amp;quot;updated&amp;quot;: &amp;quot;2014-11-11T01:02:03Z&amp;quot;&lt;br /&gt;
    }&lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
==== Show Cluster ====&lt;br /&gt;
&lt;br /&gt;
'''''GET /v1/clusters/{cluster_id}'''''&lt;br /&gt;
&lt;br /&gt;
This operation synchronously returns the status and information on the specified cluster within the provided project id.&lt;br /&gt;
&lt;br /&gt;
'''Request Parameters'''&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
! Parameter !! Type !! Description&lt;br /&gt;
|-&lt;br /&gt;
| cluster_id (URI) || UUID || Cluster ID.  This value is returned when a new cluster is created.&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
'''Response Codes'''&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
! Response !! Code(s)&lt;br /&gt;
|-&lt;br /&gt;
| Normal || ok (200)&lt;br /&gt;
|-&lt;br /&gt;
| Error || unauthorized (401), itemNotFound (404)&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
'''Response Parameters'''&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
! Parameter !! Type !! Description&lt;br /&gt;
|-&lt;br /&gt;
| cluster_id || UUID || ID of requested cluster.&lt;br /&gt;
|-&lt;br /&gt;
| name || string || Name of cluster.&lt;br /&gt;
|-&lt;br /&gt;
| status || string || Current status of cluster.&lt;br /&gt;
&lt;br /&gt;
BUILDING: Cluster is in progress of being provisioned.&lt;br /&gt;
&lt;br /&gt;
ACTIVE:  Cluster is running.&lt;br /&gt;
&lt;br /&gt;
ERROR: Provisioning error(s) encountered.&lt;br /&gt;
&lt;br /&gt;
DELETED:  Cluster has been deleted.&lt;br /&gt;
|-&lt;br /&gt;
| created || string || Created time stamp in format: yyyy-mm-ddThh:mm:ssZ&lt;br /&gt;
|-&lt;br /&gt;
| updated || string || Last updated time stamp in format: yyyy-mm-ddThh:mm:ssZ&lt;br /&gt;
|-&lt;br /&gt;
| nodes(list) || node || List of nodes, which includes node id, instance state, and flavor.&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
'''JSON Request'''&lt;br /&gt;
&lt;br /&gt;
N/A&lt;br /&gt;
&lt;br /&gt;
'''JSON Response'''&lt;br /&gt;
&lt;br /&gt;
{&lt;br /&gt;
    &amp;quot;cluster&amp;quot;: {&lt;br /&gt;
        &amp;quot;cluster_id&amp;quot;: &amp;quot;dd745f4a-9333-417e-bb89-9c989c84c068&amp;quot;,&lt;br /&gt;
        &amp;quot;network_id&amp;quot;: &amp;quot;d32019d3-bc6e-4319-9c1d-6722fc136a22&amp;quot;,&lt;br /&gt;
        &amp;quot;name&amp;quot;: &amp;quot;Message Cluster 1&amp;quot;,&lt;br /&gt;
        &amp;quot;status&amp;quot;: &amp;quot;ACTIVE&amp;quot;,&lt;br /&gt;
        &amp;quot;flavor&amp;quot;: &amp;quot;large&amp;quot;,&lt;br /&gt;
        &amp;quot;size&amp;quot;: &amp;quot;3&amp;quot;,&lt;br /&gt;
        &amp;quot;volume_size&amp;quot;: &amp;quot;100&amp;quot;,&lt;br /&gt;
        &amp;quot;created&amp;quot;: &amp;quot;2014-11-11T01:02:03Z&amp;quot;,&lt;br /&gt;
        &amp;quot;updated&amp;quot;: &amp;quot;2014-11-11T01:02:03Z&amp;quot;,&lt;br /&gt;
        &amp;quot;endpoints&amp;quot;: [&lt;br /&gt;
            {&lt;br /&gt;
                &amp;quot;type&amp;quot;: &amp;quot;AMQP&amp;quot;,&lt;br /&gt;
                &amp;quot;value&amp;quot;: &amp;quot;amqp://10.20.30.40:10000&amp;quot;&lt;br /&gt;
            },&lt;br /&gt;
            {&lt;br /&gt;
                &amp;quot;type&amp;quot;: &amp;quot;console&amp;quot;,&lt;br /&gt;
                &amp;quot;value&amp;quot;: &amp;quot;http://10.20.30.40:5672&amp;quot;&lt;br /&gt;
            },&lt;br /&gt;
            {&lt;br /&gt;
                &amp;quot;type&amp;quot;: &amp;quot;AMQP&amp;quot;,&lt;br /&gt;
                &amp;quot;value&amp;quot;: &amp;quot;amqp://10.20.30.41:10000&amp;quot;&lt;br /&gt;
            },&lt;br /&gt;
            {&lt;br /&gt;
                &amp;quot;type&amp;quot;: &amp;quot;console&amp;quot;,&lt;br /&gt;
                &amp;quot;value&amp;quot;: &amp;quot;http://10.20.30.41:5672&amp;quot;&lt;br /&gt;
            },&lt;br /&gt;
            {&lt;br /&gt;
                &amp;quot;type&amp;quot;: &amp;quot;AMQP&amp;quot;,&lt;br /&gt;
                &amp;quot;value&amp;quot;: &amp;quot;amqp://10.20.30.42:10000&amp;quot;&lt;br /&gt;
            },&lt;br /&gt;
            {&lt;br /&gt;
                &amp;quot;type&amp;quot;: &amp;quot;console&amp;quot;,&lt;br /&gt;
                &amp;quot;value&amp;quot;: &amp;quot;http://10.20.30.42:5672&amp;quot;&lt;br /&gt;
            }&lt;br /&gt;
        ]&lt;br /&gt;
    }&lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
==== Delete Cluster ====&lt;br /&gt;
&lt;br /&gt;
'''''DELETE /v1/clusters/{cluster_id}'''''''&lt;br /&gt;
&lt;br /&gt;
This operation will asynchronously delete the indicated cluster within the provided project id.&lt;br /&gt;
&lt;br /&gt;
'''Request Parameters'''&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
! Parameter !! Type !! Description&lt;br /&gt;
|-&lt;br /&gt;
| cluster_id (URI) || UUID || Cluster ID.  This value is returned when a new cluster is created.&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
'''Response Codes'''&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
! Response !! Code(s)&lt;br /&gt;
|-&lt;br /&gt;
| Normal || accepted (202)&lt;br /&gt;
|-&lt;br /&gt;
| Error || unauthorized (401), itemNotFound (404)&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
'''Response Parameters'''&lt;br /&gt;
&lt;br /&gt;
N/A&lt;br /&gt;
&lt;br /&gt;
'''JSON Request'''&lt;br /&gt;
&lt;br /&gt;
N/A&lt;br /&gt;
&lt;br /&gt;
'''JSON Response'''&lt;br /&gt;
&lt;br /&gt;
N/A&lt;br /&gt;
&lt;br /&gt;
==== Update Cluster ====&lt;br /&gt;
&lt;br /&gt;
'''''PATCH /v1/clusters/{cluster_id}'''''&lt;br /&gt;
&lt;br /&gt;
This operation will asynchronously updated the indicated cluster (cluster_id) based on the request body received.  The request body structure is the same as create cluster api.  Cue will automatically detect differences and perform appropriate actions in order to update cluster accordingly.&lt;br /&gt;
&lt;br /&gt;
'''Request Parameters'''&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
! Parameter !! Type !! Description&lt;br /&gt;
|-&lt;br /&gt;
| network_id || UUID || Network Identification for a Neutron network where cluster will be created in.&lt;br /&gt;
|-&lt;br /&gt;
| name || string || Name of cluster.&lt;br /&gt;
|-&lt;br /&gt;
| flavor || string || Cluster node flavor, which specify VM type in terms of CPU/memory/disk resources (e.g. small, medium, large).&lt;br /&gt;
&lt;br /&gt;
small:  1 GHz dual-core CPU; 512 MB memory; 250 GB disk&lt;br /&gt;
&lt;br /&gt;
medium: 2.8 GHz dual-core CPU; 4 GB memory; 1 TB disk&lt;br /&gt;
&lt;br /&gt;
large: 3.6 GHz quad-core CPU; 32 GB memory; 5 TB disk&lt;br /&gt;
|-&lt;br /&gt;
| size || int || Number of nodes in cluster.&lt;br /&gt;
|-&lt;br /&gt;
| volume_size || int || Optional parameter to indicate size of volume for node instance.  If volumes are supported, then this parameter will be used.  If ephmeral disk are not supported, volume support will be required.&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
'''Response Codes'''&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
! Response !! Code(s)&lt;br /&gt;
|-&lt;br /&gt;
| Normal || 202 (accepted)&lt;br /&gt;
|-&lt;br /&gt;
| Error || badRequest (400), unauthorized (401), itemNotFound (404)&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
'''Response Parameters'''&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
! Parameter !! Type !! Description&lt;br /&gt;
|-&lt;br /&gt;
| cluster_id || UUID || ID of cluster to be created.&lt;br /&gt;
|-&lt;br /&gt;
| network_id || UUID || Network Identification for a Neutron network where cluster will be created in.&lt;br /&gt;
|-&lt;br /&gt;
| name || string || Name of cluster (same as provided name in request parameters).&lt;br /&gt;
|-&lt;br /&gt;
| status || string || Current status of cluster.&lt;br /&gt;
&lt;br /&gt;
BUILDING: Cluster is in progress of being provisioned.&lt;br /&gt;
&lt;br /&gt;
ACTIVE:  Cluster is running.&lt;br /&gt;
&lt;br /&gt;
ERROR: Provisioning error(s) encountered.&lt;br /&gt;
&lt;br /&gt;
DELETING: Cluster is in process of being deleted.&lt;br /&gt;
&lt;br /&gt;
DELETED:  Cluster has been deleted.&lt;br /&gt;
|-&lt;br /&gt;
| flavor || string || Cluster node flavor, which specify VM type in terms of CPU/memory/disk resources (e.g. small, medium, large).&lt;br /&gt;
|-&lt;br /&gt;
| size || int || Number of nodes in cluster.&lt;br /&gt;
|-&lt;br /&gt;
| volume_size || int || Optional parameter to indicate size of volume for node instance.  If volumes are supported, then this parameter will be used.  If ephmeral disk are not supported, volume support will be required.&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
'''JSON Request'''&lt;br /&gt;
&lt;br /&gt;
{&lt;br /&gt;
    &amp;quot;network_id&amp;quot;: &amp;quot;d32019d3-bc6e-4319-9c1d-6722fc136a22&amp;quot;,&lt;br /&gt;
    &amp;quot;name&amp;quot;: &amp;quot;MessageCluster1&amp;quot;,&lt;br /&gt;
    &amp;quot;flavor&amp;quot;: &amp;quot;large&amp;quot;,&lt;br /&gt;
    &amp;quot;size&amp;quot;: &amp;quot;3&amp;quot;,&lt;br /&gt;
    &amp;quot;volume_size&amp;quot;: &amp;quot;100&amp;quot;&lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
'''JSON Response'''&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
{&lt;br /&gt;
    &amp;quot;cluster&amp;quot;: {&lt;br /&gt;
        &amp;quot;cluster_id&amp;quot;: &amp;quot;dd745f4a-9333-417e-bb89-9c989c84c068&amp;quot;,&lt;br /&gt;
        &amp;quot;network_id&amp;quot;: &amp;quot;d32019d3-bc6e-4319-9c1d-6722fc136a22&amp;quot;,&lt;br /&gt;
        &amp;quot;name&amp;quot;: &amp;quot;Message Cluster 1&amp;quot;,&lt;br /&gt;
        &amp;quot;status&amp;quot;: &amp;quot;BUILDING&amp;quot;,&lt;br /&gt;
        &amp;quot;flavor&amp;quot;: &amp;quot;large&amp;quot;,&lt;br /&gt;
        &amp;quot;size&amp;quot;: &amp;quot;3&amp;quot;,&lt;br /&gt;
        &amp;quot;volume_size&amp;quot;: &amp;quot;100&amp;quot;,&lt;br /&gt;
        &amp;quot;created&amp;quot;: &amp;quot;2014-11-11T01:02:03Z&amp;quot;,&lt;br /&gt;
        &amp;quot;updated&amp;quot;: &amp;quot;2014-11-11T01:02:03Z&amp;quot;&lt;br /&gt;
    }&lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
===Testing===&lt;br /&gt;
&lt;br /&gt;
Cue API testing will verify the expected functionality of the Cue user interface with both positive/negative tests.  The overall scope will cover testing from the HTTP REST request to required database interactions and work-flow task submission for RPC workers.&lt;br /&gt;
&lt;br /&gt;
====Unit Tests====&lt;br /&gt;
&lt;br /&gt;
Unit tests will verify the resulting function calls for each REST-ful URI and action(s).  The Python Mock library will be used to replace external system dependencies with placeholder objects.&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
! Function !! Tests !! Input Data !! Expected Result(s)&lt;br /&gt;
|-&lt;br /&gt;
| List Clusters || &lt;br /&gt;
# Create 'n' cluster(s), then call list clusters and verify expected return object&lt;br /&gt;
# Call list clusters when no clusters exist within a project id and verify expected return object&lt;br /&gt;
|| &lt;br /&gt;
* n = # of clusters to create&lt;br /&gt;
||&lt;br /&gt;
# List of 'n' clusters is returned with appropriate fields, HTTP Ok (200)&lt;br /&gt;
# Empty list of clusters is returned, HTTP Ok (200)&lt;br /&gt;
|-&lt;br /&gt;
| Create Cluster || &lt;br /&gt;
# Create standard cluster 'c' and verify expected return object&lt;br /&gt;
# Create cluster with invalid flavor and verify expected return value&lt;br /&gt;
# Create cluster with invalid volume size and verify expected return value&lt;br /&gt;
||&lt;br /&gt;
* n = cluster size (number of nodes)&lt;br /&gt;
* m = cluster name&lt;br /&gt;
* f = flavor&lt;br /&gt;
* s = volume size&lt;br /&gt;
* nic = Network UUID&lt;br /&gt;
||&lt;br /&gt;
# Cluster ID, name and status for newly created cluster is returned, HTTP Accepted (202)&lt;br /&gt;
# HTTP Bad request is returned (400)&lt;br /&gt;
# HTTP Bad request is returned (400)&lt;br /&gt;
|-&lt;br /&gt;
| Show Cluster ||&lt;br /&gt;
# Create cluster, then call get cluster and verify expected return object&lt;br /&gt;
# Get cluster with invalid cluster_id&lt;br /&gt;
||&lt;br /&gt;
* cluster_id = cluster ID&lt;br /&gt;
||&lt;br /&gt;
# Cluster ID, name, status, created/updated date stamp and list of nodes is returned, HTTP Ok (200).&lt;br /&gt;
# HTTP Bad request is returned (400)&lt;br /&gt;
|-&lt;br /&gt;
| Delete Cluster || &lt;br /&gt;
# Create a cluster, then call delete cluster and verify expected return value&lt;br /&gt;
# Delete cluster with invalid cluster_id&lt;br /&gt;
||&lt;br /&gt;
* cluster_id = cluster ID&lt;br /&gt;
||&lt;br /&gt;
# HTTP accepted is returned (202)&lt;br /&gt;
# HTTP Bad request is returned (400)&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
====Functional Tests====&lt;br /&gt;
&lt;br /&gt;
The functional tests will verify the HTTP REST URI request lifecycle from controller routing to HTTP response.  These tests will make use of Pecan's testing utility; pecan.testing module.&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
! Operation !! URI !! Tests !! Input Data !! Expected Data (JSON)&lt;br /&gt;
|-&lt;br /&gt;
| GET || /v1/clusters || &lt;br /&gt;
# Call when clusters exist&lt;br /&gt;
# Call when no clusters exist&lt;br /&gt;
|| &lt;br /&gt;
* n/a&lt;br /&gt;
||&lt;br /&gt;
# List of 'n' clusters is returned with appropriate fields, HTTP Ok (200)&lt;br /&gt;
# Empty list of clusters is returned, HTTP Ok (200)&lt;br /&gt;
|-&lt;br /&gt;
| POST || /v1/clusters ||&lt;br /&gt;
# Create standard cluster 'c' and verify expected return object&lt;br /&gt;
# Create cluster with invalid flavor and verify expected return value&lt;br /&gt;
# Create cluster with invalid volume size and verify expected return value&lt;br /&gt;
|| &lt;br /&gt;
* n = cluster size (number of nodes)&lt;br /&gt;
* m = cluster name&lt;br /&gt;
* f = flavor&lt;br /&gt;
* s = volume size&lt;br /&gt;
* nic = Network UUID&lt;br /&gt;
||&lt;br /&gt;
# Cluster ID, name and status for newly created cluster is returned, HTTP Accepted (202)&lt;br /&gt;
# HTTP Bad request is returned (400)&lt;br /&gt;
# HTTP Bad request is returned (400)&lt;br /&gt;
||&lt;br /&gt;
|-&lt;br /&gt;
| GET || /v1/clusters/{cluster_id} || &lt;br /&gt;
# Create cluster, then call get cluster and verify expected return object&lt;br /&gt;
# Get cluster with invalid cluster_id&lt;br /&gt;
|| &lt;br /&gt;
* cluster_id = cluster &lt;br /&gt;
||&lt;br /&gt;
# Cluster ID, name, status, created/updated date stamp and list of nodes is returned, HTTP Ok (200).&lt;br /&gt;
# HTTP Bad request is returned (400)&lt;br /&gt;
||&lt;br /&gt;
|-&lt;br /&gt;
| DELETE || /v1/clusters/{cluster_id} ||&lt;br /&gt;
# Create a cluster, then call delete cluster and verify expected return value&lt;br /&gt;
# Delete cluster with invalid cluster_id&lt;br /&gt;
||&lt;br /&gt;
* cluster_id = cluster ID&lt;br /&gt;
||&lt;br /&gt;
# HTTP accepted is returned (202)&lt;br /&gt;
# HTTP Bad request is returned (400)&lt;br /&gt;
||&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
====Integration Tests====&lt;br /&gt;
&lt;br /&gt;
The integration tests will cover API functionality from HTTP request to database access and task submission for RPC workers.  The Pecan test utility will be used to route test request URI to appropriate controllers, then database record(s) will be verified for applicable change.  Finally the creation of task objections will be verified to ensure valid task flows.&lt;/div&gt;</summary>
		<author><name>Dagnello</name></author>	</entry>

	<entry>
		<id>https://wiki.openstack.org/w/index.php?title=Cue/api_2&amp;diff=70286</id>
		<title>Cue/api 2</title>
		<link rel="alternate" type="text/html" href="https://wiki.openstack.org/w/index.php?title=Cue/api_2&amp;diff=70286"/>
				<updated>2014-12-12T23:23:34Z</updated>
		
		<summary type="html">&lt;p&gt;Dagnello: /* Update Cluster */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;== Cue API Design ==&lt;br /&gt;
=== Acronyms ===&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
! '''Acronym''' !! '''Definition'''&lt;br /&gt;
|-&lt;br /&gt;
| SSL || Secure Sockets Layer&lt;br /&gt;
|-&lt;br /&gt;
| REST || Representational State Transfer&lt;br /&gt;
|-&lt;br /&gt;
| URI || Uniform Resource Identifier&lt;br /&gt;
|-&lt;br /&gt;
| UUID || Universally Unique Identifier&lt;br /&gt;
|-&lt;br /&gt;
| AMQP || Advanced Messaging Queuing Protocol&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
=== Requirements ===&lt;br /&gt;
&lt;br /&gt;
API Requirements for Cue - Kilo timeframe.&lt;br /&gt;
&lt;br /&gt;
* Keystone integration&lt;br /&gt;
* CRUD on Cluster&lt;br /&gt;
* Cluster Management – Scale up/down&lt;br /&gt;
* Devstack integration&lt;br /&gt;
* Gate Tests&lt;br /&gt;
&lt;br /&gt;
=== System Context Diagram ===&lt;br /&gt;
&lt;br /&gt;
[[File:SCD.jpg]]&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
! '''Component''' !! '''Description'''&lt;br /&gt;
|-&lt;br /&gt;
| User || Direct customer of Cue.&lt;br /&gt;
|-&lt;br /&gt;
| Horizon || Cue functionality will be added to Horizon, which will provide a web-based portal for Cue control.&lt;br /&gt;
|-&lt;br /&gt;
| CLI || Command Line Interface to Cue, provides user access to provisioning and deploying messaging clusters.&lt;br /&gt;
|-&lt;br /&gt;
| REST_API || Provides user access to provisioning and deploying messaging clusters through REST interface.  This is a light-weight interface, provisioning and configuration of clusters/nodes is delegated to the TaskWorker process.&lt;br /&gt;
|-&lt;br /&gt;
| TaskScheduler || Used to synchronize work tasks between the REST_API and TaskWorker processes.&lt;br /&gt;
|-&lt;br /&gt;
| TaskWorker || Carries out work associated with all provisioning, configuration and management of RabbitMQ clusters and nodes.  Makes use of heat for initial provisioning/deployment.&lt;br /&gt;
|-&lt;br /&gt;
| DB || Database to store information on clusters and nodes.  Example, in cluster creation, when request is initially received through REST_API, this DB is updated accordingly and the work is delegated to TaskWorker.  TaskWorker then updates this DB as provisioning and configuration takes place.  Subsequent calls to check on status of cluster creation, will return updated information from this DB.&lt;br /&gt;
|-&lt;br /&gt;
| Heat || Used cloud instance orchestration in deploying RabbitMQ cluster images.&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
=== REST API ===&lt;br /&gt;
&lt;br /&gt;
General requirement, REST API must respond within 500ms.&lt;br /&gt;
==== List Clusters ====&lt;br /&gt;
&lt;br /&gt;
'''''GET /v1/clusters'''''&lt;br /&gt;
&lt;br /&gt;
This operation synchronously returns all clusters provisioned within the associated project id.&lt;br /&gt;
&lt;br /&gt;
'''Request Parameters'''&lt;br /&gt;
N/A&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
! Response !! Code(s)&lt;br /&gt;
|-&lt;br /&gt;
| Normal || ok (200)&lt;br /&gt;
|-&lt;br /&gt;
| Error || unauthorized (401)&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
'''Response Parameters'''&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
! Parameter !! Type !! Description&lt;br /&gt;
|-&lt;br /&gt;
| cluster(list) || string || List of clusters, detailing respective cluster id, name, status, created time stamp and updated time stamp.&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
	&lt;br /&gt;
&lt;br /&gt;
'''JSON Request'''&lt;br /&gt;
&lt;br /&gt;
N/A&lt;br /&gt;
&lt;br /&gt;
'''JSON Response'''&lt;br /&gt;
&lt;br /&gt;
{&lt;br /&gt;
    &amp;quot;clusters&amp;quot;: &amp;lt;nowiki&amp;gt;[&amp;lt;/nowiki&amp;gt;&lt;br /&gt;
        {&lt;br /&gt;
            &amp;quot;cluster_id&amp;quot;: &amp;quot;b51948c9-1ac5-4c28-a580-6f7c500d82f8&amp;quot;,&lt;br /&gt;
            &amp;quot;network_id&amp;quot;: &amp;quot;d32019d3-bc6e-4319-9c1d-6722fc136a22&amp;quot;,&lt;br /&gt;
            &amp;quot;name&amp;quot;: &amp;quot;Message Cluster 1&amp;quot;,&lt;br /&gt;
            &amp;quot;status&amp;quot;: &amp;quot;ACTIVE&amp;quot;,&lt;br /&gt;
            &amp;quot;flavor&amp;quot;: &amp;quot;medium&amp;quot;,&lt;br /&gt;
            &amp;quot;size&amp;quot;: &amp;quot;3&amp;quot;,&lt;br /&gt;
            &amp;quot;created&amp;quot;: &amp;quot;2014-11-11T01:02:03Z&amp;quot;,&lt;br /&gt;
            &amp;quot;updated&amp;quot;: &amp;quot;2014-11-11T01:02:03Z&amp;quot;&lt;br /&gt;
        },&lt;br /&gt;
        {&lt;br /&gt;
            &amp;quot;cluster_id&amp;quot;: &amp;quot;13c456c9-bbfc-4c31-b26d-3ae5c3cd7a77&amp;quot;,&lt;br /&gt;
            &amp;quot;network_id&amp;quot;: &amp;quot;d32019d3-bc6e-4319-9c1d-6722fc136a22&amp;quot;,&lt;br /&gt;
            &amp;quot;name&amp;quot;: &amp;quot;Message Cluster 2&amp;quot;,&lt;br /&gt;
            &amp;quot;status&amp;quot;: &amp;quot;BUILDING&amp;quot;,&lt;br /&gt;
            &amp;quot;flavor&amp;quot;: &amp;quot;small&amp;quot;,&lt;br /&gt;
            &amp;quot;size&amp;quot;: &amp;quot;5&amp;quot;,&lt;br /&gt;
            &amp;quot;created&amp;quot;: &amp;quot;2014-11-12T13:23:54Z&amp;quot;,&lt;br /&gt;
            &amp;quot;updated&amp;quot;: &amp;quot;2014-11-13T19:55:01Z&amp;quot;&lt;br /&gt;
        }&lt;br /&gt;
    ]&lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
==== Create Cluster ====&lt;br /&gt;
&lt;br /&gt;
'''''POST /v1/clusters'''''&lt;br /&gt;
&lt;br /&gt;
This operation asynchronously creates a new cluster of Nova instances provisioned with the required message brokers in a central project id. &lt;br /&gt;
&lt;br /&gt;
'''Request Parameters'''&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
! Parameter !! Type !! Description&lt;br /&gt;
|-&lt;br /&gt;
| network_id || UUID || Network Identification for a Neutron network where cluster will be created in.&lt;br /&gt;
|-&lt;br /&gt;
| name || string || Name of cluster.&lt;br /&gt;
|-&lt;br /&gt;
| flavor || string || Cluster node flavor, which specify VM type in terms of CPU/memory/disk resources (e.g. small, medium, large).&lt;br /&gt;
&lt;br /&gt;
small:  1 GHz dual-core CPU; 512 MB memory; 250 GB disk&lt;br /&gt;
&lt;br /&gt;
medium: 2.8 GHz dual-core CPU; 4 GB memory; 1 TB disk&lt;br /&gt;
&lt;br /&gt;
large: 3.6 GHz quad-core CPU; 32 GB memory; 5 TB disk&lt;br /&gt;
|-&lt;br /&gt;
| size || int || Number of nodes in cluster.&lt;br /&gt;
|-&lt;br /&gt;
| volume_size || int || Optional parameter to indicate size of volume for node instance.  If volumes are supported, then this parameter will be used.  If ephmeral disk are not supported, volume support will be required.&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
'''Response Codes'''&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
! Response !! Code(s)&lt;br /&gt;
|-&lt;br /&gt;
| Normal || 202 (accepted)&lt;br /&gt;
|-&lt;br /&gt;
| Error || badRequest (400), unauthorized (401), itemNotFound (404)&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
'''Response Parameters'''&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
! Parameter !! Type !! Description&lt;br /&gt;
|-&lt;br /&gt;
| cluster_id || UUID || ID of cluster to be created.&lt;br /&gt;
|-&lt;br /&gt;
| network_id || UUID || Network Identification for a Neutron network where cluster will be created in.&lt;br /&gt;
|-&lt;br /&gt;
| name || string || Name of cluster (same as provided name in request parameters).&lt;br /&gt;
|-&lt;br /&gt;
| status || string || Current status of cluster.&lt;br /&gt;
|-&lt;br /&gt;
| flavor || string || Cluster node flavor, which specify VM type in terms of CPU/memory/disk resources (e.g. small, medium, large).&lt;br /&gt;
|-&lt;br /&gt;
| size || int || Number of nodes in cluster.&lt;br /&gt;
|-&lt;br /&gt;
| volume_size || int || Indicate size of volume for node instance.&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
'''JSON Request'''&lt;br /&gt;
&lt;br /&gt;
{&lt;br /&gt;
    &amp;quot;network_id&amp;quot;: &amp;quot;d32019d3-bc6e-4319-9c1d-6722fc136a22&amp;quot;,&lt;br /&gt;
    &amp;quot;name&amp;quot;: &amp;quot;MessageCluster1&amp;quot;,&lt;br /&gt;
    &amp;quot;flavor&amp;quot;: &amp;quot;large&amp;quot;,&lt;br /&gt;
    &amp;quot;size&amp;quot;: &amp;quot;3&amp;quot;,&lt;br /&gt;
    &amp;quot;volume_size&amp;quot;: &amp;quot;100&amp;quot;&lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
'''JSON Response'''&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
{&lt;br /&gt;
    &amp;quot;cluster&amp;quot;: {&lt;br /&gt;
        &amp;quot;cluster_id&amp;quot;: &amp;quot;dd745f4a-9333-417e-bb89-9c989c84c068&amp;quot;,&lt;br /&gt;
        &amp;quot;network_id&amp;quot;: &amp;quot;d32019d3-bc6e-4319-9c1d-6722fc136a22&amp;quot;,&lt;br /&gt;
        &amp;quot;name&amp;quot;: &amp;quot;Message Cluster 1&amp;quot;,&lt;br /&gt;
        &amp;quot;status&amp;quot;: &amp;quot;BUILDING&amp;quot;,&lt;br /&gt;
        &amp;quot;flavor&amp;quot;: &amp;quot;large&amp;quot;,&lt;br /&gt;
        &amp;quot;size&amp;quot;: &amp;quot;3&amp;quot;,&lt;br /&gt;
        &amp;quot;volume_size&amp;quot;: &amp;quot;100&amp;quot;,&lt;br /&gt;
        &amp;quot;created&amp;quot;: &amp;quot;2014-11-11T01:02:03Z&amp;quot;,&lt;br /&gt;
        &amp;quot;updated&amp;quot;: &amp;quot;2014-11-11T01:02:03Z&amp;quot;&lt;br /&gt;
    }&lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
==== Show Cluster ====&lt;br /&gt;
&lt;br /&gt;
'''''GET /v1/clusters/{cluster_id}'''''&lt;br /&gt;
&lt;br /&gt;
This operation synchronously returns the status and information on the specified cluster within the provided project id.&lt;br /&gt;
&lt;br /&gt;
'''Request Parameters'''&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
! Parameter !! Type !! Description&lt;br /&gt;
|-&lt;br /&gt;
| cluster_id (URI) || UUID || Cluster ID.  This value is returned when a new cluster is created.&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
'''Response Codes'''&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
! Response !! Code(s)&lt;br /&gt;
|-&lt;br /&gt;
| Normal || ok (200)&lt;br /&gt;
|-&lt;br /&gt;
| Error || unauthorized (401), itemNotFound (404)&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
'''Response Parameters'''&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
! Parameter !! Type !! Description&lt;br /&gt;
|-&lt;br /&gt;
| cluster_id || UUID || ID of requested cluster.&lt;br /&gt;
|-&lt;br /&gt;
| name || string || Name of cluster.&lt;br /&gt;
|-&lt;br /&gt;
| status || string || Current status of cluster.&lt;br /&gt;
&lt;br /&gt;
BUILDING: Cluster is in progress of being provisioned.&lt;br /&gt;
&lt;br /&gt;
ACTIVE:  Cluster is running.&lt;br /&gt;
&lt;br /&gt;
ERROR: Provisioning error(s) encountered.&lt;br /&gt;
&lt;br /&gt;
DELETED:  Cluster has been deleted.&lt;br /&gt;
|-&lt;br /&gt;
| created || string || Created time stamp in format: yyyy-mm-ddThh:mm:ssZ&lt;br /&gt;
|-&lt;br /&gt;
| updated || string || Last updated time stamp in format: yyyy-mm-ddThh:mm:ssZ&lt;br /&gt;
|-&lt;br /&gt;
| nodes(list) || node || List of nodes, which includes node id, instance state, and flavor.&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
'''JSON Request'''&lt;br /&gt;
&lt;br /&gt;
N/A&lt;br /&gt;
&lt;br /&gt;
'''JSON Response'''&lt;br /&gt;
&lt;br /&gt;
{&lt;br /&gt;
    &amp;quot;cluster&amp;quot;: {&lt;br /&gt;
        &amp;quot;cluster_id&amp;quot;: &amp;quot;dd745f4a-9333-417e-bb89-9c989c84c068&amp;quot;,&lt;br /&gt;
        &amp;quot;network_id&amp;quot;: &amp;quot;d32019d3-bc6e-4319-9c1d-6722fc136a22&amp;quot;,&lt;br /&gt;
        &amp;quot;name&amp;quot;: &amp;quot;Message Cluster 1&amp;quot;,&lt;br /&gt;
        &amp;quot;status&amp;quot;: &amp;quot;ACTIVE&amp;quot;,&lt;br /&gt;
        &amp;quot;flavor&amp;quot;: &amp;quot;large&amp;quot;,&lt;br /&gt;
        &amp;quot;size&amp;quot;: &amp;quot;3&amp;quot;,&lt;br /&gt;
        &amp;quot;volume_size&amp;quot;: &amp;quot;100&amp;quot;,&lt;br /&gt;
        &amp;quot;created&amp;quot;: &amp;quot;2014-11-11T01:02:03Z&amp;quot;,&lt;br /&gt;
        &amp;quot;updated&amp;quot;: &amp;quot;2014-11-11T01:02:03Z&amp;quot;,&lt;br /&gt;
        &amp;quot;endpoints&amp;quot;: [&lt;br /&gt;
            {&lt;br /&gt;
                &amp;quot;type&amp;quot;: &amp;quot;AMQP&amp;quot;,&lt;br /&gt;
                &amp;quot;value&amp;quot;: &amp;quot;amqp://10.20.30.40:10000&amp;quot;&lt;br /&gt;
            },&lt;br /&gt;
            {&lt;br /&gt;
                &amp;quot;type&amp;quot;: &amp;quot;console&amp;quot;,&lt;br /&gt;
                &amp;quot;value&amp;quot;: &amp;quot;http://10.20.30.40:5672&amp;quot;&lt;br /&gt;
            },&lt;br /&gt;
            {&lt;br /&gt;
                &amp;quot;type&amp;quot;: &amp;quot;AMQP&amp;quot;,&lt;br /&gt;
                &amp;quot;value&amp;quot;: &amp;quot;amqp://10.20.30.41:10000&amp;quot;&lt;br /&gt;
            },&lt;br /&gt;
            {&lt;br /&gt;
                &amp;quot;type&amp;quot;: &amp;quot;console&amp;quot;,&lt;br /&gt;
                &amp;quot;value&amp;quot;: &amp;quot;http://10.20.30.41:5672&amp;quot;&lt;br /&gt;
            },&lt;br /&gt;
            {&lt;br /&gt;
                &amp;quot;type&amp;quot;: &amp;quot;AMQP&amp;quot;,&lt;br /&gt;
                &amp;quot;value&amp;quot;: &amp;quot;amqp://10.20.30.42:10000&amp;quot;&lt;br /&gt;
            },&lt;br /&gt;
            {&lt;br /&gt;
                &amp;quot;type&amp;quot;: &amp;quot;console&amp;quot;,&lt;br /&gt;
                &amp;quot;value&amp;quot;: &amp;quot;http://10.20.30.42:5672&amp;quot;&lt;br /&gt;
            }&lt;br /&gt;
        ]&lt;br /&gt;
    }&lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
==== Delete Cluster ====&lt;br /&gt;
&lt;br /&gt;
'''''DELETE /v1/clusters/{cluster_id}'''''''&lt;br /&gt;
&lt;br /&gt;
This operation will asynchronously delete the indicated cluster within the provided project id.&lt;br /&gt;
&lt;br /&gt;
'''Request Parameters'''&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
! Parameter !! Type !! Description&lt;br /&gt;
|-&lt;br /&gt;
| cluster_id (URI) || UUID || Cluster ID.  This value is returned when a new cluster is created.&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
'''Response Codes'''&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
! Response !! Code(s)&lt;br /&gt;
|-&lt;br /&gt;
| Normal || accepted (202)&lt;br /&gt;
|-&lt;br /&gt;
| Error || unauthorized (401), itemNotFound (404)&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
'''Response Parameters'''&lt;br /&gt;
&lt;br /&gt;
N/A&lt;br /&gt;
&lt;br /&gt;
'''JSON Request'''&lt;br /&gt;
&lt;br /&gt;
N/A&lt;br /&gt;
&lt;br /&gt;
'''JSON Response'''&lt;br /&gt;
&lt;br /&gt;
N/A&lt;br /&gt;
&lt;br /&gt;
==== Update Cluster ====&lt;br /&gt;
&lt;br /&gt;
'''''PATCH /v1/clusters/{cluster_id}'''''&lt;br /&gt;
&lt;br /&gt;
This operation will asynchronously updated the indicated cluster (cluster_id) based on the request body received.  The request body structure is the same as create cluster api.  Cue will automatically detect differences and perform appropriate actions in order to update cluster accordingly.&lt;br /&gt;
&lt;br /&gt;
'''Request Parameters'''&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
! Parameter !! Type !! Description&lt;br /&gt;
|-&lt;br /&gt;
| network_id || UUID || Network Identification for a Neutron network where cluster will be created in.&lt;br /&gt;
|-&lt;br /&gt;
| name || string || Name of cluster.&lt;br /&gt;
|-&lt;br /&gt;
| flavor || string || Cluster node flavor, which specify VM type in terms of CPU/memory/disk resources (e.g. small, medium, large).&lt;br /&gt;
&lt;br /&gt;
small:  1 GHz dual-core CPU; 512 MB memory; 250 GB disk&lt;br /&gt;
&lt;br /&gt;
medium: 2.8 GHz dual-core CPU; 4 GB memory; 1 TB disk&lt;br /&gt;
&lt;br /&gt;
large: 3.6 GHz quad-core CPU; 32 GB memory; 5 TB disk&lt;br /&gt;
|-&lt;br /&gt;
| size || int || Number of nodes in cluster.&lt;br /&gt;
|-&lt;br /&gt;
| volume_size || int || Optional parameter to indicate size of volume for node instance.  If volumes are supported, then this parameter will be used.  If ephmeral disk are not supported, volume support will be required.&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
'''Response Codes'''&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
! Response !! Code(s)&lt;br /&gt;
|-&lt;br /&gt;
| Normal || 202 (accepted)&lt;br /&gt;
|-&lt;br /&gt;
| Error || badRequest (400), unauthorized (401), itemNotFound (404)&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
'''Response Parameters'''&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
! Parameter !! Type !! Description&lt;br /&gt;
|-&lt;br /&gt;
| cluster_id || UUID || ID of cluster to be created.&lt;br /&gt;
|-&lt;br /&gt;
| network_id || UUID || Network Identification for a Neutron network where cluster will be created in.&lt;br /&gt;
|-&lt;br /&gt;
| name || string || Name of cluster (same as provided name in request parameters).&lt;br /&gt;
|-&lt;br /&gt;
| status || string || Current status of cluster.&lt;br /&gt;
&lt;br /&gt;
BUILDING: Cluster is in progress of being provisioned.&lt;br /&gt;
&lt;br /&gt;
ACTIVE:  Cluster is running.&lt;br /&gt;
&lt;br /&gt;
ERROR: Provisioning error(s) encountered.&lt;br /&gt;
&lt;br /&gt;
DELETED:  Cluster has been deleted.&lt;br /&gt;
|-&lt;br /&gt;
| flavor || string || Cluster node flavor, which specify VM type in terms of CPU/memory/disk resources (e.g. small, medium, large).&lt;br /&gt;
|-&lt;br /&gt;
| size || int || Number of nodes in cluster.&lt;br /&gt;
|-&lt;br /&gt;
| volume_size || int || Optional parameter to indicate size of volume for node instance.  If volumes are supported, then this parameter will be used.  If ephmeral disk are not supported, volume support will be required.&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
'''JSON Request'''&lt;br /&gt;
&lt;br /&gt;
{&lt;br /&gt;
    &amp;quot;network_id&amp;quot;: &amp;quot;d32019d3-bc6e-4319-9c1d-6722fc136a22&amp;quot;,&lt;br /&gt;
    &amp;quot;name&amp;quot;: &amp;quot;MessageCluster1&amp;quot;,&lt;br /&gt;
    &amp;quot;flavor&amp;quot;: &amp;quot;large&amp;quot;,&lt;br /&gt;
    &amp;quot;size&amp;quot;: &amp;quot;3&amp;quot;,&lt;br /&gt;
    &amp;quot;volume_size&amp;quot;: &amp;quot;100&amp;quot;&lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
'''JSON Response'''&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
{&lt;br /&gt;
    &amp;quot;cluster&amp;quot;: {&lt;br /&gt;
        &amp;quot;cluster_id&amp;quot;: &amp;quot;dd745f4a-9333-417e-bb89-9c989c84c068&amp;quot;,&lt;br /&gt;
        &amp;quot;network_id&amp;quot;: &amp;quot;d32019d3-bc6e-4319-9c1d-6722fc136a22&amp;quot;,&lt;br /&gt;
        &amp;quot;name&amp;quot;: &amp;quot;Message Cluster 1&amp;quot;,&lt;br /&gt;
        &amp;quot;status&amp;quot;: &amp;quot;BUILDING&amp;quot;,&lt;br /&gt;
        &amp;quot;flavor&amp;quot;: &amp;quot;large&amp;quot;,&lt;br /&gt;
        &amp;quot;size&amp;quot;: &amp;quot;3&amp;quot;,&lt;br /&gt;
        &amp;quot;volume_size&amp;quot;: &amp;quot;100&amp;quot;,&lt;br /&gt;
        &amp;quot;created&amp;quot;: &amp;quot;2014-11-11T01:02:03Z&amp;quot;,&lt;br /&gt;
        &amp;quot;updated&amp;quot;: &amp;quot;2014-11-11T01:02:03Z&amp;quot;&lt;br /&gt;
    }&lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
===Testing===&lt;br /&gt;
&lt;br /&gt;
Cue API testing will verify the expected functionality of the Cue user interface with both positive/negative tests.  The overall scope will cover testing from the HTTP REST request to required database interactions and work-flow task submission for RPC workers.&lt;br /&gt;
&lt;br /&gt;
====Unit Tests====&lt;br /&gt;
&lt;br /&gt;
Unit tests will verify the resulting function calls for each REST-ful URI and action(s).  The Python Mock library will be used to replace external system dependencies with placeholder objects.&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
! Function !! Tests !! Input Data !! Expected Result(s)&lt;br /&gt;
|-&lt;br /&gt;
| List Clusters || &lt;br /&gt;
# Create 'n' cluster(s), then call list clusters and verify expected return object&lt;br /&gt;
# Call list clusters when no clusters exist within a project id and verify expected return object&lt;br /&gt;
|| &lt;br /&gt;
* n = # of clusters to create&lt;br /&gt;
||&lt;br /&gt;
# List of 'n' clusters is returned with appropriate fields, HTTP Ok (200)&lt;br /&gt;
# Empty list of clusters is returned, HTTP Ok (200)&lt;br /&gt;
|-&lt;br /&gt;
| Create Cluster || &lt;br /&gt;
# Create standard cluster 'c' and verify expected return object&lt;br /&gt;
# Create cluster with invalid flavor and verify expected return value&lt;br /&gt;
# Create cluster with invalid volume size and verify expected return value&lt;br /&gt;
||&lt;br /&gt;
* n = cluster size (number of nodes)&lt;br /&gt;
* m = cluster name&lt;br /&gt;
* f = flavor&lt;br /&gt;
* s = volume size&lt;br /&gt;
* nic = Network UUID&lt;br /&gt;
||&lt;br /&gt;
# Cluster ID, name and status for newly created cluster is returned, HTTP Accepted (202)&lt;br /&gt;
# HTTP Bad request is returned (400)&lt;br /&gt;
# HTTP Bad request is returned (400)&lt;br /&gt;
|-&lt;br /&gt;
| Show Cluster ||&lt;br /&gt;
# Create cluster, then call get cluster and verify expected return object&lt;br /&gt;
# Get cluster with invalid cluster_id&lt;br /&gt;
||&lt;br /&gt;
* cluster_id = cluster ID&lt;br /&gt;
||&lt;br /&gt;
# Cluster ID, name, status, created/updated date stamp and list of nodes is returned, HTTP Ok (200).&lt;br /&gt;
# HTTP Bad request is returned (400)&lt;br /&gt;
|-&lt;br /&gt;
| Delete Cluster || &lt;br /&gt;
# Create a cluster, then call delete cluster and verify expected return value&lt;br /&gt;
# Delete cluster with invalid cluster_id&lt;br /&gt;
||&lt;br /&gt;
* cluster_id = cluster ID&lt;br /&gt;
||&lt;br /&gt;
# HTTP accepted is returned (202)&lt;br /&gt;
# HTTP Bad request is returned (400)&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
====Functional Tests====&lt;br /&gt;
&lt;br /&gt;
The functional tests will verify the HTTP REST URI request lifecycle from controller routing to HTTP response.  These tests will make use of Pecan's testing utility; pecan.testing module.&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
! Operation !! URI !! Tests !! Input Data !! Expected Data (JSON)&lt;br /&gt;
|-&lt;br /&gt;
| GET || /v1/clusters || &lt;br /&gt;
# Call when clusters exist&lt;br /&gt;
# Call when no clusters exist&lt;br /&gt;
|| &lt;br /&gt;
* n/a&lt;br /&gt;
||&lt;br /&gt;
# List of 'n' clusters is returned with appropriate fields, HTTP Ok (200)&lt;br /&gt;
# Empty list of clusters is returned, HTTP Ok (200)&lt;br /&gt;
|-&lt;br /&gt;
| POST || /v1/clusters ||&lt;br /&gt;
# Create standard cluster 'c' and verify expected return object&lt;br /&gt;
# Create cluster with invalid flavor and verify expected return value&lt;br /&gt;
# Create cluster with invalid volume size and verify expected return value&lt;br /&gt;
|| &lt;br /&gt;
* n = cluster size (number of nodes)&lt;br /&gt;
* m = cluster name&lt;br /&gt;
* f = flavor&lt;br /&gt;
* s = volume size&lt;br /&gt;
* nic = Network UUID&lt;br /&gt;
||&lt;br /&gt;
# Cluster ID, name and status for newly created cluster is returned, HTTP Accepted (202)&lt;br /&gt;
# HTTP Bad request is returned (400)&lt;br /&gt;
# HTTP Bad request is returned (400)&lt;br /&gt;
||&lt;br /&gt;
|-&lt;br /&gt;
| GET || /v1/clusters/{cluster_id} || &lt;br /&gt;
# Create cluster, then call get cluster and verify expected return object&lt;br /&gt;
# Get cluster with invalid cluster_id&lt;br /&gt;
|| &lt;br /&gt;
* cluster_id = cluster &lt;br /&gt;
||&lt;br /&gt;
# Cluster ID, name, status, created/updated date stamp and list of nodes is returned, HTTP Ok (200).&lt;br /&gt;
# HTTP Bad request is returned (400)&lt;br /&gt;
||&lt;br /&gt;
|-&lt;br /&gt;
| DELETE || /v1/clusters/{cluster_id} ||&lt;br /&gt;
# Create a cluster, then call delete cluster and verify expected return value&lt;br /&gt;
# Delete cluster with invalid cluster_id&lt;br /&gt;
||&lt;br /&gt;
* cluster_id = cluster ID&lt;br /&gt;
||&lt;br /&gt;
# HTTP accepted is returned (202)&lt;br /&gt;
# HTTP Bad request is returned (400)&lt;br /&gt;
||&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
====Integration Tests====&lt;br /&gt;
&lt;br /&gt;
The integration tests will cover API functionality from HTTP request to database access and task submission for RPC workers.  The Pecan test utility will be used to route test request URI to appropriate controllers, then database record(s) will be verified for applicable change.  Finally the creation of task objections will be verified to ensure valid task flows.&lt;/div&gt;</summary>
		<author><name>Dagnello</name></author>	</entry>

	<entry>
		<id>https://wiki.openstack.org/w/index.php?title=Cue/api_2&amp;diff=70285</id>
		<title>Cue/api 2</title>
		<link rel="alternate" type="text/html" href="https://wiki.openstack.org/w/index.php?title=Cue/api_2&amp;diff=70285"/>
				<updated>2014-12-12T23:23:00Z</updated>
		
		<summary type="html">&lt;p&gt;Dagnello: /* Create Cluster */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;== Cue API Design ==&lt;br /&gt;
=== Acronyms ===&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
! '''Acronym''' !! '''Definition'''&lt;br /&gt;
|-&lt;br /&gt;
| SSL || Secure Sockets Layer&lt;br /&gt;
|-&lt;br /&gt;
| REST || Representational State Transfer&lt;br /&gt;
|-&lt;br /&gt;
| URI || Uniform Resource Identifier&lt;br /&gt;
|-&lt;br /&gt;
| UUID || Universally Unique Identifier&lt;br /&gt;
|-&lt;br /&gt;
| AMQP || Advanced Messaging Queuing Protocol&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
=== Requirements ===&lt;br /&gt;
&lt;br /&gt;
API Requirements for Cue - Kilo timeframe.&lt;br /&gt;
&lt;br /&gt;
* Keystone integration&lt;br /&gt;
* CRUD on Cluster&lt;br /&gt;
* Cluster Management – Scale up/down&lt;br /&gt;
* Devstack integration&lt;br /&gt;
* Gate Tests&lt;br /&gt;
&lt;br /&gt;
=== System Context Diagram ===&lt;br /&gt;
&lt;br /&gt;
[[File:SCD.jpg]]&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
! '''Component''' !! '''Description'''&lt;br /&gt;
|-&lt;br /&gt;
| User || Direct customer of Cue.&lt;br /&gt;
|-&lt;br /&gt;
| Horizon || Cue functionality will be added to Horizon, which will provide a web-based portal for Cue control.&lt;br /&gt;
|-&lt;br /&gt;
| CLI || Command Line Interface to Cue, provides user access to provisioning and deploying messaging clusters.&lt;br /&gt;
|-&lt;br /&gt;
| REST_API || Provides user access to provisioning and deploying messaging clusters through REST interface.  This is a light-weight interface, provisioning and configuration of clusters/nodes is delegated to the TaskWorker process.&lt;br /&gt;
|-&lt;br /&gt;
| TaskScheduler || Used to synchronize work tasks between the REST_API and TaskWorker processes.&lt;br /&gt;
|-&lt;br /&gt;
| TaskWorker || Carries out work associated with all provisioning, configuration and management of RabbitMQ clusters and nodes.  Makes use of heat for initial provisioning/deployment.&lt;br /&gt;
|-&lt;br /&gt;
| DB || Database to store information on clusters and nodes.  Example, in cluster creation, when request is initially received through REST_API, this DB is updated accordingly and the work is delegated to TaskWorker.  TaskWorker then updates this DB as provisioning and configuration takes place.  Subsequent calls to check on status of cluster creation, will return updated information from this DB.&lt;br /&gt;
|-&lt;br /&gt;
| Heat || Used cloud instance orchestration in deploying RabbitMQ cluster images.&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
=== REST API ===&lt;br /&gt;
&lt;br /&gt;
General requirement, REST API must respond within 500ms.&lt;br /&gt;
==== List Clusters ====&lt;br /&gt;
&lt;br /&gt;
'''''GET /v1/clusters'''''&lt;br /&gt;
&lt;br /&gt;
This operation synchronously returns all clusters provisioned within the associated project id.&lt;br /&gt;
&lt;br /&gt;
'''Request Parameters'''&lt;br /&gt;
N/A&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
! Response !! Code(s)&lt;br /&gt;
|-&lt;br /&gt;
| Normal || ok (200)&lt;br /&gt;
|-&lt;br /&gt;
| Error || unauthorized (401)&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
'''Response Parameters'''&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
! Parameter !! Type !! Description&lt;br /&gt;
|-&lt;br /&gt;
| cluster(list) || string || List of clusters, detailing respective cluster id, name, status, created time stamp and updated time stamp.&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
	&lt;br /&gt;
&lt;br /&gt;
'''JSON Request'''&lt;br /&gt;
&lt;br /&gt;
N/A&lt;br /&gt;
&lt;br /&gt;
'''JSON Response'''&lt;br /&gt;
&lt;br /&gt;
{&lt;br /&gt;
    &amp;quot;clusters&amp;quot;: &amp;lt;nowiki&amp;gt;[&amp;lt;/nowiki&amp;gt;&lt;br /&gt;
        {&lt;br /&gt;
            &amp;quot;cluster_id&amp;quot;: &amp;quot;b51948c9-1ac5-4c28-a580-6f7c500d82f8&amp;quot;,&lt;br /&gt;
            &amp;quot;network_id&amp;quot;: &amp;quot;d32019d3-bc6e-4319-9c1d-6722fc136a22&amp;quot;,&lt;br /&gt;
            &amp;quot;name&amp;quot;: &amp;quot;Message Cluster 1&amp;quot;,&lt;br /&gt;
            &amp;quot;status&amp;quot;: &amp;quot;ACTIVE&amp;quot;,&lt;br /&gt;
            &amp;quot;flavor&amp;quot;: &amp;quot;medium&amp;quot;,&lt;br /&gt;
            &amp;quot;size&amp;quot;: &amp;quot;3&amp;quot;,&lt;br /&gt;
            &amp;quot;created&amp;quot;: &amp;quot;2014-11-11T01:02:03Z&amp;quot;,&lt;br /&gt;
            &amp;quot;updated&amp;quot;: &amp;quot;2014-11-11T01:02:03Z&amp;quot;&lt;br /&gt;
        },&lt;br /&gt;
        {&lt;br /&gt;
            &amp;quot;cluster_id&amp;quot;: &amp;quot;13c456c9-bbfc-4c31-b26d-3ae5c3cd7a77&amp;quot;,&lt;br /&gt;
            &amp;quot;network_id&amp;quot;: &amp;quot;d32019d3-bc6e-4319-9c1d-6722fc136a22&amp;quot;,&lt;br /&gt;
            &amp;quot;name&amp;quot;: &amp;quot;Message Cluster 2&amp;quot;,&lt;br /&gt;
            &amp;quot;status&amp;quot;: &amp;quot;BUILDING&amp;quot;,&lt;br /&gt;
            &amp;quot;flavor&amp;quot;: &amp;quot;small&amp;quot;,&lt;br /&gt;
            &amp;quot;size&amp;quot;: &amp;quot;5&amp;quot;,&lt;br /&gt;
            &amp;quot;created&amp;quot;: &amp;quot;2014-11-12T13:23:54Z&amp;quot;,&lt;br /&gt;
            &amp;quot;updated&amp;quot;: &amp;quot;2014-11-13T19:55:01Z&amp;quot;&lt;br /&gt;
        }&lt;br /&gt;
    ]&lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
==== Create Cluster ====&lt;br /&gt;
&lt;br /&gt;
'''''POST /v1/clusters'''''&lt;br /&gt;
&lt;br /&gt;
This operation asynchronously creates a new cluster of Nova instances provisioned with the required message brokers in a central project id. &lt;br /&gt;
&lt;br /&gt;
'''Request Parameters'''&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
! Parameter !! Type !! Description&lt;br /&gt;
|-&lt;br /&gt;
| network_id || UUID || Network Identification for a Neutron network where cluster will be created in.&lt;br /&gt;
|-&lt;br /&gt;
| name || string || Name of cluster.&lt;br /&gt;
|-&lt;br /&gt;
| flavor || string || Cluster node flavor, which specify VM type in terms of CPU/memory/disk resources (e.g. small, medium, large).&lt;br /&gt;
&lt;br /&gt;
small:  1 GHz dual-core CPU; 512 MB memory; 250 GB disk&lt;br /&gt;
&lt;br /&gt;
medium: 2.8 GHz dual-core CPU; 4 GB memory; 1 TB disk&lt;br /&gt;
&lt;br /&gt;
large: 3.6 GHz quad-core CPU; 32 GB memory; 5 TB disk&lt;br /&gt;
|-&lt;br /&gt;
| size || int || Number of nodes in cluster.&lt;br /&gt;
|-&lt;br /&gt;
| volume_size || int || Optional parameter to indicate size of volume for node instance.  If volumes are supported, then this parameter will be used.  If ephmeral disk are not supported, volume support will be required.&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
'''Response Codes'''&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
! Response !! Code(s)&lt;br /&gt;
|-&lt;br /&gt;
| Normal || 202 (accepted)&lt;br /&gt;
|-&lt;br /&gt;
| Error || badRequest (400), unauthorized (401), itemNotFound (404)&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
'''Response Parameters'''&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
! Parameter !! Type !! Description&lt;br /&gt;
|-&lt;br /&gt;
| cluster_id || UUID || ID of cluster to be created.&lt;br /&gt;
|-&lt;br /&gt;
| network_id || UUID || Network Identification for a Neutron network where cluster will be created in.&lt;br /&gt;
|-&lt;br /&gt;
| name || string || Name of cluster (same as provided name in request parameters).&lt;br /&gt;
|-&lt;br /&gt;
| status || string || Current status of cluster.&lt;br /&gt;
|-&lt;br /&gt;
| flavor || string || Cluster node flavor, which specify VM type in terms of CPU/memory/disk resources (e.g. small, medium, large).&lt;br /&gt;
|-&lt;br /&gt;
| size || int || Number of nodes in cluster.&lt;br /&gt;
|-&lt;br /&gt;
| volume_size || int || Indicate size of volume for node instance.&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
'''JSON Request'''&lt;br /&gt;
&lt;br /&gt;
{&lt;br /&gt;
    &amp;quot;network_id&amp;quot;: &amp;quot;d32019d3-bc6e-4319-9c1d-6722fc136a22&amp;quot;,&lt;br /&gt;
    &amp;quot;name&amp;quot;: &amp;quot;MessageCluster1&amp;quot;,&lt;br /&gt;
    &amp;quot;flavor&amp;quot;: &amp;quot;large&amp;quot;,&lt;br /&gt;
    &amp;quot;size&amp;quot;: &amp;quot;3&amp;quot;,&lt;br /&gt;
    &amp;quot;volume_size&amp;quot;: &amp;quot;100&amp;quot;&lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
'''JSON Response'''&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
{&lt;br /&gt;
    &amp;quot;cluster&amp;quot;: {&lt;br /&gt;
        &amp;quot;cluster_id&amp;quot;: &amp;quot;dd745f4a-9333-417e-bb89-9c989c84c068&amp;quot;,&lt;br /&gt;
        &amp;quot;network_id&amp;quot;: &amp;quot;d32019d3-bc6e-4319-9c1d-6722fc136a22&amp;quot;,&lt;br /&gt;
        &amp;quot;name&amp;quot;: &amp;quot;Message Cluster 1&amp;quot;,&lt;br /&gt;
        &amp;quot;status&amp;quot;: &amp;quot;BUILDING&amp;quot;,&lt;br /&gt;
        &amp;quot;flavor&amp;quot;: &amp;quot;large&amp;quot;,&lt;br /&gt;
        &amp;quot;size&amp;quot;: &amp;quot;3&amp;quot;,&lt;br /&gt;
        &amp;quot;volume_size&amp;quot;: &amp;quot;100&amp;quot;,&lt;br /&gt;
        &amp;quot;created&amp;quot;: &amp;quot;2014-11-11T01:02:03Z&amp;quot;,&lt;br /&gt;
        &amp;quot;updated&amp;quot;: &amp;quot;2014-11-11T01:02:03Z&amp;quot;&lt;br /&gt;
    }&lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
==== Show Cluster ====&lt;br /&gt;
&lt;br /&gt;
'''''GET /v1/clusters/{cluster_id}'''''&lt;br /&gt;
&lt;br /&gt;
This operation synchronously returns the status and information on the specified cluster within the provided project id.&lt;br /&gt;
&lt;br /&gt;
'''Request Parameters'''&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
! Parameter !! Type !! Description&lt;br /&gt;
|-&lt;br /&gt;
| cluster_id (URI) || UUID || Cluster ID.  This value is returned when a new cluster is created.&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
'''Response Codes'''&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
! Response !! Code(s)&lt;br /&gt;
|-&lt;br /&gt;
| Normal || ok (200)&lt;br /&gt;
|-&lt;br /&gt;
| Error || unauthorized (401), itemNotFound (404)&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
'''Response Parameters'''&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
! Parameter !! Type !! Description&lt;br /&gt;
|-&lt;br /&gt;
| cluster_id || UUID || ID of requested cluster.&lt;br /&gt;
|-&lt;br /&gt;
| name || string || Name of cluster.&lt;br /&gt;
|-&lt;br /&gt;
| status || string || Current status of cluster.&lt;br /&gt;
&lt;br /&gt;
BUILDING: Cluster is in progress of being provisioned.&lt;br /&gt;
&lt;br /&gt;
ACTIVE:  Cluster is running.&lt;br /&gt;
&lt;br /&gt;
ERROR: Provisioning error(s) encountered.&lt;br /&gt;
&lt;br /&gt;
DELETED:  Cluster has been deleted.&lt;br /&gt;
|-&lt;br /&gt;
| created || string || Created time stamp in format: yyyy-mm-ddThh:mm:ssZ&lt;br /&gt;
|-&lt;br /&gt;
| updated || string || Last updated time stamp in format: yyyy-mm-ddThh:mm:ssZ&lt;br /&gt;
|-&lt;br /&gt;
| nodes(list) || node || List of nodes, which includes node id, instance state, and flavor.&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
'''JSON Request'''&lt;br /&gt;
&lt;br /&gt;
N/A&lt;br /&gt;
&lt;br /&gt;
'''JSON Response'''&lt;br /&gt;
&lt;br /&gt;
{&lt;br /&gt;
    &amp;quot;cluster&amp;quot;: {&lt;br /&gt;
        &amp;quot;cluster_id&amp;quot;: &amp;quot;dd745f4a-9333-417e-bb89-9c989c84c068&amp;quot;,&lt;br /&gt;
        &amp;quot;network_id&amp;quot;: &amp;quot;d32019d3-bc6e-4319-9c1d-6722fc136a22&amp;quot;,&lt;br /&gt;
        &amp;quot;name&amp;quot;: &amp;quot;Message Cluster 1&amp;quot;,&lt;br /&gt;
        &amp;quot;status&amp;quot;: &amp;quot;ACTIVE&amp;quot;,&lt;br /&gt;
        &amp;quot;flavor&amp;quot;: &amp;quot;large&amp;quot;,&lt;br /&gt;
        &amp;quot;size&amp;quot;: &amp;quot;3&amp;quot;,&lt;br /&gt;
        &amp;quot;volume_size&amp;quot;: &amp;quot;100&amp;quot;,&lt;br /&gt;
        &amp;quot;created&amp;quot;: &amp;quot;2014-11-11T01:02:03Z&amp;quot;,&lt;br /&gt;
        &amp;quot;updated&amp;quot;: &amp;quot;2014-11-11T01:02:03Z&amp;quot;,&lt;br /&gt;
        &amp;quot;endpoints&amp;quot;: [&lt;br /&gt;
            {&lt;br /&gt;
                &amp;quot;type&amp;quot;: &amp;quot;AMQP&amp;quot;,&lt;br /&gt;
                &amp;quot;value&amp;quot;: &amp;quot;amqp://10.20.30.40:10000&amp;quot;&lt;br /&gt;
            },&lt;br /&gt;
            {&lt;br /&gt;
                &amp;quot;type&amp;quot;: &amp;quot;console&amp;quot;,&lt;br /&gt;
                &amp;quot;value&amp;quot;: &amp;quot;http://10.20.30.40:5672&amp;quot;&lt;br /&gt;
            },&lt;br /&gt;
            {&lt;br /&gt;
                &amp;quot;type&amp;quot;: &amp;quot;AMQP&amp;quot;,&lt;br /&gt;
                &amp;quot;value&amp;quot;: &amp;quot;amqp://10.20.30.41:10000&amp;quot;&lt;br /&gt;
            },&lt;br /&gt;
            {&lt;br /&gt;
                &amp;quot;type&amp;quot;: &amp;quot;console&amp;quot;,&lt;br /&gt;
                &amp;quot;value&amp;quot;: &amp;quot;http://10.20.30.41:5672&amp;quot;&lt;br /&gt;
            },&lt;br /&gt;
            {&lt;br /&gt;
                &amp;quot;type&amp;quot;: &amp;quot;AMQP&amp;quot;,&lt;br /&gt;
                &amp;quot;value&amp;quot;: &amp;quot;amqp://10.20.30.42:10000&amp;quot;&lt;br /&gt;
            },&lt;br /&gt;
            {&lt;br /&gt;
                &amp;quot;type&amp;quot;: &amp;quot;console&amp;quot;,&lt;br /&gt;
                &amp;quot;value&amp;quot;: &amp;quot;http://10.20.30.42:5672&amp;quot;&lt;br /&gt;
            }&lt;br /&gt;
        ]&lt;br /&gt;
    }&lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
==== Delete Cluster ====&lt;br /&gt;
&lt;br /&gt;
'''''DELETE /v1/clusters/{cluster_id}'''''''&lt;br /&gt;
&lt;br /&gt;
This operation will asynchronously delete the indicated cluster within the provided project id.&lt;br /&gt;
&lt;br /&gt;
'''Request Parameters'''&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
! Parameter !! Type !! Description&lt;br /&gt;
|-&lt;br /&gt;
| cluster_id (URI) || UUID || Cluster ID.  This value is returned when a new cluster is created.&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
'''Response Codes'''&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
! Response !! Code(s)&lt;br /&gt;
|-&lt;br /&gt;
| Normal || accepted (202)&lt;br /&gt;
|-&lt;br /&gt;
| Error || unauthorized (401), itemNotFound (404)&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
'''Response Parameters'''&lt;br /&gt;
&lt;br /&gt;
N/A&lt;br /&gt;
&lt;br /&gt;
'''JSON Request'''&lt;br /&gt;
&lt;br /&gt;
N/A&lt;br /&gt;
&lt;br /&gt;
'''JSON Response'''&lt;br /&gt;
&lt;br /&gt;
N/A&lt;br /&gt;
&lt;br /&gt;
==== Update Cluster ====&lt;br /&gt;
&lt;br /&gt;
'''''PATCH /v1/clusters/{cluster_id}'''''&lt;br /&gt;
&lt;br /&gt;
This operation will asynchronously updated the indicated cluster (cluster_id) based on the request body received.  The request body structure is the same as create cluster api.  Cue will automatically detect differences and perform appropriate actions in order to update cluster accordingly.&lt;br /&gt;
&lt;br /&gt;
'''Request Parameters'''&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
! Parameter !! Type !! Description&lt;br /&gt;
|-&lt;br /&gt;
| network_id || UUID || Network Identification for a Neutron network where cluster will be created in.&lt;br /&gt;
|-&lt;br /&gt;
| name || string || Name of cluster.&lt;br /&gt;
|-&lt;br /&gt;
| flavor || string || Cluster node flavor, which specify VM type in terms of CPU/memory/disk resources (e.g. small, medium, large).&lt;br /&gt;
&lt;br /&gt;
small:  1 GHz dual-core CPU; 512 MB memory; 250 GB disk&lt;br /&gt;
&lt;br /&gt;
medium: 2.8 GHz dual-core CPU; 4 GB memory; 1 TB disk&lt;br /&gt;
&lt;br /&gt;
large: 3.6 GHz quad-core CPU; 32 GB memory; 5 TB disk&lt;br /&gt;
|-&lt;br /&gt;
| size || int || Number of nodes in cluster.&lt;br /&gt;
|-&lt;br /&gt;
| volume_size || int || Optional parameter to indicate size of volume for node instance.  If volumes are supported, then this parameter will be used.  If ephmeral disk are not supported, volume support will be required.&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
'''Response Codes'''&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
! Response !! Code(s)&lt;br /&gt;
|-&lt;br /&gt;
| Normal || 202 (accepted)&lt;br /&gt;
|-&lt;br /&gt;
| Error || badRequest (400), unauthorized (401), itemNotFound (404)&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
'''Response Parameters'''&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
! Parameter !! Type !! Description&lt;br /&gt;
|-&lt;br /&gt;
| cluster_id || UUID || ID of cluster to be created.&lt;br /&gt;
|-&lt;br /&gt;
| network_id || UUID || Network Identification for a Neutron network where cluster will be created in.&lt;br /&gt;
|-&lt;br /&gt;
| name || string || Name of cluster (same as provided name in request parameters).&lt;br /&gt;
|-&lt;br /&gt;
| status || string || Current status of cluster.&lt;br /&gt;
|-&lt;br /&gt;
| flavor || string || Cluster node flavor, which specify VM type in terms of CPU/memory/disk resources (e.g. small, medium, large).&lt;br /&gt;
|-&lt;br /&gt;
| size || int || Number of nodes in cluster.&lt;br /&gt;
|-&lt;br /&gt;
| volume_size || int || Optional parameter to indicate size of volume for node instance.  If volumes are supported, then this parameter will be used.  If ephmeral disk are not supported, volume support will be required.&lt;br /&gt;
&lt;br /&gt;
BUILDING: Cluster is in progress of being provisioned.&lt;br /&gt;
&lt;br /&gt;
ACTIVE:  Cluster is running.&lt;br /&gt;
&lt;br /&gt;
ERROR: Provisioning error(s) encountered.&lt;br /&gt;
&lt;br /&gt;
DELETED:  Cluster has been deleted.&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
'''JSON Request'''&lt;br /&gt;
&lt;br /&gt;
{&lt;br /&gt;
    &amp;quot;network_id&amp;quot;: &amp;quot;d32019d3-bc6e-4319-9c1d-6722fc136a22&amp;quot;,&lt;br /&gt;
    &amp;quot;name&amp;quot;: &amp;quot;MessageCluster1&amp;quot;,&lt;br /&gt;
    &amp;quot;flavor&amp;quot;: &amp;quot;large&amp;quot;,&lt;br /&gt;
    &amp;quot;size&amp;quot;: &amp;quot;3&amp;quot;,&lt;br /&gt;
    &amp;quot;volume_size&amp;quot;: &amp;quot;100&amp;quot;&lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
'''JSON Response'''&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
{&lt;br /&gt;
    &amp;quot;cluster&amp;quot;: {&lt;br /&gt;
        &amp;quot;cluster_id&amp;quot;: &amp;quot;dd745f4a-9333-417e-bb89-9c989c84c068&amp;quot;,&lt;br /&gt;
        &amp;quot;network_id&amp;quot;: &amp;quot;d32019d3-bc6e-4319-9c1d-6722fc136a22&amp;quot;,&lt;br /&gt;
        &amp;quot;name&amp;quot;: &amp;quot;Message Cluster 1&amp;quot;,&lt;br /&gt;
        &amp;quot;status&amp;quot;: &amp;quot;BUILDING&amp;quot;,&lt;br /&gt;
        &amp;quot;flavor&amp;quot;: &amp;quot;large&amp;quot;,&lt;br /&gt;
        &amp;quot;size&amp;quot;: &amp;quot;3&amp;quot;,&lt;br /&gt;
        &amp;quot;volume_size&amp;quot;: &amp;quot;100&amp;quot;,&lt;br /&gt;
        &amp;quot;created&amp;quot;: &amp;quot;2014-11-11T01:02:03Z&amp;quot;,&lt;br /&gt;
        &amp;quot;updated&amp;quot;: &amp;quot;2014-11-11T01:02:03Z&amp;quot;&lt;br /&gt;
    }&lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
===Testing===&lt;br /&gt;
&lt;br /&gt;
Cue API testing will verify the expected functionality of the Cue user interface with both positive/negative tests.  The overall scope will cover testing from the HTTP REST request to required database interactions and work-flow task submission for RPC workers.&lt;br /&gt;
&lt;br /&gt;
====Unit Tests====&lt;br /&gt;
&lt;br /&gt;
Unit tests will verify the resulting function calls for each REST-ful URI and action(s).  The Python Mock library will be used to replace external system dependencies with placeholder objects.&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
! Function !! Tests !! Input Data !! Expected Result(s)&lt;br /&gt;
|-&lt;br /&gt;
| List Clusters || &lt;br /&gt;
# Create 'n' cluster(s), then call list clusters and verify expected return object&lt;br /&gt;
# Call list clusters when no clusters exist within a project id and verify expected return object&lt;br /&gt;
|| &lt;br /&gt;
* n = # of clusters to create&lt;br /&gt;
||&lt;br /&gt;
# List of 'n' clusters is returned with appropriate fields, HTTP Ok (200)&lt;br /&gt;
# Empty list of clusters is returned, HTTP Ok (200)&lt;br /&gt;
|-&lt;br /&gt;
| Create Cluster || &lt;br /&gt;
# Create standard cluster 'c' and verify expected return object&lt;br /&gt;
# Create cluster with invalid flavor and verify expected return value&lt;br /&gt;
# Create cluster with invalid volume size and verify expected return value&lt;br /&gt;
||&lt;br /&gt;
* n = cluster size (number of nodes)&lt;br /&gt;
* m = cluster name&lt;br /&gt;
* f = flavor&lt;br /&gt;
* s = volume size&lt;br /&gt;
* nic = Network UUID&lt;br /&gt;
||&lt;br /&gt;
# Cluster ID, name and status for newly created cluster is returned, HTTP Accepted (202)&lt;br /&gt;
# HTTP Bad request is returned (400)&lt;br /&gt;
# HTTP Bad request is returned (400)&lt;br /&gt;
|-&lt;br /&gt;
| Show Cluster ||&lt;br /&gt;
# Create cluster, then call get cluster and verify expected return object&lt;br /&gt;
# Get cluster with invalid cluster_id&lt;br /&gt;
||&lt;br /&gt;
* cluster_id = cluster ID&lt;br /&gt;
||&lt;br /&gt;
# Cluster ID, name, status, created/updated date stamp and list of nodes is returned, HTTP Ok (200).&lt;br /&gt;
# HTTP Bad request is returned (400)&lt;br /&gt;
|-&lt;br /&gt;
| Delete Cluster || &lt;br /&gt;
# Create a cluster, then call delete cluster and verify expected return value&lt;br /&gt;
# Delete cluster with invalid cluster_id&lt;br /&gt;
||&lt;br /&gt;
* cluster_id = cluster ID&lt;br /&gt;
||&lt;br /&gt;
# HTTP accepted is returned (202)&lt;br /&gt;
# HTTP Bad request is returned (400)&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
====Functional Tests====&lt;br /&gt;
&lt;br /&gt;
The functional tests will verify the HTTP REST URI request lifecycle from controller routing to HTTP response.  These tests will make use of Pecan's testing utility; pecan.testing module.&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
! Operation !! URI !! Tests !! Input Data !! Expected Data (JSON)&lt;br /&gt;
|-&lt;br /&gt;
| GET || /v1/clusters || &lt;br /&gt;
# Call when clusters exist&lt;br /&gt;
# Call when no clusters exist&lt;br /&gt;
|| &lt;br /&gt;
* n/a&lt;br /&gt;
||&lt;br /&gt;
# List of 'n' clusters is returned with appropriate fields, HTTP Ok (200)&lt;br /&gt;
# Empty list of clusters is returned, HTTP Ok (200)&lt;br /&gt;
|-&lt;br /&gt;
| POST || /v1/clusters ||&lt;br /&gt;
# Create standard cluster 'c' and verify expected return object&lt;br /&gt;
# Create cluster with invalid flavor and verify expected return value&lt;br /&gt;
# Create cluster with invalid volume size and verify expected return value&lt;br /&gt;
|| &lt;br /&gt;
* n = cluster size (number of nodes)&lt;br /&gt;
* m = cluster name&lt;br /&gt;
* f = flavor&lt;br /&gt;
* s = volume size&lt;br /&gt;
* nic = Network UUID&lt;br /&gt;
||&lt;br /&gt;
# Cluster ID, name and status for newly created cluster is returned, HTTP Accepted (202)&lt;br /&gt;
# HTTP Bad request is returned (400)&lt;br /&gt;
# HTTP Bad request is returned (400)&lt;br /&gt;
||&lt;br /&gt;
|-&lt;br /&gt;
| GET || /v1/clusters/{cluster_id} || &lt;br /&gt;
# Create cluster, then call get cluster and verify expected return object&lt;br /&gt;
# Get cluster with invalid cluster_id&lt;br /&gt;
|| &lt;br /&gt;
* cluster_id = cluster &lt;br /&gt;
||&lt;br /&gt;
# Cluster ID, name, status, created/updated date stamp and list of nodes is returned, HTTP Ok (200).&lt;br /&gt;
# HTTP Bad request is returned (400)&lt;br /&gt;
||&lt;br /&gt;
|-&lt;br /&gt;
| DELETE || /v1/clusters/{cluster_id} ||&lt;br /&gt;
# Create a cluster, then call delete cluster and verify expected return value&lt;br /&gt;
# Delete cluster with invalid cluster_id&lt;br /&gt;
||&lt;br /&gt;
* cluster_id = cluster ID&lt;br /&gt;
||&lt;br /&gt;
# HTTP accepted is returned (202)&lt;br /&gt;
# HTTP Bad request is returned (400)&lt;br /&gt;
||&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
====Integration Tests====&lt;br /&gt;
&lt;br /&gt;
The integration tests will cover API functionality from HTTP request to database access and task submission for RPC workers.  The Pecan test utility will be used to route test request URI to appropriate controllers, then database record(s) will be verified for applicable change.  Finally the creation of task objections will be verified to ensure valid task flows.&lt;/div&gt;</summary>
		<author><name>Dagnello</name></author>	</entry>

	<entry>
		<id>https://wiki.openstack.org/w/index.php?title=Cue/api_2&amp;diff=70284</id>
		<title>Cue/api 2</title>
		<link rel="alternate" type="text/html" href="https://wiki.openstack.org/w/index.php?title=Cue/api_2&amp;diff=70284"/>
				<updated>2014-12-12T23:22:08Z</updated>
		
		<summary type="html">&lt;p&gt;Dagnello: /* Create Cluster */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;== Cue API Design ==&lt;br /&gt;
=== Acronyms ===&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
! '''Acronym''' !! '''Definition'''&lt;br /&gt;
|-&lt;br /&gt;
| SSL || Secure Sockets Layer&lt;br /&gt;
|-&lt;br /&gt;
| REST || Representational State Transfer&lt;br /&gt;
|-&lt;br /&gt;
| URI || Uniform Resource Identifier&lt;br /&gt;
|-&lt;br /&gt;
| UUID || Universally Unique Identifier&lt;br /&gt;
|-&lt;br /&gt;
| AMQP || Advanced Messaging Queuing Protocol&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
=== Requirements ===&lt;br /&gt;
&lt;br /&gt;
API Requirements for Cue - Kilo timeframe.&lt;br /&gt;
&lt;br /&gt;
* Keystone integration&lt;br /&gt;
* CRUD on Cluster&lt;br /&gt;
* Cluster Management – Scale up/down&lt;br /&gt;
* Devstack integration&lt;br /&gt;
* Gate Tests&lt;br /&gt;
&lt;br /&gt;
=== System Context Diagram ===&lt;br /&gt;
&lt;br /&gt;
[[File:SCD.jpg]]&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
! '''Component''' !! '''Description'''&lt;br /&gt;
|-&lt;br /&gt;
| User || Direct customer of Cue.&lt;br /&gt;
|-&lt;br /&gt;
| Horizon || Cue functionality will be added to Horizon, which will provide a web-based portal for Cue control.&lt;br /&gt;
|-&lt;br /&gt;
| CLI || Command Line Interface to Cue, provides user access to provisioning and deploying messaging clusters.&lt;br /&gt;
|-&lt;br /&gt;
| REST_API || Provides user access to provisioning and deploying messaging clusters through REST interface.  This is a light-weight interface, provisioning and configuration of clusters/nodes is delegated to the TaskWorker process.&lt;br /&gt;
|-&lt;br /&gt;
| TaskScheduler || Used to synchronize work tasks between the REST_API and TaskWorker processes.&lt;br /&gt;
|-&lt;br /&gt;
| TaskWorker || Carries out work associated with all provisioning, configuration and management of RabbitMQ clusters and nodes.  Makes use of heat for initial provisioning/deployment.&lt;br /&gt;
|-&lt;br /&gt;
| DB || Database to store information on clusters and nodes.  Example, in cluster creation, when request is initially received through REST_API, this DB is updated accordingly and the work is delegated to TaskWorker.  TaskWorker then updates this DB as provisioning and configuration takes place.  Subsequent calls to check on status of cluster creation, will return updated information from this DB.&lt;br /&gt;
|-&lt;br /&gt;
| Heat || Used cloud instance orchestration in deploying RabbitMQ cluster images.&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
=== REST API ===&lt;br /&gt;
&lt;br /&gt;
General requirement, REST API must respond within 500ms.&lt;br /&gt;
==== List Clusters ====&lt;br /&gt;
&lt;br /&gt;
'''''GET /v1/clusters'''''&lt;br /&gt;
&lt;br /&gt;
This operation synchronously returns all clusters provisioned within the associated project id.&lt;br /&gt;
&lt;br /&gt;
'''Request Parameters'''&lt;br /&gt;
N/A&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
! Response !! Code(s)&lt;br /&gt;
|-&lt;br /&gt;
| Normal || ok (200)&lt;br /&gt;
|-&lt;br /&gt;
| Error || unauthorized (401)&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
'''Response Parameters'''&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
! Parameter !! Type !! Description&lt;br /&gt;
|-&lt;br /&gt;
| cluster(list) || string || List of clusters, detailing respective cluster id, name, status, created time stamp and updated time stamp.&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
	&lt;br /&gt;
&lt;br /&gt;
'''JSON Request'''&lt;br /&gt;
&lt;br /&gt;
N/A&lt;br /&gt;
&lt;br /&gt;
'''JSON Response'''&lt;br /&gt;
&lt;br /&gt;
{&lt;br /&gt;
    &amp;quot;clusters&amp;quot;: &amp;lt;nowiki&amp;gt;[&amp;lt;/nowiki&amp;gt;&lt;br /&gt;
        {&lt;br /&gt;
            &amp;quot;cluster_id&amp;quot;: &amp;quot;b51948c9-1ac5-4c28-a580-6f7c500d82f8&amp;quot;,&lt;br /&gt;
            &amp;quot;network_id&amp;quot;: &amp;quot;d32019d3-bc6e-4319-9c1d-6722fc136a22&amp;quot;,&lt;br /&gt;
            &amp;quot;name&amp;quot;: &amp;quot;Message Cluster 1&amp;quot;,&lt;br /&gt;
            &amp;quot;status&amp;quot;: &amp;quot;ACTIVE&amp;quot;,&lt;br /&gt;
            &amp;quot;flavor&amp;quot;: &amp;quot;medium&amp;quot;,&lt;br /&gt;
            &amp;quot;size&amp;quot;: &amp;quot;3&amp;quot;,&lt;br /&gt;
            &amp;quot;created&amp;quot;: &amp;quot;2014-11-11T01:02:03Z&amp;quot;,&lt;br /&gt;
            &amp;quot;updated&amp;quot;: &amp;quot;2014-11-11T01:02:03Z&amp;quot;&lt;br /&gt;
        },&lt;br /&gt;
        {&lt;br /&gt;
            &amp;quot;cluster_id&amp;quot;: &amp;quot;13c456c9-bbfc-4c31-b26d-3ae5c3cd7a77&amp;quot;,&lt;br /&gt;
            &amp;quot;network_id&amp;quot;: &amp;quot;d32019d3-bc6e-4319-9c1d-6722fc136a22&amp;quot;,&lt;br /&gt;
            &amp;quot;name&amp;quot;: &amp;quot;Message Cluster 2&amp;quot;,&lt;br /&gt;
            &amp;quot;status&amp;quot;: &amp;quot;BUILDING&amp;quot;,&lt;br /&gt;
            &amp;quot;flavor&amp;quot;: &amp;quot;small&amp;quot;,&lt;br /&gt;
            &amp;quot;size&amp;quot;: &amp;quot;5&amp;quot;,&lt;br /&gt;
            &amp;quot;created&amp;quot;: &amp;quot;2014-11-12T13:23:54Z&amp;quot;,&lt;br /&gt;
            &amp;quot;updated&amp;quot;: &amp;quot;2014-11-13T19:55:01Z&amp;quot;&lt;br /&gt;
        }&lt;br /&gt;
    ]&lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
==== Create Cluster ====&lt;br /&gt;
&lt;br /&gt;
'''''POST /v1/clusters'''''&lt;br /&gt;
&lt;br /&gt;
This operation asynchronously creates a new cluster of Nova instances provisioned with the required message brokers in a central project id. &lt;br /&gt;
&lt;br /&gt;
'''Request Parameters'''&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
! Parameter !! Type !! Description&lt;br /&gt;
|-&lt;br /&gt;
| network_id || UUID || Network Identification for a Neutron network where cluster will be created in.&lt;br /&gt;
|-&lt;br /&gt;
| name || string || Name of cluster.&lt;br /&gt;
|-&lt;br /&gt;
| flavor || string || Cluster node flavor, which specify VM type in terms of CPU/memory/disk resources (e.g. small, medium, large).&lt;br /&gt;
&lt;br /&gt;
small:  1 GHz dual-core CPU; 512 MB memory; 250 GB disk&lt;br /&gt;
&lt;br /&gt;
medium: 2.8 GHz dual-core CPU; 4 GB memory; 1 TB disk&lt;br /&gt;
&lt;br /&gt;
large: 3.6 GHz quad-core CPU; 32 GB memory; 5 TB disk&lt;br /&gt;
|-&lt;br /&gt;
| size || int || Number of nodes in cluster.&lt;br /&gt;
|-&lt;br /&gt;
| volume_size || int || Optional parameter to indicate size of volume for node instance.  If volumes are supported, then this parameter will be used.  If ephmeral disk are not supported, volume support will be required.&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
'''Response Codes'''&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
! Response !! Code(s)&lt;br /&gt;
|-&lt;br /&gt;
| Normal || 202 (accepted)&lt;br /&gt;
|-&lt;br /&gt;
| Error || badRequest (400), unauthorized (401), itemNotFound (404)&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
'''Response Parameters'''&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
! Parameter !! Type !! Description&lt;br /&gt;
|-&lt;br /&gt;
| cluster_id || UUID || ID of cluster to be created.&lt;br /&gt;
|-&lt;br /&gt;
| network_id || UUID || Network Identification for a Neutron network where cluster will be created in.&lt;br /&gt;
|-&lt;br /&gt;
| name || string || Name of cluster (same as provided name in request parameters).&lt;br /&gt;
|-&lt;br /&gt;
| status || string || Current status of cluster.&lt;br /&gt;
|-&lt;br /&gt;
| flavor || string || Cluster node flavor, which specify VM type in terms of CPU/memory/disk resources (e.g. small, medium, large).&lt;br /&gt;
|-&lt;br /&gt;
| size || int || Number of nodes in cluster.&lt;br /&gt;
|-&lt;br /&gt;
| volume_size || int || Optional parameter to indicate size of volume for node instance.  If volumes are supported, then this parameter will be used.  If ephmeral disk are not supported, volume support will be required.&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
'''JSON Request'''&lt;br /&gt;
&lt;br /&gt;
{&lt;br /&gt;
    &amp;quot;network_id&amp;quot;: &amp;quot;d32019d3-bc6e-4319-9c1d-6722fc136a22&amp;quot;,&lt;br /&gt;
    &amp;quot;name&amp;quot;: &amp;quot;MessageCluster1&amp;quot;,&lt;br /&gt;
    &amp;quot;flavor&amp;quot;: &amp;quot;large&amp;quot;,&lt;br /&gt;
    &amp;quot;size&amp;quot;: &amp;quot;3&amp;quot;,&lt;br /&gt;
    &amp;quot;volume_size&amp;quot;: &amp;quot;100&amp;quot;&lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
'''JSON Response'''&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
{&lt;br /&gt;
    &amp;quot;cluster&amp;quot;: {&lt;br /&gt;
        &amp;quot;cluster_id&amp;quot;: &amp;quot;dd745f4a-9333-417e-bb89-9c989c84c068&amp;quot;,&lt;br /&gt;
        &amp;quot;network_id&amp;quot;: &amp;quot;d32019d3-bc6e-4319-9c1d-6722fc136a22&amp;quot;,&lt;br /&gt;
        &amp;quot;name&amp;quot;: &amp;quot;Message Cluster 1&amp;quot;,&lt;br /&gt;
        &amp;quot;status&amp;quot;: &amp;quot;BUILDING&amp;quot;,&lt;br /&gt;
        &amp;quot;flavor&amp;quot;: &amp;quot;large&amp;quot;,&lt;br /&gt;
        &amp;quot;size&amp;quot;: &amp;quot;3&amp;quot;,&lt;br /&gt;
        &amp;quot;volume_size&amp;quot;: &amp;quot;100&amp;quot;,&lt;br /&gt;
        &amp;quot;created&amp;quot;: &amp;quot;2014-11-11T01:02:03Z&amp;quot;,&lt;br /&gt;
        &amp;quot;updated&amp;quot;: &amp;quot;2014-11-11T01:02:03Z&amp;quot;&lt;br /&gt;
    }&lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
==== Show Cluster ====&lt;br /&gt;
&lt;br /&gt;
'''''GET /v1/clusters/{cluster_id}'''''&lt;br /&gt;
&lt;br /&gt;
This operation synchronously returns the status and information on the specified cluster within the provided project id.&lt;br /&gt;
&lt;br /&gt;
'''Request Parameters'''&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
! Parameter !! Type !! Description&lt;br /&gt;
|-&lt;br /&gt;
| cluster_id (URI) || UUID || Cluster ID.  This value is returned when a new cluster is created.&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
'''Response Codes'''&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
! Response !! Code(s)&lt;br /&gt;
|-&lt;br /&gt;
| Normal || ok (200)&lt;br /&gt;
|-&lt;br /&gt;
| Error || unauthorized (401), itemNotFound (404)&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
'''Response Parameters'''&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
! Parameter !! Type !! Description&lt;br /&gt;
|-&lt;br /&gt;
| cluster_id || UUID || ID of requested cluster.&lt;br /&gt;
|-&lt;br /&gt;
| name || string || Name of cluster.&lt;br /&gt;
|-&lt;br /&gt;
| status || string || Current status of cluster.&lt;br /&gt;
&lt;br /&gt;
BUILDING: Cluster is in progress of being provisioned.&lt;br /&gt;
&lt;br /&gt;
ACTIVE:  Cluster is running.&lt;br /&gt;
&lt;br /&gt;
ERROR: Provisioning error(s) encountered.&lt;br /&gt;
&lt;br /&gt;
DELETED:  Cluster has been deleted.&lt;br /&gt;
|-&lt;br /&gt;
| created || string || Created time stamp in format: yyyy-mm-ddThh:mm:ssZ&lt;br /&gt;
|-&lt;br /&gt;
| updated || string || Last updated time stamp in format: yyyy-mm-ddThh:mm:ssZ&lt;br /&gt;
|-&lt;br /&gt;
| nodes(list) || node || List of nodes, which includes node id, instance state, and flavor.&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
'''JSON Request'''&lt;br /&gt;
&lt;br /&gt;
N/A&lt;br /&gt;
&lt;br /&gt;
'''JSON Response'''&lt;br /&gt;
&lt;br /&gt;
{&lt;br /&gt;
    &amp;quot;cluster&amp;quot;: {&lt;br /&gt;
        &amp;quot;cluster_id&amp;quot;: &amp;quot;dd745f4a-9333-417e-bb89-9c989c84c068&amp;quot;,&lt;br /&gt;
        &amp;quot;network_id&amp;quot;: &amp;quot;d32019d3-bc6e-4319-9c1d-6722fc136a22&amp;quot;,&lt;br /&gt;
        &amp;quot;name&amp;quot;: &amp;quot;Message Cluster 1&amp;quot;,&lt;br /&gt;
        &amp;quot;status&amp;quot;: &amp;quot;ACTIVE&amp;quot;,&lt;br /&gt;
        &amp;quot;flavor&amp;quot;: &amp;quot;large&amp;quot;,&lt;br /&gt;
        &amp;quot;size&amp;quot;: &amp;quot;3&amp;quot;,&lt;br /&gt;
        &amp;quot;volume_size&amp;quot;: &amp;quot;100&amp;quot;,&lt;br /&gt;
        &amp;quot;created&amp;quot;: &amp;quot;2014-11-11T01:02:03Z&amp;quot;,&lt;br /&gt;
        &amp;quot;updated&amp;quot;: &amp;quot;2014-11-11T01:02:03Z&amp;quot;,&lt;br /&gt;
        &amp;quot;endpoints&amp;quot;: [&lt;br /&gt;
            {&lt;br /&gt;
                &amp;quot;type&amp;quot;: &amp;quot;AMQP&amp;quot;,&lt;br /&gt;
                &amp;quot;value&amp;quot;: &amp;quot;amqp://10.20.30.40:10000&amp;quot;&lt;br /&gt;
            },&lt;br /&gt;
            {&lt;br /&gt;
                &amp;quot;type&amp;quot;: &amp;quot;console&amp;quot;,&lt;br /&gt;
                &amp;quot;value&amp;quot;: &amp;quot;http://10.20.30.40:5672&amp;quot;&lt;br /&gt;
            },&lt;br /&gt;
            {&lt;br /&gt;
                &amp;quot;type&amp;quot;: &amp;quot;AMQP&amp;quot;,&lt;br /&gt;
                &amp;quot;value&amp;quot;: &amp;quot;amqp://10.20.30.41:10000&amp;quot;&lt;br /&gt;
            },&lt;br /&gt;
            {&lt;br /&gt;
                &amp;quot;type&amp;quot;: &amp;quot;console&amp;quot;,&lt;br /&gt;
                &amp;quot;value&amp;quot;: &amp;quot;http://10.20.30.41:5672&amp;quot;&lt;br /&gt;
            },&lt;br /&gt;
            {&lt;br /&gt;
                &amp;quot;type&amp;quot;: &amp;quot;AMQP&amp;quot;,&lt;br /&gt;
                &amp;quot;value&amp;quot;: &amp;quot;amqp://10.20.30.42:10000&amp;quot;&lt;br /&gt;
            },&lt;br /&gt;
            {&lt;br /&gt;
                &amp;quot;type&amp;quot;: &amp;quot;console&amp;quot;,&lt;br /&gt;
                &amp;quot;value&amp;quot;: &amp;quot;http://10.20.30.42:5672&amp;quot;&lt;br /&gt;
            }&lt;br /&gt;
        ]&lt;br /&gt;
    }&lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
==== Delete Cluster ====&lt;br /&gt;
&lt;br /&gt;
'''''DELETE /v1/clusters/{cluster_id}'''''''&lt;br /&gt;
&lt;br /&gt;
This operation will asynchronously delete the indicated cluster within the provided project id.&lt;br /&gt;
&lt;br /&gt;
'''Request Parameters'''&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
! Parameter !! Type !! Description&lt;br /&gt;
|-&lt;br /&gt;
| cluster_id (URI) || UUID || Cluster ID.  This value is returned when a new cluster is created.&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
'''Response Codes'''&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
! Response !! Code(s)&lt;br /&gt;
|-&lt;br /&gt;
| Normal || accepted (202)&lt;br /&gt;
|-&lt;br /&gt;
| Error || unauthorized (401), itemNotFound (404)&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
'''Response Parameters'''&lt;br /&gt;
&lt;br /&gt;
N/A&lt;br /&gt;
&lt;br /&gt;
'''JSON Request'''&lt;br /&gt;
&lt;br /&gt;
N/A&lt;br /&gt;
&lt;br /&gt;
'''JSON Response'''&lt;br /&gt;
&lt;br /&gt;
N/A&lt;br /&gt;
&lt;br /&gt;
==== Update Cluster ====&lt;br /&gt;
&lt;br /&gt;
'''''PATCH /v1/clusters/{cluster_id}'''''&lt;br /&gt;
&lt;br /&gt;
This operation will asynchronously updated the indicated cluster (cluster_id) based on the request body received.  The request body structure is the same as create cluster api.  Cue will automatically detect differences and perform appropriate actions in order to update cluster accordingly.&lt;br /&gt;
&lt;br /&gt;
'''Request Parameters'''&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
! Parameter !! Type !! Description&lt;br /&gt;
|-&lt;br /&gt;
| network_id || UUID || Network Identification for a Neutron network where cluster will be created in.&lt;br /&gt;
|-&lt;br /&gt;
| name || string || Name of cluster.&lt;br /&gt;
|-&lt;br /&gt;
| flavor || string || Cluster node flavor, which specify VM type in terms of CPU/memory/disk resources (e.g. small, medium, large).&lt;br /&gt;
&lt;br /&gt;
small:  1 GHz dual-core CPU; 512 MB memory; 250 GB disk&lt;br /&gt;
&lt;br /&gt;
medium: 2.8 GHz dual-core CPU; 4 GB memory; 1 TB disk&lt;br /&gt;
&lt;br /&gt;
large: 3.6 GHz quad-core CPU; 32 GB memory; 5 TB disk&lt;br /&gt;
|-&lt;br /&gt;
| size || int || Number of nodes in cluster.&lt;br /&gt;
|-&lt;br /&gt;
| volume_size || int || Optional parameter to indicate size of volume for node instance.  If volumes are supported, then this parameter will be used.  If ephmeral disk are not supported, volume support will be required.&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
'''Response Codes'''&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
! Response !! Code(s)&lt;br /&gt;
|-&lt;br /&gt;
| Normal || 202 (accepted)&lt;br /&gt;
|-&lt;br /&gt;
| Error || badRequest (400), unauthorized (401), itemNotFound (404)&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
'''Response Parameters'''&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
! Parameter !! Type !! Description&lt;br /&gt;
|-&lt;br /&gt;
| cluster_id || UUID || ID of cluster to be created.&lt;br /&gt;
|-&lt;br /&gt;
| network_id || UUID || Network Identification for a Neutron network where cluster will be created in.&lt;br /&gt;
|-&lt;br /&gt;
| name || string || Name of cluster (same as provided name in request parameters).&lt;br /&gt;
|-&lt;br /&gt;
| status || string || Current status of cluster.&lt;br /&gt;
|-&lt;br /&gt;
| flavor || string || Cluster node flavor, which specify VM type in terms of CPU/memory/disk resources (e.g. small, medium, large).&lt;br /&gt;
|-&lt;br /&gt;
| size || int || Number of nodes in cluster.&lt;br /&gt;
|-&lt;br /&gt;
| volume_size || int || Optional parameter to indicate size of volume for node instance.  If volumes are supported, then this parameter will be used.  If ephmeral disk are not supported, volume support will be required.&lt;br /&gt;
&lt;br /&gt;
BUILDING: Cluster is in progress of being provisioned.&lt;br /&gt;
&lt;br /&gt;
ACTIVE:  Cluster is running.&lt;br /&gt;
&lt;br /&gt;
ERROR: Provisioning error(s) encountered.&lt;br /&gt;
&lt;br /&gt;
DELETED:  Cluster has been deleted.&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
'''JSON Request'''&lt;br /&gt;
&lt;br /&gt;
{&lt;br /&gt;
    &amp;quot;network_id&amp;quot;: &amp;quot;d32019d3-bc6e-4319-9c1d-6722fc136a22&amp;quot;,&lt;br /&gt;
    &amp;quot;name&amp;quot;: &amp;quot;MessageCluster1&amp;quot;,&lt;br /&gt;
    &amp;quot;flavor&amp;quot;: &amp;quot;large&amp;quot;,&lt;br /&gt;
    &amp;quot;size&amp;quot;: &amp;quot;3&amp;quot;,&lt;br /&gt;
    &amp;quot;volume_size&amp;quot;: &amp;quot;100&amp;quot;&lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
'''JSON Response'''&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
{&lt;br /&gt;
    &amp;quot;cluster&amp;quot;: {&lt;br /&gt;
        &amp;quot;cluster_id&amp;quot;: &amp;quot;dd745f4a-9333-417e-bb89-9c989c84c068&amp;quot;,&lt;br /&gt;
        &amp;quot;network_id&amp;quot;: &amp;quot;d32019d3-bc6e-4319-9c1d-6722fc136a22&amp;quot;,&lt;br /&gt;
        &amp;quot;name&amp;quot;: &amp;quot;Message Cluster 1&amp;quot;,&lt;br /&gt;
        &amp;quot;status&amp;quot;: &amp;quot;BUILDING&amp;quot;,&lt;br /&gt;
        &amp;quot;flavor&amp;quot;: &amp;quot;large&amp;quot;,&lt;br /&gt;
        &amp;quot;size&amp;quot;: &amp;quot;3&amp;quot;,&lt;br /&gt;
        &amp;quot;volume_size&amp;quot;: &amp;quot;100&amp;quot;,&lt;br /&gt;
        &amp;quot;created&amp;quot;: &amp;quot;2014-11-11T01:02:03Z&amp;quot;,&lt;br /&gt;
        &amp;quot;updated&amp;quot;: &amp;quot;2014-11-11T01:02:03Z&amp;quot;&lt;br /&gt;
    }&lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
===Testing===&lt;br /&gt;
&lt;br /&gt;
Cue API testing will verify the expected functionality of the Cue user interface with both positive/negative tests.  The overall scope will cover testing from the HTTP REST request to required database interactions and work-flow task submission for RPC workers.&lt;br /&gt;
&lt;br /&gt;
====Unit Tests====&lt;br /&gt;
&lt;br /&gt;
Unit tests will verify the resulting function calls for each REST-ful URI and action(s).  The Python Mock library will be used to replace external system dependencies with placeholder objects.&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
! Function !! Tests !! Input Data !! Expected Result(s)&lt;br /&gt;
|-&lt;br /&gt;
| List Clusters || &lt;br /&gt;
# Create 'n' cluster(s), then call list clusters and verify expected return object&lt;br /&gt;
# Call list clusters when no clusters exist within a project id and verify expected return object&lt;br /&gt;
|| &lt;br /&gt;
* n = # of clusters to create&lt;br /&gt;
||&lt;br /&gt;
# List of 'n' clusters is returned with appropriate fields, HTTP Ok (200)&lt;br /&gt;
# Empty list of clusters is returned, HTTP Ok (200)&lt;br /&gt;
|-&lt;br /&gt;
| Create Cluster || &lt;br /&gt;
# Create standard cluster 'c' and verify expected return object&lt;br /&gt;
# Create cluster with invalid flavor and verify expected return value&lt;br /&gt;
# Create cluster with invalid volume size and verify expected return value&lt;br /&gt;
||&lt;br /&gt;
* n = cluster size (number of nodes)&lt;br /&gt;
* m = cluster name&lt;br /&gt;
* f = flavor&lt;br /&gt;
* s = volume size&lt;br /&gt;
* nic = Network UUID&lt;br /&gt;
||&lt;br /&gt;
# Cluster ID, name and status for newly created cluster is returned, HTTP Accepted (202)&lt;br /&gt;
# HTTP Bad request is returned (400)&lt;br /&gt;
# HTTP Bad request is returned (400)&lt;br /&gt;
|-&lt;br /&gt;
| Show Cluster ||&lt;br /&gt;
# Create cluster, then call get cluster and verify expected return object&lt;br /&gt;
# Get cluster with invalid cluster_id&lt;br /&gt;
||&lt;br /&gt;
* cluster_id = cluster ID&lt;br /&gt;
||&lt;br /&gt;
# Cluster ID, name, status, created/updated date stamp and list of nodes is returned, HTTP Ok (200).&lt;br /&gt;
# HTTP Bad request is returned (400)&lt;br /&gt;
|-&lt;br /&gt;
| Delete Cluster || &lt;br /&gt;
# Create a cluster, then call delete cluster and verify expected return value&lt;br /&gt;
# Delete cluster with invalid cluster_id&lt;br /&gt;
||&lt;br /&gt;
* cluster_id = cluster ID&lt;br /&gt;
||&lt;br /&gt;
# HTTP accepted is returned (202)&lt;br /&gt;
# HTTP Bad request is returned (400)&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
====Functional Tests====&lt;br /&gt;
&lt;br /&gt;
The functional tests will verify the HTTP REST URI request lifecycle from controller routing to HTTP response.  These tests will make use of Pecan's testing utility; pecan.testing module.&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
! Operation !! URI !! Tests !! Input Data !! Expected Data (JSON)&lt;br /&gt;
|-&lt;br /&gt;
| GET || /v1/clusters || &lt;br /&gt;
# Call when clusters exist&lt;br /&gt;
# Call when no clusters exist&lt;br /&gt;
|| &lt;br /&gt;
* n/a&lt;br /&gt;
||&lt;br /&gt;
# List of 'n' clusters is returned with appropriate fields, HTTP Ok (200)&lt;br /&gt;
# Empty list of clusters is returned, HTTP Ok (200)&lt;br /&gt;
|-&lt;br /&gt;
| POST || /v1/clusters ||&lt;br /&gt;
# Create standard cluster 'c' and verify expected return object&lt;br /&gt;
# Create cluster with invalid flavor and verify expected return value&lt;br /&gt;
# Create cluster with invalid volume size and verify expected return value&lt;br /&gt;
|| &lt;br /&gt;
* n = cluster size (number of nodes)&lt;br /&gt;
* m = cluster name&lt;br /&gt;
* f = flavor&lt;br /&gt;
* s = volume size&lt;br /&gt;
* nic = Network UUID&lt;br /&gt;
||&lt;br /&gt;
# Cluster ID, name and status for newly created cluster is returned, HTTP Accepted (202)&lt;br /&gt;
# HTTP Bad request is returned (400)&lt;br /&gt;
# HTTP Bad request is returned (400)&lt;br /&gt;
||&lt;br /&gt;
|-&lt;br /&gt;
| GET || /v1/clusters/{cluster_id} || &lt;br /&gt;
# Create cluster, then call get cluster and verify expected return object&lt;br /&gt;
# Get cluster with invalid cluster_id&lt;br /&gt;
|| &lt;br /&gt;
* cluster_id = cluster &lt;br /&gt;
||&lt;br /&gt;
# Cluster ID, name, status, created/updated date stamp and list of nodes is returned, HTTP Ok (200).&lt;br /&gt;
# HTTP Bad request is returned (400)&lt;br /&gt;
||&lt;br /&gt;
|-&lt;br /&gt;
| DELETE || /v1/clusters/{cluster_id} ||&lt;br /&gt;
# Create a cluster, then call delete cluster and verify expected return value&lt;br /&gt;
# Delete cluster with invalid cluster_id&lt;br /&gt;
||&lt;br /&gt;
* cluster_id = cluster ID&lt;br /&gt;
||&lt;br /&gt;
# HTTP accepted is returned (202)&lt;br /&gt;
# HTTP Bad request is returned (400)&lt;br /&gt;
||&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
====Integration Tests====&lt;br /&gt;
&lt;br /&gt;
The integration tests will cover API functionality from HTTP request to database access and task submission for RPC workers.  The Pecan test utility will be used to route test request URI to appropriate controllers, then database record(s) will be verified for applicable change.  Finally the creation of task objections will be verified to ensure valid task flows.&lt;/div&gt;</summary>
		<author><name>Dagnello</name></author>	</entry>

	<entry>
		<id>https://wiki.openstack.org/w/index.php?title=Cue/api_2&amp;diff=70283</id>
		<title>Cue/api 2</title>
		<link rel="alternate" type="text/html" href="https://wiki.openstack.org/w/index.php?title=Cue/api_2&amp;diff=70283"/>
				<updated>2014-12-12T23:21:54Z</updated>
		
		<summary type="html">&lt;p&gt;Dagnello: /* Create Cluster */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;== Cue API Design ==&lt;br /&gt;
=== Acronyms ===&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
! '''Acronym''' !! '''Definition'''&lt;br /&gt;
|-&lt;br /&gt;
| SSL || Secure Sockets Layer&lt;br /&gt;
|-&lt;br /&gt;
| REST || Representational State Transfer&lt;br /&gt;
|-&lt;br /&gt;
| URI || Uniform Resource Identifier&lt;br /&gt;
|-&lt;br /&gt;
| UUID || Universally Unique Identifier&lt;br /&gt;
|-&lt;br /&gt;
| AMQP || Advanced Messaging Queuing Protocol&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
=== Requirements ===&lt;br /&gt;
&lt;br /&gt;
API Requirements for Cue - Kilo timeframe.&lt;br /&gt;
&lt;br /&gt;
* Keystone integration&lt;br /&gt;
* CRUD on Cluster&lt;br /&gt;
* Cluster Management – Scale up/down&lt;br /&gt;
* Devstack integration&lt;br /&gt;
* Gate Tests&lt;br /&gt;
&lt;br /&gt;
=== System Context Diagram ===&lt;br /&gt;
&lt;br /&gt;
[[File:SCD.jpg]]&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
! '''Component''' !! '''Description'''&lt;br /&gt;
|-&lt;br /&gt;
| User || Direct customer of Cue.&lt;br /&gt;
|-&lt;br /&gt;
| Horizon || Cue functionality will be added to Horizon, which will provide a web-based portal for Cue control.&lt;br /&gt;
|-&lt;br /&gt;
| CLI || Command Line Interface to Cue, provides user access to provisioning and deploying messaging clusters.&lt;br /&gt;
|-&lt;br /&gt;
| REST_API || Provides user access to provisioning and deploying messaging clusters through REST interface.  This is a light-weight interface, provisioning and configuration of clusters/nodes is delegated to the TaskWorker process.&lt;br /&gt;
|-&lt;br /&gt;
| TaskScheduler || Used to synchronize work tasks between the REST_API and TaskWorker processes.&lt;br /&gt;
|-&lt;br /&gt;
| TaskWorker || Carries out work associated with all provisioning, configuration and management of RabbitMQ clusters and nodes.  Makes use of heat for initial provisioning/deployment.&lt;br /&gt;
|-&lt;br /&gt;
| DB || Database to store information on clusters and nodes.  Example, in cluster creation, when request is initially received through REST_API, this DB is updated accordingly and the work is delegated to TaskWorker.  TaskWorker then updates this DB as provisioning and configuration takes place.  Subsequent calls to check on status of cluster creation, will return updated information from this DB.&lt;br /&gt;
|-&lt;br /&gt;
| Heat || Used cloud instance orchestration in deploying RabbitMQ cluster images.&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
=== REST API ===&lt;br /&gt;
&lt;br /&gt;
General requirement, REST API must respond within 500ms.&lt;br /&gt;
==== List Clusters ====&lt;br /&gt;
&lt;br /&gt;
'''''GET /v1/clusters'''''&lt;br /&gt;
&lt;br /&gt;
This operation synchronously returns all clusters provisioned within the associated project id.&lt;br /&gt;
&lt;br /&gt;
'''Request Parameters'''&lt;br /&gt;
N/A&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
! Response !! Code(s)&lt;br /&gt;
|-&lt;br /&gt;
| Normal || ok (200)&lt;br /&gt;
|-&lt;br /&gt;
| Error || unauthorized (401)&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
'''Response Parameters'''&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
! Parameter !! Type !! Description&lt;br /&gt;
|-&lt;br /&gt;
| cluster(list) || string || List of clusters, detailing respective cluster id, name, status, created time stamp and updated time stamp.&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
	&lt;br /&gt;
&lt;br /&gt;
'''JSON Request'''&lt;br /&gt;
&lt;br /&gt;
N/A&lt;br /&gt;
&lt;br /&gt;
'''JSON Response'''&lt;br /&gt;
&lt;br /&gt;
{&lt;br /&gt;
    &amp;quot;clusters&amp;quot;: &amp;lt;nowiki&amp;gt;[&amp;lt;/nowiki&amp;gt;&lt;br /&gt;
        {&lt;br /&gt;
            &amp;quot;cluster_id&amp;quot;: &amp;quot;b51948c9-1ac5-4c28-a580-6f7c500d82f8&amp;quot;,&lt;br /&gt;
            &amp;quot;network_id&amp;quot;: &amp;quot;d32019d3-bc6e-4319-9c1d-6722fc136a22&amp;quot;,&lt;br /&gt;
            &amp;quot;name&amp;quot;: &amp;quot;Message Cluster 1&amp;quot;,&lt;br /&gt;
            &amp;quot;status&amp;quot;: &amp;quot;ACTIVE&amp;quot;,&lt;br /&gt;
            &amp;quot;flavor&amp;quot;: &amp;quot;medium&amp;quot;,&lt;br /&gt;
            &amp;quot;size&amp;quot;: &amp;quot;3&amp;quot;,&lt;br /&gt;
            &amp;quot;created&amp;quot;: &amp;quot;2014-11-11T01:02:03Z&amp;quot;,&lt;br /&gt;
            &amp;quot;updated&amp;quot;: &amp;quot;2014-11-11T01:02:03Z&amp;quot;&lt;br /&gt;
        },&lt;br /&gt;
        {&lt;br /&gt;
            &amp;quot;cluster_id&amp;quot;: &amp;quot;13c456c9-bbfc-4c31-b26d-3ae5c3cd7a77&amp;quot;,&lt;br /&gt;
            &amp;quot;network_id&amp;quot;: &amp;quot;d32019d3-bc6e-4319-9c1d-6722fc136a22&amp;quot;,&lt;br /&gt;
            &amp;quot;name&amp;quot;: &amp;quot;Message Cluster 2&amp;quot;,&lt;br /&gt;
            &amp;quot;status&amp;quot;: &amp;quot;BUILDING&amp;quot;,&lt;br /&gt;
            &amp;quot;flavor&amp;quot;: &amp;quot;small&amp;quot;,&lt;br /&gt;
            &amp;quot;size&amp;quot;: &amp;quot;5&amp;quot;,&lt;br /&gt;
            &amp;quot;created&amp;quot;: &amp;quot;2014-11-12T13:23:54Z&amp;quot;,&lt;br /&gt;
            &amp;quot;updated&amp;quot;: &amp;quot;2014-11-13T19:55:01Z&amp;quot;&lt;br /&gt;
        }&lt;br /&gt;
    ]&lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
==== Create Cluster ====&lt;br /&gt;
&lt;br /&gt;
'''''POST /v1/clusters'''''&lt;br /&gt;
&lt;br /&gt;
This operation asynchronously creates a new cluster of Nova instances provisioned with the required message brokers in a central project id. &lt;br /&gt;
&lt;br /&gt;
'''Request Parameters'''&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
! Parameter !! Type !! Description&lt;br /&gt;
|-&lt;br /&gt;
| network_id || UUID || Network Identification for a Neutron network where cluster will be created in.&lt;br /&gt;
|-&lt;br /&gt;
| name || string || Name of cluster.&lt;br /&gt;
|-&lt;br /&gt;
| flavor || string || Cluster node flavor, which specify VM type in terms of CPU/memory/disk resources (e.g. small, medium, large).&lt;br /&gt;
&lt;br /&gt;
small:  1 GHz dual-core CPU; 512 MB memory; 250 GB disk&lt;br /&gt;
&lt;br /&gt;
medium: 2.8 GHz dual-core CPU; 4 GB memory; 1 TB disk&lt;br /&gt;
&lt;br /&gt;
large: 3.6 GHz quad-core CPU; 32 GB memory; 5 TB disk&lt;br /&gt;
|-&lt;br /&gt;
| size || int || Number of nodes in cluster.&lt;br /&gt;
|-&lt;br /&gt;
| volume_size || int || Optional parameter to indicate size of volume for node instance.  If volumes are supported, then this parameter will be used.  If ephmeral disk are not supported, volume support will be required.&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
'''Response Codes'''&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
! Response !! Code(s)&lt;br /&gt;
|-&lt;br /&gt;
| Normal || 202 (accepted)&lt;br /&gt;
|-&lt;br /&gt;
| Error || badRequest (400), unauthorized (401), itemNotFound (404)&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
'''Response Parameters'''&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
! Parameter !! Type !! Description&lt;br /&gt;
|-&lt;br /&gt;
| cluster_id || UUID || ID of cluster to be created.&lt;br /&gt;
|-&lt;br /&gt;
| network_id || UUID || Network Identification for a Neutron network where cluster will be created in.&lt;br /&gt;
|-&lt;br /&gt;
| name || string || Name of cluster (same as provided name in request parameters).&lt;br /&gt;
|-&lt;br /&gt;
| status || string || Current status of cluster.&lt;br /&gt;
|-&lt;br /&gt;
| flavor || string || Cluster node flavor, which specify VM type in terms of CPU/memory/disk resources (e.g. small, medium, large).&lt;br /&gt;
|-&lt;br /&gt;
| size || int || Number of nodes in cluster.&lt;br /&gt;
|-&lt;br /&gt;
| volume_size || int || Optional parameter to indicate size of volume for node instance.  If volumes are supported, then this parameter will be used.  If ephmeral disk are not supported, volume support will be required.&lt;br /&gt;
&lt;br /&gt;
'''JSON Request'''&lt;br /&gt;
&lt;br /&gt;
{&lt;br /&gt;
    &amp;quot;network_id&amp;quot;: &amp;quot;d32019d3-bc6e-4319-9c1d-6722fc136a22&amp;quot;,&lt;br /&gt;
    &amp;quot;name&amp;quot;: &amp;quot;MessageCluster1&amp;quot;,&lt;br /&gt;
    &amp;quot;flavor&amp;quot;: &amp;quot;large&amp;quot;,&lt;br /&gt;
    &amp;quot;size&amp;quot;: &amp;quot;3&amp;quot;,&lt;br /&gt;
    &amp;quot;volume_size&amp;quot;: &amp;quot;100&amp;quot;&lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
'''JSON Response'''&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
{&lt;br /&gt;
    &amp;quot;cluster&amp;quot;: {&lt;br /&gt;
        &amp;quot;cluster_id&amp;quot;: &amp;quot;dd745f4a-9333-417e-bb89-9c989c84c068&amp;quot;,&lt;br /&gt;
        &amp;quot;network_id&amp;quot;: &amp;quot;d32019d3-bc6e-4319-9c1d-6722fc136a22&amp;quot;,&lt;br /&gt;
        &amp;quot;name&amp;quot;: &amp;quot;Message Cluster 1&amp;quot;,&lt;br /&gt;
        &amp;quot;status&amp;quot;: &amp;quot;BUILDING&amp;quot;,&lt;br /&gt;
        &amp;quot;flavor&amp;quot;: &amp;quot;large&amp;quot;,&lt;br /&gt;
        &amp;quot;size&amp;quot;: &amp;quot;3&amp;quot;,&lt;br /&gt;
        &amp;quot;volume_size&amp;quot;: &amp;quot;100&amp;quot;,&lt;br /&gt;
        &amp;quot;created&amp;quot;: &amp;quot;2014-11-11T01:02:03Z&amp;quot;,&lt;br /&gt;
        &amp;quot;updated&amp;quot;: &amp;quot;2014-11-11T01:02:03Z&amp;quot;&lt;br /&gt;
    }&lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
==== Show Cluster ====&lt;br /&gt;
&lt;br /&gt;
'''''GET /v1/clusters/{cluster_id}'''''&lt;br /&gt;
&lt;br /&gt;
This operation synchronously returns the status and information on the specified cluster within the provided project id.&lt;br /&gt;
&lt;br /&gt;
'''Request Parameters'''&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
! Parameter !! Type !! Description&lt;br /&gt;
|-&lt;br /&gt;
| cluster_id (URI) || UUID || Cluster ID.  This value is returned when a new cluster is created.&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
'''Response Codes'''&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
! Response !! Code(s)&lt;br /&gt;
|-&lt;br /&gt;
| Normal || ok (200)&lt;br /&gt;
|-&lt;br /&gt;
| Error || unauthorized (401), itemNotFound (404)&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
'''Response Parameters'''&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
! Parameter !! Type !! Description&lt;br /&gt;
|-&lt;br /&gt;
| cluster_id || UUID || ID of requested cluster.&lt;br /&gt;
|-&lt;br /&gt;
| name || string || Name of cluster.&lt;br /&gt;
|-&lt;br /&gt;
| status || string || Current status of cluster.&lt;br /&gt;
&lt;br /&gt;
BUILDING: Cluster is in progress of being provisioned.&lt;br /&gt;
&lt;br /&gt;
ACTIVE:  Cluster is running.&lt;br /&gt;
&lt;br /&gt;
ERROR: Provisioning error(s) encountered.&lt;br /&gt;
&lt;br /&gt;
DELETED:  Cluster has been deleted.&lt;br /&gt;
|-&lt;br /&gt;
| created || string || Created time stamp in format: yyyy-mm-ddThh:mm:ssZ&lt;br /&gt;
|-&lt;br /&gt;
| updated || string || Last updated time stamp in format: yyyy-mm-ddThh:mm:ssZ&lt;br /&gt;
|-&lt;br /&gt;
| nodes(list) || node || List of nodes, which includes node id, instance state, and flavor.&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
'''JSON Request'''&lt;br /&gt;
&lt;br /&gt;
N/A&lt;br /&gt;
&lt;br /&gt;
'''JSON Response'''&lt;br /&gt;
&lt;br /&gt;
{&lt;br /&gt;
    &amp;quot;cluster&amp;quot;: {&lt;br /&gt;
        &amp;quot;cluster_id&amp;quot;: &amp;quot;dd745f4a-9333-417e-bb89-9c989c84c068&amp;quot;,&lt;br /&gt;
        &amp;quot;network_id&amp;quot;: &amp;quot;d32019d3-bc6e-4319-9c1d-6722fc136a22&amp;quot;,&lt;br /&gt;
        &amp;quot;name&amp;quot;: &amp;quot;Message Cluster 1&amp;quot;,&lt;br /&gt;
        &amp;quot;status&amp;quot;: &amp;quot;ACTIVE&amp;quot;,&lt;br /&gt;
        &amp;quot;flavor&amp;quot;: &amp;quot;large&amp;quot;,&lt;br /&gt;
        &amp;quot;size&amp;quot;: &amp;quot;3&amp;quot;,&lt;br /&gt;
        &amp;quot;volume_size&amp;quot;: &amp;quot;100&amp;quot;,&lt;br /&gt;
        &amp;quot;created&amp;quot;: &amp;quot;2014-11-11T01:02:03Z&amp;quot;,&lt;br /&gt;
        &amp;quot;updated&amp;quot;: &amp;quot;2014-11-11T01:02:03Z&amp;quot;,&lt;br /&gt;
        &amp;quot;endpoints&amp;quot;: [&lt;br /&gt;
            {&lt;br /&gt;
                &amp;quot;type&amp;quot;: &amp;quot;AMQP&amp;quot;,&lt;br /&gt;
                &amp;quot;value&amp;quot;: &amp;quot;amqp://10.20.30.40:10000&amp;quot;&lt;br /&gt;
            },&lt;br /&gt;
            {&lt;br /&gt;
                &amp;quot;type&amp;quot;: &amp;quot;console&amp;quot;,&lt;br /&gt;
                &amp;quot;value&amp;quot;: &amp;quot;http://10.20.30.40:5672&amp;quot;&lt;br /&gt;
            },&lt;br /&gt;
            {&lt;br /&gt;
                &amp;quot;type&amp;quot;: &amp;quot;AMQP&amp;quot;,&lt;br /&gt;
                &amp;quot;value&amp;quot;: &amp;quot;amqp://10.20.30.41:10000&amp;quot;&lt;br /&gt;
            },&lt;br /&gt;
            {&lt;br /&gt;
                &amp;quot;type&amp;quot;: &amp;quot;console&amp;quot;,&lt;br /&gt;
                &amp;quot;value&amp;quot;: &amp;quot;http://10.20.30.41:5672&amp;quot;&lt;br /&gt;
            },&lt;br /&gt;
            {&lt;br /&gt;
                &amp;quot;type&amp;quot;: &amp;quot;AMQP&amp;quot;,&lt;br /&gt;
                &amp;quot;value&amp;quot;: &amp;quot;amqp://10.20.30.42:10000&amp;quot;&lt;br /&gt;
            },&lt;br /&gt;
            {&lt;br /&gt;
                &amp;quot;type&amp;quot;: &amp;quot;console&amp;quot;,&lt;br /&gt;
                &amp;quot;value&amp;quot;: &amp;quot;http://10.20.30.42:5672&amp;quot;&lt;br /&gt;
            }&lt;br /&gt;
        ]&lt;br /&gt;
    }&lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
==== Delete Cluster ====&lt;br /&gt;
&lt;br /&gt;
'''''DELETE /v1/clusters/{cluster_id}'''''''&lt;br /&gt;
&lt;br /&gt;
This operation will asynchronously delete the indicated cluster within the provided project id.&lt;br /&gt;
&lt;br /&gt;
'''Request Parameters'''&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
! Parameter !! Type !! Description&lt;br /&gt;
|-&lt;br /&gt;
| cluster_id (URI) || UUID || Cluster ID.  This value is returned when a new cluster is created.&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
'''Response Codes'''&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
! Response !! Code(s)&lt;br /&gt;
|-&lt;br /&gt;
| Normal || accepted (202)&lt;br /&gt;
|-&lt;br /&gt;
| Error || unauthorized (401), itemNotFound (404)&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
'''Response Parameters'''&lt;br /&gt;
&lt;br /&gt;
N/A&lt;br /&gt;
&lt;br /&gt;
'''JSON Request'''&lt;br /&gt;
&lt;br /&gt;
N/A&lt;br /&gt;
&lt;br /&gt;
'''JSON Response'''&lt;br /&gt;
&lt;br /&gt;
N/A&lt;br /&gt;
&lt;br /&gt;
==== Update Cluster ====&lt;br /&gt;
&lt;br /&gt;
'''''PATCH /v1/clusters/{cluster_id}'''''&lt;br /&gt;
&lt;br /&gt;
This operation will asynchronously updated the indicated cluster (cluster_id) based on the request body received.  The request body structure is the same as create cluster api.  Cue will automatically detect differences and perform appropriate actions in order to update cluster accordingly.&lt;br /&gt;
&lt;br /&gt;
'''Request Parameters'''&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
! Parameter !! Type !! Description&lt;br /&gt;
|-&lt;br /&gt;
| network_id || UUID || Network Identification for a Neutron network where cluster will be created in.&lt;br /&gt;
|-&lt;br /&gt;
| name || string || Name of cluster.&lt;br /&gt;
|-&lt;br /&gt;
| flavor || string || Cluster node flavor, which specify VM type in terms of CPU/memory/disk resources (e.g. small, medium, large).&lt;br /&gt;
&lt;br /&gt;
small:  1 GHz dual-core CPU; 512 MB memory; 250 GB disk&lt;br /&gt;
&lt;br /&gt;
medium: 2.8 GHz dual-core CPU; 4 GB memory; 1 TB disk&lt;br /&gt;
&lt;br /&gt;
large: 3.6 GHz quad-core CPU; 32 GB memory; 5 TB disk&lt;br /&gt;
|-&lt;br /&gt;
| size || int || Number of nodes in cluster.&lt;br /&gt;
|-&lt;br /&gt;
| volume_size || int || Optional parameter to indicate size of volume for node instance.  If volumes are supported, then this parameter will be used.  If ephmeral disk are not supported, volume support will be required.&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
'''Response Codes'''&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
! Response !! Code(s)&lt;br /&gt;
|-&lt;br /&gt;
| Normal || 202 (accepted)&lt;br /&gt;
|-&lt;br /&gt;
| Error || badRequest (400), unauthorized (401), itemNotFound (404)&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
'''Response Parameters'''&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
! Parameter !! Type !! Description&lt;br /&gt;
|-&lt;br /&gt;
| cluster_id || UUID || ID of cluster to be created.&lt;br /&gt;
|-&lt;br /&gt;
| network_id || UUID || Network Identification for a Neutron network where cluster will be created in.&lt;br /&gt;
|-&lt;br /&gt;
| name || string || Name of cluster (same as provided name in request parameters).&lt;br /&gt;
|-&lt;br /&gt;
| status || string || Current status of cluster.&lt;br /&gt;
|-&lt;br /&gt;
| flavor || string || Cluster node flavor, which specify VM type in terms of CPU/memory/disk resources (e.g. small, medium, large).&lt;br /&gt;
|-&lt;br /&gt;
| size || int || Number of nodes in cluster.&lt;br /&gt;
|-&lt;br /&gt;
| volume_size || int || Optional parameter to indicate size of volume for node instance.  If volumes are supported, then this parameter will be used.  If ephmeral disk are not supported, volume support will be required.&lt;br /&gt;
&lt;br /&gt;
BUILDING: Cluster is in progress of being provisioned.&lt;br /&gt;
&lt;br /&gt;
ACTIVE:  Cluster is running.&lt;br /&gt;
&lt;br /&gt;
ERROR: Provisioning error(s) encountered.&lt;br /&gt;
&lt;br /&gt;
DELETED:  Cluster has been deleted.&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
'''JSON Request'''&lt;br /&gt;
&lt;br /&gt;
{&lt;br /&gt;
    &amp;quot;network_id&amp;quot;: &amp;quot;d32019d3-bc6e-4319-9c1d-6722fc136a22&amp;quot;,&lt;br /&gt;
    &amp;quot;name&amp;quot;: &amp;quot;MessageCluster1&amp;quot;,&lt;br /&gt;
    &amp;quot;flavor&amp;quot;: &amp;quot;large&amp;quot;,&lt;br /&gt;
    &amp;quot;size&amp;quot;: &amp;quot;3&amp;quot;,&lt;br /&gt;
    &amp;quot;volume_size&amp;quot;: &amp;quot;100&amp;quot;&lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
'''JSON Response'''&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
{&lt;br /&gt;
    &amp;quot;cluster&amp;quot;: {&lt;br /&gt;
        &amp;quot;cluster_id&amp;quot;: &amp;quot;dd745f4a-9333-417e-bb89-9c989c84c068&amp;quot;,&lt;br /&gt;
        &amp;quot;network_id&amp;quot;: &amp;quot;d32019d3-bc6e-4319-9c1d-6722fc136a22&amp;quot;,&lt;br /&gt;
        &amp;quot;name&amp;quot;: &amp;quot;Message Cluster 1&amp;quot;,&lt;br /&gt;
        &amp;quot;status&amp;quot;: &amp;quot;BUILDING&amp;quot;,&lt;br /&gt;
        &amp;quot;flavor&amp;quot;: &amp;quot;large&amp;quot;,&lt;br /&gt;
        &amp;quot;size&amp;quot;: &amp;quot;3&amp;quot;,&lt;br /&gt;
        &amp;quot;volume_size&amp;quot;: &amp;quot;100&amp;quot;,&lt;br /&gt;
        &amp;quot;created&amp;quot;: &amp;quot;2014-11-11T01:02:03Z&amp;quot;,&lt;br /&gt;
        &amp;quot;updated&amp;quot;: &amp;quot;2014-11-11T01:02:03Z&amp;quot;&lt;br /&gt;
    }&lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
===Testing===&lt;br /&gt;
&lt;br /&gt;
Cue API testing will verify the expected functionality of the Cue user interface with both positive/negative tests.  The overall scope will cover testing from the HTTP REST request to required database interactions and work-flow task submission for RPC workers.&lt;br /&gt;
&lt;br /&gt;
====Unit Tests====&lt;br /&gt;
&lt;br /&gt;
Unit tests will verify the resulting function calls for each REST-ful URI and action(s).  The Python Mock library will be used to replace external system dependencies with placeholder objects.&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
! Function !! Tests !! Input Data !! Expected Result(s)&lt;br /&gt;
|-&lt;br /&gt;
| List Clusters || &lt;br /&gt;
# Create 'n' cluster(s), then call list clusters and verify expected return object&lt;br /&gt;
# Call list clusters when no clusters exist within a project id and verify expected return object&lt;br /&gt;
|| &lt;br /&gt;
* n = # of clusters to create&lt;br /&gt;
||&lt;br /&gt;
# List of 'n' clusters is returned with appropriate fields, HTTP Ok (200)&lt;br /&gt;
# Empty list of clusters is returned, HTTP Ok (200)&lt;br /&gt;
|-&lt;br /&gt;
| Create Cluster || &lt;br /&gt;
# Create standard cluster 'c' and verify expected return object&lt;br /&gt;
# Create cluster with invalid flavor and verify expected return value&lt;br /&gt;
# Create cluster with invalid volume size and verify expected return value&lt;br /&gt;
||&lt;br /&gt;
* n = cluster size (number of nodes)&lt;br /&gt;
* m = cluster name&lt;br /&gt;
* f = flavor&lt;br /&gt;
* s = volume size&lt;br /&gt;
* nic = Network UUID&lt;br /&gt;
||&lt;br /&gt;
# Cluster ID, name and status for newly created cluster is returned, HTTP Accepted (202)&lt;br /&gt;
# HTTP Bad request is returned (400)&lt;br /&gt;
# HTTP Bad request is returned (400)&lt;br /&gt;
|-&lt;br /&gt;
| Show Cluster ||&lt;br /&gt;
# Create cluster, then call get cluster and verify expected return object&lt;br /&gt;
# Get cluster with invalid cluster_id&lt;br /&gt;
||&lt;br /&gt;
* cluster_id = cluster ID&lt;br /&gt;
||&lt;br /&gt;
# Cluster ID, name, status, created/updated date stamp and list of nodes is returned, HTTP Ok (200).&lt;br /&gt;
# HTTP Bad request is returned (400)&lt;br /&gt;
|-&lt;br /&gt;
| Delete Cluster || &lt;br /&gt;
# Create a cluster, then call delete cluster and verify expected return value&lt;br /&gt;
# Delete cluster with invalid cluster_id&lt;br /&gt;
||&lt;br /&gt;
* cluster_id = cluster ID&lt;br /&gt;
||&lt;br /&gt;
# HTTP accepted is returned (202)&lt;br /&gt;
# HTTP Bad request is returned (400)&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
====Functional Tests====&lt;br /&gt;
&lt;br /&gt;
The functional tests will verify the HTTP REST URI request lifecycle from controller routing to HTTP response.  These tests will make use of Pecan's testing utility; pecan.testing module.&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
! Operation !! URI !! Tests !! Input Data !! Expected Data (JSON)&lt;br /&gt;
|-&lt;br /&gt;
| GET || /v1/clusters || &lt;br /&gt;
# Call when clusters exist&lt;br /&gt;
# Call when no clusters exist&lt;br /&gt;
|| &lt;br /&gt;
* n/a&lt;br /&gt;
||&lt;br /&gt;
# List of 'n' clusters is returned with appropriate fields, HTTP Ok (200)&lt;br /&gt;
# Empty list of clusters is returned, HTTP Ok (200)&lt;br /&gt;
|-&lt;br /&gt;
| POST || /v1/clusters ||&lt;br /&gt;
# Create standard cluster 'c' and verify expected return object&lt;br /&gt;
# Create cluster with invalid flavor and verify expected return value&lt;br /&gt;
# Create cluster with invalid volume size and verify expected return value&lt;br /&gt;
|| &lt;br /&gt;
* n = cluster size (number of nodes)&lt;br /&gt;
* m = cluster name&lt;br /&gt;
* f = flavor&lt;br /&gt;
* s = volume size&lt;br /&gt;
* nic = Network UUID&lt;br /&gt;
||&lt;br /&gt;
# Cluster ID, name and status for newly created cluster is returned, HTTP Accepted (202)&lt;br /&gt;
# HTTP Bad request is returned (400)&lt;br /&gt;
# HTTP Bad request is returned (400)&lt;br /&gt;
||&lt;br /&gt;
|-&lt;br /&gt;
| GET || /v1/clusters/{cluster_id} || &lt;br /&gt;
# Create cluster, then call get cluster and verify expected return object&lt;br /&gt;
# Get cluster with invalid cluster_id&lt;br /&gt;
|| &lt;br /&gt;
* cluster_id = cluster &lt;br /&gt;
||&lt;br /&gt;
# Cluster ID, name, status, created/updated date stamp and list of nodes is returned, HTTP Ok (200).&lt;br /&gt;
# HTTP Bad request is returned (400)&lt;br /&gt;
||&lt;br /&gt;
|-&lt;br /&gt;
| DELETE || /v1/clusters/{cluster_id} ||&lt;br /&gt;
# Create a cluster, then call delete cluster and verify expected return value&lt;br /&gt;
# Delete cluster with invalid cluster_id&lt;br /&gt;
||&lt;br /&gt;
* cluster_id = cluster ID&lt;br /&gt;
||&lt;br /&gt;
# HTTP accepted is returned (202)&lt;br /&gt;
# HTTP Bad request is returned (400)&lt;br /&gt;
||&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
====Integration Tests====&lt;br /&gt;
&lt;br /&gt;
The integration tests will cover API functionality from HTTP request to database access and task submission for RPC workers.  The Pecan test utility will be used to route test request URI to appropriate controllers, then database record(s) will be verified for applicable change.  Finally the creation of task objections will be verified to ensure valid task flows.&lt;/div&gt;</summary>
		<author><name>Dagnello</name></author>	</entry>

	<entry>
		<id>https://wiki.openstack.org/w/index.php?title=Cue/api_2&amp;diff=70282</id>
		<title>Cue/api 2</title>
		<link rel="alternate" type="text/html" href="https://wiki.openstack.org/w/index.php?title=Cue/api_2&amp;diff=70282"/>
				<updated>2014-12-12T23:20:36Z</updated>
		
		<summary type="html">&lt;p&gt;Dagnello: /* Update Cluster */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;== Cue API Design ==&lt;br /&gt;
=== Acronyms ===&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
! '''Acronym''' !! '''Definition'''&lt;br /&gt;
|-&lt;br /&gt;
| SSL || Secure Sockets Layer&lt;br /&gt;
|-&lt;br /&gt;
| REST || Representational State Transfer&lt;br /&gt;
|-&lt;br /&gt;
| URI || Uniform Resource Identifier&lt;br /&gt;
|-&lt;br /&gt;
| UUID || Universally Unique Identifier&lt;br /&gt;
|-&lt;br /&gt;
| AMQP || Advanced Messaging Queuing Protocol&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
=== Requirements ===&lt;br /&gt;
&lt;br /&gt;
API Requirements for Cue - Kilo timeframe.&lt;br /&gt;
&lt;br /&gt;
* Keystone integration&lt;br /&gt;
* CRUD on Cluster&lt;br /&gt;
* Cluster Management – Scale up/down&lt;br /&gt;
* Devstack integration&lt;br /&gt;
* Gate Tests&lt;br /&gt;
&lt;br /&gt;
=== System Context Diagram ===&lt;br /&gt;
&lt;br /&gt;
[[File:SCD.jpg]]&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
! '''Component''' !! '''Description'''&lt;br /&gt;
|-&lt;br /&gt;
| User || Direct customer of Cue.&lt;br /&gt;
|-&lt;br /&gt;
| Horizon || Cue functionality will be added to Horizon, which will provide a web-based portal for Cue control.&lt;br /&gt;
|-&lt;br /&gt;
| CLI || Command Line Interface to Cue, provides user access to provisioning and deploying messaging clusters.&lt;br /&gt;
|-&lt;br /&gt;
| REST_API || Provides user access to provisioning and deploying messaging clusters through REST interface.  This is a light-weight interface, provisioning and configuration of clusters/nodes is delegated to the TaskWorker process.&lt;br /&gt;
|-&lt;br /&gt;
| TaskScheduler || Used to synchronize work tasks between the REST_API and TaskWorker processes.&lt;br /&gt;
|-&lt;br /&gt;
| TaskWorker || Carries out work associated with all provisioning, configuration and management of RabbitMQ clusters and nodes.  Makes use of heat for initial provisioning/deployment.&lt;br /&gt;
|-&lt;br /&gt;
| DB || Database to store information on clusters and nodes.  Example, in cluster creation, when request is initially received through REST_API, this DB is updated accordingly and the work is delegated to TaskWorker.  TaskWorker then updates this DB as provisioning and configuration takes place.  Subsequent calls to check on status of cluster creation, will return updated information from this DB.&lt;br /&gt;
|-&lt;br /&gt;
| Heat || Used cloud instance orchestration in deploying RabbitMQ cluster images.&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
=== REST API ===&lt;br /&gt;
&lt;br /&gt;
General requirement, REST API must respond within 500ms.&lt;br /&gt;
==== List Clusters ====&lt;br /&gt;
&lt;br /&gt;
'''''GET /v1/clusters'''''&lt;br /&gt;
&lt;br /&gt;
This operation synchronously returns all clusters provisioned within the associated project id.&lt;br /&gt;
&lt;br /&gt;
'''Request Parameters'''&lt;br /&gt;
N/A&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
! Response !! Code(s)&lt;br /&gt;
|-&lt;br /&gt;
| Normal || ok (200)&lt;br /&gt;
|-&lt;br /&gt;
| Error || unauthorized (401)&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
'''Response Parameters'''&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
! Parameter !! Type !! Description&lt;br /&gt;
|-&lt;br /&gt;
| cluster(list) || string || List of clusters, detailing respective cluster id, name, status, created time stamp and updated time stamp.&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
	&lt;br /&gt;
&lt;br /&gt;
'''JSON Request'''&lt;br /&gt;
&lt;br /&gt;
N/A&lt;br /&gt;
&lt;br /&gt;
'''JSON Response'''&lt;br /&gt;
&lt;br /&gt;
{&lt;br /&gt;
    &amp;quot;clusters&amp;quot;: &amp;lt;nowiki&amp;gt;[&amp;lt;/nowiki&amp;gt;&lt;br /&gt;
        {&lt;br /&gt;
            &amp;quot;cluster_id&amp;quot;: &amp;quot;b51948c9-1ac5-4c28-a580-6f7c500d82f8&amp;quot;,&lt;br /&gt;
            &amp;quot;network_id&amp;quot;: &amp;quot;d32019d3-bc6e-4319-9c1d-6722fc136a22&amp;quot;,&lt;br /&gt;
            &amp;quot;name&amp;quot;: &amp;quot;Message Cluster 1&amp;quot;,&lt;br /&gt;
            &amp;quot;status&amp;quot;: &amp;quot;ACTIVE&amp;quot;,&lt;br /&gt;
            &amp;quot;flavor&amp;quot;: &amp;quot;medium&amp;quot;,&lt;br /&gt;
            &amp;quot;size&amp;quot;: &amp;quot;3&amp;quot;,&lt;br /&gt;
            &amp;quot;created&amp;quot;: &amp;quot;2014-11-11T01:02:03Z&amp;quot;,&lt;br /&gt;
            &amp;quot;updated&amp;quot;: &amp;quot;2014-11-11T01:02:03Z&amp;quot;&lt;br /&gt;
        },&lt;br /&gt;
        {&lt;br /&gt;
            &amp;quot;cluster_id&amp;quot;: &amp;quot;13c456c9-bbfc-4c31-b26d-3ae5c3cd7a77&amp;quot;,&lt;br /&gt;
            &amp;quot;network_id&amp;quot;: &amp;quot;d32019d3-bc6e-4319-9c1d-6722fc136a22&amp;quot;,&lt;br /&gt;
            &amp;quot;name&amp;quot;: &amp;quot;Message Cluster 2&amp;quot;,&lt;br /&gt;
            &amp;quot;status&amp;quot;: &amp;quot;BUILDING&amp;quot;,&lt;br /&gt;
            &amp;quot;flavor&amp;quot;: &amp;quot;small&amp;quot;,&lt;br /&gt;
            &amp;quot;size&amp;quot;: &amp;quot;5&amp;quot;,&lt;br /&gt;
            &amp;quot;created&amp;quot;: &amp;quot;2014-11-12T13:23:54Z&amp;quot;,&lt;br /&gt;
            &amp;quot;updated&amp;quot;: &amp;quot;2014-11-13T19:55:01Z&amp;quot;&lt;br /&gt;
        }&lt;br /&gt;
    ]&lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
==== Create Cluster ====&lt;br /&gt;
&lt;br /&gt;
'''''POST /v1/clusters'''''&lt;br /&gt;
&lt;br /&gt;
This operation asynchronously creates a new cluster of Nova instances provisioned with the required message brokers in a central project id. &lt;br /&gt;
&lt;br /&gt;
'''Request Parameters'''&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
! Parameter !! Type !! Description&lt;br /&gt;
|-&lt;br /&gt;
| network_id || UUID || Network Identification for a Neutron network where cluster will be created in.&lt;br /&gt;
|-&lt;br /&gt;
| name || string || Name of cluster.&lt;br /&gt;
|-&lt;br /&gt;
| flavor || string || Cluster node flavor, which specify VM type in terms of CPU/memory/disk resources (e.g. small, medium, large).&lt;br /&gt;
&lt;br /&gt;
small:  1 GHz dual-core CPU; 512 MB memory; 250 GB disk&lt;br /&gt;
&lt;br /&gt;
medium: 2.8 GHz dual-core CPU; 4 GB memory; 1 TB disk&lt;br /&gt;
&lt;br /&gt;
large: 3.6 GHz quad-core CPU; 32 GB memory; 5 TB disk&lt;br /&gt;
|-&lt;br /&gt;
| size || int || Number of nodes in cluster.&lt;br /&gt;
|-&lt;br /&gt;
| volume_size || int || Optional parameter to indicate size of volume for node instance.  If volumes are supported, then this parameter will be used.  If ephmeral disk are not supported, volume support will be required.&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
'''Response Codes'''&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
! Response !! Code(s)&lt;br /&gt;
|-&lt;br /&gt;
| Normal || 202 (accepted)&lt;br /&gt;
|-&lt;br /&gt;
| Error || badRequest (400), unauthorized (401), itemNotFound (404)&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
'''Response Parameters'''&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
! Parameter !! Type !! Description&lt;br /&gt;
|-&lt;br /&gt;
| cluster_id || UUID || ID of cluster to be created.&lt;br /&gt;
|-&lt;br /&gt;
| name || string || Name of cluster (same as provided name in request parameters).&lt;br /&gt;
|-&lt;br /&gt;
| status || string || Current status of cluster.&lt;br /&gt;
&lt;br /&gt;
BUILDING: Cluster is in progress of being provisioned.&lt;br /&gt;
&lt;br /&gt;
ACTIVE:  Cluster is running.&lt;br /&gt;
&lt;br /&gt;
ERROR: Provisioning error(s) encountered.&lt;br /&gt;
&lt;br /&gt;
DELETED:  Cluster has been deleted.&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
'''JSON Request'''&lt;br /&gt;
&lt;br /&gt;
{&lt;br /&gt;
    &amp;quot;network_id&amp;quot;: &amp;quot;d32019d3-bc6e-4319-9c1d-6722fc136a22&amp;quot;,&lt;br /&gt;
    &amp;quot;name&amp;quot;: &amp;quot;MessageCluster1&amp;quot;,&lt;br /&gt;
    &amp;quot;flavor&amp;quot;: &amp;quot;large&amp;quot;,&lt;br /&gt;
    &amp;quot;size&amp;quot;: &amp;quot;3&amp;quot;,&lt;br /&gt;
    &amp;quot;volume_size&amp;quot;: &amp;quot;100&amp;quot;&lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
'''JSON Response'''&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
{&lt;br /&gt;
    &amp;quot;cluster&amp;quot;: {&lt;br /&gt;
        &amp;quot;cluster_id&amp;quot;: &amp;quot;dd745f4a-9333-417e-bb89-9c989c84c068&amp;quot;,&lt;br /&gt;
        &amp;quot;network_id&amp;quot;: &amp;quot;d32019d3-bc6e-4319-9c1d-6722fc136a22&amp;quot;,&lt;br /&gt;
        &amp;quot;name&amp;quot;: &amp;quot;Message Cluster 1&amp;quot;,&lt;br /&gt;
        &amp;quot;status&amp;quot;: &amp;quot;BUILDING&amp;quot;,&lt;br /&gt;
        &amp;quot;flavor&amp;quot;: &amp;quot;large&amp;quot;,&lt;br /&gt;
        &amp;quot;size&amp;quot;: &amp;quot;3&amp;quot;,&lt;br /&gt;
        &amp;quot;volume_size&amp;quot;: &amp;quot;100&amp;quot;,&lt;br /&gt;
        &amp;quot;created&amp;quot;: &amp;quot;2014-11-11T01:02:03Z&amp;quot;,&lt;br /&gt;
        &amp;quot;updated&amp;quot;: &amp;quot;2014-11-11T01:02:03Z&amp;quot;&lt;br /&gt;
    }&lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
==== Show Cluster ====&lt;br /&gt;
&lt;br /&gt;
'''''GET /v1/clusters/{cluster_id}'''''&lt;br /&gt;
&lt;br /&gt;
This operation synchronously returns the status and information on the specified cluster within the provided project id.&lt;br /&gt;
&lt;br /&gt;
'''Request Parameters'''&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
! Parameter !! Type !! Description&lt;br /&gt;
|-&lt;br /&gt;
| cluster_id (URI) || UUID || Cluster ID.  This value is returned when a new cluster is created.&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
'''Response Codes'''&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
! Response !! Code(s)&lt;br /&gt;
|-&lt;br /&gt;
| Normal || ok (200)&lt;br /&gt;
|-&lt;br /&gt;
| Error || unauthorized (401), itemNotFound (404)&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
'''Response Parameters'''&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
! Parameter !! Type !! Description&lt;br /&gt;
|-&lt;br /&gt;
| cluster_id || UUID || ID of requested cluster.&lt;br /&gt;
|-&lt;br /&gt;
| name || string || Name of cluster.&lt;br /&gt;
|-&lt;br /&gt;
| status || string || Current status of cluster.&lt;br /&gt;
&lt;br /&gt;
BUILDING: Cluster is in progress of being provisioned.&lt;br /&gt;
&lt;br /&gt;
ACTIVE:  Cluster is running.&lt;br /&gt;
&lt;br /&gt;
ERROR: Provisioning error(s) encountered.&lt;br /&gt;
&lt;br /&gt;
DELETED:  Cluster has been deleted.&lt;br /&gt;
|-&lt;br /&gt;
| created || string || Created time stamp in format: yyyy-mm-ddThh:mm:ssZ&lt;br /&gt;
|-&lt;br /&gt;
| updated || string || Last updated time stamp in format: yyyy-mm-ddThh:mm:ssZ&lt;br /&gt;
|-&lt;br /&gt;
| nodes(list) || node || List of nodes, which includes node id, instance state, and flavor.&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
'''JSON Request'''&lt;br /&gt;
&lt;br /&gt;
N/A&lt;br /&gt;
&lt;br /&gt;
'''JSON Response'''&lt;br /&gt;
&lt;br /&gt;
{&lt;br /&gt;
    &amp;quot;cluster&amp;quot;: {&lt;br /&gt;
        &amp;quot;cluster_id&amp;quot;: &amp;quot;dd745f4a-9333-417e-bb89-9c989c84c068&amp;quot;,&lt;br /&gt;
        &amp;quot;network_id&amp;quot;: &amp;quot;d32019d3-bc6e-4319-9c1d-6722fc136a22&amp;quot;,&lt;br /&gt;
        &amp;quot;name&amp;quot;: &amp;quot;Message Cluster 1&amp;quot;,&lt;br /&gt;
        &amp;quot;status&amp;quot;: &amp;quot;ACTIVE&amp;quot;,&lt;br /&gt;
        &amp;quot;flavor&amp;quot;: &amp;quot;large&amp;quot;,&lt;br /&gt;
        &amp;quot;size&amp;quot;: &amp;quot;3&amp;quot;,&lt;br /&gt;
        &amp;quot;volume_size&amp;quot;: &amp;quot;100&amp;quot;,&lt;br /&gt;
        &amp;quot;created&amp;quot;: &amp;quot;2014-11-11T01:02:03Z&amp;quot;,&lt;br /&gt;
        &amp;quot;updated&amp;quot;: &amp;quot;2014-11-11T01:02:03Z&amp;quot;,&lt;br /&gt;
        &amp;quot;endpoints&amp;quot;: [&lt;br /&gt;
            {&lt;br /&gt;
                &amp;quot;type&amp;quot;: &amp;quot;AMQP&amp;quot;,&lt;br /&gt;
                &amp;quot;value&amp;quot;: &amp;quot;amqp://10.20.30.40:10000&amp;quot;&lt;br /&gt;
            },&lt;br /&gt;
            {&lt;br /&gt;
                &amp;quot;type&amp;quot;: &amp;quot;console&amp;quot;,&lt;br /&gt;
                &amp;quot;value&amp;quot;: &amp;quot;http://10.20.30.40:5672&amp;quot;&lt;br /&gt;
            },&lt;br /&gt;
            {&lt;br /&gt;
                &amp;quot;type&amp;quot;: &amp;quot;AMQP&amp;quot;,&lt;br /&gt;
                &amp;quot;value&amp;quot;: &amp;quot;amqp://10.20.30.41:10000&amp;quot;&lt;br /&gt;
            },&lt;br /&gt;
            {&lt;br /&gt;
                &amp;quot;type&amp;quot;: &amp;quot;console&amp;quot;,&lt;br /&gt;
                &amp;quot;value&amp;quot;: &amp;quot;http://10.20.30.41:5672&amp;quot;&lt;br /&gt;
            },&lt;br /&gt;
            {&lt;br /&gt;
                &amp;quot;type&amp;quot;: &amp;quot;AMQP&amp;quot;,&lt;br /&gt;
                &amp;quot;value&amp;quot;: &amp;quot;amqp://10.20.30.42:10000&amp;quot;&lt;br /&gt;
            },&lt;br /&gt;
            {&lt;br /&gt;
                &amp;quot;type&amp;quot;: &amp;quot;console&amp;quot;,&lt;br /&gt;
                &amp;quot;value&amp;quot;: &amp;quot;http://10.20.30.42:5672&amp;quot;&lt;br /&gt;
            }&lt;br /&gt;
        ]&lt;br /&gt;
    }&lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
==== Delete Cluster ====&lt;br /&gt;
&lt;br /&gt;
'''''DELETE /v1/clusters/{cluster_id}'''''''&lt;br /&gt;
&lt;br /&gt;
This operation will asynchronously delete the indicated cluster within the provided project id.&lt;br /&gt;
&lt;br /&gt;
'''Request Parameters'''&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
! Parameter !! Type !! Description&lt;br /&gt;
|-&lt;br /&gt;
| cluster_id (URI) || UUID || Cluster ID.  This value is returned when a new cluster is created.&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
'''Response Codes'''&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
! Response !! Code(s)&lt;br /&gt;
|-&lt;br /&gt;
| Normal || accepted (202)&lt;br /&gt;
|-&lt;br /&gt;
| Error || unauthorized (401), itemNotFound (404)&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
'''Response Parameters'''&lt;br /&gt;
&lt;br /&gt;
N/A&lt;br /&gt;
&lt;br /&gt;
'''JSON Request'''&lt;br /&gt;
&lt;br /&gt;
N/A&lt;br /&gt;
&lt;br /&gt;
'''JSON Response'''&lt;br /&gt;
&lt;br /&gt;
N/A&lt;br /&gt;
&lt;br /&gt;
==== Update Cluster ====&lt;br /&gt;
&lt;br /&gt;
'''''PATCH /v1/clusters/{cluster_id}'''''&lt;br /&gt;
&lt;br /&gt;
This operation will asynchronously updated the indicated cluster (cluster_id) based on the request body received.  The request body structure is the same as create cluster api.  Cue will automatically detect differences and perform appropriate actions in order to update cluster accordingly.&lt;br /&gt;
&lt;br /&gt;
'''Request Parameters'''&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
! Parameter !! Type !! Description&lt;br /&gt;
|-&lt;br /&gt;
| network_id || UUID || Network Identification for a Neutron network where cluster will be created in.&lt;br /&gt;
|-&lt;br /&gt;
| name || string || Name of cluster.&lt;br /&gt;
|-&lt;br /&gt;
| flavor || string || Cluster node flavor, which specify VM type in terms of CPU/memory/disk resources (e.g. small, medium, large).&lt;br /&gt;
&lt;br /&gt;
small:  1 GHz dual-core CPU; 512 MB memory; 250 GB disk&lt;br /&gt;
&lt;br /&gt;
medium: 2.8 GHz dual-core CPU; 4 GB memory; 1 TB disk&lt;br /&gt;
&lt;br /&gt;
large: 3.6 GHz quad-core CPU; 32 GB memory; 5 TB disk&lt;br /&gt;
|-&lt;br /&gt;
| size || int || Number of nodes in cluster.&lt;br /&gt;
|-&lt;br /&gt;
| volume_size || int || Optional parameter to indicate size of volume for node instance.  If volumes are supported, then this parameter will be used.  If ephmeral disk are not supported, volume support will be required.&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
'''Response Codes'''&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
! Response !! Code(s)&lt;br /&gt;
|-&lt;br /&gt;
| Normal || 202 (accepted)&lt;br /&gt;
|-&lt;br /&gt;
| Error || badRequest (400), unauthorized (401), itemNotFound (404)&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
'''Response Parameters'''&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
! Parameter !! Type !! Description&lt;br /&gt;
|-&lt;br /&gt;
| cluster_id || UUID || ID of cluster to be created.&lt;br /&gt;
|-&lt;br /&gt;
| network_id || UUID || Network Identification for a Neutron network where cluster will be created in.&lt;br /&gt;
|-&lt;br /&gt;
| name || string || Name of cluster (same as provided name in request parameters).&lt;br /&gt;
|-&lt;br /&gt;
| status || string || Current status of cluster.&lt;br /&gt;
|-&lt;br /&gt;
| flavor || string || Cluster node flavor, which specify VM type in terms of CPU/memory/disk resources (e.g. small, medium, large).&lt;br /&gt;
|-&lt;br /&gt;
| size || int || Number of nodes in cluster.&lt;br /&gt;
|-&lt;br /&gt;
| volume_size || int || Optional parameter to indicate size of volume for node instance.  If volumes are supported, then this parameter will be used.  If ephmeral disk are not supported, volume support will be required.&lt;br /&gt;
&lt;br /&gt;
BUILDING: Cluster is in progress of being provisioned.&lt;br /&gt;
&lt;br /&gt;
ACTIVE:  Cluster is running.&lt;br /&gt;
&lt;br /&gt;
ERROR: Provisioning error(s) encountered.&lt;br /&gt;
&lt;br /&gt;
DELETED:  Cluster has been deleted.&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
'''JSON Request'''&lt;br /&gt;
&lt;br /&gt;
{&lt;br /&gt;
    &amp;quot;network_id&amp;quot;: &amp;quot;d32019d3-bc6e-4319-9c1d-6722fc136a22&amp;quot;,&lt;br /&gt;
    &amp;quot;name&amp;quot;: &amp;quot;MessageCluster1&amp;quot;,&lt;br /&gt;
    &amp;quot;flavor&amp;quot;: &amp;quot;large&amp;quot;,&lt;br /&gt;
    &amp;quot;size&amp;quot;: &amp;quot;3&amp;quot;,&lt;br /&gt;
    &amp;quot;volume_size&amp;quot;: &amp;quot;100&amp;quot;&lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
'''JSON Response'''&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
{&lt;br /&gt;
    &amp;quot;cluster&amp;quot;: {&lt;br /&gt;
        &amp;quot;cluster_id&amp;quot;: &amp;quot;dd745f4a-9333-417e-bb89-9c989c84c068&amp;quot;,&lt;br /&gt;
        &amp;quot;network_id&amp;quot;: &amp;quot;d32019d3-bc6e-4319-9c1d-6722fc136a22&amp;quot;,&lt;br /&gt;
        &amp;quot;name&amp;quot;: &amp;quot;Message Cluster 1&amp;quot;,&lt;br /&gt;
        &amp;quot;status&amp;quot;: &amp;quot;BUILDING&amp;quot;,&lt;br /&gt;
        &amp;quot;flavor&amp;quot;: &amp;quot;large&amp;quot;,&lt;br /&gt;
        &amp;quot;size&amp;quot;: &amp;quot;3&amp;quot;,&lt;br /&gt;
        &amp;quot;volume_size&amp;quot;: &amp;quot;100&amp;quot;,&lt;br /&gt;
        &amp;quot;created&amp;quot;: &amp;quot;2014-11-11T01:02:03Z&amp;quot;,&lt;br /&gt;
        &amp;quot;updated&amp;quot;: &amp;quot;2014-11-11T01:02:03Z&amp;quot;&lt;br /&gt;
    }&lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
===Testing===&lt;br /&gt;
&lt;br /&gt;
Cue API testing will verify the expected functionality of the Cue user interface with both positive/negative tests.  The overall scope will cover testing from the HTTP REST request to required database interactions and work-flow task submission for RPC workers.&lt;br /&gt;
&lt;br /&gt;
====Unit Tests====&lt;br /&gt;
&lt;br /&gt;
Unit tests will verify the resulting function calls for each REST-ful URI and action(s).  The Python Mock library will be used to replace external system dependencies with placeholder objects.&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
! Function !! Tests !! Input Data !! Expected Result(s)&lt;br /&gt;
|-&lt;br /&gt;
| List Clusters || &lt;br /&gt;
# Create 'n' cluster(s), then call list clusters and verify expected return object&lt;br /&gt;
# Call list clusters when no clusters exist within a project id and verify expected return object&lt;br /&gt;
|| &lt;br /&gt;
* n = # of clusters to create&lt;br /&gt;
||&lt;br /&gt;
# List of 'n' clusters is returned with appropriate fields, HTTP Ok (200)&lt;br /&gt;
# Empty list of clusters is returned, HTTP Ok (200)&lt;br /&gt;
|-&lt;br /&gt;
| Create Cluster || &lt;br /&gt;
# Create standard cluster 'c' and verify expected return object&lt;br /&gt;
# Create cluster with invalid flavor and verify expected return value&lt;br /&gt;
# Create cluster with invalid volume size and verify expected return value&lt;br /&gt;
||&lt;br /&gt;
* n = cluster size (number of nodes)&lt;br /&gt;
* m = cluster name&lt;br /&gt;
* f = flavor&lt;br /&gt;
* s = volume size&lt;br /&gt;
* nic = Network UUID&lt;br /&gt;
||&lt;br /&gt;
# Cluster ID, name and status for newly created cluster is returned, HTTP Accepted (202)&lt;br /&gt;
# HTTP Bad request is returned (400)&lt;br /&gt;
# HTTP Bad request is returned (400)&lt;br /&gt;
|-&lt;br /&gt;
| Show Cluster ||&lt;br /&gt;
# Create cluster, then call get cluster and verify expected return object&lt;br /&gt;
# Get cluster with invalid cluster_id&lt;br /&gt;
||&lt;br /&gt;
* cluster_id = cluster ID&lt;br /&gt;
||&lt;br /&gt;
# Cluster ID, name, status, created/updated date stamp and list of nodes is returned, HTTP Ok (200).&lt;br /&gt;
# HTTP Bad request is returned (400)&lt;br /&gt;
|-&lt;br /&gt;
| Delete Cluster || &lt;br /&gt;
# Create a cluster, then call delete cluster and verify expected return value&lt;br /&gt;
# Delete cluster with invalid cluster_id&lt;br /&gt;
||&lt;br /&gt;
* cluster_id = cluster ID&lt;br /&gt;
||&lt;br /&gt;
# HTTP accepted is returned (202)&lt;br /&gt;
# HTTP Bad request is returned (400)&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
====Functional Tests====&lt;br /&gt;
&lt;br /&gt;
The functional tests will verify the HTTP REST URI request lifecycle from controller routing to HTTP response.  These tests will make use of Pecan's testing utility; pecan.testing module.&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
! Operation !! URI !! Tests !! Input Data !! Expected Data (JSON)&lt;br /&gt;
|-&lt;br /&gt;
| GET || /v1/clusters || &lt;br /&gt;
# Call when clusters exist&lt;br /&gt;
# Call when no clusters exist&lt;br /&gt;
|| &lt;br /&gt;
* n/a&lt;br /&gt;
||&lt;br /&gt;
# List of 'n' clusters is returned with appropriate fields, HTTP Ok (200)&lt;br /&gt;
# Empty list of clusters is returned, HTTP Ok (200)&lt;br /&gt;
|-&lt;br /&gt;
| POST || /v1/clusters ||&lt;br /&gt;
# Create standard cluster 'c' and verify expected return object&lt;br /&gt;
# Create cluster with invalid flavor and verify expected return value&lt;br /&gt;
# Create cluster with invalid volume size and verify expected return value&lt;br /&gt;
|| &lt;br /&gt;
* n = cluster size (number of nodes)&lt;br /&gt;
* m = cluster name&lt;br /&gt;
* f = flavor&lt;br /&gt;
* s = volume size&lt;br /&gt;
* nic = Network UUID&lt;br /&gt;
||&lt;br /&gt;
# Cluster ID, name and status for newly created cluster is returned, HTTP Accepted (202)&lt;br /&gt;
# HTTP Bad request is returned (400)&lt;br /&gt;
# HTTP Bad request is returned (400)&lt;br /&gt;
||&lt;br /&gt;
|-&lt;br /&gt;
| GET || /v1/clusters/{cluster_id} || &lt;br /&gt;
# Create cluster, then call get cluster and verify expected return object&lt;br /&gt;
# Get cluster with invalid cluster_id&lt;br /&gt;
|| &lt;br /&gt;
* cluster_id = cluster &lt;br /&gt;
||&lt;br /&gt;
# Cluster ID, name, status, created/updated date stamp and list of nodes is returned, HTTP Ok (200).&lt;br /&gt;
# HTTP Bad request is returned (400)&lt;br /&gt;
||&lt;br /&gt;
|-&lt;br /&gt;
| DELETE || /v1/clusters/{cluster_id} ||&lt;br /&gt;
# Create a cluster, then call delete cluster and verify expected return value&lt;br /&gt;
# Delete cluster with invalid cluster_id&lt;br /&gt;
||&lt;br /&gt;
* cluster_id = cluster ID&lt;br /&gt;
||&lt;br /&gt;
# HTTP accepted is returned (202)&lt;br /&gt;
# HTTP Bad request is returned (400)&lt;br /&gt;
||&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
====Integration Tests====&lt;br /&gt;
&lt;br /&gt;
The integration tests will cover API functionality from HTTP request to database access and task submission for RPC workers.  The Pecan test utility will be used to route test request URI to appropriate controllers, then database record(s) will be verified for applicable change.  Finally the creation of task objections will be verified to ensure valid task flows.&lt;/div&gt;</summary>
		<author><name>Dagnello</name></author>	</entry>

	<entry>
		<id>https://wiki.openstack.org/w/index.php?title=Cue/api_2&amp;diff=70281</id>
		<title>Cue/api 2</title>
		<link rel="alternate" type="text/html" href="https://wiki.openstack.org/w/index.php?title=Cue/api_2&amp;diff=70281"/>
				<updated>2014-12-12T23:06:49Z</updated>
		
		<summary type="html">&lt;p&gt;Dagnello: /* Update Cluster */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;== Cue API Design ==&lt;br /&gt;
=== Acronyms ===&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
! '''Acronym''' !! '''Definition'''&lt;br /&gt;
|-&lt;br /&gt;
| SSL || Secure Sockets Layer&lt;br /&gt;
|-&lt;br /&gt;
| REST || Representational State Transfer&lt;br /&gt;
|-&lt;br /&gt;
| URI || Uniform Resource Identifier&lt;br /&gt;
|-&lt;br /&gt;
| UUID || Universally Unique Identifier&lt;br /&gt;
|-&lt;br /&gt;
| AMQP || Advanced Messaging Queuing Protocol&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
=== Requirements ===&lt;br /&gt;
&lt;br /&gt;
API Requirements for Cue - Kilo timeframe.&lt;br /&gt;
&lt;br /&gt;
* Keystone integration&lt;br /&gt;
* CRUD on Cluster&lt;br /&gt;
* Cluster Management – Scale up/down&lt;br /&gt;
* Devstack integration&lt;br /&gt;
* Gate Tests&lt;br /&gt;
&lt;br /&gt;
=== System Context Diagram ===&lt;br /&gt;
&lt;br /&gt;
[[File:SCD.jpg]]&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
! '''Component''' !! '''Description'''&lt;br /&gt;
|-&lt;br /&gt;
| User || Direct customer of Cue.&lt;br /&gt;
|-&lt;br /&gt;
| Horizon || Cue functionality will be added to Horizon, which will provide a web-based portal for Cue control.&lt;br /&gt;
|-&lt;br /&gt;
| CLI || Command Line Interface to Cue, provides user access to provisioning and deploying messaging clusters.&lt;br /&gt;
|-&lt;br /&gt;
| REST_API || Provides user access to provisioning and deploying messaging clusters through REST interface.  This is a light-weight interface, provisioning and configuration of clusters/nodes is delegated to the TaskWorker process.&lt;br /&gt;
|-&lt;br /&gt;
| TaskScheduler || Used to synchronize work tasks between the REST_API and TaskWorker processes.&lt;br /&gt;
|-&lt;br /&gt;
| TaskWorker || Carries out work associated with all provisioning, configuration and management of RabbitMQ clusters and nodes.  Makes use of heat for initial provisioning/deployment.&lt;br /&gt;
|-&lt;br /&gt;
| DB || Database to store information on clusters and nodes.  Example, in cluster creation, when request is initially received through REST_API, this DB is updated accordingly and the work is delegated to TaskWorker.  TaskWorker then updates this DB as provisioning and configuration takes place.  Subsequent calls to check on status of cluster creation, will return updated information from this DB.&lt;br /&gt;
|-&lt;br /&gt;
| Heat || Used cloud instance orchestration in deploying RabbitMQ cluster images.&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
=== REST API ===&lt;br /&gt;
&lt;br /&gt;
General requirement, REST API must respond within 500ms.&lt;br /&gt;
==== List Clusters ====&lt;br /&gt;
&lt;br /&gt;
'''''GET /v1/clusters'''''&lt;br /&gt;
&lt;br /&gt;
This operation synchronously returns all clusters provisioned within the associated project id.&lt;br /&gt;
&lt;br /&gt;
'''Request Parameters'''&lt;br /&gt;
N/A&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
! Response !! Code(s)&lt;br /&gt;
|-&lt;br /&gt;
| Normal || ok (200)&lt;br /&gt;
|-&lt;br /&gt;
| Error || unauthorized (401)&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
'''Response Parameters'''&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
! Parameter !! Type !! Description&lt;br /&gt;
|-&lt;br /&gt;
| cluster(list) || string || List of clusters, detailing respective cluster id, name, status, created time stamp and updated time stamp.&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
	&lt;br /&gt;
&lt;br /&gt;
'''JSON Request'''&lt;br /&gt;
&lt;br /&gt;
N/A&lt;br /&gt;
&lt;br /&gt;
'''JSON Response'''&lt;br /&gt;
&lt;br /&gt;
{&lt;br /&gt;
    &amp;quot;clusters&amp;quot;: &amp;lt;nowiki&amp;gt;[&amp;lt;/nowiki&amp;gt;&lt;br /&gt;
        {&lt;br /&gt;
            &amp;quot;cluster_id&amp;quot;: &amp;quot;b51948c9-1ac5-4c28-a580-6f7c500d82f8&amp;quot;,&lt;br /&gt;
            &amp;quot;network_id&amp;quot;: &amp;quot;d32019d3-bc6e-4319-9c1d-6722fc136a22&amp;quot;,&lt;br /&gt;
            &amp;quot;name&amp;quot;: &amp;quot;Message Cluster 1&amp;quot;,&lt;br /&gt;
            &amp;quot;status&amp;quot;: &amp;quot;ACTIVE&amp;quot;,&lt;br /&gt;
            &amp;quot;flavor&amp;quot;: &amp;quot;medium&amp;quot;,&lt;br /&gt;
            &amp;quot;size&amp;quot;: &amp;quot;3&amp;quot;,&lt;br /&gt;
            &amp;quot;created&amp;quot;: &amp;quot;2014-11-11T01:02:03Z&amp;quot;,&lt;br /&gt;
            &amp;quot;updated&amp;quot;: &amp;quot;2014-11-11T01:02:03Z&amp;quot;&lt;br /&gt;
        },&lt;br /&gt;
        {&lt;br /&gt;
            &amp;quot;cluster_id&amp;quot;: &amp;quot;13c456c9-bbfc-4c31-b26d-3ae5c3cd7a77&amp;quot;,&lt;br /&gt;
            &amp;quot;network_id&amp;quot;: &amp;quot;d32019d3-bc6e-4319-9c1d-6722fc136a22&amp;quot;,&lt;br /&gt;
            &amp;quot;name&amp;quot;: &amp;quot;Message Cluster 2&amp;quot;,&lt;br /&gt;
            &amp;quot;status&amp;quot;: &amp;quot;BUILDING&amp;quot;,&lt;br /&gt;
            &amp;quot;flavor&amp;quot;: &amp;quot;small&amp;quot;,&lt;br /&gt;
            &amp;quot;size&amp;quot;: &amp;quot;5&amp;quot;,&lt;br /&gt;
            &amp;quot;created&amp;quot;: &amp;quot;2014-11-12T13:23:54Z&amp;quot;,&lt;br /&gt;
            &amp;quot;updated&amp;quot;: &amp;quot;2014-11-13T19:55:01Z&amp;quot;&lt;br /&gt;
        }&lt;br /&gt;
    ]&lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
==== Create Cluster ====&lt;br /&gt;
&lt;br /&gt;
'''''POST /v1/clusters'''''&lt;br /&gt;
&lt;br /&gt;
This operation asynchronously creates a new cluster of Nova instances provisioned with the required message brokers in a central project id. &lt;br /&gt;
&lt;br /&gt;
'''Request Parameters'''&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
! Parameter !! Type !! Description&lt;br /&gt;
|-&lt;br /&gt;
| network_id || UUID || Network Identification for a Neutron network where cluster will be created in.&lt;br /&gt;
|-&lt;br /&gt;
| name || string || Name of cluster.&lt;br /&gt;
|-&lt;br /&gt;
| flavor || string || Cluster node flavor, which specify VM type in terms of CPU/memory/disk resources (e.g. small, medium, large).&lt;br /&gt;
&lt;br /&gt;
small:  1 GHz dual-core CPU; 512 MB memory; 250 GB disk&lt;br /&gt;
&lt;br /&gt;
medium: 2.8 GHz dual-core CPU; 4 GB memory; 1 TB disk&lt;br /&gt;
&lt;br /&gt;
large: 3.6 GHz quad-core CPU; 32 GB memory; 5 TB disk&lt;br /&gt;
|-&lt;br /&gt;
| size || int || Number of nodes in cluster.&lt;br /&gt;
|-&lt;br /&gt;
| volume_size || int || Optional parameter to indicate size of volume for node instance.  If volumes are supported, then this parameter will be used.  If ephmeral disk are not supported, volume support will be required.&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
'''Response Codes'''&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
! Response !! Code(s)&lt;br /&gt;
|-&lt;br /&gt;
| Normal || 202 (accepted)&lt;br /&gt;
|-&lt;br /&gt;
| Error || badRequest (400), unauthorized (401), itemNotFound (404)&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
'''Response Parameters'''&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
! Parameter !! Type !! Description&lt;br /&gt;
|-&lt;br /&gt;
| cluster_id || UUID || ID of cluster to be created.&lt;br /&gt;
|-&lt;br /&gt;
| name || string || Name of cluster (same as provided name in request parameters).&lt;br /&gt;
|-&lt;br /&gt;
| status || string || Current status of cluster.&lt;br /&gt;
&lt;br /&gt;
BUILDING: Cluster is in progress of being provisioned.&lt;br /&gt;
&lt;br /&gt;
ACTIVE:  Cluster is running.&lt;br /&gt;
&lt;br /&gt;
ERROR: Provisioning error(s) encountered.&lt;br /&gt;
&lt;br /&gt;
DELETED:  Cluster has been deleted.&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
'''JSON Request'''&lt;br /&gt;
&lt;br /&gt;
{&lt;br /&gt;
    &amp;quot;network_id&amp;quot;: &amp;quot;d32019d3-bc6e-4319-9c1d-6722fc136a22&amp;quot;,&lt;br /&gt;
    &amp;quot;name&amp;quot;: &amp;quot;MessageCluster1&amp;quot;,&lt;br /&gt;
    &amp;quot;flavor&amp;quot;: &amp;quot;large&amp;quot;,&lt;br /&gt;
    &amp;quot;size&amp;quot;: &amp;quot;3&amp;quot;,&lt;br /&gt;
    &amp;quot;volume_size&amp;quot;: &amp;quot;100&amp;quot;&lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
'''JSON Response'''&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
{&lt;br /&gt;
    &amp;quot;cluster&amp;quot;: {&lt;br /&gt;
        &amp;quot;cluster_id&amp;quot;: &amp;quot;dd745f4a-9333-417e-bb89-9c989c84c068&amp;quot;,&lt;br /&gt;
        &amp;quot;network_id&amp;quot;: &amp;quot;d32019d3-bc6e-4319-9c1d-6722fc136a22&amp;quot;,&lt;br /&gt;
        &amp;quot;name&amp;quot;: &amp;quot;Message Cluster 1&amp;quot;,&lt;br /&gt;
        &amp;quot;status&amp;quot;: &amp;quot;BUILDING&amp;quot;,&lt;br /&gt;
        &amp;quot;flavor&amp;quot;: &amp;quot;large&amp;quot;,&lt;br /&gt;
        &amp;quot;size&amp;quot;: &amp;quot;3&amp;quot;,&lt;br /&gt;
        &amp;quot;volume_size&amp;quot;: &amp;quot;100&amp;quot;,&lt;br /&gt;
        &amp;quot;created&amp;quot;: &amp;quot;2014-11-11T01:02:03Z&amp;quot;,&lt;br /&gt;
        &amp;quot;updated&amp;quot;: &amp;quot;2014-11-11T01:02:03Z&amp;quot;&lt;br /&gt;
    }&lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
==== Show Cluster ====&lt;br /&gt;
&lt;br /&gt;
'''''GET /v1/clusters/{cluster_id}'''''&lt;br /&gt;
&lt;br /&gt;
This operation synchronously returns the status and information on the specified cluster within the provided project id.&lt;br /&gt;
&lt;br /&gt;
'''Request Parameters'''&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
! Parameter !! Type !! Description&lt;br /&gt;
|-&lt;br /&gt;
| cluster_id (URI) || UUID || Cluster ID.  This value is returned when a new cluster is created.&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
'''Response Codes'''&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
! Response !! Code(s)&lt;br /&gt;
|-&lt;br /&gt;
| Normal || ok (200)&lt;br /&gt;
|-&lt;br /&gt;
| Error || unauthorized (401), itemNotFound (404)&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
'''Response Parameters'''&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
! Parameter !! Type !! Description&lt;br /&gt;
|-&lt;br /&gt;
| cluster_id || UUID || ID of requested cluster.&lt;br /&gt;
|-&lt;br /&gt;
| name || string || Name of cluster.&lt;br /&gt;
|-&lt;br /&gt;
| status || string || Current status of cluster.&lt;br /&gt;
&lt;br /&gt;
BUILDING: Cluster is in progress of being provisioned.&lt;br /&gt;
&lt;br /&gt;
ACTIVE:  Cluster is running.&lt;br /&gt;
&lt;br /&gt;
ERROR: Provisioning error(s) encountered.&lt;br /&gt;
&lt;br /&gt;
DELETED:  Cluster has been deleted.&lt;br /&gt;
|-&lt;br /&gt;
| created || string || Created time stamp in format: yyyy-mm-ddThh:mm:ssZ&lt;br /&gt;
|-&lt;br /&gt;
| updated || string || Last updated time stamp in format: yyyy-mm-ddThh:mm:ssZ&lt;br /&gt;
|-&lt;br /&gt;
| nodes(list) || node || List of nodes, which includes node id, instance state, and flavor.&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
'''JSON Request'''&lt;br /&gt;
&lt;br /&gt;
N/A&lt;br /&gt;
&lt;br /&gt;
'''JSON Response'''&lt;br /&gt;
&lt;br /&gt;
{&lt;br /&gt;
    &amp;quot;cluster&amp;quot;: {&lt;br /&gt;
        &amp;quot;cluster_id&amp;quot;: &amp;quot;dd745f4a-9333-417e-bb89-9c989c84c068&amp;quot;,&lt;br /&gt;
        &amp;quot;network_id&amp;quot;: &amp;quot;d32019d3-bc6e-4319-9c1d-6722fc136a22&amp;quot;,&lt;br /&gt;
        &amp;quot;name&amp;quot;: &amp;quot;Message Cluster 1&amp;quot;,&lt;br /&gt;
        &amp;quot;status&amp;quot;: &amp;quot;ACTIVE&amp;quot;,&lt;br /&gt;
        &amp;quot;flavor&amp;quot;: &amp;quot;large&amp;quot;,&lt;br /&gt;
        &amp;quot;size&amp;quot;: &amp;quot;3&amp;quot;,&lt;br /&gt;
        &amp;quot;volume_size&amp;quot;: &amp;quot;100&amp;quot;,&lt;br /&gt;
        &amp;quot;created&amp;quot;: &amp;quot;2014-11-11T01:02:03Z&amp;quot;,&lt;br /&gt;
        &amp;quot;updated&amp;quot;: &amp;quot;2014-11-11T01:02:03Z&amp;quot;,&lt;br /&gt;
        &amp;quot;endpoints&amp;quot;: [&lt;br /&gt;
            {&lt;br /&gt;
                &amp;quot;type&amp;quot;: &amp;quot;AMQP&amp;quot;,&lt;br /&gt;
                &amp;quot;value&amp;quot;: &amp;quot;amqp://10.20.30.40:10000&amp;quot;&lt;br /&gt;
            },&lt;br /&gt;
            {&lt;br /&gt;
                &amp;quot;type&amp;quot;: &amp;quot;console&amp;quot;,&lt;br /&gt;
                &amp;quot;value&amp;quot;: &amp;quot;http://10.20.30.40:5672&amp;quot;&lt;br /&gt;
            },&lt;br /&gt;
            {&lt;br /&gt;
                &amp;quot;type&amp;quot;: &amp;quot;AMQP&amp;quot;,&lt;br /&gt;
                &amp;quot;value&amp;quot;: &amp;quot;amqp://10.20.30.41:10000&amp;quot;&lt;br /&gt;
            },&lt;br /&gt;
            {&lt;br /&gt;
                &amp;quot;type&amp;quot;: &amp;quot;console&amp;quot;,&lt;br /&gt;
                &amp;quot;value&amp;quot;: &amp;quot;http://10.20.30.41:5672&amp;quot;&lt;br /&gt;
            },&lt;br /&gt;
            {&lt;br /&gt;
                &amp;quot;type&amp;quot;: &amp;quot;AMQP&amp;quot;,&lt;br /&gt;
                &amp;quot;value&amp;quot;: &amp;quot;amqp://10.20.30.42:10000&amp;quot;&lt;br /&gt;
            },&lt;br /&gt;
            {&lt;br /&gt;
                &amp;quot;type&amp;quot;: &amp;quot;console&amp;quot;,&lt;br /&gt;
                &amp;quot;value&amp;quot;: &amp;quot;http://10.20.30.42:5672&amp;quot;&lt;br /&gt;
            }&lt;br /&gt;
        ]&lt;br /&gt;
    }&lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
==== Delete Cluster ====&lt;br /&gt;
&lt;br /&gt;
'''''DELETE /v1/clusters/{cluster_id}'''''''&lt;br /&gt;
&lt;br /&gt;
This operation will asynchronously delete the indicated cluster within the provided project id.&lt;br /&gt;
&lt;br /&gt;
'''Request Parameters'''&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
! Parameter !! Type !! Description&lt;br /&gt;
|-&lt;br /&gt;
| cluster_id (URI) || UUID || Cluster ID.  This value is returned when a new cluster is created.&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
'''Response Codes'''&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
! Response !! Code(s)&lt;br /&gt;
|-&lt;br /&gt;
| Normal || accepted (202)&lt;br /&gt;
|-&lt;br /&gt;
| Error || unauthorized (401), itemNotFound (404)&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
'''Response Parameters'''&lt;br /&gt;
&lt;br /&gt;
N/A&lt;br /&gt;
&lt;br /&gt;
'''JSON Request'''&lt;br /&gt;
&lt;br /&gt;
N/A&lt;br /&gt;
&lt;br /&gt;
'''JSON Response'''&lt;br /&gt;
&lt;br /&gt;
N/A&lt;br /&gt;
&lt;br /&gt;
==== Update Cluster ====&lt;br /&gt;
&lt;br /&gt;
'''''PATCH /v1/clusters/{cluster_id}'''''&lt;br /&gt;
&lt;br /&gt;
This operation will asynchronously updated the indicated cluster (cluster_id) based on the request body received.  The request body structure is the same as create cluster api.  Cue will automatically detect differences and perform appropriate actions in order to update cluster accordingly.&lt;br /&gt;
&lt;br /&gt;
'''Request Parameters'''&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
! Parameter !! Type !! Description&lt;br /&gt;
|-&lt;br /&gt;
| network_id || UUID || Network Identification for a Neutron network where cluster will be created in.&lt;br /&gt;
|-&lt;br /&gt;
| name || string || Name of cluster.&lt;br /&gt;
|-&lt;br /&gt;
| flavor || string || Cluster node flavor, which specify VM type in terms of CPU/memory/disk resources (e.g. small, medium, large).&lt;br /&gt;
&lt;br /&gt;
small:  1 GHz dual-core CPU; 512 MB memory; 250 GB disk&lt;br /&gt;
&lt;br /&gt;
medium: 2.8 GHz dual-core CPU; 4 GB memory; 1 TB disk&lt;br /&gt;
&lt;br /&gt;
large: 3.6 GHz quad-core CPU; 32 GB memory; 5 TB disk&lt;br /&gt;
|-&lt;br /&gt;
| size || int || Number of nodes in cluster.&lt;br /&gt;
|-&lt;br /&gt;
| volume_size || int || Optional parameter to indicate size of volume for node instance.  If volumes are supported, then this parameter will be used.  If ephmeral disk are not supported, volume support will be required.&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
'''Response Codes'''&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
! Response !! Code(s)&lt;br /&gt;
|-&lt;br /&gt;
| Normal || 202 (accepted)&lt;br /&gt;
|-&lt;br /&gt;
| Error || badRequest (400), unauthorized (401), itemNotFound (404)&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
'''Response Parameters'''&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
! Parameter !! Type !! Description&lt;br /&gt;
|-&lt;br /&gt;
| cluster_id || UUID || ID of cluster to be created.&lt;br /&gt;
|-&lt;br /&gt;
| name || string || Name of cluster (same as provided name in request parameters).&lt;br /&gt;
|-&lt;br /&gt;
| status || string || Current status of cluster.&lt;br /&gt;
&lt;br /&gt;
BUILDING: Cluster is in progress of being provisioned.&lt;br /&gt;
&lt;br /&gt;
ACTIVE:  Cluster is running.&lt;br /&gt;
&lt;br /&gt;
ERROR: Provisioning error(s) encountered.&lt;br /&gt;
&lt;br /&gt;
DELETED:  Cluster has been deleted.&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
'''JSON Request'''&lt;br /&gt;
&lt;br /&gt;
{&lt;br /&gt;
    &amp;quot;network_id&amp;quot;: &amp;quot;d32019d3-bc6e-4319-9c1d-6722fc136a22&amp;quot;,&lt;br /&gt;
    &amp;quot;name&amp;quot;: &amp;quot;MessageCluster1&amp;quot;,&lt;br /&gt;
    &amp;quot;flavor&amp;quot;: &amp;quot;large&amp;quot;,&lt;br /&gt;
    &amp;quot;size&amp;quot;: &amp;quot;3&amp;quot;,&lt;br /&gt;
    &amp;quot;volume_size&amp;quot;: &amp;quot;100&amp;quot;&lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
'''JSON Response'''&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
{&lt;br /&gt;
    &amp;quot;cluster&amp;quot;: {&lt;br /&gt;
        &amp;quot;cluster_id&amp;quot;: &amp;quot;dd745f4a-9333-417e-bb89-9c989c84c068&amp;quot;,&lt;br /&gt;
        &amp;quot;network_id&amp;quot;: &amp;quot;d32019d3-bc6e-4319-9c1d-6722fc136a22&amp;quot;,&lt;br /&gt;
        &amp;quot;name&amp;quot;: &amp;quot;Message Cluster 1&amp;quot;,&lt;br /&gt;
        &amp;quot;status&amp;quot;: &amp;quot;BUILDING&amp;quot;,&lt;br /&gt;
        &amp;quot;flavor&amp;quot;: &amp;quot;large&amp;quot;,&lt;br /&gt;
        &amp;quot;size&amp;quot;: &amp;quot;3&amp;quot;,&lt;br /&gt;
        &amp;quot;volume_size&amp;quot;: &amp;quot;100&amp;quot;,&lt;br /&gt;
        &amp;quot;created&amp;quot;: &amp;quot;2014-11-11T01:02:03Z&amp;quot;,&lt;br /&gt;
        &amp;quot;updated&amp;quot;: &amp;quot;2014-11-11T01:02:03Z&amp;quot;&lt;br /&gt;
    }&lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
===Testing===&lt;br /&gt;
&lt;br /&gt;
Cue API testing will verify the expected functionality of the Cue user interface with both positive/negative tests.  The overall scope will cover testing from the HTTP REST request to required database interactions and work-flow task submission for RPC workers.&lt;br /&gt;
&lt;br /&gt;
====Unit Tests====&lt;br /&gt;
&lt;br /&gt;
Unit tests will verify the resulting function calls for each REST-ful URI and action(s).  The Python Mock library will be used to replace external system dependencies with placeholder objects.&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
! Function !! Tests !! Input Data !! Expected Result(s)&lt;br /&gt;
|-&lt;br /&gt;
| List Clusters || &lt;br /&gt;
# Create 'n' cluster(s), then call list clusters and verify expected return object&lt;br /&gt;
# Call list clusters when no clusters exist within a project id and verify expected return object&lt;br /&gt;
|| &lt;br /&gt;
* n = # of clusters to create&lt;br /&gt;
||&lt;br /&gt;
# List of 'n' clusters is returned with appropriate fields, HTTP Ok (200)&lt;br /&gt;
# Empty list of clusters is returned, HTTP Ok (200)&lt;br /&gt;
|-&lt;br /&gt;
| Create Cluster || &lt;br /&gt;
# Create standard cluster 'c' and verify expected return object&lt;br /&gt;
# Create cluster with invalid flavor and verify expected return value&lt;br /&gt;
# Create cluster with invalid volume size and verify expected return value&lt;br /&gt;
||&lt;br /&gt;
* n = cluster size (number of nodes)&lt;br /&gt;
* m = cluster name&lt;br /&gt;
* f = flavor&lt;br /&gt;
* s = volume size&lt;br /&gt;
* nic = Network UUID&lt;br /&gt;
||&lt;br /&gt;
# Cluster ID, name and status for newly created cluster is returned, HTTP Accepted (202)&lt;br /&gt;
# HTTP Bad request is returned (400)&lt;br /&gt;
# HTTP Bad request is returned (400)&lt;br /&gt;
|-&lt;br /&gt;
| Show Cluster ||&lt;br /&gt;
# Create cluster, then call get cluster and verify expected return object&lt;br /&gt;
# Get cluster with invalid cluster_id&lt;br /&gt;
||&lt;br /&gt;
* cluster_id = cluster ID&lt;br /&gt;
||&lt;br /&gt;
# Cluster ID, name, status, created/updated date stamp and list of nodes is returned, HTTP Ok (200).&lt;br /&gt;
# HTTP Bad request is returned (400)&lt;br /&gt;
|-&lt;br /&gt;
| Delete Cluster || &lt;br /&gt;
# Create a cluster, then call delete cluster and verify expected return value&lt;br /&gt;
# Delete cluster with invalid cluster_id&lt;br /&gt;
||&lt;br /&gt;
* cluster_id = cluster ID&lt;br /&gt;
||&lt;br /&gt;
# HTTP accepted is returned (202)&lt;br /&gt;
# HTTP Bad request is returned (400)&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
====Functional Tests====&lt;br /&gt;
&lt;br /&gt;
The functional tests will verify the HTTP REST URI request lifecycle from controller routing to HTTP response.  These tests will make use of Pecan's testing utility; pecan.testing module.&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
! Operation !! URI !! Tests !! Input Data !! Expected Data (JSON)&lt;br /&gt;
|-&lt;br /&gt;
| GET || /v1/clusters || &lt;br /&gt;
# Call when clusters exist&lt;br /&gt;
# Call when no clusters exist&lt;br /&gt;
|| &lt;br /&gt;
* n/a&lt;br /&gt;
||&lt;br /&gt;
# List of 'n' clusters is returned with appropriate fields, HTTP Ok (200)&lt;br /&gt;
# Empty list of clusters is returned, HTTP Ok (200)&lt;br /&gt;
|-&lt;br /&gt;
| POST || /v1/clusters ||&lt;br /&gt;
# Create standard cluster 'c' and verify expected return object&lt;br /&gt;
# Create cluster with invalid flavor and verify expected return value&lt;br /&gt;
# Create cluster with invalid volume size and verify expected return value&lt;br /&gt;
|| &lt;br /&gt;
* n = cluster size (number of nodes)&lt;br /&gt;
* m = cluster name&lt;br /&gt;
* f = flavor&lt;br /&gt;
* s = volume size&lt;br /&gt;
* nic = Network UUID&lt;br /&gt;
||&lt;br /&gt;
# Cluster ID, name and status for newly created cluster is returned, HTTP Accepted (202)&lt;br /&gt;
# HTTP Bad request is returned (400)&lt;br /&gt;
# HTTP Bad request is returned (400)&lt;br /&gt;
||&lt;br /&gt;
|-&lt;br /&gt;
| GET || /v1/clusters/{cluster_id} || &lt;br /&gt;
# Create cluster, then call get cluster and verify expected return object&lt;br /&gt;
# Get cluster with invalid cluster_id&lt;br /&gt;
|| &lt;br /&gt;
* cluster_id = cluster &lt;br /&gt;
||&lt;br /&gt;
# Cluster ID, name, status, created/updated date stamp and list of nodes is returned, HTTP Ok (200).&lt;br /&gt;
# HTTP Bad request is returned (400)&lt;br /&gt;
||&lt;br /&gt;
|-&lt;br /&gt;
| DELETE || /v1/clusters/{cluster_id} ||&lt;br /&gt;
# Create a cluster, then call delete cluster and verify expected return value&lt;br /&gt;
# Delete cluster with invalid cluster_id&lt;br /&gt;
||&lt;br /&gt;
* cluster_id = cluster ID&lt;br /&gt;
||&lt;br /&gt;
# HTTP accepted is returned (202)&lt;br /&gt;
# HTTP Bad request is returned (400)&lt;br /&gt;
||&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
====Integration Tests====&lt;br /&gt;
&lt;br /&gt;
The integration tests will cover API functionality from HTTP request to database access and task submission for RPC workers.  The Pecan test utility will be used to route test request URI to appropriate controllers, then database record(s) will be verified for applicable change.  Finally the creation of task objections will be verified to ensure valid task flows.&lt;/div&gt;</summary>
		<author><name>Dagnello</name></author>	</entry>

	<entry>
		<id>https://wiki.openstack.org/w/index.php?title=Cue/api_2&amp;diff=70280</id>
		<title>Cue/api 2</title>
		<link rel="alternate" type="text/html" href="https://wiki.openstack.org/w/index.php?title=Cue/api_2&amp;diff=70280"/>
				<updated>2014-12-12T23:06:32Z</updated>
		
		<summary type="html">&lt;p&gt;Dagnello: /* Create Cluster */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;== Cue API Design ==&lt;br /&gt;
=== Acronyms ===&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
! '''Acronym''' !! '''Definition'''&lt;br /&gt;
|-&lt;br /&gt;
| SSL || Secure Sockets Layer&lt;br /&gt;
|-&lt;br /&gt;
| REST || Representational State Transfer&lt;br /&gt;
|-&lt;br /&gt;
| URI || Uniform Resource Identifier&lt;br /&gt;
|-&lt;br /&gt;
| UUID || Universally Unique Identifier&lt;br /&gt;
|-&lt;br /&gt;
| AMQP || Advanced Messaging Queuing Protocol&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
=== Requirements ===&lt;br /&gt;
&lt;br /&gt;
API Requirements for Cue - Kilo timeframe.&lt;br /&gt;
&lt;br /&gt;
* Keystone integration&lt;br /&gt;
* CRUD on Cluster&lt;br /&gt;
* Cluster Management – Scale up/down&lt;br /&gt;
* Devstack integration&lt;br /&gt;
* Gate Tests&lt;br /&gt;
&lt;br /&gt;
=== System Context Diagram ===&lt;br /&gt;
&lt;br /&gt;
[[File:SCD.jpg]]&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
! '''Component''' !! '''Description'''&lt;br /&gt;
|-&lt;br /&gt;
| User || Direct customer of Cue.&lt;br /&gt;
|-&lt;br /&gt;
| Horizon || Cue functionality will be added to Horizon, which will provide a web-based portal for Cue control.&lt;br /&gt;
|-&lt;br /&gt;
| CLI || Command Line Interface to Cue, provides user access to provisioning and deploying messaging clusters.&lt;br /&gt;
|-&lt;br /&gt;
| REST_API || Provides user access to provisioning and deploying messaging clusters through REST interface.  This is a light-weight interface, provisioning and configuration of clusters/nodes is delegated to the TaskWorker process.&lt;br /&gt;
|-&lt;br /&gt;
| TaskScheduler || Used to synchronize work tasks between the REST_API and TaskWorker processes.&lt;br /&gt;
|-&lt;br /&gt;
| TaskWorker || Carries out work associated with all provisioning, configuration and management of RabbitMQ clusters and nodes.  Makes use of heat for initial provisioning/deployment.&lt;br /&gt;
|-&lt;br /&gt;
| DB || Database to store information on clusters and nodes.  Example, in cluster creation, when request is initially received through REST_API, this DB is updated accordingly and the work is delegated to TaskWorker.  TaskWorker then updates this DB as provisioning and configuration takes place.  Subsequent calls to check on status of cluster creation, will return updated information from this DB.&lt;br /&gt;
|-&lt;br /&gt;
| Heat || Used cloud instance orchestration in deploying RabbitMQ cluster images.&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
=== REST API ===&lt;br /&gt;
&lt;br /&gt;
General requirement, REST API must respond within 500ms.&lt;br /&gt;
==== List Clusters ====&lt;br /&gt;
&lt;br /&gt;
'''''GET /v1/clusters'''''&lt;br /&gt;
&lt;br /&gt;
This operation synchronously returns all clusters provisioned within the associated project id.&lt;br /&gt;
&lt;br /&gt;
'''Request Parameters'''&lt;br /&gt;
N/A&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
! Response !! Code(s)&lt;br /&gt;
|-&lt;br /&gt;
| Normal || ok (200)&lt;br /&gt;
|-&lt;br /&gt;
| Error || unauthorized (401)&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
'''Response Parameters'''&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
! Parameter !! Type !! Description&lt;br /&gt;
|-&lt;br /&gt;
| cluster(list) || string || List of clusters, detailing respective cluster id, name, status, created time stamp and updated time stamp.&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
	&lt;br /&gt;
&lt;br /&gt;
'''JSON Request'''&lt;br /&gt;
&lt;br /&gt;
N/A&lt;br /&gt;
&lt;br /&gt;
'''JSON Response'''&lt;br /&gt;
&lt;br /&gt;
{&lt;br /&gt;
    &amp;quot;clusters&amp;quot;: &amp;lt;nowiki&amp;gt;[&amp;lt;/nowiki&amp;gt;&lt;br /&gt;
        {&lt;br /&gt;
            &amp;quot;cluster_id&amp;quot;: &amp;quot;b51948c9-1ac5-4c28-a580-6f7c500d82f8&amp;quot;,&lt;br /&gt;
            &amp;quot;network_id&amp;quot;: &amp;quot;d32019d3-bc6e-4319-9c1d-6722fc136a22&amp;quot;,&lt;br /&gt;
            &amp;quot;name&amp;quot;: &amp;quot;Message Cluster 1&amp;quot;,&lt;br /&gt;
            &amp;quot;status&amp;quot;: &amp;quot;ACTIVE&amp;quot;,&lt;br /&gt;
            &amp;quot;flavor&amp;quot;: &amp;quot;medium&amp;quot;,&lt;br /&gt;
            &amp;quot;size&amp;quot;: &amp;quot;3&amp;quot;,&lt;br /&gt;
            &amp;quot;created&amp;quot;: &amp;quot;2014-11-11T01:02:03Z&amp;quot;,&lt;br /&gt;
            &amp;quot;updated&amp;quot;: &amp;quot;2014-11-11T01:02:03Z&amp;quot;&lt;br /&gt;
        },&lt;br /&gt;
        {&lt;br /&gt;
            &amp;quot;cluster_id&amp;quot;: &amp;quot;13c456c9-bbfc-4c31-b26d-3ae5c3cd7a77&amp;quot;,&lt;br /&gt;
            &amp;quot;network_id&amp;quot;: &amp;quot;d32019d3-bc6e-4319-9c1d-6722fc136a22&amp;quot;,&lt;br /&gt;
            &amp;quot;name&amp;quot;: &amp;quot;Message Cluster 2&amp;quot;,&lt;br /&gt;
            &amp;quot;status&amp;quot;: &amp;quot;BUILDING&amp;quot;,&lt;br /&gt;
            &amp;quot;flavor&amp;quot;: &amp;quot;small&amp;quot;,&lt;br /&gt;
            &amp;quot;size&amp;quot;: &amp;quot;5&amp;quot;,&lt;br /&gt;
            &amp;quot;created&amp;quot;: &amp;quot;2014-11-12T13:23:54Z&amp;quot;,&lt;br /&gt;
            &amp;quot;updated&amp;quot;: &amp;quot;2014-11-13T19:55:01Z&amp;quot;&lt;br /&gt;
        }&lt;br /&gt;
    ]&lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
==== Create Cluster ====&lt;br /&gt;
&lt;br /&gt;
'''''POST /v1/clusters'''''&lt;br /&gt;
&lt;br /&gt;
This operation asynchronously creates a new cluster of Nova instances provisioned with the required message brokers in a central project id. &lt;br /&gt;
&lt;br /&gt;
'''Request Parameters'''&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
! Parameter !! Type !! Description&lt;br /&gt;
|-&lt;br /&gt;
| network_id || UUID || Network Identification for a Neutron network where cluster will be created in.&lt;br /&gt;
|-&lt;br /&gt;
| name || string || Name of cluster.&lt;br /&gt;
|-&lt;br /&gt;
| flavor || string || Cluster node flavor, which specify VM type in terms of CPU/memory/disk resources (e.g. small, medium, large).&lt;br /&gt;
&lt;br /&gt;
small:  1 GHz dual-core CPU; 512 MB memory; 250 GB disk&lt;br /&gt;
&lt;br /&gt;
medium: 2.8 GHz dual-core CPU; 4 GB memory; 1 TB disk&lt;br /&gt;
&lt;br /&gt;
large: 3.6 GHz quad-core CPU; 32 GB memory; 5 TB disk&lt;br /&gt;
|-&lt;br /&gt;
| size || int || Number of nodes in cluster.&lt;br /&gt;
|-&lt;br /&gt;
| volume_size || int || Optional parameter to indicate size of volume for node instance.  If volumes are supported, then this parameter will be used.  If ephmeral disk are not supported, volume support will be required.&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
'''Response Codes'''&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
! Response !! Code(s)&lt;br /&gt;
|-&lt;br /&gt;
| Normal || 202 (accepted)&lt;br /&gt;
|-&lt;br /&gt;
| Error || badRequest (400), unauthorized (401), itemNotFound (404)&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
'''Response Parameters'''&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
! Parameter !! Type !! Description&lt;br /&gt;
|-&lt;br /&gt;
| cluster_id || UUID || ID of cluster to be created.&lt;br /&gt;
|-&lt;br /&gt;
| name || string || Name of cluster (same as provided name in request parameters).&lt;br /&gt;
|-&lt;br /&gt;
| status || string || Current status of cluster.&lt;br /&gt;
&lt;br /&gt;
BUILDING: Cluster is in progress of being provisioned.&lt;br /&gt;
&lt;br /&gt;
ACTIVE:  Cluster is running.&lt;br /&gt;
&lt;br /&gt;
ERROR: Provisioning error(s) encountered.&lt;br /&gt;
&lt;br /&gt;
DELETED:  Cluster has been deleted.&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
'''JSON Request'''&lt;br /&gt;
&lt;br /&gt;
{&lt;br /&gt;
    &amp;quot;network_id&amp;quot;: &amp;quot;d32019d3-bc6e-4319-9c1d-6722fc136a22&amp;quot;,&lt;br /&gt;
    &amp;quot;name&amp;quot;: &amp;quot;MessageCluster1&amp;quot;,&lt;br /&gt;
    &amp;quot;flavor&amp;quot;: &amp;quot;large&amp;quot;,&lt;br /&gt;
    &amp;quot;size&amp;quot;: &amp;quot;3&amp;quot;,&lt;br /&gt;
    &amp;quot;volume_size&amp;quot;: &amp;quot;100&amp;quot;&lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
'''JSON Response'''&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
{&lt;br /&gt;
    &amp;quot;cluster&amp;quot;: {&lt;br /&gt;
        &amp;quot;cluster_id&amp;quot;: &amp;quot;dd745f4a-9333-417e-bb89-9c989c84c068&amp;quot;,&lt;br /&gt;
        &amp;quot;network_id&amp;quot;: &amp;quot;d32019d3-bc6e-4319-9c1d-6722fc136a22&amp;quot;,&lt;br /&gt;
        &amp;quot;name&amp;quot;: &amp;quot;Message Cluster 1&amp;quot;,&lt;br /&gt;
        &amp;quot;status&amp;quot;: &amp;quot;BUILDING&amp;quot;,&lt;br /&gt;
        &amp;quot;flavor&amp;quot;: &amp;quot;large&amp;quot;,&lt;br /&gt;
        &amp;quot;size&amp;quot;: &amp;quot;3&amp;quot;,&lt;br /&gt;
        &amp;quot;volume_size&amp;quot;: &amp;quot;100&amp;quot;,&lt;br /&gt;
        &amp;quot;created&amp;quot;: &amp;quot;2014-11-11T01:02:03Z&amp;quot;,&lt;br /&gt;
        &amp;quot;updated&amp;quot;: &amp;quot;2014-11-11T01:02:03Z&amp;quot;&lt;br /&gt;
    }&lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
==== Show Cluster ====&lt;br /&gt;
&lt;br /&gt;
'''''GET /v1/clusters/{cluster_id}'''''&lt;br /&gt;
&lt;br /&gt;
This operation synchronously returns the status and information on the specified cluster within the provided project id.&lt;br /&gt;
&lt;br /&gt;
'''Request Parameters'''&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
! Parameter !! Type !! Description&lt;br /&gt;
|-&lt;br /&gt;
| cluster_id (URI) || UUID || Cluster ID.  This value is returned when a new cluster is created.&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
'''Response Codes'''&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
! Response !! Code(s)&lt;br /&gt;
|-&lt;br /&gt;
| Normal || ok (200)&lt;br /&gt;
|-&lt;br /&gt;
| Error || unauthorized (401), itemNotFound (404)&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
'''Response Parameters'''&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
! Parameter !! Type !! Description&lt;br /&gt;
|-&lt;br /&gt;
| cluster_id || UUID || ID of requested cluster.&lt;br /&gt;
|-&lt;br /&gt;
| name || string || Name of cluster.&lt;br /&gt;
|-&lt;br /&gt;
| status || string || Current status of cluster.&lt;br /&gt;
&lt;br /&gt;
BUILDING: Cluster is in progress of being provisioned.&lt;br /&gt;
&lt;br /&gt;
ACTIVE:  Cluster is running.&lt;br /&gt;
&lt;br /&gt;
ERROR: Provisioning error(s) encountered.&lt;br /&gt;
&lt;br /&gt;
DELETED:  Cluster has been deleted.&lt;br /&gt;
|-&lt;br /&gt;
| created || string || Created time stamp in format: yyyy-mm-ddThh:mm:ssZ&lt;br /&gt;
|-&lt;br /&gt;
| updated || string || Last updated time stamp in format: yyyy-mm-ddThh:mm:ssZ&lt;br /&gt;
|-&lt;br /&gt;
| nodes(list) || node || List of nodes, which includes node id, instance state, and flavor.&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
'''JSON Request'''&lt;br /&gt;
&lt;br /&gt;
N/A&lt;br /&gt;
&lt;br /&gt;
'''JSON Response'''&lt;br /&gt;
&lt;br /&gt;
{&lt;br /&gt;
    &amp;quot;cluster&amp;quot;: {&lt;br /&gt;
        &amp;quot;cluster_id&amp;quot;: &amp;quot;dd745f4a-9333-417e-bb89-9c989c84c068&amp;quot;,&lt;br /&gt;
        &amp;quot;network_id&amp;quot;: &amp;quot;d32019d3-bc6e-4319-9c1d-6722fc136a22&amp;quot;,&lt;br /&gt;
        &amp;quot;name&amp;quot;: &amp;quot;Message Cluster 1&amp;quot;,&lt;br /&gt;
        &amp;quot;status&amp;quot;: &amp;quot;ACTIVE&amp;quot;,&lt;br /&gt;
        &amp;quot;flavor&amp;quot;: &amp;quot;large&amp;quot;,&lt;br /&gt;
        &amp;quot;size&amp;quot;: &amp;quot;3&amp;quot;,&lt;br /&gt;
        &amp;quot;volume_size&amp;quot;: &amp;quot;100&amp;quot;,&lt;br /&gt;
        &amp;quot;created&amp;quot;: &amp;quot;2014-11-11T01:02:03Z&amp;quot;,&lt;br /&gt;
        &amp;quot;updated&amp;quot;: &amp;quot;2014-11-11T01:02:03Z&amp;quot;,&lt;br /&gt;
        &amp;quot;endpoints&amp;quot;: [&lt;br /&gt;
            {&lt;br /&gt;
                &amp;quot;type&amp;quot;: &amp;quot;AMQP&amp;quot;,&lt;br /&gt;
                &amp;quot;value&amp;quot;: &amp;quot;amqp://10.20.30.40:10000&amp;quot;&lt;br /&gt;
            },&lt;br /&gt;
            {&lt;br /&gt;
                &amp;quot;type&amp;quot;: &amp;quot;console&amp;quot;,&lt;br /&gt;
                &amp;quot;value&amp;quot;: &amp;quot;http://10.20.30.40:5672&amp;quot;&lt;br /&gt;
            },&lt;br /&gt;
            {&lt;br /&gt;
                &amp;quot;type&amp;quot;: &amp;quot;AMQP&amp;quot;,&lt;br /&gt;
                &amp;quot;value&amp;quot;: &amp;quot;amqp://10.20.30.41:10000&amp;quot;&lt;br /&gt;
            },&lt;br /&gt;
            {&lt;br /&gt;
                &amp;quot;type&amp;quot;: &amp;quot;console&amp;quot;,&lt;br /&gt;
                &amp;quot;value&amp;quot;: &amp;quot;http://10.20.30.41:5672&amp;quot;&lt;br /&gt;
            },&lt;br /&gt;
            {&lt;br /&gt;
                &amp;quot;type&amp;quot;: &amp;quot;AMQP&amp;quot;,&lt;br /&gt;
                &amp;quot;value&amp;quot;: &amp;quot;amqp://10.20.30.42:10000&amp;quot;&lt;br /&gt;
            },&lt;br /&gt;
            {&lt;br /&gt;
                &amp;quot;type&amp;quot;: &amp;quot;console&amp;quot;,&lt;br /&gt;
                &amp;quot;value&amp;quot;: &amp;quot;http://10.20.30.42:5672&amp;quot;&lt;br /&gt;
            }&lt;br /&gt;
        ]&lt;br /&gt;
    }&lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
==== Delete Cluster ====&lt;br /&gt;
&lt;br /&gt;
'''''DELETE /v1/clusters/{cluster_id}'''''''&lt;br /&gt;
&lt;br /&gt;
This operation will asynchronously delete the indicated cluster within the provided project id.&lt;br /&gt;
&lt;br /&gt;
'''Request Parameters'''&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
! Parameter !! Type !! Description&lt;br /&gt;
|-&lt;br /&gt;
| cluster_id (URI) || UUID || Cluster ID.  This value is returned when a new cluster is created.&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
'''Response Codes'''&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
! Response !! Code(s)&lt;br /&gt;
|-&lt;br /&gt;
| Normal || accepted (202)&lt;br /&gt;
|-&lt;br /&gt;
| Error || unauthorized (401), itemNotFound (404)&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
'''Response Parameters'''&lt;br /&gt;
&lt;br /&gt;
N/A&lt;br /&gt;
&lt;br /&gt;
'''JSON Request'''&lt;br /&gt;
&lt;br /&gt;
N/A&lt;br /&gt;
&lt;br /&gt;
'''JSON Response'''&lt;br /&gt;
&lt;br /&gt;
N/A&lt;br /&gt;
&lt;br /&gt;
==== Update Cluster ====&lt;br /&gt;
&lt;br /&gt;
'''''PATCH /v1/clusters/{cluster_id}'''''&lt;br /&gt;
&lt;br /&gt;
This operation will asynchronously updated the indicated cluster (cluster_id) based on the request body received.  The request body structure is the same as create cluster api.  Cue will automatically detect differences and perform appropriate actions in order to update cluster accordingly.&lt;br /&gt;
&lt;br /&gt;
'''Request Parameters'''&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
! Parameter !! Type !! Description&lt;br /&gt;
|-&lt;br /&gt;
| network id || UUID || Network Identification for a Neutron network where cluster will be created in.&lt;br /&gt;
|-&lt;br /&gt;
| name || string || Name of cluster.&lt;br /&gt;
|-&lt;br /&gt;
| flavor || string || Cluster node flavor, which specify VM type in terms of CPU/memory/disk resources (e.g. small, medium, large).&lt;br /&gt;
&lt;br /&gt;
small:  1 GHz dual-core CPU; 512 MB memory; 250 GB disk&lt;br /&gt;
&lt;br /&gt;
medium: 2.8 GHz dual-core CPU; 4 GB memory; 1 TB disk&lt;br /&gt;
&lt;br /&gt;
large: 3.6 GHz quad-core CPU; 32 GB memory; 5 TB disk&lt;br /&gt;
|-&lt;br /&gt;
| size || int || Number of nodes in cluster.&lt;br /&gt;
|-&lt;br /&gt;
| volume_size || int || Optional parameter to indicate size of volume for node instance.  If volumes are supported, then this parameter will be used.  If ephmeral disk are not supported, volume support will be required.&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
'''Response Codes'''&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
! Response !! Code(s)&lt;br /&gt;
|-&lt;br /&gt;
| Normal || 202 (accepted)&lt;br /&gt;
|-&lt;br /&gt;
| Error || badRequest (400), unauthorized (401), itemNotFound (404)&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
'''Response Parameters'''&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
! Parameter !! Type !! Description&lt;br /&gt;
|-&lt;br /&gt;
| cluster_id || UUID || ID of cluster to be created.&lt;br /&gt;
|-&lt;br /&gt;
| name || string || Name of cluster (same as provided name in request parameters).&lt;br /&gt;
|-&lt;br /&gt;
| status || string || Current status of cluster.&lt;br /&gt;
&lt;br /&gt;
BUILDING: Cluster is in progress of being provisioned.&lt;br /&gt;
&lt;br /&gt;
ACTIVE:  Cluster is running.&lt;br /&gt;
&lt;br /&gt;
ERROR: Provisioning error(s) encountered.&lt;br /&gt;
&lt;br /&gt;
DELETED:  Cluster has been deleted.&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
'''JSON Request'''&lt;br /&gt;
&lt;br /&gt;
{&lt;br /&gt;
    &amp;quot;network_id&amp;quot;: &amp;quot;d32019d3-bc6e-4319-9c1d-6722fc136a22&amp;quot;,&lt;br /&gt;
    &amp;quot;name&amp;quot;: &amp;quot;MessageCluster1&amp;quot;,&lt;br /&gt;
    &amp;quot;flavor&amp;quot;: &amp;quot;large&amp;quot;,&lt;br /&gt;
    &amp;quot;size&amp;quot;: &amp;quot;3&amp;quot;,&lt;br /&gt;
    &amp;quot;volume_size&amp;quot;: &amp;quot;100&amp;quot;&lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
'''JSON Response'''&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
{&lt;br /&gt;
    &amp;quot;cluster&amp;quot;: {&lt;br /&gt;
        &amp;quot;cluster_id&amp;quot;: &amp;quot;dd745f4a-9333-417e-bb89-9c989c84c068&amp;quot;,&lt;br /&gt;
        &amp;quot;network_id&amp;quot;: &amp;quot;d32019d3-bc6e-4319-9c1d-6722fc136a22&amp;quot;,&lt;br /&gt;
        &amp;quot;name&amp;quot;: &amp;quot;Message Cluster 1&amp;quot;,&lt;br /&gt;
        &amp;quot;status&amp;quot;: &amp;quot;BUILDING&amp;quot;,&lt;br /&gt;
        &amp;quot;flavor&amp;quot;: &amp;quot;large&amp;quot;,&lt;br /&gt;
        &amp;quot;size&amp;quot;: &amp;quot;3&amp;quot;,&lt;br /&gt;
        &amp;quot;volume_size&amp;quot;: &amp;quot;100&amp;quot;,&lt;br /&gt;
        &amp;quot;created&amp;quot;: &amp;quot;2014-11-11T01:02:03Z&amp;quot;,&lt;br /&gt;
        &amp;quot;updated&amp;quot;: &amp;quot;2014-11-11T01:02:03Z&amp;quot;&lt;br /&gt;
    }&lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
===Testing===&lt;br /&gt;
&lt;br /&gt;
Cue API testing will verify the expected functionality of the Cue user interface with both positive/negative tests.  The overall scope will cover testing from the HTTP REST request to required database interactions and work-flow task submission for RPC workers.&lt;br /&gt;
&lt;br /&gt;
====Unit Tests====&lt;br /&gt;
&lt;br /&gt;
Unit tests will verify the resulting function calls for each REST-ful URI and action(s).  The Python Mock library will be used to replace external system dependencies with placeholder objects.&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
! Function !! Tests !! Input Data !! Expected Result(s)&lt;br /&gt;
|-&lt;br /&gt;
| List Clusters || &lt;br /&gt;
# Create 'n' cluster(s), then call list clusters and verify expected return object&lt;br /&gt;
# Call list clusters when no clusters exist within a project id and verify expected return object&lt;br /&gt;
|| &lt;br /&gt;
* n = # of clusters to create&lt;br /&gt;
||&lt;br /&gt;
# List of 'n' clusters is returned with appropriate fields, HTTP Ok (200)&lt;br /&gt;
# Empty list of clusters is returned, HTTP Ok (200)&lt;br /&gt;
|-&lt;br /&gt;
| Create Cluster || &lt;br /&gt;
# Create standard cluster 'c' and verify expected return object&lt;br /&gt;
# Create cluster with invalid flavor and verify expected return value&lt;br /&gt;
# Create cluster with invalid volume size and verify expected return value&lt;br /&gt;
||&lt;br /&gt;
* n = cluster size (number of nodes)&lt;br /&gt;
* m = cluster name&lt;br /&gt;
* f = flavor&lt;br /&gt;
* s = volume size&lt;br /&gt;
* nic = Network UUID&lt;br /&gt;
||&lt;br /&gt;
# Cluster ID, name and status for newly created cluster is returned, HTTP Accepted (202)&lt;br /&gt;
# HTTP Bad request is returned (400)&lt;br /&gt;
# HTTP Bad request is returned (400)&lt;br /&gt;
|-&lt;br /&gt;
| Show Cluster ||&lt;br /&gt;
# Create cluster, then call get cluster and verify expected return object&lt;br /&gt;
# Get cluster with invalid cluster_id&lt;br /&gt;
||&lt;br /&gt;
* cluster_id = cluster ID&lt;br /&gt;
||&lt;br /&gt;
# Cluster ID, name, status, created/updated date stamp and list of nodes is returned, HTTP Ok (200).&lt;br /&gt;
# HTTP Bad request is returned (400)&lt;br /&gt;
|-&lt;br /&gt;
| Delete Cluster || &lt;br /&gt;
# Create a cluster, then call delete cluster and verify expected return value&lt;br /&gt;
# Delete cluster with invalid cluster_id&lt;br /&gt;
||&lt;br /&gt;
* cluster_id = cluster ID&lt;br /&gt;
||&lt;br /&gt;
# HTTP accepted is returned (202)&lt;br /&gt;
# HTTP Bad request is returned (400)&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
====Functional Tests====&lt;br /&gt;
&lt;br /&gt;
The functional tests will verify the HTTP REST URI request lifecycle from controller routing to HTTP response.  These tests will make use of Pecan's testing utility; pecan.testing module.&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
! Operation !! URI !! Tests !! Input Data !! Expected Data (JSON)&lt;br /&gt;
|-&lt;br /&gt;
| GET || /v1/clusters || &lt;br /&gt;
# Call when clusters exist&lt;br /&gt;
# Call when no clusters exist&lt;br /&gt;
|| &lt;br /&gt;
* n/a&lt;br /&gt;
||&lt;br /&gt;
# List of 'n' clusters is returned with appropriate fields, HTTP Ok (200)&lt;br /&gt;
# Empty list of clusters is returned, HTTP Ok (200)&lt;br /&gt;
|-&lt;br /&gt;
| POST || /v1/clusters ||&lt;br /&gt;
# Create standard cluster 'c' and verify expected return object&lt;br /&gt;
# Create cluster with invalid flavor and verify expected return value&lt;br /&gt;
# Create cluster with invalid volume size and verify expected return value&lt;br /&gt;
|| &lt;br /&gt;
* n = cluster size (number of nodes)&lt;br /&gt;
* m = cluster name&lt;br /&gt;
* f = flavor&lt;br /&gt;
* s = volume size&lt;br /&gt;
* nic = Network UUID&lt;br /&gt;
||&lt;br /&gt;
# Cluster ID, name and status for newly created cluster is returned, HTTP Accepted (202)&lt;br /&gt;
# HTTP Bad request is returned (400)&lt;br /&gt;
# HTTP Bad request is returned (400)&lt;br /&gt;
||&lt;br /&gt;
|-&lt;br /&gt;
| GET || /v1/clusters/{cluster_id} || &lt;br /&gt;
# Create cluster, then call get cluster and verify expected return object&lt;br /&gt;
# Get cluster with invalid cluster_id&lt;br /&gt;
|| &lt;br /&gt;
* cluster_id = cluster &lt;br /&gt;
||&lt;br /&gt;
# Cluster ID, name, status, created/updated date stamp and list of nodes is returned, HTTP Ok (200).&lt;br /&gt;
# HTTP Bad request is returned (400)&lt;br /&gt;
||&lt;br /&gt;
|-&lt;br /&gt;
| DELETE || /v1/clusters/{cluster_id} ||&lt;br /&gt;
# Create a cluster, then call delete cluster and verify expected return value&lt;br /&gt;
# Delete cluster with invalid cluster_id&lt;br /&gt;
||&lt;br /&gt;
* cluster_id = cluster ID&lt;br /&gt;
||&lt;br /&gt;
# HTTP accepted is returned (202)&lt;br /&gt;
# HTTP Bad request is returned (400)&lt;br /&gt;
||&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
====Integration Tests====&lt;br /&gt;
&lt;br /&gt;
The integration tests will cover API functionality from HTTP request to database access and task submission for RPC workers.  The Pecan test utility will be used to route test request URI to appropriate controllers, then database record(s) will be verified for applicable change.  Finally the creation of task objections will be verified to ensure valid task flows.&lt;/div&gt;</summary>
		<author><name>Dagnello</name></author>	</entry>

	<entry>
		<id>https://wiki.openstack.org/w/index.php?title=Cue/api_2&amp;diff=70279</id>
		<title>Cue/api 2</title>
		<link rel="alternate" type="text/html" href="https://wiki.openstack.org/w/index.php?title=Cue/api_2&amp;diff=70279"/>
				<updated>2014-12-12T23:06:08Z</updated>
		
		<summary type="html">&lt;p&gt;Dagnello: /* Update Cluster */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;== Cue API Design ==&lt;br /&gt;
=== Acronyms ===&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
! '''Acronym''' !! '''Definition'''&lt;br /&gt;
|-&lt;br /&gt;
| SSL || Secure Sockets Layer&lt;br /&gt;
|-&lt;br /&gt;
| REST || Representational State Transfer&lt;br /&gt;
|-&lt;br /&gt;
| URI || Uniform Resource Identifier&lt;br /&gt;
|-&lt;br /&gt;
| UUID || Universally Unique Identifier&lt;br /&gt;
|-&lt;br /&gt;
| AMQP || Advanced Messaging Queuing Protocol&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
=== Requirements ===&lt;br /&gt;
&lt;br /&gt;
API Requirements for Cue - Kilo timeframe.&lt;br /&gt;
&lt;br /&gt;
* Keystone integration&lt;br /&gt;
* CRUD on Cluster&lt;br /&gt;
* Cluster Management – Scale up/down&lt;br /&gt;
* Devstack integration&lt;br /&gt;
* Gate Tests&lt;br /&gt;
&lt;br /&gt;
=== System Context Diagram ===&lt;br /&gt;
&lt;br /&gt;
[[File:SCD.jpg]]&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
! '''Component''' !! '''Description'''&lt;br /&gt;
|-&lt;br /&gt;
| User || Direct customer of Cue.&lt;br /&gt;
|-&lt;br /&gt;
| Horizon || Cue functionality will be added to Horizon, which will provide a web-based portal for Cue control.&lt;br /&gt;
|-&lt;br /&gt;
| CLI || Command Line Interface to Cue, provides user access to provisioning and deploying messaging clusters.&lt;br /&gt;
|-&lt;br /&gt;
| REST_API || Provides user access to provisioning and deploying messaging clusters through REST interface.  This is a light-weight interface, provisioning and configuration of clusters/nodes is delegated to the TaskWorker process.&lt;br /&gt;
|-&lt;br /&gt;
| TaskScheduler || Used to synchronize work tasks between the REST_API and TaskWorker processes.&lt;br /&gt;
|-&lt;br /&gt;
| TaskWorker || Carries out work associated with all provisioning, configuration and management of RabbitMQ clusters and nodes.  Makes use of heat for initial provisioning/deployment.&lt;br /&gt;
|-&lt;br /&gt;
| DB || Database to store information on clusters and nodes.  Example, in cluster creation, when request is initially received through REST_API, this DB is updated accordingly and the work is delegated to TaskWorker.  TaskWorker then updates this DB as provisioning and configuration takes place.  Subsequent calls to check on status of cluster creation, will return updated information from this DB.&lt;br /&gt;
|-&lt;br /&gt;
| Heat || Used cloud instance orchestration in deploying RabbitMQ cluster images.&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
=== REST API ===&lt;br /&gt;
&lt;br /&gt;
General requirement, REST API must respond within 500ms.&lt;br /&gt;
==== List Clusters ====&lt;br /&gt;
&lt;br /&gt;
'''''GET /v1/clusters'''''&lt;br /&gt;
&lt;br /&gt;
This operation synchronously returns all clusters provisioned within the associated project id.&lt;br /&gt;
&lt;br /&gt;
'''Request Parameters'''&lt;br /&gt;
N/A&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
! Response !! Code(s)&lt;br /&gt;
|-&lt;br /&gt;
| Normal || ok (200)&lt;br /&gt;
|-&lt;br /&gt;
| Error || unauthorized (401)&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
'''Response Parameters'''&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
! Parameter !! Type !! Description&lt;br /&gt;
|-&lt;br /&gt;
| cluster(list) || string || List of clusters, detailing respective cluster id, name, status, created time stamp and updated time stamp.&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
	&lt;br /&gt;
&lt;br /&gt;
'''JSON Request'''&lt;br /&gt;
&lt;br /&gt;
N/A&lt;br /&gt;
&lt;br /&gt;
'''JSON Response'''&lt;br /&gt;
&lt;br /&gt;
{&lt;br /&gt;
    &amp;quot;clusters&amp;quot;: &amp;lt;nowiki&amp;gt;[&amp;lt;/nowiki&amp;gt;&lt;br /&gt;
        {&lt;br /&gt;
            &amp;quot;cluster_id&amp;quot;: &amp;quot;b51948c9-1ac5-4c28-a580-6f7c500d82f8&amp;quot;,&lt;br /&gt;
            &amp;quot;network_id&amp;quot;: &amp;quot;d32019d3-bc6e-4319-9c1d-6722fc136a22&amp;quot;,&lt;br /&gt;
            &amp;quot;name&amp;quot;: &amp;quot;Message Cluster 1&amp;quot;,&lt;br /&gt;
            &amp;quot;status&amp;quot;: &amp;quot;ACTIVE&amp;quot;,&lt;br /&gt;
            &amp;quot;flavor&amp;quot;: &amp;quot;medium&amp;quot;,&lt;br /&gt;
            &amp;quot;size&amp;quot;: &amp;quot;3&amp;quot;,&lt;br /&gt;
            &amp;quot;created&amp;quot;: &amp;quot;2014-11-11T01:02:03Z&amp;quot;,&lt;br /&gt;
            &amp;quot;updated&amp;quot;: &amp;quot;2014-11-11T01:02:03Z&amp;quot;&lt;br /&gt;
        },&lt;br /&gt;
        {&lt;br /&gt;
            &amp;quot;cluster_id&amp;quot;: &amp;quot;13c456c9-bbfc-4c31-b26d-3ae5c3cd7a77&amp;quot;,&lt;br /&gt;
            &amp;quot;network_id&amp;quot;: &amp;quot;d32019d3-bc6e-4319-9c1d-6722fc136a22&amp;quot;,&lt;br /&gt;
            &amp;quot;name&amp;quot;: &amp;quot;Message Cluster 2&amp;quot;,&lt;br /&gt;
            &amp;quot;status&amp;quot;: &amp;quot;BUILDING&amp;quot;,&lt;br /&gt;
            &amp;quot;flavor&amp;quot;: &amp;quot;small&amp;quot;,&lt;br /&gt;
            &amp;quot;size&amp;quot;: &amp;quot;5&amp;quot;,&lt;br /&gt;
            &amp;quot;created&amp;quot;: &amp;quot;2014-11-12T13:23:54Z&amp;quot;,&lt;br /&gt;
            &amp;quot;updated&amp;quot;: &amp;quot;2014-11-13T19:55:01Z&amp;quot;&lt;br /&gt;
        }&lt;br /&gt;
    ]&lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
==== Create Cluster ====&lt;br /&gt;
&lt;br /&gt;
'''''POST /v1/clusters'''''&lt;br /&gt;
&lt;br /&gt;
This operation asynchronously creates a new cluster of Nova instances provisioned with the required message brokers in a central project id. &lt;br /&gt;
&lt;br /&gt;
'''Request Parameters'''&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
! Parameter !! Type !! Description&lt;br /&gt;
|-&lt;br /&gt;
| network id || UUID || Network Identification for a Neutron network where cluster will be created in.&lt;br /&gt;
|-&lt;br /&gt;
| name || string || Name of cluster.&lt;br /&gt;
|-&lt;br /&gt;
| flavor || string || Cluster node flavor, which specify VM type in terms of CPU/memory/disk resources (e.g. small, medium, large).&lt;br /&gt;
&lt;br /&gt;
small:  1 GHz dual-core CPU; 512 MB memory; 250 GB disk&lt;br /&gt;
&lt;br /&gt;
medium: 2.8 GHz dual-core CPU; 4 GB memory; 1 TB disk&lt;br /&gt;
&lt;br /&gt;
large: 3.6 GHz quad-core CPU; 32 GB memory; 5 TB disk&lt;br /&gt;
|-&lt;br /&gt;
| size || int || Number of nodes in cluster.&lt;br /&gt;
|-&lt;br /&gt;
| volume_size || int || Optional parameter to indicate size of volume for node instance.  If volumes are supported, then this parameter will be used.  If ephmeral disk are not supported, volume support will be required.&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
'''Response Codes'''&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
! Response !! Code(s)&lt;br /&gt;
|-&lt;br /&gt;
| Normal || 202 (accepted)&lt;br /&gt;
|-&lt;br /&gt;
| Error || badRequest (400), unauthorized (401), itemNotFound (404)&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
'''Response Parameters'''&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
! Parameter !! Type !! Description&lt;br /&gt;
|-&lt;br /&gt;
| cluster_id || UUID || ID of cluster to be created.&lt;br /&gt;
|-&lt;br /&gt;
| name || string || Name of cluster (same as provided name in request parameters).&lt;br /&gt;
|-&lt;br /&gt;
| status || string || Current status of cluster.&lt;br /&gt;
&lt;br /&gt;
BUILDING: Cluster is in progress of being provisioned.&lt;br /&gt;
&lt;br /&gt;
ACTIVE:  Cluster is running.&lt;br /&gt;
&lt;br /&gt;
ERROR: Provisioning error(s) encountered.&lt;br /&gt;
&lt;br /&gt;
DELETED:  Cluster has been deleted.&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
'''JSON Request'''&lt;br /&gt;
&lt;br /&gt;
{&lt;br /&gt;
    &amp;quot;network_id&amp;quot;: &amp;quot;d32019d3-bc6e-4319-9c1d-6722fc136a22&amp;quot;,&lt;br /&gt;
    &amp;quot;name&amp;quot;: &amp;quot;MessageCluster1&amp;quot;,&lt;br /&gt;
    &amp;quot;flavor&amp;quot;: &amp;quot;large&amp;quot;,&lt;br /&gt;
    &amp;quot;size&amp;quot;: &amp;quot;3&amp;quot;,&lt;br /&gt;
    &amp;quot;volume_size&amp;quot;: &amp;quot;100&amp;quot;&lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
'''JSON Response'''&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
{&lt;br /&gt;
    &amp;quot;cluster&amp;quot;: {&lt;br /&gt;
        &amp;quot;cluster_id&amp;quot;: &amp;quot;dd745f4a-9333-417e-bb89-9c989c84c068&amp;quot;,&lt;br /&gt;
        &amp;quot;network_id&amp;quot;: &amp;quot;d32019d3-bc6e-4319-9c1d-6722fc136a22&amp;quot;,&lt;br /&gt;
        &amp;quot;name&amp;quot;: &amp;quot;Message Cluster 1&amp;quot;,&lt;br /&gt;
        &amp;quot;status&amp;quot;: &amp;quot;BUILDING&amp;quot;,&lt;br /&gt;
        &amp;quot;flavor&amp;quot;: &amp;quot;large&amp;quot;,&lt;br /&gt;
        &amp;quot;size&amp;quot;: &amp;quot;3&amp;quot;,&lt;br /&gt;
        &amp;quot;volume_size&amp;quot;: &amp;quot;100&amp;quot;,&lt;br /&gt;
        &amp;quot;created&amp;quot;: &amp;quot;2014-11-11T01:02:03Z&amp;quot;,&lt;br /&gt;
        &amp;quot;updated&amp;quot;: &amp;quot;2014-11-11T01:02:03Z&amp;quot;&lt;br /&gt;
    }&lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
==== Show Cluster ====&lt;br /&gt;
&lt;br /&gt;
'''''GET /v1/clusters/{cluster_id}'''''&lt;br /&gt;
&lt;br /&gt;
This operation synchronously returns the status and information on the specified cluster within the provided project id.&lt;br /&gt;
&lt;br /&gt;
'''Request Parameters'''&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
! Parameter !! Type !! Description&lt;br /&gt;
|-&lt;br /&gt;
| cluster_id (URI) || UUID || Cluster ID.  This value is returned when a new cluster is created.&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
'''Response Codes'''&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
! Response !! Code(s)&lt;br /&gt;
|-&lt;br /&gt;
| Normal || ok (200)&lt;br /&gt;
|-&lt;br /&gt;
| Error || unauthorized (401), itemNotFound (404)&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
'''Response Parameters'''&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
! Parameter !! Type !! Description&lt;br /&gt;
|-&lt;br /&gt;
| cluster_id || UUID || ID of requested cluster.&lt;br /&gt;
|-&lt;br /&gt;
| name || string || Name of cluster.&lt;br /&gt;
|-&lt;br /&gt;
| status || string || Current status of cluster.&lt;br /&gt;
&lt;br /&gt;
BUILDING: Cluster is in progress of being provisioned.&lt;br /&gt;
&lt;br /&gt;
ACTIVE:  Cluster is running.&lt;br /&gt;
&lt;br /&gt;
ERROR: Provisioning error(s) encountered.&lt;br /&gt;
&lt;br /&gt;
DELETED:  Cluster has been deleted.&lt;br /&gt;
|-&lt;br /&gt;
| created || string || Created time stamp in format: yyyy-mm-ddThh:mm:ssZ&lt;br /&gt;
|-&lt;br /&gt;
| updated || string || Last updated time stamp in format: yyyy-mm-ddThh:mm:ssZ&lt;br /&gt;
|-&lt;br /&gt;
| nodes(list) || node || List of nodes, which includes node id, instance state, and flavor.&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
'''JSON Request'''&lt;br /&gt;
&lt;br /&gt;
N/A&lt;br /&gt;
&lt;br /&gt;
'''JSON Response'''&lt;br /&gt;
&lt;br /&gt;
{&lt;br /&gt;
    &amp;quot;cluster&amp;quot;: {&lt;br /&gt;
        &amp;quot;cluster_id&amp;quot;: &amp;quot;dd745f4a-9333-417e-bb89-9c989c84c068&amp;quot;,&lt;br /&gt;
        &amp;quot;network_id&amp;quot;: &amp;quot;d32019d3-bc6e-4319-9c1d-6722fc136a22&amp;quot;,&lt;br /&gt;
        &amp;quot;name&amp;quot;: &amp;quot;Message Cluster 1&amp;quot;,&lt;br /&gt;
        &amp;quot;status&amp;quot;: &amp;quot;ACTIVE&amp;quot;,&lt;br /&gt;
        &amp;quot;flavor&amp;quot;: &amp;quot;large&amp;quot;,&lt;br /&gt;
        &amp;quot;size&amp;quot;: &amp;quot;3&amp;quot;,&lt;br /&gt;
        &amp;quot;volume_size&amp;quot;: &amp;quot;100&amp;quot;,&lt;br /&gt;
        &amp;quot;created&amp;quot;: &amp;quot;2014-11-11T01:02:03Z&amp;quot;,&lt;br /&gt;
        &amp;quot;updated&amp;quot;: &amp;quot;2014-11-11T01:02:03Z&amp;quot;,&lt;br /&gt;
        &amp;quot;endpoints&amp;quot;: [&lt;br /&gt;
            {&lt;br /&gt;
                &amp;quot;type&amp;quot;: &amp;quot;AMQP&amp;quot;,&lt;br /&gt;
                &amp;quot;value&amp;quot;: &amp;quot;amqp://10.20.30.40:10000&amp;quot;&lt;br /&gt;
            },&lt;br /&gt;
            {&lt;br /&gt;
                &amp;quot;type&amp;quot;: &amp;quot;console&amp;quot;,&lt;br /&gt;
                &amp;quot;value&amp;quot;: &amp;quot;http://10.20.30.40:5672&amp;quot;&lt;br /&gt;
            },&lt;br /&gt;
            {&lt;br /&gt;
                &amp;quot;type&amp;quot;: &amp;quot;AMQP&amp;quot;,&lt;br /&gt;
                &amp;quot;value&amp;quot;: &amp;quot;amqp://10.20.30.41:10000&amp;quot;&lt;br /&gt;
            },&lt;br /&gt;
            {&lt;br /&gt;
                &amp;quot;type&amp;quot;: &amp;quot;console&amp;quot;,&lt;br /&gt;
                &amp;quot;value&amp;quot;: &amp;quot;http://10.20.30.41:5672&amp;quot;&lt;br /&gt;
            },&lt;br /&gt;
            {&lt;br /&gt;
                &amp;quot;type&amp;quot;: &amp;quot;AMQP&amp;quot;,&lt;br /&gt;
                &amp;quot;value&amp;quot;: &amp;quot;amqp://10.20.30.42:10000&amp;quot;&lt;br /&gt;
            },&lt;br /&gt;
            {&lt;br /&gt;
                &amp;quot;type&amp;quot;: &amp;quot;console&amp;quot;,&lt;br /&gt;
                &amp;quot;value&amp;quot;: &amp;quot;http://10.20.30.42:5672&amp;quot;&lt;br /&gt;
            }&lt;br /&gt;
        ]&lt;br /&gt;
    }&lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
==== Delete Cluster ====&lt;br /&gt;
&lt;br /&gt;
'''''DELETE /v1/clusters/{cluster_id}'''''''&lt;br /&gt;
&lt;br /&gt;
This operation will asynchronously delete the indicated cluster within the provided project id.&lt;br /&gt;
&lt;br /&gt;
'''Request Parameters'''&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
! Parameter !! Type !! Description&lt;br /&gt;
|-&lt;br /&gt;
| cluster_id (URI) || UUID || Cluster ID.  This value is returned when a new cluster is created.&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
'''Response Codes'''&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
! Response !! Code(s)&lt;br /&gt;
|-&lt;br /&gt;
| Normal || accepted (202)&lt;br /&gt;
|-&lt;br /&gt;
| Error || unauthorized (401), itemNotFound (404)&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
'''Response Parameters'''&lt;br /&gt;
&lt;br /&gt;
N/A&lt;br /&gt;
&lt;br /&gt;
'''JSON Request'''&lt;br /&gt;
&lt;br /&gt;
N/A&lt;br /&gt;
&lt;br /&gt;
'''JSON Response'''&lt;br /&gt;
&lt;br /&gt;
N/A&lt;br /&gt;
&lt;br /&gt;
==== Update Cluster ====&lt;br /&gt;
&lt;br /&gt;
'''''PATCH /v1/clusters/{cluster_id}'''''&lt;br /&gt;
&lt;br /&gt;
This operation will asynchronously updated the indicated cluster (cluster_id) based on the request body received.  The request body structure is the same as create cluster api.  Cue will automatically detect differences and perform appropriate actions in order to update cluster accordingly.&lt;br /&gt;
&lt;br /&gt;
'''Request Parameters'''&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
! Parameter !! Type !! Description&lt;br /&gt;
|-&lt;br /&gt;
| network id || UUID || Network Identification for a Neutron network where cluster will be created in.&lt;br /&gt;
|-&lt;br /&gt;
| name || string || Name of cluster.&lt;br /&gt;
|-&lt;br /&gt;
| flavor || string || Cluster node flavor, which specify VM type in terms of CPU/memory/disk resources (e.g. small, medium, large).&lt;br /&gt;
&lt;br /&gt;
small:  1 GHz dual-core CPU; 512 MB memory; 250 GB disk&lt;br /&gt;
&lt;br /&gt;
medium: 2.8 GHz dual-core CPU; 4 GB memory; 1 TB disk&lt;br /&gt;
&lt;br /&gt;
large: 3.6 GHz quad-core CPU; 32 GB memory; 5 TB disk&lt;br /&gt;
|-&lt;br /&gt;
| size || int || Number of nodes in cluster.&lt;br /&gt;
|-&lt;br /&gt;
| volume_size || int || Optional parameter to indicate size of volume for node instance.  If volumes are supported, then this parameter will be used.  If ephmeral disk are not supported, volume support will be required.&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
'''Response Codes'''&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
! Response !! Code(s)&lt;br /&gt;
|-&lt;br /&gt;
| Normal || 202 (accepted)&lt;br /&gt;
|-&lt;br /&gt;
| Error || badRequest (400), unauthorized (401), itemNotFound (404)&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
'''Response Parameters'''&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
! Parameter !! Type !! Description&lt;br /&gt;
|-&lt;br /&gt;
| cluster_id || UUID || ID of cluster to be created.&lt;br /&gt;
|-&lt;br /&gt;
| name || string || Name of cluster (same as provided name in request parameters).&lt;br /&gt;
|-&lt;br /&gt;
| status || string || Current status of cluster.&lt;br /&gt;
&lt;br /&gt;
BUILDING: Cluster is in progress of being provisioned.&lt;br /&gt;
&lt;br /&gt;
ACTIVE:  Cluster is running.&lt;br /&gt;
&lt;br /&gt;
ERROR: Provisioning error(s) encountered.&lt;br /&gt;
&lt;br /&gt;
DELETED:  Cluster has been deleted.&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
'''JSON Request'''&lt;br /&gt;
&lt;br /&gt;
{&lt;br /&gt;
    &amp;quot;network_id&amp;quot;: &amp;quot;d32019d3-bc6e-4319-9c1d-6722fc136a22&amp;quot;,&lt;br /&gt;
    &amp;quot;name&amp;quot;: &amp;quot;MessageCluster1&amp;quot;,&lt;br /&gt;
    &amp;quot;flavor&amp;quot;: &amp;quot;large&amp;quot;,&lt;br /&gt;
    &amp;quot;size&amp;quot;: &amp;quot;3&amp;quot;,&lt;br /&gt;
    &amp;quot;volume_size&amp;quot;: &amp;quot;100&amp;quot;&lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
'''JSON Response'''&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
{&lt;br /&gt;
    &amp;quot;cluster&amp;quot;: {&lt;br /&gt;
        &amp;quot;cluster_id&amp;quot;: &amp;quot;dd745f4a-9333-417e-bb89-9c989c84c068&amp;quot;,&lt;br /&gt;
        &amp;quot;network_id&amp;quot;: &amp;quot;d32019d3-bc6e-4319-9c1d-6722fc136a22&amp;quot;,&lt;br /&gt;
        &amp;quot;name&amp;quot;: &amp;quot;Message Cluster 1&amp;quot;,&lt;br /&gt;
        &amp;quot;status&amp;quot;: &amp;quot;BUILDING&amp;quot;,&lt;br /&gt;
        &amp;quot;flavor&amp;quot;: &amp;quot;large&amp;quot;,&lt;br /&gt;
        &amp;quot;size&amp;quot;: &amp;quot;3&amp;quot;,&lt;br /&gt;
        &amp;quot;volume_size&amp;quot;: &amp;quot;100&amp;quot;,&lt;br /&gt;
        &amp;quot;created&amp;quot;: &amp;quot;2014-11-11T01:02:03Z&amp;quot;,&lt;br /&gt;
        &amp;quot;updated&amp;quot;: &amp;quot;2014-11-11T01:02:03Z&amp;quot;&lt;br /&gt;
    }&lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
===Testing===&lt;br /&gt;
&lt;br /&gt;
Cue API testing will verify the expected functionality of the Cue user interface with both positive/negative tests.  The overall scope will cover testing from the HTTP REST request to required database interactions and work-flow task submission for RPC workers.&lt;br /&gt;
&lt;br /&gt;
====Unit Tests====&lt;br /&gt;
&lt;br /&gt;
Unit tests will verify the resulting function calls for each REST-ful URI and action(s).  The Python Mock library will be used to replace external system dependencies with placeholder objects.&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
! Function !! Tests !! Input Data !! Expected Result(s)&lt;br /&gt;
|-&lt;br /&gt;
| List Clusters || &lt;br /&gt;
# Create 'n' cluster(s), then call list clusters and verify expected return object&lt;br /&gt;
# Call list clusters when no clusters exist within a project id and verify expected return object&lt;br /&gt;
|| &lt;br /&gt;
* n = # of clusters to create&lt;br /&gt;
||&lt;br /&gt;
# List of 'n' clusters is returned with appropriate fields, HTTP Ok (200)&lt;br /&gt;
# Empty list of clusters is returned, HTTP Ok (200)&lt;br /&gt;
|-&lt;br /&gt;
| Create Cluster || &lt;br /&gt;
# Create standard cluster 'c' and verify expected return object&lt;br /&gt;
# Create cluster with invalid flavor and verify expected return value&lt;br /&gt;
# Create cluster with invalid volume size and verify expected return value&lt;br /&gt;
||&lt;br /&gt;
* n = cluster size (number of nodes)&lt;br /&gt;
* m = cluster name&lt;br /&gt;
* f = flavor&lt;br /&gt;
* s = volume size&lt;br /&gt;
* nic = Network UUID&lt;br /&gt;
||&lt;br /&gt;
# Cluster ID, name and status for newly created cluster is returned, HTTP Accepted (202)&lt;br /&gt;
# HTTP Bad request is returned (400)&lt;br /&gt;
# HTTP Bad request is returned (400)&lt;br /&gt;
|-&lt;br /&gt;
| Show Cluster ||&lt;br /&gt;
# Create cluster, then call get cluster and verify expected return object&lt;br /&gt;
# Get cluster with invalid cluster_id&lt;br /&gt;
||&lt;br /&gt;
* cluster_id = cluster ID&lt;br /&gt;
||&lt;br /&gt;
# Cluster ID, name, status, created/updated date stamp and list of nodes is returned, HTTP Ok (200).&lt;br /&gt;
# HTTP Bad request is returned (400)&lt;br /&gt;
|-&lt;br /&gt;
| Delete Cluster || &lt;br /&gt;
# Create a cluster, then call delete cluster and verify expected return value&lt;br /&gt;
# Delete cluster with invalid cluster_id&lt;br /&gt;
||&lt;br /&gt;
* cluster_id = cluster ID&lt;br /&gt;
||&lt;br /&gt;
# HTTP accepted is returned (202)&lt;br /&gt;
# HTTP Bad request is returned (400)&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
====Functional Tests====&lt;br /&gt;
&lt;br /&gt;
The functional tests will verify the HTTP REST URI request lifecycle from controller routing to HTTP response.  These tests will make use of Pecan's testing utility; pecan.testing module.&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
! Operation !! URI !! Tests !! Input Data !! Expected Data (JSON)&lt;br /&gt;
|-&lt;br /&gt;
| GET || /v1/clusters || &lt;br /&gt;
# Call when clusters exist&lt;br /&gt;
# Call when no clusters exist&lt;br /&gt;
|| &lt;br /&gt;
* n/a&lt;br /&gt;
||&lt;br /&gt;
# List of 'n' clusters is returned with appropriate fields, HTTP Ok (200)&lt;br /&gt;
# Empty list of clusters is returned, HTTP Ok (200)&lt;br /&gt;
|-&lt;br /&gt;
| POST || /v1/clusters ||&lt;br /&gt;
# Create standard cluster 'c' and verify expected return object&lt;br /&gt;
# Create cluster with invalid flavor and verify expected return value&lt;br /&gt;
# Create cluster with invalid volume size and verify expected return value&lt;br /&gt;
|| &lt;br /&gt;
* n = cluster size (number of nodes)&lt;br /&gt;
* m = cluster name&lt;br /&gt;
* f = flavor&lt;br /&gt;
* s = volume size&lt;br /&gt;
* nic = Network UUID&lt;br /&gt;
||&lt;br /&gt;
# Cluster ID, name and status for newly created cluster is returned, HTTP Accepted (202)&lt;br /&gt;
# HTTP Bad request is returned (400)&lt;br /&gt;
# HTTP Bad request is returned (400)&lt;br /&gt;
||&lt;br /&gt;
|-&lt;br /&gt;
| GET || /v1/clusters/{cluster_id} || &lt;br /&gt;
# Create cluster, then call get cluster and verify expected return object&lt;br /&gt;
# Get cluster with invalid cluster_id&lt;br /&gt;
|| &lt;br /&gt;
* cluster_id = cluster &lt;br /&gt;
||&lt;br /&gt;
# Cluster ID, name, status, created/updated date stamp and list of nodes is returned, HTTP Ok (200).&lt;br /&gt;
# HTTP Bad request is returned (400)&lt;br /&gt;
||&lt;br /&gt;
|-&lt;br /&gt;
| DELETE || /v1/clusters/{cluster_id} ||&lt;br /&gt;
# Create a cluster, then call delete cluster and verify expected return value&lt;br /&gt;
# Delete cluster with invalid cluster_id&lt;br /&gt;
||&lt;br /&gt;
* cluster_id = cluster ID&lt;br /&gt;
||&lt;br /&gt;
# HTTP accepted is returned (202)&lt;br /&gt;
# HTTP Bad request is returned (400)&lt;br /&gt;
||&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
====Integration Tests====&lt;br /&gt;
&lt;br /&gt;
The integration tests will cover API functionality from HTTP request to database access and task submission for RPC workers.  The Pecan test utility will be used to route test request URI to appropriate controllers, then database record(s) will be verified for applicable change.  Finally the creation of task objections will be verified to ensure valid task flows.&lt;/div&gt;</summary>
		<author><name>Dagnello</name></author>	</entry>

	<entry>
		<id>https://wiki.openstack.org/w/index.php?title=Cue/api_2&amp;diff=70278</id>
		<title>Cue/api 2</title>
		<link rel="alternate" type="text/html" href="https://wiki.openstack.org/w/index.php?title=Cue/api_2&amp;diff=70278"/>
				<updated>2014-12-12T23:05:48Z</updated>
		
		<summary type="html">&lt;p&gt;Dagnello: /* Create Cluster */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;== Cue API Design ==&lt;br /&gt;
=== Acronyms ===&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
! '''Acronym''' !! '''Definition'''&lt;br /&gt;
|-&lt;br /&gt;
| SSL || Secure Sockets Layer&lt;br /&gt;
|-&lt;br /&gt;
| REST || Representational State Transfer&lt;br /&gt;
|-&lt;br /&gt;
| URI || Uniform Resource Identifier&lt;br /&gt;
|-&lt;br /&gt;
| UUID || Universally Unique Identifier&lt;br /&gt;
|-&lt;br /&gt;
| AMQP || Advanced Messaging Queuing Protocol&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
=== Requirements ===&lt;br /&gt;
&lt;br /&gt;
API Requirements for Cue - Kilo timeframe.&lt;br /&gt;
&lt;br /&gt;
* Keystone integration&lt;br /&gt;
* CRUD on Cluster&lt;br /&gt;
* Cluster Management – Scale up/down&lt;br /&gt;
* Devstack integration&lt;br /&gt;
* Gate Tests&lt;br /&gt;
&lt;br /&gt;
=== System Context Diagram ===&lt;br /&gt;
&lt;br /&gt;
[[File:SCD.jpg]]&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
! '''Component''' !! '''Description'''&lt;br /&gt;
|-&lt;br /&gt;
| User || Direct customer of Cue.&lt;br /&gt;
|-&lt;br /&gt;
| Horizon || Cue functionality will be added to Horizon, which will provide a web-based portal for Cue control.&lt;br /&gt;
|-&lt;br /&gt;
| CLI || Command Line Interface to Cue, provides user access to provisioning and deploying messaging clusters.&lt;br /&gt;
|-&lt;br /&gt;
| REST_API || Provides user access to provisioning and deploying messaging clusters through REST interface.  This is a light-weight interface, provisioning and configuration of clusters/nodes is delegated to the TaskWorker process.&lt;br /&gt;
|-&lt;br /&gt;
| TaskScheduler || Used to synchronize work tasks between the REST_API and TaskWorker processes.&lt;br /&gt;
|-&lt;br /&gt;
| TaskWorker || Carries out work associated with all provisioning, configuration and management of RabbitMQ clusters and nodes.  Makes use of heat for initial provisioning/deployment.&lt;br /&gt;
|-&lt;br /&gt;
| DB || Database to store information on clusters and nodes.  Example, in cluster creation, when request is initially received through REST_API, this DB is updated accordingly and the work is delegated to TaskWorker.  TaskWorker then updates this DB as provisioning and configuration takes place.  Subsequent calls to check on status of cluster creation, will return updated information from this DB.&lt;br /&gt;
|-&lt;br /&gt;
| Heat || Used cloud instance orchestration in deploying RabbitMQ cluster images.&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
=== REST API ===&lt;br /&gt;
&lt;br /&gt;
General requirement, REST API must respond within 500ms.&lt;br /&gt;
==== List Clusters ====&lt;br /&gt;
&lt;br /&gt;
'''''GET /v1/clusters'''''&lt;br /&gt;
&lt;br /&gt;
This operation synchronously returns all clusters provisioned within the associated project id.&lt;br /&gt;
&lt;br /&gt;
'''Request Parameters'''&lt;br /&gt;
N/A&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
! Response !! Code(s)&lt;br /&gt;
|-&lt;br /&gt;
| Normal || ok (200)&lt;br /&gt;
|-&lt;br /&gt;
| Error || unauthorized (401)&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
'''Response Parameters'''&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
! Parameter !! Type !! Description&lt;br /&gt;
|-&lt;br /&gt;
| cluster(list) || string || List of clusters, detailing respective cluster id, name, status, created time stamp and updated time stamp.&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
	&lt;br /&gt;
&lt;br /&gt;
'''JSON Request'''&lt;br /&gt;
&lt;br /&gt;
N/A&lt;br /&gt;
&lt;br /&gt;
'''JSON Response'''&lt;br /&gt;
&lt;br /&gt;
{&lt;br /&gt;
    &amp;quot;clusters&amp;quot;: &amp;lt;nowiki&amp;gt;[&amp;lt;/nowiki&amp;gt;&lt;br /&gt;
        {&lt;br /&gt;
            &amp;quot;cluster_id&amp;quot;: &amp;quot;b51948c9-1ac5-4c28-a580-6f7c500d82f8&amp;quot;,&lt;br /&gt;
            &amp;quot;network_id&amp;quot;: &amp;quot;d32019d3-bc6e-4319-9c1d-6722fc136a22&amp;quot;,&lt;br /&gt;
            &amp;quot;name&amp;quot;: &amp;quot;Message Cluster 1&amp;quot;,&lt;br /&gt;
            &amp;quot;status&amp;quot;: &amp;quot;ACTIVE&amp;quot;,&lt;br /&gt;
            &amp;quot;flavor&amp;quot;: &amp;quot;medium&amp;quot;,&lt;br /&gt;
            &amp;quot;size&amp;quot;: &amp;quot;3&amp;quot;,&lt;br /&gt;
            &amp;quot;created&amp;quot;: &amp;quot;2014-11-11T01:02:03Z&amp;quot;,&lt;br /&gt;
            &amp;quot;updated&amp;quot;: &amp;quot;2014-11-11T01:02:03Z&amp;quot;&lt;br /&gt;
        },&lt;br /&gt;
        {&lt;br /&gt;
            &amp;quot;cluster_id&amp;quot;: &amp;quot;13c456c9-bbfc-4c31-b26d-3ae5c3cd7a77&amp;quot;,&lt;br /&gt;
            &amp;quot;network_id&amp;quot;: &amp;quot;d32019d3-bc6e-4319-9c1d-6722fc136a22&amp;quot;,&lt;br /&gt;
            &amp;quot;name&amp;quot;: &amp;quot;Message Cluster 2&amp;quot;,&lt;br /&gt;
            &amp;quot;status&amp;quot;: &amp;quot;BUILDING&amp;quot;,&lt;br /&gt;
            &amp;quot;flavor&amp;quot;: &amp;quot;small&amp;quot;,&lt;br /&gt;
            &amp;quot;size&amp;quot;: &amp;quot;5&amp;quot;,&lt;br /&gt;
            &amp;quot;created&amp;quot;: &amp;quot;2014-11-12T13:23:54Z&amp;quot;,&lt;br /&gt;
            &amp;quot;updated&amp;quot;: &amp;quot;2014-11-13T19:55:01Z&amp;quot;&lt;br /&gt;
        }&lt;br /&gt;
    ]&lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
==== Create Cluster ====&lt;br /&gt;
&lt;br /&gt;
'''''POST /v1/clusters'''''&lt;br /&gt;
&lt;br /&gt;
This operation asynchronously creates a new cluster of Nova instances provisioned with the required message brokers in a central project id. &lt;br /&gt;
&lt;br /&gt;
'''Request Parameters'''&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
! Parameter !! Type !! Description&lt;br /&gt;
|-&lt;br /&gt;
| network id || UUID || Network Identification for a Neutron network where cluster will be created in.&lt;br /&gt;
|-&lt;br /&gt;
| name || string || Name of cluster.&lt;br /&gt;
|-&lt;br /&gt;
| flavor || string || Cluster node flavor, which specify VM type in terms of CPU/memory/disk resources (e.g. small, medium, large).&lt;br /&gt;
&lt;br /&gt;
small:  1 GHz dual-core CPU; 512 MB memory; 250 GB disk&lt;br /&gt;
&lt;br /&gt;
medium: 2.8 GHz dual-core CPU; 4 GB memory; 1 TB disk&lt;br /&gt;
&lt;br /&gt;
large: 3.6 GHz quad-core CPU; 32 GB memory; 5 TB disk&lt;br /&gt;
|-&lt;br /&gt;
| size || int || Number of nodes in cluster.&lt;br /&gt;
|-&lt;br /&gt;
| volume_size || int || Optional parameter to indicate size of volume for node instance.  If volumes are supported, then this parameter will be used.  If ephmeral disk are not supported, volume support will be required.&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
'''Response Codes'''&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
! Response !! Code(s)&lt;br /&gt;
|-&lt;br /&gt;
| Normal || 202 (accepted)&lt;br /&gt;
|-&lt;br /&gt;
| Error || badRequest (400), unauthorized (401), itemNotFound (404)&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
'''Response Parameters'''&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
! Parameter !! Type !! Description&lt;br /&gt;
|-&lt;br /&gt;
| cluster_id || UUID || ID of cluster to be created.&lt;br /&gt;
|-&lt;br /&gt;
| name || string || Name of cluster (same as provided name in request parameters).&lt;br /&gt;
|-&lt;br /&gt;
| status || string || Current status of cluster.&lt;br /&gt;
&lt;br /&gt;
BUILDING: Cluster is in progress of being provisioned.&lt;br /&gt;
&lt;br /&gt;
ACTIVE:  Cluster is running.&lt;br /&gt;
&lt;br /&gt;
ERROR: Provisioning error(s) encountered.&lt;br /&gt;
&lt;br /&gt;
DELETED:  Cluster has been deleted.&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
'''JSON Request'''&lt;br /&gt;
&lt;br /&gt;
{&lt;br /&gt;
    &amp;quot;network_id&amp;quot;: &amp;quot;d32019d3-bc6e-4319-9c1d-6722fc136a22&amp;quot;,&lt;br /&gt;
    &amp;quot;name&amp;quot;: &amp;quot;MessageCluster1&amp;quot;,&lt;br /&gt;
    &amp;quot;flavor&amp;quot;: &amp;quot;large&amp;quot;,&lt;br /&gt;
    &amp;quot;size&amp;quot;: &amp;quot;3&amp;quot;,&lt;br /&gt;
    &amp;quot;volume_size&amp;quot;: &amp;quot;100&amp;quot;&lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
'''JSON Response'''&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
{&lt;br /&gt;
    &amp;quot;cluster&amp;quot;: {&lt;br /&gt;
        &amp;quot;cluster_id&amp;quot;: &amp;quot;dd745f4a-9333-417e-bb89-9c989c84c068&amp;quot;,&lt;br /&gt;
        &amp;quot;network_id&amp;quot;: &amp;quot;d32019d3-bc6e-4319-9c1d-6722fc136a22&amp;quot;,&lt;br /&gt;
        &amp;quot;name&amp;quot;: &amp;quot;Message Cluster 1&amp;quot;,&lt;br /&gt;
        &amp;quot;status&amp;quot;: &amp;quot;BUILDING&amp;quot;,&lt;br /&gt;
        &amp;quot;flavor&amp;quot;: &amp;quot;large&amp;quot;,&lt;br /&gt;
        &amp;quot;size&amp;quot;: &amp;quot;3&amp;quot;,&lt;br /&gt;
        &amp;quot;volume_size&amp;quot;: &amp;quot;100&amp;quot;,&lt;br /&gt;
        &amp;quot;created&amp;quot;: &amp;quot;2014-11-11T01:02:03Z&amp;quot;,&lt;br /&gt;
        &amp;quot;updated&amp;quot;: &amp;quot;2014-11-11T01:02:03Z&amp;quot;&lt;br /&gt;
    }&lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
==== Show Cluster ====&lt;br /&gt;
&lt;br /&gt;
'''''GET /v1/clusters/{cluster_id}'''''&lt;br /&gt;
&lt;br /&gt;
This operation synchronously returns the status and information on the specified cluster within the provided project id.&lt;br /&gt;
&lt;br /&gt;
'''Request Parameters'''&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
! Parameter !! Type !! Description&lt;br /&gt;
|-&lt;br /&gt;
| cluster_id (URI) || UUID || Cluster ID.  This value is returned when a new cluster is created.&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
'''Response Codes'''&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
! Response !! Code(s)&lt;br /&gt;
|-&lt;br /&gt;
| Normal || ok (200)&lt;br /&gt;
|-&lt;br /&gt;
| Error || unauthorized (401), itemNotFound (404)&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
'''Response Parameters'''&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
! Parameter !! Type !! Description&lt;br /&gt;
|-&lt;br /&gt;
| cluster_id || UUID || ID of requested cluster.&lt;br /&gt;
|-&lt;br /&gt;
| name || string || Name of cluster.&lt;br /&gt;
|-&lt;br /&gt;
| status || string || Current status of cluster.&lt;br /&gt;
&lt;br /&gt;
BUILDING: Cluster is in progress of being provisioned.&lt;br /&gt;
&lt;br /&gt;
ACTIVE:  Cluster is running.&lt;br /&gt;
&lt;br /&gt;
ERROR: Provisioning error(s) encountered.&lt;br /&gt;
&lt;br /&gt;
DELETED:  Cluster has been deleted.&lt;br /&gt;
|-&lt;br /&gt;
| created || string || Created time stamp in format: yyyy-mm-ddThh:mm:ssZ&lt;br /&gt;
|-&lt;br /&gt;
| updated || string || Last updated time stamp in format: yyyy-mm-ddThh:mm:ssZ&lt;br /&gt;
|-&lt;br /&gt;
| nodes(list) || node || List of nodes, which includes node id, instance state, and flavor.&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
'''JSON Request'''&lt;br /&gt;
&lt;br /&gt;
N/A&lt;br /&gt;
&lt;br /&gt;
'''JSON Response'''&lt;br /&gt;
&lt;br /&gt;
{&lt;br /&gt;
    &amp;quot;cluster&amp;quot;: {&lt;br /&gt;
        &amp;quot;cluster_id&amp;quot;: &amp;quot;dd745f4a-9333-417e-bb89-9c989c84c068&amp;quot;,&lt;br /&gt;
        &amp;quot;network_id&amp;quot;: &amp;quot;d32019d3-bc6e-4319-9c1d-6722fc136a22&amp;quot;,&lt;br /&gt;
        &amp;quot;name&amp;quot;: &amp;quot;Message Cluster 1&amp;quot;,&lt;br /&gt;
        &amp;quot;status&amp;quot;: &amp;quot;ACTIVE&amp;quot;,&lt;br /&gt;
        &amp;quot;flavor&amp;quot;: &amp;quot;large&amp;quot;,&lt;br /&gt;
        &amp;quot;size&amp;quot;: &amp;quot;3&amp;quot;,&lt;br /&gt;
        &amp;quot;volume_size&amp;quot;: &amp;quot;100&amp;quot;,&lt;br /&gt;
        &amp;quot;created&amp;quot;: &amp;quot;2014-11-11T01:02:03Z&amp;quot;,&lt;br /&gt;
        &amp;quot;updated&amp;quot;: &amp;quot;2014-11-11T01:02:03Z&amp;quot;,&lt;br /&gt;
        &amp;quot;endpoints&amp;quot;: [&lt;br /&gt;
            {&lt;br /&gt;
                &amp;quot;type&amp;quot;: &amp;quot;AMQP&amp;quot;,&lt;br /&gt;
                &amp;quot;value&amp;quot;: &amp;quot;amqp://10.20.30.40:10000&amp;quot;&lt;br /&gt;
            },&lt;br /&gt;
            {&lt;br /&gt;
                &amp;quot;type&amp;quot;: &amp;quot;console&amp;quot;,&lt;br /&gt;
                &amp;quot;value&amp;quot;: &amp;quot;http://10.20.30.40:5672&amp;quot;&lt;br /&gt;
            },&lt;br /&gt;
            {&lt;br /&gt;
                &amp;quot;type&amp;quot;: &amp;quot;AMQP&amp;quot;,&lt;br /&gt;
                &amp;quot;value&amp;quot;: &amp;quot;amqp://10.20.30.41:10000&amp;quot;&lt;br /&gt;
            },&lt;br /&gt;
            {&lt;br /&gt;
                &amp;quot;type&amp;quot;: &amp;quot;console&amp;quot;,&lt;br /&gt;
                &amp;quot;value&amp;quot;: &amp;quot;http://10.20.30.41:5672&amp;quot;&lt;br /&gt;
            },&lt;br /&gt;
            {&lt;br /&gt;
                &amp;quot;type&amp;quot;: &amp;quot;AMQP&amp;quot;,&lt;br /&gt;
                &amp;quot;value&amp;quot;: &amp;quot;amqp://10.20.30.42:10000&amp;quot;&lt;br /&gt;
            },&lt;br /&gt;
            {&lt;br /&gt;
                &amp;quot;type&amp;quot;: &amp;quot;console&amp;quot;,&lt;br /&gt;
                &amp;quot;value&amp;quot;: &amp;quot;http://10.20.30.42:5672&amp;quot;&lt;br /&gt;
            }&lt;br /&gt;
        ]&lt;br /&gt;
    }&lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
==== Delete Cluster ====&lt;br /&gt;
&lt;br /&gt;
'''''DELETE /v1/clusters/{cluster_id}'''''''&lt;br /&gt;
&lt;br /&gt;
This operation will asynchronously delete the indicated cluster within the provided project id.&lt;br /&gt;
&lt;br /&gt;
'''Request Parameters'''&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
! Parameter !! Type !! Description&lt;br /&gt;
|-&lt;br /&gt;
| cluster_id (URI) || UUID || Cluster ID.  This value is returned when a new cluster is created.&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
'''Response Codes'''&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
! Response !! Code(s)&lt;br /&gt;
|-&lt;br /&gt;
| Normal || accepted (202)&lt;br /&gt;
|-&lt;br /&gt;
| Error || unauthorized (401), itemNotFound (404)&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
'''Response Parameters'''&lt;br /&gt;
&lt;br /&gt;
N/A&lt;br /&gt;
&lt;br /&gt;
'''JSON Request'''&lt;br /&gt;
&lt;br /&gt;
N/A&lt;br /&gt;
&lt;br /&gt;
'''JSON Response'''&lt;br /&gt;
&lt;br /&gt;
N/A&lt;br /&gt;
&lt;br /&gt;
==== Update Cluster ====&lt;br /&gt;
&lt;br /&gt;
'''''PATCH /v1/clusters/{cluster_id}'''''&lt;br /&gt;
&lt;br /&gt;
This operation will asynchronously updated the indicated cluster (cluster_id) based on the request body received.  The request body structure is the same as create cluster api.  Cue will automatically detect differences and perform appropriate actions in order to update cluster accordingly.&lt;br /&gt;
&lt;br /&gt;
'''Request Parameters'''&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
! Parameter !! Type !! Description&lt;br /&gt;
|-&lt;br /&gt;
| nic || UUID || Network Identification for a Neutron network where cluster will be created in.&lt;br /&gt;
|-&lt;br /&gt;
| name || string || Name of cluster.&lt;br /&gt;
|-&lt;br /&gt;
| volume_size || int || Optional parameter to indicate size of volume for node instance.  If volumes are supported, then this parameter will be used.  If ephmeral disk are not supported, volume support will be required.&lt;br /&gt;
|-&lt;br /&gt;
| flavor (list) || string || List of node flavors, which specify VM type in terms of CPU/memory/disk resources (e.g. small, medium, large).  Size of list denotes the number of nodes in cluster.&lt;br /&gt;
&lt;br /&gt;
small:  1 GHz dual-core CPU; 512 MB memory; 250 GB disk&lt;br /&gt;
&lt;br /&gt;
medium: 2.8 GHz dual-core CPU; 4 GB memory; 1 TB disk&lt;br /&gt;
&lt;br /&gt;
large: 3.6 GHz quad-core CPU; 32 GB memory; 5 TB disk&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
'''Response Codes'''&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
! Response !! Code(s)&lt;br /&gt;
|-&lt;br /&gt;
| Normal || 202 (accepted)&lt;br /&gt;
|-&lt;br /&gt;
| Error || badRequest (400), unauthorized (401), itemNotFound (404)&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
'''Response Parameters'''&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
! Parameter !! Type !! Description&lt;br /&gt;
|-&lt;br /&gt;
| cluster_id || UUID || ID of cluster to be created.&lt;br /&gt;
|-&lt;br /&gt;
| name || string || Name of cluster (same as provided name in request parameters).&lt;br /&gt;
|-&lt;br /&gt;
| status || string || Current status of cluster.&lt;br /&gt;
&lt;br /&gt;
BUILDING: Cluster is in progress of being provisioned.&lt;br /&gt;
&lt;br /&gt;
ACTIVE:  Cluster is running.&lt;br /&gt;
&lt;br /&gt;
ERROR: Provisioning error(s) encountered.&lt;br /&gt;
&lt;br /&gt;
DELETED:  Cluster has been deleted.&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
'''JSON Request'''&lt;br /&gt;
&lt;br /&gt;
{&lt;br /&gt;
    &amp;quot;network_id&amp;quot;: &amp;quot;d32019d3-bc6e-4319-9c1d-6722fc136a22&amp;quot;,&lt;br /&gt;
    &amp;quot;name&amp;quot;: &amp;quot;MessageCluster1&amp;quot;,&lt;br /&gt;
    &amp;quot;flavor&amp;quot;: &amp;quot;large&amp;quot;,&lt;br /&gt;
    &amp;quot;size&amp;quot;: &amp;quot;3&amp;quot;,&lt;br /&gt;
    &amp;quot;volume_size&amp;quot;: &amp;quot;100&amp;quot;&lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
'''JSON Response'''&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
{&lt;br /&gt;
    &amp;quot;cluster&amp;quot;: {&lt;br /&gt;
        &amp;quot;cluster_id&amp;quot;: &amp;quot;dd745f4a-9333-417e-bb89-9c989c84c068&amp;quot;,&lt;br /&gt;
        &amp;quot;network_id&amp;quot;: &amp;quot;d32019d3-bc6e-4319-9c1d-6722fc136a22&amp;quot;,&lt;br /&gt;
        &amp;quot;name&amp;quot;: &amp;quot;Message Cluster 1&amp;quot;,&lt;br /&gt;
        &amp;quot;status&amp;quot;: &amp;quot;BUILDING&amp;quot;,&lt;br /&gt;
        &amp;quot;flavor&amp;quot;: &amp;quot;large&amp;quot;,&lt;br /&gt;
        &amp;quot;size&amp;quot;: &amp;quot;3&amp;quot;,&lt;br /&gt;
        &amp;quot;volume_size&amp;quot;: &amp;quot;100&amp;quot;,&lt;br /&gt;
        &amp;quot;created&amp;quot;: &amp;quot;2014-11-11T01:02:03Z&amp;quot;,&lt;br /&gt;
        &amp;quot;updated&amp;quot;: &amp;quot;2014-11-11T01:02:03Z&amp;quot;&lt;br /&gt;
    }&lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
===Testing===&lt;br /&gt;
&lt;br /&gt;
Cue API testing will verify the expected functionality of the Cue user interface with both positive/negative tests.  The overall scope will cover testing from the HTTP REST request to required database interactions and work-flow task submission for RPC workers.&lt;br /&gt;
&lt;br /&gt;
====Unit Tests====&lt;br /&gt;
&lt;br /&gt;
Unit tests will verify the resulting function calls for each REST-ful URI and action(s).  The Python Mock library will be used to replace external system dependencies with placeholder objects.&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
! Function !! Tests !! Input Data !! Expected Result(s)&lt;br /&gt;
|-&lt;br /&gt;
| List Clusters || &lt;br /&gt;
# Create 'n' cluster(s), then call list clusters and verify expected return object&lt;br /&gt;
# Call list clusters when no clusters exist within a project id and verify expected return object&lt;br /&gt;
|| &lt;br /&gt;
* n = # of clusters to create&lt;br /&gt;
||&lt;br /&gt;
# List of 'n' clusters is returned with appropriate fields, HTTP Ok (200)&lt;br /&gt;
# Empty list of clusters is returned, HTTP Ok (200)&lt;br /&gt;
|-&lt;br /&gt;
| Create Cluster || &lt;br /&gt;
# Create standard cluster 'c' and verify expected return object&lt;br /&gt;
# Create cluster with invalid flavor and verify expected return value&lt;br /&gt;
# Create cluster with invalid volume size and verify expected return value&lt;br /&gt;
||&lt;br /&gt;
* n = cluster size (number of nodes)&lt;br /&gt;
* m = cluster name&lt;br /&gt;
* f = flavor&lt;br /&gt;
* s = volume size&lt;br /&gt;
* nic = Network UUID&lt;br /&gt;
||&lt;br /&gt;
# Cluster ID, name and status for newly created cluster is returned, HTTP Accepted (202)&lt;br /&gt;
# HTTP Bad request is returned (400)&lt;br /&gt;
# HTTP Bad request is returned (400)&lt;br /&gt;
|-&lt;br /&gt;
| Show Cluster ||&lt;br /&gt;
# Create cluster, then call get cluster and verify expected return object&lt;br /&gt;
# Get cluster with invalid cluster_id&lt;br /&gt;
||&lt;br /&gt;
* cluster_id = cluster ID&lt;br /&gt;
||&lt;br /&gt;
# Cluster ID, name, status, created/updated date stamp and list of nodes is returned, HTTP Ok (200).&lt;br /&gt;
# HTTP Bad request is returned (400)&lt;br /&gt;
|-&lt;br /&gt;
| Delete Cluster || &lt;br /&gt;
# Create a cluster, then call delete cluster and verify expected return value&lt;br /&gt;
# Delete cluster with invalid cluster_id&lt;br /&gt;
||&lt;br /&gt;
* cluster_id = cluster ID&lt;br /&gt;
||&lt;br /&gt;
# HTTP accepted is returned (202)&lt;br /&gt;
# HTTP Bad request is returned (400)&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
====Functional Tests====&lt;br /&gt;
&lt;br /&gt;
The functional tests will verify the HTTP REST URI request lifecycle from controller routing to HTTP response.  These tests will make use of Pecan's testing utility; pecan.testing module.&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
! Operation !! URI !! Tests !! Input Data !! Expected Data (JSON)&lt;br /&gt;
|-&lt;br /&gt;
| GET || /v1/clusters || &lt;br /&gt;
# Call when clusters exist&lt;br /&gt;
# Call when no clusters exist&lt;br /&gt;
|| &lt;br /&gt;
* n/a&lt;br /&gt;
||&lt;br /&gt;
# List of 'n' clusters is returned with appropriate fields, HTTP Ok (200)&lt;br /&gt;
# Empty list of clusters is returned, HTTP Ok (200)&lt;br /&gt;
|-&lt;br /&gt;
| POST || /v1/clusters ||&lt;br /&gt;
# Create standard cluster 'c' and verify expected return object&lt;br /&gt;
# Create cluster with invalid flavor and verify expected return value&lt;br /&gt;
# Create cluster with invalid volume size and verify expected return value&lt;br /&gt;
|| &lt;br /&gt;
* n = cluster size (number of nodes)&lt;br /&gt;
* m = cluster name&lt;br /&gt;
* f = flavor&lt;br /&gt;
* s = volume size&lt;br /&gt;
* nic = Network UUID&lt;br /&gt;
||&lt;br /&gt;
# Cluster ID, name and status for newly created cluster is returned, HTTP Accepted (202)&lt;br /&gt;
# HTTP Bad request is returned (400)&lt;br /&gt;
# HTTP Bad request is returned (400)&lt;br /&gt;
||&lt;br /&gt;
|-&lt;br /&gt;
| GET || /v1/clusters/{cluster_id} || &lt;br /&gt;
# Create cluster, then call get cluster and verify expected return object&lt;br /&gt;
# Get cluster with invalid cluster_id&lt;br /&gt;
|| &lt;br /&gt;
* cluster_id = cluster &lt;br /&gt;
||&lt;br /&gt;
# Cluster ID, name, status, created/updated date stamp and list of nodes is returned, HTTP Ok (200).&lt;br /&gt;
# HTTP Bad request is returned (400)&lt;br /&gt;
||&lt;br /&gt;
|-&lt;br /&gt;
| DELETE || /v1/clusters/{cluster_id} ||&lt;br /&gt;
# Create a cluster, then call delete cluster and verify expected return value&lt;br /&gt;
# Delete cluster with invalid cluster_id&lt;br /&gt;
||&lt;br /&gt;
* cluster_id = cluster ID&lt;br /&gt;
||&lt;br /&gt;
# HTTP accepted is returned (202)&lt;br /&gt;
# HTTP Bad request is returned (400)&lt;br /&gt;
||&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
====Integration Tests====&lt;br /&gt;
&lt;br /&gt;
The integration tests will cover API functionality from HTTP request to database access and task submission for RPC workers.  The Pecan test utility will be used to route test request URI to appropriate controllers, then database record(s) will be verified for applicable change.  Finally the creation of task objections will be verified to ensure valid task flows.&lt;/div&gt;</summary>
		<author><name>Dagnello</name></author>	</entry>

	<entry>
		<id>https://wiki.openstack.org/w/index.php?title=Cue/api_2&amp;diff=70277</id>
		<title>Cue/api 2</title>
		<link rel="alternate" type="text/html" href="https://wiki.openstack.org/w/index.php?title=Cue/api_2&amp;diff=70277"/>
				<updated>2014-12-12T22:59:56Z</updated>
		
		<summary type="html">&lt;p&gt;Dagnello: /* Create Cluster */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;== Cue API Design ==&lt;br /&gt;
=== Acronyms ===&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
! '''Acronym''' !! '''Definition'''&lt;br /&gt;
|-&lt;br /&gt;
| SSL || Secure Sockets Layer&lt;br /&gt;
|-&lt;br /&gt;
| REST || Representational State Transfer&lt;br /&gt;
|-&lt;br /&gt;
| URI || Uniform Resource Identifier&lt;br /&gt;
|-&lt;br /&gt;
| UUID || Universally Unique Identifier&lt;br /&gt;
|-&lt;br /&gt;
| AMQP || Advanced Messaging Queuing Protocol&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
=== Requirements ===&lt;br /&gt;
&lt;br /&gt;
API Requirements for Cue - Kilo timeframe.&lt;br /&gt;
&lt;br /&gt;
* Keystone integration&lt;br /&gt;
* CRUD on Cluster&lt;br /&gt;
* Cluster Management – Scale up/down&lt;br /&gt;
* Devstack integration&lt;br /&gt;
* Gate Tests&lt;br /&gt;
&lt;br /&gt;
=== System Context Diagram ===&lt;br /&gt;
&lt;br /&gt;
[[File:SCD.jpg]]&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
! '''Component''' !! '''Description'''&lt;br /&gt;
|-&lt;br /&gt;
| User || Direct customer of Cue.&lt;br /&gt;
|-&lt;br /&gt;
| Horizon || Cue functionality will be added to Horizon, which will provide a web-based portal for Cue control.&lt;br /&gt;
|-&lt;br /&gt;
| CLI || Command Line Interface to Cue, provides user access to provisioning and deploying messaging clusters.&lt;br /&gt;
|-&lt;br /&gt;
| REST_API || Provides user access to provisioning and deploying messaging clusters through REST interface.  This is a light-weight interface, provisioning and configuration of clusters/nodes is delegated to the TaskWorker process.&lt;br /&gt;
|-&lt;br /&gt;
| TaskScheduler || Used to synchronize work tasks between the REST_API and TaskWorker processes.&lt;br /&gt;
|-&lt;br /&gt;
| TaskWorker || Carries out work associated with all provisioning, configuration and management of RabbitMQ clusters and nodes.  Makes use of heat for initial provisioning/deployment.&lt;br /&gt;
|-&lt;br /&gt;
| DB || Database to store information on clusters and nodes.  Example, in cluster creation, when request is initially received through REST_API, this DB is updated accordingly and the work is delegated to TaskWorker.  TaskWorker then updates this DB as provisioning and configuration takes place.  Subsequent calls to check on status of cluster creation, will return updated information from this DB.&lt;br /&gt;
|-&lt;br /&gt;
| Heat || Used cloud instance orchestration in deploying RabbitMQ cluster images.&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
=== REST API ===&lt;br /&gt;
&lt;br /&gt;
General requirement, REST API must respond within 500ms.&lt;br /&gt;
==== List Clusters ====&lt;br /&gt;
&lt;br /&gt;
'''''GET /v1/clusters'''''&lt;br /&gt;
&lt;br /&gt;
This operation synchronously returns all clusters provisioned within the associated project id.&lt;br /&gt;
&lt;br /&gt;
'''Request Parameters'''&lt;br /&gt;
N/A&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
! Response !! Code(s)&lt;br /&gt;
|-&lt;br /&gt;
| Normal || ok (200)&lt;br /&gt;
|-&lt;br /&gt;
| Error || unauthorized (401)&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
'''Response Parameters'''&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
! Parameter !! Type !! Description&lt;br /&gt;
|-&lt;br /&gt;
| cluster(list) || string || List of clusters, detailing respective cluster id, name, status, created time stamp and updated time stamp.&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
	&lt;br /&gt;
&lt;br /&gt;
'''JSON Request'''&lt;br /&gt;
&lt;br /&gt;
N/A&lt;br /&gt;
&lt;br /&gt;
'''JSON Response'''&lt;br /&gt;
&lt;br /&gt;
{&lt;br /&gt;
    &amp;quot;clusters&amp;quot;: &amp;lt;nowiki&amp;gt;[&amp;lt;/nowiki&amp;gt;&lt;br /&gt;
        {&lt;br /&gt;
            &amp;quot;cluster_id&amp;quot;: &amp;quot;b51948c9-1ac5-4c28-a580-6f7c500d82f8&amp;quot;,&lt;br /&gt;
            &amp;quot;network_id&amp;quot;: &amp;quot;d32019d3-bc6e-4319-9c1d-6722fc136a22&amp;quot;,&lt;br /&gt;
            &amp;quot;name&amp;quot;: &amp;quot;Message Cluster 1&amp;quot;,&lt;br /&gt;
            &amp;quot;status&amp;quot;: &amp;quot;ACTIVE&amp;quot;,&lt;br /&gt;
            &amp;quot;flavor&amp;quot;: &amp;quot;medium&amp;quot;,&lt;br /&gt;
            &amp;quot;size&amp;quot;: &amp;quot;3&amp;quot;,&lt;br /&gt;
            &amp;quot;created&amp;quot;: &amp;quot;2014-11-11T01:02:03Z&amp;quot;,&lt;br /&gt;
            &amp;quot;updated&amp;quot;: &amp;quot;2014-11-11T01:02:03Z&amp;quot;&lt;br /&gt;
        },&lt;br /&gt;
        {&lt;br /&gt;
            &amp;quot;cluster_id&amp;quot;: &amp;quot;13c456c9-bbfc-4c31-b26d-3ae5c3cd7a77&amp;quot;,&lt;br /&gt;
            &amp;quot;network_id&amp;quot;: &amp;quot;d32019d3-bc6e-4319-9c1d-6722fc136a22&amp;quot;,&lt;br /&gt;
            &amp;quot;name&amp;quot;: &amp;quot;Message Cluster 2&amp;quot;,&lt;br /&gt;
            &amp;quot;status&amp;quot;: &amp;quot;BUILDING&amp;quot;,&lt;br /&gt;
            &amp;quot;flavor&amp;quot;: &amp;quot;small&amp;quot;,&lt;br /&gt;
            &amp;quot;size&amp;quot;: &amp;quot;5&amp;quot;,&lt;br /&gt;
            &amp;quot;created&amp;quot;: &amp;quot;2014-11-12T13:23:54Z&amp;quot;,&lt;br /&gt;
            &amp;quot;updated&amp;quot;: &amp;quot;2014-11-13T19:55:01Z&amp;quot;&lt;br /&gt;
        }&lt;br /&gt;
    ]&lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
==== Create Cluster ====&lt;br /&gt;
&lt;br /&gt;
'''''POST /v1/clusters'''''&lt;br /&gt;
&lt;br /&gt;
This operation asynchronously creates a new cluster of Nova instances provisioned with the required message brokers in a central project id. &lt;br /&gt;
&lt;br /&gt;
'''Request Parameters'''&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
! Parameter !! Type !! Description&lt;br /&gt;
|-&lt;br /&gt;
| nic || UUID || Network Identification for a Neutron network where cluster will be created in.&lt;br /&gt;
|-&lt;br /&gt;
| name || string || Name of cluster.&lt;br /&gt;
|-&lt;br /&gt;
| flavor || string || Cluster node flavor, which specify VM type in terms of CPU/memory/disk resources (e.g. small, medium, large).&lt;br /&gt;
&lt;br /&gt;
small:  1 GHz dual-core CPU; 512 MB memory; 250 GB disk&lt;br /&gt;
&lt;br /&gt;
medium: 2.8 GHz dual-core CPU; 4 GB memory; 1 TB disk&lt;br /&gt;
&lt;br /&gt;
large: 3.6 GHz quad-core CPU; 32 GB memory; 5 TB disk&lt;br /&gt;
|-&lt;br /&gt;
| size || int || Number of nodes in cluster.&lt;br /&gt;
|-&lt;br /&gt;
| volume_size || int || Optional parameter to indicate size of volume for node instance.  If volumes are supported, then this parameter will be used.  If ephmeral disk are not supported, volume support will be required.&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
'''Response Codes'''&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
! Response !! Code(s)&lt;br /&gt;
|-&lt;br /&gt;
| Normal || 202 (accepted)&lt;br /&gt;
|-&lt;br /&gt;
| Error || badRequest (400), unauthorized (401), itemNotFound (404)&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
'''Response Parameters'''&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
! Parameter !! Type !! Description&lt;br /&gt;
|-&lt;br /&gt;
| cluster_id || UUID || ID of cluster to be created.&lt;br /&gt;
|-&lt;br /&gt;
| name || string || Name of cluster (same as provided name in request parameters).&lt;br /&gt;
|-&lt;br /&gt;
| status || string || Current status of cluster.&lt;br /&gt;
&lt;br /&gt;
BUILDING: Cluster is in progress of being provisioned.&lt;br /&gt;
&lt;br /&gt;
ACTIVE:  Cluster is running.&lt;br /&gt;
&lt;br /&gt;
ERROR: Provisioning error(s) encountered.&lt;br /&gt;
&lt;br /&gt;
DELETED:  Cluster has been deleted.&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
'''JSON Request'''&lt;br /&gt;
&lt;br /&gt;
{&lt;br /&gt;
    &amp;quot;network_id&amp;quot;: &amp;quot;d32019d3-bc6e-4319-9c1d-6722fc136a22&amp;quot;,&lt;br /&gt;
    &amp;quot;name&amp;quot;: &amp;quot;MessageCluster1&amp;quot;,&lt;br /&gt;
    &amp;quot;flavor&amp;quot;: &amp;quot;large&amp;quot;,&lt;br /&gt;
    &amp;quot;size&amp;quot;: &amp;quot;3&amp;quot;,&lt;br /&gt;
    &amp;quot;volume_size&amp;quot;: &amp;quot;100&amp;quot;&lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
'''JSON Response'''&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
{&lt;br /&gt;
    &amp;quot;cluster&amp;quot;: {&lt;br /&gt;
        &amp;quot;cluster_id&amp;quot;: &amp;quot;dd745f4a-9333-417e-bb89-9c989c84c068&amp;quot;,&lt;br /&gt;
        &amp;quot;network_id&amp;quot;: &amp;quot;d32019d3-bc6e-4319-9c1d-6722fc136a22&amp;quot;,&lt;br /&gt;
        &amp;quot;name&amp;quot;: &amp;quot;Message Cluster 1&amp;quot;,&lt;br /&gt;
        &amp;quot;status&amp;quot;: &amp;quot;BUILDING&amp;quot;,&lt;br /&gt;
        &amp;quot;flavor&amp;quot;: &amp;quot;large&amp;quot;,&lt;br /&gt;
        &amp;quot;size&amp;quot;: &amp;quot;3&amp;quot;,&lt;br /&gt;
        &amp;quot;volume_size&amp;quot;: &amp;quot;100&amp;quot;,&lt;br /&gt;
        &amp;quot;created&amp;quot;: &amp;quot;2014-11-11T01:02:03Z&amp;quot;,&lt;br /&gt;
        &amp;quot;updated&amp;quot;: &amp;quot;2014-11-11T01:02:03Z&amp;quot;&lt;br /&gt;
    }&lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
==== Show Cluster ====&lt;br /&gt;
&lt;br /&gt;
'''''GET /v1/clusters/{cluster_id}'''''&lt;br /&gt;
&lt;br /&gt;
This operation synchronously returns the status and information on the specified cluster within the provided project id.&lt;br /&gt;
&lt;br /&gt;
'''Request Parameters'''&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
! Parameter !! Type !! Description&lt;br /&gt;
|-&lt;br /&gt;
| cluster_id (URI) || UUID || Cluster ID.  This value is returned when a new cluster is created.&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
'''Response Codes'''&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
! Response !! Code(s)&lt;br /&gt;
|-&lt;br /&gt;
| Normal || ok (200)&lt;br /&gt;
|-&lt;br /&gt;
| Error || unauthorized (401), itemNotFound (404)&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
'''Response Parameters'''&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
! Parameter !! Type !! Description&lt;br /&gt;
|-&lt;br /&gt;
| cluster_id || UUID || ID of requested cluster.&lt;br /&gt;
|-&lt;br /&gt;
| name || string || Name of cluster.&lt;br /&gt;
|-&lt;br /&gt;
| status || string || Current status of cluster.&lt;br /&gt;
&lt;br /&gt;
BUILDING: Cluster is in progress of being provisioned.&lt;br /&gt;
&lt;br /&gt;
ACTIVE:  Cluster is running.&lt;br /&gt;
&lt;br /&gt;
ERROR: Provisioning error(s) encountered.&lt;br /&gt;
&lt;br /&gt;
DELETED:  Cluster has been deleted.&lt;br /&gt;
|-&lt;br /&gt;
| created || string || Created time stamp in format: yyyy-mm-ddThh:mm:ssZ&lt;br /&gt;
|-&lt;br /&gt;
| updated || string || Last updated time stamp in format: yyyy-mm-ddThh:mm:ssZ&lt;br /&gt;
|-&lt;br /&gt;
| nodes(list) || node || List of nodes, which includes node id, instance state, and flavor.&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
'''JSON Request'''&lt;br /&gt;
&lt;br /&gt;
N/A&lt;br /&gt;
&lt;br /&gt;
'''JSON Response'''&lt;br /&gt;
&lt;br /&gt;
{&lt;br /&gt;
    &amp;quot;cluster&amp;quot;: {&lt;br /&gt;
        &amp;quot;cluster_id&amp;quot;: &amp;quot;dd745f4a-9333-417e-bb89-9c989c84c068&amp;quot;,&lt;br /&gt;
        &amp;quot;network_id&amp;quot;: &amp;quot;d32019d3-bc6e-4319-9c1d-6722fc136a22&amp;quot;,&lt;br /&gt;
        &amp;quot;name&amp;quot;: &amp;quot;Message Cluster 1&amp;quot;,&lt;br /&gt;
        &amp;quot;status&amp;quot;: &amp;quot;ACTIVE&amp;quot;,&lt;br /&gt;
        &amp;quot;flavor&amp;quot;: &amp;quot;large&amp;quot;,&lt;br /&gt;
        &amp;quot;size&amp;quot;: &amp;quot;3&amp;quot;,&lt;br /&gt;
        &amp;quot;volume_size&amp;quot;: &amp;quot;100&amp;quot;,&lt;br /&gt;
        &amp;quot;created&amp;quot;: &amp;quot;2014-11-11T01:02:03Z&amp;quot;,&lt;br /&gt;
        &amp;quot;updated&amp;quot;: &amp;quot;2014-11-11T01:02:03Z&amp;quot;,&lt;br /&gt;
        &amp;quot;endpoints&amp;quot;: [&lt;br /&gt;
            {&lt;br /&gt;
                &amp;quot;type&amp;quot;: &amp;quot;AMQP&amp;quot;,&lt;br /&gt;
                &amp;quot;value&amp;quot;: &amp;quot;amqp://10.20.30.40:10000&amp;quot;&lt;br /&gt;
            },&lt;br /&gt;
            {&lt;br /&gt;
                &amp;quot;type&amp;quot;: &amp;quot;console&amp;quot;,&lt;br /&gt;
                &amp;quot;value&amp;quot;: &amp;quot;http://10.20.30.40:5672&amp;quot;&lt;br /&gt;
            },&lt;br /&gt;
            {&lt;br /&gt;
                &amp;quot;type&amp;quot;: &amp;quot;AMQP&amp;quot;,&lt;br /&gt;
                &amp;quot;value&amp;quot;: &amp;quot;amqp://10.20.30.41:10000&amp;quot;&lt;br /&gt;
            },&lt;br /&gt;
            {&lt;br /&gt;
                &amp;quot;type&amp;quot;: &amp;quot;console&amp;quot;,&lt;br /&gt;
                &amp;quot;value&amp;quot;: &amp;quot;http://10.20.30.41:5672&amp;quot;&lt;br /&gt;
            },&lt;br /&gt;
            {&lt;br /&gt;
                &amp;quot;type&amp;quot;: &amp;quot;AMQP&amp;quot;,&lt;br /&gt;
                &amp;quot;value&amp;quot;: &amp;quot;amqp://10.20.30.42:10000&amp;quot;&lt;br /&gt;
            },&lt;br /&gt;
            {&lt;br /&gt;
                &amp;quot;type&amp;quot;: &amp;quot;console&amp;quot;,&lt;br /&gt;
                &amp;quot;value&amp;quot;: &amp;quot;http://10.20.30.42:5672&amp;quot;&lt;br /&gt;
            }&lt;br /&gt;
        ]&lt;br /&gt;
    }&lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
==== Delete Cluster ====&lt;br /&gt;
&lt;br /&gt;
'''''DELETE /v1/clusters/{cluster_id}'''''''&lt;br /&gt;
&lt;br /&gt;
This operation will asynchronously delete the indicated cluster within the provided project id.&lt;br /&gt;
&lt;br /&gt;
'''Request Parameters'''&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
! Parameter !! Type !! Description&lt;br /&gt;
|-&lt;br /&gt;
| cluster_id (URI) || UUID || Cluster ID.  This value is returned when a new cluster is created.&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
'''Response Codes'''&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
! Response !! Code(s)&lt;br /&gt;
|-&lt;br /&gt;
| Normal || accepted (202)&lt;br /&gt;
|-&lt;br /&gt;
| Error || unauthorized (401), itemNotFound (404)&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
'''Response Parameters'''&lt;br /&gt;
&lt;br /&gt;
N/A&lt;br /&gt;
&lt;br /&gt;
'''JSON Request'''&lt;br /&gt;
&lt;br /&gt;
N/A&lt;br /&gt;
&lt;br /&gt;
'''JSON Response'''&lt;br /&gt;
&lt;br /&gt;
N/A&lt;br /&gt;
&lt;br /&gt;
==== Update Cluster ====&lt;br /&gt;
&lt;br /&gt;
'''''PATCH /v1/clusters/{cluster_id}'''''&lt;br /&gt;
&lt;br /&gt;
This operation will asynchronously updated the indicated cluster (cluster_id) based on the request body received.  The request body structure is the same as create cluster api.  Cue will automatically detect differences and perform appropriate actions in order to update cluster accordingly.&lt;br /&gt;
&lt;br /&gt;
'''Request Parameters'''&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
! Parameter !! Type !! Description&lt;br /&gt;
|-&lt;br /&gt;
| nic || UUID || Network Identification for a Neutron network where cluster will be created in.&lt;br /&gt;
|-&lt;br /&gt;
| name || string || Name of cluster.&lt;br /&gt;
|-&lt;br /&gt;
| volume_size || int || Optional parameter to indicate size of volume for node instance.  If volumes are supported, then this parameter will be used.  If ephmeral disk are not supported, volume support will be required.&lt;br /&gt;
|-&lt;br /&gt;
| flavor (list) || string || List of node flavors, which specify VM type in terms of CPU/memory/disk resources (e.g. small, medium, large).  Size of list denotes the number of nodes in cluster.&lt;br /&gt;
&lt;br /&gt;
small:  1 GHz dual-core CPU; 512 MB memory; 250 GB disk&lt;br /&gt;
&lt;br /&gt;
medium: 2.8 GHz dual-core CPU; 4 GB memory; 1 TB disk&lt;br /&gt;
&lt;br /&gt;
large: 3.6 GHz quad-core CPU; 32 GB memory; 5 TB disk&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
'''Response Codes'''&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
! Response !! Code(s)&lt;br /&gt;
|-&lt;br /&gt;
| Normal || 202 (accepted)&lt;br /&gt;
|-&lt;br /&gt;
| Error || badRequest (400), unauthorized (401), itemNotFound (404)&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
'''Response Parameters'''&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
! Parameter !! Type !! Description&lt;br /&gt;
|-&lt;br /&gt;
| cluster_id || UUID || ID of cluster to be created.&lt;br /&gt;
|-&lt;br /&gt;
| name || string || Name of cluster (same as provided name in request parameters).&lt;br /&gt;
|-&lt;br /&gt;
| status || string || Current status of cluster.&lt;br /&gt;
&lt;br /&gt;
BUILDING: Cluster is in progress of being provisioned.&lt;br /&gt;
&lt;br /&gt;
ACTIVE:  Cluster is running.&lt;br /&gt;
&lt;br /&gt;
ERROR: Provisioning error(s) encountered.&lt;br /&gt;
&lt;br /&gt;
DELETED:  Cluster has been deleted.&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
'''JSON Request'''&lt;br /&gt;
&lt;br /&gt;
{&lt;br /&gt;
    &amp;quot;network_id&amp;quot;: &amp;quot;d32019d3-bc6e-4319-9c1d-6722fc136a22&amp;quot;,&lt;br /&gt;
    &amp;quot;name&amp;quot;: &amp;quot;MessageCluster1&amp;quot;,&lt;br /&gt;
    &amp;quot;flavor&amp;quot;: &amp;quot;large&amp;quot;,&lt;br /&gt;
    &amp;quot;size&amp;quot;: &amp;quot;3&amp;quot;,&lt;br /&gt;
    &amp;quot;volume_size&amp;quot;: &amp;quot;100&amp;quot;&lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
'''JSON Response'''&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
{&lt;br /&gt;
    &amp;quot;cluster&amp;quot;: {&lt;br /&gt;
        &amp;quot;cluster_id&amp;quot;: &amp;quot;dd745f4a-9333-417e-bb89-9c989c84c068&amp;quot;,&lt;br /&gt;
        &amp;quot;network_id&amp;quot;: &amp;quot;d32019d3-bc6e-4319-9c1d-6722fc136a22&amp;quot;,&lt;br /&gt;
        &amp;quot;name&amp;quot;: &amp;quot;Message Cluster 1&amp;quot;,&lt;br /&gt;
        &amp;quot;status&amp;quot;: &amp;quot;BUILDING&amp;quot;,&lt;br /&gt;
        &amp;quot;flavor&amp;quot;: &amp;quot;large&amp;quot;,&lt;br /&gt;
        &amp;quot;size&amp;quot;: &amp;quot;3&amp;quot;,&lt;br /&gt;
        &amp;quot;volume_size&amp;quot;: &amp;quot;100&amp;quot;,&lt;br /&gt;
        &amp;quot;created&amp;quot;: &amp;quot;2014-11-11T01:02:03Z&amp;quot;,&lt;br /&gt;
        &amp;quot;updated&amp;quot;: &amp;quot;2014-11-11T01:02:03Z&amp;quot;&lt;br /&gt;
    }&lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
===Testing===&lt;br /&gt;
&lt;br /&gt;
Cue API testing will verify the expected functionality of the Cue user interface with both positive/negative tests.  The overall scope will cover testing from the HTTP REST request to required database interactions and work-flow task submission for RPC workers.&lt;br /&gt;
&lt;br /&gt;
====Unit Tests====&lt;br /&gt;
&lt;br /&gt;
Unit tests will verify the resulting function calls for each REST-ful URI and action(s).  The Python Mock library will be used to replace external system dependencies with placeholder objects.&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
! Function !! Tests !! Input Data !! Expected Result(s)&lt;br /&gt;
|-&lt;br /&gt;
| List Clusters || &lt;br /&gt;
# Create 'n' cluster(s), then call list clusters and verify expected return object&lt;br /&gt;
# Call list clusters when no clusters exist within a project id and verify expected return object&lt;br /&gt;
|| &lt;br /&gt;
* n = # of clusters to create&lt;br /&gt;
||&lt;br /&gt;
# List of 'n' clusters is returned with appropriate fields, HTTP Ok (200)&lt;br /&gt;
# Empty list of clusters is returned, HTTP Ok (200)&lt;br /&gt;
|-&lt;br /&gt;
| Create Cluster || &lt;br /&gt;
# Create standard cluster 'c' and verify expected return object&lt;br /&gt;
# Create cluster with invalid flavor and verify expected return value&lt;br /&gt;
# Create cluster with invalid volume size and verify expected return value&lt;br /&gt;
||&lt;br /&gt;
* n = cluster size (number of nodes)&lt;br /&gt;
* m = cluster name&lt;br /&gt;
* f = flavor&lt;br /&gt;
* s = volume size&lt;br /&gt;
* nic = Network UUID&lt;br /&gt;
||&lt;br /&gt;
# Cluster ID, name and status for newly created cluster is returned, HTTP Accepted (202)&lt;br /&gt;
# HTTP Bad request is returned (400)&lt;br /&gt;
# HTTP Bad request is returned (400)&lt;br /&gt;
|-&lt;br /&gt;
| Show Cluster ||&lt;br /&gt;
# Create cluster, then call get cluster and verify expected return object&lt;br /&gt;
# Get cluster with invalid cluster_id&lt;br /&gt;
||&lt;br /&gt;
* cluster_id = cluster ID&lt;br /&gt;
||&lt;br /&gt;
# Cluster ID, name, status, created/updated date stamp and list of nodes is returned, HTTP Ok (200).&lt;br /&gt;
# HTTP Bad request is returned (400)&lt;br /&gt;
|-&lt;br /&gt;
| Delete Cluster || &lt;br /&gt;
# Create a cluster, then call delete cluster and verify expected return value&lt;br /&gt;
# Delete cluster with invalid cluster_id&lt;br /&gt;
||&lt;br /&gt;
* cluster_id = cluster ID&lt;br /&gt;
||&lt;br /&gt;
# HTTP accepted is returned (202)&lt;br /&gt;
# HTTP Bad request is returned (400)&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
====Functional Tests====&lt;br /&gt;
&lt;br /&gt;
The functional tests will verify the HTTP REST URI request lifecycle from controller routing to HTTP response.  These tests will make use of Pecan's testing utility; pecan.testing module.&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
! Operation !! URI !! Tests !! Input Data !! Expected Data (JSON)&lt;br /&gt;
|-&lt;br /&gt;
| GET || /v1/clusters || &lt;br /&gt;
# Call when clusters exist&lt;br /&gt;
# Call when no clusters exist&lt;br /&gt;
|| &lt;br /&gt;
* n/a&lt;br /&gt;
||&lt;br /&gt;
# List of 'n' clusters is returned with appropriate fields, HTTP Ok (200)&lt;br /&gt;
# Empty list of clusters is returned, HTTP Ok (200)&lt;br /&gt;
|-&lt;br /&gt;
| POST || /v1/clusters ||&lt;br /&gt;
# Create standard cluster 'c' and verify expected return object&lt;br /&gt;
# Create cluster with invalid flavor and verify expected return value&lt;br /&gt;
# Create cluster with invalid volume size and verify expected return value&lt;br /&gt;
|| &lt;br /&gt;
* n = cluster size (number of nodes)&lt;br /&gt;
* m = cluster name&lt;br /&gt;
* f = flavor&lt;br /&gt;
* s = volume size&lt;br /&gt;
* nic = Network UUID&lt;br /&gt;
||&lt;br /&gt;
# Cluster ID, name and status for newly created cluster is returned, HTTP Accepted (202)&lt;br /&gt;
# HTTP Bad request is returned (400)&lt;br /&gt;
# HTTP Bad request is returned (400)&lt;br /&gt;
||&lt;br /&gt;
|-&lt;br /&gt;
| GET || /v1/clusters/{cluster_id} || &lt;br /&gt;
# Create cluster, then call get cluster and verify expected return object&lt;br /&gt;
# Get cluster with invalid cluster_id&lt;br /&gt;
|| &lt;br /&gt;
* cluster_id = cluster &lt;br /&gt;
||&lt;br /&gt;
# Cluster ID, name, status, created/updated date stamp and list of nodes is returned, HTTP Ok (200).&lt;br /&gt;
# HTTP Bad request is returned (400)&lt;br /&gt;
||&lt;br /&gt;
|-&lt;br /&gt;
| DELETE || /v1/clusters/{cluster_id} ||&lt;br /&gt;
# Create a cluster, then call delete cluster and verify expected return value&lt;br /&gt;
# Delete cluster with invalid cluster_id&lt;br /&gt;
||&lt;br /&gt;
* cluster_id = cluster ID&lt;br /&gt;
||&lt;br /&gt;
# HTTP accepted is returned (202)&lt;br /&gt;
# HTTP Bad request is returned (400)&lt;br /&gt;
||&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
====Integration Tests====&lt;br /&gt;
&lt;br /&gt;
The integration tests will cover API functionality from HTTP request to database access and task submission for RPC workers.  The Pecan test utility will be used to route test request URI to appropriate controllers, then database record(s) will be verified for applicable change.  Finally the creation of task objections will be verified to ensure valid task flows.&lt;/div&gt;</summary>
		<author><name>Dagnello</name></author>	</entry>

	<entry>
		<id>https://wiki.openstack.org/w/index.php?title=Cue/api_2&amp;diff=70276</id>
		<title>Cue/api 2</title>
		<link rel="alternate" type="text/html" href="https://wiki.openstack.org/w/index.php?title=Cue/api_2&amp;diff=70276"/>
				<updated>2014-12-12T22:59:11Z</updated>
		
		<summary type="html">&lt;p&gt;Dagnello: /* Create Cluster */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;== Cue API Design ==&lt;br /&gt;
=== Acronyms ===&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
! '''Acronym''' !! '''Definition'''&lt;br /&gt;
|-&lt;br /&gt;
| SSL || Secure Sockets Layer&lt;br /&gt;
|-&lt;br /&gt;
| REST || Representational State Transfer&lt;br /&gt;
|-&lt;br /&gt;
| URI || Uniform Resource Identifier&lt;br /&gt;
|-&lt;br /&gt;
| UUID || Universally Unique Identifier&lt;br /&gt;
|-&lt;br /&gt;
| AMQP || Advanced Messaging Queuing Protocol&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
=== Requirements ===&lt;br /&gt;
&lt;br /&gt;
API Requirements for Cue - Kilo timeframe.&lt;br /&gt;
&lt;br /&gt;
* Keystone integration&lt;br /&gt;
* CRUD on Cluster&lt;br /&gt;
* Cluster Management – Scale up/down&lt;br /&gt;
* Devstack integration&lt;br /&gt;
* Gate Tests&lt;br /&gt;
&lt;br /&gt;
=== System Context Diagram ===&lt;br /&gt;
&lt;br /&gt;
[[File:SCD.jpg]]&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
! '''Component''' !! '''Description'''&lt;br /&gt;
|-&lt;br /&gt;
| User || Direct customer of Cue.&lt;br /&gt;
|-&lt;br /&gt;
| Horizon || Cue functionality will be added to Horizon, which will provide a web-based portal for Cue control.&lt;br /&gt;
|-&lt;br /&gt;
| CLI || Command Line Interface to Cue, provides user access to provisioning and deploying messaging clusters.&lt;br /&gt;
|-&lt;br /&gt;
| REST_API || Provides user access to provisioning and deploying messaging clusters through REST interface.  This is a light-weight interface, provisioning and configuration of clusters/nodes is delegated to the TaskWorker process.&lt;br /&gt;
|-&lt;br /&gt;
| TaskScheduler || Used to synchronize work tasks between the REST_API and TaskWorker processes.&lt;br /&gt;
|-&lt;br /&gt;
| TaskWorker || Carries out work associated with all provisioning, configuration and management of RabbitMQ clusters and nodes.  Makes use of heat for initial provisioning/deployment.&lt;br /&gt;
|-&lt;br /&gt;
| DB || Database to store information on clusters and nodes.  Example, in cluster creation, when request is initially received through REST_API, this DB is updated accordingly and the work is delegated to TaskWorker.  TaskWorker then updates this DB as provisioning and configuration takes place.  Subsequent calls to check on status of cluster creation, will return updated information from this DB.&lt;br /&gt;
|-&lt;br /&gt;
| Heat || Used cloud instance orchestration in deploying RabbitMQ cluster images.&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
=== REST API ===&lt;br /&gt;
&lt;br /&gt;
General requirement, REST API must respond within 500ms.&lt;br /&gt;
==== List Clusters ====&lt;br /&gt;
&lt;br /&gt;
'''''GET /v1/clusters'''''&lt;br /&gt;
&lt;br /&gt;
This operation synchronously returns all clusters provisioned within the associated project id.&lt;br /&gt;
&lt;br /&gt;
'''Request Parameters'''&lt;br /&gt;
N/A&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
! Response !! Code(s)&lt;br /&gt;
|-&lt;br /&gt;
| Normal || ok (200)&lt;br /&gt;
|-&lt;br /&gt;
| Error || unauthorized (401)&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
'''Response Parameters'''&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
! Parameter !! Type !! Description&lt;br /&gt;
|-&lt;br /&gt;
| cluster(list) || string || List of clusters, detailing respective cluster id, name, status, created time stamp and updated time stamp.&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
	&lt;br /&gt;
&lt;br /&gt;
'''JSON Request'''&lt;br /&gt;
&lt;br /&gt;
N/A&lt;br /&gt;
&lt;br /&gt;
'''JSON Response'''&lt;br /&gt;
&lt;br /&gt;
{&lt;br /&gt;
    &amp;quot;clusters&amp;quot;: &amp;lt;nowiki&amp;gt;[&amp;lt;/nowiki&amp;gt;&lt;br /&gt;
        {&lt;br /&gt;
            &amp;quot;cluster_id&amp;quot;: &amp;quot;b51948c9-1ac5-4c28-a580-6f7c500d82f8&amp;quot;,&lt;br /&gt;
            &amp;quot;network_id&amp;quot;: &amp;quot;d32019d3-bc6e-4319-9c1d-6722fc136a22&amp;quot;,&lt;br /&gt;
            &amp;quot;name&amp;quot;: &amp;quot;Message Cluster 1&amp;quot;,&lt;br /&gt;
            &amp;quot;status&amp;quot;: &amp;quot;ACTIVE&amp;quot;,&lt;br /&gt;
            &amp;quot;flavor&amp;quot;: &amp;quot;medium&amp;quot;,&lt;br /&gt;
            &amp;quot;size&amp;quot;: &amp;quot;3&amp;quot;,&lt;br /&gt;
            &amp;quot;created&amp;quot;: &amp;quot;2014-11-11T01:02:03Z&amp;quot;,&lt;br /&gt;
            &amp;quot;updated&amp;quot;: &amp;quot;2014-11-11T01:02:03Z&amp;quot;&lt;br /&gt;
        },&lt;br /&gt;
        {&lt;br /&gt;
            &amp;quot;cluster_id&amp;quot;: &amp;quot;13c456c9-bbfc-4c31-b26d-3ae5c3cd7a77&amp;quot;,&lt;br /&gt;
            &amp;quot;network_id&amp;quot;: &amp;quot;d32019d3-bc6e-4319-9c1d-6722fc136a22&amp;quot;,&lt;br /&gt;
            &amp;quot;name&amp;quot;: &amp;quot;Message Cluster 2&amp;quot;,&lt;br /&gt;
            &amp;quot;status&amp;quot;: &amp;quot;BUILDING&amp;quot;,&lt;br /&gt;
            &amp;quot;flavor&amp;quot;: &amp;quot;small&amp;quot;,&lt;br /&gt;
            &amp;quot;size&amp;quot;: &amp;quot;5&amp;quot;,&lt;br /&gt;
            &amp;quot;created&amp;quot;: &amp;quot;2014-11-12T13:23:54Z&amp;quot;,&lt;br /&gt;
            &amp;quot;updated&amp;quot;: &amp;quot;2014-11-13T19:55:01Z&amp;quot;&lt;br /&gt;
        }&lt;br /&gt;
    ]&lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
==== Create Cluster ====&lt;br /&gt;
&lt;br /&gt;
'''''POST /v1/clusters'''''&lt;br /&gt;
&lt;br /&gt;
This operation asynchronously creates a new cluster of Nova instances provisioned with the required message brokers in a central project id. &lt;br /&gt;
&lt;br /&gt;
'''Request Parameters'''&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
! Parameter !! Type !! Description&lt;br /&gt;
|-&lt;br /&gt;
| nic || UUID || Network Identification for a Neutron network where cluster will be created in.&lt;br /&gt;
|-&lt;br /&gt;
| name || string || Name of cluster.&lt;br /&gt;
|-&lt;br /&gt;
| flavor || string || Cluster node flavor, which specify VM type in terms of CPU/memory/disk resources (e.g. small, medium, large).&lt;br /&gt;
|-&lt;br /&gt;
| size || int || Number of nodes in cluster.&lt;br /&gt;
|-&lt;br /&gt;
| volume_size || int || Optional parameter to indicate size of volume for node instance.  If volumes are supported, then this parameter will be used.  If ephmeral disk are not supported, volume support will be required.&lt;br /&gt;
&lt;br /&gt;
small:  1 GHz dual-core CPU; 512 MB memory; 250 GB disk&lt;br /&gt;
&lt;br /&gt;
medium: 2.8 GHz dual-core CPU; 4 GB memory; 1 TB disk&lt;br /&gt;
&lt;br /&gt;
large: 3.6 GHz quad-core CPU; 32 GB memory; 5 TB disk&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
'''Response Codes'''&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
! Response !! Code(s)&lt;br /&gt;
|-&lt;br /&gt;
| Normal || 202 (accepted)&lt;br /&gt;
|-&lt;br /&gt;
| Error || badRequest (400), unauthorized (401), itemNotFound (404)&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
'''Response Parameters'''&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
! Parameter !! Type !! Description&lt;br /&gt;
|-&lt;br /&gt;
| cluster_id || UUID || ID of cluster to be created.&lt;br /&gt;
|-&lt;br /&gt;
| name || string || Name of cluster (same as provided name in request parameters).&lt;br /&gt;
|-&lt;br /&gt;
| status || string || Current status of cluster.&lt;br /&gt;
&lt;br /&gt;
BUILDING: Cluster is in progress of being provisioned.&lt;br /&gt;
&lt;br /&gt;
ACTIVE:  Cluster is running.&lt;br /&gt;
&lt;br /&gt;
ERROR: Provisioning error(s) encountered.&lt;br /&gt;
&lt;br /&gt;
DELETED:  Cluster has been deleted.&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
'''JSON Request'''&lt;br /&gt;
&lt;br /&gt;
{&lt;br /&gt;
    &amp;quot;network_id&amp;quot;: &amp;quot;d32019d3-bc6e-4319-9c1d-6722fc136a22&amp;quot;,&lt;br /&gt;
    &amp;quot;name&amp;quot;: &amp;quot;MessageCluster1&amp;quot;,&lt;br /&gt;
    &amp;quot;flavor&amp;quot;: &amp;quot;large&amp;quot;,&lt;br /&gt;
    &amp;quot;size&amp;quot;: &amp;quot;3&amp;quot;,&lt;br /&gt;
    &amp;quot;volume_size&amp;quot;: &amp;quot;100&amp;quot;&lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
'''JSON Response'''&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
{&lt;br /&gt;
    &amp;quot;cluster&amp;quot;: {&lt;br /&gt;
        &amp;quot;cluster_id&amp;quot;: &amp;quot;dd745f4a-9333-417e-bb89-9c989c84c068&amp;quot;,&lt;br /&gt;
        &amp;quot;network_id&amp;quot;: &amp;quot;d32019d3-bc6e-4319-9c1d-6722fc136a22&amp;quot;,&lt;br /&gt;
        &amp;quot;name&amp;quot;: &amp;quot;Message Cluster 1&amp;quot;,&lt;br /&gt;
        &amp;quot;status&amp;quot;: &amp;quot;BUILDING&amp;quot;,&lt;br /&gt;
        &amp;quot;flavor&amp;quot;: &amp;quot;large&amp;quot;,&lt;br /&gt;
        &amp;quot;size&amp;quot;: &amp;quot;3&amp;quot;,&lt;br /&gt;
        &amp;quot;volume_size&amp;quot;: &amp;quot;100&amp;quot;,&lt;br /&gt;
        &amp;quot;created&amp;quot;: &amp;quot;2014-11-11T01:02:03Z&amp;quot;,&lt;br /&gt;
        &amp;quot;updated&amp;quot;: &amp;quot;2014-11-11T01:02:03Z&amp;quot;&lt;br /&gt;
    }&lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
==== Show Cluster ====&lt;br /&gt;
&lt;br /&gt;
'''''GET /v1/clusters/{cluster_id}'''''&lt;br /&gt;
&lt;br /&gt;
This operation synchronously returns the status and information on the specified cluster within the provided project id.&lt;br /&gt;
&lt;br /&gt;
'''Request Parameters'''&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
! Parameter !! Type !! Description&lt;br /&gt;
|-&lt;br /&gt;
| cluster_id (URI) || UUID || Cluster ID.  This value is returned when a new cluster is created.&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
'''Response Codes'''&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
! Response !! Code(s)&lt;br /&gt;
|-&lt;br /&gt;
| Normal || ok (200)&lt;br /&gt;
|-&lt;br /&gt;
| Error || unauthorized (401), itemNotFound (404)&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
'''Response Parameters'''&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
! Parameter !! Type !! Description&lt;br /&gt;
|-&lt;br /&gt;
| cluster_id || UUID || ID of requested cluster.&lt;br /&gt;
|-&lt;br /&gt;
| name || string || Name of cluster.&lt;br /&gt;
|-&lt;br /&gt;
| status || string || Current status of cluster.&lt;br /&gt;
&lt;br /&gt;
BUILDING: Cluster is in progress of being provisioned.&lt;br /&gt;
&lt;br /&gt;
ACTIVE:  Cluster is running.&lt;br /&gt;
&lt;br /&gt;
ERROR: Provisioning error(s) encountered.&lt;br /&gt;
&lt;br /&gt;
DELETED:  Cluster has been deleted.&lt;br /&gt;
|-&lt;br /&gt;
| created || string || Created time stamp in format: yyyy-mm-ddThh:mm:ssZ&lt;br /&gt;
|-&lt;br /&gt;
| updated || string || Last updated time stamp in format: yyyy-mm-ddThh:mm:ssZ&lt;br /&gt;
|-&lt;br /&gt;
| nodes(list) || node || List of nodes, which includes node id, instance state, and flavor.&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
'''JSON Request'''&lt;br /&gt;
&lt;br /&gt;
N/A&lt;br /&gt;
&lt;br /&gt;
'''JSON Response'''&lt;br /&gt;
&lt;br /&gt;
{&lt;br /&gt;
    &amp;quot;cluster&amp;quot;: {&lt;br /&gt;
        &amp;quot;cluster_id&amp;quot;: &amp;quot;dd745f4a-9333-417e-bb89-9c989c84c068&amp;quot;,&lt;br /&gt;
        &amp;quot;network_id&amp;quot;: &amp;quot;d32019d3-bc6e-4319-9c1d-6722fc136a22&amp;quot;,&lt;br /&gt;
        &amp;quot;name&amp;quot;: &amp;quot;Message Cluster 1&amp;quot;,&lt;br /&gt;
        &amp;quot;status&amp;quot;: &amp;quot;ACTIVE&amp;quot;,&lt;br /&gt;
        &amp;quot;flavor&amp;quot;: &amp;quot;large&amp;quot;,&lt;br /&gt;
        &amp;quot;size&amp;quot;: &amp;quot;3&amp;quot;,&lt;br /&gt;
        &amp;quot;volume_size&amp;quot;: &amp;quot;100&amp;quot;,&lt;br /&gt;
        &amp;quot;created&amp;quot;: &amp;quot;2014-11-11T01:02:03Z&amp;quot;,&lt;br /&gt;
        &amp;quot;updated&amp;quot;: &amp;quot;2014-11-11T01:02:03Z&amp;quot;,&lt;br /&gt;
        &amp;quot;endpoints&amp;quot;: [&lt;br /&gt;
            {&lt;br /&gt;
                &amp;quot;type&amp;quot;: &amp;quot;AMQP&amp;quot;,&lt;br /&gt;
                &amp;quot;value&amp;quot;: &amp;quot;amqp://10.20.30.40:10000&amp;quot;&lt;br /&gt;
            },&lt;br /&gt;
            {&lt;br /&gt;
                &amp;quot;type&amp;quot;: &amp;quot;console&amp;quot;,&lt;br /&gt;
                &amp;quot;value&amp;quot;: &amp;quot;http://10.20.30.40:5672&amp;quot;&lt;br /&gt;
            },&lt;br /&gt;
            {&lt;br /&gt;
                &amp;quot;type&amp;quot;: &amp;quot;AMQP&amp;quot;,&lt;br /&gt;
                &amp;quot;value&amp;quot;: &amp;quot;amqp://10.20.30.41:10000&amp;quot;&lt;br /&gt;
            },&lt;br /&gt;
            {&lt;br /&gt;
                &amp;quot;type&amp;quot;: &amp;quot;console&amp;quot;,&lt;br /&gt;
                &amp;quot;value&amp;quot;: &amp;quot;http://10.20.30.41:5672&amp;quot;&lt;br /&gt;
            },&lt;br /&gt;
            {&lt;br /&gt;
                &amp;quot;type&amp;quot;: &amp;quot;AMQP&amp;quot;,&lt;br /&gt;
                &amp;quot;value&amp;quot;: &amp;quot;amqp://10.20.30.42:10000&amp;quot;&lt;br /&gt;
            },&lt;br /&gt;
            {&lt;br /&gt;
                &amp;quot;type&amp;quot;: &amp;quot;console&amp;quot;,&lt;br /&gt;
                &amp;quot;value&amp;quot;: &amp;quot;http://10.20.30.42:5672&amp;quot;&lt;br /&gt;
            }&lt;br /&gt;
        ]&lt;br /&gt;
    }&lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
==== Delete Cluster ====&lt;br /&gt;
&lt;br /&gt;
'''''DELETE /v1/clusters/{cluster_id}'''''''&lt;br /&gt;
&lt;br /&gt;
This operation will asynchronously delete the indicated cluster within the provided project id.&lt;br /&gt;
&lt;br /&gt;
'''Request Parameters'''&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
! Parameter !! Type !! Description&lt;br /&gt;
|-&lt;br /&gt;
| cluster_id (URI) || UUID || Cluster ID.  This value is returned when a new cluster is created.&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
'''Response Codes'''&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
! Response !! Code(s)&lt;br /&gt;
|-&lt;br /&gt;
| Normal || accepted (202)&lt;br /&gt;
|-&lt;br /&gt;
| Error || unauthorized (401), itemNotFound (404)&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
'''Response Parameters'''&lt;br /&gt;
&lt;br /&gt;
N/A&lt;br /&gt;
&lt;br /&gt;
'''JSON Request'''&lt;br /&gt;
&lt;br /&gt;
N/A&lt;br /&gt;
&lt;br /&gt;
'''JSON Response'''&lt;br /&gt;
&lt;br /&gt;
N/A&lt;br /&gt;
&lt;br /&gt;
==== Update Cluster ====&lt;br /&gt;
&lt;br /&gt;
'''''PATCH /v1/clusters/{cluster_id}'''''&lt;br /&gt;
&lt;br /&gt;
This operation will asynchronously updated the indicated cluster (cluster_id) based on the request body received.  The request body structure is the same as create cluster api.  Cue will automatically detect differences and perform appropriate actions in order to update cluster accordingly.&lt;br /&gt;
&lt;br /&gt;
'''Request Parameters'''&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
! Parameter !! Type !! Description&lt;br /&gt;
|-&lt;br /&gt;
| nic || UUID || Network Identification for a Neutron network where cluster will be created in.&lt;br /&gt;
|-&lt;br /&gt;
| name || string || Name of cluster.&lt;br /&gt;
|-&lt;br /&gt;
| volume_size || int || Optional parameter to indicate size of volume for node instance.  If volumes are supported, then this parameter will be used.  If ephmeral disk are not supported, volume support will be required.&lt;br /&gt;
|-&lt;br /&gt;
| flavor (list) || string || List of node flavors, which specify VM type in terms of CPU/memory/disk resources (e.g. small, medium, large).  Size of list denotes the number of nodes in cluster.&lt;br /&gt;
&lt;br /&gt;
small:  1 GHz dual-core CPU; 512 MB memory; 250 GB disk&lt;br /&gt;
&lt;br /&gt;
medium: 2.8 GHz dual-core CPU; 4 GB memory; 1 TB disk&lt;br /&gt;
&lt;br /&gt;
large: 3.6 GHz quad-core CPU; 32 GB memory; 5 TB disk&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
'''Response Codes'''&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
! Response !! Code(s)&lt;br /&gt;
|-&lt;br /&gt;
| Normal || 202 (accepted)&lt;br /&gt;
|-&lt;br /&gt;
| Error || badRequest (400), unauthorized (401), itemNotFound (404)&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
'''Response Parameters'''&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
! Parameter !! Type !! Description&lt;br /&gt;
|-&lt;br /&gt;
| cluster_id || UUID || ID of cluster to be created.&lt;br /&gt;
|-&lt;br /&gt;
| name || string || Name of cluster (same as provided name in request parameters).&lt;br /&gt;
|-&lt;br /&gt;
| status || string || Current status of cluster.&lt;br /&gt;
&lt;br /&gt;
BUILDING: Cluster is in progress of being provisioned.&lt;br /&gt;
&lt;br /&gt;
ACTIVE:  Cluster is running.&lt;br /&gt;
&lt;br /&gt;
ERROR: Provisioning error(s) encountered.&lt;br /&gt;
&lt;br /&gt;
DELETED:  Cluster has been deleted.&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
'''JSON Request'''&lt;br /&gt;
&lt;br /&gt;
{&lt;br /&gt;
    &amp;quot;network_id&amp;quot;: &amp;quot;d32019d3-bc6e-4319-9c1d-6722fc136a22&amp;quot;,&lt;br /&gt;
    &amp;quot;name&amp;quot;: &amp;quot;MessageCluster1&amp;quot;,&lt;br /&gt;
    &amp;quot;flavor&amp;quot;: &amp;quot;large&amp;quot;,&lt;br /&gt;
    &amp;quot;size&amp;quot;: &amp;quot;3&amp;quot;,&lt;br /&gt;
    &amp;quot;volume_size&amp;quot;: &amp;quot;100&amp;quot;&lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
'''JSON Response'''&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
{&lt;br /&gt;
    &amp;quot;cluster&amp;quot;: {&lt;br /&gt;
        &amp;quot;cluster_id&amp;quot;: &amp;quot;dd745f4a-9333-417e-bb89-9c989c84c068&amp;quot;,&lt;br /&gt;
        &amp;quot;network_id&amp;quot;: &amp;quot;d32019d3-bc6e-4319-9c1d-6722fc136a22&amp;quot;,&lt;br /&gt;
        &amp;quot;name&amp;quot;: &amp;quot;Message Cluster 1&amp;quot;,&lt;br /&gt;
        &amp;quot;status&amp;quot;: &amp;quot;BUILDING&amp;quot;,&lt;br /&gt;
        &amp;quot;flavor&amp;quot;: &amp;quot;large&amp;quot;,&lt;br /&gt;
        &amp;quot;size&amp;quot;: &amp;quot;3&amp;quot;,&lt;br /&gt;
        &amp;quot;volume_size&amp;quot;: &amp;quot;100&amp;quot;,&lt;br /&gt;
        &amp;quot;created&amp;quot;: &amp;quot;2014-11-11T01:02:03Z&amp;quot;,&lt;br /&gt;
        &amp;quot;updated&amp;quot;: &amp;quot;2014-11-11T01:02:03Z&amp;quot;&lt;br /&gt;
    }&lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
===Testing===&lt;br /&gt;
&lt;br /&gt;
Cue API testing will verify the expected functionality of the Cue user interface with both positive/negative tests.  The overall scope will cover testing from the HTTP REST request to required database interactions and work-flow task submission for RPC workers.&lt;br /&gt;
&lt;br /&gt;
====Unit Tests====&lt;br /&gt;
&lt;br /&gt;
Unit tests will verify the resulting function calls for each REST-ful URI and action(s).  The Python Mock library will be used to replace external system dependencies with placeholder objects.&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
! Function !! Tests !! Input Data !! Expected Result(s)&lt;br /&gt;
|-&lt;br /&gt;
| List Clusters || &lt;br /&gt;
# Create 'n' cluster(s), then call list clusters and verify expected return object&lt;br /&gt;
# Call list clusters when no clusters exist within a project id and verify expected return object&lt;br /&gt;
|| &lt;br /&gt;
* n = # of clusters to create&lt;br /&gt;
||&lt;br /&gt;
# List of 'n' clusters is returned with appropriate fields, HTTP Ok (200)&lt;br /&gt;
# Empty list of clusters is returned, HTTP Ok (200)&lt;br /&gt;
|-&lt;br /&gt;
| Create Cluster || &lt;br /&gt;
# Create standard cluster 'c' and verify expected return object&lt;br /&gt;
# Create cluster with invalid flavor and verify expected return value&lt;br /&gt;
# Create cluster with invalid volume size and verify expected return value&lt;br /&gt;
||&lt;br /&gt;
* n = cluster size (number of nodes)&lt;br /&gt;
* m = cluster name&lt;br /&gt;
* f = flavor&lt;br /&gt;
* s = volume size&lt;br /&gt;
* nic = Network UUID&lt;br /&gt;
||&lt;br /&gt;
# Cluster ID, name and status for newly created cluster is returned, HTTP Accepted (202)&lt;br /&gt;
# HTTP Bad request is returned (400)&lt;br /&gt;
# HTTP Bad request is returned (400)&lt;br /&gt;
|-&lt;br /&gt;
| Show Cluster ||&lt;br /&gt;
# Create cluster, then call get cluster and verify expected return object&lt;br /&gt;
# Get cluster with invalid cluster_id&lt;br /&gt;
||&lt;br /&gt;
* cluster_id = cluster ID&lt;br /&gt;
||&lt;br /&gt;
# Cluster ID, name, status, created/updated date stamp and list of nodes is returned, HTTP Ok (200).&lt;br /&gt;
# HTTP Bad request is returned (400)&lt;br /&gt;
|-&lt;br /&gt;
| Delete Cluster || &lt;br /&gt;
# Create a cluster, then call delete cluster and verify expected return value&lt;br /&gt;
# Delete cluster with invalid cluster_id&lt;br /&gt;
||&lt;br /&gt;
* cluster_id = cluster ID&lt;br /&gt;
||&lt;br /&gt;
# HTTP accepted is returned (202)&lt;br /&gt;
# HTTP Bad request is returned (400)&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
====Functional Tests====&lt;br /&gt;
&lt;br /&gt;
The functional tests will verify the HTTP REST URI request lifecycle from controller routing to HTTP response.  These tests will make use of Pecan's testing utility; pecan.testing module.&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
! Operation !! URI !! Tests !! Input Data !! Expected Data (JSON)&lt;br /&gt;
|-&lt;br /&gt;
| GET || /v1/clusters || &lt;br /&gt;
# Call when clusters exist&lt;br /&gt;
# Call when no clusters exist&lt;br /&gt;
|| &lt;br /&gt;
* n/a&lt;br /&gt;
||&lt;br /&gt;
# List of 'n' clusters is returned with appropriate fields, HTTP Ok (200)&lt;br /&gt;
# Empty list of clusters is returned, HTTP Ok (200)&lt;br /&gt;
|-&lt;br /&gt;
| POST || /v1/clusters ||&lt;br /&gt;
# Create standard cluster 'c' and verify expected return object&lt;br /&gt;
# Create cluster with invalid flavor and verify expected return value&lt;br /&gt;
# Create cluster with invalid volume size and verify expected return value&lt;br /&gt;
|| &lt;br /&gt;
* n = cluster size (number of nodes)&lt;br /&gt;
* m = cluster name&lt;br /&gt;
* f = flavor&lt;br /&gt;
* s = volume size&lt;br /&gt;
* nic = Network UUID&lt;br /&gt;
||&lt;br /&gt;
# Cluster ID, name and status for newly created cluster is returned, HTTP Accepted (202)&lt;br /&gt;
# HTTP Bad request is returned (400)&lt;br /&gt;
# HTTP Bad request is returned (400)&lt;br /&gt;
||&lt;br /&gt;
|-&lt;br /&gt;
| GET || /v1/clusters/{cluster_id} || &lt;br /&gt;
# Create cluster, then call get cluster and verify expected return object&lt;br /&gt;
# Get cluster with invalid cluster_id&lt;br /&gt;
|| &lt;br /&gt;
* cluster_id = cluster &lt;br /&gt;
||&lt;br /&gt;
# Cluster ID, name, status, created/updated date stamp and list of nodes is returned, HTTP Ok (200).&lt;br /&gt;
# HTTP Bad request is returned (400)&lt;br /&gt;
||&lt;br /&gt;
|-&lt;br /&gt;
| DELETE || /v1/clusters/{cluster_id} ||&lt;br /&gt;
# Create a cluster, then call delete cluster and verify expected return value&lt;br /&gt;
# Delete cluster with invalid cluster_id&lt;br /&gt;
||&lt;br /&gt;
* cluster_id = cluster ID&lt;br /&gt;
||&lt;br /&gt;
# HTTP accepted is returned (202)&lt;br /&gt;
# HTTP Bad request is returned (400)&lt;br /&gt;
||&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
====Integration Tests====&lt;br /&gt;
&lt;br /&gt;
The integration tests will cover API functionality from HTTP request to database access and task submission for RPC workers.  The Pecan test utility will be used to route test request URI to appropriate controllers, then database record(s) will be verified for applicable change.  Finally the creation of task objections will be verified to ensure valid task flows.&lt;/div&gt;</summary>
		<author><name>Dagnello</name></author>	</entry>

	</feed>