Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Revert "Onedrive_Backup" #1079

Merged
merged 1 commit into from
Aug 4, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion .github/workflows/github-actions-python.yml
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ jobs:
- name: Install dependencies
run: |
python -m pip install --upgrade pip
pip install flake8 pytest paho-mqtt requests-mock jq pyjwt==2.6.0 bs4 pkce typing_extensions python-dateutil==2.8.2 msal
pip install flake8 pytest paho-mqtt requests-mock jq pyjwt==2.6.0 bs4 pkce typing_extensions python-dateutil==2.8.2
- name: Flake8 with annotations in packages folder
uses: TrueBrain/[email protected]
with:
Expand Down
27 changes: 0 additions & 27 deletions packages/helpermodules/command.py
Original file line number Diff line number Diff line change
Expand Up @@ -10,10 +10,8 @@
import traceback
from pathlib import Path
import paho.mqtt.client as mqtt

from control.chargepoint import chargepoint
from control.chargepoint.chargepoint_template import get_autolock_plan_default, get_chargepoint_template_default
from modules.backup_clouds.onedrive.api import generateMSALAuthCode, retrieveMSALTokens

from helpermodules import measurement_log
from helpermodules.broker import InternalBrokerClient
Expand All @@ -30,7 +28,6 @@
import dataclass_utils
from modules.common.configurable_vehicle import IntervalConfig


log = logging.getLogger(__name__)


Expand Down Expand Up @@ -698,30 +695,6 @@ def restoreBackup(self, connection_id: str, payload: dict) -> None:
f'Restore-Status: {result.returncode}<br />Meldung: {result.stdout.decode("utf-8")}',
MessageType.ERROR)

def requestMSALAuthCode(self, connection_id: str, payload: dict) -> None:
''' fordert einen Authentifizierungscode für MSAL (Microsoft Authentication Library)
an um Onedrive Backup zu ermöglichen'''
cloudbackupconfig = SubData.system_data["system"].backup_cloud
if cloudbackupconfig is None:
pub_user_message(payload, connection_id,
"Es ist keine Backup-Cloud konfiguriert. Bitte Konfiguration speichern "
"und erneut versuchen.<br />", MessageType.WARNING)
return
result = generateMSALAuthCode(cloudbackupconfig.config)
pub_user_message(payload, connection_id, result["message"], result["MessageType"])

def retrieveMSALTokens(self, connection_id: str, payload: dict) -> None:
""" holt die Tokens für MSAL (Microsoft Authentication Library) um Onedrive Backup zu ermöglichen
"""
cloudbackupconfig = SubData.system_data["system"].backup_cloud
if cloudbackupconfig is None:
pub_user_message(payload, connection_id,
"Es ist keine Backup-Cloud konfiguriert. Bitte Konfiguration speichern "
"und erneut versuchen.<br />", MessageType.WARNING)
return
result = retrieveMSALTokens(cloudbackupconfig.config)
pub_user_message(payload, connection_id, result["message"], result["MessageType"])

def factoryReset(self, connection_id: str, payload: dict) -> None:
Path(Path(__file__).resolve().parents[2] / 'data' / 'restore' / 'factory_reset').touch()
pub_user_message(payload, connection_id,
Expand Down
Empty file.
170 changes: 0 additions & 170 deletions packages/modules/backup_clouds/onedrive/api.py

This file was deleted.

42 changes: 0 additions & 42 deletions packages/modules/backup_clouds/onedrive/backup_cloud.py

This file was deleted.

30 changes: 0 additions & 30 deletions packages/modules/backup_clouds/onedrive/config.py

This file was deleted.

3 changes: 0 additions & 3 deletions packages/modules/backup_clouds/onedrive/msdrive/constants.py

This file was deleted.

Loading