Skip to content

Commit

Permalink
Merge branch 'main' into egr-fix2
Browse files Browse the repository at this point in the history
  • Loading branch information
TrekkieCoder authored Jan 16, 2025
2 parents 28d92d6 + db8220e commit 8197780
Show file tree
Hide file tree
Showing 15 changed files with 624 additions and 7 deletions.
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -58,3 +58,4 @@ modules.order
Module.symvers
Mkfile.old
dkms.conf
.DS_Store
4 changes: 2 additions & 2 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -11,8 +11,8 @@ subsys-clean:
cd loxilb-ebpf && $(MAKE) clean

build: subsys
@go build -o ${bin} -ldflags="-X 'main.buildInfo=${shell date '+%Y_%m_%d_%Hh:%Mm'}-${shell git branch --show-current}'"

@go build -o ${bin} -ldflags="-X 'github.com/loxilb-io/loxilb/common.BuildInfo=${shell date '+%Y_%m_%d_%Hh:%Mm'}-${shell git branch --show-current}'"
clean: subsys-clean
go clean

Expand Down
53 changes: 53 additions & 0 deletions api/models/version_get_entry.go

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

3 changes: 3 additions & 0 deletions api/restapi/configure_loxilb_rest_api.go
Original file line number Diff line number Diff line change
Expand Up @@ -182,6 +182,9 @@ func configureAPI(api *operations.LoxilbRestAPIAPI) http.Handler {
api.PostConfigBgpPolicyApplyHandler = operations.PostConfigBgpPolicyApplyHandlerFunc(handler.ConfigPostBGPPolicyApply)
api.DeleteConfigBgpPolicyApplyHandler = operations.DeleteConfigBgpPolicyApplyHandlerFunc(handler.ConfigDeleteBGPPolicyApply)

// Version
api.GetVersionHandler = operations.GetVersionHandlerFunc(handler.ConfigGetVersion)

api.PreServerShutdown = func() {}
api.ServerShutdown = func() {}

Expand Down
90 changes: 90 additions & 0 deletions api/restapi/embedded_spec.go

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

32 changes: 32 additions & 0 deletions api/restapi/handler/version.go
Original file line number Diff line number Diff line change
@@ -0,0 +1,32 @@
/*
* Copyright (c) 2022 NetLOX Inc
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at:
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package handler

import (
"github.com/go-openapi/runtime/middleware"
"github.com/loxilb-io/loxilb/api/models"
"github.com/loxilb-io/loxilb/api/restapi/operations"
cmn "github.com/loxilb-io/loxilb/common"
tk "github.com/loxilb-io/loxilib"
)

func ConfigGetVersion(params operations.GetVersionParams) middleware.Responder {
tk.LogIt(tk.LogDebug, "[API] version %s API called. url : %s\n", params.HTTPRequest.Method, params.HTTPRequest.URL)
var result models.VersionGetEntry
result.Version = cmn.Version
result.BuildInfo = cmn.BuildInfo
return operations.NewGetVersionOK().WithPayload(&result)
}
58 changes: 58 additions & 0 deletions api/restapi/operations/get_version.go

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

46 changes: 46 additions & 0 deletions api/restapi/operations/get_version_parameters.go

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Loading

0 comments on commit 8197780

Please sign in to comment.