From 0cef4a5c07617f7b4da4ffa0d5e60d98759c159a Mon Sep 17 00:00:00 2001 From: Arthur Mello Date: Mon, 16 Jul 2018 17:37:50 -0300 Subject: [PATCH] Use class data got from RetrieveClassByName to pass to CreateClass in cmd --- cmd/svcat/class/create_cmd.go | 14 ++------------ 1 file changed, 2 insertions(+), 12 deletions(-) diff --git a/cmd/svcat/class/create_cmd.go b/cmd/svcat/class/create_cmd.go index 37f38fd6f80..03dc3d8ffc1 100644 --- a/cmd/svcat/class/create_cmd.go +++ b/cmd/svcat/class/create_cmd.go @@ -21,7 +21,6 @@ import ( "github.com/kubernetes-incubator/service-catalog/cmd/svcat/command" "github.com/kubernetes-incubator/service-catalog/cmd/svcat/output" - "github.com/kubernetes-incubator/service-catalog/pkg/apis/servicecatalog/v1beta1" "github.com/spf13/cobra" ) @@ -67,18 +66,9 @@ func (c *createCmd) Run() error { return err } - newClass := &v1beta1.ClusterServiceClass{ - Spec: v1beta1.ClusterServiceClassSpec{ - ClusterServiceBrokerName: class.Spec.ClusterServiceBrokerName, - CommonServiceClassSpec: v1beta1.CommonServiceClassSpec{ - ExternalName: c.name, - Description: class.Spec.Description, - Tags: class.Spec.Tags, - }, - }, - } + class.Spec.ExternalName = c.name - createdClass, err := c.App.CreateClass(newClass) + createdClass, err := c.App.CreateClass(class) if err != nil { return err }