There is not a released blcli command to create a smart group. There are unreleased commands that could be made available via Professional Services to create smart groups. The complexity is adding one or more "SmartGroupCondition" to a smart group.
How do I get those? Call? Send email to our BL rep?
I was imagining something like this...
blcli SmartServerGroup createGroup (parentGroupId) (groupName)
blcli SmartServerGroup addProperty (groupId) (propertyKey) (propertyValue) (propertyCondition)
blcli SmartServerGroup setPropertyPolicy (groupId) (all|any)
blcli SmartServerGroup deleteGroup (groupId)
In the spirit of the season, here is a released command that will create a smart server group. This version is unsupported, mostly untested and comes with no warranty at all. Contact your Account Rep, TAM or Professional Services for a fully supported and tested solution.
To use the commands, simply copy the attached xml file into the br/xml/cli directory where blcli is installed.
Creating smart groups is then simple:
blcli SmartServerGroup createGroupWithParentNameAndProperty /Workspace NotwwwGroup HOST 6 www true
blcli SmartServerGroup createGroupWithParentName /Workspace wwwGroup
blcli SmartServerGroup addPropertyCondition /Workspace/wwwGroup HOST 5 www
blcli SmartServerGroup addPropertyCondition /Workspace/wwwGroup HOST 5 rh
blcli SmartServerGroup setMatchAll /Workspace/wwwGroup true
The numbers operators are operator_id numbers (5,6) and not operator names (contains, does not contain). The operator_id values are documented in the xml command file and are pulled from the sig_operator datbase table. A supported solution could provide a more elegant way to use operators.
Oh boy! It's just what I wanted!
Merry Christmas :)
I tryied adding SmartGroups under 7.0.2 and your extra commands and I am getting this error:
blcli SmartServerGroup createGroupWithParentName /RELMGT wwwGroup
Command execution failed. No loadNew command for model object 'SmartServerGroup' that takes 0 arguments
Do you have version which works with 7.0.2?
This is scheduled to be officially released in 7.2 (Maybach)
Defect - 14336
Enhancement requests 12664, 9725, 4724, 4722
Is there a blcli script for adding regular server groups..I have all mapped out in .xls format, can I somehow use that to import ?
That would be useful. Something that can take a CSV - we've been after something like that for quite a while.
blcli script to create a new regular group under root node under Servers (BL 8.0)
blcli -v defaultProfile -r BLAdmins StaticServerGroup createGroupWithParentName 'WORLD' /
the / means that it creates it under root
if you want to create a new reg group under another group called for example SolarisServers
blcli -v defaultProfile -r BLAdmins StaticServerGroup createGroupWithParentName 'WORLD' "/SolarisServers"