Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
goSDN
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Iterations
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Locked files
Build
Pipelines
Jobs
Pipeline schedules
Test cases
Artifacts
Deploy
Releases
Package registry
Container registry
Model registry
Operate
Terraform modules
Analyze
Contributor analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
danet
goSDN
Merge requests
!343
Add basic application framework and example application to show interaction between events an NBI
Code
Review changes
Check out branch
Download
Patches
Plain diff
Merged
Add basic application framework and example application to show interaction between events an NBI
istaester/init-application-framework
into
develop
Overview
16
Commits
225
Pipelines
57
Changes
2
Merged
Ghost User
requested to merge
istaester/init-application-framework
into
develop
2 years ago
Overview
16
Commits
225
Pipelines
57
Changes
2
Expand
Depends on:
!340 (merged)
!344 (merged)
!349 (merged)
!342 (merged)
Edited
2 years ago
by
Ghost User
0
0
Merge request reports
Viewing commit
38e9f0f9
Show latest version
2 files
+
8
−
6
Side-by-side
Compare changes
Side-by-side
Inline
Show whitespace changes
Show one file at a time
Files
2
Search (e.g. *.vue) (Ctrl+P)
38e9f0f9
Fix lint errors
· 38e9f0f9
André Sterba
authored
2 years ago
controller/topology/ports/configuration/configuration.go
+
5
−
3
Options
@@ -5,16 +5,18 @@ import (
@@ -5,16 +5,18 @@ import (
"net"
"net"
)
)
// IPConfig represents an interface configuration for a cEOS instance
type
IPConfig
struct
{
type
IPConfig
struct
{
IP
net
.
IP
`
j
son:"ip,omitempty"`
IP
net
.
IP
`
b
son:"ip,omitempty"`
PrefixLength
int
`
j
son:"prefix_length,omitempty"`
PrefixLength
int
`
b
son:"prefix_length,omitempty"`
}
}
// New creates a new IPConfig
func
New
(
ip
string
,
prefixLength
int
)
(
IPConfig
,
error
)
{
func
New
(
ip
string
,
prefixLength
int
)
(
IPConfig
,
error
)
{
newIPConfig
:=
IPConfig
{}
newIPConfig
:=
IPConfig
{}
parsedIP
:=
net
.
ParseIP
(
ip
)
parsedIP
:=
net
.
ParseIP
(
ip
)
if
parsedIP
==
nil
{
if
parsedIP
==
nil
{
return
newIPConfig
,
fmt
.
Errorf
(
"%s can not be parsed to an IP
.
"
,
ip
)
return
newIPConfig
,
fmt
.
Errorf
(
"%s can not be parsed to an IP"
,
ip
)
}
}
newIPConfig
.
IP
=
parsedIP
newIPConfig
.
IP
=
parsedIP
Loading