Skip to content

Commit

Permalink
oc get clusternetworks correctly prints the clusternetwork cidrs
Browse files Browse the repository at this point in the history
  • Loading branch information
JacobTanenbaum committed Jun 9, 2017
1 parent 44aa467 commit 5dfee72
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion pkg/cmd/cli/describe/printer.go
Original file line number Diff line number Diff line change
Expand Up @@ -996,8 +996,12 @@ func printNetNamespaceList(list *sdnapi.NetNamespaceList, w io.Writer, opts kpri
}

func printClusterNetwork(n *sdnapi.ClusterNetwork, w io.Writer, opts kprinters.PrintOptions) error {
var cidrList []string
for _, cidr := range n.ClusterDef {
cidrList = append(cidrList, cidr.ClusterNetworkCIDR)
}
name := formatResourceName(opts.Kind, n.Name, opts.WithKind)
_, err := fmt.Fprintf(w, "%s\t%s\t%d\t%s\t%s\n", name, n.Network, n.HostSubnetLength, n.ServiceNetwork, n.PluginName)
_, err := fmt.Fprintf(w, "%s\t%s\t%d\t%s\t%s\n", name, strings.Join(cidrList, ","), n.HostSubnetLength, n.ServiceNetwork, n.PluginName)
return err
}

Expand Down

0 comments on commit 5dfee72

Please sign in to comment.