Skip to content

Commit

Permalink
Bump github.com/np-guard/models from 0.4.0 to 0.5.0 (#337)
Browse files Browse the repository at this point in the history
  • Loading branch information
dependabot[bot] authored Oct 7, 2024
1 parent f6e4e9f commit 71f971f
Show file tree
Hide file tree
Showing 3 changed files with 9 additions and 7 deletions.
6 changes: 4 additions & 2 deletions go.mod
Original file line number Diff line number Diff line change
@@ -1,6 +1,8 @@
module github.com/np-guard/cloud-resource-collector

go 1.22.4
go 1.23

toolchain go1.23.2

require (
github.com/IBM-Cloud/container-services-go-sdk v0.0.0-20240510130133-9f76aa34af27
Expand All @@ -10,7 +12,7 @@ require (
github.com/IBM/vpc-go-sdk v0.58.0
github.com/aws/aws-sdk-go-v2/config v1.27.33
github.com/aws/aws-sdk-go-v2/service/ec2 v1.163.0
github.com/np-guard/models v0.4.0
github.com/np-guard/models v0.5.0
github.com/spf13/cobra v1.8.1
)

Expand Down
4 changes: 2 additions & 2 deletions go.sum
Original file line number Diff line number Diff line change
Expand Up @@ -164,8 +164,8 @@ github.com/mitchellh/mapstructure v1.5.0/go.mod h1:bFUtVrKA4DC2yAKiSyO/QUcy7e+RR
github.com/montanaflynn/stats v0.0.0-20171201202039-1bf9dbcd8cbe/go.mod h1:wL8QJuTMNUDYhXwkmfOly8iTdp5TEcJFWZD2D7SIkUc=
github.com/niemeyer/pretty v0.0.0-20200227124842-a10e7caefd8e h1:fD57ERR4JtEqsWbfPhv4DMiApHyliiK5xCTNVSPiaAs=
github.com/niemeyer/pretty v0.0.0-20200227124842-a10e7caefd8e/go.mod h1:zD1mROLANZcx1PVRCS0qkT7pwLkGfwJo4zjcN/Tysno=
github.com/np-guard/models v0.4.0 h1:lU9XymcjwOJ5RQdVpziurqBmcLtlKVIQxVUwm+qMczk=
github.com/np-guard/models v0.4.0/go.mod h1:mqE2Irf8r+7HWh8fII0fWbWyQRMHGEo2SgSLN/6VKs8=
github.com/np-guard/models v0.5.0 h1:P37gCg3RD23hZHymFWtthrF+mGIwyHJkWy0wIWIzokQ=
github.com/np-guard/models v0.5.0/go.mod h1:29M8utxinyUpYaDuIuOyCcMBf7EsMWZcIrRWCjFm0Bw=
github.com/nxadm/tail v1.4.4/go.mod h1:kenIhsEOeOJmVchQTgglprH7qJGnHDVpk1VPCcaMI8A=
github.com/nxadm/tail v1.4.8 h1:nPr65rt6Y5JFSKQO7qToXr7pePgD6Gwiw05lkbyAQTE=
github.com/nxadm/tail v1.4.8/go.mod h1:+ncqLTQzXmGhMZNUePPaPqPvBxHAIsmXswZKocGu+AU=
Expand Down
6 changes: 3 additions & 3 deletions pkg/ibm/fabricate.go
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ import (

"github.com/np-guard/cloud-resource-collector/pkg/common"
"github.com/np-guard/cloud-resource-collector/pkg/ibm/datamodel"
"github.com/np-guard/models/pkg/ipblock"
"github.com/np-guard/models/pkg/netset"
)

const (
Expand All @@ -30,7 +30,7 @@ var (
"us-east": {"us-east1", "us-east2", "us-east3"},
}
uid = map[string]int{}
availableIPs, _ = ipblock.FromCidrList([]string{"10.0.0.0/8", "172.16.0.0/12", "192.168.0.0/16"})
availableIPs, _ = netset.IPBlockFromCidrList([]string{"10.0.0.0/8", "172.16.0.0/12", "192.168.0.0/16"})

vpcType = vpcv1.VPCReferenceResourceTypeVPCConst
ipv4 = vpcv1.NetworkACLRuleItemNetworkACLRuleProtocolAllIPVersionIpv4Const
Expand Down Expand Up @@ -71,7 +71,7 @@ func getAvailableInternalCidrBlock() *string {
prefix := defaultCidrPrefix - weakRand(2)
baseIP := availableIPs.FirstIPAddress()
cidr := fmt.Sprintf("%s/%d", baseIP, prefix)
cidrIPBlock, _ := ipblock.FromCidr(cidr)
cidrIPBlock, _ := netset.IPBlockFromCidr(cidr)
availableIPs = availableIPs.Subtract(cidrIPBlock)
return &cidr
}
Expand Down

0 comments on commit 71f971f

Please sign in to comment.