[identity] Add function to add new device to the list
Summary:
Added a function that transactionally adds a new device to the device list and generate a new devicelist version. Details in D10219 where I used simplified version of this diff as a test plan.
Depends on D10219
Test Plan:
Actually this function is extended version of the function in D10219 test plan. Test plans overlap, I just tested one more scenario:
- Called this function twice - first one succeeded, second one failed with error message "Device already exists"
Reviewers: varun, michal
Reviewed By: varun
Subscribers: ashoat, tomek
Differential Revision: https://phab.comm.dev/D10220