Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

actionType metadata: delete support #2591

Open
fgalan opened this issue Oct 10, 2016 · 5 comments
Open

actionType metadata: delete support #2591

fgalan opened this issue Oct 10, 2016 · 5 comments
Assignees

Comments

@fgalan
Copy link
Member

fgalan commented Oct 10, 2016

Upon completion of #1494, the actionType with value delete must be supported.

Once this issue gets implemented, the following needs to be removed inthe implementation notes:

actionType metadata

From NGSIv2 specification section "Special metadata in notifications", regarding actionType metadata:

Its value depend on the request operation type: update for updates, append for creation and delete for deletion. Its type is always Text.

Current Orion implementation supports "update" and "append". The "delete" case will be supported upon completion of this issue.

Implementation notes:

Have a look to the skip field in ContextAttribute class and how it is used to mark an attribute as deleted in the entity memory image that is keep during the update process. It may be useful at actionType metadata generation time in order to see which attribute were deleted.

static void deleteAttrInNotifyCer
(
  ContextElementResponse* notifyCerP,
  ContextAttribute*       targetAttr
)
{  
  for (unsigned int ix = 0; ix < notifyCerP->contextElement.contextAttributeVector.size(); ix++)
  {
    ContextAttribute* caP = notifyCerP->contextElement.contextAttributeVector[ix];
    if (caP->name == targetAttr->name)
    {
      caP->skip = true;
    }
  }
}
@fgalan fgalan changed the title previousValue = delete support actionType metadata: delete support Oct 10, 2016
@Anjali-NEC
Copy link
Contributor

Anjali-NEC commented Jul 18, 2022

Hi @fgalan sir,

I would like to work on this issue, please let me know this issue still need to be fix or not?
Thanks

@fgalan
Copy link
Member Author

fgalan commented Jul 18, 2022

Yes, the issue is still valid. After the recent completion of #1494 it is a good moment to address it.

Thanks for your willingness to work on it!

@Anjali-NEC
Copy link
Contributor

@fgalan

As per my understanding we need to support delete actionType in Special metadata in notifications
Currently actionType support only on the request operation type: update and append

So, we need to add actionType delete for delete operation in the notifications for providing more information about the deleted attribute.

I am referring the below document for same:

## Special metadata in notifications

Please confirm my understanding.

@fgalan
Copy link
Member Author

fgalan commented Aug 5, 2022

doc/manuals/orion-api.md section ## actionType metadata should be removed upon completing this issue.

@fgalan
Copy link
Member Author

fgalan commented Aug 5, 2022

@fgalan

As per my understanding we need to support delete actionType in Special metadata in notifications Currently actionType support only on the request operation type: update and append

So, we need to add actionType delete for delete operation in the notifications for providing more information about the deleted attribute.

I am referring the below document for same:

## Special metadata in notifications

Please confirm my understanding.

I think your understanding is correct. Thanks!

Anjali-NEC added a commit to Anjali-NEC/fiware-orion that referenced this issue Aug 8, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants