Merge "Update json module to jsonutils"
This commit is contained in:
commit
6ec1956dfa
@ -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
|
||||
|
@ -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
|
||||
|
||||
|
@ -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
|
||||
|
@ -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
|
||||
|
Loading…
Reference in New Issue
Block a user