In my opinion it would be enough to read table schema
from stdio, then it is possible to use pipe for input from any stream


On Fri, Apr 25, 2014 at 6:25 AM, ANDREY OSTAPENKO (CS) <
[email protected]> wrote:

> Hello, everyone!
>
> Now I'm starting to implement cli client for KeyValue Storage service
> MagnetoDB.
> I'm going to use heat approach for cli commands, e.g. heat stack-create
> --template-file <FILE>,
> because we have too many parameters to pass to the command.
> For example, table creation command:
>
> magnetodb create-table --description-file <FILE>
>
> File will contain json data, e.g.:
>
> {
>     "table_name": "data",
>     "attribute_definitions": [
>         {
>             "attribute_name": "Attr1",
>             "attribute_type": "S"
>         },
>         {
>             "attribute_name": "Attr2",
>             "attribute_type": "S"
>         },
>     {
>             "attribute_name": "Attr3",
>             "attribute_type": "S"
>         }
>     ],
>     "key_schema": [
>         {
>             "attribute_name": "Attr1",
>             "key_type": "HASH"
>         },
>         {
>             "attribute_name": "Attr2",
>             "key_type": "RANGE"
>         }
>     ],
>     "local_secondary_indexes": [
>         {
>             "index_name": "IndexName",
>             "key_schema": [
>                 {
>                     "attribute_name": "Attr1",
>                     "key_type": "HASH"
>                 },
>                 {
>                     "attribute_name": "Attr3",
>                     "key_type": "RANGE"
>                 }
>             ],
>             "projection": {
>                 "projection_type": "ALL"
>             }
>         }
>     ]
> }
>
> Blueprint:
> https://blueprints.launchpad.net/magnetodb/+spec/magnetodb-cli-client
>
> If you have any comments, please let me know.
>
> Best regards,
> Andrey Ostapenko




-- 
Best regards,
Dmitriy Ukhlov
Mirantis Inc.
_______________________________________________
OpenStack-dev mailing list
[email protected]
http://lists.openstack.org/cgi-bin/mailman/listinfo/openstack-dev

Reply via email to