stuck again...getvalues from datacontainer acting weird

Xander Cage <[email protected]>
Newsgroups gmane.comp.sysutils.cfengine.general
Message-ID <[email protected]>
hey,

again battling with basic things...

bundle agent parent_manage_aixtoolbox
{

  vars:

      "DEBUG_data_file" string => 
"$(sys.inputdir)/itsv/data/rpmpackages.csv";
      "DEBUG_my_data" data => classfiltercsv($(DEBUG_data_file), "true", 0);

      "DEBUG_pkg" slist => getvalues("DEBUG_my_data[package]");


  classes:

    "prednf";

  reports:

      "Found container values: $(DEBUG_pkg)";


}

root@aixtest01: /root/cfe_testbed # /var/cfengine/bin/cf-agent -KIv -f 
./new_rpm_mgmt.cf --show-evaluated-vars=DEBUG.*
Variable name                            Variable 
value                                               Meta tags
default:parent_manage_aixtoolbox.DEBUG_data_file 
/var/cfengine/inputs/itsv/data/rpmpackages.csv               source=promise
default:parent_manage_aixtoolbox.DEBUG_my_data 
[{"package":"bash-5.0.18-1"},{"package":"bzip2-1.0.8-2"},{"package":"ca-certificates-2020.06.01-1"},{"package":"cfengine-3.15.4-itsv"},{"package":"cpio-2.13-1"},{"package":"coreutils-8.32-1"},{"package":"curl-7.76.1-1"},{"package":"cyrus-sasl-2.1.26-3"},{"package":"db-5.3.28-1"},{"package":"expat-2.2.9-2"},{"package":"file-5.38-1"},{"package":"gawk-5.0.1-1"},{"package":"gdbm-1.18.1-1"},{"package":"gettext-0.20.2-1"},{"package":"git-2.20.4-1"},{"package":"gzip-1.10-1"},{"package":"info-6.6-2"},{"package":"jansson-2.13.1-1"},{"package":"krb5-libs-1.18.3-1"},{"package":"less-557-1"},{"package":"libiconv-1.16-1"},{"package":"libnghttp2-1.41.0-1"},{"package":"libssh2-1.9.0-1"},{"package":"libxml2-2.9.10-1"},{"package":"lua-5.3.4-2"},{"package":"lzo-2.10-2"},{"package":"make-4.2.1-5"},{"package":"ncurses-6.2-2"},{"package":"openldap-2.4.58-1"},{"package":"pcre-8.44-1"},{"package":"perl-5.30.3-1"},{"package":"pkg-config-0.29.2-2"},{"package":"pysqlite-2.8.3-2"},{"package":"python-2.7.18-1"},{"package":"python-devel-2.7.18-1"},{"package":"python-iniparse-0.4-1"},{"package":"python-pycurl-7.43.0-1"},{"package":"python-tools-2.7.18-1"},{"package":"python-urlgrabber-3.10.1-1"},{"package":"python3-3.7.9-1"},{"package":"python3-devel-3.7.9-1"},{"package":"python3-docs-3.7.9-1"},{"package":"python3-test-3.7.9-1"},{"package":"python3-tools-3.7.9-1"},{"package":"readline-8.0-2"},{"package":"rlwrap-0.43-2"},{"package":"rsync-3.2.3-1"},{"package":"screen-4.7.0-1"},{"package":"sed-4.8-1"},{"package":"sqlite-3.32.3-1"},{"package":"tar-1.32-1"},{"package":"unzip-6.0-3"},{"package":"vim-common-8.1.2424-1"},{"package":"vim-enhanced-8.1.2424-1"},{"package":"wget-1.20.3-1"},{"package":"xz-5.2.5-1"},{"package":"xz-libs-5.2.5-1"},{"package":"yum-3.4.3-8"},{"package":"yum-metadata-parser-1.1.4-2"},{"package":"zip-3.0-4"},{"package":"zlib-1.2.11-2"},{"package":"zlib-devel-1.2.11-2"}] 
source=promise
default:parent_manage_aixtoolbox.DEBUG_pkg                                                              
source=promise

nothing in default:parent_manage_aixtoolbox.DEBUG_pkg ... why is this not 
working..

verbose also not very helpfull...

verbose:  Begin policy/promise evaluation
 verbose: ----------------------------------------------------------------
 verbose: Using bundlesequence =>  {"main"}
 verbose: B: 
*****************************************************************
 verbose: B: BEGIN bundle main
 verbose: B: 
*****************************************************************
 verbose: P: .........................................................
 verbose: P: BEGIN promise 'promise_new_rpm_mgmt_cf_94' of type "methods" 
(pass 1)
 verbose: P:    Promiser/affected object: 'parent_manage_aixtoolbox'
 verbose: P:    Part of bundle: main
 verbose: P:    Base context class: any
 verbose: P:    Stack path: 
/default/main/methods/'parent_manage_aixtoolbox'[1]
 verbose: B: 
*****************************************************************
 verbose: B: BEGIN bundle parent_manage_aixtoolbox
 verbose: B: 
*****************************************************************
 verbose: getvalues: argument 
'default:parent_manage_aixtoolbox.DEBUG_my_data[package]' does not resolve 
to a container or a list or a CFEngine array
 verbose: V: .........................................................
 verbose: V: BEGIN variables (pass 1)
 verbose: V:     Computing value of 'DEBUG_data_file'
 verbose: V:     Computing value of 'DEBUG_my_data'
 verbose: getvalues: argument 
'default:parent_manage_aixtoolbox.DEBUG_my_data[package]' does not resolve 
to a container or a list or a CFEngine array
 verbose: V:     Computing value of 'DEBUG_pkg'
 verbose: C: .........................................................
 verbose: C: BEGIN classes / conditions (pass 1)
 verbose: C:     +  Private class: prednf
 verbose: getvalues: argument 
'default:parent_manage_aixtoolbox.DEBUG_my_data[package]' does not resolve 
to a container or a list or a CFEngine array
 verbose: Skipping iteration since variable 'DEBUG_pkg' resolves to an 
empty list
 verbose: V: .........................................................
 verbose: V: BEGIN variables (pass 2)
 verbose: V:     Computing value of 'DEBUG_data_file'
 verbose: V:     Computing value of 'DEBUG_my_data'
 verbose: getvalues: argument 
'default:parent_manage_aixtoolbox.DEBUG_my_data[package]' does not resolve 
to a container or a list or a CFEngine array
 verbose: V:     Computing value of 'DEBUG_pkg'
 verbose: C: .........................................................
 verbose: C: BEGIN classes / conditions (pass 2)
 verbose: getvalues: argument 
'default:parent_manage_aixtoolbox.DEBUG_my_data[package]' does not resolve 
to a container or a list or a CFEngine array
 verbose: Skipping iteration since variable 'DEBUG_pkg' resolves to an 
empty list
 verbose: V: .........................................................
 verbose: V: BEGIN variables (pass 3)
 verbose: V:     Computing value of 'DEBUG_data_file'
 verbose: V:     Computing value of 'DEBUG_my_data'
 verbose: getvalues: argument 
'default:parent_manage_aixtoolbox.DEBUG_my_data[package]' does not resolve 
to a container or a list or a CFEngine array
 verbose: V:     Computing value of 'DEBUG_pkg'
 verbose: C: .........................................................
 verbose: C: BEGIN classes / conditions (pass 3)
 verbose: getvalues: argument 
'default:parent_manage_aixtoolbox.DEBUG_my_data[package]' does not resolve 
to a container or a list or a CFEngine array
 verbose: Skipping iteration since variable 'DEBUG_pkg' resolves to an 
empty list
 verbose: A: ...................................................
 verbose: A: Bundle Accounting Summary for 'parent_manage_aixtoolbox' in 
namespace default
 verbose: A: Zero promises executed for bundle 'parent_manage_aixtoolbox'
 verbose: A: ...................................................
 verbose: Additional promise info: source path './new_rpm_mgmt.cf' at line 
94
 verbose: Method 'parent_manage_aixtoolbox' verified
 verbose: B: 
*****************************************************************
 verbose: B: END bundle parent_manage_aixtoolbox
 verbose: B: 
*****************************************************************
 verbose: A: Promise was KEPT
 verbose: P: END methods promise (parent_manage_aixtoolbox)
 verbose: A: ...................................................
 verbose: A: Bundle Accounting Summary for 'main' in namespace default
 verbose: A: Promises kept in 'main' = 1
 verbose: A: Promises not kept in 'main' = 0
 verbose: A: Promises repaired in 'main' = 0
 verbose: A: Aggregate compliance (promises kept/repaired) for bundle 
'main' = 100.0%
 verbose: A: ...................................................
 verbose: B: 
*****************************************************************
 verbose: B: END bundle main
 verbose: B: 
*****************************************************************
 verbose: Waiting for background processes
 verbose: No more background processes to wait for

wbr

chris

-- 
You received this message because you are subscribed to the Google Groups "help-cfengine" group.
To unsubscribe from this group and stop receiving emails from it, send an email to [email protected].
To view this discussion on the web visit https://groups.google.com/d/msgid/help-cfengine/434a2981-b92b-4a12-bbff-8d6bb4378fc9n%40googlegroups.com.
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.