Hi Modi,
You could use an SQL Query to generate a query result based on the input of another variable, to make it a dynamic enum of sorts. You'll need to select from a table but there is an in-built temporary table in MySQL and Oracle for this purpose called 'dual'.
Here's an example that would enable cifs/iscsi for *Windows services, iscsi/nfs/fcp for *ESX and iscsi/nfs for *nix (Linux/Unix). You could use equals if you wand an exact match. Just add another OR to the line to create more services that are enabled for each protocol.
select 'cifs' as protocol from dual WHERE '${service}' LIKE "%Windows" union
select 'iscsi' as protocol from dual WHERE '${service}' LIKE "%Windows" OR '${service}' LIKE "%ESX" OR '${service}' LIKE "%nix" union
select 'nfs' as protocol from dual WHERE '${service}' LIKE "%ESX" OR '${service}' LIKE "%nix" union
select 'fcp' as protocol from dual WHERE '${service}' LIKE "%ESX"
Or for the specific example above:
select 'cifs' as protocol from dual WHERE '${Platform}' EQUALS "File_Storage_Windows" union
select 'nfs' as protocol from dual WHERE '${Platform}' EQUALS "File_Storage_UNIX" OR '${Platform}' EQUALS "File_Storage_Virtualization" union
select 'iscsi' as protocol from dual WHERE '${Platform}' EQUALS "Block_Storage" union
select 'fcp' as protocol from dual WHERE '${Platform}' EQUALS "Block_Storage"
It may be better to use technology-specific names, as ESX virtualization would present data stores differently to Hyper-V virtualization for instance.
Kind Regards,
Michael Goddard.