Skip to content

Commit c87a8bc

Browse files
committed
fix
1 parent c9cb9cb commit c87a8bc

File tree

2 files changed

+6
-6
lines changed

2 files changed

+6
-6
lines changed

pkg/commonvpc/vpc.go

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -91,7 +91,7 @@ func (ni *NetworkInterface) VsiName() string {
9191
}
9292

9393
func (ni *NetworkInterface) NameForAnalyzerOut(c *vpcmodel.VPCConfig) string {
94-
return MultipleVPCsConfigPrefix(c, ni.VPCResource) + nameWithBracketsInfo(ni.Vsi, ni.Address())
94+
return MultipleVPCsConfigPrefix(c, &ni.VPCResource) + nameWithBracketsInfo(ni.Vsi, ni.Address())
9595
}
9696

9797
func nameWithBracketsInfo(name, inBrackets string) string {
@@ -735,7 +735,7 @@ func getTableConnEffect(connQuery, conn *connection.Set) (*connection.Set, vpcmo
735735
}
736736

737737
// MultipleVPCsConfigPrefix returns the vpcName of the passed resource when config is multi-vpc
738-
func MultipleVPCsConfigPrefix(c *vpcmodel.VPCConfig, resource vpcmodel.VPCResource) string {
738+
func MultipleVPCsConfigPrefix(c *vpcmodel.VPCConfig, resource *vpcmodel.VPCResource) string {
739739
if c != nil && resource.VPC() != nil {
740740
return c.MultipleVPCsConfigPrefix(resource.VPC().Name())
741741
}

pkg/ibmvpc/vpc.go

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -38,7 +38,7 @@ type ReservedIP struct {
3838
}
3939

4040
func (r *ReservedIP) NameForAnalyzerOut(c *vpcmodel.VPCConfig) string {
41-
return commonvpc.MultipleVPCsConfigPrefix(c, r.VPCResource) + nameWithBracketsInfo(r.vpe, r.Address())
41+
return commonvpc.MultipleVPCsConfigPrefix(c, &r.VPCResource) + nameWithBracketsInfo(r.vpe, r.Address())
4242
}
4343

4444
// used for synthesis output
@@ -71,7 +71,7 @@ func (pip *PrivateIP) NameForAnalyzerOut(c *vpcmodel.VPCConfig) string {
7171
address = strings.Join(pip.block.ListToPrint(), ",")
7272
}
7373
name := nameWithBracketsInfo(pip.loadBalancer.Name(), kind)
74-
return commonvpc.MultipleVPCsConfigPrefix(c, pip.VPCResource) + nameWithBracketsInfo(name, address)
74+
return commonvpc.MultipleVPCsConfigPrefix(c, &pip.VPCResource) + nameWithBracketsInfo(name, address)
7575
}
7676

7777
// AbstractedToNodeSet returns the pip load balancer if it was abstracted
@@ -96,7 +96,7 @@ func (n *IKSNode) VsiName() string {
9696
}
9797

9898
func (n *IKSNode) NameForAnalyzerOut(c *vpcmodel.VPCConfig) string {
99-
return commonvpc.MultipleVPCsConfigPrefix(c, n.VPCResource) + nameWithBracketsInfo(n.Name(), n.Address())
99+
return commonvpc.MultipleVPCsConfigPrefix(c, &n.VPCResource) + nameWithBracketsInfo(n.Name(), n.Address())
100100
}
101101

102102
// vpe can be in multiple zones - depending on the zones of its network interfaces..
@@ -150,7 +150,7 @@ func (lb *LoadBalancer) nameWithKind() string {
150150
return nameWithBracketsInfo(lb.ResourceName, lb.Kind())
151151
}
152152
func (lb *LoadBalancer) NameForAnalyzerOut(c *vpcmodel.VPCConfig) string {
153-
return commonvpc.MultipleVPCsConfigPrefix(c, lb.VPCResource) + lb.nameWithKind()
153+
return commonvpc.MultipleVPCsConfigPrefix(c, &lb.VPCResource) + lb.nameWithKind()
154154
}
155155

156156
func (lb *LoadBalancer) Nodes() []vpcmodel.Node {

0 commit comments

Comments
 (0)