Skip to content

Commit

Permalink
Add aliases for create, delete, update commands
Browse files Browse the repository at this point in the history
  • Loading branch information
andscoop committed Jul 6, 2018
1 parent 3d3a9f7 commit 34dd1cc
Show file tree
Hide file tree
Showing 2 changed files with 35 additions and 29 deletions.
31 changes: 17 additions & 14 deletions cmd/deployment.go
Expand Up @@ -14,19 +14,21 @@ var (
}

deploymentCreateCmd = &cobra.Command{
Use: "create DEPLOYMENT",
Short: "Create a new Astronomer Deployment",
Long: "Create a new Astronomer Deployment",
Args: cobra.ExactArgs(1),
RunE: deploymentCreate,
Use: "create DEPLOYMENT",
Aliases: []string{"cr"},
Short: "Create a new Astronomer Deployment",
Long: "Create a new Astronomer Deployment",
Args: cobra.ExactArgs(1),
RunE: deploymentCreate,
}

deploymentDeleteCmd = &cobra.Command{
Use: "delete DEPLOYMENT",
Short: "Delete an airflow deployment",
Long: "Delete an airflow deployment",
Args: cobra.ExactArgs(1),
RunE: deploymentDelete,
Use: "delete DEPLOYMENT",
Aliases: []string{"de"},
Short: "Delete an airflow deployment",
Long: "Delete an airflow deployment",
Args: cobra.ExactArgs(1),
RunE: deploymentDelete,
}

deploymentListCmd = &cobra.Command{
Expand All @@ -38,10 +40,11 @@ var (
}

deploymentUpdateCmd = &cobra.Command{
Use: "update",
Short: "Update airflow deployments",
Long: "Update airflow deployments",
RunE: deploymentUpdate,
Use: "update",
Aliases: []string{"up"},
Short: "Update airflow deployments",
Long: "Update airflow deployments",
RunE: deploymentUpdate,
}
)

Expand Down
33 changes: 18 additions & 15 deletions cmd/workspace.go
Expand Up @@ -10,7 +10,7 @@ var (

workspaceRootCmd = &cobra.Command{
Use: "workspace",
Aliases: []string{"wo", "ws"},
Aliases: []string{"wo"},
Short: "Manage Astronomer workspaces",
Long: "Workspaces contain a group of Airflow Cluster Deployments. The creator of the workspace can invite other users into it",
}
Expand All @@ -24,26 +24,29 @@ var (
}

workspaceCreateCmd = &cobra.Command{
Use: "create WORKSPACE",
Short: "Create an astronomer workspaces",
Long: "Create an astronomer workspaces",
Args: cobra.ExactArgs(1),
RunE: workspaceCreate,
Use: "create WORKSPACE",
Aliases: []string{"cr"},
Short: "Create an astronomer workspaces",
Long: "Create an astronomer workspaces",
Args: cobra.ExactArgs(1),
RunE: workspaceCreate,
}

workspaceDeleteCmd = &cobra.Command{
Use: "delete WORKSPACE",
Short: "Delete an astronomer workspace",
Long: "Delete an astronomer workspace",
Args: cobra.ExactArgs(1),
RunE: workspaceDelete,
Use: "delete WORKSPACE",
Aliases: []string{"de"},
Short: "Delete an astronomer workspace",
Long: "Delete an astronomer workspace",
Args: cobra.ExactArgs(1),
RunE: workspaceDelete,
}

workspaceUpdateCmd = &cobra.Command{
Use: "update",
Short: "Update an Astronomer workspace",
Long: "Update a workspace name, as well as users and roles assigned to a workspace",
RunE: workspaceUpdate,
Use: "update",
Aliases: []string{"up"},
Short: "Update an Astronomer workspace",
Long: "Update a workspace name, as well as users and roles assigned to a workspace",
RunE: workspaceUpdate,
}
)

Expand Down

0 comments on commit 34dd1cc

Please sign in to comment.