Skip to content

Commit

Permalink
Update identity URL (#34)
Browse files Browse the repository at this point in the history
  • Loading branch information
milkrage authored Sep 21, 2023
1 parent 6459daf commit f554252
Show file tree
Hide file tree
Showing 7 changed files with 8 additions and 7 deletions.
2 changes: 1 addition & 1 deletion docs/usage/cli.rst
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ but it is easier to set them in environment variables.
export SEL_URL=url
export SEL_TOKEN=token
export SEL_API_VERSION=api_version # by default: 2
export OS_AUTH_URL=url # by default: https://api.selvpc.ru/identity/v3
export OS_AUTH_URL=url # by default: https://cloud.api.selcloud.ru/identity/v3
Once you've configured your authentication parameters, you can run **selvpc**
commands. All commands take the form of:
Expand Down
2 changes: 1 addition & 1 deletion docs/usage/library.rst
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ API URL `here <https://support.selectel.ru/vpc/docs/>`_)
>>> SEL_TOKEN = YOUR_API_TOKEN_HERE
>>> SEL_URL = "https://api.selectel.ru/vpc/resell"
>>> OS_AUTH_URL = "https://api.selvpc.ru/identity/v3"
>>> OS_AUTH_URL = "https://cloud.api.selcloud.ru/identity/v3"
>>> http_client = setup_http_client(
... api_url=SEL_URL, api_token=SEL_TOKEN)
Expand Down
2 changes: 1 addition & 1 deletion env.example.bat
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
:: Required variables
set SEL_TOKEN=MNhA6zVcf7x892LqsQSc9vDN_9999
set SEL_URL=https://api.selectel.ru/vpc/resell
set OS_AUTH_URL=https://api.selvpc.ru/identity/v3
set OS_AUTH_URL=https://cloud.api.selcloud.ru/identity/v3

:: Optional variables
set SEL_API_VERSION=2
2 changes: 1 addition & 1 deletion env.example.sh
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
# Required variables
export SEL_TOKEN=MNhA6zVcf7x892LqsQSc9vDN_9999
export SEL_URL=https://api.selectel.ru/vpc/resell
export OS_AUTH_URL=https://api.selvpc.ru/identity/v3
export OS_AUTH_URL=https://cloud.api.selcloud.ru/identity/v3

# Optional variables
export SEL_API_VERSION=2
3 changes: 2 additions & 1 deletion examples/first_project/main.py
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,8 @@
# You can get actual api URL here
# https://support.selectel.ru/vpc/docs
#
IDENTITY_URL = os.getenv('OS_AUTH_URL', 'https://api.selvpc.ru/identity/v3')
IDENTITY_URL = os.getenv('OS_AUTH_URL',
'https://cloud.api.selcloud.ru/identity/v3')

REGION = "ru-2"
ZONE = "ru-2c"
Expand Down
2 changes: 1 addition & 1 deletion selvpcclient/client.py
Original file line number Diff line number Diff line change
Expand Up @@ -53,7 +53,7 @@ def __init__(
regional_client = RegionalHTTPClient(
http_client=client,
identity_url=os.environ.get(
'OS_AUTH_URL', 'https://api.selvpc.ru/identity/v3'
'OS_AUTH_URL', 'https://cloud.api.selcloud.ru/identity/v3'
)
)

Expand Down
2 changes: 1 addition & 1 deletion selvpcclient/shell.py
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,7 @@ def build_option_parser(self, description, version, argparse_kwargs=None):
'--identity_url',
default=os.environ.get(
'OS_AUTH_URL',
'https://api.selvpc.ru/identity/v3'
'https://cloud.api.selcloud.ru/identity/v3'
)
)
parser.add_argument(
Expand Down

0 comments on commit f554252

Please sign in to comment.