You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@openwhisk.apache.org by GitBox <gi...@apache.org> on 2019/12/18 14:04:56 UTC

[GitHub] [openwhisk-cli] lornajane opened a new issue #469: Export package parameters in the format needed for import

lornajane opened a new issue #469: Export package parameters in the format needed for import
URL: https://github.com/apache/openwhisk-cli/issues/469
 
 
   (I couldn't find an issue where this had already been discussed, I apologise if this is a duplicate or I'm creating noise)
   
   My use case: copying parameters from one action to another
    - when you add a database and refresh the package list, the parameters you want are on the wrong package and it's tedious to get them from one place to another
    - when I wanted to test some changes to my openwhisk package without hurting what's already live, I wanted to copy the package - it's easy to redeploy but I needed the package parameters.
   
   To get the parameters from a package, we do: `wsk package get [packagename] parameters` which outputs something like:
   
   ```json
   ok: got package firstpackage, displaying field parameters
   [
       {
           "key": "slackURL",
           "value": "https://hooks.slack.com/blah/blah"
       },
       {
           "key": "cloudantURL",
           "value": "https://wibble-squeak-bluemix.cloudant.com"
       },
       {
           "key": "dbname",
           "value": "awesomedb"
       }
   ]
   ```
   
   To supply these parameters to another package (e.g. for testing, or allowing another team member to match my config) the format I want is:
   
   ```json
   {
       "slackURL": "https://hooks.slack.com/services/blah/blah",
       "cloudantURL": "https://wibble-squeak-bluemix.cloudant.com",
       "dbname": "awesomedb"
   }
   ```
   
   With the above in a file called `params.json` I can then to `wsk package create mypackage -P params.json`.
   
   Would it be desirable to offer this format (ideally _without_ the extra verbose output as the first line as we have now) as an option?  It's a small thing and I appreciate that patches are probably welcome, but is this a useful addition for anyone other than myself?

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


With regards,
Apache Git Services