From 7fe8a762bf0a6a94aecc1e935946c2b91125df51 Mon Sep 17 00:00:00 2001 From: Tony Mack Date: Tue, 8 Apr 2008 18:33:59 +0000 Subject: [PATCH] updated 'plc' check to 'plcs' check. --- qaapi/qa/tests/add_test_data.py | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/qaapi/qa/tests/add_test_data.py b/qaapi/qa/tests/add_test_data.py index 2498499..1ec4909 100644 --- a/qaapi/qa/tests/add_test_data.py +++ b/qaapi/qa/tests/add_test_data.py @@ -8,7 +8,7 @@ class add_test_data(Test): """ Adds the test data found in config to the plc db """ - def call(self, plc_name = None): + def call(self, plc_name = None): # Determine which plc to talk to plc = self.config.get_plc(plc_name) @@ -18,15 +18,15 @@ class add_test_data(Test): # Search config for objects that belong to this plc # Any object with 'plc' defined as this plc's name or with # no 'plc' defined will be added - this_plc = lambda object: 'plc' not in object or \ - 'plc' in object and object['plc'] == plc['name'] or \ - object['plc'] == None + this_plc = lambda object: 'plcs' not in object or \ + 'plcs' in object and plc['name'] in object['plcs'] or \ + object['plcs'] == None sitelist = filter(this_plc, self.config.sites.values()) nodelist = filter(this_plc, self.config.nodes.values()) slicelist = filter(this_plc, self.config.slices.values()) personlist = filter(this_plc, self.config.persons.values()) - + # Add Test site for site in sitelist: sites = api.GetSites(auth, [site['login_base']]) -- 2.47.0