MCPcopy Create free account
hub / github.com/Scalingo/cli / DatabaseNetworkConfigurationShow

Function DatabaseNetworkConfigurationShow

dbng/networking.go:118–138  ·  view source on GitHub ↗
(ctx context.Context, databaseID string)

Source from the content-addressed store, hash-verified

116}
117
118func DatabaseNetworkConfigurationShow(ctx context.Context, databaseID string) error {
119 c, err := config.ScalingoClient(ctx)
120 if err != nil {
121 return errors.Wrap(ctx, err, "get Scalingo client")
122 }
123
124 networkConfiguration, err := c.Preview().DatabaseNetworkConfigurationShow(ctx, databaseID)
125 if err != nil {
126 return errors.Wrap(ctx, err, "show database network configuration")
127 }
128
129 t := tablewriter.NewWriter(os.Stdout)
130 _ = t.Bulk([][]string{
131 {"Outscale account ID", networkConfiguration.OutscaleAccountID},
132 {"Outscale net ID", networkConfiguration.OutscaleNetID},
133 {"IP range", networkConfiguration.IPRange},
134 })
135 _ = t.Render()
136
137 return nil
138}

Callers 1

Calls 2

ScalingoClientFunction · 0.92
RenderMethod · 0.65

Tested by

no test coverage detected