Skip to content

Commit

Permalink
Merge pull request openshift#12713 from JacobTanenbaum/BZ1391786v2
Browse files Browse the repository at this point in the history
Merged by openshift-bot
  • Loading branch information
OpenShift Bot authored Feb 2, 2017
2 parents 6daf164 + 5dbe228 commit 89ed457
Show file tree
Hide file tree
Showing 12 changed files with 68 additions and 2 deletions.
6 changes: 6 additions & 0 deletions contrib/completions/bash/oc
Original file line number Diff line number Diff line change
Expand Up @@ -7595,6 +7595,8 @@ _oc_create_route_edge()
local_nonpersistent_flags+=("--template=")
flags+=("--validate")
local_nonpersistent_flags+=("--validate")
flags+=("--wildcardpolicy=")
local_nonpersistent_flags+=("--wildcardpolicy=")
flags+=("--as=")
flags+=("--certificate-authority=")
flags_with_completion+=("--certificate-authority")
Expand Down Expand Up @@ -7677,6 +7679,8 @@ _oc_create_route_passthrough()
local_nonpersistent_flags+=("--template=")
flags+=("--validate")
local_nonpersistent_flags+=("--validate")
flags+=("--wildcardpolicy=")
local_nonpersistent_flags+=("--wildcardpolicy=")
flags+=("--as=")
flags+=("--certificate-authority=")
flags_with_completion+=("--certificate-authority")
Expand Down Expand Up @@ -7777,6 +7781,8 @@ _oc_create_route_reencrypt()
local_nonpersistent_flags+=("--template=")
flags+=("--validate")
local_nonpersistent_flags+=("--validate")
flags+=("--wildcardpolicy=")
local_nonpersistent_flags+=("--wildcardpolicy=")
flags+=("--as=")
flags+=("--certificate-authority=")
flags_with_completion+=("--certificate-authority")
Expand Down
6 changes: 6 additions & 0 deletions contrib/completions/bash/openshift
Original file line number Diff line number Diff line change
Expand Up @@ -12584,6 +12584,8 @@ _openshift_cli_create_route_edge()
local_nonpersistent_flags+=("--template=")
flags+=("--validate")
local_nonpersistent_flags+=("--validate")
flags+=("--wildcardpolicy=")
local_nonpersistent_flags+=("--wildcardpolicy=")
flags+=("--as=")
flags+=("--azure-container-registry-config=")
flags+=("--certificate-authority=")
Expand Down Expand Up @@ -12668,6 +12670,8 @@ _openshift_cli_create_route_passthrough()
local_nonpersistent_flags+=("--template=")
flags+=("--validate")
local_nonpersistent_flags+=("--validate")
flags+=("--wildcardpolicy=")
local_nonpersistent_flags+=("--wildcardpolicy=")
flags+=("--as=")
flags+=("--azure-container-registry-config=")
flags+=("--certificate-authority=")
Expand Down Expand Up @@ -12770,6 +12774,8 @@ _openshift_cli_create_route_reencrypt()
local_nonpersistent_flags+=("--template=")
flags+=("--validate")
local_nonpersistent_flags+=("--validate")
flags+=("--wildcardpolicy=")
local_nonpersistent_flags+=("--wildcardpolicy=")
flags+=("--as=")
flags+=("--azure-container-registry-config=")
flags+=("--certificate-authority=")
Expand Down
6 changes: 6 additions & 0 deletions contrib/completions/zsh/oc
Original file line number Diff line number Diff line change
Expand Up @@ -7743,6 +7743,8 @@ _oc_create_route_edge()
local_nonpersistent_flags+=("--template=")
flags+=("--validate")
local_nonpersistent_flags+=("--validate")
flags+=("--wildcardpolicy=")
local_nonpersistent_flags+=("--wildcardpolicy=")
flags+=("--as=")
flags+=("--certificate-authority=")
flags_with_completion+=("--certificate-authority")
Expand Down Expand Up @@ -7825,6 +7827,8 @@ _oc_create_route_passthrough()
local_nonpersistent_flags+=("--template=")
flags+=("--validate")
local_nonpersistent_flags+=("--validate")
flags+=("--wildcardpolicy=")
local_nonpersistent_flags+=("--wildcardpolicy=")
flags+=("--as=")
flags+=("--certificate-authority=")
flags_with_completion+=("--certificate-authority")
Expand Down Expand Up @@ -7925,6 +7929,8 @@ _oc_create_route_reencrypt()
local_nonpersistent_flags+=("--template=")
flags+=("--validate")
local_nonpersistent_flags+=("--validate")
flags+=("--wildcardpolicy=")
local_nonpersistent_flags+=("--wildcardpolicy=")
flags+=("--as=")
flags+=("--certificate-authority=")
flags_with_completion+=("--certificate-authority")
Expand Down
6 changes: 6 additions & 0 deletions contrib/completions/zsh/openshift
Original file line number Diff line number Diff line change
Expand Up @@ -12732,6 +12732,8 @@ _openshift_cli_create_route_edge()
local_nonpersistent_flags+=("--template=")
flags+=("--validate")
local_nonpersistent_flags+=("--validate")
flags+=("--wildcardpolicy=")
local_nonpersistent_flags+=("--wildcardpolicy=")
flags+=("--as=")
flags+=("--azure-container-registry-config=")
flags+=("--certificate-authority=")
Expand Down Expand Up @@ -12816,6 +12818,8 @@ _openshift_cli_create_route_passthrough()
local_nonpersistent_flags+=("--template=")
flags+=("--validate")
local_nonpersistent_flags+=("--validate")
flags+=("--wildcardpolicy=")
local_nonpersistent_flags+=("--wildcardpolicy=")
flags+=("--as=")
flags+=("--azure-container-registry-config=")
flags+=("--certificate-authority=")
Expand Down Expand Up @@ -12918,6 +12922,8 @@ _openshift_cli_create_route_reencrypt()
local_nonpersistent_flags+=("--template=")
flags+=("--validate")
local_nonpersistent_flags+=("--validate")
flags+=("--wildcardpolicy=")
local_nonpersistent_flags+=("--wildcardpolicy=")
flags+=("--as=")
flags+=("--azure-container-registry-config=")
flags+=("--certificate-authority=")
Expand Down
4 changes: 4 additions & 0 deletions docs/man/man1/oc-create-route-edge.1
Original file line number Diff line number Diff line change
Expand Up @@ -100,6 +100,10 @@ Specify the service (either just its name or using type/name syntax) that the ge
\fB\-\-validate\fP=false
If true, use a schema to validate the input before sending it

.PP
\fB\-\-wildcardpolicy\fP=""
Sets the WilcardPolicy for the hostname, the default is "None". valid values are "None" and "Subdomain"


.SH OPTIONS INHERITED FROM PARENT COMMANDS
.PP
Expand Down
4 changes: 4 additions & 0 deletions docs/man/man1/oc-create-route-passthrough.1
Original file line number Diff line number Diff line change
Expand Up @@ -80,6 +80,10 @@ Specify the service (either just its name or using type/name syntax) that the ge
\fB\-\-validate\fP=false
If true, use a schema to validate the input before sending it

.PP
\fB\-\-wildcardpolicy\fP=""
Sets the WilcardPolicy for the hostname, the default is "None". valid values are "None" and "Subdomain"


.SH OPTIONS INHERITED FROM PARENT COMMANDS
.PP
Expand Down
4 changes: 4 additions & 0 deletions docs/man/man1/oc-create-route-reencrypt.1
Original file line number Diff line number Diff line change
Expand Up @@ -100,6 +100,10 @@ Specify the service (either just its name or using type/name syntax) that the ge
\fB\-\-validate\fP=false
If true, use a schema to validate the input before sending it

.PP
\fB\-\-wildcardpolicy\fP=""
Sets the WildcardPolicy for the hostname, the default is "None". valid values are "None" and "Subdomain"


.SH OPTIONS INHERITED FROM PARENT COMMANDS
.PP
Expand Down
4 changes: 4 additions & 0 deletions docs/man/man1/openshift-cli-create-route-edge.1
Original file line number Diff line number Diff line change
Expand Up @@ -100,6 +100,10 @@ Specify the service (either just its name or using type/name syntax) that the ge
\fB\-\-validate\fP=false
If true, use a schema to validate the input before sending it

.PP
\fB\-\-wildcardpolicy\fP=""
Sets the WilcardPolicy for the hostname, the default is "None". valid values are "None" and "Subdomain"


.SH OPTIONS INHERITED FROM PARENT COMMANDS
.PP
Expand Down
4 changes: 4 additions & 0 deletions docs/man/man1/openshift-cli-create-route-passthrough.1
Original file line number Diff line number Diff line change
Expand Up @@ -80,6 +80,10 @@ Specify the service (either just its name or using type/name syntax) that the ge
\fB\-\-validate\fP=false
If true, use a schema to validate the input before sending it

.PP
\fB\-\-wildcardpolicy\fP=""
Sets the WilcardPolicy for the hostname, the default is "None". valid values are "None" and "Subdomain"


.SH OPTIONS INHERITED FROM PARENT COMMANDS
.PP
Expand Down
4 changes: 4 additions & 0 deletions docs/man/man1/openshift-cli-create-route-reencrypt.1
Original file line number Diff line number Diff line change
Expand Up @@ -100,6 +100,10 @@ Specify the service (either just its name or using type/name syntax) that the ge
\fB\-\-validate\fP=false
If true, use a schema to validate the input before sending it

.PP
\fB\-\-wildcardpolicy\fP=""
Sets the WildcardPolicy for the hostname, the default is "None". valid values are "None" and "Subdomain"


.SH OPTIONS INHERITED FROM PARENT COMMANDS
.PP
Expand Down
18 changes: 18 additions & 0 deletions pkg/cmd/cli/cmd/create/route.go
Original file line number Diff line number Diff line change
Expand Up @@ -85,6 +85,7 @@ func NewCmdCreateEdgeRoute(fullName string, f *clientcmd.Factory, out io.Writer)
cmd.MarkFlagFilename("key")
cmd.Flags().String("ca-cert", "", "Path to a CA certificate file.")
cmd.MarkFlagFilename("ca-cert")
cmd.Flags().String("wildcardpolicy", "", "Sets the WilcardPolicy for the hostname, the default is \"None\". valid values are \"None\" and \"Subdomain\"")

return cmd
}
Expand Down Expand Up @@ -112,6 +113,11 @@ func CreateEdgeRoute(f *clientcmd.Factory, out io.Writer, cmd *cobra.Command, ar
return err
}

wildcardpolicy := kcmdutil.GetFlagString(cmd, "wildcardpolicy")
if len(wildcardpolicy) > 0 {
route.Spec.WildcardPolicy = api.WildcardPolicyType(wildcardpolicy)
}

route.Spec.Host = kcmdutil.GetFlagString(cmd, "hostname")
route.Spec.Path = kcmdutil.GetFlagString(cmd, "path")

Expand Down Expand Up @@ -200,6 +206,7 @@ func NewCmdCreatePassthroughRoute(fullName string, f *clientcmd.Factory, out io.
cmd.Flags().String("port", "", "Name of the service port or number of the container port the route will route traffic to")
cmd.Flags().String("service", "", "Name of the service that the new route is exposing")
cmd.MarkFlagRequired("service")
cmd.Flags().String("wildcardpolicy", "", "Sets the WilcardPolicy for the hostname, the default is \"None\". valid values are \"None\" and \"Subdomain\"")

return cmd
}
Expand Down Expand Up @@ -227,6 +234,11 @@ func CreatePassthroughRoute(f *clientcmd.Factory, out io.Writer, cmd *cobra.Comm
return err
}

wildcardpolicy := kcmdutil.GetFlagString(cmd, "wildcardpolicy")
if len(wildcardpolicy) > 0 {
route.Spec.WildcardPolicy = api.WildcardPolicyType(wildcardpolicy)
}

route.Spec.Host = kcmdutil.GetFlagString(cmd, "hostname")

route.Spec.TLS = new(api.TLSConfig)
Expand Down Expand Up @@ -305,6 +317,7 @@ func NewCmdCreateReencryptRoute(fullName string, f *clientcmd.Factory, out io.Wr
cmd.Flags().String("dest-ca-cert", "", "Path to a CA certificate file, used for securing the connection from the router to the destination.")
cmd.MarkFlagRequired("dest-ca-cert")
cmd.MarkFlagFilename("dest-ca-cert")
cmd.Flags().String("wildcardpolicy", "", "Sets the WildcardPolicy for the hostname, the default is \"None\". valid values are \"None\" and \"Subdomain\"")

return cmd
}
Expand Down Expand Up @@ -332,6 +345,11 @@ func CreateReencryptRoute(f *clientcmd.Factory, out io.Writer, cmd *cobra.Comman
return err
}

wildcardpolicy := kcmdutil.GetFlagString(cmd, "wildcardpolicy")
if len(wildcardpolicy) > 0 {
route.Spec.WildcardPolicy = api.WildcardPolicyType(wildcardpolicy)
}

route.Spec.Host = kcmdutil.GetFlagString(cmd, "hostname")
route.Spec.Path = kcmdutil.GetFlagString(cmd, "path")

Expand Down
4 changes: 2 additions & 2 deletions pkg/cmd/cli/describe/printer.go
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@ var (
imageStreamImageColumns = []string{"NAME", "DOCKER REF", "UPDATED", "IMAGENAME"}
imageStreamColumns = []string{"NAME", "DOCKER REPO", "TAGS", "UPDATED"}
projectColumns = []string{"NAME", "DISPLAY NAME", "STATUS"}
routeColumns = []string{"NAME", "HOST/PORT", "PATH", "SERVICES", "PORT", "TERMINATION"}
routeColumns = []string{"NAME", "HOST/PORT", "PATH", "SERVICES", "PORT", "TERMINATION", "WILDCARDPOLICY"}
deploymentConfigColumns = []string{"NAME", "REVISION", "DESIRED", "CURRENT", "TRIGGERED BY"}
templateColumns = []string{"NAME", "DESCRIPTION", "PARAMETERS", "OBJECTS"}
policyColumns = []string{"NAME", "ROLES", "LAST MODIFIED"}
Expand Down Expand Up @@ -591,7 +591,7 @@ func printRoute(route *routeapi.Route, w io.Writer, opts kctl.PrintOptions) erro
port = "<all>"
}

if _, err := fmt.Fprintf(w, "%s\t%s\t%s\t%s\t%s\t%s", name, host, route.Spec.Path, strings.Join(backendInfo, ","), port, policy); err != nil {
if _, err := fmt.Fprintf(w, "%s\t%s\t%s\t%s\t%s\t%s\t%s", name, host, route.Spec.Path, strings.Join(backendInfo, ","), port, policy, route.Spec.WildcardPolicy); err != nil {
return err
}

Expand Down

0 comments on commit 89ed457

Please sign in to comment.