Commit 3edbea8a authored by Andrea Sgambelluri's avatar Andrea Sgambelluri
Browse files

Port optical controller P2MP + alarm/failover engine onto develop

Brings the ECOC26 demo's optical-channel monitoring, alarm evaluation,
and T1.1<->T1.2 failover/revert pipeline onto develop, since the
original feature branch had no shared git history with develop and
could not be merged directly.

Ported as a hand-picked set of changes (not a wholesale copy) after
tracing the real runtime dependency chain end to end, rather than
carrying over unrelated drift accumulated on the old branch:

- opticalcontroller/: full P2MP RSA engine, alarm evaluation and
  confirm/mute/revert state machine, auto-resolved NBI/DeviceService
  addresses instead of hardcoded IPs.
- proto: new DeviceDriverEnum.DEVICEDRIVER_NETCONF_OC_PLUGGABLE,
  PolicyRuleActionEnum.POLICY_RULE_ACTION_GENERATE_FAILURE_NOTIFICATION,
  Collector.coll_meta_info, and the pluggable KPI sample types -- all
  additive, appended rather than renumbering existing values.
- automation: PluggablesZSMPlugin (was entirely missing on develop --
  without it the ZSM pipeline matched no handler), PolicyClient.PolicyDelete,
  and the drop-database-on-shutdown removal that raced against a rolling
  restart's own create_database().
- telemetry backend: meta-info-based collector routing
  (get_collector_by_meta_info/get_by_meta_info) for pluggable KPIs whose
  driver isn't in the device's registered driver list, the NETCONF OC
  collector implementation, and a real concurrency fix (per-collector-id
  tracking instead of one shared instance attribute).
- policy (Java): alarm-forwarding to OpticalController on every sample,
  not just breaches, added without changing the one existing caller's
  signature.
- analytics backend: per-streamer Kafka consumer groups (shared group
  id was silently dropping samples across concurrent analyzers) and a
  batch-size-or-window-size trigger.
- device drivers: oc_driver template/discovery updates and the
  subcarrier_groups REST API.
- pathcomp: fixed its own separate hardcoded OpticalController address.

Explicitly left untouched: pluggables/, nbi/dscm_oc/, and proto/pluggables.proto,
which have evolved independently and further on develop; porting the
older versions here would be a regression.

Verified: full 4-cycle alarm lifecycle regression test (link down -> up
-> fault -> failover -> backup confirm/mute -> revert -> gate reset)
passes cleanly against a from-scratch build+deploy of all 8 touched
services on this branch.

Co-Authored-By: default avatarClaude Sonnet 5 <noreply@anthropic.com>
parent 6c3e4c4c
Loading
Loading
Loading
Loading
+4 −0
Changes for manifests/opticalcontrollerservice.yaml: 4 added lines, 0 removed lines.
Original line number Diff line number Diff line
@@ -37,6 +37,10 @@ spec:
          env:
            - name: LOG_LEVEL
              value: "INFO"
            - name: ECOC26_HUB_DEVICE_ID
              value: "T2.1"
            - name: ECOC26_LEAF_DEVICE_ID
              value: "T1.1"
          #readinessProbe:
          #  exec:
          #    command: ["/bin/grpc_health_probe", "-addr=:10060"]
+1 −0
Changes for proto/context.proto: 1 added line, 0 removed lines.
Original line number Diff line number Diff line
@@ -261,6 +261,7 @@ enum DeviceDriverEnum {
  DEVICEDRIVER_OPENROADM = 20;
  DEVICEDRIVER_RESTCONF_OPENCONFIG = 21;
  DEVICEDRIVER_CUSTOM_IPOWDM = 22;
  DEVICEDRIVER_NETCONF_OC_PLUGGABLE = 23; // NETCONF/OpenConfig driver for pluggable optical transceivers
}

enum DeviceOperationalStatusEnum {
+8 −0
Changes for proto/kpi_sample_types.proto: 8 added lines, 0 removed lines.
Original line number Diff line number Diff line
@@ -75,4 +75,12 @@ enum KpiSampleType {

    KPISAMPLETYPE_INT_IS_DROP        = 2201;
    KPISAMPLETYPE_INT_DROP_REASON    = 2202;

    // PLUGGABLES
    KPISAMPLETYPE_PRE_FEC_BER_PLUGGABLE    = 2301;
    KPISAMPLETYPE_RECEIVED_POWER_PLUGGABLE = 2302;

    // PLUGGABLES Aggregated Output KPIs
    KPISAMPLETYPE_PRE_FEC_BER_PLUGGABLE_AGG_OUTPUT    = 3301;
    KPISAMPLETYPE_RECEIVED_POWER_PLUGGABLE_AGG_OUTPUT = 3302;
}
+1 −0
Changes for proto/policy_action.proto: 1 added line, 0 removed lines.
Original line number Diff line number Diff line
@@ -28,6 +28,7 @@ enum PolicyRuleActionEnum {
  POLICYRULE_ACTION_ADD_SERVICE_CONSTRAINT = 3;
  POLICY_RULE_ACTION_CALL_SERVICE_RPC = 4;
  POLICY_RULE_ACTION_RECALCULATE_PATH = 5;
  POLICY_RULE_ACTION_GENERATE_FAILURE_NOTIFICATION = 6;
}

// Action configuration
+6 −0
Changes for proto/telemetry_frontend.proto: 6 added lines, 0 removed lines.
Original line number Diff line number Diff line
@@ -36,6 +36,7 @@ message CollectorId {
   context.Timestamp  start_time    = 5; // Timestamp when Collector start execution
   context.Timestamp  end_time      = 6; // Timestamp when Collector stop execution
   INTCollector       int_collector = 7; // Extra optional information about INT collectors
   CollectorMetaInfo  coll_meta_info= 8; // Extra optional collector information
 }

message INTCollector {
@@ -45,6 +46,11 @@ message INTCollector {
    string context_id     = 4; // Context identifier related to this collector
}

message CollectorMetaInfo {
  context.DeviceDriverEnum  device_driver = 1;
  string                    device_type   = 2;
}

message CollectorFilter {
  // Collector that fulfill the filter are those that match ALL the following fields.
  // An empty list means: any value is accepted.
Loading