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

Function verify_int

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

Source from the content-addressed store, hash-verified

130
131
132def verify_int(field: Any, field_name: str) -> None:
133 verify_numeric(field, field_name)
134 if field is not None:
135 if not isinstance(field, int) or isinstance(field, bool):
136 raise SpecValidationError(f"{field_name} must be an integer")
137
138
139def verify_non_negative_int(field: Any, field_name: str) -> None:

Callers 3

validateMethod · 0.90
verify_non_negative_intFunction · 0.85
verify_positive_intFunction · 0.85

Calls 2

SpecValidationErrorClass · 0.90
verify_numericFunction · 0.85

Tested by

no test coverage detected