Skip to content

Commit

Permalink
Merge pull request #219 from npamudika/master
Browse files Browse the repository at this point in the history
Add login and logout commands to the README inside the tool
  • Loading branch information
npamudika authored Mar 24, 2020
2 parents 2f011da + 2889077 commit 45667a1
Show file tree
Hide file tree
Showing 11 changed files with 186 additions and 13 deletions.
2 changes: 1 addition & 1 deletion import-export-cli/box/resources/sample/sample_config.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ environments:
admin_endpoint: https://localhost:9443/api/am/admin/v0.16
api_list_endpoint: https://localhost:9443/api/am/publisher/v1/apis
api_manager_endpoint: https://localhost:9443
application_list_endpoint: https://localhost:9443/api/am/admin/v0.16/applications
application_list_endpoint: https://localhost:9443/api/am/store/v1/applications
registration_endpoint: https://localhost:9443/client-registration/v0.16/register
token_endpoint: https://localhost:8243/token
sample-env2:
Expand Down
14 changes: 8 additions & 6 deletions import-export-cli/docs/apictl_add_api.md
Original file line number Diff line number Diff line change
Expand Up @@ -21,12 +21,14 @@ apictl add/update api -n petstore --from-file=./Swagger.json --replicas=3 --name
### Options

```
-f, --from-file string Path to swagger file
-h, --help help for api
-n, --name string Name of the API
--namespace string namespace of API
--override Property to override the existing docker image with same name and version
--replicas int replica set (default 1)
-f, --from-file stringArray Path to swagger file
-h, --help help for api
-m, --mode string Property to override the deploying mode. Available modes: privateJet, sidecar
-n, --name string Name of the API
--namespace string namespace of API
--override Property to override the existing docker image with same name and version
--replicas int replica set (default 1)
-v, --version string Property to override the existing docker image with same name and version
```

### Options inherited from parent commands
Expand Down
38 changes: 38 additions & 0 deletions import-export-cli/docs/apictl_install_wso2am-operator.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,38 @@
## apictl install wso2am-operator

Install WSO2AM Operator

### Synopsis

Install WSO2AM Operator in the configured K8s cluster

```
apictl install wso2am-operator [flags]
```

### Examples

```
apictl install wso2am-operator
apictl install wso2am-operator -f path/to/operator/configs
apictl install wso2am-operator -f path/to/operator/config/file.yaml
```

### Options

```
-f, --from-file string Path to wso2am-operator directory
-h, --help help for wso2am-operator
```

### Options inherited from parent commands

```
-k, --insecure Allow connections to SSL endpoints without certs
--verbose Enable verbose mode
```

### SEE ALSO

* [apictl install](apictl_install.md) - Install an operator

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
1 change: 1 addition & 0 deletions import-export-cli/docs/apictl_uninstall.md
Original file line number Diff line number Diff line change
Expand Up @@ -29,4 +29,5 @@ apictl uninstall api-operator

* [apictl](apictl.md) - CLI for Importing and Exporting APIs and Applications
* [apictl uninstall api-operator](apictl_uninstall_api-operator.md) - Uninstall API Operator
* [apictl uninstall wso2am-operator](apictl_uninstall_wso2am-operator.md) - Uninstall WSO2AM Operator

2 changes: 1 addition & 1 deletion import-export-cli/docs/apictl_uninstall_api-operator.md
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ apictl uninstall api-operator [flags]

```
apictl uninstall api-operator
apictl api-operator --force
apictl uninstall api-operator --force
```

### Options
Expand Down
37 changes: 37 additions & 0 deletions import-export-cli/docs/apictl_uninstall_wso2am-operator.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,37 @@
## apictl uninstall wso2am-operator

Uninstall WSO2AM Operator

### Synopsis

Uninstall WSO2AM Operator in the configured K8s cluster

```
apictl uninstall wso2am-operator [flags]
```

### Examples

```
apictl uninstall wso2am-operator
apictl uninstall wso2am-operator --force
```

### Options

```
--force Force uninstall WSO2AM Operator
-h, --help help for wso2am-operator
```

### Options inherited from parent commands

```
-k, --insecure Allow connections to SSL endpoints without certs
--verbose Enable verbose mode
```

### SEE ALSO

* [apictl uninstall](apictl_uninstall.md) - Uninstall an operator

2 changes: 2 additions & 0 deletions import-export-cli/docs/apictl_update_api.md
Original file line number Diff line number Diff line change
Expand Up @@ -23,9 +23,11 @@ apictl add/update api -n petstore --from-file=./Swagger.json --replicas=3 --name
```
-f, --from-file string Path to swagger file
-h, --help help for api
-m, --mode string Property to override the deploying mode. Available modes: privateJet, sidecar
-n, --name string Name of the API
--namespace string namespace of API
--replicas int replica set (default 1)
-v, --version string Property to override the existing docker image with same name and version
```

### Options inherited from parent commands
Expand Down
22 changes: 22 additions & 0 deletions import-export-cli/resources/README.html
Original file line number Diff line number Diff line change
Expand Up @@ -46,6 +46,28 @@ <h4 id="global-flags">Global Flags</h4>
Display information and example usage of a command
</code></pre>
<h3 id="commands">Commands</h3>
<ul>
<li><h4 id="login">login [environment]</h4>
<pre><code class="lang-bash"> Flags:
Optional:
--username, -u
--password, -p
NOTE: user will be prompted to enter credentials if they are not provided with these flags
Examples:
apictl login dev -u admin -p admin
apictl login dev -u admin
apictl login dev
cat ~/.mypassword | apictl login dev -u admin
</code></pre>
</li>
</ul>
<ul>
<li><h4 id="logout">logout [environment]</h4>
<pre><code class="lang-bash"> Examples:
apictl logout dev
</code></pre>
</li>
</ul>
<ul>
<li><h4 id="export-api">export-api</h4>
<pre><code class="lang-bash"> Flags:
Expand Down
71 changes: 71 additions & 0 deletions import-export-cli/shell-completions/apictl_bash_completions.sh
Original file line number Diff line number Diff line change
Expand Up @@ -263,6 +263,9 @@ _apictl_add_api()
flags+=("--help")
flags+=("-h")
local_nonpersistent_flags+=("--help")
flags+=("--mode=")
two_word_flags+=("-m")
local_nonpersistent_flags+=("--mode=")
flags+=("--name=")
two_word_flags+=("-n")
local_nonpersistent_flags+=("--name=")
Expand All @@ -272,6 +275,9 @@ _apictl_add_api()
local_nonpersistent_flags+=("--override")
flags+=("--replicas=")
local_nonpersistent_flags+=("--replicas=")
flags+=("--version=")
two_word_flags+=("-v")
local_nonpersistent_flags+=("--version=")
flags+=("--insecure")
flags+=("-k")
flags+=("--verbose")
Expand Down Expand Up @@ -774,6 +780,35 @@ _apictl_install_api-operator()
noun_aliases=()
}

_apictl_install_wso2am-operator()
{
last_command="apictl_install_wso2am-operator"

command_aliases=()

commands=()

flags=()
two_word_flags=()
local_nonpersistent_flags=()
flags_with_completion=()
flags_completion=()

flags+=("--from-file=")
two_word_flags+=("-f")
local_nonpersistent_flags+=("--from-file=")
flags+=("--help")
flags+=("-h")
local_nonpersistent_flags+=("--help")
flags+=("--insecure")
flags+=("-k")
flags+=("--verbose")

must_have_one_flag=()
must_have_one_noun=()
noun_aliases=()
}

_apictl_install()
{
last_command="apictl_install"
Expand All @@ -782,6 +817,7 @@ _apictl_install()

commands=()
commands+=("api-operator")
commands+=("wso2am-operator")

flags=()
two_word_flags=()
Expand Down Expand Up @@ -1085,6 +1121,34 @@ _apictl_uninstall_api-operator()
noun_aliases=()
}

_apictl_uninstall_wso2am-operator()
{
last_command="apictl_uninstall_wso2am-operator"

command_aliases=()

commands=()

flags=()
two_word_flags=()
local_nonpersistent_flags=()
flags_with_completion=()
flags_completion=()

flags+=("--force")
local_nonpersistent_flags+=("--force")
flags+=("--help")
flags+=("-h")
local_nonpersistent_flags+=("--help")
flags+=("--insecure")
flags+=("-k")
flags+=("--verbose")

must_have_one_flag=()
must_have_one_noun=()
noun_aliases=()
}

_apictl_uninstall()
{
last_command="apictl_uninstall"
Expand All @@ -1093,6 +1157,7 @@ _apictl_uninstall()

commands=()
commands+=("api-operator")
commands+=("wso2am-operator")

flags=()
two_word_flags=()
Expand Down Expand Up @@ -1132,13 +1197,19 @@ _apictl_update_api()
flags+=("--help")
flags+=("-h")
local_nonpersistent_flags+=("--help")
flags+=("--mode=")
two_word_flags+=("-m")
local_nonpersistent_flags+=("--mode=")
flags+=("--name=")
two_word_flags+=("-n")
local_nonpersistent_flags+=("--name=")
flags+=("--namespace=")
local_nonpersistent_flags+=("--namespace=")
flags+=("--replicas=")
local_nonpersistent_flags+=("--replicas=")
flags+=("--version=")
two_word_flags+=("-v")
local_nonpersistent_flags+=("--version=")
flags+=("--insecure")
flags+=("-k")
flags+=("--verbose")
Expand Down
8 changes: 4 additions & 4 deletions import-export-cli/shell-completions/apictl_zsh_completions.sh
Original file line number Diff line number Diff line change
Expand Up @@ -17,14 +17,11 @@ case $state in
;;
level2)
case $words[2] in
install)
_arguments '2: :(api-operator help)'
;;
list)
_arguments '2: :(apis apps envs help)'
;;
uninstall)
_arguments '2: :(api-operator help)'
_arguments '2: :(api-operator help wso2am-operator)'
;;
update)
_arguments '2: :(api help)'
Expand All @@ -35,6 +32,9 @@ case $state in
change)
_arguments '2: :(help registry)'
;;
install)
_arguments '2: :(api-operator help wso2am-operator)'
;;
*)
_arguments '*: :_files'
;;
Expand Down

0 comments on commit 45667a1

Please sign in to comment.