rhmessaging commits: r3587 - mgmt/trunk/sesame/cpp.
by rhmessaging-commits@lists.jboss.org
Author: tedross
Date: 2009-08-25 11:20:11 -0400 (Tue, 25 Aug 2009)
New Revision: 3587
Modified:
mgmt/trunk/sesame/cpp/README
Log:
Fixed Apache Svn URL in README
Modified: mgmt/trunk/sesame/cpp/README
===================================================================
--- mgmt/trunk/sesame/cpp/README 2009-08-24 19:09:01 UTC (rev 3586)
+++ mgmt/trunk/sesame/cpp/README 2009-08-25 15:20:11 UTC (rev 3587)
@@ -5,7 +5,7 @@
Apache Qpid - You will need either the source tree for Qpid or and
installed copy of Qpid. The version must be M4 or later.
- https://svn.apache.org/repos/asf/incubator/qpid/trunk/qpid
+ http://svn.apache.org/repos/asf/qpid/trunk/qpid
Alternatively, you can install the qmf-devel RPM and its dependencies.
15 years, 4 months
rhmessaging commits: r3586 - in mgmt/trunk/sesame/cpp: etc and 1 other directories.
by rhmessaging-commits@lists.jboss.org
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();
15 years, 4 months
rhmessaging commits: r3585 - in mgmt/trunk/cumin: python/cumin/grid and 1 other directories.
by rhmessaging-commits@lists.jboss.org
Author: justi9
Date: 2009-08-24 11:01:44 -0400 (Mon, 24 Aug 2009)
New Revision: 3585
Added:
mgmt/trunk/cumin/resources/mrg-logo-32.png
Modified:
mgmt/trunk/cumin/python/cumin/grid/model.py
mgmt/trunk/cumin/python/cumin/grid/pool.py
mgmt/trunk/cumin/python/cumin/grid/pool.strings
mgmt/trunk/cumin/python/cumin/grid/scheduler.py
mgmt/trunk/cumin/python/cumin/grid/submission.py
mgmt/trunk/cumin/python/cumin/widgets.py
mgmt/trunk/cumin/python/cumin/widgets.strings
Log:
- Make the submission add form scheduler-agnostic
- For now, set the User attr on submissions, not Owner
- More graceful recovery from incomplete grid resource data
- Reorganize grid stats and charts a little
- Add a mrg-customized logo (just a stand-in for now)
- Clean up notification output
Modified: mgmt/trunk/cumin/python/cumin/grid/model.py
===================================================================
--- mgmt/trunk/cumin/python/cumin/grid/model.py 2009-08-18 19:57:46 UTC (rev 3584)
+++ mgmt/trunk/cumin/python/cumin/grid/model.py 2009-08-24 15:01:44 UTC (rev 3585)
@@ -9,6 +9,8 @@
from collector import *
from negotiator import *
+from cumin.model import Pool
+
class SeePoolsTask(Task):
def get_title(self, session):
return "Create submission"
@@ -34,20 +36,27 @@
def get_title(self, session):
return "Create submission"
- def get_description(self, session, scheduler):
- return "Create submission to scheduler '%s'" % scheduler.Name
+ def get_description(self, session, pool):
+ return "Create submission"
+ #return "Create submission to pool '%s'" % pool.name
- def do_enter(self, session, scheduler):
- self.form.scheduler.set(session, scheduler)
+ def do_enter(self, session, pool):
+ assert isinstance(pool, Pool)
+ self.form.pool.set(session, pool)
+
+
def do_invoke(self, completion, session, scheduler, command, args):
+ user = session.user_session.subject.name
+
ad = {"Cmd": {"TYPE": self.STRING_TYPE, "VALUE": command},
"Args": {"TYPE": self.STRING_TYPE, "VALUE": args},
"Requirements": {"TYPE": self.EXPR_TYPE, "VALUE": "TRUE"},
"JobUniverse": {"TYPE": self.INTEGER_TYPE,
"VALUE": "%s" % (self.UNIVERSE["VANILLA"],)},
"Iwd": {"TYPE": self.STRING_TYPE, "VALUE": "/tmp"},
- "Owner": {"TYPE": self.STRING_TYPE, "VALUE": "nobody"}}
+ "User": {"TYPE": self.STRING_TYPE,
+ "VALUE": "%s(a)example.com" % user}}
scheduler.Submit(self.app.model.mint.model, completion, ad, None)
Modified: mgmt/trunk/cumin/python/cumin/grid/pool.py
===================================================================
--- mgmt/trunk/cumin/python/cumin/grid/pool.py 2009-08-18 19:57:46 UTC (rev 3584)
+++ mgmt/trunk/cumin/python/cumin/grid/pool.py 2009-08-24 15:01:44 UTC (rev 3585)
@@ -154,6 +154,10 @@
self.pool = pool
+ task = main.module.submission_add
+ link = TaskLink(app, "add", task, self.pool)
+ self.links.add_child(link)
+
def render_sql_where(self, session):
return "where d.pool = %(pool)s"
@@ -315,15 +319,19 @@
def get_grid_args(self, session):
pool = self.frame.get_args(session)[0]
- return Grid.select("pool='%s'" % pool.id)
+ for grid in Grid.selectBy(Pool=pool.id):
+ return (grid,)
+
+ return ()
+
def render_grid_name(self, session):
grid = self.get_grid_args(session)[0]
return grid.Name
def render(self, session):
- grid = self.get_grid_args(session)
- if grid.count() > 0:
+ args = self.get_grid_args(session)
+ if len(args):
return super(PoolStats.GridStats, self).render(session)
class GridJobChart(StatFlashChart):
@@ -345,8 +353,9 @@
return self.parent.get_grid_args(session)
def render(self, session):
- grid = self.parent.get_grid_args(session)
- if grid.count() > 0:
+ args = self.parent.get_grid_args(session)
+
+ if len(args):
return super(PoolStats.GridStats.GridStatSet, self).render(session)
class PoolSlotMap(SlotMap):
Modified: mgmt/trunk/cumin/python/cumin/grid/pool.strings
===================================================================
--- mgmt/trunk/cumin/python/cumin/grid/pool.strings 2009-08-18 19:57:46 UTC (rev 3584)
+++ mgmt/trunk/cumin/python/cumin/grid/pool.strings 2009-08-24 15:01:44 UTC (rev 3585)
@@ -45,22 +45,21 @@
[PoolStats.html]
<div id="poolStats">
<div class="col1">
- <h2>Stats for Pool {pool_name}</h2>
+ <h2>Statistics</h2>
{slot_stats}
<div>{jobs}</div>
<div>{slots}</div>
+ {grid_stats}
</div>
<div class="col2">
<div>{pool_slot_map}</div>
- {grid_stats}
</div>
</div>
<div style="clear:left;"><!-- --></div>
[GridStats.html]
- <h2>Stats for Grid {grid_name}</h2>
- {stats}
- <blockquote>
- {jobs_chart}
- {submit_chart}
- </blockquote>
+<br/>
+<h2>External Cloud 'Amazon EC2'</h2>
+{stats}
+<div>{jobs_chart}</div>
+<div>{submit_chart}</div>
Modified: mgmt/trunk/cumin/python/cumin/grid/scheduler.py
===================================================================
--- mgmt/trunk/cumin/python/cumin/grid/scheduler.py 2009-08-18 19:57:46 UTC (rev 3584)
+++ mgmt/trunk/cumin/python/cumin/grid/scheduler.py 2009-08-24 15:01:44 UTC (rev 3585)
@@ -86,6 +86,44 @@
href = self.page.main.inventory.system.get_href(session, sys)
return fmt_link(href, data["system_name"])
+class SchedulerSelectField(FormField):
+ def __init__(self, app, name, pool):
+ super(SchedulerSelectField, self).__init__(app, name)
+
+ assert isinstance(pool, PoolParameter)
+
+ self.pool = pool
+
+ self.param = SchedulerParameter(app, "param")
+ self.add_parameter(self.param)
+
+ self.schedulers = self.SchedulerOptions(app, "schedulers", self.param)
+ self.add_child(self.schedulers)
+
+ def get(self, session):
+ return self.param.get(session)
+
+ def render_title(self, session):
+ return "Scheduler"
+
+ def render_inputs(self, session):
+ return self.schedulers.render(session)
+
+ class SchedulerOptions(OptionInputSet):
+ def do_get_items(self, session):
+ pool = self.parent.pool.get(session)
+ return list(Scheduler.selectBy(Pool=pool.id))
+
+ def render_item_value(self, session, item):
+ return item.id
+
+ def render_item_content(self, session, item):
+ return item.Name
+
+ def render_item_selected_attr(self, session, item):
+ if item is self.param.get(session):
+ return "selected=\"selected\""
+
class SchedulerFrame(CuminFrame):
def __init__(self, app, name, pool):
super(SchedulerFrame, self).__init__(app, name)
Modified: mgmt/trunk/cumin/python/cumin/grid/submission.py
===================================================================
--- mgmt/trunk/cumin/python/cumin/grid/submission.py 2009-08-18 19:57:46 UTC (rev 3584)
+++ mgmt/trunk/cumin/python/cumin/grid/submission.py 2009-08-24 15:01:44 UTC (rev 3585)
@@ -121,10 +121,15 @@
def __init__(self, app, name, task):
super(SubmissionAddForm, self).__init__(app, name)
+ self.pool = PoolParameter(app, "pool")
+ self.add_parameter(self.pool)
+
self.task = task
- self.scheduler = SchedulerParameter(app, "scheduler")
- self.add_parameter(self.scheduler)
+ from scheduler import SchedulerSelectField # XXX
+
+ self.scheduler = SchedulerSelectField(app, "scheduler", self.pool)
+ self.add_field(self.scheduler)
self.description = self.DescriptionField(app, "description")
self.description.input.size = 50
@@ -144,8 +149,8 @@
self.outputs = self.OutputsField(app, "outputs")
self.add_field(self.outputs)
- self.options = self.OptionsField(app, "options")
- self.add_field(self.options)
+ #self.options = self.OptionsField(app, "options")
+ #self.add_field(self.options)
def process_submit(self, session):
self.check(session)
@@ -160,8 +165,8 @@
self.task.exit_with_redirect(session, scheduler)
def render_title(self, session):
- scheduler = self.scheduler.get(session)
- return self.task.get_description(session, scheduler)
+ pool = self.pool.get(session)
+ return self.task.get_description(session, pool)
class TemplateField(FormField):
def __init__(self, app, name):
Modified: mgmt/trunk/cumin/python/cumin/widgets.py
===================================================================
--- mgmt/trunk/cumin/python/cumin/widgets.py 2009-08-18 19:57:46 UTC (rev 3584)
+++ mgmt/trunk/cumin/python/cumin/widgets.py 2009-08-24 15:01:44 UTC (rev 3585)
@@ -1467,4 +1467,4 @@
code = str(item.status_code)
outs = str(item.output_args)
- return " | ".join((description, status, exc, code, outs))
+ return ": ".join((description, status))
Modified: mgmt/trunk/cumin/python/cumin/widgets.strings
===================================================================
--- mgmt/trunk/cumin/python/cumin/widgets.strings 2009-08-18 19:57:46 UTC (rev 3584)
+++ mgmt/trunk/cumin/python/cumin/widgets.strings 2009-08-24 15:01:44 UTC (rev 3585)
@@ -153,7 +153,7 @@
<a id="logout" onclick="wooly.clearUpdates()" href="{logout_href}">Log Out</a>
</div>
- <img id="logo" src="resource?name=rhlogo-32.png"/>
+ <img id="logo" src="resource?name=mrg-logo-32.png"/>
<ul id="tabs">{tabs}</ul>
</div>
Added: mgmt/trunk/cumin/resources/mrg-logo-32.png
===================================================================
(Binary files differ)
Property changes on: mgmt/trunk/cumin/resources/mrg-logo-32.png
___________________________________________________________________
Name: svn:mime-type
+ application/octet-stream
15 years, 4 months
rhmessaging commits: r3584 - mgmt/trunk/cumin/doc.
by rhmessaging-commits@lists.jboss.org
Author: justi9
Date: 2009-08-18 15:57:46 -0400 (Tue, 18 Aug 2009)
New Revision: 3584
Removed:
mgmt/trunk/cumin/doc/installation.txt
Log:
Remove obsolete documentation
Deleted: mgmt/trunk/cumin/doc/installation.txt
===================================================================
--- mgmt/trunk/cumin/doc/installation.txt 2009-08-18 18:32:26 UTC (rev 3583)
+++ mgmt/trunk/cumin/doc/installation.txt 2009-08-18 19:57:46 UTC (rev 3584)
@@ -1,62 +0,0 @@
-Thanks for evaluating our preview release of the MRG management web
-UI.
-
-The following instructions assume you are running as root, unless
-otherwise indicated:
-
-1. Install packages
-
- First, use yum to install the management packages. If you haven't
- already, you may want to install the messaging packages as well.
-
- # yum install mrg-management
- # yum install mrg-messaging
-
-2. Prepare the database
-
- In order to access the database, you must change the authentication
- method of the postgresql database.
-
- First start the postgresql service to initialize the postgresql
- database files.
-
- # service postgresql start
-
- Now, edit the following authentication config file. For each local
- connection line, change "ident sameuser" to "trust".
-
- # vi /var/lib/pgsql/data/pg_hba.conf
-
- Now you can restart the database:
-
- # service postgresql restart
-
- Load the cumin database and schema:
-
- # cumin-database-init
-
-3. Start a managed broker
-
- If you already have a running broker with management enabled, you
- can skip this step.
-
- To make your local broker manageable, edit /etc/rhmd.conf and add
- "mgmt=yes" on its own line. Restart the broker to put your changes
- in effect.
-
- # vi /etc/rhmd.conf # Add "mgmt=yes"
- # service rhmd restart
-
-4. Start cumin (cumin is the name of the web console)
-
- As root:
-
- # cumin
-
- As an unprivileged user:
-
- $ cumin --port 8080 # On an unprivileged port
-
- In a browser, go to localhost (or localhost:8080). You should be
- able to click "Register Brokers" and add brokers by their address
- and port.
15 years, 4 months
rhmessaging commits: r3583 - store/trunk/cpp/tests/cluster.
by rhmessaging-commits@lists.jboss.org
Author: kpvdr
Date: 2009-08-18 14:32:26 -0400 (Tue, 18 Aug 2009)
New Revision: 3583
Modified:
store/trunk/cpp/tests/cluster/run_cluster_tests
Log:
Updated run_cluster_tests script for ptolemy environment
Modified: store/trunk/cpp/tests/cluster/run_cluster_tests
===================================================================
--- store/trunk/cpp/tests/cluster/run_cluster_tests 2009-08-17 18:49:06 UTC (rev 3582)
+++ store/trunk/cpp/tests/cluster/run_cluster_tests 2009-08-18 18:32:26 UTC (rev 3583)
@@ -103,74 +103,71 @@
return 0
}
-
-func_set_svn_env ()
-#------------------
-# Set up the environment based on value of ${QPID_DIR}/${QPID_BLD} for testing against a svn checkout qpid
-# If ${QPID_BLD} is set, a vpath build is assumed
-# QPID_DIR is defined for source tree builds by the --with-qpid-checkout configure option.
-# QPID_BLD is defined as the build directory, either $QPID_DIR/cpp or separately specified with
-# the --with-qpid-build option for VPATH builds.
+func_set_env ()
+#--------------
+# Set up the environment based on value of ${QPID_DIR}: if ${QPID_DIR} exists, assume a svn checkout,
+# otherwise set up for an installed or prefix test.
# Params: None
# Returns: Nothing
{
- # Check QPID_BLD is also set
- if test -z ${QPID_BLD}; then
- QPID_BLD="${QPID_DIR}/cpp"
- fi
+ if test "${QPID_DIR}" -a -d "${QPID_DIR}" ; then
+ # QPID_DIR is defined for source tree builds by the --with-qpid-checkout configure option.
+ # QPID_BLD is defined as the build directory, either $QPID_DIR/cpp or separately specified with
+ # the --with-qpid-build option for VPATH builds.
+
+ # Check QPID_BLD is also set
+ if test -z ${QPID_BLD}; then
+ QPID_BLD="${QPID_DIR}/cpp"
+ fi
- # Paths and dirs
- PYTHON_DIR="${QPID_DIR}/python"
- export PYTHONPATH="${PYTHON_DIR}":"${QPID_DIR}/cpp/src/tests":"${abs_srcdir}"
+ # Paths and dirs
+ PYTHON_DIR="${QPID_DIR}/python"
+ export PYTHONPATH="${PYTHON_DIR}":"${QPID_DIR}/cpp/src/tests":"${abs_srcdir}"
- # Libraries
- export CLUSTER_LIB="${QPID_BLD}/src/.libs/cluster.so"
- export TEST_STORE_LIB="${QPID_BLD}/src/tests/.libs/test_store.so"
+ # Libraries
+ export CLUSTER_LIB="${QPID_BLD}/src/.libs/cluster.so"
+ export TEST_STORE_LIB="${QPID_BLD}/src/tests/.libs/test_store.so"
- # Executables
- CPP_CLUSTER_EXEC="${QPID_BLD}/src/tests/cluster_test"
- PYTHON_CLUSTER_EXEC="${QPID_DIR}/cpp/src/tests/$PYTHON_TESTNAME"
- export QPIDD_EXEC="${QPID_BLD}/src/qpidd"
- export QPID_CONFIG_EXEC="${QPID_DIR}/python/commands/qpid-config"
- export QPID_ROUTE_EXEC="${QPID_DIR}/python/commands/qpid-route"
- export RECEIVER_EXEC="${QPID_BLD}/src/tests/receiver"
- export SENDER_EXEC="${QPID_BLD}/src/tests/sender"
-}
-
-
-func_set_prefix_evn ()
-#---------------------
-# Set up the environment based on value of ${QPID_PREFIX} for testing against an installed qpid
-# Alternatively, make sure ${QPID_BIN_DIR}, ${QPID_SBIN_DIR}, ${QPID_LIB_DIR} and ${QPID_LIBEXEC_DIR} are set for
-# the installed location.
-# Params: None
-# Returns: Nothing
-{
- if test "${QPID_PREFIX}" -a -d "${QPID_PREFIX}" ; then
- QPID_BIN_DIR=${QPID_PREFIX}/bin
- QPID_SBIN_DIR=${QPID_PREFIX}/sbin
- QPID_LIB_DIR=${QPID_PREFIX}/lib
- QPID_LIBEXEC_DIR=${QPID_PREFIX}/libexec
- fi
+ # Executables
+ CPP_CLUSTER_EXEC="${QPID_BLD}/src/tests/cluster_test"
+ PYTHON_CLUSTER_EXEC="${QPID_DIR}/cpp/src/tests/$PYTHON_TESTNAME"
+ export QPIDD_EXEC="${QPID_BLD}/src/qpidd"
+ export QPID_CONFIG_EXEC="${QPID_DIR}/python/commands/qpid-config"
+ export QPID_ROUTE_EXEC="${QPID_DIR}/python/commands/qpid-route"
+ export RECEIVER_EXEC="${QPID_BLD}/src/tests/receiver"
+ export SENDER_EXEC="${QPID_BLD}/src/tests/sender"
+ else
+ # Set up the environment based on value of ${QPID_PREFIX} for testing against an installed qpid
+ # Alternatively, make sure ${QPID_BIN_DIR}, ${QPID_SBIN_DIR}, ${QPID_LIB_DIR} and ${QPID_LIBEXEC_DIR} are set for
+ # the installed location.
+ if test "${QPID_PREFIX}" -a -d "${QPID_PREFIX}" ; then
+ QPID_BIN_DIR=${QPID_PREFIX}/bin
+ QPID_SBIN_DIR=${QPID_PREFIX}/sbin
+ QPID_LIB_DIR=${QPID_PREFIX}/lib
+ QPID_LIBEXEC_DIR=${QPID_PREFIX}/libexec
+ fi
- # These four env vars must be set prior to calling this script
- func_checkpaths QPID_BIN_DIR QPID_SBIN_DIR QPID_LIB_DIR QPID_LIBEXEC_DIR
+ # These four env vars must be set prior to calling this script
+ func_checkpaths QPID_BIN_DIR QPID_SBIN_DIR QPID_LIB_DIR QPID_LIBEXEC_DIR
- # Paths and dirs
- export PYTHONPATH="${QPID_LIB_DIR}/python":"${QPID_LIBEXEC_DIR}/qpid/tests":"${QPID_LIB_DIR}/python2.4"
+ # Paths and dirs
+ export PYTHON_DIR="${QPID_BIN_DIR}"
+ export PYTHONPATH="${PYTHONPATH}":"${QPID_LIB_DIR}/python":"${QPID_LIBEXEC_DIR}/qpid/tests":"${QPID_LIB_DIR}/python2.4"
+
- # Libraries
- export CLUSTER_LIB="${QPID_LIB_DIR}/qpid/daemon/cluster.so"
- export TEST_STORE_LIB="${QPID_LIB_DIR}/qpid/tests/test_store.so"
+ # Libraries
+ export CLUSTER_LIB="${QPID_LIB_DIR}/qpid/daemon/cluster.so"
+ export TEST_STORE_LIB="${QPID_LIB_DIR}/qpid/tests/test_store.so"
- # Executables
- CPP_CLUSTER_EXEC="${QPID_LIBEXEC_DIR}/qpid/tests/cluster_test"
- PYTHON_CLUSTER_EXEC="${QPID_LIBEXEC_DIR}/qpid/tests/$PYTHON_TESTNAME"
- export QPIDD_EXEC="${QPID_SBIN_DIR}/qpidd"
- export QPID_CONFIG_EXEC="${QPID_BIN_DIR}/qpid-config"
- export QPID_ROUTE_EXEC="${QPID_BIN_DIR}/qpid-route"
- export RECEIVER_EXEC="${QPID_LIBEXEC_DIR}/qpid/tests/receiver"
- export SENDER_EXEC="${QPID_LIBEXEC_DIR}/qpid/tests/sender"
+ # Executables
+ CPP_CLUSTER_EXEC="${QPID_LIBEXEC_DIR}/qpid/tests/cluster_test"
+ PYTHON_CLUSTER_EXEC="${QPID_LIBEXEC_DIR}/qpid/tests/$PYTHON_TESTNAME"
+ export QPIDD_EXEC="${QPID_SBIN_DIR}/qpidd"
+ export QPID_CONFIG_EXEC="${QPID_BIN_DIR}/qpid-config"
+ export QPID_ROUTE_EXEC="${QPID_BIN_DIR}/qpid-route"
+ export RECEIVER_EXEC="${QPID_LIBEXEC_DIR}/qpid/tests/receiver"
+ export SENDER_EXEC="${QPID_LIBEXEC_DIR}/qpid/tests/sender"
+ fi
}
@@ -283,11 +280,7 @@
export STORE_LIB="${abs_srcdir}/../../lib/.libs/msgstore.so"
PYTHON_TESTNAME=cluster_tests.py
-if test "${QPID_DIR}" -a -d "${QPID_DIR}" ; then
- func_set_svn_env
-else
- func_set_prefix_evn
-fi
+func_set_env
func_mk_data_dir
# Check expected environment vars are set
15 years, 4 months
rhmessaging commits: r3582 - in mgmt/trunk: cumin and 1 other directories.
by rhmessaging-commits@lists.jboss.org
Author: justi9
Date: 2009-08-17 14:49:06 -0400 (Mon, 17 Aug 2009)
New Revision: 3582
Removed:
mgmt/trunk/bin/python-compile
Modified:
mgmt/trunk/cumin/Makefile
mgmt/trunk/mint/Makefile
Log:
Use the module interface instead of a wrapper script
Deleted: mgmt/trunk/bin/python-compile
===================================================================
--- mgmt/trunk/bin/python-compile 2009-08-14 20:05:40 UTC (rev 3581)
+++ mgmt/trunk/bin/python-compile 2009-08-17 18:49:06 UTC (rev 3582)
@@ -1,9 +0,0 @@
-#!/usr/bin/env python
-
-import sys, compileall, re
-
-if len(sys.argv) < 2:
- print "Usage: %s PATH" % sys.argv[0]
- sys.exit(1)
-
-compileall.compile_dir(sys.argv[1], rx=re.compile("/\.svn"), force=True)
Modified: mgmt/trunk/cumin/Makefile
===================================================================
--- mgmt/trunk/cumin/Makefile 2009-08-14 20:05:40 UTC (rev 3581)
+++ mgmt/trunk/cumin/Makefile 2009-08-17 18:49:06 UTC (rev 3582)
@@ -10,7 +10,7 @@
share := ${SHARE_DIR}/${name}
build:
- ../bin/python-compile python
+ python -m compileall -x '/\.svn' -f python
install: build
install -d ${lib}
Modified: mgmt/trunk/mint/Makefile
===================================================================
--- mgmt/trunk/mint/Makefile 2009-08-14 20:05:40 UTC (rev 3581)
+++ mgmt/trunk/mint/Makefile 2009-08-17 18:49:06 UTC (rev 3582)
@@ -10,7 +10,7 @@
share := ${SHARE_DIR}/${name}
build:
- ../bin/python-compile python
+ python -m compileall -x '/\.svn' -f python
install: build
install -d ${lib}
15 years, 4 months
rhmessaging commits: r3581 - mgmt/trunk/cumin/python/cumin/grid.
by rhmessaging-commits@lists.jboss.org
Author: eallen
Date: 2009-08-14 16:05:40 -0400 (Fri, 14 Aug 2009)
New Revision: 3581
Modified:
mgmt/trunk/cumin/python/cumin/grid/main.py
mgmt/trunk/cumin/python/cumin/grid/model.py
mgmt/trunk/cumin/python/cumin/grid/negotiator.py
mgmt/trunk/cumin/python/cumin/grid/negotiator.strings
Log:
Added ability to show/edit user.group config settings.
Modified: mgmt/trunk/cumin/python/cumin/grid/main.py
===================================================================
--- mgmt/trunk/cumin/python/cumin/grid/main.py 2009-08-14 20:03:08 UTC (rev 3580)
+++ mgmt/trunk/cumin/python/cumin/grid/main.py 2009-08-14 20:05:40 UTC (rev 3581)
@@ -42,7 +42,9 @@
self.negotiator_edit_dynamic_quota = NegotiatorEditDynamicQuotaTask(app, negotiator)
self.negotiator_edit_static_quota = NegotiatorEditStaticQuotaTask(app, negotiator)
self.negotiator_edit_prio_factor = NegotiatorEditPrioFactorTask(app, negotiator)
+ self.negotiator_user_prio_factor = NegotiatorUserPrioFactorTask(app, negotiator)
self.negotiator_edit_regroup = NegotiatorEditRegroupTask(app, negotiator)
+ self.negotiator_user_regroup = NegotiatorUserRegroupTask(app, negotiator)
self.negotiator_add_group = NegotiatorAddGroupTask(app, negotiator)
self.frame = GridFrame(app, "grid")
Modified: mgmt/trunk/cumin/python/cumin/grid/model.py
===================================================================
--- mgmt/trunk/cumin/python/cumin/grid/model.py 2009-08-14 20:03:08 UTC (rev 3580)
+++ mgmt/trunk/cumin/python/cumin/grid/model.py 2009-08-14 20:05:40 UTC (rev 3581)
@@ -396,3 +396,30 @@
def get_title(self, session):
return "Edit Static Quota"
+
+class NegotiatorUserTask(NegotiatorGroupTask):
+ def do_enter(self, session, ng):
+ try:
+ negotiator, group = ng
+ except:
+ raise Exception("Must supply group for user forms")
+ super(NegotiatorUserTask, self).do_enter(session, negotiator)
+ self.form.group.set(session, group)
+
+class NegotiatorUserPrioFactorTask(NegotiatorUserTask):
+ def __init__(self, app, cls):
+ super(NegotiatorUserPrioFactorTask, self).__init__(app, cls)
+
+ self.form = UserPrioFactorForm(self.app, "negotiator_user_prio_factor", self)
+
+ def get_title(self, session):
+ return "Edit Priority Factor"
+
+class NegotiatorUserRegroupTask(NegotiatorUserTask):
+ def __init__(self, app, cls):
+ super(NegotiatorUserRegroupTask, self).__init__(app, cls)
+
+ self.form = UserRegroupForm(self.app, "negotiator_user_regroup", self)
+
+ def get_title(self, session):
+ return "Edit Autoregroup"
Modified: mgmt/trunk/cumin/python/cumin/grid/negotiator.py
===================================================================
--- mgmt/trunk/cumin/python/cumin/grid/negotiator.py 2009-08-14 20:03:08 UTC (rev 3580)
+++ mgmt/trunk/cumin/python/cumin/grid/negotiator.py 2009-08-14 20:05:40 UTC (rev 3581)
@@ -10,6 +10,7 @@
from cumin.formats import *
from cumin.util import *
+from submitter import SubmitterSet
import main
strings = StringCatalog(__file__)
@@ -93,72 +94,101 @@
self.__tabs.add_tab(details)
class QmfGroupColumn(ItemTableColumn):
- def __init__(self, app, name, getter, button):
+ def __init__(self, app, name, getter, negotiator, task):
super(QmfGroupColumn, self).__init__(app, name)
+ self.header_class = TopTableColumnHeader
+
self.title = None
self.getter = getter
self.alignment = "right"
- self.button = button
+ self.user = False
+ self.negotiator = negotiator
+ self.task = task
+ self.user_task = None
def render_title(self, session, *args):
return self.title
def render_content(self, session, group):
- if group == self.parent.buttons_row:
- return self.button.render(session)
- elif group == self.parent.empty_row:
- return ""
-
data = self.getter(session)
for x in data:
if x[0] == group:
- return self.render_data(x)
+ return self.render_data(session, x)
+ if self.user:
+ data = self.getter(session, [group], True)
+ for x in data:
+ if x[0] == group:
+ return self.render_data(session, x)
+
+ return ""
+
+ def render_data(self, session, data):
+ # is user
+ if "." in data[0] and self.user_task:
+ href = "%s" % self.user_task.get_href(session, (self.negotiator.get(session), data[0]))
+ else:
+ href = self.task.get_href(session, self.negotiator.get(session))
+ content = data[2][2] and str(data[1]) or "NOT SET"
+ return fmt_link(href, content, "", "", self.fmt_hover(data[0]))
+
+ def fmt_hover(self, group):
+ return "Edit the %s" % self.title
+
class NegotiatorOverviewTab(ItemTable):
def __init__(self, app, name, negotiator):
super(NegotiatorOverviewTab, self).__init__(app, name)
+ self.update_enabled = False
self.defer_enabled = True
self.group_helper = GroupHelper(app, "groups", negotiator)
self.add_child(self.group_helper)
- col = self.GroupColumn(app, "group", negotiator)
+ self.expand = self.ExpandSwitch(app, "expand")
+ self.add_child(self.expand)
+
+ self.buttons = WidgetSet(app, "buttons")
+ self.buttons.html_class = "buttons"
+ self.add_child(self.buttons)
+
+ task = main.module.negotiator_add_group
+ button = EditButton(app, "add_group_button", task, negotiator)
+ self.buttons.add_child(button)
+
+ col = self.ExpandColumn(app, "expand_col")
+ col.header_class = TopTableColumnHeader
self.add_column(col)
+
+ col = self.GroupColumn(app, "group")
+ self.add_column(col)
self.set_default_column(col)
task = main.module.negotiator_edit_dynamic_quota
- button = EditButton(app, "dynamic_button", negotiator, task)
- self.add_child(button)
- col = self.DynamicColumn(app, "dynamic", self.group_helper.get_dyn_quota, button)
+ col = self.DynamicColumn(app, "dynamic", self.group_helper.get_dyn_quota, negotiator, task)
col.title = "Dynamic Quota"
self.add_column(col)
task = main.module.negotiator_edit_static_quota
- button = EditButton(app, "static_button", negotiator, task)
- self.add_child(button)
- col = self.StaticColumn(app, "static", self.group_helper.get_static_quota, button)
+ col = QmfGroupColumn(app, "static", self.group_helper.get_static_quota, negotiator, task)
col.title = "Static Quota"
self.add_column(col)
task = main.module.negotiator_edit_prio_factor
- button = EditButton(app, "prio_button", negotiator, task)
- self.add_child(button)
- col = self.FactorColumn(app, "factor", self.group_helper.get_priority_factor, button)
+ col = QmfGroupColumn(app, "factor", self.group_helper.get_priority_factor, negotiator, task)
col.title = "Priority Factor"
+ col.user = True
+ col.user_task = main.module.negotiator_user_prio_factor
self.add_column(col)
task = main.module.negotiator_edit_regroup
- button = EditButton(app, "regroup_button", negotiator, task)
- self.add_child(button)
- col = self.RegroupColumn(app, "regroup", self.group_helper.get_regroups, button)
+ col = QmfGroupColumn(app, "regroup", self.group_helper.get_regroups, negotiator, task)
col.title = "Auto Regroup"
+ col.user = True
+ col.user_task = main.module.negotiator_user_regroup
self.add_column(col)
- self.buttons_row = "__buttons__"
- self.empty_row = "__empty__"
-
def render_title(self, session):
return "Group Configuration"
@@ -170,49 +200,82 @@
def do_get_items(self, session, *args):
groups = self.group_helper.get_group_names(session)
- items = list(groups)
+ users = self.group_helper.get_users(session, groups)
+ self.expand.initialize(session, groups, users)
+
+ names = list(groups)
if self.reversed.get(session):
- items = reversed(items)
+ names = reversed(names)
- if len(items):
- items.append(self.buttons_row)
- else:
- items.append(self.empty_row)
+ # if current expanded group has users
+ expanded = self.expand.get(session)
+ if expanded in users:
+ self.group_helper.get_priority_factor(session, users[expanded], True)
+ self.group_helper.get_regroups(session, users[expanded], True)
+
+ # insert the users into the list
+ items = list()
+ for name in names:
+ items.append(name)
+ if name == expanded and expanded in users:
+ items.extend(users[expanded])
+
return items
- class GroupColumn(ItemTableColumn):
- def __init__(self, app, name, negotiator):
- super(NegotiatorOverviewTab.GroupColumn, self).__init__(app, name)
+ class ExpandColumn(ItemTableColumn):
+ def render_title(self, session, *args):
+ return ""
- task = main.module.negotiator_add_group
- self.button = EditButton(app, "add_group_button", negotiator, task)
- self.add_child(self.button)
+ def get_class_list(self, session):
+ return ["expand"]
+ def render_content(self, session, group):
+ if self.parent.expand.get_title(session, group):
+ return self.parent.expand.render_item_link(session, group)
+ else:
+ return ""
+
+ class GroupColumn(ItemTableColumn):
def render_title(self, session, *args):
return "Group"
def render_content(self, session, group):
- if group == self.parent.buttons_row or group == self.parent.empty_row:
- return self.button.render(session)
+ # if a user
+ if "." in group:
+ (g, sep, user) = group.partition(".")
+ return "<span style='padding-left: 2em;'>%s</span>" % user
return group
class DynamicColumn(QmfGroupColumn):
- def render_data(self, data):
- return round(float(data[1]) * 100.0, 2)
+ def render_data(self, session, data):
+ href = self.task.get_href(session, self.negotiator.get(session))
+ content = "%s%%" % str(round(float(data[1]) * 100.0, 2))
+ return fmt_link(href, content, "", "", self.fmt_hover(data[0]))
- class StaticColumn(QmfGroupColumn):
- def render_data(self, data):
- return data[2][2] and data[1] or "-"
+ class ExpandSwitch(DynamicSwitch):
+ def render_item_link(self, session, state):
+ branch = session.branch()
+ expanded = self.get(session) == state
- class FactorColumn(QmfGroupColumn):
- def render_data(self, data):
- return data[2][2] and data[1] or "-"
+ if expanded:
+ self.set(branch, "")
+ else:
+ self.set(branch, state)
- class RegroupColumn(QmfGroupColumn):
- def render_data(self, data):
- return data[1]
+ content = expanded and "[-]" or "[+]"
+ verb = expanded and "Hide" or "Show"
+ hover = self.get_hover(session, state) % verb
+ return fmt_link(branch.marshal(), content, "", link_title=hover)
+
+ def initialize(self, session, groups, users):
+ if len(self.get_items(session)) == 0:
+ for group in groups:
+ if group in users:
+ self.add_state(session, group, "+", hover="%%s users for %s" % group)
+ self.param.default = None
+
class GroupHelper(Widget):
def __init__(self, app, name, negotiator):
super(GroupHelper, self).__init__(app, name)
@@ -229,14 +292,24 @@
self.group_autoregroups = self.GroupAttribute(app, "group_autoregroups")
self.add_attribute(self.group_autoregroups)
+ self.user_autoregroups = self.GroupAttribute(app, "user_autoregroups")
+ self.add_attribute(self.user_autoregroups)
+
self.autoregroup = self.GroupAttribute(app, "autoregroup")
self.add_attribute(self.autoregroup)
self.group_factors = self.GroupAttribute(app, "group_factors")
self.add_attribute(self.group_factors)
+ self.user_factors = self.GroupAttribute(app, "user_factors")
+ self.add_attribute(self.user_factors)
+
self.negotiator = negotiator
+ self.users = self.Users(app, "users")
+ self.users.update_enabled = False
+ self.add_child(self.users)
+
def get_group_names(self, session):
groups = self.groups.get(session)
if len(groups) == 0:
@@ -262,8 +335,8 @@
groups.append(group)
return groups
- def get_group_raw_config(self, session, config, attrib, groups=None):
- configs = attrib.get(session)
+ def get_group_raw_config(self, session, config, param, groups=None):
+ configs = param.get(session)
if len(configs) == 0:
if groups is None:
@@ -274,7 +347,7 @@
raw_configs = action.do_invoke(negotiator, groups, config, "GetRawConfig", timeout=15)
for [group, data, status] in raw_configs:
configs.append([group, data['Value'], status])
- attrib.set(session, configs)
+ param.set(session, configs)
return configs
@@ -287,21 +360,27 @@
return self.get_group_raw_config(session,
"GROUP_QUOTA_DYNAMIC_",
self.group_dyn_quotas)
- def get_priority_factor(self, session):
+
+ def get_priority_factor(self, session, groups=None, user=False):
+ param = user and self.user_factors or self.group_factors
return self.get_group_raw_config(session,
"GROUP_PRIO_FACTOR_",
- self.group_factors)
+ param, groups)
- def get_regroups(self, session):
+ def get_regroups(self, session, groups=None, user=False):
+ param = user and self.user_autoregroups or self.group_autoregroups
return self.get_group_raw_config(session,
"GROUP_AUTOREGROUP_",
- self.group_autoregroups)
+ param, groups)
def get_autoregroup(self, session):
return self.get_group_raw_config(session,
"GROUP_AUTOREGROUP",
self.autoregroup, [""])
+ def get_users(self, session, groups):
+ return self.users.get(session, groups)
+
def append_unclaimed_dyn_quota(self, session, quotas, force=False):
total = 0.0
for [group, value, status] in quotas:
@@ -321,6 +400,27 @@
def get_default(self, session):
return list()
+ class Users(SubmitterSet):
+ def get(self, session, groups):
+ #returns {group: [user, user], group: [user, user], ...}
+ users = self.items.get(session)
+ if not users:
+ items = self.get_items(session)
+ user_names = [x[1] for x in items]
+ users = dict()
+ for group in groups:
+ for user_name in user_names:
+ if user_name.startswith("%s." % group):
+ if not group in users:
+ users[group] = list()
+ users[group].append(user_name)
+
+ self.items.set(session, users)
+ return users
+
+ def render_sql_limit(self, session, *args):
+ return ""
+
class AddGroupForm(CuminTaskForm):
def __init__(self, app, name, task):
super(AddGroupForm, self).__init__(app, name, task)
@@ -393,6 +493,9 @@
def render_original_value_path(self, session, group):
return self.original_values.path
+ def render_form_class(self, session):
+ return ""
+
class EditPrioFactorForm(GroupForm):
def __init__(self, app, name, task):
super(EditPrioFactorForm, self).__init__(app, name, task)
@@ -455,6 +558,45 @@
return False
return factor >= 1.0
+class UserPrioFactorForm(EditPrioFactorForm):
+ def __init__(self, app, name, task):
+ super(UserPrioFactorForm, self).__init__(app, name, task)
+
+ self.group = Parameter(app, "group")
+ self.add_parameter(self.group)
+
+ def render_title(self, session):
+ return "Edit User Priority Factor"
+
+ def render_groups(self, session):
+ writer = Writer()
+
+ group = self.group.get(session)
+ users = list(self.group_helper.get_priority_factor(session, [group], True))
+ for user in users:
+ self.field_tmpl.render(writer, session, user)
+
+ return writer.to_string()
+
+ def render_form_class(self, session):
+ return "UserPrioFactorForm"
+
+ def process_submit(self, session):
+ negotiator = self.object.get(session)
+ factors = self.factors.get(session)
+ group = self.group.get(session)
+ original_values = self.original_values.get(session)
+
+ changed = False
+ for user, new_value, original_value in zip([group], factors, original_values):
+ if new_value != original_value:
+ if self.is_valid_factor(new_value):
+ self.task.invoke(session, negotiator, "GROUP_PRIO_FACTOR_"+user, new_value)
+ changed = True
+ if changed:
+ self.task.invoke(session, negotiator, "Reconfig", None)
+ self.task.exit_with_redirect(session, negotiator)
+
class EditDynamicQuotaForm(GroupForm):
def __init__(self, app, name, task):
super(EditDynamicQuotaForm, self).__init__(app, name, task)
@@ -675,6 +817,41 @@
self.task.invoke(session, negotiator, "Reconfig", None)
self.task.exit_with_redirect(session, negotiator)
+class UserRegroupForm(EditRegroupForm):
+ def __init__(self, app, name, task):
+ super(UserRegroupForm, self).__init__(app, name, task)
+
+ self.group = Parameter(app, "group")
+ self.add_parameter(self.group)
+
+ def render_groups(self, session):
+ writer = Writer()
+
+ group = self.group.get(session)
+ regroups = list(self.group_helper.get_regroups(session, [group], True))
+ for regroup in regroups:
+ self.field_tmpl.render(writer, session, regroup)
+
+ return writer.to_string()
+
+ def render_form_class(self, session):
+ return "UserRegroupForm"
+
+ def process_submit(self, session):
+ negotiator = self.object.get(session)
+ regroup = self.regroup.get(session)
+ group = self.group.get(session)
+ original_regroups = self.original_regroups.get(session)
+
+ changed = False
+ for user, original_value in zip([group], original_regroups):
+ if regroup[user] != original_value:
+ self.task.invoke(session, negotiator, "GROUP_AUTOREGROUP_"+user, regroup[user])
+ changed = True
+ if changed:
+ self.task.invoke(session, negotiator, "Reconfig", None)
+ self.task.exit_with_redirect(session, negotiator)
+
class PriorityPieChart(StatFlashChart):
def __init__(self, app, name, groups):
super(PriorityPieChart, self).__init__(app, name)
@@ -740,7 +917,7 @@
self.add_parameter(self.object)
class EditButton(ActionSet):
- def __init__(self, app, name, negotiator, task):
+ def __init__(self, app, name, task, negotiator):
super(EditButton, self).__init__(app, name)
link = TaskLink(app, "edit", task, negotiator)
Modified: mgmt/trunk/cumin/python/cumin/grid/negotiator.strings
===================================================================
--- mgmt/trunk/cumin/python/cumin/grid/negotiator.strings 2009-08-14 20:03:08 UTC (rev 3580)
+++ mgmt/trunk/cumin/python/cumin/grid/negotiator.strings 2009-08-14 20:05:40 UTC (rev 3581)
@@ -16,6 +16,26 @@
left outer join negotiator_stats as c on c.id = n.stats_curr_id
{sql_where}
+[NegotiatorOverviewTab.css]
+div.GroupTable ul.actions {
+ display: inline;
+}
+div.GroupTable div.sactions {
+ padding: 0.75em;
+}
+
+[NegotiatorOverviewTab.html]
+<div id="{id}" class="CuminTable GroupTable">
+ <div class="sactions">
+ <h2>Actions:</h2>
+ {buttons}
+ </div>
+<table {class}>
+ <thead><tr>{headers}</tr></thead>
+ <tbody>{items}</tbody>
+</table>
+</div>
+
[GroupForm.css]
div.deferredSpacer {
height: 10em;
@@ -277,6 +297,13 @@
form.mform.PrioFactorForm {
width: 32em;
}
+form.mform.UserPrioFactorForm {
+ width: 40em;
+}
+form.mform.UserRegroupForm {
+ width: 48em;
+}
+
[EditPrioFactorForm.field_html]
<tr>
<td>
@@ -416,3 +443,8 @@
<li>{edit}</li>
</ul>
+[ExpandColumn.css]
+th.expand {
+ width: 1em;
+ padding: 0;
+}
15 years, 4 months
rhmessaging commits: r3580 - mgmt/trunk/cumin/python/cumin.
by rhmessaging-commits@lists.jboss.org
Author: eallen
Date: 2009-08-14 16:03:08 -0400 (Fri, 14 Aug 2009)
New Revision: 3580
Modified:
mgmt/trunk/cumin/python/cumin/widgets.py
Log:
Added DynamicSwitch class to handle cases where the states are not fixed.
Modified: mgmt/trunk/cumin/python/cumin/widgets.py
===================================================================
--- mgmt/trunk/cumin/python/cumin/widgets.py 2009-08-14 19:00:10 UTC (rev 3579)
+++ mgmt/trunk/cumin/python/cumin/widgets.py 2009-08-14 20:03:08 UTC (rev 3580)
@@ -496,8 +496,7 @@
return self.param.get(session)
def set(self, session, value):
- foo = self.param.set(session, value)
- return foo
+ return self.param.set(session, value)
def get_items(self, session):
return self.__states
@@ -536,6 +535,67 @@
return fmt_link(branch.marshal(), title, class_, link_title=hover, bm=bm, click=click, attribs=attribs)
+class DynamicSwitch(StateSwitch):
+ """ Used when the states are not fixed.
+ They vary each request """
+
+ def __init__(self, app, name):
+ super(DynamicSwitch, self).__init__(app, name)
+
+ self.states = self.StatesAttribute(app, "states")
+ self.add_attribute(self.states)
+
+ def add_state(self, session, state, title, hover=""):
+ state_attrib = self.states.get(session)
+ state_attrib['states'].append(state)
+ state_attrib['titles'][state] = title
+ state_attrib['hover'][state] = hover
+
+ if self.param.default is None:
+ self.param.default = state
+
+ def get_items(self, session):
+ state_attrib = self.states.get(session)
+ return state_attrib['states']
+
+ def get_title(self, session, state):
+ state_attrib = self.states.get(session)
+ return state in state_attrib['titles'] and state_attrib['titles'][state]
+
+ def get_hover(self, session, state):
+ state_attrib = self.states.get(session)
+ return state in state_attrib['hover'] and state_attrib['hover'][state]
+
+ def get_bookmark(self, session, state):
+ state_attrib = self.states.get(session)
+ return state in state_attrib['bookmark'] and state_attrib['bookmark'][state]
+
+ def get_click(self, session, state):
+ return ""
+
+ def get_attributes(self, session, state):
+ return dict()
+
+ def render_item_link(self, session, state):
+ branch = session.branch()
+ self.set(branch, state)
+
+ title = self.get_title(session, state)
+ hover = self.get_hover(session, state)
+ class_ = self.get(session) == state and "selected"
+ bm = self.get_bookmark(session, state)
+ click = self.get_click(session, state)
+ attribs = self.get_attributes(session, state)
+
+ return fmt_link(branch.marshal(), title, class_, link_title=hover, bm=bm, click=click, attribs=attribs)
+
+ class StatesAttribute(Attribute):
+ def get_default(self, session):
+ return {'states': [],
+ 'titles': {},
+ 'hover': {},
+ 'bookmark': {}}
+
class GroupSwitch(StateSwitch):
def __init__(self, app, name):
super(GroupSwitch, self).__init__(app, name)
15 years, 4 months
rhmessaging commits: r3579 - in store/trunk/cpp: tests and 1 other directories.
by rhmessaging-commits@lists.jboss.org
Author: kpvdr
Date: 2009-08-14 15:00:10 -0400 (Fri, 14 Aug 2009)
New Revision: 3579
Modified:
store/trunk/cpp/configure.ac
store/trunk/cpp/tests/Makefile.am
store/trunk/cpp/tests/cluster/run_cluster_tests
store/trunk/cpp/tests/cluster/run_long_cluster_tests
store/trunk/cpp/tests/run_python_tests
Log:
Updated python cluster test scripts to allow clean runs from command-line. Tidied up run-cluster-tests script.
Modified: store/trunk/cpp/configure.ac
===================================================================
--- store/trunk/cpp/configure.ac 2009-08-13 19:46:04 UTC (rev 3578)
+++ store/trunk/cpp/configure.ac 2009-08-14 19:00:10 UTC (rev 3579)
@@ -119,7 +119,7 @@
test $fail = 1 &&
AC_MSG_ERROR([Missing required qpid libraries/headers. Install package qpidd-devel or use --with-qpid-checkout])
QPID_CXXFLAGS="-I$QPID_INCLUDE"
- QPID_LIBS="-L$QPID_LIB -lqpidbroker"
+ QPID_LIBS="-L$QPID_LIB -lqpidbroker -lqpidcommon"
fi
if test x$with_qpid_build != x; then
Modified: store/trunk/cpp/tests/Makefile.am
===================================================================
--- store/trunk/cpp/tests/Makefile.am 2009-08-13 19:46:04 UTC (rev 3578)
+++ store/trunk/cpp/tests/Makefile.am 2009-08-14 19:00:10 UTC (rev 3579)
@@ -95,6 +95,8 @@
# Note: Auto-recursion is not supported for custom targets, so add a ${MAKE} -C for each dir in the SUBDIRS list above.
check-long:
$(MAKE) -C jrnl check-long
+if DO_CLUSTER_TESTS
$(MAKE) -C cluster check-long
+endif
$(MAKE) check TESTS="$(LONG_TESTS)" SUBDIRS=.
Modified: store/trunk/cpp/tests/cluster/run_cluster_tests
===================================================================
--- store/trunk/cpp/tests/cluster/run_cluster_tests 2009-08-13 19:46:04 UTC (rev 3578)
+++ store/trunk/cpp/tests/cluster/run_cluster_tests 2009-08-14 19:00:10 UTC (rev 3579)
@@ -21,11 +21,186 @@
#
# The GNU Lesser General Public License is available in the file COPYING.
+
+# --- Function definitions ---
+
+
+func_check_required_env ()
+#-------------------------
+# Check that EITHER:
+# QPID_DIR is set (for running against svn QPID)
+# OR
+# QPID_PREFIX is set (for running against installed QPID
+# Will exit with error code 1 if neither of these is defined.
+# Params: None
+# Returns: 0 if env vars ok, 1 otherwise
+{
+ if test -z "${QPID_DIR}" -a -z "${QPID_PREFIX}"; then
+ # Try to find qpidd in the normal installed location
+ if test -x /usr/sbin/qpidd; then
+ QPID_PREFIX=/usr
+ else
+ echo "ERROR: Could not find installed Qpid"
+ echo "Either of the following must be set in the environment for this script to run:"
+ echo " QPID_DIR for running against a Qpid svn build"
+ echo " QPID_PREFIX for running against an installed Qpid"
+ return 1
+ fi
+ fi
+ return 0
+}
+
+
+func_check_ais ()
+#----------------
+# Check openAIS/corosync is running and user has correct privilages
+# Params: None
+# Returns: 0 if openAIS/corosync is running, 1 otherwise
+{
+ id -nG | grep '\<ais\>' >/dev/null || NOGROUP="You are not a member of the ais group."
+ ps -u root | grep 'aisexec\|corosync' >/dev/null || NOAISEXEC="The aisexec or corosync daemon is not running as root"
+
+ if test -n "$NOGROUP" -o -n "$NOAISEXEC"; then
+ cat <<EOF
+
+ ========== WARNING: NOT RUNNING CLUSTER TESTS ============
+
+ Tests that depend on the openais library (used for clustering)
+ will not be run because:
+
+ $NOGROUP
+ $NOAISEXEC
+
+ ==========================================================
+
+EOF
+ return 1
+ fi
+ return 0
+}
+
+
+func_check_qpid_python ()
+#------------------------
+# Check that Qpid python environment is ok
+# Params: None
+# Returns: 0 if Python environment is ok; 1 otherwise
+{
+ if ! python -c "import qpid" ; then
+ cat <<EOF
+
+ =========== WARNING: PYTHON TESTS DISABLED ==============
+
+ Unable to load python qpid module - skipping python tests.
+
+ PYTHONPATH=${PYTHONPATH}
+
+ ===========================================================
+
+EOF
+ return 1
+ fi
+ return 0
+}
+
+
+func_set_svn_env ()
+#------------------
+# Set up the environment based on value of ${QPID_DIR}/${QPID_BLD} for testing against a svn checkout qpid
+# If ${QPID_BLD} is set, a vpath build is assumed
+# QPID_DIR is defined for source tree builds by the --with-qpid-checkout configure option.
+# QPID_BLD is defined as the build directory, either $QPID_DIR/cpp or separately specified with
+# the --with-qpid-build option for VPATH builds.
+# Params: None
+# Returns: Nothing
+{
+ # Check QPID_BLD is also set
+ if test -z ${QPID_BLD}; then
+ QPID_BLD="${QPID_DIR}/cpp"
+ fi
+
+ # Paths and dirs
+ PYTHON_DIR="${QPID_DIR}/python"
+ export PYTHONPATH="${PYTHON_DIR}":"${QPID_DIR}/cpp/src/tests":"${abs_srcdir}"
+
+ # Libraries
+ export CLUSTER_LIB="${QPID_BLD}/src/.libs/cluster.so"
+ export TEST_STORE_LIB="${QPID_BLD}/src/tests/.libs/test_store.so"
+
+ # Executables
+ CPP_CLUSTER_EXEC="${QPID_BLD}/src/tests/cluster_test"
+ PYTHON_CLUSTER_EXEC="${QPID_DIR}/cpp/src/tests/$PYTHON_TESTNAME"
+ export QPIDD_EXEC="${QPID_BLD}/src/qpidd"
+ export QPID_CONFIG_EXEC="${QPID_DIR}/python/commands/qpid-config"
+ export QPID_ROUTE_EXEC="${QPID_DIR}/python/commands/qpid-route"
+ export RECEIVER_EXEC="${QPID_BLD}/src/tests/receiver"
+ export SENDER_EXEC="${QPID_BLD}/src/tests/sender"
+}
+
+
+func_set_prefix_evn ()
+#---------------------
+# Set up the environment based on value of ${QPID_PREFIX} for testing against an installed qpid
+# Alternatively, make sure ${QPID_BIN_DIR}, ${QPID_SBIN_DIR}, ${QPID_LIB_DIR} and ${QPID_LIBEXEC_DIR} are set for
+# the installed location.
+# Params: None
+# Returns: Nothing
+{
+ if test "${QPID_PREFIX}" -a -d "${QPID_PREFIX}" ; then
+ QPID_BIN_DIR=${QPID_PREFIX}/bin
+ QPID_SBIN_DIR=${QPID_PREFIX}/sbin
+ QPID_LIB_DIR=${QPID_PREFIX}/lib
+ QPID_LIBEXEC_DIR=${QPID_PREFIX}/libexec
+ fi
+
+ # These four env vars must be set prior to calling this script
+ func_checkpaths QPID_BIN_DIR QPID_SBIN_DIR QPID_LIB_DIR QPID_LIBEXEC_DIR
+
+ # Paths and dirs
+ export PYTHONPATH="${QPID_LIB_DIR}/python":"${QPID_LIBEXEC_DIR}/qpid/tests":"${QPID_LIB_DIR}/python2.4"
+
+ # Libraries
+ export CLUSTER_LIB="${QPID_LIB_DIR}/qpid/daemon/cluster.so"
+ export TEST_STORE_LIB="${QPID_LIB_DIR}/qpid/tests/test_store.so"
+
+ # Executables
+ CPP_CLUSTER_EXEC="${QPID_LIBEXEC_DIR}/qpid/tests/cluster_test"
+ PYTHON_CLUSTER_EXEC="${QPID_LIBEXEC_DIR}/qpid/tests/$PYTHON_TESTNAME"
+ export QPIDD_EXEC="${QPID_SBIN_DIR}/qpidd"
+ export QPID_CONFIG_EXEC="${QPID_BIN_DIR}/qpid-config"
+ export QPID_ROUTE_EXEC="${QPID_BIN_DIR}/qpid-route"
+ export RECEIVER_EXEC="${QPID_LIBEXEC_DIR}/qpid/tests/receiver"
+ export SENDER_EXEC="${QPID_LIBEXEC_DIR}/qpid/tests/sender"
+}
+
+
+func_mk_data_dir ()
+#------------------
+# Create a data dir at ${TMP_DATA_DIR} if not present, clear it otherwise.
+# Set TMP_DATA_DIR if it is not set.
+# Params: None
+# Returns: Nothing
+{
+ if test -z "${TMP_DATA_DIR}"; then
+ TMP_DATA_DIR=/tmp/cluster_tests
+ echo "TMP_DATA_DIR not set; using ${TMP_DATA_DIR}"
+ fi
+
+ # Delete old cluster test dirs if they exist
+ if test -d "${TMP_DATA_DIR}" ; then
+ rm -rf "${TMP_DATA_DIR}/cluster"
+ fi
+ mkdir -p "${TMP_DATA_DIR}/cluster"
+ export TMP_DATA_DIR
+}
+
+
+func_checkvar ()
+#---------------
# Check that an environment var is set (ie non-zero length)
# Params: $1 - env var to be checked
# Returns: 0 = env var is set (ie non-zero length)
# 1 = env var is not set
-func_checkvar ()
{
local loc_VAR=$1
if test -z ${!loc_VAR}; then
@@ -35,10 +210,12 @@
return 0
}
+
+func_checkpaths ()
+#-----------------
# Check a list of paths (each can contain ':'-separated sub-list) is set and valid (ie each path exists as a dir)
# Params: $@ - List of path env vars to be checked
# Returns: Nothing
-func_checkpaths ()
{
local loc_PATHS=$@
for path in ${loc_PATHS}; do
@@ -57,10 +234,12 @@
done
}
+
+func_checklibs ()
+#----------------
# Check that a list of libs is set and valid (ie each lib exists as an executable file)
# Params: $@ - List of lib values to be checked
# Returns: Nothing
-func_checklibs ()
{
local loc_LIBS=$@
for lib in ${loc_LIBS[@]}; do
@@ -73,10 +252,12 @@
done
}
+
+func_checkexecs ()
+#-----------------
# Check that a list of executable is set and valid (ie each exec exists as an executable file)
# Params: $@ - List of exec values to be checked
# Returns: Nothing
-func_checkexecs ()
{
local loc_EXECS=$@
for exec in ${loc_EXECS[@]}; do
@@ -89,137 +270,55 @@
done
}
-#-----------------
-srcdir=`dirname $0`
+#--- Start of script ---
-# If this script is run using parameter $1 = "LONG_TEST", then run the long test scripts
-if test x$1 == x"LONG_TEST"; then
- echo "Running long tests..."
- PYTHON_TESTNAME="long_cluster_tests.py"
-else
- PYTHON_TESTNAME="cluster_tests.py"
-fi
+func_check_required_env || exit 1 # Cannot run, exit with error
+func_check_ais || exit 0 # A warning, not a failure.
-# Check AIS requirements and run tests if found.
-id -nG | grep '\<ais\>' >/dev/null || \
- NOGROUP="You are not a member of the ais group."
-ps -u root | grep 'aisexec\|corosync' >/dev/null || \
- NOAISEXEC="The aisexec or corosync daemon is not running as root"
-
-if test -n "$NOGROUP" -o -n "$NOAISEXEC"; then
- cat <<EOF
-
- ========== WARNING: NOT RUNNING CLUSTER TESTS ============
-
- Tests that depend on the openais library (used for clustering)
- will not be run because:
-
- $NOGROUP
- $NOAISEXEC
-
- ==========================================================
-
-EOF
- exit 0; # A warning, not a failure.
+srcdir=`dirname $0`
+if test -z ${abs_srcdir}; then
+ abs_srcdir=${srcdir}
fi
+export STORE_LIB="${abs_srcdir}/../../lib/.libs/msgstore.so"
-# QPID_DIR is defined for source tree builds by the --with-qpid-checkout configure option.
-# QPID_BLD is defined as the build directory, either $QPID_DIR/cpp or separately
-# specified with the --with-qpid-build option for VPATH builds.
-# If set, then set all the env vars from the correct places in the svn source tree.
-if test "${QPID_DIR}" -a -d "${QPID_DIR}" ; then
- # Paths and dirs
- export PYTHONPATH="${QPID_DIR}/python":"${abs_srcdir}"
-
- # Libraries
- export CLUSTER_LIB="${QPID_BLD}/src/.libs/cluster.so"
- export TEST_STORE_LIB="${QPID_BLD}/src/tests/.libs/test_store.so"
-
- # Executables
- CPP_CLUSTER_EXEC="${QPID_BLD}/src/tests/cluster_test"
- PYTHON_CLUSTER_EXEC="${QPID_DIR}/cpp/src/tests/$PYTHON_TESTNAME"
- export QPIDD_EXEC="${QPID_BLD}/src/qpidd"
- export QPID_CONFIG_EXEC="${QPID_DIR}/python/commands/qpid-config"
- export QPID_ROUTE_EXEC="${QPID_DIR}/python/commands/qpid-route"
- export RECEIVER_EXEC="${QPID_BLD}/src/tests/receiver"
- export SENDER_EXEC="${QPID_BLD}/src/tests/sender"
+PYTHON_TESTNAME=cluster_tests.py
+if test "${QPID_DIR}" -a -d "${QPID_DIR}" ; then
+ func_set_svn_env
else
- if test "${QPID_PREFIX}" -a -d "${QPID_PREFIX}" ; then
- QPID_BIN_DIR=$QPID_PREFIX/bin
- QPID_SBIN_DIR=$QPID_PREFIX/sbin
- QPID_LIB_DIR=$QPID_PREFIX/lib
- QPID_LIBEXEC_DIR=$QPID_PREFIX/libexec
- fi
- # These four env vars must be set prior to calling this script
- func_checkpaths QPID_BIN_DIR QPID_SBIN_DIR QPID_LIB_DIR QPID_LIBEXEC_DIR
-
- # Paths and dirs
- export PYTHONPATH="${QPID_LIB_DIR}/python":"${QPID_LIB_DIR}/python2.4"
-
- # Libraries
- export CLUSTER_LIB="${QPID_LIB_DIR}/qpid/daemon/cluster.so"
- export TEST_STORE_LIB="${QPID_LIB_DIR}/qpid/tests/test_store.so"
-
- # Executables
- CPP_CLUSTER_EXEC="${QPID_LIBEXEC_DIR}/qpid/tests/cluster_test"
- PYTHON_CLUSTER_EXEC="${QPID_LIBEXEC_DIR}/qpid/tests/$PYTHON_TESTNAME"
- export QPIDD_EXEC="${QPID_SBIN_DIR}/qpidd"
- export QPID_CONFIG_EXEC="${QPID_BIN_DIR}/qpid-config"
- export QPID_ROUTE_EXEC="${QPID_BIN_DIR}/qpid-route"
- export RECEIVER_EXEC="${QPID_LIBEXEC_DIR}/qpid/tests/receiver"
- export SENDER_EXEC="${QPID_LIBEXEC_DIR}/qpid/tests/sender"
+ func_set_prefix_evn
fi
-export STORE_LIB="${abs_srcdir}/../../lib/.libs/msgstore.so"
+func_mk_data_dir
# Check expected environment vars are set
-func_checkpaths PYTHONPATH TMP_DATA_DIR
-func_checklibs CLUSTER_LIB TEST_STORE_LIB STORE_LIB
+func_checkpaths PYTHON_DIR PYTHONPATH TMP_DATA_DIR
+func_checklibs CLUSTER_LIB TEST_STORE_LIB STORE_LIB STORE_LIB
func_checkexecs CPP_CLUSTER_EXEC PYTHON_CLUSTER_EXEC QPIDD_EXEC QPID_CONFIG_EXEC QPID_ROUTE_EXEC RECEIVER_EXEC SENDER_EXEC
-# Run the C++ cluster tests
+FAILING_PYTHON_TESTS="${abs_srcdir}/../failing_python_tests.txt"
+if test -z $1; then
+ CLUSTER_TEST="${PYTHON_DIR}/qpid-python-test -m cluster_tests -I ${FAILING_PYTHON_TESTS} cluster_tests.ShortTests.*"
+else
+ CLUSTER_TEST="${PYTHON_DIR}/qpid-python-test -m cluster_tests -I ${FAILING_PYTHON_TESTS} cluster_tests.LongTests.*"
+ LONG_TEST=1
+fi
+
+# Run the C++ cluster tests (which are by definition short tests)
if test ! ${LONG_TEST}; then
echo "Running C++ cluster tests..."
sg ais -c "${CPP_CLUSTER_EXEC}"
RETCODE=$?
if test x${RETCODE} != x0; then
- exit 1;
+ exit 1;
fi
fi
-# --- Check for Python, then run python cluster tests ---
+func_check_qpid_python || exit 0 # A warning, not a failure.
-if python -c "import qpid" ; then
- PYTHON_TESTS=python_tests
- FAILING_PYTHON_TESTS="${abs_srcdir}/failing_python_tests.txt"
-else
- cat <<EOF
-
- =========== WARNING: PYTHON TESTS DISABLED ==============
-
- Unable to load python qpid module - skipping python tests.
-
- PYTHONPATH=${PYTHONPATH}
-
- ===========================================================
-
-EOF
- exit
-fi
-
-#Make sure temp dir exists if this is the first to use it
-if ! test -d "${TMP_DATA_DIR}" ; then
- mkdir -p "${TMP_DATA_DIR}/cluster"
-else
- # Delete old cluster test dirs
- rm -rf "${TMP_DATA_DIR}/cluster"
- mkdir -p "${TMP_DATA_DIR}/cluster"
-fi
-export TMP_DATA_DIR
-
echo "Running Python cluster tests..."
-sg ais -c "${PYTHON_CLUSTER_EXEC} -v"
+sg ais -c "${CLUSTER_TEST}"
RETCODE=$?
+
if test x${RETCODE} != x0; then
exit 1;
fi
Modified: store/trunk/cpp/tests/cluster/run_long_cluster_tests
===================================================================
--- store/trunk/cpp/tests/cluster/run_long_cluster_tests 2009-08-13 19:46:04 UTC (rev 3578)
+++ store/trunk/cpp/tests/cluster/run_long_cluster_tests 2009-08-14 19:00:10 UTC (rev 3579)
@@ -21,4 +21,4 @@
#
# The GNU Lesser General Public License is available in the file COPYING.
-./run_cluster_tests LONG_TEST
+./run_cluster_tests long_cluster_tests
Modified: store/trunk/cpp/tests/run_python_tests
===================================================================
--- store/trunk/cpp/tests/run_python_tests 2009-08-13 19:46:04 UTC (rev 3578)
+++ store/trunk/cpp/tests/run_python_tests 2009-08-14 19:00:10 UTC (rev 3579)
@@ -43,7 +43,7 @@
export PYTHONPATH=${QPID_PYTHON_DIR}:${abs_srcdir}
if python -c "import qpid" ; then
- PYTHON_TESTS=python_tests
+ PYTHON_TESTS=
FAILING_PYTHON_TESTS=${abs_srcdir}/failing_python_tests.txt
else
cat <<EOF
15 years, 4 months
rhmessaging commits: r3578 - mgmt/trunk/etc.
by rhmessaging-commits@lists.jboss.org
Author: justi9
Date: 2009-08-13 15:46:04 -0400 (Thu, 13 Aug 2009)
New Revision: 3578
Modified:
mgmt/trunk/etc/Makefile.common
Log:
Remove one more unnecessary conditional
Modified: mgmt/trunk/etc/Makefile.common
===================================================================
--- mgmt/trunk/etc/Makefile.common 2009-08-13 19:43:18 UTC (rev 3577)
+++ mgmt/trunk/etc/Makefile.common 2009-08-13 19:46:04 UTC (rev 3578)
@@ -5,10 +5,8 @@
DOC_DIR := ${PREFIX}/share/doc
SHARE_DIR := ${PREFIX}/share
-ifndef VAR_DIR
- ifeq (${PREFIX}, /usr/local)
- VAR_DIR := /var/local
- else
- VAR_DIR := ${PREFIX}/var
- endif
+ifeq (${PREFIX}, /usr/local)
+ VAR_DIR := /var/local
+else
+ VAR_DIR := ${PREFIX}/var
endif
15 years, 4 months