fix: add origin for routes.

This commit is contained in:
zhihui.ding
2023-05-09 19:49:05 +08:00
parent d6fbf07571
commit e57dba7acd
6 changed files with 27 additions and 11 deletions

View File

@@ -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"`