Refactor functions in eip.py

Refactor functions in eip.py for some similar codes.

Implements blueprint implement-ec2eip-updatable

Change-Id: I44d49fd1cc126b5cc318b9ccbe317623f6170ccf
Merge "Refactor functions in eip.py"