Skip to content

Commit 0126891

Browse files
committed
Remove redundant constant definition
1 parent 38c9545 commit 0126891

File tree

1 file changed

+3
-4
lines changed

1 file changed

+3
-4
lines changed

pkg/sdn/plugin/pod_linux.go

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,7 @@ import (
99
"strings"
1010
"syscall"
1111

12+
sdnapi "github.com/openshift/origin/pkg/sdn/api"
1213
"github.com/openshift/origin/pkg/sdn/plugin/cniserver"
1314

1415
"github.com/golang/glog"
@@ -36,8 +37,6 @@ const (
3637
statusCmd = "status"
3738
updateCmd = "update"
3839

39-
AssignMacvlanAnnotation string = "pod.network.openshift.io/assign-macvlan"
40-
4140
podInterfaceName = knetwork.DefaultInterfaceName
4241
)
4342

@@ -72,12 +71,12 @@ func wantsMacvlan(pod *kapi.Pod) (bool, error) {
7271
}
7372
}
7473

75-
val, ok := pod.Annotations[AssignMacvlanAnnotation]
74+
val, ok := pod.Annotations[sdnapi.AssignMacvlanAnnotation]
7675
if !ok || val != "true" {
7776
return false, nil
7877
}
7978
if !privileged {
80-
return false, fmt.Errorf("pod has %q annotation but is not privileged", AssignMacvlanAnnotation)
79+
return false, fmt.Errorf("pod has %q annotation but is not privileged", sdnapi.AssignMacvlanAnnotation)
8180
}
8281

8382
return true, nil

0 commit comments

Comments
 (0)