Skip to content

Commit

Permalink
Remove redundant constant definition
Browse files Browse the repository at this point in the history
  • Loading branch information
danwinship committed Oct 26, 2016
1 parent 38c9545 commit af9561b
Showing 1 changed file with 3 additions and 4 deletions.
7 changes: 3 additions & 4 deletions pkg/sdn/plugin/pod_linux.go
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@ import (
"syscall"

"github.com/openshift/origin/pkg/sdn/plugin/cniserver"
sdnapi "github.com/openshift/origin/pkg/sdn/api"

"github.com/golang/glog"

Expand All @@ -36,8 +37,6 @@ const (
statusCmd = "status"
updateCmd = "update"

AssignMacvlanAnnotation string = "pod.network.openshift.io/assign-macvlan"

podInterfaceName = knetwork.DefaultInterfaceName
)

Expand Down Expand Up @@ -72,12 +71,12 @@ func wantsMacvlan(pod *kapi.Pod) (bool, error) {
}
}

val, ok := pod.Annotations[AssignMacvlanAnnotation]
val, ok := pod.Annotations[sdnapi.AssignMacvlanAnnotation]
if !ok || val != "true" {
return false, nil
}
if !privileged {
return false, fmt.Errorf("pod has %q annotation but is not privileged", AssignMacvlanAnnotation)
return false, fmt.Errorf("pod has %q annotation but is not privileged", sdnapi.AssignMacvlanAnnotation)
}

return true, nil
Expand Down

0 comments on commit af9561b

Please sign in to comment.