github.com/openshift/installer@v1.4.17/pkg/asset/cluster/powervs/powervs.go (about) 1 // Package powervs extracts Power VS metadata from install configurations. 2 package powervs 3 4 import ( 5 "context" 6 7 icpowervs "github.com/openshift/installer/pkg/asset/installconfig/powervs" 8 "github.com/openshift/installer/pkg/types" 9 "github.com/openshift/installer/pkg/types/powervs" 10 ) 11 12 // Metadata converts an install configuration to PowerVS metadata. 13 func Metadata(config *types.InstallConfig, meta *icpowervs.Metadata) *powervs.Metadata { 14 cisCRN, _ := meta.CISInstanceCRN(context.TODO()) 15 dnsCRN, _ := meta.DNSInstanceCRN(context.TODO()) 16 17 return &powervs.Metadata{ 18 BaseDomain: config.BaseDomain, 19 PowerVSResourceGroup: config.Platform.PowerVS.PowerVSResourceGroup, 20 CISInstanceCRN: cisCRN, 21 DNSInstanceCRN: dnsCRN, 22 Region: config.Platform.PowerVS.Region, 23 VPCRegion: config.Platform.PowerVS.VPCRegion, 24 Zone: config.Platform.PowerVS.Zone, 25 ServiceInstanceGUID: config.Platform.PowerVS.ServiceInstanceGUID, 26 ServiceEndpoints: config.Platform.PowerVS.ServiceEndpoints, 27 } 28 }