CKAN extension that will give you the ability to manage right-time resources provided by a FIWARE Context Broker. This extension also provides a basic view to provide a data preview to user browsing context broker resources, altough it can be combined with other plugins (e.g. the ckanext-wirecloud_view
one) to provide a more advanced visualization of the data provided using CKAN.
Note: This extension is being tested using CKAN 2.5, 2.6, 2.7 and 2.8. These are therefore considered as the supported versions
resource_proxy
. This extension is required to be able to make requests to the Context Broker and thus is required for the raw view (ngsi-view
) provided by this plugin.To install ckanext-right_time_context
:
Activate your CKAN virtual environment, for example:
. /usr/lib/ckan/default/bin/activate
Install the ckanext-right_time_context
python package into your virtual environment:
pip install ckanext-right_time_context
Add right_time_context
to the ckan.plugins
setting in your CKAN
config file (e.g. /etc/ckan/default/production.ini
). If you want to make
use of the raw view provided by this plugin, you will have to ensure the
resource_proxy
is also enabled (comes directly with CKAN, but it is not
enabled by default)
Restart CKAN. For example if you've deployed CKAN with Apache:
sudo service apache2 graceful
Please take a look into the
ckanext-oauth2
installation guide if you are interested on linking secured context brokers.
To install ckanext-right_time_context
for development, activate your CKAN virtualenv and
do:
git clone https://github.com/conwetlab/ckanext-right_time_context.git
cd ckanext-right_time_context
python setup.py develop
fiware-ngsi
resourceThe way to create a NGSI resource is fairly simple:
Firstly you have to access to the form for creating a new resource.
Use fiware-ngsi
to fill the Format
field, this will make the form change
adding some extra fields required when using the fiware-ngsi
format.
Fill the URL
field with a Context Broker query. It is recommended to use a
NGSIv2 query, but it is possible to use also a v1 convenience query context
url. Examples are:
http://orion.lab.fiware.org:1026/v2/entities?type=AirQualityObserved
http://orion.lab.fiware.org:1026/v1/contextEntities/MeteoLo
Finally, check if you have to use some of the extra options:
Auth Type
to the appropiate value if the Context Broker server
requires authentication.FIWARE-Service
field if the data is not provided by the default
tenant.FIWARE-ServicePath
field if the data should be
filtered using a service path.Once you provide all the requested information, click on the Add button.