AnsweredAssumed Answered

Create Asset Tag as a subset of an existing Tag

Question asked by Abhijith Nair on Nov 16, 2016
Latest reply on Jan 2, 2017 by Abhijith Nair

I'm trying to use Regex to create an asset Tag from an already existing Asset Tag.

There are many asset Tags that are created with different parameters.

Tag A is created using Groovy and has the IP range written on it. Tag A contains all Linux, Network device, Windows Server and client OS. From Tag A am creating Tag B that would only have Windows Server OS. I created a Child Tag to the Tag A with the regex ' ^Windows .*Server((?!\/).)*$ '. However this gets information from the entire set and shows a wholesome value. 

Any help would be appreciated. If the Regex to find Tag name can be provided that could also do the trick.

Groovy script could also help by using the 

if(asset.getAssetType()!=Asset.AssetType.HOST) return false;
if(!asset.hasTag("Tag A")) return false;

But after this my syntax does not detect the OS type. 

 

My Groovy doesn't seem to be Groovy enough :-( . Any help is appreciated.

Outcomes