Skip to main content

Command Line Interface for GYUN.

Project description

gyun-cli is the command line interface for managing GYUN resources, with it you can check, create, delete and operate all your resources, it supports Linux, Mac and Windows for now.

This CLI is licensed under Apache Licence, Version 2.0.


Requires Python 2.6 or higher, for more information please see GYUN CLI Documentation


Install via pip

$ pip install gyun-cli

If not installed in virtualenv, maybe sudo is needed

$ sudo pip install gyun-cli

Upgrade to the latest version

$ pip install --upgrade gyun-cli

Command Completion

gyun-cli has auto-completion (only support Linux and Mac).

If auto-completion doesn’t take effect, please activate it manually.:

$ source ~/.bash_profile

If still doesn’t work, please input:

$ complete -C gyun_completer gyun

and add this command into your login shell (such as ~/.bash_profile).

Getting Started

To use gyun-cli, there must be a configuration file to configure your own qy_access_key_id , qy_secret_access_key and zone , such as:

qy_access_key_id: 'GYUNACCESSKEYID'
zone: 'pek1'

access key can be applied for in GYUN Console. zone is the Node ID where your resources are, and it can be checked in the switching node on the console, such as pek1, pek2, gd1, ap1 .

The configuration file is saved in ~/.gyun/config.yaml by default, it also can be assigned by the parameter -f /path/to/config when executing the command.

Input Parameters

For iaas service, the parameters of gyun-cli only include int and string type. If the parameters support the list passing, the values shall be separated by English comma . For example:

gyun iaas describe-keypairs -k 'kp-bn2n77ow, kp-b2ivaf15' -L 2

Sometimes, the parameter needs to be string in JSON format, such as:

gyun iaas add-router-statics -r rtr-ba2nbge6 -s '[{"static_type":1,"val1":"80","val2":"","val3":"8000"}]'

For qs service, the parameters include int, string and list type. If the parameters support the list passing, the values shall be separated by spaces. For example:

gyun qs set-bucket-acl -b mybucket -A QS_ACL_EVERYONE,READ usr-wmTc0avW,FULL_CONTROL

Command Output

The returned result of Command is in JSON format. For example, the returned result of describe-keypair of ‘iaas’ service.:

      "keypair_name":"kp 1",
      "keypair_name":"kp 2",

The returned result of list-objects of ‘qs’ service.:

  "name": "mybucket",
  "keys": [
      "key": "myphoto.jpg",
      "size": 67540,
      "modified": 1456226022,
      "mime_type": "image/jpeg",
      "created": "2016-02-23T11:13:42.000Z"
      "key": "mynote.txt",
      "size": 11,
      "modified": 1456298679,
      "mime_type": "text/plain",
      "created": "2016-02-24T06:49:23.000Z"
  "prefix": "",
  "owner": "gyun",
  "delimiter": "",
  "limit": 20,
  "marker": "mynote.txt",
  "common_prefixes": []

Project details

Release history Release notifications | RSS feed

This version


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

gyun-cli-1.2.tar.gz (45.9 kB view hashes)

Uploaded source

Supported by

AWS AWS Cloud computing Datadog Datadog Monitoring Facebook / Instagram Facebook / Instagram PSF Sponsor Fastly Fastly CDN Google Google Object Storage and Download Analytics Huawei Huawei PSF Sponsor Microsoft Microsoft PSF Sponsor NVIDIA NVIDIA PSF Sponsor Pingdom Pingdom Monitoring Salesforce Salesforce PSF Sponsor Sentry Sentry Error logging StatusPage StatusPage Status page