jthomas opened a new issue #178: Add flag for retrieving action parameter values
URL: https://github.com/apache/incubator-openwhisk-cli/issues/178
 
 
   ## issue
   
   As a developer, I often need to check the default parameters on an action. 
Using the CLI tool, I have to retrieve the entire action definition as the 
`--summary` flag only lists parameter names not values. This is problematic 
when using actions with binary packages.
   
   For example, using a Node.js action with bundled dependencies means the 
`exec.code` field in the response to `wsk action get <name>` is multiple MBs of 
base64-encoded text. Dumping this much JSON to the console is slow and 
difficult to parse.
   
   This is what my screen often looks like...
   <img width="1440" alt="screen shot 2017-12-19 at 16 00 35" 
src="https://user-images.githubusercontent.com/2322/34166037-c5618f96-e4d5-11e7-8b01-af4a84bf11b4.png";>
   
   This is a jarring and poor developer experience.
   
   ## potential solutions?
   
   - Add a `-p | --param` flag to `wsk action get` like the `url` flag to 
retrieve only the params.
   
   ```
   $ wsk action get name --params
   ok: got action name
   {
     "key": "actions",
     "value": [
       "hello-world"
     ]
   }  
   ```
   
   - Extend `--summary` to show parameter values along with names.
   
   ```
   $ wsk action get params --summary
   action /[email protected]_dev/params: Returns a result based on 
parameter hello
      (parameters: *hello=world)
   ```
   
   Having the `--summary` flag show values would be simpler but I'm not sure of 
a sensible way to show all the possible parameter value types in a concise 
format.
   
   **I'll open a PR for the `--params` flag to start with unless people have 
other suggestions?.**

----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
[email protected]


With regards,
Apache Git Services

Reply via email to