From 9d11d2a043bd5c557039b628d33b73551617c724 Mon Sep 17 00:00:00 2001 From: tegwick Date: Fri, 14 Aug 2026 15:53:30 +0200 Subject: [PATCH] feat: resource-control view of reef-storage Project the planned Scaleway backup bucket onto the new storage reef. --- data/reefs/reef-storage.json | 19 +++++++++++++++++++ tests/test_portfolio.py | 10 ++++++++++ 2 files changed, 29 insertions(+) create mode 100644 data/reefs/reef-storage.json diff --git a/data/reefs/reef-storage.json b/data/reefs/reef-storage.json new file mode 100644 index 0000000..745d5f8 --- /dev/null +++ b/data/reefs/reef-storage.json @@ -0,0 +1,19 @@ +{ + "schema_version": "0.1", + "reef_id": "reef-storage", + "repo": "reef-storage", + "declaration_ref": "reef:storage/declarations/reef.yaml", + "procuring_entity_id": "entity:railiance", + "financial_entity_id": "entity:railiance", + "role": "storage_substrate", + "resources": [ + {"resource_id": "resource:platform:audit-storage", "role": "object_store"} + ], + "consumers_potential": ["rapp-postgres"], + "consumers_actual": [], + "notes": [ + "Provider-delegated S3 (Scaleway). No rail.", + "Attribute values: reef:storage/substrate/object-stores/platform-audit-storage.yaml", + "Independent of reef-railiance." + ] +} diff --git a/tests/test_portfolio.py b/tests/test_portfolio.py index 2af3c4f..475d951 100644 --- a/tests/test_portfolio.py +++ b/tests/test_portfolio.py @@ -92,6 +92,16 @@ class ReefViewTest(unittest.TestCase): self.assertNotIn("resource:platform:audit-storage", {row["resource_id"] for row in view["resources"]}) self.assertTrue(any("reef-storage" in note for note in view["notes"])) + def test_reef_storage_view_is_delegated_object_store(self): + view = json.loads((ROOT / "data/reefs/reef-storage.json").read_text()) + self.assertEqual("storage_substrate", view["role"]) + self.assertEqual( + ["resource:platform:audit-storage"], + [row["resource_id"] for row in view["resources"]], + ) + self.assertEqual(["rapp-postgres"], view["consumers_potential"]) + self.assertEqual([], view["consumers_actual"]) + if __name__ == "__main__": unittest.main()