// Retrieve Blade Bay
974922
func (r Hardware_Router) GetParentBay() (resp datatypes.Hardware_Blade, err error) {
	err = r.Session.DoRequest("SoftLayer_Hardware_Router", "getParentBay", nil, &r.Options, &resp)
	return
}
597112
func (s *pcfaasController) Get() interface{} {
	var handler PcfaasGetInventoryHandler = func(log *log.Logger, r render.Render, tokens oauth2.Tokens) {
		statusCode := SuccessStatus
		items, err := s.inventoryClient.GetInventoryItems()
		if err != nil {
			log.Fatalln(err)
			statusCode = ServerErrorStatus
		}
		log.Println("Queried inventory service: ", len(items))
		r.JSON(statusCode, items)
	}
	return handler
}
1064763
func GetPage(w http.ResponseWriter, r *http.Request) {
	w.Header().Set("Cache-Control", "must-revalidate")
	w.Header().Set("Content-Type", "application/json")
	w.Header().Set("Access-Control-Allow-Origin", "*")
	w.Header().Set("Access-Control-Allow-Methods", "POST, GET, PUT, OPTIONS")
	var col, page, total string
	if !Require(w, r, "col", &col) {
		return
	}
	if !Require(w, r, "page", &page) {
		return
	}
	if !Require(w, r, "total", &total) {
		return
	}
	totalPage, err := strconv.Atoi(total)
	if err != nil || totalPage < 1 {
		http.Error(w, fmt.Sprintf("Invalid total page number '%v'.", totalPage), 400)
		return
	}
	pageNum, err := strconv.Atoi(page)
	if err != nil || pageNum < 0 || pageNum >= totalPage {
		http.Error(w, fmt.Sprintf("Invalid page number '%v'.", page), 400)
		return
	}
	dbcol := HttpDB.Use(col)
	if dbcol == nil {
		http.Error(w, fmt.Sprintf("Collection '%s' does not exist.", col), 400)
		return
	}
	docs := make(map[string]interface{})
	dbcol.ForEachDocInPage(pageNum, totalPage, func(id int, doc []byte) bool {
		var docObj map[string]interface{}
		if err := json.Unmarshal(doc, &docObj); err == nil {
			docs[strconv.Itoa(id)] = docObj
		}
		return true
	})
	resp, err := json.Marshal(docs)
	if err != nil {
		http.Error(w, fmt.Sprint(err), 500)
		return
	}
	w.Write(resp)
}
893393
func (d *DaemonDB) LagecyGetPod(id string) ([]byte, error) {
	return d.Get(keyPod(id))
}
938949
func (bc *BuildController) getBuildByKey(key string) (*buildv1.Build, error) {
	obj, exists, err := bc.buildInformer.GetIndexer().GetByKey(key)
	if err != nil {
		klog.V(2).Infof("Unable to retrieve build %q from store: %v", key, err)
		return nil, err
	}
	if !exists {
		klog.V(2).Infof("Build %q has been deleted", key)
		return nil, nil
	}

	return obj.(*buildv1.Build), nil
}
1105052
func (store *fsBlockStore) RetrieveBlocks(startNum uint64) (ledger.ResultsIterator, error) {
	var itr *blocksItr
	var err error
	if itr, err = store.fileMgr.retrieveBlocks(startNum); err != nil {
		return nil, err
	}
	return itr, nil
}
1295456
func (db *DB) RetrieveBestBlockHash() (string, error) {
	var blockHash string
	err := db.QueryRow(db.getBestBlockHashSQL).Scan(&blockHash)
	return blockHash, err
}
707321
func Get() (la LoadAvg, err error) {
	stdMu.Lock()
	defer stdMu.Unlock()
	if std == nil {
		std, err = NewProfiler()
		if err != nil {
			return la, err
		}
	}
	return std.Get()
}
632648
func (r Hardware_Router) GetVirtualChassis() (resp datatypes.Hardware_Group, err error) {
	err = r.Session.DoRequest("SoftLayer_Hardware_Router", "getVirtualChassis", nil, &r.Options, &resp)
	return
}
391061
func (d *DaemonDB) LagecyGetP2V(id string) (string, error) {
	return d.GetString(keyP2V(id))
}
966338
func (s *CacheService) Get(base string) *RatesStore {
	// Is our cache expired?
	if s.IsExpired(base) {
		return nil
	}

	// Use stored results.
	return cache[base]
}
1362997
func RetrievePGVersion(db *sql.DB) (ver string, err error) {
	err = db.QueryRow(internal.RetrievePGVersion).Scan(&ver)
	return
}
822752
func (self *CustomerClient) Retrieve(id string) (*Customer, error) {
	customer := Customer{}
	path := "/v1/customers/" + url.QueryEscape(id)
	err := query("GET", path, nil, &customer)
	return &customer, err
}
455282
func (r *RedisDriver) GetByCpeURI(uri string) ([]models.CveDetail, error) {
	specified, err := naming.UnbindURI(uri)
	if err != nil {
		return nil, err
	}
	vendor := fmt.Sprintf("%s", specified.Get(common.AttributeVendor))
	product := fmt.Sprintf("%s", specified.Get(common.AttributeProduct))
	key := fmt.Sprintf("%s%s::%s", hashKeyPrefix, vendor, product)

	var result *redis.StringSliceCmd
	if result = r.conn.ZRange(key, 0, -1); result.Err() != nil {
		return nil, result.Err()
	}

	uniqCveIDs := map[string]bool{}
	for _, v := range result.Val() {
		uniqCveIDs[v] = true
	}
	details := []models.CveDetail{}
	for cveID := range uniqCveIDs {
		d, err := r.Get(cveID)
		if err != nil {
			return nil, err
		}
		match, err := matchCpe(uri, d)
		if err != nil {
			log.Warnf("Failed to compare the version:%s %s %#v",
				err, uri, d)
			// continue matching
			continue
		}
		if match {
			details = append(details, *d)
		}
	}
	return details, nil
}
1158482
func (store *fsBlockStore) RetrieveBlockByHash(blockHash []byte) (*common.Block, error) {
	return store.fileMgr.retrieveBlockByHash(blockHash)
}
845781
func (self *InvoiceClient) RetrieveCustomer(cid string) (*Invoice, error) {
	invoice := Invoice{}
	values := url.Values{"customer": {cid}}
	err := query("GET", "/v1/invoices/upcoming", values, &invoice)
	return &invoice, err
}
845785
func (d *DaemonDB) LagecyGetVM(id string) ([]byte, error) {
	data, err := d.db.Get(keyVMData(id), nil)
	if err != nil {
		return []byte(""), err
	}
	return data, nil
}