Skip to content

Commit

Permalink
Add HostSubnet.EgressCIDRs support to "oc get" and "oc describe"
Browse files Browse the repository at this point in the history
  • Loading branch information
danwinship committed Jul 31, 2018
1 parent 31f6201 commit cd93d29
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 2 deletions.
1 change: 1 addition & 0 deletions pkg/oc/lib/describe/describer.go
Original file line number Diff line number Diff line change
Expand Up @@ -1752,6 +1752,7 @@ func (d *HostSubnetDescriber) Describe(namespace, name string, settings kprinter
formatString(out, "Node", hs.Host)
formatString(out, "Node IP", hs.HostIP)
formatString(out, "Pod Subnet", hs.Subnet)
formatString(out, "Egress CIDRs", strings.Join(hs.EgressCIDRs, ", "))
formatString(out, "Egress IPs", strings.Join(hs.EgressIPs, ", "))
return nil
})
Expand Down
4 changes: 2 additions & 2 deletions pkg/printers/internalversion/printer.go
Original file line number Diff line number Diff line change
Expand Up @@ -63,7 +63,7 @@ var (
// IsPersonalSubjectAccessReviewColumns contains known custom role extensions
IsPersonalSubjectAccessReviewColumns = []string{"NAME"}

hostSubnetColumns = []string{"NAME", "HOST", "HOST IP", "SUBNET", "EGRESS IPS"}
hostSubnetColumns = []string{"NAME", "HOST", "HOST IP", "SUBNET", "EGRESS CIDRS", "EGRESS IPS"}
netNamespaceColumns = []string{"NAME", "NETID", "EGRESS IPS"}
clusterNetworkColumns = []string{"NAME", "CLUSTER NETWORKS", "SERVICE NETWORK", "PLUGIN NAME"}
egressNetworkPolicyColumns = []string{"NAME"}
Expand Down Expand Up @@ -987,7 +987,7 @@ func printGroupList(list *userapi.GroupList, w io.Writer, opts kprinters.PrintOp

func printHostSubnet(h *networkapi.HostSubnet, w io.Writer, opts kprinters.PrintOptions) error {
name := formatResourceName(opts.Kind, h.Name, opts.WithKind)
_, err := fmt.Fprintf(w, "%s\t%s\t%s\t%s\t[%s]\n", name, h.Host, h.HostIP, h.Subnet, strings.Join(h.EgressIPs, ", "))
_, err := fmt.Fprintf(w, "%s\t%s\t%s\t%s\t[%s]\t[%s]\n", name, h.Host, h.HostIP, h.Subnet, strings.Join(h.EgressCIDRs, ", "), strings.Join(h.EgressIPs, ", "))
return err
}

Expand Down

0 comments on commit cd93d29

Please sign in to comment.