Stop using django-file-md5

Current qinling-dashboard uses django-file-md5
to calculate md5 of uploading file.
But this library has no license terms,
so it is better to stop using this.
This commit remove those parts using above.

Change-Id: Ibe79df0d9d2d583e773cef502e40d07fc3eaf6f8
Story: 2003456
Task:24716
This commit is contained in:
keiichi-hikita 2018-08-16 10:45:55 +09:00
parent 7616809493
commit 69bbae30f9
4 changed files with 15 additions and 5 deletions

View File

@ -17,14 +17,14 @@ from django.urls import reverse
from django.utils.translation import ugettext_lazy as _
from django_file_md5 import calculate_md5
from horizon import exceptions
from horizon import forms
from horizon import messages
from qinling_dashboard import api
from qinling_dashboard.utils import calculate_md5
from qinling_dashboard import validators

View File

@ -14,8 +14,6 @@ import copy
from django.core.files import uploadedfile
from django_file_md5 import calculate_md5
from django.http import response
from django.urls import reverse
@ -25,6 +23,7 @@ from django.utils.http import urlunquote
from qinling_dashboard import api
from qinling_dashboard.content.functions import forms as project_fm
from qinling_dashboard.test import helpers as test
from qinling_dashboard.utils import calculate_md5
import mock

View File

@ -13,11 +13,23 @@
# This file is to be included for configuring application which relates
# to orchestration(Heat) functions.
import hashlib
import json
from django.utils.translation import pgettext_lazy
def calculate_md5(target):
if not target:
return ''
md5 = hashlib.md5()
for chunk in target.chunks():
md5.update(chunk)
return md5.hexdigest()
def convert_raw_input_to_api_format(value):
if value == '':
return None

View File

@ -8,7 +8,6 @@
#
# PBR should always appear first
pbr!=2.1.0,>=2.0.0 # Apache-2.0
django-file-md5>=1.0.2
python-qinlingclient>=1.1.0 # Apache-2.0
# This will be installed from git in OpenStack CI if the job setting