// This method returns a list of available maintenance windows
435011
func (r Provisioning_Maintenance_Window) GetMaintenanceWindows(beginDate *datatypes.Time, endDate *datatypes.Time, locationId *int, slotsNeeded *int) (resp []datatypes.Provisioning_Maintenance_Window, err error) {
	params := []interface{}{
		beginDate,
		endDate,
		locationId,
		slotsNeeded,
	}
	err = r.Session.DoRequest("SoftLayer_Provisioning_Maintenance_Window", "getMaintenanceWindows", params, &r.Options, &resp)
	return
}
236874
func (self *KubeletClient) GetAllRawContainers(host Host, start, end time.Time) ([]cadvisor.ContainerInfo, error) {
	url := self.getUrl(host, "/stats/container/")

	return self.getAllContainers(url, start, end)
}
626261
func (client *Client) PaginateRunstatusMaintenances(ctx context.Context, page RunstatusPage, callback func(*RunstatusMaintenance, error) bool) { // nolint: dupl
	if page.MaintenancesURL == "" {
		callback(nil, fmt.Errorf("empty Maintenances URL for %#v", page))
		return
	}

	maintenancesURL := page.MaintenancesURL
	for maintenancesURL != "" {
		resp, err := client.runstatusRequest(ctx, maintenancesURL, nil, "GET")
		if err != nil {
			callback(nil, err)
			return
		}

		var ms *RunstatusMaintenanceList
		if err := json.Unmarshal(resp, &ms); err != nil {
			callback(nil, err)
			return
		}

		for i := range ms.Maintenances {
			if err := ms.Maintenances[i].FakeID(); err != nil {
				log.Printf("bad fake ID for %#v, %s", ms.Maintenances[i], err)
			}
			if cont := callback(&ms.Maintenances[i], nil); !cont {
				return
			}
		}

		maintenancesURL = ms.Next
	}
}
498181
func inActiveList(sj batchv1beta1.CronJob, uid types.UID) bool {
	for _, j := range sj.Status.Active {
		if j.UID == uid {
			return true
		}
	}
	return false
}
1050080
func (client *Client) GetServicePlanVisibilities(filters ...Filter) ([]ServicePlanVisibility, Warnings, error) {
	request, err := client.newHTTPRequest(requestOptions{
		RequestName: internal.GetServicePlanVisibilitiesRequest,
		Query:       ConvertFilterParameters(filters),
	})

	if err != nil {
		return nil, nil, err
	}

	var fullVisibilityList []ServicePlanVisibility
	warnings, err := client.paginate(request, ServicePlanVisibility{}, func(item interface{}) error {
		if vis, ok := item.(ServicePlanVisibility); ok {
			fullVisibilityList = append(fullVisibilityList, vis)
		} else {
			return ccerror.UnknownObjectInListError{
				Expected:   ServicePlanVisibility{},
				Unexpected: item,
			}
		}
		return nil
	})

	return fullVisibilityList, warnings, err
}
1073486
func (_class VMApplianceClass) GetAllRecords(sessionID SessionRef) (_retval map[VMApplianceRef]VMApplianceRecord, _err error) {
	_method := "VM_appliance.get_all_records"
	_sessionIDArg, _err := convertSessionRefToXen(fmt.Sprintf("%s(%s)", _method, "session_id"), sessionID)
	if _err != nil {
		return
	}
	_result, _err := _class.client.APICall(_method, _sessionIDArg)
	if _err != nil {
		return
	}
	_retval, _err = convertVMApplianceRefToVMApplianceRecordMapToGo(_method + " -> ", _result.Value)
	return
}
397768
func (list WorkItemLinkList) GetDistinctListOfTargetIDs(linkTypeID uuid.UUID) id.Slice {
	m := id.Map{}
	for _, l := range list {
		if l.LinkTypeID == linkTypeID {
			m[l.TargetID] = struct{}{}
		}
	}
	return m.ToSlice()
}
170386
func (_class VMApplianceClass) GetAll(sessionID SessionRef) (_retval []VMApplianceRef, _err error) {
	_method := "VM_appliance.get_all"
	_sessionIDArg, _err := convertSessionRefToXen(fmt.Sprintf("%s(%s)", _method, "session_id"), sessionID)
	if _err != nil {
		return
	}
	_result, _err := _class.client.APICall(_method, _sessionIDArg)
	if _err != nil {
		return
	}
	_retval, _err = convertVMApplianceRefSetToGo(_method + " -> ", _result.Value)
	return
}
746747
func (s *AutoScaleService) ListAutoScalePolicies(p *ListAutoScalePoliciesParams) (*ListAutoScalePoliciesResponse, error) {
	resp, err := s.cs.newRequest("listAutoScalePolicies", p.toURLValues())
	if err != nil {
		return nil, err
	}

	var r ListAutoScalePoliciesResponse
	if err := json.Unmarshal(resp, &r); err != nil {
		return nil, err
	}

	return &r, nil
}
1037952
func (f Facade) ListResources(args params.ListResourcesArgs) (params.ResourcesResults, error) {
	var r params.ResourcesResults
	r.Results = make([]params.ResourcesResult, len(args.Entities))

	for i, e := range args.Entities {
		logger.Tracef("Listing resources for %q", e.Tag)
		tag, apierr := parseApplicationTag(e.Tag)
		if apierr != nil {
			r.Results[i] = params.ResourcesResult{
				ErrorResult: params.ErrorResult{
					Error: apierr,
				},
			}
			continue
		}

		svcRes, err := f.store.ListResources(tag.Id())
		if err != nil {
			r.Results[i] = errorResult(err)
			continue
		}

		r.Results[i] = api.ApplicationResources2APIResult(svcRes)
	}
	return r, nil
}
1310512
func (az *Cloud) ListVirtualMachines(resourceGroup string) ([]compute.VirtualMachine, error) {
	if az.Config.shouldOmitCloudProviderBackoff() {
		ctx, cancel := getContextWithCancel()
		defer cancel()

		allNodes, err := az.VirtualMachinesClient.List(ctx, resourceGroup)
		if err != nil {
			klog.Errorf("VirtualMachinesClient.List(%v) failure with err=%v", resourceGroup, err)
			return nil, err
		}
		klog.V(2).Infof("VirtualMachinesClient.List(%v) success", resourceGroup)
		return allNodes, nil
	}

	return az.ListVirtualMachinesWithRetry(resourceGroup)
}
835880
func (c *ServicedCli) cmdPoolListIPs(ctx *cli.Context) {
	args := ctx.Args()
	if len(args) < 1 {
		fmt.Printf("Incorrect Usage.\n\n")
		cli.ShowCommandHelp(ctx, "list-ips")
		return
	}

	if poolIps, err := c.driver.GetPoolIPs(args[0]); err != nil {
		fmt.Fprintln(os.Stderr, err)
		return
	} else if poolIps.HostIPs == nil || (len(poolIps.HostIPs) == 0 && len(poolIps.VirtualIPs) == 0) {
		fmt.Fprintln(os.Stderr, "no resource pool IPs found")
		return
	} else if ctx.Bool("verbose") {
		if jsonPoolIP, err := json.MarshalIndent(poolIps.HostIPs, " ", "  "); err != nil {
			fmt.Fprintf(os.Stderr, "failed to marshal resource pool IPs: %s", err)
		} else {
			fmt.Println(string(jsonPoolIP))
		}
	} else {
		t := NewTable(ctx.String("show-fields"))
		for _, ip := range poolIps.HostIPs {
			t.AddRow(map[string]interface{}{
				"InterfaceName": ip.InterfaceName,
				"IPAddress":     ip.IPAddress,
				"Type":          "static",
			})
		}
		for _, ip := range poolIps.VirtualIPs {
			t.AddRow(map[string]interface{}{
				"InterfaceName": ip.BindInterface,
				"IPAddress":     ip.IP,
				"Type":          "virtual",
			})
		}
		t.Padding = 6
		t.Print()
	}
}
822129
func (hri *HealResultItem) GetMissingCounts() (b, a int) {
	if hri == nil {
		return
	}
	for _, v := range hri.Before.Drives {
		if v.State == DriveStateMissing {
			b++
		}
	}
	for _, v := range hri.After.Drives {
		if v.State == DriveStateMissing {
			a++
		}
	}
	return
}
1340156
func (t *Template) GetAllAWSSSMMaintenanceWindowResources() map[string]*resources.AWSSSMMaintenanceWindow {
	results := map[string]*resources.AWSSSMMaintenanceWindow{}
	for name, untyped := range t.Resources {
		switch resource := untyped.(type) {
		case *resources.AWSSSMMaintenanceWindow:
			results[name] = resource
		}
	}
	return results
}
747384
func (pgb *ChainDB) windowStats(charts *cache.ChartData) (*sql.Rows, func(), error) {
	ctx, cancel := context.WithTimeout(pgb.ctx, pgb.queryTimeout)

	rows, err := retrieveWindowStats(ctx, pgb.db, charts)
	if err != nil {
		return nil, cancel, fmt.Errorf("windowStats: %v", pgb.replaceCancelError(err))
	}

	return rows, cancel, nil
}
809165
func (hri *HealResultItem) GetOnlineCounts() (b, a int) {
	if hri == nil {
		return
	}
	for _, v := range hri.Before.Drives {
		if v.State == DriveStateOk {
			b++
		}
	}
	for _, v := range hri.After.Drives {
		if v.State == DriveStateOk {
			a++
		}
	}
	return
}
949952
func (c *ServicedCli) cmdServiceVariableList(ctx *cli.Context) {
	args := ctx.Args()
	if len(args) < 1 {
		fmt.Printf("Incorrect Usage.\n\n")
		cli.ShowCommandHelp(ctx, "list")
		return
	}

	svcDetails, _, err := c.searchForService(args[0], ctx.Bool("no-prefix-match"))
	if err != nil {
		fmt.Fprintln(os.Stderr, err)
		return
	}

	service, err := c.driver.GetService(svcDetails.ID)
	if err != nil {
		fmt.Fprintln(os.Stderr, err)
		return
	}

	variables := service.Context
	keys := make([]string, 0)
	for k, _ := range variables {
		keys = append(keys, k)
	}
	sort.Strings(keys)

	for _, key := range keys {
		fmt.Printf("%s %v\n", key, variables[key])
	}
}