Reorganize endpoint create code
Reorganize endpoint create code

Group the code for v2.0 in a single if statement. Idem for v3

Change-Id: I12f9a571b33b38e9e0e75fe11c877cca4905e78c

openstack/python-openstacksdk,openstack-infra/shade,openstack/python-openstacksdk,stackforge/python-openstacksdk,dtroyer/python-openstacksdk,openstack-infra/shade,stackforge/python-openstacksdk,dtroyer/python-openstacksdk