+ def collect_plugin_files(self):
+ with self.ssh as s:
+ s.exec_cmd('mkdir %s' % PLUGINS_DIR)
+ if self.fuel_plugins_dir:
+ for f in glob.glob('%s/*.rpm' % self.fuel_plugins_dir):
+ s.scp_put(f, PLUGINS_DIR)
+ else:
+ s.exec_cmd('cp %s/*.rpm %s' % (LOCAL_PLUGIN_FOLDER,
+ PLUGINS_DIR))
+
+ def install_plugins(self):
+ log('Installing Fuel Plugins')
+ with self.ssh as s:
+ r = s.exec_cmd('find %s -type f -name \'*.rpm\'' % PLUGINS_DIR)
+ for f in r.splitlines():
+ log('Found plugin %s, installing ...' % f)
+ r, e = s.exec_cmd('fuel plugins --install %s' % f, False)
+ if e and 'does not update installed package' not in r:
+ raise Exception('Installation of Fuel Plugin %s '
+ 'failed: %s' % (f, e))
+