From af9561bd8a3ce52ae5da436ea2eb63e77f2a2ce9 Mon Sep 17 00:00:00 2001 From: Dan Winship Date: Wed, 26 Oct 2016 11:50:14 -0400 Subject: [PATCH] Remove redundant constant definition --- pkg/sdn/plugin/pod_linux.go | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/pkg/sdn/plugin/pod_linux.go b/pkg/sdn/plugin/pod_linux.go index f80bb60ae4a6..eb6ac04e6e78 100644 --- a/pkg/sdn/plugin/pod_linux.go +++ b/pkg/sdn/plugin/pod_linux.go @@ -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" @@ -36,8 +37,6 @@ const ( statusCmd = "status" updateCmd = "update" - AssignMacvlanAnnotation string = "pod.network.openshift.io/assign-macvlan" - podInterfaceName = knetwork.DefaultInterfaceName ) @@ -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