Migrating optical plugin to use Enum

Change-Id: Ib434265ba366678973cdb50aeea55726a5b64f08