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

Merge branch 'develop' of ssh://gifrerenom_labs.etsi.org/tfs/controller into...

Merge branch 'develop' of ssh://gifrerenom_labs.etsi.org/tfs/controller into feat/191-cttc-implement-telemetry-backend-collector-emulated
parents 44677262 2e9f9cb2
No related branches found
No related tags found
2 merge requests!359Release TeraFlowSDN 5.0,!287Resolve "(CTTC) Implement Telemetry Backend Collector Emulated"
...@@ -44,11 +44,11 @@ spec: ...@@ -44,11 +44,11 @@ spec:
- name: WS_IP_HOST - name: WS_IP_HOST
value: "nbiservice.tfs-ip.svc.cluster.local" value: "nbiservice.tfs-ip.svc.cluster.local"
- name: WS_IP_PORT - name: WS_IP_PORT
value: 8761 value: "8761"
- name: WS_E2E_HOST - name: WS_E2E_HOST
value: "e2e-orchestratorservice.tfs-e2e.svc.cluster.local" value: "e2e-orchestratorservice.tfs-e2e.svc.cluster.local"
- name: WS_E2E_PORT - name: WS_E2E_PORT
value: 8762 value: "8762"
readinessProbe: readinessProbe:
exec: exec:
command: ["/bin/grpc_health_probe", "-addr=:10050"] command: ["/bin/grpc_health_probe", "-addr=:10050"]
......
...@@ -45,7 +45,7 @@ spec: ...@@ -45,7 +45,7 @@ spec:
- name: IETF_NETWORK_RENDERER - name: IETF_NETWORK_RENDERER
value: "LIBYANG" value: "LIBYANG"
- name: WS_E2E_PORT - name: WS_E2E_PORT
value: 8762 value: "8762"
readinessProbe: readinessProbe:
exec: exec:
command: ["/bin/grpc_health_probe", "-addr=:9090"] command: ["/bin/grpc_health_probe", "-addr=:9090"]
......
...@@ -41,9 +41,9 @@ spec: ...@@ -41,9 +41,9 @@ spec:
- name: LOG_LEVEL - name: LOG_LEVEL
value: "INFO" value: "INFO"
- name: WS_IP_PORT - name: WS_IP_PORT
value: 8761 value: "8761"
- name: WS_E2E_PORT - name: WS_E2E_PORT
value: 8762 value: "8762"
readinessProbe: readinessProbe:
exec: exec:
command: ["/bin/grpc_health_probe", "-addr=:10080"] command: ["/bin/grpc_health_probe", "-addr=:10080"]
......
...@@ -48,6 +48,8 @@ def validate_device_driver_enum(message): ...@@ -48,6 +48,8 @@ def validate_device_driver_enum(message):
'DEVICEDRIVER_GNMI_OPENCONFIG', 'DEVICEDRIVER_GNMI_OPENCONFIG',
'DEVICEDRIVER_OPTICAL_TFS', 'DEVICEDRIVER_OPTICAL_TFS',
'DEVICEDRIVER_IETF_ACTN', 'DEVICEDRIVER_IETF_ACTN',
'DEVICEDRIVER_OC',
'DEVICEDRIVER_QKD',
] ]
def validate_device_operational_status_enum(message): def validate_device_operational_status_enum(message):
...@@ -58,6 +60,20 @@ def validate_device_operational_status_enum(message): ...@@ -58,6 +60,20 @@ def validate_device_operational_status_enum(message):
'DEVICEOPERATIONALSTATUS_ENABLED' 'DEVICEOPERATIONALSTATUS_ENABLED'
] ]
def validate_isolation_level_enum(message):
assert isinstance(message, str)
assert message in [
'NO_ISOLATION',
'PHYSICAL_ISOLATION',
'LOGICAL_ISOLATION',
'PROCESS_ISOLATION',
'PHYSICAL_MEMORY_ISOLATION',
'PHYSICAL_NETWORK_ISOLATION',
'VIRTUAL_RESOURCE_ISOLATION',
'NETWORK_FUNCTIONS_ISOLATION',
'SERVICE_ISOLATION',
]
def validate_kpi_sample_types_enum(message): def validate_kpi_sample_types_enum(message):
assert isinstance(message, str) assert isinstance(message, str)
assert message in [ assert message in [
...@@ -70,6 +86,16 @@ def validate_kpi_sample_types_enum(message): ...@@ -70,6 +86,16 @@ def validate_kpi_sample_types_enum(message):
'KPISAMPLETYPE_LINK_USED_CAPACITY_GBPS', 'KPISAMPLETYPE_LINK_USED_CAPACITY_GBPS',
] ]
def validate_link_type_enum(message):
assert isinstance(message, str)
assert message in [
'LINKTYPE_UNKNOWN',
'LINKTYPE_COPPER',
'LINKTYPE_VIRTUAL_COPPER',
'LINKTYPE_OPTICAL',
'LINKTYPE_VIRTUAL_OPTICAL',
]
def validate_service_type_enum(message): def validate_service_type_enum(message):
assert isinstance(message, str) assert isinstance(message, str)
assert message in [ assert message in [
...@@ -79,6 +105,8 @@ def validate_service_type_enum(message): ...@@ -79,6 +105,8 @@ def validate_service_type_enum(message):
'SERVICETYPE_TAPI_CONNECTIVITY_SERVICE', 'SERVICETYPE_TAPI_CONNECTIVITY_SERVICE',
'SERVICETYPE_TE', 'SERVICETYPE_TE',
'SERVICETYPE_E2E', 'SERVICETYPE_E2E',
'SERVICETYPE_OPTICAL_CONNECTIVITY',
'SERVICETYPE_QKD',
] ]
def validate_service_state_enum(message): def validate_service_state_enum(message):
...@@ -148,6 +176,22 @@ def validate_constraint_custom(message): ...@@ -148,6 +176,22 @@ def validate_constraint_custom(message):
assert 'constraint_value' in message assert 'constraint_value' in message
assert isinstance(message['constraint_value'], str) assert isinstance(message['constraint_value'], str)
def validate_constraint_schedule(message):
assert isinstance(message, dict)
assert len(message.keys()) == 2
assert 'start_timestamp' in message
assert isinstance(message['start_timestamp'], (int, float))
assert 'duration_days' in message
assert isinstance(message['duration_days'], (int, float))
def validate_constraint_endpoint_priority(message):
assert isinstance(message, dict)
assert len(message.keys()) == 2
assert 'endpoint_id' in message
validate_endpoint_id(message['endpoint_id'])
assert 'priority' in message
assert isinstance(message['priority'], int)
def validate_constraint_sla_capacity(message): def validate_constraint_sla_capacity(message):
assert isinstance(message, dict) assert isinstance(message, dict)
assert len(message.keys()) == 1 assert len(message.keys()) == 1
...@@ -172,16 +216,25 @@ def validate_constraint_sla_availability(message): ...@@ -172,16 +216,25 @@ def validate_constraint_sla_availability(message):
assert isinstance(message['availability'], (int, float)) assert isinstance(message['availability'], (int, float))
assert message['availability'] >= 0 and message['availability'] <= 100 assert message['availability'] >= 0 and message['availability'] <= 100
def validate_constraint_sla_isolation(message):
assert isinstance(message, dict)
assert len(message.keys()) == 1
assert 'isolation_level' in message
assert isinstance(message['isolation_level'], list)
for isolation_level in message['isolation_level']:
validate_isolation_level_enum(isolation_level)
CONSTRAINT_TYPE_TO_VALIDATOR = { CONSTRAINT_TYPE_TO_VALIDATOR = {
'custom' : validate_constraint_custom, 'custom' : validate_constraint_custom,
#'schedule' : validate_constraint_schedule, 'schedule' : validate_constraint_schedule,
#'endpoint_location' : validate_constraint_endpoint_location, #'endpoint_location' : validate_constraint_endpoint_location,
#'endpoint_priority' : validate_constraint_endpoint_priority, 'endpoint_priority' : validate_constraint_endpoint_priority,
'sla_capacity' : validate_constraint_sla_capacity, 'sla_capacity' : validate_constraint_sla_capacity,
'sla_latency' : validate_constraint_sla_latency, 'sla_latency' : validate_constraint_sla_latency,
'sla_availability' : validate_constraint_sla_availability, 'sla_availability' : validate_constraint_sla_availability,
#'sla_isolation' : validate_constraint_sla_isolation, 'sla_isolation' : validate_constraint_sla_isolation,
#'exclusions' : validate_constraint_exclusions, #'exclusions' : validate_constraint_exclusions,
#'qos_profile' : validate_constraint_qos_profile,
} }
def validate_constraint(message): def validate_constraint(message):
...@@ -479,7 +532,7 @@ def validate_device(message): ...@@ -479,7 +532,7 @@ def validate_device(message):
def validate_link(message): def validate_link(message):
assert isinstance(message, dict) assert isinstance(message, dict)
assert len(message.keys()) == 4 assert len(message.keys()) == 5
assert 'link_id' in message assert 'link_id' in message
validate_link_id(message['link_id']) validate_link_id(message['link_id'])
assert 'name' in message assert 'name' in message
...@@ -489,6 +542,8 @@ def validate_link(message): ...@@ -489,6 +542,8 @@ def validate_link(message):
for endpoint_id in message['link_endpoint_ids']: validate_endpoint_id(endpoint_id) for endpoint_id in message['link_endpoint_ids']: validate_endpoint_id(endpoint_id)
assert 'attributes' in message assert 'attributes' in message
validate_link_attributes(message['attributes']) validate_link_attributes(message['attributes'])
assert 'link_type' in message
validate_link_type_enum(message['link_type'])
def validate_connection(message): def validate_connection(message):
assert isinstance(message, dict) assert isinstance(message, dict)
......
...@@ -13,9 +13,9 @@ ...@@ -13,9 +13,9 @@
# limitations under the License. # limitations under the License.
# build, tag and push the Docker image to the gitlab registry # build, tag and push the Docker image to the gitlab registry
build e2eorchestrator: build e2e_orchestrator:
variables: variables:
IMAGE_NAME: 'e2eorchestrator' # name of the microservice IMAGE_NAME: 'e2e_orchestrator' # name of the microservice
IMAGE_TAG: 'latest' # tag of the container image (production, development, etc) IMAGE_TAG: 'latest' # tag of the container image (production, development, etc)
stage: build stage: build
before_script: before_script:
......
...@@ -34,7 +34,7 @@ vnt_manager_client: VNTManagerClient = VNTManagerClient() ...@@ -34,7 +34,7 @@ vnt_manager_client: VNTManagerClient = VNTManagerClient()
context_client: ContextClient = ContextClient() context_client: ContextClient = ContextClient()
ALL_HOSTS = "0.0.0.0" ALL_HOSTS = "0.0.0.0"
WS_E2E_PORT = str(get_setting('WS_E2E_PORT')) WS_E2E_PORT = int(get_setting('WS_E2E_PORT', default='8762'))
LOGGER = logging.getLogger(__name__) LOGGER = logging.getLogger(__name__)
......
...@@ -20,4 +20,4 @@ include: ...@@ -20,4 +20,4 @@ include:
#- local: '/src/tests/nfvsdn22/.gitlab-ci.yml' #- local: '/src/tests/nfvsdn22/.gitlab-ci.yml'
#- local: '/src/tests/ofc23/.gitlab-ci.yml' #- local: '/src/tests/ofc23/.gitlab-ci.yml'
- local: '/src/tests/ofc24/.gitlab-ci.yml' - local: '/src/tests/ofc24/.gitlab-ci.yml'
- local: '/src/tests/ecoc24/.gitlab-ci.yml' #- local: '/src/tests/ecoc24/.gitlab-ci.yml'
...@@ -13,9 +13,9 @@ ...@@ -13,9 +13,9 @@
# limitations under the License. # limitations under the License.
# build, tag and push the Docker image to the gitlab registry # build, tag and push the Docker image to the gitlab registry
build vntmanager: build vnt_manager:
variables: variables:
IMAGE_NAME: 'vntmanager' # name of the microservice IMAGE_NAME: 'vnt_manager' # name of the microservice
IMAGE_TAG: 'latest' # tag of the container image (production, development, etc) IMAGE_TAG: 'latest' # tag of the container image (production, development, etc)
stage: build stage: build
before_script: before_script:
......
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