Fix OpenStack provider and improve unit tests