body_hash
stringlengths
64
64
body
stringlengths
23
109k
docstring
stringlengths
1
57k
path
stringlengths
4
198
name
stringlengths
1
115
repository_name
stringlengths
7
111
repository_stars
float64
0
191k
lang
stringclasses
1 value
body_without_docstring
stringlengths
14
108k
unified
stringlengths
45
133k
897bafbb477ea01e539e119bbbfe179f60a9e6ca19425d7ad1cf7a24e5760f62
def z_diff(factors, codes, continuous_factors=True, nb_bins=10, batch_size=200, nb_training=10000, nb_eval=5000, nb_max_iterations=10000, scale=True): ' Z-diff metric from I. Higgins, L. Matthey, A. Pal, C. Burgess, X. Glorot, M. Botvinick, S. Mohamed, and A. Lerchner,\n “β-VAE:Learning basic visual concepts with a constrained variational framework,”\n in ICLR, 2017.\n \n :param factors: dataset of factors\n each column is a factor and each line is a data point\n :param codes: latent codes associated to the dataset of factors\n each column is a latent code and each line is a data point\n :param continuous_factors: True: factors are described as continuous variables\n False: factors are described as discrete variables\n :param nb_bins: number of bins to use for discretization\n :param batch_size: size of batch\n :param nb_training: number of training points\n :param nb_eval: number of evaluation points\n :param nb_max_iterations: number of training iterations for the linear model\n :param scale: if True, the output will be scaled from 0 to 1\n ' nb_factors = factors.shape[1] if continuous_factors: factors = minmax_scale(factors) factors = get_bin_index(factors, nb_bins) (train_set, eval_set) = _prepare_datasets(factors=factors, codes=codes, batch_size=batch_size, nb_training=nb_training, nb_eval=nb_eval) if ((train_set is NaN) and (eval_set is NaN)): return NaN (inputs, targets) = train_set model = linear_model.LogisticRegression(max_iter=nb_max_iterations) model.fit(inputs, targets) train_accuracy = model.score(inputs, targets) (inputs, targets) = eval_set eval_accuracy = model.score(inputs, targets) if scale: (min_val, max_val) = ((1.0 / nb_factors), 1.0) train_accuracy = ((train_accuracy - min_val) / (max_val - min_val)) eval_accuracy = ((eval_accuracy - min_val) / (max_val - min_val)) return eval_accuracy
Z-diff metric from I. Higgins, L. Matthey, A. Pal, C. Burgess, X. Glorot, M. Botvinick, S. Mohamed, and A. Lerchner, “β-VAE:Learning basic visual concepts with a constrained variational framework,” in ICLR, 2017. :param factors: dataset of factors each column is a factor and each line is a data point :param codes: latent codes associated to the dataset of factors each column is a latent code and each line is a data point :param continuous_factors: True: factors are described as continuous variables False: factors are described as discrete variables :param nb_bins: number of bins to use for discretization :param batch_size: size of batch :param nb_training: number of training points :param nb_eval: number of evaluation points :param nb_max_iterations: number of training iterations for the linear model :param scale: if True, the output will be scaled from 0 to 1
src/metrics/z_diff.py
z_diff
ubisoft/ubisoft-laforge-disentanglement-metrics
11
python
def z_diff(factors, codes, continuous_factors=True, nb_bins=10, batch_size=200, nb_training=10000, nb_eval=5000, nb_max_iterations=10000, scale=True): ' Z-diff metric from I. Higgins, L. Matthey, A. Pal, C. Burgess, X. Glorot, M. Botvinick, S. Mohamed, and A. Lerchner,\n “β-VAE:Learning basic visual concepts with a constrained variational framework,”\n in ICLR, 2017.\n \n :param factors: dataset of factors\n each column is a factor and each line is a data point\n :param codes: latent codes associated to the dataset of factors\n each column is a latent code and each line is a data point\n :param continuous_factors: True: factors are described as continuous variables\n False: factors are described as discrete variables\n :param nb_bins: number of bins to use for discretization\n :param batch_size: size of batch\n :param nb_training: number of training points\n :param nb_eval: number of evaluation points\n :param nb_max_iterations: number of training iterations for the linear model\n :param scale: if True, the output will be scaled from 0 to 1\n ' nb_factors = factors.shape[1] if continuous_factors: factors = minmax_scale(factors) factors = get_bin_index(factors, nb_bins) (train_set, eval_set) = _prepare_datasets(factors=factors, codes=codes, batch_size=batch_size, nb_training=nb_training, nb_eval=nb_eval) if ((train_set is NaN) and (eval_set is NaN)): return NaN (inputs, targets) = train_set model = linear_model.LogisticRegression(max_iter=nb_max_iterations) model.fit(inputs, targets) train_accuracy = model.score(inputs, targets) (inputs, targets) = eval_set eval_accuracy = model.score(inputs, targets) if scale: (min_val, max_val) = ((1.0 / nb_factors), 1.0) train_accuracy = ((train_accuracy - min_val) / (max_val - min_val)) eval_accuracy = ((eval_accuracy - min_val) / (max_val - min_val)) return eval_accuracy
def z_diff(factors, codes, continuous_factors=True, nb_bins=10, batch_size=200, nb_training=10000, nb_eval=5000, nb_max_iterations=10000, scale=True): ' Z-diff metric from I. Higgins, L. Matthey, A. Pal, C. Burgess, X. Glorot, M. Botvinick, S. Mohamed, and A. Lerchner,\n “β-VAE:Learning basic visual concepts with a constrained variational framework,”\n in ICLR, 2017.\n \n :param factors: dataset of factors\n each column is a factor and each line is a data point\n :param codes: latent codes associated to the dataset of factors\n each column is a latent code and each line is a data point\n :param continuous_factors: True: factors are described as continuous variables\n False: factors are described as discrete variables\n :param nb_bins: number of bins to use for discretization\n :param batch_size: size of batch\n :param nb_training: number of training points\n :param nb_eval: number of evaluation points\n :param nb_max_iterations: number of training iterations for the linear model\n :param scale: if True, the output will be scaled from 0 to 1\n ' nb_factors = factors.shape[1] if continuous_factors: factors = minmax_scale(factors) factors = get_bin_index(factors, nb_bins) (train_set, eval_set) = _prepare_datasets(factors=factors, codes=codes, batch_size=batch_size, nb_training=nb_training, nb_eval=nb_eval) if ((train_set is NaN) and (eval_set is NaN)): return NaN (inputs, targets) = train_set model = linear_model.LogisticRegression(max_iter=nb_max_iterations) model.fit(inputs, targets) train_accuracy = model.score(inputs, targets) (inputs, targets) = eval_set eval_accuracy = model.score(inputs, targets) if scale: (min_val, max_val) = ((1.0 / nb_factors), 1.0) train_accuracy = ((train_accuracy - min_val) / (max_val - min_val)) eval_accuracy = ((eval_accuracy - min_val) / (max_val - min_val)) return eval_accuracy<|docstring|>Z-diff metric from I. Higgins, L. Matthey, A. Pal, C. Burgess, X. Glorot, M. Botvinick, S. Mohamed, and A. Lerchner, “β-VAE:Learning basic visual concepts with a constrained variational framework,” in ICLR, 2017. :param factors: dataset of factors each column is a factor and each line is a data point :param codes: latent codes associated to the dataset of factors each column is a latent code and each line is a data point :param continuous_factors: True: factors are described as continuous variables False: factors are described as discrete variables :param nb_bins: number of bins to use for discretization :param batch_size: size of batch :param nb_training: number of training points :param nb_eval: number of evaluation points :param nb_max_iterations: number of training iterations for the linear model :param scale: if True, the output will be scaled from 0 to 1<|endoftext|>
d7dbc9c35427d694d1610bf5a1f955490a789812567fdfb25735b94e91afa3e1
def _prepare_datasets(factors, codes, batch_size, nb_training, nb_eval): ' prepare Z-diff datasets from a factors-codes dataset\n \n :param factors: dataset of factors in their discrete format\n each column is a factor and each line is a data point\n :param codes: latent codes associated to the dataset of factors\n each column is a latent code and each line is a data point\n :param batch_size: size of batch\n :param nb_training: number of training points\n :param nb_eval: number of evaluation points\n ' nb_factors = factors.shape[1] nb_codes = codes.shape[1] (train_inputs, train_targets, line_idx_train) = (np.zeros((nb_training, nb_codes)), np.zeros((nb_training,), dtype='int64'), 0) (eval_inputs, eval_targets, line_idx_eval) = (np.zeros((nb_eval, nb_codes)), np.zeros((nb_eval,), dtype='int64'), 0) training_factors = np.random.randint(low=0, high=nb_factors, size=nb_training) (unique, counts) = np.unique(training_factors, return_counts=True) training_factors = dict(zip(unique, counts)) eval_factors = np.random.randint(low=0, high=nb_factors, size=nb_eval) (unique, counts) = np.unique(eval_factors, return_counts=True) eval_factors = dict(zip(unique, counts)) for factor_id in range(nb_factors): if (not (factor_id in training_factors)): training_factors[factor_id] = 0 if (not (factor_id in eval_factors)): eval_factors[factor_id] = 0 factor_id_count = (training_factors[factor_id] + eval_factors[factor_id]) nb_factor_id_examples = (batch_size * factor_id_count) batch_1 = np.zeros(nb_factor_id_examples, dtype='int64') batch_2 = np.zeros(nb_factor_id_examples, dtype='int64') (unique, counts) = np.unique(factors[(:, factor_id)], return_counts=True) available_factor_values = dict(zip(unique, counts)) available_factor_values = [value for value in available_factor_values if (available_factor_values[value] > 1)] if (len(available_factor_values) == 0): print(f'Error -- Factor ID: {factor_id} -- Cannot find factor values with more than 1 example -- Discretization is too fine grained -- Decrease nb_bins -- Score is set to NaN') return (NaN, NaN) fixed_factor_values = np.random.choice(available_factor_values, size=nb_factor_id_examples) (unique, counts) = np.unique(fixed_factor_values, return_counts=True) fixed_factor_values = dict(zip(unique, counts)) line_idx = 0 for (factor_value, count) in fixed_factor_values.items(): factor_value_lines_idx = np.where((factors[(:, factor_id)] == factor_value))[0] nb_factor_value_examples = len(factor_value_lines_idx) nb_loops = int(np.ceil((count / (nb_factor_value_examples // 2)))) current_count = 0 for loop_id in range(nb_loops): np.random.shuffle(factor_value_lines_idx) if ((loop_id + 1) == nb_loops): nb_examples = (count - current_count) else: nb_examples = (nb_factor_value_examples // 2) assert (len(factor_value_lines_idx[:nb_examples]) == len(factor_value_lines_idx[nb_examples:(2 * nb_examples)])) batch_1[line_idx:(line_idx + nb_examples)] = factor_value_lines_idx[:nb_examples] batch_2[line_idx:(line_idx + nb_examples)] = factor_value_lines_idx[nb_examples:(2 * nb_examples)] current_count += nb_examples line_idx += nb_examples assert (current_count == count) assert (line_idx == nb_factor_id_examples) batch_lines_idx = np.arange(nb_factor_id_examples) np.random.shuffle(batch_lines_idx) batch_1 = batch_1[batch_lines_idx] batch_2 = batch_2[batch_lines_idx] assert np.all((batch_1 - batch_2)) factors_batch_1 = factors[batch_1] factors_batch_2 = factors[batch_2] for id in range(nb_factors): if (id == factor_id): assert np.array_equal(factors_batch_1[(:, id)], factors_batch_2[(:, id)]) elif np.array_equal(factors_batch_1[(:, id)], factors_batch_2[(:, id)]): print(f'Warning -- Factor ID: {id} -- factor values are equal whereas they should be different -- Try to decrease nb_bins') nb_factor_id_train = (batch_size * training_factors[factor_id]) nb_factor_id_eval = (batch_size * eval_factors[factor_id]) assert ((nb_factor_id_train + nb_factor_id_eval) == nb_factor_id_examples) codes_train_1 = codes[batch_1][:nb_factor_id_train] codes_train_2 = codes[batch_2][:nb_factor_id_train] assert ((codes_train_1.shape[0] % batch_size) == 0) assert ((codes_train_2.shape[0] % batch_size) == 0) for idx in range(0, codes_train_1.shape[0], batch_size): diff = (codes_train_1[idx:(idx + batch_size)] - codes_train_2[idx:(idx + batch_size)]) input = np.mean(np.abs(diff), axis=0) train_inputs[line_idx_train] = input train_targets[line_idx_train] = factor_id line_idx_train += 1 codes_eval_1 = codes[batch_1][nb_factor_id_train:] codes_eval_2 = codes[batch_2][nb_factor_id_train:] assert ((codes_eval_1.shape[0] % batch_size) == 0) assert ((codes_eval_2.shape[0] % batch_size) == 0) for idx in range(0, codes_eval_1.shape[0], batch_size): diff = (codes_eval_1[idx:(idx + batch_size)] - codes_eval_2[idx:(idx + batch_size)]) input = np.mean(np.abs(diff), axis=0) eval_inputs[line_idx_eval] = input eval_targets[line_idx_eval] = factor_id line_idx_eval += 1 assert (line_idx_train == nb_training) assert (line_idx_eval == nb_eval) lines_idx = np.arange(train_inputs.shape[0]) np.random.shuffle(lines_idx) train_inputs = train_inputs[lines_idx] train_targets = train_targets[lines_idx] lines_idx = np.arange(eval_inputs.shape[0]) np.random.shuffle(lines_idx) eval_inputs = eval_inputs[lines_idx] eval_targets = eval_targets[lines_idx] train_set = (train_inputs, train_targets) eval_set = (eval_inputs, eval_targets) return (train_set, eval_set)
prepare Z-diff datasets from a factors-codes dataset :param factors: dataset of factors in their discrete format each column is a factor and each line is a data point :param codes: latent codes associated to the dataset of factors each column is a latent code and each line is a data point :param batch_size: size of batch :param nb_training: number of training points :param nb_eval: number of evaluation points
src/metrics/z_diff.py
_prepare_datasets
ubisoft/ubisoft-laforge-disentanglement-metrics
11
python
def _prepare_datasets(factors, codes, batch_size, nb_training, nb_eval): ' prepare Z-diff datasets from a factors-codes dataset\n \n :param factors: dataset of factors in their discrete format\n each column is a factor and each line is a data point\n :param codes: latent codes associated to the dataset of factors\n each column is a latent code and each line is a data point\n :param batch_size: size of batch\n :param nb_training: number of training points\n :param nb_eval: number of evaluation points\n ' nb_factors = factors.shape[1] nb_codes = codes.shape[1] (train_inputs, train_targets, line_idx_train) = (np.zeros((nb_training, nb_codes)), np.zeros((nb_training,), dtype='int64'), 0) (eval_inputs, eval_targets, line_idx_eval) = (np.zeros((nb_eval, nb_codes)), np.zeros((nb_eval,), dtype='int64'), 0) training_factors = np.random.randint(low=0, high=nb_factors, size=nb_training) (unique, counts) = np.unique(training_factors, return_counts=True) training_factors = dict(zip(unique, counts)) eval_factors = np.random.randint(low=0, high=nb_factors, size=nb_eval) (unique, counts) = np.unique(eval_factors, return_counts=True) eval_factors = dict(zip(unique, counts)) for factor_id in range(nb_factors): if (not (factor_id in training_factors)): training_factors[factor_id] = 0 if (not (factor_id in eval_factors)): eval_factors[factor_id] = 0 factor_id_count = (training_factors[factor_id] + eval_factors[factor_id]) nb_factor_id_examples = (batch_size * factor_id_count) batch_1 = np.zeros(nb_factor_id_examples, dtype='int64') batch_2 = np.zeros(nb_factor_id_examples, dtype='int64') (unique, counts) = np.unique(factors[(:, factor_id)], return_counts=True) available_factor_values = dict(zip(unique, counts)) available_factor_values = [value for value in available_factor_values if (available_factor_values[value] > 1)] if (len(available_factor_values) == 0): print(f'Error -- Factor ID: {factor_id} -- Cannot find factor values with more than 1 example -- Discretization is too fine grained -- Decrease nb_bins -- Score is set to NaN') return (NaN, NaN) fixed_factor_values = np.random.choice(available_factor_values, size=nb_factor_id_examples) (unique, counts) = np.unique(fixed_factor_values, return_counts=True) fixed_factor_values = dict(zip(unique, counts)) line_idx = 0 for (factor_value, count) in fixed_factor_values.items(): factor_value_lines_idx = np.where((factors[(:, factor_id)] == factor_value))[0] nb_factor_value_examples = len(factor_value_lines_idx) nb_loops = int(np.ceil((count / (nb_factor_value_examples // 2)))) current_count = 0 for loop_id in range(nb_loops): np.random.shuffle(factor_value_lines_idx) if ((loop_id + 1) == nb_loops): nb_examples = (count - current_count) else: nb_examples = (nb_factor_value_examples // 2) assert (len(factor_value_lines_idx[:nb_examples]) == len(factor_value_lines_idx[nb_examples:(2 * nb_examples)])) batch_1[line_idx:(line_idx + nb_examples)] = factor_value_lines_idx[:nb_examples] batch_2[line_idx:(line_idx + nb_examples)] = factor_value_lines_idx[nb_examples:(2 * nb_examples)] current_count += nb_examples line_idx += nb_examples assert (current_count == count) assert (line_idx == nb_factor_id_examples) batch_lines_idx = np.arange(nb_factor_id_examples) np.random.shuffle(batch_lines_idx) batch_1 = batch_1[batch_lines_idx] batch_2 = batch_2[batch_lines_idx] assert np.all((batch_1 - batch_2)) factors_batch_1 = factors[batch_1] factors_batch_2 = factors[batch_2] for id in range(nb_factors): if (id == factor_id): assert np.array_equal(factors_batch_1[(:, id)], factors_batch_2[(:, id)]) elif np.array_equal(factors_batch_1[(:, id)], factors_batch_2[(:, id)]): print(f'Warning -- Factor ID: {id} -- factor values are equal whereas they should be different -- Try to decrease nb_bins') nb_factor_id_train = (batch_size * training_factors[factor_id]) nb_factor_id_eval = (batch_size * eval_factors[factor_id]) assert ((nb_factor_id_train + nb_factor_id_eval) == nb_factor_id_examples) codes_train_1 = codes[batch_1][:nb_factor_id_train] codes_train_2 = codes[batch_2][:nb_factor_id_train] assert ((codes_train_1.shape[0] % batch_size) == 0) assert ((codes_train_2.shape[0] % batch_size) == 0) for idx in range(0, codes_train_1.shape[0], batch_size): diff = (codes_train_1[idx:(idx + batch_size)] - codes_train_2[idx:(idx + batch_size)]) input = np.mean(np.abs(diff), axis=0) train_inputs[line_idx_train] = input train_targets[line_idx_train] = factor_id line_idx_train += 1 codes_eval_1 = codes[batch_1][nb_factor_id_train:] codes_eval_2 = codes[batch_2][nb_factor_id_train:] assert ((codes_eval_1.shape[0] % batch_size) == 0) assert ((codes_eval_2.shape[0] % batch_size) == 0) for idx in range(0, codes_eval_1.shape[0], batch_size): diff = (codes_eval_1[idx:(idx + batch_size)] - codes_eval_2[idx:(idx + batch_size)]) input = np.mean(np.abs(diff), axis=0) eval_inputs[line_idx_eval] = input eval_targets[line_idx_eval] = factor_id line_idx_eval += 1 assert (line_idx_train == nb_training) assert (line_idx_eval == nb_eval) lines_idx = np.arange(train_inputs.shape[0]) np.random.shuffle(lines_idx) train_inputs = train_inputs[lines_idx] train_targets = train_targets[lines_idx] lines_idx = np.arange(eval_inputs.shape[0]) np.random.shuffle(lines_idx) eval_inputs = eval_inputs[lines_idx] eval_targets = eval_targets[lines_idx] train_set = (train_inputs, train_targets) eval_set = (eval_inputs, eval_targets) return (train_set, eval_set)
def _prepare_datasets(factors, codes, batch_size, nb_training, nb_eval): ' prepare Z-diff datasets from a factors-codes dataset\n \n :param factors: dataset of factors in their discrete format\n each column is a factor and each line is a data point\n :param codes: latent codes associated to the dataset of factors\n each column is a latent code and each line is a data point\n :param batch_size: size of batch\n :param nb_training: number of training points\n :param nb_eval: number of evaluation points\n ' nb_factors = factors.shape[1] nb_codes = codes.shape[1] (train_inputs, train_targets, line_idx_train) = (np.zeros((nb_training, nb_codes)), np.zeros((nb_training,), dtype='int64'), 0) (eval_inputs, eval_targets, line_idx_eval) = (np.zeros((nb_eval, nb_codes)), np.zeros((nb_eval,), dtype='int64'), 0) training_factors = np.random.randint(low=0, high=nb_factors, size=nb_training) (unique, counts) = np.unique(training_factors, return_counts=True) training_factors = dict(zip(unique, counts)) eval_factors = np.random.randint(low=0, high=nb_factors, size=nb_eval) (unique, counts) = np.unique(eval_factors, return_counts=True) eval_factors = dict(zip(unique, counts)) for factor_id in range(nb_factors): if (not (factor_id in training_factors)): training_factors[factor_id] = 0 if (not (factor_id in eval_factors)): eval_factors[factor_id] = 0 factor_id_count = (training_factors[factor_id] + eval_factors[factor_id]) nb_factor_id_examples = (batch_size * factor_id_count) batch_1 = np.zeros(nb_factor_id_examples, dtype='int64') batch_2 = np.zeros(nb_factor_id_examples, dtype='int64') (unique, counts) = np.unique(factors[(:, factor_id)], return_counts=True) available_factor_values = dict(zip(unique, counts)) available_factor_values = [value for value in available_factor_values if (available_factor_values[value] > 1)] if (len(available_factor_values) == 0): print(f'Error -- Factor ID: {factor_id} -- Cannot find factor values with more than 1 example -- Discretization is too fine grained -- Decrease nb_bins -- Score is set to NaN') return (NaN, NaN) fixed_factor_values = np.random.choice(available_factor_values, size=nb_factor_id_examples) (unique, counts) = np.unique(fixed_factor_values, return_counts=True) fixed_factor_values = dict(zip(unique, counts)) line_idx = 0 for (factor_value, count) in fixed_factor_values.items(): factor_value_lines_idx = np.where((factors[(:, factor_id)] == factor_value))[0] nb_factor_value_examples = len(factor_value_lines_idx) nb_loops = int(np.ceil((count / (nb_factor_value_examples // 2)))) current_count = 0 for loop_id in range(nb_loops): np.random.shuffle(factor_value_lines_idx) if ((loop_id + 1) == nb_loops): nb_examples = (count - current_count) else: nb_examples = (nb_factor_value_examples // 2) assert (len(factor_value_lines_idx[:nb_examples]) == len(factor_value_lines_idx[nb_examples:(2 * nb_examples)])) batch_1[line_idx:(line_idx + nb_examples)] = factor_value_lines_idx[:nb_examples] batch_2[line_idx:(line_idx + nb_examples)] = factor_value_lines_idx[nb_examples:(2 * nb_examples)] current_count += nb_examples line_idx += nb_examples assert (current_count == count) assert (line_idx == nb_factor_id_examples) batch_lines_idx = np.arange(nb_factor_id_examples) np.random.shuffle(batch_lines_idx) batch_1 = batch_1[batch_lines_idx] batch_2 = batch_2[batch_lines_idx] assert np.all((batch_1 - batch_2)) factors_batch_1 = factors[batch_1] factors_batch_2 = factors[batch_2] for id in range(nb_factors): if (id == factor_id): assert np.array_equal(factors_batch_1[(:, id)], factors_batch_2[(:, id)]) elif np.array_equal(factors_batch_1[(:, id)], factors_batch_2[(:, id)]): print(f'Warning -- Factor ID: {id} -- factor values are equal whereas they should be different -- Try to decrease nb_bins') nb_factor_id_train = (batch_size * training_factors[factor_id]) nb_factor_id_eval = (batch_size * eval_factors[factor_id]) assert ((nb_factor_id_train + nb_factor_id_eval) == nb_factor_id_examples) codes_train_1 = codes[batch_1][:nb_factor_id_train] codes_train_2 = codes[batch_2][:nb_factor_id_train] assert ((codes_train_1.shape[0] % batch_size) == 0) assert ((codes_train_2.shape[0] % batch_size) == 0) for idx in range(0, codes_train_1.shape[0], batch_size): diff = (codes_train_1[idx:(idx + batch_size)] - codes_train_2[idx:(idx + batch_size)]) input = np.mean(np.abs(diff), axis=0) train_inputs[line_idx_train] = input train_targets[line_idx_train] = factor_id line_idx_train += 1 codes_eval_1 = codes[batch_1][nb_factor_id_train:] codes_eval_2 = codes[batch_2][nb_factor_id_train:] assert ((codes_eval_1.shape[0] % batch_size) == 0) assert ((codes_eval_2.shape[0] % batch_size) == 0) for idx in range(0, codes_eval_1.shape[0], batch_size): diff = (codes_eval_1[idx:(idx + batch_size)] - codes_eval_2[idx:(idx + batch_size)]) input = np.mean(np.abs(diff), axis=0) eval_inputs[line_idx_eval] = input eval_targets[line_idx_eval] = factor_id line_idx_eval += 1 assert (line_idx_train == nb_training) assert (line_idx_eval == nb_eval) lines_idx = np.arange(train_inputs.shape[0]) np.random.shuffle(lines_idx) train_inputs = train_inputs[lines_idx] train_targets = train_targets[lines_idx] lines_idx = np.arange(eval_inputs.shape[0]) np.random.shuffle(lines_idx) eval_inputs = eval_inputs[lines_idx] eval_targets = eval_targets[lines_idx] train_set = (train_inputs, train_targets) eval_set = (eval_inputs, eval_targets) return (train_set, eval_set)<|docstring|>prepare Z-diff datasets from a factors-codes dataset :param factors: dataset of factors in their discrete format each column is a factor and each line is a data point :param codes: latent codes associated to the dataset of factors each column is a latent code and each line is a data point :param batch_size: size of batch :param nb_training: number of training points :param nb_eval: number of evaluation points<|endoftext|>
935dc4488bb90c73fc955af1a8b2a94e282f5194d968bd29a7714eae4a80276e
def calc_per(Y_true, Y_pred): 'Calc phoneme error rate\n Y_true: list of predicted phoneme sequences. e.g., [["k", "a", "m", "a", "n", "d"], ...]\n Y_pred: list of ground truth phoneme sequences. e.g., [["k", "a", "m", "a", "n", "d"], ...]\n ' (num_phonemes, num_erros) = (0, 0) for (y_true, y_pred) in zip(Y_true, Y_pred): num_phonemes += len(y_true) num_erros += levenshtein(y_true, y_pred) per = round((num_erros / num_phonemes), 4) return per
Calc phoneme error rate Y_true: list of predicted phoneme sequences. e.g., [["k", "a", "m", "a", "n", "d"], ...] Y_pred: list of ground truth phoneme sequences. e.g., [["k", "a", "m", "a", "n", "d"], ...]
train.py
calc_per
wannaphong/Thai_G2P
4
python
def calc_per(Y_true, Y_pred): 'Calc phoneme error rate\n Y_true: list of predicted phoneme sequences. e.g., [["k", "a", "m", "a", "n", "d"], ...]\n Y_pred: list of ground truth phoneme sequences. e.g., [["k", "a", "m", "a", "n", "d"], ...]\n ' (num_phonemes, num_erros) = (0, 0) for (y_true, y_pred) in zip(Y_true, Y_pred): num_phonemes += len(y_true) num_erros += levenshtein(y_true, y_pred) per = round((num_erros / num_phonemes), 4) return per
def calc_per(Y_true, Y_pred): 'Calc phoneme error rate\n Y_true: list of predicted phoneme sequences. e.g., [["k", "a", "m", "a", "n", "d"], ...]\n Y_pred: list of ground truth phoneme sequences. e.g., [["k", "a", "m", "a", "n", "d"], ...]\n ' (num_phonemes, num_erros) = (0, 0) for (y_true, y_pred) in zip(Y_true, Y_pred): num_phonemes += len(y_true) num_erros += levenshtein(y_true, y_pred) per = round((num_erros / num_phonemes), 4) return per<|docstring|>Calc phoneme error rate Y_true: list of predicted phoneme sequences. e.g., [["k", "a", "m", "a", "n", "d"], ...] Y_pred: list of ground truth phoneme sequences. e.g., [["k", "a", "m", "a", "n", "d"], ...]<|endoftext|>
ae7eb7ee240d52897f3c45579a41e730c6a943e635899f10cbb50d415b8bbc01
def __init__(self, connection_str, **kwargs): 'Driver receiving profiled information from ceilometer.' super(Ceilometer, self).__init__(connection_str) try: import ceilometerclient.client except ImportError: raise exc.CommandError("To use this command, you should install 'ceilometerclient' manually. Use command:\n 'pip install python-ceilometerclient'.") try: self.client = ceilometerclient.client.get_client(kwargs['ceilometer_api_version'], **kwargs) except Exception as e: if (hasattr(e, 'http_status') and (e.http_status == 401)): msg = 'Invalid OpenStack Identity credentials.' else: msg = 'Something has gone wrong. See ceilometer logs for more details' raise exc.CommandError(msg)
Driver receiving profiled information from ceilometer.
osprofiler/drivers/ceilometer.py
__init__
charliebr30/osprofiler
0
python
def __init__(self, connection_str, **kwargs): super(Ceilometer, self).__init__(connection_str) try: import ceilometerclient.client except ImportError: raise exc.CommandError("To use this command, you should install 'ceilometerclient' manually. Use command:\n 'pip install python-ceilometerclient'.") try: self.client = ceilometerclient.client.get_client(kwargs['ceilometer_api_version'], **kwargs) except Exception as e: if (hasattr(e, 'http_status') and (e.http_status == 401)): msg = 'Invalid OpenStack Identity credentials.' else: msg = 'Something has gone wrong. See ceilometer logs for more details' raise exc.CommandError(msg)
def __init__(self, connection_str, **kwargs): super(Ceilometer, self).__init__(connection_str) try: import ceilometerclient.client except ImportError: raise exc.CommandError("To use this command, you should install 'ceilometerclient' manually. Use command:\n 'pip install python-ceilometerclient'.") try: self.client = ceilometerclient.client.get_client(kwargs['ceilometer_api_version'], **kwargs) except Exception as e: if (hasattr(e, 'http_status') and (e.http_status == 401)): msg = 'Invalid OpenStack Identity credentials.' else: msg = 'Something has gone wrong. See ceilometer logs for more details' raise exc.CommandError(msg)<|docstring|>Driver receiving profiled information from ceilometer.<|endoftext|>
431946718b14999a90817655d73f761410a80e6a8d39a2c25e593193224f28e4
def get_report(self, base_id): 'Retrieves and parses notification from ceilometer.\n\n :param base_id: Base id of trace elements.\n ' _filter = [{'field': 'base_id', 'op': 'eq', 'value': base_id}] notifications = [n.to_dict() for n in self.client.events.list(_filter, limit=100000)] for n in notifications: traits = n['traits'] def find_field(f_name): return [t['value'] for t in traits if (t['name'] == f_name)][0] trace_id = find_field('trace_id') parent_id = find_field('parent_id') name = find_field('name') project = find_field('project') service = find_field('service') host = find_field('host') timestamp = find_field('timestamp') payload = n.get('raw', {}).get('payload', {}) self._append_results(trace_id, parent_id, name, project, service, host, timestamp, payload) return self._parse_results()
Retrieves and parses notification from ceilometer. :param base_id: Base id of trace elements.
osprofiler/drivers/ceilometer.py
get_report
charliebr30/osprofiler
0
python
def get_report(self, base_id): 'Retrieves and parses notification from ceilometer.\n\n :param base_id: Base id of trace elements.\n ' _filter = [{'field': 'base_id', 'op': 'eq', 'value': base_id}] notifications = [n.to_dict() for n in self.client.events.list(_filter, limit=100000)] for n in notifications: traits = n['traits'] def find_field(f_name): return [t['value'] for t in traits if (t['name'] == f_name)][0] trace_id = find_field('trace_id') parent_id = find_field('parent_id') name = find_field('name') project = find_field('project') service = find_field('service') host = find_field('host') timestamp = find_field('timestamp') payload = n.get('raw', {}).get('payload', {}) self._append_results(trace_id, parent_id, name, project, service, host, timestamp, payload) return self._parse_results()
def get_report(self, base_id): 'Retrieves and parses notification from ceilometer.\n\n :param base_id: Base id of trace elements.\n ' _filter = [{'field': 'base_id', 'op': 'eq', 'value': base_id}] notifications = [n.to_dict() for n in self.client.events.list(_filter, limit=100000)] for n in notifications: traits = n['traits'] def find_field(f_name): return [t['value'] for t in traits if (t['name'] == f_name)][0] trace_id = find_field('trace_id') parent_id = find_field('parent_id') name = find_field('name') project = find_field('project') service = find_field('service') host = find_field('host') timestamp = find_field('timestamp') payload = n.get('raw', {}).get('payload', {}) self._append_results(trace_id, parent_id, name, project, service, host, timestamp, payload) return self._parse_results()<|docstring|>Retrieves and parses notification from ceilometer. :param base_id: Base id of trace elements.<|endoftext|>
975808f6182047bda389fa0bb1933258d8e62bf0ec152fb3b15380a49762934a
def get(self, *, expand: typing.List['str']=None, sort: typing.List['str']=None, limit: int=None, offset: int=None, with_total: bool=None, where: typing.List['str']=None, predicate_var: typing.Dict[(str, typing.List['str'])]=None, headers: typing.Dict[(str, str)]=None, options: typing.Dict[(str, typing.Any)]=None) -> typing.Optional['CustomObjectPagedQueryResponse']: 'The query endpoint allows to retrieve custom objects in a specific container or all custom objects.\n For performance reasons, it is highly advisable to query only for custom objects in a container by using\n the container field in the where predicate.\n\n ' params = {'expand': expand, 'sort': sort, 'limit': limit, 'offset': offset, 'withTotal': with_total, 'where': where} (predicate_var and params.update({f'var.{k}': v for (k, v) in predicate_var.items()})) headers = ({} if (headers is None) else headers) response = self._client._get(endpoint=f'/{self._project_key}/custom-objects', params=params, headers=headers, options=options) if (response.status_code == 200): return CustomObjectPagedQueryResponse.deserialize(response.json()) elif (response.status_code in (400, 401, 403, 500, 503)): obj = ErrorResponse.deserialize(response.json()) raise self._client._create_exception(obj, response) elif (response.status_code == 404): return None raise ValueError('Unhandled status code %s', response.status_code)
The query endpoint allows to retrieve custom objects in a specific container or all custom objects. For performance reasons, it is highly advisable to query only for custom objects in a container by using the container field in the where predicate.
src/commercetools/platform/client/custom_objects/by_project_key_custom_objects_request_builder.py
get
lime-green/commercetools-python-sdk
1
python
def get(self, *, expand: typing.List['str']=None, sort: typing.List['str']=None, limit: int=None, offset: int=None, with_total: bool=None, where: typing.List['str']=None, predicate_var: typing.Dict[(str, typing.List['str'])]=None, headers: typing.Dict[(str, str)]=None, options: typing.Dict[(str, typing.Any)]=None) -> typing.Optional['CustomObjectPagedQueryResponse']: 'The query endpoint allows to retrieve custom objects in a specific container or all custom objects.\n For performance reasons, it is highly advisable to query only for custom objects in a container by using\n the container field in the where predicate.\n\n ' params = {'expand': expand, 'sort': sort, 'limit': limit, 'offset': offset, 'withTotal': with_total, 'where': where} (predicate_var and params.update({f'var.{k}': v for (k, v) in predicate_var.items()})) headers = ({} if (headers is None) else headers) response = self._client._get(endpoint=f'/{self._project_key}/custom-objects', params=params, headers=headers, options=options) if (response.status_code == 200): return CustomObjectPagedQueryResponse.deserialize(response.json()) elif (response.status_code in (400, 401, 403, 500, 503)): obj = ErrorResponse.deserialize(response.json()) raise self._client._create_exception(obj, response) elif (response.status_code == 404): return None raise ValueError('Unhandled status code %s', response.status_code)
def get(self, *, expand: typing.List['str']=None, sort: typing.List['str']=None, limit: int=None, offset: int=None, with_total: bool=None, where: typing.List['str']=None, predicate_var: typing.Dict[(str, typing.List['str'])]=None, headers: typing.Dict[(str, str)]=None, options: typing.Dict[(str, typing.Any)]=None) -> typing.Optional['CustomObjectPagedQueryResponse']: 'The query endpoint allows to retrieve custom objects in a specific container or all custom objects.\n For performance reasons, it is highly advisable to query only for custom objects in a container by using\n the container field in the where predicate.\n\n ' params = {'expand': expand, 'sort': sort, 'limit': limit, 'offset': offset, 'withTotal': with_total, 'where': where} (predicate_var and params.update({f'var.{k}': v for (k, v) in predicate_var.items()})) headers = ({} if (headers is None) else headers) response = self._client._get(endpoint=f'/{self._project_key}/custom-objects', params=params, headers=headers, options=options) if (response.status_code == 200): return CustomObjectPagedQueryResponse.deserialize(response.json()) elif (response.status_code in (400, 401, 403, 500, 503)): obj = ErrorResponse.deserialize(response.json()) raise self._client._create_exception(obj, response) elif (response.status_code == 404): return None raise ValueError('Unhandled status code %s', response.status_code)<|docstring|>The query endpoint allows to retrieve custom objects in a specific container or all custom objects. For performance reasons, it is highly advisable to query only for custom objects in a container by using the container field in the where predicate.<|endoftext|>
477a2585cde62c82b9e92347232a9c443fdf7ef42058273ed4cd23bf2db71dfc
def post(self, body: 'CustomObjectDraft', *, expand: typing.List['str']=None, headers: typing.Dict[(str, str)]=None, options: typing.Dict[(str, typing.Any)]=None) -> typing.Optional['CustomObject']: 'Creates a new custom object or updates an existing custom object.\n If an object with the given container/key exists,\n the object will be replaced with the new value and the version is incremented.\n If the request contains a version and an object with the given container/key exists then the version\n must match the version of the existing object. Concurrent updates for the same custom object still can result\n in a Conflict (409) even if the version is not provided.\n Fields with null values will not be saved.\n\n ' headers = ({} if (headers is None) else headers) response = self._client._post(endpoint=f'/{self._project_key}/custom-objects', params={'expand': expand}, json=body.serialize(), headers={'Content-Type': 'application/json', **headers}, options=options) if (response.status_code == 201): return CustomObject.deserialize(response.json()) elif (response.status_code in (400, 401, 403, 500, 503)): obj = ErrorResponse.deserialize(response.json()) raise self._client._create_exception(obj, response) elif (response.status_code == 404): return None elif (response.status_code == 200): return None raise ValueError('Unhandled status code %s', response.status_code)
Creates a new custom object or updates an existing custom object. If an object with the given container/key exists, the object will be replaced with the new value and the version is incremented. If the request contains a version and an object with the given container/key exists then the version must match the version of the existing object. Concurrent updates for the same custom object still can result in a Conflict (409) even if the version is not provided. Fields with null values will not be saved.
src/commercetools/platform/client/custom_objects/by_project_key_custom_objects_request_builder.py
post
lime-green/commercetools-python-sdk
1
python
def post(self, body: 'CustomObjectDraft', *, expand: typing.List['str']=None, headers: typing.Dict[(str, str)]=None, options: typing.Dict[(str, typing.Any)]=None) -> typing.Optional['CustomObject']: 'Creates a new custom object or updates an existing custom object.\n If an object with the given container/key exists,\n the object will be replaced with the new value and the version is incremented.\n If the request contains a version and an object with the given container/key exists then the version\n must match the version of the existing object. Concurrent updates for the same custom object still can result\n in a Conflict (409) even if the version is not provided.\n Fields with null values will not be saved.\n\n ' headers = ({} if (headers is None) else headers) response = self._client._post(endpoint=f'/{self._project_key}/custom-objects', params={'expand': expand}, json=body.serialize(), headers={'Content-Type': 'application/json', **headers}, options=options) if (response.status_code == 201): return CustomObject.deserialize(response.json()) elif (response.status_code in (400, 401, 403, 500, 503)): obj = ErrorResponse.deserialize(response.json()) raise self._client._create_exception(obj, response) elif (response.status_code == 404): return None elif (response.status_code == 200): return None raise ValueError('Unhandled status code %s', response.status_code)
def post(self, body: 'CustomObjectDraft', *, expand: typing.List['str']=None, headers: typing.Dict[(str, str)]=None, options: typing.Dict[(str, typing.Any)]=None) -> typing.Optional['CustomObject']: 'Creates a new custom object or updates an existing custom object.\n If an object with the given container/key exists,\n the object will be replaced with the new value and the version is incremented.\n If the request contains a version and an object with the given container/key exists then the version\n must match the version of the existing object. Concurrent updates for the same custom object still can result\n in a Conflict (409) even if the version is not provided.\n Fields with null values will not be saved.\n\n ' headers = ({} if (headers is None) else headers) response = self._client._post(endpoint=f'/{self._project_key}/custom-objects', params={'expand': expand}, json=body.serialize(), headers={'Content-Type': 'application/json', **headers}, options=options) if (response.status_code == 201): return CustomObject.deserialize(response.json()) elif (response.status_code in (400, 401, 403, 500, 503)): obj = ErrorResponse.deserialize(response.json()) raise self._client._create_exception(obj, response) elif (response.status_code == 404): return None elif (response.status_code == 200): return None raise ValueError('Unhandled status code %s', response.status_code)<|docstring|>Creates a new custom object or updates an existing custom object. If an object with the given container/key exists, the object will be replaced with the new value and the version is incremented. If the request contains a version and an object with the given container/key exists then the version must match the version of the existing object. Concurrent updates for the same custom object still can result in a Conflict (409) even if the version is not provided. Fields with null values will not be saved.<|endoftext|>
1959120985e5cff87b2431368f40befa57ec24f02d73d67d2f691cafdc6418d3
async def main(): 'Main' bot = AbeilleBot(command_prefix=commands.when_mentioned, description=DESCRIPTION, help_command=None, intents=intents) async with bot: p = (pathlib.Path(__file__).parent / COGS_DIR) for extension in [f.name.replace('.py', '') for f in p.iterdir() if f.is_file()]: if (extension != '__init__'): try: (await bot.load_extension(((COGS_DIR + '.') + extension))) logging.info("'%s' extension loaded", extension) except commands.ExtensionFailed as err: logging.error("'%s' extension loading failed: %s %s", extension, err.name, err.original) raise except (discord.ClientException, ModuleNotFoundError): logging.error("Failed to load extension '%s'.", extension) raise (await bot.start(discord_token))
Main
abeille.py
main
actionbrk/Abeille
0
python
async def main(): bot = AbeilleBot(command_prefix=commands.when_mentioned, description=DESCRIPTION, help_command=None, intents=intents) async with bot: p = (pathlib.Path(__file__).parent / COGS_DIR) for extension in [f.name.replace('.py', ) for f in p.iterdir() if f.is_file()]: if (extension != '__init__'): try: (await bot.load_extension(((COGS_DIR + '.') + extension))) logging.info("'%s' extension loaded", extension) except commands.ExtensionFailed as err: logging.error("'%s' extension loading failed: %s %s", extension, err.name, err.original) raise except (discord.ClientException, ModuleNotFoundError): logging.error("Failed to load extension '%s'.", extension) raise (await bot.start(discord_token))
async def main(): bot = AbeilleBot(command_prefix=commands.when_mentioned, description=DESCRIPTION, help_command=None, intents=intents) async with bot: p = (pathlib.Path(__file__).parent / COGS_DIR) for extension in [f.name.replace('.py', ) for f in p.iterdir() if f.is_file()]: if (extension != '__init__'): try: (await bot.load_extension(((COGS_DIR + '.') + extension))) logging.info("'%s' extension loaded", extension) except commands.ExtensionFailed as err: logging.error("'%s' extension loading failed: %s %s", extension, err.name, err.original) raise except (discord.ClientException, ModuleNotFoundError): logging.error("Failed to load extension '%s'.", extension) raise (await bot.start(discord_token))<|docstring|>Main<|endoftext|>
eb1f5d22c24c7a352faa1728db2bbcf17b951bc7e15a4cee9e9223f8b32722c6
def random_emotion_string(e: list) -> str: ' returns a random string of the emotions list' return e[randint(0, (len(e) - 1))]
returns a random string of the emotions list
test/pickMeme.py
random_emotion_string
drossmei/MemeMe
0
python
def random_emotion_string(e: list) -> str: ' ' return e[randint(0, (len(e) - 1))]
def random_emotion_string(e: list) -> str: ' ' return e[randint(0, (len(e) - 1))]<|docstring|>returns a random string of the emotions list<|endoftext|>
792e197b038cc5e82acb2c42c09bb355ac4b6ac174ccd05a6484e2300030e178
def random_caption_string(emotion: str) -> str: ' returns a random string of phrases under emotions' phrases_indexes = (len(data[emotion]) - 1) random_num = randint(0, phrases_indexes) return data[emotion][random_num]
returns a random string of phrases under emotions
test/pickMeme.py
random_caption_string
drossmei/MemeMe
0
python
def random_caption_string(emotion: str) -> str: ' ' phrases_indexes = (len(data[emotion]) - 1) random_num = randint(0, phrases_indexes) return data[emotion][random_num]
def random_caption_string(emotion: str) -> str: ' ' phrases_indexes = (len(data[emotion]) - 1) random_num = randint(0, phrases_indexes) return data[emotion][random_num]<|docstring|>returns a random string of phrases under emotions<|endoftext|>
14232ec66c18c2be9a2f9ebf8ed99948833d5a17afaa03d8fea3643ef7fb1126
def chooseMeme() -> (str, str): ' Chooses a phrase for the caption ' emotions = list(data.keys()) emotion = random_emotion_string(emotions) caption = random_caption_string(emotion) while (caption in cache): emotion = random_emotion_string(emotions) caption = random_caption_string(emotion) limit_and_reset(cache) cache.append(caption) return (emotion, caption)
Chooses a phrase for the caption
test/pickMeme.py
chooseMeme
drossmei/MemeMe
0
python
def chooseMeme() -> (str, str): ' ' emotions = list(data.keys()) emotion = random_emotion_string(emotions) caption = random_caption_string(emotion) while (caption in cache): emotion = random_emotion_string(emotions) caption = random_caption_string(emotion) limit_and_reset(cache) cache.append(caption) return (emotion, caption)
def chooseMeme() -> (str, str): ' ' emotions = list(data.keys()) emotion = random_emotion_string(emotions) caption = random_caption_string(emotion) while (caption in cache): emotion = random_emotion_string(emotions) caption = random_caption_string(emotion) limit_and_reset(cache) cache.append(caption) return (emotion, caption)<|docstring|>Chooses a phrase for the caption<|endoftext|>
c85b138cb57aa0d28e4ca43f3230c137c171c66cb31ec7b5a27a0d37ae1c055b
def limit_and_reset(cache): ' if the cache is too large, it frees up one spot ' if (len(cache) > 5): cache.pop(0) return cache
if the cache is too large, it frees up one spot
test/pickMeme.py
limit_and_reset
drossmei/MemeMe
0
python
def limit_and_reset(cache): ' ' if (len(cache) > 5): cache.pop(0) return cache
def limit_and_reset(cache): ' ' if (len(cache) > 5): cache.pop(0) return cache<|docstring|>if the cache is too large, it frees up one spot<|endoftext|>
9582bff77f62a176de34c50c94655129a5431daf22fa1f99fecd7b475218e8a7
def num_consistent(reference_prog, user_prog, token_tables): '\n Given a reference program, (prog, i/o), user program tokens, and the token tables,\n convert the progams from tokens to operators, then return number of i/o examples they are \n consistent on.\n ' (expected, examples) = reference_prog try: ref = to_program(expected, token_tables.token_op_table) except Exception: print('I couldnt parse, sorry mom :(') return (- 1) try: user = to_program(user_prog, token_tables.token_op_table) except Exception: return (- 1) num_consistent = 0 for (i, o) in examples: i = op.stringify_tokens(i, token_tables.string_token_table) o = op.stringify_tokens(o, token_tables.string_token_table) ref_res = ref.eval(i) assert (ref_res == o) try: user_res = user.eval(i) except Exception: continue if (ref_res == user_res): num_consistent += 1 return num_consistent
Given a reference program, (prog, i/o), user program tokens, and the token tables, convert the progams from tokens to operators, then return number of i/o examples they are consistent on.
src/env.py
num_consistent
Lucaskabela/prog-synth-SAC
0
python
def num_consistent(reference_prog, user_prog, token_tables): '\n Given a reference program, (prog, i/o), user program tokens, and the token tables,\n convert the progams from tokens to operators, then return number of i/o examples they are \n consistent on.\n ' (expected, examples) = reference_prog try: ref = to_program(expected, token_tables.token_op_table) except Exception: print('I couldnt parse, sorry mom :(') return (- 1) try: user = to_program(user_prog, token_tables.token_op_table) except Exception: return (- 1) num_consistent = 0 for (i, o) in examples: i = op.stringify_tokens(i, token_tables.string_token_table) o = op.stringify_tokens(o, token_tables.string_token_table) ref_res = ref.eval(i) assert (ref_res == o) try: user_res = user.eval(i) except Exception: continue if (ref_res == user_res): num_consistent += 1 return num_consistent
def num_consistent(reference_prog, user_prog, token_tables): '\n Given a reference program, (prog, i/o), user program tokens, and the token tables,\n convert the progams from tokens to operators, then return number of i/o examples they are \n consistent on.\n ' (expected, examples) = reference_prog try: ref = to_program(expected, token_tables.token_op_table) except Exception: print('I couldnt parse, sorry mom :(') return (- 1) try: user = to_program(user_prog, token_tables.token_op_table) except Exception: return (- 1) num_consistent = 0 for (i, o) in examples: i = op.stringify_tokens(i, token_tables.string_token_table) o = op.stringify_tokens(o, token_tables.string_token_table) ref_res = ref.eval(i) assert (ref_res == o) try: user_res = user.eval(i) except Exception: continue if (ref_res == user_res): num_consistent += 1 return num_consistent<|docstring|>Given a reference program, (prog, i/o), user program tokens, and the token tables, convert the progams from tokens to operators, then return number of i/o examples they are consistent on.<|endoftext|>
06218d85d1bd9e7d1dd12a2b4dd5e983b2ab1c20bf87115eeee7340784607344
def to_program(tokens, token_op_table): '\n Converts a program, which is a list of tokens into operator based programs by recursively applying\n rules defined in dsl.py, using token_op_table\n ' sub_progs = [] while (len(tokens) != 0): sub_progs.append(op_to_prog(tokens, token_op_table)) if (sub_progs[(- 1)] == 'EOS'): del sub_progs[(- 1)] break return op.Concat(*sub_progs)
Converts a program, which is a list of tokens into operator based programs by recursively applying rules defined in dsl.py, using token_op_table
src/env.py
to_program
Lucaskabela/prog-synth-SAC
0
python
def to_program(tokens, token_op_table): '\n Converts a program, which is a list of tokens into operator based programs by recursively applying\n rules defined in dsl.py, using token_op_table\n ' sub_progs = [] while (len(tokens) != 0): sub_progs.append(op_to_prog(tokens, token_op_table)) if (sub_progs[(- 1)] == 'EOS'): del sub_progs[(- 1)] break return op.Concat(*sub_progs)
def to_program(tokens, token_op_table): '\n Converts a program, which is a list of tokens into operator based programs by recursively applying\n rules defined in dsl.py, using token_op_table\n ' sub_progs = [] while (len(tokens) != 0): sub_progs.append(op_to_prog(tokens, token_op_table)) if (sub_progs[(- 1)] == 'EOS'): del sub_progs[(- 1)] break return op.Concat(*sub_progs)<|docstring|>Converts a program, which is a list of tokens into operator based programs by recursively applying rules defined in dsl.py, using token_op_table<|endoftext|>
56852098472780342d33ad0b6ef00a71a00e7ce9ffef7e5cf888ecf5aadd9546
def op_to_prog(tokens, token_op_table): '\n Recursively converts the first token in tokens, then the rest based on what operator.\n ' res = None curr_token = tokens.pop(0) curr_op = token_op_table[curr_token] if ((curr_token != 0) and (curr_token < 818)): if (curr_token == 1): args = [] while (len(tokens) > 0): args.append(op_to_prog(tokens, token_op_table)) if (args[(- 1)] == 'EOS'): del args[(- 1)] break res = curr_op(*args) elif (curr_token == 2): arg1 = op_to_prog(tokens, token_op_table) arg2 = op_to_prog(tokens, token_op_table) arg1 = (arg1 if (arg1 != 'EOS') else '') arg2 = (arg2 if (arg2 != 'EOS') else '') res = curr_op(arg1, arg2) elif (curr_token == 3): arg1 = token_op_table[tokens.pop(0)] arg1 = (arg1 if (arg1 != 'EOS') else '') res = curr_op(arg1) elif (curr_token == 4): arg1 = token_op_table[tokens.pop(0)] arg2 = token_op_table[tokens.pop(0)] arg1 = (arg1 if (arg1 != 'EOS') else '') arg2 = (arg2 if (arg2 != 'EOS') else '') res = curr_op(arg1, arg2) elif (curr_token == 5): args = [token_op_table[tokens.pop(0)] for _ in range(6)] args = [(arg if (arg != 'EOS') else '') for arg in args] res = curr_op(*args) else: ops = None if (type(curr_op) == tuple): ops = list(curr_op) else: ops = list() ops.append(curr_op) if (len(ops) > 1): res = ops[0](*ops[1:]) else: res = ops[0]() else: return curr_op return res
Recursively converts the first token in tokens, then the rest based on what operator.
src/env.py
op_to_prog
Lucaskabela/prog-synth-SAC
0
python
def op_to_prog(tokens, token_op_table): '\n \n ' res = None curr_token = tokens.pop(0) curr_op = token_op_table[curr_token] if ((curr_token != 0) and (curr_token < 818)): if (curr_token == 1): args = [] while (len(tokens) > 0): args.append(op_to_prog(tokens, token_op_table)) if (args[(- 1)] == 'EOS'): del args[(- 1)] break res = curr_op(*args) elif (curr_token == 2): arg1 = op_to_prog(tokens, token_op_table) arg2 = op_to_prog(tokens, token_op_table) arg1 = (arg1 if (arg1 != 'EOS') else ) arg2 = (arg2 if (arg2 != 'EOS') else ) res = curr_op(arg1, arg2) elif (curr_token == 3): arg1 = token_op_table[tokens.pop(0)] arg1 = (arg1 if (arg1 != 'EOS') else ) res = curr_op(arg1) elif (curr_token == 4): arg1 = token_op_table[tokens.pop(0)] arg2 = token_op_table[tokens.pop(0)] arg1 = (arg1 if (arg1 != 'EOS') else ) arg2 = (arg2 if (arg2 != 'EOS') else ) res = curr_op(arg1, arg2) elif (curr_token == 5): args = [token_op_table[tokens.pop(0)] for _ in range(6)] args = [(arg if (arg != 'EOS') else ) for arg in args] res = curr_op(*args) else: ops = None if (type(curr_op) == tuple): ops = list(curr_op) else: ops = list() ops.append(curr_op) if (len(ops) > 1): res = ops[0](*ops[1:]) else: res = ops[0]() else: return curr_op return res
def op_to_prog(tokens, token_op_table): '\n \n ' res = None curr_token = tokens.pop(0) curr_op = token_op_table[curr_token] if ((curr_token != 0) and (curr_token < 818)): if (curr_token == 1): args = [] while (len(tokens) > 0): args.append(op_to_prog(tokens, token_op_table)) if (args[(- 1)] == 'EOS'): del args[(- 1)] break res = curr_op(*args) elif (curr_token == 2): arg1 = op_to_prog(tokens, token_op_table) arg2 = op_to_prog(tokens, token_op_table) arg1 = (arg1 if (arg1 != 'EOS') else ) arg2 = (arg2 if (arg2 != 'EOS') else ) res = curr_op(arg1, arg2) elif (curr_token == 3): arg1 = token_op_table[tokens.pop(0)] arg1 = (arg1 if (arg1 != 'EOS') else ) res = curr_op(arg1) elif (curr_token == 4): arg1 = token_op_table[tokens.pop(0)] arg2 = token_op_table[tokens.pop(0)] arg1 = (arg1 if (arg1 != 'EOS') else ) arg2 = (arg2 if (arg2 != 'EOS') else ) res = curr_op(arg1, arg2) elif (curr_token == 5): args = [token_op_table[tokens.pop(0)] for _ in range(6)] args = [(arg if (arg != 'EOS') else ) for arg in args] res = curr_op(*args) else: ops = None if (type(curr_op) == tuple): ops = list(curr_op) else: ops = list() ops.append(curr_op) if (len(ops) > 1): res = ops[0](*ops[1:]) else: res = ops[0]() else: return curr_op return res<|docstring|>Recursively converts the first token in tokens, then the rest based on what operator.<|endoftext|>
bfe518bcbf416e2dfce9b82315bc9b6c219ad75b155659cb72eacf5a9cf52204
def step(self, action): '\n Step takes an action from the agent, and returns (next_state, reward, done, info)\n ' self.user_prog.append(action) if (self.user_prog[(- 1)] == self.EOS): self.user_prog = self.user_prog[1:] reward = 0 if (self.reference_prog[0] == self.user_prog): reward = 1 self.correct += 1 elif (num_consistent(self.reference_prog, self.user_prog, self.token_tables) == self.num_examples): reward = 1 self.correct += 1 old_prog = self.reference_prog[0] self.reset() return ((self.user_prog, [self.reference_prog[1]]), reward, True, {'reference_prog': old_prog}) elif (len(self.user_prog) > (int((self.correct / 1000)) + 3)): old_prog = self.reference_prog[0] self.reset() return ((self.user_prog, [self.reference_prog[1]]), 0, True, {'reference_prog': old_prog}) else: return ((self.user_prog, [self.reference_prog[1]]), 0, False, None)
Step takes an action from the agent, and returns (next_state, reward, done, info)
src/env.py
step
Lucaskabela/prog-synth-SAC
0
python
def step(self, action): '\n \n ' self.user_prog.append(action) if (self.user_prog[(- 1)] == self.EOS): self.user_prog = self.user_prog[1:] reward = 0 if (self.reference_prog[0] == self.user_prog): reward = 1 self.correct += 1 elif (num_consistent(self.reference_prog, self.user_prog, self.token_tables) == self.num_examples): reward = 1 self.correct += 1 old_prog = self.reference_prog[0] self.reset() return ((self.user_prog, [self.reference_prog[1]]), reward, True, {'reference_prog': old_prog}) elif (len(self.user_prog) > (int((self.correct / 1000)) + 3)): old_prog = self.reference_prog[0] self.reset() return ((self.user_prog, [self.reference_prog[1]]), 0, True, {'reference_prog': old_prog}) else: return ((self.user_prog, [self.reference_prog[1]]), 0, False, None)
def step(self, action): '\n \n ' self.user_prog.append(action) if (self.user_prog[(- 1)] == self.EOS): self.user_prog = self.user_prog[1:] reward = 0 if (self.reference_prog[0] == self.user_prog): reward = 1 self.correct += 1 elif (num_consistent(self.reference_prog, self.user_prog, self.token_tables) == self.num_examples): reward = 1 self.correct += 1 old_prog = self.reference_prog[0] self.reset() return ((self.user_prog, [self.reference_prog[1]]), reward, True, {'reference_prog': old_prog}) elif (len(self.user_prog) > (int((self.correct / 1000)) + 3)): old_prog = self.reference_prog[0] self.reset() return ((self.user_prog, [self.reference_prog[1]]), 0, True, {'reference_prog': old_prog}) else: return ((self.user_prog, [self.reference_prog[1]]), 0, False, None)<|docstring|>Step takes an action from the agent, and returns (next_state, reward, done, info)<|endoftext|>
ca9d82eebb82e0de2361e4a6b5e60455fd8d0ab3423b7db2e60bbb31bec0f1a3
def reset(self): '\n Reset the environment by returning new sequence [SOS], and new i/o examples\n ' self.user_prog = [self.SOS] self.reference_prog = self._sample() return (self.user_prog, [self.reference_prog[1]])
Reset the environment by returning new sequence [SOS], and new i/o examples
src/env.py
reset
Lucaskabela/prog-synth-SAC
0
python
def reset(self): '\n \n ' self.user_prog = [self.SOS] self.reference_prog = self._sample() return (self.user_prog, [self.reference_prog[1]])
def reset(self): '\n \n ' self.user_prog = [self.SOS] self.reference_prog = self._sample() return (self.user_prog, [self.reference_prog[1]])<|docstring|>Reset the environment by returning new sequence [SOS], and new i/o examples<|endoftext|>
97c5f3202b5d7bc5c8cc36508166890e4389ba943d191d730de75bbb6337bb0e
def _sample(self): '\n Samples a single program according to parameters of environment\n ' example = sample_example(self.max_expressions, self.max_characters, num_strings=self.num_examples) program = example.program.to_tokens(self.token_tables.op_token_table) if self.curriculum: while (len(program) > ((self.correct / 10000) + 3)): example = sample_example(self.max_expressions, self.max_characters, num_strings=self.num_examples) program = example.program.to_tokens(self.token_tables.op_token_table) strings = [(op.tokenize_string(input_, self.token_tables.string_token_table), op.tokenize_string(output, self.token_tables.string_token_table)) for (input_, output) in example.strings] return (program, strings)
Samples a single program according to parameters of environment
src/env.py
_sample
Lucaskabela/prog-synth-SAC
0
python
def _sample(self): '\n \n ' example = sample_example(self.max_expressions, self.max_characters, num_strings=self.num_examples) program = example.program.to_tokens(self.token_tables.op_token_table) if self.curriculum: while (len(program) > ((self.correct / 10000) + 3)): example = sample_example(self.max_expressions, self.max_characters, num_strings=self.num_examples) program = example.program.to_tokens(self.token_tables.op_token_table) strings = [(op.tokenize_string(input_, self.token_tables.string_token_table), op.tokenize_string(output, self.token_tables.string_token_table)) for (input_, output) in example.strings] return (program, strings)
def _sample(self): '\n \n ' example = sample_example(self.max_expressions, self.max_characters, num_strings=self.num_examples) program = example.program.to_tokens(self.token_tables.op_token_table) if self.curriculum: while (len(program) > ((self.correct / 10000) + 3)): example = sample_example(self.max_expressions, self.max_characters, num_strings=self.num_examples) program = example.program.to_tokens(self.token_tables.op_token_table) strings = [(op.tokenize_string(input_, self.token_tables.string_token_table), op.tokenize_string(output, self.token_tables.string_token_table)) for (input_, output) in example.strings] return (program, strings)<|docstring|>Samples a single program according to parameters of environment<|endoftext|>
f8ac658e45e1cd54f720c2b9adfe84465ea3e4c9e265b8566a737b02165604a2
def get_dataset(self): 'Download dataset associated with task' return datasets.get_dataset(self.dataset_id)
Download dataset associated with task
openml/tasks/task.py
get_dataset
MichaelMMeskhi/openml-python
1
python
def get_dataset(self): return datasets.get_dataset(self.dataset_id)
def get_dataset(self): return datasets.get_dataset(self.dataset_id)<|docstring|>Download dataset associated with task<|endoftext|>
312d6def9052a510e528daa4b809c5f8510e3397053a7b5219e01e0ef489488d
def download_split(self): 'Download the OpenML split for a given task.\n ' cached_split_file = os.path.join(_create_cache_directory_for_id('tasks', self.task_id), 'datasplits.arff') try: split = OpenMLSplit._from_arff_file(cached_split_file) except (OSError, IOError): self._download_split(cached_split_file) split = OpenMLSplit._from_arff_file(cached_split_file) return split
Download the OpenML split for a given task.
openml/tasks/task.py
download_split
MichaelMMeskhi/openml-python
1
python
def download_split(self): '\n ' cached_split_file = os.path.join(_create_cache_directory_for_id('tasks', self.task_id), 'datasplits.arff') try: split = OpenMLSplit._from_arff_file(cached_split_file) except (OSError, IOError): self._download_split(cached_split_file) split = OpenMLSplit._from_arff_file(cached_split_file) return split
def download_split(self): '\n ' cached_split_file = os.path.join(_create_cache_directory_for_id('tasks', self.task_id), 'datasplits.arff') try: split = OpenMLSplit._from_arff_file(cached_split_file) except (OSError, IOError): self._download_split(cached_split_file) split = OpenMLSplit._from_arff_file(cached_split_file) return split<|docstring|>Download the OpenML split for a given task.<|endoftext|>
b6f856ef4d18cb052914d73191cbe526746d798921ad0060791ceebe21ed7adf
def push_tag(self, tag): 'Annotates this task with a tag on the server.\n\n Parameters\n ----------\n tag : str\n Tag to attach to the task.\n ' _tag_entity('task', self.task_id, tag)
Annotates this task with a tag on the server. Parameters ---------- tag : str Tag to attach to the task.
openml/tasks/task.py
push_tag
MichaelMMeskhi/openml-python
1
python
def push_tag(self, tag): 'Annotates this task with a tag on the server.\n\n Parameters\n ----------\n tag : str\n Tag to attach to the task.\n ' _tag_entity('task', self.task_id, tag)
def push_tag(self, tag): 'Annotates this task with a tag on the server.\n\n Parameters\n ----------\n tag : str\n Tag to attach to the task.\n ' _tag_entity('task', self.task_id, tag)<|docstring|>Annotates this task with a tag on the server. Parameters ---------- tag : str Tag to attach to the task.<|endoftext|>
7d8f606939c30b8f85db84d3c3fad08c5e0b4ce21193c31a16096b1f03311027
def remove_tag(self, tag): 'Removes a tag from this task on the server.\n\n Parameters\n ----------\n tag : str\n Tag to attach to the task.\n ' _tag_entity('task', self.task_id, tag, untag=True)
Removes a tag from this task on the server. Parameters ---------- tag : str Tag to attach to the task.
openml/tasks/task.py
remove_tag
MichaelMMeskhi/openml-python
1
python
def remove_tag(self, tag): 'Removes a tag from this task on the server.\n\n Parameters\n ----------\n tag : str\n Tag to attach to the task.\n ' _tag_entity('task', self.task_id, tag, untag=True)
def remove_tag(self, tag): 'Removes a tag from this task on the server.\n\n Parameters\n ----------\n tag : str\n Tag to attach to the task.\n ' _tag_entity('task', self.task_id, tag, untag=True)<|docstring|>Removes a tag from this task on the server. Parameters ---------- tag : str Tag to attach to the task.<|endoftext|>
aee79d5ff0b3001bee73431e8775c06b5c948189f9979d7645b7bc92c56fcbfb
def get_X_and_y(self): 'Get data associated with the current task.\n\n Returns\n -------\n tuple - X and y\n\n ' dataset = self.get_dataset() if (self.task_type_id not in (1, 2, 3)): raise NotImplementedError(self.task_type) X_and_y = dataset.get_data(dataset_format='array', target=self.target_name) return X_and_y
Get data associated with the current task. Returns ------- tuple - X and y
openml/tasks/task.py
get_X_and_y
MichaelMMeskhi/openml-python
1
python
def get_X_and_y(self): 'Get data associated with the current task.\n\n Returns\n -------\n tuple - X and y\n\n ' dataset = self.get_dataset() if (self.task_type_id not in (1, 2, 3)): raise NotImplementedError(self.task_type) X_and_y = dataset.get_data(dataset_format='array', target=self.target_name) return X_and_y
def get_X_and_y(self): 'Get data associated with the current task.\n\n Returns\n -------\n tuple - X and y\n\n ' dataset = self.get_dataset() if (self.task_type_id not in (1, 2, 3)): raise NotImplementedError(self.task_type) X_and_y = dataset.get_data(dataset_format='array', target=self.target_name) return X_and_y<|docstring|>Get data associated with the current task. Returns ------- tuple - X and y<|endoftext|>
cfb383ec0735ea8f2db5e7b3148b07a779e403a767281548c0ae4991c3e3832a
def get_structure_from_mp(formula): '\n Convenience method to get a crystal from the Materials Project database via\n the API. Requires PMG_MAPI_KEY to be set.\n\n Args:\n formula (str): A formula\n\n Returns:\n (Structure) The lowest energy structure in Materials Project with that\n formula.\n ' m = MPRester() entries = m.get_entries(formula, inc_structure='final') if (len(entries) == 0): raise ValueError(('No structure with formula %s in Materials Project!' % formula)) elif (len(entries) > 1): warnings.warn(('%d structures with formula %s found in Materials Project. The lowest energy structure will be returned.' % (len(entries), formula))) return min(entries, key=(lambda e: e.energy_per_atom)).structure
Convenience method to get a crystal from the Materials Project database via the API. Requires PMG_MAPI_KEY to be set. Args: formula (str): A formula Returns: (Structure) The lowest energy structure in Materials Project with that formula.
pymatgen/__init__.py
get_structure_from_mp
gVallverdu/pymatgen
6
python
def get_structure_from_mp(formula): '\n Convenience method to get a crystal from the Materials Project database via\n the API. Requires PMG_MAPI_KEY to be set.\n\n Args:\n formula (str): A formula\n\n Returns:\n (Structure) The lowest energy structure in Materials Project with that\n formula.\n ' m = MPRester() entries = m.get_entries(formula, inc_structure='final') if (len(entries) == 0): raise ValueError(('No structure with formula %s in Materials Project!' % formula)) elif (len(entries) > 1): warnings.warn(('%d structures with formula %s found in Materials Project. The lowest energy structure will be returned.' % (len(entries), formula))) return min(entries, key=(lambda e: e.energy_per_atom)).structure
def get_structure_from_mp(formula): '\n Convenience method to get a crystal from the Materials Project database via\n the API. Requires PMG_MAPI_KEY to be set.\n\n Args:\n formula (str): A formula\n\n Returns:\n (Structure) The lowest energy structure in Materials Project with that\n formula.\n ' m = MPRester() entries = m.get_entries(formula, inc_structure='final') if (len(entries) == 0): raise ValueError(('No structure with formula %s in Materials Project!' % formula)) elif (len(entries) > 1): warnings.warn(('%d structures with formula %s found in Materials Project. The lowest energy structure will be returned.' % (len(entries), formula))) return min(entries, key=(lambda e: e.energy_per_atom)).structure<|docstring|>Convenience method to get a crystal from the Materials Project database via the API. Requires PMG_MAPI_KEY to be set. Args: formula (str): A formula Returns: (Structure) The lowest energy structure in Materials Project with that formula.<|endoftext|>
88f22be51ca1fb68856518ecb4c5195ed14e2b75fc314de9b68a9d7df8173b93
def loadfn(fname): '\n Convenience method to perform quick loading of data from a filename. The\n type of object returned depends the file type.\n\n Args:\n fname (string): A filename.\n\n Returns:\n Note that fname is matched using unix-style, i.e., fnmatch.\n (Structure) if *POSCAR*/*CONTCAR*/*.cif\n (Vasprun) *vasprun*\n (obj) if *json* (passthrough to monty.serialization.loadfn)\n ' if ((fnmatch(fname, '*POSCAR*') or fnmatch(fname, '*CONTCAR*') or ('.cif' in fname.lower())) or fnmatch(fname, '*.vasp')): return Structure.from_file(fname) elif fnmatch(fname, '*vasprun*'): from pymatgen.io.vasp import Vasprun return Vasprun(fname) elif fnmatch(fname, '*.json*'): from monty.serialization import loadfn return loadfn(fname)
Convenience method to perform quick loading of data from a filename. The type of object returned depends the file type. Args: fname (string): A filename. Returns: Note that fname is matched using unix-style, i.e., fnmatch. (Structure) if *POSCAR*/*CONTCAR*/*.cif (Vasprun) *vasprun* (obj) if *json* (passthrough to monty.serialization.loadfn)
pymatgen/__init__.py
loadfn
gVallverdu/pymatgen
6
python
def loadfn(fname): '\n Convenience method to perform quick loading of data from a filename. The\n type of object returned depends the file type.\n\n Args:\n fname (string): A filename.\n\n Returns:\n Note that fname is matched using unix-style, i.e., fnmatch.\n (Structure) if *POSCAR*/*CONTCAR*/*.cif\n (Vasprun) *vasprun*\n (obj) if *json* (passthrough to monty.serialization.loadfn)\n ' if ((fnmatch(fname, '*POSCAR*') or fnmatch(fname, '*CONTCAR*') or ('.cif' in fname.lower())) or fnmatch(fname, '*.vasp')): return Structure.from_file(fname) elif fnmatch(fname, '*vasprun*'): from pymatgen.io.vasp import Vasprun return Vasprun(fname) elif fnmatch(fname, '*.json*'): from monty.serialization import loadfn return loadfn(fname)
def loadfn(fname): '\n Convenience method to perform quick loading of data from a filename. The\n type of object returned depends the file type.\n\n Args:\n fname (string): A filename.\n\n Returns:\n Note that fname is matched using unix-style, i.e., fnmatch.\n (Structure) if *POSCAR*/*CONTCAR*/*.cif\n (Vasprun) *vasprun*\n (obj) if *json* (passthrough to monty.serialization.loadfn)\n ' if ((fnmatch(fname, '*POSCAR*') or fnmatch(fname, '*CONTCAR*') or ('.cif' in fname.lower())) or fnmatch(fname, '*.vasp')): return Structure.from_file(fname) elif fnmatch(fname, '*vasprun*'): from pymatgen.io.vasp import Vasprun return Vasprun(fname) elif fnmatch(fname, '*.json*'): from monty.serialization import loadfn return loadfn(fname)<|docstring|>Convenience method to perform quick loading of data from a filename. The type of object returned depends the file type. Args: fname (string): A filename. Returns: Note that fname is matched using unix-style, i.e., fnmatch. (Structure) if *POSCAR*/*CONTCAR*/*.cif (Vasprun) *vasprun* (obj) if *json* (passthrough to monty.serialization.loadfn)<|endoftext|>
551d59d8eca959b6524edcc4fdec452cf8a2bba81f248ce3f6ef0b5bb5365360
@pytest.mark.parametrize('stage', ['train', 'val', 'test']) def test_trainer_request_dataloaders_legacy(stage): 'Test to ensure that ``request_dataloaders`` can take the legacy PL ordering of arguments.\n\n legacy: (model, stage)\n ' class TestTrainer(Trainer): recorded_on_dataloader_calls = {} def on_train_dataloader(self) -> None: self.recorded_on_dataloader_calls['train'] = True def on_val_dataloader(self) -> None: self.recorded_on_dataloader_calls['val'] = True def on_test_dataloader(self) -> None: self.recorded_on_dataloader_calls['test'] = True model = BoringModel() trainer = TestTrainer() trainer.request_dataloader(model, stage) assert trainer.recorded_on_dataloader_calls[stage]
Test to ensure that ``request_dataloaders`` can take the legacy PL ordering of arguments. legacy: (model, stage)
tests/core/test_trainer.py
test_trainer_request_dataloaders_legacy
hoverinc/lightning-flash
2
python
@pytest.mark.parametrize('stage', ['train', 'val', 'test']) def test_trainer_request_dataloaders_legacy(stage): 'Test to ensure that ``request_dataloaders`` can take the legacy PL ordering of arguments.\n\n legacy: (model, stage)\n ' class TestTrainer(Trainer): recorded_on_dataloader_calls = {} def on_train_dataloader(self) -> None: self.recorded_on_dataloader_calls['train'] = True def on_val_dataloader(self) -> None: self.recorded_on_dataloader_calls['val'] = True def on_test_dataloader(self) -> None: self.recorded_on_dataloader_calls['test'] = True model = BoringModel() trainer = TestTrainer() trainer.request_dataloader(model, stage) assert trainer.recorded_on_dataloader_calls[stage]
@pytest.mark.parametrize('stage', ['train', 'val', 'test']) def test_trainer_request_dataloaders_legacy(stage): 'Test to ensure that ``request_dataloaders`` can take the legacy PL ordering of arguments.\n\n legacy: (model, stage)\n ' class TestTrainer(Trainer): recorded_on_dataloader_calls = {} def on_train_dataloader(self) -> None: self.recorded_on_dataloader_calls['train'] = True def on_val_dataloader(self) -> None: self.recorded_on_dataloader_calls['val'] = True def on_test_dataloader(self) -> None: self.recorded_on_dataloader_calls['test'] = True model = BoringModel() trainer = TestTrainer() trainer.request_dataloader(model, stage) assert trainer.recorded_on_dataloader_calls[stage]<|docstring|>Test to ensure that ``request_dataloaders`` can take the legacy PL ordering of arguments. legacy: (model, stage)<|endoftext|>
5500ddfcd400260f5f4a2de4580af6b26652094f96b8cadca4fb3e7f4f503f08
@pytest.mark.skip(reason='TODO: test can only be enabled once Lightning 1.5 is released.') @pytest.mark.parametrize('stage', [RunningStage.TRAINING, RunningStage.VALIDATING, RunningStage.TESTING]) def test_trainer_request_dataloaders(stage): 'Test to ensure that ``request_dataloaders`` can take a combination of arguments, for PL 1.5 and later.\n\n (stage, model) -> calls module on_dataloader hook (stage, model=model) -> calls module on_dataloader hook\n ' class TestModel(BoringModel): recorded_on_dataloader_calls = {} def on_train_dataloader(self) -> None: self.recorded_on_dataloader_calls[RunningStage.TRAINING] = True def on_val_dataloader(self) -> None: self.recorded_on_dataloader_calls[RunningStage.VALIDATING] = True def on_test_dataloader(self) -> None: self.recorded_on_dataloader_calls[RunningStage.TESTING] = True trainer = Trainer() model = TestModel() trainer.request_dataloader(stage, model) assert model.recorded_on_dataloader_calls[stage] model = TestModel() trainer.request_dataloader(stage, model=model) assert model.recorded_on_dataloader_calls[stage]
Test to ensure that ``request_dataloaders`` can take a combination of arguments, for PL 1.5 and later. (stage, model) -> calls module on_dataloader hook (stage, model=model) -> calls module on_dataloader hook
tests/core/test_trainer.py
test_trainer_request_dataloaders
hoverinc/lightning-flash
2
python
@pytest.mark.skip(reason='TODO: test can only be enabled once Lightning 1.5 is released.') @pytest.mark.parametrize('stage', [RunningStage.TRAINING, RunningStage.VALIDATING, RunningStage.TESTING]) def test_trainer_request_dataloaders(stage): 'Test to ensure that ``request_dataloaders`` can take a combination of arguments, for PL 1.5 and later.\n\n (stage, model) -> calls module on_dataloader hook (stage, model=model) -> calls module on_dataloader hook\n ' class TestModel(BoringModel): recorded_on_dataloader_calls = {} def on_train_dataloader(self) -> None: self.recorded_on_dataloader_calls[RunningStage.TRAINING] = True def on_val_dataloader(self) -> None: self.recorded_on_dataloader_calls[RunningStage.VALIDATING] = True def on_test_dataloader(self) -> None: self.recorded_on_dataloader_calls[RunningStage.TESTING] = True trainer = Trainer() model = TestModel() trainer.request_dataloader(stage, model) assert model.recorded_on_dataloader_calls[stage] model = TestModel() trainer.request_dataloader(stage, model=model) assert model.recorded_on_dataloader_calls[stage]
@pytest.mark.skip(reason='TODO: test can only be enabled once Lightning 1.5 is released.') @pytest.mark.parametrize('stage', [RunningStage.TRAINING, RunningStage.VALIDATING, RunningStage.TESTING]) def test_trainer_request_dataloaders(stage): 'Test to ensure that ``request_dataloaders`` can take a combination of arguments, for PL 1.5 and later.\n\n (stage, model) -> calls module on_dataloader hook (stage, model=model) -> calls module on_dataloader hook\n ' class TestModel(BoringModel): recorded_on_dataloader_calls = {} def on_train_dataloader(self) -> None: self.recorded_on_dataloader_calls[RunningStage.TRAINING] = True def on_val_dataloader(self) -> None: self.recorded_on_dataloader_calls[RunningStage.VALIDATING] = True def on_test_dataloader(self) -> None: self.recorded_on_dataloader_calls[RunningStage.TESTING] = True trainer = Trainer() model = TestModel() trainer.request_dataloader(stage, model) assert model.recorded_on_dataloader_calls[stage] model = TestModel() trainer.request_dataloader(stage, model=model) assert model.recorded_on_dataloader_calls[stage]<|docstring|>Test to ensure that ``request_dataloaders`` can take a combination of arguments, for PL 1.5 and later. (stage, model) -> calls module on_dataloader hook (stage, model=model) -> calls module on_dataloader hook<|endoftext|>
635176e5935aba6defa8d9336968d565bf85876c90b2ec83d617c0d5d317820b
@pytest.fixture def drf_client(): '\n Django Rest Framework APIClient instance. Adapted for DRF following\n `pytest_django.fixtures.rf` as a guide\n ' skip_if_no_django() from rest_framework.test import APIClient return APIClient()
Django Rest Framework APIClient instance. Adapted for DRF following `pytest_django.fixtures.rf` as a guide
tests/conftest.py
drf_client
yoyowallet/drf-integrations-framework
1
python
@pytest.fixture def drf_client(): '\n Django Rest Framework APIClient instance. Adapted for DRF following\n `pytest_django.fixtures.rf` as a guide\n ' skip_if_no_django() from rest_framework.test import APIClient return APIClient()
@pytest.fixture def drf_client(): '\n Django Rest Framework APIClient instance. Adapted for DRF following\n `pytest_django.fixtures.rf` as a guide\n ' skip_if_no_django() from rest_framework.test import APIClient return APIClient()<|docstring|>Django Rest Framework APIClient instance. Adapted for DRF following `pytest_django.fixtures.rf` as a guide<|endoftext|>
0650bf42c88ca3aba6029315566493ec8cb01ffb5deabb4f18ddb8126a07b96c
def make_measurement(self, data, index): 'Function describing how the measurement algorithm is run.\n\n Args:\n data (dict): Output generated by btk.draw_blends containing blended\n images, isolated images, observing conditions and\n blend catalog, for a given batch.\n index (int): Index number of blend scene in the batch to preform\n measurement on.\n\n Returns:\n output of measurement algorithm (fluxes, shapes, size, etc.) as\n an astropy catalog.\n ' return None
Function describing how the measurement algorithm is run. Args: data (dict): Output generated by btk.draw_blends containing blended images, isolated images, observing conditions and blend catalog, for a given batch. index (int): Index number of blend scene in the batch to preform measurement on. Returns: output of measurement algorithm (fluxes, shapes, size, etc.) as an astropy catalog.
btk/measure.py
make_measurement
mpaillassa/BlendingToolKit
0
python
def make_measurement(self, data, index): 'Function describing how the measurement algorithm is run.\n\n Args:\n data (dict): Output generated by btk.draw_blends containing blended\n images, isolated images, observing conditions and\n blend catalog, for a given batch.\n index (int): Index number of blend scene in the batch to preform\n measurement on.\n\n Returns:\n output of measurement algorithm (fluxes, shapes, size, etc.) as\n an astropy catalog.\n ' return None
def make_measurement(self, data, index): 'Function describing how the measurement algorithm is run.\n\n Args:\n data (dict): Output generated by btk.draw_blends containing blended\n images, isolated images, observing conditions and\n blend catalog, for a given batch.\n index (int): Index number of blend scene in the batch to preform\n measurement on.\n\n Returns:\n output of measurement algorithm (fluxes, shapes, size, etc.) as\n an astropy catalog.\n ' return None<|docstring|>Function describing how the measurement algorithm is run. Args: data (dict): Output generated by btk.draw_blends containing blended images, isolated images, observing conditions and blend catalog, for a given batch. index (int): Index number of blend scene in the batch to preform measurement on. Returns: output of measurement algorithm (fluxes, shapes, size, etc.) as an astropy catalog.<|endoftext|>
8fc8689785e283395ef298d0a5e64b305b89875931054ff2f3d9cc3ea6f8ad6b
def get_deblended_images(self, data, index): 'Function describing how the deblending algorithm is run.\n\n Args:\n data (dict): Output generated by btk.draw_blends containing blended\n images, isolated images, observing conditions and\n blend catalog, for a given batch.\n index (int): Index number of blend scene in the batch to preform\n measurement on.\n\n Returns:\n output of deblending algorithm as a dict.\n ' return None
Function describing how the deblending algorithm is run. Args: data (dict): Output generated by btk.draw_blends containing blended images, isolated images, observing conditions and blend catalog, for a given batch. index (int): Index number of blend scene in the batch to preform measurement on. Returns: output of deblending algorithm as a dict.
btk/measure.py
get_deblended_images
mpaillassa/BlendingToolKit
0
python
def get_deblended_images(self, data, index): 'Function describing how the deblending algorithm is run.\n\n Args:\n data (dict): Output generated by btk.draw_blends containing blended\n images, isolated images, observing conditions and\n blend catalog, for a given batch.\n index (int): Index number of blend scene in the batch to preform\n measurement on.\n\n Returns:\n output of deblending algorithm as a dict.\n ' return None
def get_deblended_images(self, data, index): 'Function describing how the deblending algorithm is run.\n\n Args:\n data (dict): Output generated by btk.draw_blends containing blended\n images, isolated images, observing conditions and\n blend catalog, for a given batch.\n index (int): Index number of blend scene in the batch to preform\n measurement on.\n\n Returns:\n output of deblending algorithm as a dict.\n ' return None<|docstring|>Function describing how the deblending algorithm is run. Args: data (dict): Output generated by btk.draw_blends containing blended images, isolated images, observing conditions and blend catalog, for a given batch. index (int): Index number of blend scene in the batch to preform measurement on. Returns: output of deblending algorithm as a dict.<|endoftext|>
ce7f7f5f1dd38f51067baf8ccdf9361300ab5d65c785fa8cc23f50e5893e39d6
@staticmethod def get_centers(image): 'Return centers detected when object detection is performed on the\n input image with skimage.feature.peak_local_max.\n\n Args:\n image (np.ndarray): Image (single band) of galaxy to perform measurement\n\n Returns:\n centers: x and y coordinates of detected centroids\n ' threshold = (5 * np.std(image)) coordinates = peak_local_max(image, min_distance=2, threshold_abs=threshold) return np.stack((coordinates[(:, 1)], coordinates[(:, 0)]), axis=1)
Return centers detected when object detection is performed on the input image with skimage.feature.peak_local_max. Args: image (np.ndarray): Image (single band) of galaxy to perform measurement Returns: centers: x and y coordinates of detected centroids
btk/measure.py
get_centers
mpaillassa/BlendingToolKit
0
python
@staticmethod def get_centers(image): 'Return centers detected when object detection is performed on the\n input image with skimage.feature.peak_local_max.\n\n Args:\n image (np.ndarray): Image (single band) of galaxy to perform measurement\n\n Returns:\n centers: x and y coordinates of detected centroids\n ' threshold = (5 * np.std(image)) coordinates = peak_local_max(image, min_distance=2, threshold_abs=threshold) return np.stack((coordinates[(:, 1)], coordinates[(:, 0)]), axis=1)
@staticmethod def get_centers(image): 'Return centers detected when object detection is performed on the\n input image with skimage.feature.peak_local_max.\n\n Args:\n image (np.ndarray): Image (single band) of galaxy to perform measurement\n\n Returns:\n centers: x and y coordinates of detected centroids\n ' threshold = (5 * np.std(image)) coordinates = peak_local_max(image, min_distance=2, threshold_abs=threshold) return np.stack((coordinates[(:, 1)], coordinates[(:, 0)]), axis=1)<|docstring|>Return centers detected when object detection is performed on the input image with skimage.feature.peak_local_max. Args: image (np.ndarray): Image (single band) of galaxy to perform measurement Returns: centers: x and y coordinates of detected centroids<|endoftext|>
cb38e70f18e0b1060c0ab05f90375fc5c30917b4ee9de30071fb8a15848fc97b
def get_deblended_images(self, data, index): 'Returns scarlet modeled blend and centers for the given blend' image = np.mean(data['blend_images'][index], axis=2) peaks = self.get_centers(image) return {'deblend_image': None, 'peaks': peaks}
Returns scarlet modeled blend and centers for the given blend
btk/measure.py
get_deblended_images
mpaillassa/BlendingToolKit
0
python
def get_deblended_images(self, data, index): image = np.mean(data['blend_images'][index], axis=2) peaks = self.get_centers(image) return {'deblend_image': None, 'peaks': peaks}
def get_deblended_images(self, data, index): image = np.mean(data['blend_images'][index], axis=2) peaks = self.get_centers(image) return {'deblend_image': None, 'peaks': peaks}<|docstring|>Returns scarlet modeled blend and centers for the given blend<|endoftext|>
3b8c59f687e96e24ce96fc710d2d5cbfe36d5ef34577f624c01ad1963f500fad
def get_centers(self, image): 'Return centers detected when object detection and photometry\n is done on input image with SEP.\n It also initializes the self.catalog and self.segmentation attributes\n of the class object.\n Args:\n image: Image (single band) of galaxy to perform measurement on.\n Returns:\n centers: x and y coordinates of detected centroids\n ' bkg = sep.Background(image) (self.catalog, self.segmentation) = sep.extract(image, 1.5, err=bkg.globalrms, segmentation_map=True) centers = np.stack((self.catalog['x'], self.catalog['y']), axis=1) return centers
Return centers detected when object detection and photometry is done on input image with SEP. It also initializes the self.catalog and self.segmentation attributes of the class object. Args: image: Image (single band) of galaxy to perform measurement on. Returns: centers: x and y coordinates of detected centroids
btk/measure.py
get_centers
mpaillassa/BlendingToolKit
0
python
def get_centers(self, image): 'Return centers detected when object detection and photometry\n is done on input image with SEP.\n It also initializes the self.catalog and self.segmentation attributes\n of the class object.\n Args:\n image: Image (single band) of galaxy to perform measurement on.\n Returns:\n centers: x and y coordinates of detected centroids\n ' bkg = sep.Background(image) (self.catalog, self.segmentation) = sep.extract(image, 1.5, err=bkg.globalrms, segmentation_map=True) centers = np.stack((self.catalog['x'], self.catalog['y']), axis=1) return centers
def get_centers(self, image): 'Return centers detected when object detection and photometry\n is done on input image with SEP.\n It also initializes the self.catalog and self.segmentation attributes\n of the class object.\n Args:\n image: Image (single band) of galaxy to perform measurement on.\n Returns:\n centers: x and y coordinates of detected centroids\n ' bkg = sep.Background(image) (self.catalog, self.segmentation) = sep.extract(image, 1.5, err=bkg.globalrms, segmentation_map=True) centers = np.stack((self.catalog['x'], self.catalog['y']), axis=1) return centers<|docstring|>Return centers detected when object detection and photometry is done on input image with SEP. It also initializes the self.catalog and self.segmentation attributes of the class object. Args: image: Image (single band) of galaxy to perform measurement on. Returns: centers: x and y coordinates of detected centroids<|endoftext|>
fc101baa26be76f2e5b8d85053590f58a336e6b55fcbdd7a0830f5dd15a0b5cb
def get_deblended_images(self, data, index): 'Performs SEP detection on the band-coadd image and returns the\n detected peaks.\n Args:\n data (dict): Output generated by btk.draw_blends containing blended\n images, isolated images, observing conditions and blend\n catalog, for a given batch.\n index (int): Index number of blend scene in the batch to preform\n measurement on.\n Returns:\n dict with the centers of sources detected by SEP detection\n algorithm.\n ' image = np.mean(data['blend_images'][index], axis=2) peaks = self.get_centers(image) return {'deblend_image': None, 'peaks': peaks}
Performs SEP detection on the band-coadd image and returns the detected peaks. Args: data (dict): Output generated by btk.draw_blends containing blended images, isolated images, observing conditions and blend catalog, for a given batch. index (int): Index number of blend scene in the batch to preform measurement on. Returns: dict with the centers of sources detected by SEP detection algorithm.
btk/measure.py
get_deblended_images
mpaillassa/BlendingToolKit
0
python
def get_deblended_images(self, data, index): 'Performs SEP detection on the band-coadd image and returns the\n detected peaks.\n Args:\n data (dict): Output generated by btk.draw_blends containing blended\n images, isolated images, observing conditions and blend\n catalog, for a given batch.\n index (int): Index number of blend scene in the batch to preform\n measurement on.\n Returns:\n dict with the centers of sources detected by SEP detection\n algorithm.\n ' image = np.mean(data['blend_images'][index], axis=2) peaks = self.get_centers(image) return {'deblend_image': None, 'peaks': peaks}
def get_deblended_images(self, data, index): 'Performs SEP detection on the band-coadd image and returns the\n detected peaks.\n Args:\n data (dict): Output generated by btk.draw_blends containing blended\n images, isolated images, observing conditions and blend\n catalog, for a given batch.\n index (int): Index number of blend scene in the batch to preform\n measurement on.\n Returns:\n dict with the centers of sources detected by SEP detection\n algorithm.\n ' image = np.mean(data['blend_images'][index], axis=2) peaks = self.get_centers(image) return {'deblend_image': None, 'peaks': peaks}<|docstring|>Performs SEP detection on the band-coadd image and returns the detected peaks. Args: data (dict): Output generated by btk.draw_blends containing blended images, isolated images, observing conditions and blend catalog, for a given batch. index (int): Index number of blend scene in the batch to preform measurement on. Returns: dict with the centers of sources detected by SEP detection algorithm.<|endoftext|>
2f6d1966edfc41817e5eed803048e69e548d21dcf210fd8e067060d25a48063f
def __init__(self, measurement_params, draw_blend_generator, multiprocessing=False, cpus=1, verbose=False): 'Generates output of deblender and measurement algorithm.\n\n Args:\n measurement_params: Instance from class\n `btk.measure.Measurement_params`.\n draw_blend_generator: Generator that outputs dict with blended images,\n isolated images, observing conditions and blend\n catalog.\n multiprocessing: If true performs multiprocessing of measurement.\n cpus: If multiprocessing is True, then number of parallel processes to\n run [Default :1].\n ' self.measurement_params = measurement_params self.draw_blend_generator = draw_blend_generator self.multiprocessing = multiprocessing self.cpus = cpus self.batch_size = self.draw_blend_generator.batch_size self.verbose = verbose
Generates output of deblender and measurement algorithm. Args: measurement_params: Instance from class `btk.measure.Measurement_params`. draw_blend_generator: Generator that outputs dict with blended images, isolated images, observing conditions and blend catalog. multiprocessing: If true performs multiprocessing of measurement. cpus: If multiprocessing is True, then number of parallel processes to run [Default :1].
btk/measure.py
__init__
mpaillassa/BlendingToolKit
0
python
def __init__(self, measurement_params, draw_blend_generator, multiprocessing=False, cpus=1, verbose=False): 'Generates output of deblender and measurement algorithm.\n\n Args:\n measurement_params: Instance from class\n `btk.measure.Measurement_params`.\n draw_blend_generator: Generator that outputs dict with blended images,\n isolated images, observing conditions and blend\n catalog.\n multiprocessing: If true performs multiprocessing of measurement.\n cpus: If multiprocessing is True, then number of parallel processes to\n run [Default :1].\n ' self.measurement_params = measurement_params self.draw_blend_generator = draw_blend_generator self.multiprocessing = multiprocessing self.cpus = cpus self.batch_size = self.draw_blend_generator.batch_size self.verbose = verbose
def __init__(self, measurement_params, draw_blend_generator, multiprocessing=False, cpus=1, verbose=False): 'Generates output of deblender and measurement algorithm.\n\n Args:\n measurement_params: Instance from class\n `btk.measure.Measurement_params`.\n draw_blend_generator: Generator that outputs dict with blended images,\n isolated images, observing conditions and blend\n catalog.\n multiprocessing: If true performs multiprocessing of measurement.\n cpus: If multiprocessing is True, then number of parallel processes to\n run [Default :1].\n ' self.measurement_params = measurement_params self.draw_blend_generator = draw_blend_generator self.multiprocessing = multiprocessing self.cpus = cpus self.batch_size = self.draw_blend_generator.batch_size self.verbose = verbose<|docstring|>Generates output of deblender and measurement algorithm. Args: measurement_params: Instance from class `btk.measure.Measurement_params`. draw_blend_generator: Generator that outputs dict with blended images, isolated images, observing conditions and blend catalog. multiprocessing: If true performs multiprocessing of measurement. cpus: If multiprocessing is True, then number of parallel processes to run [Default :1].<|endoftext|>
3ce3fa98f1c5f478ee451cf43e9ebf97a7b531ec541dcbf18e8520e9264bd80d
def __next__(self): '\n Returns:\n draw_blend_generator output, deblender output and measurement output.\n ' blend_output = next(self.draw_blend_generator) deblend_results = {} measured_results = {} input_args = [(blend_output, i) for i in range(self.batch_size)] batch_results = multiprocess(self.run_batch, input_args, self.cpus, self.multiprocessing, self.verbose) for i in range(self.batch_size): deblend_results.update({i: batch_results[i][0]}) measured_results.update({i: batch_results[i][1]}) if self.verbose: print('Measurement performed on batch') return (blend_output, deblend_results, measured_results)
Returns: draw_blend_generator output, deblender output and measurement output.
btk/measure.py
__next__
mpaillassa/BlendingToolKit
0
python
def __next__(self): '\n Returns:\n draw_blend_generator output, deblender output and measurement output.\n ' blend_output = next(self.draw_blend_generator) deblend_results = {} measured_results = {} input_args = [(blend_output, i) for i in range(self.batch_size)] batch_results = multiprocess(self.run_batch, input_args, self.cpus, self.multiprocessing, self.verbose) for i in range(self.batch_size): deblend_results.update({i: batch_results[i][0]}) measured_results.update({i: batch_results[i][1]}) if self.verbose: print('Measurement performed on batch') return (blend_output, deblend_results, measured_results)
def __next__(self): '\n Returns:\n draw_blend_generator output, deblender output and measurement output.\n ' blend_output = next(self.draw_blend_generator) deblend_results = {} measured_results = {} input_args = [(blend_output, i) for i in range(self.batch_size)] batch_results = multiprocess(self.run_batch, input_args, self.cpus, self.multiprocessing, self.verbose) for i in range(self.batch_size): deblend_results.update({i: batch_results[i][0]}) measured_results.update({i: batch_results[i][1]}) if self.verbose: print('Measurement performed on batch') return (blend_output, deblend_results, measured_results)<|docstring|>Returns: draw_blend_generator output, deblender output and measurement output.<|endoftext|>
c034ce5d34e72aa5a475a4d31e2b073bbb2bdddbb90a5e876e1ea62f9bbf3f98
def set_global_assign_default(assign_number, current_state, global_defaults, source, mode, target, params, initial=False, force=False): "\n * Load currently used global defaults from global default file:\n * global_defaults = Patch(**global_defaults_file)\n * Apply changes to default (and validate that this doesn't overwrite existing defaults):\n call updated = global_defaults.update(changes)\n * Load patches from backup file + parse raw patches:\n * for each patch, call merged = updated.update(**patch)\n * save patches to new backup file\n " current_global_defaults = data_models.Patch(**global_defaults) current_assign_state = current_global_defaults.get_assign(assign_number) default_assign_state = data_models.DEFAULT_PATCH.get_assign(assign_number) if ((current_assign_state != default_assign_state) and (not force)): raise errors.OverridesDefault(f'Assign {assign_number} already has a default set.') updated_defaults = current_global_defaults.update(build_assign_payload(assign_number, source, mode, target, params)) mask_base = (data_models.DEFAULT_PATCH if initial else current_global_defaults) masks = [mask_base.mask(patch) for patch in current_state] new_base_patch = data_models.DEFAULT_PATCH.update(asdict(updated_defaults)) return ([new_base_patch.update(mask) for mask in masks], updated_defaults)
* Load currently used global defaults from global default file: * global_defaults = Patch(**global_defaults_file) * Apply changes to default (and validate that this doesn't overwrite existing defaults): call updated = global_defaults.update(changes) * Load patches from backup file + parse raw patches: * for each patch, call merged = updated.update(**patch) * save patches to new backup file
bulk_editor/assign.py
set_global_assign_default
qckpckt/es8-bulk-editor
2
python
def set_global_assign_default(assign_number, current_state, global_defaults, source, mode, target, params, initial=False, force=False): "\n * Load currently used global defaults from global default file:\n * global_defaults = Patch(**global_defaults_file)\n * Apply changes to default (and validate that this doesn't overwrite existing defaults):\n call updated = global_defaults.update(changes)\n * Load patches from backup file + parse raw patches:\n * for each patch, call merged = updated.update(**patch)\n * save patches to new backup file\n " current_global_defaults = data_models.Patch(**global_defaults) current_assign_state = current_global_defaults.get_assign(assign_number) default_assign_state = data_models.DEFAULT_PATCH.get_assign(assign_number) if ((current_assign_state != default_assign_state) and (not force)): raise errors.OverridesDefault(f'Assign {assign_number} already has a default set.') updated_defaults = current_global_defaults.update(build_assign_payload(assign_number, source, mode, target, params)) mask_base = (data_models.DEFAULT_PATCH if initial else current_global_defaults) masks = [mask_base.mask(patch) for patch in current_state] new_base_patch = data_models.DEFAULT_PATCH.update(asdict(updated_defaults)) return ([new_base_patch.update(mask) for mask in masks], updated_defaults)
def set_global_assign_default(assign_number, current_state, global_defaults, source, mode, target, params, initial=False, force=False): "\n * Load currently used global defaults from global default file:\n * global_defaults = Patch(**global_defaults_file)\n * Apply changes to default (and validate that this doesn't overwrite existing defaults):\n call updated = global_defaults.update(changes)\n * Load patches from backup file + parse raw patches:\n * for each patch, call merged = updated.update(**patch)\n * save patches to new backup file\n " current_global_defaults = data_models.Patch(**global_defaults) current_assign_state = current_global_defaults.get_assign(assign_number) default_assign_state = data_models.DEFAULT_PATCH.get_assign(assign_number) if ((current_assign_state != default_assign_state) and (not force)): raise errors.OverridesDefault(f'Assign {assign_number} already has a default set.') updated_defaults = current_global_defaults.update(build_assign_payload(assign_number, source, mode, target, params)) mask_base = (data_models.DEFAULT_PATCH if initial else current_global_defaults) masks = [mask_base.mask(patch) for patch in current_state] new_base_patch = data_models.DEFAULT_PATCH.update(asdict(updated_defaults)) return ([new_base_patch.update(mask) for mask in masks], updated_defaults)<|docstring|>* Load currently used global defaults from global default file: * global_defaults = Patch(**global_defaults_file) * Apply changes to default (and validate that this doesn't overwrite existing defaults): call updated = global_defaults.update(changes) * Load patches from backup file + parse raw patches: * for each patch, call merged = updated.update(**patch) * save patches to new backup file<|endoftext|>
140b68360877dc3c6f17d7baabfb131411b3ae57988b4f52e56cf88b8235f2fe
def generate_header(build_type): 'Return a C/C++ header for the given build type.\n\n Args:\n build_type: The build type definition to use.\n\n Returns:\n A string containing the C/C++ header file.\n ' return BUILD_TYPE_TEMPLATE.format(build_type=build_type)
Return a C/C++ header for the given build type. Args: build_type: The build type definition to use. Returns: A string containing the C/C++ header file.
build_type_header.py
generate_header
DellaBitta/firebase-cpp-sdk
1
python
def generate_header(build_type): 'Return a C/C++ header for the given build type.\n\n Args:\n build_type: The build type definition to use.\n\n Returns:\n A string containing the C/C++ header file.\n ' return BUILD_TYPE_TEMPLATE.format(build_type=build_type)
def generate_header(build_type): 'Return a C/C++ header for the given build type.\n\n Args:\n build_type: The build type definition to use.\n\n Returns:\n A string containing the C/C++ header file.\n ' return BUILD_TYPE_TEMPLATE.format(build_type=build_type)<|docstring|>Return a C/C++ header for the given build type. Args: build_type: The build type definition to use. Returns: A string containing the C/C++ header file.<|endoftext|>
bc79fb86468a81a567027fd4e65fd52bb30cc5ede949e0914c719ca04bac3d37
def read_us_election_corpus(): '\n Function to read US election debate text and annotations. Conducts sanity\n check on text vs. annotations to ensure data makes sense.\n\n Returns:\n raw (list[str]): raw text in corpus\n ann (list[str]): annotations in corpus\n ' files_raw = glob('./data/USElectionDebates/*.txt') indices = [int(re.sub('.*\\/(\\d+)_(\\d+).*', '\\g<1>', File)) for File in files_raw] files_raw = [f for (i, f) in sorted(zip(indices, files_raw))] files_ann = glob('./data/USElectionDebates/*.ann') indices = [int(re.sub('.*\\/(\\d+)_(\\d+).*', '\\g<1>', File)) for File in files_ann] files_ann = [f for (i, f) in sorted(zip(indices, files_ann))] raw = [] ann = [] logger.info('Reading raw corpus files') for File in tqdm(files_raw): with codecs.open(File, 'r', encoding='utf-8') as f: raw.append(f.read()) logger.info('Reading corpus annotations') for (i, File) in tqdm(enumerate(files_ann), total=len(files_ann)): with codecs.open(File, 'r', encoding='utf-8') as f: ann_data = f.readlines() for annotation in ann_data: hold = annotation.replace('\n', '').split('\t') split = re.split('\\s+|\\;', hold[1]) spans = [int(el) for el in split[1:]] spans = list(zip(*((iter(spans),) * 2))) assert (' '.join((raw[i][pair[0]:pair[1]] for pair in spans)) == hold[2]) ann.append([i, hold[0], split[0], spans, hold[2]]) return (raw, ann)
Function to read US election debate text and annotations. Conducts sanity check on text vs. annotations to ensure data makes sense. Returns: raw (list[str]): raw text in corpus ann (list[str]): annotations in corpus
pre_process_USElectionDebates.py
read_us_election_corpus
atreyasha/sentiment-argument-mining
7
python
def read_us_election_corpus(): '\n Function to read US election debate text and annotations. Conducts sanity\n check on text vs. annotations to ensure data makes sense.\n\n Returns:\n raw (list[str]): raw text in corpus\n ann (list[str]): annotations in corpus\n ' files_raw = glob('./data/USElectionDebates/*.txt') indices = [int(re.sub('.*\\/(\\d+)_(\\d+).*', '\\g<1>', File)) for File in files_raw] files_raw = [f for (i, f) in sorted(zip(indices, files_raw))] files_ann = glob('./data/USElectionDebates/*.ann') indices = [int(re.sub('.*\\/(\\d+)_(\\d+).*', '\\g<1>', File)) for File in files_ann] files_ann = [f for (i, f) in sorted(zip(indices, files_ann))] raw = [] ann = [] logger.info('Reading raw corpus files') for File in tqdm(files_raw): with codecs.open(File, 'r', encoding='utf-8') as f: raw.append(f.read()) logger.info('Reading corpus annotations') for (i, File) in tqdm(enumerate(files_ann), total=len(files_ann)): with codecs.open(File, 'r', encoding='utf-8') as f: ann_data = f.readlines() for annotation in ann_data: hold = annotation.replace('\n', ).split('\t') split = re.split('\\s+|\\;', hold[1]) spans = [int(el) for el in split[1:]] spans = list(zip(*((iter(spans),) * 2))) assert (' '.join((raw[i][pair[0]:pair[1]] for pair in spans)) == hold[2]) ann.append([i, hold[0], split[0], spans, hold[2]]) return (raw, ann)
def read_us_election_corpus(): '\n Function to read US election debate text and annotations. Conducts sanity\n check on text vs. annotations to ensure data makes sense.\n\n Returns:\n raw (list[str]): raw text in corpus\n ann (list[str]): annotations in corpus\n ' files_raw = glob('./data/USElectionDebates/*.txt') indices = [int(re.sub('.*\\/(\\d+)_(\\d+).*', '\\g<1>', File)) for File in files_raw] files_raw = [f for (i, f) in sorted(zip(indices, files_raw))] files_ann = glob('./data/USElectionDebates/*.ann') indices = [int(re.sub('.*\\/(\\d+)_(\\d+).*', '\\g<1>', File)) for File in files_ann] files_ann = [f for (i, f) in sorted(zip(indices, files_ann))] raw = [] ann = [] logger.info('Reading raw corpus files') for File in tqdm(files_raw): with codecs.open(File, 'r', encoding='utf-8') as f: raw.append(f.read()) logger.info('Reading corpus annotations') for (i, File) in tqdm(enumerate(files_ann), total=len(files_ann)): with codecs.open(File, 'r', encoding='utf-8') as f: ann_data = f.readlines() for annotation in ann_data: hold = annotation.replace('\n', ).split('\t') split = re.split('\\s+|\\;', hold[1]) spans = [int(el) for el in split[1:]] spans = list(zip(*((iter(spans),) * 2))) assert (' '.join((raw[i][pair[0]:pair[1]] for pair in spans)) == hold[2]) ann.append([i, hold[0], split[0], spans, hold[2]]) return (raw, ann)<|docstring|>Function to read US election debate text and annotations. Conducts sanity check on text vs. annotations to ensure data makes sense. Returns: raw (list[str]): raw text in corpus ann (list[str]): annotations in corpus<|endoftext|>
2f15ae6d4cb610323a4d5a77d8a60b52cd5d9a23c544827edd888e7e32e8e80a
def char_tag(corpus, spaces=False): '\n Function to convert raw US election debate text\n and annotations into tagged character sequence\n\n Args:\n corpus (list[str],list[str]): output of "read_us_election_corpus"\n spaces (bool): True if spaces should be marked, False if\n they should be marked same as span\n\n Returns:\n (list[str]): each component contains annotated characters\n ' tagged = [] logger.info('Tagging void argument cases') for (i, raw) in enumerate(tqdm(corpus[0])): char_raw = list(raw) for (j, char) in enumerate(char_raw): if spaces: if (char not in [' ', '\n', '\r']): char_raw[j] = 'N' elif (char == ' '): char_raw[j] = 'S' elif (char not in ['\n', '\r']): char_raw[j] = 'N' tagged.append(char_raw) logger.info('Tagging claims and premises') for i in tqdm(range(len(tagged))): for annotation in corpus[1]: if (annotation[0] == i): ann_type = annotation[2] spans = annotation[3] for (z, pair) in enumerate(spans): for j in range(pair[0], pair[1]): char = tagged[i][j] if spaces: if (char not in ['S', '\n', '\r']): if (ann_type == 'Claim'): tagged[i][j] = 'C' elif (ann_type == 'Premise'): tagged[i][j] = 'P' elif (char not in ['\n', '\r']): if (ann_type == 'Claim'): tagged[i][j] = 'C' elif (ann_type == 'Premise'): tagged[i][j] = 'P' logger.info('Returning final object') return [''.join((char for char in segment)) for segment in tqdm(tagged)]
Function to convert raw US election debate text and annotations into tagged character sequence Args: corpus (list[str],list[str]): output of "read_us_election_corpus" spaces (bool): True if spaces should be marked, False if they should be marked same as span Returns: (list[str]): each component contains annotated characters
pre_process_USElectionDebates.py
char_tag
atreyasha/sentiment-argument-mining
7
python
def char_tag(corpus, spaces=False): '\n Function to convert raw US election debate text\n and annotations into tagged character sequence\n\n Args:\n corpus (list[str],list[str]): output of "read_us_election_corpus"\n spaces (bool): True if spaces should be marked, False if\n they should be marked same as span\n\n Returns:\n (list[str]): each component contains annotated characters\n ' tagged = [] logger.info('Tagging void argument cases') for (i, raw) in enumerate(tqdm(corpus[0])): char_raw = list(raw) for (j, char) in enumerate(char_raw): if spaces: if (char not in [' ', '\n', '\r']): char_raw[j] = 'N' elif (char == ' '): char_raw[j] = 'S' elif (char not in ['\n', '\r']): char_raw[j] = 'N' tagged.append(char_raw) logger.info('Tagging claims and premises') for i in tqdm(range(len(tagged))): for annotation in corpus[1]: if (annotation[0] == i): ann_type = annotation[2] spans = annotation[3] for (z, pair) in enumerate(spans): for j in range(pair[0], pair[1]): char = tagged[i][j] if spaces: if (char not in ['S', '\n', '\r']): if (ann_type == 'Claim'): tagged[i][j] = 'C' elif (ann_type == 'Premise'): tagged[i][j] = 'P' elif (char not in ['\n', '\r']): if (ann_type == 'Claim'): tagged[i][j] = 'C' elif (ann_type == 'Premise'): tagged[i][j] = 'P' logger.info('Returning final object') return [.join((char for char in segment)) for segment in tqdm(tagged)]
def char_tag(corpus, spaces=False): '\n Function to convert raw US election debate text\n and annotations into tagged character sequence\n\n Args:\n corpus (list[str],list[str]): output of "read_us_election_corpus"\n spaces (bool): True if spaces should be marked, False if\n they should be marked same as span\n\n Returns:\n (list[str]): each component contains annotated characters\n ' tagged = [] logger.info('Tagging void argument cases') for (i, raw) in enumerate(tqdm(corpus[0])): char_raw = list(raw) for (j, char) in enumerate(char_raw): if spaces: if (char not in [' ', '\n', '\r']): char_raw[j] = 'N' elif (char == ' '): char_raw[j] = 'S' elif (char not in ['\n', '\r']): char_raw[j] = 'N' tagged.append(char_raw) logger.info('Tagging claims and premises') for i in tqdm(range(len(tagged))): for annotation in corpus[1]: if (annotation[0] == i): ann_type = annotation[2] spans = annotation[3] for (z, pair) in enumerate(spans): for j in range(pair[0], pair[1]): char = tagged[i][j] if spaces: if (char not in ['S', '\n', '\r']): if (ann_type == 'Claim'): tagged[i][j] = 'C' elif (ann_type == 'Premise'): tagged[i][j] = 'P' elif (char not in ['\n', '\r']): if (ann_type == 'Claim'): tagged[i][j] = 'C' elif (ann_type == 'Premise'): tagged[i][j] = 'P' logger.info('Returning final object') return [.join((char for char in segment)) for segment in tqdm(tagged)]<|docstring|>Function to convert raw US election debate text and annotations into tagged character sequence Args: corpus (list[str],list[str]): output of "read_us_election_corpus" spaces (bool): True if spaces should be marked, False if they should be marked same as span Returns: (list[str]): each component contains annotated characters<|endoftext|>
abfb53e918548a92342d30ba89365c074fe867adbd0911f933281a8ca12da225
def flatten(char_sequences, indices=False): '\n Function to split and flatten character sequences\n\n Args:\n char_sequences (list[str]): character sequences\n indices (bool): True to return a list of indices\n\n Returns:\n flat (list[str]): flattened arguments character sequences\n indices (list[int]): optional list of indices\n ' flat = [] if indices: indices = [] for (i, speech) in enumerate(char_sequences): split = re.split('\\r\\n|\\n|\\r|\\n\\r', speech) for (j, segment) in enumerate(split): if (segment != ''): flat.append(segment) indices.append([i, j]) return (indices, flat) else: for speech in char_sequences: split = re.split('\\r\\n|\\n|\\r|\\n\\r', speech) for segment in split: if (segment != ''): flat.append(segment) return flat
Function to split and flatten character sequences Args: char_sequences (list[str]): character sequences indices (bool): True to return a list of indices Returns: flat (list[str]): flattened arguments character sequences indices (list[int]): optional list of indices
pre_process_USElectionDebates.py
flatten
atreyasha/sentiment-argument-mining
7
python
def flatten(char_sequences, indices=False): '\n Function to split and flatten character sequences\n\n Args:\n char_sequences (list[str]): character sequences\n indices (bool): True to return a list of indices\n\n Returns:\n flat (list[str]): flattened arguments character sequences\n indices (list[int]): optional list of indices\n ' flat = [] if indices: indices = [] for (i, speech) in enumerate(char_sequences): split = re.split('\\r\\n|\\n|\\r|\\n\\r', speech) for (j, segment) in enumerate(split): if (segment != ): flat.append(segment) indices.append([i, j]) return (indices, flat) else: for speech in char_sequences: split = re.split('\\r\\n|\\n|\\r|\\n\\r', speech) for segment in split: if (segment != ): flat.append(segment) return flat
def flatten(char_sequences, indices=False): '\n Function to split and flatten character sequences\n\n Args:\n char_sequences (list[str]): character sequences\n indices (bool): True to return a list of indices\n\n Returns:\n flat (list[str]): flattened arguments character sequences\n indices (list[int]): optional list of indices\n ' flat = [] if indices: indices = [] for (i, speech) in enumerate(char_sequences): split = re.split('\\r\\n|\\n|\\r|\\n\\r', speech) for (j, segment) in enumerate(split): if (segment != ): flat.append(segment) indices.append([i, j]) return (indices, flat) else: for speech in char_sequences: split = re.split('\\r\\n|\\n|\\r|\\n\\r', speech) for segment in split: if (segment != ): flat.append(segment) return flat<|docstring|>Function to split and flatten character sequences Args: char_sequences (list[str]): character sequences indices (bool): True to return a list of indices Returns: flat (list[str]): flattened arguments character sequences indices (list[int]): optional list of indices<|endoftext|>
806aa9a5d6701afedbb450480edb3b2c9a36fef2b45235dbb486fc6e14b71b4d
def correct_periods(flat_text, flat_ann, spaces=False): '\n Function to add spaces where incorrect periods are present\n\n Args:\n flat_text (list[str]): character sequences for raw rext from "flatten"\n flat_ann (list[str]): character sequences for tagged text from "flatten"\n spaces (bool): True if spaces are to be annotated, False if not\n\n Returns:\n flat_text (list[str]): corrected version of flat_text\n flat_ann (list[str]): corrected version of flat_ann\n ' for i in range(len(flat_text)): run = True while run: match = re.search('[a-z]\\.[A-Z]', flat_text[i]) if (match == None): run = False else: flat_text[i] = ((flat_text[i][:(match.end() - 1)] + ' ') + flat_text[i][(match.end() - 1):]) if spaces: flat_ann[i] = ((flat_ann[i][:(match.end() - 1)] + 'S') + flat_ann[i][(match.end() - 1):]) else: forward_ann = flat_ann[i][(match.end() - 1)] flat_ann[i] = ((flat_ann[i][:(match.end() - 1)] + forward_ann) + flat_ann[i][(match.end() - 1):]) return (flat_text, flat_ann)
Function to add spaces where incorrect periods are present Args: flat_text (list[str]): character sequences for raw rext from "flatten" flat_ann (list[str]): character sequences for tagged text from "flatten" spaces (bool): True if spaces are to be annotated, False if not Returns: flat_text (list[str]): corrected version of flat_text flat_ann (list[str]): corrected version of flat_ann
pre_process_USElectionDebates.py
correct_periods
atreyasha/sentiment-argument-mining
7
python
def correct_periods(flat_text, flat_ann, spaces=False): '\n Function to add spaces where incorrect periods are present\n\n Args:\n flat_text (list[str]): character sequences for raw rext from "flatten"\n flat_ann (list[str]): character sequences for tagged text from "flatten"\n spaces (bool): True if spaces are to be annotated, False if not\n\n Returns:\n flat_text (list[str]): corrected version of flat_text\n flat_ann (list[str]): corrected version of flat_ann\n ' for i in range(len(flat_text)): run = True while run: match = re.search('[a-z]\\.[A-Z]', flat_text[i]) if (match == None): run = False else: flat_text[i] = ((flat_text[i][:(match.end() - 1)] + ' ') + flat_text[i][(match.end() - 1):]) if spaces: flat_ann[i] = ((flat_ann[i][:(match.end() - 1)] + 'S') + flat_ann[i][(match.end() - 1):]) else: forward_ann = flat_ann[i][(match.end() - 1)] flat_ann[i] = ((flat_ann[i][:(match.end() - 1)] + forward_ann) + flat_ann[i][(match.end() - 1):]) return (flat_text, flat_ann)
def correct_periods(flat_text, flat_ann, spaces=False): '\n Function to add spaces where incorrect periods are present\n\n Args:\n flat_text (list[str]): character sequences for raw rext from "flatten"\n flat_ann (list[str]): character sequences for tagged text from "flatten"\n spaces (bool): True if spaces are to be annotated, False if not\n\n Returns:\n flat_text (list[str]): corrected version of flat_text\n flat_ann (list[str]): corrected version of flat_ann\n ' for i in range(len(flat_text)): run = True while run: match = re.search('[a-z]\\.[A-Z]', flat_text[i]) if (match == None): run = False else: flat_text[i] = ((flat_text[i][:(match.end() - 1)] + ' ') + flat_text[i][(match.end() - 1):]) if spaces: flat_ann[i] = ((flat_ann[i][:(match.end() - 1)] + 'S') + flat_ann[i][(match.end() - 1):]) else: forward_ann = flat_ann[i][(match.end() - 1)] flat_ann[i] = ((flat_ann[i][:(match.end() - 1)] + forward_ann) + flat_ann[i][(match.end() - 1):]) return (flat_text, flat_ann)<|docstring|>Function to add spaces where incorrect periods are present Args: flat_text (list[str]): character sequences for raw rext from "flatten" flat_ann (list[str]): character sequences for tagged text from "flatten" spaces (bool): True if spaces are to be annotated, False if not Returns: flat_text (list[str]): corrected version of flat_text flat_ann (list[str]): corrected version of flat_ann<|endoftext|>
9857cb4c0237f9991b1db1f12885403dd04fff1d5a7ee63c9af08928c9dc4b30
def tokenize(flat_text, flat_ann, Tokenizer): '\n Function to prune and tokenize corpus\n\n Args:\n flat_text (list[str]): character sequences for raw rext from "flatten"\n flat_ann (list[str]): character sequences for tagged text from "flatten"\n Tokenizer (bert.tokenization.albert_tokenization.FullTokenizer):\n tokenizer class for bert tokenizer\n\n Returns:\n split_combined_pruned (list[str]): pruned list of tokens and associated\n annotations\n ' split_combined = [] preprocess = bert.albert_tokenization.preprocess_text for i in range(len(flat_text)): split_text = [Tokenizer.tokenize(preprocess(el, lower=True)) for el in flat_text[i].split(' ')] split_ann = [(el, Counter(el)) for el in flat_ann[i].split('S')] assert (len(split_ann) == len(split_text)) split_combined.append(list(zip(split_text, split_ann))) split_combined_pruned = [] for segment in split_combined: temp = [] for token_set in segment: if (len(token_set[0]) > 0): most_common = token_set[1][1].most_common()[0][0] if (sum([len(token) for token in token_set[0]]) == len(token_set[1][0])): if (len(token_set[1][1]) == 1): for token in token_set[0]: temp.append([token, most_common]) else: count = 0 for token in token_set[0]: tag = Counter(token_set[1][0][count:(count + len(token))]) most_common_local = tag.most_common()[0][0] temp.append([token, most_common_local]) count += len(token) else: for token in token_set[0]: temp.append([token, most_common]) split_combined_pruned.append(temp) return split_combined_pruned
Function to prune and tokenize corpus Args: flat_text (list[str]): character sequences for raw rext from "flatten" flat_ann (list[str]): character sequences for tagged text from "flatten" Tokenizer (bert.tokenization.albert_tokenization.FullTokenizer): tokenizer class for bert tokenizer Returns: split_combined_pruned (list[str]): pruned list of tokens and associated annotations
pre_process_USElectionDebates.py
tokenize
atreyasha/sentiment-argument-mining
7
python
def tokenize(flat_text, flat_ann, Tokenizer): '\n Function to prune and tokenize corpus\n\n Args:\n flat_text (list[str]): character sequences for raw rext from "flatten"\n flat_ann (list[str]): character sequences for tagged text from "flatten"\n Tokenizer (bert.tokenization.albert_tokenization.FullTokenizer):\n tokenizer class for bert tokenizer\n\n Returns:\n split_combined_pruned (list[str]): pruned list of tokens and associated\n annotations\n ' split_combined = [] preprocess = bert.albert_tokenization.preprocess_text for i in range(len(flat_text)): split_text = [Tokenizer.tokenize(preprocess(el, lower=True)) for el in flat_text[i].split(' ')] split_ann = [(el, Counter(el)) for el in flat_ann[i].split('S')] assert (len(split_ann) == len(split_text)) split_combined.append(list(zip(split_text, split_ann))) split_combined_pruned = [] for segment in split_combined: temp = [] for token_set in segment: if (len(token_set[0]) > 0): most_common = token_set[1][1].most_common()[0][0] if (sum([len(token) for token in token_set[0]]) == len(token_set[1][0])): if (len(token_set[1][1]) == 1): for token in token_set[0]: temp.append([token, most_common]) else: count = 0 for token in token_set[0]: tag = Counter(token_set[1][0][count:(count + len(token))]) most_common_local = tag.most_common()[0][0] temp.append([token, most_common_local]) count += len(token) else: for token in token_set[0]: temp.append([token, most_common]) split_combined_pruned.append(temp) return split_combined_pruned
def tokenize(flat_text, flat_ann, Tokenizer): '\n Function to prune and tokenize corpus\n\n Args:\n flat_text (list[str]): character sequences for raw rext from "flatten"\n flat_ann (list[str]): character sequences for tagged text from "flatten"\n Tokenizer (bert.tokenization.albert_tokenization.FullTokenizer):\n tokenizer class for bert tokenizer\n\n Returns:\n split_combined_pruned (list[str]): pruned list of tokens and associated\n annotations\n ' split_combined = [] preprocess = bert.albert_tokenization.preprocess_text for i in range(len(flat_text)): split_text = [Tokenizer.tokenize(preprocess(el, lower=True)) for el in flat_text[i].split(' ')] split_ann = [(el, Counter(el)) for el in flat_ann[i].split('S')] assert (len(split_ann) == len(split_text)) split_combined.append(list(zip(split_text, split_ann))) split_combined_pruned = [] for segment in split_combined: temp = [] for token_set in segment: if (len(token_set[0]) > 0): most_common = token_set[1][1].most_common()[0][0] if (sum([len(token) for token in token_set[0]]) == len(token_set[1][0])): if (len(token_set[1][1]) == 1): for token in token_set[0]: temp.append([token, most_common]) else: count = 0 for token in token_set[0]: tag = Counter(token_set[1][0][count:(count + len(token))]) most_common_local = tag.most_common()[0][0] temp.append([token, most_common_local]) count += len(token) else: for token in token_set[0]: temp.append([token, most_common]) split_combined_pruned.append(temp) return split_combined_pruned<|docstring|>Function to prune and tokenize corpus Args: flat_text (list[str]): character sequences for raw rext from "flatten" flat_ann (list[str]): character sequences for tagged text from "flatten" Tokenizer (bert.tokenization.albert_tokenization.FullTokenizer): tokenizer class for bert tokenizer Returns: split_combined_pruned (list[str]): pruned list of tokens and associated annotations<|endoftext|>
2eb6722ea124d8270cb9aeb84af95daf750f4793869fa04d7b9270a033cdf5b7
def post_process(data): '\n Function to unzip tokenized data for output\n\n Args:\n data (list): zipped tokenized data\n\n Returns:\n token_list (list): unzipped tokenized data\n ' token_list = [] for (i, sent_set) in enumerate(data): tmp_sent = [] tmp_ann = [] for (j, sent) in enumerate(sent_set[1]): unzipped = list(zip(*sent)) tmp_sent.append(list(unzipped[0])) tmp_ann.append(list(unzipped[1])) token_list.append([data[i][0], tmp_sent, tmp_ann]) return token_list
Function to unzip tokenized data for output Args: data (list): zipped tokenized data Returns: token_list (list): unzipped tokenized data
pre_process_USElectionDebates.py
post_process
atreyasha/sentiment-argument-mining
7
python
def post_process(data): '\n Function to unzip tokenized data for output\n\n Args:\n data (list): zipped tokenized data\n\n Returns:\n token_list (list): unzipped tokenized data\n ' token_list = [] for (i, sent_set) in enumerate(data): tmp_sent = [] tmp_ann = [] for (j, sent) in enumerate(sent_set[1]): unzipped = list(zip(*sent)) tmp_sent.append(list(unzipped[0])) tmp_ann.append(list(unzipped[1])) token_list.append([data[i][0], tmp_sent, tmp_ann]) return token_list
def post_process(data): '\n Function to unzip tokenized data for output\n\n Args:\n data (list): zipped tokenized data\n\n Returns:\n token_list (list): unzipped tokenized data\n ' token_list = [] for (i, sent_set) in enumerate(data): tmp_sent = [] tmp_ann = [] for (j, sent) in enumerate(sent_set[1]): unzipped = list(zip(*sent)) tmp_sent.append(list(unzipped[0])) tmp_ann.append(list(unzipped[1])) token_list.append([data[i][0], tmp_sent, tmp_ann]) return token_list<|docstring|>Function to unzip tokenized data for output Args: data (list): zipped tokenized data Returns: token_list (list): unzipped tokenized data<|endoftext|>
393f040fa677200089d3f9e84600adf7ea2f8541206ca0115c59a06eca0525be
def write_to_json(data, directory, name): '\n Function to write parsed text to JSON file\n\n Args:\n data (list): output from corpus2char\n directory (str): directory to store files\n name (str): name of file\n ' char_dict = {} for (i, j, text, ann) in data: if (i not in char_dict.keys()): char_dict[i] = {} char_dict[i][j] = {'text': text, 'ann': ann} with open(os.path.join(directory, name), 'w') as f: json.dump(char_dict, f)
Function to write parsed text to JSON file Args: data (list): output from corpus2char directory (str): directory to store files name (str): name of file
pre_process_USElectionDebates.py
write_to_json
atreyasha/sentiment-argument-mining
7
python
def write_to_json(data, directory, name): '\n Function to write parsed text to JSON file\n\n Args:\n data (list): output from corpus2char\n directory (str): directory to store files\n name (str): name of file\n ' char_dict = {} for (i, j, text, ann) in data: if (i not in char_dict.keys()): char_dict[i] = {} char_dict[i][j] = {'text': text, 'ann': ann} with open(os.path.join(directory, name), 'w') as f: json.dump(char_dict, f)
def write_to_json(data, directory, name): '\n Function to write parsed text to JSON file\n\n Args:\n data (list): output from corpus2char\n directory (str): directory to store files\n name (str): name of file\n ' char_dict = {} for (i, j, text, ann) in data: if (i not in char_dict.keys()): char_dict[i] = {} char_dict[i][j] = {'text': text, 'ann': ann} with open(os.path.join(directory, name), 'w') as f: json.dump(char_dict, f)<|docstring|>Function to write parsed text to JSON file Args: data (list): output from corpus2char directory (str): directory to store files name (str): name of file<|endoftext|>
5e86c0d50f1ca2f7e2268aa34abaff13917c9043396f45720e9f4b885779cdf9
def corpus2char(directory='./data/USElectionDebates/corpus/', spaces=True): '\n Function to convert US election corpus to character representation\n and save to json\n\n Args:\n directory (str): base file directory on which to store output\n spaces (bool): True to tag spaces as separate character\n ' corpus = read_us_election_corpus() tagged = char_tag(corpus, spaces=spaces) (indices, flat_text) = flatten(corpus[0], indices=True) flat_ann = flatten(tagged) assert (len(flat_text) == len(flat_ann)) (flat_text, flat_ann) = correct_periods(flat_text, flat_ann, spaces=spaces) corpus = [[indices[i][0], indices[i][1], text, flat_ann[i]] for (i, text) in enumerate(flat_text)] write_to_json(corpus, directory, 'corpus.json')
Function to convert US election corpus to character representation and save to json Args: directory (str): base file directory on which to store output spaces (bool): True to tag spaces as separate character
pre_process_USElectionDebates.py
corpus2char
atreyasha/sentiment-argument-mining
7
python
def corpus2char(directory='./data/USElectionDebates/corpus/', spaces=True): '\n Function to convert US election corpus to character representation\n and save to json\n\n Args:\n directory (str): base file directory on which to store output\n spaces (bool): True to tag spaces as separate character\n ' corpus = read_us_election_corpus() tagged = char_tag(corpus, spaces=spaces) (indices, flat_text) = flatten(corpus[0], indices=True) flat_ann = flatten(tagged) assert (len(flat_text) == len(flat_ann)) (flat_text, flat_ann) = correct_periods(flat_text, flat_ann, spaces=spaces) corpus = [[indices[i][0], indices[i][1], text, flat_ann[i]] for (i, text) in enumerate(flat_text)] write_to_json(corpus, directory, 'corpus.json')
def corpus2char(directory='./data/USElectionDebates/corpus/', spaces=True): '\n Function to convert US election corpus to character representation\n and save to json\n\n Args:\n directory (str): base file directory on which to store output\n spaces (bool): True to tag spaces as separate character\n ' corpus = read_us_election_corpus() tagged = char_tag(corpus, spaces=spaces) (indices, flat_text) = flatten(corpus[0], indices=True) flat_ann = flatten(tagged) assert (len(flat_text) == len(flat_ann)) (flat_text, flat_ann) = correct_periods(flat_text, flat_ann, spaces=spaces) corpus = [[indices[i][0], indices[i][1], text, flat_ann[i]] for (i, text) in enumerate(flat_text)] write_to_json(corpus, directory, 'corpus.json')<|docstring|>Function to convert US election corpus to character representation and save to json Args: directory (str): base file directory on which to store output spaces (bool): True to tag spaces as separate character<|endoftext|>
e4f9d4c172fa69c6c50efd269c323c513d0df18da921605135352a9a554c761a
def initialize_bert_tokenizer(): '\n Function to initialize the bert tokenizer\n\n Returns:\n Tokenizer (bert.tokenization.albert_tokenization.FullTokenizer)\n ' model_name = 'albert_base_v2' model_dir = bert.fetch_google_albert_model(model_name, '.models') spm = os.path.join(model_dir, '30k-clean.model') vocab = os.path.join(model_dir, '30k-clean.vocab') Tokenizer = bert.albert_tokenization.FullTokenizer(vocab, spm_model_file=spm) return Tokenizer
Function to initialize the bert tokenizer Returns: Tokenizer (bert.tokenization.albert_tokenization.FullTokenizer)
pre_process_USElectionDebates.py
initialize_bert_tokenizer
atreyasha/sentiment-argument-mining
7
python
def initialize_bert_tokenizer(): '\n Function to initialize the bert tokenizer\n\n Returns:\n Tokenizer (bert.tokenization.albert_tokenization.FullTokenizer)\n ' model_name = 'albert_base_v2' model_dir = bert.fetch_google_albert_model(model_name, '.models') spm = os.path.join(model_dir, '30k-clean.model') vocab = os.path.join(model_dir, '30k-clean.vocab') Tokenizer = bert.albert_tokenization.FullTokenizer(vocab, spm_model_file=spm) return Tokenizer
def initialize_bert_tokenizer(): '\n Function to initialize the bert tokenizer\n\n Returns:\n Tokenizer (bert.tokenization.albert_tokenization.FullTokenizer)\n ' model_name = 'albert_base_v2' model_dir = bert.fetch_google_albert_model(model_name, '.models') spm = os.path.join(model_dir, '30k-clean.model') vocab = os.path.join(model_dir, '30k-clean.vocab') Tokenizer = bert.albert_tokenization.FullTokenizer(vocab, spm_model_file=spm) return Tokenizer<|docstring|>Function to initialize the bert tokenizer Returns: Tokenizer (bert.tokenization.albert_tokenization.FullTokenizer)<|endoftext|>
6506b783822c4da453e79f897127b3f65acaabd7fa8504ee99361dcbf034e617
def project_to_ids_US(Tokenizer, train_data, label_id_map, max_seq_length=512): '\n Function to map data to indices in the albert vocabulary, as well as\n adding special bert tokens such as [CLS] and [SEP]\n\n Args:\n Tokenizer (bert.tokenization.albert_tokenization.FullTokenizer):\n tokenizer class for bert tokenizer\n train_data (list): input data containing albert tokens and label types\n label_id_map (dict): dictionary mapping label type to integer\n max_seq_length (int): maximum sequence length to be used in training\n\n Returns:\n (np.ndarray): input albert IDs\n (np.ndarray): output label IDs\n (np.ndarray): output mask indicating which token is relevant to outcome,\n this includes all corpus tokens and excludes all bert special tokens\n ' input_ids = [] label_ids = [] output_mask = [] for instance_set in tqdm(train_data): input_ids_sub = ['[CLS]'] label_ids_sub = ['[CLS]'] output_mask_sub = [0] for i in range(len(instance_set[1])): input_ids_sub.extend(instance_set[1][i]) label_ids_sub.extend(instance_set[2][i]) output_mask_sub.extend(([1] * len(instance_set[1][i]))) output_mask_sub.extend([0]) input_ids_sub.extend(['[SEP]']) label_ids_sub.extend(['[SEP]']) assert (len(input_ids_sub) == len(label_ids_sub) == len(output_mask_sub)) input_ids_sub.extend((['<pad>'] * (max_seq_length - len(input_ids_sub)))) label_ids_sub.extend((['<pad>'] * (max_seq_length - len(label_ids_sub)))) output_mask_sub.extend(([0] * (max_seq_length - len(output_mask_sub)))) assert (len(input_ids_sub) == len(label_ids_sub) == len(output_mask_sub) == max_seq_length) input_ids_sub = Tokenizer.convert_tokens_to_ids(input_ids_sub) label_ids_sub = [label_id_map[label] for label in label_ids_sub] input_ids.append(input_ids_sub) label_ids.append(label_ids_sub) output_mask.append(output_mask_sub) return (np.array(input_ids), np.array(label_ids), np.array(output_mask))
Function to map data to indices in the albert vocabulary, as well as adding special bert tokens such as [CLS] and [SEP] Args: Tokenizer (bert.tokenization.albert_tokenization.FullTokenizer): tokenizer class for bert tokenizer train_data (list): input data containing albert tokens and label types label_id_map (dict): dictionary mapping label type to integer max_seq_length (int): maximum sequence length to be used in training Returns: (np.ndarray): input albert IDs (np.ndarray): output label IDs (np.ndarray): output mask indicating which token is relevant to outcome, this includes all corpus tokens and excludes all bert special tokens
pre_process_USElectionDebates.py
project_to_ids_US
atreyasha/sentiment-argument-mining
7
python
def project_to_ids_US(Tokenizer, train_data, label_id_map, max_seq_length=512): '\n Function to map data to indices in the albert vocabulary, as well as\n adding special bert tokens such as [CLS] and [SEP]\n\n Args:\n Tokenizer (bert.tokenization.albert_tokenization.FullTokenizer):\n tokenizer class for bert tokenizer\n train_data (list): input data containing albert tokens and label types\n label_id_map (dict): dictionary mapping label type to integer\n max_seq_length (int): maximum sequence length to be used in training\n\n Returns:\n (np.ndarray): input albert IDs\n (np.ndarray): output label IDs\n (np.ndarray): output mask indicating which token is relevant to outcome,\n this includes all corpus tokens and excludes all bert special tokens\n ' input_ids = [] label_ids = [] output_mask = [] for instance_set in tqdm(train_data): input_ids_sub = ['[CLS]'] label_ids_sub = ['[CLS]'] output_mask_sub = [0] for i in range(len(instance_set[1])): input_ids_sub.extend(instance_set[1][i]) label_ids_sub.extend(instance_set[2][i]) output_mask_sub.extend(([1] * len(instance_set[1][i]))) output_mask_sub.extend([0]) input_ids_sub.extend(['[SEP]']) label_ids_sub.extend(['[SEP]']) assert (len(input_ids_sub) == len(label_ids_sub) == len(output_mask_sub)) input_ids_sub.extend((['<pad>'] * (max_seq_length - len(input_ids_sub)))) label_ids_sub.extend((['<pad>'] * (max_seq_length - len(label_ids_sub)))) output_mask_sub.extend(([0] * (max_seq_length - len(output_mask_sub)))) assert (len(input_ids_sub) == len(label_ids_sub) == len(output_mask_sub) == max_seq_length) input_ids_sub = Tokenizer.convert_tokens_to_ids(input_ids_sub) label_ids_sub = [label_id_map[label] for label in label_ids_sub] input_ids.append(input_ids_sub) label_ids.append(label_ids_sub) output_mask.append(output_mask_sub) return (np.array(input_ids), np.array(label_ids), np.array(output_mask))
def project_to_ids_US(Tokenizer, train_data, label_id_map, max_seq_length=512): '\n Function to map data to indices in the albert vocabulary, as well as\n adding special bert tokens such as [CLS] and [SEP]\n\n Args:\n Tokenizer (bert.tokenization.albert_tokenization.FullTokenizer):\n tokenizer class for bert tokenizer\n train_data (list): input data containing albert tokens and label types\n label_id_map (dict): dictionary mapping label type to integer\n max_seq_length (int): maximum sequence length to be used in training\n\n Returns:\n (np.ndarray): input albert IDs\n (np.ndarray): output label IDs\n (np.ndarray): output mask indicating which token is relevant to outcome,\n this includes all corpus tokens and excludes all bert special tokens\n ' input_ids = [] label_ids = [] output_mask = [] for instance_set in tqdm(train_data): input_ids_sub = ['[CLS]'] label_ids_sub = ['[CLS]'] output_mask_sub = [0] for i in range(len(instance_set[1])): input_ids_sub.extend(instance_set[1][i]) label_ids_sub.extend(instance_set[2][i]) output_mask_sub.extend(([1] * len(instance_set[1][i]))) output_mask_sub.extend([0]) input_ids_sub.extend(['[SEP]']) label_ids_sub.extend(['[SEP]']) assert (len(input_ids_sub) == len(label_ids_sub) == len(output_mask_sub)) input_ids_sub.extend((['<pad>'] * (max_seq_length - len(input_ids_sub)))) label_ids_sub.extend((['<pad>'] * (max_seq_length - len(label_ids_sub)))) output_mask_sub.extend(([0] * (max_seq_length - len(output_mask_sub)))) assert (len(input_ids_sub) == len(label_ids_sub) == len(output_mask_sub) == max_seq_length) input_ids_sub = Tokenizer.convert_tokens_to_ids(input_ids_sub) label_ids_sub = [label_id_map[label] for label in label_ids_sub] input_ids.append(input_ids_sub) label_ids.append(label_ids_sub) output_mask.append(output_mask_sub) return (np.array(input_ids), np.array(label_ids), np.array(output_mask))<|docstring|>Function to map data to indices in the albert vocabulary, as well as adding special bert tokens such as [CLS] and [SEP] Args: Tokenizer (bert.tokenization.albert_tokenization.FullTokenizer): tokenizer class for bert tokenizer train_data (list): input data containing albert tokens and label types label_id_map (dict): dictionary mapping label type to integer max_seq_length (int): maximum sequence length to be used in training Returns: (np.ndarray): input albert IDs (np.ndarray): output label IDs (np.ndarray): output mask indicating which token is relevant to outcome, this includes all corpus tokens and excludes all bert special tokens<|endoftext|>
047483555270374206e9aa0f982f3441c026e1ed2f66b3587ff64eea676458e9
def summary_info_US(collection, indices, directory='./data/USElectionDebates/corpus/'): '\n Function to write summary statistics on token types to file\n\n Args:\n collection (list): data containing token and types\n indices (int): mapping of `collection` to debate segments\n directory (str): directory to output files\n ' new_collection = [] for (i, el) in enumerate(collection): new_collection.append([indices[i][0]]) tmp = [] for sub_el in el: for sub_sub_el in sub_el: tmp.append(sub_sub_el[1]) local_dict = dict(Counter(tmp)) try: N = local_dict['N'] except KeyError: N = 0 try: C = local_dict['C'] except KeyError: C = 0 try: P = local_dict['P'] except KeyError: P = 0 new_collection[i].extend([N, C, P]) with open(os.path.join(directory, 'stats_tokens.csv'), 'w') as f: writer = csv.writer(f) writer.writerow(['debate', 'N', 'C', 'P']) writer.writerows(new_collection)
Function to write summary statistics on token types to file Args: collection (list): data containing token and types indices (int): mapping of `collection` to debate segments directory (str): directory to output files
pre_process_USElectionDebates.py
summary_info_US
atreyasha/sentiment-argument-mining
7
python
def summary_info_US(collection, indices, directory='./data/USElectionDebates/corpus/'): '\n Function to write summary statistics on token types to file\n\n Args:\n collection (list): data containing token and types\n indices (int): mapping of `collection` to debate segments\n directory (str): directory to output files\n ' new_collection = [] for (i, el) in enumerate(collection): new_collection.append([indices[i][0]]) tmp = [] for sub_el in el: for sub_sub_el in sub_el: tmp.append(sub_sub_el[1]) local_dict = dict(Counter(tmp)) try: N = local_dict['N'] except KeyError: N = 0 try: C = local_dict['C'] except KeyError: C = 0 try: P = local_dict['P'] except KeyError: P = 0 new_collection[i].extend([N, C, P]) with open(os.path.join(directory, 'stats_tokens.csv'), 'w') as f: writer = csv.writer(f) writer.writerow(['debate', 'N', 'C', 'P']) writer.writerows(new_collection)
def summary_info_US(collection, indices, directory='./data/USElectionDebates/corpus/'): '\n Function to write summary statistics on token types to file\n\n Args:\n collection (list): data containing token and types\n indices (int): mapping of `collection` to debate segments\n directory (str): directory to output files\n ' new_collection = [] for (i, el) in enumerate(collection): new_collection.append([indices[i][0]]) tmp = [] for sub_el in el: for sub_sub_el in sub_el: tmp.append(sub_sub_el[1]) local_dict = dict(Counter(tmp)) try: N = local_dict['N'] except KeyError: N = 0 try: C = local_dict['C'] except KeyError: C = 0 try: P = local_dict['P'] except KeyError: P = 0 new_collection[i].extend([N, C, P]) with open(os.path.join(directory, 'stats_tokens.csv'), 'w') as f: writer = csv.writer(f) writer.writerow(['debate', 'N', 'C', 'P']) writer.writerows(new_collection)<|docstring|>Function to write summary statistics on token types to file Args: collection (list): data containing token and types indices (int): mapping of `collection` to debate segments directory (str): directory to output files<|endoftext|>
47013db33c5327931aeeb8aa096c19f9b005f7656b0d05f08b1044f28502389d
def corpus2tokenids_US(max_seq_length=512, directory='./data/USElectionDebates/training/'): '\n Aggregate function to produce bert-operational training data from\n US-Election-Debate corpus\n\n Args:\n max_seq_length (int): maximum sequence length to be used in training\n directory (str): directory to output files\n\n Returns:\n train_X (np.ndarray): training data IDs\n train_Y (np.ndarray): training data labels\n test_X (np.ndarray): testing data IDs\n test_Y (np.ndarray): testing data labels\n label_map (dict): mapping from label to integer ID for labels\n ' label_map = {'<pad>': 0, '[CLS]': 1, '[SEP]': 2, 'N': 3, 'C': 4, 'P': 5} corpus = read_us_election_corpus() tagged = char_tag(corpus, spaces=True) (indices, flat_text) = flatten(corpus[0], indices=True) flat_ann = flatten(tagged) assert (len(flat_text) == len(flat_ann)) (flat_text, flat_ann) = correct_periods(flat_text, flat_ann, spaces=True) logger.info('Domain debiasing by removing special tokens') for (i, text) in enumerate(flat_text): span = re.search('^[A-Z]*\\:\\s', text) if (span is None): continue else: span = span.span() if (span[0] == 0): flat_text[i] = flat_text[i][span[1]:] flat_ann[i] = flat_ann[i][span[1]:] assert (len(flat_text[i]) == len(flat_ann[i])) collection = [] logger.info('Splitting and tokenizing sentences') Tokenizer = initialize_bert_tokenizer() try: nltk.tokenize.sent_tokenize('testing. testing') except LookupError: nltk.download('punkt') for i in tqdm(range(len(flat_text))): sub_text = nltk.tokenize.sent_tokenize(flat_text[i]) sub_ann = [] for (j, chunk) in enumerate(sub_text): span = re.search(re.escape(chunk), flat_text[i]).span() sub_ann.append(flat_ann[i][span[0]:span[1]]) assert (len(sub_ann[j]) == len(chunk)) flat_text[i] = flat_text[i][span[1]:] flat_ann[i] = flat_ann[i][span[1]:] collection.append(tokenize(sub_text, sub_ann, Tokenizer)) logger.info('Printing out summary statistics for corpus') summary_info_US(collection, indices) to_remove = [] for (i, sent_set) in enumerate(collection): token_count = sum([1 for sent in sent_set for token in sent]) length = (token_count + 2) if (length > max_seq_length): to_remove.append(i) collection = [sent_set for (i, sent_set) in enumerate(collection) if (i not in to_remove)] collection = [[i, sent_set] for (i, sent_set) in enumerate(collection)] (train, test) = train_test_split(collection, test_size=0.33, random_state=42) train = post_process(train) test = post_process(test) logger.info('Projecting train text to indices') (train_X, train_Y, _) = project_to_ids_US(Tokenizer, train, label_map, max_seq_length) logger.info('Projecting test text to indices') (test_X, test_Y, _) = project_to_ids_US(Tokenizer, test, label_map, max_seq_length) np.save(os.path.join(directory, (('train_X_' + str(max_seq_length)) + '.npy')), train_X) np.save(os.path.join(directory, (('train_Y_' + str(max_seq_length)) + '.npy')), train_Y) np.save(os.path.join(directory, (('test_X_' + str(max_seq_length)) + '.npy')), test_X) np.save(os.path.join(directory, (('test_Y_' + str(max_seq_length)) + '.npy')), test_Y) with open(os.path.join(directory, 'label_map.json'), 'w') as f: json.dump(label_map, f) return (train_X, train_Y, test_X, test_Y, label_map)
Aggregate function to produce bert-operational training data from US-Election-Debate corpus Args: max_seq_length (int): maximum sequence length to be used in training directory (str): directory to output files Returns: train_X (np.ndarray): training data IDs train_Y (np.ndarray): training data labels test_X (np.ndarray): testing data IDs test_Y (np.ndarray): testing data labels label_map (dict): mapping from label to integer ID for labels
pre_process_USElectionDebates.py
corpus2tokenids_US
atreyasha/sentiment-argument-mining
7
python
def corpus2tokenids_US(max_seq_length=512, directory='./data/USElectionDebates/training/'): '\n Aggregate function to produce bert-operational training data from\n US-Election-Debate corpus\n\n Args:\n max_seq_length (int): maximum sequence length to be used in training\n directory (str): directory to output files\n\n Returns:\n train_X (np.ndarray): training data IDs\n train_Y (np.ndarray): training data labels\n test_X (np.ndarray): testing data IDs\n test_Y (np.ndarray): testing data labels\n label_map (dict): mapping from label to integer ID for labels\n ' label_map = {'<pad>': 0, '[CLS]': 1, '[SEP]': 2, 'N': 3, 'C': 4, 'P': 5} corpus = read_us_election_corpus() tagged = char_tag(corpus, spaces=True) (indices, flat_text) = flatten(corpus[0], indices=True) flat_ann = flatten(tagged) assert (len(flat_text) == len(flat_ann)) (flat_text, flat_ann) = correct_periods(flat_text, flat_ann, spaces=True) logger.info('Domain debiasing by removing special tokens') for (i, text) in enumerate(flat_text): span = re.search('^[A-Z]*\\:\\s', text) if (span is None): continue else: span = span.span() if (span[0] == 0): flat_text[i] = flat_text[i][span[1]:] flat_ann[i] = flat_ann[i][span[1]:] assert (len(flat_text[i]) == len(flat_ann[i])) collection = [] logger.info('Splitting and tokenizing sentences') Tokenizer = initialize_bert_tokenizer() try: nltk.tokenize.sent_tokenize('testing. testing') except LookupError: nltk.download('punkt') for i in tqdm(range(len(flat_text))): sub_text = nltk.tokenize.sent_tokenize(flat_text[i]) sub_ann = [] for (j, chunk) in enumerate(sub_text): span = re.search(re.escape(chunk), flat_text[i]).span() sub_ann.append(flat_ann[i][span[0]:span[1]]) assert (len(sub_ann[j]) == len(chunk)) flat_text[i] = flat_text[i][span[1]:] flat_ann[i] = flat_ann[i][span[1]:] collection.append(tokenize(sub_text, sub_ann, Tokenizer)) logger.info('Printing out summary statistics for corpus') summary_info_US(collection, indices) to_remove = [] for (i, sent_set) in enumerate(collection): token_count = sum([1 for sent in sent_set for token in sent]) length = (token_count + 2) if (length > max_seq_length): to_remove.append(i) collection = [sent_set for (i, sent_set) in enumerate(collection) if (i not in to_remove)] collection = [[i, sent_set] for (i, sent_set) in enumerate(collection)] (train, test) = train_test_split(collection, test_size=0.33, random_state=42) train = post_process(train) test = post_process(test) logger.info('Projecting train text to indices') (train_X, train_Y, _) = project_to_ids_US(Tokenizer, train, label_map, max_seq_length) logger.info('Projecting test text to indices') (test_X, test_Y, _) = project_to_ids_US(Tokenizer, test, label_map, max_seq_length) np.save(os.path.join(directory, (('train_X_' + str(max_seq_length)) + '.npy')), train_X) np.save(os.path.join(directory, (('train_Y_' + str(max_seq_length)) + '.npy')), train_Y) np.save(os.path.join(directory, (('test_X_' + str(max_seq_length)) + '.npy')), test_X) np.save(os.path.join(directory, (('test_Y_' + str(max_seq_length)) + '.npy')), test_Y) with open(os.path.join(directory, 'label_map.json'), 'w') as f: json.dump(label_map, f) return (train_X, train_Y, test_X, test_Y, label_map)
def corpus2tokenids_US(max_seq_length=512, directory='./data/USElectionDebates/training/'): '\n Aggregate function to produce bert-operational training data from\n US-Election-Debate corpus\n\n Args:\n max_seq_length (int): maximum sequence length to be used in training\n directory (str): directory to output files\n\n Returns:\n train_X (np.ndarray): training data IDs\n train_Y (np.ndarray): training data labels\n test_X (np.ndarray): testing data IDs\n test_Y (np.ndarray): testing data labels\n label_map (dict): mapping from label to integer ID for labels\n ' label_map = {'<pad>': 0, '[CLS]': 1, '[SEP]': 2, 'N': 3, 'C': 4, 'P': 5} corpus = read_us_election_corpus() tagged = char_tag(corpus, spaces=True) (indices, flat_text) = flatten(corpus[0], indices=True) flat_ann = flatten(tagged) assert (len(flat_text) == len(flat_ann)) (flat_text, flat_ann) = correct_periods(flat_text, flat_ann, spaces=True) logger.info('Domain debiasing by removing special tokens') for (i, text) in enumerate(flat_text): span = re.search('^[A-Z]*\\:\\s', text) if (span is None): continue else: span = span.span() if (span[0] == 0): flat_text[i] = flat_text[i][span[1]:] flat_ann[i] = flat_ann[i][span[1]:] assert (len(flat_text[i]) == len(flat_ann[i])) collection = [] logger.info('Splitting and tokenizing sentences') Tokenizer = initialize_bert_tokenizer() try: nltk.tokenize.sent_tokenize('testing. testing') except LookupError: nltk.download('punkt') for i in tqdm(range(len(flat_text))): sub_text = nltk.tokenize.sent_tokenize(flat_text[i]) sub_ann = [] for (j, chunk) in enumerate(sub_text): span = re.search(re.escape(chunk), flat_text[i]).span() sub_ann.append(flat_ann[i][span[0]:span[1]]) assert (len(sub_ann[j]) == len(chunk)) flat_text[i] = flat_text[i][span[1]:] flat_ann[i] = flat_ann[i][span[1]:] collection.append(tokenize(sub_text, sub_ann, Tokenizer)) logger.info('Printing out summary statistics for corpus') summary_info_US(collection, indices) to_remove = [] for (i, sent_set) in enumerate(collection): token_count = sum([1 for sent in sent_set for token in sent]) length = (token_count + 2) if (length > max_seq_length): to_remove.append(i) collection = [sent_set for (i, sent_set) in enumerate(collection) if (i not in to_remove)] collection = [[i, sent_set] for (i, sent_set) in enumerate(collection)] (train, test) = train_test_split(collection, test_size=0.33, random_state=42) train = post_process(train) test = post_process(test) logger.info('Projecting train text to indices') (train_X, train_Y, _) = project_to_ids_US(Tokenizer, train, label_map, max_seq_length) logger.info('Projecting test text to indices') (test_X, test_Y, _) = project_to_ids_US(Tokenizer, test, label_map, max_seq_length) np.save(os.path.join(directory, (('train_X_' + str(max_seq_length)) + '.npy')), train_X) np.save(os.path.join(directory, (('train_Y_' + str(max_seq_length)) + '.npy')), train_Y) np.save(os.path.join(directory, (('test_X_' + str(max_seq_length)) + '.npy')), test_X) np.save(os.path.join(directory, (('test_Y_' + str(max_seq_length)) + '.npy')), test_Y) with open(os.path.join(directory, 'label_map.json'), 'w') as f: json.dump(label_map, f) return (train_X, train_Y, test_X, test_Y, label_map)<|docstring|>Aggregate function to produce bert-operational training data from US-Election-Debate corpus Args: max_seq_length (int): maximum sequence length to be used in training directory (str): directory to output files Returns: train_X (np.ndarray): training data IDs train_Y (np.ndarray): training data labels test_X (np.ndarray): testing data IDs test_Y (np.ndarray): testing data labels label_map (dict): mapping from label to integer ID for labels<|endoftext|>
42cbac2b3ffe3de574bd23b789ad20582fe3db5610f434d104c1949ae4b4f691
def _forbid_float(func): 'Decorator that only allows an integer or a Decimal as the first argument\n ' @functools.wraps(func) def _decorator(*args, **kwargs): if ((not isinstance(args[0], int)) and (not isinstance(args[0], Decimal))): raise TypeError('Value has to be an integer or a Decimal. Floating numbers cause precision loss and are unsuitable for handling monetary values.') return func(*args, **kwargs) return _decorator
Decorator that only allows an integer or a Decimal as the first argument
src/nanolib/units.py
_forbid_float
yusufgurdogan/nanolib
51
python
def _forbid_float(func): '\n ' @functools.wraps(func) def _decorator(*args, **kwargs): if ((not isinstance(args[0], int)) and (not isinstance(args[0], Decimal))): raise TypeError('Value has to be an integer or a Decimal. Floating numbers cause precision loss and are unsuitable for handling monetary values.') return func(*args, **kwargs) return _decorator
def _forbid_float(func): '\n ' @functools.wraps(func) def _decorator(*args, **kwargs): if ((not isinstance(args[0], int)) and (not isinstance(args[0], Decimal))): raise TypeError('Value has to be an integer or a Decimal. Floating numbers cause precision loss and are unsuitable for handling monetary values.') return func(*args, **kwargs) return _decorator<|docstring|>Decorator that only allows an integer or a Decimal as the first argument<|endoftext|>
e4f5901c400829da54c8dd3caf9ffe4bf5c8c3e0180ce59c3ebc00a86a411a6e
@_forbid_float def convert(amount, source, target): 'Convert an amount from one denomination to another\n\n :param amount: Amount to convert\n :type amount: decimal.Decimal or int\n :param NanoDenomination source: The denomination to convert from\n :param NanoDenomination target: The denomination to convert to\n :raises ValueError: If the amount is higher than the NANO coin cap (:math:`2^{128} - 1` `raw`)\n :raises TypeError": If `amount` is not an `int` or a\n :class:`decimal.Decimal`\n\n :return: Converted amount\n :rtype: decimal.Decimal\n ' source = NanoDenomination(source) target = NanoDenomination(target) raw_source = NANO_RAW_AMOUNTS[source.value] raw_target = NANO_RAW_AMOUNTS[target.value] raw_amount = (amount * raw_source) if (raw_amount > NANO_RAW_CAP): raise ValueError('Amount is higher than the NANO coin supply') raw_amount /= raw_target return raw_amount
Convert an amount from one denomination to another :param amount: Amount to convert :type amount: decimal.Decimal or int :param NanoDenomination source: The denomination to convert from :param NanoDenomination target: The denomination to convert to :raises ValueError: If the amount is higher than the NANO coin cap (:math:`2^{128} - 1` `raw`) :raises TypeError": If `amount` is not an `int` or a :class:`decimal.Decimal` :return: Converted amount :rtype: decimal.Decimal
src/nanolib/units.py
convert
yusufgurdogan/nanolib
51
python
@_forbid_float def convert(amount, source, target): 'Convert an amount from one denomination to another\n\n :param amount: Amount to convert\n :type amount: decimal.Decimal or int\n :param NanoDenomination source: The denomination to convert from\n :param NanoDenomination target: The denomination to convert to\n :raises ValueError: If the amount is higher than the NANO coin cap (:math:`2^{128} - 1` `raw`)\n :raises TypeError": If `amount` is not an `int` or a\n :class:`decimal.Decimal`\n\n :return: Converted amount\n :rtype: decimal.Decimal\n ' source = NanoDenomination(source) target = NanoDenomination(target) raw_source = NANO_RAW_AMOUNTS[source.value] raw_target = NANO_RAW_AMOUNTS[target.value] raw_amount = (amount * raw_source) if (raw_amount > NANO_RAW_CAP): raise ValueError('Amount is higher than the NANO coin supply') raw_amount /= raw_target return raw_amount
@_forbid_float def convert(amount, source, target): 'Convert an amount from one denomination to another\n\n :param amount: Amount to convert\n :type amount: decimal.Decimal or int\n :param NanoDenomination source: The denomination to convert from\n :param NanoDenomination target: The denomination to convert to\n :raises ValueError: If the amount is higher than the NANO coin cap (:math:`2^{128} - 1` `raw`)\n :raises TypeError": If `amount` is not an `int` or a\n :class:`decimal.Decimal`\n\n :return: Converted amount\n :rtype: decimal.Decimal\n ' source = NanoDenomination(source) target = NanoDenomination(target) raw_source = NANO_RAW_AMOUNTS[source.value] raw_target = NANO_RAW_AMOUNTS[target.value] raw_amount = (amount * raw_source) if (raw_amount > NANO_RAW_CAP): raise ValueError('Amount is higher than the NANO coin supply') raw_amount /= raw_target return raw_amount<|docstring|>Convert an amount from one denomination to another :param amount: Amount to convert :type amount: decimal.Decimal or int :param NanoDenomination source: The denomination to convert from :param NanoDenomination target: The denomination to convert to :raises ValueError: If the amount is higher than the NANO coin cap (:math:`2^{128} - 1` `raw`) :raises TypeError": If `amount` is not an `int` or a :class:`decimal.Decimal` :return: Converted amount :rtype: decimal.Decimal<|endoftext|>
98acf10b93131b6f152ac4984ca4826e558a540ebb6840f07d2479fce7a40c48
def create_namespaced_cron_job(self, namespace, body, **kwargs): "create_namespaced_cron_job # noqa: E501\n\n create a CronJob # noqa: E501\n This method makes a synchronous HTTP request by default. To make an\n asynchronous HTTP request, please pass async_req=True\n >>> thread = api.create_namespaced_cron_job(namespace, body, async_req=True)\n >>> result = thread.get()\n\n :param async_req bool: execute request asynchronously\n :param str namespace: object name and auth scope, such as for teams and projects (required)\n :param V1CronJob body: (required)\n :param str pretty: If 'true', then the output is pretty printed.\n :param str dry_run: When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed\n :param str field_manager: fieldManager is a name associated with the actor or entity that is making these changes. The value must be less than or 128 characters long, and only contain printable characters, as defined by https://golang.org/pkg/unicode/#IsPrint.\n :param _preload_content: if False, the urllib3.HTTPResponse object will\n be returned without reading/decoding response\n data. Default is True.\n :param _request_timeout: timeout setting for this request. If one\n number provided, it will be total request\n timeout. It can also be a pair (tuple) of\n (connection, read) timeouts.\n :return: V1CronJob\n If the method is called asynchronously,\n returns the request thread.\n " kwargs['_return_http_data_only'] = True return self.create_namespaced_cron_job_with_http_info(namespace, body, **kwargs)
create_namespaced_cron_job # noqa: E501 create a CronJob # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True >>> thread = api.create_namespaced_cron_job(namespace, body, async_req=True) >>> result = thread.get() :param async_req bool: execute request asynchronously :param str namespace: object name and auth scope, such as for teams and projects (required) :param V1CronJob body: (required) :param str pretty: If 'true', then the output is pretty printed. :param str dry_run: When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed :param str field_manager: fieldManager is a name associated with the actor or entity that is making these changes. The value must be less than or 128 characters long, and only contain printable characters, as defined by https://golang.org/pkg/unicode/#IsPrint. :param _preload_content: if False, the urllib3.HTTPResponse object will be returned without reading/decoding response data. Default is True. :param _request_timeout: timeout setting for this request. If one number provided, it will be total request timeout. It can also be a pair (tuple) of (connection, read) timeouts. :return: V1CronJob If the method is called asynchronously, returns the request thread.
kubernetes/client/api/batch_v1_api.py
create_namespaced_cron_job
knkgun/python
1
python
def create_namespaced_cron_job(self, namespace, body, **kwargs): "create_namespaced_cron_job # noqa: E501\n\n create a CronJob # noqa: E501\n This method makes a synchronous HTTP request by default. To make an\n asynchronous HTTP request, please pass async_req=True\n >>> thread = api.create_namespaced_cron_job(namespace, body, async_req=True)\n >>> result = thread.get()\n\n :param async_req bool: execute request asynchronously\n :param str namespace: object name and auth scope, such as for teams and projects (required)\n :param V1CronJob body: (required)\n :param str pretty: If 'true', then the output is pretty printed.\n :param str dry_run: When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed\n :param str field_manager: fieldManager is a name associated with the actor or entity that is making these changes. The value must be less than or 128 characters long, and only contain printable characters, as defined by https://golang.org/pkg/unicode/#IsPrint.\n :param _preload_content: if False, the urllib3.HTTPResponse object will\n be returned without reading/decoding response\n data. Default is True.\n :param _request_timeout: timeout setting for this request. If one\n number provided, it will be total request\n timeout. It can also be a pair (tuple) of\n (connection, read) timeouts.\n :return: V1CronJob\n If the method is called asynchronously,\n returns the request thread.\n " kwargs['_return_http_data_only'] = True return self.create_namespaced_cron_job_with_http_info(namespace, body, **kwargs)
def create_namespaced_cron_job(self, namespace, body, **kwargs): "create_namespaced_cron_job # noqa: E501\n\n create a CronJob # noqa: E501\n This method makes a synchronous HTTP request by default. To make an\n asynchronous HTTP request, please pass async_req=True\n >>> thread = api.create_namespaced_cron_job(namespace, body, async_req=True)\n >>> result = thread.get()\n\n :param async_req bool: execute request asynchronously\n :param str namespace: object name and auth scope, such as for teams and projects (required)\n :param V1CronJob body: (required)\n :param str pretty: If 'true', then the output is pretty printed.\n :param str dry_run: When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed\n :param str field_manager: fieldManager is a name associated with the actor or entity that is making these changes. The value must be less than or 128 characters long, and only contain printable characters, as defined by https://golang.org/pkg/unicode/#IsPrint.\n :param _preload_content: if False, the urllib3.HTTPResponse object will\n be returned without reading/decoding response\n data. Default is True.\n :param _request_timeout: timeout setting for this request. If one\n number provided, it will be total request\n timeout. It can also be a pair (tuple) of\n (connection, read) timeouts.\n :return: V1CronJob\n If the method is called asynchronously,\n returns the request thread.\n " kwargs['_return_http_data_only'] = True return self.create_namespaced_cron_job_with_http_info(namespace, body, **kwargs)<|docstring|>create_namespaced_cron_job # noqa: E501 create a CronJob # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True >>> thread = api.create_namespaced_cron_job(namespace, body, async_req=True) >>> result = thread.get() :param async_req bool: execute request asynchronously :param str namespace: object name and auth scope, such as for teams and projects (required) :param V1CronJob body: (required) :param str pretty: If 'true', then the output is pretty printed. :param str dry_run: When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed :param str field_manager: fieldManager is a name associated with the actor or entity that is making these changes. The value must be less than or 128 characters long, and only contain printable characters, as defined by https://golang.org/pkg/unicode/#IsPrint. :param _preload_content: if False, the urllib3.HTTPResponse object will be returned without reading/decoding response data. Default is True. :param _request_timeout: timeout setting for this request. If one number provided, it will be total request timeout. It can also be a pair (tuple) of (connection, read) timeouts. :return: V1CronJob If the method is called asynchronously, returns the request thread.<|endoftext|>
9e44f521acf4da9b937533e9a7f39c138666ed27318895e485cc255ea297dd2c
def create_namespaced_cron_job_with_http_info(self, namespace, body, **kwargs): "create_namespaced_cron_job # noqa: E501\n\n create a CronJob # noqa: E501\n This method makes a synchronous HTTP request by default. To make an\n asynchronous HTTP request, please pass async_req=True\n >>> thread = api.create_namespaced_cron_job_with_http_info(namespace, body, async_req=True)\n >>> result = thread.get()\n\n :param async_req bool: execute request asynchronously\n :param str namespace: object name and auth scope, such as for teams and projects (required)\n :param V1CronJob body: (required)\n :param str pretty: If 'true', then the output is pretty printed.\n :param str dry_run: When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed\n :param str field_manager: fieldManager is a name associated with the actor or entity that is making these changes. The value must be less than or 128 characters long, and only contain printable characters, as defined by https://golang.org/pkg/unicode/#IsPrint.\n :param _return_http_data_only: response data without head status code\n and headers\n :param _preload_content: if False, the urllib3.HTTPResponse object will\n be returned without reading/decoding response\n data. Default is True.\n :param _request_timeout: timeout setting for this request. If one\n number provided, it will be total request\n timeout. It can also be a pair (tuple) of\n (connection, read) timeouts.\n :return: tuple(V1CronJob, status_code(int), headers(HTTPHeaderDict))\n If the method is called asynchronously,\n returns the request thread.\n " local_var_params = locals() all_params = ['namespace', 'body', 'pretty', 'dry_run', 'field_manager'] all_params.extend(['async_req', '_return_http_data_only', '_preload_content', '_request_timeout']) for (key, val) in six.iteritems(local_var_params['kwargs']): if (key not in all_params): raise ApiTypeError(("Got an unexpected keyword argument '%s' to method create_namespaced_cron_job" % key)) local_var_params[key] = val del local_var_params['kwargs'] if (self.api_client.client_side_validation and (('namespace' not in local_var_params) or (local_var_params['namespace'] is None))): raise ApiValueError('Missing the required parameter `namespace` when calling `create_namespaced_cron_job`') if (self.api_client.client_side_validation and (('body' not in local_var_params) or (local_var_params['body'] is None))): raise ApiValueError('Missing the required parameter `body` when calling `create_namespaced_cron_job`') collection_formats = {} path_params = {} if ('namespace' in local_var_params): path_params['namespace'] = local_var_params['namespace'] query_params = [] if (('pretty' in local_var_params) and (local_var_params['pretty'] is not None)): query_params.append(('pretty', local_var_params['pretty'])) if (('dry_run' in local_var_params) and (local_var_params['dry_run'] is not None)): query_params.append(('dryRun', local_var_params['dry_run'])) if (('field_manager' in local_var_params) and (local_var_params['field_manager'] is not None)): query_params.append(('fieldManager', local_var_params['field_manager'])) header_params = {} form_params = [] local_var_files = {} body_params = None if ('body' in local_var_params): body_params = local_var_params['body'] header_params['Accept'] = self.api_client.select_header_accept(['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf']) auth_settings = ['BearerToken'] return self.api_client.call_api('/apis/batch/v1/namespaces/{namespace}/cronjobs', 'POST', path_params, query_params, header_params, body=body_params, post_params=form_params, files=local_var_files, response_type='V1CronJob', auth_settings=auth_settings, async_req=local_var_params.get('async_req'), _return_http_data_only=local_var_params.get('_return_http_data_only'), _preload_content=local_var_params.get('_preload_content', True), _request_timeout=local_var_params.get('_request_timeout'), collection_formats=collection_formats)
create_namespaced_cron_job # noqa: E501 create a CronJob # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True >>> thread = api.create_namespaced_cron_job_with_http_info(namespace, body, async_req=True) >>> result = thread.get() :param async_req bool: execute request asynchronously :param str namespace: object name and auth scope, such as for teams and projects (required) :param V1CronJob body: (required) :param str pretty: If 'true', then the output is pretty printed. :param str dry_run: When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed :param str field_manager: fieldManager is a name associated with the actor or entity that is making these changes. The value must be less than or 128 characters long, and only contain printable characters, as defined by https://golang.org/pkg/unicode/#IsPrint. :param _return_http_data_only: response data without head status code and headers :param _preload_content: if False, the urllib3.HTTPResponse object will be returned without reading/decoding response data. Default is True. :param _request_timeout: timeout setting for this request. If one number provided, it will be total request timeout. It can also be a pair (tuple) of (connection, read) timeouts. :return: tuple(V1CronJob, status_code(int), headers(HTTPHeaderDict)) If the method is called asynchronously, returns the request thread.
kubernetes/client/api/batch_v1_api.py
create_namespaced_cron_job_with_http_info
knkgun/python
1
python
def create_namespaced_cron_job_with_http_info(self, namespace, body, **kwargs): "create_namespaced_cron_job # noqa: E501\n\n create a CronJob # noqa: E501\n This method makes a synchronous HTTP request by default. To make an\n asynchronous HTTP request, please pass async_req=True\n >>> thread = api.create_namespaced_cron_job_with_http_info(namespace, body, async_req=True)\n >>> result = thread.get()\n\n :param async_req bool: execute request asynchronously\n :param str namespace: object name and auth scope, such as for teams and projects (required)\n :param V1CronJob body: (required)\n :param str pretty: If 'true', then the output is pretty printed.\n :param str dry_run: When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed\n :param str field_manager: fieldManager is a name associated with the actor or entity that is making these changes. The value must be less than or 128 characters long, and only contain printable characters, as defined by https://golang.org/pkg/unicode/#IsPrint.\n :param _return_http_data_only: response data without head status code\n and headers\n :param _preload_content: if False, the urllib3.HTTPResponse object will\n be returned without reading/decoding response\n data. Default is True.\n :param _request_timeout: timeout setting for this request. If one\n number provided, it will be total request\n timeout. It can also be a pair (tuple) of\n (connection, read) timeouts.\n :return: tuple(V1CronJob, status_code(int), headers(HTTPHeaderDict))\n If the method is called asynchronously,\n returns the request thread.\n " local_var_params = locals() all_params = ['namespace', 'body', 'pretty', 'dry_run', 'field_manager'] all_params.extend(['async_req', '_return_http_data_only', '_preload_content', '_request_timeout']) for (key, val) in six.iteritems(local_var_params['kwargs']): if (key not in all_params): raise ApiTypeError(("Got an unexpected keyword argument '%s' to method create_namespaced_cron_job" % key)) local_var_params[key] = val del local_var_params['kwargs'] if (self.api_client.client_side_validation and (('namespace' not in local_var_params) or (local_var_params['namespace'] is None))): raise ApiValueError('Missing the required parameter `namespace` when calling `create_namespaced_cron_job`') if (self.api_client.client_side_validation and (('body' not in local_var_params) or (local_var_params['body'] is None))): raise ApiValueError('Missing the required parameter `body` when calling `create_namespaced_cron_job`') collection_formats = {} path_params = {} if ('namespace' in local_var_params): path_params['namespace'] = local_var_params['namespace'] query_params = [] if (('pretty' in local_var_params) and (local_var_params['pretty'] is not None)): query_params.append(('pretty', local_var_params['pretty'])) if (('dry_run' in local_var_params) and (local_var_params['dry_run'] is not None)): query_params.append(('dryRun', local_var_params['dry_run'])) if (('field_manager' in local_var_params) and (local_var_params['field_manager'] is not None)): query_params.append(('fieldManager', local_var_params['field_manager'])) header_params = {} form_params = [] local_var_files = {} body_params = None if ('body' in local_var_params): body_params = local_var_params['body'] header_params['Accept'] = self.api_client.select_header_accept(['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf']) auth_settings = ['BearerToken'] return self.api_client.call_api('/apis/batch/v1/namespaces/{namespace}/cronjobs', 'POST', path_params, query_params, header_params, body=body_params, post_params=form_params, files=local_var_files, response_type='V1CronJob', auth_settings=auth_settings, async_req=local_var_params.get('async_req'), _return_http_data_only=local_var_params.get('_return_http_data_only'), _preload_content=local_var_params.get('_preload_content', True), _request_timeout=local_var_params.get('_request_timeout'), collection_formats=collection_formats)
def create_namespaced_cron_job_with_http_info(self, namespace, body, **kwargs): "create_namespaced_cron_job # noqa: E501\n\n create a CronJob # noqa: E501\n This method makes a synchronous HTTP request by default. To make an\n asynchronous HTTP request, please pass async_req=True\n >>> thread = api.create_namespaced_cron_job_with_http_info(namespace, body, async_req=True)\n >>> result = thread.get()\n\n :param async_req bool: execute request asynchronously\n :param str namespace: object name and auth scope, such as for teams and projects (required)\n :param V1CronJob body: (required)\n :param str pretty: If 'true', then the output is pretty printed.\n :param str dry_run: When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed\n :param str field_manager: fieldManager is a name associated with the actor or entity that is making these changes. The value must be less than or 128 characters long, and only contain printable characters, as defined by https://golang.org/pkg/unicode/#IsPrint.\n :param _return_http_data_only: response data without head status code\n and headers\n :param _preload_content: if False, the urllib3.HTTPResponse object will\n be returned without reading/decoding response\n data. Default is True.\n :param _request_timeout: timeout setting for this request. If one\n number provided, it will be total request\n timeout. It can also be a pair (tuple) of\n (connection, read) timeouts.\n :return: tuple(V1CronJob, status_code(int), headers(HTTPHeaderDict))\n If the method is called asynchronously,\n returns the request thread.\n " local_var_params = locals() all_params = ['namespace', 'body', 'pretty', 'dry_run', 'field_manager'] all_params.extend(['async_req', '_return_http_data_only', '_preload_content', '_request_timeout']) for (key, val) in six.iteritems(local_var_params['kwargs']): if (key not in all_params): raise ApiTypeError(("Got an unexpected keyword argument '%s' to method create_namespaced_cron_job" % key)) local_var_params[key] = val del local_var_params['kwargs'] if (self.api_client.client_side_validation and (('namespace' not in local_var_params) or (local_var_params['namespace'] is None))): raise ApiValueError('Missing the required parameter `namespace` when calling `create_namespaced_cron_job`') if (self.api_client.client_side_validation and (('body' not in local_var_params) or (local_var_params['body'] is None))): raise ApiValueError('Missing the required parameter `body` when calling `create_namespaced_cron_job`') collection_formats = {} path_params = {} if ('namespace' in local_var_params): path_params['namespace'] = local_var_params['namespace'] query_params = [] if (('pretty' in local_var_params) and (local_var_params['pretty'] is not None)): query_params.append(('pretty', local_var_params['pretty'])) if (('dry_run' in local_var_params) and (local_var_params['dry_run'] is not None)): query_params.append(('dryRun', local_var_params['dry_run'])) if (('field_manager' in local_var_params) and (local_var_params['field_manager'] is not None)): query_params.append(('fieldManager', local_var_params['field_manager'])) header_params = {} form_params = [] local_var_files = {} body_params = None if ('body' in local_var_params): body_params = local_var_params['body'] header_params['Accept'] = self.api_client.select_header_accept(['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf']) auth_settings = ['BearerToken'] return self.api_client.call_api('/apis/batch/v1/namespaces/{namespace}/cronjobs', 'POST', path_params, query_params, header_params, body=body_params, post_params=form_params, files=local_var_files, response_type='V1CronJob', auth_settings=auth_settings, async_req=local_var_params.get('async_req'), _return_http_data_only=local_var_params.get('_return_http_data_only'), _preload_content=local_var_params.get('_preload_content', True), _request_timeout=local_var_params.get('_request_timeout'), collection_formats=collection_formats)<|docstring|>create_namespaced_cron_job # noqa: E501 create a CronJob # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True >>> thread = api.create_namespaced_cron_job_with_http_info(namespace, body, async_req=True) >>> result = thread.get() :param async_req bool: execute request asynchronously :param str namespace: object name and auth scope, such as for teams and projects (required) :param V1CronJob body: (required) :param str pretty: If 'true', then the output is pretty printed. :param str dry_run: When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed :param str field_manager: fieldManager is a name associated with the actor or entity that is making these changes. The value must be less than or 128 characters long, and only contain printable characters, as defined by https://golang.org/pkg/unicode/#IsPrint. :param _return_http_data_only: response data without head status code and headers :param _preload_content: if False, the urllib3.HTTPResponse object will be returned without reading/decoding response data. Default is True. :param _request_timeout: timeout setting for this request. If one number provided, it will be total request timeout. It can also be a pair (tuple) of (connection, read) timeouts. :return: tuple(V1CronJob, status_code(int), headers(HTTPHeaderDict)) If the method is called asynchronously, returns the request thread.<|endoftext|>
b7e8689de90061bf588337ec060f48d9239225c59fea1a17c46cc5725fbdcf93
def create_namespaced_job(self, namespace, body, **kwargs): "create_namespaced_job # noqa: E501\n\n create a Job # noqa: E501\n This method makes a synchronous HTTP request by default. To make an\n asynchronous HTTP request, please pass async_req=True\n >>> thread = api.create_namespaced_job(namespace, body, async_req=True)\n >>> result = thread.get()\n\n :param async_req bool: execute request asynchronously\n :param str namespace: object name and auth scope, such as for teams and projects (required)\n :param V1Job body: (required)\n :param str pretty: If 'true', then the output is pretty printed.\n :param str dry_run: When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed\n :param str field_manager: fieldManager is a name associated with the actor or entity that is making these changes. The value must be less than or 128 characters long, and only contain printable characters, as defined by https://golang.org/pkg/unicode/#IsPrint.\n :param _preload_content: if False, the urllib3.HTTPResponse object will\n be returned without reading/decoding response\n data. Default is True.\n :param _request_timeout: timeout setting for this request. If one\n number provided, it will be total request\n timeout. It can also be a pair (tuple) of\n (connection, read) timeouts.\n :return: V1Job\n If the method is called asynchronously,\n returns the request thread.\n " kwargs['_return_http_data_only'] = True return self.create_namespaced_job_with_http_info(namespace, body, **kwargs)
create_namespaced_job # noqa: E501 create a Job # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True >>> thread = api.create_namespaced_job(namespace, body, async_req=True) >>> result = thread.get() :param async_req bool: execute request asynchronously :param str namespace: object name and auth scope, such as for teams and projects (required) :param V1Job body: (required) :param str pretty: If 'true', then the output is pretty printed. :param str dry_run: When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed :param str field_manager: fieldManager is a name associated with the actor or entity that is making these changes. The value must be less than or 128 characters long, and only contain printable characters, as defined by https://golang.org/pkg/unicode/#IsPrint. :param _preload_content: if False, the urllib3.HTTPResponse object will be returned without reading/decoding response data. Default is True. :param _request_timeout: timeout setting for this request. If one number provided, it will be total request timeout. It can also be a pair (tuple) of (connection, read) timeouts. :return: V1Job If the method is called asynchronously, returns the request thread.
kubernetes/client/api/batch_v1_api.py
create_namespaced_job
knkgun/python
1
python
def create_namespaced_job(self, namespace, body, **kwargs): "create_namespaced_job # noqa: E501\n\n create a Job # noqa: E501\n This method makes a synchronous HTTP request by default. To make an\n asynchronous HTTP request, please pass async_req=True\n >>> thread = api.create_namespaced_job(namespace, body, async_req=True)\n >>> result = thread.get()\n\n :param async_req bool: execute request asynchronously\n :param str namespace: object name and auth scope, such as for teams and projects (required)\n :param V1Job body: (required)\n :param str pretty: If 'true', then the output is pretty printed.\n :param str dry_run: When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed\n :param str field_manager: fieldManager is a name associated with the actor or entity that is making these changes. The value must be less than or 128 characters long, and only contain printable characters, as defined by https://golang.org/pkg/unicode/#IsPrint.\n :param _preload_content: if False, the urllib3.HTTPResponse object will\n be returned without reading/decoding response\n data. Default is True.\n :param _request_timeout: timeout setting for this request. If one\n number provided, it will be total request\n timeout. It can also be a pair (tuple) of\n (connection, read) timeouts.\n :return: V1Job\n If the method is called asynchronously,\n returns the request thread.\n " kwargs['_return_http_data_only'] = True return self.create_namespaced_job_with_http_info(namespace, body, **kwargs)
def create_namespaced_job(self, namespace, body, **kwargs): "create_namespaced_job # noqa: E501\n\n create a Job # noqa: E501\n This method makes a synchronous HTTP request by default. To make an\n asynchronous HTTP request, please pass async_req=True\n >>> thread = api.create_namespaced_job(namespace, body, async_req=True)\n >>> result = thread.get()\n\n :param async_req bool: execute request asynchronously\n :param str namespace: object name and auth scope, such as for teams and projects (required)\n :param V1Job body: (required)\n :param str pretty: If 'true', then the output is pretty printed.\n :param str dry_run: When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed\n :param str field_manager: fieldManager is a name associated with the actor or entity that is making these changes. The value must be less than or 128 characters long, and only contain printable characters, as defined by https://golang.org/pkg/unicode/#IsPrint.\n :param _preload_content: if False, the urllib3.HTTPResponse object will\n be returned without reading/decoding response\n data. Default is True.\n :param _request_timeout: timeout setting for this request. If one\n number provided, it will be total request\n timeout. It can also be a pair (tuple) of\n (connection, read) timeouts.\n :return: V1Job\n If the method is called asynchronously,\n returns the request thread.\n " kwargs['_return_http_data_only'] = True return self.create_namespaced_job_with_http_info(namespace, body, **kwargs)<|docstring|>create_namespaced_job # noqa: E501 create a Job # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True >>> thread = api.create_namespaced_job(namespace, body, async_req=True) >>> result = thread.get() :param async_req bool: execute request asynchronously :param str namespace: object name and auth scope, such as for teams and projects (required) :param V1Job body: (required) :param str pretty: If 'true', then the output is pretty printed. :param str dry_run: When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed :param str field_manager: fieldManager is a name associated with the actor or entity that is making these changes. The value must be less than or 128 characters long, and only contain printable characters, as defined by https://golang.org/pkg/unicode/#IsPrint. :param _preload_content: if False, the urllib3.HTTPResponse object will be returned without reading/decoding response data. Default is True. :param _request_timeout: timeout setting for this request. If one number provided, it will be total request timeout. It can also be a pair (tuple) of (connection, read) timeouts. :return: V1Job If the method is called asynchronously, returns the request thread.<|endoftext|>
de8db13918a01825ea14eb2b9e056b6a42920dcbd5267af2f0ca30b4de70ceaf
def create_namespaced_job_with_http_info(self, namespace, body, **kwargs): "create_namespaced_job # noqa: E501\n\n create a Job # noqa: E501\n This method makes a synchronous HTTP request by default. To make an\n asynchronous HTTP request, please pass async_req=True\n >>> thread = api.create_namespaced_job_with_http_info(namespace, body, async_req=True)\n >>> result = thread.get()\n\n :param async_req bool: execute request asynchronously\n :param str namespace: object name and auth scope, such as for teams and projects (required)\n :param V1Job body: (required)\n :param str pretty: If 'true', then the output is pretty printed.\n :param str dry_run: When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed\n :param str field_manager: fieldManager is a name associated with the actor or entity that is making these changes. The value must be less than or 128 characters long, and only contain printable characters, as defined by https://golang.org/pkg/unicode/#IsPrint.\n :param _return_http_data_only: response data without head status code\n and headers\n :param _preload_content: if False, the urllib3.HTTPResponse object will\n be returned without reading/decoding response\n data. Default is True.\n :param _request_timeout: timeout setting for this request. If one\n number provided, it will be total request\n timeout. It can also be a pair (tuple) of\n (connection, read) timeouts.\n :return: tuple(V1Job, status_code(int), headers(HTTPHeaderDict))\n If the method is called asynchronously,\n returns the request thread.\n " local_var_params = locals() all_params = ['namespace', 'body', 'pretty', 'dry_run', 'field_manager'] all_params.extend(['async_req', '_return_http_data_only', '_preload_content', '_request_timeout']) for (key, val) in six.iteritems(local_var_params['kwargs']): if (key not in all_params): raise ApiTypeError(("Got an unexpected keyword argument '%s' to method create_namespaced_job" % key)) local_var_params[key] = val del local_var_params['kwargs'] if (self.api_client.client_side_validation and (('namespace' not in local_var_params) or (local_var_params['namespace'] is None))): raise ApiValueError('Missing the required parameter `namespace` when calling `create_namespaced_job`') if (self.api_client.client_side_validation and (('body' not in local_var_params) or (local_var_params['body'] is None))): raise ApiValueError('Missing the required parameter `body` when calling `create_namespaced_job`') collection_formats = {} path_params = {} if ('namespace' in local_var_params): path_params['namespace'] = local_var_params['namespace'] query_params = [] if (('pretty' in local_var_params) and (local_var_params['pretty'] is not None)): query_params.append(('pretty', local_var_params['pretty'])) if (('dry_run' in local_var_params) and (local_var_params['dry_run'] is not None)): query_params.append(('dryRun', local_var_params['dry_run'])) if (('field_manager' in local_var_params) and (local_var_params['field_manager'] is not None)): query_params.append(('fieldManager', local_var_params['field_manager'])) header_params = {} form_params = [] local_var_files = {} body_params = None if ('body' in local_var_params): body_params = local_var_params['body'] header_params['Accept'] = self.api_client.select_header_accept(['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf']) auth_settings = ['BearerToken'] return self.api_client.call_api('/apis/batch/v1/namespaces/{namespace}/jobs', 'POST', path_params, query_params, header_params, body=body_params, post_params=form_params, files=local_var_files, response_type='V1Job', auth_settings=auth_settings, async_req=local_var_params.get('async_req'), _return_http_data_only=local_var_params.get('_return_http_data_only'), _preload_content=local_var_params.get('_preload_content', True), _request_timeout=local_var_params.get('_request_timeout'), collection_formats=collection_formats)
create_namespaced_job # noqa: E501 create a Job # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True >>> thread = api.create_namespaced_job_with_http_info(namespace, body, async_req=True) >>> result = thread.get() :param async_req bool: execute request asynchronously :param str namespace: object name and auth scope, such as for teams and projects (required) :param V1Job body: (required) :param str pretty: If 'true', then the output is pretty printed. :param str dry_run: When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed :param str field_manager: fieldManager is a name associated with the actor or entity that is making these changes. The value must be less than or 128 characters long, and only contain printable characters, as defined by https://golang.org/pkg/unicode/#IsPrint. :param _return_http_data_only: response data without head status code and headers :param _preload_content: if False, the urllib3.HTTPResponse object will be returned without reading/decoding response data. Default is True. :param _request_timeout: timeout setting for this request. If one number provided, it will be total request timeout. It can also be a pair (tuple) of (connection, read) timeouts. :return: tuple(V1Job, status_code(int), headers(HTTPHeaderDict)) If the method is called asynchronously, returns the request thread.
kubernetes/client/api/batch_v1_api.py
create_namespaced_job_with_http_info
knkgun/python
1
python
def create_namespaced_job_with_http_info(self, namespace, body, **kwargs): "create_namespaced_job # noqa: E501\n\n create a Job # noqa: E501\n This method makes a synchronous HTTP request by default. To make an\n asynchronous HTTP request, please pass async_req=True\n >>> thread = api.create_namespaced_job_with_http_info(namespace, body, async_req=True)\n >>> result = thread.get()\n\n :param async_req bool: execute request asynchronously\n :param str namespace: object name and auth scope, such as for teams and projects (required)\n :param V1Job body: (required)\n :param str pretty: If 'true', then the output is pretty printed.\n :param str dry_run: When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed\n :param str field_manager: fieldManager is a name associated with the actor or entity that is making these changes. The value must be less than or 128 characters long, and only contain printable characters, as defined by https://golang.org/pkg/unicode/#IsPrint.\n :param _return_http_data_only: response data without head status code\n and headers\n :param _preload_content: if False, the urllib3.HTTPResponse object will\n be returned without reading/decoding response\n data. Default is True.\n :param _request_timeout: timeout setting for this request. If one\n number provided, it will be total request\n timeout. It can also be a pair (tuple) of\n (connection, read) timeouts.\n :return: tuple(V1Job, status_code(int), headers(HTTPHeaderDict))\n If the method is called asynchronously,\n returns the request thread.\n " local_var_params = locals() all_params = ['namespace', 'body', 'pretty', 'dry_run', 'field_manager'] all_params.extend(['async_req', '_return_http_data_only', '_preload_content', '_request_timeout']) for (key, val) in six.iteritems(local_var_params['kwargs']): if (key not in all_params): raise ApiTypeError(("Got an unexpected keyword argument '%s' to method create_namespaced_job" % key)) local_var_params[key] = val del local_var_params['kwargs'] if (self.api_client.client_side_validation and (('namespace' not in local_var_params) or (local_var_params['namespace'] is None))): raise ApiValueError('Missing the required parameter `namespace` when calling `create_namespaced_job`') if (self.api_client.client_side_validation and (('body' not in local_var_params) or (local_var_params['body'] is None))): raise ApiValueError('Missing the required parameter `body` when calling `create_namespaced_job`') collection_formats = {} path_params = {} if ('namespace' in local_var_params): path_params['namespace'] = local_var_params['namespace'] query_params = [] if (('pretty' in local_var_params) and (local_var_params['pretty'] is not None)): query_params.append(('pretty', local_var_params['pretty'])) if (('dry_run' in local_var_params) and (local_var_params['dry_run'] is not None)): query_params.append(('dryRun', local_var_params['dry_run'])) if (('field_manager' in local_var_params) and (local_var_params['field_manager'] is not None)): query_params.append(('fieldManager', local_var_params['field_manager'])) header_params = {} form_params = [] local_var_files = {} body_params = None if ('body' in local_var_params): body_params = local_var_params['body'] header_params['Accept'] = self.api_client.select_header_accept(['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf']) auth_settings = ['BearerToken'] return self.api_client.call_api('/apis/batch/v1/namespaces/{namespace}/jobs', 'POST', path_params, query_params, header_params, body=body_params, post_params=form_params, files=local_var_files, response_type='V1Job', auth_settings=auth_settings, async_req=local_var_params.get('async_req'), _return_http_data_only=local_var_params.get('_return_http_data_only'), _preload_content=local_var_params.get('_preload_content', True), _request_timeout=local_var_params.get('_request_timeout'), collection_formats=collection_formats)
def create_namespaced_job_with_http_info(self, namespace, body, **kwargs): "create_namespaced_job # noqa: E501\n\n create a Job # noqa: E501\n This method makes a synchronous HTTP request by default. To make an\n asynchronous HTTP request, please pass async_req=True\n >>> thread = api.create_namespaced_job_with_http_info(namespace, body, async_req=True)\n >>> result = thread.get()\n\n :param async_req bool: execute request asynchronously\n :param str namespace: object name and auth scope, such as for teams and projects (required)\n :param V1Job body: (required)\n :param str pretty: If 'true', then the output is pretty printed.\n :param str dry_run: When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed\n :param str field_manager: fieldManager is a name associated with the actor or entity that is making these changes. The value must be less than or 128 characters long, and only contain printable characters, as defined by https://golang.org/pkg/unicode/#IsPrint.\n :param _return_http_data_only: response data without head status code\n and headers\n :param _preload_content: if False, the urllib3.HTTPResponse object will\n be returned without reading/decoding response\n data. Default is True.\n :param _request_timeout: timeout setting for this request. If one\n number provided, it will be total request\n timeout. It can also be a pair (tuple) of\n (connection, read) timeouts.\n :return: tuple(V1Job, status_code(int), headers(HTTPHeaderDict))\n If the method is called asynchronously,\n returns the request thread.\n " local_var_params = locals() all_params = ['namespace', 'body', 'pretty', 'dry_run', 'field_manager'] all_params.extend(['async_req', '_return_http_data_only', '_preload_content', '_request_timeout']) for (key, val) in six.iteritems(local_var_params['kwargs']): if (key not in all_params): raise ApiTypeError(("Got an unexpected keyword argument '%s' to method create_namespaced_job" % key)) local_var_params[key] = val del local_var_params['kwargs'] if (self.api_client.client_side_validation and (('namespace' not in local_var_params) or (local_var_params['namespace'] is None))): raise ApiValueError('Missing the required parameter `namespace` when calling `create_namespaced_job`') if (self.api_client.client_side_validation and (('body' not in local_var_params) or (local_var_params['body'] is None))): raise ApiValueError('Missing the required parameter `body` when calling `create_namespaced_job`') collection_formats = {} path_params = {} if ('namespace' in local_var_params): path_params['namespace'] = local_var_params['namespace'] query_params = [] if (('pretty' in local_var_params) and (local_var_params['pretty'] is not None)): query_params.append(('pretty', local_var_params['pretty'])) if (('dry_run' in local_var_params) and (local_var_params['dry_run'] is not None)): query_params.append(('dryRun', local_var_params['dry_run'])) if (('field_manager' in local_var_params) and (local_var_params['field_manager'] is not None)): query_params.append(('fieldManager', local_var_params['field_manager'])) header_params = {} form_params = [] local_var_files = {} body_params = None if ('body' in local_var_params): body_params = local_var_params['body'] header_params['Accept'] = self.api_client.select_header_accept(['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf']) auth_settings = ['BearerToken'] return self.api_client.call_api('/apis/batch/v1/namespaces/{namespace}/jobs', 'POST', path_params, query_params, header_params, body=body_params, post_params=form_params, files=local_var_files, response_type='V1Job', auth_settings=auth_settings, async_req=local_var_params.get('async_req'), _return_http_data_only=local_var_params.get('_return_http_data_only'), _preload_content=local_var_params.get('_preload_content', True), _request_timeout=local_var_params.get('_request_timeout'), collection_formats=collection_formats)<|docstring|>create_namespaced_job # noqa: E501 create a Job # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True >>> thread = api.create_namespaced_job_with_http_info(namespace, body, async_req=True) >>> result = thread.get() :param async_req bool: execute request asynchronously :param str namespace: object name and auth scope, such as for teams and projects (required) :param V1Job body: (required) :param str pretty: If 'true', then the output is pretty printed. :param str dry_run: When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed :param str field_manager: fieldManager is a name associated with the actor or entity that is making these changes. The value must be less than or 128 characters long, and only contain printable characters, as defined by https://golang.org/pkg/unicode/#IsPrint. :param _return_http_data_only: response data without head status code and headers :param _preload_content: if False, the urllib3.HTTPResponse object will be returned without reading/decoding response data. Default is True. :param _request_timeout: timeout setting for this request. If one number provided, it will be total request timeout. It can also be a pair (tuple) of (connection, read) timeouts. :return: tuple(V1Job, status_code(int), headers(HTTPHeaderDict)) If the method is called asynchronously, returns the request thread.<|endoftext|>
db49aff232f7f52eeffa4a18f4e9129a817e90b6faeb7e18839a434dd9cc8006
def delete_collection_namespaced_cron_job(self, namespace, **kwargs): 'delete_collection_namespaced_cron_job # noqa: E501\n\n delete collection of CronJob # noqa: E501\n This method makes a synchronous HTTP request by default. To make an\n asynchronous HTTP request, please pass async_req=True\n >>> thread = api.delete_collection_namespaced_cron_job(namespace, async_req=True)\n >>> result = thread.get()\n\n :param async_req bool: execute request asynchronously\n :param str namespace: object name and auth scope, such as for teams and projects (required)\n :param str pretty: If \'true\', then the output is pretty printed.\n :param str _continue: The continue option should be set when retrieving more results from the server. Since this value is server defined, clients may only use the continue value from a previous query result with identical query parameters (except for the value of continue) and the server may reject a continue value it does not recognize. If the specified continue value is no longer valid whether due to expiration (generally five to fifteen minutes) or a configuration change on the server, the server will respond with a 410 ResourceExpired error together with a continue token. If the client needs a consistent list, it must restart their list without the continue field. Otherwise, the client may send another list request with the token received with the 410 error, the server will respond with a list starting from the next key, but from the latest snapshot, which is inconsistent from the previous list results - objects that are created, modified, or deleted after the first list request will be included in the response, as long as their keys are after the "next key". This field is not supported when watch is true. Clients may start a watch from the last resourceVersion value returned by the server and not miss any modifications.\n :param str dry_run: When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed\n :param str field_selector: A selector to restrict the list of returned objects by their fields. Defaults to everything.\n :param int grace_period_seconds: The duration in seconds before the object should be deleted. Value must be non-negative integer. The value zero indicates delete immediately. If this value is nil, the default grace period for the specified type will be used. Defaults to a per object value if not specified. zero means delete immediately.\n :param str label_selector: A selector to restrict the list of returned objects by their labels. Defaults to everything.\n :param int limit: limit is a maximum number of responses to return for a list call. If more items exist, the server will set the `continue` field on the list metadata to a value that can be used with the same initial query to retrieve the next set of results. Setting a limit may return fewer than the requested amount of items (up to zero items) in the event all requested objects are filtered out and clients should only use the presence of the continue field to determine whether more results are available. Servers may choose not to support the limit argument and will return all of the available results. If limit is specified and the continue field is empty, clients may assume that no more results are available. This field is not supported if watch is true. The server guarantees that the objects returned when using continue will be identical to issuing a single list call without a limit - that is, no objects created, modified, or deleted after the first request is issued will be included in any subsequent continued requests. This is sometimes referred to as a consistent snapshot, and ensures that a client that is using limit to receive smaller chunks of a very large result can ensure they see all possible objects. If objects are updated during a chunked list the version of the object that was present at the time the first list result was calculated is returned.\n :param bool orphan_dependents: Deprecated: please use the PropagationPolicy, this field will be deprecated in 1.7. Should the dependent objects be orphaned. If true/false, the "orphan" finalizer will be added to/removed from the object\'s finalizers list. Either this field or PropagationPolicy may be set, but not both.\n :param str propagation_policy: Whether and how garbage collection will be performed. Either this field or OrphanDependents may be set, but not both. The default policy is decided by the existing finalizer set in the metadata.finalizers and the resource-specific default policy. Acceptable values are: \'Orphan\' - orphan the dependents; \'Background\' - allow the garbage collector to delete the dependents in the background; \'Foreground\' - a cascading policy that deletes all dependents in the foreground.\n :param str resource_version: resourceVersion sets a constraint on what resource versions a request may be served from. See https://kubernetes.io/docs/reference/using-api/api-concepts/#resource-versions for details. Defaults to unset\n :param str resource_version_match: resourceVersionMatch determines how resourceVersion is applied to list calls. It is highly recommended that resourceVersionMatch be set for list calls where resourceVersion is set See https://kubernetes.io/docs/reference/using-api/api-concepts/#resource-versions for details. Defaults to unset\n :param int timeout_seconds: Timeout for the list/watch call. This limits the duration of the call, regardless of any activity or inactivity.\n :param V1DeleteOptions body:\n :param _preload_content: if False, the urllib3.HTTPResponse object will\n be returned without reading/decoding response\n data. Default is True.\n :param _request_timeout: timeout setting for this request. If one\n number provided, it will be total request\n timeout. It can also be a pair (tuple) of\n (connection, read) timeouts.\n :return: V1Status\n If the method is called asynchronously,\n returns the request thread.\n ' kwargs['_return_http_data_only'] = True return self.delete_collection_namespaced_cron_job_with_http_info(namespace, **kwargs)
delete_collection_namespaced_cron_job # noqa: E501 delete collection of CronJob # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True >>> thread = api.delete_collection_namespaced_cron_job(namespace, async_req=True) >>> result = thread.get() :param async_req bool: execute request asynchronously :param str namespace: object name and auth scope, such as for teams and projects (required) :param str pretty: If 'true', then the output is pretty printed. :param str _continue: The continue option should be set when retrieving more results from the server. Since this value is server defined, clients may only use the continue value from a previous query result with identical query parameters (except for the value of continue) and the server may reject a continue value it does not recognize. If the specified continue value is no longer valid whether due to expiration (generally five to fifteen minutes) or a configuration change on the server, the server will respond with a 410 ResourceExpired error together with a continue token. If the client needs a consistent list, it must restart their list without the continue field. Otherwise, the client may send another list request with the token received with the 410 error, the server will respond with a list starting from the next key, but from the latest snapshot, which is inconsistent from the previous list results - objects that are created, modified, or deleted after the first list request will be included in the response, as long as their keys are after the "next key". This field is not supported when watch is true. Clients may start a watch from the last resourceVersion value returned by the server and not miss any modifications. :param str dry_run: When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed :param str field_selector: A selector to restrict the list of returned objects by their fields. Defaults to everything. :param int grace_period_seconds: The duration in seconds before the object should be deleted. Value must be non-negative integer. The value zero indicates delete immediately. If this value is nil, the default grace period for the specified type will be used. Defaults to a per object value if not specified. zero means delete immediately. :param str label_selector: A selector to restrict the list of returned objects by their labels. Defaults to everything. :param int limit: limit is a maximum number of responses to return for a list call. If more items exist, the server will set the `continue` field on the list metadata to a value that can be used with the same initial query to retrieve the next set of results. Setting a limit may return fewer than the requested amount of items (up to zero items) in the event all requested objects are filtered out and clients should only use the presence of the continue field to determine whether more results are available. Servers may choose not to support the limit argument and will return all of the available results. If limit is specified and the continue field is empty, clients may assume that no more results are available. This field is not supported if watch is true. The server guarantees that the objects returned when using continue will be identical to issuing a single list call without a limit - that is, no objects created, modified, or deleted after the first request is issued will be included in any subsequent continued requests. This is sometimes referred to as a consistent snapshot, and ensures that a client that is using limit to receive smaller chunks of a very large result can ensure they see all possible objects. If objects are updated during a chunked list the version of the object that was present at the time the first list result was calculated is returned. :param bool orphan_dependents: Deprecated: please use the PropagationPolicy, this field will be deprecated in 1.7. Should the dependent objects be orphaned. If true/false, the "orphan" finalizer will be added to/removed from the object's finalizers list. Either this field or PropagationPolicy may be set, but not both. :param str propagation_policy: Whether and how garbage collection will be performed. Either this field or OrphanDependents may be set, but not both. The default policy is decided by the existing finalizer set in the metadata.finalizers and the resource-specific default policy. Acceptable values are: 'Orphan' - orphan the dependents; 'Background' - allow the garbage collector to delete the dependents in the background; 'Foreground' - a cascading policy that deletes all dependents in the foreground. :param str resource_version: resourceVersion sets a constraint on what resource versions a request may be served from. See https://kubernetes.io/docs/reference/using-api/api-concepts/#resource-versions for details. Defaults to unset :param str resource_version_match: resourceVersionMatch determines how resourceVersion is applied to list calls. It is highly recommended that resourceVersionMatch be set for list calls where resourceVersion is set See https://kubernetes.io/docs/reference/using-api/api-concepts/#resource-versions for details. Defaults to unset :param int timeout_seconds: Timeout for the list/watch call. This limits the duration of the call, regardless of any activity or inactivity. :param V1DeleteOptions body: :param _preload_content: if False, the urllib3.HTTPResponse object will be returned without reading/decoding response data. Default is True. :param _request_timeout: timeout setting for this request. If one number provided, it will be total request timeout. It can also be a pair (tuple) of (connection, read) timeouts. :return: V1Status If the method is called asynchronously, returns the request thread.
kubernetes/client/api/batch_v1_api.py
delete_collection_namespaced_cron_job
knkgun/python
1
python
def delete_collection_namespaced_cron_job(self, namespace, **kwargs): 'delete_collection_namespaced_cron_job # noqa: E501\n\n delete collection of CronJob # noqa: E501\n This method makes a synchronous HTTP request by default. To make an\n asynchronous HTTP request, please pass async_req=True\n >>> thread = api.delete_collection_namespaced_cron_job(namespace, async_req=True)\n >>> result = thread.get()\n\n :param async_req bool: execute request asynchronously\n :param str namespace: object name and auth scope, such as for teams and projects (required)\n :param str pretty: If \'true\', then the output is pretty printed.\n :param str _continue: The continue option should be set when retrieving more results from the server. Since this value is server defined, clients may only use the continue value from a previous query result with identical query parameters (except for the value of continue) and the server may reject a continue value it does not recognize. If the specified continue value is no longer valid whether due to expiration (generally five to fifteen minutes) or a configuration change on the server, the server will respond with a 410 ResourceExpired error together with a continue token. If the client needs a consistent list, it must restart their list without the continue field. Otherwise, the client may send another list request with the token received with the 410 error, the server will respond with a list starting from the next key, but from the latest snapshot, which is inconsistent from the previous list results - objects that are created, modified, or deleted after the first list request will be included in the response, as long as their keys are after the "next key". This field is not supported when watch is true. Clients may start a watch from the last resourceVersion value returned by the server and not miss any modifications.\n :param str dry_run: When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed\n :param str field_selector: A selector to restrict the list of returned objects by their fields. Defaults to everything.\n :param int grace_period_seconds: The duration in seconds before the object should be deleted. Value must be non-negative integer. The value zero indicates delete immediately. If this value is nil, the default grace period for the specified type will be used. Defaults to a per object value if not specified. zero means delete immediately.\n :param str label_selector: A selector to restrict the list of returned objects by their labels. Defaults to everything.\n :param int limit: limit is a maximum number of responses to return for a list call. If more items exist, the server will set the `continue` field on the list metadata to a value that can be used with the same initial query to retrieve the next set of results. Setting a limit may return fewer than the requested amount of items (up to zero items) in the event all requested objects are filtered out and clients should only use the presence of the continue field to determine whether more results are available. Servers may choose not to support the limit argument and will return all of the available results. If limit is specified and the continue field is empty, clients may assume that no more results are available. This field is not supported if watch is true. The server guarantees that the objects returned when using continue will be identical to issuing a single list call without a limit - that is, no objects created, modified, or deleted after the first request is issued will be included in any subsequent continued requests. This is sometimes referred to as a consistent snapshot, and ensures that a client that is using limit to receive smaller chunks of a very large result can ensure they see all possible objects. If objects are updated during a chunked list the version of the object that was present at the time the first list result was calculated is returned.\n :param bool orphan_dependents: Deprecated: please use the PropagationPolicy, this field will be deprecated in 1.7. Should the dependent objects be orphaned. If true/false, the "orphan" finalizer will be added to/removed from the object\'s finalizers list. Either this field or PropagationPolicy may be set, but not both.\n :param str propagation_policy: Whether and how garbage collection will be performed. Either this field or OrphanDependents may be set, but not both. The default policy is decided by the existing finalizer set in the metadata.finalizers and the resource-specific default policy. Acceptable values are: \'Orphan\' - orphan the dependents; \'Background\' - allow the garbage collector to delete the dependents in the background; \'Foreground\' - a cascading policy that deletes all dependents in the foreground.\n :param str resource_version: resourceVersion sets a constraint on what resource versions a request may be served from. See https://kubernetes.io/docs/reference/using-api/api-concepts/#resource-versions for details. Defaults to unset\n :param str resource_version_match: resourceVersionMatch determines how resourceVersion is applied to list calls. It is highly recommended that resourceVersionMatch be set for list calls where resourceVersion is set See https://kubernetes.io/docs/reference/using-api/api-concepts/#resource-versions for details. Defaults to unset\n :param int timeout_seconds: Timeout for the list/watch call. This limits the duration of the call, regardless of any activity or inactivity.\n :param V1DeleteOptions body:\n :param _preload_content: if False, the urllib3.HTTPResponse object will\n be returned without reading/decoding response\n data. Default is True.\n :param _request_timeout: timeout setting for this request. If one\n number provided, it will be total request\n timeout. It can also be a pair (tuple) of\n (connection, read) timeouts.\n :return: V1Status\n If the method is called asynchronously,\n returns the request thread.\n ' kwargs['_return_http_data_only'] = True return self.delete_collection_namespaced_cron_job_with_http_info(namespace, **kwargs)
def delete_collection_namespaced_cron_job(self, namespace, **kwargs): 'delete_collection_namespaced_cron_job # noqa: E501\n\n delete collection of CronJob # noqa: E501\n This method makes a synchronous HTTP request by default. To make an\n asynchronous HTTP request, please pass async_req=True\n >>> thread = api.delete_collection_namespaced_cron_job(namespace, async_req=True)\n >>> result = thread.get()\n\n :param async_req bool: execute request asynchronously\n :param str namespace: object name and auth scope, such as for teams and projects (required)\n :param str pretty: If \'true\', then the output is pretty printed.\n :param str _continue: The continue option should be set when retrieving more results from the server. Since this value is server defined, clients may only use the continue value from a previous query result with identical query parameters (except for the value of continue) and the server may reject a continue value it does not recognize. If the specified continue value is no longer valid whether due to expiration (generally five to fifteen minutes) or a configuration change on the server, the server will respond with a 410 ResourceExpired error together with a continue token. If the client needs a consistent list, it must restart their list without the continue field. Otherwise, the client may send another list request with the token received with the 410 error, the server will respond with a list starting from the next key, but from the latest snapshot, which is inconsistent from the previous list results - objects that are created, modified, or deleted after the first list request will be included in the response, as long as their keys are after the "next key". This field is not supported when watch is true. Clients may start a watch from the last resourceVersion value returned by the server and not miss any modifications.\n :param str dry_run: When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed\n :param str field_selector: A selector to restrict the list of returned objects by their fields. Defaults to everything.\n :param int grace_period_seconds: The duration in seconds before the object should be deleted. Value must be non-negative integer. The value zero indicates delete immediately. If this value is nil, the default grace period for the specified type will be used. Defaults to a per object value if not specified. zero means delete immediately.\n :param str label_selector: A selector to restrict the list of returned objects by their labels. Defaults to everything.\n :param int limit: limit is a maximum number of responses to return for a list call. If more items exist, the server will set the `continue` field on the list metadata to a value that can be used with the same initial query to retrieve the next set of results. Setting a limit may return fewer than the requested amount of items (up to zero items) in the event all requested objects are filtered out and clients should only use the presence of the continue field to determine whether more results are available. Servers may choose not to support the limit argument and will return all of the available results. If limit is specified and the continue field is empty, clients may assume that no more results are available. This field is not supported if watch is true. The server guarantees that the objects returned when using continue will be identical to issuing a single list call without a limit - that is, no objects created, modified, or deleted after the first request is issued will be included in any subsequent continued requests. This is sometimes referred to as a consistent snapshot, and ensures that a client that is using limit to receive smaller chunks of a very large result can ensure they see all possible objects. If objects are updated during a chunked list the version of the object that was present at the time the first list result was calculated is returned.\n :param bool orphan_dependents: Deprecated: please use the PropagationPolicy, this field will be deprecated in 1.7. Should the dependent objects be orphaned. If true/false, the "orphan" finalizer will be added to/removed from the object\'s finalizers list. Either this field or PropagationPolicy may be set, but not both.\n :param str propagation_policy: Whether and how garbage collection will be performed. Either this field or OrphanDependents may be set, but not both. The default policy is decided by the existing finalizer set in the metadata.finalizers and the resource-specific default policy. Acceptable values are: \'Orphan\' - orphan the dependents; \'Background\' - allow the garbage collector to delete the dependents in the background; \'Foreground\' - a cascading policy that deletes all dependents in the foreground.\n :param str resource_version: resourceVersion sets a constraint on what resource versions a request may be served from. See https://kubernetes.io/docs/reference/using-api/api-concepts/#resource-versions for details. Defaults to unset\n :param str resource_version_match: resourceVersionMatch determines how resourceVersion is applied to list calls. It is highly recommended that resourceVersionMatch be set for list calls where resourceVersion is set See https://kubernetes.io/docs/reference/using-api/api-concepts/#resource-versions for details. Defaults to unset\n :param int timeout_seconds: Timeout for the list/watch call. This limits the duration of the call, regardless of any activity or inactivity.\n :param V1DeleteOptions body:\n :param _preload_content: if False, the urllib3.HTTPResponse object will\n be returned without reading/decoding response\n data. Default is True.\n :param _request_timeout: timeout setting for this request. If one\n number provided, it will be total request\n timeout. It can also be a pair (tuple) of\n (connection, read) timeouts.\n :return: V1Status\n If the method is called asynchronously,\n returns the request thread.\n ' kwargs['_return_http_data_only'] = True return self.delete_collection_namespaced_cron_job_with_http_info(namespace, **kwargs)<|docstring|>delete_collection_namespaced_cron_job # noqa: E501 delete collection of CronJob # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True >>> thread = api.delete_collection_namespaced_cron_job(namespace, async_req=True) >>> result = thread.get() :param async_req bool: execute request asynchronously :param str namespace: object name and auth scope, such as for teams and projects (required) :param str pretty: If 'true', then the output is pretty printed. :param str _continue: The continue option should be set when retrieving more results from the server. Since this value is server defined, clients may only use the continue value from a previous query result with identical query parameters (except for the value of continue) and the server may reject a continue value it does not recognize. If the specified continue value is no longer valid whether due to expiration (generally five to fifteen minutes) or a configuration change on the server, the server will respond with a 410 ResourceExpired error together with a continue token. If the client needs a consistent list, it must restart their list without the continue field. Otherwise, the client may send another list request with the token received with the 410 error, the server will respond with a list starting from the next key, but from the latest snapshot, which is inconsistent from the previous list results - objects that are created, modified, or deleted after the first list request will be included in the response, as long as their keys are after the "next key". This field is not supported when watch is true. Clients may start a watch from the last resourceVersion value returned by the server and not miss any modifications. :param str dry_run: When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed :param str field_selector: A selector to restrict the list of returned objects by their fields. Defaults to everything. :param int grace_period_seconds: The duration in seconds before the object should be deleted. Value must be non-negative integer. The value zero indicates delete immediately. If this value is nil, the default grace period for the specified type will be used. Defaults to a per object value if not specified. zero means delete immediately. :param str label_selector: A selector to restrict the list of returned objects by their labels. Defaults to everything. :param int limit: limit is a maximum number of responses to return for a list call. If more items exist, the server will set the `continue` field on the list metadata to a value that can be used with the same initial query to retrieve the next set of results. Setting a limit may return fewer than the requested amount of items (up to zero items) in the event all requested objects are filtered out and clients should only use the presence of the continue field to determine whether more results are available. Servers may choose not to support the limit argument and will return all of the available results. If limit is specified and the continue field is empty, clients may assume that no more results are available. This field is not supported if watch is true. The server guarantees that the objects returned when using continue will be identical to issuing a single list call without a limit - that is, no objects created, modified, or deleted after the first request is issued will be included in any subsequent continued requests. This is sometimes referred to as a consistent snapshot, and ensures that a client that is using limit to receive smaller chunks of a very large result can ensure they see all possible objects. If objects are updated during a chunked list the version of the object that was present at the time the first list result was calculated is returned. :param bool orphan_dependents: Deprecated: please use the PropagationPolicy, this field will be deprecated in 1.7. Should the dependent objects be orphaned. If true/false, the "orphan" finalizer will be added to/removed from the object's finalizers list. Either this field or PropagationPolicy may be set, but not both. :param str propagation_policy: Whether and how garbage collection will be performed. Either this field or OrphanDependents may be set, but not both. The default policy is decided by the existing finalizer set in the metadata.finalizers and the resource-specific default policy. Acceptable values are: 'Orphan' - orphan the dependents; 'Background' - allow the garbage collector to delete the dependents in the background; 'Foreground' - a cascading policy that deletes all dependents in the foreground. :param str resource_version: resourceVersion sets a constraint on what resource versions a request may be served from. See https://kubernetes.io/docs/reference/using-api/api-concepts/#resource-versions for details. Defaults to unset :param str resource_version_match: resourceVersionMatch determines how resourceVersion is applied to list calls. It is highly recommended that resourceVersionMatch be set for list calls where resourceVersion is set See https://kubernetes.io/docs/reference/using-api/api-concepts/#resource-versions for details. Defaults to unset :param int timeout_seconds: Timeout for the list/watch call. This limits the duration of the call, regardless of any activity or inactivity. :param V1DeleteOptions body: :param _preload_content: if False, the urllib3.HTTPResponse object will be returned without reading/decoding response data. Default is True. :param _request_timeout: timeout setting for this request. If one number provided, it will be total request timeout. It can also be a pair (tuple) of (connection, read) timeouts. :return: V1Status If the method is called asynchronously, returns the request thread.<|endoftext|>
65803a593f87d58f6e23490dba12ec75c58f7b3107f6d2f097ccd4b65af87f02
def delete_collection_namespaced_cron_job_with_http_info(self, namespace, **kwargs): 'delete_collection_namespaced_cron_job # noqa: E501\n\n delete collection of CronJob # noqa: E501\n This method makes a synchronous HTTP request by default. To make an\n asynchronous HTTP request, please pass async_req=True\n >>> thread = api.delete_collection_namespaced_cron_job_with_http_info(namespace, async_req=True)\n >>> result = thread.get()\n\n :param async_req bool: execute request asynchronously\n :param str namespace: object name and auth scope, such as for teams and projects (required)\n :param str pretty: If \'true\', then the output is pretty printed.\n :param str _continue: The continue option should be set when retrieving more results from the server. Since this value is server defined, clients may only use the continue value from a previous query result with identical query parameters (except for the value of continue) and the server may reject a continue value it does not recognize. If the specified continue value is no longer valid whether due to expiration (generally five to fifteen minutes) or a configuration change on the server, the server will respond with a 410 ResourceExpired error together with a continue token. If the client needs a consistent list, it must restart their list without the continue field. Otherwise, the client may send another list request with the token received with the 410 error, the server will respond with a list starting from the next key, but from the latest snapshot, which is inconsistent from the previous list results - objects that are created, modified, or deleted after the first list request will be included in the response, as long as their keys are after the "next key". This field is not supported when watch is true. Clients may start a watch from the last resourceVersion value returned by the server and not miss any modifications.\n :param str dry_run: When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed\n :param str field_selector: A selector to restrict the list of returned objects by their fields. Defaults to everything.\n :param int grace_period_seconds: The duration in seconds before the object should be deleted. Value must be non-negative integer. The value zero indicates delete immediately. If this value is nil, the default grace period for the specified type will be used. Defaults to a per object value if not specified. zero means delete immediately.\n :param str label_selector: A selector to restrict the list of returned objects by their labels. Defaults to everything.\n :param int limit: limit is a maximum number of responses to return for a list call. If more items exist, the server will set the `continue` field on the list metadata to a value that can be used with the same initial query to retrieve the next set of results. Setting a limit may return fewer than the requested amount of items (up to zero items) in the event all requested objects are filtered out and clients should only use the presence of the continue field to determine whether more results are available. Servers may choose not to support the limit argument and will return all of the available results. If limit is specified and the continue field is empty, clients may assume that no more results are available. This field is not supported if watch is true. The server guarantees that the objects returned when using continue will be identical to issuing a single list call without a limit - that is, no objects created, modified, or deleted after the first request is issued will be included in any subsequent continued requests. This is sometimes referred to as a consistent snapshot, and ensures that a client that is using limit to receive smaller chunks of a very large result can ensure they see all possible objects. If objects are updated during a chunked list the version of the object that was present at the time the first list result was calculated is returned.\n :param bool orphan_dependents: Deprecated: please use the PropagationPolicy, this field will be deprecated in 1.7. Should the dependent objects be orphaned. If true/false, the "orphan" finalizer will be added to/removed from the object\'s finalizers list. Either this field or PropagationPolicy may be set, but not both.\n :param str propagation_policy: Whether and how garbage collection will be performed. Either this field or OrphanDependents may be set, but not both. The default policy is decided by the existing finalizer set in the metadata.finalizers and the resource-specific default policy. Acceptable values are: \'Orphan\' - orphan the dependents; \'Background\' - allow the garbage collector to delete the dependents in the background; \'Foreground\' - a cascading policy that deletes all dependents in the foreground.\n :param str resource_version: resourceVersion sets a constraint on what resource versions a request may be served from. See https://kubernetes.io/docs/reference/using-api/api-concepts/#resource-versions for details. Defaults to unset\n :param str resource_version_match: resourceVersionMatch determines how resourceVersion is applied to list calls. It is highly recommended that resourceVersionMatch be set for list calls where resourceVersion is set See https://kubernetes.io/docs/reference/using-api/api-concepts/#resource-versions for details. Defaults to unset\n :param int timeout_seconds: Timeout for the list/watch call. This limits the duration of the call, regardless of any activity or inactivity.\n :param V1DeleteOptions body:\n :param _return_http_data_only: response data without head status code\n and headers\n :param _preload_content: if False, the urllib3.HTTPResponse object will\n be returned without reading/decoding response\n data. Default is True.\n :param _request_timeout: timeout setting for this request. If one\n number provided, it will be total request\n timeout. It can also be a pair (tuple) of\n (connection, read) timeouts.\n :return: tuple(V1Status, status_code(int), headers(HTTPHeaderDict))\n If the method is called asynchronously,\n returns the request thread.\n ' local_var_params = locals() all_params = ['namespace', 'pretty', '_continue', 'dry_run', 'field_selector', 'grace_period_seconds', 'label_selector', 'limit', 'orphan_dependents', 'propagation_policy', 'resource_version', 'resource_version_match', 'timeout_seconds', 'body'] all_params.extend(['async_req', '_return_http_data_only', '_preload_content', '_request_timeout']) for (key, val) in six.iteritems(local_var_params['kwargs']): if (key not in all_params): raise ApiTypeError(("Got an unexpected keyword argument '%s' to method delete_collection_namespaced_cron_job" % key)) local_var_params[key] = val del local_var_params['kwargs'] if (self.api_client.client_side_validation and (('namespace' not in local_var_params) or (local_var_params['namespace'] is None))): raise ApiValueError('Missing the required parameter `namespace` when calling `delete_collection_namespaced_cron_job`') collection_formats = {} path_params = {} if ('namespace' in local_var_params): path_params['namespace'] = local_var_params['namespace'] query_params = [] if (('pretty' in local_var_params) and (local_var_params['pretty'] is not None)): query_params.append(('pretty', local_var_params['pretty'])) if (('_continue' in local_var_params) and (local_var_params['_continue'] is not None)): query_params.append(('continue', local_var_params['_continue'])) if (('dry_run' in local_var_params) and (local_var_params['dry_run'] is not None)): query_params.append(('dryRun', local_var_params['dry_run'])) if (('field_selector' in local_var_params) and (local_var_params['field_selector'] is not None)): query_params.append(('fieldSelector', local_var_params['field_selector'])) if (('grace_period_seconds' in local_var_params) and (local_var_params['grace_period_seconds'] is not None)): query_params.append(('gracePeriodSeconds', local_var_params['grace_period_seconds'])) if (('label_selector' in local_var_params) and (local_var_params['label_selector'] is not None)): query_params.append(('labelSelector', local_var_params['label_selector'])) if (('limit' in local_var_params) and (local_var_params['limit'] is not None)): query_params.append(('limit', local_var_params['limit'])) if (('orphan_dependents' in local_var_params) and (local_var_params['orphan_dependents'] is not None)): query_params.append(('orphanDependents', local_var_params['orphan_dependents'])) if (('propagation_policy' in local_var_params) and (local_var_params['propagation_policy'] is not None)): query_params.append(('propagationPolicy', local_var_params['propagation_policy'])) if (('resource_version' in local_var_params) and (local_var_params['resource_version'] is not None)): query_params.append(('resourceVersion', local_var_params['resource_version'])) if (('resource_version_match' in local_var_params) and (local_var_params['resource_version_match'] is not None)): query_params.append(('resourceVersionMatch', local_var_params['resource_version_match'])) if (('timeout_seconds' in local_var_params) and (local_var_params['timeout_seconds'] is not None)): query_params.append(('timeoutSeconds', local_var_params['timeout_seconds'])) header_params = {} form_params = [] local_var_files = {} body_params = None if ('body' in local_var_params): body_params = local_var_params['body'] header_params['Accept'] = self.api_client.select_header_accept(['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf']) auth_settings = ['BearerToken'] return self.api_client.call_api('/apis/batch/v1/namespaces/{namespace}/cronjobs', 'DELETE', path_params, query_params, header_params, body=body_params, post_params=form_params, files=local_var_files, response_type='V1Status', auth_settings=auth_settings, async_req=local_var_params.get('async_req'), _return_http_data_only=local_var_params.get('_return_http_data_only'), _preload_content=local_var_params.get('_preload_content', True), _request_timeout=local_var_params.get('_request_timeout'), collection_formats=collection_formats)
delete_collection_namespaced_cron_job # noqa: E501 delete collection of CronJob # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True >>> thread = api.delete_collection_namespaced_cron_job_with_http_info(namespace, async_req=True) >>> result = thread.get() :param async_req bool: execute request asynchronously :param str namespace: object name and auth scope, such as for teams and projects (required) :param str pretty: If 'true', then the output is pretty printed. :param str _continue: The continue option should be set when retrieving more results from the server. Since this value is server defined, clients may only use the continue value from a previous query result with identical query parameters (except for the value of continue) and the server may reject a continue value it does not recognize. If the specified continue value is no longer valid whether due to expiration (generally five to fifteen minutes) or a configuration change on the server, the server will respond with a 410 ResourceExpired error together with a continue token. If the client needs a consistent list, it must restart their list without the continue field. Otherwise, the client may send another list request with the token received with the 410 error, the server will respond with a list starting from the next key, but from the latest snapshot, which is inconsistent from the previous list results - objects that are created, modified, or deleted after the first list request will be included in the response, as long as their keys are after the "next key". This field is not supported when watch is true. Clients may start a watch from the last resourceVersion value returned by the server and not miss any modifications. :param str dry_run: When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed :param str field_selector: A selector to restrict the list of returned objects by their fields. Defaults to everything. :param int grace_period_seconds: The duration in seconds before the object should be deleted. Value must be non-negative integer. The value zero indicates delete immediately. If this value is nil, the default grace period for the specified type will be used. Defaults to a per object value if not specified. zero means delete immediately. :param str label_selector: A selector to restrict the list of returned objects by their labels. Defaults to everything. :param int limit: limit is a maximum number of responses to return for a list call. If more items exist, the server will set the `continue` field on the list metadata to a value that can be used with the same initial query to retrieve the next set of results. Setting a limit may return fewer than the requested amount of items (up to zero items) in the event all requested objects are filtered out and clients should only use the presence of the continue field to determine whether more results are available. Servers may choose not to support the limit argument and will return all of the available results. If limit is specified and the continue field is empty, clients may assume that no more results are available. This field is not supported if watch is true. The server guarantees that the objects returned when using continue will be identical to issuing a single list call without a limit - that is, no objects created, modified, or deleted after the first request is issued will be included in any subsequent continued requests. This is sometimes referred to as a consistent snapshot, and ensures that a client that is using limit to receive smaller chunks of a very large result can ensure they see all possible objects. If objects are updated during a chunked list the version of the object that was present at the time the first list result was calculated is returned. :param bool orphan_dependents: Deprecated: please use the PropagationPolicy, this field will be deprecated in 1.7. Should the dependent objects be orphaned. If true/false, the "orphan" finalizer will be added to/removed from the object's finalizers list. Either this field or PropagationPolicy may be set, but not both. :param str propagation_policy: Whether and how garbage collection will be performed. Either this field or OrphanDependents may be set, but not both. The default policy is decided by the existing finalizer set in the metadata.finalizers and the resource-specific default policy. Acceptable values are: 'Orphan' - orphan the dependents; 'Background' - allow the garbage collector to delete the dependents in the background; 'Foreground' - a cascading policy that deletes all dependents in the foreground. :param str resource_version: resourceVersion sets a constraint on what resource versions a request may be served from. See https://kubernetes.io/docs/reference/using-api/api-concepts/#resource-versions for details. Defaults to unset :param str resource_version_match: resourceVersionMatch determines how resourceVersion is applied to list calls. It is highly recommended that resourceVersionMatch be set for list calls where resourceVersion is set See https://kubernetes.io/docs/reference/using-api/api-concepts/#resource-versions for details. Defaults to unset :param int timeout_seconds: Timeout for the list/watch call. This limits the duration of the call, regardless of any activity or inactivity. :param V1DeleteOptions body: :param _return_http_data_only: response data without head status code and headers :param _preload_content: if False, the urllib3.HTTPResponse object will be returned without reading/decoding response data. Default is True. :param _request_timeout: timeout setting for this request. If one number provided, it will be total request timeout. It can also be a pair (tuple) of (connection, read) timeouts. :return: tuple(V1Status, status_code(int), headers(HTTPHeaderDict)) If the method is called asynchronously, returns the request thread.
kubernetes/client/api/batch_v1_api.py
delete_collection_namespaced_cron_job_with_http_info
knkgun/python
1
python
def delete_collection_namespaced_cron_job_with_http_info(self, namespace, **kwargs): 'delete_collection_namespaced_cron_job # noqa: E501\n\n delete collection of CronJob # noqa: E501\n This method makes a synchronous HTTP request by default. To make an\n asynchronous HTTP request, please pass async_req=True\n >>> thread = api.delete_collection_namespaced_cron_job_with_http_info(namespace, async_req=True)\n >>> result = thread.get()\n\n :param async_req bool: execute request asynchronously\n :param str namespace: object name and auth scope, such as for teams and projects (required)\n :param str pretty: If \'true\', then the output is pretty printed.\n :param str _continue: The continue option should be set when retrieving more results from the server. Since this value is server defined, clients may only use the continue value from a previous query result with identical query parameters (except for the value of continue) and the server may reject a continue value it does not recognize. If the specified continue value is no longer valid whether due to expiration (generally five to fifteen minutes) or a configuration change on the server, the server will respond with a 410 ResourceExpired error together with a continue token. If the client needs a consistent list, it must restart their list without the continue field. Otherwise, the client may send another list request with the token received with the 410 error, the server will respond with a list starting from the next key, but from the latest snapshot, which is inconsistent from the previous list results - objects that are created, modified, or deleted after the first list request will be included in the response, as long as their keys are after the "next key". This field is not supported when watch is true. Clients may start a watch from the last resourceVersion value returned by the server and not miss any modifications.\n :param str dry_run: When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed\n :param str field_selector: A selector to restrict the list of returned objects by their fields. Defaults to everything.\n :param int grace_period_seconds: The duration in seconds before the object should be deleted. Value must be non-negative integer. The value zero indicates delete immediately. If this value is nil, the default grace period for the specified type will be used. Defaults to a per object value if not specified. zero means delete immediately.\n :param str label_selector: A selector to restrict the list of returned objects by their labels. Defaults to everything.\n :param int limit: limit is a maximum number of responses to return for a list call. If more items exist, the server will set the `continue` field on the list metadata to a value that can be used with the same initial query to retrieve the next set of results. Setting a limit may return fewer than the requested amount of items (up to zero items) in the event all requested objects are filtered out and clients should only use the presence of the continue field to determine whether more results are available. Servers may choose not to support the limit argument and will return all of the available results. If limit is specified and the continue field is empty, clients may assume that no more results are available. This field is not supported if watch is true. The server guarantees that the objects returned when using continue will be identical to issuing a single list call without a limit - that is, no objects created, modified, or deleted after the first request is issued will be included in any subsequent continued requests. This is sometimes referred to as a consistent snapshot, and ensures that a client that is using limit to receive smaller chunks of a very large result can ensure they see all possible objects. If objects are updated during a chunked list the version of the object that was present at the time the first list result was calculated is returned.\n :param bool orphan_dependents: Deprecated: please use the PropagationPolicy, this field will be deprecated in 1.7. Should the dependent objects be orphaned. If true/false, the "orphan" finalizer will be added to/removed from the object\'s finalizers list. Either this field or PropagationPolicy may be set, but not both.\n :param str propagation_policy: Whether and how garbage collection will be performed. Either this field or OrphanDependents may be set, but not both. The default policy is decided by the existing finalizer set in the metadata.finalizers and the resource-specific default policy. Acceptable values are: \'Orphan\' - orphan the dependents; \'Background\' - allow the garbage collector to delete the dependents in the background; \'Foreground\' - a cascading policy that deletes all dependents in the foreground.\n :param str resource_version: resourceVersion sets a constraint on what resource versions a request may be served from. See https://kubernetes.io/docs/reference/using-api/api-concepts/#resource-versions for details. Defaults to unset\n :param str resource_version_match: resourceVersionMatch determines how resourceVersion is applied to list calls. It is highly recommended that resourceVersionMatch be set for list calls where resourceVersion is set See https://kubernetes.io/docs/reference/using-api/api-concepts/#resource-versions for details. Defaults to unset\n :param int timeout_seconds: Timeout for the list/watch call. This limits the duration of the call, regardless of any activity or inactivity.\n :param V1DeleteOptions body:\n :param _return_http_data_only: response data without head status code\n and headers\n :param _preload_content: if False, the urllib3.HTTPResponse object will\n be returned without reading/decoding response\n data. Default is True.\n :param _request_timeout: timeout setting for this request. If one\n number provided, it will be total request\n timeout. It can also be a pair (tuple) of\n (connection, read) timeouts.\n :return: tuple(V1Status, status_code(int), headers(HTTPHeaderDict))\n If the method is called asynchronously,\n returns the request thread.\n ' local_var_params = locals() all_params = ['namespace', 'pretty', '_continue', 'dry_run', 'field_selector', 'grace_period_seconds', 'label_selector', 'limit', 'orphan_dependents', 'propagation_policy', 'resource_version', 'resource_version_match', 'timeout_seconds', 'body'] all_params.extend(['async_req', '_return_http_data_only', '_preload_content', '_request_timeout']) for (key, val) in six.iteritems(local_var_params['kwargs']): if (key not in all_params): raise ApiTypeError(("Got an unexpected keyword argument '%s' to method delete_collection_namespaced_cron_job" % key)) local_var_params[key] = val del local_var_params['kwargs'] if (self.api_client.client_side_validation and (('namespace' not in local_var_params) or (local_var_params['namespace'] is None))): raise ApiValueError('Missing the required parameter `namespace` when calling `delete_collection_namespaced_cron_job`') collection_formats = {} path_params = {} if ('namespace' in local_var_params): path_params['namespace'] = local_var_params['namespace'] query_params = [] if (('pretty' in local_var_params) and (local_var_params['pretty'] is not None)): query_params.append(('pretty', local_var_params['pretty'])) if (('_continue' in local_var_params) and (local_var_params['_continue'] is not None)): query_params.append(('continue', local_var_params['_continue'])) if (('dry_run' in local_var_params) and (local_var_params['dry_run'] is not None)): query_params.append(('dryRun', local_var_params['dry_run'])) if (('field_selector' in local_var_params) and (local_var_params['field_selector'] is not None)): query_params.append(('fieldSelector', local_var_params['field_selector'])) if (('grace_period_seconds' in local_var_params) and (local_var_params['grace_period_seconds'] is not None)): query_params.append(('gracePeriodSeconds', local_var_params['grace_period_seconds'])) if (('label_selector' in local_var_params) and (local_var_params['label_selector'] is not None)): query_params.append(('labelSelector', local_var_params['label_selector'])) if (('limit' in local_var_params) and (local_var_params['limit'] is not None)): query_params.append(('limit', local_var_params['limit'])) if (('orphan_dependents' in local_var_params) and (local_var_params['orphan_dependents'] is not None)): query_params.append(('orphanDependents', local_var_params['orphan_dependents'])) if (('propagation_policy' in local_var_params) and (local_var_params['propagation_policy'] is not None)): query_params.append(('propagationPolicy', local_var_params['propagation_policy'])) if (('resource_version' in local_var_params) and (local_var_params['resource_version'] is not None)): query_params.append(('resourceVersion', local_var_params['resource_version'])) if (('resource_version_match' in local_var_params) and (local_var_params['resource_version_match'] is not None)): query_params.append(('resourceVersionMatch', local_var_params['resource_version_match'])) if (('timeout_seconds' in local_var_params) and (local_var_params['timeout_seconds'] is not None)): query_params.append(('timeoutSeconds', local_var_params['timeout_seconds'])) header_params = {} form_params = [] local_var_files = {} body_params = None if ('body' in local_var_params): body_params = local_var_params['body'] header_params['Accept'] = self.api_client.select_header_accept(['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf']) auth_settings = ['BearerToken'] return self.api_client.call_api('/apis/batch/v1/namespaces/{namespace}/cronjobs', 'DELETE', path_params, query_params, header_params, body=body_params, post_params=form_params, files=local_var_files, response_type='V1Status', auth_settings=auth_settings, async_req=local_var_params.get('async_req'), _return_http_data_only=local_var_params.get('_return_http_data_only'), _preload_content=local_var_params.get('_preload_content', True), _request_timeout=local_var_params.get('_request_timeout'), collection_formats=collection_formats)
def delete_collection_namespaced_cron_job_with_http_info(self, namespace, **kwargs): 'delete_collection_namespaced_cron_job # noqa: E501\n\n delete collection of CronJob # noqa: E501\n This method makes a synchronous HTTP request by default. To make an\n asynchronous HTTP request, please pass async_req=True\n >>> thread = api.delete_collection_namespaced_cron_job_with_http_info(namespace, async_req=True)\n >>> result = thread.get()\n\n :param async_req bool: execute request asynchronously\n :param str namespace: object name and auth scope, such as for teams and projects (required)\n :param str pretty: If \'true\', then the output is pretty printed.\n :param str _continue: The continue option should be set when retrieving more results from the server. Since this value is server defined, clients may only use the continue value from a previous query result with identical query parameters (except for the value of continue) and the server may reject a continue value it does not recognize. If the specified continue value is no longer valid whether due to expiration (generally five to fifteen minutes) or a configuration change on the server, the server will respond with a 410 ResourceExpired error together with a continue token. If the client needs a consistent list, it must restart their list without the continue field. Otherwise, the client may send another list request with the token received with the 410 error, the server will respond with a list starting from the next key, but from the latest snapshot, which is inconsistent from the previous list results - objects that are created, modified, or deleted after the first list request will be included in the response, as long as their keys are after the "next key". This field is not supported when watch is true. Clients may start a watch from the last resourceVersion value returned by the server and not miss any modifications.\n :param str dry_run: When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed\n :param str field_selector: A selector to restrict the list of returned objects by their fields. Defaults to everything.\n :param int grace_period_seconds: The duration in seconds before the object should be deleted. Value must be non-negative integer. The value zero indicates delete immediately. If this value is nil, the default grace period for the specified type will be used. Defaults to a per object value if not specified. zero means delete immediately.\n :param str label_selector: A selector to restrict the list of returned objects by their labels. Defaults to everything.\n :param int limit: limit is a maximum number of responses to return for a list call. If more items exist, the server will set the `continue` field on the list metadata to a value that can be used with the same initial query to retrieve the next set of results. Setting a limit may return fewer than the requested amount of items (up to zero items) in the event all requested objects are filtered out and clients should only use the presence of the continue field to determine whether more results are available. Servers may choose not to support the limit argument and will return all of the available results. If limit is specified and the continue field is empty, clients may assume that no more results are available. This field is not supported if watch is true. The server guarantees that the objects returned when using continue will be identical to issuing a single list call without a limit - that is, no objects created, modified, or deleted after the first request is issued will be included in any subsequent continued requests. This is sometimes referred to as a consistent snapshot, and ensures that a client that is using limit to receive smaller chunks of a very large result can ensure they see all possible objects. If objects are updated during a chunked list the version of the object that was present at the time the first list result was calculated is returned.\n :param bool orphan_dependents: Deprecated: please use the PropagationPolicy, this field will be deprecated in 1.7. Should the dependent objects be orphaned. If true/false, the "orphan" finalizer will be added to/removed from the object\'s finalizers list. Either this field or PropagationPolicy may be set, but not both.\n :param str propagation_policy: Whether and how garbage collection will be performed. Either this field or OrphanDependents may be set, but not both. The default policy is decided by the existing finalizer set in the metadata.finalizers and the resource-specific default policy. Acceptable values are: \'Orphan\' - orphan the dependents; \'Background\' - allow the garbage collector to delete the dependents in the background; \'Foreground\' - a cascading policy that deletes all dependents in the foreground.\n :param str resource_version: resourceVersion sets a constraint on what resource versions a request may be served from. See https://kubernetes.io/docs/reference/using-api/api-concepts/#resource-versions for details. Defaults to unset\n :param str resource_version_match: resourceVersionMatch determines how resourceVersion is applied to list calls. It is highly recommended that resourceVersionMatch be set for list calls where resourceVersion is set See https://kubernetes.io/docs/reference/using-api/api-concepts/#resource-versions for details. Defaults to unset\n :param int timeout_seconds: Timeout for the list/watch call. This limits the duration of the call, regardless of any activity or inactivity.\n :param V1DeleteOptions body:\n :param _return_http_data_only: response data without head status code\n and headers\n :param _preload_content: if False, the urllib3.HTTPResponse object will\n be returned without reading/decoding response\n data. Default is True.\n :param _request_timeout: timeout setting for this request. If one\n number provided, it will be total request\n timeout. It can also be a pair (tuple) of\n (connection, read) timeouts.\n :return: tuple(V1Status, status_code(int), headers(HTTPHeaderDict))\n If the method is called asynchronously,\n returns the request thread.\n ' local_var_params = locals() all_params = ['namespace', 'pretty', '_continue', 'dry_run', 'field_selector', 'grace_period_seconds', 'label_selector', 'limit', 'orphan_dependents', 'propagation_policy', 'resource_version', 'resource_version_match', 'timeout_seconds', 'body'] all_params.extend(['async_req', '_return_http_data_only', '_preload_content', '_request_timeout']) for (key, val) in six.iteritems(local_var_params['kwargs']): if (key not in all_params): raise ApiTypeError(("Got an unexpected keyword argument '%s' to method delete_collection_namespaced_cron_job" % key)) local_var_params[key] = val del local_var_params['kwargs'] if (self.api_client.client_side_validation and (('namespace' not in local_var_params) or (local_var_params['namespace'] is None))): raise ApiValueError('Missing the required parameter `namespace` when calling `delete_collection_namespaced_cron_job`') collection_formats = {} path_params = {} if ('namespace' in local_var_params): path_params['namespace'] = local_var_params['namespace'] query_params = [] if (('pretty' in local_var_params) and (local_var_params['pretty'] is not None)): query_params.append(('pretty', local_var_params['pretty'])) if (('_continue' in local_var_params) and (local_var_params['_continue'] is not None)): query_params.append(('continue', local_var_params['_continue'])) if (('dry_run' in local_var_params) and (local_var_params['dry_run'] is not None)): query_params.append(('dryRun', local_var_params['dry_run'])) if (('field_selector' in local_var_params) and (local_var_params['field_selector'] is not None)): query_params.append(('fieldSelector', local_var_params['field_selector'])) if (('grace_period_seconds' in local_var_params) and (local_var_params['grace_period_seconds'] is not None)): query_params.append(('gracePeriodSeconds', local_var_params['grace_period_seconds'])) if (('label_selector' in local_var_params) and (local_var_params['label_selector'] is not None)): query_params.append(('labelSelector', local_var_params['label_selector'])) if (('limit' in local_var_params) and (local_var_params['limit'] is not None)): query_params.append(('limit', local_var_params['limit'])) if (('orphan_dependents' in local_var_params) and (local_var_params['orphan_dependents'] is not None)): query_params.append(('orphanDependents', local_var_params['orphan_dependents'])) if (('propagation_policy' in local_var_params) and (local_var_params['propagation_policy'] is not None)): query_params.append(('propagationPolicy', local_var_params['propagation_policy'])) if (('resource_version' in local_var_params) and (local_var_params['resource_version'] is not None)): query_params.append(('resourceVersion', local_var_params['resource_version'])) if (('resource_version_match' in local_var_params) and (local_var_params['resource_version_match'] is not None)): query_params.append(('resourceVersionMatch', local_var_params['resource_version_match'])) if (('timeout_seconds' in local_var_params) and (local_var_params['timeout_seconds'] is not None)): query_params.append(('timeoutSeconds', local_var_params['timeout_seconds'])) header_params = {} form_params = [] local_var_files = {} body_params = None if ('body' in local_var_params): body_params = local_var_params['body'] header_params['Accept'] = self.api_client.select_header_accept(['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf']) auth_settings = ['BearerToken'] return self.api_client.call_api('/apis/batch/v1/namespaces/{namespace}/cronjobs', 'DELETE', path_params, query_params, header_params, body=body_params, post_params=form_params, files=local_var_files, response_type='V1Status', auth_settings=auth_settings, async_req=local_var_params.get('async_req'), _return_http_data_only=local_var_params.get('_return_http_data_only'), _preload_content=local_var_params.get('_preload_content', True), _request_timeout=local_var_params.get('_request_timeout'), collection_formats=collection_formats)<|docstring|>delete_collection_namespaced_cron_job # noqa: E501 delete collection of CronJob # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True >>> thread = api.delete_collection_namespaced_cron_job_with_http_info(namespace, async_req=True) >>> result = thread.get() :param async_req bool: execute request asynchronously :param str namespace: object name and auth scope, such as for teams and projects (required) :param str pretty: If 'true', then the output is pretty printed. :param str _continue: The continue option should be set when retrieving more results from the server. Since this value is server defined, clients may only use the continue value from a previous query result with identical query parameters (except for the value of continue) and the server may reject a continue value it does not recognize. If the specified continue value is no longer valid whether due to expiration (generally five to fifteen minutes) or a configuration change on the server, the server will respond with a 410 ResourceExpired error together with a continue token. If the client needs a consistent list, it must restart their list without the continue field. Otherwise, the client may send another list request with the token received with the 410 error, the server will respond with a list starting from the next key, but from the latest snapshot, which is inconsistent from the previous list results - objects that are created, modified, or deleted after the first list request will be included in the response, as long as their keys are after the "next key". This field is not supported when watch is true. Clients may start a watch from the last resourceVersion value returned by the server and not miss any modifications. :param str dry_run: When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed :param str field_selector: A selector to restrict the list of returned objects by their fields. Defaults to everything. :param int grace_period_seconds: The duration in seconds before the object should be deleted. Value must be non-negative integer. The value zero indicates delete immediately. If this value is nil, the default grace period for the specified type will be used. Defaults to a per object value if not specified. zero means delete immediately. :param str label_selector: A selector to restrict the list of returned objects by their labels. Defaults to everything. :param int limit: limit is a maximum number of responses to return for a list call. If more items exist, the server will set the `continue` field on the list metadata to a value that can be used with the same initial query to retrieve the next set of results. Setting a limit may return fewer than the requested amount of items (up to zero items) in the event all requested objects are filtered out and clients should only use the presence of the continue field to determine whether more results are available. Servers may choose not to support the limit argument and will return all of the available results. If limit is specified and the continue field is empty, clients may assume that no more results are available. This field is not supported if watch is true. The server guarantees that the objects returned when using continue will be identical to issuing a single list call without a limit - that is, no objects created, modified, or deleted after the first request is issued will be included in any subsequent continued requests. This is sometimes referred to as a consistent snapshot, and ensures that a client that is using limit to receive smaller chunks of a very large result can ensure they see all possible objects. If objects are updated during a chunked list the version of the object that was present at the time the first list result was calculated is returned. :param bool orphan_dependents: Deprecated: please use the PropagationPolicy, this field will be deprecated in 1.7. Should the dependent objects be orphaned. If true/false, the "orphan" finalizer will be added to/removed from the object's finalizers list. Either this field or PropagationPolicy may be set, but not both. :param str propagation_policy: Whether and how garbage collection will be performed. Either this field or OrphanDependents may be set, but not both. The default policy is decided by the existing finalizer set in the metadata.finalizers and the resource-specific default policy. Acceptable values are: 'Orphan' - orphan the dependents; 'Background' - allow the garbage collector to delete the dependents in the background; 'Foreground' - a cascading policy that deletes all dependents in the foreground. :param str resource_version: resourceVersion sets a constraint on what resource versions a request may be served from. See https://kubernetes.io/docs/reference/using-api/api-concepts/#resource-versions for details. Defaults to unset :param str resource_version_match: resourceVersionMatch determines how resourceVersion is applied to list calls. It is highly recommended that resourceVersionMatch be set for list calls where resourceVersion is set See https://kubernetes.io/docs/reference/using-api/api-concepts/#resource-versions for details. Defaults to unset :param int timeout_seconds: Timeout for the list/watch call. This limits the duration of the call, regardless of any activity or inactivity. :param V1DeleteOptions body: :param _return_http_data_only: response data without head status code and headers :param _preload_content: if False, the urllib3.HTTPResponse object will be returned without reading/decoding response data. Default is True. :param _request_timeout: timeout setting for this request. If one number provided, it will be total request timeout. It can also be a pair (tuple) of (connection, read) timeouts. :return: tuple(V1Status, status_code(int), headers(HTTPHeaderDict)) If the method is called asynchronously, returns the request thread.<|endoftext|>
0f86677dcba9c0cdbda18ae4dad72b5b00a866472bfee5eff8d8849bbcad31c9
def delete_collection_namespaced_job(self, namespace, **kwargs): 'delete_collection_namespaced_job # noqa: E501\n\n delete collection of Job # noqa: E501\n This method makes a synchronous HTTP request by default. To make an\n asynchronous HTTP request, please pass async_req=True\n >>> thread = api.delete_collection_namespaced_job(namespace, async_req=True)\n >>> result = thread.get()\n\n :param async_req bool: execute request asynchronously\n :param str namespace: object name and auth scope, such as for teams and projects (required)\n :param str pretty: If \'true\', then the output is pretty printed.\n :param str _continue: The continue option should be set when retrieving more results from the server. Since this value is server defined, clients may only use the continue value from a previous query result with identical query parameters (except for the value of continue) and the server may reject a continue value it does not recognize. If the specified continue value is no longer valid whether due to expiration (generally five to fifteen minutes) or a configuration change on the server, the server will respond with a 410 ResourceExpired error together with a continue token. If the client needs a consistent list, it must restart their list without the continue field. Otherwise, the client may send another list request with the token received with the 410 error, the server will respond with a list starting from the next key, but from the latest snapshot, which is inconsistent from the previous list results - objects that are created, modified, or deleted after the first list request will be included in the response, as long as their keys are after the "next key". This field is not supported when watch is true. Clients may start a watch from the last resourceVersion value returned by the server and not miss any modifications.\n :param str dry_run: When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed\n :param str field_selector: A selector to restrict the list of returned objects by their fields. Defaults to everything.\n :param int grace_period_seconds: The duration in seconds before the object should be deleted. Value must be non-negative integer. The value zero indicates delete immediately. If this value is nil, the default grace period for the specified type will be used. Defaults to a per object value if not specified. zero means delete immediately.\n :param str label_selector: A selector to restrict the list of returned objects by their labels. Defaults to everything.\n :param int limit: limit is a maximum number of responses to return for a list call. If more items exist, the server will set the `continue` field on the list metadata to a value that can be used with the same initial query to retrieve the next set of results. Setting a limit may return fewer than the requested amount of items (up to zero items) in the event all requested objects are filtered out and clients should only use the presence of the continue field to determine whether more results are available. Servers may choose not to support the limit argument and will return all of the available results. If limit is specified and the continue field is empty, clients may assume that no more results are available. This field is not supported if watch is true. The server guarantees that the objects returned when using continue will be identical to issuing a single list call without a limit - that is, no objects created, modified, or deleted after the first request is issued will be included in any subsequent continued requests. This is sometimes referred to as a consistent snapshot, and ensures that a client that is using limit to receive smaller chunks of a very large result can ensure they see all possible objects. If objects are updated during a chunked list the version of the object that was present at the time the first list result was calculated is returned.\n :param bool orphan_dependents: Deprecated: please use the PropagationPolicy, this field will be deprecated in 1.7. Should the dependent objects be orphaned. If true/false, the "orphan" finalizer will be added to/removed from the object\'s finalizers list. Either this field or PropagationPolicy may be set, but not both.\n :param str propagation_policy: Whether and how garbage collection will be performed. Either this field or OrphanDependents may be set, but not both. The default policy is decided by the existing finalizer set in the metadata.finalizers and the resource-specific default policy. Acceptable values are: \'Orphan\' - orphan the dependents; \'Background\' - allow the garbage collector to delete the dependents in the background; \'Foreground\' - a cascading policy that deletes all dependents in the foreground.\n :param str resource_version: resourceVersion sets a constraint on what resource versions a request may be served from. See https://kubernetes.io/docs/reference/using-api/api-concepts/#resource-versions for details. Defaults to unset\n :param str resource_version_match: resourceVersionMatch determines how resourceVersion is applied to list calls. It is highly recommended that resourceVersionMatch be set for list calls where resourceVersion is set See https://kubernetes.io/docs/reference/using-api/api-concepts/#resource-versions for details. Defaults to unset\n :param int timeout_seconds: Timeout for the list/watch call. This limits the duration of the call, regardless of any activity or inactivity.\n :param V1DeleteOptions body:\n :param _preload_content: if False, the urllib3.HTTPResponse object will\n be returned without reading/decoding response\n data. Default is True.\n :param _request_timeout: timeout setting for this request. If one\n number provided, it will be total request\n timeout. It can also be a pair (tuple) of\n (connection, read) timeouts.\n :return: V1Status\n If the method is called asynchronously,\n returns the request thread.\n ' kwargs['_return_http_data_only'] = True return self.delete_collection_namespaced_job_with_http_info(namespace, **kwargs)
delete_collection_namespaced_job # noqa: E501 delete collection of Job # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True >>> thread = api.delete_collection_namespaced_job(namespace, async_req=True) >>> result = thread.get() :param async_req bool: execute request asynchronously :param str namespace: object name and auth scope, such as for teams and projects (required) :param str pretty: If 'true', then the output is pretty printed. :param str _continue: The continue option should be set when retrieving more results from the server. Since this value is server defined, clients may only use the continue value from a previous query result with identical query parameters (except for the value of continue) and the server may reject a continue value it does not recognize. If the specified continue value is no longer valid whether due to expiration (generally five to fifteen minutes) or a configuration change on the server, the server will respond with a 410 ResourceExpired error together with a continue token. If the client needs a consistent list, it must restart their list without the continue field. Otherwise, the client may send another list request with the token received with the 410 error, the server will respond with a list starting from the next key, but from the latest snapshot, which is inconsistent from the previous list results - objects that are created, modified, or deleted after the first list request will be included in the response, as long as their keys are after the "next key". This field is not supported when watch is true. Clients may start a watch from the last resourceVersion value returned by the server and not miss any modifications. :param str dry_run: When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed :param str field_selector: A selector to restrict the list of returned objects by their fields. Defaults to everything. :param int grace_period_seconds: The duration in seconds before the object should be deleted. Value must be non-negative integer. The value zero indicates delete immediately. If this value is nil, the default grace period for the specified type will be used. Defaults to a per object value if not specified. zero means delete immediately. :param str label_selector: A selector to restrict the list of returned objects by their labels. Defaults to everything. :param int limit: limit is a maximum number of responses to return for a list call. If more items exist, the server will set the `continue` field on the list metadata to a value that can be used with the same initial query to retrieve the next set of results. Setting a limit may return fewer than the requested amount of items (up to zero items) in the event all requested objects are filtered out and clients should only use the presence of the continue field to determine whether more results are available. Servers may choose not to support the limit argument and will return all of the available results. If limit is specified and the continue field is empty, clients may assume that no more results are available. This field is not supported if watch is true. The server guarantees that the objects returned when using continue will be identical to issuing a single list call without a limit - that is, no objects created, modified, or deleted after the first request is issued will be included in any subsequent continued requests. This is sometimes referred to as a consistent snapshot, and ensures that a client that is using limit to receive smaller chunks of a very large result can ensure they see all possible objects. If objects are updated during a chunked list the version of the object that was present at the time the first list result was calculated is returned. :param bool orphan_dependents: Deprecated: please use the PropagationPolicy, this field will be deprecated in 1.7. Should the dependent objects be orphaned. If true/false, the "orphan" finalizer will be added to/removed from the object's finalizers list. Either this field or PropagationPolicy may be set, but not both. :param str propagation_policy: Whether and how garbage collection will be performed. Either this field or OrphanDependents may be set, but not both. The default policy is decided by the existing finalizer set in the metadata.finalizers and the resource-specific default policy. Acceptable values are: 'Orphan' - orphan the dependents; 'Background' - allow the garbage collector to delete the dependents in the background; 'Foreground' - a cascading policy that deletes all dependents in the foreground. :param str resource_version: resourceVersion sets a constraint on what resource versions a request may be served from. See https://kubernetes.io/docs/reference/using-api/api-concepts/#resource-versions for details. Defaults to unset :param str resource_version_match: resourceVersionMatch determines how resourceVersion is applied to list calls. It is highly recommended that resourceVersionMatch be set for list calls where resourceVersion is set See https://kubernetes.io/docs/reference/using-api/api-concepts/#resource-versions for details. Defaults to unset :param int timeout_seconds: Timeout for the list/watch call. This limits the duration of the call, regardless of any activity or inactivity. :param V1DeleteOptions body: :param _preload_content: if False, the urllib3.HTTPResponse object will be returned without reading/decoding response data. Default is True. :param _request_timeout: timeout setting for this request. If one number provided, it will be total request timeout. It can also be a pair (tuple) of (connection, read) timeouts. :return: V1Status If the method is called asynchronously, returns the request thread.
kubernetes/client/api/batch_v1_api.py
delete_collection_namespaced_job
knkgun/python
1
python
def delete_collection_namespaced_job(self, namespace, **kwargs): 'delete_collection_namespaced_job # noqa: E501\n\n delete collection of Job # noqa: E501\n This method makes a synchronous HTTP request by default. To make an\n asynchronous HTTP request, please pass async_req=True\n >>> thread = api.delete_collection_namespaced_job(namespace, async_req=True)\n >>> result = thread.get()\n\n :param async_req bool: execute request asynchronously\n :param str namespace: object name and auth scope, such as for teams and projects (required)\n :param str pretty: If \'true\', then the output is pretty printed.\n :param str _continue: The continue option should be set when retrieving more results from the server. Since this value is server defined, clients may only use the continue value from a previous query result with identical query parameters (except for the value of continue) and the server may reject a continue value it does not recognize. If the specified continue value is no longer valid whether due to expiration (generally five to fifteen minutes) or a configuration change on the server, the server will respond with a 410 ResourceExpired error together with a continue token. If the client needs a consistent list, it must restart their list without the continue field. Otherwise, the client may send another list request with the token received with the 410 error, the server will respond with a list starting from the next key, but from the latest snapshot, which is inconsistent from the previous list results - objects that are created, modified, or deleted after the first list request will be included in the response, as long as their keys are after the "next key". This field is not supported when watch is true. Clients may start a watch from the last resourceVersion value returned by the server and not miss any modifications.\n :param str dry_run: When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed\n :param str field_selector: A selector to restrict the list of returned objects by their fields. Defaults to everything.\n :param int grace_period_seconds: The duration in seconds before the object should be deleted. Value must be non-negative integer. The value zero indicates delete immediately. If this value is nil, the default grace period for the specified type will be used. Defaults to a per object value if not specified. zero means delete immediately.\n :param str label_selector: A selector to restrict the list of returned objects by their labels. Defaults to everything.\n :param int limit: limit is a maximum number of responses to return for a list call. If more items exist, the server will set the `continue` field on the list metadata to a value that can be used with the same initial query to retrieve the next set of results. Setting a limit may return fewer than the requested amount of items (up to zero items) in the event all requested objects are filtered out and clients should only use the presence of the continue field to determine whether more results are available. Servers may choose not to support the limit argument and will return all of the available results. If limit is specified and the continue field is empty, clients may assume that no more results are available. This field is not supported if watch is true. The server guarantees that the objects returned when using continue will be identical to issuing a single list call without a limit - that is, no objects created, modified, or deleted after the first request is issued will be included in any subsequent continued requests. This is sometimes referred to as a consistent snapshot, and ensures that a client that is using limit to receive smaller chunks of a very large result can ensure they see all possible objects. If objects are updated during a chunked list the version of the object that was present at the time the first list result was calculated is returned.\n :param bool orphan_dependents: Deprecated: please use the PropagationPolicy, this field will be deprecated in 1.7. Should the dependent objects be orphaned. If true/false, the "orphan" finalizer will be added to/removed from the object\'s finalizers list. Either this field or PropagationPolicy may be set, but not both.\n :param str propagation_policy: Whether and how garbage collection will be performed. Either this field or OrphanDependents may be set, but not both. The default policy is decided by the existing finalizer set in the metadata.finalizers and the resource-specific default policy. Acceptable values are: \'Orphan\' - orphan the dependents; \'Background\' - allow the garbage collector to delete the dependents in the background; \'Foreground\' - a cascading policy that deletes all dependents in the foreground.\n :param str resource_version: resourceVersion sets a constraint on what resource versions a request may be served from. See https://kubernetes.io/docs/reference/using-api/api-concepts/#resource-versions for details. Defaults to unset\n :param str resource_version_match: resourceVersionMatch determines how resourceVersion is applied to list calls. It is highly recommended that resourceVersionMatch be set for list calls where resourceVersion is set See https://kubernetes.io/docs/reference/using-api/api-concepts/#resource-versions for details. Defaults to unset\n :param int timeout_seconds: Timeout for the list/watch call. This limits the duration of the call, regardless of any activity or inactivity.\n :param V1DeleteOptions body:\n :param _preload_content: if False, the urllib3.HTTPResponse object will\n be returned without reading/decoding response\n data. Default is True.\n :param _request_timeout: timeout setting for this request. If one\n number provided, it will be total request\n timeout. It can also be a pair (tuple) of\n (connection, read) timeouts.\n :return: V1Status\n If the method is called asynchronously,\n returns the request thread.\n ' kwargs['_return_http_data_only'] = True return self.delete_collection_namespaced_job_with_http_info(namespace, **kwargs)
def delete_collection_namespaced_job(self, namespace, **kwargs): 'delete_collection_namespaced_job # noqa: E501\n\n delete collection of Job # noqa: E501\n This method makes a synchronous HTTP request by default. To make an\n asynchronous HTTP request, please pass async_req=True\n >>> thread = api.delete_collection_namespaced_job(namespace, async_req=True)\n >>> result = thread.get()\n\n :param async_req bool: execute request asynchronously\n :param str namespace: object name and auth scope, such as for teams and projects (required)\n :param str pretty: If \'true\', then the output is pretty printed.\n :param str _continue: The continue option should be set when retrieving more results from the server. Since this value is server defined, clients may only use the continue value from a previous query result with identical query parameters (except for the value of continue) and the server may reject a continue value it does not recognize. If the specified continue value is no longer valid whether due to expiration (generally five to fifteen minutes) or a configuration change on the server, the server will respond with a 410 ResourceExpired error together with a continue token. If the client needs a consistent list, it must restart their list without the continue field. Otherwise, the client may send another list request with the token received with the 410 error, the server will respond with a list starting from the next key, but from the latest snapshot, which is inconsistent from the previous list results - objects that are created, modified, or deleted after the first list request will be included in the response, as long as their keys are after the "next key". This field is not supported when watch is true. Clients may start a watch from the last resourceVersion value returned by the server and not miss any modifications.\n :param str dry_run: When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed\n :param str field_selector: A selector to restrict the list of returned objects by their fields. Defaults to everything.\n :param int grace_period_seconds: The duration in seconds before the object should be deleted. Value must be non-negative integer. The value zero indicates delete immediately. If this value is nil, the default grace period for the specified type will be used. Defaults to a per object value if not specified. zero means delete immediately.\n :param str label_selector: A selector to restrict the list of returned objects by their labels. Defaults to everything.\n :param int limit: limit is a maximum number of responses to return for a list call. If more items exist, the server will set the `continue` field on the list metadata to a value that can be used with the same initial query to retrieve the next set of results. Setting a limit may return fewer than the requested amount of items (up to zero items) in the event all requested objects are filtered out and clients should only use the presence of the continue field to determine whether more results are available. Servers may choose not to support the limit argument and will return all of the available results. If limit is specified and the continue field is empty, clients may assume that no more results are available. This field is not supported if watch is true. The server guarantees that the objects returned when using continue will be identical to issuing a single list call without a limit - that is, no objects created, modified, or deleted after the first request is issued will be included in any subsequent continued requests. This is sometimes referred to as a consistent snapshot, and ensures that a client that is using limit to receive smaller chunks of a very large result can ensure they see all possible objects. If objects are updated during a chunked list the version of the object that was present at the time the first list result was calculated is returned.\n :param bool orphan_dependents: Deprecated: please use the PropagationPolicy, this field will be deprecated in 1.7. Should the dependent objects be orphaned. If true/false, the "orphan" finalizer will be added to/removed from the object\'s finalizers list. Either this field or PropagationPolicy may be set, but not both.\n :param str propagation_policy: Whether and how garbage collection will be performed. Either this field or OrphanDependents may be set, but not both. The default policy is decided by the existing finalizer set in the metadata.finalizers and the resource-specific default policy. Acceptable values are: \'Orphan\' - orphan the dependents; \'Background\' - allow the garbage collector to delete the dependents in the background; \'Foreground\' - a cascading policy that deletes all dependents in the foreground.\n :param str resource_version: resourceVersion sets a constraint on what resource versions a request may be served from. See https://kubernetes.io/docs/reference/using-api/api-concepts/#resource-versions for details. Defaults to unset\n :param str resource_version_match: resourceVersionMatch determines how resourceVersion is applied to list calls. It is highly recommended that resourceVersionMatch be set for list calls where resourceVersion is set See https://kubernetes.io/docs/reference/using-api/api-concepts/#resource-versions for details. Defaults to unset\n :param int timeout_seconds: Timeout for the list/watch call. This limits the duration of the call, regardless of any activity or inactivity.\n :param V1DeleteOptions body:\n :param _preload_content: if False, the urllib3.HTTPResponse object will\n be returned without reading/decoding response\n data. Default is True.\n :param _request_timeout: timeout setting for this request. If one\n number provided, it will be total request\n timeout. It can also be a pair (tuple) of\n (connection, read) timeouts.\n :return: V1Status\n If the method is called asynchronously,\n returns the request thread.\n ' kwargs['_return_http_data_only'] = True return self.delete_collection_namespaced_job_with_http_info(namespace, **kwargs)<|docstring|>delete_collection_namespaced_job # noqa: E501 delete collection of Job # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True >>> thread = api.delete_collection_namespaced_job(namespace, async_req=True) >>> result = thread.get() :param async_req bool: execute request asynchronously :param str namespace: object name and auth scope, such as for teams and projects (required) :param str pretty: If 'true', then the output is pretty printed. :param str _continue: The continue option should be set when retrieving more results from the server. Since this value is server defined, clients may only use the continue value from a previous query result with identical query parameters (except for the value of continue) and the server may reject a continue value it does not recognize. If the specified continue value is no longer valid whether due to expiration (generally five to fifteen minutes) or a configuration change on the server, the server will respond with a 410 ResourceExpired error together with a continue token. If the client needs a consistent list, it must restart their list without the continue field. Otherwise, the client may send another list request with the token received with the 410 error, the server will respond with a list starting from the next key, but from the latest snapshot, which is inconsistent from the previous list results - objects that are created, modified, or deleted after the first list request will be included in the response, as long as their keys are after the "next key". This field is not supported when watch is true. Clients may start a watch from the last resourceVersion value returned by the server and not miss any modifications. :param str dry_run: When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed :param str field_selector: A selector to restrict the list of returned objects by their fields. Defaults to everything. :param int grace_period_seconds: The duration in seconds before the object should be deleted. Value must be non-negative integer. The value zero indicates delete immediately. If this value is nil, the default grace period for the specified type will be used. Defaults to a per object value if not specified. zero means delete immediately. :param str label_selector: A selector to restrict the list of returned objects by their labels. Defaults to everything. :param int limit: limit is a maximum number of responses to return for a list call. If more items exist, the server will set the `continue` field on the list metadata to a value that can be used with the same initial query to retrieve the next set of results. Setting a limit may return fewer than the requested amount of items (up to zero items) in the event all requested objects are filtered out and clients should only use the presence of the continue field to determine whether more results are available. Servers may choose not to support the limit argument and will return all of the available results. If limit is specified and the continue field is empty, clients may assume that no more results are available. This field is not supported if watch is true. The server guarantees that the objects returned when using continue will be identical to issuing a single list call without a limit - that is, no objects created, modified, or deleted after the first request is issued will be included in any subsequent continued requests. This is sometimes referred to as a consistent snapshot, and ensures that a client that is using limit to receive smaller chunks of a very large result can ensure they see all possible objects. If objects are updated during a chunked list the version of the object that was present at the time the first list result was calculated is returned. :param bool orphan_dependents: Deprecated: please use the PropagationPolicy, this field will be deprecated in 1.7. Should the dependent objects be orphaned. If true/false, the "orphan" finalizer will be added to/removed from the object's finalizers list. Either this field or PropagationPolicy may be set, but not both. :param str propagation_policy: Whether and how garbage collection will be performed. Either this field or OrphanDependents may be set, but not both. The default policy is decided by the existing finalizer set in the metadata.finalizers and the resource-specific default policy. Acceptable values are: 'Orphan' - orphan the dependents; 'Background' - allow the garbage collector to delete the dependents in the background; 'Foreground' - a cascading policy that deletes all dependents in the foreground. :param str resource_version: resourceVersion sets a constraint on what resource versions a request may be served from. See https://kubernetes.io/docs/reference/using-api/api-concepts/#resource-versions for details. Defaults to unset :param str resource_version_match: resourceVersionMatch determines how resourceVersion is applied to list calls. It is highly recommended that resourceVersionMatch be set for list calls where resourceVersion is set See https://kubernetes.io/docs/reference/using-api/api-concepts/#resource-versions for details. Defaults to unset :param int timeout_seconds: Timeout for the list/watch call. This limits the duration of the call, regardless of any activity or inactivity. :param V1DeleteOptions body: :param _preload_content: if False, the urllib3.HTTPResponse object will be returned without reading/decoding response data. Default is True. :param _request_timeout: timeout setting for this request. If one number provided, it will be total request timeout. It can also be a pair (tuple) of (connection, read) timeouts. :return: V1Status If the method is called asynchronously, returns the request thread.<|endoftext|>
a306b036b0d609791bc5d854ee6ead24bad5adb5bd45f95026fe3a939cb13846
def delete_collection_namespaced_job_with_http_info(self, namespace, **kwargs): 'delete_collection_namespaced_job # noqa: E501\n\n delete collection of Job # noqa: E501\n This method makes a synchronous HTTP request by default. To make an\n asynchronous HTTP request, please pass async_req=True\n >>> thread = api.delete_collection_namespaced_job_with_http_info(namespace, async_req=True)\n >>> result = thread.get()\n\n :param async_req bool: execute request asynchronously\n :param str namespace: object name and auth scope, such as for teams and projects (required)\n :param str pretty: If \'true\', then the output is pretty printed.\n :param str _continue: The continue option should be set when retrieving more results from the server. Since this value is server defined, clients may only use the continue value from a previous query result with identical query parameters (except for the value of continue) and the server may reject a continue value it does not recognize. If the specified continue value is no longer valid whether due to expiration (generally five to fifteen minutes) or a configuration change on the server, the server will respond with a 410 ResourceExpired error together with a continue token. If the client needs a consistent list, it must restart their list without the continue field. Otherwise, the client may send another list request with the token received with the 410 error, the server will respond with a list starting from the next key, but from the latest snapshot, which is inconsistent from the previous list results - objects that are created, modified, or deleted after the first list request will be included in the response, as long as their keys are after the "next key". This field is not supported when watch is true. Clients may start a watch from the last resourceVersion value returned by the server and not miss any modifications.\n :param str dry_run: When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed\n :param str field_selector: A selector to restrict the list of returned objects by their fields. Defaults to everything.\n :param int grace_period_seconds: The duration in seconds before the object should be deleted. Value must be non-negative integer. The value zero indicates delete immediately. If this value is nil, the default grace period for the specified type will be used. Defaults to a per object value if not specified. zero means delete immediately.\n :param str label_selector: A selector to restrict the list of returned objects by their labels. Defaults to everything.\n :param int limit: limit is a maximum number of responses to return for a list call. If more items exist, the server will set the `continue` field on the list metadata to a value that can be used with the same initial query to retrieve the next set of results. Setting a limit may return fewer than the requested amount of items (up to zero items) in the event all requested objects are filtered out and clients should only use the presence of the continue field to determine whether more results are available. Servers may choose not to support the limit argument and will return all of the available results. If limit is specified and the continue field is empty, clients may assume that no more results are available. This field is not supported if watch is true. The server guarantees that the objects returned when using continue will be identical to issuing a single list call without a limit - that is, no objects created, modified, or deleted after the first request is issued will be included in any subsequent continued requests. This is sometimes referred to as a consistent snapshot, and ensures that a client that is using limit to receive smaller chunks of a very large result can ensure they see all possible objects. If objects are updated during a chunked list the version of the object that was present at the time the first list result was calculated is returned.\n :param bool orphan_dependents: Deprecated: please use the PropagationPolicy, this field will be deprecated in 1.7. Should the dependent objects be orphaned. If true/false, the "orphan" finalizer will be added to/removed from the object\'s finalizers list. Either this field or PropagationPolicy may be set, but not both.\n :param str propagation_policy: Whether and how garbage collection will be performed. Either this field or OrphanDependents may be set, but not both. The default policy is decided by the existing finalizer set in the metadata.finalizers and the resource-specific default policy. Acceptable values are: \'Orphan\' - orphan the dependents; \'Background\' - allow the garbage collector to delete the dependents in the background; \'Foreground\' - a cascading policy that deletes all dependents in the foreground.\n :param str resource_version: resourceVersion sets a constraint on what resource versions a request may be served from. See https://kubernetes.io/docs/reference/using-api/api-concepts/#resource-versions for details. Defaults to unset\n :param str resource_version_match: resourceVersionMatch determines how resourceVersion is applied to list calls. It is highly recommended that resourceVersionMatch be set for list calls where resourceVersion is set See https://kubernetes.io/docs/reference/using-api/api-concepts/#resource-versions for details. Defaults to unset\n :param int timeout_seconds: Timeout for the list/watch call. This limits the duration of the call, regardless of any activity or inactivity.\n :param V1DeleteOptions body:\n :param _return_http_data_only: response data without head status code\n and headers\n :param _preload_content: if False, the urllib3.HTTPResponse object will\n be returned without reading/decoding response\n data. Default is True.\n :param _request_timeout: timeout setting for this request. If one\n number provided, it will be total request\n timeout. It can also be a pair (tuple) of\n (connection, read) timeouts.\n :return: tuple(V1Status, status_code(int), headers(HTTPHeaderDict))\n If the method is called asynchronously,\n returns the request thread.\n ' local_var_params = locals() all_params = ['namespace', 'pretty', '_continue', 'dry_run', 'field_selector', 'grace_period_seconds', 'label_selector', 'limit', 'orphan_dependents', 'propagation_policy', 'resource_version', 'resource_version_match', 'timeout_seconds', 'body'] all_params.extend(['async_req', '_return_http_data_only', '_preload_content', '_request_timeout']) for (key, val) in six.iteritems(local_var_params['kwargs']): if (key not in all_params): raise ApiTypeError(("Got an unexpected keyword argument '%s' to method delete_collection_namespaced_job" % key)) local_var_params[key] = val del local_var_params['kwargs'] if (self.api_client.client_side_validation and (('namespace' not in local_var_params) or (local_var_params['namespace'] is None))): raise ApiValueError('Missing the required parameter `namespace` when calling `delete_collection_namespaced_job`') collection_formats = {} path_params = {} if ('namespace' in local_var_params): path_params['namespace'] = local_var_params['namespace'] query_params = [] if (('pretty' in local_var_params) and (local_var_params['pretty'] is not None)): query_params.append(('pretty', local_var_params['pretty'])) if (('_continue' in local_var_params) and (local_var_params['_continue'] is not None)): query_params.append(('continue', local_var_params['_continue'])) if (('dry_run' in local_var_params) and (local_var_params['dry_run'] is not None)): query_params.append(('dryRun', local_var_params['dry_run'])) if (('field_selector' in local_var_params) and (local_var_params['field_selector'] is not None)): query_params.append(('fieldSelector', local_var_params['field_selector'])) if (('grace_period_seconds' in local_var_params) and (local_var_params['grace_period_seconds'] is not None)): query_params.append(('gracePeriodSeconds', local_var_params['grace_period_seconds'])) if (('label_selector' in local_var_params) and (local_var_params['label_selector'] is not None)): query_params.append(('labelSelector', local_var_params['label_selector'])) if (('limit' in local_var_params) and (local_var_params['limit'] is not None)): query_params.append(('limit', local_var_params['limit'])) if (('orphan_dependents' in local_var_params) and (local_var_params['orphan_dependents'] is not None)): query_params.append(('orphanDependents', local_var_params['orphan_dependents'])) if (('propagation_policy' in local_var_params) and (local_var_params['propagation_policy'] is not None)): query_params.append(('propagationPolicy', local_var_params['propagation_policy'])) if (('resource_version' in local_var_params) and (local_var_params['resource_version'] is not None)): query_params.append(('resourceVersion', local_var_params['resource_version'])) if (('resource_version_match' in local_var_params) and (local_var_params['resource_version_match'] is not None)): query_params.append(('resourceVersionMatch', local_var_params['resource_version_match'])) if (('timeout_seconds' in local_var_params) and (local_var_params['timeout_seconds'] is not None)): query_params.append(('timeoutSeconds', local_var_params['timeout_seconds'])) header_params = {} form_params = [] local_var_files = {} body_params = None if ('body' in local_var_params): body_params = local_var_params['body'] header_params['Accept'] = self.api_client.select_header_accept(['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf']) auth_settings = ['BearerToken'] return self.api_client.call_api('/apis/batch/v1/namespaces/{namespace}/jobs', 'DELETE', path_params, query_params, header_params, body=body_params, post_params=form_params, files=local_var_files, response_type='V1Status', auth_settings=auth_settings, async_req=local_var_params.get('async_req'), _return_http_data_only=local_var_params.get('_return_http_data_only'), _preload_content=local_var_params.get('_preload_content', True), _request_timeout=local_var_params.get('_request_timeout'), collection_formats=collection_formats)
delete_collection_namespaced_job # noqa: E501 delete collection of Job # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True >>> thread = api.delete_collection_namespaced_job_with_http_info(namespace, async_req=True) >>> result = thread.get() :param async_req bool: execute request asynchronously :param str namespace: object name and auth scope, such as for teams and projects (required) :param str pretty: If 'true', then the output is pretty printed. :param str _continue: The continue option should be set when retrieving more results from the server. Since this value is server defined, clients may only use the continue value from a previous query result with identical query parameters (except for the value of continue) and the server may reject a continue value it does not recognize. If the specified continue value is no longer valid whether due to expiration (generally five to fifteen minutes) or a configuration change on the server, the server will respond with a 410 ResourceExpired error together with a continue token. If the client needs a consistent list, it must restart their list without the continue field. Otherwise, the client may send another list request with the token received with the 410 error, the server will respond with a list starting from the next key, but from the latest snapshot, which is inconsistent from the previous list results - objects that are created, modified, or deleted after the first list request will be included in the response, as long as their keys are after the "next key". This field is not supported when watch is true. Clients may start a watch from the last resourceVersion value returned by the server and not miss any modifications. :param str dry_run: When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed :param str field_selector: A selector to restrict the list of returned objects by their fields. Defaults to everything. :param int grace_period_seconds: The duration in seconds before the object should be deleted. Value must be non-negative integer. The value zero indicates delete immediately. If this value is nil, the default grace period for the specified type will be used. Defaults to a per object value if not specified. zero means delete immediately. :param str label_selector: A selector to restrict the list of returned objects by their labels. Defaults to everything. :param int limit: limit is a maximum number of responses to return for a list call. If more items exist, the server will set the `continue` field on the list metadata to a value that can be used with the same initial query to retrieve the next set of results. Setting a limit may return fewer than the requested amount of items (up to zero items) in the event all requested objects are filtered out and clients should only use the presence of the continue field to determine whether more results are available. Servers may choose not to support the limit argument and will return all of the available results. If limit is specified and the continue field is empty, clients may assume that no more results are available. This field is not supported if watch is true. The server guarantees that the objects returned when using continue will be identical to issuing a single list call without a limit - that is, no objects created, modified, or deleted after the first request is issued will be included in any subsequent continued requests. This is sometimes referred to as a consistent snapshot, and ensures that a client that is using limit to receive smaller chunks of a very large result can ensure they see all possible objects. If objects are updated during a chunked list the version of the object that was present at the time the first list result was calculated is returned. :param bool orphan_dependents: Deprecated: please use the PropagationPolicy, this field will be deprecated in 1.7. Should the dependent objects be orphaned. If true/false, the "orphan" finalizer will be added to/removed from the object's finalizers list. Either this field or PropagationPolicy may be set, but not both. :param str propagation_policy: Whether and how garbage collection will be performed. Either this field or OrphanDependents may be set, but not both. The default policy is decided by the existing finalizer set in the metadata.finalizers and the resource-specific default policy. Acceptable values are: 'Orphan' - orphan the dependents; 'Background' - allow the garbage collector to delete the dependents in the background; 'Foreground' - a cascading policy that deletes all dependents in the foreground. :param str resource_version: resourceVersion sets a constraint on what resource versions a request may be served from. See https://kubernetes.io/docs/reference/using-api/api-concepts/#resource-versions for details. Defaults to unset :param str resource_version_match: resourceVersionMatch determines how resourceVersion is applied to list calls. It is highly recommended that resourceVersionMatch be set for list calls where resourceVersion is set See https://kubernetes.io/docs/reference/using-api/api-concepts/#resource-versions for details. Defaults to unset :param int timeout_seconds: Timeout for the list/watch call. This limits the duration of the call, regardless of any activity or inactivity. :param V1DeleteOptions body: :param _return_http_data_only: response data without head status code and headers :param _preload_content: if False, the urllib3.HTTPResponse object will be returned without reading/decoding response data. Default is True. :param _request_timeout: timeout setting for this request. If one number provided, it will be total request timeout. It can also be a pair (tuple) of (connection, read) timeouts. :return: tuple(V1Status, status_code(int), headers(HTTPHeaderDict)) If the method is called asynchronously, returns the request thread.
kubernetes/client/api/batch_v1_api.py
delete_collection_namespaced_job_with_http_info
knkgun/python
1
python
def delete_collection_namespaced_job_with_http_info(self, namespace, **kwargs): 'delete_collection_namespaced_job # noqa: E501\n\n delete collection of Job # noqa: E501\n This method makes a synchronous HTTP request by default. To make an\n asynchronous HTTP request, please pass async_req=True\n >>> thread = api.delete_collection_namespaced_job_with_http_info(namespace, async_req=True)\n >>> result = thread.get()\n\n :param async_req bool: execute request asynchronously\n :param str namespace: object name and auth scope, such as for teams and projects (required)\n :param str pretty: If \'true\', then the output is pretty printed.\n :param str _continue: The continue option should be set when retrieving more results from the server. Since this value is server defined, clients may only use the continue value from a previous query result with identical query parameters (except for the value of continue) and the server may reject a continue value it does not recognize. If the specified continue value is no longer valid whether due to expiration (generally five to fifteen minutes) or a configuration change on the server, the server will respond with a 410 ResourceExpired error together with a continue token. If the client needs a consistent list, it must restart their list without the continue field. Otherwise, the client may send another list request with the token received with the 410 error, the server will respond with a list starting from the next key, but from the latest snapshot, which is inconsistent from the previous list results - objects that are created, modified, or deleted after the first list request will be included in the response, as long as their keys are after the "next key". This field is not supported when watch is true. Clients may start a watch from the last resourceVersion value returned by the server and not miss any modifications.\n :param str dry_run: When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed\n :param str field_selector: A selector to restrict the list of returned objects by their fields. Defaults to everything.\n :param int grace_period_seconds: The duration in seconds before the object should be deleted. Value must be non-negative integer. The value zero indicates delete immediately. If this value is nil, the default grace period for the specified type will be used. Defaults to a per object value if not specified. zero means delete immediately.\n :param str label_selector: A selector to restrict the list of returned objects by their labels. Defaults to everything.\n :param int limit: limit is a maximum number of responses to return for a list call. If more items exist, the server will set the `continue` field on the list metadata to a value that can be used with the same initial query to retrieve the next set of results. Setting a limit may return fewer than the requested amount of items (up to zero items) in the event all requested objects are filtered out and clients should only use the presence of the continue field to determine whether more results are available. Servers may choose not to support the limit argument and will return all of the available results. If limit is specified and the continue field is empty, clients may assume that no more results are available. This field is not supported if watch is true. The server guarantees that the objects returned when using continue will be identical to issuing a single list call without a limit - that is, no objects created, modified, or deleted after the first request is issued will be included in any subsequent continued requests. This is sometimes referred to as a consistent snapshot, and ensures that a client that is using limit to receive smaller chunks of a very large result can ensure they see all possible objects. If objects are updated during a chunked list the version of the object that was present at the time the first list result was calculated is returned.\n :param bool orphan_dependents: Deprecated: please use the PropagationPolicy, this field will be deprecated in 1.7. Should the dependent objects be orphaned. If true/false, the "orphan" finalizer will be added to/removed from the object\'s finalizers list. Either this field or PropagationPolicy may be set, but not both.\n :param str propagation_policy: Whether and how garbage collection will be performed. Either this field or OrphanDependents may be set, but not both. The default policy is decided by the existing finalizer set in the metadata.finalizers and the resource-specific default policy. Acceptable values are: \'Orphan\' - orphan the dependents; \'Background\' - allow the garbage collector to delete the dependents in the background; \'Foreground\' - a cascading policy that deletes all dependents in the foreground.\n :param str resource_version: resourceVersion sets a constraint on what resource versions a request may be served from. See https://kubernetes.io/docs/reference/using-api/api-concepts/#resource-versions for details. Defaults to unset\n :param str resource_version_match: resourceVersionMatch determines how resourceVersion is applied to list calls. It is highly recommended that resourceVersionMatch be set for list calls where resourceVersion is set See https://kubernetes.io/docs/reference/using-api/api-concepts/#resource-versions for details. Defaults to unset\n :param int timeout_seconds: Timeout for the list/watch call. This limits the duration of the call, regardless of any activity or inactivity.\n :param V1DeleteOptions body:\n :param _return_http_data_only: response data without head status code\n and headers\n :param _preload_content: if False, the urllib3.HTTPResponse object will\n be returned without reading/decoding response\n data. Default is True.\n :param _request_timeout: timeout setting for this request. If one\n number provided, it will be total request\n timeout. It can also be a pair (tuple) of\n (connection, read) timeouts.\n :return: tuple(V1Status, status_code(int), headers(HTTPHeaderDict))\n If the method is called asynchronously,\n returns the request thread.\n ' local_var_params = locals() all_params = ['namespace', 'pretty', '_continue', 'dry_run', 'field_selector', 'grace_period_seconds', 'label_selector', 'limit', 'orphan_dependents', 'propagation_policy', 'resource_version', 'resource_version_match', 'timeout_seconds', 'body'] all_params.extend(['async_req', '_return_http_data_only', '_preload_content', '_request_timeout']) for (key, val) in six.iteritems(local_var_params['kwargs']): if (key not in all_params): raise ApiTypeError(("Got an unexpected keyword argument '%s' to method delete_collection_namespaced_job" % key)) local_var_params[key] = val del local_var_params['kwargs'] if (self.api_client.client_side_validation and (('namespace' not in local_var_params) or (local_var_params['namespace'] is None))): raise ApiValueError('Missing the required parameter `namespace` when calling `delete_collection_namespaced_job`') collection_formats = {} path_params = {} if ('namespace' in local_var_params): path_params['namespace'] = local_var_params['namespace'] query_params = [] if (('pretty' in local_var_params) and (local_var_params['pretty'] is not None)): query_params.append(('pretty', local_var_params['pretty'])) if (('_continue' in local_var_params) and (local_var_params['_continue'] is not None)): query_params.append(('continue', local_var_params['_continue'])) if (('dry_run' in local_var_params) and (local_var_params['dry_run'] is not None)): query_params.append(('dryRun', local_var_params['dry_run'])) if (('field_selector' in local_var_params) and (local_var_params['field_selector'] is not None)): query_params.append(('fieldSelector', local_var_params['field_selector'])) if (('grace_period_seconds' in local_var_params) and (local_var_params['grace_period_seconds'] is not None)): query_params.append(('gracePeriodSeconds', local_var_params['grace_period_seconds'])) if (('label_selector' in local_var_params) and (local_var_params['label_selector'] is not None)): query_params.append(('labelSelector', local_var_params['label_selector'])) if (('limit' in local_var_params) and (local_var_params['limit'] is not None)): query_params.append(('limit', local_var_params['limit'])) if (('orphan_dependents' in local_var_params) and (local_var_params['orphan_dependents'] is not None)): query_params.append(('orphanDependents', local_var_params['orphan_dependents'])) if (('propagation_policy' in local_var_params) and (local_var_params['propagation_policy'] is not None)): query_params.append(('propagationPolicy', local_var_params['propagation_policy'])) if (('resource_version' in local_var_params) and (local_var_params['resource_version'] is not None)): query_params.append(('resourceVersion', local_var_params['resource_version'])) if (('resource_version_match' in local_var_params) and (local_var_params['resource_version_match'] is not None)): query_params.append(('resourceVersionMatch', local_var_params['resource_version_match'])) if (('timeout_seconds' in local_var_params) and (local_var_params['timeout_seconds'] is not None)): query_params.append(('timeoutSeconds', local_var_params['timeout_seconds'])) header_params = {} form_params = [] local_var_files = {} body_params = None if ('body' in local_var_params): body_params = local_var_params['body'] header_params['Accept'] = self.api_client.select_header_accept(['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf']) auth_settings = ['BearerToken'] return self.api_client.call_api('/apis/batch/v1/namespaces/{namespace}/jobs', 'DELETE', path_params, query_params, header_params, body=body_params, post_params=form_params, files=local_var_files, response_type='V1Status', auth_settings=auth_settings, async_req=local_var_params.get('async_req'), _return_http_data_only=local_var_params.get('_return_http_data_only'), _preload_content=local_var_params.get('_preload_content', True), _request_timeout=local_var_params.get('_request_timeout'), collection_formats=collection_formats)
def delete_collection_namespaced_job_with_http_info(self, namespace, **kwargs): 'delete_collection_namespaced_job # noqa: E501\n\n delete collection of Job # noqa: E501\n This method makes a synchronous HTTP request by default. To make an\n asynchronous HTTP request, please pass async_req=True\n >>> thread = api.delete_collection_namespaced_job_with_http_info(namespace, async_req=True)\n >>> result = thread.get()\n\n :param async_req bool: execute request asynchronously\n :param str namespace: object name and auth scope, such as for teams and projects (required)\n :param str pretty: If \'true\', then the output is pretty printed.\n :param str _continue: The continue option should be set when retrieving more results from the server. Since this value is server defined, clients may only use the continue value from a previous query result with identical query parameters (except for the value of continue) and the server may reject a continue value it does not recognize. If the specified continue value is no longer valid whether due to expiration (generally five to fifteen minutes) or a configuration change on the server, the server will respond with a 410 ResourceExpired error together with a continue token. If the client needs a consistent list, it must restart their list without the continue field. Otherwise, the client may send another list request with the token received with the 410 error, the server will respond with a list starting from the next key, but from the latest snapshot, which is inconsistent from the previous list results - objects that are created, modified, or deleted after the first list request will be included in the response, as long as their keys are after the "next key". This field is not supported when watch is true. Clients may start a watch from the last resourceVersion value returned by the server and not miss any modifications.\n :param str dry_run: When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed\n :param str field_selector: A selector to restrict the list of returned objects by their fields. Defaults to everything.\n :param int grace_period_seconds: The duration in seconds before the object should be deleted. Value must be non-negative integer. The value zero indicates delete immediately. If this value is nil, the default grace period for the specified type will be used. Defaults to a per object value if not specified. zero means delete immediately.\n :param str label_selector: A selector to restrict the list of returned objects by their labels. Defaults to everything.\n :param int limit: limit is a maximum number of responses to return for a list call. If more items exist, the server will set the `continue` field on the list metadata to a value that can be used with the same initial query to retrieve the next set of results. Setting a limit may return fewer than the requested amount of items (up to zero items) in the event all requested objects are filtered out and clients should only use the presence of the continue field to determine whether more results are available. Servers may choose not to support the limit argument and will return all of the available results. If limit is specified and the continue field is empty, clients may assume that no more results are available. This field is not supported if watch is true. The server guarantees that the objects returned when using continue will be identical to issuing a single list call without a limit - that is, no objects created, modified, or deleted after the first request is issued will be included in any subsequent continued requests. This is sometimes referred to as a consistent snapshot, and ensures that a client that is using limit to receive smaller chunks of a very large result can ensure they see all possible objects. If objects are updated during a chunked list the version of the object that was present at the time the first list result was calculated is returned.\n :param bool orphan_dependents: Deprecated: please use the PropagationPolicy, this field will be deprecated in 1.7. Should the dependent objects be orphaned. If true/false, the "orphan" finalizer will be added to/removed from the object\'s finalizers list. Either this field or PropagationPolicy may be set, but not both.\n :param str propagation_policy: Whether and how garbage collection will be performed. Either this field or OrphanDependents may be set, but not both. The default policy is decided by the existing finalizer set in the metadata.finalizers and the resource-specific default policy. Acceptable values are: \'Orphan\' - orphan the dependents; \'Background\' - allow the garbage collector to delete the dependents in the background; \'Foreground\' - a cascading policy that deletes all dependents in the foreground.\n :param str resource_version: resourceVersion sets a constraint on what resource versions a request may be served from. See https://kubernetes.io/docs/reference/using-api/api-concepts/#resource-versions for details. Defaults to unset\n :param str resource_version_match: resourceVersionMatch determines how resourceVersion is applied to list calls. It is highly recommended that resourceVersionMatch be set for list calls where resourceVersion is set See https://kubernetes.io/docs/reference/using-api/api-concepts/#resource-versions for details. Defaults to unset\n :param int timeout_seconds: Timeout for the list/watch call. This limits the duration of the call, regardless of any activity or inactivity.\n :param V1DeleteOptions body:\n :param _return_http_data_only: response data without head status code\n and headers\n :param _preload_content: if False, the urllib3.HTTPResponse object will\n be returned without reading/decoding response\n data. Default is True.\n :param _request_timeout: timeout setting for this request. If one\n number provided, it will be total request\n timeout. It can also be a pair (tuple) of\n (connection, read) timeouts.\n :return: tuple(V1Status, status_code(int), headers(HTTPHeaderDict))\n If the method is called asynchronously,\n returns the request thread.\n ' local_var_params = locals() all_params = ['namespace', 'pretty', '_continue', 'dry_run', 'field_selector', 'grace_period_seconds', 'label_selector', 'limit', 'orphan_dependents', 'propagation_policy', 'resource_version', 'resource_version_match', 'timeout_seconds', 'body'] all_params.extend(['async_req', '_return_http_data_only', '_preload_content', '_request_timeout']) for (key, val) in six.iteritems(local_var_params['kwargs']): if (key not in all_params): raise ApiTypeError(("Got an unexpected keyword argument '%s' to method delete_collection_namespaced_job" % key)) local_var_params[key] = val del local_var_params['kwargs'] if (self.api_client.client_side_validation and (('namespace' not in local_var_params) or (local_var_params['namespace'] is None))): raise ApiValueError('Missing the required parameter `namespace` when calling `delete_collection_namespaced_job`') collection_formats = {} path_params = {} if ('namespace' in local_var_params): path_params['namespace'] = local_var_params['namespace'] query_params = [] if (('pretty' in local_var_params) and (local_var_params['pretty'] is not None)): query_params.append(('pretty', local_var_params['pretty'])) if (('_continue' in local_var_params) and (local_var_params['_continue'] is not None)): query_params.append(('continue', local_var_params['_continue'])) if (('dry_run' in local_var_params) and (local_var_params['dry_run'] is not None)): query_params.append(('dryRun', local_var_params['dry_run'])) if (('field_selector' in local_var_params) and (local_var_params['field_selector'] is not None)): query_params.append(('fieldSelector', local_var_params['field_selector'])) if (('grace_period_seconds' in local_var_params) and (local_var_params['grace_period_seconds'] is not None)): query_params.append(('gracePeriodSeconds', local_var_params['grace_period_seconds'])) if (('label_selector' in local_var_params) and (local_var_params['label_selector'] is not None)): query_params.append(('labelSelector', local_var_params['label_selector'])) if (('limit' in local_var_params) and (local_var_params['limit'] is not None)): query_params.append(('limit', local_var_params['limit'])) if (('orphan_dependents' in local_var_params) and (local_var_params['orphan_dependents'] is not None)): query_params.append(('orphanDependents', local_var_params['orphan_dependents'])) if (('propagation_policy' in local_var_params) and (local_var_params['propagation_policy'] is not None)): query_params.append(('propagationPolicy', local_var_params['propagation_policy'])) if (('resource_version' in local_var_params) and (local_var_params['resource_version'] is not None)): query_params.append(('resourceVersion', local_var_params['resource_version'])) if (('resource_version_match' in local_var_params) and (local_var_params['resource_version_match'] is not None)): query_params.append(('resourceVersionMatch', local_var_params['resource_version_match'])) if (('timeout_seconds' in local_var_params) and (local_var_params['timeout_seconds'] is not None)): query_params.append(('timeoutSeconds', local_var_params['timeout_seconds'])) header_params = {} form_params = [] local_var_files = {} body_params = None if ('body' in local_var_params): body_params = local_var_params['body'] header_params['Accept'] = self.api_client.select_header_accept(['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf']) auth_settings = ['BearerToken'] return self.api_client.call_api('/apis/batch/v1/namespaces/{namespace}/jobs', 'DELETE', path_params, query_params, header_params, body=body_params, post_params=form_params, files=local_var_files, response_type='V1Status', auth_settings=auth_settings, async_req=local_var_params.get('async_req'), _return_http_data_only=local_var_params.get('_return_http_data_only'), _preload_content=local_var_params.get('_preload_content', True), _request_timeout=local_var_params.get('_request_timeout'), collection_formats=collection_formats)<|docstring|>delete_collection_namespaced_job # noqa: E501 delete collection of Job # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True >>> thread = api.delete_collection_namespaced_job_with_http_info(namespace, async_req=True) >>> result = thread.get() :param async_req bool: execute request asynchronously :param str namespace: object name and auth scope, such as for teams and projects (required) :param str pretty: If 'true', then the output is pretty printed. :param str _continue: The continue option should be set when retrieving more results from the server. Since this value is server defined, clients may only use the continue value from a previous query result with identical query parameters (except for the value of continue) and the server may reject a continue value it does not recognize. If the specified continue value is no longer valid whether due to expiration (generally five to fifteen minutes) or a configuration change on the server, the server will respond with a 410 ResourceExpired error together with a continue token. If the client needs a consistent list, it must restart their list without the continue field. Otherwise, the client may send another list request with the token received with the 410 error, the server will respond with a list starting from the next key, but from the latest snapshot, which is inconsistent from the previous list results - objects that are created, modified, or deleted after the first list request will be included in the response, as long as their keys are after the "next key". This field is not supported when watch is true. Clients may start a watch from the last resourceVersion value returned by the server and not miss any modifications. :param str dry_run: When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed :param str field_selector: A selector to restrict the list of returned objects by their fields. Defaults to everything. :param int grace_period_seconds: The duration in seconds before the object should be deleted. Value must be non-negative integer. The value zero indicates delete immediately. If this value is nil, the default grace period for the specified type will be used. Defaults to a per object value if not specified. zero means delete immediately. :param str label_selector: A selector to restrict the list of returned objects by their labels. Defaults to everything. :param int limit: limit is a maximum number of responses to return for a list call. If more items exist, the server will set the `continue` field on the list metadata to a value that can be used with the same initial query to retrieve the next set of results. Setting a limit may return fewer than the requested amount of items (up to zero items) in the event all requested objects are filtered out and clients should only use the presence of the continue field to determine whether more results are available. Servers may choose not to support the limit argument and will return all of the available results. If limit is specified and the continue field is empty, clients may assume that no more results are available. This field is not supported if watch is true. The server guarantees that the objects returned when using continue will be identical to issuing a single list call without a limit - that is, no objects created, modified, or deleted after the first request is issued will be included in any subsequent continued requests. This is sometimes referred to as a consistent snapshot, and ensures that a client that is using limit to receive smaller chunks of a very large result can ensure they see all possible objects. If objects are updated during a chunked list the version of the object that was present at the time the first list result was calculated is returned. :param bool orphan_dependents: Deprecated: please use the PropagationPolicy, this field will be deprecated in 1.7. Should the dependent objects be orphaned. If true/false, the "orphan" finalizer will be added to/removed from the object's finalizers list. Either this field or PropagationPolicy may be set, but not both. :param str propagation_policy: Whether and how garbage collection will be performed. Either this field or OrphanDependents may be set, but not both. The default policy is decided by the existing finalizer set in the metadata.finalizers and the resource-specific default policy. Acceptable values are: 'Orphan' - orphan the dependents; 'Background' - allow the garbage collector to delete the dependents in the background; 'Foreground' - a cascading policy that deletes all dependents in the foreground. :param str resource_version: resourceVersion sets a constraint on what resource versions a request may be served from. See https://kubernetes.io/docs/reference/using-api/api-concepts/#resource-versions for details. Defaults to unset :param str resource_version_match: resourceVersionMatch determines how resourceVersion is applied to list calls. It is highly recommended that resourceVersionMatch be set for list calls where resourceVersion is set See https://kubernetes.io/docs/reference/using-api/api-concepts/#resource-versions for details. Defaults to unset :param int timeout_seconds: Timeout for the list/watch call. This limits the duration of the call, regardless of any activity or inactivity. :param V1DeleteOptions body: :param _return_http_data_only: response data without head status code and headers :param _preload_content: if False, the urllib3.HTTPResponse object will be returned without reading/decoding response data. Default is True. :param _request_timeout: timeout setting for this request. If one number provided, it will be total request timeout. It can also be a pair (tuple) of (connection, read) timeouts. :return: tuple(V1Status, status_code(int), headers(HTTPHeaderDict)) If the method is called asynchronously, returns the request thread.<|endoftext|>
6b9c51dc3b9eab60198485a952c5e1a4f075d78903104700361e5b6afd96b2e6
def delete_namespaced_cron_job(self, name, namespace, **kwargs): 'delete_namespaced_cron_job # noqa: E501\n\n delete a CronJob # noqa: E501\n This method makes a synchronous HTTP request by default. To make an\n asynchronous HTTP request, please pass async_req=True\n >>> thread = api.delete_namespaced_cron_job(name, namespace, async_req=True)\n >>> result = thread.get()\n\n :param async_req bool: execute request asynchronously\n :param str name: name of the CronJob (required)\n :param str namespace: object name and auth scope, such as for teams and projects (required)\n :param str pretty: If \'true\', then the output is pretty printed.\n :param str dry_run: When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed\n :param int grace_period_seconds: The duration in seconds before the object should be deleted. Value must be non-negative integer. The value zero indicates delete immediately. If this value is nil, the default grace period for the specified type will be used. Defaults to a per object value if not specified. zero means delete immediately.\n :param bool orphan_dependents: Deprecated: please use the PropagationPolicy, this field will be deprecated in 1.7. Should the dependent objects be orphaned. If true/false, the "orphan" finalizer will be added to/removed from the object\'s finalizers list. Either this field or PropagationPolicy may be set, but not both.\n :param str propagation_policy: Whether and how garbage collection will be performed. Either this field or OrphanDependents may be set, but not both. The default policy is decided by the existing finalizer set in the metadata.finalizers and the resource-specific default policy. Acceptable values are: \'Orphan\' - orphan the dependents; \'Background\' - allow the garbage collector to delete the dependents in the background; \'Foreground\' - a cascading policy that deletes all dependents in the foreground.\n :param V1DeleteOptions body:\n :param _preload_content: if False, the urllib3.HTTPResponse object will\n be returned without reading/decoding response\n data. Default is True.\n :param _request_timeout: timeout setting for this request. If one\n number provided, it will be total request\n timeout. It can also be a pair (tuple) of\n (connection, read) timeouts.\n :return: V1Status\n If the method is called asynchronously,\n returns the request thread.\n ' kwargs['_return_http_data_only'] = True return self.delete_namespaced_cron_job_with_http_info(name, namespace, **kwargs)
delete_namespaced_cron_job # noqa: E501 delete a CronJob # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True >>> thread = api.delete_namespaced_cron_job(name, namespace, async_req=True) >>> result = thread.get() :param async_req bool: execute request asynchronously :param str name: name of the CronJob (required) :param str namespace: object name and auth scope, such as for teams and projects (required) :param str pretty: If 'true', then the output is pretty printed. :param str dry_run: When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed :param int grace_period_seconds: The duration in seconds before the object should be deleted. Value must be non-negative integer. The value zero indicates delete immediately. If this value is nil, the default grace period for the specified type will be used. Defaults to a per object value if not specified. zero means delete immediately. :param bool orphan_dependents: Deprecated: please use the PropagationPolicy, this field will be deprecated in 1.7. Should the dependent objects be orphaned. If true/false, the "orphan" finalizer will be added to/removed from the object's finalizers list. Either this field or PropagationPolicy may be set, but not both. :param str propagation_policy: Whether and how garbage collection will be performed. Either this field or OrphanDependents may be set, but not both. The default policy is decided by the existing finalizer set in the metadata.finalizers and the resource-specific default policy. Acceptable values are: 'Orphan' - orphan the dependents; 'Background' - allow the garbage collector to delete the dependents in the background; 'Foreground' - a cascading policy that deletes all dependents in the foreground. :param V1DeleteOptions body: :param _preload_content: if False, the urllib3.HTTPResponse object will be returned without reading/decoding response data. Default is True. :param _request_timeout: timeout setting for this request. If one number provided, it will be total request timeout. It can also be a pair (tuple) of (connection, read) timeouts. :return: V1Status If the method is called asynchronously, returns the request thread.
kubernetes/client/api/batch_v1_api.py
delete_namespaced_cron_job
knkgun/python
1
python
def delete_namespaced_cron_job(self, name, namespace, **kwargs): 'delete_namespaced_cron_job # noqa: E501\n\n delete a CronJob # noqa: E501\n This method makes a synchronous HTTP request by default. To make an\n asynchronous HTTP request, please pass async_req=True\n >>> thread = api.delete_namespaced_cron_job(name, namespace, async_req=True)\n >>> result = thread.get()\n\n :param async_req bool: execute request asynchronously\n :param str name: name of the CronJob (required)\n :param str namespace: object name and auth scope, such as for teams and projects (required)\n :param str pretty: If \'true\', then the output is pretty printed.\n :param str dry_run: When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed\n :param int grace_period_seconds: The duration in seconds before the object should be deleted. Value must be non-negative integer. The value zero indicates delete immediately. If this value is nil, the default grace period for the specified type will be used. Defaults to a per object value if not specified. zero means delete immediately.\n :param bool orphan_dependents: Deprecated: please use the PropagationPolicy, this field will be deprecated in 1.7. Should the dependent objects be orphaned. If true/false, the "orphan" finalizer will be added to/removed from the object\'s finalizers list. Either this field or PropagationPolicy may be set, but not both.\n :param str propagation_policy: Whether and how garbage collection will be performed. Either this field or OrphanDependents may be set, but not both. The default policy is decided by the existing finalizer set in the metadata.finalizers and the resource-specific default policy. Acceptable values are: \'Orphan\' - orphan the dependents; \'Background\' - allow the garbage collector to delete the dependents in the background; \'Foreground\' - a cascading policy that deletes all dependents in the foreground.\n :param V1DeleteOptions body:\n :param _preload_content: if False, the urllib3.HTTPResponse object will\n be returned without reading/decoding response\n data. Default is True.\n :param _request_timeout: timeout setting for this request. If one\n number provided, it will be total request\n timeout. It can also be a pair (tuple) of\n (connection, read) timeouts.\n :return: V1Status\n If the method is called asynchronously,\n returns the request thread.\n ' kwargs['_return_http_data_only'] = True return self.delete_namespaced_cron_job_with_http_info(name, namespace, **kwargs)
def delete_namespaced_cron_job(self, name, namespace, **kwargs): 'delete_namespaced_cron_job # noqa: E501\n\n delete a CronJob # noqa: E501\n This method makes a synchronous HTTP request by default. To make an\n asynchronous HTTP request, please pass async_req=True\n >>> thread = api.delete_namespaced_cron_job(name, namespace, async_req=True)\n >>> result = thread.get()\n\n :param async_req bool: execute request asynchronously\n :param str name: name of the CronJob (required)\n :param str namespace: object name and auth scope, such as for teams and projects (required)\n :param str pretty: If \'true\', then the output is pretty printed.\n :param str dry_run: When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed\n :param int grace_period_seconds: The duration in seconds before the object should be deleted. Value must be non-negative integer. The value zero indicates delete immediately. If this value is nil, the default grace period for the specified type will be used. Defaults to a per object value if not specified. zero means delete immediately.\n :param bool orphan_dependents: Deprecated: please use the PropagationPolicy, this field will be deprecated in 1.7. Should the dependent objects be orphaned. If true/false, the "orphan" finalizer will be added to/removed from the object\'s finalizers list. Either this field or PropagationPolicy may be set, but not both.\n :param str propagation_policy: Whether and how garbage collection will be performed. Either this field or OrphanDependents may be set, but not both. The default policy is decided by the existing finalizer set in the metadata.finalizers and the resource-specific default policy. Acceptable values are: \'Orphan\' - orphan the dependents; \'Background\' - allow the garbage collector to delete the dependents in the background; \'Foreground\' - a cascading policy that deletes all dependents in the foreground.\n :param V1DeleteOptions body:\n :param _preload_content: if False, the urllib3.HTTPResponse object will\n be returned without reading/decoding response\n data. Default is True.\n :param _request_timeout: timeout setting for this request. If one\n number provided, it will be total request\n timeout. It can also be a pair (tuple) of\n (connection, read) timeouts.\n :return: V1Status\n If the method is called asynchronously,\n returns the request thread.\n ' kwargs['_return_http_data_only'] = True return self.delete_namespaced_cron_job_with_http_info(name, namespace, **kwargs)<|docstring|>delete_namespaced_cron_job # noqa: E501 delete a CronJob # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True >>> thread = api.delete_namespaced_cron_job(name, namespace, async_req=True) >>> result = thread.get() :param async_req bool: execute request asynchronously :param str name: name of the CronJob (required) :param str namespace: object name and auth scope, such as for teams and projects (required) :param str pretty: If 'true', then the output is pretty printed. :param str dry_run: When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed :param int grace_period_seconds: The duration in seconds before the object should be deleted. Value must be non-negative integer. The value zero indicates delete immediately. If this value is nil, the default grace period for the specified type will be used. Defaults to a per object value if not specified. zero means delete immediately. :param bool orphan_dependents: Deprecated: please use the PropagationPolicy, this field will be deprecated in 1.7. Should the dependent objects be orphaned. If true/false, the "orphan" finalizer will be added to/removed from the object's finalizers list. Either this field or PropagationPolicy may be set, but not both. :param str propagation_policy: Whether and how garbage collection will be performed. Either this field or OrphanDependents may be set, but not both. The default policy is decided by the existing finalizer set in the metadata.finalizers and the resource-specific default policy. Acceptable values are: 'Orphan' - orphan the dependents; 'Background' - allow the garbage collector to delete the dependents in the background; 'Foreground' - a cascading policy that deletes all dependents in the foreground. :param V1DeleteOptions body: :param _preload_content: if False, the urllib3.HTTPResponse object will be returned without reading/decoding response data. Default is True. :param _request_timeout: timeout setting for this request. If one number provided, it will be total request timeout. It can also be a pair (tuple) of (connection, read) timeouts. :return: V1Status If the method is called asynchronously, returns the request thread.<|endoftext|>
7cb47c291d373fdba6bd09df74ff53a7b1daf134fd13fedfc63430bfbd88528e
def delete_namespaced_cron_job_with_http_info(self, name, namespace, **kwargs): 'delete_namespaced_cron_job # noqa: E501\n\n delete a CronJob # noqa: E501\n This method makes a synchronous HTTP request by default. To make an\n asynchronous HTTP request, please pass async_req=True\n >>> thread = api.delete_namespaced_cron_job_with_http_info(name, namespace, async_req=True)\n >>> result = thread.get()\n\n :param async_req bool: execute request asynchronously\n :param str name: name of the CronJob (required)\n :param str namespace: object name and auth scope, such as for teams and projects (required)\n :param str pretty: If \'true\', then the output is pretty printed.\n :param str dry_run: When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed\n :param int grace_period_seconds: The duration in seconds before the object should be deleted. Value must be non-negative integer. The value zero indicates delete immediately. If this value is nil, the default grace period for the specified type will be used. Defaults to a per object value if not specified. zero means delete immediately.\n :param bool orphan_dependents: Deprecated: please use the PropagationPolicy, this field will be deprecated in 1.7. Should the dependent objects be orphaned. If true/false, the "orphan" finalizer will be added to/removed from the object\'s finalizers list. Either this field or PropagationPolicy may be set, but not both.\n :param str propagation_policy: Whether and how garbage collection will be performed. Either this field or OrphanDependents may be set, but not both. The default policy is decided by the existing finalizer set in the metadata.finalizers and the resource-specific default policy. Acceptable values are: \'Orphan\' - orphan the dependents; \'Background\' - allow the garbage collector to delete the dependents in the background; \'Foreground\' - a cascading policy that deletes all dependents in the foreground.\n :param V1DeleteOptions body:\n :param _return_http_data_only: response data without head status code\n and headers\n :param _preload_content: if False, the urllib3.HTTPResponse object will\n be returned without reading/decoding response\n data. Default is True.\n :param _request_timeout: timeout setting for this request. If one\n number provided, it will be total request\n timeout. It can also be a pair (tuple) of\n (connection, read) timeouts.\n :return: tuple(V1Status, status_code(int), headers(HTTPHeaderDict))\n If the method is called asynchronously,\n returns the request thread.\n ' local_var_params = locals() all_params = ['name', 'namespace', 'pretty', 'dry_run', 'grace_period_seconds', 'orphan_dependents', 'propagation_policy', 'body'] all_params.extend(['async_req', '_return_http_data_only', '_preload_content', '_request_timeout']) for (key, val) in six.iteritems(local_var_params['kwargs']): if (key not in all_params): raise ApiTypeError(("Got an unexpected keyword argument '%s' to method delete_namespaced_cron_job" % key)) local_var_params[key] = val del local_var_params['kwargs'] if (self.api_client.client_side_validation and (('name' not in local_var_params) or (local_var_params['name'] is None))): raise ApiValueError('Missing the required parameter `name` when calling `delete_namespaced_cron_job`') if (self.api_client.client_side_validation and (('namespace' not in local_var_params) or (local_var_params['namespace'] is None))): raise ApiValueError('Missing the required parameter `namespace` when calling `delete_namespaced_cron_job`') collection_formats = {} path_params = {} if ('name' in local_var_params): path_params['name'] = local_var_params['name'] if ('namespace' in local_var_params): path_params['namespace'] = local_var_params['namespace'] query_params = [] if (('pretty' in local_var_params) and (local_var_params['pretty'] is not None)): query_params.append(('pretty', local_var_params['pretty'])) if (('dry_run' in local_var_params) and (local_var_params['dry_run'] is not None)): query_params.append(('dryRun', local_var_params['dry_run'])) if (('grace_period_seconds' in local_var_params) and (local_var_params['grace_period_seconds'] is not None)): query_params.append(('gracePeriodSeconds', local_var_params['grace_period_seconds'])) if (('orphan_dependents' in local_var_params) and (local_var_params['orphan_dependents'] is not None)): query_params.append(('orphanDependents', local_var_params['orphan_dependents'])) if (('propagation_policy' in local_var_params) and (local_var_params['propagation_policy'] is not None)): query_params.append(('propagationPolicy', local_var_params['propagation_policy'])) header_params = {} form_params = [] local_var_files = {} body_params = None if ('body' in local_var_params): body_params = local_var_params['body'] header_params['Accept'] = self.api_client.select_header_accept(['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf']) auth_settings = ['BearerToken'] return self.api_client.call_api('/apis/batch/v1/namespaces/{namespace}/cronjobs/{name}', 'DELETE', path_params, query_params, header_params, body=body_params, post_params=form_params, files=local_var_files, response_type='V1Status', auth_settings=auth_settings, async_req=local_var_params.get('async_req'), _return_http_data_only=local_var_params.get('_return_http_data_only'), _preload_content=local_var_params.get('_preload_content', True), _request_timeout=local_var_params.get('_request_timeout'), collection_formats=collection_formats)
delete_namespaced_cron_job # noqa: E501 delete a CronJob # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True >>> thread = api.delete_namespaced_cron_job_with_http_info(name, namespace, async_req=True) >>> result = thread.get() :param async_req bool: execute request asynchronously :param str name: name of the CronJob (required) :param str namespace: object name and auth scope, such as for teams and projects (required) :param str pretty: If 'true', then the output is pretty printed. :param str dry_run: When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed :param int grace_period_seconds: The duration in seconds before the object should be deleted. Value must be non-negative integer. The value zero indicates delete immediately. If this value is nil, the default grace period for the specified type will be used. Defaults to a per object value if not specified. zero means delete immediately. :param bool orphan_dependents: Deprecated: please use the PropagationPolicy, this field will be deprecated in 1.7. Should the dependent objects be orphaned. If true/false, the "orphan" finalizer will be added to/removed from the object's finalizers list. Either this field or PropagationPolicy may be set, but not both. :param str propagation_policy: Whether and how garbage collection will be performed. Either this field or OrphanDependents may be set, but not both. The default policy is decided by the existing finalizer set in the metadata.finalizers and the resource-specific default policy. Acceptable values are: 'Orphan' - orphan the dependents; 'Background' - allow the garbage collector to delete the dependents in the background; 'Foreground' - a cascading policy that deletes all dependents in the foreground. :param V1DeleteOptions body: :param _return_http_data_only: response data without head status code and headers :param _preload_content: if False, the urllib3.HTTPResponse object will be returned without reading/decoding response data. Default is True. :param _request_timeout: timeout setting for this request. If one number provided, it will be total request timeout. It can also be a pair (tuple) of (connection, read) timeouts. :return: tuple(V1Status, status_code(int), headers(HTTPHeaderDict)) If the method is called asynchronously, returns the request thread.
kubernetes/client/api/batch_v1_api.py
delete_namespaced_cron_job_with_http_info
knkgun/python
1
python
def delete_namespaced_cron_job_with_http_info(self, name, namespace, **kwargs): 'delete_namespaced_cron_job # noqa: E501\n\n delete a CronJob # noqa: E501\n This method makes a synchronous HTTP request by default. To make an\n asynchronous HTTP request, please pass async_req=True\n >>> thread = api.delete_namespaced_cron_job_with_http_info(name, namespace, async_req=True)\n >>> result = thread.get()\n\n :param async_req bool: execute request asynchronously\n :param str name: name of the CronJob (required)\n :param str namespace: object name and auth scope, such as for teams and projects (required)\n :param str pretty: If \'true\', then the output is pretty printed.\n :param str dry_run: When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed\n :param int grace_period_seconds: The duration in seconds before the object should be deleted. Value must be non-negative integer. The value zero indicates delete immediately. If this value is nil, the default grace period for the specified type will be used. Defaults to a per object value if not specified. zero means delete immediately.\n :param bool orphan_dependents: Deprecated: please use the PropagationPolicy, this field will be deprecated in 1.7. Should the dependent objects be orphaned. If true/false, the "orphan" finalizer will be added to/removed from the object\'s finalizers list. Either this field or PropagationPolicy may be set, but not both.\n :param str propagation_policy: Whether and how garbage collection will be performed. Either this field or OrphanDependents may be set, but not both. The default policy is decided by the existing finalizer set in the metadata.finalizers and the resource-specific default policy. Acceptable values are: \'Orphan\' - orphan the dependents; \'Background\' - allow the garbage collector to delete the dependents in the background; \'Foreground\' - a cascading policy that deletes all dependents in the foreground.\n :param V1DeleteOptions body:\n :param _return_http_data_only: response data without head status code\n and headers\n :param _preload_content: if False, the urllib3.HTTPResponse object will\n be returned without reading/decoding response\n data. Default is True.\n :param _request_timeout: timeout setting for this request. If one\n number provided, it will be total request\n timeout. It can also be a pair (tuple) of\n (connection, read) timeouts.\n :return: tuple(V1Status, status_code(int), headers(HTTPHeaderDict))\n If the method is called asynchronously,\n returns the request thread.\n ' local_var_params = locals() all_params = ['name', 'namespace', 'pretty', 'dry_run', 'grace_period_seconds', 'orphan_dependents', 'propagation_policy', 'body'] all_params.extend(['async_req', '_return_http_data_only', '_preload_content', '_request_timeout']) for (key, val) in six.iteritems(local_var_params['kwargs']): if (key not in all_params): raise ApiTypeError(("Got an unexpected keyword argument '%s' to method delete_namespaced_cron_job" % key)) local_var_params[key] = val del local_var_params['kwargs'] if (self.api_client.client_side_validation and (('name' not in local_var_params) or (local_var_params['name'] is None))): raise ApiValueError('Missing the required parameter `name` when calling `delete_namespaced_cron_job`') if (self.api_client.client_side_validation and (('namespace' not in local_var_params) or (local_var_params['namespace'] is None))): raise ApiValueError('Missing the required parameter `namespace` when calling `delete_namespaced_cron_job`') collection_formats = {} path_params = {} if ('name' in local_var_params): path_params['name'] = local_var_params['name'] if ('namespace' in local_var_params): path_params['namespace'] = local_var_params['namespace'] query_params = [] if (('pretty' in local_var_params) and (local_var_params['pretty'] is not None)): query_params.append(('pretty', local_var_params['pretty'])) if (('dry_run' in local_var_params) and (local_var_params['dry_run'] is not None)): query_params.append(('dryRun', local_var_params['dry_run'])) if (('grace_period_seconds' in local_var_params) and (local_var_params['grace_period_seconds'] is not None)): query_params.append(('gracePeriodSeconds', local_var_params['grace_period_seconds'])) if (('orphan_dependents' in local_var_params) and (local_var_params['orphan_dependents'] is not None)): query_params.append(('orphanDependents', local_var_params['orphan_dependents'])) if (('propagation_policy' in local_var_params) and (local_var_params['propagation_policy'] is not None)): query_params.append(('propagationPolicy', local_var_params['propagation_policy'])) header_params = {} form_params = [] local_var_files = {} body_params = None if ('body' in local_var_params): body_params = local_var_params['body'] header_params['Accept'] = self.api_client.select_header_accept(['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf']) auth_settings = ['BearerToken'] return self.api_client.call_api('/apis/batch/v1/namespaces/{namespace}/cronjobs/{name}', 'DELETE', path_params, query_params, header_params, body=body_params, post_params=form_params, files=local_var_files, response_type='V1Status', auth_settings=auth_settings, async_req=local_var_params.get('async_req'), _return_http_data_only=local_var_params.get('_return_http_data_only'), _preload_content=local_var_params.get('_preload_content', True), _request_timeout=local_var_params.get('_request_timeout'), collection_formats=collection_formats)
def delete_namespaced_cron_job_with_http_info(self, name, namespace, **kwargs): 'delete_namespaced_cron_job # noqa: E501\n\n delete a CronJob # noqa: E501\n This method makes a synchronous HTTP request by default. To make an\n asynchronous HTTP request, please pass async_req=True\n >>> thread = api.delete_namespaced_cron_job_with_http_info(name, namespace, async_req=True)\n >>> result = thread.get()\n\n :param async_req bool: execute request asynchronously\n :param str name: name of the CronJob (required)\n :param str namespace: object name and auth scope, such as for teams and projects (required)\n :param str pretty: If \'true\', then the output is pretty printed.\n :param str dry_run: When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed\n :param int grace_period_seconds: The duration in seconds before the object should be deleted. Value must be non-negative integer. The value zero indicates delete immediately. If this value is nil, the default grace period for the specified type will be used. Defaults to a per object value if not specified. zero means delete immediately.\n :param bool orphan_dependents: Deprecated: please use the PropagationPolicy, this field will be deprecated in 1.7. Should the dependent objects be orphaned. If true/false, the "orphan" finalizer will be added to/removed from the object\'s finalizers list. Either this field or PropagationPolicy may be set, but not both.\n :param str propagation_policy: Whether and how garbage collection will be performed. Either this field or OrphanDependents may be set, but not both. The default policy is decided by the existing finalizer set in the metadata.finalizers and the resource-specific default policy. Acceptable values are: \'Orphan\' - orphan the dependents; \'Background\' - allow the garbage collector to delete the dependents in the background; \'Foreground\' - a cascading policy that deletes all dependents in the foreground.\n :param V1DeleteOptions body:\n :param _return_http_data_only: response data without head status code\n and headers\n :param _preload_content: if False, the urllib3.HTTPResponse object will\n be returned without reading/decoding response\n data. Default is True.\n :param _request_timeout: timeout setting for this request. If one\n number provided, it will be total request\n timeout. It can also be a pair (tuple) of\n (connection, read) timeouts.\n :return: tuple(V1Status, status_code(int), headers(HTTPHeaderDict))\n If the method is called asynchronously,\n returns the request thread.\n ' local_var_params = locals() all_params = ['name', 'namespace', 'pretty', 'dry_run', 'grace_period_seconds', 'orphan_dependents', 'propagation_policy', 'body'] all_params.extend(['async_req', '_return_http_data_only', '_preload_content', '_request_timeout']) for (key, val) in six.iteritems(local_var_params['kwargs']): if (key not in all_params): raise ApiTypeError(("Got an unexpected keyword argument '%s' to method delete_namespaced_cron_job" % key)) local_var_params[key] = val del local_var_params['kwargs'] if (self.api_client.client_side_validation and (('name' not in local_var_params) or (local_var_params['name'] is None))): raise ApiValueError('Missing the required parameter `name` when calling `delete_namespaced_cron_job`') if (self.api_client.client_side_validation and (('namespace' not in local_var_params) or (local_var_params['namespace'] is None))): raise ApiValueError('Missing the required parameter `namespace` when calling `delete_namespaced_cron_job`') collection_formats = {} path_params = {} if ('name' in local_var_params): path_params['name'] = local_var_params['name'] if ('namespace' in local_var_params): path_params['namespace'] = local_var_params['namespace'] query_params = [] if (('pretty' in local_var_params) and (local_var_params['pretty'] is not None)): query_params.append(('pretty', local_var_params['pretty'])) if (('dry_run' in local_var_params) and (local_var_params['dry_run'] is not None)): query_params.append(('dryRun', local_var_params['dry_run'])) if (('grace_period_seconds' in local_var_params) and (local_var_params['grace_period_seconds'] is not None)): query_params.append(('gracePeriodSeconds', local_var_params['grace_period_seconds'])) if (('orphan_dependents' in local_var_params) and (local_var_params['orphan_dependents'] is not None)): query_params.append(('orphanDependents', local_var_params['orphan_dependents'])) if (('propagation_policy' in local_var_params) and (local_var_params['propagation_policy'] is not None)): query_params.append(('propagationPolicy', local_var_params['propagation_policy'])) header_params = {} form_params = [] local_var_files = {} body_params = None if ('body' in local_var_params): body_params = local_var_params['body'] header_params['Accept'] = self.api_client.select_header_accept(['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf']) auth_settings = ['BearerToken'] return self.api_client.call_api('/apis/batch/v1/namespaces/{namespace}/cronjobs/{name}', 'DELETE', path_params, query_params, header_params, body=body_params, post_params=form_params, files=local_var_files, response_type='V1Status', auth_settings=auth_settings, async_req=local_var_params.get('async_req'), _return_http_data_only=local_var_params.get('_return_http_data_only'), _preload_content=local_var_params.get('_preload_content', True), _request_timeout=local_var_params.get('_request_timeout'), collection_formats=collection_formats)<|docstring|>delete_namespaced_cron_job # noqa: E501 delete a CronJob # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True >>> thread = api.delete_namespaced_cron_job_with_http_info(name, namespace, async_req=True) >>> result = thread.get() :param async_req bool: execute request asynchronously :param str name: name of the CronJob (required) :param str namespace: object name and auth scope, such as for teams and projects (required) :param str pretty: If 'true', then the output is pretty printed. :param str dry_run: When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed :param int grace_period_seconds: The duration in seconds before the object should be deleted. Value must be non-negative integer. The value zero indicates delete immediately. If this value is nil, the default grace period for the specified type will be used. Defaults to a per object value if not specified. zero means delete immediately. :param bool orphan_dependents: Deprecated: please use the PropagationPolicy, this field will be deprecated in 1.7. Should the dependent objects be orphaned. If true/false, the "orphan" finalizer will be added to/removed from the object's finalizers list. Either this field or PropagationPolicy may be set, but not both. :param str propagation_policy: Whether and how garbage collection will be performed. Either this field or OrphanDependents may be set, but not both. The default policy is decided by the existing finalizer set in the metadata.finalizers and the resource-specific default policy. Acceptable values are: 'Orphan' - orphan the dependents; 'Background' - allow the garbage collector to delete the dependents in the background; 'Foreground' - a cascading policy that deletes all dependents in the foreground. :param V1DeleteOptions body: :param _return_http_data_only: response data without head status code and headers :param _preload_content: if False, the urllib3.HTTPResponse object will be returned without reading/decoding response data. Default is True. :param _request_timeout: timeout setting for this request. If one number provided, it will be total request timeout. It can also be a pair (tuple) of (connection, read) timeouts. :return: tuple(V1Status, status_code(int), headers(HTTPHeaderDict)) If the method is called asynchronously, returns the request thread.<|endoftext|>
a22584b7106474c884175e03cf93646e1356c0f336272c0e7817ac66416f4b0d
def delete_namespaced_job(self, name, namespace, **kwargs): 'delete_namespaced_job # noqa: E501\n\n delete a Job # noqa: E501\n This method makes a synchronous HTTP request by default. To make an\n asynchronous HTTP request, please pass async_req=True\n >>> thread = api.delete_namespaced_job(name, namespace, async_req=True)\n >>> result = thread.get()\n\n :param async_req bool: execute request asynchronously\n :param str name: name of the Job (required)\n :param str namespace: object name and auth scope, such as for teams and projects (required)\n :param str pretty: If \'true\', then the output is pretty printed.\n :param str dry_run: When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed\n :param int grace_period_seconds: The duration in seconds before the object should be deleted. Value must be non-negative integer. The value zero indicates delete immediately. If this value is nil, the default grace period for the specified type will be used. Defaults to a per object value if not specified. zero means delete immediately.\n :param bool orphan_dependents: Deprecated: please use the PropagationPolicy, this field will be deprecated in 1.7. Should the dependent objects be orphaned. If true/false, the "orphan" finalizer will be added to/removed from the object\'s finalizers list. Either this field or PropagationPolicy may be set, but not both.\n :param str propagation_policy: Whether and how garbage collection will be performed. Either this field or OrphanDependents may be set, but not both. The default policy is decided by the existing finalizer set in the metadata.finalizers and the resource-specific default policy. Acceptable values are: \'Orphan\' - orphan the dependents; \'Background\' - allow the garbage collector to delete the dependents in the background; \'Foreground\' - a cascading policy that deletes all dependents in the foreground.\n :param V1DeleteOptions body:\n :param _preload_content: if False, the urllib3.HTTPResponse object will\n be returned without reading/decoding response\n data. Default is True.\n :param _request_timeout: timeout setting for this request. If one\n number provided, it will be total request\n timeout. It can also be a pair (tuple) of\n (connection, read) timeouts.\n :return: V1Status\n If the method is called asynchronously,\n returns the request thread.\n ' kwargs['_return_http_data_only'] = True return self.delete_namespaced_job_with_http_info(name, namespace, **kwargs)
delete_namespaced_job # noqa: E501 delete a Job # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True >>> thread = api.delete_namespaced_job(name, namespace, async_req=True) >>> result = thread.get() :param async_req bool: execute request asynchronously :param str name: name of the Job (required) :param str namespace: object name and auth scope, such as for teams and projects (required) :param str pretty: If 'true', then the output is pretty printed. :param str dry_run: When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed :param int grace_period_seconds: The duration in seconds before the object should be deleted. Value must be non-negative integer. The value zero indicates delete immediately. If this value is nil, the default grace period for the specified type will be used. Defaults to a per object value if not specified. zero means delete immediately. :param bool orphan_dependents: Deprecated: please use the PropagationPolicy, this field will be deprecated in 1.7. Should the dependent objects be orphaned. If true/false, the "orphan" finalizer will be added to/removed from the object's finalizers list. Either this field or PropagationPolicy may be set, but not both. :param str propagation_policy: Whether and how garbage collection will be performed. Either this field or OrphanDependents may be set, but not both. The default policy is decided by the existing finalizer set in the metadata.finalizers and the resource-specific default policy. Acceptable values are: 'Orphan' - orphan the dependents; 'Background' - allow the garbage collector to delete the dependents in the background; 'Foreground' - a cascading policy that deletes all dependents in the foreground. :param V1DeleteOptions body: :param _preload_content: if False, the urllib3.HTTPResponse object will be returned without reading/decoding response data. Default is True. :param _request_timeout: timeout setting for this request. If one number provided, it will be total request timeout. It can also be a pair (tuple) of (connection, read) timeouts. :return: V1Status If the method is called asynchronously, returns the request thread.
kubernetes/client/api/batch_v1_api.py
delete_namespaced_job
knkgun/python
1
python
def delete_namespaced_job(self, name, namespace, **kwargs): 'delete_namespaced_job # noqa: E501\n\n delete a Job # noqa: E501\n This method makes a synchronous HTTP request by default. To make an\n asynchronous HTTP request, please pass async_req=True\n >>> thread = api.delete_namespaced_job(name, namespace, async_req=True)\n >>> result = thread.get()\n\n :param async_req bool: execute request asynchronously\n :param str name: name of the Job (required)\n :param str namespace: object name and auth scope, such as for teams and projects (required)\n :param str pretty: If \'true\', then the output is pretty printed.\n :param str dry_run: When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed\n :param int grace_period_seconds: The duration in seconds before the object should be deleted. Value must be non-negative integer. The value zero indicates delete immediately. If this value is nil, the default grace period for the specified type will be used. Defaults to a per object value if not specified. zero means delete immediately.\n :param bool orphan_dependents: Deprecated: please use the PropagationPolicy, this field will be deprecated in 1.7. Should the dependent objects be orphaned. If true/false, the "orphan" finalizer will be added to/removed from the object\'s finalizers list. Either this field or PropagationPolicy may be set, but not both.\n :param str propagation_policy: Whether and how garbage collection will be performed. Either this field or OrphanDependents may be set, but not both. The default policy is decided by the existing finalizer set in the metadata.finalizers and the resource-specific default policy. Acceptable values are: \'Orphan\' - orphan the dependents; \'Background\' - allow the garbage collector to delete the dependents in the background; \'Foreground\' - a cascading policy that deletes all dependents in the foreground.\n :param V1DeleteOptions body:\n :param _preload_content: if False, the urllib3.HTTPResponse object will\n be returned without reading/decoding response\n data. Default is True.\n :param _request_timeout: timeout setting for this request. If one\n number provided, it will be total request\n timeout. It can also be a pair (tuple) of\n (connection, read) timeouts.\n :return: V1Status\n If the method is called asynchronously,\n returns the request thread.\n ' kwargs['_return_http_data_only'] = True return self.delete_namespaced_job_with_http_info(name, namespace, **kwargs)
def delete_namespaced_job(self, name, namespace, **kwargs): 'delete_namespaced_job # noqa: E501\n\n delete a Job # noqa: E501\n This method makes a synchronous HTTP request by default. To make an\n asynchronous HTTP request, please pass async_req=True\n >>> thread = api.delete_namespaced_job(name, namespace, async_req=True)\n >>> result = thread.get()\n\n :param async_req bool: execute request asynchronously\n :param str name: name of the Job (required)\n :param str namespace: object name and auth scope, such as for teams and projects (required)\n :param str pretty: If \'true\', then the output is pretty printed.\n :param str dry_run: When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed\n :param int grace_period_seconds: The duration in seconds before the object should be deleted. Value must be non-negative integer. The value zero indicates delete immediately. If this value is nil, the default grace period for the specified type will be used. Defaults to a per object value if not specified. zero means delete immediately.\n :param bool orphan_dependents: Deprecated: please use the PropagationPolicy, this field will be deprecated in 1.7. Should the dependent objects be orphaned. If true/false, the "orphan" finalizer will be added to/removed from the object\'s finalizers list. Either this field or PropagationPolicy may be set, but not both.\n :param str propagation_policy: Whether and how garbage collection will be performed. Either this field or OrphanDependents may be set, but not both. The default policy is decided by the existing finalizer set in the metadata.finalizers and the resource-specific default policy. Acceptable values are: \'Orphan\' - orphan the dependents; \'Background\' - allow the garbage collector to delete the dependents in the background; \'Foreground\' - a cascading policy that deletes all dependents in the foreground.\n :param V1DeleteOptions body:\n :param _preload_content: if False, the urllib3.HTTPResponse object will\n be returned without reading/decoding response\n data. Default is True.\n :param _request_timeout: timeout setting for this request. If one\n number provided, it will be total request\n timeout. It can also be a pair (tuple) of\n (connection, read) timeouts.\n :return: V1Status\n If the method is called asynchronously,\n returns the request thread.\n ' kwargs['_return_http_data_only'] = True return self.delete_namespaced_job_with_http_info(name, namespace, **kwargs)<|docstring|>delete_namespaced_job # noqa: E501 delete a Job # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True >>> thread = api.delete_namespaced_job(name, namespace, async_req=True) >>> result = thread.get() :param async_req bool: execute request asynchronously :param str name: name of the Job (required) :param str namespace: object name and auth scope, such as for teams and projects (required) :param str pretty: If 'true', then the output is pretty printed. :param str dry_run: When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed :param int grace_period_seconds: The duration in seconds before the object should be deleted. Value must be non-negative integer. The value zero indicates delete immediately. If this value is nil, the default grace period for the specified type will be used. Defaults to a per object value if not specified. zero means delete immediately. :param bool orphan_dependents: Deprecated: please use the PropagationPolicy, this field will be deprecated in 1.7. Should the dependent objects be orphaned. If true/false, the "orphan" finalizer will be added to/removed from the object's finalizers list. Either this field or PropagationPolicy may be set, but not both. :param str propagation_policy: Whether and how garbage collection will be performed. Either this field or OrphanDependents may be set, but not both. The default policy is decided by the existing finalizer set in the metadata.finalizers and the resource-specific default policy. Acceptable values are: 'Orphan' - orphan the dependents; 'Background' - allow the garbage collector to delete the dependents in the background; 'Foreground' - a cascading policy that deletes all dependents in the foreground. :param V1DeleteOptions body: :param _preload_content: if False, the urllib3.HTTPResponse object will be returned without reading/decoding response data. Default is True. :param _request_timeout: timeout setting for this request. If one number provided, it will be total request timeout. It can also be a pair (tuple) of (connection, read) timeouts. :return: V1Status If the method is called asynchronously, returns the request thread.<|endoftext|>
cae0f0b4c51eb35151392eb37f4a4c5ca9e2384a87c8e9c827d007ada0980c19
def delete_namespaced_job_with_http_info(self, name, namespace, **kwargs): 'delete_namespaced_job # noqa: E501\n\n delete a Job # noqa: E501\n This method makes a synchronous HTTP request by default. To make an\n asynchronous HTTP request, please pass async_req=True\n >>> thread = api.delete_namespaced_job_with_http_info(name, namespace, async_req=True)\n >>> result = thread.get()\n\n :param async_req bool: execute request asynchronously\n :param str name: name of the Job (required)\n :param str namespace: object name and auth scope, such as for teams and projects (required)\n :param str pretty: If \'true\', then the output is pretty printed.\n :param str dry_run: When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed\n :param int grace_period_seconds: The duration in seconds before the object should be deleted. Value must be non-negative integer. The value zero indicates delete immediately. If this value is nil, the default grace period for the specified type will be used. Defaults to a per object value if not specified. zero means delete immediately.\n :param bool orphan_dependents: Deprecated: please use the PropagationPolicy, this field will be deprecated in 1.7. Should the dependent objects be orphaned. If true/false, the "orphan" finalizer will be added to/removed from the object\'s finalizers list. Either this field or PropagationPolicy may be set, but not both.\n :param str propagation_policy: Whether and how garbage collection will be performed. Either this field or OrphanDependents may be set, but not both. The default policy is decided by the existing finalizer set in the metadata.finalizers and the resource-specific default policy. Acceptable values are: \'Orphan\' - orphan the dependents; \'Background\' - allow the garbage collector to delete the dependents in the background; \'Foreground\' - a cascading policy that deletes all dependents in the foreground.\n :param V1DeleteOptions body:\n :param _return_http_data_only: response data without head status code\n and headers\n :param _preload_content: if False, the urllib3.HTTPResponse object will\n be returned without reading/decoding response\n data. Default is True.\n :param _request_timeout: timeout setting for this request. If one\n number provided, it will be total request\n timeout. It can also be a pair (tuple) of\n (connection, read) timeouts.\n :return: tuple(V1Status, status_code(int), headers(HTTPHeaderDict))\n If the method is called asynchronously,\n returns the request thread.\n ' local_var_params = locals() all_params = ['name', 'namespace', 'pretty', 'dry_run', 'grace_period_seconds', 'orphan_dependents', 'propagation_policy', 'body'] all_params.extend(['async_req', '_return_http_data_only', '_preload_content', '_request_timeout']) for (key, val) in six.iteritems(local_var_params['kwargs']): if (key not in all_params): raise ApiTypeError(("Got an unexpected keyword argument '%s' to method delete_namespaced_job" % key)) local_var_params[key] = val del local_var_params['kwargs'] if (self.api_client.client_side_validation and (('name' not in local_var_params) or (local_var_params['name'] is None))): raise ApiValueError('Missing the required parameter `name` when calling `delete_namespaced_job`') if (self.api_client.client_side_validation and (('namespace' not in local_var_params) or (local_var_params['namespace'] is None))): raise ApiValueError('Missing the required parameter `namespace` when calling `delete_namespaced_job`') collection_formats = {} path_params = {} if ('name' in local_var_params): path_params['name'] = local_var_params['name'] if ('namespace' in local_var_params): path_params['namespace'] = local_var_params['namespace'] query_params = [] if (('pretty' in local_var_params) and (local_var_params['pretty'] is not None)): query_params.append(('pretty', local_var_params['pretty'])) if (('dry_run' in local_var_params) and (local_var_params['dry_run'] is not None)): query_params.append(('dryRun', local_var_params['dry_run'])) if (('grace_period_seconds' in local_var_params) and (local_var_params['grace_period_seconds'] is not None)): query_params.append(('gracePeriodSeconds', local_var_params['grace_period_seconds'])) if (('orphan_dependents' in local_var_params) and (local_var_params['orphan_dependents'] is not None)): query_params.append(('orphanDependents', local_var_params['orphan_dependents'])) if (('propagation_policy' in local_var_params) and (local_var_params['propagation_policy'] is not None)): query_params.append(('propagationPolicy', local_var_params['propagation_policy'])) header_params = {} form_params = [] local_var_files = {} body_params = None if ('body' in local_var_params): body_params = local_var_params['body'] header_params['Accept'] = self.api_client.select_header_accept(['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf']) auth_settings = ['BearerToken'] return self.api_client.call_api('/apis/batch/v1/namespaces/{namespace}/jobs/{name}', 'DELETE', path_params, query_params, header_params, body=body_params, post_params=form_params, files=local_var_files, response_type='V1Status', auth_settings=auth_settings, async_req=local_var_params.get('async_req'), _return_http_data_only=local_var_params.get('_return_http_data_only'), _preload_content=local_var_params.get('_preload_content', True), _request_timeout=local_var_params.get('_request_timeout'), collection_formats=collection_formats)
delete_namespaced_job # noqa: E501 delete a Job # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True >>> thread = api.delete_namespaced_job_with_http_info(name, namespace, async_req=True) >>> result = thread.get() :param async_req bool: execute request asynchronously :param str name: name of the Job (required) :param str namespace: object name and auth scope, such as for teams and projects (required) :param str pretty: If 'true', then the output is pretty printed. :param str dry_run: When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed :param int grace_period_seconds: The duration in seconds before the object should be deleted. Value must be non-negative integer. The value zero indicates delete immediately. If this value is nil, the default grace period for the specified type will be used. Defaults to a per object value if not specified. zero means delete immediately. :param bool orphan_dependents: Deprecated: please use the PropagationPolicy, this field will be deprecated in 1.7. Should the dependent objects be orphaned. If true/false, the "orphan" finalizer will be added to/removed from the object's finalizers list. Either this field or PropagationPolicy may be set, but not both. :param str propagation_policy: Whether and how garbage collection will be performed. Either this field or OrphanDependents may be set, but not both. The default policy is decided by the existing finalizer set in the metadata.finalizers and the resource-specific default policy. Acceptable values are: 'Orphan' - orphan the dependents; 'Background' - allow the garbage collector to delete the dependents in the background; 'Foreground' - a cascading policy that deletes all dependents in the foreground. :param V1DeleteOptions body: :param _return_http_data_only: response data without head status code and headers :param _preload_content: if False, the urllib3.HTTPResponse object will be returned without reading/decoding response data. Default is True. :param _request_timeout: timeout setting for this request. If one number provided, it will be total request timeout. It can also be a pair (tuple) of (connection, read) timeouts. :return: tuple(V1Status, status_code(int), headers(HTTPHeaderDict)) If the method is called asynchronously, returns the request thread.
kubernetes/client/api/batch_v1_api.py
delete_namespaced_job_with_http_info
knkgun/python
1
python
def delete_namespaced_job_with_http_info(self, name, namespace, **kwargs): 'delete_namespaced_job # noqa: E501\n\n delete a Job # noqa: E501\n This method makes a synchronous HTTP request by default. To make an\n asynchronous HTTP request, please pass async_req=True\n >>> thread = api.delete_namespaced_job_with_http_info(name, namespace, async_req=True)\n >>> result = thread.get()\n\n :param async_req bool: execute request asynchronously\n :param str name: name of the Job (required)\n :param str namespace: object name and auth scope, such as for teams and projects (required)\n :param str pretty: If \'true\', then the output is pretty printed.\n :param str dry_run: When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed\n :param int grace_period_seconds: The duration in seconds before the object should be deleted. Value must be non-negative integer. The value zero indicates delete immediately. If this value is nil, the default grace period for the specified type will be used. Defaults to a per object value if not specified. zero means delete immediately.\n :param bool orphan_dependents: Deprecated: please use the PropagationPolicy, this field will be deprecated in 1.7. Should the dependent objects be orphaned. If true/false, the "orphan" finalizer will be added to/removed from the object\'s finalizers list. Either this field or PropagationPolicy may be set, but not both.\n :param str propagation_policy: Whether and how garbage collection will be performed. Either this field or OrphanDependents may be set, but not both. The default policy is decided by the existing finalizer set in the metadata.finalizers and the resource-specific default policy. Acceptable values are: \'Orphan\' - orphan the dependents; \'Background\' - allow the garbage collector to delete the dependents in the background; \'Foreground\' - a cascading policy that deletes all dependents in the foreground.\n :param V1DeleteOptions body:\n :param _return_http_data_only: response data without head status code\n and headers\n :param _preload_content: if False, the urllib3.HTTPResponse object will\n be returned without reading/decoding response\n data. Default is True.\n :param _request_timeout: timeout setting for this request. If one\n number provided, it will be total request\n timeout. It can also be a pair (tuple) of\n (connection, read) timeouts.\n :return: tuple(V1Status, status_code(int), headers(HTTPHeaderDict))\n If the method is called asynchronously,\n returns the request thread.\n ' local_var_params = locals() all_params = ['name', 'namespace', 'pretty', 'dry_run', 'grace_period_seconds', 'orphan_dependents', 'propagation_policy', 'body'] all_params.extend(['async_req', '_return_http_data_only', '_preload_content', '_request_timeout']) for (key, val) in six.iteritems(local_var_params['kwargs']): if (key not in all_params): raise ApiTypeError(("Got an unexpected keyword argument '%s' to method delete_namespaced_job" % key)) local_var_params[key] = val del local_var_params['kwargs'] if (self.api_client.client_side_validation and (('name' not in local_var_params) or (local_var_params['name'] is None))): raise ApiValueError('Missing the required parameter `name` when calling `delete_namespaced_job`') if (self.api_client.client_side_validation and (('namespace' not in local_var_params) or (local_var_params['namespace'] is None))): raise ApiValueError('Missing the required parameter `namespace` when calling `delete_namespaced_job`') collection_formats = {} path_params = {} if ('name' in local_var_params): path_params['name'] = local_var_params['name'] if ('namespace' in local_var_params): path_params['namespace'] = local_var_params['namespace'] query_params = [] if (('pretty' in local_var_params) and (local_var_params['pretty'] is not None)): query_params.append(('pretty', local_var_params['pretty'])) if (('dry_run' in local_var_params) and (local_var_params['dry_run'] is not None)): query_params.append(('dryRun', local_var_params['dry_run'])) if (('grace_period_seconds' in local_var_params) and (local_var_params['grace_period_seconds'] is not None)): query_params.append(('gracePeriodSeconds', local_var_params['grace_period_seconds'])) if (('orphan_dependents' in local_var_params) and (local_var_params['orphan_dependents'] is not None)): query_params.append(('orphanDependents', local_var_params['orphan_dependents'])) if (('propagation_policy' in local_var_params) and (local_var_params['propagation_policy'] is not None)): query_params.append(('propagationPolicy', local_var_params['propagation_policy'])) header_params = {} form_params = [] local_var_files = {} body_params = None if ('body' in local_var_params): body_params = local_var_params['body'] header_params['Accept'] = self.api_client.select_header_accept(['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf']) auth_settings = ['BearerToken'] return self.api_client.call_api('/apis/batch/v1/namespaces/{namespace}/jobs/{name}', 'DELETE', path_params, query_params, header_params, body=body_params, post_params=form_params, files=local_var_files, response_type='V1Status', auth_settings=auth_settings, async_req=local_var_params.get('async_req'), _return_http_data_only=local_var_params.get('_return_http_data_only'), _preload_content=local_var_params.get('_preload_content', True), _request_timeout=local_var_params.get('_request_timeout'), collection_formats=collection_formats)
def delete_namespaced_job_with_http_info(self, name, namespace, **kwargs): 'delete_namespaced_job # noqa: E501\n\n delete a Job # noqa: E501\n This method makes a synchronous HTTP request by default. To make an\n asynchronous HTTP request, please pass async_req=True\n >>> thread = api.delete_namespaced_job_with_http_info(name, namespace, async_req=True)\n >>> result = thread.get()\n\n :param async_req bool: execute request asynchronously\n :param str name: name of the Job (required)\n :param str namespace: object name and auth scope, such as for teams and projects (required)\n :param str pretty: If \'true\', then the output is pretty printed.\n :param str dry_run: When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed\n :param int grace_period_seconds: The duration in seconds before the object should be deleted. Value must be non-negative integer. The value zero indicates delete immediately. If this value is nil, the default grace period for the specified type will be used. Defaults to a per object value if not specified. zero means delete immediately.\n :param bool orphan_dependents: Deprecated: please use the PropagationPolicy, this field will be deprecated in 1.7. Should the dependent objects be orphaned. If true/false, the "orphan" finalizer will be added to/removed from the object\'s finalizers list. Either this field or PropagationPolicy may be set, but not both.\n :param str propagation_policy: Whether and how garbage collection will be performed. Either this field or OrphanDependents may be set, but not both. The default policy is decided by the existing finalizer set in the metadata.finalizers and the resource-specific default policy. Acceptable values are: \'Orphan\' - orphan the dependents; \'Background\' - allow the garbage collector to delete the dependents in the background; \'Foreground\' - a cascading policy that deletes all dependents in the foreground.\n :param V1DeleteOptions body:\n :param _return_http_data_only: response data without head status code\n and headers\n :param _preload_content: if False, the urllib3.HTTPResponse object will\n be returned without reading/decoding response\n data. Default is True.\n :param _request_timeout: timeout setting for this request. If one\n number provided, it will be total request\n timeout. It can also be a pair (tuple) of\n (connection, read) timeouts.\n :return: tuple(V1Status, status_code(int), headers(HTTPHeaderDict))\n If the method is called asynchronously,\n returns the request thread.\n ' local_var_params = locals() all_params = ['name', 'namespace', 'pretty', 'dry_run', 'grace_period_seconds', 'orphan_dependents', 'propagation_policy', 'body'] all_params.extend(['async_req', '_return_http_data_only', '_preload_content', '_request_timeout']) for (key, val) in six.iteritems(local_var_params['kwargs']): if (key not in all_params): raise ApiTypeError(("Got an unexpected keyword argument '%s' to method delete_namespaced_job" % key)) local_var_params[key] = val del local_var_params['kwargs'] if (self.api_client.client_side_validation and (('name' not in local_var_params) or (local_var_params['name'] is None))): raise ApiValueError('Missing the required parameter `name` when calling `delete_namespaced_job`') if (self.api_client.client_side_validation and (('namespace' not in local_var_params) or (local_var_params['namespace'] is None))): raise ApiValueError('Missing the required parameter `namespace` when calling `delete_namespaced_job`') collection_formats = {} path_params = {} if ('name' in local_var_params): path_params['name'] = local_var_params['name'] if ('namespace' in local_var_params): path_params['namespace'] = local_var_params['namespace'] query_params = [] if (('pretty' in local_var_params) and (local_var_params['pretty'] is not None)): query_params.append(('pretty', local_var_params['pretty'])) if (('dry_run' in local_var_params) and (local_var_params['dry_run'] is not None)): query_params.append(('dryRun', local_var_params['dry_run'])) if (('grace_period_seconds' in local_var_params) and (local_var_params['grace_period_seconds'] is not None)): query_params.append(('gracePeriodSeconds', local_var_params['grace_period_seconds'])) if (('orphan_dependents' in local_var_params) and (local_var_params['orphan_dependents'] is not None)): query_params.append(('orphanDependents', local_var_params['orphan_dependents'])) if (('propagation_policy' in local_var_params) and (local_var_params['propagation_policy'] is not None)): query_params.append(('propagationPolicy', local_var_params['propagation_policy'])) header_params = {} form_params = [] local_var_files = {} body_params = None if ('body' in local_var_params): body_params = local_var_params['body'] header_params['Accept'] = self.api_client.select_header_accept(['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf']) auth_settings = ['BearerToken'] return self.api_client.call_api('/apis/batch/v1/namespaces/{namespace}/jobs/{name}', 'DELETE', path_params, query_params, header_params, body=body_params, post_params=form_params, files=local_var_files, response_type='V1Status', auth_settings=auth_settings, async_req=local_var_params.get('async_req'), _return_http_data_only=local_var_params.get('_return_http_data_only'), _preload_content=local_var_params.get('_preload_content', True), _request_timeout=local_var_params.get('_request_timeout'), collection_formats=collection_formats)<|docstring|>delete_namespaced_job # noqa: E501 delete a Job # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True >>> thread = api.delete_namespaced_job_with_http_info(name, namespace, async_req=True) >>> result = thread.get() :param async_req bool: execute request asynchronously :param str name: name of the Job (required) :param str namespace: object name and auth scope, such as for teams and projects (required) :param str pretty: If 'true', then the output is pretty printed. :param str dry_run: When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed :param int grace_period_seconds: The duration in seconds before the object should be deleted. Value must be non-negative integer. The value zero indicates delete immediately. If this value is nil, the default grace period for the specified type will be used. Defaults to a per object value if not specified. zero means delete immediately. :param bool orphan_dependents: Deprecated: please use the PropagationPolicy, this field will be deprecated in 1.7. Should the dependent objects be orphaned. If true/false, the "orphan" finalizer will be added to/removed from the object's finalizers list. Either this field or PropagationPolicy may be set, but not both. :param str propagation_policy: Whether and how garbage collection will be performed. Either this field or OrphanDependents may be set, but not both. The default policy is decided by the existing finalizer set in the metadata.finalizers and the resource-specific default policy. Acceptable values are: 'Orphan' - orphan the dependents; 'Background' - allow the garbage collector to delete the dependents in the background; 'Foreground' - a cascading policy that deletes all dependents in the foreground. :param V1DeleteOptions body: :param _return_http_data_only: response data without head status code and headers :param _preload_content: if False, the urllib3.HTTPResponse object will be returned without reading/decoding response data. Default is True. :param _request_timeout: timeout setting for this request. If one number provided, it will be total request timeout. It can also be a pair (tuple) of (connection, read) timeouts. :return: tuple(V1Status, status_code(int), headers(HTTPHeaderDict)) If the method is called asynchronously, returns the request thread.<|endoftext|>
d733c5488aa13a02949dcc0ed237349e9cf3b40079acf95d71a8f0970cd95d66
def get_api_resources(self, **kwargs): 'get_api_resources # noqa: E501\n\n get available resources # noqa: E501\n This method makes a synchronous HTTP request by default. To make an\n asynchronous HTTP request, please pass async_req=True\n >>> thread = api.get_api_resources(async_req=True)\n >>> result = thread.get()\n\n :param async_req bool: execute request asynchronously\n :param _preload_content: if False, the urllib3.HTTPResponse object will\n be returned without reading/decoding response\n data. Default is True.\n :param _request_timeout: timeout setting for this request. If one\n number provided, it will be total request\n timeout. It can also be a pair (tuple) of\n (connection, read) timeouts.\n :return: V1APIResourceList\n If the method is called asynchronously,\n returns the request thread.\n ' kwargs['_return_http_data_only'] = True return self.get_api_resources_with_http_info(**kwargs)
get_api_resources # noqa: E501 get available resources # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True >>> thread = api.get_api_resources(async_req=True) >>> result = thread.get() :param async_req bool: execute request asynchronously :param _preload_content: if False, the urllib3.HTTPResponse object will be returned without reading/decoding response data. Default is True. :param _request_timeout: timeout setting for this request. If one number provided, it will be total request timeout. It can also be a pair (tuple) of (connection, read) timeouts. :return: V1APIResourceList If the method is called asynchronously, returns the request thread.
kubernetes/client/api/batch_v1_api.py
get_api_resources
knkgun/python
1
python
def get_api_resources(self, **kwargs): 'get_api_resources # noqa: E501\n\n get available resources # noqa: E501\n This method makes a synchronous HTTP request by default. To make an\n asynchronous HTTP request, please pass async_req=True\n >>> thread = api.get_api_resources(async_req=True)\n >>> result = thread.get()\n\n :param async_req bool: execute request asynchronously\n :param _preload_content: if False, the urllib3.HTTPResponse object will\n be returned without reading/decoding response\n data. Default is True.\n :param _request_timeout: timeout setting for this request. If one\n number provided, it will be total request\n timeout. It can also be a pair (tuple) of\n (connection, read) timeouts.\n :return: V1APIResourceList\n If the method is called asynchronously,\n returns the request thread.\n ' kwargs['_return_http_data_only'] = True return self.get_api_resources_with_http_info(**kwargs)
def get_api_resources(self, **kwargs): 'get_api_resources # noqa: E501\n\n get available resources # noqa: E501\n This method makes a synchronous HTTP request by default. To make an\n asynchronous HTTP request, please pass async_req=True\n >>> thread = api.get_api_resources(async_req=True)\n >>> result = thread.get()\n\n :param async_req bool: execute request asynchronously\n :param _preload_content: if False, the urllib3.HTTPResponse object will\n be returned without reading/decoding response\n data. Default is True.\n :param _request_timeout: timeout setting for this request. If one\n number provided, it will be total request\n timeout. It can also be a pair (tuple) of\n (connection, read) timeouts.\n :return: V1APIResourceList\n If the method is called asynchronously,\n returns the request thread.\n ' kwargs['_return_http_data_only'] = True return self.get_api_resources_with_http_info(**kwargs)<|docstring|>get_api_resources # noqa: E501 get available resources # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True >>> thread = api.get_api_resources(async_req=True) >>> result = thread.get() :param async_req bool: execute request asynchronously :param _preload_content: if False, the urllib3.HTTPResponse object will be returned without reading/decoding response data. Default is True. :param _request_timeout: timeout setting for this request. If one number provided, it will be total request timeout. It can also be a pair (tuple) of (connection, read) timeouts. :return: V1APIResourceList If the method is called asynchronously, returns the request thread.<|endoftext|>
3f1eeb4c51e8da66c353b6db8439f599faf5c415ad3ad0e4be1bfbbdab9af61b
def get_api_resources_with_http_info(self, **kwargs): 'get_api_resources # noqa: E501\n\n get available resources # noqa: E501\n This method makes a synchronous HTTP request by default. To make an\n asynchronous HTTP request, please pass async_req=True\n >>> thread = api.get_api_resources_with_http_info(async_req=True)\n >>> result = thread.get()\n\n :param async_req bool: execute request asynchronously\n :param _return_http_data_only: response data without head status code\n and headers\n :param _preload_content: if False, the urllib3.HTTPResponse object will\n be returned without reading/decoding response\n data. Default is True.\n :param _request_timeout: timeout setting for this request. If one\n number provided, it will be total request\n timeout. It can also be a pair (tuple) of\n (connection, read) timeouts.\n :return: tuple(V1APIResourceList, status_code(int), headers(HTTPHeaderDict))\n If the method is called asynchronously,\n returns the request thread.\n ' local_var_params = locals() all_params = [] all_params.extend(['async_req', '_return_http_data_only', '_preload_content', '_request_timeout']) for (key, val) in six.iteritems(local_var_params['kwargs']): if (key not in all_params): raise ApiTypeError(("Got an unexpected keyword argument '%s' to method get_api_resources" % key)) local_var_params[key] = val del local_var_params['kwargs'] collection_formats = {} path_params = {} query_params = [] header_params = {} form_params = [] local_var_files = {} body_params = None header_params['Accept'] = self.api_client.select_header_accept(['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf']) auth_settings = ['BearerToken'] return self.api_client.call_api('/apis/batch/v1/', 'GET', path_params, query_params, header_params, body=body_params, post_params=form_params, files=local_var_files, response_type='V1APIResourceList', auth_settings=auth_settings, async_req=local_var_params.get('async_req'), _return_http_data_only=local_var_params.get('_return_http_data_only'), _preload_content=local_var_params.get('_preload_content', True), _request_timeout=local_var_params.get('_request_timeout'), collection_formats=collection_formats)
get_api_resources # noqa: E501 get available resources # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True >>> thread = api.get_api_resources_with_http_info(async_req=True) >>> result = thread.get() :param async_req bool: execute request asynchronously :param _return_http_data_only: response data without head status code and headers :param _preload_content: if False, the urllib3.HTTPResponse object will be returned without reading/decoding response data. Default is True. :param _request_timeout: timeout setting for this request. If one number provided, it will be total request timeout. It can also be a pair (tuple) of (connection, read) timeouts. :return: tuple(V1APIResourceList, status_code(int), headers(HTTPHeaderDict)) If the method is called asynchronously, returns the request thread.
kubernetes/client/api/batch_v1_api.py
get_api_resources_with_http_info
knkgun/python
1
python
def get_api_resources_with_http_info(self, **kwargs): 'get_api_resources # noqa: E501\n\n get available resources # noqa: E501\n This method makes a synchronous HTTP request by default. To make an\n asynchronous HTTP request, please pass async_req=True\n >>> thread = api.get_api_resources_with_http_info(async_req=True)\n >>> result = thread.get()\n\n :param async_req bool: execute request asynchronously\n :param _return_http_data_only: response data without head status code\n and headers\n :param _preload_content: if False, the urllib3.HTTPResponse object will\n be returned without reading/decoding response\n data. Default is True.\n :param _request_timeout: timeout setting for this request. If one\n number provided, it will be total request\n timeout. It can also be a pair (tuple) of\n (connection, read) timeouts.\n :return: tuple(V1APIResourceList, status_code(int), headers(HTTPHeaderDict))\n If the method is called asynchronously,\n returns the request thread.\n ' local_var_params = locals() all_params = [] all_params.extend(['async_req', '_return_http_data_only', '_preload_content', '_request_timeout']) for (key, val) in six.iteritems(local_var_params['kwargs']): if (key not in all_params): raise ApiTypeError(("Got an unexpected keyword argument '%s' to method get_api_resources" % key)) local_var_params[key] = val del local_var_params['kwargs'] collection_formats = {} path_params = {} query_params = [] header_params = {} form_params = [] local_var_files = {} body_params = None header_params['Accept'] = self.api_client.select_header_accept(['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf']) auth_settings = ['BearerToken'] return self.api_client.call_api('/apis/batch/v1/', 'GET', path_params, query_params, header_params, body=body_params, post_params=form_params, files=local_var_files, response_type='V1APIResourceList', auth_settings=auth_settings, async_req=local_var_params.get('async_req'), _return_http_data_only=local_var_params.get('_return_http_data_only'), _preload_content=local_var_params.get('_preload_content', True), _request_timeout=local_var_params.get('_request_timeout'), collection_formats=collection_formats)
def get_api_resources_with_http_info(self, **kwargs): 'get_api_resources # noqa: E501\n\n get available resources # noqa: E501\n This method makes a synchronous HTTP request by default. To make an\n asynchronous HTTP request, please pass async_req=True\n >>> thread = api.get_api_resources_with_http_info(async_req=True)\n >>> result = thread.get()\n\n :param async_req bool: execute request asynchronously\n :param _return_http_data_only: response data without head status code\n and headers\n :param _preload_content: if False, the urllib3.HTTPResponse object will\n be returned without reading/decoding response\n data. Default is True.\n :param _request_timeout: timeout setting for this request. If one\n number provided, it will be total request\n timeout. It can also be a pair (tuple) of\n (connection, read) timeouts.\n :return: tuple(V1APIResourceList, status_code(int), headers(HTTPHeaderDict))\n If the method is called asynchronously,\n returns the request thread.\n ' local_var_params = locals() all_params = [] all_params.extend(['async_req', '_return_http_data_only', '_preload_content', '_request_timeout']) for (key, val) in six.iteritems(local_var_params['kwargs']): if (key not in all_params): raise ApiTypeError(("Got an unexpected keyword argument '%s' to method get_api_resources" % key)) local_var_params[key] = val del local_var_params['kwargs'] collection_formats = {} path_params = {} query_params = [] header_params = {} form_params = [] local_var_files = {} body_params = None header_params['Accept'] = self.api_client.select_header_accept(['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf']) auth_settings = ['BearerToken'] return self.api_client.call_api('/apis/batch/v1/', 'GET', path_params, query_params, header_params, body=body_params, post_params=form_params, files=local_var_files, response_type='V1APIResourceList', auth_settings=auth_settings, async_req=local_var_params.get('async_req'), _return_http_data_only=local_var_params.get('_return_http_data_only'), _preload_content=local_var_params.get('_preload_content', True), _request_timeout=local_var_params.get('_request_timeout'), collection_formats=collection_formats)<|docstring|>get_api_resources # noqa: E501 get available resources # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True >>> thread = api.get_api_resources_with_http_info(async_req=True) >>> result = thread.get() :param async_req bool: execute request asynchronously :param _return_http_data_only: response data without head status code and headers :param _preload_content: if False, the urllib3.HTTPResponse object will be returned without reading/decoding response data. Default is True. :param _request_timeout: timeout setting for this request. If one number provided, it will be total request timeout. It can also be a pair (tuple) of (connection, read) timeouts. :return: tuple(V1APIResourceList, status_code(int), headers(HTTPHeaderDict)) If the method is called asynchronously, returns the request thread.<|endoftext|>
d3384f1ba40ac781df049d7180c05f0cf201aa08a49764ed8979b386fe1aa106
def list_cron_job_for_all_namespaces(self, **kwargs): 'list_cron_job_for_all_namespaces # noqa: E501\n\n list or watch objects of kind CronJob # noqa: E501\n This method makes a synchronous HTTP request by default. To make an\n asynchronous HTTP request, please pass async_req=True\n >>> thread = api.list_cron_job_for_all_namespaces(async_req=True)\n >>> result = thread.get()\n\n :param async_req bool: execute request asynchronously\n :param bool allow_watch_bookmarks: allowWatchBookmarks requests watch events with type "BOOKMARK". Servers that do not implement bookmarks may ignore this flag and bookmarks are sent at the server\'s discretion. Clients should not assume bookmarks are returned at any specific interval, nor may they assume the server will send any BOOKMARK event during a session. If this is not a watch, this field is ignored.\n :param str _continue: The continue option should be set when retrieving more results from the server. Since this value is server defined, clients may only use the continue value from a previous query result with identical query parameters (except for the value of continue) and the server may reject a continue value it does not recognize. If the specified continue value is no longer valid whether due to expiration (generally five to fifteen minutes) or a configuration change on the server, the server will respond with a 410 ResourceExpired error together with a continue token. If the client needs a consistent list, it must restart their list without the continue field. Otherwise, the client may send another list request with the token received with the 410 error, the server will respond with a list starting from the next key, but from the latest snapshot, which is inconsistent from the previous list results - objects that are created, modified, or deleted after the first list request will be included in the response, as long as their keys are after the "next key". This field is not supported when watch is true. Clients may start a watch from the last resourceVersion value returned by the server and not miss any modifications.\n :param str field_selector: A selector to restrict the list of returned objects by their fields. Defaults to everything.\n :param str label_selector: A selector to restrict the list of returned objects by their labels. Defaults to everything.\n :param int limit: limit is a maximum number of responses to return for a list call. If more items exist, the server will set the `continue` field on the list metadata to a value that can be used with the same initial query to retrieve the next set of results. Setting a limit may return fewer than the requested amount of items (up to zero items) in the event all requested objects are filtered out and clients should only use the presence of the continue field to determine whether more results are available. Servers may choose not to support the limit argument and will return all of the available results. If limit is specified and the continue field is empty, clients may assume that no more results are available. This field is not supported if watch is true. The server guarantees that the objects returned when using continue will be identical to issuing a single list call without a limit - that is, no objects created, modified, or deleted after the first request is issued will be included in any subsequent continued requests. This is sometimes referred to as a consistent snapshot, and ensures that a client that is using limit to receive smaller chunks of a very large result can ensure they see all possible objects. If objects are updated during a chunked list the version of the object that was present at the time the first list result was calculated is returned.\n :param str pretty: If \'true\', then the output is pretty printed.\n :param str resource_version: resourceVersion sets a constraint on what resource versions a request may be served from. See https://kubernetes.io/docs/reference/using-api/api-concepts/#resource-versions for details. Defaults to unset\n :param str resource_version_match: resourceVersionMatch determines how resourceVersion is applied to list calls. It is highly recommended that resourceVersionMatch be set for list calls where resourceVersion is set See https://kubernetes.io/docs/reference/using-api/api-concepts/#resource-versions for details. Defaults to unset\n :param int timeout_seconds: Timeout for the list/watch call. This limits the duration of the call, regardless of any activity or inactivity.\n :param bool watch: Watch for changes to the described resources and return them as a stream of add, update, and remove notifications. Specify resourceVersion.\n :param _preload_content: if False, the urllib3.HTTPResponse object will\n be returned without reading/decoding response\n data. Default is True.\n :param _request_timeout: timeout setting for this request. If one\n number provided, it will be total request\n timeout. It can also be a pair (tuple) of\n (connection, read) timeouts.\n :return: V1CronJobList\n If the method is called asynchronously,\n returns the request thread.\n ' kwargs['_return_http_data_only'] = True return self.list_cron_job_for_all_namespaces_with_http_info(**kwargs)
list_cron_job_for_all_namespaces # noqa: E501 list or watch objects of kind CronJob # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True >>> thread = api.list_cron_job_for_all_namespaces(async_req=True) >>> result = thread.get() :param async_req bool: execute request asynchronously :param bool allow_watch_bookmarks: allowWatchBookmarks requests watch events with type "BOOKMARK". Servers that do not implement bookmarks may ignore this flag and bookmarks are sent at the server's discretion. Clients should not assume bookmarks are returned at any specific interval, nor may they assume the server will send any BOOKMARK event during a session. If this is not a watch, this field is ignored. :param str _continue: The continue option should be set when retrieving more results from the server. Since this value is server defined, clients may only use the continue value from a previous query result with identical query parameters (except for the value of continue) and the server may reject a continue value it does not recognize. If the specified continue value is no longer valid whether due to expiration (generally five to fifteen minutes) or a configuration change on the server, the server will respond with a 410 ResourceExpired error together with a continue token. If the client needs a consistent list, it must restart their list without the continue field. Otherwise, the client may send another list request with the token received with the 410 error, the server will respond with a list starting from the next key, but from the latest snapshot, which is inconsistent from the previous list results - objects that are created, modified, or deleted after the first list request will be included in the response, as long as their keys are after the "next key". This field is not supported when watch is true. Clients may start a watch from the last resourceVersion value returned by the server and not miss any modifications. :param str field_selector: A selector to restrict the list of returned objects by their fields. Defaults to everything. :param str label_selector: A selector to restrict the list of returned objects by their labels. Defaults to everything. :param int limit: limit is a maximum number of responses to return for a list call. If more items exist, the server will set the `continue` field on the list metadata to a value that can be used with the same initial query to retrieve the next set of results. Setting a limit may return fewer than the requested amount of items (up to zero items) in the event all requested objects are filtered out and clients should only use the presence of the continue field to determine whether more results are available. Servers may choose not to support the limit argument and will return all of the available results. If limit is specified and the continue field is empty, clients may assume that no more results are available. This field is not supported if watch is true. The server guarantees that the objects returned when using continue will be identical to issuing a single list call without a limit - that is, no objects created, modified, or deleted after the first request is issued will be included in any subsequent continued requests. This is sometimes referred to as a consistent snapshot, and ensures that a client that is using limit to receive smaller chunks of a very large result can ensure they see all possible objects. If objects are updated during a chunked list the version of the object that was present at the time the first list result was calculated is returned. :param str pretty: If 'true', then the output is pretty printed. :param str resource_version: resourceVersion sets a constraint on what resource versions a request may be served from. See https://kubernetes.io/docs/reference/using-api/api-concepts/#resource-versions for details. Defaults to unset :param str resource_version_match: resourceVersionMatch determines how resourceVersion is applied to list calls. It is highly recommended that resourceVersionMatch be set for list calls where resourceVersion is set See https://kubernetes.io/docs/reference/using-api/api-concepts/#resource-versions for details. Defaults to unset :param int timeout_seconds: Timeout for the list/watch call. This limits the duration of the call, regardless of any activity or inactivity. :param bool watch: Watch for changes to the described resources and return them as a stream of add, update, and remove notifications. Specify resourceVersion. :param _preload_content: if False, the urllib3.HTTPResponse object will be returned without reading/decoding response data. Default is True. :param _request_timeout: timeout setting for this request. If one number provided, it will be total request timeout. It can also be a pair (tuple) of (connection, read) timeouts. :return: V1CronJobList If the method is called asynchronously, returns the request thread.
kubernetes/client/api/batch_v1_api.py
list_cron_job_for_all_namespaces
knkgun/python
1
python
def list_cron_job_for_all_namespaces(self, **kwargs): 'list_cron_job_for_all_namespaces # noqa: E501\n\n list or watch objects of kind CronJob # noqa: E501\n This method makes a synchronous HTTP request by default. To make an\n asynchronous HTTP request, please pass async_req=True\n >>> thread = api.list_cron_job_for_all_namespaces(async_req=True)\n >>> result = thread.get()\n\n :param async_req bool: execute request asynchronously\n :param bool allow_watch_bookmarks: allowWatchBookmarks requests watch events with type "BOOKMARK". Servers that do not implement bookmarks may ignore this flag and bookmarks are sent at the server\'s discretion. Clients should not assume bookmarks are returned at any specific interval, nor may they assume the server will send any BOOKMARK event during a session. If this is not a watch, this field is ignored.\n :param str _continue: The continue option should be set when retrieving more results from the server. Since this value is server defined, clients may only use the continue value from a previous query result with identical query parameters (except for the value of continue) and the server may reject a continue value it does not recognize. If the specified continue value is no longer valid whether due to expiration (generally five to fifteen minutes) or a configuration change on the server, the server will respond with a 410 ResourceExpired error together with a continue token. If the client needs a consistent list, it must restart their list without the continue field. Otherwise, the client may send another list request with the token received with the 410 error, the server will respond with a list starting from the next key, but from the latest snapshot, which is inconsistent from the previous list results - objects that are created, modified, or deleted after the first list request will be included in the response, as long as their keys are after the "next key". This field is not supported when watch is true. Clients may start a watch from the last resourceVersion value returned by the server and not miss any modifications.\n :param str field_selector: A selector to restrict the list of returned objects by their fields. Defaults to everything.\n :param str label_selector: A selector to restrict the list of returned objects by their labels. Defaults to everything.\n :param int limit: limit is a maximum number of responses to return for a list call. If more items exist, the server will set the `continue` field on the list metadata to a value that can be used with the same initial query to retrieve the next set of results. Setting a limit may return fewer than the requested amount of items (up to zero items) in the event all requested objects are filtered out and clients should only use the presence of the continue field to determine whether more results are available. Servers may choose not to support the limit argument and will return all of the available results. If limit is specified and the continue field is empty, clients may assume that no more results are available. This field is not supported if watch is true. The server guarantees that the objects returned when using continue will be identical to issuing a single list call without a limit - that is, no objects created, modified, or deleted after the first request is issued will be included in any subsequent continued requests. This is sometimes referred to as a consistent snapshot, and ensures that a client that is using limit to receive smaller chunks of a very large result can ensure they see all possible objects. If objects are updated during a chunked list the version of the object that was present at the time the first list result was calculated is returned.\n :param str pretty: If \'true\', then the output is pretty printed.\n :param str resource_version: resourceVersion sets a constraint on what resource versions a request may be served from. See https://kubernetes.io/docs/reference/using-api/api-concepts/#resource-versions for details. Defaults to unset\n :param str resource_version_match: resourceVersionMatch determines how resourceVersion is applied to list calls. It is highly recommended that resourceVersionMatch be set for list calls where resourceVersion is set See https://kubernetes.io/docs/reference/using-api/api-concepts/#resource-versions for details. Defaults to unset\n :param int timeout_seconds: Timeout for the list/watch call. This limits the duration of the call, regardless of any activity or inactivity.\n :param bool watch: Watch for changes to the described resources and return them as a stream of add, update, and remove notifications. Specify resourceVersion.\n :param _preload_content: if False, the urllib3.HTTPResponse object will\n be returned without reading/decoding response\n data. Default is True.\n :param _request_timeout: timeout setting for this request. If one\n number provided, it will be total request\n timeout. It can also be a pair (tuple) of\n (connection, read) timeouts.\n :return: V1CronJobList\n If the method is called asynchronously,\n returns the request thread.\n ' kwargs['_return_http_data_only'] = True return self.list_cron_job_for_all_namespaces_with_http_info(**kwargs)
def list_cron_job_for_all_namespaces(self, **kwargs): 'list_cron_job_for_all_namespaces # noqa: E501\n\n list or watch objects of kind CronJob # noqa: E501\n This method makes a synchronous HTTP request by default. To make an\n asynchronous HTTP request, please pass async_req=True\n >>> thread = api.list_cron_job_for_all_namespaces(async_req=True)\n >>> result = thread.get()\n\n :param async_req bool: execute request asynchronously\n :param bool allow_watch_bookmarks: allowWatchBookmarks requests watch events with type "BOOKMARK". Servers that do not implement bookmarks may ignore this flag and bookmarks are sent at the server\'s discretion. Clients should not assume bookmarks are returned at any specific interval, nor may they assume the server will send any BOOKMARK event during a session. If this is not a watch, this field is ignored.\n :param str _continue: The continue option should be set when retrieving more results from the server. Since this value is server defined, clients may only use the continue value from a previous query result with identical query parameters (except for the value of continue) and the server may reject a continue value it does not recognize. If the specified continue value is no longer valid whether due to expiration (generally five to fifteen minutes) or a configuration change on the server, the server will respond with a 410 ResourceExpired error together with a continue token. If the client needs a consistent list, it must restart their list without the continue field. Otherwise, the client may send another list request with the token received with the 410 error, the server will respond with a list starting from the next key, but from the latest snapshot, which is inconsistent from the previous list results - objects that are created, modified, or deleted after the first list request will be included in the response, as long as their keys are after the "next key". This field is not supported when watch is true. Clients may start a watch from the last resourceVersion value returned by the server and not miss any modifications.\n :param str field_selector: A selector to restrict the list of returned objects by their fields. Defaults to everything.\n :param str label_selector: A selector to restrict the list of returned objects by their labels. Defaults to everything.\n :param int limit: limit is a maximum number of responses to return for a list call. If more items exist, the server will set the `continue` field on the list metadata to a value that can be used with the same initial query to retrieve the next set of results. Setting a limit may return fewer than the requested amount of items (up to zero items) in the event all requested objects are filtered out and clients should only use the presence of the continue field to determine whether more results are available. Servers may choose not to support the limit argument and will return all of the available results. If limit is specified and the continue field is empty, clients may assume that no more results are available. This field is not supported if watch is true. The server guarantees that the objects returned when using continue will be identical to issuing a single list call without a limit - that is, no objects created, modified, or deleted after the first request is issued will be included in any subsequent continued requests. This is sometimes referred to as a consistent snapshot, and ensures that a client that is using limit to receive smaller chunks of a very large result can ensure they see all possible objects. If objects are updated during a chunked list the version of the object that was present at the time the first list result was calculated is returned.\n :param str pretty: If \'true\', then the output is pretty printed.\n :param str resource_version: resourceVersion sets a constraint on what resource versions a request may be served from. See https://kubernetes.io/docs/reference/using-api/api-concepts/#resource-versions for details. Defaults to unset\n :param str resource_version_match: resourceVersionMatch determines how resourceVersion is applied to list calls. It is highly recommended that resourceVersionMatch be set for list calls where resourceVersion is set See https://kubernetes.io/docs/reference/using-api/api-concepts/#resource-versions for details. Defaults to unset\n :param int timeout_seconds: Timeout for the list/watch call. This limits the duration of the call, regardless of any activity or inactivity.\n :param bool watch: Watch for changes to the described resources and return them as a stream of add, update, and remove notifications. Specify resourceVersion.\n :param _preload_content: if False, the urllib3.HTTPResponse object will\n be returned without reading/decoding response\n data. Default is True.\n :param _request_timeout: timeout setting for this request. If one\n number provided, it will be total request\n timeout. It can also be a pair (tuple) of\n (connection, read) timeouts.\n :return: V1CronJobList\n If the method is called asynchronously,\n returns the request thread.\n ' kwargs['_return_http_data_only'] = True return self.list_cron_job_for_all_namespaces_with_http_info(**kwargs)<|docstring|>list_cron_job_for_all_namespaces # noqa: E501 list or watch objects of kind CronJob # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True >>> thread = api.list_cron_job_for_all_namespaces(async_req=True) >>> result = thread.get() :param async_req bool: execute request asynchronously :param bool allow_watch_bookmarks: allowWatchBookmarks requests watch events with type "BOOKMARK". Servers that do not implement bookmarks may ignore this flag and bookmarks are sent at the server's discretion. Clients should not assume bookmarks are returned at any specific interval, nor may they assume the server will send any BOOKMARK event during a session. If this is not a watch, this field is ignored. :param str _continue: The continue option should be set when retrieving more results from the server. Since this value is server defined, clients may only use the continue value from a previous query result with identical query parameters (except for the value of continue) and the server may reject a continue value it does not recognize. If the specified continue value is no longer valid whether due to expiration (generally five to fifteen minutes) or a configuration change on the server, the server will respond with a 410 ResourceExpired error together with a continue token. If the client needs a consistent list, it must restart their list without the continue field. Otherwise, the client may send another list request with the token received with the 410 error, the server will respond with a list starting from the next key, but from the latest snapshot, which is inconsistent from the previous list results - objects that are created, modified, or deleted after the first list request will be included in the response, as long as their keys are after the "next key". This field is not supported when watch is true. Clients may start a watch from the last resourceVersion value returned by the server and not miss any modifications. :param str field_selector: A selector to restrict the list of returned objects by their fields. Defaults to everything. :param str label_selector: A selector to restrict the list of returned objects by their labels. Defaults to everything. :param int limit: limit is a maximum number of responses to return for a list call. If more items exist, the server will set the `continue` field on the list metadata to a value that can be used with the same initial query to retrieve the next set of results. Setting a limit may return fewer than the requested amount of items (up to zero items) in the event all requested objects are filtered out and clients should only use the presence of the continue field to determine whether more results are available. Servers may choose not to support the limit argument and will return all of the available results. If limit is specified and the continue field is empty, clients may assume that no more results are available. This field is not supported if watch is true. The server guarantees that the objects returned when using continue will be identical to issuing a single list call without a limit - that is, no objects created, modified, or deleted after the first request is issued will be included in any subsequent continued requests. This is sometimes referred to as a consistent snapshot, and ensures that a client that is using limit to receive smaller chunks of a very large result can ensure they see all possible objects. If objects are updated during a chunked list the version of the object that was present at the time the first list result was calculated is returned. :param str pretty: If 'true', then the output is pretty printed. :param str resource_version: resourceVersion sets a constraint on what resource versions a request may be served from. See https://kubernetes.io/docs/reference/using-api/api-concepts/#resource-versions for details. Defaults to unset :param str resource_version_match: resourceVersionMatch determines how resourceVersion is applied to list calls. It is highly recommended that resourceVersionMatch be set for list calls where resourceVersion is set See https://kubernetes.io/docs/reference/using-api/api-concepts/#resource-versions for details. Defaults to unset :param int timeout_seconds: Timeout for the list/watch call. This limits the duration of the call, regardless of any activity or inactivity. :param bool watch: Watch for changes to the described resources and return them as a stream of add, update, and remove notifications. Specify resourceVersion. :param _preload_content: if False, the urllib3.HTTPResponse object will be returned without reading/decoding response data. Default is True. :param _request_timeout: timeout setting for this request. If one number provided, it will be total request timeout. It can also be a pair (tuple) of (connection, read) timeouts. :return: V1CronJobList If the method is called asynchronously, returns the request thread.<|endoftext|>
99c40f0165f2d2a072e9e5849c5969fd4baa1fb22300abcc4a43a99f58fd59ab
def list_cron_job_for_all_namespaces_with_http_info(self, **kwargs): 'list_cron_job_for_all_namespaces # noqa: E501\n\n list or watch objects of kind CronJob # noqa: E501\n This method makes a synchronous HTTP request by default. To make an\n asynchronous HTTP request, please pass async_req=True\n >>> thread = api.list_cron_job_for_all_namespaces_with_http_info(async_req=True)\n >>> result = thread.get()\n\n :param async_req bool: execute request asynchronously\n :param bool allow_watch_bookmarks: allowWatchBookmarks requests watch events with type "BOOKMARK". Servers that do not implement bookmarks may ignore this flag and bookmarks are sent at the server\'s discretion. Clients should not assume bookmarks are returned at any specific interval, nor may they assume the server will send any BOOKMARK event during a session. If this is not a watch, this field is ignored.\n :param str _continue: The continue option should be set when retrieving more results from the server. Since this value is server defined, clients may only use the continue value from a previous query result with identical query parameters (except for the value of continue) and the server may reject a continue value it does not recognize. If the specified continue value is no longer valid whether due to expiration (generally five to fifteen minutes) or a configuration change on the server, the server will respond with a 410 ResourceExpired error together with a continue token. If the client needs a consistent list, it must restart their list without the continue field. Otherwise, the client may send another list request with the token received with the 410 error, the server will respond with a list starting from the next key, but from the latest snapshot, which is inconsistent from the previous list results - objects that are created, modified, or deleted after the first list request will be included in the response, as long as their keys are after the "next key". This field is not supported when watch is true. Clients may start a watch from the last resourceVersion value returned by the server and not miss any modifications.\n :param str field_selector: A selector to restrict the list of returned objects by their fields. Defaults to everything.\n :param str label_selector: A selector to restrict the list of returned objects by their labels. Defaults to everything.\n :param int limit: limit is a maximum number of responses to return for a list call. If more items exist, the server will set the `continue` field on the list metadata to a value that can be used with the same initial query to retrieve the next set of results. Setting a limit may return fewer than the requested amount of items (up to zero items) in the event all requested objects are filtered out and clients should only use the presence of the continue field to determine whether more results are available. Servers may choose not to support the limit argument and will return all of the available results. If limit is specified and the continue field is empty, clients may assume that no more results are available. This field is not supported if watch is true. The server guarantees that the objects returned when using continue will be identical to issuing a single list call without a limit - that is, no objects created, modified, or deleted after the first request is issued will be included in any subsequent continued requests. This is sometimes referred to as a consistent snapshot, and ensures that a client that is using limit to receive smaller chunks of a very large result can ensure they see all possible objects. If objects are updated during a chunked list the version of the object that was present at the time the first list result was calculated is returned.\n :param str pretty: If \'true\', then the output is pretty printed.\n :param str resource_version: resourceVersion sets a constraint on what resource versions a request may be served from. See https://kubernetes.io/docs/reference/using-api/api-concepts/#resource-versions for details. Defaults to unset\n :param str resource_version_match: resourceVersionMatch determines how resourceVersion is applied to list calls. It is highly recommended that resourceVersionMatch be set for list calls where resourceVersion is set See https://kubernetes.io/docs/reference/using-api/api-concepts/#resource-versions for details. Defaults to unset\n :param int timeout_seconds: Timeout for the list/watch call. This limits the duration of the call, regardless of any activity or inactivity.\n :param bool watch: Watch for changes to the described resources and return them as a stream of add, update, and remove notifications. Specify resourceVersion.\n :param _return_http_data_only: response data without head status code\n and headers\n :param _preload_content: if False, the urllib3.HTTPResponse object will\n be returned without reading/decoding response\n data. Default is True.\n :param _request_timeout: timeout setting for this request. If one\n number provided, it will be total request\n timeout. It can also be a pair (tuple) of\n (connection, read) timeouts.\n :return: tuple(V1CronJobList, status_code(int), headers(HTTPHeaderDict))\n If the method is called asynchronously,\n returns the request thread.\n ' local_var_params = locals() all_params = ['allow_watch_bookmarks', '_continue', 'field_selector', 'label_selector', 'limit', 'pretty', 'resource_version', 'resource_version_match', 'timeout_seconds', 'watch'] all_params.extend(['async_req', '_return_http_data_only', '_preload_content', '_request_timeout']) for (key, val) in six.iteritems(local_var_params['kwargs']): if (key not in all_params): raise ApiTypeError(("Got an unexpected keyword argument '%s' to method list_cron_job_for_all_namespaces" % key)) local_var_params[key] = val del local_var_params['kwargs'] collection_formats = {} path_params = {} query_params = [] if (('allow_watch_bookmarks' in local_var_params) and (local_var_params['allow_watch_bookmarks'] is not None)): query_params.append(('allowWatchBookmarks', local_var_params['allow_watch_bookmarks'])) if (('_continue' in local_var_params) and (local_var_params['_continue'] is not None)): query_params.append(('continue', local_var_params['_continue'])) if (('field_selector' in local_var_params) and (local_var_params['field_selector'] is not None)): query_params.append(('fieldSelector', local_var_params['field_selector'])) if (('label_selector' in local_var_params) and (local_var_params['label_selector'] is not None)): query_params.append(('labelSelector', local_var_params['label_selector'])) if (('limit' in local_var_params) and (local_var_params['limit'] is not None)): query_params.append(('limit', local_var_params['limit'])) if (('pretty' in local_var_params) and (local_var_params['pretty'] is not None)): query_params.append(('pretty', local_var_params['pretty'])) if (('resource_version' in local_var_params) and (local_var_params['resource_version'] is not None)): query_params.append(('resourceVersion', local_var_params['resource_version'])) if (('resource_version_match' in local_var_params) and (local_var_params['resource_version_match'] is not None)): query_params.append(('resourceVersionMatch', local_var_params['resource_version_match'])) if (('timeout_seconds' in local_var_params) and (local_var_params['timeout_seconds'] is not None)): query_params.append(('timeoutSeconds', local_var_params['timeout_seconds'])) if (('watch' in local_var_params) and (local_var_params['watch'] is not None)): query_params.append(('watch', local_var_params['watch'])) header_params = {} form_params = [] local_var_files = {} body_params = None header_params['Accept'] = self.api_client.select_header_accept(['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf', 'application/json;stream=watch', 'application/vnd.kubernetes.protobuf;stream=watch']) auth_settings = ['BearerToken'] return self.api_client.call_api('/apis/batch/v1/cronjobs', 'GET', path_params, query_params, header_params, body=body_params, post_params=form_params, files=local_var_files, response_type='V1CronJobList', auth_settings=auth_settings, async_req=local_var_params.get('async_req'), _return_http_data_only=local_var_params.get('_return_http_data_only'), _preload_content=local_var_params.get('_preload_content', True), _request_timeout=local_var_params.get('_request_timeout'), collection_formats=collection_formats)
list_cron_job_for_all_namespaces # noqa: E501 list or watch objects of kind CronJob # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True >>> thread = api.list_cron_job_for_all_namespaces_with_http_info(async_req=True) >>> result = thread.get() :param async_req bool: execute request asynchronously :param bool allow_watch_bookmarks: allowWatchBookmarks requests watch events with type "BOOKMARK". Servers that do not implement bookmarks may ignore this flag and bookmarks are sent at the server's discretion. Clients should not assume bookmarks are returned at any specific interval, nor may they assume the server will send any BOOKMARK event during a session. If this is not a watch, this field is ignored. :param str _continue: The continue option should be set when retrieving more results from the server. Since this value is server defined, clients may only use the continue value from a previous query result with identical query parameters (except for the value of continue) and the server may reject a continue value it does not recognize. If the specified continue value is no longer valid whether due to expiration (generally five to fifteen minutes) or a configuration change on the server, the server will respond with a 410 ResourceExpired error together with a continue token. If the client needs a consistent list, it must restart their list without the continue field. Otherwise, the client may send another list request with the token received with the 410 error, the server will respond with a list starting from the next key, but from the latest snapshot, which is inconsistent from the previous list results - objects that are created, modified, or deleted after the first list request will be included in the response, as long as their keys are after the "next key". This field is not supported when watch is true. Clients may start a watch from the last resourceVersion value returned by the server and not miss any modifications. :param str field_selector: A selector to restrict the list of returned objects by their fields. Defaults to everything. :param str label_selector: A selector to restrict the list of returned objects by their labels. Defaults to everything. :param int limit: limit is a maximum number of responses to return for a list call. If more items exist, the server will set the `continue` field on the list metadata to a value that can be used with the same initial query to retrieve the next set of results. Setting a limit may return fewer than the requested amount of items (up to zero items) in the event all requested objects are filtered out and clients should only use the presence of the continue field to determine whether more results are available. Servers may choose not to support the limit argument and will return all of the available results. If limit is specified and the continue field is empty, clients may assume that no more results are available. This field is not supported if watch is true. The server guarantees that the objects returned when using continue will be identical to issuing a single list call without a limit - that is, no objects created, modified, or deleted after the first request is issued will be included in any subsequent continued requests. This is sometimes referred to as a consistent snapshot, and ensures that a client that is using limit to receive smaller chunks of a very large result can ensure they see all possible objects. If objects are updated during a chunked list the version of the object that was present at the time the first list result was calculated is returned. :param str pretty: If 'true', then the output is pretty printed. :param str resource_version: resourceVersion sets a constraint on what resource versions a request may be served from. See https://kubernetes.io/docs/reference/using-api/api-concepts/#resource-versions for details. Defaults to unset :param str resource_version_match: resourceVersionMatch determines how resourceVersion is applied to list calls. It is highly recommended that resourceVersionMatch be set for list calls where resourceVersion is set See https://kubernetes.io/docs/reference/using-api/api-concepts/#resource-versions for details. Defaults to unset :param int timeout_seconds: Timeout for the list/watch call. This limits the duration of the call, regardless of any activity or inactivity. :param bool watch: Watch for changes to the described resources and return them as a stream of add, update, and remove notifications. Specify resourceVersion. :param _return_http_data_only: response data without head status code and headers :param _preload_content: if False, the urllib3.HTTPResponse object will be returned without reading/decoding response data. Default is True. :param _request_timeout: timeout setting for this request. If one number provided, it will be total request timeout. It can also be a pair (tuple) of (connection, read) timeouts. :return: tuple(V1CronJobList, status_code(int), headers(HTTPHeaderDict)) If the method is called asynchronously, returns the request thread.
kubernetes/client/api/batch_v1_api.py
list_cron_job_for_all_namespaces_with_http_info
knkgun/python
1
python
def list_cron_job_for_all_namespaces_with_http_info(self, **kwargs): 'list_cron_job_for_all_namespaces # noqa: E501\n\n list or watch objects of kind CronJob # noqa: E501\n This method makes a synchronous HTTP request by default. To make an\n asynchronous HTTP request, please pass async_req=True\n >>> thread = api.list_cron_job_for_all_namespaces_with_http_info(async_req=True)\n >>> result = thread.get()\n\n :param async_req bool: execute request asynchronously\n :param bool allow_watch_bookmarks: allowWatchBookmarks requests watch events with type "BOOKMARK". Servers that do not implement bookmarks may ignore this flag and bookmarks are sent at the server\'s discretion. Clients should not assume bookmarks are returned at any specific interval, nor may they assume the server will send any BOOKMARK event during a session. If this is not a watch, this field is ignored.\n :param str _continue: The continue option should be set when retrieving more results from the server. Since this value is server defined, clients may only use the continue value from a previous query result with identical query parameters (except for the value of continue) and the server may reject a continue value it does not recognize. If the specified continue value is no longer valid whether due to expiration (generally five to fifteen minutes) or a configuration change on the server, the server will respond with a 410 ResourceExpired error together with a continue token. If the client needs a consistent list, it must restart their list without the continue field. Otherwise, the client may send another list request with the token received with the 410 error, the server will respond with a list starting from the next key, but from the latest snapshot, which is inconsistent from the previous list results - objects that are created, modified, or deleted after the first list request will be included in the response, as long as their keys are after the "next key". This field is not supported when watch is true. Clients may start a watch from the last resourceVersion value returned by the server and not miss any modifications.\n :param str field_selector: A selector to restrict the list of returned objects by their fields. Defaults to everything.\n :param str label_selector: A selector to restrict the list of returned objects by their labels. Defaults to everything.\n :param int limit: limit is a maximum number of responses to return for a list call. If more items exist, the server will set the `continue` field on the list metadata to a value that can be used with the same initial query to retrieve the next set of results. Setting a limit may return fewer than the requested amount of items (up to zero items) in the event all requested objects are filtered out and clients should only use the presence of the continue field to determine whether more results are available. Servers may choose not to support the limit argument and will return all of the available results. If limit is specified and the continue field is empty, clients may assume that no more results are available. This field is not supported if watch is true. The server guarantees that the objects returned when using continue will be identical to issuing a single list call without a limit - that is, no objects created, modified, or deleted after the first request is issued will be included in any subsequent continued requests. This is sometimes referred to as a consistent snapshot, and ensures that a client that is using limit to receive smaller chunks of a very large result can ensure they see all possible objects. If objects are updated during a chunked list the version of the object that was present at the time the first list result was calculated is returned.\n :param str pretty: If \'true\', then the output is pretty printed.\n :param str resource_version: resourceVersion sets a constraint on what resource versions a request may be served from. See https://kubernetes.io/docs/reference/using-api/api-concepts/#resource-versions for details. Defaults to unset\n :param str resource_version_match: resourceVersionMatch determines how resourceVersion is applied to list calls. It is highly recommended that resourceVersionMatch be set for list calls where resourceVersion is set See https://kubernetes.io/docs/reference/using-api/api-concepts/#resource-versions for details. Defaults to unset\n :param int timeout_seconds: Timeout for the list/watch call. This limits the duration of the call, regardless of any activity or inactivity.\n :param bool watch: Watch for changes to the described resources and return them as a stream of add, update, and remove notifications. Specify resourceVersion.\n :param _return_http_data_only: response data without head status code\n and headers\n :param _preload_content: if False, the urllib3.HTTPResponse object will\n be returned without reading/decoding response\n data. Default is True.\n :param _request_timeout: timeout setting for this request. If one\n number provided, it will be total request\n timeout. It can also be a pair (tuple) of\n (connection, read) timeouts.\n :return: tuple(V1CronJobList, status_code(int), headers(HTTPHeaderDict))\n If the method is called asynchronously,\n returns the request thread.\n ' local_var_params = locals() all_params = ['allow_watch_bookmarks', '_continue', 'field_selector', 'label_selector', 'limit', 'pretty', 'resource_version', 'resource_version_match', 'timeout_seconds', 'watch'] all_params.extend(['async_req', '_return_http_data_only', '_preload_content', '_request_timeout']) for (key, val) in six.iteritems(local_var_params['kwargs']): if (key not in all_params): raise ApiTypeError(("Got an unexpected keyword argument '%s' to method list_cron_job_for_all_namespaces" % key)) local_var_params[key] = val del local_var_params['kwargs'] collection_formats = {} path_params = {} query_params = [] if (('allow_watch_bookmarks' in local_var_params) and (local_var_params['allow_watch_bookmarks'] is not None)): query_params.append(('allowWatchBookmarks', local_var_params['allow_watch_bookmarks'])) if (('_continue' in local_var_params) and (local_var_params['_continue'] is not None)): query_params.append(('continue', local_var_params['_continue'])) if (('field_selector' in local_var_params) and (local_var_params['field_selector'] is not None)): query_params.append(('fieldSelector', local_var_params['field_selector'])) if (('label_selector' in local_var_params) and (local_var_params['label_selector'] is not None)): query_params.append(('labelSelector', local_var_params['label_selector'])) if (('limit' in local_var_params) and (local_var_params['limit'] is not None)): query_params.append(('limit', local_var_params['limit'])) if (('pretty' in local_var_params) and (local_var_params['pretty'] is not None)): query_params.append(('pretty', local_var_params['pretty'])) if (('resource_version' in local_var_params) and (local_var_params['resource_version'] is not None)): query_params.append(('resourceVersion', local_var_params['resource_version'])) if (('resource_version_match' in local_var_params) and (local_var_params['resource_version_match'] is not None)): query_params.append(('resourceVersionMatch', local_var_params['resource_version_match'])) if (('timeout_seconds' in local_var_params) and (local_var_params['timeout_seconds'] is not None)): query_params.append(('timeoutSeconds', local_var_params['timeout_seconds'])) if (('watch' in local_var_params) and (local_var_params['watch'] is not None)): query_params.append(('watch', local_var_params['watch'])) header_params = {} form_params = [] local_var_files = {} body_params = None header_params['Accept'] = self.api_client.select_header_accept(['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf', 'application/json;stream=watch', 'application/vnd.kubernetes.protobuf;stream=watch']) auth_settings = ['BearerToken'] return self.api_client.call_api('/apis/batch/v1/cronjobs', 'GET', path_params, query_params, header_params, body=body_params, post_params=form_params, files=local_var_files, response_type='V1CronJobList', auth_settings=auth_settings, async_req=local_var_params.get('async_req'), _return_http_data_only=local_var_params.get('_return_http_data_only'), _preload_content=local_var_params.get('_preload_content', True), _request_timeout=local_var_params.get('_request_timeout'), collection_formats=collection_formats)
def list_cron_job_for_all_namespaces_with_http_info(self, **kwargs): 'list_cron_job_for_all_namespaces # noqa: E501\n\n list or watch objects of kind CronJob # noqa: E501\n This method makes a synchronous HTTP request by default. To make an\n asynchronous HTTP request, please pass async_req=True\n >>> thread = api.list_cron_job_for_all_namespaces_with_http_info(async_req=True)\n >>> result = thread.get()\n\n :param async_req bool: execute request asynchronously\n :param bool allow_watch_bookmarks: allowWatchBookmarks requests watch events with type "BOOKMARK". Servers that do not implement bookmarks may ignore this flag and bookmarks are sent at the server\'s discretion. Clients should not assume bookmarks are returned at any specific interval, nor may they assume the server will send any BOOKMARK event during a session. If this is not a watch, this field is ignored.\n :param str _continue: The continue option should be set when retrieving more results from the server. Since this value is server defined, clients may only use the continue value from a previous query result with identical query parameters (except for the value of continue) and the server may reject a continue value it does not recognize. If the specified continue value is no longer valid whether due to expiration (generally five to fifteen minutes) or a configuration change on the server, the server will respond with a 410 ResourceExpired error together with a continue token. If the client needs a consistent list, it must restart their list without the continue field. Otherwise, the client may send another list request with the token received with the 410 error, the server will respond with a list starting from the next key, but from the latest snapshot, which is inconsistent from the previous list results - objects that are created, modified, or deleted after the first list request will be included in the response, as long as their keys are after the "next key". This field is not supported when watch is true. Clients may start a watch from the last resourceVersion value returned by the server and not miss any modifications.\n :param str field_selector: A selector to restrict the list of returned objects by their fields. Defaults to everything.\n :param str label_selector: A selector to restrict the list of returned objects by their labels. Defaults to everything.\n :param int limit: limit is a maximum number of responses to return for a list call. If more items exist, the server will set the `continue` field on the list metadata to a value that can be used with the same initial query to retrieve the next set of results. Setting a limit may return fewer than the requested amount of items (up to zero items) in the event all requested objects are filtered out and clients should only use the presence of the continue field to determine whether more results are available. Servers may choose not to support the limit argument and will return all of the available results. If limit is specified and the continue field is empty, clients may assume that no more results are available. This field is not supported if watch is true. The server guarantees that the objects returned when using continue will be identical to issuing a single list call without a limit - that is, no objects created, modified, or deleted after the first request is issued will be included in any subsequent continued requests. This is sometimes referred to as a consistent snapshot, and ensures that a client that is using limit to receive smaller chunks of a very large result can ensure they see all possible objects. If objects are updated during a chunked list the version of the object that was present at the time the first list result was calculated is returned.\n :param str pretty: If \'true\', then the output is pretty printed.\n :param str resource_version: resourceVersion sets a constraint on what resource versions a request may be served from. See https://kubernetes.io/docs/reference/using-api/api-concepts/#resource-versions for details. Defaults to unset\n :param str resource_version_match: resourceVersionMatch determines how resourceVersion is applied to list calls. It is highly recommended that resourceVersionMatch be set for list calls where resourceVersion is set See https://kubernetes.io/docs/reference/using-api/api-concepts/#resource-versions for details. Defaults to unset\n :param int timeout_seconds: Timeout for the list/watch call. This limits the duration of the call, regardless of any activity or inactivity.\n :param bool watch: Watch for changes to the described resources and return them as a stream of add, update, and remove notifications. Specify resourceVersion.\n :param _return_http_data_only: response data without head status code\n and headers\n :param _preload_content: if False, the urllib3.HTTPResponse object will\n be returned without reading/decoding response\n data. Default is True.\n :param _request_timeout: timeout setting for this request. If one\n number provided, it will be total request\n timeout. It can also be a pair (tuple) of\n (connection, read) timeouts.\n :return: tuple(V1CronJobList, status_code(int), headers(HTTPHeaderDict))\n If the method is called asynchronously,\n returns the request thread.\n ' local_var_params = locals() all_params = ['allow_watch_bookmarks', '_continue', 'field_selector', 'label_selector', 'limit', 'pretty', 'resource_version', 'resource_version_match', 'timeout_seconds', 'watch'] all_params.extend(['async_req', '_return_http_data_only', '_preload_content', '_request_timeout']) for (key, val) in six.iteritems(local_var_params['kwargs']): if (key not in all_params): raise ApiTypeError(("Got an unexpected keyword argument '%s' to method list_cron_job_for_all_namespaces" % key)) local_var_params[key] = val del local_var_params['kwargs'] collection_formats = {} path_params = {} query_params = [] if (('allow_watch_bookmarks' in local_var_params) and (local_var_params['allow_watch_bookmarks'] is not None)): query_params.append(('allowWatchBookmarks', local_var_params['allow_watch_bookmarks'])) if (('_continue' in local_var_params) and (local_var_params['_continue'] is not None)): query_params.append(('continue', local_var_params['_continue'])) if (('field_selector' in local_var_params) and (local_var_params['field_selector'] is not None)): query_params.append(('fieldSelector', local_var_params['field_selector'])) if (('label_selector' in local_var_params) and (local_var_params['label_selector'] is not None)): query_params.append(('labelSelector', local_var_params['label_selector'])) if (('limit' in local_var_params) and (local_var_params['limit'] is not None)): query_params.append(('limit', local_var_params['limit'])) if (('pretty' in local_var_params) and (local_var_params['pretty'] is not None)): query_params.append(('pretty', local_var_params['pretty'])) if (('resource_version' in local_var_params) and (local_var_params['resource_version'] is not None)): query_params.append(('resourceVersion', local_var_params['resource_version'])) if (('resource_version_match' in local_var_params) and (local_var_params['resource_version_match'] is not None)): query_params.append(('resourceVersionMatch', local_var_params['resource_version_match'])) if (('timeout_seconds' in local_var_params) and (local_var_params['timeout_seconds'] is not None)): query_params.append(('timeoutSeconds', local_var_params['timeout_seconds'])) if (('watch' in local_var_params) and (local_var_params['watch'] is not None)): query_params.append(('watch', local_var_params['watch'])) header_params = {} form_params = [] local_var_files = {} body_params = None header_params['Accept'] = self.api_client.select_header_accept(['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf', 'application/json;stream=watch', 'application/vnd.kubernetes.protobuf;stream=watch']) auth_settings = ['BearerToken'] return self.api_client.call_api('/apis/batch/v1/cronjobs', 'GET', path_params, query_params, header_params, body=body_params, post_params=form_params, files=local_var_files, response_type='V1CronJobList', auth_settings=auth_settings, async_req=local_var_params.get('async_req'), _return_http_data_only=local_var_params.get('_return_http_data_only'), _preload_content=local_var_params.get('_preload_content', True), _request_timeout=local_var_params.get('_request_timeout'), collection_formats=collection_formats)<|docstring|>list_cron_job_for_all_namespaces # noqa: E501 list or watch objects of kind CronJob # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True >>> thread = api.list_cron_job_for_all_namespaces_with_http_info(async_req=True) >>> result = thread.get() :param async_req bool: execute request asynchronously :param bool allow_watch_bookmarks: allowWatchBookmarks requests watch events with type "BOOKMARK". Servers that do not implement bookmarks may ignore this flag and bookmarks are sent at the server's discretion. Clients should not assume bookmarks are returned at any specific interval, nor may they assume the server will send any BOOKMARK event during a session. If this is not a watch, this field is ignored. :param str _continue: The continue option should be set when retrieving more results from the server. Since this value is server defined, clients may only use the continue value from a previous query result with identical query parameters (except for the value of continue) and the server may reject a continue value it does not recognize. If the specified continue value is no longer valid whether due to expiration (generally five to fifteen minutes) or a configuration change on the server, the server will respond with a 410 ResourceExpired error together with a continue token. If the client needs a consistent list, it must restart their list without the continue field. Otherwise, the client may send another list request with the token received with the 410 error, the server will respond with a list starting from the next key, but from the latest snapshot, which is inconsistent from the previous list results - objects that are created, modified, or deleted after the first list request will be included in the response, as long as their keys are after the "next key". This field is not supported when watch is true. Clients may start a watch from the last resourceVersion value returned by the server and not miss any modifications. :param str field_selector: A selector to restrict the list of returned objects by their fields. Defaults to everything. :param str label_selector: A selector to restrict the list of returned objects by their labels. Defaults to everything. :param int limit: limit is a maximum number of responses to return for a list call. If more items exist, the server will set the `continue` field on the list metadata to a value that can be used with the same initial query to retrieve the next set of results. Setting a limit may return fewer than the requested amount of items (up to zero items) in the event all requested objects are filtered out and clients should only use the presence of the continue field to determine whether more results are available. Servers may choose not to support the limit argument and will return all of the available results. If limit is specified and the continue field is empty, clients may assume that no more results are available. This field is not supported if watch is true. The server guarantees that the objects returned when using continue will be identical to issuing a single list call without a limit - that is, no objects created, modified, or deleted after the first request is issued will be included in any subsequent continued requests. This is sometimes referred to as a consistent snapshot, and ensures that a client that is using limit to receive smaller chunks of a very large result can ensure they see all possible objects. If objects are updated during a chunked list the version of the object that was present at the time the first list result was calculated is returned. :param str pretty: If 'true', then the output is pretty printed. :param str resource_version: resourceVersion sets a constraint on what resource versions a request may be served from. See https://kubernetes.io/docs/reference/using-api/api-concepts/#resource-versions for details. Defaults to unset :param str resource_version_match: resourceVersionMatch determines how resourceVersion is applied to list calls. It is highly recommended that resourceVersionMatch be set for list calls where resourceVersion is set See https://kubernetes.io/docs/reference/using-api/api-concepts/#resource-versions for details. Defaults to unset :param int timeout_seconds: Timeout for the list/watch call. This limits the duration of the call, regardless of any activity or inactivity. :param bool watch: Watch for changes to the described resources and return them as a stream of add, update, and remove notifications. Specify resourceVersion. :param _return_http_data_only: response data without head status code and headers :param _preload_content: if False, the urllib3.HTTPResponse object will be returned without reading/decoding response data. Default is True. :param _request_timeout: timeout setting for this request. If one number provided, it will be total request timeout. It can also be a pair (tuple) of (connection, read) timeouts. :return: tuple(V1CronJobList, status_code(int), headers(HTTPHeaderDict)) If the method is called asynchronously, returns the request thread.<|endoftext|>
4bf8a13732e7461af9525de49b403e5fe6e8c2573e9c3c5e242f82b90cf77e7c
def list_job_for_all_namespaces(self, **kwargs): 'list_job_for_all_namespaces # noqa: E501\n\n list or watch objects of kind Job # noqa: E501\n This method makes a synchronous HTTP request by default. To make an\n asynchronous HTTP request, please pass async_req=True\n >>> thread = api.list_job_for_all_namespaces(async_req=True)\n >>> result = thread.get()\n\n :param async_req bool: execute request asynchronously\n :param bool allow_watch_bookmarks: allowWatchBookmarks requests watch events with type "BOOKMARK". Servers that do not implement bookmarks may ignore this flag and bookmarks are sent at the server\'s discretion. Clients should not assume bookmarks are returned at any specific interval, nor may they assume the server will send any BOOKMARK event during a session. If this is not a watch, this field is ignored.\n :param str _continue: The continue option should be set when retrieving more results from the server. Since this value is server defined, clients may only use the continue value from a previous query result with identical query parameters (except for the value of continue) and the server may reject a continue value it does not recognize. If the specified continue value is no longer valid whether due to expiration (generally five to fifteen minutes) or a configuration change on the server, the server will respond with a 410 ResourceExpired error together with a continue token. If the client needs a consistent list, it must restart their list without the continue field. Otherwise, the client may send another list request with the token received with the 410 error, the server will respond with a list starting from the next key, but from the latest snapshot, which is inconsistent from the previous list results - objects that are created, modified, or deleted after the first list request will be included in the response, as long as their keys are after the "next key". This field is not supported when watch is true. Clients may start a watch from the last resourceVersion value returned by the server and not miss any modifications.\n :param str field_selector: A selector to restrict the list of returned objects by their fields. Defaults to everything.\n :param str label_selector: A selector to restrict the list of returned objects by their labels. Defaults to everything.\n :param int limit: limit is a maximum number of responses to return for a list call. If more items exist, the server will set the `continue` field on the list metadata to a value that can be used with the same initial query to retrieve the next set of results. Setting a limit may return fewer than the requested amount of items (up to zero items) in the event all requested objects are filtered out and clients should only use the presence of the continue field to determine whether more results are available. Servers may choose not to support the limit argument and will return all of the available results. If limit is specified and the continue field is empty, clients may assume that no more results are available. This field is not supported if watch is true. The server guarantees that the objects returned when using continue will be identical to issuing a single list call without a limit - that is, no objects created, modified, or deleted after the first request is issued will be included in any subsequent continued requests. This is sometimes referred to as a consistent snapshot, and ensures that a client that is using limit to receive smaller chunks of a very large result can ensure they see all possible objects. If objects are updated during a chunked list the version of the object that was present at the time the first list result was calculated is returned.\n :param str pretty: If \'true\', then the output is pretty printed.\n :param str resource_version: resourceVersion sets a constraint on what resource versions a request may be served from. See https://kubernetes.io/docs/reference/using-api/api-concepts/#resource-versions for details. Defaults to unset\n :param str resource_version_match: resourceVersionMatch determines how resourceVersion is applied to list calls. It is highly recommended that resourceVersionMatch be set for list calls where resourceVersion is set See https://kubernetes.io/docs/reference/using-api/api-concepts/#resource-versions for details. Defaults to unset\n :param int timeout_seconds: Timeout for the list/watch call. This limits the duration of the call, regardless of any activity or inactivity.\n :param bool watch: Watch for changes to the described resources and return them as a stream of add, update, and remove notifications. Specify resourceVersion.\n :param _preload_content: if False, the urllib3.HTTPResponse object will\n be returned without reading/decoding response\n data. Default is True.\n :param _request_timeout: timeout setting for this request. If one\n number provided, it will be total request\n timeout. It can also be a pair (tuple) of\n (connection, read) timeouts.\n :return: V1JobList\n If the method is called asynchronously,\n returns the request thread.\n ' kwargs['_return_http_data_only'] = True return self.list_job_for_all_namespaces_with_http_info(**kwargs)
list_job_for_all_namespaces # noqa: E501 list or watch objects of kind Job # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True >>> thread = api.list_job_for_all_namespaces(async_req=True) >>> result = thread.get() :param async_req bool: execute request asynchronously :param bool allow_watch_bookmarks: allowWatchBookmarks requests watch events with type "BOOKMARK". Servers that do not implement bookmarks may ignore this flag and bookmarks are sent at the server's discretion. Clients should not assume bookmarks are returned at any specific interval, nor may they assume the server will send any BOOKMARK event during a session. If this is not a watch, this field is ignored. :param str _continue: The continue option should be set when retrieving more results from the server. Since this value is server defined, clients may only use the continue value from a previous query result with identical query parameters (except for the value of continue) and the server may reject a continue value it does not recognize. If the specified continue value is no longer valid whether due to expiration (generally five to fifteen minutes) or a configuration change on the server, the server will respond with a 410 ResourceExpired error together with a continue token. If the client needs a consistent list, it must restart their list without the continue field. Otherwise, the client may send another list request with the token received with the 410 error, the server will respond with a list starting from the next key, but from the latest snapshot, which is inconsistent from the previous list results - objects that are created, modified, or deleted after the first list request will be included in the response, as long as their keys are after the "next key". This field is not supported when watch is true. Clients may start a watch from the last resourceVersion value returned by the server and not miss any modifications. :param str field_selector: A selector to restrict the list of returned objects by their fields. Defaults to everything. :param str label_selector: A selector to restrict the list of returned objects by their labels. Defaults to everything. :param int limit: limit is a maximum number of responses to return for a list call. If more items exist, the server will set the `continue` field on the list metadata to a value that can be used with the same initial query to retrieve the next set of results. Setting a limit may return fewer than the requested amount of items (up to zero items) in the event all requested objects are filtered out and clients should only use the presence of the continue field to determine whether more results are available. Servers may choose not to support the limit argument and will return all of the available results. If limit is specified and the continue field is empty, clients may assume that no more results are available. This field is not supported if watch is true. The server guarantees that the objects returned when using continue will be identical to issuing a single list call without a limit - that is, no objects created, modified, or deleted after the first request is issued will be included in any subsequent continued requests. This is sometimes referred to as a consistent snapshot, and ensures that a client that is using limit to receive smaller chunks of a very large result can ensure they see all possible objects. If objects are updated during a chunked list the version of the object that was present at the time the first list result was calculated is returned. :param str pretty: If 'true', then the output is pretty printed. :param str resource_version: resourceVersion sets a constraint on what resource versions a request may be served from. See https://kubernetes.io/docs/reference/using-api/api-concepts/#resource-versions for details. Defaults to unset :param str resource_version_match: resourceVersionMatch determines how resourceVersion is applied to list calls. It is highly recommended that resourceVersionMatch be set for list calls where resourceVersion is set See https://kubernetes.io/docs/reference/using-api/api-concepts/#resource-versions for details. Defaults to unset :param int timeout_seconds: Timeout for the list/watch call. This limits the duration of the call, regardless of any activity or inactivity. :param bool watch: Watch for changes to the described resources and return them as a stream of add, update, and remove notifications. Specify resourceVersion. :param _preload_content: if False, the urllib3.HTTPResponse object will be returned without reading/decoding response data. Default is True. :param _request_timeout: timeout setting for this request. If one number provided, it will be total request timeout. It can also be a pair (tuple) of (connection, read) timeouts. :return: V1JobList If the method is called asynchronously, returns the request thread.
kubernetes/client/api/batch_v1_api.py
list_job_for_all_namespaces
knkgun/python
1
python
def list_job_for_all_namespaces(self, **kwargs): 'list_job_for_all_namespaces # noqa: E501\n\n list or watch objects of kind Job # noqa: E501\n This method makes a synchronous HTTP request by default. To make an\n asynchronous HTTP request, please pass async_req=True\n >>> thread = api.list_job_for_all_namespaces(async_req=True)\n >>> result = thread.get()\n\n :param async_req bool: execute request asynchronously\n :param bool allow_watch_bookmarks: allowWatchBookmarks requests watch events with type "BOOKMARK". Servers that do not implement bookmarks may ignore this flag and bookmarks are sent at the server\'s discretion. Clients should not assume bookmarks are returned at any specific interval, nor may they assume the server will send any BOOKMARK event during a session. If this is not a watch, this field is ignored.\n :param str _continue: The continue option should be set when retrieving more results from the server. Since this value is server defined, clients may only use the continue value from a previous query result with identical query parameters (except for the value of continue) and the server may reject a continue value it does not recognize. If the specified continue value is no longer valid whether due to expiration (generally five to fifteen minutes) or a configuration change on the server, the server will respond with a 410 ResourceExpired error together with a continue token. If the client needs a consistent list, it must restart their list without the continue field. Otherwise, the client may send another list request with the token received with the 410 error, the server will respond with a list starting from the next key, but from the latest snapshot, which is inconsistent from the previous list results - objects that are created, modified, or deleted after the first list request will be included in the response, as long as their keys are after the "next key". This field is not supported when watch is true. Clients may start a watch from the last resourceVersion value returned by the server and not miss any modifications.\n :param str field_selector: A selector to restrict the list of returned objects by their fields. Defaults to everything.\n :param str label_selector: A selector to restrict the list of returned objects by their labels. Defaults to everything.\n :param int limit: limit is a maximum number of responses to return for a list call. If more items exist, the server will set the `continue` field on the list metadata to a value that can be used with the same initial query to retrieve the next set of results. Setting a limit may return fewer than the requested amount of items (up to zero items) in the event all requested objects are filtered out and clients should only use the presence of the continue field to determine whether more results are available. Servers may choose not to support the limit argument and will return all of the available results. If limit is specified and the continue field is empty, clients may assume that no more results are available. This field is not supported if watch is true. The server guarantees that the objects returned when using continue will be identical to issuing a single list call without a limit - that is, no objects created, modified, or deleted after the first request is issued will be included in any subsequent continued requests. This is sometimes referred to as a consistent snapshot, and ensures that a client that is using limit to receive smaller chunks of a very large result can ensure they see all possible objects. If objects are updated during a chunked list the version of the object that was present at the time the first list result was calculated is returned.\n :param str pretty: If \'true\', then the output is pretty printed.\n :param str resource_version: resourceVersion sets a constraint on what resource versions a request may be served from. See https://kubernetes.io/docs/reference/using-api/api-concepts/#resource-versions for details. Defaults to unset\n :param str resource_version_match: resourceVersionMatch determines how resourceVersion is applied to list calls. It is highly recommended that resourceVersionMatch be set for list calls where resourceVersion is set See https://kubernetes.io/docs/reference/using-api/api-concepts/#resource-versions for details. Defaults to unset\n :param int timeout_seconds: Timeout for the list/watch call. This limits the duration of the call, regardless of any activity or inactivity.\n :param bool watch: Watch for changes to the described resources and return them as a stream of add, update, and remove notifications. Specify resourceVersion.\n :param _preload_content: if False, the urllib3.HTTPResponse object will\n be returned without reading/decoding response\n data. Default is True.\n :param _request_timeout: timeout setting for this request. If one\n number provided, it will be total request\n timeout. It can also be a pair (tuple) of\n (connection, read) timeouts.\n :return: V1JobList\n If the method is called asynchronously,\n returns the request thread.\n ' kwargs['_return_http_data_only'] = True return self.list_job_for_all_namespaces_with_http_info(**kwargs)
def list_job_for_all_namespaces(self, **kwargs): 'list_job_for_all_namespaces # noqa: E501\n\n list or watch objects of kind Job # noqa: E501\n This method makes a synchronous HTTP request by default. To make an\n asynchronous HTTP request, please pass async_req=True\n >>> thread = api.list_job_for_all_namespaces(async_req=True)\n >>> result = thread.get()\n\n :param async_req bool: execute request asynchronously\n :param bool allow_watch_bookmarks: allowWatchBookmarks requests watch events with type "BOOKMARK". Servers that do not implement bookmarks may ignore this flag and bookmarks are sent at the server\'s discretion. Clients should not assume bookmarks are returned at any specific interval, nor may they assume the server will send any BOOKMARK event during a session. If this is not a watch, this field is ignored.\n :param str _continue: The continue option should be set when retrieving more results from the server. Since this value is server defined, clients may only use the continue value from a previous query result with identical query parameters (except for the value of continue) and the server may reject a continue value it does not recognize. If the specified continue value is no longer valid whether due to expiration (generally five to fifteen minutes) or a configuration change on the server, the server will respond with a 410 ResourceExpired error together with a continue token. If the client needs a consistent list, it must restart their list without the continue field. Otherwise, the client may send another list request with the token received with the 410 error, the server will respond with a list starting from the next key, but from the latest snapshot, which is inconsistent from the previous list results - objects that are created, modified, or deleted after the first list request will be included in the response, as long as their keys are after the "next key". This field is not supported when watch is true. Clients may start a watch from the last resourceVersion value returned by the server and not miss any modifications.\n :param str field_selector: A selector to restrict the list of returned objects by their fields. Defaults to everything.\n :param str label_selector: A selector to restrict the list of returned objects by their labels. Defaults to everything.\n :param int limit: limit is a maximum number of responses to return for a list call. If more items exist, the server will set the `continue` field on the list metadata to a value that can be used with the same initial query to retrieve the next set of results. Setting a limit may return fewer than the requested amount of items (up to zero items) in the event all requested objects are filtered out and clients should only use the presence of the continue field to determine whether more results are available. Servers may choose not to support the limit argument and will return all of the available results. If limit is specified and the continue field is empty, clients may assume that no more results are available. This field is not supported if watch is true. The server guarantees that the objects returned when using continue will be identical to issuing a single list call without a limit - that is, no objects created, modified, or deleted after the first request is issued will be included in any subsequent continued requests. This is sometimes referred to as a consistent snapshot, and ensures that a client that is using limit to receive smaller chunks of a very large result can ensure they see all possible objects. If objects are updated during a chunked list the version of the object that was present at the time the first list result was calculated is returned.\n :param str pretty: If \'true\', then the output is pretty printed.\n :param str resource_version: resourceVersion sets a constraint on what resource versions a request may be served from. See https://kubernetes.io/docs/reference/using-api/api-concepts/#resource-versions for details. Defaults to unset\n :param str resource_version_match: resourceVersionMatch determines how resourceVersion is applied to list calls. It is highly recommended that resourceVersionMatch be set for list calls where resourceVersion is set See https://kubernetes.io/docs/reference/using-api/api-concepts/#resource-versions for details. Defaults to unset\n :param int timeout_seconds: Timeout for the list/watch call. This limits the duration of the call, regardless of any activity or inactivity.\n :param bool watch: Watch for changes to the described resources and return them as a stream of add, update, and remove notifications. Specify resourceVersion.\n :param _preload_content: if False, the urllib3.HTTPResponse object will\n be returned without reading/decoding response\n data. Default is True.\n :param _request_timeout: timeout setting for this request. If one\n number provided, it will be total request\n timeout. It can also be a pair (tuple) of\n (connection, read) timeouts.\n :return: V1JobList\n If the method is called asynchronously,\n returns the request thread.\n ' kwargs['_return_http_data_only'] = True return self.list_job_for_all_namespaces_with_http_info(**kwargs)<|docstring|>list_job_for_all_namespaces # noqa: E501 list or watch objects of kind Job # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True >>> thread = api.list_job_for_all_namespaces(async_req=True) >>> result = thread.get() :param async_req bool: execute request asynchronously :param bool allow_watch_bookmarks: allowWatchBookmarks requests watch events with type "BOOKMARK". Servers that do not implement bookmarks may ignore this flag and bookmarks are sent at the server's discretion. Clients should not assume bookmarks are returned at any specific interval, nor may they assume the server will send any BOOKMARK event during a session. If this is not a watch, this field is ignored. :param str _continue: The continue option should be set when retrieving more results from the server. Since this value is server defined, clients may only use the continue value from a previous query result with identical query parameters (except for the value of continue) and the server may reject a continue value it does not recognize. If the specified continue value is no longer valid whether due to expiration (generally five to fifteen minutes) or a configuration change on the server, the server will respond with a 410 ResourceExpired error together with a continue token. If the client needs a consistent list, it must restart their list without the continue field. Otherwise, the client may send another list request with the token received with the 410 error, the server will respond with a list starting from the next key, but from the latest snapshot, which is inconsistent from the previous list results - objects that are created, modified, or deleted after the first list request will be included in the response, as long as their keys are after the "next key". This field is not supported when watch is true. Clients may start a watch from the last resourceVersion value returned by the server and not miss any modifications. :param str field_selector: A selector to restrict the list of returned objects by their fields. Defaults to everything. :param str label_selector: A selector to restrict the list of returned objects by their labels. Defaults to everything. :param int limit: limit is a maximum number of responses to return for a list call. If more items exist, the server will set the `continue` field on the list metadata to a value that can be used with the same initial query to retrieve the next set of results. Setting a limit may return fewer than the requested amount of items (up to zero items) in the event all requested objects are filtered out and clients should only use the presence of the continue field to determine whether more results are available. Servers may choose not to support the limit argument and will return all of the available results. If limit is specified and the continue field is empty, clients may assume that no more results are available. This field is not supported if watch is true. The server guarantees that the objects returned when using continue will be identical to issuing a single list call without a limit - that is, no objects created, modified, or deleted after the first request is issued will be included in any subsequent continued requests. This is sometimes referred to as a consistent snapshot, and ensures that a client that is using limit to receive smaller chunks of a very large result can ensure they see all possible objects. If objects are updated during a chunked list the version of the object that was present at the time the first list result was calculated is returned. :param str pretty: If 'true', then the output is pretty printed. :param str resource_version: resourceVersion sets a constraint on what resource versions a request may be served from. See https://kubernetes.io/docs/reference/using-api/api-concepts/#resource-versions for details. Defaults to unset :param str resource_version_match: resourceVersionMatch determines how resourceVersion is applied to list calls. It is highly recommended that resourceVersionMatch be set for list calls where resourceVersion is set See https://kubernetes.io/docs/reference/using-api/api-concepts/#resource-versions for details. Defaults to unset :param int timeout_seconds: Timeout for the list/watch call. This limits the duration of the call, regardless of any activity or inactivity. :param bool watch: Watch for changes to the described resources and return them as a stream of add, update, and remove notifications. Specify resourceVersion. :param _preload_content: if False, the urllib3.HTTPResponse object will be returned without reading/decoding response data. Default is True. :param _request_timeout: timeout setting for this request. If one number provided, it will be total request timeout. It can also be a pair (tuple) of (connection, read) timeouts. :return: V1JobList If the method is called asynchronously, returns the request thread.<|endoftext|>
1c2e3990e62fee616f27b0dcb36442b27a13fe81d309682ae5b6778dd620dcf3
def list_job_for_all_namespaces_with_http_info(self, **kwargs): 'list_job_for_all_namespaces # noqa: E501\n\n list or watch objects of kind Job # noqa: E501\n This method makes a synchronous HTTP request by default. To make an\n asynchronous HTTP request, please pass async_req=True\n >>> thread = api.list_job_for_all_namespaces_with_http_info(async_req=True)\n >>> result = thread.get()\n\n :param async_req bool: execute request asynchronously\n :param bool allow_watch_bookmarks: allowWatchBookmarks requests watch events with type "BOOKMARK". Servers that do not implement bookmarks may ignore this flag and bookmarks are sent at the server\'s discretion. Clients should not assume bookmarks are returned at any specific interval, nor may they assume the server will send any BOOKMARK event during a session. If this is not a watch, this field is ignored.\n :param str _continue: The continue option should be set when retrieving more results from the server. Since this value is server defined, clients may only use the continue value from a previous query result with identical query parameters (except for the value of continue) and the server may reject a continue value it does not recognize. If the specified continue value is no longer valid whether due to expiration (generally five to fifteen minutes) or a configuration change on the server, the server will respond with a 410 ResourceExpired error together with a continue token. If the client needs a consistent list, it must restart their list without the continue field. Otherwise, the client may send another list request with the token received with the 410 error, the server will respond with a list starting from the next key, but from the latest snapshot, which is inconsistent from the previous list results - objects that are created, modified, or deleted after the first list request will be included in the response, as long as their keys are after the "next key". This field is not supported when watch is true. Clients may start a watch from the last resourceVersion value returned by the server and not miss any modifications.\n :param str field_selector: A selector to restrict the list of returned objects by their fields. Defaults to everything.\n :param str label_selector: A selector to restrict the list of returned objects by their labels. Defaults to everything.\n :param int limit: limit is a maximum number of responses to return for a list call. If more items exist, the server will set the `continue` field on the list metadata to a value that can be used with the same initial query to retrieve the next set of results. Setting a limit may return fewer than the requested amount of items (up to zero items) in the event all requested objects are filtered out and clients should only use the presence of the continue field to determine whether more results are available. Servers may choose not to support the limit argument and will return all of the available results. If limit is specified and the continue field is empty, clients may assume that no more results are available. This field is not supported if watch is true. The server guarantees that the objects returned when using continue will be identical to issuing a single list call without a limit - that is, no objects created, modified, or deleted after the first request is issued will be included in any subsequent continued requests. This is sometimes referred to as a consistent snapshot, and ensures that a client that is using limit to receive smaller chunks of a very large result can ensure they see all possible objects. If objects are updated during a chunked list the version of the object that was present at the time the first list result was calculated is returned.\n :param str pretty: If \'true\', then the output is pretty printed.\n :param str resource_version: resourceVersion sets a constraint on what resource versions a request may be served from. See https://kubernetes.io/docs/reference/using-api/api-concepts/#resource-versions for details. Defaults to unset\n :param str resource_version_match: resourceVersionMatch determines how resourceVersion is applied to list calls. It is highly recommended that resourceVersionMatch be set for list calls where resourceVersion is set See https://kubernetes.io/docs/reference/using-api/api-concepts/#resource-versions for details. Defaults to unset\n :param int timeout_seconds: Timeout for the list/watch call. This limits the duration of the call, regardless of any activity or inactivity.\n :param bool watch: Watch for changes to the described resources and return them as a stream of add, update, and remove notifications. Specify resourceVersion.\n :param _return_http_data_only: response data without head status code\n and headers\n :param _preload_content: if False, the urllib3.HTTPResponse object will\n be returned without reading/decoding response\n data. Default is True.\n :param _request_timeout: timeout setting for this request. If one\n number provided, it will be total request\n timeout. It can also be a pair (tuple) of\n (connection, read) timeouts.\n :return: tuple(V1JobList, status_code(int), headers(HTTPHeaderDict))\n If the method is called asynchronously,\n returns the request thread.\n ' local_var_params = locals() all_params = ['allow_watch_bookmarks', '_continue', 'field_selector', 'label_selector', 'limit', 'pretty', 'resource_version', 'resource_version_match', 'timeout_seconds', 'watch'] all_params.extend(['async_req', '_return_http_data_only', '_preload_content', '_request_timeout']) for (key, val) in six.iteritems(local_var_params['kwargs']): if (key not in all_params): raise ApiTypeError(("Got an unexpected keyword argument '%s' to method list_job_for_all_namespaces" % key)) local_var_params[key] = val del local_var_params['kwargs'] collection_formats = {} path_params = {} query_params = [] if (('allow_watch_bookmarks' in local_var_params) and (local_var_params['allow_watch_bookmarks'] is not None)): query_params.append(('allowWatchBookmarks', local_var_params['allow_watch_bookmarks'])) if (('_continue' in local_var_params) and (local_var_params['_continue'] is not None)): query_params.append(('continue', local_var_params['_continue'])) if (('field_selector' in local_var_params) and (local_var_params['field_selector'] is not None)): query_params.append(('fieldSelector', local_var_params['field_selector'])) if (('label_selector' in local_var_params) and (local_var_params['label_selector'] is not None)): query_params.append(('labelSelector', local_var_params['label_selector'])) if (('limit' in local_var_params) and (local_var_params['limit'] is not None)): query_params.append(('limit', local_var_params['limit'])) if (('pretty' in local_var_params) and (local_var_params['pretty'] is not None)): query_params.append(('pretty', local_var_params['pretty'])) if (('resource_version' in local_var_params) and (local_var_params['resource_version'] is not None)): query_params.append(('resourceVersion', local_var_params['resource_version'])) if (('resource_version_match' in local_var_params) and (local_var_params['resource_version_match'] is not None)): query_params.append(('resourceVersionMatch', local_var_params['resource_version_match'])) if (('timeout_seconds' in local_var_params) and (local_var_params['timeout_seconds'] is not None)): query_params.append(('timeoutSeconds', local_var_params['timeout_seconds'])) if (('watch' in local_var_params) and (local_var_params['watch'] is not None)): query_params.append(('watch', local_var_params['watch'])) header_params = {} form_params = [] local_var_files = {} body_params = None header_params['Accept'] = self.api_client.select_header_accept(['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf', 'application/json;stream=watch', 'application/vnd.kubernetes.protobuf;stream=watch']) auth_settings = ['BearerToken'] return self.api_client.call_api('/apis/batch/v1/jobs', 'GET', path_params, query_params, header_params, body=body_params, post_params=form_params, files=local_var_files, response_type='V1JobList', auth_settings=auth_settings, async_req=local_var_params.get('async_req'), _return_http_data_only=local_var_params.get('_return_http_data_only'), _preload_content=local_var_params.get('_preload_content', True), _request_timeout=local_var_params.get('_request_timeout'), collection_formats=collection_formats)
list_job_for_all_namespaces # noqa: E501 list or watch objects of kind Job # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True >>> thread = api.list_job_for_all_namespaces_with_http_info(async_req=True) >>> result = thread.get() :param async_req bool: execute request asynchronously :param bool allow_watch_bookmarks: allowWatchBookmarks requests watch events with type "BOOKMARK". Servers that do not implement bookmarks may ignore this flag and bookmarks are sent at the server's discretion. Clients should not assume bookmarks are returned at any specific interval, nor may they assume the server will send any BOOKMARK event during a session. If this is not a watch, this field is ignored. :param str _continue: The continue option should be set when retrieving more results from the server. Since this value is server defined, clients may only use the continue value from a previous query result with identical query parameters (except for the value of continue) and the server may reject a continue value it does not recognize. If the specified continue value is no longer valid whether due to expiration (generally five to fifteen minutes) or a configuration change on the server, the server will respond with a 410 ResourceExpired error together with a continue token. If the client needs a consistent list, it must restart their list without the continue field. Otherwise, the client may send another list request with the token received with the 410 error, the server will respond with a list starting from the next key, but from the latest snapshot, which is inconsistent from the previous list results - objects that are created, modified, or deleted after the first list request will be included in the response, as long as their keys are after the "next key". This field is not supported when watch is true. Clients may start a watch from the last resourceVersion value returned by the server and not miss any modifications. :param str field_selector: A selector to restrict the list of returned objects by their fields. Defaults to everything. :param str label_selector: A selector to restrict the list of returned objects by their labels. Defaults to everything. :param int limit: limit is a maximum number of responses to return for a list call. If more items exist, the server will set the `continue` field on the list metadata to a value that can be used with the same initial query to retrieve the next set of results. Setting a limit may return fewer than the requested amount of items (up to zero items) in the event all requested objects are filtered out and clients should only use the presence of the continue field to determine whether more results are available. Servers may choose not to support the limit argument and will return all of the available results. If limit is specified and the continue field is empty, clients may assume that no more results are available. This field is not supported if watch is true. The server guarantees that the objects returned when using continue will be identical to issuing a single list call without a limit - that is, no objects created, modified, or deleted after the first request is issued will be included in any subsequent continued requests. This is sometimes referred to as a consistent snapshot, and ensures that a client that is using limit to receive smaller chunks of a very large result can ensure they see all possible objects. If objects are updated during a chunked list the version of the object that was present at the time the first list result was calculated is returned. :param str pretty: If 'true', then the output is pretty printed. :param str resource_version: resourceVersion sets a constraint on what resource versions a request may be served from. See https://kubernetes.io/docs/reference/using-api/api-concepts/#resource-versions for details. Defaults to unset :param str resource_version_match: resourceVersionMatch determines how resourceVersion is applied to list calls. It is highly recommended that resourceVersionMatch be set for list calls where resourceVersion is set See https://kubernetes.io/docs/reference/using-api/api-concepts/#resource-versions for details. Defaults to unset :param int timeout_seconds: Timeout for the list/watch call. This limits the duration of the call, regardless of any activity or inactivity. :param bool watch: Watch for changes to the described resources and return them as a stream of add, update, and remove notifications. Specify resourceVersion. :param _return_http_data_only: response data without head status code and headers :param _preload_content: if False, the urllib3.HTTPResponse object will be returned without reading/decoding response data. Default is True. :param _request_timeout: timeout setting for this request. If one number provided, it will be total request timeout. It can also be a pair (tuple) of (connection, read) timeouts. :return: tuple(V1JobList, status_code(int), headers(HTTPHeaderDict)) If the method is called asynchronously, returns the request thread.
kubernetes/client/api/batch_v1_api.py
list_job_for_all_namespaces_with_http_info
knkgun/python
1
python
def list_job_for_all_namespaces_with_http_info(self, **kwargs): 'list_job_for_all_namespaces # noqa: E501\n\n list or watch objects of kind Job # noqa: E501\n This method makes a synchronous HTTP request by default. To make an\n asynchronous HTTP request, please pass async_req=True\n >>> thread = api.list_job_for_all_namespaces_with_http_info(async_req=True)\n >>> result = thread.get()\n\n :param async_req bool: execute request asynchronously\n :param bool allow_watch_bookmarks: allowWatchBookmarks requests watch events with type "BOOKMARK". Servers that do not implement bookmarks may ignore this flag and bookmarks are sent at the server\'s discretion. Clients should not assume bookmarks are returned at any specific interval, nor may they assume the server will send any BOOKMARK event during a session. If this is not a watch, this field is ignored.\n :param str _continue: The continue option should be set when retrieving more results from the server. Since this value is server defined, clients may only use the continue value from a previous query result with identical query parameters (except for the value of continue) and the server may reject a continue value it does not recognize. If the specified continue value is no longer valid whether due to expiration (generally five to fifteen minutes) or a configuration change on the server, the server will respond with a 410 ResourceExpired error together with a continue token. If the client needs a consistent list, it must restart their list without the continue field. Otherwise, the client may send another list request with the token received with the 410 error, the server will respond with a list starting from the next key, but from the latest snapshot, which is inconsistent from the previous list results - objects that are created, modified, or deleted after the first list request will be included in the response, as long as their keys are after the "next key". This field is not supported when watch is true. Clients may start a watch from the last resourceVersion value returned by the server and not miss any modifications.\n :param str field_selector: A selector to restrict the list of returned objects by their fields. Defaults to everything.\n :param str label_selector: A selector to restrict the list of returned objects by their labels. Defaults to everything.\n :param int limit: limit is a maximum number of responses to return for a list call. If more items exist, the server will set the `continue` field on the list metadata to a value that can be used with the same initial query to retrieve the next set of results. Setting a limit may return fewer than the requested amount of items (up to zero items) in the event all requested objects are filtered out and clients should only use the presence of the continue field to determine whether more results are available. Servers may choose not to support the limit argument and will return all of the available results. If limit is specified and the continue field is empty, clients may assume that no more results are available. This field is not supported if watch is true. The server guarantees that the objects returned when using continue will be identical to issuing a single list call without a limit - that is, no objects created, modified, or deleted after the first request is issued will be included in any subsequent continued requests. This is sometimes referred to as a consistent snapshot, and ensures that a client that is using limit to receive smaller chunks of a very large result can ensure they see all possible objects. If objects are updated during a chunked list the version of the object that was present at the time the first list result was calculated is returned.\n :param str pretty: If \'true\', then the output is pretty printed.\n :param str resource_version: resourceVersion sets a constraint on what resource versions a request may be served from. See https://kubernetes.io/docs/reference/using-api/api-concepts/#resource-versions for details. Defaults to unset\n :param str resource_version_match: resourceVersionMatch determines how resourceVersion is applied to list calls. It is highly recommended that resourceVersionMatch be set for list calls where resourceVersion is set See https://kubernetes.io/docs/reference/using-api/api-concepts/#resource-versions for details. Defaults to unset\n :param int timeout_seconds: Timeout for the list/watch call. This limits the duration of the call, regardless of any activity or inactivity.\n :param bool watch: Watch for changes to the described resources and return them as a stream of add, update, and remove notifications. Specify resourceVersion.\n :param _return_http_data_only: response data without head status code\n and headers\n :param _preload_content: if False, the urllib3.HTTPResponse object will\n be returned without reading/decoding response\n data. Default is True.\n :param _request_timeout: timeout setting for this request. If one\n number provided, it will be total request\n timeout. It can also be a pair (tuple) of\n (connection, read) timeouts.\n :return: tuple(V1JobList, status_code(int), headers(HTTPHeaderDict))\n If the method is called asynchronously,\n returns the request thread.\n ' local_var_params = locals() all_params = ['allow_watch_bookmarks', '_continue', 'field_selector', 'label_selector', 'limit', 'pretty', 'resource_version', 'resource_version_match', 'timeout_seconds', 'watch'] all_params.extend(['async_req', '_return_http_data_only', '_preload_content', '_request_timeout']) for (key, val) in six.iteritems(local_var_params['kwargs']): if (key not in all_params): raise ApiTypeError(("Got an unexpected keyword argument '%s' to method list_job_for_all_namespaces" % key)) local_var_params[key] = val del local_var_params['kwargs'] collection_formats = {} path_params = {} query_params = [] if (('allow_watch_bookmarks' in local_var_params) and (local_var_params['allow_watch_bookmarks'] is not None)): query_params.append(('allowWatchBookmarks', local_var_params['allow_watch_bookmarks'])) if (('_continue' in local_var_params) and (local_var_params['_continue'] is not None)): query_params.append(('continue', local_var_params['_continue'])) if (('field_selector' in local_var_params) and (local_var_params['field_selector'] is not None)): query_params.append(('fieldSelector', local_var_params['field_selector'])) if (('label_selector' in local_var_params) and (local_var_params['label_selector'] is not None)): query_params.append(('labelSelector', local_var_params['label_selector'])) if (('limit' in local_var_params) and (local_var_params['limit'] is not None)): query_params.append(('limit', local_var_params['limit'])) if (('pretty' in local_var_params) and (local_var_params['pretty'] is not None)): query_params.append(('pretty', local_var_params['pretty'])) if (('resource_version' in local_var_params) and (local_var_params['resource_version'] is not None)): query_params.append(('resourceVersion', local_var_params['resource_version'])) if (('resource_version_match' in local_var_params) and (local_var_params['resource_version_match'] is not None)): query_params.append(('resourceVersionMatch', local_var_params['resource_version_match'])) if (('timeout_seconds' in local_var_params) and (local_var_params['timeout_seconds'] is not None)): query_params.append(('timeoutSeconds', local_var_params['timeout_seconds'])) if (('watch' in local_var_params) and (local_var_params['watch'] is not None)): query_params.append(('watch', local_var_params['watch'])) header_params = {} form_params = [] local_var_files = {} body_params = None header_params['Accept'] = self.api_client.select_header_accept(['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf', 'application/json;stream=watch', 'application/vnd.kubernetes.protobuf;stream=watch']) auth_settings = ['BearerToken'] return self.api_client.call_api('/apis/batch/v1/jobs', 'GET', path_params, query_params, header_params, body=body_params, post_params=form_params, files=local_var_files, response_type='V1JobList', auth_settings=auth_settings, async_req=local_var_params.get('async_req'), _return_http_data_only=local_var_params.get('_return_http_data_only'), _preload_content=local_var_params.get('_preload_content', True), _request_timeout=local_var_params.get('_request_timeout'), collection_formats=collection_formats)
def list_job_for_all_namespaces_with_http_info(self, **kwargs): 'list_job_for_all_namespaces # noqa: E501\n\n list or watch objects of kind Job # noqa: E501\n This method makes a synchronous HTTP request by default. To make an\n asynchronous HTTP request, please pass async_req=True\n >>> thread = api.list_job_for_all_namespaces_with_http_info(async_req=True)\n >>> result = thread.get()\n\n :param async_req bool: execute request asynchronously\n :param bool allow_watch_bookmarks: allowWatchBookmarks requests watch events with type "BOOKMARK". Servers that do not implement bookmarks may ignore this flag and bookmarks are sent at the server\'s discretion. Clients should not assume bookmarks are returned at any specific interval, nor may they assume the server will send any BOOKMARK event during a session. If this is not a watch, this field is ignored.\n :param str _continue: The continue option should be set when retrieving more results from the server. Since this value is server defined, clients may only use the continue value from a previous query result with identical query parameters (except for the value of continue) and the server may reject a continue value it does not recognize. If the specified continue value is no longer valid whether due to expiration (generally five to fifteen minutes) or a configuration change on the server, the server will respond with a 410 ResourceExpired error together with a continue token. If the client needs a consistent list, it must restart their list without the continue field. Otherwise, the client may send another list request with the token received with the 410 error, the server will respond with a list starting from the next key, but from the latest snapshot, which is inconsistent from the previous list results - objects that are created, modified, or deleted after the first list request will be included in the response, as long as their keys are after the "next key". This field is not supported when watch is true. Clients may start a watch from the last resourceVersion value returned by the server and not miss any modifications.\n :param str field_selector: A selector to restrict the list of returned objects by their fields. Defaults to everything.\n :param str label_selector: A selector to restrict the list of returned objects by their labels. Defaults to everything.\n :param int limit: limit is a maximum number of responses to return for a list call. If more items exist, the server will set the `continue` field on the list metadata to a value that can be used with the same initial query to retrieve the next set of results. Setting a limit may return fewer than the requested amount of items (up to zero items) in the event all requested objects are filtered out and clients should only use the presence of the continue field to determine whether more results are available. Servers may choose not to support the limit argument and will return all of the available results. If limit is specified and the continue field is empty, clients may assume that no more results are available. This field is not supported if watch is true. The server guarantees that the objects returned when using continue will be identical to issuing a single list call without a limit - that is, no objects created, modified, or deleted after the first request is issued will be included in any subsequent continued requests. This is sometimes referred to as a consistent snapshot, and ensures that a client that is using limit to receive smaller chunks of a very large result can ensure they see all possible objects. If objects are updated during a chunked list the version of the object that was present at the time the first list result was calculated is returned.\n :param str pretty: If \'true\', then the output is pretty printed.\n :param str resource_version: resourceVersion sets a constraint on what resource versions a request may be served from. See https://kubernetes.io/docs/reference/using-api/api-concepts/#resource-versions for details. Defaults to unset\n :param str resource_version_match: resourceVersionMatch determines how resourceVersion is applied to list calls. It is highly recommended that resourceVersionMatch be set for list calls where resourceVersion is set See https://kubernetes.io/docs/reference/using-api/api-concepts/#resource-versions for details. Defaults to unset\n :param int timeout_seconds: Timeout for the list/watch call. This limits the duration of the call, regardless of any activity or inactivity.\n :param bool watch: Watch for changes to the described resources and return them as a stream of add, update, and remove notifications. Specify resourceVersion.\n :param _return_http_data_only: response data without head status code\n and headers\n :param _preload_content: if False, the urllib3.HTTPResponse object will\n be returned without reading/decoding response\n data. Default is True.\n :param _request_timeout: timeout setting for this request. If one\n number provided, it will be total request\n timeout. It can also be a pair (tuple) of\n (connection, read) timeouts.\n :return: tuple(V1JobList, status_code(int), headers(HTTPHeaderDict))\n If the method is called asynchronously,\n returns the request thread.\n ' local_var_params = locals() all_params = ['allow_watch_bookmarks', '_continue', 'field_selector', 'label_selector', 'limit', 'pretty', 'resource_version', 'resource_version_match', 'timeout_seconds', 'watch'] all_params.extend(['async_req', '_return_http_data_only', '_preload_content', '_request_timeout']) for (key, val) in six.iteritems(local_var_params['kwargs']): if (key not in all_params): raise ApiTypeError(("Got an unexpected keyword argument '%s' to method list_job_for_all_namespaces" % key)) local_var_params[key] = val del local_var_params['kwargs'] collection_formats = {} path_params = {} query_params = [] if (('allow_watch_bookmarks' in local_var_params) and (local_var_params['allow_watch_bookmarks'] is not None)): query_params.append(('allowWatchBookmarks', local_var_params['allow_watch_bookmarks'])) if (('_continue' in local_var_params) and (local_var_params['_continue'] is not None)): query_params.append(('continue', local_var_params['_continue'])) if (('field_selector' in local_var_params) and (local_var_params['field_selector'] is not None)): query_params.append(('fieldSelector', local_var_params['field_selector'])) if (('label_selector' in local_var_params) and (local_var_params['label_selector'] is not None)): query_params.append(('labelSelector', local_var_params['label_selector'])) if (('limit' in local_var_params) and (local_var_params['limit'] is not None)): query_params.append(('limit', local_var_params['limit'])) if (('pretty' in local_var_params) and (local_var_params['pretty'] is not None)): query_params.append(('pretty', local_var_params['pretty'])) if (('resource_version' in local_var_params) and (local_var_params['resource_version'] is not None)): query_params.append(('resourceVersion', local_var_params['resource_version'])) if (('resource_version_match' in local_var_params) and (local_var_params['resource_version_match'] is not None)): query_params.append(('resourceVersionMatch', local_var_params['resource_version_match'])) if (('timeout_seconds' in local_var_params) and (local_var_params['timeout_seconds'] is not None)): query_params.append(('timeoutSeconds', local_var_params['timeout_seconds'])) if (('watch' in local_var_params) and (local_var_params['watch'] is not None)): query_params.append(('watch', local_var_params['watch'])) header_params = {} form_params = [] local_var_files = {} body_params = None header_params['Accept'] = self.api_client.select_header_accept(['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf', 'application/json;stream=watch', 'application/vnd.kubernetes.protobuf;stream=watch']) auth_settings = ['BearerToken'] return self.api_client.call_api('/apis/batch/v1/jobs', 'GET', path_params, query_params, header_params, body=body_params, post_params=form_params, files=local_var_files, response_type='V1JobList', auth_settings=auth_settings, async_req=local_var_params.get('async_req'), _return_http_data_only=local_var_params.get('_return_http_data_only'), _preload_content=local_var_params.get('_preload_content', True), _request_timeout=local_var_params.get('_request_timeout'), collection_formats=collection_formats)<|docstring|>list_job_for_all_namespaces # noqa: E501 list or watch objects of kind Job # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True >>> thread = api.list_job_for_all_namespaces_with_http_info(async_req=True) >>> result = thread.get() :param async_req bool: execute request asynchronously :param bool allow_watch_bookmarks: allowWatchBookmarks requests watch events with type "BOOKMARK". Servers that do not implement bookmarks may ignore this flag and bookmarks are sent at the server's discretion. Clients should not assume bookmarks are returned at any specific interval, nor may they assume the server will send any BOOKMARK event during a session. If this is not a watch, this field is ignored. :param str _continue: The continue option should be set when retrieving more results from the server. Since this value is server defined, clients may only use the continue value from a previous query result with identical query parameters (except for the value of continue) and the server may reject a continue value it does not recognize. If the specified continue value is no longer valid whether due to expiration (generally five to fifteen minutes) or a configuration change on the server, the server will respond with a 410 ResourceExpired error together with a continue token. If the client needs a consistent list, it must restart their list without the continue field. Otherwise, the client may send another list request with the token received with the 410 error, the server will respond with a list starting from the next key, but from the latest snapshot, which is inconsistent from the previous list results - objects that are created, modified, or deleted after the first list request will be included in the response, as long as their keys are after the "next key". This field is not supported when watch is true. Clients may start a watch from the last resourceVersion value returned by the server and not miss any modifications. :param str field_selector: A selector to restrict the list of returned objects by their fields. Defaults to everything. :param str label_selector: A selector to restrict the list of returned objects by their labels. Defaults to everything. :param int limit: limit is a maximum number of responses to return for a list call. If more items exist, the server will set the `continue` field on the list metadata to a value that can be used with the same initial query to retrieve the next set of results. Setting a limit may return fewer than the requested amount of items (up to zero items) in the event all requested objects are filtered out and clients should only use the presence of the continue field to determine whether more results are available. Servers may choose not to support the limit argument and will return all of the available results. If limit is specified and the continue field is empty, clients may assume that no more results are available. This field is not supported if watch is true. The server guarantees that the objects returned when using continue will be identical to issuing a single list call without a limit - that is, no objects created, modified, or deleted after the first request is issued will be included in any subsequent continued requests. This is sometimes referred to as a consistent snapshot, and ensures that a client that is using limit to receive smaller chunks of a very large result can ensure they see all possible objects. If objects are updated during a chunked list the version of the object that was present at the time the first list result was calculated is returned. :param str pretty: If 'true', then the output is pretty printed. :param str resource_version: resourceVersion sets a constraint on what resource versions a request may be served from. See https://kubernetes.io/docs/reference/using-api/api-concepts/#resource-versions for details. Defaults to unset :param str resource_version_match: resourceVersionMatch determines how resourceVersion is applied to list calls. It is highly recommended that resourceVersionMatch be set for list calls where resourceVersion is set See https://kubernetes.io/docs/reference/using-api/api-concepts/#resource-versions for details. Defaults to unset :param int timeout_seconds: Timeout for the list/watch call. This limits the duration of the call, regardless of any activity or inactivity. :param bool watch: Watch for changes to the described resources and return them as a stream of add, update, and remove notifications. Specify resourceVersion. :param _return_http_data_only: response data without head status code and headers :param _preload_content: if False, the urllib3.HTTPResponse object will be returned without reading/decoding response data. Default is True. :param _request_timeout: timeout setting for this request. If one number provided, it will be total request timeout. It can also be a pair (tuple) of (connection, read) timeouts. :return: tuple(V1JobList, status_code(int), headers(HTTPHeaderDict)) If the method is called asynchronously, returns the request thread.<|endoftext|>
3b414db5a050cadfec55929a6ca5f8bcb8be574f124550683dbc91211e700547
def list_namespaced_cron_job(self, namespace, **kwargs): 'list_namespaced_cron_job # noqa: E501\n\n list or watch objects of kind CronJob # noqa: E501\n This method makes a synchronous HTTP request by default. To make an\n asynchronous HTTP request, please pass async_req=True\n >>> thread = api.list_namespaced_cron_job(namespace, async_req=True)\n >>> result = thread.get()\n\n :param async_req bool: execute request asynchronously\n :param str namespace: object name and auth scope, such as for teams and projects (required)\n :param str pretty: If \'true\', then the output is pretty printed.\n :param bool allow_watch_bookmarks: allowWatchBookmarks requests watch events with type "BOOKMARK". Servers that do not implement bookmarks may ignore this flag and bookmarks are sent at the server\'s discretion. Clients should not assume bookmarks are returned at any specific interval, nor may they assume the server will send any BOOKMARK event during a session. If this is not a watch, this field is ignored.\n :param str _continue: The continue option should be set when retrieving more results from the server. Since this value is server defined, clients may only use the continue value from a previous query result with identical query parameters (except for the value of continue) and the server may reject a continue value it does not recognize. If the specified continue value is no longer valid whether due to expiration (generally five to fifteen minutes) or a configuration change on the server, the server will respond with a 410 ResourceExpired error together with a continue token. If the client needs a consistent list, it must restart their list without the continue field. Otherwise, the client may send another list request with the token received with the 410 error, the server will respond with a list starting from the next key, but from the latest snapshot, which is inconsistent from the previous list results - objects that are created, modified, or deleted after the first list request will be included in the response, as long as their keys are after the "next key". This field is not supported when watch is true. Clients may start a watch from the last resourceVersion value returned by the server and not miss any modifications.\n :param str field_selector: A selector to restrict the list of returned objects by their fields. Defaults to everything.\n :param str label_selector: A selector to restrict the list of returned objects by their labels. Defaults to everything.\n :param int limit: limit is a maximum number of responses to return for a list call. If more items exist, the server will set the `continue` field on the list metadata to a value that can be used with the same initial query to retrieve the next set of results. Setting a limit may return fewer than the requested amount of items (up to zero items) in the event all requested objects are filtered out and clients should only use the presence of the continue field to determine whether more results are available. Servers may choose not to support the limit argument and will return all of the available results. If limit is specified and the continue field is empty, clients may assume that no more results are available. This field is not supported if watch is true. The server guarantees that the objects returned when using continue will be identical to issuing a single list call without a limit - that is, no objects created, modified, or deleted after the first request is issued will be included in any subsequent continued requests. This is sometimes referred to as a consistent snapshot, and ensures that a client that is using limit to receive smaller chunks of a very large result can ensure they see all possible objects. If objects are updated during a chunked list the version of the object that was present at the time the first list result was calculated is returned.\n :param str resource_version: resourceVersion sets a constraint on what resource versions a request may be served from. See https://kubernetes.io/docs/reference/using-api/api-concepts/#resource-versions for details. Defaults to unset\n :param str resource_version_match: resourceVersionMatch determines how resourceVersion is applied to list calls. It is highly recommended that resourceVersionMatch be set for list calls where resourceVersion is set See https://kubernetes.io/docs/reference/using-api/api-concepts/#resource-versions for details. Defaults to unset\n :param int timeout_seconds: Timeout for the list/watch call. This limits the duration of the call, regardless of any activity or inactivity.\n :param bool watch: Watch for changes to the described resources and return them as a stream of add, update, and remove notifications. Specify resourceVersion.\n :param _preload_content: if False, the urllib3.HTTPResponse object will\n be returned without reading/decoding response\n data. Default is True.\n :param _request_timeout: timeout setting for this request. If one\n number provided, it will be total request\n timeout. It can also be a pair (tuple) of\n (connection, read) timeouts.\n :return: V1CronJobList\n If the method is called asynchronously,\n returns the request thread.\n ' kwargs['_return_http_data_only'] = True return self.list_namespaced_cron_job_with_http_info(namespace, **kwargs)
list_namespaced_cron_job # noqa: E501 list or watch objects of kind CronJob # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True >>> thread = api.list_namespaced_cron_job(namespace, async_req=True) >>> result = thread.get() :param async_req bool: execute request asynchronously :param str namespace: object name and auth scope, such as for teams and projects (required) :param str pretty: If 'true', then the output is pretty printed. :param bool allow_watch_bookmarks: allowWatchBookmarks requests watch events with type "BOOKMARK". Servers that do not implement bookmarks may ignore this flag and bookmarks are sent at the server's discretion. Clients should not assume bookmarks are returned at any specific interval, nor may they assume the server will send any BOOKMARK event during a session. If this is not a watch, this field is ignored. :param str _continue: The continue option should be set when retrieving more results from the server. Since this value is server defined, clients may only use the continue value from a previous query result with identical query parameters (except for the value of continue) and the server may reject a continue value it does not recognize. If the specified continue value is no longer valid whether due to expiration (generally five to fifteen minutes) or a configuration change on the server, the server will respond with a 410 ResourceExpired error together with a continue token. If the client needs a consistent list, it must restart their list without the continue field. Otherwise, the client may send another list request with the token received with the 410 error, the server will respond with a list starting from the next key, but from the latest snapshot, which is inconsistent from the previous list results - objects that are created, modified, or deleted after the first list request will be included in the response, as long as their keys are after the "next key". This field is not supported when watch is true. Clients may start a watch from the last resourceVersion value returned by the server and not miss any modifications. :param str field_selector: A selector to restrict the list of returned objects by their fields. Defaults to everything. :param str label_selector: A selector to restrict the list of returned objects by their labels. Defaults to everything. :param int limit: limit is a maximum number of responses to return for a list call. If more items exist, the server will set the `continue` field on the list metadata to a value that can be used with the same initial query to retrieve the next set of results. Setting a limit may return fewer than the requested amount of items (up to zero items) in the event all requested objects are filtered out and clients should only use the presence of the continue field to determine whether more results are available. Servers may choose not to support the limit argument and will return all of the available results. If limit is specified and the continue field is empty, clients may assume that no more results are available. This field is not supported if watch is true. The server guarantees that the objects returned when using continue will be identical to issuing a single list call without a limit - that is, no objects created, modified, or deleted after the first request is issued will be included in any subsequent continued requests. This is sometimes referred to as a consistent snapshot, and ensures that a client that is using limit to receive smaller chunks of a very large result can ensure they see all possible objects. If objects are updated during a chunked list the version of the object that was present at the time the first list result was calculated is returned. :param str resource_version: resourceVersion sets a constraint on what resource versions a request may be served from. See https://kubernetes.io/docs/reference/using-api/api-concepts/#resource-versions for details. Defaults to unset :param str resource_version_match: resourceVersionMatch determines how resourceVersion is applied to list calls. It is highly recommended that resourceVersionMatch be set for list calls where resourceVersion is set See https://kubernetes.io/docs/reference/using-api/api-concepts/#resource-versions for details. Defaults to unset :param int timeout_seconds: Timeout for the list/watch call. This limits the duration of the call, regardless of any activity or inactivity. :param bool watch: Watch for changes to the described resources and return them as a stream of add, update, and remove notifications. Specify resourceVersion. :param _preload_content: if False, the urllib3.HTTPResponse object will be returned without reading/decoding response data. Default is True. :param _request_timeout: timeout setting for this request. If one number provided, it will be total request timeout. It can also be a pair (tuple) of (connection, read) timeouts. :return: V1CronJobList If the method is called asynchronously, returns the request thread.
kubernetes/client/api/batch_v1_api.py
list_namespaced_cron_job
knkgun/python
1
python
def list_namespaced_cron_job(self, namespace, **kwargs): 'list_namespaced_cron_job # noqa: E501\n\n list or watch objects of kind CronJob # noqa: E501\n This method makes a synchronous HTTP request by default. To make an\n asynchronous HTTP request, please pass async_req=True\n >>> thread = api.list_namespaced_cron_job(namespace, async_req=True)\n >>> result = thread.get()\n\n :param async_req bool: execute request asynchronously\n :param str namespace: object name and auth scope, such as for teams and projects (required)\n :param str pretty: If \'true\', then the output is pretty printed.\n :param bool allow_watch_bookmarks: allowWatchBookmarks requests watch events with type "BOOKMARK". Servers that do not implement bookmarks may ignore this flag and bookmarks are sent at the server\'s discretion. Clients should not assume bookmarks are returned at any specific interval, nor may they assume the server will send any BOOKMARK event during a session. If this is not a watch, this field is ignored.\n :param str _continue: The continue option should be set when retrieving more results from the server. Since this value is server defined, clients may only use the continue value from a previous query result with identical query parameters (except for the value of continue) and the server may reject a continue value it does not recognize. If the specified continue value is no longer valid whether due to expiration (generally five to fifteen minutes) or a configuration change on the server, the server will respond with a 410 ResourceExpired error together with a continue token. If the client needs a consistent list, it must restart their list without the continue field. Otherwise, the client may send another list request with the token received with the 410 error, the server will respond with a list starting from the next key, but from the latest snapshot, which is inconsistent from the previous list results - objects that are created, modified, or deleted after the first list request will be included in the response, as long as their keys are after the "next key". This field is not supported when watch is true. Clients may start a watch from the last resourceVersion value returned by the server and not miss any modifications.\n :param str field_selector: A selector to restrict the list of returned objects by their fields. Defaults to everything.\n :param str label_selector: A selector to restrict the list of returned objects by their labels. Defaults to everything.\n :param int limit: limit is a maximum number of responses to return for a list call. If more items exist, the server will set the `continue` field on the list metadata to a value that can be used with the same initial query to retrieve the next set of results. Setting a limit may return fewer than the requested amount of items (up to zero items) in the event all requested objects are filtered out and clients should only use the presence of the continue field to determine whether more results are available. Servers may choose not to support the limit argument and will return all of the available results. If limit is specified and the continue field is empty, clients may assume that no more results are available. This field is not supported if watch is true. The server guarantees that the objects returned when using continue will be identical to issuing a single list call without a limit - that is, no objects created, modified, or deleted after the first request is issued will be included in any subsequent continued requests. This is sometimes referred to as a consistent snapshot, and ensures that a client that is using limit to receive smaller chunks of a very large result can ensure they see all possible objects. If objects are updated during a chunked list the version of the object that was present at the time the first list result was calculated is returned.\n :param str resource_version: resourceVersion sets a constraint on what resource versions a request may be served from. See https://kubernetes.io/docs/reference/using-api/api-concepts/#resource-versions for details. Defaults to unset\n :param str resource_version_match: resourceVersionMatch determines how resourceVersion is applied to list calls. It is highly recommended that resourceVersionMatch be set for list calls where resourceVersion is set See https://kubernetes.io/docs/reference/using-api/api-concepts/#resource-versions for details. Defaults to unset\n :param int timeout_seconds: Timeout for the list/watch call. This limits the duration of the call, regardless of any activity or inactivity.\n :param bool watch: Watch for changes to the described resources and return them as a stream of add, update, and remove notifications. Specify resourceVersion.\n :param _preload_content: if False, the urllib3.HTTPResponse object will\n be returned without reading/decoding response\n data. Default is True.\n :param _request_timeout: timeout setting for this request. If one\n number provided, it will be total request\n timeout. It can also be a pair (tuple) of\n (connection, read) timeouts.\n :return: V1CronJobList\n If the method is called asynchronously,\n returns the request thread.\n ' kwargs['_return_http_data_only'] = True return self.list_namespaced_cron_job_with_http_info(namespace, **kwargs)
def list_namespaced_cron_job(self, namespace, **kwargs): 'list_namespaced_cron_job # noqa: E501\n\n list or watch objects of kind CronJob # noqa: E501\n This method makes a synchronous HTTP request by default. To make an\n asynchronous HTTP request, please pass async_req=True\n >>> thread = api.list_namespaced_cron_job(namespace, async_req=True)\n >>> result = thread.get()\n\n :param async_req bool: execute request asynchronously\n :param str namespace: object name and auth scope, such as for teams and projects (required)\n :param str pretty: If \'true\', then the output is pretty printed.\n :param bool allow_watch_bookmarks: allowWatchBookmarks requests watch events with type "BOOKMARK". Servers that do not implement bookmarks may ignore this flag and bookmarks are sent at the server\'s discretion. Clients should not assume bookmarks are returned at any specific interval, nor may they assume the server will send any BOOKMARK event during a session. If this is not a watch, this field is ignored.\n :param str _continue: The continue option should be set when retrieving more results from the server. Since this value is server defined, clients may only use the continue value from a previous query result with identical query parameters (except for the value of continue) and the server may reject a continue value it does not recognize. If the specified continue value is no longer valid whether due to expiration (generally five to fifteen minutes) or a configuration change on the server, the server will respond with a 410 ResourceExpired error together with a continue token. If the client needs a consistent list, it must restart their list without the continue field. Otherwise, the client may send another list request with the token received with the 410 error, the server will respond with a list starting from the next key, but from the latest snapshot, which is inconsistent from the previous list results - objects that are created, modified, or deleted after the first list request will be included in the response, as long as their keys are after the "next key". This field is not supported when watch is true. Clients may start a watch from the last resourceVersion value returned by the server and not miss any modifications.\n :param str field_selector: A selector to restrict the list of returned objects by their fields. Defaults to everything.\n :param str label_selector: A selector to restrict the list of returned objects by their labels. Defaults to everything.\n :param int limit: limit is a maximum number of responses to return for a list call. If more items exist, the server will set the `continue` field on the list metadata to a value that can be used with the same initial query to retrieve the next set of results. Setting a limit may return fewer than the requested amount of items (up to zero items) in the event all requested objects are filtered out and clients should only use the presence of the continue field to determine whether more results are available. Servers may choose not to support the limit argument and will return all of the available results. If limit is specified and the continue field is empty, clients may assume that no more results are available. This field is not supported if watch is true. The server guarantees that the objects returned when using continue will be identical to issuing a single list call without a limit - that is, no objects created, modified, or deleted after the first request is issued will be included in any subsequent continued requests. This is sometimes referred to as a consistent snapshot, and ensures that a client that is using limit to receive smaller chunks of a very large result can ensure they see all possible objects. If objects are updated during a chunked list the version of the object that was present at the time the first list result was calculated is returned.\n :param str resource_version: resourceVersion sets a constraint on what resource versions a request may be served from. See https://kubernetes.io/docs/reference/using-api/api-concepts/#resource-versions for details. Defaults to unset\n :param str resource_version_match: resourceVersionMatch determines how resourceVersion is applied to list calls. It is highly recommended that resourceVersionMatch be set for list calls where resourceVersion is set See https://kubernetes.io/docs/reference/using-api/api-concepts/#resource-versions for details. Defaults to unset\n :param int timeout_seconds: Timeout for the list/watch call. This limits the duration of the call, regardless of any activity or inactivity.\n :param bool watch: Watch for changes to the described resources and return them as a stream of add, update, and remove notifications. Specify resourceVersion.\n :param _preload_content: if False, the urllib3.HTTPResponse object will\n be returned without reading/decoding response\n data. Default is True.\n :param _request_timeout: timeout setting for this request. If one\n number provided, it will be total request\n timeout. It can also be a pair (tuple) of\n (connection, read) timeouts.\n :return: V1CronJobList\n If the method is called asynchronously,\n returns the request thread.\n ' kwargs['_return_http_data_only'] = True return self.list_namespaced_cron_job_with_http_info(namespace, **kwargs)<|docstring|>list_namespaced_cron_job # noqa: E501 list or watch objects of kind CronJob # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True >>> thread = api.list_namespaced_cron_job(namespace, async_req=True) >>> result = thread.get() :param async_req bool: execute request asynchronously :param str namespace: object name and auth scope, such as for teams and projects (required) :param str pretty: If 'true', then the output is pretty printed. :param bool allow_watch_bookmarks: allowWatchBookmarks requests watch events with type "BOOKMARK". Servers that do not implement bookmarks may ignore this flag and bookmarks are sent at the server's discretion. Clients should not assume bookmarks are returned at any specific interval, nor may they assume the server will send any BOOKMARK event during a session. If this is not a watch, this field is ignored. :param str _continue: The continue option should be set when retrieving more results from the server. Since this value is server defined, clients may only use the continue value from a previous query result with identical query parameters (except for the value of continue) and the server may reject a continue value it does not recognize. If the specified continue value is no longer valid whether due to expiration (generally five to fifteen minutes) or a configuration change on the server, the server will respond with a 410 ResourceExpired error together with a continue token. If the client needs a consistent list, it must restart their list without the continue field. Otherwise, the client may send another list request with the token received with the 410 error, the server will respond with a list starting from the next key, but from the latest snapshot, which is inconsistent from the previous list results - objects that are created, modified, or deleted after the first list request will be included in the response, as long as their keys are after the "next key". This field is not supported when watch is true. Clients may start a watch from the last resourceVersion value returned by the server and not miss any modifications. :param str field_selector: A selector to restrict the list of returned objects by their fields. Defaults to everything. :param str label_selector: A selector to restrict the list of returned objects by their labels. Defaults to everything. :param int limit: limit is a maximum number of responses to return for a list call. If more items exist, the server will set the `continue` field on the list metadata to a value that can be used with the same initial query to retrieve the next set of results. Setting a limit may return fewer than the requested amount of items (up to zero items) in the event all requested objects are filtered out and clients should only use the presence of the continue field to determine whether more results are available. Servers may choose not to support the limit argument and will return all of the available results. If limit is specified and the continue field is empty, clients may assume that no more results are available. This field is not supported if watch is true. The server guarantees that the objects returned when using continue will be identical to issuing a single list call without a limit - that is, no objects created, modified, or deleted after the first request is issued will be included in any subsequent continued requests. This is sometimes referred to as a consistent snapshot, and ensures that a client that is using limit to receive smaller chunks of a very large result can ensure they see all possible objects. If objects are updated during a chunked list the version of the object that was present at the time the first list result was calculated is returned. :param str resource_version: resourceVersion sets a constraint on what resource versions a request may be served from. See https://kubernetes.io/docs/reference/using-api/api-concepts/#resource-versions for details. Defaults to unset :param str resource_version_match: resourceVersionMatch determines how resourceVersion is applied to list calls. It is highly recommended that resourceVersionMatch be set for list calls where resourceVersion is set See https://kubernetes.io/docs/reference/using-api/api-concepts/#resource-versions for details. Defaults to unset :param int timeout_seconds: Timeout for the list/watch call. This limits the duration of the call, regardless of any activity or inactivity. :param bool watch: Watch for changes to the described resources and return them as a stream of add, update, and remove notifications. Specify resourceVersion. :param _preload_content: if False, the urllib3.HTTPResponse object will be returned without reading/decoding response data. Default is True. :param _request_timeout: timeout setting for this request. If one number provided, it will be total request timeout. It can also be a pair (tuple) of (connection, read) timeouts. :return: V1CronJobList If the method is called asynchronously, returns the request thread.<|endoftext|>
af9f073cb794f75037950ed63c6882f8fd32d3b168e258c006f6ba4b074d3ba1
def list_namespaced_cron_job_with_http_info(self, namespace, **kwargs): 'list_namespaced_cron_job # noqa: E501\n\n list or watch objects of kind CronJob # noqa: E501\n This method makes a synchronous HTTP request by default. To make an\n asynchronous HTTP request, please pass async_req=True\n >>> thread = api.list_namespaced_cron_job_with_http_info(namespace, async_req=True)\n >>> result = thread.get()\n\n :param async_req bool: execute request asynchronously\n :param str namespace: object name and auth scope, such as for teams and projects (required)\n :param str pretty: If \'true\', then the output is pretty printed.\n :param bool allow_watch_bookmarks: allowWatchBookmarks requests watch events with type "BOOKMARK". Servers that do not implement bookmarks may ignore this flag and bookmarks are sent at the server\'s discretion. Clients should not assume bookmarks are returned at any specific interval, nor may they assume the server will send any BOOKMARK event during a session. If this is not a watch, this field is ignored.\n :param str _continue: The continue option should be set when retrieving more results from the server. Since this value is server defined, clients may only use the continue value from a previous query result with identical query parameters (except for the value of continue) and the server may reject a continue value it does not recognize. If the specified continue value is no longer valid whether due to expiration (generally five to fifteen minutes) or a configuration change on the server, the server will respond with a 410 ResourceExpired error together with a continue token. If the client needs a consistent list, it must restart their list without the continue field. Otherwise, the client may send another list request with the token received with the 410 error, the server will respond with a list starting from the next key, but from the latest snapshot, which is inconsistent from the previous list results - objects that are created, modified, or deleted after the first list request will be included in the response, as long as their keys are after the "next key". This field is not supported when watch is true. Clients may start a watch from the last resourceVersion value returned by the server and not miss any modifications.\n :param str field_selector: A selector to restrict the list of returned objects by their fields. Defaults to everything.\n :param str label_selector: A selector to restrict the list of returned objects by their labels. Defaults to everything.\n :param int limit: limit is a maximum number of responses to return for a list call. If more items exist, the server will set the `continue` field on the list metadata to a value that can be used with the same initial query to retrieve the next set of results. Setting a limit may return fewer than the requested amount of items (up to zero items) in the event all requested objects are filtered out and clients should only use the presence of the continue field to determine whether more results are available. Servers may choose not to support the limit argument and will return all of the available results. If limit is specified and the continue field is empty, clients may assume that no more results are available. This field is not supported if watch is true. The server guarantees that the objects returned when using continue will be identical to issuing a single list call without a limit - that is, no objects created, modified, or deleted after the first request is issued will be included in any subsequent continued requests. This is sometimes referred to as a consistent snapshot, and ensures that a client that is using limit to receive smaller chunks of a very large result can ensure they see all possible objects. If objects are updated during a chunked list the version of the object that was present at the time the first list result was calculated is returned.\n :param str resource_version: resourceVersion sets a constraint on what resource versions a request may be served from. See https://kubernetes.io/docs/reference/using-api/api-concepts/#resource-versions for details. Defaults to unset\n :param str resource_version_match: resourceVersionMatch determines how resourceVersion is applied to list calls. It is highly recommended that resourceVersionMatch be set for list calls where resourceVersion is set See https://kubernetes.io/docs/reference/using-api/api-concepts/#resource-versions for details. Defaults to unset\n :param int timeout_seconds: Timeout for the list/watch call. This limits the duration of the call, regardless of any activity or inactivity.\n :param bool watch: Watch for changes to the described resources and return them as a stream of add, update, and remove notifications. Specify resourceVersion.\n :param _return_http_data_only: response data without head status code\n and headers\n :param _preload_content: if False, the urllib3.HTTPResponse object will\n be returned without reading/decoding response\n data. Default is True.\n :param _request_timeout: timeout setting for this request. If one\n number provided, it will be total request\n timeout. It can also be a pair (tuple) of\n (connection, read) timeouts.\n :return: tuple(V1CronJobList, status_code(int), headers(HTTPHeaderDict))\n If the method is called asynchronously,\n returns the request thread.\n ' local_var_params = locals() all_params = ['namespace', 'pretty', 'allow_watch_bookmarks', '_continue', 'field_selector', 'label_selector', 'limit', 'resource_version', 'resource_version_match', 'timeout_seconds', 'watch'] all_params.extend(['async_req', '_return_http_data_only', '_preload_content', '_request_timeout']) for (key, val) in six.iteritems(local_var_params['kwargs']): if (key not in all_params): raise ApiTypeError(("Got an unexpected keyword argument '%s' to method list_namespaced_cron_job" % key)) local_var_params[key] = val del local_var_params['kwargs'] if (self.api_client.client_side_validation and (('namespace' not in local_var_params) or (local_var_params['namespace'] is None))): raise ApiValueError('Missing the required parameter `namespace` when calling `list_namespaced_cron_job`') collection_formats = {} path_params = {} if ('namespace' in local_var_params): path_params['namespace'] = local_var_params['namespace'] query_params = [] if (('pretty' in local_var_params) and (local_var_params['pretty'] is not None)): query_params.append(('pretty', local_var_params['pretty'])) if (('allow_watch_bookmarks' in local_var_params) and (local_var_params['allow_watch_bookmarks'] is not None)): query_params.append(('allowWatchBookmarks', local_var_params['allow_watch_bookmarks'])) if (('_continue' in local_var_params) and (local_var_params['_continue'] is not None)): query_params.append(('continue', local_var_params['_continue'])) if (('field_selector' in local_var_params) and (local_var_params['field_selector'] is not None)): query_params.append(('fieldSelector', local_var_params['field_selector'])) if (('label_selector' in local_var_params) and (local_var_params['label_selector'] is not None)): query_params.append(('labelSelector', local_var_params['label_selector'])) if (('limit' in local_var_params) and (local_var_params['limit'] is not None)): query_params.append(('limit', local_var_params['limit'])) if (('resource_version' in local_var_params) and (local_var_params['resource_version'] is not None)): query_params.append(('resourceVersion', local_var_params['resource_version'])) if (('resource_version_match' in local_var_params) and (local_var_params['resource_version_match'] is not None)): query_params.append(('resourceVersionMatch', local_var_params['resource_version_match'])) if (('timeout_seconds' in local_var_params) and (local_var_params['timeout_seconds'] is not None)): query_params.append(('timeoutSeconds', local_var_params['timeout_seconds'])) if (('watch' in local_var_params) and (local_var_params['watch'] is not None)): query_params.append(('watch', local_var_params['watch'])) header_params = {} form_params = [] local_var_files = {} body_params = None header_params['Accept'] = self.api_client.select_header_accept(['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf', 'application/json;stream=watch', 'application/vnd.kubernetes.protobuf;stream=watch']) auth_settings = ['BearerToken'] return self.api_client.call_api('/apis/batch/v1/namespaces/{namespace}/cronjobs', 'GET', path_params, query_params, header_params, body=body_params, post_params=form_params, files=local_var_files, response_type='V1CronJobList', auth_settings=auth_settings, async_req=local_var_params.get('async_req'), _return_http_data_only=local_var_params.get('_return_http_data_only'), _preload_content=local_var_params.get('_preload_content', True), _request_timeout=local_var_params.get('_request_timeout'), collection_formats=collection_formats)
list_namespaced_cron_job # noqa: E501 list or watch objects of kind CronJob # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True >>> thread = api.list_namespaced_cron_job_with_http_info(namespace, async_req=True) >>> result = thread.get() :param async_req bool: execute request asynchronously :param str namespace: object name and auth scope, such as for teams and projects (required) :param str pretty: If 'true', then the output is pretty printed. :param bool allow_watch_bookmarks: allowWatchBookmarks requests watch events with type "BOOKMARK". Servers that do not implement bookmarks may ignore this flag and bookmarks are sent at the server's discretion. Clients should not assume bookmarks are returned at any specific interval, nor may they assume the server will send any BOOKMARK event during a session. If this is not a watch, this field is ignored. :param str _continue: The continue option should be set when retrieving more results from the server. Since this value is server defined, clients may only use the continue value from a previous query result with identical query parameters (except for the value of continue) and the server may reject a continue value it does not recognize. If the specified continue value is no longer valid whether due to expiration (generally five to fifteen minutes) or a configuration change on the server, the server will respond with a 410 ResourceExpired error together with a continue token. If the client needs a consistent list, it must restart their list without the continue field. Otherwise, the client may send another list request with the token received with the 410 error, the server will respond with a list starting from the next key, but from the latest snapshot, which is inconsistent from the previous list results - objects that are created, modified, or deleted after the first list request will be included in the response, as long as their keys are after the "next key". This field is not supported when watch is true. Clients may start a watch from the last resourceVersion value returned by the server and not miss any modifications. :param str field_selector: A selector to restrict the list of returned objects by their fields. Defaults to everything. :param str label_selector: A selector to restrict the list of returned objects by their labels. Defaults to everything. :param int limit: limit is a maximum number of responses to return for a list call. If more items exist, the server will set the `continue` field on the list metadata to a value that can be used with the same initial query to retrieve the next set of results. Setting a limit may return fewer than the requested amount of items (up to zero items) in the event all requested objects are filtered out and clients should only use the presence of the continue field to determine whether more results are available. Servers may choose not to support the limit argument and will return all of the available results. If limit is specified and the continue field is empty, clients may assume that no more results are available. This field is not supported if watch is true. The server guarantees that the objects returned when using continue will be identical to issuing a single list call without a limit - that is, no objects created, modified, or deleted after the first request is issued will be included in any subsequent continued requests. This is sometimes referred to as a consistent snapshot, and ensures that a client that is using limit to receive smaller chunks of a very large result can ensure they see all possible objects. If objects are updated during a chunked list the version of the object that was present at the time the first list result was calculated is returned. :param str resource_version: resourceVersion sets a constraint on what resource versions a request may be served from. See https://kubernetes.io/docs/reference/using-api/api-concepts/#resource-versions for details. Defaults to unset :param str resource_version_match: resourceVersionMatch determines how resourceVersion is applied to list calls. It is highly recommended that resourceVersionMatch be set for list calls where resourceVersion is set See https://kubernetes.io/docs/reference/using-api/api-concepts/#resource-versions for details. Defaults to unset :param int timeout_seconds: Timeout for the list/watch call. This limits the duration of the call, regardless of any activity or inactivity. :param bool watch: Watch for changes to the described resources and return them as a stream of add, update, and remove notifications. Specify resourceVersion. :param _return_http_data_only: response data without head status code and headers :param _preload_content: if False, the urllib3.HTTPResponse object will be returned without reading/decoding response data. Default is True. :param _request_timeout: timeout setting for this request. If one number provided, it will be total request timeout. It can also be a pair (tuple) of (connection, read) timeouts. :return: tuple(V1CronJobList, status_code(int), headers(HTTPHeaderDict)) If the method is called asynchronously, returns the request thread.
kubernetes/client/api/batch_v1_api.py
list_namespaced_cron_job_with_http_info
knkgun/python
1
python
def list_namespaced_cron_job_with_http_info(self, namespace, **kwargs): 'list_namespaced_cron_job # noqa: E501\n\n list or watch objects of kind CronJob # noqa: E501\n This method makes a synchronous HTTP request by default. To make an\n asynchronous HTTP request, please pass async_req=True\n >>> thread = api.list_namespaced_cron_job_with_http_info(namespace, async_req=True)\n >>> result = thread.get()\n\n :param async_req bool: execute request asynchronously\n :param str namespace: object name and auth scope, such as for teams and projects (required)\n :param str pretty: If \'true\', then the output is pretty printed.\n :param bool allow_watch_bookmarks: allowWatchBookmarks requests watch events with type "BOOKMARK". Servers that do not implement bookmarks may ignore this flag and bookmarks are sent at the server\'s discretion. Clients should not assume bookmarks are returned at any specific interval, nor may they assume the server will send any BOOKMARK event during a session. If this is not a watch, this field is ignored.\n :param str _continue: The continue option should be set when retrieving more results from the server. Since this value is server defined, clients may only use the continue value from a previous query result with identical query parameters (except for the value of continue) and the server may reject a continue value it does not recognize. If the specified continue value is no longer valid whether due to expiration (generally five to fifteen minutes) or a configuration change on the server, the server will respond with a 410 ResourceExpired error together with a continue token. If the client needs a consistent list, it must restart their list without the continue field. Otherwise, the client may send another list request with the token received with the 410 error, the server will respond with a list starting from the next key, but from the latest snapshot, which is inconsistent from the previous list results - objects that are created, modified, or deleted after the first list request will be included in the response, as long as their keys are after the "next key". This field is not supported when watch is true. Clients may start a watch from the last resourceVersion value returned by the server and not miss any modifications.\n :param str field_selector: A selector to restrict the list of returned objects by their fields. Defaults to everything.\n :param str label_selector: A selector to restrict the list of returned objects by their labels. Defaults to everything.\n :param int limit: limit is a maximum number of responses to return for a list call. If more items exist, the server will set the `continue` field on the list metadata to a value that can be used with the same initial query to retrieve the next set of results. Setting a limit may return fewer than the requested amount of items (up to zero items) in the event all requested objects are filtered out and clients should only use the presence of the continue field to determine whether more results are available. Servers may choose not to support the limit argument and will return all of the available results. If limit is specified and the continue field is empty, clients may assume that no more results are available. This field is not supported if watch is true. The server guarantees that the objects returned when using continue will be identical to issuing a single list call without a limit - that is, no objects created, modified, or deleted after the first request is issued will be included in any subsequent continued requests. This is sometimes referred to as a consistent snapshot, and ensures that a client that is using limit to receive smaller chunks of a very large result can ensure they see all possible objects. If objects are updated during a chunked list the version of the object that was present at the time the first list result was calculated is returned.\n :param str resource_version: resourceVersion sets a constraint on what resource versions a request may be served from. See https://kubernetes.io/docs/reference/using-api/api-concepts/#resource-versions for details. Defaults to unset\n :param str resource_version_match: resourceVersionMatch determines how resourceVersion is applied to list calls. It is highly recommended that resourceVersionMatch be set for list calls where resourceVersion is set See https://kubernetes.io/docs/reference/using-api/api-concepts/#resource-versions for details. Defaults to unset\n :param int timeout_seconds: Timeout for the list/watch call. This limits the duration of the call, regardless of any activity or inactivity.\n :param bool watch: Watch for changes to the described resources and return them as a stream of add, update, and remove notifications. Specify resourceVersion.\n :param _return_http_data_only: response data without head status code\n and headers\n :param _preload_content: if False, the urllib3.HTTPResponse object will\n be returned without reading/decoding response\n data. Default is True.\n :param _request_timeout: timeout setting for this request. If one\n number provided, it will be total request\n timeout. It can also be a pair (tuple) of\n (connection, read) timeouts.\n :return: tuple(V1CronJobList, status_code(int), headers(HTTPHeaderDict))\n If the method is called asynchronously,\n returns the request thread.\n ' local_var_params = locals() all_params = ['namespace', 'pretty', 'allow_watch_bookmarks', '_continue', 'field_selector', 'label_selector', 'limit', 'resource_version', 'resource_version_match', 'timeout_seconds', 'watch'] all_params.extend(['async_req', '_return_http_data_only', '_preload_content', '_request_timeout']) for (key, val) in six.iteritems(local_var_params['kwargs']): if (key not in all_params): raise ApiTypeError(("Got an unexpected keyword argument '%s' to method list_namespaced_cron_job" % key)) local_var_params[key] = val del local_var_params['kwargs'] if (self.api_client.client_side_validation and (('namespace' not in local_var_params) or (local_var_params['namespace'] is None))): raise ApiValueError('Missing the required parameter `namespace` when calling `list_namespaced_cron_job`') collection_formats = {} path_params = {} if ('namespace' in local_var_params): path_params['namespace'] = local_var_params['namespace'] query_params = [] if (('pretty' in local_var_params) and (local_var_params['pretty'] is not None)): query_params.append(('pretty', local_var_params['pretty'])) if (('allow_watch_bookmarks' in local_var_params) and (local_var_params['allow_watch_bookmarks'] is not None)): query_params.append(('allowWatchBookmarks', local_var_params['allow_watch_bookmarks'])) if (('_continue' in local_var_params) and (local_var_params['_continue'] is not None)): query_params.append(('continue', local_var_params['_continue'])) if (('field_selector' in local_var_params) and (local_var_params['field_selector'] is not None)): query_params.append(('fieldSelector', local_var_params['field_selector'])) if (('label_selector' in local_var_params) and (local_var_params['label_selector'] is not None)): query_params.append(('labelSelector', local_var_params['label_selector'])) if (('limit' in local_var_params) and (local_var_params['limit'] is not None)): query_params.append(('limit', local_var_params['limit'])) if (('resource_version' in local_var_params) and (local_var_params['resource_version'] is not None)): query_params.append(('resourceVersion', local_var_params['resource_version'])) if (('resource_version_match' in local_var_params) and (local_var_params['resource_version_match'] is not None)): query_params.append(('resourceVersionMatch', local_var_params['resource_version_match'])) if (('timeout_seconds' in local_var_params) and (local_var_params['timeout_seconds'] is not None)): query_params.append(('timeoutSeconds', local_var_params['timeout_seconds'])) if (('watch' in local_var_params) and (local_var_params['watch'] is not None)): query_params.append(('watch', local_var_params['watch'])) header_params = {} form_params = [] local_var_files = {} body_params = None header_params['Accept'] = self.api_client.select_header_accept(['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf', 'application/json;stream=watch', 'application/vnd.kubernetes.protobuf;stream=watch']) auth_settings = ['BearerToken'] return self.api_client.call_api('/apis/batch/v1/namespaces/{namespace}/cronjobs', 'GET', path_params, query_params, header_params, body=body_params, post_params=form_params, files=local_var_files, response_type='V1CronJobList', auth_settings=auth_settings, async_req=local_var_params.get('async_req'), _return_http_data_only=local_var_params.get('_return_http_data_only'), _preload_content=local_var_params.get('_preload_content', True), _request_timeout=local_var_params.get('_request_timeout'), collection_formats=collection_formats)
def list_namespaced_cron_job_with_http_info(self, namespace, **kwargs): 'list_namespaced_cron_job # noqa: E501\n\n list or watch objects of kind CronJob # noqa: E501\n This method makes a synchronous HTTP request by default. To make an\n asynchronous HTTP request, please pass async_req=True\n >>> thread = api.list_namespaced_cron_job_with_http_info(namespace, async_req=True)\n >>> result = thread.get()\n\n :param async_req bool: execute request asynchronously\n :param str namespace: object name and auth scope, such as for teams and projects (required)\n :param str pretty: If \'true\', then the output is pretty printed.\n :param bool allow_watch_bookmarks: allowWatchBookmarks requests watch events with type "BOOKMARK". Servers that do not implement bookmarks may ignore this flag and bookmarks are sent at the server\'s discretion. Clients should not assume bookmarks are returned at any specific interval, nor may they assume the server will send any BOOKMARK event during a session. If this is not a watch, this field is ignored.\n :param str _continue: The continue option should be set when retrieving more results from the server. Since this value is server defined, clients may only use the continue value from a previous query result with identical query parameters (except for the value of continue) and the server may reject a continue value it does not recognize. If the specified continue value is no longer valid whether due to expiration (generally five to fifteen minutes) or a configuration change on the server, the server will respond with a 410 ResourceExpired error together with a continue token. If the client needs a consistent list, it must restart their list without the continue field. Otherwise, the client may send another list request with the token received with the 410 error, the server will respond with a list starting from the next key, but from the latest snapshot, which is inconsistent from the previous list results - objects that are created, modified, or deleted after the first list request will be included in the response, as long as their keys are after the "next key". This field is not supported when watch is true. Clients may start a watch from the last resourceVersion value returned by the server and not miss any modifications.\n :param str field_selector: A selector to restrict the list of returned objects by their fields. Defaults to everything.\n :param str label_selector: A selector to restrict the list of returned objects by their labels. Defaults to everything.\n :param int limit: limit is a maximum number of responses to return for a list call. If more items exist, the server will set the `continue` field on the list metadata to a value that can be used with the same initial query to retrieve the next set of results. Setting a limit may return fewer than the requested amount of items (up to zero items) in the event all requested objects are filtered out and clients should only use the presence of the continue field to determine whether more results are available. Servers may choose not to support the limit argument and will return all of the available results. If limit is specified and the continue field is empty, clients may assume that no more results are available. This field is not supported if watch is true. The server guarantees that the objects returned when using continue will be identical to issuing a single list call without a limit - that is, no objects created, modified, or deleted after the first request is issued will be included in any subsequent continued requests. This is sometimes referred to as a consistent snapshot, and ensures that a client that is using limit to receive smaller chunks of a very large result can ensure they see all possible objects. If objects are updated during a chunked list the version of the object that was present at the time the first list result was calculated is returned.\n :param str resource_version: resourceVersion sets a constraint on what resource versions a request may be served from. See https://kubernetes.io/docs/reference/using-api/api-concepts/#resource-versions for details. Defaults to unset\n :param str resource_version_match: resourceVersionMatch determines how resourceVersion is applied to list calls. It is highly recommended that resourceVersionMatch be set for list calls where resourceVersion is set See https://kubernetes.io/docs/reference/using-api/api-concepts/#resource-versions for details. Defaults to unset\n :param int timeout_seconds: Timeout for the list/watch call. This limits the duration of the call, regardless of any activity or inactivity.\n :param bool watch: Watch for changes to the described resources and return them as a stream of add, update, and remove notifications. Specify resourceVersion.\n :param _return_http_data_only: response data without head status code\n and headers\n :param _preload_content: if False, the urllib3.HTTPResponse object will\n be returned without reading/decoding response\n data. Default is True.\n :param _request_timeout: timeout setting for this request. If one\n number provided, it will be total request\n timeout. It can also be a pair (tuple) of\n (connection, read) timeouts.\n :return: tuple(V1CronJobList, status_code(int), headers(HTTPHeaderDict))\n If the method is called asynchronously,\n returns the request thread.\n ' local_var_params = locals() all_params = ['namespace', 'pretty', 'allow_watch_bookmarks', '_continue', 'field_selector', 'label_selector', 'limit', 'resource_version', 'resource_version_match', 'timeout_seconds', 'watch'] all_params.extend(['async_req', '_return_http_data_only', '_preload_content', '_request_timeout']) for (key, val) in six.iteritems(local_var_params['kwargs']): if (key not in all_params): raise ApiTypeError(("Got an unexpected keyword argument '%s' to method list_namespaced_cron_job" % key)) local_var_params[key] = val del local_var_params['kwargs'] if (self.api_client.client_side_validation and (('namespace' not in local_var_params) or (local_var_params['namespace'] is None))): raise ApiValueError('Missing the required parameter `namespace` when calling `list_namespaced_cron_job`') collection_formats = {} path_params = {} if ('namespace' in local_var_params): path_params['namespace'] = local_var_params['namespace'] query_params = [] if (('pretty' in local_var_params) and (local_var_params['pretty'] is not None)): query_params.append(('pretty', local_var_params['pretty'])) if (('allow_watch_bookmarks' in local_var_params) and (local_var_params['allow_watch_bookmarks'] is not None)): query_params.append(('allowWatchBookmarks', local_var_params['allow_watch_bookmarks'])) if (('_continue' in local_var_params) and (local_var_params['_continue'] is not None)): query_params.append(('continue', local_var_params['_continue'])) if (('field_selector' in local_var_params) and (local_var_params['field_selector'] is not None)): query_params.append(('fieldSelector', local_var_params['field_selector'])) if (('label_selector' in local_var_params) and (local_var_params['label_selector'] is not None)): query_params.append(('labelSelector', local_var_params['label_selector'])) if (('limit' in local_var_params) and (local_var_params['limit'] is not None)): query_params.append(('limit', local_var_params['limit'])) if (('resource_version' in local_var_params) and (local_var_params['resource_version'] is not None)): query_params.append(('resourceVersion', local_var_params['resource_version'])) if (('resource_version_match' in local_var_params) and (local_var_params['resource_version_match'] is not None)): query_params.append(('resourceVersionMatch', local_var_params['resource_version_match'])) if (('timeout_seconds' in local_var_params) and (local_var_params['timeout_seconds'] is not None)): query_params.append(('timeoutSeconds', local_var_params['timeout_seconds'])) if (('watch' in local_var_params) and (local_var_params['watch'] is not None)): query_params.append(('watch', local_var_params['watch'])) header_params = {} form_params = [] local_var_files = {} body_params = None header_params['Accept'] = self.api_client.select_header_accept(['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf', 'application/json;stream=watch', 'application/vnd.kubernetes.protobuf;stream=watch']) auth_settings = ['BearerToken'] return self.api_client.call_api('/apis/batch/v1/namespaces/{namespace}/cronjobs', 'GET', path_params, query_params, header_params, body=body_params, post_params=form_params, files=local_var_files, response_type='V1CronJobList', auth_settings=auth_settings, async_req=local_var_params.get('async_req'), _return_http_data_only=local_var_params.get('_return_http_data_only'), _preload_content=local_var_params.get('_preload_content', True), _request_timeout=local_var_params.get('_request_timeout'), collection_formats=collection_formats)<|docstring|>list_namespaced_cron_job # noqa: E501 list or watch objects of kind CronJob # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True >>> thread = api.list_namespaced_cron_job_with_http_info(namespace, async_req=True) >>> result = thread.get() :param async_req bool: execute request asynchronously :param str namespace: object name and auth scope, such as for teams and projects (required) :param str pretty: If 'true', then the output is pretty printed. :param bool allow_watch_bookmarks: allowWatchBookmarks requests watch events with type "BOOKMARK". Servers that do not implement bookmarks may ignore this flag and bookmarks are sent at the server's discretion. Clients should not assume bookmarks are returned at any specific interval, nor may they assume the server will send any BOOKMARK event during a session. If this is not a watch, this field is ignored. :param str _continue: The continue option should be set when retrieving more results from the server. Since this value is server defined, clients may only use the continue value from a previous query result with identical query parameters (except for the value of continue) and the server may reject a continue value it does not recognize. If the specified continue value is no longer valid whether due to expiration (generally five to fifteen minutes) or a configuration change on the server, the server will respond with a 410 ResourceExpired error together with a continue token. If the client needs a consistent list, it must restart their list without the continue field. Otherwise, the client may send another list request with the token received with the 410 error, the server will respond with a list starting from the next key, but from the latest snapshot, which is inconsistent from the previous list results - objects that are created, modified, or deleted after the first list request will be included in the response, as long as their keys are after the "next key". This field is not supported when watch is true. Clients may start a watch from the last resourceVersion value returned by the server and not miss any modifications. :param str field_selector: A selector to restrict the list of returned objects by their fields. Defaults to everything. :param str label_selector: A selector to restrict the list of returned objects by their labels. Defaults to everything. :param int limit: limit is a maximum number of responses to return for a list call. If more items exist, the server will set the `continue` field on the list metadata to a value that can be used with the same initial query to retrieve the next set of results. Setting a limit may return fewer than the requested amount of items (up to zero items) in the event all requested objects are filtered out and clients should only use the presence of the continue field to determine whether more results are available. Servers may choose not to support the limit argument and will return all of the available results. If limit is specified and the continue field is empty, clients may assume that no more results are available. This field is not supported if watch is true. The server guarantees that the objects returned when using continue will be identical to issuing a single list call without a limit - that is, no objects created, modified, or deleted after the first request is issued will be included in any subsequent continued requests. This is sometimes referred to as a consistent snapshot, and ensures that a client that is using limit to receive smaller chunks of a very large result can ensure they see all possible objects. If objects are updated during a chunked list the version of the object that was present at the time the first list result was calculated is returned. :param str resource_version: resourceVersion sets a constraint on what resource versions a request may be served from. See https://kubernetes.io/docs/reference/using-api/api-concepts/#resource-versions for details. Defaults to unset :param str resource_version_match: resourceVersionMatch determines how resourceVersion is applied to list calls. It is highly recommended that resourceVersionMatch be set for list calls where resourceVersion is set See https://kubernetes.io/docs/reference/using-api/api-concepts/#resource-versions for details. Defaults to unset :param int timeout_seconds: Timeout for the list/watch call. This limits the duration of the call, regardless of any activity or inactivity. :param bool watch: Watch for changes to the described resources and return them as a stream of add, update, and remove notifications. Specify resourceVersion. :param _return_http_data_only: response data without head status code and headers :param _preload_content: if False, the urllib3.HTTPResponse object will be returned without reading/decoding response data. Default is True. :param _request_timeout: timeout setting for this request. If one number provided, it will be total request timeout. It can also be a pair (tuple) of (connection, read) timeouts. :return: tuple(V1CronJobList, status_code(int), headers(HTTPHeaderDict)) If the method is called asynchronously, returns the request thread.<|endoftext|>
40b22c19dbcdfba4a4509912afaca00bfd7d41805cbc23e9c99339d731911903
def list_namespaced_job(self, namespace, **kwargs): 'list_namespaced_job # noqa: E501\n\n list or watch objects of kind Job # noqa: E501\n This method makes a synchronous HTTP request by default. To make an\n asynchronous HTTP request, please pass async_req=True\n >>> thread = api.list_namespaced_job(namespace, async_req=True)\n >>> result = thread.get()\n\n :param async_req bool: execute request asynchronously\n :param str namespace: object name and auth scope, such as for teams and projects (required)\n :param str pretty: If \'true\', then the output is pretty printed.\n :param bool allow_watch_bookmarks: allowWatchBookmarks requests watch events with type "BOOKMARK". Servers that do not implement bookmarks may ignore this flag and bookmarks are sent at the server\'s discretion. Clients should not assume bookmarks are returned at any specific interval, nor may they assume the server will send any BOOKMARK event during a session. If this is not a watch, this field is ignored.\n :param str _continue: The continue option should be set when retrieving more results from the server. Since this value is server defined, clients may only use the continue value from a previous query result with identical query parameters (except for the value of continue) and the server may reject a continue value it does not recognize. If the specified continue value is no longer valid whether due to expiration (generally five to fifteen minutes) or a configuration change on the server, the server will respond with a 410 ResourceExpired error together with a continue token. If the client needs a consistent list, it must restart their list without the continue field. Otherwise, the client may send another list request with the token received with the 410 error, the server will respond with a list starting from the next key, but from the latest snapshot, which is inconsistent from the previous list results - objects that are created, modified, or deleted after the first list request will be included in the response, as long as their keys are after the "next key". This field is not supported when watch is true. Clients may start a watch from the last resourceVersion value returned by the server and not miss any modifications.\n :param str field_selector: A selector to restrict the list of returned objects by their fields. Defaults to everything.\n :param str label_selector: A selector to restrict the list of returned objects by their labels. Defaults to everything.\n :param int limit: limit is a maximum number of responses to return for a list call. If more items exist, the server will set the `continue` field on the list metadata to a value that can be used with the same initial query to retrieve the next set of results. Setting a limit may return fewer than the requested amount of items (up to zero items) in the event all requested objects are filtered out and clients should only use the presence of the continue field to determine whether more results are available. Servers may choose not to support the limit argument and will return all of the available results. If limit is specified and the continue field is empty, clients may assume that no more results are available. This field is not supported if watch is true. The server guarantees that the objects returned when using continue will be identical to issuing a single list call without a limit - that is, no objects created, modified, or deleted after the first request is issued will be included in any subsequent continued requests. This is sometimes referred to as a consistent snapshot, and ensures that a client that is using limit to receive smaller chunks of a very large result can ensure they see all possible objects. If objects are updated during a chunked list the version of the object that was present at the time the first list result was calculated is returned.\n :param str resource_version: resourceVersion sets a constraint on what resource versions a request may be served from. See https://kubernetes.io/docs/reference/using-api/api-concepts/#resource-versions for details. Defaults to unset\n :param str resource_version_match: resourceVersionMatch determines how resourceVersion is applied to list calls. It is highly recommended that resourceVersionMatch be set for list calls where resourceVersion is set See https://kubernetes.io/docs/reference/using-api/api-concepts/#resource-versions for details. Defaults to unset\n :param int timeout_seconds: Timeout for the list/watch call. This limits the duration of the call, regardless of any activity or inactivity.\n :param bool watch: Watch for changes to the described resources and return them as a stream of add, update, and remove notifications. Specify resourceVersion.\n :param _preload_content: if False, the urllib3.HTTPResponse object will\n be returned without reading/decoding response\n data. Default is True.\n :param _request_timeout: timeout setting for this request. If one\n number provided, it will be total request\n timeout. It can also be a pair (tuple) of\n (connection, read) timeouts.\n :return: V1JobList\n If the method is called asynchronously,\n returns the request thread.\n ' kwargs['_return_http_data_only'] = True return self.list_namespaced_job_with_http_info(namespace, **kwargs)
list_namespaced_job # noqa: E501 list or watch objects of kind Job # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True >>> thread = api.list_namespaced_job(namespace, async_req=True) >>> result = thread.get() :param async_req bool: execute request asynchronously :param str namespace: object name and auth scope, such as for teams and projects (required) :param str pretty: If 'true', then the output is pretty printed. :param bool allow_watch_bookmarks: allowWatchBookmarks requests watch events with type "BOOKMARK". Servers that do not implement bookmarks may ignore this flag and bookmarks are sent at the server's discretion. Clients should not assume bookmarks are returned at any specific interval, nor may they assume the server will send any BOOKMARK event during a session. If this is not a watch, this field is ignored. :param str _continue: The continue option should be set when retrieving more results from the server. Since this value is server defined, clients may only use the continue value from a previous query result with identical query parameters (except for the value of continue) and the server may reject a continue value it does not recognize. If the specified continue value is no longer valid whether due to expiration (generally five to fifteen minutes) or a configuration change on the server, the server will respond with a 410 ResourceExpired error together with a continue token. If the client needs a consistent list, it must restart their list without the continue field. Otherwise, the client may send another list request with the token received with the 410 error, the server will respond with a list starting from the next key, but from the latest snapshot, which is inconsistent from the previous list results - objects that are created, modified, or deleted after the first list request will be included in the response, as long as their keys are after the "next key". This field is not supported when watch is true. Clients may start a watch from the last resourceVersion value returned by the server and not miss any modifications. :param str field_selector: A selector to restrict the list of returned objects by their fields. Defaults to everything. :param str label_selector: A selector to restrict the list of returned objects by their labels. Defaults to everything. :param int limit: limit is a maximum number of responses to return for a list call. If more items exist, the server will set the `continue` field on the list metadata to a value that can be used with the same initial query to retrieve the next set of results. Setting a limit may return fewer than the requested amount of items (up to zero items) in the event all requested objects are filtered out and clients should only use the presence of the continue field to determine whether more results are available. Servers may choose not to support the limit argument and will return all of the available results. If limit is specified and the continue field is empty, clients may assume that no more results are available. This field is not supported if watch is true. The server guarantees that the objects returned when using continue will be identical to issuing a single list call without a limit - that is, no objects created, modified, or deleted after the first request is issued will be included in any subsequent continued requests. This is sometimes referred to as a consistent snapshot, and ensures that a client that is using limit to receive smaller chunks of a very large result can ensure they see all possible objects. If objects are updated during a chunked list the version of the object that was present at the time the first list result was calculated is returned. :param str resource_version: resourceVersion sets a constraint on what resource versions a request may be served from. See https://kubernetes.io/docs/reference/using-api/api-concepts/#resource-versions for details. Defaults to unset :param str resource_version_match: resourceVersionMatch determines how resourceVersion is applied to list calls. It is highly recommended that resourceVersionMatch be set for list calls where resourceVersion is set See https://kubernetes.io/docs/reference/using-api/api-concepts/#resource-versions for details. Defaults to unset :param int timeout_seconds: Timeout for the list/watch call. This limits the duration of the call, regardless of any activity or inactivity. :param bool watch: Watch for changes to the described resources and return them as a stream of add, update, and remove notifications. Specify resourceVersion. :param _preload_content: if False, the urllib3.HTTPResponse object will be returned without reading/decoding response data. Default is True. :param _request_timeout: timeout setting for this request. If one number provided, it will be total request timeout. It can also be a pair (tuple) of (connection, read) timeouts. :return: V1JobList If the method is called asynchronously, returns the request thread.
kubernetes/client/api/batch_v1_api.py
list_namespaced_job
knkgun/python
1
python
def list_namespaced_job(self, namespace, **kwargs): 'list_namespaced_job # noqa: E501\n\n list or watch objects of kind Job # noqa: E501\n This method makes a synchronous HTTP request by default. To make an\n asynchronous HTTP request, please pass async_req=True\n >>> thread = api.list_namespaced_job(namespace, async_req=True)\n >>> result = thread.get()\n\n :param async_req bool: execute request asynchronously\n :param str namespace: object name and auth scope, such as for teams and projects (required)\n :param str pretty: If \'true\', then the output is pretty printed.\n :param bool allow_watch_bookmarks: allowWatchBookmarks requests watch events with type "BOOKMARK". Servers that do not implement bookmarks may ignore this flag and bookmarks are sent at the server\'s discretion. Clients should not assume bookmarks are returned at any specific interval, nor may they assume the server will send any BOOKMARK event during a session. If this is not a watch, this field is ignored.\n :param str _continue: The continue option should be set when retrieving more results from the server. Since this value is server defined, clients may only use the continue value from a previous query result with identical query parameters (except for the value of continue) and the server may reject a continue value it does not recognize. If the specified continue value is no longer valid whether due to expiration (generally five to fifteen minutes) or a configuration change on the server, the server will respond with a 410 ResourceExpired error together with a continue token. If the client needs a consistent list, it must restart their list without the continue field. Otherwise, the client may send another list request with the token received with the 410 error, the server will respond with a list starting from the next key, but from the latest snapshot, which is inconsistent from the previous list results - objects that are created, modified, or deleted after the first list request will be included in the response, as long as their keys are after the "next key". This field is not supported when watch is true. Clients may start a watch from the last resourceVersion value returned by the server and not miss any modifications.\n :param str field_selector: A selector to restrict the list of returned objects by their fields. Defaults to everything.\n :param str label_selector: A selector to restrict the list of returned objects by their labels. Defaults to everything.\n :param int limit: limit is a maximum number of responses to return for a list call. If more items exist, the server will set the `continue` field on the list metadata to a value that can be used with the same initial query to retrieve the next set of results. Setting a limit may return fewer than the requested amount of items (up to zero items) in the event all requested objects are filtered out and clients should only use the presence of the continue field to determine whether more results are available. Servers may choose not to support the limit argument and will return all of the available results. If limit is specified and the continue field is empty, clients may assume that no more results are available. This field is not supported if watch is true. The server guarantees that the objects returned when using continue will be identical to issuing a single list call without a limit - that is, no objects created, modified, or deleted after the first request is issued will be included in any subsequent continued requests. This is sometimes referred to as a consistent snapshot, and ensures that a client that is using limit to receive smaller chunks of a very large result can ensure they see all possible objects. If objects are updated during a chunked list the version of the object that was present at the time the first list result was calculated is returned.\n :param str resource_version: resourceVersion sets a constraint on what resource versions a request may be served from. See https://kubernetes.io/docs/reference/using-api/api-concepts/#resource-versions for details. Defaults to unset\n :param str resource_version_match: resourceVersionMatch determines how resourceVersion is applied to list calls. It is highly recommended that resourceVersionMatch be set for list calls where resourceVersion is set See https://kubernetes.io/docs/reference/using-api/api-concepts/#resource-versions for details. Defaults to unset\n :param int timeout_seconds: Timeout for the list/watch call. This limits the duration of the call, regardless of any activity or inactivity.\n :param bool watch: Watch for changes to the described resources and return them as a stream of add, update, and remove notifications. Specify resourceVersion.\n :param _preload_content: if False, the urllib3.HTTPResponse object will\n be returned without reading/decoding response\n data. Default is True.\n :param _request_timeout: timeout setting for this request. If one\n number provided, it will be total request\n timeout. It can also be a pair (tuple) of\n (connection, read) timeouts.\n :return: V1JobList\n If the method is called asynchronously,\n returns the request thread.\n ' kwargs['_return_http_data_only'] = True return self.list_namespaced_job_with_http_info(namespace, **kwargs)
def list_namespaced_job(self, namespace, **kwargs): 'list_namespaced_job # noqa: E501\n\n list or watch objects of kind Job # noqa: E501\n This method makes a synchronous HTTP request by default. To make an\n asynchronous HTTP request, please pass async_req=True\n >>> thread = api.list_namespaced_job(namespace, async_req=True)\n >>> result = thread.get()\n\n :param async_req bool: execute request asynchronously\n :param str namespace: object name and auth scope, such as for teams and projects (required)\n :param str pretty: If \'true\', then the output is pretty printed.\n :param bool allow_watch_bookmarks: allowWatchBookmarks requests watch events with type "BOOKMARK". Servers that do not implement bookmarks may ignore this flag and bookmarks are sent at the server\'s discretion. Clients should not assume bookmarks are returned at any specific interval, nor may they assume the server will send any BOOKMARK event during a session. If this is not a watch, this field is ignored.\n :param str _continue: The continue option should be set when retrieving more results from the server. Since this value is server defined, clients may only use the continue value from a previous query result with identical query parameters (except for the value of continue) and the server may reject a continue value it does not recognize. If the specified continue value is no longer valid whether due to expiration (generally five to fifteen minutes) or a configuration change on the server, the server will respond with a 410 ResourceExpired error together with a continue token. If the client needs a consistent list, it must restart their list without the continue field. Otherwise, the client may send another list request with the token received with the 410 error, the server will respond with a list starting from the next key, but from the latest snapshot, which is inconsistent from the previous list results - objects that are created, modified, or deleted after the first list request will be included in the response, as long as their keys are after the "next key". This field is not supported when watch is true. Clients may start a watch from the last resourceVersion value returned by the server and not miss any modifications.\n :param str field_selector: A selector to restrict the list of returned objects by their fields. Defaults to everything.\n :param str label_selector: A selector to restrict the list of returned objects by their labels. Defaults to everything.\n :param int limit: limit is a maximum number of responses to return for a list call. If more items exist, the server will set the `continue` field on the list metadata to a value that can be used with the same initial query to retrieve the next set of results. Setting a limit may return fewer than the requested amount of items (up to zero items) in the event all requested objects are filtered out and clients should only use the presence of the continue field to determine whether more results are available. Servers may choose not to support the limit argument and will return all of the available results. If limit is specified and the continue field is empty, clients may assume that no more results are available. This field is not supported if watch is true. The server guarantees that the objects returned when using continue will be identical to issuing a single list call without a limit - that is, no objects created, modified, or deleted after the first request is issued will be included in any subsequent continued requests. This is sometimes referred to as a consistent snapshot, and ensures that a client that is using limit to receive smaller chunks of a very large result can ensure they see all possible objects. If objects are updated during a chunked list the version of the object that was present at the time the first list result was calculated is returned.\n :param str resource_version: resourceVersion sets a constraint on what resource versions a request may be served from. See https://kubernetes.io/docs/reference/using-api/api-concepts/#resource-versions for details. Defaults to unset\n :param str resource_version_match: resourceVersionMatch determines how resourceVersion is applied to list calls. It is highly recommended that resourceVersionMatch be set for list calls where resourceVersion is set See https://kubernetes.io/docs/reference/using-api/api-concepts/#resource-versions for details. Defaults to unset\n :param int timeout_seconds: Timeout for the list/watch call. This limits the duration of the call, regardless of any activity or inactivity.\n :param bool watch: Watch for changes to the described resources and return them as a stream of add, update, and remove notifications. Specify resourceVersion.\n :param _preload_content: if False, the urllib3.HTTPResponse object will\n be returned without reading/decoding response\n data. Default is True.\n :param _request_timeout: timeout setting for this request. If one\n number provided, it will be total request\n timeout. It can also be a pair (tuple) of\n (connection, read) timeouts.\n :return: V1JobList\n If the method is called asynchronously,\n returns the request thread.\n ' kwargs['_return_http_data_only'] = True return self.list_namespaced_job_with_http_info(namespace, **kwargs)<|docstring|>list_namespaced_job # noqa: E501 list or watch objects of kind Job # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True >>> thread = api.list_namespaced_job(namespace, async_req=True) >>> result = thread.get() :param async_req bool: execute request asynchronously :param str namespace: object name and auth scope, such as for teams and projects (required) :param str pretty: If 'true', then the output is pretty printed. :param bool allow_watch_bookmarks: allowWatchBookmarks requests watch events with type "BOOKMARK". Servers that do not implement bookmarks may ignore this flag and bookmarks are sent at the server's discretion. Clients should not assume bookmarks are returned at any specific interval, nor may they assume the server will send any BOOKMARK event during a session. If this is not a watch, this field is ignored. :param str _continue: The continue option should be set when retrieving more results from the server. Since this value is server defined, clients may only use the continue value from a previous query result with identical query parameters (except for the value of continue) and the server may reject a continue value it does not recognize. If the specified continue value is no longer valid whether due to expiration (generally five to fifteen minutes) or a configuration change on the server, the server will respond with a 410 ResourceExpired error together with a continue token. If the client needs a consistent list, it must restart their list without the continue field. Otherwise, the client may send another list request with the token received with the 410 error, the server will respond with a list starting from the next key, but from the latest snapshot, which is inconsistent from the previous list results - objects that are created, modified, or deleted after the first list request will be included in the response, as long as their keys are after the "next key". This field is not supported when watch is true. Clients may start a watch from the last resourceVersion value returned by the server and not miss any modifications. :param str field_selector: A selector to restrict the list of returned objects by their fields. Defaults to everything. :param str label_selector: A selector to restrict the list of returned objects by their labels. Defaults to everything. :param int limit: limit is a maximum number of responses to return for a list call. If more items exist, the server will set the `continue` field on the list metadata to a value that can be used with the same initial query to retrieve the next set of results. Setting a limit may return fewer than the requested amount of items (up to zero items) in the event all requested objects are filtered out and clients should only use the presence of the continue field to determine whether more results are available. Servers may choose not to support the limit argument and will return all of the available results. If limit is specified and the continue field is empty, clients may assume that no more results are available. This field is not supported if watch is true. The server guarantees that the objects returned when using continue will be identical to issuing a single list call without a limit - that is, no objects created, modified, or deleted after the first request is issued will be included in any subsequent continued requests. This is sometimes referred to as a consistent snapshot, and ensures that a client that is using limit to receive smaller chunks of a very large result can ensure they see all possible objects. If objects are updated during a chunked list the version of the object that was present at the time the first list result was calculated is returned. :param str resource_version: resourceVersion sets a constraint on what resource versions a request may be served from. See https://kubernetes.io/docs/reference/using-api/api-concepts/#resource-versions for details. Defaults to unset :param str resource_version_match: resourceVersionMatch determines how resourceVersion is applied to list calls. It is highly recommended that resourceVersionMatch be set for list calls where resourceVersion is set See https://kubernetes.io/docs/reference/using-api/api-concepts/#resource-versions for details. Defaults to unset :param int timeout_seconds: Timeout for the list/watch call. This limits the duration of the call, regardless of any activity or inactivity. :param bool watch: Watch for changes to the described resources and return them as a stream of add, update, and remove notifications. Specify resourceVersion. :param _preload_content: if False, the urllib3.HTTPResponse object will be returned without reading/decoding response data. Default is True. :param _request_timeout: timeout setting for this request. If one number provided, it will be total request timeout. It can also be a pair (tuple) of (connection, read) timeouts. :return: V1JobList If the method is called asynchronously, returns the request thread.<|endoftext|>
40d859151ea5b892cc0887a7dd7f871df61879a19c5a896d3f0e90ec646e06d1
def list_namespaced_job_with_http_info(self, namespace, **kwargs): 'list_namespaced_job # noqa: E501\n\n list or watch objects of kind Job # noqa: E501\n This method makes a synchronous HTTP request by default. To make an\n asynchronous HTTP request, please pass async_req=True\n >>> thread = api.list_namespaced_job_with_http_info(namespace, async_req=True)\n >>> result = thread.get()\n\n :param async_req bool: execute request asynchronously\n :param str namespace: object name and auth scope, such as for teams and projects (required)\n :param str pretty: If \'true\', then the output is pretty printed.\n :param bool allow_watch_bookmarks: allowWatchBookmarks requests watch events with type "BOOKMARK". Servers that do not implement bookmarks may ignore this flag and bookmarks are sent at the server\'s discretion. Clients should not assume bookmarks are returned at any specific interval, nor may they assume the server will send any BOOKMARK event during a session. If this is not a watch, this field is ignored.\n :param str _continue: The continue option should be set when retrieving more results from the server. Since this value is server defined, clients may only use the continue value from a previous query result with identical query parameters (except for the value of continue) and the server may reject a continue value it does not recognize. If the specified continue value is no longer valid whether due to expiration (generally five to fifteen minutes) or a configuration change on the server, the server will respond with a 410 ResourceExpired error together with a continue token. If the client needs a consistent list, it must restart their list without the continue field. Otherwise, the client may send another list request with the token received with the 410 error, the server will respond with a list starting from the next key, but from the latest snapshot, which is inconsistent from the previous list results - objects that are created, modified, or deleted after the first list request will be included in the response, as long as their keys are after the "next key". This field is not supported when watch is true. Clients may start a watch from the last resourceVersion value returned by the server and not miss any modifications.\n :param str field_selector: A selector to restrict the list of returned objects by their fields. Defaults to everything.\n :param str label_selector: A selector to restrict the list of returned objects by their labels. Defaults to everything.\n :param int limit: limit is a maximum number of responses to return for a list call. If more items exist, the server will set the `continue` field on the list metadata to a value that can be used with the same initial query to retrieve the next set of results. Setting a limit may return fewer than the requested amount of items (up to zero items) in the event all requested objects are filtered out and clients should only use the presence of the continue field to determine whether more results are available. Servers may choose not to support the limit argument and will return all of the available results. If limit is specified and the continue field is empty, clients may assume that no more results are available. This field is not supported if watch is true. The server guarantees that the objects returned when using continue will be identical to issuing a single list call without a limit - that is, no objects created, modified, or deleted after the first request is issued will be included in any subsequent continued requests. This is sometimes referred to as a consistent snapshot, and ensures that a client that is using limit to receive smaller chunks of a very large result can ensure they see all possible objects. If objects are updated during a chunked list the version of the object that was present at the time the first list result was calculated is returned.\n :param str resource_version: resourceVersion sets a constraint on what resource versions a request may be served from. See https://kubernetes.io/docs/reference/using-api/api-concepts/#resource-versions for details. Defaults to unset\n :param str resource_version_match: resourceVersionMatch determines how resourceVersion is applied to list calls. It is highly recommended that resourceVersionMatch be set for list calls where resourceVersion is set See https://kubernetes.io/docs/reference/using-api/api-concepts/#resource-versions for details. Defaults to unset\n :param int timeout_seconds: Timeout for the list/watch call. This limits the duration of the call, regardless of any activity or inactivity.\n :param bool watch: Watch for changes to the described resources and return them as a stream of add, update, and remove notifications. Specify resourceVersion.\n :param _return_http_data_only: response data without head status code\n and headers\n :param _preload_content: if False, the urllib3.HTTPResponse object will\n be returned without reading/decoding response\n data. Default is True.\n :param _request_timeout: timeout setting for this request. If one\n number provided, it will be total request\n timeout. It can also be a pair (tuple) of\n (connection, read) timeouts.\n :return: tuple(V1JobList, status_code(int), headers(HTTPHeaderDict))\n If the method is called asynchronously,\n returns the request thread.\n ' local_var_params = locals() all_params = ['namespace', 'pretty', 'allow_watch_bookmarks', '_continue', 'field_selector', 'label_selector', 'limit', 'resource_version', 'resource_version_match', 'timeout_seconds', 'watch'] all_params.extend(['async_req', '_return_http_data_only', '_preload_content', '_request_timeout']) for (key, val) in six.iteritems(local_var_params['kwargs']): if (key not in all_params): raise ApiTypeError(("Got an unexpected keyword argument '%s' to method list_namespaced_job" % key)) local_var_params[key] = val del local_var_params['kwargs'] if (self.api_client.client_side_validation and (('namespace' not in local_var_params) or (local_var_params['namespace'] is None))): raise ApiValueError('Missing the required parameter `namespace` when calling `list_namespaced_job`') collection_formats = {} path_params = {} if ('namespace' in local_var_params): path_params['namespace'] = local_var_params['namespace'] query_params = [] if (('pretty' in local_var_params) and (local_var_params['pretty'] is not None)): query_params.append(('pretty', local_var_params['pretty'])) if (('allow_watch_bookmarks' in local_var_params) and (local_var_params['allow_watch_bookmarks'] is not None)): query_params.append(('allowWatchBookmarks', local_var_params['allow_watch_bookmarks'])) if (('_continue' in local_var_params) and (local_var_params['_continue'] is not None)): query_params.append(('continue', local_var_params['_continue'])) if (('field_selector' in local_var_params) and (local_var_params['field_selector'] is not None)): query_params.append(('fieldSelector', local_var_params['field_selector'])) if (('label_selector' in local_var_params) and (local_var_params['label_selector'] is not None)): query_params.append(('labelSelector', local_var_params['label_selector'])) if (('limit' in local_var_params) and (local_var_params['limit'] is not None)): query_params.append(('limit', local_var_params['limit'])) if (('resource_version' in local_var_params) and (local_var_params['resource_version'] is not None)): query_params.append(('resourceVersion', local_var_params['resource_version'])) if (('resource_version_match' in local_var_params) and (local_var_params['resource_version_match'] is not None)): query_params.append(('resourceVersionMatch', local_var_params['resource_version_match'])) if (('timeout_seconds' in local_var_params) and (local_var_params['timeout_seconds'] is not None)): query_params.append(('timeoutSeconds', local_var_params['timeout_seconds'])) if (('watch' in local_var_params) and (local_var_params['watch'] is not None)): query_params.append(('watch', local_var_params['watch'])) header_params = {} form_params = [] local_var_files = {} body_params = None header_params['Accept'] = self.api_client.select_header_accept(['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf', 'application/json;stream=watch', 'application/vnd.kubernetes.protobuf;stream=watch']) auth_settings = ['BearerToken'] return self.api_client.call_api('/apis/batch/v1/namespaces/{namespace}/jobs', 'GET', path_params, query_params, header_params, body=body_params, post_params=form_params, files=local_var_files, response_type='V1JobList', auth_settings=auth_settings, async_req=local_var_params.get('async_req'), _return_http_data_only=local_var_params.get('_return_http_data_only'), _preload_content=local_var_params.get('_preload_content', True), _request_timeout=local_var_params.get('_request_timeout'), collection_formats=collection_formats)
list_namespaced_job # noqa: E501 list or watch objects of kind Job # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True >>> thread = api.list_namespaced_job_with_http_info(namespace, async_req=True) >>> result = thread.get() :param async_req bool: execute request asynchronously :param str namespace: object name and auth scope, such as for teams and projects (required) :param str pretty: If 'true', then the output is pretty printed. :param bool allow_watch_bookmarks: allowWatchBookmarks requests watch events with type "BOOKMARK". Servers that do not implement bookmarks may ignore this flag and bookmarks are sent at the server's discretion. Clients should not assume bookmarks are returned at any specific interval, nor may they assume the server will send any BOOKMARK event during a session. If this is not a watch, this field is ignored. :param str _continue: The continue option should be set when retrieving more results from the server. Since this value is server defined, clients may only use the continue value from a previous query result with identical query parameters (except for the value of continue) and the server may reject a continue value it does not recognize. If the specified continue value is no longer valid whether due to expiration (generally five to fifteen minutes) or a configuration change on the server, the server will respond with a 410 ResourceExpired error together with a continue token. If the client needs a consistent list, it must restart their list without the continue field. Otherwise, the client may send another list request with the token received with the 410 error, the server will respond with a list starting from the next key, but from the latest snapshot, which is inconsistent from the previous list results - objects that are created, modified, or deleted after the first list request will be included in the response, as long as their keys are after the "next key". This field is not supported when watch is true. Clients may start a watch from the last resourceVersion value returned by the server and not miss any modifications. :param str field_selector: A selector to restrict the list of returned objects by their fields. Defaults to everything. :param str label_selector: A selector to restrict the list of returned objects by their labels. Defaults to everything. :param int limit: limit is a maximum number of responses to return for a list call. If more items exist, the server will set the `continue` field on the list metadata to a value that can be used with the same initial query to retrieve the next set of results. Setting a limit may return fewer than the requested amount of items (up to zero items) in the event all requested objects are filtered out and clients should only use the presence of the continue field to determine whether more results are available. Servers may choose not to support the limit argument and will return all of the available results. If limit is specified and the continue field is empty, clients may assume that no more results are available. This field is not supported if watch is true. The server guarantees that the objects returned when using continue will be identical to issuing a single list call without a limit - that is, no objects created, modified, or deleted after the first request is issued will be included in any subsequent continued requests. This is sometimes referred to as a consistent snapshot, and ensures that a client that is using limit to receive smaller chunks of a very large result can ensure they see all possible objects. If objects are updated during a chunked list the version of the object that was present at the time the first list result was calculated is returned. :param str resource_version: resourceVersion sets a constraint on what resource versions a request may be served from. See https://kubernetes.io/docs/reference/using-api/api-concepts/#resource-versions for details. Defaults to unset :param str resource_version_match: resourceVersionMatch determines how resourceVersion is applied to list calls. It is highly recommended that resourceVersionMatch be set for list calls where resourceVersion is set See https://kubernetes.io/docs/reference/using-api/api-concepts/#resource-versions for details. Defaults to unset :param int timeout_seconds: Timeout for the list/watch call. This limits the duration of the call, regardless of any activity or inactivity. :param bool watch: Watch for changes to the described resources and return them as a stream of add, update, and remove notifications. Specify resourceVersion. :param _return_http_data_only: response data without head status code and headers :param _preload_content: if False, the urllib3.HTTPResponse object will be returned without reading/decoding response data. Default is True. :param _request_timeout: timeout setting for this request. If one number provided, it will be total request timeout. It can also be a pair (tuple) of (connection, read) timeouts. :return: tuple(V1JobList, status_code(int), headers(HTTPHeaderDict)) If the method is called asynchronously, returns the request thread.
kubernetes/client/api/batch_v1_api.py
list_namespaced_job_with_http_info
knkgun/python
1
python
def list_namespaced_job_with_http_info(self, namespace, **kwargs): 'list_namespaced_job # noqa: E501\n\n list or watch objects of kind Job # noqa: E501\n This method makes a synchronous HTTP request by default. To make an\n asynchronous HTTP request, please pass async_req=True\n >>> thread = api.list_namespaced_job_with_http_info(namespace, async_req=True)\n >>> result = thread.get()\n\n :param async_req bool: execute request asynchronously\n :param str namespace: object name and auth scope, such as for teams and projects (required)\n :param str pretty: If \'true\', then the output is pretty printed.\n :param bool allow_watch_bookmarks: allowWatchBookmarks requests watch events with type "BOOKMARK". Servers that do not implement bookmarks may ignore this flag and bookmarks are sent at the server\'s discretion. Clients should not assume bookmarks are returned at any specific interval, nor may they assume the server will send any BOOKMARK event during a session. If this is not a watch, this field is ignored.\n :param str _continue: The continue option should be set when retrieving more results from the server. Since this value is server defined, clients may only use the continue value from a previous query result with identical query parameters (except for the value of continue) and the server may reject a continue value it does not recognize. If the specified continue value is no longer valid whether due to expiration (generally five to fifteen minutes) or a configuration change on the server, the server will respond with a 410 ResourceExpired error together with a continue token. If the client needs a consistent list, it must restart their list without the continue field. Otherwise, the client may send another list request with the token received with the 410 error, the server will respond with a list starting from the next key, but from the latest snapshot, which is inconsistent from the previous list results - objects that are created, modified, or deleted after the first list request will be included in the response, as long as their keys are after the "next key". This field is not supported when watch is true. Clients may start a watch from the last resourceVersion value returned by the server and not miss any modifications.\n :param str field_selector: A selector to restrict the list of returned objects by their fields. Defaults to everything.\n :param str label_selector: A selector to restrict the list of returned objects by their labels. Defaults to everything.\n :param int limit: limit is a maximum number of responses to return for a list call. If more items exist, the server will set the `continue` field on the list metadata to a value that can be used with the same initial query to retrieve the next set of results. Setting a limit may return fewer than the requested amount of items (up to zero items) in the event all requested objects are filtered out and clients should only use the presence of the continue field to determine whether more results are available. Servers may choose not to support the limit argument and will return all of the available results. If limit is specified and the continue field is empty, clients may assume that no more results are available. This field is not supported if watch is true. The server guarantees that the objects returned when using continue will be identical to issuing a single list call without a limit - that is, no objects created, modified, or deleted after the first request is issued will be included in any subsequent continued requests. This is sometimes referred to as a consistent snapshot, and ensures that a client that is using limit to receive smaller chunks of a very large result can ensure they see all possible objects. If objects are updated during a chunked list the version of the object that was present at the time the first list result was calculated is returned.\n :param str resource_version: resourceVersion sets a constraint on what resource versions a request may be served from. See https://kubernetes.io/docs/reference/using-api/api-concepts/#resource-versions for details. Defaults to unset\n :param str resource_version_match: resourceVersionMatch determines how resourceVersion is applied to list calls. It is highly recommended that resourceVersionMatch be set for list calls where resourceVersion is set See https://kubernetes.io/docs/reference/using-api/api-concepts/#resource-versions for details. Defaults to unset\n :param int timeout_seconds: Timeout for the list/watch call. This limits the duration of the call, regardless of any activity or inactivity.\n :param bool watch: Watch for changes to the described resources and return them as a stream of add, update, and remove notifications. Specify resourceVersion.\n :param _return_http_data_only: response data without head status code\n and headers\n :param _preload_content: if False, the urllib3.HTTPResponse object will\n be returned without reading/decoding response\n data. Default is True.\n :param _request_timeout: timeout setting for this request. If one\n number provided, it will be total request\n timeout. It can also be a pair (tuple) of\n (connection, read) timeouts.\n :return: tuple(V1JobList, status_code(int), headers(HTTPHeaderDict))\n If the method is called asynchronously,\n returns the request thread.\n ' local_var_params = locals() all_params = ['namespace', 'pretty', 'allow_watch_bookmarks', '_continue', 'field_selector', 'label_selector', 'limit', 'resource_version', 'resource_version_match', 'timeout_seconds', 'watch'] all_params.extend(['async_req', '_return_http_data_only', '_preload_content', '_request_timeout']) for (key, val) in six.iteritems(local_var_params['kwargs']): if (key not in all_params): raise ApiTypeError(("Got an unexpected keyword argument '%s' to method list_namespaced_job" % key)) local_var_params[key] = val del local_var_params['kwargs'] if (self.api_client.client_side_validation and (('namespace' not in local_var_params) or (local_var_params['namespace'] is None))): raise ApiValueError('Missing the required parameter `namespace` when calling `list_namespaced_job`') collection_formats = {} path_params = {} if ('namespace' in local_var_params): path_params['namespace'] = local_var_params['namespace'] query_params = [] if (('pretty' in local_var_params) and (local_var_params['pretty'] is not None)): query_params.append(('pretty', local_var_params['pretty'])) if (('allow_watch_bookmarks' in local_var_params) and (local_var_params['allow_watch_bookmarks'] is not None)): query_params.append(('allowWatchBookmarks', local_var_params['allow_watch_bookmarks'])) if (('_continue' in local_var_params) and (local_var_params['_continue'] is not None)): query_params.append(('continue', local_var_params['_continue'])) if (('field_selector' in local_var_params) and (local_var_params['field_selector'] is not None)): query_params.append(('fieldSelector', local_var_params['field_selector'])) if (('label_selector' in local_var_params) and (local_var_params['label_selector'] is not None)): query_params.append(('labelSelector', local_var_params['label_selector'])) if (('limit' in local_var_params) and (local_var_params['limit'] is not None)): query_params.append(('limit', local_var_params['limit'])) if (('resource_version' in local_var_params) and (local_var_params['resource_version'] is not None)): query_params.append(('resourceVersion', local_var_params['resource_version'])) if (('resource_version_match' in local_var_params) and (local_var_params['resource_version_match'] is not None)): query_params.append(('resourceVersionMatch', local_var_params['resource_version_match'])) if (('timeout_seconds' in local_var_params) and (local_var_params['timeout_seconds'] is not None)): query_params.append(('timeoutSeconds', local_var_params['timeout_seconds'])) if (('watch' in local_var_params) and (local_var_params['watch'] is not None)): query_params.append(('watch', local_var_params['watch'])) header_params = {} form_params = [] local_var_files = {} body_params = None header_params['Accept'] = self.api_client.select_header_accept(['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf', 'application/json;stream=watch', 'application/vnd.kubernetes.protobuf;stream=watch']) auth_settings = ['BearerToken'] return self.api_client.call_api('/apis/batch/v1/namespaces/{namespace}/jobs', 'GET', path_params, query_params, header_params, body=body_params, post_params=form_params, files=local_var_files, response_type='V1JobList', auth_settings=auth_settings, async_req=local_var_params.get('async_req'), _return_http_data_only=local_var_params.get('_return_http_data_only'), _preload_content=local_var_params.get('_preload_content', True), _request_timeout=local_var_params.get('_request_timeout'), collection_formats=collection_formats)
def list_namespaced_job_with_http_info(self, namespace, **kwargs): 'list_namespaced_job # noqa: E501\n\n list or watch objects of kind Job # noqa: E501\n This method makes a synchronous HTTP request by default. To make an\n asynchronous HTTP request, please pass async_req=True\n >>> thread = api.list_namespaced_job_with_http_info(namespace, async_req=True)\n >>> result = thread.get()\n\n :param async_req bool: execute request asynchronously\n :param str namespace: object name and auth scope, such as for teams and projects (required)\n :param str pretty: If \'true\', then the output is pretty printed.\n :param bool allow_watch_bookmarks: allowWatchBookmarks requests watch events with type "BOOKMARK". Servers that do not implement bookmarks may ignore this flag and bookmarks are sent at the server\'s discretion. Clients should not assume bookmarks are returned at any specific interval, nor may they assume the server will send any BOOKMARK event during a session. If this is not a watch, this field is ignored.\n :param str _continue: The continue option should be set when retrieving more results from the server. Since this value is server defined, clients may only use the continue value from a previous query result with identical query parameters (except for the value of continue) and the server may reject a continue value it does not recognize. If the specified continue value is no longer valid whether due to expiration (generally five to fifteen minutes) or a configuration change on the server, the server will respond with a 410 ResourceExpired error together with a continue token. If the client needs a consistent list, it must restart their list without the continue field. Otherwise, the client may send another list request with the token received with the 410 error, the server will respond with a list starting from the next key, but from the latest snapshot, which is inconsistent from the previous list results - objects that are created, modified, or deleted after the first list request will be included in the response, as long as their keys are after the "next key". This field is not supported when watch is true. Clients may start a watch from the last resourceVersion value returned by the server and not miss any modifications.\n :param str field_selector: A selector to restrict the list of returned objects by their fields. Defaults to everything.\n :param str label_selector: A selector to restrict the list of returned objects by their labels. Defaults to everything.\n :param int limit: limit is a maximum number of responses to return for a list call. If more items exist, the server will set the `continue` field on the list metadata to a value that can be used with the same initial query to retrieve the next set of results. Setting a limit may return fewer than the requested amount of items (up to zero items) in the event all requested objects are filtered out and clients should only use the presence of the continue field to determine whether more results are available. Servers may choose not to support the limit argument and will return all of the available results. If limit is specified and the continue field is empty, clients may assume that no more results are available. This field is not supported if watch is true. The server guarantees that the objects returned when using continue will be identical to issuing a single list call without a limit - that is, no objects created, modified, or deleted after the first request is issued will be included in any subsequent continued requests. This is sometimes referred to as a consistent snapshot, and ensures that a client that is using limit to receive smaller chunks of a very large result can ensure they see all possible objects. If objects are updated during a chunked list the version of the object that was present at the time the first list result was calculated is returned.\n :param str resource_version: resourceVersion sets a constraint on what resource versions a request may be served from. See https://kubernetes.io/docs/reference/using-api/api-concepts/#resource-versions for details. Defaults to unset\n :param str resource_version_match: resourceVersionMatch determines how resourceVersion is applied to list calls. It is highly recommended that resourceVersionMatch be set for list calls where resourceVersion is set See https://kubernetes.io/docs/reference/using-api/api-concepts/#resource-versions for details. Defaults to unset\n :param int timeout_seconds: Timeout for the list/watch call. This limits the duration of the call, regardless of any activity or inactivity.\n :param bool watch: Watch for changes to the described resources and return them as a stream of add, update, and remove notifications. Specify resourceVersion.\n :param _return_http_data_only: response data without head status code\n and headers\n :param _preload_content: if False, the urllib3.HTTPResponse object will\n be returned without reading/decoding response\n data. Default is True.\n :param _request_timeout: timeout setting for this request. If one\n number provided, it will be total request\n timeout. It can also be a pair (tuple) of\n (connection, read) timeouts.\n :return: tuple(V1JobList, status_code(int), headers(HTTPHeaderDict))\n If the method is called asynchronously,\n returns the request thread.\n ' local_var_params = locals() all_params = ['namespace', 'pretty', 'allow_watch_bookmarks', '_continue', 'field_selector', 'label_selector', 'limit', 'resource_version', 'resource_version_match', 'timeout_seconds', 'watch'] all_params.extend(['async_req', '_return_http_data_only', '_preload_content', '_request_timeout']) for (key, val) in six.iteritems(local_var_params['kwargs']): if (key not in all_params): raise ApiTypeError(("Got an unexpected keyword argument '%s' to method list_namespaced_job" % key)) local_var_params[key] = val del local_var_params['kwargs'] if (self.api_client.client_side_validation and (('namespace' not in local_var_params) or (local_var_params['namespace'] is None))): raise ApiValueError('Missing the required parameter `namespace` when calling `list_namespaced_job`') collection_formats = {} path_params = {} if ('namespace' in local_var_params): path_params['namespace'] = local_var_params['namespace'] query_params = [] if (('pretty' in local_var_params) and (local_var_params['pretty'] is not None)): query_params.append(('pretty', local_var_params['pretty'])) if (('allow_watch_bookmarks' in local_var_params) and (local_var_params['allow_watch_bookmarks'] is not None)): query_params.append(('allowWatchBookmarks', local_var_params['allow_watch_bookmarks'])) if (('_continue' in local_var_params) and (local_var_params['_continue'] is not None)): query_params.append(('continue', local_var_params['_continue'])) if (('field_selector' in local_var_params) and (local_var_params['field_selector'] is not None)): query_params.append(('fieldSelector', local_var_params['field_selector'])) if (('label_selector' in local_var_params) and (local_var_params['label_selector'] is not None)): query_params.append(('labelSelector', local_var_params['label_selector'])) if (('limit' in local_var_params) and (local_var_params['limit'] is not None)): query_params.append(('limit', local_var_params['limit'])) if (('resource_version' in local_var_params) and (local_var_params['resource_version'] is not None)): query_params.append(('resourceVersion', local_var_params['resource_version'])) if (('resource_version_match' in local_var_params) and (local_var_params['resource_version_match'] is not None)): query_params.append(('resourceVersionMatch', local_var_params['resource_version_match'])) if (('timeout_seconds' in local_var_params) and (local_var_params['timeout_seconds'] is not None)): query_params.append(('timeoutSeconds', local_var_params['timeout_seconds'])) if (('watch' in local_var_params) and (local_var_params['watch'] is not None)): query_params.append(('watch', local_var_params['watch'])) header_params = {} form_params = [] local_var_files = {} body_params = None header_params['Accept'] = self.api_client.select_header_accept(['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf', 'application/json;stream=watch', 'application/vnd.kubernetes.protobuf;stream=watch']) auth_settings = ['BearerToken'] return self.api_client.call_api('/apis/batch/v1/namespaces/{namespace}/jobs', 'GET', path_params, query_params, header_params, body=body_params, post_params=form_params, files=local_var_files, response_type='V1JobList', auth_settings=auth_settings, async_req=local_var_params.get('async_req'), _return_http_data_only=local_var_params.get('_return_http_data_only'), _preload_content=local_var_params.get('_preload_content', True), _request_timeout=local_var_params.get('_request_timeout'), collection_formats=collection_formats)<|docstring|>list_namespaced_job # noqa: E501 list or watch objects of kind Job # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True >>> thread = api.list_namespaced_job_with_http_info(namespace, async_req=True) >>> result = thread.get() :param async_req bool: execute request asynchronously :param str namespace: object name and auth scope, such as for teams and projects (required) :param str pretty: If 'true', then the output is pretty printed. :param bool allow_watch_bookmarks: allowWatchBookmarks requests watch events with type "BOOKMARK". Servers that do not implement bookmarks may ignore this flag and bookmarks are sent at the server's discretion. Clients should not assume bookmarks are returned at any specific interval, nor may they assume the server will send any BOOKMARK event during a session. If this is not a watch, this field is ignored. :param str _continue: The continue option should be set when retrieving more results from the server. Since this value is server defined, clients may only use the continue value from a previous query result with identical query parameters (except for the value of continue) and the server may reject a continue value it does not recognize. If the specified continue value is no longer valid whether due to expiration (generally five to fifteen minutes) or a configuration change on the server, the server will respond with a 410 ResourceExpired error together with a continue token. If the client needs a consistent list, it must restart their list without the continue field. Otherwise, the client may send another list request with the token received with the 410 error, the server will respond with a list starting from the next key, but from the latest snapshot, which is inconsistent from the previous list results - objects that are created, modified, or deleted after the first list request will be included in the response, as long as their keys are after the "next key". This field is not supported when watch is true. Clients may start a watch from the last resourceVersion value returned by the server and not miss any modifications. :param str field_selector: A selector to restrict the list of returned objects by their fields. Defaults to everything. :param str label_selector: A selector to restrict the list of returned objects by their labels. Defaults to everything. :param int limit: limit is a maximum number of responses to return for a list call. If more items exist, the server will set the `continue` field on the list metadata to a value that can be used with the same initial query to retrieve the next set of results. Setting a limit may return fewer than the requested amount of items (up to zero items) in the event all requested objects are filtered out and clients should only use the presence of the continue field to determine whether more results are available. Servers may choose not to support the limit argument and will return all of the available results. If limit is specified and the continue field is empty, clients may assume that no more results are available. This field is not supported if watch is true. The server guarantees that the objects returned when using continue will be identical to issuing a single list call without a limit - that is, no objects created, modified, or deleted after the first request is issued will be included in any subsequent continued requests. This is sometimes referred to as a consistent snapshot, and ensures that a client that is using limit to receive smaller chunks of a very large result can ensure they see all possible objects. If objects are updated during a chunked list the version of the object that was present at the time the first list result was calculated is returned. :param str resource_version: resourceVersion sets a constraint on what resource versions a request may be served from. See https://kubernetes.io/docs/reference/using-api/api-concepts/#resource-versions for details. Defaults to unset :param str resource_version_match: resourceVersionMatch determines how resourceVersion is applied to list calls. It is highly recommended that resourceVersionMatch be set for list calls where resourceVersion is set See https://kubernetes.io/docs/reference/using-api/api-concepts/#resource-versions for details. Defaults to unset :param int timeout_seconds: Timeout for the list/watch call. This limits the duration of the call, regardless of any activity or inactivity. :param bool watch: Watch for changes to the described resources and return them as a stream of add, update, and remove notifications. Specify resourceVersion. :param _return_http_data_only: response data without head status code and headers :param _preload_content: if False, the urllib3.HTTPResponse object will be returned without reading/decoding response data. Default is True. :param _request_timeout: timeout setting for this request. If one number provided, it will be total request timeout. It can also be a pair (tuple) of (connection, read) timeouts. :return: tuple(V1JobList, status_code(int), headers(HTTPHeaderDict)) If the method is called asynchronously, returns the request thread.<|endoftext|>
de110aa11cd87b6ae526ad952f4919260ecd9cde392d5a046e549d8b8d3fa640
def patch_namespaced_cron_job(self, name, namespace, body, **kwargs): 'patch_namespaced_cron_job # noqa: E501\n\n partially update the specified CronJob # noqa: E501\n This method makes a synchronous HTTP request by default. To make an\n asynchronous HTTP request, please pass async_req=True\n >>> thread = api.patch_namespaced_cron_job(name, namespace, body, async_req=True)\n >>> result = thread.get()\n\n :param async_req bool: execute request asynchronously\n :param str name: name of the CronJob (required)\n :param str namespace: object name and auth scope, such as for teams and projects (required)\n :param object body: (required)\n :param str pretty: If \'true\', then the output is pretty printed.\n :param str dry_run: When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed\n :param str field_manager: fieldManager is a name associated with the actor or entity that is making these changes. The value must be less than or 128 characters long, and only contain printable characters, as defined by https://golang.org/pkg/unicode/#IsPrint. This field is required for apply requests (application/apply-patch) but optional for non-apply patch types (JsonPatch, MergePatch, StrategicMergePatch).\n :param bool force: Force is going to "force" Apply requests. It means user will re-acquire conflicting fields owned by other people. Force flag must be unset for non-apply patch requests.\n :param _preload_content: if False, the urllib3.HTTPResponse object will\n be returned without reading/decoding response\n data. Default is True.\n :param _request_timeout: timeout setting for this request. If one\n number provided, it will be total request\n timeout. It can also be a pair (tuple) of\n (connection, read) timeouts.\n :return: V1CronJob\n If the method is called asynchronously,\n returns the request thread.\n ' kwargs['_return_http_data_only'] = True return self.patch_namespaced_cron_job_with_http_info(name, namespace, body, **kwargs)
patch_namespaced_cron_job # noqa: E501 partially update the specified CronJob # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True >>> thread = api.patch_namespaced_cron_job(name, namespace, body, async_req=True) >>> result = thread.get() :param async_req bool: execute request asynchronously :param str name: name of the CronJob (required) :param str namespace: object name and auth scope, such as for teams and projects (required) :param object body: (required) :param str pretty: If 'true', then the output is pretty printed. :param str dry_run: When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed :param str field_manager: fieldManager is a name associated with the actor or entity that is making these changes. The value must be less than or 128 characters long, and only contain printable characters, as defined by https://golang.org/pkg/unicode/#IsPrint. This field is required for apply requests (application/apply-patch) but optional for non-apply patch types (JsonPatch, MergePatch, StrategicMergePatch). :param bool force: Force is going to "force" Apply requests. It means user will re-acquire conflicting fields owned by other people. Force flag must be unset for non-apply patch requests. :param _preload_content: if False, the urllib3.HTTPResponse object will be returned without reading/decoding response data. Default is True. :param _request_timeout: timeout setting for this request. If one number provided, it will be total request timeout. It can also be a pair (tuple) of (connection, read) timeouts. :return: V1CronJob If the method is called asynchronously, returns the request thread.
kubernetes/client/api/batch_v1_api.py
patch_namespaced_cron_job
knkgun/python
1
python
def patch_namespaced_cron_job(self, name, namespace, body, **kwargs): 'patch_namespaced_cron_job # noqa: E501\n\n partially update the specified CronJob # noqa: E501\n This method makes a synchronous HTTP request by default. To make an\n asynchronous HTTP request, please pass async_req=True\n >>> thread = api.patch_namespaced_cron_job(name, namespace, body, async_req=True)\n >>> result = thread.get()\n\n :param async_req bool: execute request asynchronously\n :param str name: name of the CronJob (required)\n :param str namespace: object name and auth scope, such as for teams and projects (required)\n :param object body: (required)\n :param str pretty: If \'true\', then the output is pretty printed.\n :param str dry_run: When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed\n :param str field_manager: fieldManager is a name associated with the actor or entity that is making these changes. The value must be less than or 128 characters long, and only contain printable characters, as defined by https://golang.org/pkg/unicode/#IsPrint. This field is required for apply requests (application/apply-patch) but optional for non-apply patch types (JsonPatch, MergePatch, StrategicMergePatch).\n :param bool force: Force is going to "force" Apply requests. It means user will re-acquire conflicting fields owned by other people. Force flag must be unset for non-apply patch requests.\n :param _preload_content: if False, the urllib3.HTTPResponse object will\n be returned without reading/decoding response\n data. Default is True.\n :param _request_timeout: timeout setting for this request. If one\n number provided, it will be total request\n timeout. It can also be a pair (tuple) of\n (connection, read) timeouts.\n :return: V1CronJob\n If the method is called asynchronously,\n returns the request thread.\n ' kwargs['_return_http_data_only'] = True return self.patch_namespaced_cron_job_with_http_info(name, namespace, body, **kwargs)
def patch_namespaced_cron_job(self, name, namespace, body, **kwargs): 'patch_namespaced_cron_job # noqa: E501\n\n partially update the specified CronJob # noqa: E501\n This method makes a synchronous HTTP request by default. To make an\n asynchronous HTTP request, please pass async_req=True\n >>> thread = api.patch_namespaced_cron_job(name, namespace, body, async_req=True)\n >>> result = thread.get()\n\n :param async_req bool: execute request asynchronously\n :param str name: name of the CronJob (required)\n :param str namespace: object name and auth scope, such as for teams and projects (required)\n :param object body: (required)\n :param str pretty: If \'true\', then the output is pretty printed.\n :param str dry_run: When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed\n :param str field_manager: fieldManager is a name associated with the actor or entity that is making these changes. The value must be less than or 128 characters long, and only contain printable characters, as defined by https://golang.org/pkg/unicode/#IsPrint. This field is required for apply requests (application/apply-patch) but optional for non-apply patch types (JsonPatch, MergePatch, StrategicMergePatch).\n :param bool force: Force is going to "force" Apply requests. It means user will re-acquire conflicting fields owned by other people. Force flag must be unset for non-apply patch requests.\n :param _preload_content: if False, the urllib3.HTTPResponse object will\n be returned without reading/decoding response\n data. Default is True.\n :param _request_timeout: timeout setting for this request. If one\n number provided, it will be total request\n timeout. It can also be a pair (tuple) of\n (connection, read) timeouts.\n :return: V1CronJob\n If the method is called asynchronously,\n returns the request thread.\n ' kwargs['_return_http_data_only'] = True return self.patch_namespaced_cron_job_with_http_info(name, namespace, body, **kwargs)<|docstring|>patch_namespaced_cron_job # noqa: E501 partially update the specified CronJob # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True >>> thread = api.patch_namespaced_cron_job(name, namespace, body, async_req=True) >>> result = thread.get() :param async_req bool: execute request asynchronously :param str name: name of the CronJob (required) :param str namespace: object name and auth scope, such as for teams and projects (required) :param object body: (required) :param str pretty: If 'true', then the output is pretty printed. :param str dry_run: When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed :param str field_manager: fieldManager is a name associated with the actor or entity that is making these changes. The value must be less than or 128 characters long, and only contain printable characters, as defined by https://golang.org/pkg/unicode/#IsPrint. This field is required for apply requests (application/apply-patch) but optional for non-apply patch types (JsonPatch, MergePatch, StrategicMergePatch). :param bool force: Force is going to "force" Apply requests. It means user will re-acquire conflicting fields owned by other people. Force flag must be unset for non-apply patch requests. :param _preload_content: if False, the urllib3.HTTPResponse object will be returned without reading/decoding response data. Default is True. :param _request_timeout: timeout setting for this request. If one number provided, it will be total request timeout. It can also be a pair (tuple) of (connection, read) timeouts. :return: V1CronJob If the method is called asynchronously, returns the request thread.<|endoftext|>
6bb43a6fb024ca5de8a19ae03f51c6c00274ffce3a3289effa438537a3cefb01
def patch_namespaced_cron_job_with_http_info(self, name, namespace, body, **kwargs): 'patch_namespaced_cron_job # noqa: E501\n\n partially update the specified CronJob # noqa: E501\n This method makes a synchronous HTTP request by default. To make an\n asynchronous HTTP request, please pass async_req=True\n >>> thread = api.patch_namespaced_cron_job_with_http_info(name, namespace, body, async_req=True)\n >>> result = thread.get()\n\n :param async_req bool: execute request asynchronously\n :param str name: name of the CronJob (required)\n :param str namespace: object name and auth scope, such as for teams and projects (required)\n :param object body: (required)\n :param str pretty: If \'true\', then the output is pretty printed.\n :param str dry_run: When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed\n :param str field_manager: fieldManager is a name associated with the actor or entity that is making these changes. The value must be less than or 128 characters long, and only contain printable characters, as defined by https://golang.org/pkg/unicode/#IsPrint. This field is required for apply requests (application/apply-patch) but optional for non-apply patch types (JsonPatch, MergePatch, StrategicMergePatch).\n :param bool force: Force is going to "force" Apply requests. It means user will re-acquire conflicting fields owned by other people. Force flag must be unset for non-apply patch requests.\n :param _return_http_data_only: response data without head status code\n and headers\n :param _preload_content: if False, the urllib3.HTTPResponse object will\n be returned without reading/decoding response\n data. Default is True.\n :param _request_timeout: timeout setting for this request. If one\n number provided, it will be total request\n timeout. It can also be a pair (tuple) of\n (connection, read) timeouts.\n :return: tuple(V1CronJob, status_code(int), headers(HTTPHeaderDict))\n If the method is called asynchronously,\n returns the request thread.\n ' local_var_params = locals() all_params = ['name', 'namespace', 'body', 'pretty', 'dry_run', 'field_manager', 'force'] all_params.extend(['async_req', '_return_http_data_only', '_preload_content', '_request_timeout']) for (key, val) in six.iteritems(local_var_params['kwargs']): if (key not in all_params): raise ApiTypeError(("Got an unexpected keyword argument '%s' to method patch_namespaced_cron_job" % key)) local_var_params[key] = val del local_var_params['kwargs'] if (self.api_client.client_side_validation and (('name' not in local_var_params) or (local_var_params['name'] is None))): raise ApiValueError('Missing the required parameter `name` when calling `patch_namespaced_cron_job`') if (self.api_client.client_side_validation and (('namespace' not in local_var_params) or (local_var_params['namespace'] is None))): raise ApiValueError('Missing the required parameter `namespace` when calling `patch_namespaced_cron_job`') if (self.api_client.client_side_validation and (('body' not in local_var_params) or (local_var_params['body'] is None))): raise ApiValueError('Missing the required parameter `body` when calling `patch_namespaced_cron_job`') collection_formats = {} path_params = {} if ('name' in local_var_params): path_params['name'] = local_var_params['name'] if ('namespace' in local_var_params): path_params['namespace'] = local_var_params['namespace'] query_params = [] if (('pretty' in local_var_params) and (local_var_params['pretty'] is not None)): query_params.append(('pretty', local_var_params['pretty'])) if (('dry_run' in local_var_params) and (local_var_params['dry_run'] is not None)): query_params.append(('dryRun', local_var_params['dry_run'])) if (('field_manager' in local_var_params) and (local_var_params['field_manager'] is not None)): query_params.append(('fieldManager', local_var_params['field_manager'])) if (('force' in local_var_params) and (local_var_params['force'] is not None)): query_params.append(('force', local_var_params['force'])) header_params = {} form_params = [] local_var_files = {} body_params = None if ('body' in local_var_params): body_params = local_var_params['body'] header_params['Accept'] = self.api_client.select_header_accept(['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf']) header_params['Content-Type'] = self.api_client.select_header_content_type(['application/json-patch+json', 'application/merge-patch+json', 'application/strategic-merge-patch+json', 'application/apply-patch+yaml']) auth_settings = ['BearerToken'] return self.api_client.call_api('/apis/batch/v1/namespaces/{namespace}/cronjobs/{name}', 'PATCH', path_params, query_params, header_params, body=body_params, post_params=form_params, files=local_var_files, response_type='V1CronJob', auth_settings=auth_settings, async_req=local_var_params.get('async_req'), _return_http_data_only=local_var_params.get('_return_http_data_only'), _preload_content=local_var_params.get('_preload_content', True), _request_timeout=local_var_params.get('_request_timeout'), collection_formats=collection_formats)
patch_namespaced_cron_job # noqa: E501 partially update the specified CronJob # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True >>> thread = api.patch_namespaced_cron_job_with_http_info(name, namespace, body, async_req=True) >>> result = thread.get() :param async_req bool: execute request asynchronously :param str name: name of the CronJob (required) :param str namespace: object name and auth scope, such as for teams and projects (required) :param object body: (required) :param str pretty: If 'true', then the output is pretty printed. :param str dry_run: When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed :param str field_manager: fieldManager is a name associated with the actor or entity that is making these changes. The value must be less than or 128 characters long, and only contain printable characters, as defined by https://golang.org/pkg/unicode/#IsPrint. This field is required for apply requests (application/apply-patch) but optional for non-apply patch types (JsonPatch, MergePatch, StrategicMergePatch). :param bool force: Force is going to "force" Apply requests. It means user will re-acquire conflicting fields owned by other people. Force flag must be unset for non-apply patch requests. :param _return_http_data_only: response data without head status code and headers :param _preload_content: if False, the urllib3.HTTPResponse object will be returned without reading/decoding response data. Default is True. :param _request_timeout: timeout setting for this request. If one number provided, it will be total request timeout. It can also be a pair (tuple) of (connection, read) timeouts. :return: tuple(V1CronJob, status_code(int), headers(HTTPHeaderDict)) If the method is called asynchronously, returns the request thread.
kubernetes/client/api/batch_v1_api.py
patch_namespaced_cron_job_with_http_info
knkgun/python
1
python
def patch_namespaced_cron_job_with_http_info(self, name, namespace, body, **kwargs): 'patch_namespaced_cron_job # noqa: E501\n\n partially update the specified CronJob # noqa: E501\n This method makes a synchronous HTTP request by default. To make an\n asynchronous HTTP request, please pass async_req=True\n >>> thread = api.patch_namespaced_cron_job_with_http_info(name, namespace, body, async_req=True)\n >>> result = thread.get()\n\n :param async_req bool: execute request asynchronously\n :param str name: name of the CronJob (required)\n :param str namespace: object name and auth scope, such as for teams and projects (required)\n :param object body: (required)\n :param str pretty: If \'true\', then the output is pretty printed.\n :param str dry_run: When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed\n :param str field_manager: fieldManager is a name associated with the actor or entity that is making these changes. The value must be less than or 128 characters long, and only contain printable characters, as defined by https://golang.org/pkg/unicode/#IsPrint. This field is required for apply requests (application/apply-patch) but optional for non-apply patch types (JsonPatch, MergePatch, StrategicMergePatch).\n :param bool force: Force is going to "force" Apply requests. It means user will re-acquire conflicting fields owned by other people. Force flag must be unset for non-apply patch requests.\n :param _return_http_data_only: response data without head status code\n and headers\n :param _preload_content: if False, the urllib3.HTTPResponse object will\n be returned without reading/decoding response\n data. Default is True.\n :param _request_timeout: timeout setting for this request. If one\n number provided, it will be total request\n timeout. It can also be a pair (tuple) of\n (connection, read) timeouts.\n :return: tuple(V1CronJob, status_code(int), headers(HTTPHeaderDict))\n If the method is called asynchronously,\n returns the request thread.\n ' local_var_params = locals() all_params = ['name', 'namespace', 'body', 'pretty', 'dry_run', 'field_manager', 'force'] all_params.extend(['async_req', '_return_http_data_only', '_preload_content', '_request_timeout']) for (key, val) in six.iteritems(local_var_params['kwargs']): if (key not in all_params): raise ApiTypeError(("Got an unexpected keyword argument '%s' to method patch_namespaced_cron_job" % key)) local_var_params[key] = val del local_var_params['kwargs'] if (self.api_client.client_side_validation and (('name' not in local_var_params) or (local_var_params['name'] is None))): raise ApiValueError('Missing the required parameter `name` when calling `patch_namespaced_cron_job`') if (self.api_client.client_side_validation and (('namespace' not in local_var_params) or (local_var_params['namespace'] is None))): raise ApiValueError('Missing the required parameter `namespace` when calling `patch_namespaced_cron_job`') if (self.api_client.client_side_validation and (('body' not in local_var_params) or (local_var_params['body'] is None))): raise ApiValueError('Missing the required parameter `body` when calling `patch_namespaced_cron_job`') collection_formats = {} path_params = {} if ('name' in local_var_params): path_params['name'] = local_var_params['name'] if ('namespace' in local_var_params): path_params['namespace'] = local_var_params['namespace'] query_params = [] if (('pretty' in local_var_params) and (local_var_params['pretty'] is not None)): query_params.append(('pretty', local_var_params['pretty'])) if (('dry_run' in local_var_params) and (local_var_params['dry_run'] is not None)): query_params.append(('dryRun', local_var_params['dry_run'])) if (('field_manager' in local_var_params) and (local_var_params['field_manager'] is not None)): query_params.append(('fieldManager', local_var_params['field_manager'])) if (('force' in local_var_params) and (local_var_params['force'] is not None)): query_params.append(('force', local_var_params['force'])) header_params = {} form_params = [] local_var_files = {} body_params = None if ('body' in local_var_params): body_params = local_var_params['body'] header_params['Accept'] = self.api_client.select_header_accept(['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf']) header_params['Content-Type'] = self.api_client.select_header_content_type(['application/json-patch+json', 'application/merge-patch+json', 'application/strategic-merge-patch+json', 'application/apply-patch+yaml']) auth_settings = ['BearerToken'] return self.api_client.call_api('/apis/batch/v1/namespaces/{namespace}/cronjobs/{name}', 'PATCH', path_params, query_params, header_params, body=body_params, post_params=form_params, files=local_var_files, response_type='V1CronJob', auth_settings=auth_settings, async_req=local_var_params.get('async_req'), _return_http_data_only=local_var_params.get('_return_http_data_only'), _preload_content=local_var_params.get('_preload_content', True), _request_timeout=local_var_params.get('_request_timeout'), collection_formats=collection_formats)
def patch_namespaced_cron_job_with_http_info(self, name, namespace, body, **kwargs): 'patch_namespaced_cron_job # noqa: E501\n\n partially update the specified CronJob # noqa: E501\n This method makes a synchronous HTTP request by default. To make an\n asynchronous HTTP request, please pass async_req=True\n >>> thread = api.patch_namespaced_cron_job_with_http_info(name, namespace, body, async_req=True)\n >>> result = thread.get()\n\n :param async_req bool: execute request asynchronously\n :param str name: name of the CronJob (required)\n :param str namespace: object name and auth scope, such as for teams and projects (required)\n :param object body: (required)\n :param str pretty: If \'true\', then the output is pretty printed.\n :param str dry_run: When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed\n :param str field_manager: fieldManager is a name associated with the actor or entity that is making these changes. The value must be less than or 128 characters long, and only contain printable characters, as defined by https://golang.org/pkg/unicode/#IsPrint. This field is required for apply requests (application/apply-patch) but optional for non-apply patch types (JsonPatch, MergePatch, StrategicMergePatch).\n :param bool force: Force is going to "force" Apply requests. It means user will re-acquire conflicting fields owned by other people. Force flag must be unset for non-apply patch requests.\n :param _return_http_data_only: response data without head status code\n and headers\n :param _preload_content: if False, the urllib3.HTTPResponse object will\n be returned without reading/decoding response\n data. Default is True.\n :param _request_timeout: timeout setting for this request. If one\n number provided, it will be total request\n timeout. It can also be a pair (tuple) of\n (connection, read) timeouts.\n :return: tuple(V1CronJob, status_code(int), headers(HTTPHeaderDict))\n If the method is called asynchronously,\n returns the request thread.\n ' local_var_params = locals() all_params = ['name', 'namespace', 'body', 'pretty', 'dry_run', 'field_manager', 'force'] all_params.extend(['async_req', '_return_http_data_only', '_preload_content', '_request_timeout']) for (key, val) in six.iteritems(local_var_params['kwargs']): if (key not in all_params): raise ApiTypeError(("Got an unexpected keyword argument '%s' to method patch_namespaced_cron_job" % key)) local_var_params[key] = val del local_var_params['kwargs'] if (self.api_client.client_side_validation and (('name' not in local_var_params) or (local_var_params['name'] is None))): raise ApiValueError('Missing the required parameter `name` when calling `patch_namespaced_cron_job`') if (self.api_client.client_side_validation and (('namespace' not in local_var_params) or (local_var_params['namespace'] is None))): raise ApiValueError('Missing the required parameter `namespace` when calling `patch_namespaced_cron_job`') if (self.api_client.client_side_validation and (('body' not in local_var_params) or (local_var_params['body'] is None))): raise ApiValueError('Missing the required parameter `body` when calling `patch_namespaced_cron_job`') collection_formats = {} path_params = {} if ('name' in local_var_params): path_params['name'] = local_var_params['name'] if ('namespace' in local_var_params): path_params['namespace'] = local_var_params['namespace'] query_params = [] if (('pretty' in local_var_params) and (local_var_params['pretty'] is not None)): query_params.append(('pretty', local_var_params['pretty'])) if (('dry_run' in local_var_params) and (local_var_params['dry_run'] is not None)): query_params.append(('dryRun', local_var_params['dry_run'])) if (('field_manager' in local_var_params) and (local_var_params['field_manager'] is not None)): query_params.append(('fieldManager', local_var_params['field_manager'])) if (('force' in local_var_params) and (local_var_params['force'] is not None)): query_params.append(('force', local_var_params['force'])) header_params = {} form_params = [] local_var_files = {} body_params = None if ('body' in local_var_params): body_params = local_var_params['body'] header_params['Accept'] = self.api_client.select_header_accept(['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf']) header_params['Content-Type'] = self.api_client.select_header_content_type(['application/json-patch+json', 'application/merge-patch+json', 'application/strategic-merge-patch+json', 'application/apply-patch+yaml']) auth_settings = ['BearerToken'] return self.api_client.call_api('/apis/batch/v1/namespaces/{namespace}/cronjobs/{name}', 'PATCH', path_params, query_params, header_params, body=body_params, post_params=form_params, files=local_var_files, response_type='V1CronJob', auth_settings=auth_settings, async_req=local_var_params.get('async_req'), _return_http_data_only=local_var_params.get('_return_http_data_only'), _preload_content=local_var_params.get('_preload_content', True), _request_timeout=local_var_params.get('_request_timeout'), collection_formats=collection_formats)<|docstring|>patch_namespaced_cron_job # noqa: E501 partially update the specified CronJob # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True >>> thread = api.patch_namespaced_cron_job_with_http_info(name, namespace, body, async_req=True) >>> result = thread.get() :param async_req bool: execute request asynchronously :param str name: name of the CronJob (required) :param str namespace: object name and auth scope, such as for teams and projects (required) :param object body: (required) :param str pretty: If 'true', then the output is pretty printed. :param str dry_run: When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed :param str field_manager: fieldManager is a name associated with the actor or entity that is making these changes. The value must be less than or 128 characters long, and only contain printable characters, as defined by https://golang.org/pkg/unicode/#IsPrint. This field is required for apply requests (application/apply-patch) but optional for non-apply patch types (JsonPatch, MergePatch, StrategicMergePatch). :param bool force: Force is going to "force" Apply requests. It means user will re-acquire conflicting fields owned by other people. Force flag must be unset for non-apply patch requests. :param _return_http_data_only: response data without head status code and headers :param _preload_content: if False, the urllib3.HTTPResponse object will be returned without reading/decoding response data. Default is True. :param _request_timeout: timeout setting for this request. If one number provided, it will be total request timeout. It can also be a pair (tuple) of (connection, read) timeouts. :return: tuple(V1CronJob, status_code(int), headers(HTTPHeaderDict)) If the method is called asynchronously, returns the request thread.<|endoftext|>
0d8230f15ac53a9d2f3e31ba489eae21b322a1803d305cc288a027ecf1b1a9ab
def patch_namespaced_cron_job_status(self, name, namespace, body, **kwargs): 'patch_namespaced_cron_job_status # noqa: E501\n\n partially update status of the specified CronJob # noqa: E501\n This method makes a synchronous HTTP request by default. To make an\n asynchronous HTTP request, please pass async_req=True\n >>> thread = api.patch_namespaced_cron_job_status(name, namespace, body, async_req=True)\n >>> result = thread.get()\n\n :param async_req bool: execute request asynchronously\n :param str name: name of the CronJob (required)\n :param str namespace: object name and auth scope, such as for teams and projects (required)\n :param object body: (required)\n :param str pretty: If \'true\', then the output is pretty printed.\n :param str dry_run: When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed\n :param str field_manager: fieldManager is a name associated with the actor or entity that is making these changes. The value must be less than or 128 characters long, and only contain printable characters, as defined by https://golang.org/pkg/unicode/#IsPrint. This field is required for apply requests (application/apply-patch) but optional for non-apply patch types (JsonPatch, MergePatch, StrategicMergePatch).\n :param bool force: Force is going to "force" Apply requests. It means user will re-acquire conflicting fields owned by other people. Force flag must be unset for non-apply patch requests.\n :param _preload_content: if False, the urllib3.HTTPResponse object will\n be returned without reading/decoding response\n data. Default is True.\n :param _request_timeout: timeout setting for this request. If one\n number provided, it will be total request\n timeout. It can also be a pair (tuple) of\n (connection, read) timeouts.\n :return: V1CronJob\n If the method is called asynchronously,\n returns the request thread.\n ' kwargs['_return_http_data_only'] = True return self.patch_namespaced_cron_job_status_with_http_info(name, namespace, body, **kwargs)
patch_namespaced_cron_job_status # noqa: E501 partially update status of the specified CronJob # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True >>> thread = api.patch_namespaced_cron_job_status(name, namespace, body, async_req=True) >>> result = thread.get() :param async_req bool: execute request asynchronously :param str name: name of the CronJob (required) :param str namespace: object name and auth scope, such as for teams and projects (required) :param object body: (required) :param str pretty: If 'true', then the output is pretty printed. :param str dry_run: When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed :param str field_manager: fieldManager is a name associated with the actor or entity that is making these changes. The value must be less than or 128 characters long, and only contain printable characters, as defined by https://golang.org/pkg/unicode/#IsPrint. This field is required for apply requests (application/apply-patch) but optional for non-apply patch types (JsonPatch, MergePatch, StrategicMergePatch). :param bool force: Force is going to "force" Apply requests. It means user will re-acquire conflicting fields owned by other people. Force flag must be unset for non-apply patch requests. :param _preload_content: if False, the urllib3.HTTPResponse object will be returned without reading/decoding response data. Default is True. :param _request_timeout: timeout setting for this request. If one number provided, it will be total request timeout. It can also be a pair (tuple) of (connection, read) timeouts. :return: V1CronJob If the method is called asynchronously, returns the request thread.
kubernetes/client/api/batch_v1_api.py
patch_namespaced_cron_job_status
knkgun/python
1
python
def patch_namespaced_cron_job_status(self, name, namespace, body, **kwargs): 'patch_namespaced_cron_job_status # noqa: E501\n\n partially update status of the specified CronJob # noqa: E501\n This method makes a synchronous HTTP request by default. To make an\n asynchronous HTTP request, please pass async_req=True\n >>> thread = api.patch_namespaced_cron_job_status(name, namespace, body, async_req=True)\n >>> result = thread.get()\n\n :param async_req bool: execute request asynchronously\n :param str name: name of the CronJob (required)\n :param str namespace: object name and auth scope, such as for teams and projects (required)\n :param object body: (required)\n :param str pretty: If \'true\', then the output is pretty printed.\n :param str dry_run: When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed\n :param str field_manager: fieldManager is a name associated with the actor or entity that is making these changes. The value must be less than or 128 characters long, and only contain printable characters, as defined by https://golang.org/pkg/unicode/#IsPrint. This field is required for apply requests (application/apply-patch) but optional for non-apply patch types (JsonPatch, MergePatch, StrategicMergePatch).\n :param bool force: Force is going to "force" Apply requests. It means user will re-acquire conflicting fields owned by other people. Force flag must be unset for non-apply patch requests.\n :param _preload_content: if False, the urllib3.HTTPResponse object will\n be returned without reading/decoding response\n data. Default is True.\n :param _request_timeout: timeout setting for this request. If one\n number provided, it will be total request\n timeout. It can also be a pair (tuple) of\n (connection, read) timeouts.\n :return: V1CronJob\n If the method is called asynchronously,\n returns the request thread.\n ' kwargs['_return_http_data_only'] = True return self.patch_namespaced_cron_job_status_with_http_info(name, namespace, body, **kwargs)
def patch_namespaced_cron_job_status(self, name, namespace, body, **kwargs): 'patch_namespaced_cron_job_status # noqa: E501\n\n partially update status of the specified CronJob # noqa: E501\n This method makes a synchronous HTTP request by default. To make an\n asynchronous HTTP request, please pass async_req=True\n >>> thread = api.patch_namespaced_cron_job_status(name, namespace, body, async_req=True)\n >>> result = thread.get()\n\n :param async_req bool: execute request asynchronously\n :param str name: name of the CronJob (required)\n :param str namespace: object name and auth scope, such as for teams and projects (required)\n :param object body: (required)\n :param str pretty: If \'true\', then the output is pretty printed.\n :param str dry_run: When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed\n :param str field_manager: fieldManager is a name associated with the actor or entity that is making these changes. The value must be less than or 128 characters long, and only contain printable characters, as defined by https://golang.org/pkg/unicode/#IsPrint. This field is required for apply requests (application/apply-patch) but optional for non-apply patch types (JsonPatch, MergePatch, StrategicMergePatch).\n :param bool force: Force is going to "force" Apply requests. It means user will re-acquire conflicting fields owned by other people. Force flag must be unset for non-apply patch requests.\n :param _preload_content: if False, the urllib3.HTTPResponse object will\n be returned without reading/decoding response\n data. Default is True.\n :param _request_timeout: timeout setting for this request. If one\n number provided, it will be total request\n timeout. It can also be a pair (tuple) of\n (connection, read) timeouts.\n :return: V1CronJob\n If the method is called asynchronously,\n returns the request thread.\n ' kwargs['_return_http_data_only'] = True return self.patch_namespaced_cron_job_status_with_http_info(name, namespace, body, **kwargs)<|docstring|>patch_namespaced_cron_job_status # noqa: E501 partially update status of the specified CronJob # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True >>> thread = api.patch_namespaced_cron_job_status(name, namespace, body, async_req=True) >>> result = thread.get() :param async_req bool: execute request asynchronously :param str name: name of the CronJob (required) :param str namespace: object name and auth scope, such as for teams and projects (required) :param object body: (required) :param str pretty: If 'true', then the output is pretty printed. :param str dry_run: When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed :param str field_manager: fieldManager is a name associated with the actor or entity that is making these changes. The value must be less than or 128 characters long, and only contain printable characters, as defined by https://golang.org/pkg/unicode/#IsPrint. This field is required for apply requests (application/apply-patch) but optional for non-apply patch types (JsonPatch, MergePatch, StrategicMergePatch). :param bool force: Force is going to "force" Apply requests. It means user will re-acquire conflicting fields owned by other people. Force flag must be unset for non-apply patch requests. :param _preload_content: if False, the urllib3.HTTPResponse object will be returned without reading/decoding response data. Default is True. :param _request_timeout: timeout setting for this request. If one number provided, it will be total request timeout. It can also be a pair (tuple) of (connection, read) timeouts. :return: V1CronJob If the method is called asynchronously, returns the request thread.<|endoftext|>
db75beec1c4ac470e9a5af9cbb335d25e016d4c02cd9be2b8a0cf72401fb593a
def patch_namespaced_cron_job_status_with_http_info(self, name, namespace, body, **kwargs): 'patch_namespaced_cron_job_status # noqa: E501\n\n partially update status of the specified CronJob # noqa: E501\n This method makes a synchronous HTTP request by default. To make an\n asynchronous HTTP request, please pass async_req=True\n >>> thread = api.patch_namespaced_cron_job_status_with_http_info(name, namespace, body, async_req=True)\n >>> result = thread.get()\n\n :param async_req bool: execute request asynchronously\n :param str name: name of the CronJob (required)\n :param str namespace: object name and auth scope, such as for teams and projects (required)\n :param object body: (required)\n :param str pretty: If \'true\', then the output is pretty printed.\n :param str dry_run: When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed\n :param str field_manager: fieldManager is a name associated with the actor or entity that is making these changes. The value must be less than or 128 characters long, and only contain printable characters, as defined by https://golang.org/pkg/unicode/#IsPrint. This field is required for apply requests (application/apply-patch) but optional for non-apply patch types (JsonPatch, MergePatch, StrategicMergePatch).\n :param bool force: Force is going to "force" Apply requests. It means user will re-acquire conflicting fields owned by other people. Force flag must be unset for non-apply patch requests.\n :param _return_http_data_only: response data without head status code\n and headers\n :param _preload_content: if False, the urllib3.HTTPResponse object will\n be returned without reading/decoding response\n data. Default is True.\n :param _request_timeout: timeout setting for this request. If one\n number provided, it will be total request\n timeout. It can also be a pair (tuple) of\n (connection, read) timeouts.\n :return: tuple(V1CronJob, status_code(int), headers(HTTPHeaderDict))\n If the method is called asynchronously,\n returns the request thread.\n ' local_var_params = locals() all_params = ['name', 'namespace', 'body', 'pretty', 'dry_run', 'field_manager', 'force'] all_params.extend(['async_req', '_return_http_data_only', '_preload_content', '_request_timeout']) for (key, val) in six.iteritems(local_var_params['kwargs']): if (key not in all_params): raise ApiTypeError(("Got an unexpected keyword argument '%s' to method patch_namespaced_cron_job_status" % key)) local_var_params[key] = val del local_var_params['kwargs'] if (self.api_client.client_side_validation and (('name' not in local_var_params) or (local_var_params['name'] is None))): raise ApiValueError('Missing the required parameter `name` when calling `patch_namespaced_cron_job_status`') if (self.api_client.client_side_validation and (('namespace' not in local_var_params) or (local_var_params['namespace'] is None))): raise ApiValueError('Missing the required parameter `namespace` when calling `patch_namespaced_cron_job_status`') if (self.api_client.client_side_validation and (('body' not in local_var_params) or (local_var_params['body'] is None))): raise ApiValueError('Missing the required parameter `body` when calling `patch_namespaced_cron_job_status`') collection_formats = {} path_params = {} if ('name' in local_var_params): path_params['name'] = local_var_params['name'] if ('namespace' in local_var_params): path_params['namespace'] = local_var_params['namespace'] query_params = [] if (('pretty' in local_var_params) and (local_var_params['pretty'] is not None)): query_params.append(('pretty', local_var_params['pretty'])) if (('dry_run' in local_var_params) and (local_var_params['dry_run'] is not None)): query_params.append(('dryRun', local_var_params['dry_run'])) if (('field_manager' in local_var_params) and (local_var_params['field_manager'] is not None)): query_params.append(('fieldManager', local_var_params['field_manager'])) if (('force' in local_var_params) and (local_var_params['force'] is not None)): query_params.append(('force', local_var_params['force'])) header_params = {} form_params = [] local_var_files = {} body_params = None if ('body' in local_var_params): body_params = local_var_params['body'] header_params['Accept'] = self.api_client.select_header_accept(['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf']) header_params['Content-Type'] = self.api_client.select_header_content_type(['application/json-patch+json', 'application/merge-patch+json', 'application/strategic-merge-patch+json', 'application/apply-patch+yaml']) auth_settings = ['BearerToken'] return self.api_client.call_api('/apis/batch/v1/namespaces/{namespace}/cronjobs/{name}/status', 'PATCH', path_params, query_params, header_params, body=body_params, post_params=form_params, files=local_var_files, response_type='V1CronJob', auth_settings=auth_settings, async_req=local_var_params.get('async_req'), _return_http_data_only=local_var_params.get('_return_http_data_only'), _preload_content=local_var_params.get('_preload_content', True), _request_timeout=local_var_params.get('_request_timeout'), collection_formats=collection_formats)
patch_namespaced_cron_job_status # noqa: E501 partially update status of the specified CronJob # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True >>> thread = api.patch_namespaced_cron_job_status_with_http_info(name, namespace, body, async_req=True) >>> result = thread.get() :param async_req bool: execute request asynchronously :param str name: name of the CronJob (required) :param str namespace: object name and auth scope, such as for teams and projects (required) :param object body: (required) :param str pretty: If 'true', then the output is pretty printed. :param str dry_run: When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed :param str field_manager: fieldManager is a name associated with the actor or entity that is making these changes. The value must be less than or 128 characters long, and only contain printable characters, as defined by https://golang.org/pkg/unicode/#IsPrint. This field is required for apply requests (application/apply-patch) but optional for non-apply patch types (JsonPatch, MergePatch, StrategicMergePatch). :param bool force: Force is going to "force" Apply requests. It means user will re-acquire conflicting fields owned by other people. Force flag must be unset for non-apply patch requests. :param _return_http_data_only: response data without head status code and headers :param _preload_content: if False, the urllib3.HTTPResponse object will be returned without reading/decoding response data. Default is True. :param _request_timeout: timeout setting for this request. If one number provided, it will be total request timeout. It can also be a pair (tuple) of (connection, read) timeouts. :return: tuple(V1CronJob, status_code(int), headers(HTTPHeaderDict)) If the method is called asynchronously, returns the request thread.
kubernetes/client/api/batch_v1_api.py
patch_namespaced_cron_job_status_with_http_info
knkgun/python
1
python
def patch_namespaced_cron_job_status_with_http_info(self, name, namespace, body, **kwargs): 'patch_namespaced_cron_job_status # noqa: E501\n\n partially update status of the specified CronJob # noqa: E501\n This method makes a synchronous HTTP request by default. To make an\n asynchronous HTTP request, please pass async_req=True\n >>> thread = api.patch_namespaced_cron_job_status_with_http_info(name, namespace, body, async_req=True)\n >>> result = thread.get()\n\n :param async_req bool: execute request asynchronously\n :param str name: name of the CronJob (required)\n :param str namespace: object name and auth scope, such as for teams and projects (required)\n :param object body: (required)\n :param str pretty: If \'true\', then the output is pretty printed.\n :param str dry_run: When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed\n :param str field_manager: fieldManager is a name associated with the actor or entity that is making these changes. The value must be less than or 128 characters long, and only contain printable characters, as defined by https://golang.org/pkg/unicode/#IsPrint. This field is required for apply requests (application/apply-patch) but optional for non-apply patch types (JsonPatch, MergePatch, StrategicMergePatch).\n :param bool force: Force is going to "force" Apply requests. It means user will re-acquire conflicting fields owned by other people. Force flag must be unset for non-apply patch requests.\n :param _return_http_data_only: response data without head status code\n and headers\n :param _preload_content: if False, the urllib3.HTTPResponse object will\n be returned without reading/decoding response\n data. Default is True.\n :param _request_timeout: timeout setting for this request. If one\n number provided, it will be total request\n timeout. It can also be a pair (tuple) of\n (connection, read) timeouts.\n :return: tuple(V1CronJob, status_code(int), headers(HTTPHeaderDict))\n If the method is called asynchronously,\n returns the request thread.\n ' local_var_params = locals() all_params = ['name', 'namespace', 'body', 'pretty', 'dry_run', 'field_manager', 'force'] all_params.extend(['async_req', '_return_http_data_only', '_preload_content', '_request_timeout']) for (key, val) in six.iteritems(local_var_params['kwargs']): if (key not in all_params): raise ApiTypeError(("Got an unexpected keyword argument '%s' to method patch_namespaced_cron_job_status" % key)) local_var_params[key] = val del local_var_params['kwargs'] if (self.api_client.client_side_validation and (('name' not in local_var_params) or (local_var_params['name'] is None))): raise ApiValueError('Missing the required parameter `name` when calling `patch_namespaced_cron_job_status`') if (self.api_client.client_side_validation and (('namespace' not in local_var_params) or (local_var_params['namespace'] is None))): raise ApiValueError('Missing the required parameter `namespace` when calling `patch_namespaced_cron_job_status`') if (self.api_client.client_side_validation and (('body' not in local_var_params) or (local_var_params['body'] is None))): raise ApiValueError('Missing the required parameter `body` when calling `patch_namespaced_cron_job_status`') collection_formats = {} path_params = {} if ('name' in local_var_params): path_params['name'] = local_var_params['name'] if ('namespace' in local_var_params): path_params['namespace'] = local_var_params['namespace'] query_params = [] if (('pretty' in local_var_params) and (local_var_params['pretty'] is not None)): query_params.append(('pretty', local_var_params['pretty'])) if (('dry_run' in local_var_params) and (local_var_params['dry_run'] is not None)): query_params.append(('dryRun', local_var_params['dry_run'])) if (('field_manager' in local_var_params) and (local_var_params['field_manager'] is not None)): query_params.append(('fieldManager', local_var_params['field_manager'])) if (('force' in local_var_params) and (local_var_params['force'] is not None)): query_params.append(('force', local_var_params['force'])) header_params = {} form_params = [] local_var_files = {} body_params = None if ('body' in local_var_params): body_params = local_var_params['body'] header_params['Accept'] = self.api_client.select_header_accept(['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf']) header_params['Content-Type'] = self.api_client.select_header_content_type(['application/json-patch+json', 'application/merge-patch+json', 'application/strategic-merge-patch+json', 'application/apply-patch+yaml']) auth_settings = ['BearerToken'] return self.api_client.call_api('/apis/batch/v1/namespaces/{namespace}/cronjobs/{name}/status', 'PATCH', path_params, query_params, header_params, body=body_params, post_params=form_params, files=local_var_files, response_type='V1CronJob', auth_settings=auth_settings, async_req=local_var_params.get('async_req'), _return_http_data_only=local_var_params.get('_return_http_data_only'), _preload_content=local_var_params.get('_preload_content', True), _request_timeout=local_var_params.get('_request_timeout'), collection_formats=collection_formats)
def patch_namespaced_cron_job_status_with_http_info(self, name, namespace, body, **kwargs): 'patch_namespaced_cron_job_status # noqa: E501\n\n partially update status of the specified CronJob # noqa: E501\n This method makes a synchronous HTTP request by default. To make an\n asynchronous HTTP request, please pass async_req=True\n >>> thread = api.patch_namespaced_cron_job_status_with_http_info(name, namespace, body, async_req=True)\n >>> result = thread.get()\n\n :param async_req bool: execute request asynchronously\n :param str name: name of the CronJob (required)\n :param str namespace: object name and auth scope, such as for teams and projects (required)\n :param object body: (required)\n :param str pretty: If \'true\', then the output is pretty printed.\n :param str dry_run: When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed\n :param str field_manager: fieldManager is a name associated with the actor or entity that is making these changes. The value must be less than or 128 characters long, and only contain printable characters, as defined by https://golang.org/pkg/unicode/#IsPrint. This field is required for apply requests (application/apply-patch) but optional for non-apply patch types (JsonPatch, MergePatch, StrategicMergePatch).\n :param bool force: Force is going to "force" Apply requests. It means user will re-acquire conflicting fields owned by other people. Force flag must be unset for non-apply patch requests.\n :param _return_http_data_only: response data without head status code\n and headers\n :param _preload_content: if False, the urllib3.HTTPResponse object will\n be returned without reading/decoding response\n data. Default is True.\n :param _request_timeout: timeout setting for this request. If one\n number provided, it will be total request\n timeout. It can also be a pair (tuple) of\n (connection, read) timeouts.\n :return: tuple(V1CronJob, status_code(int), headers(HTTPHeaderDict))\n If the method is called asynchronously,\n returns the request thread.\n ' local_var_params = locals() all_params = ['name', 'namespace', 'body', 'pretty', 'dry_run', 'field_manager', 'force'] all_params.extend(['async_req', '_return_http_data_only', '_preload_content', '_request_timeout']) for (key, val) in six.iteritems(local_var_params['kwargs']): if (key not in all_params): raise ApiTypeError(("Got an unexpected keyword argument '%s' to method patch_namespaced_cron_job_status" % key)) local_var_params[key] = val del local_var_params['kwargs'] if (self.api_client.client_side_validation and (('name' not in local_var_params) or (local_var_params['name'] is None))): raise ApiValueError('Missing the required parameter `name` when calling `patch_namespaced_cron_job_status`') if (self.api_client.client_side_validation and (('namespace' not in local_var_params) or (local_var_params['namespace'] is None))): raise ApiValueError('Missing the required parameter `namespace` when calling `patch_namespaced_cron_job_status`') if (self.api_client.client_side_validation and (('body' not in local_var_params) or (local_var_params['body'] is None))): raise ApiValueError('Missing the required parameter `body` when calling `patch_namespaced_cron_job_status`') collection_formats = {} path_params = {} if ('name' in local_var_params): path_params['name'] = local_var_params['name'] if ('namespace' in local_var_params): path_params['namespace'] = local_var_params['namespace'] query_params = [] if (('pretty' in local_var_params) and (local_var_params['pretty'] is not None)): query_params.append(('pretty', local_var_params['pretty'])) if (('dry_run' in local_var_params) and (local_var_params['dry_run'] is not None)): query_params.append(('dryRun', local_var_params['dry_run'])) if (('field_manager' in local_var_params) and (local_var_params['field_manager'] is not None)): query_params.append(('fieldManager', local_var_params['field_manager'])) if (('force' in local_var_params) and (local_var_params['force'] is not None)): query_params.append(('force', local_var_params['force'])) header_params = {} form_params = [] local_var_files = {} body_params = None if ('body' in local_var_params): body_params = local_var_params['body'] header_params['Accept'] = self.api_client.select_header_accept(['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf']) header_params['Content-Type'] = self.api_client.select_header_content_type(['application/json-patch+json', 'application/merge-patch+json', 'application/strategic-merge-patch+json', 'application/apply-patch+yaml']) auth_settings = ['BearerToken'] return self.api_client.call_api('/apis/batch/v1/namespaces/{namespace}/cronjobs/{name}/status', 'PATCH', path_params, query_params, header_params, body=body_params, post_params=form_params, files=local_var_files, response_type='V1CronJob', auth_settings=auth_settings, async_req=local_var_params.get('async_req'), _return_http_data_only=local_var_params.get('_return_http_data_only'), _preload_content=local_var_params.get('_preload_content', True), _request_timeout=local_var_params.get('_request_timeout'), collection_formats=collection_formats)<|docstring|>patch_namespaced_cron_job_status # noqa: E501 partially update status of the specified CronJob # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True >>> thread = api.patch_namespaced_cron_job_status_with_http_info(name, namespace, body, async_req=True) >>> result = thread.get() :param async_req bool: execute request asynchronously :param str name: name of the CronJob (required) :param str namespace: object name and auth scope, such as for teams and projects (required) :param object body: (required) :param str pretty: If 'true', then the output is pretty printed. :param str dry_run: When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed :param str field_manager: fieldManager is a name associated with the actor or entity that is making these changes. The value must be less than or 128 characters long, and only contain printable characters, as defined by https://golang.org/pkg/unicode/#IsPrint. This field is required for apply requests (application/apply-patch) but optional for non-apply patch types (JsonPatch, MergePatch, StrategicMergePatch). :param bool force: Force is going to "force" Apply requests. It means user will re-acquire conflicting fields owned by other people. Force flag must be unset for non-apply patch requests. :param _return_http_data_only: response data without head status code and headers :param _preload_content: if False, the urllib3.HTTPResponse object will be returned without reading/decoding response data. Default is True. :param _request_timeout: timeout setting for this request. If one number provided, it will be total request timeout. It can also be a pair (tuple) of (connection, read) timeouts. :return: tuple(V1CronJob, status_code(int), headers(HTTPHeaderDict)) If the method is called asynchronously, returns the request thread.<|endoftext|>
b30649dc958cd9a8b6182565c43622802f8d71874cb665b965d303af281dd25c
def patch_namespaced_job(self, name, namespace, body, **kwargs): 'patch_namespaced_job # noqa: E501\n\n partially update the specified Job # noqa: E501\n This method makes a synchronous HTTP request by default. To make an\n asynchronous HTTP request, please pass async_req=True\n >>> thread = api.patch_namespaced_job(name, namespace, body, async_req=True)\n >>> result = thread.get()\n\n :param async_req bool: execute request asynchronously\n :param str name: name of the Job (required)\n :param str namespace: object name and auth scope, such as for teams and projects (required)\n :param object body: (required)\n :param str pretty: If \'true\', then the output is pretty printed.\n :param str dry_run: When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed\n :param str field_manager: fieldManager is a name associated with the actor or entity that is making these changes. The value must be less than or 128 characters long, and only contain printable characters, as defined by https://golang.org/pkg/unicode/#IsPrint. This field is required for apply requests (application/apply-patch) but optional for non-apply patch types (JsonPatch, MergePatch, StrategicMergePatch).\n :param bool force: Force is going to "force" Apply requests. It means user will re-acquire conflicting fields owned by other people. Force flag must be unset for non-apply patch requests.\n :param _preload_content: if False, the urllib3.HTTPResponse object will\n be returned without reading/decoding response\n data. Default is True.\n :param _request_timeout: timeout setting for this request. If one\n number provided, it will be total request\n timeout. It can also be a pair (tuple) of\n (connection, read) timeouts.\n :return: V1Job\n If the method is called asynchronously,\n returns the request thread.\n ' kwargs['_return_http_data_only'] = True return self.patch_namespaced_job_with_http_info(name, namespace, body, **kwargs)
patch_namespaced_job # noqa: E501 partially update the specified Job # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True >>> thread = api.patch_namespaced_job(name, namespace, body, async_req=True) >>> result = thread.get() :param async_req bool: execute request asynchronously :param str name: name of the Job (required) :param str namespace: object name and auth scope, such as for teams and projects (required) :param object body: (required) :param str pretty: If 'true', then the output is pretty printed. :param str dry_run: When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed :param str field_manager: fieldManager is a name associated with the actor or entity that is making these changes. The value must be less than or 128 characters long, and only contain printable characters, as defined by https://golang.org/pkg/unicode/#IsPrint. This field is required for apply requests (application/apply-patch) but optional for non-apply patch types (JsonPatch, MergePatch, StrategicMergePatch). :param bool force: Force is going to "force" Apply requests. It means user will re-acquire conflicting fields owned by other people. Force flag must be unset for non-apply patch requests. :param _preload_content: if False, the urllib3.HTTPResponse object will be returned without reading/decoding response data. Default is True. :param _request_timeout: timeout setting for this request. If one number provided, it will be total request timeout. It can also be a pair (tuple) of (connection, read) timeouts. :return: V1Job If the method is called asynchronously, returns the request thread.
kubernetes/client/api/batch_v1_api.py
patch_namespaced_job
knkgun/python
1
python
def patch_namespaced_job(self, name, namespace, body, **kwargs): 'patch_namespaced_job # noqa: E501\n\n partially update the specified Job # noqa: E501\n This method makes a synchronous HTTP request by default. To make an\n asynchronous HTTP request, please pass async_req=True\n >>> thread = api.patch_namespaced_job(name, namespace, body, async_req=True)\n >>> result = thread.get()\n\n :param async_req bool: execute request asynchronously\n :param str name: name of the Job (required)\n :param str namespace: object name and auth scope, such as for teams and projects (required)\n :param object body: (required)\n :param str pretty: If \'true\', then the output is pretty printed.\n :param str dry_run: When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed\n :param str field_manager: fieldManager is a name associated with the actor or entity that is making these changes. The value must be less than or 128 characters long, and only contain printable characters, as defined by https://golang.org/pkg/unicode/#IsPrint. This field is required for apply requests (application/apply-patch) but optional for non-apply patch types (JsonPatch, MergePatch, StrategicMergePatch).\n :param bool force: Force is going to "force" Apply requests. It means user will re-acquire conflicting fields owned by other people. Force flag must be unset for non-apply patch requests.\n :param _preload_content: if False, the urllib3.HTTPResponse object will\n be returned without reading/decoding response\n data. Default is True.\n :param _request_timeout: timeout setting for this request. If one\n number provided, it will be total request\n timeout. It can also be a pair (tuple) of\n (connection, read) timeouts.\n :return: V1Job\n If the method is called asynchronously,\n returns the request thread.\n ' kwargs['_return_http_data_only'] = True return self.patch_namespaced_job_with_http_info(name, namespace, body, **kwargs)
def patch_namespaced_job(self, name, namespace, body, **kwargs): 'patch_namespaced_job # noqa: E501\n\n partially update the specified Job # noqa: E501\n This method makes a synchronous HTTP request by default. To make an\n asynchronous HTTP request, please pass async_req=True\n >>> thread = api.patch_namespaced_job(name, namespace, body, async_req=True)\n >>> result = thread.get()\n\n :param async_req bool: execute request asynchronously\n :param str name: name of the Job (required)\n :param str namespace: object name and auth scope, such as for teams and projects (required)\n :param object body: (required)\n :param str pretty: If \'true\', then the output is pretty printed.\n :param str dry_run: When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed\n :param str field_manager: fieldManager is a name associated with the actor or entity that is making these changes. The value must be less than or 128 characters long, and only contain printable characters, as defined by https://golang.org/pkg/unicode/#IsPrint. This field is required for apply requests (application/apply-patch) but optional for non-apply patch types (JsonPatch, MergePatch, StrategicMergePatch).\n :param bool force: Force is going to "force" Apply requests. It means user will re-acquire conflicting fields owned by other people. Force flag must be unset for non-apply patch requests.\n :param _preload_content: if False, the urllib3.HTTPResponse object will\n be returned without reading/decoding response\n data. Default is True.\n :param _request_timeout: timeout setting for this request. If one\n number provided, it will be total request\n timeout. It can also be a pair (tuple) of\n (connection, read) timeouts.\n :return: V1Job\n If the method is called asynchronously,\n returns the request thread.\n ' kwargs['_return_http_data_only'] = True return self.patch_namespaced_job_with_http_info(name, namespace, body, **kwargs)<|docstring|>patch_namespaced_job # noqa: E501 partially update the specified Job # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True >>> thread = api.patch_namespaced_job(name, namespace, body, async_req=True) >>> result = thread.get() :param async_req bool: execute request asynchronously :param str name: name of the Job (required) :param str namespace: object name and auth scope, such as for teams and projects (required) :param object body: (required) :param str pretty: If 'true', then the output is pretty printed. :param str dry_run: When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed :param str field_manager: fieldManager is a name associated with the actor or entity that is making these changes. The value must be less than or 128 characters long, and only contain printable characters, as defined by https://golang.org/pkg/unicode/#IsPrint. This field is required for apply requests (application/apply-patch) but optional for non-apply patch types (JsonPatch, MergePatch, StrategicMergePatch). :param bool force: Force is going to "force" Apply requests. It means user will re-acquire conflicting fields owned by other people. Force flag must be unset for non-apply patch requests. :param _preload_content: if False, the urllib3.HTTPResponse object will be returned without reading/decoding response data. Default is True. :param _request_timeout: timeout setting for this request. If one number provided, it will be total request timeout. It can also be a pair (tuple) of (connection, read) timeouts. :return: V1Job If the method is called asynchronously, returns the request thread.<|endoftext|>
721046ce4935ec193ebe542ecfb44c8f88ad5887bb23da79749e7a1d970cb6ba
def patch_namespaced_job_with_http_info(self, name, namespace, body, **kwargs): 'patch_namespaced_job # noqa: E501\n\n partially update the specified Job # noqa: E501\n This method makes a synchronous HTTP request by default. To make an\n asynchronous HTTP request, please pass async_req=True\n >>> thread = api.patch_namespaced_job_with_http_info(name, namespace, body, async_req=True)\n >>> result = thread.get()\n\n :param async_req bool: execute request asynchronously\n :param str name: name of the Job (required)\n :param str namespace: object name and auth scope, such as for teams and projects (required)\n :param object body: (required)\n :param str pretty: If \'true\', then the output is pretty printed.\n :param str dry_run: When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed\n :param str field_manager: fieldManager is a name associated with the actor or entity that is making these changes. The value must be less than or 128 characters long, and only contain printable characters, as defined by https://golang.org/pkg/unicode/#IsPrint. This field is required for apply requests (application/apply-patch) but optional for non-apply patch types (JsonPatch, MergePatch, StrategicMergePatch).\n :param bool force: Force is going to "force" Apply requests. It means user will re-acquire conflicting fields owned by other people. Force flag must be unset for non-apply patch requests.\n :param _return_http_data_only: response data without head status code\n and headers\n :param _preload_content: if False, the urllib3.HTTPResponse object will\n be returned without reading/decoding response\n data. Default is True.\n :param _request_timeout: timeout setting for this request. If one\n number provided, it will be total request\n timeout. It can also be a pair (tuple) of\n (connection, read) timeouts.\n :return: tuple(V1Job, status_code(int), headers(HTTPHeaderDict))\n If the method is called asynchronously,\n returns the request thread.\n ' local_var_params = locals() all_params = ['name', 'namespace', 'body', 'pretty', 'dry_run', 'field_manager', 'force'] all_params.extend(['async_req', '_return_http_data_only', '_preload_content', '_request_timeout']) for (key, val) in six.iteritems(local_var_params['kwargs']): if (key not in all_params): raise ApiTypeError(("Got an unexpected keyword argument '%s' to method patch_namespaced_job" % key)) local_var_params[key] = val del local_var_params['kwargs'] if (self.api_client.client_side_validation and (('name' not in local_var_params) or (local_var_params['name'] is None))): raise ApiValueError('Missing the required parameter `name` when calling `patch_namespaced_job`') if (self.api_client.client_side_validation and (('namespace' not in local_var_params) or (local_var_params['namespace'] is None))): raise ApiValueError('Missing the required parameter `namespace` when calling `patch_namespaced_job`') if (self.api_client.client_side_validation and (('body' not in local_var_params) or (local_var_params['body'] is None))): raise ApiValueError('Missing the required parameter `body` when calling `patch_namespaced_job`') collection_formats = {} path_params = {} if ('name' in local_var_params): path_params['name'] = local_var_params['name'] if ('namespace' in local_var_params): path_params['namespace'] = local_var_params['namespace'] query_params = [] if (('pretty' in local_var_params) and (local_var_params['pretty'] is not None)): query_params.append(('pretty', local_var_params['pretty'])) if (('dry_run' in local_var_params) and (local_var_params['dry_run'] is not None)): query_params.append(('dryRun', local_var_params['dry_run'])) if (('field_manager' in local_var_params) and (local_var_params['field_manager'] is not None)): query_params.append(('fieldManager', local_var_params['field_manager'])) if (('force' in local_var_params) and (local_var_params['force'] is not None)): query_params.append(('force', local_var_params['force'])) header_params = {} form_params = [] local_var_files = {} body_params = None if ('body' in local_var_params): body_params = local_var_params['body'] header_params['Accept'] = self.api_client.select_header_accept(['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf']) header_params['Content-Type'] = self.api_client.select_header_content_type(['application/json-patch+json', 'application/merge-patch+json', 'application/strategic-merge-patch+json', 'application/apply-patch+yaml']) auth_settings = ['BearerToken'] return self.api_client.call_api('/apis/batch/v1/namespaces/{namespace}/jobs/{name}', 'PATCH', path_params, query_params, header_params, body=body_params, post_params=form_params, files=local_var_files, response_type='V1Job', auth_settings=auth_settings, async_req=local_var_params.get('async_req'), _return_http_data_only=local_var_params.get('_return_http_data_only'), _preload_content=local_var_params.get('_preload_content', True), _request_timeout=local_var_params.get('_request_timeout'), collection_formats=collection_formats)
patch_namespaced_job # noqa: E501 partially update the specified Job # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True >>> thread = api.patch_namespaced_job_with_http_info(name, namespace, body, async_req=True) >>> result = thread.get() :param async_req bool: execute request asynchronously :param str name: name of the Job (required) :param str namespace: object name and auth scope, such as for teams and projects (required) :param object body: (required) :param str pretty: If 'true', then the output is pretty printed. :param str dry_run: When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed :param str field_manager: fieldManager is a name associated with the actor or entity that is making these changes. The value must be less than or 128 characters long, and only contain printable characters, as defined by https://golang.org/pkg/unicode/#IsPrint. This field is required for apply requests (application/apply-patch) but optional for non-apply patch types (JsonPatch, MergePatch, StrategicMergePatch). :param bool force: Force is going to "force" Apply requests. It means user will re-acquire conflicting fields owned by other people. Force flag must be unset for non-apply patch requests. :param _return_http_data_only: response data without head status code and headers :param _preload_content: if False, the urllib3.HTTPResponse object will be returned without reading/decoding response data. Default is True. :param _request_timeout: timeout setting for this request. If one number provided, it will be total request timeout. It can also be a pair (tuple) of (connection, read) timeouts. :return: tuple(V1Job, status_code(int), headers(HTTPHeaderDict)) If the method is called asynchronously, returns the request thread.
kubernetes/client/api/batch_v1_api.py
patch_namespaced_job_with_http_info
knkgun/python
1
python
def patch_namespaced_job_with_http_info(self, name, namespace, body, **kwargs): 'patch_namespaced_job # noqa: E501\n\n partially update the specified Job # noqa: E501\n This method makes a synchronous HTTP request by default. To make an\n asynchronous HTTP request, please pass async_req=True\n >>> thread = api.patch_namespaced_job_with_http_info(name, namespace, body, async_req=True)\n >>> result = thread.get()\n\n :param async_req bool: execute request asynchronously\n :param str name: name of the Job (required)\n :param str namespace: object name and auth scope, such as for teams and projects (required)\n :param object body: (required)\n :param str pretty: If \'true\', then the output is pretty printed.\n :param str dry_run: When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed\n :param str field_manager: fieldManager is a name associated with the actor or entity that is making these changes. The value must be less than or 128 characters long, and only contain printable characters, as defined by https://golang.org/pkg/unicode/#IsPrint. This field is required for apply requests (application/apply-patch) but optional for non-apply patch types (JsonPatch, MergePatch, StrategicMergePatch).\n :param bool force: Force is going to "force" Apply requests. It means user will re-acquire conflicting fields owned by other people. Force flag must be unset for non-apply patch requests.\n :param _return_http_data_only: response data without head status code\n and headers\n :param _preload_content: if False, the urllib3.HTTPResponse object will\n be returned without reading/decoding response\n data. Default is True.\n :param _request_timeout: timeout setting for this request. If one\n number provided, it will be total request\n timeout. It can also be a pair (tuple) of\n (connection, read) timeouts.\n :return: tuple(V1Job, status_code(int), headers(HTTPHeaderDict))\n If the method is called asynchronously,\n returns the request thread.\n ' local_var_params = locals() all_params = ['name', 'namespace', 'body', 'pretty', 'dry_run', 'field_manager', 'force'] all_params.extend(['async_req', '_return_http_data_only', '_preload_content', '_request_timeout']) for (key, val) in six.iteritems(local_var_params['kwargs']): if (key not in all_params): raise ApiTypeError(("Got an unexpected keyword argument '%s' to method patch_namespaced_job" % key)) local_var_params[key] = val del local_var_params['kwargs'] if (self.api_client.client_side_validation and (('name' not in local_var_params) or (local_var_params['name'] is None))): raise ApiValueError('Missing the required parameter `name` when calling `patch_namespaced_job`') if (self.api_client.client_side_validation and (('namespace' not in local_var_params) or (local_var_params['namespace'] is None))): raise ApiValueError('Missing the required parameter `namespace` when calling `patch_namespaced_job`') if (self.api_client.client_side_validation and (('body' not in local_var_params) or (local_var_params['body'] is None))): raise ApiValueError('Missing the required parameter `body` when calling `patch_namespaced_job`') collection_formats = {} path_params = {} if ('name' in local_var_params): path_params['name'] = local_var_params['name'] if ('namespace' in local_var_params): path_params['namespace'] = local_var_params['namespace'] query_params = [] if (('pretty' in local_var_params) and (local_var_params['pretty'] is not None)): query_params.append(('pretty', local_var_params['pretty'])) if (('dry_run' in local_var_params) and (local_var_params['dry_run'] is not None)): query_params.append(('dryRun', local_var_params['dry_run'])) if (('field_manager' in local_var_params) and (local_var_params['field_manager'] is not None)): query_params.append(('fieldManager', local_var_params['field_manager'])) if (('force' in local_var_params) and (local_var_params['force'] is not None)): query_params.append(('force', local_var_params['force'])) header_params = {} form_params = [] local_var_files = {} body_params = None if ('body' in local_var_params): body_params = local_var_params['body'] header_params['Accept'] = self.api_client.select_header_accept(['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf']) header_params['Content-Type'] = self.api_client.select_header_content_type(['application/json-patch+json', 'application/merge-patch+json', 'application/strategic-merge-patch+json', 'application/apply-patch+yaml']) auth_settings = ['BearerToken'] return self.api_client.call_api('/apis/batch/v1/namespaces/{namespace}/jobs/{name}', 'PATCH', path_params, query_params, header_params, body=body_params, post_params=form_params, files=local_var_files, response_type='V1Job', auth_settings=auth_settings, async_req=local_var_params.get('async_req'), _return_http_data_only=local_var_params.get('_return_http_data_only'), _preload_content=local_var_params.get('_preload_content', True), _request_timeout=local_var_params.get('_request_timeout'), collection_formats=collection_formats)
def patch_namespaced_job_with_http_info(self, name, namespace, body, **kwargs): 'patch_namespaced_job # noqa: E501\n\n partially update the specified Job # noqa: E501\n This method makes a synchronous HTTP request by default. To make an\n asynchronous HTTP request, please pass async_req=True\n >>> thread = api.patch_namespaced_job_with_http_info(name, namespace, body, async_req=True)\n >>> result = thread.get()\n\n :param async_req bool: execute request asynchronously\n :param str name: name of the Job (required)\n :param str namespace: object name and auth scope, such as for teams and projects (required)\n :param object body: (required)\n :param str pretty: If \'true\', then the output is pretty printed.\n :param str dry_run: When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed\n :param str field_manager: fieldManager is a name associated with the actor or entity that is making these changes. The value must be less than or 128 characters long, and only contain printable characters, as defined by https://golang.org/pkg/unicode/#IsPrint. This field is required for apply requests (application/apply-patch) but optional for non-apply patch types (JsonPatch, MergePatch, StrategicMergePatch).\n :param bool force: Force is going to "force" Apply requests. It means user will re-acquire conflicting fields owned by other people. Force flag must be unset for non-apply patch requests.\n :param _return_http_data_only: response data without head status code\n and headers\n :param _preload_content: if False, the urllib3.HTTPResponse object will\n be returned without reading/decoding response\n data. Default is True.\n :param _request_timeout: timeout setting for this request. If one\n number provided, it will be total request\n timeout. It can also be a pair (tuple) of\n (connection, read) timeouts.\n :return: tuple(V1Job, status_code(int), headers(HTTPHeaderDict))\n If the method is called asynchronously,\n returns the request thread.\n ' local_var_params = locals() all_params = ['name', 'namespace', 'body', 'pretty', 'dry_run', 'field_manager', 'force'] all_params.extend(['async_req', '_return_http_data_only', '_preload_content', '_request_timeout']) for (key, val) in six.iteritems(local_var_params['kwargs']): if (key not in all_params): raise ApiTypeError(("Got an unexpected keyword argument '%s' to method patch_namespaced_job" % key)) local_var_params[key] = val del local_var_params['kwargs'] if (self.api_client.client_side_validation and (('name' not in local_var_params) or (local_var_params['name'] is None))): raise ApiValueError('Missing the required parameter `name` when calling `patch_namespaced_job`') if (self.api_client.client_side_validation and (('namespace' not in local_var_params) or (local_var_params['namespace'] is None))): raise ApiValueError('Missing the required parameter `namespace` when calling `patch_namespaced_job`') if (self.api_client.client_side_validation and (('body' not in local_var_params) or (local_var_params['body'] is None))): raise ApiValueError('Missing the required parameter `body` when calling `patch_namespaced_job`') collection_formats = {} path_params = {} if ('name' in local_var_params): path_params['name'] = local_var_params['name'] if ('namespace' in local_var_params): path_params['namespace'] = local_var_params['namespace'] query_params = [] if (('pretty' in local_var_params) and (local_var_params['pretty'] is not None)): query_params.append(('pretty', local_var_params['pretty'])) if (('dry_run' in local_var_params) and (local_var_params['dry_run'] is not None)): query_params.append(('dryRun', local_var_params['dry_run'])) if (('field_manager' in local_var_params) and (local_var_params['field_manager'] is not None)): query_params.append(('fieldManager', local_var_params['field_manager'])) if (('force' in local_var_params) and (local_var_params['force'] is not None)): query_params.append(('force', local_var_params['force'])) header_params = {} form_params = [] local_var_files = {} body_params = None if ('body' in local_var_params): body_params = local_var_params['body'] header_params['Accept'] = self.api_client.select_header_accept(['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf']) header_params['Content-Type'] = self.api_client.select_header_content_type(['application/json-patch+json', 'application/merge-patch+json', 'application/strategic-merge-patch+json', 'application/apply-patch+yaml']) auth_settings = ['BearerToken'] return self.api_client.call_api('/apis/batch/v1/namespaces/{namespace}/jobs/{name}', 'PATCH', path_params, query_params, header_params, body=body_params, post_params=form_params, files=local_var_files, response_type='V1Job', auth_settings=auth_settings, async_req=local_var_params.get('async_req'), _return_http_data_only=local_var_params.get('_return_http_data_only'), _preload_content=local_var_params.get('_preload_content', True), _request_timeout=local_var_params.get('_request_timeout'), collection_formats=collection_formats)<|docstring|>patch_namespaced_job # noqa: E501 partially update the specified Job # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True >>> thread = api.patch_namespaced_job_with_http_info(name, namespace, body, async_req=True) >>> result = thread.get() :param async_req bool: execute request asynchronously :param str name: name of the Job (required) :param str namespace: object name and auth scope, such as for teams and projects (required) :param object body: (required) :param str pretty: If 'true', then the output is pretty printed. :param str dry_run: When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed :param str field_manager: fieldManager is a name associated with the actor or entity that is making these changes. The value must be less than or 128 characters long, and only contain printable characters, as defined by https://golang.org/pkg/unicode/#IsPrint. This field is required for apply requests (application/apply-patch) but optional for non-apply patch types (JsonPatch, MergePatch, StrategicMergePatch). :param bool force: Force is going to "force" Apply requests. It means user will re-acquire conflicting fields owned by other people. Force flag must be unset for non-apply patch requests. :param _return_http_data_only: response data without head status code and headers :param _preload_content: if False, the urllib3.HTTPResponse object will be returned without reading/decoding response data. Default is True. :param _request_timeout: timeout setting for this request. If one number provided, it will be total request timeout. It can also be a pair (tuple) of (connection, read) timeouts. :return: tuple(V1Job, status_code(int), headers(HTTPHeaderDict)) If the method is called asynchronously, returns the request thread.<|endoftext|>
18a0243e01cd935fabe28f45163d1a8ecbd73916d594e8b8cc3d79774095b722
def patch_namespaced_job_status(self, name, namespace, body, **kwargs): 'patch_namespaced_job_status # noqa: E501\n\n partially update status of the specified Job # noqa: E501\n This method makes a synchronous HTTP request by default. To make an\n asynchronous HTTP request, please pass async_req=True\n >>> thread = api.patch_namespaced_job_status(name, namespace, body, async_req=True)\n >>> result = thread.get()\n\n :param async_req bool: execute request asynchronously\n :param str name: name of the Job (required)\n :param str namespace: object name and auth scope, such as for teams and projects (required)\n :param object body: (required)\n :param str pretty: If \'true\', then the output is pretty printed.\n :param str dry_run: When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed\n :param str field_manager: fieldManager is a name associated with the actor or entity that is making these changes. The value must be less than or 128 characters long, and only contain printable characters, as defined by https://golang.org/pkg/unicode/#IsPrint. This field is required for apply requests (application/apply-patch) but optional for non-apply patch types (JsonPatch, MergePatch, StrategicMergePatch).\n :param bool force: Force is going to "force" Apply requests. It means user will re-acquire conflicting fields owned by other people. Force flag must be unset for non-apply patch requests.\n :param _preload_content: if False, the urllib3.HTTPResponse object will\n be returned without reading/decoding response\n data. Default is True.\n :param _request_timeout: timeout setting for this request. If one\n number provided, it will be total request\n timeout. It can also be a pair (tuple) of\n (connection, read) timeouts.\n :return: V1Job\n If the method is called asynchronously,\n returns the request thread.\n ' kwargs['_return_http_data_only'] = True return self.patch_namespaced_job_status_with_http_info(name, namespace, body, **kwargs)
patch_namespaced_job_status # noqa: E501 partially update status of the specified Job # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True >>> thread = api.patch_namespaced_job_status(name, namespace, body, async_req=True) >>> result = thread.get() :param async_req bool: execute request asynchronously :param str name: name of the Job (required) :param str namespace: object name and auth scope, such as for teams and projects (required) :param object body: (required) :param str pretty: If 'true', then the output is pretty printed. :param str dry_run: When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed :param str field_manager: fieldManager is a name associated with the actor or entity that is making these changes. The value must be less than or 128 characters long, and only contain printable characters, as defined by https://golang.org/pkg/unicode/#IsPrint. This field is required for apply requests (application/apply-patch) but optional for non-apply patch types (JsonPatch, MergePatch, StrategicMergePatch). :param bool force: Force is going to "force" Apply requests. It means user will re-acquire conflicting fields owned by other people. Force flag must be unset for non-apply patch requests. :param _preload_content: if False, the urllib3.HTTPResponse object will be returned without reading/decoding response data. Default is True. :param _request_timeout: timeout setting for this request. If one number provided, it will be total request timeout. It can also be a pair (tuple) of (connection, read) timeouts. :return: V1Job If the method is called asynchronously, returns the request thread.
kubernetes/client/api/batch_v1_api.py
patch_namespaced_job_status
knkgun/python
1
python
def patch_namespaced_job_status(self, name, namespace, body, **kwargs): 'patch_namespaced_job_status # noqa: E501\n\n partially update status of the specified Job # noqa: E501\n This method makes a synchronous HTTP request by default. To make an\n asynchronous HTTP request, please pass async_req=True\n >>> thread = api.patch_namespaced_job_status(name, namespace, body, async_req=True)\n >>> result = thread.get()\n\n :param async_req bool: execute request asynchronously\n :param str name: name of the Job (required)\n :param str namespace: object name and auth scope, such as for teams and projects (required)\n :param object body: (required)\n :param str pretty: If \'true\', then the output is pretty printed.\n :param str dry_run: When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed\n :param str field_manager: fieldManager is a name associated with the actor or entity that is making these changes. The value must be less than or 128 characters long, and only contain printable characters, as defined by https://golang.org/pkg/unicode/#IsPrint. This field is required for apply requests (application/apply-patch) but optional for non-apply patch types (JsonPatch, MergePatch, StrategicMergePatch).\n :param bool force: Force is going to "force" Apply requests. It means user will re-acquire conflicting fields owned by other people. Force flag must be unset for non-apply patch requests.\n :param _preload_content: if False, the urllib3.HTTPResponse object will\n be returned without reading/decoding response\n data. Default is True.\n :param _request_timeout: timeout setting for this request. If one\n number provided, it will be total request\n timeout. It can also be a pair (tuple) of\n (connection, read) timeouts.\n :return: V1Job\n If the method is called asynchronously,\n returns the request thread.\n ' kwargs['_return_http_data_only'] = True return self.patch_namespaced_job_status_with_http_info(name, namespace, body, **kwargs)
def patch_namespaced_job_status(self, name, namespace, body, **kwargs): 'patch_namespaced_job_status # noqa: E501\n\n partially update status of the specified Job # noqa: E501\n This method makes a synchronous HTTP request by default. To make an\n asynchronous HTTP request, please pass async_req=True\n >>> thread = api.patch_namespaced_job_status(name, namespace, body, async_req=True)\n >>> result = thread.get()\n\n :param async_req bool: execute request asynchronously\n :param str name: name of the Job (required)\n :param str namespace: object name and auth scope, such as for teams and projects (required)\n :param object body: (required)\n :param str pretty: If \'true\', then the output is pretty printed.\n :param str dry_run: When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed\n :param str field_manager: fieldManager is a name associated with the actor or entity that is making these changes. The value must be less than or 128 characters long, and only contain printable characters, as defined by https://golang.org/pkg/unicode/#IsPrint. This field is required for apply requests (application/apply-patch) but optional for non-apply patch types (JsonPatch, MergePatch, StrategicMergePatch).\n :param bool force: Force is going to "force" Apply requests. It means user will re-acquire conflicting fields owned by other people. Force flag must be unset for non-apply patch requests.\n :param _preload_content: if False, the urllib3.HTTPResponse object will\n be returned without reading/decoding response\n data. Default is True.\n :param _request_timeout: timeout setting for this request. If one\n number provided, it will be total request\n timeout. It can also be a pair (tuple) of\n (connection, read) timeouts.\n :return: V1Job\n If the method is called asynchronously,\n returns the request thread.\n ' kwargs['_return_http_data_only'] = True return self.patch_namespaced_job_status_with_http_info(name, namespace, body, **kwargs)<|docstring|>patch_namespaced_job_status # noqa: E501 partially update status of the specified Job # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True >>> thread = api.patch_namespaced_job_status(name, namespace, body, async_req=True) >>> result = thread.get() :param async_req bool: execute request asynchronously :param str name: name of the Job (required) :param str namespace: object name and auth scope, such as for teams and projects (required) :param object body: (required) :param str pretty: If 'true', then the output is pretty printed. :param str dry_run: When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed :param str field_manager: fieldManager is a name associated with the actor or entity that is making these changes. The value must be less than or 128 characters long, and only contain printable characters, as defined by https://golang.org/pkg/unicode/#IsPrint. This field is required for apply requests (application/apply-patch) but optional for non-apply patch types (JsonPatch, MergePatch, StrategicMergePatch). :param bool force: Force is going to "force" Apply requests. It means user will re-acquire conflicting fields owned by other people. Force flag must be unset for non-apply patch requests. :param _preload_content: if False, the urllib3.HTTPResponse object will be returned without reading/decoding response data. Default is True. :param _request_timeout: timeout setting for this request. If one number provided, it will be total request timeout. It can also be a pair (tuple) of (connection, read) timeouts. :return: V1Job If the method is called asynchronously, returns the request thread.<|endoftext|>
d62886c8e7e99aac3a0ea243faff0a4e130bc4366cbdfb74960bbbc872eb8080
def patch_namespaced_job_status_with_http_info(self, name, namespace, body, **kwargs): 'patch_namespaced_job_status # noqa: E501\n\n partially update status of the specified Job # noqa: E501\n This method makes a synchronous HTTP request by default. To make an\n asynchronous HTTP request, please pass async_req=True\n >>> thread = api.patch_namespaced_job_status_with_http_info(name, namespace, body, async_req=True)\n >>> result = thread.get()\n\n :param async_req bool: execute request asynchronously\n :param str name: name of the Job (required)\n :param str namespace: object name and auth scope, such as for teams and projects (required)\n :param object body: (required)\n :param str pretty: If \'true\', then the output is pretty printed.\n :param str dry_run: When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed\n :param str field_manager: fieldManager is a name associated with the actor or entity that is making these changes. The value must be less than or 128 characters long, and only contain printable characters, as defined by https://golang.org/pkg/unicode/#IsPrint. This field is required for apply requests (application/apply-patch) but optional for non-apply patch types (JsonPatch, MergePatch, StrategicMergePatch).\n :param bool force: Force is going to "force" Apply requests. It means user will re-acquire conflicting fields owned by other people. Force flag must be unset for non-apply patch requests.\n :param _return_http_data_only: response data without head status code\n and headers\n :param _preload_content: if False, the urllib3.HTTPResponse object will\n be returned without reading/decoding response\n data. Default is True.\n :param _request_timeout: timeout setting for this request. If one\n number provided, it will be total request\n timeout. It can also be a pair (tuple) of\n (connection, read) timeouts.\n :return: tuple(V1Job, status_code(int), headers(HTTPHeaderDict))\n If the method is called asynchronously,\n returns the request thread.\n ' local_var_params = locals() all_params = ['name', 'namespace', 'body', 'pretty', 'dry_run', 'field_manager', 'force'] all_params.extend(['async_req', '_return_http_data_only', '_preload_content', '_request_timeout']) for (key, val) in six.iteritems(local_var_params['kwargs']): if (key not in all_params): raise ApiTypeError(("Got an unexpected keyword argument '%s' to method patch_namespaced_job_status" % key)) local_var_params[key] = val del local_var_params['kwargs'] if (self.api_client.client_side_validation and (('name' not in local_var_params) or (local_var_params['name'] is None))): raise ApiValueError('Missing the required parameter `name` when calling `patch_namespaced_job_status`') if (self.api_client.client_side_validation and (('namespace' not in local_var_params) or (local_var_params['namespace'] is None))): raise ApiValueError('Missing the required parameter `namespace` when calling `patch_namespaced_job_status`') if (self.api_client.client_side_validation and (('body' not in local_var_params) or (local_var_params['body'] is None))): raise ApiValueError('Missing the required parameter `body` when calling `patch_namespaced_job_status`') collection_formats = {} path_params = {} if ('name' in local_var_params): path_params['name'] = local_var_params['name'] if ('namespace' in local_var_params): path_params['namespace'] = local_var_params['namespace'] query_params = [] if (('pretty' in local_var_params) and (local_var_params['pretty'] is not None)): query_params.append(('pretty', local_var_params['pretty'])) if (('dry_run' in local_var_params) and (local_var_params['dry_run'] is not None)): query_params.append(('dryRun', local_var_params['dry_run'])) if (('field_manager' in local_var_params) and (local_var_params['field_manager'] is not None)): query_params.append(('fieldManager', local_var_params['field_manager'])) if (('force' in local_var_params) and (local_var_params['force'] is not None)): query_params.append(('force', local_var_params['force'])) header_params = {} form_params = [] local_var_files = {} body_params = None if ('body' in local_var_params): body_params = local_var_params['body'] header_params['Accept'] = self.api_client.select_header_accept(['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf']) header_params['Content-Type'] = self.api_client.select_header_content_type(['application/json-patch+json', 'application/merge-patch+json', 'application/strategic-merge-patch+json', 'application/apply-patch+yaml']) auth_settings = ['BearerToken'] return self.api_client.call_api('/apis/batch/v1/namespaces/{namespace}/jobs/{name}/status', 'PATCH', path_params, query_params, header_params, body=body_params, post_params=form_params, files=local_var_files, response_type='V1Job', auth_settings=auth_settings, async_req=local_var_params.get('async_req'), _return_http_data_only=local_var_params.get('_return_http_data_only'), _preload_content=local_var_params.get('_preload_content', True), _request_timeout=local_var_params.get('_request_timeout'), collection_formats=collection_formats)
patch_namespaced_job_status # noqa: E501 partially update status of the specified Job # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True >>> thread = api.patch_namespaced_job_status_with_http_info(name, namespace, body, async_req=True) >>> result = thread.get() :param async_req bool: execute request asynchronously :param str name: name of the Job (required) :param str namespace: object name and auth scope, such as for teams and projects (required) :param object body: (required) :param str pretty: If 'true', then the output is pretty printed. :param str dry_run: When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed :param str field_manager: fieldManager is a name associated with the actor or entity that is making these changes. The value must be less than or 128 characters long, and only contain printable characters, as defined by https://golang.org/pkg/unicode/#IsPrint. This field is required for apply requests (application/apply-patch) but optional for non-apply patch types (JsonPatch, MergePatch, StrategicMergePatch). :param bool force: Force is going to "force" Apply requests. It means user will re-acquire conflicting fields owned by other people. Force flag must be unset for non-apply patch requests. :param _return_http_data_only: response data without head status code and headers :param _preload_content: if False, the urllib3.HTTPResponse object will be returned without reading/decoding response data. Default is True. :param _request_timeout: timeout setting for this request. If one number provided, it will be total request timeout. It can also be a pair (tuple) of (connection, read) timeouts. :return: tuple(V1Job, status_code(int), headers(HTTPHeaderDict)) If the method is called asynchronously, returns the request thread.
kubernetes/client/api/batch_v1_api.py
patch_namespaced_job_status_with_http_info
knkgun/python
1
python
def patch_namespaced_job_status_with_http_info(self, name, namespace, body, **kwargs): 'patch_namespaced_job_status # noqa: E501\n\n partially update status of the specified Job # noqa: E501\n This method makes a synchronous HTTP request by default. To make an\n asynchronous HTTP request, please pass async_req=True\n >>> thread = api.patch_namespaced_job_status_with_http_info(name, namespace, body, async_req=True)\n >>> result = thread.get()\n\n :param async_req bool: execute request asynchronously\n :param str name: name of the Job (required)\n :param str namespace: object name and auth scope, such as for teams and projects (required)\n :param object body: (required)\n :param str pretty: If \'true\', then the output is pretty printed.\n :param str dry_run: When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed\n :param str field_manager: fieldManager is a name associated with the actor or entity that is making these changes. The value must be less than or 128 characters long, and only contain printable characters, as defined by https://golang.org/pkg/unicode/#IsPrint. This field is required for apply requests (application/apply-patch) but optional for non-apply patch types (JsonPatch, MergePatch, StrategicMergePatch).\n :param bool force: Force is going to "force" Apply requests. It means user will re-acquire conflicting fields owned by other people. Force flag must be unset for non-apply patch requests.\n :param _return_http_data_only: response data without head status code\n and headers\n :param _preload_content: if False, the urllib3.HTTPResponse object will\n be returned without reading/decoding response\n data. Default is True.\n :param _request_timeout: timeout setting for this request. If one\n number provided, it will be total request\n timeout. It can also be a pair (tuple) of\n (connection, read) timeouts.\n :return: tuple(V1Job, status_code(int), headers(HTTPHeaderDict))\n If the method is called asynchronously,\n returns the request thread.\n ' local_var_params = locals() all_params = ['name', 'namespace', 'body', 'pretty', 'dry_run', 'field_manager', 'force'] all_params.extend(['async_req', '_return_http_data_only', '_preload_content', '_request_timeout']) for (key, val) in six.iteritems(local_var_params['kwargs']): if (key not in all_params): raise ApiTypeError(("Got an unexpected keyword argument '%s' to method patch_namespaced_job_status" % key)) local_var_params[key] = val del local_var_params['kwargs'] if (self.api_client.client_side_validation and (('name' not in local_var_params) or (local_var_params['name'] is None))): raise ApiValueError('Missing the required parameter `name` when calling `patch_namespaced_job_status`') if (self.api_client.client_side_validation and (('namespace' not in local_var_params) or (local_var_params['namespace'] is None))): raise ApiValueError('Missing the required parameter `namespace` when calling `patch_namespaced_job_status`') if (self.api_client.client_side_validation and (('body' not in local_var_params) or (local_var_params['body'] is None))): raise ApiValueError('Missing the required parameter `body` when calling `patch_namespaced_job_status`') collection_formats = {} path_params = {} if ('name' in local_var_params): path_params['name'] = local_var_params['name'] if ('namespace' in local_var_params): path_params['namespace'] = local_var_params['namespace'] query_params = [] if (('pretty' in local_var_params) and (local_var_params['pretty'] is not None)): query_params.append(('pretty', local_var_params['pretty'])) if (('dry_run' in local_var_params) and (local_var_params['dry_run'] is not None)): query_params.append(('dryRun', local_var_params['dry_run'])) if (('field_manager' in local_var_params) and (local_var_params['field_manager'] is not None)): query_params.append(('fieldManager', local_var_params['field_manager'])) if (('force' in local_var_params) and (local_var_params['force'] is not None)): query_params.append(('force', local_var_params['force'])) header_params = {} form_params = [] local_var_files = {} body_params = None if ('body' in local_var_params): body_params = local_var_params['body'] header_params['Accept'] = self.api_client.select_header_accept(['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf']) header_params['Content-Type'] = self.api_client.select_header_content_type(['application/json-patch+json', 'application/merge-patch+json', 'application/strategic-merge-patch+json', 'application/apply-patch+yaml']) auth_settings = ['BearerToken'] return self.api_client.call_api('/apis/batch/v1/namespaces/{namespace}/jobs/{name}/status', 'PATCH', path_params, query_params, header_params, body=body_params, post_params=form_params, files=local_var_files, response_type='V1Job', auth_settings=auth_settings, async_req=local_var_params.get('async_req'), _return_http_data_only=local_var_params.get('_return_http_data_only'), _preload_content=local_var_params.get('_preload_content', True), _request_timeout=local_var_params.get('_request_timeout'), collection_formats=collection_formats)
def patch_namespaced_job_status_with_http_info(self, name, namespace, body, **kwargs): 'patch_namespaced_job_status # noqa: E501\n\n partially update status of the specified Job # noqa: E501\n This method makes a synchronous HTTP request by default. To make an\n asynchronous HTTP request, please pass async_req=True\n >>> thread = api.patch_namespaced_job_status_with_http_info(name, namespace, body, async_req=True)\n >>> result = thread.get()\n\n :param async_req bool: execute request asynchronously\n :param str name: name of the Job (required)\n :param str namespace: object name and auth scope, such as for teams and projects (required)\n :param object body: (required)\n :param str pretty: If \'true\', then the output is pretty printed.\n :param str dry_run: When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed\n :param str field_manager: fieldManager is a name associated with the actor or entity that is making these changes. The value must be less than or 128 characters long, and only contain printable characters, as defined by https://golang.org/pkg/unicode/#IsPrint. This field is required for apply requests (application/apply-patch) but optional for non-apply patch types (JsonPatch, MergePatch, StrategicMergePatch).\n :param bool force: Force is going to "force" Apply requests. It means user will re-acquire conflicting fields owned by other people. Force flag must be unset for non-apply patch requests.\n :param _return_http_data_only: response data without head status code\n and headers\n :param _preload_content: if False, the urllib3.HTTPResponse object will\n be returned without reading/decoding response\n data. Default is True.\n :param _request_timeout: timeout setting for this request. If one\n number provided, it will be total request\n timeout. It can also be a pair (tuple) of\n (connection, read) timeouts.\n :return: tuple(V1Job, status_code(int), headers(HTTPHeaderDict))\n If the method is called asynchronously,\n returns the request thread.\n ' local_var_params = locals() all_params = ['name', 'namespace', 'body', 'pretty', 'dry_run', 'field_manager', 'force'] all_params.extend(['async_req', '_return_http_data_only', '_preload_content', '_request_timeout']) for (key, val) in six.iteritems(local_var_params['kwargs']): if (key not in all_params): raise ApiTypeError(("Got an unexpected keyword argument '%s' to method patch_namespaced_job_status" % key)) local_var_params[key] = val del local_var_params['kwargs'] if (self.api_client.client_side_validation and (('name' not in local_var_params) or (local_var_params['name'] is None))): raise ApiValueError('Missing the required parameter `name` when calling `patch_namespaced_job_status`') if (self.api_client.client_side_validation and (('namespace' not in local_var_params) or (local_var_params['namespace'] is None))): raise ApiValueError('Missing the required parameter `namespace` when calling `patch_namespaced_job_status`') if (self.api_client.client_side_validation and (('body' not in local_var_params) or (local_var_params['body'] is None))): raise ApiValueError('Missing the required parameter `body` when calling `patch_namespaced_job_status`') collection_formats = {} path_params = {} if ('name' in local_var_params): path_params['name'] = local_var_params['name'] if ('namespace' in local_var_params): path_params['namespace'] = local_var_params['namespace'] query_params = [] if (('pretty' in local_var_params) and (local_var_params['pretty'] is not None)): query_params.append(('pretty', local_var_params['pretty'])) if (('dry_run' in local_var_params) and (local_var_params['dry_run'] is not None)): query_params.append(('dryRun', local_var_params['dry_run'])) if (('field_manager' in local_var_params) and (local_var_params['field_manager'] is not None)): query_params.append(('fieldManager', local_var_params['field_manager'])) if (('force' in local_var_params) and (local_var_params['force'] is not None)): query_params.append(('force', local_var_params['force'])) header_params = {} form_params = [] local_var_files = {} body_params = None if ('body' in local_var_params): body_params = local_var_params['body'] header_params['Accept'] = self.api_client.select_header_accept(['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf']) header_params['Content-Type'] = self.api_client.select_header_content_type(['application/json-patch+json', 'application/merge-patch+json', 'application/strategic-merge-patch+json', 'application/apply-patch+yaml']) auth_settings = ['BearerToken'] return self.api_client.call_api('/apis/batch/v1/namespaces/{namespace}/jobs/{name}/status', 'PATCH', path_params, query_params, header_params, body=body_params, post_params=form_params, files=local_var_files, response_type='V1Job', auth_settings=auth_settings, async_req=local_var_params.get('async_req'), _return_http_data_only=local_var_params.get('_return_http_data_only'), _preload_content=local_var_params.get('_preload_content', True), _request_timeout=local_var_params.get('_request_timeout'), collection_formats=collection_formats)<|docstring|>patch_namespaced_job_status # noqa: E501 partially update status of the specified Job # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True >>> thread = api.patch_namespaced_job_status_with_http_info(name, namespace, body, async_req=True) >>> result = thread.get() :param async_req bool: execute request asynchronously :param str name: name of the Job (required) :param str namespace: object name and auth scope, such as for teams and projects (required) :param object body: (required) :param str pretty: If 'true', then the output is pretty printed. :param str dry_run: When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed :param str field_manager: fieldManager is a name associated with the actor or entity that is making these changes. The value must be less than or 128 characters long, and only contain printable characters, as defined by https://golang.org/pkg/unicode/#IsPrint. This field is required for apply requests (application/apply-patch) but optional for non-apply patch types (JsonPatch, MergePatch, StrategicMergePatch). :param bool force: Force is going to "force" Apply requests. It means user will re-acquire conflicting fields owned by other people. Force flag must be unset for non-apply patch requests. :param _return_http_data_only: response data without head status code and headers :param _preload_content: if False, the urllib3.HTTPResponse object will be returned without reading/decoding response data. Default is True. :param _request_timeout: timeout setting for this request. If one number provided, it will be total request timeout. It can also be a pair (tuple) of (connection, read) timeouts. :return: tuple(V1Job, status_code(int), headers(HTTPHeaderDict)) If the method is called asynchronously, returns the request thread.<|endoftext|>
d4eb34f6f3703532da48124635ce6a6e3eb5717772904de5210a6a3b0b091e0d
def read_namespaced_cron_job(self, name, namespace, **kwargs): "read_namespaced_cron_job # noqa: E501\n\n read the specified CronJob # noqa: E501\n This method makes a synchronous HTTP request by default. To make an\n asynchronous HTTP request, please pass async_req=True\n >>> thread = api.read_namespaced_cron_job(name, namespace, async_req=True)\n >>> result = thread.get()\n\n :param async_req bool: execute request asynchronously\n :param str name: name of the CronJob (required)\n :param str namespace: object name and auth scope, such as for teams and projects (required)\n :param str pretty: If 'true', then the output is pretty printed.\n :param _preload_content: if False, the urllib3.HTTPResponse object will\n be returned without reading/decoding response\n data. Default is True.\n :param _request_timeout: timeout setting for this request. If one\n number provided, it will be total request\n timeout. It can also be a pair (tuple) of\n (connection, read) timeouts.\n :return: V1CronJob\n If the method is called asynchronously,\n returns the request thread.\n " kwargs['_return_http_data_only'] = True return self.read_namespaced_cron_job_with_http_info(name, namespace, **kwargs)
read_namespaced_cron_job # noqa: E501 read the specified CronJob # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True >>> thread = api.read_namespaced_cron_job(name, namespace, async_req=True) >>> result = thread.get() :param async_req bool: execute request asynchronously :param str name: name of the CronJob (required) :param str namespace: object name and auth scope, such as for teams and projects (required) :param str pretty: If 'true', then the output is pretty printed. :param _preload_content: if False, the urllib3.HTTPResponse object will be returned without reading/decoding response data. Default is True. :param _request_timeout: timeout setting for this request. If one number provided, it will be total request timeout. It can also be a pair (tuple) of (connection, read) timeouts. :return: V1CronJob If the method is called asynchronously, returns the request thread.
kubernetes/client/api/batch_v1_api.py
read_namespaced_cron_job
knkgun/python
1
python
def read_namespaced_cron_job(self, name, namespace, **kwargs): "read_namespaced_cron_job # noqa: E501\n\n read the specified CronJob # noqa: E501\n This method makes a synchronous HTTP request by default. To make an\n asynchronous HTTP request, please pass async_req=True\n >>> thread = api.read_namespaced_cron_job(name, namespace, async_req=True)\n >>> result = thread.get()\n\n :param async_req bool: execute request asynchronously\n :param str name: name of the CronJob (required)\n :param str namespace: object name and auth scope, such as for teams and projects (required)\n :param str pretty: If 'true', then the output is pretty printed.\n :param _preload_content: if False, the urllib3.HTTPResponse object will\n be returned without reading/decoding response\n data. Default is True.\n :param _request_timeout: timeout setting for this request. If one\n number provided, it will be total request\n timeout. It can also be a pair (tuple) of\n (connection, read) timeouts.\n :return: V1CronJob\n If the method is called asynchronously,\n returns the request thread.\n " kwargs['_return_http_data_only'] = True return self.read_namespaced_cron_job_with_http_info(name, namespace, **kwargs)
def read_namespaced_cron_job(self, name, namespace, **kwargs): "read_namespaced_cron_job # noqa: E501\n\n read the specified CronJob # noqa: E501\n This method makes a synchronous HTTP request by default. To make an\n asynchronous HTTP request, please pass async_req=True\n >>> thread = api.read_namespaced_cron_job(name, namespace, async_req=True)\n >>> result = thread.get()\n\n :param async_req bool: execute request asynchronously\n :param str name: name of the CronJob (required)\n :param str namespace: object name and auth scope, such as for teams and projects (required)\n :param str pretty: If 'true', then the output is pretty printed.\n :param _preload_content: if False, the urllib3.HTTPResponse object will\n be returned without reading/decoding response\n data. Default is True.\n :param _request_timeout: timeout setting for this request. If one\n number provided, it will be total request\n timeout. It can also be a pair (tuple) of\n (connection, read) timeouts.\n :return: V1CronJob\n If the method is called asynchronously,\n returns the request thread.\n " kwargs['_return_http_data_only'] = True return self.read_namespaced_cron_job_with_http_info(name, namespace, **kwargs)<|docstring|>read_namespaced_cron_job # noqa: E501 read the specified CronJob # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True >>> thread = api.read_namespaced_cron_job(name, namespace, async_req=True) >>> result = thread.get() :param async_req bool: execute request asynchronously :param str name: name of the CronJob (required) :param str namespace: object name and auth scope, such as for teams and projects (required) :param str pretty: If 'true', then the output is pretty printed. :param _preload_content: if False, the urllib3.HTTPResponse object will be returned without reading/decoding response data. Default is True. :param _request_timeout: timeout setting for this request. If one number provided, it will be total request timeout. It can also be a pair (tuple) of (connection, read) timeouts. :return: V1CronJob If the method is called asynchronously, returns the request thread.<|endoftext|>
1bc14d4ad8806184047158ea5086af6bb197021a8ed97a22eea8e8f8a32e7d62
def read_namespaced_cron_job_with_http_info(self, name, namespace, **kwargs): "read_namespaced_cron_job # noqa: E501\n\n read the specified CronJob # noqa: E501\n This method makes a synchronous HTTP request by default. To make an\n asynchronous HTTP request, please pass async_req=True\n >>> thread = api.read_namespaced_cron_job_with_http_info(name, namespace, async_req=True)\n >>> result = thread.get()\n\n :param async_req bool: execute request asynchronously\n :param str name: name of the CronJob (required)\n :param str namespace: object name and auth scope, such as for teams and projects (required)\n :param str pretty: If 'true', then the output is pretty printed.\n :param _return_http_data_only: response data without head status code\n and headers\n :param _preload_content: if False, the urllib3.HTTPResponse object will\n be returned without reading/decoding response\n data. Default is True.\n :param _request_timeout: timeout setting for this request. If one\n number provided, it will be total request\n timeout. It can also be a pair (tuple) of\n (connection, read) timeouts.\n :return: tuple(V1CronJob, status_code(int), headers(HTTPHeaderDict))\n If the method is called asynchronously,\n returns the request thread.\n " local_var_params = locals() all_params = ['name', 'namespace', 'pretty'] all_params.extend(['async_req', '_return_http_data_only', '_preload_content', '_request_timeout']) for (key, val) in six.iteritems(local_var_params['kwargs']): if (key not in all_params): raise ApiTypeError(("Got an unexpected keyword argument '%s' to method read_namespaced_cron_job" % key)) local_var_params[key] = val del local_var_params['kwargs'] if (self.api_client.client_side_validation and (('name' not in local_var_params) or (local_var_params['name'] is None))): raise ApiValueError('Missing the required parameter `name` when calling `read_namespaced_cron_job`') if (self.api_client.client_side_validation and (('namespace' not in local_var_params) or (local_var_params['namespace'] is None))): raise ApiValueError('Missing the required parameter `namespace` when calling `read_namespaced_cron_job`') collection_formats = {} path_params = {} if ('name' in local_var_params): path_params['name'] = local_var_params['name'] if ('namespace' in local_var_params): path_params['namespace'] = local_var_params['namespace'] query_params = [] if (('pretty' in local_var_params) and (local_var_params['pretty'] is not None)): query_params.append(('pretty', local_var_params['pretty'])) header_params = {} form_params = [] local_var_files = {} body_params = None header_params['Accept'] = self.api_client.select_header_accept(['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf']) auth_settings = ['BearerToken'] return self.api_client.call_api('/apis/batch/v1/namespaces/{namespace}/cronjobs/{name}', 'GET', path_params, query_params, header_params, body=body_params, post_params=form_params, files=local_var_files, response_type='V1CronJob', auth_settings=auth_settings, async_req=local_var_params.get('async_req'), _return_http_data_only=local_var_params.get('_return_http_data_only'), _preload_content=local_var_params.get('_preload_content', True), _request_timeout=local_var_params.get('_request_timeout'), collection_formats=collection_formats)
read_namespaced_cron_job # noqa: E501 read the specified CronJob # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True >>> thread = api.read_namespaced_cron_job_with_http_info(name, namespace, async_req=True) >>> result = thread.get() :param async_req bool: execute request asynchronously :param str name: name of the CronJob (required) :param str namespace: object name and auth scope, such as for teams and projects (required) :param str pretty: If 'true', then the output is pretty printed. :param _return_http_data_only: response data without head status code and headers :param _preload_content: if False, the urllib3.HTTPResponse object will be returned without reading/decoding response data. Default is True. :param _request_timeout: timeout setting for this request. If one number provided, it will be total request timeout. It can also be a pair (tuple) of (connection, read) timeouts. :return: tuple(V1CronJob, status_code(int), headers(HTTPHeaderDict)) If the method is called asynchronously, returns the request thread.
kubernetes/client/api/batch_v1_api.py
read_namespaced_cron_job_with_http_info
knkgun/python
1
python
def read_namespaced_cron_job_with_http_info(self, name, namespace, **kwargs): "read_namespaced_cron_job # noqa: E501\n\n read the specified CronJob # noqa: E501\n This method makes a synchronous HTTP request by default. To make an\n asynchronous HTTP request, please pass async_req=True\n >>> thread = api.read_namespaced_cron_job_with_http_info(name, namespace, async_req=True)\n >>> result = thread.get()\n\n :param async_req bool: execute request asynchronously\n :param str name: name of the CronJob (required)\n :param str namespace: object name and auth scope, such as for teams and projects (required)\n :param str pretty: If 'true', then the output is pretty printed.\n :param _return_http_data_only: response data without head status code\n and headers\n :param _preload_content: if False, the urllib3.HTTPResponse object will\n be returned without reading/decoding response\n data. Default is True.\n :param _request_timeout: timeout setting for this request. If one\n number provided, it will be total request\n timeout. It can also be a pair (tuple) of\n (connection, read) timeouts.\n :return: tuple(V1CronJob, status_code(int), headers(HTTPHeaderDict))\n If the method is called asynchronously,\n returns the request thread.\n " local_var_params = locals() all_params = ['name', 'namespace', 'pretty'] all_params.extend(['async_req', '_return_http_data_only', '_preload_content', '_request_timeout']) for (key, val) in six.iteritems(local_var_params['kwargs']): if (key not in all_params): raise ApiTypeError(("Got an unexpected keyword argument '%s' to method read_namespaced_cron_job" % key)) local_var_params[key] = val del local_var_params['kwargs'] if (self.api_client.client_side_validation and (('name' not in local_var_params) or (local_var_params['name'] is None))): raise ApiValueError('Missing the required parameter `name` when calling `read_namespaced_cron_job`') if (self.api_client.client_side_validation and (('namespace' not in local_var_params) or (local_var_params['namespace'] is None))): raise ApiValueError('Missing the required parameter `namespace` when calling `read_namespaced_cron_job`') collection_formats = {} path_params = {} if ('name' in local_var_params): path_params['name'] = local_var_params['name'] if ('namespace' in local_var_params): path_params['namespace'] = local_var_params['namespace'] query_params = [] if (('pretty' in local_var_params) and (local_var_params['pretty'] is not None)): query_params.append(('pretty', local_var_params['pretty'])) header_params = {} form_params = [] local_var_files = {} body_params = None header_params['Accept'] = self.api_client.select_header_accept(['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf']) auth_settings = ['BearerToken'] return self.api_client.call_api('/apis/batch/v1/namespaces/{namespace}/cronjobs/{name}', 'GET', path_params, query_params, header_params, body=body_params, post_params=form_params, files=local_var_files, response_type='V1CronJob', auth_settings=auth_settings, async_req=local_var_params.get('async_req'), _return_http_data_only=local_var_params.get('_return_http_data_only'), _preload_content=local_var_params.get('_preload_content', True), _request_timeout=local_var_params.get('_request_timeout'), collection_formats=collection_formats)
def read_namespaced_cron_job_with_http_info(self, name, namespace, **kwargs): "read_namespaced_cron_job # noqa: E501\n\n read the specified CronJob # noqa: E501\n This method makes a synchronous HTTP request by default. To make an\n asynchronous HTTP request, please pass async_req=True\n >>> thread = api.read_namespaced_cron_job_with_http_info(name, namespace, async_req=True)\n >>> result = thread.get()\n\n :param async_req bool: execute request asynchronously\n :param str name: name of the CronJob (required)\n :param str namespace: object name and auth scope, such as for teams and projects (required)\n :param str pretty: If 'true', then the output is pretty printed.\n :param _return_http_data_only: response data without head status code\n and headers\n :param _preload_content: if False, the urllib3.HTTPResponse object will\n be returned without reading/decoding response\n data. Default is True.\n :param _request_timeout: timeout setting for this request. If one\n number provided, it will be total request\n timeout. It can also be a pair (tuple) of\n (connection, read) timeouts.\n :return: tuple(V1CronJob, status_code(int), headers(HTTPHeaderDict))\n If the method is called asynchronously,\n returns the request thread.\n " local_var_params = locals() all_params = ['name', 'namespace', 'pretty'] all_params.extend(['async_req', '_return_http_data_only', '_preload_content', '_request_timeout']) for (key, val) in six.iteritems(local_var_params['kwargs']): if (key not in all_params): raise ApiTypeError(("Got an unexpected keyword argument '%s' to method read_namespaced_cron_job" % key)) local_var_params[key] = val del local_var_params['kwargs'] if (self.api_client.client_side_validation and (('name' not in local_var_params) or (local_var_params['name'] is None))): raise ApiValueError('Missing the required parameter `name` when calling `read_namespaced_cron_job`') if (self.api_client.client_side_validation and (('namespace' not in local_var_params) or (local_var_params['namespace'] is None))): raise ApiValueError('Missing the required parameter `namespace` when calling `read_namespaced_cron_job`') collection_formats = {} path_params = {} if ('name' in local_var_params): path_params['name'] = local_var_params['name'] if ('namespace' in local_var_params): path_params['namespace'] = local_var_params['namespace'] query_params = [] if (('pretty' in local_var_params) and (local_var_params['pretty'] is not None)): query_params.append(('pretty', local_var_params['pretty'])) header_params = {} form_params = [] local_var_files = {} body_params = None header_params['Accept'] = self.api_client.select_header_accept(['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf']) auth_settings = ['BearerToken'] return self.api_client.call_api('/apis/batch/v1/namespaces/{namespace}/cronjobs/{name}', 'GET', path_params, query_params, header_params, body=body_params, post_params=form_params, files=local_var_files, response_type='V1CronJob', auth_settings=auth_settings, async_req=local_var_params.get('async_req'), _return_http_data_only=local_var_params.get('_return_http_data_only'), _preload_content=local_var_params.get('_preload_content', True), _request_timeout=local_var_params.get('_request_timeout'), collection_formats=collection_formats)<|docstring|>read_namespaced_cron_job # noqa: E501 read the specified CronJob # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True >>> thread = api.read_namespaced_cron_job_with_http_info(name, namespace, async_req=True) >>> result = thread.get() :param async_req bool: execute request asynchronously :param str name: name of the CronJob (required) :param str namespace: object name and auth scope, such as for teams and projects (required) :param str pretty: If 'true', then the output is pretty printed. :param _return_http_data_only: response data without head status code and headers :param _preload_content: if False, the urllib3.HTTPResponse object will be returned without reading/decoding response data. Default is True. :param _request_timeout: timeout setting for this request. If one number provided, it will be total request timeout. It can also be a pair (tuple) of (connection, read) timeouts. :return: tuple(V1CronJob, status_code(int), headers(HTTPHeaderDict)) If the method is called asynchronously, returns the request thread.<|endoftext|>
cb96ae5a4a352c998d5b5385f8d86e7aa56c4b438a2afca4cf6d5b4ebba4d928
def read_namespaced_cron_job_status(self, name, namespace, **kwargs): "read_namespaced_cron_job_status # noqa: E501\n\n read status of the specified CronJob # noqa: E501\n This method makes a synchronous HTTP request by default. To make an\n asynchronous HTTP request, please pass async_req=True\n >>> thread = api.read_namespaced_cron_job_status(name, namespace, async_req=True)\n >>> result = thread.get()\n\n :param async_req bool: execute request asynchronously\n :param str name: name of the CronJob (required)\n :param str namespace: object name and auth scope, such as for teams and projects (required)\n :param str pretty: If 'true', then the output is pretty printed.\n :param _preload_content: if False, the urllib3.HTTPResponse object will\n be returned without reading/decoding response\n data. Default is True.\n :param _request_timeout: timeout setting for this request. If one\n number provided, it will be total request\n timeout. It can also be a pair (tuple) of\n (connection, read) timeouts.\n :return: V1CronJob\n If the method is called asynchronously,\n returns the request thread.\n " kwargs['_return_http_data_only'] = True return self.read_namespaced_cron_job_status_with_http_info(name, namespace, **kwargs)
read_namespaced_cron_job_status # noqa: E501 read status of the specified CronJob # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True >>> thread = api.read_namespaced_cron_job_status(name, namespace, async_req=True) >>> result = thread.get() :param async_req bool: execute request asynchronously :param str name: name of the CronJob (required) :param str namespace: object name and auth scope, such as for teams and projects (required) :param str pretty: If 'true', then the output is pretty printed. :param _preload_content: if False, the urllib3.HTTPResponse object will be returned without reading/decoding response data. Default is True. :param _request_timeout: timeout setting for this request. If one number provided, it will be total request timeout. It can also be a pair (tuple) of (connection, read) timeouts. :return: V1CronJob If the method is called asynchronously, returns the request thread.
kubernetes/client/api/batch_v1_api.py
read_namespaced_cron_job_status
knkgun/python
1
python
def read_namespaced_cron_job_status(self, name, namespace, **kwargs): "read_namespaced_cron_job_status # noqa: E501\n\n read status of the specified CronJob # noqa: E501\n This method makes a synchronous HTTP request by default. To make an\n asynchronous HTTP request, please pass async_req=True\n >>> thread = api.read_namespaced_cron_job_status(name, namespace, async_req=True)\n >>> result = thread.get()\n\n :param async_req bool: execute request asynchronously\n :param str name: name of the CronJob (required)\n :param str namespace: object name and auth scope, such as for teams and projects (required)\n :param str pretty: If 'true', then the output is pretty printed.\n :param _preload_content: if False, the urllib3.HTTPResponse object will\n be returned without reading/decoding response\n data. Default is True.\n :param _request_timeout: timeout setting for this request. If one\n number provided, it will be total request\n timeout. It can also be a pair (tuple) of\n (connection, read) timeouts.\n :return: V1CronJob\n If the method is called asynchronously,\n returns the request thread.\n " kwargs['_return_http_data_only'] = True return self.read_namespaced_cron_job_status_with_http_info(name, namespace, **kwargs)
def read_namespaced_cron_job_status(self, name, namespace, **kwargs): "read_namespaced_cron_job_status # noqa: E501\n\n read status of the specified CronJob # noqa: E501\n This method makes a synchronous HTTP request by default. To make an\n asynchronous HTTP request, please pass async_req=True\n >>> thread = api.read_namespaced_cron_job_status(name, namespace, async_req=True)\n >>> result = thread.get()\n\n :param async_req bool: execute request asynchronously\n :param str name: name of the CronJob (required)\n :param str namespace: object name and auth scope, such as for teams and projects (required)\n :param str pretty: If 'true', then the output is pretty printed.\n :param _preload_content: if False, the urllib3.HTTPResponse object will\n be returned without reading/decoding response\n data. Default is True.\n :param _request_timeout: timeout setting for this request. If one\n number provided, it will be total request\n timeout. It can also be a pair (tuple) of\n (connection, read) timeouts.\n :return: V1CronJob\n If the method is called asynchronously,\n returns the request thread.\n " kwargs['_return_http_data_only'] = True return self.read_namespaced_cron_job_status_with_http_info(name, namespace, **kwargs)<|docstring|>read_namespaced_cron_job_status # noqa: E501 read status of the specified CronJob # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True >>> thread = api.read_namespaced_cron_job_status(name, namespace, async_req=True) >>> result = thread.get() :param async_req bool: execute request asynchronously :param str name: name of the CronJob (required) :param str namespace: object name and auth scope, such as for teams and projects (required) :param str pretty: If 'true', then the output is pretty printed. :param _preload_content: if False, the urllib3.HTTPResponse object will be returned without reading/decoding response data. Default is True. :param _request_timeout: timeout setting for this request. If one number provided, it will be total request timeout. It can also be a pair (tuple) of (connection, read) timeouts. :return: V1CronJob If the method is called asynchronously, returns the request thread.<|endoftext|>
7f3dce3d8f2d45c2196abe9ebc46aa535bed14d233265ddd0444b47d6a7c925d
def read_namespaced_cron_job_status_with_http_info(self, name, namespace, **kwargs): "read_namespaced_cron_job_status # noqa: E501\n\n read status of the specified CronJob # noqa: E501\n This method makes a synchronous HTTP request by default. To make an\n asynchronous HTTP request, please pass async_req=True\n >>> thread = api.read_namespaced_cron_job_status_with_http_info(name, namespace, async_req=True)\n >>> result = thread.get()\n\n :param async_req bool: execute request asynchronously\n :param str name: name of the CronJob (required)\n :param str namespace: object name and auth scope, such as for teams and projects (required)\n :param str pretty: If 'true', then the output is pretty printed.\n :param _return_http_data_only: response data without head status code\n and headers\n :param _preload_content: if False, the urllib3.HTTPResponse object will\n be returned without reading/decoding response\n data. Default is True.\n :param _request_timeout: timeout setting for this request. If one\n number provided, it will be total request\n timeout. It can also be a pair (tuple) of\n (connection, read) timeouts.\n :return: tuple(V1CronJob, status_code(int), headers(HTTPHeaderDict))\n If the method is called asynchronously,\n returns the request thread.\n " local_var_params = locals() all_params = ['name', 'namespace', 'pretty'] all_params.extend(['async_req', '_return_http_data_only', '_preload_content', '_request_timeout']) for (key, val) in six.iteritems(local_var_params['kwargs']): if (key not in all_params): raise ApiTypeError(("Got an unexpected keyword argument '%s' to method read_namespaced_cron_job_status" % key)) local_var_params[key] = val del local_var_params['kwargs'] if (self.api_client.client_side_validation and (('name' not in local_var_params) or (local_var_params['name'] is None))): raise ApiValueError('Missing the required parameter `name` when calling `read_namespaced_cron_job_status`') if (self.api_client.client_side_validation and (('namespace' not in local_var_params) or (local_var_params['namespace'] is None))): raise ApiValueError('Missing the required parameter `namespace` when calling `read_namespaced_cron_job_status`') collection_formats = {} path_params = {} if ('name' in local_var_params): path_params['name'] = local_var_params['name'] if ('namespace' in local_var_params): path_params['namespace'] = local_var_params['namespace'] query_params = [] if (('pretty' in local_var_params) and (local_var_params['pretty'] is not None)): query_params.append(('pretty', local_var_params['pretty'])) header_params = {} form_params = [] local_var_files = {} body_params = None header_params['Accept'] = self.api_client.select_header_accept(['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf']) auth_settings = ['BearerToken'] return self.api_client.call_api('/apis/batch/v1/namespaces/{namespace}/cronjobs/{name}/status', 'GET', path_params, query_params, header_params, body=body_params, post_params=form_params, files=local_var_files, response_type='V1CronJob', auth_settings=auth_settings, async_req=local_var_params.get('async_req'), _return_http_data_only=local_var_params.get('_return_http_data_only'), _preload_content=local_var_params.get('_preload_content', True), _request_timeout=local_var_params.get('_request_timeout'), collection_formats=collection_formats)
read_namespaced_cron_job_status # noqa: E501 read status of the specified CronJob # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True >>> thread = api.read_namespaced_cron_job_status_with_http_info(name, namespace, async_req=True) >>> result = thread.get() :param async_req bool: execute request asynchronously :param str name: name of the CronJob (required) :param str namespace: object name and auth scope, such as for teams and projects (required) :param str pretty: If 'true', then the output is pretty printed. :param _return_http_data_only: response data without head status code and headers :param _preload_content: if False, the urllib3.HTTPResponse object will be returned without reading/decoding response data. Default is True. :param _request_timeout: timeout setting for this request. If one number provided, it will be total request timeout. It can also be a pair (tuple) of (connection, read) timeouts. :return: tuple(V1CronJob, status_code(int), headers(HTTPHeaderDict)) If the method is called asynchronously, returns the request thread.
kubernetes/client/api/batch_v1_api.py
read_namespaced_cron_job_status_with_http_info
knkgun/python
1
python
def read_namespaced_cron_job_status_with_http_info(self, name, namespace, **kwargs): "read_namespaced_cron_job_status # noqa: E501\n\n read status of the specified CronJob # noqa: E501\n This method makes a synchronous HTTP request by default. To make an\n asynchronous HTTP request, please pass async_req=True\n >>> thread = api.read_namespaced_cron_job_status_with_http_info(name, namespace, async_req=True)\n >>> result = thread.get()\n\n :param async_req bool: execute request asynchronously\n :param str name: name of the CronJob (required)\n :param str namespace: object name and auth scope, such as for teams and projects (required)\n :param str pretty: If 'true', then the output is pretty printed.\n :param _return_http_data_only: response data without head status code\n and headers\n :param _preload_content: if False, the urllib3.HTTPResponse object will\n be returned without reading/decoding response\n data. Default is True.\n :param _request_timeout: timeout setting for this request. If one\n number provided, it will be total request\n timeout. It can also be a pair (tuple) of\n (connection, read) timeouts.\n :return: tuple(V1CronJob, status_code(int), headers(HTTPHeaderDict))\n If the method is called asynchronously,\n returns the request thread.\n " local_var_params = locals() all_params = ['name', 'namespace', 'pretty'] all_params.extend(['async_req', '_return_http_data_only', '_preload_content', '_request_timeout']) for (key, val) in six.iteritems(local_var_params['kwargs']): if (key not in all_params): raise ApiTypeError(("Got an unexpected keyword argument '%s' to method read_namespaced_cron_job_status" % key)) local_var_params[key] = val del local_var_params['kwargs'] if (self.api_client.client_side_validation and (('name' not in local_var_params) or (local_var_params['name'] is None))): raise ApiValueError('Missing the required parameter `name` when calling `read_namespaced_cron_job_status`') if (self.api_client.client_side_validation and (('namespace' not in local_var_params) or (local_var_params['namespace'] is None))): raise ApiValueError('Missing the required parameter `namespace` when calling `read_namespaced_cron_job_status`') collection_formats = {} path_params = {} if ('name' in local_var_params): path_params['name'] = local_var_params['name'] if ('namespace' in local_var_params): path_params['namespace'] = local_var_params['namespace'] query_params = [] if (('pretty' in local_var_params) and (local_var_params['pretty'] is not None)): query_params.append(('pretty', local_var_params['pretty'])) header_params = {} form_params = [] local_var_files = {} body_params = None header_params['Accept'] = self.api_client.select_header_accept(['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf']) auth_settings = ['BearerToken'] return self.api_client.call_api('/apis/batch/v1/namespaces/{namespace}/cronjobs/{name}/status', 'GET', path_params, query_params, header_params, body=body_params, post_params=form_params, files=local_var_files, response_type='V1CronJob', auth_settings=auth_settings, async_req=local_var_params.get('async_req'), _return_http_data_only=local_var_params.get('_return_http_data_only'), _preload_content=local_var_params.get('_preload_content', True), _request_timeout=local_var_params.get('_request_timeout'), collection_formats=collection_formats)
def read_namespaced_cron_job_status_with_http_info(self, name, namespace, **kwargs): "read_namespaced_cron_job_status # noqa: E501\n\n read status of the specified CronJob # noqa: E501\n This method makes a synchronous HTTP request by default. To make an\n asynchronous HTTP request, please pass async_req=True\n >>> thread = api.read_namespaced_cron_job_status_with_http_info(name, namespace, async_req=True)\n >>> result = thread.get()\n\n :param async_req bool: execute request asynchronously\n :param str name: name of the CronJob (required)\n :param str namespace: object name and auth scope, such as for teams and projects (required)\n :param str pretty: If 'true', then the output is pretty printed.\n :param _return_http_data_only: response data without head status code\n and headers\n :param _preload_content: if False, the urllib3.HTTPResponse object will\n be returned without reading/decoding response\n data. Default is True.\n :param _request_timeout: timeout setting for this request. If one\n number provided, it will be total request\n timeout. It can also be a pair (tuple) of\n (connection, read) timeouts.\n :return: tuple(V1CronJob, status_code(int), headers(HTTPHeaderDict))\n If the method is called asynchronously,\n returns the request thread.\n " local_var_params = locals() all_params = ['name', 'namespace', 'pretty'] all_params.extend(['async_req', '_return_http_data_only', '_preload_content', '_request_timeout']) for (key, val) in six.iteritems(local_var_params['kwargs']): if (key not in all_params): raise ApiTypeError(("Got an unexpected keyword argument '%s' to method read_namespaced_cron_job_status" % key)) local_var_params[key] = val del local_var_params['kwargs'] if (self.api_client.client_side_validation and (('name' not in local_var_params) or (local_var_params['name'] is None))): raise ApiValueError('Missing the required parameter `name` when calling `read_namespaced_cron_job_status`') if (self.api_client.client_side_validation and (('namespace' not in local_var_params) or (local_var_params['namespace'] is None))): raise ApiValueError('Missing the required parameter `namespace` when calling `read_namespaced_cron_job_status`') collection_formats = {} path_params = {} if ('name' in local_var_params): path_params['name'] = local_var_params['name'] if ('namespace' in local_var_params): path_params['namespace'] = local_var_params['namespace'] query_params = [] if (('pretty' in local_var_params) and (local_var_params['pretty'] is not None)): query_params.append(('pretty', local_var_params['pretty'])) header_params = {} form_params = [] local_var_files = {} body_params = None header_params['Accept'] = self.api_client.select_header_accept(['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf']) auth_settings = ['BearerToken'] return self.api_client.call_api('/apis/batch/v1/namespaces/{namespace}/cronjobs/{name}/status', 'GET', path_params, query_params, header_params, body=body_params, post_params=form_params, files=local_var_files, response_type='V1CronJob', auth_settings=auth_settings, async_req=local_var_params.get('async_req'), _return_http_data_only=local_var_params.get('_return_http_data_only'), _preload_content=local_var_params.get('_preload_content', True), _request_timeout=local_var_params.get('_request_timeout'), collection_formats=collection_formats)<|docstring|>read_namespaced_cron_job_status # noqa: E501 read status of the specified CronJob # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True >>> thread = api.read_namespaced_cron_job_status_with_http_info(name, namespace, async_req=True) >>> result = thread.get() :param async_req bool: execute request asynchronously :param str name: name of the CronJob (required) :param str namespace: object name and auth scope, such as for teams and projects (required) :param str pretty: If 'true', then the output is pretty printed. :param _return_http_data_only: response data without head status code and headers :param _preload_content: if False, the urllib3.HTTPResponse object will be returned without reading/decoding response data. Default is True. :param _request_timeout: timeout setting for this request. If one number provided, it will be total request timeout. It can also be a pair (tuple) of (connection, read) timeouts. :return: tuple(V1CronJob, status_code(int), headers(HTTPHeaderDict)) If the method is called asynchronously, returns the request thread.<|endoftext|>
0db7767d9d360450c4b847239eff00504ddb25106c5da9aa97caa0b86e890f92
def read_namespaced_job(self, name, namespace, **kwargs): "read_namespaced_job # noqa: E501\n\n read the specified Job # noqa: E501\n This method makes a synchronous HTTP request by default. To make an\n asynchronous HTTP request, please pass async_req=True\n >>> thread = api.read_namespaced_job(name, namespace, async_req=True)\n >>> result = thread.get()\n\n :param async_req bool: execute request asynchronously\n :param str name: name of the Job (required)\n :param str namespace: object name and auth scope, such as for teams and projects (required)\n :param str pretty: If 'true', then the output is pretty printed.\n :param _preload_content: if False, the urllib3.HTTPResponse object will\n be returned without reading/decoding response\n data. Default is True.\n :param _request_timeout: timeout setting for this request. If one\n number provided, it will be total request\n timeout. It can also be a pair (tuple) of\n (connection, read) timeouts.\n :return: V1Job\n If the method is called asynchronously,\n returns the request thread.\n " kwargs['_return_http_data_only'] = True return self.read_namespaced_job_with_http_info(name, namespace, **kwargs)
read_namespaced_job # noqa: E501 read the specified Job # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True >>> thread = api.read_namespaced_job(name, namespace, async_req=True) >>> result = thread.get() :param async_req bool: execute request asynchronously :param str name: name of the Job (required) :param str namespace: object name and auth scope, such as for teams and projects (required) :param str pretty: If 'true', then the output is pretty printed. :param _preload_content: if False, the urllib3.HTTPResponse object will be returned without reading/decoding response data. Default is True. :param _request_timeout: timeout setting for this request. If one number provided, it will be total request timeout. It can also be a pair (tuple) of (connection, read) timeouts. :return: V1Job If the method is called asynchronously, returns the request thread.
kubernetes/client/api/batch_v1_api.py
read_namespaced_job
knkgun/python
1
python
def read_namespaced_job(self, name, namespace, **kwargs): "read_namespaced_job # noqa: E501\n\n read the specified Job # noqa: E501\n This method makes a synchronous HTTP request by default. To make an\n asynchronous HTTP request, please pass async_req=True\n >>> thread = api.read_namespaced_job(name, namespace, async_req=True)\n >>> result = thread.get()\n\n :param async_req bool: execute request asynchronously\n :param str name: name of the Job (required)\n :param str namespace: object name and auth scope, such as for teams and projects (required)\n :param str pretty: If 'true', then the output is pretty printed.\n :param _preload_content: if False, the urllib3.HTTPResponse object will\n be returned without reading/decoding response\n data. Default is True.\n :param _request_timeout: timeout setting for this request. If one\n number provided, it will be total request\n timeout. It can also be a pair (tuple) of\n (connection, read) timeouts.\n :return: V1Job\n If the method is called asynchronously,\n returns the request thread.\n " kwargs['_return_http_data_only'] = True return self.read_namespaced_job_with_http_info(name, namespace, **kwargs)
def read_namespaced_job(self, name, namespace, **kwargs): "read_namespaced_job # noqa: E501\n\n read the specified Job # noqa: E501\n This method makes a synchronous HTTP request by default. To make an\n asynchronous HTTP request, please pass async_req=True\n >>> thread = api.read_namespaced_job(name, namespace, async_req=True)\n >>> result = thread.get()\n\n :param async_req bool: execute request asynchronously\n :param str name: name of the Job (required)\n :param str namespace: object name and auth scope, such as for teams and projects (required)\n :param str pretty: If 'true', then the output is pretty printed.\n :param _preload_content: if False, the urllib3.HTTPResponse object will\n be returned without reading/decoding response\n data. Default is True.\n :param _request_timeout: timeout setting for this request. If one\n number provided, it will be total request\n timeout. It can also be a pair (tuple) of\n (connection, read) timeouts.\n :return: V1Job\n If the method is called asynchronously,\n returns the request thread.\n " kwargs['_return_http_data_only'] = True return self.read_namespaced_job_with_http_info(name, namespace, **kwargs)<|docstring|>read_namespaced_job # noqa: E501 read the specified Job # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True >>> thread = api.read_namespaced_job(name, namespace, async_req=True) >>> result = thread.get() :param async_req bool: execute request asynchronously :param str name: name of the Job (required) :param str namespace: object name and auth scope, such as for teams and projects (required) :param str pretty: If 'true', then the output is pretty printed. :param _preload_content: if False, the urllib3.HTTPResponse object will be returned without reading/decoding response data. Default is True. :param _request_timeout: timeout setting for this request. If one number provided, it will be total request timeout. It can also be a pair (tuple) of (connection, read) timeouts. :return: V1Job If the method is called asynchronously, returns the request thread.<|endoftext|>
98874cc0e23f042105f4e0ae9adbaf7ea57166abadf36bc9630bbf817bb3a5d5
def read_namespaced_job_with_http_info(self, name, namespace, **kwargs): "read_namespaced_job # noqa: E501\n\n read the specified Job # noqa: E501\n This method makes a synchronous HTTP request by default. To make an\n asynchronous HTTP request, please pass async_req=True\n >>> thread = api.read_namespaced_job_with_http_info(name, namespace, async_req=True)\n >>> result = thread.get()\n\n :param async_req bool: execute request asynchronously\n :param str name: name of the Job (required)\n :param str namespace: object name and auth scope, such as for teams and projects (required)\n :param str pretty: If 'true', then the output is pretty printed.\n :param _return_http_data_only: response data without head status code\n and headers\n :param _preload_content: if False, the urllib3.HTTPResponse object will\n be returned without reading/decoding response\n data. Default is True.\n :param _request_timeout: timeout setting for this request. If one\n number provided, it will be total request\n timeout. It can also be a pair (tuple) of\n (connection, read) timeouts.\n :return: tuple(V1Job, status_code(int), headers(HTTPHeaderDict))\n If the method is called asynchronously,\n returns the request thread.\n " local_var_params = locals() all_params = ['name', 'namespace', 'pretty'] all_params.extend(['async_req', '_return_http_data_only', '_preload_content', '_request_timeout']) for (key, val) in six.iteritems(local_var_params['kwargs']): if (key not in all_params): raise ApiTypeError(("Got an unexpected keyword argument '%s' to method read_namespaced_job" % key)) local_var_params[key] = val del local_var_params['kwargs'] if (self.api_client.client_side_validation and (('name' not in local_var_params) or (local_var_params['name'] is None))): raise ApiValueError('Missing the required parameter `name` when calling `read_namespaced_job`') if (self.api_client.client_side_validation and (('namespace' not in local_var_params) or (local_var_params['namespace'] is None))): raise ApiValueError('Missing the required parameter `namespace` when calling `read_namespaced_job`') collection_formats = {} path_params = {} if ('name' in local_var_params): path_params['name'] = local_var_params['name'] if ('namespace' in local_var_params): path_params['namespace'] = local_var_params['namespace'] query_params = [] if (('pretty' in local_var_params) and (local_var_params['pretty'] is not None)): query_params.append(('pretty', local_var_params['pretty'])) header_params = {} form_params = [] local_var_files = {} body_params = None header_params['Accept'] = self.api_client.select_header_accept(['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf']) auth_settings = ['BearerToken'] return self.api_client.call_api('/apis/batch/v1/namespaces/{namespace}/jobs/{name}', 'GET', path_params, query_params, header_params, body=body_params, post_params=form_params, files=local_var_files, response_type='V1Job', auth_settings=auth_settings, async_req=local_var_params.get('async_req'), _return_http_data_only=local_var_params.get('_return_http_data_only'), _preload_content=local_var_params.get('_preload_content', True), _request_timeout=local_var_params.get('_request_timeout'), collection_formats=collection_formats)
read_namespaced_job # noqa: E501 read the specified Job # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True >>> thread = api.read_namespaced_job_with_http_info(name, namespace, async_req=True) >>> result = thread.get() :param async_req bool: execute request asynchronously :param str name: name of the Job (required) :param str namespace: object name and auth scope, such as for teams and projects (required) :param str pretty: If 'true', then the output is pretty printed. :param _return_http_data_only: response data without head status code and headers :param _preload_content: if False, the urllib3.HTTPResponse object will be returned without reading/decoding response data. Default is True. :param _request_timeout: timeout setting for this request. If one number provided, it will be total request timeout. It can also be a pair (tuple) of (connection, read) timeouts. :return: tuple(V1Job, status_code(int), headers(HTTPHeaderDict)) If the method is called asynchronously, returns the request thread.
kubernetes/client/api/batch_v1_api.py
read_namespaced_job_with_http_info
knkgun/python
1
python
def read_namespaced_job_with_http_info(self, name, namespace, **kwargs): "read_namespaced_job # noqa: E501\n\n read the specified Job # noqa: E501\n This method makes a synchronous HTTP request by default. To make an\n asynchronous HTTP request, please pass async_req=True\n >>> thread = api.read_namespaced_job_with_http_info(name, namespace, async_req=True)\n >>> result = thread.get()\n\n :param async_req bool: execute request asynchronously\n :param str name: name of the Job (required)\n :param str namespace: object name and auth scope, such as for teams and projects (required)\n :param str pretty: If 'true', then the output is pretty printed.\n :param _return_http_data_only: response data without head status code\n and headers\n :param _preload_content: if False, the urllib3.HTTPResponse object will\n be returned without reading/decoding response\n data. Default is True.\n :param _request_timeout: timeout setting for this request. If one\n number provided, it will be total request\n timeout. It can also be a pair (tuple) of\n (connection, read) timeouts.\n :return: tuple(V1Job, status_code(int), headers(HTTPHeaderDict))\n If the method is called asynchronously,\n returns the request thread.\n " local_var_params = locals() all_params = ['name', 'namespace', 'pretty'] all_params.extend(['async_req', '_return_http_data_only', '_preload_content', '_request_timeout']) for (key, val) in six.iteritems(local_var_params['kwargs']): if (key not in all_params): raise ApiTypeError(("Got an unexpected keyword argument '%s' to method read_namespaced_job" % key)) local_var_params[key] = val del local_var_params['kwargs'] if (self.api_client.client_side_validation and (('name' not in local_var_params) or (local_var_params['name'] is None))): raise ApiValueError('Missing the required parameter `name` when calling `read_namespaced_job`') if (self.api_client.client_side_validation and (('namespace' not in local_var_params) or (local_var_params['namespace'] is None))): raise ApiValueError('Missing the required parameter `namespace` when calling `read_namespaced_job`') collection_formats = {} path_params = {} if ('name' in local_var_params): path_params['name'] = local_var_params['name'] if ('namespace' in local_var_params): path_params['namespace'] = local_var_params['namespace'] query_params = [] if (('pretty' in local_var_params) and (local_var_params['pretty'] is not None)): query_params.append(('pretty', local_var_params['pretty'])) header_params = {} form_params = [] local_var_files = {} body_params = None header_params['Accept'] = self.api_client.select_header_accept(['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf']) auth_settings = ['BearerToken'] return self.api_client.call_api('/apis/batch/v1/namespaces/{namespace}/jobs/{name}', 'GET', path_params, query_params, header_params, body=body_params, post_params=form_params, files=local_var_files, response_type='V1Job', auth_settings=auth_settings, async_req=local_var_params.get('async_req'), _return_http_data_only=local_var_params.get('_return_http_data_only'), _preload_content=local_var_params.get('_preload_content', True), _request_timeout=local_var_params.get('_request_timeout'), collection_formats=collection_formats)
def read_namespaced_job_with_http_info(self, name, namespace, **kwargs): "read_namespaced_job # noqa: E501\n\n read the specified Job # noqa: E501\n This method makes a synchronous HTTP request by default. To make an\n asynchronous HTTP request, please pass async_req=True\n >>> thread = api.read_namespaced_job_with_http_info(name, namespace, async_req=True)\n >>> result = thread.get()\n\n :param async_req bool: execute request asynchronously\n :param str name: name of the Job (required)\n :param str namespace: object name and auth scope, such as for teams and projects (required)\n :param str pretty: If 'true', then the output is pretty printed.\n :param _return_http_data_only: response data without head status code\n and headers\n :param _preload_content: if False, the urllib3.HTTPResponse object will\n be returned without reading/decoding response\n data. Default is True.\n :param _request_timeout: timeout setting for this request. If one\n number provided, it will be total request\n timeout. It can also be a pair (tuple) of\n (connection, read) timeouts.\n :return: tuple(V1Job, status_code(int), headers(HTTPHeaderDict))\n If the method is called asynchronously,\n returns the request thread.\n " local_var_params = locals() all_params = ['name', 'namespace', 'pretty'] all_params.extend(['async_req', '_return_http_data_only', '_preload_content', '_request_timeout']) for (key, val) in six.iteritems(local_var_params['kwargs']): if (key not in all_params): raise ApiTypeError(("Got an unexpected keyword argument '%s' to method read_namespaced_job" % key)) local_var_params[key] = val del local_var_params['kwargs'] if (self.api_client.client_side_validation and (('name' not in local_var_params) or (local_var_params['name'] is None))): raise ApiValueError('Missing the required parameter `name` when calling `read_namespaced_job`') if (self.api_client.client_side_validation and (('namespace' not in local_var_params) or (local_var_params['namespace'] is None))): raise ApiValueError('Missing the required parameter `namespace` when calling `read_namespaced_job`') collection_formats = {} path_params = {} if ('name' in local_var_params): path_params['name'] = local_var_params['name'] if ('namespace' in local_var_params): path_params['namespace'] = local_var_params['namespace'] query_params = [] if (('pretty' in local_var_params) and (local_var_params['pretty'] is not None)): query_params.append(('pretty', local_var_params['pretty'])) header_params = {} form_params = [] local_var_files = {} body_params = None header_params['Accept'] = self.api_client.select_header_accept(['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf']) auth_settings = ['BearerToken'] return self.api_client.call_api('/apis/batch/v1/namespaces/{namespace}/jobs/{name}', 'GET', path_params, query_params, header_params, body=body_params, post_params=form_params, files=local_var_files, response_type='V1Job', auth_settings=auth_settings, async_req=local_var_params.get('async_req'), _return_http_data_only=local_var_params.get('_return_http_data_only'), _preload_content=local_var_params.get('_preload_content', True), _request_timeout=local_var_params.get('_request_timeout'), collection_formats=collection_formats)<|docstring|>read_namespaced_job # noqa: E501 read the specified Job # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True >>> thread = api.read_namespaced_job_with_http_info(name, namespace, async_req=True) >>> result = thread.get() :param async_req bool: execute request asynchronously :param str name: name of the Job (required) :param str namespace: object name and auth scope, such as for teams and projects (required) :param str pretty: If 'true', then the output is pretty printed. :param _return_http_data_only: response data without head status code and headers :param _preload_content: if False, the urllib3.HTTPResponse object will be returned without reading/decoding response data. Default is True. :param _request_timeout: timeout setting for this request. If one number provided, it will be total request timeout. It can also be a pair (tuple) of (connection, read) timeouts. :return: tuple(V1Job, status_code(int), headers(HTTPHeaderDict)) If the method is called asynchronously, returns the request thread.<|endoftext|>
810f2180cd2f833c021c8910ceafd821d6b369eb93590b3c013b7b512a751176
def read_namespaced_job_status(self, name, namespace, **kwargs): "read_namespaced_job_status # noqa: E501\n\n read status of the specified Job # noqa: E501\n This method makes a synchronous HTTP request by default. To make an\n asynchronous HTTP request, please pass async_req=True\n >>> thread = api.read_namespaced_job_status(name, namespace, async_req=True)\n >>> result = thread.get()\n\n :param async_req bool: execute request asynchronously\n :param str name: name of the Job (required)\n :param str namespace: object name and auth scope, such as for teams and projects (required)\n :param str pretty: If 'true', then the output is pretty printed.\n :param _preload_content: if False, the urllib3.HTTPResponse object will\n be returned without reading/decoding response\n data. Default is True.\n :param _request_timeout: timeout setting for this request. If one\n number provided, it will be total request\n timeout. It can also be a pair (tuple) of\n (connection, read) timeouts.\n :return: V1Job\n If the method is called asynchronously,\n returns the request thread.\n " kwargs['_return_http_data_only'] = True return self.read_namespaced_job_status_with_http_info(name, namespace, **kwargs)
read_namespaced_job_status # noqa: E501 read status of the specified Job # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True >>> thread = api.read_namespaced_job_status(name, namespace, async_req=True) >>> result = thread.get() :param async_req bool: execute request asynchronously :param str name: name of the Job (required) :param str namespace: object name and auth scope, such as for teams and projects (required) :param str pretty: If 'true', then the output is pretty printed. :param _preload_content: if False, the urllib3.HTTPResponse object will be returned without reading/decoding response data. Default is True. :param _request_timeout: timeout setting for this request. If one number provided, it will be total request timeout. It can also be a pair (tuple) of (connection, read) timeouts. :return: V1Job If the method is called asynchronously, returns the request thread.
kubernetes/client/api/batch_v1_api.py
read_namespaced_job_status
knkgun/python
1
python
def read_namespaced_job_status(self, name, namespace, **kwargs): "read_namespaced_job_status # noqa: E501\n\n read status of the specified Job # noqa: E501\n This method makes a synchronous HTTP request by default. To make an\n asynchronous HTTP request, please pass async_req=True\n >>> thread = api.read_namespaced_job_status(name, namespace, async_req=True)\n >>> result = thread.get()\n\n :param async_req bool: execute request asynchronously\n :param str name: name of the Job (required)\n :param str namespace: object name and auth scope, such as for teams and projects (required)\n :param str pretty: If 'true', then the output is pretty printed.\n :param _preload_content: if False, the urllib3.HTTPResponse object will\n be returned without reading/decoding response\n data. Default is True.\n :param _request_timeout: timeout setting for this request. If one\n number provided, it will be total request\n timeout. It can also be a pair (tuple) of\n (connection, read) timeouts.\n :return: V1Job\n If the method is called asynchronously,\n returns the request thread.\n " kwargs['_return_http_data_only'] = True return self.read_namespaced_job_status_with_http_info(name, namespace, **kwargs)
def read_namespaced_job_status(self, name, namespace, **kwargs): "read_namespaced_job_status # noqa: E501\n\n read status of the specified Job # noqa: E501\n This method makes a synchronous HTTP request by default. To make an\n asynchronous HTTP request, please pass async_req=True\n >>> thread = api.read_namespaced_job_status(name, namespace, async_req=True)\n >>> result = thread.get()\n\n :param async_req bool: execute request asynchronously\n :param str name: name of the Job (required)\n :param str namespace: object name and auth scope, such as for teams and projects (required)\n :param str pretty: If 'true', then the output is pretty printed.\n :param _preload_content: if False, the urllib3.HTTPResponse object will\n be returned without reading/decoding response\n data. Default is True.\n :param _request_timeout: timeout setting for this request. If one\n number provided, it will be total request\n timeout. It can also be a pair (tuple) of\n (connection, read) timeouts.\n :return: V1Job\n If the method is called asynchronously,\n returns the request thread.\n " kwargs['_return_http_data_only'] = True return self.read_namespaced_job_status_with_http_info(name, namespace, **kwargs)<|docstring|>read_namespaced_job_status # noqa: E501 read status of the specified Job # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True >>> thread = api.read_namespaced_job_status(name, namespace, async_req=True) >>> result = thread.get() :param async_req bool: execute request asynchronously :param str name: name of the Job (required) :param str namespace: object name and auth scope, such as for teams and projects (required) :param str pretty: If 'true', then the output is pretty printed. :param _preload_content: if False, the urllib3.HTTPResponse object will be returned without reading/decoding response data. Default is True. :param _request_timeout: timeout setting for this request. If one number provided, it will be total request timeout. It can also be a pair (tuple) of (connection, read) timeouts. :return: V1Job If the method is called asynchronously, returns the request thread.<|endoftext|>
4120e9073314cb04f3a49257340d9924f8f1f04665f510f23f355dc7b35d80f7
def read_namespaced_job_status_with_http_info(self, name, namespace, **kwargs): "read_namespaced_job_status # noqa: E501\n\n read status of the specified Job # noqa: E501\n This method makes a synchronous HTTP request by default. To make an\n asynchronous HTTP request, please pass async_req=True\n >>> thread = api.read_namespaced_job_status_with_http_info(name, namespace, async_req=True)\n >>> result = thread.get()\n\n :param async_req bool: execute request asynchronously\n :param str name: name of the Job (required)\n :param str namespace: object name and auth scope, such as for teams and projects (required)\n :param str pretty: If 'true', then the output is pretty printed.\n :param _return_http_data_only: response data without head status code\n and headers\n :param _preload_content: if False, the urllib3.HTTPResponse object will\n be returned without reading/decoding response\n data. Default is True.\n :param _request_timeout: timeout setting for this request. If one\n number provided, it will be total request\n timeout. It can also be a pair (tuple) of\n (connection, read) timeouts.\n :return: tuple(V1Job, status_code(int), headers(HTTPHeaderDict))\n If the method is called asynchronously,\n returns the request thread.\n " local_var_params = locals() all_params = ['name', 'namespace', 'pretty'] all_params.extend(['async_req', '_return_http_data_only', '_preload_content', '_request_timeout']) for (key, val) in six.iteritems(local_var_params['kwargs']): if (key not in all_params): raise ApiTypeError(("Got an unexpected keyword argument '%s' to method read_namespaced_job_status" % key)) local_var_params[key] = val del local_var_params['kwargs'] if (self.api_client.client_side_validation and (('name' not in local_var_params) or (local_var_params['name'] is None))): raise ApiValueError('Missing the required parameter `name` when calling `read_namespaced_job_status`') if (self.api_client.client_side_validation and (('namespace' not in local_var_params) or (local_var_params['namespace'] is None))): raise ApiValueError('Missing the required parameter `namespace` when calling `read_namespaced_job_status`') collection_formats = {} path_params = {} if ('name' in local_var_params): path_params['name'] = local_var_params['name'] if ('namespace' in local_var_params): path_params['namespace'] = local_var_params['namespace'] query_params = [] if (('pretty' in local_var_params) and (local_var_params['pretty'] is not None)): query_params.append(('pretty', local_var_params['pretty'])) header_params = {} form_params = [] local_var_files = {} body_params = None header_params['Accept'] = self.api_client.select_header_accept(['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf']) auth_settings = ['BearerToken'] return self.api_client.call_api('/apis/batch/v1/namespaces/{namespace}/jobs/{name}/status', 'GET', path_params, query_params, header_params, body=body_params, post_params=form_params, files=local_var_files, response_type='V1Job', auth_settings=auth_settings, async_req=local_var_params.get('async_req'), _return_http_data_only=local_var_params.get('_return_http_data_only'), _preload_content=local_var_params.get('_preload_content', True), _request_timeout=local_var_params.get('_request_timeout'), collection_formats=collection_formats)
read_namespaced_job_status # noqa: E501 read status of the specified Job # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True >>> thread = api.read_namespaced_job_status_with_http_info(name, namespace, async_req=True) >>> result = thread.get() :param async_req bool: execute request asynchronously :param str name: name of the Job (required) :param str namespace: object name and auth scope, such as for teams and projects (required) :param str pretty: If 'true', then the output is pretty printed. :param _return_http_data_only: response data without head status code and headers :param _preload_content: if False, the urllib3.HTTPResponse object will be returned without reading/decoding response data. Default is True. :param _request_timeout: timeout setting for this request. If one number provided, it will be total request timeout. It can also be a pair (tuple) of (connection, read) timeouts. :return: tuple(V1Job, status_code(int), headers(HTTPHeaderDict)) If the method is called asynchronously, returns the request thread.
kubernetes/client/api/batch_v1_api.py
read_namespaced_job_status_with_http_info
knkgun/python
1
python
def read_namespaced_job_status_with_http_info(self, name, namespace, **kwargs): "read_namespaced_job_status # noqa: E501\n\n read status of the specified Job # noqa: E501\n This method makes a synchronous HTTP request by default. To make an\n asynchronous HTTP request, please pass async_req=True\n >>> thread = api.read_namespaced_job_status_with_http_info(name, namespace, async_req=True)\n >>> result = thread.get()\n\n :param async_req bool: execute request asynchronously\n :param str name: name of the Job (required)\n :param str namespace: object name and auth scope, such as for teams and projects (required)\n :param str pretty: If 'true', then the output is pretty printed.\n :param _return_http_data_only: response data without head status code\n and headers\n :param _preload_content: if False, the urllib3.HTTPResponse object will\n be returned without reading/decoding response\n data. Default is True.\n :param _request_timeout: timeout setting for this request. If one\n number provided, it will be total request\n timeout. It can also be a pair (tuple) of\n (connection, read) timeouts.\n :return: tuple(V1Job, status_code(int), headers(HTTPHeaderDict))\n If the method is called asynchronously,\n returns the request thread.\n " local_var_params = locals() all_params = ['name', 'namespace', 'pretty'] all_params.extend(['async_req', '_return_http_data_only', '_preload_content', '_request_timeout']) for (key, val) in six.iteritems(local_var_params['kwargs']): if (key not in all_params): raise ApiTypeError(("Got an unexpected keyword argument '%s' to method read_namespaced_job_status" % key)) local_var_params[key] = val del local_var_params['kwargs'] if (self.api_client.client_side_validation and (('name' not in local_var_params) or (local_var_params['name'] is None))): raise ApiValueError('Missing the required parameter `name` when calling `read_namespaced_job_status`') if (self.api_client.client_side_validation and (('namespace' not in local_var_params) or (local_var_params['namespace'] is None))): raise ApiValueError('Missing the required parameter `namespace` when calling `read_namespaced_job_status`') collection_formats = {} path_params = {} if ('name' in local_var_params): path_params['name'] = local_var_params['name'] if ('namespace' in local_var_params): path_params['namespace'] = local_var_params['namespace'] query_params = [] if (('pretty' in local_var_params) and (local_var_params['pretty'] is not None)): query_params.append(('pretty', local_var_params['pretty'])) header_params = {} form_params = [] local_var_files = {} body_params = None header_params['Accept'] = self.api_client.select_header_accept(['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf']) auth_settings = ['BearerToken'] return self.api_client.call_api('/apis/batch/v1/namespaces/{namespace}/jobs/{name}/status', 'GET', path_params, query_params, header_params, body=body_params, post_params=form_params, files=local_var_files, response_type='V1Job', auth_settings=auth_settings, async_req=local_var_params.get('async_req'), _return_http_data_only=local_var_params.get('_return_http_data_only'), _preload_content=local_var_params.get('_preload_content', True), _request_timeout=local_var_params.get('_request_timeout'), collection_formats=collection_formats)
def read_namespaced_job_status_with_http_info(self, name, namespace, **kwargs): "read_namespaced_job_status # noqa: E501\n\n read status of the specified Job # noqa: E501\n This method makes a synchronous HTTP request by default. To make an\n asynchronous HTTP request, please pass async_req=True\n >>> thread = api.read_namespaced_job_status_with_http_info(name, namespace, async_req=True)\n >>> result = thread.get()\n\n :param async_req bool: execute request asynchronously\n :param str name: name of the Job (required)\n :param str namespace: object name and auth scope, such as for teams and projects (required)\n :param str pretty: If 'true', then the output is pretty printed.\n :param _return_http_data_only: response data without head status code\n and headers\n :param _preload_content: if False, the urllib3.HTTPResponse object will\n be returned without reading/decoding response\n data. Default is True.\n :param _request_timeout: timeout setting for this request. If one\n number provided, it will be total request\n timeout. It can also be a pair (tuple) of\n (connection, read) timeouts.\n :return: tuple(V1Job, status_code(int), headers(HTTPHeaderDict))\n If the method is called asynchronously,\n returns the request thread.\n " local_var_params = locals() all_params = ['name', 'namespace', 'pretty'] all_params.extend(['async_req', '_return_http_data_only', '_preload_content', '_request_timeout']) for (key, val) in six.iteritems(local_var_params['kwargs']): if (key not in all_params): raise ApiTypeError(("Got an unexpected keyword argument '%s' to method read_namespaced_job_status" % key)) local_var_params[key] = val del local_var_params['kwargs'] if (self.api_client.client_side_validation and (('name' not in local_var_params) or (local_var_params['name'] is None))): raise ApiValueError('Missing the required parameter `name` when calling `read_namespaced_job_status`') if (self.api_client.client_side_validation and (('namespace' not in local_var_params) or (local_var_params['namespace'] is None))): raise ApiValueError('Missing the required parameter `namespace` when calling `read_namespaced_job_status`') collection_formats = {} path_params = {} if ('name' in local_var_params): path_params['name'] = local_var_params['name'] if ('namespace' in local_var_params): path_params['namespace'] = local_var_params['namespace'] query_params = [] if (('pretty' in local_var_params) and (local_var_params['pretty'] is not None)): query_params.append(('pretty', local_var_params['pretty'])) header_params = {} form_params = [] local_var_files = {} body_params = None header_params['Accept'] = self.api_client.select_header_accept(['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf']) auth_settings = ['BearerToken'] return self.api_client.call_api('/apis/batch/v1/namespaces/{namespace}/jobs/{name}/status', 'GET', path_params, query_params, header_params, body=body_params, post_params=form_params, files=local_var_files, response_type='V1Job', auth_settings=auth_settings, async_req=local_var_params.get('async_req'), _return_http_data_only=local_var_params.get('_return_http_data_only'), _preload_content=local_var_params.get('_preload_content', True), _request_timeout=local_var_params.get('_request_timeout'), collection_formats=collection_formats)<|docstring|>read_namespaced_job_status # noqa: E501 read status of the specified Job # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True >>> thread = api.read_namespaced_job_status_with_http_info(name, namespace, async_req=True) >>> result = thread.get() :param async_req bool: execute request asynchronously :param str name: name of the Job (required) :param str namespace: object name and auth scope, such as for teams and projects (required) :param str pretty: If 'true', then the output is pretty printed. :param _return_http_data_only: response data without head status code and headers :param _preload_content: if False, the urllib3.HTTPResponse object will be returned without reading/decoding response data. Default is True. :param _request_timeout: timeout setting for this request. If one number provided, it will be total request timeout. It can also be a pair (tuple) of (connection, read) timeouts. :return: tuple(V1Job, status_code(int), headers(HTTPHeaderDict)) If the method is called asynchronously, returns the request thread.<|endoftext|>
74160a2bb2f8433e1491888893e930d9d871fd1617a8fb66174e466dc3f0a15a
def replace_namespaced_cron_job(self, name, namespace, body, **kwargs): "replace_namespaced_cron_job # noqa: E501\n\n replace the specified CronJob # noqa: E501\n This method makes a synchronous HTTP request by default. To make an\n asynchronous HTTP request, please pass async_req=True\n >>> thread = api.replace_namespaced_cron_job(name, namespace, body, async_req=True)\n >>> result = thread.get()\n\n :param async_req bool: execute request asynchronously\n :param str name: name of the CronJob (required)\n :param str namespace: object name and auth scope, such as for teams and projects (required)\n :param V1CronJob body: (required)\n :param str pretty: If 'true', then the output is pretty printed.\n :param str dry_run: When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed\n :param str field_manager: fieldManager is a name associated with the actor or entity that is making these changes. The value must be less than or 128 characters long, and only contain printable characters, as defined by https://golang.org/pkg/unicode/#IsPrint.\n :param _preload_content: if False, the urllib3.HTTPResponse object will\n be returned without reading/decoding response\n data. Default is True.\n :param _request_timeout: timeout setting for this request. If one\n number provided, it will be total request\n timeout. It can also be a pair (tuple) of\n (connection, read) timeouts.\n :return: V1CronJob\n If the method is called asynchronously,\n returns the request thread.\n " kwargs['_return_http_data_only'] = True return self.replace_namespaced_cron_job_with_http_info(name, namespace, body, **kwargs)
replace_namespaced_cron_job # noqa: E501 replace the specified CronJob # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True >>> thread = api.replace_namespaced_cron_job(name, namespace, body, async_req=True) >>> result = thread.get() :param async_req bool: execute request asynchronously :param str name: name of the CronJob (required) :param str namespace: object name and auth scope, such as for teams and projects (required) :param V1CronJob body: (required) :param str pretty: If 'true', then the output is pretty printed. :param str dry_run: When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed :param str field_manager: fieldManager is a name associated with the actor or entity that is making these changes. The value must be less than or 128 characters long, and only contain printable characters, as defined by https://golang.org/pkg/unicode/#IsPrint. :param _preload_content: if False, the urllib3.HTTPResponse object will be returned without reading/decoding response data. Default is True. :param _request_timeout: timeout setting for this request. If one number provided, it will be total request timeout. It can also be a pair (tuple) of (connection, read) timeouts. :return: V1CronJob If the method is called asynchronously, returns the request thread.
kubernetes/client/api/batch_v1_api.py
replace_namespaced_cron_job
knkgun/python
1
python
def replace_namespaced_cron_job(self, name, namespace, body, **kwargs): "replace_namespaced_cron_job # noqa: E501\n\n replace the specified CronJob # noqa: E501\n This method makes a synchronous HTTP request by default. To make an\n asynchronous HTTP request, please pass async_req=True\n >>> thread = api.replace_namespaced_cron_job(name, namespace, body, async_req=True)\n >>> result = thread.get()\n\n :param async_req bool: execute request asynchronously\n :param str name: name of the CronJob (required)\n :param str namespace: object name and auth scope, such as for teams and projects (required)\n :param V1CronJob body: (required)\n :param str pretty: If 'true', then the output is pretty printed.\n :param str dry_run: When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed\n :param str field_manager: fieldManager is a name associated with the actor or entity that is making these changes. The value must be less than or 128 characters long, and only contain printable characters, as defined by https://golang.org/pkg/unicode/#IsPrint.\n :param _preload_content: if False, the urllib3.HTTPResponse object will\n be returned without reading/decoding response\n data. Default is True.\n :param _request_timeout: timeout setting for this request. If one\n number provided, it will be total request\n timeout. It can also be a pair (tuple) of\n (connection, read) timeouts.\n :return: V1CronJob\n If the method is called asynchronously,\n returns the request thread.\n " kwargs['_return_http_data_only'] = True return self.replace_namespaced_cron_job_with_http_info(name, namespace, body, **kwargs)
def replace_namespaced_cron_job(self, name, namespace, body, **kwargs): "replace_namespaced_cron_job # noqa: E501\n\n replace the specified CronJob # noqa: E501\n This method makes a synchronous HTTP request by default. To make an\n asynchronous HTTP request, please pass async_req=True\n >>> thread = api.replace_namespaced_cron_job(name, namespace, body, async_req=True)\n >>> result = thread.get()\n\n :param async_req bool: execute request asynchronously\n :param str name: name of the CronJob (required)\n :param str namespace: object name and auth scope, such as for teams and projects (required)\n :param V1CronJob body: (required)\n :param str pretty: If 'true', then the output is pretty printed.\n :param str dry_run: When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed\n :param str field_manager: fieldManager is a name associated with the actor or entity that is making these changes. The value must be less than or 128 characters long, and only contain printable characters, as defined by https://golang.org/pkg/unicode/#IsPrint.\n :param _preload_content: if False, the urllib3.HTTPResponse object will\n be returned without reading/decoding response\n data. Default is True.\n :param _request_timeout: timeout setting for this request. If one\n number provided, it will be total request\n timeout. It can also be a pair (tuple) of\n (connection, read) timeouts.\n :return: V1CronJob\n If the method is called asynchronously,\n returns the request thread.\n " kwargs['_return_http_data_only'] = True return self.replace_namespaced_cron_job_with_http_info(name, namespace, body, **kwargs)<|docstring|>replace_namespaced_cron_job # noqa: E501 replace the specified CronJob # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True >>> thread = api.replace_namespaced_cron_job(name, namespace, body, async_req=True) >>> result = thread.get() :param async_req bool: execute request asynchronously :param str name: name of the CronJob (required) :param str namespace: object name and auth scope, such as for teams and projects (required) :param V1CronJob body: (required) :param str pretty: If 'true', then the output is pretty printed. :param str dry_run: When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed :param str field_manager: fieldManager is a name associated with the actor or entity that is making these changes. The value must be less than or 128 characters long, and only contain printable characters, as defined by https://golang.org/pkg/unicode/#IsPrint. :param _preload_content: if False, the urllib3.HTTPResponse object will be returned without reading/decoding response data. Default is True. :param _request_timeout: timeout setting for this request. If one number provided, it will be total request timeout. It can also be a pair (tuple) of (connection, read) timeouts. :return: V1CronJob If the method is called asynchronously, returns the request thread.<|endoftext|>
bfd65cf51977a1fa2ccc9b5f32c3dbf175617e921c33a3cb294e715e97e55beb
def replace_namespaced_cron_job_with_http_info(self, name, namespace, body, **kwargs): "replace_namespaced_cron_job # noqa: E501\n\n replace the specified CronJob # noqa: E501\n This method makes a synchronous HTTP request by default. To make an\n asynchronous HTTP request, please pass async_req=True\n >>> thread = api.replace_namespaced_cron_job_with_http_info(name, namespace, body, async_req=True)\n >>> result = thread.get()\n\n :param async_req bool: execute request asynchronously\n :param str name: name of the CronJob (required)\n :param str namespace: object name and auth scope, such as for teams and projects (required)\n :param V1CronJob body: (required)\n :param str pretty: If 'true', then the output is pretty printed.\n :param str dry_run: When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed\n :param str field_manager: fieldManager is a name associated with the actor or entity that is making these changes. The value must be less than or 128 characters long, and only contain printable characters, as defined by https://golang.org/pkg/unicode/#IsPrint.\n :param _return_http_data_only: response data without head status code\n and headers\n :param _preload_content: if False, the urllib3.HTTPResponse object will\n be returned without reading/decoding response\n data. Default is True.\n :param _request_timeout: timeout setting for this request. If one\n number provided, it will be total request\n timeout. It can also be a pair (tuple) of\n (connection, read) timeouts.\n :return: tuple(V1CronJob, status_code(int), headers(HTTPHeaderDict))\n If the method is called asynchronously,\n returns the request thread.\n " local_var_params = locals() all_params = ['name', 'namespace', 'body', 'pretty', 'dry_run', 'field_manager'] all_params.extend(['async_req', '_return_http_data_only', '_preload_content', '_request_timeout']) for (key, val) in six.iteritems(local_var_params['kwargs']): if (key not in all_params): raise ApiTypeError(("Got an unexpected keyword argument '%s' to method replace_namespaced_cron_job" % key)) local_var_params[key] = val del local_var_params['kwargs'] if (self.api_client.client_side_validation and (('name' not in local_var_params) or (local_var_params['name'] is None))): raise ApiValueError('Missing the required parameter `name` when calling `replace_namespaced_cron_job`') if (self.api_client.client_side_validation and (('namespace' not in local_var_params) or (local_var_params['namespace'] is None))): raise ApiValueError('Missing the required parameter `namespace` when calling `replace_namespaced_cron_job`') if (self.api_client.client_side_validation and (('body' not in local_var_params) or (local_var_params['body'] is None))): raise ApiValueError('Missing the required parameter `body` when calling `replace_namespaced_cron_job`') collection_formats = {} path_params = {} if ('name' in local_var_params): path_params['name'] = local_var_params['name'] if ('namespace' in local_var_params): path_params['namespace'] = local_var_params['namespace'] query_params = [] if (('pretty' in local_var_params) and (local_var_params['pretty'] is not None)): query_params.append(('pretty', local_var_params['pretty'])) if (('dry_run' in local_var_params) and (local_var_params['dry_run'] is not None)): query_params.append(('dryRun', local_var_params['dry_run'])) if (('field_manager' in local_var_params) and (local_var_params['field_manager'] is not None)): query_params.append(('fieldManager', local_var_params['field_manager'])) header_params = {} form_params = [] local_var_files = {} body_params = None if ('body' in local_var_params): body_params = local_var_params['body'] header_params['Accept'] = self.api_client.select_header_accept(['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf']) auth_settings = ['BearerToken'] return self.api_client.call_api('/apis/batch/v1/namespaces/{namespace}/cronjobs/{name}', 'PUT', path_params, query_params, header_params, body=body_params, post_params=form_params, files=local_var_files, response_type='V1CronJob', auth_settings=auth_settings, async_req=local_var_params.get('async_req'), _return_http_data_only=local_var_params.get('_return_http_data_only'), _preload_content=local_var_params.get('_preload_content', True), _request_timeout=local_var_params.get('_request_timeout'), collection_formats=collection_formats)
replace_namespaced_cron_job # noqa: E501 replace the specified CronJob # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True >>> thread = api.replace_namespaced_cron_job_with_http_info(name, namespace, body, async_req=True) >>> result = thread.get() :param async_req bool: execute request asynchronously :param str name: name of the CronJob (required) :param str namespace: object name and auth scope, such as for teams and projects (required) :param V1CronJob body: (required) :param str pretty: If 'true', then the output is pretty printed. :param str dry_run: When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed :param str field_manager: fieldManager is a name associated with the actor or entity that is making these changes. The value must be less than or 128 characters long, and only contain printable characters, as defined by https://golang.org/pkg/unicode/#IsPrint. :param _return_http_data_only: response data without head status code and headers :param _preload_content: if False, the urllib3.HTTPResponse object will be returned without reading/decoding response data. Default is True. :param _request_timeout: timeout setting for this request. If one number provided, it will be total request timeout. It can also be a pair (tuple) of (connection, read) timeouts. :return: tuple(V1CronJob, status_code(int), headers(HTTPHeaderDict)) If the method is called asynchronously, returns the request thread.
kubernetes/client/api/batch_v1_api.py
replace_namespaced_cron_job_with_http_info
knkgun/python
1
python
def replace_namespaced_cron_job_with_http_info(self, name, namespace, body, **kwargs): "replace_namespaced_cron_job # noqa: E501\n\n replace the specified CronJob # noqa: E501\n This method makes a synchronous HTTP request by default. To make an\n asynchronous HTTP request, please pass async_req=True\n >>> thread = api.replace_namespaced_cron_job_with_http_info(name, namespace, body, async_req=True)\n >>> result = thread.get()\n\n :param async_req bool: execute request asynchronously\n :param str name: name of the CronJob (required)\n :param str namespace: object name and auth scope, such as for teams and projects (required)\n :param V1CronJob body: (required)\n :param str pretty: If 'true', then the output is pretty printed.\n :param str dry_run: When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed\n :param str field_manager: fieldManager is a name associated with the actor or entity that is making these changes. The value must be less than or 128 characters long, and only contain printable characters, as defined by https://golang.org/pkg/unicode/#IsPrint.\n :param _return_http_data_only: response data without head status code\n and headers\n :param _preload_content: if False, the urllib3.HTTPResponse object will\n be returned without reading/decoding response\n data. Default is True.\n :param _request_timeout: timeout setting for this request. If one\n number provided, it will be total request\n timeout. It can also be a pair (tuple) of\n (connection, read) timeouts.\n :return: tuple(V1CronJob, status_code(int), headers(HTTPHeaderDict))\n If the method is called asynchronously,\n returns the request thread.\n " local_var_params = locals() all_params = ['name', 'namespace', 'body', 'pretty', 'dry_run', 'field_manager'] all_params.extend(['async_req', '_return_http_data_only', '_preload_content', '_request_timeout']) for (key, val) in six.iteritems(local_var_params['kwargs']): if (key not in all_params): raise ApiTypeError(("Got an unexpected keyword argument '%s' to method replace_namespaced_cron_job" % key)) local_var_params[key] = val del local_var_params['kwargs'] if (self.api_client.client_side_validation and (('name' not in local_var_params) or (local_var_params['name'] is None))): raise ApiValueError('Missing the required parameter `name` when calling `replace_namespaced_cron_job`') if (self.api_client.client_side_validation and (('namespace' not in local_var_params) or (local_var_params['namespace'] is None))): raise ApiValueError('Missing the required parameter `namespace` when calling `replace_namespaced_cron_job`') if (self.api_client.client_side_validation and (('body' not in local_var_params) or (local_var_params['body'] is None))): raise ApiValueError('Missing the required parameter `body` when calling `replace_namespaced_cron_job`') collection_formats = {} path_params = {} if ('name' in local_var_params): path_params['name'] = local_var_params['name'] if ('namespace' in local_var_params): path_params['namespace'] = local_var_params['namespace'] query_params = [] if (('pretty' in local_var_params) and (local_var_params['pretty'] is not None)): query_params.append(('pretty', local_var_params['pretty'])) if (('dry_run' in local_var_params) and (local_var_params['dry_run'] is not None)): query_params.append(('dryRun', local_var_params['dry_run'])) if (('field_manager' in local_var_params) and (local_var_params['field_manager'] is not None)): query_params.append(('fieldManager', local_var_params['field_manager'])) header_params = {} form_params = [] local_var_files = {} body_params = None if ('body' in local_var_params): body_params = local_var_params['body'] header_params['Accept'] = self.api_client.select_header_accept(['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf']) auth_settings = ['BearerToken'] return self.api_client.call_api('/apis/batch/v1/namespaces/{namespace}/cronjobs/{name}', 'PUT', path_params, query_params, header_params, body=body_params, post_params=form_params, files=local_var_files, response_type='V1CronJob', auth_settings=auth_settings, async_req=local_var_params.get('async_req'), _return_http_data_only=local_var_params.get('_return_http_data_only'), _preload_content=local_var_params.get('_preload_content', True), _request_timeout=local_var_params.get('_request_timeout'), collection_formats=collection_formats)
def replace_namespaced_cron_job_with_http_info(self, name, namespace, body, **kwargs): "replace_namespaced_cron_job # noqa: E501\n\n replace the specified CronJob # noqa: E501\n This method makes a synchronous HTTP request by default. To make an\n asynchronous HTTP request, please pass async_req=True\n >>> thread = api.replace_namespaced_cron_job_with_http_info(name, namespace, body, async_req=True)\n >>> result = thread.get()\n\n :param async_req bool: execute request asynchronously\n :param str name: name of the CronJob (required)\n :param str namespace: object name and auth scope, such as for teams and projects (required)\n :param V1CronJob body: (required)\n :param str pretty: If 'true', then the output is pretty printed.\n :param str dry_run: When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed\n :param str field_manager: fieldManager is a name associated with the actor or entity that is making these changes. The value must be less than or 128 characters long, and only contain printable characters, as defined by https://golang.org/pkg/unicode/#IsPrint.\n :param _return_http_data_only: response data without head status code\n and headers\n :param _preload_content: if False, the urllib3.HTTPResponse object will\n be returned without reading/decoding response\n data. Default is True.\n :param _request_timeout: timeout setting for this request. If one\n number provided, it will be total request\n timeout. It can also be a pair (tuple) of\n (connection, read) timeouts.\n :return: tuple(V1CronJob, status_code(int), headers(HTTPHeaderDict))\n If the method is called asynchronously,\n returns the request thread.\n " local_var_params = locals() all_params = ['name', 'namespace', 'body', 'pretty', 'dry_run', 'field_manager'] all_params.extend(['async_req', '_return_http_data_only', '_preload_content', '_request_timeout']) for (key, val) in six.iteritems(local_var_params['kwargs']): if (key not in all_params): raise ApiTypeError(("Got an unexpected keyword argument '%s' to method replace_namespaced_cron_job" % key)) local_var_params[key] = val del local_var_params['kwargs'] if (self.api_client.client_side_validation and (('name' not in local_var_params) or (local_var_params['name'] is None))): raise ApiValueError('Missing the required parameter `name` when calling `replace_namespaced_cron_job`') if (self.api_client.client_side_validation and (('namespace' not in local_var_params) or (local_var_params['namespace'] is None))): raise ApiValueError('Missing the required parameter `namespace` when calling `replace_namespaced_cron_job`') if (self.api_client.client_side_validation and (('body' not in local_var_params) or (local_var_params['body'] is None))): raise ApiValueError('Missing the required parameter `body` when calling `replace_namespaced_cron_job`') collection_formats = {} path_params = {} if ('name' in local_var_params): path_params['name'] = local_var_params['name'] if ('namespace' in local_var_params): path_params['namespace'] = local_var_params['namespace'] query_params = [] if (('pretty' in local_var_params) and (local_var_params['pretty'] is not None)): query_params.append(('pretty', local_var_params['pretty'])) if (('dry_run' in local_var_params) and (local_var_params['dry_run'] is not None)): query_params.append(('dryRun', local_var_params['dry_run'])) if (('field_manager' in local_var_params) and (local_var_params['field_manager'] is not None)): query_params.append(('fieldManager', local_var_params['field_manager'])) header_params = {} form_params = [] local_var_files = {} body_params = None if ('body' in local_var_params): body_params = local_var_params['body'] header_params['Accept'] = self.api_client.select_header_accept(['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf']) auth_settings = ['BearerToken'] return self.api_client.call_api('/apis/batch/v1/namespaces/{namespace}/cronjobs/{name}', 'PUT', path_params, query_params, header_params, body=body_params, post_params=form_params, files=local_var_files, response_type='V1CronJob', auth_settings=auth_settings, async_req=local_var_params.get('async_req'), _return_http_data_only=local_var_params.get('_return_http_data_only'), _preload_content=local_var_params.get('_preload_content', True), _request_timeout=local_var_params.get('_request_timeout'), collection_formats=collection_formats)<|docstring|>replace_namespaced_cron_job # noqa: E501 replace the specified CronJob # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True >>> thread = api.replace_namespaced_cron_job_with_http_info(name, namespace, body, async_req=True) >>> result = thread.get() :param async_req bool: execute request asynchronously :param str name: name of the CronJob (required) :param str namespace: object name and auth scope, such as for teams and projects (required) :param V1CronJob body: (required) :param str pretty: If 'true', then the output is pretty printed. :param str dry_run: When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed :param str field_manager: fieldManager is a name associated with the actor or entity that is making these changes. The value must be less than or 128 characters long, and only contain printable characters, as defined by https://golang.org/pkg/unicode/#IsPrint. :param _return_http_data_only: response data without head status code and headers :param _preload_content: if False, the urllib3.HTTPResponse object will be returned without reading/decoding response data. Default is True. :param _request_timeout: timeout setting for this request. If one number provided, it will be total request timeout. It can also be a pair (tuple) of (connection, read) timeouts. :return: tuple(V1CronJob, status_code(int), headers(HTTPHeaderDict)) If the method is called asynchronously, returns the request thread.<|endoftext|>
34eadb929c9e32da63259b6c7b9d3b46759ffe485beea3afb346e20dcaec8967
def replace_namespaced_cron_job_status(self, name, namespace, body, **kwargs): "replace_namespaced_cron_job_status # noqa: E501\n\n replace status of the specified CronJob # noqa: E501\n This method makes a synchronous HTTP request by default. To make an\n asynchronous HTTP request, please pass async_req=True\n >>> thread = api.replace_namespaced_cron_job_status(name, namespace, body, async_req=True)\n >>> result = thread.get()\n\n :param async_req bool: execute request asynchronously\n :param str name: name of the CronJob (required)\n :param str namespace: object name and auth scope, such as for teams and projects (required)\n :param V1CronJob body: (required)\n :param str pretty: If 'true', then the output is pretty printed.\n :param str dry_run: When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed\n :param str field_manager: fieldManager is a name associated with the actor or entity that is making these changes. The value must be less than or 128 characters long, and only contain printable characters, as defined by https://golang.org/pkg/unicode/#IsPrint.\n :param _preload_content: if False, the urllib3.HTTPResponse object will\n be returned without reading/decoding response\n data. Default is True.\n :param _request_timeout: timeout setting for this request. If one\n number provided, it will be total request\n timeout. It can also be a pair (tuple) of\n (connection, read) timeouts.\n :return: V1CronJob\n If the method is called asynchronously,\n returns the request thread.\n " kwargs['_return_http_data_only'] = True return self.replace_namespaced_cron_job_status_with_http_info(name, namespace, body, **kwargs)
replace_namespaced_cron_job_status # noqa: E501 replace status of the specified CronJob # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True >>> thread = api.replace_namespaced_cron_job_status(name, namespace, body, async_req=True) >>> result = thread.get() :param async_req bool: execute request asynchronously :param str name: name of the CronJob (required) :param str namespace: object name and auth scope, such as for teams and projects (required) :param V1CronJob body: (required) :param str pretty: If 'true', then the output is pretty printed. :param str dry_run: When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed :param str field_manager: fieldManager is a name associated with the actor or entity that is making these changes. The value must be less than or 128 characters long, and only contain printable characters, as defined by https://golang.org/pkg/unicode/#IsPrint. :param _preload_content: if False, the urllib3.HTTPResponse object will be returned without reading/decoding response data. Default is True. :param _request_timeout: timeout setting for this request. If one number provided, it will be total request timeout. It can also be a pair (tuple) of (connection, read) timeouts. :return: V1CronJob If the method is called asynchronously, returns the request thread.
kubernetes/client/api/batch_v1_api.py
replace_namespaced_cron_job_status
knkgun/python
1
python
def replace_namespaced_cron_job_status(self, name, namespace, body, **kwargs): "replace_namespaced_cron_job_status # noqa: E501\n\n replace status of the specified CronJob # noqa: E501\n This method makes a synchronous HTTP request by default. To make an\n asynchronous HTTP request, please pass async_req=True\n >>> thread = api.replace_namespaced_cron_job_status(name, namespace, body, async_req=True)\n >>> result = thread.get()\n\n :param async_req bool: execute request asynchronously\n :param str name: name of the CronJob (required)\n :param str namespace: object name and auth scope, such as for teams and projects (required)\n :param V1CronJob body: (required)\n :param str pretty: If 'true', then the output is pretty printed.\n :param str dry_run: When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed\n :param str field_manager: fieldManager is a name associated with the actor or entity that is making these changes. The value must be less than or 128 characters long, and only contain printable characters, as defined by https://golang.org/pkg/unicode/#IsPrint.\n :param _preload_content: if False, the urllib3.HTTPResponse object will\n be returned without reading/decoding response\n data. Default is True.\n :param _request_timeout: timeout setting for this request. If one\n number provided, it will be total request\n timeout. It can also be a pair (tuple) of\n (connection, read) timeouts.\n :return: V1CronJob\n If the method is called asynchronously,\n returns the request thread.\n " kwargs['_return_http_data_only'] = True return self.replace_namespaced_cron_job_status_with_http_info(name, namespace, body, **kwargs)
def replace_namespaced_cron_job_status(self, name, namespace, body, **kwargs): "replace_namespaced_cron_job_status # noqa: E501\n\n replace status of the specified CronJob # noqa: E501\n This method makes a synchronous HTTP request by default. To make an\n asynchronous HTTP request, please pass async_req=True\n >>> thread = api.replace_namespaced_cron_job_status(name, namespace, body, async_req=True)\n >>> result = thread.get()\n\n :param async_req bool: execute request asynchronously\n :param str name: name of the CronJob (required)\n :param str namespace: object name and auth scope, such as for teams and projects (required)\n :param V1CronJob body: (required)\n :param str pretty: If 'true', then the output is pretty printed.\n :param str dry_run: When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed\n :param str field_manager: fieldManager is a name associated with the actor or entity that is making these changes. The value must be less than or 128 characters long, and only contain printable characters, as defined by https://golang.org/pkg/unicode/#IsPrint.\n :param _preload_content: if False, the urllib3.HTTPResponse object will\n be returned without reading/decoding response\n data. Default is True.\n :param _request_timeout: timeout setting for this request. If one\n number provided, it will be total request\n timeout. It can also be a pair (tuple) of\n (connection, read) timeouts.\n :return: V1CronJob\n If the method is called asynchronously,\n returns the request thread.\n " kwargs['_return_http_data_only'] = True return self.replace_namespaced_cron_job_status_with_http_info(name, namespace, body, **kwargs)<|docstring|>replace_namespaced_cron_job_status # noqa: E501 replace status of the specified CronJob # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True >>> thread = api.replace_namespaced_cron_job_status(name, namespace, body, async_req=True) >>> result = thread.get() :param async_req bool: execute request asynchronously :param str name: name of the CronJob (required) :param str namespace: object name and auth scope, such as for teams and projects (required) :param V1CronJob body: (required) :param str pretty: If 'true', then the output is pretty printed. :param str dry_run: When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed :param str field_manager: fieldManager is a name associated with the actor or entity that is making these changes. The value must be less than or 128 characters long, and only contain printable characters, as defined by https://golang.org/pkg/unicode/#IsPrint. :param _preload_content: if False, the urllib3.HTTPResponse object will be returned without reading/decoding response data. Default is True. :param _request_timeout: timeout setting for this request. If one number provided, it will be total request timeout. It can also be a pair (tuple) of (connection, read) timeouts. :return: V1CronJob If the method is called asynchronously, returns the request thread.<|endoftext|>
a58d3776e2c4302e09634ccc3c4747d0548a07620e89f6fc27fed6e68b64d1e0
def replace_namespaced_cron_job_status_with_http_info(self, name, namespace, body, **kwargs): "replace_namespaced_cron_job_status # noqa: E501\n\n replace status of the specified CronJob # noqa: E501\n This method makes a synchronous HTTP request by default. To make an\n asynchronous HTTP request, please pass async_req=True\n >>> thread = api.replace_namespaced_cron_job_status_with_http_info(name, namespace, body, async_req=True)\n >>> result = thread.get()\n\n :param async_req bool: execute request asynchronously\n :param str name: name of the CronJob (required)\n :param str namespace: object name and auth scope, such as for teams and projects (required)\n :param V1CronJob body: (required)\n :param str pretty: If 'true', then the output is pretty printed.\n :param str dry_run: When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed\n :param str field_manager: fieldManager is a name associated with the actor or entity that is making these changes. The value must be less than or 128 characters long, and only contain printable characters, as defined by https://golang.org/pkg/unicode/#IsPrint.\n :param _return_http_data_only: response data without head status code\n and headers\n :param _preload_content: if False, the urllib3.HTTPResponse object will\n be returned without reading/decoding response\n data. Default is True.\n :param _request_timeout: timeout setting for this request. If one\n number provided, it will be total request\n timeout. It can also be a pair (tuple) of\n (connection, read) timeouts.\n :return: tuple(V1CronJob, status_code(int), headers(HTTPHeaderDict))\n If the method is called asynchronously,\n returns the request thread.\n " local_var_params = locals() all_params = ['name', 'namespace', 'body', 'pretty', 'dry_run', 'field_manager'] all_params.extend(['async_req', '_return_http_data_only', '_preload_content', '_request_timeout']) for (key, val) in six.iteritems(local_var_params['kwargs']): if (key not in all_params): raise ApiTypeError(("Got an unexpected keyword argument '%s' to method replace_namespaced_cron_job_status" % key)) local_var_params[key] = val del local_var_params['kwargs'] if (self.api_client.client_side_validation and (('name' not in local_var_params) or (local_var_params['name'] is None))): raise ApiValueError('Missing the required parameter `name` when calling `replace_namespaced_cron_job_status`') if (self.api_client.client_side_validation and (('namespace' not in local_var_params) or (local_var_params['namespace'] is None))): raise ApiValueError('Missing the required parameter `namespace` when calling `replace_namespaced_cron_job_status`') if (self.api_client.client_side_validation and (('body' not in local_var_params) or (local_var_params['body'] is None))): raise ApiValueError('Missing the required parameter `body` when calling `replace_namespaced_cron_job_status`') collection_formats = {} path_params = {} if ('name' in local_var_params): path_params['name'] = local_var_params['name'] if ('namespace' in local_var_params): path_params['namespace'] = local_var_params['namespace'] query_params = [] if (('pretty' in local_var_params) and (local_var_params['pretty'] is not None)): query_params.append(('pretty', local_var_params['pretty'])) if (('dry_run' in local_var_params) and (local_var_params['dry_run'] is not None)): query_params.append(('dryRun', local_var_params['dry_run'])) if (('field_manager' in local_var_params) and (local_var_params['field_manager'] is not None)): query_params.append(('fieldManager', local_var_params['field_manager'])) header_params = {} form_params = [] local_var_files = {} body_params = None if ('body' in local_var_params): body_params = local_var_params['body'] header_params['Accept'] = self.api_client.select_header_accept(['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf']) auth_settings = ['BearerToken'] return self.api_client.call_api('/apis/batch/v1/namespaces/{namespace}/cronjobs/{name}/status', 'PUT', path_params, query_params, header_params, body=body_params, post_params=form_params, files=local_var_files, response_type='V1CronJob', auth_settings=auth_settings, async_req=local_var_params.get('async_req'), _return_http_data_only=local_var_params.get('_return_http_data_only'), _preload_content=local_var_params.get('_preload_content', True), _request_timeout=local_var_params.get('_request_timeout'), collection_formats=collection_formats)
replace_namespaced_cron_job_status # noqa: E501 replace status of the specified CronJob # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True >>> thread = api.replace_namespaced_cron_job_status_with_http_info(name, namespace, body, async_req=True) >>> result = thread.get() :param async_req bool: execute request asynchronously :param str name: name of the CronJob (required) :param str namespace: object name and auth scope, such as for teams and projects (required) :param V1CronJob body: (required) :param str pretty: If 'true', then the output is pretty printed. :param str dry_run: When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed :param str field_manager: fieldManager is a name associated with the actor or entity that is making these changes. The value must be less than or 128 characters long, and only contain printable characters, as defined by https://golang.org/pkg/unicode/#IsPrint. :param _return_http_data_only: response data without head status code and headers :param _preload_content: if False, the urllib3.HTTPResponse object will be returned without reading/decoding response data. Default is True. :param _request_timeout: timeout setting for this request. If one number provided, it will be total request timeout. It can also be a pair (tuple) of (connection, read) timeouts. :return: tuple(V1CronJob, status_code(int), headers(HTTPHeaderDict)) If the method is called asynchronously, returns the request thread.
kubernetes/client/api/batch_v1_api.py
replace_namespaced_cron_job_status_with_http_info
knkgun/python
1
python
def replace_namespaced_cron_job_status_with_http_info(self, name, namespace, body, **kwargs): "replace_namespaced_cron_job_status # noqa: E501\n\n replace status of the specified CronJob # noqa: E501\n This method makes a synchronous HTTP request by default. To make an\n asynchronous HTTP request, please pass async_req=True\n >>> thread = api.replace_namespaced_cron_job_status_with_http_info(name, namespace, body, async_req=True)\n >>> result = thread.get()\n\n :param async_req bool: execute request asynchronously\n :param str name: name of the CronJob (required)\n :param str namespace: object name and auth scope, such as for teams and projects (required)\n :param V1CronJob body: (required)\n :param str pretty: If 'true', then the output is pretty printed.\n :param str dry_run: When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed\n :param str field_manager: fieldManager is a name associated with the actor or entity that is making these changes. The value must be less than or 128 characters long, and only contain printable characters, as defined by https://golang.org/pkg/unicode/#IsPrint.\n :param _return_http_data_only: response data without head status code\n and headers\n :param _preload_content: if False, the urllib3.HTTPResponse object will\n be returned without reading/decoding response\n data. Default is True.\n :param _request_timeout: timeout setting for this request. If one\n number provided, it will be total request\n timeout. It can also be a pair (tuple) of\n (connection, read) timeouts.\n :return: tuple(V1CronJob, status_code(int), headers(HTTPHeaderDict))\n If the method is called asynchronously,\n returns the request thread.\n " local_var_params = locals() all_params = ['name', 'namespace', 'body', 'pretty', 'dry_run', 'field_manager'] all_params.extend(['async_req', '_return_http_data_only', '_preload_content', '_request_timeout']) for (key, val) in six.iteritems(local_var_params['kwargs']): if (key not in all_params): raise ApiTypeError(("Got an unexpected keyword argument '%s' to method replace_namespaced_cron_job_status" % key)) local_var_params[key] = val del local_var_params['kwargs'] if (self.api_client.client_side_validation and (('name' not in local_var_params) or (local_var_params['name'] is None))): raise ApiValueError('Missing the required parameter `name` when calling `replace_namespaced_cron_job_status`') if (self.api_client.client_side_validation and (('namespace' not in local_var_params) or (local_var_params['namespace'] is None))): raise ApiValueError('Missing the required parameter `namespace` when calling `replace_namespaced_cron_job_status`') if (self.api_client.client_side_validation and (('body' not in local_var_params) or (local_var_params['body'] is None))): raise ApiValueError('Missing the required parameter `body` when calling `replace_namespaced_cron_job_status`') collection_formats = {} path_params = {} if ('name' in local_var_params): path_params['name'] = local_var_params['name'] if ('namespace' in local_var_params): path_params['namespace'] = local_var_params['namespace'] query_params = [] if (('pretty' in local_var_params) and (local_var_params['pretty'] is not None)): query_params.append(('pretty', local_var_params['pretty'])) if (('dry_run' in local_var_params) and (local_var_params['dry_run'] is not None)): query_params.append(('dryRun', local_var_params['dry_run'])) if (('field_manager' in local_var_params) and (local_var_params['field_manager'] is not None)): query_params.append(('fieldManager', local_var_params['field_manager'])) header_params = {} form_params = [] local_var_files = {} body_params = None if ('body' in local_var_params): body_params = local_var_params['body'] header_params['Accept'] = self.api_client.select_header_accept(['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf']) auth_settings = ['BearerToken'] return self.api_client.call_api('/apis/batch/v1/namespaces/{namespace}/cronjobs/{name}/status', 'PUT', path_params, query_params, header_params, body=body_params, post_params=form_params, files=local_var_files, response_type='V1CronJob', auth_settings=auth_settings, async_req=local_var_params.get('async_req'), _return_http_data_only=local_var_params.get('_return_http_data_only'), _preload_content=local_var_params.get('_preload_content', True), _request_timeout=local_var_params.get('_request_timeout'), collection_formats=collection_formats)
def replace_namespaced_cron_job_status_with_http_info(self, name, namespace, body, **kwargs): "replace_namespaced_cron_job_status # noqa: E501\n\n replace status of the specified CronJob # noqa: E501\n This method makes a synchronous HTTP request by default. To make an\n asynchronous HTTP request, please pass async_req=True\n >>> thread = api.replace_namespaced_cron_job_status_with_http_info(name, namespace, body, async_req=True)\n >>> result = thread.get()\n\n :param async_req bool: execute request asynchronously\n :param str name: name of the CronJob (required)\n :param str namespace: object name and auth scope, such as for teams and projects (required)\n :param V1CronJob body: (required)\n :param str pretty: If 'true', then the output is pretty printed.\n :param str dry_run: When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed\n :param str field_manager: fieldManager is a name associated with the actor or entity that is making these changes. The value must be less than or 128 characters long, and only contain printable characters, as defined by https://golang.org/pkg/unicode/#IsPrint.\n :param _return_http_data_only: response data without head status code\n and headers\n :param _preload_content: if False, the urllib3.HTTPResponse object will\n be returned without reading/decoding response\n data. Default is True.\n :param _request_timeout: timeout setting for this request. If one\n number provided, it will be total request\n timeout. It can also be a pair (tuple) of\n (connection, read) timeouts.\n :return: tuple(V1CronJob, status_code(int), headers(HTTPHeaderDict))\n If the method is called asynchronously,\n returns the request thread.\n " local_var_params = locals() all_params = ['name', 'namespace', 'body', 'pretty', 'dry_run', 'field_manager'] all_params.extend(['async_req', '_return_http_data_only', '_preload_content', '_request_timeout']) for (key, val) in six.iteritems(local_var_params['kwargs']): if (key not in all_params): raise ApiTypeError(("Got an unexpected keyword argument '%s' to method replace_namespaced_cron_job_status" % key)) local_var_params[key] = val del local_var_params['kwargs'] if (self.api_client.client_side_validation and (('name' not in local_var_params) or (local_var_params['name'] is None))): raise ApiValueError('Missing the required parameter `name` when calling `replace_namespaced_cron_job_status`') if (self.api_client.client_side_validation and (('namespace' not in local_var_params) or (local_var_params['namespace'] is None))): raise ApiValueError('Missing the required parameter `namespace` when calling `replace_namespaced_cron_job_status`') if (self.api_client.client_side_validation and (('body' not in local_var_params) or (local_var_params['body'] is None))): raise ApiValueError('Missing the required parameter `body` when calling `replace_namespaced_cron_job_status`') collection_formats = {} path_params = {} if ('name' in local_var_params): path_params['name'] = local_var_params['name'] if ('namespace' in local_var_params): path_params['namespace'] = local_var_params['namespace'] query_params = [] if (('pretty' in local_var_params) and (local_var_params['pretty'] is not None)): query_params.append(('pretty', local_var_params['pretty'])) if (('dry_run' in local_var_params) and (local_var_params['dry_run'] is not None)): query_params.append(('dryRun', local_var_params['dry_run'])) if (('field_manager' in local_var_params) and (local_var_params['field_manager'] is not None)): query_params.append(('fieldManager', local_var_params['field_manager'])) header_params = {} form_params = [] local_var_files = {} body_params = None if ('body' in local_var_params): body_params = local_var_params['body'] header_params['Accept'] = self.api_client.select_header_accept(['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf']) auth_settings = ['BearerToken'] return self.api_client.call_api('/apis/batch/v1/namespaces/{namespace}/cronjobs/{name}/status', 'PUT', path_params, query_params, header_params, body=body_params, post_params=form_params, files=local_var_files, response_type='V1CronJob', auth_settings=auth_settings, async_req=local_var_params.get('async_req'), _return_http_data_only=local_var_params.get('_return_http_data_only'), _preload_content=local_var_params.get('_preload_content', True), _request_timeout=local_var_params.get('_request_timeout'), collection_formats=collection_formats)<|docstring|>replace_namespaced_cron_job_status # noqa: E501 replace status of the specified CronJob # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True >>> thread = api.replace_namespaced_cron_job_status_with_http_info(name, namespace, body, async_req=True) >>> result = thread.get() :param async_req bool: execute request asynchronously :param str name: name of the CronJob (required) :param str namespace: object name and auth scope, such as for teams and projects (required) :param V1CronJob body: (required) :param str pretty: If 'true', then the output is pretty printed. :param str dry_run: When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed :param str field_manager: fieldManager is a name associated with the actor or entity that is making these changes. The value must be less than or 128 characters long, and only contain printable characters, as defined by https://golang.org/pkg/unicode/#IsPrint. :param _return_http_data_only: response data without head status code and headers :param _preload_content: if False, the urllib3.HTTPResponse object will be returned without reading/decoding response data. Default is True. :param _request_timeout: timeout setting for this request. If one number provided, it will be total request timeout. It can also be a pair (tuple) of (connection, read) timeouts. :return: tuple(V1CronJob, status_code(int), headers(HTTPHeaderDict)) If the method is called asynchronously, returns the request thread.<|endoftext|>
4b62b74176e0ef4835185b0557d4ad2419b3425f0ce1da9bd63d6f78519c1593
def replace_namespaced_job(self, name, namespace, body, **kwargs): "replace_namespaced_job # noqa: E501\n\n replace the specified Job # noqa: E501\n This method makes a synchronous HTTP request by default. To make an\n asynchronous HTTP request, please pass async_req=True\n >>> thread = api.replace_namespaced_job(name, namespace, body, async_req=True)\n >>> result = thread.get()\n\n :param async_req bool: execute request asynchronously\n :param str name: name of the Job (required)\n :param str namespace: object name and auth scope, such as for teams and projects (required)\n :param V1Job body: (required)\n :param str pretty: If 'true', then the output is pretty printed.\n :param str dry_run: When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed\n :param str field_manager: fieldManager is a name associated with the actor or entity that is making these changes. The value must be less than or 128 characters long, and only contain printable characters, as defined by https://golang.org/pkg/unicode/#IsPrint.\n :param _preload_content: if False, the urllib3.HTTPResponse object will\n be returned without reading/decoding response\n data. Default is True.\n :param _request_timeout: timeout setting for this request. If one\n number provided, it will be total request\n timeout. It can also be a pair (tuple) of\n (connection, read) timeouts.\n :return: V1Job\n If the method is called asynchronously,\n returns the request thread.\n " kwargs['_return_http_data_only'] = True return self.replace_namespaced_job_with_http_info(name, namespace, body, **kwargs)
replace_namespaced_job # noqa: E501 replace the specified Job # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True >>> thread = api.replace_namespaced_job(name, namespace, body, async_req=True) >>> result = thread.get() :param async_req bool: execute request asynchronously :param str name: name of the Job (required) :param str namespace: object name and auth scope, such as for teams and projects (required) :param V1Job body: (required) :param str pretty: If 'true', then the output is pretty printed. :param str dry_run: When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed :param str field_manager: fieldManager is a name associated with the actor or entity that is making these changes. The value must be less than or 128 characters long, and only contain printable characters, as defined by https://golang.org/pkg/unicode/#IsPrint. :param _preload_content: if False, the urllib3.HTTPResponse object will be returned without reading/decoding response data. Default is True. :param _request_timeout: timeout setting for this request. If one number provided, it will be total request timeout. It can also be a pair (tuple) of (connection, read) timeouts. :return: V1Job If the method is called asynchronously, returns the request thread.
kubernetes/client/api/batch_v1_api.py
replace_namespaced_job
knkgun/python
1
python
def replace_namespaced_job(self, name, namespace, body, **kwargs): "replace_namespaced_job # noqa: E501\n\n replace the specified Job # noqa: E501\n This method makes a synchronous HTTP request by default. To make an\n asynchronous HTTP request, please pass async_req=True\n >>> thread = api.replace_namespaced_job(name, namespace, body, async_req=True)\n >>> result = thread.get()\n\n :param async_req bool: execute request asynchronously\n :param str name: name of the Job (required)\n :param str namespace: object name and auth scope, such as for teams and projects (required)\n :param V1Job body: (required)\n :param str pretty: If 'true', then the output is pretty printed.\n :param str dry_run: When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed\n :param str field_manager: fieldManager is a name associated with the actor or entity that is making these changes. The value must be less than or 128 characters long, and only contain printable characters, as defined by https://golang.org/pkg/unicode/#IsPrint.\n :param _preload_content: if False, the urllib3.HTTPResponse object will\n be returned without reading/decoding response\n data. Default is True.\n :param _request_timeout: timeout setting for this request. If one\n number provided, it will be total request\n timeout. It can also be a pair (tuple) of\n (connection, read) timeouts.\n :return: V1Job\n If the method is called asynchronously,\n returns the request thread.\n " kwargs['_return_http_data_only'] = True return self.replace_namespaced_job_with_http_info(name, namespace, body, **kwargs)
def replace_namespaced_job(self, name, namespace, body, **kwargs): "replace_namespaced_job # noqa: E501\n\n replace the specified Job # noqa: E501\n This method makes a synchronous HTTP request by default. To make an\n asynchronous HTTP request, please pass async_req=True\n >>> thread = api.replace_namespaced_job(name, namespace, body, async_req=True)\n >>> result = thread.get()\n\n :param async_req bool: execute request asynchronously\n :param str name: name of the Job (required)\n :param str namespace: object name and auth scope, such as for teams and projects (required)\n :param V1Job body: (required)\n :param str pretty: If 'true', then the output is pretty printed.\n :param str dry_run: When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed\n :param str field_manager: fieldManager is a name associated with the actor or entity that is making these changes. The value must be less than or 128 characters long, and only contain printable characters, as defined by https://golang.org/pkg/unicode/#IsPrint.\n :param _preload_content: if False, the urllib3.HTTPResponse object will\n be returned without reading/decoding response\n data. Default is True.\n :param _request_timeout: timeout setting for this request. If one\n number provided, it will be total request\n timeout. It can also be a pair (tuple) of\n (connection, read) timeouts.\n :return: V1Job\n If the method is called asynchronously,\n returns the request thread.\n " kwargs['_return_http_data_only'] = True return self.replace_namespaced_job_with_http_info(name, namespace, body, **kwargs)<|docstring|>replace_namespaced_job # noqa: E501 replace the specified Job # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True >>> thread = api.replace_namespaced_job(name, namespace, body, async_req=True) >>> result = thread.get() :param async_req bool: execute request asynchronously :param str name: name of the Job (required) :param str namespace: object name and auth scope, such as for teams and projects (required) :param V1Job body: (required) :param str pretty: If 'true', then the output is pretty printed. :param str dry_run: When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed :param str field_manager: fieldManager is a name associated with the actor or entity that is making these changes. The value must be less than or 128 characters long, and only contain printable characters, as defined by https://golang.org/pkg/unicode/#IsPrint. :param _preload_content: if False, the urllib3.HTTPResponse object will be returned without reading/decoding response data. Default is True. :param _request_timeout: timeout setting for this request. If one number provided, it will be total request timeout. It can also be a pair (tuple) of (connection, read) timeouts. :return: V1Job If the method is called asynchronously, returns the request thread.<|endoftext|>
1c38e149297dbece3c16a91d2b3fcb1a4af9f84da56e093429ff2b9712e14505
def replace_namespaced_job_with_http_info(self, name, namespace, body, **kwargs): "replace_namespaced_job # noqa: E501\n\n replace the specified Job # noqa: E501\n This method makes a synchronous HTTP request by default. To make an\n asynchronous HTTP request, please pass async_req=True\n >>> thread = api.replace_namespaced_job_with_http_info(name, namespace, body, async_req=True)\n >>> result = thread.get()\n\n :param async_req bool: execute request asynchronously\n :param str name: name of the Job (required)\n :param str namespace: object name and auth scope, such as for teams and projects (required)\n :param V1Job body: (required)\n :param str pretty: If 'true', then the output is pretty printed.\n :param str dry_run: When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed\n :param str field_manager: fieldManager is a name associated with the actor or entity that is making these changes. The value must be less than or 128 characters long, and only contain printable characters, as defined by https://golang.org/pkg/unicode/#IsPrint.\n :param _return_http_data_only: response data without head status code\n and headers\n :param _preload_content: if False, the urllib3.HTTPResponse object will\n be returned without reading/decoding response\n data. Default is True.\n :param _request_timeout: timeout setting for this request. If one\n number provided, it will be total request\n timeout. It can also be a pair (tuple) of\n (connection, read) timeouts.\n :return: tuple(V1Job, status_code(int), headers(HTTPHeaderDict))\n If the method is called asynchronously,\n returns the request thread.\n " local_var_params = locals() all_params = ['name', 'namespace', 'body', 'pretty', 'dry_run', 'field_manager'] all_params.extend(['async_req', '_return_http_data_only', '_preload_content', '_request_timeout']) for (key, val) in six.iteritems(local_var_params['kwargs']): if (key not in all_params): raise ApiTypeError(("Got an unexpected keyword argument '%s' to method replace_namespaced_job" % key)) local_var_params[key] = val del local_var_params['kwargs'] if (self.api_client.client_side_validation and (('name' not in local_var_params) or (local_var_params['name'] is None))): raise ApiValueError('Missing the required parameter `name` when calling `replace_namespaced_job`') if (self.api_client.client_side_validation and (('namespace' not in local_var_params) or (local_var_params['namespace'] is None))): raise ApiValueError('Missing the required parameter `namespace` when calling `replace_namespaced_job`') if (self.api_client.client_side_validation and (('body' not in local_var_params) or (local_var_params['body'] is None))): raise ApiValueError('Missing the required parameter `body` when calling `replace_namespaced_job`') collection_formats = {} path_params = {} if ('name' in local_var_params): path_params['name'] = local_var_params['name'] if ('namespace' in local_var_params): path_params['namespace'] = local_var_params['namespace'] query_params = [] if (('pretty' in local_var_params) and (local_var_params['pretty'] is not None)): query_params.append(('pretty', local_var_params['pretty'])) if (('dry_run' in local_var_params) and (local_var_params['dry_run'] is not None)): query_params.append(('dryRun', local_var_params['dry_run'])) if (('field_manager' in local_var_params) and (local_var_params['field_manager'] is not None)): query_params.append(('fieldManager', local_var_params['field_manager'])) header_params = {} form_params = [] local_var_files = {} body_params = None if ('body' in local_var_params): body_params = local_var_params['body'] header_params['Accept'] = self.api_client.select_header_accept(['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf']) auth_settings = ['BearerToken'] return self.api_client.call_api('/apis/batch/v1/namespaces/{namespace}/jobs/{name}', 'PUT', path_params, query_params, header_params, body=body_params, post_params=form_params, files=local_var_files, response_type='V1Job', auth_settings=auth_settings, async_req=local_var_params.get('async_req'), _return_http_data_only=local_var_params.get('_return_http_data_only'), _preload_content=local_var_params.get('_preload_content', True), _request_timeout=local_var_params.get('_request_timeout'), collection_formats=collection_formats)
replace_namespaced_job # noqa: E501 replace the specified Job # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True >>> thread = api.replace_namespaced_job_with_http_info(name, namespace, body, async_req=True) >>> result = thread.get() :param async_req bool: execute request asynchronously :param str name: name of the Job (required) :param str namespace: object name and auth scope, such as for teams and projects (required) :param V1Job body: (required) :param str pretty: If 'true', then the output is pretty printed. :param str dry_run: When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed :param str field_manager: fieldManager is a name associated with the actor or entity that is making these changes. The value must be less than or 128 characters long, and only contain printable characters, as defined by https://golang.org/pkg/unicode/#IsPrint. :param _return_http_data_only: response data without head status code and headers :param _preload_content: if False, the urllib3.HTTPResponse object will be returned without reading/decoding response data. Default is True. :param _request_timeout: timeout setting for this request. If one number provided, it will be total request timeout. It can also be a pair (tuple) of (connection, read) timeouts. :return: tuple(V1Job, status_code(int), headers(HTTPHeaderDict)) If the method is called asynchronously, returns the request thread.
kubernetes/client/api/batch_v1_api.py
replace_namespaced_job_with_http_info
knkgun/python
1
python
def replace_namespaced_job_with_http_info(self, name, namespace, body, **kwargs): "replace_namespaced_job # noqa: E501\n\n replace the specified Job # noqa: E501\n This method makes a synchronous HTTP request by default. To make an\n asynchronous HTTP request, please pass async_req=True\n >>> thread = api.replace_namespaced_job_with_http_info(name, namespace, body, async_req=True)\n >>> result = thread.get()\n\n :param async_req bool: execute request asynchronously\n :param str name: name of the Job (required)\n :param str namespace: object name and auth scope, such as for teams and projects (required)\n :param V1Job body: (required)\n :param str pretty: If 'true', then the output is pretty printed.\n :param str dry_run: When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed\n :param str field_manager: fieldManager is a name associated with the actor or entity that is making these changes. The value must be less than or 128 characters long, and only contain printable characters, as defined by https://golang.org/pkg/unicode/#IsPrint.\n :param _return_http_data_only: response data without head status code\n and headers\n :param _preload_content: if False, the urllib3.HTTPResponse object will\n be returned without reading/decoding response\n data. Default is True.\n :param _request_timeout: timeout setting for this request. If one\n number provided, it will be total request\n timeout. It can also be a pair (tuple) of\n (connection, read) timeouts.\n :return: tuple(V1Job, status_code(int), headers(HTTPHeaderDict))\n If the method is called asynchronously,\n returns the request thread.\n " local_var_params = locals() all_params = ['name', 'namespace', 'body', 'pretty', 'dry_run', 'field_manager'] all_params.extend(['async_req', '_return_http_data_only', '_preload_content', '_request_timeout']) for (key, val) in six.iteritems(local_var_params['kwargs']): if (key not in all_params): raise ApiTypeError(("Got an unexpected keyword argument '%s' to method replace_namespaced_job" % key)) local_var_params[key] = val del local_var_params['kwargs'] if (self.api_client.client_side_validation and (('name' not in local_var_params) or (local_var_params['name'] is None))): raise ApiValueError('Missing the required parameter `name` when calling `replace_namespaced_job`') if (self.api_client.client_side_validation and (('namespace' not in local_var_params) or (local_var_params['namespace'] is None))): raise ApiValueError('Missing the required parameter `namespace` when calling `replace_namespaced_job`') if (self.api_client.client_side_validation and (('body' not in local_var_params) or (local_var_params['body'] is None))): raise ApiValueError('Missing the required parameter `body` when calling `replace_namespaced_job`') collection_formats = {} path_params = {} if ('name' in local_var_params): path_params['name'] = local_var_params['name'] if ('namespace' in local_var_params): path_params['namespace'] = local_var_params['namespace'] query_params = [] if (('pretty' in local_var_params) and (local_var_params['pretty'] is not None)): query_params.append(('pretty', local_var_params['pretty'])) if (('dry_run' in local_var_params) and (local_var_params['dry_run'] is not None)): query_params.append(('dryRun', local_var_params['dry_run'])) if (('field_manager' in local_var_params) and (local_var_params['field_manager'] is not None)): query_params.append(('fieldManager', local_var_params['field_manager'])) header_params = {} form_params = [] local_var_files = {} body_params = None if ('body' in local_var_params): body_params = local_var_params['body'] header_params['Accept'] = self.api_client.select_header_accept(['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf']) auth_settings = ['BearerToken'] return self.api_client.call_api('/apis/batch/v1/namespaces/{namespace}/jobs/{name}', 'PUT', path_params, query_params, header_params, body=body_params, post_params=form_params, files=local_var_files, response_type='V1Job', auth_settings=auth_settings, async_req=local_var_params.get('async_req'), _return_http_data_only=local_var_params.get('_return_http_data_only'), _preload_content=local_var_params.get('_preload_content', True), _request_timeout=local_var_params.get('_request_timeout'), collection_formats=collection_formats)
def replace_namespaced_job_with_http_info(self, name, namespace, body, **kwargs): "replace_namespaced_job # noqa: E501\n\n replace the specified Job # noqa: E501\n This method makes a synchronous HTTP request by default. To make an\n asynchronous HTTP request, please pass async_req=True\n >>> thread = api.replace_namespaced_job_with_http_info(name, namespace, body, async_req=True)\n >>> result = thread.get()\n\n :param async_req bool: execute request asynchronously\n :param str name: name of the Job (required)\n :param str namespace: object name and auth scope, such as for teams and projects (required)\n :param V1Job body: (required)\n :param str pretty: If 'true', then the output is pretty printed.\n :param str dry_run: When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed\n :param str field_manager: fieldManager is a name associated with the actor or entity that is making these changes. The value must be less than or 128 characters long, and only contain printable characters, as defined by https://golang.org/pkg/unicode/#IsPrint.\n :param _return_http_data_only: response data without head status code\n and headers\n :param _preload_content: if False, the urllib3.HTTPResponse object will\n be returned without reading/decoding response\n data. Default is True.\n :param _request_timeout: timeout setting for this request. If one\n number provided, it will be total request\n timeout. It can also be a pair (tuple) of\n (connection, read) timeouts.\n :return: tuple(V1Job, status_code(int), headers(HTTPHeaderDict))\n If the method is called asynchronously,\n returns the request thread.\n " local_var_params = locals() all_params = ['name', 'namespace', 'body', 'pretty', 'dry_run', 'field_manager'] all_params.extend(['async_req', '_return_http_data_only', '_preload_content', '_request_timeout']) for (key, val) in six.iteritems(local_var_params['kwargs']): if (key not in all_params): raise ApiTypeError(("Got an unexpected keyword argument '%s' to method replace_namespaced_job" % key)) local_var_params[key] = val del local_var_params['kwargs'] if (self.api_client.client_side_validation and (('name' not in local_var_params) or (local_var_params['name'] is None))): raise ApiValueError('Missing the required parameter `name` when calling `replace_namespaced_job`') if (self.api_client.client_side_validation and (('namespace' not in local_var_params) or (local_var_params['namespace'] is None))): raise ApiValueError('Missing the required parameter `namespace` when calling `replace_namespaced_job`') if (self.api_client.client_side_validation and (('body' not in local_var_params) or (local_var_params['body'] is None))): raise ApiValueError('Missing the required parameter `body` when calling `replace_namespaced_job`') collection_formats = {} path_params = {} if ('name' in local_var_params): path_params['name'] = local_var_params['name'] if ('namespace' in local_var_params): path_params['namespace'] = local_var_params['namespace'] query_params = [] if (('pretty' in local_var_params) and (local_var_params['pretty'] is not None)): query_params.append(('pretty', local_var_params['pretty'])) if (('dry_run' in local_var_params) and (local_var_params['dry_run'] is not None)): query_params.append(('dryRun', local_var_params['dry_run'])) if (('field_manager' in local_var_params) and (local_var_params['field_manager'] is not None)): query_params.append(('fieldManager', local_var_params['field_manager'])) header_params = {} form_params = [] local_var_files = {} body_params = None if ('body' in local_var_params): body_params = local_var_params['body'] header_params['Accept'] = self.api_client.select_header_accept(['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf']) auth_settings = ['BearerToken'] return self.api_client.call_api('/apis/batch/v1/namespaces/{namespace}/jobs/{name}', 'PUT', path_params, query_params, header_params, body=body_params, post_params=form_params, files=local_var_files, response_type='V1Job', auth_settings=auth_settings, async_req=local_var_params.get('async_req'), _return_http_data_only=local_var_params.get('_return_http_data_only'), _preload_content=local_var_params.get('_preload_content', True), _request_timeout=local_var_params.get('_request_timeout'), collection_formats=collection_formats)<|docstring|>replace_namespaced_job # noqa: E501 replace the specified Job # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True >>> thread = api.replace_namespaced_job_with_http_info(name, namespace, body, async_req=True) >>> result = thread.get() :param async_req bool: execute request asynchronously :param str name: name of the Job (required) :param str namespace: object name and auth scope, such as for teams and projects (required) :param V1Job body: (required) :param str pretty: If 'true', then the output is pretty printed. :param str dry_run: When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed :param str field_manager: fieldManager is a name associated with the actor or entity that is making these changes. The value must be less than or 128 characters long, and only contain printable characters, as defined by https://golang.org/pkg/unicode/#IsPrint. :param _return_http_data_only: response data without head status code and headers :param _preload_content: if False, the urllib3.HTTPResponse object will be returned without reading/decoding response data. Default is True. :param _request_timeout: timeout setting for this request. If one number provided, it will be total request timeout. It can also be a pair (tuple) of (connection, read) timeouts. :return: tuple(V1Job, status_code(int), headers(HTTPHeaderDict)) If the method is called asynchronously, returns the request thread.<|endoftext|>
89da744d42d2a5f8f471e8a23337a0fccc88d3d618a70713e2df291d44c886e2
def replace_namespaced_job_status(self, name, namespace, body, **kwargs): "replace_namespaced_job_status # noqa: E501\n\n replace status of the specified Job # noqa: E501\n This method makes a synchronous HTTP request by default. To make an\n asynchronous HTTP request, please pass async_req=True\n >>> thread = api.replace_namespaced_job_status(name, namespace, body, async_req=True)\n >>> result = thread.get()\n\n :param async_req bool: execute request asynchronously\n :param str name: name of the Job (required)\n :param str namespace: object name and auth scope, such as for teams and projects (required)\n :param V1Job body: (required)\n :param str pretty: If 'true', then the output is pretty printed.\n :param str dry_run: When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed\n :param str field_manager: fieldManager is a name associated with the actor or entity that is making these changes. The value must be less than or 128 characters long, and only contain printable characters, as defined by https://golang.org/pkg/unicode/#IsPrint.\n :param _preload_content: if False, the urllib3.HTTPResponse object will\n be returned without reading/decoding response\n data. Default is True.\n :param _request_timeout: timeout setting for this request. If one\n number provided, it will be total request\n timeout. It can also be a pair (tuple) of\n (connection, read) timeouts.\n :return: V1Job\n If the method is called asynchronously,\n returns the request thread.\n " kwargs['_return_http_data_only'] = True return self.replace_namespaced_job_status_with_http_info(name, namespace, body, **kwargs)
replace_namespaced_job_status # noqa: E501 replace status of the specified Job # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True >>> thread = api.replace_namespaced_job_status(name, namespace, body, async_req=True) >>> result = thread.get() :param async_req bool: execute request asynchronously :param str name: name of the Job (required) :param str namespace: object name and auth scope, such as for teams and projects (required) :param V1Job body: (required) :param str pretty: If 'true', then the output is pretty printed. :param str dry_run: When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed :param str field_manager: fieldManager is a name associated with the actor or entity that is making these changes. The value must be less than or 128 characters long, and only contain printable characters, as defined by https://golang.org/pkg/unicode/#IsPrint. :param _preload_content: if False, the urllib3.HTTPResponse object will be returned without reading/decoding response data. Default is True. :param _request_timeout: timeout setting for this request. If one number provided, it will be total request timeout. It can also be a pair (tuple) of (connection, read) timeouts. :return: V1Job If the method is called asynchronously, returns the request thread.
kubernetes/client/api/batch_v1_api.py
replace_namespaced_job_status
knkgun/python
1
python
def replace_namespaced_job_status(self, name, namespace, body, **kwargs): "replace_namespaced_job_status # noqa: E501\n\n replace status of the specified Job # noqa: E501\n This method makes a synchronous HTTP request by default. To make an\n asynchronous HTTP request, please pass async_req=True\n >>> thread = api.replace_namespaced_job_status(name, namespace, body, async_req=True)\n >>> result = thread.get()\n\n :param async_req bool: execute request asynchronously\n :param str name: name of the Job (required)\n :param str namespace: object name and auth scope, such as for teams and projects (required)\n :param V1Job body: (required)\n :param str pretty: If 'true', then the output is pretty printed.\n :param str dry_run: When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed\n :param str field_manager: fieldManager is a name associated with the actor or entity that is making these changes. The value must be less than or 128 characters long, and only contain printable characters, as defined by https://golang.org/pkg/unicode/#IsPrint.\n :param _preload_content: if False, the urllib3.HTTPResponse object will\n be returned without reading/decoding response\n data. Default is True.\n :param _request_timeout: timeout setting for this request. If one\n number provided, it will be total request\n timeout. It can also be a pair (tuple) of\n (connection, read) timeouts.\n :return: V1Job\n If the method is called asynchronously,\n returns the request thread.\n " kwargs['_return_http_data_only'] = True return self.replace_namespaced_job_status_with_http_info(name, namespace, body, **kwargs)
def replace_namespaced_job_status(self, name, namespace, body, **kwargs): "replace_namespaced_job_status # noqa: E501\n\n replace status of the specified Job # noqa: E501\n This method makes a synchronous HTTP request by default. To make an\n asynchronous HTTP request, please pass async_req=True\n >>> thread = api.replace_namespaced_job_status(name, namespace, body, async_req=True)\n >>> result = thread.get()\n\n :param async_req bool: execute request asynchronously\n :param str name: name of the Job (required)\n :param str namespace: object name and auth scope, such as for teams and projects (required)\n :param V1Job body: (required)\n :param str pretty: If 'true', then the output is pretty printed.\n :param str dry_run: When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed\n :param str field_manager: fieldManager is a name associated with the actor or entity that is making these changes. The value must be less than or 128 characters long, and only contain printable characters, as defined by https://golang.org/pkg/unicode/#IsPrint.\n :param _preload_content: if False, the urllib3.HTTPResponse object will\n be returned without reading/decoding response\n data. Default is True.\n :param _request_timeout: timeout setting for this request. If one\n number provided, it will be total request\n timeout. It can also be a pair (tuple) of\n (connection, read) timeouts.\n :return: V1Job\n If the method is called asynchronously,\n returns the request thread.\n " kwargs['_return_http_data_only'] = True return self.replace_namespaced_job_status_with_http_info(name, namespace, body, **kwargs)<|docstring|>replace_namespaced_job_status # noqa: E501 replace status of the specified Job # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True >>> thread = api.replace_namespaced_job_status(name, namespace, body, async_req=True) >>> result = thread.get() :param async_req bool: execute request asynchronously :param str name: name of the Job (required) :param str namespace: object name and auth scope, such as for teams and projects (required) :param V1Job body: (required) :param str pretty: If 'true', then the output is pretty printed. :param str dry_run: When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed :param str field_manager: fieldManager is a name associated with the actor or entity that is making these changes. The value must be less than or 128 characters long, and only contain printable characters, as defined by https://golang.org/pkg/unicode/#IsPrint. :param _preload_content: if False, the urllib3.HTTPResponse object will be returned without reading/decoding response data. Default is True. :param _request_timeout: timeout setting for this request. If one number provided, it will be total request timeout. It can also be a pair (tuple) of (connection, read) timeouts. :return: V1Job If the method is called asynchronously, returns the request thread.<|endoftext|>
2d4c2ccde09bb5993d1378aa2474080f38e59e8357fbf02938d1fe8cb48cedef
def replace_namespaced_job_status_with_http_info(self, name, namespace, body, **kwargs): "replace_namespaced_job_status # noqa: E501\n\n replace status of the specified Job # noqa: E501\n This method makes a synchronous HTTP request by default. To make an\n asynchronous HTTP request, please pass async_req=True\n >>> thread = api.replace_namespaced_job_status_with_http_info(name, namespace, body, async_req=True)\n >>> result = thread.get()\n\n :param async_req bool: execute request asynchronously\n :param str name: name of the Job (required)\n :param str namespace: object name and auth scope, such as for teams and projects (required)\n :param V1Job body: (required)\n :param str pretty: If 'true', then the output is pretty printed.\n :param str dry_run: When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed\n :param str field_manager: fieldManager is a name associated with the actor or entity that is making these changes. The value must be less than or 128 characters long, and only contain printable characters, as defined by https://golang.org/pkg/unicode/#IsPrint.\n :param _return_http_data_only: response data without head status code\n and headers\n :param _preload_content: if False, the urllib3.HTTPResponse object will\n be returned without reading/decoding response\n data. Default is True.\n :param _request_timeout: timeout setting for this request. If one\n number provided, it will be total request\n timeout. It can also be a pair (tuple) of\n (connection, read) timeouts.\n :return: tuple(V1Job, status_code(int), headers(HTTPHeaderDict))\n If the method is called asynchronously,\n returns the request thread.\n " local_var_params = locals() all_params = ['name', 'namespace', 'body', 'pretty', 'dry_run', 'field_manager'] all_params.extend(['async_req', '_return_http_data_only', '_preload_content', '_request_timeout']) for (key, val) in six.iteritems(local_var_params['kwargs']): if (key not in all_params): raise ApiTypeError(("Got an unexpected keyword argument '%s' to method replace_namespaced_job_status" % key)) local_var_params[key] = val del local_var_params['kwargs'] if (self.api_client.client_side_validation and (('name' not in local_var_params) or (local_var_params['name'] is None))): raise ApiValueError('Missing the required parameter `name` when calling `replace_namespaced_job_status`') if (self.api_client.client_side_validation and (('namespace' not in local_var_params) or (local_var_params['namespace'] is None))): raise ApiValueError('Missing the required parameter `namespace` when calling `replace_namespaced_job_status`') if (self.api_client.client_side_validation and (('body' not in local_var_params) or (local_var_params['body'] is None))): raise ApiValueError('Missing the required parameter `body` when calling `replace_namespaced_job_status`') collection_formats = {} path_params = {} if ('name' in local_var_params): path_params['name'] = local_var_params['name'] if ('namespace' in local_var_params): path_params['namespace'] = local_var_params['namespace'] query_params = [] if (('pretty' in local_var_params) and (local_var_params['pretty'] is not None)): query_params.append(('pretty', local_var_params['pretty'])) if (('dry_run' in local_var_params) and (local_var_params['dry_run'] is not None)): query_params.append(('dryRun', local_var_params['dry_run'])) if (('field_manager' in local_var_params) and (local_var_params['field_manager'] is not None)): query_params.append(('fieldManager', local_var_params['field_manager'])) header_params = {} form_params = [] local_var_files = {} body_params = None if ('body' in local_var_params): body_params = local_var_params['body'] header_params['Accept'] = self.api_client.select_header_accept(['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf']) auth_settings = ['BearerToken'] return self.api_client.call_api('/apis/batch/v1/namespaces/{namespace}/jobs/{name}/status', 'PUT', path_params, query_params, header_params, body=body_params, post_params=form_params, files=local_var_files, response_type='V1Job', auth_settings=auth_settings, async_req=local_var_params.get('async_req'), _return_http_data_only=local_var_params.get('_return_http_data_only'), _preload_content=local_var_params.get('_preload_content', True), _request_timeout=local_var_params.get('_request_timeout'), collection_formats=collection_formats)
replace_namespaced_job_status # noqa: E501 replace status of the specified Job # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True >>> thread = api.replace_namespaced_job_status_with_http_info(name, namespace, body, async_req=True) >>> result = thread.get() :param async_req bool: execute request asynchronously :param str name: name of the Job (required) :param str namespace: object name and auth scope, such as for teams and projects (required) :param V1Job body: (required) :param str pretty: If 'true', then the output is pretty printed. :param str dry_run: When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed :param str field_manager: fieldManager is a name associated with the actor or entity that is making these changes. The value must be less than or 128 characters long, and only contain printable characters, as defined by https://golang.org/pkg/unicode/#IsPrint. :param _return_http_data_only: response data without head status code and headers :param _preload_content: if False, the urllib3.HTTPResponse object will be returned without reading/decoding response data. Default is True. :param _request_timeout: timeout setting for this request. If one number provided, it will be total request timeout. It can also be a pair (tuple) of (connection, read) timeouts. :return: tuple(V1Job, status_code(int), headers(HTTPHeaderDict)) If the method is called asynchronously, returns the request thread.
kubernetes/client/api/batch_v1_api.py
replace_namespaced_job_status_with_http_info
knkgun/python
1
python
def replace_namespaced_job_status_with_http_info(self, name, namespace, body, **kwargs): "replace_namespaced_job_status # noqa: E501\n\n replace status of the specified Job # noqa: E501\n This method makes a synchronous HTTP request by default. To make an\n asynchronous HTTP request, please pass async_req=True\n >>> thread = api.replace_namespaced_job_status_with_http_info(name, namespace, body, async_req=True)\n >>> result = thread.get()\n\n :param async_req bool: execute request asynchronously\n :param str name: name of the Job (required)\n :param str namespace: object name and auth scope, such as for teams and projects (required)\n :param V1Job body: (required)\n :param str pretty: If 'true', then the output is pretty printed.\n :param str dry_run: When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed\n :param str field_manager: fieldManager is a name associated with the actor or entity that is making these changes. The value must be less than or 128 characters long, and only contain printable characters, as defined by https://golang.org/pkg/unicode/#IsPrint.\n :param _return_http_data_only: response data without head status code\n and headers\n :param _preload_content: if False, the urllib3.HTTPResponse object will\n be returned without reading/decoding response\n data. Default is True.\n :param _request_timeout: timeout setting for this request. If one\n number provided, it will be total request\n timeout. It can also be a pair (tuple) of\n (connection, read) timeouts.\n :return: tuple(V1Job, status_code(int), headers(HTTPHeaderDict))\n If the method is called asynchronously,\n returns the request thread.\n " local_var_params = locals() all_params = ['name', 'namespace', 'body', 'pretty', 'dry_run', 'field_manager'] all_params.extend(['async_req', '_return_http_data_only', '_preload_content', '_request_timeout']) for (key, val) in six.iteritems(local_var_params['kwargs']): if (key not in all_params): raise ApiTypeError(("Got an unexpected keyword argument '%s' to method replace_namespaced_job_status" % key)) local_var_params[key] = val del local_var_params['kwargs'] if (self.api_client.client_side_validation and (('name' not in local_var_params) or (local_var_params['name'] is None))): raise ApiValueError('Missing the required parameter `name` when calling `replace_namespaced_job_status`') if (self.api_client.client_side_validation and (('namespace' not in local_var_params) or (local_var_params['namespace'] is None))): raise ApiValueError('Missing the required parameter `namespace` when calling `replace_namespaced_job_status`') if (self.api_client.client_side_validation and (('body' not in local_var_params) or (local_var_params['body'] is None))): raise ApiValueError('Missing the required parameter `body` when calling `replace_namespaced_job_status`') collection_formats = {} path_params = {} if ('name' in local_var_params): path_params['name'] = local_var_params['name'] if ('namespace' in local_var_params): path_params['namespace'] = local_var_params['namespace'] query_params = [] if (('pretty' in local_var_params) and (local_var_params['pretty'] is not None)): query_params.append(('pretty', local_var_params['pretty'])) if (('dry_run' in local_var_params) and (local_var_params['dry_run'] is not None)): query_params.append(('dryRun', local_var_params['dry_run'])) if (('field_manager' in local_var_params) and (local_var_params['field_manager'] is not None)): query_params.append(('fieldManager', local_var_params['field_manager'])) header_params = {} form_params = [] local_var_files = {} body_params = None if ('body' in local_var_params): body_params = local_var_params['body'] header_params['Accept'] = self.api_client.select_header_accept(['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf']) auth_settings = ['BearerToken'] return self.api_client.call_api('/apis/batch/v1/namespaces/{namespace}/jobs/{name}/status', 'PUT', path_params, query_params, header_params, body=body_params, post_params=form_params, files=local_var_files, response_type='V1Job', auth_settings=auth_settings, async_req=local_var_params.get('async_req'), _return_http_data_only=local_var_params.get('_return_http_data_only'), _preload_content=local_var_params.get('_preload_content', True), _request_timeout=local_var_params.get('_request_timeout'), collection_formats=collection_formats)
def replace_namespaced_job_status_with_http_info(self, name, namespace, body, **kwargs): "replace_namespaced_job_status # noqa: E501\n\n replace status of the specified Job # noqa: E501\n This method makes a synchronous HTTP request by default. To make an\n asynchronous HTTP request, please pass async_req=True\n >>> thread = api.replace_namespaced_job_status_with_http_info(name, namespace, body, async_req=True)\n >>> result = thread.get()\n\n :param async_req bool: execute request asynchronously\n :param str name: name of the Job (required)\n :param str namespace: object name and auth scope, such as for teams and projects (required)\n :param V1Job body: (required)\n :param str pretty: If 'true', then the output is pretty printed.\n :param str dry_run: When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed\n :param str field_manager: fieldManager is a name associated with the actor or entity that is making these changes. The value must be less than or 128 characters long, and only contain printable characters, as defined by https://golang.org/pkg/unicode/#IsPrint.\n :param _return_http_data_only: response data without head status code\n and headers\n :param _preload_content: if False, the urllib3.HTTPResponse object will\n be returned without reading/decoding response\n data. Default is True.\n :param _request_timeout: timeout setting for this request. If one\n number provided, it will be total request\n timeout. It can also be a pair (tuple) of\n (connection, read) timeouts.\n :return: tuple(V1Job, status_code(int), headers(HTTPHeaderDict))\n If the method is called asynchronously,\n returns the request thread.\n " local_var_params = locals() all_params = ['name', 'namespace', 'body', 'pretty', 'dry_run', 'field_manager'] all_params.extend(['async_req', '_return_http_data_only', '_preload_content', '_request_timeout']) for (key, val) in six.iteritems(local_var_params['kwargs']): if (key not in all_params): raise ApiTypeError(("Got an unexpected keyword argument '%s' to method replace_namespaced_job_status" % key)) local_var_params[key] = val del local_var_params['kwargs'] if (self.api_client.client_side_validation and (('name' not in local_var_params) or (local_var_params['name'] is None))): raise ApiValueError('Missing the required parameter `name` when calling `replace_namespaced_job_status`') if (self.api_client.client_side_validation and (('namespace' not in local_var_params) or (local_var_params['namespace'] is None))): raise ApiValueError('Missing the required parameter `namespace` when calling `replace_namespaced_job_status`') if (self.api_client.client_side_validation and (('body' not in local_var_params) or (local_var_params['body'] is None))): raise ApiValueError('Missing the required parameter `body` when calling `replace_namespaced_job_status`') collection_formats = {} path_params = {} if ('name' in local_var_params): path_params['name'] = local_var_params['name'] if ('namespace' in local_var_params): path_params['namespace'] = local_var_params['namespace'] query_params = [] if (('pretty' in local_var_params) and (local_var_params['pretty'] is not None)): query_params.append(('pretty', local_var_params['pretty'])) if (('dry_run' in local_var_params) and (local_var_params['dry_run'] is not None)): query_params.append(('dryRun', local_var_params['dry_run'])) if (('field_manager' in local_var_params) and (local_var_params['field_manager'] is not None)): query_params.append(('fieldManager', local_var_params['field_manager'])) header_params = {} form_params = [] local_var_files = {} body_params = None if ('body' in local_var_params): body_params = local_var_params['body'] header_params['Accept'] = self.api_client.select_header_accept(['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf']) auth_settings = ['BearerToken'] return self.api_client.call_api('/apis/batch/v1/namespaces/{namespace}/jobs/{name}/status', 'PUT', path_params, query_params, header_params, body=body_params, post_params=form_params, files=local_var_files, response_type='V1Job', auth_settings=auth_settings, async_req=local_var_params.get('async_req'), _return_http_data_only=local_var_params.get('_return_http_data_only'), _preload_content=local_var_params.get('_preload_content', True), _request_timeout=local_var_params.get('_request_timeout'), collection_formats=collection_formats)<|docstring|>replace_namespaced_job_status # noqa: E501 replace status of the specified Job # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True >>> thread = api.replace_namespaced_job_status_with_http_info(name, namespace, body, async_req=True) >>> result = thread.get() :param async_req bool: execute request asynchronously :param str name: name of the Job (required) :param str namespace: object name and auth scope, such as for teams and projects (required) :param V1Job body: (required) :param str pretty: If 'true', then the output is pretty printed. :param str dry_run: When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed :param str field_manager: fieldManager is a name associated with the actor or entity that is making these changes. The value must be less than or 128 characters long, and only contain printable characters, as defined by https://golang.org/pkg/unicode/#IsPrint. :param _return_http_data_only: response data without head status code and headers :param _preload_content: if False, the urllib3.HTTPResponse object will be returned without reading/decoding response data. Default is True. :param _request_timeout: timeout setting for this request. If one number provided, it will be total request timeout. It can also be a pair (tuple) of (connection, read) timeouts. :return: tuple(V1Job, status_code(int), headers(HTTPHeaderDict)) If the method is called asynchronously, returns the request thread.<|endoftext|>
31b2f2e57cfd7dfde8d4a9eea692b9a5e14e5857ee68ac001c1522411e89a7c6
@register_make_test_function() def make_expand_dims_tests(options): 'Make a set of tests to do expand_dims.' test_parameters = [{'input_type': [tf.float32, tf.int32], 'input_shape': [[5, 4], [1, 5, 4]], 'axis_value': [0, 1, 2, (- 1), (- 2), (- 3)], 'constant_axis': [True, False], 'fully_quantize': [False]}, {'input_type': [tf.float32], 'input_shape': [[5, 4], [1, 5, 4]], 'axis_value': [0, 1, 2, (- 1), (- 2), (- 3)], 'constant_axis': [True], 'fully_quantize': [True]}] def build_graph(parameters): 'Build the where op testing graph.' inputs = [] input_value = tf.compat.v1.placeholder(dtype=parameters['input_type'], name='input', shape=parameters['input_shape']) inputs.append(input_value) if parameters['constant_axis']: axis_value = tf.constant(parameters['axis_value'], dtype=tf.int32, shape=[1]) else: axis_value = tf.compat.v1.placeholder(dtype=tf.int32, name='axis', shape=[1]) inputs.append(axis_value) out = tf.expand_dims(input_value, axis=axis_value) return (inputs, [out]) def build_inputs(parameters, sess, inputs, outputs): 'Builds the inputs for expand_dims.' input_values = [] input_values.append(create_tensor_data(parameters['input_type'], parameters['input_shape'], min_value=(- 1), max_value=1)) if (not parameters['constant_axis']): input_values.append(np.array([parameters['axis_value']], dtype=np.int32)) return (input_values, sess.run(outputs, feed_dict=dict(zip(inputs, input_values)))) make_zip_of_tests(options, test_parameters, build_graph, build_inputs)
Make a set of tests to do expand_dims.
tensorflow/lite/testing/op_tests/expand_dims.py
make_expand_dims_tests
K4S4B4/tensorflow
190,993
python
@register_make_test_function() def make_expand_dims_tests(options): test_parameters = [{'input_type': [tf.float32, tf.int32], 'input_shape': [[5, 4], [1, 5, 4]], 'axis_value': [0, 1, 2, (- 1), (- 2), (- 3)], 'constant_axis': [True, False], 'fully_quantize': [False]}, {'input_type': [tf.float32], 'input_shape': [[5, 4], [1, 5, 4]], 'axis_value': [0, 1, 2, (- 1), (- 2), (- 3)], 'constant_axis': [True], 'fully_quantize': [True]}] def build_graph(parameters): 'Build the where op testing graph.' inputs = [] input_value = tf.compat.v1.placeholder(dtype=parameters['input_type'], name='input', shape=parameters['input_shape']) inputs.append(input_value) if parameters['constant_axis']: axis_value = tf.constant(parameters['axis_value'], dtype=tf.int32, shape=[1]) else: axis_value = tf.compat.v1.placeholder(dtype=tf.int32, name='axis', shape=[1]) inputs.append(axis_value) out = tf.expand_dims(input_value, axis=axis_value) return (inputs, [out]) def build_inputs(parameters, sess, inputs, outputs): 'Builds the inputs for expand_dims.' input_values = [] input_values.append(create_tensor_data(parameters['input_type'], parameters['input_shape'], min_value=(- 1), max_value=1)) if (not parameters['constant_axis']): input_values.append(np.array([parameters['axis_value']], dtype=np.int32)) return (input_values, sess.run(outputs, feed_dict=dict(zip(inputs, input_values)))) make_zip_of_tests(options, test_parameters, build_graph, build_inputs)
@register_make_test_function() def make_expand_dims_tests(options): test_parameters = [{'input_type': [tf.float32, tf.int32], 'input_shape': [[5, 4], [1, 5, 4]], 'axis_value': [0, 1, 2, (- 1), (- 2), (- 3)], 'constant_axis': [True, False], 'fully_quantize': [False]}, {'input_type': [tf.float32], 'input_shape': [[5, 4], [1, 5, 4]], 'axis_value': [0, 1, 2, (- 1), (- 2), (- 3)], 'constant_axis': [True], 'fully_quantize': [True]}] def build_graph(parameters): 'Build the where op testing graph.' inputs = [] input_value = tf.compat.v1.placeholder(dtype=parameters['input_type'], name='input', shape=parameters['input_shape']) inputs.append(input_value) if parameters['constant_axis']: axis_value = tf.constant(parameters['axis_value'], dtype=tf.int32, shape=[1]) else: axis_value = tf.compat.v1.placeholder(dtype=tf.int32, name='axis', shape=[1]) inputs.append(axis_value) out = tf.expand_dims(input_value, axis=axis_value) return (inputs, [out]) def build_inputs(parameters, sess, inputs, outputs): 'Builds the inputs for expand_dims.' input_values = [] input_values.append(create_tensor_data(parameters['input_type'], parameters['input_shape'], min_value=(- 1), max_value=1)) if (not parameters['constant_axis']): input_values.append(np.array([parameters['axis_value']], dtype=np.int32)) return (input_values, sess.run(outputs, feed_dict=dict(zip(inputs, input_values)))) make_zip_of_tests(options, test_parameters, build_graph, build_inputs)<|docstring|>Make a set of tests to do expand_dims.<|endoftext|>
34a783e209470f237d35fd68500987e9e2114d7d29f779c0535aa51a3e888c87
def build_graph(parameters): 'Build the where op testing graph.' inputs = [] input_value = tf.compat.v1.placeholder(dtype=parameters['input_type'], name='input', shape=parameters['input_shape']) inputs.append(input_value) if parameters['constant_axis']: axis_value = tf.constant(parameters['axis_value'], dtype=tf.int32, shape=[1]) else: axis_value = tf.compat.v1.placeholder(dtype=tf.int32, name='axis', shape=[1]) inputs.append(axis_value) out = tf.expand_dims(input_value, axis=axis_value) return (inputs, [out])
Build the where op testing graph.
tensorflow/lite/testing/op_tests/expand_dims.py
build_graph
K4S4B4/tensorflow
190,993
python
def build_graph(parameters): inputs = [] input_value = tf.compat.v1.placeholder(dtype=parameters['input_type'], name='input', shape=parameters['input_shape']) inputs.append(input_value) if parameters['constant_axis']: axis_value = tf.constant(parameters['axis_value'], dtype=tf.int32, shape=[1]) else: axis_value = tf.compat.v1.placeholder(dtype=tf.int32, name='axis', shape=[1]) inputs.append(axis_value) out = tf.expand_dims(input_value, axis=axis_value) return (inputs, [out])
def build_graph(parameters): inputs = [] input_value = tf.compat.v1.placeholder(dtype=parameters['input_type'], name='input', shape=parameters['input_shape']) inputs.append(input_value) if parameters['constant_axis']: axis_value = tf.constant(parameters['axis_value'], dtype=tf.int32, shape=[1]) else: axis_value = tf.compat.v1.placeholder(dtype=tf.int32, name='axis', shape=[1]) inputs.append(axis_value) out = tf.expand_dims(input_value, axis=axis_value) return (inputs, [out])<|docstring|>Build the where op testing graph.<|endoftext|>