Get default ports for all protocols
(self)
| 57 | return self.validators[protocol](**kwargs) |
| 58 | |
| 59 | def get_all_default_ports(self) -> Dict[str, List[int]]: |
| 60 | """Get default ports for all protocols""" |
| 61 | ports = {} |
| 62 | for protocol, validator_class in self.validators.items(): |
| 63 | try: |
| 64 | temp_validator = validator_class() |
| 65 | if hasattr(temp_validator, 'get_default_ports'): |
| 66 | ports[protocol] = temp_validator.get_default_ports() |
| 67 | else: |
| 68 | ports[protocol] = [] |
| 69 | except Exception as e: |
| 70 | logger.warning(f"Failed to get default ports for {protocol}: {e}") |
| 71 | ports[protocol] = [] |
| 72 | |
| 73 | return ports |
| 74 | |
| 75 | def get_protocol_info(self) -> Dict[str, Dict[str, Any]]: |
| 76 | """Get detailed information about all protocols""" |
nothing calls this directly
no test coverage detected