Checkout the ext_pillar sources and compile the resulting pillar SLS
333129
def ext_pillar(minion_id, pillar, *repos):  # pylint: disable=unused-argument
    '''
    
    '''
    opts = copy.deepcopy(__opts__)
    opts['pillar_roots'] = {}
    opts['__git_pillar'] = True
    git_pillar = salt.utils.gitfs.GitPillar(
        opts,
        repos,
        per_remote_overrides=PER_REMOTE_OVERRIDES,
        per_remote_only=PER_REMOTE_ONLY,
        global_only=GLOBAL_ONLY)
    if __opts__.get('__role') == 'minion':
        # If masterless, fetch the remotes. We'll need to remove this once
        # we make the minion daemon able to run standalone.
        git_pillar.fetch_remotes()
    git_pillar.checkout()
    ret = {}
    merge_strategy = __opts__.get(
        'pillar_source_merging_strategy',
        'smart'
    )
    merge_lists = __opts__.get(
        'pillar_merge_lists',
        False
    )
    for pillar_dir, env in six.iteritems(git_pillar.pillar_dirs):
        # Map env if env == '__env__' before checking the env value
        if env == '__env__':
            env = opts.get('pillarenv') \
                or opts.get('saltenv') \
                or opts.get('git_pillar_base')
            log.debug('__env__ maps to %s', env)

        # If pillarenv is set, only grab pillars with that match pillarenv
        if opts['pillarenv'] and env != opts['pillarenv']:
            log.debug(
                'env \'%s\' for pillar dir \'%s\' does not match '
                'pillarenv \'%s\', skipping',
                env, pillar_dir, opts['pillarenv']
            )
            continue
        if pillar_dir in git_pillar.pillar_linked_dirs:
            log.debug(
                'git_pillar is skipping processing on %s as it is a '
                'mounted repo', pillar_dir
            )
            continue
        else:
            log.debug(
                'git_pillar is processing pillar SLS from %s for pillar '
                'env \'%s\'', pillar_dir, env
            )

        pillar_roots = [pillar_dir]

        if __opts__['git_pillar_includes']:
            # Add the rest of the pillar_dirs in this environment to the
            # list, excluding the current pillar_dir being processed. This
            # is because it was already specified above as the first in the
            # list, so that its top file is sourced from the correct
            # location and not from another git_pillar remote.
            pillar_roots.extend(
                [d for (d, e) in six.iteritems(git_pillar.pillar_dirs)
                 if env == e and d != pillar_dir]
            )

        opts['pillar_roots'] = {env: pillar_roots}

        local_pillar = Pillar(opts, __grains__, minion_id, env)
        ret = salt.utils.dictupdate.merge(
            ret,
            local_pillar.compile_pillar(ext=False),
            strategy=merge_strategy,
            merge_lists=merge_lists
        )
    return ret
746917
def ext_pillar(minion_id, pillar, **kwargs):
    '''
    
    '''

    # If reclass is installed, __virtual__ put it onto the search path, so we
    # don't need to protect against ImportError:
    # pylint: disable=3rd-party-module-not-gated
    from reclass.adapters.salt import ext_pillar as reclass_ext_pillar
    from reclass.errors import ReclassException
    # pylint: enable=3rd-party-module-not-gated

    try:
        # the source path we used above isn't something reclass needs to care
        # about, so filter it:
        filter_out_source_path_option(kwargs)

        # if no inventory_base_uri was specified, initialize it to the first
        # file_roots of class 'base' (if that exists):
        set_inventory_base_uri_default(__opts__, kwargs)

        # I purposely do not pass any of __opts__ or __salt__ or __grains__
        # to reclass, as I consider those to be Salt-internal and reclass
        # should not make any assumptions about it.
        return reclass_ext_pillar(minion_id, pillar, **kwargs)

    except TypeError as e:
        if 'unexpected keyword argument' in six.text_type(e):
            arg = six.text_type(e).split()[-1]
            raise SaltInvocationError('ext_pillar.reclass: unexpected option: '
                                      + arg)
        else:
            raise

    except KeyError as e:
        if 'id' in six.text_type(e):
            raise SaltInvocationError('ext_pillar.reclass: __opts__ does not '
                                      'define minion ID')
        else:
            raise

    except ReclassException as e:
        raise SaltInvocationError('ext_pillar.reclass: {0}'.format(e))
1044918
def ext_pillar(minion_id,
               pillar,  # pylint: disable=W0613
               bucket,
               key=None,
               keyid=None,
               verify_ssl=True,
               location=None,
               multiple_env=False,
               environment='base',
               prefix='',
               service_url=None,
               kms_keyid=None,
               s3_cache_expire=30,  # cache for 30 seconds
               s3_sync_on_update=True,  # sync cache on update rather than jit
               path_style=False,
               https_enable=True):

    '''
    
    '''

    s3_creds = S3Credentials(key, keyid, bucket, service_url, verify_ssl,
                             kms_keyid, location, path_style, https_enable)

    # normpath is needed to remove appended '/' if root is empty string.
    pillar_dir = os.path.normpath(os.path.join(_get_cache_dir(), environment,
                                               bucket))
    if prefix:
        pillar_dir = os.path.normpath(os.path.join(pillar_dir, prefix))

    if __opts__['pillar_roots'].get(environment, []) == [pillar_dir]:
        return {}

    metadata = _init(s3_creds, bucket, multiple_env, environment, prefix, s3_cache_expire)

    if s3_sync_on_update:
        # sync the buckets to the local cache
        log.info('Syncing local pillar cache from S3...')
        for saltenv, env_meta in six.iteritems(metadata):
            for bucket, files in six.iteritems(_find_files(env_meta)):
                for file_path in files:
                    cached_file_path = _get_cached_file_name(bucket, saltenv,
                                                             file_path)
                    log.info('%s - %s : %s', bucket, saltenv, file_path)
                    # load the file from S3 if not in the cache or too old
                    _get_file_from_s3(s3_creds, metadata, saltenv, bucket,
                                      file_path, cached_file_path)

        log.info('Sync local pillar cache from S3 completed.')

    opts = deepcopy(__opts__)
    opts['pillar_roots'][environment] = [os.path.join(pillar_dir, environment)] if multiple_env else [pillar_dir]

    # Avoid recursively re-adding this same pillar
    opts['ext_pillar'] = [x for x in opts['ext_pillar'] if 's3' not in x]

    pil = Pillar(opts, __grains__, minion_id, environment)

    compiled_pillar = pil.compile_pillar(ext=False)

    return compiled_pillar
1213285
def compile(source, options = {})
      source  = prepare_source(source)
      options = prepare_options(options)
      command = ["node", "--eval"]
      command.push compilation_snippet \
        method:    "compile#{ "Client" if options[:client] }",
        arguments: [source, options],
        locals:    options.fetch(:locals, {}),
        options:   options
      stdout, stderr, exit_status = Open3.capture3(*command)
      raise engine::CompilationError, stderr unless exit_status.success?
      process_result(source, stdout, options)
    end
720997
def _ext_pillar(minion_id,
                root_dir,
                follow_dir_links,
                debug,
                keep_newline,
                render_default,
                renderer_blacklist,
                renderer_whitelist,
                template):
    '''
    
    '''
    log.debug('file_tree: reading %s', root_dir)

    if not os.path.isdir(root_dir):
        log.error(
            'file_tree: root_dir %s does not exist or is not a directory',
            root_dir
        )
        return {}

    if not isinstance(keep_newline, (bool, list)):
        log.error(
            'file_tree: keep_newline must be either True/False or a list '
            'of file globs. Skipping this ext_pillar for root_dir %s',
            root_dir
        )
        return {}

    ngroup_pillar = {}
    nodegroups_dir = os.path.join(root_dir, 'nodegroups')
    if os.path.exists(nodegroups_dir) and __opts__.get('nodegroups'):
        master_ngroups = __opts__['nodegroups']
        ext_pillar_dirs = os.listdir(nodegroups_dir)
        if ext_pillar_dirs:
            for nodegroup in ext_pillar_dirs:
                if (os.path.isdir(nodegroups_dir) and
                        nodegroup in master_ngroups):
                    ckminions = salt.utils.minions.CkMinions(__opts__)
                    _res = ckminions.check_minions(
                        master_ngroups[nodegroup],
                        'compound')
                    match = _res['minions']
                    if minion_id in match:
                        ngroup_dir = os.path.join(
                            nodegroups_dir, six.text_type(nodegroup))
                        ngroup_pillar = salt.utils.dictupdate.merge(ngroup_pillar,
                            _construct_pillar(ngroup_dir,
                                              follow_dir_links,
                                              keep_newline,
                                              render_default,
                                              renderer_blacklist,
                                              renderer_whitelist,
                                              template),
                            strategy='recurse'
                        )
        else:
            if debug is True:
                log.debug(
                    'file_tree: no nodegroups found in file tree directory %s, skipping...',
                    ext_pillar_dirs
                )
    else:
        if debug is True:
            log.debug('file_tree: no nodegroups found in master configuration')

    host_dir = os.path.join(root_dir, 'hosts', minion_id)
    if not os.path.exists(host_dir):
        if debug is True:
            log.debug(
                'file_tree: no pillar data for minion %s found in file tree directory %s',
                minion_id,
                host_dir
            )
        return ngroup_pillar

    if not os.path.isdir(host_dir):
        log.error('file_tree: %s exists, but is not a directory', host_dir)
        return ngroup_pillar

    host_pillar = _construct_pillar(host_dir,
                                    follow_dir_links,
                                    keep_newline,
                                    render_default,
                                    renderer_blacklist,
                                    renderer_whitelist,
                                    template)
    return salt.utils.dictupdate.merge(ngroup_pillar,
                                       host_pillar,
                                       strategy='recurse')
52971
def make_sources(task_name, extensions)
      result = extensions.map { |ext|
        case ext
        when /%/
          task_name.pathmap(ext)
        when %r{/}
          ext
        when /^\./
          task_name.ext(ext)
        when String
          ext
        when Proc
          if ext.arity == 1
            ext.call(task_name)
          else
            ext.call
          end
        else
          fail "Don't know how to handle rule dependent: #{ext.inspect}"
        end
      }
      result.flatten
    end
1316189
def compile_assets(self):
        
        try:
            # Move into client dir
            curdir = os.path.abspath(os.curdir)
            client_path = os.path.join(os.path.dirname(__file__), 'longclaw', 'client')
            os.chdir(client_path)
            subprocess.check_call(['npm', 'install'])
            subprocess.check_call(['npm', 'run', 'build'])
            os.chdir(curdir)
        except (OSError, subprocess.CalledProcessError) as err:
            print('Error compiling assets:  {}'.format(err))
            raise SystemExit(1)
34998
def sls(mods, saltenv='base', test=None, exclude=None, **kwargs):
    '''
    
    '''
    st_kwargs = __salt__.kwargs
    __opts__['grains'] = __grains__
    __pillar__.update(kwargs.get('pillar', {}))
    opts = salt.utils.state.get_sls_opts(__opts__, **kwargs)
    st_ = salt.client.ssh.state.SSHHighState(
            opts,
            __pillar__,
            __salt__,
            __context__['fileclient'])
    st_.push_active()
    mods = _parse_mods(mods)
    high_data, errors = st_.render_highstate({saltenv: mods})
    if exclude:
        if isinstance(exclude, six.string_types):
            exclude = exclude.split(',')
        if '__exclude__' in high_data:
            high_data['__exclude__'].extend(exclude)
        else:
            high_data['__exclude__'] = exclude
    high_data, ext_errors = st_.state.reconcile_extend(high_data)
    errors += ext_errors
    errors += st_.state.verify_high(high_data)
    if errors:
        return errors
    high_data, req_in_errors = st_.state.requisite_in(high_data)
    errors += req_in_errors
    high_data = st_.state.apply_exclude(high_data)
    # Verify that the high data is structurally sound
    if errors:
        return errors
    # Compile and verify the raw chunks
    chunks = st_.state.compile_high_data(high_data)
    file_refs = salt.client.ssh.state.lowstate_file_refs(
            chunks,
            _merge_extra_filerefs(
                kwargs.get('extra_filerefs', ''),
                opts.get('extra_filerefs', '')
                )
            )

    roster = salt.roster.Roster(opts, opts.get('roster', 'flat'))
    roster_grains = roster.opts['grains']

    # Create the tar containing the state pkg and relevant files.
    _cleanup_slsmod_low_data(chunks)
    trans_tar = salt.client.ssh.state.prep_trans_tar(
            __context__['fileclient'],
            chunks,
            file_refs,
            __pillar__,
            st_kwargs['id_'],
            roster_grains)
    trans_tar_sum = salt.utils.hashutils.get_hash(trans_tar, opts['hash_type'])
    cmd = 'state.pkg {0}/salt_state.tgz test={1} pkg_sum={2} hash_type={3}'.format(
            opts['thin_dir'],
            test,
            trans_tar_sum,
            opts['hash_type'])
    single = salt.client.ssh.Single(
            opts,
            cmd,
            fsclient=__context__['fileclient'],
            minion_opts=__salt__.minion_opts,
            **st_kwargs)
    single.shell.send(
            trans_tar,
            '{0}/salt_state.tgz'.format(opts['thin_dir']))
    stdout, stderr, _ = single.cmd_block()

    # Clean up our tar
    try:
        os.remove(trans_tar)
    except (OSError, IOError):
        pass

    # Read in the JSON data and return the data structure
    try:
        return salt.utils.json.loads(stdout)
    except Exception as e:
        log.error("JSON Render failed for: %s\n%s", stdout, stderr)
        log.error(six.text_type(e))

    # If for some reason the json load fails, return the stdout
    return stdout
1193759
function(sType, aArgs, oSelf) {
        var source = aArgs[0];
        
        // Add source to the internal array of filters
        oSelf._sourceFilters.push(source);

        if(oSelf._elFt) {
            oSelf._createSourceCheckbox(source);
        }
    }
1268658
def compile_pillar(self):
        '''
        
        '''
        load = {'id': self.minion_id,
                'grains': self.grains,
                'saltenv': self.opts['saltenv'],
                'pillarenv': self.opts['pillarenv'],
                'pillar_override': self.pillar_override,
                'extra_minion_data': self.extra_minion_data,
                'ver': '2',
                'cmd': '_pillar'}
        if self.ext:
            load['ext'] = self.ext
        try:
            ret_pillar = yield self.channel.crypted_transfer_decode_dictentry(
                load,
                dictkey='pillar',
            )
        except Exception:
            log.exception('Exception getting pillar:')
            raise SaltClientError('Exception getting pillar.')

        if not isinstance(ret_pillar, dict):
            msg = ('Got a bad pillar from master, type {0}, expecting dict: '
                   '{1}').format(type(ret_pillar).__name__, ret_pillar)
            log.error(msg)
            # raise an exception! Pillar isn't empty, we can't sync it!
            raise SaltClientError(msg)
        raise tornado.gen.Return(ret_pillar)
1359711
function compileSass(path, ext, file, callback) {
  let compiledCss = sass.renderSync({
    file: path,
    outputStyle: 'compressed',
  });
  callback(null, compiledCss.css);
}
907293
function lookForExternalDependenciesJS( _def, javascriptSources ) {
  if ( !_def ) return;
  try {
    const def = convertExternalDependencyDefinition( _def );
    Object.keys( def ).forEach( function ( js ) {
      const
      filename = `mod/${js}`,
      src = new Source( Project, filename ),
      code = src.read();
      pushUnique( javascriptSources, code );
    } );
  } catch ( ex ) {
    Fatal.fire(
      `Unable to parse JS dependencies: ${JSON.stringify(_def)}!\n${ex}`,
      javascriptSources
    );
  }
}
914961
def get_async_pillar(opts, grains, minion_id, saltenv=None, ext=None, funcs=None,
                     pillar_override=None, pillarenv=None,
                     extra_minion_data=None):
    '''
    
    '''
    file_client = opts['file_client']
    if opts.get('master_type') == 'disable' and file_client == 'remote':
        file_client = 'local'
    ptype = {
        'remote': AsyncRemotePillar,
        'local': AsyncPillar,
    }.get(file_client, AsyncPillar)
    return ptype(opts, grains, minion_id, saltenv, ext, functions=funcs,
                 pillar_override=pillar_override, pillarenv=pillarenv,
                 extra_minion_data=extra_minion_data)
927988
def compile_dependencies(self, sourcepath, include_self=True):
        
        return super(SassProjectEventHandler, self).compile_dependencies(
            sourcepath,
            include_self=include_self
        )
902184
def generate(env):
    """"""
    SCons.Tool.createSharedLibBuilder(env)
    SCons.Tool.createProgBuilder(env)

    env['SUBST_CMD_FILE'] = LinklocGenerator
    env['SHLINK']      = '$LINK'
    env['SHLINKFLAGS'] = SCons.Util.CLVar('$LINKFLAGS')
    env['SHLINKCOM']   = '${SUBST_CMD_FILE("$SHLINK $SHLINKFLAGS $_LIBDIRFLAGS $_LIBFLAGS -dll $TARGET $SOURCES")}'
    env['SHLIBEMITTER']= None
    env['LDMODULEEMITTER']= None
    env['LINK']        = "linkloc"
    env['LINKFLAGS']   = SCons.Util.CLVar('')
    env['LINKCOM']     = '${SUBST_CMD_FILE("$LINK $LINKFLAGS $_LIBDIRFLAGS $_LIBFLAGS -exe $TARGET $SOURCES")}'
    env['LIBDIRPREFIX']='-libpath '
    env['LIBDIRSUFFIX']=''
    env['LIBLINKPREFIX']='-lib '
    env['LIBLINKSUFFIX']='$LIBSUFFIX'

    # Set-up ms tools paths for default version
    merge_default_version(env)

    addPharLapPaths(env)
326374
def build_ext(self):
        """"""
        try:
            from setuptools.command.build_ext import build_ext
        except ImportError:
            from distutils.command.build_ext import build_ext

        buildcfg = self
        class custom_build_ext(build_ext):
            def run(self):
                # Print a warning if pkg-config is not available or does not know about igraph
                if buildcfg.use_pkgconfig:
                    detected = buildcfg.detect_from_pkgconfig()
                else:
                    detected = False

                # Check whether we have already compiled igraph in a previous run.
                # If so, it should be found in igraphcore/include and
                # igraphcore/lib
                if os.path.exists("igraphcore"):
                    buildcfg.use_built_igraph()
                    detected = True

                # Download and compile igraph if the user did not disable it and
                # we do not know the libraries from pkg-config yet
                if not detected:
                    if buildcfg.download_igraph_if_needed and is_unix_like():
                        detected = buildcfg.download_and_compile_igraph()
                        if detected:
                            buildcfg.use_built_igraph()

                # Fall back to an educated guess if everything else failed
                if not detected:
                    buildcfg.use_educated_guess()

                # Replaces library names with full paths to static libraries
                # where possible
                if buildcfg.static_extension:
                    buildcfg.replace_static_libraries(exclusions=["m"])

                # Prints basic build information
                buildcfg.print_build_info()

                ext = first(extension for extension in self.extensions
                        if extension.name == "louvain._c_louvain")
                buildcfg.configure(ext)

                # Run the original build_ext command
                build_ext.run(self)

        return custom_build_ext
522752
def ext_pillar(minion_id,
               pillar,  # pylint: disable=W0613
               **kwargs):
    '''
    
    '''
    vmware_pillar = {}
    host = None
    username = None
    password = None
    property_types = []
    property_name = 'name'
    protocol = None
    port = None
    pillar_key = 'vmware'
    replace_default_attributes = False
    type_specific_pillar_attributes = {
        'VirtualMachine': [
            {
                'config':
                    [
                        'version',
                        'guestId',
                        'files',
                        'tools',
                        'flags',
                        'memoryHotAddEnabled',
                        'cpuHotAddEnabled',
                        'cpuHotRemoveEnabled',
                        'datastoreUrl',
                        'swapPlacement',
                        'bootOptions',
                        'scheduledHardwareUpgradeInfo',
                        'memoryAllocation',
                        'cpuAllocation',
                    ]
            },
            {
                'summary':
                    [
                        {
                            'runtime':
                                [
                                    {
                                        'host':
                                        [
                                            'name',
                                            {'parent': 'name'},
                                        ]
                                    },
                                    'bootTime',
                                ]
                        },
                        {
                            'guest':
                                [
                                    'toolsStatus',
                                    'toolsVersionStatus',
                                    'toolsVersionStatus2',
                                    'toolsRunningStatus',
                                ]
                        },
                        {
                            'config':
                                [
                                    'cpuReservation',
                                    'memoryReservation',
                                ]
                        },
                        {
                            'storage':
                                [
                                    'committed',
                                    'uncommitted',
                                    'unshared',
                                ]
                        },
                        {'dasVmProtection': ['dasProtected']},
                    ]
            },
            {
                'storage':
                    [
                        {
                            'perDatastoreUsage':
                                [
                                    {
                                        'datastore': 'name'
                                    },
                                    'committed',
                                    'uncommitted',
                                    'unshared',
                                ]
                        }
                    ]
            },
        ],
        'HostSystem': [
            {
                'datastore':
                    [
                        'name',
                        'overallStatus',
                        {
                            'summary':
                                [
                                    'url',
                                    'freeSpace',
                                    'maxFileSize',
                                    'maxVirtualDiskCapacity',
                                    'maxPhysicalRDMFileSize',
                                    'maxVirtualRDMFileSize',
                                    {
                                        'vmfs':
                                            [
                                                'capacity',
                                                'blockSizeMb',
                                                'maxBlocks',
                                                'majorVersion',
                                                'version',
                                                'uuid',
                                                {
                                                    'extent':
                                                        [
                                                            'diskName',
                                                            'partition',
                                                        ]
                                                },
                                                'vmfsUpgradeable',
                                                'ssd',
                                                'local',
                                            ],
                                    },
                                ],
                        },
                        {'vm': 'name'}
                    ]
            },
            {
                'vm':
                    [
                        'name',
                        'overallStatus',
                        {
                            'summary':
                                [
                                    {'runtime': 'powerState'},
                                ]
                        },
                    ]
            },
        ]
    }
    pillar_attributes = [
        {
            'summary':
                [
                    'overallStatus'
                ]
        },
        {
            'network':
                [
                    'name',
                    {'config': {'distributedVirtualSwitch': 'name'}},
                ]
        },
        {
            'datastore':
                [
                    'name',
                ]
        },
        {
            'parent':
                [
                    'name'
                ]
        },
    ]

    if 'pillar_key' in kwargs:
        pillar_key = kwargs['pillar_key']
    vmware_pillar[pillar_key] = {}

    if 'host' not in kwargs:
        log.error('VMWare external pillar configured but host is not specified in ext_pillar configuration.')
        return vmware_pillar
    else:
        host = kwargs['host']
        log.debug('vmware_pillar -- host = %s', host)

    if 'username' not in kwargs:
        log.error('VMWare external pillar requested but username is not specified in ext_pillar configuration.')
        return vmware_pillar
    else:
        username = kwargs['username']
        log.debug('vmware_pillar -- username = %s', username)

    if 'password' not in kwargs:
        log.error('VMWare external pillar requested but password is not specified in ext_pillar configuration.')
        return vmware_pillar
    else:
        password = kwargs['password']
        log.debug('vmware_pillar -- password = %s', password)

    if 'replace_default_attributes' in kwargs:
        replace_default_attributes = kwargs['replace_default_attributes']
        if replace_default_attributes:
            pillar_attributes = []
            type_specific_pillar_attributes = {}

    if 'property_types' in kwargs:
        for prop_type in kwargs['property_types']:
            if isinstance(prop_type, dict):
                property_types.append(getattr(vim, prop_type.keys()[0]))
                if isinstance(prop_type[prop_type.keys()[0]], list):
                    pillar_attributes = pillar_attributes + prop_type[prop_type.keys()[0]]
                else:
                    log.warning('A property_type dict was specified, but its value is not a list')
            else:
                property_types.append(getattr(vim, prop_type))
    else:
        property_types = [vim.VirtualMachine]
    log.debug('vmware_pillar -- property_types = %s', property_types)

    if 'property_name' in kwargs:
        property_name = kwargs['property_name']
    else:
        property_name = 'name'
    log.debug('vmware_pillar -- property_name = %s', property_name)

    if 'protocol' in kwargs:
        protocol = kwargs['protocol']
        log.debug('vmware_pillar -- protocol = %s', protocol)

    if 'port' in kwargs:
        port = kwargs['port']
        log.debug('vmware_pillar -- port = %s', port)

    virtualgrain = None
    osgrain = None
    if 'virtual' in __grains__:
        virtualgrain = __grains__['virtual'].lower()
    if 'os' in __grains__:
        osgrain = __grains__['os'].lower()

    if virtualgrain == 'vmware' or osgrain == 'vmware esxi' or osgrain == 'esxi':
        vmware_pillar[pillar_key] = {}
        try:
            _conn = salt.utils.vmware.get_service_instance(host,
                                                           username,
                                                           password,
                                                           protocol,
                                                           port)
            if _conn:
                data = None
                for prop_type in property_types:
                    data = salt.utils.vmware.get_mor_by_property(_conn,
                                                                 prop_type,
                                                                 minion_id,
                                                                 property_name=property_name)
                    if data:
                        type_name = type(data).__name__.replace('vim.', '')
                        if hasattr(data, 'availableField'):
                            vmware_pillar[pillar_key]['annotations'] = {}
                            for availableField in data.availableField:
                                for customValue in data.customValue:
                                    if availableField.key == customValue.key:
                                        vmware_pillar[pillar_key]['annotations'][availableField.name] = customValue.value
                        type_specific_pillar_attribute = []
                        if type_name in type_specific_pillar_attributes:
                            type_specific_pillar_attribute = type_specific_pillar_attributes[type_name]
                        vmware_pillar[pillar_key] = dictupdate.update(vmware_pillar[pillar_key],
                                                                      _crawl_attribute(data,
                                                                      pillar_attributes +
                                                                      type_specific_pillar_attribute))
                        break
                # explicitly disconnect from vCenter when we are done, connections linger idle otherwise
                Disconnect(_conn)
            else:
                log.error(
                    'Unable to obtain a connection with %s, please verify '
                    'your vmware ext_pillar configuration', host
                )
        except RuntimeError:
            log.error(('A runtime error occurred in the vmware_pillar, '
                       'this is likely caused by an infinite recursion in '
                       'a requested attribute.  Verify your requested attributes '
                       'and reconfigure the pillar.'))

        return vmware_pillar
    else:
        return {}