.. This work is licensed under a Creative Commons Attribution 3.0 Unported License. http://creativecommons.org/licenses/by/3.0/legalcode Sections of this template were taken directly from the Nova spec template at: https://github.com/openstack/nova-specs/blob/master/specs/juno-template.rst .. ======================================= Trove support in python-openstackclient ======================================= Implement a new set of trove commands as python-openstackclient plugins. Launchpad Blueprint: https://blueprints.launchpad.net/trove/+spec/trove-support-in-python-openstackclient Problem Description =================== python-openstackclient is becoming the default command line client for many OpenStack projects. Trove would benefit from implementing all of its client commands as a single python-openstackclient plugin implemented in the python-troveclient repository. Proposed Change =============== The intent of this spec is to identify the commands to be implemented and establish conventions for command and argument names. This spec is not intended to be a full and correct specification of command and argument names. The details can be left to the code reviews for the commands themselves. The following conventions will be adopted for command names: * As per the ``OpenStackClient`` convention, the command name shall always take the following form: .. code-block:: bash openstack [] [] \ [command-arguments] The following conventions will be adopted for arguments and argument flags: * Single character flags will be avoided as per the ``openstack`` convention, except for very common arguments. * When the database or cluster name and ID are specified it will be the first and second positional arguments respectively after the full command names. * When an argument is required it will be a positional argument. The following ``trove`` commands are already implemented for ``openstack``: .. code-block:: bash trove secgroup-add-rule openstack security group rule create trove secgroup-delete-rule openstack security group rule delete trove secgroup-list openstack security group list trove secgroup-list-rules openstack security group rule list The following ``trove`` commands will be implemented for ``openstack`` initially suggesting these command names: .. code-block:: bash trove backup-create openstack database backup create trove backup-delete openstack database backup delete trove backup-list openstack database backup list trove backup-list-instance openstack database backup list trove backup-show openstack database backup show trove cluster-create openstack database cluster create trove cluster-delete openstack database cluster delete trove cluster-list openstack database cluster list trove cluster-modules openstack database module list cluster trove cluster-show openstack database cluster show trove configuration-attach openstack database configuration add trove configuration-create openstack database configuration create trove configuration-default openstack database configuration show trove configuration-delete openstack database configuration delete trove configuration-detach openstack database configuration remove trove configuration-instances openstack database configuration list --instance trove configuration-list openstack database configuration list trove configuration-parameter-list openstack database configuration parameter list trove configuration-parameter-show openstack database configuration parameter show trove configuration-patch openstack database configuration set --patch trove configuration-show openstack database configuration show trove configuration-update openstack database configuration set trove create openstack database cluster create trove database-create openstack database add trove database-delete openstack database remove trove database-list openstack database list trove datastore-list openstack datastore list trove datastore-show openstack datastore show trove datastore-version-list openstack datastore version list trove datastore-version-show openstack datastore version show trove delete openstack database cluster delete trove detach-replica openstack database replica unset trove flavor-list openstack database flavor list trove flavor-show openstack database flavor show trove limit-list openstack database limits list trove list openstack database instance list openstack database cluster list trove module-apply openstack database instance set module trove module-create openstack database module create trove module-delete openstack database module delete trove module-instances openstack database instance list module trove module-list openstack database module list trove module-list-instance openstack database module list instance trove module-query openstack database instance list module --status trove module-remove openstack database instance remove module trove module-retrieve openstack database instance show module trove module-show openstack database module show trove module-update openstack database module set trove resize-instance openstack database instance resize openstack database cluster resize trove resize-volume openstack database instance volume resize openstack database cluster volume resize trove restart openstack database instance restart openstack database cluster restart trove root-enable openstack database set --root trove root-show openstack database show --root trove show openstack database cluster show trove update openstack database cluster set trove user-create openstack database user create trove user-delete openstack database user delete trove user-grant-access openstack database user add --access trove user-list openstack database user list trove user-revoke-access openstack database user remove --access trove user-show openstack database user show trove user-show-access openstack database user show --access trove user-update-attributes openstack database user set --attributes Configuration ------------- None Database -------- None Public API ---------- None Public API Security ------------------- None Python API ---------- None CLI (python-troveclient) ------------------------ A new directory named osc will be created under /troveclient/osc for the ``OpenStackClient`` plugin and the commands mentioned above. Internal API ------------ None Guest Agent ----------- None Alternatives ------------ None Dashboard Impact (UX) ===================== None Implementation ============== Assignee(s) ----------- Primary assignee: twm2016 Dashboard assignee: None Milestones ---------- Target Milestone for completion: Ocata-3 Work Items ---------- CLI commands as stated above. Integration tests Functional tests Upgrade Implications ==================== None Dependencies ============ python-openstackclient osc-lib Testing ======= Functional tests will be located in: /troveclient/tests/osc/ Functional testing will test the inputs and outputs of listed commands. Integration tests will verify the ``OpenStackClient`` plugin is working with other projects. These should be placed in /trove/tests/tempest/tests/api Documentation Impact ==================== OpenStack Client adoption list will be updated to include python-troveclient. References ========== http://docs.openstack.org/developer/python-openstackclient/commands.html http://docs.openstack.org/cli-reference/trove.html Appendix ======== None