diff options
| author | Kim van der Riet <kpvdr@apache.org> | 2013-09-20 18:59:30 +0000 |
|---|---|---|
| committer | Kim van der Riet <kpvdr@apache.org> | 2013-09-20 18:59:30 +0000 |
| commit | c70bf3ea28cdf6bafd8571690d3e5c466a0658a2 (patch) | |
| tree | 68b24940e433f3f9c278b054d9ea1622389bd332 /qpid/tools | |
| parent | fcdf1723c7b5cdf0772054a93edb6e7d97c4bb1e (diff) | |
| download | qpid-python-c70bf3ea28cdf6bafd8571690d3e5c466a0658a2.tar.gz | |
QPID-4984: WIP - Merge from trunk r.1525056
git-svn-id: https://svn.apache.org/repos/asf/qpid/branches/linearstore@1525101 13f79535-47bb-0310-9956-ffa450edef68
Diffstat (limited to 'qpid/tools')
27 files changed, 455 insertions, 518 deletions
diff --git a/qpid/tools/setup.py b/qpid/tools/setup.py index 87ae63c903..00bffc4905 100755 --- a/qpid/tools/setup.py +++ b/qpid/tools/setup.py @@ -20,14 +20,12 @@ from distutils.core import setup setup(name="qpid-tools", - version="0.23", + version="0.25", author="Apache Qpid", author_email="dev@qpid.apache.org", package_dir={'' : 'src/py'}, packages=["qpidtoollibs"], - scripts=["src/py/qpid-cluster", - "src/py/qpid-cluster-store", - "src/py/qpid-config", + scripts=["src/py/qpid-config", "src/py/qpid-ha", "src/py/qpid-printevents", "src/py/qpid-queue-stats", diff --git a/qpid/tools/src/java/README-Java-Broker.txt b/qpid/tools/src/java/README-Java-Broker.txt index fccf19a099..992bfbeb95 100644 --- a/qpid/tools/src/java/README-Java-Broker.txt +++ b/qpid/tools/src/java/README-Java-Broker.txt @@ -1,3 +1,23 @@ +/* + * + * Licensed to the Apache Software Foundation (ASF) under one + * or more contributor license agreements. See the NOTICE file + * distributed with this work for additional information + * regarding copyright ownership. The ASF licenses this file + * to you under the Apache License, Version 2.0 (the + * "License"); you may not use this file except in compliance + * with the License. You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, + * software distributed under the License is distributed on an + * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY + * KIND, either express or implied. See the License for the + * specific language governing permissions and limitations + * under the License. + * + */ The Qpid Java Broker by default uses either JMX or an HTTP Management GUI & REST API, however by building a QMF2 Agent as a Java Broker plugin it's possible to provide better synergy between the C++ and Java Brokers diff --git a/qpid/tools/src/java/README.txt b/qpid/tools/src/java/README.txt index 3cd57605b4..0755dcd885 100644 --- a/qpid/tools/src/java/README.txt +++ b/qpid/tools/src/java/README.txt @@ -1,3 +1,23 @@ +/* + * + * Licensed to the Apache Software Foundation (ASF) under one + * or more contributor license agreements. See the NOTICE file + * distributed with this work for additional information + * regarding copyright ownership. The ASF licenses this file + * to you under the Apache License, Version 2.0 (the + * "License"); you may not use this file except in compliance + * with the License. You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, + * software distributed under the License is distributed on an + * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY + * KIND, either express or implied. See the License for the + * specific language governing permissions and limitations + * under the License. + * + */ This is a Java JMS implementation of the QMF2 API specified at https://cwiki.apache.org/qpid/qmfv2-api-proposal.html diff --git a/qpid/tools/src/java/bin/qpid-web/authentication/account.properties b/qpid/tools/src/java/bin/qpid-web/authentication/account.properties index 082c50fc70..ff30bdc55c 100644 --- a/qpid/tools/src/java/bin/qpid-web/authentication/account.properties +++ b/qpid/tools/src/java/bin/qpid-web/authentication/account.properties @@ -1,3 +1,23 @@ # +# +# Licensed to the Apache Software Foundation (ASF) under one +# or more contributor license agreements. See the NOTICE file +# distributed with this work for additional information +# regarding copyright ownership. The ASF licenses this file +# to you under the Apache License, Version 2.0 (the +# "License"); you may not use this file except in compliance +# with the License. You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, +# software distributed under the License is distributed on an +# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY +# KIND, either express or implied. See the License for the +# specific language governing permissions and limitations +# under the License. +# +# + guest=guest admin=admin diff --git a/qpid/tools/src/java/bin/qpid-web/web/index.html b/qpid/tools/src/java/bin/qpid-web/web/index.html index 7419feb02e..e21871b59f 100755 --- a/qpid/tools/src/java/bin/qpid-web/web/index.html +++ b/qpid/tools/src/java/bin/qpid-web/web/index.html @@ -1,4 +1,22 @@ <!DOCTYPE html> +<!-- + Licensed to the Apache Software Foundation (ASF) under one + or more contributor license agreements. See the NOTICE file + distributed with this work for additional information + regarding copyright ownership. The ASF licenses this file + to you under the Apache License, Version 2.0 (the + "License"); you may not use this file except in compliance + with the License. You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, + software distributed under the License is distributed on an + "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY + KIND, either express or implied. See the License for the + specific language governing permissions and limitations + under the License. +--> <!-- This page provides a "welcome" page for the Qpid REST Service it immediately redirects to ui/qmf.html diff --git a/qpid/tools/src/java/bin/qpid-web/web/itablet/css/LICENCE b/qpid/tools/src/java/bin/qpid-web/web/itablet/css/LICENCE deleted file mode 100644 index 9951afb272..0000000000 --- a/qpid/tools/src/java/bin/qpid-web/web/itablet/css/LICENCE +++ /dev/null @@ -1,29 +0,0 @@ -/* - * itablet.css - * itablet-ie9.css - * itablet-ie8.css - * itablet-ie7.css - * itablet-ie6.css - * - * Copyright (c) 2013, Fraser Adams - * - * Licensed to the Apache Software Foundation (ASF) under one - * or more contributor license agreements. See the NOTICE file - * distributed with this work for additional information - * regarding copyright ownership. The ASF licenses this file - * to you under the Apache License, Version 2.0 (the - * "License"); you may not use this file except in compliance - * with the License. You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, - * software distributed under the License is distributed on an - * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY - * KIND, either express or implied. See the License for the - * specific language governing permissions and limitations - * under the License. - * - */ - - diff --git a/qpid/tools/src/java/bin/qpid-web/web/itablet/css/itablet-ie6.css b/qpid/tools/src/java/bin/qpid-web/web/itablet/css/itablet-ie6.css index d5bb6e349a..343192efd6 100644 --- a/qpid/tools/src/java/bin/qpid-web/web/itablet/css/itablet-ie6.css +++ b/qpid/tools/src/java/bin/qpid-web/web/itablet/css/itablet-ie6.css @@ -1,3 +1,24 @@ +/* + * + * Licensed to the Apache Software Foundation (ASF) under one + * or more contributor license agreements. See the NOTICE file + * distributed with this work for additional information + * regarding copyright ownership. The ASF licenses this file + * to you under the Apache License, Version 2.0 (the + * "License"); you may not use this file except in compliance + * with the License. You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, + * software distributed under the License is distributed on an + * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY + * KIND, either express or implied. See the License for the + * specific language governing permissions and limitations + * under the License. + * + */ + /** * Stylesheet to try and make things look not *too* bad in IE6 and below. Supporting IE6 really is a nightmare :-( */ diff --git a/qpid/tools/src/java/bin/qpid-web/web/itablet/css/itablet-ie7.css b/qpid/tools/src/java/bin/qpid-web/web/itablet/css/itablet-ie7.css index d7a5b092eb..d8bd020662 100644 --- a/qpid/tools/src/java/bin/qpid-web/web/itablet/css/itablet-ie7.css +++ b/qpid/tools/src/java/bin/qpid-web/web/itablet/css/itablet-ie7.css @@ -1,3 +1,24 @@ +/* + * + * Licensed to the Apache Software Foundation (ASF) under one + * or more contributor license agreements. See the NOTICE file + * distributed with this work for additional information + * regarding copyright ownership. The ASF licenses this file + * to you under the Apache License, Version 2.0 (the + * "License"); you may not use this file except in compliance + * with the License. You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, + * software distributed under the License is distributed on an + * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY + * KIND, either express or implied. See the License for the + * specific language governing permissions and limitations + * under the License. + * + */ + /** * Stylesheet to try and make things look not *too* bad in IE7. */ diff --git a/qpid/tools/src/java/bin/qpid-web/web/itablet/css/itablet-ie8.css b/qpid/tools/src/java/bin/qpid-web/web/itablet/css/itablet-ie8.css index 455a40a3e2..f2cb4d8126 100644 --- a/qpid/tools/src/java/bin/qpid-web/web/itablet/css/itablet-ie8.css +++ b/qpid/tools/src/java/bin/qpid-web/web/itablet/css/itablet-ie8.css @@ -1,3 +1,24 @@ +/* + * + * Licensed to the Apache Software Foundation (ASF) under one + * or more contributor license agreements. See the NOTICE file + * distributed with this work for additional information + * regarding copyright ownership. The ASF licenses this file + * to you under the Apache License, Version 2.0 (the + * "License"); you may not use this file except in compliance + * with the License. You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, + * software distributed under the License is distributed on an + * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY + * KIND, either express or implied. See the License for the + * specific language governing permissions and limitations + * under the License. + * + */ + /** * Stylesheet to try and make things look not *too* bad in IE8 and below */ diff --git a/qpid/tools/src/java/bin/qpid-web/web/itablet/css/itablet-ie9.css b/qpid/tools/src/java/bin/qpid-web/web/itablet/css/itablet-ie9.css index 8af2058a70..3ad857559e 100644 --- a/qpid/tools/src/java/bin/qpid-web/web/itablet/css/itablet-ie9.css +++ b/qpid/tools/src/java/bin/qpid-web/web/itablet/css/itablet-ie9.css @@ -1,3 +1,24 @@ +/* + * + * Licensed to the Apache Software Foundation (ASF) under one + * or more contributor license agreements. See the NOTICE file + * distributed with this work for additional information + * regarding copyright ownership. The ASF licenses this file + * to you under the Apache License, Version 2.0 (the + * "License"); you may not use this file except in compliance + * with the License. You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, + * software distributed under the License is distributed on an + * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY + * KIND, either express or implied. See the License for the + * specific language governing permissions and limitations + * under the License. + * + */ + /** * Stylesheet to sort out IE9 specific quirks....... */ diff --git a/qpid/tools/src/java/bin/qpid-web/web/itablet/css/itablet.css b/qpid/tools/src/java/bin/qpid-web/web/itablet/css/itablet.css index 82498634dd..6ed4d3d7d3 100644 --- a/qpid/tools/src/java/bin/qpid-web/web/itablet/css/itablet.css +++ b/qpid/tools/src/java/bin/qpid-web/web/itablet/css/itablet.css @@ -1,3 +1,23 @@ +/* + * + * Licensed to the Apache Software Foundation (ASF) under one + * or more contributor license agreements. See the NOTICE file + * distributed with this work for additional information + * regarding copyright ownership. The ASF licenses this file + * to you under the Apache License, Version 2.0 (the + * "License"); you may not use this file except in compliance + * with the License. You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, + * software distributed under the License is distributed on an + * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY + * KIND, either express or implied. See the License for the + * specific language governing permissions and limitations + * under the License. + * + */ body { diff --git a/qpid/tools/src/java/bin/qpid-web/web/itablet/scripts/LICENCE b/qpid/tools/src/java/bin/qpid-web/web/itablet/scripts/LICENCE index 42cf8a1198..7d95218a1e 100644 --- a/qpid/tools/src/java/bin/qpid-web/web/itablet/scripts/LICENCE +++ b/qpid/tools/src/java/bin/qpid-web/web/itablet/scripts/LICENCE @@ -1,27 +1,3 @@ -/* - * itablet.js - * - * Copyright (c) 2013, Fraser Adams - * - * Licensed to the Apache Software Foundation (ASF) under one - * or more contributor license agreements. See the NOTICE file - * distributed with this work for additional information - * regarding copyright ownership. The ASF licenses this file - * to you under the Apache License, Version 2.0 (the - * "License"); you may not use this file except in compliance - * with the License. You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, - * software distributed under the License is distributed on an - * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY - * KIND, either express or implied. See the License for the - * specific language governing permissions and limitations - * under the License. - * - */ - /* * jQuery JavaScript Library v1.7.1 diff --git a/qpid/tools/src/java/bin/qpid-web/web/itablet/scripts/itablet.js b/qpid/tools/src/java/bin/qpid-web/web/itablet/scripts/itablet.js index cc891d4c76..c6f84bcf53 100644 --- a/qpid/tools/src/java/bin/qpid-web/web/itablet/scripts/itablet.js +++ b/qpid/tools/src/java/bin/qpid-web/web/itablet/scripts/itablet.js @@ -1,5 +1,25 @@ +/* + * + * Licensed to the Apache Software Foundation (ASF) under one + * or more contributor license agreements. See the NOTICE file + * distributed with this work for additional information + * regarding copyright ownership. The ASF licenses this file + * to you under the Apache License, Version 2.0 (the + * "License"); you may not use this file except in compliance + * with the License. You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, + * software distributed under the License is distributed on an + * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY + * KIND, either express or implied. See the License for the + * specific language governing permissions and limitations + * under the License. + * + */ + /** - * http://www.apache.org/licenses/LICENSE-2.0 * * This library implements a general user interface look and feel similar to a "well know tablet PC" :-) * It provides animated page transition eye-candy but is, in essence, really just a fancy tabbed window. diff --git a/qpid/tools/src/java/bin/qpid-web/web/qmf-ui/css/LICENCE b/qpid/tools/src/java/bin/qpid-web/web/qmf-ui/css/LICENCE deleted file mode 100644 index 5d56a81cb8..0000000000 --- a/qpid/tools/src/java/bin/qpid-web/web/qmf-ui/css/LICENCE +++ /dev/null @@ -1,26 +0,0 @@ -/* - * index.css - * qmf.css - * - * Copyright (c) 2013, Fraser Adams - * - * Licensed to the Apache Software Foundation (ASF) under one - * or more contributor license agreements. See the NOTICE file - * distributed with this work for additional information - * regarding copyright ownership. The ASF licenses this file - * to you under the Apache License, Version 2.0 (the - * "License"); you may not use this file except in compliance - * with the License. You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, - * software distributed under the License is distributed on an - * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY - * KIND, either express or implied. See the License for the - * specific language governing permissions and limitations - * under the License. - * - */ - - diff --git a/qpid/tools/src/java/bin/qpid-web/web/qmf-ui/css/index.css b/qpid/tools/src/java/bin/qpid-web/web/qmf-ui/css/index.css index e6baccf862..0032bedca1 100644 --- a/qpid/tools/src/java/bin/qpid-web/web/qmf-ui/css/index.css +++ b/qpid/tools/src/java/bin/qpid-web/web/qmf-ui/css/index.css @@ -1,3 +1,24 @@ +/* + * + * Licensed to the Apache Software Foundation (ASF) under one + * or more contributor license agreements. See the NOTICE file + * distributed with this work for additional information + * regarding copyright ownership. The ASF licenses this file + * to you under the Apache License, Version 2.0 (the + * "License"); you may not use this file except in compliance + * with the License. You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, + * software distributed under the License is distributed on an + * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY + * KIND, either express or implied. See the License for the + * specific language governing permissions and limitations + * under the License. + * + */ + html { background: black; diff --git a/qpid/tools/src/java/bin/qpid-web/web/qmf-ui/css/qmf.css b/qpid/tools/src/java/bin/qpid-web/web/qmf-ui/css/qmf.css index 918c4b5e22..11ca7fad12 100644 --- a/qpid/tools/src/java/bin/qpid-web/web/qmf-ui/css/qmf.css +++ b/qpid/tools/src/java/bin/qpid-web/web/qmf-ui/css/qmf.css @@ -1,3 +1,23 @@ +/* + * + * Licensed to the Apache Software Foundation (ASF) under one + * or more contributor license agreements. See the NOTICE file + * distributed with this work for additional information + * regarding copyright ownership. The ASF licenses this file + * to you under the Apache License, Version 2.0 (the + * "License"); you may not use this file except in compliance + * with the License. You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, + * software distributed under the License is distributed on an + * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY + * KIND, either express or implied. See the License for the + * specific language governing permissions and limitations + * under the License. + * + */ a.settings { diff --git a/qpid/tools/src/java/bin/qpid-web/web/qmf-ui/scripts/LICENCE b/qpid/tools/src/java/bin/qpid-web/web/qmf-ui/scripts/LICENCE index 91c70259c7..e90b016701 100644 --- a/qpid/tools/src/java/bin/qpid-web/web/qmf-ui/scripts/LICENCE +++ b/qpid/tools/src/java/bin/qpid-web/web/qmf-ui/scripts/LICENCE @@ -1,27 +1,3 @@ -/* - * qmf-ui.js - * - * Copyright (c) 2013, Fraser Adams - * - * Licensed to the Apache Software Foundation (ASF) under one - * or more contributor license agreements. See the NOTICE file - * distributed with this work for additional information - * regarding copyright ownership. The ASF licenses this file - * to you under the Apache License, Version 2.0 (the - * "License"); you may not use this file except in compliance - * with the License. You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, - * software distributed under the License is distributed on an - * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY - * KIND, either express or implied. See the License for the - * specific language governing permissions and limitations - * under the License. - * - */ - /* * excanvas.js diff --git a/qpid/tools/src/java/bin/qpid-web/web/qmf-ui/scripts/qmf-ui.js b/qpid/tools/src/java/bin/qpid-web/web/qmf-ui/scripts/qmf-ui.js index 0c59e126d5..6ec55cbcb2 100644 --- a/qpid/tools/src/java/bin/qpid-web/web/qmf-ui/scripts/qmf-ui.js +++ b/qpid/tools/src/java/bin/qpid-web/web/qmf-ui/scripts/qmf-ui.js @@ -1,5 +1,25 @@ +/* + * + * Licensed to the Apache Software Foundation (ASF) under one + * or more contributor license agreements. See the NOTICE file + * distributed with this work for additional information + * regarding copyright ownership. The ASF licenses this file + * to you under the Apache License, Version 2.0 (the + * "License"); you may not use this file except in compliance + * with the License. You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, + * software distributed under the License is distributed on an + * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY + * KIND, either express or implied. See the License for the + * specific language governing permissions and limitations + * under the License. + * + */ + /** - * http://www.apache.org/licenses/LICENSE-2.0 * * This program implements the QMF Console User Interface logic for qmf.html * diff --git a/qpid/tools/src/java/bin/qpid-web/web/ui/config.js b/qpid/tools/src/java/bin/qpid-web/web/ui/config.js index c847d2e0c3..a37de988ca 100644 --- a/qpid/tools/src/java/bin/qpid-web/web/ui/config.js +++ b/qpid/tools/src/java/bin/qpid-web/web/ui/config.js @@ -1,9 +1,31 @@ +/* + * + * Licensed to the Apache Software Foundation (ASF) under one + * or more contributor license agreements. See the NOTICE file + * distributed with this work for additional information + * regarding copyright ownership. The ASF licenses this file + * to you under the Apache License, Version 2.0 (the + * "License"); you may not use this file except in compliance + * with the License. You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, + * software distributed under the License is distributed on an + * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY + * KIND, either express or implied. See the License for the + * specific language governing permissions and limitations + * under the License. + * + */ + /** * This file allows the initial set of Console Connections to be configured and delivered to the client. * The format is as a JSON array of JSON objects containing a url property and optional name, connectionOptions and * disableEvents properties. The connectionOptions property has a value that is itself a JSON object containing * the connectionOptions supported by the qpid::messaging API. */ + /* // Example Console Connection Configuration. qmfui.Console.consoleConnections = [ diff --git a/qpid/tools/src/java/bin/qpid-web/web/ui/qmf.html b/qpid/tools/src/java/bin/qpid-web/web/ui/qmf.html index af3e7f1f95..9709489e3a 100644 --- a/qpid/tools/src/java/bin/qpid-web/web/ui/qmf.html +++ b/qpid/tools/src/java/bin/qpid-web/web/ui/qmf.html @@ -1,4 +1,24 @@ <!DOCTYPE html> + +<!-- + Licensed to the Apache Software Foundation (ASF) under one + or more contributor license agreements. See the NOTICE file + distributed with this work for additional information + regarding copyright ownership. The ASF licenses this file + to you under the Apache License, Version 2.0 (the + "License"); you may not use this file except in compliance + with the License. You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, + software distributed under the License is distributed on an + "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY + KIND, either express or implied. See the License for the + specific language governing permissions and limitations + under the License. +--> + <html> <head> <title>QMF Console</title> diff --git a/qpid/tools/src/java/src/qpid-broker-plugins-management-qmf2/java/org/apache/qpid/server/qmf2/QmfManagementFactory.java b/qpid/tools/src/java/src/qpid-broker-plugins-management-qmf2/java/org/apache/qpid/server/qmf2/QmfManagementFactory.java index de6376a2d9..ec4ed37556 100644 --- a/qpid/tools/src/java/src/qpid-broker-plugins-management-qmf2/java/org/apache/qpid/server/qmf2/QmfManagementFactory.java +++ b/qpid/tools/src/java/src/qpid-broker-plugins-management-qmf2/java/org/apache/qpid/server/qmf2/QmfManagementFactory.java @@ -76,4 +76,10 @@ public class QmfManagementFactory implements PluginFactory return null; } } + + @Override + public String getType() + { + return "QMF2 Management"; + } } diff --git a/qpid/tools/src/java/src/qpid-broker-plugins-management-qmf2/java/org/apache/qpid/server/qmf2/agentdata/Session.java b/qpid/tools/src/java/src/qpid-broker-plugins-management-qmf2/java/org/apache/qpid/server/qmf2/agentdata/Session.java new file mode 100644 index 0000000000..cea6619bad --- /dev/null +++ b/qpid/tools/src/java/src/qpid-broker-plugins-management-qmf2/java/org/apache/qpid/server/qmf2/agentdata/Session.java @@ -0,0 +1,118 @@ +/* + * + * Licensed to the Apache Software Foundation (ASF) under one + * or more contributor license agreements. See the NOTICE file + * distributed with this work for additional information + * regarding copyright ownership. The ASF licenses this file + * to you under the Apache License, Version 2.0 (the + * "License"); you may not use this file except in compliance + * with the License. You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, + * software distributed under the License is distributed on an + * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY + * KIND, either express or implied. See the License for the + * specific language governing permissions and limitations + * under the License. + * + */ + +package org.apache.qpid.server.qmf2.agentdata; + +// Misc Imports +import java.util.Collections; +import java.util.Map; + +// Simple Logging Facade 4 Java +import org.slf4j.Logger; +import org.slf4j.LoggerFactory; + +// QMF2 Imports +import org.apache.qpid.qmf2.agent.QmfAgentData; +import org.apache.qpid.qmf2.common.ObjectId; +//import org.apache.qpid.qmf2.common.SchemaEventClass; +//import org.apache.qpid.qmf2.common.SchemaMethod; +import org.apache.qpid.qmf2.common.SchemaObjectClass; +//import org.apache.qpid.qmf2.common.SchemaProperty; + +import org.apache.qpid.server.model.Statistics; + +/** + * This class provides a concrete implementation of QmfAgentData for the Session Management Object. + * In general it's possible to use QmfAgentData without sub-classing as it's really a "bean" style class + * that retains its properties in a Map, but in the case of the Java Broker Management Agent it's useful + * to sub-class as we need to map between the properties/statistics as specified in the Java Broker + * management model and those specified in qpid/spec/management-schema.xml which is what the C++ broker + * uses. This class retains a reference to its peer org.apache.qpid.server.model.Consumer and does the + * necessary mapping when its mapEncode() method is called (which is used to serialise the QmfAgentData). + * + * @author Fraser Adams + */ +public class Session extends QmfAgentData +{ + private static final Logger _log = LoggerFactory.getLogger(Session.class); + + /** + * This static initialiser block initialises the QMF2 Schema information needed by the Agent to find + * QmfAgentData and QmfEvent Objects of a given type. + */ + private static final SchemaObjectClass _schema; + + /** + * Returns the schema for the Session class. + * @return the SchemaObjectClass for the Session class. + */ + public static SchemaObjectClass getSchema() + { + return _schema; + } + + static + { + // Declare the schema for the QMF2 session class. + _schema = new SchemaObjectClass("org.apache.qpid.broker", "session"); + + // TODO + //_schema.addProperty(new SchemaProperty("whatHappened", QmfType.TYPE_STRING)); + } + // End of static initialiser. + + private final org.apache.qpid.server.model.Session _session; + + /** + * Constructor. + * @param session the Session ConfiguredObject from the broker model. + * @param connectionRef the ObjectId of the Connection Object that is the parent of the Session. + */ + public Session(final org.apache.qpid.server.model.Session session, final ObjectId connectionRef) + { + super(getSchema()); + _session = session; // Will eventually be used in mapEncode() to retrieve statistics. + + setValue("name", session.getAttribute("id")); // Use ID to be consistent with C++ Broker. + setValue("channelId", session.getName()); // The Java Broker name uses the channelId. + setRefValue("connectionRef", connectionRef); + } + + /** + * This method maps the org.apache.qpid.server.model.Session to QMF2 subscribe properties where possible then + * serialises into the underlying Map for transmission via AMQP. This method is called by handleQueryRequest() + * in the org.apache.qpid.qmf2.agent.Agent class implementing the main QMF2 Agent behaviour. + * + * @return the underlying map. + */ + @Override + public Map<String, Object> mapEncode() + { + // Statistics + + Statistics stats = _session.getStatistics(); + setValue("unackedMessages", stats.getStatistic("unacknowledgedMessages")); + + update(); // TODO Only Update if statistics have changes. + + return super.mapEncode(); + } +} diff --git a/qpid/tools/src/java/src/restapi/java/org/apache/qpid/restapi/servlet/TODO b/qpid/tools/src/java/src/restapi/java/org/apache/qpid/restapi/servlet/TODO index 1c3eabcbb1..9da5ee871a 100644 --- a/qpid/tools/src/java/src/restapi/java/org/apache/qpid/restapi/servlet/TODO +++ b/qpid/tools/src/java/src/restapi/java/org/apache/qpid/restapi/servlet/TODO @@ -1,3 +1,24 @@ +/* + * + * Licensed to the Apache Software Foundation (ASF) under one + * or more contributor license agreements. See the NOTICE file + * distributed with this work for additional information + * regarding copyright ownership. The ASF licenses this file + * to you under the Apache License, Version 2.0 (the + * "License"); you may not use this file except in compliance + * with the License. You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, + * software distributed under the License is distributed on an + * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY + * KIND, either express or implied. See the License for the + * specific language governing permissions and limitations + * under the License. + * + */ + The org.apache.qpid.restapi.HttpTransaction and org.apache.qpid.restapi.Server interfaces are intended to provide abstractions to the underlying HTTP Server technology and thus should make it fairly easy to do a Servlet based implementation without having to rewrite the core REST API code. A Servlet implementation diff --git a/qpid/tools/src/py/.gitignore b/qpid/tools/src/py/.gitignore index b775fd83a1..628d81888c 100644 --- a/qpid/tools/src/py/.gitignore +++ b/qpid/tools/src/py/.gitignore @@ -17,7 +17,6 @@ # to you under the Apache License, Version 2.0 (the # under the License. # with the License. You may obtain a copy of the License at -/qpid-clusterc /qpid-configc /qpid-hac /qpid-routec diff --git a/qpid/tools/src/py/qpid-cluster b/qpid/tools/src/py/qpid-cluster deleted file mode 100755 index d75a10f6e8..0000000000 --- a/qpid/tools/src/py/qpid-cluster +++ /dev/null @@ -1,326 +0,0 @@ -#!/usr/bin/env python - -# -# Licensed to the Apache Software Foundation (ASF) under one -# or more contributor license agreements. See the NOTICE file -# distributed with this work for additional information -# regarding copyright ownership. The ASF licenses this file -# to you under the Apache License, Version 2.0 (the -# "License"); you may not use this file except in compliance -# with the License. You may obtain a copy of the License at -# -# http://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, -# software distributed under the License is distributed on an -# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY -# KIND, either express or implied. See the License for the -# specific language governing permissions and limitations -# under the License. -# - -import os -from optparse import OptionParser, OptionGroup -import sys -import locale -import socket -import re -from qmf.console import Session - -class Config: - def __init__(self): - self._host = "localhost" - self._connTimeout = 10 - self._stopId = None - self._stopAll = False - self._force = False - self._numeric = False - self._showConn = False - self._delConn = None - -class IpAddr: - def __init__(self, text): - if text.find("@") != -1: - tokens = text.split("@") - text = tokens[1] - if text.find(":") != -1: - tokens = text.split(":") - text = tokens[0] - self.port = int(tokens[1]) - else: - self.port = 5672 - self.dottedQuad = socket.gethostbyname(text) - nums = self.dottedQuad.split(".") - self.addr = (int(nums[0]) << 24) + (int(nums[1]) << 16) + (int(nums[2]) << 8) + int(nums[3]) - - def bestAddr(self, addrPortList): - bestDiff = 0xFFFFFFFFL - bestAddr = None - for addrPort in addrPortList: - diff = IpAddr(addrPort[0]).addr ^ self.addr - if diff < bestDiff: - bestDiff = diff - bestAddr = addrPort - return bestAddr - -class BrokerManager: - def __init__(self, config, conn_options): - self.config = config - self.cert = None - self.conn_options = conn_options - self.brokerName = None - self.qmf = None - self.broker = None - self.brokers = [] - - def SetBroker(self, brokerUrl): - self.url = brokerUrl - self.qmf = Session() - self.broker = self.qmf.addBroker(brokerUrl, self.config._connTimeout, **self.conn_options) - agents = self.qmf.getAgents() - for a in agents: - if a.getAgentBank() == '0': - self.brokerAgent = a - - def Disconnect(self): - """ Release any allocated brokers. Ignore any failures as the tool is - shutting down. - """ - try: - if self.broker: - self.qmf.delBroker(self.broker) - self.broker = None - while len(self.brokers): - b = self.brokers.pop() - self.qmf.delBroker(b) - except: - pass - - def _getClusters(self): - packages = self.qmf.getPackages() - if "org.apache.qpid.cluster" not in packages: - raise Exception("Clustering is not installed on the broker.") - - clusters = self.qmf.getObjects(_class="cluster", _agent=self.brokerAgent) - if len(clusters) == 0: - raise Exception("Clustering is installed but not enabled on the broker.") - - return clusters - - def _getHostList(self, urlList): - hosts = [] - hostAddr = IpAddr(self.config._host) - for url in urlList: - if url.find("amqp:") != 0: - raise Exception("Invalid URL 1") - url = url[5:] - addrs = str(url).split(",") - addrList = [] - for addr in addrs: - tokens = addr.split(":") - if len(tokens) != 3: - raise Exception("Invalid URL 2") - addrList.append((tokens[1], tokens[2])) - - # Find the address in the list that is most likely to be in the same subnet as the address - # with which we made the original QMF connection. This increases the probability that we will - # be able to reach the cluster member. - - best = hostAddr.bestAddr(addrList) - bestUrl = best[0] + ":" + best[1] - hosts.append(bestUrl) - return hosts - - def overview(self): - clusters = self._getClusters() - cluster = clusters[0] - memberList = cluster.members.split(";") - idList = cluster.memberIDs.split(";") - - print " Cluster Name: %s" % cluster.clusterName - print "Cluster Status: %s" % cluster.status - print " Cluster Size: %d" % cluster.clusterSize - print " Members: ID=%s URL=%s" % (idList[0], memberList[0]) - for idx in range(1,len(idList)): - print " : ID=%s URL=%s" % (idList[idx], memberList[idx]) - - def stopMember(self, id): - clusters = self._getClusters() - cluster = clusters[0] - idList = cluster.memberIDs.split(";") - if id not in idList: - raise Exception("No member with matching ID found") - - if not self.config._force: - prompt = "Warning: " - if len(idList) == 1: - prompt += "This command will shut down the last running cluster member." - else: - prompt += "This command will shut down a cluster member." - prompt += " Are you sure? [N]: " - - confirm = raw_input(prompt) - if len(confirm) == 0 or confirm[0].upper() != 'Y': - raise Exception("Operation canceled") - - cluster.stopClusterNode(id) - - def stopAll(self): - clusters = self._getClusters() - if not self.config._force: - prompt = "Warning: This command will shut down the entire cluster." - prompt += " Are you sure? [N]: " - - confirm = raw_input(prompt) - if len(confirm) == 0 or confirm[0].upper() != 'Y': - raise Exception("Operation canceled") - - cluster = clusters[0] - cluster.stopFullCluster() - - def showConnections(self): - clusters = self._getClusters() - cluster = clusters[0] - memberList = cluster.members.split(";") - idList = cluster.memberIDs.split(";") - displayList = [] - hostList = self._getHostList(memberList) - self.qmf.delBroker(self.broker) - self.broker = None - - idx = 0 - for host in hostList: - if self.config._showConn == "all" or self.config._showConn == idList[idx] or self.config._delConn: - self.brokers.append(self.qmf.addBroker(host, self.config._connTimeout)) - displayList.append(idList[idx]) - idx += 1 - - idx = 0 - found = False - for broker in self.brokers: - if not self.config._delConn: - print "Clients on Member: ID=%s:" % displayList[idx] - connList = self.qmf.getObjects(_class="connection", _package="org.apache.qpid.broker", _broker=broker) - for conn in connList: - if not conn.shadow: - if self.config._numeric or self.config._delConn: - a = conn.address - else: - tokens = conn.address.split(":") - try: - hostList = socket.gethostbyaddr(tokens[0]) - host = hostList[0] - except: - host = tokens[0] - a = host + ":" + tokens[1] - if self.config._delConn: - tokens = self.config._delConn.split(":") - ip = socket.gethostbyname(tokens[0]) - toDelete = ip + ":" + tokens[1] - if a == toDelete: - print "Closing connection from client: %s" % a - conn.close() - found = True - else: - print " %s" % a - idx += 1 - if not self.config._delConn: - print - if self.config._delConn and not found: - print "Client connection '%s' not found" % self.config._delConn - - while len(self.brokers): - broker = self.brokers.pop() - self.qmf.delBroker(broker) - -def main(argv=None): - - try: - config = Config() - - parser = OptionParser(usage="usage: %prog [options] BROKER", - description="Example: $ qpid-cluster -C broker-host:10000") - - parser.add_option("-t", "--timeout", action="store", type="int", default=10, metavar="SECS", help="Maximum time to wait for broker connection (in seconds)") - parser.add_option("--sasl-mechanism", action="store", type="string", metavar="<mech>", help="SASL mechanism for authentication (e.g. EXTERNAL, ANONYMOUS, PLAIN, CRAM-MD, DIGEST-MD5, GSSAPI). SASL automatically picks the most secure available mechanism - use this option to override.") - parser.add_option("--ssl-certificate", action="store", type="string", metavar="<cert>", help="Client SSL certificate (PEM Format)") - parser.add_option("--ssl-key", action="store", type="string", metavar="<key>", help="Client SSL private key (PEM Format)") - parser.add_option("-C", "--all-connections", action="store_true", default=False, help="View client connections to all cluster members") - parser.add_option("-c", "--connections", metavar="ID", help="View client connections to specified member") - parser.add_option("-d", "--del-connection", metavar="HOST:PORT", help="Disconnect a client connection") - parser.add_option("-s", "--stop", metavar="ID", help="Stop one member of the cluster by its ID") - parser.add_option("-k", "--all-stop", action="store_true", default=False, help="Shut down the whole cluster") - parser.add_option("-f", "--force", action="store_true", default=False, help="Suppress the 'are you sure' prompt") - parser.add_option("-n", "--numeric", action="store_true", default=False, help="Don't resolve names") - - opts, args = parser.parse_args(args=argv) - - if args: - config._host = args[0] - - if opts.timeout != 0: - config._connTimeout = opts.timeout - else: - config._connTimeout = None - - if opts.all_connections: - config._showConn = "all" - - if opts.connections: - config._connections = opts.connections - if len(config._connections.split(":")) != 2: - parser.error("Member ID must be of form: <host or ip>:<number>") - - if opts.del_connection: - config._delConn = opts.del_connection - if len(config._delConn.split(":")) != 2: - parser.error("Member ID must be of form: <host or ip>:<number>") - - if opts.stop: - config._stopId = opts.stop - if len(config._stopId.split(":")) != 2: - parser.error("Member ID must be of form: <host or ip>:<number>") - - if opts.ssl_key and not opts.ssl_certificate: - parser.error("missing '--ssl-certificate' (required by '--ssl-key')") - - config._stopAll = opts.all_stop - config._force = opts.force - config._numeric = opts.numeric - - conn_options = {} - if opts.sasl_mechanism: - conn_options['mechanisms'] = opts.sasl_mechanism - if opts.ssl_certificate: - conn_options['ssl_certfile'] = opts.ssl_certificate - if opts.ssl_key: - conn_options['ssl_keyfile'] = opts.ssl_key - - bm = BrokerManager(config, conn_options) - - try: - bm.SetBroker(config._host) - if config._stopId: - bm.stopMember(config._stopId) - elif config._stopAll: - bm.stopAll() - elif config._showConn or config._delConn: - bm.showConnections() - else: - bm.overview() - except KeyboardInterrupt: - print - except Exception,e: - bm.Disconnect() # try to deallocate brokers - ignores errors - if str(e).find("connection aborted") > 0: - # we expect this when asking the connected broker to shut down - return 0 - raise Exception("Failed: %s - %s" % (e.__class__.__name__, e)) - - bm.Disconnect() - except Exception, e: - print str(e) - return 1 - -if __name__ == "__main__": - sys.exit(main()) diff --git a/qpid/tools/src/py/qpid-cluster-store b/qpid/tools/src/py/qpid-cluster-store deleted file mode 100755 index 3541b6679c..0000000000 --- a/qpid/tools/src/py/qpid-cluster-store +++ /dev/null @@ -1,75 +0,0 @@ -#!/usr/bin/env python - -# -# Licensed to the Apache Software Foundation (ASF) under one -# or more contributor license agreements. See the NOTICE file -# distributed with this work for additional information -# regarding copyright ownership. The ASF licenses this file -# to you under the Apache License, Version 2.0 (the -# "License"); you may not use this file except in compliance -# with the License. You may obtain a copy of the License at -# -# http://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, -# software distributed under the License is distributed on an -# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY -# KIND, either express or implied. See the License for the -# specific language governing permissions and limitations -# under the License. -# - - -from qpid.datatypes import uuid4, UUID, parseUUID -import optparse, os.path, sys, string - -op = optparse.OptionParser( - usage="usage: %prog [options] DATADIR", - description="View or modify cluster store status for broker with data-directory DATADIR") -op.add_option("-d", "--display", default=False, action="store_true", help="display store status." ) -op.add_option("-c", "--mark-clean", default=False, action="store_true", help="mark the store as clean." ) - -class ClusterStoreStatus: - """Load/save/display store status file""" - - null_uuid=UUID(bytes='\0'*16) - - def __init__(self, file): - self.file = file - self.read() - - def read(self): - f = open(self.file) - try: self.cluster_id, self.shutdown_id = [parseUUID(string.rstrip(s)) for s in f.readlines()] - finally: f.close() - - def write(self): - f = open(self.file,"w") - try: - for u in [self.cluster_id, self.shutdown_id]: f.write(str(u)+"\n") - finally: f.close() - - def status(self): - if (self.cluster_id == self.null_uuid): return "empty" - if (self.shutdown_id == self.null_uuid): return "dirty" - return "clean" - - def __str__(self): - return "status: %s\ncluster-id: %s\nshutdown_id: %s" % ( - self.status(), self.cluster_id, self.shutdown_id) - - def mark_clean(self): - self.shutdown_id = uuid4() - self.write() - -def main(argv=None): - opts, args = op.parse_args(args=argv) - if len(args) != 1: op.error("incorrect number of arguments") - try: status = ClusterStoreStatus(args[0]+"/cluster/store.status") - except Exception,e: print e; return 1 - if opts.display: print status - if opts.mark_clean: status.mark_clean(); print status - return 0 - -if __name__ == "__main__": - sys.exit(main()) diff --git a/qpid/tools/src/py/qpid-config b/qpid/tools/src/py/qpid-config index ecb880be21..1e995674c4 100755 --- a/qpid/tools/src/py/qpid-config +++ b/qpid/tools/src/py/qpid-config @@ -66,9 +66,7 @@ Queue Limit Actions: none (default) - Use broker's default policy reject - Reject enqueued messages - flow-to-disk - Page messages to disk ring - Replace oldest unacquired message with new - ring-strict - Replace oldest message, reject if oldest is acquired Replication levels: @@ -198,7 +196,7 @@ def OptionsAndArguments(argv): group3.add_option("--file-size", action="store", type="int", metavar="<n>", help="File size in pages (64KiB/page)") group3.add_option("--max-queue-size", action="store", type="int", metavar="<n>", help="Maximum in-memory queue size as bytes") group3.add_option("--max-queue-count", action="store", type="int", metavar="<n>", help="Maximum in-memory queue size as a number of messages") - group3.add_option("--limit-policy", action="store", choices=["none", "reject", "flow-to-disk", "ring", "ring-strict"], metavar="<policy>", help="Action to take when queue limit is reached") + group3.add_option("--limit-policy", action="store", choices=["none", "reject", "ring", "ring-strict"], metavar="<policy>", help="Action to take when queue limit is reached") group3.add_option("--lvq-key", action="store", metavar="<key>", help="Last Value Queue key") group3.add_option("--generate-queue-events", action="store", type="int", metavar="<n>", help="If set to 1, every enqueue will generate an event that can be processed by registered listeners (e.g. for replication). If set to 2, events will be generated for enqueues and dequeues.") group3.add_option("--flow-stop-size", action="store", type="int", metavar="<n>", @@ -597,12 +595,8 @@ class BrokerManager: pass elif config._limitPolicy == "reject": declArgs[POLICY_TYPE] = "reject" - elif config._limitPolicy == "flow-to-disk": - declArgs[POLICY_TYPE] = "flow_to_disk" elif config._limitPolicy == "ring": declArgs[POLICY_TYPE] = "ring" - elif config._limitPolicy == "ring-strict": - declArgs[POLICY_TYPE] = "ring_strict" if config._clusterDurable: declArgs[CLUSTER_DURABLE] = 1 |
