https://github.com/dataman-cloud/python-sryapicli
shurenyun api command line
https://github.com/dataman-cloud/python-sryapicli
Last synced: 3 months ago
JSON representation
shurenyun api command line
- Host: GitHub
- URL: https://github.com/dataman-cloud/python-sryapicli
- Owner: Dataman-Cloud
- License: apache-2.0
- Created: 2016-08-12T06:44:52.000Z (almost 9 years ago)
- Default Branch: master
- Last Pushed: 2016-08-15T14:59:53.000Z (almost 9 years ago)
- Last Synced: 2025-01-07T21:43:30.374Z (5 months ago)
- Language: Python
- Size: 24.4 KB
- Stars: 1
- Watchers: 7
- Forks: 1
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# shurenyun api command line tool
## Usage
1. To use this client tool, please login first with following command:
```
$python sryapi_cli.py login --host --email --password
```
arguments host, email and password must be specified.
password is prompted for credential when command is entered.example:
```
$python sryapi_cli.py login --host="http://devforward.dataman-inc.net" --email [email protected] --password
```2. After login, user can get user info through command:
```
$python sryapi_cli.py user info
```3. Meanwhile, user can logout through command:
```
$python sryapi_cli.py logout
```## Commands
Following are all commands sryapi_cli supports currently:### basic
```
$python sryapi-cli.py -h
```
```
usage: sryapi_cli [-h] [--version] COMMAND ...shurenyun api client tool
positional arguments:
COMMAND
login login with user email and password, api server is required
logout delete login user's token, return code 0 if success
app omega-app api command list
log search log command list
user get user informationoptional arguments:
-h, --help show this help message and exit
--version, -v show program's version number and exit
```### login
```
$python sryapi-cli.py login
```
```
usage: sryapi_cli login [-h] --host HOST --email EMAIL --passwordoptional arguments:
-h, --help show this help message and exitauthentication:
--host HOST
--email EMAIL
--password
```
### user```
$python sryapi-cli.py user -h
```
```
usage: sryapi_cli user [-h] ACTION ...positional arguments:
ACTION
info show current login user informationoptional arguments:
-h, --help show this help message and exit
```### app
```
$python sryapi-cli.py app -h
```
```
usage: sryapi_cli app [-h] ACTION ...positional arguments:
ACTION
stop stopa specified app
start starta specified app
scale scale instances for a specified app
update_version update app version
get_cluster_apps list all apps for specified cluster
create create app under specified cluster
get list specified app information under specified cluster
delete Delete specified app under specified cluster
get_my_apps list all apps belong to me.
get_my_app_status
list all app's status
get_app_version list all history versions for a specific app
delete_app_version
delete app version
update_cluster_app
update app configuration
get_app_instances
list all instances for a specific app
get_app_events list all events for a specific app
get_app_nodes list all nodes for a specific app
get_cluster_ports
list the inner ports and outer ports for a specific
cluster
get_app_scale_log
get the auto scale history when provided a strategy id
get_my_scale_log get all the auto scale history owned by this loggin useroptional arguments:
-h, --help show this help message and exit
```### log
```
$python sryapi-cli.py log -h
``````
usage: sryapi_cli log [-h] ACTION ...positional arguments:
ACTION
search search app controller log
search_log_context
retrieve app log contextoptional arguments:
-h, --help show this help message and exit
```