Skip to content

Commit

Permalink
FIX removal of all NGSIv1 references
Browse files Browse the repository at this point in the history
  • Loading branch information
fgalan committed Dec 5, 2019
1 parent 3339fe5 commit 387d240
Show file tree
Hide file tree
Showing 29 changed files with 555 additions and 642 deletions.
3 changes: 1 addition & 2 deletions cygnus-ngsi/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -151,6 +151,7 @@ $ ./notification-json-simple.sh http://localhost:5050/notify myservice myservice
> User-Agent: orion/0.10.0
> Fiware-Service: myservice
> Fiware-ServicePath: myservicepath
> ngsiv2-attrsformat: normalized
> Content-Length: 460
>
* upload completely sent off: 460 out of 460 bytes
Expand All @@ -163,8 +164,6 @@ $ ./notification-json-simple.sh http://localhost:5050/notify myservice myservice

Or you can connect a real NGSI source such as [Orion Context Broker](https://github.com/telefonicaid/fiware-orion). Please, check the [User and Programmer Guide](../doc/cygnus-ngsi/user_and_programmer_guide/connecting_orion.md) for further details.

Support for NGSIv2 notifications has been added from version above 1.17.1. For this purpose, it's been added a new dir [/NGSIv2](./resources/ngsi-examples/NGSIv2) which contains script files in order to emulate some NGSIv2 notification types.

[Top](#top)

### <a name="section2.7"></a>Management API overview
Expand Down
2 changes: 1 addition & 1 deletion cygnus-ngsi/resources/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ These clients can be used as the base for a custom Hive remote client (interacti

##<a name="section2"></a>NGSI notifications

A set of scripts that can be use to simulate Orion NGSI10 notifications. Its main purpose is Cygnus debugging.
A set of scripts that can be use to simulate Orion NGSI notifications. Its main purpose is Cygnus debugging.

* notification-json-compound.sh
* notification-json-md.sh
Expand Down

This file was deleted.

This file was deleted.

Original file line number Diff line number Diff line change
Expand Up @@ -37,27 +37,33 @@ else
SERVICE_PATH=/
fi

curl $URL -v -s -S --header 'Content-Type: application/json; charset=utf-8' --header 'Accept: application/json' --header 'User-Agent: orion/0.10.0' --header "Fiware-Service: $SERVICE" --header "Fiware-ServicePath: $SERVICE_PATH" --header "ngsiv2-attrsformat: normalized" -d @- <<EOF
curl $URL -v -s -S --header 'Content-Type: application/json; charset=utf-8' --header 'Accept: application/json' --header 'User-Agent: orion/0.10.0' --header "Fiware-Service: $SERVICE" --header "Fiware-ServicePath: $SERVICE_PATH" -d @- <<EOF
{
"subscriptionId" : "51c0ac9ed714fb3b37d7d5a8",
"data" : [
"originator" : "localhost",
"contextResponses" : [
{
"temperature" : {
"type" : "centigrade",
"value" : "26.5",
"metadata": {}
},
"type" : "Room",
"id" : "Room.1"
},
{
"temperature" : {
"type" : "centigrade",
"value" : "19.3",
"metadata": {}
},
"type" : "Room",
"id" : "Room.suite"
"contextElement" : {
"attributes" : [
{
"name" : "field1",
"type" : "type1",
"value" : { "a": "1", "b": "2" }
},
{
"name" : "field2",
"type" : "type2",
"value" : [ "v1", "v2" ]
}
],
"type" : "Room",
"isPattern" : "false",
"id" : "Room2"
},
"statusCode" : {
"code" : "200",
"reasonPhrase" : "OK"
}
}
]
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -37,31 +37,41 @@ else
SERVICE_PATH=/
fi

curl $URL -v -s -S --header 'Content-Type: application/json; charset=utf-8' --header 'Accept: application/json' --header 'User-Agent: orion/0.10.0' --header "Fiware-Service: $SERVICE" --header "Fiware-ServicePath: $SERVICE_PATH" --header "ngsiv2-attrsformat: normalized" -d @- <<EOF
curl $URL -v -s -S --header 'Content-Type: application/json; charset=utf-8' --header 'Accept: application/json' --header 'User-Agent: orion/0.10.0' --header "Fiware-Service: $SERVICE" --header "Fiware-ServicePath: $SERVICE_PATH" -d @- <<EOF
{
"subscriptionId" : "51c0ac9ed714fb3b37d7d5a8",
"data" : [
"originator" : "localhost",
"contextResponses" : [
{
"temperature" :
"contextElement" : {
"attributes" : [
{
"name" : "temperature",
"type" : "centigrade",
"value" : "26.5",
"metadata": {}
"value" : "26.5"
},
"the_geom" :
{
"name" : "the_geom",
"type" : "geometry",
"value" : "$4, $5",
"metadata": {
"location": {
"metadatas": [
{
"name": "location",
"type": "string",
"value": "WGS84"
}
}
},
]
}
],
"type" : "Car",
"isPattern" : "false",
"id" : "Car1"
},
"statusCode" : {
"code" : "200",
"reasonPhrase" : "OK"
}
}
]
}
EOF
Original file line number Diff line number Diff line change
Expand Up @@ -37,33 +37,46 @@ else
SERVICE_PATH=/
fi

curl $URL -v -s -S --header 'Content-Type: application/json: charset=utf-8' --header 'Accept: application/json' --header 'User-Agent: orion/0.10.0' --header "Fiware-Service: $SERVICE" --header "Fiware-ServicePath: $SERVICE_PATH" --header "ngsiv2-attrsformat: normalized" -d @- <<EOF
curl $URL -v -s -S --header 'Content-Type: application/json: charset=utf-8' --header 'Accept: application/json' --header 'User-Agent: orion/0.10.0' --header "Fiware-Service: $SERVICE" --header "Fiware-ServicePath: $SERVICE_PATH" -d @- <<EOF
{
"subscriptionId" : "51c0ac9ed714fb3b37d7d5a8",
"data" : [
"originator" : "localhost",
"contextResponses" : [
{
"temperature": {
"type" : "centigrade",
"value" : "26.5",
"metadata": {}
},
"pressure": {
"type" : "mmhg",
"value" : "720",
"metadata": {
"ID": {
"type": "string",
"value": "ground"
"contextElement" : {
"attributes" : [
{
"name" : "temperature",
"type" : "centigrade",
"value" : "26.5"
},
{
"name" : "pressure",
"type" : "mmhg",
"value" : "720",
"metadatas": [
{
"name": "ID",
"type": "string",
"value": "ground"
}
]
},
{
"name" : "humidity",
"type" : "percentage",
"value" : "42",
"metadatas": [ ]
}
}
},
"humidity": {
"type" : "percentage",
"value" : "42",
"metadata": {}
],
"type" : "Room",
"isPattern" : "false",
"id" : "Room1"
},
"type" : "Room",
"id" : "Room1"
"statusCode" : {
"code" : "200",
"reasonPhrase" : "OK"
}
}
]
}
Expand Down
Loading

0 comments on commit 387d240

Please sign in to comment.