valueof required for the assignment of template value to a variable

Signed-off-by: Miguel Angel Reina Ortega's avatarreinaortega <miguelangel.reinaortega@etsi.org>
parent 3bba162d
......@@ -2051,37 +2051,27 @@ module OneM2M_Functions {
}
} else if (p_resourceType == int10002 and ispresent (p_resource)) { //AE Annc
if(ischosen(p_resource.aEAnnc)) {
v_myResource.aEAnnc.expirationTime := p_resource.aEAnnc.expirationTime;
v_myResource.aEAnnc.accessControlPolicyIDs := p_resource.aEAnnc.accessControlPolicyIDs;
v_myResource.aEAnnc.labels := p_resource.aEAnnc.labels;
}
v_myResource.aEAnnc := valueof(p_resource.aEAnnc);
}
} else if (p_resourceType == int10001 and ispresent (p_resource)) { //Acp Annc
if(ischosen(p_resource.accessControlPolicyAnnc)) {
v_myResource.accessControlPolicyAnnc.expirationTime := p_resource.accessControlPolicyAnnc.expirationTime;
v_myResource.accessControlPolicyAnnc.labels := p_resource.accessControlPolicyAnnc.labels;
v_myResource.accessControlPolicyAnnc.privileges := p_resource.accessControlPolicyAnnc.privileges;
v_myResource.accessControlPolicyAnnc.selfPrivileges := p_resource.accessControlPolicyAnnc.selfPrivileges;
v_myResource.accessControlPolicyAnnc := valueof(p_resource.accessControlPolicyAnnc);
}
} else if (p_resourceType == int10003 and ispresent (p_resource)) { //Container Annc
if(ischosen(p_resource.containerAnnc)) {
v_myResource.containerAnnc.expirationTime := p_resource.containerAnnc.expirationTime;
v_myResource.containerAnnc.accessControlPolicyIDs := p_resource.containerAnnc.accessControlPolicyIDs;
v_myResource.containerAnnc.labels := p_resource.containerAnnc.labels;
v_myResource.containerAnnc := valueof(p_resource.containerAnnc);
}
} else if (p_resourceType == int10009 and ispresent (p_resource)) { //Group Annc
if(ischosen(p_resource.groupAnnc)) {
v_myResource.groupAnnc.expirationTime := p_resource.groupAnnc.expirationTime;
v_myResource.groupAnnc.accessControlPolicyIDs := p_resource.groupAnnc.accessControlPolicyIDs;
v_myResource.groupAnnc.labels := p_resource.groupAnnc.labels;
v_myResource.groupAnnc := valueof(p_resource.groupAnnc);
}
} else if (p_resourceType == int10014 and ispresent (p_resource)) { //ContentInstance Annc
if(ischosen(p_resource.contentInstanceAnnc)) {
v_myResource.contentInstanceAnnc.expirationTime := p_resource.contentInstanceAnnc.expirationTime;
v_myResource.contentInstanceAnnc.labels := p_resource.contentInstanceAnnc.labels;
v_myResource.contentInstanceAnnc := valueof(p_resource.contentInstanceAnnc);
}
} else if (p_resourceType == int1 and ispresent (p_resource)) { //Acp Resource
if(ischosen (p_resource.accessControlPolicy)){
v_myResource.accessControlPolicy := valueof(p_resource.accessControlPolicy);
v_myResource.accessControlPolicy := valueof(p_resource.accessControlPolicy);
if(not(ispresent(p_resource.accessControlPolicy.resourceName))) {
v_myResource.accessControlPolicy.resourceName := "accessControlPolicy" & int2str(v_resourceIndex);
......@@ -2090,7 +2080,6 @@ module OneM2M_Functions {
v_myResource.accessControlPolicy.resourceType := p_resourceType;
v_myResource.accessControlPolicy.resourceID := "accessControlPolicy" & int2str(v_resourceIndex);
v_myResource.accessControlPolicy.parentID := f_getResourceId(vc_localResourcesList[p_parentIndex].resource);
v_myResource.accessControlPolicy.labels := p_resource.accessControlPolicy.labels;
v_myResource.accessControlPolicy.creationTime := fx_generateTimestamp();
if(not(ispresent(p_resource.accessControlPolicy.expirationTime))) {
v_myResource.accessControlPolicy.expirationTime := "20301231T012345";
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment