From 23e0d605de6244f8720bca550a59026c1be36ed8 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Volkan=20=C5=9Eahin?= Date: Wed, 20 Apr 2016 18:04:08 +0300 Subject: [PATCH] enum classes restored --- .../base/model/{ => enum}/ContentType.py | 10 +++++----- .../base/model/{ => enum}/MessageCode.py | 20 +++++++++---------- .../base/model/{ => enum}/MessageType.py | 19 ++++++++++-------- opt/ahenk/base/model/enum/__init__.py | 0 4 files changed, 26 insertions(+), 23 deletions(-) rename opt/ahenk/base/model/{ => enum}/ContentType.py (93%) rename opt/ahenk/base/model/{ => enum}/MessageCode.py (100%) rename opt/ahenk/base/model/{ => enum}/MessageType.py (88%) create mode 100644 opt/ahenk/base/model/enum/__init__.py diff --git a/opt/ahenk/base/model/ContentType.py b/opt/ahenk/base/model/enum/ContentType.py similarity index 93% rename from opt/ahenk/base/model/ContentType.py rename to opt/ahenk/base/model/enum/ContentType.py index f1c316b..aa905a4 100644 --- a/opt/ahenk/base/model/ContentType.py +++ b/opt/ahenk/base/model/enum/ContentType.py @@ -5,11 +5,11 @@ from enum import Enum class ContentType(Enum): - APPLICATION_JSON = 'APPLICATION_JSON' + APPLICATION_MS_WORD = 'APPLICATION_MS_WORD' APPLICATION_PDF = 'APPLICATION_PDF' APPLICATION_VND_MS_EXCEL = 'APPLICATION_VND_MS_EXCEL' - APPLICATION_MS_WORD = 'APPLICATION_MS_WORD' - TEXT_PLAIN = 'TEXT_PLAIN' - TEXT_HTML = 'TEXT_HTML' + IMAGE_JPEG = 'IMAGE_JPEG' IMAGE_PNG = 'IMAGE_PNG' - IMAGE_JPEG = 'IMAGE_JPEG' \ No newline at end of file + TEXT_HTML = 'TEXT_HTML' + TEXT_PLAIN = 'TEXT_PLAIN' + APPLICATION_JSON = 'APPLICATION_JSON' diff --git a/opt/ahenk/base/model/MessageCode.py b/opt/ahenk/base/model/enum/MessageCode.py similarity index 100% rename from opt/ahenk/base/model/MessageCode.py rename to opt/ahenk/base/model/enum/MessageCode.py index 2a2bbe1..d848b40 100644 --- a/opt/ahenk/base/model/MessageCode.py +++ b/opt/ahenk/base/model/enum/MessageCode.py @@ -5,15 +5,15 @@ from enum import Enum class MessageCode(Enum): - TASK_RECEIVED = 'TASK_RECEIVED' - TASK_PROCESSED = 'TASK_PROCESSED' - TASK_ERROR = 'TASK_ERROR' - TASK_WARNING = 'TASK_WARNING' - TASK_TIMEOUT = 'TASK_TIMEOUT' - TASK_KILLED = 'TASK_KILLED' - POLICY_RECEIVED = 'POLICY_RECEIVED' - POLICY_PROCESSED = 'POLICY_PROCESSED' POLICY_ERROR = 'POLICY_ERROR' - POLICY_WARNING = 'POLICY_WARNING' - POLICY_TIMEOUT = 'POLICY_TIMEOUT' POLICY_KILLED = 'POLICY_KILLED' + POLICY_PROCESSED = 'POLICY_PROCESSED' + POLICY_RECEIVED = 'POLICY_RECEIVED' + POLICY_TIMEOUT = 'POLICY_TIMEOUT' + POLICY_WARNING = 'POLICY_WARNING' + TASK_ERROR = 'TASK_ERROR' + TASK_KILLED = 'TASK_KILLED' + TASK_PROCESSED = 'TASK_PROCESSED' + TASK_TIMEOUT = 'TASK_TIMEOUT' + TASK_WARNING = 'TASK_WARNING' + TASK_RECEIVED = 'TASK_RECEIVED' diff --git a/opt/ahenk/base/model/MessageType.py b/opt/ahenk/base/model/enum/MessageType.py similarity index 88% rename from opt/ahenk/base/model/MessageType.py rename to opt/ahenk/base/model/enum/MessageType.py index 2bcddf5..cbfc1b1 100644 --- a/opt/ahenk/base/model/MessageType.py +++ b/opt/ahenk/base/model/enum/MessageType.py @@ -3,17 +3,20 @@ # Author: İsmail BAŞARAN from enum import Enum + class MessageType(Enum): - TASK_STATUS = 'TASK_STATUS' - REGISTER = 'REGISTER' - UNREGISTER = 'UNREGISTER' - REGISTER_LDAP = 'REGISTER_LDAP' + EXECUTE_POLICY = 'EXECUTE_POLICY' + EXECUTE_SCRIPT = 'EXECUTE_SCRIPT' + EXECUTE_TASK = 'EXECUTE_TASK' GET_POLICIES = 'GET_POLICIES' + INSTALL_PLUGIN = 'INSTALL_PLUGIN' LOGIN = 'LOGIN' LOGOUT = 'LOGOUT' - POLICY_STATUS = 'POLICY_STATUS' - EXECUTE_POLICY = 'EXECUTE_POLICY' - EXECUTE_TASK = 'EXECUTE_TASK' + MISSING_PLUGIN = 'MISSING_PLUGIN' MOVE_FILE = 'MOVE_FILE' + POLICY_STATUS = 'POLICY_STATUS' + REGISTER = 'REGISTER' + REGISTER_LDAP = 'REGISTER_LDAP' REQUEST_FILE = 'REQUEST_FILE' - EXECUTE_SCRIPT = 'EXECUTE_SCRIPT' + UNREGISTER = 'UNREGISTER' + TASK_STATUS = 'TASK_STATUS' diff --git a/opt/ahenk/base/model/enum/__init__.py b/opt/ahenk/base/model/enum/__init__.py new file mode 100644 index 0000000..e69de29