Skip to content
Open
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
13 changes: 10 additions & 3 deletions pkg/api/core/group/info/interface.go
Original file line number Diff line number Diff line change
Expand Up @@ -78,6 +78,9 @@ type Info struct {
ASN uint `json:"asn"`
V4 []string `json:"v4"`
V6 []string `json:"v6"`
IX string `json:"ix"`
IXPeerType string `json:"ix_peer_type"`
IXVlanID string `json:"ix_vlan_id"`
NOC string `json:"noc"`
NOCIP string `json:"noc_ip"`
TermIP string `json:"term_ip"`
Expand Down Expand Up @@ -164,9 +167,13 @@ type Service struct {
}

type Connection struct {
ID uint `json:"id"`
ServiceID string `json:"service_id"`
Open bool `json:"open"`
ID uint `json:"id"`
ServiceID string `json:"service_id"`
ConnectionType string `json:"connection_type"`
Open bool `json:"open"`
IX string `json:"ix"` // 接続IX
IXPeerType string `json:"ix_peer_type"` // パブリック or PI/CUG
IXVlanID string `json:"ix_vlan_id"` // VLAN-ID(PI/CUGの場合)
}

type Request struct {
Expand Down
13 changes: 10 additions & 3 deletions pkg/api/core/group/info/v0/info.go
Original file line number Diff line number Diff line change
Expand Up @@ -381,9 +381,13 @@ func Get(c *gin.Context) {
// Connection
if *tmpConnection.Enable {
resultConnection = append(resultConnection, info.Connection{
ID: tmpConnection.ID,
ServiceID: serviceID,
Open: *tmpConnection.Open,
ID: tmpConnection.ID,
ServiceID: serviceID,
ConnectionType: tmpConnection.ConnectionType,
Open: *tmpConnection.Open,
IX: tmpConnection.IX,
IXPeerType: tmpConnection.IXPeerType,
IXVlanID: tmpConnection.IXVlanID,
})
}

Expand Down Expand Up @@ -413,6 +417,9 @@ func Get(c *gin.Context) {
ASN: asn,
V4: v4,
V6: v6,
IX: tmpConnection.IX,
IXPeerType: tmpConnection.IXPeerType,
IXVlanID: tmpConnection.IXVlanID,
Fee: "Free",
NOC: tmpConnection.BGPRouter.NOC.Name,
NOCIP: tmpConnection.TunnelEndPointRouterIP.IP,
Expand Down
Loading