Skip to content
requests.py 75.3 KiB
Newer Older
import re


class Requests:
lopezaguilar's avatar
lopezaguilar committed
    def __init__(self, variables, apiutils_variables, config_file, template_params_value, test_name, name):
        self.op = {
            'Create Entity Selecting Content Type': {
                'positions': [0, 2],
                'params': ['filename', 'content_type']
            },
            'Create Subscription': {
                'positions': [1, 2],
                'params': ['filename', 'content_type']
            },
            'Create Or Update Temporal Representation Of Entity Selecting Content Type':  {
lopezaguilar's avatar
lopezaguilar committed
                'positions': [],
                'params': ['temporal_entity_representation_id', 'filename', 'content_type', 'accept']
lopezaguilar's avatar
lopezaguilar committed
            'Create Entity From File': {
                'positions': [0],
                'params': ['filename']
            },
            'Batch Create Entities': {
                'positions': [1],
                'params': ['content_type']
            },
            'Create Context Source Registration With Return': {
                'positions': [0],
                'params': ['filename']
            },
            'Query Entity': {
lopezaguilar's avatar
lopezaguilar committed
                'positions': [],
                'params': ['id', 'accept', 'attrs', 'context', 'geoproperty', 'options']
lopezaguilar's avatar
lopezaguilar committed
            },
            'Retrieve Subscription': {
lopezaguilar's avatar
lopezaguilar committed
                'positions': [],
                'params': ['id', 'accept', 'context', 'content_type']
            },
            'Query Context Source Registrations With Return': {
                'positions': [0, 1],
                'params': ["type", "accept"]
            },
            'Query Temporal Representation Of Entities With Return': {
                'positions': [],
                'params': []
            },
            'Partial Update Entity Attributes': {
lopezaguilar's avatar
lopezaguilar committed
                'positions': [],
                'params': ['entityId', 'attributeId', 'fragment_filename', 'content_type', 'accept', 'context']
            },
            'Update Subscription': {
                'positions': [1, 2, 3],
                'params': ['filename', 'content', 'context']
            },
            'Query Context Source Registration Subscriptions': {
lopezaguilar's avatar
lopezaguilar committed
                'positions': [],
                'params': ['context', 'limit', 'page', 'accept']
            },
            'Query Temporal Representation Of Entities': {
                'positions': [],
                'params': ['context', 'entity_types', 'entity_ids', 'entity_id_pattern',
                           'ngsild_query', 'csf', 'georel', 'geometry',
                           'coordinates', 'geoproperty', 'timerel', 'timeAt',
lopezaguilar's avatar
lopezaguilar committed
            },
            'Query Temporal Representation Of Entities Via Post': {
                'positions': [],
                'params': ['query_file_name', 'content_type', 'context']
            },
            'Retrieve Attribute': {
                'positions': [0],
                'params': ['attribute_name']
            },
            'Retrieve Entity Type': {
                'positions': [0, 1],
                'params': ['type', 'context']
lopezaguilar's avatar
lopezaguilar committed
            },
            'Retrieve Entity by Id': {
                'positions': [],
                'params': ['id', 'accept', 'context']
            },
lopezaguilar's avatar
lopezaguilar committed
            'Query Entities': {
lopezaguilar's avatar
lopezaguilar committed
                'positions': [],
                'params': ['entity_ids', 'entity_types', 'accept',
                           'attrs', 'context', 'geoproperty',
                           'options', 'limit', 'entity_id_pattern',
                           'georel', 'coordinates', 'geometry']
            },
            'Query Entities Via POST': {
                'positions': [],
lopezaguilar's avatar
lopezaguilar committed
                'params': ['entity_ids', 'entity_type', 'content_type', 'accept',
                           'context', 'attrs', 'entity_id_pattern', 'geometry_property']
            },
            'Retrieve Temporal Representation Of Entity': {
lopezaguilar's avatar
lopezaguilar committed
                'positions': [],
                'params': ['temporal_entity_representation_id', 'attrs', 'options',
                           'context', 'timerel', 'timeAt',
                           'endTimeAt', 'lastN', 'accept']
                'positions': [0],
                'params': ['id']
lopezaguilar's avatar
lopezaguilar committed
            },
            'Append Entity Attributes': {
                'positions': [0, 1, 2],
                'params': ['id', 'fragment_filename', 'content_type']
            },
            'Update Entity Attributes': {
                'positions': [0, 1, 2],
                'params': ['id', 'fragment_filename', 'content_type']
lopezaguilar's avatar
lopezaguilar committed
            },
            'Delete Temporal Representation Of Entity With Returning Response': {
                'positions': [0],
                'params': ['id']
            },
            'Append Attribute To Temporal Entity': {
                'positions': [0, 1, 2],
                'params': ['id', 'fragment_filename', 'content_type']
lopezaguilar's avatar
lopezaguilar committed
            },
            'Delete Subscription': {
                'positions': [0],
                'params': ['id']
            },
            'Query Subscriptions': {
                'positions': [],
                'params': ['context', 'limit', 'offset', 'accept']
lopezaguilar's avatar
lopezaguilar committed
            },
            'Retrieve Context Source Registration Subscription': {
                'positions': [],
                'params': ['subscription_id', 'context', 'accept']
            },
            'Retrieve Context Source Registration': {
                'positions': [],
                'params': ['context_source_registration_id', 'context', 'accept']
            },
            'Delete Context Source Registration With Return': {
                'positions': [0],
                'params': ['id']
            },
            'Query Context Source Registrations': {
                'positions': [],
                'params': ['context', 'id', 'type', 'idPattern', 'attrs',
lopezaguilar's avatar
lopezaguilar committed
                           'q', 'csf', 'georel', 'geometry',
                           'coordinates', 'geoproperty', 'timeproperty', 'timerel',
lopezaguilar's avatar
lopezaguilar committed
            },
            'Update Context Source Registration With Return': {
                'positions': [0, 1, 2],
                'params': ['id', 'filename', 'content']
            },
            'Retrieve context source registration subscription': {
                'positions': [0],
                'params': ['id']
            },
            'Create Context Source Registration Subscription': {
                'positions': [0],
                'params': ['filename']
            },
lopezaguilar's avatar
lopezaguilar committed
            'Create Context Source Registration': {
                'positions': [0],
                'params': ['context_source_registration_payload']
            },
lopezaguilar's avatar
lopezaguilar committed
            'Delete Context Source Registration Subscription': {
                'positions': [0],
                'params': ['id']
            },
            'Update Context Source Registration Subscription': {
                'positions': [0, 1],
                'params': ['subscription_id', 'subscription_update_fragment']
            },
lopezaguilar's avatar
lopezaguilar committed
            'Update Context Source Registration': {
                'positions': [0, 1],
                'params': ['context_source_registration_id', 'update_fragment']
            },
            'Update Context Source Registration From File': {
                'positions': [0, 1],
                'params': ['context_source_registration_id', 'filename']
            },
lopezaguilar's avatar
lopezaguilar committed
            'Update Context Source Registration Subscription From File': {
                'positions': [0, 1],
                'params': ['subscription_id', 'subscription_update_fragment']
            },
            'Retrieve Attributes': {
                'positions': [],
                'params': ['context', 'details', 'accept']
            },
            'Retrieve Entity Types': {
                'positions': [],
                'params': ['context', 'details', 'accept']
lopezaguilar's avatar
lopezaguilar committed
            },
            'Batch Request Entities From File': {
                'positions': [0, 1],
                'params': ['operation', 'filename']
            },
            'Batch Delete Entities': {
                'positions': [],
lopezaguilar's avatar
lopezaguilar committed
                'params': ['entities_ids_to_be_deleted', 'teardown']
Loading full blame...