summaryrefslogtreecommitdiffstats
path: root/CI/tier_manager.py
diff options
context:
space:
mode:
authorjose.lausuch <jose.lausuch@ericsson.com>2016-04-22 15:34:49 +0200
committerJose Lausuch <jose.lausuch@ericsson.com>2016-04-25 08:36:59 +0000
commitf1c352869e0114a54830d46ea3407006096138e6 (patch)
treefa763c06301d3aae1fe228857020b7d32efa9800 /CI/tier_manager.py
parentd36a76e6425c914a8243033175c3233e449e624b (diff)
Add tier_handler and tier_builder
tier_handler: defines the classes for Tier,TestCase and Dependency tier_builder: reads the testcases.yaml and creates a list of objects that will be used later on to execute the tests JIRA: FUNCTEST-190 Change-Id: Iabef344aff036ad3b525088af59fb21b16b02fc8 Signed-off-by: jose.lausuch <jose.lausuch@ericsson.com>
Diffstat (limited to 'CI/tier_manager.py')
-rw-r--r--CI/tier_manager.py63
1 files changed, 0 insertions, 63 deletions
diff --git a/CI/tier_manager.py b/CI/tier_manager.py
deleted file mode 100644
index cd1512319..000000000
--- a/CI/tier_manager.py
+++ /dev/null
@@ -1,63 +0,0 @@
-#!/usr/bin/env python
-#
-# jose.lausuch@ericsson.com
-# 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
-#
-
-
-class Tier:
- def __init__(self, name, description, order):
- self.tests_array = []
- self.name = name
- self.description = description
- self.order = order
-
- def add_test(self, testcase):
- self.tests_array.append(testcase)
-
- def get_tests(self):
- array_str = []
- for test in self.tests_array:
- array_str.append(test.name)
- return array_str
-
- def __str__(self):
- return "Tier info:\n" + \
- "\tName: " + self.name + "\n" + \
- "\tDescription: " + self.description + "\n" + \
- "\tOrder: " + self.order + "\n" + \
- "\tTest cases: " + str(self.get_tests()) + "\n"
-
-
-class Testcase:
- def __init__(self, name, description, dependency):
- self.name = name
- self.description = description
- self.dependency = dependency
-
- def __str__(self):
- return "Testcase info:\n" + \
- "\tName: " + self.name + "\n" + \
- "\tName: " + self.name + "\n" + \
- "\tDescription: " + self.description + "\n" + \
- "\tDependencies: " + str(self.dependency) + "\n"
-
-
-class Dependency:
- def __init__(self, installer, sdn, feature, mode):
- self.installer = installer
- self.sdn = sdn
- self.feature = feature
- self.mode = mode
-
- def __str__(self):
- return "Dependency info:\n" + \
- "\t" + self.installer + " os-[" + self.sdn + "]-[" + \
- self.feature + "]-[" + self.mode + "]" + "\n" + \
- "\t\t- installer: " + self.installer + "\n" + \
- "\t\t- sdn Controller: " + self.sdn + "\n" + \
- "\t\t- feature: " + self.feature + "\n" + \
- "\t\t- mode: " + self.mode + "\n"