Skip to main content
selvpcclient

selvpcclient

The go-selvpcclient library and the python-selvpcclient console client can be used to work with Cloud Management API and Quota Management API: projects, quotas, and other objects.

Install go-selvpcclient

The go-selvpcclient package contains the Go library.

To see examples of how to use the library, see the selvpcclient documentation at pkg.go.dev.

  1. Download the package:

    go get github.com/servercore/go-selvpcclient/selvpcclient/v3
  2. Create a service user for authentication.

Install python-selvpcclient

The python-selvpcclient package contains the selvpc CLI console client.

You can see examples of how to use the selvpc CLI in the selvpcclient documentation on GitHub.

  1. Get a static token (X-Token).

  2. Set environment variables:

    export SEL_TOKEN=<x_token>
    export SEL_URL=https://api.servercore.com/vpc/resell
    export SEL_API_VERSION=2
    export OS_AUTH_URL=https://cloud.api.selcloud.ru/identity/v3

    Specify:

    • <x_token> — the static token you received in step 1;
    • OS_AUTH_URL — address (URL) is region and pool dependent, can be viewed in the URL list.
  3. Install Python 3 and virtualenv:

    sudo apt update
    sudo apt install python3 virtualenv
  4. Install pip3:

    sudo apt install python3-pip
  5. Create a virtual environment to work with selvpcclient:

    virtualenv env
  6. Activate the virtual environment:

    source env/bin/activate
  7. Install the selvpcclient package:

    pip install -U python-selvpcclient