From fd852084d49f54bb15fa414eff4b2eab546ed64a Mon Sep 17 00:00:00 2001 From: Ze Gan Date: Tue, 5 Dec 2023 01:48:42 +0800 Subject: [PATCH] [dashrouteorch]: Rename dash route namespace (#2966) * [Dash] Rename dash route namespace --- .../build-docker-sonic-vs-template.yml | 15 +++++++++++++++ .azure-pipelines/build-template.yml | 16 +++++++++++++++- .azure-pipelines/docker-sonic-vs/Dockerfile | 5 +++-- orchagent/dash/dashrouteorch.h | 4 ++-- 4 files changed, 35 insertions(+), 5 deletions(-) diff --git a/.azure-pipelines/build-docker-sonic-vs-template.yml b/.azure-pipelines/build-docker-sonic-vs-template.yml index e34bac7d79..9d1e8065fc 100644 --- a/.azure-pipelines/build-docker-sonic-vs-template.yml +++ b/.azure-pipelines/build-docker-sonic-vs-template.yml @@ -100,6 +100,21 @@ jobs: ${{ parameters.sairedis_artifact_pattern }}/libsaimetadata-dev_*.deb ${{ parameters.sairedis_artifact_pattern }}/syncd-vs_*.deb displayName: "Download sonic sairedis deb packages" + - task: DownloadPipelineArtifact@2 + inputs: + source: specific + project: build + pipeline: sonic-net.sonic-dash-api + ${{ if eq(parameters.arch, 'amd64') }}: + artifact: sonic-dash-api + ${{ else }}: + artifact: sonic-dash-api.${{ parameters.arch }} + runVersion: 'latestFromBranch' + runBranch: 'refs/heads/$(BUILD_BRANCH)' + path: $(Build.ArtifactStagingDirectory)/download + patterns: | + libdashapi*.deb + displayName: "Download dash api" - task: DownloadPipelineArtifact@2 inputs: artifact: ${{ parameters.swss_artifact_name }} diff --git a/.azure-pipelines/build-template.yml b/.azure-pipelines/build-template.yml index b5959a6efa..75666648ed 100644 --- a/.azure-pipelines/build-template.yml +++ b/.azure-pipelines/build-template.yml @@ -159,8 +159,22 @@ jobs: target/debs/bullseye/libprotobuf*.deb target/debs/bullseye/libprotoc*.deb target/debs/bullseye/protobuf-compiler*.deb - target/debs/bullseye/libdashapi*.deb displayName: "Download common libs" + - task: DownloadPipelineArtifact@2 + inputs: + source: specific + project: build + pipeline: sonic-net.sonic-dash-api + ${{ if eq(parameters.arch, 'amd64') }}: + artifact: sonic-dash-api + ${{ else }}: + artifact: sonic-dash-api.${{ parameters.arch }} + runVersion: 'latestFromBranch' + runBranch: 'refs/heads/$(BUILD_BRANCH)' + path: $(Build.ArtifactStagingDirectory)/download/common + patterns: | + libdashapi*.deb + displayName: "Download dash api" - script: | set -ex cd download diff --git a/.azure-pipelines/docker-sonic-vs/Dockerfile b/.azure-pipelines/docker-sonic-vs/Dockerfile index 41f0f1cf99..750d136957 100644 --- a/.azure-pipelines/docker-sonic-vs/Dockerfile +++ b/.azure-pipelines/docker-sonic-vs/Dockerfile @@ -8,9 +8,10 @@ COPY ["debs", "/debs"] # Remove existing packages first before installing the new/current packages. This is to overcome limitations with # Docker's diff detection mechanism, where only the file size and the modification timestamp (which will remain the # same, even though contents have changed) are checked between the previous and current layer. -RUN dpkg --purge libswsscommon python3-swsscommon sonic-db-cli libsaimetadata libsairedis libsaivs syncd-vs swss sonic-eventd +RUN dpkg --purge libswsscommon python3-swsscommon sonic-db-cli libsaimetadata libsairedis libsaivs syncd-vs swss sonic-eventd libdashapi -RUN dpkg -i /debs/libswsscommon_1.0.0_amd64.deb \ +RUN dpkg -i /debs/libdashapi_1.0.0_amd64.deb \ + /debs/libswsscommon_1.0.0_amd64.deb \ /debs/python3-swsscommon_1.0.0_amd64.deb \ /debs/sonic-db-cli_1.0.0_amd64.deb \ /debs/libsaimetadata_1.0.0_amd64.deb \ diff --git a/orchagent/dash/dashrouteorch.h b/orchagent/dash/dashrouteorch.h index d7a61a5276..d61fcaa936 100644 --- a/orchagent/dash/dashrouteorch.h +++ b/orchagent/dash/dashrouteorch.h @@ -24,7 +24,7 @@ struct OutboundRoutingEntry { sai_object_id_t eni; swss::IpPrefix destination; - dash::route_lpm::Route metadata; + dash::route::Route metadata; }; struct InboundRoutingEntry @@ -43,7 +43,7 @@ struct OutboundRoutingBulkContext { std::string eni; swss::IpPrefix destination; - dash::route_lpm::Route metadata; + dash::route::Route metadata; std::deque object_statuses; OutboundRoutingBulkContext() {} OutboundRoutingBulkContext(const OutboundRoutingBulkContext&) = delete;