topology: generalize association restrictions

Previously association definitions were limited to be created on configs
with `Type` Board and Chassis.

Change the restriction to be defined per association definition and not
hardcoded.

Remove this restriction for `Type` PowerSupply

Tested: next patch

Change-Id: I304a433afc7311ce5b7c350033566969e8d73793
Signed-off-by: Alexander Hansen <alexander.hansen@9elements.com>
diff --git a/src/entity_manager/topology.hpp b/src/entity_manager/topology.hpp
index a55b995..164b2bf 100644
--- a/src/entity_manager/topology.hpp
+++ b/src/entity_manager/topology.hpp
@@ -16,9 +16,19 @@
     std::string name;
     std::string reverse;
 
-    AssocName(const std::string& name, const std::string& reverse);
+    AssocName(const std::string& name, const std::string& reverse,
+              const std::set<std::string>& allowedOnBoardTypes,
+              const std::set<std::string>& allowedOnBoardTypesReverse);
     AssocName() = delete;
 
+    // The type (e.g. Chassis, Board, Valve, ...) on which the association is
+    // allowed
+    std::set<std::string> allowedOnBoardTypes;
+
+    // The type (e.g. Chassis, Board, Valve, ...) on which the reverse
+    // association is allowed
+    std::set<std::string> allowedOnBoardTypesReverse;
+
     AssocName getReverse() const;
 
     bool operator==(const AssocName& other) const = default;