summaryrefslogtreecommitdiffstats
Commit message (Collapse)AuthorAgeFilesLines
...
* utils_xml: nselem: allow to add children/text at onceJan Pokorný2014-10-211-2/+11
| | | | | | | Key is simple: instance of basestring will contribute on the associated text, other positional arguments are supposed the child nodes. Signed-off-by: Jan Pokorný <jpokorny@redhat.com>
* utils_xml: element_juggler: cope with root elementsJan Pokorný2014-10-211-2/+6
| | | | Signed-off-by: Jan Pokorný <jpokorny@redhat.com>
* filter: EDITOR env. var. has a precedence before defaultsJan Pokorný2014-10-211-2/+1
| | | | Signed-off-by: Jan Pokorný <jpokorny@redhat.com>
* filter: when running editor, make sure that stdin=/dev/ttyJan Pokorný2014-10-211-2/+4
| | | | | | | | ... as this is easily not true, e.g., when piping input (one of ~) directly, as children subprocess normally inherits the filedescriptor map. Signed-off-by: Jan Pokorný <jpokorny@redhat.com>
* run-check: pass provided switches down to clufter invocationJan Pokorný2014-10-211-3/+8
| | | | | | | | | | Based on only a very approximate decision, but should be OK, most of the time one want to add "-d" when running the script. Point of non-switch $1 is when using the script sourced or for similar experimental uses. Signed-off-by: Jan Pokorný <jpokorny@redhat.com>
* run-check: swap the diff inputs to get a desired outputJan Pokorný2014-10-211-2/+2
| | | | Signed-off-by: Jan Pokorný <jpokorny@redhat.com>
* commands/ccs2pcs: apparently at least one more pass neededJan Pokorný2014-10-217-11/+37
| | | | | | | | | | | | | | | So the progress for ccs-to-pcs (in isolation) currently is: - ccs2ccsflat - ccs-revitalize - ccsflat2pcsprelude - pcsprelude2pcscompact . TODO: service arrangement(?) - pcscompact2pcs . TODO: stonith-enabled=false if no fencing present and other finalizations Signed-off-by: Jan Pokorný <jpokorny@redhat.com>
* format (+utils): make format compatibility check more liberalJan Pokorný2014-10-212-5/+14
| | | | | | | ... so as to fix a regression introduced with more explicit format declarations in the filter "signatures". Signed-off-by: Jan Pokorný <jpokorny@redhat.com>
* ccs2pcs: big renaming (ccsflat2pcsprelude + pcsprelude2pcs)Jan Pokorný2014-10-2127-44/+50
| | | | | | | | | Also make distinguishing more restricted internal variants of the formats more explicit (ccsflat, pcsprelude) -- this is known to cause a little regression (format checking too strict to cope with this) and the fix for that is forthcoming. Signed-off-by: Jan Pokorný <jpokorny@redhat.com>
* filter: drop an import no longer in useJan Pokorný2014-10-211-1/+1
| | | | Signed-off-by: Jan Pokorný <jpokorny@redhat.com>
* utils_xml: drop an import no longer in useJan Pokorný2014-10-211-1/+0
| | | | Signed-off-by: Jan Pokorný <jpokorny@redhat.com>
* utils_xml: have the namespaces represented as symbols, tooJan Pokorný2014-10-213-14/+17
| | | | | | + propagate actually use these symbols Signed-off-by: Jan Pokorný <jpokorny@redhat.com>
* filters/ccsflat2pcs[script]: be verbose about using a hackJan Pokorný2014-10-211-3/+13
| | | | | | | | (first preserving/protecting the comment as such was needed) Also drop an unused import. Signed-off-by: Jan Pokorný <jpokorny@redhat.com>
* misc/ns-clufter: mark clufter:message as not in useJan Pokorný2014-10-211-1/+2
| | | | Signed-off-by: Jan Pokorný <jpokorny@redhat.com>
* misc/ns-clusfter: document clufter:comment (just added, internal)Jan Pokorný2014-10-211-1/+19
| | | | Signed-off-by: Jan Pokorný <jpokorny@redhat.com>
* filter (XSLT): make nested comments survive repeated "XSLT"Jan Pokorný2014-10-211-0/+25
| | | | | | | | | | | | | | | This is imporant is case of "<descent-mix> - <descent>" structural pattern, in which the original xsl:comment gets dissolved into <!-- comment --> with the first XSLT run, which then disappear completely upon subsequent runs. Now it is preserved up the last point possible -- gets translated upon postprocess that is (only) applied on the final product. Btw. we utilize the fact in DOM (at least as seen with lxml), text content of element node is handled the same in case of comment node, so there no more magic needed. Signed-off-by: Jan Pokorný <jpokorny@redhat.com>
* filters/ccsflat2pcs: encode services into valid, yet uncomplete CIBJan Pokorný2014-10-212-2/+124
| | | | | | | | | | | | IOW, there will have to be another pass that will use the data we have prepared by known, massage them, and finally (and hopefully) spit out the desired full-fledged cib, incl. reasonable constraints arrangement. Apparently, ./run-check doesn't work as of this commit, but it's worthless to edit it just to keep temporarily passing, as the final result is different anyway. Signed-off-by: Jan Pokorný <jpokorny@redhat.com>
* filters/ccsflat2pcs[cluster]: guard against string splitJan Pokorný2014-10-211-2/+2
| | | | Signed-off-by: Jan Pokorný <jpokorny@redhat.com>
* filters: ex-post sanitize "new command/cluster.conf analysis" commitJan Pokorný2014-10-213-49/+2
| | | | Signed-off-by: Jan Pokorný <jpokorny@redhat.com>
* filters: fix up {,cluster,net}fs arrangement incl. _fs.py fixesJan Pokorný2014-10-214-49/+86
| | | | Signed-off-by: Jan Pokorný <jpokorny@redhat.com>
* filters: start recognizing /cluster/rm/script of ccsJan Pokorný2014-10-211-0/+44
| | | | Signed-off-by: Jan Pokorný <jpokorny@redhat.com>
* tests: fix a chained typoJan Pokorný2014-10-212-3/+3
| | | | Signed-off-by: Jan Pokorný <jpokorny@redhat.com>
* Set pre-release versionJan Pokorný2014-10-211-1/+1
| | | | Signed-off-by: Jan Pokorný <jpokorny@redhat.com>
* Bump version to 0.1.4v0.1.4Jan Pokorný2014-10-081-1/+1
| | | | Signed-off-by: Jan Pokorný <jpokorny@redhat.com>
* commands/cluster_artefacts: new command/cluster.conf analysisJan Pokorný2014-10-0824-0/+392
| | | | Signed-off-by: Jan Pokorný <jpokorny@redhat.com>
* filter: XMLFilter: get it ready for text output as wellJan Pokorný2014-10-081-8/+22
| | | | Signed-off-by: Jan Pokorný <jpokorny@redhat.com>
* filter: XMLFilter: massage do_mix/inject identity logicJan Pokorný2014-10-081-6/+13
| | | | | | (don't ask much about the changes) Signed-off-by: Jan Pokorný <jpokorny@redhat.com>
* filter: cosmeticsJan Pokorný2014-10-081-4/+3
| | | | Signed-off-by: Jan Pokorný <jpokorny@redhat.com>
* filters/cluster: special-case for when importing directlyJan Pokorný2014-10-081-4/+7
| | | | | | (like when experimenting in combo with _go.py) Signed-off-by: Jan Pokorný <jpokorny@redhat.com>
* tests: fix an issue with passing dict instead of "opt" objJan Pokorný2014-10-082-1/+11
| | | | Signed-off-by: Jan Pokorný <jpokorny@redhat.com>
* filters/*: better, "additive" structure (imports , namespacing)Jan Pokorný2014-10-0813-4/+27
| | | | Signed-off-by: Jan Pokorný <jpokorny@redhat.com>
* filters/*: switch to using xslt_is_memberJan Pokorný2014-10-0811-93/+172
| | | | Signed-off-by: Jan Pokorný <jpokorny@redhat.com>
* utils_xslt: xslt_is_member encoding Python's "foo in list"Jan Pokorný2014-10-081-0/+7
| | | | Signed-off-by: Jan Pokorný <jpokorny@redhat.com>
* utils_xslt: dedicated to XSLT related helpersJan Pokorný2014-10-083-11/+21
| | | | | | Also move xslt_identity from utils_xml to utils_xslt. Signed-off-by: Jan Pokorný <jpokorny@redhat.com>
* filter: fix incorrect handling of system{,_extra} paramsJan Pokorný2014-10-081-2/+3
| | | | Signed-off-by: Jan Pokorný <jpokorny@redhat.com>
* command_context: make filter failback up to "root" contextJan Pokorný2014-10-081-1/+1
| | | | | | | | ...during item lookup. This is necessary so that 'system' and 'system_extra' do not require special treatment (copying to intermediate lookup level shared amongst filters). Signed-off-by: Jan Pokorný <jpokorny@redhat.com>
* utils_prog: TweakedDict: fix returning copy of non-dictJan Pokorný2014-10-081-1/+1
| | | | Signed-off-by: Jan Pokorný <jpokorny@redhat.com>
* filters/cluster: execfile needs __package__ in globalsJan Pokorný2014-10-081-1/+1
| | | | Signed-off-by: Jan Pokorný <jpokorny@redhat.com>
* filters/cluster: normalize XML/dir structureJan Pokorný2014-10-0810-6/+6
| | | | Signed-off-by: Jan Pokorný <jpokorny@redhat.com>
* filters/cluster: sanitize the importJan Pokorný2014-10-081-9/+4
| | | | Signed-off-by: Jan Pokorný <jpokorny@redhat.com>
* format: more sane usage of "uniquize" filename hashJan Pokorný2014-10-081-14/+26
| | | | | | | Salting the hash can be conditionally (via env variable) turned off, changing the hash algo ditto. Signed-off-by: Jan Pokorný <jpokorny@redhat.com>
* utils_prog: getenv_namespaced for accessing CLUFTER_X env varsJan Pokorný2014-10-081-0/+6
| | | | | | Actually, the namespace is derived from the package name directly. Signed-off-by: Jan Pokorný <jpokorny@redhat.com>
* utils_prog: extend comment for defer_common (confused myself)Jan Pokorný2014-10-081-1/+14
| | | | Signed-off-by: Jan Pokorný <jpokorny@redhat.com>
* format: make SimpleFormat referenceable in filtersJan Pokorný2014-10-081-1/+1
| | | | | | This is the same case as with XML built-format. Signed-off-by: Jan Pokorný <jpokorny@redhat.com>
* format: select external "hash" as the first quarter of originalJan Pokorný2014-10-081-2/+2
| | | | | | | Because of the nature of the hash algo, we would yield basically nothing with the previous "obscurity" anyway. Signed-off-by: Jan Pokorný <jpokorny@redhat.com>
* .gitignore: do not look at "dotfiles" anywhereJan Pokorný2014-10-081-1/+1
| | | | Signed-off-by: Jan Pokorný <jpokorny@redhat.com>
* run-check: symlink from the root of the tree (as usual)Jan Pokorný2014-10-081-0/+1
| | | | Signed-off-by: Jan Pokorný <jpokorny@redhat.com>
* main: state the substitution-in-the-file-spec feature in helpJan Pokorný2014-10-081-0/+2
| | | | Signed-off-by: Jan Pokorný <jpokorny@redhat.com>
* main: unify "technical reference" quote styleJan Pokorný2014-10-081-1/+1
| | | | Signed-off-by: Jan Pokorný <jpokorny@redhat.com>
* commands: make outputs partly reflect input(s) by defaultJan Pokorný2014-10-083-6/+7
| | | | | | | | Useful anytime one is lazy to redefine the defaults, but want to semi-unique output files for different inputs (e.g., when processing plenty of configs like when testing clufter's logic itself). Signed-off-by: Jan Pokorný <jpokorny@redhat.com>