How to use the azure-devops.azure.devops.v5_0.location.location_client.LocationClient function in azure-devops

To help you get started, we’ve selected a few azure-devops examples, based on popular ways it is used in public projects.

Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.

github microsoft / azure-devops-python-api / azure-devops / azure / devops / connection.py View on Github external
def _get_resource_areas(self, force=False):
        if self._resource_areas is None or force:
            location_client = LocationClient(self.base_url, self._creds)
            if self.use_fiddler:
                self._configure_client_for_fiddler(location_client)
            if not force and RESOURCE_FILE_CACHE[location_client.normalized_url]:
                try:
                    logger.debug('File cache hit for resources on: %s', location_client.normalized_url)
                    self._resource_areas = location_client._base_deserialize.deserialize_data(RESOURCE_FILE_CACHE[location_client.normalized_url],
                                                                                              '[ResourceAreaInfo]')
                    return self._resource_areas
                except Exception as ex:
                    logger.debug(ex, exc_info=True)
            elif not force:
                logger.debug('File cache miss for resources on: %s', location_client.normalized_url)
            self._resource_areas = location_client.get_resource_areas()
            if self._resource_areas is None:
                # For OnPrem environments we get an empty collection wrapper.
                self._resource_areas = []
github microsoft / azure-devops-python-api / azure-devops / azure / devops / connection.py View on Github external
def _get_deployment_resource_area_from_sps(self, resource_id):
        resource_id = resource_id.lower()
        if resource_id in _deployment_level_resource_areas:
            return _deployment_level_resource_areas[resource_id]
        location_client = LocationClient(sps_url, self._creds)
        if self.use_fiddler:
            self._configure_client_for_fiddler(location_client)
        resource_area = location_client.get_resource_area(area_id=resource_id)
        _deployment_level_resource_areas[resource_id] = resource_area
        return resource_area

azure-devops

Python wrapper around the Azure DevOps 7.x APIs

MIT
Latest version published 12 months ago

Package Health Score

85 / 100
Full package analysis