bugged stringlengths 4 228k | fixed stringlengths 0 96.3M | __index_level_0__ int64 0 481k |
|---|---|---|
def StopInstance(self, instance, force=False, retry=False): """Stop an instance. | def StopInstance(self, instance, force=False, retry=False): """Stop an instance. | 450,000 |
def GetShellCommandForConsole(cls, instance, hvparams, beparams): """Return a command for connecting to the console of an instance. | def GetShellCommandForConsole(cls, instance, hvparams, beparams): """Return a command for connecting to the console of an instance. | 450,001 |
def BuildHooksEnv(self): """Build hooks env. | def BuildHooksEnv(self): """Build hooks env. | 450,002 |
def _ExecuteKVMRuntime(self, instance, kvm_runtime, incoming=None): """Execute a KVM cmd, after completing it with some last minute data | def _ExecuteKVMRuntime(self, instance, kvm_runtime, incoming=None): """Execute a KVM cmd, after completing it with some last minute data | 450,003 |
def _ExecuteKVMRuntime(self, instance, kvm_runtime, incoming=None): """Execute a KVM cmd, after completing it with some last minute data | def _ExecuteKVMRuntime(self, instance, kvm_runtime, incoming=None): """Execute a KVM cmd, after completing it with some last minute data | 450,004 |
def _ExecuteKVMRuntime(self, instance, kvm_runtime, incoming=None): """Execute a KVM cmd, after completing it with some last minute data | def _ExecuteKVMRuntime(self, instance, kvm_runtime, incoming=None): """Execute a KVM cmd, after completing it with some last minute data | 450,005 |
def StartInstance(self, instance, block_devices): """Start an instance. | def StartInstance(self, instance, block_devices): """Start an instance. | 450,006 |
def acquire(self, shared=0, timeout=None, test_notify=None): """Acquire a shared lock. | def acquire(self, shared=0, timeout=None, test_notify=None): """Acquire a shared lock. | 450,007 |
def acquire(self, level, names, timeout=None, shared=0): """Acquire a set of resource locks, at the same level. | def acquire(self, level, names, timeout=None, shared=0): """Acquire a set of resource locks, at the same level. | 450,008 |
def release(self, level, names=None): """Release a set of resource locks, at the same level. | def release(self, level, names=None): """Release a set of resource locks, at the same level. | 450,009 |
def add(self, level, names, acquired=0, shared=0): """Add locks at the specified level. | def add(self, level, names, acquired=0, shared=0): """Add locks at the specified level. | 450,010 |
def remove(self, level, names): """Remove locks from the specified level. | def remove(self, level, names): """Remove locks from the specified level. | 450,011 |
def connect(self): """Connect to the server specified when the object was created. | def connect(self): """Connect to the server specified when the object was created. | 450,012 |
def GenerateTable(headers, fields, separator, data, numfields=None, unitfields=None, units=None): """Prints a table with headers and different fields. @type headers: dict @param headers: dictionary mapping field names to headers for the table @type fields: list @param fields: the field names corresponding to each row ... | def GenerateTable(headers, fields, separator, data, numfields=None, unitfields=None, units=None): """Prints a table with headers and different fields. @type headers: dict @param headers: dictionary mapping field names to headers for the table @type fields: list @param fields: the field names corresponding to each row ... | 450,013 |
def GetInstanceInfo(self, instance_name): """Get instance properties. | def GetInstanceInfo(self, instance_name): """Get instance properties. | 450,014 |
def __init__(self, name=None, family=None): """Initialize the host name object. | def __init__(self, name=None, family=None): """Initialize the host name object. | 450,015 |
def GetSysName(): """Return the current system's name. | def GetSysName(): """Return the current system's name. | 450,016 |
def Dumps(self): """Dump this instance and return the string representation.""" buf = StringIO() self.write(buf) return buf.getvalue() | def Dumps(self): """Dump this instance and return the string representation.""" buf = StringIO() self.write(buf) return buf.getvalue() | 450,017 |
def _SplitKeyVal(opt, data): """Convert a KeyVal string into a dict. This function will convert a key=val[,...] string into a dict. Empty values will be converted specially: keys which have the prefix 'no_' will have the value=False and the prefix stripped, the others will have value=True. @type opt: string @param op... | def _SplitKeyVal(opt, data): """Convert a KeyVal string into a dict. This function will convert a key=val[,...] string into a dict. Empty values will be converted specially: keys which have the prefix 'no_' will have the value=False and the prefix stripped, the others will have value=True. @type opt: string @param op... | 450,018 |
def _ExecuteKVMRuntime(self, instance, kvm_runtime, incoming=None): """Execute a KVM cmd, after completing it with some last minute data | def _ExecuteKVMRuntime(self, instance, kvm_runtime, incoming=None): """Execute a KVM cmd, after completing it with some last minute data | 450,019 |
def _ExecuteKVMRuntime(self, instance, kvm_runtime, incoming=None): """Execute a KVM cmd, after completing it with some last minute data | def _ExecuteKVMRuntime(self, instance, kvm_runtime, incoming=None): """Execute a KVM cmd, after completing it with some last minute data | 450,020 |
def _ExecuteKVMRuntime(self, instance, kvm_runtime, incoming=None): """Execute a KVM cmd, after completing it with some last minute data | def _ExecuteKVMRuntime(self, instance, kvm_runtime, incoming=None): """Execute a KVM cmd, after completing it with some last minute data | 450,021 |
def _ExecuteKVMRuntime(self, instance, kvm_runtime, incoming=None): """Execute a KVM cmd, after completing it with some last minute data | def _ExecuteKVMRuntime(self, instance, kvm_runtime, incoming=None): """Execute a KVM cmd, after completing it with some last minute data | 450,022 |
def _ExecuteKVMRuntime(self, instance, kvm_runtime, incoming=None): """Execute a KVM cmd, after completing it with some last minute data | def _ExecuteKVMRuntime(self, instance, kvm_runtime, incoming=None): """Execute a KVM cmd, after completing it with some last minute data | 450,023 |
def _ExecuteKVMRuntime(self, instance, kvm_runtime, incoming=None): """Execute a KVM cmd, after completing it with some last minute data | def _ExecuteKVMRuntime(self, instance, kvm_runtime, incoming=None): """Execute a KVM cmd, after completing it with some last minute data | 450,024 |
def GenericQueryFieldsTest(cmd, fields): master = qa_config.GetMasterNode() # Listing fields AssertCommand([cmd, "list-fields"]) AssertCommand([cmd, "list-fields"] + fields) # Check listed fields (all, must be sorted) realcmd = [cmd, "list-fields", "--separator=|", "--no-headers"] output = GetCommandOutput(master["pr... | def GenericQueryFieldsTest(cmd, fields): master = qa_config.GetMasterNode() # Listing fields AssertCommand([cmd, "list-fields"]) AssertCommand([cmd, "list-fields"] + fields) # Check listed fields (all, must be sorted) realcmd = [cmd, "list-fields", "--separator=|", "--no-headers"] output = GetCommandOutput(master["pr... | 450,025 |
def _Acquire(lock, shared, ev): lock.acquire(shared=shared) try: ev.wait() finally: lock.release() | def _Acquire(lock, shared, ev, notify): lock.acquire(shared=shared) try: ev.wait() finally: lock.release() | 450,026 |
def _Acquire(lock, shared, ev): lock.acquire(shared=shared) try: ev.wait() finally: lock.release() | def _Acquire(lock, shared, ev): lock.acquire(shared=shared) try: ev.wait() finally: lock.release() | 450,027 |
def _Acquire(lock, shared, ev): lock.acquire(shared=shared) try: ev.wait() finally: lock.release() | def _Acquire(lock, shared, ev): lock.acquire(shared=shared) try: ev.wait() finally: lock.release() | 450,028 |
def _Acquire(lock, shared, ev): lock.acquire(shared=shared) try: ev.wait() finally: lock.release() | def _Acquire(lock, shared, ev): lock.acquire(shared=shared) try: ev.wait() finally: lock.release() | 450,029 |
def _Acquire(lock, shared, ev): lock.acquire(shared=shared) try: ev.wait() finally: lock.release() | def _Acquire(lock, shared, ev): lock.acquire(shared=shared) try: ev.wait() finally: lock.release() | 450,030 |
def testParseUidPool(self): self.assertEqualValues( uidpool.ParseUidPool('1-100,200,'), [(1, 100), (200, 200)]) | def testParseUidPool(self): self.assertEqualValues( uidpool.ParseUidPool("1-100,200,"), [(1, 100), (200, 200)]) | 450,031 |
def testFormatUidPool(self): self.assertEqualValues( uidpool.FormatUidPool([(1, 100), (200, 200)]), '1-100, 200'), | def testFormatUidPool(self): self.assertEqualValues( uidpool.FormatUidPool([(1, 100), (200, 200)]), '1-100, 200'), | 450,032 |
def CheckPrereq(self): """Check prerequisites. | def CheckPrereq(self): """Check prerequisites. | 450,033 |
def CheckPrereq(self): """Check prerequisites. | def CheckPrereq(self): """Check prerequisites. | 450,034 |
def CheckPrereq(self): """Check prerequisites. | def CheckPrereq(self): """Check prerequisites. | 450,035 |
def MigrateInstance(self, instance, mode=None, cleanup=None): """Starts up an instance. | def MigrateInstance(self, instance, mode=None, cleanup=None): """Starts up an instance. | 450,036 |
def __call__(self, timeout): """Wait for something to happen on the pipe. | def __call__(self, timeout): """Wait for something to happen on the pipe. | 450,037 |
def GetAllInstancesInfo(self): """Get properties of all instances. | defGetAllInstancesInfo(self):"""Getpropertiesofallinstances. | 450,038 |
def GetAllInstancesInfo(self): """Get properties of all instances. | def GetAllInstancesInfo(self): """Get properties of all instances. | 450,039 |
def _EnsureUUID(self, item, ec_id): """Ensures a given object has a valid UUID. | def _EnsureUUID(self, item, ec_id): """Ensures a given object has a valid UUID. | 450,040 |
def RunTask(self, job): # pylint: disable-msg=W0221 """Job executor. | def RunTask(self, job): # pylint: disable-msg=W0221 """Job executor. | 450,041 |
def GetResults(self): """Wait for and return the results of all jobs. | def GetResults(self): """Wait for and return the results of all jobs. | 450,042 |
def Exec(self, feedback_fn): """Export an instance to an image in the cluster. | def Exec(self, feedback_fn): """Export an instance to an image in the cluster. | 450,043 |
def RunCommonInstanceTests(instance): """Runs a few tests that are common to all disk types. """ if qa_config.TestEnabled('instance-shutdown'): RunTest(qa_instance.TestInstanceShutdown, instance) RunTest(qa_instance.TestInstanceStartup, instance) if qa_config.TestEnabled('instance-list'): RunTest(qa_instance.TestInst... | def RunCommonInstanceTests(instance): """Runs a few tests that are common to all disk types. """ if qa_config.TestEnabled('instance-shutdown'): RunTest(qa_instance.TestInstanceShutdown, instance) RunTest(qa_instance.TestInstanceStartup, instance) if qa_config.TestEnabled('instance-list'): RunTest(qa_instance.TestInst... | 450,044 |
def FetchResponse(self, path, method): code = 200 response = None | def FetchResponse(self, path, method): code = 200 response = None | 450,045 |
def FetchResponse(self, path, method): code = 200 response = None | defFetchResponse(self,path,method):code=200response=None | 450,046 |
def test(self): rapi = RapiMock() path = "/version" self.assertEqual((404, None), rapi.FetchResponse("/foo", "GET")) self.assertEqual((400, "Bad request"), rapi.FetchResponse("/version", "POST")) rapi.AddResponse("2") code, response = rapi.FetchResponse("/version", "GET") self.assertEqual(200, code) self.assertEqual("2... | def test(self): rapi = RapiMock() path = "/version" self.assertEqual((404, None), rapi.FetchResponse("/foo", "GET")) self.assertEqual((501, "Method not implemented"), rapi.FetchResponse("/version", "POST")) rapi.AddResponse("2") code, response = rapi.FetchResponse("/version", "GET") self.assertEqual(200, code) self.ass... | 450,047 |
def LookupHostname(hostname): """Look up hostname | def LookupHostname(hostname): """Look up hostname | 450,048 |
def _LockAndExecLU(self, lu, level, calc_timeout): """Execute a Logical Unit, with the needed locks. | def _LockAndExecLU(self, lu, level, calc_timeout): """Execute a Logical Unit, with the needed locks. | 450,049 |
def ExecOpCode(self, op, cbs): """Execute an opcode. | def ExecOpCode(self, op, cbs, timeout=None): """Execute an opcode. | 450,050 |
def ExecOpCode(self, op, cbs): """Execute an opcode. | def ExecOpCode(self, op, cbs): """Execute an opcode. | 450,051 |
def ExecOpCode(self, op, cbs): """Execute an opcode. | def ExecOpCode(self, op, cbs): """Execute an opcode. | 450,052 |
def GenerateClusterCrypto(new_cluster_cert, new_rapi_cert, new_confd_hmac_key, rapi_cert_pem=None): """Updates the cluster certificates, keys and secrets. @type new_cluster_cert: bool @param new_cluster_cert: Whether to generate a new cluster certificate @type new_rapi_cert: bool @param new_rapi_cert: Whether to gener... | def GenerateClusterCrypto(new_cluster_cert, new_rapi_cert, new_confd_hmac_key, rapi_cert_pem=None, nodecert_file=constants.NODED_CERT_FILE, rapicert_file=constants.RAPI_CERT_FILE, hmackey_file=constants.CONFD_HMAC_KEY): """Updates the cluster certificates, keys and secrets. @type new_cluster_cert: bool @param new_clus... | 450,053 |
def GenerateClusterCrypto(new_cluster_cert, new_rapi_cert, new_confd_hmac_key, rapi_cert_pem=None): """Updates the cluster certificates, keys and secrets. @type new_cluster_cert: bool @param new_cluster_cert: Whether to generate a new cluster certificate @type new_rapi_cert: bool @param new_rapi_cert: Whether to gener... | def GenerateClusterCrypto(new_cluster_cert, new_rapi_cert, new_confd_hmac_key, rapi_cert_pem=None): """Updates the cluster certificates, keys and secrets. @type new_cluster_cert: bool @param new_cluster_cert: Whether to generate a new cluster certificate @type new_rapi_cert: bool @param new_rapi_cert: Whether to gener... | 450,054 |
def GenerateClusterCrypto(new_cluster_cert, new_rapi_cert, new_confd_hmac_key, rapi_cert_pem=None): """Updates the cluster certificates, keys and secrets. @type new_cluster_cert: bool @param new_cluster_cert: Whether to generate a new cluster certificate @type new_rapi_cert: bool @param new_rapi_cert: Whether to gener... | def GenerateClusterCrypto(new_cluster_cert, new_rapi_cert, new_confd_hmac_key, rapi_cert_pem=None): """Updates the cluster certificates, keys and secrets. @type new_cluster_cert: bool @param new_cluster_cert: Whether to generate a new cluster certificate @type new_rapi_cert: bool @param new_rapi_cert: Whether to gener... | 450,055 |
def GenerateClusterCrypto(new_cluster_cert, new_rapi_cert, new_confd_hmac_key, rapi_cert_pem=None): """Updates the cluster certificates, keys and secrets. @type new_cluster_cert: bool @param new_cluster_cert: Whether to generate a new cluster certificate @type new_rapi_cert: bool @param new_rapi_cert: Whether to gener... | def GenerateClusterCrypto(new_cluster_cert, new_rapi_cert, new_confd_hmac_key, rapi_cert_pem=None): """Updates the cluster certificates, keys and secrets. @type new_cluster_cert: bool @param new_cluster_cert: Whether to generate a new cluster certificate @type new_rapi_cert: bool @param new_rapi_cert: Whether to gener... | 450,056 |
def GenerateClusterCrypto(new_cluster_cert, new_rapi_cert, new_confd_hmac_key, rapi_cert_pem=None): """Updates the cluster certificates, keys and secrets. @type new_cluster_cert: bool @param new_cluster_cert: Whether to generate a new cluster certificate @type new_rapi_cert: bool @param new_rapi_cert: Whether to gener... | def GenerateClusterCrypto(new_cluster_cert, new_rapi_cert, new_confd_hmac_key, rapi_cert_pem=None): """Updates the cluster certificates, keys and secrets. @type new_cluster_cert: bool @param new_cluster_cert: Whether to generate a new cluster certificate @type new_rapi_cert: bool @param new_rapi_cert: Whether to gener... | 450,057 |
def GenerateClusterCrypto(new_cluster_cert, new_rapi_cert, new_confd_hmac_key, rapi_cert_pem=None): """Updates the cluster certificates, keys and secrets. @type new_cluster_cert: bool @param new_cluster_cert: Whether to generate a new cluster certificate @type new_rapi_cert: bool @param new_rapi_cert: Whether to gener... | def GenerateClusterCrypto(new_cluster_cert, new_rapi_cert, new_confd_hmac_key, rapi_cert_pem=None): """Updates the cluster certificates, keys and secrets. @type new_cluster_cert: bool @param new_cluster_cert: Whether to generate a new cluster certificate @type new_rapi_cert: bool @param new_rapi_cert: Whether to gener... | 450,058 |
def GenerateClusterCrypto(new_cluster_cert, new_rapi_cert, new_confd_hmac_key, rapi_cert_pem=None): """Updates the cluster certificates, keys and secrets. @type new_cluster_cert: bool @param new_cluster_cert: Whether to generate a new cluster certificate @type new_rapi_cert: bool @param new_rapi_cert: Whether to gener... | def GenerateClusterCrypto(new_cluster_cert, new_rapi_cert, new_confd_hmac_key, rapi_cert_pem=None): """Updates the cluster certificates, keys and secrets. @type new_cluster_cert: bool @param new_cluster_cert: Whether to generate a new cluster certificate @type new_rapi_cert: bool @param new_rapi_cert: Whether to gener... | 450,059 |
def _UpgradeConfig(self): """Run upgrade steps that cannot be done purely in the objects. | def _UpgradeConfig(self): """Run upgrade steps that cannot be done purely in the objects. | 450,060 |
def GetSslCiphers(self): """Returns the ciphers string for SSL. | def GetSslCiphers(self): """Returns the ciphers string for SSL. | 450,061 |
def testErrors(self): self.assertRaises(errors.TypeEnforcementError, self._fdt, {'a': 'astring'}) self.assertRaises(errors.TypeEnforcementError, self._fdt, {'c': True}) self.assertRaises(errors.TypeEnforcementError, self._fdt, {'d': 'astring'}) self.assertRaises(errors.TypeEnforcementError, self._fdt, {'d': '4 L'}) | def testErrors(self): self.assertRaises(errors.TypeEnforcementError, self._fdt, {'a': 'astring'}) self.assertRaises(errors.TypeEnforcementError, self._fdt, {'c': True}) self.assertRaises(errors.TypeEnforcementError, self._fdt, {'d': 'astring'}) self.assertRaises(errors.TypeEnforcementError, self._fdt, {'d': '4 L'}) | 450,062 |
def CheckPrereq(self): """Check prerequisites. | def CheckPrereq(self): """Check prerequisites. | 450,063 |
def _ExecDrbd8DiskOnly(self, feedback_fn): """Replace a disk on the primary or secondary for DRBD 8. | def _ExecDrbd8DiskOnly(self, feedback_fn): """Replace a disk on the primary or secondary for DRBD 8. | 450,064 |
def _ExecDrbd8Secondary(self, feedback_fn): """Replace the secondary node for DRBD 8. | def _ExecDrbd8Secondary(self, feedback_fn): """Replace the secondary node for DRBD 8. | 450,065 |
def _CheckNodeOnline(lu, node): """Ensure that a given node is online. @param lu: the LU on behalf of which we make the check @param node: the node to check @raise errors.OpPrereqError: if the node is offline """ if lu.cfg.GetNodeInfo(node).offline: raise errors.OpPrereqError("Can't use offline node %s" % node, error... | def _CheckNodeOnline(lu, node, msg=None): """Ensure that a given node is online. @param lu: the LU on behalf of which we make the check @param node: the node to check @raise errors.OpPrereqError: if the node is offline """ if lu.cfg.GetNodeInfo(node).offline: raise errors.OpPrereqError("Can't use offline node %s" % n... | 450,066 |
def _CheckNodeOnline(lu, node): """Ensure that a given node is online. @param lu: the LU on behalf of which we make the check @param node: the node to check @raise errors.OpPrereqError: if the node is offline """ if lu.cfg.GetNodeInfo(node).offline: raise errors.OpPrereqError("Can't use offline node %s" % node, error... | def _CheckNodeOnline(lu, node): """Ensure that a given node is online. @param lu: the LU on behalf of which we make the check @param node: the node to check @raise errors.OpPrereqError: if the node is offline """ if lu.cfg.GetNodeInfo(node).offline: raise errors.OpPrereqError("%s: %s" % (msg, node), errors.ECODE_STAT... | 450,067 |
def CheckPrereq(self): """Check prerequisites. | def CheckPrereq(self): """Check prerequisites. | 450,068 |
def _GenerateDRBD8Branch(lu, primary, secondary, size, names, iv_name, p_minor, s_minor): """Generate a drbd8 device complete with its children. """ port = lu.cfg.AllocatePort() vgname = lu.cfg.GetVGName() shared_secret = lu.cfg.GenerateDRBDSecret(lu.proc.GetECId()) dev_data = objects.Disk(dev_type=constants.LD_LV, si... | def _GenerateDRBD8Branch(lu, primary, secondary, size, vgname, names, iv_name, p_minor, s_minor): """Generate a drbd8 device complete with its children. """ port = lu.cfg.AllocatePort() vgname = lu.cfg.GetVGName() shared_secret = lu.cfg.GenerateDRBDSecret(lu.proc.GetECId()) dev_data = objects.Disk(dev_type=constants.L... | 450,069 |
def _GenerateDRBD8Branch(lu, primary, secondary, size, names, iv_name, p_minor, s_minor): """Generate a drbd8 device complete with its children. """ port = lu.cfg.AllocatePort() vgname = lu.cfg.GetVGName() shared_secret = lu.cfg.GenerateDRBDSecret(lu.proc.GetECId()) dev_data = objects.Disk(dev_type=constants.LD_LV, si... | def _GenerateDRBD8Branch(lu, primary, secondary, size, names, iv_name, p_minor, s_minor): """Generate a drbd8 device complete with its children. """ port = lu.cfg.AllocatePort() shared_secret = lu.cfg.GenerateDRBDSecret(lu.proc.GetECId()) dev_data = objects.Disk(dev_type=constants.LD_LV, size=size, logical_id=(vgname,... | 450,070 |
def _GenerateDiskTemplate(lu, template_name, instance_name, primary_node, secondary_nodes, disk_info, file_storage_dir, file_driver, base_index): """Generate the entire disk layout for a given template type. """ #TODO: compute space requirements vgname = lu.cfg.GetVGName() disk_count = len(disk_info) disks = [] if te... | def _GenerateDiskTemplate(lu, template_name, instance_name, primary_node, secondary_nodes, disk_info, file_storage_dir, file_driver, base_index, feedback_fn): """Generate the entire disk layout for a given template type. """ #TODO: compute space requirements vgname = lu.cfg.GetVGName() disk_count = len(disk_info) dis... | 450,071 |
def _GenerateDiskTemplate(lu, template_name, instance_name, primary_node, secondary_nodes, disk_info, file_storage_dir, file_driver, base_index): """Generate the entire disk layout for a given template type. """ #TODO: compute space requirements vgname = lu.cfg.GetVGName() disk_count = len(disk_info) disks = [] if te... | def _GenerateDiskTemplate(lu, template_name, instance_name, primary_node, secondary_nodes, disk_info, file_storage_dir, file_driver, base_index): """Generate the entire disk layout for a given template type. """ #TODO: compute space requirements vgname = lu.cfg.GetVGName() disk_count = len(disk_info) disks = [] if te... | 450,072 |
def _GenerateDiskTemplate(lu, template_name, instance_name, primary_node, secondary_nodes, disk_info, file_storage_dir, file_driver, base_index): """Generate the entire disk layout for a given template type. """ #TODO: compute space requirements vgname = lu.cfg.GetVGName() disk_count = len(disk_info) disks = [] if te... | def _GenerateDiskTemplate(lu, template_name, instance_name, primary_node, secondary_nodes, disk_info, file_storage_dir, file_driver, base_index): """Generate the entire disk layout for a given template type. """ #TODO: compute space requirements vgname = lu.cfg.GetVGName() disk_count = len(disk_info) disks = [] if te... | 450,073 |
def CheckPrereq(self): """Check prerequisites. | def CheckPrereq(self): """Check prerequisites. | 450,074 |
def Exec(self, feedback_fn): """Create and add the instance to the cluster. | def Exec(self, feedback_fn): """Create and add the instance to the cluster. | 450,075 |
def _ConvertPlainToDrbd(self, feedback_fn): """Converts an instance from plain to drbd. | def _ConvertPlainToDrbd(self, feedback_fn): """Converts an instance from plain to drbd. | 450,076 |
def Exec(self, feedback_fn): """Modifies an instance. | def Exec(self, feedback_fn): """Modifies an instance. | 450,077 |
def CheckPrereq(self): """Check prerequisites. | def CheckPrereq(self): """Check prerequisites. | 450,078 |
def _check_ip(): if netutils.TcpPing(master_ip, constants.DEFAULT_NODED_PORT): raise utils.RetryAgain() | def _check_ip(): if netutils.TcpPing(master_ip, constants.DEFAULT_NODED_PORT): raise utils.RetryAgain() | 450,079 |
def MigrateInstance(self, instance, target, live): """Migrate an instance to a target node. | def MigrateInstance(self, instance, target, live): """Migrate an instance to a target node. | 450,080 |
def enable(self): """Watch the given file. | def enable(self): """Watch the given file. | 450,081 |
def remove_dup(rcpts, all): """Remove duplicates""" tmp = [] for rcpt in rcpts: if not rcpt in all: tmp.append(rcpt) all.append(rcpt) return (tmp, all) | def remove_dup(rcpts, all): """Remove duplicates""" tmp = [] for rcpt in rcpts: if not rcpt in all: tmp.append(rcpt) all.append(rcpt) return (tmp, all) | 450,082 |
def remove_dup(rcpts, all): """Remove duplicates""" tmp = [] for rcpt in rcpts: if not rcpt in all: tmp.append(rcpt) all.append(rcpt) return (tmp, all) | def remove_dup(rcpts, all): """Remove duplicates""" tmp = [] for rcpt in rcpts: if not rcpt in all: tmp.append(rcpt) all.append(rcpt) return (tmp, all) | 450,083 |
def __init__(self): repo_dir = RepositoryManager(self.env).repository_dir self._svnserve_conf = Configuration(os.path.join(repo_dir, 'svnserve.conf')) self._userconf = None | def __init__(self): repo_dir = RepositoryManager(self.env).repository_dir self._svnserve_conf = Configuration(os.path.join(os.path.join( repo_dir, 'conf'), 'svnserve.conf')) self._userconf = None | 450,084 |
def process_request(self, req): if req.authname != 'anonymous': req.redirect(req.href.prefs('account')) action = req.args.get('action') data = {'acctmgr' : { 'username' : None, 'name' : None, 'email' : None, }, } if req.method == 'POST' and action == 'create': try: _create_user(req, self.env) except TracError, e: data[... | def process_request(self, req): if req.authname != 'anonymous': req.redirect(req.href.prefs('account')) action = req.args.get('action') data = {'acctmgr' : { 'username' : None, 'name' : None, 'email' : None, }, } if req.method == 'POST' and action == 'create': try: _create_user(req, self.env) except TracError, e: data[... | 450,085 |
def post_process_request(self, req, template, data, content_type): if req.authname and req.authname != 'anonymous': if req.session.get('force_change_passwd', False): redirect_url = req.href.prefs('account') if req.path_info != redirect_url: req.redirect(redirect_url) return (template, data, content_type) | def post_process_request(self, req, template, data, content_type): if req.authname and req.authname != 'anonymous': if req.session.get('force_change_passwd', False): redirect_url = req.href.prefs('account') if req.href(req.path_info) != redirect_url: req.redirect(redirect_url) return (template, data, content_type) | 450,086 |
def get_users(self): filename = self.filename if not os.path.exists(filename): self.log.debug('acct_mgr: get_users() -- Can\'t locate "%s"' % str(filename)) return [] return self._get_users(filename) | def get_users(self): filename = str(self.filename) if not os.path.exists(filename): self.log.debug('acct_mgr: get_users() -- Can\'t locate "%s"' % str(filename)) return [] return self._get_users(filename) | 450,087 |
def get_users(self): filename = self.filename if not os.path.exists(filename): self.log.debug('acct_mgr: get_users() -- Can\'t locate "%s"' % str(filename)) return [] return self._get_users(filename) | def get_users(self): filename = self.filename if not os.path.exists(filename): self.log.debug('acct_mgr: get_users() -- ' 'Can\'t locate "%s"' % filename) return [] return self._get_users(filename) | 450,088 |
def check_password(self, user, password): filename = self.filename if not os.path.exists(filename): self.log.debug('acct_mgr: check_password() -- Can\'t locate "%s"' % str(filename)) return False user = user.encode('utf-8') password = password.encode('utf-8') prefix = self.prefix(user) fd = file(filename) try: for line... | def check_password(self, user, password): filename = str(self.filename) if not os.path.exists(filename): self.log.debug('acct_mgr: check_password() -- Can\'t locate "%s"' % str(filename)) return False user = user.encode('utf-8') password = password.encode('utf-8') prefix = self.prefix(user) fd = file(filename) try: for... | 450,089 |
def check_password(self, user, password): filename = self.filename if not os.path.exists(filename): self.log.debug('acct_mgr: check_password() -- Can\'t locate "%s"' % str(filename)) return False user = user.encode('utf-8') password = password.encode('utf-8') prefix = self.prefix(user) fd = file(filename) try: for line... | def check_password(self, user, password): filename = self.filename if not os.path.exists(filename): self.log.debug('acct_mgr: check_password() -- ' 'Can\'t locate "%s"' % filename) return False user = user.encode('utf-8') password = password.encode('utf-8') prefix = self.prefix(user) fd = file(filename) try: for line i... | 450,090 |
def check_password(self, user, password): filename = self.filename if not os.path.exists(filename): self.log.debug('acct_mgr: check_password() -- Can\'t locate "%s"' % str(filename)) return False user = user.encode('utf-8') password = password.encode('utf-8') prefix = self.prefix(user) fd = file(filename) try: for line... | def check_password(self, user, password): filename = self.filename if not os.path.exists(filename): self.log.debug('acct_mgr: check_password() -- Can\'t locate "%s"' % str(filename)) return False user = user.encode('utf-8') password = password.encode('utf-8') prefix = self.prefix(user) try: for line in fd: if line.star... | 450,091 |
def check_password(self, user, password): filename = self.filename if not os.path.exists(filename): self.log.debug('acct_mgr: check_password() -- Can\'t locate "%s"' % str(filename)) return False user = user.encode('utf-8') password = password.encode('utf-8') prefix = self.prefix(user) fd = file(filename) try: for line... | def check_password(self, user, password): filename = self.filename if not os.path.exists(filename): self.log.debug('acct_mgr: check_password() -- Can\'t locate "%s"' % str(filename)) return False user = user.encode('utf-8') password = password.encode('utf-8') prefix = self.prefix(user) fd = file(filename) try: f = open... | 450,092 |
def check_password(self, user, password): filename = self.filename if not os.path.exists(filename): self.log.debug('acct_mgr: check_password() -- Can\'t locate "%s"' % str(filename)) return False user = user.encode('utf-8') password = password.encode('utf-8') prefix = self.prefix(user) fd = file(filename) try: for line... | def check_password(self, user, password): filename = self.filename if not os.path.exists(filename): self.log.debug('acct_mgr: check_password() -- Can\'t locate "%s"' % str(filename)) return False user = user.encode('utf-8') password = password.encode('utf-8') prefix = self.prefix(user) fd = file(filename) try: for line... | 450,093 |
def check_password(self, user, password): filename = self.filename if not os.path.exists(filename): self.log.debug('acct_mgr: check_password() -- Can\'t locate "%s"' % str(filename)) return False user = user.encode('utf-8') password = password.encode('utf-8') prefix = self.prefix(user) fd = file(filename) try: for line... | def check_password(self, user, password): filename = self.filename if not os.path.exists(filename): self.log.debug('acct_mgr: check_password() -- Can\'t locate "%s"' % str(filename)) return False user = user.encode('utf-8') password = password.encode('utf-8') prefix = self.prefix(user) fd = file(filename) try: for line... | 450,094 |
def _update_file(self, prefix, userline): """If `userline` is empty the line starting with `prefix` is removed from the user file. Otherwise the line starting with `prefix` is updated to `userline`. If no line starts with `prefix` the `userline` is appended to the file. | def _update_file(self, prefix, userline): """If `userline` is empty the line starting with `prefix` is removed from the user file. Otherwise the line starting with `prefix` is updated to `userline`. If no line starts with `prefix` the `userline` is appended to the file. | 450,095 |
def _update_file(self, prefix, userline): """If `userline` is empty the line starting with `prefix` is removed from the user file. Otherwise the line starting with `prefix` is updated to `userline`. If no line starts with `prefix` the `userline` is appended to the file. | def _update_file(self, prefix, userline): """If `userline` is empty the line starting with `prefix` is removed from the user file. Otherwise the line starting with `prefix` is updated to `userline`. If no line starts with `prefix` the `userline` is appended to the file. | 450,096 |
def _update_file(self, prefix, userline): """If `userline` is empty the line starting with `prefix` is removed from the user file. Otherwise the line starting with `prefix` is updated to `userline`. If no line starts with `prefix` the `userline` is appended to the file. | def _update_file(self, prefix, userline): """If `userline` is empty the line starting with `prefix` is removed from the user file. Otherwise the line starting with `prefix` is updated to `userline`. If no line starts with `prefix` the `userline` is appended to the file. | 450,097 |
def _update_file(self, prefix, userline): """If `userline` is empty the line starting with `prefix` is removed from the user file. Otherwise the line starting with `prefix` is updated to `userline`. If no line starts with `prefix` the `userline` is appended to the file. | def _update_file(self, prefix, userline): """If `userline` is empty the line starting with `prefix` is removed from the user file. Otherwise the line starting with `prefix` is updated to `userline`. If no line starts with `prefix` the `userline` is appended to the file. | 450,098 |
def _update_file(self, prefix, userline): """If `userline` is empty the line starting with `prefix` is removed from the user file. Otherwise the line starting with `prefix` is updated to `userline`. If no line starts with `prefix` the `userline` is appended to the file. | def _update_file(self, prefix, userline): """If `userline` is empty the line starting with `prefix` is removed from the user file. Otherwise the line starting with `prefix` is updated to `userline`. If no line starts with `prefix` the `userline` is appended to the file. | 450,099 |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.