Can I create a fixlet to create a custom fixlet?

I’d like to explore the idea of creating a fixlet from another fixlet. I need the be able to control the relevance and action script of the target fixlet.

Not sure I understand the use case. What’s the purpose?

The main idea is to create a custom fixlet with certain inputs/variables from the main fixlet based on criteria provided by the BES admin. It’s an exploratory path in an attempted to reduce redundant work.
For example, traditionally the admin will need to create 10 fixlets for 10 applications based on specific relevance, I’m trying to see if we can achieve the same results using 1 fixlet that will create the other 10 fixlets based on the supplied inputs/variable.

Ok, to me that doesn’t sound so much like “Fixlet creating a Fixlet”, but rather “Create a reusable Template for Fixlets”.

There actually are several approaches to this, and in fact internally we do use a few of them.

The first point to understand is how to POST a Fixlet to the server from an XML file using the REST API. https://developer.bigfix.com should be helpful. Start by exporting an existing Fixlet and then importing it to a new Fixlet using the REST API.

Then you can move on to replacing specific tags so each new copy of the Fixlet is customized in some way. You could start by manually doing the replacements in Notepad, or write a script in Python or PowerShell or whatever language you choose, to prompt the user for replacements to make, update the XML, and POST it as a new Fixlet.

The options there are limitless. Once you’re comfortable with it you could consider using a templating markup language like Mustache. The Python ‘chevron’ library is one that we sometimes use to apply customizations to generate BES files from Mustache templates.

1 Like