Skip to content

Commit

Permalink
Add route entity, cc #154
Browse files Browse the repository at this point in the history
Signed-off-by: sufuf3 <[email protected]>
  • Loading branch information
sufuf3 authored and hwchiu committed Jul 25, 2018
1 parent 97937bc commit 581fa97
Showing 1 changed file with 14 additions and 7 deletions.
21 changes: 14 additions & 7 deletions src/entity/pod.go
Original file line number Diff line number Diff line change
Expand Up @@ -18,17 +18,24 @@ type Container struct {
Command []string `bson:"command" json:"command" validate:"required,dive,required"`
}

// PodRoute is the structure for add IP routing table
type PodRoute struct {
DstCIDR string `bson:"dstCIDR" json:"dstCIDR" validate:"required,cidr"`
Gateway string `bson:"gateway" json:"gateway" validate:"required,ip"`
}

// PodNetwork is the structure for pod network info
type PodNetwork struct {
Name string `bson:"name" json:"name"`
IfName string `bson:"ifName" json:"ifName"`
VlanTag *int32 `bson:"vlanTag" json:"vlanTag"`
IPAddress string `bson:"ipAddress" json:"ipAddress"`
Netmask string `bson:"netmask" json:"netmask"`
BridgeName string `bson:"bridgeName" json:"bridgeName"` //its from the entity.Network entity
Name string `bson:"name" json:"name"`
IfName string `bson:"ifName" json:"ifName"`
VlanTag *int32 `bson:"vlanTag" json:"vlanTag"`
IPAddress string `bson:"ipAddress" json:"ipAddress"`
Netmask string `bson:"netmask" json:"netmask"`
Routes []PodRoute `bson:"routes,omitempty" json:"routes"`
BridgeName string `bson:"bridgeName" json:"bridgeName"` //its from the entity.Network entity
}

// PodVolume is the structure for pof volume info
// PodVolume is the structure for pof volume info
type PodVolume struct {
Name string `bson:"name" json:"name" validate:"required"`
MountPath string `bson:"mountPath" json:"mountPath" validate:"required"`
Expand Down

0 comments on commit 581fa97

Please sign in to comment.