Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

updates for handling modify on network services with peered interfaces #388

Merged
merged 1 commit into from
Jun 26, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 8 additions & 2 deletions fabric_cf/actor/core/kernel/reservation_client.py
Original file line number Diff line number Diff line change
Expand Up @@ -505,12 +505,18 @@ def prepare_ticket(self, extend: bool = False):
parent_res = pred_state.get_reservation()

if Constants.PEERED in value1:
self.logger.debug(f"KOMAL --- Node MAP:{ifs.get_node_map()} Result: {result}")
if parent_res is not None:
ns_sliver = parent_res.get_resources().get_sliver()
# component_name contains => Peered:<peered ns id>:<peer ifs name>
al2s_ifs = ns_sliver.interface_info.interfaces.get(result[2])
ifs.labels = Labels.update(ifs.labels, vlan=al2s_ifs.labels.vlan)
ifs.set_node_map(node_map=(Constants.PEERED, value2))
if al2s_ifs:
ifs.labels = Labels.update(ifs.labels, vlan=al2s_ifs.labels.vlan)
ifs.set_node_map(node_map=(Constants.PEERED, value2))
else:
msg = f"Could not determine al2s_ifs: {al2s_ifs} result: {result}"
self.logger.error(msg)
self.fail(message=msg)
continue

if parent_res is not None and (parent_res.is_ticketed() or parent_res.is_active()):
Expand Down
13 changes: 13 additions & 0 deletions fabric_cf/actor/core/policy/broker_simpler_units_policy.py
Original file line number Diff line number Diff line change
Expand Up @@ -820,6 +820,19 @@ def __allocate_services(self, *, rid: ID, inv: NetworkServiceInventory, sliver:
if owner_v4_service and owner_v4_service.get_labels():
ero_source_end_info.append((owner_switch.node_id, owner_v4_service.get_labels().ipv4))

if not owner_ns:
bqm_graph_id, bqm_node_id = sliver.get_node_map()
owner_ns, owner_switch = self.get_network_service_from_graph(node_id=bqm_node_id,
parent=True)
owner_mpls_ns = None
if owner_switch:
for ns in owner_switch.network_service_info.network_services.values():
if ServiceType.MPLS == ns.get_type():
owner_mpls_ns = ns
break
delegation_id, delegated_label = InventoryForType.get_delegations(lab_cap_delegations=
owner_ns.get_label_delegations())

# Update the Network Service Sliver Node Map to map to parent of (a)
sliver.set_node_map(node_map=(self.combined_broker_model_graph_id, owner_ns_id))

Expand Down