def clean(self): resp = tsch.hSchRpcEnumInstances(self._dce, '\\%s' % self._taskname) if len(resp['pGuids']) != 0: tsch.hSchRpcStopInstance(self._dce, resp['pGuids'][0]) tsch.hSchRpcDelete(self._dce, '\\%s' % self._taskname) self._dce.disconnect() logging.debug("Task %s has been removed" % self._taskname)
def test_hSchRpcEnumInstances(self): dce, rpc_transport = self.connect() try: resp = tsch.hSchRpcEnumInstances(dce, '\\') resp.dump() except tsch.DCERPCSessionError as e: if e.get_error_code() != 0x80070002: raise
def test_hSchRpcEnumInstances(self): dce, rpctransport = self.connect(self.stringBindingAtSvc, tsch.MSRPC_UUID_TSCHS) try: resp = tsch.hSchRpcEnumInstances(dce, '\\') resp.dump() except Exception, e: if e.get_error_code() != 0x80070002: raise
def cleanup_task(self, dce, taskname): resp = tsch.hSchRpcEnumInstances(dce, '\\%s' % taskname) if len(resp['pGuids']) != 0: tsch.hSchRpcStopInstance(dce, resp['pGuids'][0]) tsch.hSchRpcDelete(dce, '\\%s' % taskname)