Merge "Update json module to jsonutils"

This commit is contained in:
Zuul 2019-04-30 10:47:49 +00:00 committed by Gerrit Code Review
commit 6ec1956dfa
4 changed files with 7 additions and 8 deletions

View File

@ -45,7 +45,7 @@ oslo.config==5.2.0
oslo.context==2.22.0
oslo.i18n==3.20.0
oslo.log==3.36.0
oslo.serialization==2.25.0
oslo.serialization==2.18.0
oslo.utils==3.36.0
oslosphinx==4.7.0
packaging==17.1

View File

@ -8,6 +8,7 @@
#
# PBR should always appear first
oslo.log>=3.36.0 # Apache-2.0
oslo.serialization!=2.19.1,>=2.18.0 # Apache-2.0
pbr!=2.1.0,>=2.0.0 # Apache-2.0
python-tackerclient>=0.8.0 # Apache-2.0

View File

@ -10,12 +10,11 @@
# License for the specific language governing permissions and limitations
# under the License.
import json
from django.urls import reverse
from django.urls import reverse_lazy
from django.utils.translation import ugettext_lazy as _
from oslo_log import log as logging
from oslo_serialization import jsonutils
from horizon import exceptions
from horizon import forms
@ -93,7 +92,7 @@ class DetailView(tabs.TabView):
try:
vnffg = tacker_api.tacker.get_vnffg(self.request, vnffg_id)
vnffg["vnffg"]["mgmt_url"] = json.loads(
vnffg["vnffg"]["mgmt_url"] = jsonutils.loads(
vnffg["vnffg"]["mgmt_url"]) if vnffg["vnffg"].get(
"mgmt_url") else None
return vnffg

View File

@ -12,12 +12,11 @@
# License for the specific language governing permissions and limitations
# under the License.
import json
from django.urls import reverse
from django.urls import reverse_lazy
from django.utils.translation import ugettext_lazy as _
from oslo_log import log as logging
from oslo_serialization import jsonutils
from horizon import exceptions
from horizon import forms
@ -95,8 +94,8 @@ class DetailView(tabs.TabView):
try:
vnf = tacker_api.tacker.get_vnf(self.request, vnf_id)
vnf["vnf"]["mgmt_url"] = json.loads(vnf["vnf"]["mgmt_url"]) if \
vnf["vnf"]["mgmt_url"] else None
vnf["vnf"]["mgmt_url"] = jsonutils.loads(vnf["vnf"]["mgmt_url"]) \
if vnf["vnf"]["mgmt_url"] else None
return vnf
except ValueError as e:
msg = _('Cannot decode json : %s') % e