summaryrefslogtreecommitdiffstats
path: root/src/lib
diff options
context:
space:
mode:
authorNarayan Desai <desai@mcs.anl.gov>2007-01-18 20:19:27 +0000
committerNarayan Desai <desai@mcs.anl.gov>2007-01-18 20:19:27 +0000
commit46a242872523b8946e2ac48129c32f410b92f15f (patch)
tree0a0be6837ae730052be1c1e8cb1fb58736bdeb61 /src/lib
parent22a72a07658b765492c0d7dee554c4869312ac25 (diff)
downloadbcfg2-46a242872523b8946e2ac48129c32f410b92f15f.tar.gz
bcfg2-46a242872523b8946e2ac48129c32f410b92f15f.tar.bz2
bcfg2-46a242872523b8946e2ac48129c32f410b92f15f.zip
Add configfile interactive diff support. (Resolves Ticket #279)
Remove query text from statistics upload git-svn-id: https://svn.mcs.anl.gov/repos/bcfg/trunk/bcfg2@2697 ce84e21b-d406-0410-9b95-82705330c041
Diffstat (limited to 'src/lib')
-rw-r--r--src/lib/Client/Frame.py4
-rw-r--r--src/lib/Client/Tools/POSIX.py4
2 files changed, 7 insertions, 1 deletions
diff --git a/src/lib/Client/Frame.py b/src/lib/Client/Frame.py
index 91e45d4b8..47813defb 100644
--- a/src/lib/Client/Frame.py
+++ b/src/lib/Client/Frame.py
@@ -268,7 +268,9 @@ class Frame:
([entry for entry in self.states if not \
self.states[entry]], "Bad")]:
container = Bcfg2.Client.XML.SubElement(stats, ename)
- [container.append(item) for item in data]
+ for item in data:
+ item.set('qtext', '')
+ container.append(item)
timeinfo = Bcfg2.Client.XML.Element("OpStamps")
feedback.append(stats)
diff --git a/src/lib/Client/Tools/POSIX.py b/src/lib/Client/Tools/POSIX.py
index 8fcd8b608..85fd9fac3 100644
--- a/src/lib/Client/Tools/POSIX.py
+++ b/src/lib/Client/Tools/POSIX.py
@@ -204,6 +204,10 @@ class POSIX(Bcfg2.Client.Tools.Tool):
entry.set("current_diff", xml.sax.saxutils.quoteattr(diff))
except:
pass
+ udiff = '\n'.join([x for x in difflib.unified_diff(content.split('\n'), \
+ tempdata.split('\n'))])
+ entry.set('qtext', udiff + "\nInstall ConfigFile %s: (y/N) " % \
+ (entry.get('name')))
return contentStatus and permissionStatus
def InstallConfigFile(self, entry):