Get an instance of Api IPv4 services facade.
160022
def create_api_ipv4(self):
        """"""

        return ApiIPv4(
            self.networkapi_url,
            self.user,
            self.password,
            self.user_ldap)
937097
def get_ips(self, instance_id):
        
        self._init_az_api()
        cluster_name, node_name = instance_id
        # XXX: keep in sync with contents of `vm_deployment_template`
        ip_name = ('{node_name}-public-ip'.format(node_name=node_name))
        ip = self._network_client.public_ip_addresses.get(cluster_name, ip_name)
        if (ip.provisioning_state == 'Succeeded' and ip.ip_address):
            return [ip.ip_address]
        else:
            return []
441085
def _get_public_ip(name, resource_group):
    '''
    
    '''
    netconn = get_conn(client_type='network')
    try:
        pubip_query = netconn.public_ip_addresses.get(
            resource_group_name=resource_group,
            public_ip_address_name=name
        )
        pubip = pubip_query.as_dict()
    except CloudError as exc:
        __utils__['azurearm.log_cloud_error']('network', exc.message)
        pubip = {'error': exc.message}

    return pubip
742954
def get_api_client():
    """"""
    with _api_lock:
        global _api_client
        if not _api_client:
            conf_file = os.path.join(os.environ.get("HOME"),
                                     ".python-grid5000.yaml")
            _api_client = Client.from_yaml(conf_file)

        return _api_client
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()
536542
def get_in_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_in_ip_addr()
1102377
def get_ips(self, interface=None, family=None, scope=None, timeout=0):
        

        kwargs = {}
        if interface:
            kwargs['interface'] = interface
        if family:
            kwargs['family'] = family
        if scope:
            kwargs['scope'] = scope

        ips = None
        timeout = int(os.environ.get('LXC_GETIP_TIMEOUT', timeout))

        while not ips:
            ips = _lxc.Container.get_ips(self, **kwargs)
            if timeout == 0:
                break

            timeout -= 1
            time.sleep(1)

        return ips
1292124
def get(self, floating_ip_id):
        
        fip = self.client.show_floatingip(floating_ip_id).get('floatingip')
        self._set_instance_info(fip)
        return FloatingIp(fip)
781981
def _get_ipv4_from_binary(self, bin_addr):
        """"""

        return socket.inet_ntop(socket.AF_INET, struct.pack("!L", bin_addr))
324445
public static synchronized SailthruClient getInstance(String apiKey, String apiSecret, String apiUrl) {
        if (_instance == null) {
            _instance = new SailthruClient(apiKey, apiSecret, apiUrl);
        }
        return _instance;
    }
1284517
def _get_network_interface(name, resource_group):
    '''
    
    '''
    public_ips = []
    private_ips = []
    netapi_versions = get_api_versions(kwargs={
        'resource_provider': 'Microsoft.Network',
        'resource_type': 'publicIPAddresses'
        }
    )
    netapi_version = netapi_versions[0]
    netconn = get_conn(client_type='network')
    netiface_query = netconn.network_interfaces.get(
        resource_group_name=resource_group,
        network_interface_name=name
    )

    netiface = netiface_query.as_dict()
    for index, ip_config in enumerate(netiface['ip_configurations']):
        if ip_config.get('private_ip_address') is not None:
            private_ips.append(ip_config['private_ip_address'])
        if 'id' in ip_config.get('public_ip_address', {}):
            public_ip_name = get_resource_by_id(
                ip_config['public_ip_address']['id'],
                netapi_version,
                'name'
            )
            public_ip = _get_public_ip(public_ip_name, resource_group)
            public_ips.append(public_ip['ip_address'])
            netiface['ip_configurations'][index]['public_ip_address'].update(public_ip)

    return netiface, public_ips, private_ips
862941
def get_api_connector(cls):
        
        if cls._api is None:  # pragma: no cover
            cls.load_config()
            cls.debug('initialize connection to remote server')
            apihost = cls.get('api.host')
            if not apihost:
                raise MissingConfiguration()

            apienv = cls.get('api.env')
            if apienv and apienv in cls.apienvs:
                apihost = cls.apienvs[apienv]

            cls._api = XMLRPCClient(host=apihost, debug=cls.verbose)

        return cls._api
1232262
def instance_admin_api(self):
        """"""
        if self._instance_admin_api is None:
            self._instance_admin_api = InstanceAdminClient(
                credentials=self.credentials, client_info=_CLIENT_INFO
            )
        return self._instance_admin_api
757945
def get_instance(self, payload):
        
        return SessionInstance(self._version, payload, service_sid=self._solution['service_sid'], )
1330392
def get_instance(self, payload):
        
        return DomainInstance(self._version, payload, account_sid=self._solution['account_sid'], )
941011
def get_by_id(self, id_networkv6):
        

        uri = 'api/networkv4/%s/' % id_networkv6
        return super(ApiNetworkIPv6, self).get(uri)
780410
def get_api_services_by_name(self):
        """"""
        if not self.services_by_name:
            self.services_by_name = dict({s.get('name'): s for s in self.conf
                                          .get("api")
                                          .get("services")})
        return self.services_by_name