Skip to content

Commit

Permalink
Renaming title to label to be in sync with houston
Browse files Browse the repository at this point in the history
  • Loading branch information
andscoop committed Jul 5, 2018
1 parent 2a26a17 commit 7e8a7eb
Show file tree
Hide file tree
Showing 5 changed files with 11 additions and 11 deletions.
2 changes: 1 addition & 1 deletion airflow/docker.go
Expand Up @@ -258,7 +258,7 @@ func Deploy(path, name, wsId string) error {
for i, deployment := range deployments {
index := i + 1
deployMap[strconv.Itoa(index)] = deployment
fmt.Printf("%d) %s (%s)\n", index, deployment.Title, deployment.ReleaseName)
fmt.Printf("%d) %s (%s)\n", index, deployment.Label, deployment.ReleaseName)
}

choice := input.InputText("")
Expand Down
8 changes: 4 additions & 4 deletions deployment/deployment.go
Expand Up @@ -14,8 +14,8 @@ var (
api = houston.NewHoustonClient(http)
)

func Create(title, ws string) error {
deployment, err := api.CreateDeployment(title, ws)
func Create(label, ws string) error {
deployment, err := api.CreateDeployment(label, ws)
if err != nil {
return err
}
Expand Down Expand Up @@ -48,8 +48,8 @@ func List(ws string) error {
}

for _, d := range deployments {
rowTmp := "Title: %s\nId: %s\nRelease: %s\nVersion: %s\n\n"
fmt.Printf(rowTmp, d.Title, d.Id, d.ReleaseName, d.Version)
rowTmp := "Label: %s\nId: %s\nRelease: %s\nVersion: %s\n\n"
fmt.Printf(rowTmp, d.Label, d.Id, d.ReleaseName, d.Version)
}
return nil
}
4 changes: 2 additions & 2 deletions houston/houston.go
Expand Up @@ -229,8 +229,8 @@ func (c *Client) QueryHouston(query string) (*HoustonResponse, error) {

// CreateDeployment will send request to Houston to create a new AirflowDeployment
// Returns a StatusResponse which contains the unique id of deployment
func (c *Client) CreateDeployment(title, wsId string) (*Deployment, error) {
request := fmt.Sprintf(createDeploymentRequest, title, wsId)
func (c *Client) CreateDeployment(label, wsId string) (*Deployment, error) {
request := fmt.Sprintf(createDeploymentRequest, label, wsId)
fmt.Println(request)
response, err := c.QueryHouston(request)
if err != nil {
Expand Down
2 changes: 1 addition & 1 deletion houston/types.go
Expand Up @@ -33,7 +33,7 @@ type Decoded struct {
type Deployment struct {
Id string `json:"uuid"`
Type string `json:"type"`
Title string `json:"label"`
Label string `json:"label"`
ReleaseName string `json:"releaseName"`
Version string `json:"version"`
Team string `json:"team"`
Expand Down
6 changes: 3 additions & 3 deletions workspace/workspace.go
Expand Up @@ -31,13 +31,13 @@ func List() error {
}

for _, w := range ws {
wsTitle := "Title : %s\n"
wsLabel := "Label : %s\n"
wsId := "Id : %s\n"
wsActiveFlag := "Act. Flag : %s\n"
wsDesc := "Desc. : %s\n"

// rowTmp := "Title: %s\nId: %s\nActive Flag: %s\nDesc.: %s\n\n"
rowTmp := wsTitle + wsId + wsActiveFlag + wsDesc
// rowTmp := "Label: %s\nId: %s\nActive Flag: %s\nDesc.: %s\n\n"
rowTmp := wsLabel + wsId + wsActiveFlag + wsDesc
fmt.Printf(rowTmp, w.Label, w.Uuid, w.Active, w.Description)
}
return nil
Expand Down

0 comments on commit 7e8a7eb

Please sign in to comment.