Skip to content
Snippets Groups Projects

Compare revisions

Changes are shown as if the source revision was being merged into the target revision. Learn more about comparing revisions.

Source

Select target project
No results found
Select Git revision

Target

Select target project
  • danet/gosdn
1 result
Select Git revision
Show changes
Commits on Source (37)
Showing
with 394 additions and 581 deletions
......@@ -4,7 +4,6 @@ variables:
GOSDN_TESTING_IMAGE: "${CI_REGISTRY_IMAGE}:testing_${DOCKER_TAG}"
GOSDN_INTEGRATION_TEST_IMAGE: "${CI_REGISTRY_IMAGE}/integration-tests:${DOCKER_TAG}"
CEOS_IMAGE: "${CI_PCONTAINERS_REGISTRY_IMAGE}/ceos:4.28.2F"
CLAB_VERSION: "0.48.6"
GOLANG_VERSION: "1.21"
GNMI_TARGET_IMAGE: registry.code.fbi.h-da.de/danet/gnmi-target/debian:master
GNMI_TARGET_INTEGRATION_IMAGE: "$CI_REGISTRY_IMAGE/gnmi-target-integration-test:${CI_COMMIT_SHA}"
......@@ -31,9 +30,6 @@ include:
- local: "/.gitlab/ci/.code-quality-ci.yml"
- local: "/.gitlab/ci/.security-and-compliance-ci.yml"
- local: "/.gitlab/ci/.test.yml"
- local: "/.gitlab/ci/.uml-autogen-ci.yml"
- local: "/.gitlab/ci/.renovate.yml"
- local: "/.gitlab/ci/.mk-docs-deploy.yml"
- local: "/.gitlab/ci/legacy/.test.yml"
#- local: "/.gitlab/ci/legacy/.integration-test-containerlab.yml"
#- local: "/.gitlab/ci/legacy/.integration-test.yml"
......@@ -15,5 +15,4 @@ build-all-binaries:
- artifacts/orchestrator
- artifacts/venv-manager
expire_in: 1 week
<<: *build-binaries
......@@ -73,4 +73,8 @@ build-integration-test-images:
# Push images
- docker push "$CI_REGISTRY_IMAGE:${DOCKER_TAG}_integration-test"
- docker push $GNMI_TARGET_INTEGRATION_IMAGE
artifacts:
paths:
- artifacts/ssl
expire_in: 1 day
<<: *build-testing
build:k8s-bot:
stage: build
image: ${CI_DEPENDENCY_PROXY_GROUP_IMAGE_PREFIX}/golang:$GOLANG_VERSION
rules:
- if: $CI_COMMIT_BRANCH == "develop"
- if: $CI_COMMIT_BRANCH == $CI_DEFAULT_BRANCH
script:
- cd build/cd
- go build -o k8s-bot
artifacts:
name: binary
paths:
- build/cd/k8s-bot
.deploy: &deploy
image:
name: ${CI_DEPENDENCY_PROXY_GROUP_IMAGE_PREFIX}/bitnami/kubectl:latest
entrypoint: [""]
before_script:
- echo "override global before script"
variables:
K8S_OP: "create"
script:
- ./build/cd/k8s-bot
deploy:develop:
<<: *deploy
stage: deploy
needs:
- job: "build-docker"
- job: "build:k8s-bot"
artifacts: true
rules:
- if: $CI_COMMIT_BRANCH == "develop" && $CI_NIGHTLY == null
deploy:latest:
<<: *deploy
stage: deploy
needs:
- job: "build-docker"
- job: "build:k8s-bot"
artifacts: true
rules:
- if: $CI_COMMIT_BRANCH == $CI_DEFAULT_BRANCH && $CI_NIGHTLY == null
deploy:nightly:mainline:
<<: *deploy
stage: deploy
needs:
- job: "build-docker"
- job: "build:k8s-bot"
artifacts: true
rules:
- if: $CI_COMMIT_BRANCH == $CI_DEFAULT_BRANCH && $CI_NIGHTLY == "mainline"
deploy:nightly:develop:
<<: *deploy
stage: deploy
needs:
- job: "build-docker"
- job: "build:k8s-bot"
artifacts: true
rules:
- if: $CI_COMMIT_BRANCH == "develop" && $CI_NIGHTLY == "mainline"
build-mkdocs:
image: ${CI_DEPENDENCY_PROXY_GROUP_IMAGE_PREFIX}/python:3.12.0-slim-bookworm
image: ${CI_DEPENDENCY_PROXY_GROUP_IMAGE_PREFIX}/python:3.12.1-slim-bookworm
stage: build
before_script:
- pip install mkdocs-material
......@@ -13,7 +13,7 @@ build-mkdocs:
- if: $CI_COMMIT_REF_PROTECTED == "true"
.pages-options: &pages-options
image: ${CI_DEPENDENCY_PROXY_GROUP_IMAGE_PREFIX}/python:3.12.0-slim-bookworm
image: ${CI_DEPENDENCY_PROXY_GROUP_IMAGE_PREFIX}/python:3.12.1-slim-bookworm
stage: deploy
script:
- mv mkdocs-built public
......
renovate:
stage: tools
image: renovate/renovate:37.87.2
image: renovate/renovate:37.121.0
variables:
LOG_LEVEL: debug
......
......@@ -4,11 +4,12 @@
integration-test-gosdn:
image: ${CI_DEPENDENCY_PROXY_GROUP_IMAGE_PREFIX}/golang:$GOLANG_VERSION-bookworm
needs:
- ["build-integration-test-images"]
- ["build-integration-test-images", "build-plugin-registry-image"]
variables:
FF_NETWORK_PER_BUILD: 1
MONGO_INITDB_ROOT_USERNAME: root
MONGO_INITDB_ROOT_PASSWORD: example
FF_NETWORK_PER_BUILD: 1
INTEGRATION_TEST_TARGET_A: gnmi-target_A:7030
services:
- name: ${CI_DEPENDENCY_PROXY_GROUP_IMAGE_PREFIX}/mongo:5
alias: mongo
......@@ -16,23 +17,28 @@ integration-test-gosdn:
alias: rabbitmq
variables:
HEALTHCHECK_TCP_PORT: "5672"
- name: $PLUGIN_REGISTRY_IMAGE_NAME:$DOCKER_TAG
- name: ${CI_REGISTRY_IMAGE}/plugin-registry:${DOCKER_TAG}
alias: plugin-registry
- name: $GNMI_TARGET_INTEGRATION_IMAGE
alias: gnmi-target_1
alias: gnmi-target_A
command: ["start", "--cert", "/etc/gnmi-target/ssl/certs/gnmi-target-selfsigned.crt", "--key", "/etc/gnmi-target/ssl/private/gnmi-target-selfsigned.key", "--ca_file", "/etc/gnmi-target/ssl/ca.crt"]
- name: $GNMI_TARGET_INTEGRATION_IMAGE
alias: gnmi-target_2
alias: gnmi-target_B
command: ["start", "--cert", "/etc/gnmi-target/ssl/certs/gnmi-target-selfsigned.crt", "--key", "/etc/gnmi-target/ssl/private/gnmi-target-selfsigned.key", "--ca_file", "/etc/gnmi-target/ssl/ca.crt"]
# Use gosdn docker image from this branch
# Uncomment later when fixed. See: https://code.fbi.h-da.de/danet/gosdn/-/issues/335
#- name: "$CI_REGISTRY_IMAGE:${DOCKER_TAG}_integration-test"
#- name: "${CI_REGISTRY_IMAGE}:${DOCKER_TAG}_integration-test"
# alias: gosdn
# variables:
# GOSDN_ADMIN_PASSWORD: TestPassword
# command: ["--config", "/app/configs/integration-test-gosdn.toml", "--security", "secure"]
before_script:
- bash -c "$(curl -sL https://get-gnmic.openconfig.net)"
script:
# Remove start of goSDN later when fixed. See: https://code.fbi.h-da.de/danet/gosdn/-/issues/335
- cp -r artifacts/ssl/gosdn/certs artifacts/ssl/
- cp -r artifacts/ssl/gosdn/private artifacts/ssl/
- make build-gosdn
- cd artifacts && GOSDN_ADMIN_PASSWORD=TestPassword ./gosdn --config ../controller/configs/integration-test-gosdn.toml --security secure &
- INTEGRATION_TEST_CONTROLLER_URL="localhost:55055" go test ./integration-tests/*
- INTEGRATION_TEST_CONTROLLER_URL="localhost:55055" go test -p 1 ./integration-tests/*
<<: *test
goplantuml:
image: ${CI_DEPENDENCY_PROXY_GROUP_IMAGE_PREFIX}/golang:$GOLANG_VERSION
stage: .post
only:
- develop
when: manual
variables:
FILENAME: "home.md"
WIKI_URL: "${CI_SERVER_PROTOCOL}://project_${CI_PROJECT_ID}_bot3:${GOPLANTUML_TOKEN}@${CI_SERVER_HOST}:${CI_SERVER_PORT}/${CI_PROJECT_PATH}.wiki.git"
script:
# install goplantuml
- go get github.com/jfeliu007/goplantuml/cmd/goplantuml
# remove old wiki folder
- rm -rf "/tmp/${CI_PROJECT_NAME}.wiki"
# clone and move to wiki folder
- cd /tmp
- git clone "${WIKI_URL}"
- cd "${CI_PROJECT_NAME}.wiki"
- echo '```plantuml' > "$FILENAME"
# run goplantuml
- goplantuml "${CI_PROJECT_DIR}/nucleus/" >> "$FILENAME"
- echo '```' >> "$FILENAME"
# git commit
- git config user.name "$GITLAB_USER_NAME"
- git config user.email "$GITLAB_USER_EMAIL"
- git add "$FILENAME"
- git commit -m "Auto-updated UML diagram via goplantuml CI job"
- git push origin "HEAD:master"
variables:
CLAB_TEMPLATE: "${CI_PROJECT_DIR}/controller/test/containerlab/int01.clab.tmpl.yml"
CLAB_DIR: "/home/gitlab-runner/clab"
CLAB_NAME: "clab${CI_PIPELINE_IID}"
legacy-containerlab-deploy:
stage: test-legacy
tags:
- shell-containerlab
needs: ["build-controller-image", "build-controller-testing-image"]
script:
- firstOctet=$(python3 ${CI_PROJECT_DIR}/.gitlab/ci/scripts/generate_octet.py $CI_COMMIT_SHA)
- secondOctet=$(python3 ${CI_PROJECT_DIR}/.gitlab/ci/scripts/generate_octet.py $CI_PIPELINE_ID)
- export CLAB_MGMT_SUBNET="172.$firstOctet.$secondOctet.0/24"
- cd ${CLAB_DIR}
- ls -la
- |
sed -e "s|@@CEOS_CONTAINER_IMAGE@@|${CEOS_IMAGE}|g" \
-e "s|@@GOSDN_CONTAINER_IMAGE@@|${GOSDN_IMAGE}|g" \
-e "s|@@CLAB_NAME@@|${CLAB_NAME}|g" \
-e "s|@@CLAB_MGMT_SUBNET@@|${CLAB_MGMT_SUBNET}|g" \
${CLAB_TEMPLATE} > ${CLAB_NAME}.clab.yml
- cat ${CLAB_NAME}.clab.yml
- echo "${DOCKER_AUTH_CONFIG}" > ~/.docker/config.json | docker login $CI_REGISTRY
- echo ${GOSDN_IMAGE}
- docker pull ${GOSDN_IMAGE}
- docker pull ${CEOS_IMAGE}
- sudo containerlab deploy --topo ${CLAB_DIR}/${CLAB_NAME}.clab.yml --reconfigure
- |
echo -e "\
GOSDN_HTTP_PORT=$(${CI_PROJECT_DIR}/.gitlab/ci/scripts/docker_host_port 8080 clab-${CLAB_NAME}-gosdn)\n\
GOSDN_GRPC_PORT=$(${CI_PROJECT_DIR}/.gitlab/ci/scripts/docker_host_port 55055 clab-${CLAB_NAME}-gosdn)\n\
CEOS1_PORT=$(${CI_PROJECT_DIR}/.gitlab/ci/scripts/docker_host_port 6030 clab-${CLAB_NAME}-ceos1)" \
> ${CI_PROJECT_DIR}/build.env
- cat ${CI_PROJECT_DIR}/build.env
artifacts:
reports:
dotenv: ${CI_PROJECT_DIR}/build.env
legacy-containerlab-destroy:
stage: test-legacy
tags:
- shell-containerlab
needs:
[
"legacy-containerlab-deploy",
"legacy-integration-test-legacy:nucleus",
"legacy-integration-test-legacy:api"
]
before_script:
- cd ${CLAB_DIR}
script:
- sudo containerlab destroy --topo ${CLAB_DIR}/${CLAB_NAME}.clab.yml -c
- docker volume rm -f ${CLAB_NAME}-volume
- echo ${CLAB_NAME}
- ls -la
- rm ${CLAB_DIR}/${CLAB_NAME}.clab.yml || true
- rm ${CLAB_DIR}/.${CLAB_NAME}.clab.yml.bak || true
- sudo rm -r ${CLAB_DIR}/clab-${CLAB_NAME} || true
- ls -la
allow_failure: true
#containerlab:clean:
# stage: .post
# tags:
# - shell-containerlab
# before_script:
# - cd ${CLAB_DIR}
# script:
# - docker kill $(docker ps -q) || true
# - docker rm $(docker ps -a -q) || true
# - docker rmi $(docker images | grep 'registry.code.fbi.h-da.de/danet/gosdn ' | awk '{print $3}') || true
# - sudo rm -rf ${CLAB_DIR}/clab-* || true
# - sudo sed -i 's|.*clab.*||g' /etc/hosts
# allow_failure: true
# rules:
# - if: $CI_SCHEDULE_CLEAN
# when: always
.legacy-integration-test: &legacy-integration-test
image: $GOSDN_TESTING_IMAGE
stage: test-legacy
needs:
["legacy-containerlab-deploy"]
variables:
GOSDN_LOG: "nolog"
GOSDN_TEST_API_ENDPOINT: "10.254.254.105:${GOSDN_GRPC_PORT}"
CEOS_TEST_ENDPOINT: "10.254.254.105:${CEOS1_PORT}"
GOSDN_TEST_USER: "admin"
GOSDN_TEST_PASSWORD: "admin"
legacy-integration-test-legacy:nucleus:
<<: *legacy-integration-test
script:
- ${CI_PROJECT_DIR}/.gitlab/ci/scripts/wait-for-it.sh ${CEOS_TEST_ENDPOINT} -s -t 180 -- echo "CEOS is up"
- cd controller/
- make integration-test-nucleus
legacy-integration-test-legacy:api:
<<: *legacy-integration-test
variables:
K8S_OP: "getenv"
script:
- cd controller/
- make integration-test-api
legacy-integration-test:cli:
<<: *legacy-integration-test
script:
- cd cli/
- echo "Your tests here"
......@@ -79,7 +79,7 @@ virt-manager-example-start: build containerize-plugin-registry
virt-manager-example-stop:
./scripts/manage_virt_env.sh --mode stop --topology dev_env_data/clab/basic_two_aristas.yaml
dev-env-start: containerize-gosdn containerize-plugin-registry
dev-env-start: generate-gnmi-target-certs generate-gosdn-certs containerize-gosdn containerize-plugin-registry
./scripts/simple-dev-setup.sh --mode start --topology dev_env_data/clab/basic_two_gnmi_targets.yaml
dev-env-stop:
......@@ -87,16 +87,16 @@ dev-env-stop:
generate-certs: generate-gnmi-target-certs generate-gosdn-certs
controller-integration-tests: generate-certs containerize-gosdn containerize-plugin-registry
integration-tests: generate-certs containerize-gosdn containerize-plugin-registry
docker-compose -f dev_env_data/docker-compose/integration-test_docker-compose.yml down
docker-compose -f dev_env_data/docker-compose/integration-test_docker-compose.yml up -d
go test ./integration-tests/*
go test -p 1 ./integration-tests/*
docker-compose -f dev_env_data/docker-compose/integration-test_docker-compose.yml down
controller-integration-tests-debug-up: generate-certs containerize-gosdn containerize-plugin-registry
integration-tests-debug-up: generate-certs containerize-gosdn containerize-plugin-registry
docker-compose -f dev_env_data/docker-compose/integration-test_docker-compose.yml up -d
controller-integration-tests-debug-down:
integration-tests-debug-down:
docker-compose -f dev_env_data/docker-compose/integration-test_docker-compose.yml down
# Warning: Depending on your go and development configuration might also clean caches, modules and docker containers from your other projects.
......
......@@ -309,7 +309,7 @@ type GetUserRequest struct {
unknownFields protoimpl.UnknownFields
Timestamp int64 `protobuf:"varint,1,opt,name=timestamp,proto3" json:"timestamp,omitempty"`
Name string `protobuf:"bytes,2,opt,name=name,proto3" json:"name,omitempty"`
Name string `protobuf:"bytes,2,opt,name=name,proto3" json:"name,omitempty"` // TODO(faseid): reconsider if this is necessary as required, but id is not?
Id string `protobuf:"bytes,3,opt,name=id,proto3" json:"id,omitempty"`
}
......
......@@ -1542,6 +1542,7 @@
},
{
"name": "name",
"description": "TODO(faseid): reconsider if this is necessary as required, but id is not?",
"in": "query",
"required": false,
"type": "string"
......@@ -3382,6 +3383,9 @@
"items": {
"type": "string"
}
},
"mneId": {
"type": "string"
}
}
},
......@@ -3680,11 +3684,11 @@
"properties": {
"@type": {
"type": "string",
"description": "A URL/resource name that uniquely identifies the type of the serialized\nprotocol buffer message. This string must contain at least\none \"/\" character. The last segment of the URL's path must represent\nthe fully qualified name of the type (as in\n`path/google.protobuf.Duration`). The name should be in a canonical form\n(e.g., leading \".\" is not accepted).\n\nIn practice, teams usually precompile into the binary all types that they\nexpect it to use in the context of Any. However, for URLs which use the\nscheme `http`, `https`, or no scheme, one can optionally set up a type\nserver that maps type URLs to message definitions as follows:\n\n* If no scheme is provided, `https` is assumed.\n* An HTTP GET on the URL must yield a [google.protobuf.Type][]\n value in binary format, or produce an error.\n* Applications are allowed to cache lookup results based on the\n URL, or have them precompiled into a binary to avoid any\n lookup. Therefore, binary compatibility needs to be preserved\n on changes to types. (Use versioned type names to manage\n breaking changes.)\n\nNote: this functionality is not currently available in the official\nprotobuf release, and it is not used for type URLs beginning with\ntype.googleapis.com.\n\nSchemes other than `http`, `https` (or the empty scheme) might be\nused with implementation specific semantics."
"description": "A URL/resource name that uniquely identifies the type of the serialized\nprotocol buffer message. This string must contain at least\none \"/\" character. The last segment of the URL's path must represent\nthe fully qualified name of the type (as in\n`path/google.protobuf.Duration`). The name should be in a canonical form\n(e.g., leading \".\" is not accepted).\n\nIn practice, teams usually precompile into the binary all types that they\nexpect it to use in the context of Any. However, for URLs which use the\nscheme `http`, `https`, or no scheme, one can optionally set up a type\nserver that maps type URLs to message definitions as follows:\n\n* If no scheme is provided, `https` is assumed.\n* An HTTP GET on the URL must yield a [google.protobuf.Type][]\n value in binary format, or produce an error.\n* Applications are allowed to cache lookup results based on the\n URL, or have them precompiled into a binary to avoid any\n lookup. Therefore, binary compatibility needs to be preserved\n on changes to types. (Use versioned type names to manage\n breaking changes.)\n\nNote: this functionality is not currently available in the official\nprotobuf release, and it is not used for type URLs beginning with\ntype.googleapis.com. As of May 2023, there are no widely used type server\nimplementations and no plans to implement one.\n\nSchemes other than `http`, `https` (or the empty scheme) might be\nused with implementation specific semantics."
}
},
"additionalProperties": {},
"description": "`Any` contains an arbitrary serialized protocol buffer message along with a\nURL that describes the type of the serialized message.\n\nProtobuf library provides support to pack/unpack Any values in the form\nof utility functions or additional generated methods of the Any type.\n\nExample 1: Pack and unpack a message in C++.\n\n Foo foo = ...;\n Any any;\n any.PackFrom(foo);\n ...\n if (any.UnpackTo(\u0026foo)) {\n ...\n }\n\nExample 2: Pack and unpack a message in Java.\n\n Foo foo = ...;\n Any any = Any.pack(foo);\n ...\n if (any.is(Foo.class)) {\n foo = any.unpack(Foo.class);\n }\n // or ...\n if (any.isSameTypeAs(Foo.getDefaultInstance())) {\n foo = any.unpack(Foo.getDefaultInstance());\n }\n\nExample 3: Pack and unpack a message in Python.\n\n foo = Foo(...)\n any = Any()\n any.Pack(foo)\n ...\n if any.Is(Foo.DESCRIPTOR):\n any.Unpack(foo)\n ...\n\nExample 4: Pack and unpack a message in Go\n\n foo := \u0026pb.Foo{...}\n any, err := anypb.New(foo)\n if err != nil {\n ...\n }\n ...\n foo := \u0026pb.Foo{}\n if err := any.UnmarshalTo(foo); err != nil {\n ...\n }\n\nThe pack methods provided by protobuf library will by default use\n'type.googleapis.com/full.type.name' as the type URL and the unpack\nmethods only use the fully qualified type name after the last '/'\nin the type URL, for example \"foo.bar.com/x/y.z\" will yield type\nname \"y.z\".\n\nJSON\n\nThe JSON representation of an `Any` value uses the regular\nrepresentation of the deserialized, embedded message, with an\nadditional field `@type` which contains the type URL. Example:\n\n package google.profile;\n message Person {\n string first_name = 1;\n string last_name = 2;\n }\n\n {\n \"@type\": \"type.googleapis.com/google.profile.Person\",\n \"firstName\": \u003cstring\u003e,\n \"lastName\": \u003cstring\u003e\n }\n\nIf the embedded message type is well-known and has a custom JSON\nrepresentation, that representation will be embedded adding a field\n`value` which holds the custom JSON in addition to the `@type`\nfield. Example (for message [google.protobuf.Duration][]):\n\n {\n \"@type\": \"type.googleapis.com/google.protobuf.Duration\",\n \"value\": \"1.212s\"\n }"
"description": "`Any` contains an arbitrary serialized protocol buffer message along with a\nURL that describes the type of the serialized message.\n\nProtobuf library provides support to pack/unpack Any values in the form\nof utility functions or additional generated methods of the Any type.\n\nExample 1: Pack and unpack a message in C++.\n\n Foo foo = ...;\n Any any;\n any.PackFrom(foo);\n ...\n if (any.UnpackTo(\u0026foo)) {\n ...\n }\n\nExample 2: Pack and unpack a message in Java.\n\n Foo foo = ...;\n Any any = Any.pack(foo);\n ...\n if (any.is(Foo.class)) {\n foo = any.unpack(Foo.class);\n }\n // or ...\n if (any.isSameTypeAs(Foo.getDefaultInstance())) {\n foo = any.unpack(Foo.getDefaultInstance());\n }\n\n Example 3: Pack and unpack a message in Python.\n\n foo = Foo(...)\n any = Any()\n any.Pack(foo)\n ...\n if any.Is(Foo.DESCRIPTOR):\n any.Unpack(foo)\n ...\n\n Example 4: Pack and unpack a message in Go\n\n foo := \u0026pb.Foo{...}\n any, err := anypb.New(foo)\n if err != nil {\n ...\n }\n ...\n foo := \u0026pb.Foo{}\n if err := any.UnmarshalTo(foo); err != nil {\n ...\n }\n\nThe pack methods provided by protobuf library will by default use\n'type.googleapis.com/full.type.name' as the type URL and the unpack\nmethods only use the fully qualified type name after the last '/'\nin the type URL, for example \"foo.bar.com/x/y.z\" will yield type\nname \"y.z\".\n\nJSON\n====\nThe JSON representation of an `Any` value uses the regular\nrepresentation of the deserialized, embedded message, with an\nadditional field `@type` which contains the type URL. Example:\n\n package google.profile;\n message Person {\n string first_name = 1;\n string last_name = 2;\n }\n\n {\n \"@type\": \"type.googleapis.com/google.profile.Person\",\n \"firstName\": \u003cstring\u003e,\n \"lastName\": \u003cstring\u003e\n }\n\nIf the embedded message type is well-known and has a custom JSON\nrepresentation, that representation will be embedded adding a field\n`value` which holds the custom JSON in addition to the `@type`\nfield. Example (for message [google.protobuf.Duration][]):\n\n {\n \"@type\": \"type.googleapis.com/google.protobuf.Duration\",\n \"value\": \"1.212s\"\n }"
},
"rbacCreateRolesRequest": {
"type": "object",
......
......@@ -9,8 +9,8 @@ deps:
- remote: buf.build
owner: googleapis
repository: googleapis
commit: 28151c0d0a1641bf938a7672c500e01d
digest: shake256:49215edf8ef57f7863004539deff8834cfb2195113f0b890dd1f67815d9353e28e668019165b9d872395871eeafcbab3ccfdb2b5f11734d3cca95be9e8d139de
commit: a86849a25cc04f4dbe9b15ddddfbc488
digest: shake256:e19143328f8cbfe13fc226aeee5e63773ca494693a72740a7560664270039a380d94a1344234b88c7691311460df9a9b1c2982190d0a2612eae80368718e1943
- remote: buf.build
owner: grpc-ecosystem
repository: grpc-gateway
......
......@@ -219,6 +219,7 @@ message SetMne {
string mne_name = 4;
.gosdn.transport.TransportOption transport_option = 5;
repeated string gnmi_subscribe_paths = 6;
string mne_id = 7;
}
message AddListRequest {
......
......@@ -89,7 +89,7 @@ message CreateUsersResponse {
// GetUser
message GetUserRequest {
int64 timestamp = 1;
string name = 2 [(buf.validate.field).required = true];
string name = 2 [(buf.validate.field).required = true]; // TODO(faseid): reconsider if this is necessary as required, but id is not?
string id = 3;
}
......
ARG GOLANG_VERSION=1.21
ARG BUILDARGS
ARG GITLAB_PROXY=code.fbi.h-da.de:443/danet/dependency_proxy/containers
ARG GITLAB_PROXY
FROM ${GITLAB_PROXY}golang:$GOLANG_VERSION-bookworm AS builder
......@@ -17,7 +17,7 @@ COPY applications/venv-manager/ applications/venv-manager/
RUN CGO_ENABLED=0 GOOS=linux GOARCH=amd64 go build -ldflags="-w -s" -o venv-manager applications/venv-manager/main.go
FROM ubuntu:22.04
FROM ${GITLAB_PROXY}ubuntu:22.04
COPY --from=builder /gosdn/venv-manager /venv-manager
ENTRYPOINT ["/venv-manager"]
ARG GOLANG_VERSION=1.21
ARG BUILDARGS
ARG $GITLAB_PROXY
ARG GITLAB_PROXY
FROM ${GITLAB_PROXY}golang:$GOLANG_VERSION-alpine AS builder
WORKDIR /gosdn/
......@@ -10,5 +10,5 @@ RUN --mount=type=cache,target=/root/go/pkg/mod \
--mount=type=cache,target=/root/.cache/go-build \
make build-gosdnc
FROM ubuntu:22.04
FROM ${GITLAB_PROXY}ubuntu:22.04
COPY --from=builder /gosdn/artifacts/gosdnc /
......@@ -38,6 +38,7 @@ import (
"github.com/google/uuid"
log "github.com/sirupsen/logrus"
"github.com/stretchr/testify/mock"
"go.mongodb.org/mongo-driver/mongo"
"google.golang.org/grpc"
"google.golang.org/grpc/credentials/insecure"
"google.golang.org/grpc/test/bufconn"
......@@ -168,7 +169,7 @@ func bootstrapUnitTest() {
})
mockPnd.On("ChangeMNE", mock.Anything, mock.Anything, mock.Anything, mock.Anything).Return(uuid.Nil, nil)
if err := pndStore.Add(&mockPnd); err != nil {
if err := pndStore.Add(context.TODO(), &mockPnd); err != nil {
log.Fatal(err)
}
......@@ -190,7 +191,7 @@ func bootstrapUnitTest() {
pluginStore = nucleus.NewMemoryPluginStore()
pluginService := nucleus.NewPluginService(pluginStore, eventService, nucleus.NewPluginThroughReattachConfig, rpb.NewPluginRegistryServiceClient(&grpc.ClientConn{}))
networkElementStore := nucleus.NewNetworkElementStore()
networkElementStore := nucleus.NewNetworkElementStore(&mongo.Database{}, pndUUID)
networkElementService := nucleus.NewNetworkElementService(networkElementStore, pluginService, eventService)
mne, _ := nucleus.NewNetworkElement("test", mneUUID, &tpb.TransportOption{
......