Skip to content
This repository has been archived by the owner on May 6, 2022. It is now read-only.

Commit

Permalink
Use class data got from RetrieveClassByName to pass to CreateClass in…
Browse files Browse the repository at this point in the history
… cmd
  • Loading branch information
artmello committed Jul 16, 2018
1 parent c6c49b6 commit 0cef4a5
Showing 1 changed file with 2 additions and 12 deletions.
14 changes: 2 additions & 12 deletions cmd/svcat/class/create_cmd.go
Original file line number Diff line number Diff line change
Expand Up @@ -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"
)

Expand Down Expand Up @@ -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
}
Expand Down

0 comments on commit 0cef4a5

Please sign in to comment.