Locally, mypy was complaining
```
ceph/deployment/service_spec.py: note: In member "validate" of class "NvmeofServiceSpec":
ceph/deployment/service_spec.py:1497: error: Unsupported operand types for > ("float" and "None") [operator]
ceph/deployment/service_spec.py:1497: note: Left operand is of type "Optional[float]"
ceph/deployment/service_spec.py:1500: error: Unsupported operand types for > ("int" and "None") [operator]
ceph/deployment/service_spec.py:1500: note: Left operand is of type "Optional[int]"
```
I'm unsure why those errors didn't show up in the CI,
but they make sense to me, so why not fix them.
Signed-off-by: Adam King <adking@redhat.com>
raise SpecValidationError(
'Invalid SPDK log level. Valid values are: DEBUG, INFO, WARNING, ERROR, NOTICE')
- if self.spdk_ping_interval_in_seconds < 1.0:
+ if (
+ self.spdk_ping_interval_in_seconds
+ and self.spdk_ping_interval_in_seconds < 1.0
+ ):
raise SpecValidationError("SPDK ping interval should be at least 1 second")
- if self.allowed_consecutive_spdk_ping_failures < 1:
+ if (
+ self.allowed_consecutive_spdk_ping_failures
+ and self.allowed_consecutive_spdk_ping_failures < 1
+ ):
raise SpecValidationError("Allowed consecutive SPDK ping failures should be at least 1")