Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

(MODULES-2658) Detect DSC pending reboot state #91

Conversation

Iristyle
Copy link
Contributor

@Iristyle Iristyle commented Oct 7, 2015

No description provided.

@Iristyle Iristyle force-pushed the ticket/master/MODULES-2658-dsc-lcmstate-pending branch from 2f61aaa to 6443086 Compare October 7, 2015 00:28
 - Use WMI to query the MSFT_DSCLocalConfigurationManager class of the
   DSC namespace to retrieve the LCMState property.  When the LCMState
   is set to 'PendingReboot', then the machine is pending a reboot.

   Note that we can only mock out the WMI interactions, and that writing
   a valid acceptance test is not easy at this time given this
   functionality depends on WMF5.  CI pipelines are not yet configured
   with WMF5, so these changes will require some manual validation.
@Iristyle Iristyle force-pushed the ticket/master/MODULES-2658-dsc-lcmstate-pending branch from 6443086 to 63145f0 Compare October 7, 2015 05:38
@Iristyle Iristyle changed the title (WIP)(MODULES-2658) Detect DSC pending reboot state (MODULES-2658) Detect DSC pending reboot state Oct 7, 2015
@jpogran
Copy link
Contributor

jpogran commented Oct 7, 2015

LGTM

WIN32OLE.expects(:connect).with(root).returns(dsc)
dsc.expects(:Get).with('MSFT_DSCLocalConfigurationManager').returns(lcm)
lcm.expects(:ExecMethod_).with('GetMetaConfiguration').returns(ole_config)
ole_config.expects(:MetaConfiguration).returns(dsc_meta_config)
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Stub stub stub it out. Haha

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Sadly, not much choice here.

ferventcoder added a commit that referenced this pull request Oct 7, 2015
…cmstate-pending

(MODULES-2658) Detect DSC pending reboot state
@ferventcoder ferventcoder merged commit 0d8af82 into puppetlabs:master Oct 7, 2015
@Iristyle Iristyle deleted the ticket/master/MODULES-2658-dsc-lcmstate-pending branch October 7, 2015 06:11
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants