Hi,
To unallocate an IPv4Address in the inventory, we need to set the state to 1 (representing 'unallocated').
However, using LINQPad, I can see that this entitySet has multiple relations to for example the VirtualMachine entitySet (giving the VM's that are/were using this IP).
So when unallocating, I can lookup the IPv4Address entity of the IP address by setting the changed state in the update properties and then do the call to updateVCACEntity(...).
Should I do anything for the updateLinks?? Should I push a vmEntity into it that has value 'null' maybe?
Also, using a call to "vCACEntityManager.readModelEntitiesBySystemQuery", would I be able to read all IPv4Addresses of a certain Network Profile, that are in state == 1?
If I was to query this directly in the SQL database, I could lookup the id of the corresponding network profile and use that in the query on the IPv4Address table, as that contains a FK to the network profile table. However in the object model that relation does not seem to be represented with a property.
Thus far this I solved this by retrieving the network profile entity, then using getLink which gives me *ALL* IP's of that profile and looping through them to find the ones that are for example in state==1. (I can't add a filter to getLink.)
Thanks,
Ed