conga luci/cluster/form-macros luci/homebase/f ...
CVSROOT: /cvs/cluster
Module name: conga
Changes by: rmccabe at sourceware.org 2007-01-04 00:19:49
Modified files:
luci/cluster : form-macros
luci/homebase : form-macros luci/site/luci/Extensions: homebase_adapters.py ricci_bridge.py
ricci_communicator.py
ricci/ricci : Makefile Ricci.cpp
Log message:
fix for bugs found while testing the fix for bz201394
Patches:
http://sourceware.org/cgi-bin/cvsweb.cgi/conga/luci/cluster/form-macros.diff?cvsroot=cluster&r1=1.139&r2=1.140
http://sourceware.org/cgi-bin/cvsweb.cgi/conga/luci/homebase/form-macros.diff?cvsroot=cluster&r1=1.51&r2=1.52
http://sourceware.org/cgi-bin/cvsweb.cgi/conga/luci/site/luci/Extensions/homebase_adapters.py.diff?cvsroot=cluster&r1=1.43&r2=1.44
http://sourceware.org/cgi-bin/cvsweb.cgi/conga/luci/site/luci/Extensions/ricci_bridge.py.diff?cvsroot=cluster&r1=1.52&r2=1.53
http://sourceware.org/cgi-bin/cvsweb.cgi/conga/luci/site/luci/Extensions/ricci_communicator.py.diff?cvsroot=cluster&r1=1.23&r2=1.24
http://sourceware.org/cgi-bin/cvsweb.cgi/conga/ricci/ricci/Makefile.diff?cvsroot=cluster&r1=1.17&r2=1.18
http://sourceware.org/cgi-bin/cvsweb.cgi/conga/ricci/ricci/Ricci.cpp.diff?cvsroot=cluster&r1=1.21&r2=1.22
luci/cluster/form-macros +6 -0
@@ -243,6 +243,8 @@ <tfoot class="systemsTable"> <tr class="systemsTable"><td colspan="2" class="systemsTable"> + <input type="hidden" name="trust_shown" value="1" + tal:condition="add_cluster" /> <ul class="vanilla deploy"> <li class="vanilla"> <input type="radio" name="download_pkgs"
@@ -332,6 +334,7 @@ src python: 'trusted' in sys and '/luci/lock-ok.png' or ('fp' in sys and '/luci/lock-closed.png' or '/luci/lock-open.png'); title sys/fp | string:no key fingerprint available" /> <input type="hidden" + tal:condition="exists: sys/fp" tal:attributes=" id python: '__SYSTEM%dFingerprint' % cur_sysnum; name python: '__SYSTEM%dFingerprint' % cur_sysnum;
@@ -2900,6 +2903,8 @@ <tfoot class="systemsTable"> <tr class="systemsTable"><td colspan="2" class="systemsTable"> + <input type="hidden" name="trust_shown" value="1" + tal:condition="add_cluster" /> <ul class="vanilla deploy"> <li class="vanilla"> <input type="radio" name="download_pkgs" value="1"
@@ -2994,6 +2999,7 @@ src python: 'trusted' in sys and '/luci/lock-ok.png' or ('fp' in sys and '/luci/lock-closed.png' or '/luci/lock-open.png'); title sys/fp | string:no key fingerprint available" /> <input type="hidden" + tal:condition="exists: sys/fp" tal:attributes=" id python: '__SYSTEM%dFingerprint' % cur_sysnum; name python: '__SYSTEM%dFingerprint' % cur_sysnum;
luci/homebase/form-macros +12 -1
@@ -353,6 +353,8 @@ tal:define="sys python: new_systems[cur_sys]"> <td class="systemsTable"> + <input type="hidden" name="trust_shown" value="1" /> + <input class="hbInputSys" type="text" tal:attributes=" id python: '__SYSTEM%d:Addr' % cur_sysnum;
@@ -376,6 +378,7 @@ title sys/fp | string:no key fingerprint available" /> <input type="hidden" + tal:condition="exists: sys/fp" tal:attributes=" id python: '__SYSTEM%dFingerprint' % cur_sysnum; name python: '__SYSTEM%dFingerprint' % cur_sysnum;
@@ -639,6 +642,8 @@ tal:define="sys python: new_systems[cur_sys]"> <td class="systemsTable"> + <input type="hidden" name="trust_shown" value="1" /> + <input class="hbInputSys" type="text" tal:attributes=" id python: '__SYSTEM%d:Addr' % cur_sysnum;
@@ -663,6 +668,7 @@ title sys/fp | string:no key fingerprint available" /> <input type="hidden" + tal:condition="exists: sys/fp" tal:attributes=" id python: '__SYSTEM%dFingerprint' % cur_sysnum; name python: '__SYSTEM%dFingerprint' % cur_sysnum;
@@ -761,7 +767,7 @@ tal:attributes="value add_cluster/pass | string:0" /> <input name="cluster_os" type="hidden" - tal:attributes="value add_cluster/cluster_os | string:rhel5" /> + tal:attributes="value add_cluster/cluster_os | nothing" /> <table id="systemsTable" class="systemsTable" border="0" cellspacing="0"> <thead class="systemsTable">
@@ -786,6 +792,7 @@ <tfoot class="systemsTable"> <tr class="systemsTable"><td colspan="2" class="systemsTable"> + <input type="hidden" name="trust_shown" value="1" /> <ul class="vanilla"> <li class="vanilla"> <input name="check_certs" type="checkbox"
@@ -854,6 +861,7 @@ src python: 'trusted' in sys and '/luci/lock-ok.png' or ('fp' in sys and '/luci/lock-closed.png' or '/luci/lock-open.png'); title sys/fp | string:no key fingerprint available" /> <input type="hidden" + tal:condition="exists: sys/fp" tal:attributes=" id python: '__SYSTEM%dFingerprint' % cur_sysnum; name python: '__SYSTEM%dFingerprint' % cur_sysnum;
@@ -936,6 +944,9 @@ <tfoot class="systemsTable"> <tr class="systemsTable"><td colspan="2" class="systemsTable"> + <input type="hidden" name="trust_shown" value="1" + tal:condition="cur_sys" /> + <ul class="vanilla"> <li class="vanilla"><input name="check_certs" type="checkbox">View system certificates before sending any passwords.</li> <li class="vanilla"><input type="checkbox" name="allSameCheckBox" id="allSameCheckBox" onClick="allPasswdsSame(this.form);"/>Authenticate to all cluster nodes using the password provided above.</li>
luci/site/luci/Extensions/homebase_adapters.py +44 -15
159 lines not on this page · raw message
luci/site/luci/Extensions/ricci_bridge.py +0 -2
@@ -597,8 +597,6 @@ # temporary workaround for ricci bug system_info = rc.hostname() try: -# FIXME -# rc = RicciCommunicator(system_info, enforce_trust=True) rc = RicciCommunicator(system_info) if rc is None: raise Exception, 'unknown error'
luci/site/luci/Extensions/ricci_communicator.py +15 -8
@@ -15,7 +15,7 @@ pass class RicciCommunicator: - def __init__(self, hostname, enforce_trust=False, port=11111): + def __init__(self, hostname, enforce_trust=True, port=11111): self.__hostname = hostname self.__port = port
@@ -57,8 +57,7 @@ self.__dom0 = hello.firstChild.getAttribute('xen_host') == 'true' pass - - + def hostname(self): luci_log.debug_verbose('RC:hostname: [auth %d] reported hostname = %s' \ % (self.__authed, self.__hostname))
@@ -76,16 +75,16 @@ % (self.__authed, self.__cluname, self.__clualias, self.__hostname)) return (self.__cluname, self.__clualias) def os(self): - luci_log.debug_verbose('RC:os: [auth %d] reported system_name = %s for %s' \ + luci_log.debug_verbose('RC:os: [auth %d] reported os = %s for %s' \ % (self.__authed, self.__os, self.__hostname)) return self.__os def dom0(self): - luci_log.debug_verbose('RC:dom0: [auth %d] reported system_name = %s for %s' \ + luci_log.debug_verbose('RC:dom0: [auth %d] reported dom0 = %s for %s' \ % (self.__authed, self.__dom0, self.__hostname)) return self.__dom0 def fingerprint(self): - return self.ss.peer_fingerprint() + return self.ss.peer_fingerprint() def trust(self): return self.ss.trust()
@@ -115,11 +114,19 @@ resp = self.__receive(self.__timeout_auth) self.__authed = resp.firstChild.getAttribute('authenticated') == 'true' + if self.__authed: + try: + self.__cluname = resp.firstChild.getAttribute('clustername') + self.__clualias = resp.firstChild.getAttribute('clusteralias') + self.__reported_hostname = resp.firstChild.getAttribute('hostname') + self.__os = resp.firstChild.getAttribute('os') + self.__dom0 = resp.firstChild.getAttribute('xen_host') == 'true' + except: + pass luci_log.debug_verbose('RC:auth1: auth call returning %d' \ - % self.__authed) + % self.__authed) return self.__authed - def unauth(self): doc = minidom.Document() ricci = doc.createElement('ricci')
ricci/ricci/Makefile +2 -1
@@ -40,7 +40,8 @@ INCLUDE += `pkg-config --cflags dbus-1` CFLAGS += -CXXFLAGS += -DDBUS_MAJOR_VERSION="${dbus_major_version}" -DDBUS_MINOR_VERSION="${dbus_minor_version}" +CXXFLAGS += -DDBUS_MAJOR_VERSION="${dbus_major_version}" -DDBUS_MINOR_VERSIO +N="${dbus_minor_version}" LDFLAGS += `pkg-config --libs dbus-1`
ricci/ricci/Ricci.cpp +1 -2
@@ -134,7 +134,6 @@ String function = req.get_attr("function"); if (function == "") { success = RRC_MISSING_FUNCTION; - } else if (function == "authenticate") { String passwd = req.get_attr("password"); bool passwd_ok = false;
@@ -145,7 +144,7 @@ } if (passwd_ok) { - resp = ricci_header(true); + resp = ricci_header(true, true); success = RRC_SUCCESS; save_cert = true; } else {