Skip to content
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
21 changes: 21 additions & 0 deletions .github/dependabot.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
# SPDX-License-Identifier: Apache-2.0
# Copyright 2024 Intel Corporation

# https://help.github.com/github/administering-a-repository/configuration-options-for-dependency-updates
version: 2
updates:

- package-ecosystem: "github-actions"
directory: "/"
schedule:
interval: "daily"

- package-ecosystem: "docker"
directory: "/"
schedule:
interval: "daily"

- package-ecosystem: "gomod"
directory: "/"
schedule:
interval: "daily"
63 changes: 63 additions & 0 deletions .github/workflows/master.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,63 @@
# SPDX-License-Identifier: Apache-2.0
# Copyright 2024 Intel Corporation

name: Master workflow

on:
pull_request:
branches:
- master
push:
branches:
- master

jobs:
build:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4

- uses: actions/setup-go@v5
with:
go-version-file: 'go.mod'

- name: Build
run: go build

docker-build:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4

- name: Build Docker image
run: make docker-build

license-check:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4

- name: reuse lint
uses: fsfe/reuse-action@v2

fossa-check:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4

- name: FOSSA scan
uses: fossa-contrib/fossa-action@v3
with:
fossa-api-key: 9dc8fa92e3dd565687317beb87b56d89

unit-tests:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4

- uses: actions/setup-go@v5
with:
go-version-file: 'go.mod'

- name: Unit tests
run: go test ./...
3 changes: 0 additions & 3 deletions .golangci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -224,10 +224,7 @@ linters:
- staticcheck
- unused
- gosimple
- structcheck
- varcheck
- ineffassign
- deadcode
- typecheck
# Additional
- lll
Expand Down
2 changes: 1 addition & 1 deletion cmd/controller/controller.go
Original file line number Diff line number Diff line change
Expand Up @@ -328,7 +328,7 @@ func RogueIPHandler(rogueIPChannel chan RogueIPs) {
logger.ControllerLog.Errorln("Subscriber details doesn't exist with imsi ", err)
continue
}
logger.ControllerLog.Infoln("Subscriber Imsi [%v] of the IP: [%v]", subscriberInfo.Imsi, ipaddr)
logger.ControllerLog.Infof("Subscriber Imsi [%v] of the IP: [%v]", subscriberInfo.Imsi, ipaddr)
//get enterprises or targets from ROC
targets := rocClient.GetTargets()

Expand Down
4 changes: 2 additions & 2 deletions cmd/metricfunc/metricfunc.go
Original file line number Diff line number Diff line change
Expand Up @@ -43,12 +43,12 @@ func main() {

cfg := config.Config{}
if content, err := ioutil.ReadFile(*cfgFilePtr); err != nil {
logger.AppLog.Errorf("Readfile failed called ", err)
logger.AppLog.Errorln("Readfile failed called ", err)
return
} else {

if yamlErr := yaml.Unmarshal(content, &cfg); yamlErr != nil {
logger.AppLog.Errorf("yaml parsing failed ", yamlErr)
logger.AppLog.Errorln("yaml parsing failed ", yamlErr)
return
}
}
Expand Down
2 changes: 1 addition & 1 deletion internal/promclient/promclient.go
Original file line number Diff line number Diff line change
Expand Up @@ -110,7 +110,7 @@ func DeleteCoreSubData(imsi, ip_addr, state, smf_ip, dnn, slice, upf string) {

//SetSessStats maintains Session level stats
func SetSmfSessStats(smfIp, slice, dnn, upf string, count uint64) {
logger.PromLog.Debugf("setting smf session count [%v] with labels [smfIp:%v, slice:%v, dnn:%v, upf:%v ]", count)
logger.PromLog.Debugf("setting smf session count [%v] with labels [smfIp:%v, slice:%v, dnn:%v, upf:%v ]", count, smfIp, slice, dnn, upf)
promStats.smfSessions.WithLabelValues("", "", "", "").Set(float64(count))
}

Expand Down