Пример #1
0
 def deploy_sensors(node_sensor_config):
     # check that path already exists
     copy_paths(node_sensor_config.conn, paths)
     with node_sensor_config.conn.open_sftp() as sftp:
         sensors_config = node_sensor_config.sensors.copy()
         sensors_config['source_id'] = node_sensor_config.source_id
         save_to_remote(sftp, config_remote_path,
                        json.dumps(sensors_config))
Пример #2
0
 def deploy_sensors(node_sensor_config):
     # check that path already exists
     copy_paths(node_sensor_config.conn, paths)
     with node_sensor_config.conn.open_sftp() as sftp:
         sensors_config = node_sensor_config.sensors.copy()
         sensors_config['source_id'] = node_sensor_config.source_id
         save_to_remote(sftp, config_remote_path,
                        json.dumps(sensors_config))
Пример #3
0
    def pre_run(self, node):
        copy_paths(node.connection,
                   {
                       self.run_script: self.get_remote_for_script(self.run_script),
                       self.prerun_script: self.get_remote_for_script(self.prerun_script),
                   })

        cmd = self.get_remote_for_script(self.pre_run_script)
        cmd += ' ' + self.config.params.get('prerun_opts', '')
        run_on_node(node)(cmd, timeout=self.prerun_tout)
Пример #4
0
    def pre_run(self, node):
        copy_paths(
            node.connection, {
                self.run_script: self.get_remote_for_script(self.run_script),
                self.prerun_script: self.get_remote_for_script(
                    self.prerun_script),
            })

        cmd = self.get_remote_for_script(self.prerun_script)
        cmd += ' ' + self.config.params.get('prerun_opts', '')
        run_on_node(node)(cmd, timeout=self.prerun_tout)