Skip to content

Commit

Permalink
vcctl migrate to v1alpha2
Browse files Browse the repository at this point in the history
  • Loading branch information
hzxuzhonghu committed Jul 20, 2019
1 parent 10ed959 commit 2a1f349
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 6 deletions.
6 changes: 3 additions & 3 deletions pkg/cli/queue/get.go
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ import (
"github.com/spf13/cobra"

metav1 "k8s.io/apimachinery/pkg/apis/meta/v1"
"volcano.sh/volcano/pkg/apis/scheduling/v1alpha1"
"volcano.sh/volcano/pkg/apis/scheduling/v1alpha2"
"volcano.sh/volcano/pkg/client/clientset/versioned"
)

Expand Down Expand Up @@ -57,7 +57,7 @@ func GetQueue() error {
}

queueClient := versioned.NewForConfigOrDie(config)
queue, err := queueClient.SchedulingV1alpha1().Queues().Get(getQueueFlags.Name, metav1.GetOptions{})
queue, err := queueClient.SchedulingV1alpha2().Queues().Get(getQueueFlags.Name, metav1.GetOptions{})
if err != nil {
return err
}
Expand All @@ -68,7 +68,7 @@ func GetQueue() error {
}

// PrintQueue prints queue information
func PrintQueue(queue *v1alpha1.Queue, writer io.Writer) {
func PrintQueue(queue *v1alpha2.Queue, writer io.Writer) {
_, err := fmt.Fprintf(writer, "%-25s%-8s%-8s%-8s%-8s\n",
Name, Weight, Pending, Running, Unknown)
if err != nil {
Expand Down
6 changes: 3 additions & 3 deletions pkg/cli/queue/list.go
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ import (
"github.com/spf13/cobra"

metav1 "k8s.io/apimachinery/pkg/apis/meta/v1"
"volcano.sh/volcano/pkg/apis/scheduling/v1alpha1"
"volcano.sh/volcano/pkg/apis/scheduling/v1alpha2"
"volcano.sh/volcano/pkg/client/clientset/versioned"
)

Expand Down Expand Up @@ -64,7 +64,7 @@ func ListQueue() error {
}

jobClient := versioned.NewForConfigOrDie(config)
queues, err := jobClient.SchedulingV1alpha1().Queues().List(metav1.ListOptions{})
queues, err := jobClient.SchedulingV1alpha2().Queues().List(metav1.ListOptions{})
if err != nil {
return err
}
Expand All @@ -79,7 +79,7 @@ func ListQueue() error {
}

// PrintQueues prints queue information
func PrintQueues(queues *v1alpha1.QueueList, writer io.Writer) {
func PrintQueues(queues *v1alpha2.QueueList, writer io.Writer) {
_, err := fmt.Fprintf(writer, "%-25s%-8s%-8s%-8s%-8s\n",
Name, Weight, Pending, Running, Unknown)
if err != nil {
Expand Down

0 comments on commit 2a1f349

Please sign in to comment.