- chain_classes = [ChainType.EXT, ChainType.PVP, ChainType.PVVP]
-
- chain_stats_classes = {
- ChainType.EXT: EXTStatsManager,
- ChainType.PVP: PVPStatsManager,
- ChainType.PVVP: PVVPStatsManager,
- }
-
- stage_clients_classes = {
- ChainType.EXT: EXTStageClient,
- ChainType.PVP: PVPStageClient,
- ChainType.PVVP: PVVPStageClient,
- }
-
- def get_stats_class(self, service_chain):
- CLASS = self.chain_stats_classes.get(service_chain, None)
- if CLASS is None:
- raise Exception("Service chain '{}' not supported.".format(service_chain))
-
- return CLASS
-
- def get_stage_class(self, service_chain):
- CLASS = self.stage_clients_classes.get(service_chain, None)
- if CLASS is None:
- raise Exception("VM Client for chain '{}' not supported.".format(service_chain))
-
- return CLASS