Creating consistent Distributed Port Groups with PowerCLI

I recently had to create a new vDS to replicate a standard vSwitch from another vCenter install. I wanted to create my vDS Distribute Port Groups (DPG) simply, but consistently. As I have a low number of DPGs to create, I could probably have done this manually, but scripting the creation ensures consistency. Plus, it’s a subset of PowerCLI that I wanted to familiarize myself with.

First, I created a vDS and a reference DPG through the vSphere Web Client. You can do this with PowerCLI, but you have to go down the rabbit hole of Views to touch some of the advanced settings, something that’s not well documented and would have been very time consuming for me to explore. I also didn’t mind creating the initial vDS and DPG as the visual view of the Web Client made it easy for me to verify the settings whereas a long string of PowerShell (PoSH) would have been a little more difficult to interpret.

Continue reading

Adding custom resolution values to MantisBT

Recently, one of our MantisBT users asked us for a custom resolution value. The MantisBT admin guide . In the last paragraph of the suggests this is possible, but doesn’t tell you how. The closest we get is a description on implementing custom status values, plus some questionable google results that require some interpretation. I’ve done the interpretation for you, so you don’t have to. There are two existing variables in the MantisBT code that define the default status values, $g_resolution_enum_string and $s_resolution_enum_string. I’ve shortened the output to just the lines we care about:

[rnelson0@mantis ~]$ grep -R resolution_enum_string /srv/www/mantis/config_defaults_inc.php /srv/www/mantis/lang/*english*
/srv/www/mantis/config_defaults_inc.php:        $g_resolution_enum_string                       = '10:open,20:fixed,30:reopened,40:unable to duplicate,50:not fixable,60:duplicate,70:not a bug,80:suspended,90:wont fix';
/srv/www/mantis/lang/strings_english.txt:$s_resolution_enum_string = '10:open,20:fixed,30:reopened,40:unable to reproduce,50:not fixable,60:duplicate,70:no change required,80:suspended,90:won\'t fix';

You may notice a slight difference – the global var says “unable to duplicate” and the other var says “unable to reproduce”. Without any modifications, “unable to reproduce” is seen by users so we’ll take the value of $s_resolution_enum_string and use it for both.

Continue reading