Extracted keypairs functionality from nova

Change-Id: Ia01029e0f0a53e557aea62aebae83d3f0a34085c