• Home
  • Features
  • Pricing
  • Docs
  • Announcements
  • Sign In

k8snetworkplumbingwg / sriov-network-operator / 10058808149

23 Jul 2024 12:22PM UTC coverage: 43.964% (+0.6%) from 43.351%
10058808149

Pull #659

github

web-flow
Merge f199eb95f into 588abb449
Pull Request #659: Configure IB VFs' GUIDs using a statically provided GUID pool

212 of 280 new or added lines in 13 files covered. (75.71%)

2 existing lines in 1 file now uncovered.

6526 of 14844 relevant lines covered (43.96%)

0.48 hits per line

Source File
Press 'n' to go to next uncovered line, 'b' for previous

0.0
/pkg/platforms/platforms.go
1
package platforms
2

3
import (
4
        "sigs.k8s.io/controller-runtime/pkg/log"
5

6
        "github.com/k8snetworkplumbingwg/sriov-network-operator/pkg/host"
7
        "github.com/k8snetworkplumbingwg/sriov-network-operator/pkg/platforms/openshift"
8
        "github.com/k8snetworkplumbingwg/sriov-network-operator/pkg/platforms/openstack"
9
        "github.com/k8snetworkplumbingwg/sriov-network-operator/pkg/utils"
10
)
11

12
//go:generate ../../bin/mockgen -destination mock/mock_platforms.go -source platforms.go
13
type Interface interface {
14
        openshift.OpenshiftContextInterface
15
        openstack.OpenstackInterface
16
}
17

18
type platformHelper struct {
19
        openshift.OpenshiftContextInterface
20
        openstack.OpenstackInterface
21
}
22

23
func NewDefaultPlatformHelper() (Interface, error) {
×
24
        openshiftContext, err := openshift.New()
×
25
        if err != nil {
×
26
                return nil, err
×
27
        }
×
28
        utilsHelper := utils.New()
×
NEW
29
        hostManager, err := host.NewHostManager(utilsHelper)
×
NEW
30
        if err != nil {
×
NEW
31
                log.Log.Error(err, "failed to create host manager")
×
NEW
32
                return nil, err
×
NEW
33
        }
×
34
        openstackContext := openstack.New(hostManager)
×
35

×
36
        return &platformHelper{
×
37
                openshiftContext,
×
38
                openstackContext,
×
39
        }, nil
×
40
}
STATUS · Troubleshooting · Open an Issue · Sales · Support · CAREERS · ENTERPRISE · START FREE · SCHEDULE DEMO
ANNOUNCEMENTS · TWITTER · TOS & SLA · Supported CI Services · What's a CI service? · Automated Testing

© 2025 Coveralls, Inc