-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
👽️(api) migrate ralph-malph API to 4.0.0
Ralph 4.0.0 has introduced breaking changes in its API. It has to be adapted in its use in warren-api package.
- Loading branch information
1 parent
ce34f38
commit 2b2ac3b
Showing
16 changed files
with
174 additions
and
167 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,15 +1,17 @@ | ||
"""Backends for warren.""" | ||
|
||
from ralph.backends.http import AsyncLRSHTTP | ||
from ralph.conf import LRSHeaders | ||
from ralph.backends.data.async_lrs import AsyncLRSDataBackend | ||
from ralph.backends.data.lrs import LRSDataBackendSettings, LRSHeaders | ||
|
||
from warren.conf import settings | ||
|
||
lrs_client = AsyncLRSHTTP( | ||
base_url=settings.LRS_HOSTS, | ||
username=settings.LRS_AUTH_BASIC_USERNAME, | ||
password=settings.LRS_AUTH_BASIC_PASSWORD, | ||
headers=LRSHeaders( | ||
lrs_client_settings = LRSDataBackendSettings( | ||
BASE_URL=settings.LRS_HOSTS, | ||
USERNAME=settings.LRS_AUTH_BASIC_USERNAME, | ||
PASSWORD=settings.LRS_AUTH_BASIC_PASSWORD, | ||
HEADERS=LRSHeaders( | ||
X_EXPERIENCE_API_VERSION="1.0.3", CONTENT_TYPE="application/json" | ||
), | ||
) | ||
|
||
lrs_client = AsyncLRSDataBackend(settings=lrs_client_settings) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.