summaryrefslogtreecommitdiffstats
path: root/store/utilities.py
diff options
context:
space:
mode:
authorNikolay Zamotaev <nzamotaev@luxoft.com>2018-06-05 16:07:05 +0300
committerNikolay Zamotaev <nzamotaev@luxoft.com>2018-06-22 15:22:30 +0000
commite03e50b4e4d1a48d05ab48fb01769c35fe92d722 (patch)
tree4538a61a81303b8a9816924a95b12a389fa60907 /store/utilities.py
parentfec257d2497ecaff5aa8071cc122b4cc8144caa3 (diff)
[deployment-server] Add tag support and filtering
Added tag support. Tags are parsed from packages: * extraMetadata * extraSignedMetadata Added parsing requires/conflicts tags from hello phase (Request goes in hello, filtering goes in app list) Change-Id: Ifab174bc3df0dbf4efa4832bb28bb4f58a6a302c Reviewed-by: Dominik Holland <dominik.holland@pelagicore.com>
Diffstat (limited to 'store/utilities.py')
-rw-r--r--store/utilities.py7
1 files changed, 7 insertions, 0 deletions
diff --git a/store/utilities.py b/store/utilities.py
index 1b68f6a..a464507 100644
--- a/store/utilities.py
+++ b/store/utilities.py
@@ -45,6 +45,13 @@ from OpenSSL.crypto import load_pkcs12, FILETYPE_PEM, dump_privatekey, dump_cert
from django.conf import settings
+def validateTag(tag):
+ for i in tag:
+ if not i.isalnum():
+ if i != "_":
+ return False
+ return True
+
def packagePath(appId = None):
path = settings.MEDIA_ROOT + 'packages/'
if appId is not None: