private void populateUnityAccessProfileForSystem(AccessProfile accessProfile,StorageSystem storageDevice){
  URI providerUri=storageDevice.getActiveProviderURI();
  if (!NullColumnValueGetter.isNullURI(providerUri)) {
    StorageProvider provider=_dbClient.queryObject(StorageProvider.class,providerUri);
    accessProfile.setSystemType(storageDevice.getSystemType());
    accessProfile.setIpAddress(provider.getIPAddress());
    accessProfile.setUserName(provider.getUserName());
    accessProfile.setPassword(provider.getPassword());
    accessProfile.setserialID(storageDevice.getSerialNumber());
    accessProfile.setPortNumber(provider.getPortNumber());
    accessProfile.setLastSampleTime(0L);
  }
 else {
    accessProfile.setSystemType(storageDevice.getSystemType());
    accessProfile.setIpAddress(storageDevice.getIpAddress());
    accessProfile.setUserName(storageDevice.getUsername());
    accessProfile.setPassword(storageDevice.getPassword());
    accessProfile.setserialID(storageDevice.getSerialNumber());
    accessProfile.setPortNumber(storageDevice.getPortNumber());
    accessProfile.setLastSampleTime(0L);
  }
}

private void populateUnityAccessProfileForSystem ( AccessProfile accessProfile , StorageSystem storageDevice ) { URI providerUri = storageDevice . getActiveProviderURI ( ) ; if ( ! NullColumnValueGetter . isNullURI ( providerUri ) ) { StorageProvider provider = _dbClient . queryObject ( StorageProvider . class , providerUri ) ; accessProfile . setSystemType ( storageDevice . getSystemType ( ) ) ; accessProfile . setIpAddress ( provider . getIPAddress ( ) ) ; accessProfile . setUserName ( provider . getUserName ( ) ) ; accessProfile . setPassword ( provider . getPassword ( ) ) ; accessProfile . setserialID ( storageDevice . getSerialNumber ( ) ) ; accessProfile . setPortNumber ( provider . getPortNumber ( ) ) ; accessProfile . setLastSampleTime ( 0L ) ; } else { accessProfile . setSystemType ( storageDevice . getSystemType ( ) ) ; accessProfile . setIpAddress ( storageDevice . getIpAddress ( ) ) ; accessProfile . setUserName ( storageDevice . getUsername ( ) ) ; accessProfile . setPassword ( storageDevice . getPassword ( ) ) ; accessProfile . setserialID ( storageDevice . getSerialNumber ( ) ) ; accessProfile . setPortNumber ( storageDevice . getPortNumber ( ) ) ; accessProfile . setLastSampleTime ( 0L ) ; } }
populate access profile for storage system . if it has active provider , it will populate the access profile from provider info , otherwise , it will populate the access profile from the storage system .
