added the set polarity command

Change-Id: I6d4ae1d95c755f58cc9a82823eae8f9094bdb361