示例#1
0
    def clear_mule(self, mule: DockerContainer):

        ls_output = mule.execute('ls {}'.format(DockerConst.STG_MOUNT))

        if not ls_output:
            return

        for file_name in ls_output[0].strip().decode('utf-8').split('\n'):
            mule.execute('rm -rf {}/{}'.format(DockerConst.STG_MOUNT,
                                               file_name))
示例#2
0
    def _exec_in_cont(self, cont: DockerContainer, cmd: str):

        cont.execute(cmd.split(' '), blocking=True)