- if os.environ.get('OS_ENDPOINT_TYPE') is not None:
- rconfig.set('identity', 'v3_endpoint_type',
- os.environ.get('OS_ENDPOINT_TYPE'))
-
- if os.environ.get('OS_ENDPOINT_TYPE') is not None:
- sections = rconfig.sections()
- services_list = [
- 'compute', 'volume', 'image', 'network', 'data-processing',
- 'object-storage', 'orchestration']
- for service in services_list:
- if service not in sections:
- rconfig.add_section(service)
- rconfig.set(service, 'endpoint_type',
- os.environ.get('OS_ENDPOINT_TYPE'))
+ rconfig.set(
+ 'identity', 'v3_endpoint_type',
+ os.environ.get('OS_INTERFACE', 'public'))
+
+ sections = rconfig.sections()
+ services_list = [
+ 'compute', 'volume', 'image', 'network', 'data-processing',
+ 'object-storage', 'orchestration']
+ for service in services_list:
+ if service not in sections:
+ rconfig.add_section(service)
+ rconfig.set(
+ service, 'endpoint_type', os.environ.get('OS_INTERFACE', 'public'))