Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 6 additions & 2 deletions internal/cmd/beta/network/describe/describe.go
Original file line number Diff line number Diff line change
Expand Up @@ -146,8 +146,12 @@ func outputResult(p *print.Printer, outputFormat string, network *iaas.Network)
table.AddSeparator()
table.AddRow("STATE", *network.State)
table.AddSeparator()
table.AddRow("PUBLIC IP", *network.PublicIp)
table.AddSeparator()

if network.PublicIp != nil {
table.AddRow("PUBLIC IP", *network.PublicIp)
table.AddSeparator()
}

if len(ipv4nameservers) > 0 {
table.AddRow("IPv4 NAME SERVERS", strings.Join(ipv4nameservers, ", "))
}
Expand Down
7 changes: 6 additions & 1 deletion internal/cmd/beta/network/list/list.go
Original file line number Diff line number Diff line change
Expand Up @@ -154,7 +154,12 @@ func outputResult(p *print.Printer, outputFormat string, networks []iaas.Network
table.SetHeader("ID", "Name", "Status", "Public IP")

for _, network := range networks {
table.AddRow(*network.NetworkId, *network.Name, *network.State, *network.PublicIp)
publicIp := ""
if network.PublicIp != nil {
publicIp = *network.PublicIp
}

table.AddRow(*network.NetworkId, *network.Name, *network.State, publicIp)
table.AddSeparator()
}

Expand Down