Пример #1
0
def get_gnocchiclient(conf):
    group = conf.dispatcher_gnocchi.auth_section
    session = keystone_client.get_session(conf, group=group)
    return client.Client('1',
                         session,
                         interface=conf[group].interface,
                         region_name=conf[group].region_name)
Пример #2
0
def get_gnocchiclient(conf, endpoint_override=None):
    session = keystone_client.get_session(conf)
    return client.Client('1',
                         session,
                         interface=conf.service_credentials.interface,
                         region_name=conf.service_credentials.region_name,
                         endpoint_override=endpoint_override)
Пример #3
0
    def __init__(self):
        """Initialize a nova client object."""
        conf = cfg.CONF.service_credentials

        logger = None
        if cfg.CONF.nova_http_log_debug:
            logger = log.getLogger("novaclient-debug")
            logger.logger.setLevel(log.DEBUG)
        ks_session = keystone_client.get_session()

        self.nova_client = nova_client.Client(
            version=api_versions.APIVersion('2.1'),
            session=ks_session,

            # nova adapter options
            region_name=conf.region_name,
            interface=conf.interface,
            service_type=cfg.CONF.service_types.nova,
            logger=logger)

        self.glance_client = glanceclient.Client(
            version='2',
            session=ks_session,
            region_name=conf.region_name,
            interface=conf.interface,
            service_type=cfg.CONF.service_types.glance)
Пример #4
0
    def __init__(self, conf):
        """Initialize a nova client object."""
        creds = conf.service_credentials

        logger = None
        if conf.nova_http_log_debug:
            logger = log.getLogger("novaclient-debug")
            logger.logger.setLevel(log.DEBUG)
        ks_session = keystone_client.get_session(conf)

        self.nova_client = nova_client.Client(
            version=api_versions.APIVersion('2.1'),
            session=ks_session,

            # nova adapter options
            region_name=creds.region_name,
            endpoint_type=creds.interface,
            service_type=conf.service_types.nova,
            logger=logger)

        self.glance_client = glanceclient.Client(
            version='2',
            session=ks_session,
            region_name=creds.region_name,
            interface=creds.interface,
            service_type=conf.service_types.glance)
    def __init__(self, conf):
        """Initialize a nova client object."""
        creds = conf.service_credentials

        logger = None
        if conf.nova_http_log_debug:
            logger = log.getLogger("novaclient-debug")
            logger.logger.setLevel(log.DEBUG)
        ks_session = keystone_client.get_session(conf)

        self.nova_client = nova_client.Client(
            version=api_versions.APIVersion('2.1'),
            session=ks_session,

            # nova adapter options
            region_name=_get_region_name(conf, conf.service_types.nova),
            endpoint_type=creds.interface,
            service_type=conf.service_types.nova,
            logger=logger)

        self.glance_client = glanceclient.Client(
            version='2',
            session=ks_session,
            region_name=_get_region_name(conf, conf.service_types.glance),
            interface=creds.interface,
            service_type=conf.service_types.glance)

        # TO DO (dbadea): remove condition after updating nova_client
        if hasattr(self.nova_client, 'set_timings_max_len'):
            self.nova_client.set_timings_max_len(
                conf.nova_client.max_timing_buffer)
Пример #6
0
 def __init__(self, conf):
     super(AllocationPollsterBase, self).__init__(conf)
     creds = conf.service_credentials
     self.client = client.Client(
         version='1',
         session=keystone_client.get_session(conf),
         region_name=creds.region_name,
         interface=creds.interface,
     )
Пример #7
0
 def __init__(self, conf):
     super(ImagesDiscovery, self).__init__(conf)
     creds = conf.service_credentials
     self.glance_client = glanceclient.Client(
         version='2',
         session=keystone_client.get_session(conf),
         region_name=creds.region_name,
         interface=creds.interface,
         service_type=conf.service_types.glance)
Пример #8
0
 def __init__(self):
     super(ImagesDiscovery, self).__init__()
     conf = cfg.CONF.service_credentials
     self.glance_client = glanceclient.Client(
         version='2',
         session=keystone_client.get_session(),
         region_name=conf.region_name,
         interface=conf.interface,
         service_type=cfg.CONF.service_types.glance)
Пример #9
0
 def __init__(self, conf):
     super(ResourceProviderPollster, self).__init__(conf)
     creds = conf.service_credentials
     self.client = client.Client(
         version='1',
         session=keystone_client.get_session(conf),
         region_name=creds.region_name,
         interface=creds.interface,
     )
Пример #10
0
 def __init__(self, conf):
     super(AllocationPollsterBase, self).__init__(conf)
     creds = conf.service_credentials
     self.client = client.Client(
         version='1',
         session=keystone_client.get_session(conf),
         region_name=creds.region_name,
         interface=creds.interface,
     )
 def __init__(self):
     conf = cfg.CONF.service_credentials
     params = {
         'session': keystone_client.get_session(),
         'endpoint_type': conf.interface,
         'region_name': conf.region_name,
         'service_type': cfg.CONF.service_types.neutron,
     }
     self.client = clientv20.Client(**params)
Пример #12
0
 def __init__(self, conf):
     super(_BaseDiscovery, self).__init__(conf)
     creds = conf.service_credentials
     self.client = cinder_client.Client(
         version='3',
         session=keystone_client.get_session(conf),
         region_name=creds.region_name,
         interface=creds.interface,
         service_type=conf.service_types.cinder)
Пример #13
0
 def __init__(self, conf):
     super(ResourceProviderDiscovery, self).__init__(conf)
     creds = conf.service_credentials
     self.client = client.Client(
         version='1',
         session=keystone_client.get_session(conf),
         region_name=creds.region_name,
         interface=creds.interface,
     )
Пример #14
0
def get_gnocchiclient(conf, endpoint_override=None):
    session = keystone_client.get_session(conf)
    return client.Client(
        "1",
        session,
        interface=conf.service_credentials.interface,
        region_name=conf.service_credentials.region_name,
        endpoint_override=endpoint_override,
    )
Пример #15
0
def get_gnocchiclient(conf, timeout_override=False):
    group = conf.dispatcher_gnocchi.auth_section
    timeout = (None if (not conf.dispatcher_gnocchi.request_timeout or
                        timeout_override)
               else conf.dispatcher_gnocchi.request_timeout)
    session = keystone_client.get_session(conf, group=group, timeout=timeout)
    return client.Client('1', session,
                         interface=conf[group].interface,
                         region_name=conf[group].region_name)
Пример #16
0
def murano_client(conf):
    creds = conf.service_credentials
    mclient = client.Client(
        version='1',
        session=keystone_client.get_session(conf),
        region_name=creds.region_name,
        service_type='application-catalog',
    )
    return mclient
Пример #17
0
 def __init__(self):
     conf = cfg.CONF.service_credentials
     params = {
         'session': keystone_client.get_session(),
         'endpoint_type': conf.interface,
         'region_name': conf.region_name,
         'service_type': cfg.CONF.service_types.neutron,
     }
     self.client = clientv20.Client(**params)
Пример #18
0
 def __init__(self, conf):
     creds = conf.service_credentials
     params = {
         'session': keystone_client.get_session(conf),
         'endpoint_type': creds.interface,
         'region_name': creds.region_name,
         'service_type': conf.service_types.neutron,
     }
     self.client = clientv20.Client(**params)
     self.lb_version = conf.service_types.neutron_lbaas_version
Пример #19
0
 def __init__(self, conf):
     creds = conf.service_credentials
     params = {
         'session': keystone_client.get_session(conf),
         'endpoint_type': creds.interface,
         'region_name': creds.region_name,
         'service_type': conf.service_types.neutron,
     }
     self.client = clientv20.Client(**params)
     self.lb_version = conf.service_types.neutron_lbaas_version
Пример #20
0
 def initialize_client_hook(self):
     """Initialize a Neutron client object."""
     creds = self.conf.service_credentials
     params = {
         'session': keystone_client.get_session(self.conf),
         'endpoint_type': creds.interface,
         'region_name': creds.region_name,
         'service_type': self.conf.service_types.neutron,
     }
     return clientv20.Client(**params)
Пример #21
0
 def __init__(self, conf):
     super(_BaseDiscovery, self).__init__(conf)
     creds = conf.service_credentials
     self.client = cinder_client.Client(
         version='2',
         session=keystone_client.get_session(conf),
         region_name=creds.region_name,
         interface=creds.interface,
         service_type=conf.service_types.cinderv2
     )
Пример #22
0
 def initialize_client_hook(self):
     """Initialize a PLcloudkitty client object."""
     ks_session = keystone_client.get_session(self.conf)
     endpoint = plck_client._get_endpoint(ks_session)
     return plck_client.Client(
         '1',
         endpoint,
         token=ks_session.get_token(),
         insecure=self.conf.service_credentials.insecure,
         cacert=getattr(self.conf.service_credentials, 'cacert', None))
Пример #23
0
def get_gnocchiclient(conf, timeout_override=False):
    group = conf.dispatcher_gnocchi.auth_section
    timeout = (None if (not conf.dispatcher_gnocchi.request_timeout
                        or timeout_override) else
               conf.dispatcher_gnocchi.request_timeout)
    session = keystone_client.get_session(conf, group=group, timeout=timeout)
    return client.Client('1',
                         session,
                         interface=conf[group].interface,
                         region_name=conf[group].region_name)
Пример #24
0
def get_gnocchiclient(conf):
    requests_session = requests.session()
    for scheme in requests_session.adapters.keys():
        requests_session.mount(scheme, ka_session.TCPKeepAliveAdapter(
            pool_block=True))

    session = keystone_client.get_session(requests_session=requests_session)
    return client.Client('1', session,
                         interface=conf.service_credentials.interface,
                         region_name=conf.service_credentials.region_name,
                         endpoint_override=conf.dispatcher_gnocchi.url)
Пример #25
0
 def __init__(self, conf):
     super(_BaseDiscovery, self).__init__(conf)
     creds = conf.service_credentials
     # NOTE(tobias-urdin): We set 3.43 (the maximum for Pike) because
     # we need atleast 3.41 to get user_id on snapshots.
     self.client = cinder_client.Client(
         version='3.43',
         session=keystone_client.get_session(conf),
         region_name=creds.region_name,
         interface=creds.interface,
         service_type=conf.service_types.cinder)
Пример #26
0
def get_gnocchiclient(conf):
    requests_session = requests.session()
    for scheme in requests_session.adapters.keys():
        requests_session.mount(scheme, ka_session.TCPKeepAliveAdapter(
            pool_block=True))

    session = keystone_client.get_session(requests_session=requests_session)
    return client.Client('1', session,
                         interface=conf.service_credentials.interface,
                         region_name=conf.service_credentials.region_name,
                         endpoint_override=conf.dispatcher_gnocchi.url)
Пример #27
0
 def initialize_client_hook(self):
     """Initialize a Cinder client object."""
     # return cinder_client.Client(self.conf)
     api_version = VERSIONS.get_active_version()
     creds = self.conf.service_credentials
     params = {
         'session': keystone_client.get_session(self.conf),
         'endpoint_type': creds.interface,
         'region_name': creds.region_name,
         'service_type': self.conf.service_types.cinder,
     }
     return api_version['client'].Client(**params)
Пример #28
0
 def __init__(self, conf):
     super(_BaseDiscovery, self).__init__(conf)
     creds = conf.service_credentials
     # NOTE(tobias-urdin): We set 3.43 (the maximum for Pike) because
     # we need atleast 3.41 to get user_id on snapshots.
     self.client = cinder_client.Client(
         version='3.43',
         session=keystone_client.get_session(conf),
         region_name=creds.region_name,
         interface=creds.interface,
         service_type=conf.service_types.cinder
     )
Пример #29
0
def get_gnocchiclient(conf, request_timeout=None):
    group = conf.gnocchi.auth_section
    session = keystone_client.get_session(conf, group=group,
                                          timeout=request_timeout)
    adapter = keystoneauth1.session.TCPKeepAliveAdapter(
        pool_maxsize=conf.max_parallel_requests)
    session.mount("http://", adapter)
    session.mount("https://", adapter)
    return client.Client(
        '1', session, adapter_options={'connect_retries': 3,
                                       'interface': conf[group].interface,
                                       'region_name': conf[group].region_name})
Пример #30
0
def get_gnocchiclient(conf, timeout_override=False):
    group = conf.dispatcher_gnocchi.auth_section
    timeout = (None if (not conf.dispatcher_gnocchi.request_timeout or
                        timeout_override)
               else conf.dispatcher_gnocchi.request_timeout)
    session = keystone_client.get_session(conf, group=group, timeout=timeout)
    adapter = keystoneauth1.session.TCPKeepAliveAdapter(
        pool_maxsize=conf.max_parallel_requests)
    session.mount("http://", adapter)
    session.mount("https://", adapter)
    return client.Client('1', session,
                         interface=conf[group].interface,
                         region_name=conf[group].region_name,
                         adapter_options={'connect_retries': 3})
Пример #31
0
    def __init__(self, conf):
        super(_BaseDiscovery, self).__init__(conf)

        # TODO: check if we can skip this loading of cfg
        from ceilometer import service
        from ceilometer.cmd.polling import CLI_OPTS
        conf = cfg.ConfigOpts()
        conf.register_cli_opts(CLI_OPTS)
        conf = service.prepare_service(conf=conf)

        creds = conf.service_credentials
        self.client = nova_client.Client(
            version='2',
            session=keystone_client.get_session(conf),
        )
Пример #32
0
 def initialize_client_hook(self):
     """Initialize a Nova client object."""
     creds = self.conf.service_credentials
     logger = None
     if hasattr(self.conf, 'nova_http_log_debug') and getattr(
             self.conf, 'nova_http_log_debug'):
         logger = log.getLogger("novaclient-debug")
         logger.logger.setLevel(log.DEBUG)
     ks_session = keystone_client.get_session(self.conf)
     return nova_client.Client(
         version=api_versions.APIVersion('2.1'),
         session=ks_session,
         # nova adapter options
         region_name=creds.region_name,
         endpoint_type=creds.interface,
         service_type=self.conf.service_types.nova,
         logger=logger)
Пример #33
0
    def __init__(self, conf, parsed_url):
        self.conf = conf
        self._retry_interval = conf.monasca.client_retry_interval
        self._max_retries = conf.monasca.client_max_retries or 1
        self._enable_api_pagination = conf.monasca.enable_api_pagination
        # NOTE(zqfan): There are many concurrency requests while using
        # Ceilosca, to save system resource, we don't retry too many times.
        if self._max_retries < 0 or self._max_retries > 10:
            LOG.warning('Reduce max retries from %s to 10', self._max_retries)
            self._max_retries = 10

        monasca_auth_group = conf.monasca.auth_section
        session = keystone_client.get_session(conf, group=monasca_auth_group)

        self._endpoint = parsed_url.netloc + parsed_url.path
        LOG.info(
            _("monasca_client: using %s as Monasca endpoint") % self._endpoint)

        self._get_client(session)
Пример #34
0
def get_gnocchiclient(conf, request_timeout=None):
    group = conf.gnocchi.auth_section
    session = keystone_client.get_session(conf, group=group,
                                          timeout=request_timeout)
    adapter = keystoneauth1.session.TCPKeepAliveAdapter(
        pool_maxsize=conf.max_parallel_requests)
    session.mount("http://", adapter)
    session.mount("https://", adapter)
    interface = conf[group].interface
    region_name = conf[group].region_name
    gnocchi_url = session.get_endpoint(service_type='metric',
                                       service_name='gnocchi',
                                       interface=interface,
                                       region_name=region_name)
    return client.Client(
        '1', session, adapter_options={'connect_retries': 3,
                                       'interface': interface,
                                       'region_name': region_name,
                                       'endpoint_override': gnocchi_url})
Пример #35
0
def get_gnocchiclient(conf, request_timeout=None):
    group = conf.gnocchi.auth_section
    session = keystone_client.get_session(conf, group=group,
                                          timeout=request_timeout)
    adapter = keystoneauth1.session.TCPKeepAliveAdapter(
        pool_maxsize=conf.max_parallel_requests)
    session.mount("http://", adapter)
    session.mount("https://", adapter)
    interface = conf[group].interface
    region_name = conf[group].region_name
    gnocchi_url = session.get_endpoint(service_type='metric',
                                       service_name='gnocchi',
                                       interface=interface,
                                       region_name=region_name)
    return client.Client(
        '1', session, adapter_options={'connect_retries': 3,
                                       'interface': interface,
                                       'region_name': region_name,
                                       'endpoint_override': gnocchi_url})
Пример #36
0
    def __init__(self, conf):
        """Initialize a nova client object."""
        creds = conf.service_credentials

        ks_session = keystone_client.get_session(conf)

        self.nova_client = nova_client.Client(
            version=api_versions.APIVersion('2.1'),
            session=ks_session,

            # nova adapter options
            region_name=creds.region_name,
            endpoint_type=creds.interface,
            service_type=conf.service_types.nova)

        self.glance_client = glanceclient.Client(
            version='2',
            session=ks_session,
            region_name=creds.region_name,
            interface=creds.interface,
            service_type=conf.service_types.glance)
Пример #37
0
    def __init__(self, conf):
        """Initialize a nova client object."""
        creds = conf.service_credentials

        ks_session = keystone_client.get_session(conf)

        self.nova_client = nova_client.Client(
            version=api_versions.APIVersion('2.1'),
            session=ks_session,

            # nova adapter options
            region_name=creds.region_name,
            endpoint_type=creds.interface,
            service_type=conf.service_types.nova)

        self.glance_client = glanceclient.Client(
            version='2',
            session=ks_session,
            region_name=creds.region_name,
            interface=creds.interface,
            service_type=conf.service_types.glance)
Пример #38
0
    def __init__(self, endpoint_override=None, auth=None):
        """Initialize a nova client object."""
        conf = cfg.CONF.service_credentials

        logger = None
        if cfg.CONF.nova_http_log_debug:
            logger = log.getLogger("novaclient-debug")
            logger.logger.setLevel(log.DEBUG)

        self.nova_client = nova_client.Client(
            version=2,
            session=keystone_client.get_session(),

            # nova adapter options
            region_name=conf.region_name,
            interface=conf.interface,
            service_type=cfg.CONF.service_types.nova,

            # keystone adapter options
            endpoint_override=endpoint_override,
            auth=auth,
            logger=logger)
Пример #39
0
    def __init__(self, endpoint_override=None, auth=None):
        """Initialize a nova client object."""
        conf = cfg.CONF.service_credentials

        logger = None
        if cfg.CONF.nova_http_log_debug:
            logger = logging.getLogger("novaclient-debug")
            logger.setLevel(log.DEBUG)

        self.nova_client = nova_client.Client(
            version=2,
            session=keystone_client.get_session(),

            # nova adapter options
            region_name=conf.region_name,
            interface=conf.interface,
            service_type=cfg.CONF.service_types.nova,

            # keystone adapter options
            endpoint_override=endpoint_override,
            auth=auth,
            logger=logger)
Пример #40
0
    def get_samples(self, manager, cache, resources):
        # TODO: global conf
        sess = get_session(conf2)
        neutron = clientN.Client(session=sess)

        # initialize some variables:
        pool_size = 0
        alloc_ip = 0
        used_ip = 0
        subNet = list()
        subNetId = list()
        regionArray = list()
        try:
            nL = neutron.list_networks()
        except Exception as e:
            LOG.error(e)
            raise e

        netlist = cfg.CONF.region.netlist if cfg.CONF.region.netlist else list(
        )
        LOG.debug("Netlist %s", netlist)

        # compute the size of the pool
        if nL and "networks" in nL:
            for nLi in nL["networks"]:
                if ("id" in nLi) and ("name"
                                      in nLi) and nLi["name"] in netlist and (
                                          "subnets" in nLi):
                    for sNi in nLi['subnets']:
                        sN = neutron.show_subnet(sNi)
                        if ("subnet" in sN) and ("cidr" in sN["subnet"]) and (
                                "allocation_pools" in sN["subnet"]):
                            subNetId.append(sN['subnet']['id'])
                            if sN["subnet"]["allocation_pools"] and len(
                                    sN["subnet"]["allocation_pools"]) > 0:
                                for pool in sN["subnet"]["allocation_pools"]:
                                    subNet.append(
                                        IPRange(pool["start"], pool["end"]))
                                    pool_size += IPRange(
                                        pool["start"], pool["end"]).size

        # compute the IP usage
        netF = neutron.list_floatingips()
        if netF and "floatingips" in netF:
            for netFi in netF["floatingips"]:
                for tmp_pool in subNet:
                    if "floating_ip_address" in netFi and IPAddress(
                            netFi["floating_ip_address"]) in tmp_pool:
                        alloc_ip += 1
                        if "fixed_ip_address" in netFi and netFi[
                                "fixed_ip_address"]:
                            used_ip += 1
                            break
                        break

        # check if some routers are using IPs
        r_L = neutron.list_routers()
        if "routers" in r_L:
            for r_li in r_L["routers"]:
                if "external_gateway_info" in r_li \
                        and r_li["external_gateway_info"] \
                        and "external_fixed_ips" in r_li["external_gateway_info"] \
                        and len(r_li["external_gateway_info"]["external_fixed_ips"]) > 0:
                    for tmp_r_id in r_li["external_gateway_info"][
                            "external_fixed_ips"]:
                        if "subnet_id" in tmp_r_id and tmp_r_id[
                                "subnet_id"] in subNetId:
                            alloc_ip += 1
                            used_ip += 1

        # create region Object
        # build metadata
        metaD["name"] = (cfg.CONF.service_credentials.region_name
                         if cfg.CONF.service_credentials.region_name else None)
        metaD["latitude"] = (cfg.CONF.region.latitude
                             if cfg.CONF.region.latitude else 0.0)
        metaD["longitude"] = (cfg.CONF.region.longitude
                              if cfg.CONF.region.longitude else 0.0)
        metaD["location"] = (cfg.CONF.region.location
                             if cfg.CONF.region.location else None)
        metaD["ram_allocation_ratio"] = (
            cfg.CONF.region.ram_allocation_ratio
            if cfg.CONF.region.ram_allocation_ratio else None)
        metaD["cpu_allocation_ratio"] = (
            cfg.CONF.region.cpu_allocation_ratio
            if cfg.CONF.region.cpu_allocation_ratio else None)

        # store components versions as metadata
        manager = OSVersionComponent.OpenStackComponentVersionManager()
        c_versions = manager.get_all_components_version()
        for c in c_versions:
            if c['isInstalled']:
                name = c['component'] + "_version"
                version = c['attributes']['version']
                metaD[name] = version
            else:
                LOG.debug("Component not intalled: %s " % (c))

        LOG.debug("Publish region metadata: %s " % (metaD))

        # build samples
        regionArray.append({
            'name': 'region.pool_ip',
            'unit': '#',
            'value': (pool_size if pool_size else 0)
        })
        regionArray.append({
            'name': 'region.allocated_ip',
            'unit': '#',
            'value': (alloc_ip if alloc_ip else 0)
        })
        regionArray.append({
            'name': 'region.used_ip',
            'unit': '#',
            'value': (used_ip if used_ip else 0)
        })

        # loop over the region Object
        for regionInfo in regionArray:
            my_sample = sample.Sample(
                name=regionInfo['name'],
                type="gauge",
                unit=regionInfo['unit'],
                volume=regionInfo['value'],
                user_id=None,
                project_id=None,
                resource_id=cfg.CONF.service_credentials.region_name,
                timestamp=timeutils.isotime(),
                resource_metadata=metaD)
            LOG.debug("Publish sample: %s" % (my_sample))
            yield my_sample
Пример #41
0
 def __init__(self, conf):
     super(LoadBalancerDiscovery, self).__init__(conf)
     self.client = connection.Connection(
         session=keystone_client.get_session(conf))
Пример #42
0
 def client(self):
     if self._client is None:
         session = keystone_client.get_session(
             self.conf, group=self.conf.zaqar.auth_section)
         self._client = zaqarclient.Client(session=session)
     return self._client
Пример #43
0
 def client(self):
     if self._client is None:
         session = keystone_client.get_session(
             self.conf, group=self.conf.zaqar.auth_section)
         self._client = zaqarclient.Client(session=session)
     return self._client
Пример #44
0
from oslo_utils import timeutils
from oslo_config import cfg
from novaclient import client
from keystoneauth1 import identity
from keystoneauth1 import session
from ceilometer.keystone_client import get_session

LOG = log.getLogger(__name__)

from ceilometer import service
from ceilometer.cmd.polling import CLI_OPTS
conf = cfg.ConfigOpts()
conf.register_cli_opts(CLI_OPTS)
conf2 = service.prepare_service(conf=conf)

sess = get_session(conf2)


class HostPollster(plugin_base.PollsterBase):
    @property
    def default_discovery(self):
        return 'host'

    @staticmethod
    def get_samples(manager, cache, resources):
        nt = client.Client(version='2', session=sess)

        for host in resources:
            LOG.debug(_('checking host %s'), host)
            try:
                info = nt.hosts.get(host)
Пример #45
0
 def get_glance_client(ksclient, endpoint):
     # hard-code v1 glance API version selection while v2 API matures
     return glanceclient.Client('1',
                                session=keystone_client.get_session(),
                                endpoint=endpoint,
                                auth=ksclient.session.auth)
 def get_glance_client(ksclient, endpoint):
     # hard-code v1 glance API version selection while v2 API matures
     return glanceclient.Client('1',
                                session=keystone_client.get_session(),
                                endpoint=endpoint,
                                auth=ksclient.session.auth)