diff --git a/control/action.py b/control/action.py index 606bfd6..2a3b26b 100644 --- a/control/action.py +++ b/control/action.py @@ -159,6 +159,10 @@ def __init__(self, *args, **kwargs): self.env.CUBE('username'), self.env.CUBE('password') ) + self.request = client.Request( + self.env.CUBE('username'), + self.env.CUBE('password') + ) self.d_pipelines : dict = self.cl.get_pipelines() self.pltopo : int = self.cl.get_plugins({'name': 'pl-topologicalcopy'}) self.newTreeID : int = -1 @@ -256,6 +260,7 @@ def waitForNodeInWorkflow(self, if totalPolls: pollCount += 1 if 'finished' in d_plinfo['status']: b_finished = d_plinfo['status'] == 'finishedSuccessfully' + #self.QA_check(d_plinfo) return { 'finished' : b_finished, 'status' : str_pluginStatus, @@ -264,6 +269,14 @@ def waitForNodeInWorkflow(self, 'polls' : pollCount, 'plid' : waitOnPluginID } + def QA_check(self,plugin_info): + print(plugin_info) + QA_plugin = 'pl-lld_chxr' + if QA_plugin in plugin_info['plugin_name']: + feed_id = plugin_info['feed_id'] + feed = self.cl.get_feeds({'feed_id': feed_id}) + name = feed['data'][0]['name'] + self.request.put(f'{self.env.CUBE("url")}{feed_id}/', {'name': f'QA-failed-{name}'}) def pluginParameters_setInNodes(self, d_piping : dict, diff --git a/requirements.txt b/requirements.txt index 1958f28..189642f 100644 --- a/requirements.txt +++ b/requirements.txt @@ -3,7 +3,7 @@ pudb pflogf pfmisc loguru -python-chrisclient==2.11.1 +python-chrisclient==2.9.1 pftag==1.2.22 pflog==1.2.26 pftel-client