<commit_before>package dynamic

import (
	"github.com/Sirupsen/logrus"
	"github.com/docker/machine/libmachine/drivers/plugin/localbinary"
	"github.com/rancher/go-rancher/client"
)

var (
	ignoredDrivers = map[string]bool{
		"none":         true,
		"virtualbox":   true,
		"vmwarefusion": true,
	}
)

func SyncBuiltin() error {
	apiClient, err := getClient()
	if err != nil {
		return err
	}

	opts := client.NewListOpts()
	opts.Filters["state_ne"] = "removed"

	b, err := apiClient.MachineDriver.List(opts)
	if err != nil {
		return err
	}

	installed := map[string]client.MachineDriver{}

	for _, driver := range b.Data {
		if driver.Builtin {
			installed[driver.Name] = driver
		}
		if driver.State == "inactive" && driver.DefaultActive {
			logrus.Infof("Activating driver %s", driver.Name)
			apiClient.MachineDriver.ActionActivate(&driver)
		}
	}

	for _, driver := range localbinary.CoreDrivers {
		if _, ok := installed[driver]; !ok && !ignoredDrivers[driver] {<commit_msg>Make hyperv builtin<commit_after>package dynamic

import (
	"github.com/Sirupsen/logrus"
	"github.com/docker/machine/libmachine/drivers/plugin/localbinary"
	"github.com/rancher/go-rancher/client"
)

var (
	ignoredDrivers = map[string]bool{
		"none":         true,
		"virtualbox":   true,
		"vmwarefusion": true,
		"hyperv":       true,
	}
)

func SyncBuiltin() error {
	apiClient, err := getClient()
	if err != nil {
		return err
	}

	opts := client.NewListOpts()
	opts.Filters["state_ne"] = "removed"

	b, err := apiClient.MachineDriver.List(opts)
	if err != nil {
		return err
	}

	installed := map[string]client.MachineDriver{}

	for _, driver := range b.Data {
		if driver.Builtin {
			installed[driver.Name] = driver
		}
		if driver.State == "inactive" && driver.DefaultActive {
			logrus.Infof("Activating driver %s", driver.Name)
			apiClient.MachineDriver.ActionActivate(&driver)
		}
	}

	for _, driver := range localbinary.CoreDrivers {
		if _, ok := installed[driver]; !ok && !ignoredDrivers[driver] {
{'fraction_non_alphanumeric': 0.14457831325301204, 'fraction_numerical': 0.0, 'mean_word_length': 3.945409429280397, 'pattern_counts': {'":': 7, '<': 3, '<?xml version=': 0, '>': 3, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '6392807', 'n_tokens_mistral': 759, 'n_tokens_neox': 705, 'n_words': 136}