Open codykonior opened 5 years ago
@mdaniou
Another option: we keep the string array, and if server names are passed in they will be used as normal.
If any single entry has parenthesis then each array entry will be parsed into their own groups.
‘Server1’, ‘Server2’ = Use the old style.
‘Server1’, ‘Server2’, ‘(Server3, Server4)’ = Use grouping style.
Details of the scenario you tried and the problem that is occurring
The SqlAGReplica resource accepts a ReadOnlyRoutingList of type [string[]]. On the SMO side this has a matching ReadOnlyRoutingList property of type StringCollection as that's how these lists were defined for SQL Server 2012 and 2014, and as of the latest patches should all be functional.
In SQL 2016 there's an additional SMO property LoadBalancedReadOnlyRoutingList of type System.Collections.Generic.IList<System.Collections.Generic.IList> and an associated read-only property of LoadBalancedReadOnlyRoutingListDisplayString. This is intended to allow the passing of server groups as follows:
The question is how the DSC resource should be modified to support this: