Skip to content
Draft

Main #24

Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
109 commits
Select commit Hold shift + click to select a range
f752d7e
Updated minor comment for slaf proto bidirectional streams
HarrySBassi Mar 21, 2025
421dbf2
Enabled SRv6-TE explicit BSID message
Jun 26, 2025
1fe5fc3
Added comment
Jun 27, 2025
8ebb9fb
Merge pull request #345 from ios-xr/CSCwp36902.master.expl_bsid
smaini74 Jul 2, 2025
453ca09
Add errcode to handle invalid route metric
Jul 17, 2025
42a5869
Update description for Path metric
Jul 18, 2025
67b4133
PR comments
Jul 18, 2025
01767f6
Merge pull request #349 from ios-xr/dev/route_metric_check
Jul 18, 2025
3126a41
Enhance documentation for sl_globals
smaini74 Jul 24, 2025
b1dd78c
Update bindings
smaini74 Jul 24, 2025
ec7a712
Add notes on proto3 serialization behavior in README.md
Jul 24, 2025
d174443
updated comments
Jul 24, 2025
73a4d56
updated bindings
Jul 24, 2025
dc72269
grammer fix
Jul 24, 2025
c8a3be0
typo fix
Jul 24, 2025
ec47890
fix spacing
smaini74 Jul 24, 2025
fab99ba
Merge pull request #351 from ios-xr/CSCwq18523.master.grpc_limit
smaini74 Jul 24, 2025
dae05f8
review updates
Jul 25, 2025
c4338d0
Merge pull request #352 from ios-xr/CSCwp95225.master.update_readme
Jul 29, 2025
136a493
Merge remote-tracking branch 'origin/master' into slaf_note_for_bidi_…
HarrySBassi Aug 1, 2025
6fd6305
Fixed comment
HarrySBassi Aug 1, 2025
95fbf14
Fixed comment
HarrySBassi Aug 1, 2025
b01e24a
Merge pull request #329 from ios-xr/slaf_note_for_bidi_stream
HarrySBassi Aug 4, 2025
2e7ba85
Update versions
Aug 20, 2025
22b84ea
Update go.mod
Aug 21, 2025
b0ac040
Merge pull request #354 from ios-xr/dev/update_versions
Aug 21, 2025
549d921
With recent grpcstream changes and older slaf proto changes, the part…
HarrySBassi Aug 29, 2025
cc7dca8
Addressed comments and fixed naming and got rid of confusing elsp and…
HarrySBassi Aug 30, 2025
0785ebc
Fixed MplsMaxBatchSize var to be similar to others in name. Resolved …
HarrySBassi Sep 2, 2025
ea43ed9
Merge pull request #355 from ios-xr/update_tutorials_for_route_flag_c…
HarrySBassi Sep 2, 2025
03d0417
Update dependabot golang.org/x/net to version to 0.44.0 from 0.36.0
HarrySBassi Sep 9, 2025
c3776b5
Merge pull request #356 from ios-xr/update_dependabot
HarrySBassi Sep 9, 2025
9b1d7bb
INUSE NACK changes
smaini74 Sep 15, 2025
497b8e3
Addition of error codes for GET rpc when no entries are found and whe…
gsubbann Sep 18, 2025
fc0ee58
Fixed err code name
gsubbann Sep 18, 2025
823ddac
Addressed PR comments
gsubbann Sep 19, 2025
f9c6fcb
Merge pull request #357 from ios-xr/CSCwq35312.master.get_client_errc…
gsubbann Sep 25, 2025
b39179c
Fixed name of INUSE error
smaini74 Oct 15, 2025
8eee702
Merge remote-tracking branch 'origin/master' into CSCwr73246.master.i…
smaini74 Oct 17, 2025
73616e7
Update bindings
smaini74 Oct 17, 2025
b917931
Added SRv6 policy attr message
Oct 20, 2025
07cd9fe
Add additional documentation
smaini74 Oct 21, 2025
41cd60d
Address PR comments
smaini74 Oct 21, 2025
255826f
Addressed PR comments
Oct 22, 2025
16e880b
Fix identation
smaini74 Oct 22, 2025
ad6c173
Fix identation
smaini74 Oct 22, 2025
a59efed
Proto changes for Meta FRR feature (#344)
hshahul-cisco Oct 24, 2025
302a554
Merge remote-tracking branch 'origin/master' into CSCwr73246.master.i…
smaini74 Oct 29, 2025
703b023
Merge pull request #359 from ios-xr/CSCwr73246.master.inuse_nack
smaini74 Nov 10, 2025
6c650d2
Merge pull request #360 from ios-xr/CSCwq20088.main.slapi_proto_changes
Dec 2, 2025
2245577
added owners
hshahul-cisco Dec 13, 2025
4e5b7f5
Add Bazel build support for IOS-XR integration
hshahul-cisco Dec 13, 2025
ade52bf
Remove unnecessary protobuf build dependencies
hshahul-cisco Dec 13, 2025
73bbc87
Minimal MODULE.bazel - remove gazelle and go_deps
hshahul-cisco Dec 13, 2025
6822b7d
Absolutely minimal MODULE.bazel - no deps
hshahul-cisco Dec 13, 2025
f2e1c7d
Use filegroup exports instead of go_library/py_library
hshahul-cisco Dec 13, 2025
06f302c
Export individual .go files for direct consumption
hshahul-cisco Dec 13, 2025
2236ca4
Export individual Python files for direct consumption
hshahul-cisco Dec 13, 2025
6756a6c
Switch from filegroup to go_library for Go bindings
hshahul-cisco Dec 14, 2025
09fc5d0
Declare explicit deps in go_library (grpc, protobuf)
hshahul-cisco Dec 14, 2025
f06f498
Hybrid approach: filegroup export + XR library wrapper
hshahul-cisco Dec 14, 2025
f5466a2
Export individual .go files (not just filegroup)
hshahul-cisco Dec 14, 2025
4479215
Add root-level BUILD.bazel file
hshahul-cisco Dec 17, 2025
42f1ade
proto changes for non-connected nexthop
soanbazh Jan 23, 2026
5467ecc
Add details for client name in proto
smaini74 Jan 26, 2026
2d95c5b
Update sl_af.proto
smaini74 Jan 27, 2026
ae01601
fix review comments
soanbazh Jan 29, 2026
6077141
bindings
soanbazh Jan 29, 2026
1598f94
fix review comments
soanbazh Feb 6, 2026
d3fba4d
remove optional keyword
soanbazh Mar 5, 2026
d182c3a
Merge pull request #1 from xr/CSCws94821.master.disgg_proto
soanbazh Mar 17, 2026
34b5c49
ci protection
hshahul-cisco Apr 1, 2026
f148eaf
Update CODEOWNERS
Apr 7, 2026
185cfb8
Update CODEOWNERS
Apr 7, 2026
364487e
Merge pull request #8 from xr/sosampa2-patch-2
hshahul-cisco Apr 8, 2026
04cf8d2
Declare real Go module path for generated bindings
hshahul-cisco Apr 22, 2026
3f98a4e
Run go mod tidy after regenerating Go bindings
hshahul-cisco Apr 22, 2026
158a342
Set Go proxy environment in bindings container
hshahul-cisco Apr 22, 2026
ce484b6
Use configurable Go proxy settings in bindings container
hshahul-cisco Apr 22, 2026
3632a39
Merge pull request #12 from xr/hshahul/slapi-go-module-cleanup
hshahul-cisco Apr 23, 2026
9445d79
Add new error code for client name mismatch
smaini74 Apr 23, 2026
333153f
Add SL_ROUTE_FLAG_LOSSLESS_NHG to route common proto
soanbazh Apr 14, 2026
eb470ed
Rename lossless route flag per PR feedback
soanbazh Apr 14, 2026
b850a21
Clarify lossless route flag semantics
soanbazh Apr 15, 2026
ec4563b
fix copyright
soanbazh Apr 16, 2026
af1232e
address review comments
soanbazh Apr 17, 2026
6a82bd9
Merge pull request #10 from xr/CSCwt94194.main.lossless_nhg_proto
soanbazh Apr 28, 2026
9139082
Merge remote-tracking branch 'origin/main' into CSCwu04326.main.new_e…
smaini74 Apr 30, 2026
08f0650
Merge pull request #16 from xr/CSCwu04326.main.new_error_code
smaini74 Apr 30, 2026
d0e11b1
Use split genproto rpc dependency path
hshahul-cisco May 4, 2026
f85a4c3
Merge pull request #17 from xr/dev/slapi-genproto-rpc-split
hshahul-cisco May 4, 2026
b193aff
Add new error message for FRR mismatch
smaini74 May 6, 2026
90fd148
Merge pull request #18 from xr/CSCwt60040.main.frr
smaini74 May 6, 2026
aade279
Add new error codes
smaini74 May 11, 2026
9701cf7
Fix error comment
smaini74 May 11, 2026
d042f63
Add error message for self reference of path index
smaini74 May 11, 2026
0ba896c
Fix comment for backup path
smaini74 May 12, 2026
794839c
Merge pull request #19 from xr/CSCwt60040.main.frr
smaini74 May 12, 2026
e583acc
Add perf-meas proto chanegs
Jun 2, 2026
7790f36
Fix review comments
Jun 3, 2026
b150d22
Update generated files
Jun 3, 2026
b86aa36
Fix revie commments
Jun 3, 2026
4da9d26
Merge pull request #21 from xr/CSCwu66089.main.fix
hshahul-cisco Jun 3, 2026
4ac5519
CSCwv06860: Clarify no-flattening path requirements
soanbazh Jun 23, 2026
4a92c2b
CSCwv06860: Address underlay path review comments
soanbazh Jun 23, 2026
8c78c73
CSCwv06860: Simplify connected path comment
soanbazh Jun 23, 2026
d4ec201
Merge pull request #25 from xr/CSCwv06860.main.proto
soanbazh Jun 23, 2026
9fcc482
Fix max for client name string
smaini74 Jun 30, 2026
feba085
Merge pull request #26 from xr/CSCwv17150.main.clientname_len
smaini74 Jun 30, 2026
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
2 changes: 1 addition & 1 deletion .github/CODEOWNERS
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
# @global-owner1 and @global-owner2 will be requested for
# review when someone opens a pull request.
#* @global-owner1 @global-owner2
* @rehaddad @ashp @ios-xr/sl-api-dev-team
* @hshahul @smaini @gsubbann @xr/sl-api-dev

# Order is important; the last matching pattern takes the most
# precedence. When someone opens a pull request that only
Expand Down
100 changes: 100 additions & 0 deletions .github/workflows/proto-ci.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,100 @@
name: Proto CI

on:
pull_request:
branches:
- main
types:
- opened
- synchronize
- reopened
- ready_for_review
push:
branches:
- main
merge_group:
types:
- checks_requested

permissions:
contents: read

concurrency:
group: proto-ci-${{ github.workflow }}-${{ github.ref }}
cancel-in-progress: true

jobs:
proto-lint:
name: proto-lint
runs-on: ubuntu-latest
timeout-minutes: 10

steps:
- name: Check out repository
uses: actions/checkout@v5
with:
fetch-depth: 0

- name: Run Buf lint
uses: bufbuild/buf-action@v1
with:
github_token: ${{ secrets.GITHUB_TOKEN }}
pr_comment: false
lint: true
breaking: false
format: false
push: false
archive: false

proto-breaking:
name: proto-breaking
runs-on: ubuntu-latest
timeout-minutes: 10

steps:
- name: Check out repository
uses: actions/checkout@v5
with:
fetch-depth: 0

- name: Run Buf breaking check
uses: bufbuild/buf-action@v1
with:
github_token: ${{ secrets.GITHUB_TOKEN }}
pr_comment: false
lint: false
breaking: true
format: false
push: false
archive: false

generated-bindings-up-to-date:
name: generated-bindings-up-to-date
runs-on: ubuntu-latest
timeout-minutes: 45

steps:
- name: Check out repository
uses: actions/checkout@v5
with:
fetch-depth: 0

- name: Regenerate bindings in Docker
shell: bash
run: |
set -euo pipefail
make clean
make bindings

- name: Verify generated bindings are committed
shell: bash
run: |
set -euo pipefail

git diff --exit-code

if [[ -n "$(git status --porcelain)" ]]; then
echo "::error::Generated bindings are not up to date. Run 'make clean && make bindings' locally and commit the result."
git status --short
exit 1
fi
21 changes: 21 additions & 0 deletions BUILD.bazel
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
# Copyright (c) 2025 by Cisco Systems, Inc.
# All rights reserved.

"""
Service Layer Object Model - Root BUILD file

This module provides pre-generated protobuf bindings for IOS-XR Service Layer API.

The actual bindings are exported from subdirectories:
- grpc/go/src/gengo/BUILD.bazel - Go protobuf bindings
- grpc/python/src/genpy/BUILD.bazel - Python protobuf bindings

Source: https://gh-xr.scm.engit.cisco.com/xr/service-layer-objmodel
"""

# Empty exports - actual targets are in subdirectories
exports_files(
["MODULE.bazel"],
visibility = ["//visibility:public"],
)

15 changes: 11 additions & 4 deletions Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -17,18 +17,25 @@ RUN . /opt/venv/bin/activate
COPY grpc/python/requirements.txt /tmp
RUN pip3 install -r /tmp/requirements.txt

ARG GO_VER=1.19
ARG GO_VER=1.24.3
ARG WS=/ws
RUN mkdir -p ${WS}
WORKDIR ${WS}
ARG PROTOC_VER=3.18.3
ARG PROTOC_VER=32.0

# Install GO binary https://go.dev/doc/install
RUN wget -qO- https://golang.org/dl/go${GO_VER}.linux-amd64.tar.gz | tar xzvf - -C /usr/local

#Ensure PATH has GO binary path
ENV PATH="${PATH}:/usr/local/go/bin"

# Allow callers to override Go module proxy and checksum settings, while
# providing sane defaults for public environments.
ARG GOPROXY=https://proxy.golang.org,direct
ARG GOSUMDB=sum.golang.org
ENV GOPROXY="${GOPROXY}"
ENV GOSUMDB="${GOSUMDB}"

# Avoid timezone prompts
ENV DEBIAN_FRONTEND=noninteractive

Expand All @@ -49,8 +56,8 @@ RUN unzip protoc-${PROTOC_VER}-linux-x86_64.zip -d /usr/local
# Install protoc-gen-go and protoc-gen-go-grpc
# Reference https://grpc.io/docs/languages/go/quickstart

RUN go install google.golang.org/protobuf/cmd/protoc-gen-go@v1.28
RUN go install google.golang.org/grpc/cmd/protoc-gen-go-grpc@v1.2
RUN go install google.golang.org/protobuf/cmd/protoc-gen-go@v1.36.7
RUN go install google.golang.org/grpc/cmd/protoc-gen-go-grpc@v1.5.1

# Above were installed in $HOME/go, since this is running as root
ENV PATH="${PATH}:/root/go/bin"
Expand Down
21 changes: 21 additions & 0 deletions MODULE.bazel
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
"""
Service Layer Object Model - Generated protobuf bindings for IOS-XR Service Layer API

This module provides pre-generated bindings:
- Go protobuf bindings (grpc/go/src/gengo/)
- Python protobuf bindings (grpc/python/src/genpy/)

Note:
- Proto files are NOT compiled by this module
- Bindings are pre-generated and committed (via 'make bindings')
- Exported as filegroups - XR shell component wraps them in proper libraries

Source: https://gh-xr.scm.engit.cisco.com/xr/service-layer-objmodel
"""

module(
name = "service_layer_objmodel",
version = "0.11.0-iosxr.0",
)

# No Bazel dependencies needed - only exports filegroups
85 changes: 45 additions & 40 deletions Makefile
Original file line number Diff line number Diff line change
@@ -1,62 +1,67 @@
SHELL = /bin/bash
USER := $(shell id -un)
SHELL := /bin/bash

PWD := $(shell pwd)

IMAGE_NAME = slapi
IMAGE_TAG = latest
CONTAINER_NAME = slapi-container
IMAGE_NAME ?= slapi
IMAGE_TAG ?= latest
CONTAINER_NAME ?= slapi-container

DOCKER_VOLUME ?= $(PWD):/slapi
DOCKER_WORKDIR ?= /slapi

DOCKER_BUILD := docker build -t $(IMAGE_NAME):$(IMAGE_TAG) .

DOCKER_BUILD = docker build -t $(IMAGE_NAME) .
DOCKER_ENV := \
-e "http_proxy=$(http_proxy)" \
-e "https_proxy=$(https_proxy)" \
-e "HTTP_PROXY=$(HTTP_PROXY)" \
-e "HTTPS_PROXY=$(HTTPS_PROXY)" \
-e "no_proxy=$(no_proxy)" \
-e "NO_PROXY=$(NO_PROXY)"

ifeq ($(DOCKER_VOLUME),)
override DOCKER_VOLUME := "$(PWD):/slapi"
endif
DOCKER_RUN := docker run --name $(CONTAINER_NAME) --rm \
-v "$(DOCKER_VOLUME)" \
-w "$(DOCKER_WORKDIR)" \
$(DOCKER_ENV)

ifeq ($(DOCKER_WORKDIR),)
override DOCKER_WORKDIR := "/slapi"
endif
DOCKER_RUN_TTY := docker run --name $(CONTAINER_NAME) --rm \
-v "$(DOCKER_VOLUME)" \
-w "$(DOCKER_WORKDIR)" \
$(DOCKER_ENV) \
-it

DOCKER_RUN := docker run --name $(CONTAINER_NAME) --rm=true --privileged \
-v $(DOCKER_VOLUME) \
-w $(DOCKER_WORKDIR) \
-e "http_proxy=$(http_proxy)" \
-e "https_proxy=$(https_proxy)" \
-i$(if $(TERM),t,)
.PHONY: clean build bindings tutorial cpp-tutorial xr-docs dotnet-docs slapi-bash
.DEFAULT_GOAL := slapi-bash

# New clean target to remove the container and image
clean:
-docker rm -f $(CONTAINER_NAME)
-docker rmi -f $(IMAGE_NAME):$(IMAGE_TAG)

.PHONY: slapi-bash
.DEFAULT_GOAL := slapi-bash

build:
$(DOCKER_BUILD) ;
$(DOCKER_BUILD)

bindings: build
$(DOCKER_RUN) $(IMAGE_NAME):$(IMAGE_TAG) \
bash -c "cd grpc/utils && ./gen-all.sh"

tutorial: build bindings
$(DOCKER_RUN) -t $(IMAGE_NAME):$(IMAGE_TAG) \
make -C grpc/go/src/tutorial
$(DOCKER_RUN) $(IMAGE_NAME):$(IMAGE_TAG) \
make -C grpc/go/src/tutorial

cpp-tutorial: build bindings
$(DOCKER_RUN) -t $(IMAGE_NAME):$(IMAGE_TAG) \
bash -c "make -C grpc/cpp/src all && \
make -C grpc/cpp/src install && \
make -C grpc/cpp/src/tutorial && \
make -C grpc/cpp/src/tutorial/rshuttle"

bindings: build
$(DOCKER_RUN) -t $(IMAGE_NAME):$(IMAGE_TAG) \
bash -c "cd grpc/utils && ./gen-all.sh"
$(DOCKER_RUN) $(IMAGE_NAME):$(IMAGE_TAG) \
bash -c "make -C grpc/cpp/src all && \
make -C grpc/cpp/src install && \
make -C grpc/cpp/src/tutorial && \
make -C grpc/cpp/src/tutorial/rshuttle"

xr-docs: build
$(DOCKER_RUN) -t $(IMAGE_NAME):$(IMAGE_TAG) \
bash -c "cd grpc/xrdocs/scripts && ./doc-gen.sh"
$(DOCKER_RUN) $(IMAGE_NAME):$(IMAGE_TAG) \
bash -c "cd grpc/xrdocs/scripts && ./doc-gen.sh"

dotnet-docs: build
$(DOCKER_RUN) -t $(IMAGE_NAME):$(IMAGE_TAG) \
bash -c "cd grpc/dotnet/ && doxygen ./doxyfile"
$(DOCKER_RUN) $(IMAGE_NAME):$(IMAGE_TAG) \
bash -c "cd grpc/dotnet && doxygen ./doxyfile"

slapi-bash: build
$(DOCKER_RUN) -t $(IMAGE_NAME):$(IMAGE_TAG) bash

$(DOCKER_RUN_TTY) $(IMAGE_NAME):$(IMAGE_TAG) bash
20 changes: 20 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -94,6 +94,19 @@ grpc/python/src/genpy
grpc/cpp/src/gencpp
grpc/dotnet/src/gencs
```
### Go Module Identity

The generated Go bindings under `grpc/go/src/gengo` are intended to behave as a
normal Go module. The module path is:

```
github.com/Cisco-Service-Layer/service-layer-objmodel/grpc/go/src/gengo
```

This allows the generated bindings to participate more cleanly in TPS and
future XR Go dependency workflows. The generated package name remains
`service_layer`.

The bindings can also be generated manually using protoc in an environment with the correct toolchain versions. The toolchain versions in the Dockerfile:
* GO_VER: Go version
* GRPC_VER: gRPC version
Expand Down Expand Up @@ -200,3 +213,10 @@ This will generate html documentation in grpc/dotnet/docs/html/

We hope that the above was useful quick overview about the Service Layer API. We recommend that the reader go over the Python quick tutorial first and then go over the .proto files under grpc/protos (or look at the generated .html pages - these are not kept in this repo, but can be auto-generated from this repo).

## Notes

In proto3, if the message field is implicit, and it is set to its default value, proto3 will not serialize this field and it will be omitted from the message payload. This is standard behavior due to the proto3 serialization rules and does not require any special handling in client applications. For more information, see the official documentation: <https://protobuf.dev/programming-guides/proto3/>

For example, in the context of `SLAFGetMsgRsp` [grpc/protos/sl_af.proto](grpc/protos/sl_af.proto), if the `ClientID` field is set to 0, the `ClientID` field will not appear in the serialized response message. For any other client ID value, the field will be included in the response.

Please note, this is a feature of the underlying technology (gRPC/proto3) and not specific to the SL-API. This note is included for clarity.
Loading
Loading