question: public static Operation createOperationToUpdateOrCreateNetworkInterface ( ComputeState existingComputeState , NetworkInterfaceState networkInterface , List < String > tenantLinks , StatelessService service , boolean isPublic ) { String existingInterfaceLink = getExistingNetworkInterfaceLink ( existingComputeState , isPublic ) ; Operation networkInterfaceOperation = null ; if ( existingInterfaceLink == null ) { networkInterfaceOperation = createPostOperation ( service , networkInterface , NetworkInterfaceService . FACTORY_LINK ) ; } else { networkInterfaceOperation = createPatchOperation ( service , networkInterface , existingInterfaceLink ) ; } return networkInterfaceOperation ; }
target:  Compares the IP addresses of the instance on AWS and maps those to the network interfaces in the system. 1) If an existing mapping is found for a private or public interface then it is updated. 2) Else a new mapping is creating. 3) The string "public-interface/private-interfaces" is embedded in the document self link along with the UUID to avoid collisions while save some extra lookups during updates.