Skip to content

Commit

Permalink
Merge pull request #284 from neiljerram/revert-untracked
Browse files Browse the repository at this point in the history
Revert untracked changes
  • Loading branch information
matthewdupre authored Nov 29, 2016
2 parents 7fd771d + 841aa52 commit 4f8e776
Show file tree
Hide file tree
Showing 5 changed files with 0 additions and 12 deletions.
1 change: 0 additions & 1 deletion docs/data-model.md
Original file line number Diff line number Diff line change
Expand Up @@ -379,7 +379,6 @@ own:
"order": <number>|"default",
"inbound_rules": [{<rule>}, ...],
"outbound_rules": [{<rule>}, ...]
"untracked": <boolean>
}

> **NOTE**
Expand Down
6 changes: 0 additions & 6 deletions lib/api/policy.go
Original file line number Diff line number Diff line change
Expand Up @@ -93,12 +93,6 @@ type PolicySpec struct {
// deployment != "dev"
// ! has(label_name)
Selector string `json:"selector" validate:"selector"`

// DoNotTrack indicates whether packets matched by the rules in this policy should go through
// the data plane's connection tracking, such as Linux conntrack. If True, the rules in
// this policy are applied before any data plane connection tracking, and packets allowed by
// this policy are marked as not to be tracked.
DoNotTrack bool `json:"doNotTrack,omitempty"`
}

// NewPolicy creates a new (zeroed) Policy struct with the TypeMetadata initialised to the current
Expand Down
2 changes: 0 additions & 2 deletions lib/backend/model/policy.go
Original file line number Diff line number Diff line change
Expand Up @@ -93,7 +93,6 @@ type Policy struct {
InboundRules []Rule `json:"inbound_rules,omitempty" validate:"omitempty,dive"`
OutboundRules []Rule `json:"outbound_rules,omitempty" validate:"omitempty,dive"`
Selector string `json:"selector" validate:"selector"`
DoNotTrack bool `json:"untracked,omitempty"`
}

func (p Policy) String() string {
Expand All @@ -112,6 +111,5 @@ func (p Policy) String() string {
outRules[ii] = rule.String()
}
parts = append(parts, fmt.Sprintf("outbound:%v", strings.Join(outRules, ";")))
parts = append(parts, fmt.Sprintf("untracked:%v", p.DoNotTrack))
return strings.Join(parts, ",")
}
2 changes: 0 additions & 2 deletions lib/client/policy.go
Original file line number Diff line number Diff line change
Expand Up @@ -114,7 +114,6 @@ func (h *policies) convertAPIToKVPair(a unversioned.Resource) (*model.KVPair, er
InboundRules: rulesAPIToBackend(ap.Spec.IngressRules),
OutboundRules: rulesAPIToBackend(ap.Spec.EgressRules),
Selector: ap.Spec.Selector,
DoNotTrack: ap.Spec.DoNotTrack,
},
}

Expand All @@ -134,7 +133,6 @@ func (h *policies) convertKVPairToAPI(d *model.KVPair) (unversioned.Resource, er
ap.Spec.IngressRules = rulesBackendToAPI(bp.InboundRules)
ap.Spec.EgressRules = rulesBackendToAPI(bp.OutboundRules)
ap.Spec.Selector = bp.Selector
ap.Spec.DoNotTrack = bp.DoNotTrack

return ap, nil
}
1 change: 0 additions & 1 deletion lib/client/policy_e2e_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -60,7 +60,6 @@ var policySpec2 = api.PolicySpec{
IngressRules: []api.Rule{testutils.InRule2, testutils.InRule1},
EgressRules: []api.Rule{testutils.EgressRule2, testutils.EgressRule1},
Selector: "policy2-selector",
DoNotTrack: true,
}

var _ = Describe("Policy tests", func() {
Expand Down

0 comments on commit 4f8e776

Please sign in to comment.