qontract-reconcile 0.10.1rc817__py3-none-any.whl → 0.10.1rc819__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.
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.1
2
2
  Name: qontract-reconcile
3
- Version: 0.10.1rc817
3
+ Version: 0.10.1rc819
4
4
  Summary: Collection of tools to reconcile services with their desired state as defined in the app-interface DB.
5
5
  Home-page: https://github.com/app-sre/qontract-reconcile
6
6
  Author: Red Hat App-SRE Team
@@ -784,7 +784,7 @@ tools/app_interface_metrics_exporter.py,sha256=zkwkxdAUAxjdc-pzx2_oJXG25fo0Fnyd5
784
784
  tools/app_interface_reporter.py,sha256=upA-J-n-HXHKVDINRuMR7vTt-iJvQORKUVi9D3leQto,17738
785
785
  tools/glitchtip_access_reporter.py,sha256=oPBnk_YoDuljU3v0FaChzOwwnk4vap1xEE67QEjzdqs,2948
786
786
  tools/glitchtip_access_revalidation.py,sha256=8kbBJk04mkq28kWoRDDkfCGIF3GRg3pJrFAh1sW0dbk,2821
787
- tools/qontract_cli.py,sha256=tAM6OXJkPnbSvZWOuhWQs9oKpL6Fn7qMEEirzCeuUY8,115006
787
+ tools/qontract_cli.py,sha256=nRzUc8l0Mwsl6Utv0fCBChN8fEKcsrgqbEqoOt7Ke0A,116879
788
788
  tools/sd_app_sre_alert_report.py,sha256=e9vAdyenUz2f5c8-z-5WY0wv-SJ9aePKDH2r4IwB6pc,5063
789
789
  tools/template_validation.py,sha256=-U-lTGeLaci8yWPEblCJeev2DOlY1jM9QOOh-O1zts8,3376
790
790
  tools/cli_commands/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
@@ -811,8 +811,8 @@ tools/test/test_app_interface_metrics_exporter.py,sha256=SX7qL3D1SIRKFo95FoQztvf
811
811
  tools/test/test_qontract_cli.py,sha256=_D61RFGAN5x44CY1tYbouhlGXXABwYfxKSWSQx3Jrss,4941
812
812
  tools/test/test_sd_app_sre_alert_report.py,sha256=v363r9zM7__0kR5K6mvJoGFcM9BvE33fWAayrqkpojA,2116
813
813
  tools/test/test_sre_checkpoints.py,sha256=SKqPPTl9ua0RFdSSofnoQX-JZE6dFLO3LRhfQzqtfh8,2607
814
- qontract_reconcile-0.10.1rc817.dist-info/METADATA,sha256=AMVfb5NoPAJUzzyIZHu9x339AEFTiIxc6j_bTZL0ilU,2314
815
- qontract_reconcile-0.10.1rc817.dist-info/WHEEL,sha256=GJ7t_kWBFywbagK5eo9IoUwLW6oyOeTKmQ-9iHFVNxQ,92
816
- qontract_reconcile-0.10.1rc817.dist-info/entry_points.txt,sha256=GKQqCl2j2X1BJQ69een6rHcR26PmnxnONLNOQB-nRjY,491
817
- qontract_reconcile-0.10.1rc817.dist-info/top_level.txt,sha256=l5ISPoXzt0SdR4jVdkfa7RPSKNc8zAHYWAnR-Dw8Ey8,24
818
- qontract_reconcile-0.10.1rc817.dist-info/RECORD,,
814
+ qontract_reconcile-0.10.1rc819.dist-info/METADATA,sha256=63R1fV9-kcsJYB9eBu4EB-yHEFI8YMUgLZM8n0q02AQ,2314
815
+ qontract_reconcile-0.10.1rc819.dist-info/WHEEL,sha256=GJ7t_kWBFywbagK5eo9IoUwLW6oyOeTKmQ-9iHFVNxQ,92
816
+ qontract_reconcile-0.10.1rc819.dist-info/entry_points.txt,sha256=GKQqCl2j2X1BJQ69een6rHcR26PmnxnONLNOQB-nRjY,491
817
+ qontract_reconcile-0.10.1rc819.dist-info/top_level.txt,sha256=l5ISPoXzt0SdR4jVdkfa7RPSKNc8zAHYWAnR-Dw8Ey8,24
818
+ qontract_reconcile-0.10.1rc819.dist-info/RECORD,,
tools/qontract_cli.py CHANGED
@@ -1579,6 +1579,7 @@ def rds(ctx):
1579
1579
  "engine": rds_attr("engine", overrides, defaults),
1580
1580
  "engine_version": rds_attr("engine_version", overrides, defaults),
1581
1581
  "instance_class": rds_attr("instance_class", overrides, defaults),
1582
+ "storage_type": rds_attr("storage_type", overrides, defaults),
1582
1583
  }
1583
1584
  results.append(item)
1584
1585
 
@@ -1593,6 +1594,7 @@ def rds(ctx):
1593
1594
  {"key": "engine", "sortable": True},
1594
1595
  {"key": "engine_version", "sortable": True},
1595
1596
  {"key": "instance_class", "sortable": True},
1597
+ {"key": "storage_type", "sortable": True},
1596
1598
  ],
1597
1599
  "items": results,
1598
1600
  }
@@ -1617,6 +1619,7 @@ You can view the source of this Markdown to extract the JSON data.
1617
1619
  "engine",
1618
1620
  "engine_version",
1619
1621
  "instance_class",
1622
+ "storage_type",
1620
1623
  ]
1621
1624
  ctx.obj["options"]["sort"] = False
1622
1625
  print_output(ctx.obj["options"], results, columns)
@@ -2611,6 +2614,53 @@ def maintenances(ctx):
2611
2614
  print_output(ctx.obj["options"], data, columns)
2612
2615
 
2613
2616
 
2617
+ @get.command()
2618
+ @click.pass_context
2619
+ def hcp_migration_status(ctx):
2620
+ counts: dict[str, dict[str, int]] = {}
2621
+ saas_files = get_saas_files()
2622
+ for sf in saas_files:
2623
+ if sf.publish_job_logs:
2624
+ # ignore post deployment test saas files
2625
+ continue
2626
+ app = sf.app.parent_app.name if sf.app.parent_app else sf.app.name
2627
+ counts.setdefault(app, {"source": 0, "target": 0})
2628
+ for rt in sf.resource_templates:
2629
+ if rt.provider == "directory" or "dashboard" in rt.name:
2630
+ # ignore grafana dashboards
2631
+ continue
2632
+ for t in rt.targets:
2633
+ if t.namespace.name.startswith("openshift-"):
2634
+ # ignore openshift namespaces
2635
+ continue
2636
+ if t.namespace.path.startswith("/openshift/"):
2637
+ # ignore per-cluster namespaces
2638
+ continue
2639
+ if hcp_migration := t.namespace.cluster.labels.get("hcp_migration"):
2640
+ counts[app][hcp_migration] += 1
2641
+
2642
+ data = []
2643
+ for a, c in counts.items():
2644
+ source = c["source"]
2645
+ target = c["target"]
2646
+ item = {}
2647
+ item["app"] = a
2648
+ item["classic"] = source or "0"
2649
+ item["hcp"] = target or "0"
2650
+ total = source + target
2651
+ if total == 0:
2652
+ continue
2653
+ progress = round(target / total * 100, 2) or "0"
2654
+ item["progress"] = progress
2655
+ data.append(item)
2656
+
2657
+ summary_completed = len([d for d in data if d["progress"] == 100])
2658
+ print(f"SUMMARY: {summary_completed} / {len(data)} COMPLETED")
2659
+
2660
+ columns = ["app", "classic", "hcp", "progress"]
2661
+ print_output(ctx.obj["options"], data, columns)
2662
+
2663
+
2614
2664
  @root.group(name="set")
2615
2665
  @output
2616
2666
  @click.pass_context