Skip to content

Commit

Permalink
Merge pull request #260 from npamudika/master
Browse files Browse the repository at this point in the history
Modify add-env help command examples
  • Loading branch information
malinthaprasan authored Apr 3, 2020
2 parents 640521e + 0b33b56 commit aea4ceb
Show file tree
Hide file tree
Showing 5 changed files with 38 additions and 47 deletions.
6 changes: 3 additions & 3 deletions import-export-cli/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -52,9 +52,9 @@ Command Line tool for importing and exporting APIs/Applications between differen
> NOTE: Directory structure for configuration files (`$HOME/.wso2apictl`) will be created upon execution of `apictl`
Execute `apictl add-env --help` for detailed instructions
> The flag `--environment` (-e) is mandatory
You can either provide only the 2 tags `--apim` and `--token`, or all the other 5 tags (`--registration` `--publisher` `--devportal` `--admin` `--token`) without providing `--apim` tag,
or all the 6 tags to add an environment.
> The flags `--environment` (-e) and --token are mandatory
You can either provide only the 2 flags `--apim` and `--token`, or all the other 5 flags (`--registration` `--publisher` `--devportal` `--admin` `--token`) without providing `--apim` flag.
If you are omitting any of --registration --publisher --devportal --admin flags, you need to specify --apim flag with the API Manager endpoint.

- ### Command Autocomplete
Copy the file `shell-completions/apictl_bash_completion.sh` to `/etc/bash_completion.d/` and source it with
Expand Down
25 changes: 11 additions & 14 deletions import-export-cli/cmd/addEnv.go
Original file line number Diff line number Diff line change
Expand Up @@ -43,23 +43,20 @@ const addEnvCmdExamples = utils.ProjectName + ` ` + addEnvCmdLiteral + ` -e prod
--token https://localhost:8243/token
` + utils.ProjectName + ` ` + addEnvCmdLiteral + ` -e test \
--registration https://localhost:9443/client-registration/v0.16/register \
--publisher https://localhost:9443/api/am/publisher/v1/apis \
--devportal https://localhost:9443 \
--admin https://localhost:9443 \
--token https://localhost:8243/token
--registration https://idp.com:9443 \
--publisher https://apim.com:9443 \
--devportal https://apps.com:9443 \
--admin https://apim.com:9443 \
--token https://gw.com:8243/token
` + utils.ProjectName + ` ` + addEnvCmdLiteral + ` -e dev \
--apim https://localhost:9443 \
--registration https://localhost:9443/client-registration/v0.16/register \
--publisher https://localhost:9443/api/am/publisher/v1/apis \
--devportal https://localhost:9443 \
--admin https://localhost:9443 \
--token https://localhost:8243/token
--apim https://apim.com:9443 \
--registration https://idp.com:9443 \
--token https://gw.com:8243/token
NOTE: The flag --environment (-e) is mandatory
You can either provide only the 2 tags --apim and --token, or all the other 5 tags (--registration --publisher --devportal --admin --token) without providing --apim tag,
or all the 6 tags to add an environment.`
NOTE: The flags --environment (-e) and --token are mandatory
You can either provide only the 2 flags --apim and --token, or all the other 5 flags (--registration --publisher --devportal --admin --token) without providing --apim flag.
If you are omitting any of --registration --publisher --devportal --admin flags, you need to specify --apim flag with the API Manager endpoint.`

// addEnvCmd represents the addEnv command
var addEnvCmd = &cobra.Command{
Expand Down
25 changes: 11 additions & 14 deletions import-export-cli/docs/apictl_add-env.md
Original file line number Diff line number Diff line change
Expand Up @@ -18,23 +18,20 @@ apictl add-env -e production \
--token https://localhost:8243/token
apictl add-env -e test \
--registration https://localhost:9443/client-registration/v0.16/register \
--publisher https://localhost:9443/api/am/publisher/v1/apis \
--devportal https://localhost:9443 \
--admin https://localhost:9443 \
--token https://localhost:8243/token
--registration https://idp.com:9443 \
--publisher https://apim.com:9443 \
--devportal https://apps.com:9443 \
--admin https://apim.com:9443 \
--token https://gw.com:8243/token
apictl add-env -e dev \
--apim https://localhost:9443 \
--registration https://localhost:9443/client-registration/v0.16/register \
--publisher https://localhost:9443/api/am/publisher/v1/apis \
--devportal https://localhost:9443 \
--admin https://localhost:9443 \
--token https://localhost:8243/token
--apim https://apim.com:9443 \
--registration https://idp.com:9443 \
--token https://gw.com:8243/token
NOTE: The flag --environment (-e) is mandatory
You can either provide only the 2 tags --apim and --token, or all the other 5 tags (--registration --publisher --devportal --admin --token) without providing --apim tag,
or all the 6 tags to add an environment.
NOTE: The flags --environment (-e) and --token are mandatory
You can either provide only the 2 flags --apim and --token, or all the other 5 flags (--registration --publisher --devportal --admin --token) without providing --apim flag.
If you are omitting any of --registration --publisher --devportal --admin flags, you need to specify --apim flag with the API Manager endpoint.
```

### Options
Expand Down
2 changes: 1 addition & 1 deletion import-export-cli/docs/apictl_set.md
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ apictl set --mode default
### Options

```
--export-directory string Path to directory where APIs should be saved (default "/home/wasura/.wso2apictl/exported")
--export-directory string Path to directory where APIs should be saved (default "/home/naduni/.wso2apictl/exported")
-h, --help help for set
--http-request-timeout int Timeout for HTTP Client (default 10000)
-m, --mode string mode of apictl
Expand Down
27 changes: 12 additions & 15 deletions import-export-cli/resources/README.html
Original file line number Diff line number Diff line change
Expand Up @@ -23,9 +23,9 @@ <h2 id="getting-started">Getting Started</h2>
</blockquote>
<p> Execute <code>apictl add-env --help</code> for detailed instructions</p>
<blockquote>
<p>The flag <code>--environment</code> (-e) is mandatory
You can either provide only the 2 tags <code>--apim</code> and <code>--token</code>, or all the other 5 tags (<code>--registration</code>, <code>--publisher</code>, <code>--devportal</code>, <code>--admin</code>, <code>--token</code>) without providing <code>--apim</code> tag,
or all the 6 tags to add an environment.</p>
<p>The flags <code>--environment (-e)</code> and <code>--token</code> are mandatory.
You can either provide only the 2 flags <code>--apim</code> and <code>--token</code>, or all the other 5 flags (<code>--registration</code>, <code>--publisher</code>, <code>--devportal</code>, <code>--admin</code>, <code>--token</code>) without providing <code>--apim</code> flag.
If you are omitting any of --registration --publisher --devportal --admin flags, you need to specify --apim flag with the API Manager endpoint.</p>
</blockquote>
</li>
<li><h3 id="command-autocompletion-for-bash-only-">Command Autocompletion (For Bash Only)</h3>
Expand Down Expand Up @@ -199,22 +199,19 @@ <h3 id="commands">Commands</h3>
Examples:
apictl add-env -e dev \
--apim https://localhost:9443 \
--token https://localhost:9443/oauth2/token
--token https://localhost:8243/token

apictl add-env -e staging \
--registration https://localhost:9443 \
--publisher https://localhost:9443 \
--devportal https://localhost:9443 \
--admin https://localhost:9443 \
--token https://localhost:9443/oauth2/token
--registration https://idp.com:9443 \
--publisher https://apim.com:9443 \
--devportal https://apps.com:9443 \
--admin https://apim.com:9443 \
--token https://gw.com:8243/token

apictl add-env -e prod \
--apim https://localhost:9443 \
--registration https://localhost:9443 \
--publisher https://localhost:9443 \
--devportal https://localhost:9443 \
--admin https://localhost:9443 \
--token https://localhost:9443/oauth2/token
--apim https://apim.com:9443 \
--registration https://idp.com:9443 \
--token https://gw.com:8243/token
</code></pre>
</li>
<li><h4 id="remove-env">remove-env</h4>
Expand Down

0 comments on commit aea4ceb

Please sign in to comment.