question: private void createHost ( Network network , List < ScaleIOSDC > allSDCs ) { List < URI > tenantOrgList = _dbClient . queryByType ( TenantOrg . class , true ) ; Iterator < TenantOrg > it = _dbClient . queryIterativeObjects ( TenantOrg . class , tenantOrgList ) ; List < String > initiatorsToAddToNetwork = new ArrayList < > ( ) ; URI rootTenant = null ; while ( it . hasNext ( ) ) { TenantOrg tenantOrg = it . next ( ) ; if ( TenantOrg . isRootTenant ( tenantOrg ) ) { rootTenant = tenantOrg . getId ( ) ; break ; } } for ( ScaleIOSDC sdc : allSDCs ) { String ip = sdc . getSdcIp ( ) ; String guid = sdc . getSdcGuid ( ) ; Host host = findByNativeGuid ( guid ) ; if ( host == null ) { host = findOrCreateByIp ( rootTenant , ip , guid ) ; } Initiator initiator = createInitiator ( host , ip , sdc . getId ( ) ) ; if ( ! network . hasEndpoint ( initiator . getInitiatorPort ( ) ) ) { initiatorsToAddToNetwork . add ( initiator . getInitiatorPort ( ) ) ; } } if ( ! initiatorsToAddToNetwork . isEmpty ( ) ) { network . addEndpoints ( initiatorsToAddToNetwork , true ) ; _dbClient . updateAndReindexObject ( network ) ; } }
target:  Create a Host object for every SDC that is found on the system. Create a single initiator for the host in the specified Network.