Exemple #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)
Exemple #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
Exemple #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
Exemple #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
Exemple #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)