Returns a list of tags for every guest server that is detected by the OpenStack
        integration.
        List of pairs (hostname, list_of_tags)
544311
def get_external_host_tags(self):
        
        self.log.debug("Collecting external_host_tags now")
        external_host_tags = []
        for k, v in iteritems(self.external_host_tags):
            external_host_tags.append((k, {SOURCE_TYPE: v}))

        self.log.debug("Sending external_host_tags: %s", external_host_tags)
        return external_host_tags
1370187
def count_by_tag(stack, descriptor):
    
    ec2_conn = boto.ec2.connection.EC2Connection()
    resses = ec2_conn.get_all_instances(
                    filters={
                        'tag:stack': stack,
                        'tag:descriptor': descriptor
                    })
    instance_list_raw = list()
    [[instance_list_raw.append(x) for x in res.instances] for res in resses]
    instance_list = [x for x in instance_list_raw if state_filter(x)]
    instances = len(instance_list)
    return instances
354561
def get_all_tags_of_incoming(self, incoming_id):
        
        return self._iterate_through_pages(
            get_function=self.get_tags_of_incoming_per_page,
            resource=INCOMING_TAGS,
            **{'incoming_id': incoming_id}
        )
861219
def list_domains(self):
        
        self.connect()
        results = self.server.list_domains(self.session_id)
        return {i['domain']: i['subdomains'] for i in results}
451782
def tags(self):
        
        if 'tags' in self._values:
            return self._values['tags']
        self._values['tags'] = copy.deepcopy(self._defaults['tags'])
        return self._values['tags']
903488
def add_tags
      @hosts.each do |host|
        instance = host['instance']

        # Define tags for the instance
        @logger.notify("aws-sdk: Add tags for #{host.name}")

        tags = [
          {
            :key   => 'jenkins_build_url',
            :value => @options[:jenkins_build_url],
          },
          {
            :key   => 'Name',
            :value => host.name,
          },
          {
            :key   => 'department',
            :value => @options[:department],
          },
          {
            :key   => 'project',
            :value => @options[:project],
          },
          {
            :key   => 'created_by',
            :value => @options[:created_by],
          },
        ]

        host[:host_tags].each do |name, val|
          tags << { :key => name.to_s, :value => val }
        end

        client.create_tags(
          :resources => [instance.instance_id],
          :tags      => tags.reject { |r| r[:value].nil? },
        )
      end

      nil
    end
258448
def get_all_tags(self):
        
        db = Database(path=self.path)
        return [t for t in db.get_all_tags()]
540723
def tags(self):
        ''
        if self._tags is None:
            config = global_config('dossier.tags')
            self._tags = self.create(Tags, config=config)
        return self._tags
742343
def local_bind_hosts(self):
        
        self._check_is_started()
        return [_server.local_host for _server in self._server_list if
                _server.local_host is not None]
571197
def list_tags(self, pattern=None):
        
        request_url = "{}tags".format(self.create_basic_url())

        params = None
        if pattern:
            params = {'pattern': pattern}

        return_value = self._call_api(request_url, params=params)
        return return_value['tags']
868776
def list_tags(context, id):
    

    result = job.list_tags(context, id)
    utils.format_output(result, context.format)
1216302
def getAllPlatformNamesByTag (mode = None):
    
    tags = {}

    allPlatformsList = getAllPlatformObjects(mode)

    # Iterating the list of platforms to collect the tags
    for plat in allPlatformsList:
        # Grabbing the tags and providing them
        for t in plat.tags:
            if t not in tags.keys():
                tags[t] = [str(plat)]
            else:
                tags[t].append(str(plat))

    return tags
897267
def all_tags(self):
        """"""
        tags = set()
        for post in self:
            tags.update(post.tags)
        return list(tags)
1237872
def list_tags(self, pattern: str = None) -> typing.List[str]:
        
        tags: typing.List[str] = [str(tag) for tag in self.repo.tags]
        if not pattern:
            LOGGER.debug('tags found in repo: %s', tags)
            return tags

        LOGGER.debug('filtering tags with pattern: %s', pattern)
        filtered_tags: typing.List[str] = [tag for tag in tags if pattern in tag]
        LOGGER.debug('filtered tags: %s', filtered_tags)
        return filtered_tags
358475
def get_external_host_tags(self):
        
        self.log.debug("Sending external_host_tags now")
        external_host_tags = []
        for instance in self.instances:
            i_key = self._instance_key(instance)
            if not self.mor_cache.contains(i_key):
                self.log.warning("Unable to extract host tags for vSphere instance: {}".format(i_key))
                continue

            for _, mor in self.mor_cache.mors(i_key):
                # Note: some mors have a None hostname
                hostname = mor.get('hostname')
                if hostname:
                    external_host_tags.append((hostname, {SOURCE_TYPE: mor.get('tags')}))

        return external_host_tags
1356951
def tags(self, *names):
        
        if len(names) == 1 and isinstance(names[0], list):
            names = names[0]

        return TaggedCache(self, TagSet(self, names))
725909
def _get_current_tags(name, runas=None):
    '''
    
    '''
    try:
        return list(__salt__['rabbitmq.list_users'](runas=runas)[name])
    except CommandExecutionError as err:
        log.error('Error: %s', err)
        return []