<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/27/2013 11:02 AM, Christopher
Armstrong wrote:<br>
</div>
<blockquote
cite="mid:CAPkRfUQAKRFRbBA3j55n76J6=q41gkf7D2xYjnYAiU1zRaqqvw@mail.gmail.com"
type="cite">
<div dir="ltr">
<div class="gmail_extra">
<div class="gmail_quote">On Tue, Nov 26, 2013 at 3:24 PM, Tim
Schnell <span dir="ltr"><<a moz-do-not-send="true"
href="mailto:tim.schnell@rackspace.com" target="_blank">tim.schnell@rackspace.com</a>></span>
wrote:<br>
<br>
<div> </div>
<blockquote class="gmail_quote" style="margin:0 0 0
.8ex;border-left:1px #ccc solid;padding-left:1ex">
Use Case #3<br>
Grouping parameters would help the client make smarter
decisions about how<br>
to display the parameters for input to the end-user. This
is so that all<br>
parameters related to some database resource can be
intelligently grouped<br>
together. In addition to grouping these parameters
together, there should<br>
be a method to ensuring that the order within the group of
parameters can<br>
be explicitly stated. This way, the client can return a
group of database<br>
parameters and the template author can indicate that the
database instance<br>
name should be first, then the username, then the
password, instead of<br>
that group being returned in a random order.<br>
<br>
Parameters:<br>
db_name:<br>
group: db<br>
order: 0<br>
db_username:<br>
group: db<br>
order: 1<br>
db_password:<br>
group: db<br>
order: 2<br>
web_node_name:<br>
group: web_node<br>
order: 0<br>
keypair:<br>
group: web_node<br>
order: 1<br>
<br>
<br>
<br>
</blockquote>
<div><br>
</div>
<div>Have you considered just rendering them in the order
that they appear in the template? I realize it's not the
name (since you don't have any group names that you could
use as a title for "boxes" around groups of parameters),
but it might be a good enough compromise. If you think
it's absolutely mandatory to be able to group them in
named groups, then I would actually propose a prettier
syntax:</div>
<div><br>
</div>
<div>ParameterGroups:</div>
<div> db:</div>
<div> name: ...</div>
<div> username: ...</div>
<div> password: ...</div>
<div> web_node:</div>
<div> name: ...</div>
<div> keypair: ...</div>
<div><br>
</div>
<div>The ordering would be based on the ordering that they
appear within the template, and you wouldn't have to
repeat yourself naming the group for each parameter.</div>
<div><br>
</div>
<div>Thanks very much for writing up these use cases!</div>
</div>
<div><br>
</div>
</div>
</div>
</blockquote>
Good point, I'd like to revise my previous parameter-groups example:<br>
<pre wrap="">parameter-groups:
- name: db
description: Database configuration options
parameters: [db_name, db_username, db_password]
- name: web_node
description: Web server configuration
parameters: [web_node_name, keypair]
parameters:
# as above, but without requiring any order or group attributes
Here, parameter-groups is a list which implies the order, and parameters are specified in the group as a list, so we get the order from that too. This means a new parameter-groups section which contains anything required to build a good parameters form, and no modifications required to the parameters section at all.
</pre>
<br>
</body>
</html>