Enrichment rule for setting up locaton value based on hostname

Dear Experts,

 

Can anyone suggest me how to setup a location attribute value of a node based on hostname.

 

for example:

availabe attribute

attribute name is  Name(host name of the node) = xyzgwd12345(xyz=Banglore, gw= ground floor, d = desktop)   and xyzfwn12345(banglore, fw = first floor, note = notebook)

 

attribute values to be set if name is xyzgwd12345

 

calculated location = Banglore - Ground Floor

Noderole = desktop

 

name is xyzfwn12345

 

location should be = Banglore- Firstfloor

Noderole is laptop or notebook

 

can any one help me on this.

 

Thanks in advance

 

Best Regards,

Pyalcari