Loading hackfest/mock_osm/__main__.py +0 −2 Original line number Diff line number Diff line Loading @@ -58,13 +58,11 @@ SERVICE_CONNECTION_POINTS = [ class MockOSMShell(cmd.Cmd): intro = 'Welcome to the MockOSM shell.\nType help or ? to list commands.\n' prompt = '(mock-osm) ' file = None def __init__(self, *args, **kwargs) -> None: super().__init__(*args, **kwargs) self.mock_osm = MockOSM(WIM_URL, WIM_PORT_MAPPING, WIM_USERNAME, WIM_PASSWORD) # ----- basic turtle commands ----- def do_create(self, arg): 'Create an ELINE (L2) service' service_uuid = self.mock_osm.create_connectivity_service( Loading manifests/sliceservice.yaml +1 −1 Original line number Diff line number Diff line Loading @@ -38,7 +38,7 @@ spec: - name: LOG_LEVEL value: "INFO" - name: SLICE_GROUPING value: "ENABLE" value: "DISABLE" envFrom: - secretRef: name: qdb-data Loading src/compute/service/rest_server/nbi_plugins/ietf_l2vpn/L2VPN_SiteNetworkAccesses.py +1 −1 Original line number Diff line number Diff line Loading @@ -113,7 +113,7 @@ def process_site_network_access(context_client : ContextClient, site_id : str, s location_endpoints.setdefault(str_location_id, set()).add(str_endpoint_id) num_endpoints_per_location = {len(endpoints) for endpoints in location_endpoints.values()} num_disjoint_paths = min(num_endpoints_per_location) update_constraint_sla_availability(constraints, num_disjoint_paths, all_active) update_constraint_sla_availability(constraints, num_disjoint_paths, all_active, 0.0) return target Loading src/context/service/database/ConfigRule.py +4 −4 Original line number Diff line number Diff line Loading @@ -80,7 +80,7 @@ def compose_config_rules_data( return dict_config_rules def upsert_config_rules( session : Session, config_rules : List[Dict], session : Session, config_rules : List[Dict], is_delete : bool = False, device_uuid : Optional[str] = None, service_uuid : Optional[str] = None, slice_uuid : Optional[str] = None, ) -> bool: uuids_to_delete : Set[str] = set() Loading @@ -89,7 +89,9 @@ def upsert_config_rules( for config_rule in config_rules: configrule_uuid = config_rule['configrule_uuid'] configrule_action = config_rule['action'] if configrule_action == ORM_ConfigActionEnum.SET: if is_delete or configrule_action == ORM_ConfigActionEnum.DELETE: uuids_to_delete.add(configrule_uuid) elif configrule_action == ORM_ConfigActionEnum.SET: position = uuids_to_upsert.get(configrule_uuid) if position is None: # if not added, add it Loading @@ -98,8 +100,6 @@ def upsert_config_rules( else: # if already added, update occurrence rules_to_upsert[position] = config_rule elif configrule_action == ORM_ConfigActionEnum.DELETE: uuids_to_delete.add(configrule_uuid) else: MSG = 'Action for ConfigRule({:s}) is not supported '+\ '(device_uuid={:s}, service_uuid={:s}, slice_uuid={:s})' Loading src/context/service/database/Constraint.py +2 −2 Original line number Diff line number Diff line Loading @@ -81,7 +81,7 @@ def compose_constraints_data( return dict_constraints def upsert_constraints( session : Session, constraints : List[Dict], session : Session, constraints : List[Dict], is_delete : bool = False, service_uuid : Optional[str] = None, slice_uuid : Optional[str] = None ) -> bool: uuids_to_upsert : Dict[str, int] = dict() Loading Loading @@ -111,7 +111,7 @@ def upsert_constraints( delete_affected = int(constraint_deletes.rowcount) > 0 upsert_affected = False if len(constraints) > 0: if not is_delete and len(constraints) > 0: stmt = insert(ConstraintModel).values(constraints) stmt = stmt.on_conflict_do_update( index_elements=[ConstraintModel.constraint_uuid], Loading Loading
hackfest/mock_osm/__main__.py +0 −2 Original line number Diff line number Diff line Loading @@ -58,13 +58,11 @@ SERVICE_CONNECTION_POINTS = [ class MockOSMShell(cmd.Cmd): intro = 'Welcome to the MockOSM shell.\nType help or ? to list commands.\n' prompt = '(mock-osm) ' file = None def __init__(self, *args, **kwargs) -> None: super().__init__(*args, **kwargs) self.mock_osm = MockOSM(WIM_URL, WIM_PORT_MAPPING, WIM_USERNAME, WIM_PASSWORD) # ----- basic turtle commands ----- def do_create(self, arg): 'Create an ELINE (L2) service' service_uuid = self.mock_osm.create_connectivity_service( Loading
manifests/sliceservice.yaml +1 −1 Original line number Diff line number Diff line Loading @@ -38,7 +38,7 @@ spec: - name: LOG_LEVEL value: "INFO" - name: SLICE_GROUPING value: "ENABLE" value: "DISABLE" envFrom: - secretRef: name: qdb-data Loading
src/compute/service/rest_server/nbi_plugins/ietf_l2vpn/L2VPN_SiteNetworkAccesses.py +1 −1 Original line number Diff line number Diff line Loading @@ -113,7 +113,7 @@ def process_site_network_access(context_client : ContextClient, site_id : str, s location_endpoints.setdefault(str_location_id, set()).add(str_endpoint_id) num_endpoints_per_location = {len(endpoints) for endpoints in location_endpoints.values()} num_disjoint_paths = min(num_endpoints_per_location) update_constraint_sla_availability(constraints, num_disjoint_paths, all_active) update_constraint_sla_availability(constraints, num_disjoint_paths, all_active, 0.0) return target Loading
src/context/service/database/ConfigRule.py +4 −4 Original line number Diff line number Diff line Loading @@ -80,7 +80,7 @@ def compose_config_rules_data( return dict_config_rules def upsert_config_rules( session : Session, config_rules : List[Dict], session : Session, config_rules : List[Dict], is_delete : bool = False, device_uuid : Optional[str] = None, service_uuid : Optional[str] = None, slice_uuid : Optional[str] = None, ) -> bool: uuids_to_delete : Set[str] = set() Loading @@ -89,7 +89,9 @@ def upsert_config_rules( for config_rule in config_rules: configrule_uuid = config_rule['configrule_uuid'] configrule_action = config_rule['action'] if configrule_action == ORM_ConfigActionEnum.SET: if is_delete or configrule_action == ORM_ConfigActionEnum.DELETE: uuids_to_delete.add(configrule_uuid) elif configrule_action == ORM_ConfigActionEnum.SET: position = uuids_to_upsert.get(configrule_uuid) if position is None: # if not added, add it Loading @@ -98,8 +100,6 @@ def upsert_config_rules( else: # if already added, update occurrence rules_to_upsert[position] = config_rule elif configrule_action == ORM_ConfigActionEnum.DELETE: uuids_to_delete.add(configrule_uuid) else: MSG = 'Action for ConfigRule({:s}) is not supported '+\ '(device_uuid={:s}, service_uuid={:s}, slice_uuid={:s})' Loading
src/context/service/database/Constraint.py +2 −2 Original line number Diff line number Diff line Loading @@ -81,7 +81,7 @@ def compose_constraints_data( return dict_constraints def upsert_constraints( session : Session, constraints : List[Dict], session : Session, constraints : List[Dict], is_delete : bool = False, service_uuid : Optional[str] = None, slice_uuid : Optional[str] = None ) -> bool: uuids_to_upsert : Dict[str, int] = dict() Loading Loading @@ -111,7 +111,7 @@ def upsert_constraints( delete_affected = int(constraint_deletes.rowcount) > 0 upsert_affected = False if len(constraints) > 0: if not is_delete and len(constraints) > 0: stmt = insert(ConstraintModel).values(constraints) stmt = stmt.on_conflict_do_update( index_elements=[ConstraintModel.constraint_uuid], Loading