diff options
author | Yiting.Li <liyiting@huawei.com> | 2016-01-19 14:39:31 +0800 |
---|---|---|
committer | Yiting.Li <liyiting@huawei.com> | 2016-01-19 14:39:31 +0800 |
commit | 5b4f794932cb9b28ec679e6dd88e6febb2a5db7b (patch) | |
tree | d7b2615275a93ef1c2c878a0732b687832267174 /vstf/vstf/agent/env | |
parent | 827a986f4abc404dc803380a25d5e9ade7448f67 (diff) |
JIRA: BOTTLENECKS-29
add the performance test framework
add the copyright on the code.
Change-Id: I6ec9eefe65bf07c2dd6c636d1b90b64da303952e
Signed-off-by: Yiting.Li <liyiting@huawei.com>
Diffstat (limited to 'vstf/vstf/agent/env')
28 files changed, 225 insertions, 134 deletions
diff --git a/vstf/vstf/agent/env/__init__.py b/vstf/vstf/agent/env/__init__.py index 89dcd4e2..df7d24d0 100755 --- a/vstf/vstf/agent/env/__init__.py +++ b/vstf/vstf/agent/env/__init__.py @@ -1,14 +1,9 @@ -# Copyright Huawei Technologies Co., Ltd. 1998-2015. -# All Rights Reserved. +############################################################################## +# Copyright (c) 2015 Huawei Technologies Co.,Ltd and others. # -# Licensed under the Apache License, Version 2.0 (the License); you may -# not use this file except in compliance with the License. You may obtain -# a copy of the License at -# -# http://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an AS IS BASIS, WITHOUT -# WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the -# License for the specific language governing permissions and limitations -# under the License. +# 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 +############################################################################## + diff --git a/vstf/vstf/agent/env/basic/__init__.py b/vstf/vstf/agent/env/basic/__init__.py index 89dcd4e2..df7d24d0 100755 --- a/vstf/vstf/agent/env/basic/__init__.py +++ b/vstf/vstf/agent/env/basic/__init__.py @@ -1,14 +1,9 @@ -# Copyright Huawei Technologies Co., Ltd. 1998-2015. -# All Rights Reserved. +############################################################################## +# Copyright (c) 2015 Huawei Technologies Co.,Ltd and others. # -# Licensed under the Apache License, Version 2.0 (the License); you may -# not use this file except in compliance with the License. You may obtain -# a copy of the License at -# -# http://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an AS IS BASIS, WITHOUT -# WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the -# License for the specific language governing permissions and limitations -# under the License. +# 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 +############################################################################## + diff --git a/vstf/vstf/agent/env/basic/collect.py b/vstf/vstf/agent/env/basic/collect.py index bc4f1ee4..126a7d55 100755 --- a/vstf/vstf/agent/env/basic/collect.py +++ b/vstf/vstf/agent/env/basic/collect.py @@ -1,3 +1,12 @@ +############################################################################## +# Copyright (c) 2015 Huawei Technologies Co.,Ltd and others. +# +# 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 os import platform import logging diff --git a/vstf/vstf/agent/env/basic/commandline.py b/vstf/vstf/agent/env/basic/commandline.py index 0df037d8..e4df9b27 100755 --- a/vstf/vstf/agent/env/basic/commandline.py +++ b/vstf/vstf/agent/env/basic/commandline.py @@ -1,3 +1,12 @@ +############################################################################## +# Copyright (c) 2015 Huawei Technologies Co.,Ltd and others. +# +# 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 subprocess import threading import logging diff --git a/vstf/vstf/agent/env/basic/device_manager.py b/vstf/vstf/agent/env/basic/device_manager.py index 3209d7c9..8b5387fe 100755 --- a/vstf/vstf/agent/env/basic/device_manager.py +++ b/vstf/vstf/agent/env/basic/device_manager.py @@ -1,8 +1,11 @@ -""" -Created on 2015-9-25 - -@author: y00228926 -""" +############################################################################## +# Copyright (c) 2015 Huawei Technologies Co.,Ltd and others. +# +# 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 re import logging diff --git a/vstf/vstf/agent/env/basic/image_manager.py b/vstf/vstf/agent/env/basic/image_manager.py index 6c7df709..c3b5c6b3 100755 --- a/vstf/vstf/agent/env/basic/image_manager.py +++ b/vstf/vstf/agent/env/basic/image_manager.py @@ -1,8 +1,12 @@ -""" -Created on 2015-7-28 +############################################################################## +# Copyright (c) 2015 Huawei Technologies Co.,Ltd and others. +# +# 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 +############################################################################## -@author: y00228926 -""" from vstf.common.utils import check_call import os import logging diff --git a/vstf/vstf/agent/env/basic/source_manager.py b/vstf/vstf/agent/env/basic/source_manager.py index 4267cbd2..6edd14ca 100755 --- a/vstf/vstf/agent/env/basic/source_manager.py +++ b/vstf/vstf/agent/env/basic/source_manager.py @@ -1,8 +1,12 @@ -""" -Created on 2015-8-27 +############################################################################## +# Copyright (c) 2015 Huawei Technologies Co.,Ltd and others. +# +# 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 +############################################################################## -@author: y00228926 -""" import os import logging import contextlib diff --git a/vstf/vstf/agent/env/basic/vm9pfs.py b/vstf/vstf/agent/env/basic/vm9pfs.py index f3a2c2ce..7364f8b2 100755 --- a/vstf/vstf/agent/env/basic/vm9pfs.py +++ b/vstf/vstf/agent/env/basic/vm9pfs.py @@ -1,8 +1,12 @@ -""" -Created on 2015-8-27 +############################################################################## +# Copyright (c) 2015 Huawei Technologies Co.,Ltd and others. +# +# 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 +############################################################################## -@author: y00228926 -""" import os import logging import textwrap diff --git a/vstf/vstf/agent/env/basic/vm_manager.py b/vstf/vstf/agent/env/basic/vm_manager.py index e59d6c71..60a3b37b 100755 --- a/vstf/vstf/agent/env/basic/vm_manager.py +++ b/vstf/vstf/agent/env/basic/vm_manager.py @@ -1,8 +1,12 @@ -""" -Created on 2015-8-27 +############################################################################## +# Copyright (c) 2015 Huawei Technologies Co.,Ltd and others. +# +# 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 +############################################################################## -@author: y00228926 -""" import os import shutil import logging diff --git a/vstf/vstf/agent/env/basic/vm_xml_help.py b/vstf/vstf/agent/env/basic/vm_xml_help.py index d3116259..6f9131e7 100755 --- a/vstf/vstf/agent/env/basic/vm_xml_help.py +++ b/vstf/vstf/agent/env/basic/vm_xml_help.py @@ -1,8 +1,12 @@ -""" -Created on 2015-7-2 +############################################################################## +# Copyright (c) 2015 Huawei Technologies Co.,Ltd and others. +# +# 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 +############################################################################## -@author: y00228926 -""" xml_head = ''' <domain type='kvm'> <name>VM_NAME</name> diff --git a/vstf/vstf/agent/env/builder.py b/vstf/vstf/agent/env/builder.py index ebd3d3d7..a66a8873 100755 --- a/vstf/vstf/agent/env/builder.py +++ b/vstf/vstf/agent/env/builder.py @@ -1,8 +1,12 @@ -""" -Created on 2015-7-8 +############################################################################## +# Copyright (c) 2015 Huawei Technologies Co.,Ltd and others. +# +# 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 +############################################################################## -@author: y00228926 -""" import logging import stevedore diff --git a/vstf/vstf/agent/env/driver_plugins/__init__.py b/vstf/vstf/agent/env/driver_plugins/__init__.py index e69de29b..fc9802be 100755 --- a/vstf/vstf/agent/env/driver_plugins/__init__.py +++ b/vstf/vstf/agent/env/driver_plugins/__init__.py @@ -0,0 +1,8 @@ +############################################################################## +# Copyright (c) 2015 Huawei Technologies Co.,Ltd and others. +# +# 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 +##############################################################################
\ No newline at end of file diff --git a/vstf/vstf/agent/env/driver_plugins/manager.py b/vstf/vstf/agent/env/driver_plugins/manager.py index 3bb3fadd..6f895656 100755 --- a/vstf/vstf/agent/env/driver_plugins/manager.py +++ b/vstf/vstf/agent/env/driver_plugins/manager.py @@ -1,8 +1,12 @@ -""" -Created on 2015-9-15 +############################################################################## +# Copyright (c) 2015 Huawei Technologies Co.,Ltd and others. +# +# 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 +############################################################################## -@author: y00228926 -""" import stevedore diff --git a/vstf/vstf/agent/env/driver_plugins/model.py b/vstf/vstf/agent/env/driver_plugins/model.py index 3a0b1845..ddc07449 100755 --- a/vstf/vstf/agent/env/driver_plugins/model.py +++ b/vstf/vstf/agent/env/driver_plugins/model.py @@ -1,8 +1,12 @@ -""" -Created on 2015-9-15 +############################################################################## +# Copyright (c) 2015 Huawei Technologies Co.,Ltd and others. +# +# 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 +############################################################################## -@author: y00228926 -""" from abc import ABCMeta from abc import abstractmethod diff --git a/vstf/vstf/agent/env/driver_plugins/origin_driver.py b/vstf/vstf/agent/env/driver_plugins/origin_driver.py index 850d7851..bf3c15c8 100755 --- a/vstf/vstf/agent/env/driver_plugins/origin_driver.py +++ b/vstf/vstf/agent/env/driver_plugins/origin_driver.py @@ -1,8 +1,12 @@ -""" -Created on 2015-10-12 +############################################################################## +# Copyright (c) 2015 Huawei Technologies Co.,Ltd and others. +# +# 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 +############################################################################## -@author: y00228926 -""" from vstf.agent.env.driver_plugins import model from vstf.common.utils import check_and_rmmod, check_call diff --git a/vstf/vstf/agent/env/fsmonitor/FSMonitor.py b/vstf/vstf/agent/env/fsmonitor/FSMonitor.py index 71029705..e6559362 100755 --- a/vstf/vstf/agent/env/fsmonitor/FSMonitor.py +++ b/vstf/vstf/agent/env/fsmonitor/FSMonitor.py @@ -1,8 +1,13 @@ -""" -Created on 2015-7-13 +############################################################################## +# Copyright (c) 2015 Huawei Technologies Co.,Ltd and others. +# +# 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 +############################################################################## + -@author: y00228926 -""" import os import time import logging diff --git a/vstf/vstf/agent/env/fsmonitor/__init__.py b/vstf/vstf/agent/env/fsmonitor/__init__.py index 89dcd4e2..83b8d15d 100755 --- a/vstf/vstf/agent/env/fsmonitor/__init__.py +++ b/vstf/vstf/agent/env/fsmonitor/__init__.py @@ -1,14 +1,8 @@ -# Copyright Huawei Technologies Co., Ltd. 1998-2015. -# All Rights Reserved. +############################################################################## +# Copyright (c) 2015 Huawei Technologies Co.,Ltd and others. # -# Licensed under the Apache License, Version 2.0 (the License); you may -# not use this file except in compliance with the License. You may obtain -# a copy of the License at -# -# http://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an AS IS BASIS, WITHOUT -# WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the -# License for the specific language governing permissions and limitations -# under the License. +# 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 +############################################################################## diff --git a/vstf/vstf/agent/env/fsmonitor/constant.py b/vstf/vstf/agent/env/fsmonitor/constant.py index d30bb439..33b37eb4 100755 --- a/vstf/vstf/agent/env/fsmonitor/constant.py +++ b/vstf/vstf/agent/env/fsmonitor/constant.py @@ -1,8 +1,12 @@ -""" -Created on 2015-8-27 +############################################################################## +# Copyright (c) 2015 Huawei Technologies Co.,Ltd and others. +# +# 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 +############################################################################## -@author: y00228926 -""" VM_UP_Flag_FILE = 'up' VM_CMD_DONE_FLAG_FILE = 'command_done' VM_CMD_RESULT_FILE = 'command_result_data' diff --git a/vstf/vstf/agent/env/fsmonitor/utils.py b/vstf/vstf/agent/env/fsmonitor/utils.py index e6eb1536..5bdb4159 100755 --- a/vstf/vstf/agent/env/fsmonitor/utils.py +++ b/vstf/vstf/agent/env/fsmonitor/utils.py @@ -1,8 +1,12 @@ -""" -Created on 2015-7-8 +############################################################################## +# Copyright (c) 2015 Huawei Technologies Co.,Ltd and others. +# +# 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 +############################################################################## -@author: y00228926 -""" import subprocess from StringIO import StringIO import re diff --git a/vstf/vstf/agent/env/plugins/__init__.py b/vstf/vstf/agent/env/plugins/__init__.py index 89dcd4e2..83b8d15d 100755 --- a/vstf/vstf/agent/env/plugins/__init__.py +++ b/vstf/vstf/agent/env/plugins/__init__.py @@ -1,14 +1,8 @@ -# Copyright Huawei Technologies Co., Ltd. 1998-2015. -# All Rights Reserved. +############################################################################## +# Copyright (c) 2015 Huawei Technologies Co.,Ltd and others. # -# Licensed under the Apache License, Version 2.0 (the License); you may -# not use this file except in compliance with the License. You may obtain -# a copy of the License at -# -# http://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an AS IS BASIS, WITHOUT -# WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the -# License for the specific language governing permissions and limitations -# under the License. +# 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 +############################################################################## diff --git a/vstf/vstf/agent/env/plugins/libvirt_plugin.py b/vstf/vstf/agent/env/plugins/libvirt_plugin.py index e7fefb6f..27af8063 100755 --- a/vstf/vstf/agent/env/plugins/libvirt_plugin.py +++ b/vstf/vstf/agent/env/plugins/libvirt_plugin.py @@ -1,8 +1,12 @@ -""" -Created on 2015-7-8 +############################################################################## +# Copyright (c) 2015 Huawei Technologies Co.,Ltd and others. +# +# 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 +############################################################################## -@author: y00228926 -""" import logging from vstf.common.utils import ping, my_sleep diff --git a/vstf/vstf/agent/env/plugins/model.py b/vstf/vstf/agent/env/plugins/model.py index 5485f970..b19ceb96 100755 --- a/vstf/vstf/agent/env/plugins/model.py +++ b/vstf/vstf/agent/env/plugins/model.py @@ -1,8 +1,12 @@ -""" -Created on 2015-9-15 +############################################################################## +# Copyright (c) 2015 Huawei Technologies Co.,Ltd and others. +# +# 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 +############################################################################## -@author: y00228926 -""" from abc import ABCMeta from abc import abstractmethod diff --git a/vstf/vstf/agent/env/plugins/tester_env_plugin.py b/vstf/vstf/agent/env/plugins/tester_env_plugin.py index 0fd4b9a2..0682aac8 100755 --- a/vstf/vstf/agent/env/plugins/tester_env_plugin.py +++ b/vstf/vstf/agent/env/plugins/tester_env_plugin.py @@ -1,8 +1,11 @@ -#!/usr/bin/python -# -*- coding: utf8 -*- -# author: wly -# date: 2015/11/17 -# see license for license details +############################################################################## +# Copyright (c) 2015 Huawei Technologies Co.,Ltd and others. +# +# 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 logging diff --git a/vstf/vstf/agent/env/vswitch_plugins/__init__.py b/vstf/vstf/agent/env/vswitch_plugins/__init__.py index e69de29b..83b8d15d 100755 --- a/vstf/vstf/agent/env/vswitch_plugins/__init__.py +++ b/vstf/vstf/agent/env/vswitch_plugins/__init__.py @@ -0,0 +1,8 @@ +############################################################################## +# Copyright (c) 2015 Huawei Technologies Co.,Ltd and others. +# +# 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 +############################################################################## diff --git a/vstf/vstf/agent/env/vswitch_plugins/bridge_plugin.py b/vstf/vstf/agent/env/vswitch_plugins/bridge_plugin.py index 252f190d..21b8f82c 100755 --- a/vstf/vstf/agent/env/vswitch_plugins/bridge_plugin.py +++ b/vstf/vstf/agent/env/vswitch_plugins/bridge_plugin.py @@ -1,8 +1,12 @@ -""" -Created on 2015-10-12 +############################################################################## +# Copyright (c) 2015 Huawei Technologies Co.,Ltd and others. +# +# 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 +############################################################################## -@author: y00228926 -""" from vstf.agent.env.vswitch_plugins import model from vstf.common.utils import check_call, get_eth_by_bdf, check_output diff --git a/vstf/vstf/agent/env/vswitch_plugins/manager.py b/vstf/vstf/agent/env/vswitch_plugins/manager.py index 00115dfd..785a1db8 100755 --- a/vstf/vstf/agent/env/vswitch_plugins/manager.py +++ b/vstf/vstf/agent/env/vswitch_plugins/manager.py @@ -1,8 +1,12 @@ -""" -Created on 2015-9-15 +############################################################################## +# Copyright (c) 2015 Huawei Technologies Co.,Ltd and others. +# +# 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 +############################################################################## -@author: y00228926 -""" import stevedore diff --git a/vstf/vstf/agent/env/vswitch_plugins/model.py b/vstf/vstf/agent/env/vswitch_plugins/model.py index a4d8b3b5..5d700411 100755 --- a/vstf/vstf/agent/env/vswitch_plugins/model.py +++ b/vstf/vstf/agent/env/vswitch_plugins/model.py @@ -1,8 +1,12 @@ -""" -Created on 2015-9-15 +############################################################################## +# Copyright (c) 2015 Huawei Technologies Co.,Ltd and others. +# +# 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 +############################################################################## -@author: y00228926 -""" from abc import ABCMeta from abc import abstractmethod diff --git a/vstf/vstf/agent/env/vswitch_plugins/ovs_plugin.py b/vstf/vstf/agent/env/vswitch_plugins/ovs_plugin.py index 46045950..7ea56d4a 100755 --- a/vstf/vstf/agent/env/vswitch_plugins/ovs_plugin.py +++ b/vstf/vstf/agent/env/vswitch_plugins/ovs_plugin.py @@ -1,8 +1,12 @@ -""" -Created on 2015-10-10 +############################################################################## +# Copyright (c) 2015 Huawei Technologies Co.,Ltd and others. +# +# 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 +############################################################################## -@author: y00228926 -""" import os import shutil import logging |