Get an instance of Api V4 IPv4 services facade.
344229
def create_api_v4_ipv4(self):
        """"""

        return ApiV4IPv4(
            self.networkapi_url,
            self.user,
            self.password,
            self.user_ldap)
941011
def get_by_id(self, id_networkv6):
        

        uri = 'api/networkv4/%s/' % id_networkv6
        return super(ApiNetworkIPv6, self).get(uri)
575619
def check_vip_ip(self, ip, environment_vip):
        
        uri = 'api/ipv4/ip/%s/environment-vip/%s/' % (ip, environment_vip)

        return super(ApiNetworkIPv4, self).get(uri)
144903
public static ipv6 get(nitro_service service) throws Exception{
		ipv6 obj = new ipv6();
		ipv6[] response = (ipv6[])obj.get_resources(service);
		return response[0];
	}
1056876
def get_instance(self, payload):
        
        return BuildInstance(self._version, payload, service_sid=self._solution['service_sid'], )
1180676
public static ApiOvhCore getInstance() {
		ApiOvhCore core = new ApiOvhCore();
		// core._consumerKey = core.config.getConsumerKey();
		core._consumerKey = core.getConsumerKeyOrNull();// config.getConsumerKey();
		if (core._consumerKey == null) {
			File file = ApiOvhConfigBasic.getOvhConfig();
			String location = ApiOvhConfigBasic.configFiles;
			if (file != null)
				location = file.getAbsolutePath();
			String url = "";
			String CK = "";
			try {
				OvhCredential credential = core.requestToken(null);
				url = credential.validationUrl;
				CK = credential.consumerKey;
			} catch (Exception e) {
				log.error("Fail to request a new Credential", e);
			}
			log.error("activate the CK {} here: {}", CK, url);
			throw new NullPointerException("no 'consumer_key' present in " + location
					+ " or environement 'OVH_CONSUMER_KEY', activate the CK '" + CK + "' here: " + url);
		}
		return core;
	}
1027157
function getInstanceIp() {
        return new Promise(function(resolve, reject) {
            debug('Requesting IP address information from EC2');
            http.get('http://169.254.169.254/latest/meta-data/public-ipv4/', function(res) {
                const statusCode = res.statusCode;
                if(statusCode !== 200) {
                    debug('Error requesting IP from EC2! ' + statusCode);
                    res.resume();
                    return reject();
                }
                res.setEncoding('utf-8');
                var body = '';
                res.on('data', function(data) { body += data });
                res.on('end', function() {
                    config.endpoint = 'http://' + body;
                    debug('setting endpoint to: ' + config.endpoint);
                    return resolve(config.endpoint);
                });
            }).on('error', function(err) {
                debug('Error requesting IP from EC2! ' + err.message);
                return reject();
            });
        });
    }
84096
def get_instance(self, payload):
        
        return RoleInstance(self._version, payload, service_sid=self._solution['service_sid'], )
229243
def get_instance(self, payload):
        
        return BindingInstance(self._version, payload, service_sid=self._solution['service_sid'], )
1268730
public function getIpV4() : ?string 
    {
        if ( ! $this->hasIpV4()) {
            $this->setIpV4($this->getDefaultIpV4());
        }
        return $this->ipV4;
    }
486416
def get_instance(self, payload):
        
        return MemberInstance(
            self._version,
            payload,
            service_sid=self._solution['service_sid'],
            channel_sid=self._solution['channel_sid'],
        )
1277568
def get_out_ip_addr(cls, tenant_id):
        
        if tenant_id not in cls.serv_obj_dict:
            LOG.error("Fabric not prepared for tenant %s", tenant_id)
            return
        tenant_obj = cls.serv_obj_dict.get(tenant_id)
        return tenant_obj.get_out_ip_addr()
466246
def get_api_endpoints(self, apiname):
        """"""
        try:
            return self.services_by_name\
                    .get(apiname)\
                    .get("endpoints")\
                    .copy()
        except AttributeError:
            raise Exception(f"Couldn't find the API endpoints")
846075
def _get_ip(self, hostonly_interface_number, api_port):
        
        remaining_try = 300
        while remaining_try > 0:
            json_data = None
            session = aiohttp.ClientSession()
            try:
                resp = None
                resp = yield from session.get('http://127.0.0.1:{}/v2/compute/network/interfaces'.format(api_port))
            except (OSError, aiohttp.ClientError, TimeoutError, asyncio.TimeoutError):
                pass

            if resp:
                if resp.status < 300:
                    try:
                        json_data = yield from resp.json()
                    except ValueError:
                        pass
                resp.close()

            session.close()

            if json_data:
                for interface in json_data:
                    if "name" in interface and interface["name"] == "eth{}".format(hostonly_interface_number - 1):
                        if "ip_address" in interface and len(interface["ip_address"]) > 0:
                            return interface["ip_address"]
            remaining_try -= 1
            yield from asyncio.sleep(1)
        raise GNS3VMError("Could not get the GNS3 VM ip make sure the VM receive an IP from VirtualBox")
550288
def create(self, networkipv4s):
        

        data = {'networks': networkipv4s}
        return super(ApiNetworkIPv4, self).post('api/v3/networkv4/', data)
766570
def get_instance(self, payload):
        
        return ChannelInstance(self._version, payload, service_sid=self._solution['service_sid'], )
593287
def get_instance(self, payload):
        
        return SipInstance(self._version, payload, account_sid=self._solution['account_sid'], )