MCPcopy Create free account
hub / github.com/ceph/ceph / verify_positive_int

Function verify_positive_int

src/python-common/ceph/deployment/utils.py:147–152  ·  view source on GitHub ↗
(field: Any, field_name: str)

Source from the content-addressed store, hash-verified

145
146
147def verify_positive_int(field: Any, field_name: str) -> None:
148 verify_non_negative_int(field, field_name)
149 if field is not None:
150 verify_int(field, field_name)
151 if field <= 0:
152 raise SpecValidationError(f"{field_name} must be greater than zero")
153
154
155def verify_non_negative_number(field: Any, field_name: str) -> None:

Callers 2

validateMethod · 0.90

Calls 3

SpecValidationErrorClass · 0.90
verify_non_negative_intFunction · 0.85
verify_intFunction · 0.85

Tested by

no test coverage detected