Skip to content
Snippets Groups Projects
Commit 9ac39915 authored by Lluis Gifre Renom's avatar Lluis Gifre Renom
Browse files

Merge branch...

Merge branch 'feat/171-e2e-orchestrator-component-has-wrong-service-name-in-constants-py' into 'release/3.0.1'

Resolve "E2E Orchestrator component has wrong service name in Constants.py"

See merge request !245
parents 6c4ef63c d1c7d0eb
No related branches found
No related tags found
1 merge request!245Resolve "E2E Orchestrator component has wrong service name in Constants.py" in R3
...@@ -58,7 +58,7 @@ class ServiceNameEnum(Enum): ...@@ -58,7 +58,7 @@ class ServiceNameEnum(Enum):
CACHING = 'caching' CACHING = 'caching'
TE = 'te' TE = 'te'
FORECASTER = 'forecaster' FORECASTER = 'forecaster'
E2EORCHESTRATOR = 'e2eorchestrator' E2EORCHESTRATOR = 'e2e-orchestrator'
OPTICALCONTROLLER = 'opticalcontroller' OPTICALCONTROLLER = 'opticalcontroller'
BGPLS = 'bgpls-speaker' BGPLS = 'bgpls-speaker'
......
...@@ -12,7 +12,7 @@ ...@@ -12,7 +12,7 @@
# See the License for the specific language governing permissions and # See the License for the specific language governing permissions and
# limitations under the License. # limitations under the License.
import logging, os, time import logging, os, re, time
from typing import Dict, List from typing import Dict, List
from common.Constants import ( from common.Constants import (
DEFAULT_GRPC_BIND_ADDRESS, DEFAULT_GRPC_GRACE_PERIOD, DEFAULT_GRPC_MAX_WORKERS, DEFAULT_HTTP_BIND_ADDRESS, DEFAULT_GRPC_BIND_ADDRESS, DEFAULT_GRPC_GRACE_PERIOD, DEFAULT_GRPC_MAX_WORKERS, DEFAULT_HTTP_BIND_ADDRESS,
...@@ -68,7 +68,8 @@ def get_setting(name, **kwargs): ...@@ -68,7 +68,8 @@ def get_setting(name, **kwargs):
raise Exception('Setting({:s}) not specified in environment or configuration'.format(str(name))) raise Exception('Setting({:s}) not specified in environment or configuration'.format(str(name)))
def get_env_var_name(service_name : ServiceNameEnum, env_var_group): def get_env_var_name(service_name : ServiceNameEnum, env_var_group):
return ('{:s}SERVICE_{:s}'.format(service_name.value, env_var_group)).upper() service_name = re.sub(r'[^a-zA-Z0-9]', '_', service_name.value)
return ('{:s}SERVICE_{:s}'.format(service_name, env_var_group)).upper()
def get_service_host(service_name : ServiceNameEnum): def get_service_host(service_name : ServiceNameEnum):
envvar_name = get_env_var_name(service_name, ENVVAR_SUFIX_SERVICE_HOST) envvar_name = get_env_var_name(service_name, ENVVAR_SUFIX_SERVICE_HOST)
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment