[openstack-dev] MagnetoDB CLI client

Ilya Sviridov isviridov at mirantis.com
Mon Apr 28 13:37:53 UTC 2014


Hello Andrey,

Great!

Looking closer at blueprint, I've realized that parameter naming is
confusing.

I would suggest to use --request-file parameter instead --description-file
used now.

Also, I believe that table-list will be the most popular call and it has
only two parameters, so would be better to avoid json for that in cli and
pass all info via command line.

like
magnetodb table-list --exclusive-start-table-name  table_1 --count 10

Probably we have to think about default behavior when no json passed or
required arguments are passed as CLI arguments for easier usage.
Scan looks as a good example.


BTW: We have dedicated mail prefix in order to not to spam everybody, but
only MagnetoDB project interest audience :) so just add
[openstack-dev][MagnetoDB] at the beginning of email subject next time.

Thank you
Ilya




On Fri, Apr 25, 2014 at 4:29 PM, ANDREY OSTAPENKO (CS) <
Andrey_Ostapenko at symantec.com> 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
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.openstack.org/pipermail/openstack-dev/attachments/20140428/570fa0e2/attachment.html>


More information about the OpenStack-dev mailing list