mirror of
https://github.com/luscis/openlan.git
synced 2025-10-05 08:36:59 +08:00
fix: add origin for routes.
This commit is contained in:
@@ -12,6 +12,7 @@ type Route struct {
|
||||
NextHop string `json:"nexthop"`
|
||||
Metric int `json:"metric"`
|
||||
Mode string `json:"mode"`
|
||||
Origin string `json:"origin"`
|
||||
}
|
||||
|
||||
func NewRoute(prefix string, nexthop, mode string) (this *Route) {
|
||||
@@ -32,6 +33,10 @@ func (u *Route) SetMetric(value int) {
|
||||
u.Metric = value
|
||||
}
|
||||
|
||||
func (u *Route) SetOrigin(value string) {
|
||||
u.Origin = value
|
||||
}
|
||||
|
||||
type Network struct {
|
||||
Name string `json:"name"`
|
||||
Tenant string `json:"tenant,omitempty"`
|
||||
|
Reference in New Issue
Block a user