selvpcclient
selvpcclient
Library go-selvpcclient and a console client python-selvpcclient can be used to work with Cloud Management API and Quota Management API: projects, quotas and other objects.
Install go-selvpcclient
Package go-selvpcclient contains a Go library.
To see examples of how to use the library, see selvpcclient documentation on pkg.go.dev.
-
Download the package:
go get github.com/selectel/go-selvpcclient/selvpcclient/v3
-
Create a service user for authentication.
Install python-selvpcclient
Package python-selvpcclient contains the selvpc CLI console client.
To see examples of how to use the selvpc CLI, go to selvpcclient documentation on GitHub.
-
Set environment variables:
export SEL_TOKEN=<x_token>
export SEL_URL=https://api.selectel.ru/vpc/resell
export SEL_API_VERSION=2
export OS_AUTH_URL=https://cloud.api.selcloud.ru/identity/v3Specify:
<x_token>
— static token that you received in step 1;OS_AUTH_URL
— address (URL) depends on the region and pool, you can look in the URL list.
-
Install Python 3 and virtualenv:
sudo apt update
sudo apt install python3 virtualenv -
Install pip3:
sudo apt install python3-pip
-
Create a virtual environment to work with selvpcclient:
virtualenv env
-
Activate the virtual environment:
source env/bin/activate
-
Install the selvpcclient package:
pip install -U python-selvpcclient