/// <summary> /// Initializes the device. /// </summary> protected virtual void InitializeDevice() { try { Device = DeviceConstructor.Create(DeviceInfo); var preparationManager = DevicePreparationManagerFactory.Create(Device); preparationManager.InitializeDevice(AuthProvider != AuthenticationProvider.Skip); _collectMemoryManager = new CollectMemoryManager(Device, DeviceInfo); } catch (Exception ex) { // Make sure the device is disposed, if necessary if (Device != null) { Device.Dispose(); Device = null; } ExecutionServices.SessionRuntime.ReportAssetError(DeviceInfo); // Log the error and re-throw. ExecutionServices.SystemTrace.LogError(ex); throw; } }
protected override PluginExecutionResult ExecuteScan(IDevice device, IDeviceInfo deviceInfo) { //var result = new PluginExecutionResult(PluginResult.Passed); var result = new PluginExecutionResult(PluginResult.Failed, "Automation Failure", "Device workflow error."); try { _collectMemoryManager = new CollectMemoryManager(device, deviceInfo); result = base.ExecuteScan(device, deviceInfo); } finally { _collectMemoryManager.CollectDeviceMemoryProfile(_activityData.DeviceMemoryProfilerConfig, "ScanToHpcr"); } return(result); }
/// <summary> /// Executes the scan job using the specified device. /// </summary> /// <param name="device">The device.</param> /// <param name="deviceInfo">The device information.</param> /// <returns> /// The result of execution. /// </returns> protected override PluginExecutionResult ExecuteScan(IDevice device, IDeviceInfo deviceInfo) { var result = new PluginExecutionResult(PluginResult.Failed, "Automation Failure", "Device workflow error."); ScanLog.JobEndStatus = "Failed"; try { _collectMemoryManager = new CollectMemoryManager(device, deviceInfo); result = base.ExecuteScan(device, deviceInfo); } finally { SetJobEndStatus(result); //collectMemoryManager.CollectDeviceMemoryProfile(_activityData.DeviceMemoryProfilerConfig, "AutoStore"); } return(result); }
/// <summary> /// Initializes the device. /// </summary> protected override void InitializeDevice() { try { Device = DeviceConstructor.Create(DeviceInfo); _geniusBytesApp = GeniusBytesAppFactory.Create(Device); var preparationManager = new GeniusBytesPreparationManager((JediOmniDevice)Device, _geniusBytesApp); preparationManager.InitializeDevice(false); _collectMemoryManager = new CollectMemoryManager(Device, DeviceInfo); } catch (Exception ex) { // Make sure the device is disposed, if necessary if (Device != null) { Device.Dispose(); Device = null; } // Log the error and re-throw. ExecutionServices.SystemTrace.LogError(ex); throw; } }