Hi all,

During the discussion [1] a requirement was raised to revamp the commands
in API Controller. The summary of the discussion is as follows and we can
use this mail thread to discuss more on this.

There are two (2) types of command signatures (structures) in API
Controller such as apictl [verb] [noun] [flags] and apictl [command] [flags].
Below are the commands belonging to those two (2) categories.

apictl [verb] [noun] [flags]

apictl [command] [flags]

Existing commands:

   -

   apictl list apis [flags]
   -

   apictl list apps [flags]
   -

   apictl login <env-name> [flags]
   -

   apictl logout <env-name> [flags]
   -

   apictl install api-operator [flags]
   -

   apictl uninstall api-operator [flags]
   -

   apictl change registry [flags]
   -

   apictl version <---- apictl noun only
   -

   apictl help     <----- apictl verb only


Newly added  commands:

   -

   apictl list api-products [flags]

Existing commands:

   -

   apictl add [flags]
   -

   apictl add-env [flags]
   -

   apictl remove-env [flags]
   -

   apictl export-api [flags]
   -

   apictl export-apis [flags]
   -

   apictl export-app [flags]
   -

   apictl import-api [flags]
   -

   apictl import-app [flags]
   -

   apictl init [flags]
   -

   apictl get-keys [flags]
   -

   apictl set [flags]
   -

   apictl update [flags]


Newly added commands:

   -

   apictl delete-api [flags]
   -

   apictl change-api-status [flags]
   -

   apictl delete-api-product [flag]


Commands to be added:

   -

   apictl import-api-product [flags]
   -

   apictl export-api-product [flags]


It would be better if all the commands can be revamped into one then all
the commands will be more consistent.

Suggested new structure: apictl [verb] [noun] [flags] (The structure that
already has been used in the left column)

The recently added new commands (check right column Newly added commands:)
and the commands to be added (check right column Commands to be added:) can
be easily restructured to the suggested new structure. The existing
commands (check right column Existing commands:) should be migrated in a
manner without breaking any user functionality. These existing commands can
be deprecated first without directly removing them which will address the
backward compatibility.

An issue has been created (refer [2]) and through evaluating a few other
CLI tools we would be able to find the best approach (deciding a command
format and deprecating commands).

Your feedback and opinions are warmly welcomed.

[1] Mail: [APIM] Support for API Products from API Controller

[2] https://github.com/wso2/product-apim-tooling/issues/293

Thank you!
-- 
*Wasura Wattearachchi* | Software Engineer | WSO2 Inc.
(m) +94775396038 | (e) was...@wso2.com | (b) Medium
<https://medium.com/@wasuradananjith>
[image: http://wso2.com/signature] <http://wso2.com/signature>
_______________________________________________
Architecture mailing list
Architecture@wso2.org
https://mail.wso2.org/cgi-bin/mailman/listinfo/architecture

Reply via email to