Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
def get_measurement_for_host(self, granularity: AtlasGranularities = AtlasGranularities.HOUR,
period: AtlasPeriods = AtlasPeriods.WEEKS_1,
measurement: AtlasMeasurementTypes = AtlasMeasurementTypes.Cache.dirty,
pageNum: int = Settings.pageNum,
itemsPerPage: int = Settings.itemsPerPage,
iterable: bool = True) -> Union[dict, Iterable[AtlasMeasurement]]:
"""Get measurement(s) for a host
Returns measurements for the Host object.
url: https://docs.atlas.mongodb.com/reference/api/process-measurements/
Accepts either a single measurement, but will retrieve more than one measurement
if the measurement (using the AtlasMeasurementTypes class)
/api/atlas/v1.0/groups/{GROUP-ID}/processes/{HOST}:{PORT}/measurements
def _get_measurement_for_host(self, host_obj: Host, granularity: AtlasGranularities = AtlasGranularities.HOUR,
period: AtlasPeriods = AtlasPeriods.WEEKS_1,
measurement: AtlasMeasurementTypes = AtlasMeasurementTypes.Cache.dirty,
pageNum: int = Settings.pageNum,
itemsPerPage: int = Settings.itemsPerPage,
iterable: bool = True) -> Union[dict, Iterable[AtlasMeasurement]]:
"""Get measurement(s) for a host
Internal use only, should come from the host obj itself.
Returns measurements for the passed Host object.
url: https://docs.atlas.mongodb.com/reference/api/process-measurements/
Accepts either a single measurement, but will retrieve more than one measurement
if the measurement (using the AtlasMeasurementTypes class)