Gets the ``Resource`` representing the provider.

        return: (osid.resource.Resource) - the provider
        raise:  OperationFailed - unable to complete request
        *compliance: mandatory -- This method must be implemented.*
551438
def get_provider(self):
        
        if 'providerId' not in self._my_map or not self._my_map['providerId']:
            raise errors.IllegalState('this sourceable object has no provider set')
        mgr = self._get_provider_manager('RESOURCE')
        lookup_session = mgr.get_resource_lookup_session()  # What about the Proxy?
        lookup_session.use_federated_bin_view()
        return lookup_session.get_resource(self.get_provider_id())
1331560
def get(self, resource, operation_timeout=None, max_envelope_size=None, locale=None):
        
        if isinstance(resource, str):
            resource = ResourceLocator(resource)

        headers = self._build_headers(resource, Session.GetAction, operation_timeout, max_envelope_size, locale)
        self.service.invoke.set_options(tsoapheaders=headers)
        return self.service.invoke
1037559
def method_get(self, uri, **kwargs):
        
        for i in six.moves.range(3):
            resp, body = super(CloudDNSClient, self).method_get(uri, **kwargs)
            if body:
                return resp, body
        raise exc.ServiceResponseFailure("The Cloud DNS service failed to "
                "respond to the request.")
119277
def get_asset(self):
        
        # Implemented from template for osid.learning.Activity.get_objective
        if not bool(self._my_map['assetId']):
            raise errors.IllegalState('asset empty')
        mgr = self._get_provider_manager('REPOSITORY')
        if not mgr.supports_asset_lookup():
            raise errors.OperationFailed('Repository does not support Asset lookup')
        lookup_session = mgr.get_asset_lookup_session(proxy=getattr(self, "_proxy", None))
        lookup_session.use_federated_repository_view()
        return lookup_session.get_asset(self.get_asset_id())
506615
def get_status_from_resource(self, response):
        
        self._raise_if_bad_http_status_and_method(response)
        if self._is_empty(response):
            raise BadResponse('The response from long running operation '
                              'does not contain a body.')

        status = self._get_provisioning_state(response)
        self.status = status or 'Succeeded'

        self.resource = self._deserialize(response)
632707
def get_resource(resource_name):
    

    resource_path = None
    if hasattr(sys, "frozen"):
        resource_path = os.path.normpath(os.path.join(os.path.dirname(sys.executable), resource_name))
    elif not hasattr(sys, "frozen") and pkg_resources.resource_exists("gns3server", resource_name):
        resource_path = pkg_resources.resource_filename("gns3server", resource_name)
        resource_path = os.path.normpath(resource_path)
    return resource_path
1140754
def get_resource(url, headers):
    
    headers["Accept"] = "application/json"
    response = Catalyst_DAO().getURL(url, headers)

    if response.status != 200:
        raise DataFailureException(url, response.status, response.data)

    try:
        return json.loads(response.data)
    except ValueError as ex:
        raise DataFailureException(url, response.status, response.data)
465805
def _get_erred_resources_module(self):
        
        result_module = modules.LinkList(title=_('Resources in erred state'))
        erred_state = structure_models.NewResource.States.ERRED
        children = []

        resource_models = SupportedServices.get_resource_models()
        resources_in_erred_state_overall = 0
        for resource_type, resource_model in resource_models.items():
            queryset = resource_model.objects.filter(service_project_link__service__settings__shared=True)
            erred_amount = queryset.filter(state=erred_state).count()
            if erred_amount:
                resources_in_erred_state_overall = resources_in_erred_state_overall + erred_amount
                link = self._get_erred_resource_link(resource_model, erred_amount, erred_state)
                children.append(link)

        if resources_in_erred_state_overall:
            result_module.title = '%s (%s)' % (result_module.title, resources_in_erred_state_overall)
            result_module.children = children
        else:
            result_module.pre_content = _('Nothing found.')

        return result_module
1004990
def describe_resource(self, resource_path):
        
        res = self.execute_operation(method="GET", ops_path=resource_path)
        return res
109933
def get(resource_uri)
      result = connection.get("resource") do |request|
        request.query[:uri] = resource_uri.to_s
        request.query.delete(:graph)
      end
      MaybeGraphResult.new(result).value
    end
1250095
def get(self, resource, params=None, **kwargs):
        """"""
        return self.request('GET', resource, params=params, **kwargs)
1151556
def get_resource_url(self):
        

        name = self.__class__.resource_name
        url = self.__class__.rest_base_url()

        if self.id is not None:
            return "%s/%s/%s" % (url, name, self.id)

        return "%s/%s" % (url, name)
607455
def get_provider_uri(self, provider_display_name):
        
        providers = self._provider_client.get_by('displayName', provider_display_name)
        return providers[0]['uri'] if providers else None
182923
private Builder getResourceRequest(final RequestTypeEnum requestType, final RestOperationTypeEnum restOperation) {
        return getRequest(requestType, restOperation, getResourceType().getSimpleName());
    }
226006
def get_resource(url):
    
    response = DAO.getURL(url, {'Accept': 'application/json',
                                'Connection': 'keep-alive'})
    if response.status != 200:
        raise DataFailureException(url, response.status, response.data)
    return json.loads(response.data)
964016
def retrieve_resource(collection, key):
    
    session = _get_session()
    cls = endpoint_class(collection)
    resource = session.query(cls).get(key)
    if resource is None:
        raise InvalidAPIUsage(404)
    return resource
981664
def get(self, resource, params=None, headers=None):
        
        return self.do(resource, 'GET', params=params, headers=headers)