Feature #7621

Windows operatingsystemrelease support

Added by William Van Hevelingen about 1 year ago. Updated 2 months ago.

Status:Code Insufficient Start date:05/22/2011
Priority:Normal Due date:
Assignee:William Van Hevelingen % Done:

0%

Category:library
Target version:-
Keywords:windows Affected Facter version:
Branch:https://github.com/blkperl/facter/tree/feature/master/7621-windows_osrelease
Votes: 0

Description

operatingsystemrelease should return any of the following XP, Vista, 7, 2003, 2008, 2008R2 rather than the kernel version.


Related issues

related to Facter - Feature #7643: Export the Win32_OperatingSystem WMI/CIM class through Fa... Tests Insufficient 05/24/2011

History

Updated by William Van Hevelingen about 1 year ago

  • Branch set to https://github.com/blkperl/facter/tree/feature/master/7621-windows_osrelease

sent patch to dev list

Updated by James Turnbull 12 months ago

  • Status changed from Unreviewed to Needs Decision
  • Assignee changed from William Van Hevelingen to Nigel Kersten

Updated by Nigel Kersten 8 months ago

  • Status changed from Needs Decision to Needs More Information
  • Assignee changed from Nigel Kersten to Ken Barber

Ken, did this get handled with your recent sprint on Facter?

Updated by Ken Barber 8 months ago

  • Status changed from Needs More Information to Code Insufficient
  • Assignee changed from Ken Barber to William Van Hevelingen
  • Affected Facter version changed from 1.5.9 to 1.6.2rc1

Nope. The primary focus was on pull requests. However this commit doesn’t seem to be affecting whitespaced files anyway.

What version do you want this in Nigel? 1.6.x or future/master?

Looking at the patch I have some initial feedback:

  • Do we need a new fact for ‘windowsrelease’? Can you tell me what value this might add?
  • If there is value in windowsrelease … creating a new mswindows.rb util is unnecessary. Its only used for getting the release. Why don’t you just do that work in your ‘windowsrelease’ fact, and re-use the fact information in operatingsystem.rb?
  • can you take a look at the recent changes to kernelrelease.rb and see if you can use the way we now do WMI queries as well?

Other then that – once we get a version can you rebase and submit a pull request via git on that branch please? Sorry to be a hassle – its just easier for us :–). And since you’re doing it in github anyway I presume its easier for you as well :–).

I’m going to mark this ‘Code Insufficient’ for now – but don’t get the wrong idea … the code is pretty good its just the organisation I’m commenting on here :–). And since we recently did a Windows sprint some items have changed a tad.

Let me know if you have a problem with this William – I’m open to discussion and persuasion.

Updated by Nigel Kersten 8 months ago

  • Target version set to 2.0.0

This would be a behaviour change, and so should be targeted at 1.7.x

Updated by William Van Hevelingen 8 months ago

  • Do we need a new fact for ‘windowsrelease’? Can you tell me what value this might add?

I don’t have a strong reason, but its seems that using xp or 7 is easier than remembering kernel versions. Although, If I get some help we might be able to make it a regex instead of comparing to constants. I got stuck on the how to account for “2008 R2”

  • If there is value in windowsrelease … creating a new mswindows.rb util is unnecessary. Its only used for getting the release. Why don’t you just do that work in your ‘windowsrelease’ fact, and re-use the fact information in operatingsystem.rb?

will do

  • can you take a look at the recent changes to kernelrelease.rb and see if you can use the way we now do WMI queries as well?

yes

Other then that – once we get a version can you rebase and submit a pull request via git on that branch please? Sorry to be a hassle – its just easier for us :–). And since you’re doing it in github anyway I presume its easier for you as well :–).

yes

I’m going to mark this ‘Code Insufficient’ for now – but don’t get the wrong idea … the code is pretty good its just the organisation I’m commenting on here :–). And since we recently did a Windows sprint some items have changed a tad.

Thanks Ken! Also I might be around puppetlabs on friday if you want to chat.

Updated by Ken Barber 8 months ago

So my comment about ‘windowsrelease’ just be clear was more around me being dumb and wondering why it is separate from ‘operatingsystemrelease’ in your patch. What do you get from windowsrelease? Do you have sample output?

I’d love to catch up and chat – but I’m a London employee which means I’m normally far far away :–).

Updated by William Van Hevelingen 8 months ago

Ken Barber wrote:

So my comment about ‘windowsrelease’ just be clear was more around me being dumb and wondering why it is separate from ‘operatingsystemrelease’ in your patch. What do you get from windowsrelease? Do you have sample output?

oh windowsrelease is the caption returned by wmi and operatingsystemrelease is just the “7” from that caption.

If I finish the tests for #7643 and it gets merged then windowsrelease would be duplicated because it also returns caption. Maybe I should remove it from this commit.

C:\Users\blkperl>WMIC OS GET CAPTION

Microsoft Windows 7 Professional

C:\Users\blkperl>WMIC OS GET CAPTION

Microsoft Windows Server 2008 R2 Enterprise

Updated by Ken Barber 8 months ago

If I finish the tests for #7643 and it gets merged then windowsrelease would be duplicated because it also returns caption. Maybe I should remove it from this commit.

Leaving it out and have it displayed through your other WMI generic facility sounds like a more sound approach to me. I’m just conscientious about namespace clutter :–).

Updated by Michael Stahnke 8 months ago

  • Affected Facter version deleted (1.6.2rc1)

Updated by Ken Barber 6 months ago

  • Target version changed from 2.0.0 to 186

Updated by Daniel Pittman 2 months ago

  • Target version deleted (186)

Also available in: Atom PDF