[rhmessaging-commits] rhmessaging commits: r3586 - in mgmt/trunk/sesame/cpp: etc and 1 other directories.

rhmessaging-commits at lists.jboss.org rhmessaging-commits at lists.jboss.org
Mon Aug 24 15:09:02 EDT 2009


Author: tedross
Date: 2009-08-24 15:09:01 -0400 (Mon, 24 Aug 2009)
New Revision: 3586

Modified:
   mgmt/trunk/sesame/cpp/configure.ac
   mgmt/trunk/sesame/cpp/etc/sesame.conf
   mgmt/trunk/sesame/cpp/src/Makefile.am
   mgmt/trunk/sesame/cpp/src/SysAgent.cpp
Log:
Added additional configurability (incl. publish interval).
Added gssapi/kerberos authentication.


Modified: mgmt/trunk/sesame/cpp/configure.ac
===================================================================
--- mgmt/trunk/sesame/cpp/configure.ac	2009-08-24 15:01:44 UTC (rev 3585)
+++ mgmt/trunk/sesame/cpp/configure.ac	2009-08-24 19:09:01 UTC (rev 3586)
@@ -83,8 +83,9 @@
 if test x$with_qpid_checkout != x; then
    QPID_DIR=$with_qpid_checkout
    QPID_SRC=$QPID_DIR/cpp/src
+   QPID_INCLUDE=$QPID_DIR/cpp/include
    QMF_GEN=$QPID_DIR/cpp/managementgen/qmf-gen
-   test -f $QPID_SRC/qpid/agent/ManagementAgent.h || \
+   test -f $QPID_INCLUDE/qpid/agent/ManagementAgent.h || \
      AC_MSG_ERROR([$QPID_DIR does not appear to be a valid qpid checkout.])
    QPID_LIBS="$QPID_SRC/libqmfagent.la"
    QPID_CXXFLAGS="-I$QPID_SRC -I${QPID_SRC}/gen"
@@ -103,6 +104,7 @@
 fi   
 AC_SUBST([QMF_GEN])
 AC_SUBST([QPID_DIR])
+AC_SUBST([QPID_INCLUDE])
 AC_SUBST([QPID_LIBS])
 AC_SUBST([QPID_CXXFLAGS])
 

Modified: mgmt/trunk/sesame/cpp/etc/sesame.conf
===================================================================
--- mgmt/trunk/sesame/cpp/etc/sesame.conf	2009-08-24 15:01:44 UTC (rev 3585)
+++ mgmt/trunk/sesame/cpp/etc/sesame.conf	2009-08-24 19:09:01 UTC (rev 3586)
@@ -19,6 +19,12 @@
 proto=tcp
 port=5672
 
+##
+## Set the publish interval (in seconds).  Sesame will publish updated statistics
+## to management console at this interval.
+##
+pub-interval=10
+
 ##======================
 ## Agent Authentication
 ##======================
@@ -29,9 +35,9 @@
 ## the password in this configuration file, you may use pwd-file to point
 ## to an access-restricted file containing the password.
 ##
-mech=PLAIN
-uid=guest
-pwd=guest
+#mech=PLAIN
+#uid=guest
+#pwd=guest
 #pwd-file=/etc/sesame/password
 
 ##==============
@@ -56,4 +62,4 @@
 #  For example:
 #     '--log-enable warning+' logs all warning, error and critical messages.
 
-#log-enable notice+
+#log-enable=notice+

Modified: mgmt/trunk/sesame/cpp/src/Makefile.am
===================================================================
--- mgmt/trunk/sesame/cpp/src/Makefile.am	2009-08-24 15:01:44 UTC (rev 3585)
+++ mgmt/trunk/sesame/cpp/src/Makefile.am	2009-08-24 19:09:01 UTC (rev 3586)
@@ -1,7 +1,8 @@
 SUBDIRS = qmfgen
 sesame_CXXFLAGS = $(QPID_CXXFLAGS) -Iqmfgen \
 	-DCONF_FILE=\"$(sysconfdir)/sesame/sesame.conf\" \
-	-DLOCSTATE_DIR=\"$(localstatedir)/lib/sesame\"
+	-DLOCSTATE_DIR=\"$(localstatedir)/lib/sesame\" \
+	-I$(QPID_INCLUDE)
 
 include qmfgen/qmfgen.mk
 

Modified: mgmt/trunk/sesame/cpp/src/SysAgent.cpp
===================================================================
--- mgmt/trunk/sesame/cpp/src/SysAgent.cpp	2009-08-24 15:01:44 UTC (rev 3585)
+++ mgmt/trunk/sesame/cpp/src/SysAgent.cpp	2009-08-24 19:09:01 UTC (rev 3586)
@@ -327,12 +327,16 @@
     options["host"]       = Option("ADDR",     "localhost",  "Broker host name or IP address");
     options["port"]       = Option("N",        "5672",       "Port for broker service");
     options["proto"]      = Option("NAME",     "tcp",        "Protocol for broker communication");
-    options["mech"]       = Option("NAME",     "PLAIN",      "Authentication mechanism");
+    options["mech"]       = Option("NAME",     "",           "Authentication mechanism");
     options["uid"]        = Option("NAME",     "guest",      "Authentication user name");
     options["pwd"]        = Option("PASSWORD", "guest",      "Authentication password");
     options["pwd-file"]   = Option("FILE",     "",           "File containing password");
+    options["service"]    = Option("NAME",     "qpidd",      "SASL service name");
+    options["min-ssf"]    = Option("N",        "0",          "Minimum acceptable strength for SASL security layer");
+    options["max-ssf"]    = Option("N",        "256",        "Maximum acceptable strength for SASL security layer");
     options["state-dir"]  = Option("DIR",      LOCSTATE_DIR, "Directory for stored state");
     options["log-enable"] = Option("",         "notice+",    "Log severity threshold");
+    options["pub-interval"] = Option("N",      "10",         "Publish interval in seconds");
 
     configure(argc, argv);
     getPassword();
@@ -351,11 +355,23 @@
 
     // Start the agent.  It will attempt to make a connection to the
     // management broker
-    agent->init(options["host"].value, ::atoi(options["port"].value.c_str()), 5, false,
-                options["state-dir"].value + "/agentdata",
-                options["uid"].value, options["pwd"].value,
-                options["mech"].value, options["proto"].value);
+    uint16_t interval = ::atoi(options["pub-interval"].value.c_str());
+    if (interval < 1)
+        interval = 10;
 
+    qpid::client::ConnectionSettings settings;
+    settings.protocol = options["proto"].value;
+    settings.host = options["host"].value;
+    settings.port = ::atoi(options["port"].value.c_str());
+    settings.username = options["uid"].value;
+    settings.password = options["pwd"].value;
+    settings.mechanism = options["mech"].value;
+    settings.service = options["service"].value;
+    settings.minSsf = ::atoi(options["min-ssf"].value.c_str());
+    settings.maxSsf = ::atoi(options["max-ssf"].value.c_str());
+
+    agent->init(settings, interval, false, options["state-dir"].value + "/agentdata");
+
     // Allocate core object
     SysAgent core(agent, options["state-dir"].value + "/uuid");
     core.run();



More information about the rhmessaging-commits mailing list