// clusterInfoFromArgs fills the given cluster info from a command line argument func clusterInfoFromArgs(info *providers.ClusterInfo, args []string) { if len(args) == 1 && info.Name == "" { parts := strings.SplitN(args[0], ".", 2) info.Name = parts[0] info.Domain = parts[1] } }
// Apply defaults for the given options func (vp *vagrantProvider) ClusterDefaults(options providers.ClusterInfo) providers.ClusterInfo { if options.ID == "" { options.ID = os.Getenv("QUARK_VAGRANT_CLUSTER_ID") } if options.Name == "" { options.Name = "vagrant" } return options }