On 11/27/2013 04:56 PM, Zane Bitter wrote:
On 27/11/13 19:57, Jay Pipes wrote:

Actually, even simpler than that...

parameters:
   db:
    - db_name:
      description: blah
      help: blah
    - db_username:
      description: blah
      help: blah

After all, can't we assume that if the parameter value is a list, then
it is a group of parameters?

This resolves to a fairly weird construct:

{
   "parameters": {
     "db": [
       {
         "db_name": null,
         "description": "blah",
         "help": "blah"
       },
       {
         "description": "blah",
         "db_username": null,
         "help": "blah"
       }
     ]
   }
}

so the name is whichever key has a data value of null (what if there's
more than one?), and obviously it can't collide with any keywords like
"description" or "help".

I think I was going for more of the YAML that would resolve to this:

{
"parameters": {
 "db": [
  {
   "db_name": {
    "description": "blah",
    "help": "blah"
   }
  },
  {
   "db_username": {
    "description": "blah",
    "help": "blah"
   }
  },
 ]
}

Best,
-jay

_______________________________________________
OpenStack-dev mailing list
OpenStack-dev@lists.openstack.org
http://lists.openstack.org/cgi-bin/mailman/listinfo/openstack-dev

Reply via email to