Coder Social home page Coder Social logo

puppet-wmi_obj's People

Contributors

badgerious avatar

Stargazers

 avatar  avatar  avatar

Watchers

 avatar  avatar  avatar

puppet-wmi_obj's Issues

Potential Logic change to fix long query time

Hello badgerious,

I was attempting to use your module to manage a large number of wmi objects. There is a 20 second delay if a wmi query is run with properties set to empty strings. In my use case there are some properties which are key properties of the wmi object, they do not need to be set, but must be created as they are key properties.

The validation in your module forces me to set these empty properties in the resource definition, which results in > 45 minute execution time for the puppet run (I have 92 wmi objects to create).

When I create these wmi objects with powershell if I omit the 'empty' key properties they are created anyway.

I have re-worked your module somewhat to do the following:

  1. create all the key properties whether defined in the resource def or not.
  2. only check the values of the properties defined in the resource def.
  3. only use the defined properties in the catalog alias

This has the benefit of still allowing an empty wmi_obj paramter to be defined if it is desirable to enforce an empty state, while removing the burden on the puppet user to define values for key properties that they are not interested in.

I can share the changes I have made if they are more widely considered useful, I'm not sure if the logic is generally acceptable or if it is specific to my use case.

Cheers,

Peter.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.