Exemplo n.º 1
0
 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)
Exemplo n.º 2
0
 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
Exemplo n.º 3
0
    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
Exemplo n.º 4
0
    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
Exemplo n.º 5
0
 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)