On Sun, Mar 11, 2018 at 10:14 AM Rodric Rabbah <rod...@gmail.com> wrote:
> The info should be available in the client. Bedside the runtimes, the min, > max and default duration values for the actions, as well as the memory > limits should be exposed. This would avoid more of the hardcover values as > well. Thanks for the quick response Rodric! Yes, definitely! Let’s expose above information and remove hard coded values from the CLI. I’m now in the process of implementing this, once verified will provide an update. Thanks Imesh > > -r > > > On Mar 10, 2018, at 9:58 PM, Imesh Gunaratne <imesh.gunara...@gmail.com> > wrote: > > > > Hi All, > > > > I'm trying to do $subject to make it easier to add additional runtime > > extensions without having to re-compile the CLI. To do this we may need > to > > query the list of runtimes available in OW via the OW API. > > > > As I see OW CLI is using WO client go library [1] for invoking the OW API > > and at the moment it has not exposed the runtime information which has > been > > added to the root context path: > > > > HTTP GET / > > > > { > > "support": { > > "github": "https://github.com/apache/incubator-openwhisk/issues", > > "slack": "http://slack.openwhisk.org" > > }, > > "description": "OpenWhisk", > > "api_paths": [ > > "/api/v1" > > ], > > "runtimes": { > > "nodejs": [ > > { > > "image": "openwhisk/nodejsaction:latest", > > "deprecated": true, > > "requireMain": false, > > "default": false, > > "attached": false, > > "kind": "nodejs" > > }, > > ... > > ], > > ... > > }, > > "limits": { > > "actions_per_minute": 60, > > "triggers_per_minute": 60, > > "concurrent_actions": 30 > > } > > } > > > > > > I also see that the /api/v1 context path provides information about the > API > > and it has been exposed by the "InfoService" [2]. > > > > HTTP GET /api/v1 > > { > > "api_version_path": "v1", > > "description": "OpenWhisk API", > > "swagger_paths": { > > "ui": "/docs", > > "api-docs": "/api-docs" > > }, > > "build": "2018-03-10T16:52:39Z", > > "api_version": "1.0.0", > > "buildno": "latest" > > } > > > > I would like to ask whether the community has already discussed about > this > > and how you think we should expose the runtime information via the client > > go library. > > > > Would it be okay to add a new entity to the client go library to expose > the > > information on the API root context? If so, would it be okay to call it > > "RootService"? Really appreciate your thoughts on this. > > > > [1] https://github.com/apache/incubator-openwhisk-client-go > > [2] > > > https://github.com/apache/incubator-openwhisk-client-go/blob/master/whisk/info.go#L39 > > > > Thanks > > Imesh > > > > -- > > Imesh Gunaratne > > *https://medium.com/@imesh <https://medium.com/@imesh>* > -- Imesh Gunaratne Software Architect, WSO2 Committer & PMC Member, Apache Stratos