Upload
brice-briggs
View
221
Download
0
Embed Size (px)
DESCRIPTION
Presence of primitive parameters For interop test – Mandatory parameters (M) SHALL be present – Unpermitted parameters (NP) SHALL NOT be present – Optional parameters (O) MAY be present, these may or may not be supported by an entity under test Participating parties should declare which optional parameters are supported Presence of an unsupported optional parameter in a message may be ignored by a receiver and preferably not cause just an error response © 2014 oneM2M Partners TST
Citation preview
Protocol Issues related to Plugtest
Group Name: TSTSource: Wolfgang Granzow, Qualcomm Inc., [email protected] Date: 2015-09-07Agenda Item: Joint meeting TST and PRO WGs
Objective
• The purpose of this contribution is to point potential issues to be resolved prior to the Interoperation Event– Presence and format of primitive parameters and
their mapping to binding protocol parameters– Parameters most likely causing trouble:
• To parameter and URI of the request-target• Content parameter• XML & JSON issues
© 2014 oneM2M PartnersTST-2015-0197
2
Presence of primitive parameters
• For interop test– Mandatory parameters (M) SHALL be present– Unpermitted parameters (NP) SHALL NOT be present– Optional parameters (O) MAY be present, these may or
may not be supported by an entity under test• Participating parties should declare which optional
parameters are supported• Presence of an unsupported optional parameter in a message
may be ignored by a receiver and preferably not cause just an error response
© 2014 oneM2M PartnersTST-2015-0197
3
Presence of Primitive Parameters
© 2014 oneM2M PartnersTST-2015-0197
4
Primitive Parameter CREATE RETRIEVE UPDATE DELETE NOTIFY
Operation M M M M MTo M M M M MFrom M M M M MRequest Identifier M M M M MResource Type M NP NP NP NPName O NP NP NP NPContent M O * M NP MRole O O O O OOriginating Timestamp O O O O ORequest Expiration Timestamp O O O O OResult Expiration Time O O O O OOperation Execution Time O O O O OResponse Type O O O O OResult Persistence O O O O NPResult Content O O O O NPEvent Category O O O O ODelivery Aggregation O O O O OGroup Request Identifier O O O O OFilter Criteria NP O O O NPDiscovery Result Type NP O NP NP NP
See slide
Presence of Primitive Parameters
© 2014 oneM2M PartnersTST-2015-0197
5
Primitive parameter Ack CREATESuccess
RETRIEVESuccess
UPDATESuccess
DELETESuccess
NOTIFYSuccess
Error
Response Status Code M M M M M M M
Request Identifier M M M M M M M
Content O O M O O O O
To O O O O O O O
From O O O O O O O
Originating Timestamp O O O O O O O
Result Expiration Timestamp
O O O O O O O
Event Category O O O O O O O
To Primitive Parameter vs. URI• 6 formats of the To primitive parameter at both transmitter and receiver:
– CSE-relative: CSE-ID not present • Structured: first segment of the path is resourceName of <CSEBase> resource• Unstructured: one and only segment is the resourceID of the addressed resource
– M2M-SP-relative: first segment of the path is the SP-relative CSE-ID• Structured: the segments following the first segment include the structured CSE-relative path• Unstructured: the segment following the first segment includes the resourceID of the addressed resource
– Absolute: starting with //{M2M-SP-ID}/{CSE-ID}• Structured: the segments following the above pattern include the structured CSE-relative path • Unstructured: the segment following the above pattern includes the resourceID
© 2014 oneM2M PartnersTST-2015-0197
6
Proposed mapping between To parameter and path component of request-line
• Two mappings for each of the 6 resource ID cases– origin-form: when making request to an “origin server”, origin server is the registrar CSE of the originator of the request
• Host header includes the fqdn (or ip address) of the originator’s registrar CSE – absolute-form: when making a request to a HTTP proxy, HTTP proxy sits between the originator of the request and the
registrar CSE • Host header includes the fqdn (or ip address) of the HTTP proxy• HTTP proxy uses the host address (authority part) of the absolute-form request target to identify the registrar CSE
Resource-ID Type To parameter value path component
structured CSE-Relative
CSEBase/ae12/cont27/contInst696 /CSEBase/ae12/cont27/contInst696http://{registrarCSEAddress}/CSEBase/ae12/cont27/contInst696/
unstructured CSE-Relative
cin00856 /cin00856http://CSE1host.mym2msp.org/cin00856
structured SP-Relative
/CSE178/CSEBase/ae12/cont27/contInst696 /_/CSE178/CSEBase/ae12/cont27/contInst696http://{registrarCSEAddress}/_/CSE178/CSEBase/ae12/cont27/contInst696
unstructured SP-Relative
/CSE178/cin00856 /_/CSE178/cin00856http://{registrarCSEAddress}/_/CSE178/cin00856
structured Absolute
//CSE178host.yourm2msp.org/CSE178/CSEBase/ae12/cont27/contInst696
/_/_/CSE178host.yourm2msp.org/CSE178/CSEBase/ ae12/cont27/contInst696http://{registrarCSEAddress}/_/_/CSE178host.yourm2msp.org/CSE178/CSEBase/ ae12/cont27/contInst696
unstructured Absolute
//CSE178host.yourm2msp.org/CSE178/cin00856 /_/_/CSE178host.yourm2msp.org/CSE178/cin00856http://{registrarCSEAddress}/_/_/CSE178host.mym2msp.org/CSE178/cin00856
© 2014 oneM2M PartnersPRO-2015-0914
7
Proposed mapping between To parameter and path component of request-line
• Proposal for interop test– CSE-relative ID SHALL be supported– SP-relative ID MAY be supported– Absolute ID not tested– No test of “absolute-form” of request target (applicable to proxies only)
Resource-ID Type
To parameter value HTTP path component
structured CSE-Relative
CSEBase/ae12/cont27/contInst696 /CSEBase/ae12/cont27/contInst696
unstructured CSE-Relative
cin00856 /cin00856
structured SP-Relative
/CSE178/CSEBase/ae12/cont27/contInst696 /_/CSE178/CSEBase/ae12/cont27/contInst696
unstructured SP-Relative
/CSE178/cin00856 /_/CSE178/cin00856
structured Absolute
//CSE178host.yourm2msp.org/CSE178/CSEBase/ae12/cont27/contInst696
/_/_/CSE178host.yourm2msp.org/CSE178/CSEBase/ ae12/cont27/contInst696
unstructured Absolute
//CSE178host.yourm2msp.org/CSE178/cin00856 /_/_/CSE178host.yourm2msp.org/CSE178/cin00856
© 2014 oneM2M PartnersPRO-2015-0914
8
Format of Content parameter• Content primitive parameter is mapped to/from HTTP/CoAP
body/payload – Representations in Request primitives:
• Proposal to either• replace m2m:attributeList with m2m:<resourceType>• or to include multiple attributes into fragment #attr1+attr2+…
© 2014 oneM2M PartnersTST-2015-0197
9
Element Name Applicable Operations
Data Type Defined in
m2m:<resourceType> C m2m:<resourceType> CDT-<resourceType>-v1_0_0.xsdm2m:notification N m2m:notification CDT-notification-v1_0_0.xsdm2m:aggregatedNotification
N m2m:aggregatedNotification CDT-notification-v1_0_0.xsd
m2m:attributeList R U m2m:attributeList * CDT-requestPrimitive-v1_0_0.xsdm2m:responsePrimitive N m2m:responsePrimitive CDT-responsePrimitive-
v1_0_0.xsd
* Under reconsideration in PRO WG
Partial Retrieve Request• Partial retrieve request has Content• Retrieve request is mapped to GET request in HTTP
and CoAP binding– HTTP binding presently allows Content mapped into the
HTTP body or CoAP payload using data type m2m:attributeList
– HTTP GET request with body is very uncommon (although not strictly forbidden)
– PRO WG is considering to include the attributes to be retrieved into the fragment part of Request-Target
/path?query#attr1+attr2+attr3 +…
© 2014 oneM2M PartnersPRO-2015-0914
10
Format of Content parameter• Content primitive parameter in response primitive
© 2014 oneM2M PartnersTST-2015-0197
11
Result Content Parameter value Applicable Operations
Primitive Content
Not Present CRUDN&Discovery
Defaults: CUD: 1 “Attributes”R, Discovery: m2m:URIListN: defined by <subscription>
0 “Nothing” CUD not present1 “Attributes” (w/o Child Resource Refs) CRUD m2m:<resourceType>
2 “Hierarchical Address” C raw data Note 1
3 “Hierarchical Address + Attributes C m2m:resource Note 24 “Attributes + Child Resources” R m2m:<resourceType>5 “Attributes + Child Resource References” R m2m:<resourceType>6 “Child Resource References” R m2m:<URIList>7 “Original Resource” Note 3 R m2m:<resourceType>
see Notes on next page
Format of Content parameter
• Content primitive parameter in response primitive:Note 1: considered in PRO WG to be replaced by data type m2m:URI This also applies to the response (“ack”) to non-blocking requests in asynchronous mode for any CRUD operationNote 2: current definition of m2m:resource needs to be revisedNote 3: retrieves the original resource in case the To parameter points to an announced resource
– Other applicable formats:•m2m:aggregatedResponse
This applies to CRUD operations on a <fanOut> child resource of a <group> parent resource. The Content parameter of each response primitive included in aggregatedResponse is set as given in one of the other rows of this table
•raw data (not finally agreed in PRO WG)This could be included e.g. as debugging information into error responses
© 2014 oneM2M PartnersTST-2015-0197
12
Content examples (XML)• m2m:<resourceType>, example <AE> resource (long names):
<?xml version="1.0" encoding="utf-8"?><m2m:AE resourceName="TestAE" xmlns:m2m="http://www.onem2m.org/xml/protocols"> <resourceType>2</resourceType> <resourceID>ae1</resourceID> <parentID>cb1</parentID> <creationTime>20150905T161616</creationTime> <lastModifiedTime>20150905T161616</lastModifiedTime> <accessControlPolicyIDs>acp1</accessControlPolicyIDs> <expirationTime>20150905T161616</expirationTime> <appName>testApplication</appName> <App-ID>NtestApp01</App-ID> <AE-ID>CAE01</AE-ID> <pointOfAccess>192.168.194.14</pointOfAccess> <requestReachability>true</requestReachability> <childResource name="TestContainer1" type="3">cnt1</childResource></m2m:AE>
Content examples (XML)• m2m:<resourceType>, example <AE> resource (short names):
<?xml version="1.0" encoding="utf-8"?><m2m:ae rn="TestAE" xmlns:m2m="http://www.onem2m.org/xml/protocols"> <ty>2</ty> <ri>ae1</ri> <pi>cb1</pi> <ct>20150905T161616</ct> <lt>20150905T161616</lt> <acpi>acp1</acpi> <et>20150905T161616</et> <apn>testApplication</apn> <api>NtestApp01</api> <aei>CAE01</AE-ID> <poa>192.168.194.14</poas> <rr>true</rr> <ch nm="TestContainer1" ty="3">cnt1</ch></m2m:ae>
Content examples (XML)• m2m:<resourceType>, example <AE> resource (short names):
<?xml version="1.0" encoding="utf-8"?><m2m:ae rn="TestAE" xmlns:m2m="http://www.onem2m.org/xml/protocols"> <ty>2</ty> <ri>ae1</ri> <pi>cb1</pi> <ct>20150905T161616</ct> <lt>20150905T161616</lt> <acpi>acp1</acpi> <et>20150905T161616</et> <apn>testApplication</apn> <api>NtestApp01</api> <aei>CAE01</AE-ID> <poa>192.168.194.14</poas> <rr>true</rr> <ch nm="TestContainer1" typ="3">cnt1</ch></m2m:ae>
Could be removed
Presence of anyattribute optional!
Content examples (JSON)• m2m:<resourceType>, example <AE> resource (short names):
{ “rn”: "TestAE“, “ty”: 2, “ri”: “ae1”, “pi”: “cb1”, “ct”: “20150905T161616”, “lt”: “20150905T161616”, “acpi”: “acp1”, “et”: “20150905T161616”, “apn”: ”testApplication”, “api”: “NtestApp01”, “aei>”: “CAE01”, “poa”: “192.168.194.14”, “rr”: true, [“ch”: { “nm”: "TestContainer1"
“typ”:"3“, “val”: “cnt1” } ]
}
Currently “rootElement” m2m:aeomitted in JSON
Content examples• m2m:uril (m2m:URIList)
– XML: <?xml version="1.0" encoding="utf-8"?>
<m2m:uril xmlns:m2m="http://www.onem2m.org/xml/protocols"> /abc/def/xyz /92y6/hhhhh/nnn /CSE27/room25/temperature
</m2m:uril>
– JSON: {“m2m:uril”: [“/abc/def/xyz”, “/92y6/hhhhh/nnn”, “/CSE27/room25/temperature”]}
with or without namespace m2m: ?
Content examples (XML)• m2m:resource, example <AE> resource (short names):
<?xml version="1.0" encoding="utf-8"?><m2m:rce xmlns:m2m="http://www.onem2m.org/xml/protocols">
<m2m:ae rn="TestAE" > <ty>2</ty> <ri>ae1</ri>
… <apn>testApplication</apn> <api>NtestApp01</api> <aei>CAE01</AE-ID> <poa>192.168.194.14</poas> <rr>true</rr> <ch nm="TestContainer1" ty="3">cnt1</ch> </m2m:ae>
<uril>/abc/def/xyz /92y6/hhhhh/nnn /CSE27/room25/temperature</uril> </m2m:rce>
Content examples (XML)• m2m:attributeList (long names):
<?xml version="1.0" encoding="UTF-8"?><m2m:attributeList xmlns:m2m="http://www.onem2m.org/xml/protocols"> <attribute> <name>resourceID</name> <value>cb1</value> </attribute> <attribute> <name>resourceName</name> <value>CSEBase1</value> </attribute></m2m:attributeList>
CoAP
• Reintroduced numeric values for oneM2M defined media types (marked now as subject to change)– Revision in PRO-2015-0945R02
© 2014 oneM2M PartnersTST-2015-0197
20