// Call a XenAPI extension on this host
161183
func (_class HostClass) CallExtension(sessionID SessionRef, host HostRef, call string) (_retval string, _err error) {
	_method := "host.call_extension"
	_sessionIDArg, _err := convertSessionRefToXen(fmt.Sprintf("%s(%s)", _method, "session_id"), sessionID)
	if _err != nil {
		return
	}
	_hostArg, _err := convertHostRefToXen(fmt.Sprintf("%s(%s)", _method, "host"), host)
	if _err != nil {
		return
	}
	_callArg, _err := convertStringToXen(fmt.Sprintf("%s(%s)", _method, "call"), call)
	if _err != nil {
		return
	}
	_result, _err := _class.client.APICall(_method, _sessionIDArg, _hostArg, _callArg)
	if _err != nil {
		return
	}
	_retval, _err = convertStringToGo(_method + " -> ", _result.Value)
	return
}
911083
func (s *HostService) AddGloboDnsHost(p *AddGloboDnsHostParams) (*AddGloboDnsHostResponse, error) {
	resp, err := s.cs.newRequest("addGloboDnsHost", p.toURLValues())
	if err != nil {
		return nil, err
	}

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

	// If we have a async client, we need to wait for the async result
	if s.cs.async {
		b, err := s.cs.GetAsyncJobResult(r.JobID, s.cs.timeout)
		if err != nil {
			if err == AsyncTimeoutErr {
				return &r, err
			}
			return nil, err
		}

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

	return &r, nil
}
57860
func LookupHost(host string, server string, c *dns.Client, m *dns.Msg) (addrs []string, err error) {
	a, _ := LookupA(host, server, c, m)
	aaaa, _ := LookupAAAA(host, server, c, m)
	addrs = append(a, aaaa...)

	return
}
159848
func Call(ctx context.Context, request Request, response interface{}, opts ...CallOption) error {
	return DefaultClient.Call(ctx, request, response, opts...)
}
125958
func (c Client) GetServiceExtensionMap(service *ServiceItem, app *ApplicationItem, extensionKey string) (map[string]string, error) {
	extensionData := ServiceExtensionLabels{}
	err := c.GetServiceExtension(app.TypeName, app.TypeVersion, service.TypeName, extensionKey, &extensionData)
	if err != nil {
		return nil, err
	}

	labels := map[string]string{}
	if extensionData.Label != nil {
		for _, label := range extensionData.Label {
			labels[label.Key] = label.Value
		}
	}

	return labels, nil
}
970385
func (c *Clientset) Apiextensions() apiextensionsinternalversion.ApiextensionsInterface {
	return &fakeapiextensionsinternalversion.FakeApiextensions{Fake: &c.Fake}
}
1047810
func (runInfo *runInfoStruct) anonCallExpr() {
	anonCallExpr := runInfo.expr.(*ast.AnonCallExpr)

	runInfo.expr = anonCallExpr.Expr
	runInfo.invokeExpr()
	if runInfo.err != nil {
		return
	}

	if runInfo.rv.Kind() == reflect.Interface && !runInfo.rv.IsNil() {
		runInfo.rv = runInfo.rv.Elem()
	}
	if runInfo.rv.Kind() != reflect.Func {
		runInfo.err = newStringError(anonCallExpr, "cannot call type "+runInfo.rv.Kind().String())
		runInfo.rv = nilValue
		return
	}

	runInfo.expr = &ast.CallExpr{Func: runInfo.rv, SubExprs: anonCallExpr.SubExprs, VarArg: anonCallExpr.VarArg, Go: anonCallExpr.Go}
	runInfo.invokeExpr()
}
881179
func (c *Clientset) ApiextensionsV1beta1() apiextensionsv1beta1.ApiextensionsV1beta1Interface {
	return &fakeapiextensionsv1beta1.FakeApiextensionsV1beta1{Fake: &c.Fake}
}
620215
func (f ES6Formatter) Call(name string) (string, string) {
	return ES6Identifier(name), "import { " + ES6Identifier(name) + " } from '" + name + ".js';"
}
673206
func (s *PublicBlockChainAPI) Call(ctx context.Context, args CallArgs, blockNr rpc.BlockNumber) (hexutil.Bytes, error) {
	result, _, _, err := DoCall(ctx, s.b, args, blockNr, vm.Config{}, 5*time.Second, s.b.RPCGasCap())
	return (hexutil.Bytes)(result), err
}
1021456
func lookupHost(hostname string) (string, error) {
	addrs, err := net.LookupHost(hostname)

	if err != nil {
		return "", err
	}
	return addrs[0], nil
}
366912
func (s *Settings) AddExtension(paths []string) {
	for _, ext := range paths {
		s.extensions = append(s.extensions, fmt.Sprintf("--load-extension=%s", ext))
	}
}
322665
func (c *Context) GetSupportedExtensions() []string {
	ext := c.Call("getSupportedExtensions")
	extensions := make([]string, ext.Length())
	for i := 0; i < ext.Length(); i++ {
		extensions[i] = ext.Index(i).String()
	}
	return extensions
}
158297
func (_m *ClientInterface) GetHost(hostID string) (*host.Host, error) {
	ret := _m.Called(hostID)

	var r0 *host.Host
	if rf, ok := ret.Get(0).(func(string) *host.Host); ok {
		r0 = rf(hostID)
	} else {
		if ret.Get(0) != nil {
			r0 = ret.Get(0).(*host.Host)
		}
	}

	var r1 error
	if rf, ok := ret.Get(1).(func(string) error); ok {
		r1 = rf(hostID)
	} else {
		r1 = ret.Error(1)
	}

	return r0, r1
}
1100514
func (rf *Client) Call(g *ogdl.Graph) (*ogdl.Graph, error) {

	log.Printf("Client.Call to %s, %d", rf.Host, rf.Protocol)

	var err error
	var r *ogdl.Graph

	n := 2
	for {
		if rf.conn == nil {
			err = rf.Dial()
			if err != nil {
				return nil, errors.New("Cannot establish a connection to " + rf.Host)
			}
		}

		if rf.Protocol == 1 {
			r, err = rf.callV1(g)
		} else {
			r, err = rf.callV2(g)
		}
		if err == nil {
			break
		}
		n--
		if n < 0 {
			break
		}
		rf.conn = nil
		log.Println("Call.retry", n)
	}

	return r, err
}
1306434
func (e *XXX_InternalExtensions) extensionsWrite() map[int32]Extension {
	if e.p == nil {
		e.p = new(struct {
			mu           sync.Mutex
			extensionMap map[int32]Extension
		})
		e.p.extensionMap = make(map[int32]Extension)
	}
	return e.p.extensionMap
}
187003
func (m *MockInterface) Extensions() v1beta17.ExtensionsV1beta1Interface {
	ret := m.ctrl.Call(m, "Extensions")
	ret0, _ := ret[0].(v1beta17.ExtensionsV1beta1Interface)
	return ret0
}