qontract-reconcile 0.10.1rc537__py3-none-any.whl → 0.10.1rc539__py3-none-any.whl

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
tools/qontract_cli.py CHANGED
@@ -2446,8 +2446,8 @@ def early_exit_cache(ctx):
2446
2446
  )
2447
2447
  @click.option(
2448
2448
  "-c",
2449
- "--cache-desired-state",
2450
- help="Cache desired state. It should be a JSON string.",
2449
+ "--cache-source",
2450
+ help="Cache source. It should be a JSON string.",
2451
2451
  required=True,
2452
2452
  )
2453
2453
  @click.pass_context
@@ -2456,14 +2456,14 @@ def early_exit_cache_head(
2456
2456
  integration,
2457
2457
  integration_version,
2458
2458
  dry_run,
2459
- cache_desired_state,
2459
+ cache_source,
2460
2460
  ):
2461
2461
  with EarlyExitCache.build() as cache:
2462
2462
  cache_key = CacheKey(
2463
2463
  integration=integration,
2464
2464
  integration_version=integration_version,
2465
2465
  dry_run=dry_run,
2466
- cache_desired_state=json.loads(cache_desired_state),
2466
+ cache_source=json.loads(cache_source),
2467
2467
  )
2468
2468
  status = cache.head(cache_key)
2469
2469
  print(status)
@@ -2489,8 +2489,8 @@ def early_exit_cache_head(
2489
2489
  )
2490
2490
  @click.option(
2491
2491
  "-c",
2492
- "--cache-desired-state",
2493
- help="Cache desired state. It should be a JSON string.",
2492
+ "--cache-source",
2493
+ help="Cache source. It should be a JSON string.",
2494
2494
  required=True,
2495
2495
  )
2496
2496
  @click.pass_context
@@ -2499,14 +2499,14 @@ def early_exit_cache_get(
2499
2499
  integration,
2500
2500
  integration_version,
2501
2501
  dry_run,
2502
- cache_desired_state,
2502
+ cache_source,
2503
2503
  ):
2504
2504
  with EarlyExitCache.build() as cache:
2505
2505
  cache_key = CacheKey(
2506
2506
  integration=integration,
2507
2507
  integration_version=integration_version,
2508
2508
  dry_run=dry_run,
2509
- cache_desired_state=json.loads(cache_desired_state),
2509
+ cache_source=json.loads(cache_source),
2510
2510
  )
2511
2511
  value = cache.get(cache_key)
2512
2512
  print(value)
@@ -2532,14 +2532,14 @@ def early_exit_cache_get(
2532
2532
  )
2533
2533
  @click.option(
2534
2534
  "-c",
2535
- "--cache-desired-state",
2536
- help="Cache desired state. It should be a JSON string.",
2535
+ "--cache-source",
2536
+ help="Cache source. It should be a JSON string.",
2537
2537
  required=True,
2538
2538
  )
2539
2539
  @click.option(
2540
- "-d",
2541
- "--desired-state",
2542
- help="Desired state. It should be a JSON string.",
2540
+ "-p",
2541
+ "--payload",
2542
+ help="Payload in Cache value. It should be a JSON string.",
2543
2543
  required=True,
2544
2544
  )
2545
2545
  @click.option(
@@ -2568,8 +2568,8 @@ def early_exit_cache_set(
2568
2568
  integration,
2569
2569
  integration_version,
2570
2570
  dry_run,
2571
- cache_desired_state,
2572
- desired_state,
2571
+ cache_source,
2572
+ payload,
2573
2573
  log_output,
2574
2574
  applied_count,
2575
2575
  ttl,
@@ -2579,10 +2579,10 @@ def early_exit_cache_set(
2579
2579
  integration=integration,
2580
2580
  integration_version=integration_version,
2581
2581
  dry_run=dry_run,
2582
- cache_desired_state=json.loads(cache_desired_state),
2582
+ cache_source=json.loads(cache_source),
2583
2583
  )
2584
2584
  cache_value = CacheValue(
2585
- desired_state=json.loads(desired_state),
2585
+ payload=json.loads(payload),
2586
2586
  log_output=log_output,
2587
2587
  applied_count=applied_count,
2588
2588
  )
@@ -84,7 +84,7 @@ def test_early_exit_cache_set(env_vars, mock_queries, mock_early_exit_cache):
84
84
 
85
85
  result = runner.invoke(
86
86
  qontract_cli.early_exit_cache,
87
- "set -i a -v b --no-dry-run -c {} -d {} -l log -t 30",
87
+ "set -i a -v b --no-dry-run -c {} -p {} -l log -t 30",
88
88
  )
89
89
  assert result.exit_code == 0
90
90
  mock_early_exit_cache.build.return_value.__enter__.return_value.set.assert_called()