From 82dc3d7967b9023bd8221d38a19aa2b4e87be070 Mon Sep 17 00:00:00 2001 From: Justin Kim Date: Tue, 5 Nov 2024 00:44:44 -0800 Subject: [PATCH] SlotPath topology config validation. Summary: X-link: https://github.com/facebookincubator/zstrong/pull/1036 X-link: https://github.com/facebook/fboss/pull/285 __Why__ 1. This is pre-req for other services to validate "PM generated data". e.g `platform_manager::ConfigValidator().isValidSlotPath(...)` 2. Beefing up SlotPath validation. See T205471819 more details. __What__ 1. Dropped ConfigValidator call in `Utils::parseDevicePath` because we can assume that config paths are valid. If ill-input is provided, unexpected behaviour. 2. Added additional regex for group capturing because it doesn't seem to work with a single regex for some reason... 3. Added topological validation on slot path. __Next__ 1. DeviceName validation. basically does device definition exist in the slot path? 2. Suppose VersionedPmUnit... Reviewed By: somasun Differential Revision: D64798493 fbshipit-source-id: 9ca1936bf81250bda1fc6b9d800221055b6b2f48 --- build/fbcode_builder/manifests/fboss | 1 + 1 file changed, 1 insertion(+) diff --git a/build/fbcode_builder/manifests/fboss b/build/fbcode_builder/manifests/fboss index 25bae49d7..ec199f831 100644 --- a/build/fbcode_builder/manifests/fboss +++ b/build/fbcode_builder/manifests/fboss @@ -40,6 +40,7 @@ exprtk nlohmann-json libgpiod systemd +range-v3 [shipit.pathmap] fbcode/fboss/github = .