<div dir="ltr">In my opinion it would be enough to read table schema <br>from stdio, then it is possible to use pipe for input from any stream<br></div><div class="gmail_extra"><br><br><div class="gmail_quote">On Fri, Apr 25, 2014 at 6:25 AM, ANDREY OSTAPENKO (CS) <span dir="ltr"><<a href="mailto:Andrey_Ostapenko@symantec.com" target="_blank">Andrey_Ostapenko@symantec.com</a>></span> wrote:<br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">Hello, everyone!<br>
<br>
Now I'm starting to implement cli client for KeyValue Storage service MagnetoDB.<br>
I'm going to use heat approach for cli commands, e.g. heat stack-create --template-file <FILE>,<br>
because we have too many parameters to pass to the command.<br>
For example, table creation command:<br>
<br>
magnetodb create-table --description-file <FILE><br>
<br>
File will contain json data, e.g.:<br>
<br>
{<br>
"table_name": "data",<br>
"attribute_definitions": [<br>
{<br>
"attribute_name": "Attr1",<br>
"attribute_type": "S"<br>
},<br>
{<br>
"attribute_name": "Attr2",<br>
"attribute_type": "S"<br>
},<br>
{<br>
"attribute_name": "Attr3",<br>
"attribute_type": "S"<br>
}<br>
],<br>
"key_schema": [<br>
{<br>
"attribute_name": "Attr1",<br>
"key_type": "HASH"<br>
},<br>
{<br>
"attribute_name": "Attr2",<br>
"key_type": "RANGE"<br>
}<br>
],<br>
"local_secondary_indexes": [<br>
{<br>
"index_name": "IndexName",<br>
"key_schema": [<br>
{<br>
"attribute_name": "Attr1",<br>
"key_type": "HASH"<br>
},<br>
{<br>
"attribute_name": "Attr3",<br>
"key_type": "RANGE"<br>
}<br>
],<br>
"projection": {<br>
"projection_type": "ALL"<br>
}<br>
}<br>
]<br>
}<br>
<br>
Blueprint: <a href="https://blueprints.launchpad.net/magnetodb/+spec/magnetodb-cli-client" target="_blank">https://blueprints.launchpad.net/magnetodb/+spec/magnetodb-cli-client</a><br>
<br>
If you have any comments, please let me know.<br>
<br>
Best regards,<br>
Andrey Ostapenko</blockquote></div><br><br clear="all"><br>-- <br><div dir="ltr"><div><div>Best regards,<br></div>Dmitriy Ukhlov<br></div>Mirantis Inc.<br></div>
</div>