dsccommunity / StorageDsc

DSC resource module is used to manage storage on Windows Servers.
https://dsccommunity.org
MIT License
66 stars 51 forks source link

OpticalDiskDriveLetter : Rework detection method for mounted ISO - Fixes #285 #286

Closed PlagueHO closed 5 months ago

PlagueHO commented 5 months ago

Pull Request (PR) description

This PR fixes #285 by reworking the method of detecting whether an optical disk drive can be managed by this resource. The previous method of detection was unreliable. The new method of detection is described in the README.md:

Detection of Manageable Optical Disk Drives

This resource is intended to manage permanent optical disk drives that are either physically present in the system or are presented to the system by hypervisors or other virtualization platforms. It is not intended to be used to manage temporary optical disk drives that are created when mounting ISOs on Windows Server 2012 and newer. Mounted ISO drives should be managed by the DSC_MountImage resource.

To detect whether a drive is a mounted ISO the following logic is used. For a CIM instance of a cimv2:Win32_CDROMDrive class representing an optical disk drive:

  1. Get the drive letter assigned to the drive in the cimv2:Win32_CDROMDrive. If the drive letter is set, query the volume information using the `cimv2:Win32_Volume CIM class for the device using drive letter and get the device path.
  2. If the drive letter is not set, then just create the device path from the drive property.
  3. Look up the disk image using the device path using the Get-DiskImage cmdlet.
  4. If no error occurs then the device is a mounted ISO and should not be used with this resource. If a "The specified disk is not a virtual disk." error occurs then it is not an ISO and can be managed by this resource.

The PR also makes some changes to the CI pipeline to resolve a known packaging issue on Linux. Also corrected a problem with Unit tests weren't being executed on a Windows Server 2022 host (only Windows Server 2019).

This Pull Request (PR) fixes the following issues

Task list

@johlju - apologies for the size of this one. I reworked the tests a bit to clean them up and make them clearer, which resulted in a lot of line changes.

Running the integration tests is being done on Hyper-V VMs and Azure VMs and will post results here as well.


This change is Reviewable

PlagueHO commented 5 months ago

Integration tests executed correctly on a Windows Server 2019 Hyper-V VM (Gen2) with 2 x Virtual DVDs and 1 x mounted ISO

PS C:\source\StorageDsc> Get-CimInstance -ClassName Win32_CDROMDrive

Caption Drive Manufacturer VolumeName


Microsoft Virtual DVD-ROM E: (Standard CD-ROM drives) Core Microsoft Virtual DVD-ROM Volume{65b8c367-ddc4-11ee-bc42-806e6f6e6963} (Standard CD-ROM drives) Microsoft Virtual DVD-ROM Volume{7cf7b888-ddc4-11ee-bc43-00155d018801} (Standard CD-ROM drives)

Drive with volume 7cf7b888-ddc4-11ee-bc43-00155d018801 cannot be managed because of being an Mounted ISO.

PS C:\source\StorageDsc> invoke-pester .\tests\Integration\DSC_OpticalDiskDriveLetter.Integration.Tests.ps1
Pester v4.10.1
Executing all tests in '.\tests\Integration\DSC_OpticalDiskDriveLetter.Integration.Tests.ps1'

Executing script .\tests\Integration\DSC_OpticalDiskDriveLetter.Integration.Tests.ps1
WARNING: This will change your machine environment variable PSModulePath but can be restored by running the command Restore-TestEnvironment.
WARNING: There is no operation running currently. Stop will return without any action.
VERBOSE: Performing the operation "Start-DscConfiguration: SendMetaConfigurationApply" on target "MSFT_DSCLocalConfigurationManager".
VERBOSE: Perform operation 'Invoke CimMethod' with following parameters, ''methodName' = SendMetaConfigurationApply,'className' = MSFT_DSCLocalConfigurationManager,'namespaceName' =
root/Microsoft/Windows/DesiredStateConfiguration'.
VERBOSE: An LCM method call arrived from computer WIN-PHIJCRM7TQT with user sid S-1-5-21-2623088611-4008297936-2631156863-500.
VERBOSE: [WIN-PHIJCRM7TQT]: LCM:  [ Start  Set      ]
VERBOSE: [WIN-PHIJCRM7TQT]: LCM:  [ Start  Resource ]  [MSFT_DSCMetaConfiguration]
VERBOSE: [WIN-PHIJCRM7TQT]: LCM:  [ Start  Set      ]  [MSFT_DSCMetaConfiguration]
VERBOSE: [WIN-PHIJCRM7TQT]: LCM:  [ End    Set      ]  [MSFT_DSCMetaConfiguration]  in 0.0160 seconds.
VERBOSE: [WIN-PHIJCRM7TQT]: LCM:  [ End    Resource ]  [MSFT_DSCMetaConfiguration]
VERBOSE: [WIN-PHIJCRM7TQT]: LCM:  [ End    Set      ]
VERBOSE: [WIN-PHIJCRM7TQT]: LCM:  [ End    Set      ]    in  0.0930 seconds.
VERBOSE: Operation 'Invoke CimMethod' complete.
VERBOSE: Set-DscLocalConfigurationManager finished in 0.291 seconds.

  Describing DSC_OpticalDiskDriveLetter_Integration

    Context Assign a Drive Letter to an optical drive that is not mounted
      [+] Should compile MOF without throwing 83ms
VERBOSE: Perform operation 'Invoke CimMethod' with following parameters, ''methodName' = SendConfigurationApply,'className' = MSFT_DSCLocalConfigurationManager,'namespaceName' =
root/Microsoft/Windows/DesiredStateConfiguration'.
VERBOSE: An LCM method call arrived from computer WIN-PHIJCRM7TQT with user sid S-1-5-21-2623088611-4008297936-2631156863-500.
VERBOSE: [WIN-PHIJCRM7TQT]: LCM:  [ Start  Set      ]
VERBOSE: [WIN-PHIJCRM7TQT]: LCM:  [ Start  Resource ]  [[OpticalDiskDriveLetter]Integration_Test]
VERBOSE: [WIN-PHIJCRM7TQT]: LCM:  [ Start  Test     ]  [[OpticalDiskDriveLetter]Integration_Test]
VERBOSE: [WIN-PHIJCRM7TQT]:                            [[OpticalDiskDriveLetter]Integration_Test] Get-OpticalDiskDriveLetter: Using Get-CimInstance to get the drive letter of optical disk 1 in the
system.
VERBOSE: [WIN-PHIJCRM7TQT]:                            [[OpticalDiskDriveLetter]Integration_Test] Perform operation 'Enumerate CimInstances' with following parameters, ''namespaceName' =
root\cimv2,'className' = Win32_CDROMDrive'.
VERBOSE: [WIN-PHIJCRM7TQT]:                            [[OpticalDiskDriveLetter]Integration_Test] Test-OpticalDiskCanBeManaged: Testing if the optical disk with Device Id
'\\?\Volume{7cf7b3f0-ddc4-11ee-bc43-00155d018801}' and without a drive letter assigned can be managed by this resource.
VERBOSE: [WIN-PHIJCRM7TQT]:                            [[OpticalDiskDriveLetter]Integration_Test] Test-OpticalDiskCanBeManaged: The optical disk with Device Id
'\\?\Volume{7cf7b3f0-ddc4-11ee-bc43-00155d018801}' can not be managed by this resource.
VERBOSE: [WIN-PHIJCRM7TQT]:                            [[OpticalDiskDriveLetter]Integration_Test] Test-OpticalDiskCanBeManaged: Testing if the optical disk with Device Id
'\\?\Volume{65b8c367-ddc4-11ee-bc42-806e6f6e6963}' and without a drive letter assigned can be managed by this resource.
VERBOSE: [WIN-PHIJCRM7TQT]:                            [[OpticalDiskDriveLetter]Integration_Test] Test-OpticalDiskCanBeManaged: The optical disk with Device Id
'\\?\Volume{65b8c367-ddc4-11ee-bc42-806e6f6e6963}' can be managed by this resource.
VERBOSE: [WIN-PHIJCRM7TQT]:                            [[OpticalDiskDriveLetter]Integration_Test] Test-OpticalDiskCanBeManaged: Testing if the optical disk with Device Id
'\\?\Volume{7cf7b888-ddc4-11ee-bc43-00155d018801}' and without a drive letter assigned can be managed by this resource.
VERBOSE: [WIN-PHIJCRM7TQT]:                            [[OpticalDiskDriveLetter]Integration_Test] Test-OpticalDiskCanBeManaged: The optical disk with Device Id
'\\?\Volume{7cf7b888-ddc4-11ee-bc43-00155d018801}' can be managed by this resource.
VERBOSE: [WIN-PHIJCRM7TQT]:                            [[OpticalDiskDriveLetter]Integration_Test] Operation 'Enumerate CimInstances' complete.
VERBOSE: [WIN-PHIJCRM7TQT]:                            [[OpticalDiskDriveLetter]Integration_Test] Get-OpticalDiskDriveLetter: The optical disk 1 is not currently assigned a drive letter.
VERBOSE: [WIN-PHIJCRM7TQT]:                            [[OpticalDiskDriveLetter]Integration_Test] Perform operation 'Query CimInstances' with following parameters, ''queryExpression' = SELECT * FROM
Win32_Volume WHERE DriveLetter = 'F:','queryDialect' = WQL,'namespaceName' = root\cimv2'.
VERBOSE: [WIN-PHIJCRM7TQT]:                            [[OpticalDiskDriveLetter]Integration_Test] Operation 'Query CimInstances' complete.
VERBOSE: [WIN-PHIJCRM7TQT]:                            [[OpticalDiskDriveLetter]Integration_Test] Test-TargetResource: The optical disk 1 is assigned the drive letter '' but should be 'F:'. Change
required.
VERBOSE: [WIN-PHIJCRM7TQT]: LCM:  [ End    Test     ]  [[OpticalDiskDriveLetter]Integration_Test]  in 1.3900 seconds.
VERBOSE: [WIN-PHIJCRM7TQT]: LCM:  [ Start  Set      ]  [[OpticalDiskDriveLetter]Integration_Test]
VERBOSE: [WIN-PHIJCRM7TQT]:                            [[OpticalDiskDriveLetter]Integration_Test] Get-OpticalDiskDriveLetter: Using Get-CimInstance to get the drive letter of optical disk 1 in the
system.
VERBOSE: [WIN-PHIJCRM7TQT]:                            [[OpticalDiskDriveLetter]Integration_Test] Perform operation 'Enumerate CimInstances' with following parameters, ''namespaceName' =
root\cimv2,'className' = Win32_CDROMDrive'.
VERBOSE: [WIN-PHIJCRM7TQT]:                            [[OpticalDiskDriveLetter]Integration_Test] Test-OpticalDiskCanBeManaged: Testing if the optical disk with Device Id
'\\?\Volume{7cf7b3f0-ddc4-11ee-bc43-00155d018801}' and without a drive letter assigned can be managed by this resource.
VERBOSE: [WIN-PHIJCRM7TQT]:                            [[OpticalDiskDriveLetter]Integration_Test] Test-OpticalDiskCanBeManaged: The optical disk with Device Id
'\\?\Volume{7cf7b3f0-ddc4-11ee-bc43-00155d018801}' can not be managed by this resource.
VERBOSE: [WIN-PHIJCRM7TQT]:                            [[OpticalDiskDriveLetter]Integration_Test] Test-OpticalDiskCanBeManaged: Testing if the optical disk with Device Id
'\\?\Volume{65b8c367-ddc4-11ee-bc42-806e6f6e6963}' and without a drive letter assigned can be managed by this resource.
VERBOSE: [WIN-PHIJCRM7TQT]:                            [[OpticalDiskDriveLetter]Integration_Test] Test-OpticalDiskCanBeManaged: The optical disk with Device Id
'\\?\Volume{65b8c367-ddc4-11ee-bc42-806e6f6e6963}' can be managed by this resource.
VERBOSE: [WIN-PHIJCRM7TQT]:                            [[OpticalDiskDriveLetter]Integration_Test] Test-OpticalDiskCanBeManaged: Testing if the optical disk with Device Id
'\\?\Volume{7cf7b888-ddc4-11ee-bc43-00155d018801}' and without a drive letter assigned can be managed by this resource.
VERBOSE: [WIN-PHIJCRM7TQT]:                            [[OpticalDiskDriveLetter]Integration_Test] Test-OpticalDiskCanBeManaged: The optical disk with Device Id
'\\?\Volume{7cf7b888-ddc4-11ee-bc43-00155d018801}' can be managed by this resource.
VERBOSE: [WIN-PHIJCRM7TQT]:                            [[OpticalDiskDriveLetter]Integration_Test] Operation 'Enumerate CimInstances' complete.
VERBOSE: [WIN-PHIJCRM7TQT]:                            [[OpticalDiskDriveLetter]Integration_Test] Get-OpticalDiskDriveLetter: The optical disk 1 is not currently assigned a drive letter.
VERBOSE: [WIN-PHIJCRM7TQT]:                            [[OpticalDiskDriveLetter]Integration_Test] Perform operation 'Query CimInstances' with following parameters, ''queryExpression' = SELECT * FROM
Win32_Volume WHERE DeviceId = '\\\\?\\Volume{65b8c367-ddc4-11ee-bc42-806e6f6e6963}\\','queryDialect' = WQL,'namespaceName' = root\cimv2'.
VERBOSE: [WIN-PHIJCRM7TQT]:                            [[OpticalDiskDriveLetter]Integration_Test] Operation 'Query CimInstances' complete.
VERBOSE: [WIN-PHIJCRM7TQT]:                            [[OpticalDiskDriveLetter]Integration_Test] Set-TargetResource: The optical disk 1 drive letter is '', attempting to set to 'F:'.
VERBOSE: [WIN-PHIJCRM7TQT]:                            [[OpticalDiskDriveLetter]Integration_Test] Perform operation 'Modify CimInstance' with following parameters, ''namespaceName' =
root/cimv2,'instance' = Win32_Volume: \\?\Volume{65b8c367-ddc4-11ee-bc42-806e6f6e6963}\ (DeviceID = "\\?\Volume{65b8c367-ddc4-11ee-bc42-806e...)'.
VERBOSE: [WIN-PHIJCRM7TQT]:                            [[OpticalDiskDriveLetter]Integration_Test] Operation 'Modify CimInstance' complete.
VERBOSE: [WIN-PHIJCRM7TQT]: LCM:  [ End    Set      ]  [[OpticalDiskDriveLetter]Integration_Test]  in 0.1560 seconds.
VERBOSE: [WIN-PHIJCRM7TQT]: LCM:  [ End    Resource ]  [[OpticalDiskDriveLetter]Integration_Test]
VERBOSE: [WIN-PHIJCRM7TQT]: LCM:  [ End    Set      ]
VERBOSE: [WIN-PHIJCRM7TQT]: LCM:  [ End    Set      ]    in  2.2500 seconds.
VERBOSE: Operation 'Invoke CimMethod' complete.
VERBOSE: Time taken for configuration job to complete is 3.463 seconds
      [+] Should apply the MOF without throwing 3.53s
VERBOSE: An LCM method call arrived from computer WIN-PHIJCRM7TQT with user sid S-1-5-21-2623088611-4008297936-2631156863-500.
VERBOSE: [WIN-PHIJCRM7TQT]: LCM:  [ Start  Get      ]
VERBOSE: [WIN-PHIJCRM7TQT]:                            [[OpticalDiskDriveLetter]Integration_Test] Get-OpticalDiskDriveLetter: Using Get-CimInstance to get the drive letter of optical disk 1 in the
system.
VERBOSE: [WIN-PHIJCRM7TQT]:                            [[OpticalDiskDriveLetter]Integration_Test] Perform operation 'Enumerate CimInstances' with following parameters, ''namespaceName' =
root\cimv2,'className' = Win32_CDROMDrive'.
VERBOSE: [WIN-PHIJCRM7TQT]:                            [[OpticalDiskDriveLetter]Integration_Test] Test-OpticalDiskCanBeManaged: Testing if the optical disk with Device Id
'\\?\Volume{7cf7b3f0-ddc4-11ee-bc43-00155d018801}' and without a drive letter assigned can be managed by this resource.
VERBOSE: [WIN-PHIJCRM7TQT]:                            [[OpticalDiskDriveLetter]Integration_Test] Test-OpticalDiskCanBeManaged: The optical disk with Device Id
'\\?\Volume{7cf7b3f0-ddc4-11ee-bc43-00155d018801}' can not be managed by this resource.
VERBOSE: [WIN-PHIJCRM7TQT]:                            [[OpticalDiskDriveLetter]Integration_Test] Perform operation 'Query CimInstances' with following parameters, ''queryExpression' = SELECT * FROM
Win32_Volume WHERE DriveLetter = 'F:','queryDialect' = WQL,'namespaceName' = root\cimv2'.
VERBOSE: [WIN-PHIJCRM7TQT]:                            [[OpticalDiskDriveLetter]Integration_Test] Operation 'Query CimInstances' complete.
VERBOSE: [WIN-PHIJCRM7TQT]:                            [[OpticalDiskDriveLetter]Integration_Test] Test-OpticalDiskCanBeManaged: Testing if the optical disk with Device Id
'\\?\Volume{65b8c367-ddc4-11ee-bc42-806e6f6e6963}' and assigned drive letter 'F:' can be managed by this resource.
VERBOSE: [WIN-PHIJCRM7TQT]:                            [[OpticalDiskDriveLetter]Integration_Test] Test-OpticalDiskCanBeManaged: The optical disk with Device Id
'\\?\Volume{65b8c367-ddc4-11ee-bc42-806e6f6e6963}' can be managed by this resource.
VERBOSE: [WIN-PHIJCRM7TQT]:                            [[OpticalDiskDriveLetter]Integration_Test] Test-OpticalDiskCanBeManaged: Testing if the optical disk with Device Id
'\\?\Volume{7cf7b888-ddc4-11ee-bc43-00155d018801}' and without a drive letter assigned can be managed by this resource.
VERBOSE: [WIN-PHIJCRM7TQT]:                            [[OpticalDiskDriveLetter]Integration_Test] Test-OpticalDiskCanBeManaged: The optical disk with Device Id
'\\?\Volume{7cf7b888-ddc4-11ee-bc43-00155d018801}' can be managed by this resource.
VERBOSE: [WIN-PHIJCRM7TQT]:                            [[OpticalDiskDriveLetter]Integration_Test] Operation 'Enumerate CimInstances' complete.
VERBOSE: [WIN-PHIJCRM7TQT]:                            [[OpticalDiskDriveLetter]Integration_Test] Get-TargetResource: The optical disk 1 is currently assigned drive letter 'F'.
VERBOSE: [WIN-PHIJCRM7TQT]: LCM:  [ End    Get      ]  [[OpticalDiskDriveLetter]Integration_Test]  in 0.1710 seconds.
VERBOSE: [WIN-PHIJCRM7TQT]: LCM:  [ End    Get      ]    in  0.2180 seconds.
      [+] Should be able to call Get-DscConfiguration without throwing 1.36s
      [+] Should have set the resource and all the parameters should match 518ms

    Context Assign a Drive Letter to an optical drive that is already mounted
      [+] Should compile the MOF without throwing 88ms
VERBOSE: Perform operation 'Invoke CimMethod' with following parameters, ''methodName' = SendConfigurationApply,'className' = MSFT_DSCLocalConfigurationManager,'namespaceName' =
root/Microsoft/Windows/DesiredStateConfiguration'.
VERBOSE: An LCM method call arrived from computer WIN-PHIJCRM7TQT with user sid S-1-5-21-2623088611-4008297936-2631156863-500.
VERBOSE: [WIN-PHIJCRM7TQT]: LCM:  [ Start  Set      ]
VERBOSE: [WIN-PHIJCRM7TQT]: LCM:  [ Start  Resource ]  [[OpticalDiskDriveLetter]Integration_Test]
VERBOSE: [WIN-PHIJCRM7TQT]: LCM:  [ Start  Test     ]  [[OpticalDiskDriveLetter]Integration_Test]
VERBOSE: [WIN-PHIJCRM7TQT]:                            [[OpticalDiskDriveLetter]Integration_Test] Get-OpticalDiskDriveLetter: Using Get-CimInstance to get the drive letter of optical disk 1 in the
system.
VERBOSE: [WIN-PHIJCRM7TQT]:                            [[OpticalDiskDriveLetter]Integration_Test] Perform operation 'Enumerate CimInstances' with following parameters, ''namespaceName' =
root\cimv2,'className' = Win32_CDROMDrive'.
VERBOSE: [WIN-PHIJCRM7TQT]:                            [[OpticalDiskDriveLetter]Integration_Test] Test-OpticalDiskCanBeManaged: Testing if the optical disk with Device Id
'\\?\Volume{7cf7b3f0-ddc4-11ee-bc43-00155d018801}' and without a drive letter assigned can be managed by this resource.
VERBOSE: [WIN-PHIJCRM7TQT]:                            [[OpticalDiskDriveLetter]Integration_Test] Test-OpticalDiskCanBeManaged: The optical disk with Device Id
'\\?\Volume{7cf7b3f0-ddc4-11ee-bc43-00155d018801}' can not be managed by this resource.
VERBOSE: [WIN-PHIJCRM7TQT]:                            [[OpticalDiskDriveLetter]Integration_Test] Perform operation 'Query CimInstances' with following parameters, ''queryExpression' = SELECT * FROM
Win32_Volume WHERE DriveLetter = 'F:','queryDialect' = WQL,'namespaceName' = root\cimv2'.
VERBOSE: [WIN-PHIJCRM7TQT]:                            [[OpticalDiskDriveLetter]Integration_Test] Operation 'Query CimInstances' complete.
VERBOSE: [WIN-PHIJCRM7TQT]:                            [[OpticalDiskDriveLetter]Integration_Test] Test-OpticalDiskCanBeManaged: Testing if the optical disk with Device Id
'\\?\Volume{65b8c367-ddc4-11ee-bc42-806e6f6e6963}' and assigned drive letter 'F:' can be managed by this resource.
VERBOSE: [WIN-PHIJCRM7TQT]:                            [[OpticalDiskDriveLetter]Integration_Test] Test-OpticalDiskCanBeManaged: The optical disk with Device Id
'\\?\Volume{65b8c367-ddc4-11ee-bc42-806e6f6e6963}' can be managed by this resource.
VERBOSE: [WIN-PHIJCRM7TQT]:                            [[OpticalDiskDriveLetter]Integration_Test] Test-OpticalDiskCanBeManaged: Testing if the optical disk with Device Id
'\\?\Volume{7cf7b888-ddc4-11ee-bc43-00155d018801}' and without a drive letter assigned can be managed by this resource.
VERBOSE: [WIN-PHIJCRM7TQT]:                            [[OpticalDiskDriveLetter]Integration_Test] Test-OpticalDiskCanBeManaged: The optical disk with Device Id
'\\?\Volume{7cf7b888-ddc4-11ee-bc43-00155d018801}' can be managed by this resource.
VERBOSE: [WIN-PHIJCRM7TQT]:                            [[OpticalDiskDriveLetter]Integration_Test] Operation 'Enumerate CimInstances' complete.
VERBOSE: [WIN-PHIJCRM7TQT]:                            [[OpticalDiskDriveLetter]Integration_Test] Perform operation 'Query CimInstances' with following parameters, ''queryExpression' = SELECT * FROM
Win32_Volume WHERE DriveLetter = 'G:','queryDialect' = WQL,'namespaceName' = root\cimv2'.
VERBOSE: [WIN-PHIJCRM7TQT]:                            [[OpticalDiskDriveLetter]Integration_Test] Operation 'Query CimInstances' complete.
VERBOSE: [WIN-PHIJCRM7TQT]:                            [[OpticalDiskDriveLetter]Integration_Test] Test-TargetResource: The optical disk 1 is assigned the drive letter 'F:' but should be 'G:'. Change
required.
VERBOSE: [WIN-PHIJCRM7TQT]: LCM:  [ End    Test     ]  [[OpticalDiskDriveLetter]Integration_Test]  in 0.1090 seconds.
VERBOSE: [WIN-PHIJCRM7TQT]: LCM:  [ Start  Set      ]  [[OpticalDiskDriveLetter]Integration_Test]
VERBOSE: [WIN-PHIJCRM7TQT]:                            [[OpticalDiskDriveLetter]Integration_Test] Get-OpticalDiskDriveLetter: Using Get-CimInstance to get the drive letter of optical disk 1 in the
system.
VERBOSE: [WIN-PHIJCRM7TQT]:                            [[OpticalDiskDriveLetter]Integration_Test] Perform operation 'Enumerate CimInstances' with following parameters, ''namespaceName' =
root\cimv2,'className' = Win32_CDROMDrive'.
VERBOSE: [WIN-PHIJCRM7TQT]:                            [[OpticalDiskDriveLetter]Integration_Test] Test-OpticalDiskCanBeManaged: Testing if the optical disk with Device Id
'\\?\Volume{7cf7b3f0-ddc4-11ee-bc43-00155d018801}' and without a drive letter assigned can be managed by this resource.
VERBOSE: [WIN-PHIJCRM7TQT]:                            [[OpticalDiskDriveLetter]Integration_Test] Test-OpticalDiskCanBeManaged: The optical disk with Device Id
'\\?\Volume{7cf7b3f0-ddc4-11ee-bc43-00155d018801}' can not be managed by this resource.
VERBOSE: [WIN-PHIJCRM7TQT]:                            [[OpticalDiskDriveLetter]Integration_Test] Perform operation 'Query CimInstances' with following parameters, ''queryExpression' = SELECT * FROM
Win32_Volume WHERE DriveLetter = 'F:','queryDialect' = WQL,'namespaceName' = root\cimv2'.
VERBOSE: [WIN-PHIJCRM7TQT]:                            [[OpticalDiskDriveLetter]Integration_Test] Operation 'Query CimInstances' complete.
VERBOSE: [WIN-PHIJCRM7TQT]:                            [[OpticalDiskDriveLetter]Integration_Test] Test-OpticalDiskCanBeManaged: Testing if the optical disk with Device Id
'\\?\Volume{65b8c367-ddc4-11ee-bc42-806e6f6e6963}' and assigned drive letter 'F:' can be managed by this resource.
VERBOSE: [WIN-PHIJCRM7TQT]:                            [[OpticalDiskDriveLetter]Integration_Test] Test-OpticalDiskCanBeManaged: The optical disk with Device Id
'\\?\Volume{65b8c367-ddc4-11ee-bc42-806e6f6e6963}' can be managed by this resource.
VERBOSE: [WIN-PHIJCRM7TQT]:                            [[OpticalDiskDriveLetter]Integration_Test] Test-OpticalDiskCanBeManaged: Testing if the optical disk with Device Id
'\\?\Volume{7cf7b888-ddc4-11ee-bc43-00155d018801}' and without a drive letter assigned can be managed by this resource.
VERBOSE: [WIN-PHIJCRM7TQT]:                            [[OpticalDiskDriveLetter]Integration_Test] Test-OpticalDiskCanBeManaged: The optical disk with Device Id
'\\?\Volume{7cf7b888-ddc4-11ee-bc43-00155d018801}' can be managed by this resource.
VERBOSE: [WIN-PHIJCRM7TQT]:                            [[OpticalDiskDriveLetter]Integration_Test] Operation 'Enumerate CimInstances' complete.
VERBOSE: [WIN-PHIJCRM7TQT]:                            [[OpticalDiskDriveLetter]Integration_Test] Perform operation 'Query CimInstances' with following parameters, ''queryExpression' = SELECT * FROM
Win32_Volume WHERE DriveLetter = 'F:','queryDialect' = WQL,'namespaceName' = root\cimv2'.
VERBOSE: [WIN-PHIJCRM7TQT]:                            [[OpticalDiskDriveLetter]Integration_Test] Operation 'Query CimInstances' complete.
VERBOSE: [WIN-PHIJCRM7TQT]:                            [[OpticalDiskDriveLetter]Integration_Test] Set-TargetResource: The optical disk 1 drive letter is 'F:', attempting to set to 'G:'.
VERBOSE: [WIN-PHIJCRM7TQT]:                            [[OpticalDiskDriveLetter]Integration_Test] Perform operation 'Modify CimInstance' with following parameters, ''namespaceName' =
root/cimv2,'instance' = Win32_Volume: F:\ (DeviceID = "\\?\Volume{65b8c367-ddc4-11ee-bc42-806e...)'.
VERBOSE: [WIN-PHIJCRM7TQT]:                            [[OpticalDiskDriveLetter]Integration_Test] Operation 'Modify CimInstance' complete.
VERBOSE: [WIN-PHIJCRM7TQT]: LCM:  [ End    Set      ]  [[OpticalDiskDriveLetter]Integration_Test]  in 0.1410 seconds.
VERBOSE: [WIN-PHIJCRM7TQT]: LCM:  [ End    Resource ]  [[OpticalDiskDriveLetter]Integration_Test]
VERBOSE: [WIN-PHIJCRM7TQT]: LCM:  [ End    Set      ]
VERBOSE: [WIN-PHIJCRM7TQT]: LCM:  [ End    Set      ]    in  0.3130 seconds.
VERBOSE: Operation 'Invoke CimMethod' complete.
VERBOSE: Time taken for configuration job to complete is 2.394 seconds
      [+] Should apply the MOF without throwing 2.45s
VERBOSE: An LCM method call arrived from computer WIN-PHIJCRM7TQT with user sid S-1-5-21-2623088611-4008297936-2631156863-500.
VERBOSE: [WIN-PHIJCRM7TQT]: LCM:  [ Start  Get      ]
VERBOSE: [WIN-PHIJCRM7TQT]:                            [[OpticalDiskDriveLetter]Integration_Test] Get-OpticalDiskDriveLetter: Using Get-CimInstance to get the drive letter of optical disk 1 in the
system.
VERBOSE: [WIN-PHIJCRM7TQT]:                            [[OpticalDiskDriveLetter]Integration_Test] Perform operation 'Enumerate CimInstances' with following parameters, ''namespaceName' =
root\cimv2,'className' = Win32_CDROMDrive'.
VERBOSE: [WIN-PHIJCRM7TQT]:                            [[OpticalDiskDriveLetter]Integration_Test] Test-OpticalDiskCanBeManaged: Testing if the optical disk with Device Id
'\\?\Volume{7cf7b3f0-ddc4-11ee-bc43-00155d018801}' and without a drive letter assigned can be managed by this resource.
VERBOSE: [WIN-PHIJCRM7TQT]:                            [[OpticalDiskDriveLetter]Integration_Test] Test-OpticalDiskCanBeManaged: The optical disk with Device Id
'\\?\Volume{7cf7b3f0-ddc4-11ee-bc43-00155d018801}' can not be managed by this resource.
VERBOSE: [WIN-PHIJCRM7TQT]:                            [[OpticalDiskDriveLetter]Integration_Test] Perform operation 'Query CimInstances' with following parameters, ''queryExpression' = SELECT * FROM
Win32_Volume WHERE DriveLetter = 'G:','queryDialect' = WQL,'namespaceName' = root\cimv2'.
VERBOSE: [WIN-PHIJCRM7TQT]:                            [[OpticalDiskDriveLetter]Integration_Test] Operation 'Query CimInstances' complete.
VERBOSE: [WIN-PHIJCRM7TQT]:                            [[OpticalDiskDriveLetter]Integration_Test] Test-OpticalDiskCanBeManaged: Testing if the optical disk with Device Id
'\\?\Volume{65b8c367-ddc4-11ee-bc42-806e6f6e6963}' and assigned drive letter 'G:' can be managed by this resource.
VERBOSE: [WIN-PHIJCRM7TQT]:                            [[OpticalDiskDriveLetter]Integration_Test] Test-OpticalDiskCanBeManaged: The optical disk with Device Id
'\\?\Volume{65b8c367-ddc4-11ee-bc42-806e6f6e6963}' can be managed by this resource.
VERBOSE: [WIN-PHIJCRM7TQT]:                            [[OpticalDiskDriveLetter]Integration_Test] Test-OpticalDiskCanBeManaged: Testing if the optical disk with Device Id
'\\?\Volume{7cf7b888-ddc4-11ee-bc43-00155d018801}' and without a drive letter assigned can be managed by this resource.
VERBOSE: [WIN-PHIJCRM7TQT]:                            [[OpticalDiskDriveLetter]Integration_Test] Test-OpticalDiskCanBeManaged: The optical disk with Device Id
'\\?\Volume{7cf7b888-ddc4-11ee-bc43-00155d018801}' can be managed by this resource.
VERBOSE: [WIN-PHIJCRM7TQT]:                            [[OpticalDiskDriveLetter]Integration_Test] Operation 'Enumerate CimInstances' complete.
VERBOSE: [WIN-PHIJCRM7TQT]:                            [[OpticalDiskDriveLetter]Integration_Test] Get-TargetResource: The optical disk 1 is currently assigned drive letter 'G'.
VERBOSE: [WIN-PHIJCRM7TQT]: LCM:  [ End    Get      ]  [[OpticalDiskDriveLetter]Integration_Test]  in 0.0940 seconds.
VERBOSE: [WIN-PHIJCRM7TQT]: LCM:  [ End    Get      ]    in  0.1250 seconds.
      [+] Should be able to call Get-DscConfiguration without throwing 1.38s
      [+] Should have set the resource and all the parameters should match 539ms

    Context Remove a Drive Letter from an optical drive that is already mounted
      [+] Should compile the MOF without throwing 92ms
VERBOSE: Perform operation 'Invoke CimMethod' with following parameters, ''methodName' = SendConfigurationApply,'className' = MSFT_DSCLocalConfigurationManager,'namespaceName' =
root/Microsoft/Windows/DesiredStateConfiguration'.
VERBOSE: An LCM method call arrived from computer WIN-PHIJCRM7TQT with user sid S-1-5-21-2623088611-4008297936-2631156863-500.
VERBOSE: [WIN-PHIJCRM7TQT]: LCM:  [ Start  Set      ]
VERBOSE: [WIN-PHIJCRM7TQT]: LCM:  [ Start  Resource ]  [[OpticalDiskDriveLetter]Integration_Test]
VERBOSE: [WIN-PHIJCRM7TQT]: LCM:  [ Start  Test     ]  [[OpticalDiskDriveLetter]Integration_Test]
VERBOSE: [WIN-PHIJCRM7TQT]:                            [[OpticalDiskDriveLetter]Integration_Test] Get-OpticalDiskDriveLetter: Using Get-CimInstance to get the drive letter of optical disk 1 in the
system.
VERBOSE: [WIN-PHIJCRM7TQT]:                            [[OpticalDiskDriveLetter]Integration_Test] Perform operation 'Enumerate CimInstances' with following parameters, ''namespaceName' =
root\cimv2,'className' = Win32_CDROMDrive'.
VERBOSE: [WIN-PHIJCRM7TQT]:                            [[OpticalDiskDriveLetter]Integration_Test] Test-OpticalDiskCanBeManaged: Testing if the optical disk with Device Id
'\\?\Volume{7cf7b3f0-ddc4-11ee-bc43-00155d018801}' and without a drive letter assigned can be managed by this resource.
VERBOSE: [WIN-PHIJCRM7TQT]:                            [[OpticalDiskDriveLetter]Integration_Test] Test-OpticalDiskCanBeManaged: The optical disk with Device Id
'\\?\Volume{7cf7b3f0-ddc4-11ee-bc43-00155d018801}' can not be managed by this resource.
VERBOSE: [WIN-PHIJCRM7TQT]:                            [[OpticalDiskDriveLetter]Integration_Test] Perform operation 'Query CimInstances' with following parameters, ''queryExpression' = SELECT * FROM
Win32_Volume WHERE DriveLetter = 'G:','queryDialect' = WQL,'namespaceName' = root\cimv2'.
VERBOSE: [WIN-PHIJCRM7TQT]:                            [[OpticalDiskDriveLetter]Integration_Test] Operation 'Query CimInstances' complete.
VERBOSE: [WIN-PHIJCRM7TQT]:                            [[OpticalDiskDriveLetter]Integration_Test] Test-OpticalDiskCanBeManaged: Testing if the optical disk with Device Id
'\\?\Volume{65b8c367-ddc4-11ee-bc42-806e6f6e6963}' and assigned drive letter 'G:' can be managed by this resource.
VERBOSE: [WIN-PHIJCRM7TQT]:                            [[OpticalDiskDriveLetter]Integration_Test] Test-OpticalDiskCanBeManaged: The optical disk with Device Id
'\\?\Volume{65b8c367-ddc4-11ee-bc42-806e6f6e6963}' can be managed by this resource.
VERBOSE: [WIN-PHIJCRM7TQT]:                            [[OpticalDiskDriveLetter]Integration_Test] Test-OpticalDiskCanBeManaged: Testing if the optical disk with Device Id
'\\?\Volume{7cf7b888-ddc4-11ee-bc43-00155d018801}' and without a drive letter assigned can be managed by this resource.
VERBOSE: [WIN-PHIJCRM7TQT]:                            [[OpticalDiskDriveLetter]Integration_Test] Test-OpticalDiskCanBeManaged: The optical disk with Device Id
'\\?\Volume{7cf7b888-ddc4-11ee-bc43-00155d018801}' can be managed by this resource.
VERBOSE: [WIN-PHIJCRM7TQT]:                            [[OpticalDiskDriveLetter]Integration_Test] Operation 'Enumerate CimInstances' complete.
VERBOSE: [WIN-PHIJCRM7TQT]:                            [[OpticalDiskDriveLetter]Integration_Test] Test-TargetResource: The optical disk 1 is assigned the drive letter 'G:' which should be removed.
Change required.
VERBOSE: [WIN-PHIJCRM7TQT]: LCM:  [ End    Test     ]  [[OpticalDiskDriveLetter]Integration_Test]  in 0.1410 seconds.
VERBOSE: [WIN-PHIJCRM7TQT]: LCM:  [ Start  Set      ]  [[OpticalDiskDriveLetter]Integration_Test]
VERBOSE: [WIN-PHIJCRM7TQT]:                            [[OpticalDiskDriveLetter]Integration_Test] Get-OpticalDiskDriveLetter: Using Get-CimInstance to get the drive letter of optical disk 1 in the
system.
VERBOSE: [WIN-PHIJCRM7TQT]:                            [[OpticalDiskDriveLetter]Integration_Test] Perform operation 'Enumerate CimInstances' with following parameters, ''namespaceName' =
root\cimv2,'className' = Win32_CDROMDrive'.
VERBOSE: [WIN-PHIJCRM7TQT]:                            [[OpticalDiskDriveLetter]Integration_Test] Test-OpticalDiskCanBeManaged: Testing if the optical disk with Device Id
'\\?\Volume{7cf7b3f0-ddc4-11ee-bc43-00155d018801}' and without a drive letter assigned can be managed by this resource.
VERBOSE: [WIN-PHIJCRM7TQT]:                            [[OpticalDiskDriveLetter]Integration_Test] Test-OpticalDiskCanBeManaged: The optical disk with Device Id
'\\?\Volume{7cf7b3f0-ddc4-11ee-bc43-00155d018801}' can not be managed by this resource.
VERBOSE: [WIN-PHIJCRM7TQT]:                            [[OpticalDiskDriveLetter]Integration_Test] Perform operation 'Query CimInstances' with following parameters, ''queryExpression' = SELECT * FROM
Win32_Volume WHERE DriveLetter = 'G:','queryDialect' = WQL,'namespaceName' = root\cimv2'.
VERBOSE: [WIN-PHIJCRM7TQT]:                            [[OpticalDiskDriveLetter]Integration_Test] Operation 'Query CimInstances' complete.
VERBOSE: [WIN-PHIJCRM7TQT]:                            [[OpticalDiskDriveLetter]Integration_Test] Test-OpticalDiskCanBeManaged: Testing if the optical disk with Device Id
'\\?\Volume{65b8c367-ddc4-11ee-bc42-806e6f6e6963}' and assigned drive letter 'G:' can be managed by this resource.
VERBOSE: [WIN-PHIJCRM7TQT]:                            [[OpticalDiskDriveLetter]Integration_Test] Test-OpticalDiskCanBeManaged: The optical disk with Device Id
'\\?\Volume{65b8c367-ddc4-11ee-bc42-806e6f6e6963}' can be managed by this resource.
VERBOSE: [WIN-PHIJCRM7TQT]:                            [[OpticalDiskDriveLetter]Integration_Test] Test-OpticalDiskCanBeManaged: Testing if the optical disk with Device Id
'\\?\Volume{7cf7b888-ddc4-11ee-bc43-00155d018801}' and without a drive letter assigned can be managed by this resource.
VERBOSE: [WIN-PHIJCRM7TQT]:                            [[OpticalDiskDriveLetter]Integration_Test] Test-OpticalDiskCanBeManaged: The optical disk with Device Id
'\\?\Volume{7cf7b888-ddc4-11ee-bc43-00155d018801}' can be managed by this resource.
VERBOSE: [WIN-PHIJCRM7TQT]:                            [[OpticalDiskDriveLetter]Integration_Test] Operation 'Enumerate CimInstances' complete.
VERBOSE: [WIN-PHIJCRM7TQT]:                            [[OpticalDiskDriveLetter]Integration_Test] Perform operation 'Query CimInstances' with following parameters, ''queryExpression' = SELECT * FROM
Win32_Volume WHERE DriveLetter = 'G:','queryDialect' = WQL,'namespaceName' = root\cimv2'.
VERBOSE: [WIN-PHIJCRM7TQT]:                            [[OpticalDiskDriveLetter]Integration_Test] Operation 'Query CimInstances' complete.
VERBOSE: [WIN-PHIJCRM7TQT]:                            [[OpticalDiskDriveLetter]Integration_Test] Set-TargetResource: The optical disk 1 drive letter is 'G:', attempting to remove it.
VERBOSE: [WIN-PHIJCRM7TQT]:                            [[OpticalDiskDriveLetter]Integration_Test] Perform operation 'Modify CimInstance' with following parameters, ''namespaceName' =
root/cimv2,'instance' = Win32_Volume: G:\ (DeviceID = "\\?\Volume{65b8c367-ddc4-11ee-bc42-806e...)'.
VERBOSE: [WIN-PHIJCRM7TQT]:                            [[OpticalDiskDriveLetter]Integration_Test] Operation 'Modify CimInstance' complete.
VERBOSE: [WIN-PHIJCRM7TQT]: LCM:  [ End    Set      ]  [[OpticalDiskDriveLetter]Integration_Test]  in 0.1250 seconds.
VERBOSE: [WIN-PHIJCRM7TQT]: LCM:  [ End    Resource ]  [[OpticalDiskDriveLetter]Integration_Test]
VERBOSE: [WIN-PHIJCRM7TQT]: LCM:  [ End    Set      ]
VERBOSE: [WIN-PHIJCRM7TQT]: LCM:  [ End    Set      ]    in  0.3590 seconds.
VERBOSE: Operation 'Invoke CimMethod' complete.
VERBOSE: Time taken for configuration job to complete is 2.689 seconds
      [+] Should apply the MOF without throwing 2.76s
VERBOSE: An LCM method call arrived from computer WIN-PHIJCRM7TQT with user sid S-1-5-21-2623088611-4008297936-2631156863-500.
VERBOSE: [WIN-PHIJCRM7TQT]: LCM:  [ Start  Get      ]
VERBOSE: [WIN-PHIJCRM7TQT]:                            [[OpticalDiskDriveLetter]Integration_Test] Get-OpticalDiskDriveLetter: Using Get-CimInstance to get the drive letter of optical disk 1 in the
system.
VERBOSE: [WIN-PHIJCRM7TQT]:                            [[OpticalDiskDriveLetter]Integration_Test] Perform operation 'Enumerate CimInstances' with following parameters, ''namespaceName' =
root\cimv2,'className' = Win32_CDROMDrive'.
VERBOSE: [WIN-PHIJCRM7TQT]:                            [[OpticalDiskDriveLetter]Integration_Test] Test-OpticalDiskCanBeManaged: Testing if the optical disk with Device Id
'\\?\Volume{7cf7b3f0-ddc4-11ee-bc43-00155d018801}' and without a drive letter assigned can be managed by this resource.
VERBOSE: [WIN-PHIJCRM7TQT]:                            [[OpticalDiskDriveLetter]Integration_Test] Test-OpticalDiskCanBeManaged: The optical disk with Device Id
'\\?\Volume{7cf7b3f0-ddc4-11ee-bc43-00155d018801}' can not be managed by this resource.
VERBOSE: [WIN-PHIJCRM7TQT]:                            [[OpticalDiskDriveLetter]Integration_Test] Test-OpticalDiskCanBeManaged: Testing if the optical disk with Device Id
'\\?\Volume{65b8c367-ddc4-11ee-bc42-806e6f6e6963}' and without a drive letter assigned can be managed by this resource.
VERBOSE: [WIN-PHIJCRM7TQT]:                            [[OpticalDiskDriveLetter]Integration_Test] Test-OpticalDiskCanBeManaged: The optical disk with Device Id
'\\?\Volume{65b8c367-ddc4-11ee-bc42-806e6f6e6963}' can be managed by this resource.
VERBOSE: [WIN-PHIJCRM7TQT]:                            [[OpticalDiskDriveLetter]Integration_Test] Test-OpticalDiskCanBeManaged: Testing if the optical disk with Device Id
'\\?\Volume{7cf7b888-ddc4-11ee-bc43-00155d018801}' and without a drive letter assigned can be managed by this resource.
VERBOSE: [WIN-PHIJCRM7TQT]:                            [[OpticalDiskDriveLetter]Integration_Test] Test-OpticalDiskCanBeManaged: The optical disk with Device Id
'\\?\Volume{7cf7b888-ddc4-11ee-bc43-00155d018801}' can be managed by this resource.
VERBOSE: [WIN-PHIJCRM7TQT]:                            [[OpticalDiskDriveLetter]Integration_Test] Operation 'Enumerate CimInstances' complete.
VERBOSE: [WIN-PHIJCRM7TQT]:                            [[OpticalDiskDriveLetter]Integration_Test] Get-OpticalDiskDriveLetter: The optical disk 1 is not currently assigned a drive letter.
VERBOSE: [WIN-PHIJCRM7TQT]:                            [[OpticalDiskDriveLetter]Integration_Test] Get-TargetResource: The optical disk 1 is not currently assigned a drive letter.
VERBOSE: [WIN-PHIJCRM7TQT]: LCM:  [ End    Get      ]  [[OpticalDiskDriveLetter]Integration_Test]  in 0.1090 seconds.
VERBOSE: [WIN-PHIJCRM7TQT]: LCM:  [ End    Get      ]    in  0.1560 seconds.
      [+] Should be able to call Get-DscConfiguration without throwing 1.29s
      [+] Should have set the resource and all the parameters should match 503ms
WARNING: There is no operation running currently. Stop will return without any action.
Tests completed in 16.77s
Tests Passed: 12, Failed: 0, Skipped: 0, Pending: 0, Inconclusive: 0
PS C:\source\StorageDsc>
codecov[bot] commented 5 months ago

Codecov Report

Attention: Patch coverage is 95.45455% with 1 lines in your changes are missing coverage. Please review.

Project coverage is 95%. Comparing base (a87725b) to head (338f709).

Additional details and impacted files [![Impacted file tree graph](https://app.codecov.io/gh/dsccommunity/StorageDsc/pull/286/graphs/tree.svg?width=650&height=150&src=pr&token=RLLNitScbf&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=dsccommunity)](https://app.codecov.io/gh/dsccommunity/StorageDsc/pull/286?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=dsccommunity) ```diff @@ Coverage Diff @@ ## main #286 +/- ## =================================== - Coverage 95% 95% -1% =================================== Files 7 7 Lines 1025 1043 +18 =================================== + Hits 977 994 +17 - Misses 48 49 +1 ``` | [Files](https://app.codecov.io/gh/dsccommunity/StorageDsc/pull/286?dropdown=coverage&src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=dsccommunity) | Coverage Δ | | |---|---|---| | [...calDiskDriveLetter/DSC\_OpticalDiskDriveLetter.psm1](https://app.codecov.io/gh/dsccommunity/StorageDsc/pull/286?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=dsccommunity#diff-c291cmNlL0RTQ1Jlc291cmNlcy9EU0NfT3B0aWNhbERpc2tEcml2ZUxldHRlci9EU0NfT3B0aWNhbERpc2tEcml2ZUxldHRlci5wc20x) | `93% <95%> (+<1%)` | :arrow_up: |
johlju commented 5 months ago

We could add the functions (e.g. Test-OpticalDiskCanBeManaged) that is part of the resource as public commands so it possible to use them standalone. But that can be a future PR.

I started using that pattern in SqlServerDsc and will do that in future PRs in other modules as well. See private and public functions in SqlServerDsc, and I also recently fixed so they are auto-documented in the wiki (using DscResource.DocGenerator), see the "tree" (that is also automatically built) to the right in the SqlServerDsc wiki. Using this pattern it so much simpler testing the code practically as I can use the commands to verify the functionality without the need to run LCM or Invoke-DscResource, then adding them to a DSC resource is just another layer.

johlju commented 5 months ago

I should make blog post in dscommunity.org about the new DocGenerator functionality but haven't gotten around to it yet. It should also be added to the dsccommunity-template in Sampler. 🤔

PlagueHO commented 5 months ago

Awesome! Thanks @johlju - That is a great idea about moving the functions to be public. I'll add an issue to track.