npc: Rename policy{Ingress,Egress} to policyType{Ingress,Egress}

This commit is contained in:
Martynas Pumputis authored and Martynas Pumputis committed 2018-07-24 10:06:23 +02:00
1 parent dee24aec65
commit 49224ec9f7
6 files changed
+27 -27

No files matched your search

+3 -3
View File
@@ -288,10 +288,10 @@ func (ns *ns) updatePod(oldObj, newObj *coreapi.Pod) error {
}
if !ns.legacy {
if err := ns.addOrRemoveToDefaultAllowIPSet(ps, oldObj, newObj, oldMatch, newMatch, ingressPolicy); err != nil {
if err := ns.addOrRemoveToDefaultAllowIPSet(ps, oldObj, newObj, oldMatch, newMatch, policyTypeIngress); err != nil {
return err
}
if err := ns.addOrRemoveToDefaultAllowIPSet(ps, oldObj, newObj, oldMatch, newMatch, egressPolicy); err != nil {
if err := ns.addOrRemoveToDefaultAllowIPSet(ps, oldObj, newObj, oldMatch, newMatch, policyTypeEgress); err != nil {
return err
}
}
@@ -645,7 +645,7 @@ func podComment(pod *coreapi.Pod) string {
func (ns *ns) defaultAllowIPSetName(pt policyType) ipset.Name {
ipset := ns.ingressDefaultAllowIPSet
if pt == egressPolicy {
if pt == policyTypeEgress {
ipset = ns.egressDefaultAllowIPSet
}
return ipset