Enable us to chage defaults in the future
Signed-off-by: Sebastian Wagner <sewagner@redhat.com>
spec:
credentials:
snmp_community: public
-port: 9464
snmp_destination: 192.168.1.42:162
snmp_version: V4
"""), 'snmp_version unsupported. Must be one of V2c, V3'),
def _apply_snmp_gateway(self,
snmp_version: SNMPGatewaySpec.SNMPVersion,
destination: str,
- port: int = 9464,
+ port: Optional[int] = None,
engine_id: Optional[str] = None,
auth_protocol: Optional[SNMPGatewaySpec.SNMPAuthType] = None,
privacy_protocol: Optional[SNMPGatewaySpec.SNMPPrivacyType] = None,
placement: Optional[PlacementSpec] = None,
unmanaged: bool = False,
preview_only: bool = False,
- port: int = 9464,
+ port: Optional[int] = None,
):
assert service_type == 'snmp-gateway'
@property
def ports(self) -> List[int]:
- return [self.port]
+ return [self.port or 9464]
def get_port_start(self) -> List[int]:
return self.ports