<html>
<head>
<meta content="text/html; charset=ISO-8859-1"
http-equiv="Content-Type">
</head>
<body bgcolor="#FFFFFF" text="#000000">
<div class="moz-cite-prefix">On 11/15/2013 05:19 AM, Christopher
Armstrong wrote:<br>
</div>
<blockquote
cite="mid:CAPkRfUQRAfwGN+6_Nk2QPWv-tpz87f6q5ahx2bP102HwCqAzKA@mail.gmail.com"
type="cite">
<div dir="ltr"><a moz-do-not-send="true"
href="http://docs.heatautoscale.apiary.io/">http://docs.heatautoscale.apiary.io/</a>
<div><br>
</div>
<div>I've thrown together a rough sketch of the proposed API for
autoscaling. It's written in API-Blueprint format (which is a
simple subset of Markdown) and provides schemas for inputs and
outputs using JSON-Schema. The source document is currently
at <a moz-do-not-send="true"
href="https://github.com/radix/heat/raw/as-api-spike/autoscaling.apibp">https://github.com/radix/heat/raw/as-api-spike/autoscaling.apibp</a></div>
<div><br>
</div>
<div><br>
</div>
<div>Things we still need to figure out:</div>
<div><br>
</div>
<div>- how to scope projects/domains. put them in the URL? get
them from the token?</div>
<div>- how webhooks are done (though this shouldn't affect the
API too much; they're basically just opaque)</div>
<div><br>
</div>
<div>Please read and comment :)</div>
<br>
</div>
</blockquote>
Looking at the scaling policy I see<br>
<meta http-equiv="content-type" content="text/html;
charset=ISO-8859-1">
<pre class="outgoing oneSchemaCode language-javascript" style="font-family: 'Source Code Pro', 'Panic Sans', Monaco, monospace, sans-serif; font-size: 12px; white-space: pre; position: relative; color: rgb(170, 170, 170); text-shadow: white 0px 1px; direction: ltr; text-align: left; word-spacing: 0px; tab-size: 4; padding: 3px 0.7em 3px 3.8em; margin: 0.5em 0px; overflow: auto; background-color: rgb(255, 255, 255); line-height: 1.4em; display: block; font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; orphans: auto; text-indent: 0px; text-transform: none; widows: auto; -webkit-text-stroke-width: 0px; background-position: initial initial; background-repeat: initial initial;"><meta http-equiv="content-type" content="text/html; charset=ISO-8859-1"><code class=" language-javascript" style="font-family: 'Source Code Pro', 'Panic Sans', Monaco, monospace, sans-serif; font-size: 1em; position: relative; color: black; text-shadow: white 0px 1p!
x; directi
on: ltr; text-align: left; white-space: pre; word-spacing: normal; tab-size: 4;"> <span class="token string oneLine" style="color: rgb(51, 153, 0);">"change"</span><span class="token punctuation" style="color: rgb(153, 153, 153);">:</span> <span class="token punctuation" style="color: rgb(153, 153, 153);">{</span>
<span class="token string oneLine" style="color: rgb(51, 153, 0);">"type"</span><span class="token punctuation" style="color: rgb(153, 153, 153);">:</span> <span class="token string oneLine" style="color: rgb(51, 153, 0);">"integer"</span><span class="token punctuation" style="color: rgb(153, 153, 153);">,</span>
<span class="token string oneLine" style="color: rgb(51, 153, 0);">"description"</span><span class="token punctuation" style="color: rgb(153, 153, 153);">:</span> <span class="token string oneLine" style="color: rgb(51, 153, 0);">"a number that has an effect based on change_type."</span><span class="token punctuation" style="color: rgb(153, 153, 153);">}</span><span class="token punctuation" style="color: rgb(153, 153, 153);">,</span>
<span class="token string oneLine" style="color: rgb(51, 153, 0);">"change_type"</span><span class="token punctuation" style="color: rgb(153, 153, 153);">:</span> <span class="token punctuation" style="color: rgb(153, 153, 153);">{</span>
<span class="token string oneLine" style="color: rgb(51, 153, 0);">"type"</span><span class="token punctuation" style="color: rgb(153, 153, 153);">:</span> <span class="token string oneLine" style="color: rgb(51, 153, 0);">"string"</span><span class="token punctuation" style="color: rgb(153, 153, 153);">,</span>
<span class="token string oneLine" style="color: rgb(51, 153, 0);">"enum"</span><span class="token punctuation" style="color: rgb(153, 153, 153);">:</span> <span class="token punctuation" style="color: rgb(153, 153, 153);">[</span><span class="token string oneLine" style="color: rgb(51, 153, 0);">"change_in_capacity"</span><span class="token punctuation" style="color: rgb(153, 153, 153);">,</span>
<span class="token string oneLine" style="color: rgb(51, 153, 0);">"percentage_change_in_capacity"</span><span class="token punctuation" style="color: rgb(153, 153, 153);">,</span>
<span class="token string oneLine" style="color: rgb(51, 153, 0);">"exact_capacity"</span><span class="token punctuation" style="color: rgb(153, 153, 153);">]</span><span class="token punctuation" style="color: rgb(153, 153, 153);">,</span>
<span class="token string oneLine" style="color: rgb(51, 153, 0);">"description"</span><span class="token punctuation" style="color: rgb(153, 153, 153);">:</span> <span class="token string oneLine" style="color: rgb(51, 153, 0);">"describes the way that 'change' will apply to the active capacity of the scaling group"</span><span class="token punctuation" style="color: rgb(153, 153, 153);">}</span><span class="token punctuation" style="color: rgb(153, 153, 153);">,</span></code><code class=" language-javascript" style="font-family: 'Source Code Pro', 'Panic Sans', Monaco, monospace, sans-serif; font-size: 1em; position: relative; color: black; text-shadow: white 0px 1px; direction: ltr; text-align: left; white-space: pre; word-spacing: normal; tab-size: 4;"><span class="token punctuation" style="color: rgb(153, 153, 153);">
</span></code></pre>
There could be an issue with percentage_change_in_capacity whenever
that evaluates to needing to scale by between zero and one
resources. I thought that maybe the percentage_change_in_capacity
option should be dropped, but it might be enough to always round up
any non-zero capacity change.<br>
<br>
<br>
</body>
</html>