def default_request_object(self):
        """ default request when only a owner filter is provided """
        request_object = RequestObject()
        request_object.set_description('filter by owner')
        request_object.set_http_method(self._resource_properties['bulk']['http_method'])
        request_object.set_owner_allowed(self._resource_properties['bulk']['owner_allowed'])
        request_object.set_request_uri(self._resource_properties['bulk']['uri'])
        request_object.set_resource_pagination(self._resource_properties['bulk']['pagination'])
        request_object.set_resource_type(self._resource_type)
        
        if self.tc._bulk_on_demand:
            request_object.add_payload('runNow', True)

        return request_object
    def default_request_object(self):
        """ default request when no filters are provided """
        resource_properties = ApiProperties.api_properties[self._resource_type.name]['properties']
        # create default request object for non-filtered requests
        request_object = RequestObject()
        request_object.set_http_method(resource_properties['bulk']['http_method'])
        request_object.set_owner_allowed(resource_properties['bulk']['owner_allowed'])
        request_object.set_request_uri(resource_properties['bulk']['uri'])
        request_object.set_resource_pagination(resource_properties['bulk']['pagination'])
        request_object.set_resource_type(self._resource_type)
        if self._on_demand:
            request_object.add_payload('runNow', True)

        return request_object
예제 #3
0
    def default_request_object(self):
        """ default request when no filters are provided """
        resource_properties = ApiProperties.api_properties[
            self._resource_type.name]['properties']
        # create default request object for non-filtered requests
        request_object = RequestObject()
        request_object.set_http_method(
            resource_properties['bulk']['http_method'])
        request_object.set_owner_allowed(
            resource_properties['bulk']['owner_allowed'])
        request_object.set_request_uri(resource_properties['bulk']['uri'])
        request_object.set_resource_pagination(
            resource_properties['bulk']['pagination'])
        request_object.set_resource_type(self._resource_type)
        if self._on_demand:
            request_object.add_payload('runNow', True)

        return request_object
예제 #4
0
    def default_request_object(self):
        """ default request when only a owner filter is provided """
        request_object = RequestObject()
        request_object.set_description('filter by owner')
        request_object.set_http_method(
            self._resource_properties['bulk']['http_method'])
        request_object.set_owner_allowed(
            self._resource_properties['bulk']['owner_allowed'])
        request_object.set_request_uri(
            self._resource_properties['bulk']['uri'])
        request_object.set_resource_pagination(
            self._resource_properties['bulk']['pagination'])
        request_object.set_resource_type(self._resource_type)
        request_object.set_stream(True)

        if self.tc._bulk_on_demand:
            request_object.add_payload('runNow', True)

        return request_object