summaryrefslogtreecommitdiffstats
path: root/vstf/vstf/controller/settings
diff options
context:
space:
mode:
Diffstat (limited to 'vstf/vstf/controller/settings')
-rwxr-xr-xvstf/vstf/controller/settings/__init__.py20
-rwxr-xr-xvstf/vstf/controller/settings/cpu_settings.py13
-rwxr-xr-xvstf/vstf/controller/settings/data_settings.py31
-rwxr-xr-xvstf/vstf/controller/settings/device_settings.py13
-rwxr-xr-xvstf/vstf/controller/settings/flows_settings.py13
-rwxr-xr-xvstf/vstf/controller/settings/forwarding_settings.py13
-rwxr-xr-xvstf/vstf/controller/settings/html_settings.py14
-rwxr-xr-xvstf/vstf/controller/settings/mail_settings.py13
-rwxr-xr-xvstf/vstf/controller/settings/perf_settings.py17
-rwxr-xr-xvstf/vstf/controller/settings/settings.py13
-rwxr-xr-xvstf/vstf/controller/settings/settings_input.py14
-rwxr-xr-xvstf/vstf/controller/settings/template_settings.py22
-rwxr-xr-xvstf/vstf/controller/settings/tester_settings.py14
-rwxr-xr-xvstf/vstf/controller/settings/tool_settings.py14
14 files changed, 121 insertions, 103 deletions
diff --git a/vstf/vstf/controller/settings/__init__.py b/vstf/vstf/controller/settings/__init__.py
index 89dcd4e2..83b8d15d 100755
--- a/vstf/vstf/controller/settings/__init__.py
+++ b/vstf/vstf/controller/settings/__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/controller/settings/cpu_settings.py b/vstf/vstf/controller/settings/cpu_settings.py
index c69742ad..a25af4c1 100755
--- a/vstf/vstf/controller/settings/cpu_settings.py
+++ b/vstf/vstf/controller/settings/cpu_settings.py
@@ -1,8 +1,11 @@
-#!/usr/bin/python
-# -*- coding: utf8 -*-
-# author: wly
-# date: 2015/11/19
-# 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
import pprint
diff --git a/vstf/vstf/controller/settings/data_settings.py b/vstf/vstf/controller/settings/data_settings.py
deleted file mode 100755
index d9878bf2..00000000
--- a/vstf/vstf/controller/settings/data_settings.py
+++ /dev/null
@@ -1,31 +0,0 @@
-#!/usr/bin/env python
-# -*- coding: utf8 -*-
-# author: wly
-# date: 2015-09-25
-# see license for license details
-
-import logging
-
-import vstf.controller.settings.settings as sets
-
-LOG = logging.getLogger(__name__)
-
-
-class DataSettings(sets.Settings):
- def __init__(self, path="/etc/vstf/reporter/",
- filename="reporters.html.data-settings",
- mode=sets.SETS_SINGLE):
- super(DataSettings, self).__init__(path, filename, mode)
-
- def _register_func(self):
- super(DataSettings, self)._register_func()
- items = {"ovs", "result"}
- fkeys = {"title", "content"}
- for item in items:
- item = item.encode()
- for key in fkeys:
- key = key.encode()
- func_name = "set_%s_%s" % (item, key)
- setattr(self, func_name, self._setting_file(func_name, self._mset[item], self._fset[item], key))
- func_name = "mset_%s_%s" % (item, key)
- setattr(self, func_name, self._setting_memory(func_name, self._mset[item], key)) \ No newline at end of file
diff --git a/vstf/vstf/controller/settings/device_settings.py b/vstf/vstf/controller/settings/device_settings.py
index 45bc9eb1..25f2c5bf 100755
--- a/vstf/vstf/controller/settings/device_settings.py
+++ b/vstf/vstf/controller/settings/device_settings.py
@@ -1,8 +1,11 @@
-#!/usr/bin/python
-# -*- coding: utf8 -*-
-# author: wly
-# date: 2015/11/19
-# 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/controller/settings/flows_settings.py b/vstf/vstf/controller/settings/flows_settings.py
index b2bec625..9cd1a1b7 100755
--- a/vstf/vstf/controller/settings/flows_settings.py
+++ b/vstf/vstf/controller/settings/flows_settings.py
@@ -1,8 +1,11 @@
-#!/usr/bin/env python
-# -*- coding: utf8 -*-
-# author: wly
-# date: 2015-09-18
-# 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/controller/settings/forwarding_settings.py b/vstf/vstf/controller/settings/forwarding_settings.py
index 67ec3f85..636ddfda 100755
--- a/vstf/vstf/controller/settings/forwarding_settings.py
+++ b/vstf/vstf/controller/settings/forwarding_settings.py
@@ -1,8 +1,11 @@
-#!/usr/bin/python
-# -*- coding: utf8 -*-
-# author: wly
-# date: 2015/11/19
-# 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/controller/settings/html_settings.py b/vstf/vstf/controller/settings/html_settings.py
index 7e715100..ce87733e 100755
--- a/vstf/vstf/controller/settings/html_settings.py
+++ b/vstf/vstf/controller/settings/html_settings.py
@@ -1,9 +1,11 @@
-#!/usr/bin/python
-# -*- coding: utf8 -*-
-# author: wly
-# date: 2015-09-25
-# see license for license details
-__version__ = ''' '''
+##############################################################################
+# 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/controller/settings/mail_settings.py b/vstf/vstf/controller/settings/mail_settings.py
index fd66b5c2..a2d2d6df 100755
--- a/vstf/vstf/controller/settings/mail_settings.py
+++ b/vstf/vstf/controller/settings/mail_settings.py
@@ -1,8 +1,11 @@
-#!/usr/bin/env python
-# -*- coding: utf8 -*-
-# author: wly
-# date: 2015-09-06
-# 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
import pprint
diff --git a/vstf/vstf/controller/settings/perf_settings.py b/vstf/vstf/controller/settings/perf_settings.py
index c0c8123b..610cb4ae 100755
--- a/vstf/vstf/controller/settings/perf_settings.py
+++ b/vstf/vstf/controller/settings/perf_settings.py
@@ -1,8 +1,11 @@
-#!/usr/bin/python
-# -*- coding: utf8 -*-
-# author: wly
-# date: 2015-09-28
-# 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 pprint
import logging
@@ -50,7 +53,7 @@ class PerfSettings(sets.Settings):
@deco.dcheck('sizes')
@deco.dcheck("type", choices=cst.TTYPES)
- @deco.dcheck("profile", choices=cst.PROFILES)
+ @deco.dcheck("profile", choices=cst.PROVIDERS)
@deco.dcheck("protocol", choices=cst.TPROTOCOLS)
@deco.dcheck("tool", choices=cst.TOOLS)
@deco.dcheck('case')
@@ -74,7 +77,7 @@ class PerfSettings(sets.Settings):
@deco.vstf_input('sizes', types=list)
@deco.vstf_input("type", types=str, choices=cst.TTYPES)
- @deco.vstf_input("profile", types=str, choices=cst.PROFILES)
+ @deco.vstf_input("profile", types=str, choices=cst.PROVIDERS)
@deco.vstf_input("protocol", types=str, choices=cst.TPROTOCOLS)
@deco.vstf_input("tool", types=str, choices=cst.TOOLS)
@deco.vstf_input('case')
diff --git a/vstf/vstf/controller/settings/settings.py b/vstf/vstf/controller/settings/settings.py
index 4730c8db..2c712bb2 100755
--- a/vstf/vstf/controller/settings/settings.py
+++ b/vstf/vstf/controller/settings/settings.py
@@ -1,8 +1,11 @@
-#!/usr/bin/python
-# -*- coding: utf8 -*-
-# author: wly
-# date: 2015-09-06
-# 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 json
import re
diff --git a/vstf/vstf/controller/settings/settings_input.py b/vstf/vstf/controller/settings/settings_input.py
index 2c262842..59652ed5 100755
--- a/vstf/vstf/controller/settings/settings_input.py
+++ b/vstf/vstf/controller/settings/settings_input.py
@@ -1,9 +1,11 @@
-#!/usr/bin/python
-# -*- coding: utf8 -*-
-# author: wly
-# date: 2015-10-16
-# 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 clize
from sigtools.modifiers import autokwoargs
diff --git a/vstf/vstf/controller/settings/template_settings.py b/vstf/vstf/controller/settings/template_settings.py
new file mode 100755
index 00000000..b677c539
--- /dev/null
+++ b/vstf/vstf/controller/settings/template_settings.py
@@ -0,0 +1,22 @@
+##############################################################################
+# 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
+
+import vstf.controller.settings.settings as sets
+
+LOG = logging.getLogger(__name__)
+
+
+class TemplateSettings(sets.Settings):
+ def __init__(self, path="/etc/vstf/reporter/",
+ filename="reporters.template-settings",
+ mode=sets.SETS_SINGLE):
+ super(TemplateSettings, self).__init__(path, filename, mode)
diff --git a/vstf/vstf/controller/settings/tester_settings.py b/vstf/vstf/controller/settings/tester_settings.py
index fb116a8d..554c8042 100755
--- a/vstf/vstf/controller/settings/tester_settings.py
+++ b/vstf/vstf/controller/settings/tester_settings.py
@@ -1,8 +1,12 @@
-#!/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/controller/settings/tool_settings.py b/vstf/vstf/controller/settings/tool_settings.py
index 1d543e6a..a84bc59f 100755
--- a/vstf/vstf/controller/settings/tool_settings.py
+++ b/vstf/vstf/controller/settings/tool_settings.py
@@ -1,8 +1,12 @@
-#!/usr/bin/env python
-# -*- coding: utf8 -*-
-# author: wly
-# date: 2015-09-18
-# 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
import pprint