Skip to content

Commit

Permalink
Removal of Dynamic Egress functionality in favor of Dynamic ASG feature
Browse files Browse the repository at this point in the history
  • Loading branch information
MarcPaquette authored and geofffranks committed Apr 20, 2022
1 parent ab37279 commit a33b7c3
Show file tree
Hide file tree
Showing 2 changed files with 0 additions and 43 deletions.
19 changes: 0 additions & 19 deletions api.go
Original file line number Diff line number Diff line change
Expand Up @@ -15,12 +15,6 @@ type Policy struct {
Destination Destination `json:"destination"`
}

type EgressPolicy struct {
Source *EgressSource `json:"source"`
Destination *EgressDestination `json:"destination"`
AppLifecycle string `json:"app_lifecycle"`
}

type SecurityGroup struct {
Guid string `json:"guid"`
Name string `json:"name"`
Expand All @@ -31,19 +25,6 @@ type SecurityGroup struct {
RunningSpaceGuids []string `json:"running_space_guids"`
}

type EgressSource struct {
ID string `json:"id"`
Type string `json:"type"`
}

type EgressDestination struct {
Protocol string `json:"protocol"`
Ports []Ports `json:"ports"`
IPRanges []IPRange `json:"ips"`
ICMPType int `json:"icmp_type"`
ICMPCode int `json:"icmp_code"`
}

type IPRange struct {
Start string `json:"start"`
End string `json:"end"`
Expand Down
24 changes: 0 additions & 24 deletions policy_slice.go
Original file line number Diff line number Diff line change
Expand Up @@ -28,27 +28,3 @@ func (s PolicySlice) Less(i, j int) bool {
func (s PolicySlice) Swap(i, j int) {
s[i], s[j] = s[j], s[i]
}

type EgressPolicySlice []EgressPolicy

func (s EgressPolicySlice) Len() int {
return len(s)
}

func (s EgressPolicySlice) Less(i, j int) bool {
a, err := json.Marshal(s[i])
if err != nil {
panic(err)
}

b, err := json.Marshal(s[j])
if err != nil {
panic(err)
}

return strings.Compare(string(a), string(b)) < 0
}

func (s EgressPolicySlice) Swap(i, j int) {
s[i], s[j] = s[j], s[i]
}

0 comments on commit a33b7c3

Please sign in to comment.