X-Git-Url: https://gerrit.opnfv.org/gerrit/gitweb?a=blobdiff_plain;f=api%2Fresources%2Fv2%2Fpods.py;h=d98238ca1de7ea70b216ec884fb168c88c39b53f;hb=9da77e9572bc9bd90b3978713b197339480a4a74;hp=ebc1312da8e76e6477a06b903c206c99a8ea7693;hpb=dec0be619a3968b0a30de710d83636c372f75574;p=yardstick.git diff --git a/api/resources/v2/pods.py b/api/resources/v2/pods.py index ebc1312da..d98238ca1 100644 --- a/api/resources/v2/pods.py +++ b/api/resources/v2/pods.py @@ -1,3 +1,11 @@ +############################################################################## +# Copyright (c) 2017 Huawei Technologies Co.,Ltd. +# +# All rights reserved. This program and the accompanying materials +# are made available under the terms of the Apache License, Version 2.0 +# which accompanies this distribution, and is available at +# http://www.apache.org/licenses/LICENSE-2.0 +############################################################################## import uuid import yaml import logging @@ -10,6 +18,7 @@ from api.database.v2.handlers import V2EnvironmentHandler from yardstick.common import constants as consts from yardstick.common.utils import result_handler from yardstick.common.task_template import TaskTemplate +from yardstick.common.yaml_loader import yaml_load LOG = logging.getLogger(__name__) LOG.setLevel(logging.DEBUG) @@ -40,7 +49,7 @@ class V2Pods(ApiResource): upload_file.save(consts.POD_FILE) with open(consts.POD_FILE) as f: - data = yaml.safe_load(TaskTemplate.render(f.read())) + data = yaml_load(TaskTemplate.render(f.read())) LOG.debug('pod content is: %s', data) LOG.info('create pod in database')