OneM2M_Templates.ttcn 115 KB
Newer Older
1 2 3 4 5 6 7
/**
 *  Copyright Notification
 *  No part of this document may be reproduced, in an electronic retrieval system or otherwise, except as authorized by written permission.
 *  The copyright and the foregoing restriction extend to reproduction in all media.
 *  © 2016, oneM2M Partners Type 1 (ARIB, ATIS, CCSA, ETSI, TIA, TSDSI, TTA, TTC).
 *  All rights reserved.
 *  
8
 *  @author     oneM2M
9
 *  @version    $URL: https://oldforge.etsi.org/svn/oneM2M/trunk/ttcn/LibOneM2M/OneM2M_Templates.ttcn $
10
 *              $Id: OneM2M_Templates.ttcn 312 2017-06-27 07:39:17Z reinaortega $
11 12 13 14 15 16 17 18 19 20 21
 *  @desc       Module containing templates for oneM2M
 *
 */
module OneM2M_Templates {

	import from XSD all;
	import from OneM2M_Types all;
	import from OneM2M_TestSystem all;
	import from OneM2M_TypesAndValues all;
	//import from OneM2M_AdditionalTypes all;
	import from OneM2M_Pixits all;
22
	//import from OneM2M_Functions all;
23

24
		
25 26 27 28 29 30
	/**
	 * @desc Get a converted to string random number 
	 * @param p_lower Lower limit 
	 * @param p_upper Upper limit
	 * @return Random number converted to string
	 * @verdict 
31
	 */
32 33 34 35 36
	function f_rnd(in integer p_lower, in integer p_upper) return charstring {
		
		return int2str(float2int(rnd() * int2float(p_upper - p_lower + 1)) + p_lower);	
	}

37 38

	/* Templates */
39
	
40
	group Primitives {
41 42 43 44
    	/** 
    	 * @desc Base template for request sending operations
    	 * @param p_requestPrimitive
    	 */
45
    	template (value) MsgOut m_request(in template (value) RequestPrimitive p_requestPrimitive, in template (omit) AttributeAux_list p_forcedFields := omit) := {
46
    		primitive := { requestPrimitive := p_requestPrimitive},
47
    		host := PX_SUT_ADDRESS,
48 49 50
    		xmlNamespace := PX_XML_NAMESPACE,
    		protocolBinding := PX_PROTOCOL_BINDING,
    		serialization := PX_SERIALIZATION, 
51
    		forcedFields := p_forcedFields
52
    	};
53 54 55 56 57
    	
		/** 
		 * @desc Base template for response sending operations
		 * @param p_responsePrimitive
		 */
58
		template (value) MsgOut m_response(in template (value) ResponsePrimitive p_responsePrimitive, in template (omit) AttributeAux_list p_forcedFields := omit) := {
59
			primitive := { responsePrimitive := p_responsePrimitive},
60
			host := PX_SUT_ADDRESS,
61 62 63
			xmlNamespace := PX_XML_NAMESPACE,
			protocolBinding := PX_PROTOCOL_BINDING,
			serialization := PX_SERIALIZATION, 
64
			forcedFields := p_forcedFields
65
		};
66 67 68 69 70 71 72 73 74 75 76 77 78 79
		
		/** 
		 * @desc Base template for response sending operations
		 * @param p_responsePrimitive
		 */
		template (value) MsgOut m_httpResponse(in template (value) ResponsePrimitive p_responsePrimitive, in template (omit) AttributeAux_list p_forcedFields := omit) := {
			primitive := { responsePrimitive := p_responsePrimitive},
			host := PX_SUT_ADDRESS,
			xmlNamespace := PX_XML_NAMESPACE,
			protocolBinding := "HTTP",
			serialization := PX_SERIALIZATION, 
			forcedFields := p_forcedFields
		};
		
80 81 82 83 84 85 86 87 88 89 90 91
    	template MsgIn mw_request(in template (present) RequestPrimitive p_requestPrimitive) := {
    		primitive := { requestPrimitive := p_requestPrimitive}
    	};
    	
		/** 
		 * @desc Base template for response receiving operations
		 * @param p_responsePrimitive
		 */
		template MsgIn mw_response(in template (present) ResponsePrimitive p_responsePrimitive) := {
			primitive := { responsePrimitive := p_responsePrimitive}
		};
    	
92
	}//end of group primitives
93 94 95 96
	
	group RequestPrimitives { 
		
		group Retrieve {
97

98 99 100 101
			/**
			 * @desc Base RETRIEVE request primitive
			 * @param p_targetResourceAddress Target resource address
			 * @param p_originator Originator (from)
102
			 */
103
			template (value) RequestPrimitive m_retrieveResource(XSD.ID p_targetResourceAddress, in XSD.ID p_originator) := {
104
				operation := int2,
105
				to_ := p_targetResourceAddress,
106
				from_ := p_originator,
107 108
				requestIdentifier := "m_retrieveResource" & f_rnd(1, 1000000),
				resourceType := omit,
109
				primitiveContent := omit,
110
				roleIDs := omit, 
111 112 113 114 115 116 117 118 119 120 121
				originatingTimestamp := omit,
				requestExpirationTimestamp := omit,
				resultExpirationTimestamp := omit,
				operationExecutionTime := omit,
				responseType := omit,
				resultPersistence := omit,
				resultContent := omit,
				eventCategory := omit,
				deliveryAggregation := omit,
				groupRequestIdentifier := omit,
				filterCriteria := omit,
122 123 124
				discoveryResultType := omit,
				tokens := omit,
				tokenIDs := omit,
125
				localTokenIDs := omit,
126
				tokenRequestIndicator := omit
127 128
			};
        	
129 130 131 132 133
			/**
			 * @desc RETRIEVE request primitive for a single attribute in To field ("targetResourceAddress#AttributeName")
			 * @param p_targetResourceAddress Target resource address (including "#AttributeName")
			 * @param p_originator Originator (from)
			 */
134
        	template (value) RequestPrimitive m_retrieveResourceAttributeToOption(XSD.ID p_targetResourceAddress, in XSD.ID p_originator) := {
135
        		operation := int2,
136
        		to_ := p_targetResourceAddress,
137
        		from_ := p_originator,
138 139
        		requestIdentifier := "m_retrieveResourceAttributeOptionTo" & f_rnd(1, 1000000),
        		resourceType := omit,
140
				primitiveContent := omit, 
141
				roleIDs := omit,
142 143 144 145 146 147 148 149 150 151 152
				originatingTimestamp := omit,
				requestExpirationTimestamp := omit,
				resultExpirationTimestamp := omit,
				operationExecutionTime := omit,
				responseType := omit,
				resultPersistence := omit,
				resultContent := omit,
				eventCategory := omit,
				deliveryAggregation := omit,
				groupRequestIdentifier := omit,
				filterCriteria := omit,
153 154 155
				discoveryResultType := omit,
				tokens := omit,
				tokenIDs := omit,
156
				localTokenIDs := omit,
157
				tokenRequestIndicator := omit
158 159
        	};
        	
160 161 162 163 164
			/**
			 * @desc RETRIEVE request primtive containing the target attributes in the primitiveContent field
			 * @param p_targetResourceAddress Target resource address 
			 * @param p_attributeList Target attribute list
			 * @param p_originator Originator (from)
165
			 */
166
			template (value) RequestPrimitive m_retrieveResourceAttributeContentOption(XSD.ID p_targetResourceAddress, in template (value) AttributeList_1 p_attributeList, in XSD.ID p_originator) := {
167
				operation := int2,
168
				to_ := p_targetResourceAddress,
169
				from_ := p_originator,
170 171
				requestIdentifier := "m_retrieveResourceAttributeContentOption" & f_rnd(1, 1000000),
				resourceType := omit,
172
				primitiveContent := {attributeList := p_attributeList},
173
				roleIDs := omit,
174 175 176 177 178 179 180 181 182 183 184
				originatingTimestamp := omit,
				requestExpirationTimestamp := omit,
				resultExpirationTimestamp := omit,
				operationExecutionTime := omit,
				responseType := omit,
				resultPersistence := omit,
				resultContent := omit,
				eventCategory := omit,
				deliveryAggregation := omit,
				groupRequestIdentifier := omit,
				filterCriteria := omit,
185 186 187
				discoveryResultType := omit,
				tokens := omit,
				tokenIDs := omit,
188
				localTokenIDs := omit,
189
				tokenRequestIndicator := omit
190
			};
191 192 193 194 195 196 197 198 199 200
			
			/**
			  * @desc RETRIEVE request primtive containing the Filter Criteria in the filterCriteria field
			  * @param p_targetResourceAddress Target resource address 
			  * @param p_filterCriteria FilterCriteria
			  * @param p_originator Originator (from)
		     */
			template (value) RequestPrimitive m_retrieveResourceFilterUsageOption(XSD.ID p_targetResourceAddress, in XSD.ID p_originator, in template (value) FilterUsage p_filterUsage) modifies m_retrieveResource := {
				requestIdentifier := "m_retrieveResourceFilterUsageOption" & f_rnd(1, 1000000),
				filterCriteria := {
201 202 203 204 205 206 207 208 209 210 211 212 213 214
					createdBefore := omit,
					createdAfter := omit,
					modifiedSince := omit,
					unmodifiedSince := omit,
					stateTagSmaller := omit,
					stateTagBigger := omit,
					expireBefore := omit,
					expireAfter := omit,
					labels := omit,
					resourceType := omit,
					sizeAbove := omit,
					sizeBelow := omit,
					contentType_list := {},
					attribute_list := {},
215
					filterUsage := p_filterUsage,
216 217 218 219 220 221 222
					limit := omit,
					semanticsFilter_list := {},
					filterOperation := omit,
					contentFilterSyntax := omit,
					contentFilterQuery := omit,
					level := omit,
					offset := omit
223 224 225 226 227 228 229 230 231 232 233 234
				}
			};
			
			/**
			  * @desc RETRIEVE request primtive containing the Discovery Type in the discoveryResultType field and Filter Criteria in the filterCriteria field
			  * @param p_targetResourceAddress Target resource address 
			  * @param p_filterCriteria FilterCriteria
			  * @param p_originator Originator (from)
			 */
			template (value) RequestPrimitive m_retrieveResourceDiscResTypeFilterUsageOption(XSD.ID p_targetResourceAddress, in XSD.ID p_originator, in template (value) DiscResType p_discResType, in template (value) FilterUsage p_filterUsage) modifies m_retrieveResource := {
				requestIdentifier := "m_retrieveResourceFilterUsageOption" & f_rnd(1, 1000000),
				filterCriteria := {
235 236 237 238 239 240 241 242 243 244 245 246 247 248
					createdBefore := omit,
					createdAfter := omit,
					modifiedSince := omit,
					unmodifiedSince := omit,
					stateTagSmaller := omit,
					stateTagBigger := omit,
					expireBefore := omit,
					expireAfter := omit,
					labels := omit,
					resourceType := omit,
					sizeAbove := omit,
					sizeBelow := omit,
					contentType_list := {},
					attribute_list := {},
249
					filterUsage := p_filterUsage,
250 251 252 253 254 255 256
					limit := omit,
					semanticsFilter_list := {},
					filterOperation := omit,
					contentFilterSyntax := omit,
					contentFilterQuery := omit,
					level := omit,
					offset := omit
257 258 259 260 261 262 263 264 265 266 267 268 269
				},
				discoveryResultType := p_discResType
			};
			
			/**
				  * @desc RETRIEVE request primtive containing the Discovery Type in the discoveryResultType field and Filter Criteria in the filterCriteria field
				  * @param p_targetResourceAddress Target resource address 
				  * @param p_filterCriteria FilterCriteria
				  * @param p_originator Originator (from)
				 */
				template (value) RequestPrimitive m_retrieveResourceInvalidFormatOption(XSD.ID p_targetResourceAddress, in XSD.ID p_originator) modifies m_retrieveResource := {
					requestIdentifier := "m_retrieveResourceFilterUsageOption" & f_rnd(1, 1000000),
					filterCriteria := {
270 271 272 273 274 275 276 277 278 279 280 281 282 283
						createdBefore := omit,
						createdAfter := omit,
						modifiedSince := omit,
						unmodifiedSince := omit,
						stateTagSmaller := omit,
						stateTagBigger := omit,
						expireBefore := omit,
						expireAfter := omit,
						labels := omit,
						resourceType := omit,
						sizeAbove := omit,
						sizeBelow := omit,
						contentType_list := {},
						attribute_list := {},
284
						filterUsage := omit,
285 286 287 288 289 290 291
						limit := omit,
						semanticsFilter_list := {},
						filterOperation := omit,
						contentFilterSyntax := omit,
						contentFilterQuery := omit,
						level := omit,
						offset := omit
292 293 294
					}
				};
			
295 296 297
    	}//end group Retrieve

    	group Update {
298 299
    		
    		template (value) RequestPrimitive m_update := {
300 301
				operation := int3,
				to_ := "NotInitialized",
302 303
				from_ := "NotInitialized",
				requestIdentifier := "m_update" & f_rnd(1, 1000000),
304
				resourceType := omit,
305
				primitiveContent:= omit,
306
				roleIDs := omit, 
307 308 309 310 311 312 313 314 315 316 317
				originatingTimestamp := omit,
				requestExpirationTimestamp := omit,
				resultExpirationTimestamp := omit,
				operationExecutionTime := omit,
				responseType := omit,
				resultPersistence := omit,
				resultContent := omit,
				eventCategory := omit,
				deliveryAggregation := omit,
				groupRequestIdentifier := omit,
				filterCriteria := omit,
318 319 320
				discoveryResultType := omit,
				tokens := omit,
				tokenIDs := omit,
321
				localTokenIDs := omit,
322
				tokenRequestIndicator := omit
323
			};
324
        	
325 326 327 328 329
			/**
			 * @desc Base UPDATE request primitive for Ae resource
			 */
			template (value) RequestPrimitive m_updateAeBase modifies m_update:= {
				requestIdentifier := "m_updateAe" & f_rnd(1, 1000000),
330
				primitiveContent:= {aE := m_contentUpdateAe}
331 332
			};
        	
333 334 335 336 337
			/**
			 * @desc Base UPDATE request primitive for Container resource
			 */
			template (value) RequestPrimitive m_updateContainerBase modifies m_update:= {
				requestIdentifier := "m_updateContainer" & f_rnd(1, 1000000),
338
				primitiveContent:= {container := m_contentUpdateContainer}
339
			};
340
			
341 342 343 344 345
			/**
			 * @desc Base UPDATE request primitive for ContentInstance resource
			 */
			template (value) RequestPrimitive m_updateContentInstanceBase modifies m_update:= {
				requestIdentifier := "m_updateContentInstance" & f_rnd(1, 1000000),
346
				primitiveContent:= {contentInstance := m_contentUpdateContentInstance}
347 348
			};
			
349 350 351
			/**
			 * @desc Base UPDATE request primitive for AccessControlPolicy resource
			 */        				
352
			template (value) RequestPrimitive m_updateAcpBase modifies m_update := {
353
				requestIdentifier := "m_updateAcp" & f_rnd(1, 1000000),
354
				primitiveContent:= {accessControlPolicy := m_contentUpdateAcp}
355 356
			};
			
357 358
			template (value) RequestPrimitive m_updateAcpPrivileges(in template(omit) SetOfAcrs p_privileges := omit, in template(omit) SetOfAcrs p_selfPrivileges := omit) modifies m_update := {
				requestIdentifier := "m_updateAcp" & f_rnd(1, 1000000),
359
				primitiveContent:= {accessControlPolicy := m_contentUpdateAcpPrivileges(p_privileges, p_selfPrivileges)}
360 361
			};
			
362 363 364
			/**
			 * @desc Base UPDATE request primitive for Group resource
			 */
365
			template (value) RequestPrimitive m_updateGroupBase modifies m_update := {
366
				requestIdentifier := "m_updateGroup" & f_rnd(1, 1000000),
367
				primitiveContent:= {group_ := m_contentUpdateGroup}
368 369
			};
			
370 371 372 373 374
			/**
			 * @desc Base UPDATE request primitive for CSEBase resource
			 */
			template (value) RequestPrimitive m_updateCSEBaseBase modifies m_update := {
				requestIdentifier := "m_updateGroup" & f_rnd(1, 1000000),
375
				primitiveContent:= {cSEBase := m_contentUpdateCSEBase}
376 377
			};
			
378 379 380
			/**
			 * @desc Base UPDATE request primitive for Schedule resource
			 */
381
			template (value) RequestPrimitive m_updateScheduleBase modifies m_update := {
382
				requestIdentifier := "m_updateSchedule" & f_rnd(1, 1000000),
383
				primitiveContent:= {schedule := m_contentUpdateSchedule}
384 385
			};
			
386 387 388
			/**
			 * @desc Base UPDATE request primitive for PollingChannel resource
			 */
389
			template (value) RequestPrimitive m_updatePollingChannelBase modifies m_update := {
390
				requestIdentifier := "m_updatePollingChannel" & f_rnd(1, 1000000),
391
				primitiveContent:= {pollingChannel := m_contentUpdatePollingChannel}
392 393
			};
			
394 395 396
			/**
			 * @desc Base UPDATE request primitive for Subscription resource
			 */
397
			template (value) RequestPrimitive m_updateSubscriptionBase modifies m_update := {
398
				requestIdentifier := "m_updateSubscription" & f_rnd(1, 1000000),
399
				primitiveContent:= {subscription := m_contentUpdateSubscription}
400
			};
401
			
402
			template (value) RequestPrimitive m_updateLocationPolicy(XSD.ID p_locResourceAddress, in template (omit) AcpType p_accessControlPolicyIds, in template (omit) XSD.Duration p_locationUpdatePeriod) modifies m_update := {
403
        	  	to_ 				:= p_locResourceAddress,
404
        	  	requestIdentifier	:= "m_updateLocationPolicy",
405
        	  	primitiveContent	:= {locationPolicy := m_contentUpdateLocationPolicy(p_accessControlPolicyIds, p_locationUpdatePeriod)}
406
			  };
407
        	
408 409 410
    	}//end group Update
    	
    	group Create {
411 412 413 414 415

			template (value) RequestPrimitive m_create := {
				operation := int1,
				to_ := "NotInitialized",
				from_ := "NotInitialized",
416
				requestIdentifier := testcasename() & "-m_create" & f_rnd(1, 1000000),
417 418
				resourceType := omit,
				primitiveContent := omit,
419
				roleIDs := omit,
420 421 422 423 424 425 426 427 428 429 430 431 432 433
				originatingTimestamp := omit,
				requestExpirationTimestamp := omit,
				resultExpirationTimestamp := omit,
				operationExecutionTime := omit,
				responseType := omit,
				resultPersistence := omit,
				resultContent := omit,
				eventCategory := omit,
				deliveryAggregation := omit,
				groupRequestIdentifier := omit,
				filterCriteria := omit,
				discoveryResultType := omit,
				tokens := omit,
				tokenIDs := omit,
434
				localTokenIDs := omit,
435
				tokenRequestIndicator := omit
436 437

			};
438
        	
439 440 441 442 443
			/**
			 * @desc Base Reception template for create operation
			 */
			template RequestPrimitive mw_create(template XSD.ID p_from := *, template XSD.ID p_to := ?) := {
				operation := int1,
444
				to_ := p_to,
445 446 447
				from_ := p_from,
				requestIdentifier := ?,
				resourceType := ?,
448
				primitiveContent := ?,
449 450 451 452 453 454 455 456 457 458 459 460 461 462 463 464 465 466 467
				roleIDs := *,
				originatingTimestamp := *,
				requestExpirationTimestamp := *,
				resultExpirationTimestamp := *,
				operationExecutionTime := *,
				responseType := *,
				resultPersistence := *,
				resultContent := *,
				eventCategory := *,
				deliveryAggregation := *,
				groupRequestIdentifier := *,
				filterCriteria := *,
				discoveryResultType := *,
				tokens := *,
				tokenIDs := *,
				localTokenIDs := *,
				tokenRequestIndicator := *
			}
			
468 469
			
			/**
470 471 472 473 474 475
			 * @desc Base CREATE request primitive for AEAnnc resource
			 * @param p_accessControlPolicyIds
			 * @param p_to
			 * @param p_from
			 * @param p_appId
			 * @param p_stemId
476
			 */
477
			template (value) RequestPrimitive m_createAEAnnc(template (omit) AcpType p_accessControlPolicyIds := omit, template (omit) XSD.ID p_to := omit, template (omit) XSD.ID p_from := omit, XSD.ID p_appId, XSD.ID p_stemId := "") modifies m_create:= {
478 479 480 481
				to_ := p_to,
				from_ := p_from,//PX_AE_ID_STEM,//TODO We should use omit, "s", or "c"
				requestIdentifier := testcasename() & "-m_createAEAnnc" & f_rnd(1, 1000000),
				resourceType := int10002,
482
				primitiveContent := {aEAnnc := m_contentCreateAEAnnc({"Credential-ID:None"}, p_accessControlPolicyIds, p_appId, valueof(p_to) & "/" & p_stemId)}
483 484
			};
			
485
			/**
486
			 * @desc Reception template for CREATE AEAnnc
487
			 */
488
			template RequestPrimitive mw_createAEAnnc(template (omit) XSD.ID p_from := omit, template (omit) XSD.ID p_to := omit, template (omit) AcpType p_accessControlPolicyIds := omit) modifies mw_create := {
489
				resourceType := int10002,
490
				primitiveContent := {aEAnnc := mw_contentCreateAEAnnc({"Credential-ID:None"}, p_accessControlPolicyIds)}
491
			};
492

493
			template (value) RequestPrimitive m_createAe(XSD.ID p_appId, template (omit) AcpType p_accessControlPolicyIds := omit,template (omit) XSD.ID p_from := omit, template (omit) ResourceName p_resourceName :=  c_aeAuxName, in template (omit) PoaList p_poaList := omit) modifies m_create := {
494
				from_ := p_from,//PX_AE_ID_STEM,//TODO We should use omit, "s", or "c"
495
				requestIdentifier := testcasename() & "-m_createAe" & f_rnd(1, 1000000),
496
				resourceType := int2,
497
				primitiveContent := {aE := m_contentCreateAe(p_accessControlPolicyIds,p_resourceName, p_appId, p_poaList)}
498
			};
499
        	
500 501 502 503 504
			/**
			 * @desc Reception template for AE registration
			 */
			template RequestPrimitive mw_createAe(template XSD.ID p_from := *, template XSD.ID p_to := ?) modifies mw_create := {
				resourceType := int2,
505
				primitiveContent := {aE := ?}
506 507
			};  
			        	
508
        	template (value) RequestPrimitive m_createAeAux(template (omit) AcpType p_accessControlPolicyIds := omit, in template (omit) PoaList p_poaList) modifies m_create := {
509
        		from_ := PX_AE1_ID_STEM,//TODO We should use omit, "s", or "c"
510
        		requestIdentifier := testcasename() & "-m_createAe" & f_rnd(1, 1000000),
511
        		resourceType := int2,
512
        		primitiveContent := {aE := m_contentCreateAe(p_accessControlPolicyIds, c_aeAuxName, -, p_poaList)}
513
			};
514
        	
515 516 517
			/**
			 * @desc Base CREATE request primitive for AccessControlPolicy resource
			 */
518
			template (value) RequestPrimitive m_createAcpBase modifies m_create := {
519
				requestIdentifier := testcasename() & "-m_createAcp" & f_rnd(1, 1000000),
520
				resourceType := int1,
521
				primitiveContent := {accessControlPolicy := m_contentCreateAcp ()}
522 523
			};
				
524
        	template (value) RequestPrimitive m_createAcp(XSD.ID p_parentResourceAddress, in template (omit)  XSD.String p_name := c_defaultAccessControlPolicyResourceName, in template (value) ListOfURIs p_acor := PX_ACOR, in template (value) AccessControlOperations p_allowedOperations := int63) modifies m_create := {
525
        		to_ := p_parentResourceAddress,
526
        		from_ := PX_SUPER_USER,
527
        		requestIdentifier := testcasename() & "-m_createAcp" & f_rnd(1, 1000000),
528
        		resourceType := int1,
529
        		primitiveContent := {accessControlPolicy := m_contentCreateAcp (p_name, p_acor, p_allowedOperations)}
530 531
        	};
        	
532 533 534 535 536 537 538
			/**
			 * @desc Reception template for CREATE AcpAnnc
			 */
			template RequestPrimitive mw_createAccessControlPolicyAnnc(template XSD.ID p_from := *, template XSD.ID p_to := ?) modifies mw_create := {
				to_ := p_to,
				from_ := p_from,
				resourceType := int10002,
539
				primitiveContent := {accessControlPolicyAnnc := mw_contentCreateAcpAnnc(-)}
540 541
			};
        	
542 543 544 545
       	
			/**
			 * @desc Base CREATE request primitive for AccessControlPolicy resource (AUX)
			 */
546
        	template (value) RequestPrimitive m_createAcpAux(in template (value) XSD.String p_acpName := c_acpAuxName, in template (value) ListOfURIs p_acor := PX_ACOR, in template (value) AccessControlOperations p_allowedOperations := int63 ) modifies m_create := {
547
        		from_ := PX_SUPER_USER,
548
        		requestIdentifier := testcasename() & "-m_createAcpAux" & f_rnd(1, 1000000),
549
        		resourceType := int1,
550
        		primitiveContent := {accessControlPolicy := m_contentCreateAcp (p_acpName, p_acor, p_allowedOperations)}
551 552
        	};
        	
553
			/*template (value) RequestPrimitive m_createCSEBase (in ServiceSubscribedAppRule p_serviceSubscribedAppRule) modifies m_create := {
554
				from_ := PX_SUPER_USER,
555
				requestIdentifier := testcasename() & "-m_createCSE" & f_rnd(1, 1000000),
556
				resourceType := int1,//FIXME Is this the value for CSEBase? In any case, this template is not used at all
557
				primitiveContent := {cSEBase := m_contentCreateCSEBase (p_serviceSubscribedAppRule)}
558 559 560 561 562 563 564 565
			};*/
			
			/**
			 * @desc Base CREATE request primitive for CSEBase resource
			 */
			template (value) RequestPrimitive m_createCSEBaseBase modifies m_create := {
				requestIdentifier := testcasename() & "-m_createContainer" & f_rnd(1, 1000000),
				resourceType := int5,
566
				primitiveContent := {cSEBase := m_contentCreateCSEBase}
567 568
			};
        	
569 570 571 572
       	
			/**
			 * @desc Base CREATE request primitive for Container resource
			 */
573
			template (value) RequestPrimitive m_createContainerBase modifies m_create := {
574
				requestIdentifier := testcasename() & "-m_createContainer" & f_rnd(1, 1000000),
575
				resourceType := int3,
576
				primitiveContent := {container := m_contentCreateContainer}
577
			};
578
			
579 580 581 582 583 584
			/**
			 * @desc Base CREATE request primitive for remoteCSE resource
			 */
			template (value) RequestPrimitive m_createRemoteCSEBase(template (omit) AcpType p_accessControlPolicyIds := omit, template (omit) ResourceName p_resourceName :=  c_defaultRemoteCSEResourceName, in template (omit) XSD.AnyURI p_cSEBase := PX_CSE1_ID, in template (omit) XSD.ID p_cSE_ID := PX_CSE_ID) modifies m_create := {
				requestIdentifier := testcasename() & "-m_createRemoteCSE" & f_rnd(1, 1000000),
				resourceType := int16,
585
				primitiveContent := {remoteCSE := m_contentCreateRemoteCSE(p_resourceName, p_accessControlPolicyIds,p_cSEBase, p_cSE_ID)}
586 587
			};
			
588 589 590 591
			/**
			 * @desc CREATE request primitive for Container resource wiht no resourceName provided
			 */
			template (value) RequestPrimitive m_createContainer_noResourceName modifies m_createContainerBase := {
592
				primitiveContent := {container := m_contentCreateContainer(omit)}
593
			};
594
	
595
    		template (value) RequestPrimitive m_createContainer(XSD.ID p_parentResourceAddress, in template (omit) XSD.String p_resourceName := c_defaultContainerResourceName) modifies m_create := {
596
    			to_ := p_parentResourceAddress,
597
    			requestIdentifier := testcasename() & "-m_createContainer" & f_rnd(1, 1000000),
598
    			resourceType := int3,
599
    			primitiveContent := {container := m_contentCreateContainer(p_resourceName)}
600 601
    		};
        	
602 603 604 605 606
			/**
			 * @desc Reception template for CREATE Container
			 */
			template RequestPrimitive mw_createContainer(template XSD.ID p_from := *, template XSD.ID p_to := ?) modifies mw_create := {
				resourceType := int3,
607
				primitiveContent := {container := ?}
608 609
			};  
			
610
			/**
611
			 * @desc Base Reception template for CREATE ContainerAnnc
612
			 */
613
			template RequestPrimitive mw_createContainerAnncBase(template XSD.ID p_from := *, template XSD.ID p_to := ?) modifies mw_create := {
614
				resourceType := int10003,
615
				primitiveContent := {containerAnnc := mw_contentCreateContainerAnncBase}
616
			};
617
			
618 619 620 621 622
			/**
			 * @desc Reception template for CREATE FlexContainer
			 */
			template RequestPrimitive mw_createFlexContainer(template XSD.ID p_from := *, template XSD.ID p_to := ?) modifies mw_create := {
				resourceType := int28, 
623
				primitiveContent := {flexContainer := ?}
624 625 626 627 628 629 630
			};  
			
			/**
			 * @desc Reception template for CREATE GenericInterworkingOperationInstance
			 */
			template RequestPrimitive mw_createGenericIwkOpInstance(template XSD.ID p_from := *, template XSD.ID p_to := ?) modifies mw_create := {
				resourceType := int28,  // FIXME: not found in TS004
631
				primitiveContent := {genericInterworkingOperationInstance := ?}
632 633
			}; 
        	
634 635 636 637 638
			/**
			 * @desc Base CREATE request primitive for Content Instance resource
			 */
			template (value) RequestPrimitive m_createContentInstanceBase modifies m_create := {
				requestIdentifier := testcasename() & "-m_createContentInstance" & f_rnd(1, 1000000),
639
				resourceType := int4,
640
				primitiveContent := {contentInstance := m_contentCreateContentInstance}
641
			};
642 643 644 645 646
				
			/**
			 * @desc CREATE request primitive for Content Instance resource with no resourceName provided
			 */
			template (value) RequestPrimitive m_createContentInstance_noResourceName modifies m_createContentInstanceBase := {
647
				primitiveContent := {contentInstance := m_contentCreateContentInstance(omit)}
648
			};
649
    		
650
    		template (value) RequestPrimitive m_createContentInstance(XSD.ID p_parentResourceAddress, XSD.String p_primitiveContent) modifies m_create := {
651
    			to_ := p_parentResourceAddress,
652
    			from_ := "admin:admin",
653
    			requestIdentifier := testcasename() & "-m_createContentInstance" & f_rnd(1, 1000000),
654
    			resourceType := int4,
655
    			primitiveContent := {contentInstance := m_contentCreateContentInstance(p_primitiveContent)}
656 657
    		};
    		
658 659 660 661 662
			/**
			 * @desc Reception template for CREATE ContentInstanceAnnc
			 */
			template RequestPrimitive mw_createContentInstanceAnnc(template XSD.ID p_from := *, template XSD.ID p_to := ?) modifies mw_create := {
				resourceType := int10014,
663
				primitiveContent := {contentInstanceAnnc := ?}
664
			};  
665 666 667 668 669 670
			
			/**
			 * @desc Base Reception template for CREATE ContentInstanceAnnc
			 */
			template RequestPrimitive mw_createContentInstanceAnncBase(template XSD.ID p_from := *, template XSD.ID p_to := ?) modifies mw_create := {
				resourceType := int10014,
671
				primitiveContent := {contentInstanceAnnc := mw_contentCreateContentInstanceAnncBase}
672
			};  
673
        	    		
674 675 676 677
       	
			/**
			 * @desc Base CREATE request primitive for Group resource
			 */
678
			template (value) RequestPrimitive m_createGroupBase modifies m_create := {
679
				requestIdentifier := testcasename() & "-m_createGroup" & f_rnd(1, 1000000),
680
				resourceType := int9,
681
				primitiveContent := {group_ := m_contentCreateGroup (1, {"NotInitialized"}, omit, omit)}	//TODO: p_resourceId
682
			};
683
        	
684
        	template (value) RequestPrimitive m_createGroup(in template (value) XSD.NonNegativeInteger p_maxNrOfMembers,
685
															in template (value) ListOfURIs p_memberIds := {"NotInitialized"},
686
															in template (omit) AcpType p_accessControlPolicyIds,
687 688 689 690
															in template (omit) MemberType p_memberType := omit,
															in template (omit) ConsistencyStrategy p_consistencyStrategy := omit,
															in template (omit) ListOfURIs p_membersAccessControlPolicyIDs := omit,
															in template (omit) XSD.String p_name := "MyGroup") modifies m_create := {
691
        		requestIdentifier := testcasename() & "-m_createGroup" & f_rnd(1, 1000000),
692
        		resourceType := int9,
693
        		primitiveContent := {group_ := m_contentCreateGroup (p_maxNrOfMembers, p_memberIds, p_accessControlPolicyIds, p_memberType, p_consistencyStrategy, p_membersAccessControlPolicyIDs, p_name)}	//TODO: p_resourceId
694 695
        	};
        	
696 697 698 699 700
			/**
			 * @desc Reception template for CREATE GroupAnnc
			 */
			template RequestPrimitive mw_createGroupAnnc(template XSD.ID p_from := *, template XSD.ID p_to := ?) modifies mw_create := {
				resourceType := int10009,
701
				primitiveContent := {groupAnnc := ?}
702
			};  
703 704 705 706 707 708
			
			/**
			 * @desc Base Reception template for CREATE GroupAnnc
			 */
			template RequestPrimitive mw_createGroupAnncBase(template XSD.ID p_from := *, template XSD.ID p_to := ?) modifies mw_create := {
				resourceType := int10009,
709
				primitiveContent := {groupAnnc := mw_contentCreateGroupAnncBase}
710
			};
711
        	
712
			/**
713 714 715 716 717
			 * @desc Base CREATE request primitive for MgmtCmd resource
			 */
			template (value) RequestPrimitive m_createMgmtCmdBase modifies m_create := {
				requestIdentifier := testcasename() & "-m_createMgmtCmd" & f_rnd(1, 1000000),
				resourceType := int12,
718
				primitiveContent := {mgmtResource := m_contentCreateMgmtCmd (-,-)}
719 720
			};
			
721 722 723 724 725 726
			/**
			 * @desc Base CREATE request primitive for MgmtObj resource
			 */
			template (value) RequestPrimitive m_createMgmtObjBase modifies m_create := {
				requestIdentifier := testcasename() & "-m_createMgmtObj" & f_rnd(1, 1000000),
				resourceType := int13,
727
				primitiveContent := {mgmtResource := m_contentCreateMgmtObj (-,-)}
728 729 730 731 732 733 734 735
			};
        	
			/**
			 * @desc CREATE request primitive for MgmtObj resource
			 */
			template (value) RequestPrimitive m_createMgmtObj modifies m_create := {
				requestIdentifier := testcasename() & "-m_createMgmtObj" & f_rnd(1, 1000000),
				resourceType := int13,
736
				primitiveContent := {mgmtResource := m_contentCreateMgmtObj (-, -)}
737 738 739 740 741 742 743
			};
        	
			/**
			 * @desc Reception template for CREATE MgmtObjAnnc
			 */
			template RequestPrimitive mw_createMgmtObjAnnc(template XSD.ID p_from := *, template XSD.ID p_to := ?) modifies mw_create := {
				resourceType := int10013,
744
				primitiveContent := {announcedMgmtResource := ?}
745 746
			};  
			
747 748 749 750 751
			/**
			 * @desc Base Reception template for CREATE MgmtObjAnnc
			 */
			template RequestPrimitive mw_createMgmtObjAnncBase(template XSD.ID p_from := *, template XSD.ID p_to := ?) modifies mw_create := {
				resourceType := int10013,
752
				primitiveContent := {announcedMgmtResource := mw_contentCreateMgmtObjAnncBase}
753 754
			};  
			
755 756 757 758 759 760
			/**
			 * @desc Base CREATE request primitive for Node resource
			 */
			template (value) RequestPrimitive m_createNodeBase modifies m_create := {
				requestIdentifier := testcasename() & "-m_createNode" & f_rnd(1, 1000000),
				resourceType := int14,
761
				primitiveContent := {node := m_contentCreateNode(-, -, -) }
762 763 764 765 766 767 768 769
			};
        	
			/**
			 * @desc CREATE request primitive for Node resource
			 */
			template (value) RequestPrimitive m_createNode modifies m_create := {
				requestIdentifier := testcasename() & "-m_createNode" & f_rnd(1, 1000000),
				resourceType := int14,
770
				primitiveContent := {node := m_contentCreateNode(-,-,-) }
771 772 773 774 775 776 777
			};
        	
			/**
			 * @desc Reception template for CREATE NodeAnnc
			 */
			template RequestPrimitive mw_createNodeAnnc(template XSD.ID p_from := *, template XSD.ID p_to := ?) modifies mw_create := {
				resourceType := int10014,
778
				primitiveContent := {nodeAnnc := ?}
779
			};  
780 781 782 783
       	
			/**
			 * @desc Base CREATE request primitive for PollingChannel resource
			 */
784
			template (value) RequestPrimitive m_createPollingChannelBase modifies m_create := {
785
				requestIdentifier := testcasename() & "-m_createPollingChannel" & f_rnd(1, 1000000),
786
				resourceType := int15,
787
				primitiveContent := {pollingChannel := m_contentCreatePollingChannel (-)}
788
			};
789
        	
790
        	template (value) RequestPrimitive m_createPollingChannel(XSD.ID p_parentResourceAddress, in template (value)XSD.ID p_originatorId) modifies m_create := {
791
        		to_ := p_parentResourceAddress,
792
        		from_ := p_originatorId,
793
        		requestIdentifier := testcasename() & "-m_createPollingChannel" & f_rnd(1, 1000000),
794
        		resourceType := int15,
795
        		primitiveContent := {pollingChannel := m_contentCreatePollingChannel ()}
796 797
        	};
        	
798 799 800
			/**
			 * @desc Base CREATE request primitive for Schedule resource
			 */
801
        	template (value) RequestPrimitive m_createScheduleBase modifies m_create := {
802
        		requestIdentifier := testcasename() & "-m_createSchedule" & f_rnd(1, 1000000),
803
        		resourceType := int18,
804
        		primitiveContent := {schedule := m_contentCreateSchedule ({{"0 0 0,1,2 1 1 * *"}})}
805 806
        	};
        	
807
        	template (value) RequestPrimitive m_createSchedule(XSD.ID p_parentResourceAddress, in template (omit)  XSD.String p_name, in template (value) ScheduleEntries p_scheduleElement ) modifies m_create := {
808
        		to_ := p_parentResourceAddress,
809
        		requestIdentifier := testcasename() & "-m_createSchedule" & f_rnd(1, 1000000),
810
        		resourceType := int18,
811
        		primitiveContent := {schedule := m_contentCreateSchedule (p_scheduleElement, p_name)}
812 813
        	};
        	
814 815 816 817 818
			/**
			 * @desc Reception template for CREATE ScheduleAnnc
			 */
			template RequestPrimitive mw_createScheduleAnnc(template XSD.ID p_from := *, template XSD.ID p_to := ?) modifies mw_create := {
				resourceType := int10018,
819
				primitiveContent := {scheduleAnnc := ?}
820
			};  
821 822 823 824 825 826
			
			/**
			 * @desc Base Reception template for CREATE ScheduleAnnc
			 */
			template RequestPrimitive mw_createScheduleAnncBase(template XSD.ID p_from := *, template XSD.ID p_to := ?) modifies mw_create := {
				resourceType := int10018,
827
				primitiveContent := {scheduleAnnc := mw_contentCreateScheduleAnncBase}
828
			};  
829
        	
830
			template (value) RequestPrimitive m_createServiceSubscribedAppRule (in ListOfM2MID p_applicableCredIDs, in ListOfM2MID p_allowedAppIDs, in ListOfM2MID p_allowedAEs) modifies m_create := {
831
				requestIdentifier := testcasename() & "-m_createServiceSubscribedAppRule" & f_rnd(1, 1000000),
832
				resourceType := int19,//FIXME Is this the correct value?
833
				primitiveContent := {serviceSubscribedAppRule := m_contentCreateServiceSubscribedAppRule (p_applicableCredIDs, p_allowedAppIDs, p_allowedAEs)}
834
			};
835
        	
836 837 838 839 840 841
			/**
			 * @desc Base CREATE request primitive for ServiceSubscribedAppRule Resource
			 */
			template (value) RequestPrimitive m_createServiceSubscribedAppRuleBase modifies m_create := {
				requestIdentifier := testcasename() & "-m_createServiceSubscribedAppRuleBase" & f_rnd(1, 1000000),
				resourceType := int19,
842
				primitiveContent := {serviceSubscribedAppRule := m_contentCreateServiceSubscribedAppRuleBase}
843
			};
844 845 846 847
       	
			/**
			 * @desc Base CREATE request primitive for Subscription resource
			 */
848
			template (value) RequestPrimitive m_createSubscriptionBase modifies m_create := {
849
				requestIdentifier := testcasename() & "-m_createSubscription" & f_rnd(1, 1000000),
850
				resourceType := int23,
851
				primitiveContent := {subscription := m_contentCreateSubscription ({"NotInitialized"})}
852 853
			};
        	
854
        	template (value) RequestPrimitive m_createSubscription(XSD.ID p_parentResourceAddress, in template (omit)  XSD.String p_name, in template (value) ListOfURIs p_notificationURI := {"NotInitialized"}) modifies m_create := {
855
        		to_ := p_parentResourceAddress,
856
        		requestIdentifier := testcasename() & "-m_createSubscription" & f_rnd(1, 1000000),
857
        		resourceType := int23,
858
        		primitiveContent := {subscription := m_contentCreateSubscription (p_notificationURI, p_name)}
859
        	};
860
        	
861 862 863 864 865 866 867 868 869
			template (value) RequestPrimitive m_createSubscriptionAdvanced(	XSD.ID p_parentResourceAddress, 
																		   in template (omit)  XSD.String p_name := omit,
																		   in template (value) ListOfURIs p_notificationURI,
																		   in template (omit) EventNotificationCriteria p_eventNotificationCriteria := omit,
																		   in template (omit) XSD.PositiveInteger p_expirationCounter := omit,
																		   in template (omit) BatchNotify p_batchNotify := omit,
																		   in template (omit) XSD.Boolean p_latestNotify := omit,
																		   in template (omit) XSD.AnyURI p_subscriberURI := omit,
																		   in template (omit) NotificationContentType p_notificationContentType := int1) modifies m_createSubscription := {
870
				primitiveContent := {subscription := m_contentCreateSubscriptionAdvanced (p_notificationURI, p_name, p_eventNotificationCriteria, p_expirationCounter, p_batchNotify, p_latestNotify, p_subscriberURI, p_notificationContentType)}
871 872
			};
        	
873 874 875 876 877 878
        	/**
			 * @desc Base CREATE request primitive for Location Policy resource
			 */
			template (value) RequestPrimitive m_createLocationPolicyBase modifies m_create := {
				requestIdentifier := testcasename() & "-m_createLocationPolicy" & f_rnd(1, 1000000),
				resourceType := int10,
879
				primitiveContent := {locationPolicy := m_contentCreateLocationPolicyBase}
880 881
			};
        	
882 883
        	template (value) RequestPrimitive m_createLocationPolicy(in template (value) LocationSource p_locationSource, in template (omit) AcpType p_accessControlPolicyIds, in template (omit) XSD.Duration p_locationUpdatePeriod, in template (omit) NodeID p_locationTargetID, in template (omit) XSD.AnyURI p_locationServerAddress) modifies m_create := {
        		
884
        	  	requestIdentifier	:= testcasename() & "-m_createLocationPolicy" & f_rnd(1, 1000000), //the requestIdentifier is supposed to be set similar as "C190XX7T/001"  by prepending the AE-ID-Stem and slash(‘/’) in front of it
885
        	  	resourceType		:= int10,
886
        	  	primitiveContent	:= {locationPolicy := m_contentCreateLocationPolicy(p_locationSource, p_accessControlPolicyIds, p_locationUpdatePeriod, p_locationTargetID, p_locationServerAddress) },
887
			  	resultContent := int1//default
888
        	};
889 890 891 892 893 894
        	
			/**
			 * @desc Reception template for CREATE LocationPolicyAnnc
			 */
			template RequestPrimitive mw_createLocationPolicyAnnc(template XSD.ID p_from := *, template XSD.ID p_to := ?) modifies mw_create := {
				resourceType := int10010,
895
				primitiveContent := {locationPolicyAnnc := ?}
896 897 898 899 900 901 902
			}; 
			
			/**
			 * @desc Base Reception template for CREATE LocationPolicyAnnc
			 */
			template RequestPrimitive mw_createLocationPolicyAnncBase(template XSD.ID p_from := *, template XSD.ID p_to := ?) modifies mw_create := {
				resourceType := int10010,
903
				primitiveContent := {locationPolicyAnnc := mw_contentCreateLocationPolicyAnncBase}
904 905
			}; 
			
906
        	template (value) RequestPrimitive m_createNotification(in template (value) Representation p_resourcePresentation, in template (omit)NotificationEventType p_notifEventType, in template (omit) XSD.AnyURI p_subscriptionReference, in template (omit) XSD.AnyURI p_notifForwardingURI) modifies m_create := {
907
        	  requestIdentifier	:= testcasename() & "-m_createNotification" & f_rnd(1, 1000000),
908
        	  primitiveContent	:= {notification := m_contentCreateNotification(p_resourcePresentation, p_notifEventType, p_subscriptionReference, p_notifForwardingURI)},
909 910 911
        	  resultContent		:= int1 //default
        	  
        	};
912
        	
913 914 915 916 917
			/**
			 * @desc Reception template for SemanticDescriptor creation
			 */
			template RequestPrimitive mw_createSemanticDescriptor(template XSD.ID p_from := *, template XSD.ID p_to := ?, template SemanticDescriptor_optional p_semanticDescriptor := mw_contentCreateSemanticDescriptor) modifies mw_create := {
				resourceType := int24,
918
				primitiveContent := {semanticDescriptor := p_semanticDescriptor}
919 920
			};
			
921 922 923 924 925 926
			/**
			 * @desc Base CREATE request primitive for Stats Config resource
			 */
			template (value) RequestPrimitive m_createStatsConfigBase modifies m_create := {
				requestIdentifier := testcasename() & "-m_createStatsConfig" & f_rnd(1, 1000000),
				resourceType := int22,
927
				primitiveContent := {statsConfig := m_contentCreateStatConfigBase}
928 929 930 931 932 933 934 935
			};
			
			/**
			 * @desc Base CREATE request primitive for Stats Config resource
			 */
			template (value) RequestPrimitive m_createStatsCollectBase modifies m_create := {
				requestIdentifier := testcasename() & "-m_createStatsCollect" & f_rnd(1, 1000000),
				resourceType := int21,
936
				primitiveContent := {statsCollect := m_contentCreateStatCollectBase}
937 938 939 940 941 942 943 944
			};
			
			/**
			 * @desc Base CREATE request primitive for M2mServiceSubscriptionProfile resource
			 */
			template (value) RequestPrimitive m_createM2mServiceSubscriptionProfileBase modifies m_create := {
				requestIdentifier := testcasename() & "-m_createM2mServiceSubscriptionProfile" & f_rnd(1, 1000000),
				resourceType := int11,
945
				primitiveContent := {m2mServiceSubscriptionProfile := m_contentCreatem2mServiceSubscriptionProfileBase}
946 947
			};
			
948 949 950 951
    	}//end group Create
    	
    	group Delete {
    	
952
        	template (value) RequestPrimitive m_deleteRequest(XSD.ID p_resourceAddress, in XSD.ID p_originator := PX_SUPER_USER) := {
953
        		operation := int4,
954
        		to_ := p_resourceAddress,
955
        		from_ := p_originator,
956
        		requestIdentifier := testcasename() & "-m_deleteResource" & f_rnd(1, 1000000),
957
        		resourceType := omit,
958
        		primitiveContent := omit, 
959
				roleIDs := omit, 
960 961 962 963 964 965 966 967 968 969 970
				originatingTimestamp := omit,
				requestExpirationTimestamp := omit,
				resultExpirationTimestamp := omit,
				operationExecutionTime := omit,
				responseType := omit,
				resultPersistence := omit,
				resultContent := omit,
				eventCategory := omit,
				deliveryAggregation := omit,
				groupRequestIdentifier := omit,
				filterCriteria := omit,
971 972 973
				discoveryResultType := omit,
				tokens := omit,
				tokenIDs := omit,
974
				localTokenIDs := omit, 
975
				tokenRequestIndicator := omit
976 977 978 979

        	};
        	
    	}//end group Delete
980 981 982 983 984 985 986 987 988 989 990 991
    	
    	group Notify {
    		
			/**
			 * @desc Base NOTIFY request primitive
			 */
			template RequestPrimitive mw_notifyBase := {
				operation := int5,
				to_ := ?,
				from_ := *,
				requestIdentifier := ?,
				resourceType := *,
992
				primitiveContent := {notification := mw_contentNotificationBase},
993
				roleIDs := *,
994 995 996 997 998 999 1000 1001 1002 1003 1004 1005 1006 1007
				originatingTimestamp := *,
				requestExpirationTimestamp := *,
				resultExpirationTimestamp := *,
				operationExecutionTime := *,
				responseType := *,
				resultPersistence := *,
				resultContent := *,
				eventCategory := *,
				deliveryAggregation := *,
				groupRequestIdentifier := *,
				filterCriteria := *,
				discoveryResultType := *,
				tokens := *,
				tokenIDs := *,
1008
				localTokenIDs := *,
1009
				tokenRequestIndicator := *
1010 1011 1012 1013 1014 1015 1016 1017 1018 1019 1020
			};
			
			/**
			 * @desc Base NOTIFY request primitive
			 */
			template RequestPrimitive mw_aggregatedNotifyBase := {
				operation := int5,
				to_ := ?,
				from_ := *,
				requestIdentifier := ?,
				resourceType := *,
1021
				primitiveContent := { aggregatedNotification := ?},
1022
				roleIDs := *,
1023 1024 1025 1026 1027 1028 1029 1030 1031 1032 1033 1034 1035 1036
				originatingTimestamp := *,
				requestExpirationTimestamp := *,
				resultExpirationTimestamp := *,
				operationExecutionTime := *,
				responseType := *,
				resultPersistence := *,
				resultContent := *,
				eventCategory := *,
				deliveryAggregation := *,
				groupRequestIdentifier := *,
				filterCriteria := *,
				discoveryResultType := *,
				tokens := *,
				tokenIDs := *,
1037
				localTokenIDs := *,
1038
				tokenRequestIndicator := *
1039 1040 1041 1042 1043 1044
			};
			
			/**
			 * @desc Base NOTIFY request primitive
			 */
			
1045
			template RequestPrimitive mw_notify(in template Notification p_notification) modifies mw_notifyBase := {
1046
				primitiveContent := {notification := p_notification}
1047 1048 1049 1050 1051 1052
			};
			

			
    		
    	}//end of group Notify
1053 1054 1055
	}//end group RequestPrimitives
	
	group ContentCreate {
1056 1057 1058 1059 1060 1061 1062
		/**
		 * @desc Base primitiveContent for CREATE operation for AEAnnc resource
		 * @param p_labels Labels
		 * @param p_accessControlPolicyIds AcpIDs
		 * @param p_appId App ID
		 * @param p_nodeLink Node link
		 */
1063 1064 1065 1066 1067 1068 1069 1070 1071 1072 1073
		template AEAnnc_optional m_contentCreateAEAnnc (in template (omit)  Labels p_labels, in template (omit) AcpType p_accessControlPolicyIds, XSD.ID p_appId := PX_APP_ID, in template (omit) XSD.AnyURI p_nodeLink := omit) := {
			resourceName := omit,//O TODO 
			resourceType := omit,//NP
			resourceID := omit,//NP
			parentID := omit,//NP
			creationTime := omit,//NP
			lastModifiedTime := omit,//NP
			labels := p_labels,//O
			accessControlPolicyIDs := p_accessControlPolicyIds,//O
			expirationTime := omit,//O
			link := omit,//M TODO Put the right value
1074
			dynamicAuthorizationConsultationIDs := omit, //TODO Check whether it is optional or mandatory for create operation			
1075 1076 1077 1078 1079 1080 1081 1082 1083 1084 1085
			appName := omit,//O
			app_ID := p_appId,//M
			aE_ID := omit,//NP
			pointOfAccess := omit, //{"http://127.0.0.1:1400/monitor"},//O //{"http://192.168.1.92:18080/notifications/AE"}, // TODO: Check this => AE PoA
			ontologyRef := omit,//O
			nodeLink := p_nodeLink,//NP
			requestReachability := true,//M
			contentSerialization := omit,//O
			e2eSecInfo := omit, //O TODO Check whether it is optional or mandatory for create operation
			choice := omit//NP
		};	
1086

1087 1088 1089 1090 1091 1092 1093 1094 1095 1096 1097 1098 1099 1100 1101 1102 1103
		/**
		 * @desc Base reception template of primitiveContent for CREATE operation for AEAnnc resource
		 * @param p_labels Labels
		 * @param p_accessControlPolicyIds AcpIDs
		 * @param p_appId App ID
		 * @param p_nodeLink Node link
		 */
		template AEAnnc_optional mw_contentCreateAEAnnc (in template  Labels p_labels := ?, in template AcpType p_accessControlPolicyIds := ?) := {
    		resourceName := omit,//NA M
    		resourceType := omit,//NA M
    		resourceID := omit,//NA M
    		parentID := omit,//NA M
    		creationTime := omit,//NA M
    		lastModifiedTime := omit,//NA M
    		labels := p_labels,//MA
    		accessControlPolicyIDs := p_accessControlPolicyIds,//MA
    		expirationTime := ?,//MA M
1104 1105
    		link := ?,//M
    		dynamicAuthorizationConsultationIDs := omit, //OA			
1106 1107 1108 1109 1110 1111 1112 1113 1114 1115
			appName := omit,//OA
			app_ID := omit,//OA
			aE_ID := omit,//OA
			pointOfAccess := omit, //OA {"http://127.0.0.1:1400/monitor"},//O //{"http://192.168.1.92:18080/notifications/AE"}, // TODO: Check this => AE PoA
			ontologyRef := omit,//OA
			nodeLink := omit,//OA
			requestReachability := omit,//OA
			contentSerialization := omit,//OA
			e2eSecInfo := ?, //MA
			choice := omit//NA
1116
		};	
1117
		
1118 1119 1120
    	/**
    	 * @desc Base primitiveContent for CREATE operation for AE resource
    	 * @param p_name Resource name
1121
    	 * @param p_accessControlPolicyIds ACP IDs for the AE
1122
    	 */
1123
    	template (value) AE_optional m_contentCreateAe (in template (omit) AcpType p_accessControlPolicyIds, in template (omit)  XSD.String p_name := c_defaultAeResourceName, in template (omit) XSD.ID p_appId := PX_APP_ID, in template (omit) PoaList p_poaList) := {
1124

1125 1126 1127 1128 1129 1130 1131
			resourceName := p_name,//O
			resourceType := omit,//NP
			resourceID := omit,//NP
			parentID := omit,//NP
			creationTime := omit,//NP
			lastModifiedTime := omit,//NP
			labels := omit,//O
1132
			accessControlPolicyIDs := p_accessControlPolicyIds,//O
1133
			expirationTime := omit,//O
1134
    		dynamicAuthorizationConsultationIDs := omit, //O
1135 1136 1137
    		announceTo := omit,//O
    		announcedAttribute := omit,//O
    		appName := omit,//O
1138
			app_ID := p_appId,//M
1139
    		aE_ID := omit,//NP
1140
    		pointOfAccess := p_poaList, //O {"http://127.0.0.1:1400/monitor"},//{"http://192.168.1.92:18080/notifications/AE"}, // TODO: Check this => AE PoA
1141 1142
    		ontologyRef := omit,//O
    		nodeLink := omit,//NP
1143
    		requestReachability := true,//M
1144
    		contentSerialization := omit,//O
1145
			e2eSecInfo := omit, //O
1146 1147
    		choice := omit//NP
    	};	
1148
    	
1149 1150 1151 1152 1153
    	/**
    	 * @desc Base primitiveContent for CREATE operation for AccessControlPolicy resource
    	 * @param p_name Resource name
    	 * @param p_acor Allowed originators
    	 * @param p_allowedOperations Allowed operations
1154
    	 */
1155
    	template (value) AccessControlPolicy_optional m_contentCreateAcp (in template (omit) XSD.String p_name := c_defaultAccessControlPolicyResourceName, in template (value) ListOfURIs p_acor := PX_ACOR, in template (value) AccessControlOperations p_allowedOperations := int63 ) := {
1156 1157 1158 1159 1160 1161 1162 1163 1164 1165
			resourceName := p_name,//O
			resourceType := omit,//NP
			resourceID := omit,//NP
			parentID := omit,//NP
			creationTime := omit,//NP
			lastModifiedTime := omit,//NP
			labels := omit,//O
			expirationTime := omit,//O
			announceTo := omit,//O
			announcedAttribute := omit,//O
1166
			privileges := {
1167
				accessControlRule_list := {valueof(m_createAcr(p_acor, p_allowedOperations))}
1168
			},//M
1169
			selfPrivileges := {
1170
				accessControlRule_list := {valueof(m_createAcr(p_acor, int63))}
1171 1172
			},//M
			choice := omit //NP
1173
		};
1174
		
1175 1176 1177 1178 1179 1180 1181 1182 1183 1184 1185 1186 1187 1188 1189 1190 1191 1192 1193
		/**
		 * @desc Base reception template of primitiveContent for CREATE operation for AccessControlPolicyAnnc resource
		 * @param p_labels Labels
		 */
		template AccessControlPolicyAnnc_optional mw_contentCreateAcpAnnc (in template (omit)  Labels p_labels := omit) := {
			resourceName := omit,//NA M
			resourceType := omit,//NA M
			resourceID := omit,//NA M
			parentID := omit,//NA M
			creationTime := omit,//NA M
			lastModifiedTime := omit,//NA M
			labels := p_labels,//MA
			expirationTime := ?,//MA M
			link := ?,//M
			privileges := *,//MA
			selfPrivileges := *,//MA
			choice := omit//NA
		};	
		
1194 1195 1196
		template (value) AccessControlRule m_createAcr (in template (value) ListOfURIs p_acor, in template (value) AccessControlOperations p_allowedOperations) := {
			accessControlOriginators := p_acor,//{"*"},//{PX_AE_ID_STEM}, //{"admin:admin"},
			accessControlOperations := p_allowedOperations,
1197 1198 1199
			accessControlContexts_list := {},
			accessControlAuthenticationFlag := omit, 
			accessControlObjectDetails_list := {}
1200
		}
1201
    	
1202
		/*template (value) CSEBase_optional m_contentCreateCSEBase (in template (value) ServiceSubscribedAppRule p_serviceSubscribedAppRule) := {
1203
			resourceName := omit,
1204
			resourceType := omit,
1205 1206 1207 1208 1209 1210 1211 1212 1213 1214 1215
			resourceID := omit,
			parentID := omit,
			creationTime := omit,
			lastModifiedTime := omit,
			labels := omit,
			accessControlPolicyIDs := omit,
			cseType := omit,
			cSE_ID := omit,
			supportedResourceType := omit,
			pointOfAccess := omit,
			nodeLink := omit,
1216
			e2eSecInfo := omit, 
1217 1218 1219 1220
			choice := {
				choice_list := {{
				  serviceSubscribedAppRule := p_serviceSubscribedAppRule
				}}
1221
			}
1222 1223 1224 1225 1226 1227 1228 1229 1230 1231 1232 1233 1234 1235 1236 1237 1238 1239 1240 1241 1242 1243 1244
		}*/
		
		/**
		 * @desc Base primitiveContent for CREATE operation for CSEBase resource
		 * @param p_name Resource name
		 */
		template (value) CSEBase_optional m_contentCreateCSEBase (in template (omit) XSD.String p_name := c_defaultResourceName):= {
			resourceName := p_name,//O
			resourceType := omit,
			resourceID := omit,
			parentID := omit,
			creationTime := omit,
			lastModifiedTime := omit,
			labels := omit,
			accessControlPolicyIDs := omit,
			cseType := omit,
			cSE_ID := omit,
			supportedResourceType := omit,
			pointOfAccess := omit,
			nodeLink := omit,
			e2eSecInfo := omit, 
			choice := omit
		};
1245
    	
1246 1247 1248 1249
    	/**
    	 * @desc Base primitiveContent for CREATE operation for Group resource
    	 * @param p_maxNrOfMembers Max number of members
    	 * @param p_memberIds Member IDs
1250
    	 * @param p_accessControlPolicyIds ACP IDs for the Group
1251
    	 * @param p_name Resource name
1252
    	 */
1253
    	template (value) Group_optional m_contentCreateGroup (	in template (value) XSD.NonNegativeInteger p_maxNrOfMembers,
1254
    															in template (value) ListOfURIs p_memberIds,
1255
    															in template (omit) AcpType p_accessControlPolicyIds,
1256 1257 1258
    															in template (omit) MemberType p_memberType := omit,
    															in template (omit) ConsistencyStrategy p_consistencyStrategy := omit,
    															in template (omit) ListOfURIs p_membersAccessControlPolicyIDs := omit,
1259
																in template (omit) XSD.String p_name := c_defaultGroupResourceName) := {
1260
			resourceName := p_name,//O
1261 1262 1263 1264 1265 1266
			resourceType := omit,//NP
			resourceID := omit,//NP
			parentID := omit,//NP
			creationTime := omit,//NP
			lastModifiedTime := omit,//NP
			labels := omit,//O
1267
			accessControlPolicyIDs := p_accessControlPolicyIds,//O
1268
			expirationTime := omit,//O
1269
    		dynamicAuthorizationConsultationIDs := omit, //O
1270 1271 1272
			announceTo := omit,//O
			announcedAttribute := omit,//O
			creator := omit,//O
1273
			memberType := p_memberType,//O
1274 1275 1276
			currentNrOfMembers := omit,//NP
			maxNrOfMembers := p_maxNrOfMembers,//M
			memberIDs := p_memberIds,//M
1277
			membersAccessControlPolicyIDs := p_membersAccessControlPolicyIDs,//O
1278
			memberTypeValidated := omit,//NP
1279
			consistencyStrategy := p_consistencyStrategy,//O
1280
			groupName := omit,//O
1281
			semanticSupportIndicator := omit,//O
1282
			choice := omit//NP
1283 1284
    	};  
    	
1285 1286 1287
		  /**
		  * @desc Base reception template of primitiveContent for CREATE operation for GroupAnnc resource
		  */
1288
		  template GroupAnnc_optional mw_contentCreateGroupAnncBase := {
1289 1290 1291 1292 1293 1294 1295 1296 1297 1298 1299 1300 1301 1302 1303 1304 1305 1306 1307
			  resourceName := omit,//NA M
			  resourceType := omit,//NA M
			  resourceID := omit,//NA M
			  parentID := omit,//NA M
			  creationTime := omit,//NA M
			  lastModifiedTime := omit,//NA M
			  labels := ?,//MA
			  accessControlPolicyIDs := ?,//MA
			  expirationTime := ?,//MA M
			  link := ?,
			  dynamicAuthorizationConsultationIDs := *, //OA
			  memberType := *, //OA
			  currentNrOfMembers := *, //OA
			  maxNrOfMembers := *, //OA
			  memberIDs := *, //OA
			  membersAccessControlPolicyIDs := *, //OA
			  memberTypeValidated := *, //OA
			  consistencyStrategy := *, //OA
			  groupName := *, //OA
1308
			  semanticSupportIndicator := *,//OA
1309 1310 1311
			  choice := omit //NA
		  };
    	
1312 1313 1314 1315 1316
		/**
		 * @desc Base primitiveContent for CREATE operation for MgmtObj resource
		 * @param p_name Resource name
		 * @param p_accessControlPolicyIds ACP IDs for the AE
		 */
1317
		template (value) MgmtResource_optional m_contentCreateMgmtObj (in template (omit) AcpType p_accessControlPolicyIds := omit, in template (omit)  XSD.String p_name := c_defaultMgmtObjResourceName) := {
1318 1319 1320 1321 1322 1323 1324 1325 1326 1327 1328 1329 1330 1331 1332 1333 1334 1335 1336
			
			resourceName := p_name,//O
			resourceType := omit,//NP
			resourceID := omit,//NP
			parentID := omit,//NP
			creationTime := omit,//NP
			lastModifiedTime := omit,//NP
			labels := omit,//O
			accessControlPolicyIDs := p_accessControlPolicyIds,//O
			expirationTime := omit,//O
			dynamicAuthorizationConsultationIDs := omit, //O
			announceTo := omit,//O
			announcedAttribute := omit,//O
			mgmtDefinition := omit,//O
			objectIDs := omit,//O
			objectPaths := omit,//O
			description := omit//O
		};	  	
		
1337 1338 1339 1340 1341 1342 1343 1344 1345 1346 1347 1348 1349 1350 1351 1352 1353 1354 1355 1356 1357 1358 1359 1360 1361
		/**
		 * @desc Base primitiveContent for CREATE operation for MgmtCmd resource
		 * @param p_name Resource name
		 * @param p_accessControlPolicyIds ACP IDs for the AE
		 */
		template (value) MgmtResource_optional m_contentCreateMgmtCmd (in template (omit) AcpType p_accessControlPolicyIds := omit, in template (omit)  XSD.String p_name := c_defaultMgmtCmdResourceName) := {
			
			resourceName := p_name,//O
			resourceType := omit,//NP
			resourceID := omit,//NP
			parentID := omit,//NP
			creationTime := omit,//NP
			lastModifiedTime := omit,//NP
			labels := omit,//O
			accessControlPolicyIDs := p_accessControlPolicyIds,//O
			expirationTime := omit,//O
			dynamicAuthorizationConsultationIDs := omit, //O
			announceTo := omit,//O
			announcedAttribute := omit,//O
			mgmtDefinition := omit,//O
			objectIDs := omit,//O
			objectPaths := omit,//O
			description := omit//O
		};
		
1362 1363 1364
		/**
		 * @desc Base reception template of primitiveContent for CREATE operation for MgmtObjAnnc resource
		 */
1365
		template AnnouncedMgmtResource_optional mw_contentCreateMgmtObjAnncBase := {
1366 1367 1368 1369 1370 1371 1372 1373 1374 1375 1376 1377 1378 1379 1380 1381 1382
			resourceName := omit,//NA M
			resourceType := omit,//NA M
			resourceID := omit,//NA M
			parentID := omit,//NA M
			creationTime := omit,//NA M
			lastModifiedTime := omit,//NA M
			labels := ?,//MA
			accessControlPolicyIDs := ?,//MA
			expirationTime := ?,//MA M
			link := ?,
			dynamicAuthorizationConsultationIDs := *, //OA
			mgmtDefinition := ?, //MA
			objectIDs := *, //OA
			objectPaths := *, //OA
			description := * //OA
		};
		
1383 1384 1385 1386 1387
		/**
		 * @desc Base primitiveContent for CREATE operation for Node resource
		 * @param p_name Resource name
		 * @param p_accessControlPolicyIds ACP IDs for the AE
		 */
1388
		template (value) Node_optional m_contentCreateNode (in template (omit) AcpType p_accessControlPolicyIds := omit, in template (omit)  XSD.String p_name := c_defaultNodeResourceName, in template (omit) XSD.ID p_nodeId := "NodeID") := {//TODO Create PX for NodeID
1389 1390 1391 1392 1393 1394 1395 1396 1397 1398 1399 1400 1401 1402 1403
			
			resourceName := p_name,//O
			resourceType := omit,//NP
			resourceID := omit,//NP
			parentID := omit,//NP
			creationTime := omit,//NP
			lastModifiedTime := omit,//NP
			labels := omit,//O
			accessControlPolicyIDs := p_accessControlPolicyIds,//O
			expirationTime := omit,//O
			dynamicAuthorizationConsultationIDs := omit, //O
			announceTo := omit,//O
			announcedAttribute := omit,//O
			nodeID := p_nodeId,//M
			hostedCSELink := omit,//O
1404
			mgmtClientAddress := omit,//O
1405 1406 1407
			choice := omit//O
		};	  	
		
1408
    	
1409 1410
    	/**
    	 * @desc Base primitiveContent for CREATE operation for PollingChannel resource
1411
    	 * @param p_accessControlPolicyIds ACP IDs for the PollingChannel
1412
    	 * @param p_name Resource name
1413
    	 */
1414
    	template (value) PollingChannel_optional m_contentCreatePollingChannel (in template (omit) XSD.String p_name := c_defaultPollingChannelResourceName) := {
1415
			resourceName := p_name,//O
1416 1417 1418 1419 1420 1421
            resourceType := omit,//NP
            resourceID := omit,//NP
            parentID := omit,//NP
            creationTime := omit,//NP
            lastModifiedTime := omit,//NP
            labels := omit,//O
1422
            expirationTime := omit//O
1423
    	};    	
1424
    	
1425 1426 1427 1428
    	/**
    	 * @desc Base primitiveContent for CREATE operation for Schedule resource
    	 * @param p_scheduleElement Schedule
    	 * @param p_name Resource name
1429 1430
    	 */
    	template (value) Schedule_optional m_contentCreateSchedule (in template (value) ScheduleEntries p_scheduleElement,
1431
																	in template (omit) XSD.String p_name := c_defaultScheduleResourceName) := {
1432
			resourceName := p_name,//O
1433 1434 1435 1436 1437 1438 1439 1440 1441 1442 1443
			resourceType := omit,//NP
			resourceID := omit,//NP
			parentID := omit,//NP
			creationTime := omit,//NP
			lastModifiedTime := omit,//NP
			labels := omit,//O
			expirationTime := omit,//O
			announceTo := omit,//O
			announcedAttribute := omit,//O
			scheduleElement := p_scheduleElement,//M
			choice := omit//NP
1444 1445 1446 1447 1448
    	};  
    	
		/**
		 * @desc Base reception template of primitiveContent for CREATE operation for ScheduleAnnc resource
		 */
1449
		template ScheduleAnnc_optional mw_contentCreateScheduleAnncBase := {
1450 1451 1452 1453 1454 1455 1456 1457 1458 1459 1460
			resourceName := omit,//NA M
			resourceType := omit,//NA M
			resourceID := omit,//NA M
			parentID := omit,//NA M
			creationTime := omit,//NA M
			lastModifiedTime := omit,//NA M
			labels := ?,//MA
			expirationTime := ?,//MA M
			link := ?,
			scheduleElement := * //OA
		};  	
1461
    	
1462
		template (value) ServiceSubscribedAppRule_optional m_contentCreateServiceSubscribedAppRule (in ListOfM2MID p_applicableCredIDs, in ListOfM2MID p_allowedAppIDs, in ListOfM2MID p_allowedAEs) := {
1463 1464 1465 1466 1467 1468