Skip to content

C2Devel/c2-client

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

K2 Cloud API Client

Simple command-line utility for sending custom requests to K2 Cloud platform.

Warning: this utility is not intended for automation cases. Use https://github.com/c2devel/boto3.git and python scripts instead.

Installation

C2client package relies on forked versions of boto3 and botocore from the C2Devel/boto3 and C2Devel/botocore repositories. For isolated use our dependencies, it is highly recommended to use a virtual environment.

  1. Clone the repository

    git clone https://github.com/C2Devel/c2-client.git && cd c2-client
  2. Setup the virtual environment(Unix based system)

    python3 -m venv .venv && source .venv/bin/activate
  3. Install the package in editable mode along with dependencies from requirements.txt

    pip install -e . -r requirements.txt

Usage

$ c2-ec2 --help
usage: c2-ec2 [-h] action [parameters [parameters ...]]

positional arguments:
   action          The action that you want to perform.
   parameters      Any parameters for the action. Parameters specified by parameter
                   key and parameter value separated by space.

optional arguments:
   -h, --help      show this help message and exit
   --no-verify-ssl disable verifying ssl certificate

Common request syntax:

$ c2-ec2 <action> <arg1> <value1> <arg2> <value2>

Example

Send simple request:

$ c2-ec2 RunInstances ImageId cmi-078880A0 Description "Test instance" \
InstanceType m1.small MaxCount 1 MinCount 1 SecurityGroup.1 test

About

Simple command-line utility for sending custom requests to K2 Cloud platform.

Resources

Stars

Watchers

Forks

Packages

No packages published

Contributors 20