Skip to content

Instantly share code, notes, and snippets.

@fgalan
Created February 16, 2015 20:12
Show Gist options
  • Save fgalan/054a0f72570d429c73a0 to your computer and use it in GitHub Desktop.
Save fgalan/054a0f72570d429c73a0 to your computer and use it in GitHub Desktop.
fermin@debvm:~/src/fiware-orion$ (curl localhost:1026/v1/registry/discoverContextAvailability -s -S --header 'Content-Type: application/xml' -d @- | xmllint --format - ) <<EOF
<?xml version="1.0"?>
<discoverContextAvailabilityRequest>
<entityIdList>
<entityId type="Room" isPattern="false">
<id>Room2</id>
</entityId>
</entityIdList>
<attributeList>
<attribute>temperature</attribute>
</attributeList>
<restriction>
<scope>
<operationScope>
<scopeType>IncludeAssociations</scopeType>
<scopeValue>SOURCES</scopeValue>
</operationScope>
</scope>
</restriction>
</discoverContextAvailabilityRequest>
EOF
<?xml version="1.0"?>
<discoverContextAvailabilityResponse>
<contextRegistrationResponseList>
<contextRegistrationResponse>
<contextRegistration>
<entityIdList>
<entityId type="Room" isPattern="false">
<id>Room1</id>
</entityId>
</entityIdList>
<contextRegistrationAttributeList>
<contextRegistrationAttribute>
<name>temperature</name>
<type>float</type>
<isDomain>false</isDomain>
</contextRegistrationAttribute>
</contextRegistrationAttributeList>
<providingApplication>http://mysensors.com/Rooms</providingApplication>
</contextRegistration>
</contextRegistrationResponse>
<contextRegistrationResponse>
<contextRegistration>
<registrationMetadata>
<contextMetadata>
<name>right_neighbour</name>
<type>Association</type>
<value>
<entityAssociation>
<sourceEntityId type="Room" isPattern="false">
<id>Room1</id>
</sourceEntityId>
<targetEntityId type="Room" isPattern="false">
<id>Room2</id>
</targetEntityId>
</entityAssociation>
<attributeAssociationList>
<attributeAssociation>
<sourceAttribute>temperature</sourceAttribute>
<targetAttribute>temperature</targetAttribute>
</attributeAssociation>
</attributeAssociationList>
</value>
</contextMetadata>
</registrationMetadata>
<providingApplication>http://www.fi-ware.eu/NGSI/association</providingApplication>
</contextRegistration>
</contextRegistrationResponse>
</contextRegistrationResponseList>
</discoverContextAvailabilityResponse>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment