Skip to content

Commit

Permalink
[api] impl ObjectList for VPC
Browse files Browse the repository at this point in the history
  • Loading branch information
Frostman committed Mar 18, 2024
1 parent f35a833 commit 303d322
Showing 1 changed file with 13 additions and 1 deletion.
14 changes: 13 additions & 1 deletion api/vpc/v1alpha2/vpc_types.go
Original file line number Diff line number Diff line change
Expand Up @@ -124,7 +124,19 @@ func init() {
SchemeBuilder.Register(&VPC{}, &VPCList{})
}

var _ meta.Object = (*VPC)(nil)
var (
_ meta.Object = (*VPC)(nil)
_ meta.ObjectList = (*VPCList)(nil)
)

func (vpcList *VPCList) GetItems() []meta.Object {
items := make([]meta.Object, len(vpcList.Items))
for i := range vpcList.Items {
items[i] = &vpcList.Items[i]
}

return items
}

func (vpc *VPCSpec) IsSubnetIsolated(subnetName string) bool {
if subnet, ok := vpc.Subnets[subnetName]; ok && subnet.Isolated != nil {
Expand Down

0 comments on commit 303d322

Please sign in to comment.