diff options
Diffstat (limited to 'src')
993 files changed, 22590 insertions, 15539 deletions
diff --git a/src/com.gluster.storage.management.client/build.properties b/src/com.gluster.storage.management.client/build.properties deleted file mode 100644 index bc0c59d7..00000000 --- a/src/com.gluster.storage.management.client/build.properties +++ /dev/null @@ -1,15 +0,0 @@ -source.. = src/ -output.. = bin/ -bin.includes = .,\ - META-INF/,\ - lib/,\ - keystore/,\ - lib/jersey-1.5/jersey-multipart-1.5.jar -src.includes = src/,\ - lib/,\ - keystore/,\ - build.properties,\ - .project,\ - .classpath,\ - .settings/,\ - META-INF/ diff --git a/src/com.gluster.storage.management.client/src/com/gluster/storage/management/client/constants/ClientConstants.java b/src/com.gluster.storage.management.client/src/com/gluster/storage/management/client/constants/ClientConstants.java deleted file mode 100644 index e253dfa5..00000000 --- a/src/com.gluster.storage.management.client/src/com/gluster/storage/management/client/constants/ClientConstants.java +++ /dev/null @@ -1,39 +0,0 @@ -/** - * ClientConstants.java - * - * Copyright (c) 2011 Gluster, Inc. <http://www.gluster.com> - * This file is part of Gluster Management Console. - * - * Gluster Management Console is free software; you can redistribute it and/or - * modify it under the terms of the GNU Affero General Public License as published - * by the Free Software Foundation; either version 3 of the License, or - * (at your option) any later version. - * - * Gluster Management Console is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY - * or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Affero General Public License - * for more details. - * - * You should have received a copy of the GNU Affero General Public License - * along with this program. If not, see - * <http://www.gnu.org/licenses/>. - */ -package com.gluster.storage.management.client.constants; - -/** - * - */ -public class ClientConstants { - public static final String SYS_PROP_SERVER_URL = "gluster.server.url"; - public static final String DEFAULT_SERVER_URL = "https://localhost:8443/glustermg/linux.gtk.x86_64"; - public static final String CONTEXT_ROOT = "glustermg"; - public static final String REST_API_VERSION = "1.0.0"; - - // SSL related - public static final String TRUSTED_KEYSTORE = "gmc-trusted.keystore"; - public static final String TRUSTED_KEYSTORE_ACCESS = "gluster"; - public static final String PROTOCOL_TLS = "TLS"; - public static final String ALGORITHM_SUNX509 = "SunX509"; - public static final String KEYSTORE_TYPE_JKS = "JKS"; -} - diff --git a/src/com.gluster.storage.management.client/src/com/gluster/storage/management/client/utils/ClientUtil.java b/src/com.gluster.storage.management.client/src/com/gluster/storage/management/client/utils/ClientUtil.java deleted file mode 100644 index 3f87fd27..00000000 --- a/src/com.gluster.storage.management.client/src/com/gluster/storage/management/client/utils/ClientUtil.java +++ /dev/null @@ -1,20 +0,0 @@ -package com.gluster.storage.management.client.utils; - -import java.net.URI; - -import javax.ws.rs.core.UriBuilder; - -import com.gluster.storage.management.client.constants.ClientConstants; - -public class ClientUtil { - - public static URI getServerBaseURI() { - return UriBuilder.fromUri(getBaseURL()).path(ClientConstants.REST_API_VERSION).build(); - } - - private static String getBaseURL() { - // remove the platform path (e.g. /linux.gtk.x86_64) from the URL - return System.getProperty(ClientConstants.SYS_PROP_SERVER_URL, ClientConstants.DEFAULT_SERVER_URL) - .replaceAll(ClientConstants.CONTEXT_ROOT + "\\/.*", ClientConstants.CONTEXT_ROOT + "\\/"); - } -} diff --git a/src/com.gluster.storage.management.console.feature.webstart/build.properties b/src/com.gluster.storage.management.console.feature.webstart/build.properties deleted file mode 100644 index 322a3114..00000000 --- a/src/com.gluster.storage.management.console.feature.webstart/build.properties +++ /dev/null @@ -1,2 +0,0 @@ -#bin.includes = feature.xml -root=rootfiles diff --git a/src/com.gluster.storage.management.console.feature.webstart/build/gluster.keystore b/src/com.gluster.storage.management.console.feature.webstart/build/gluster.keystore Binary files differdeleted file mode 100644 index ee3bc3a9..00000000 --- a/src/com.gluster.storage.management.console.feature.webstart/build/gluster.keystore +++ /dev/null diff --git a/src/com.gluster.storage.management.console.feature/.project b/src/com.gluster.storage.management.console.feature/.project deleted file mode 100644 index a736d116..00000000 --- a/src/com.gluster.storage.management.console.feature/.project +++ /dev/null @@ -1,17 +0,0 @@ -<?xml version="1.0" encoding="UTF-8"?> -<projectDescription> - <name>com.gluster.storage.management.console.feature</name> - <comment></comment> - <projects> - </projects> - <buildSpec> - <buildCommand> - <name>org.eclipse.pde.FeatureBuilder</name> - <arguments> - </arguments> - </buildCommand> - </buildSpec> - <natures> - <nature>org.eclipse.pde.FeatureNature</nature> - </natures> -</projectDescription> diff --git a/src/com.gluster.storage.management.console.feature/build.properties b/src/com.gluster.storage.management.console.feature/build.properties deleted file mode 100644 index 64f93a9f..00000000 --- a/src/com.gluster.storage.management.console.feature/build.properties +++ /dev/null @@ -1 +0,0 @@ -bin.includes = feature.xml diff --git a/src/com.gluster.storage.management.console.help/build.properties b/src/com.gluster.storage.management.console.help/build.properties deleted file mode 100644 index 9c6ba40f..00000000 --- a/src/com.gluster.storage.management.console.help/build.properties +++ /dev/null @@ -1,7 +0,0 @@ -bin.includes = plugin.xml,\ - META-INF/,\ - html/,\ - toc.xml,\ - tocconcepts.xml,\ - tocgettingstarted.xml,\ - toctasks.xml diff --git a/src/com.gluster.storage.management.console.help/html/css/Builder/style.css b/src/com.gluster.storage.management.console.help/html/css/Builder/style.css deleted file mode 100644 index e69de29b..00000000 --- a/src/com.gluster.storage.management.console.help/html/css/Builder/style.css +++ /dev/null diff --git a/src/com.gluster.storage.management.console.help/html/gettingstarted/access_gmc_jws.html b/src/com.gluster.storage.management.console.help/html/gettingstarted/access_gmc_jws.html deleted file mode 100644 index 517d70e8..00000000 --- a/src/com.gluster.storage.management.console.help/html/gettingstarted/access_gmc_jws.html +++ /dev/null @@ -1,27 +0,0 @@ -<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
-
-<html>
-<link rel="stylesheet" href="../css/builder-gluster/style.css"
-type="text/css" media="screen" />
-<head>
-<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
-<title>Sub Topic</title>
-</head>
-
-<body>
-<h1>Accessing the Gluster Management Console Using Java Web Start</h1>
-<p>To start Gluster Management Console using Java web start, perform the following steps.
-<ol>
-<li>Open your web browser.
-<p>Ensure that your web browser has cookies and Javascript enabled.</p>
-<li>Type the following URL in your web browser:
-<p><FONT FACE = "Courier">http://server-name:8443/glustermg/</FONT></p>
-<p>Gluster Management Console login window is displayed</p>
-<p><img src="../images/GMC_Login_Window.jpg" alt="Login Window" />
-<li>Type the following default user name and password in the login window:
-<p>Username: gluster</p>
-<p>Password: syst3m</p>
-</ol>
-<p>For more information on how you can change the password, refer to <a href="change_password.html">Changing Administrator´s Password</a>
-</body>
-</html>
\ No newline at end of file diff --git a/src/com.gluster.storage.management.console.help/html/gettingstarted/check_req_client.html b/src/com.gluster.storage.management.console.help/html/gettingstarted/check_req_client.html deleted file mode 100644 index 358dc0d9..00000000 --- a/src/com.gluster.storage.management.console.help/html/gettingstarted/check_req_client.html +++ /dev/null @@ -1,26 +0,0 @@ -<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
-
-<html>
-<head>
-<link rel="stylesheet" href="../css/builder-gluster/style.css"
-type="text/css" media="screen" />
-<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
-<title>Main Topic</title>
-</head>
-
-<body>
-<h1>Checking the Minimum Requirements of Client Machines</h1>
-
-<p>Verify the following:</p>
-<ul>
-<li>Processor - 1.4GHz CPU
-<li>Memory - 2 GB RAM
-<li>Disk - 100 MB
-<li>Operating Systems: Windows XP/Vista/7, Linux, Mac OS X
-<li>Oracle JRE 1.6+
-</ul>
-<h2>Web Browser Requirements</h2>
-<p>Using the JRE installer, you can configure your browser for Java Web Start. Also, ensure that you have configured your browser to open .jnlp files using the Java Web Start application or javaws exe located in the bin folder of your JRE installation.</p>
-<p> When you access the Gluster Management Console, Java Web Start downloads all required .jar files from the gateway server and launches the console’s GUI. During this process, web start may display a certificate warning mentioning that the application is signed by Gluster, Inc., which is authentic, but it requires full permissions as the application contains features that require registering information on the client’s hard disk such as exporting the security keys from gateway. You can accept this warning and select <b>Always Trust Content from this Provider</b> on your browser to avoid getting this warning every time you launch the application.</p>
-</body>
-</html>
\ No newline at end of file diff --git a/src/com.gluster.storage.management.console.help/html/gettingstarted/check_req_gmg.html b/src/com.gluster.storage.management.console.help/html/gettingstarted/check_req_gmg.html deleted file mode 100644 index 593a22c9..00000000 --- a/src/com.gluster.storage.management.console.help/html/gettingstarted/check_req_gmg.html +++ /dev/null @@ -1,25 +0,0 @@ -<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
-
-<html>
-<head>
-<link rel="stylesheet" href="../css/builder-gluster/style.css"
-type="text/css" media="screen" />
-<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
-<title>Main Topic</title>
-</head>
-
-<body>
-<h1>Checking Gluster Management Gateway Minimum Requirements</h1>
-Gluster Management Gateway is installed on a central server using the Linux package (e.g. rpm for CentOS) published by Gluster. Before you install Gluster Management Gateway, you must verify that your environment matches the minimum requirements described in this section.
-<p>You must verify that your central server matches the minimum requirements listed below:</p>
-<ul>
-<li>Memory: 2 GM RAM
-<li>Processor: 2 (2.4 GHz each) recommended
-<li>Disk Space: 10 GB
-<P>The following packages must be installed:</P>
-<li>Java SE runtime version 1.6 – openjdk => 1.6.0.0
-<li>tomcat5 => 5.5.23
-<li>wget
-</ul>
-</body>
-</html>
\ No newline at end of file diff --git a/src/com.gluster.storage.management.console.help/html/gettingstarted/cifs_service.html b/src/com.gluster.storage.management.console.help/html/gettingstarted/cifs_service.html deleted file mode 100644 index 03b7091a..00000000 --- a/src/com.gluster.storage.management.console.help/html/gettingstarted/cifs_service.html +++ /dev/null @@ -1,33 +0,0 @@ -<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
-
-<html>
-<head>
-<link rel="stylesheet" href="../css/builder-gluster/style.css"
-type="text/css" media="screen" />
-<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
-<title>Sub Topic</title>
-</head>
-
-<body>
-<h1>CIFS Services</h1>
-The Common Internet File System (CIFS), also known as Server Message
-Block (SMB), is a network protocol whose most common use is sharing
-files on a Local Area Network (LAN). It operates as an application-layer network protocol to provide shared access to files, printers, serial ports, and miscellaneous communications between nodes on a network. It also provides an authenticated inter-process communication mechanism. Most usage of SMB involves computers running Microsoft Windows operating system.
-
-<p>CIFS can be used as an access protocol by Microsoft Windows users to access files in a GlusterFS volume. Users will be able to perform regular file system operations such as creating files, read/write data to files, deletion of data through CIFS.</p>
-
-<h2>Configuring the CIFS Service</h2>
-<p>To configure CIFS, you must create a text file consisting of a list of servers (hostnames or IP addresses).</p>
-<p><b>Note:</b> You can configure CIFS on a fresh install or on an existing installation on the server which you have installed Gluster Management Gateway after adding the server to the cluster.</p>
-<p>Run the following command on the gateway server to configure CIFS:</p>
-<p><FONT FACE = "Courier">$ grun.py <server list>.txt setup_cifs_config.py</FONT></p>
-<h2>Creating CIFS Users</h2>
-<p>You must create users and their password to enable them to use the CIFS access protocol.</p>
-<p>To create CIFS users, run the following on the gateway server:</p>
-<p><FONT FACE = "Courier">$ add_user_cifs_all.py <server list> <user list> <password></FONT></p>
-<h2>Removing CIFS Users</h2>
-<p>You can delete users and their password.</p>
-<p>To delete CIFS users, run the following on the gateway server:</p>
-<p><FONT FACE = "Courier">$ delete_user_cifs_all.py <server list> <user list></FONT></p>
-</body>
-</html>
\ No newline at end of file diff --git a/src/com.gluster.storage.management.console.help/html/gettingstarted/install_gmg.html b/src/com.gluster.storage.management.console.help/html/gettingstarted/install_gmg.html deleted file mode 100644 index 08ce1e1d..00000000 --- a/src/com.gluster.storage.management.console.help/html/gettingstarted/install_gmg.html +++ /dev/null @@ -1,29 +0,0 @@ -<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
-
-<html>
-<head>
-<link rel="stylesheet" href="../css/builder-gluster/style.css"
-type="text/css" media="screen" />
-<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
-<title>Sub Topic</title>
-</head>
-
-<body>
-<h1>Installing the Gluster Management Gateway</h1>
-<p><b>Note:</b> For checking the GlusterFS minimum requirements, refer to the <a href= "http://www.gluster.com/community/documentation/index.php/Gluster_3.2:_Checking_Minimum_Requirements">Gluster 3.2 Filesystem Installation Guide, Checking Minimum Requirements</a>.</p>
-<P>You can install the Gluster Management Gateway through the following command:</P>
-<ol>
-<li>Open a terminal and type the following command
-<p><FONT FACE = "Courier"># rpm -ivh glustermg-1.0.0-1.x86_64.rpm</FONT>
-<li>Start the Gluster Management Gateway by executing the following service
-<p><FONT FACE = "Courier"># service tomcat5 start</FONT>
-</ol>
-<p><b>Note:</b>
-<ul>
-<li>You can install the Gluster Management Gateway packages on a Gluster Storage Server. However, this can impact performance of the GlusterFS processes on this machine hence this is not recommended.
-<li>The Gluster Management Gateway is shipped with a self-signed SSL certificate, by default. While this ensures that the communication between the console and gateway is encrypted and safe, some browsers may throw security warnings mentioning that the site is not secure. It is highly recommended that you install your own SSL certificate issued by a valid certifying authority in the tomcat5 configuration for the 8443 port.
-<li>Enable port 8443 on the Gateway as the Management Console connects to it over SSL on this port
-</ul>
-<p>Gateway generates SSH keys during installation. These keys are stored in the following location <FONT FACE = "Courier">/opt/glustermg/keys</FONT>. These keys are used for communication with the storage servers. However, in AWS environment, SSH communication is done using the private key provided by Amazon. Hence, the AWS genegrated private key (.pem file) must be stored in <FONT FACE = "Courier">/opt/glustermg/keys</FONT> and the file must be named as <FONT FACE = "Courier">gluster.pem</FONT></p>
-</body>
-</html>
\ No newline at end of file diff --git a/src/com.gluster.storage.management.console.help/html/gettingstarted/install_gmg_backend.html b/src/com.gluster.storage.management.console.help/html/gettingstarted/install_gmg_backend.html deleted file mode 100644 index d67f251b..00000000 --- a/src/com.gluster.storage.management.console.help/html/gettingstarted/install_gmg_backend.html +++ /dev/null @@ -1,28 +0,0 @@ -<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
-
-<html>
-<head>
-<link rel="stylesheet" href="../css/builder-gluster/style.css"
-type="text/css" media="screen" />
-<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
-<title>Sub Topic</title>
-</head>
-
-<body>
-<h1>Installing Gluster Management Gateway Backend Packages</h1>
-Gluster Management Gateway communicates with every node of your cluster using the backend package. This package must be installed on each and every node of your cluster using the Linux package (e.g. rpm for CentOS) published by Gluster.
-<p>The minimum requirements for installing the backend package:</p>
-<ul>
-<li>chkconfig
-<li>python = > 2.4.3
-<li>perl = > 5.8.8
-<li>rrdtool-perl = > 1.2.27
-<li>appliance-base = >1.3 (published by Gluster)
-<li>sudo
-<li>crontabs
-</ul>
-<p>To install the backend packages on each and every node of your cluster run the following command:
-<p><FONT FACE = "Courier"># rpm -ivh cluster glustermg-backend-1.0.0-1.x86_64.rpm</FONT></p>
-<p><b>Note:</b> In case CIFS only, the Samba services must be configured to run on port 445 which needs to be enabled and open on all the storage servers in your cluster.</p>
-</body>
-</html>
\ No newline at end of file diff --git a/src/com.gluster.storage.management.console.help/html/gettingstarted/manage_logs.html b/src/com.gluster.storage.management.console.help/html/gettingstarted/manage_logs.html deleted file mode 100644 index de5cab45..00000000 --- a/src/com.gluster.storage.management.console.help/html/gettingstarted/manage_logs.html +++ /dev/null @@ -1,26 +0,0 @@ -<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN"> - -<html> -<head> -<link rel="stylesheet" href="../css/builder-gluster/style.css" -type="text/css" media="screen" /> -<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1"> -<title>Managing Logs</title> -</head> - -<body> -<h1>Managing Logs</h1> -You can use the Logs tab of your Management Console to download the -gateway, server, volumes, and UI logs to your local machine to analyze -and archive. -<p>Typically, the log file includes:</p> -<ul> - <li>Installation messages - <li>Removal messages - <li>Configuration messages - <li>Informational messages -</ul> -<p>The default location for this log file is <need this -information>.</p> -</body> -</html>
\ No newline at end of file diff --git a/src/com.gluster.storage.management.console.help/html/gettingstarted/manage_servers.html b/src/com.gluster.storage.management.console.help/html/gettingstarted/manage_servers.html deleted file mode 100644 index 71019d08..00000000 --- a/src/com.gluster.storage.management.console.help/html/gettingstarted/manage_servers.html +++ /dev/null @@ -1,25 +0,0 @@ -<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
-
-<html>
-<head>
-<link rel="stylesheet" href="../css/builder-gluster/style.css"
-type="text/css" media="screen" />
-<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
-<title>Main Topic</title>
-</head>
-
-<body>
-<h1>Managing Your Servers</h1>
-A server is a computer or device on a network that manages network
-resources. It is a group of linked computers, working together closely
-thus in many respects forming a single computer. You can add a new
-server to the storage cluster to expand the amount of available storage.
-<h2>Server Summary</h2>
-<p>The console enables you to monitor your servers in your cluster
-from the Summary tab. To display the summary of your cluster, click the
-Server node from the left pane of the console window. The summary of the
-servers in your cluster is displayed in the right pane of the console
-window. It also displays the Tasks and Alerts.</p>
-<p><img src="../images/GMC_Server_Summary_tab.jpg" width="75%" alt="Server Summary" />
-</body>
-</html>
\ No newline at end of file diff --git a/src/com.gluster.storage.management.console.help/html/images/GMC_1.0_Add_Brick.jpg b/src/com.gluster.storage.management.console.help/html/images/GMC_1.0_Add_Brick.jpg Binary files differdeleted file mode 100644 index 06c9e87b..00000000 --- a/src/com.gluster.storage.management.console.help/html/images/GMC_1.0_Add_Brick.jpg +++ /dev/null diff --git a/src/com.gluster.storage.management.console.help/html/images/GMC_1.0_Add_Brick_confirm.jpg b/src/com.gluster.storage.management.console.help/html/images/GMC_1.0_Add_Brick_confirm.jpg Binary files differdeleted file mode 100644 index 0d9d5dd1..00000000 --- a/src/com.gluster.storage.management.console.help/html/images/GMC_1.0_Add_Brick_confirm.jpg +++ /dev/null diff --git a/src/com.gluster.storage.management.console.help/html/images/GMC_1.0_Add_Server_Confirm.jpg b/src/com.gluster.storage.management.console.help/html/images/GMC_1.0_Add_Server_Confirm.jpg Binary files differdeleted file mode 100644 index 4dc5f8ea..00000000 --- a/src/com.gluster.storage.management.console.help/html/images/GMC_1.0_Add_Server_Confirm.jpg +++ /dev/null diff --git a/src/com.gluster.storage.management.console.help/html/images/GMC_1.0_Discovered_Server_Add.jpg b/src/com.gluster.storage.management.console.help/html/images/GMC_1.0_Discovered_Server_Add.jpg Binary files differdeleted file mode 100644 index cffcc5d8..00000000 --- a/src/com.gluster.storage.management.console.help/html/images/GMC_1.0_Discovered_Server_Add.jpg +++ /dev/null diff --git a/src/com.gluster.storage.management.console.help/html/images/GMC_1.0_Remove_Server.jpg b/src/com.gluster.storage.management.console.help/html/images/GMC_1.0_Remove_Server.jpg Binary files differdeleted file mode 100644 index e54f2266..00000000 --- a/src/com.gluster.storage.management.console.help/html/images/GMC_1.0_Remove_Server.jpg +++ /dev/null diff --git a/src/com.gluster.storage.management.console.help/html/images/GMC_1.0_Remove_Server_1.jpg b/src/com.gluster.storage.management.console.help/html/images/GMC_1.0_Remove_Server_1.jpg Binary files differdeleted file mode 100644 index ff9de405..00000000 --- a/src/com.gluster.storage.management.console.help/html/images/GMC_1.0_Remove_Server_1.jpg +++ /dev/null diff --git a/src/com.gluster.storage.management.console.help/html/images/GMC_Cluster_Summary_tab.jpg b/src/com.gluster.storage.management.console.help/html/images/GMC_Cluster_Summary_tab.jpg Binary files differdeleted file mode 100644 index 67f15598..00000000 --- a/src/com.gluster.storage.management.console.help/html/images/GMC_Cluster_Summary_tab.jpg +++ /dev/null diff --git a/src/com.gluster.storage.management.console.help/html/images/GMC_Create_Cluster.jpg b/src/com.gluster.storage.management.console.help/html/images/GMC_Create_Cluster.jpg Binary files differdeleted file mode 100644 index 8b263313..00000000 --- a/src/com.gluster.storage.management.console.help/html/images/GMC_Create_Cluster.jpg +++ /dev/null diff --git a/src/com.gluster.storage.management.console.help/html/images/GMC_Migrate_Brick.jpg b/src/com.gluster.storage.management.console.help/html/images/GMC_Migrate_Brick.jpg Binary files differdeleted file mode 100644 index e01fa85a..00000000 --- a/src/com.gluster.storage.management.console.help/html/images/GMC_Migrate_Brick.jpg +++ /dev/null diff --git a/src/com.gluster.storage.management.console.help/html/images/GMC_Migrate_Brick_success.jpg b/src/com.gluster.storage.management.console.help/html/images/GMC_Migrate_Brick_success.jpg Binary files differdeleted file mode 100644 index 026b2d36..00000000 --- a/src/com.gluster.storage.management.console.help/html/images/GMC_Migrate_Brick_success.jpg +++ /dev/null diff --git a/src/com.gluster.storage.management.console.help/html/images/GMC_Preferences_gluster.jpg b/src/com.gluster.storage.management.console.help/html/images/GMC_Preferences_gluster.jpg Binary files differdeleted file mode 100644 index 06702e7b..00000000 --- a/src/com.gluster.storage.management.console.help/html/images/GMC_Preferences_gluster.jpg +++ /dev/null diff --git a/src/com.gluster.storage.management.console.help/html/images/GMC_Register_Cluster.jpg b/src/com.gluster.storage.management.console.help/html/images/GMC_Register_Cluster.jpg Binary files differdeleted file mode 100644 index bc1c8049..00000000 --- a/src/com.gluster.storage.management.console.help/html/images/GMC_Register_Cluster.jpg +++ /dev/null diff --git a/src/com.gluster.storage.management.console.help/html/images/GMC_Select_Cluster.jpg b/src/com.gluster.storage.management.console.help/html/images/GMC_Select_Cluster.jpg Binary files differdeleted file mode 100644 index 96eb090b..00000000 --- a/src/com.gluster.storage.management.console.help/html/images/GMC_Select_Cluster.jpg +++ /dev/null diff --git a/src/com.gluster.storage.management.console.help/html/images/GMC_Server_Summary_tab.jpg b/src/com.gluster.storage.management.console.help/html/images/GMC_Server_Summary_tab.jpg Binary files differdeleted file mode 100644 index 32f417df..00000000 --- a/src/com.gluster.storage.management.console.help/html/images/GMC_Server_Summary_tab.jpg +++ /dev/null diff --git a/src/com.gluster.storage.management.console.help/html/images/GMC_Server_Tab.jpg b/src/com.gluster.storage.management.console.help/html/images/GMC_Server_Tab.jpg Binary files differdeleted file mode 100644 index c9901a5a..00000000 --- a/src/com.gluster.storage.management.console.help/html/images/GMC_Server_Tab.jpg +++ /dev/null diff --git a/src/com.gluster.storage.management.console.help/html/images/GMC_Volume_Summary.jpg b/src/com.gluster.storage.management.console.help/html/images/GMC_Volume_Summary.jpg Binary files differdeleted file mode 100644 index 88a1db3d..00000000 --- a/src/com.gluster.storage.management.console.help/html/images/GMC_Volume_Summary.jpg +++ /dev/null diff --git a/src/com.gluster.storage.management.console.help/html/images/GlusterMC_Architecture.jpg b/src/com.gluster.storage.management.console.help/html/images/GlusterMC_Architecture.jpg Binary files differdeleted file mode 100644 index 33f9cc94..00000000 --- a/src/com.gluster.storage.management.console.help/html/images/GlusterMC_Architecture.jpg +++ /dev/null diff --git a/src/com.gluster.storage.management.console.help/html/tasks/create_cluster.html b/src/com.gluster.storage.management.console.help/html/tasks/create_cluster.html deleted file mode 100644 index b0325372..00000000 --- a/src/com.gluster.storage.management.console.help/html/tasks/create_cluster.html +++ /dev/null @@ -1,32 +0,0 @@ -<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
-
-<html>
-<head>
-<link rel="stylesheet" href="../css/builder-gluster/style.css"
-type="text/css" media="screen" />
-<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
-<title>Create Cluster</title>
-</head>
-
-<body>
-<h1>Create Cluster</h1>
-You can use Gluster Management Console to create and manage virtual
-machines and resources on GlusterFS. To create a cluster, perform the
-following steps.
-<ol>
- <li>Open your web browser.
- <li>Type the following URL in your web browser:</li>
- <p><FONT FACE = "Courier">http://server-name:webserver-port/glustermg/gluster-management-console.jnlp</FONT></p>
- <p><b>Gluster Management Console</b> login window is displayed.</p>
- <p><img src="../images/GMC_Login_Window.jpg" alt="Login Window" />
- <li>Type the user name and password in the login window and click
- <b>Login</b>.
- <p><b>Select Cluster</b> window is displayed.</p>
- <p><img src="../images/GMC_Create_Cluster.jpg"
- alt="Create Cluster" />
- <li>Select <b>Create</b>. Type the name of the new cluster in the
- <b>Cluster Name</b> field.
- <li>Click <b>OK</b>. The Gluster Management Console window is displayed with the newly created cluster
-</ol>
-</body>
-</html>
\ No newline at end of file diff --git a/src/com.gluster.storage.management.console.help/html/tasks/create_volume.html b/src/com.gluster.storage.management.console.help/html/tasks/create_volume.html deleted file mode 100644 index 398be2e4..00000000 --- a/src/com.gluster.storage.management.console.help/html/tasks/create_volume.html +++ /dev/null @@ -1,53 +0,0 @@ -<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
-
-<html>
-<head>
-<link rel="stylesheet" href="../css/builder-gluster/style.css"
-type="text/css" media="screen" />
-<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
-<title>Creating Volumes</title>
-</head>
-
-<body>
-<h1>Creating a Volume</h1>
-You can use the Management Console to create and start new volumes
-featuring a single global namespace. When creating a new volume, you can
-select the servers that will comprise the volume and, optionally,
-specify whether the volume is to be distributed, distributed mirrored,
-or distributed stripedPlease enter your text here.
-<p>To create a volume, perform the following steps:
-<ol>
- <li>Choose from the menu, toolbar, or right click and select the
- Volume and select Create Volume.
-
- <p>The Create Volume window is displayed.
- <p><img src="../images/GMC_Create_Volume.jpg" alt="Create Volume" /></p>
- <li>Enter the name of the volume in the Name field.
- <li>Select the type of the volume from the Type drop-down list.
- You can choose the type as either Plain Distribute, Distributed Mirror,
- or Distributed Stripe.
- <li>Bricks will be created on all the disks of the cluster when
- you create a volume, by default. Click Customize, to select and add
- specific bricks to your volume.
- <li>Select the Access Protocol for the new volume. You can select
- GlusterFS, NFS, or CIFS checkbox.
- <li>If you choose CIFS, specify the user name and password to use
- from Windows clients to connect to the volume.
- <p>You need to use user-based authentication for CIFS exports,
- hence you must specify the user’s who can access the volume as a
- comma-separated list in the Users field.
- <li>Specify the volume access control as a comma-separated list of
- IP addresses or hostnames in the Access Control field.
- <p>You can use wildcard to specify ranges of addresses. Typing an
- asterisk (*) specifies all IP addresses. You need to use IP-based
- authentication for Gluster Filesystem and NFS exports.</p>
- <li>Select the Start Volume check box to automatically start the
- volume once created.
- <li>Click Create Volume. The console displays Create Volume window
- to indicate that the volume was successfully created.
- <p><img src="../images/GMC_Create_Volume_success.jpg"
- alt="Volume Created Successfuly" /></p>
- <li>Click OK.
-</ol>
-</body>
-</html>
\ No newline at end of file diff --git a/src/com.gluster.storage.management.console.help/html/tasks/delete_volume.html b/src/com.gluster.storage.management.console.help/html/tasks/delete_volume.html deleted file mode 100644 index 17a313e8..00000000 --- a/src/com.gluster.storage.management.console.help/html/tasks/delete_volume.html +++ /dev/null @@ -1,34 +0,0 @@ -<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
-
-<html>
-<head>
-<link rel="stylesheet" href="../css/builder-gluster/style.css"
-type="text/css" media="screen" />
-<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
-<title>Main Topic</title>
-</head>
-
-<body>
-<h1>Deleting Volumes</h1>
-You can delete a volume or multiple volumes from your storage environment, as required.
-<p>To delete a volume, perform the following steps.</p>
-<ol>
- <li>Choose from the menu, toolbar, or right click and select the Volume and select <b>Delete Volume</b>.
- <p>The <b>Delete Volume</b> window appears. If the volume is
- currently running, you are asked to confirm before proceeding with the
- volume deletion
- <p><img src="../images/GMC_Delete_Vol.jpg" alt="Delete Volume" /></p>
- <p>In case of multiple volumes, the Delete Volume window is displayed as shown below.</p>
- <p><img src="../images/GMC_Delete_Vol_multiple.jpg" alt="Delete Multiple Volumes" /></p>
- <li>If you wish to delete the volume permanently, click <b>Delete Volume and Data</b>.
- <li>If you wish to keep the data but delete the volume, click <b>Delete Volume, Keep Data</b>.
- <p>The <b>Delete Volume</b> window is displayed indicating that the volume
- was deleted successfully.</p>
- <p><img src="../images/GMC_Delete_Vol_success.jpg" alt="Delete Volume" /></p>
- <p>In case of multiple volumes, the Delete Volume window is displayed as follows.</p>
- <p><img src="../images/GMC_Delete_Vol_multiple_success.jpg" alt="Delete Multiple Volumes" /></p>
- <li>Click <b>OK</b>.
-</ol>
-
-</body>
-</html>
\ No newline at end of file diff --git a/src/com.gluster.storage.management.console.help/html/tasks/remove_server.html b/src/com.gluster.storage.management.console.help/html/tasks/remove_server.html deleted file mode 100644 index cf5d87a0..00000000 --- a/src/com.gluster.storage.management.console.help/html/tasks/remove_server.html +++ /dev/null @@ -1,31 +0,0 @@ -<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
-
-<html>
-<head>
-<link rel="stylesheet" href="../css/builder-gluster/style.css"
-type="text/css" media="screen" />
-<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
-<title>Sub Topic</title>
-</head>
-
-<body>
-<h1>Removing Servers</h1>
-You can remove the server, as required.
-<p>To remove a server, perform the following steps:</p>
-<ol>
- <li>Choose from the menu, toolbar, or right click on the selected
- Server and select <b>Remove Server</b>.
- <li>If the server is currently running, you are asked to confirm
- before removing a server.
- <p><img src="../images/GMC_Remove_server.jpg"
- alt="Remove Server Confirmation" />
- <li>Click <b>Yes</b>. The console displays the following window to
- indicate that the server was successfully removed.
- <p><img src="../images/GMC_Remove_server_success.jpg"
- alt="Remove Server" />
- <li>Click <b>OK</b>. The removed server is listed under Discovered
- Server node
-</ol>
-.
-</body>
-</html>
\ No newline at end of file diff --git a/src/com.gluster.storage.management.console.help/plugin.xml b/src/com.gluster.storage.management.console.help/plugin.xml deleted file mode 100644 index 13c39574..00000000 --- a/src/com.gluster.storage.management.console.help/plugin.xml +++ /dev/null @@ -1,26 +0,0 @@ -<?xml version="1.0" encoding="UTF-8"?> -<?eclipse version="3.4"?> -<plugin> - - <extension - point="org.eclipse.help.toc"> - <toc - file="toc.xml" - primary="true"> - </toc> - <toc - file="tocconcepts.xml"> - </toc> - <toc - file="tocgettingstarted.xml"> - </toc> - <toc - file="tocreference.xml"> - </toc> - <toc - file="toctasks.xml" - primary="true"> - </toc> - </extension> - -</plugin> diff --git a/src/com.gluster.storage.management.console.help/toc.xml b/src/com.gluster.storage.management.console.help/toc.xml deleted file mode 100644 index 99a3ff5c..00000000 --- a/src/com.gluster.storage.management.console.help/toc.xml +++ /dev/null @@ -1,14 +0,0 @@ -<?xml version="1.0" encoding="UTF-8"?> -<?NLS TYPE="org.eclipse.help.toc"?> - -<toc label="Gluster Management Console - Help" topic="html/toc.html"> - <topic label="Concepts"> - <anchor id="concepts"/> - </topic> - <topic label="Getting Started"> - <anchor id="gettingstarted"/> - </topic> - <topic label="Tasks"> - <anchor id="tasks"/> - </topic> -</toc> diff --git a/src/com.gluster.storage.management.console.help/tocconcepts.xml b/src/com.gluster.storage.management.console.help/tocconcepts.xml deleted file mode 100644 index 23a9c2a0..00000000 --- a/src/com.gluster.storage.management.console.help/tocconcepts.xml +++ /dev/null @@ -1,12 +0,0 @@ -<?xml version="1.0" encoding="UTF-8"?> -<?NLS TYPE="org.eclipse.help.toc"?> - -<toc label="Concepts" link_to="toc.xml#concepts"> - <topic label="Gluster FileSystem" href="html/concepts/gluster_fs.html"> - <topic label="Common Cluster Terminologies" href="html/concepts/common_terms.html" /> - </topic> - <topic href="html/concepts/about_gmg.html" label="About Gluster Management Gateway"> - </topic> - <topic label="About Gluster Management Console" href="html/concepts/about_gmc.html"> - </topic> -</toc> diff --git a/src/com.gluster.storage.management.console.help/tocreference.xml b/src/com.gluster.storage.management.console.help/tocreference.xml deleted file mode 100644 index 660cdecc..00000000 --- a/src/com.gluster.storage.management.console.help/tocreference.xml +++ /dev/null @@ -1,11 +0,0 @@ -<?xml version="1.0" encoding="UTF-8"?> -<?NLS TYPE="org.eclipse.help.toc"?> - -<toc label="Reference" link_to="toc.xml#reference"> - <topic label="Main Topic" href="html/reference/maintopic.html"> - <topic label="Sub Topic" href="html/reference/subtopic.html" /> - </topic> - <topic label="Main Topic 2"> - <topic label="Sub Topic 2" href="html/reference/subtopic2.html" /> - </topic> -</toc> diff --git a/src/com.gluster.storage.management.console/build.properties b/src/com.gluster.storage.management.console/build.properties deleted file mode 100644 index 45eac8b1..00000000 --- a/src/com.gluster.storage.management.console/build.properties +++ /dev/null @@ -1,19 +0,0 @@ -source.. = src/ -output.. = bin/ -bin.includes = META-INF/,\ - .,\ - icons/,\ - product_lg.gif,\ - splash.bmp,\ - splash/,\ - images/,\ - plugin.xml,\ - preferences.ini,\ - plugin.properties -src.includes = icons/,\ - splash.bmp,\ - images/,\ - preferences.ini,\ - build.properties,\ - splash/,\ - src/ diff --git a/src/com.gluster.storage.management.console/icons/tango/16x16/arrow-down.png b/src/com.gluster.storage.management.console/icons/tango/16x16/arrow-down.png Binary files differdeleted file mode 100644 index 7f23e3f4..00000000 --- a/src/com.gluster.storage.management.console/icons/tango/16x16/arrow-down.png +++ /dev/null diff --git a/src/com.gluster.storage.management.console/icons/tango/16x16/arrow-up.png b/src/com.gluster.storage.management.console/icons/tango/16x16/arrow-up.png Binary files differdeleted file mode 100644 index b8ad3050..00000000 --- a/src/com.gluster.storage.management.console/icons/tango/16x16/arrow-up.png +++ /dev/null diff --git a/src/com.gluster.storage.management.console/icons/tango/22x22/offline-brick.png b/src/com.gluster.storage.management.console/icons/tango/22x22/offline-brick.png Binary files differdeleted file mode 100644 index 57694d4b..00000000 --- a/src/com.gluster.storage.management.console/icons/tango/22x22/offline-brick.png +++ /dev/null diff --git a/src/com.gluster.storage.management.console/plugin.properties b/src/com.gluster.storage.management.console/plugin.properties deleted file mode 100644 index 4ef7da70..00000000 --- a/src/com.gluster.storage.management.console/plugin.properties +++ /dev/null @@ -1,7 +0,0 @@ -aboutText=Gluster Management Console\n\ -Version: 1.0.0\n\n\ -Copyright (c) 2011 Gluster, Inc.\n\ -Visit http://www.gluster.com/\n\n\ -This product includes software developed by the\n\ -Eclipse Foundation http://eclipse.org/\n\ -RichClientGUI http://www.richclientgui.com/
\ No newline at end of file diff --git a/src/com.gluster.storage.management.console/preferences.ini b/src/com.gluster.storage.management.console/preferences.ini deleted file mode 100644 index 7053b209..00000000 --- a/src/com.gluster.storage.management.console/preferences.ini +++ /dev/null @@ -1,3 +0,0 @@ -org.eclipse.ui/KEY_CONFIGURATION_ID = com.gluster.storage.management.console.KeyConfig -org.eclipse.help.base/help_home=/com.gluster.storage.management.console.help/html/help_home.html -IWorkbenchPreferenceConstants.SHOW_PROGRESS_ON_STARTUP=true
\ No newline at end of file diff --git a/src/com.gluster.storage.management.console/src/com/gluster/storage/management/console/ConsoleConstants.java b/src/com.gluster.storage.management.console/src/com/gluster/storage/management/console/ConsoleConstants.java deleted file mode 100644 index 47293228..00000000 --- a/src/com.gluster.storage.management.console/src/com/gluster/storage/management/console/ConsoleConstants.java +++ /dev/null @@ -1,27 +0,0 @@ -/******************************************************************************* - * Copyright (c) 2011 Gluster, Inc. <http://www.gluster.com> - * This file is part of Gluster Management Console. - * - * Gluster Management Console is free software; you can redistribute it and/or - * modify it under the terms of the GNU Affero General Public License as published - * by the Free Software Foundation; either version 3 of the License, or - * (at your option) any later version. - * - * Gluster Management Console is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY - * or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Affero General Public License - * for more details. - * - * You should have received a copy of the GNU Affero General Public License - * along with this program. If not, see - * <http://www.gnu.org/licenses/>. - *******************************************************************************/ -package com.gluster.storage.management.console; - -/** - * - */ -public class ConsoleConstants { - public static final String CONSOLE_TITLE = "Gluster Management Console"; - public static final String TERMINAL_VIEW_ID = "org.eclipse.tm.terminal.view.TerminalView"; -} diff --git a/src/com.gluster.storage.management.console/src/com/gluster/storage/management/console/ICommandIds.java b/src/com.gluster.storage.management.console/src/com/gluster/storage/management/console/ICommandIds.java deleted file mode 100644 index 36cfd9dc..00000000 --- a/src/com.gluster.storage.management.console/src/com/gluster/storage/management/console/ICommandIds.java +++ /dev/null @@ -1,33 +0,0 @@ -/******************************************************************************* - * Copyright (c) 2011 Gluster, Inc. <http://www.gluster.com> - * This file is part of Gluster Management Console. - * - * Gluster Management Console is free software; you can redistribute it and/or - * modify it under the terms of the GNU Affero General Public License as published - * by the Free Software Foundation; either version 3 of the License, or - * (at your option) any later version. - * - * Gluster Management Console is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY - * or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Affero General Public License - * for more details. - * - * You should have received a copy of the GNU Affero General Public License - * along with this program. If not, see - * <http://www.gnu.org/licenses/>. - *******************************************************************************/ -package com.gluster.storage.management.console; - -/** - * Interface defining the application's command IDs. - * Key bindings can be defined for specific commands. - * To associate an action with a command, use IAction.setActionDefinitionId(commandId). - * - * @see org.eclipse.jface.action.IAction#setActionDefinitionId(String) - */ -public interface ICommandIds { - - public static final String CMD_OPEN = "com.gluster.storage.management.console.open"; - public static final String CMD_OPEN_MESSAGE = "com.gluster.storage.management.console.openMessage"; - -} diff --git a/src/com.gluster.storage.management.console/src/com/gluster/storage/management/console/actions/ActionConstants.java b/src/com.gluster.storage.management.console/src/com/gluster/storage/management/console/actions/ActionConstants.java deleted file mode 100644 index a1b70ad0..00000000 --- a/src/com.gluster.storage.management.console/src/com/gluster/storage/management/console/actions/ActionConstants.java +++ /dev/null @@ -1,36 +0,0 @@ -/******************************************************************************* - * Copyright (c) 2011 Gluster, Inc. <http://www.gluster.com> - * This file is part of Gluster Management Console. - * - * Gluster Management Console is free software; you can redistribute it and/or - * modify it under the terms of the GNU Affero General Public License as published - * by the Free Software Foundation; either version 3 of the License, or - * (at your option) any later version. - * - * Gluster Management Console is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY - * or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Affero General Public License - * for more details. - * - * You should have received a copy of the GNU Affero General Public License - * along with this program. If not, see - * <http://www.gnu.org/licenses/>. - *******************************************************************************/ -package com.gluster.storage.management.console.actions; - -public class ActionConstants { - public static final String ACTION_SET_CLUSTER = "com.gluster.storage.management.console.actionsets.gluster"; - public static final String ACTION_SET_VOLUMES = "com.gluster.storage.management.console.actionsets.volumes"; - public static final String ACTION_SET_VOLUME = "com.gluster.storage.management.console.actionsets.volume"; - public static final String ACTION_SET_DISKS = "com.gluster.storage.management.console.actionsets.disks"; - public static final String ACTION_SET_DISK = "com.gluster.storage.management.console.actionsets.disk"; - public static final String ACTION_SET_GLUSTER_SERVERS = "com.gluster.storage.management.console.actionsets.glusterservers"; - public static final String ACTION_SET_GLUSTER_SERVER = "com.gluster.storage.management.console.actionsets.glusterserver"; - public static final String ACTION_SET_DISCOVERED_SERVERS = "com.gluster.storage.management.console.actionsets.serversdiscovered"; - public static final String ACTION_SET_DISCOVERED_SERVER = "com.gluster.storage.management.console.actionsets.serverdiscovered"; - public static final String ACTION_SET_TASK = "com.gluster.storage.management.console.actionsets.task"; - public static final String ACTION_SET_EDIT = "com.gluster.storage.management.console.actionsets.edit"; - - public static final String COMMAND_CREATE_VOLUME = "com.gluster.storage.management.console.commands.CreateVolume"; - public static final String COMMAND_ADD_SERVER = "com.gluster.storage.management.console.commands.AddServer"; -} diff --git a/src/com.gluster.storage.management.console/src/com/gluster/storage/management/console/actions/ChangePasswordAction.java b/src/com.gluster.storage.management.console/src/com/gluster/storage/management/console/actions/ChangePasswordAction.java deleted file mode 100644 index a06f13b4..00000000 --- a/src/com.gluster.storage.management.console/src/com/gluster/storage/management/console/actions/ChangePasswordAction.java +++ /dev/null @@ -1,23 +0,0 @@ -package com.gluster.storage.management.console.actions; - -import org.eclipse.jface.action.IAction; - -import com.gluster.storage.management.console.dialogs.ChangePasswordDialog; - -public class ChangePasswordAction extends AbstractActionDelegate { - - @Override - protected void performAction(IAction action) { - try { - // To open a dialog for change password - ChangePasswordDialog dialog = new ChangePasswordDialog(getShell()); - dialog.open(); - } catch (Exception e) { - e.printStackTrace(); - } - } - - @Override - public void dispose() { - } -} diff --git a/src/com.gluster.storage.management.console/src/com/gluster/storage/management/console/actions/ClearTaskAction.java b/src/com.gluster.storage.management.console/src/com/gluster/storage/management/console/actions/ClearTaskAction.java deleted file mode 100644 index 7cb9a873..00000000 --- a/src/com.gluster.storage.management.console/src/com/gluster/storage/management/console/actions/ClearTaskAction.java +++ /dev/null @@ -1,46 +0,0 @@ -package com.gluster.storage.management.console.actions; - -import org.eclipse.jface.action.IAction; -import org.eclipse.jface.viewers.ISelection; - -import com.gluster.storage.management.client.TasksClient; -import com.gluster.storage.management.console.GlusterDataModelManager; -import com.gluster.storage.management.core.model.Status; -import com.gluster.storage.management.core.model.TaskInfo; - -public class ClearTaskAction extends AbstractActionDelegate { - private TaskInfo taskInfo; - private GlusterDataModelManager modelManager = GlusterDataModelManager.getInstance(); - - @Override - protected void performAction(final IAction action) { - final String actionDesc = action.getDescription(); - - try { - new TasksClient().deleteTask(taskInfo.getName()); // taskId - modelManager.removeTask(taskInfo); - action.setEnabled(false); // TODO disable other task buttons - } catch (Exception e) { - showErrorDialog(actionDesc, - "Task [" + taskInfo.getName() + "] could not be cleared! Error: [" + e.getMessage() + "]"); - } - } - - @Override - public void selectionChanged(IAction action, ISelection selection) { - super.selectionChanged(action, selection); - action.setEnabled(false); - if (selectedEntity instanceof TaskInfo) { - taskInfo = (TaskInfo) selectedEntity; - action.setEnabled(taskInfo.getStatus().getCode() == Status.STATUS_CODE_SUCCESS - || taskInfo.getStatus().getCode() == Status.STATUS_CODE_FAILURE); - } else { - action.setEnabled(false); - } - } - - @Override - public void dispose() { - - } -} diff --git a/src/com.gluster.storage.management.console/src/com/gluster/storage/management/console/actions/DeleteVolumeAction.java b/src/com.gluster.storage.management.console/src/com/gluster/storage/management/console/actions/DeleteVolumeAction.java deleted file mode 100644 index 869e37e3..00000000 --- a/src/com.gluster.storage.management.console/src/com/gluster/storage/management/console/actions/DeleteVolumeAction.java +++ /dev/null @@ -1,141 +0,0 @@ -/******************************************************************************* - * Copyright (c) 2011 Gluster, Inc. <http://www.gluster.com> - * This file is part of Gluster Management Console. - * - * Gluster Management Console is free software; you can redistribute it and/or - * modify it under the terms of the GNU Affero General Public License as published - * by the Free Software Foundation; either version 3 of the License, or - * (at your option) any later version. - * - * Gluster Management Console is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY - * or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Affero General Public License - * for more details. - * - * You should have received a copy of the GNU Affero General Public License - * along with this program. If not, see - * <http://www.gnu.org/licenses/>. - *******************************************************************************/ -package com.gluster.storage.management.console.actions; - -import java.util.ArrayList; -import java.util.List; -import java.util.Set; - -import org.eclipse.core.runtime.IProgressMonitor; -import org.eclipse.jface.action.IAction; -import org.eclipse.jface.dialogs.MessageDialog; -import org.eclipse.jface.viewers.ISelection; - -import com.gluster.storage.management.client.VolumesClient; -import com.gluster.storage.management.console.GlusterDataModelManager; -import com.gluster.storage.management.console.IImageKeys; -import com.gluster.storage.management.console.utils.GUIHelper; -import com.gluster.storage.management.core.constants.CoreConstants; -import com.gluster.storage.management.core.model.Volume; -import com.gluster.storage.management.core.model.Volume.VOLUME_STATUS; - -public class DeleteVolumeAction extends AbstractMonitoredActionDelegate { - private GlusterDataModelManager modelManager = GlusterDataModelManager.getInstance(); - private List<Volume> selectedVolumes = new ArrayList<Volume>(); - private List<String> selectedVolumeNames = new ArrayList<String>(); - private List<String> onlineVolumeNames = new ArrayList<String>(); - - @Override - protected void performAction(final IAction action, IProgressMonitor monitor) { - final String actionDesc = action.getDescription(); - - collectVolumeNames(); - String warningMessage; - if (onlineVolumeNames.size() > 0) { // Getting confirmation for stop and delete - warningMessage = "Following volume(s) " + onlineVolumeNames + " are online, " + CoreConstants.NEWLINE - + "Are you sure to continue?" + CoreConstants.NEWLINE + selectedVolumeNames; - } else { - warningMessage = "Are you sure to delete the volumes " + selectedVolumeNames + " ?"; - } - - final Integer directoryDeleteOption = new MessageDialog(getShell(), "Delete Volume", GUIHelper.getInstance().getImage( - IImageKeys.VOLUME_16x16), warningMessage, MessageDialog.QUESTION, new String[] { "Cancel", - "Delete volume and data", "Delete volume, keep data" }, -1).open(); - if (directoryDeleteOption <= 0) { // By Cancel button(0) or Escape key(-1) - return; - } - - VolumesClient vc = new VolumesClient(); - boolean confirmDeleteDir = (directoryDeleteOption == 1) ? true : false; - List<String> deletedVolumeNames = new ArrayList<String>(); - List<String> failedVolumes = new ArrayList<String>(); - String errorMessage = ""; - - monitor.beginTask("Deleting Selected Volumes...", selectedVolumes.size()); - for (Volume volume : selectedVolumes.toArray(new Volume[0])) { - try { - monitor.setTaskName("Deleting volume [" + volume.getName() + "]"); - if (volume.getStatus() == VOLUME_STATUS.ONLINE) { // stop if online volume - vc.stopVolume(volume.getName()); - } - vc.deleteVolume(volume.getName(), confirmDeleteDir); - modelManager.deleteVolume(volume); - deletedVolumeNames.add(volume.getName()); - } catch (Exception e) { - // Volume delete succeeded and post delete operation (directory cleanup, CIFS etc) may fail - if (vc.volumeExists(volume.getName())) { - errorMessage += CoreConstants.NEWLINE + "[" + volume.getName() + "] : [" + e.getMessage() + "]"; - failedVolumes.add(volume.getName()); - } else { - errorMessage += CoreConstants.NEWLINE + "Volume deleted, but following error occured: [" - + e.getMessage() + "]"; - modelManager.deleteVolume(volume); - deletedVolumeNames.add(volume.getName()); - } - } - monitor.worked(1); - } - monitor.done(); - - // Display the success or failure info - if (deletedVolumeNames.size() == 0) { // No volume(s) deleted successfully - showErrorDialog(actionDesc, "volumes " + failedVolumes + " could not be delete! " + CoreConstants.NEWLINE - + "Error: [" + errorMessage + "]"); - } else { - String info = "Volumes " + deletedVolumeNames + " deleted successfully!"; - if (errorMessage != "") { - info += CoreConstants.NEWLINE + CoreConstants.NEWLINE + "Volumes " + failedVolumes - + " could not be deleted! [" + errorMessage + "]"; - } - showInfoDialog(actionDesc, info); - } - } - - private void collectVolumeNames() { - selectedVolumeNames.clear(); - onlineVolumeNames.clear(); - for (Volume volume : selectedVolumes) { - selectedVolumeNames.add(volume.getName()); - if (volume.getStatus() == VOLUME_STATUS.ONLINE) { - onlineVolumeNames.add(volume.getName()); - } - } - } - - @Override - public void dispose() { - System.out.println("Disposing [" + this.getClass().getSimpleName() + "]"); - } - - @Override - public void selectionChanged(IAction action, ISelection selection) { - Set<Volume> selectedVolumeSet = GUIHelper.getInstance().getSelectedEntities(getWindow(), Volume.class); - selectedVolumes.clear(); - if (selectedVolumeSet == null || selectedVolumeSet.isEmpty()) { - super.selectionChanged(action, selection); - if (selectedEntity instanceof Volume) { - selectedVolumes.add((Volume) selectedEntity); - } - } else { - selectedVolumes.addAll(selectedVolumeSet); //TODO reverse the collection to maintain the selected order - } - - action.setEnabled( (selectedVolumes.size() > 0) ); - } -} diff --git a/src/com.gluster.storage.management.console/src/com/gluster/storage/management/console/actions/DownloadVolumeLogsAction.java b/src/com.gluster.storage.management.console/src/com/gluster/storage/management/console/actions/DownloadVolumeLogsAction.java deleted file mode 100644 index df24f15b..00000000 --- a/src/com.gluster.storage.management.console/src/com/gluster/storage/management/console/actions/DownloadVolumeLogsAction.java +++ /dev/null @@ -1,77 +0,0 @@ -/******************************************************************************* - * Copyright (c) 2011 Gluster, Inc. <http://www.gluster.com> - * This file is part of Gluster Management Console. - * - * Gluster Management Console is free software; you can redistribute it and/or - * modify it under the terms of the GNU Affero General Public License as published - * by the Free Software Foundation; either version 3 of the License, or - * (at your option) any later version. - * - * Gluster Management Console is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY - * or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Affero General Public License - * for more details. - * - * You should have received a copy of the GNU Affero General Public License - * along with this program. If not, see - * <http://www.gnu.org/licenses/>. - *******************************************************************************/ -package com.gluster.storage.management.console.actions; - -import org.eclipse.jface.action.IAction; -import org.eclipse.swt.SWT; -import org.eclipse.swt.custom.BusyIndicator; -import org.eclipse.swt.widgets.Display; -import org.eclipse.swt.widgets.FileDialog; - -import com.gluster.storage.management.client.VolumesClient; -import com.gluster.storage.management.console.utils.GUIHelper; -import com.gluster.storage.management.core.model.Volume; - -/** - * - */ -public class DownloadVolumeLogsAction extends AbstractActionDelegate { - private GUIHelper guiHelper = GUIHelper.getInstance(); - - @Override - public void dispose() { - } - - @Override - protected void performAction(IAction action) { - final VolumesClient client = new VolumesClient(); - final Runnable downloadLogsThread = new Runnable() { - - @Override - public void run() { - Volume volume = guiHelper.getSelectedEntity(getWindow(), Volume.class); - - FileDialog dialog = new FileDialog(getShell(), SWT.SAVE); - dialog.setFilterNames(new String[] {"GZipped Tar (*.tar.gz)"}); - dialog.setFilterExtensions(new String[] {"*.tar.gz"}); - String filePath = dialog.open(); - - if(filePath == null) { - return; - } - - String title = "Download Volume Logs [" + volume.getName() + "]"; - try { - client.downloadLogs(volume.getName(), filePath); - showInfoDialog(title, "Volume logs downloaded successfully to [" + filePath + "]"); - } catch(Exception e) { - showErrorDialog(title, e.getMessage()); - } - } - }; - - BusyIndicator.showWhile(Display.getDefault(), new Runnable() { - - @Override - public void run() { - Display.getDefault().asyncExec(downloadLogsThread); - } - }); - } -} diff --git a/src/com.gluster.storage.management.console/src/com/gluster/storage/management/console/actions/ExportSshKeysAction.java b/src/com.gluster.storage.management.console/src/com/gluster/storage/management/console/actions/ExportSshKeysAction.java deleted file mode 100644 index 2f0d03dc..00000000 --- a/src/com.gluster.storage.management.console/src/com/gluster/storage/management/console/actions/ExportSshKeysAction.java +++ /dev/null @@ -1,77 +0,0 @@ -/** - * ExportSshKeysAction.java - * - * Copyright (c) 2011 Gluster, Inc. <http://www.gluster.com> - * This file is part of Gluster Management Console. - * - * Gluster Management Console is free software; you can redistribute it and/or - * modify it under the terms of the GNU Affero General Public License as published - * by the Free Software Foundation; either version 3 of the License, or - * (at your option) any later version. - * - * Gluster Management Console is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY - * or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Affero General Public License - * for more details. - * - * You should have received a copy of the GNU Affero General Public License - * along with this program. If not, see - * <http://www.gnu.org/licenses/>. - */ -package com.gluster.storage.management.console.actions; - -import org.eclipse.jface.action.IAction; -import org.eclipse.swt.SWT; -import org.eclipse.swt.custom.BusyIndicator; -import org.eclipse.swt.widgets.Display; -import org.eclipse.swt.widgets.FileDialog; - -import com.gluster.storage.management.client.KeysClient; - -/** - * @author root - * - */ -public class ExportSshKeysAction extends AbstractActionDelegate { - - @Override - protected void performAction(IAction action) { - final KeysClient client = new KeysClient(); - final Runnable exportKeysThread = new Runnable() { - - @Override - public void run() { - FileDialog dialog = new FileDialog(getShell(), SWT.SAVE); - dialog.setFilterNames(new String[] {"Tar (*.tar)"}); - dialog.setFilterExtensions(new String[] {"*.tar"}); - String filePath = dialog.open(); - - if(filePath == null) { - return; - } - - String title = "Export SSH Keys"; - try { - client.exportSshKeys(filePath); - showInfoDialog(title, "SSH keys exported successfully to [" + filePath + "]"); - } catch(Exception e) { - showErrorDialog(title, e.getMessage()); - } - } - }; - - BusyIndicator.showWhile(Display.getDefault(), new Runnable() { - - @Override - public void run() { - Display.getDefault().asyncExec(exportKeysThread); - } - }); - } - - - @Override - public void dispose() { - } - -} diff --git a/src/com.gluster.storage.management.console/src/com/gluster/storage/management/console/actions/ImportSshKeysAction.java b/src/com.gluster.storage.management.console/src/com/gluster/storage/management/console/actions/ImportSshKeysAction.java deleted file mode 100644 index 4bdb3835..00000000 --- a/src/com.gluster.storage.management.console/src/com/gluster/storage/management/console/actions/ImportSshKeysAction.java +++ /dev/null @@ -1,44 +0,0 @@ -package com.gluster.storage.management.console.actions; - -import org.eclipse.jface.action.IAction; -import org.eclipse.swt.SWT; -import org.eclipse.swt.widgets.Display; -import org.eclipse.swt.widgets.FileDialog; - -import com.gluster.storage.management.client.KeysClient; - -public class ImportSshKeysAction extends AbstractActionDelegate { - - @Override - protected void performAction(IAction action) { - final KeysClient client = new KeysClient(); - - Display.getDefault().asyncExec(new Runnable() { - - @Override - public void run() { - FileDialog dialog = new FileDialog(getShell(), SWT.OPEN); - dialog.setText("Open"); - dialog.setFilterNames(new String[] { "ssh-keys (*.tar)" }); - dialog.setFilterExtensions(new String[] { "*.tar" }); - - String selectedFile = dialog.open(); - if (selectedFile == null) { - return; - } - - String title = "Import SSH Keys"; - try { - client.importSshKeys(selectedFile); - showInfoDialog(title, "SSH keys imported successfully!"); - } catch (Exception e) { - showErrorDialog(title, e.getMessage()); - } - } - }); - } - - @Override - public void dispose() { - } -} diff --git a/src/com.gluster.storage.management.console/src/com/gluster/storage/management/console/actions/RefreshDataAction.java b/src/com.gluster.storage.management.console/src/com/gluster/storage/management/console/actions/RefreshDataAction.java deleted file mode 100644 index 49b4f7d0..00000000 --- a/src/com.gluster.storage.management.console/src/com/gluster/storage/management/console/actions/RefreshDataAction.java +++ /dev/null @@ -1,43 +0,0 @@ -/******************************************************************************* - * Copyright (c) 2011 Gluster, Inc. <http://www.gluster.com> - * This file is part of Gluster Management Console. - * - * Gluster Management Console is free software; you can redistribute it and/or - * modify it under the terms of the GNU Affero General Public License as published - * by the Free Software Foundation; either version 3 of the License, or - * (at your option) any later version. - * - * Gluster Management Console is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY - * or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Affero General Public License - * for more details. - * - * You should have received a copy of the GNU Affero General Public License - * along with this program. If not, see - * <http://www.gnu.org/licenses/>. - *******************************************************************************/ -package com.gluster.storage.management.console.actions; - -import org.eclipse.jface.action.IAction; - -import com.gluster.storage.management.console.jobs.DataSyncJob; - -/** - * - */ -public class RefreshDataAction extends AbstractActionDelegate { - /* (non-Javadoc) - * @see org.eclipse.ui.IWorkbenchWindowActionDelegate#dispose() - */ - @Override - public void dispose() { - } - - /* (non-Javadoc) - * @see com.gluster.storage.management.console.actions.AbstractActionDelegate#performAction(org.eclipse.jface.action.IAction) - */ - @Override - protected void performAction(IAction action) { - new DataSyncJob("Retrieving Management Information").schedule(); - } -} diff --git a/src/com.gluster.storage.management.console/src/com/gluster/storage/management/console/actions/ResumeTaskAction.java b/src/com.gluster.storage.management.console/src/com/gluster/storage/management/console/actions/ResumeTaskAction.java deleted file mode 100644 index d672a760..00000000 --- a/src/com.gluster.storage.management.console/src/com/gluster/storage/management/console/actions/ResumeTaskAction.java +++ /dev/null @@ -1,45 +0,0 @@ -package com.gluster.storage.management.console.actions; - -import org.eclipse.jface.action.IAction; -import org.eclipse.jface.viewers.ISelection; - -import com.gluster.storage.management.client.TasksClient; -import com.gluster.storage.management.console.GlusterDataModelManager; -import com.gluster.storage.management.core.model.Status; -import com.gluster.storage.management.core.model.TaskInfo; -import com.gluster.storage.management.core.model.TaskStatus; - -public class ResumeTaskAction extends AbstractActionDelegate { - private TaskInfo taskInfo; - private GlusterDataModelManager modelManager = GlusterDataModelManager.getInstance(); - - @Override - protected void performAction(final IAction action) { - final String actionDesc = action.getDescription(); - - try { - new TasksClient().resumeTask(taskInfo.getName()); - taskInfo.setStatus(new TaskStatus(new Status(Status.STATUS_CODE_RUNNING, "Resumed"))); - modelManager.updateTask(taskInfo); - } catch (Exception e) { - showErrorDialog(actionDesc, - "Task [" + taskInfo.getDescription() + "] could not be Resumed! Error: [" + e.getMessage() + "]"); - } - } - - @Override - public void selectionChanged(IAction action, ISelection selection) { - super.selectionChanged(action, selection); - action.setEnabled(false); - if (selectedEntity instanceof TaskInfo) { - taskInfo = (TaskInfo) selectedEntity; - action.setEnabled(taskInfo.getStatus().getCode() == Status.STATUS_CODE_PAUSE); - } - } - - @Override - public void dispose() { - - } - -} diff --git a/src/com.gluster.storage.management.console/src/com/gluster/storage/management/console/actions/ServerAdditionAction.java b/src/com.gluster.storage.management.console/src/com/gluster/storage/management/console/actions/ServerAdditionAction.java deleted file mode 100644 index f47f6347..00000000 --- a/src/com.gluster.storage.management.console/src/com/gluster/storage/management/console/actions/ServerAdditionAction.java +++ /dev/null @@ -1,28 +0,0 @@ -package com.gluster.storage.management.console.actions; - -import org.eclipse.jface.action.IAction; - -import com.gluster.storage.management.console.dialogs.ServerAdditionDialog; -import com.gluster.storage.management.console.utils.GlusterLogger; - -public class ServerAdditionAction extends AbstractActionDelegate { - private static final GlusterLogger logger = GlusterLogger.getInstance(); - @Override - public void dispose() { - // TODO Auto-generated method stub - - } - - @Override - protected void performAction(IAction action) { - try { - // To open a dialog for server addition - ServerAdditionDialog dialog = new ServerAdditionDialog(getShell()); - dialog.open(); - } catch (Exception e) { - logger.error("Error in Manual server addition", e); - e.printStackTrace(); - } - } - -} diff --git a/src/com.gluster.storage.management.console/src/com/gluster/storage/management/console/actions/StopTaskAction.java b/src/com.gluster.storage.management.console/src/com/gluster/storage/management/console/actions/StopTaskAction.java deleted file mode 100644 index 25afa320..00000000 --- a/src/com.gluster.storage.management.console/src/com/gluster/storage/management/console/actions/StopTaskAction.java +++ /dev/null @@ -1,46 +0,0 @@ -package com.gluster.storage.management.console.actions; - -import org.eclipse.jface.action.IAction; -import org.eclipse.jface.viewers.ISelection; - -import com.gluster.storage.management.client.TasksClient; -import com.gluster.storage.management.console.GlusterDataModelManager; -import com.gluster.storage.management.core.model.Status; -import com.gluster.storage.management.core.model.TaskInfo; - -public class StopTaskAction extends AbstractActionDelegate { - private TaskInfo taskInfo; - private GlusterDataModelManager modelManager = GlusterDataModelManager.getInstance(); - - @Override - protected void performAction(final IAction action) { - final String actionDesc = action.getDescription(); - - try { - new TasksClient().stopTask(taskInfo.getName()); - // On successful stop clear from the task list - modelManager.removeTask(taskInfo); - action.setEnabled(false); // TODO disable other task buttons - } catch (Exception e) { - showErrorDialog(actionDesc, - "Task [" + taskInfo.getDescription() + "] could not be Stopped! Error: [" + e.getMessage() + "]"); - } - } - - @Override - public void selectionChanged(IAction action, ISelection selection) { - super.selectionChanged(action, selection); - action.setEnabled(false); - if (selectedEntity instanceof TaskInfo) { - taskInfo = (TaskInfo) selectedEntity; - action.setEnabled(taskInfo.getStopSupported() - && (taskInfo.getStatus().getCode() == Status.STATUS_CODE_PAUSE - || taskInfo.getStatus().getCode() == Status.STATUS_CODE_RUNNING)); - } - } - - @Override - public void dispose() { - } - -} diff --git a/src/com.gluster.storage.management.console/src/com/gluster/storage/management/console/actions/StopVolumeAction.java b/src/com.gluster.storage.management.console/src/com/gluster/storage/management/console/actions/StopVolumeAction.java deleted file mode 100644 index bda0e661..00000000 --- a/src/com.gluster.storage.management.console/src/com/gluster/storage/management/console/actions/StopVolumeAction.java +++ /dev/null @@ -1,164 +0,0 @@ -/******************************************************************************* - * Copyright (c) 2011 Gluster, Inc. <http://www.gluster.com> - * This file is part of Gluster Management Console. - * - * Gluster Management Console is free software; you can redistribute it and/or - * modify it under the terms of the GNU Affero General Public License as published - * by the Free Software Foundation; either version 3 of the License, or - * (at your option) any later version. - * - * Gluster Management Console is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY - * or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Affero General Public License - * for more details. - * - * You should have received a copy of the GNU Affero General Public License - * along with this program. If not, see - * <http://www.gnu.org/licenses/>. - *******************************************************************************/ -package com.gluster.storage.management.console.actions; - -import java.util.ArrayList; -import java.util.List; -import java.util.Set; - -import org.eclipse.core.runtime.IProgressMonitor; -import org.eclipse.jface.action.IAction; -import org.eclipse.jface.dialogs.MessageDialog; -import org.eclipse.jface.viewers.ISelection; - -import com.gluster.storage.management.client.VolumesClient; -import com.gluster.storage.management.console.GlusterDataModelManager; -import com.gluster.storage.management.console.IImageKeys; -import com.gluster.storage.management.console.utils.GUIHelper; -import com.gluster.storage.management.core.constants.CoreConstants; -import com.gluster.storage.management.core.model.Volume; -import com.gluster.storage.management.core.model.Volume.VOLUME_STATUS; - -public class StopVolumeAction extends AbstractMonitoredActionDelegate { - private GlusterDataModelManager modelManager = GlusterDataModelManager.getInstance(); - private List<Volume> selectedVolumes = new ArrayList<Volume>(); - private List<String> selectedVolumeNames = new ArrayList<String>(); - private List<String> onlineVolumeNames = new ArrayList<String>(); - - @Override - protected void performAction(final IAction action, IProgressMonitor monitor) { - final String actionDesc = action.getDescription(); - - collectVolumeNames(); - - if (onlineVolumeNames.size() == 0) { - showWarningDialog(actionDesc, "Volumes " + selectedVolumeNames + " already stopped!"); - return; // Volumes already stopped, Don't do anything. - } - - Integer userAction = new MessageDialog(getShell(), "Stop Volume", GUIHelper.getInstance().getImage( - IImageKeys.VOLUME_16x16), "Are you sure you want to stop the following volumes?" - + CoreConstants.NEWLINE + onlineVolumeNames, MessageDialog.QUESTION, - new String[] { "No", "Yes" }, -1).open(); - - if (userAction <= 0) { // user select cancel or pressed escape key - return; - } - - VolumesClient vc = new VolumesClient(); - List<String> stoppedVolumes = new ArrayList<String>(); - List<String> failedVolumes = new ArrayList<String>(); - String errorMessage = ""; - - Volume newVolume = new Volume(); - - monitor.beginTask("Stopping Selected Volumes...", selectedVolumes.size()); - for (Volume volume : selectedVolumes.toArray(new Volume[0])) { - if(monitor.isCanceled()) { - break; - } - - if (volume.getStatus() == VOLUME_STATUS.OFFLINE) { - monitor.worked(1); - continue; // skip if already stopped - } - try { - monitor.setTaskName("Stopping volume [" + volume.getName() + "]"); - vc.stopVolume(volume.getName()); - // modelManager.updateVolumeStatus(volume, VOLUME_STATUS.OFFLINE); - stoppedVolumes.add(volume.getName()); - } catch (Exception e) { - failedVolumes.add(volume.getName()); - // If any post volume stop activity failed, update the volume status - if (vc.getVolume(volume.getName()).getStatus() == VOLUME_STATUS.OFFLINE) { - modelManager.updateVolumeStatus(volume, VOLUME_STATUS.OFFLINE); - } - errorMessage += e.getMessage() + CoreConstants.NEWLINE; - } - - // Update the model by fetching latest volume info (NOT JUST STATUS) - try { - newVolume = vc.getVolume(volume.getName()); - modelManager.volumeChanged(volume, newVolume); - } catch (Exception e) { - errorMessage += "Failed to update volume info on UI. [" + e.getMessage() + "]"; - } - monitor.worked(1); - } - monitor.done(); - - // Display the success or failure info - if (stoppedVolumes.size() == 0) { // No volume(s) stopped successfully - showErrorDialog(actionDesc, "Volumes " + failedVolumes + " could not be stopped! " + CoreConstants.NEWLINE - + "Error: [" + errorMessage + "]"); - } else { - String info = "Volumes " + stoppedVolumes + " stopped successfully!"; - if (errorMessage != "") { - info += CoreConstants.NEWLINE + CoreConstants.NEWLINE + "Volumes " + failedVolumes - + " failed to stop! [" + errorMessage + "]"; - } - showInfoDialog(actionDesc, info); - } - } - - private void collectVolumeNames() { - selectedVolumeNames.clear(); - onlineVolumeNames.clear(); - for (Volume volume : selectedVolumes) { - selectedVolumeNames.add(volume.getName()); - if (volume.getStatus() == VOLUME_STATUS.ONLINE) { - onlineVolumeNames.add(volume.getName()); - } - } - } - - @Override - public void dispose() { - } - - /* - * (non-Javadoc) - * - * @see - * com.gluster.storage.management.console.actions.AbstractActionDelegate#selectionChanged(org.eclipse.jface.action.IAction - * , org.eclipse.jface.viewers.ISelection) - */ - @Override - public void selectionChanged(IAction action, ISelection selection) { - Set<Volume> selectedVolumeNames = GUIHelper.getInstance().getSelectedEntities(getWindow(), Volume.class); - selectedVolumes.clear(); - if (selectedVolumeNames == null || selectedVolumeNames.isEmpty()) { - super.selectionChanged(action, selection); - if (selectedEntity instanceof Volume) { - selectedVolumes.add((Volume) selectedEntity); - } - } else { - selectedVolumes.addAll(selectedVolumeNames); //TODO reverse the collection to maintain the selected order - } - - action.setEnabled(false); - // To enable the action - for (Volume volume : selectedVolumes) { - if (volume.getStatus() == VOLUME_STATUS.ONLINE) { - action.setEnabled(true); - break; // If find an online volume, enable the action - } - } - } -} diff --git a/src/com.gluster.storage.management.console/src/com/gluster/storage/management/console/dialogs/InitializeDiskTypeSelection.java b/src/com.gluster.storage.management.console/src/com/gluster/storage/management/console/dialogs/InitializeDiskTypeSelection.java deleted file mode 100644 index 4b64ea96..00000000 --- a/src/com.gluster.storage.management.console/src/com/gluster/storage/management/console/dialogs/InitializeDiskTypeSelection.java +++ /dev/null @@ -1,148 +0,0 @@ -/******************************************************************************* - * - * InitializeDiskTypeSelection.java - * - * Copyright (c) 2011 Gluster, Inc. <http://www.gluster.com> - * This file is part of Gluster Management Console. - * - * Gluster Management Console is free software; you can redistribute it and/or - * modify it under the terms of the GNU Affero General Public License as published - * by the Free Software Foundation; either version 3 of the License, or - * (at your option) any later version. - * - * Gluster Management Console is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY - * or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Affero General Public License - * for more details. - * - * You should have received a copy of the GNU Affero General Public License - * along with this program. If not, see - * <http://www.gnu.org/licenses/>. - *******************************************************************************/ -package com.gluster.storage.management.console.dialogs; - -import java.util.ArrayList; -import java.util.List; - -import org.eclipse.jface.dialogs.Dialog; -import org.eclipse.swt.SWT; -import org.eclipse.swt.events.TraverseEvent; -import org.eclipse.swt.events.TraverseListener; -import org.eclipse.swt.layout.GridData; -import org.eclipse.swt.layout.GridLayout; -import org.eclipse.swt.widgets.Combo; -import org.eclipse.swt.widgets.Composite; -import org.eclipse.swt.widgets.Control; -import org.eclipse.swt.widgets.Label; -import org.eclipse.swt.widgets.Shell; - -import com.gluster.storage.management.console.utils.GUIHelper; -import com.gluster.storage.management.core.constants.GlusterConstants; - -public class InitializeDiskTypeSelection extends Dialog { - - private Combo formatTypeCombo = null; - private final GUIHelper guiHelper = GUIHelper.getInstance(); - private Composite initializeDiskTypeComposite; - private Composite composite; - private String fsType; - - public InitializeDiskTypeSelection(Shell parentShell) { - super(parentShell); - // TODO Auto-generated constructor stub - } - - @Override - protected void configureShell(Shell newShell) { - super.configureShell(newShell); - - newShell.setText("Gluster Management Console - Select File System Type"); - addEscapeListener(newShell); - } - - private void addEscapeListener(Shell shell) { - shell.addTraverseListener(new TraverseListener() { - - @Override - public void keyTraversed(TraverseEvent e) { - if (e.keyCode == SWT.ESC) { - cancelPressed(); - } - } - }); - } - - @Override - protected Control createDialogArea(Composite parent) { - // Makes sure that child composites inherit the same background - parent.setBackgroundMode(SWT.INHERIT_FORCE); - - composite = (Composite) super.createDialogArea(parent); - configureDialogLayout(composite); - createComposite(composite); - return composite; - } - - private void configureDialogLayout(Composite composite) { - GridLayout layout = (GridLayout) composite.getLayout(); - layout.numColumns = 3; - layout.marginLeft = 20; - layout.marginRight = 20; - layout.marginTop = 20; - layout.horizontalSpacing = 20; - layout.verticalSpacing = 20; - } - - private void createComposite(Composite composite) { - initializeDiskTypeComposite = new Composite(composite, SWT.NONE); - GridLayout layout = new GridLayout(3, false); - initializeDiskTypeComposite.setLayout(layout); - - createLabel(initializeDiskTypeComposite, "Format disk using "); - createFormatTypeCombo(initializeDiskTypeComposite); - createLabel(initializeDiskTypeComposite, " file system"); - } - - private void createLabel(Composite composite, String labelText) { - Label formatTypeLabel = new Label(composite, SWT.NONE); - formatTypeLabel.setText(labelText); - formatTypeLabel.setLayoutData(new GridData(GridData.END, GridData.CENTER, false, false)); - } - - private void createFormatTypeCombo(Composite composite) { - List<String> fsType = new ArrayList<String>(); - fsType.add(GlusterConstants.FSTYPE_DEFAULT); - fsType.add(GlusterConstants.FSTYPE_EXT_3); - fsType.add(GlusterConstants.FSTYPE_EXT_4); - fsType.add(GlusterConstants.FSTYPE_XFS); - formatTypeCombo = new Combo(composite, SWT.READ_ONLY); - formatTypeCombo.setItems(fsType.toArray(new String[0])); - formatTypeCombo.select(0); - } - - @Override - protected void okPressed() { - fsType = formatTypeCombo.getText(); - super.okPressed(); - } - - @Override - public void cancelPressed() { - super.cancelPressed(); - } - - /** - * Overriding to make sure that the dialog is centered in screen - */ - @Override - protected void initializeBounds() { - super.initializeBounds(); - - guiHelper.centerShellInScreen(getShell()); - } - - public String getFSType() { - return fsType.trim(); - } - -} diff --git a/src/com.gluster.storage.management.console/src/com/gluster/storage/management/console/views/DisksView.java b/src/com.gluster.storage.management.console/src/com/gluster/storage/management/console/views/DisksView.java deleted file mode 100644 index b0cf33b2..00000000 --- a/src/com.gluster.storage.management.console/src/com/gluster/storage/management/console/views/DisksView.java +++ /dev/null @@ -1,45 +0,0 @@ -package com.gluster.storage.management.console.views; - -import java.util.ArrayList; -import java.util.List; - -import org.eclipse.swt.SWT; -import org.eclipse.swt.widgets.Composite; -import org.eclipse.ui.part.ViewPart; - -import com.gluster.storage.management.console.utils.GUIHelper; -import com.gluster.storage.management.console.views.pages.DisksPage; -import com.gluster.storage.management.core.model.Disk; -import com.gluster.storage.management.core.model.EntityGroup; -import com.gluster.storage.management.core.model.GlusterServer; - -public class DisksView extends ViewPart { - public static final String ID = DisksView.class.getName(); - private static final GUIHelper guiHelper = GUIHelper.getInstance(); - private EntityGroup<GlusterServer> servers; - private DisksPage page; - - @SuppressWarnings("unchecked") - @Override - public void createPartControl(Composite parent) { - if (servers == null) { - servers = (EntityGroup<GlusterServer>)guiHelper.getSelectedEntity(getSite(), EntityGroup.class); - } - - page = new DisksPage(parent, SWT.NONE, getSite(), getAllDisks(servers)); - //page.layout(); // IMP: lays out the form properly - } - - private List<Disk> getAllDisks(EntityGroup<GlusterServer> servers) { - List<Disk> disks = new ArrayList<Disk>(); - for(GlusterServer server : (List<GlusterServer>)servers.getEntities()) { - disks.addAll(server.getDisks()); - } - return disks; - } - - @Override - public void setFocus() { - page.setFocus(); - } -}
\ No newline at end of file diff --git a/src/com.gluster.storage.management.console/src/com/gluster/storage/management/console/views/TasksView.java b/src/com.gluster.storage.management.console/src/com/gluster/storage/management/console/views/TasksView.java deleted file mode 100644 index e408e64e..00000000 --- a/src/com.gluster.storage.management.console/src/com/gluster/storage/management/console/views/TasksView.java +++ /dev/null @@ -1,39 +0,0 @@ -package com.gluster.storage.management.console.views; - -import java.util.List; - -import org.eclipse.swt.SWT; -import org.eclipse.swt.widgets.Composite; -import org.eclipse.ui.part.ViewPart; - -import com.gluster.storage.management.console.GlusterDataModelManager; -import com.gluster.storage.management.console.views.pages.TasksPage; -import com.gluster.storage.management.core.model.TaskInfo; - -public class TasksView extends ViewPart { - - public static final String ID = TasksView.class.getName(); - private TasksPage page; - - - public TasksView() { - // TODO Auto-generated constructor stub - } - - @Override - public void createPartControl(Composite parent) { - page = new TasksPage(getSite(), parent, SWT.NONE, getAllTasks()); - page.layout(); // IMP: lays out the form properly - } - - - private List<TaskInfo> getAllTasks() { - return GlusterDataModelManager.getInstance().getModel().getCluster().getTaskInfoList(); - } - - @Override - public void setFocus() { - page.setFocus(); - } - -} diff --git a/src/com.gluster.storage.management.console/src/com/gluster/storage/management/console/views/ViewsManager.java b/src/com.gluster.storage.management.console/src/com/gluster/storage/management/console/views/ViewsManager.java deleted file mode 100644 index 5b19ea98..00000000 --- a/src/com.gluster.storage.management.console/src/com/gluster/storage/management/console/views/ViewsManager.java +++ /dev/null @@ -1,38 +0,0 @@ -/** - * ViewsManager.java - * - * Copyright (c) 2011 Gluster, Inc. <http://www.gluster.com> - * This file is part of Gluster Management Console. - * - * Gluster Management Console is free software; you can redistribute it and/or - * modify it under the terms of the GNU Affero General Public License as published - * by the Free Software Foundation; either version 3 of the License, or - * (at your option) any later version. - * - * Gluster Management Console is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY - * or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Affero General Public License - * for more details. - * - * You should have received a copy of the GNU Affero General Public License - * along with this program. If not, see - * <http://www.gnu.org/licenses/>. - */ -package com.gluster.storage.management.console.views; - -import com.gluster.storage.management.core.model.Entity; - -/** - * Whenever the current selection/action demands opening different set of views, the views manager is used to open - * appropriate views. - */ -public interface ViewsManager { - /** - * Updates the views for given entity. This typically means that user is working with the given entity, and hence - * the views related to that entity should be made visible, and other un-related views should be hidden. - * - * @param entity - * The entity for which views are to be updated - */ - public void updateViews(Entity entity); -}
\ No newline at end of file diff --git a/src/com.gluster.storage.management.console/src/com/gluster/storage/management/console/views/VolumeBricksView.java b/src/com.gluster.storage.management.console/src/com/gluster/storage/management/console/views/VolumeBricksView.java deleted file mode 100644 index 0c494945..00000000 --- a/src/com.gluster.storage.management.console/src/com/gluster/storage/management/console/views/VolumeBricksView.java +++ /dev/null @@ -1,39 +0,0 @@ -package com.gluster.storage.management.console.views; - -import org.eclipse.swt.SWT; -import org.eclipse.swt.widgets.Composite; -import org.eclipse.ui.part.ViewPart; - -import com.gluster.storage.management.console.utils.GUIHelper; -import com.gluster.storage.management.console.views.pages.BricksPage; -import com.gluster.storage.management.core.model.Volume; - -public class VolumeBricksView extends ViewPart { - public static final String ID = VolumeBricksView.class.getName(); - private static final GUIHelper guiHelper = GUIHelper.getInstance(); - private BricksPage page; - private Volume volume; - - @Override - public void createPartControl(Composite parent) { - if (volume == null) { - volume = (Volume) guiHelper.getSelectedEntity(getSite(), Volume.class); - } - - createPage(parent); - } - - /** - * @param parent - */ - private void createPage(Composite parent) { - page = new BricksPage(parent, SWT.NONE, getSite(), volume.getBricks()); - parent.layout(); // IMP: lays out the form properly - } - - @Override - public void setFocus() { - page.setFocus(); - } -} - diff --git a/src/com.gluster.storage.management.console/src/com/gluster/storage/management/console/views/VolumeLogsView.java b/src/com.gluster.storage.management.console/src/com/gluster/storage/management/console/views/VolumeLogsView.java deleted file mode 100644 index e6a5370f..00000000 --- a/src/com.gluster.storage.management.console/src/com/gluster/storage/management/console/views/VolumeLogsView.java +++ /dev/null @@ -1,35 +0,0 @@ -package com.gluster.storage.management.console.views; - -import org.eclipse.swt.SWT; -import org.eclipse.swt.widgets.Composite; -import org.eclipse.ui.part.ViewPart; - -import com.gluster.storage.management.console.utils.GUIHelper; -import com.gluster.storage.management.console.views.pages.VolumeLogsPage; -import com.gluster.storage.management.core.model.Volume; - -public class VolumeLogsView extends ViewPart { - VolumeLogsPage logsPage; - public static final String ID = VolumeLogsView.class.getName(); - private static final GUIHelper guiHelper = GUIHelper.getInstance(); - private Volume volume; - - @Override - public void createPartControl(Composite parent) { - if (volume == null) { - volume = (Volume) guiHelper.getSelectedEntity(getSite(), Volume.class); - } - - createPage(parent); - } - - private void createPage(Composite parent) { - logsPage = new VolumeLogsPage(parent, SWT.NONE, volume); - parent.layout(); // IMP: lays out the form properly - } - - @Override - public void setFocus() { - logsPage.setFocus(); - } -}
\ No newline at end of file diff --git a/src/com.gluster.storage.management.console/src/com/gluster/storage/management/console/views/VolumeOptionsView.java b/src/com.gluster.storage.management.console/src/com/gluster/storage/management/console/views/VolumeOptionsView.java deleted file mode 100644 index 7be16f48..00000000 --- a/src/com.gluster.storage.management.console/src/com/gluster/storage/management/console/views/VolumeOptionsView.java +++ /dev/null @@ -1,36 +0,0 @@ -package com.gluster.storage.management.console.views; - -import org.eclipse.swt.SWT; -import org.eclipse.swt.widgets.Composite; -import org.eclipse.ui.part.ViewPart; - -import com.gluster.storage.management.console.utils.GUIHelper; -import com.gluster.storage.management.console.views.pages.VolumeOptionsPage; -import com.gluster.storage.management.core.model.Volume; - -public class VolumeOptionsView extends ViewPart { - public static final String ID = VolumeOptionsView.class.getName(); - private static final GUIHelper guiHelper = GUIHelper.getInstance(); - private VolumeOptionsPage page; - private Volume volume; - - @Override - public void createPartControl(Composite parent) { - if (volume == null) { - volume = (Volume) guiHelper.getSelectedEntity(getSite(), Volume.class); - } - - createPage(parent); - } - - private void createPage(Composite parent) { - page = new VolumeOptionsPage(parent, SWT.NONE, volume); - parent.layout(); // IMP: lays out the form properly - } - - @Override - public void setFocus() { - page.setFocus(); - } -} - diff --git a/src/com.gluster.storage.management.console/src/test.xml b/src/com.gluster.storage.management.console/src/test.xml deleted file mode 100644 index 12bbf745..00000000 --- a/src/com.gluster.storage.management.console/src/test.xml +++ /dev/null @@ -1 +0,0 @@ -<?xml version="1.0" encoding="UTF-8"?> diff --git a/src/com.gluster.storage.management.core/META-INF/MANIFEST.MF b/src/com.gluster.storage.management.core/META-INF/MANIFEST.MF deleted file mode 100644 index b4431f53..00000000 --- a/src/com.gluster.storage.management.core/META-INF/MANIFEST.MF +++ /dev/null @@ -1,14 +0,0 @@ -Manifest-Version: 1.0 -Bundle-ManifestVersion: 2 -Bundle-Name: Gluster Storage Platform Core -Bundle-SymbolicName: com.gluster.storage.management.core -Bundle-Version: 1.0.0 -Bundle-Vendor: GLUSTER -Bundle-RequiredExecutionEnvironment: JavaSE-1.6 -Export-Package: com.gluster.storage.management.core.constants, - com.gluster.storage.management.core.exceptions, - com.gluster.storage.management.core.model, - com.gluster.storage.management.core.response, - com.gluster.storage.management.core.utils -Require-Bundle: org.eclipse.core.runtime;bundle-version="3.6.0" -Bundle-ClassPath: . diff --git a/src/com.gluster.storage.management.core/build.properties b/src/com.gluster.storage.management.core/build.properties deleted file mode 100644 index 89d32a46..00000000 --- a/src/com.gluster.storage.management.core/build.properties +++ /dev/null @@ -1,7 +0,0 @@ -source.. = src/ -output.. = bin/ -bin.includes = META-INF/,\ - .,\ - lib/ -src.includes = lib/,\ - src/ diff --git a/src/com.gluster.storage.management.core/junit/com/gluster/storage/management/core/utils/TestFileUtil.java b/src/com.gluster.storage.management.core/junit/com/gluster/storage/management/core/utils/TestFileUtil.java deleted file mode 100644 index f562a53c..00000000 --- a/src/com.gluster.storage.management.core/junit/com/gluster/storage/management/core/utils/TestFileUtil.java +++ /dev/null @@ -1,73 +0,0 @@ -/** - * TestFileUtil.java - * - * Copyright (c) 2011 Gluster, Inc. <http://www.gluster.com> - * This file is part of Gluster Management Console. - * - * Gluster Management Console is free software; you can redistribute it and/or - * modify it under the terms of the GNU Affero General Public License as published - * by the Free Software Foundation; either version 3 of the License, or - * (at your option) any later version. - * - * Gluster Management Console is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY - * or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Affero General Public License - * for more details. - * - * You should have received a copy of the GNU Affero General Public License - * along with this program. If not, see - * <http://www.gnu.org/licenses/>. - */ -package com.gluster.storage.management.core.utils; - -import static org.junit.Assert.assertTrue; - -import java.io.BufferedOutputStream; -import java.io.File; -import java.io.FileOutputStream; -import java.io.OutputStreamWriter; - -import org.junit.After; -import org.junit.Before; -import org.junit.Test; - -public class TestFileUtil { - private String testFileName; - private String fileContent; - private FileUtil fileUtil; - - /** - * @throws java.lang.Exception - */ - @Before - public void setUp() throws Exception { - testFileName = "testFileUtil.txt"; - fileContent = "Testing FileUtil class."; - fileUtil = new FileUtil(); - - BufferedOutputStream outStream = new BufferedOutputStream(new FileOutputStream(testFileName)); - OutputStreamWriter writer = new OutputStreamWriter(outStream); - writer.write(fileContent); - writer.close(); - outStream.close(); - } - - /** - * @throws java.lang.Exception - */ - @After - public void tearDown() throws Exception { - File testFile = new File(testFileName); - testFile.delete(); - } - - /** - * Test method for {@link com.gluster.storage.management.core.utils.FileUtil#readFileAsString(java.io.File)}. - */ - @Test - public final void testReadFileAsString() { - String readContent = fileUtil.readFileAsString(new File(testFileName)); - assertTrue("File contents expected [" + fileContent + "], actual [" + readContent + "]", - readContent.equals(fileContent)); - } -} diff --git a/src/com.gluster.storage.management.core/src/com/gluster/storage/management/core/exceptions/GlusterValidationException.java b/src/com.gluster.storage.management.core/src/com/gluster/storage/management/core/exceptions/GlusterValidationException.java deleted file mode 100644 index ca5e01f8..00000000 --- a/src/com.gluster.storage.management.core/src/com/gluster/storage/management/core/exceptions/GlusterValidationException.java +++ /dev/null @@ -1,27 +0,0 @@ -/******************************************************************************* - * Copyright (c) 2011 Gluster, Inc. <http://www.gluster.com> - * This file is part of Gluster Management Console. - * - * Gluster Management Console is free software; you can redistribute it and/or - * modify it under the terms of the GNU Affero General Public License as published - * by the Free Software Foundation; either version 3 of the License, or - * (at your option) any later version. - * - * Gluster Management Console is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY - * or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Affero General Public License - * for more details. - * - * You should have received a copy of the GNU Affero General Public License - * along with this program. If not, see - * <http://www.gnu.org/licenses/>. - *******************************************************************************/ -package com.gluster.storage.management.core.exceptions; - -public class GlusterValidationException extends GlusterRuntimeException { - private static final long serialVersionUID = 1L; - - public GlusterValidationException(String message) { - super(message); - } -} diff --git a/src/com.gluster.storage.management.core/src/com/gluster/storage/management/core/response/AbstractResponse.java b/src/com.gluster.storage.management.core/src/com/gluster/storage/management/core/response/AbstractResponse.java deleted file mode 100644 index 9a6a48f5..00000000 --- a/src/com.gluster.storage.management.core/src/com/gluster/storage/management/core/response/AbstractResponse.java +++ /dev/null @@ -1,35 +0,0 @@ -/******************************************************************************* - * Copyright (c) 2011 Gluster, Inc. <http://www.gluster.com> - * This file is part of Gluster Management Console. - * - * Gluster Management Console is free software; you can redistribute it and/or - * modify it under the terms of the GNU Affero General Public License as published - * by the Free Software Foundation; either version 3 of the License, or - * (at your option) any later version. - * - * Gluster Management Console is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY - * or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Affero General Public License - * for more details. - * - * You should have received a copy of the GNU Affero General Public License - * along with this program. If not, see - * <http://www.gnu.org/licenses/>. - *******************************************************************************/ -package com.gluster.storage.management.core.response;
- -import com.gluster.storage.management.core.model.Response; -import com.gluster.storage.management.core.model.Status; -
-public abstract class AbstractResponse implements Response {
- private Status status;
-
- @Override
- public Status getStatus() {
- return status;
- }
-
- public void setStatus(Status status) {
- this.status = status;
- }
-}
\ No newline at end of file diff --git a/src/com.gluster.storage.management.core/src/com/gluster/storage/management/core/response/GlusterServerResponse.java b/src/com.gluster.storage.management.core/src/com/gluster/storage/management/core/response/GlusterServerResponse.java deleted file mode 100644 index 7af9b240..00000000 --- a/src/com.gluster.storage.management.core/src/com/gluster/storage/management/core/response/GlusterServerResponse.java +++ /dev/null @@ -1,35 +0,0 @@ -package com.gluster.storage.management.core.response; - -import javax.xml.bind.annotation.XmlRootElement; -import javax.xml.bind.annotation.XmlTransient; - -import com.gluster.storage.management.core.model.GlusterServer; -import com.gluster.storage.management.core.model.Status; - -@XmlRootElement(name = "response") -public class GlusterServerResponse extends AbstractResponse { - private GlusterServer glusterServer; - - public GlusterServerResponse() { - } - - public GlusterServerResponse(Status status, GlusterServer server) { - setStatus(status); - setGlusterServer(server); - } - - public GlusterServer getGlusterServer() { - return glusterServer; - } - - public void setGlusterServer(GlusterServer glusterServer) { - this.glusterServer = glusterServer; - } - - @XmlTransient - @Override - public GlusterServer getData() { - return getGlusterServer(); - } - -} diff --git a/src/com.gluster.storage.management.core/src/com/gluster/storage/management/core/response/LogMessageListResponse.java b/src/com.gluster.storage.management.core/src/com/gluster/storage/management/core/response/LogMessageListResponse.java deleted file mode 100644 index 8c362fa9..00000000 --- a/src/com.gluster.storage.management.core/src/com/gluster/storage/management/core/response/LogMessageListResponse.java +++ /dev/null @@ -1,33 +0,0 @@ -/** - * - */ -package com.gluster.storage.management.core.response; - -import java.util.ArrayList; -import java.util.List; - -import javax.xml.bind.annotation.XmlElement; -import javax.xml.bind.annotation.XmlRootElement; - -import com.gluster.storage.management.core.model.VolumeLogMessage; - -@XmlRootElement(name = "logMessages") -public class LogMessageListResponse { - private List<VolumeLogMessage> logMessages = new ArrayList<VolumeLogMessage>(); - - public LogMessageListResponse() { - } - - public LogMessageListResponse(List<VolumeLogMessage> logMessages) { - setLogMessages(logMessages); - } - - @XmlElement(name = "logMessage", type = VolumeLogMessage.class) - public List<VolumeLogMessage> getLogMessages() { - return logMessages; - } - - public void setLogMessages(List<VolumeLogMessage> logMessages) { - this.logMessages = logMessages; - } -} diff --git a/src/com.gluster.storage.management.core/src/com/gluster/storage/management/core/response/TaskResponse.java b/src/com.gluster.storage.management.core/src/com/gluster/storage/management/core/response/TaskResponse.java deleted file mode 100755 index a11c9903..00000000 --- a/src/com.gluster.storage.management.core/src/com/gluster/storage/management/core/response/TaskResponse.java +++ /dev/null @@ -1,52 +0,0 @@ -/** - * TaskInfoResponse.java - * - * Copyright (c) 2011 Gluster, Inc. <http://www.gluster.com> - * This file is part of Gluster Management Console. - * - * Gluster Management Console is free software; you can redistribute it and/or - * modify it under the terms of the GNU Affero General Public License as published - * by the Free Software Foundation; either version 3 of the License, or - * (at your option) any later version. - * - * Gluster Management Console is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY - * or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Affero General Public License - * for more details. - * - * You should have received a copy of the GNU Affero General Public License - * along with this program. If not, see - * <http://www.gnu.org/licenses/>. - */ -package com.gluster.storage.management.core.response; - -import javax.xml.bind.annotation.XmlRootElement; - -import com.gluster.storage.management.core.model.Status; -import com.gluster.storage.management.core.model.TaskInfo; - -@XmlRootElement(name = "response") -public class TaskResponse extends AbstractResponse { - private TaskInfo taskInfo; - private Status status; - - public TaskResponse() { - } - - public Status getStatus() { - return status; - } - - public void setStatus(Status status) { - this.status = status; - } - - public void setData(TaskInfo taskInfo) { - this.taskInfo = taskInfo; - } - - @Override - public TaskInfo getData() { - return taskInfo; - } -} diff --git a/src/com.gluster.storage.management.core/src/com/gluster/storage/management/core/response/VolumeListResponse.java b/src/com.gluster.storage.management.core/src/com/gluster/storage/management/core/response/VolumeListResponse.java deleted file mode 100644 index 6518f0d5..00000000 --- a/src/com.gluster.storage.management.core/src/com/gluster/storage/management/core/response/VolumeListResponse.java +++ /dev/null @@ -1,31 +0,0 @@ -package com.gluster.storage.management.core.response; - -import java.util.ArrayList; -import java.util.List; - -import javax.xml.bind.annotation.XmlElement; -import javax.xml.bind.annotation.XmlRootElement; - -import com.gluster.storage.management.core.model.Volume; - -@XmlRootElement(name = "volumes") -public class VolumeListResponse { - private List<Volume> volumes = new ArrayList<Volume>(); - - public VolumeListResponse() { - - } - - public VolumeListResponse(List<Volume> volumes) { - setVolumes(volumes); - } - - @XmlElement(name = "volume", type = Volume.class) - public List<Volume> getVolumes() { - return this.volumes; - } - - public void setVolumes(List<Volume> volumes) { - this.volumes = volumes; - } -} diff --git a/src/com.gluster.storage.management.core/src/com/gluster/storage/management/core/utils/MD5.java b/src/com.gluster.storage.management.core/src/com/gluster/storage/management/core/utils/MD5.java deleted file mode 100644 index e0daaf81..00000000 --- a/src/com.gluster.storage.management.core/src/com/gluster/storage/management/core/utils/MD5.java +++ /dev/null @@ -1,504 +0,0 @@ -/* - * MD5 in Java JDK Beta-2 - * written Santeri Paavolainen, Helsinki Finland 1996 - * (c) Santeri Paavolainen, Helsinki Finland 1996 - * - * This program is free software; you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation; either version 2 of the License, or - * (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with this program; if not, write to the Free Software - * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. - * - * - * See http://www.cs.hut.fi/~santtu/java/ for more information on this - * class. - * - * This is rather straight re-implementation of the reference implementation - * given in RFC1321 by RSA. - * - * Passes MD5 test suite as defined in RFC1321. - * - * - * This Java class has been derivedfrom the RSA Data Security, Inc. MD5 - * Message-Digest Algorithm and its reference implementation. - * - * - * $Log: MD5.java,v $ - * Revision 1.1 2004/07/12 13:35:20 aubryp - * initial commit - * - * Revision 1.3 2002/03/16 01:46:39 broccol - * Moved the MD5 classes into the md5 package to make 1.4 javac happy - * - * Revision 1.2 1999/11/04 21:38:00 broccol - * Got MD5Crypt calculating the same hash as the OpenBSD md5crypt.c routine. - * - * Revision 1.1 1999/08/05 22:07:03 broccol - * Added support for the MD5 classes. - * - * Revision 1.3 1996/04/15 07:28:09 santtu - * Added GPL statements, and RSA derivate statements. - * - * Revision 1.2 1996/03/04 08:05:48 santtu - * Added offsets to Update method - * - * Revision 1.1 1996/01/07 20:51:59 santtu - * Initial revision - * - */ -package com.gluster.storage.management.core.utils; - -/** - * Contains internal state of the MD5 class - * - * @author Santeri Paavolainen <sjpaavol@cc.helsinki.fi> - */ - -class MD5State { - /** - * 128-byte state - */ - int state[]; - - /** - * 64-bit character count (could be true Java long?) - */ - int count[]; - - /** - * 64-byte buffer (512 bits) for storing to-be-hashed characters - */ - byte buffer[]; - - public MD5State() { - buffer = new byte[64]; - count = new int[2]; - state = new int[4]; - - state[0] = 0x67452301; - state[1] = 0xefcdab89; - state[2] = 0x98badcfe; - state[3] = 0x10325476; - - count[0] = count[1] = 0; - } - - /** Create this State as a copy of another state */ - public MD5State(MD5State from) { - this (); - - int i; - - for (i = 0; i < buffer.length; i++) - this .buffer[i] = from.buffer[i]; - - for (i = 0; i < state.length; i++) - this .state[i] = from.state[i]; - - for (i = 0; i < count.length; i++) - this .count[i] = from.count[i]; - } -}; - -/** - * Implementation of RSA's MD5 hash generator - * - * @version $Revision: 1.1 $ - * @author Santeri Paavolainen <sjpaavol@cc.helsinki.fi> - */ - -public class MD5 { - /** - * MD5 state - */ - MD5State state; - - /** - * If Final() has been called, finals is set to the current finals - * state. Any Update() causes this to be set to null. - */ - MD5State finals; - - /** - * Padding for Final() - */ - static byte padding[] = { (byte) 0x80, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 }; - - /** - * Initialize MD5 internal state (object can be reused just by - * calling Init() after every Final() - */ - public synchronized void Init() { - state = new MD5State(); - finals = null; - } - - /** - * Class constructor - */ - public MD5() { - this .Init(); - } - - /** - * Initialize class, and update hash with ob.toString() - * - * @param ob Object, ob.toString() is used to update hash - * after initialization - */ - public MD5(Object ob) { - this (); - Update(ob.toString()); - } - - public String debugDump() { - return asHex(); - } - - private int rotate_left(int x, int n) { - return (x << n) | (x >>> (32 - n)); - } - - /* I wonder how many loops and hoops you'll have to go through to - get unsigned add for longs in java */ - - private int uadd(int a, int b) { - long aa, bb; - aa = ((long) a) & 0xffffffffL; - bb = ((long) b) & 0xffffffffL; - - aa += bb; - - return (int) (aa & 0xffffffffL); - } - - private int uadd(int a, int b, int c) { - return uadd(uadd(a, b), c); - } - - private int uadd(int a, int b, int c, int d) { - return uadd(uadd(a, b, c), d); - } - - private int FF(int a, int b, int c, int d, int x, int s, int ac) { - a = uadd(a, ((b & c) | (~b & d)), x, ac); - return uadd(rotate_left(a, s), b); - } - - private int GG(int a, int b, int c, int d, int x, int s, int ac) { - a = uadd(a, ((b & d) | (c & ~d)), x, ac); - return uadd(rotate_left(a, s), b); - } - - private int HH(int a, int b, int c, int d, int x, int s, int ac) { - a = uadd(a, (b ^ c ^ d), x, ac); - return uadd(rotate_left(a, s), b); - } - - private int II(int a, int b, int c, int d, int x, int s, int ac) { - a = uadd(a, (c ^ (b | ~d)), x, ac); - return uadd(rotate_left(a, s), b); - } - - private int[] Decode(byte buffer[], int len, int shift) { - int out[]; - int i, j; - - out = new int[16]; - - for (i = j = 0; j < len; i++, j += 4) { - out[i] = ((int) (buffer[j + shift] & 0xff)) - | (((int) (buffer[j + 1 + shift] & 0xff)) << 8) - | (((int) (buffer[j + 2 + shift] & 0xff)) << 16) - | (((int) (buffer[j + 3 + shift] & 0xff)) << 24); - } - - return out; - } - - private void Transform(MD5State state, byte buffer[], int shift) { - int a = state.state[0], b = state.state[1], c = state.state[2], d = state.state[3], x[]; - - x = Decode(buffer, 64, shift); - - /* Round 1 */ - a = FF(a, b, c, d, x[0], 7, 0xd76aa478); /* 1 */ - d = FF(d, a, b, c, x[1], 12, 0xe8c7b756); /* 2 */ - c = FF(c, d, a, b, x[2], 17, 0x242070db); /* 3 */ - b = FF(b, c, d, a, x[3], 22, 0xc1bdceee); /* 4 */ - a = FF(a, b, c, d, x[4], 7, 0xf57c0faf); /* 5 */ - d = FF(d, a, b, c, x[5], 12, 0x4787c62a); /* 6 */ - c = FF(c, d, a, b, x[6], 17, 0xa8304613); /* 7 */ - b = FF(b, c, d, a, x[7], 22, 0xfd469501); /* 8 */ - a = FF(a, b, c, d, x[8], 7, 0x698098d8); /* 9 */ - d = FF(d, a, b, c, x[9], 12, 0x8b44f7af); /* 10 */ - c = FF(c, d, a, b, x[10], 17, 0xffff5bb1); /* 11 */ - b = FF(b, c, d, a, x[11], 22, 0x895cd7be); /* 12 */ - a = FF(a, b, c, d, x[12], 7, 0x6b901122); /* 13 */ - d = FF(d, a, b, c, x[13], 12, 0xfd987193); /* 14 */ - c = FF(c, d, a, b, x[14], 17, 0xa679438e); /* 15 */ - b = FF(b, c, d, a, x[15], 22, 0x49b40821); /* 16 */ - - /* Round 2 */ - a = GG(a, b, c, d, x[1], 5, 0xf61e2562); /* 17 */ - d = GG(d, a, b, c, x[6], 9, 0xc040b340); /* 18 */ - c = GG(c, d, a, b, x[11], 14, 0x265e5a51); /* 19 */ - b = GG(b, c, d, a, x[0], 20, 0xe9b6c7aa); /* 20 */ - a = GG(a, b, c, d, x[5], 5, 0xd62f105d); /* 21 */ - d = GG(d, a, b, c, x[10], 9, 0x2441453); /* 22 */ - c = GG(c, d, a, b, x[15], 14, 0xd8a1e681); /* 23 */ - b = GG(b, c, d, a, x[4], 20, 0xe7d3fbc8); /* 24 */ - a = GG(a, b, c, d, x[9], 5, 0x21e1cde6); /* 25 */ - d = GG(d, a, b, c, x[14], 9, 0xc33707d6); /* 26 */ - c = GG(c, d, a, b, x[3], 14, 0xf4d50d87); /* 27 */ - b = GG(b, c, d, a, x[8], 20, 0x455a14ed); /* 28 */ - a = GG(a, b, c, d, x[13], 5, 0xa9e3e905); /* 29 */ - d = GG(d, a, b, c, x[2], 9, 0xfcefa3f8); /* 30 */ - c = GG(c, d, a, b, x[7], 14, 0x676f02d9); /* 31 */ - b = GG(b, c, d, a, x[12], 20, 0x8d2a4c8a); /* 32 */ - - /* Round 3 */ - a = HH(a, b, c, d, x[5], 4, 0xfffa3942); /* 33 */ - d = HH(d, a, b, c, x[8], 11, 0x8771f681); /* 34 */ - c = HH(c, d, a, b, x[11], 16, 0x6d9d6122); /* 35 */ - b = HH(b, c, d, a, x[14], 23, 0xfde5380c); /* 36 */ - a = HH(a, b, c, d, x[1], 4, 0xa4beea44); /* 37 */ - d = HH(d, a, b, c, x[4], 11, 0x4bdecfa9); /* 38 */ - c = HH(c, d, a, b, x[7], 16, 0xf6bb4b60); /* 39 */ - b = HH(b, c, d, a, x[10], 23, 0xbebfbc70); /* 40 */ - a = HH(a, b, c, d, x[13], 4, 0x289b7ec6); /* 41 */ - d = HH(d, a, b, c, x[0], 11, 0xeaa127fa); /* 42 */ - c = HH(c, d, a, b, x[3], 16, 0xd4ef3085); /* 43 */ - b = HH(b, c, d, a, x[6], 23, 0x4881d05); /* 44 */ - a = HH(a, b, c, d, x[9], 4, 0xd9d4d039); /* 45 */ - d = HH(d, a, b, c, x[12], 11, 0xe6db99e5); /* 46 */ - c = HH(c, d, a, b, x[15], 16, 0x1fa27cf8); /* 47 */ - b = HH(b, c, d, a, x[2], 23, 0xc4ac5665); /* 48 */ - - /* Round 4 */ - a = II(a, b, c, d, x[0], 6, 0xf4292244); /* 49 */ - d = II(d, a, b, c, x[7], 10, 0x432aff97); /* 50 */ - c = II(c, d, a, b, x[14], 15, 0xab9423a7); /* 51 */ - b = II(b, c, d, a, x[5], 21, 0xfc93a039); /* 52 */ - a = II(a, b, c, d, x[12], 6, 0x655b59c3); /* 53 */ - d = II(d, a, b, c, x[3], 10, 0x8f0ccc92); /* 54 */ - c = II(c, d, a, b, x[10], 15, 0xffeff47d); /* 55 */ - b = II(b, c, d, a, x[1], 21, 0x85845dd1); /* 56 */ - a = II(a, b, c, d, x[8], 6, 0x6fa87e4f); /* 57 */ - d = II(d, a, b, c, x[15], 10, 0xfe2ce6e0); /* 58 */ - c = II(c, d, a, b, x[6], 15, 0xa3014314); /* 59 */ - b = II(b, c, d, a, x[13], 21, 0x4e0811a1); /* 60 */ - a = II(a, b, c, d, x[4], 6, 0xf7537e82); /* 61 */ - d = II(d, a, b, c, x[11], 10, 0xbd3af235); /* 62 */ - c = II(c, d, a, b, x[2], 15, 0x2ad7d2bb); /* 63 */ - b = II(b, c, d, a, x[9], 21, 0xeb86d391); /* 64 */ - - state.state[0] += a; - state.state[1] += b; - state.state[2] += c; - state.state[3] += d; - } - - /** - * Updates hash with the bytebuffer given (using at maximum length bytes from - * that buffer) - * - * @param stat Which state is updated - * @param buffer Array of bytes to be hashed - * @param offset Offset to buffer array - * @param length Use at maximum `length' bytes (absolute - * maximum is buffer.length) - */ - public void Update(MD5State stat, byte buffer[], int offset, - int length) { - int index, partlen, i, start; - - finals = null; - - /* Length can be told to be shorter, but not inter */ - if ((length - offset) > buffer.length) - length = buffer.length - offset; - - /* compute number of bytes mod 64 */ - index = (int) (stat.count[0] >>> 3) & 0x3f; - - if ((stat.count[0] += (length << 3)) < (length << 3)) - stat.count[1]++; - - stat.count[1] += length >>> 29; - - partlen = 64 - index; - - if (length >= partlen) { - for (i = 0; i < partlen; i++) - stat.buffer[i + index] = buffer[i + offset]; - - Transform(stat, stat.buffer, 0); - - for (i = partlen; (i + 63) < length; i += 64) - Transform(stat, buffer, i); - - index = 0; - } else - i = 0; - - /* buffer remaining input */ - if (i < length) { - start = i; - for (; i < length; i++) - stat.buffer[index + i - start] = buffer[i + offset]; - } - } - - /* - * Update()s for other datatypes than byte[] also. Update(byte[], int) - * is only the main driver. - */ - - /** - * Plain update, updates this object - */ - - public void Update(byte buffer[], int offset, int length) { - Update(this .state, buffer, offset, length); - } - - public void Update(byte buffer[], int length) { - Update(this .state, buffer, 0, length); - } - - /** - * Updates hash with given array of bytes - * - * @param buffer Array of bytes to use for updating the hash - */ - public void Update(byte buffer[]) { - Update(buffer, 0, buffer.length); - } - - /** - * Updates hash with a single byte - * - * @param b Single byte to update the hash - */ - public void Update(byte b) { - byte buffer[] = new byte[1]; - buffer[0] = b; - - Update(buffer, 1); - } - - /** - * Update buffer with given string. - * - * @param s String to be update to hash (is used as - * s.getBytes()) - */ - public void Update(String s) { - byte chars[]; - - chars = s.getBytes(); - - Update(chars, chars.length); - } - - private byte[] Encode(int input[], int len) { - int i, j; - byte out[]; - - out = new byte[len]; - - for (i = j = 0; j < len; i++, j += 4) { - out[j] = (byte) (input[i] & 0xff); - out[j + 1] = (byte) ((input[i] >>> 8) & 0xff); - out[j + 2] = (byte) ((input[i] >>> 16) & 0xff); - out[j + 3] = (byte) ((input[i] >>> 24) & 0xff); - } - - return out; - } - - /** - * Returns array of bytes (16 bytes) representing hash as of the - * current state of this object. Note: getting a hash does not - * invalidate the hash object, it only creates a copy of the real - * state which is finalized. - * - * @return Array of 16 bytes, the hash of all updated bytes - */ - public synchronized byte[] Final() { - byte bits[]; - int index, padlen; - MD5State fin; - - if (finals == null) { - fin = new MD5State(state); - - bits = Encode(fin.count, 8); - - index = (int) ((fin.count[0] >>> 3) & 0x3f); - padlen = (index < 56) ? (56 - index) : (120 - index); - - Update(fin, padding, 0, padlen); - /**/ - Update(fin, bits, 0, 8); - - /* Update() sets finalds to null */ - finals = fin; - } - - return Encode(finals.state, 16); - } - - /** - * Turns array of bytes into string representing each byte as - * unsigned hex number. - * - * @param hash Array of bytes to convert to hex-string - * @return Generated hex string - */ - public static String asHex(byte hash[]) { - StringBuffer buf = new StringBuffer(hash.length * 2); - int i; - - for (i = 0; i < hash.length; i++) { - if (((int) hash[i] & 0xff) < 0x10) - buf.append("0"); - - buf.append(Long.toString((int) hash[i] & 0xff, 16)); - } - - return buf.toString(); - } - - /** - * Returns 32-character hex representation of this objects hash - * - * @return String of this object's hash - */ - public String asHex() { - return asHex(this .Final()); - } - - /** - * One-stop md5 string encrypting. - */ - - public static String md5crypt(String input) { - MD5 md5 = new MD5(); - md5.Init(); - md5.Update(input); - return md5.asHex(); - } -}
\ No newline at end of file diff --git a/src/com.gluster.storage.management.core/src/com/gluster/storage/management/core/utils/MD5Crypt.java b/src/com.gluster.storage.management.core/src/com/gluster/storage/management/core/utils/MD5Crypt.java deleted file mode 100644 index 25c757a2..00000000 --- a/src/com.gluster.storage.management.core/src/com/gluster/storage/management/core/utils/MD5Crypt.java +++ /dev/null @@ -1,339 +0,0 @@ -/*------------------------------------------------------------------------------ - class - MD5Crypt - ------------------------------------------------------------------------------*/ - -package com.gluster.storage.management.core.utils; - - -/** - * <p>This class defines a method, - * {@link MD5Crypt#crypt(java.lang.String, java.lang.String) crypt()}, which - * takes a password and a salt string and generates an OpenBSD/FreeBSD/Linux-compatible - * md5-encoded password entry.</p> - * - * <p>Created: 3 November 1999</p> - * <p>Release: $Name: $</p> - * <p>Version: $Revision: 1.1 $</p> - * <p>Last Mod Date: $Date: 2004/07/12 13:35:20 $</p> - * <p>Java Code By: Jonathan Abbey, jonabbey@arlut.utexas.edu</p> - * <p>Original C Version:<pre> - * ---------------------------------------------------------------------------- - * "THE BEER-WARE LICENSE" (Revision 42): - * <phk@login.dknet.dk> wrote this file. As long as you retain this notice you - * can do whatever you want with this stuff. If we meet some day, and you think - * this stuff is worth it, you can buy me a beer in return. Poul-Henning Kamp - * ---------------------------------------------------------------------------- - * </pre></p> - * - * @author Jonathan Abbey <jonabbey at arlut.utexas.edu> - */ -public final class MD5Crypt { - - /** - * - * Command line test rig. - * - */ - - static public void main(String argv[]) { - if ((argv.length < 1) || (argv.length > 3)) { - System.err - .println("Usage: MD5Crypt [-apache] password salt"); - System.exit(1); - } - - if (argv.length == 3) { - System.err.println(MD5Crypt.apacheCrypt(argv[1], argv[2])); - } else if (argv.length == 2) { - System.err.println(MD5Crypt.crypt(argv[0], argv[1])); - } else { - System.err.println(MD5Crypt.crypt(argv[0])); - } - - System.exit(0); - } - - static private final String SALTCHARS = "abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ1234567890"; - - static private final String itoa64 = "./0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz"; - - static private final String to64(long v, int size) { - StringBuffer result = new StringBuffer(); - - while (--size >= 0) { - result.append(itoa64.charAt((int) (v & 0x3f))); - v >>>= 6; - } - - return result.toString(); - } - - static private final void clearbits(byte bits[]) { - for (int i = 0; i < bits.length; i++) { - bits[i] = 0; - } - } - - /** - * convert an encoded unsigned byte value into a int - * with the unsigned value. - */ - - static private final int bytes2u(byte inp) { - return (int) inp & 0xff; - } - - /** - * <p>This method actually generates a OpenBSD/FreeBSD/Linux PAM compatible - * md5-encoded password hash from a plaintext password and a - * salt.</p> - * - * <p>The resulting string will be in the form '$1$<salt>$<hashed mess></p> - * - * @param password Plaintext password - * - * @return An OpenBSD/FreeBSD/Linux-compatible md5-hashed password field. - */ - - static public final String crypt(String password) { - StringBuffer salt = new StringBuffer(); - java.util.Random randgen = new java.util.Random(); - - /* -- */ - - while (salt.length() < 8) { - int index = (int) (randgen.nextFloat() * SALTCHARS.length()); - salt.append(SALTCHARS.substring(index, index + 1)); - } - - return MD5Crypt.crypt(password, salt.toString()); - } - - /** - * <p>This method actually generates a OpenBSD/FreeBSD/Linux PAM compatible - * md5-encoded password hash from a plaintext password and a - * salt.</p> - * - * <p>The resulting string will be in the form '$1$<salt>$<hashed mess></p> - * - * @param password Plaintext password - * @param salt A short string to use to randomize md5. May start with $1$, which - * will be ignored. It is explicitly permitted to pass a pre-existing - * MD5Crypt'ed password entry as the salt. crypt() will strip the salt - * chars out properly. - * - * @return An OpenBSD/FreeBSD/Linux-compatible md5-hashed password field. - */ - - static public final String crypt(String password, String salt) { - return MD5Crypt.crypt(password, salt, "$1$"); - } - - /** - * <p>This method generates an Apache MD5 compatible - * md5-encoded password hash from a plaintext password and a - * salt.</p> - * - * <p>The resulting string will be in the form '$apr1$<salt>$<hashed mess></p> - * - * @param password Plaintext password - * - * @return An Apache-compatible md5-hashed password string. - */ - - static public final String apacheCrypt(String password) { - StringBuffer salt = new StringBuffer(); - java.util.Random randgen = new java.util.Random(); - - /* -- */ - - while (salt.length() < 8) { - int index = (int) (randgen.nextFloat() * SALTCHARS.length()); - salt.append(SALTCHARS.substring(index, index + 1)); - } - - return MD5Crypt.apacheCrypt(password, salt.toString()); - } - - /** - * <p>This method actually generates an Apache MD5 compatible - * md5-encoded password hash from a plaintext password and a - * salt.</p> - * - * <p>The resulting string will be in the form '$apr1$<salt>$<hashed mess></p> - * - * @param password Plaintext password - * @param salt A short string to use to randomize md5. May start with $apr1$, which - * will be ignored. It is explicitly permitted to pass a pre-existing - * MD5Crypt'ed password entry as the salt. crypt() will strip the salt - * chars out properly. - * - * @return An Apache-compatible md5-hashed password string. - */ - - static public final String apacheCrypt(String password, String salt) { - return MD5Crypt.crypt(password, salt, "$apr1$"); - } - - /** - * <p>This method actually generates md5-encoded password hash from - * a plaintext password, a salt, and a magic string.</p> - * - * <p>There are two magic strings that make sense to use here.. '$1$' is the - * magic string used by the FreeBSD/Linux/OpenBSD MD5Crypt algorithm, and - * '$apr1$' is the magic string used by the Apache MD5Crypt algorithm.</p> - * - * <p>The resulting string will be in the form '<magic><salt>$<hashed mess></p> - * - * @param password Plaintext password @param salt A short string to - * use to randomize md5. May start with the magic string, which - * will be ignored. It is explicitly permitted to pass a - * pre-existing MD5Crypt'ed password entry as the salt. crypt() - * will strip the salt chars out properly. - * - * @return An md5-hashed password string. - */ - - static public final String crypt(String password, String salt, - String magic) { - /* This string is magic for this algorithm. Having it this way, - * we can get get better later on */ - - byte finalState[]; - MD5 ctx, ctx1; - long l; - - /* -- */ - - /* Refine the Salt first */ - - /* If it starts with the magic string, then skip that */ - - if (salt.startsWith(magic)) { - salt = salt.substring(magic.length()); - } - - /* It stops at the first '$', max 8 chars */ - - if (salt.indexOf('$') != -1) { - salt = salt.substring(0, salt.indexOf('$')); - } - - if (salt.length() > 8) { - salt = salt.substring(0, 8); - } - - ctx = new MD5(); - - ctx.Update(password); // The password first, since that is what is most unknown - ctx.Update(magic); // Then our magic string - ctx.Update(salt); // Then the raw salt - - /* Then just as many characters of the MD5(pw,salt,pw) */ - - ctx1 = new MD5(); - ctx1.Update(password); - ctx1.Update(salt); - ctx1.Update(password); - finalState = ctx1.Final(); - - for (int pl = password.length(); pl > 0; pl -= 16) { - ctx.Update(finalState, pl > 16 ? 16 : pl); - } - - /* the original code claimed that finalState was being cleared - to keep dangerous bits out of memory, but doing this is also - required in order to get the right output. */ - - clearbits(finalState); - - /* Then something really weird... */ - - for (int i = password.length(); i != 0; i >>>= 1) { - if ((i & 1) != 0) { - ctx.Update(finalState, 1); - } else { - ctx.Update(password.getBytes(), 1); - } - } - - finalState = ctx.Final(); - - /* - * and now, just to make sure things don't run too fast - * On a 60 Mhz Pentium this takes 34 msec, so you would - * need 30 seconds to build a 1000 entry dictionary... - * - * (The above timings from the C version) - */ - - for (int i = 0; i < 1000; i++) { - ctx1 = new MD5(); - - if ((i & 1) != 0) { - ctx1.Update(password); - } else { - ctx1.Update(finalState, 16); - } - - if ((i % 3) != 0) { - ctx1.Update(salt); - } - - if ((i % 7) != 0) { - ctx1.Update(password); - } - - if ((i & 1) != 0) { - ctx1.Update(finalState, 16); - } else { - ctx1.Update(password); - } - - finalState = ctx1.Final(); - } - - /* Now make the output string */ - - StringBuffer result = new StringBuffer(); - - result.append(magic); - result.append(salt); - result.append("$"); - - l = (bytes2u(finalState[0]) << 16) - | (bytes2u(finalState[6]) << 8) - | bytes2u(finalState[12]); - result.append(to64(l, 4)); - - l = (bytes2u(finalState[1]) << 16) - | (bytes2u(finalState[7]) << 8) - | bytes2u(finalState[13]); - result.append(to64(l, 4)); - - l = (bytes2u(finalState[2]) << 16) - | (bytes2u(finalState[8]) << 8) - | bytes2u(finalState[14]); - result.append(to64(l, 4)); - - l = (bytes2u(finalState[3]) << 16) - | (bytes2u(finalState[9]) << 8) - | bytes2u(finalState[15]); - result.append(to64(l, 4)); - - l = (bytes2u(finalState[4]) << 16) - | (bytes2u(finalState[10]) << 8) - | bytes2u(finalState[5]); - result.append(to64(l, 4)); - - l = bytes2u(finalState[11]); - result.append(to64(l, 2)); - - /* Don't leave anything around in vm they could use. */ - clearbits(finalState); - - return result.toString(); - } -} - diff --git a/src/com.gluster.storage.management.core/src/com/gluster/storage/management/core/utils/ProcessUtil.java b/src/com.gluster.storage.management.core/src/com/gluster/storage/management/core/utils/ProcessUtil.java deleted file mode 100644 index 87c74cf0..00000000 --- a/src/com.gluster.storage.management.core/src/com/gluster/storage/management/core/utils/ProcessUtil.java +++ /dev/null @@ -1,108 +0,0 @@ -/******************************************************************************* - * Copyright (c) 2011 Gluster, Inc. <http://www.gluster.com> - * This file is part of Gluster Management Console. - * - * Gluster Management Console is free software; you can redistribute it and/or - * modify it under the terms of the GNU Affero General Public License as published - * by the Free Software Foundation; either version 3 of the License, or - * (at your option) any later version. - * - * Gluster Management Console is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY - * or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Affero General Public License - * for more details. - * - * You should have received a copy of the GNU Affero General Public License - * along with this program. If not, see - * <http://www.gnu.org/licenses/>. - *******************************************************************************/ -package com.gluster.storage.management.core.utils; - -import static com.gluster.storage.management.core.constants.CoreConstants.NEWLINE; - -import java.io.BufferedReader; -import java.io.InputStream; -import java.io.InputStreamReader; -import java.util.ArrayList; -import java.util.List; - -import com.gluster.storage.management.core.exceptions.GlusterRuntimeException; - -/** - * Utility class for creating processes (foreground/background) with given - * command and checking the output/exit status - */ -public class ProcessUtil { - - public static ProcessResult executeCommand(List<String> command) { - return executeCommand(true, command); - } - - /** - * Waits till all the threads in given list are dead - * @param threads Threads to watch - * @throws InterruptedException - */ - public static void waitForThreads(List<Thread> threads) throws InterruptedException { - // Wait till all servers have been processed - for (int i = threads.size() - 1; i >= 0; i--) { - if (threads.get(i).isAlive()) { - // thread alive. sleep for half a second and check again. - Thread.sleep(500); - i++; // check the same thread in next iteration - } - } - } - - /** - * Executes given command in a separate process in FOREGROUND - * @param command - * @return {@link ProcessResult} object - */ - public static ProcessResult executeCommand(String... command) { - ArrayList<String> commandList = new ArrayList<String>(); - for (String part : command) { - commandList.add(part); - } - return executeCommand(commandList); - } - - /** - * Executes given command in foreground/background - * @param runInForeground Boolean flag indicating whether the command should - * be executed in foreground - * @param command - * @return {@link ProcessResult} object - */ - public static ProcessResult executeCommand(boolean runInForeground, List<String> command) { - StringBuilder output = new StringBuilder(); - try { - Process process = new ProcessBuilder(command).redirectErrorStream(true).start(); - if (runInForeground) { - process.waitFor(); // Wait for process to finish - - InputStream is = process.getInputStream(); - InputStreamReader isr = new InputStreamReader(is); - BufferedReader br = new BufferedReader(isr); - String line; - - while ((line = br.readLine()) != null) { - output.append(line); - output.append(NEWLINE); - } - br.close(); - isr.close(); - is.close(); - } else { - output.append("Command ["); - output.append(command); - output.append("] triggerred in background."); - } - - return new ProcessResult(process.exitValue(), output.toString()); - } catch (Throwable e) { - throw new GlusterRuntimeException("Exception while executing command [" + command + "] : [" - + e.getMessage() + "]", e); - } - } -} diff --git a/src/com.gluster.storage.management.gateway.scripts/src/backend/Disk.py b/src/com.gluster.storage.management.gateway.scripts/src/backend/Disk.py deleted file mode 100755 index 2c47d396..00000000 --- a/src/com.gluster.storage.management.gateway.scripts/src/backend/Disk.py +++ /dev/null @@ -1,140 +0,0 @@ -# Copyright (c) 2009 Gluster, Inc. <http://www.gluster.com> -# This file is part of GlusterSP. -# -# GlusterSP is free software; you can redistribute it and/or modify -# it under the terms of the GNU General Public License as published -# by the Free Software Foundation; either version 3 of the License, -# or (at your option) any later version. -# -# GlusterSP is distributed in the hope that it will be useful, but -# WITHOUT ANY WARRANTY; without even the implied warranty of -# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU -# General Public License for more details. -# -# You should have received a copy of the GNU General Public License -# along with this program. If not, see -# <http://www.gnu.org/licenses/>. - -import os -import dbus - -class Disk: - def __init__(self): - """init""" - - self.volumes = [] - self.disks = [] - self.bus = dbus.SystemBus() - self.hal_obj = self.bus.get_object("org.freedesktop.Hal", - "/org/freedesktop/Hal/Manager") - self.hal = dbus.Interface(self.hal_obj, "org.freedesktop.Hal.Manager") - self.devices = [] - self.devices = self.hal.FindDeviceByCapability("storage") - - self.detect_disks() - self.detect_mountable_volumes() - - def getDiskList(self): - - return self.disks - - def getMountableDiskList(self): - - return self.volumes - - def detect_disks(self): - for device in self.devices: - dev = self._get_device(device) - if dev.GetProperty("storage.drive_type") != "cdrom": - if not dev.GetProperty("block.is_volume"): - self._add_disks(dev) - continue - - def _add_disks(self, dev): - disk = str(dev.GetProperty('block.device')) - disk_size = str(int(dev.GetProperty('storage.size')) / 1024**2) - - try: - if dev.GetProperty('storage.removable'): - disk_size = str(int(dev.GetProperty('storage.removable.media_size')) / 1024**2) - except: - return - - self.disks.append({ - 'device': disk, - 'description': str(dev.GetProperty('storage.model')) + " " + str(dev.GetProperty('storage.vendor')), - 'interface': str(dev.GetProperty('storage.bus')), - 'size': disk_size, - 'drive_type': str(dev.GetProperty('storage.drive_type')) - }) - - def detect_mountable_volumes(self): - """ Detect all mountable volumes using HAL via D-Bus """ - for device in self.devices: - dev = self._get_device(device) - if dev.GetProperty("storage.drive_type") != "cdrom": - if dev.GetProperty("block.is_volume"): - self._add_volume(dev) - continue - else: # iterate over children looking for a volume - children = self.hal.FindDeviceStringMatch("info.parent", - device) - if not children and "disk" == dev.GetProperty("storage.drive_type"): - self._add_volume(dev) - for child in children: - child = self._get_device(child) - if child.GetProperty("block.is_volume"): - self._add_volume(child, parent=dev) - #break # don't break, allow all partitions - - def _add_volume(self, dev, parent=None): - volume = str(dev.GetProperty('block.device')) - if not parent: - self.volumes.append ({ - 'device' : volume, - 'label' : str(dev.GetProperty('block.device')), - 'fstype' : None, - 'fsversion': None, - 'uuid' : None, - 'interface': str(dev.GetProperty('storage.bus')), - 'parent' : None, - 'description': str(dev.GetProperty('storage.model')) + " " + str(dev.GetProperty('storage.vendor')), - 'size' : None, - 'totalsize' : str(int(dev.GetProperty('storage.size')) / 1024**2), - 'drive_type': str(dev.GetProperty('storage.drive_type')), - 'mount_point': "NA" - }) - return - - self.volumes.append ({ - 'device' : volume, - 'label' : str(dev.GetProperty('volume.label')), - 'fstype' : str(dev.GetProperty('volume.fstype')), - 'fsversion': str(dev.GetProperty('volume.fsversion')), - 'uuid' : str(dev.GetProperty('volume.uuid')), - 'interface': str(parent.GetProperty('storage.bus')), - 'parent' : str(parent.GetProperty('block.device')), - 'description': str(parent.GetProperty('storage.model')) + " " + str(parent.GetProperty('storage.vendor')), - 'size' : str(int(dev.GetProperty('volume.size')) / 1024**2), - 'totalsize' : str(int(parent.GetProperty('storage.size')) / 1024**2), - 'drive_type': str(parent.GetProperty('storage.drive_type')), - 'mount_point': str(dev.GetProperty('volume.mount_point')) - }) - return - - def _get_device(self, udi): - """ Return a dbus Interface to a specific HAL device UDI """ - dev_obj = self.bus.get_object("org.freedesktop.Hal", udi) - return dbus.Interface(dev_obj, "org.freedesktop.Hal.Device") - - def get_free_bytes(self, device=None): - """ Return the number of available bytes on our device """ - import statvfs - stat = os.statvfs(device) - return stat[statvfs.F_BSIZE] * stat[statvfs.F_BAVAIL] - - def get_used_bytes(self, device=None): - """ Return the number of used bytes on our device """ - import statvfs - stat = os.statvfs(device) - return ((stat[statvfs.F_BSIZE] * stat[statvfs.F_BLOCKS]) - (stat[statvfs.F_BSIZE] * stat[statvfs.F_BAVAIL])) diff --git a/src/com.gluster.storage.management.gateway.scripts/src/backend/DiskUtils.py b/src/com.gluster.storage.management.gateway.scripts/src/backend/DiskUtils.py deleted file mode 100644 index deebb388..00000000 --- a/src/com.gluster.storage.management.gateway.scripts/src/backend/DiskUtils.py +++ /dev/null @@ -1,756 +0,0 @@ -#!/usr/bin/python -# Copyright (C) 2011 Gluster, Inc. <http://www.gluster.com> -# This file is part of Gluster Management Gateway. -# - -import os -import sys -p1 = os.path.abspath(os.path.dirname(sys.argv[0])) -p2 = "%s/common" % os.path.dirname(p1) -if not p1 in sys.path: - sys.path.append(p1) -if not p2 in sys.path: - sys.path.append(p2) -import glob -from copy import deepcopy -import dbus -import Globals -import time -import Utils -import Disk -import Protocol -import FsTabUtils - -ONE_MB_SIZE = 1048576 - - -def _stripDev(device): - if Utils.isString(device) and device.startswith("/dev/"): - return device[5:] - return device - - -def _addDev(deviceName): - if Utils.isString(deviceName) and not deviceName.startswith("/dev/"): - return "/dev/" + deviceName - return deviceName - - -def getDeviceName(device): - if type(device) == type([]): - nameList = [] - for d in device: - nameList.append(_stripDev(d)) - return nameList - return _stripDev(device) - - -def getDevice(deviceName): - if Utils.isString(deviceName): - return _addDev(deviceName) - if type(deviceName) == type([]): - nameList = [] - for d in deviceName: - nameList.append(_addDev(d)) - return nameList - return _addDev(deviceName) - - -def getDiskPartitionByUuid(uuid): - uuidFile = "/dev/disk/by-uuid/%s" % uuid - if os.path.exists(uuidFile): - return getDeviceName(os.path.realpath(uuidFile)) - return None - - -def getUuidByDiskPartition(device): - for uuidFile in glob.glob("/dev/disk/by-uuid/*"): - if os.path.realpath(uuidFile) == device: - return os.path.basename(uuidFile) - return None - - -def getDiskPartitionUuid(partition): - Utils.log("WARNING: getDiskPartitionUuid() is deprecated by getUuidByDiskPartition()") - return getUuidByDiskPartition(partition) - - -def getDiskPartitionByLabel(label): - ## TODO: Finding needs to be enhanced - labelFile = "/dev/disk/by-label/%s" % label - if os.path.exists(labelFile): - if os.path.islink(labelFile): - return getDeviceName(os.path.realpath(labelFile)) - return None - - -def getDeviceByLabel(label): - Utils.log("WARNING: getDeviceByLabel() is deprecated by getDiskPartitionByLabel()") - return getDiskPartitionByLabel(label) - - -def getDiskPartitionLabel(device): - rv = Utils.runCommandFG(["sudo", "e2label", device], stdout=True) - if rv["Status"] == 0: - return rv["Stdout"].strip() - return False - - -def readFile(fileName): - lines = None - try: - fp = open(fileName) - lines = fp.readlines() - fp.close() - except IOError, e: - Utils.log("failed to read file %s: %s" % (file, str(e))) - return lines - - -def getRootPartition(fsTabFile=Globals.FSTAB_FILE): - fsTabEntryList = FsTabUtils.readFsTab(fsTabFile) - for fsTabEntry in fsTabEntryList: - if fsTabEntry["MountPoint"] == "/": - if fsTabEntry["Device"].startswith("UUID="): - return getDiskPartitionByUuid(fsTabEntry["Device"].split("UUID=")[-1]) - if fsTabEntry["Device"].startswith("LABEL="): - partitionName = getDiskPartitionByLabel(fsTabEntry["Device"].split("LABEL=")[-1]) - if partitionName: - return partitionName - return getDeviceName(fsTabEntry["Device"]) - return None - -def getMounts(): - mounts = {} - for line in readFile("/proc/mounts"): - str = line.strip() - if str.startswith("/dev/"): - tokens = str.split() - device = {} - mountPoint = tokens[1].strip() - device["MountPoint"] = mountPoint - device["FsType"] = tokens[2].strip() - device["Uuid"] = getDiskPartitionUuid(tokens[0].strip()) - device["Status"] = "INITIALIZED" - if mountPoint: - if mountPoint in ["/", "/boot"]: - device["Type"] = "BOOT" - else: - device["Type"] = "DATA" - mounts[tokens[0].strip()] = device - return mounts - -def getRaidDisk(): - array = [] - arrayList = [] - mdFound = False - - try: - fp = open("/proc/mdstat") - for line in fp: - str = line.strip() - if str.startswith("md"): - array.append(str) - mdFound = True - continue - if mdFound: - if str: - array.append(str) - else: - arrayList.append(array) - array = [] - mdFound = False - fp.close() - except IOError, e: - return None - - raidList = {} - for array in arrayList: - raid = {} - tokens = array[0].split() - raid['Interface'] = tokens[3] - device = getDevice(tokens[0]) - raid['MountPoint'] = getDeviceMountPoint(device) - if raid['MountPoint']: - raid['Type'] = "DATA" - raid['SpaceInUse'] = getDeviceUsedSpace(device) - else: - raid['SpaceInUse'] = None - rv = Utils.runCommand("blkid -c /dev/null %s" % (device), output=True, root=True) - raid['Uuid'] = None - raid['FsType'] = None - raid['Status'] = "UNINITIALIZED" - if isDiskInFormatting(device): - raid['Status'] = "INITIALIZING" - if not rv["Stderr"]: - words = rv["Stdout"].strip().split() - if words: - raid['Status'] = "INITIALIZED" - if len(words) > 2: - raid['Uuid'] = words[1].split("UUID=")[-1].split('"')[1] - raid['FsType'] = words[2].split("TYPE=")[-1].split('"')[1] - raid['Disks'] = [x.split('[')[0] for x in tokens[4:]] - raid['Size'] = float(array[1].split()[0]) / 1024.0 - raidList[tokens[0]] = raid - return raidList - - -def getOsDisk(): - Utils.log("WARNING: getOsDisk() is deprecated by getRootPartition()") - return getRootPartition() - - -def getDiskInfo(diskDeviceList=None): - diskDeviceList = getDevice(diskDeviceList) - if Utils.isString(diskDeviceList): - diskDeviceList = [diskDeviceList] - - mounts = getMounts() - if Utils.runCommand("/usr/bin/lshal") != 0: - Utils.log("failed running /usr/bin/lshal") - - dbusSystemBus = dbus.SystemBus() - halObj = dbusSystemBus.get_object("org.freedesktop.Hal", - "/org/freedesktop/Hal/Manager") - halManager = dbus.Interface(halObj, "org.freedesktop.Hal.Manager") - storageUdiList = halManager.FindDeviceByCapability("storage") - - diskInfo = {} - diskList = [] - for udi in storageUdiList: - halDeviceObj = dbusSystemBus.get_object("org.freedesktop.Hal", udi) - halDevice = dbus.Interface(halDeviceObj, - "org.freedesktop.Hal.Device") - if halDevice.GetProperty("storage.drive_type") in ["cdrom", "floppy"] or \ - halDevice.GetProperty("block.is_volume"): - continue - disk = {} - disk["Device"] = str(halDevice.GetProperty('block.device')) - if diskDeviceList and disk["Device"] not in diskDeviceList: - continue - disk["Description"] = str(halDevice.GetProperty('storage.vendor')) + " " + str(halDevice.GetProperty('storage.model')) - if halDevice.GetProperty('storage.removable'): - disk["Size"] = long(halDevice.GetProperty('storage.removable.media_size')) - else: - disk["Size"] = long(halDevice.GetProperty('storage.size')) / 1024**2 - disk["Interface"] = str(halDevice.GetProperty('storage.bus')) - disk["DriveType"] = str(halDevice.GetProperty('storage.drive_type')) - disk["Status"] = None - disk["Uuid"] = None - disk["Init"] = False - disk["Type"] = None - disk["FsType"] = None - disk["FsVersion"] = None - disk["MountPoint"] = None - disk["ReadOnlyAccess"] = None - - partitionUdiList = halManager.FindDeviceStringMatch("info.parent", udi) - if isDiskInFormatting(disk["Device"]): - disk["Status"] = "INITIALIZING" - else: - if partitionUdiList: - disk["Status"] = "INITIALIZED" - else: - disk["Status"] = "UNINITIALIZED" - disk["Type"] = "UNKNOWN" - - if mounts and mounts.has_key(disk["Device"]): - disk["Uuid"] = mounts[disk["Device"]]["Uuid"] - disk["Type"] = mounts[disk["Device"]]["Type"] - disk["Status"] = mounts[disk["Device"]]["Status"] - disk["FsType"] = mounts[disk["Device"]]["FsType"] - disk["MountPoint"] = mounts[disk["Device"]]["MountPoint"] - - if disk["MountPoint"]: - disk["SpaceInUse"] = getDeviceUsedSpace(disk["Device"]) - else: - disk["SpaceInUse"] = None - - partitionList = [] - diskSpaceInUse = 0 - for partitionUdi in partitionUdiList: - used = 0 - partitionHalDeviceObj = dbusSystemBus.get_object("org.freedesktop.Hal", - partitionUdi) - partitionHalDevice = dbus.Interface(partitionHalDeviceObj, - "org.freedesktop.Hal.Device") - if not partitionHalDevice.GetProperty("block.is_volume"): - continue - partitionDevice = str(partitionHalDevice.GetProperty('block.device')) - if partitionHalDevice.GetProperty("volume.is_mounted"): - rv = Utils.runCommandFG(["df", str(partitionHalDevice.GetProperty('volume.mount_point'))], stdout=True) - if rv["Status"] == 0: - try: - used = long(rv["Stdout"].split("\n")[1].split()[2]) / 1024 - diskSpaceInUse += used - except IndexError: - pass - except ValueError: - pass - - if disk["Device"] == partitionDevice: - disk["Uuid"] = str(partitionHalDevice.GetProperty('volume.uuid')) - disk["Init"] = True # TODO: use isDataDiskPartitionFormatted function to cross verify this - disk["Status"] = "INITIALIZED" - mountPoint = str(partitionHalDevice.GetProperty('volume.mount_point')) - if mountPoint: - if mountPoint in ["/", "/boot"]: - disk["Type"] = "BOOT" - else: - disk["Type"] = "DATA" - disk["FsType"] = str(partitionHalDevice.GetProperty('volume.fstype')) - if disk["FsType"] and "UNINITIALIZED" == disk["Status"]: - disk["Status"] = "INITIALIZED" - disk["FsVersion"] = str(partitionHalDevice.GetProperty('volume.fsversion')) - disk["MountPoint"] = str(partitionHalDevice.GetProperty('volume.mount_point')) - disk["ReadOnlyAccess"] = str(partitionHalDevice.GetProperty('volume.is_mounted_read_only')) - if not disk["Size"]: - disk["Size"] = long(partitionHalDevice.GetProperty('volume.size')) / 1024**2 - #disk["SpaceInUse"] = used - continue - - partition = {} - partition["Init"] = False - partition["Type"] = "UNKNOWN" - partition["Device"] = partitionDevice - partition["Uuid"] = str(partitionHalDevice.GetProperty('volume.uuid')) - partition["Size"] = long(partitionHalDevice.GetProperty('volume.size')) / 1024**2 - partition["FsType"] = str(partitionHalDevice.GetProperty('volume.fstype')) - partition["FsVersion"] = str(partitionHalDevice.GetProperty('volume.fsversion')) - partition["Label"] = str(partitionHalDevice.GetProperty('volume.label')) - partition["MountPoint"] = str(partitionHalDevice.GetProperty('volume.mount_point')) - partition["Size"] = long(partitionHalDevice.GetProperty('volume.size')) / 1024**2 - - if isDiskInFormatting(partitionDevice): - partition["Status"] = "INITIALIZING" - else: - if partition["FsType"]: - partition["Status"] = "INITIALIZED" - else: - partition["Status"] = "UNINITIALIZED" - - partition["SpaceInUse"] = used - if partition["MountPoint"] or isDataDiskPartitionFormatted(partitionDevice): - partition["Init"] = True - partition["Status"] = "INITIALIZED" - if partition["MountPoint"]: - if partition["MountPoint"] in ["/", "/boot"]: - partition["Type"] = "BOOT" - else: - partition["Type"] = "DATA" - else: - if "SWAP" == partition["FsType"].strip().upper(): - partition["Type"] = "SWAP" - partition["ReadOnlyAccess"] = str(partitionHalDevice.GetProperty('volume.is_mounted_read_only')) - partitionList.append(partition) - disk["Partitions"] = partitionList - if not disk["SpaceInUse"]: - disk["SpaceInUse"] = diskSpaceInUse - diskList.append(disk) - diskInfo["disks"] = diskList - if diskList: - return diskInfo - for line in readFile("/proc/partitions")[2:]: - disk = {} - tokens = line.split() - if tokens[3].startswith("md"): - continue - disk["Device"] = tokens[3] - ## if diskDeviceList and disk["Device"] not in diskDeviceList: - ## continue - disk["Description"] = None - disk["Size"] = long(tokens[2]) / 1024 - disk["Status"] = None - disk["Interface"] = None - disk["DriveType"] = None - disk["Uuid"] = None - disk["Init"] = False - disk["Type"] = None - disk["FsType"] = None - disk["FsVersion"] = None - disk["MountPoint"] = None - disk["ReadOnlyAccess"] = None - disk["SpaceInUse"] = None - disk["Partitions"] = [] - diskList.append(disk) - diskInfo["disks"] = diskList - return diskInfo - -def getDiskList(diskDeviceList=None): - return diskInfo["disks"] - - -def checkDiskMountPoint(diskMountPoint): - try: - fstabEntries = open(Globals.FSTAB_FILE).readlines() - except IOError: - fstabEntries = [] - found = False - for entry in fstabEntries: - entry = entry.strip() - if not entry: - continue - entries = entry.split() - if entries and len(entries) > 1 and entries[0].startswith("UUID=") and entries[1].upper() == diskMountPoint.upper(): - return True - return False - - -def getMountPointByUuid(partitionUuid): - # check uuid in etc/fstab - try: - fstabEntries = open(Globals.FSTAB_FILE).readlines() - except IOError: - fstabEntries = [] - found = False - for entry in fstabEntries: - entry = entry.strip() - if not entry: - continue - if entry.split()[0] == "UUID=" + partitionUuid: - return entry.split()[1] - return None - -def getDeviceUsedSpace(device): - rv = Utils.runCommand("df -kl %s" % (device), output=True, root=True) - if rv["Status"] == 0: - try: - return long(rv["Stdout"].split("\n")[1].split()[2]) / 1024 - except IndexError: - pass - except ValueError: - pass - -def getDiskSizeInfo(partition): - # get values from df output - total = None - used = None - free = None - command = "df -kl -t ext3 -t ext4 -t xfs" - rv = Utils.runCommandFG(command, stdout=True, root=True) - message = Utils.stripEmptyLines(rv["Stdout"]) - if rv["Stderr"]: - Utils.log("failed to get disk details. %s" % Utils.stripEmptyLines(rv["Stdout"])) - return None, None, None - for line in rv["Stdout"].split("\n"): - tokens = line.split() - if len(tokens) < 4: - continue - if tokens[0] == partition: - total = int(tokens[1]) / 1024.0 - used = int(tokens[2]) / 1024.0 - free = int(tokens[3]) / 1024.0 - break - - if total: - return total, used, free - - # get total size from parted output - for i in range(len(partition), 0, -1): - pos = i - 1 - if not partition[pos].isdigit(): - break - disk = partition[:pos+1] - partitionNumber = partition[pos+1:] - if not partitionNumber.isdigit(): - return None, None, None - - number = int(partitionNumber) - command = "parted -ms %s unit kb print" % disk - rv = Utils.runCommandFG(command, stdout=True, root=True) - message = Utils.stripEmptyLines(rv["Stdout"]) - if rv["Stderr"]: - Utils.log("failed to get disk details. %s" % Utils.stripEmptyLines(rv["Stdout"])) - return None, None, None - - lines = rv["Stdout"].split(";\n") - if len(lines) < 3: - return None,None,None - - for line in lines[2:]: - tokens = line.split(':') - if len(tokens) < 4: - continue - if tokens[0] == str(number): - total = int(tokens[3].split('kB')[0]) / 1024.0 - break - return total, used, free - - -def isDataDiskPartitionFormatted(device): - #Todo: Proper label needs to be added for data partition - #if getDiskPartitionLabel(device) != Globals.DATA_PARTITION_LABEL: - # return False - device = getDeviceName(device) - diskObj = Disk.Disk() - for disk in diskObj.getMountableDiskList(): - if disk['device'].upper() == device.upper(): - mountPoint = disk['mount_point'] - if not mountPoint: - return False - if not os.path.exists(mountPoint): - return False - - uuid = getUuidByDiskPartition(device) - if not uuid: - return False - - for fsTabEntry in FsTabUtils.readFsTab(): - if fsTabEntry["Device"] == ("UUID=%s" % uuid) and fsTabEntry["MountPoint"] == mountPoint: - return True - return False - - -def getDiskDom(diskDeviceList=None, bootPartition=None, skipDisk=None): - diskDeviceList = getDevice(diskDeviceList) - if Utils.isString(diskDeviceList): - diskDeviceList = [diskDeviceList] - - if skipDisk: - skipDisk = getDevice(skipDisk) - if Utils.isString(skipDisk): - skipDisk = [skipDisk] - - diskInfo = getDiskInfo(diskDeviceList) - diskList = diskInfo["disks"] - if not diskList: - return None - - raidPartitions = {} - raidDisk = getRaidDisk() - - for k, v in raidDisk.iteritems(): - for i in v['Disks']: - raidPartitions[i] = k - - #for partition in raidDisk.values(): - # raidDiskPartitions += partition['disks'] - - diskDom = Protocol.XDOM() - disksTag = diskDom.createTag("disks", None) - raidDisks = {} - if not bootPartition: - bootPartition = getRootPartition() - for disk in diskList: - if skipDisk and disk["Device"] in skipDisk: - continue - diskTag = diskDom.createTag("disk", None) - diskDevice = getDeviceName(disk["Device"]) - diskTag.appendChild(diskDom.createTag("name", diskDevice)) - diskTag.appendChild(diskDom.createTag("description", disk["Description"])) - diskTag.appendChild(diskDom.createTag("uuid", disk["Uuid"])) - diskTag.appendChild(diskDom.createTag("status", disk["Status"])) - diskTag.appendChild(diskDom.createTag("interface", disk["Interface"])) - - #if not disk["Partitions"]: - diskTag.appendChild(diskDom.createTag("type", disk["Type"])) - #diskTag.appendChild(diskDom.createTag("init", str(disk["Init"]).lower())) - diskTag.appendChild(diskDom.createTag("fsType", disk["FsType"])) - diskTag.appendChild(diskDom.createTag("fsVersion", disk["FsVersion"])) - diskTag.appendChild(diskDom.createTag("mountPoint", disk["MountPoint"])) - - diskTag.appendChild(diskDom.createTag("size", disk["Size"])) - diskTag.appendChild(diskDom.createTag("spaceInUse", disk["SpaceInUse"])) - partitionsTag = diskDom.createTag("partitions", None) - if raidPartitions.has_key(diskDevice): - rdList = {} - rdList[diskDevice] = [deepcopy(diskTag)] - if not raidDisks.has_key(raidPartitions[diskDevice]): - raidDisks[raidPartitions[diskDevice]] = [] - raidDisks[raidPartitions[diskDevice]] += [rdList] - continue - for partition in disk["Partitions"]: - partitionTag = diskDom.createTag("partition", None) - device = getDeviceName(partition["Device"]) - partitionTag.appendChild(diskDom.createTag("name", device)) - if partition["Uuid"]: #TODO: Move this verification and findings to getDiskInfo function - partitionTag.appendChild(diskDom.createTag("uuid", partition["Uuid"])) - else: - partitionTag.appendChild(diskDom.createTag("uuid", getUuidByDiskPartition("/dev/" + device))) - partitionTag.appendChild(diskDom.createTag("status", partition["Status"])) - #partitionTag.appendChild(diskDom.createTag("init", str(partition["Init"]).lower())) - partitionTag.appendChild(diskDom.createTag("type", str(partition["Type"]))) - partitionTag.appendChild(diskDom.createTag("fsType", partition["FsType"])) - partitionTag.appendChild(diskDom.createTag("mountPoint", partition['MountPoint'])) - partitionTag.appendChild(diskDom.createTag("size", partition["Size"])) - partitionTag.appendChild(diskDom.createTag("spaceInUse", partition["SpaceInUse"])) - if raidPartitions.has_key(device): - tempPartitionTag = diskDom.createTag("partitions", None) - if raidDisks.has_key(raidPartitions[device]): - rdList = raidDisks[raidPartitions[device]] - for rdItem in rdList: - if not rdItem.has_key(diskDevice): - rdItem[diskDevice] = [deepcopy(diskTag), tempPartitionTag] - rdItem[diskDevice][0].appendChild(tempPartitionTag) - rdItem[diskDevice][-1].appendChild(partitionTag) - continue - rdList = {} - rdList[diskDevice] = [deepcopy(diskTag), tempPartitionTag] - tempPartitionTag.appendChild(partitionTag) - rdList[diskDevice][0].appendChild(tempPartitionTag) - raidDisks[raidPartitions[device]] = [rdList] - continue - partitionsTag.appendChild(partitionTag) - diskTag.appendChild(partitionsTag) - disksTag.appendChild(diskTag) - - for rdisk in raidDisk.keys(): - raidDiskTag = diskDom.createTag("disk", None) - raidDiskTag.appendChild(diskDom.createTag("name", rdisk)) - raidDiskTag.appendChild(diskDom.createTag("description")) - raidDiskTag.appendChild(diskDom.createTag("uuid", raidDisk[rdisk]['Uuid'])) - raidDiskTag.appendChild(diskDom.createTag("type", raidDisk[rdisk]['Type'])) - raidDiskTag.appendChild(diskDom.createTag("mountPoint", raidDisk[rdisk]['MountPoint'])) - raidDiskTag.appendChild(diskDom.createTag("status", raidDisk[rdisk]['Status'])) - raidDiskTag.appendChild(diskDom.createTag("interface", raidDisk[rdisk]['Interface'])) - raidDiskTag.appendChild(diskDom.createTag("fsType", raidDisk[rdisk]['FsType'])) - raidDiskTag.appendChild(diskDom.createTag("fsVersion")) - raidDiskTag.appendChild(diskDom.createTag("size", raidDisk[rdisk]['Size'])) - raidDiskTag.appendChild(diskDom.createTag("spaceInUse", raidDisk[rdisk]['SpaceInUse'])) - raidDisksTag = diskDom.createTag("raidDisks", None) - if raidDisks.has_key(rdisk): - for item in raidDisks[rdisk]: - for diskTag in item.values(): - raidDisksTag.appendChild(diskTag[0]) - raidDiskTag.appendChild(raidDisksTag) - disksTag.appendChild(raidDiskTag) - diskDom.addTag(disksTag) - return diskDom - - -def initializeDisk(disk, boot=False, startSize=0, sudo=False): - if boot and startSize > 0: - return False - - disk = getDevice(disk) - diskObj = getDiskList(disk)[0] - - if boot or startSize == 0: - command = "dd if=/dev/zero of=%s bs=1024K count=1" % diskObj["Device"] - if runCommandFG(command, root=sudo) != 0: - if boot: - Utils.log("failed to clear boot sector of disk %s" % diskObj["Device"]) - return False - Utils.log("failed to clear boot sector of disk %s. ignoring" % diskObj["Device"]) - - command = "parted -s %s mklabel gpt" % diskObj["Device"] - if runCommandFG(command, root=sudo) != 0: - return False - - if boot: - command = "parted -s %s mkpart primary ext3 0MB %sMB" % (diskObj["Device"], Globals.OS_PARTITION_SIZE) - if runCommandFG(command, root=sudo) != 0: - return False - command = "parted -s %s set 1 boot on" % (diskObj["Device"]) - if runCommandFG(command, root=sudo) != 0: - return False - startSize = Globals.OS_PARTITION_SIZE - - size = (diskObj["Size"] / ONE_MB_SIZE) - startSize - while size > Globals.MAX_PARTITION_SIZE: - endSize = startSize + Globals.MAX_PARTITION_SIZE - command = "parted -s %s mkpart primary ext3 %sMB %sMB" % (diskObj["Device"], startSize, endSize) - if runCommandFG(command, root=sudo) != 0: - return False - size -= Globals.MAX_PARTITION_SIZE - startSize = endSize - - if size: - command = "parted -s %s mkpart primary ext3 %sMB 100%%" % (diskObj["Device"], startSize) - if runCommandFG(command, root=sudo) != 0: - return False - - if runCommandFG("udevadm settle", root=sudo) != 0: - if runCommandFG("udevadm settle", root=sudo) != 0: - Utils.log("udevadm settle for disk %s failed. ignoring" % diskObj["Device"]) - time.sleep(1) - - if runCommandFG("partprobe %s" % diskObj["Device"], root=sudo) != 0: - Utils.log("partprobe %s failed" % diskObj["Device"]) - return False - - if runCommandFG("gptsync %s" % diskObj["Device"], root=sudo) != 0: - Utils.log("gptsync %s failed. ignoring" % diskObj["Device"]) - - # wait forcefully to appear devices in /dev - time.sleep(2) - return True - - -def initializeOsDisk(diskObj): - Utils.log("WARNING: initializeOsDisk() is deprecated by initializeDisk(boot=True)") - return initializeDisk(diskObj, boot=True) - - -def initializeDataDisk(diskObj): - Utils.log("WARNING: initializeDataDisk() is deprecated by initializeDisk()") - return initializeDisk(diskObj) - -def getBootPartition(serverName): - diskDom = XDOM() - diskDom.parseFile("%s/%s/disk.xml" % (Globals.SERVER_VOLUME_CONF_DIR, serverName)) - if not diskDom: - return None - partitionDom = XDOM() - partitionUuid = None - partitionName = None - for partitionTag in diskDom.getElementsByTagRoute("disk.partition"): - partitionDom.setDomObj(partitionTag) - boot = partitionDom.getTextByTagRoute("boot") - if boot and boot.strip().upper() == 'YES': - partitionUuid = partitionDom.getTextByTagRoute("uuid") - partitionName = partitionDom.getTextByTagRoute("device") - break - if not (partitionUuid and partitionName): - return None - - # check device label name - deviceBaseName = os.path.basename(partitionName) - process = runCommandBG(['sudo', 'e2label', partitionName]) - if type(process) == type(True): - return None - if process.wait() != 0: - return None - output = process.communicate() - deviceLabel = output[0].split()[0] - if deviceLabel != Globals.BOOT_PARTITION_LABEL: - return None - - # check uuid in etc/fstab - try: - fstabEntries = open(Globals.FSTAB_FILE).readlines() - except IOError: - fstabEntries = [] - found = False - for entry in fstabEntries: - entry = entry.strip() - if not entry: - continue - if entry.split()[0] == "UUID=" + partitionUuid: - found = True - break - if not found: - return None - return partitionName - - -def isDiskInFormatting(device): - DEVICE_FORMAT_LOCK_FILE = "/var/lock/%s.lock" % device - return os.path.exists(DEVICE_FORMAT_LOCK_FILE) - - -def isDiskInFormat(device): - Utils.log("WARNING: isDiskInFormat() is deprecated by isDataDiskPartitionFormatted()") - return isDataDiskPartitionFormatted(device) - - -def getDeviceMountPoint(device): - try: - fp = open("/proc/mounts") - for token in [line.strip().split() for line in fp.readlines()]: - if token and len(token) > 2 and token[0] == device: - return token[1] - fp.close() - except IOError, e: - return None - diff --git a/src/com.gluster.storage.management.gateway.scripts/src/backend/GlusterdUtils.py b/src/com.gluster.storage.management.gateway.scripts/src/backend/GlusterdUtils.py deleted file mode 100644 index 7c0e899c..00000000 --- a/src/com.gluster.storage.management.gateway.scripts/src/backend/GlusterdUtils.py +++ /dev/null @@ -1,250 +0,0 @@ -# Copyright (c) 2010 Gluster, Inc. <http://www.gluster.com> -# This file is part of Gluster Storage Platform. -# -# Gluster Storage Platform is free software; you can redistribute it -# and/or modify it under the terms of the GNU General Public License -# as published by the Free Software Foundation; either version 3 of -# the License, or (at your option) any later version. -# -# Gluster Storage Platform is distributed in the hope that it will be -# useful, but WITHOUT ANY WARRANTY; without even the implied warranty -# of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -# GNU General Public License for more details. -# -# You should have received a copy of the GNU General Public License -# along with this program. If not, see -# <http://www.gnu.org/licenses/>. - -import os -import Utils - -import ServerUtils - - -def getGlusterVolumeInfo(volumeName=None): - volumeNameList = None - if Utils.isString(volumeName): - volumeNameList = [volumeName] - if type(volumeName) == type([]): - volumeNameList = volumeName - - status = Utils.runCommand("gluster volume info", output=True, root=True) - if status["Status"] != 0: - Utils.log("Failed to execute 'gluster volume info' command") - return None - - volumeInfoDict = {} - volumeInfo = {} - volumeName = None - brickList = [] - for line in status['Stdout'].split("\n"): - if not line: - if volumeName and volumeInfo: - volumeInfo["Bricks"] = brickList - volumeInfoDict[volumeName] = volumeInfo - volumeInfo = {} - volumeName = None - brickList = [] - continue - - tokens = line.split(":") - if tokens[0].strip().upper() == "BRICKS": - continue - elif tokens[0].strip().upper() == "VOLUME NAME": - volumeName = tokens[1].strip() - volumeInfo["VolumeName"] = volumeName - elif tokens[0].strip().upper() == "TYPE": - volumeInfo["VolumeType"] = tokens[1].strip() - elif tokens[0].strip().upper() == "STATUS": - volumeInfo["VolumeStatus"] = tokens[1].strip() - elif tokens[0].strip().upper() == "TRANSPORT-TYPE": - volumeInfo["TransportType"] = tokens[1].strip() - elif tokens[0].strip().upper().startswith("BRICK"): - brickList.append(":".join(tokens[1:]).strip()) - - if volumeName and volumeInfo: - volumeInfoDict[volumeName] = volumeInfo - - if not volumeNameList: - return volumeInfoDict - - # remove unwanted volume info - for volumeName in list(set(volumeInfoDict.keys()) - set(volumeNameList)): - del volumeInfoDict[volumeName] - - return volumeInfoDict - - -def isVolumeRunning(volumeName): - if not volumeName: - return False - volumeInfo = getGlusterVolumeInfo(volumeName) - if not volumeInfo: - return False - status = volumeInfo[volumeName]["VolumeStatus"] - if not status: - return False - if status.upper() == "STARTED": - return True - return False - - -def isVolumeExist(volumeName): - if not volumeName: - return False - if getGlusterVolumeInfo(volumeName): - return True - return False - - -def peerProbe(serverName): - command = "gluster peer probe %s" % serverName - status = Utils.runCommand(command, output=True, root=True) - if status["Status"] == 0: - return True - Utils.log("command [%s] failed with [%d:%s]" % (command, status["Status"], os.strerror(status["Status"]))) - return False - - -def setAuthAllow(volumeName, authList, includeServers=True): - if not (volumeName and authList): - return False - vacl = [] - if includeServers: - for serverName in ServerUtils.getAllServerList(): - vacl += ServerUtils.getServerIpList(serverName) - vacl += authList - - command = "gluster volume set %s auth.allow %s" % (volumeName, ",".join(list(set(vacl)))) - status = Utils.runCommand(command, output=True, root=True) - if status["Status"] == 0: - return True - Utils.log("command [%s] failed with [%d:%s]" % (command, status["Status"], os.strerror(status["Status"]))) - return False - - -def volumeCreate(volumeName, volumeType, transportTypeList, brickList): - command = "gluster volume create %s" % volumeName - - if volumeType.upper() == "MIRROR": - command += " replica 2" - elif volumeType.upper() == "STRIPE": - command += " stripe 4" - - if "RDMA" in transportTypeList: - command += " transport rdma" - - command += " " + " ".join(brickList) - - status = Utils.runCommand(command, output=True, root=True) - if status["Status"] == 0: - return True - Utils.log("command [%s] failed with [%d:%s]" % (command, status["Status"], os.strerror(status["Status"]))) - return False - - -def volumeDelete(volumeName): - command = "gluster --mode=script volume delete %s" % volumeName - status = Utils.runCommand(command, output=True, root=True) - if status["Status"] == 0: - return True - Utils.log("command [%s] failed with [%d:%s]" % (command, status["Status"], os.strerror(status["Status"]))) - return False - - -def volumeLogFileName(volumeName, brick, logDir): - command = "gluster volume log filename %s %s %s" % (volumeName, brick, logDir) - status = Utils.runCommand(command, output=True, root=True) - if status["Status"] == 0: - return True - Utils.log("command [%s] failed with [%d:%s]" % (command, status["Status"], os.strerror(status["Status"]))) - return False - - -def startVolumeMigration(volumeName, sourcePath, destinationPath): - command = "gluster volume replace-brick %s %s %s start" % (volumeName, sourcePath, destinationPath) - status = Utils.runCommand(command, output=True, root=True) - if status["Status"] == 0: - lines = status["Stdout"].split("\n") - if lines[0].split()[-1] == "successfully": - return True - Utils.log("command [%s] failed with [%d:%s]" % (command, status["Status"], os.strerror(status["Status"]))) - return False - - -def stopVolumeMigration(volumeName, sourcePath, destinationPath): - command = "gluster volume replace-brick %s %s %s abort" % (volumeName, sourcePath, destinationPath) - status = Utils.runCommand(command, output=True, root=True) - if status["Status"] == 0: - lines = status["Stdout"].split("\n") - if lines[0].split()[-1] == "successful": - return True - Utils.log("command [%s] failed with [%d:%s]" % (command, status["Status"], os.strerror(status["Status"]))) - return False - - -def commitVolumeMigration(volumeName, sourcePath, destinationPath): - command = "gluster volume replace-brick %s %s %s commit" % (volumeName, sourcePath, destinationPath) - status = Utils.runCommand(command, output=True, root=True) - if status["Status"] == 0: - lines = status["Stdout"].split("\n") - if lines[0].split()[-1] == "successful": - return True - Utils.log("command [%s] failed with [%d:%s]" % (command, status["Status"], os.strerror(status["Status"]))) - return False - - -def getMigrationStatus(volumeName, sourcePath, destinationPath): - command = "gluster volume replace-brick %s %s %s status" % (volumeName, sourcePath, destinationPath) - status = Utils.runCommand(command, output=True, root=True) - if status['Status'] == 0 and status['Stdout']: - lines = status["Stdout"].split("\n") - if "Current file" in lines[0]: - return "started" - if "Migration complete" in lines[0]: - return "completed" - Utils.log("command [%s] returns unknown status:%s" % (command, lines[0])) - return "failed" - #if status['Status'] == 0 and status['Stdout']: - # for line in status['Stdout'].split('\n'): - # words = line.split() - # if words and words[0].upper() == "STATUS:": - # return " ".join(words[1:]).upper() - Utils.log("command [%s] failed with [%d:%s]" % (command, status["Status"], os.strerror(status["Status"]))) - return None - - -def volumeRebalanceStart(volumeName): - command = "gluster volume rebalance %s start" % volumeName - status = Utils.runCommand(command, output=True, root=True) - if status["Status"] == 0: - lines = status["Stdout"].split("\n") - if lines[0].split()[-1] == "successful": - return True - Utils.log("command [%s] failed with [%d:%s]" % (command, status["Status"], os.strerror(status["Status"]))) - return False - - -def volumeRebalanceStop(volumeName): - command = "gluster volume rebalance %s stop" % volumeName - status = Utils.runCommand(command, output=True, root=True) - if status["Status"] == 0: - lines = status["Stdout"].split("\n") - if lines[0].split()[0] == "stopped": - return True - Utils.log("command [%s] failed with [%d:%s]" % (command, status["Status"], os.strerror(status["Status"]))) - return False - - -def volumeRebalanceStatus(volumeName): - command = "gluster volume rebalance %s status" % volumeName - status = Utils.runCommand(command, output=True, root=True) - if status["Status"] == 0: - lines = status["Stdout"].split("\n") - if "rebalance not started" in lines[0]: - return "not started" - if "rebalance completed" in lines[0]: - return "completed" - return "running" - Utils.log("command [%s] failed with [%d:%s]" % (command, status["Status"], os.strerror(status["Status"]))) - return False diff --git a/src/com.gluster.storage.management.gateway.scripts/src/backend/NetworkUtils.py b/src/com.gluster.storage.management.gateway.scripts/src/backend/NetworkUtils.py deleted file mode 100755 index 9f5687e4..00000000 --- a/src/com.gluster.storage.management.gateway.scripts/src/backend/NetworkUtils.py +++ /dev/null @@ -1,490 +0,0 @@ -# Copyright (c) 2010 Gluster, Inc. <http://www.gluster.com> -# This file is part of Gluster Storage Platform. -# -# Gluster Storage Platform is free software; you can redistribute it -# and/or modify it under the terms of the GNU General Public License -# as published by the Free Software Foundation; either version 3 of -# the License, or (at your option) any later version. -# -# Gluster Storage Platform is distributed in the hope that it will be -# useful, but WITHOUT ANY WARRANTY; without even the implied warranty -# of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -# GNU General Public License for more details. -# -# You should have received a copy of the GNU General Public License -# along with this program. If not, see -# <http://www.gnu.org/licenses/>. - -import os -import sys -p1 = os.path.abspath(os.path.dirname(sys.argv[0])) -p2 = "%s/common" % os.path.dirname(p1) -if not p1 in sys.path: - sys.path.append(p1) -if not p2 in sys.path: - sys.path.append(p2) - -if not "/usr/share/system-config-network/" in sys.path: - sys.path.append("/usr/share/system-config-network") - -import os -import tempfile -import Globals - -from Utils import * -#from netconfpkg.NCHardwareList import getHardwareList - -def readHostFile(fileName=None): - hostEntryList = [] - if not fileName: - fileName = "/etc/hosts" - try: - for line in open(fileName): - tokens = line.split("#")[0].strip().split() - if len(tokens) < 2: - continue - hostEntryList.append({tokens[0] : tokens[1:]}) - return hostEntryList - except IOError: - log("failed to read %s file" % fileName) - return None - - -def writeHostFile(hostEntryList, fileName=None): - if fileName: - hostFile = fileName - else: - hostFile = tempfile.mktemp(prefix="GSPSA") - try: - fp = open(hostFile, "w") - for host in hostEntryList: - fp.write("%s\t%s\n" % (host.keys()[0], " ".join(host.values()[0]))) - fp.close() - if hostFile == fileName: - return True - except IOError: - log("failed to write %s file" % hostFile) - return False - if runCommandFG("mv -f %s /etc/hosts" % hostFile, root=True) != 0: - log("failed to rename file %s to /etc/hosts" % hostFile) - return False - return True - - -def readResolvConfFile(fileName=None, includeLocalHost=False): - nameServerList = [] - domain = None - searchDomain = None - if not fileName: - fileName = Globals.RESOLV_CONF_FILE - try: - for line in open(fileName): - tokens = line.split("#")[0].strip().split() - if len(tokens) < 2: - continue - if tokens[0].upper() == "NAMESERVER": - if includeLocalHost == False and tokens[1] == "127.0.0.1": - continue - nameServerList.append(tokens[1]) - continue - if tokens[0].upper() == "DOMAIN": - domain = tokens[1:] - continue - if tokens[0].upper() == "SEARCH": - searchDomain = tokens[1:] - continue - return nameServerList, domain, searchDomain - except IOError: - log("failed to read %s file" % fileName) - return None, None, None - - -def writeResolvConfFile(nameServerList, domain, searchDomain, fileName=None, appendLocalHost=True): - if fileName: - resolvConfFile = fileName - else: - resolvConfFile = tempfile.mktemp(prefix="GSPSA") - try: - fp = open(resolvConfFile, "w") - if appendLocalHost: - fp.write("nameserver 127.0.0.1\n") - for nameServer in nameServerList: - fp.write("nameserver %s\n" % nameServer) - if domain: - fp.write("domain %s\n" % " ".join(domain)) - if searchDomain: - fp.write("search %s\n" % " ".join(searchDomain)) - fp.close() - if resolvConfFile == fileName: - return True - except IOError: - log("failed to write %s file" % resolvConfFile) - return False - if runCommandFG("mv -f %s %s" % (resolvConfFile, Globals.RESOLV_CONF_FILE), root=True) != 0: - log("failed to rename file %s to %s" % (resolvConfFile, Globals.RESOLV_CONF_FILE)) - return False - return True - - -def readIfcfgConfFile(deviceName, root=""): - conf = {} - fileName = "%s%s/ifcfg-%s" % (root, Globals.SYSCONFIG_NETWORK_DIR, deviceName) - try: - for line in open(fileName): - tokens = line.split("#")[0].split("=") - if len(tokens) != 2: - continue - conf[tokens[0].strip().lower()] = tokens[1].strip() - return conf - except IOError: - log("failed to read %s file" % fileName) - return None - - -def writeIfcfgConfFile(deviceName, conf, root="", deviceFile=None): - if not deviceFile: - deviceFile = "%s%s/ifcfg-%s" % (root, Globals.SYSCONFIG_NETWORK_DIR, deviceName) - if root: - ifcfgConfFile = deviceFile - else: - ifcfgConfFile = tempfile.mktemp(prefix="GSPSA") - try: - fp = open(ifcfgConfFile, "w") - for key in conf.keys(): - if key == "description": - fp.write("#%s=%s\n" % (key.upper(), conf[key])) - continue - if key in ['link', 'mode']: - continue - if conf["device"].startswith("bond") and key in ['hwaddr', 'master', 'slave']: - continue - if key == "slave" and conf['master']: - fp.write("SLAVE=yes\n") - continue - if key == "onboot": - if conf[key] == True: - fp.write("ONBOOT=yes\n") - elif isString(conf[key]) and conf[key].upper() == "YES": - fp.write("ONBOOT=yes\n") - else: - fp.write("ONBOOT=no\n") - continue - if not conf[key]: - continue - fp.write("%s=%s\n" % (key.upper(), conf[key])) - fp.close() - if ifcfgConfFile == deviceFile: - return True - except IOError: - log("failed to write %s file" % ifcfgConfFile) - return False - if runCommandFG("mv -f %s %s" % (ifcfgConfFile, deviceFile), root=True) != 0: - log("failed to rename file %s to %s" % (ifcfgConfFile, deviceFile)) - return False - return True - -def getNetDeviceDetail(deviceName): - deviceDetail = {} - deviceDetail['Name'] = deviceName - rv = runCommandFG("ifconfig %s" % deviceName, stdout=True, root=True) - if rv["Status"] != 0: - return False - for line in rv["Stdout"].split(): - tokens = line.strip().split(":") - if tokens[0].upper() == "ENCAP": - deviceDetail['Model'] = tokens[1].strip().upper() - break - - for line in rv["Stdout"].split("\n"): - if line.strip().startswith("inet addr:"): - tokens = line.strip().split(":") - if tokens[0].upper() == "INET ADDR": - try: - deviceDetail['Ip'] = tokens[1].strip().split()[0] - deviceDetail['Mask'] = tokens[-1].strip() - except IndexError: - pass - break - return deviceDetail - -def getNetDeviceGateway(deviceName): - rv = runCommand("route -n", output=True, root=True) - if rv["Status"] != 0: - return None - if not rv["Stdout"]: - return None - lines = [line for line in rv["Stdout"].split("\n") if line.find("UG") != -1 and line.find(deviceName)] - if not lines: - return None - line = lines[-1].split() - if line and len(line) > 1: - return line[1] - return None - -def getNetSpeed(deviceName): - rv = runCommandFG("ethtool %s" % deviceName, stdout=True, root=True) - if rv["Status"] != 0: - return False - for line in rv["Stdout"].split("\n"): - tokens = line.strip().split(":") - if tokens[0].upper() == "SPEED": - return tokens[1].strip().upper().split("MB")[0] - return None - -def getLinkStatus(deviceName): - return True - ## ethtool takes very long time to respond. So its disabled now - rv = runCommandFG("ethtool %s" % deviceName, stdout=True, root=True) - if rv["Status"] != 0: - return False - for line in rv["Stdout"].split("\n"): - tokens = line.strip().split(":") - if tokens[0].upper() == "LINK DETECTED": - if tokens[1].strip().upper() == "YES": - return True - else: - return False - return False - - -def getBondMode(deviceName, fileName=None): - if not fileName: - fileName = Globals.MODPROBE_CONF_FILE - try: - for line in open(fileName): - tokens = line.split("#")[0].split() - if len(tokens) < 4: - continue - if tokens[0].upper() == "OPTIONS" and tokens[1] == deviceName: - if tokens[2].startswith("mode="): - return tokens[2].split("=")[1] - if tokens[3].startswith("mode="): - return tokens[3].split("=")[1] - if tokens[4].startswith("mode="): - return tokens[4].split("=")[1] - if tokens[5].startswith("mode="): - return tokens[5].split("=")[1] - return None - except IOError: - log("failed to read %s file" % fileName) - return None - - -def setBondMode(deviceName, mode, fileName=None): - if not fileName: - fileName = Globals.MODPROBE_CONF_FILE - tempFileName = getTempFileName() - try: - fp = open(tempFileName, "w") - lines = open(fileName).readlines() - except IOError: - log("unable to open file %s" % Globals.MODPROBE_CONF_FILE) - return False - for line in lines: - tokens = line.split() - if len(tokens) > 1 and "OPTIONS" == tokens[0].upper() and "BOND" in tokens[1].upper() and deviceName == tokens[1]: - fp.write("options %s max_bonds=2 mode=%s miimon=100\n" % (deviceName, mode)) - deviceName = None - continue - fp.write(line) - if deviceName: - fp.write("alias %s bonding\n" % deviceName) - fp.write("options %s max_bonds=2 mode=%s miimon=100\n" % (deviceName, mode)) - fp.close() - if runCommandFG(["mv", "-f", tempFileName, fileName], root=True) != 0: - log("unable to move file from %s to %s" % (tempFileName, fileName)) - return False - return True - -def getNetDeviceList(root=""): - netDeviceList = [] - for deviceName in os.listdir("/sys/class/net/"): - netDevice = {} - netDevice["device"] = None - netDevice["description"] = None - netDevice["hwaddr"] = None - netDevice["type"] = None - netDevice["onboot"] = None - netDevice["bootproto"] = None - netDevice["gateway"] = None - netDevice["peerdns"] = None - netDevice["autodns"] = None - netDevice["dns1"] = None - netDevice["dns2"] = None - netDevice["dns3"] = None - netDevice["master"] = None - netDevice["slave"] = None - netDevice["nmcontrolled"] = None - netDevice["link"] = None - netDevice["mode"] = None - - #netDevice["device"] = device.Name - netDevice["device"] = deviceName - #netDevice["description"] = device.Description - netDevice["description"] = deviceName - #netDevice["type"] = device.Type - netDevice["type"] = None - netDevice["link"] = getLinkStatus(deviceName) - netDevice["mode"] = getBondMode(deviceName, root + Globals.MODPROBE_CONF_FILE) - deviceDetail = getNetDeviceDetail(deviceName) - if deviceDetail.has_key('Model'): - netDevice["model"] = deviceDetail['Model'] - else: - netDevice["model"] = None - if deviceDetail.has_key('Ip'): - netDevice["ipaddr"] = deviceDetail['Ip'] - else: - netDevice["ipaddr"] = None - if deviceDetail.has_key('Mask'): - netDevice["netmask"] = deviceDetail['Mask'] - else: - netDevice["netmask"] = None - netDevice["speed"] = getNetSpeed(deviceName) - try: - netDevice["hwaddr"] = open("/sys/class/net/%s/address" % deviceName).read().strip() - except IOError: - pass - - netDeviceList.append(netDevice) - - conf = readIfcfgConfFile(deviceName, root) - if not conf: - continue - try: - netDevice["onboot"] = conf["onboot"] - except KeyError: - pass - try: - netDevice["bootproto"] = conf["bootproto"] - except KeyError: - pass - if conf.has_key("ipaddr") and conf["ipaddr"]: - netDevice["ipaddr"] = conf["ipaddr"] - try: - netDevice["netmask"] = conf["netmask"] - except KeyError: - pass - if conf.has_key("gateway") and conf["gateway"]: - netDevice["gateway"] = conf["gateway"] - else: - netDevice["gateway"] = getNetDeviceGateway(deviceName) - try: - netDevice["peerdns"] = conf["peerdns"] - except KeyError: - pass - try: - netDevice["autodns"] = conf["autodns"] - except KeyError: - pass - try: - netDevice["dns1"] = conf["dns1"] - except KeyError: - pass - try: - netDevice["dns2"] = conf["dns2"] - except KeyError: - pass - try: - netDevice["dns3"] = conf["dns3"] - except KeyError: - pass - try: - netDevice["master"] = conf["master"] - except KeyError: - pass - try: - netDevice["slave"] = conf["slave"] - except KeyError: - pass - try: - netDevice["nmcontrolled"] = conf["nmcontrolled"] - except KeyError: - pass - - return netDeviceList - - ## bondDevices = [os.path.basename(device) for device in glob.glob("/sys/class/net/bond*")] - - ## bondDevices = [os.path.basename(device) for device in glob.glob("/sys/class/net/bond*")] - ## for deviceName in bondDevices: - ## if deviceName in linkedBondList: - ## if deviceName in sysConfigDeviceList: - ## deviceList[deviceName] = sysConfigDeviceList[deviceName] - ## else: - ## deviceList[deviceName] = {'device':deviceName, 'onboot':'no', 'bootproto':'none'} - ## continue - ## if len(ethDevices) > 2: - ## deviceList[deviceName] = {'device':deviceName, 'onboot':'no', 'bootproto':'none'} - - -def configureDhcpServer(serverIpAddress, dhcpIpAddress): - tmpDhcpConfFile = tempfile.mktemp(prefix="GSPSA") - - serverPortString = "68" - try: - for arg in open("/proc/cmdline").read().strip().split(): - token = arg.split("=") - if token[0] == "dhcp": - serverPortString = token[1] - break - except IOError: - log(syslog.LOG_ERR, "Failed to read /proc/cmdline. Continuing with default port 68") - try: - serverPort = int(serverPortString) - except ValueError: - log(syslog.LOG_ERR, "Invalid dhcp port '%s' in /proc/cmdline. Continuing with default port 68" % serverPortString) - serverPort = 68 - - try: - fp = open(tmpDhcpConfFile, "w") - fp.write("bind-interfaces\n") - fp.write("except-interface=lo\n") - fp.write("dhcp-range=%s,%s\n" % (dhcpIpAddress, dhcpIpAddress)) - fp.write("dhcp-lease-max=1\n") - fp.write("dhcp-alternate-port=%s\n" % serverPort) - fp.write("dhcp-leasefile=%s\n" % Globals.DNSMASQ_LEASE_FILE) - #fp.write("server=%s\n" % serverIpAddress) - #fp.write("dhcp-script=/usr/sbin/server-info\n") - fp.close() - except IOError: - log(syslog.LOG_ERR, "unable to write dnsmasq dhcp configuration %s" % tmpDhcpConfFile) - return False - if runCommandFG("mv -f %s %s" % (tmpDhcpConfFile, Globals.DNSMASQ_DHCP_CONF_FILE), root=True) != 0: - log(syslog.LOG_ERR, "unable to copy dnsmasq dhcp configuration to %s" % Globals.DNSMASQ_DHCP_CONF_FILE) - return False - return True - - -def isDhcpServer(): - return os.path.exists(Globals.DNSMASQ_DHCP_CONF_FILE) - - -def getDhcpServerStatus(): - if runCommandFG("service dnsmasq status", root=True) == 0: - return True - return False - - -def startDhcpServer(): - if runCommandFG("service dnsmasq start", root=True) == 0: - return True - return False - - -def stopDhcpServer(): - if runCommandFG("service dnsmasq stop", root=True) == 0: - runCommandFG("rm -f %s" % Globals.DNSMASQ_LEASE_FILE, root=True) - return True - return False - - -def restartDhcpServer(): - stopDhcpServer() - runCommandFG("rm -f %s" % Globals.DNSMASQ_LEASE_FILE, root=True) - return startDhcpServer() - - -def reloadDhcpServer(): - if runCommandFG("service dnsmasq reload", root=True) == 0: - return True - return False diff --git a/src/com.gluster.storage.management.gateway.scripts/src/backend/RRDUtils.py b/src/com.gluster.storage.management.gateway.scripts/src/backend/RRDUtils.py deleted file mode 100644 index 1ad0deee..00000000 --- a/src/com.gluster.storage.management.gateway.scripts/src/backend/RRDUtils.py +++ /dev/null @@ -1,72 +0,0 @@ -import rrdtool -import os -from socket import gethostname -from itertools import groupby - -class RRD: - def __init__ (self): - self.COLORS = [0xff7777, 0x7777ff, 0x55ff55, 0xffcc77, 0xff77ff, 0x77ffff,0xffff77, 0x55aaff] - self.HOST = gethostname() - self.DIR = "/var/lib/collectd" - - def fade_component(self, component): - return ((component + 255 * 5) / 6) - - def fade_color(self, color): - r = 0; - for i in [0,1,2]: - shft = (i * 8) - component = ((color >> shft) & 255) - r |= (self.fade_component(component) << shft) - return r - - def generate_pngs(self): - - rrdlist = os.popen ("find %s -type f -name '*.rrd'" % self.DIR) - - for rrd in rrdlist: - self.dss = [] - self.defs = "" - - rrdinfo = rrdtool.info(rrd.strip()) - - for key in rrdinfo.keys(): - if key.split('[')[0] == 'ds': - self.dss.append(key.split('[')[1].split(']')[0]) - self.dss.sort() - - self.dss = [a for a,b in groupby(self.dss)] - - for ds in self.dss: - self.defs = self.defs + " DEF:%s_avg=%s:%s:AVERAGE " % (ds, rrd.strip(), ds) - self.defs = self.defs + " DEF:%s_max=%s:%s:MAX " % (ds, rrd.strip(), ds) - - j = 0 - for ds in self.dss: - color = self.COLORS[j % len(self.COLORS)] - j = j + 1 - faded_color = self.fade_color(color) - self.defs = self.defs + " AREA:%s_max#%06x " % (ds, faded_color) - - j = 0 - for ds in self.dss: - color = self.COLORS[j % len(self.COLORS)] - j = j + 1 - self.defs = self.defs + " LINE2:%s_avg#%06x:%s " % (ds, color, ds) - self.defs = self.defs + " GPRINT:%s_avg:AVERAGE:%%5.1lf%%sAvg " % ds - self.defs = self.defs + " GPRINT:%s_max:MAX:%%5.1lf%%sMax " % ds - - for span in ['1hour', '1day', '1week', '1month']: - os.system ("mkdir -p %s/%s" % (self.DIR, self.HOST)) - image = os.path.dirname(rrd.strip()) + "-" + span + ".png" - cmd = "rrdtool graph " + image + " -t \"%s %s\"" % (os.path.dirname(rrd.strip()), span) + " --imgformat PNG --width 600 --height 100 --start now-" + span + " --end now --interlaced " + self.defs + " >/dev/null 2>&1" - os.system(cmd) - - -def main (): - - rrd = RRD () - rrd.generate_pngs () - -if __name__ == "__main__": - main() diff --git a/src/com.gluster.storage.management.gateway.scripts/src/backend/ServerUtils.py b/src/com.gluster.storage.management.gateway.scripts/src/backend/ServerUtils.py deleted file mode 100644 index 1fec994c..00000000 --- a/src/com.gluster.storage.management.gateway.scripts/src/backend/ServerUtils.py +++ /dev/null @@ -1,308 +0,0 @@ -# Copyright (c) 2010 Gluster, Inc. <http://www.gluster.com> -# This file is part of Gluster Storage Platform. -# -# Gluster Storage Platform is free software; you can redistribute it -# and/or modify it under the terms of the GNU General Public License -# as published by the Free Software Foundation; either version 3 of -# the License, or (at your option) any later version. -# -# Gluster Storage Platform is distributed in the hope that it will be -# useful, but WITHOUT ANY WARRANTY; without even the implied warranty -# of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -# GNU General Public License for more details. -# -# You should have received a copy of the GNU General Public License -# along with this program. If not, see -# <http://www.gnu.org/licenses/>. - -import os -import re -import subprocess -import glob -import Globals -from Protocol import * -from Utils import * - -def isValidServer(serverName): - for profile in getProfileList(): - if profile.ProfileName == "default" and profile.Active: - if serverName == profile.DNS.Hostname: - return True - return False - -def getHostname(): - for profile in getProfileList(): - if profile.ProfileName == "default" and profile.Active: - return profile.DNS.Hostname - return None - -def getDomainName(): - try: - domainName = open(Globals.DOMAINNAME_FILE).read() - except IOError: - return None - return domainName.split()[0] - -def replaceServerIp(fileName, findWhat, replaceWith): - try: - data = open(fileName).read() - fp = open(fileName, "w") - fp.write(re.sub(findWhat, replaceWith, data)) - fp.close() - return True - except IOError: - return False - except ValueError: - return False - except OSError: - return False - -def serverName2IpAddress(serverName): - command = "dig %s | grep '^%s'" % (serverName, serverName) - ps = subprocess.Popen(command, - shell=True, - stdout=subprocess.PIPE, - stdin=subprocess.PIPE, - stderr=subprocess.PIPE, - close_fds=True) - ipAddress = serverName - if ps.wait() == 0: - output = ps.communicate() - ipAddress = output[0].split()[-1] - return ipAddress - -def getInstallerIp(): - if not os.path.exists(Globals.INSTALLER_INFO_FILE): - return None - try: - for line in open(Globals.INSTALLER_INFO_FILE): - tokens = line.split("=") - if tokens[0] == "IP-ADDRESS": - return tokens[1].split(",")[0].strip() - except IOError: - syslog.syslog(syslog.LOG_ERR, "unable to read %s file" % Globals.INSTALLER_INFO_FILE) - return False - -def setInstallerIp(installerIp): - try: - open(Globals.INSTALLER_INFO_FILE, "w").write("IP-ADDRESS=%s\n" % installerIp) - return True - except IOError: - log(syslog.LOG_ERR, "unable to create %s file" % Globals.INSTALLER_INFO_FILE) - return False - -def getCurrentServerName(): - try: - for line in open(Globals.SYSCONFIG_NETWORK_FILE): - tokens = line.split("=") - if tokens[0] == "HOSTNAME": - return tokens[1].strip() - except IOError: - syslog.syslog(syslog.LOG_ERR, "unable to read %s file" % Globals.SYSCONFIG_NETWORK_FILE) - return False - -def getLastAccessedNetwork(serverName): - lastAccessedNetworkFile = ("/%s/servers/%s/%s" % - (Globals.GLUSTER_CONF_DIR, serverName, Globals.LAST_ACCESSED_NETWORK_FILE)) - try: - return open(lastAccessedNetworkFile).read().strip() - except IOError: - log(syslog.LOG_ERR, "failed to read last accessed network file %s" % lastAccessedNetworkFile) - pass - return False - -def setLastAccessedNetwork(serverName, ipAddress): - lastAccessedNetworkFile = ("/%s/servers/%s/%s" % - (Globals.GLUSTER_CONF_DIR, serverName, Globals.LAST_ACCESSED_NETWORK_FILE)) - try: - open(lastAccessedNetworkFile, "w").write(ipAddress.strip() + "\n") - except IOError: - log(syslog.LOG_ERR, "failed to write last accessed network file %s" % lastAccessedNetworkFile) - return False - return True - -def getServerIpList(serverName, preferredNetworkOnly=False): - networkXmlFile = ("%s/servers/%s/network.xml" % (Globals.GLUSTER_CONF_DIR, serverName)) - configDom = XDOM() - if not configDom.parseFile(networkXmlFile): - log(syslog.LOG_ERR, "failed to read %s file" % networkXmlFile) - return None - preferredNetwork = configDom.getTextByTagRoute("preferred-network") - ipList = [] - interfaceDom = XDOM() - for tagE in configDom.getElementsByTagName("interface"): - interfaceDom.setDomObj(tagE) - deviceName = interfaceDom.getTextByTagRoute("device") - hostIp = interfaceDom.getTextByTagRoute("ipaddr") - if not hostIp: - continue - if preferredNetworkOnly: - if preferredNetwork.upper() == "ANY" or preferredNetwork.upper() == deviceName.upper(): - ipList.append(hostIp) - else: - ipList.append(hostIp) - if preferredNetworkOnly: - lastAccessedNetworkIp = getLastAccessedNetwork(serverName) - if lastAccessedNetworkIp in ipList: - ipList.remove(lastAccessedNetworkIp) - ipList = [lastAccessedNetworkIp] + ipList - return ipList - -def getServerPreferredIpList(serverName): - return getServerIpList(serverName, True) - -def getExecuteServerList(serverList): - executeServerList = {} - for serverName in serverList: - if serverName == Globals.INSTALLER_SERVER_NAME: - installerIp = getInstallerIp() - if installerIp: - executeServerList[serverName] = [installerIp] - continue - executeServerList[serverName] = getServerPreferredIpList(serverName) - return executeServerList - -def getAllServerList(): - serverList = [] - for filePath in glob.glob("%s/servers/*" % Globals.GLUSTER_CONF_DIR): - if os.path.isdir(filePath): - serverList.append(os.path.basename(filePath)) - try: - serverList.remove(Globals.INSTALLER_SERVER_NAME) - except ValueError: - pass - return serverList - -def getServerNetworkConfigFromLocalFile(serverName): - configDom = XDOM() - configDom.parseFile("%s/servers/%s/network.xml" % (Globals.GLUSTER_CONF_DIR, serverName)) - return configDom - -def updateServerNetworkConfigXmlFile(serverName, serverNetworkDom): - configDom = XDOM() - serverTag = serverNetworkDom.getElementsByTagRoute("server")[0] - configDom.setDomObj(serverTag) - if not configDom.writexml("%s/%s/network.xml" % (Globals.SERVER_VOLUME_CONF_DIR, serverName)): - log("Faild to write xml file %s/%s/network.xml" % (Globals.SERVER_VOLUME_CONF_DIR, serverName)) - -def compareServerNetworkDom(serverNetworkDomA, serverNetworkDomB, requestFlag=True): - command = "command.server." - if not requestFlag: - command = "" - sourceServer = {} - tagText = serverNetworkDomA.getTextByTagRoute("name") - if not tagText: - taxText = None - sourceServer["name"] = tagText - tagText = serverNetworkDomA.getTextByTagRoute("domain-name") - if not tagText: - tagText = None - sourceServer["domain-name"] = tagText - tagText = serverNetworkDomA.getTextByTagRoute("search-domain") - if not tagText: - tagText = None - sourceServer["search-domain"] = tagText - tagText = serverNetworkDomA.getTextByTagRoute("dns1") - if not tagText: - tagText = None - sourceServer["dns1"] = tagText - tagText = serverNetworkDomA.getTextByTagRoute("dns2") - if not tagText: - tagText = None - sourceServer["dns2"] = tagText - tagText = serverNetworkDomA.getTextByTagRoute("dns3") - if not tagText: - tagText = None - sourceServer["dns3"] = tagText - for tagE in serverNetworkDomA.getElementsByTagRoute("interface"): - interfaceDom = XDOM() - interfaceDom.setDomObj(tagE) - sourceServerList = {} - tagText = interfaceDom.getTextByTagRoute("description") - if not tagText: - tagText = None - sourceServerList["description"] = tagText - tagText = interfaceDom.getTextByTagRoute("hwaddr") - if not tagText: - tagText = None - sourceServerList["hwaddr"] = tagText - tagText = interfaceDom.getTextByTagRoute("onboot") - if not tagText: - tagText = None - sourceServerList["onboot"] = tagText - tagText = interfaceDom.getTextByTagRoute("bootproto") - if not tagText: - tagText = None - sourceServerList["bootproto"] = tagText - tagText = interfaceDom.getTextByTagRoute("ipaddr") - if not tagText: - tagText = None - sourceServerList["ipaddr"] = tagText - tagText = interfaceDom.getTextByTagRoute("netmask") - if not tagText: - tagText = None - sourceServerList["netmask"] = tagText - tagText = interfaceDom.getTextByTagRoute("gateway") - if not tagText: - tagText = None - sourceServerList["gateway"] = tagText - sourceServer[interfaceDom.getTextByTagRoute("device")] = sourceServerList - objServer = {} - tagText = serverNetworkDomB.getTextByTagRoute(command + "name") - if not tagText: - taxText = None - objServer["name"] = tagText - tagText = serverNetworkDomB.getTextByTagRoute(command + "domain-name") - if not tagText: - tagText = None - objServer["domain-name"] = tagText - tagText = serverNetworkDomB.getTextByTagRoute(command + "search-domain") - if not tagText: - tagText = None - objServer["search-domain"] = tagText - tagText = serverNetworkDomB.getTextByTagRoute(command + "dns1") - if not tagText: - tagText = None - objServer["dns1"] = tagText - tagText = serverNetworkDomB.getTextByTagRoute(command + "dns2") - if not tagText: - tagText = None - objServer["dns2"] = tagText - tagText = serverNetworkDomB.getTextByTagRoute(command + "dns3") - if not tagText: - tagText = None - objServer["dns3"] = tagText - for tagE in serverNetworkDomB.getElementsByTagRoute(command + "interface"): - interfaceDom = XDOM() - interfaceDom.setDomObj(tagE) - objServerList = {} - tagText = interfaceDom.getTextByTagRoute("description") - if not tagText: - tagText = None - objServerList["description"] = tagText - tagText = interfaceDom.getTextByTagRoute("hwaddr") - if not tagText: - tagText = None - objServerList["hwaddr"] = tagText - tagText = interfaceDom.getTextByTagRoute("onboot") - if not tagText: - tagText = None - objServerList["onboot"] = tagText - tagText = interfaceDom.getTextByTagRoute("bootproto") - if not tagText: - tagText = None - objServerList["bootproto"] = tagText - tagText = interfaceDom.getTextByTagRoute("ipaddr") - if not tagText: - tagText = None - objServerList["ipaddr"] = tagText - tagText = interfaceDom.getTextByTagRoute("netmask") - if not tagText: - tagText = None - objServerList["netmask"] = tagText - tagText = interfaceDom.getTextByTagRoute("gateway") - if not tagText: - tagText = None - objServerList["gateway"] = tagText - objServer[interfaceDom.getTextByTagRoute("device")] = objServerList - return sourceServer == objServer diff --git a/src/com.gluster.storage.management.gateway.scripts/src/backend/VolumeUtils.py b/src/com.gluster.storage.management.gateway.scripts/src/backend/VolumeUtils.py deleted file mode 100644 index b1031ccc..00000000 --- a/src/com.gluster.storage.management.gateway.scripts/src/backend/VolumeUtils.py +++ /dev/null @@ -1,612 +0,0 @@ -# Copyright (c) 2010 Gluster, Inc. <http://www.gluster.com> -# This file is part of Gluster Storage Platform. -# -# Gluster Storage Platform is free software; you can redistribute it -# and/or modify it under the terms of the GNU General Public License -# as published by the Free Software Foundation; either version 3 of -# the License, or (at your option) any later version. -# -# Gluster Storage Platform is distributed in the hope that it will be -# useful, but WITHOUT ANY WARRANTY; without even the implied warranty -# of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -# GNU General Public License for more details. -# -# You should have received a copy of the GNU General Public License -# along with this program. If not, see -# <http://www.gnu.org/licenses/>. - -import os -import glob -import tempfile -from operator import itemgetter -import Globals -from Protocol import * -from Utils import * -from DiskUtils import * -from ServerUtils import * -import GlusterdUtils as Glusterd - - -def isVolumeExist(volumeName): - volumeDom = XDOM() - return volumeDom.parseFile("%s/%s.xml" % (Globals.VOLUME_CONF_DIR, volumeName)) and \ - Glusterd.isVolumeExist(volumeName) - - -def getVolumeUuid(volumeName): - fileName = "%s/%s.xml" % (Globals.VOLUME_CONF_DIR, volumeName) - volumeDom = XDOM() - if not volumeDom.parseFile(fileName): - log("Failed to parse volume configuration file %s of %s" % (fileName, volumeName)) - return None - return volumeDom.getTextByTagRoute("uuid") - - -def readVolumeSmbConfFile(fileName=Globals.VOLUME_SMBCONF_FILE): - entryList = [] - try: - fp = open(fileName) - for line in fp: - tokens = line.split("#")[0].strip().split(";")[0].strip().split("=") - if len(tokens) != 2: - continue - if tokens[0].strip().upper() == "INCLUDE": - entryList.append(tokens[1].strip()) - fp.close() - except IOError, e: - log("Failed to open file %s: %s" % (fileName, str(e))) - return entryList - - -def writeVolumeSmbConfFile(entryList, fileName=Globals.VOLUME_SMBCONF_FILE): - try: - fp = open(fileName, "w") - for entry in entryList: - fp.write("include = %s\n" % entry) - fp.close() - return True - except IOError, e: - log("Failed to write file %s: %s" % (fileName, str(e))) - return False - - -def includeVolume(volumeName, fileName=Globals.VOLUME_SMBCONF_FILE): - volumeFile = "%s/%s.smbconf" % (Globals.VOLUME_CONF_DIR, volumeName) - if not os.path.exists(volumeFile): - return False - entryList = readVolumeSmbConfFile(fileName) - if volumeFile in entryList: - return True - entryList.append(volumeFile) - return writeVolumeSmbConfFile(entryList, fileName) - - -def excludeVolume(volumeName, fileName=Globals.VOLUME_SMBCONF_FILE): - volumeFile = "%s/%s.smbconf" % (Globals.VOLUME_CONF_DIR, volumeName) - if not os.path.exists(volumeFile): - return False - entryList = readVolumeSmbConfFile(fileName) - if volumeFile not in entryList: - return True - entryList.remove(volumeFile) - log("entryList = %s" % entryList) - return writeVolumeSmbConfFile(entryList, fileName) - - -def writeVolumeCifsConfiguration(volumeName, userList, adminUser=None): - volumeFile = "%s/%s.smbconf" % (Globals.VOLUME_CONF_DIR, volumeName) - try: - fp = open(volumeFile, "w") - fp.write("[%s]\n" % volumeName) - fp.write(" comment = %s volume served by Gluster\n" % volumeName) - fp.write(" path = %s/%s\n" % (Globals.CIFS_EXPORT_DIR, volumeName)) - fp.write(" guest ok = yes\n") - fp.write(" public = yes\n") - fp.write(" writable = yes\n") - if adminUser: - fp.write(" admin users = %s, %s\n" % (adminUser, ", ".join(userList))) - fp.write(" valid users = %s, %s\n" % (adminUser, ", ".join(userList))) - else: - fp.write(" admin users = %s\n" % (", ".join(userList))) - fp.write(" valid users = %s\n" % (", ".join(userList))) - fp.close() - return True - except IOError, e: - log("Failed to write file %s: %s" % (volumeFile, str(e))) - return False - - -def removeVolumeCifsConfiguration(volumeName): - volumeFile = "%s/%s.smbconf" % (Globals.VOLUME_CONF_DIR, volumeName) - try: - os.remove(volumeFile) - return True - except OSError, e: - log("Failed to remove file %s: %s" % (volumeFile, str(e))) - return False - - -def getVolumeListByPartitionName(partitionName): - volumeConfigFileList = glob.glob(Globals.VOLUME_CONF_DIR + "/*.xml") - if not volumeConfigFileList: - return None - - volumeList = [] - for volumeXmlFile in volumeConfigFileList: - volumeDom = XDOM() - volumeDom.parseFile(volumeXmlFile) - serverTopology = volumeDom.getElementsByTagRoute("volume.topology.group") - serverPartitionFound = False - for topology in serverTopology: - partitionDom = XDOM() - for partition in topology.getElementsByTagName("partition"): - partitionDom.setDomObj(partition) - if partitionDom.getTextByTagRoute("name") == partitionName: - serverPartitionFound = True - break - if serverPartitionFound: - volumeList.append(volumeDom.getElementsByTagRoute("volume")[0]) - break - return volumeList - - -def addServerPartitionConfig(inputDom, groupOrder, partitionTag): - if not(inputDom and groupOrder and partitionTag): - return False - groupDom = XDOM() - for group in inputDom.getElementsByTagRoute("topology.group"): - groupDom.setDomObj(group) - order = groupDom.getTextByTagRoute("order") - if order and int(order) == groupOrder: - group.appendChild(partitionTag) - return inputDom - return False - - -def removeServerPartitionConfig(inputDom, partitionName): - if not(inputDom and partitionName): - return False - for group in inputDom.getElementsByTagRoute("topology.group"): - partitionDom = XDOM() - for partition in group.getElementsByTagName("partition"): - partitionDom.setDomObj(partition) - if partitionDom.getTextByTagRoute("name") == partitionName: - group.removeChild(partition) - return inputDom - return False - - -def updateServerPartitionConfig(inputDom, partitionName, partitionTag): - if not(inputDom and partitionName and partitionTag): - return False - for group in inputDom.getElementsByTagRoute("topology.group"): - partitionDom = XDOM() - for partition in group.getElementsByTagName("partition"): - partitionDom.setDomObj(partition) - if partitionDom.getTextByTagRoute("name") == partitionName: - try: - group.replaceChild(partitionTag, partition) - return inputDom - except AttributeError: - return False - return False - - -def getServerPartitionConfigUuid(serverGroupList, serverPartition): - for group in serverGroupList: - if not group: - continue - partitionDom = XDOM() - for partition in group.getElementsByTagName("partition"): - partitionDom.setDomObj(partition) - partitionName = partition.getTextByTagName("name") - if not partitionName: - continue - if partitionName == serverPartition: - return partitionDom.getTextByTagName("uuid") - return False - - -def setServerPartitionConfigProperty(inputDom, partitionName, propertyDict): - if not(inputDom and partitionName and propertyDict): - return False - for group in inputDom.getElementsByTagRoute("topology.group"): - partitionDom = XDOM() - for partition in group.getElementsByTagName("partition"): - partitionDom.setDomObj(partition) - if partitionDom.getTextByTagRoute("name") == partitionName: - for part in propertyDict.keys(): - x = partition.getElementsByTagName(part) - if x: - x[0].childNodes[0].nodeValue = propertyDict[part] - return inputDom - return False - - -def getSortedServerPartitionConfigProperty(inputDom): - groupDict = {} - if not inputDom: - return None - groupDom = XDOM() - for group in inputDom.getElementsByTagRoute("topology.group"): - groupDom.setDomObj(group) - groupOrder = groupDom.getTextByTagRoute("order") - if not groupOrder: - return None - groupOrder = int(groupOrder) - if groupOrder < 1: - return None - partitionDom = XDOM() - partitionDict = {} - for partition in group.getElementsByTagName("partition"): - partitionDom.setDomObj(partition) - partitionName = partitionDom.getTextByTagRoute("name") - if not partitionName: - return None - partitionOrder = partitionDom.getTextByTagRoute("order") - if not partitionOrder: - return None - partitionUuid = partitionDom.getTextByTagRoute("uuid") - partitionOrder = int(partitionOrder) - if partitionOrder < 1: - return None - partitionDetails = partitionName.split(":") - if not partitionDetails or len(partitionDetails) < 1: - return None - partitionDict[partitionOrder] = { "order":partitionOrder, - "servername":partitionDetails[0], - "name":partitionDetails[1], - "uuid":partitionUuid} - groupDict[groupOrder] = partitionDict - - serverList = [] - groupOrderList = groupDict.keys() - groupOrderList.sort() - for groupOrder in groupOrderList: - partitionOrderList = groupDict[groupOrder].keys() - partitionOrderList.sort() - for partitionOrder in partitionOrderList: - serverList.append(groupDict[groupOrder][partitionOrder]) - - return serverList - - -def getSortedServerPartitionList(serverGroupElements): - serverPartitionDict = {} - groupOrderList = [] - serverList = [] - partitionDom = XDOM() - for group in serverGroupElements: - if not group: - continue - groupOrderE = group.getElementsByTagName("order") - if not (groupOrderE and groupOrderE[0].childNodes): - return None - value = int(XDOM.getText(groupOrderE[0].childNodes)) - if value > 0: - groupOrderList.append(value) - partitionDict = {} - for partition in group.getElementsByTagName("partition"): - partitionDom.setDomObj(partition) - - partitionName = partitionDom.getTextByTagRoute("name") - if not partitionName: - return None - partitionOrder = partitionDom.getTextByTagRoute("order") - if not partitionOrder: - return None - partitionUuid = partitionDom.getTextByTagRoute("uuid") - partitionDict[int(partitionOrder)] = [partitionName, partitionUuid] - serverPartitionDict[value] = partitionDict - groupOrderList.sort() - - for groupOrder in groupOrderList: - items = serverPartitionDict[groupOrder].items() - items.sort(key = itemgetter(0)) - serverList = serverList + [ items[i][1] for i in range(0,len(items))] - return serverList - - -def clearExportDirectory(serverList, volumeName, volumeUuid): - thisServerName = getCurrentServerName() - for exportServer in serverList: - serverName, partition = exportServer[0].split(":") - if thisServerName != serverName: - continue - partitionUuid = getUuidByDiskPartition(getDevice(partition)) - if not partitionUuid: - log("unable to find uuid of partition %s" % partition) - return False - volumeDirName = "%s/%s/%s" % (Globals.GLUSTER_LUN_DIR, partitionUuid, volumeUuid) - if os.path.exists(volumeDirName): - ## Removing /data/PARTITION-UUID/VOLUME-UUID/ - ## TODO: Get an option to remove it at this time - if runCommandFG("mv -f %s %s.delete" % (volumeDirName, volumeDirName), root=True) != 0: - return False - if runCommandFG("rm -f %s/%s/volumes/%s" % (Globals.GLUSTER_LUN_DIR, partitionUuid, volumeName), root=True) != 0: - return False - return True - - -def createExportDirectory(serverList, volumeName, volumeUuid): - thisServerName = getCurrentServerName() - tempVolumeNameFile = getTempFileName() - - try: - fp = open(tempVolumeNameFile, "w") - fp.write("VOLUME_NAME=%s\n" % volumeName) - fp.write("VOLUME_UUID=%s\n" % volumeUuid) - fp.close() - except IOError, e: - log("failed to create temporary file for volume-name: %s" % (volumeName, str(e))) - return False - - for exportServer in serverList: - serverName, partition = exportServer[0].split(":") - if thisServerName != serverName: - continue - partitionUuid = getUuidByDiskPartition(getDevice(partition)) - if not partitionUuid: - log("unable to find uuid of partition %s" % partition) - return False - - volumeDirName = "%s/%s/%s" % (Globals.GLUSTER_LUN_DIR, partitionUuid, volumeUuid) - ## Creating /data/PARTITION-UUID/VOLUME-UUID/ - if runCommandFG("mkdir %s" % volumeDirName, root=True) != 0: - return False - - ## Creating /data/PARTITION-UUID/VOLUME-UUID/exports/ - ## Creating /data/PARTITION-UUID/VOLUME-UUID/exports/brick1/ - if runCommandFG("mkdir -p %s/exports/brick1" % volumeDirName, root=True) != 0: - return False - - ## Creating /data/PARTITION-UUID/VOLUME-UUID/log/ - if runCommandFG("mkdir %s/log" % volumeDirName, root=True) != 0: - return False - - ## Creating /data/PARTITION-UUID/VOLUME-UUID/config/ - if runCommandFG("mkdir %s/config" % volumeDirName, root=True) != 0: - return False - - volumeLinkDirName = "%s/%s/volumes" % (Globals.GLUSTER_LUN_DIR, partitionUuid) - if not os.path.exists(volumeLinkDirName): - if runCommandFG("mkdir %s" % volumeLinkDirName, root=True) != 0: - return False - - ## Creating symlink - ## /data/PARTITION-UUID/volumes/VOLUME-NAME -> /data/PARTITION-UUID/VOLUME-UUID/ - command = "ln -fTs %s %s/%s" % (volumeDirName, - volumeLinkDirName, volumeName) - if runCommandFG(command, root=True) != 0: - return False - - if runCommandFG("cp -f %s %s/config/volume-name" % (tempVolumeNameFile, volumeDirName), root=True) != 0: - return False - - try: - os.remove(tempVolumeNameFile) - except OSError, e: - log("Failed to remove file %s: %s" % (tempVolumeNameFile, str(e))) - - return True - - -def getPartitionListByServerName(volumeDom, serverName, serverPartitionList=None): - partitionList = {} - if serverPartitionList: - for partitionName in serverPartitionList: - partitionUuid = getServerDiskPartitionUuid(serverName, partitionName) - if not partitionUuid: - log(syslog.LOG_ERR, "failed to get disk partition %s uuid of server %s" % (partitionName, serverName)) - return None - partitionList[partitionName] = partitionUuid - return partitionList - for group in volumeDom.getElementsByTagRoute("topology.group"): - for partitionTag in group.getElementsByTagName("partition"): - nameE = partitionTag.getElementsByTagName("name") - if not nameE: - continue - partition = XDOM.getText(nameE[0].childNodes) - if not partition: - continue - server, partitionName = partition.split(":") - if server != serverName: - continue - partitionUuid = getServerDiskPartitionUuid(serverName, partitionName) - if not partitionUuid: - log(syslog.LOG_ERR, "failed to get disk partition %s uuid of server %s" % (partitionName, serverName)) - return None - partitionList[partitionName] = partitionUuid - return partitionList - - -def isVolumeRunning(volumeName): - return Glusterd.isVolumeRunning(volumeName) - -def addVolumeMigrationDetails(sourcePartition, destinationPartition, volumeName): - migrationDom = XDOM() - if not os.path.exists(Globals.VOLUME_MIGRATION_LIST_FILE): - migrationDom.appendTagRoute("volume-migration") - else: - if not migrationDom.parseFile(Globals.VOLUME_MIGRATION_LIST_FILE): - log("Failed to load volume-migration.xml file") - return None - migrationList = migrationDom.getElementsByTagRoute("volume-migration.migration") - for tagE in migrationList: - dom = XDOM() - dom.setDomObj(tagE) - if dom.getTextByTagRoute("source-partition") == sourcePartition and \ - dom.getTextByTagRoute("destination-partition") == destinationPartition and \ - dom.getTextByTagRoute("volume-name") == volumeName: - return False - migrationTag = migrationDom.getElementsByTagRoute("volume-migration") - if not migrationTag: - return None - partitionTag = migrationDom.createTag("migration") - partitionTag.appendChild(migrationDom.createTag("source-partition", sourcePartition)) - partitionTag.appendChild(migrationDom.createTag("destination-partition", destinationPartition)) - partitionTag.appendChild(migrationDom.createTag("volume-name", volumeName)) - migrationTag[0].appendChild(partitionTag) - if not migrationDom.writexml(Globals.VOLUME_MIGRATION_LIST_FILE): - log("Unable to write disk migration details into %s/volume-migration.xml" % Globals.GLUSTER_BASE_DIR) - return False - return True - - -def removeVolumeMigrationDetails(sourcePartition, destinationPartition, volumeName): - migrationDom = XDOM() - if not os.path.exists(Globals.VOLUME_MIGRATION_LIST_FILE): - return None - if not migrationDom.parseFile(Globals.VOLUME_MIGRATION_LIST_FILE): - log("Failed to load volume-migration.xml file") - return None - migrationList = migrationDom.getElementsByTagRoute("volume-migration.migration") - for tagE in migrationList: - dom = XDOM() - dom.setDomObj(tagE) - if dom.getTextByTagRoute("source-partition") == sourcePartition and \ - dom.getTextByTagRoute("destination-partition") == destinationPartition and \ - dom.getTextByTagRoute("volume-name") == volumeName: - migrationDom.getElementsByTagRoute("volume-migration")[0].removeChild(tagE) - if not migrationDom.writexml(Globals.VOLUME_MIGRATION_LIST_FILE): - log("Unable to write disk migration details into %s/volume-migration.xml" % Globals.GLUSTER_BASE_DIR) - return False - return True - - -def addPartitionMigrationDetails(sourcePartition, destinationPartition, volumeList=None): - migrationDom = XDOM() - if not os.path.exists(Globals.MIGRATE_PARTITION_LIST_FILE): - migrationDom.appendTagRoute("partition-migration") - else: - if not migrationDom.parseFile(Globals.MIGRATE_PARTITION_LIST_FILE): - log("Failed to load migration.xml file") - return None - migrationList = migrationDom.getElementsByTagRoute("partition-migration.migration") - for tagE in migrationList: - dom = XDOM() - dom.setDomObj(tagE) - if dom.getTextByTagRoute("source-partition") == sourcePartition: - return False - if dom.getTextByTagRoute("destination-partition") == destinationPartition: - return False - migrationTag = migrationDom.getElementsByTagRoute("partition-migration") - if not migrationTag: - return None - partitionTag = migrationDom.createTag("migration") - partitionTag.appendChild(migrationDom.createTag("source-partition", sourcePartition)) - partitionTag.appendChild(migrationDom.createTag("destination-partition", destinationPartition)) - migrationTag[0].appendChild(partitionTag) - if not migrationDom.writexml(Globals.MIGRATE_PARTITION_LIST_FILE): - log("Unable to write disk migration details into %s/migration.xml" % Globals.GLUSTER_BASE_DIR) - return False - if volumeList: - for volumeName in volumeList: - addVolumeMigrationDetails(sourcePartition, destinationPartition, volumeName) - return True - - -def removePartitionMigrationDetails(sourcePartition, destinationPartition, volumeList=None): - migrationDom = XDOM() - if not os.path.exists(Globals.MIGRATE_PARTITION_LIST_FILE): - return None - if not migrationDom.parseFile(Globals.MIGRATE_PARTITION_LIST_FILE): - log("Failed to load migration.xml file") - return None - migrationList = migrationDom.getElementsByTagRoute("partition-migration.migration") - for tagE in migrationList: - dom = XDOM() - dom.setDomObj(tagE) - if dom.getTextByTagRoute("source-partition") == sourcePartition and \ - dom.getTextByTagRoute("destination-partition") == destinationPartition: - migrationDom.getElementsByTagRoute("partition-migration")[0].removeChild(tagE) - if not migrationDom.writexml(Globals.MIGRATE_PARTITION_LIST_FILE): - log("Unable to write disk migration details into %s/migration.xml" % Globals.GLUSTER_BASE_DIR) - return False - if volumeList: - for volumeName in volumeList: - removeVolumeMigrationDetails(sourcePartition, destinationPartition, volumeName) - return True - - -def isMigrationInProgress(partition): - migrationDom = XDOM() - if not os.path.exists(Globals.MIGRATE_PARTITION_LIST_FILE): - return None - if not migrationDom.parseFile(Globals.MIGRATE_PARTITION_LIST_FILE): - log("Failed to load migration.xml file") - return None - migrationList = migrationDom.getElementsByTagRoute("partition-migration.migration") - for tagE in migrationList: - dom = XDOM() - dom.setDomObj(tagE) - if migrationDom.getTextByTagRoute("source-partition") == partition or \ - migrationDom.getTextByTagRoute("destination-partition") == partition: - return True - return False - - -def getServerDiskPartitionUuid(serverName, partition): - diskConfigDom = XDOM() - if not diskConfigDom.parseFile("%s/%s/disk.xml" % (Globals.SERVER_CONF_DIR, serverName)): - return None - for disk in diskConfigDom.getElementsByTagRoute("disks.disk"): - diskDom = XDOM() - diskDom.setDomObj(disk) - partitionList = diskDom.getElementsByTagRoute("partition") - for tagE in partitionList: - partitionDom = XDOM() - partitionDom.setDomObj(tagE) - if partitionDom.getTextByTagRoute("device") == partition: - return partitionDom.getTextByTagRoute("uuid") - - -def getVolumeServerList(requestDom, requestFlag=True): - if requestFlag: - serverGroupElementList = requestDom.getElementsByTagRoute("command.volume.topology.group") - else: - serverGroupElementList = requestDom.getElementsByTagRoute("volume.topology.group") - if not serverGroupElementList: - return None - serverList = [] - partitionDom = XDOM() - for group in serverGroupElementList: - for partition in group.getElementsByTagName("partition"): - partitionDom.setDomObj(partition) - partitionName = partitionDom.getTextByTagRoute("name") - if not partitionName: - continue - serverPartition = partitionName.split(":") - if not(len(serverPartition) > 1 and serverPartition[1]): - return None - if serverPartition[0] not in serverList: - serverList.append(serverPartition[0]) - return serverList - - -def getVolumeServerListByName(volumeName): - serverList = [] - serverDom = XDOM() - volumeDom = XDOM() - if not os.path.exists("%s/%s.xml" % (Globals.VOLUME_CONF_DIR, volumeName)): - return False - if not volumeDom.parseFile("%s/%s.xml" % (Globals.VOLUME_CONF_DIR, volumeName)): - return False - return getVolumeServerList(volumeDom, False) - - -def getMigrateVolumeServerPartitionInfo(volumeName): - volumeMigrationDom = XDOM() - if not volumeMigrationDom.parseFile(Globals.VOLUME_MIGRATION_LIST_FILE): - Utils.log("Failed to parse file %s" % Globals.VOLUME_MIGRATION_LIST_FILE) - return None - volumeInfo = {} - dom = XDOM() - for tagE in volumeMigrationDom.getElementsByTagRoute("volume-migration.migration"): - dom.setDomObj(tagE) - if dom.getTextByTagRoute("volume-name") == volumeName: - volumeInfo['Name'] = volumeName - volumeInfo['SourcePartition'] = dom.getTextByTagRoute("source-partition") - volumeInfo['DestinationPartition'] = dom.getTextByTagRoute("destination-partition") - return volumeInfo - return None diff --git a/src/com.gluster.storage.management.gateway.scripts/src/backend/create_volume_directory.py b/src/com.gluster.storage.management.gateway.scripts/src/backend/create_volume_directory.py deleted file mode 100755 index a4eb2627..00000000 --- a/src/com.gluster.storage.management.gateway.scripts/src/backend/create_volume_directory.py +++ /dev/null @@ -1,54 +0,0 @@ -#!/usr/bin/python -# Copyright (C) 2011 Gluster, Inc. <http://www.gluster.com> -# This file is part of Gluster Management Gateway. -# - -import os -import sys -p1 = os.path.abspath(os.path.dirname(sys.argv[0])) -p2 = "%s/common" % os.path.dirname(p1) -if not p1 in sys.path: - sys.path.append(p1) -if not p2 in sys.path: - sys.path.append(p2) -import DiskUtils -import Utils - - -def main(): - if len(sys.argv) != 3: - sys.stderr.write("usage: %s <disk name> <volume name>\n" % os.path.basename(sys.argv[0])) - sys.exit(-1) - - disk = sys.argv[1] - volumeName = sys.argv[2] - - # Retrieving disk uuid - diskUuid = DiskUtils.getUuidByDiskPartition(DiskUtils.getDevice(disk)) - - if not diskUuid: - Utils.log("failed to find disk:%s uuid" % disk) - sys.stderr.write("failed to find disk:%s uuid\n" % disk) - sys.exit(1) - - # Retrieving disk mount point using disk uuid - diskMountPoint = DiskUtils.getMountPointByUuid(diskUuid) - if not os.path.exists(diskMountPoint): - Utils.log("failed to retrieve disk:%s mount point" % disk) - sys.stderr.write("failed to retrieve disk:%s mount point\n" % disk) - sys.exit(2) - - # creating volume directory under disk mount point - volumeDirectory = "%s/%s" % (diskMountPoint, volumeName) - if os.path.exists(volumeDirectory): - Utils.log("Volume directory:%s already exists" % (volumeDirectory)) - sys.stderr.write("Volume directory:%s already exists\n" % (volumeDirectory)) - sys.exit(3) - - rv = Utils.runCommand("mkdir %s" % volumeDirectory, root=True) - if rv != 0: - sys.stderr.write("Failed to create volume directory\n") - sys.exit(rv) - -if __name__ == "__main__": - main() diff --git a/src/com.gluster.storage.management.gateway.scripts/src/backend/disable-ssh-password-auth.sh b/src/com.gluster.storage.management.gateway.scripts/src/backend/disable-ssh-password-auth.sh deleted file mode 100755 index 07ee1a3a..00000000 --- a/src/com.gluster.storage.management.gateway.scripts/src/backend/disable-ssh-password-auth.sh +++ /dev/null @@ -1,30 +0,0 @@ -#!/bin/bash - -#----------------------------------------------------------------------------- -# disable-ssh-password-auth.sh -# Script for disabling SSH password authentication. This is used by the -# management gateway after installing the public key, so that the gluster -# node can be accessed (using ssh) only from the management gateway. -#----------------------------------------------------------------------------- - -CONFIG_FILE="/etc/ssh/sshd_config" -TIMESTAMP=`date +%d%m%Y%H%M%S` -BACKUP_FILE="${CONFIG_FILE}_${TIMESTAMP}" -TEMP_FILE="/tmp/new_sshd_config_${TIMESTAMP}" - -# Modify config file to disable password authentication, redirect to a temp file -# TODO: disable only if enabled! -sed "s/^PasswordAuthentication yes$/PasswordAuthentication no/g" ${CONFIG_FILE} > ${TEMP_FILE} - -# Secure the file by changing permissions (600) -chmod 600 ${TEMP_FILE} - -# Take backup of config file -cp ${CONFIG_FILE} ${BACKUP_FILE} - -# Overwrite config file with the modified one -mv ${TEMP_FILE} ${CONFIG_FILE} - -# Re-start ssh daemon -/etc/init.d/sshd restart - diff --git a/src/com.gluster.storage.management.gateway.scripts/src/backend/format_device.py b/src/com.gluster.storage.management.gateway.scripts/src/backend/format_device.py deleted file mode 100755 index e41baa0e..00000000 --- a/src/com.gluster.storage.management.gateway.scripts/src/backend/format_device.py +++ /dev/null @@ -1,93 +0,0 @@ -#!/usr/bin/python -# Copyright (C) 2010 Gluster, Inc. <http://www.gluster.com> -# This file is part of Gluster Storage Platform. -# -# Gluster Storage Platform is free software; you can redistribute it -# and/or modify it under the terms of the GNU General Public License -# as published by the Free Software Foundation; either version 3 of -# the License, or (at your option) any later version. -# -# Gluster Storage Platform is distributed in the hope that it will be -# useful, but WITHOUT ANY WARRANTY; without even the implied warranty -# of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -# GNU General Public License for more details. -# -# You should have received a copy of the GNU General Public License -# along with this program. If not, see -# <http://www.gnu.org/licenses/>. - -import os -import sys -p1 = os.path.abspath(os.path.dirname(sys.argv[0])) -p2 = "%s/common" % os.path.dirname(p1) -if not p1 in sys.path: - sys.path.append(p1) -if not p2 in sys.path: - sys.path.append(p2) -import Globals -import Utils -import DiskUtils -from optparse import OptionParser - - -def main(): - if Utils.runCommand("wget -t 1 -T 1 -q -O /dev/null %s" % Globals.AWS_WEB_SERVICE_URL) == 0: - sys.stderr.write("format device unsupported") - sys.exit(1) - - parser = OptionParser() - parser.add_option("-t", "--type", action="store", type="string", dest="fstype") - (options, args) = parser.parse_args() - - if len(args) != 1: - sys.stderr.write("usage: %s [-t FSTYPE] DEVICE_NAME\n" % os.path.basename(sys.argv[0])) - sys.exit(-1) - - device = DiskUtils.getDevice(args[0]) - deviceFormatLockFile = Utils.getDeviceFormatLockFile(device) - deviceFormatStatusFile = Utils.getDeviceFormatStatusFile(device) - deviceFormatOutputFile = Utils.getDeviceFormatOutputFile(device) - - if DiskUtils.isDataDiskPartitionFormatted(device): - sys.stderr.write("Device already formatted\n") - sys.exit(2) - - if os.path.exists(deviceFormatStatusFile): - Utils.log("format status file %s exists" % deviceFormatStatusFile) - try: - fp = open(deviceFormatStatusFile) - line = fp.read() - fp.close() - if line.strip().upper() == "COMPLETED": - sys.stderr.write("Device already formatted\n") - sys.exit(3) - else: - sys.stderr.write("Device format already running\n") - sys.exit(4) - except IOError, e: - Utils.log("failed to read format status file %s: %s" % (deviceFormatStatusFile, str(e))) - sys.stderr.write("%s\n" % str(e)) - sys.exit(-2) - - if os.path.exists(deviceFormatLockFile): - Utils.log("lock file %s exists" % deviceFormatLockFile) - sys.stderr.write("Device format already running\n") - sys.exit(5) - - if options.fstype: - command = ["%s/gluster_provision_block_wrapper.py" % p1, "-t", "%s" % (options.fstype), "%s" % (device)] - else: - command = ["%s/gluster_provision_block_wrapper.py" % p1, "%s" % (device)] - - try: - pid = os.fork() - except OSError, e: - Utils.log("failed to fork a child process: %s" % str(e)) - sys.exit(6) - if pid == 0: - os.execv(command[0], command) - sys.exit(0) - - -if __name__ == "__main__": - main() diff --git a/src/com.gluster.storage.management.gateway.scripts/src/backend/get_brick_status.py b/src/com.gluster.storage.management.gateway.scripts/src/backend/get_brick_status.py deleted file mode 100755 index afc15f3a..00000000 --- a/src/com.gluster.storage.management.gateway.scripts/src/backend/get_brick_status.py +++ /dev/null @@ -1,46 +0,0 @@ -#!/usr/bin/python -# Copyright (C) 2011 Gluster, Inc. <http://www.gluster.com> -# This file is part of Gluster Management Console. -# - -import os -import sys -p1 = os.path.abspath(os.path.dirname(sys.argv[0])) -p2 = "%s/common" % os.path.dirname(p1) -if not p1 in sys.path: - sys.path.append(p1) -if not p2 in sys.path: - sys.path.append(p2) -import Utils - -def main(): - if len(sys.argv) != 3: - sys.stderr.write("usage: %s VOLUME_NAME BRICK_NAME\n" % os.path.basename(sys.argv[0])) - sys.exit(-1) - - volumeName = sys.argv[1] - brickName = sys.argv[2] - pidFile = "/etc/glusterd/vols/%s/run/%s.pid" % (volumeName, brickName.replace(":", "").replace("/", "-")) - - if not os.path.exists(pidFile): - print "OFFLINE" - else: - try: - fp = open(pidFile) - pidString = fp.readline() - fp.close() - os.getpgid(int(pidString)) - print "ONLINE" - except IOError, e: - Utils.log("failed to open file %s: %s" % (pidFile, str(e))) - print "UNKNOWN" - except ValueError, e: - Utils.log("invalid pid %s in file %s: %s" % (pidString, pidFile, str(e))) - print "UNKNOWN" - except OSError, e: - #Utils.log("failed to get process detail of pid %s: %s" % (pidString, str(e))) - print "OFFLINE" - sys.exit(0) - -if __name__ == "__main__": - main() diff --git a/src/com.gluster.storage.management.gateway.scripts/src/backend/get_disk_mount_point.py b/src/com.gluster.storage.management.gateway.scripts/src/backend/get_disk_mount_point.py deleted file mode 100755 index cf966fec..00000000 --- a/src/com.gluster.storage.management.gateway.scripts/src/backend/get_disk_mount_point.py +++ /dev/null @@ -1,56 +0,0 @@ -#!/usr/bin/python -# Copyright (C) 2011 Gluster, Inc. <http://www.gluster.com> -# This file is part of Gluster Management Gateway. -# - -import os -import sys -p1 = os.path.abspath(os.path.dirname(sys.argv[0])) -p2 = "%s/common" % os.path.dirname(p1) -if not p1 in sys.path: - sys.path.append(p1) -if not p2 in sys.path: - sys.path.append(p2) -import Utils -import FsTabUtils -from XmlHandler import ResponseXml - - -def getmountpoint(path): - if not path: - Utils.log("Not a valid path:%s" % path) - rs.appendTagRoute("status.code", "-1") - rs.appendTagRoute("status.message", "Error: given path name is empty") - return rs.toprettyxml() - - rs = ResponseXml() - mountPoint = None - - for line in FsTabUtils.readFsTab(): - if path.startswith(line['MountPoint']): - if not mountPoint: - mountPoint = line['MountPoint'] - if len(line['MountPoint']) > len(mountPoint): - mountPoint = line['MountPoint'] - - if "/" == mountPoint or not mountPoint: - Utils.log("failed to find mount point of the given path:%s" % path) - rs.appendTagRoute("status.code", "-1") - rs.appendTagRoute("status.message", "Error: Unable to find disk mount point") - return rs.toprettyxml() - - rs.appendTagRoute("status.code", "0") - rs.appendTagRoute("status.message", mountPoint) - return rs.toprettyxml() - -def main(): - if len(sys.argv) != 2: - sys.stderr.write("usage: %s <path>\n" % os.path.basename(sys.argv[0])) - sys.exit(-1) - - path = sys.argv[1] - print getmountpoint(path) - sys.exit(0) - -if __name__ == "__main__": - main() diff --git a/src/com.gluster.storage.management.gateway.scripts/src/backend/get_disk_name_by_path.py b/src/com.gluster.storage.management.gateway.scripts/src/backend/get_disk_name_by_path.py deleted file mode 100755 index 08e80b7e..00000000 --- a/src/com.gluster.storage.management.gateway.scripts/src/backend/get_disk_name_by_path.py +++ /dev/null @@ -1,68 +0,0 @@ -#!/usr/bin/python -# Copyright (C) 2010 Gluster, Inc. <http://www.gluster.com> -# This file is part of Gluster Storage Platform. -# -# Gluster Storage Platform is free software; you can redistribute it -# and/or modify it under the terms of the GNU General Public License -# as published by the Free Software Foundation; either version 3 of -# the License, or (at your option) any later version. -# -# Gluster Storage Platform is distributed in the hope that it will be -# useful, but WITHOUT ANY WARRANTY; without even the implied warranty -# of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -# GNU General Public License for more details. -# -# You should have received a copy of the GNU General Public License -# along with this program. If not, see -# <http://www.gnu.org/licenses/>. - -import os -import Utils -from DiskUtils import * -from XmlHandler import ResponseXml - - -def getmountpoint(path): - if not path: - Utils.log("Not a valid path:%s" % path) - rs.appendTagRoute("status.code", "-1") - rs.appendTagRoute("status.message", "Error: given path name is empty") - return rs.toprettyxml() - - rs = ResponseXml() - mountPoint = None - fsTabEntry = None - for line in readFsTab(): - if path.startswith(line['MountPoint']): - if not mountPoint: - mountPoint = line['MountPoint'] - fsTabEntry = line - if len(line['MountPoint']) > len(mountPoint): - mountPoint = line['MountPoint'] - fsTabEntry = line - - if "/" == mountPoint or not mountPoint: - Utils.log("failed to find mount point of the given path:%s" % path) - rs.appendTagRoute("status.code", "-1") - rs.appendTagRoute("status.message", "Error: Unable to find disk mount point") - return rs.toprettyxml() - - rs.appendTagRoute("status.code", "0") - if fsTabEntry["Device"].startswith("UUID="): - rs.appendTagRoute("status.message", getDiskPartitionByUuid(fsTabEntry["Device"].split("UUID=")[-1])) - else: - rs.appendTagRoute("status.message", "Unable to find disk name") - return rs.toprettyxml() - -def main(): - if len(sys.argv) != 2: - sys.stderr.write("usage: %s <path>\n" % os.path.basename(sys.argv[0])) - sys.exit(-1) - - path = sys.argv[1] - print getmountpoint(path) - sys.exit(0) - -if __name__ == "__main__": - main() - diff --git a/src/com.gluster.storage.management.gateway.scripts/src/backend/get_file.py b/src/com.gluster.storage.management.gateway.scripts/src/backend/get_file.py deleted file mode 100755 index 61c33eba..00000000 --- a/src/com.gluster.storage.management.gateway.scripts/src/backend/get_file.py +++ /dev/null @@ -1,130 +0,0 @@ -# Copyright (C) 2009,2010 Gluster, Inc. <http://www.gluster.com> -# This file is part of Gluster Storage Platform. -# -# Gluster Storage Platform is free software; you can redistribute it -# and/or modify it under the terms of the GNU General Public License -# as published by the Free Software Foundation; either version 3 of -# the License, or (at your option) any later version. -# -# Gluster Storage Platform is distributed in the hope that it will be -# useful, but WITHOUT ANY WARRANTY; without even the implied warranty -# of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -# GNU General Public License for more details. -# -# You should have received a copy of the GNU General Public License -# along with this program. If not, see -# <http://www.gnu.org/licenses/>. - -import Globals -import Utils -from VolumeUtils import * -from XmlHandler import ResponseXml - - -def enumLogType(logCode): - if "M" == logCode.upper(): - return "EMERGENCY" - elif "A" == logCode.upper(): - return "ALERT" - elif "C" == logCode.upper(): - return "CRITICAL" - elif "E" == logCode.upper(): - return "ERROR" - elif "W" == logCode.upper(): - return "WARNING" - elif "N" == logCode.upper(): - return "NOTICE" - elif "I" == logCode.upper(): - return "INFO" - elif "D" == logCode.upper(): - return "DEBUG" - elif "T" == logCode.upper(): - return "TRACE" - else: - return "UNKNOWN" -##--end of enumLogType() - - -def addLog(responseDom, logMessageTag, loginfo): - logTag = responseDom.createTag("log", None) - logTag.appendChild(responseDom.createTag("date", loginfo[0])) - logTag.appendChild(responseDom.createTag("time", loginfo[1])) - logTag.appendChild(responseDom.createTag("type", enumLogType(loginfo[2]))) - logTag.appendChild(responseDom.createTag("message", loginfo[3])) - logMessageTag.appendChild(logTag) - return True -##--end of addLog() - - -def logSplit(log): - loginfo = log.strip().split(None, 3) - loginfo[0] = loginfo[0][1:] #-- Remove '[' - loginfo[1] = loginfo[1][0:-1] #-- Remove ']' - return loginfo -##--end of logSplit() - - -def getVolumeLog(volumeName, tailCount): - rs = ResponseXml() - if not volumeName: - rs.appendTagRoute("status.code", "-1") - rs.appendTagRoute("status.message", "No volume name given") - return rs.toprettyxml() - - if not tailCount: - rs.appendTagRoute("status.code", "-1") - rs.appendTagRoute("status.message", "No tail count given") - return rs.toprettyxml() - - thisServerName = getCurrentServerName() - if not thisServerName: - rs.appendTagRoute("status.code", "-2") - rs.appendTagRoute("status.message", "Failed to get current server name") - return rs.toprettyxml() - - volumeDom = XDOM() - partitionList = getPartitionListByServerName(volumeDom, thisServerName) - if not partitionList: - rs.appendTagRoute("status.code", "-3") - rs.appendTagRoute("status.message", "Failed to get server partition details") - return rs.toprettyxml() - - pattern = '\[\d{4}-\d{2}-\d{2}\s{1}\d{2}:\d{2}:\d{2}.\d+\]\s{1}([MACEWNIDT]){1}\s+' - logMessagesTag = rs.createTag("response.logMessages") - for partitionName in partitionList: - logMessageTag = rs.createTag("logMessage") - logMessageTag.appendChild("disk", "%s:%s" % (thisServerName, partitionName)) - - logDirectory = "%s/%s/%s/log" % (Globals.GLUSTER_LUN_DIR, partitionList[partitionName], volumeUuid) - logFileName = "%s/%s-%s-%s-exports-brick1.log" % (logDirectory, - Globals.GLUSTER_LUN_DIR[1:], - partitionList[partitionName], - volumeUuid) - if not os.path.exists(logFileName): - Utils.log("volume log file not found %s" % logFileName) - continue - fp = open(logFileName) - lines = [line for line in fp if re.match(pattern, line)] - fp.close() - i = len(lines) - int(tailCount) - if i < 0: - i = 0 - for log in lines[i:]: - loginfo = logSplit(log) - addLog(rs, logMessageTag, loginfo) - logMessagesTag.appendChild(logMessageTag) - return rs.toprettyxml() -##--end of getVolumeLog() - -def main(): - if len(sys.argv) != 3: - print >> sys.stderr, "usage: %s <disk name> <volume name>" % sys.argv[0] - sys.exit(-1) - - volumeName = sys.argv[1] - tailCount = sys.argv[2] - print getVolumeLog(volumeName, tailCount) - sys.exit(0) - -if __name__ == "__main__": - main() diff --git a/src/com.gluster.storage.management.gateway.scripts/src/backend/get_server_details.py b/src/com.gluster.storage.management.gateway.scripts/src/backend/get_server_details.py deleted file mode 100755 index 2b353f2a..00000000 --- a/src/com.gluster.storage.management.gateway.scripts/src/backend/get_server_details.py +++ /dev/null @@ -1,132 +0,0 @@ -#!/usr/bin/python -# Copyright (C) 2009 Gluster, Inc. <http://www.gluster.com> -# This file is part of Gluster Storage Platform. -# -# Gluster Storage Platform is free software; you can redistribute it -# and/or modify it under the terms of the GNU General Public License -# as published by the Free Software Foundation; either version 3 of -# the License, or (at your option) any later version. -# -# Gluster Storage Platform is distributed in the hope that it will be -# useful, but WITHOUT ANY WARRANTY; without even the implied warranty -# of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -# GNU General Public License for more details. -# -# You should have received a copy of the GNU General Public License -# along with this program. If not, see -# <http://www.gnu.org/licenses/>. - -import os -import sys -p1 = os.path.abspath(os.path.dirname(sys.argv[0])) -p2 = "%s/common" % os.path.dirname(p1) -if not p1 in sys.path: - sys.path.append(p1) -if not p2 in sys.path: - sys.path.append(p2) -import dbus -import socket -import re -import Utils -import DiskUtils -from NetworkUtils import * -from Disk import * -from XmlHandler import ResponseXml -from optparse import OptionParser - - -def getServerDetails(listall): - serverName = Utils.getServerFqdn() - meminfo = getMeminfo() - cpu = getCpuUsageAvg() - nameServerList, domain, searchDomain = readResolvConfFile() - if not domain: - domain = [None] - - responseDom = ResponseXml() - serverTag = responseDom.appendTagRoute("server") - serverTag.appendChild(responseDom.createTag("name", serverName)) - serverTag.appendChild(responseDom.createTag("domainname", domain[0])) - if Utils.runCommand("pidof glusterd") == 0: - serverTag.appendChild(responseDom.createTag("status", "ONLINE")) - else: - serverTag.appendChild(responseDom.createTag("status", "OFFLINE")) - serverTag.appendChild(responseDom.createTag("glusterFsVersion", Utils.getGlusterVersion())) - serverTag.appendChild(responseDom.createTag("cpuUsage", str(cpu))) - serverTag.appendChild(responseDom.createTag("totalMemory", str(convertKbToMb(meminfo['MemTotal'])))) - serverTag.appendChild(responseDom.createTag("memoryInUse", str(convertKbToMb(meminfo['MemUsed'])))) - serverTag.appendChild(responseDom.createTag("uuid", None)) - - for dns in nameServerList: - serverTag.appendChild(responseDom.createTag("dns%s" % str(nameServerList.index(dns) +1) , dns)) - - #TODO: probe and retrieve timezone, ntp-server details and update the tags - - deviceList = {} - interfaces = responseDom.createTag("networkInterfaces", None) - for device in getNetDeviceList(): - if device["model"] in ['LOCAL', 'IPV6-IN-IPV4']: - continue - deviceList[device["device"]] = device - try: - macAddress = open("/sys/class/net/%s/address" % device["device"]).read().strip() - except IOError: - continue - interfaceTag = responseDom.createTag("networkInterface", None) - interfaceTag.appendChild(responseDom.createTag("name", device["device"])) - interfaceTag.appendChild(responseDom.createTag("hwAddr",macAddress)) - interfaceTag.appendChild(responseDom.createTag("speed", device["speed"])) - interfaceTag.appendChild(responseDom.createTag("model", device["model"])) - if deviceList[device["device"]]: - if deviceList[device["device"]]["onboot"]: - interfaceTag.appendChild(responseDom.createTag("onboot", "yes")) - else: - interfaceTag.appendChild(responseDom.createTag("onBoot", "no")) - interfaceTag.appendChild(responseDom.createTag("bootProto", deviceList[device["device"]]["bootproto"])) - interfaceTag.appendChild(responseDom.createTag("ipAddress", deviceList[device["device"]]["ipaddr"])) - interfaceTag.appendChild(responseDom.createTag("netMask", deviceList[device["device"]]["netmask"])) - interfaceTag.appendChild(responseDom.createTag("defaultGateway", deviceList[device["device"]]["gateway"])) - if deviceList[device["device"]]["mode"]: - interfaceTag.appendChild(responseDom.createTag("mode", deviceList[device["device"]]["mode"])) - if deviceList[device["device"]]["master"]: - interfaceTag.appendChild(responseDom.createTag("bonding", "yes")) - spliter = re.compile(r'[\D]') - interfaceTag.appendChild(responseDom.createTag("bondid", spliter.split(device["master"])[-1])) - else: - interfaceTag.appendChild(responseDom.createTag("onBoot", "no")) - interfaceTag.appendChild(responseDom.createTag("bootProto", "none")) - interfaces.appendChild(interfaceTag) - serverTag.appendChild(interfaces) - - responseDom.appendTag(serverTag) - serverTag.appendChild(responseDom.createTag("numOfCPUs", int(os.sysconf('SC_NPROCESSORS_ONLN')))) - - try: - diskDom = DiskUtils.getDiskDom() - except dbus.dbus_bindings.DBusException, e: - sys.stderr.write("%s. Please check if HAL services are running\n" % str(e)) - Utils.log("failed to get disk details :%s" % str(e)) - sys.exit(1) - if not diskDom: - sys.stderr.write("No disk found!") - Utils.log("Failed to get disk details") - sys.exit(2) - - serverTag.appendChild(diskDom.getElementsByTagRoute("disks")[0]) - return serverTag - -def main(): - parser = OptionParser() - parser.add_option("-N", "--only-data-disks", - action="store_false", dest="listall", default=True, - help="List only data disks") - - (options, args) = parser.parse_args() - responseXml = getServerDetails(options.listall) - if responseXml: - print responseXml.toxml() - - sys.exit(0) - -if __name__ == "__main__": - main() diff --git a/src/com.gluster.storage.management.gateway.scripts/src/backend/get_server_status.py b/src/com.gluster.storage.management.gateway.scripts/src/backend/get_server_status.py deleted file mode 100755 index 2814f10f..00000000 --- a/src/com.gluster.storage.management.gateway.scripts/src/backend/get_server_status.py +++ /dev/null @@ -1,28 +0,0 @@ -#!/usr/bin/python -# Copyright (C) 2011 Gluster, Inc. <http://www.gluster.com> -# This file is part of Gluster Management Console. -# - -import os -import sys -p1 = os.path.abspath(os.path.dirname(sys.argv[0])) -p2 = "%s/common" % os.path.dirname(p1) -if not p1 in sys.path: - sys.path.append(p1) -if not p2 in sys.path: - sys.path.append(p2) -import Utils - -def main(): - if len(sys.argv) != 1: - sys.stderr.write("usage: %s\n" % os.path.basename(sys.argv[0])) - sys.exit(-1) - - if Utils.runCommand("pidof glusterd") == 0: - print "ONLINE" - else: - print "OFFLINE" - sys.exit(0) - -if __name__ == "__main__": - main() diff --git a/src/com.gluster.storage.management.gateway.scripts/src/backend/get_volume_log.py b/src/com.gluster.storage.management.gateway.scripts/src/backend/get_volume_log.py deleted file mode 100755 index f388aa4e..00000000 --- a/src/com.gluster.storage.management.gateway.scripts/src/backend/get_volume_log.py +++ /dev/null @@ -1,138 +0,0 @@ -# Copyright (C) 2009,2010 Gluster, Inc. <http://www.gluster.com> -# This file is part of Gluster Storage Platform. -# -# Gluster Storage Platform is free software; you can redistribute it -# and/or modify it under the terms of the GNU General Public License -# as published by the Free Software Foundation; either version 3 of -# the License, or (at your option) any later version. -# -# Gluster Storage Platform is distributed in the hope that it will be -# useful, but WITHOUT ANY WARRANTY; without even the implied warranty -# of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -# GNU General Public License for more details. -# -# You should have received a copy of the GNU General Public License -# along with this program. If not, see -# <http://www.gnu.org/licenses/>. - -import os -import sys -p1 = os.path.abspath(os.path.dirname(sys.argv[0])) -p2 = "%s/common" % os.path.dirname(p1) -if not p1 in sys.path: - sys.path.append(p1) -if not p2 in sys.path: - sys.path.append(p2) -import Globals -import Utils -from VolumeUtils import * -from XmlHandler import ResponseXml - - -def enumLogType(logCode): - if "M" == logCode.upper(): - return "EMERGENCY" - elif "A" == logCode.upper(): - return "ALERT" - elif "C" == logCode.upper(): - return "CRITICAL" - elif "E" == logCode.upper(): - return "ERROR" - elif "W" == logCode.upper(): - return "WARNING" - elif "N" == logCode.upper(): - return "NOTICE" - elif "I" == logCode.upper(): - return "INFO" - elif "D" == logCode.upper(): - return "DEBUG" - elif "T" == logCode.upper(): - return "TRACE" - else: - return "UNKNOWN" -##--end of enumLogType() - - -def addLog(responseDom, logMessageTag, loginfo): - logTag = responseDom.createTag("log", None) - logTag.appendChild(responseDom.createTag("date", loginfo[0])) - logTag.appendChild(responseDom.createTag("time", loginfo[1])) - logTag.appendChild(responseDom.createTag("type", enumLogType(loginfo[2]))) - logTag.appendChild(responseDom.createTag("message", loginfo[3])) - logMessageTag.appendChild(logTag) - return True -##--end of addLog() - - -def logSplit(log): - loginfo = log.strip().split(None, 3) - loginfo[0] = loginfo[0][1:] #-- Remove '[' - loginfo[1] = loginfo[1][0:-1] #-- Remove ']' - return loginfo -##--end of logSplit() - - -def getVolumeLog(volumeName, tailCount): - rs = ResponseXml() - if not volumeName: - rs.appendTagRoute("status.code", "-1") - rs.appendTagRoute("status.message", "No volume name given") - return rs.toprettyxml() - - if not tailCount: - rs.appendTagRoute("status.code", "-1") - rs.appendTagRoute("status.message", "No tail count given") - return rs.toprettyxml() - - thisServerName = getCurrentServerName() - if not thisServerName: - rs.appendTagRoute("status.code", "-2") - rs.appendTagRoute("status.message", "Failed to get current server name") - return rs.toprettyxml() - - volumeDom = XDOM() - partitionList = getPartitionListByServerName(volumeDom, thisServerName) - if not partitionList: - rs.appendTagRoute("status.code", "-3") - rs.appendTagRoute("status.message", "Failed to get server partition details") - return rs.toprettyxml() - - pattern = '\[\d{4}-\d{2}-\d{2}\s{1}\d{2}:\d{2}:\d{2}.\d+\]\s{1}([MACEWNIDT]){1}\s+' - logMessagesTag = rs.createTag("response.logMessages") - for partitionName in partitionList: - logMessageTag = rs.createTag("logMessage") - logMessageTag.appendChild("disk", "%s:%s" % (thisServerName, partitionName)) - - logDirectory = "%s/%s/%s/log" % (Globals.GLUSTER_LUN_DIR, partitionList[partitionName], volumeUuid) - logFileName = "%s/%s-%s-%s-exports-brick1.log" % (logDirectory, - Globals.GLUSTER_LUN_DIR[1:], - partitionList[partitionName], - volumeUuid) - if not os.path.exists(logFileName): - Utils.log("volume log file not found %s" % logFileName) - continue - fp = open(logFileName) - lines = [line for line in fp if re.match(pattern, line)] - fp.close() - i = len(lines) - int(tailCount) - if i < 0: - i = 0 - for log in lines[i:]: - loginfo = logSplit(log) - addLog(rs, logMessageTag, loginfo) - logMessagesTag.appendChild(logMessageTag) - return rs.toprettyxml() -##--end of getVolumeLog() - -def main(): - if len(sys.argv) != 3: - print >> sys.stderr, "usage: %s <disk name> <volume name>" % sys.argv[0] - sys.exit(-1) - - volumeName = sys.argv[1] - tailCount = sys.argv[2] - print getVolumeLog(volumeName, tailCount) - sys.exit(0) - -if __name__ == "__main__": - main() diff --git a/src/com.gluster.storage.management.gateway.scripts/src/backend/gluster_provision_block_wrapper.py b/src/com.gluster.storage.management.gateway.scripts/src/backend/gluster_provision_block_wrapper.py deleted file mode 100755 index 849bce3f..00000000 --- a/src/com.gluster.storage.management.gateway.scripts/src/backend/gluster_provision_block_wrapper.py +++ /dev/null @@ -1,115 +0,0 @@ -#!/usr/bin/python -# Copyright (C) 2010 Gluster, Inc. <http://www.gluster.com> -# This file is part of Gluster Storage Platform. -# -# Gluster Storage Platform is free software; you can redistribute it -# and/or modify it under the terms of the GNU General Public License -# as published by the Free Software Foundation; either version 3 of -# the License, or (at your option) any later version. -# -# Gluster Storage Platform is distributed in the hope that it will be -# useful, but WITHOUT ANY WARRANTY; without even the implied warranty -# of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -# GNU General Public License for more details. -# -# You should have received a copy of the GNU General Public License -# along with this program. If not, see -# <http://www.gnu.org/licenses/>. - -import os -import sys -p1 = os.path.abspath(os.path.dirname(sys.argv[0])) -p2 = "%s/common" % os.path.dirname(p1) -if not p1 in sys.path: - sys.path.append(p1) -if not p2 in sys.path: - sys.path.append(p2) -import subprocess -import Utils -import DiskUtils -from optparse import OptionParser - -def writeStatus(deviceFormatStatusFile, message): - try: - fp = open(deviceFormatStatusFile, "w") - fp.write(message) - fp.close() - except IOError, e: - Utils.log("Failed to update log file %s: %s" % (deviceFormatStatusFile, str(e))) - return False - return True - - -def main(): - parser = OptionParser() - parser.add_option("-t", "--type", action="store", type="string", dest="fstype") - (options, args) = parser.parse_args() - - if len(args) != 1: - sys.stderr.write("usage: %s [-t FSTYPE] DEVICE" % os.path.basename(sys.argv[0])) - sys.exit(-1) - - device = args[0] - deviceFormatLockFile = Utils.getDeviceFormatLockFile(device) - deviceFormatStatusFile = Utils.getDeviceFormatStatusFile(device) - deviceFormatOutputFile = Utils.getDeviceFormatOutputFile(device) - - if os.path.exists(deviceFormatStatusFile): - Utils.log("device format status file %s exists" % deviceFormatStatusFile) - sys.exit(1) - - if os.path.exists(deviceFormatLockFile): - Utils.log("device format lock file %s exists" % deviceFormatLockFile) - sys.exit(2) - - try: - fp = open(deviceFormatLockFile, "w") - fp.close() - except OSError, e: - Utils.log("failed to create lock file %s: %s" % (deviceFormatLockFile, str(e))) - writeStatus(deviceFormatStatusFile, "Lock file creation failed\n") - sys.exit(3) - - try: - fptr = open(deviceFormatOutputFile, 'w') - except IOError, e: - Utils.log("failed to create output file %s" % deviceFormatOutputFile) - writeStatus(deviceFormatStatusFile, "Output file creation failed\n") - Utils.removeFile(deviceFormatLockFile) - sys.exit(4) - - if options.fstype: - command = "gluster-provision-block -t %s %s" % (options.fstype, device) - else: - command = "gluster-provision-block %s" % (device) - - process = Utils.runCommandBG(command, - stdinFileObj=subprocess.PIPE, - stdoutFileObj=fptr, - stderrFileObj=subprocess.PIPE) - if process: - status = process.wait() - else: - Utils.removeFile(deviceFormatOutputFile) - Utils.removeFile(deviceFormatLockFile) - writeStatus(deviceFormatStatusFile, "Device format failed\n") - sys.exit(5) - - if status != 0: - Utils.removeFile(deviceFormatOutputFile) - Utils.removeFile(deviceFormatLockFile) - writeStatus(deviceFormatStatusFile, "Device format failed\n") - sys.exit(6) - - if Utils.runCommand("/sbin/udevtrigger") != 0: - Utils.log("failed running /sbin/udevtrigger") - - if Utils.runCommand("/usr/bin/lshal") != 0: - Utils.log("failed running /usr/bin/lshal") - writeStatus(deviceFormatStatusFile, "Completed\n") - Utils.removeFile(deviceFormatOutputFile) - Utils.removeFile(deviceFormatLockFile) - sys.exit(0) - -if __name__ == "__main__": - main() diff --git a/src/com.gluster.storage.management.gateway.scripts/src/backend/rrd_update_cpu_details.py b/src/com.gluster.storage.management.gateway.scripts/src/backend/rrd_update_cpu_details.py deleted file mode 100755 index 6ec6a1e3..00000000 --- a/src/com.gluster.storage.management.gateway.scripts/src/backend/rrd_update_cpu_details.py +++ /dev/null @@ -1,96 +0,0 @@ -#!/usr/bin/python -# Copyright (C) 2010 Gluster, Inc. <http://www.gluster.com> -# This file is part of Gluster Storage Platform. -# -# Gluster Storage Platform is free software; you can redistribute it -# and/or modify it under the terms of the GNU General Public License -# as published by the Free Software Foundation; either version 3 of -# the License, or (at your option) any later version. -# -# Gluster Storage Platform is distributed in the hope that it will be -# useful, but WITHOUT ANY WARRANTY; without even the implied warranty -# of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -# GNU General Public License for more details. -# -# You should have received a copy of the GNU General Public License -# along with this program. If not, see -# <http://www.gnu.org/licenses/>. -import os -import sys -p1 = os.path.abspath(os.path.dirname(sys.argv[0])) -p2 = "%s/common" % os.path.dirname(p1) -if not p1 in sys.path: - sys.path.append(p1) -if not p2 in sys.path: - sys.path.append(p2) -from XmlHandler import ResponseXml -import Utils - -def createMemData(file, step): - rs = ResponseXml() - command = ["rrdtool", "create", file, "--step=%s" % step, - "DS:user:COUNTER:600:0:U", - "DS:system:COUNTER:600:0:U", - "DS:idle:COUNTER:600:0:U", - "RRA:AVERAGE:0.5:1:576", - "RRA:AVERAGE:0.5:6:672", - "RRA:AVERAGE:0.5:24:732", - "RRA:AVERAGE:0.5:144:1460"] - - rv = Utils.runCommand(command, output=True, root=True) - message = Utils.stripEmptyLines(rv["Stdout"]) - if rv["Stderr"]: - error = Utils.stripEmptyLines(rv["Stderr"]) - message += "Error: [%s]" % (error) - Utils.log("failed to create RRD file for cpu usages %s" % file) - rs.appendTagRoute("status.code", rv["Status"]) - rs.appendTagRoute("status.message", message) - return rs.toxml() - return None - -def updateMemData(file): - rs = ResponseXml() - user = None - system = None - idle = None - for line in open("/proc/stat").readlines(): - if line.startswith("cpu"): - cpudetails = line.split() - if "cpu" == cpudetails[0]: - user = cpudetails[1] - system = cpudetails[3] - idle = cpudetails[4] - break - - if None == user: - Utils.log("failed to fetch cpu details from /proc/stat") - rs.appendTagRoute("status.code", "-1") - rs.appendTagRoute("status.message", "failed to fetch cpu details") - return rs.toxml() - - command = ["rrdtool", "update", file, "-t", "user:system:idle", - "N:%s:%s:%s" % (user, system, idle)] - rv = Utils.runCommand(command, output=True, root=True) - if rv["Stderr"]: - error = Utils.stripEmptyLines(rv["Stderr"]) - message = "Error: [%s]" % (error) - Utils.log("failed to update cpu usage into rrd file %s" % file) - rs.appendTagRoute("status.code", rv["Status"]) - rs.appendTagRoute("status.message", message) - return rs.toxml() - return None - - -def main(): - cpuRrdFile = "/var/lib/rrd/cpu.rrd" - if not os.path.exists(cpuRrdFile): - status = createMemData(cpuRrdFile, 100) - if status: - print status - status = updateMemData(cpuRrdFile) - if status: - print status - sys.exit(0) - -if __name__ == "__main__": - main() diff --git a/src/com.gluster.storage.management.gateway.scripts/src/backend/rrd_update_memory_details.py b/src/com.gluster.storage.management.gateway.scripts/src/backend/rrd_update_memory_details.py deleted file mode 100755 index 0a30d248..00000000 --- a/src/com.gluster.storage.management.gateway.scripts/src/backend/rrd_update_memory_details.py +++ /dev/null @@ -1,96 +0,0 @@ -#!/usr/bin/python -# Copyright (C) 2010 Gluster, Inc. <http://www.gluster.com> -# This file is part of Gluster Storage Platform. -# -# Gluster Storage Platform is free software; you can redistribute it -# and/or modify it under the terms of the GNU General Public License -# as published by the Free Software Foundation; either version 3 of -# the License, or (at your option) any later version. -# -# Gluster Storage Platform is distributed in the hope that it will be -# useful, but WITHOUT ANY WARRANTY; without even the implied warranty -# of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -# GNU General Public License for more details. -# -# You should have received a copy of the GNU General Public License -# along with this program. If not, see -# <http://www.gnu.org/licenses/>. -import os -import sys -p1 = os.path.abspath(os.path.dirname(sys.argv[0])) -p2 = "%s/common" % os.path.dirname(p1) -if not p1 in sys.path: - sys.path.append(p1) -if not p2 in sys.path: - sys.path.append(p2) -from XmlHandler import ResponseXml -import Utils - -def createMemData(file, step): - rs = ResponseXml() - command = ["rrdtool", "create", file, "--step=%s" % step, - "DS:memused:ABSOLUTE:600:0:U", - "DS:memfree:ABSOLUTE:600:0:U", - "DS:memcache:ABSOLUTE:600:0:U", - "DS:swapused:ABSOLUTE:600:0:U", - "DS:swapfree:ABSOLUTE:600:0:U", - "RRA:AVERAGE:0.5:1:576", - "RRA:AVERAGE:0.5:6:672", - "RRA:AVERAGE:0.5:24:732", - "RRA:AVERAGE:0.5:144:1460"] - - rv = Utils.runCommand(command, output=True, root=True) - message = Utils.stripEmptyLines(rv["Stdout"]) - if rv["Stderr"]: - error = Utils.stripEmptyLines(rv["Stderr"]) - message += "Error: [%s]" % (error) - Utils.log("failed to create RRD file for memory usages %s" % file) - rs.appendTagRoute("status.code", rv["Status"]) - rs.appendTagRoute("status.message", message) - return rs.toxml() - return None - -def updateMemData(file): - rs = ResponseXml() - command = ["free", "-b", "-o"] - rv = Utils.runCommand(command, output=True, root=True) - if rv["Stderr"]: - error = Utils.stripEmptyLines(rv["Stderr"]) - message += "Error: [%s]" % (error) - Utils.log("failed to retrieve memory details") - rs.appendTagRoute("status.code", rv["Status"]) - rs.appendTagRoute("status.message", message) - return rs.toxml() - - message = rv["Stdout"].split() - command = ["rrdtool", "update", file, "-t", "memused:memfree:memcache:swapused:swapfree", - "N:%s:%s:%s:%s:%s" % (message[8], message[9], message[12], message[14], message[15])] - rv = Utils.runCommand(command, output=True, root=True) - if rv["Stderr"]: - error = Utils.stripEmptyLines(rv["Stderr"]) - message += "Error: [%s]" % (error) - Utils.log(syslog.LOG_ERR, "failed to update memory usage into rrd file %s" % file) - rs.appendTagRoute("status.code", rv["Status"]) - rs.appendTagRoute("status.message", message) - return rs.toxml() - return None - - -def main(): - #if len(sys.argv) != 2: - # print >> sys.stderr, "usage: %s <step>" % sys.argv[0] - # sys.exit(-1) - #step = sys.argv[1] - - memRrdFile = "mem.rrd" - if not os.path.exists(memRrdFile): - status = createMemData(memRrdFile, 100) - if status: - print status - status = updateMemData(memRrdFile) - if status: - print status - sys.exit(0) - -if __name__ == "__main__": - main() diff --git a/src/com.gluster.storage.management.gateway.scripts/src/common/Globals.py b/src/com.gluster.storage.management.gateway.scripts/src/common/Globals.py deleted file mode 100644 index cfab83b6..00000000 --- a/src/com.gluster.storage.management.gateway.scripts/src/common/Globals.py +++ /dev/null @@ -1,135 +0,0 @@ -# Copyright (C) 2010 Gluster, Inc. <http://www.gluster.com> -# This file is part of Gluster Storage Platform. -# -# Gluster Storage Platform is free software; you can redistribute it -# and/or modify it under the terms of the GNU General Public License -# as published by the Free Software Foundation; either version 3 of -# the License, or (at your option) any later version. -# -# Gluster Storage Platform is distributed in the hope that it will be -# useful, but WITHOUT ANY WARRANTY; without even the implied warranty -# of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -# GNU General Public License for more details. -# -# You should have received a copy of the GNU General Public License -# along with this program. If not, see -# <http://www.gnu.org/licenses/>. - -MULTICAST_GROUP = '224.224.1.1' -MULTICAST_PORT = 24729 -GLUSTER_PROBE_STRING = "GLUSTERPROBE" -GLUSTER_PROBE_VERSION = "1.0.0" -DEFAULT_BUFSIZE = 1024 -SERVER_PORT = 24731 -DEFAULT_BACKLOG = 5 -DEFAULT_TIMEOUT = 3 -DEFAULT_ID_LENGTH = 16 - -GLUSTER_PLATFORM_VERSION = "3.2" - -## System configuration constants -SYSCONFIG_NETWORK_DIR = "/etc/sysconfig/network-scripts" -DNSMASQ_CONF_DIR = "/etc/dnsmasq.d" - -FSTAB_FILE = "/etc/fstab" -NFS_EXPORTS_FILE = "/etc/exports" -SAMBA_CONF_FILE = "/etc/samba/smb.conf" -TIMEZONE_FILE = "/etc/timezone" -ZONEINFO_DIR = "/usr/share/zoneinfo" -LOCALTIME_FILE = "/etc/localtime" -KERBEROS_CONF_FILE = "/etc/krb5.conf" -NSSWITCH_CONF_FILE = "/etc/nsswitch.conf" -NTP_CONF_FILE = "/etc/ntp.conf" -MODPROBE_CONF_FILE = "/etc/modprobe.d/bonding.conf" -SYSCONFIG_NETWORK_FILE = "/etc/sysconfig/network" -RESOLV_CONF_FILE = "/etc/resolv.conf" -DNSMASQ_LEASE_FILE = "/var/tmp/dnsmasq.leases" -LIVE_MODE_FILE = "/etc/live" -ADD_SERVER_COMPLETED_FILE = "/var/tmp/installation-completed" - -DNSMASQ_DNS_CONF_FILE = DNSMASQ_CONF_DIR + "/dns.conf" -DNSMASQ_DHCP_CONF_FILE = DNSMASQ_CONF_DIR + "/dhcp.conf" -## - -## Base constants -MAX_PARTITION_SIZE = 16777216 # 16 TB -OS_PARTITION_SIZE = 4000 # 4 GB -SESSION_TIMEOUT = 1800 # 30 minutes -SERVER_AGENT_PORT = 50000 - -BOOT_PARTITION_LABEL = "GLUSTEROS" -DATA_PARTITION_LABEL = "GLUSTERDATA" -VOLUME_USER_DESCRIPTION = "Gluster Volume User" -SERVER_AGENT_RUN_USERNAME = "gluster" -INSTALLER_SERVER_NAME = "$installer$" - -GLUSTER_BASE_DIR = "/etc/glustermg" -GLUSTER_LUN_DIR = "/data" -REEXPORT_DIR = "/reexport" -NFS_EXPORT_DIR = "/nfs" -CIFS_EXPORT_DIR = "/cifs" -WEBDAV_DOCUMENT_ROOT_DIR = "/var/www/html" -UPDATES_DIR = "/UPDATES" -TRANSPORT_HOME_DIR = "/transport" -GLUSTERFS_LOG_DIR = "/var/log/glusterfs" -LOG_DIR = "/var/log/glustermg" - -GLUSTER_UPDATES_FILE = "updates.xml" -INSTALLER_STATUS_FILE = "/var/log/install-server-status.log" -INSTALL_PLATFORM_LOCK_FILE = "/var/lock/install-gluster-platform.lock" -LAST_ACCESSED_NETWORK_FILE = "last-accessed-network" -PREPARE_DATA_DISK_LOCK_FILE = "/var/tmp/prepare-data-disk.lock" -## - -## Derived constants -GLUSTER_CONF_DIR = GLUSTER_BASE_DIR + "/conf" -GLUSTER_TMP_DIR = GLUSTER_BASE_DIR + "/tmp" -VOLUME_CONF_DIR = GLUSTER_BASE_DIR + "/volumes" -SERVER_CONF_DIR = GLUSTER_BASE_DIR + "/servers" -DNS_RECORDS_DIR = GLUSTER_BASE_DIR + "/dns-records" -INSTALLER_CONF_DIR = SERVER_CONF_DIR + "/" + INSTALLER_SERVER_NAME - -GSN_USER_INFO_FILE = GLUSTER_BASE_DIR + "/gsn-user.info" -GLUSTER_VERSION_FILE = GLUSTER_BASE_DIR + "/version" -GLUSTER_UPDATE_SITE_FILE = GLUSTER_BASE_DIR + "/update-site" -GLUSTER_DIRECTORY_SERVICE_CONF_FILE = GLUSTER_BASE_DIR + "/directory.xml" -GLUSTER_TIME_CONF_FILE = GLUSTER_BASE_DIR + "/timeconfig.xml" -TRANSACTION_KEY_FILE = GLUSTER_BASE_DIR + "/transaction.key" -SERVER_COUNT_FILE = GLUSTER_BASE_DIR + "/server-count" -SIGNATURE_FILE = GLUSTER_BASE_DIR + "/.signature" -GLUSTER_SERVER_POOL_FILE = GLUSTER_BASE_DIR + "/pool" -GLUSTER_ADMIN_FILE = GLUSTER_BASE_DIR + "/.password" - -VOLUME_SMBCONF_FILE = VOLUME_CONF_DIR + "/volumes.smbconf.list" - -GLOBAL_NETWORK_FILE = INSTALLER_CONF_DIR + "/network.xml" -INSTALL_SERVER_CONF_FILE = INSTALLER_CONF_DIR + "/installer.xml" -INSTALLER_INFO_FILE = INSTALLER_CONF_DIR + "/installer.info" -INSTALLED_SERVER_COUNT_FILE = INSTALLER_CONF_DIR + "/installed-server-count" - -SESSION_FILE = GLUSTER_TMP_DIR + "/login.sessions" - -GENERAL_LOG_FILE = LOG_DIR + "/general.log" -INSTALLER_LOG_FILE = LOG_DIR + "/installer.log" -PEER_AGENT_LOG_FILE = LOG_DIR + "/peeragent.log" -SERVER_AGENT_LOG_FILE = LOG_DIR + "/serveragent.log" -TRANSPORT_AGENT_LOG_FILE = LOG_DIR + "/transport.log" -## - - -## Global variables -## TODO: These should be removed -DOWNLOAD_GLUSTER_UPDATE_PROCESS = None -DOWNLOAD_GLUSTER_UPDATE_LEVEL = None -DOWNLOAD_GLUSTER_CURRENT_UPDATE_LEVEL = None -DOWNLOAD_GLUSTER_UPDATE_MD5SUM = None -REQUEST_MAP = {} -VERSION_DICTONARY = {} -## - -AWS_WEB_SERVICE_URL = "http://169.254.169.254/latest" -REAL_SAMBA_CONF_FILE = "/etc/samba/real.smb.conf" - -DEFAULT_UID = 1024000 -CIFS_USER_FILE = "/opt/glustermg/etc/users.cifs" -CIFS_VOLUME_FILE = "/opt/glustermg/etc/volumes.cifs" diff --git a/src/com.gluster.storage.management.gateway.scripts/src/common/Protocol.py b/src/com.gluster.storage.management.gateway.scripts/src/common/Protocol.py deleted file mode 100644 index ff073593..00000000 --- a/src/com.gluster.storage.management.gateway.scripts/src/common/Protocol.py +++ /dev/null @@ -1,438 +0,0 @@ -# Copyright (C) 2009 Gluster, Inc. <http://www.gluster.com> -# This file is part of Gluster Storage Platform. -# -# Gluster Storage Platform is free software; you can redistribute it -# and/or modify it under the terms of the GNU General Public License -# as published by the Free Software Foundation; either version 3 of -# the License, or (at your option) any later version. -# -# Gluster Storage Platform is distributed in the hope that it will be -# useful, but WITHOUT ANY WARRANTY; without even the implied warranty -# of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -# GNU General Public License for more details. -# -# You should have received a copy of the GNU General Public License -# along with this program. If not, see -# <http://www.gnu.org/licenses/>. - -import xml -import xml.parsers.expat -import xml.dom.minidom as MDOM -import os -import Globals -import copy -import Utils - -XML_STRING = 0 -XML_FILE = 1 - -class XDOM: - _domObj = None - - def __init__(self): - self._domObj = MDOM.Document() - return - - @classmethod - def getText(self, nodeList): - rc = "" - for node in nodeList: - if node.nodeType == node.TEXT_NODE: - rc = rc + node.data - return rc.strip() - - def parseString(self, requestString): - try: - self._domObj = MDOM.parseString(requestString) - except xml.parsers.expat.ExpatError, e: - Utils.log("XML string parse error: %s" % str(e)) - return False - return True - - def parseFile(self, fileName): - try: - self._domObj = MDOM.parse(fileName) - except IOError, e: - Utils.log("error reading file: %s" % str(e)) - return False - except xml.parsers.expat.ExpatError, e: - Utils.log("XML file %s parse error: %s" % (fileName, str(e))) - return False - return True - - def setDomObj(self, dom): - if dom and type(dom) != type([]): - self._domObj = dom - return True - return False - - def createTextNode(self, text): - if not self._domObj: - return False - if not text: - return False - return self._domObj.createTextNode(str(text)) - - def createTag(self, tag, text=None): - if not self._domObj: - return None - if tag == None: - return None - - tagE = self._domObj.createElement(str(tag)) - if text: - tagEText = self._domObj.createTextNode(str(text)) - tagE.appendChild(tagEText) - return tagE - - def addTag(self, tag): - if not self._domObj: - return False - if not tag: - return False - - self._domObj.appendChild(tag) - return True - - def createTagRoute(self, tagRoute, text=None): - if not tagRoute: - return False - - tagList = tagRoute.split(".") - tag = None - previousTag = None - for tagName in tagList[:-1]: - newTag = self.createTag(tagName, None) - if not tag: - tag = newTag - previousTag = newTag - continue - previousTag.appendChild(newTag) - previousTag = newTag - - if previousTag: - previousTag.appendChild(self.createTag(tagList[-1], text)) - else: - tag = self.createTag(tagList[-1], text) - return tag - - def appendTagRoute(self, tagRoute, value=None): - if not self._domObj: - return False - if not tagRoute: - return False - - parentTagE = self._domObj - - tagNameList = tagRoute.split(".") - newTagRoute = tagNameList.pop(-1) - - for i in range(len(tagNameList), 0, -1): - tagE = self.getElementsByTagRoute(".".join(tagNameList[:i])) - if tagE: - parentTagE = tagE[0] - break - newTagRoute = tagNameList[i-1] + "." + newTagRoute - - newTagE = self.createTagRoute(newTagRoute, value) - if not newTagE: - return False - try: - parentTagE.appendChild(newTagE) - except xml.dom.HierarchyRequestErr, e: - Utils.log("error occured. %s" + str(e)) - return False - return True - - def setTextByTagRoute(self, tagRoute, tagValue): - if not self._domObj: - return None - - if not tagRoute: - return None - - tagE = self.getElementsByTagRoute(tagRoute) - if not tagE: - return False - - parentTagE = self.getElementsByTagRoute(".".join(tagRoute.split(".")[:-1])) - if not parentTagE: - return False - - parentTagE[0].childNodes.remove(tagE[0]) - parentTagE[0].appendChild(self.createTag(tagRoute.split(".")[-1], tagValue)) - return True - - def getElementsByTagRoute(self, tagRoute): - if not self._domObj: - return None - - if not tagRoute: - return None - - x = None - for tag in tagRoute.split("."): - if x is None: - x = self._domObj.getElementsByTagName(tag) - continue - if x == []: - break - x = x[0].getElementsByTagName(tag) - return x - - def getTextByTagRoute(self, tagRoute): - if not self._domObj: - return None - - x = self.getElementsByTagRoute(tagRoute) - if x: - return self.getText(x[0].childNodes) - return None - - def getElementsByTagName(self, name): - if not self._domObj: - return None - return self._domObj.getElementsByTagName(name) - - def writexml(self, fileName, indent="", addindent="", newl=""): - if not self._domObj: - return None - try: - fp = open(fileName, "w") - self._domObj.writexml(fp, indent, addindent, newl) - fp.close() - return True - except IOError: - return False - - def toString(self, indent=" ", newl="\n", encoding = None): - if not self._domObj: - return None - return self._domObj.toprettyxml(indent, newl, encoding) - - def toxml(self, encoding = None): - if not self._domObj: - return None - return self._domObj.toxml(encoding) - - def toprettyxml(self, indent=" ", newl="\n", encoding = None): - return self.toString(indent, newl, encoding) - - def getAttribute(self, attributeName): - if not attributeName: - return None - try: - return self.getElementsByTagName("command")[0].getAttribute(attributeName) - except IndexError: - return False - - def setAttribute(self, attributeName, attributeValue): - if not (attributeName and attributeValue): - return None - try: - return self.getElementsByTagName("command")[0].setAttribute(attributeName, attributeValue) - except IndexError: - return False - - def getRequestCommand(self): - return self.getAttribute("request") - - def getResponseCommand(self): - return self.getAttribute("response") - - def getResponseCode(self): - return self.getAttribute("response-code") - - def getMessageId(self): - return self.getAttribute("id") - - def getVersion(self): - return self.getAttribute("version") - - def getRequestAction(self): - return self.getAttribute("action") - - def setVersion(self, value): - return self.setAttribute("version", value) - - def setRequestAction(self, value): - return self.setAttribute("action", value) - - def createCommandTag(self, command, responseCode, id, version=Globals.GLUSTER_PLATFORM_VERSION): - commandTag = self._domObj.createElement("command") - commandTag.setAttribute("response", command) - commandTag.setAttribute("response-code", responseCode) - commandTag.setAttribute("id", id) - commandTag.setAttribute("version", version) - return commandTag -##--end of XDOM - -class RequestXml(XDOM): - def __init__(self, requestString, type=None): - if None == requestString: - XDOM.__init__(self) - return - try: - if None == type: - if os.path.isfile(requestString): - self._domObj = MDOM.parse(requestString) - else: - self._domObj = MDOM.parseString(requestString) - elif XML_FILE == type: - self._domObj = MDOM.parse(requestString) - elif XML_STRING == type: - self._domObj = MDOM.parseString(requestString) - except IOError: - XDOM.__init__(self) - except xml.parsers.expat.ExpatError: - XDOM.__init__(self) - -##--end of RequestXML - -class ResponseXml(XDOM): - _commandTag = None - def __init__(self, command, responseCode, id, version=Globals.GLUSTER_PLATFORM_VERSION): - XDOM.__init__(self) - if command and responseCode and id: - self._commandTag = self.createCommandTag(command, responseCode, id, version) - self._domObj.appendChild(self._commandTag) - - def appendCommand(self, command, responseCode, id, version=Globals.GLUSTER_PLATFORM_VERSION): - if command and responseCode and id: - self._commandTag = self.createCommandTag(command, responseCode, id, version) - self._domObj.appendChild(self._commandTag) - return True - return False - - def append(self, tagName, tagValue=None): - if not self._commandTag: - return False - tag = self.createTag(tagName, tagValue) - if tag: - self._commandTag.appendChild(tag) - return True - return False - - def appendTag(self, tag): - if not tag: - return False - if not self._commandTag: - return False - self._commandTag.appendChild(tag) - return True - - def appendTagRoute(self, tagRoute, value=None): - if not self._commandTag: - return False - if not tagRoute: - return False - - parentTagE = self._commandTag - - tagNameList = tagRoute.split(".") - newTagRoute = tagNameList.pop(-1) - - for i in range(len(tagNameList), 0, -1): - tagE = self.getElementsByTagRoute(".".join(["command"] + tagNameList[:i])) - if tagE: - parentTagE = tagE[0] - break - newTagRoute = tagNameList[i-1] + "." + newTagRoute - - newTagE = self.createTagRoute(newTagRoute, value) - if not newTagE: - return False - try: - parentTagE.appendChild(newTagE) - except xml.dom.HierarchyRequestErr, e: - Utils.log("error occured. %s" + str(e)) - return False - return True - - def appendTagRouteOld(self, tagRoute, value=None): - if not tagRoute: - return False - if not self._commandTag: - return False - - tmpTagRoute = "" - previousTagE = self._commandTag - tagE = None - for tagName in tagRoute.split("."): - if not tmpTagRoute: - tagE = self.getElementsByTagRoute("command." + tagName) - else: - tagE = self.getElementsByTagRoute("command." + tmpTagRoute + "." + tagName) - if not tagE: - break - if len(tagE) != 1: - return False - previousTagE = tagE[0] - if not tmpTagRoute: - tmpTagRoute = tagName - else: - tmpTagRoute = tmpTagRoute + "." + tagName - - if tmpTagRoute == tagRoute: - return False - newTagRoute = tagRoute[len(tmpTagRoute):] - if newTagRoute[0] == '.': - newTagRoute = newTagRoute[1:] - - if previousTagE.childNodes and previousTagE.childNodes[0].nodeType == previousTagE.TEXT_NODE: - return False - previousTagE.appendChild(self.createTagRoute(newTagRoute, value)) - return True -##--end of ResponseXml - -def test(): - #volumes = RequestXml(VolumeFile, XML_FILE).getElementsByTagRoute("volume-list.volume") - requestStr = '''<command request="create-volume" id="123" version="3.1"> -<volume> -<name>movies1</name> -<type>cluster mirror</type> -<start>512000</start> -<server>zresearch</server> -<vacl>192.168.20.*</vacl> -<vacl>192.168.30.*</vacl> -<nfs> -<export>no</export> -</nfs> -<cifs> -<export>no</export> -</cifs> -<webdav> -<export>no</export> -</webdav> -</volume> -</command>''' - - requestXml = RequestXml(requestStr) - print requestXml.getAttribute("") - -def test1(): - rs = ResponseXml("create-volume", "OK", "xyz") - rs.appendTagRoute("volume.detail.name", "music") - print rs.toprettyxml() - rs.append("volume", "data") - print rs.toprettyxml() - rs.appendTagRoute("volume.detail.ipaddr", "192.168.10.1") - print rs.toprettyxml() - print rs.appendTagRoute("volume.detail.ipaddr.v6", "ff:ff::ff::") - print rs.toprettyxml() - - print rs.getTextByTagRoute("command.volume.detail") - -def test2(): - rs = ResponseXml("download-volume-logs", "OK", "xyz") - te = rs.createTag("interface", None) - te.appendChild(rs.createTag("device", "DEVICE1")) - te.appendChild(rs.createTag("description", "my device one")) - rs.appendTag(te) - - te = rs.createTag("interface", None) - te.appendChild(rs.createTag("device", "DEVICE2")) - te.appendChild(rs.createTag("description", "my device two")) - rs.appendTag(te) - print rs.toprettyxml() - diff --git a/src/com.gluster.storage.management.gateway.scripts/src/common/Utils.py b/src/com.gluster.storage.management.gateway.scripts/src/common/Utils.py deleted file mode 100644 index a090eb42..00000000 --- a/src/com.gluster.storage.management.gateway.scripts/src/common/Utils.py +++ /dev/null @@ -1,1101 +0,0 @@ -# Copyright (c) 2010 Gluster, Inc. <http://www.gluster.com> -# This file is part of Gluster Storage Platform. -# -# Gluster Storage Platform is free software; you can redistribute it -# and/or modify it under the terms of the GNU General Public License -# as published by the Free Software Foundation; either version 3 of -# the License, or (at your option) any later version. -# -# Gluster Storage Platform is distributed in the hope that it will be -# useful, but WITHOUT ANY WARRANTY; without even the implied warranty -# of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -# GNU General Public License for more details. -# -# You should have received a copy of the GNU General Public License -# along with this program. If not, see -# <http://www.gnu.org/licenses/>. - -import os -import sys -p1 = os.path.abspath(os.path.dirname(sys.argv[0])) -p2 = "%s/common" % os.path.dirname(p1) -if not p1 in sys.path: - sys.path.append(p1) -if not p2 in sys.path: - sys.path.append(p2) -import re -import socket -import struct -import syslog -import subprocess -#import spwd -import time -#import uuid -import tempfile -import grp -import pwd -import inspect -from datetime import datetime -import urllib - -import Globals -import Protocol - -RUN_COMMAND_ERROR = -1024 -LOG_SYSLOG = 1 -SYSLOG_REQUIRED = False -LOG_FILE_NAME = None -LOG_FILE_OBJ = None - - -def _getLogCode(priority): - if syslog.LOG_EMERG == priority: - return "M" - elif syslog.LOG_ALERT == priority: - return "A" - elif syslog.LOG_CRIT == priority: - return "C" - elif syslog.LOG_ERR == priority: - return "E" - elif syslog.LOG_WARNING == priority: - return "W" - elif syslog.LOG_NOTICE == priority: - return "N" - elif syslog.LOG_INFO == priority: - return "I" - elif syslog.LOG_DEBUG == priority: - return "D" - else: # UNKNOWN - return "X" - - -def setLogFile(fileName): - global LOG_FILE_NAME - - if fileName: - LOG_FILE_NAME = fileName - return True - return False - - -def closeLog(): - global LOG_FILE_OBJ - global SYSLOG_REQUIRED - - if SYSLOG_REQUIRED: - syslog.closelog() - SYSLOG_REQUIRED = False - return True - - if LOG_FILE_OBJ: - try: - LOG_FILE_OBJ.close() - LOG_FILE_OBJ = None - except IOError, e: - sys.stderr.write("Failed to close file: %s\n" % e) - return False - return True - - -def openLog(fileName=None): - global LOG_FILE_NAME - global LOG_FILE_OBJ - global SYSLOG_REQUIRED - - if fileName == LOG_SYSLOG: - syslog.openlog(os.path.basename(sys.argv[0])) - SYSLOG_REQUIRED = True - return True - - if fileName: - LOG_FILE_NAME = fileName - - if not LOG_FILE_NAME: - return False - - closeLog() - - try: - LOG_FILE_OBJ = open(LOG_FILE_NAME, "a") - except IOError, e: - sys.stderr.write("Failed to open file %s: %s\n" % (LOG_FILE_NAME, e)) - return False - return True - -def record(priority, message=None): - global LOG_FILE_OBJ - global SYSLOG_REQUIRED - - stack = inspect.stack()[1] - if stack[3] == "<module>": - prefix = "%s:%s:%s" % (stack[1], stack[2], stack[3]) - else: - prefix = "%s:%s:%s()" % (stack[1], stack[2], stack[3]) - - if type(priority) == type("") or type(priority) == type(u""): - logPriority = syslog.LOG_INFO - logMessage = priority - else: - logPriority = priority - logMessage = message - - if SYSLOG_REQUIRED: - syslog.syslog(logPriority, "[%s]: %s" % (prefix, logMessage)) - return - - fp = sys.stderr - if LOG_FILE_OBJ: - fp = LOG_FILE_OBJ - - fp.write("[%s] %s [%s]: %s" % (str(datetime.now()), _getLogCode(logPriority), prefix, logMessage)) - if logMessage[-1] != '\n': - fp.write("\n") - fp.flush() - return - - -def trace(message): - if message: - log(syslog.LOG_DEBUG, message) - - -def isString(value): - return (type(value) == type("") or type(value) == type(u"")) - - -def getTempFileName(): - filedesc, filename = tempfile.mkstemp(prefix="GSP_") - os.close(filedesc) - return filename - - -def runCommandBG(command, stdinFileObj=None, stdoutFileObj=None, stderrFileObj=None, - shell=False, root=None): - log("runCommandBG(): Trying to execute command [%s]" % command) - - if shell: - if not isString(command): - return None - else: - if isString(command): - command = command.split() - - if root == True: - if shell: - command = "sudo " + command - else: - command = ['sudo'] + command - elif isString(root): - if shell: - command = "sudo -u " + root + " " + command - else: - command = ['sudo', '-u', root] + command - - if not stdinFileObj: - stdinFileObj=subprocess.PIPE - if not stdoutFileObj: - stdoutFileObj=subprocess.PIPE - if not stderrFileObj: - stderrFileObj=subprocess.PIPE - - try: - process = subprocess.Popen(command, - bufsize=-1, - stdin=stdinFileObj, - stdout=stdoutFileObj, - stderr=stderrFileObj, - shell=shell) - return process - except OSError, e: - log("runCommandBG(): Failed to run command [%s]: %s" % (command, e)) - return None - - -def runCommand(command, - input='', output=False, - shell=False, root=None): - rv = {} - rv["Status"] = RUN_COMMAND_ERROR - rv["Stdout"] = None - rv["Stderr"] = None - - try: - stdinFileName = getTempFileName() - stdinFileObj = open(stdinFileName, "w") - stdinFileObj.write(input) - stdinFileObj.close() - stdinFileObj = open(stdinFileName, "r") - - stdoutFileName = getTempFileName() - stdoutFileObj = open(stdoutFileName, "w") - - stderrFileName = getTempFileName() - stderrFileObj = open(stderrFileName, "w") - except IOError, e: - log("Failed to create temporary file for executing command [%s]: %s" % (command, e)) - if output: - return rv - return rv["Status"] - - stdoutContent = None - stderrContent = None - - process = runCommandBG(command, - stdinFileObj=stdinFileObj, - stdoutFileObj=stdoutFileObj, - stderrFileObj=stderrFileObj, - shell=shell, root=root) - if process: - rv['Status'] = process.wait() - rv['Stdout'] = open(stdoutFileName).read() - rv['Stderr'] = open(stderrFileName).read() - - os.remove(stdinFileName) - os.remove(stdoutFileName) - os.remove(stderrFileName) - - log("runCommand(): execution status of command [%s] = [%s]" % (command, rv)) - - if output: - return rv - return rv["Status"] - - -def runCommandFG(command, stdout=False, stderr=False, - shell=False, root=None): - if stdout or stderr: - output = True - else: - output = False - return runCommand(command, output=output, shell=shell, root=root) - - -def IP2Number(ipString): - try: - return socket.htonl(struct.unpack("I", socket.inet_aton(ipString))[0]) - except socket.error: - return None - except TypeError: - return None - except struct.error: - return None - - -def Number2IP(number): - try: - return socket.inet_ntoa(struct.pack("I", socket.ntohl(number))) - except socket.error: - return None - except AttributeError: - return None - except ValueError: - return None - - -def computeHostName(hostName): - if not hostName: - return False - - hostPrefix = "" - for i in range(len(hostName), 0, -1): - pos = i - 1 - if hostName[pos].isdigit(): - continue - break - hostPrefix = hostName[:pos+1] - try: - hostIndex = int(hostName[pos+1:]) - except ValueError: - hostIndex = 0 - # TODO: Check the availablity of the (server) name - return "%s%s" % (hostPrefix, hostIndex + 1) - - -def daemonize(): - try: - pid = os.fork() - if pid > 0: - # exit first parent - sys.exit(0) - except OSError, e: - #sys.stderr.write("fork #1 failed: %d (%s)\n" % (e.errno, e.strerror)) - return False - - # decouple from parent environment - os.chdir("/") - os.setsid() - os.umask(0) - - # do second fork - try: - pid = os.fork() - if pid > 0: - # exit from second parent - sys.exit(0) - except OSError, e: - #sys.stderr.write("fork #2 failed: %d (%s)\n" % (e.errno, e.strerror)) - return False - - # redirect standard file descriptors - sys.stdout.flush() - sys.stderr.flush() - si = file("/dev/null", 'r') - so = file("/dev/null", 'a+') - se = file("/dev/null", 'a+', 0) - os.dup2(si.fileno(), sys.stdin.fileno()) - os.dup2(so.fileno(), sys.stdout.fileno()) - os.dup2(se.fileno(), sys.stderr.fileno()) - return True - - -def getDownloadStatus(fileName): - try: - lines = [line for line in open(fileName) - if "saved" in line or "%" in line] - except IOError: - return 0 - if not lines: - return 0 - if "saved" in lines[-1]: - return 100 - return lines[-1].split("%")[0].split()[-1] - - -def getMeminfo(): - """-> dict of data from meminfo (str:int). - Values are in kilobytes. - """ - import re - re_parser = re.compile(r'^(?P<key>\S*):\s*(?P<value>\d*)\s*kB' ) - result = {} - for line in open('/proc/meminfo'): - match = re_parser.match(line) - if not match: - continue # skip lines that don't parse - key, value = match.groups(['key', 'value']) - result[key] = int(value) - result['MemUsed'] = (result['MemTotal'] - result['MemFree'] - result['Buffers'] - result['Cached']) - return result - - -def getCpuUsage(): - """-> dict of cpuid : (usertime, nicetime, systemtime, idletime) - cpuid "cpu" means the total for all CPUs. - cpuid "cpuN" means the value for CPU N. - """ - wanted_records = [line for line in open('/proc/stat') if - line.startswith('cpu')] - result = {} - for cpuline in wanted_records: - fields = cpuline.split()[:5] - data = map(int, fields[1:]) - result[fields[0]] = tuple(data) - return result - -def _getCpuStatList(): - try: - fp = open("/proc/stat") - line = fp.readline() - fp.close() - return map(float, line.split()[1:5]) - except IOError, e: - log("Failed to open /proc/stat: %s" % str(e)) - return None - -def getCpuUsageAvg(): - st1 = _getCpuStatList() - #time1 = time.time() - time.sleep(1) - st2 = _getCpuStatList() - #time2 = time.time() - if not (st1 and st2): - return None - usageTime = (st2[0] - st1[0]) + (st2[1] - st1[1]) + (st2[2] - st1[2]) - try: - return (100.0 * usageTime) / (usageTime + (st2[3] - st1[3])) - except ZeroDivisionError, e: - return 0 - -def getLoadavg(): - try: - loadavgstr = open('/proc/loadavg', 'r').readline().strip() - except IOError: - syslog.syslog(syslog.LOG_ERR, "failed to find cpu load") - return None - - data = map(float, loadavgstr.split()[1:]) - # returns 1 minute load average - return data[0] - - -def getInfinibandPortStatus(): - - """ Check for availability of infiniband port - and return which port is active in a key pair value - """ - - # Check for existence of infiniband ports - value = os.popen ("ls /sys/class/infiniband").readline().strip() - - if not value: - return None - - portlist = os.popen ("echo /sys/class/infiniband/*/ports/*").readline().split() - - portkeys = {} - - for port in portlist: - value = os.popen ("cat %s/state" % - port.strip()).readline().split(':')[1].strip() - portkeys[port.strip()] = value - - return portkeys - - -def getServerFqdn(): - rv = runCommand("hostname --fqdn", output=True, root=True) - if not rv["Stderr"]: - return stripEmptyLines(rv["Stdout"]) - return socket.gethostname() - - -def getServerCount(): - try: - return int(open(Globals.SERVER_COUNT_FILE).read().strip()) - except IOError: - log("failed to read file %s" % Globals.SERVER_COUNT_FILE) - return 1 - except ValueError: - log("invalid number format in file %s" % Globals.SERVER_COUNT_FILE) - return 1 - - -def setServerCount(count): - try: - open(Globals.SERVER_COUNT_FILE, "w").write("%s\n" % count) - return True - except IOError: - log("failed to write file %s" % Globals.SERVER_COUNT_FILE) - return False - - -def getInstalledServerCount(): - try: - return int(open(Globals.INSTALLED_SERVER_COUNT_FILE).read().strip()) - except IOError: - log("failed to read file %s" % Globals.INSTALLED_SERVER_COUNT_FILE) - return 1 - except ValueError: - log("invalid number format in file %s" % Globals.INSTALLED_SERVER_COUNT_FILE) - return 1 - - -def setInstalledServerCount(count): - try: - open(Globals.INSTALLED_SERVER_COUNT_FILE, "w").write("%s\n" % count) - return True - except IOError: - log("failed to write file %s" % Globals.INSTALLED_SERVER_COUNT_FILE) - return False - - -def getLastInstalledServerIpList(): - ipList = {} - networkDom = Protocol.XDOM() - if not networkDom.parseFile(Globals.GLOBAL_NETWORK_FILE): - log("failed to parse file %s" % Globals.GLOBAL_NETWORK_FILE) - for tagE in networkDom.getElementsByTagRoute("server.interface"): - interfaceDom = Protocol.XDOM() - interfaceDom.setDomObj(tagE) - ipAddress = interfaceDom.getTextByTagRoute("ipaddr") - if ipAddress: - ipList[interfaceDom.getTextByTagRoute("device")] = ipAddress - return ipList - - -def getFreeIpAddress(device=None): - serverCount = getServerCount() - installedServerCount = getInstalledServerCount() - if serverCount == installedServerCount: - return None - - availableServerCount = serverCount - installedServerCount - ipList = getLastInstalledServerIpList() - - if not ipList: - return None - - if device: - if device not in ipList.keys(): - return None - deviceIpAddress = ipList[device] - else: - deviceIpAddress = ipList.values()[0] - ipNumber = IP2Number(deviceIpAddress) - - for i in range((ipNumber + availableServerCount), ipNumber, -1): - ipAddress = Number2IP(i) - if runCommandFG(["ping", "-qnc", "1", ipAddress]) != 0: - return ipAddress - return None - - -def getPasswordHash(userName): - try: - #return spwd.getspnam(userName).sp_pwd - return "Not implimented" - except KeyError: - return None - - -def getTransactionKey(): - try: - tokens = open(Globals.TRANSACTION_KEY_FILE).read().split(',') - except IOError: - return None, None - return tokens - - -def generateSignature(): - #return str(uuid.uuid4()) + ('--%f' % time.time()) - return ('--%f' % time.time()) - - -def getSignature(): - try: - return open(Globals.SIGNATURE_FILE).read().strip() - except IOError: - log(syslog.LOG_ERR, "unable to read signaure from %s file" % Globals.SIGNATURE_FILE) - return False - - -def storeSignature(signature, fileName=Globals.SIGNATURE_FILE): - try: - open(fileName, "w").write(signature + "\n") - except IOError: - log(syslog.LOG_ERR, "unable to write signature %s to %s file" % (signature, fileName)) - return False - return True - - -def isUserExist(userName): - try: - grp.getgrnam(userName).gr_gid - return True - except KeyError: - pass - try: - pwd.getpwnam(userName).pw_uid - return True - except KeyError: - pass - return False - - -def getGsnUserInfo(fileName=Globals.GSN_USER_INFO_FILE): - userInfo = {} - userInfo["UserId"] = None - userInfo["Password"] = None - try: - for line in open(fileName): - line = line.strip() - k = line[:line.index("=")] - v = line[line.index("=") + 1:] - if v[0] == "'" or v[0] == '"': - v = v[1:] - if v[-1] == "'" or v[-1] == '"': - v = v[:-1] - if k.upper() == "GSN_ID": - userInfo["UserId"] = v - if k.upper() == "GSN_PASSWORD": - userInfo["Password"] = v - except IOError, e: - log("Failed to read file %s: %s" % (fileName, e)) - return userInfo - - -def setGsnUserInfo(userInfo, fileName=Globals.GSN_USER_INFO_FILE): - try: - fp = open(fileName, "w") - fp.write("GSN_ID=%s\n" % userInfo["UserId"]) - fp.write("GSN_PASSWORD=%s\n" % userInfo["Password"]) - fp.close() - return True - except IOError, e: - log("Failed to write file %s: %s" % (fileName, e)) - return False - - -def getPlatformVersion(fileName=Globals.GLUSTER_VERSION_FILE): - versionInfo = {} - versionInfo["Version"] = None - versionInfo["Update"] = None - try: - lines = open(Globals.GLUSTER_VERSION_FILE).readlines() - for line in open(fileName): - line = line.strip() - k = line[:line.index("=")] - v = line[line.index("=") + 1:] - if v[0] == "'" or v[0] == '"': - v = v[1:] - if v[-1] == "'" or v[-1] == '"': - v = v[:-1] - if k.upper() == "VERSION": - versionInfo["Version"] = v - if k.upper() == "UPDATE": - versionInfo["Update"] = v - except IOError, e: - log("Failed to read file %s: %s" % (fileName, e)) - return versionInfo - - -def setPlatformVersion(versionInfo, fileName=Globals.GLUSTER_VERSION_FILE): - if isString(versionInfo): - tokens = versionInfo.strip().split(".") - if len(tokens) < 2: - log("Invalid version format %s. Expecting <MAJOR>.<MINOR>.<PATCHLEVEL>" % versionInfo) - return False - version = ".".join(tokens[:2]) - update = ".".join(tokens[2:]) - if not update: - update = "0" - else: - version = versionInfo["Version"] - update = versionInfo["Update"] - try: - fp = open(fileName, "w") - fp.write("VERSION=%s\n" % version) - fp.write("UPDATE=%s\n" % update) - fp.close() - return True - except IOError, e: - log("Failed to write file %s: %s" % (fileName, e)) - return False - - -def getGlusterUpdateDom(serverVersion): - errorMessage = "" - updateInfoDom = None - try: - baseUrl = open(Globals.GLUSTER_UPDATE_SITE_FILE).read().strip() - except IOError, e: - log("Failed to read file %s: %s" % (Globals.GLUSTER_UPDATE_SITE_FILE, e)) - errorMessage = "Failed to read update site file" - return updateInfoDom, errorMessage - - try: - url = "%s/%s/%s" % (baseUrl, serverVersion, Globals.GLUSTER_UPDATES_FILE) - connection = urllib.urlopen(url) - if connection.getcode() != 200: - connection.close() - errorMessage = "Error received from server to open URL %s" % url - return updateInfoDom, errorMessage - updateInfoString = connection.read() - connection.close() - except IOError, e: - log("Failed to get update information from URL %s: %s" % (url, e)) - errorMessage = "Error getting update information" - return updateInfoDom, errorMessage - - updateInfoDom = Protocol.XDOM() - if not updateInfoDom.parseString(updateInfoString): - log("XML parse error on update information content [%s]" % updateInfoString) - errorMessage = "Parse error on update information" - updateInfoDom = None - return updateInfoDom, errorMessage - - -def removeFile(fileName, root=False): - if root: - if runCommand("rm %s" % fileName, root=True) == 0: - return True - return False - try: - os.remove(fileName) - return True - except OSError, e: - log("Failed to remove file %s: %s" % (fileName, e)) - return False - - -def isLiveMode(): - return os.path.exists(Globals.LIVE_MODE_FILE) - -def convertKbToMb(kb): - return kb / 1024.0 - - -def getIPIndex(indexFile): - try: - fp = open(indexFile) - line = fp.readline() - fp.close() - index = int(line) - except IOError: - index = 0 - except ValueError: - index = False - return index - -def setIPIndex(index, indexFile): - try: - fp = open(indexFile, "w") - fp.write(str(index)) - fp.close() - except IOError: - return False - return True - -def IP2Number(ipString): - try: - return socket.htonl(struct.unpack("I", socket.inet_aton(ipString))[0]) - except socket.error: - return None - except TypeError: - return None - except struct.error: - return None - -def Number2IP(number): - try: - return socket.inet_ntoa(struct.pack("I", socket.ntohl(number))) - except socket.error: - return None - except AttributeError: - return None - except ValueError: - return None - -def hasEntryFoundInFile(searchString, dnsEntryFileName): - try: - addServerEntryList = open(dnsEntryFileName).read().split() - except IOError: - return None - if searchString in addServerEntryList: - return True - return False - - -def computeIpAddress(ipAddress, startIp, endIp): - startIpNumber = IP2Number(startIp) - endIpNumber = IP2Number(endIp) - if not ipAddress: - return startIp - nextIpNumber = IP2Number(ipAddress) - while True: - nextIpNumber = nextIpNumber + 1 - ipAddress = Number2IP(nextIpNumber) - rv = runCommandFG(["ping", "-qnc", "1", ipAddress]) - if type(rv) == type(True): - return False - if rv != 0: - break - - if nextIpNumber >= startIpNumber and nextIpNumber <= endIpNumber: - return ipAddress - - nextIpNumber = IP2Number(startIp) - while True: - ipAddress = Number2IP(nextIpNumber) - nextIpNumber = nextIpNumber + 1 - rv = runCommandFG(["ping", "-qnc", "1", ipAddress]) - if type(rv) == type(True): - return False - if rv != 0: - break - - if IP2Number(ipAddress) >= startIpNumber and IP2Number(ipAddress) <= endIpNumber: - return ipAddress - return False - - -def setHostNameAndIp(hostName, ipAddress, lastAddServerDetailFile): - try: - fp = open(lastAddServerDetailFile, "w") - fp.write("HOSTNAME=" + hostName + "\n") - fp.write("IPADDRESS=" + ipAddress); - fp.close() - except IOError: - return False - return True - -def getPort(): - try: - fd = open(Globals.PORT_FILE, "r") - portString = fd.readline() - fd.close() - port = int(portString) - except IOError: - port = Globals.DEFAULT_PORT - 2 - except ValueError: - port = Globals.DEFAULT_PORT - 2 - return port - -def setPort(port): - try: - fd = open(Globals.PORT_FILE, "w") - fd.write(str(port)) - fd.close() - except IOError: - return False - return True - -def getServerAgentCredentials(): - try: - lines = open(Globals.SERVERAGENT_AUTH_FILE).readlines() - except IOError: - return None,None - - userName = None - password = None - - for l in lines: - if l[-1] == '\n': - l = l[:-1] - k = l[:l.index('=')] - v = l[l.index('=') + 1:] - if v[0] == "'" or v[0] == '"': - v = v[1:] - if v[-1] == "'" or v[-1] == '"': - v = v[:-1] - if k.upper() == "AGENT_ID": - userName = v - if k.upper() == "AGENT_PASSWORD": - password = v - - return userName, password - -def getGatewayAgentCredentials(): - try: - lines = open(Globals.GATEWAYAGENT_AUTH_FILE).readlines() - except IOError: - return None - - #userName = None - password = None - - for l in lines: - if l[-1] == '\n': - l = l[:-1] - k = l[:l.index('=')] - v = l[l.index('=') + 1:] - if v[0] == "'" or v[0] == '"': - v = v[1:] - if v[-1] == "'" or v[-1] == '"': - v = v[:-1] - #if k.upper() == "AGENT_ID": - # userName = v - if k.upper() == "AGENT_PASSWORD": - password = v - - return password - -def getWebAgentCredentials(): - try: - lines = open(Globals.WEBAGENT_AUTH_FILE).readlines() - except IOError: - return None,None - - userName = None - password = None - - for l in lines: - if l[-1] == '\n': - l = l[:-1] - k = l[:l.index('=')] - v = l[l.index('=') + 1:] - if v[0] == "'" or v[0] == '"': - v = v[1:] - if v[-1] == "'" or v[-1] == '"': - v = v[:-1] - if k.upper() == "AGENT_ID": - userName = v - if k.upper() == "AGENT_PASSWORD": - password = v - - return userName, password - -def daemonize(): - try: - pid = os.fork() - if pid > 0: - # exit first parent - sys.exit(0) - except OSError, e: - #sys.stderr.write("fork #1 failed: %d (%s)\n" % (e.errno, e.strerror)) - return False - - # decouple from parent environment - os.chdir("/") - os.setsid() - os.umask(0) - - # do second fork - try: - pid = os.fork() - if pid > 0: - # exit from second parent - sys.exit(0) - except OSError, e: - #sys.stderr.write("fork #2 failed: %d (%s)\n" % (e.errno, e.strerror)) - return False - - # redirect standard file descriptors - sys.stdout.flush() - sys.stderr.flush() - si = file("/dev/null", 'r') - so = file("/dev/null", 'a+') - se = file("/dev/null", 'a+', 0) - os.dup2(si.fileno(), sys.stdin.fileno()) - os.dup2(so.fileno(), sys.stdout.fileno()) - os.dup2(se.fileno(), sys.stderr.fileno()) - return True - -def getFreeIpAddress(): - startRange, endRange = getStoragePoolInfo() - if not (startRange and endRange): - return None - - startIpNumber = IP2Number(startRange) - endIpNumber = IP2Number(endRange) - - for ipNumber in range(endIpNumber, startIpNumber, -1): - rv = runCommandFG(["ping", "-qnc", "1", Number2IP(ipNumber)]) - if type(rv) == type(True): - return None - if rv != 0: - return Number2IP(ipNumber) - return None - -def getDhcpServerStatus(): - status = runCommandFG(["sudo", "service", "dnsmasq", " status"]) - if type(status) == type(True) or 0 != status: - return False - return True - -def startDhcpServer(): - status = runCommandFG(["sudo", "service", "dnsmasq", " start"]) - if type(status) == type(True) or 0 != status: - return False - return True - -def stopDhcpServer(): - status = runCommandFG(["sudo", "service", "dnsmasq", " stop"]) - if type(status) == type(True) or 0 != status: - return False - return True - -def getStoragePoolInfo(): - startRange = None - endRange = None - try: - for line in open(Globals.GLUSTER_SERVER_POOL_FILE): - tokens = line.split("=") - if tokens[0] == "STARTRANGE": - startRange = tokens[1].strip() - if tokens[0] == "ENDRANGE": - endRange = tokens[1].strip() - except IOError: - log(syslog.LOG_ERR, "unable to read %s file" % Globals.GLUSTER_SERVER_POOL_FILE) - return startRange, endRange - -def configureDnsmasq(serverIpAddress, dhcpIpAddress): - dnsmasqConfFile = Globals.GLUSTER_CONF_CONF_DIR + "/dnsmasq.conf" - serverPortString = "68" - try: - for arg in open("/proc/cmdline").read().strip().split(): - token = arg.split("=") - if token[0] == "dhcp": - serverPortString = token[1] - break - except IOError: - log(syslog.LOG_ERR, "Failed to read /proc/cmdline. Continuing with default port 68") - try: - serverPort = int(serverPortString) - except ValueError: - log(syslog.LOG_ERR, "Invalid dhcp port '%s' in /proc/cmdline. Continuing with default port 68" % serverPortString) - serverPort = 68 - - try: - fp = open(dnsmasqConfFile, "w") - fp.write("no-hosts\n") - #fp.write("addn-hosts=%s\n" % Globals.GLUSTER_DNS_ENTRIES) - fp.write("bind-interfaces\n") - fp.write("except-interface=lo\n") - fp.write("dhcp-range=%s,%s\n" % (dhcpIpAddress, dhcpIpAddress)) - fp.write("dhcp-lease-max=1\n") - #fp.write("dhcp-option=option:router,%s\n" % serverIp) - #fp.write("dhcp-option=option:ntp-server,%s\n" % serverIp) - fp.write("dhcp-alternate-port=%s\n" % serverPort) - fp.write("server=%s\n" % serverIpAddress) - fp.write("dhcp-script=/usr/sbin/server-info\n") - fp.close() - except IOError: - log(syslog.LOG_ERR, "unable to write dnsmasq configuration %s" % dnsmasqConfFile) - return False - status = runCommandFG(["sudo", "cp", "-f", Globals.GLUSTER_CONF_CONF_DIR + "/dnsmasq.conf", Globals.DNSMASQ_CONF_FILE]) - if type(status) == type(True) or 0 != status: - log(syslog.LOG_ERR, "unable to copy dnsmasq configuration to " + Globals.DNSMASQ_CONF_FILE) - return False - return True - -def configureDhcpServer(serverIpAddress, dhcpIpAddress): - return configureDnsmasq(serverIpAddress, dhcpIpAddress) - -def log(priority, message=None): - if type(priority) == type(""): - logPriority = syslog.LOG_INFO - logMessage = priority - else: - logPriority = priority - logMessage = message - if not logMessage: - return - #if Globals.DEBUG: - # sys.stderr.write(logMessage) - else: - syslog.syslog(logPriority, logMessage) - return - - -def stripEmptyLines(content): - ret = "" - for line in content.split("\n"): - if line.strip() != "": - ret += line - return ret - - -def getDeviceFormatStatusFile(device): - return "/var/tmp/format_%s.status" % device.replace('/', '_') - -def getDeviceFormatLockFile(device): - return "/var/lock/format_%s.lock" % device.replace('/', '_') - -def getDeviceFormatOutputFile(device): - return "/var/tmp/format_%s.out" % device.replace('/', '_') - -def getGlusterVersion(): - rv = runCommand("/usr/sbin/gluster --version", output=True) - if rv["Stderr"]: - return None - if rv["Status"] != 0: - return None - if not rv["Stdout"]: - return None - return rv["Stdout"].strip().split()[1] - -def getCifsUserUid(userName): - try: - fp = open(Globals.CIFS_USER_FILE) - content = fp.read() - fp.close() - except IOError, e: - log("failed to read file %s: %s" % (Globals.CIFS_USER_FILE, str(e))) - return False - - for line in content.strip().split(): - tokens = line.split(":") - if tokens[1] == userName: - return int(tokens[0]) - return None diff --git a/src/com.gluster.storage.management.gateway.scripts/src/gateway/get_volume_user_cifs.py b/src/com.gluster.storage.management.gateway.scripts/src/gateway/get_volume_user_cifs.py deleted file mode 100755 index c385633e..00000000 --- a/src/com.gluster.storage.management.gateway.scripts/src/gateway/get_volume_user_cifs.py +++ /dev/null @@ -1,46 +0,0 @@ -#!/usr/bin/python -# Copyright (C) 2011 Gluster, Inc. <http://www.gluster.com> -# This file is part of Gluster Management Gateway. -# - -import os -import sys -p1 = os.path.abspath(os.path.dirname(sys.argv[0])) -p2 = "%s/common" % os.path.dirname(p1) -if not p1 in sys.path: - sys.path.append(p1) -if not p2 in sys.path: - sys.path.append(p2) -import Globals -import Utils - - -def main(): - if len(sys.argv) < 2: - sys.stderr.write("usage: %s VOLUME_NAME\n" % os.path.basename(sys.argv[0])) - sys.exit(-1) - - volumeName = sys.argv[1] - - if not os.path.exists(Globals.CIFS_VOLUME_FILE): - sys.exit(0) - - try: - fp = open(Globals.CIFS_VOLUME_FILE) - content = fp.read() - fp.close() - for line in content.split(): - tokens = line.split(":") - if tokens[0] == volumeName: - print "\n".join(tokens[1:]) - sys.exit(0) - # given volume is not configured for cifs export - sys.exit(0) - except IOError, e: - Utils.log("failed to read file %s: %s" % (Globals.CIFS_VOLUME_FILE, str(e))) - sys.stderr.write("Failed to read cifs-volume-file %s: %s\n" % (Globals.CIFS_VOLUME_FILE, str(e))) - sys.exit(2) - - -if __name__ == "__main__": - main() diff --git a/src/com.gluster.storage.management.gateway.scripts/src/gateway/gmg-reset-password.sh b/src/com.gluster.storage.management.gateway.scripts/src/gateway/gmg-reset-password.sh deleted file mode 100755 index 4edf0ffd..00000000 --- a/src/com.gluster.storage.management.gateway.scripts/src/gateway/gmg-reset-password.sh +++ /dev/null @@ -1,21 +0,0 @@ -#----------------------------------------------------------------------------------- -# gmg-reset-password.sh - script to reset password of given user to default password -#----------------------------------------------------------------------------------- - -USAGE_ERR=1 - -if [ $# -ne 1 ]; then - echo "Usage: ${0} <username>" - echo - exit ${USAGE_ERR} -fi - -# Main action body -cd .. -for FILE in WEB-INF/lib/*.jar -do - export CLASSPATH=${CLASSPATH}:${PWD}/${FILE} -done -export CLASSPATH=${PWD}/WEB-INF/classes:${CLASSPATH} -cd - -java com.gluster.storage.management.gateway.utils.PasswordManager reset ${1} diff --git a/src/com.gluster.storage.management.gateway.scripts/src/gateway/grun.py b/src/com.gluster.storage.management.gateway.scripts/src/gateway/grun.py deleted file mode 100755 index ac91d0c8..00000000 --- a/src/com.gluster.storage.management.gateway.scripts/src/gateway/grun.py +++ /dev/null @@ -1,56 +0,0 @@ -#!/usr/bin/python -# Copyright (C) 2011 Gluster, Inc. <http://www.gluster.com> -# This file is part of Gluster Management Gateway. -# - -import os -import sys -p1 = os.path.abspath(os.path.dirname(sys.argv[0])) -p2 = "%s/common" % os.path.dirname(p1) -if not p1 in sys.path: - sys.path.append(p1) -if not p2 in sys.path: - sys.path.append(p2) -import Utils - - -def main(): - sshCommandPrefix = "ssh -l root -q -i /opt/glustermg/keys/gluster.pem -o BatchMode=yes -o GSSAPIAuthentication=no -o PasswordAuthentication=no -o StrictHostKeyChecking=no".split() - - if len(sys.argv) < 3: - sys.stderr.write("usage: %s SERVER_FILE COMMAND [ARGUMENTS]\n" % os.path.basename(sys.argv[0])) - sys.exit(-1) - serverFile = sys.argv[1] - try: - command = ["/opt/glustermg/%s/backend/%s" % (os.environ['GMG_VERSION'], sys.argv[2])] - except KeyError, e: - command = ["/opt/glustermg/1.0.0/backend/%s" % sys.argv[2]] - command += sys.argv[3:] - - try: - fp = open(serverFile) - serverNameList = fp.readlines() - fp.close() - except IOError, e: - Utils.log("Failed to read server file %s: %s\n" % (serverFile, str(e))) - sys.stderr.write("Failed to read server file %s: %s\n" % (serverFile, str(e))) - sys.exit(1) - - status = True - for serverName in serverNameList: - rv = Utils.runCommand(sshCommandPrefix + [serverName.strip()] + command, output=True) - if rv["Status"] != 0: - sys.stderr.write("%s: %s\n" % (serverName, rv["Status"])) - sys.stderr.write("Stdout:\n%s\n" % rv["Stdout"]) - sys.stderr.write("Stderr:\n%s\n" % rv["Stderr"]) - sys.stderr.write("---\n") - status = False - - if status: - sys.exit(0) - else: - sys.exit(2) - - -if __name__ == "__main__": - main() diff --git a/src/com.gluster.storage.management.gateway.scripts/src/gateway/remove_server_volume_cifs_config.py b/src/com.gluster.storage.management.gateway.scripts/src/gateway/remove_server_volume_cifs_config.py deleted file mode 100755 index 55230113..00000000 --- a/src/com.gluster.storage.management.gateway.scripts/src/gateway/remove_server_volume_cifs_config.py +++ /dev/null @@ -1,83 +0,0 @@ -#!/usr/bin/python -# Copyright (C) 2011 Gluster, Inc. <http://www.gluster.com> -# This file is part of Gluster Management Gateway. -# - -import os -import sys -p1 = os.path.abspath(os.path.dirname(sys.argv[0])) -p2 = "%s/common" % os.path.dirname(p1) -if not p1 in sys.path: - sys.path.append(p1) -if not p2 in sys.path: - sys.path.append(p2) -import Globals -import Utils - - -def main(): - if len(sys.argv) < 3: - sys.stderr.write("usage: %s SERVER_NAME VOLUME_FILE\n" % os.path.basename(sys.argv[0])) - sys.exit(-1) - - serverName = sys.argv[1] - volumeFile = sys.argv[2] - - try: - fp = open(volumeFile) - lines = fp.readlines() - fp.close() - except IOError, e: - Utils.log("Failed to read volume file %s: %s" % (volumeFile, str(e))) - sys.stderr.write("Failed to read volume file %s: %s\n" % (volumeFile, str(e))) - sys.exit(1) - - volumeNameList = [line.strip() for line in lines] - if not volumeNameList: - sys.exit(0) - - try: - fp = open(Globals.CIFS_VOLUME_FILE) - content = fp.read() - fp.close() - except IOError, e: - Utils.log("failed to read file %s: %s" % (Globals.CIFS_VOLUME_FILE, str(e))) - sys.stderr.write("failed to read file %s: %s\n" % (Globals.CIFS_VOLUME_FILE, str(e))) - sys.exit(2) - - cifsVolumeList = [line.split(":")[0] for line in content.split()] - runningCifsVolumeList = set(cifsVolumeList).intersection(set(volumeNameList)) - - if not runningCifsVolumeList: - sys.exit(0) - - tempFileName = Utils.getTempFileName() - try: - fp = open(tempFileName, "w") - fp.write("%s\n" % serverName) - except IOError: - Utils.log("Failed to write server name to file %s" % tempFileName) - sys.stderr.write("Failed to write server name to file\n") - sys.exit(3) - - status = True - for volumeName in runningCifsVolumeList: - if Utils.runCommand(["grun.py", tempFileName, "stop_volume_cifs.py", volumeName.strip()]) != 0: - status = False - if Utils.runCommand(["grun.py", tempFileName, "delete_volume_cifs.py", volumeName.strip()]) != 0: - status = False - - try: - os.remove(tempFileName) - except OSError, e: - Utils.log("Failed to remove temporary file %s" % tempFileName) - sys.stderr.write("Failed to remove temporary file %s\n" % tempFileName) - pass - - if status: - sys.exit(0) - else: - sys.exit(2) - -if __name__ == "__main__": - main() diff --git a/src/com.gluster.storage.management.gateway.scripts/src/gateway/setup_cifs_config_all.py b/src/com.gluster.storage.management.gateway.scripts/src/gateway/setup_cifs_config_all.py deleted file mode 100755 index 8dd59c8c..00000000 --- a/src/com.gluster.storage.management.gateway.scripts/src/gateway/setup_cifs_config_all.py +++ /dev/null @@ -1,29 +0,0 @@ -#!/usr/bin/python -# Copyright (C) 2011 Gluster, Inc. <http://www.gluster.com> -# This file is part of Gluster Management Gateway. -# - -import os -import sys -p1 = os.path.abspath(os.path.dirname(sys.argv[0])) -p2 = "%s/common" % os.path.dirname(p1) -if not p1 in sys.path: - sys.path.append(p1) -if not p2 in sys.path: - sys.path.append(p2) -import Utils - - -def main(): - if len(sys.argv) < 2: - sys.stderr.write("usage: %s SERVER_FILE\n" % os.path.basename(sys.argv[0])) - sys.exit(-1) - - serverFile = sys.argv[1] - - rv = Utils.runCommand(["grun.py", serverFile, "setup_cifs_config.py"]) - sys.exit(rv) - - -if __name__ == "__main__": - main() diff --git a/src/com.gluster.storage.management.gateway/.settings/org.eclipse.wst.common.component b/src/com.gluster.storage.management.gateway/.settings/org.eclipse.wst.common.component deleted file mode 100644 index 3d5a50bf..00000000 --- a/src/com.gluster.storage.management.gateway/.settings/org.eclipse.wst.common.component +++ /dev/null @@ -1,10 +0,0 @@ -<?xml version="1.0" encoding="UTF-8"?> -<project-modules id="moduleCoreId" project-version="1.5.0"> - <wb-module deploy-name="com.gluster.storage.management.gateway"> - <wb-resource deploy-path="/" source-path="/WebContent"/> - <wb-resource deploy-path="/WEB-INF/classes" source-path="/src"/> - <wb-resource deploy-path="/WEB-INF/classes" source-path="/junit"/> - <property name="java-output-path" value="/com.gluster.storage.management.gateway/build/classes"/> - <property name="context-root" value="glustermg"/> - </wb-module> -</project-modules> diff --git a/src/com.gluster.storage.management.gateway/WebContent/WEB-INF/lib/plugins/com.gluster.storage.management.client_1.0.0.jar b/src/com.gluster.storage.management.gateway/WebContent/WEB-INF/lib/plugins/com.gluster.storage.management.client_1.0.0.jar Binary files differdeleted file mode 100644 index 56222cbf..00000000 --- a/src/com.gluster.storage.management.gateway/WebContent/WEB-INF/lib/plugins/com.gluster.storage.management.client_1.0.0.jar +++ /dev/null diff --git a/src/com.gluster.storage.management.gateway/WebContent/WEB-INF/lib/plugins/com.gluster.storage.management.core_1.0.0.jar b/src/com.gluster.storage.management.gateway/WebContent/WEB-INF/lib/plugins/com.gluster.storage.management.core_1.0.0.jar Binary files differdeleted file mode 100644 index d321e76c..00000000 --- a/src/com.gluster.storage.management.gateway/WebContent/WEB-INF/lib/plugins/com.gluster.storage.management.core_1.0.0.jar +++ /dev/null diff --git a/src/com.gluster.storage.management.gateway/WebContent/scripts/Globals.py b/src/com.gluster.storage.management.gateway/WebContent/scripts/Globals.py deleted file mode 120000 index 7d230498..00000000 --- a/src/com.gluster.storage.management.gateway/WebContent/scripts/Globals.py +++ /dev/null @@ -1 +0,0 @@ -../../../com.gluster.storage.management.gateway.scripts/src/common/Globals.py
\ No newline at end of file diff --git a/src/com.gluster.storage.management.gateway/WebContent/scripts/Protocol.py b/src/com.gluster.storage.management.gateway/WebContent/scripts/Protocol.py deleted file mode 120000 index 7ecad84d..00000000 --- a/src/com.gluster.storage.management.gateway/WebContent/scripts/Protocol.py +++ /dev/null @@ -1 +0,0 @@ -../../../com.gluster.storage.management.gateway.scripts/src/common/Protocol.py
\ No newline at end of file diff --git a/src/com.gluster.storage.management.gateway/WebContent/scripts/Utils.py b/src/com.gluster.storage.management.gateway/WebContent/scripts/Utils.py deleted file mode 120000 index df26ff44..00000000 --- a/src/com.gluster.storage.management.gateway/WebContent/scripts/Utils.py +++ /dev/null @@ -1 +0,0 @@ -../../../com.gluster.storage.management.gateway.scripts/src/common/Utils.py
\ No newline at end of file diff --git a/src/com.gluster.storage.management.gateway/WebContent/scripts/XmlHandler.py b/src/com.gluster.storage.management.gateway/WebContent/scripts/XmlHandler.py deleted file mode 120000 index 880349a1..00000000 --- a/src/com.gluster.storage.management.gateway/WebContent/scripts/XmlHandler.py +++ /dev/null @@ -1 +0,0 @@ -../../../com.gluster.storage.management.gateway.scripts/src/common/XmlHandler.py
\ No newline at end of file diff --git a/src/com.gluster.storage.management.gateway/WebContent/scripts/add_user_cifs_all.py b/src/com.gluster.storage.management.gateway/WebContent/scripts/add_user_cifs_all.py deleted file mode 120000 index fec57917..00000000 --- a/src/com.gluster.storage.management.gateway/WebContent/scripts/add_user_cifs_all.py +++ /dev/null @@ -1 +0,0 @@ -../../../com.gluster.storage.management.gateway.scripts/src/gateway/add_user_cifs_all.py
\ No newline at end of file diff --git a/src/com.gluster.storage.management.gateway/WebContent/scripts/create_volume_cifs_all.py b/src/com.gluster.storage.management.gateway/WebContent/scripts/create_volume_cifs_all.py deleted file mode 120000 index 03752d57..00000000 --- a/src/com.gluster.storage.management.gateway/WebContent/scripts/create_volume_cifs_all.py +++ /dev/null @@ -1 +0,0 @@ -../../../com.gluster.storage.management.gateway.scripts/src/gateway/create_volume_cifs_all.py
\ No newline at end of file diff --git a/src/com.gluster.storage.management.gateway/WebContent/scripts/delete_user_cifs_all.py b/src/com.gluster.storage.management.gateway/WebContent/scripts/delete_user_cifs_all.py deleted file mode 120000 index d517e46c..00000000 --- a/src/com.gluster.storage.management.gateway/WebContent/scripts/delete_user_cifs_all.py +++ /dev/null @@ -1 +0,0 @@ -../../../com.gluster.storage.management.gateway.scripts/src/gateway/delete_user_cifs_all.py
\ No newline at end of file diff --git a/src/com.gluster.storage.management.gateway/WebContent/scripts/delete_volume_cifs_all.py b/src/com.gluster.storage.management.gateway/WebContent/scripts/delete_volume_cifs_all.py deleted file mode 120000 index be9e627c..00000000 --- a/src/com.gluster.storage.management.gateway/WebContent/scripts/delete_volume_cifs_all.py +++ /dev/null @@ -1 +0,0 @@ -../../../com.gluster.storage.management.gateway.scripts/src/gateway/delete_volume_cifs_all.py
\ No newline at end of file diff --git a/src/com.gluster.storage.management.gateway/WebContent/scripts/get_volume_user_cifs.py b/src/com.gluster.storage.management.gateway/WebContent/scripts/get_volume_user_cifs.py deleted file mode 120000 index 3eff03fd..00000000 --- a/src/com.gluster.storage.management.gateway/WebContent/scripts/get_volume_user_cifs.py +++ /dev/null @@ -1 +0,0 @@ -../../../com.gluster.storage.management.gateway.scripts/src/gateway/get_volume_user_cifs.py
\ No newline at end of file diff --git a/src/com.gluster.storage.management.gateway/WebContent/scripts/gmg-reset-password.sh b/src/com.gluster.storage.management.gateway/WebContent/scripts/gmg-reset-password.sh deleted file mode 120000 index 13b9a40b..00000000 --- a/src/com.gluster.storage.management.gateway/WebContent/scripts/gmg-reset-password.sh +++ /dev/null @@ -1 +0,0 @@ -../../../com.gluster.storage.management.gateway.scripts/src/gateway/gmg-reset-password.sh
\ No newline at end of file diff --git a/src/com.gluster.storage.management.gateway/WebContent/scripts/grun.py b/src/com.gluster.storage.management.gateway/WebContent/scripts/grun.py deleted file mode 120000 index 5e56bfbb..00000000 --- a/src/com.gluster.storage.management.gateway/WebContent/scripts/grun.py +++ /dev/null @@ -1 +0,0 @@ -../../../com.gluster.storage.management.gateway.scripts/src/gateway/grun.py
\ No newline at end of file diff --git a/src/com.gluster.storage.management.gateway/WebContent/scripts/multicast-discover-servers.py b/src/com.gluster.storage.management.gateway/WebContent/scripts/multicast-discover-servers.py deleted file mode 120000 index 6288f182..00000000 --- a/src/com.gluster.storage.management.gateway/WebContent/scripts/multicast-discover-servers.py +++ /dev/null @@ -1 +0,0 @@ -../../../com.gluster.storage.management.gateway.scripts/src/gateway/multicast-discover-servers.py
\ No newline at end of file diff --git a/src/com.gluster.storage.management.gateway/WebContent/scripts/remove_server_volume_cifs_config.py b/src/com.gluster.storage.management.gateway/WebContent/scripts/remove_server_volume_cifs_config.py deleted file mode 120000 index 32d1dec4..00000000 --- a/src/com.gluster.storage.management.gateway/WebContent/scripts/remove_server_volume_cifs_config.py +++ /dev/null @@ -1 +0,0 @@ -../../../com.gluster.storage.management.gateway.scripts/src/gateway/remove_server_volume_cifs_config.py
\ No newline at end of file diff --git a/src/com.gluster.storage.management.gateway/WebContent/scripts/setup_cifs_config_all.py b/src/com.gluster.storage.management.gateway/WebContent/scripts/setup_cifs_config_all.py deleted file mode 120000 index e3f44800..00000000 --- a/src/com.gluster.storage.management.gateway/WebContent/scripts/setup_cifs_config_all.py +++ /dev/null @@ -1 +0,0 @@ -../../../com.gluster.storage.management.gateway.scripts/src/gateway/setup_cifs_config_all.py
\ No newline at end of file diff --git a/src/com.gluster.storage.management.gateway/WebContent/scripts/update_volume_cifs_all.py b/src/com.gluster.storage.management.gateway/WebContent/scripts/update_volume_cifs_all.py deleted file mode 120000 index 8496fae4..00000000 --- a/src/com.gluster.storage.management.gateway/WebContent/scripts/update_volume_cifs_all.py +++ /dev/null @@ -1 +0,0 @@ -../../../com.gluster.storage.management.gateway.scripts/src/gateway/update_volume_cifs_all.py
\ No newline at end of file diff --git a/src/com.gluster.storage.management.gateway/src/META-INF/persistence.xml b/src/com.gluster.storage.management.gateway/src/META-INF/persistence.xml deleted file mode 100644 index 36b252ea..00000000 --- a/src/com.gluster.storage.management.gateway/src/META-INF/persistence.xml +++ /dev/null @@ -1,5 +0,0 @@ -<?xml version="1.0" encoding="UTF-8"?> - -<persistence xmlns="http://java.sun.com/xml/ns/persistence" version="1.0"> - <persistence-unit name="gluster-management-gateway" transaction-type="RESOURCE_LOCAL" /> -</persistence>
\ No newline at end of file diff --git a/src/com.gluster.storage.management.gateway/src/com/gluster/storage/management/gateway/data/GlusterDataSource.java b/src/com.gluster.storage.management.gateway/src/com/gluster/storage/management/gateway/data/GlusterDataSource.java deleted file mode 100644 index 0802fe93..00000000 --- a/src/com.gluster.storage.management.gateway/src/com/gluster/storage/management/gateway/data/GlusterDataSource.java +++ /dev/null @@ -1,48 +0,0 @@ -/** - * GlusterDataSource.java - * - * Copyright (c) 2011 Gluster, Inc. <http://www.gluster.com> - * This file is part of Gluster Management Console. - * - * Gluster Management Console is free software; you can redistribute it and/or - * modify it under the terms of the GNU Affero General Public License as published - * by the Free Software Foundation; either version 3 of the License, or - * (at your option) any later version. - * - * Gluster Management Console is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY - * or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Affero General Public License - * for more details. - * - * You should have received a copy of the GNU Affero General Public License - * along with this program. If not, see - * <http://www.gnu.org/licenses/>. - */ -package com.gluster.storage.management.gateway.data; - -import javax.servlet.ServletContext; - -import org.springframework.beans.factory.annotation.Autowired; -import org.springframework.jdbc.datasource.DriverManagerDataSource; -import org.springframework.stereotype.Component; - -@Component -public class GlusterDataSource extends DriverManagerDataSource { - @Autowired - ServletContext servletContext; - - public GlusterDataSource() { - setDriverClassName(org.apache.derby.jdbc.EmbeddedDriver.class.getName()); - - setUsername("gluster"); - // TODO: change to a stronger (encrypted) password - setPassword("gluster"); - } - - public DriverManagerDataSource getDataSource() { - // Database directory = work/data relative to context root - setUrl("jdbc:derby:" + servletContext.getRealPath("data") + ";create=true"); - - return this; - } -}
\ No newline at end of file diff --git a/src/com.gluster.storage.management.gateway/src/com/gluster/storage/management/gateway/filters/GlusterResourceFilterFactory.java b/src/com.gluster.storage.management.gateway/src/com/gluster/storage/management/gateway/filters/GlusterResourceFilterFactory.java deleted file mode 100644 index 1c480f3f..00000000 --- a/src/com.gluster.storage.management.gateway/src/com/gluster/storage/management/gateway/filters/GlusterResourceFilterFactory.java +++ /dev/null @@ -1,31 +0,0 @@ -/** - * - */ -package com.gluster.storage.management.gateway.filters; - -import java.util.ArrayList; -import java.util.List; - -import com.sun.jersey.api.model.AbstractMethod; -import com.sun.jersey.spi.container.ResourceFilter; -import com.sun.jersey.spi.container.ResourceFilterFactory; - -/** - * Gluster resource filter factory. As of now, this creates only one filter - the audit filter {@code AuditFilter} - */ -public class GlusterResourceFilterFactory implements ResourceFilterFactory { - - public GlusterResourceFilterFactory() { - } - - /* (non-Javadoc) - * @see com.sun.jersey.spi.container.ResourceFilterFactory#create(com.sun.jersey.api.model.AbstractMethod) - */ - @Override - public List<ResourceFilter> create(AbstractMethod arg0) { - List<ResourceFilter> filters = new ArrayList<ResourceFilter>(); - filters.add(new AuditFilter()); - - return filters; - } -} diff --git a/src/com.gluster.storage.management.gateway/src/com/gluster/storage/management/gateway/security/GlusterUserDetailsService.java b/src/com.gluster.storage.management.gateway/src/com/gluster/storage/management/gateway/security/GlusterUserDetailsService.java deleted file mode 100644 index e806051c..00000000 --- a/src/com.gluster.storage.management.gateway/src/com/gluster/storage/management/gateway/security/GlusterUserDetailsService.java +++ /dev/null @@ -1,31 +0,0 @@ -/** - * GlusterUserDetailsService.java - * - * Copyright (c) 2011 Gluster, Inc. <http://www.gluster.com> - * This file is part of Gluster Management Console. - * - * Gluster Management Console is free software; you can redistribute it and/or - * modify it under the terms of the GNU Affero General Public License as published - * by the Free Software Foundation; either version 3 of the License, or - * (at your option) any later version. - * - * Gluster Management Console is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY - * or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Affero General Public License - * for more details. - * - * You should have received a copy of the GNU Affero General Public License - * along with this program. If not, see - * <http://www.gnu.org/licenses/>. - */ -package com.gluster.storage.management.gateway.security; - -import org.springframework.security.core.userdetails.UserDetailsService; - -/** - * - */ -public interface GlusterUserDetailsService extends UserDetailsService { - void changePassword(String username, String password); -} - diff --git a/src/com.gluster.storage.management.gateway/src/com/gluster/storage/management/gateway/tasks/MigrateBrickTask.java b/src/com.gluster.storage.management.gateway/src/com/gluster/storage/management/gateway/tasks/MigrateBrickTask.java deleted file mode 100644 index b84f90f6..00000000 --- a/src/com.gluster.storage.management.gateway/src/com/gluster/storage/management/gateway/tasks/MigrateBrickTask.java +++ /dev/null @@ -1,260 +0,0 @@ -/** - * MigrateDiskTask.java - * - * Copyright (c) 2011 Gluster, Inc. <http://www.gluster.com> - * This file is part of Gluster Management Console. - * - * Gluster Management Console is free software; you can redistribute it and/or - * modify it under the terms of the GNU Affero General Public License as published - * by the Free Software Foundation; either version 3 of the License, or - * (at your option) any later version. - * - * Gluster Management Console is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY - * or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Affero General Public License - * for more details. - * - * You should have received a copy of the GNU Affero General Public License - * along with this program. If not, see - * <http://www.gnu.org/licenses/>. - */ -package com.gluster.storage.management.gateway.tasks; - -import org.springframework.beans.factory.annotation.Autowired; -import org.springframework.context.ApplicationContext; -import org.springframework.web.context.ContextLoader; - -import com.gluster.storage.management.core.exceptions.ConnectionException; -import com.gluster.storage.management.core.exceptions.GlusterRuntimeException; -import com.gluster.storage.management.core.model.Status; -import com.gluster.storage.management.core.model.TaskInfo.TASK_TYPE; -import com.gluster.storage.management.core.model.TaskStatus; -import com.gluster.storage.management.core.utils.ProcessResult; -import com.gluster.storage.management.gateway.services.ClusterService; -import com.gluster.storage.management.gateway.utils.GlusterUtil; -import com.gluster.storage.management.gateway.utils.ServerUtil; -import com.sun.jersey.core.util.Base64; - -public class MigrateBrickTask extends Task { - - private String fromBrick; - private String toBrick; - private Boolean autoCommit; - private GlusterUtil glusterUtil; - protected ServerUtil serverUtil; - - public String getFromBrick() { - return fromBrick; - } - - public void setFromBrick(String fromBrick) { - this.fromBrick = fromBrick; - } - - public String getToBrick() { - return toBrick; - } - - public void setToBrick(String toBrick) { - this.toBrick = toBrick; - } - - public Boolean getAutoCommit() { - return autoCommit; - } - - public void setAutoCommit(Boolean autoCommit) { - this.autoCommit = autoCommit; - } - - public MigrateBrickTask(ClusterService clusterService, String clusterName, String volumeName, String fromBrick, - String toBrick) { - super(clusterService, clusterName, TASK_TYPE.BRICK_MIGRATE, volumeName + "-" + fromBrick + "-" + toBrick, - "Brick Migration on volume [" + volumeName + "] from [" + fromBrick + "] to [" + toBrick + "]", true, - true, true); - setFromBrick(fromBrick); - setToBrick(toBrick); - taskInfo.setName(getId()); - init(); - } - - private void init() { - ApplicationContext ctx = ContextLoader.getCurrentWebApplicationContext(); - glusterUtil = ctx.getBean(GlusterUtil.class); - serverUtil = ctx.getBean(ServerUtil.class); - } - - @Override - public String getId() { - return new String(Base64.encode(clusterName + "-" + taskInfo.getType() + "-" + taskInfo.getReference() + "-" + fromBrick + "-" - + toBrick)); - } - - @Override - public void start() { - try { - startMigration(getOnlineServer().getName()); - } catch (Exception e) { - // check if online server has gone offline. If yes, try again one more time. - if (e instanceof ConnectionException || serverUtil.isServerOnline(getOnlineServer()) == false) { - // online server might have gone Offline. try with a new one. - startMigration(getNewOnlineServer().getName()); - } else { - throw new GlusterRuntimeException(e.getMessage()); - } - } - } - - private void startMigration(String onlineServerName) { - String volumeName = getTaskInfo().getReference().split("-")[0]; - ProcessResult processResult = glusterUtil.executeBrickMigration(onlineServerName, volumeName, - getFromBrick(), getToBrick(), "start"); - if (processResult.getOutput().trim().matches(".*started successfully$")) { - getTaskInfo().setStatus( - new TaskStatus(new Status(Status.STATUS_CODE_RUNNING, processResult.getOutput().trim()))); - return; - } - } - - @Override - public void pause() { - try { - pauseMigration(getOnlineServer().getName()); - } catch (Exception e) { - // check if online server has gone offline. If yes, try again one more time. - if (e instanceof ConnectionException || serverUtil.isServerOnline(getOnlineServer()) == false) { - // online server might have gone offline. try with a new one. - pauseMigration(getNewOnlineServer().getName()); - } else { - throw new GlusterRuntimeException(e.getMessage()); - } - } - } - - private void pauseMigration(String onlineServer) { - String volumeName = getTaskInfo().getReference().split("-")[0]; - ProcessResult processResult = glusterUtil.executeBrickMigration(onlineServer, volumeName, - getFromBrick(), getToBrick(), "pause"); - TaskStatus taskStatus = new TaskStatus(); - if (processResult.getOutput().trim().matches(".*paused successfully$")) { - taskStatus.setCode(Status.STATUS_CODE_PAUSE); - taskStatus.setMessage(processResult.getOutput()); - getTaskInfo().setStatus(taskStatus); - return; - } - } - - @Override - public void resume() { - start(); - } - - @Override - public void commit() { - try { - commitMigration(getOnlineServer().getName()); - } catch (Exception e) { - // check if online server has gone offline. If yes, try again one more time. - if (e instanceof ConnectionException || serverUtil.isServerOnline(getOnlineServer()) == false) { - // online server might have gone offline. try with a new one. - commitMigration(getNewOnlineServer().getName()); - } else { - throw new GlusterRuntimeException(e.getMessage()); - } - } - } - - private void commitMigration(String serverName) { - String volumeName = getTaskInfo().getReference().split("-")[0]; - ProcessResult processResult = glusterUtil.executeBrickMigration(serverName, volumeName, - getFromBrick(), getToBrick(), "commit"); - TaskStatus taskStatus = new TaskStatus(); - if (processResult.isSuccess()) { - if (processResult.getOutput().trim().matches(".*commit successful$")) { - taskStatus.setCode(Status.STATUS_CODE_SUCCESS); - taskStatus.setMessage(processResult.getOutput()); - getTaskInfo().setStatus(taskStatus); - } - } - } - - @Override - public void stop() { - try { - stopMigration(getOnlineServer().getName()); - } catch (Exception e) { - // check if online server has gone offline. If yes, try again one more time. - if (e instanceof ConnectionException || serverUtil.isServerOnline(getOnlineServer()) == false) { - // online server might have gone offline. try with a new one. - stopMigration(getNewOnlineServer().getName()); - } else { - throw new GlusterRuntimeException(e.getMessage()); - } - } - } - - private void stopMigration(String serverName) { - String volumeName = getTaskInfo().getReference().split("-")[0]; - ProcessResult processResult = glusterUtil.executeBrickMigration(serverName, volumeName, getFromBrick(), - getToBrick(), "abort"); - TaskStatus taskStatus = new TaskStatus(); - if (processResult.getOutput().trim().matches(".*aborted successfully$")) { - taskStatus.setCode(Status.STATUS_CODE_SUCCESS); - taskStatus.setMessage(processResult.getOutput()); - getTaskInfo().setStatus(taskStatus); - } - } - - @Override - public TaskStatus checkStatus() { - try { - return checkMigrationStatus(getOnlineServer().getName()); - } catch (Exception e) { - // check if online server has gone offline. If yes, try again one more time. - if (e instanceof ConnectionException || serverUtil.isServerOnline(getOnlineServer()) == false) { - // online server might have gone offline. try with a new one. - return checkMigrationStatus(getNewOnlineServer().getName()); - } - } - return null; - } - - private TaskStatus checkMigrationStatus(String serverName) { - // For committed task, status command (CLI) is invalid, just return current status - if (getTaskInfo().getStatus().getCode() == Status.STATUS_CODE_SUCCESS) { - return getTaskInfo().getStatus(); - } - - TaskStatus taskStatus = new TaskStatus(); - try { - String volumeName = getTaskInfo().getReference().split("-")[0]; - ProcessResult processResult = glusterUtil.executeBrickMigration(serverName, volumeName, - getFromBrick(), getToBrick(), "status"); - String output = processResult.getOutput().trim(); - if (output.matches("^Number of files migrated.*Migration complete$") - || output.matches("^Number of files migrated = 0 .*Current file=")) { - // Note: Workaround - if no file in the volume brick to migrate, - // Gluster CLI is not giving proper (complete) status - taskStatus.setCode(Status.STATUS_CODE_COMMIT_PENDING); - if (autoCommit) { - commitMigration(serverName); - return getTaskInfo().getStatus(); // return the committed status - } else { - taskStatus.setMessage(output.replaceAll("Migration complete", "Commit pending")); - } - } else if (output.matches("^Number of files migrated.*Current file=.*")) { - taskStatus.setCode(Status.STATUS_CODE_RUNNING); - } else if (output.matches("^replace brick has been paused.*")) { - taskStatus.setCode(Status.STATUS_CODE_PAUSE); - } else { - taskStatus.setCode(Status.STATUS_CODE_FAILURE); - } - taskStatus.setMessage(output); - } catch (Exception e) { - taskStatus.setCode(Status.STATUS_CODE_FAILURE); - taskStatus.setMessage(e.getMessage()); - } - taskInfo.setStatus(taskStatus); // Update the task status - return taskStatus; - } -} diff --git a/src/com.gluster.storage.management.gateway/src/com/gluster/storage/management/gateway/utils/CpuStatsFactory.java b/src/com.gluster.storage.management.gateway/src/com/gluster/storage/management/gateway/utils/CpuStatsFactory.java deleted file mode 100644 index b6ef9ef2..00000000 --- a/src/com.gluster.storage.management.gateway/src/com/gluster/storage/management/gateway/utils/CpuStatsFactory.java +++ /dev/null @@ -1,36 +0,0 @@ -/******************************************************************************* - * Copyright (c) 2011 Gluster, Inc. <http://www.gluster.com> - * This file is part of Gluster Management Console. - * - * Gluster Management Console is free software; you can redistribute it and/or - * modify it under the terms of the GNU Affero General Public License as published - * by the Free Software Foundation; either version 3 of the License, or - * (at your option) any later version. - * - * Gluster Management Console is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY - * or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Affero General Public License - * for more details. - * - * You should have received a copy of the GNU Affero General Public License - * along with this program. If not, see - * <http://www.gnu.org/licenses/>. - *******************************************************************************/ -package com.gluster.storage.management.gateway.utils; - -import org.springframework.stereotype.Component; - -/** - * - */ -@Component -public class CpuStatsFactory extends AbstractStatsFactory { - - private static final String CPU_STATS_SCRIPT = "get_rrd_cpu_details.py"; - - @Override - public String getStatsScriptName() { - return CPU_STATS_SCRIPT; - } - -} diff --git a/src/com.gluster.storage.management.gateway/src/com/gluster/storage/management/gateway/utils/GlusterUtil.java b/src/com.gluster.storage.management.gateway/src/com/gluster/storage/management/gateway/utils/GlusterUtil.java deleted file mode 100644 index d2366899..00000000 --- a/src/com.gluster.storage.management.gateway/src/com/gluster/storage/management/gateway/utils/GlusterUtil.java +++ /dev/null @@ -1,671 +0,0 @@ -/** - * GlusterUtil.java - * - * Copyright (c) 2011 Gluster, Inc. <http://www.gluster.com> - * This file is part of Gluster Management Console. - * - * Gluster Management Console is free software; you can redistribute it and/or - * modify it under the terms of the GNU Affero General Public License as published - * by the Free Software Foundation; either version 3 of the License, or - * (at your option) any later version. - * - * Gluster Management Console is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY - * or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Affero General Public License - * for more details. - * - * You should have received a copy of the GNU Affero General Public License - * along with this program. If not, see - * <http://www.gnu.org/licenses/>. - */ -package com.gluster.storage.management.gateway.utils; - -import java.io.File; -import java.util.ArrayList; -import java.util.List; -import java.util.Map; -import java.util.Map.Entry; - -import org.springframework.beans.factory.annotation.Autowired; -import org.springframework.stereotype.Component; - -import com.gluster.storage.management.core.constants.CoreConstants; -import com.gluster.storage.management.core.constants.GlusterConstants; -import com.gluster.storage.management.core.exceptions.GlusterRuntimeException; -import com.gluster.storage.management.core.model.Brick; -import com.gluster.storage.management.core.model.Brick.BRICK_STATUS; -import com.gluster.storage.management.core.model.GlusterServer; -import com.gluster.storage.management.core.model.InitDiskStatusResponse; -import com.gluster.storage.management.core.model.InitDiskStatusResponse.FORMAT_STATUS; -import com.gluster.storage.management.core.model.Server.SERVER_STATUS; -import com.gluster.storage.management.core.model.Status; -import com.gluster.storage.management.core.model.TaskStatus; -import com.gluster.storage.management.core.model.Volume; -import com.gluster.storage.management.core.model.Volume.TRANSPORT_TYPE; -import com.gluster.storage.management.core.model.Volume.VOLUME_STATUS; -import com.gluster.storage.management.core.model.Volume.VOLUME_TYPE; -import com.gluster.storage.management.core.utils.ProcessResult; -import com.gluster.storage.management.core.utils.StringUtil; -import com.gluster.storage.management.gateway.resources.v1_0.TasksResource; - -@Component -public class GlusterUtil { - private static final String glusterFSminVersion = "3.1"; - - private static final String HOSTNAME_PFX = "Hostname:"; - private static final String UUID_PFX = "Uuid:"; - private static final String STATE_PFX = "State:"; - private static final String GLUSTER_SERVER_STATUS_ONLINE = "Peer in Cluster (Connected)"; - - private static final String VOLUME_NAME_PFX = "Volume Name:"; - private static final String VOLUME_TYPE_PFX = "Type:"; - private static final String VOLUME_STATUS_PFX = "Status:"; - private static final String VOLUME_NUMBER_OF_BRICKS = "Number of Bricks:"; - private static final String VOLUME_TRANSPORT_TYPE_PFX = "Transport-type:"; - private static final String VOLUME_BRICKS_GROUP_PFX = "Bricks"; - private static final String VOLUME_OPTIONS_RECONFIG_PFX = "Options Reconfigured"; - private static final String VOLUME_LOG_LOCATION_PFX = "log file location:"; - private static final String VOLUME_TYPE_DISTRIBUTE = "Distribute"; - private static final String VOLUME_TYPE_REPLICATE = "Replicate"; - private static final String VOLUME_TYPE_DISTRIBUTED_REPLICATTE = "Distributed-Replicate"; - private static final String VOLUME_TYPE_STRIPE = "Stripe"; - private static final String VOLUME_TYPE_DISTRIBUTED_STRIPE = "Distributed-Stripe"; - - private static final String GLUSTERD_INFO_FILE = "/etc/glusterd/glusterd.info"; - - private static final String INITIALIZE_DISK_STATUS_SCRIPT = "get_format_device_status.py"; - private static final String BRICK_STATUS_SCRIPT = "get_brick_status.py"; - - @Autowired - private SshUtil sshUtil; - - @Autowired - private ServerUtil serverUtil; - - public void setSshUtil(SshUtil sshUtil) { - this.sshUtil = sshUtil; - } - - public SshUtil getSshUtil() { - return sshUtil; - } - - /** - * Extract value of given token from given line. It is assumed that the token, if present, will be of the following - * form: <code>token: value</code> - * - * @param line - * Line to be analyzed - * @param token - * Token whose value is to be extracted - * @return Value of the token, if present in the line - */ - private final String extractToken(String line, String token) { - if (line.contains(token)) { - return line.split(token)[1].trim(); - } - return null; - } - - public GlusterServer getGlusterServer(GlusterServer onlineServer, String serverName) { - List<GlusterServer> servers = getGlusterServers(onlineServer); - for (GlusterServer server : servers) { - if (server.getName().equalsIgnoreCase(serverName)) { - return server; - } - } - return null; - } - - private String getUuid(String serverName) { - ProcessResult result = getSshUtil().executeRemote(serverName, "cat " + GLUSTERD_INFO_FILE); - if (!result.isSuccess()) { - throw new GlusterRuntimeException("Couldn't read file [" + GLUSTERD_INFO_FILE + "]. Error: " - + result.toString()); - } - return result.getOutput().split("=")[1]; - } - - public List<GlusterServer> getGlusterServers(GlusterServer knownServer) { - String output = getPeerStatus(knownServer.getName()); - - knownServer.setUuid(getUuid(knownServer.getName())); - - List<GlusterServer> glusterServers = new ArrayList<GlusterServer>(); - glusterServers.add(knownServer); - - GlusterServer server = null; - boolean foundHost = false; - boolean foundUuid = false; - for (String line : output.split(CoreConstants.NEWLINE)) { - if (foundHost && foundUuid) { - // Host and UUID is found, we should look for state - String state = extractToken(line, STATE_PFX); - if (state != null) { - server.setStatus(state.contains(GLUSTER_SERVER_STATUS_ONLINE) ? SERVER_STATUS.ONLINE - : SERVER_STATUS.OFFLINE); - // Completed populating current server. Add it to the list - // and reset all related variables. - glusterServers.add(server); - - foundHost = false; - foundUuid = false; - server = null; - } - } else if (foundHost) { - // Host is found, look for UUID - String uuid = extractToken(line, UUID_PFX); - if (uuid != null) { - server.setUuid(uuid); - foundUuid = true; - } - } else { - // Look for the next host - if (server == null) { - server = new GlusterServer(); - } - String hostName = extractToken(line, HOSTNAME_PFX); - if (hostName != null) { - server.setName(hostName); - foundHost = true; - } - } - - } - return glusterServers; - } - - public List<String> getGlusterServerNames(String knownServer) { - String output = getPeerStatus(knownServer); - if (output == null) { - return null; - } - - List<String> glusterServerNames = new ArrayList<String>(); - for (String line : output.split(CoreConstants.NEWLINE)) { - String hostName = extractToken(line, HOSTNAME_PFX); - if (hostName != null) { - glusterServerNames.add(hostName); - } - } - return glusterServerNames; - } - - /** - * @param knownServer - * A known server on which the gluster command will be executed to fetch peer status - * @return Outout of the "gluster peer status" command - */ - private String getPeerStatus(String knownServer) { - ProcessResult result = getSshUtil().executeRemote(knownServer, "gluster peer status"); - if (!result.isSuccess()) { - throw new GlusterRuntimeException("Couldn't get peer status on server [" + knownServer + "]. Error: " - + result); - } - return result.getOutput(); - } - - public void addServer(String existingServer, String newServer) { - ProcessResult result = sshUtil.executeRemote(existingServer, "gluster peer probe " + newServer); - if(!result.isSuccess()) { - throw new GlusterRuntimeException("Couldn't probe server [" + newServer + "] from [" + existingServer - + "]. Error: " + result); - } - - // reverse peer probe to ensure that host names appear in peer status on both sides - result = sshUtil.executeRemote(newServer, "gluster peer probe " + existingServer); - if(!result.isSuccess()) { - throw new GlusterRuntimeException("Couldn't _reverse_ probe server [" + existingServer + "] from [" - + newServer + "]. Error: " + result); - } - } - - public void startVolume(String volumeName, String knownServer) { - ProcessResult result = sshUtil.executeRemote(knownServer, "gluster volume start " + volumeName); - if(!result.isSuccess()) { - throw new GlusterRuntimeException("Couldn't start volume [" + volumeName + "]! Error: " + result.toString()); - } - } - - public void stopVolume(String volumeName, String knownServer) { - ProcessResult result = sshUtil.executeRemote(knownServer, "gluster --mode=script volume stop " + volumeName); - if(!result.isSuccess()) { - throw new GlusterRuntimeException("Couldn't stop volume [" + volumeName + "]! Error: " + result.toString()); - } - } - - public void resetOptions(String volumeName, String knownServer) { - ProcessResult result = sshUtil.executeRemote(knownServer, "gluster volume reset " + volumeName); - if(!result.isSuccess()) { - throw new GlusterRuntimeException("Couldn't reset options for volume [" + volumeName + "]! Error: " - + result); - } - } - - public void createVolume(String knownServer, String volumeName, String volumeTypeStr, String transportTypeStr, - Integer count, String bricks, String accessProtocols, String options) { - - VOLUME_TYPE volType = Volume.getVolumeTypeByStr(volumeTypeStr); - String volTypeArg = null; - if (volType == VOLUME_TYPE.REPLICATE || volType == VOLUME_TYPE.DISTRIBUTED_REPLICATE) { - volTypeArg = "replica"; - } else if (volType == VOLUME_TYPE.STRIPE || volType == VOLUME_TYPE.DISTRIBUTED_STRIPE) { - volTypeArg = "stripe"; - } - - String transportTypeArg = null; - TRANSPORT_TYPE transportType = Volume.getTransportTypeByStr(transportTypeStr); - transportTypeArg = (transportType == TRANSPORT_TYPE.ETHERNET) ? "tcp" : "rdma"; - - String command = prepareVolumeCreateCommand(volumeName, StringUtil.extractList(bricks, ","), count, - volTypeArg, transportTypeArg); - - ProcessResult result = sshUtil.executeRemote(knownServer, command); - if (!result.isSuccess()) { - throw new GlusterRuntimeException("Error in creating volume [" + volumeName + "]: " + result); - } - - try { - createOptions(volumeName, StringUtil.extractMap(options, ",", "="), knownServer); - } catch(Exception e) { - throw new GlusterRuntimeException( - "Volume created successfully, however following errors occurred while setting options: " - + CoreConstants.NEWLINE + e.getMessage()); - } - } - - private String prepareVolumeCreateCommand(String volumeName, List<String> brickDirectories, int count, - String volumeType, String transportTypeStr) { - StringBuilder command = new StringBuilder("gluster volume create " + volumeName + " "); - if (volumeType != null) { - command.append(volumeType + " " + count + " "); - } - command.append("transport " + transportTypeStr); - for (String brickDir : brickDirectories) { - command.append(" " + brickDir); - } - return command.toString(); - } - - public void createOptions(String volumeName, Map<String, String> options, String knownServer) { - String errors = ""; - if (options != null) { - for (Entry<String, String> option : options.entrySet()) { - String key = option.getKey(); - String value = option.getValue(); - - try { - setOption(volumeName, key, value, knownServer); - } catch(Exception e) { - // append error - errors += e.getMessage() + CoreConstants.NEWLINE; - } - } - } - if (!errors.trim().isEmpty()) { - throw new GlusterRuntimeException("Errors while setting option(s) on volume [" + volumeName + "] : " - + errors.trim()); - } - } - - public void setOption(String volumeName, String key, String value, String knownServer) { - ProcessResult result = sshUtil.executeRemote(knownServer, "gluster volume set " + volumeName + " " + key + " " - + "\"" + value + "\""); - if (!result.isSuccess()) { - throw new GlusterRuntimeException("Volume [" + volumeName + "] set [" + key + "=" + value + "] => " - + result); - } - } - - public void deleteVolume(String volumeName, String knownServer) { - ProcessResult result = sshUtil.executeRemote(knownServer, "gluster --mode=script volume delete " + volumeName); - if (!result.isSuccess()) { - throw new GlusterRuntimeException("Couldn't delete volume [" + volumeName + "]! Error: " + result); - } - } - - private String getVolumeInfo(String volumeName, String knownServer) { - ProcessResult result = sshUtil.executeRemote(knownServer, "gluster volume info " + volumeName); - if (!result.isSuccess()) { - throw new GlusterRuntimeException("Command [gluster volume info " + volumeName + "] failed on [" - + knownServer + "] with error: " + result); - } - return result.getOutput(); - } - - private String getVolumeInfo(String knownServer) { - ProcessResult result = sshUtil.executeRemote(knownServer, "gluster volume info "); - if (!result.isSuccess()) { - throw new GlusterRuntimeException("Command [gluster volume info] failed on [" + knownServer - + "] with error: " + result); - } - return result.getOutput(); - } - - private boolean readVolumeType(Volume volume, String line) { - String volumeType = extractToken(line, VOLUME_TYPE_PFX); - if (volumeType != null) { - if (volumeType.equals(VOLUME_TYPE_DISTRIBUTE)) { - volume.setVolumeType(VOLUME_TYPE.DISTRIBUTE); - - } else if (volumeType.equals(VOLUME_TYPE_REPLICATE)) { - volume.setVolumeType(VOLUME_TYPE.REPLICATE); - volume.setReplicaCount(Volume.DEFAULT_REPLICA_COUNT); - - } else if ( volumeType.equals(VOLUME_TYPE_DISTRIBUTED_REPLICATTE) ){ - volume.setVolumeType(VOLUME_TYPE.DISTRIBUTED_REPLICATE); - volume.setReplicaCount(Volume.DEFAULT_REPLICA_COUNT); - - } else if ( volumeType.equals(VOLUME_TYPE_STRIPE) ){ - volume.setVolumeType(VOLUME_TYPE.STRIPE); - volume.setReplicaCount(Volume.DEFAULT_REPLICA_COUNT); - - } else if ( volumeType.equals(VOLUME_TYPE_DISTRIBUTED_STRIPE) ){ - volume.setVolumeType(VOLUME_TYPE.DISTRIBUTED_STRIPE); - volume.setReplicaCount(Volume.DEFAULT_STRIPE_COUNT); - } - return true; - } - return false; - } - - private void readReplicaOrStripeCount(Volume volume, String line) { - if (extractToken(line, "x") != null) { - // expected formated of line is "Number of Bricks: 3 x 2 = 6" - int count = Integer.parseInt(line.split("x")[1].split("=")[0].trim()); - if (volume.getVolumeType() == VOLUME_TYPE.STRIPE - || volume.getVolumeType() == VOLUME_TYPE.DISTRIBUTED_STRIPE) { - volume.setStripeCount(count); - } else if (volume.getVolumeType() == VOLUME_TYPE.REPLICATE - || volume.getVolumeType() == VOLUME_TYPE.DISTRIBUTED_REPLICATE) { - volume.setReplicaCount(count); - volume.setStripeCount(0); - } - } - return; - } - - private boolean readVolumeStatus(Volume volume, String line) { - String volumeStatus = extractToken(line, VOLUME_STATUS_PFX); - if (volumeStatus != null) { - volume.setStatus(volumeStatus.equals("Started") ? VOLUME_STATUS.ONLINE : VOLUME_STATUS.OFFLINE); - return true; - } - return false; - } - - private boolean readTransportType(Volume volume, String line) { - String transportType = extractToken(line, VOLUME_TRANSPORT_TYPE_PFX); - if (transportType != null) { - volume.setTransportType(transportType.equals("tcp") ? TRANSPORT_TYPE.ETHERNET : TRANSPORT_TYPE.INFINIBAND); - return true; - } - return false; - } - - private boolean readBrick(Volume volume, String brickLine) { - BRICK_STATUS brickStatus; - if (brickLine.matches("Brick[0-9]+:.*")) { - // line: "Brick1: server1:/export/md0/volume-name" - String brickName = brickLine.split(": ")[1]; - String[] brickParts = brickLine.split(":"); - String serverName = brickParts[1].trim(); - String brickDir = brickParts[2].trim(); - //To get the brick status - brickStatus = getBrickStatus(serverName, volume.getName(), brickName); - - addBrickToVolume(volume, serverName, brickDir, brickStatus); - return true; - } - return false; - } - - private void addBrickToVolume(Volume volume, String serverName, String brickDir, BRICK_STATUS status) { - volume.addBrick(new Brick(serverName, status, brickDir)); - } - - // Do not throw exception, Gracefully handle as Offline brick. - private BRICK_STATUS getBrickStatus(String serverName, String volumeName, String brick){ - try { - String output = serverUtil.executeScriptOnServer(true, serverName, BRICK_STATUS_SCRIPT + " " + volumeName - + " " + brick, String.class); - if (output.equals(CoreConstants.ONLINE)) { - return BRICK_STATUS.ONLINE; - } else { - return BRICK_STATUS.OFFLINE; - } - } catch(Exception e) { // Particularly interested on ConnectionExecption, if the server is offline - return BRICK_STATUS.OFFLINE; - } - } - - private boolean readBrickGroup(String line) { - return extractToken(line, VOLUME_BRICKS_GROUP_PFX) != null; - } - - private boolean readOptionReconfigGroup(String line) { - return extractToken(line, VOLUME_OPTIONS_RECONFIG_PFX) != null; - } - - private boolean readOption(Volume volume, String line) { - if (line.matches("^[^:]*:.*$")) { - int index = line.indexOf(':'); - volume.setOption(line.substring(0, index).trim(), line.substring(index + 1, line.length()).trim()); - - if (line.substring(0, index).trim().equals(Volume.OPTION_NFS_DISABLE)) { - if (line.substring(index + 1, line.length()).trim().equals(GlusterConstants.ON)) { - volume.disableNFS(); - } else { - volume.enableNFS(); - } - } - - return true; - } - return false; - } - - public Volume getVolume(String volumeName, String knownServer) { - return parseVolumeInfo(getVolumeInfo(volumeName, knownServer)).get(0); - } - - public List<Volume> getAllVolumes(String knownServer) { - return parseVolumeInfo(getVolumeInfo(knownServer)); - } - - private List<Volume> parseVolumeInfo(String volumeInfoText) { - List<Volume> volumes = new ArrayList<Volume>(); - boolean isBricksGroupFound = false; - boolean isOptionReconfigFound = false; - Volume volume = null; - - for (String line : volumeInfoText.split(CoreConstants.NEWLINE)) { - String volumeName = extractToken(line, VOLUME_NAME_PFX); - if (volumeName != null) { - if (volume != null) { - volumes.add(volume); - } - - // prepare next volume to be read - volume = new Volume(); - volume.setName(volumeName); - isBricksGroupFound = isOptionReconfigFound = false; - continue; - } - - if (readVolumeType(volume, line)) - continue; - if (extractToken(line, VOLUME_NUMBER_OF_BRICKS) != null) { - readReplicaOrStripeCount(volume, line); - } - if (readVolumeStatus(volume, line)) - continue; - if (readTransportType(volume, line)) - continue; - if (readBrickGroup(line)) { - isBricksGroupFound = true; - continue; - } - - if (isBricksGroupFound) { - if (readBrick(volume, line)) { - continue; - } else { - isBricksGroupFound = false; - } - } - - if (readOptionReconfigGroup(line)) { - isOptionReconfigFound = true; - continue; - } - - if (isOptionReconfigFound) { - if (readOption(volume, line)) { - continue; - } else { - isOptionReconfigFound = false; - } - } - } - - // add the last read volume - if (volume != null) { - volumes.add(volume); - } - - return volumes; - } - - public void addBricks(String volumeName, List<String> bricks, String knownServer) { - StringBuilder command = new StringBuilder("gluster volume add-brick " + volumeName); - for (String brickDir : bricks) { - command.append(" " + brickDir); - } - - ProcessResult result = sshUtil.executeRemote(knownServer, command.toString()); - if(!result.isSuccess()) { - throw new GlusterRuntimeException("Error in volume [" + volumeName + "] add-brick [" + bricks + "]: " - + result); - } - } - - public String getLogLocation(String volumeName, String brickName, String knownServer) { - String command = "gluster volume log locate " + volumeName + " " + brickName; - ProcessResult result = sshUtil.executeRemote(knownServer, command); - if (!result.isSuccess()) { - throw new GlusterRuntimeException("Command [" + command + "] failed with error: [" + result.getExitValue() - + "][" + result.getOutput() + "]"); - } - String output = result.getOutput(); - if (output.startsWith(VOLUME_LOG_LOCATION_PFX)) { - return output.substring(VOLUME_LOG_LOCATION_PFX.length()).trim(); - } - - throw new GlusterRuntimeException("Couldn't parse output of command [" + command + "]. Output [" + output - + "] doesn't start with prefix [" + VOLUME_LOG_LOCATION_PFX + "]"); - } - - //TODO File.separator should be changed if gateway runs on windows/mac - public String getLogFileNameForBrickDir(String brickDir) { - String logFileName = brickDir; - if (logFileName.startsWith(File.separator)) { - logFileName = logFileName.replaceFirst(File.separator, ""); - } - logFileName = logFileName.replaceAll(File.separator, "-") + ".log"; - return logFileName; - } - - public void removeBricks(String volumeName, List<String> bricks, String knownServer) { - StringBuilder command = new StringBuilder("gluster --mode=script volume remove-brick " + volumeName); - for (String brickDir : bricks) { - command.append(" " + brickDir); - } - ProcessResult result = sshUtil.executeRemote(knownServer, command.toString()); - if(!result.isSuccess()) { - throw new GlusterRuntimeException(result.toString()); - } - } - - public void removeServer(String existingServer, String serverName) { - ProcessResult result = sshUtil.executeRemote(existingServer, "gluster --mode=script peer detach " + serverName); - if(!result.isSuccess()) { - throw new GlusterRuntimeException("Couldn't remove server [" + serverName + "]! Error: " + result); - } - } - - public TaskStatus checkRebalanceStatus(String serverName, String volumeName) { - String command = "gluster volume rebalance " + volumeName + " status"; - ProcessResult processResult = sshUtil.executeRemote(serverName, command); - TaskStatus taskStatus = new TaskStatus(); - if (processResult.isSuccess()) { - if (processResult.getOutput().trim().matches("^rebalance completed.*")) { - taskStatus.setCode(Status.STATUS_CODE_SUCCESS); - } else if(processResult.getOutput().trim().matches(".*in progress.*")) { - taskStatus.setCode(Status.STATUS_CODE_RUNNING); - } else { - taskStatus.setCode(Status.STATUS_CODE_FAILURE); - } - } else { - taskStatus.setCode(Status.STATUS_CODE_FAILURE); - } - taskStatus.setMessage(processResult.getOutput()); // Common - return taskStatus; - } - - public void stopRebalance(String serverName, String volumeName) { - String command = "gluster volume rebalance " + volumeName + " stop"; - ProcessResult processResult = sshUtil.executeRemote(serverName, command); - TaskStatus taskStatus = new TaskStatus(); - if (processResult.isSuccess()) { - taskStatus.setCode(Status.STATUS_CODE_SUCCESS); - taskStatus.setMessage(processResult.getOutput()); - } - } - - public TaskStatus getInitializingDeviceStatus(String serverName, String diskName) { - InitDiskStatusResponse initDiskStatusResponse; - TaskStatus taskStatus = new TaskStatus(); - - try { - initDiskStatusResponse = serverUtil.executeScriptOnServer(true, serverName, INITIALIZE_DISK_STATUS_SCRIPT + " " - + diskName, InitDiskStatusResponse.class); - } catch(RuntimeException e) { - taskStatus.setCode(Status.STATUS_CODE_FAILURE); - taskStatus.setMessage(e.getMessage()); - throw e; - } - - if (initDiskStatusResponse.getFormatStatus() == FORMAT_STATUS.COMPLETED) { - taskStatus.setCode(Status.STATUS_CODE_SUCCESS); - } else if (initDiskStatusResponse.getFormatStatus() == FORMAT_STATUS.IN_PROGRESS) { - taskStatus.setCode(Status.STATUS_CODE_RUNNING); - taskStatus.setPercentCompleted(Math.round(initDiskStatusResponse.getCompletedBlocks() - / initDiskStatusResponse.getTotalBlocks() * 100)); - } else if(initDiskStatusResponse.getFormatStatus() == FORMAT_STATUS.NOT_RUNNING) { - taskStatus.setCode(Status.STATUS_CODE_FAILURE); - } - - taskStatus.setMessage(initDiskStatusResponse.getMessage()); - return taskStatus; - } - - public ProcessResult executeBrickMigration(String onlineServerName, String volumeName, String fromBrick, - String toBrick, String operation) { - String command = "gluster volume replace-brick " + volumeName + " " + fromBrick + " " + toBrick + " " + operation; - ProcessResult processResult = sshUtil.executeRemote(onlineServerName, command); - if (!processResult.isSuccess()) { - throw new GlusterRuntimeException(processResult.toString()); - } - return processResult; - } - - public static void main(String args[]) { - // List<String> names = new GlusterUtil().getGlusterServerNames(); - // System.out.println(names); - List<String> disks = new ArrayList<String>(); - disks.add("server1:sda"); - disks.add("server1:sdb"); - new GlusterUtil().addBricks("Volume3", disks, "localhost"); - } -} diff --git a/src/com.gluster.storage.management.gateway/src/com/gluster/storage/management/gateway/utils/StatsFactory.java b/src/com.gluster.storage.management.gateway/src/com/gluster/storage/management/gateway/utils/StatsFactory.java deleted file mode 100644 index 09851367..00000000 --- a/src/com.gluster.storage.management.gateway/src/com/gluster/storage/management/gateway/utils/StatsFactory.java +++ /dev/null @@ -1,31 +0,0 @@ -/******************************************************************************* - * Copyright (c) 2011 Gluster, Inc. <http://www.gluster.com> - * This file is part of Gluster Management Console. - * - * Gluster Management Console is free software; you can redistribute it and/or - * modify it under the terms of the GNU Affero General Public License as published - * by the Free Software Foundation; either version 3 of the License, or - * (at your option) any later version. - * - * Gluster Management Console is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY - * or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Affero General Public License - * for more details. - * - * You should have received a copy of the GNU Affero General Public License - * along with this program. If not, see - * <http://www.gnu.org/licenses/>. - *******************************************************************************/ -package com.gluster.storage.management.gateway.utils; - -import java.util.List; - -import com.gluster.storage.management.core.model.ServerStats; - -/** - * - */ -public interface StatsFactory { - public ServerStats fetchStats(String serverName, String period, String...args); - public ServerStats fetchAggregatedStats(List<String> serverName, String period); -} diff --git a/src/com.gluster.storage.management.gateway/src/log4j.properties b/src/com.gluster.storage.management.gateway/src/log4j.properties deleted file mode 100644 index bde9e66f..00000000 --- a/src/com.gluster.storage.management.gateway/src/log4j.properties +++ /dev/null @@ -1,20 +0,0 @@ -log4j.rootLogger=INFO, R - -log4j.appender.CONSOLE=org.apache.log4j.ConsoleAppender -log4j.appender.CONSOLE.immediateFlush=true -log4j.appender.CONSOLE.target=System.out -log4j.appender.CONSOLE.threshold=DEBUG -log4j.appender.CONSOLE.layout=org.apache.log4j.PatternLayout -log4j.appender.CONSOLE.layout.ConversionPattern=%d{dd MMM, yyyy HH:mm:ss} %p: %c %t - %m%n - -log4j.appender.R=org.apache.log4j.RollingFileAppender -log4j.appender.R.File=/var/log/glustermg/glustermg.log -log4j.appender.R.MaxFileSize=10MB -log4j.appender.R.MaxBackupIndex=10 -log4j.appender.R.layout=org.apache.log4j.PatternLayout -log4j.appender.R.layout.ConversionPattern=%d{dd MMM, yyyy HH:mm:ss} %p: %c %t - %m%n -#log4j.appender.R.layout.ConversionPattern=%p %t %c - %m%n - -log4j.logger.org=ERROR -log4j.logger.com=ERROR -log4j.logger.com.gluster=DEBUG
\ No newline at end of file diff --git a/src/com.gluster.storage.management.releng/build.properties b/src/com.gluster.storage.management.releng/build.properties deleted file mode 100644 index 64f93a9f..00000000 --- a/src/com.gluster.storage.management.releng/build.properties +++ /dev/null @@ -1 +0,0 @@ -bin.includes = feature.xml diff --git a/src/com.gluster.storage.management.releng/com.gluster.storage.management.client.cquery b/src/com.gluster.storage.management.releng/com.gluster.storage.management.client.cquery deleted file mode 100644 index 7bb4b868..00000000 --- a/src/com.gluster.storage.management.releng/com.gluster.storage.management.client.cquery +++ /dev/null @@ -1,4 +0,0 @@ -<?xml version="1.0" encoding="UTF-8"?> -<cq:componentQuery xmlns:cq="http://www.eclipse.org/buckminster/CQuery-1.0" resourceMap="glustermc.rmap"> - <cq:rootRequest name="com.gluster.storage.management.core" componentType="osgi.bundle"/> -</cq:componentQuery> diff --git a/src/com.gluster.storage.management.releng/com.gluster.storage.management.console.feature.webstart.cquery b/src/com.gluster.storage.management.releng/com.gluster.storage.management.console.feature.webstart.cquery deleted file mode 100644 index ffd8dec8..00000000 --- a/src/com.gluster.storage.management.releng/com.gluster.storage.management.console.feature.webstart.cquery +++ /dev/null @@ -1,4 +0,0 @@ -<?xml version="1.0" encoding="UTF-8"?> -<cq:componentQuery xmlns:cq="http://www.eclipse.org/buckminster/CQuery-1.0" resourceMap="glustermc.rmap"> - <cq:rootRequest name="com.gluster.storage.management.console.feature.webstart" componentType="eclipse.feature"/> -</cq:componentQuery> diff --git a/src/com.gluster.storage.management.releng/com.gluster.storage.management.core.cquery b/src/com.gluster.storage.management.releng/com.gluster.storage.management.core.cquery deleted file mode 100644 index a97d350d..00000000 --- a/src/com.gluster.storage.management.releng/com.gluster.storage.management.core.cquery +++ /dev/null @@ -1,4 +0,0 @@ -<?xml version="1.0" encoding="UTF-8"?> -<cq:componentQuery xmlns:cq="http://www.eclipse.org/buckminster/CQuery-1.0" resourceMap="glustermc.rmap"> - <cq:rootRequest name="com.gluster.storage.management.client" componentType="osgi.bundle"/> -</cq:componentQuery> diff --git a/src/com.gluster.storage.management.releng/com.gluster.storage.management.gateway.cquery b/src/com.gluster.storage.management.releng/com.gluster.storage.management.gateway.cquery deleted file mode 100644 index 1f663cbe..00000000 --- a/src/com.gluster.storage.management.releng/com.gluster.storage.management.gateway.cquery +++ /dev/null @@ -1,4 +0,0 @@ -<?xml version="1.0" encoding="UTF-8"?> -<cq:componentQuery xmlns:cq="http://www.eclipse.org/buckminster/CQuery-1.0" resourceMap="glustermc.rmap"> - <cq:rootRequest name="com.gluster.storage.management.gateway" componentType="unknown"/> -</cq:componentQuery> diff --git a/src/com.gluster.storage.management.releng/feature.xml b/src/com.gluster.storage.management.releng/feature.xml deleted file mode 100644 index 22a0938f..00000000 --- a/src/com.gluster.storage.management.releng/feature.xml +++ /dev/null @@ -1,20 +0,0 @@ -<?xml version="1.0" encoding="UTF-8"?> -<feature - id="com.gluster.storage.management.releng" - label="Releng" - version="1.0.0" - provider-name="Gluster Inc."> - - <description url="http://www.example.com/description"> - [Enter Feature Description here.] - </description> - - <copyright url="http://www.example.com/copyright"> - [Enter Copyright Description here.] - </copyright> - - <license url="http://www.example.com/license"> - [Enter License Description here.] - </license> - -</feature> diff --git a/src/com.gluster.storage.management.releng/gluster-management-console.target b/src/com.gluster.storage.management.releng/gluster-management-console.target deleted file mode 100644 index 0cf996d8..00000000 --- a/src/com.gluster.storage.management.releng/gluster-management-console.target +++ /dev/null @@ -1,14 +0,0 @@ -<?xml version="1.0" encoding="UTF-8" standalone="no"?> -<?pde version="3.6"?> - -<target includeMode="feature" name="Gluster Storage Platform Target"> -<locations> -<location path="target/com.gluster.storage.management.console.target/rcp.sdk.helios.SR1" type="Directory"/> -<location path="target/com.gluster.storage.management.console.target/richclientgui.rcptoolbox" type="Directory"/> -<location path="target/com.gluster.storage.management.console.target/birt.charts.helios" type="Directory"/> -<location path="target/com.gluster.storage.management.console.target/delta.pack.helios" type="Directory"/> -<location path="target/com.gluster.storage.management.console.target/org.eclipse.help" type="Directory"/> -<location path="target/com.gluster.storage.management.console.target/org.eclipse.tm.terminal" type="Directory"/> -</locations> -<targetJRE path="org.eclipse.jdt.launching.JRE_CONTAINER/org.eclipse.jdt.internal.debug.ui.launcher.StandardVMType/JavaSE-1.6"/> -</target> diff --git a/src/com.gluster.storage.management.releng/glustermc.rmap b/src/com.gluster.storage.management.releng/glustermc.rmap deleted file mode 100644 index 73df2b06..00000000 --- a/src/com.gluster.storage.management.releng/glustermc.rmap +++ /dev/null @@ -1,12 +0,0 @@ -<?xml version="1.0" encoding="UTF-8"?> -<rm:rmap xmlns:bc="http://www.eclipse.org/buckminster/Common-1.0" xmlns:rm="http://www.eclipse.org/buckminster/RMap-1.0"> - <rm:locator searchPathRef="glustermc"/> - <rm:searchPath name="glustermc"> - <rm:provider componentTypes="osgi.bundle,eclipse.feature,unknown" readerType="local"> - <rm:uri format="file:///{0}/src/{1}/"> - <bc:propertyRef key="workspace.root"/> - <bc:propertyRef key="buckminster.component"/> - </rm:uri> - </rm:provider> - </rm:searchPath> -</rm:rmap> diff --git a/src/com.gluster.storage.management.releng/glustermc_build.properties b/src/com.gluster.storage.management.releng/glustermc_build.properties deleted file mode 100644 index d50782d8..00000000 --- a/src/com.gluster.storage.management.releng/glustermc_build.properties +++ /dev/null @@ -1,14 +0,0 @@ -# Buckminster build properties file for Gluster Management Console - -# Where all the output should go -#buckminster.output.root=/tmp/buckminster/glustermc -# Where the temp files should go -#buckminster.temp.root=/tmp/buckminster -# How .qualifier in versions should be replaced -qualifier.replacement.*=generator:lastRevision - -# Do not include source -cbi.include.source=false - -# Sets the Java compiler compliance level -org.eclipse.buckminster.core.jdt.compliancelevel=1.6 diff --git a/src/com.gluster.storage.management.client/.classpath b/src/org.gluster.storage.management.client/.classpath index d81daeeb..9e3c9ce6 100644 --- a/src/com.gluster.storage.management.client/.classpath +++ b/src/org.gluster.storage.management.client/.classpath @@ -1,12 +1,12 @@ <?xml version="1.0" encoding="UTF-8"?> <classpath> <classpathentry exported="true" kind="lib" path="lib/jersey-1.5/jersey-multipart-1.5.jar"/> - <classpathentry exported="true" kind="lib" path="keystore/"/> <classpathentry exported="true" kind="lib" path="lib/jersey-1.5/jersey-client-1.5.jar" sourcepath="/data/downloads/sun/jersey/sources/jersey-client-1.5-sources.jar"/> <classpathentry exported="true" kind="lib" path="lib/jersey-1.5/jersey-core-1.5.jar" sourcepath="/home/selvam/sources/jersey/jersey-core-1.5-sources.jar"/> <classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER/org.eclipse.jdt.internal.debug.ui.launcher.StandardVMType/JavaSE-1.6"/> <classpathentry kind="con" path="org.eclipse.pde.core.requiredPlugins"/> <classpathentry excluding="keystore/" kind="src" path="src"/> - <classpathentry combineaccessrules="false" kind="src" path="/com.gluster.storage.management.core"/> + <classpathentry kind="src" path="keystore"/> + <classpathentry combineaccessrules="false" kind="src" path="/org.gluster.storage.management.core"/> <classpathentry kind="output" path="bin"/> </classpath> diff --git a/src/com.gluster.storage.management.console/.project b/src/org.gluster.storage.management.client/.project index 8a79d266..e8da4675 100644 --- a/src/com.gluster.storage.management.console/.project +++ b/src/org.gluster.storage.management.client/.project @@ -1,6 +1,6 @@ <?xml version="1.0" encoding="UTF-8"?> <projectDescription> - <name>com.gluster.storage.management.console</name> + <name>org.gluster.storage.management.client</name> <comment></comment> <projects> </projects> @@ -20,9 +20,15 @@ <arguments> </arguments> </buildCommand> + <buildCommand> + <name>com.instantiations.assist.eclipse.coverage.instrumentationBuilder</name> + <arguments> + </arguments> + </buildCommand> </buildSpec> <natures> <nature>org.eclipse.pde.PluginNature</nature> <nature>org.eclipse.jdt.core.javanature</nature> + <nature>com.instantiations.assist.eclipse.coverage.codeCoverageNature</nature> </natures> </projectDescription> diff --git a/src/com.gluster.storage.management.client/.settings/org.eclipse.jdt.core.prefs b/src/org.gluster.storage.management.client/.settings/org.eclipse.jdt.core.prefs index f8b5cc38..f8b5cc38 100644 --- a/src/com.gluster.storage.management.client/.settings/org.eclipse.jdt.core.prefs +++ b/src/org.gluster.storage.management.client/.settings/org.eclipse.jdt.core.prefs diff --git a/src/com.gluster.storage.management.client/META-INF/MANIFEST.MF b/src/org.gluster.storage.management.client/META-INF/MANIFEST.MF index 7958d8cd..0b7ada61 100644 --- a/src/com.gluster.storage.management.client/META-INF/MANIFEST.MF +++ b/src/org.gluster.storage.management.client/META-INF/MANIFEST.MF @@ -1,14 +1,14 @@ Manifest-Version: 1.0 Bundle-ManifestVersion: 2 Bundle-Name: Gluster Storage Platform Client -Bundle-SymbolicName: com.gluster.storage.management.client -Bundle-Version: 1.0.0 -Bundle-Vendor: GLUSTER +Bundle-SymbolicName: org.gluster.storage.management.client +Bundle-Version: 1.0.0.qualifier +Bundle-Vendor: Gluster Bundle-RequiredExecutionEnvironment: JavaSE-1.6 -Require-Bundle: com.gluster.storage.management.core;bundle-version="1.0.0", +Require-Bundle: org.gluster.storage.management.core;bundle-version="1.0.0", org.eclipse.equinox.common;bundle-version="3.6.0" -Export-Package: com.gluster.storage.management.client, - com.gluster.storage.management.client.constants +Export-Package: org.gluster.storage.management.client, + org.gluster.storage.management.client.constants Bundle-ClassPath: ., lib/jersey-1.5/jersey-client-1.5.jar, lib/jersey-1.5/jersey-core-1.5.jar, diff --git a/src/org.gluster.storage.management.client/build.properties b/src/org.gluster.storage.management.client/build.properties new file mode 100644 index 00000000..fe37f4ee --- /dev/null +++ b/src/org.gluster.storage.management.client/build.properties @@ -0,0 +1,27 @@ +############################################################################### +# Copyright (c) 2006-2011 Gluster, Inc. <http://www.gluster.com> +# This file is part of Gluster Management Console. +# +# Gluster Management Console is free software; you can redistribute +# it and/or modify it under the terms of the GNU General Public +# License as published by the Free Software Foundation; either +# version 3 of the License, or (at your option) any later version. +# +# Gluster Management Console is distributed in the hope that it +# will be useful, but WITHOUT ANY WARRANTY; without even the +# implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR +# PURPOSE. See the GNU General Public License for more details. +# +# You should have received a copy of the GNU General Public License +# along with this program. If not, see +# <http://www.gnu.org/licenses/>. +############################################################################### +source.. = src/,\ + keystore/ +output.. = bin/ +bin.includes = .,\ + META-INF/,\ + lib/,\ + keystore/,\ + lib/jersey-1.5/jersey-multipart-1.5.jar +src.includes = lib/ diff --git a/src/com.gluster.storage.management.client/keystore/gmc-trusted.keystore b/src/org.gluster.storage.management.client/keystore/gmc-trusted.keystore Binary files differindex 5517b6e5..5517b6e5 100644 --- a/src/com.gluster.storage.management.client/keystore/gmc-trusted.keystore +++ b/src/org.gluster.storage.management.client/keystore/gmc-trusted.keystore diff --git a/src/org.gluster.storage.management.client/lib/jersey-1.5/Jersey-LICENSE.txt b/src/org.gluster.storage.management.client/lib/jersey-1.5/Jersey-LICENSE.txt new file mode 100644 index 00000000..d24fbfdb --- /dev/null +++ b/src/org.gluster.storage.management.client/lib/jersey-1.5/Jersey-LICENSE.txt @@ -0,0 +1,135 @@ +The GNU General Public License (GPL) Version 2, June 1991 + + +Copyright (C) 1989, 1991 Free Software Foundation, Inc. 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA + +Everyone is permitted to copy and distribute verbatim copies of this license document, but changing it is not allowed. + +Preamble + +The licenses for most software are designed to take away your freedom to share and change it. By contrast, the GNU General Public License is intended to guarantee your freedom to share and change free software--to make sure the software is free for all its users. This General Public License applies to most of the Free Software Foundation's software and to any other program whose authors commit to using it. (Some other Free Software Foundation software is covered by the GNU Library General Public License instead.) You can apply it to your programs, too. + +When we speak of free software, we are referring to freedom, not price. Our General Public Licenses are designed to make sure that you have the freedom to distribute copies of free software (and charge for this service if you wish), that you receive source code or can get it if you want it, that you can change the software or use pieces of it in new free programs; and that you know you can do these things. + +To protect your rights, we need to make restrictions that forbid anyone to deny you these rights or to ask you to surrender the rights. These restrictions translate to certain responsibilities for you if you distribute copies of the software, or if you modify it. + +For example, if you distribute copies of such a program, whether gratis or for a fee, you must give the recipients all the rights that you have. You must make sure that they, too, receive or can get the source code. And you must show them these terms so they know their rights. + +We protect your rights with two steps: (1) copyright the software, and (2) offer you this license which gives you legal permission to copy, distribute and/or modify the software. + +Also, for each author's protection and ours, we want to make certain that everyone understands that there is no warranty for this free software. If the software is modified by someone else and passed on, we want its recipients to know that what they have is not the original, so that any problems introduced by others will not reflect on the original authors' reputations. + +Finally, any free program is threatened constantly by software patents. We wish to avoid the danger that redistributors of a free program will individually obtain patent licenses, in effect making the program proprietary. To prevent this, we have made it clear that any patent must be licensed for everyone's free use or not licensed at all. + +The precise terms and conditions for copying, distribution and modification follow. + + +TERMS AND CONDITIONS FOR COPYING, DISTRIBUTION AND MODIFICATION + +0. This License applies to any program or other work which contains a notice placed by the copyright holder saying it may be distributed under the terms of this General Public License. The "Program", below, refers to any such program or work, and a "work based on the Program" means either the Program or any derivative work under copyright law: that is to say, a work containing the Program or a portion of it, either verbatim or with modifications and/or translated into another language. (Hereinafter, translation is included without limitation in the term "modification".) Each licensee is addressed as "you". + +Activities other than copying, distribution and modification are not covered by this License; they are outside its scope. The act of running the Program is not restricted, and the output from the Program is covered only if its contents constitute a work based on the Program (independent of having been made by running the Program). Whether that is true depends on what the Program does. + +1. You may copy and distribute verbatim copies of the Program's source code as you receive it, in any medium, provided that you conspicuously and appropriately publish on each copy an appropriate copyright notice and disclaimer of warranty; keep intact all the notices that refer to this License and to the absence of any warranty; and give any other recipients of the Program a copy of this License along with the Program. + +You may charge a fee for the physical act of transferring a copy, and you may at your option offer warranty protection in exchange for a fee. + +2. You may modify your copy or copies of the Program or any portion of it, thus forming a work based on the Program, and copy and distribute such modifications or work under the terms of Section 1 above, provided that you also meet all of these conditions: + + a) You must cause the modified files to carry prominent notices stating that you changed the files and the date of any change. + + b) You must cause any work that you distribute or publish, that in whole or in part contains or is derived from the Program or any part thereof, to be licensed as a whole at no charge to all third parties under the terms of this License. + + c) If the modified program normally reads commands interactively when run, you must cause it, when started running for such interactive use in the most ordinary way, to print or display an announcement including an appropriate copyright notice and a notice that there is no warranty (or else, saying that you provide a warranty) and that users may redistribute the program under these conditions, and telling the user how to view a copy of this License. (Exception: if the Program itself is interactive but does not normally print such an announcement, your work based on the Program is not required to print an announcement.) + +These requirements apply to the modified work as a whole. If identifiable sections of that work are not derived from the Program, and can be reasonably considered independent and separate works in themselves, then this License, and its terms, do not apply to those sections when you distribute them as separate works. But when you distribute the same sections as part of a whole which is a work based on the Program, the distribution of the whole must be on the terms of this License, whose permissions for other licensees extend to the entire whole, and thus to each and every part regardless of who wrote it. + +Thus, it is not the intent of this section to claim rights or contest your rights to work written entirely by you; rather, the intent is to exercise the right to control the distribution of derivative or collective works based on the Program. + +In addition, mere aggregation of another work not based on the Program with the Program (or with a work based on the Program) on a volume of a storage or distribution medium does not bring the other work under the scope of this License. + +3. You may copy and distribute the Program (or a work based on it, under Section 2) in object code or executable form under the terms of Sections 1 and 2 above provided that you also do one of the following: + + a) Accompany it with the complete corresponding machine-readable source code, which must be distributed under the terms of Sections 1 and 2 above on a medium customarily used for software interchange; or, + + b) Accompany it with a written offer, valid for at least three years, to give any third party, for a charge no more than your cost of physically performing source distribution, a complete machine-readable copy of the corresponding source code, to be distributed under the terms of Sections 1 and 2 above on a medium customarily used for software interchange; or, + + c) Accompany it with the information you received as to the offer to distribute corresponding source code. (This alternative is allowed only for noncommercial distribution and only if you received the program in object code or executable form with such an offer, in accord with Subsection b above.) + +The source code for a work means the preferred form of the work for making modifications to it. For an executable work, complete source code means all the source code for all modules it contains, plus any associated interface definition files, plus the scripts used to control compilation and installation of the executable. However, as a special exception, the source code distributed need not include anything that is normally distributed (in either source or binary form) with the major components (compiler, kernel, and so on) of the operating system on which the executable runs, unless that component itself accompanies the executable. + +If distribution of executable or object code is made by offering access to copy from a designated place, then offering equivalent access to copy the source code from the same place counts as distribution of the source code, even though third parties are not compelled to copy the source along with the object code. + +4. You may not copy, modify, sublicense, or distribute the Program except as expressly provided under this License. Any attempt otherwise to copy, modify, sublicense or distribute the Program is void, and will automatically terminate your rights under this License. However, parties who have received copies, or rights, from you under this License will not have their licenses terminated so long as such parties remain in full compliance. + +5. You are not required to accept this License, since you have not signed it. However, nothing else grants you permission to modify or distribute the Program or its derivative works. These actions are prohibited by law if you do not accept this License. Therefore, by modifying or distributing the Program (or any work based on the Program), you indicate your acceptance of this License to do so, and all its terms and conditions for copying, distributing or modifying the Program or works based on it. + +6. Each time you redistribute the Program (or any work based on the Program), the recipient automatically receives a license from the original licensor to copy, distribute or modify the Program subject to these terms and conditions. You may not impose any further restrictions on the recipients' exercise of the rights granted herein. You are not responsible for enforcing compliance by third parties to this License. + +7. If, as a consequence of a court judgment or allegation of patent infringement or for any other reason (not limited to patent issues), conditions are imposed on you (whether by court order, agreement or otherwise) that contradict the conditions of this License, they do not excuse you from the conditions of this License. If you cannot distribute so as to satisfy simultaneously your obligations under this License and any other pertinent obligations, then as a consequence you may not distribute the Program at all. For example, if a patent license would not permit royalty-free redistribution of the Program by all those who receive copies directly or indirectly through you, then the only way you could satisfy both it and this License would be to refrain entirely from distribution of the Program. + +If any portion of this section is held invalid or unenforceable under any particular circumstance, the balance of the section is intended to apply and the section as a whole is intended to apply in other circumstances. + +It is not the purpose of this section to induce you to infringe any patents or other property right claims or to contest validity of any such claims; this section has the sole purpose of protecting the integrity of the free software distribution system, which is implemented by public license practices. Many people have made generous contributions to the wide range of software distributed through that system in reliance on consistent application of that system; it is up to the author/donor to decide if he or she is willing to distribute software through any other system and a licensee cannot impose that choice. + +This section is intended to make thoroughly clear what is believed to be a consequence of the rest of this License. + +8. If the distribution and/or use of the Program is restricted in certain countries either by patents or by copyrighted interfaces, the original copyright holder who places the Program under this License may add an explicit geographical distribution limitation excluding those countries, so that distribution is permitted only in or among countries not thus excluded. In such case, this License incorporates the limitation as if written in the body of this License. + +9. The Free Software Foundation may publish revised and/or new versions of the General Public License from time to time. Such new versions will be similar in spirit to the present version, but may differ in detail to address new problems or concerns. + +Each version is given a distinguishing version number. If the Program specifies a version number of this License which applies to it and "any later version", you have the option of following the terms and conditions either of that version or of any later version published by the Free Software Foundation. If the Program does not specify a version number of this License, you may choose any version ever published by the Free Software Foundation. + +10. If you wish to incorporate parts of the Program into other free programs whose distribution conditions are different, write to the author to ask for permission. For software which is copyrighted by the Free Software Foundation, write to the Free Software Foundation; we sometimes make exceptions for this. Our decision will be guided by the two goals of preserving the free status of all derivatives of our free software and of promoting the sharing and reuse of software generally. + +NO WARRANTY + +11. BECAUSE THE PROGRAM IS LICENSED FREE OF CHARGE, THERE IS NO WARRANTY FOR THE PROGRAM, TO THE EXTENT PERMITTED BY APPLICABLE LAW. EXCEPT WHEN OTHERWISE STATED IN WRITING THE COPYRIGHT HOLDERS AND/OR OTHER PARTIES PROVIDE THE PROGRAM "AS IS" WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. THE ENTIRE RISK AS TO THE QUALITY AND PERFORMANCE OF THE PROGRAM IS WITH YOU. SHOULD THE PROGRAM PROVE DEFECTIVE, YOU ASSUME THE COST OF ALL NECESSARY SERVICING, REPAIR OR CORRECTION. + +12. IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN WRITING WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MAY MODIFY AND/OR REDISTRIBUTE THE PROGRAM AS PERMITTED ABOVE, BE LIABLE TO YOU FOR DAMAGES, INCLUDING ANY GENERAL, SPECIAL, INCIDENTAL OR CONSEQUENTIAL DAMAGES ARISING OUT OF THE USE OR INABILITY TO USE THE PROGRAM (INCLUDING BUT NOT LIMITED TO LOSS OF DATA OR DATA BEING RENDERED INACCURATE OR LOSSES SUSTAINED BY YOU OR THIRD PARTIES OR A FAILURE OF THE PROGRAM TO OPERATE WITH ANY OTHER PROGRAMS), EVEN IF SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE POSSIBILITY OF SUCH DAMAGES. + +END OF TERMS AND CONDITIONS + + +How to Apply These Terms to Your New Programs + +If you develop a new program, and you want it to be of the greatest possible use to the public, the best way to achieve this is to make it free software which everyone can redistribute and change under these terms. + +To do so, attach the following notices to the program. It is safest to attach them to the start of each source file to most effectively convey the exclusion of warranty; and each file should have at least the "copyright" line and a pointer to where the full notice is found. + + One line to give the program's name and a brief idea of what it does. + + Copyright (C) + + This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 2 of the License, or (at your option) any later version. + + This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. + + You should have received a copy of the GNU General Public License along with this program; if not, write to the Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA + +Also add information on how to contact you by electronic and paper mail. + +If the program is interactive, make it output a short notice like this when it starts in an interactive mode: + + Gnomovision version 69, Copyright (C) year name of author + Gnomovision comes with ABSOLUTELY NO WARRANTY; for details type `show w'. This is free software, and you are welcome to redistribute it under certain conditions; type `show c' for details. + +The hypothetical commands `show w' and `show c' should show the appropriate parts of the General Public License. Of course, the commands you use may be called something other than `show w' and `show c'; they could even be mouse-clicks or menu items--whatever suits your program. + +You should also get your employer (if you work as a programmer) or your school, if any, to sign a "copyright disclaimer" for the program, if necessary. Here is a sample; alter the names: + + Yoyodyne, Inc., hereby disclaims all copyright interest in the program `Gnomovision' (which makes passes at compilers) written by James Hacker. + + signature of Ty Coon, 1 April 1989 + Ty Coon, President of Vice + +This General Public License does not permit incorporating your program into proprietary programs. If your program is a subroutine library, you may consider it more useful to permit linking proprietary applications with the library. If this is what you want to do, use the GNU Library General Public License instead of this License. + + +"CLASSPATH" EXCEPTION TO THE GPL VERSION 2 + +Certain source files distributed by Oracle are subject to the following clarification and special exception to the GPL Version 2, but only where Oracle has expressly included in the particular source file's header the words "Oracle designates this particular file as subject to the "Classpath" exception as provided by Oracle in the License file that accompanied this code." + +Linking this library statically or dynamically with other modules is making a combined work based on this library. Thus, the terms and conditions of the GNU General Public License Version 2 cover the whole combination. + +As a special exception, the copyright holders of this library give you permission to link this library with independent modules to produce an executable, regardless of the license terms of these independent modules, and to copy and distribute the resulting executable under terms of your choice, provided that you also meet, for each linked independent module, the terms and conditions of the license of that module. An independent module is a module which is not derived from or based on this library. If you modify this library, you may extend this exception to your version of the library, but you are not obligated to do so. If you do not wish to do so, delete this exception statement from your version. diff --git a/src/org.gluster.storage.management.client/lib/jersey-1.5/Jersey-third-party-license-readme.txt b/src/org.gluster.storage.management.client/lib/jersey-1.5/Jersey-third-party-license-readme.txt new file mode 100644 index 00000000..b3acf520 --- /dev/null +++ b/src/org.gluster.storage.management.client/lib/jersey-1.5/Jersey-third-party-license-readme.txt @@ -0,0 +1,188 @@ + +DO NOT TRANSLATE OR LOCALIZE. + +%% The following software may be included in this product: ASM + Use of any of this software is governed by the terms of the license below: + +Copyright (c) 2000-2005 INRIA, France Telecom +All rights reserved. + +Redistribution and use in source and binary forms, with or without +modification, are permitted provided that the following conditions +are met: + +1. Redistributions of source code must retain the above copyright + notice, this list of conditions and the following disclaimer. + +2. Redistributions in binary form must reproduce the above copyright + notice, this list of conditions and the following disclaimer in the + documentation and/or other materials provided with the distribution. + +3. Neither the name of the copyright holders nor the names of its + contributors may be used to endorse or promote products derived from + this software without specific prior written permission. + +THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" +AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE +IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE +ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE +LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR +CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF +SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS +INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN +CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) +ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF +THE POSSIBILITY OF SUCH DAMAGE. + + +%% The following software may be included in this product: Jettison + Use of any of this software is governed by the terms of the license below: + + +Copyright 2006 Envoi Solutions LLC + +Licensed 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. + +-------------------------------------------------------------------------- + +Apache License +Version 2.0, January 2004 +http://www.apache.org/licenses/ + +TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION + +1. Definitions. + +"License" shall mean the terms and conditions for use, reproduction, and distribution as defined by Sections 1 through 9 of this document. + +"Licensor" shall mean the copyright owner or entity authorized by the copyright owner that is granting the License. + +"Legal Entity" shall mean the union of the acting entity and all other entities that control, are controlled by, or are under common control with that entity. For the purposes of this definition, "control" means (i) the power, direct or indirect, to cause the direction or management of such entity, whether by contract or otherwise, or (ii) ownership of fifty percent (50%) or more of the outstanding shares, or (iii) beneficial ownership of such entity. + +"You" (or "Your") shall mean an individual or Legal Entity exercising permissions granted by this License. + +"Source" form shall mean the preferred form for making modifications, including but not limited to software source code, documentation source, and configuration files. + +"Object" form shall mean any form resulting from mechanical transformation or translation of a Source form, including but not limited to compiled object code, generated documentation, and conversions to other media types. + +"Work" shall mean the work of authorship, whether in Source or Object form, made available under the License, as indicated by a copyright notice that is included in or attached to the work (an example is provided in the Appendix below). + +"Derivative Works" shall mean any work, whether in Source or Object form, that is based on (or derived from) the Work and for which the editorial revisions, annotations, elaborations, or other modifications represent, as a whole, an original work of authorship. For the purposes of this License, Derivative Works shall not include works that remain separable from, or merely link (or bind by name) to the interfaces of, the Work and Derivative Works thereof. + +"Contribution" shall mean any work of authorship, including the original version of the Work and any modifications or additions to that Work or Derivative Works thereof, that is intentionally submitted to Licensor for inclusion in the Work by the copyright owner or by an individual or Legal Entity authorized to submit on behalf of the copyright owner. For the purposes of this definition, "submitted" means any form of electronic, verbal, or written communication sent to the Licensor or its representatives, including but not limited to communication on electronic mailing lists, source code control systems, and issue tracking systems that are managed by, or on behalf of, the Licensor for the purpose of discussing and improving the Work, but excluding communication that is conspicuously marked or otherwise designated in writing by the copyright owner as "Not a Contribution." + +"Contributor" shall mean Licensor and any individual or Legal Entity on behalf of whom a Contribution has been received by Licensor and subsequently incorporated within the Work. + +2. Grant of Copyright License. Subject to the terms and conditions of this License, each Contributor hereby grants to You a perpetual, worldwide, non-exclusive, no-charge, royalty-free, irrevocable copyright license to reproduce, prepare Derivative Works of, publicly display, publicly perform, sublicense, and distribute the Work and such Derivative Works in Source or Object form. + +3. Grant of Patent License. Subject to the terms and conditions of this License, each Contributor hereby grants to You a perpetual, worldwide, non-exclusive, no-charge, royalty-free, irrevocable (except as stated in this section) patent license to make, have made, use, offer to sell, sell, import, and otherwise transfer the Work, where such license applies only to those patent claims licensable by such Contributor that are necessarily infringed by their Contribution(s) alone or by combination of their Contribution(s) with the Work to which such Contribution(s) was submitted. If You institute patent litigation against any entity (including a cross-claim or counterclaim in a lawsuit) alleging that the Work or a Contribution incorporated within the Work constitutes direct or contributory patent infringement, then any patent licenses granted to You under this License for that Work shall terminate as of the date such litigation is filed. + +4. Redistribution. You may reproduce and distribute copies of the Work or Derivative Works thereof in any medium, with or without modifications, and in Source or Object form, provided that You meet the following conditions: + + 1. You must give any other recipients of the Work or Derivative Works a copy of this License; and + + 2. You must cause any modified files to carry prominent notices stating that You changed the files; and + + 3. You must retain, in the Source form of any Derivative Works that You distribute, all copyright, patent, trademark, and attribution notices from the Source form of the Work, excluding those notices that do not pertain to any part of the Derivative Works; and + + 4. If the Work includes a "NOTICE" text file as part of its distribution, then any Derivative Works that You distribute must include a readable copy of the attribution notices contained within such NOTICE file, excluding those notices that do not pertain to any part of the Derivative Works, in at least one of the following places: within a NOTICE text file distributed as part of the Derivative Works; within the Source form or documentation, if provided along with the Derivative Works; or, within a display generated by the Derivative Works, if and wherever such third-party notices normally appear. The contents of the NOTICE file are for informational purposes only and do not modify the License. You may add Your own attribution notices within Derivative Works that You distribute, alongside or as an addendum to the NOTICE text from the Work, provided that such additional attribution notices cannot be construed as modifying the License. + +You may add Your own copyright statement to Your modifications and may provide additional or different license terms and conditions for use, reproduction, or distribution of Your modifications, or for any such Derivative Works as a whole, provided Your use, reproduction, and distribution of the Work otherwise complies with the conditions stated in this License. + +5. Submission of Contributions. Unless You explicitly state otherwise, any Contribution intentionally submitted for inclusion in the Work by You to the Licensor shall be under the terms and conditions of this License, without any additional terms or conditions. Notwithstanding the above, nothing herein shall supersede or modify the terms of any separate license agreement you may have executed with Licensor regarding such Contributions. + +6. Trademarks. This License does not grant permission to use the trade names, trademarks, service marks, or product names of the Licensor, except as required for reasonable and customary use in describing the origin of the Work and reproducing the content of the NOTICE file. + +7. Disclaimer of Warranty. Unless required by applicable law or agreed to in writing, Licensor provides the Work (and each Contributor provides its Contributions) on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied, including, without limitation, any warranties or conditions of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A PARTICULAR PURPOSE. You are solely responsible for determining the appropriateness of using or redistributing the Work and assume any risks associated with Your exercise of permissions under this License. + +8. Limitation of Liability. In no event and under no legal theory, whether in tort (including negligence), contract, or otherwise, unless required by applicable law (such as deliberate and grossly negligent acts) or agreed to in writing, shall any Contributor be liable to You for damages, including any direct, indirect, special, incidental, or consequential damages of any character arising as a result of this License or out of the use or inability to use the Work (including but not limited to damages for loss of goodwill, work stoppage, computer failure or malfunction, or any and all other commercial damages or losses), even if such Contributor has been advised of the possibility of such damages. + +9. Accepting Warranty or Additional Liability. While redistributing the Work or Derivative Works thereof, You may choose to offer, and charge a fee for, acceptance of support, warranty, indemnity, or other liability obligations and/or rights consistent with this License. However, in accepting such obligations, You may act only on Your own behalf and on Your sole responsibility, not on behalf of any other Contributor, and only if You agree to indemnify, defend, and hold each Contributor harmless for any liability incurred by, or claims asserted against, such Contributor by reason of your accepting any such warranty or additional liability. + +END OF TERMS AND CONDITIONS +APPENDIX: How to apply the Apache License to your work + +To apply the Apache License to your work, attach the following boilerplate notice, with the fields enclosed by brackets "[]" replaced with your own identifying information. (Don't include the brackets!) The text should be enclosed in the appropriate comment syntax for the file format. We also recommend that a file or class name and description of purpose be included on the same "printed page" as the copyright notice for easier identification within third-party archives. +Copyright [yyyy] [name of copyright owner] Licensed 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 following software may be included in this product: Jackson + Use of any of this software is governed by the terms of the license below: + + +Jackson is dual-licensed under two alternative popular Open Source licenses: Apache (AL 2.0) and Gnu Lesser GPL (LGPL 2.1). You choose one or the other, as necessary (if you want to redistribute the code ¿ for use, you do not need license), and abide by the license rules as defined by the respective license agreement (and only that one). + +-------------------------------------------------------------------------- + +Apache License +Version 2.0, January 2004 +http://www.apache.org/licenses/ + +TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION + +1. Definitions. + +"License" shall mean the terms and conditions for use, reproduction, and distribution as defined by Sections 1 through 9 of this document. + +"Licensor" shall mean the copyright owner or entity authorized by the copyright owner that is granting the License. + +"Legal Entity" shall mean the union of the acting entity and all other entities that control, are controlled by, or are under common control with that entity. For the purposes of this definition, "control" means (i) the power, direct or indirect, to cause the direction or management of such entity, whether by contract or otherwise, or (ii) ownership of fifty percent (50%) or more of the outstanding shares, or (iii) beneficial ownership of such entity. + +"You" (or "Your") shall mean an individual or Legal Entity exercising permissions granted by this License. + +"Source" form shall mean the preferred form for making modifications, including but not limited to software source code, documentation source, and configuration files. + +"Object" form shall mean any form resulting from mechanical transformation or translation of a Source form, including but not limited to compiled object code, generated documentation, and conversions to other media types. + +"Work" shall mean the work of authorship, whether in Source or Object form, made available under the License, as indicated by a copyright notice that is included in or attached to the work (an example is provided in the Appendix below). + +"Derivative Works" shall mean any work, whether in Source or Object form, that is based on (or derived from) the Work and for which the editorial revisions, annotations, elaborations, or other modifications represent, as a whole, an original work of authorship. For the purposes of this License, Derivative Works shall not include works that remain separable from, or merely link (or bind by name) to the interfaces of, the Work and Derivative Works thereof. + +"Contribution" shall mean any work of authorship, including the original version of the Work and any modifications or additions to that Work or Derivative Works thereof, that is intentionally submitted to Licensor for inclusion in the Work by the copyright owner or by an individual or Legal Entity authorized to submit on behalf of the copyright owner. For the purposes of this definition, "submitted" means any form of electronic, verbal, or written communication sent to the Licensor or its representatives, including but not limited to communication on electronic mailing lists, source code control systems, and issue tracking systems that are managed by, or on behalf of, the Licensor for the purpose of discussing and improving the Work, but excluding communication that is conspicuously marked or otherwise designated in writing by the copyright owner as "Not a Contribution." + +"Contributor" shall mean Licensor and any individual or Legal Entity on behalf of whom a Contribution has been received by Licensor and subsequently incorporated within the Work. + +2. Grant of Copyright License. Subject to the terms and conditions of this License, each Contributor hereby grants to You a perpetual, worldwide, non-exclusive, no-charge, royalty-free, irrevocable copyright license to reproduce, prepare Derivative Works of, publicly display, publicly perform, sublicense, and distribute the Work and such Derivative Works in Source or Object form. + +3. Grant of Patent License. Subject to the terms and conditions of this License, each Contributor hereby grants to You a perpetual, worldwide, non-exclusive, no-charge, royalty-free, irrevocable (except as stated in this section) patent license to make, have made, use, offer to sell, sell, import, and otherwise transfer the Work, where such license applies only to those patent claims licensable by such Contributor that are necessarily infringed by their Contribution(s) alone or by combination of their Contribution(s) with the Work to which such Contribution(s) was submitted. If You institute patent litigation against any entity (including a cross-claim or counterclaim in a lawsuit) alleging that the Work or a Contribution incorporated within the Work constitutes direct or contributory patent infringement, then any patent licenses granted to You under this License for that Work shall terminate as of the date such litigation is filed. + +4. Redistribution. You may reproduce and distribute copies of the Work or Derivative Works thereof in any medium, with or without modifications, and in Source or Object form, provided that You meet the following conditions: + + 1. You must give any other recipients of the Work or Derivative Works a copy of this License; and + + 2. You must cause any modified files to carry prominent notices stating that You changed the files; and + + 3. You must retain, in the Source form of any Derivative Works that You distribute, all copyright, patent, trademark, and attribution notices from the Source form of the Work, excluding those notices that do not pertain to any part of the Derivative Works; and + + 4. If the Work includes a "NOTICE" text file as part of its distribution, then any Derivative Works that You distribute must include a readable copy of the attribution notices contained within such NOTICE file, excluding those notices that do not pertain to any part of the Derivative Works, in at least one of the following places: within a NOTICE text file distributed as part of the Derivative Works; within the Source form or documentation, if provided along with the Derivative Works; or, within a display generated by the Derivative Works, if and wherever such third-party notices normally appear. The contents of the NOTICE file are for informational purposes only and do not modify the License. You may add Your own attribution notices within Derivative Works that You distribute, alongside or as an addendum to the NOTICE text from the Work, provided that such additional attribution notices cannot be construed as modifying the License. + +You may add Your own copyright statement to Your modifications and may provide additional or different license terms and conditions for use, reproduction, or distribution of Your modifications, or for any such Derivative Works as a whole, provided Your use, reproduction, and distribution of the Work otherwise complies with the conditions stated in this License. + +5. Submission of Contributions. Unless You explicitly state otherwise, any Contribution intentionally submitted for inclusion in the Work by You to the Licensor shall be under the terms and conditions of this License, without any additional terms or conditions. Notwithstanding the above, nothing herein shall supersede or modify the terms of any separate license agreement you may have executed with Licensor regarding such Contributions. + +6. Trademarks. This License does not grant permission to use the trade names, trademarks, service marks, or product names of the Licensor, except as required for reasonable and customary use in describing the origin of the Work and reproducing the content of the NOTICE file. + +7. Disclaimer of Warranty. Unless required by applicable law or agreed to in writing, Licensor provides the Work (and each Contributor provides its Contributions) on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied, including, without limitation, any warranties or conditions of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A PARTICULAR PURPOSE. You are solely responsible for determining the appropriateness of using or redistributing the Work and assume any risks associated with Your exercise of permissions under this License. + +8. Limitation of Liability. In no event and under no legal theory, whether in tort (including negligence), contract, or otherwise, unless required by applicable law (such as deliberate and grossly negligent acts) or agreed to in writing, shall any Contributor be liable to You for damages, including any direct, indirect, special, incidental, or consequential damages of any character arising as a result of this License or out of the use or inability to use the Work (including but not limited to damages for loss of goodwill, work stoppage, computer failure or malfunction, or any and all other commercial damages or losses), even if such Contributor has been advised of the possibility of such damages. + +9. Accepting Warranty or Additional Liability. While redistributing the Work or Derivative Works thereof, You may choose to offer, and charge a fee for, acceptance of support, warranty, indemnity, or other liability obligations and/or rights consistent with this License. However, in accepting such obligations, You may act only on Your own behalf and on Your sole responsibility, not on behalf of any other Contributor, and only if You agree to indemnify, defend, and hold each Contributor harmless for any liability incurred by, or claims asserted against, such Contributor by reason of your accepting any such warranty or additional liability. + +END OF TERMS AND CONDITIONS +APPENDIX: How to apply the Apache License to your work + +To apply the Apache License to your work, attach the following boilerplate notice, with the fields enclosed by brackets "[]" replaced with your own identifying information. (Don't include the brackets!) The text should be enclosed in the appropriate comment syntax for the file format. We also recommend that a file or class name and description of purpose be included on the same "printed page" as the copyright notice for easier identification within third-party archives. +Copyright [yyyy] [name of copyright owner] Licensed 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/src/com.gluster.storage.management.client/lib/jersey-1.5/jersey-client-1.5.jar b/src/org.gluster.storage.management.client/lib/jersey-1.5/jersey-client-1.5.jar Binary files differindex 62f790fa..62f790fa 100644 --- a/src/com.gluster.storage.management.client/lib/jersey-1.5/jersey-client-1.5.jar +++ b/src/org.gluster.storage.management.client/lib/jersey-1.5/jersey-client-1.5.jar diff --git a/src/com.gluster.storage.management.client/lib/jersey-1.5/jersey-core-1.5.jar b/src/org.gluster.storage.management.client/lib/jersey-1.5/jersey-core-1.5.jar Binary files differindex 92b38466..92b38466 100644 --- a/src/com.gluster.storage.management.client/lib/jersey-1.5/jersey-core-1.5.jar +++ b/src/org.gluster.storage.management.client/lib/jersey-1.5/jersey-core-1.5.jar diff --git a/src/com.gluster.storage.management.client/lib/jersey-1.5/jersey-multipart-1.5.jar b/src/org.gluster.storage.management.client/lib/jersey-1.5/jersey-multipart-1.5.jar Binary files differindex 1c134f05..1c134f05 100644 --- a/src/com.gluster.storage.management.client/lib/jersey-1.5/jersey-multipart-1.5.jar +++ b/src/org.gluster.storage.management.client/lib/jersey-1.5/jersey-multipart-1.5.jar diff --git a/src/com.gluster.storage.management.client/src/com/gluster/storage/management/client/AbstractClient.java b/src/org.gluster.storage.management.client/src/org/gluster/storage/management/client/AbstractClient.java index a77e2a31..c433c3f4 100644 --- a/src/com.gluster.storage.management.client/src/com/gluster/storage/management/client/AbstractClient.java +++ b/src/org.gluster.storage.management.client/src/org/gluster/storage/management/client/AbstractClient.java @@ -1,428 +1,447 @@ -package com.gluster.storage.management.client;
-
-import static com.gluster.storage.management.client.constants.ClientConstants.ALGORITHM_SUNX509;
-import static com.gluster.storage.management.client.constants.ClientConstants.KEYSTORE_TYPE_JKS;
-import static com.gluster.storage.management.client.constants.ClientConstants.PROTOCOL_TLS;
-import static com.gluster.storage.management.client.constants.ClientConstants.TRUSTED_KEYSTORE;
-import static com.gluster.storage.management.client.constants.ClientConstants.TRUSTED_KEYSTORE_ACCESS;
-
-import java.io.FileOutputStream;
-import java.io.IOException;
-import java.io.InputStream;
-import java.net.ConnectException;
-import java.net.URI;
-import java.security.KeyStore;
-
-import javax.net.ssl.HostnameVerifier;
-import javax.net.ssl.KeyManagerFactory;
-import javax.net.ssl.SSLContext;
-import javax.net.ssl.SSLSession;
-import javax.net.ssl.TrustManagerFactory;
-import javax.ws.rs.core.MediaType;
-import javax.ws.rs.core.MultivaluedMap;
-import javax.ws.rs.core.Response;
-
-import com.gluster.storage.management.client.utils.ClientUtil;
-import com.gluster.storage.management.core.exceptions.GlusterRuntimeException;
-import com.sun.jersey.api.client.Client;
-import com.sun.jersey.api.client.ClientResponse;
-import com.sun.jersey.api.client.UniformInterfaceException;
-import com.sun.jersey.api.client.WebResource;
-import com.sun.jersey.api.client.WebResource.Builder;
-import com.sun.jersey.api.client.config.DefaultClientConfig;
-import com.sun.jersey.api.representation.Form;
-import com.sun.jersey.client.urlconnection.HTTPSProperties;
-import com.sun.jersey.core.util.MultivaluedMapImpl;
-import com.sun.jersey.multipart.FormDataMultiPart;
-
-public abstract class AbstractClient {
- private static final String HTTP_HEADER_AUTH = "Authorization";
- protected static final MultivaluedMap<String, String> NO_PARAMS = new MultivaluedMapImpl();
- protected static String clusterName;
- protected static String securityToken;
- protected WebResource resource;
- private String authHeader;
- private Client client;
-
- /**
- * This constructor will work only after the data model manager has been initialized.
- */
- public AbstractClient() {
- this(securityToken, clusterName);
- }
-
- /**
- * This constructor will work only after the data model manager has been initialized.
- */
- public AbstractClient(String clusterName) {
- this(securityToken, clusterName);
- }
-
- public AbstractClient(String securityToken, String clusterName) {
- AbstractClient.clusterName = clusterName;
- setSecurityToken(securityToken);
-
- createClient();
-
- // this must be after setting clusterName as sub-classes may refer to cluster name in the getResourcePath method
- resource = client.resource(ClientUtil.getServerBaseURI()).path(getResourcePath());
- }
-
- private void createClient() {
- SSLContext context = initializeSSLContext();
- DefaultClientConfig config = createClientConfig(context);
- client = Client.create(config);
- }
-
- private DefaultClientConfig createClientConfig(SSLContext context) {
- DefaultClientConfig config = new DefaultClientConfig();
- config.getProperties().put(HTTPSProperties.PROPERTY_HTTPS_PROPERTIES,
- new HTTPSProperties(createHostnameVerifier(), context));
- return config;
- }
-
- private HostnameVerifier createHostnameVerifier() {
- HostnameVerifier hostnameVerifier = new HostnameVerifier() {
- @Override
- public boolean verify(String arg0, SSLSession arg1) {
- return true;
- }
- };
- return hostnameVerifier;
- }
-
- private SSLContext initializeSSLContext() {
- SSLContext context = null;
- try {
- context = SSLContext.getInstance(PROTOCOL_TLS);
-
- KeyStore keyStore = KeyStore.getInstance(KEYSTORE_TYPE_JKS);
- keyStore.load(loadResource(TRUSTED_KEYSTORE), TRUSTED_KEYSTORE_ACCESS.toCharArray());
-
- KeyManagerFactory keyManagerFactory = KeyManagerFactory.getInstance(ALGORITHM_SUNX509);
- keyManagerFactory.init(keyStore, TRUSTED_KEYSTORE_ACCESS.toCharArray());
-
- TrustManagerFactory trustManagerFactory = TrustManagerFactory.getInstance(ALGORITHM_SUNX509);
- trustManagerFactory.init(keyStore);
-
- context.init(keyManagerFactory.getKeyManagers(), trustManagerFactory.getTrustManagers(), null);
- } catch (Exception e) {
- throw new GlusterRuntimeException(
- "Couldn't initialize SSL Context with Gluster Management Gateway! Error: " + e, e);
- }
- return context;
- }
-
- private InputStream loadResource(String resourcePath) {
- return this.getClass().getClassLoader().getResourceAsStream(resourcePath);
- }
-
- /**
- * Fetches the given resource by dispatching a GET request
- *
- * @param res
- * Resource to be fetched
- * @param queryParams
- * Query parameters to be sent for the GET request
- * @param responseClass
- * Expected class of the response
- * @return Object of responseClass received as a result of the GET request
- */
- private <T> T fetchResource(WebResource res, MultivaluedMap<String, String> queryParams, Class<T> responseClass) {
- try {
- return res.queryParams(queryParams).header(HTTP_HEADER_AUTH, authHeader).accept(MediaType.APPLICATION_XML)
- .get(responseClass);
- } catch (Exception e1) {
- throw createGlusterException(e1);
- }
- }
-
- private GlusterRuntimeException createGlusterException(Exception e) {
- if (e instanceof GlusterRuntimeException) {
- return (GlusterRuntimeException) e;
- }
-
- if (e instanceof UniformInterfaceException) {
- UniformInterfaceException uie = (UniformInterfaceException) e;
- if ((uie.getResponse().getStatus() == Response.Status.UNAUTHORIZED.getStatusCode())) {
- // authentication failed. clear security token.
- setSecurityToken(null);
- return new GlusterRuntimeException("Invalid credentials!");
- } else {
- return new GlusterRuntimeException("[" + uie.getResponse().getStatus() + "]["
- + uie.getResponse().getEntity(String.class) + "]");
- }
- } else {
- Throwable cause = e.getCause();
- if (cause != null && cause instanceof ConnectException) {
- return new GlusterRuntimeException("Couldn't connect to Gluster Management Gateway!");
- }
-
- return new GlusterRuntimeException("Exception in REST communication! [" + e.getMessage() + "]", e);
- }
- }
-
- protected void downloadResource(WebResource res, String filePath) {
- ClientResponse response = null;
- try {
- response = res.header(HTTP_HEADER_AUTH, authHeader).accept(MediaType.APPLICATION_OCTET_STREAM)
- .get(ClientResponse.class);
- checkResponseStatus(response);
- } catch (Exception e1) {
- throw createGlusterException(e1);
- }
-
- try {
- if (!response.hasEntity()) {
- throw new GlusterRuntimeException("No entity in response!");
- }
-
- InputStream inputStream = response.getEntityInputStream();
- FileOutputStream outputStream = new FileOutputStream(filePath);
-
- int c;
- while ((c = inputStream.read()) != -1) {
- outputStream.write(c);
- }
- inputStream.close();
- outputStream.close();
- } catch (IOException e) {
- throw new GlusterRuntimeException("Error while downloading resource [" + res.getURI().getPath() + "]", e);
- }
- }
-
- public void uploadResource(WebResource res, FormDataMultiPart form) {
- try {
- res.header(HTTP_HEADER_AUTH, authHeader).type(MediaType.MULTIPART_FORM_DATA_TYPE).post(String.class, form);
- } catch (Exception e) {
- throw createGlusterException(e);
- }
- }
-
- /**
- * Fetches the default resource (the one returned by {@link AbstractClient#getResourcePath()}) by dispatching a GET
- * request on the resource
- *
- * @param queryParams
- * Query parameters to be sent for the GET request
- * @param responseClass
- * Expected class of the response
- * @return Object of responseClass received as a result of the GET request
- */
- protected <T> T fetchResource(MultivaluedMap<String, String> queryParams, Class<T> responseClass) {
- return fetchResource(resource, queryParams, responseClass);
- }
-
- /**
- * Fetches the default resource (the one returned by {@link AbstractClient#getResourcePath()}) by dispatching a GET
- * request on the resource
- *
- * @param responseClass
- * Expected class of the response
- * @return Object of responseClass received as a result of the GET request
- */
- protected <T> T fetchResource(Class<T> responseClass) {
- return fetchResource(resource, NO_PARAMS, responseClass);
- }
-
- /**
- * Fetches the resource whose name is arrived at by appending the "subResourceName" parameter to the default
- * resource (the one returned by {@link AbstractClient#getResourcePath()})
- *
- * @param subResourceName
- * Name of the sub-resource
- * @param responseClass
- * Expected class of the response
- * @return Object of responseClass received as a result of the GET request on the sub-resource
- */
- protected <T> T fetchSubResource(String subResourceName, Class<T> responseClass) {
- return fetchResource(resource.path(subResourceName), NO_PARAMS, responseClass);
- }
-
- protected void downloadSubResource(String subResourceName, String filePath) {
- downloadResource(resource.path(subResourceName), filePath);
- }
-
- /**
- * Fetches the resource whose name is arrived at by appending the "subResourceName" parameter to the default
- * resource (the one returned by {@link AbstractClient#getResourcePath()})
- *
- * @param subResourceName
- * Name of the sub-resource
- * @param queryParams
- * Query parameters to be sent for the GET request
- * @param responseClass
- * Expected class of the response
- * @return Object of responseClass received as a result of the GET request on the sub-resource
- */
- protected <T> T fetchSubResource(String subResourceName, MultivaluedMap<String, String> queryParams,
- Class<T> responseClass) {
- return fetchResource(resource.path(subResourceName), queryParams, responseClass);
- }
-
- private ClientResponse postRequest(WebResource resource, Form form) {
- try {
- ClientResponse response = prepareFormRequestBuilder(resource).post(ClientResponse.class, form);
- checkResponseStatus(response);
- return response;
- } catch (UniformInterfaceException e) {
- throw new GlusterRuntimeException(e.getResponse().getEntity(String.class));
- }
- }
-
- /**
- * Submits given object to the resource and returns the object received as response
- *
- * @param responseClass
- * Class of the object expected as response
- * @param requestObject
- * the Object to be submitted
- * @return Object of given class received as response
- */
- protected <T> T postObject(Class<T> responseClass, Object requestObject) {
- return resource.type(MediaType.APPLICATION_XML).header(HTTP_HEADER_AUTH, authHeader)
- .accept(MediaType.APPLICATION_XML).post(responseClass, requestObject);
- }
-
- /**
- * Submits given Form using POST method to the resource and returns the object received as response
- *
- * @param form
- * Form to be submitted
- */
- protected URI postRequest(Form form) {
- return postRequest(resource, form).getLocation();
- }
-
- /**
- * Submits given Form using POST method to the given sub-resource and returns the object received as response
- *
- * @param subResourceName
- * Name of the sub-resource to which the request is to be posted
- * @param form
- * Form to be submitted
- */
- protected void postRequest(String subResourceName, Form form) {
- postRequest(resource.path(subResourceName), form);
- }
-
- private ClientResponse putRequest(WebResource resource, Form form) {
- try {
- ClientResponse response = prepareFormRequestBuilder(resource).put(ClientResponse.class, form);
- checkResponseStatus(response);
- return response;
- } catch (Exception e) {
- throw createGlusterException(e);
- }
- }
-
- private void checkResponseStatus(ClientResponse response) {
- if ((response.getStatus() == Response.Status.UNAUTHORIZED.getStatusCode())) {
- // authentication failed. clear security token.
- setSecurityToken(null);
- throw new GlusterRuntimeException("Invalid credentials!");
- }
- if (response.getStatus() >= 300) {
- throw new GlusterRuntimeException(response.getEntity(String.class));
- }
- }
-
- public Builder prepareFormRequestBuilder(WebResource resource) {
- return resource.type(MediaType.APPLICATION_FORM_URLENCODED_TYPE).header(HTTP_HEADER_AUTH, authHeader)
- .accept(MediaType.APPLICATION_XML);
- }
-
- /**
- * Submits given Form using PUT method to the given sub-resource and returns the object received as response
- *
- * @param subResourceName
- * Name of the sub-resource to which the request is to be posted
- * @param form
- * Form to be submitted
- */
- protected void putRequest(String subResourceName, Form form) {
- putRequest(resource.path(subResourceName), form);
- }
-
- protected URI putRequestURI(String subResourceName, Form form) {
- ClientResponse response = putRequest(resource.path(subResourceName), form);
- return response.getLocation();
- }
-
- /**
- * Submits given Form using PUT method to the given sub-resource and returns the object received as response
- *
- * @param form
- * Form to be submitted
- */
- protected void putRequest(Form form) {
- putRequest(resource, form);
- }
-
- /**
- * Submits given Form using PUT method to the given sub-resource and returns the object received as response
- *
- * @param subResourceName
- * Name of the sub-resource to which the request is to be posted
- */
- protected void putRequest(String subResourceName) {
- try {
- prepareFormRequestBuilder(resource.path(subResourceName)).put();
- } catch (UniformInterfaceException e) {
- throw new GlusterRuntimeException(e.getResponse().getEntity(String.class));
- }
- }
-
- private void deleteResource(WebResource resource, MultivaluedMap<String, String> queryParams) {
- try {
- resource.queryParams(queryParams).header(HTTP_HEADER_AUTH, authHeader).delete();
- } catch (UniformInterfaceException e) {
- throw new GlusterRuntimeException(e.getResponse().getEntity(String.class));
- }
- }
-
- protected void deleteResource(MultivaluedMap<String, String> queryParams) {
- deleteResource(resource, queryParams);
- }
-
- protected void deleteSubResource(String subResourceName, MultivaluedMap<String, String> queryParams) {
- deleteResource(resource.path(subResourceName), queryParams);
- }
-
- protected void deleteSubResource(String subResourceName) {
- try {
- resource.path(subResourceName).header(HTTP_HEADER_AUTH, authHeader).delete();
- } catch (UniformInterfaceException e) {
- throw new GlusterRuntimeException(e.getResponse().getEntity(String.class));
- }
- }
-
- public abstract String getResourcePath();
-
- /**
- * @return the securityToken
- */
- protected String getSecurityToken() {
- return securityToken;
- }
-
- /**
- * @param securityToken
- * the securityToken to set
- */
- protected void setSecurityToken(String securityToken) {
- AbstractClient.securityToken = securityToken;
- authHeader = "Basic " + securityToken;
- }
-
- /**
- * @param uri
- * The URI to be fetched using GET API
- * @param responseClass
- * Expected type of response object
- * @return Object of the given class
- */
- protected <T> T fetchResource(URI uri, Class<T> responseClass) {
- return fetchResource(client.resource(uri), NO_PARAMS, responseClass);
- }
-}
+/******************************************************************************* + * Copyright (c) 2006-2011 Gluster, Inc. <http://www.gluster.com> + * This file is part of Gluster Management Console. + * + * Gluster Management Console is free software; you can redistribute + * it and/or modify it under the terms of the GNU General Public + * License as published by the Free Software Foundation; either + * version 3 of the License, or (at your option) any later version. + * + * Gluster Management Console is distributed in the hope that it + * will be useful, but WITHOUT ANY WARRANTY; without even the + * implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR + * PURPOSE. See the GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program. If not, see + * <http://www.gnu.org/licenses/>. + *******************************************************************************/ +package org.gluster.storage.management.client; + +import static org.gluster.storage.management.client.constants.ClientConstants.ALGORITHM_SUNX509; +import static org.gluster.storage.management.client.constants.ClientConstants.KEYSTORE_TYPE_JKS; +import static org.gluster.storage.management.client.constants.ClientConstants.PROTOCOL_TLS; +import static org.gluster.storage.management.client.constants.ClientConstants.TRUSTED_KEYSTORE; +import static org.gluster.storage.management.client.constants.ClientConstants.TRUSTED_KEYSTORE_ACCESS; + +import java.io.FileOutputStream; +import java.io.IOException; +import java.io.InputStream; +import java.net.ConnectException; +import java.net.URI; +import java.security.KeyStore; + +import javax.net.ssl.HostnameVerifier; +import javax.net.ssl.KeyManagerFactory; +import javax.net.ssl.SSLContext; +import javax.net.ssl.SSLSession; +import javax.net.ssl.TrustManagerFactory; +import javax.ws.rs.core.MediaType; +import javax.ws.rs.core.MultivaluedMap; +import javax.ws.rs.core.Response; + +import org.gluster.storage.management.client.utils.ClientUtil; +import org.gluster.storage.management.core.exceptions.GlusterRuntimeException; + +import com.sun.jersey.api.client.Client; +import com.sun.jersey.api.client.ClientResponse; +import com.sun.jersey.api.client.UniformInterfaceException; +import com.sun.jersey.api.client.WebResource; +import com.sun.jersey.api.client.WebResource.Builder; +import com.sun.jersey.api.client.config.DefaultClientConfig; +import com.sun.jersey.api.representation.Form; +import com.sun.jersey.client.urlconnection.HTTPSProperties; +import com.sun.jersey.core.util.MultivaluedMapImpl; +import com.sun.jersey.multipart.FormDataMultiPart; + +public abstract class AbstractClient { + private static final String HTTP_HEADER_AUTH = "Authorization"; + protected static final MultivaluedMap<String, String> NO_PARAMS = new MultivaluedMapImpl(); + protected static String clusterName; + protected static String securityToken; + protected WebResource resource; + private String authHeader; + private Client client; + + /** + * This constructor will work only after the data model manager has been initialized. + */ + public AbstractClient() { + this(securityToken, clusterName); + } + + /** + * This constructor will work only after the data model manager has been initialized. + */ + public AbstractClient(String clusterName) { + this(securityToken, clusterName); + } + + public AbstractClient(String securityToken, String clusterName) { + AbstractClient.clusterName = clusterName; + setSecurityToken(securityToken); + + createClient(); + + // this must be after setting clusterName as sub-classes may refer to cluster name in the getResourcePath method + resource = client.resource(ClientUtil.getServerBaseURI()).path(getResourcePath()); + } + + private void createClient() { + SSLContext context = initializeSSLContext(); + DefaultClientConfig config = createClientConfig(context); + client = Client.create(config); + } + + private DefaultClientConfig createClientConfig(SSLContext context) { + DefaultClientConfig config = new DefaultClientConfig(); + config.getProperties().put(HTTPSProperties.PROPERTY_HTTPS_PROPERTIES, + new HTTPSProperties(createHostnameVerifier(), context)); + return config; + } + + private HostnameVerifier createHostnameVerifier() { + HostnameVerifier hostnameVerifier = new HostnameVerifier() { + @Override + public boolean verify(String arg0, SSLSession arg1) { + return true; + } + }; + return hostnameVerifier; + } + + private SSLContext initializeSSLContext() { + SSLContext context = null; + try { + context = SSLContext.getInstance(PROTOCOL_TLS); + + KeyStore keyStore = KeyStore.getInstance(KEYSTORE_TYPE_JKS); + keyStore.load(loadResource(TRUSTED_KEYSTORE), TRUSTED_KEYSTORE_ACCESS.toCharArray()); + + KeyManagerFactory keyManagerFactory = KeyManagerFactory.getInstance(ALGORITHM_SUNX509); + keyManagerFactory.init(keyStore, TRUSTED_KEYSTORE_ACCESS.toCharArray()); + + TrustManagerFactory trustManagerFactory = TrustManagerFactory.getInstance(ALGORITHM_SUNX509); + trustManagerFactory.init(keyStore); + + context.init(keyManagerFactory.getKeyManagers(), trustManagerFactory.getTrustManagers(), null); + } catch (Exception e) { + throw new GlusterRuntimeException( + "Couldn't initialize SSL Context with Gluster Management Gateway! Error: " + e, e); + } + return context; + } + + private InputStream loadResource(String resourcePath) { + return this.getClass().getClassLoader().getResourceAsStream(resourcePath); + } + + /** + * Fetches the given resource by dispatching a GET request + * + * @param res + * Resource to be fetched + * @param queryParams + * Query parameters to be sent for the GET request + * @param responseClass + * Expected class of the response + * @return Object of responseClass received as a result of the GET request + */ + private <T> T fetchResource(WebResource res, MultivaluedMap<String, String> queryParams, Class<T> responseClass) { + try { + return res.queryParams(queryParams).header(HTTP_HEADER_AUTH, authHeader).accept(MediaType.APPLICATION_XML) + .get(responseClass); + } catch (Exception e1) { + throw createGlusterException(e1); + } + } + + private GlusterRuntimeException createGlusterException(Exception e) { + if (e instanceof GlusterRuntimeException) { + return (GlusterRuntimeException) e; + } + + if (e instanceof UniformInterfaceException) { + UniformInterfaceException uie = (UniformInterfaceException) e; + if ((uie.getResponse().getStatus() == Response.Status.UNAUTHORIZED.getStatusCode())) { + // authentication failed. clear security token. + setSecurityToken(null); + return new GlusterRuntimeException("Invalid credentials!"); + } else { + return new GlusterRuntimeException("[" + uie.getResponse().getStatus() + "][" + + uie.getResponse().getEntity(String.class) + "]"); + } + } else { + Throwable cause = e.getCause(); + if (cause != null && cause instanceof ConnectException) { + return new GlusterRuntimeException("Couldn't connect to Gluster Management Gateway!"); + } + + return new GlusterRuntimeException("Exception in REST communication! [" + e.getMessage() + "]", e); + } + } + + protected void downloadResource(WebResource res, String filePath) { + ClientResponse response = null; + try { + response = res.header(HTTP_HEADER_AUTH, authHeader).accept(MediaType.APPLICATION_OCTET_STREAM) + .get(ClientResponse.class); + checkResponseStatus(response); + } catch (Exception e1) { + throw createGlusterException(e1); + } + + try { + if (!response.hasEntity()) { + throw new GlusterRuntimeException("No entity in response!"); + } + + InputStream inputStream = response.getEntityInputStream(); + FileOutputStream outputStream = new FileOutputStream(filePath); + + int c; + while ((c = inputStream.read()) != -1) { + outputStream.write(c); + } + inputStream.close(); + outputStream.close(); + } catch (IOException e) { + throw new GlusterRuntimeException("Error while downloading resource [" + res.getURI().getPath() + "]", e); + } + } + + public void uploadResource(WebResource res, FormDataMultiPart form) { + try { + res.header(HTTP_HEADER_AUTH, authHeader).type(MediaType.MULTIPART_FORM_DATA_TYPE).post(String.class, form); + } catch (Exception e) { + throw createGlusterException(e); + } + } + + /** + * Fetches the default resource (the one returned by {@link AbstractClient#getResourcePath()}) by dispatching a GET + * request on the resource + * + * @param queryParams + * Query parameters to be sent for the GET request + * @param responseClass + * Expected class of the response + * @return Object of responseClass received as a result of the GET request + */ + protected <T> T fetchResource(MultivaluedMap<String, String> queryParams, Class<T> responseClass) { + return fetchResource(resource, queryParams, responseClass); + } + + /** + * Fetches the default resource (the one returned by {@link AbstractClient#getResourcePath()}) by dispatching a GET + * request on the resource + * + * @param responseClass + * Expected class of the response + * @return Object of responseClass received as a result of the GET request + */ + protected <T> T fetchResource(Class<T> responseClass) { + return fetchResource(resource, NO_PARAMS, responseClass); + } + + /** + * Fetches the resource whose name is arrived at by appending the "subResourceName" parameter to the default + * resource (the one returned by {@link AbstractClient#getResourcePath()}) + * + * @param subResourceName + * Name of the sub-resource + * @param responseClass + * Expected class of the response + * @return Object of responseClass received as a result of the GET request on the sub-resource + */ + protected <T> T fetchSubResource(String subResourceName, Class<T> responseClass) { + return fetchResource(resource.path(subResourceName), NO_PARAMS, responseClass); + } + + protected void downloadSubResource(String subResourceName, String filePath) { + downloadResource(resource.path(subResourceName), filePath); + } + + /** + * Fetches the resource whose name is arrived at by appending the "subResourceName" parameter to the default + * resource (the one returned by {@link AbstractClient#getResourcePath()}) + * + * @param subResourceName + * Name of the sub-resource + * @param queryParams + * Query parameters to be sent for the GET request + * @param responseClass + * Expected class of the response + * @return Object of responseClass received as a result of the GET request on the sub-resource + */ + protected <T> T fetchSubResource(String subResourceName, MultivaluedMap<String, String> queryParams, + Class<T> responseClass) { + return fetchResource(resource.path(subResourceName), queryParams, responseClass); + } + + private ClientResponse postRequest(WebResource resource, Form form) { + try { + ClientResponse response = prepareFormRequestBuilder(resource).post(ClientResponse.class, form); + checkResponseStatus(response); + return response; + } catch (UniformInterfaceException e) { + throw new GlusterRuntimeException(e.getResponse().getEntity(String.class)); + } + } + + /** + * Submits given object to the resource and returns the object received as response + * + * @param responseClass + * Class of the object expected as response + * @param requestObject + * the Object to be submitted + * @return Object of given class received as response + */ + protected <T> T postObject(Class<T> responseClass, Object requestObject) { + return resource.type(MediaType.APPLICATION_XML).header(HTTP_HEADER_AUTH, authHeader) + .accept(MediaType.APPLICATION_XML).post(responseClass, requestObject); + } + + /** + * Submits given Form using POST method to the resource and returns the object received as response + * + * @param form + * Form to be submitted + */ + protected URI postRequest(Form form) { + return postRequest(resource, form).getLocation(); + } + + /** + * Submits given Form using POST method to the given sub-resource and returns the object received as response + * + * @param subResourceName + * Name of the sub-resource to which the request is to be posted + * @param form + * Form to be submitted + */ + protected void postRequest(String subResourceName, Form form) { + postRequest(resource.path(subResourceName), form); + } + + private ClientResponse putRequest(WebResource resource, Form form) { + try { + ClientResponse response = prepareFormRequestBuilder(resource).put(ClientResponse.class, form); + checkResponseStatus(response); + return response; + } catch (Exception e) { + throw createGlusterException(e); + } + } + + private void checkResponseStatus(ClientResponse response) { + if ((response.getStatus() == Response.Status.UNAUTHORIZED.getStatusCode())) { + // authentication failed. clear security token. + setSecurityToken(null); + throw new GlusterRuntimeException("Invalid credentials!"); + } + if (response.getStatus() >= 300) { + throw new GlusterRuntimeException(response.getEntity(String.class)); + } + } + + public Builder prepareFormRequestBuilder(WebResource resource) { + return resource.type(MediaType.APPLICATION_FORM_URLENCODED_TYPE).header(HTTP_HEADER_AUTH, authHeader) + .accept(MediaType.APPLICATION_XML); + } + + /** + * Submits given Form using PUT method to the given sub-resource and returns the object received as response + * + * @param subResourceName + * Name of the sub-resource to which the request is to be posted + * @param form + * Form to be submitted + */ + protected void putRequest(String subResourceName, Form form) { + putRequest(resource.path(subResourceName), form); + } + + protected URI putRequestURI(String subResourceName, Form form) { + ClientResponse response = putRequest(resource.path(subResourceName), form); + return response.getLocation(); + } + + /** + * Submits given Form using PUT method to the given sub-resource and returns the object received as response + * + * @param form + * Form to be submitted + */ + protected void putRequest(Form form) { + putRequest(resource, form); + } + + /** + * Submits given Form using PUT method to the given sub-resource and returns the object received as response + * + * @param subResourceName + * Name of the sub-resource to which the request is to be posted + */ + protected void putRequest(String subResourceName) { + try { + prepareFormRequestBuilder(resource.path(subResourceName)).put(); + } catch (UniformInterfaceException e) { + throw new GlusterRuntimeException(e.getResponse().getEntity(String.class)); + } + } + + private void deleteResource(WebResource resource, MultivaluedMap<String, String> queryParams) { + try { + resource.queryParams(queryParams).header(HTTP_HEADER_AUTH, authHeader).delete(); + } catch (UniformInterfaceException e) { + throw new GlusterRuntimeException(e.getResponse().getEntity(String.class)); + } + } + + protected void deleteResource(MultivaluedMap<String, String> queryParams) { + deleteResource(resource, queryParams); + } + + protected void deleteSubResource(String subResourceName, MultivaluedMap<String, String> queryParams) { + deleteResource(resource.path(subResourceName), queryParams); + } + + protected void deleteSubResource(String subResourceName) { + try { + resource.path(subResourceName).header(HTTP_HEADER_AUTH, authHeader).delete(); + } catch (UniformInterfaceException e) { + throw new GlusterRuntimeException(e.getResponse().getEntity(String.class)); + } + } + + public abstract String getResourcePath(); + + /** + * @return the securityToken + */ + protected String getSecurityToken() { + return securityToken; + } + + /** + * @param securityToken + * the securityToken to set + */ + protected void setSecurityToken(String securityToken) { + AbstractClient.securityToken = securityToken; + authHeader = "Basic " + securityToken; + } + + /** + * @param uri + * The URI to be fetched using GET API + * @param responseClass + * Expected type of response object + * @return Object of the given class + */ + protected <T> T fetchResource(URI uri, Class<T> responseClass) { + return fetchResource(client.resource(uri), NO_PARAMS, responseClass); + } +} diff --git a/src/com.gluster.storage.management.client/src/com/gluster/storage/management/client/ClustersClient.java b/src/org.gluster.storage.management.client/src/org/gluster/storage/management/client/ClustersClient.java index d6bf962a..fc012dc3 100644 --- a/src/com.gluster.storage.management.client/src/com/gluster/storage/management/client/ClustersClient.java +++ b/src/org.gluster.storage.management.client/src/org/gluster/storage/management/client/ClustersClient.java @@ -1,30 +1,31 @@ /******************************************************************************* - * Copyright (c) 2011 Gluster, Inc. <http://www.gluster.com> + * Copyright (c) 2006-2011 Gluster, Inc. <http://www.gluster.com> * This file is part of Gluster Management Console. * - * Gluster Management Console is free software; you can redistribute it and/or - * modify it under the terms of the GNU Affero General Public License as published - * by the Free Software Foundation; either version 3 of the License, or - * (at your option) any later version. - * - * Gluster Management Console is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY - * or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Affero General Public License - * for more details. - * - * You should have received a copy of the GNU Affero General Public License - * along with this program. If not, see + * Gluster Management Console is free software; you can redistribute + * it and/or modify it under the terms of the GNU General Public + * License as published by the Free Software Foundation; either + * version 3 of the License, or (at your option) any later version. + * + * Gluster Management Console is distributed in the hope that it + * will be useful, but WITHOUT ANY WARRANTY; without even the + * implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR + * PURPOSE. See the GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program. If not, see * <http://www.gnu.org/licenses/>. *******************************************************************************/ -package com.gluster.storage.management.client; +package org.gluster.storage.management.client; -import static com.gluster.storage.management.core.constants.RESTConstants.FORM_PARAM_CLUSTER_NAME; -import static com.gluster.storage.management.core.constants.RESTConstants.FORM_PARAM_SERVER_NAME; -import static com.gluster.storage.management.core.constants.RESTConstants.RESOURCE_PATH_CLUSTERS; +import static org.gluster.storage.management.core.constants.RESTConstants.FORM_PARAM_CLUSTER_NAME; +import static org.gluster.storage.management.core.constants.RESTConstants.FORM_PARAM_SERVER_NAME; +import static org.gluster.storage.management.core.constants.RESTConstants.RESOURCE_PATH_CLUSTERS; import java.util.List; -import com.gluster.storage.management.core.response.ClusterNameListResponse; +import org.gluster.storage.management.core.response.ClusterNameListResponse; + import com.sun.jersey.api.representation.Form; /** @@ -41,7 +42,7 @@ public class ClustersClient extends AbstractClient { } /* (non-Javadoc) - * @see com.gluster.storage.management.client.AbstractClient#getResourcePath() + * @see org.gluster.storage.management.client.AbstractClient#getResourcePath() */ @Override public String getResourcePath() { diff --git a/src/com.gluster.storage.management.client/src/com/gluster/storage/management/client/DiscoveredServersClient.java b/src/org.gluster.storage.management.client/src/org/gluster/storage/management/client/DiscoveredServersClient.java index 6b7af5b0..44c93b72 100644 --- a/src/com.gluster.storage.management.client/src/com/gluster/storage/management/client/DiscoveredServersClient.java +++ b/src/org.gluster.storage.management.client/src/org/gluster/storage/management/client/DiscoveredServersClient.java @@ -1,34 +1,35 @@ /******************************************************************************* - * Copyright (c) 2011 Gluster, Inc. <http://www.gluster.com> + * Copyright (c) 2006-2011 Gluster, Inc. <http://www.gluster.com> * This file is part of Gluster Management Console. * - * Gluster Management Console is free software; you can redistribute it and/or - * modify it under the terms of the GNU Affero General Public License as published - * by the Free Software Foundation; either version 3 of the License, or - * (at your option) any later version. - * - * Gluster Management Console is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY - * or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Affero General Public License - * for more details. - * - * You should have received a copy of the GNU Affero General Public License - * along with this program. If not, see + * Gluster Management Console is free software; you can redistribute + * it and/or modify it under the terms of the GNU General Public + * License as published by the Free Software Foundation; either + * version 3 of the License, or (at your option) any later version. + * + * Gluster Management Console is distributed in the hope that it + * will be useful, but WITHOUT ANY WARRANTY; without even the + * implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR + * PURPOSE. See the GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program. If not, see * <http://www.gnu.org/licenses/>. *******************************************************************************/ -package com.gluster.storage.management.client; +package org.gluster.storage.management.client; -import static com.gluster.storage.management.core.constants.RESTConstants.QUERY_PARAM_DETAILS; -import static com.gluster.storage.management.core.constants.RESTConstants.RESOURCE_PATH_DISCOVERED_SERVERS; +import static org.gluster.storage.management.core.constants.RESTConstants.QUERY_PARAM_DETAILS; +import static org.gluster.storage.management.core.constants.RESTConstants.RESOURCE_PATH_DISCOVERED_SERVERS; import java.util.List; import javax.ws.rs.core.MultivaluedMap; -import com.gluster.storage.management.core.model.Server; -import com.gluster.storage.management.core.response.ServerListResponse; -import com.gluster.storage.management.core.response.ServerNameListResponse; -import com.gluster.storage.management.core.utils.GlusterCoreUtil; +import org.gluster.storage.management.core.model.Server; +import org.gluster.storage.management.core.response.ServerListResponse; +import org.gluster.storage.management.core.response.ServerNameListResponse; +import org.gluster.storage.management.core.utils.GlusterCoreUtil; + import com.sun.jersey.core.util.MultivaluedMapImpl; public class DiscoveredServersClient extends AbstractClient { diff --git a/src/com.gluster.storage.management.client/src/com/gluster/storage/management/client/GlusterServersClient.java b/src/org.gluster.storage.management.client/src/org/gluster/storage/management/client/GlusterServersClient.java index e6ca0457..4827c1d5 100644 --- a/src/com.gluster.storage.management.client/src/com/gluster/storage/management/client/GlusterServersClient.java +++ b/src/org.gluster.storage.management.client/src/org/gluster/storage/management/client/GlusterServersClient.java @@ -1,38 +1,39 @@ /******************************************************************************* -* Copyright (c) 2011 Gluster, Inc. <http://www.gluster.com> + * Copyright (c) 2006-2011 Gluster, Inc. <http://www.gluster.com> * This file is part of Gluster Management Console. * - * Gluster Management Console is free software; you can redistribute it and/or - * modify it under the terms of the GNU Affero General Public License as published - * by the Free Software Foundation; either version 3 of the License, or - * (at your option) any later version. - * - * Gluster Management Console is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY - * or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Affero General Public License - * for more details. - * - * You should have received a copy of the GNU Affero General Public License - * along with this program. If not, see + * Gluster Management Console is free software; you can redistribute + * it and/or modify it under the terms of the GNU General Public + * License as published by the Free Software Foundation; either + * version 3 of the License, or (at your option) any later version. + * + * Gluster Management Console is distributed in the hope that it + * will be useful, but WITHOUT ANY WARRANTY; without even the + * implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR + * PURPOSE. See the GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program. If not, see * <http://www.gnu.org/licenses/>. *******************************************************************************/ -package com.gluster.storage.management.client; +package org.gluster.storage.management.client; -import static com.gluster.storage.management.core.constants.RESTConstants.QUERY_PARAM_DETAILS; -import static com.gluster.storage.management.core.constants.RESTConstants.RESOURCE_PATH_CLUSTERS; -import static com.gluster.storage.management.core.constants.RESTConstants.RESOURCE_SERVERS; +import static org.gluster.storage.management.core.constants.RESTConstants.QUERY_PARAM_DETAILS; +import static org.gluster.storage.management.core.constants.RESTConstants.RESOURCE_PATH_CLUSTERS; +import static org.gluster.storage.management.core.constants.RESTConstants.RESOURCE_SERVERS; import java.net.URI; import java.util.List; import javax.ws.rs.core.MultivaluedMap; -import com.gluster.storage.management.core.constants.RESTConstants; -import com.gluster.storage.management.core.model.GlusterServer; -import com.gluster.storage.management.core.model.ServerStats; -import com.gluster.storage.management.core.model.TaskInfo; -import com.gluster.storage.management.core.response.GlusterServerListResponse; -import com.gluster.storage.management.core.utils.GlusterCoreUtil; +import org.gluster.storage.management.core.constants.RESTConstants; +import org.gluster.storage.management.core.model.GlusterServer; +import org.gluster.storage.management.core.model.ServerStats; +import org.gluster.storage.management.core.response.FsTypeListResponse; +import org.gluster.storage.management.core.response.GlusterServerListResponse; +import org.gluster.storage.management.core.utils.GlusterCoreUtil; + import com.sun.jersey.api.representation.Form; import com.sun.jersey.core.util.MultivaluedMapImpl; @@ -77,9 +78,16 @@ public class GlusterServersClient extends AbstractClient { return postRequest(form); } - public URI initializeDisk(String serverName, String diskName, String fsType) { + public List<String> getFSTypes(String serverName) { + FsTypeListResponse fsTypeListResponse = ((FsTypeListResponse) fetchSubResource(serverName + "/" + RESTConstants.RESOURCE_FSTYPES, + FsTypeListResponse.class)); + return fsTypeListResponse.getFsTypes(); + } + + public URI initializeDisk(String serverName, String diskName, String fsType, String mountPoint) { Form form = new Form(); form.add(RESTConstants.FORM_PARAM_FSTYPE, fsType); + form.add(RESTConstants.FORM_PARAM_MOUNTPOINT, mountPoint); return putRequestURI(serverName + "/" + RESTConstants.RESOURCE_DISKS + "/" + diskName, form); } diff --git a/src/com.gluster.storage.management.client/src/com/gluster/storage/management/client/KeysClient.java b/src/org.gluster.storage.management.client/src/org/gluster/storage/management/client/KeysClient.java index 51fda466..feb24241 100644 --- a/src/com.gluster.storage.management.client/src/com/gluster/storage/management/client/KeysClient.java +++ b/src/org.gluster.storage.management.client/src/org/gluster/storage/management/client/KeysClient.java @@ -1,31 +1,30 @@ -/** - * KeysClient.java - * - * Copyright (c) 2011 Gluster, Inc. <http://www.gluster.com> +/******************************************************************************* + * Copyright (c) 2006-2011 Gluster, Inc. <http://www.gluster.com> * This file is part of Gluster Management Console. * - * Gluster Management Console is free software; you can redistribute it and/or - * modify it under the terms of the GNU Affero General Public License as published - * by the Free Software Foundation; either version 3 of the License, or - * (at your option) any later version. + * Gluster Management Console is free software; you can redistribute + * it and/or modify it under the terms of the GNU General Public + * License as published by the Free Software Foundation; either + * version 3 of the License, or (at your option) any later version. * - * Gluster Management Console is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY - * or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Affero General Public License - * for more details. + * Gluster Management Console is distributed in the hope that it + * will be useful, but WITHOUT ANY WARRANTY; without even the + * implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR + * PURPOSE. See the GNU General Public License for more details. * - * You should have received a copy of the GNU Affero General Public License - * along with this program. If not, see + * You should have received a copy of the GNU General Public License + * along with this program. If not, see * <http://www.gnu.org/licenses/>. - */ -package com.gluster.storage.management.client; + *******************************************************************************/ +package org.gluster.storage.management.client; import java.io.FileInputStream; import java.io.FileNotFoundException; import javax.ws.rs.core.MediaType; -import com.gluster.storage.management.core.constants.RESTConstants; +import org.gluster.storage.management.core.constants.RESTConstants; + import com.sun.jersey.multipart.FormDataMultiPart; public class KeysClient extends AbstractClient { diff --git a/src/com.gluster.storage.management.client/src/com/gluster/storage/management/client/TasksClient.java b/src/org.gluster.storage.management.client/src/org/gluster/storage/management/client/TasksClient.java index 46077371..d8005cfc 100644 --- a/src/com.gluster.storage.management.client/src/com/gluster/storage/management/client/TasksClient.java +++ b/src/org.gluster.storage.management.client/src/org/gluster/storage/management/client/TasksClient.java @@ -1,33 +1,32 @@ -/** - * tasksClient.java - * - * Copyright (c) 2011 Gluster, Inc. <http://www.gluster.com> +/******************************************************************************* + * Copyright (c) 2006-2011 Gluster, Inc. <http://www.gluster.com> * This file is part of Gluster Management Console. * - * Gluster Management Console is free software; you can redistribute it and/or - * modify it under the terms of the GNU Affero General Public License as published - * by the Free Software Foundation; either version 3 of the License, or - * (at your option) any later version. + * Gluster Management Console is free software; you can redistribute + * it and/or modify it under the terms of the GNU General Public + * License as published by the Free Software Foundation; either + * version 3 of the License, or (at your option) any later version. * - * Gluster Management Console is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY - * or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Affero General Public License - * for more details. + * Gluster Management Console is distributed in the hope that it + * will be useful, but WITHOUT ANY WARRANTY; without even the + * implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR + * PURPOSE. See the GNU General Public License for more details. * - * You should have received a copy of the GNU Affero General Public License - * along with this program. If not, see + * You should have received a copy of the GNU General Public License + * along with this program. If not, see * <http://www.gnu.org/licenses/>. - */ -package com.gluster.storage.management.client; + *******************************************************************************/ +package org.gluster.storage.management.client; import java.net.URI; import java.util.List; import javax.ws.rs.core.MultivaluedMap; -import com.gluster.storage.management.core.constants.RESTConstants; -import com.gluster.storage.management.core.model.TaskInfo; -import com.gluster.storage.management.core.response.TaskInfoListResponse; +import org.gluster.storage.management.core.constants.RESTConstants; +import org.gluster.storage.management.core.model.TaskInfo; +import org.gluster.storage.management.core.response.TaskInfoListResponse; + import com.sun.jersey.api.representation.Form; import com.sun.jersey.core.util.MultivaluedMapImpl; diff --git a/src/com.gluster.storage.management.client/src/com/gluster/storage/management/client/UsersClient.java b/src/org.gluster.storage.management.client/src/org/gluster/storage/management/client/UsersClient.java index 4e89e994..cc82a5e8 100644 --- a/src/com.gluster.storage.management.client/src/com/gluster/storage/management/client/UsersClient.java +++ b/src/org.gluster.storage.management.client/src/org/gluster/storage/management/client/UsersClient.java @@ -1,29 +1,30 @@ /******************************************************************************* - * Copyright (c) 2011 Gluster, Inc. <http://www.gluster.com> + * Copyright (c) 2006-2011 Gluster, Inc. <http://www.gluster.com> * This file is part of Gluster Management Console. * - * Gluster Management Console is free software; you can redistribute it and/or - * modify it under the terms of the GNU Affero General Public License as published - * by the Free Software Foundation; either version 3 of the License, or - * (at your option) any later version. - * - * Gluster Management Console is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY - * or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Affero General Public License - * for more details. - * - * You should have received a copy of the GNU Affero General Public License - * along with this program. If not, see + * Gluster Management Console is free software; you can redistribute + * it and/or modify it under the terms of the GNU General Public + * License as published by the Free Software Foundation; either + * version 3 of the License, or (at your option) any later version. + * + * Gluster Management Console is distributed in the hope that it + * will be useful, but WITHOUT ANY WARRANTY; without even the + * implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR + * PURPOSE. See the GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program. If not, see * <http://www.gnu.org/licenses/>. *******************************************************************************/ -package com.gluster.storage.management.client; +package org.gluster.storage.management.client; + +import static org.gluster.storage.management.core.constants.RESTConstants.FORM_PARAM_NEW_PASSWORD; +import static org.gluster.storage.management.core.constants.RESTConstants.FORM_PARAM_OLD_PASSWORD; -import static com.gluster.storage.management.core.constants.RESTConstants.FORM_PARAM_NEW_PASSWORD; -import static com.gluster.storage.management.core.constants.RESTConstants.FORM_PARAM_OLD_PASSWORD; +import org.gluster.storage.management.core.constants.RESTConstants; +import org.gluster.storage.management.core.exceptions.GlusterRuntimeException; +import org.gluster.storage.management.core.model.Status; -import com.gluster.storage.management.core.constants.RESTConstants; -import com.gluster.storage.management.core.exceptions.GlusterRuntimeException; -import com.gluster.storage.management.core.model.Status; import com.sun.jersey.api.representation.Form; import com.sun.jersey.core.util.Base64; @@ -77,7 +78,7 @@ public class UsersClient extends AbstractClient { /* * (non-Javadoc) * - * @see com.gluster.storage.management.client.AbstractClient#getResourceName() + * @see org.gluster.storage.management.client.AbstractClient#getResourceName() */ @Override public String getResourcePath() { @@ -87,7 +88,7 @@ public class UsersClient extends AbstractClient { /* * (non-Javadoc) * - * @see com.gluster.storage.management.client.AbstractClient#getSecurityToken() + * @see org.gluster.storage.management.client.AbstractClient#getSecurityToken() */ @Override public String getSecurityToken() { diff --git a/src/com.gluster.storage.management.client/src/com/gluster/storage/management/client/VolumesClient.java b/src/org.gluster.storage.management.client/src/org/gluster/storage/management/client/VolumesClient.java index 4c75c375..442f61f6 100644 --- a/src/com.gluster.storage.management.client/src/com/gluster/storage/management/client/VolumesClient.java +++ b/src/org.gluster.storage.management.client/src/org/gluster/storage/management/client/VolumesClient.java @@ -1,34 +1,32 @@ -/** - * VolumesClient.java - * - * Copyright (c) 2011 Gluster, Inc. <http://www.gluster.com> +/******************************************************************************* + * Copyright (c) 2006-2011 Gluster, Inc. <http://www.gluster.com> * This file is part of Gluster Management Console. * - * Gluster Management Console is free software; you can redistribute it and/or - * modify it under the terms of the GNU Affero General Public License as published - * by the Free Software Foundation; either version 3 of the License, or - * (at your option) any later version. + * Gluster Management Console is free software; you can redistribute + * it and/or modify it under the terms of the GNU General Public + * License as published by the Free Software Foundation; either + * version 3 of the License, or (at your option) any later version. * - * Gluster Management Console is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY - * or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Affero General Public License - * for more details. + * Gluster Management Console is distributed in the hope that it + * will be useful, but WITHOUT ANY WARRANTY; without even the + * implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR + * PURPOSE. See the GNU General Public License for more details. * - * You should have received a copy of the GNU Affero General Public License - * along with this program. If not, see + * You should have received a copy of the GNU General Public License + * along with this program. If not, see * <http://www.gnu.org/licenses/>. - */ -package com.gluster.storage.management.client; + *******************************************************************************/ +package org.gluster.storage.management.client; -import static com.gluster.storage.management.core.constants.RESTConstants.FORM_PARAM_ACCESS_PROTOCOLS; -import static com.gluster.storage.management.core.constants.RESTConstants.FORM_PARAM_BRICKS; -import static com.gluster.storage.management.core.constants.RESTConstants.FORM_PARAM_CIFS_USERS; -import static com.gluster.storage.management.core.constants.RESTConstants.FORM_PARAM_REPLICA_COUNT; -import static com.gluster.storage.management.core.constants.RESTConstants.FORM_PARAM_STRIPE_COUNT; -import static com.gluster.storage.management.core.constants.RESTConstants.FORM_PARAM_TRANSPORT_TYPE; -import static com.gluster.storage.management.core.constants.RESTConstants.FORM_PARAM_VOLUME_NAME; -import static com.gluster.storage.management.core.constants.RESTConstants.FORM_PARAM_VOLUME_OPTIONS; -import static com.gluster.storage.management.core.constants.RESTConstants.FORM_PARAM_VOLUME_TYPE; +import static org.gluster.storage.management.core.constants.RESTConstants.FORM_PARAM_ACCESS_PROTOCOLS; +import static org.gluster.storage.management.core.constants.RESTConstants.FORM_PARAM_BRICKS; +import static org.gluster.storage.management.core.constants.RESTConstants.FORM_PARAM_CIFS_USERS; +import static org.gluster.storage.management.core.constants.RESTConstants.FORM_PARAM_REPLICA_COUNT; +import static org.gluster.storage.management.core.constants.RESTConstants.FORM_PARAM_STRIPE_COUNT; +import static org.gluster.storage.management.core.constants.RESTConstants.FORM_PARAM_TRANSPORT_TYPE; +import static org.gluster.storage.management.core.constants.RESTConstants.FORM_PARAM_VOLUME_NAME; +import static org.gluster.storage.management.core.constants.RESTConstants.FORM_PARAM_VOLUME_OPTIONS; +import static org.gluster.storage.management.core.constants.RESTConstants.FORM_PARAM_VOLUME_TYPE; import java.net.URI; import java.util.Date; @@ -37,19 +35,20 @@ import java.util.Set; import javax.ws.rs.core.MultivaluedMap; -import com.gluster.storage.management.core.constants.CoreConstants; -import com.gluster.storage.management.core.constants.GlusterConstants; -import com.gluster.storage.management.core.constants.RESTConstants; -import com.gluster.storage.management.core.model.Brick; -import com.gluster.storage.management.core.model.Volume; -import com.gluster.storage.management.core.model.VolumeLogMessage; -import com.gluster.storage.management.core.model.VolumeOptionInfo; -import com.gluster.storage.management.core.response.LogMessageListResponse; -import com.gluster.storage.management.core.response.VolumeListResponse; -import com.gluster.storage.management.core.response.VolumeOptionInfoListResponse; -import com.gluster.storage.management.core.utils.DateUtil; -import com.gluster.storage.management.core.utils.GlusterCoreUtil; -import com.gluster.storage.management.core.utils.StringUtil; +import org.gluster.storage.management.core.constants.CoreConstants; +import org.gluster.storage.management.core.constants.GlusterConstants; +import org.gluster.storage.management.core.constants.RESTConstants; +import org.gluster.storage.management.core.model.Brick; +import org.gluster.storage.management.core.model.Volume; +import org.gluster.storage.management.core.model.VolumeLogMessage; +import org.gluster.storage.management.core.model.VolumeOptionInfo; +import org.gluster.storage.management.core.response.LogMessageListResponse; +import org.gluster.storage.management.core.response.VolumeListResponse; +import org.gluster.storage.management.core.response.VolumeOptionInfoListResponse; +import org.gluster.storage.management.core.utils.DateUtil; +import org.gluster.storage.management.core.utils.GlusterCoreUtil; +import org.gluster.storage.management.core.utils.StringUtil; + import com.sun.jersey.api.representation.Form; import com.sun.jersey.core.util.MultivaluedMapImpl; @@ -87,19 +86,20 @@ public class VolumesClient extends AbstractClient { postRequest(form); } - private void performOperation(String volumeName, String operation) { + private void performOperation(String volumeName, String operation, Boolean force) { Form form = new Form(); form.add(RESTConstants.FORM_PARAM_OPERATION, operation); + form.add(RESTConstants.FORM_PARAM_FORCE, force); putRequest(volumeName, form); } - public void startVolume(String volumeName) { - performOperation(volumeName, RESTConstants.TASK_START); + public void startVolume(String volumeName, Boolean forceStart) { + performOperation(volumeName, RESTConstants.TASK_START, forceStart); } - public void stopVolume(String volumeName) { - performOperation(volumeName, RESTConstants.TASK_STOP); + public void stopVolume(String volumeName, Boolean forceStop) { + performOperation(volumeName, RESTConstants.TASK_STOP, forceStop); } public void setCifsConfig(String volumeName, Boolean isCifsEnabled, String cifsUsers) { @@ -258,6 +258,14 @@ public class VolumesClient extends AbstractClient { putRequest(volumeName, form); } + public void volumeLogRotate(String volumeName, List<String> brickList) { + Form form = new Form(); + String bricks = StringUtil.collectionToString(brickList, ","); + form.add(RESTConstants.FORM_PARAM_OPERATION, RESTConstants.TASK_LOG_ROTATE); + form.add(FORM_PARAM_BRICKS, bricks); + putRequest(volumeName, form); + } + public static void main(String[] args) { UsersClient usersClient = new UsersClient(); try { diff --git a/src/org.gluster.storage.management.client/src/org/gluster/storage/management/client/constants/ClientConstants.java b/src/org.gluster.storage.management.client/src/org/gluster/storage/management/client/constants/ClientConstants.java new file mode 100644 index 00000000..c2dd1890 --- /dev/null +++ b/src/org.gluster.storage.management.client/src/org/gluster/storage/management/client/constants/ClientConstants.java @@ -0,0 +1,38 @@ +/******************************************************************************* + * Copyright (c) 2006-2011 Gluster, Inc. <http://www.gluster.com> + * This file is part of Gluster Management Console. + * + * Gluster Management Console is free software; you can redistribute + * it and/or modify it under the terms of the GNU General Public + * License as published by the Free Software Foundation; either + * version 3 of the License, or (at your option) any later version. + * + * Gluster Management Console is distributed in the hope that it + * will be useful, but WITHOUT ANY WARRANTY; without even the + * implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR + * PURPOSE. See the GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program. If not, see + * <http://www.gnu.org/licenses/>. + *******************************************************************************/ +package org.gluster.storage.management.client.constants; + +/** + * + */ +public class ClientConstants { + public static final String SYS_PROP_SERVER_URL = "gluster.server.url"; + public static final String DEFAULT_SERVER_URL = "https://localhost:8443/glustermg/linux.gtk.x86_64"; + public static final String CONTEXT_ROOT = "glustermg"; + public static final String SYS_PROP_API_VERSION = "gluster.api.version"; + public static final String DEFAULT_API_VERSION = "@VERSION@"; + + // SSL related + public static final String TRUSTED_KEYSTORE = "gmc-trusted.keystore"; + public static final String TRUSTED_KEYSTORE_ACCESS = "gluster"; + public static final String PROTOCOL_TLS = "TLS"; + public static final String ALGORITHM_SUNX509 = "SunX509"; + public static final String KEYSTORE_TYPE_JKS = "JKS"; +} + diff --git a/src/org.gluster.storage.management.client/src/org/gluster/storage/management/client/utils/ClientUtil.java b/src/org.gluster.storage.management.client/src/org/gluster/storage/management/client/utils/ClientUtil.java new file mode 100644 index 00000000..a4d665f9 --- /dev/null +++ b/src/org.gluster.storage.management.client/src/org/gluster/storage/management/client/utils/ClientUtil.java @@ -0,0 +1,43 @@ +/******************************************************************************* + * Copyright (c) 2006-2011 Gluster, Inc. <http://www.gluster.com> + * This file is part of Gluster Management Console. + * + * Gluster Management Console is free software; you can redistribute + * it and/or modify it under the terms of the GNU General Public + * License as published by the Free Software Foundation; either + * version 3 of the License, or (at your option) any later version. + * + * Gluster Management Console is distributed in the hope that it + * will be useful, but WITHOUT ANY WARRANTY; without even the + * implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR + * PURPOSE. See the GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program. If not, see + * <http://www.gnu.org/licenses/>. + *******************************************************************************/ +package org.gluster.storage.management.client.utils; + +import java.net.URI; + +import javax.ws.rs.core.UriBuilder; + +import org.gluster.storage.management.client.constants.ClientConstants; + + +public class ClientUtil { + + public static URI getServerBaseURI() { + return UriBuilder.fromUri(getBaseURL()).path(getAPIVersion()).build(); + } + + private static String getAPIVersion() { + return System.getProperty(ClientConstants.SYS_PROP_API_VERSION, ClientConstants.DEFAULT_API_VERSION); + } + + private static String getBaseURL() { + // remove the platform path (e.g. /linux.gtk.x86_64) from the URL + return System.getProperty(ClientConstants.SYS_PROP_SERVER_URL, ClientConstants.DEFAULT_SERVER_URL) + .replaceAll(ClientConstants.CONTEXT_ROOT + "\\/.*", ClientConstants.CONTEXT_ROOT + "\\/"); + } +} diff --git a/src/com.gluster.storage.management.console.feature.webstart/.project b/src/org.gluster.storage.management.console.feature.webstart/.project index ebf9c846..f306a1c9 100644 --- a/src/com.gluster.storage.management.console.feature.webstart/.project +++ b/src/org.gluster.storage.management.console.feature.webstart/.project @@ -1,6 +1,6 @@ <?xml version="1.0" encoding="UTF-8"?> <projectDescription> - <name>com.gluster.storage.management.console.feature.webstart</name> + <name>org.gluster.storage.management.console.feature.webstart</name> <comment></comment> <projects> </projects> diff --git a/src/com.gluster.storage.management.console.feature.webstart/buckminster.cspex b/src/org.gluster.storage.management.console.feature.webstart/buckminster.cspex index 252a5e15..7a7a9b95 100644 --- a/src/com.gluster.storage.management.console.feature.webstart/buckminster.cspex +++ b/src/org.gluster.storage.management.console.feature.webstart/buckminster.cspex @@ -37,5 +37,11 @@ <property key="targets" value="copy.root.files" /> </actorProperties> </public> + <public name="update.version" actor="ant"> + <actorProperties> + <property key="buildFile" value="build/glustermc.ant" /> + <property key="targets" value="update.version" /> + </actorProperties> + </public> </actions> </cspecExtension> diff --git a/src/org.gluster.storage.management.console.feature.webstart/build.properties b/src/org.gluster.storage.management.console.feature.webstart/build.properties new file mode 100644 index 00000000..44f026e3 --- /dev/null +++ b/src/org.gluster.storage.management.console.feature.webstart/build.properties @@ -0,0 +1,20 @@ +############################################################################### +# Copyright (c) 2006-2011 Gluster, Inc. <http://www.gluster.com> +# This file is part of Gluster Management Console. +# +# Gluster Management Console is free software; you can redistribute +# it and/or modify it under the terms of the GNU General Public +# License as published by the Free Software Foundation; either +# version 3 of the License, or (at your option) any later version. +# +# Gluster Management Console is distributed in the hope that it +# will be useful, but WITHOUT ANY WARRANTY; without even the +# implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR +# PURPOSE. See the GNU General Public License for more details. +# +# You should have received a copy of the GNU General Public License +# along with this program. If not, see +# <http://www.gnu.org/licenses/>. +############################################################################### +#bin.includes = feature.xml +root=rootfiles diff --git a/src/com.gluster.storage.management.console.feature.webstart/build/glustermc.ant b/src/org.gluster.storage.management.console.feature.webstart/build/glustermc.ant index 6b0152f6..a1dc0c66 100644 --- a/src/com.gluster.storage.management.console.feature.webstart/build/glustermc.ant +++ b/src/org.gluster.storage.management.console.feature.webstart/build/glustermc.ant @@ -1,5 +1,7 @@ <project> <property name="export.dir" value="${buckminster.output}/glustermc/" /> + <property name="jnlp.file" value="${export.dir}/gluster-management-console.jnlp" /> + <target name='unsign'> <buckminster.signatureCleaner> <fileset dir='${export.dir}/plugins'> @@ -12,7 +14,7 @@ </target> <target name="sign"> - <signjar alias="gluster" storepass="gluster" keypass="gluster" keystore="/var/lib/jenkins/gmc/gluster.keystore"> + <signjar alias="gluster" storepass="gluster" keypass="gluster" keystore="${jar.signing.keystore}"> <fileset dir="${export.dir}/plugins"> <include name="*.jar" /> </fileset> @@ -27,4 +29,17 @@ <fileset dir="${basedir}/rootfiles" /> </copy> </target> + + <target name='update.version'> + <replace file="${jnlp.file}" token="@VERSION@" value="${product.version}" /> + <move todir="${export.dir}"> + <fileset dir="${export.dir}" /> + <mapper> + <mapper type="regexp" + from="org.gluster.storage.management.console.feature_.*.jnlp" + to="org.gluster.storage.management.console.feature_${product.version}.jnlp" /> + </mapper> + </move> + </target> + </project> diff --git a/src/com.gluster.storage.management.console.feature.webstart/feature.xml b/src/org.gluster.storage.management.console.feature.webstart/feature.xml index 94717400..beab8637 100644 --- a/src/com.gluster.storage.management.console.feature.webstart/feature.xml +++ b/src/org.gluster.storage.management.console.feature.webstart/feature.xml @@ -1,9 +1,27 @@ <?xml version="1.0" encoding="UTF-8"?> +<!-- + Copyright (c) 2006-2011 Gluster, Inc. <http://www.gluster.com> + This file is part of Gluster Management Console. + + Gluster Management Console is free software; you can redistribute + it and/or modify it under the terms of the GNU General Public + License as published by the Free Software Foundation; either + version 3 of the License, or (at your option) any later version. + + Gluster Management Console is distributed in the hope that it + will be useful, but WITHOUT ANY WARRANTY; without even the + implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR + PURPOSE. See the GNU General Public License for more details. + + You should have received a copy of the GNU General Public License + along with this program. If not, see + <http://www.gnu.org/licenses/>. + --> <feature - id="com.gluster.storage.management.console.feature.webstart" + id="org.gluster.storage.management.console.feature.webstart" label="Gluster Management Console - Webstart" - version="1.0.0" - provider-name="Gluster Inc." + version="1.0.0.qualifier" + provider-name="Gluster" os="linux,macosx,win32" ws="cocoa,gtk,win32" arch="x86,x86_64,amd64"> @@ -21,7 +39,7 @@ </license> <includes - id="com.gluster.storage.management.console.feature" + id="org.gluster.storage.management.console.feature" version="0.0.0"/> <requires> @@ -50,12 +68,12 @@ <import plugin="org.eclipse.jface.databinding" version="1.3.0" match="compatible"/> <import plugin="org.eclipse.core.databinding.property" version="1.2.0" match="compatible"/> <import plugin="org.eclipse.core.databinding.observable" version="1.2.0" match="compatible"/> - <import plugin="org.eclipse.osgi" version="3.5.0" match="compatible"/> <import plugin="org.eclipse.equinox.common" version="3.5.0" match="compatible"/> <import plugin="org.eclipse.core.jobs" version="3.2.0" match="compatible"/> - <import plugin="org.eclipse.equinox.preferences" version="3.3.0" match="compatible"/> <import plugin="org.eclipse.core.contenttype" version="3.3.0" match="compatible"/> - <import plugin="org.eclipse.equinox.app" version="1.0.0" match="compatible"/> + <import plugin="org.eclipse.osgi" version="3.7.0" match="compatible"/> + <import plugin="org.eclipse.equinox.preferences" version="3.4.0" match="compatible"/> + <import plugin="org.eclipse.equinox.app" version="1.0.0" match="greaterOrEqual"/> </requires> <plugin diff --git a/src/com.gluster.storage.management.console.feature.webstart/rootfiles/gluster-management-console.jnlp b/src/org.gluster.storage.management.console.feature.webstart/rootfiles/gluster-management-console.jnlp index f87631df..b5417bb8 100644 --- a/src/com.gluster.storage.management.console.feature.webstart/rootfiles/gluster-management-console.jnlp +++ b/src/org.gluster.storage.management.console.feature.webstart/rootfiles/gluster-management-console.jnlp @@ -16,11 +16,11 @@ <all-permissions/> </security> <resources> - <j2se java-vm-args="-XstartOnFirstThread" version="1.5+" /> - <jar href="plugins/org.eclipse.equinox.launcher_1.1.0.v20100507.jar" main="true"/> + <j2se java-vm-args="-XstartOnFirstThread" version="1.6+" /> + <jar href="plugins/org.eclipse.equinox.launcher_1.2.0.v20110502.jar" main="true"/> <extension name="Gluster Management Console" - href="com.gluster.storage.management.console.feature_1.0.0.jnlp"/> + href="org.gluster.storage.management.console.feature_@VERSION@.jnlp"/> <property name="osgi.instance.area" value="@user.home/Application Data/glustermc"/> @@ -29,10 +29,13 @@ value="@user.home/Application Data/glustermc"/> <property name="eclipse.product" - value="com.gluster.storage.management.console.product"/> + value="org.gluster.storage.management.console.product"/> <property name="gluster.server.url" value="$$codebase"/> + <property + name="gluster.api.version" + value="@VERSION@"/> <property name="javaws.cfg.jauthenticator" value="true"/> diff --git a/src/com.gluster.storage.management.console.feature.webstart/rootfiles/splash.png b/src/org.gluster.storage.management.console.feature.webstart/rootfiles/splash.png Binary files differindex 74983f8a..74983f8a 100644 --- a/src/com.gluster.storage.management.console.feature.webstart/rootfiles/splash.png +++ b/src/org.gluster.storage.management.console.feature.webstart/rootfiles/splash.png diff --git a/src/com.gluster.storage.management.releng/.project b/src/org.gluster.storage.management.console.feature/.project index f4723731..a4a4a321 100644 --- a/src/com.gluster.storage.management.releng/.project +++ b/src/org.gluster.storage.management.console.feature/.project @@ -1,6 +1,6 @@ <?xml version="1.0" encoding="UTF-8"?> <projectDescription> - <name>com.gluster.storage.management.releng</name> + <name>org.gluster.storage.management.console.feature</name> <comment></comment> <projects> </projects> diff --git a/src/org.gluster.storage.management.console.feature/build.properties b/src/org.gluster.storage.management.console.feature/build.properties new file mode 100644 index 00000000..66f4d625 --- /dev/null +++ b/src/org.gluster.storage.management.console.feature/build.properties @@ -0,0 +1,19 @@ +############################################################################### +# Copyright (c) 2006-2011 Gluster, Inc. <http://www.gluster.com> +# This file is part of Gluster Management Console. +# +# Gluster Management Console is free software; you can redistribute +# it and/or modify it under the terms of the GNU General Public +# License as published by the Free Software Foundation; either +# version 3 of the License, or (at your option) any later version. +# +# Gluster Management Console is distributed in the hope that it +# will be useful, but WITHOUT ANY WARRANTY; without even the +# implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR +# PURPOSE. See the GNU General Public License for more details. +# +# You should have received a copy of the GNU General Public License +# along with this program. If not, see +# <http://www.gnu.org/licenses/>. +############################################################################### +bin.includes = feature.xml diff --git a/src/com.gluster.storage.management.console.feature/feature.xml b/src/org.gluster.storage.management.console.feature/feature.xml index fdafcd35..473b1947 100644 --- a/src/com.gluster.storage.management.console.feature/feature.xml +++ b/src/org.gluster.storage.management.console.feature/feature.xml @@ -1,9 +1,27 @@ <?xml version="1.0" encoding="UTF-8"?> +<!-- + Copyright (c) 2006-2011 Gluster, Inc. <http://www.gluster.com> + This file is part of Gluster Management Console. + + Gluster Management Console is free software; you can redistribute + it and/or modify it under the terms of the GNU General Public + License as published by the Free Software Foundation; either + version 3 of the License, or (at your option) any later version. + + Gluster Management Console is distributed in the hope that it + will be useful, but WITHOUT ANY WARRANTY; without even the + implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR + PURPOSE. See the GNU General Public License for more details. + + You should have received a copy of the GNU General Public License + along with this program. If not, see + <http://www.gnu.org/licenses/>. + --> <feature - id="com.gluster.storage.management.console.feature" + id="org.gluster.storage.management.console.feature" label="Gluster Management Console" - version="1.0.0" - provider-name="Gluster, Inc." + version="1.0.0.qualifier" + provider-name="Gluster" os="linux,macosx,win32" ws="cocoa,gtk,win32" arch="x86,x86_64,amd64"> @@ -108,13 +126,6 @@ unpack="false"/> <plugin - id="org.eclipse.help" - download-size="0" - install-size="0" - version="0.0.0" - unpack="false"/> - - <plugin id="org.eclipse.equinox.p2.metadata" download-size="0" install-size="0" @@ -225,7 +236,7 @@ unpack="false"/> <plugin - id="com.gluster.storage.management.console" + id="org.gluster.storage.management.console" download-size="0" install-size="0" version="0.0.0" @@ -628,7 +639,7 @@ fragment="true"/> <plugin - id="com.gluster.storage.management.core" + id="org.gluster.storage.management.core" download-size="0" install-size="0" version="0.0.0" @@ -698,7 +709,7 @@ unpack="false"/> <plugin - id="com.gluster.storage.management.client" + id="org.gluster.storage.management.client" download-size="0" install-size="0" version="0.0.0" @@ -780,33 +791,12 @@ unpack="false"/> <plugin - id="com.gluster.storage.management.console.help" + id="org.gluster.storage.management.console.help" download-size="0" install-size="0" version="0.0.0"/> <plugin - id="org.eclipse.help.ui" - download-size="0" - install-size="0" - version="0.0.0" - unpack="false"/> - - <plugin - id="org.eclipse.help.webapp" - download-size="0" - install-size="0" - version="0.0.0" - unpack="false"/> - - <plugin - id="org.eclipse.help.base" - download-size="0" - install-size="0" - version="0.0.0" - unpack="false"/> - - <plugin id="org.apache.lucene.analysis" download-size="0" install-size="0" @@ -932,4 +922,39 @@ version="0.0.0" unpack="false"/> + <plugin + id="org.apache.lucene.core" + download-size="0" + install-size="0" + version="0.0.0" + unpack="false"/> + + <plugin + id="org.eclipse.help" + download-size="0" + install-size="0" + version="0.0.0" + unpack="false"/> + + <plugin + id="org.eclipse.help.base" + download-size="0" + install-size="0" + version="0.0.0" + unpack="false"/> + + <plugin + id="org.eclipse.help.ui" + download-size="0" + install-size="0" + version="0.0.0" + unpack="false"/> + + <plugin + id="org.eclipse.help.webapp" + download-size="0" + install-size="0" + version="0.0.0" + unpack="false"/> + </feature> diff --git a/src/com.gluster.storage.management.console.help/.project b/src/org.gluster.storage.management.console.help/.project index ba39c551..51640e5e 100644 --- a/src/com.gluster.storage.management.console.help/.project +++ b/src/org.gluster.storage.management.console.help/.project @@ -1,6 +1,6 @@ <?xml version="1.0" encoding="UTF-8"?> <projectDescription> - <name>com.gluster.storage.management.console.help</name> + <name>org.gluster.storage.management.console.help</name> <comment></comment> <projects> </projects> diff --git a/src/com.gluster.storage.management.console.help/.settings/org.eclipse.core.resources.prefs b/src/org.gluster.storage.management.console.help/.settings/org.eclipse.core.resources.prefs index b1ce800b..970d49e2 100644 --- a/src/com.gluster.storage.management.console.help/.settings/org.eclipse.core.resources.prefs +++ b/src/org.gluster.storage.management.console.help/.settings/org.eclipse.core.resources.prefs @@ -1,6 +1,8 @@ -#Tue Aug 09 14:51:49 IST 2011
+#Tue Aug 23 12:38:58 IST 2011
eclipse.preferences.version=1
encoding//html/concepts/about_gmc.html=UTF-8
encoding//html/concepts/common_terms.html=UTF-8
encoding//html/concepts/gluster_fs.html=UTF-8
+encoding//html/gettingstarted/check_req_client.html=UTF-8
+encoding//html/gettingstarted/cifs_service.html=UTF-8
encoding/build.properties=UTF-8
diff --git a/src/com.gluster.storage.management.console.help/.settings/org.eclipse.wst.css.core.prefs b/src/org.gluster.storage.management.console.help/.settings/org.eclipse.wst.css.core.prefs index d7503970..d7503970 100644 --- a/src/com.gluster.storage.management.console.help/.settings/org.eclipse.wst.css.core.prefs +++ b/src/org.gluster.storage.management.console.help/.settings/org.eclipse.wst.css.core.prefs diff --git a/src/com.gluster.storage.management.console.help/META-INF/MANIFEST.MF b/src/org.gluster.storage.management.console.help/META-INF/MANIFEST.MF index 7795e50d..c86045d4 100644 --- a/src/com.gluster.storage.management.console.help/META-INF/MANIFEST.MF +++ b/src/org.gluster.storage.management.console.help/META-INF/MANIFEST.MF @@ -1,9 +1,9 @@ Manifest-Version: 1.0 Bundle-ManifestVersion: 2 Bundle-Name: Gluster Management Console - Help -Bundle-SymbolicName: com.gluster.storage.management.console.help; singleton:=true -Bundle-Version: 1.0.0 -Bundle-Vendor: GLUSTER +Bundle-SymbolicName: org.gluster.storage.management.console.help;singleton:=true +Bundle-Version: 1.0.0.qualifier +Bundle-Vendor: Gluster Require-Bundle: org.eclipse.help.ui;bundle-version="3.5.2", org.eclipse.help.webapp;bundle-version="3.5.2", org.eclipse.help diff --git a/src/org.gluster.storage.management.console.help/build.properties b/src/org.gluster.storage.management.console.help/build.properties new file mode 100644 index 00000000..f4ce4012 --- /dev/null +++ b/src/org.gluster.storage.management.console.help/build.properties @@ -0,0 +1,26 @@ +############################################################################### +# Copyright (c) 2006-2011 Gluster, Inc. <http://www.gluster.com> +# This file is part of Gluster Management Console. +# +# Gluster Management Console is free software; you can redistribute +# it and/or modify it under the terms of the GNU General Public +# License as published by the Free Software Foundation; either +# version 3 of the License, or (at your option) any later version. +# +# Gluster Management Console is distributed in the hope that it +# will be useful, but WITHOUT ANY WARRANTY; without even the +# implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR +# PURPOSE. See the GNU General Public License for more details. +# +# You should have received a copy of the GNU General Public License +# along with this program. If not, see +# <http://www.gnu.org/licenses/>. +############################################################################### +bin.includes = plugin.xml,\ + META-INF/,\ + html/,\ + toc.xml,\ + tocconcepts.xml,\ + tocgettingstarted.xml,\ + toctasks.xml,\ + tocreference.xml diff --git a/src/com.gluster.storage.management.console.help/html/concepts/about_gmc.html b/src/org.gluster.storage.management.console.help/html/concepts/about_gmc.html index cb944ce8..ef79927b 100644 --- a/src/com.gluster.storage.management.console.help/html/concepts/about_gmc.html +++ b/src/org.gluster.storage.management.console.help/html/concepts/about_gmc.html @@ -10,9 +10,7 @@ type="text/css" media="screen" /> <body> <h1>About Gluster Management Console</h1> -Gluster Management Console is a Java application that provides a single point of control to build, manage, and maintain your Gluster storage cluster. - -You can use theconsole's GUI interface to perform the administrative tasks required to create and maintain an integrated environment. <p>You can use the Gluster Management Console to:</p> +Gluster Management Console is a Java application that provides a single interface to perform the administrative tasks such as create, manage, and maintain your storage cluster. <p>You can use the Gluster Management Console to:</p> <ul> <li>Create a Gluster Storage Cluster <li>Expand your cluster diff --git a/src/com.gluster.storage.management.console.help/html/concepts/about_gmg.html b/src/org.gluster.storage.management.console.help/html/concepts/about_gmg.html index f66bffa3..34f9c860 100644 --- a/src/com.gluster.storage.management.console.help/html/concepts/about_gmg.html +++ b/src/org.gluster.storage.management.console.help/html/concepts/about_gmg.html @@ -10,7 +10,7 @@ type="text/css" media="screen" /> <body>
<h1>Gluster Management Gateway</h1>
-Gluster Management Gateway provides simple and powerful ReST APIs for managing your Gluster Storage Cluster. It also hosts the Gluster Management Console binaries, which can be invoked from a browser using the Java Webstart. Gluster Management Console uses the ReST APIs for performing the administrative tasks on the Gluster Storage Cluster.
-<p><p><img src="../images/GMG_Architecture.jpg" alt="GlusterFS Architecture" />
+Gluster Management Gateway provides simple and powerful ReST APIs for managing your Gluster Storage Cluster. It also hosts the Gluster Management Console binaries, which can be launched from a browser using the Java Webstart. Gluster Management Console uses the ReST APIs for performing the administrative tasks on the Gluster Storage Cluster
+<p><p><img src="../images/GlusterMC_Architecture.jpg" alt="Gluster Management Gateway Architecture" />
</body>
-</html>
\ No newline at end of file +</html>
\ No newline at end of file diff --git a/src/com.gluster.storage.management.console.help/html/concepts/common_terms.html b/src/org.gluster.storage.management.console.help/html/concepts/common_terms.html index 0aa9edf9..ccf6d218 100644 --- a/src/com.gluster.storage.management.console.help/html/concepts/common_terms.html +++ b/src/org.gluster.storage.management.console.help/html/concepts/common_terms.html @@ -10,6 +10,10 @@ type="text/css" media="screen" /> <body> <h1>Common Cluster Terminologies</h1> +<p><b>Cluster</b></p> +<p>A cluster is a group of linked computers, working together closely thus in many respects forming a single computer.</p> +<p><b>Brick</b> +<p>Brick is the basic unit of storage, represented by an export directory on a server in the trusted storage pool.</p> <p><b>Network</b></p> <p>A network is a collection of interconnected computers able to communicate with each other and transfer information back and forth.</p> @@ -41,15 +45,6 @@ example) a separate volume for each user's home directory, you keep all of the user's files together, but separate from those of other users. This is an administrative convenience that is impossible if the partition is the smallest unit of storage.</p> -<p><b>Mount Points</b></p> -<p>The previous section discussed how each volume corresponds -logically to a directory in the file system: the volume keeps together -on one partition all the data in the files residing in the directory. -The directory that corresponds to a volume is called its root directory, -and the mechanism that associates the directory and volume is called a -mount point. A mount point is similar to a symbolic link in the file -tree that specifies which volume contains the files kept in a directory. -A mount point is not an actual symbolic link; its internal structure is -different. + </body> </html>
\ No newline at end of file diff --git a/src/com.gluster.storage.management.console.help/html/concepts/gluster_fs.html b/src/org.gluster.storage.management.console.help/html/concepts/gluster_fs.html index 4efe5f36..4efe5f36 100644 --- a/src/com.gluster.storage.management.console.help/html/concepts/gluster_fs.html +++ b/src/org.gluster.storage.management.console.help/html/concepts/gluster_fs.html diff --git a/src/com.gluster.storage.management.console.help/html/concepts/maintopic.html b/src/org.gluster.storage.management.console.help/html/concepts/maintopic.html index a476078a..a476078a 100644 --- a/src/com.gluster.storage.management.console.help/html/concepts/maintopic.html +++ b/src/org.gluster.storage.management.console.help/html/concepts/maintopic.html diff --git a/src/com.gluster.storage.management.console.help/html/concepts/subtopic.html b/src/org.gluster.storage.management.console.help/html/concepts/subtopic.html index 8a61c501..8a61c501 100644 --- a/src/com.gluster.storage.management.console.help/html/concepts/subtopic.html +++ b/src/org.gluster.storage.management.console.help/html/concepts/subtopic.html diff --git a/src/com.gluster.storage.management.console.help/html/concepts/subtopic2.html b/src/org.gluster.storage.management.console.help/html/concepts/subtopic2.html index 86bcbf9c..86bcbf9c 100644 --- a/src/com.gluster.storage.management.console.help/html/concepts/subtopic2.html +++ b/src/org.gluster.storage.management.console.help/html/concepts/subtopic2.html diff --git a/src/org.gluster.storage.management.console.help/html/css/Builder/style.css b/src/org.gluster.storage.management.console.help/html/css/Builder/style.css new file mode 100644 index 00000000..39efe946 --- /dev/null +++ b/src/org.gluster.storage.management.console.help/html/css/Builder/style.css @@ -0,0 +1,939 @@ +/* +Theme Name: Builder +Theme URI: http://ithemes.com/ +Description: Builder lets you create custom layouts quickly and easily. +Author: iThemes +Author URI: http://ithemes.com/ +Version: 2.8.0 +Tags: blog, theme options, multiple layouts, multiple color schemes + +Version History + See history.txt +*/ + +/********************************************* + Default font settings and typography. + The font-size percentage is of 16px. (0.75 * 16px = 12px) +*********************************************/ +html { + font-size: 100.01%; +} +body { + font-size: 75%; + line-height: 1.5; + color: #222222; + font-family: Arial, Helvetica, sans-serif; +} +input, select, textarea { + font-family: Arial, Helvetica, sans-serif; +} +pre, code, tt, kbd { + font-family: 'andale mono', 'lucida console', monospace; + font-size: 1em; + line-height: 1.5; +} +h1, h2, h3, h4, h5, h6, p, blockquote, pre, +address, dfn, img, samp, ul, ol, dl { + margin-top: 1.5em; + margin-bottom: 1.5em; +} +a img { + margin: 0; +} + +/********************************************* + Constrain table, image, and input widths +*********************************************/ +table, img, input, textarea, select { + max-width: 100%; + height: auto; + -moz-box-sizing: border-box; + -webkit-box-sizing: border-box; + -ms-box-sizing: border-box; + box-sizing: border-box; +} + +/********************************************* + Main Background +*********************************************/ +body { + background: #F7F7F7; +} + +/********************************************* + Universal Link Styles +*********************************************/ +a { + color: #000000; + text-decoration: underline; +} +a:hover { + color: #000000; + text-decoration: underline; +} +a:focus { + color: #000000; +} + +/********************************************* + Headings +*********************************************/ +h1, h2, h3, h4, h5, h6 { + font-weight: bold; + color: #111111; +} +h1 { + font-family: "Arial Black", Arial, Helvetica, Sans-Serif; + font-size: 2em; + line-height: 1.5; + margin-top: 0.75em; + margin-bottom: 0.75em; + letter-spacing: -1px; +} +h2 { + font-size: 1.7em; + line-height: 1.75em; + margin-top: 0.9em; + margin-bottom: 0.9em; +} +h3 { + font-size: 1.5em; + line-height: 1; + margin-top: 1em; + margin-bottom: 1em; +} +h4 { + font-size: 1.2em; + line-height: 1.25em; + margin-top: 1.25em; + margin-bottom: 1.25em; +} +h5, h6 { + font-size: 1em; +} +h6 { + font-style: italic; +} +h1 img, h2 img, h3 img, h4 img, h5 img, h6 img { + margin: 0; +} + +/********************************************* + Container Div +*********************************************/ +.builder-container-outer-wrapper { + background: transparent; + margin: 1.5em auto; + border: none; + display: block; +} + +/********************************************* + Default Module Styling +*********************************************/ +.builder-module { + background: #FFFFFF; + margin-bottom: 1.5em; + border-top: .1em solid #777777; + border-bottom: .1em solid #777777; +} +.builder-module-last { + margin-bottom: 0; +} + +/* Failed attempt #5 at producing full-height sidebars + + This does not work due to a Firefox glitch that causes wide content to + override the width of blocks. + + These rules should be looked at again later in case Firefox fixes this issue. +*/ +/* +.builder-module { + display: table; + table-layout: fixed; +} +.builder-module-block-outer-wrapper { + display: table-cell !important; + float: none !important; + vertical-align: top; +} +*/ + +/********************************************* + All Sidebars +*********************************************/ +.builder-module-sidebar { + background: #DDDDDD; + display: block; + width: 100%; + text-align: left; + margin: 0; + padding: .75em 0; +} +.builder-module-sidebar.right { + margin-right: 0; +} +.builder-module-sidebar.left { + margin-left: 0; +} +.builder-module-sidebar .widget-wrapper { + width: 100%; +} +.builder-module-sidebar .widget { + margin: 0; + padding: .75em 1.5em; + color: #333333; +} +.builder-module-block-outer-wrapper { + overflow: visible !important; +} +.builder-module-block-outer-wrapper .widget-wrapper-left .widget, +.builder-module-block-outer-wrapper .widget-wrapper-middle .widget { + padding-right: .75em; +} +.builder-module-block-outer-wrapper .widget-wrapper-middle .widget, +.builder-module-block-outer-wrapper .widget-wrapper-right .widget { + padding-left: .75em; +} +.builder-module-sidebar h4.widget-title { + color: #333333; + background: none; + font-size: 1.2em; + line-height: 1.25; + padding: 0; + margin: 0 0 1.25em 0; +} +.builder-module-sidebar h4.widget-title a { + color: #333333; +} +.builder-module-sidebar h4.widget-title + * { + margin-top: 0; +} +.builder-module-sidebar .widget *:first-child { + margin-top: 0; +} +.builder-module-sidebar .widget *:last-child { + margin-bottom: 0; +} +.builder-module-sidebar .widget a.rsswidget img { + display: none; +} + +/********************************************* + Navigation Module +*********************************************/ +.builder-module-navigation { + font-size: 1em; + line-height: 2em; + background: #FFFFFF url('images/nav_bg.png') repeat top left; + display: block; + width: 100%; +} +.builder-module-navigation .builder-module-element { + margin: 0 .5em; +} +.builder-module-navigation ul { + float: left; + display: block; + margin: 0; + padding: 0; +} +.builder-module-navigation ul * { + margin: 0; +} +.builder-module-navigation li { + padding: 0; +} +.builder-module-navigation li a, +.builder-module-navigation li.current_page_item li a, +.builder-module-navigation li.current-cat li a { + font-size: 1em; + padding: .4em .6em; + color: #333333; + font-weight: bold; + text-decoration: none; + background: #FFFFFF url('images/nav_bg.png') repeat-x top left; +} +.builder-module-navigation li a:hover { + background: #333333 url('images/nav_bg_hover.jpg') repeat-x top left; + color: #FFFFFF; +} +.builder-module-navigation li.current_page_item a, +.builder-module-navigation li.current-cat a { +} +/* second level stuff */ +.builder-module-navigation li ul { + width: 14em; + border: .1em solid #777777; + border-bottom: 0; +} +.builder-module-navigation li li { + border-bottom: .1em solid #777777; + width: 14em; +} +.builder-module-navigation li li a { + float: none; +} +.builder-module-navigation li li a:hover, +.builder-module-navigation li li a.sfhover { +} +.builder-module-navigation li ul ul { + margin: -2.9em 0 0 14em; +} + +/********************************************* + Widget Bar Module +*********************************************/ +.builder-module-widget-bar { + background: #DDDDDD; +} + +/********************************************* + Footer Module +*********************************************/ +.builder-module-footer { + background: transparent; + border: none; +} +.builder-module-footer .builder-module-element { + text-align: left; + color: #333333; + margin: 0 1.5em; +} +.builder-module-footer .builder-module-element .alignright { + text-align: right; +} +.builder-module-footer .builder-module-element a { + color: #333333; + text-decoration: none; +} +.builder-module-footer .builder-module-element a:hover { + text-decoration: underline; +} + +/********************************************* + Image Module +*********************************************/ +.builder-module-image .builder-module-element { + font-size: 0; +} +.builder-module-image .builder-module-element img { + margin: 0; +} + +/********************************************* + HTML Module +*********************************************/ + +/********************************************* + Content Module +*********************************************/ +.builder-module-content .builder-module-element { + margin: 1.5em; + display: block; + text-align: left; + overflow: hidden; +} +.builder-module-content .post { + margin-bottom: 1.5em; +} + +.post-title, .post-title * { + margin: 0; + padding: 0; +} +.post .thumbnail-wrap { + display: none; +} +.post .date { + /*display: none;*/ + float: left; +} + +.post-title h1, +.post-title h2, +.post-title h3 { + font-family: "Arial Black",Arial,Helvetica,Sans-Serif; + clear: both; + color: #262626; + font-size: 1.9em; + line-height: 1em; + letter-spacing: -1px; + font-weight: bold; + text-transform: uppercase; + margin-bottom: .56em; +} +.post-title a { + text-decoration: none; + color: #262626; + font-size: 1em; +} + +.post .post-meta { + display: block; + /*clear: both;*/ +} +.post .post-meta a { + text-decoration: none; + font-style: italic; +} +.post .post-meta a:hover { + text-decoration: underline; +} +.post .meta-bottom { + display: block; +} +.post .meta-bottom img { + max-width: none; +} + +.post .entry-attachment .attachment { + text-align: center; +} + +.post .edit-entry-link { + margin: 0 0 1.5em 0; + clear: both; +} + +.post-content { + margin-top: 1.5em; + clear: both; +} +.page-title { + font-size: 1.75em; + line-height: 1.7em; + margin-top: 0; + margin-bottom: .875em; +} + +/********************************************* + Style images and galleries + .hentry is used instead of .page or .post + as it applies to all content types +*********************************************/ +.hentry .gallery a, +.hentry .gallery dt, +.hentry .gallery img { + margin: 0; + font-size: 0; + line-height: 0; +} +.hentry .gallery-item { + display: inline-block; + margin: 0 1.5em 1.5em 0; + padding: 5px; + vertical-align: top; + text-align: left; + width: 150px; + border: 1px solid #CFCFCF; + background: #F3F3F3; + -moz-border-radius: 3px; + -webkit-border-radius: 3px; + border-radius: 3px; +} +.hentry .gallery-item img { + border: 0; + margin: 0; + padding: 0; +} +.hentry .gallery-caption { + margin: 0; + padding: 10px 5px 5px 5px; + line-height: 1; +} +.hentry .gallery + * { + margin-top: 0; +} + +.hentry img { + border: 1px solid #CFCFCF; + background: #F3F3F3; + padding: 5px; + -moz-border-radius: 3px; + -webkit-border-radius: 3px; + border-radius: 3px; +} +.hentry .alignright { + margin: 0 0 1.5em 1.5em; +} +.hentry .alignleft { + margin: 0 1.5em 1.5em 0; +} +.hentry .aligncenter { + margin: 0 auto 1.5em auto; +} + +.hentry .wp-caption { + border: 1px solid #CFCFCF; + background: #F3F3F3; + padding: 5px; + -moz-border-radius: 3px; + -webkit-border-radius: 3px; + border-radius: 3px; +} +.hentry .wp-caption img { + border: none; + background: transparent; + padding: 0; +} + +.hentry .wp-caption-text { + text-align: left; + margin: 0; + padding: 10px 5px 5px 5px; + line-height: 1; +} + + +/********************************************* + Post Meta Styles, if needed +*********************************************/ +.meta-top { + clear: both; /* we need this so floats in the post are cleared */ +} + +.meta-bottom { + clear: both; /* we need this so floats in the post are cleared */ + border-top: .1em solid #D7D7D7; + padding-top: 1.4em; + margin-bottom: 3em; +} +.meta-bottom .alignright { + margin-bottom: 1.5em; +} +.meta-bottom .categories, +.meta-bottom .tags { + background: url( 'images/folder.png' ) 0 0 no-repeat; + padding: 0 0 0 1.5em; +} +.meta-bottom .comments { + background: url( 'images/comments.png' ) 0 2px no-repeat; + padding: 0 0 0 1.5em; +} + +.EXIF table { + margin: 1.5em auto; +} +.photometa h4 { + text-align: center; + margin: 0; + padding: 0; +} +.photometa ul { + list-style-type: none; +} + +/********************************************* + Previous/Next Page Navigation +*********************************************/ +.paging { + clear: both; /* To clear any floats */ + margin: 0; + padding: 0; +} + +/********************************************* + Comment Styles +*********************************************/ +#comments { + margin: 3em 0 1.5em 0; + padding: 0; +} +#comments ol.commentlist { + margin: 1.5em 0; + padding: 0; + background: transparent; +} +#comments ul.children { + margin: 0 1.5em; +} +#comments .vcard { + line-height: 1; + margin-bottom: .5em; +} +#comments .vcard .avatar { + display: block; + float: left; + margin: 0 .75em 0 0; +} +#comments .comment-meta { + margin-bottom: 1.5em; +} +#comments li { + clear: both; + list-style-type: none; + margin: 1.5em 0; + border: 1px solid #999999; + overflow: hidden; +} +#comments li .comment-body { + margin: 1.5em; +} +#comments blockquote { + margin: 1.5em; +} + +#respond { + margin-top: 3em; + overflow: visible !important; +} +.comment #respond { + margin: 1.5em 1.5em 1.5em 1.5em; + padding: 0 1.5em 1.5em 1.5em; + border: 1px solid #999999; +} +#respond h3 { + margin-bottom: 0; +} +#respond .cancel-comment-reply a { + margin: 0; + display: block; +} +#commentform label { + margin-left: 1em; +} +#commentform input[type="text"] { + width: 20em; +} +#commentform input, +#commentform textarea { + margin: 0; +} +#commentform #comment { + width: 100%; +} +#commentform .comment-submit-wrapper { + margin-bottom: 0; +} + +/********************************************* + Text elements +*********************************************/ +p { +} +p img.left { + float: left; + margin: 1.5em 1.5em 1.5em 0; + padding: 0; +} +p img.right { + float: right; + margin: 1.5em 0 1.5em 1.5em; +} +blockquote { + background: url('images/blockquote.png') top left no-repeat; + margin: 1.5em; + padding: 0; + color: #666666; + font-style: italic; +} +strong { + font-weight: bold; +} +em, dfn { + font-style: italic; +} +dfn { + font-weight: bold; +} +sup, sub { + height: 0; + line-height: 1.5; + vertical-align: baseline; + position: relative; +} +sup { + bottom: 1ex; +} +sub { + top: .5ex; +} +abbr, acronym { + border-bottom: 1px dotted #666; +} +address { + font-style: italic; +} +del { + color: #666666; +} +pre { + margin: 1.5em 0; + white-space: pre; +} +big { + font-size: 1.2em; + line-height: 1; +} + +/********************************************* + Lists +*********************************************/ +ul, ol { + list-style-position: outside; + margin: 0 0 0 1.4em; + padding: 0; +} +.post-content > ul, +.post-content > ol { + margin-top: 1.5em; + margin-bottom: 1.5em; +} +ol { + margin-left: 20px; + *margin-left: 24px; /* targeted IE 6, 7 fix */ +} +li { + margin: 0; + padding: 0; +} +li > * { + margin-top: 0; +} +li *:last-child { + margin-bottom: 0; +} +li > p + ul { + margin-top: -1.5em; +} +ul { + list-style-type: disc; +} +ol { + list-style-type: decimal; +} +dl { + margin: 0 0 1.5em 0; +} +dl dt { + font-weight: bold; +} +dd { + margin-left: 1.5em; +} +dd + dd { + margin-top: 1.5em; +} + +/********************************************* + Tables +*********************************************/ +table { + margin-bottom: 1.5em; + background: #F3F3F3; +} +table, td, th { + border: 1px solid #CFCFCF; + border-collapse: collapse; +} +th { + font-weight: bold; + line-height: 1.5; + background: #E8E8E8; +} +th, td, caption { + padding: .75em; +} +tr:nth-child(2n) th { + background: #F6F6F6; +} +tr:nth-child(2n) td { + background: #FFFFFF; +} +tfoot { + font-style: italic; +} +caption { + background: #EEEEEE; +} + +/********************************************* + Misc classes +*********************************************/ +.small { + font-size: .8em; + line-height: 1.875; + margin-top: 1.875em; + margin-bottom: 1.875em; +} +.large { + font-size: 1.2em; + line-height: 2.5; + margin-top: 1.25em; + margin-bottom: 1.25em; +} +.hide { + display: none; +} +.quiet { + color: #666666; +} +.loud { + color: #000000; +} +.highlight { + background: #FFFF00; +} +.added { + background: #006600; + color: #FFFFFF; +} +.removed { + background: #990000; + color: #FFFFFF; +} +.first { + margin-left: 0; + padding-left: 0; +} +.last { + margin-right: 0; + padding-right: 0; +} +.top { + margin-top: 0; + padding-top: 0; +} +.bottom { + margin-bottom: 0; + padding-bottom: 0; +} + +/********************************************* + Default styling for forms +*********************************************/ +label { + font-weight: bold; +} +fieldset { + padding: 1.4em; + margin: 0 0 1.5em 0; + border: .1em solid #CCCCCC; +} +legend { + font-weight: bold; + font-size: 1.2em; +} + +/********************************************* + Form fields +*********************************************/ +input[type=text], input[type=password], input.text, input.title, textarea, select { + font-size: 1em; + margin-top: .5em; + margin-bottom: .5em; +} +input[type=text], input[type=password], input.text, input.title, textarea { + background-color: #FFFFFF; + border: 1px solid #999999; + padding: 5px; +} +input[type=text]:focus, input[type=password]:focus, input.text:focus, input.title:focus, textarea:focus { + border-color: #666666; +} +textarea { + width: 30em; + height: 20em; +} +input[type=checkbox], input[type=radio], input.checkbox, input.radio { +/* position: relative; + top: .25em;*/ +} +.search-text-box { + margin-bottom: 0; +} +.search-submit-button { + margin: 0 !important; + padding: .2em .5em; +} + +/********************************************* + Success, notice and error boxes +*********************************************/ +.error, .notice, .success { + padding: .8em; + margin-bottom: 1em; + border: 2px solid #ddd; +} +.error { + background: #FBE3E4; + color: #8a1f11; + border-color: #FBC2C4; +} +.notice { + background: #FFF6BF; + color: #514721; + border-color: #FFD324; +} +.success { + background: #E6EFC2; + color: #264409; + border-color: #C6D880; +} +.error a { + color: #8a1f11; +} +.notice a { + color: #514721; +} +.success a { + color: #264409; +} + +/********************************************* + Widget Styling +*********************************************/ +.widget_rss li { + margin-bottom: 1.5em; +} +.widget_rss .rsswidget { + display: block; + margin: 0; +} +.widget_rss .rss-date { + display: block; + font-style: italic; + margin-bottom: 1.5em; +} +.widget_rss .rssSummary { + margin: 1.5em 0; +} + + +/********************************************* + Social Tabs +*********************************************/ +#social-tags { + position: fixed; + width: 95px; + height: 100%; + right: 0; + left: auto; + margin-right: 0; + margin-left: auto; + padding-top: 10px; + overflow: hidden; +} +#social-tags a { + position: relative; + right: -50px; + margin: 0; +} +#social-tags a:hover { + right: 0; +} + +/********************************************* + The Obligatory WP Styles +*********************************************/ +.alignright { + margin-left: 1.5em; +} +.alignleft { + margin-right: 1.5em; +} +.post img.wp-smiley { + border: none; +} diff --git a/src/com.gluster.storage.management.console.help/html/css/builder-gluster/style.css b/src/org.gluster.storage.management.console.help/html/css/builder-gluster/style.css index 80daf9fb..80daf9fb 100644 --- a/src/com.gluster.storage.management.console.help/html/css/builder-gluster/style.css +++ b/src/org.gluster.storage.management.console.help/html/css/builder-gluster/style.css diff --git a/src/com.gluster.storage.management.console.help/html/gettingstarted/ subtopic3.html b/src/org.gluster.storage.management.console.help/html/gettingstarted/ subtopic3.html index 86bcbf9c..86bcbf9c 100644 --- a/src/com.gluster.storage.management.console.help/html/gettingstarted/ subtopic3.html +++ b/src/org.gluster.storage.management.console.help/html/gettingstarted/ subtopic3.html diff --git a/src/org.gluster.storage.management.console.help/html/gettingstarted/access_gmc_jws.html b/src/org.gluster.storage.management.console.help/html/gettingstarted/access_gmc_jws.html new file mode 100644 index 00000000..ff18004a --- /dev/null +++ b/src/org.gluster.storage.management.console.help/html/gettingstarted/access_gmc_jws.html @@ -0,0 +1,43 @@ +<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
+
+<html>
+<link rel="stylesheet" href="../css/builder-gluster/style.css"
+type="text/css" media="screen" />
+<head>
+<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
+<title>Sub Topic</title>
+</head>
+
+<body>
+<h1>Accessing the Gluster Management Console Using Java Web Start</h1>
+<p>To start Gluster Management Console using Java web start, perform the following steps.
+<ol>
+<li>Open your web browser.
+<p>Ensure that your web browser has cookies and Javascript enabled.</p>
+<li>Type the following URL in your web browser:
+<p><FONT FACE = "Courier">https://server-name:8443/glustermg/</FONT></p>
+<p>Gluster Management Console login window is displayed</p>
+<p><img src="../images/GMC_Login_Window.jpg" alt="Login Window" />
+<li>Type the following default user name and password in the login window:
+<p>Username: gluster</p>
+<p>Password: syst3m</p>
+<p><b>Note:</b> In Mac OS, it is not possible to identify the CPU architecture through Java script. The system provides links to all possible combinations, click on the appropriate link to launch the application.</p>
+<li>When you access the application for the first time, the console requests you to change this password.
+<p><img src="../images/GMC_Change_Password.jpg" alt="Change Default Password" /></p>
+ <li>Type your current default password in the <b>Old Password</b> field.
+ <p>The default system-assigned password is syst3m.</p>
+ <li>Type your new password in the <b>New Password</b> field.
+ <li>Retype your new password in the <b>Confirm Password</b> field.
+ <li>Click <b>Change</b>. The system displays <b>Change Password</b> window
+ indicating that the password was successfully changed.
+ <p><img src="../images/GMC_Change_Password_Confirm.jpg" alt="Password Changed Successfully" /></p>
+
+ <li>Click <b>OK</b>. The <b>Select Cluster</b> window is
+ displayed. You can now create a new cluster or register an existing
+ cluster. For more information on creating or registering clusters,
+ refer to <a href="manage_cluster.html">Managing Clusters</a>.
+</ol>
+<p><b>Note:</b> You can change the password at any time by
+ accessing <b>Edit</b> > <b>Change Password</b>.
+</body>
+</html>
\ No newline at end of file diff --git a/src/com.gluster.storage.management.console.help/html/gettingstarted/alerts.html b/src/org.gluster.storage.management.console.help/html/gettingstarted/alerts.html index 223ffec0..69033fff 100644 --- a/src/com.gluster.storage.management.console.help/html/gettingstarted/alerts.html +++ b/src/org.gluster.storage.management.console.help/html/gettingstarted/alerts.html @@ -10,7 +10,7 @@ type="text/css" media="screen" /> <body>
<h1>Alerts</h1>
-Alerts page enables you to quickly define alerts for typical alarm conditions found in your cluster environment. For example, low disk space is frequently a problem on managed machines. You can generate alerts for the critical conditions in your cluster by defining threshold conditions. An alert is generated when it reaches the threshold conditions that you set against server resources. These alerts are real-time data collected from your resources and are displayed in the <b>Cluster Summary</b> tab.
+Alerts section lists the typical alarm conditions found in your cluster environment. For example, low disk space is frequently a problem on managed machines. You can generate alerts for the critical conditions in your cluster by defining threshold conditions. An alert is generated when it reaches the threshold conditions that you set against server resources. These alerts are real-time data collected from your resources and are displayed in the <b>Cluster Summary</b> tab.
<ul>
<li>CPU utilization
<li>Memory utilization
diff --git a/src/com.gluster.storage.management.console.help/html/gettingstarted/change_password.html b/src/org.gluster.storage.management.console.help/html/gettingstarted/change_password.html index 2bd9ff5e..d5189d98 100644 --- a/src/com.gluster.storage.management.console.help/html/gettingstarted/change_password.html +++ b/src/org.gluster.storage.management.console.help/html/gettingstarted/change_password.html @@ -20,7 +20,7 @@ following steps.</p> <li>Open your web browser.
<li>Type the following URL in your web browser:
<p><FONT FACE = "Courier">
- http://server-name:webserver-port/glustermg/gluster-management-console.jnlp
+ https://server-name:webserver-port/glustermg/
</FONT></p>
<p><b>Gluster Management Console</b> login window is displayed.</p>
<p><img src="../images/GMC_Change_Password.jpg" height="150" width="250" alt="Change Default Password" /></p>
diff --git a/src/org.gluster.storage.management.console.help/html/gettingstarted/check_req_client.html b/src/org.gluster.storage.management.console.help/html/gettingstarted/check_req_client.html new file mode 100644 index 00000000..76a44038 --- /dev/null +++ b/src/org.gluster.storage.management.console.help/html/gettingstarted/check_req_client.html @@ -0,0 +1,27 @@ +<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
+
+<html>
+<head>
+<link rel="stylesheet" href="../css/builder-gluster/style.css" type="text/css" media="screen" />
+<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
+<title>Main Topic</title>
+</head>
+
+<body>
+<h1>Checking the Minimum Requirements of Client Machines</h1>
+
+<p>Verify the following:</p>
+<ul style="margin-top: 8px;">
+<li> Processor - 1.4GHz CPU</li>
+<li> Memory - 2 GB RAM</li>
+<li> Disk - 100 MB</li>
+<li> Operating Systems: Windows XP/Vista/7, Linux, Mac OS X</li>
+<li> Oracle JRE 1.6</li>
+</ul>
+<h2>Web Browser Requirements</h2>
+<ul>
+<li>Use your JRE installer to configure your browser for Java Web Start. Also, ensure that you have configured your browser to open .jnlp files using the Java Web Start application or javaws exe located in bin folder of your JRE installation.
+<li>When you access the Gluster Management Console, Java Web Start downloads all required .jar files from the Gateway server and launches the console's GUI. During this process, web start may display a certificate warning mentioning that the application is signed by Gluster, Inc.. This certificate is authentic, but it requires full permissions as the application contains features that require registering information on the client's hard disk such as exporting the security keys from gateway. You can accept the warning and select Always Trust Content from this Provider on your browser to avoid this warning every time you launch the application
+</ul>
+</body>
+</html>
\ No newline at end of file diff --git a/src/org.gluster.storage.management.console.help/html/gettingstarted/check_req_gmg.html b/src/org.gluster.storage.management.console.help/html/gettingstarted/check_req_gmg.html new file mode 100644 index 00000000..fa106b64 --- /dev/null +++ b/src/org.gluster.storage.management.console.help/html/gettingstarted/check_req_gmg.html @@ -0,0 +1,23 @@ +<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
+
+<html>
+<head>
+<link rel="stylesheet" href="../css/builder-gluster/style.css"
+type="text/css" media="screen" />
+<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
+<title>Main Topic</title>
+</head>
+
+<body>
+<h1>Checking Gluster Management Gateway Minimum Requirements</h1>
+Gluster Management Gateway is installed on a central server using the Linux package published by Gluster. Before you install Gluster Management Gateway, you must verify that your environment matches the minimum requirements described in this section.
+<p><b>Note:</b> For checking the GlusterFS minimum requirements, refer to the <a href= "http://www.gluster.com/community/documentation/index.php/Gluster_3.2:_Checking_Minimum_Requirements" target="_blank">Gluster 3.2 Filesystem Installation Guide, Checking Minimum Requirements</a>.</p>
+<p>You must verify that your central server matches the minimum requirements listed below:</p>
+<ul>
+<li>Memory: 2 GB RAM
+<li>Processor: 2 (2.4 GHz each) recommended; 64 bit
+<li>Disk Space: 10 GB
+<li> The gateway machine can be either Gluster Storage Software Appliance, Gluster Virtual Storage Appliance, or CentOS 5.6.
+</ul>
+</body>
+</html>
\ No newline at end of file diff --git a/src/org.gluster.storage.management.console.help/html/gettingstarted/cifs_service.html b/src/org.gluster.storage.management.console.help/html/gettingstarted/cifs_service.html new file mode 100644 index 00000000..21ba31ec --- /dev/null +++ b/src/org.gluster.storage.management.console.help/html/gettingstarted/cifs_service.html @@ -0,0 +1,42 @@ +<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
+
+<html>
+<head>
+<link rel="stylesheet" href="../css/builder-gluster/style.css"
+type="text/css" media="screen" />
+<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
+<title>Sub Topic</title>
+</head>
+
+<body>
+<h1>CIFS Services</h1>
+<p>Common Internet File System (CIFS) operates as an application - layer network protocol to provide shared access to files, printers, serial ports, and miscellaneous communications between nodes on a network. It also provides an authenticated inter-process communication mechanism. Most usage of SMB involves computers running Microsoft Windows operating system.</p>
+<p>CIFS can be used as an access protocol by Microsoft Windows users to access files in a GlusterFS volume. Users will be able to perform regular file system operations such as creating files, read or write data to files, deletion of data through CIFS.</p>
+<p>Typically, all CIFS releated operations such as configuring CIFS services, creating and removing users, enabling CIFS re-export of a volume must be perfomed on each and every node of your cluster. Gluster Management Gateway provides an easy way to manage these opeartions, such as:
+<ul>
+<li>An user interface for enabling or disabling CIFS re-export of volumes and configuring CIFS users for a volume.</li>
+<li>Command line utilities for configuring CIFS services, creating and removing CIFS users on all the servers.</li>
+</ul>
+
+<h2>Configuring the CIFS Service</h2>
+<p>To configure CIFS, you must create a text file consisting of a list of servers (hostnames or IP addresses).</p>
+<p><b>Note:</b> You can configure CIFS on a fresh install or on an existing installation on the server which you have installed Gluster Management Gateway after adding the server to the cluster.</p>
+<p>Run the following command on the gateway server to configure CIFS:</p>
+<p><FONT FACE = "Courier">$ setup_cifs_config_all.py <server list file></FONT></p>
+<p><b>Note:</b> Ensure that CIFS services are configured on all the servers of your cluster at all times. Any new servers added to the cluster, ensure that you configure CIFS services on them. This enables you to access the CIFS enabled volumes from any of the cluster nodes.
+<h2>Creating CIFS Users</h2>
+<p>You must create users and their password to enable them to use the CIFS access protocol.</p>
+<p>To create CIFS users, run the following on the gateway server:</p>
+<p><FONT FACE = "Courier">$ add_user_cifs_all.py <server list file> <user name> <password></FONT></p>
+<ul>
+<li>Server list file – contains one server name per line
+</ul>
+<p>The user defined in the <user name> will be created on each and every server defined in <server list file>, will be assigned the same password defined in <password>.
+<p><b>Note:</b> Ensure that the CIFS user is created on all the servers of your cluster at all times which includes any new servers added to the cluster.
+
+<h2>Removing CIFS Users</h2>
+<p>You can delete users and their password.</p>
+<p>To delete CIFS users, run the following on the gateway server:</p>
+<p><FONT FACE = "Courier">$ delete_user_cifs_all.py <server list> <user name></FONT></p>
+</body>
+</html>
\ No newline at end of file diff --git a/src/com.gluster.storage.management.console.help/html/gettingstarted/configure_cifs.html b/src/org.gluster.storage.management.console.help/html/gettingstarted/configure_cifs.html index 1b39f66a..1b39f66a 100644 --- a/src/com.gluster.storage.management.console.help/html/gettingstarted/configure_cifs.html +++ b/src/org.gluster.storage.management.console.help/html/gettingstarted/configure_cifs.html diff --git a/src/com.gluster.storage.management.console.help/html/gettingstarted/explore_gmc.html b/src/org.gluster.storage.management.console.help/html/gettingstarted/explore_gmc.html index d24dd7ef..8aee7171 100644 --- a/src/com.gluster.storage.management.console.help/html/gettingstarted/explore_gmc.html +++ b/src/org.gluster.storage.management.console.help/html/gettingstarted/explore_gmc.html @@ -13,17 +13,18 @@ type="text/css" media="screen" /> <p>This section describes the main sections of the user interface and explains the type of functions you can perform using each section.</p> <p><b>Note:</b> You can use Gluster Management Console to set up different cloud environments; but can only manage one cloud in one login session. +<p>The Gluster Management Console window is divided into two panes: a navigation tree in the left and a tabbed information pane in the right. <p><img src="../images/GMC_Landing_Page.jpg" alt="Gluster Management Console" height="350" width="500" /></p> <ul> <li><b>Left Pane:</b> The Left pane displays the cloud, it's servers, and it's volumes. - <li><b>Right Pane: </b> Displays the <b>Summary</b> and <b>Task</b> tab. It also displays Actions such as create volume, add server. + <li><b>Right Pane: </b> At any point of time, the Right pane shows tabs with information that are applicable to the resource selected in the left pane such as Server, Volumes, Bricks, and Discovered Server. <li><b>File Menu:</b> Helps you to exit the application. <li><b>Edit Menu:</b> Helps you to import keys, export keys, change password, change settings and refresh the application. <li><b>Gluster Menu:</b> Helps you to manage your cluster, servers, and volumes. -</ul> +For example, if you have selected volumes, the Gluster menu displays all volume related options.</ul> </body> </html>
\ No newline at end of file diff --git a/src/com.gluster.storage.management.console.help/html/gettingstarted/gmc_install_overview.html b/src/org.gluster.storage.management.console.help/html/gettingstarted/gmc_install_overview.html index f8e5e954..f8e5e954 100644 --- a/src/com.gluster.storage.management.console.help/html/gettingstarted/gmc_install_overview.html +++ b/src/org.gluster.storage.management.console.help/html/gettingstarted/gmc_install_overview.html diff --git a/src/org.gluster.storage.management.console.help/html/gettingstarted/gmc_terminal_window.html b/src/org.gluster.storage.management.console.help/html/gettingstarted/gmc_terminal_window.html new file mode 100644 index 00000000..ee78defe --- /dev/null +++ b/src/org.gluster.storage.management.console.help/html/gettingstarted/gmc_terminal_window.html @@ -0,0 +1,20 @@ +<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
+
+<html>
+<head>
+<link rel="stylesheet" href="../css/builder-gluster/style.css"
+type="text/css" media="screen" />
+ <meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
+ <title>Sub Topic</title>
+</head>
+
+<body>
+<h1>Terminal</h1>
+<p>The Gluster Management Console provides a stand-alone ANSI or vt102 terminal emulator that enables you to connect to servers through SSH.</p>
+<p>It processes ANSI control characters, including NUL, backspace, carriage return, linefeed, and a subset of ANSI escape sequences sufficient to enable the use of screen-oriented applications, such as vi, Emacs, and any GNU readline-enabled application such as Bash, bc, or ncftp.</p>
+<p><b>Note:</b> Gluster Terminal window is not a fully compliant vt100 or vt102 terminal emulator.</p>
+<p><img src="../images/GMC_Terminal_window.jpg" alt="Terminal Window" />
+<p>You must provide SSH connection details to connect to the required host. Here is a screenshot of how to configure these settings on Gluster Management Console.
+<p><img src="../images/GMC_terminal_Settings.jpg" alt="Terminal Window" />
+</body>
+</html>
\ No newline at end of file diff --git a/src/org.gluster.storage.management.console.help/html/gettingstarted/gmc_toolbar.html b/src/org.gluster.storage.management.console.help/html/gettingstarted/gmc_toolbar.html new file mode 100644 index 00000000..77681663 --- /dev/null +++ b/src/org.gluster.storage.management.console.help/html/gettingstarted/gmc_toolbar.html @@ -0,0 +1,98 @@ +<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
+
+<html>
+<head>
+<link rel="stylesheet" href="../css/builder-gluster/style.css"
+type="text/css" media="screen" />
+<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
+<title>Main Topic</title>
+</head>
+
+<body>
+<h1>Gluster Management Console Toolbar</h1>
+The Toolbar provides shortcuts to the main Gluster Management Console functions.
+<p>The table below describes the buttons on the toolbar of the console.</p>
+<table border="1">
+<tr>
+<th>Icon</th>
+<th>Description</th>
+</tr>
+<tr>
+<td><img src="../images/GMC_terminal_toolbar.jpg" alt="Terminal Icon" /></td>
+<td>Launches the terminal window that allows you type system commands.</td>
+</tr>
+<tr>
+<td><img src="../images/GMC_settings.jpg" alt="Preferences Icon" /></td>
+<td>Opens the Preferences window.</td>
+</tr>
+<tr>
+<td><img src="../images/GMC_Refresh.jpg" alt="Refresh Icon" /></td>
+<td>Refreshes the application.</td>
+</tr>
+<tr>
+<td><img src="../images/GMC_add_server_icon.jpg" alt="Add Server Icon" /></td>
+<td>Allows you to add a server to a cluster.</td>
+</tr>
+<tr>
+<td><img src="../images/GMC_Remove_Server_icon.jpg" alt="Remove Server Icon" /></td>
+<td>Allows you to removes a server from a cluster.</td>
+</tr>
+<tr>
+<td><img src="../images/GMC_Create_Vol_icon.jpg" alt="Create Volume Icon" /></td>
+<td>Opens the Create Volume window.</td>
+</tr>
+<tr>
+<td><img src="../images/GMC_start_vol_icon.jpg" alt="Create Volume Icon" /></td>
+<td>Allows you to start a volume.</td>
+</tr>
+<tr>
+<td><img src="../images/GMC_stop_vol_icon.jpg" alt="Stop Volume Icon" /></td>
+<td>Allows you to stop a volume.</td>
+</tr>
+<tr>
+<td><img src="../images/GMC_remove_volume_icon.jpg" alt="Remove Volume Icon" /></td>
+<td>Allows you to removes a volume.</td>
+</tr>
+<tr>
+<td><img src="../images/GMC_Rebalance_icon.jpg" alt="Rebalance Volume Icon" /></td>
+<td>Allows you to rebalance a volume.</td>
+</tr>
+<tr>
+<td><img src="../images/GMC_setting_icon.jpg" alt="Reset Volume Option Icon" /></td>
+<td>Allows you to reset the volume options.</td>
+</tr>
+<tr>
+<td><img src="../images/GMC_download_log_icon.jpg" alt="Download Log Icon" /></td>
+<td>Allows you to download logs.</td>
+</tr>
+<tr>
+<td><img src="../images/GMC_Add_Brick_icon.jpg" alt="Add Brick Icon" /></td>
+<td>Opens the Add Brick window.</td>
+</tr>
+<tr>
+<td><img src="../images/GMC_Remove_Brick_icon.jpg" alt="Remove Brick Icon" /></td>
+<td>Removes brick from a volume.</td>
+</tr>
+<tr>
+<td><img src="../images/GMC_migrate_brick_icon.jpg" alt="Migrate Brick Icon" /></td>
+<td>Migrates a brick from one volume to another.</td>
+</tr>
+<tr>
+<td><img src="../images/GMC_Start_task_icon.jpg" alt="Start Task Icon" /></td>
+<td>Allows you to start a task from the Tasks tab.</td>
+</tr>
+<tr>
+<td><img src="../images/GMC_Stop_icon.jpg" alt="Stop Task Icon" /></td>
+<td>Allows you to stop a task from the Tasks tab.</td>
+</tr>
+<tr>
+<td><img src="../images/GMC_pause_icon.jpg" alt="Pause Task Icon" /></td>
+<td>Allows you to pause a task from the Tasks tab.</td>
+</tr>
+<tr>
+<td><img src="../images/GMC_Clear_task_icon.jpg" alt="Clear Task Icon" /></td>
+<td>Allows you to clear completed task from the Tasks tab.</td>
+</tr>
+</table>
+</body>
+</html>
\ No newline at end of file diff --git a/src/com.gluster.storage.management.console.help/html/gettingstarted/gmg_install_overview.html b/src/org.gluster.storage.management.console.help/html/gettingstarted/gmg_install_overview.html index e6b44580..e6b44580 100644 --- a/src/com.gluster.storage.management.console.help/html/gettingstarted/gmg_install_overview.html +++ b/src/org.gluster.storage.management.console.help/html/gettingstarted/gmg_install_overview.html diff --git a/src/org.gluster.storage.management.console.help/html/gettingstarted/install_gmg.html b/src/org.gluster.storage.management.console.help/html/gettingstarted/install_gmg.html new file mode 100644 index 00000000..94d26c03 --- /dev/null +++ b/src/org.gluster.storage.management.console.help/html/gettingstarted/install_gmg.html @@ -0,0 +1,49 @@ +<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
+
+<html>
+<head>
+<link rel="stylesheet" href="../css/builder-gluster/style.css"
+type="text/css" media="screen" />
+<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
+<title>Sub Topic</title>
+</head>
+
+<body>
+<h1>Installing the Gluster Management Gateway</h1>
+
+<p>To install the Gluster Management Gateway, perform the following steps:</p>
+<ol>
+<li>Download the Gluster Management Gateway repository configuration file (<FONT FACE = "Courier">glustermg.repo</FONT>) and the Gluster Management Gateway RPM (<FONT FACE = "Courier">glustermg-1.0.0-1.x86_64.rpm</FONT>) from the location provided by Gluster.
+<p><b>Note:</b> <FONT FACE = "Courier">glustermg.repo</FONT> has been created and tested with CentOS 5.6. It may work with other versions of CentOS, however it has not been extensively tested.
+<li>Save the file in the following location on your machine:
+<p><FONT FACE = "Courier">/etc/yum.repos.d/</FONT>
+<li> Run the following command to install Gluster Management Gateway:
+<p><FONT FACE = "Courier"># yum groupinstall glustermg</FONT>
+<li>The following packages are installed if not installed earlier:
+<ul>
+<li>Java SE runtime version 1.6 – OpenJDK v1.6.0.0
+<li>Tomcat v5.5.23 or higher
+<li>wget
+</ul>
+<li>Run the following command to install Gluster Management Gateway.
+<p><FONT FACE = "Courier">rpm -ivh glustermg-1.0.0-1.x86_64.rpm </FONT>
+</ol>
+<p>Gateway generates SSH keys during installation. These keys are stored in the following location <FONT FACE = "Courier">/opt/glustermg/keys</FONT>. These keys are used for communication with the storage servers. However, in Amazon Web Services (AWS) environment, SSH communication is done using the private key provided by Amazon. Hence, the AWS genegrated private key (.pem file) must be stored in <FONT FACE = "Courier">/opt/glustermg/keys</FONT> and the file must be named as <FONT FACE = "Courier">gluster.pem</FONT></p>
+<p><b>Note:</b>
+<ul>
+<li>You can install the Gluster Management Gateway packages on a Gluster Storage Server. However, this can impact performance of the GlusterFS processes on this machine hence this is not recommended.
+
+ <li>The Gluster Management Gateway is shipped with a self-signed
+ SSL certificate, by default. While this ensures that the communication
+ between the console and gateway is encrypted and safe, some browsers
+ may throw security warnings mentioning that the site is not secure. It
+ is highly recommended that you install your own SSL certificate issued
+ by a valid certifying authority in the tomcat5 configuration for the
+ 8443 port. For more information on obtaining your own service
+ certificate, refer to <a href="http://tomcat.apache.org/tomcat-5.5-doc/ssl-howto.html#Installing_a_Certificate_from_a_Certificate_Authority" target="_blank">Installing a Certificate from a
+ Certificate Authority</a> from Tomcat documentation.
+ <li>Ensure to enable port 8443 (HTTPS), port 24731 (TCP), and port 24729 (UDP) on the gateway.
+<li>Gluster Management Gateway communicates with all storage servers through SSH, using their host names. Make sure all of your storage server's host names (fully qualified domain names) are resolvable by the Gateway and by each other. If you have a properly configured DNS setup, this should work seamlessly.
+</ul>
+</body>
+</html>
\ No newline at end of file diff --git a/src/org.gluster.storage.management.console.help/html/gettingstarted/install_gmg_backend.html b/src/org.gluster.storage.management.console.help/html/gettingstarted/install_gmg_backend.html new file mode 100644 index 00000000..fad76f27 --- /dev/null +++ b/src/org.gluster.storage.management.console.help/html/gettingstarted/install_gmg_backend.html @@ -0,0 +1,47 @@ +<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
+
+<html>
+<head>
+<link rel="stylesheet" href="../css/builder-gluster/style.css"
+type="text/css" media="screen" />
+<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
+<title>Sub Topic</title>
+</head>
+
+<body>
+<h1>Installing Gluster Management Gateway Backend Package</h1>
+Gluster Management Gateway communicates with every node of your cluster using the backend package. This package must be installed on each and every node of your cluster using the Linux package published by Gluster.
+<p><b>Pre-requisite</b></p>
+<ul>
+<li> Your backend machines can be either Gluster Storage Software Appliance, Gluster Virtual Storage Appliance, or CentOS 5.6 running GlusterFS v3.2.3 or higher.
+</ul>
+
+<p>To install the backend packages on each and every node of your cluster, perform the following steps:</p>
+<ol>
+<li>Download Gluster Management Gateway repository configuration file (<FONT FACE = "Courier">glustermg.repo</FONT>) and the Gluster Management Gateway Backend RPM (<FONT FACE = "Courier">glustermg-backend-1.0.0-1.x86_64.rpm</FONT>) from the location provided by Gluster. :
+<p><b>Note:</b> <FONT FACE = "Courier">glustermg.repo</FONT> has been created and tested with CentOS 5.6. It may work with other versions of CentOS, however it has not been extensively tested.
+<li>Save the file in the following location on your machine:
+<p><FONT FACE = "Courier">/etc/yum.repos.d/</FONT>
+<li>Run the following command to install the glustermg-backend dependencies:
+<p><FONT FACE = "Courier">rpm -ivh glustermg-backend-1.0.0-1.x86_64.rpm</FONT>
+<li>The following backend packages are installed if not installed earlier:
+<ul>
+<li>chkconfig
+<li>python v2.4.3
+<li>perl v5.8.8
+<li>rrdtool-perl v1.2.27
+<li>appliance-base v1.3
+<li>sudo
+<li>crontabs
+<li>samba3
+<li>libxml2 v2.6
+</ul>
+</ol>
+<p><b>Note:</b>
+<ul>
+<li>You must enable port 24729 (UDP) for auto discovery of servers.
+<li>In case CIFS only, the Samba services must be configured to run on port 445 which needs to be enabled and open on all the storage servers in your cluster.
+<li>Paravirtual VMs on Xen are not supported.
+</ul>
+</body>
+</html>
\ No newline at end of file diff --git a/src/com.gluster.storage.management.console.help/html/gettingstarted/maintopic (4).html b/src/org.gluster.storage.management.console.help/html/gettingstarted/maintopic (4).html index dccb80ab..dccb80ab 100644 --- a/src/com.gluster.storage.management.console.help/html/gettingstarted/maintopic (4).html +++ b/src/org.gluster.storage.management.console.help/html/gettingstarted/maintopic (4).html diff --git a/src/com.gluster.storage.management.console.help/html/gettingstarted/maintopic - Copy (3).html b/src/org.gluster.storage.management.console.help/html/gettingstarted/maintopic - Copy (3).html index dccb80ab..dccb80ab 100644 --- a/src/com.gluster.storage.management.console.help/html/gettingstarted/maintopic - Copy (3).html +++ b/src/org.gluster.storage.management.console.help/html/gettingstarted/maintopic - Copy (3).html diff --git a/src/com.gluster.storage.management.console.help/html/gettingstarted/maintopic - Copy (4).html b/src/org.gluster.storage.management.console.help/html/gettingstarted/maintopic - Copy (4).html index dccb80ab..dccb80ab 100644 --- a/src/com.gluster.storage.management.console.help/html/gettingstarted/maintopic - Copy (4).html +++ b/src/org.gluster.storage.management.console.help/html/gettingstarted/maintopic - Copy (4).html diff --git a/src/com.gluster.storage.management.console.help/html/gettingstarted/maintopic - Copy.html b/src/org.gluster.storage.management.console.help/html/gettingstarted/maintopic - Copy.html index dccb80ab..dccb80ab 100644 --- a/src/com.gluster.storage.management.console.help/html/gettingstarted/maintopic - Copy.html +++ b/src/org.gluster.storage.management.console.help/html/gettingstarted/maintopic - Copy.html diff --git a/src/com.gluster.storage.management.console.help/html/gettingstarted/maintopic.html b/src/org.gluster.storage.management.console.help/html/gettingstarted/maintopic.html index dccb80ab..dccb80ab 100644 --- a/src/com.gluster.storage.management.console.help/html/gettingstarted/maintopic.html +++ b/src/org.gluster.storage.management.console.help/html/gettingstarted/maintopic.html diff --git a/src/com.gluster.storage.management.console.help/html/gettingstarted/manage_bricks.html b/src/org.gluster.storage.management.console.help/html/gettingstarted/manage_bricks.html index d5f3d30b..96233f0e 100644 --- a/src/com.gluster.storage.management.console.help/html/gettingstarted/manage_bricks.html +++ b/src/org.gluster.storage.management.console.help/html/gettingstarted/manage_bricks.html @@ -14,9 +14,6 @@ Brick is the basic unit of storage, represented by an export directory on a server in the storage cluster. You can expand, shrink, and migrate volume of you cluster, as required, by adding new bricks, removing bricks, and migrating bricks. -<p><b>Note:</b> You need to add at least one brick to a distributed -volume, multiples of two bricks to mirrored distributed volumes, -multiples of four bricks to striped distributed volumes when expanding -your storage space.</p> +<p><b>Note:</b> You need to add at least one brick to a distributed volume, multiples of two bricks to replicated volumes, multiples of four bricks to striped volumes when expanding your storage space.</p> </body> </html>
\ No newline at end of file diff --git a/src/com.gluster.storage.management.console.help/html/gettingstarted/manage_cluster.html b/src/org.gluster.storage.management.console.help/html/gettingstarted/manage_cluster.html index 52545bc7..17b7f0a8 100644 --- a/src/com.gluster.storage.management.console.help/html/gettingstarted/manage_cluster.html +++ b/src/org.gluster.storage.management.console.help/html/gettingstarted/manage_cluster.html @@ -15,10 +15,16 @@ in many respects forming a single computer. Gluster Management Console enables you to create, register and select cluster.
<h2>Cluster Summary</h2>
<p>The console enables you to monitor your cluster resources from
-the Summary tab. To display the summary of your cluster, click the
+the <b>Summary</b> tab. To display the summary of your cluster, click the
cluster node from the left pane of the console window. The summary of
the selected cluster is displayed in the right pane of the console
window.
-<p><img src="../images/GMC_Cluster_Summary_tab.jpg" width="75%" alt="Cluster Summary" />
+<p><img src="../images/GMC_Cluster_Summary_tab_new.jpg" alt="Cluster Summary" />
+<p>After you log into the application successfully, you will be prompted to:
+<ul>
+<li><a href="select_cluster.html">Selecting a Cluster</a>: The cluster you will manage in the login session.
+<li><a href="create_cluster.html">Creating a Cluster</a>: Creating an empty cluster that can be expanded using the console.
+<li><a href="register_cluster.html">Registering a Cluster</a>: Registering an existing cluster and start managing it through the console.
+</ul>
</body>
</html>
\ No newline at end of file diff --git a/src/org.gluster.storage.management.console.help/html/gettingstarted/manage_logs.html b/src/org.gluster.storage.management.console.help/html/gettingstarted/manage_logs.html new file mode 100644 index 00000000..790fc206 --- /dev/null +++ b/src/org.gluster.storage.management.console.help/html/gettingstarted/manage_logs.html @@ -0,0 +1,28 @@ +<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN"> + +<html> +<head> +<link rel="stylesheet" href="../css/builder-gluster/style.css" +type="text/css" media="screen" /> +<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1"> +<title>Managing Logs</title> +</head> + +<body> +<h1>Managing Logs</h1> +You can download volume logs to your local machine to analyze and archive or you can retrieve volume logs based on a search criteria. This section describes how you can manage logs on your storage cluster. +<p>Typically, the log file includes:</p> +<ul> + <li>Installation messages + <li>Removal messages + <li>Configuration messages + <li>Informational messages +</ul> +<p>The Gluster Management Gateway log files are stored in the following locations on your server:</p> +<ul> +<li>Tomcat servlet container logs - <FONT FACE = "Courier">/var/log/tomcat5/catalina.out</FONT> +<li>Gluster Management Gateway logs - <FONT FACE = "Courier">/var/log/glustermg/glustermg.log</FONT> +</ul> + +</body> +</html>
\ No newline at end of file diff --git a/src/org.gluster.storage.management.console.help/html/gettingstarted/manage_servers.html b/src/org.gluster.storage.management.console.help/html/gettingstarted/manage_servers.html new file mode 100644 index 00000000..1326eb34 --- /dev/null +++ b/src/org.gluster.storage.management.console.help/html/gettingstarted/manage_servers.html @@ -0,0 +1,22 @@ +<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
+
+<html>
+<head>
+<link rel="stylesheet" href="../css/builder-gluster/style.css"
+type="text/css" media="screen" />
+<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
+<title>Main Topic</title>
+</head>
+
+<body>
+<h1>Managing Your Servers</h1>
+A server is a computer on a network that is used as a storage node in a cluster. You can add a new server to the storage cluster to expand the amount of available storage.
+<h2>Server Summary</h2>
+<p>The console enables you to monitor your servers in your cluster
+from the <b>Summary</b> tab. To display the summary of your cluster, click the
+<b>Server </b>node from the left pane of the console window. The summary of the
+servers in your cluster is displayed in the right pane of the console
+window. It also displays the <b>Tasks</b> and <b>Alerts</b>.</p>
+<p><img src="../images/GMC_Server_Summary_tab.jpg" alt="Server Summary" />
+</body>
+</html>
\ No newline at end of file diff --git a/src/com.gluster.storage.management.console.help/html/gettingstarted/manage_volumes.html b/src/org.gluster.storage.management.console.help/html/gettingstarted/manage_volumes.html index 5934614d..a37ed7b4 100644 --- a/src/com.gluster.storage.management.console.help/html/gettingstarted/manage_volumes.html +++ b/src/org.gluster.storage.management.console.help/html/gettingstarted/manage_volumes.html @@ -18,31 +18,17 @@ large part of the administrator's duties. This section explains how to manage the volumes stored on file server machines.
<p>You can use Volumes to do the following:
<ul>
- <li> Create and start a new volume (featuring a single global
- namespace)</li>
- <li>Start a volume that is currently stopped</li>
- <li>Stop a volume that is currently running</li>
+ <li> Create a new volume </li>
+ <li>Start a volume </li>
+ <li>Stop a volume </li>
<li>Migrate a volume</li>
- <li>Delete a volume from your storage environment</li>
+ <li>Rebalance a volume</li>
</ul>
<h2>Volume Summary</h2>
<p>The console also enables you to monitor the volumes in your cluster from the <b>Summary</b> tab. To display the summary of your volumes,
click the Volume node from the left pane of the console window. The summary of the volumes is displayed in the right pane of the console
window. It also displays <B>Tasks</B> and <B>Alerts</B> of all the volumes.
-<p><img src="../images/GMC_Volume_Summary_tab.jpg" width="75%" alt="Volume Summary" />
+<p><img src="../images/GMC_Volume_Summary.jpg" alt="Volume Summary" />
-<p><b>Types of Volumes</b></p>
-<p>Volumes of the following types can be created in your storage
-environment:</p>
-<ul>
- <li>Plain Distributed - Distributes files throughout the bricks in
- the volume.
- <li>Distributed Striped - Distributes data across striped bricks
- in the volume.
- <li>Distributed Mirror - Creates a mirrored volume with all files
- replicated.
- <p><b>Note:</b> You must have at least two servers to activate this
- feature.</p>
-</ul>
</body>
</html>
\ No newline at end of file diff --git a/src/com.gluster.storage.management.console.help/html/gettingstarted/monitor_resources.html b/src/org.gluster.storage.management.console.help/html/gettingstarted/monitor_resources.html index 89e15bc6..907f2d73 100644 --- a/src/com.gluster.storage.management.console.help/html/gettingstarted/monitor_resources.html +++ b/src/org.gluster.storage.management.console.help/html/gettingstarted/monitor_resources.html @@ -22,7 +22,7 @@ steps.</p> network usage, and disk utilization by day, week, or month. In case of
Network usage, the graph will be displayed for the selected network
from the drop down list.
- <p>Note: At any point of time, the Summary tab will show views that
+ <p><b>Note:</b> At any point of time, the <b>Summary</b> tab will show views that
are applicable to the resource selected from the navigation tree in the
left pane.</p>
<p><img src="../images/GMC_Cluster_Summary_tab.jpg"
diff --git a/src/com.gluster.storage.management.console.help/html/gettingstarted/resetting_pwd.html b/src/org.gluster.storage.management.console.help/html/gettingstarted/resetting_pwd.html index 723a6776..723a6776 100644 --- a/src/com.gluster.storage.management.console.help/html/gettingstarted/resetting_pwd.html +++ b/src/org.gluster.storage.management.console.help/html/gettingstarted/resetting_pwd.html diff --git a/src/com.gluster.storage.management.console.help/html/gettingstarted/security_keys.html b/src/org.gluster.storage.management.console.help/html/gettingstarted/security_keys.html index eeade559..5b723899 100644 --- a/src/com.gluster.storage.management.console.help/html/gettingstarted/security_keys.html +++ b/src/org.gluster.storage.management.console.help/html/gettingstarted/security_keys.html @@ -10,8 +10,7 @@ type="text/css" media="screen" /> <body>
<h1>Security Keys</h1>
-In order to secure all of the virtual machines that are created, root access to these machines is controlled by SSH key access rather than by using an interactive password. This establishes trust between your account on your central server and the new virtual machine you just added to your cluster.
-<p>Administrators can export and/or import the SSH keys (of the gateway) for security reasons from the Gluster Management Gateway server.</p>
+Gluster Management Gateway communicates with storage servers using public key authentication. This establishes trust between your account on your central server and the new machine you just added to your cluster. Administrators can export and/or import the SSH keys (of the gateway) for security reasons from the Gluster Management Gateway server.
<h2>Importing Keys</h2>
<p>To import the security keys, perform the following steps:</p>
<ol>
diff --git a/src/com.gluster.storage.management.console.help/html/gettingstarted/setting_alerts_prefs.html b/src/org.gluster.storage.management.console.help/html/gettingstarted/setting_alerts_prefs.html index 7894ad1a..5673586e 100644 --- a/src/com.gluster.storage.management.console.help/html/gettingstarted/setting_alerts_prefs.html +++ b/src/org.gluster.storage.management.console.help/html/gettingstarted/setting_alerts_prefs.html @@ -13,10 +13,10 @@ type="text/css" media="screen" /> Thresholds are the critical conditions that you define in Gluster Management Console.
<p>To set the thresholds, perform the following steps:</p>
<ol>
-<li>Choose <b>Edit</b> > <b>Settings</b>
-<p><b>Preferences</b> window is displayed.</p>
-<li>Choose <b>Gluster</b> > <b>Alerts</b> page from the left pane of the <b>Preferences</b> window.
-<p><img src="../images/GMC_Alerts.jpg" width="55%" alt="Alerts Perferences" /></p>
+<li>Choose <b>Edit</b> > <b>Settings</b> > <b>Alerts</b>
+<p>The Preferences window displays the <b>Alerts</b> page on the right pane of the window.</p>
+
+<p><img src="../images/GMC_Alerts.jpg" alt="Alerts Perferences" /></p>
<li>Type the value for server CPU threshold limits in the <b>Server CPU Threshold</b> field.
<li>Type the value for server memory usage threshold in the <b>Server Memory Usage Threshold</b> field.
<li>Type the value for disk space usage threshold in the <b>Disk Space Threshold</b> field.
diff --git a/src/com.gluster.storage.management.console.help/html/gettingstarted/setting_charts_prefs.html b/src/org.gluster.storage.management.console.help/html/gettingstarted/setting_charts_prefs.html index 0cdf339e..e85d9324 100644 --- a/src/com.gluster.storage.management.console.help/html/gettingstarted/setting_charts_prefs.html +++ b/src/org.gluster.storage.management.console.help/html/gettingstarted/setting_charts_prefs.html @@ -11,12 +11,12 @@ type="text/css" media="screen" /> <body>
<h1>Setting the Charts Preferences</h1>
You can customize the console and change the way some of the monitoring data is displayed, as described in this section.
-<p><b>Note:</b> The default duration for all the charts is a week.</p>
+<p><b>Note:</b> The default duration for all the charts is a day.</p>
<p>To set the display of the charts, perform the following:</p>
<ol>
-<li>Choose <b>Edit</b> > <b>Settings</b> > <b>Charts</b>
-<p>The <b>Preferences</b> window displays the <b>Charts</b> page on the left pane of the window.</p>
-<p><img src="../images/GMC_Charts.jpg" width="55%" alt="Charts Perferences" /></p>
+<li>Choose <b>Edit</b> > <b>Settings</b> > <b>Charts</b>
+<p>The Preferences window displays the <b>Charts</b> page on the right pane of the window.</p>
+<p><img src="../images/GMC_Charts.jpg" alt="Charts Perferences"/></p>
<li>Select the <b>Aggregated CPU Usage chart period</b> from the drop down list.
<li>Select the <b>Aggregated Network Usage chart period</b> from the drop down list.
<li>Select the <b>CPU Usage chart period</b> from the drop down list.
diff --git a/src/com.gluster.storage.management.console.help/html/gettingstarted/setting_gluster_prefs.html b/src/org.gluster.storage.management.console.help/html/gettingstarted/setting_gluster_prefs.html index 89c7cea0..16db7708 100644 --- a/src/com.gluster.storage.management.console.help/html/gettingstarted/setting_gluster_prefs.html +++ b/src/org.gluster.storage.management.console.help/html/gettingstarted/setting_gluster_prefs.html @@ -13,12 +13,12 @@ type="text/css" media="screen" /> Please enter your text here.
<p>To set the Gluster perferences, perform the following steps:
<ol>
-<li>Choose <b>Edit</b> > <b>Settings</b> > <b>Gluster</b>
-<p>The <b>Preferences</b> window displays the Gluster page on the left pane of the window.
-<p><img src="../images/GMC_Preferences_gluster.jpg" width="55%" alt="Gluster Perferences" /></p>
+<li>Choose <b>Edit</b> > <b>Settings</b> > <b>Gluster</b>
+<p>The Preferences window displays the <b>Gluster</b> page on the right pane of the window.</p>
+<p><img src="../images/GMC_Preferences_gluster.jpg" alt="Gluster Perferences" /></p>
<li>Select <b>Show Cluster Selection Dialog on Login</b>, if you want your cluster name to appear when you launch the application.
<li>Choose your cluster name from <b>Default Cluster to Manage</b> drop down list to manage the default cluster you wish to manage when you launch the application.</li>
-<li>Type the duration of the data synchronization intervals in the <b>Data Sync Interval</b> field.
+<li>Type the duration (in sec) of the refresh intervals in the <b>Refresh Interval</b> field.
<li>Click <b>Apply</b>.
<li>Click <b>OK</b> to exit the <b>Preferences</b> window.
</body>
diff --git a/src/com.gluster.storage.management.console.help/html/gettingstarted/setting_preferences.html b/src/org.gluster.storage.management.console.help/html/gettingstarted/setting_preferences.html index 90625ede..13f9f54c 100644 --- a/src/com.gluster.storage.management.console.help/html/gettingstarted/setting_preferences.html +++ b/src/org.gluster.storage.management.console.help/html/gettingstarted/setting_preferences.html @@ -11,11 +11,12 @@ type="text/css" media="screen" /> <body>
<h1>Preferences</h1>
-You can use preferences to configure several aspects of the Gluster Management Console. These include setting preferences for the console, alerts, and charts.
+You can use preferences to configure several aspects of the Gluster Management Console. These include setting preferences for the console, alerts, charts, and terminal.
<ul>
<li><a href="setting_gluster_prefs.html">Setting Gluster Preferences</a>
<li><a href="setting_alerts_prefs.html">Setting Alert Preferences</a>
<li><a href="setting_charts_prefs.html">Setting Charts Preferences</a>
+<li><a href="setting_terminal_prefs.html">Setting Terminal Preferences</a>
</ul>
</body>
</html>
\ No newline at end of file diff --git a/src/org.gluster.storage.management.console.help/html/gettingstarted/setting_terminal_prefs.html b/src/org.gluster.storage.management.console.help/html/gettingstarted/setting_terminal_prefs.html new file mode 100644 index 00000000..8f381665 --- /dev/null +++ b/src/org.gluster.storage.management.console.help/html/gettingstarted/setting_terminal_prefs.html @@ -0,0 +1,26 @@ +<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
+
+<html>
+<head>
+<link rel="stylesheet" href="../css/builder-gluster/style.css"
+type="text/css" media="screen" />
+<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
+<title>Sub Topic</title>
+</head>
+
+<body>
+<h1>Setting Terminal Preferences</h1>
+<p>You can customize the terminal window as described in this section.</p>
+<p>To set the display of the charts, perform the following:</p>
+<ol>
+<li>Choose <b>Edit</b> > <b>Settings</b> > <b>Terminal</b>
+<p>The Preferences window displays the <b>Terminal</b> page on the right pane of the window.</p>
+<p><img src="../images/GMC_Preferences_terminal.jpg" alt="Gluster Perferences" /></p>
+<li>Type the limit of terminal buffer lines in the <b>Terminal buffer lines</b> field.
+<li>Type the value of the serial timeout in the <b>Serial timeout</b> field.</li>
+<li>Type the value of the network timeout in the <b>Network timeout</b> field.
+<li>Click <b>Apply</b>.
+<li>Click <b>OK</b> to exit the <b>Preferences</b> window.
+</ol>
+</body>
+</html>
\ No newline at end of file diff --git a/src/com.gluster.storage.management.console.help/html/gettingstarted/setting_the_gmc.html b/src/org.gluster.storage.management.console.help/html/gettingstarted/setting_the_gmc.html index 92641ccb..92641ccb 100644 --- a/src/com.gluster.storage.management.console.help/html/gettingstarted/setting_the_gmc.html +++ b/src/org.gluster.storage.management.console.help/html/gettingstarted/setting_the_gmc.html diff --git a/src/com.gluster.storage.management.console.help/html/gettingstarted/subtopic (3) - Copy.html b/src/org.gluster.storage.management.console.help/html/gettingstarted/subtopic (3) - Copy.html index 6dccc35e..6dccc35e 100644 --- a/src/com.gluster.storage.management.console.help/html/gettingstarted/subtopic (3) - Copy.html +++ b/src/org.gluster.storage.management.console.help/html/gettingstarted/subtopic (3) - Copy.html diff --git a/src/com.gluster.storage.management.console.help/html/gettingstarted/subtopic (3).html b/src/org.gluster.storage.management.console.help/html/gettingstarted/subtopic (3).html index 6dccc35e..6dccc35e 100644 --- a/src/com.gluster.storage.management.console.help/html/gettingstarted/subtopic (3).html +++ b/src/org.gluster.storage.management.console.help/html/gettingstarted/subtopic (3).html diff --git a/src/com.gluster.storage.management.console.help/html/gettingstarted/subtopic.html b/src/org.gluster.storage.management.console.help/html/gettingstarted/subtopic.html index 6dccc35e..6dccc35e 100644 --- a/src/com.gluster.storage.management.console.help/html/gettingstarted/subtopic.html +++ b/src/org.gluster.storage.management.console.help/html/gettingstarted/subtopic.html diff --git a/src/com.gluster.storage.management.console.help/html/gettingstarted/subtopic2 (2).html b/src/org.gluster.storage.management.console.help/html/gettingstarted/subtopic2 (2).html index 5ece5749..5ece5749 100644 --- a/src/com.gluster.storage.management.console.help/html/gettingstarted/subtopic2 (2).html +++ b/src/org.gluster.storage.management.console.help/html/gettingstarted/subtopic2 (2).html diff --git a/src/com.gluster.storage.management.console.help/html/gettingstarted/subtopic2 (3).html b/src/org.gluster.storage.management.console.help/html/gettingstarted/subtopic2 (3).html index d443ce80..d443ce80 100644 --- a/src/com.gluster.storage.management.console.help/html/gettingstarted/subtopic2 (3).html +++ b/src/org.gluster.storage.management.console.help/html/gettingstarted/subtopic2 (3).html diff --git a/src/com.gluster.storage.management.console.help/html/gettingstarted/subtopic2.html b/src/org.gluster.storage.management.console.help/html/gettingstarted/subtopic2.html index 86bcbf9c..86bcbf9c 100644 --- a/src/com.gluster.storage.management.console.help/html/gettingstarted/subtopic2.html +++ b/src/org.gluster.storage.management.console.help/html/gettingstarted/subtopic2.html diff --git a/src/org.gluster.storage.management.console.help/html/gettingstarted/tasks.html b/src/org.gluster.storage.management.console.help/html/gettingstarted/tasks.html new file mode 100644 index 00000000..c5647b9a --- /dev/null +++ b/src/org.gluster.storage.management.console.help/html/gettingstarted/tasks.html @@ -0,0 +1,17 @@ +<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
+
+<html>
+<head>
+<link rel="stylesheet" href="../css/builder-gluster/style.css"
+type="text/css" media="screen" />
+<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
+<title>Sub Topic</title>
+</head>
+
+<body>
+<h1>Tasks</h1>
+<b>Task</b> tab is displayed when you select the cluster node. It displays the status of all running tasks such as disk initialization, brick migration, volume rebalance.
+<p><img src="../images/GMC_Task_tab.jpg" alt="Task Tab"/></p>
+<p>When you select a task on this tab, the relevent toolbar options are enabled. These include pause, resume, abort, commit, or clear operations.
+</body>
+</html>
\ No newline at end of file diff --git a/src/com.gluster.storage.management.console.help/html/help_home.html b/src/org.gluster.storage.management.console.help/html/help_home.html index faa6cd22..b9c17b9e 100644 --- a/src/com.gluster.storage.management.console.help/html/help_home.html +++ b/src/org.gluster.storage.management.console.help/html/help_home.html @@ -20,10 +20,10 @@ manage logs, download server configurations, and more.</p> <p>For information about how to install Gluster Filesystem, refer to the <a - href="http://www.gluster.com/community/documentation/index.php/Gluster_3.2_Filesystem_Installation_Guide">Gluster -3.2 Filesystem Installation Guide</a> . For information about accessing the + href="http://www.gluster.com/community/documentation/index.php/Gluster_3.2_Filesystem_Installation_Guide" target="_blank">Gluster +3.2 Filesystem Installation Guide</a>. For information about accessing the cluster using client systems, <a - href="http://www.gluster.com/community/documentation/index.php/Gluster_3.2:_Accessing_Data_-_Setting_Up_GlusterFS_Client">Gluster + href="http://www.gluster.com/community/documentation/index.php/Gluster_3.2:_Accessing_Data_-_Setting_Up_GlusterFS_Client" target="_blank">Gluster 3.2: Accessing Data - Setting Up GlusterFS Client</a>.</p> </body> </html>
\ No newline at end of file diff --git a/src/com.gluster.storage.management.console.help/html/images/Delete-brick.png b/src/org.gluster.storage.management.console.help/html/images/Delete-brick.png Binary files differindex d93aa173..d93aa173 100644 --- a/src/com.gluster.storage.management.console.help/html/images/Delete-brick.png +++ b/src/org.gluster.storage.management.console.help/html/images/Delete-brick.png diff --git a/src/com.gluster.storage.management.console.help/html/images/GMC-Preferences-alerts .jpg b/src/org.gluster.storage.management.console.help/html/images/GMC-Preferences-alerts .jpg Binary files differindex d57c6adc..d57c6adc 100644 --- a/src/com.gluster.storage.management.console.help/html/images/GMC-Preferences-alerts .jpg +++ b/src/org.gluster.storage.management.console.help/html/images/GMC-Preferences-alerts .jpg diff --git a/src/com.gluster.storage.management.console.help/html/images/GMC-Preferences-charts.jpg b/src/org.gluster.storage.management.console.help/html/images/GMC-Preferences-charts.jpg Binary files differindex 7ae6ca8c..7ae6ca8c 100644 --- a/src/com.gluster.storage.management.console.help/html/images/GMC-Preferences-charts.jpg +++ b/src/org.gluster.storage.management.console.help/html/images/GMC-Preferences-charts.jpg diff --git a/src/com.gluster.storage.management.console.help/html/images/GMC-Preferences-gluster .jpg b/src/org.gluster.storage.management.console.help/html/images/GMC-Preferences-gluster .jpg Binary files differindex 06702e7b..06702e7b 100644 --- a/src/com.gluster.storage.management.console.help/html/images/GMC-Preferences-gluster .jpg +++ b/src/org.gluster.storage.management.console.help/html/images/GMC-Preferences-gluster .jpg diff --git a/src/com.gluster.storage.management.console.help/html/images/GMC_02.jpg b/src/org.gluster.storage.management.console.help/html/images/GMC_02.jpg Binary files differindex 2aac60ff..2aac60ff 100644 --- a/src/com.gluster.storage.management.console.help/html/images/GMC_02.jpg +++ b/src/org.gluster.storage.management.console.help/html/images/GMC_02.jpg diff --git a/src/com.gluster.storage.management.console.help/html/images/GMC_03.jpg b/src/org.gluster.storage.management.console.help/html/images/GMC_03.jpg Binary files differindex 282c1407..282c1407 100644 --- a/src/com.gluster.storage.management.console.help/html/images/GMC_03.jpg +++ b/src/org.gluster.storage.management.console.help/html/images/GMC_03.jpg diff --git a/src/com.gluster.storage.management.console.help/html/images/GMC_04.jpg b/src/org.gluster.storage.management.console.help/html/images/GMC_04.jpg Binary files differindex 383aa719..383aa719 100644 --- a/src/com.gluster.storage.management.console.help/html/images/GMC_04.jpg +++ b/src/org.gluster.storage.management.console.help/html/images/GMC_04.jpg diff --git a/src/com.gluster.storage.management.console.help/html/images/GMC_05.jpg b/src/org.gluster.storage.management.console.help/html/images/GMC_05.jpg Binary files differindex 11f3096d..11f3096d 100644 --- a/src/com.gluster.storage.management.console.help/html/images/GMC_05.jpg +++ b/src/org.gluster.storage.management.console.help/html/images/GMC_05.jpg diff --git a/src/com.gluster.storage.management.console.help/html/images/GMC_06.jpg b/src/org.gluster.storage.management.console.help/html/images/GMC_06.jpg Binary files differindex 97323bd2..97323bd2 100644 --- a/src/com.gluster.storage.management.console.help/html/images/GMC_06.jpg +++ b/src/org.gluster.storage.management.console.help/html/images/GMC_06.jpg diff --git a/src/com.gluster.storage.management.console.help/html/images/GMC_07.jpg b/src/org.gluster.storage.management.console.help/html/images/GMC_07.jpg Binary files differindex fd7e4dd6..fd7e4dd6 100644 --- a/src/com.gluster.storage.management.console.help/html/images/GMC_07.jpg +++ b/src/org.gluster.storage.management.console.help/html/images/GMC_07.jpg diff --git a/src/com.gluster.storage.management.console.help/html/images/GMC_09.jpg b/src/org.gluster.storage.management.console.help/html/images/GMC_09.jpg Binary files differindex 54a10c8c..54a10c8c 100644 --- a/src/com.gluster.storage.management.console.help/html/images/GMC_09.jpg +++ b/src/org.gluster.storage.management.console.help/html/images/GMC_09.jpg diff --git a/src/org.gluster.storage.management.console.help/html/images/GMC_1.0_Add_Brick.jpg b/src/org.gluster.storage.management.console.help/html/images/GMC_1.0_Add_Brick.jpg Binary files differnew file mode 100644 index 00000000..4480fd27 --- /dev/null +++ b/src/org.gluster.storage.management.console.help/html/images/GMC_1.0_Add_Brick.jpg diff --git a/src/org.gluster.storage.management.console.help/html/images/GMC_1.0_Add_Brick_confirm.jpg b/src/org.gluster.storage.management.console.help/html/images/GMC_1.0_Add_Brick_confirm.jpg Binary files differnew file mode 100644 index 00000000..d609a373 --- /dev/null +++ b/src/org.gluster.storage.management.console.help/html/images/GMC_1.0_Add_Brick_confirm.jpg diff --git a/src/org.gluster.storage.management.console.help/html/images/GMC_1.0_Add_Server_Confirm.jpg b/src/org.gluster.storage.management.console.help/html/images/GMC_1.0_Add_Server_Confirm.jpg Binary files differnew file mode 100644 index 00000000..4e39d5f4 --- /dev/null +++ b/src/org.gluster.storage.management.console.help/html/images/GMC_1.0_Add_Server_Confirm.jpg diff --git a/src/com.gluster.storage.management.console.help/html/images/GMC_1.0_Create_Vol.jpg b/src/org.gluster.storage.management.console.help/html/images/GMC_1.0_Create_Vol.jpg Binary files differindex e6b16ddb..e6b16ddb 100644 --- a/src/com.gluster.storage.management.console.help/html/images/GMC_1.0_Create_Vol.jpg +++ b/src/org.gluster.storage.management.console.help/html/images/GMC_1.0_Create_Vol.jpg diff --git a/src/org.gluster.storage.management.console.help/html/images/GMC_1.0_Discovered_Server_Add.jpg b/src/org.gluster.storage.management.console.help/html/images/GMC_1.0_Discovered_Server_Add.jpg Binary files differnew file mode 100644 index 00000000..7b273913 --- /dev/null +++ b/src/org.gluster.storage.management.console.help/html/images/GMC_1.0_Discovered_Server_Add.jpg diff --git a/src/com.gluster.storage.management.console.help/html/images/GMC_1.0_Display_log_criteria.jpg b/src/org.gluster.storage.management.console.help/html/images/GMC_1.0_Display_log_criteria.jpg Binary files differindex 9284e314..9284e314 100644 --- a/src/com.gluster.storage.management.console.help/html/images/GMC_1.0_Display_log_criteria.jpg +++ b/src/org.gluster.storage.management.console.help/html/images/GMC_1.0_Display_log_criteria.jpg diff --git a/src/com.gluster.storage.management.console.help/html/images/GMC_1.0_Remove_Brick_confirm.jpg b/src/org.gluster.storage.management.console.help/html/images/GMC_1.0_Remove_Brick_confirm.jpg Binary files differindex 891ab993..891ab993 100644 --- a/src/com.gluster.storage.management.console.help/html/images/GMC_1.0_Remove_Brick_confirm.jpg +++ b/src/org.gluster.storage.management.console.help/html/images/GMC_1.0_Remove_Brick_confirm.jpg diff --git a/src/com.gluster.storage.management.console.help/html/images/GMC_1.0_Remove_Bricks.jpg b/src/org.gluster.storage.management.console.help/html/images/GMC_1.0_Remove_Bricks.jpg Binary files differindex d3911aad..d3911aad 100644 --- a/src/com.gluster.storage.management.console.help/html/images/GMC_1.0_Remove_Bricks.jpg +++ b/src/org.gluster.storage.management.console.help/html/images/GMC_1.0_Remove_Bricks.jpg diff --git a/src/com.gluster.storage.management.console.help/html/images/GMC_1.0_Remove_Bricks_success.jpg b/src/org.gluster.storage.management.console.help/html/images/GMC_1.0_Remove_Bricks_success.jpg Binary files differindex 452e8f20..452e8f20 100644 --- a/src/com.gluster.storage.management.console.help/html/images/GMC_1.0_Remove_Bricks_success.jpg +++ b/src/org.gluster.storage.management.console.help/html/images/GMC_1.0_Remove_Bricks_success.jpg diff --git a/src/org.gluster.storage.management.console.help/html/images/GMC_1.0_Remove_Server.jpg b/src/org.gluster.storage.management.console.help/html/images/GMC_1.0_Remove_Server.jpg Binary files differnew file mode 100644 index 00000000..c9674b51 --- /dev/null +++ b/src/org.gluster.storage.management.console.help/html/images/GMC_1.0_Remove_Server.jpg diff --git a/src/org.gluster.storage.management.console.help/html/images/GMC_1.0_Remove_Server_1.jpg b/src/org.gluster.storage.management.console.help/html/images/GMC_1.0_Remove_Server_1.jpg Binary files differnew file mode 100644 index 00000000..3c3d7d18 --- /dev/null +++ b/src/org.gluster.storage.management.console.help/html/images/GMC_1.0_Remove_Server_1.jpg diff --git a/src/com.gluster.storage.management.console.help/html/images/GMC_1.0_Select_FS_Type.jpg b/src/org.gluster.storage.management.console.help/html/images/GMC_1.0_Select_FS_Type.jpg Binary files differindex 08d26e41..08d26e41 100644 --- a/src/com.gluster.storage.management.console.help/html/images/GMC_1.0_Select_FS_Type.jpg +++ b/src/org.gluster.storage.management.console.help/html/images/GMC_1.0_Select_FS_Type.jpg diff --git a/src/com.gluster.storage.management.console.help/html/images/GMC_1.0_create_cluster.jpg b/src/org.gluster.storage.management.console.help/html/images/GMC_1.0_create_cluster.jpg Binary files differindex 66ac694e..66ac694e 100644 --- a/src/com.gluster.storage.management.console.help/html/images/GMC_1.0_create_cluster.jpg +++ b/src/org.gluster.storage.management.console.help/html/images/GMC_1.0_create_cluster.jpg diff --git a/src/com.gluster.storage.management.console.help/html/images/GMC_1.0_login.jpg b/src/org.gluster.storage.management.console.help/html/images/GMC_1.0_login.jpg Binary files differindex 282c1407..282c1407 100644 --- a/src/com.gluster.storage.management.console.help/html/images/GMC_1.0_login.jpg +++ b/src/org.gluster.storage.management.console.help/html/images/GMC_1.0_login.jpg diff --git a/src/com.gluster.storage.management.console.help/html/images/GMC_1.0_multiple_vols.jpg b/src/org.gluster.storage.management.console.help/html/images/GMC_1.0_multiple_vols.jpg Binary files differindex e2aee777..e2aee777 100644 --- a/src/com.gluster.storage.management.console.help/html/images/GMC_1.0_multiple_vols.jpg +++ b/src/org.gluster.storage.management.console.help/html/images/GMC_1.0_multiple_vols.jpg diff --git a/src/com.gluster.storage.management.console.help/html/images/GMC_1.0_multiple_vols_confirm.jpg b/src/org.gluster.storage.management.console.help/html/images/GMC_1.0_multiple_vols_confirm.jpg Binary files differindex af7ba50a..af7ba50a 100644 --- a/src/com.gluster.storage.management.console.help/html/images/GMC_1.0_multiple_vols_confirm.jpg +++ b/src/org.gluster.storage.management.console.help/html/images/GMC_1.0_multiple_vols_confirm.jpg diff --git a/src/com.gluster.storage.management.console.help/html/images/GMC_1.0_register_cluster.jpg b/src/org.gluster.storage.management.console.help/html/images/GMC_1.0_register_cluster.jpg Binary files differindex 6e39bc31..6e39bc31 100644 --- a/src/com.gluster.storage.management.console.help/html/images/GMC_1.0_register_cluster.jpg +++ b/src/org.gluster.storage.management.console.help/html/images/GMC_1.0_register_cluster.jpg diff --git a/src/com.gluster.storage.management.console.help/html/images/GMC_1.0_removeBrick_confirm.jpg b/src/org.gluster.storage.management.console.help/html/images/GMC_1.0_removeBrick_confirm.jpg Binary files differindex 591b98dc..591b98dc 100644 --- a/src/com.gluster.storage.management.console.help/html/images/GMC_1.0_removeBrick_confirm.jpg +++ b/src/org.gluster.storage.management.console.help/html/images/GMC_1.0_removeBrick_confirm.jpg diff --git a/src/com.gluster.storage.management.console.help/html/images/GMC_1.0_select_cluster.jpg b/src/org.gluster.storage.management.console.help/html/images/GMC_1.0_select_cluster.jpg Binary files differindex 383aa719..383aa719 100644 --- a/src/com.gluster.storage.management.console.help/html/images/GMC_1.0_select_cluster.jpg +++ b/src/org.gluster.storage.management.console.help/html/images/GMC_1.0_select_cluster.jpg diff --git a/src/com.gluster.storage.management.console.help/html/images/GMC_1.0_server_add_success.jpg b/src/org.gluster.storage.management.console.help/html/images/GMC_1.0_server_add_success.jpg Binary files differindex 0f7dbfc5..0f7dbfc5 100644 --- a/src/com.gluster.storage.management.console.help/html/images/GMC_1.0_server_add_success.jpg +++ b/src/org.gluster.storage.management.console.help/html/images/GMC_1.0_server_add_success.jpg diff --git a/src/com.gluster.storage.management.console.help/html/images/GMC_1.0_vol_success.jpg b/src/org.gluster.storage.management.console.help/html/images/GMC_1.0_vol_success.jpg Binary files differindex 74931bc9..74931bc9 100644 --- a/src/com.gluster.storage.management.console.help/html/images/GMC_1.0_vol_success.jpg +++ b/src/org.gluster.storage.management.console.help/html/images/GMC_1.0_vol_success.jpg diff --git a/src/com.gluster.storage.management.console.help/html/images/GMC_10.jpg b/src/org.gluster.storage.management.console.help/html/images/GMC_10.jpg Binary files differindex 8a1bf08c..8a1bf08c 100644 --- a/src/com.gluster.storage.management.console.help/html/images/GMC_10.jpg +++ b/src/org.gluster.storage.management.console.help/html/images/GMC_10.jpg diff --git a/src/com.gluster.storage.management.console.help/html/images/GMC_Add_Brick.jpg b/src/org.gluster.storage.management.console.help/html/images/GMC_Add_Brick.jpg Binary files differindex 59c99311..59c99311 100644 --- a/src/com.gluster.storage.management.console.help/html/images/GMC_Add_Brick.jpg +++ b/src/org.gluster.storage.management.console.help/html/images/GMC_Add_Brick.jpg diff --git a/src/com.gluster.storage.management.console.help/html/images/GMC_Add_Brick_confirm.jpg b/src/org.gluster.storage.management.console.help/html/images/GMC_Add_Brick_confirm.jpg Binary files differindex 133ef15d..133ef15d 100644 --- a/src/com.gluster.storage.management.console.help/html/images/GMC_Add_Brick_confirm.jpg +++ b/src/org.gluster.storage.management.console.help/html/images/GMC_Add_Brick_confirm.jpg diff --git a/src/org.gluster.storage.management.console.help/html/images/GMC_Add_Brick_icon.jpg b/src/org.gluster.storage.management.console.help/html/images/GMC_Add_Brick_icon.jpg Binary files differnew file mode 100644 index 00000000..d613a544 --- /dev/null +++ b/src/org.gluster.storage.management.console.help/html/images/GMC_Add_Brick_icon.jpg diff --git a/src/com.gluster.storage.management.console.help/html/images/GMC_Add_Server_Manual.jpg b/src/org.gluster.storage.management.console.help/html/images/GMC_Add_Server_Manual.jpg Binary files differindex 7789034c..7789034c 100644 --- a/src/com.gluster.storage.management.console.help/html/images/GMC_Add_Server_Manual.jpg +++ b/src/org.gluster.storage.management.console.help/html/images/GMC_Add_Server_Manual.jpg diff --git a/src/com.gluster.storage.management.console.help/html/images/GMC_Add_brick.jpg b/src/org.gluster.storage.management.console.help/html/images/GMC_Add_brick.jpg Binary files differindex 4c5c2ae3..4c5c2ae3 100644 --- a/src/com.gluster.storage.management.console.help/html/images/GMC_Add_brick.jpg +++ b/src/org.gluster.storage.management.console.help/html/images/GMC_Add_brick.jpg diff --git a/src/com.gluster.storage.management.console.help/html/images/GMC_Add_brick_confirm.jpg b/src/org.gluster.storage.management.console.help/html/images/GMC_Add_brick_confirm.jpg Binary files differindex a4b8a811..a4b8a811 100644 --- a/src/com.gluster.storage.management.console.help/html/images/GMC_Add_brick_confirm.jpg +++ b/src/org.gluster.storage.management.console.help/html/images/GMC_Add_brick_confirm.jpg diff --git a/src/com.gluster.storage.management.console.help/html/images/GMC_Alerts.jpg b/src/org.gluster.storage.management.console.help/html/images/GMC_Alerts.jpg Binary files differindex 1ae4e0aa..1ae4e0aa 100644 --- a/src/com.gluster.storage.management.console.help/html/images/GMC_Alerts.jpg +++ b/src/org.gluster.storage.management.console.help/html/images/GMC_Alerts.jpg diff --git a/src/com.gluster.storage.management.console.help/html/images/GMC_Bricks_Tab.jpg b/src/org.gluster.storage.management.console.help/html/images/GMC_Bricks_Tab.jpg Binary files differindex 1653d58b..1653d58b 100644 --- a/src/com.gluster.storage.management.console.help/html/images/GMC_Bricks_Tab.jpg +++ b/src/org.gluster.storage.management.console.help/html/images/GMC_Bricks_Tab.jpg diff --git a/src/com.gluster.storage.management.console.help/html/images/GMC_Change_Password.jpg b/src/org.gluster.storage.management.console.help/html/images/GMC_Change_Password.jpg Binary files differindex f8ab379a..f8ab379a 100644 --- a/src/com.gluster.storage.management.console.help/html/images/GMC_Change_Password.jpg +++ b/src/org.gluster.storage.management.console.help/html/images/GMC_Change_Password.jpg diff --git a/src/com.gluster.storage.management.console.help/html/images/GMC_Change_Password_Confirm.jpg b/src/org.gluster.storage.management.console.help/html/images/GMC_Change_Password_Confirm.jpg Binary files differindex e13b22a1..e13b22a1 100644 --- a/src/com.gluster.storage.management.console.help/html/images/GMC_Change_Password_Confirm.jpg +++ b/src/org.gluster.storage.management.console.help/html/images/GMC_Change_Password_Confirm.jpg diff --git a/src/com.gluster.storage.management.console.help/html/images/GMC_Charts.jpg b/src/org.gluster.storage.management.console.help/html/images/GMC_Charts.jpg Binary files differindex b6d8edb0..b6d8edb0 100644 --- a/src/com.gluster.storage.management.console.help/html/images/GMC_Charts.jpg +++ b/src/org.gluster.storage.management.console.help/html/images/GMC_Charts.jpg diff --git a/src/org.gluster.storage.management.console.help/html/images/GMC_Clear_task_icon.jpg b/src/org.gluster.storage.management.console.help/html/images/GMC_Clear_task_icon.jpg Binary files differnew file mode 100644 index 00000000..ce31471c --- /dev/null +++ b/src/org.gluster.storage.management.console.help/html/images/GMC_Clear_task_icon.jpg diff --git a/src/com.gluster.storage.management.console.help/html/images/GMC_Cluster_Summary.jpg b/src/org.gluster.storage.management.console.help/html/images/GMC_Cluster_Summary.jpg Binary files differindex c6dcc77c..c6dcc77c 100644 --- a/src/com.gluster.storage.management.console.help/html/images/GMC_Cluster_Summary.jpg +++ b/src/org.gluster.storage.management.console.help/html/images/GMC_Cluster_Summary.jpg diff --git a/src/org.gluster.storage.management.console.help/html/images/GMC_Cluster_Summary_tab.jpg b/src/org.gluster.storage.management.console.help/html/images/GMC_Cluster_Summary_tab.jpg Binary files differnew file mode 100644 index 00000000..8af1267e --- /dev/null +++ b/src/org.gluster.storage.management.console.help/html/images/GMC_Cluster_Summary_tab.jpg diff --git a/src/org.gluster.storage.management.console.help/html/images/GMC_Cluster_Summary_tab_new.jpg b/src/org.gluster.storage.management.console.help/html/images/GMC_Cluster_Summary_tab_new.jpg Binary files differnew file mode 100644 index 00000000..53e83ce6 --- /dev/null +++ b/src/org.gluster.storage.management.console.help/html/images/GMC_Cluster_Summary_tab_new.jpg diff --git a/src/org.gluster.storage.management.console.help/html/images/GMC_Create_Cluster.jpg b/src/org.gluster.storage.management.console.help/html/images/GMC_Create_Cluster.jpg Binary files differnew file mode 100644 index 00000000..6a21e8b9 --- /dev/null +++ b/src/org.gluster.storage.management.console.help/html/images/GMC_Create_Cluster.jpg diff --git a/src/org.gluster.storage.management.console.help/html/images/GMC_Create_Vol_icon.jpg b/src/org.gluster.storage.management.console.help/html/images/GMC_Create_Vol_icon.jpg Binary files differnew file mode 100644 index 00000000..7529713c --- /dev/null +++ b/src/org.gluster.storage.management.console.help/html/images/GMC_Create_Vol_icon.jpg diff --git a/src/com.gluster.storage.management.console.help/html/images/GMC_Create_Volume.jpg b/src/org.gluster.storage.management.console.help/html/images/GMC_Create_Volume.jpg Binary files differindex 2f8ecfca..2f8ecfca 100644 --- a/src/com.gluster.storage.management.console.help/html/images/GMC_Create_Volume.jpg +++ b/src/org.gluster.storage.management.console.help/html/images/GMC_Create_Volume.jpg diff --git a/src/com.gluster.storage.management.console.help/html/images/GMC_Create_Volume_success.jpg b/src/org.gluster.storage.management.console.help/html/images/GMC_Create_Volume_success.jpg Binary files differindex a128d182..a128d182 100644 --- a/src/com.gluster.storage.management.console.help/html/images/GMC_Create_Volume_success.jpg +++ b/src/org.gluster.storage.management.console.help/html/images/GMC_Create_Volume_success.jpg diff --git a/src/com.gluster.storage.management.console.help/html/images/GMC_Delete_Vol.jpg b/src/org.gluster.storage.management.console.help/html/images/GMC_Delete_Vol.jpg Binary files differindex 51e97758..51e97758 100644 --- a/src/com.gluster.storage.management.console.help/html/images/GMC_Delete_Vol.jpg +++ b/src/org.gluster.storage.management.console.help/html/images/GMC_Delete_Vol.jpg diff --git a/src/com.gluster.storage.management.console.help/html/images/GMC_Delete_Vol_Confirm.jpg b/src/org.gluster.storage.management.console.help/html/images/GMC_Delete_Vol_Confirm.jpg Binary files differindex c6fc98f2..c6fc98f2 100644 --- a/src/com.gluster.storage.management.console.help/html/images/GMC_Delete_Vol_Confirm.jpg +++ b/src/org.gluster.storage.management.console.help/html/images/GMC_Delete_Vol_Confirm.jpg diff --git a/src/com.gluster.storage.management.console.help/html/images/GMC_Delete_Vol_multiple.jpg b/src/org.gluster.storage.management.console.help/html/images/GMC_Delete_Vol_multiple.jpg Binary files differindex be89ddc7..be89ddc7 100644 --- a/src/com.gluster.storage.management.console.help/html/images/GMC_Delete_Vol_multiple.jpg +++ b/src/org.gluster.storage.management.console.help/html/images/GMC_Delete_Vol_multiple.jpg diff --git a/src/com.gluster.storage.management.console.help/html/images/GMC_Delete_Vol_multiple_success.jpg b/src/org.gluster.storage.management.console.help/html/images/GMC_Delete_Vol_multiple_success.jpg Binary files differindex fe037755..fe037755 100644 --- a/src/com.gluster.storage.management.console.help/html/images/GMC_Delete_Vol_multiple_success.jpg +++ b/src/org.gluster.storage.management.console.help/html/images/GMC_Delete_Vol_multiple_success.jpg diff --git a/src/com.gluster.storage.management.console.help/html/images/GMC_Delete_Vol_success.jpg b/src/org.gluster.storage.management.console.help/html/images/GMC_Delete_Vol_success.jpg Binary files differindex 1fdfb5f4..1fdfb5f4 100644 --- a/src/com.gluster.storage.management.console.help/html/images/GMC_Delete_Vol_success.jpg +++ b/src/org.gluster.storage.management.console.help/html/images/GMC_Delete_Vol_success.jpg diff --git a/src/com.gluster.storage.management.console.help/html/images/GMC_Disk_tab.jpg b/src/org.gluster.storage.management.console.help/html/images/GMC_Disk_tab.jpg Binary files differindex 8bc1dc9e..8bc1dc9e 100644 --- a/src/com.gluster.storage.management.console.help/html/images/GMC_Disk_tab.jpg +++ b/src/org.gluster.storage.management.console.help/html/images/GMC_Disk_tab.jpg diff --git a/src/com.gluster.storage.management.console.help/html/images/GMC_Landing_Page.jpg b/src/org.gluster.storage.management.console.help/html/images/GMC_Landing_Page.jpg Binary files differindex 65e2bd9d..65e2bd9d 100644 --- a/src/com.gluster.storage.management.console.help/html/images/GMC_Landing_Page.jpg +++ b/src/org.gluster.storage.management.console.help/html/images/GMC_Landing_Page.jpg diff --git a/src/com.gluster.storage.management.console.help/html/images/GMC_Log_list.jpg b/src/org.gluster.storage.management.console.help/html/images/GMC_Log_list.jpg Binary files differindex 81ffa36c..81ffa36c 100644 --- a/src/com.gluster.storage.management.console.help/html/images/GMC_Log_list.jpg +++ b/src/org.gluster.storage.management.console.help/html/images/GMC_Log_list.jpg diff --git a/src/com.gluster.storage.management.console.help/html/images/GMC_Login_Change_Pwd.jpg b/src/org.gluster.storage.management.console.help/html/images/GMC_Login_Change_Pwd.jpg Binary files differindex 27ed8be4..27ed8be4 100644 --- a/src/com.gluster.storage.management.console.help/html/images/GMC_Login_Change_Pwd.jpg +++ b/src/org.gluster.storage.management.console.help/html/images/GMC_Login_Change_Pwd.jpg diff --git a/src/com.gluster.storage.management.console.help/html/images/GMC_Login_Window.jpg b/src/org.gluster.storage.management.console.help/html/images/GMC_Login_Window.jpg Binary files differindex 7b684567..7b684567 100644 --- a/src/com.gluster.storage.management.console.help/html/images/GMC_Login_Window.jpg +++ b/src/org.gluster.storage.management.console.help/html/images/GMC_Login_Window.jpg diff --git a/src/org.gluster.storage.management.console.help/html/images/GMC_Migrate_Brick.jpg b/src/org.gluster.storage.management.console.help/html/images/GMC_Migrate_Brick.jpg Binary files differnew file mode 100644 index 00000000..69366171 --- /dev/null +++ b/src/org.gluster.storage.management.console.help/html/images/GMC_Migrate_Brick.jpg diff --git a/src/org.gluster.storage.management.console.help/html/images/GMC_Migrate_Brick_success.jpg b/src/org.gluster.storage.management.console.help/html/images/GMC_Migrate_Brick_success.jpg Binary files differnew file mode 100644 index 00000000..ef240296 --- /dev/null +++ b/src/org.gluster.storage.management.console.help/html/images/GMC_Migrate_Brick_success.jpg diff --git a/src/com.gluster.storage.management.console.help/html/images/GMC_Preferences_alerts.jpg b/src/org.gluster.storage.management.console.help/html/images/GMC_Preferences_alerts.jpg Binary files differindex d57c6adc..d57c6adc 100644 --- a/src/com.gluster.storage.management.console.help/html/images/GMC_Preferences_alerts.jpg +++ b/src/org.gluster.storage.management.console.help/html/images/GMC_Preferences_alerts.jpg diff --git a/src/com.gluster.storage.management.console.help/html/images/GMC_Preferences_charts.jpg b/src/org.gluster.storage.management.console.help/html/images/GMC_Preferences_charts.jpg Binary files differindex 7ae6ca8c..7ae6ca8c 100644 --- a/src/com.gluster.storage.management.console.help/html/images/GMC_Preferences_charts.jpg +++ b/src/org.gluster.storage.management.console.help/html/images/GMC_Preferences_charts.jpg diff --git a/src/org.gluster.storage.management.console.help/html/images/GMC_Preferences_gluster.jpg b/src/org.gluster.storage.management.console.help/html/images/GMC_Preferences_gluster.jpg Binary files differnew file mode 100644 index 00000000..b1348c59 --- /dev/null +++ b/src/org.gluster.storage.management.console.help/html/images/GMC_Preferences_gluster.jpg diff --git a/src/org.gluster.storage.management.console.help/html/images/GMC_Preferences_terminal.jpg b/src/org.gluster.storage.management.console.help/html/images/GMC_Preferences_terminal.jpg Binary files differnew file mode 100644 index 00000000..78e33410 --- /dev/null +++ b/src/org.gluster.storage.management.console.help/html/images/GMC_Preferences_terminal.jpg diff --git a/src/org.gluster.storage.management.console.help/html/images/GMC_Rebalance_icon.jpg b/src/org.gluster.storage.management.console.help/html/images/GMC_Rebalance_icon.jpg Binary files differnew file mode 100644 index 00000000..4d0f81e0 --- /dev/null +++ b/src/org.gluster.storage.management.console.help/html/images/GMC_Rebalance_icon.jpg diff --git a/src/org.gluster.storage.management.console.help/html/images/GMC_Refresh.jpg b/src/org.gluster.storage.management.console.help/html/images/GMC_Refresh.jpg Binary files differnew file mode 100644 index 00000000..2fa0cf6a --- /dev/null +++ b/src/org.gluster.storage.management.console.help/html/images/GMC_Refresh.jpg diff --git a/src/org.gluster.storage.management.console.help/html/images/GMC_Register_Cluster.jpg b/src/org.gluster.storage.management.console.help/html/images/GMC_Register_Cluster.jpg Binary files differnew file mode 100644 index 00000000..1da58638 --- /dev/null +++ b/src/org.gluster.storage.management.console.help/html/images/GMC_Register_Cluster.jpg diff --git a/src/com.gluster.storage.management.console.help/html/images/GMC_Remove_Brick_Confirm.jpg b/src/org.gluster.storage.management.console.help/html/images/GMC_Remove_Brick_Confirm.jpg Binary files differindex 45529823..45529823 100644 --- a/src/com.gluster.storage.management.console.help/html/images/GMC_Remove_Brick_Confirm.jpg +++ b/src/org.gluster.storage.management.console.help/html/images/GMC_Remove_Brick_Confirm.jpg diff --git a/src/org.gluster.storage.management.console.help/html/images/GMC_Remove_Brick_icon.jpg b/src/org.gluster.storage.management.console.help/html/images/GMC_Remove_Brick_icon.jpg Binary files differnew file mode 100644 index 00000000..8f237ae5 --- /dev/null +++ b/src/org.gluster.storage.management.console.help/html/images/GMC_Remove_Brick_icon.jpg diff --git a/src/org.gluster.storage.management.console.help/html/images/GMC_Remove_Server_icon.jpg b/src/org.gluster.storage.management.console.help/html/images/GMC_Remove_Server_icon.jpg Binary files differnew file mode 100644 index 00000000..a62f4e60 --- /dev/null +++ b/src/org.gluster.storage.management.console.help/html/images/GMC_Remove_Server_icon.jpg diff --git a/src/com.gluster.storage.management.console.help/html/images/GMC_Remove_server.jpg b/src/org.gluster.storage.management.console.help/html/images/GMC_Remove_server.jpg Binary files differindex e51eb1c6..e51eb1c6 100644 --- a/src/com.gluster.storage.management.console.help/html/images/GMC_Remove_server.jpg +++ b/src/org.gluster.storage.management.console.help/html/images/GMC_Remove_server.jpg diff --git a/src/com.gluster.storage.management.console.help/html/images/GMC_Remove_server_success.jpg b/src/org.gluster.storage.management.console.help/html/images/GMC_Remove_server_success.jpg Binary files differindex aaff5c0a..aaff5c0a 100644 --- a/src/com.gluster.storage.management.console.help/html/images/GMC_Remove_server_success.jpg +++ b/src/org.gluster.storage.management.console.help/html/images/GMC_Remove_server_success.jpg diff --git a/src/org.gluster.storage.management.console.help/html/images/GMC_Select_Cluster.jpg b/src/org.gluster.storage.management.console.help/html/images/GMC_Select_Cluster.jpg Binary files differnew file mode 100644 index 00000000..1198e0bf --- /dev/null +++ b/src/org.gluster.storage.management.console.help/html/images/GMC_Select_Cluster.jpg diff --git a/src/com.gluster.storage.management.console.help/html/images/GMC_Select_Cluster_progess.jpg b/src/org.gluster.storage.management.console.help/html/images/GMC_Select_Cluster_progess.jpg Binary files differindex 4f970da7..4f970da7 100644 --- a/src/com.gluster.storage.management.console.help/html/images/GMC_Select_Cluster_progess.jpg +++ b/src/org.gluster.storage.management.console.help/html/images/GMC_Select_Cluster_progess.jpg diff --git a/src/com.gluster.storage.management.console.help/html/images/GMC_Server_Disk.jpg b/src/org.gluster.storage.management.console.help/html/images/GMC_Server_Disk.jpg Binary files differindex 12a53350..12a53350 100644 --- a/src/com.gluster.storage.management.console.help/html/images/GMC_Server_Disk.jpg +++ b/src/org.gluster.storage.management.console.help/html/images/GMC_Server_Disk.jpg diff --git a/src/com.gluster.storage.management.console.help/html/images/GMC_Server_Summ.jpg b/src/org.gluster.storage.management.console.help/html/images/GMC_Server_Summ.jpg Binary files differindex 62169ee8..62169ee8 100644 --- a/src/com.gluster.storage.management.console.help/html/images/GMC_Server_Summ.jpg +++ b/src/org.gluster.storage.management.console.help/html/images/GMC_Server_Summ.jpg diff --git a/src/org.gluster.storage.management.console.help/html/images/GMC_Server_Summary_tab.jpg b/src/org.gluster.storage.management.console.help/html/images/GMC_Server_Summary_tab.jpg Binary files differnew file mode 100644 index 00000000..ccef5b46 --- /dev/null +++ b/src/org.gluster.storage.management.console.help/html/images/GMC_Server_Summary_tab.jpg diff --git a/src/org.gluster.storage.management.console.help/html/images/GMC_Server_Tab.jpg b/src/org.gluster.storage.management.console.help/html/images/GMC_Server_Tab.jpg Binary files differnew file mode 100644 index 00000000..387e4b38 --- /dev/null +++ b/src/org.gluster.storage.management.console.help/html/images/GMC_Server_Tab.jpg diff --git a/src/com.gluster.storage.management.console.help/html/images/GMC_Single_Vol.jpg b/src/org.gluster.storage.management.console.help/html/images/GMC_Single_Vol.jpg Binary files differindex b88c3030..b88c3030 100644 --- a/src/com.gluster.storage.management.console.help/html/images/GMC_Single_Vol.jpg +++ b/src/org.gluster.storage.management.console.help/html/images/GMC_Single_Vol.jpg diff --git a/src/org.gluster.storage.management.console.help/html/images/GMC_Start_task_icon.jpg b/src/org.gluster.storage.management.console.help/html/images/GMC_Start_task_icon.jpg Binary files differnew file mode 100644 index 00000000..c864ed1b --- /dev/null +++ b/src/org.gluster.storage.management.console.help/html/images/GMC_Start_task_icon.jpg diff --git a/src/com.gluster.storage.management.console.help/html/images/GMC_Stop_Multiple_Vol.jpg b/src/org.gluster.storage.management.console.help/html/images/GMC_Stop_Multiple_Vol.jpg Binary files differindex cdf8f2f8..cdf8f2f8 100644 --- a/src/com.gluster.storage.management.console.help/html/images/GMC_Stop_Multiple_Vol.jpg +++ b/src/org.gluster.storage.management.console.help/html/images/GMC_Stop_Multiple_Vol.jpg diff --git a/src/com.gluster.storage.management.console.help/html/images/GMC_Stop_Vol.jpg b/src/org.gluster.storage.management.console.help/html/images/GMC_Stop_Vol.jpg Binary files differindex f6fd4f3b..f6fd4f3b 100644 --- a/src/com.gluster.storage.management.console.help/html/images/GMC_Stop_Vol.jpg +++ b/src/org.gluster.storage.management.console.help/html/images/GMC_Stop_Vol.jpg diff --git a/src/org.gluster.storage.management.console.help/html/images/GMC_Stop_icon.jpg b/src/org.gluster.storage.management.console.help/html/images/GMC_Stop_icon.jpg Binary files differnew file mode 100644 index 00000000..5b39e612 --- /dev/null +++ b/src/org.gluster.storage.management.console.help/html/images/GMC_Stop_icon.jpg diff --git a/src/org.gluster.storage.management.console.help/html/images/GMC_Task_tab.jpg b/src/org.gluster.storage.management.console.help/html/images/GMC_Task_tab.jpg Binary files differnew file mode 100644 index 00000000..3f0873a9 --- /dev/null +++ b/src/org.gluster.storage.management.console.help/html/images/GMC_Task_tab.jpg diff --git a/src/org.gluster.storage.management.console.help/html/images/GMC_Terminal_window.jpg b/src/org.gluster.storage.management.console.help/html/images/GMC_Terminal_window.jpg Binary files differnew file mode 100644 index 00000000..603307e6 --- /dev/null +++ b/src/org.gluster.storage.management.console.help/html/images/GMC_Terminal_window.jpg diff --git a/src/com.gluster.storage.management.console.help/html/images/GMC_Toolbar.jpg b/src/org.gluster.storage.management.console.help/html/images/GMC_Toolbar.jpg Binary files differindex 1eeb7a0c..1eeb7a0c 100644 --- a/src/com.gluster.storage.management.console.help/html/images/GMC_Toolbar.jpg +++ b/src/org.gluster.storage.management.console.help/html/images/GMC_Toolbar.jpg diff --git a/src/com.gluster.storage.management.console.help/html/images/GMC_Vol_List.jpg b/src/org.gluster.storage.management.console.help/html/images/GMC_Vol_List.jpg Binary files differindex 04813d79..04813d79 100644 --- a/src/com.gluster.storage.management.console.help/html/images/GMC_Vol_List.jpg +++ b/src/org.gluster.storage.management.console.help/html/images/GMC_Vol_List.jpg diff --git a/src/com.gluster.storage.management.console.help/html/images/GMC_Vol_Options.jpg b/src/org.gluster.storage.management.console.help/html/images/GMC_Vol_Options.jpg Binary files differindex 36d99160..36d99160 100644 --- a/src/com.gluster.storage.management.console.help/html/images/GMC_Vol_Options.jpg +++ b/src/org.gluster.storage.management.console.help/html/images/GMC_Vol_Options.jpg diff --git a/src/com.gluster.storage.management.console.help/html/images/GMC_Vol_rebalance_success.jpg b/src/org.gluster.storage.management.console.help/html/images/GMC_Vol_rebalance_success.jpg Binary files differindex 1d06d499..1d06d499 100644 --- a/src/com.gluster.storage.management.console.help/html/images/GMC_Vol_rebalance_success.jpg +++ b/src/org.gluster.storage.management.console.help/html/images/GMC_Vol_rebalance_success.jpg diff --git a/src/com.gluster.storage.management.console.help/html/images/GMC_Volume_Options.jpg b/src/org.gluster.storage.management.console.help/html/images/GMC_Volume_Options.jpg Binary files differindex 4775a814..4775a814 100644 --- a/src/com.gluster.storage.management.console.help/html/images/GMC_Volume_Options.jpg +++ b/src/org.gluster.storage.management.console.help/html/images/GMC_Volume_Options.jpg diff --git a/src/org.gluster.storage.management.console.help/html/images/GMC_Volume_Summary.jpg b/src/org.gluster.storage.management.console.help/html/images/GMC_Volume_Summary.jpg Binary files differnew file mode 100644 index 00000000..23287308 --- /dev/null +++ b/src/org.gluster.storage.management.console.help/html/images/GMC_Volume_Summary.jpg diff --git a/src/com.gluster.storage.management.console.help/html/images/GMC_Volume_Summary_tab.jpg b/src/org.gluster.storage.management.console.help/html/images/GMC_Volume_Summary_tab.jpg Binary files differindex 1084c0f9..1084c0f9 100644 --- a/src/com.gluster.storage.management.console.help/html/images/GMC_Volume_Summary_tab.jpg +++ b/src/org.gluster.storage.management.console.help/html/images/GMC_Volume_Summary_tab.jpg diff --git a/src/org.gluster.storage.management.console.help/html/images/GMC_Volume_logs.jpg b/src/org.gluster.storage.management.console.help/html/images/GMC_Volume_logs.jpg Binary files differnew file mode 100644 index 00000000..6f70bc46 --- /dev/null +++ b/src/org.gluster.storage.management.console.help/html/images/GMC_Volume_logs.jpg diff --git a/src/com.gluster.storage.management.console.help/html/images/GMC_Volume_properties.jpg b/src/org.gluster.storage.management.console.help/html/images/GMC_Volume_properties.jpg Binary files differindex c31f4a09..c31f4a09 100644 --- a/src/com.gluster.storage.management.console.help/html/images/GMC_Volume_properties.jpg +++ b/src/org.gluster.storage.management.console.help/html/images/GMC_Volume_properties.jpg diff --git a/src/com.gluster.storage.management.console.help/html/images/GMC_Volumes_tab.jpg b/src/org.gluster.storage.management.console.help/html/images/GMC_Volumes_tab.jpg Binary files differindex 40d732ce..40d732ce 100644 --- a/src/com.gluster.storage.management.console.help/html/images/GMC_Volumes_tab.jpg +++ b/src/org.gluster.storage.management.console.help/html/images/GMC_Volumes_tab.jpg diff --git a/src/org.gluster.storage.management.console.help/html/images/GMC_add_server_icon.jpg b/src/org.gluster.storage.management.console.help/html/images/GMC_add_server_icon.jpg Binary files differnew file mode 100644 index 00000000..693d94ff --- /dev/null +++ b/src/org.gluster.storage.management.console.help/html/images/GMC_add_server_icon.jpg diff --git a/src/com.gluster.storage.management.console.help/html/images/GMC_change_pwd.jpg b/src/org.gluster.storage.management.console.help/html/images/GMC_change_pwd.jpg Binary files differindex 625bbe27..625bbe27 100644 --- a/src/com.gluster.storage.management.console.help/html/images/GMC_change_pwd.jpg +++ b/src/org.gluster.storage.management.console.help/html/images/GMC_change_pwd.jpg diff --git a/src/com.gluster.storage.management.console.help/html/images/GMC_create_vol (2).jpg b/src/org.gluster.storage.management.console.help/html/images/GMC_create_vol (2).jpg Binary files differindex 63f9cf9e..63f9cf9e 100644 --- a/src/com.gluster.storage.management.console.help/html/images/GMC_create_vol (2).jpg +++ b/src/org.gluster.storage.management.console.help/html/images/GMC_create_vol (2).jpg diff --git a/src/com.gluster.storage.management.console.help/html/images/GMC_create_vol.jpg b/src/org.gluster.storage.management.console.help/html/images/GMC_create_vol.jpg Binary files differindex 63f9cf9e..63f9cf9e 100644 --- a/src/com.gluster.storage.management.console.help/html/images/GMC_create_vol.jpg +++ b/src/org.gluster.storage.management.console.help/html/images/GMC_create_vol.jpg diff --git a/src/org.gluster.storage.management.console.help/html/images/GMC_download_log_icon.jpg b/src/org.gluster.storage.management.console.help/html/images/GMC_download_log_icon.jpg Binary files differnew file mode 100644 index 00000000..f5eb5fd3 --- /dev/null +++ b/src/org.gluster.storage.management.console.help/html/images/GMC_download_log_icon.jpg diff --git a/src/com.gluster.storage.management.console.help/html/images/GMC_landing_page.jpg b/src/org.gluster.storage.management.console.help/html/images/GMC_landing_page.jpg Binary files differindex eee50db5..eee50db5 100644 --- a/src/com.gluster.storage.management.console.help/html/images/GMC_landing_page.jpg +++ b/src/org.gluster.storage.management.console.help/html/images/GMC_landing_page.jpg diff --git a/src/com.gluster.storage.management.console.help/html/images/GMC_log_criteria.jpg b/src/org.gluster.storage.management.console.help/html/images/GMC_log_criteria.jpg Binary files differindex 112af00e..112af00e 100644 --- a/src/com.gluster.storage.management.console.help/html/images/GMC_log_criteria.jpg +++ b/src/org.gluster.storage.management.console.help/html/images/GMC_log_criteria.jpg diff --git a/src/com.gluster.storage.management.console.help/html/images/GMC_migrate_brick.jpg b/src/org.gluster.storage.management.console.help/html/images/GMC_migrate_brick.jpg Binary files differindex 08b4d358..08b4d358 100644 --- a/src/com.gluster.storage.management.console.help/html/images/GMC_migrate_brick.jpg +++ b/src/org.gluster.storage.management.console.help/html/images/GMC_migrate_brick.jpg diff --git a/src/org.gluster.storage.management.console.help/html/images/GMC_migrate_brick_icon.jpg b/src/org.gluster.storage.management.console.help/html/images/GMC_migrate_brick_icon.jpg Binary files differnew file mode 100644 index 00000000..f011d164 --- /dev/null +++ b/src/org.gluster.storage.management.console.help/html/images/GMC_migrate_brick_icon.jpg diff --git a/src/org.gluster.storage.management.console.help/html/images/GMC_pause_icon.jpg b/src/org.gluster.storage.management.console.help/html/images/GMC_pause_icon.jpg Binary files differnew file mode 100644 index 00000000..c9153cf1 --- /dev/null +++ b/src/org.gluster.storage.management.console.help/html/images/GMC_pause_icon.jpg diff --git a/src/com.gluster.storage.management.console.help/html/images/GMC_pwd_change_success.jpg b/src/org.gluster.storage.management.console.help/html/images/GMC_pwd_change_success.jpg Binary files differindex c4f12744..c4f12744 100644 --- a/src/com.gluster.storage.management.console.help/html/images/GMC_pwd_change_success.jpg +++ b/src/org.gluster.storage.management.console.help/html/images/GMC_pwd_change_success.jpg diff --git a/src/com.gluster.storage.management.console.help/html/images/GMC_rebalance_vol.jpg b/src/org.gluster.storage.management.console.help/html/images/GMC_rebalance_vol.jpg Binary files differindex 9e310025..9e310025 100644 --- a/src/com.gluster.storage.management.console.help/html/images/GMC_rebalance_vol.jpg +++ b/src/org.gluster.storage.management.console.help/html/images/GMC_rebalance_vol.jpg diff --git a/src/com.gluster.storage.management.console.help/html/images/GMC_remove_server_confirm.jpg b/src/org.gluster.storage.management.console.help/html/images/GMC_remove_server_confirm.jpg Binary files differindex a7c1d8ed..a7c1d8ed 100644 --- a/src/com.gluster.storage.management.console.help/html/images/GMC_remove_server_confirm.jpg +++ b/src/org.gluster.storage.management.console.help/html/images/GMC_remove_server_confirm.jpg diff --git a/src/org.gluster.storage.management.console.help/html/images/GMC_remove_volume_icon.jpg b/src/org.gluster.storage.management.console.help/html/images/GMC_remove_volume_icon.jpg Binary files differnew file mode 100644 index 00000000..e5626e4c --- /dev/null +++ b/src/org.gluster.storage.management.console.help/html/images/GMC_remove_volume_icon.jpg diff --git a/src/com.gluster.storage.management.console.help/html/images/GMC_server_summary.jpg b/src/org.gluster.storage.management.console.help/html/images/GMC_server_summary.jpg Binary files differindex 8a1bf08c..8a1bf08c 100644 --- a/src/com.gluster.storage.management.console.help/html/images/GMC_server_summary.jpg +++ b/src/org.gluster.storage.management.console.help/html/images/GMC_server_summary.jpg diff --git a/src/org.gluster.storage.management.console.help/html/images/GMC_setting_icon.jpg b/src/org.gluster.storage.management.console.help/html/images/GMC_setting_icon.jpg Binary files differnew file mode 100644 index 00000000..049d15aa --- /dev/null +++ b/src/org.gluster.storage.management.console.help/html/images/GMC_setting_icon.jpg diff --git a/src/org.gluster.storage.management.console.help/html/images/GMC_settings.jpg b/src/org.gluster.storage.management.console.help/html/images/GMC_settings.jpg Binary files differnew file mode 100644 index 00000000..bd655794 --- /dev/null +++ b/src/org.gluster.storage.management.console.help/html/images/GMC_settings.jpg diff --git a/src/com.gluster.storage.management.console.help/html/images/GMC_start_vol_Multiple.jpg b/src/org.gluster.storage.management.console.help/html/images/GMC_start_vol_Multiple.jpg Binary files differindex 99f3895f..99f3895f 100644 --- a/src/com.gluster.storage.management.console.help/html/images/GMC_start_vol_Multiple.jpg +++ b/src/org.gluster.storage.management.console.help/html/images/GMC_start_vol_Multiple.jpg diff --git a/src/org.gluster.storage.management.console.help/html/images/GMC_start_vol_icon.jpg b/src/org.gluster.storage.management.console.help/html/images/GMC_start_vol_icon.jpg Binary files differnew file mode 100644 index 00000000..f9c78eb7 --- /dev/null +++ b/src/org.gluster.storage.management.console.help/html/images/GMC_start_vol_icon.jpg diff --git a/src/com.gluster.storage.management.console.help/html/images/GMC_start_vol_success.jpg b/src/org.gluster.storage.management.console.help/html/images/GMC_start_vol_success.jpg Binary files differindex 0aa6668f..0aa6668f 100644 --- a/src/com.gluster.storage.management.console.help/html/images/GMC_start_vol_success.jpg +++ b/src/org.gluster.storage.management.console.help/html/images/GMC_start_vol_success.jpg diff --git a/src/com.gluster.storage.management.console.help/html/images/GMC_stop_vol_Multiple.jpg b/src/org.gluster.storage.management.console.help/html/images/GMC_stop_vol_Multiple.jpg Binary files differindex 99f3895f..99f3895f 100644 --- a/src/com.gluster.storage.management.console.help/html/images/GMC_stop_vol_Multiple.jpg +++ b/src/org.gluster.storage.management.console.help/html/images/GMC_stop_vol_Multiple.jpg diff --git a/src/org.gluster.storage.management.console.help/html/images/GMC_stop_vol_icon.jpg b/src/org.gluster.storage.management.console.help/html/images/GMC_stop_vol_icon.jpg Binary files differnew file mode 100644 index 00000000..2c5f7c2f --- /dev/null +++ b/src/org.gluster.storage.management.console.help/html/images/GMC_stop_vol_icon.jpg diff --git a/src/org.gluster.storage.management.console.help/html/images/GMC_terminal_Settings.jpg b/src/org.gluster.storage.management.console.help/html/images/GMC_terminal_Settings.jpg Binary files differnew file mode 100644 index 00000000..cf67682c --- /dev/null +++ b/src/org.gluster.storage.management.console.help/html/images/GMC_terminal_Settings.jpg diff --git a/src/org.gluster.storage.management.console.help/html/images/GMC_terminal_toolbar.jpg b/src/org.gluster.storage.management.console.help/html/images/GMC_terminal_toolbar.jpg Binary files differnew file mode 100644 index 00000000..d2d79b58 --- /dev/null +++ b/src/org.gluster.storage.management.console.help/html/images/GMC_terminal_toolbar.jpg diff --git a/src/com.gluster.storage.management.console.help/html/images/GMG_Architecture.jpg b/src/org.gluster.storage.management.console.help/html/images/GMG_Architecture.jpg Binary files differindex 2c606b59..2c606b59 100644 --- a/src/com.gluster.storage.management.console.help/html/images/GMG_Architecture.jpg +++ b/src/org.gluster.storage.management.console.help/html/images/GMG_Architecture.jpg diff --git a/src/com.gluster.storage.management.console.help/html/images/GlusterFS_3.2_Architecture.jpg b/src/org.gluster.storage.management.console.help/html/images/GlusterFS_3.2_Architecture.jpg Binary files differindex b093fc29..b093fc29 100644 --- a/src/com.gluster.storage.management.console.help/html/images/GlusterFS_3.2_Architecture.jpg +++ b/src/org.gluster.storage.management.console.help/html/images/GlusterFS_3.2_Architecture.jpg diff --git a/src/com.gluster.storage.management.console.help/html/images/GlusterFS_3.2_Architecture.png b/src/org.gluster.storage.management.console.help/html/images/GlusterFS_3.2_Architecture.png Binary files differindex b506db1f..b506db1f 100644 --- a/src/com.gluster.storage.management.console.help/html/images/GlusterFS_3.2_Architecture.png +++ b/src/org.gluster.storage.management.console.help/html/images/GlusterFS_3.2_Architecture.png diff --git a/src/org.gluster.storage.management.console.help/html/images/GlusterMC_Architecture.jpg b/src/org.gluster.storage.management.console.help/html/images/GlusterMC_Architecture.jpg Binary files differnew file mode 100644 index 00000000..64618ddf --- /dev/null +++ b/src/org.gluster.storage.management.console.help/html/images/GlusterMC_Architecture.jpg diff --git a/src/com.gluster.storage.management.console.help/html/images/Migration.png b/src/org.gluster.storage.management.console.help/html/images/Migration.png Binary files differindex 4ed6e054..4ed6e054 100644 --- a/src/com.gluster.storage.management.console.help/html/images/Migration.png +++ b/src/org.gluster.storage.management.console.help/html/images/Migration.png diff --git a/src/com.gluster.storage.management.console.help/html/images/Preferences-alerts .png b/src/org.gluster.storage.management.console.help/html/images/Preferences-alerts .png Binary files differindex d7cefac3..d7cefac3 100644 --- a/src/com.gluster.storage.management.console.help/html/images/Preferences-alerts .png +++ b/src/org.gluster.storage.management.console.help/html/images/Preferences-alerts .png diff --git a/src/com.gluster.storage.management.console.help/html/images/Preferences-charts.png b/src/org.gluster.storage.management.console.help/html/images/Preferences-charts.png Binary files differindex 89cabb06..89cabb06 100644 --- a/src/com.gluster.storage.management.console.help/html/images/Preferences-charts.png +++ b/src/org.gluster.storage.management.console.help/html/images/Preferences-charts.png diff --git a/src/com.gluster.storage.management.console.help/html/images/Preferences-gluster .png b/src/org.gluster.storage.management.console.help/html/images/Preferences-gluster .png Binary files differindex f279b9fb..f279b9fb 100644 --- a/src/com.gluster.storage.management.console.help/html/images/Preferences-gluster .png +++ b/src/org.gluster.storage.management.console.help/html/images/Preferences-gluster .png diff --git a/src/com.gluster.storage.management.console.help/html/images/Running tasks & alerts.png b/src/org.gluster.storage.management.console.help/html/images/Running tasks & alerts.png Binary files differindex 7f3b192f..7f3b192f 100644 --- a/src/com.gluster.storage.management.console.help/html/images/Running tasks & alerts.png +++ b/src/org.gluster.storage.management.console.help/html/images/Running tasks & alerts.png diff --git a/src/com.gluster.storage.management.console.help/html/images/Stop_Vol.jpg b/src/org.gluster.storage.management.console.help/html/images/Stop_Vol.jpg Binary files differindex 124a1180..124a1180 100644 --- a/src/com.gluster.storage.management.console.help/html/images/Stop_Vol.jpg +++ b/src/org.gluster.storage.management.console.help/html/images/Stop_Vol.jpg diff --git a/src/com.gluster.storage.management.console.help/html/images/Stop_Vol_confirm.jpg b/src/org.gluster.storage.management.console.help/html/images/Stop_Vol_confirm.jpg Binary files differindex ad87228b..ad87228b 100644 --- a/src/com.gluster.storage.management.console.help/html/images/Stop_Vol_confirm.jpg +++ b/src/org.gluster.storage.management.console.help/html/images/Stop_Vol_confirm.jpg diff --git a/src/com.gluster.storage.management.console.help/html/images/Stop_Vol_multiple.jpg b/src/org.gluster.storage.management.console.help/html/images/Stop_Vol_multiple.jpg Binary files differindex 6955996c..6955996c 100644 --- a/src/com.gluster.storage.management.console.help/html/images/Stop_Vol_multiple.jpg +++ b/src/org.gluster.storage.management.console.help/html/images/Stop_Vol_multiple.jpg diff --git a/src/com.gluster.storage.management.console.help/html/images/Stop_Vol_multiple_confirm.jpg b/src/org.gluster.storage.management.console.help/html/images/Stop_Vol_multiple_confirm.jpg Binary files differindex 581bf389..581bf389 100644 --- a/src/com.gluster.storage.management.console.help/html/images/Stop_Vol_multiple_confirm.jpg +++ b/src/org.gluster.storage.management.console.help/html/images/Stop_Vol_multiple_confirm.jpg diff --git a/src/com.gluster.storage.management.console.help/html/images/discovered_servers.png b/src/org.gluster.storage.management.console.help/html/images/discovered_servers.png Binary files differindex 2a4e2c5c..2a4e2c5c 100644 --- a/src/com.gluster.storage.management.console.help/html/images/discovered_servers.png +++ b/src/org.gluster.storage.management.console.help/html/images/discovered_servers.png diff --git a/src/com.gluster.storage.management.console.help/html/images/java-web-start.jpg b/src/org.gluster.storage.management.console.help/html/images/java-web-start.jpg Binary files differindex 2a445b60..2a445b60 100644 --- a/src/com.gluster.storage.management.console.help/html/images/java-web-start.jpg +++ b/src/org.gluster.storage.management.console.help/html/images/java-web-start.jpg diff --git a/src/org.gluster.storage.management.console.help/html/images/java_web_start.jpg b/src/org.gluster.storage.management.console.help/html/images/java_web_start.jpg Binary files differnew file mode 100644 index 00000000..2a445b60 --- /dev/null +++ b/src/org.gluster.storage.management.console.help/html/images/java_web_start.jpg diff --git a/src/com.gluster.storage.management.console.help/html/images/login-dialog.png b/src/org.gluster.storage.management.console.help/html/images/login-dialog.png Binary files differindex 50051b96..50051b96 100644 --- a/src/com.gluster.storage.management.console.help/html/images/login-dialog.png +++ b/src/org.gluster.storage.management.console.help/html/images/login-dialog.png diff --git a/src/com.gluster.storage.management.console.help/html/reference/maintopic.html b/src/org.gluster.storage.management.console.help/html/reference/maintopic.html index 8caa4cc2..8caa4cc2 100644 --- a/src/com.gluster.storage.management.console.help/html/reference/maintopic.html +++ b/src/org.gluster.storage.management.console.help/html/reference/maintopic.html diff --git a/src/com.gluster.storage.management.console.help/html/reference/subtopic.html b/src/org.gluster.storage.management.console.help/html/reference/subtopic.html index c68dc748..c68dc748 100644 --- a/src/com.gluster.storage.management.console.help/html/reference/subtopic.html +++ b/src/org.gluster.storage.management.console.help/html/reference/subtopic.html diff --git a/src/com.gluster.storage.management.console.help/html/reference/subtopic2.html b/src/org.gluster.storage.management.console.help/html/reference/subtopic2.html index e5e31cd1..e5e31cd1 100644 --- a/src/com.gluster.storage.management.console.help/html/reference/subtopic2.html +++ b/src/org.gluster.storage.management.console.help/html/reference/subtopic2.html diff --git a/src/com.gluster.storage.management.console.help/html/tasks/access_gmc_jws.html b/src/org.gluster.storage.management.console.help/html/tasks/access_gmc_jws.html index bc62ef9b..79c42427 100644 --- a/src/com.gluster.storage.management.console.help/html/tasks/access_gmc_jws.html +++ b/src/org.gluster.storage.management.console.help/html/tasks/access_gmc_jws.html @@ -18,7 +18,7 @@ To start Gluster Management Console using Java web start, perform the following <li>Your web browser has cookies and Javascript enabled.
</ul>
<li>Type the following URL in your web browser:
-<p><FONT FACE = "Courier">http://server-name:webserver-port/glustermg/gluster-management-console.jnlp</FONT>
+<p><FONT FACE = "Courier">https://server-name:webserver-port/glustermg/</FONT>
<p>Gluster Management Console login window is displayed.</p>
<img src="../images/GMC_Login_Window.jpg" alt="Gluster Management Console"/>
<li>Type the following default user name and password in the login window:
diff --git a/src/com.gluster.storage.management.console.help/html/tasks/add_brick.html b/src/org.gluster.storage.management.console.help/html/tasks/add_brick.html index 00207885..de0dc6ea 100644 --- a/src/com.gluster.storage.management.console.help/html/tasks/add_brick.html +++ b/src/org.gluster.storage.management.console.help/html/tasks/add_brick.html @@ -10,26 +10,23 @@ type="text/css" media="screen" /> <body>
<h1>Adding Bricks</h1>
-You can expand a volume, as required, by adding new bricks to an
-existing volume.
+You can expand a volume, as required, by adding new bricks to an existing volume. To add a brick to an existing volume, perform the following steps.
<p><b>Note: </b>You need to add at least one brick to a distributed
-volume, two (or multiples of two) bricks to mirrored distributed
-volumes, and four (or multiples of four) bricks to striped distributed
+volume, two (or multiples of two) bricks to replicated
+volumes, and four (or multiples of four) bricks to striped
volumes when expanding your storage space.
<p>To add a brick to an existing volume, perform the following
steps.</p>
<ol>
- <li>Choose from the menu, toolbar, or right click and select the
- Volume and select <b>Add Bricks</b>.
+ <li>Select the volume from the left pane, choose from the menu, toolbar, or right click and select <b>Add Bricks</b>.
<p>The <b>Add Brick</b> window is displayed.</p>
- <p style="height: 351px; width: 596px; "><img src="../images/GMC_add_brick.jpg" width="585" height="400"
- alt="Add Brick" /></p>
+ <p><img src="../images/GMC_1.0_Add_Brick.jpg" alt="Add Brick" /></p>
<li>Select the bricks that you want to add to the current volume.
Click <b>Add</b> to add a specific brick or Click <b>Add All</b> to add
all the available bricks.
<li>Click <b>Finish</b>. The <b>Add Brick(s)to Volume</b> window
appears indicating that the brick(s) is successfully added.
- <p><img src="../images/GMC_add_brick_confirm.jpg"
+ <p><img src="../images/GMC_1.0_Add_Brick_confirm.jpg"
alt="Add Brick to Volume Confirmation" /></p>
<li>Click <b>OK</b>.
</ol>
diff --git a/src/com.gluster.storage.management.console.help/html/tasks/add_servers.html b/src/org.gluster.storage.management.console.help/html/tasks/add_servers.html index d71cdfb4..b554a1dc 100644 --- a/src/com.gluster.storage.management.console.help/html/tasks/add_servers.html +++ b/src/org.gluster.storage.management.console.help/html/tasks/add_servers.html @@ -9,7 +9,7 @@ type="text/css" media="screen" /> </head>
<body>
-<h1>Adding Servers</h1>
+<h1>Adding Servers to a Cluster</h1>
Gluster Management Console discovers servers across the environment. You
can add servers manually or from the discovered list of servers to your
cloud environment to expand the amount of available storage.
@@ -18,6 +18,7 @@ steps:</p> <ol>
<li>Choose from the menu, toolbar, or right click on the
Discovered Server node and select <b>Add Server</b>.
+ <p>You can also choose multiple discovered servers or select <b>All</b> from the <b>Discovered Servers</b> tab and select <b>Add Sever</b>.</p>
<p><img src="../images/GMC_1.0_Discovered_Server_Add.jpg" alt="Add Servers" />
<li>The console displays the <b>Add Server(s) to Cluster</b>
window to indicate that the server was successfully added to the
diff --git a/src/com.gluster.storage.management.console.help/html/tasks/configure_gmc.html b/src/org.gluster.storage.management.console.help/html/tasks/configure_gmc.html index 3c385014..3c385014 100644 --- a/src/com.gluster.storage.management.console.help/html/tasks/configure_gmc.html +++ b/src/org.gluster.storage.management.console.help/html/tasks/configure_gmc.html diff --git a/src/org.gluster.storage.management.console.help/html/tasks/create_cluster.html b/src/org.gluster.storage.management.console.help/html/tasks/create_cluster.html new file mode 100644 index 00000000..a2e0dff8 --- /dev/null +++ b/src/org.gluster.storage.management.console.help/html/tasks/create_cluster.html @@ -0,0 +1,25 @@ +<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
+
+<html>
+<head>
+<link rel="stylesheet" href="../css/builder-gluster/style.css"
+type="text/css" media="screen" />
+<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
+<title>Create Cluster</title>
+</head>
+
+<body>
+<h1>Creating a Cluster</h1>
+ To create a cluster, perform the
+following steps.
+<ol>
+ <li>Launch the application and log in with a valid password.
+ <p><b>Select Cluster</b> window is displayed</p>
+ <p><img src="../images/GMC_Create_Cluster.jpg"
+ alt="Create Cluster" />
+ <li>Select <b>Create</b>. Type the name of the new cluster in the
+ <b>Cluster Name</b> field.
+ <li>Click <b>OK</b>. The Gluster Management Console window is displayed with the newly created cluster.
+</ol>
+</body>
+</html>
\ No newline at end of file diff --git a/src/org.gluster.storage.management.console.help/html/tasks/create_volume.html b/src/org.gluster.storage.management.console.help/html/tasks/create_volume.html new file mode 100644 index 00000000..814835ec --- /dev/null +++ b/src/org.gluster.storage.management.console.help/html/tasks/create_volume.html @@ -0,0 +1,47 @@ +<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
+
+<html>
+<head>
+<link rel="stylesheet" href="../css/builder-gluster/style.css"
+type="text/css" media="screen" />
+<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
+<title>Creating Volumes</title>
+</head>
+
+<body>
+<h1>Creating a Volume</h1>
+You can create new volumes in your storage environment, as needed. When creating a new volume, you must specify the bricks that comprise the volume and specify whether the volume is to be distributed, replicated, or striped.
+<p>To create a volume, perform the following steps:
+<ol>
+ <li>Choose from the menu, toolbar, or right click and select the
+ Volume and select <b>Create Volume</b>.
+
+ <p>The <b>Create Volume</b> window is displayed.
+ <p><img src="../images/GMC_Create_Volume.jpg" alt="Create Volume" /></p>
+ <li>Type the name of the volume in the <b>Name</b> field.
+ <li>Select the type of the volume from the <b>Type</b> drop-down list.
+ You can choose the type as either <b>Distribute</b>, <b>Replicate</b>,
+ or <b>Stripe</b>.
+ <li>Bricks will be created on all the disks of the cluster when
+ you create a volume, by default. Click <b>Customize</b>, to select and add
+ specific bricks to your volume.
+ <li>Select the <b>Access Protocol</b> for the new volume by selecting <b>GlusterFS</b>, <b>NFS</b>, or <b>CIFS</b> checkbox.
+ <li>If you choose <b>CIFS</b>, specify the user name and password to use
+ from Windows clients to connect to the volume.
+ <p>You need to use user-based authentication for CIFS exports,
+ hence you must specify the user’s who can access the volume as a
+ comma-separated list in the Users field.
+
+ <p>For more information about configuring CIFS, refer <a href="cifs_service.html">CIFS
+ Services</a>.<li>In the<b> Allow Access From</b> field, specify the volume access control as a comma-separated list of IP addresses or hostnames.
+ <p>You can use wildcards to specify ranges of addresses. Typing an asterisk (*) specifies all IP addresses or hostnames. You need to use IP-based authentication for Gluster Filesystem and NFS exports.</p>
+ <li>Select the <b>Start Volume</b> check box to automatically start the
+ volume once created.
+ <li>Click <b>Create Volume</b>. The console displays Create Volume window
+ to indicate that the volume was successfully created.
+ <p><img src="../images/GMC_Create_Volume_success.jpg"
+ alt="Volume Created Successfuly" /></p>
+ <li>Click <b>OK</b>.
+</ol>
+</body>
+</html>
\ No newline at end of file diff --git a/src/com.gluster.storage.management.console.help/html/tasks/delete_brick.html b/src/org.gluster.storage.management.console.help/html/tasks/delete_brick.html index a5de99af..a5de99af 100644 --- a/src/com.gluster.storage.management.console.help/html/tasks/delete_brick.html +++ b/src/org.gluster.storage.management.console.help/html/tasks/delete_brick.html diff --git a/src/org.gluster.storage.management.console.help/html/tasks/delete_volume.html b/src/org.gluster.storage.management.console.help/html/tasks/delete_volume.html new file mode 100644 index 00000000..43d51231 --- /dev/null +++ b/src/org.gluster.storage.management.console.help/html/tasks/delete_volume.html @@ -0,0 +1,34 @@ +<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
+
+<html>
+<head>
+<link rel="stylesheet" href="../css/builder-gluster/style.css"
+type="text/css" media="screen" />
+<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
+<title>Main Topic</title>
+</head>
+
+<body>
+<h1>Deleting Volumes</h1>
+You can delete a volume or multiple volumes from your storage environment, as required.
+<p>To delete a volume, perform the following steps.</p>
+<ol>
+<li>Choose from the menu, toolbar, or right click and select the Volume and select <b>Delete Volume</b>.
+<p>The <b>Delete Volume</b> window appears. You are asked to confirm before proceeding with the
+ volume deletion
+<p><img src="../images/GMC_Delete_Vol.jpg" alt="Delete Volume" /></p>
+<p>In case of multiple volumes, the Delete Volume window is displayed as shown below.</p>
+<p><img src="../images/GMC_Delete_Vol_multiple.jpg" alt="Delete Multiple Volumes" /></p>
+<li>If you wish to delete the volume permanently, click <b>Delete Volume and Data</b>.
+<li>If you wish to keep the data but delete the volume, click <b>Delete Volume, Keep Data</b>.
+<p>The brick(s) directories of the volume will be renamed to <FONT FACE = "Courier"><olddirectory>_<timestamp></FONT>.
+<li>The <b>Delete Volume</b> window is displayed indicating that the volume
+ was deleted successfully.
+<p><img src="../images/GMC_Delete_Vol_success.jpg" alt="Delete Volume" /></p>
+<p>In case of multiple volumes, the <b>Delete Volume</b> window is displayed as follows.</p>
+<p><img src="../images/GMC_Delete_Vol_multiple_success.jpg" alt="Delete Multiple Volumes" /></p>
+<li>Click <b>OK</b>.
+</ol>
+
+</body>
+</html>
\ No newline at end of file diff --git a/src/com.gluster.storage.management.console.help/html/tasks/deploy_gmc_dedicated_host.html b/src/org.gluster.storage.management.console.help/html/tasks/deploy_gmc_dedicated_host.html index 688fa54d..688fa54d 100644 --- a/src/com.gluster.storage.management.console.help/html/tasks/deploy_gmc_dedicated_host.html +++ b/src/org.gluster.storage.management.console.help/html/tasks/deploy_gmc_dedicated_host.html diff --git a/src/com.gluster.storage.management.console.help/html/tasks/display_log.html b/src/org.gluster.storage.management.console.help/html/tasks/display_log.html index 3bf88f41..4575fd18 100644 --- a/src/com.gluster.storage.management.console.help/html/tasks/display_log.html +++ b/src/org.gluster.storage.management.console.help/html/tasks/display_log.html @@ -13,14 +13,13 @@ type="text/css" media="screen" /> You can download the log file of your resource based on search criteria such as warning,error, alerts, and so on. <p>To display log based on a search criteria, perform the following steps.</p> <ol> -<li>Choose Volumes and click the <b>Volume Logs</b> tab. -<li>Select the volume for which you want to display the logs. +<li>Select the volume for which you want to display the log and click the <b>Volume Logs</b> tab. <li>In the <b>Scan Last</b> field, type the number of messages to scan. <li>Select All or select bricks from <b>Filter on Bricks</b> drop down list. -<li>Select the From date, Time, and To date and click <b>Go</b>. -<li>Select the search criteria by typing the criteria in the <b>Filter String</b> field. -<p>For example, in the window below the search criteria chosen is Warning. Hence, all the warning messages are displayed.<p> +<li>Select the <b>From date</b>, <b>Time</b>, and <b>To date</b> and click <b>Fetch Logs</b>. +<p>The volume log messages for the selected criteria is displayed</p> <p><img src="../images/GMC_1.0_Display_log_criteria.jpg" alt="Volume Logs with Warning Search Criteria" /></p> +<p>The logs fetched from the servers can be filtered further by typing a value in the <b>Filter String</b> field. </ol> </body> </html> diff --git a/src/com.gluster.storage.management.console.help/html/tasks/download_log.html b/src/org.gluster.storage.management.console.help/html/tasks/download_log.html index d647cfd8..4d36b0c4 100644 --- a/src/com.gluster.storage.management.console.help/html/tasks/download_log.html +++ b/src/org.gluster.storage.management.console.help/html/tasks/download_log.html @@ -13,10 +13,11 @@ type="text/css" media="screen" /> <p>You can download the server logs to your local machine to analyze and archive, as required.</p> <p>To download logs, perform the following steps.</p> <ol> +<li>Select the volume for which you want to download the logs <li>From the Gluster menu or toolbar, select <b>Download Logs</b>. <li>A window is displayed allowing you to choose the download location on your machine. <li>Choose the location, and click <b>Save</b>. -<p>The logs for the selected volume are downloaded to the location you specified in a .tar.gz file format.</p> +<p>The logs for the selected volume are downloaded to the location you specified in a <FONT FACE = "Courier">.tar.gz</FONT> file format.</p> </ol> </body> </html>
\ No newline at end of file diff --git a/src/com.gluster.storage.management.console.help/html/tasks/initialize_disk.html b/src/org.gluster.storage.management.console.help/html/tasks/initialize_disk.html index d50e4a9f..d50e4a9f 100644 --- a/src/com.gluster.storage.management.console.help/html/tasks/initialize_disk.html +++ b/src/org.gluster.storage.management.console.help/html/tasks/initialize_disk.html diff --git a/src/com.gluster.storage.management.console.help/html/tasks/logging.html b/src/org.gluster.storage.management.console.help/html/tasks/logging.html index e936e7ed..e936e7ed 100644 --- a/src/com.gluster.storage.management.console.help/html/tasks/logging.html +++ b/src/org.gluster.storage.management.console.help/html/tasks/logging.html diff --git a/src/com.gluster.storage.management.console.help/html/tasks/maintopic (3).html b/src/org.gluster.storage.management.console.help/html/tasks/maintopic (3).html index dccb80ab..dccb80ab 100644 --- a/src/com.gluster.storage.management.console.help/html/tasks/maintopic (3).html +++ b/src/org.gluster.storage.management.console.help/html/tasks/maintopic (3).html diff --git a/src/com.gluster.storage.management.console.help/html/tasks/maintopic.html b/src/org.gluster.storage.management.console.help/html/tasks/maintopic.html index dccb80ab..dccb80ab 100644 --- a/src/com.gluster.storage.management.console.help/html/tasks/maintopic.html +++ b/src/org.gluster.storage.management.console.help/html/tasks/maintopic.html diff --git a/src/com.gluster.storage.management.console.help/html/tasks/migrate_brick.html b/src/org.gluster.storage.management.console.help/html/tasks/migrate_brick.html index c705e783..b5202f25 100644 --- a/src/com.gluster.storage.management.console.help/html/tasks/migrate_brick.html +++ b/src/org.gluster.storage.management.console.help/html/tasks/migrate_brick.html @@ -10,19 +10,20 @@ type="text/css" media="screen" /> <body> <h1>Migrating Bricks</h1> -<p>You can migrate the data from one brick to another, as needed, while the volume is online and available.You can migrate disks, that is, move data from one disk to another within your cluster. You might want to do this, for example, when upgrading a disk to another with a larger capacity.</p> -<p>When migrating a disk, the Gluster Management Console allows you to select both the source and destination bricks. After initiating a disk migration, the <b>Task</b> tab displays the status of the migration, and allows you to cancel the migration, if necessary.</p> +<p>You can migrate the data from one brick to another, as needed, while the cluster is online and available.
+You can migrate bricks, that is, move data from one brick to another within your cluster. You might want to do this, for example, when upgrading a disk to another with a larger capacity.
+</p> +<p>When migrating a disk, the Gluster Management Console allows you to select both the source and destination bricks. After initiating a disk migration, the <b>Task</b> tab displays the status of the migration. You can stop, pause, resume, or commit the migration by selecting the appropriate icon from the toolbar.</p> <p>To migrate volume data from one brick to another, perform the following steps.</p> <ol> -<li>Select <b>Migrate Bricks</b> by choosing from the menu, toolbar, or right click and select the volume. +<li>Select <b>Migrate Bricks</b> by choosing from the menu, toolbar, or right click when you select the volume. <p>The <b>Migrate Brick</b> window is displayed.</p> <p><img src="../images/GMC_Migrate_Brick.jpg" alt="Migrate Brick"/> -<li>Type the source volume in the <b>From Disk</b> field. -<li>Type the destination volume in the <b>To Disk</b> field. +<li>Select the source brick from the <b>From Brick</b> table. +<li>Select the destination brick from the <b>To Brick</b> table. <li>Click <b>Finish</b>. The Brick Migration window appears indicating that the brick was successfully migrated. <p><img src="../images/GMC_Migrate_Brick_success.jpg" alt="Migrate Brick Success"/> -<li>The <b>Volumes</b> tab displays the migration status of the volume (updated automatically every few minutes). -<li>In the <b>Task</b> tab, click <b>Cancel</b> to cancel the volume migration or click Pause to pause the process, if required. +<li>The <b>Tasks</b> tab displays the migration status (updated periodically). </ol> </body> diff --git a/src/com.gluster.storage.management.console.help/html/tasks/rebalance_vol.html b/src/org.gluster.storage.management.console.help/html/tasks/rebalance_vol.html index 57d85404..63bf3050 100644 --- a/src/com.gluster.storage.management.console.help/html/tasks/rebalance_vol.html +++ b/src/org.gluster.storage.management.console.help/html/tasks/rebalance_vol.html @@ -14,11 +14,11 @@ You can rebalance a volume, as required. After adding bricks, you need to rebala <p>To rebalance a volume, perform the following steps:</p>
<ol>
<li>Choose from the menu, toolbar, or right click to select the volume. Select <b>Rebalance Volume</b>.
-<p>The <b>Rebalance Volume</b> window appears indicating that the volume rebalance was successfully started.</p>
+<p>The <b>Rebalance Volume</b> window is displayed indicating that the volume rebalance is successfully started.</p>
<p><img src="../images/GMC_rebalance_vol.jpg" alt="Rebalance Volume" /></p>
<li>Click <b>OK</b>.
<li>Select the cluster from the left pane and choose the <b>Task</b> tab to check the volume rebalance status.
-<li>If you wish to temporarily stop the rebalance process, click <b>Pause</b> from the menu bar. Click <b>Resume</b>, to continue and complete the process.
+<li>If you wish to stop rebalance of a volume, click <b>Stop</b> from the menu bar.
</ol>
</body>
</html>
\ No newline at end of file diff --git a/src/com.gluster.storage.management.console.help/html/tasks/register_cluster.html b/src/org.gluster.storage.management.console.help/html/tasks/register_cluster.html index 2265a961..ef1c66bd 100644 --- a/src/com.gluster.storage.management.console.help/html/tasks/register_cluster.html +++ b/src/org.gluster.storage.management.console.help/html/tasks/register_cluster.html @@ -9,19 +9,15 @@ type="text/css" media="screen" /> </head>
<body>
-<h1>Register Cluster</h1>
+<h1>Registering a Cluster</h1>
To register a cluster, perform the following steps.
<ol>
- <li>Open your web browser.
- <li>Type the following URL in your web browser:</li>
- <p><FONT FACE = "Courier">http://server-name:webserver-port/glustermg/gluster-management-console.jnlp</FONT></p>
- <p><b>Gluster Management Console</b> login window is displayed.</p>
- <p><img src="../images/GMC_Login_Window.jpg" alt="Login Window" />
- <li>Type the user name and password in the login window and click<b>Login</b>.
+ <li>Launch the application and log in with a valid password.
<p><b>Select Cluster</b> window is displayed.</p>
<p><img src="../images/GMC_Register_Cluster.jpg" alt="Register Cluster" />
<li>Select <b>Register</b>. Type the name of the cluster and server name in the respective fields.
- <li>Click <b>OK</b>. The Gluster Management Console window is displayed with the newly registered cluster
+ <p>Note: Ensure that you type an online server name in the <b>Server Name</b> field.</p>
+ <li>Click <b>OK</b>. The Gluster Management Console will register the cluster with the gateway; fetch all the management information such as servers, volume resources and display them in the console.
</ol>
</body>
</html>
\ No newline at end of file diff --git a/src/org.gluster.storage.management.console.help/html/tasks/remove_brick.html b/src/org.gluster.storage.management.console.help/html/tasks/remove_brick.html new file mode 100644 index 00000000..fbbfb89e --- /dev/null +++ b/src/org.gluster.storage.management.console.help/html/tasks/remove_brick.html @@ -0,0 +1,38 @@ +<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
+
+<html>
+<head>
+<link rel="stylesheet" href="../css/builder-gluster/style.css"
+type="text/css" media="screen" />
+<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
+<title>Sub Topic</title>
+</head>
+
+<body>
+<h1>Removing Bricks</h1>
+You can shrink volumes, as needed, while the cluster is online and
+available. For example, you might need to remove a brick that has become
+inaccessible in a distributed volume due to hardware or network failure.
+
+<p>To remove bricks from an existing volume, perform the following
+steps.</p>
+<ol>
+ <li>Choose from the menu, toolbar, or right click and select the
+ Volume and select <b>Remove Bricks</b>.
+ <li>If the volume is currently running, you are asked to confirm
+ before deleting a brick.
+ <p><img src="../images/GMC_1.0_Remove_Bricks.jpg" alt="Remove Brick" /></p>
+ <li>If you wish to remove the brick permanently, click <b>Remove
+ Bricks, Delete Data</b>.
+ <li>If you wish to keep the data but remove the brick, click <b>Remove
+ Bricks, Keep Data</b>.
+ <p>The selected bricks directories will be renamed to <FONT FACE = "Courier"><olddirectory>_<timestamp></FONT>.
+ <li> The <b>Remove Brick from Volume</b> window is displayed indicating that the
+ volume was deleted successfully.
+ <p><img src="../images/GMC_1.0_Remove_Bricks_success.jpg" alt="Remove Brick" /></p>
+ <li>Click <b>OK</b>.
+</ol>
+
+
+</body>
+</html>
\ No newline at end of file diff --git a/src/org.gluster.storage.management.console.help/html/tasks/remove_server.html b/src/org.gluster.storage.management.console.help/html/tasks/remove_server.html new file mode 100644 index 00000000..d432143d --- /dev/null +++ b/src/org.gluster.storage.management.console.help/html/tasks/remove_server.html @@ -0,0 +1,27 @@ +<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
+
+<html>
+<head>
+<link rel="stylesheet" href="../css/builder-gluster/style.css"
+type="text/css" media="screen" />
+<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
+<title>Sub Topic</title>
+</head>
+
+<body>
+<h1>Removing Servers from a Cluster</h1>
+You can remove the server, as required.
+<p>To remove a server, perform the following steps:</p>
+<ol>
+<li>Choose from the menu, toolbar, or right click on the selected
+ server and select <b>Remove Server</b>.
+<p>You can also choose multiple servers or select <b>All</b> from the <b>Servers</b> tab and select <b>Remove Sever</b></p>
+<p><img src="../images/GMC_Server_Tab.jpg" alt="Remove Server Confirmation" />
+<p>You are asked to confirm before removing a server.
+<p><img src="../images/GMC_1.0_Remove_Server_1.jpg" alt="Remove Server Confirmation" />
+<li>Click <b>Yes</b>. The console displays the following window to indicate that the server was successfully removed.
+<p><img src="../images/GMC_1.0_Remove_Server.jpg" alt="Remove Server Confirmation" />
+<li>Click <b>OK</b>. The removed server is listed under <b>Discovered Server</b> node.
+</ol>
+</body>
+</html>
\ No newline at end of file diff --git a/src/com.gluster.storage.management.console.help/html/tasks/select_cluster.html b/src/org.gluster.storage.management.console.help/html/tasks/select_cluster.html index d8aea996..a3dc9466 100644 --- a/src/com.gluster.storage.management.console.help/html/tasks/select_cluster.html +++ b/src/org.gluster.storage.management.console.help/html/tasks/select_cluster.html @@ -9,23 +9,18 @@ type="text/css" media="screen" /> </head>
<body>
-<h1>Select Cluster</h1>
+<h1>Selecting a Cluster</h1>
+<p>The select cluster option is enabled after you create or register a cluster.</p>
To select a cluster, perform the following steps.
<ol>
- <li>Open your web browser.
- <li>Type the following URL in your web browser:</li>
- <p><FONT FACE = "Courier">http://server-name:webserver-port/glustermg/gluster-management-console.jnlp</FONT></p>
- <p><b>Gluster Management Console</b> login window is displayed.</p>
- <p><img src="../images/GMC_Login_Window.jpg" alt="Login Window" />
- <li>Type the user name and password in the login window and click
- <b>Login</b>.
+ <li>Launch the application and log in with a valid password.
<p><b>Select Cluster</b> window is displayed.</p>
<p><img src="../images/GMC_Select_Cluster.jpg" alt="Select Cluster" />
<li>Select the cluster name from the <b>Cluster
Name</b> drop down list.
- <li>Click <b>OK</b>.The <b>Progress Information</b> window is displayed.
+ <li>Click <b>OK</b>.The <b>Progress Information</b> window is displayed is displayed while the console fetches the management information for the selected cluster.
<p><img src="../images/GMC_Select_Cluster_progess.jpg" alt="Select Cluster Progress Information" />
- <li>The Gluster Management Console window displays the selected cluster.
+ <li>The <b>Gluster Management Console</b> window displays the selected cluster.
</ol>
</body>
</html>
\ No newline at end of file diff --git a/src/com.gluster.storage.management.console.help/html/tasks/start_vol.html b/src/org.gluster.storage.management.console.help/html/tasks/start_vol.html index 97f6789e..4b3e76d6 100644 --- a/src/com.gluster.storage.management.console.help/html/tasks/start_vol.html +++ b/src/org.gluster.storage.management.console.help/html/tasks/start_vol.html @@ -15,13 +15,11 @@ You can start a volume or multiple volumes that are currently stopped. <ol> <li>Choose from the menu, toolbar, or right click and select the volume and select <b>Start Volume</b>. - <p>Alternatively, you can select the Volume node and from the right - pane select the volumes that you need to start or click <b>All</b> to select - all volumes. - <li>The Create Volume window appears indicating that the volume + <p>Alternatively, from the left pane you can choose the <b>Volumes</b> node and select the volumes that you need to start in <b>Volumes</b> tab or click <b>All</b> to select all volumes and select <b>Start Volume</b>. + <li>The <b>Start Volume</b> window appears indicating that the volume (or volumes) were successfully started. <p><img src="../images/GMC_start_vol_success.jpg" alt="Volume started Successfuly" /></p> - <p>If you have selected multiple volumes, the Start Volume window appears indicating the volumes were started successfully.</p> + <p>If you have selected multiple volumes, the <b>Start Volume</b> window appears indicating the volumes were started successfully.</p> <p><img src="../images/GMC_start_vol_Multiple.jpg" alt="Multiple Volumes Started Successfuly" /></p> <li>Click <b>OK</b>. </ol> diff --git a/src/com.gluster.storage.management.console.help/html/tasks/starting_gmc.html b/src/org.gluster.storage.management.console.help/html/tasks/starting_gmc.html index 933e72ed..933e72ed 100644 --- a/src/com.gluster.storage.management.console.help/html/tasks/starting_gmc.html +++ b/src/org.gluster.storage.management.console.help/html/tasks/starting_gmc.html diff --git a/src/com.gluster.storage.management.console.help/html/tasks/stop_vol.html b/src/org.gluster.storage.management.console.help/html/tasks/stop_vol.html index 091b73e7..c97d1d91 100644 --- a/src/com.gluster.storage.management.console.help/html/tasks/stop_vol.html +++ b/src/org.gluster.storage.management.console.help/html/tasks/stop_vol.html @@ -10,18 +10,17 @@ type="text/css" media="screen" /> <body> <h1>Stopping Volumes</h1> -You can stop volumes, as needed, while the server is online and available. For example, you might need to remove a brick that has become inaccessible in a distributed volume due to hardware or network failure. <p> To stop a volume, perform the following steps:</p> <ol> - <li>Choose from the menu, toolbar, or right click to select the volume. Select Stop Volume. - <p>If the volume is currently running, you are asked to confirm before stopping a volume.</p> + <li>Choose from the menu, toolbar, or right click to select the volume. Select <b>Stop Volume</b>. + <p>You are asked to confirm before stopping a volume.</p> <p><img src="../images/Stop_Vol.jpg" alt="Stop Volume"/></p> - <li>Select Yes to stop the Volume. - <p>The Stop Volume window appears indicating that the volume was successfully stopped.</p> + <li>Click <b>Yes</b> to stop the Volume. + <p>The <b>Stop Volume</b> window appears indicating that the volume was successfully stopped.</p> <p><img src="../images/Stop_Vol_confirm.jpg" alt="Stop Volume"/></p> - <p>If you have selected multiple volumes, the Stop Volume window appears indicating the volumes were stopped successfully.</p> + <p>If you have selected multiple volumes, the <b>Stop Volume</b> window appears indicating the volumes were stopped successfully.</p> <p><img src="../images/Stop_Vol_multiple_confirm.jpg" alt="Stop Multiple Volumes"/></p> - <li> Click OK. + <li> Click <b>OK</b>. </ol> </body> </html>
\ No newline at end of file diff --git a/src/com.gluster.storage.management.console.help/html/tasks/subtopic.html b/src/org.gluster.storage.management.console.help/html/tasks/subtopic.html index 6dccc35e..6dccc35e 100644 --- a/src/com.gluster.storage.management.console.help/html/tasks/subtopic.html +++ b/src/org.gluster.storage.management.console.help/html/tasks/subtopic.html diff --git a/src/com.gluster.storage.management.console.help/html/tasks/subtopic2 (3).html b/src/org.gluster.storage.management.console.help/html/tasks/subtopic2 (3).html index 5ece5749..5ece5749 100644 --- a/src/com.gluster.storage.management.console.help/html/tasks/subtopic2 (3).html +++ b/src/org.gluster.storage.management.console.help/html/tasks/subtopic2 (3).html diff --git a/src/com.gluster.storage.management.console.help/html/tasks/subtopic2.html b/src/org.gluster.storage.management.console.help/html/tasks/subtopic2.html index 5ece5749..5ece5749 100644 --- a/src/com.gluster.storage.management.console.help/html/tasks/subtopic2.html +++ b/src/org.gluster.storage.management.console.help/html/tasks/subtopic2.html diff --git a/src/com.gluster.storage.management.console.help/html/tasks/subtopic3.html b/src/org.gluster.storage.management.console.help/html/tasks/subtopic3.html index 6dccc35e..6dccc35e 100644 --- a/src/com.gluster.storage.management.console.help/html/tasks/subtopic3.html +++ b/src/org.gluster.storage.management.console.help/html/tasks/subtopic3.html diff --git a/src/com.gluster.storage.management.console.help/html/tasks/subtopic4.html b/src/org.gluster.storage.management.console.help/html/tasks/subtopic4.html index 6dccc35e..6dccc35e 100644 --- a/src/com.gluster.storage.management.console.help/html/tasks/subtopic4.html +++ b/src/org.gluster.storage.management.console.help/html/tasks/subtopic4.html diff --git a/src/com.gluster.storage.management.console.help/html/tasks/subtopic5.html b/src/org.gluster.storage.management.console.help/html/tasks/subtopic5.html index 6dccc35e..6dccc35e 100644 --- a/src/com.gluster.storage.management.console.help/html/tasks/subtopic5.html +++ b/src/org.gluster.storage.management.console.help/html/tasks/subtopic5.html diff --git a/src/com.gluster.storage.management.console.help/html/tasks/subtopic6.html b/src/org.gluster.storage.management.console.help/html/tasks/subtopic6.html index 6dccc35e..6dccc35e 100644 --- a/src/com.gluster.storage.management.console.help/html/tasks/subtopic6.html +++ b/src/org.gluster.storage.management.console.help/html/tasks/subtopic6.html diff --git a/src/com.gluster.storage.management.console.help/html/tasks/tune_vol_opt.html b/src/org.gluster.storage.management.console.help/html/tasks/tune_vol_opt.html index a659017d..b9dc0e72 100644 --- a/src/com.gluster.storage.management.console.help/html/tasks/tune_vol_opt.html +++ b/src/org.gluster.storage.management.console.help/html/tasks/tune_vol_opt.html @@ -10,15 +10,13 @@ type="text/css" media="screen" /> <body>
<h1>Tuning Volume Options</h1>
-You can set volume options, as needed, while the cluster is online and
-available.
<p>To tune volume options, perform the following steps.</p>
<ol>
- <li>Select the volume that you need to add Volume Options.
- <li>Click the Volume Options tab.
+ <li>Select the volume for which you need to tune volume options.
+ <li>Click the <b>Volume Options</b> tab.
<p><img src="../images/GMC_Volume_Options.jpg" alt="Volume Options"/></p>
- <li>Click Add. Choose the volume options from the drop down list
- and enter the Options value.
+ <li>Click <b>Add</b>. Choose the volume option from <b>Option Key</b> drop down list and type the value in the <b>Option Value</b> field.
+ <p>You can edit the value of an existing option by selecting the <b>Option Value</b> field.</p>
</ol>
<p>To read more about the volume options, refer to the <A HREF="http://www.gluster.com/community/documentation/index.php/Gluster_3.2:_Tuning_Volume_Options" TARGET="_blank">Gluster
Filesystem Administration Guide, Section 8.1 Tuning Volume Options</A>.
diff --git a/src/com.gluster.storage.management.console.help/html/tasks/volumes.html b/src/org.gluster.storage.management.console.help/html/tasks/volumes.html index 84532085..84532085 100644 --- a/src/com.gluster.storage.management.console.help/html/tasks/volumes.html +++ b/src/org.gluster.storage.management.console.help/html/tasks/volumes.html diff --git a/src/com.gluster.storage.management.console.help/html/toc.html b/src/org.gluster.storage.management.console.help/html/toc.html index 83401387..83401387 100644 --- a/src/com.gluster.storage.management.console.help/html/toc.html +++ b/src/org.gluster.storage.management.console.help/html/toc.html diff --git a/src/org.gluster.storage.management.console.help/plugin.xml b/src/org.gluster.storage.management.console.help/plugin.xml new file mode 100644 index 00000000..7bee4143 --- /dev/null +++ b/src/org.gluster.storage.management.console.help/plugin.xml @@ -0,0 +1,45 @@ +<?xml version="1.0" encoding="UTF-8"?> +<?eclipse version="3.4"?> +<!-- + Copyright (c) 2006-2011 Gluster, Inc. <http://www.gluster.com> + This file is part of Gluster Management Console. + + Gluster Management Console is free software; you can redistribute + it and/or modify it under the terms of the GNU General Public + License as published by the Free Software Foundation; either + version 3 of the License, or (at your option) any later version. + + Gluster Management Console is distributed in the hope that it + will be useful, but WITHOUT ANY WARRANTY; without even the + implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR + PURPOSE. See the GNU General Public License for more details. + + You should have received a copy of the GNU General Public License + along with this program. If not, see + <http://www.gnu.org/licenses/>. + --> + +<plugin> + + <extension + point="org.eclipse.help.toc"> + <toc + file="toc.xml" + primary="true"> + </toc> + <toc + file="tocconcepts.xml"> + </toc> + <toc + file="tocgettingstarted.xml"> + </toc> + <toc + file="tocreference.xml"> + </toc> + <toc + file="toctasks.xml" + primary="true"> + </toc> + </extension> + +</plugin> diff --git a/src/org.gluster.storage.management.console.help/toc.xml b/src/org.gluster.storage.management.console.help/toc.xml new file mode 100644 index 00000000..29f2b401 --- /dev/null +++ b/src/org.gluster.storage.management.console.help/toc.xml @@ -0,0 +1,32 @@ +<?xml version="1.0" encoding="UTF-8"?> +<?NLS TYPE="org.eclipse.help.toc"?> +<!-- + Copyright (c) 2006-2011 Gluster, Inc. <http://www.gluster.com> + This file is part of Gluster Management Console. + + Gluster Management Console is free software; you can redistribute + it and/or modify it under the terms of the GNU General Public + License as published by the Free Software Foundation; either + version 3 of the License, or (at your option) any later version. + + Gluster Management Console is distributed in the hope that it + will be useful, but WITHOUT ANY WARRANTY; without even the + implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR + PURPOSE. See the GNU General Public License for more details. + + You should have received a copy of the GNU General Public License + along with this program. If not, see + <http://www.gnu.org/licenses/>. + --> + +<toc label="Gluster Management Console - Help" topic="html/toc.html"> + <topic label="Concepts"> + <anchor id="concepts"/> + </topic> + <topic label="Getting Started"> + <anchor id="gettingstarted"/> + </topic> + <topic label="Tasks"> + <anchor id="tasks"/> + </topic> +</toc> diff --git a/src/org.gluster.storage.management.console.help/tocconcepts.xml b/src/org.gluster.storage.management.console.help/tocconcepts.xml new file mode 100644 index 00000000..cfb51e56 --- /dev/null +++ b/src/org.gluster.storage.management.console.help/tocconcepts.xml @@ -0,0 +1,30 @@ +<?xml version="1.0" encoding="UTF-8"?> +<?NLS TYPE="org.eclipse.help.toc"?> +<!-- + Copyright (c) 2006-2011 Gluster, Inc. <http://www.gluster.com> + This file is part of Gluster Management Console. + + Gluster Management Console is free software; you can redistribute + it and/or modify it under the terms of the GNU General Public + License as published by the Free Software Foundation; either + version 3 of the License, or (at your option) any later version. + + Gluster Management Console is distributed in the hope that it + will be useful, but WITHOUT ANY WARRANTY; without even the + implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR + PURPOSE. See the GNU General Public License for more details. + + You should have received a copy of the GNU General Public License + along with this program. If not, see + <http://www.gnu.org/licenses/>. + --> + +<toc label="Concepts" link_to="toc.xml#concepts"> + <topic label="Gluster FileSystem" href="html/concepts/gluster_fs.html"> + <topic label="Common Cluster Terminologies" href="html/concepts/common_terms.html" /> + </topic> + <topic href="html/concepts/about_gmg.html" label="About Gluster Management Gateway"> + </topic> + <topic label="About Gluster Management Console" href="html/concepts/about_gmc.html"> + </topic> +</toc> diff --git a/src/com.gluster.storage.management.console.help/tocgettingstarted.xml b/src/org.gluster.storage.management.console.help/tocgettingstarted.xml index 7ebe8526..afeae4c8 100644 --- a/src/com.gluster.storage.management.console.help/tocgettingstarted.xml +++ b/src/org.gluster.storage.management.console.help/tocgettingstarted.xml @@ -1,15 +1,25 @@ <?xml version="1.0" encoding="UTF-8"?> <?NLS TYPE="org.eclipse.help.toc"?> +<!-- + Copyright (c) 2006-2011 Gluster, Inc. <http://www.gluster.com> + This file is part of Gluster Management Console. + + Gluster Management Console is free software; you can redistribute + it and/or modify it under the terms of the GNU General Public + License as published by the Free Software Foundation; either + version 3 of the License, or (at your option) any later version. + + Gluster Management Console is distributed in the hope that it + will be useful, but WITHOUT ANY WARRANTY; without even the + implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR + PURPOSE. See the GNU General Public License for more details. + + You should have received a copy of the GNU General Public License + along with this program. If not, see + <http://www.gnu.org/licenses/>. + --> <toc label="Getting Started" link_to="toc.xml#gettingstarted"> - <topic label="Preparing to Install Gluster Management Gateway"> - <topic href="html/gettingstarted/check_req_gmg.html" label="Checking the Gluster Management Gateway Minimum Requirements"> - </topic> - <topic href="html/gettingstarted/install_gmg.html" label="Installing the Gluster Management Gateway"> - </topic> - <topic href="html/gettingstarted/install_gmg_backend.html" label="Installing Gluster Management Gateway Backend Packages"> - </topic> - </topic> <topic label="Setting up the Gluster Management Console"> <topic href="html/gettingstarted/check_req_client.html" label="Checking the Minimum Requirements on the Client Machine"> </topic> @@ -17,6 +27,12 @@ </topic> </topic> <topic href="html/gettingstarted/explore_gmc.html" label="Exploring Gluster Management Console"> + <topic href="html/gettingstarted/gmc_toolbar.html" label="Gluster Management Console Toolbar"> + </topic> + <topic href="html/gettingstarted/tasks.html" label="Tasks"> + </topic> + <topic href="html/gettingstarted/gmc_terminal_window.html" label="Terminal"> + </topic> <topic href="html/gettingstarted/monitor_resources.html" label="Monitoring Cluster Resources"> </topic> <topic href="html/gettingstarted/alerts.html" label="Alerts"> @@ -25,8 +41,6 @@ </topic> <topic href="html/gettingstarted/security_keys.html" label="Security Keys"> </topic> - <topic href="html/gettingstarted/change_password.html" label="Changing Administrator’s Password"> - </topic> <topic href="html/gettingstarted/resetting_pwd.html" label="Resetting the Password"> </topic> <topic href="html/gettingstarted/cifs_service.html" label="CIFS Services"> diff --git a/src/org.gluster.storage.management.console.help/tocreference.xml b/src/org.gluster.storage.management.console.help/tocreference.xml new file mode 100644 index 00000000..01363023 --- /dev/null +++ b/src/org.gluster.storage.management.console.help/tocreference.xml @@ -0,0 +1,29 @@ +<?xml version="1.0" encoding="UTF-8"?> +<?NLS TYPE="org.eclipse.help.toc"?> +<!-- + Copyright (c) 2006-2011 Gluster, Inc. <http://www.gluster.com> + This file is part of Gluster Management Console. + + Gluster Management Console is free software; you can redistribute + it and/or modify it under the terms of the GNU General Public + License as published by the Free Software Foundation; either + version 3 of the License, or (at your option) any later version. + + Gluster Management Console is distributed in the hope that it + will be useful, but WITHOUT ANY WARRANTY; without even the + implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR + PURPOSE. See the GNU General Public License for more details. + + You should have received a copy of the GNU General Public License + along with this program. If not, see + <http://www.gnu.org/licenses/>. + --> + +<toc label="Reference" link_to="toc.xml#reference"> + <topic label="Main Topic" href="html/reference/maintopic.html"> + <topic label="Sub Topic" href="html/reference/subtopic.html" /> + </topic> + <topic label="Main Topic 2"> + <topic label="Sub Topic 2" href="html/reference/subtopic2.html" /> + </topic> +</toc> diff --git a/src/com.gluster.storage.management.console.help/toctasks.xml b/src/org.gluster.storage.management.console.help/toctasks.xml index bfc723b0..3ae97388 100644 --- a/src/com.gluster.storage.management.console.help/toctasks.xml +++ b/src/org.gluster.storage.management.console.help/toctasks.xml @@ -1,18 +1,36 @@ <?xml version="1.0" encoding="UTF-8"?> <?NLS TYPE="org.eclipse.help.toc"?> +<!-- + Copyright (c) 2006-2011 Gluster, Inc. <http://www.gluster.com> + This file is part of Gluster Management Console. + + Gluster Management Console is free software; you can redistribute + it and/or modify it under the terms of the GNU General Public + License as published by the Free Software Foundation; either + version 3 of the License, or (at your option) any later version. + + Gluster Management Console is distributed in the hope that it + will be useful, but WITHOUT ANY WARRANTY; without even the + implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR + PURPOSE. See the GNU General Public License for more details. + + You should have received a copy of the GNU General Public License + along with this program. If not, see + <http://www.gnu.org/licenses/>. + --> <toc label="Tasks" link_to="toc.xml#tasks"> <topic label="Cluster"> - <topic href="html/tasks/create_cluster.html" label="Create Cluster"> + <topic href="html/tasks/create_cluster.html" label="Creating a Cluster"> </topic> - <topic href="html/tasks/select_cluster.html" label="Select Cluster"> + <topic href="html/tasks/select_cluster.html" label="Selecting a Cluster"> </topic> - <topic href="html/tasks/register_cluster.html" label="Register Cluster"> + <topic href="html/tasks/register_cluster.html" label="Registering a Cluster"> </topic> </topic> <topic label="Server"> - <topic label="Adding Servers" href="html/tasks/add_servers.html" /> - <topic href="html/tasks/remove_server.html" label="Removing Servers"> + <topic label="Adding Servers to a Cluster" href="html/tasks/add_servers.html" /> + <topic href="html/tasks/remove_server.html" label="Removing Servers from a Cluster"> </topic> <topic href="html/tasks/initialize_disk.html" label="Initializing a Disk"/> </topic> @@ -28,7 +46,7 @@ <topic href="html/tasks/delete_volume.html" label="Deleting Volumes"> </topic> <topic label="Adding Bricks" href="html/tasks/add_brick.html" /> - <topic href="html/tasks/delete_brick.html" label="Removing Bricks"> + <topic href="html/tasks/remove_brick.html" label="Removing Bricks"> </topic> <topic href="html/tasks/migrate_brick.html" label="Migrating Bricks"> </topic> diff --git a/src/com.gluster.storage.management.console/.classpath b/src/org.gluster.storage.management.console/.classpath index ad32c83a..ad32c83a 100644 --- a/src/com.gluster.storage.management.console/.classpath +++ b/src/org.gluster.storage.management.console/.classpath diff --git a/src/com.gluster.storage.management.client/.project b/src/org.gluster.storage.management.console/.project index 647c8a91..dff371c7 100644 --- a/src/com.gluster.storage.management.client/.project +++ b/src/org.gluster.storage.management.console/.project @@ -1,6 +1,6 @@ <?xml version="1.0" encoding="UTF-8"?> <projectDescription> - <name>com.gluster.storage.management.client</name> + <name>org.gluster.storage.management.console</name> <comment></comment> <projects> </projects> @@ -20,9 +20,15 @@ <arguments> </arguments> </buildCommand> + <buildCommand> + <name>com.instantiations.assist.eclipse.coverage.instrumentationBuilder</name> + <arguments> + </arguments> + </buildCommand> </buildSpec> <natures> <nature>org.eclipse.pde.PluginNature</nature> <nature>org.eclipse.jdt.core.javanature</nature> + <nature>com.instantiations.assist.eclipse.coverage.codeCoverageNature</nature> </natures> </projectDescription> diff --git a/src/com.gluster.storage.management.console/.settings/org.eclipse.jdt.core.prefs b/src/org.gluster.storage.management.console/.settings/org.eclipse.jdt.core.prefs index abf7cf5a..abf7cf5a 100644 --- a/src/com.gluster.storage.management.console/.settings/org.eclipse.jdt.core.prefs +++ b/src/org.gluster.storage.management.console/.settings/org.eclipse.jdt.core.prefs diff --git a/src/com.gluster.storage.management.console/META-INF/MANIFEST.MF b/src/org.gluster.storage.management.console/META-INF/MANIFEST.MF index 4194aae3..fb2576f9 100644 --- a/src/com.gluster.storage.management.console/META-INF/MANIFEST.MF +++ b/src/org.gluster.storage.management.console/META-INF/MANIFEST.MF @@ -1,16 +1,16 @@ Manifest-Version: 1.0 Bundle-ManifestVersion: 2 Bundle-Name: glustersp-gui -Bundle-SymbolicName: com.gluster.storage.management.console;singleton:=true -Bundle-Version: 1.0.0 -Bundle-Activator: com.gluster.storage.management.console.Activator +Bundle-SymbolicName: org.gluster.storage.management.console;singleton:=true +Bundle-Version: 1.0.0.qualifier +Bundle-Activator: org.gluster.storage.management.console.Activator Bundle-Vendor: Gluster Require-Bundle: org.eclipse.ui;bundle-version="3.6.1", org.eclipse.core.runtime;bundle-version="3.6.0", org.eclipse.ui.forms;bundle-version="3.5.2", org.eclipse.rcp;bundle-version="3.6.0", - com.gluster.storage.management.core;bundle-version="1.0.0", - com.gluster.storage.management.client;bundle-version="1.0.0", + org.gluster.storage.management.core;bundle-version="1.0.0", + org.gluster.storage.management.client;bundle-version="1.0.0", org.eclipse.core.databinding;bundle-version="1.3.100", org.eclipse.jface.databinding;bundle-version="1.4.0", org.eclipse.core.databinding.property;bundle-version="1.3.0", @@ -23,7 +23,7 @@ Require-Bundle: org.eclipse.ui;bundle-version="3.6.1", com.richclientgui.rcptoolbox;bundle-version="1.0.5", org.eclipse.core.resources, org.apache.commons.lang;bundle-version="2.3.0", - com.gluster.storage.management.console.help;bundle-version="1.0.0", + org.gluster.storage.management.console.help;bundle-version="1.0.0", org.eclipse.tm.terminal;bundle-version="3.1.0", org.eclipse.tm.terminal.ssh;bundle-version="2.1.0", org.eclipse.tm.terminal.view;bundle-version="2.2.0" diff --git a/src/org.gluster.storage.management.console/buckminster.cspex b/src/org.gluster.storage.management.console/buckminster.cspex new file mode 100644 index 00000000..88e2c953 --- /dev/null +++ b/src/org.gluster.storage.management.console/buckminster.cspex @@ -0,0 +1,30 @@ +<?xml version="1.0" encoding="UTF-8"?> +<!-- + Copyright (c) 2006-2011 Gluster, Inc. <http://www.gluster.com> + This file is part of Gluster Management Console. + + Gluster Management Console is free software; you can redistribute + it and/or modify it under the terms of the GNU General Public + License as published by the Free Software Foundation; either + version 3 of the License, or (at your option) any later version. + + Gluster Management Console is distributed in the hope that it + will be useful, but WITHOUT ANY WARRANTY; without even the + implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR + PURPOSE. See the GNU General Public License for more details. + + You should have received a copy of the GNU General Public License + along with this program. If not, see + <http://www.gnu.org/licenses/>. +--> +<cspecExtension xmlns:com="http://www.eclipse.org/buckminster/Common-1.0" + xmlns="http://www.eclipse.org/buckminster/CSpec-1.0"> + <actions> + <public name="update.version" actor="ant"> + <actorProperties> + <property key="buildFile" value="build/glustermc.ant" /> + <property key="targets" value="update.version" /> + </actorProperties> + </public> + </actions> +</cspecExtension> diff --git a/src/org.gluster.storage.management.console/build.properties b/src/org.gluster.storage.management.console/build.properties new file mode 100644 index 00000000..b17cfb6d --- /dev/null +++ b/src/org.gluster.storage.management.console/build.properties @@ -0,0 +1,32 @@ +############################################################################### +# Copyright (c) 2006-2011 Gluster, Inc. <http://www.gluster.com> +# This file is part of Gluster Management Console. +# +# Gluster Management Console is free software; you can redistribute +# it and/or modify it under the terms of the GNU General Public +# License as published by the Free Software Foundation; either +# version 3 of the License, or (at your option) any later version. +# +# Gluster Management Console is distributed in the hope that it +# will be useful, but WITHOUT ANY WARRANTY; without even the +# implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR +# PURPOSE. See the GNU General Public License for more details. +# +# You should have received a copy of the GNU General Public License +# along with this program. If not, see +# <http://www.gnu.org/licenses/>. +############################################################################### +source.. = src/ +output.. = bin/ +bin.includes = META-INF/,\ + .,\ + icons/,\ + splash.bmp,\ + images/,\ + plugin.xml,\ + preferences.ini,\ + plugin.properties +src.includes = icons/,\ + splash.bmp,\ + images/,\ + preferences.ini diff --git a/src/org.gluster.storage.management.console/build/glustermc.ant b/src/org.gluster.storage.management.console/build/glustermc.ant new file mode 100644 index 00000000..2626aec7 --- /dev/null +++ b/src/org.gluster.storage.management.console/build/glustermc.ant @@ -0,0 +1,25 @@ +<!-- + Copyright (c) 2006-2011 Gluster, Inc. <http://www.gluster.com> + This file is part of Gluster Management Console. + + Gluster Management Console is free software; you can redistribute + it and/or modify it under the terms of the GNU General Public + License as published by the Free Software Foundation; either + version 3 of the License, or (at your option) any later version. + + Gluster Management Console is distributed in the hope that it + will be useful, but WITHOUT ANY WARRANTY; without even the + implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR + PURPOSE. See the GNU General Public License for more details. + + You should have received a copy of the GNU General Public License + along with this program. If not, see + <http://www.gnu.org/licenses/>. +--> +<project> + <property name="plugin.properties.file" value="${basedir}/plugin.properties" /> + + <target name='update.version'> + <replace file="${plugin.properties.file}" token="@VERSION@" value="${product.version}" /> + </target> +</project> diff --git a/src/org.gluster.storage.management.console/icons/tango/16x16/arrow-down.png b/src/org.gluster.storage.management.console/icons/tango/16x16/arrow-down.png Binary files differnew file mode 100644 index 00000000..3dd7fccd --- /dev/null +++ b/src/org.gluster.storage.management.console/icons/tango/16x16/arrow-down.png diff --git a/src/org.gluster.storage.management.console/icons/tango/16x16/arrow-up.png b/src/org.gluster.storage.management.console/icons/tango/16x16/arrow-up.png Binary files differnew file mode 100644 index 00000000..fa9a7d71 --- /dev/null +++ b/src/org.gluster.storage.management.console/icons/tango/16x16/arrow-up.png diff --git a/src/com.gluster.storage.management.console/icons/tango/16x16/bricks.png b/src/org.gluster.storage.management.console/icons/tango/16x16/bricks.png Binary files differindex ed381bd5..ed381bd5 100644 --- a/src/com.gluster.storage.management.console/icons/tango/16x16/bricks.png +++ b/src/org.gluster.storage.management.console/icons/tango/16x16/bricks.png diff --git a/src/com.gluster.storage.management.console/icons/tango/16x16/close_task.png b/src/org.gluster.storage.management.console/icons/tango/16x16/close_task.png Binary files differindex 933272b4..933272b4 100644 --- a/src/com.gluster.storage.management.console/icons/tango/16x16/close_task.png +++ b/src/org.gluster.storage.management.console/icons/tango/16x16/close_task.png diff --git a/src/com.gluster.storage.management.console/icons/tango/16x16/cluster.png b/src/org.gluster.storage.management.console/icons/tango/16x16/cluster.png Binary files differindex c9348a21..c9348a21 100644 --- a/src/com.gluster.storage.management.console/icons/tango/16x16/cluster.png +++ b/src/org.gluster.storage.management.console/icons/tango/16x16/cluster.png diff --git a/src/com.gluster.storage.management.console/icons/tango/16x16/disk-available.png b/src/org.gluster.storage.management.console/icons/tango/16x16/disk-available.png Binary files differindex c3c5f3b1..c3c5f3b1 100644 --- a/src/com.gluster.storage.management.console/icons/tango/16x16/disk-available.png +++ b/src/org.gluster.storage.management.console/icons/tango/16x16/disk-available.png diff --git a/src/com.gluster.storage.management.console/icons/tango/16x16/disk-error.png b/src/org.gluster.storage.management.console/icons/tango/16x16/disk-error.png Binary files differindex 314fa2f3..314fa2f3 100644 --- a/src/com.gluster.storage.management.console/icons/tango/16x16/disk-error.png +++ b/src/org.gluster.storage.management.console/icons/tango/16x16/disk-error.png diff --git a/src/com.gluster.storage.management.console/icons/tango/16x16/disk-initialisation.png b/src/org.gluster.storage.management.console/icons/tango/16x16/disk-initialisation.png Binary files differindex 71d0107c..71d0107c 100644 --- a/src/com.gluster.storage.management.console/icons/tango/16x16/disk-initialisation.png +++ b/src/org.gluster.storage.management.console/icons/tango/16x16/disk-initialisation.png diff --git a/src/com.gluster.storage.management.console/icons/tango/16x16/disk-inuse.png b/src/org.gluster.storage.management.console/icons/tango/16x16/disk-inuse.png Binary files differindex e4954c6a..e4954c6a 100644 --- a/src/com.gluster.storage.management.console/icons/tango/16x16/disk-inuse.png +++ b/src/org.gluster.storage.management.console/icons/tango/16x16/disk-inuse.png diff --git a/src/com.gluster.storage.management.console/icons/tango/16x16/disk-uninitialized.png b/src/org.gluster.storage.management.console/icons/tango/16x16/disk-uninitialized.png Binary files differindex ba3b48a4..ba3b48a4 100644 --- a/src/com.gluster.storage.management.console/icons/tango/16x16/disk-uninitialized.png +++ b/src/org.gluster.storage.management.console/icons/tango/16x16/disk-uninitialized.png diff --git a/src/com.gluster.storage.management.console/icons/tango/16x16/disk.png b/src/org.gluster.storage.management.console/icons/tango/16x16/disk.png Binary files differindex b74fb20e..b74fb20e 100644 --- a/src/com.gluster.storage.management.console/icons/tango/16x16/disk.png +++ b/src/org.gluster.storage.management.console/icons/tango/16x16/disk.png diff --git a/src/org.gluster.storage.management.console/icons/tango/16x16/error.png b/src/org.gluster.storage.management.console/icons/tango/16x16/error.png Binary files differnew file mode 100644 index 00000000..a9e4ff39 --- /dev/null +++ b/src/org.gluster.storage.management.console/icons/tango/16x16/error.png diff --git a/src/com.gluster.storage.management.console/icons/tango/16x16/gluster_icon.png b/src/org.gluster.storage.management.console/icons/tango/16x16/gluster_icon.png Binary files differindex f92e472d..f92e472d 100644 --- a/src/com.gluster.storage.management.console/icons/tango/16x16/gluster_icon.png +++ b/src/org.gluster.storage.management.console/icons/tango/16x16/gluster_icon.png diff --git a/src/com.gluster.storage.management.console/icons/tango/16x16/help.png b/src/org.gluster.storage.management.console/icons/tango/16x16/help.png Binary files differindex f25fc3fb..f25fc3fb 100644 --- a/src/com.gluster.storage.management.console/icons/tango/16x16/help.png +++ b/src/org.gluster.storage.management.console/icons/tango/16x16/help.png diff --git a/src/com.gluster.storage.management.console/icons/tango/16x16/logs.png b/src/org.gluster.storage.management.console/icons/tango/16x16/logs.png Binary files differindex 124f322f..124f322f 100644 --- a/src/com.gluster.storage.management.console/icons/tango/16x16/logs.png +++ b/src/org.gluster.storage.management.console/icons/tango/16x16/logs.png diff --git a/src/com.gluster.storage.management.console/icons/tango/16x16/offline-brick.png b/src/org.gluster.storage.management.console/icons/tango/16x16/offline-brick.png Binary files differindex 48812db8..48812db8 100644 --- a/src/com.gluster.storage.management.console/icons/tango/16x16/offline-brick.png +++ b/src/org.gluster.storage.management.console/icons/tango/16x16/offline-brick.png diff --git a/src/com.gluster.storage.management.console/icons/tango/16x16/online-brick.png b/src/org.gluster.storage.management.console/icons/tango/16x16/online-brick.png Binary files differindex da895838..da895838 100644 --- a/src/com.gluster.storage.management.console/icons/tango/16x16/online-brick.png +++ b/src/org.gluster.storage.management.console/icons/tango/16x16/online-brick.png diff --git a/src/com.gluster.storage.management.console/icons/tango/16x16/pause.png b/src/org.gluster.storage.management.console/icons/tango/16x16/pause.png Binary files differindex 04923149..04923149 100644 --- a/src/com.gluster.storage.management.console/icons/tango/16x16/pause.png +++ b/src/org.gluster.storage.management.console/icons/tango/16x16/pause.png diff --git a/src/com.gluster.storage.management.console/icons/tango/16x16/question.png b/src/org.gluster.storage.management.console/icons/tango/16x16/question.png Binary files differindex 30a47032..30a47032 100644 --- a/src/com.gluster.storage.management.console/icons/tango/16x16/question.png +++ b/src/org.gluster.storage.management.console/icons/tango/16x16/question.png diff --git a/src/com.gluster.storage.management.console/icons/tango/16x16/running-task.png b/src/org.gluster.storage.management.console/icons/tango/16x16/running-task.png Binary files differindex ad679b8b..ad679b8b 100644 --- a/src/com.gluster.storage.management.console/icons/tango/16x16/running-task.png +++ b/src/org.gluster.storage.management.console/icons/tango/16x16/running-task.png diff --git a/src/com.gluster.storage.management.console/icons/tango/16x16/server.png b/src/org.gluster.storage.management.console/icons/tango/16x16/server.png Binary files differindex d0b397be..d0b397be 100644 --- a/src/com.gluster.storage.management.console/icons/tango/16x16/server.png +++ b/src/org.gluster.storage.management.console/icons/tango/16x16/server.png diff --git a/src/com.gluster.storage.management.console/icons/tango/16x16/servers.png b/src/org.gluster.storage.management.console/icons/tango/16x16/servers.png Binary files differindex 0efee57e..0efee57e 100644 --- a/src/com.gluster.storage.management.console/icons/tango/16x16/servers.png +++ b/src/org.gluster.storage.management.console/icons/tango/16x16/servers.png diff --git a/src/com.gluster.storage.management.console/icons/tango/16x16/settings.png b/src/org.gluster.storage.management.console/icons/tango/16x16/settings.png Binary files differindex d90ab661..d90ab661 100644 --- a/src/com.gluster.storage.management.console/icons/tango/16x16/settings.png +++ b/src/org.gluster.storage.management.console/icons/tango/16x16/settings.png diff --git a/src/org.gluster.storage.management.console/icons/tango/16x16/start-offline-bricks-disabled.png b/src/org.gluster.storage.management.console/icons/tango/16x16/start-offline-bricks-disabled.png Binary files differnew file mode 100644 index 00000000..60d20d65 --- /dev/null +++ b/src/org.gluster.storage.management.console/icons/tango/16x16/start-offline-bricks-disabled.png diff --git a/src/org.gluster.storage.management.console/icons/tango/16x16/start-offline-bricks.png b/src/org.gluster.storage.management.console/icons/tango/16x16/start-offline-bricks.png Binary files differnew file mode 100644 index 00000000..fcd22fa5 --- /dev/null +++ b/src/org.gluster.storage.management.console/icons/tango/16x16/start-offline-bricks.png diff --git a/src/com.gluster.storage.management.console/icons/tango/16x16/start.png b/src/org.gluster.storage.management.console/icons/tango/16x16/start.png Binary files differindex d4413259..d4413259 100644 --- a/src/com.gluster.storage.management.console/icons/tango/16x16/start.png +++ b/src/org.gluster.storage.management.console/icons/tango/16x16/start.png diff --git a/src/com.gluster.storage.management.console/icons/tango/16x16/status-offline.png b/src/org.gluster.storage.management.console/icons/tango/16x16/status-offline.png Binary files differindex dbd0204e..dbd0204e 100644 --- a/src/com.gluster.storage.management.console/icons/tango/16x16/status-offline.png +++ b/src/org.gluster.storage.management.console/icons/tango/16x16/status-offline.png diff --git a/src/com.gluster.storage.management.console/icons/tango/16x16/status-online.png b/src/org.gluster.storage.management.console/icons/tango/16x16/status-online.png Binary files differindex a31ba599..a31ba599 100644 --- a/src/com.gluster.storage.management.console/icons/tango/16x16/status-online.png +++ b/src/org.gluster.storage.management.console/icons/tango/16x16/status-online.png diff --git a/src/com.gluster.storage.management.console/icons/tango/16x16/stop.png b/src/org.gluster.storage.management.console/icons/tango/16x16/stop.png Binary files differindex 8f591c63..8f591c63 100644 --- a/src/com.gluster.storage.management.console/icons/tango/16x16/stop.png +++ b/src/org.gluster.storage.management.console/icons/tango/16x16/stop.png diff --git a/src/com.gluster.storage.management.console/icons/tango/16x16/task-completed.png b/src/org.gluster.storage.management.console/icons/tango/16x16/task-completed.png Binary files differindex 5de2361a..5de2361a 100644 --- a/src/com.gluster.storage.management.console/icons/tango/16x16/task-completed.png +++ b/src/org.gluster.storage.management.console/icons/tango/16x16/task-completed.png diff --git a/src/com.gluster.storage.management.console/icons/tango/16x16/task-error.png b/src/org.gluster.storage.management.console/icons/tango/16x16/task-error.png Binary files differindex 1fc66ad2..1fc66ad2 100644 --- a/src/com.gluster.storage.management.console/icons/tango/16x16/task-error.png +++ b/src/org.gluster.storage.management.console/icons/tango/16x16/task-error.png diff --git a/src/com.gluster.storage.management.console/icons/tango/16x16/utilities-terminal.png b/src/org.gluster.storage.management.console/icons/tango/16x16/utilities-terminal.png Binary files differindex c5b797a7..c5b797a7 100644 --- a/src/com.gluster.storage.management.console/icons/tango/16x16/utilities-terminal.png +++ b/src/org.gluster.storage.management.console/icons/tango/16x16/utilities-terminal.png diff --git a/src/com.gluster.storage.management.console/icons/tango/16x16/view-refresh.png b/src/org.gluster.storage.management.console/icons/tango/16x16/view-refresh.png Binary files differindex 3fd71d6e..3fd71d6e 100644 --- a/src/com.gluster.storage.management.console/icons/tango/16x16/view-refresh.png +++ b/src/org.gluster.storage.management.console/icons/tango/16x16/view-refresh.png diff --git a/src/com.gluster.storage.management.console/icons/tango/16x16/volume-create.png b/src/org.gluster.storage.management.console/icons/tango/16x16/volume-create.png Binary files differindex 628f4d50..628f4d50 100644 --- a/src/com.gluster.storage.management.console/icons/tango/16x16/volume-create.png +++ b/src/org.gluster.storage.management.console/icons/tango/16x16/volume-create.png diff --git a/src/com.gluster.storage.management.console/icons/tango/16x16/volume-options.png b/src/org.gluster.storage.management.console/icons/tango/16x16/volume-options.png Binary files differindex d7665cb7..d7665cb7 100644 --- a/src/com.gluster.storage.management.console/icons/tango/16x16/volume-options.png +++ b/src/org.gluster.storage.management.console/icons/tango/16x16/volume-options.png diff --git a/src/com.gluster.storage.management.console/icons/tango/16x16/volume.png b/src/org.gluster.storage.management.console/icons/tango/16x16/volume.png Binary files differindex 41376404..41376404 100644 --- a/src/com.gluster.storage.management.console/icons/tango/16x16/volume.png +++ b/src/org.gluster.storage.management.console/icons/tango/16x16/volume.png diff --git a/src/com.gluster.storage.management.console/icons/tango/16x16/volumes.png b/src/org.gluster.storage.management.console/icons/tango/16x16/volumes.png Binary files differindex 18c2ad8b..18c2ad8b 100644 --- a/src/com.gluster.storage.management.console/icons/tango/16x16/volumes.png +++ b/src/org.gluster.storage.management.console/icons/tango/16x16/volumes.png diff --git a/src/com.gluster.storage.management.console/icons/tango/22x22/disk-initialisation.png b/src/org.gluster.storage.management.console/icons/tango/22x22/disk-initialisation.png Binary files differindex 73ecf4c0..73ecf4c0 100644 --- a/src/com.gluster.storage.management.console/icons/tango/22x22/disk-initialisation.png +++ b/src/org.gluster.storage.management.console/icons/tango/22x22/disk-initialisation.png diff --git a/src/com.gluster.storage.management.console/icons/tango/22x22/high-memory-usage.png b/src/org.gluster.storage.management.console/icons/tango/22x22/high-memory-usage.png Binary files differindex b7c166ab..b7c166ab 100644 --- a/src/com.gluster.storage.management.console/icons/tango/22x22/high-memory-usage.png +++ b/src/org.gluster.storage.management.console/icons/tango/22x22/high-memory-usage.png diff --git a/src/com.gluster.storage.management.console/icons/tango/22x22/low-diskspace.png b/src/org.gluster.storage.management.console/icons/tango/22x22/low-diskspace.png Binary files differindex 983012ad..983012ad 100644 --- a/src/com.gluster.storage.management.console/icons/tango/22x22/low-diskspace.png +++ b/src/org.gluster.storage.management.console/icons/tango/22x22/low-diskspace.png diff --git a/src/com.gluster.storage.management.console/icons/tango/22x22/migrate-brick.png b/src/org.gluster.storage.management.console/icons/tango/22x22/migrate-brick.png Binary files differindex 48a66c8c..48a66c8c 100644 --- a/src/com.gluster.storage.management.console/icons/tango/22x22/migrate-brick.png +++ b/src/org.gluster.storage.management.console/icons/tango/22x22/migrate-brick.png diff --git a/src/org.gluster.storage.management.console/icons/tango/22x22/offline-brick.png b/src/org.gluster.storage.management.console/icons/tango/22x22/offline-brick.png Binary files differnew file mode 100644 index 00000000..3a627598 --- /dev/null +++ b/src/org.gluster.storage.management.console/icons/tango/22x22/offline-brick.png diff --git a/src/com.gluster.storage.management.console/icons/tango/22x22/offline-server.png b/src/org.gluster.storage.management.console/icons/tango/22x22/offline-server.png Binary files differindex 5900c724..5900c724 100644 --- a/src/com.gluster.storage.management.console/icons/tango/22x22/offline-server.png +++ b/src/org.gluster.storage.management.console/icons/tango/22x22/offline-server.png diff --git a/src/org.gluster.storage.management.console/icons/tango/22x22/offline-volume.png b/src/org.gluster.storage.management.console/icons/tango/22x22/offline-volume.png Binary files differnew file mode 100644 index 00000000..fa3a64f9 --- /dev/null +++ b/src/org.gluster.storage.management.console/icons/tango/22x22/offline-volume.png diff --git a/src/com.gluster.storage.management.console/icons/tango/22x22/server-warning.png b/src/org.gluster.storage.management.console/icons/tango/22x22/server-warning.png Binary files differindex 9e2da0bc..9e2da0bc 100644 --- a/src/com.gluster.storage.management.console/icons/tango/22x22/server-warning.png +++ b/src/org.gluster.storage.management.console/icons/tango/22x22/server-warning.png diff --git a/src/org.gluster.storage.management.console/icons/tango/22x22/start-offline-bricks-disabled.png b/src/org.gluster.storage.management.console/icons/tango/22x22/start-offline-bricks-disabled.png Binary files differnew file mode 100644 index 00000000..69fb53de --- /dev/null +++ b/src/org.gluster.storage.management.console/icons/tango/22x22/start-offline-bricks-disabled.png diff --git a/src/org.gluster.storage.management.console/icons/tango/22x22/start-offline-bricks.png b/src/org.gluster.storage.management.console/icons/tango/22x22/start-offline-bricks.png Binary files differnew file mode 100644 index 00000000..8d0e2878 --- /dev/null +++ b/src/org.gluster.storage.management.console/icons/tango/22x22/start-offline-bricks.png diff --git a/src/com.gluster.storage.management.console/icons/tango/22x22/system-search.png b/src/org.gluster.storage.management.console/icons/tango/22x22/system-search.png Binary files differindex 4e522b23..4e522b23 100644 --- a/src/com.gluster.storage.management.console/icons/tango/22x22/system-search.png +++ b/src/org.gluster.storage.management.console/icons/tango/22x22/system-search.png diff --git a/src/com.gluster.storage.management.console/icons/tango/22x22/utilities-terminal.png b/src/org.gluster.storage.management.console/icons/tango/22x22/utilities-terminal.png Binary files differindex ceb0fb99..ceb0fb99 100644 --- a/src/com.gluster.storage.management.console/icons/tango/22x22/utilities-terminal.png +++ b/src/org.gluster.storage.management.console/icons/tango/22x22/utilities-terminal.png diff --git a/src/com.gluster.storage.management.console/icons/tango/22x22/volume-rebalance.png b/src/org.gluster.storage.management.console/icons/tango/22x22/volume-rebalance.png Binary files differindex 4539822c..4539822c 100644 --- a/src/com.gluster.storage.management.console/icons/tango/22x22/volume-rebalance.png +++ b/src/org.gluster.storage.management.console/icons/tango/22x22/volume-rebalance.png diff --git a/src/com.gluster.storage.management.console/icons/tango/32x32/add-brick-disabled.png b/src/org.gluster.storage.management.console/icons/tango/32x32/add-brick-disabled.png Binary files differindex 925c8b44..925c8b44 100644 --- a/src/com.gluster.storage.management.console/icons/tango/32x32/add-brick-disabled.png +++ b/src/org.gluster.storage.management.console/icons/tango/32x32/add-brick-disabled.png diff --git a/src/com.gluster.storage.management.console/icons/tango/32x32/add-brick.png b/src/org.gluster.storage.management.console/icons/tango/32x32/add-brick.png Binary files differindex 81304ab4..81304ab4 100644 --- a/src/com.gluster.storage.management.console/icons/tango/32x32/add-brick.png +++ b/src/org.gluster.storage.management.console/icons/tango/32x32/add-brick.png diff --git a/src/com.gluster.storage.management.console/icons/tango/32x32/add-server.png b/src/org.gluster.storage.management.console/icons/tango/32x32/add-server.png Binary files differindex 29a512f2..29a512f2 100644 --- a/src/com.gluster.storage.management.console/icons/tango/32x32/add-server.png +++ b/src/org.gluster.storage.management.console/icons/tango/32x32/add-server.png diff --git a/src/org.gluster.storage.management.console/icons/tango/32x32/clear-task-disabled.png b/src/org.gluster.storage.management.console/icons/tango/32x32/clear-task-disabled.png Binary files differnew file mode 100644 index 00000000..af8884e3 --- /dev/null +++ b/src/org.gluster.storage.management.console/icons/tango/32x32/clear-task-disabled.png diff --git a/src/com.gluster.storage.management.console/icons/tango/32x32/clear-task.png b/src/org.gluster.storage.management.console/icons/tango/32x32/clear-task.png Binary files differindex db17be6b..db17be6b 100644 --- a/src/com.gluster.storage.management.console/icons/tango/32x32/clear-task.png +++ b/src/org.gluster.storage.management.console/icons/tango/32x32/clear-task.png diff --git a/src/org.gluster.storage.management.console/icons/tango/32x32/commit-task-disabled.png b/src/org.gluster.storage.management.console/icons/tango/32x32/commit-task-disabled.png Binary files differnew file mode 100644 index 00000000..89ccbd4d --- /dev/null +++ b/src/org.gluster.storage.management.console/icons/tango/32x32/commit-task-disabled.png diff --git a/src/com.gluster.storage.management.console/icons/tango/32x32/commit-task.png b/src/org.gluster.storage.management.console/icons/tango/32x32/commit-task.png Binary files differindex ff0c9452..ff0c9452 100644 --- a/src/com.gluster.storage.management.console/icons/tango/32x32/commit-task.png +++ b/src/org.gluster.storage.management.console/icons/tango/32x32/commit-task.png diff --git a/src/com.gluster.storage.management.console/icons/tango/32x32/create-volume-disabled.png b/src/org.gluster.storage.management.console/icons/tango/32x32/create-volume-disabled.png Binary files differindex d7b69f97..d7b69f97 100644 --- a/src/com.gluster.storage.management.console/icons/tango/32x32/create-volume-disabled.png +++ b/src/org.gluster.storage.management.console/icons/tango/32x32/create-volume-disabled.png diff --git a/src/com.gluster.storage.management.console/icons/tango/32x32/create-volume.png b/src/org.gluster.storage.management.console/icons/tango/32x32/create-volume.png Binary files differindex b43289b6..b43289b6 100644 --- a/src/com.gluster.storage.management.console/icons/tango/32x32/create-volume.png +++ b/src/org.gluster.storage.management.console/icons/tango/32x32/create-volume.png diff --git a/src/com.gluster.storage.management.console/icons/tango/32x32/disk.png b/src/org.gluster.storage.management.console/icons/tango/32x32/disk.png Binary files differindex b34d8b77..b34d8b77 100644 --- a/src/com.gluster.storage.management.console/icons/tango/32x32/disk.png +++ b/src/org.gluster.storage.management.console/icons/tango/32x32/disk.png diff --git a/src/com.gluster.storage.management.console/icons/tango/32x32/download-log.png b/src/org.gluster.storage.management.console/icons/tango/32x32/download-log.png Binary files differindex 62bf9d7e..62bf9d7e 100644 --- a/src/com.gluster.storage.management.console/icons/tango/32x32/download-log.png +++ b/src/org.gluster.storage.management.console/icons/tango/32x32/download-log.png diff --git a/src/com.gluster.storage.management.console/icons/tango/32x32/help.png b/src/org.gluster.storage.management.console/icons/tango/32x32/help.png Binary files differindex d60425f7..d60425f7 100644 --- a/src/com.gluster.storage.management.console/icons/tango/32x32/help.png +++ b/src/org.gluster.storage.management.console/icons/tango/32x32/help.png diff --git a/src/org.gluster.storage.management.console/icons/tango/32x32/log-rotate.png b/src/org.gluster.storage.management.console/icons/tango/32x32/log-rotate.png Binary files differnew file mode 100644 index 00000000..a1ceebbf --- /dev/null +++ b/src/org.gluster.storage.management.console/icons/tango/32x32/log-rotate.png diff --git a/src/com.gluster.storage.management.console/icons/tango/32x32/logs.png b/src/org.gluster.storage.management.console/icons/tango/32x32/logs.png Binary files differindex b62959e4..b62959e4 100644 --- a/src/com.gluster.storage.management.console/icons/tango/32x32/logs.png +++ b/src/org.gluster.storage.management.console/icons/tango/32x32/logs.png diff --git a/src/com.gluster.storage.management.console/icons/tango/32x32/migrate-brick-disabled.png b/src/org.gluster.storage.management.console/icons/tango/32x32/migrate-brick-disabled.png Binary files differindex 8a1e82a7..8a1e82a7 100644 --- a/src/com.gluster.storage.management.console/icons/tango/32x32/migrate-brick-disabled.png +++ b/src/org.gluster.storage.management.console/icons/tango/32x32/migrate-brick-disabled.png diff --git a/src/com.gluster.storage.management.console/icons/tango/32x32/migrate-brick.png b/src/org.gluster.storage.management.console/icons/tango/32x32/migrate-brick.png Binary files differindex 999332a5..999332a5 100644 --- a/src/com.gluster.storage.management.console/icons/tango/32x32/migrate-brick.png +++ b/src/org.gluster.storage.management.console/icons/tango/32x32/migrate-brick.png diff --git a/src/org.gluster.storage.management.console/icons/tango/32x32/pause-disabled.png b/src/org.gluster.storage.management.console/icons/tango/32x32/pause-disabled.png Binary files differnew file mode 100644 index 00000000..7b023e3d --- /dev/null +++ b/src/org.gluster.storage.management.console/icons/tango/32x32/pause-disabled.png diff --git a/src/com.gluster.storage.management.console/icons/tango/32x32/pause.png b/src/org.gluster.storage.management.console/icons/tango/32x32/pause.png Binary files differindex 597bc014..597bc014 100644 --- a/src/com.gluster.storage.management.console/icons/tango/32x32/pause.png +++ b/src/org.gluster.storage.management.console/icons/tango/32x32/pause.png diff --git a/src/com.gluster.storage.management.console/icons/tango/32x32/remove-brick-disabled.png b/src/org.gluster.storage.management.console/icons/tango/32x32/remove-brick-disabled.png Binary files differindex 8dbbf3c1..8dbbf3c1 100644 --- a/src/com.gluster.storage.management.console/icons/tango/32x32/remove-brick-disabled.png +++ b/src/org.gluster.storage.management.console/icons/tango/32x32/remove-brick-disabled.png diff --git a/src/com.gluster.storage.management.console/icons/tango/32x32/remove-brick.png b/src/org.gluster.storage.management.console/icons/tango/32x32/remove-brick.png Binary files differindex 83a657a2..83a657a2 100644 --- a/src/com.gluster.storage.management.console/icons/tango/32x32/remove-brick.png +++ b/src/org.gluster.storage.management.console/icons/tango/32x32/remove-brick.png diff --git a/src/com.gluster.storage.management.console/icons/tango/32x32/remove-server-disabled.png b/src/org.gluster.storage.management.console/icons/tango/32x32/remove-server-disabled.png Binary files differindex 3f31d216..3f31d216 100644 --- a/src/com.gluster.storage.management.console/icons/tango/32x32/remove-server-disabled.png +++ b/src/org.gluster.storage.management.console/icons/tango/32x32/remove-server-disabled.png diff --git a/src/com.gluster.storage.management.console/icons/tango/32x32/remove-server.png b/src/org.gluster.storage.management.console/icons/tango/32x32/remove-server.png Binary files differindex fba00869..fba00869 100644 --- a/src/com.gluster.storage.management.console/icons/tango/32x32/remove-server.png +++ b/src/org.gluster.storage.management.console/icons/tango/32x32/remove-server.png diff --git a/src/com.gluster.storage.management.console/icons/tango/32x32/remove-volume-disabled.png b/src/org.gluster.storage.management.console/icons/tango/32x32/remove-volume-disabled.png Binary files differindex 5eb09cfd..5eb09cfd 100644 --- a/src/com.gluster.storage.management.console/icons/tango/32x32/remove-volume-disabled.png +++ b/src/org.gluster.storage.management.console/icons/tango/32x32/remove-volume-disabled.png diff --git a/src/com.gluster.storage.management.console/icons/tango/32x32/remove-volume.png b/src/org.gluster.storage.management.console/icons/tango/32x32/remove-volume.png Binary files differindex b7392805..b7392805 100644 --- a/src/com.gluster.storage.management.console/icons/tango/32x32/remove-volume.png +++ b/src/org.gluster.storage.management.console/icons/tango/32x32/remove-volume.png diff --git a/src/com.gluster.storage.management.console/icons/tango/32x32/reset-volume-option-disabled.png b/src/org.gluster.storage.management.console/icons/tango/32x32/reset-volume-option-disabled.png Binary files differindex c4c955f5..c4c955f5 100644 --- a/src/com.gluster.storage.management.console/icons/tango/32x32/reset-volume-option-disabled.png +++ b/src/org.gluster.storage.management.console/icons/tango/32x32/reset-volume-option-disabled.png diff --git a/src/com.gluster.storage.management.console/icons/tango/32x32/reset-volume-option.png b/src/org.gluster.storage.management.console/icons/tango/32x32/reset-volume-option.png Binary files differindex 77203284..77203284 100644 --- a/src/com.gluster.storage.management.console/icons/tango/32x32/reset-volume-option.png +++ b/src/org.gluster.storage.management.console/icons/tango/32x32/reset-volume-option.png diff --git a/src/com.gluster.storage.management.console/icons/tango/32x32/server.png b/src/org.gluster.storage.management.console/icons/tango/32x32/server.png Binary files differindex e34eb4e4..e34eb4e4 100644 --- a/src/com.gluster.storage.management.console/icons/tango/32x32/server.png +++ b/src/org.gluster.storage.management.console/icons/tango/32x32/server.png diff --git a/src/com.gluster.storage.management.console/icons/tango/32x32/servers.png b/src/org.gluster.storage.management.console/icons/tango/32x32/servers.png Binary files differindex dca03af4..dca03af4 100644 --- a/src/com.gluster.storage.management.console/icons/tango/32x32/servers.png +++ b/src/org.gluster.storage.management.console/icons/tango/32x32/servers.png diff --git a/src/com.gluster.storage.management.console/icons/tango/32x32/settings.png b/src/org.gluster.storage.management.console/icons/tango/32x32/settings.png Binary files differindex 565f406d..565f406d 100644 --- a/src/com.gluster.storage.management.console/icons/tango/32x32/settings.png +++ b/src/org.gluster.storage.management.console/icons/tango/32x32/settings.png diff --git a/src/org.gluster.storage.management.console/icons/tango/32x32/start-disabled.png b/src/org.gluster.storage.management.console/icons/tango/32x32/start-disabled.png Binary files differnew file mode 100644 index 00000000..3f38a449 --- /dev/null +++ b/src/org.gluster.storage.management.console/icons/tango/32x32/start-disabled.png diff --git a/src/org.gluster.storage.management.console/icons/tango/32x32/start-offline-bricks-disabled.png b/src/org.gluster.storage.management.console/icons/tango/32x32/start-offline-bricks-disabled.png Binary files differnew file mode 100644 index 00000000..9acbdfae --- /dev/null +++ b/src/org.gluster.storage.management.console/icons/tango/32x32/start-offline-bricks-disabled.png diff --git a/src/org.gluster.storage.management.console/icons/tango/32x32/start-offline-bricks.png b/src/org.gluster.storage.management.console/icons/tango/32x32/start-offline-bricks.png Binary files differnew file mode 100644 index 00000000..dbce3b9a --- /dev/null +++ b/src/org.gluster.storage.management.console/icons/tango/32x32/start-offline-bricks.png diff --git a/src/com.gluster.storage.management.console/icons/tango/32x32/start-volume-disabled.png b/src/org.gluster.storage.management.console/icons/tango/32x32/start-volume-disabled.png Binary files differindex ad14408b..ad14408b 100644 --- a/src/com.gluster.storage.management.console/icons/tango/32x32/start-volume-disabled.png +++ b/src/org.gluster.storage.management.console/icons/tango/32x32/start-volume-disabled.png diff --git a/src/com.gluster.storage.management.console/icons/tango/32x32/start-volume.png b/src/org.gluster.storage.management.console/icons/tango/32x32/start-volume.png Binary files differindex d357d291..d357d291 100644 --- a/src/com.gluster.storage.management.console/icons/tango/32x32/start-volume.png +++ b/src/org.gluster.storage.management.console/icons/tango/32x32/start-volume.png diff --git a/src/com.gluster.storage.management.console/icons/tango/32x32/start.png b/src/org.gluster.storage.management.console/icons/tango/32x32/start.png Binary files differindex 578736ec..578736ec 100644 --- a/src/com.gluster.storage.management.console/icons/tango/32x32/start.png +++ b/src/org.gluster.storage.management.console/icons/tango/32x32/start.png diff --git a/src/org.gluster.storage.management.console/icons/tango/32x32/stop-disabled.png b/src/org.gluster.storage.management.console/icons/tango/32x32/stop-disabled.png Binary files differnew file mode 100644 index 00000000..3c778c3d --- /dev/null +++ b/src/org.gluster.storage.management.console/icons/tango/32x32/stop-disabled.png diff --git a/src/com.gluster.storage.management.console/icons/tango/32x32/stop-volume-disabled.png b/src/org.gluster.storage.management.console/icons/tango/32x32/stop-volume-disabled.png Binary files differindex b70b2042..b70b2042 100644 --- a/src/com.gluster.storage.management.console/icons/tango/32x32/stop-volume-disabled.png +++ b/src/org.gluster.storage.management.console/icons/tango/32x32/stop-volume-disabled.png diff --git a/src/com.gluster.storage.management.console/icons/tango/32x32/stop-volume.png b/src/org.gluster.storage.management.console/icons/tango/32x32/stop-volume.png Binary files differindex 5cc5e1fb..5cc5e1fb 100644 --- a/src/com.gluster.storage.management.console/icons/tango/32x32/stop-volume.png +++ b/src/org.gluster.storage.management.console/icons/tango/32x32/stop-volume.png diff --git a/src/com.gluster.storage.management.console/icons/tango/32x32/stop.png b/src/org.gluster.storage.management.console/icons/tango/32x32/stop.png Binary files differindex 615e465b..615e465b 100644 --- a/src/com.gluster.storage.management.console/icons/tango/32x32/stop.png +++ b/src/org.gluster.storage.management.console/icons/tango/32x32/stop.png diff --git a/src/com.gluster.storage.management.console/icons/tango/32x32/utilities-terminal.png b/src/org.gluster.storage.management.console/icons/tango/32x32/utilities-terminal.png Binary files differindex f86c7840..f86c7840 100644 --- a/src/com.gluster.storage.management.console/icons/tango/32x32/utilities-terminal.png +++ b/src/org.gluster.storage.management.console/icons/tango/32x32/utilities-terminal.png diff --git a/src/com.gluster.storage.management.console/icons/tango/32x32/view-refresh.png b/src/org.gluster.storage.management.console/icons/tango/32x32/view-refresh.png Binary files differindex 606ea9eb..606ea9eb 100644 --- a/src/com.gluster.storage.management.console/icons/tango/32x32/view-refresh.png +++ b/src/org.gluster.storage.management.console/icons/tango/32x32/view-refresh.png diff --git a/src/com.gluster.storage.management.console/icons/tango/32x32/volume-rebalance-disabled.png b/src/org.gluster.storage.management.console/icons/tango/32x32/volume-rebalance-disabled.png Binary files differindex 35d49af7..35d49af7 100644 --- a/src/com.gluster.storage.management.console/icons/tango/32x32/volume-rebalance-disabled.png +++ b/src/org.gluster.storage.management.console/icons/tango/32x32/volume-rebalance-disabled.png diff --git a/src/com.gluster.storage.management.console/icons/tango/32x32/volume-rebalance.png b/src/org.gluster.storage.management.console/icons/tango/32x32/volume-rebalance.png Binary files differindex eb63ec20..eb63ec20 100644 --- a/src/com.gluster.storage.management.console/icons/tango/32x32/volume-rebalance.png +++ b/src/org.gluster.storage.management.console/icons/tango/32x32/volume-rebalance.png diff --git a/src/com.gluster.storage.management.console/icons/tango/32x32/volume.png b/src/org.gluster.storage.management.console/icons/tango/32x32/volume.png Binary files differindex 3e0d9add..3e0d9add 100644 --- a/src/com.gluster.storage.management.console/icons/tango/32x32/volume.png +++ b/src/org.gluster.storage.management.console/icons/tango/32x32/volume.png diff --git a/src/com.gluster.storage.management.console/icons/tango/48x48/add-server.png b/src/org.gluster.storage.management.console/icons/tango/48x48/add-server.png Binary files differindex 3e615b62..3e615b62 100644 --- a/src/com.gluster.storage.management.console/icons/tango/48x48/add-server.png +++ b/src/org.gluster.storage.management.console/icons/tango/48x48/add-server.png diff --git a/src/com.gluster.storage.management.console/icons/tango/48x48/create-volume.png b/src/org.gluster.storage.management.console/icons/tango/48x48/create-volume.png Binary files differindex 88a494cc..88a494cc 100644 --- a/src/com.gluster.storage.management.console/icons/tango/48x48/create-volume.png +++ b/src/org.gluster.storage.management.console/icons/tango/48x48/create-volume.png diff --git a/src/com.gluster.storage.management.console/icons/tango/48x48/remove-brick-disabled.png b/src/org.gluster.storage.management.console/icons/tango/48x48/remove-brick-disabled.png Binary files differindex 368b6696..368b6696 100644 --- a/src/com.gluster.storage.management.console/icons/tango/48x48/remove-brick-disabled.png +++ b/src/org.gluster.storage.management.console/icons/tango/48x48/remove-brick-disabled.png diff --git a/src/com.gluster.storage.management.console/icons/tango/48x48/server.png b/src/org.gluster.storage.management.console/icons/tango/48x48/server.png Binary files differindex a568c0b8..a568c0b8 100644 --- a/src/com.gluster.storage.management.console/icons/tango/48x48/server.png +++ b/src/org.gluster.storage.management.console/icons/tango/48x48/server.png diff --git a/src/org.gluster.storage.management.console/icons/tango/48x48/start-offline-bricks-disabled.png b/src/org.gluster.storage.management.console/icons/tango/48x48/start-offline-bricks-disabled.png Binary files differnew file mode 100644 index 00000000..3e21d996 --- /dev/null +++ b/src/org.gluster.storage.management.console/icons/tango/48x48/start-offline-bricks-disabled.png diff --git a/src/org.gluster.storage.management.console/icons/tango/48x48/start-offline-bricks.png b/src/org.gluster.storage.management.console/icons/tango/48x48/start-offline-bricks.png Binary files differnew file mode 100644 index 00000000..d4748fca --- /dev/null +++ b/src/org.gluster.storage.management.console/icons/tango/48x48/start-offline-bricks.png diff --git a/src/com.gluster.storage.management.console/icons/tango/48x48/start-volume-disabled.png b/src/org.gluster.storage.management.console/icons/tango/48x48/start-volume-disabled.png Binary files differindex fcf25df4..fcf25df4 100644 --- a/src/com.gluster.storage.management.console/icons/tango/48x48/start-volume-disabled.png +++ b/src/org.gluster.storage.management.console/icons/tango/48x48/start-volume-disabled.png diff --git a/src/com.gluster.storage.management.console/icons/tango/48x48/stop-volume-disabled.png b/src/org.gluster.storage.management.console/icons/tango/48x48/stop-volume-disabled.png Binary files differindex f418875a..f418875a 100644 --- a/src/com.gluster.storage.management.console/icons/tango/48x48/stop-volume-disabled.png +++ b/src/org.gluster.storage.management.console/icons/tango/48x48/stop-volume-disabled.png diff --git a/src/com.gluster.storage.management.console/icons/tango/8x8/offline.png b/src/org.gluster.storage.management.console/icons/tango/8x8/offline.png Binary files differindex 6b33d298..6b33d298 100644 --- a/src/com.gluster.storage.management.console/icons/tango/8x8/offline.png +++ b/src/org.gluster.storage.management.console/icons/tango/8x8/offline.png diff --git a/src/com.gluster.storage.management.console/icons/tango/8x8/online.png b/src/org.gluster.storage.management.console/icons/tango/8x8/online.png Binary files differindex 58a61f1a..58a61f1a 100644 --- a/src/com.gluster.storage.management.console/icons/tango/8x8/online.png +++ b/src/org.gluster.storage.management.console/icons/tango/8x8/online.png diff --git a/src/com.gluster.storage.management.console/icons/tango/8x8/star.png b/src/org.gluster.storage.management.console/icons/tango/8x8/star.png Binary files differindex 5f8fc748..5f8fc748 100644 --- a/src/com.gluster.storage.management.console/icons/tango/8x8/star.png +++ b/src/org.gluster.storage.management.console/icons/tango/8x8/star.png diff --git a/src/com.gluster.storage.management.console/icons/tango/scalable/add_brick.svg b/src/org.gluster.storage.management.console/icons/tango/scalable/add_brick.svg index b1fb427c..b1fb427c 100644 --- a/src/com.gluster.storage.management.console/icons/tango/scalable/add_brick.svg +++ b/src/org.gluster.storage.management.console/icons/tango/scalable/add_brick.svg diff --git a/src/com.gluster.storage.management.console/icons/tango/scalable/add_volume.svg b/src/org.gluster.storage.management.console/icons/tango/scalable/add_volume.svg index 66307f36..66307f36 100644 --- a/src/com.gluster.storage.management.console/icons/tango/scalable/add_volume.svg +++ b/src/org.gluster.storage.management.console/icons/tango/scalable/add_volume.svg diff --git a/src/com.gluster.storage.management.console/icons/tango/scalable/brick.svg b/src/org.gluster.storage.management.console/icons/tango/scalable/brick.svg index 365110f2..365110f2 100644 --- a/src/com.gluster.storage.management.console/icons/tango/scalable/brick.svg +++ b/src/org.gluster.storage.management.console/icons/tango/scalable/brick.svg diff --git a/src/com.gluster.storage.management.console/icons/tango/scalable/brick_migration.svg b/src/org.gluster.storage.management.console/icons/tango/scalable/brick_migration.svg index 1fa4e0d4..1fa4e0d4 100644 --- a/src/com.gluster.storage.management.console/icons/tango/scalable/brick_migration.svg +++ b/src/org.gluster.storage.management.console/icons/tango/scalable/brick_migration.svg diff --git a/src/com.gluster.storage.management.console/icons/tango/scalable/bricks.svg b/src/org.gluster.storage.management.console/icons/tango/scalable/bricks.svg index 39af40f2..39af40f2 100644 --- a/src/com.gluster.storage.management.console/icons/tango/scalable/bricks.svg +++ b/src/org.gluster.storage.management.console/icons/tango/scalable/bricks.svg diff --git a/src/com.gluster.storage.management.console/icons/tango/scalable/cloud.svg b/src/org.gluster.storage.management.console/icons/tango/scalable/cloud.svg index d51128ac..d51128ac 100644 --- a/src/com.gluster.storage.management.console/icons/tango/scalable/cloud.svg +++ b/src/org.gluster.storage.management.console/icons/tango/scalable/cloud.svg diff --git a/src/com.gluster.storage.management.console/icons/tango/scalable/create-volume-disabled.svg b/src/org.gluster.storage.management.console/icons/tango/scalable/create-volume-disabled.svg index 2cc8da4e..2cc8da4e 100644 --- a/src/com.gluster.storage.management.console/icons/tango/scalable/create-volume-disabled.svg +++ b/src/org.gluster.storage.management.console/icons/tango/scalable/create-volume-disabled.svg diff --git a/src/com.gluster.storage.management.console/icons/tango/scalable/create-volume.svg b/src/org.gluster.storage.management.console/icons/tango/scalable/create-volume.svg index 14a5823f..14a5823f 100644 --- a/src/com.gluster.storage.management.console/icons/tango/scalable/create-volume.svg +++ b/src/org.gluster.storage.management.console/icons/tango/scalable/create-volume.svg diff --git a/src/com.gluster.storage.management.console/icons/tango/scalable/disk (32-32).svg b/src/org.gluster.storage.management.console/icons/tango/scalable/disk (32-32).svg index bfe35cce..bfe35cce 100644 --- a/src/com.gluster.storage.management.console/icons/tango/scalable/disk (32-32).svg +++ b/src/org.gluster.storage.management.console/icons/tango/scalable/disk (32-32).svg diff --git a/src/com.gluster.storage.management.console/icons/tango/scalable/disk (48-48).svg b/src/org.gluster.storage.management.console/icons/tango/scalable/disk (48-48).svg index 79f172df..79f172df 100644 --- a/src/com.gluster.storage.management.console/icons/tango/scalable/disk (48-48).svg +++ b/src/org.gluster.storage.management.console/icons/tango/scalable/disk (48-48).svg diff --git a/src/com.gluster.storage.management.console/icons/tango/scalable/disk.svg b/src/org.gluster.storage.management.console/icons/tango/scalable/disk.svg index 730e9b27..730e9b27 100644 --- a/src/com.gluster.storage.management.console/icons/tango/scalable/disk.svg +++ b/src/org.gluster.storage.management.console/icons/tango/scalable/disk.svg diff --git a/src/com.gluster.storage.management.console/icons/tango/scalable/disk_available.svg b/src/org.gluster.storage.management.console/icons/tango/scalable/disk_available.svg index 667535c1..667535c1 100644 --- a/src/com.gluster.storage.management.console/icons/tango/scalable/disk_available.svg +++ b/src/org.gluster.storage.management.console/icons/tango/scalable/disk_available.svg diff --git a/src/com.gluster.storage.management.console/icons/tango/scalable/disk_error.svg b/src/org.gluster.storage.management.console/icons/tango/scalable/disk_error.svg index 1dda3bbf..1dda3bbf 100644 --- a/src/com.gluster.storage.management.console/icons/tango/scalable/disk_error.svg +++ b/src/org.gluster.storage.management.console/icons/tango/scalable/disk_error.svg diff --git a/src/com.gluster.storage.management.console/icons/tango/scalable/disk_initialisation.svg b/src/org.gluster.storage.management.console/icons/tango/scalable/disk_initialisation.svg index 5bffaa8f..5bffaa8f 100644 --- a/src/com.gluster.storage.management.console/icons/tango/scalable/disk_initialisation.svg +++ b/src/org.gluster.storage.management.console/icons/tango/scalable/disk_initialisation.svg diff --git a/src/com.gluster.storage.management.console/icons/tango/scalable/disk_inuse.svg b/src/org.gluster.storage.management.console/icons/tango/scalable/disk_inuse.svg index 5d5388b2..5d5388b2 100644 --- a/src/com.gluster.storage.management.console/icons/tango/scalable/disk_inuse.svg +++ b/src/org.gluster.storage.management.console/icons/tango/scalable/disk_inuse.svg diff --git a/src/com.gluster.storage.management.console/icons/tango/scalable/disk_uninitialised.svg b/src/org.gluster.storage.management.console/icons/tango/scalable/disk_uninitialised.svg index f3cdd2ee..f3cdd2ee 100644 --- a/src/com.gluster.storage.management.console/icons/tango/scalable/disk_uninitialised.svg +++ b/src/org.gluster.storage.management.console/icons/tango/scalable/disk_uninitialised.svg diff --git a/src/com.gluster.storage.management.console/icons/tango/scalable/download_log.svg b/src/org.gluster.storage.management.console/icons/tango/scalable/download_log.svg index 2ac27d12..2ac27d12 100644 --- a/src/com.gluster.storage.management.console/icons/tango/scalable/download_log.svg +++ b/src/org.gluster.storage.management.console/icons/tango/scalable/download_log.svg diff --git a/src/com.gluster.storage.management.console/icons/tango/scalable/high_CPU_usage.svg b/src/org.gluster.storage.management.console/icons/tango/scalable/high_CPU_usage.svg index 1ed67ab8..1ed67ab8 100644 --- a/src/com.gluster.storage.management.console/icons/tango/scalable/high_CPU_usage.svg +++ b/src/org.gluster.storage.management.console/icons/tango/scalable/high_CPU_usage.svg diff --git a/src/com.gluster.storage.management.console/icons/tango/scalable/high_memory_usage.svg b/src/org.gluster.storage.management.console/icons/tango/scalable/high_memory_usage.svg index 0ee3b389..0ee3b389 100644 --- a/src/com.gluster.storage.management.console/icons/tango/scalable/high_memory_usage.svg +++ b/src/org.gluster.storage.management.console/icons/tango/scalable/high_memory_usage.svg diff --git a/src/com.gluster.storage.management.console/icons/tango/scalable/log.svg b/src/org.gluster.storage.management.console/icons/tango/scalable/log.svg index 42559766..42559766 100644 --- a/src/com.gluster.storage.management.console/icons/tango/scalable/log.svg +++ b/src/org.gluster.storage.management.console/icons/tango/scalable/log.svg diff --git a/src/com.gluster.storage.management.console/icons/tango/scalable/low_diskspace.svg b/src/org.gluster.storage.management.console/icons/tango/scalable/low_diskspace.svg index dc5faa1b..dc5faa1b 100644 --- a/src/com.gluster.storage.management.console/icons/tango/scalable/low_diskspace.svg +++ b/src/org.gluster.storage.management.console/icons/tango/scalable/low_diskspace.svg diff --git a/src/com.gluster.storage.management.console/icons/tango/scalable/offline-8x8.svg b/src/org.gluster.storage.management.console/icons/tango/scalable/offline-8x8.svg index fb587339..fb587339 100644 --- a/src/com.gluster.storage.management.console/icons/tango/scalable/offline-8x8.svg +++ b/src/org.gluster.storage.management.console/icons/tango/scalable/offline-8x8.svg diff --git a/src/com.gluster.storage.management.console/icons/tango/scalable/offline.svg b/src/org.gluster.storage.management.console/icons/tango/scalable/offline.svg index 9ee10367..9ee10367 100644 --- a/src/com.gluster.storage.management.console/icons/tango/scalable/offline.svg +++ b/src/org.gluster.storage.management.console/icons/tango/scalable/offline.svg diff --git a/src/org.gluster.storage.management.console/icons/tango/scalable/offline_brick.svg b/src/org.gluster.storage.management.console/icons/tango/scalable/offline_brick.svg new file mode 100644 index 00000000..bf1963df --- /dev/null +++ b/src/org.gluster.storage.management.console/icons/tango/scalable/offline_brick.svg @@ -0,0 +1,4413 @@ +<?xml version="1.0" encoding="UTF-8" standalone="no"?> +<!-- Created with Inkscape (http://www.inkscape.org/) --> + +<svg + xmlns:dc="http://purl.org/dc/elements/1.1/" + xmlns:cc="http://creativecommons.org/ns#" + xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" + xmlns:svg="http://www.w3.org/2000/svg" + xmlns="http://www.w3.org/2000/svg" + xmlns:xlink="http://www.w3.org/1999/xlink" + xmlns:sodipodi="http://sodipodi.sourceforge.net/DTD/sodipodi-0.dtd" + xmlns:inkscape="http://www.inkscape.org/namespaces/inkscape" + width="48px" + height="48px" + id="svg3373" + version="1.1" + inkscape:version="0.47pre4 r22446" + sodipodi:docname="offline_brick.svg"> + <defs + id="defs3375"> + <inkscape:perspective + sodipodi:type="inkscape:persp3d" + inkscape:vp_x="0 : 24 : 1" + inkscape:vp_y="0 : 1000 : 0" + inkscape:vp_z="48 : 24 : 1" + inkscape:persp3d-origin="24 : 16 : 1" + id="perspective855" /> + <linearGradient + id="linearGradient11720"> + <stop + style="stop-color:#397303;stop-opacity:1" + offset="0" + id="stop11722" /> + <stop + style="stop-color:#3a7304;stop-opacity:1" + offset="1" + id="stop11724" /> + </linearGradient> + <linearGradient + id="linearGradient11703"> + <stop + id="stop11705" + offset="0" + style="stop-color:#428504;stop-opacity:1" /> + <stop + id="stop11707" + offset="1" + style="stop-color:#428504;stop-opacity:1" /> + </linearGradient> + <linearGradient + id="linearGradient11691"> + <stop + id="stop11693" + offset="0.0000000" + style="stop-color:#adff5e;stop-opacity:1" /> + <stop + id="stop11695" + offset="1.0000000" + style="stop-color:#428504;stop-opacity:1" /> + </linearGradient> + <linearGradient + id="linearGradient6230"> + <stop + style="stop-color:#b4fb71;stop-opacity:1" + offset="0" + id="stop6232" /> + <stop + style="stop-color:#3fa617;stop-opacity:1" + offset="1" + id="stop6234" /> + </linearGradient> + <linearGradient + id="linearGradient6214"> + <stop + style="stop-color:#38a111;stop-opacity:1" + offset="0" + id="stop6216" /> + <stop + style="stop-color:#baff76;stop-opacity:1" + offset="1" + id="stop6218" /> + </linearGradient> + <linearGradient + id="linearGradient6488-3"> + <stop + id="stop6490-82" + offset="0" + style="stop-color:#38a111;stop-opacity:1;" /> + <stop + id="stop6492-1" + offset="1" + style="stop-color:#baff76;stop-opacity:1;" /> + </linearGradient> + <linearGradient + id="linearGradient6359-4"> + <stop + style="stop-color:#50980a;stop-opacity:1" + offset="0" + id="stop6361-5" /> + <stop + style="stop-color:#a5f263;stop-opacity:1" + offset="1" + id="stop6363-4" /> + </linearGradient> + <linearGradient + id="linearGradient6367-09"> + <stop + style="stop-color:#a5f263;stop-opacity:1" + offset="0" + id="stop6369-11" /> + <stop + style="stop-color:#73d336;stop-opacity:1" + offset="1" + id="stop6371-8" /> + </linearGradient> + <linearGradient + id="linearGradient7721-5"> + <stop + id="stop7723-5" + offset="0" + style="stop-color:#ffffff;stop-opacity:1" /> + <stop + id="stop7725-5" + offset="1" + style="stop-color:#ffffff;stop-opacity:0" /> + </linearGradient> + <linearGradient + inkscape:collect="always" + id="linearGradient6817-4"> + <stop + style="stop-color:#ffffff;stop-opacity:0" + offset="0" + id="stop6819-3" /> + <stop + style="stop-color:#ffffff;stop-opacity:1" + offset="1" + id="stop6821-0" /> + </linearGradient> + <linearGradient + y2="26.726358" + x2="-60.5989" + y1="85.233597" + x1="-61.105808" + gradientTransform="matrix(0.20634219,-2.8251295,-0.55401321,-0.04046413,292.054,-157.519)" + gradientUnits="userSpaceOnUse" + id="linearGradient7455" + xlink:href="#linearGradient6817-4" + inkscape:collect="always" /> + <linearGradient + id="linearGradient4134-9"> + <stop + id="stop4136-4" + offset="0" + style="stop-color:#4f79a6;stop-opacity:1;" /> + <stop + style="stop-color:#7fa8d3;stop-opacity:1" + offset="0.25000000" + id="stop4148-8" /> + <stop + style="stop-color:#7fa8d3;stop-opacity:1" + offset="0.45037496" + id="stop4142-8" /> + <stop + id="stop4138-2" + offset="1" + style="stop-color:#547ba6;stop-opacity:1" /> + </linearGradient> + <linearGradient + id="linearGradient4206-4"> + <stop + id="stop4208-5" + offset="0.0000000" + style="stop-color:#3465a4;stop-opacity:1" /> + <stop + id="stop4210-5" + offset="1.0000000" + style="stop-color:#3465a4;stop-opacity:1" /> + </linearGradient> + <linearGradient + id="linearGradient3452"> + <stop + id="stop3454" + offset="0" + style="stop-color:#4f79a6;stop-opacity:1;" /> + <stop + style="stop-color:#7fa8d3;stop-opacity:1" + offset="0.25000000" + id="stop3456" /> + <stop + style="stop-color:#7fa8d3;stop-opacity:1" + offset="0.45037496" + id="stop3458" /> + <stop + id="stop3460" + offset="1" + style="stop-color:#547ba6;stop-opacity:1" /> + </linearGradient> + <linearGradient + id="linearGradient3463"> + <stop + id="stop3465" + offset="0.0000000" + style="stop-color:#3465a4;stop-opacity:1" /> + <stop + id="stop3467" + offset="1.0000000" + style="stop-color:#3465a4;stop-opacity:1" /> + </linearGradient> + <linearGradient + id="linearGradient7210"> + <stop + id="stop7212" + offset="0.0000000" + style="stop-color:#ffffff;stop-opacity:1.0000000;" /> + <stop + id="stop7214" + offset="1.0000000" + style="stop-color:#bfbebf;stop-opacity:1" /> + </linearGradient> + <linearGradient + id="linearGradient4539"> + <stop + style="stop-color:#c71807;stop-opacity:1" + offset="0" + id="stop4541" /> + <stop + style="stop-color:#ff6544;stop-opacity:1;" + offset="1" + id="stop4543" /> + </linearGradient> + <linearGradient + id="linearGradient4551"> + <stop + id="stop4553" + offset="0" + style="stop-color:#f05134;stop-opacity:1" /> + <stop + id="stop4555" + offset="1" + style="stop-color:#ca1c0a;stop-opacity:1" /> + </linearGradient> + <linearGradient + id="linearGradient4545"> + <stop + id="stop4547" + offset="0" + style="stop-color:#f05034;stop-opacity:1" /> + <stop + id="stop4549" + offset="1" + style="stop-color:#ca1c0a;stop-opacity:1" /> + </linearGradient> + <linearGradient + id="linearGradient7721"> + <stop + id="stop7723" + offset="0" + style="stop-color:#ffffff;stop-opacity:1" /> + <stop + id="stop7725" + offset="1" + style="stop-color:#ffffff;stop-opacity:0" /> + </linearGradient> + <clipPath + clipPathUnits="userSpaceOnUse" + id="clipPath7209"> + <path + sodipodi:nodetypes="ccccccccccccc" + style="color:#000000;fill:#3a3a3a;fill-opacity:1;fill-rule:nonzero;stroke:none;stroke-width:1.00492704;marker:none;visibility:visible;display:block;overflow:visible" + d="m 55.991327,-9.5439311 0.384644,4.0541047 -4.410784,7.023608 1.238412,0.974332 0.02253,0.015935 c -1.131789,1.0529117 -2.602855,2.9928473 -3.667193,4.5026759 2.012445,1.1908153 4.067679,2.1356347 7.402896,2.5239083 0.463464,3.7503962 1.711167,6.4499082 2.697553,5.8955612 L 65.971804,17.247968 76.042629,13.937535 72.997753,-3.7702594 57.73133,-10.478992 z" + id="path7211" + inkscape:connector-curvature="0" /> + </clipPath> + <linearGradient + id="linearGradient5455-2"> + <stop + style="stop-color:#ffffff;stop-opacity:0" + offset="0" + id="stop5457-4" /> + <stop + style="stop-color:#ffffff;stop-opacity:1" + offset="1" + id="stop5459-3" /> + </linearGradient> + <linearGradient + id="linearGradient4134-9-0"> + <stop + id="stop4136-4-1" + offset="0" + style="stop-color:#4f79a6;stop-opacity:1;" /> + <stop + style="stop-color:#7fa8d3;stop-opacity:1" + offset="0.25000000" + id="stop4148-8-6" /> + <stop + style="stop-color:#7fa8d3;stop-opacity:1" + offset="0.45037496" + id="stop4142-8-8" /> + <stop + id="stop4138-2-9" + offset="1" + style="stop-color:#547ba6;stop-opacity:1" /> + </linearGradient> + <linearGradient + id="linearGradient4206-4-5"> + <stop + id="stop4208-5-7" + offset="0.0000000" + style="stop-color:#2b558c;stop-opacity:1" /> + <stop + id="stop4210-5-6" + offset="1.0000000" + style="stop-color:#2c568c;stop-opacity:1" /> + </linearGradient> + <linearGradient + id="linearGradient7210-3"> + <stop + id="stop7212-2" + offset="0.0000000" + style="stop-color:#ffffff;stop-opacity:1.0000000;" /> + <stop + id="stop7214-3" + offset="1.0000000" + style="stop-color:#bfbebf;stop-opacity:1" /> + </linearGradient> + <linearGradient + id="linearGradient2316-0-5"> + <stop + id="stop2318-7-1" + offset="0" + style="stop-color:#a48600;stop-opacity:1;" /> + <stop + id="stop2320-5-1" + offset="1" + style="stop-color:#c4a000;stop-opacity:0;" /> + </linearGradient> + <linearGradient + id="linearGradient2326-1-9"> + <stop + id="stop2328-8-2" + offset="0" + style="stop-color:#ffffff;stop-opacity:1;" /> + <stop + id="stop2330-5-2" + offset="1" + style="stop-color:#ffffff;stop-opacity:0;" /> + </linearGradient> + <linearGradient + id="linearGradient6488-3-8"> + <stop + id="stop6490-82-0" + offset="0" + style="stop-color:#38a111;stop-opacity:1;" /> + <stop + id="stop6492-1-1" + offset="1" + style="stop-color:#baff76;stop-opacity:1;" /> + </linearGradient> + <linearGradient + id="linearGradient6359-4-7"> + <stop + style="stop-color:#50980a;stop-opacity:1" + offset="0" + id="stop6361-5-4" /> + <stop + style="stop-color:#a5f263;stop-opacity:1" + offset="1" + id="stop6363-4-6" /> + </linearGradient> + <linearGradient + id="linearGradient6367-09-0"> + <stop + style="stop-color:#a5f263;stop-opacity:1" + offset="0" + id="stop6369-11-7" /> + <stop + style="stop-color:#73d336;stop-opacity:1" + offset="1" + id="stop6371-8-4" /> + </linearGradient> + <linearGradient + id="linearGradient7721-5-2"> + <stop + id="stop7723-5-1" + offset="0" + style="stop-color:#ffffff;stop-opacity:1" /> + <stop + id="stop7725-5-8" + offset="1" + style="stop-color:#ffffff;stop-opacity:0" /> + </linearGradient> + <linearGradient + inkscape:collect="always" + id="linearGradient6817-4-5"> + <stop + style="stop-color:#ffffff;stop-opacity:0" + offset="0" + id="stop6819-3-7" /> + <stop + style="stop-color:#ffffff;stop-opacity:1" + offset="1" + id="stop6821-0-1" /> + </linearGradient> + <linearGradient + y2="26.726358" + x2="-60.5989" + y1="85.233597" + x1="-61.105808" + gradientTransform="matrix(0.20634219,-2.8251295,-0.55401321,-0.04046413,292.054,-157.519)" + gradientUnits="userSpaceOnUse" + id="linearGradient7455-7" + xlink:href="#linearGradient6817-4-5" + inkscape:collect="always" /> + <linearGradient + id="linearGradient4134-9-8"> + <stop + id="stop4136-4-2" + offset="0" + style="stop-color:#4f79a6;stop-opacity:1;" /> + <stop + style="stop-color:#7fa8d3;stop-opacity:1" + offset="0.25000000" + id="stop4148-8-3" /> + <stop + style="stop-color:#7fa8d3;stop-opacity:1" + offset="0.45037496" + id="stop4142-8-0" /> + <stop + id="stop4138-2-2" + offset="1" + style="stop-color:#547ba6;stop-opacity:1" /> + </linearGradient> + <linearGradient + id="linearGradient4206-4-8"> + <stop + id="stop4208-5-8" + offset="0.0000000" + style="stop-color:#3465a4;stop-opacity:1" /> + <stop + id="stop4210-5-5" + offset="1.0000000" + style="stop-color:#3465a4;stop-opacity:1" /> + </linearGradient> + <linearGradient + id="linearGradient3452-1"> + <stop + id="stop3454-4" + offset="0" + style="stop-color:#4f79a6;stop-opacity:1;" /> + <stop + style="stop-color:#7fa8d3;stop-opacity:1" + offset="0.25000000" + id="stop3456-1" /> + <stop + style="stop-color:#7fa8d3;stop-opacity:1" + offset="0.45037496" + id="stop3458-2" /> + <stop + id="stop3460-6" + offset="1" + style="stop-color:#547ba6;stop-opacity:1" /> + </linearGradient> + <linearGradient + id="linearGradient3463-3"> + <stop + id="stop3465-3" + offset="0.0000000" + style="stop-color:#3465a4;stop-opacity:1" /> + <stop + id="stop3467-0" + offset="1.0000000" + style="stop-color:#3465a4;stop-opacity:1" /> + </linearGradient> + <linearGradient + id="linearGradient7210-1"> + <stop + id="stop7212-3" + offset="0.0000000" + style="stop-color:#ffffff;stop-opacity:1.0000000;" /> + <stop + id="stop7214-8" + offset="1.0000000" + style="stop-color:#bfbebf;stop-opacity:1" /> + </linearGradient> + <linearGradient + id="linearGradient4539-9"> + <stop + style="stop-color:#c71807;stop-opacity:1" + offset="0" + id="stop4541-8" /> + <stop + style="stop-color:#ff6544;stop-opacity:1;" + offset="1" + id="stop4543-0" /> + </linearGradient> + <linearGradient + id="linearGradient4551-3"> + <stop + id="stop4553-9" + offset="0" + style="stop-color:#f05134;stop-opacity:1" /> + <stop + id="stop4555-3" + offset="1" + style="stop-color:#ca1c0a;stop-opacity:1" /> + </linearGradient> + <linearGradient + id="linearGradient4545-3"> + <stop + id="stop4547-6" + offset="0" + style="stop-color:#f05034;stop-opacity:1" /> + <stop + id="stop4549-5" + offset="1" + style="stop-color:#ca1c0a;stop-opacity:1" /> + </linearGradient> + <linearGradient + id="linearGradient7721-4"> + <stop + id="stop7723-0" + offset="0" + style="stop-color:#ffffff;stop-opacity:1" /> + <stop + id="stop7725-50" + offset="1" + style="stop-color:#ffffff;stop-opacity:0" /> + </linearGradient> + <clipPath + clipPathUnits="userSpaceOnUse" + id="clipPath7209-6"> + <path + sodipodi:nodetypes="ccccccccccccc" + style="color:#000000;fill:#3a3a3a;fill-opacity:1;fill-rule:nonzero;stroke:none;stroke-width:1.00492704;marker:none;visibility:visible;display:block;overflow:visible" + d="m 55.991327,-9.5439311 0.384644,4.0541047 -4.410784,7.023608 1.238412,0.974332 0.02253,0.015935 c -1.131789,1.0529117 -2.602855,2.9928473 -3.667193,4.5026759 2.012445,1.1908153 4.067679,2.1356347 7.402896,2.5239083 0.463464,3.7503962 1.711167,6.4499082 2.697553,5.8955612 L 65.971804,17.247968 76.042629,13.937535 72.997753,-3.7702594 57.73133,-10.478992 z" + id="path7211-2" + inkscape:connector-curvature="0" /> + </clipPath> + <linearGradient + id="linearGradient5455-2-5"> + <stop + style="stop-color:#ffffff;stop-opacity:0" + offset="0" + id="stop5457-4-0" /> + <stop + style="stop-color:#ffffff;stop-opacity:1" + offset="1" + id="stop5459-3-5" /> + </linearGradient> + <linearGradient + id="linearGradient4134-9-0-5"> + <stop + id="stop4136-4-1-2" + offset="0" + style="stop-color:#4f79a6;stop-opacity:1;" /> + <stop + style="stop-color:#7fa8d3;stop-opacity:1" + offset="0.25000000" + id="stop4148-8-6-0" /> + <stop + style="stop-color:#7fa8d3;stop-opacity:1" + offset="0.45037496" + id="stop4142-8-8-6" /> + <stop + id="stop4138-2-9-7" + offset="1" + style="stop-color:#547ba6;stop-opacity:1" /> + </linearGradient> + <linearGradient + id="linearGradient4206-4-5-8"> + <stop + id="stop4208-5-7-0" + offset="0.0000000" + style="stop-color:#2b558c;stop-opacity:1" /> + <stop + id="stop4210-5-6-0" + offset="1.0000000" + style="stop-color:#2c568c;stop-opacity:1" /> + </linearGradient> + <linearGradient + id="linearGradient7210-3-4"> + <stop + id="stop7212-2-3" + offset="0.0000000" + style="stop-color:#ffffff;stop-opacity:1.0000000;" /> + <stop + id="stop7214-3-7" + offset="1.0000000" + style="stop-color:#bfbebf;stop-opacity:1" /> + </linearGradient> + <linearGradient + id="linearGradient2316-0-5-1"> + <stop + id="stop2318-7-1-8" + offset="0" + style="stop-color:#a48600;stop-opacity:1;" /> + <stop + id="stop2320-5-1-5" + offset="1" + style="stop-color:#c4a000;stop-opacity:0;" /> + </linearGradient> + <linearGradient + id="linearGradient2326-1-9-5"> + <stop + id="stop2328-8-2-2" + offset="0" + style="stop-color:#ffffff;stop-opacity:1;" /> + <stop + id="stop2330-5-2-3" + offset="1" + style="stop-color:#ffffff;stop-opacity:0;" /> + </linearGradient> + <linearGradient + id="linearGradient6488-3-9"> + <stop + id="stop6490-82-08" + offset="0" + style="stop-color:#38a111;stop-opacity:1;" /> + <stop + id="stop6492-1-0" + offset="1" + style="stop-color:#baff76;stop-opacity:1;" /> + </linearGradient> + <linearGradient + id="linearGradient6359-4-5"> + <stop + style="stop-color:#50980a;stop-opacity:1" + offset="0" + id="stop6361-5-1" /> + <stop + style="stop-color:#a5f263;stop-opacity:1" + offset="1" + id="stop6363-4-0" /> + </linearGradient> + <linearGradient + id="linearGradient6367-09-9"> + <stop + style="stop-color:#a5f263;stop-opacity:1" + offset="0" + id="stop6369-11-5" /> + <stop + style="stop-color:#73d336;stop-opacity:1" + offset="1" + id="stop6371-8-8" /> + </linearGradient> + <linearGradient + id="linearGradient7721-5-6"> + <stop + id="stop7723-5-2" + offset="0" + style="stop-color:#ffffff;stop-opacity:1" /> + <stop + id="stop7725-5-5" + offset="1" + style="stop-color:#ffffff;stop-opacity:0" /> + </linearGradient> + <linearGradient + inkscape:collect="always" + id="linearGradient6817-4-6"> + <stop + style="stop-color:#ffffff;stop-opacity:0" + offset="0" + id="stop6819-3-3" /> + <stop + style="stop-color:#ffffff;stop-opacity:1" + offset="1" + id="stop6821-0-8" /> + </linearGradient> + <linearGradient + y2="26.726358" + x2="-60.5989" + y1="85.233597" + x1="-61.105808" + gradientTransform="matrix(0.20634219,-2.8251295,-0.55401321,-0.04046413,292.054,-157.519)" + gradientUnits="userSpaceOnUse" + id="linearGradient7455-9" + xlink:href="#linearGradient6817-4-6" + inkscape:collect="always" /> + <linearGradient + id="linearGradient4134-9-02"> + <stop + id="stop4136-4-5" + offset="0" + style="stop-color:#4f79a6;stop-opacity:1;" /> + <stop + style="stop-color:#7fa8d3;stop-opacity:1" + offset="0.25000000" + id="stop4148-8-1" /> + <stop + style="stop-color:#7fa8d3;stop-opacity:1" + offset="0.45037496" + id="stop4142-8-5" /> + <stop + id="stop4138-2-7" + offset="1" + style="stop-color:#547ba6;stop-opacity:1" /> + </linearGradient> + <linearGradient + id="linearGradient4206-4-4"> + <stop + id="stop4208-5-1" + offset="0.0000000" + style="stop-color:#3465a4;stop-opacity:1" /> + <stop + id="stop4210-5-7" + offset="1.0000000" + style="stop-color:#3465a4;stop-opacity:1" /> + </linearGradient> + <linearGradient + id="linearGradient3452-13"> + <stop + id="stop3454-1" + offset="0" + style="stop-color:#4f79a6;stop-opacity:1;" /> + <stop + style="stop-color:#7fa8d3;stop-opacity:1" + offset="0.25000000" + id="stop3456-5" /> + <stop + style="stop-color:#7fa8d3;stop-opacity:1" + offset="0.45037496" + id="stop3458-1" /> + <stop + id="stop3460-5" + offset="1" + style="stop-color:#547ba6;stop-opacity:1" /> + </linearGradient> + <linearGradient + id="linearGradient3463-5"> + <stop + id="stop3465-1" + offset="0.0000000" + style="stop-color:#3465a4;stop-opacity:1" /> + <stop + id="stop3467-2" + offset="1.0000000" + style="stop-color:#3465a4;stop-opacity:1" /> + </linearGradient> + <linearGradient + id="linearGradient7210-5"> + <stop + id="stop7212-5" + offset="0.0000000" + style="stop-color:#ffffff;stop-opacity:1.0000000;" /> + <stop + id="stop7214-38" + offset="1.0000000" + style="stop-color:#bfbebf;stop-opacity:1" /> + </linearGradient> + <linearGradient + id="linearGradient4539-8"> + <stop + style="stop-color:#c71807;stop-opacity:1" + offset="0" + id="stop4541-4" /> + <stop + style="stop-color:#ff6544;stop-opacity:1;" + offset="1" + id="stop4543-2" /> + </linearGradient> + <linearGradient + id="linearGradient4551-5"> + <stop + id="stop4553-8" + offset="0" + style="stop-color:#f05134;stop-opacity:1" /> + <stop + id="stop4555-4" + offset="1" + style="stop-color:#ca1c0a;stop-opacity:1" /> + </linearGradient> + <linearGradient + id="linearGradient4545-9"> + <stop + id="stop4547-4" + offset="0" + style="stop-color:#f05034;stop-opacity:1" /> + <stop + id="stop4549-4" + offset="1" + style="stop-color:#ca1c0a;stop-opacity:1" /> + </linearGradient> + <linearGradient + id="linearGradient7721-58"> + <stop + id="stop7723-4" + offset="0" + style="stop-color:#ffffff;stop-opacity:1" /> + <stop + id="stop7725-1" + offset="1" + style="stop-color:#ffffff;stop-opacity:0" /> + </linearGradient> + <clipPath + clipPathUnits="userSpaceOnUse" + id="clipPath7209-5"> + <path + sodipodi:nodetypes="ccccccccccccc" + style="color:#000000;fill:#3a3a3a;fill-opacity:1;fill-rule:nonzero;stroke:none;stroke-width:1.00492704;marker:none;visibility:visible;display:block;overflow:visible" + d="m 55.991327,-9.5439311 0.384644,4.0541047 -4.410784,7.023608 1.238412,0.974332 0.02253,0.015935 c -1.131789,1.0529117 -2.602855,2.9928473 -3.667193,4.5026759 2.012445,1.1908153 4.067679,2.1356347 7.402896,2.5239083 0.463464,3.7503962 1.711167,6.4499082 2.697553,5.8955612 L 65.971804,17.247968 76.042629,13.937535 72.997753,-3.7702594 57.73133,-10.478992 z" + id="path7211-6" + inkscape:connector-curvature="0" /> + </clipPath> + <linearGradient + id="linearGradient5455-2-9"> + <stop + style="stop-color:#ffffff;stop-opacity:0" + offset="0" + id="stop5457-4-8" /> + <stop + style="stop-color:#ffffff;stop-opacity:1" + offset="1" + id="stop5459-3-3" /> + </linearGradient> + <linearGradient + id="linearGradient4134-9-0-7"> + <stop + id="stop4136-4-1-9" + offset="0" + style="stop-color:#4f79a6;stop-opacity:1;" /> + <stop + style="stop-color:#7fa8d3;stop-opacity:1" + offset="0.25000000" + id="stop4148-8-6-04" /> + <stop + style="stop-color:#7fa8d3;stop-opacity:1" + offset="0.45037496" + id="stop4142-8-8-8" /> + <stop + id="stop4138-2-9-74" + offset="1" + style="stop-color:#547ba6;stop-opacity:1" /> + </linearGradient> + <linearGradient + id="linearGradient4206-4-5-2"> + <stop + id="stop4208-5-7-3" + offset="0.0000000" + style="stop-color:#2b558c;stop-opacity:1" /> + <stop + id="stop4210-5-6-5" + offset="1.0000000" + style="stop-color:#2c568c;stop-opacity:1" /> + </linearGradient> + <linearGradient + id="linearGradient7210-3-5"> + <stop + id="stop7212-2-2" + offset="0.0000000" + style="stop-color:#ffffff;stop-opacity:1.0000000;" /> + <stop + id="stop7214-3-9" + offset="1.0000000" + style="stop-color:#bfbebf;stop-opacity:1" /> + </linearGradient> + <linearGradient + id="linearGradient2316-0-5-8"> + <stop + id="stop2318-7-1-7" + offset="0" + style="stop-color:#a48600;stop-opacity:1;" /> + <stop + id="stop2320-5-1-8" + offset="1" + style="stop-color:#c4a000;stop-opacity:0;" /> + </linearGradient> + <linearGradient + id="linearGradient2326-1-9-0"> + <stop + id="stop2328-8-2-1" + offset="0" + style="stop-color:#ffffff;stop-opacity:1;" /> + <stop + id="stop2330-5-2-32" + offset="1" + style="stop-color:#ffffff;stop-opacity:0;" /> + </linearGradient> + <linearGradient + inkscape:collect="always" + xlink:href="#linearGradient6488-3-7" + id="linearGradient9924-1" + gradientUnits="userSpaceOnUse" + gradientTransform="matrix(1.2591199,0.01934801,-0.01934801,1.2591199,342.13243,-20.226051)" + x1="-78.977859" + y1="31.32707" + x2="-48.390697" + y2="18.317263" /> + <linearGradient + id="linearGradient6488-3-7"> + <stop + id="stop6490-82-6" + offset="0" + style="stop-color:#38a111;stop-opacity:1;" /> + <stop + id="stop6492-1-17" + offset="1" + style="stop-color:#baff76;stop-opacity:1;" /> + </linearGradient> + <linearGradient + inkscape:collect="always" + xlink:href="#linearGradient6359-4-0" + id="linearGradient9926-3" + gradientUnits="userSpaceOnUse" + gradientTransform="matrix(1.2591199,0.01934801,-0.01934801,1.2591199,342.13243,-20.226051)" + x1="-78.034668" + y1="19.883467" + x2="-56.572613" + y2="25.997072" /> + <linearGradient + id="linearGradient6359-4-0"> + <stop + style="stop-color:#50980a;stop-opacity:1" + offset="0" + id="stop6361-5-6" /> + <stop + style="stop-color:#a5f263;stop-opacity:1" + offset="1" + id="stop6363-4-02" /> + </linearGradient> + <linearGradient + inkscape:collect="always" + xlink:href="#linearGradient6367-09-6" + id="linearGradient9928-5" + gradientUnits="userSpaceOnUse" + gradientTransform="matrix(1.2591199,0.01934801,-0.01934801,1.2591199,342.13243,-20.226051)" + x1="-66.404778" + y1="21.769932" + x2="-51.339279" + y2="26.261297" /> + <linearGradient + id="linearGradient6367-09-6"> + <stop + style="stop-color:#a5f263;stop-opacity:1" + offset="0" + id="stop6369-11-0" /> + <stop + style="stop-color:#73d336;stop-opacity:1" + offset="1" + id="stop6371-8-7" /> + </linearGradient> + <linearGradient + inkscape:collect="always" + xlink:href="#linearGradient7721-5-0" + id="linearGradient9930-2" + gradientUnits="userSpaceOnUse" + gradientTransform="matrix(1.2623645,0.01939786,-0.01991094,1.2957544,342.35808,-20.945388)" + x1="-80.638779" + y1="22.180561" + x2="-45.592064" + y2="65.951057" /> + <linearGradient + id="linearGradient7721-5-0"> + <stop + id="stop7723-5-9" + offset="0" + style="stop-color:#ffffff;stop-opacity:1" /> + <stop + id="stop7725-5-54" + offset="1" + style="stop-color:#ffffff;stop-opacity:0" /> + </linearGradient> + <linearGradient + inkscape:collect="always" + xlink:href="#linearGradient6817-4-56" + id="linearGradient9932-32" + gradientUnits="userSpaceOnUse" + gradientTransform="matrix(3.672406,0.05643127,-0.00707387,0.46034998,484.35486,0.66073804)" + x1="-60.176182" + y1="48.328663" + x2="-60.225922" + y2="23.254047" /> + <linearGradient + inkscape:collect="always" + id="linearGradient6817-4-56"> + <stop + style="stop-color:#ffffff;stop-opacity:0" + offset="0" + id="stop6819-3-0" /> + <stop + style="stop-color:#ffffff;stop-opacity:1" + offset="1" + id="stop6821-0-88" /> + </linearGradient> + <linearGradient + inkscape:collect="always" + xlink:href="#linearGradient6817-4-56" + id="linearGradient9934-1" + gradientUnits="userSpaceOnUse" + gradientTransform="matrix(-1.2159587,-2.5583937,0.50170579,-0.23845183,183.14808,-136.98861)" + x1="-60.43829" + y1="49.03693" + x2="-60.549427" + y2="26.612957" /> + <linearGradient + y2="26.726358" + x2="-60.5989" + y1="85.233597" + x1="-61.105808" + gradientTransform="matrix(0.20634219,-2.8251295,-0.55401321,-0.04046413,292.054,-157.519)" + gradientUnits="userSpaceOnUse" + id="linearGradient7455-5" + xlink:href="#linearGradient6817-4-56" + inkscape:collect="always" /> + <linearGradient + id="linearGradient4134-9-5"> + <stop + id="stop4136-4-7" + offset="0" + style="stop-color:#4f79a6;stop-opacity:1;" /> + <stop + style="stop-color:#7fa8d3;stop-opacity:1" + offset="0.25000000" + id="stop4148-8-9" /> + <stop + style="stop-color:#7fa8d3;stop-opacity:1" + offset="0.45037496" + id="stop4142-8-2" /> + <stop + id="stop4138-2-3" + offset="1" + style="stop-color:#547ba6;stop-opacity:1" /> + </linearGradient> + <linearGradient + id="linearGradient4206-4-7"> + <stop + id="stop4208-5-9" + offset="0.0000000" + style="stop-color:#3465a4;stop-opacity:1" /> + <stop + id="stop4210-5-3" + offset="1.0000000" + style="stop-color:#3465a4;stop-opacity:1" /> + </linearGradient> + <linearGradient + id="linearGradient4176-3" + inkscape:collect="always"> + <stop + id="stop4178-8" + offset="0" + style="stop-color:#ffffff;stop-opacity:1;" /> + <stop + id="stop4180-1" + offset="1" + style="stop-color:#ffffff;stop-opacity:0;" /> + </linearGradient> + <linearGradient + id="linearGradient6924-6" + inkscape:collect="always"> + <stop + id="stop6926-8" + offset="0" + style="stop-color:#ffffff;stop-opacity:1;" /> + <stop + id="stop6928-76" + offset="1" + style="stop-color:#ffffff;stop-opacity:0;" /> + </linearGradient> + <linearGradient + id="linearGradient3452-3"> + <stop + id="stop3454-8" + offset="0" + style="stop-color:#4f79a6;stop-opacity:1;" /> + <stop + style="stop-color:#7fa8d3;stop-opacity:1" + offset="0.25000000" + id="stop3456-50" /> + <stop + style="stop-color:#7fa8d3;stop-opacity:1" + offset="0.45037496" + id="stop3458-9" /> + <stop + id="stop3460-2" + offset="1" + style="stop-color:#547ba6;stop-opacity:1" /> + </linearGradient> + <linearGradient + id="linearGradient3463-33"> + <stop + id="stop3465-5" + offset="0.0000000" + style="stop-color:#3465a4;stop-opacity:1" /> + <stop + id="stop3467-29" + offset="1.0000000" + style="stop-color:#3465a4;stop-opacity:1" /> + </linearGradient> + <linearGradient + id="linearGradient7210-7"> + <stop + id="stop7212-33" + offset="0.0000000" + style="stop-color:#ffffff;stop-opacity:1.0000000;" /> + <stop + id="stop7214-0" + offset="1.0000000" + style="stop-color:#bfbebf;stop-opacity:1" /> + </linearGradient> + <linearGradient + id="linearGradient4539-3"> + <stop + style="stop-color:#c71807;stop-opacity:1" + offset="0" + id="stop4541-2" /> + <stop + style="stop-color:#ff6544;stop-opacity:1;" + offset="1" + id="stop4543-1" /> + </linearGradient> + <linearGradient + id="linearGradient4551-8"> + <stop + id="stop4553-1" + offset="0" + style="stop-color:#f05134;stop-opacity:1" /> + <stop + id="stop4555-8" + offset="1" + style="stop-color:#ca1c0a;stop-opacity:1" /> + </linearGradient> + <linearGradient + id="linearGradient4545-2"> + <stop + id="stop4547-8" + offset="0" + style="stop-color:#f05034;stop-opacity:1" /> + <stop + id="stop4549-9" + offset="1" + style="stop-color:#ca1c0a;stop-opacity:1" /> + </linearGradient> + <linearGradient + id="linearGradient7721-3"> + <stop + id="stop7723-02" + offset="0" + style="stop-color:#ffffff;stop-opacity:1" /> + <stop + id="stop7725-8" + offset="1" + style="stop-color:#ffffff;stop-opacity:0" /> + </linearGradient> + <clipPath + clipPathUnits="userSpaceOnUse" + id="clipPath7209-8"> + <path + sodipodi:nodetypes="ccccccccccccc" + style="color:#000000;fill:#3a3a3a;fill-opacity:1;fill-rule:nonzero;stroke:none;stroke-width:1.00492704;marker:none;visibility:visible;display:block;overflow:visible" + d="m 55.991327,-9.5439311 0.384644,4.0541047 -4.410784,7.023608 1.238412,0.974332 0.02253,0.015935 c -1.131789,1.0529117 -2.602855,2.9928473 -3.667193,4.5026759 2.012445,1.1908153 4.067679,2.1356347 7.402896,2.5239083 0.463464,3.7503962 1.711167,6.4499082 2.697553,5.8955612 L 65.971804,17.247968 76.042629,13.937535 72.997753,-3.7702594 57.73133,-10.478992 z" + id="path7211-27" + inkscape:connector-curvature="0" /> + </clipPath> + <linearGradient + id="linearGradient5455-2-7"> + <stop + style="stop-color:#ffffff;stop-opacity:0" + offset="0" + id="stop5457-4-9" /> + <stop + style="stop-color:#ffffff;stop-opacity:1" + offset="1" + id="stop5459-3-50" /> + </linearGradient> + <linearGradient + id="linearGradient4134-9-0-4"> + <stop + id="stop4136-4-1-0" + offset="0" + style="stop-color:#4f79a6;stop-opacity:1;" /> + <stop + style="stop-color:#7fa8d3;stop-opacity:1" + offset="0.25000000" + id="stop4148-8-6-1" /> + <stop + style="stop-color:#7fa8d3;stop-opacity:1" + offset="0.45037496" + id="stop4142-8-8-5" /> + <stop + id="stop4138-2-9-3" + offset="1" + style="stop-color:#547ba6;stop-opacity:1" /> + </linearGradient> + <linearGradient + id="linearGradient4206-4-5-23"> + <stop + id="stop4208-5-7-2" + offset="0.0000000" + style="stop-color:#2b558c;stop-opacity:1" /> + <stop + id="stop4210-5-6-9" + offset="1.0000000" + style="stop-color:#2c568c;stop-opacity:1" /> + </linearGradient> + <linearGradient + id="linearGradient7210-3-44"> + <stop + id="stop7212-2-9" + offset="0.0000000" + style="stop-color:#ffffff;stop-opacity:1.0000000;" /> + <stop + id="stop7214-3-8" + offset="1.0000000" + style="stop-color:#bfbebf;stop-opacity:1" /> + </linearGradient> + <linearGradient + id="linearGradient2316-0-5-2"> + <stop + id="stop2318-7-1-9" + offset="0" + style="stop-color:#a48600;stop-opacity:1;" /> + <stop + id="stop2320-5-1-3" + offset="1" + style="stop-color:#c4a000;stop-opacity:0;" /> + </linearGradient> + <linearGradient + id="linearGradient2326-1-9-02"> + <stop + id="stop2328-8-2-0" + offset="0" + style="stop-color:#ffffff;stop-opacity:1;" /> + <stop + id="stop2330-5-2-1" + offset="1" + style="stop-color:#ffffff;stop-opacity:0;" /> + </linearGradient> + <linearGradient + y2="26.726358" + x2="-60.5989" + y1="85.233597" + x1="-61.105808" + gradientTransform="matrix(0.20634219,-2.8251295,-0.55401321,-0.04046413,292.054,-157.519)" + gradientUnits="userSpaceOnUse" + id="linearGradient3612-21" + xlink:href="#linearGradient6817-4-56" + inkscape:collect="always" /> + <linearGradient + inkscape:collect="always" + xlink:href="#linearGradient4134-9-5" + id="linearGradient5410" + gradientUnits="userSpaceOnUse" + gradientTransform="matrix(0.88340971,0,0,0.88340971,41.850823,-2.8039326)" + x1="9.9747334" + y1="31.09375" + x2="37.077564" + y2="31.09375" /> + <linearGradient + inkscape:collect="always" + xlink:href="#linearGradient4206-4-7" + id="linearGradient5412" + gradientUnits="userSpaceOnUse" + gradientTransform="matrix(0.88340971,0,0,0.88340971,41.850823,-2.8039326)" + x1="25.064732" + y1="21.857143" + x2="25.207588" + y2="25.428572" /> + <linearGradient + inkscape:collect="always" + xlink:href="#linearGradient4176-3" + id="linearGradient5414" + gradientUnits="userSpaceOnUse" + gradientTransform="matrix(0.88340971,0,0,0.88340971,41.850823,-2.8039326)" + x1="17.160095" + y1="14.004482" + x2="37.969398" + y2="56.575912" /> + <linearGradient + inkscape:collect="always" + xlink:href="#linearGradient6924-6" + id="linearGradient5418" + gradientUnits="userSpaceOnUse" + gradientTransform="matrix(0.88340971,0,0,0.88340971,41.724623,-0.46920261)" + x1="16.07143" + y1="19.5" + x2="15.785715" + y2="30" /> + <linearGradient + inkscape:collect="always" + xlink:href="#linearGradient6214" + id="linearGradient6220" + x1="28.158247" + y1="13.121862" + x2="21.283247" + y2="4.670352" + gradientUnits="userSpaceOnUse" /> + <linearGradient + inkscape:collect="always" + xlink:href="#linearGradient6230" + id="linearGradient6236" + x1="19.120131" + y1="20.965828" + x2="28.07798" + y2="14.630604" + gradientUnits="userSpaceOnUse" + gradientTransform="matrix(1,0,0,1.6296297,-48,-11.353009)" /> + <linearGradient + inkscape:collect="always" + xlink:href="#linearGradient6488-3-7" + id="linearGradient6258" + gradientUnits="userSpaceOnUse" + gradientTransform="matrix(1.0296406,0.01582176,-0.01582176,1.0296406,53.400982,-41.023689)" + x1="-78.977859" + y1="31.32707" + x2="-48.390697" + y2="18.317263" /> + <linearGradient + inkscape:collect="always" + xlink:href="#linearGradient6488-3-7-9" + id="linearGradient6258-9" + gradientUnits="userSpaceOnUse" + gradientTransform="matrix(1.0296406,0.01582176,-0.01582176,1.0296406,53.400982,-41.023689)" + x1="-78.977859" + y1="31.32707" + x2="-48.390697" + y2="18.317263" /> + <linearGradient + id="linearGradient6488-3-7-9"> + <stop + id="stop6490-82-6-6" + offset="0" + style="stop-color:#38a111;stop-opacity:1;" /> + <stop + id="stop6492-1-17-3" + offset="1" + style="stop-color:#baff76;stop-opacity:1;" /> + </linearGradient> + <linearGradient + inkscape:collect="always" + xlink:href="#linearGradient6214" + id="linearGradient6300" + gradientUnits="userSpaceOnUse" + x1="24.595747" + y1="14.996862" + x2="24.595747" + y2="4.670352" + gradientTransform="translate(79.25,0)" /> + <linearGradient + inkscape:collect="always" + xlink:href="#linearGradient6230" + id="linearGradient6302" + gradientUnits="userSpaceOnUse" + gradientTransform="translate(-127.25,0)" + x1="22.807631" + y1="14.75276" + x2="22.82798" + y2="17.890547" /> + <linearGradient + inkscape:collect="always" + xlink:href="#linearGradient6214" + id="linearGradient6323" + gradientUnits="userSpaceOnUse" + x1="28.158247" + y1="13.121862" + x2="21.283247" + y2="4.670352" /> + <linearGradient + inkscape:collect="always" + xlink:href="#linearGradient6230" + id="linearGradient6325" + gradientUnits="userSpaceOnUse" + gradientTransform="matrix(1,0,0,1.6296297,-48,-11.353009)" + x1="19.120131" + y1="20.965828" + x2="28.07798" + y2="14.630604" /> + <linearGradient + inkscape:collect="always" + xlink:href="#linearGradient6214" + id="linearGradient6337" + gradientUnits="userSpaceOnUse" + x1="28.158247" + y1="13.121862" + x2="21.283247" + y2="4.670352" /> + <linearGradient + inkscape:collect="always" + xlink:href="#linearGradient6230" + id="linearGradient6339" + gradientUnits="userSpaceOnUse" + gradientTransform="matrix(1,0,0,1.6296297,-48,-11.353009)" + x1="19.120131" + y1="20.965828" + x2="28.07798" + y2="14.630604" /> + <linearGradient + inkscape:collect="always" + xlink:href="#linearGradient6214" + id="linearGradient6364" + gradientUnits="userSpaceOnUse" + x1="28.158247" + y1="13.121862" + x2="21.283247" + y2="4.670352" /> + <linearGradient + inkscape:collect="always" + xlink:href="#linearGradient6230" + id="linearGradient6366" + gradientUnits="userSpaceOnUse" + gradientTransform="matrix(1,0,0,1.6296297,-48,-11.353009)" + x1="19.120131" + y1="20.965828" + x2="28.07798" + y2="14.630604" /> + <linearGradient + inkscape:collect="always" + xlink:href="#linearGradient6214" + id="linearGradient6368" + gradientUnits="userSpaceOnUse" + x1="28.158247" + y1="13.121862" + x2="21.283247" + y2="4.670352" /> + <linearGradient + inkscape:collect="always" + xlink:href="#linearGradient6230" + id="linearGradient6370" + gradientUnits="userSpaceOnUse" + gradientTransform="matrix(1,0,0,1.6296297,-48,-11.353009)" + x1="19.120131" + y1="20.965828" + x2="28.07798" + y2="14.630604" /> + <linearGradient + inkscape:collect="always" + xlink:href="#linearGradient6214" + id="linearGradient6372" + gradientUnits="userSpaceOnUse" + x1="28.158247" + y1="13.121862" + x2="21.283247" + y2="4.670352" /> + <linearGradient + inkscape:collect="always" + xlink:href="#linearGradient6230" + id="linearGradient6374" + gradientUnits="userSpaceOnUse" + gradientTransform="matrix(1,0,0,1.6296297,-48,-11.353009)" + x1="19.120131" + y1="20.965828" + x2="28.07798" + y2="14.630604" /> + <linearGradient + inkscape:collect="always" + xlink:href="#linearGradient6214" + id="linearGradient6391" + gradientUnits="userSpaceOnUse" + x1="28.158247" + y1="13.121862" + x2="21.283247" + y2="4.670352" /> + <linearGradient + inkscape:collect="always" + xlink:href="#linearGradient6230" + id="linearGradient6393" + gradientUnits="userSpaceOnUse" + gradientTransform="matrix(1,0,0,1.6296297,-48,-11.353009)" + x1="19.120131" + y1="20.965828" + x2="28.07798" + y2="14.630604" /> + <clipPath + clipPathUnits="userSpaceOnUse" + id="clipPath6566"> + <path + sodipodi:nodetypes="sssssss" + inkscape:connector-curvature="0" + id="path6568" + d="m 437.13691,15.625187 c 0,3.922069 -8.57373,7.101535 -19.14997,7.101535 -10.57623,0 -19.14997,-3.179466 -19.14997,-7.101535 0,-2.453312 -2.97639,-9.339638 2.1246,-10.615427 3.05388,-0.763794 13.06472,-4.48610801 17.02537,-4.48610801 4.65593,0 15.23964,3.20196201 18.55878,4.22641201 4.22049,1.302653 0.59119,8.679649 0.59119,10.875123 z" + style="color:#000000;fill:#3a3a3a;fill-opacity:1;fill-rule:nonzero;stroke:none;stroke-width:1.00492704;marker:none;visibility:visible;display:block;overflow:visible" + clip-path="none" /> + </clipPath> + <linearGradient + inkscape:collect="always" + xlink:href="#linearGradient4134-9-5" + id="linearGradient6639" + gradientUnits="userSpaceOnUse" + gradientTransform="matrix(1.4954152,0,0,1.4906315,382.15258,-11.973727)" + x1="9.9747334" + y1="31.09375" + x2="37.077564" + y2="31.09375" /> + <linearGradient + inkscape:collect="always" + xlink:href="#linearGradient4206-4-7" + id="linearGradient6641" + gradientUnits="userSpaceOnUse" + gradientTransform="matrix(1.4954152,0,0,1.4906315,382.15258,-11.973727)" + x1="25.064732" + y1="21.857143" + x2="25.207588" + y2="25.428572" /> + <linearGradient + inkscape:collect="always" + xlink:href="#linearGradient4176-3" + id="linearGradient6643" + gradientUnits="userSpaceOnUse" + gradientTransform="matrix(1.4954152,0,0,1.4954152,382.15258,-12.162834)" + x1="17.160095" + y1="14.004482" + x2="37.969398" + y2="56.575912" /> + <linearGradient + inkscape:collect="always" + xlink:href="#linearGradient7210-7" + id="linearGradient6645" + gradientUnits="userSpaceOnUse" + x1="24" + y1="16.525082" + x2="24" + y2="13.284962" /> + <linearGradient + inkscape:collect="always" + xlink:href="#linearGradient6924-6" + id="linearGradient6647" + gradientUnits="userSpaceOnUse" + gradientTransform="matrix(1.4954152,0,0,1.4954152,381.93895,-8.2106577)" + x1="16.07143" + y1="19.5" + x2="15.785715" + y2="30" /> + <linearGradient + inkscape:collect="always" + xlink:href="#linearGradient6214" + id="linearGradient6649" + gradientUnits="userSpaceOnUse" + gradientTransform="translate(394,0)" + x1="28.158247" + y1="13.121862" + x2="21.283247" + y2="4.670352" /> + <linearGradient + inkscape:collect="always" + xlink:href="#linearGradient6230" + id="linearGradient6651" + gradientUnits="userSpaceOnUse" + gradientTransform="matrix(1,0,0,3.0700325,-442,-31.270668)" + x1="19.120131" + y1="20.965828" + x2="28.07798" + y2="14.630604" /> + <linearGradient + inkscape:collect="always" + xlink:href="#linearGradient6214" + id="linearGradient6653" + gradientUnits="userSpaceOnUse" + gradientTransform="translate(394,0)" + x1="28.158247" + y1="13.121862" + x2="21.283247" + y2="4.670352" /> + <linearGradient + inkscape:collect="always" + xlink:href="#linearGradient6230" + id="linearGradient6655" + gradientUnits="userSpaceOnUse" + gradientTransform="matrix(1,0,0,3.0700325,-442,-31.270668)" + x1="19.120131" + y1="20.965828" + x2="28.07798" + y2="14.630604" /> + <linearGradient + inkscape:collect="always" + xlink:href="#linearGradient6214" + id="linearGradient6657" + gradientUnits="userSpaceOnUse" + gradientTransform="translate(394,0)" + x1="28.158247" + y1="13.121862" + x2="21.283247" + y2="4.670352" /> + <linearGradient + inkscape:collect="always" + xlink:href="#linearGradient6230" + id="linearGradient6659" + gradientUnits="userSpaceOnUse" + gradientTransform="matrix(1,0,0,3.0700325,-442,-31.270668)" + x1="19.120131" + y1="20.965828" + x2="28.07798" + y2="14.630604" /> + <linearGradient + inkscape:collect="always" + xlink:href="#linearGradient4134-9-4" + id="linearGradient7322-9" + gradientUnits="userSpaceOnUse" + gradientTransform="matrix(0.88340971,0,0,0.88340971,41.850823,-2.8039326)" + x1="9.9747334" + y1="31.09375" + x2="37.077564" + y2="31.09375" /> + <linearGradient + id="linearGradient4134-9-4"> + <stop + id="stop4136-4-75" + offset="0" + style="stop-color:#4f79a6;stop-opacity:1;" /> + <stop + style="stop-color:#7fa8d3;stop-opacity:1" + offset="0.25000000" + id="stop4148-8-0" /> + <stop + style="stop-color:#7fa8d3;stop-opacity:1" + offset="0.45037496" + id="stop4142-8-3" /> + <stop + id="stop4138-2-20" + offset="1" + style="stop-color:#547ba6;stop-opacity:1" /> + </linearGradient> + <linearGradient + inkscape:collect="always" + xlink:href="#linearGradient4206-4-88" + id="linearGradient7324-3" + gradientUnits="userSpaceOnUse" + gradientTransform="matrix(0.88340971,0,0,0.88340971,41.850823,-2.8039326)" + x1="25.064732" + y1="21.857143" + x2="25.207588" + y2="25.428572" /> + <linearGradient + id="linearGradient4206-4-88"> + <stop + id="stop4208-5-5" + offset="0.0000000" + style="stop-color:#3465a4;stop-opacity:1" /> + <stop + id="stop4210-5-9" + offset="1.0000000" + style="stop-color:#3465a4;stop-opacity:1" /> + </linearGradient> + <linearGradient + inkscape:collect="always" + xlink:href="#linearGradient4176-0" + id="linearGradient7326-4" + gradientUnits="userSpaceOnUse" + gradientTransform="matrix(0.88340971,0,0,0.88340971,41.850823,-2.8039326)" + x1="17.160095" + y1="14.004482" + x2="37.969398" + y2="56.575912" /> + <linearGradient + id="linearGradient4176-0" + inkscape:collect="always"> + <stop + id="stop4178-3" + offset="0" + style="stop-color:#ffffff;stop-opacity:1;" /> + <stop + id="stop4180-7" + offset="1" + style="stop-color:#ffffff;stop-opacity:0;" /> + </linearGradient> + <linearGradient + inkscape:collect="always" + xlink:href="#linearGradient7210-9" + id="linearGradient7328-7" + gradientUnits="userSpaceOnUse" + x1="24" + y1="16.525082" + x2="24" + y2="13.284962" /> + <linearGradient + id="linearGradient7210-9"> + <stop + id="stop7212-59" + offset="0.0000000" + style="stop-color:#ffffff;stop-opacity:1.0000000;" /> + <stop + id="stop7214-06" + offset="1.0000000" + style="stop-color:#bfbebf;stop-opacity:1" /> + </linearGradient> + <linearGradient + inkscape:collect="always" + xlink:href="#linearGradient6924-7" + id="linearGradient7330-8" + gradientUnits="userSpaceOnUse" + gradientTransform="matrix(0.88340971,0,0,0.88340971,41.724623,-0.46920261)" + x1="16.07143" + y1="19.5" + x2="15.785715" + y2="30" /> + <linearGradient + id="linearGradient6924-7" + inkscape:collect="always"> + <stop + id="stop6926-69" + offset="0" + style="stop-color:#ffffff;stop-opacity:1;" /> + <stop + id="stop6928-0" + offset="1" + style="stop-color:#ffffff;stop-opacity:0;" /> + </linearGradient> + <linearGradient + inkscape:collect="always" + xlink:href="#linearGradient4539-1" + id="linearGradient7332-9" + gradientUnits="userSpaceOnUse" + gradientTransform="matrix(1.0195811,0.01566719,-0.01566719,1.0195811,137.8252,6.1634)" + x1="-79.963799" + y1="31.954889" + x2="-52.985451" + y2="21.220755" /> + <linearGradient + id="linearGradient4539-1"> + <stop + style="stop-color:#c71807;stop-opacity:1" + offset="0" + id="stop4541-7" /> + <stop + style="stop-color:#ff6544;stop-opacity:1;" + offset="1" + id="stop4543-9" /> + </linearGradient> + <linearGradient + inkscape:collect="always" + xlink:href="#linearGradient4551-59" + id="linearGradient7334-8" + gradientUnits="userSpaceOnUse" + gradientTransform="matrix(1.0195811,0.01566719,-0.01566719,1.0195811,137.8252,6.1634)" + x1="-60.971153" + y1="26.995193" + x2="-63.190922" + y2="18.49259" /> + <linearGradient + id="linearGradient4551-59"> + <stop + id="stop4553-0" + offset="0" + style="stop-color:#f05134;stop-opacity:1" /> + <stop + id="stop4555-40" + offset="1" + style="stop-color:#ca1c0a;stop-opacity:1" /> + </linearGradient> + <linearGradient + inkscape:collect="always" + xlink:href="#linearGradient4545-25" + id="linearGradient7336-5" + gradientUnits="userSpaceOnUse" + gradientTransform="matrix(1.0195811,0.01566719,-0.01566719,1.0195811,137.8252,6.1634)" + x1="-60.379169" + y1="23.812271" + x2="-51.339279" + y2="26.261297" /> + <linearGradient + id="linearGradient4545-25"> + <stop + id="stop4547-80" + offset="0" + style="stop-color:#f05034;stop-opacity:1" /> + <stop + id="stop4549-7" + offset="1" + style="stop-color:#ca1c0a;stop-opacity:1" /> + </linearGradient> + <linearGradient + inkscape:collect="always" + xlink:href="#linearGradient7721-9" + id="linearGradient7338-4" + gradientUnits="userSpaceOnUse" + gradientTransform="matrix(1.0222085,0.01570755,-0.01612302,1.0492462,138.00792,5.5809119)" + x1="-80.638779" + y1="22.180561" + x2="-45.592064" + y2="65.951057" /> + <linearGradient + id="linearGradient7721-9"> + <stop + id="stop7723-3" + offset="0" + style="stop-color:#ffffff;stop-opacity:1" /> + <stop + id="stop7725-4" + offset="1" + style="stop-color:#ffffff;stop-opacity:0" /> + </linearGradient> + <linearGradient + inkscape:collect="always" + xlink:href="#linearGradient6817-1" + id="linearGradient7340-01" + gradientUnits="userSpaceOnUse" + gradientTransform="matrix(2.9737564,0.04569561,-0.00572812,0.37277161,252.99081,23.076623)" + x1="-60.273727" + y1="52.962711" + x2="-60.231167" + y2="20.531628" /> + <linearGradient + inkscape:collect="always" + id="linearGradient6817-1"> + <stop + style="stop-color:#ffffff;stop-opacity:0" + offset="0" + id="stop6819-4" /> + <stop + style="stop-color:#ffffff;stop-opacity:1" + offset="1" + id="stop6821-7" /> + </linearGradient> + <linearGradient + inkscape:collect="always" + xlink:href="#linearGradient6817-1" + id="linearGradient7342-1" + gradientUnits="userSpaceOnUse" + gradientTransform="matrix(-0.98463104,-2.0716772,0.40625977,-0.19308803,9.0865162,-88.385897)" + x1="-60.43829" + y1="49.03693" + x2="-60.549427" + y2="26.612957" /> + <linearGradient + inkscape:collect="always" + xlink:href="#linearGradient6817-1" + id="linearGradient7344-0" + gradientUnits="userSpaceOnUse" + gradientTransform="matrix(0.16708703,-2.2876683,-0.44861606,-0.03276611,97.273845,-105.01052)" + x1="-61.105808" + y1="85.233597" + x2="-60.5989" + y2="26.726358" /> + <clipPath + clipPathUnits="userSpaceOnUse" + id="clipPath7209-64"> + <path + sodipodi:nodetypes="ccccccccccccc" + style="color:#000000;fill:#3a3a3a;fill-opacity:1;fill-rule:nonzero;stroke:none;stroke-width:1.00492704;marker:none;visibility:visible;display:block;overflow:visible" + d="m 55.991327,-9.5439311 0.384644,4.0541047 -4.410784,7.023608 1.238412,0.974332 0.02253,0.015935 c -1.131789,1.0529117 -2.602855,2.9928473 -3.667193,4.5026759 2.012445,1.1908153 4.067679,2.1356347 7.402896,2.5239083 0.463464,3.7503962 1.711167,6.4499082 2.697553,5.8955612 L 65.971804,17.247968 76.042629,13.937535 72.997753,-3.7702594 57.73133,-10.478992 z" + id="path7211-3" + inkscape:connector-curvature="0" /> + </clipPath> + <linearGradient + inkscape:collect="always" + xlink:href="#linearGradient5455-2-0" + id="linearGradient7346-8" + gradientUnits="userSpaceOnUse" + x1="54.71489" + y1="5.4645443" + x2="72.233635" + y2="5.4645443" /> + <linearGradient + id="linearGradient5455-2-0"> + <stop + style="stop-color:#ffffff;stop-opacity:0" + offset="0" + id="stop5457-4-1" /> + <stop + style="stop-color:#ffffff;stop-opacity:1" + offset="1" + id="stop5459-3-0" /> + </linearGradient> + <linearGradient + inkscape:collect="always" + xlink:href="#linearGradient4134-9-5" + id="linearGradient6925" + gradientUnits="userSpaceOnUse" + gradientTransform="matrix(1.4954152,0,0,1.4906315,382.15258,-11.973727)" + x1="9.9747334" + y1="31.09375" + x2="37.077564" + y2="31.09375" /> + <linearGradient + inkscape:collect="always" + xlink:href="#linearGradient4206-4-7" + id="linearGradient6927" + gradientUnits="userSpaceOnUse" + gradientTransform="matrix(1.4954152,0,0,1.4906315,382.15258,-11.973727)" + x1="25.064732" + y1="21.857143" + x2="25.207588" + y2="25.428572" /> + <linearGradient + inkscape:collect="always" + xlink:href="#linearGradient4176-3" + id="linearGradient6929" + gradientUnits="userSpaceOnUse" + gradientTransform="matrix(1.4954152,0,0,1.4954152,382.15258,-12.162834)" + x1="17.160095" + y1="14.004482" + x2="37.969398" + y2="56.575912" /> + <linearGradient + inkscape:collect="always" + xlink:href="#linearGradient7210-7" + id="linearGradient6931" + gradientUnits="userSpaceOnUse" + x1="24" + y1="16.525082" + x2="24" + y2="13.284962" /> + <linearGradient + inkscape:collect="always" + xlink:href="#linearGradient6924-6" + id="linearGradient6933" + gradientUnits="userSpaceOnUse" + gradientTransform="matrix(1.4954152,0,0,1.4954152,381.93895,-8.2106577)" + x1="16.07143" + y1="19.5" + x2="15.785715" + y2="30" /> + <linearGradient + inkscape:collect="always" + xlink:href="#linearGradient4134-9-5-0" + id="linearGradient6925-9" + gradientUnits="userSpaceOnUse" + gradientTransform="matrix(1.4954152,0,0,1.4906315,382.15258,-11.973727)" + x1="9.9747334" + y1="31.09375" + x2="37.077564" + y2="31.09375" /> + <linearGradient + id="linearGradient4134-9-5-0"> + <stop + id="stop4136-4-7-3" + offset="0" + style="stop-color:#4f79a6;stop-opacity:1;" /> + <stop + style="stop-color:#7fa8d3;stop-opacity:1" + offset="0.25000000" + id="stop4148-8-9-1" /> + <stop + style="stop-color:#7fa8d3;stop-opacity:1" + offset="0.45037496" + id="stop4142-8-2-0" /> + <stop + id="stop4138-2-3-9" + offset="1" + style="stop-color:#547ba6;stop-opacity:1" /> + </linearGradient> + <linearGradient + inkscape:collect="always" + xlink:href="#linearGradient4206-4-7-2" + id="linearGradient6927-9" + gradientUnits="userSpaceOnUse" + gradientTransform="matrix(1.4954152,0,0,1.4906315,382.15258,-11.973727)" + x1="25.064732" + y1="21.857143" + x2="25.207588" + y2="25.428572" /> + <linearGradient + id="linearGradient4206-4-7-2"> + <stop + id="stop4208-5-9-5" + offset="0.0000000" + style="stop-color:#3465a4;stop-opacity:1" /> + <stop + id="stop4210-5-3-5" + offset="1.0000000" + style="stop-color:#3465a4;stop-opacity:1" /> + </linearGradient> + <linearGradient + inkscape:collect="always" + xlink:href="#linearGradient4176-3-6" + id="linearGradient6929-1" + gradientUnits="userSpaceOnUse" + gradientTransform="matrix(1.4954152,0,0,1.4954152,382.15258,-12.162834)" + x1="17.160095" + y1="14.004482" + x2="37.969398" + y2="56.575912" /> + <linearGradient + id="linearGradient4176-3-6" + inkscape:collect="always"> + <stop + id="stop4178-8-4" + offset="0" + style="stop-color:#ffffff;stop-opacity:1;" /> + <stop + id="stop4180-1-5" + offset="1" + style="stop-color:#ffffff;stop-opacity:0;" /> + </linearGradient> + <linearGradient + inkscape:collect="always" + xlink:href="#linearGradient7210-7-1" + id="linearGradient6931-7" + gradientUnits="userSpaceOnUse" + x1="24" + y1="16.525082" + x2="24" + y2="13.284962" /> + <linearGradient + id="linearGradient7210-7-1"> + <stop + id="stop7212-33-7" + offset="0.0000000" + style="stop-color:#ffffff;stop-opacity:1.0000000;" /> + <stop + id="stop7214-0-3" + offset="1.0000000" + style="stop-color:#bfbebf;stop-opacity:1" /> + </linearGradient> + <linearGradient + y2="30" + x2="15.785715" + y1="19.5" + x1="16.07143" + gradientTransform="matrix(1.4954152,0,0,1.4954152,381.93895,-8.2106577)" + gradientUnits="userSpaceOnUse" + id="linearGradient31475" + xlink:href="#linearGradient6924-6-7" + inkscape:collect="always" /> + <linearGradient + id="linearGradient6924-6-7" + inkscape:collect="always"> + <stop + id="stop6926-8-3" + offset="0" + style="stop-color:#ffffff;stop-opacity:1;" /> + <stop + id="stop6928-76-2" + offset="1" + style="stop-color:#ffffff;stop-opacity:0;" /> + </linearGradient> + <linearGradient + y2="30" + x2="15.785715" + y1="19.5" + x1="16.07143" + gradientTransform="matrix(1.4954152,0,0,1.4954152,381.93895,-8.2106577)" + gradientUnits="userSpaceOnUse" + id="linearGradient5597" + xlink:href="#linearGradient6924-6-7" + inkscape:collect="always" /> + <linearGradient + inkscape:collect="always" + xlink:href="#linearGradient4134-9-5-6" + id="linearGradient9470" + gradientUnits="userSpaceOnUse" + gradientTransform="matrix(1.08241,0,0,1.0768062,20.160914,4.7996577)" + x1="9.9747334" + y1="31.09375" + x2="37.077564" + y2="31.09375" /> + <linearGradient + id="linearGradient4134-9-5-6"> + <stop + id="stop4136-4-7-1" + offset="0" + style="stop-color:#4f79a6;stop-opacity:1;" /> + <stop + style="stop-color:#7fa8d3;stop-opacity:1" + offset="0.25000000" + id="stop4148-8-9-9" /> + <stop + style="stop-color:#7fa8d3;stop-opacity:1" + offset="0.45037496" + id="stop4142-8-2-02" /> + <stop + id="stop4138-2-3-6" + offset="1" + style="stop-color:#547ba6;stop-opacity:1" /> + </linearGradient> + <linearGradient + inkscape:collect="always" + xlink:href="#linearGradient4206-4-7-8" + id="linearGradient9472" + gradientUnits="userSpaceOnUse" + gradientTransform="matrix(1.08241,0,0,1.0768062,20.160914,4.7996577)" + x1="25.064732" + y1="21.857143" + x2="25.207588" + y2="25.428572" /> + <linearGradient + id="linearGradient4206-4-7-8"> + <stop + id="stop4208-5-9-9" + offset="0.0000000" + style="stop-color:#3465a4;stop-opacity:1" /> + <stop + id="stop4210-5-3-6" + offset="1.0000000" + style="stop-color:#3465a4;stop-opacity:1" /> + </linearGradient> + <linearGradient + inkscape:collect="always" + xlink:href="#linearGradient4176-3-2" + id="linearGradient9474" + gradientUnits="userSpaceOnUse" + gradientTransform="matrix(1.08241,0,0,1.0802618,20.160914,4.6630501)" + x1="17.160095" + y1="14.004482" + x2="37.969398" + y2="56.575912" /> + <linearGradient + id="linearGradient4176-3-2" + inkscape:collect="always"> + <stop + id="stop4178-8-5" + offset="0" + style="stop-color:#ffffff;stop-opacity:1;" /> + <stop + id="stop4180-1-8" + offset="1" + style="stop-color:#ffffff;stop-opacity:0;" /> + </linearGradient> + <linearGradient + inkscape:collect="always" + xlink:href="#linearGradient7210-7-1-8" + id="linearGradient9476" + gradientUnits="userSpaceOnUse" + x1="24" + y1="16.525082" + x2="24" + y2="13.284962" /> + <linearGradient + id="linearGradient7210-7-1-8"> + <stop + id="stop7212-33-6" + offset="0.0000000" + style="stop-color:#ffffff;stop-opacity:1.0000000;" /> + <stop + id="stop7214-0-6" + offset="1.0000000" + style="stop-color:#bfbebf;stop-opacity:1" /> + </linearGradient> + <linearGradient + inkscape:collect="always" + xlink:href="#linearGradient6924-6-1" + id="linearGradient9478" + gradientUnits="userSpaceOnUse" + gradientTransform="matrix(1.08241,0,0,1.0802618,20.006284,7.5180332)" + x1="16.07143" + y1="19.5" + x2="15.785715" + y2="30" /> + <linearGradient + id="linearGradient6924-6-1" + inkscape:collect="always"> + <stop + id="stop6926-8-6" + offset="0" + style="stop-color:#ffffff;stop-opacity:1;" /> + <stop + id="stop6928-76-7" + offset="1" + style="stop-color:#ffffff;stop-opacity:0;" /> + </linearGradient> + <linearGradient + y2="30" + x2="15.785715" + y1="19.5" + x1="16.07143" + gradientTransform="matrix(1.08241,0,0,1.0802618,20.006284,7.5180332)" + gradientUnits="userSpaceOnUse" + id="linearGradient9517" + xlink:href="#linearGradient6924-6-1" + inkscape:collect="always" /> + <linearGradient + id="linearGradient9647"> + <stop + style="stop-color:#ffffff;stop-opacity:1;" + offset="0" + id="stop9649" /> + <stop + style="stop-color:#dbdbdb;stop-opacity:1;" + offset="1" + id="stop9651" /> + </linearGradient> + <linearGradient + id="linearGradient2256"> + <stop + style="stop-color:#ff0202;stop-opacity:1;" + offset="0" + id="stop2258" /> + <stop + style="stop-color:#ff9b9b;stop-opacity:1;" + offset="1" + id="stop2260" /> + </linearGradient> + <linearGradient + inkscape:collect="always" + id="linearGradient2248"> + <stop + style="stop-color:#ffffff;stop-opacity:1;" + offset="0" + id="stop2250" /> + <stop + style="stop-color:#ffffff;stop-opacity:0;" + offset="1" + id="stop2252" /> + </linearGradient> + <linearGradient + id="linearGradient11780"> + <stop + style="stop-color:#ff8b8b;stop-opacity:1.0000000;" + offset="0.0000000" + id="stop11782" /> + <stop + style="stop-color:#ec1b1b;stop-opacity:1.0000000;" + offset="1.0000000" + id="stop11784" /> + </linearGradient> + <linearGradient + id="linearGradient4981"> + <stop + style="stop-color:#cc0000;stop-opacity:1;" + offset="0" + id="stop4983" /> + <stop + style="stop-color:#b30000;stop-opacity:1.0000000;" + offset="1.0000000" + id="stop4985" /> + </linearGradient> + <radialGradient + inkscape:collect="always" + xlink:href="#linearGradient21644" + id="radialGradient21650" + cx="25.125" + cy="36.75" + fx="25.125" + fy="36.75" + r="15.75" + gradientTransform="matrix(1,0,0,0.595238,0,14.875)" + gradientUnits="userSpaceOnUse" /> + <linearGradient + inkscape:collect="always" + id="linearGradient21644"> + <stop + style="stop-color:#000000;stop-opacity:1;" + offset="0" + id="stop21646" /> + <stop + style="stop-color:#000000;stop-opacity:0;" + offset="1" + id="stop21648" /> + </linearGradient> + <linearGradient + id="linearGradient3957"> + <stop + style="stop-color:#fffeff;stop-opacity:0.33333334;" + offset="0" + id="stop3959" /> + <stop + style="stop-color:#fffeff;stop-opacity:0.21568628;" + offset="1" + id="stop3961" /> + </linearGradient> + <linearGradient + inkscape:collect="always" + xlink:href="#linearGradient11691" + id="linearGradient11663" + gradientUnits="userSpaceOnUse" + gradientTransform="matrix(0.91724819,0,0,0.91907213,302.29549,5.732139)" + x1="15.737001" + y1="12.5036" + x2="53.570126" + y2="47.374317" /> + <radialGradient + inkscape:collect="always" + xlink:href="#linearGradient2248" + id="radialGradient11665" + gradientUnits="userSpaceOnUse" + gradientTransform="matrix(3.838984,0,0,2.961346,253.30758,-14.714265)" + cx="16.75" + cy="10.666344" + fx="16.75" + fy="10.666344" + r="21.25" /> + <linearGradient + inkscape:collect="always" + xlink:href="#linearGradient11720" + id="linearGradient11718" + gradientUnits="userSpaceOnUse" + gradientTransform="matrix(0.87782436,0.99037957,-0.87782433,0.99037953,319.93281,-20.25021)" + x1="21.75" + y1="15.80225" + x2="24.30225" + y2="35.05225" /> + <linearGradient + inkscape:collect="always" + xlink:href="#linearGradient11691" + id="linearGradient22637" + gradientUnits="userSpaceOnUse" + gradientTransform="matrix(0.91724819,0,0,0.91907213,302.29549,5.732139)" + x1="15.737001" + y1="12.5036" + x2="53.570126" + y2="47.374317" /> + <radialGradient + inkscape:collect="always" + xlink:href="#linearGradient2248" + id="radialGradient22639" + gradientUnits="userSpaceOnUse" + gradientTransform="matrix(3.838984,0,0,2.961346,253.30758,-14.714265)" + cx="16.75" + cy="10.666344" + fx="16.75" + fy="10.666344" + r="21.25" /> + <linearGradient + inkscape:collect="always" + xlink:href="#linearGradient11720" + id="linearGradient22641" + gradientUnits="userSpaceOnUse" + gradientTransform="matrix(0.87782436,0.99037957,-0.87782433,0.99037953,319.93281,-20.25021)" + x1="21.75" + y1="15.80225" + x2="24.30225" + y2="35.05225" /> + <linearGradient + inkscape:collect="always" + xlink:href="#linearGradient2684-1" + id="linearGradient8265" + gradientUnits="userSpaceOnUse" + gradientTransform="matrix(1.128181,0,0,1.128181,-108.08145,-78.763896)" + x1="70.913956" + y1="101.74152" + x2="70.951942" + y2="88.923729" /> + <linearGradient + id="linearGradient2684-1"> + <stop + id="stop2686-7" + offset="0" + style="stop-color:#ffffff;stop-opacity:1;" /> + <stop + id="stop2688-4" + offset="1" + style="stop-color:#000000;stop-opacity:1;" /> + </linearGradient> + <radialGradient + inkscape:collect="always" + xlink:href="#linearGradient9056" + id="radialGradient8267" + gradientUnits="userSpaceOnUse" + gradientTransform="matrix(0.05324342,-0.836238,2.019473,0.128568,-206.0078,112.67299)" + cx="107.5884" + cy="83.990814" + fx="107.5884" + fy="83.990814" + r="12.551644" /> + <linearGradient + id="linearGradient9056"> + <stop + style="stop-color:#6acd11;stop-opacity:1" + offset="0" + id="stop9058" /> + <stop + style="stop-color:#4cbe01;stop-opacity:1" + offset="1" + id="stop9060" /> + </linearGradient> + <linearGradient + inkscape:collect="always" + xlink:href="#linearGradient9050" + id="linearGradient8269" + gradientUnits="userSpaceOnUse" + gradientTransform="translate(-99.088729,-66.498056)" + x1="71.288956" + y1="124.11652" + x2="70.826942" + y2="95" /> + <linearGradient + id="linearGradient9050"> + <stop + id="stop9052" + offset="0" + style="stop-color:#428405;stop-opacity:1" /> + <stop + id="stop9054" + offset="1" + style="stop-color:#264a03;stop-opacity:1" /> + </linearGradient> + <linearGradient + inkscape:collect="always" + xlink:href="#linearGradient4134-9-5-6" + id="linearGradient17969" + gradientUnits="userSpaceOnUse" + gradientTransform="matrix(1.08241,0,0,1.0768062,20.160914,4.7996577)" + x1="9.9747334" + y1="31.09375" + x2="37.077564" + y2="31.09375" /> + <linearGradient + inkscape:collect="always" + xlink:href="#linearGradient4206-4-7-8" + id="linearGradient17971" + gradientUnits="userSpaceOnUse" + gradientTransform="matrix(1.08241,0,0,1.0768062,20.160914,4.7996577)" + x1="25.064732" + y1="21.857143" + x2="25.207588" + y2="25.428572" /> + <linearGradient + inkscape:collect="always" + xlink:href="#linearGradient4176-3-2" + id="linearGradient17973" + gradientUnits="userSpaceOnUse" + gradientTransform="matrix(1.08241,0,0,1.0802618,20.160914,4.6630501)" + x1="17.160095" + y1="14.004482" + x2="37.969398" + y2="56.575912" /> + <linearGradient + inkscape:collect="always" + xlink:href="#linearGradient7210-7-1-8" + id="linearGradient17975" + gradientUnits="userSpaceOnUse" + x1="24" + y1="16.525082" + x2="24" + y2="13.284962" /> + <linearGradient + inkscape:collect="always" + xlink:href="#linearGradient6924-6-1" + id="linearGradient17977" + gradientUnits="userSpaceOnUse" + gradientTransform="matrix(1.08241,0,0,1.0802618,20.006284,7.5180332)" + x1="16.07143" + y1="19.5" + x2="15.785715" + y2="30" /> + <linearGradient + inkscape:collect="always" + xlink:href="#linearGradient4134-9-5-6" + id="linearGradient17986" + gradientUnits="userSpaceOnUse" + gradientTransform="matrix(1.08241,0,0,1.0768062,20.160914,4.7996577)" + x1="9.9747334" + y1="31.09375" + x2="37.077564" + y2="31.09375" /> + <linearGradient + inkscape:collect="always" + xlink:href="#linearGradient4206-4-7-8" + id="linearGradient17988" + gradientUnits="userSpaceOnUse" + gradientTransform="matrix(1.08241,0,0,1.0768062,20.160914,4.7996577)" + x1="25.064732" + y1="21.857143" + x2="25.207588" + y2="25.428572" /> + <linearGradient + inkscape:collect="always" + xlink:href="#linearGradient4176-3-2" + id="linearGradient17990" + gradientUnits="userSpaceOnUse" + gradientTransform="matrix(1.08241,0,0,1.0802618,20.160914,4.6630501)" + x1="17.160095" + y1="14.004482" + x2="37.969398" + y2="56.575912" /> + <linearGradient + inkscape:collect="always" + xlink:href="#linearGradient7210-7-1-8" + id="linearGradient17992" + gradientUnits="userSpaceOnUse" + x1="24" + y1="16.525082" + x2="24" + y2="13.284962" /> + <linearGradient + inkscape:collect="always" + xlink:href="#linearGradient6924-6-1" + id="linearGradient17994" + gradientUnits="userSpaceOnUse" + gradientTransform="matrix(1.08241,0,0,1.0802618,20.006284,7.5180332)" + x1="16.07143" + y1="19.5" + x2="15.785715" + y2="30" /> + <linearGradient + inkscape:collect="always" + xlink:href="#linearGradient4134-9-6-2" + id="linearGradient10212" + gradientUnits="userSpaceOnUse" + gradientTransform="matrix(0.47256308,0,0,0.47256308,32.329484,6.9416806)" + x1="9.9747334" + y1="31.09375" + x2="37.077564" + y2="31.09375" /> + <linearGradient + id="linearGradient4134-9-6-2"> + <stop + id="stop4136-4-9-1" + offset="0" + style="stop-color:#4f79a6;stop-opacity:1;" /> + <stop + style="stop-color:#7fa8d3;stop-opacity:1" + offset="0.25000000" + id="stop4148-8-6-9" /> + <stop + style="stop-color:#7fa8d3;stop-opacity:1" + offset="0.45037496" + id="stop4142-8-9-7" /> + <stop + id="stop4138-2-8-2" + offset="1" + style="stop-color:#547ba6;stop-opacity:1" /> + </linearGradient> + <linearGradient + inkscape:collect="always" + xlink:href="#linearGradient4206-4-8-2" + id="linearGradient10214" + gradientUnits="userSpaceOnUse" + gradientTransform="matrix(0.47256308,0,0,0.47256308,32.329484,6.9416806)" + x1="25.064732" + y1="21.857143" + x2="25.207588" + y2="25.428572" /> + <linearGradient + id="linearGradient4206-4-8-2"> + <stop + id="stop4208-5-3-8" + offset="0.0000000" + style="stop-color:#2b558c;stop-opacity:1" /> + <stop + id="stop4210-5-8-2" + offset="1.0000000" + style="stop-color:#2c568c;stop-opacity:1" /> + </linearGradient> + <linearGradient + inkscape:collect="always" + xlink:href="#linearGradient4176-9-0" + id="linearGradient10216" + gradientUnits="userSpaceOnUse" + gradientTransform="matrix(0.45408812,0,0,0.45408812,32.774075,7.2711045)" + x1="17.160095" + y1="14.004482" + x2="37.969398" + y2="56.575912" /> + <linearGradient + id="linearGradient4176-9-0" + inkscape:collect="always"> + <stop + id="stop4178-6-7" + offset="0" + style="stop-color:#ffffff;stop-opacity:1;" /> + <stop + id="stop4180-7-9" + offset="1" + style="stop-color:#ffffff;stop-opacity:0;" /> + </linearGradient> + <linearGradient + inkscape:collect="always" + xlink:href="#linearGradient7210-8-1" + id="linearGradient10218" + gradientUnits="userSpaceOnUse" + x1="24" + y1="16.525082" + x2="24" + y2="-5.456851" /> + <linearGradient + id="linearGradient7210-8-1"> + <stop + id="stop7212-7-8" + offset="0.0000000" + style="stop-color:#ffffff;stop-opacity:1.0000000;" /> + <stop + id="stop7214-5-6" + offset="1.0000000" + style="stop-color:#bfbebf;stop-opacity:1" /> + </linearGradient> + <linearGradient + inkscape:collect="always" + xlink:href="#linearGradient6924-1-0" + id="linearGradient10220" + gradientUnits="userSpaceOnUse" + gradientTransform="matrix(0.47256308,0,0,0.47256308,32.448286,7.8656215)" + x1="15.972866" + y1="16.641634" + x2="15.785715" + y2="30" /> + <linearGradient + id="linearGradient6924-1-0" + inkscape:collect="always"> + <stop + id="stop6926-3-7" + offset="0" + style="stop-color:#ffffff;stop-opacity:1;" /> + <stop + id="stop6928-9-8" + offset="1" + style="stop-color:#ffffff;stop-opacity:0;" /> + </linearGradient> + <linearGradient + inkscape:collect="always" + xlink:href="#linearGradient4134-9-6-2" + id="linearGradient13412" + gradientUnits="userSpaceOnUse" + gradientTransform="matrix(0.47256308,0,0,0.47256308,-19.884513,6.8263032)" + x1="9.9747334" + y1="31.09375" + x2="37.077564" + y2="31.09375" /> + <linearGradient + id="linearGradient9325"> + <stop + id="stop9327" + offset="0" + style="stop-color:#4f79a6;stop-opacity:1;" /> + <stop + style="stop-color:#7fa8d3;stop-opacity:1" + offset="0.25000000" + id="stop9329" /> + <stop + style="stop-color:#7fa8d3;stop-opacity:1" + offset="0.45037496" + id="stop9331" /> + <stop + id="stop9333" + offset="1" + style="stop-color:#547ba6;stop-opacity:1" /> + </linearGradient> + <linearGradient + inkscape:collect="always" + xlink:href="#linearGradient4206-4-8-2" + id="linearGradient13414" + gradientUnits="userSpaceOnUse" + gradientTransform="matrix(0.47256308,0,0,0.47256308,-19.884513,6.8263032)" + x1="25.064732" + y1="21.857143" + x2="25.207588" + y2="25.428572" /> + <linearGradient + id="linearGradient9336"> + <stop + id="stop9338" + offset="0.0000000" + style="stop-color:#2b558c;stop-opacity:1" /> + <stop + id="stop9340" + offset="1.0000000" + style="stop-color:#2c568c;stop-opacity:1" /> + </linearGradient> + <linearGradient + inkscape:collect="always" + xlink:href="#linearGradient4176-9-0" + id="linearGradient13416" + gradientUnits="userSpaceOnUse" + gradientTransform="matrix(0.45408812,0,0,0.45408812,-19.439922,7.2711048)" + x1="17.160095" + y1="14.004482" + x2="37.969398" + y2="56.575912" /> + <linearGradient + inkscape:collect="always" + xlink:href="#linearGradient7210-8-1" + id="linearGradient13418" + gradientUnits="userSpaceOnUse" + x1="24" + y1="16.525082" + x2="24" + y2="13.284962" /> + <linearGradient + id="linearGradient9350"> + <stop + id="stop9352" + offset="0.0000000" + style="stop-color:#ffffff;stop-opacity:1.0000000;" /> + <stop + id="stop9354" + offset="1.0000000" + style="stop-color:#bfbebf;stop-opacity:1" /> + </linearGradient> + <linearGradient + inkscape:collect="always" + xlink:href="#linearGradient6924-1-0" + id="linearGradient13421" + gradientUnits="userSpaceOnUse" + gradientTransform="matrix(0.47256308,0,0,0.47256308,-19.765711,7.8656218)" + x1="15.972866" + y1="16.641634" + x2="15.785715" + y2="30" /> + <linearGradient + inkscape:collect="always" + xlink:href="#linearGradient4134-9-5-6-7" + id="linearGradient9470-1" + gradientUnits="userSpaceOnUse" + gradientTransform="matrix(1.08241,0,0,1.0768062,20.160914,4.7996577)" + x1="9.9747334" + y1="31.09375" + x2="37.077564" + y2="31.09375" /> + <linearGradient + id="linearGradient4134-9-5-6-7"> + <stop + id="stop4136-4-7-1-4" + offset="0" + style="stop-color:#4f79a6;stop-opacity:1;" /> + <stop + style="stop-color:#7fa8d3;stop-opacity:1" + offset="0.25000000" + id="stop4148-8-9-9-0" /> + <stop + style="stop-color:#7fa8d3;stop-opacity:1" + offset="0.45037496" + id="stop4142-8-2-02-9" /> + <stop + id="stop4138-2-3-6-4" + offset="1" + style="stop-color:#547ba6;stop-opacity:1" /> + </linearGradient> + <linearGradient + inkscape:collect="always" + xlink:href="#linearGradient4206-4-7-8-8" + id="linearGradient9472-8" + gradientUnits="userSpaceOnUse" + gradientTransform="matrix(1.08241,0,0,1.0768062,20.160914,4.7996577)" + x1="25.064732" + y1="21.857143" + x2="25.207588" + y2="25.428572" /> + <linearGradient + id="linearGradient4206-4-7-8-8"> + <stop + id="stop4208-5-9-9-2" + offset="0.0000000" + style="stop-color:#3465a4;stop-opacity:1" /> + <stop + id="stop4210-5-3-6-4" + offset="1.0000000" + style="stop-color:#3465a4;stop-opacity:1" /> + </linearGradient> + <linearGradient + inkscape:collect="always" + xlink:href="#linearGradient4176-3-2-5" + id="linearGradient9474-5" + gradientUnits="userSpaceOnUse" + gradientTransform="matrix(1.08241,0,0,1.0802618,20.160914,4.6630501)" + x1="17.160095" + y1="14.004482" + x2="37.969398" + y2="56.575912" /> + <linearGradient + id="linearGradient4176-3-2-5" + inkscape:collect="always"> + <stop + id="stop4178-8-5-1" + offset="0" + style="stop-color:#ffffff;stop-opacity:1;" /> + <stop + id="stop4180-1-8-7" + offset="1" + style="stop-color:#ffffff;stop-opacity:0;" /> + </linearGradient> + <linearGradient + inkscape:collect="always" + xlink:href="#linearGradient7210-7-1-8-1" + id="linearGradient9476-1" + gradientUnits="userSpaceOnUse" + x1="24" + y1="16.525082" + x2="24" + y2="13.284962" /> + <linearGradient + id="linearGradient7210-7-1-8-1"> + <stop + id="stop7212-33-6-5" + offset="0.0000000" + style="stop-color:#ffffff;stop-opacity:1.0000000;" /> + <stop + id="stop7214-0-6-2" + offset="1.0000000" + style="stop-color:#bfbebf;stop-opacity:1" /> + </linearGradient> + <linearGradient + y2="30" + x2="15.785715" + y1="19.5" + x1="16.07143" + gradientTransform="matrix(1.08241,0,0,1.0802618,20.006284,7.5180332)" + gradientUnits="userSpaceOnUse" + id="linearGradient9517-7" + xlink:href="#linearGradient6924-6-1-6" + inkscape:collect="always" /> + <linearGradient + id="linearGradient6924-6-1-6" + inkscape:collect="always"> + <stop + id="stop6926-8-6-1" + offset="0" + style="stop-color:#ffffff;stop-opacity:1;" /> + <stop + id="stop6928-76-7-4" + offset="1" + style="stop-color:#ffffff;stop-opacity:0;" /> + </linearGradient> + <linearGradient + y2="30" + x2="15.785715" + y1="19.5" + x1="16.07143" + gradientTransform="matrix(1.08241,0,0,1.0802618,20.006284,7.5180332)" + gradientUnits="userSpaceOnUse" + id="linearGradient9529" + xlink:href="#linearGradient6924-6-1-6" + inkscape:collect="always" /> + <linearGradient + inkscape:collect="always" + xlink:href="#linearGradient4134-9-5-6-7" + id="linearGradient9602" + gradientUnits="userSpaceOnUse" + gradientTransform="matrix(1.08241,0,0,1.0768062,20.160914,4.7996577)" + x1="9.9747334" + y1="31.09375" + x2="37.077564" + y2="31.09375" /> + <linearGradient + inkscape:collect="always" + xlink:href="#linearGradient4206-4-7-8-8" + id="linearGradient9604" + gradientUnits="userSpaceOnUse" + gradientTransform="matrix(1.08241,0,0,1.0768062,20.160914,4.7996577)" + x1="25.064732" + y1="21.857143" + x2="25.207588" + y2="25.428572" /> + <linearGradient + inkscape:collect="always" + xlink:href="#linearGradient4176-3-2-5" + id="linearGradient9606" + gradientUnits="userSpaceOnUse" + gradientTransform="matrix(1.08241,0,0,1.0802618,20.160914,4.6630501)" + x1="17.160095" + y1="14.004482" + x2="37.969398" + y2="56.575912" /> + <linearGradient + inkscape:collect="always" + xlink:href="#linearGradient7210-7-1-8-1" + id="linearGradient9608" + gradientUnits="userSpaceOnUse" + x1="24" + y1="16.525082" + x2="24" + y2="13.284962" /> + <linearGradient + inkscape:collect="always" + xlink:href="#linearGradient6924-6-1-6" + id="linearGradient9610" + gradientUnits="userSpaceOnUse" + gradientTransform="matrix(1.08241,0,0,1.0802618,20.006284,7.5180332)" + x1="16.07143" + y1="19.5" + x2="15.785715" + y2="30" /> + <radialGradient + inkscape:collect="always" + xlink:href="#linearGradient12512" + id="radialGradient22609" + gradientUnits="userSpaceOnUse" + cx="55" + cy="125" + fx="55" + fy="125" + r="14.375" /> + <linearGradient + id="linearGradient12512"> + <stop + id="stop12513" + offset="0.0000000" + style="stop-color:#ffffff;stop-opacity:1.0000000;" /> + <stop + id="stop12517" + offset="0.50000000" + style="stop-color:#fff520;stop-opacity:0.89108908;" /> + <stop + id="stop12514" + offset="1.0000000" + style="stop-color:#fff300;stop-opacity:0.0000000;" /> + </linearGradient> + <radialGradient + inkscape:collect="always" + xlink:href="#linearGradient12512-7" + id="radialGradient22609-1" + gradientUnits="userSpaceOnUse" + cx="55" + cy="125" + fx="55" + fy="125" + r="14.375" /> + <linearGradient + id="linearGradient12512-7"> + <stop + id="stop12513-4" + offset="0.0000000" + style="stop-color:#ffffff;stop-opacity:1.0000000;" /> + <stop + id="stop12517-0" + offset="0.50000000" + style="stop-color:#fff520;stop-opacity:0.89108908;" /> + <stop + id="stop12514-9" + offset="1.0000000" + style="stop-color:#fff300;stop-opacity:0.0000000;" /> + </linearGradient> + <linearGradient + id="linearGradient4134-9-5-6-8"> + <stop + id="stop4136-4-7-3-7" + offset="0" + style="stop-color:#4f79a6;stop-opacity:1;" /> + <stop + style="stop-color:#7fa8d3;stop-opacity:1" + offset="0.25000000" + id="stop4148-8-9-9-3" /> + <stop + style="stop-color:#7fa8d3;stop-opacity:1" + offset="0.45037496" + id="stop4142-8-2-3" /> + <stop + id="stop4138-2-3-6-6" + offset="1" + style="stop-color:#547ba6;stop-opacity:1" /> + </linearGradient> + <linearGradient + id="linearGradient4206-4-7-1"> + <stop + id="stop4208-5-9-0" + offset="0.0000000" + style="stop-color:#3465a4;stop-opacity:1" /> + <stop + id="stop4210-5-3-4" + offset="1.0000000" + style="stop-color:#3465a4;stop-opacity:1" /> + </linearGradient> + <linearGradient + id="linearGradient7210-7-1-3"> + <stop + id="stop7212-33-15" + offset="0.0000000" + style="stop-color:#ffffff;stop-opacity:1.0000000;" /> + <stop + id="stop7214-0-7" + offset="1.0000000" + style="stop-color:#bfbebf;stop-opacity:1" /> + </linearGradient> + <linearGradient + y2="30" + x2="15.785715" + y1="19.5" + x1="16.07143" + gradientTransform="matrix(1.08241,0,0,1.0802618,20.006284,7.5180332)" + gradientUnits="userSpaceOnUse" + id="linearGradient9517-2" + xlink:href="#linearGradient6924-6-2" + inkscape:collect="always" /> + <linearGradient + id="linearGradient6924-6-2" + inkscape:collect="always"> + <stop + id="stop6926-8-2" + offset="0" + style="stop-color:#ffffff;stop-opacity:1;" /> + <stop + id="stop6928-76-7-2" + offset="1" + style="stop-color:#ffffff;stop-opacity:0;" /> + </linearGradient> + <linearGradient + id="linearGradient3957-4"> + <stop + style="stop-color:#fffeff;stop-opacity:0.33333334;" + offset="0" + id="stop3959-2" /> + <stop + style="stop-color:#fffeff;stop-opacity:0.21568628;" + offset="1" + id="stop3961-0" /> + </linearGradient> + <linearGradient + id="linearGradient3957-1"> + <stop + style="stop-color:#fffeff;stop-opacity:0.33333334;" + offset="0" + id="stop3959-25" /> + <stop + style="stop-color:#fffeff;stop-opacity:0.21568628;" + offset="1" + id="stop3961-7" /> + </linearGradient> + <linearGradient + inkscape:collect="always" + xlink:href="#linearGradient2684-1-6" + id="linearGradient8265-1" + gradientUnits="userSpaceOnUse" + gradientTransform="matrix(1.128181,0,0,1.128181,-108.08145,-78.763896)" + x1="70.913956" + y1="101.74152" + x2="70.951942" + y2="88.923729" /> + <linearGradient + id="linearGradient2684-1-6"> + <stop + id="stop2686-7-8" + offset="0" + style="stop-color:#ffffff;stop-opacity:1;" /> + <stop + id="stop2688-4-5" + offset="1" + style="stop-color:#000000;stop-opacity:1;" /> + </linearGradient> + <radialGradient + inkscape:collect="always" + xlink:href="#linearGradient9056-6" + id="radialGradient8267-7" + gradientUnits="userSpaceOnUse" + gradientTransform="matrix(0.05324342,-0.836238,2.019473,0.128568,-206.0078,112.67299)" + cx="107.5884" + cy="83.990814" + fx="107.5884" + fy="83.990814" + r="12.551644" /> + <linearGradient + id="linearGradient9056-6"> + <stop + style="stop-color:#6acd11;stop-opacity:1" + offset="0" + id="stop9058-1" /> + <stop + style="stop-color:#4cbe01;stop-opacity:1" + offset="1" + id="stop9060-8" /> + </linearGradient> + <linearGradient + inkscape:collect="always" + xlink:href="#linearGradient9050-2" + id="linearGradient8269-9" + gradientUnits="userSpaceOnUse" + gradientTransform="translate(-99.088729,-66.498056)" + x1="71.288956" + y1="124.11652" + x2="70.826942" + y2="95" /> + <linearGradient + id="linearGradient9050-2"> + <stop + id="stop9052-7" + offset="0" + style="stop-color:#428405;stop-opacity:1" /> + <stop + id="stop9054-9" + offset="1" + style="stop-color:#264a03;stop-opacity:1" /> + </linearGradient> + <linearGradient + inkscape:collect="always" + xlink:href="#linearGradient2817-4" + id="linearGradient13377" + gradientUnits="userSpaceOnUse" + gradientTransform="matrix(2.624525,0,0,1.054917,-530.24846,-71.839329)" + x1="174.83363" + y1="84.263489" + x2="174.74524" + y2="105.49083" /> + <linearGradient + id="linearGradient2817-4"> + <stop + style="stop-color:#000000;stop-opacity:1;" + offset="0" + id="stop2819-6" /> + <stop + style="stop-color:#ffffff;stop-opacity:0.48453608;" + offset="1" + id="stop2821-0" /> + </linearGradient> + <radialGradient + inkscape:collect="always" + xlink:href="#linearGradient13364" + id="radialGradient13379" + gradientUnits="userSpaceOnUse" + gradientTransform="matrix(8.905772e-6,-1.07205,4.98026,-1.250658e-6,-584.92577,217.16695)" + cx="169.77171" + cy="100.20107" + fx="169.77171" + fy="100.20107" + r="11" /> + <linearGradient + id="linearGradient13364"> + <stop + style="stop-color:#f10a0a;stop-opacity:1" + offset="0" + id="stop13366" /> + <stop + style="stop-color:#cd0101;stop-opacity:1" + offset="1" + id="stop13368" /> + </linearGradient> + <linearGradient + inkscape:collect="always" + xlink:href="#linearGradient13358" + id="linearGradient13381" + gradientUnits="userSpaceOnUse" + gradientTransform="matrix(2.498884,0,0,1.004384,-508.20837,-66.990449)" + x1="169" + y1="110.33805" + x2="169" + y2="93.204849" /> + <linearGradient + id="linearGradient13358"> + <stop + style="stop-color:#bd0000;stop-opacity:1" + offset="0" + id="stop13360" /> + <stop + style="stop-color:#970000;stop-opacity:1" + offset="1" + id="stop13362" /> + </linearGradient> + <linearGradient + inkscape:collect="always" + xlink:href="#linearGradient3081-5" + id="linearGradient13383" + gradientUnits="userSpaceOnUse" + gradientTransform="matrix(2.8933072,0,0,0.96437208,-157.89239,5.2328667)" + x1="15.089521" + y1="15.291994" + x2="14" + y2="52.510574" /> + <linearGradient + inkscape:collect="always" + id="linearGradient3081-5"> + <stop + style="stop-color:#ffffff;stop-opacity:1;" + offset="0" + id="stop3083-4" /> + <stop + style="stop-color:#ffffff;stop-opacity:0;" + offset="1" + id="stop3085-4" /> + </linearGradient> + <linearGradient + inkscape:collect="always" + xlink:href="#linearGradient52493" + id="linearGradient52499" + x1="-72.303078" + y1="20.700233" + x2="-71.390366" + y2="31.757452" + gradientUnits="userSpaceOnUse" /> + <linearGradient + inkscape:collect="always" + id="linearGradient52493"> + <stop + style="stop-color:#f7f7f7;stop-opacity:1;" + offset="0" + id="stop52495" /> + <stop + style="stop-color:#f7f7f7;stop-opacity:0;" + offset="1" + id="stop52497" /> + </linearGradient> + <linearGradient + inkscape:collect="always" + xlink:href="#linearGradient4499" + id="linearGradient4566" + gradientUnits="userSpaceOnUse" + x1="31.480057" + y1="30.844528" + x2="32.374863" + y2="40.750778" /> + <linearGradient + inkscape:collect="always" + id="linearGradient4499"> + <stop + style="stop-color:#333334;stop-opacity:1;" + offset="0" + id="stop4501" /> + <stop + style="stop-color:#333334;stop-opacity:0;" + offset="1" + id="stop4503" /> + </linearGradient> + <radialGradient + inkscape:collect="always" + xlink:href="#linearGradient4515" + id="radialGradient4568" + gradientUnits="userSpaceOnUse" + gradientTransform="matrix(1.910961,0.03332579,-4.099092e-8,1.3460695,51.082256,-3.4189674)" + cx="-54.743732" + cy="21.368473" + fx="-54.743732" + fy="21.368473" + r="8.1875" /> + <linearGradient + id="linearGradient4515"> + <stop + style="stop-color:#fbfbfb;stop-opacity:1" + offset="0" + id="stop4517" /> + <stop + style="stop-color:#729bc6;stop-opacity:1" + offset="1" + id="stop4519" /> + </linearGradient> + <linearGradient + inkscape:collect="always" + xlink:href="#linearGradient4507" + id="linearGradient4570" + gradientUnits="userSpaceOnUse" + x1="30.907085" + y1="30.457268" + x2="30.937366" + y2="39.051018" /> + <linearGradient + inkscape:collect="always" + id="linearGradient4507"> + <stop + style="stop-color:#333334;stop-opacity:1;" + offset="0" + id="stop4509" /> + <stop + style="stop-color:#333334;stop-opacity:0;" + offset="1" + id="stop4511" /> + </linearGradient> + <linearGradient + inkscape:collect="always" + xlink:href="#linearGradient4523" + id="linearGradient4546" + gradientUnits="userSpaceOnUse" + x1="32.778126" + y1="21.726969" + x2="33.368801" + y2="37.633221" + gradientTransform="matrix(1.2528671,0,0,1.2528671,69.53661,-3.4691061)" /> + <linearGradient + inkscape:collect="always" + id="linearGradient4523"> + <stop + style="stop-color:#3a3a3b;stop-opacity:1;" + offset="0" + id="stop4525" /> + <stop + style="stop-color:#3a3a3b;stop-opacity:0;" + offset="1" + id="stop4527" /> + </linearGradient> + <linearGradient + inkscape:collect="always" + xlink:href="#linearGradient4409" + id="linearGradient4476" + gradientUnits="userSpaceOnUse" + gradientTransform="matrix(1.2528671,0,0,1.2528671,88.9159,-9.402963)" + x1="23.710672" + y1="27.421602" + x2="23.710672" + y2="45.734699" /> + <linearGradient + inkscape:collect="always" + id="linearGradient4409"> + <stop + style="stop-color:#ffffff;stop-opacity:1;" + offset="0" + id="stop4411" /> + <stop + style="stop-color:#6e96c1;stop-opacity:1" + offset="1" + id="stop4413" /> + </linearGradient> + <linearGradient + inkscape:collect="always" + xlink:href="#linearGradient4499" + id="linearGradient4554" + gradientUnits="userSpaceOnUse" + x1="31.480057" + y1="30.844528" + x2="32.374863" + y2="40.750778" /> + <radialGradient + inkscape:collect="always" + xlink:href="#linearGradient4515" + id="radialGradient4556" + gradientUnits="userSpaceOnUse" + gradientTransform="matrix(1.910961,0.03332579,-4.099092e-8,1.3460695,51.082256,-3.4189674)" + cx="-54.743732" + cy="21.368473" + fx="-54.743732" + fy="21.368473" + r="8.1875" /> + <linearGradient + id="linearGradient14544"> + <stop + style="stop-color:#fbfbfb;stop-opacity:1" + offset="0" + id="stop14546" /> + <stop + style="stop-color:#729bc6;stop-opacity:1" + offset="1" + id="stop14548" /> + </linearGradient> + <linearGradient + inkscape:collect="always" + xlink:href="#linearGradient4507" + id="linearGradient4572" + gradientUnits="userSpaceOnUse" + x1="30.907085" + y1="30.457268" + x2="30.937366" + y2="39.051018" /> + <linearGradient + inkscape:collect="always" + xlink:href="#linearGradient4523" + id="linearGradient4529" + x1="32.778126" + y1="21.726969" + x2="33.368801" + y2="37.633221" + gradientUnits="userSpaceOnUse" + gradientTransform="matrix(1.2528671,0,0,1.2528671,88.9159,-3.4691061)" /> + <linearGradient + inkscape:collect="always" + xlink:href="#linearGradient4409" + id="linearGradient4471" + gradientUnits="userSpaceOnUse" + x1="23.710672" + y1="25.234375" + x2="23.710672" + y2="43.673359" + gradientTransform="matrix(1.2528671,0,0,1.2528671,88.9159,-9.402963)" /> + <linearGradient + inkscape:collect="always" + xlink:href="#linearGradient4417" + id="linearGradient4473" + gradientUnits="userSpaceOnUse" + x1="23.710672" + y1="25.234375" + x2="23.710672" + y2="43.673359" + gradientTransform="matrix(1.2528671,0,0,1.2528671,88.9159,-9.402963)" /> + <linearGradient + id="linearGradient4417"> + <stop + style="stop-color:#333333;stop-opacity:1;" + offset="0" + id="stop4419" /> + <stop + style="stop-color:#6e96c1;stop-opacity:1" + offset="1" + id="stop4421" /> + </linearGradient> + <linearGradient + inkscape:collect="always" + xlink:href="#linearGradient4134-9-5-6-5" + id="linearGradient22552" + gradientUnits="userSpaceOnUse" + gradientTransform="matrix(1.08241,0,0,1.0768062,20.160914,4.7996577)" + x1="9.9747334" + y1="31.09375" + x2="37.077564" + y2="31.09375" /> + <linearGradient + id="linearGradient4134-9-5-6-5"> + <stop + id="stop4136-4-7-1-43" + offset="0" + style="stop-color:#4f79a6;stop-opacity:1;" /> + <stop + style="stop-color:#7fa8d3;stop-opacity:1" + offset="0.25000000" + id="stop4148-8-9-9-1" /> + <stop + style="stop-color:#7fa8d3;stop-opacity:1" + offset="0.45037496" + id="stop4142-8-2-02-2" /> + <stop + id="stop4138-2-3-6-3" + offset="1" + style="stop-color:#547ba6;stop-opacity:1" /> + </linearGradient> + <linearGradient + inkscape:collect="always" + xlink:href="#linearGradient4206-4-7-8-3" + id="linearGradient22554" + gradientUnits="userSpaceOnUse" + gradientTransform="matrix(1.08241,0,0,1.0768062,20.160914,4.7996577)" + x1="25.064732" + y1="21.857143" + x2="25.207588" + y2="25.428572" /> + <linearGradient + id="linearGradient4206-4-7-8-3"> + <stop + id="stop4208-5-9-9-4" + offset="0.0000000" + style="stop-color:#3465a4;stop-opacity:1" /> + <stop + id="stop4210-5-3-6-1" + offset="1.0000000" + style="stop-color:#3465a4;stop-opacity:1" /> + </linearGradient> + <linearGradient + inkscape:collect="always" + xlink:href="#linearGradient4176-3-2-1" + id="linearGradient22556" + gradientUnits="userSpaceOnUse" + gradientTransform="matrix(1.08241,0,0,1.0802618,20.160914,4.6630501)" + x1="17.160095" + y1="14.004482" + x2="37.969398" + y2="56.575912" /> + <linearGradient + id="linearGradient4176-3-2-1" + inkscape:collect="always"> + <stop + id="stop4178-8-5-3" + offset="0" + style="stop-color:#ffffff;stop-opacity:1;" /> + <stop + id="stop4180-1-8-8" + offset="1" + style="stop-color:#ffffff;stop-opacity:0;" /> + </linearGradient> + <linearGradient + inkscape:collect="always" + xlink:href="#linearGradient7210-7-1-8-7" + id="linearGradient22558" + gradientUnits="userSpaceOnUse" + x1="24" + y1="16.525082" + x2="24" + y2="13.284962" /> + <linearGradient + id="linearGradient7210-7-1-8-7"> + <stop + id="stop7212-33-6-4" + offset="0.0000000" + style="stop-color:#ffffff;stop-opacity:1.0000000;" /> + <stop + id="stop7214-0-6-27" + offset="1.0000000" + style="stop-color:#bfbebf;stop-opacity:1" /> + </linearGradient> + <linearGradient + inkscape:collect="always" + xlink:href="#linearGradient6924-6-1-7" + id="linearGradient22560" + gradientUnits="userSpaceOnUse" + gradientTransform="matrix(1.08241,0,0,1.0802618,20.006284,7.5180332)" + x1="16.07143" + y1="19.5" + x2="15.785715" + y2="30" /> + <linearGradient + id="linearGradient6924-6-1-7" + inkscape:collect="always"> + <stop + id="stop6926-8-6-9" + offset="0" + style="stop-color:#ffffff;stop-opacity:1;" /> + <stop + id="stop6928-76-7-3" + offset="1" + style="stop-color:#ffffff;stop-opacity:0;" /> + </linearGradient> + <linearGradient + inkscape:collect="always" + xlink:href="#linearGradient4409" + id="linearGradient14805" + gradientUnits="userSpaceOnUse" + gradientTransform="matrix(1.2528671,0,0,1.2528671,88.9159,-9.402963)" + x1="23.710672" + y1="25.234375" + x2="23.710672" + y2="43.673359" /> + <linearGradient + inkscape:collect="always" + xlink:href="#linearGradient4417" + id="linearGradient14807" + gradientUnits="userSpaceOnUse" + gradientTransform="matrix(1.2528671,0,0,1.2528671,88.9159,-9.402963)" + x1="23.710672" + y1="25.234375" + x2="23.710672" + y2="43.673359" /> + <linearGradient + inkscape:collect="always" + xlink:href="#linearGradient4523" + id="linearGradient14809" + gradientUnits="userSpaceOnUse" + gradientTransform="matrix(1.2528671,0,0,1.2528671,88.9159,-3.4691061)" + x1="32.778126" + y1="21.726969" + x2="33.368801" + y2="37.633221" /> + <linearGradient + inkscape:collect="always" + xlink:href="#linearGradient4499" + id="linearGradient14811" + gradientUnits="userSpaceOnUse" + x1="31.480057" + y1="30.844528" + x2="32.374863" + y2="40.750778" /> + <radialGradient + inkscape:collect="always" + xlink:href="#linearGradient4515" + id="radialGradient14813" + gradientUnits="userSpaceOnUse" + gradientTransform="matrix(1.910961,0.03332579,-4.099092e-8,1.3460695,51.082256,-3.4189674)" + cx="-54.743732" + cy="21.368473" + fx="-54.743732" + fy="21.368473" + r="8.1875" /> + <linearGradient + inkscape:collect="always" + xlink:href="#linearGradient4507" + id="linearGradient14815" + gradientUnits="userSpaceOnUse" + x1="30.907085" + y1="30.457268" + x2="30.937366" + y2="39.051018" /> + <linearGradient + inkscape:collect="always" + xlink:href="#linearGradient4409" + id="linearGradient14817" + gradientUnits="userSpaceOnUse" + gradientTransform="matrix(1.2528671,0,0,1.2528671,88.9159,-9.402963)" + x1="23.710672" + y1="27.421602" + x2="23.710672" + y2="45.734699" /> + <linearGradient + inkscape:collect="always" + xlink:href="#linearGradient4523" + id="linearGradient14819" + gradientUnits="userSpaceOnUse" + gradientTransform="matrix(1.2528671,0,0,1.2528671,69.53661,-3.4691061)" + x1="32.778126" + y1="21.726969" + x2="33.368801" + y2="37.633221" /> + <linearGradient + inkscape:collect="always" + xlink:href="#linearGradient4499" + id="linearGradient14821" + gradientUnits="userSpaceOnUse" + x1="31.480057" + y1="30.844528" + x2="32.374863" + y2="40.750778" /> + <radialGradient + inkscape:collect="always" + xlink:href="#linearGradient4515" + id="radialGradient14823" + gradientUnits="userSpaceOnUse" + gradientTransform="matrix(1.910961,0.03332579,-4.099092e-8,1.3460695,51.082256,-3.4189674)" + cx="-54.743732" + cy="21.368473" + fx="-54.743732" + fy="21.368473" + r="8.1875" /> + <linearGradient + inkscape:collect="always" + xlink:href="#linearGradient4507" + id="linearGradient14825" + gradientUnits="userSpaceOnUse" + x1="30.907085" + y1="30.457268" + x2="30.937366" + y2="39.051018" /> + <linearGradient + inkscape:collect="always" + xlink:href="#linearGradient4134-9-5-6-0" + id="linearGradient9602-1" + gradientUnits="userSpaceOnUse" + gradientTransform="matrix(1.08241,0,0,1.0768062,20.160914,4.7996577)" + x1="9.9747334" + y1="31.09375" + x2="37.077564" + y2="31.09375" /> + <linearGradient + id="linearGradient4134-9-5-6-0"> + <stop + id="stop4136-4-7-3-1" + offset="0" + style="stop-color:#4f79a6;stop-opacity:1;" /> + <stop + style="stop-color:#7fa8d3;stop-opacity:1" + offset="0.25000000" + id="stop4148-8-9-9-6" /> + <stop + style="stop-color:#7fa8d3;stop-opacity:1" + offset="0.45037496" + id="stop4142-8-2-2" /> + <stop + id="stop4138-2-3-4" + offset="1" + style="stop-color:#547ba6;stop-opacity:1" /> + </linearGradient> + <linearGradient + inkscape:collect="always" + xlink:href="#linearGradient4206-4-7-5" + id="linearGradient9604-1" + gradientUnits="userSpaceOnUse" + gradientTransform="matrix(1.08241,0,0,1.0768062,20.160914,4.7996577)" + x1="25.064732" + y1="21.857143" + x2="25.207588" + y2="25.428572" /> + <linearGradient + id="linearGradient4206-4-7-5"> + <stop + id="stop4208-5-9-8" + offset="0.0000000" + style="stop-color:#3465a4;stop-opacity:1" /> + <stop + id="stop4210-5-3-8" + offset="1.0000000" + style="stop-color:#3465a4;stop-opacity:1" /> + </linearGradient> + <linearGradient + inkscape:collect="always" + xlink:href="#linearGradient4176-3-1" + id="linearGradient9606-7" + gradientUnits="userSpaceOnUse" + gradientTransform="matrix(1.08241,0,0,1.0802618,20.160914,4.6630501)" + x1="17.160095" + y1="14.004482" + x2="37.969398" + y2="56.575912" /> + <linearGradient + id="linearGradient4176-3-1" + inkscape:collect="always"> + <stop + id="stop4178-8-2" + offset="0" + style="stop-color:#ffffff;stop-opacity:1;" /> + <stop + id="stop4180-1-1" + offset="1" + style="stop-color:#ffffff;stop-opacity:0;" /> + </linearGradient> + <linearGradient + inkscape:collect="always" + xlink:href="#linearGradient7210-7-1-4" + id="linearGradient9608-3" + gradientUnits="userSpaceOnUse" + x1="24" + y1="16.525082" + x2="24" + y2="13.284962" /> + <linearGradient + id="linearGradient7210-7-1-4"> + <stop + id="stop7212-33-9" + offset="0.0000000" + style="stop-color:#ffffff;stop-opacity:1.0000000;" /> + <stop + id="stop7214-0-8" + offset="1.0000000" + style="stop-color:#bfbebf;stop-opacity:1" /> + </linearGradient> + <linearGradient + inkscape:collect="always" + xlink:href="#linearGradient6924-6-2-0" + id="linearGradient9610-0" + gradientUnits="userSpaceOnUse" + gradientTransform="matrix(1.08241,0,0,1.0802618,20.006284,7.5180332)" + x1="16.07143" + y1="19.5" + x2="15.785715" + y2="30" /> + <linearGradient + id="linearGradient6924-6-2-0" + inkscape:collect="always"> + <stop + id="stop6926-8-4" + offset="0" + style="stop-color:#ffffff;stop-opacity:1;" /> + <stop + id="stop6928-76-5" + offset="1" + style="stop-color:#ffffff;stop-opacity:0;" /> + </linearGradient> + <linearGradient + inkscape:collect="always" + xlink:href="#linearGradient20490" + id="linearGradient9612" + gradientUnits="userSpaceOnUse" + gradientTransform="matrix(0.90770374,0.01394805,-0.01394805,0.90770374,120.12809,-4.1871001)" + x1="-78.977859" + y1="31.32707" + x2="-48.581718" + y2="19.79685" /> + <linearGradient + id="linearGradient20490"> + <stop + id="stop20492" + offset="0" + style="stop-color:#4dbb14;stop-opacity:1" /> + <stop + id="stop20494" + offset="1" + style="stop-color:#99ea58;stop-opacity:1" /> + </linearGradient> + <linearGradient + inkscape:collect="always" + xlink:href="#linearGradient21771" + id="linearGradient9614" + gradientUnits="userSpaceOnUse" + gradientTransform="matrix(0.90770374,0.01394805,-0.01394805,0.90770374,120.12809,-4.1871001)" + x1="-60.971153" + y1="26.995193" + x2="-63.190922" + y2="18.49259" /> + <linearGradient + id="linearGradient21771"> + <stop + id="stop21773" + offset="0" + style="stop-color:#7ad73c;stop-opacity:1" /> + <stop + id="stop21775" + offset="1" + style="stop-color:#52be18;stop-opacity:1" /> + </linearGradient> + <linearGradient + inkscape:collect="always" + xlink:href="#linearGradient20502" + id="linearGradient9616" + gradientUnits="userSpaceOnUse" + gradientTransform="matrix(0.90770374,0.01394805,-0.01394805,0.90770374,120.12809,-4.1871001)" + x1="-60.379169" + y1="23.812271" + x2="-51.339279" + y2="26.261297" /> + <linearGradient + id="linearGradient20502"> + <stop + style="stop-color:#98ea57;stop-opacity:1" + offset="0" + id="stop20504" /> + <stop + style="stop-color:#60a81a;stop-opacity:1" + offset="1" + id="stop20506" /> + </linearGradient> + <linearGradient + inkscape:collect="always" + xlink:href="#linearGradient7721-9-1" + id="linearGradient9618" + gradientUnits="userSpaceOnUse" + gradientTransform="matrix(0.91004274,0.01398398,-0.01435387,0.93411362,120.29077,-4.7056724)" + x1="-80.638779" + y1="22.180561" + x2="-45.592064" + y2="65.951057" /> + <linearGradient + id="linearGradient7721-9-1"> + <stop + id="stop7723-2-7" + offset="0" + style="stop-color:#ffffff;stop-opacity:1" /> + <stop + id="stop7725-0" + offset="1" + style="stop-color:#ffffff;stop-opacity:0" /> + </linearGradient> + <linearGradient + inkscape:collect="always" + xlink:href="#linearGradient6817-7" + id="linearGradient9620" + gradientUnits="userSpaceOnUse" + gradientTransform="matrix(2.6474497,0.04068148,-0.00509958,0.33186783,222.65672,10.870257)" + x1="-60.134838" + y1="70.540863" + x2="-60.135002" + y2="32.559666" /> + <linearGradient + inkscape:collect="always" + id="linearGradient6817-7"> + <stop + style="stop-color:#ffffff;stop-opacity:0" + offset="0" + id="stop6819-38" /> + <stop + style="stop-color:#ffffff;stop-opacity:1" + offset="1" + id="stop6821-2" /> + </linearGradient> + <linearGradient + inkscape:collect="always" + xlink:href="#linearGradient6817-7" + id="linearGradient9622" + gradientUnits="userSpaceOnUse" + gradientTransform="matrix(-0.87658866,-1.8443545,0.36168137,-0.17190071,5.515756,-88.361616)" + x1="-60.43829" + y1="49.03693" + x2="-60.549427" + y2="26.612957" /> + <linearGradient + inkscape:collect="always" + xlink:href="#linearGradient6817-7" + id="linearGradient9624" + gradientUnits="userSpaceOnUse" + gradientTransform="matrix(0.14875277,-2.0366452,-0.39938996,-0.02917073,84.026391,-103.16204)" + x1="-61.105808" + y1="85.233597" + x2="-60.5989" + y2="26.726358" /> + <linearGradient + inkscape:collect="always" + xlink:href="#linearGradient3957-48" + id="linearGradient9626" + gradientUnits="userSpaceOnUse" + gradientTransform="matrix(0.38087698,0,0,0.35432336,78.684959,0.87746894)" + x1="21.993773" + y1="33.955299" + x2="20.917078" + y2="15.814602" /> + <linearGradient + id="linearGradient3957-48"> + <stop + style="stop-color:#fffeff;stop-opacity:0.33333334;" + offset="0" + id="stop3959-3" /> + <stop + style="stop-color:#fffeff;stop-opacity:0.21568628;" + offset="1" + id="stop3961-01" /> + </linearGradient> + <linearGradient + inkscape:collect="always" + xlink:href="#linearGradient20490-4" + id="linearGradient9612-1" + gradientUnits="userSpaceOnUse" + gradientTransform="matrix(0.90770374,0.01394805,-0.01394805,0.90770374,120.12809,-4.1871001)" + x1="-78.977859" + y1="31.32707" + x2="-48.581718" + y2="19.79685" /> + <linearGradient + id="linearGradient20490-4"> + <stop + id="stop20492-3" + offset="0" + style="stop-color:#4dbb14;stop-opacity:1" /> + <stop + id="stop20494-5" + offset="1" + style="stop-color:#99ea58;stop-opacity:1" /> + </linearGradient> + <linearGradient + inkscape:collect="always" + xlink:href="#linearGradient21771-2" + id="linearGradient9614-5" + gradientUnits="userSpaceOnUse" + gradientTransform="matrix(0.90770374,0.01394805,-0.01394805,0.90770374,120.12809,-4.1871001)" + x1="-60.971153" + y1="26.995193" + x2="-63.190922" + y2="18.49259" /> + <linearGradient + id="linearGradient21771-2"> + <stop + id="stop21773-6" + offset="0" + style="stop-color:#7ad73c;stop-opacity:1" /> + <stop + id="stop21775-8" + offset="1" + style="stop-color:#52be18;stop-opacity:1" /> + </linearGradient> + <linearGradient + inkscape:collect="always" + xlink:href="#linearGradient20502-2" + id="linearGradient9616-9" + gradientUnits="userSpaceOnUse" + gradientTransform="matrix(0.90770374,0.01394805,-0.01394805,0.90770374,120.12809,-4.1871001)" + x1="-60.379169" + y1="23.812271" + x2="-51.339279" + y2="26.261297" /> + <linearGradient + id="linearGradient20502-2"> + <stop + style="stop-color:#98ea57;stop-opacity:1" + offset="0" + id="stop20504-9" /> + <stop + style="stop-color:#60a81a;stop-opacity:1" + offset="1" + id="stop20506-5" /> + </linearGradient> + <linearGradient + inkscape:collect="always" + xlink:href="#linearGradient7721-9-1-4" + id="linearGradient9618-9" + gradientUnits="userSpaceOnUse" + gradientTransform="matrix(0.91004274,0.01398398,-0.01435387,0.93411362,120.29077,-4.7056724)" + x1="-80.638779" + y1="22.180561" + x2="-45.592064" + y2="65.951057" /> + <linearGradient + id="linearGradient7721-9-1-4"> + <stop + id="stop7723-2-7-5" + offset="0" + style="stop-color:#ffffff;stop-opacity:1" /> + <stop + id="stop7725-0-0" + offset="1" + style="stop-color:#ffffff;stop-opacity:0" /> + </linearGradient> + <linearGradient + inkscape:collect="always" + xlink:href="#linearGradient6817-7-8" + id="linearGradient9620-5" + gradientUnits="userSpaceOnUse" + gradientTransform="matrix(2.6474497,0.04068148,-0.00509958,0.33186783,222.65672,10.870257)" + x1="-60.134838" + y1="70.540863" + x2="-60.135002" + y2="32.559666" /> + <linearGradient + inkscape:collect="always" + id="linearGradient6817-7-8"> + <stop + style="stop-color:#ffffff;stop-opacity:0" + offset="0" + id="stop6819-38-8" /> + <stop + style="stop-color:#ffffff;stop-opacity:1" + offset="1" + id="stop6821-2-0" /> + </linearGradient> + <linearGradient + inkscape:collect="always" + xlink:href="#linearGradient6817-7-8" + id="linearGradient9622-1" + gradientUnits="userSpaceOnUse" + gradientTransform="matrix(-0.87658866,-1.8443545,0.36168137,-0.17190071,5.515756,-88.361616)" + x1="-60.43829" + y1="49.03693" + x2="-60.549427" + y2="26.612957" /> + <linearGradient + inkscape:collect="always" + xlink:href="#linearGradient6817-7-8" + id="linearGradient9624-3" + gradientUnits="userSpaceOnUse" + gradientTransform="matrix(0.14875277,-2.0366452,-0.39938996,-0.02917073,84.026391,-103.16204)" + x1="-61.105808" + y1="85.233597" + x2="-60.5989" + y2="26.726358" /> + <linearGradient + y2="26.726358" + x2="-60.5989" + y1="85.233597" + x1="-61.105808" + gradientTransform="matrix(0.14875277,-2.0366452,-0.39938996,-0.02917073,84.026391,-103.16204)" + gradientUnits="userSpaceOnUse" + id="linearGradient16256" + xlink:href="#linearGradient6817-7-8" + inkscape:collect="always" /> + <linearGradient + inkscape:collect="always" + xlink:href="#linearGradient3957-1-3" + id="linearGradient16439" + gradientUnits="userSpaceOnUse" + gradientTransform="matrix(0.38087698,0,0,0.35432336,78.684959,0.87746894)" + x1="21.993773" + y1="33.955299" + x2="20.917078" + y2="15.814602" /> + <linearGradient + id="linearGradient3957-1-3"> + <stop + style="stop-color:#fffeff;stop-opacity:0.33333334;" + offset="0" + id="stop3959-25-4" /> + <stop + style="stop-color:#fffeff;stop-opacity:0.21568628;" + offset="1" + id="stop3961-7-3" /> + </linearGradient> + <linearGradient + inkscape:collect="always" + xlink:href="#linearGradient4134-9-5-6-5-1" + id="linearGradient24412" + gradientUnits="userSpaceOnUse" + gradientTransform="matrix(1.08241,0,0,1.0768062,20.160914,4.7996577)" + x1="9.9747334" + y1="31.09375" + x2="37.077564" + y2="31.09375" /> + <linearGradient + id="linearGradient4134-9-5-6-5-1"> + <stop + id="stop4136-4-7-9" + offset="0" + style="stop-color:#4f79a6;stop-opacity:1;" /> + <stop + style="stop-color:#7fa8d3;stop-opacity:1" + offset="0.25000000" + id="stop4148-8-9-9-7" /> + <stop + style="stop-color:#7fa8d3;stop-opacity:1" + offset="0.45037496" + id="stop4142-8-2-2-7" /> + <stop + id="stop4138-2-3-0" + offset="1" + style="stop-color:#547ba6;stop-opacity:1" /> + </linearGradient> + <linearGradient + inkscape:collect="always" + xlink:href="#linearGradient4206-4-7-86" + id="linearGradient24414" + gradientUnits="userSpaceOnUse" + gradientTransform="matrix(1.08241,0,0,1.0768062,20.160914,4.7996577)" + x1="25.064732" + y1="21.857143" + x2="25.207588" + y2="25.428572" /> + <linearGradient + id="linearGradient4206-4-7-86"> + <stop + id="stop4208-5-9-7" + offset="0.0000000" + style="stop-color:#3465a4;stop-opacity:1" /> + <stop + id="stop4210-5-3-08" + offset="1.0000000" + style="stop-color:#3465a4;stop-opacity:1" /> + </linearGradient> + <linearGradient + inkscape:collect="always" + xlink:href="#linearGradient4176-3-8" + id="linearGradient24416" + gradientUnits="userSpaceOnUse" + gradientTransform="matrix(1.08241,0,0,1.0802618,20.160914,4.6630501)" + x1="17.160095" + y1="14.004482" + x2="37.969398" + y2="56.575912" /> + <linearGradient + id="linearGradient4176-3-8" + inkscape:collect="always"> + <stop + id="stop4178-8-3" + offset="0" + style="stop-color:#ffffff;stop-opacity:1;" /> + <stop + id="stop4180-1-0" + offset="1" + style="stop-color:#ffffff;stop-opacity:0;" /> + </linearGradient> + <linearGradient + inkscape:collect="always" + xlink:href="#linearGradient7210-7-1-6" + id="linearGradient24418" + gradientUnits="userSpaceOnUse" + x1="24" + y1="16.525082" + x2="24" + y2="13.284962" /> + <linearGradient + id="linearGradient7210-7-1-6"> + <stop + id="stop7212-33-20" + offset="0.0000000" + style="stop-color:#ffffff;stop-opacity:1.0000000;" /> + <stop + id="stop7214-0-2" + offset="1.0000000" + style="stop-color:#bfbebf;stop-opacity:1" /> + </linearGradient> + <linearGradient + inkscape:collect="always" + xlink:href="#linearGradient6924-6-4" + id="linearGradient24420" + gradientUnits="userSpaceOnUse" + gradientTransform="matrix(1.08241,0,0,1.0802618,20.006284,7.5180332)" + x1="16.07143" + y1="19.5" + x2="15.785715" + y2="30" /> + <linearGradient + id="linearGradient6924-6-4" + inkscape:collect="always"> + <stop + id="stop6926-8-1" + offset="0" + style="stop-color:#ffffff;stop-opacity:1;" /> + <stop + id="stop6928-76-83" + offset="1" + style="stop-color:#ffffff;stop-opacity:0;" /> + </linearGradient> + <linearGradient + inkscape:collect="always" + xlink:href="#linearGradient10197-6" + id="linearGradient24422" + gradientUnits="userSpaceOnUse" + gradientTransform="matrix(0.90770374,0.01394805,-0.01394805,0.90770374,220.14387,8.0702099)" + x1="-78.977859" + y1="31.32707" + x2="-48.581718" + y2="19.79685" /> + <linearGradient + id="linearGradient10197-6"> + <stop + style="stop-color:#ca1c0a;stop-opacity:1" + offset="0" + id="stop10199-3" /> + <stop + style="stop-color:#f05034;stop-opacity:1" + offset="1" + id="stop10201-4" /> + </linearGradient> + <linearGradient + inkscape:collect="always" + xlink:href="#linearGradient10203-8" + id="linearGradient24424" + gradientUnits="userSpaceOnUse" + gradientTransform="matrix(0.90770374,0.01394805,-0.01394805,0.90770374,220.14387,8.0702099)" + x1="-60.971153" + y1="26.995193" + x2="-63.190922" + y2="18.49259" /> + <linearGradient + id="linearGradient10203-8"> + <stop + id="stop10205-8" + offset="0" + style="stop-color:#e13c24;stop-opacity:1" /> + <stop + id="stop10207-3" + offset="1" + style="stop-color:#ca1c0a;stop-opacity:1" /> + </linearGradient> + <linearGradient + inkscape:collect="always" + xlink:href="#linearGradient10209-7" + id="linearGradient24426" + gradientUnits="userSpaceOnUse" + gradientTransform="matrix(0.90770374,0.01394805,-0.01394805,0.90770374,220.14387,8.0702099)" + x1="-60.379169" + y1="23.812271" + x2="-51.339279" + y2="26.261297" /> + <linearGradient + id="linearGradient10209-7"> + <stop + id="stop10211-3" + offset="0" + style="stop-color:#e64229;stop-opacity:1" /> + <stop + id="stop10213-5" + offset="1" + style="stop-color:#cc1f0d;stop-opacity:1" /> + </linearGradient> + <linearGradient + inkscape:collect="always" + xlink:href="#linearGradient7721-9-1-40" + id="linearGradient24428" + gradientUnits="userSpaceOnUse" + gradientTransform="matrix(0.91004274,0.01398398,-0.01435387,0.93411362,220.30655,7.5516376)" + x1="-80.638779" + y1="22.180561" + x2="-45.592064" + y2="65.951057" /> + <linearGradient + id="linearGradient7721-9-1-40"> + <stop + id="stop7723-2-7-9" + offset="0" + style="stop-color:#ffffff;stop-opacity:1" /> + <stop + id="stop7725-0-4" + offset="1" + style="stop-color:#ffffff;stop-opacity:0" /> + </linearGradient> + <linearGradient + inkscape:collect="always" + xlink:href="#linearGradient6817-7-0" + id="linearGradient24430" + gradientUnits="userSpaceOnUse" + gradientTransform="matrix(2.6474497,0.04068148,-0.00509958,0.33186783,322.6725,23.127567)" + x1="-60.134838" + y1="70.540863" + x2="-60.225922" + y2="23.254047" /> + <linearGradient + inkscape:collect="always" + id="linearGradient6817-7-0"> + <stop + style="stop-color:#ffffff;stop-opacity:0" + offset="0" + id="stop6819-38-6" /> + <stop + style="stop-color:#ffffff;stop-opacity:1" + offset="1" + id="stop6821-2-2" /> + </linearGradient> + <linearGradient + inkscape:collect="always" + xlink:href="#linearGradient6817-7-0" + id="linearGradient24432" + gradientUnits="userSpaceOnUse" + gradientTransform="matrix(-0.87658866,-1.8443545,0.36168137,-0.17190071,105.53154,-76.104306)" + x1="-60.43829" + y1="49.03693" + x2="-60.549427" + y2="26.612957" /> + <linearGradient + inkscape:collect="always" + xlink:href="#linearGradient6817-7-0" + id="linearGradient24434" + gradientUnits="userSpaceOnUse" + gradientTransform="matrix(0.14875277,-2.0366452,-0.39938996,-0.02917073,184.04217,-90.904731)" + x1="-61.105808" + y1="85.233597" + x2="-60.5989" + y2="26.726358" /> + <linearGradient + inkscape:collect="always" + xlink:href="#linearGradient11503-8" + id="linearGradient24436" + gradientUnits="userSpaceOnUse" + x1="31.542158" + y1="27.633146" + x2="39.232777" + y2="40.738911" /> + <linearGradient + inkscape:collect="always" + id="linearGradient11503-8"> + <stop + style="stop-color:#ef2929" + offset="0" + id="stop11505-6" /> + <stop + style="stop-color:#cc0000" + offset="1" + id="stop11507-7" /> + </linearGradient> + <linearGradient + inkscape:collect="always" + xlink:href="#linearGradient3957-4-4" + id="linearGradient24438" + gradientUnits="userSpaceOnUse" + gradientTransform="matrix(0.509273,0,0,0.473768,23.78749,24.00915)" + x1="21.993773" + y1="33.955299" + x2="20.917078" + y2="15.814602" /> + <linearGradient + id="linearGradient3957-4-4"> + <stop + style="stop-color:#fffeff;stop-opacity:0.33333334;" + offset="0" + id="stop3959-2-8" /> + <stop + style="stop-color:#fffeff;stop-opacity:0.21568628;" + offset="1" + id="stop3961-0-8" /> + </linearGradient> + <linearGradient + y2="30" + x2="15.785715" + y1="19.5" + x1="16.07143" + gradientTransform="matrix(1.08241,0,0,1.0802618,20.006284,7.5180332)" + gradientUnits="userSpaceOnUse" + id="linearGradient7311" + xlink:href="#linearGradient6924-6-4" + inkscape:collect="always" /> + <linearGradient + inkscape:collect="always" + xlink:href="#linearGradient11503-8-2" + id="linearGradient10186" + gradientUnits="userSpaceOnUse" + x1="31.542158" + y1="27.633146" + x2="39.232777" + y2="40.738911" /> + <linearGradient + inkscape:collect="always" + id="linearGradient11503-8-2"> + <stop + style="stop-color:#ef2929" + offset="0" + id="stop11505-6-4" /> + <stop + style="stop-color:#cc0000" + offset="1" + id="stop11507-7-5" /> + </linearGradient> + <linearGradient + inkscape:collect="always" + xlink:href="#linearGradient3957-4-5" + id="linearGradient10188" + gradientUnits="userSpaceOnUse" + gradientTransform="matrix(0.509273,0,0,0.473768,23.78749,24.00915)" + x1="21.993773" + y1="33.955299" + x2="20.917078" + y2="15.814602" /> + <linearGradient + id="linearGradient3957-4-5"> + <stop + style="stop-color:#fffeff;stop-opacity:0.33333334;" + offset="0" + id="stop3959-2-1" /> + <stop + style="stop-color:#fffeff;stop-opacity:0.21568628;" + offset="1" + id="stop3961-0-7" /> + </linearGradient> + </defs> + <sodipodi:namedview + id="base" + pagecolor="#ffffff" + bordercolor="#666666" + borderopacity="1.0" + inkscape:pageopacity="0.0" + inkscape:pageshadow="2" + inkscape:zoom="5.6568542" + inkscape:cx="-2.9690127" + inkscape:cy="24.028461" + inkscape:current-layer="g6615" + showgrid="true" + inkscape:grid-bbox="true" + inkscape:document-units="px" + inkscape:window-width="1280" + inkscape:window-height="726" + inkscape:window-x="0" + inkscape:window-y="25" + inkscape:window-maximized="1" /> + <metadata + id="metadata3378"> + <rdf:RDF> + <cc:Work + rdf:about=""> + <dc:format>image/svg+xml</dc:format> + <dc:type + rdf:resource="http://purl.org/dc/dcmitype/StillImage" /> + <dc:title /> + </cc:Work> + </rdf:RDF> + </metadata> + <g + id="layer1" + inkscape:label="Layer 1" + inkscape:groupmode="layer"> + <g + id="g7697" + transform="matrix(0.67445281,0,0,0.67445281,-191.41209,85.380144)" /> + <g + id="g7697-0" + transform="matrix(0.67445281,0,0,0.67445281,-191.41209,85.380144)" /> + <g + id="g7697-1" + transform="matrix(0.67445281,0,0,0.67445281,-191.41209,85.380144)" /> + <g + id="g7697-3" + transform="matrix(0.67445281,0,0,0.67445281,-191.41209,85.380144)" /> + <g + id="g6615" + transform="translate(-95.5,0)"> + <g + transform="matrix(-1.1587832,0,0,1.1525756,303.96805,-13.576042)" + id="g21727"> + <path + sodipodi:nodetypes="ccccc" + inkscape:connector-curvature="0" + id="path21671" + d="m 145.52989,27.793162 0.0371,7.30215 20.44526,3.589106 0.12181,-7.865513 z" + style="fill:url(#linearGradient24422);fill-opacity:1;stroke:none" /> + <path + sodipodi:nodetypes="ccccc" + inkscape:connector-curvature="0" + id="path21673" + d="m 145.52409,27.795211 8.14425,-3.354298 20.08286,2.920461 -7.6184,3.460248 z" + style="fill:url(#linearGradient24424);fill-opacity:1;stroke:none" /> + <path + sodipodi:nodetypes="ccccc" + inkscape:connector-curvature="0" + id="path21675" + d="m 166.12008,30.824956 -0.085,7.896819 7.27053,-4.892126 0.39827,-6.510014 z" + style="fill:url(#linearGradient24426);fill-opacity:1;stroke:none" /> + <path + sodipodi:nodetypes="ccccccccccccccc" + inkscape:connector-curvature="0" + id="path21677" + d="m 153.66438,25.02508 c -2.66643,1.074217 -7.32161,2.796413 -7.32161,2.796413 l 0.007,7.017683 19.71847,3.95873 6.77264,-4.707984 0.15268,-6.238945 c 0,0 -13.41372,-2.731117 -19.32909,-2.825895 z m 0.0979,0.544614 18.40297,2.436419 -0.0738,5.846804 -6.00725,3.776425 -18.74242,-3.469609 0.0867,-6.320942 z" + style="font-size:medium;font-style:normal;font-variant:normal;font-weight:normal;font-stretch:normal;text-indent:0;text-align:start;text-decoration:none;line-height:normal;letter-spacing:normal;word-spacing:normal;text-transform:none;direction:ltr;block-progression:tb;writing-mode:lr-tb;text-anchor:start;opacity:0.41150441;color:#000000;fill:url(#linearGradient24428);fill-opacity:1;stroke:none;stroke-width:1.53600001;marker:none;visibility:visible;display:inline;overflow:visible;enable-background:accumulate;font-family:Sans;-inkscape-font-specification:Sans" /> + <path + sodipodi:nodetypes="cc" + inkscape:connector-curvature="0" + id="path21679" + d="m 166.079,30.820784 -0.13165,8.30955" + style="opacity:0.37168142;fill:#cedcc2;fill-opacity:1;stroke:url(#linearGradient24430);stroke-width:0.9374491px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1" /> + <path + sodipodi:nodetypes="ccccccccccccccccc" + inkscape:connector-curvature="0" + id="path21681" + d="m 153.64666,24.402076 c 0,0 -5.31325,1.954668 -7.88129,3.047675 l -0.24781,0.09011 0,0.270339 0.0451,7.389259 20.6208,4.033511 7.49315,-4.875522 0.0873,-7.075886 -20.11718,-2.87949 z m 0.0505,0.617405 19.30082,2.847517 -0.0873,6.268968 -6.9074,4.30852 -19.65048,-3.605476 -0.01,-7.017191 z" + style="font-size:medium;font-style:normal;font-variant:normal;font-weight:normal;font-stretch:normal;text-indent:0;text-align:start;text-decoration:none;line-height:normal;letter-spacing:normal;word-spacing:normal;text-transform:none;direction:ltr;block-progression:tb;writing-mode:lr-tb;text-anchor:start;color:#000000;fill:#840100;fill-opacity:1;stroke:#840100;stroke-width:0.13527358;stroke-miterlimit:4;stroke-opacity:1;stroke-dasharray:none;marker:none;visibility:visible;display:inline;overflow:visible;enable-background:accumulate;font-family:Sans;-inkscape-font-specification:Sans" /> + <path + sodipodi:nodetypes="ccccccc" + inkscape:connector-curvature="0" + id="path21683" + d="m 171.841,27.965939 -6.22788,2.836559 0.91532,0.0092 -0.002,0.231976 5.63042,-2.700313 -0.005,-0.346342 z" + style="font-size:medium;font-style:normal;font-variant:normal;font-weight:normal;font-stretch:normal;text-indent:0;text-align:start;text-decoration:none;line-height:normal;letter-spacing:normal;word-spacing:normal;text-transform:none;direction:ltr;block-progression:tb;writing-mode:lr-tb;text-anchor:start;opacity:0.5;color:#000000;fill:url(#linearGradient24432);fill-opacity:1;fill-rule:nonzero;stroke:none;stroke-width:1.25439572px;marker:none;visibility:visible;display:inline;overflow:visible;enable-background:accumulate;font-family:Sans;-inkscape-font-specification:Sans" /> + <path + style="font-size:medium;font-style:normal;font-variant:normal;font-weight:normal;font-stretch:normal;text-indent:0;text-align:start;text-decoration:none;line-height:normal;letter-spacing:normal;word-spacing:normal;text-transform:none;direction:ltr;block-progression:tb;writing-mode:lr-tb;text-anchor:start;opacity:0.5;color:#000000;fill:url(#linearGradient24434);fill-opacity:1;fill-rule:nonzero;stroke:none;stroke-width:1.25439572px;marker:none;visibility:visible;display:inline;overflow:visible;enable-background:accumulate;font-family:Sans;-inkscape-font-specification:Sans" + d="m 148.22573,27.608798 17.80115,3.017916 -0.40616,0.180949 -0.009,0.38622 -18.12861,-2.83368 0.0446,-0.458495 z" + id="path21685" + inkscape:connector-curvature="0" + sodipodi:nodetypes="ccccccc" /> + </g> + </g> + </g> +</svg> diff --git a/src/com.gluster.storage.management.console/icons/tango/scalable/offline_brick_alert.svg b/src/org.gluster.storage.management.console/icons/tango/scalable/offline_brick_alert.svg index 5bc030db..5bc030db 100644 --- a/src/com.gluster.storage.management.console/icons/tango/scalable/offline_brick_alert.svg +++ b/src/org.gluster.storage.management.console/icons/tango/scalable/offline_brick_alert.svg diff --git a/src/com.gluster.storage.management.console/icons/tango/scalable/offline_server.svg b/src/org.gluster.storage.management.console/icons/tango/scalable/offline_server.svg index f1f50c40..f1f50c40 100644 --- a/src/com.gluster.storage.management.console/icons/tango/scalable/offline_server.svg +++ b/src/org.gluster.storage.management.console/icons/tango/scalable/offline_server.svg diff --git a/src/com.gluster.storage.management.console/icons/tango/scalable/offline_volume.svg b/src/org.gluster.storage.management.console/icons/tango/scalable/offline_volume.svg index 8146a910..8146a910 100644 --- a/src/com.gluster.storage.management.console/icons/tango/scalable/offline_volume.svg +++ b/src/org.gluster.storage.management.console/icons/tango/scalable/offline_volume.svg diff --git a/src/com.gluster.storage.management.console/icons/tango/scalable/online-8x8.svg b/src/org.gluster.storage.management.console/icons/tango/scalable/online-8x8.svg index 8cef7653..8cef7653 100644 --- a/src/com.gluster.storage.management.console/icons/tango/scalable/online-8x8.svg +++ b/src/org.gluster.storage.management.console/icons/tango/scalable/online-8x8.svg diff --git a/src/com.gluster.storage.management.console/icons/tango/scalable/online.svg b/src/org.gluster.storage.management.console/icons/tango/scalable/online.svg index c25a4232..c25a4232 100644 --- a/src/com.gluster.storage.management.console/icons/tango/scalable/online.svg +++ b/src/org.gluster.storage.management.console/icons/tango/scalable/online.svg diff --git a/src/com.gluster.storage.management.console/icons/tango/scalable/remove-server.svg b/src/org.gluster.storage.management.console/icons/tango/scalable/remove-server.svg index 4280df60..4280df60 100644 --- a/src/com.gluster.storage.management.console/icons/tango/scalable/remove-server.svg +++ b/src/org.gluster.storage.management.console/icons/tango/scalable/remove-server.svg diff --git a/src/com.gluster.storage.management.console/icons/tango/scalable/remove_brick.svg b/src/org.gluster.storage.management.console/icons/tango/scalable/remove_brick.svg index 450b24c8..450b24c8 100644 --- a/src/com.gluster.storage.management.console/icons/tango/scalable/remove_brick.svg +++ b/src/org.gluster.storage.management.console/icons/tango/scalable/remove_brick.svg diff --git a/src/com.gluster.storage.management.console/icons/tango/scalable/remove_volume.svg b/src/org.gluster.storage.management.console/icons/tango/scalable/remove_volume.svg index 83055628..83055628 100644 --- a/src/com.gluster.storage.management.console/icons/tango/scalable/remove_volume.svg +++ b/src/org.gluster.storage.management.console/icons/tango/scalable/remove_volume.svg diff --git a/src/com.gluster.storage.management.console/icons/tango/scalable/reset_volume_option.svg b/src/org.gluster.storage.management.console/icons/tango/scalable/reset_volume_option.svg index cd048c2b..cd048c2b 100644 --- a/src/com.gluster.storage.management.console/icons/tango/scalable/reset_volume_option.svg +++ b/src/org.gluster.storage.management.console/icons/tango/scalable/reset_volume_option.svg diff --git a/src/com.gluster.storage.management.console/icons/tango/scalable/running_task.svg b/src/org.gluster.storage.management.console/icons/tango/scalable/running_task.svg index d9cf0582..d9cf0582 100644 --- a/src/com.gluster.storage.management.console/icons/tango/scalable/running_task.svg +++ b/src/org.gluster.storage.management.console/icons/tango/scalable/running_task.svg diff --git a/src/com.gluster.storage.management.console/icons/tango/scalable/star-8x8.svg b/src/org.gluster.storage.management.console/icons/tango/scalable/star-8x8.svg index f3027569..f3027569 100644 --- a/src/com.gluster.storage.management.console/icons/tango/scalable/star-8x8.svg +++ b/src/org.gluster.storage.management.console/icons/tango/scalable/star-8x8.svg diff --git a/src/com.gluster.storage.management.console/icons/tango/scalable/start-volume-disabled.svg b/src/org.gluster.storage.management.console/icons/tango/scalable/start-volume-disabled.svg index 3ef559c7..3ef559c7 100644 --- a/src/com.gluster.storage.management.console/icons/tango/scalable/start-volume-disabled.svg +++ b/src/org.gluster.storage.management.console/icons/tango/scalable/start-volume-disabled.svg diff --git a/src/com.gluster.storage.management.console/icons/tango/scalable/start_volume.svg b/src/org.gluster.storage.management.console/icons/tango/scalable/start_volume.svg index 5e738c33..5e738c33 100644 --- a/src/com.gluster.storage.management.console/icons/tango/scalable/start_volume.svg +++ b/src/org.gluster.storage.management.console/icons/tango/scalable/start_volume.svg diff --git a/src/com.gluster.storage.management.console/icons/tango/scalable/stop_volume.svg b/src/org.gluster.storage.management.console/icons/tango/scalable/stop_volume.svg index 315bb09b..315bb09b 100644 --- a/src/com.gluster.storage.management.console/icons/tango/scalable/stop_volume.svg +++ b/src/org.gluster.storage.management.console/icons/tango/scalable/stop_volume.svg diff --git a/src/com.gluster.storage.management.console/icons/tango/scalable/task_clear.svg b/src/org.gluster.storage.management.console/icons/tango/scalable/task_clear.svg index 02b0b919..02b0b919 100644 --- a/src/com.gluster.storage.management.console/icons/tango/scalable/task_clear.svg +++ b/src/org.gluster.storage.management.console/icons/tango/scalable/task_clear.svg diff --git a/src/com.gluster.storage.management.console/icons/tango/scalable/task_commit.svg b/src/org.gluster.storage.management.console/icons/tango/scalable/task_commit.svg index 29817471..29817471 100644 --- a/src/com.gluster.storage.management.console/icons/tango/scalable/task_commit.svg +++ b/src/org.gluster.storage.management.console/icons/tango/scalable/task_commit.svg diff --git a/src/com.gluster.storage.management.console/icons/tango/scalable/task_pause.svg b/src/org.gluster.storage.management.console/icons/tango/scalable/task_pause.svg index ff9b5f3e..ff9b5f3e 100644 --- a/src/com.gluster.storage.management.console/icons/tango/scalable/task_pause.svg +++ b/src/org.gluster.storage.management.console/icons/tango/scalable/task_pause.svg diff --git a/src/com.gluster.storage.management.console/icons/tango/scalable/task_paused.svg b/src/org.gluster.storage.management.console/icons/tango/scalable/task_paused.svg index 9d6930e1..9d6930e1 100644 --- a/src/com.gluster.storage.management.console/icons/tango/scalable/task_paused.svg +++ b/src/org.gluster.storage.management.console/icons/tango/scalable/task_paused.svg diff --git a/src/com.gluster.storage.management.console/icons/tango/scalable/task_resume.svg b/src/org.gluster.storage.management.console/icons/tango/scalable/task_resume.svg index 2bd8732c..2bd8732c 100644 --- a/src/com.gluster.storage.management.console/icons/tango/scalable/task_resume.svg +++ b/src/org.gluster.storage.management.console/icons/tango/scalable/task_resume.svg diff --git a/src/com.gluster.storage.management.console/icons/tango/scalable/task_running.svg b/src/org.gluster.storage.management.console/icons/tango/scalable/task_running.svg index fa15b7b8..fa15b7b8 100644 --- a/src/com.gluster.storage.management.console/icons/tango/scalable/task_running.svg +++ b/src/org.gluster.storage.management.console/icons/tango/scalable/task_running.svg diff --git a/src/com.gluster.storage.management.console/icons/tango/scalable/task_status_completed.svg b/src/org.gluster.storage.management.console/icons/tango/scalable/task_status_completed.svg index ce0bf238..ce0bf238 100644 --- a/src/com.gluster.storage.management.console/icons/tango/scalable/task_status_completed.svg +++ b/src/org.gluster.storage.management.console/icons/tango/scalable/task_status_completed.svg diff --git a/src/com.gluster.storage.management.console/icons/tango/scalable/task_status_error.svg b/src/org.gluster.storage.management.console/icons/tango/scalable/task_status_error.svg index 5fb8b116..5fb8b116 100644 --- a/src/com.gluster.storage.management.console/icons/tango/scalable/task_status_error.svg +++ b/src/org.gluster.storage.management.console/icons/tango/scalable/task_status_error.svg diff --git a/src/com.gluster.storage.management.console/icons/tango/scalable/task_stop.svg b/src/org.gluster.storage.management.console/icons/tango/scalable/task_stop.svg index 07227fd4..07227fd4 100644 --- a/src/com.gluster.storage.management.console/icons/tango/scalable/task_stop.svg +++ b/src/org.gluster.storage.management.console/icons/tango/scalable/task_stop.svg diff --git a/src/com.gluster.storage.management.console/icons/tango/scalable/task_stopped.svg b/src/org.gluster.storage.management.console/icons/tango/scalable/task_stopped.svg index d900f03f..d900f03f 100644 --- a/src/com.gluster.storage.management.console/icons/tango/scalable/task_stopped.svg +++ b/src/org.gluster.storage.management.console/icons/tango/scalable/task_stopped.svg diff --git a/src/com.gluster.storage.management.console/icons/tango/scalable/utilities-terminal.svg b/src/org.gluster.storage.management.console/icons/tango/scalable/utilities-terminal.svg index 995fb90b..995fb90b 100644 --- a/src/com.gluster.storage.management.console/icons/tango/scalable/utilities-terminal.svg +++ b/src/org.gluster.storage.management.console/icons/tango/scalable/utilities-terminal.svg diff --git a/src/com.gluster.storage.management.console/icons/tango/scalable/view-refresh.svg b/src/org.gluster.storage.management.console/icons/tango/scalable/view-refresh.svg index 565f6dad..565f6dad 100644 --- a/src/com.gluster.storage.management.console/icons/tango/scalable/view-refresh.svg +++ b/src/org.gluster.storage.management.console/icons/tango/scalable/view-refresh.svg diff --git a/src/com.gluster.storage.management.console/icons/tango/scalable/volume.svg b/src/org.gluster.storage.management.console/icons/tango/scalable/volume.svg index b5e50a46..b5e50a46 100644 --- a/src/com.gluster.storage.management.console/icons/tango/scalable/volume.svg +++ b/src/org.gluster.storage.management.console/icons/tango/scalable/volume.svg diff --git a/src/com.gluster.storage.management.console/icons/tango/scalable/volume_option.svg b/src/org.gluster.storage.management.console/icons/tango/scalable/volume_option.svg index 3fb4a928..3fb4a928 100644 --- a/src/com.gluster.storage.management.console/icons/tango/scalable/volume_option.svg +++ b/src/org.gluster.storage.management.console/icons/tango/scalable/volume_option.svg diff --git a/src/com.gluster.storage.management.console/icons/tango/scalable/volume_rebalance.svg b/src/org.gluster.storage.management.console/icons/tango/scalable/volume_rebalance.svg index 78fdc384..78fdc384 100644 --- a/src/com.gluster.storage.management.console/icons/tango/scalable/volume_rebalance.svg +++ b/src/org.gluster.storage.management.console/icons/tango/scalable/volume_rebalance.svg diff --git a/src/com.gluster.storage.management.console/icons/tango/scalable/volumes.svg b/src/org.gluster.storage.management.console/icons/tango/scalable/volumes.svg index 3c99b006..3c99b006 100644 --- a/src/com.gluster.storage.management.console/icons/tango/scalable/volumes.svg +++ b/src/org.gluster.storage.management.console/icons/tango/scalable/volumes.svg diff --git a/src/com.gluster.storage.management.console/images/gauge.png b/src/org.gluster.storage.management.console/images/gauge.png Binary files differindex 6f5764ea..6f5764ea 100644 --- a/src/com.gluster.storage.management.console/images/gauge.png +++ b/src/org.gluster.storage.management.console/images/gauge.png diff --git a/src/com.gluster.storage.management.console/images/gauge_small.png b/src/org.gluster.storage.management.console/images/gauge_small.png Binary files differindex 71e424fe..71e424fe 100644 --- a/src/com.gluster.storage.management.console/images/gauge_small.png +++ b/src/org.gluster.storage.management.console/images/gauge_small.png diff --git a/src/com.gluster.storage.management.console/images/gluster-about.png b/src/org.gluster.storage.management.console/images/gluster-about.png Binary files differindex 9518b2b2..9518b2b2 100644 --- a/src/com.gluster.storage.management.console/images/gluster-about.png +++ b/src/org.gluster.storage.management.console/images/gluster-about.png diff --git a/src/com.gluster.storage.management.console/images/login-screen-with-text.psd b/src/org.gluster.storage.management.console/images/login-screen-with-text.psd Binary files differindex f6e7ab35..f6e7ab35 100644 --- a/src/com.gluster.storage.management.console/images/login-screen-with-text.psd +++ b/src/org.gluster.storage.management.console/images/login-screen-with-text.psd diff --git a/src/com.gluster.storage.management.console/images/login-screen.psd b/src/org.gluster.storage.management.console/images/login-screen.psd Binary files differindex a9bfc27e..a9bfc27e 100644 --- a/src/com.gluster.storage.management.console/images/login-screen.psd +++ b/src/org.gluster.storage.management.console/images/login-screen.psd diff --git a/src/com.gluster.storage.management.console/images/splash-dialog.bmp b/src/org.gluster.storage.management.console/images/splash-dialog.bmp Binary files differindex 932032fb..932032fb 100644 --- a/src/com.gluster.storage.management.console/images/splash-dialog.bmp +++ b/src/org.gluster.storage.management.console/images/splash-dialog.bmp diff --git a/src/com.gluster.storage.management.console/images/splash-screen.psd b/src/org.gluster.storage.management.console/images/splash-screen.psd Binary files differindex 43544f41..43544f41 100644 --- a/src/com.gluster.storage.management.console/images/splash-screen.psd +++ b/src/org.gluster.storage.management.console/images/splash-screen.psd diff --git a/src/org.gluster.storage.management.console/plugin.properties b/src/org.gluster.storage.management.console/plugin.properties new file mode 100644 index 00000000..b61106df --- /dev/null +++ b/src/org.gluster.storage.management.console/plugin.properties @@ -0,0 +1,26 @@ +############################################################################### +# Copyright (c) 2006-2011 Gluster, Inc. <http://www.gluster.com> +# This file is part of Gluster Management Console. +# +# Gluster Management Console is free software; you can redistribute +# it and/or modify it under the terms of the GNU General Public +# License as published by the Free Software Foundation; either +# version 3 of the License, or (at your option) any later version. +# +# Gluster Management Console is distributed in the hope that it +# will be useful, but WITHOUT ANY WARRANTY; without even the +# implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR +# PURPOSE. See the GNU General Public License for more details. +# +# You should have received a copy of the GNU General Public License +# along with this program. If not, see +# <http://www.gnu.org/licenses/>. +############################################################################### +aboutText=Gluster Management Console\n\ +Version: @VERSION@\n\n\ +Copyright (c) 2011 Gluster, Inc.\n\ +Visit http://www.gluster.com/\n\n\ +This product includes software developed by the\n\ +Eclipse Foundation http://eclipse.org/\n\ +java.net http://jersey.java.net/\n\ +RichClientGUI http://www.richclientgui.com/ diff --git a/src/com.gluster.storage.management.console/plugin.xml b/src/org.gluster.storage.management.console/plugin.xml index 90fa2c5b..fb9af0eb 100644 --- a/src/com.gluster.storage.management.console/plugin.xml +++ b/src/org.gluster.storage.management.console/plugin.xml @@ -1,5 +1,24 @@ <?xml version="1.0" encoding="UTF-8"?> <?eclipse version="3.4"?> +<!-- + Copyright (c) 2006-2011 Gluster, Inc. <http://www.gluster.com> + This file is part of Gluster Management Console. + + Gluster Management Console is free software; you can redistribute + it and/or modify it under the terms of the GNU General Public + License as published by the Free Software Foundation; either + version 3 of the License, or (at your option) any later version. + + Gluster Management Console is distributed in the hope that it + will be useful, but WITHOUT ANY WARRANTY; without even the + implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR + PURPOSE. See the GNU General Public License for more details. + + You should have received a copy of the GNU General Public License + along with this program. If not, see + <http://www.gnu.org/licenses/>. + --> + <plugin> <extension @@ -7,7 +26,7 @@ point="org.eclipse.core.runtime.applications"> <application> <run - class="com.gluster.storage.management.console.Application"> + class="org.gluster.storage.management.console.Application"> </run> </application> </extension> @@ -15,163 +34,163 @@ point="org.eclipse.ui.perspectives"> <perspective name="Gluster Perspective" - class="com.gluster.storage.management.console.Perspective" - id="com.gluster.storage.management.console.Perspective"> + class="org.gluster.storage.management.console.Perspective" + id="org.gluster.storage.management.console.Perspective"> </perspective> </extension> <extension point="org.eclipse.ui.views"> <view - category="com.gluster.storage.management.console.category" - class="com.gluster.storage.management.console.views.NavigationView" - id="com.gluster.storage.management.console.views.NavigationView" + category="org.gluster.storage.management.console.category" + class="org.gluster.storage.management.console.views.NavigationView" + id="org.gluster.storage.management.console.views.NavigationView" name="Cluster Navigation Tree" restorable="true"> </view> <view allowMultiple="false" - category="com.gluster.storage.management.console.category" - class="com.gluster.storage.management.console.views.DiscoveredServersView" + category="org.gluster.storage.management.console.category" + class="org.gluster.storage.management.console.views.DiscoveredServersView" icon="icons/tango/16x16/servers.png" - id="com.gluster.storage.management.console.views.DiscoveredServersView" + id="org.gluster.storage.management.console.views.DiscoveredServersView" name="Discovered Servers" restorable="true"> </view> <view - category="com.gluster.storage.management.console.category" - class="com.gluster.storage.management.console.views.DiscoveredServerView" + category="org.gluster.storage.management.console.category" + class="org.gluster.storage.management.console.views.DiscoveredServerView" icon="icons/tango/16x16/server.png" - id="com.gluster.storage.management.console.views.DiscoveredServerView" + id="org.gluster.storage.management.console.views.DiscoveredServerView" name="Discovered Server" restorable="true"> </view> <category - id="com.gluster.storage.management.console.category" + id="org.gluster.storage.management.console.category" name="Gluster Managament Console"> </category> <view allowMultiple="false" - category="com.gluster.storage.management.console.category" - class="com.gluster.storage.management.console.views.VolumesView" + category="org.gluster.storage.management.console.category" + class="org.gluster.storage.management.console.views.VolumesView" icon="icons/tango/16x16/volumes.png" - id="com.gluster.storage.management.console.views.VolumesView" + id="org.gluster.storage.management.console.views.VolumesView" name="Volumes" restorable="true"> </view> <view allowMultiple="false" - category="com.gluster.storage.management.console.category" - class="com.gluster.storage.management.console.views.VolumesSummaryView" + category="org.gluster.storage.management.console.category" + class="org.gluster.storage.management.console.views.VolumesSummaryView" icon="icons/tango/16x16/gluster_icon.png" - id="com.gluster.storage.management.console.views.VolumesSummaryView" + id="org.gluster.storage.management.console.views.VolumesSummaryView" name="Summary (Volumes)" restorable="true"> </view> <view allowMultiple="false" - category="com.gluster.storage.management.console.category" - class="com.gluster.storage.management.console.views.ClusterSummaryView" + category="org.gluster.storage.management.console.category" + class="org.gluster.storage.management.console.views.ClusterSummaryView" icon="icons/tango/16x16/gluster_icon.png" - id="com.gluster.storage.management.console.views.ClusterSummaryView" + id="org.gluster.storage.management.console.views.ClusterSummaryView" name="Summary (Cluster)" restorable="true"> </view> <view allowMultiple="false" - category="com.gluster.storage.management.console.category" - class="com.gluster.storage.management.console.views.VolumeSummaryView" + category="org.gluster.storage.management.console.category" + class="org.gluster.storage.management.console.views.VolumeSummaryView" icon="icons/tango/16x16/gluster_icon.png" - id="com.gluster.storage.management.console.views.VolumeSummaryView" + id="org.gluster.storage.management.console.views.VolumeSummaryView" name="Summary (Volume)" restorable="true"> </view> <view allowMultiple="false" - category="com.gluster.storage.management.console.category" - class="com.gluster.storage.management.console.views.VolumeBricksView" + category="org.gluster.storage.management.console.category" + class="org.gluster.storage.management.console.views.VolumeBricksView" icon="icons/tango/16x16/bricks.png" - id="com.gluster.storage.management.console.views.VolumeBricksView" + id="org.gluster.storage.management.console.views.VolumeBricksView" name="Bricks" restorable="true"> </view> <view allowMultiple="false" - category="com.gluster.storage.management.console.category" - class="com.gluster.storage.management.console.views.VolumeOptionsView" + category="org.gluster.storage.management.console.category" + class="org.gluster.storage.management.console.views.VolumeOptionsView" icon="icons/tango/16x16/volume-options.png" - id="com.gluster.storage.management.console.views.VolumeOptionsView" + id="org.gluster.storage.management.console.views.VolumeOptionsView" name="Volume Options" restorable="true"> </view> <view allowMultiple="false" - category="com.gluster.storage.management.console.category" - class="com.gluster.storage.management.console.views.VolumeLogsView" + category="org.gluster.storage.management.console.category" + class="org.gluster.storage.management.console.views.VolumeLogsView" icon="icons/tango/16x16/logs.png" - id="com.gluster.storage.management.console.views.VolumeLogsView" + id="org.gluster.storage.management.console.views.VolumeLogsView" name="Volume Logs" restorable="true"> </view> <view allowMultiple="false" - category="com.gluster.storage.management.console.category" - class="com.gluster.storage.management.console.views.GlusterServersSummaryView" + category="org.gluster.storage.management.console.category" + class="org.gluster.storage.management.console.views.GlusterServersSummaryView" icon="icons/tango/16x16/gluster_icon.png" - id="com.gluster.storage.management.console.views.GlusterServersSummaryView" + id="org.gluster.storage.management.console.views.GlusterServersSummaryView" name="Summary (Servers)" restorable="true"> </view> <view allowMultiple="false" - category="com.gluster.storage.management.console.category" - class="com.gluster.storage.management.console.views.GlusterServersView" + category="org.gluster.storage.management.console.category" + class="org.gluster.storage.management.console.views.GlusterServersView" icon="icons/tango/16x16/servers.png" - id="com.gluster.storage.management.console.views.GlusterServersView" + id="org.gluster.storage.management.console.views.GlusterServersView" name="Servers" restorable="true"> </view> <view allowMultiple="false" - category="com.gluster.storage.management.console.category" - class="com.gluster.storage.management.console.views.DisksView" + category="org.gluster.storage.management.console.category" + class="org.gluster.storage.management.console.views.DisksView" icon="icons/tango/16x16/disk.png" - id="com.gluster.storage.management.console.views.DisksView" + id="org.gluster.storage.management.console.views.DisksView" name="Disks" restorable="true"> </view> <view allowMultiple="false" - category="com.gluster.storage.management.console.category" - class="com.gluster.storage.management.console.views.GlusterServerSummaryView" + category="org.gluster.storage.management.console.category" + class="org.gluster.storage.management.console.views.GlusterServerSummaryView" icon="icons/tango/16x16/gluster_icon.png" - id="com.gluster.storage.management.console.views.GlusterServerSummaryView" + id="org.gluster.storage.management.console.views.GlusterServerSummaryView" name="Summary (Server)" restorable="true"> </view> <view allowMultiple="false" - category="com.gluster.storage.management.console.category" - class="com.gluster.storage.management.console.views.GlusterServerDisksView" + category="org.gluster.storage.management.console.category" + class="org.gluster.storage.management.console.views.GlusterServerDisksView" icon="icons/tango/16x16/disk.png" - id="com.gluster.storage.management.console.views.GlusterServerDisksView" + id="org.gluster.storage.management.console.views.GlusterServerDisksView" name="Server Disks" restorable="true"> </view> <view allowMultiple="false" - category="com.gluster.storage.management.console.category" - class="com.gluster.storage.management.console.views.GlusterServerLogsView" + category="org.gluster.storage.management.console.category" + class="org.gluster.storage.management.console.views.GlusterServerLogsView" icon="icons/tango/16x16/logs.png" - id="com.gluster.storage.management.console.views.GlusterServerLogsView" + id="org.gluster.storage.management.console.views.GlusterServerLogsView" name="Server Logs" restorable="true"> </view> <view allowMultiple="false" - category="com.gluster.storage.management.console.category" - class="com.gluster.storage.management.console.views.TasksView" + category="org.gluster.storage.management.console.category" + class="org.gluster.storage.management.console.views.TasksView" icon="icons/tango/16x16/running-task.png" - id="com.gluster.storage.management.console.views.TasksView" + id="org.gluster.storage.management.console.views.TasksView" name="Tasks" restorable="true"> </view> @@ -180,210 +199,275 @@ point="org.eclipse.ui.commands"> <category name="Gluster Commands" - id="com.gluster.storage.management.console.category"> + id="org.gluster.storage.management.console.category"> </category> <command name="Create Volume" description="Create a new Volume" - categoryId="com.gluster.storage.management.console.category" - id="com.gluster.storage.management.console.commands.CreateVolume"> + categoryId="org.gluster.storage.management.console.category" + id="org.gluster.storage.management.console.commands.CreateVolume"> </command> <command - categoryId="com.gluster.storage.management.console.category" + categoryId="org.gluster.storage.management.console.category" description="Delete Volume" - id="com.gluster.storage.management.console.commands.DeleteVolume" + id="org.gluster.storage.management.console.commands.DeleteVolume" name="Delete Volume"> </command> <command - categoryId="com.gluster.storage.management.console.category" + categoryId="org.gluster.storage.management.console.category" description="Start Volume" - id="com.gluster.storage.management.console.commands.StartVolume" + id="org.gluster.storage.management.console.commands.StartVolume" name="Start Volume"> </command> <command - categoryId="com.gluster.storage.management.console.category" + categoryId="org.gluster.storage.management.console.category" description="Stop Volume" - id="com.gluster.storage.management.console.commands.StopVolume" + id="org.gluster.storage.management.console.commands.StopVolume" name="Stop Volume"> </command> <command - categoryId="com.gluster.storage.management.console.category" + categoryId="org.gluster.storage.management.console.category" description="Edit Volume" - id="com.gluster.storage.management.console.commands.EditVolume" + id="org.gluster.storage.management.console.commands.EditVolume" name="Edit Volume"> </command> <command - categoryId="com.gluster.storage.management.console.category" + categoryId="org.gluster.storage.management.console.category" description="Reset all options of a Volume" - id="com.gluster.storage.management.console.commands.ResetVolumeOptions" + id="org.gluster.storage.management.console.commands.ResetVolumeOptions" name="Reset Options"> </command> <command - categoryId="com.gluster.storage.management.console.category" + categoryId="org.gluster.storage.management.console.category" description="Rebalance Volume" - id="com.gluster.storage.management.console.commands.RebalanceVolume" + id="org.gluster.storage.management.console.commands.RebalanceVolume" name="Rebalance Volume"> </command> <command - categoryId="com.gluster.storage.management.console.category" + categoryId="org.gluster.storage.management.console.category" description="Add Server(s) to Cluster" - id="com.gluster.storage.management.console.commands.AddServer" + id="org.gluster.storage.management.console.commands.AddServer" name="Add Server(s)"> </command> <command - categoryId="com.gluster.storage.management.console.category" + categoryId="org.gluster.storage.management.console.category" description="Remove Server(s) from Cluster" - id="com.gluster.storage.management.console.commands.RemoveServer" + id="org.gluster.storage.management.console.commands.RemoveServer" name="Remove Server(s)"> </command> <command - categoryId="com.gluster.storage.management.console.category" + categoryId="org.gluster.storage.management.console.category" description="Migrate Brick" - id="com.gluster.storage.management.console.commands.MigrateDisk" + id="org.gluster.storage.management.console.commands.MigrateDisk" name="Migrate Brick"> </command> <command - categoryId="com.gluster.storage.management.console.category" + categoryId="org.gluster.storage.management.console.category" description="Remove Brick" - id="com.gluster.storage.management.console.commands.RemoveDisk" + id="org.gluster.storage.management.console.commands.RemoveDisk" name="Remove Brick"> </command> <command - categoryId="com.gluster.storage.management.console.category" + categoryId="org.gluster.storage.management.console.category" description="Add Brick" - id="com.gluster.storage.management.console.commands.AddDisk" + id="org.gluster.storage.management.console.commands.AddDisk" name="Add Brick"> </command> <command - categoryId="com.gluster.storage.management.console.category" + categoryId="org.gluster.storage.management.console.category" description="Pause Task" - id="com.gluster.storage.management.console.commands.Pause" + id="org.gluster.storage.management.console.commands.Pause" name="Pause"> </command> <command - categoryId="com.gluster.storage.management.console.category" + categoryId="org.gluster.storage.management.console.category" description="Resume Task" - id="com.gluster.storage.management.console.commands.Resume" + id="org.gluster.storage.management.console.commands.Resume" name="Resume"> </command> <command - categoryId="com.gluster.storage.management.console.category" + categoryId="org.gluster.storage.management.console.category" description="Stop Task" - id="com.gluster.storage.management.console.commands.Stop" + id="org.gluster.storage.management.console.commands.Stop" name="Stop"> </command> <command - categoryId="com.gluster.storage.management.console.category" + categoryId="org.gluster.storage.management.console.category" description="Delete Task" - id="com.gluster.storage.management.console.commands.Delete" + id="org.gluster.storage.management.console.commands.Delete" name="Delete"> </command> <command - categoryId="com.gluster.storage.management.console.category" + categoryId="org.gluster.storage.management.console.category" description="Change Password" - id="com.gluster.storage.management.console.commands.ChangePassword" + id="org.gluster.storage.management.console.commands.ChangePassword" name="Change Password"> </command> <command - categoryId="com.gluster.storage.management.console.category" + categoryId="org.gluster.storage.management.console.category" description="Refresh Data" - id="com.gluster.storage.management.console.commands.Refresh" + id="org.gluster.storage.management.console.commands.Refresh" name="Refresh Data"> </command> <command - categoryId="com.gluster.storage.management.console.category" + categoryId="org.gluster.storage.management.console.category" description="Terminal" - id="com.gluster.storage.management.console.commands.Terminal" + id="org.gluster.storage.management.console.commands.Terminal" name="Terminal"> </command> + <command + categoryId="org.gluster.storage.management.console.category" + description="Settings" + id="org.gluster.storage.management.console.commands.Preferences" + name="Settings"> + </command> + <command + description="Volume Log Rotate" + id="org.gluster.storage.management.console.commands.LogRotate" + name="LogRotate"> + </command> + <command + categoryId="org.gluster.storage.management.console.category" + description="Download Volume Log" + id="org.gluster.storage.management.console.commands.DownloadVolumeLogs" + name="Download Log"> + </command> + <command + categoryId="org.gluster.storage.management.console.category" + description="Clear Task" + id="org.gluster.storage.management.console.commands.Clear" + name="Clear Task"> + </command> + <command + categoryId="org.gluster.storage.management.console.category" + description="Manual Server Addition" + id="org.gluster.storage.management.console.commands.ServerAddition" + name="Manual Server Addition"> + </command> + <command + categoryId="org.gluster.storage.management.console.category" + description="Commit Task" + id="org.gluster.storage.management.console.commands.Commit" + name="Commit Task"> + </command> + <command + categoryId="org.gluster.storage.management.console.category" + description="Export SSH Keys" + id="org.gluster.storage.management.console.commands.ExportSshKeys" + name="Export SSH Keys"> + </command> + <command + categoryId="org.gluster.storage.management.console.category" + description="Force Start Volume" + id="org.gluster.storage.management.console.commands.ForceStartVolume" + name="Force Start Volume"> + </command> + <command + categoryId="org.gluster.storage.management.console.category" + description="Import SSH Keys" + id="org.gluster.storage.management.console.commands.ImportSshKeys" + name="Import SSH Keys"> + </command> + <command + categoryId="org.gluster.storage.management.console.category" + description="Support Info" + id="org.gluster.storage.management.console.commands.Support" + name="Support Info"> + </command> + <command + categoryId="org.gluster.storage.management.console.category" + description="Manual Server Addition" + id="org.gluster.storage.management.console.commands.ServerAddition" + name="Manual Server Addition"> + </command> </extension> <extension point="org.eclipse.ui.bindings"> <key - commandId="com.gluster.storage.management.console.commands.CreateVolume" - schemeId="com.gluster.storage.management.console.KeyConfig" + commandId="org.gluster.storage.management.console.commands.CreateVolume" + schemeId="org.gluster.storage.management.console.KeyConfig" sequence="CTRL+SHIFT+C"> </key> <key - commandId="com.gluster.storage.management.console.commands.DeleteVolume" - schemeId="com.gluster.storage.management.console.KeyConfig" + commandId="org.gluster.storage.management.console.commands.DeleteVolume" + schemeId="org.gluster.storage.management.console.KeyConfig" sequence="CTRL+SHIFT+D"> </key> <key - commandId="com.gluster.storage.management.console.commands.StartVolume" - schemeId="com.gluster.storage.management.console.KeyConfig" + commandId="org.gluster.storage.management.console.commands.StartVolume" + schemeId="org.gluster.storage.management.console.KeyConfig" sequence="CTRL+SHIFT+S"> </key> <key - commandId="com.gluster.storage.management.console.commands.StopVolume" - schemeId="com.gluster.storage.management.console.KeyConfig" + commandId="org.gluster.storage.management.console.commands.StopVolume" + schemeId="org.gluster.storage.management.console.KeyConfig" sequence="CTRL+SHIFT+T"> </key> <key - commandId="com.gluster.storage.management.console.commands.EditVolume" - schemeId="com.gluster.storage.management.console.KeyConfig" + commandId="org.gluster.storage.management.console.commands.EditVolume" + schemeId="org.gluster.storage.management.console.KeyConfig" sequence="CTRL+SHIFT+E"> </key> <key - commandId="com.gluster.storage.management.console.commands.RebalanceVolume" - schemeId="com.gluster.storage.management.console.KeyConfig" + commandId="org.gluster.storage.management.console.commands.RebalanceVolume" + schemeId="org.gluster.storage.management.console.KeyConfig" sequence="CTRL+SHIFT+B"> </key> <key - commandId="com.gluster.storage.management.console.commands.AddServer" - schemeId="com.gluster.storage.management.console.KeyConfig" + commandId="org.gluster.storage.management.console.commands.AddServer" + schemeId="org.gluster.storage.management.console.KeyConfig" sequence="CTRL+SHIFT+A"> </key> <key - commandId="com.gluster.storage.management.console.commands.RemoveServer" - schemeId="com.gluster.storage.management.console.KeyConfig" + commandId="org.gluster.storage.management.console.commands.RemoveServer" + schemeId="org.gluster.storage.management.console.KeyConfig" sequence="CTRL+SHIFT+R"> </key> <key - commandId="com.gluster.storage.management.console.commands.MigrateDisk" - schemeId="com.gluster.storage.management.console.KeyConfig" + commandId="org.gluster.storage.management.console.commands.MigrateDisk" + schemeId="org.gluster.storage.management.console.KeyConfig" sequence="CTRL+SHIFT+M"> </key> <key - commandId="org.eclipse.ui.window.preferences" - schemeId="com.gluster.storage.management.console.KeyConfig" + commandId="org.gluster.storage.management.console.commands.Preferences" + schemeId="org.gluster.storage.management.console.KeyConfig" sequence="CTRL+SHIFT+P"> </key> <key commandId="org.eclipse.ui.window.showKeyAssist" - schemeId="com.gluster.storage.management.console.KeyConfig" + schemeId="org.gluster.storage.management.console.KeyConfig" sequence="CTRL+SHIFT+L"> </key> <key commandId="org.eclipse.ui.navigate.nextTab" contextId="org.eclipse.ui.contexts.window" - schemeId="com.gluster.storage.management.console.KeyConfig" + schemeId="org.gluster.storage.management.console.KeyConfig" sequence="ALT+ARROW_RIGHT"> </key> <key commandId="org.eclipse.ui.navigate.previousTab" contextId="org.eclipse.ui.contexts.window" - schemeId="com.gluster.storage.management.console.KeyConfig" + schemeId="org.gluster.storage.management.console.KeyConfig" sequence="ALT+ARROW_LEFT"> </key> <scheme description="Default Key Bindings Scheme for Gluster Management Console" - id="com.gluster.storage.management.console.KeyConfig" + id="org.gluster.storage.management.console.KeyConfig" name="Gluster"> </scheme> <key - commandId="com.gluster.storage.management.console.commands.ResetVolumeOptions" - schemeId="com.gluster.storage.management.console.KeyConfig" + commandId="org.gluster.storage.management.console.commands.ResetVolumeOptions" + schemeId="org.gluster.storage.management.console.KeyConfig" sequence="CTRL+SHIFT+O"> </key> <key - commandId="com.gluster.storage.management.console.commands.Refresh" - schemeId="com.gluster.storage.management.console.KeyConfig" + commandId="org.gluster.storage.management.console.commands.Refresh" + schemeId="org.gluster.storage.management.console.KeyConfig" sequence="F5"> </key> <key - commandId="com.gluster.storage.management.console.commands.Terminal" - schemeId="com.gluster.storage.management.console.KeyConfig" + commandId="org.gluster.storage.management.console.commands.Terminal" + schemeId="org.gluster.storage.management.console.KeyConfig" sequence="CTRL+T"> </key> </extension> @@ -392,7 +476,7 @@ name="Gluster Management Console" point="org.eclipse.core.runtime.products"> <product - application="com.gluster.storage.management.console.application" + application="org.gluster.storage.management.console.application" name="Gluster Management Console"> <property name="aboutText" @@ -408,7 +492,7 @@ </property> <property name="appName" - value="about"> + value="Gluster Management Console"> </property> <property name="preferenceCustomization" @@ -420,19 +504,18 @@ point="org.eclipse.ui.actionSets"> <actionSet description="Set of actions that can be performed on multiple Volumes" - id="com.gluster.storage.management.console.actionsets.volumes" + id="org.gluster.storage.management.console.actionsets.volumes" label="Volumes Actions" visible="false"> <action allowLabelUpdate="false" - class="com.gluster.storage.management.console.actions.DeleteVolumeAction" - definitionId="com.gluster.storage.management.console.commands.DeleteVolume" + class="org.gluster.storage.management.console.actions.DeleteVolumeAction" + definitionId="org.gluster.storage.management.console.commands.DeleteVolume" disabledIcon="icons/tango/32x32/remove-volume-disabled.png" icon="icons/tango/32x32/remove-volume.png" - id="com.gluster.storage.management.console.actions.DeleteVolumeAction" + id="org.gluster.storage.management.console.actions.DeleteVolumeAction" label="&Delete Volume(s)" - menubarPath="com.gluster.storage.management.console.actionsets.volumes/volumes" - pulldown="false" + menubarPath="org.gluster.storage.management.console.actionsets.volumes/volumes" retarget="false" state="false" style="push" @@ -441,14 +524,13 @@ </action> <action allowLabelUpdate="false" - class="com.gluster.storage.management.console.actions.StopVolumeAction" - definitionId="com.gluster.storage.management.console.commands.StopVolume" + class="org.gluster.storage.management.console.actions.StopVolumeAction" + definitionId="org.gluster.storage.management.console.commands.StopVolume" disabledIcon="icons/tango/32x32/stop-volume-disabled.png" icon="icons/tango/32x32/stop-volume.png" - id="com.gluster.storage.management.console.actions.StopVolumeAction" + id="org.gluster.storage.management.console.actions.StopVolumeAction" label="S&top Volume(s)" - menubarPath="com.gluster.storage.management.console.actionsets.volumes/volumes" - pulldown="false" + menubarPath="org.gluster.storage.management.console.actionsets.volumes/volumes" retarget="false" state="false" style="push" @@ -457,14 +539,13 @@ </action> <action allowLabelUpdate="false" - class="com.gluster.storage.management.console.actions.StartVolumeAction" - definitionId="com.gluster.storage.management.console.commands.StartVolume" + class="org.gluster.storage.management.console.actions.StartVolumeAction" + definitionId="org.gluster.storage.management.console.commands.StartVolume" disabledIcon="icons/tango/32x32/start-volume-disabled.png" icon="icons/tango/32x32/start-volume.png" - id="com.gluster.storage.management.console.actions.StartVolumeAction" + id="org.gluster.storage.management.console.actions.StartVolumeAction" label="&Start Volume(s)" - menubarPath="com.gluster.storage.management.console.actionsets.volumes/volumes" - pulldown="false" + menubarPath="org.gluster.storage.management.console.actionsets.volumes/volumes" retarget="false" state="false" style="push" @@ -473,13 +554,12 @@ </action> <action allowLabelUpdate="false" - class="com.gluster.storage.management.console.actions.CreateVolumeAction" - definitionId="com.gluster.storage.management.console.commands.CreateVolume" + class="org.gluster.storage.management.console.actions.CreateVolumeAction" + definitionId="org.gluster.storage.management.console.commands.CreateVolume" icon="icons/tango/32x32/create-volume.png" - id="com.gluster.storage.management.console.actions.CreateVolumeAction" + id="org.gluster.storage.management.console.actions.CreateVolumeAction" label="Create &Volume" - menubarPath="com.gluster.storage.management.console.actionsets.volumes/volumes" - pulldown="false" + menubarPath="org.gluster.storage.management.console.actionsets.volumes/volumes" retarget="false" state="false" style="push" @@ -488,20 +568,19 @@ </action> <action allowLabelUpdate="false" - class="com.gluster.storage.management.console.actions.ServerAdditionAction" - definitionId="com.gluster.storage.management.console.commands.ServerAddition" - id="com.gluster.storage.management.console.actions.ServerAdditionAction" + class="org.gluster.storage.management.console.actions.ServerAdditionAction" + definitionId="org.gluster.storage.management.console.commands.ServerAddition" + id="org.gluster.storage.management.console.actions.ServerAdditionAction" label="Add Server" - menubarPath="com.gluster.storage.management.console.actionsets.volumes/volumes" + menubarPath="org.gluster.storage.management.console.actionsets.volumes/volumes" mode="FORCE_TEXT" - pulldown="false" retarget="false" state="false" style="push" tooltip="Manual Server Addition"> </action> <menu - id="com.gluster.storage.management.console.actionsets.volumes" + id="org.gluster.storage.management.console.actionsets.volumes" label="&Gluster" path="additions"> <groupMarker @@ -511,19 +590,42 @@ </actionSet> <actionSet description="Set of actions that can be performed on a single volume" - id="com.gluster.storage.management.console.actionsets.volume" + id="org.gluster.storage.management.console.actionsets.volume" label="Volume Actions" visible="false"> <action + class="org.gluster.storage.management.console.actions.ForceStartVolumeAction" + definitionId="org.gluster.storage.management.console.commands.ForceStartVolume" + disabledIcon="icons/tango/32x32/start-offline-bricks-disabled.png" + icon="icons/tango/32x32/start-offline-bricks.png" + id="org.gluster.storage.management.console.actions.ForceStartVolumeAction" + label="Start Offline Bricks" + menubarPath="org.gluster.storage.management.console.menu.volume/volume" + style="push" + toolbarPath="Normal" + tooltip="Start all Offline Bricks of the selected Volume"> + </action> + <action + class="org.gluster.storage.management.console.actions.VolumeLogRotateAction" + definitionId="org.gluster.storage.management.console.commands.LogRotate" + icon="icons/tango/32x32/log-rotate.png" + id="org.gluster.storage.management.console.actions.LogRotateAction" + label="L&og Rotate" + menubarPath="org.gluster.storage.management.console.menu.volume/volume" + state="true" + style="push" + toolbarPath="Normal" + tooltip="Rotate the volume logs"> + </action> + <action allowLabelUpdate="false" - class="com.gluster.storage.management.console.actions.MigrateBrickAction" - definitionId="com.gluster.storage.management.console.commands.MigrateDisk" + class="org.gluster.storage.management.console.actions.MigrateBrickAction" + definitionId="org.gluster.storage.management.console.commands.MigrateDisk" disabledIcon="icons/tango/32x32/migrate-brick-disabled.png" icon="icons/tango/32x32/migrate-brick.png" - id="com.gluster.storage.management.console.actions.MigrateDiskAction" + id="org.gluster.storage.management.console.actions.MigrateDiskAction" label="&Migrate Brick" - menubarPath="com.gluster.storage.management.console.menu.volume/volume" - pulldown="false" + menubarPath="org.gluster.storage.management.console.menu.volume/volume" retarget="false" state="false" style="push" @@ -531,20 +633,19 @@ tooltip="Migrate Brick"> <enablement> <objectClass - name="com.gluster.storage.management.core.model.Brick"> + name="org.gluster.storage.management.core.model.Brick"> </objectClass> </enablement> </action> <action allowLabelUpdate="false" - class="com.gluster.storage.management.console.actions.DeleteVolumeAction" - definitionId="com.gluster.storage.management.console.commands.DeleteVolume" + class="org.gluster.storage.management.console.actions.DeleteVolumeAction" + definitionId="org.gluster.storage.management.console.commands.DeleteVolume" disabledIcon="icons/tango/32x32/remove-volume-disabled.png" icon="icons/tango/32x32/remove-volume.png" - id="com.gluster.storage.management.console.actions.DeleteVolumeAction" + id="org.gluster.storage.management.console.actions.DeleteVolumeAction" label="&Delete Volume" - menubarPath="com.gluster.storage.management.console.menu.volume/volume" - pulldown="false" + menubarPath="org.gluster.storage.management.console.menu.volume/volume" retarget="false" state="false" style="push" @@ -553,13 +654,12 @@ </action> <action allowLabelUpdate="false" - class="com.gluster.storage.management.console.actions.DownloadVolumeLogsAction" - definitionId="com.gluster.storage.management.console.commands.DownloadVolumeLogs" + class="org.gluster.storage.management.console.actions.DownloadVolumeLogsAction" + definitionId="org.gluster.storage.management.console.commands.DownloadVolumeLogs" icon="icons/tango/32x32/download-log.png" - id="com.gluster.storage.management.console.actions.DownloadVolumeLogsAction" + id="org.gluster.storage.management.console.actions.DownloadVolumeLogsAction" label="Download &Logs" - menubarPath="com.gluster.storage.management.console.menu.volume/volume" - pulldown="false" + menubarPath="org.gluster.storage.management.console.menu.volume/volume" retarget="false" state="false" style="push" @@ -568,14 +668,13 @@ </action> <action allowLabelUpdate="false" - class="com.gluster.storage.management.console.actions.ResetVolumeOptionsAction" - definitionId="com.gluster.storage.management.console.commands.ResetVolumeOptions" + class="org.gluster.storage.management.console.actions.ResetVolumeOptionsAction" + definitionId="org.gluster.storage.management.console.commands.ResetVolumeOptions" disabledIcon="icons/tango/32x32/reset-volume-option-disabled.png" icon="icons/tango/32x32/reset-volume-option.png" - id="com.gluster.storage.management.console.actions.ResetVolumeOptionsAction" + id="org.gluster.storage.management.console.actions.ResetVolumeOptionsAction" label="Reset &Options" - menubarPath="com.gluster.storage.management.console.menu.volume/volume" - pulldown="false" + menubarPath="org.gluster.storage.management.console.menu.volume/volume" retarget="false" state="false" style="push" @@ -584,14 +683,13 @@ </action> <action allowLabelUpdate="false" - class="com.gluster.storage.management.console.actions.RebalanceVolumeAction" - definitionId="com.gluster.storage.management.console.commands.RebalanceVolume" + class="org.gluster.storage.management.console.actions.RebalanceVolumeAction" + definitionId="org.gluster.storage.management.console.commands.RebalanceVolume" disabledIcon="icons/tango/32x32/volume-rebalance-disabled.png" icon="icons/tango/32x32/volume-rebalance.png" - id="com.gluster.storage.management.console.actions.RebalanceVolumeAction" + id="org.gluster.storage.management.console.actions.RebalanceVolumeAction" label="&Rebalance Volume" - menubarPath="com.gluster.storage.management.console.menu.volume/volume" - pulldown="false" + menubarPath="org.gluster.storage.management.console.menu.volume/volume" retarget="false" state="false" style="push" @@ -600,14 +698,13 @@ </action> <action allowLabelUpdate="false" - class="com.gluster.storage.management.console.actions.StopVolumeAction" - definitionId="com.gluster.storage.management.console.commands.StopVolume" + class="org.gluster.storage.management.console.actions.StopVolumeAction" + definitionId="org.gluster.storage.management.console.commands.StopVolume" disabledIcon="icons/tango/32x32/stop-volume-disabled.png" icon="icons/tango/32x32/stop-volume.png" - id="com.gluster.storage.management.console.actions.StopVolumeAction" + id="org.gluster.storage.management.console.actions.StopVolumeAction" label="S&top Volume" - menubarPath="com.gluster.storage.management.console.menu.volume/volume" - pulldown="false" + menubarPath="org.gluster.storage.management.console.menu.volume/volume" retarget="false" state="false" style="push" @@ -616,14 +713,13 @@ </action> <action allowLabelUpdate="false" - class="com.gluster.storage.management.console.actions.StartVolumeAction" - definitionId="com.gluster.storage.management.console.commands.StartVolume" + class="org.gluster.storage.management.console.actions.StartVolumeAction" + definitionId="org.gluster.storage.management.console.commands.StartVolume" disabledIcon="icons/tango/32x32/start-volume-disabled.png" icon="icons/tango/32x32/start-volume.png" - id="com.gluster.storage.management.console.actions.StartVolumeAction" + id="org.gluster.storage.management.console.actions.StartVolumeAction" label="&Start Volume" - menubarPath="com.gluster.storage.management.console.menu.volume/volume" - pulldown="false" + menubarPath="org.gluster.storage.management.console.menu.volume/volume" retarget="false" state="false" style="push" @@ -632,14 +728,13 @@ </action> <action allowLabelUpdate="false" - class="com.gluster.storage.management.console.actions.RemoveBrickAction" - definitionId="com.gluster.storage.management.console.commands.RemoveDisk" + class="org.gluster.storage.management.console.actions.RemoveBrickAction" + definitionId="org.gluster.storage.management.console.commands.RemoveDisk" disabledIcon="icons/tango/32x32/remove-brick-disabled.png" icon="icons/tango/32x32/remove-brick.png" - id="com.gluster.storage.management.console.actions.RemoveDiskAction" + id="org.gluster.storage.management.console.actions.RemoveDiskAction" label="Remove Brick" - menubarPath="com.gluster.storage.management.console.menu.volume/volume" - pulldown="false" + menubarPath="org.gluster.storage.management.console.menu.volume/volume" retarget="false" state="false" style="push" @@ -648,14 +743,13 @@ </action> <action allowLabelUpdate="false" - class="com.gluster.storage.management.console.actions.AddBrickAction" - definitionId="com.gluster.storage.management.console.commands.AddDisk" + class="org.gluster.storage.management.console.actions.AddBrickAction" + definitionId="org.gluster.storage.management.console.commands.AddDisk" disabledIcon="icons/tango/32x32/add-brick-disabled.png" icon="icons/tango/32x32/add-brick.png" - id="com.gluster.storage.management.console.actions.AddDiskAction" + id="org.gluster.storage.management.console.actions.AddDiskAction" label="&Add Brick" - menubarPath="com.gluster.storage.management.console.menu.volume/volume" - pulldown="false" + menubarPath="org.gluster.storage.management.console.menu.volume/volume" retarget="false" state="false" style="push" @@ -664,14 +758,13 @@ </action> <action allowLabelUpdate="false" - class="com.gluster.storage.management.console.actions.CreateVolumeAction" - definitionId="com.gluster.storage.management.console.commands.CreateVolume" + class="org.gluster.storage.management.console.actions.CreateVolumeAction" + definitionId="org.gluster.storage.management.console.commands.CreateVolume" disabledIcon="icons/tango/32x32/create-volume-disabled.png" icon="icons/tango/32x32/create-volume.png" - id="com.gluster.storage.management.console.actions.CreateVolumeAction" + id="org.gluster.storage.management.console.actions.CreateVolumeAction" label="Create &Volume" - menubarPath="com.gluster.storage.management.console.menu.volume/volume" - pulldown="false" + menubarPath="org.gluster.storage.management.console.menu.volume/volume" retarget="false" state="false" style="push" @@ -680,20 +773,19 @@ </action> <action allowLabelUpdate="false" - class="com.gluster.storage.management.console.actions.ServerAdditionAction" - definitionId="com.gluster.storage.management.console.commands.ServerAddition" - id="com.gluster.storage.management.console.actions.ServerAdditionAction" + class="org.gluster.storage.management.console.actions.ServerAdditionAction" + definitionId="org.gluster.storage.management.console.commands.ServerAddition" + id="org.gluster.storage.management.console.actions.ServerAdditionAction" label="Add Server" - menubarPath="com.gluster.storage.management.console.menu.volume/volume" + menubarPath="org.gluster.storage.management.console.menu.volume/volume" mode="FORCE_TEXT" - pulldown="false" retarget="false" state="false" style="push" tooltip="Manual Server Addition"> </action> <menu - id="com.gluster.storage.management.console.menu.volume" + id="org.gluster.storage.management.console.menu.volume" label="&Gluster" path="additions"> <groupMarker @@ -703,19 +795,18 @@ </actionSet> <actionSet description="Set of actions that can be performed on multiple Gluster Servers" - id="com.gluster.storage.management.console.actionsets.glusterservers" + id="org.gluster.storage.management.console.actionsets.glusterservers" label="Gluster Servers Actions" visible="false"> <action allowLabelUpdate="false" - class="com.gluster.storage.management.console.actions.RemoveServerAction" - definitionId="com.gluster.storage.management.console.commands.RemoveServer" + class="org.gluster.storage.management.console.actions.RemoveServerAction" + definitionId="org.gluster.storage.management.console.commands.RemoveServer" disabledIcon="icons/tango/32x32/remove-server-disabled.png" icon="icons/tango/32x32/remove-server.png" - id="com.gluster.storage.management.console.actions.RemoveServerAction" + id="org.gluster.storage.management.console.actions.RemoveServerAction" label="&Remove Server(s)" - menubarPath="com.gluster.storage.management.console.menu.servers/servers" - pulldown="false" + menubarPath="org.gluster.storage.management.console.menu.servers/servers" retarget="false" state="false" style="push" @@ -724,13 +815,12 @@ </action> <action allowLabelUpdate="false" - class="com.gluster.storage.management.console.actions.CreateVolumeAction" - definitionId="com.gluster.storage.management.console.commands.CreateVolume" + class="org.gluster.storage.management.console.actions.CreateVolumeAction" + definitionId="org.gluster.storage.management.console.commands.CreateVolume" icon="icons/tango/32x32/create-volume.png" - id="com.gluster.storage.management.console.actions.CreateVolumeAction" + id="org.gluster.storage.management.console.actions.CreateVolumeAction" label="Create &Volume" - menubarPath="com.gluster.storage.management.console.menu.servers/servers" - pulldown="false" + menubarPath="org.gluster.storage.management.console.menu.servers/servers" retarget="false" state="false" style="push" @@ -739,20 +829,19 @@ </action> <action allowLabelUpdate="false" - class="com.gluster.storage.management.console.actions.ServerAdditionAction" - definitionId="com.gluster.storage.management.console.commands.ServerAddition" - id="com.gluster.storage.management.console.actions.ServerAdditionAction" + class="org.gluster.storage.management.console.actions.ServerAdditionAction" + definitionId="org.gluster.storage.management.console.commands.ServerAddition" + id="org.gluster.storage.management.console.actions.ServerAdditionAction" label="Add Server" - menubarPath="com.gluster.storage.management.console.menu.servers/servers" + menubarPath="org.gluster.storage.management.console.menu.servers/servers" mode="FORCE_TEXT" - pulldown="false" retarget="false" state="false" style="push" tooltip="Manual Server Addition"> </action> <menu - id="com.gluster.storage.management.console.menu.servers" + id="org.gluster.storage.management.console.menu.servers" label="&Gluster" path="additions"> <groupMarker @@ -762,19 +851,18 @@ </actionSet> <actionSet description="Set of actions that can be performed in the "Gluster Server" contextt; context" - id="com.gluster.storage.management.console.actionsets.glusterserver" + id="org.gluster.storage.management.console.actionsets.glusterserver" label="Gluster Server Actions" visible="false"> <action allowLabelUpdate="false" - class="com.gluster.storage.management.console.actions.RemoveServerAction" - definitionId="com.gluster.storage.management.console.commands.RemoveServer" + class="org.gluster.storage.management.console.actions.RemoveServerAction" + definitionId="org.gluster.storage.management.console.commands.RemoveServer" disabledIcon="icons/tango/32x32/remove-server-disabled.png" icon="icons/tango/32x32/remove-server.png" - id="com.gluster.storage.management.console.actions.RemoveServerAction" + id="org.gluster.storage.management.console.actions.RemoveServerAction" label="&Remove Server(s)" - menubarPath="com.gluster.storage.management.console.menu.glusterserver/glusterserver" - pulldown="false" + menubarPath="org.gluster.storage.management.console.menu.glusterserver/glusterserver" retarget="false" state="false" style="push" @@ -783,13 +871,12 @@ </action> <action allowLabelUpdate="false" - class="com.gluster.storage.management.console.actions.CreateVolumeAction" - definitionId="com.gluster.storage.management.console.commands.CreateVolume" + class="org.gluster.storage.management.console.actions.CreateVolumeAction" + definitionId="org.gluster.storage.management.console.commands.CreateVolume" icon="icons/tango/32x32/create-volume.png" - id="com.gluster.storage.management.console.actions.CreateVolumeAction" + id="org.gluster.storage.management.console.actions.CreateVolumeAction" label="Create &Volume" - menubarPath="com.gluster.storage.management.console.menu.glusterserver/glusterserver" - pulldown="false" + menubarPath="org.gluster.storage.management.console.menu.glusterserver/glusterserver" retarget="false" state="false" style="push" @@ -798,20 +885,19 @@ </action> <action allowLabelUpdate="false" - class="com.gluster.storage.management.console.actions.ServerAdditionAction" - definitionId="com.gluster.storage.management.console.commands.ServerAddition" - id="com.gluster.storage.management.console.actions.ServerAdditionAction" + class="org.gluster.storage.management.console.actions.ServerAdditionAction" + definitionId="org.gluster.storage.management.console.commands.ServerAddition" + id="org.gluster.storage.management.console.actions.ServerAdditionAction" label="Add Server" - menubarPath="com.gluster.storage.management.console.menu.glusterserver/glusterserver" + menubarPath="org.gluster.storage.management.console.menu.glusterserver/glusterserver" mode="FORCE_TEXT" - pulldown="false" retarget="false" state="false" style="push" tooltip="Manual Server Addition"> </action> <menu - id="com.gluster.storage.management.console.menu.glusterserver" + id="org.gluster.storage.management.console.menu.glusterserver" label="&Gluster" path="additions"> <groupMarker @@ -821,18 +907,17 @@ </actionSet> <actionSet description="Set of actions that can be performed on multiple Discovered Servers" - id="com.gluster.storage.management.console.actionsets.serversdiscovered" + id="org.gluster.storage.management.console.actionsets.serversdiscovered" label="Discovered Servers Actions" visible="false"> <action allowLabelUpdate="false" - class="com.gluster.storage.management.console.actions.AddServerAction" - definitionId="com.gluster.storage.management.console.commands.AddServer" + class="org.gluster.storage.management.console.actions.AddServerAction" + definitionId="org.gluster.storage.management.console.commands.AddServer" icon="icons/tango/32x32/add-server.png" - id="com.gluster.storage.management.console.actions.AddServerAction" + id="org.gluster.storage.management.console.actions.AddServerAction" label="&Add Server(s)" - menubarPath="com.gluster.storage.management.console.menu.discoveredservers/discoveredservers" - pulldown="false" + menubarPath="org.gluster.storage.management.console.menu.discoveredservers/discoveredservers" retarget="false" state="false" style="push" @@ -841,13 +926,12 @@ </action> <action allowLabelUpdate="false" - class="com.gluster.storage.management.console.actions.CreateVolumeAction" - definitionId="com.gluster.storage.management.console.commands.CreateVolume" + class="org.gluster.storage.management.console.actions.CreateVolumeAction" + definitionId="org.gluster.storage.management.console.commands.CreateVolume" icon="icons/tango/32x32/create-volume.png" - id="com.gluster.storage.management.console.actions.CreateVolumeAction" + id="org.gluster.storage.management.console.actions.CreateVolumeAction" label="Create &Volume" - menubarPath="com.gluster.storage.management.console.menu.discoveredservers/discoveredservers" - pulldown="false" + menubarPath="org.gluster.storage.management.console.menu.discoveredservers/discoveredservers" retarget="false" state="false" style="push" @@ -856,20 +940,19 @@ </action> <action allowLabelUpdate="false" - class="com.gluster.storage.management.console.actions.ServerAdditionAction" - definitionId="com.gluster.storage.management.console.commands.ServerAddition" - id="com.gluster.storage.management.console.actions.ServerAdditionAction" + class="org.gluster.storage.management.console.actions.ServerAdditionAction" + definitionId="org.gluster.storage.management.console.commands.ServerAddition" + id="org.gluster.storage.management.console.actions.ServerAdditionAction" label="Add Server" - menubarPath="com.gluster.storage.management.console.menu.discoveredservers/discoveredservers" + menubarPath="org.gluster.storage.management.console.menu.discoveredservers/discoveredservers" mode="FORCE_TEXT" - pulldown="false" retarget="false" state="false" style="push" tooltip="Manual Server Addition"> </action> <menu - id="com.gluster.storage.management.console.menu.discoveredservers" + id="org.gluster.storage.management.console.menu.discoveredservers" label="&Gluster" path="additions"> <groupMarker @@ -879,18 +962,17 @@ </actionSet> <actionSet description="Set of actions that can be performed on single Discovered Server" - id="com.gluster.storage.management.console.actionsets.serverdiscovered" + id="org.gluster.storage.management.console.actionsets.serverdiscovered" label="Discovered Server Actions" visible="false"> <action allowLabelUpdate="false" - class="com.gluster.storage.management.console.actions.AddServerAction" - definitionId="com.gluster.storage.management.console.commands.AddServer" + class="org.gluster.storage.management.console.actions.AddServerAction" + definitionId="org.gluster.storage.management.console.commands.AddServer" icon="icons/tango/32x32/add-server.png" - id="com.gluster.storage.management.console.actions.AddServerAction" + id="org.gluster.storage.management.console.actions.AddServerAction" label="&Add Server(s)" - menubarPath="com.gluster.storage.management.console.menu.discoveredserver/discoveredserver" - pulldown="false" + menubarPath="org.gluster.storage.management.console.menu.discoveredserver/discoveredserver" retarget="false" state="false" style="push" @@ -899,13 +981,12 @@ </action> <action allowLabelUpdate="false" - class="com.gluster.storage.management.console.actions.CreateVolumeAction" - definitionId="com.gluster.storage.management.console.commands.CreateVolume" + class="org.gluster.storage.management.console.actions.CreateVolumeAction" + definitionId="org.gluster.storage.management.console.commands.CreateVolume" icon="icons/tango/32x32/create-volume.png" - id="com.gluster.storage.management.console.actions.CreateVolumeAction" + id="org.gluster.storage.management.console.actions.CreateVolumeAction" label="Create &Volume" - menubarPath="com.gluster.storage.management.console.menu.discoveredserver/discoveredserver" - pulldown="false" + menubarPath="org.gluster.storage.management.console.menu.discoveredserver/discoveredserver" retarget="false" state="false" style="push" @@ -914,20 +995,19 @@ </action> <action allowLabelUpdate="false" - class="com.gluster.storage.management.console.actions.ServerAdditionAction" - definitionId="com.gluster.storage.management.console.commands.ServerAddition" - id="com.gluster.storage.management.console.actions.ServerAdditionAction" + class="org.gluster.storage.management.console.actions.ServerAdditionAction" + definitionId="org.gluster.storage.management.console.commands.ServerAddition" + id="org.gluster.storage.management.console.actions.ServerAdditionAction" label="Add Server" - menubarPath="com.gluster.storage.management.console.menu.discoveredserver/discoveredserver" + menubarPath="org.gluster.storage.management.console.menu.discoveredserver/discoveredserver" mode="FORCE_TEXT" - pulldown="false" retarget="false" state="false" style="push" tooltip="Manual Server Addition"> </action> <menu - id="com.gluster.storage.management.console.menu.discoveredserver" + id="org.gluster.storage.management.console.menu.discoveredserver" label="&Gluster" path="additions"> <groupMarker @@ -937,18 +1017,18 @@ </actionSet> <actionSet description="Set of actions that can be performed from "Cluster" context" - id="com.gluster.storage.management.console.actionsets.task" + id="org.gluster.storage.management.console.actionsets.task" label="Task Action Set" visible="false"> <action allowLabelUpdate="false" - class="com.gluster.storage.management.console.actions.ClearTaskAction" - definitionId="com.gluster.storage.management.console.commands.Clear" + class="org.gluster.storage.management.console.actions.ClearTaskAction" + definitionId="org.gluster.storage.management.console.commands.Clear" + disabledIcon="icons/tango/32x32/clear-task-disabled.png" icon="icons/tango/32x32/clear-task.png" - id="com.gluster.storage.management.console.actions.Clear" + id="org.gluster.storage.management.console.actions.Clear" label="&Clear Task" - menubarPath="com.gluster.storage.management.console.menu.task/task" - pulldown="false" + menubarPath="org.gluster.storage.management.console.menu.task/task" retarget="false" state="false" style="push" @@ -957,13 +1037,13 @@ </action> <action allowLabelUpdate="false" - class="com.gluster.storage.management.console.actions.CommitTaskAction" - definitionId="com.gluster.storage.management.console.commands.Commit" + class="org.gluster.storage.management.console.actions.CommitTaskAction" + definitionId="org.gluster.storage.management.console.commands.Commit" + disabledIcon="icons/tango/32x32/commit-task-disabled.png" icon="icons/tango/32x32/commit-task.png" - id="com.gluster.storage.management.console.actions.Commit" + id="org.gluster.storage.management.console.actions.Commit" label="&Commit Task" - menubarPath="com.gluster.storage.management.console.menu.task/task" - pulldown="false" + menubarPath="org.gluster.storage.management.console.menu.task/task" retarget="false" state="false" style="push" @@ -972,13 +1052,13 @@ </action> <action allowLabelUpdate="false" - class="com.gluster.storage.management.console.actions.StopTaskAction" - definitionId="com.gluster.storage.management.console.commands.Stop" + class="org.gluster.storage.management.console.actions.StopTaskAction" + definitionId="org.gluster.storage.management.console.commands.Stop" + disabledIcon="icons/tango/32x32/stop-disabled.png" icon="icons/tango/32x32/stop.png" - id="com.gluster.storage.management.console.actions.Stop" + id="org.gluster.storage.management.console.actions.Stop" label="&Stop Task" - menubarPath="com.gluster.storage.management.console.menu.task/task" - pulldown="false" + menubarPath="org.gluster.storage.management.console.menu.task/task" retarget="false" state="false" style="push" @@ -987,13 +1067,13 @@ </action> <action allowLabelUpdate="false" - class="com.gluster.storage.management.console.actions.ResumeTaskAction" - definitionId="com.gluster.storage.management.console.commands.Pause" + class="org.gluster.storage.management.console.actions.ResumeTaskAction" + definitionId="org.gluster.storage.management.console.commands.Pause" + disabledIcon="icons/tango/32x32/start-disabled.png" icon="icons/tango/32x32/start.png" - id="com.gluster.storage.management.console.actions.Resume" + id="org.gluster.storage.management.console.actions.Resume" label="&Resume Task" - menubarPath="com.gluster.storage.management.console.menu.task/task" - pulldown="false" + menubarPath="org.gluster.storage.management.console.menu.task/task" retarget="false" state="false" style="push" @@ -1002,13 +1082,13 @@ </action> <action allowLabelUpdate="false" - class="com.gluster.storage.management.console.actions.PauseTaskAction" - definitionId="com.gluster.storage.management.console.commands.Pause" + class="org.gluster.storage.management.console.actions.PauseTaskAction" + definitionId="org.gluster.storage.management.console.commands.Pause" + disabledIcon="icons/tango/32x32/pause-disabled.png" icon="icons/tango/32x32/pause.png" - id="com.gluster.storage.management.console.actions.Pause" + id="org.gluster.storage.management.console.actions.Pause" label="&Pause Task" - menubarPath="com.gluster.storage.management.console.menu.task/task" - pulldown="false" + menubarPath="org.gluster.storage.management.console.menu.task/task" retarget="false" state="false" style="push" @@ -1017,13 +1097,12 @@ </action> <action allowLabelUpdate="false" - class="com.gluster.storage.management.console.actions.CreateVolumeAction" - definitionId="com.gluster.storage.management.console.commands.CreateVolume" + class="org.gluster.storage.management.console.actions.CreateVolumeAction" + definitionId="org.gluster.storage.management.console.commands.CreateVolume" icon="icons/tango/32x32/create-volume.png" - id="com.gluster.storage.management.console.actions.CreateVolumeAction" + id="org.gluster.storage.management.console.actions.CreateVolumeAction" label="Create &Volume" - menubarPath="com.gluster.storage.management.console.menu.task/task" - pulldown="false" + menubarPath="org.gluster.storage.management.console.menu.task/task" retarget="false" state="false" style="push" @@ -1031,7 +1110,7 @@ tooltip="Create a new Volume"> </action> <menu - id="com.gluster.storage.management.console.menu.task" + id="org.gluster.storage.management.console.menu.task" label="&Gluster"> <groupMarker name="task"> @@ -1040,18 +1119,17 @@ </actionSet> <actionSet description="Set of actions that can be performed at Cluster context" - id="com.gluster.storage.management.console.actionsets.gluster" + id="org.gluster.storage.management.console.actionsets.gluster" label="Gluster Actions" visible="false"> <action allowLabelUpdate="false" - class="com.gluster.storage.management.console.actions.CreateVolumeAction" - definitionId="com.gluster.storage.management.console.commands.CreateVolume" + class="org.gluster.storage.management.console.actions.CreateVolumeAction" + definitionId="org.gluster.storage.management.console.commands.CreateVolume" icon="icons/tango/32x32/create-volume.png" - id="com.gluster.storage.management.console.actions.CreateVolumeAction" + id="org.gluster.storage.management.console.actions.CreateVolumeAction" label="Create &Volume" - menubarPath="com.gluster.storage.management.console.menu.gluster/gluster" - pulldown="false" + menubarPath="org.gluster.storage.management.console.menu.gluster/gluster" retarget="false" state="false" style="push" @@ -1060,20 +1138,19 @@ </action> <action allowLabelUpdate="false" - class="com.gluster.storage.management.console.actions.ServerAdditionAction" - definitionId="com.gluster.storage.management.console.commands.ServerAddition" - id="com.gluster.storage.management.console.actions.ServerAdditionAction" + class="org.gluster.storage.management.console.actions.ServerAdditionAction" + definitionId="org.gluster.storage.management.console.commands.ServerAddition" + id="org.gluster.storage.management.console.actions.ServerAdditionAction" label="Add Server" - menubarPath="com.gluster.storage.management.console.menu.gluster/gluster" + menubarPath="org.gluster.storage.management.console.menu.gluster/gluster" mode="FORCE_TEXT" - pulldown="false" retarget="false" state="false" style="push" tooltip="Manual Server Addition"> </action> <menu - id="com.gluster.storage.management.console.menu.gluster" + id="org.gluster.storage.management.console.menu.gluster" label="&Gluster" path="additions"> <groupMarker @@ -1083,18 +1160,17 @@ </actionSet> <actionSet description="Set of Actions in "Edit" menu" - id="com.gluster.storage.management.console.actionsets.edit" + id="org.gluster.storage.management.console.actionsets.edit" label="Edit Action Set" visible="true"> <action allowLabelUpdate="false" - class="com.gluster.storage.management.console.actions.RefreshDataAction" - definitionId="com.gluster.storage.management.console.commands.Refresh" + class="org.gluster.storage.management.console.actions.RefreshDataAction" + definitionId="org.gluster.storage.management.console.commands.Refresh" icon="icons/tango/32x32/view-refresh.png" - id="com.gluster.storage.management.console.actions.RefreshDataAction" + id="org.gluster.storage.management.console.actions.RefreshDataAction" label="&Refresh" - menubarPath="com.gluster.storage.management.console.menu.edit/edit" - pulldown="false" + menubarPath="org.gluster.storage.management.console.menu.edit/edit" retarget="false" state="false" style="push" @@ -1103,13 +1179,12 @@ </action> <action allowLabelUpdate="false" - class="com.gluster.storage.management.console.actions.PreferencesAction" - definitionId="org.eclipse.ui.window.preferences" + class="org.gluster.storage.management.console.actions.PreferencesAction" + definitionId="org.gluster.storage.management.console.commands.Preferences" icon="icons/tango/32x32/settings.png" - id="com.gluster.storage.management.console.actions.PreferencesAction" + id="org.gluster.storage.management.console.actions.PreferencesAction" label="&Settings" - menubarPath="com.gluster.storage.management.console.menu.edit/edit" - pulldown="false" + menubarPath="org.gluster.storage.management.console.menu.edit/edit" retarget="false" state="false" style="push" @@ -1118,13 +1193,12 @@ </action> <action allowLabelUpdate="false" - class="com.gluster.storage.management.console.actions.TerminalAction" - definitionId="com.gluster.storage.management.console.commands.Terminal" + class="org.gluster.storage.management.console.actions.TerminalAction" + definitionId="org.gluster.storage.management.console.commands.Terminal" icon="icons/tango/32x32/utilities-terminal.png" - id="com.gluster.storage.management.console.actions.TerminalAction" + id="org.gluster.storage.management.console.actions.TerminalAction" label="&Terminal" - menubarPath="com.gluster.storage.management.console.menu.edit/edit" - pulldown="false" + menubarPath="org.gluster.storage.management.console.menu.edit/edit" retarget="false" state="false" style="push" @@ -1133,13 +1207,12 @@ </action> <action allowLabelUpdate="false" - class="com.gluster.storage.management.console.actions.ChangePasswordAction" - definitionId="com.gluster.storage.management.console.commands.ChangePassword" - id="com.gluster.storage.management.console.actions.ChangePasswordAction" + class="org.gluster.storage.management.console.actions.ChangePasswordAction" + definitionId="org.gluster.storage.management.console.commands.ChangePassword" + id="org.gluster.storage.management.console.actions.ChangePasswordAction" label="&Change Password" - menubarPath="com.gluster.storage.management.console.menu.edit/edit" + menubarPath="org.gluster.storage.management.console.menu.edit/edit" mode="FORCE_TEXT" - pulldown="false" retarget="false" state="false" style="push" @@ -1147,13 +1220,12 @@ </action> <action allowLabelUpdate="false" - class="com.gluster.storage.management.console.actions.ExportSshKeysAction" - definitionId="com.gluster.storage.management.console.commands.ExportSshKeys" - id="com.gluster.storage.management.console.actions.ExportSshKeysAction" + class="org.gluster.storage.management.console.actions.ExportSshKeysAction" + definitionId="org.gluster.storage.management.console.commands.ExportSshKeys" + id="org.gluster.storage.management.console.actions.ExportSshKeysAction" label="&Export Keys" - menubarPath="com.gluster.storage.management.console.menu.edit/edit" + menubarPath="org.gluster.storage.management.console.menu.edit/edit" mode="FORCE_TEXT" - pulldown="false" retarget="false" state="false" style="push" @@ -1161,20 +1233,19 @@ </action> <action allowLabelUpdate="false" - class="com.gluster.storage.management.console.actions.ImportSshKeysAction" - definitionId="com.gluster.storage.management.console.commands.ImportSshKeys" - id="com.gluster.storage.management.console.actions.ImportSshKeysAction" + class="org.gluster.storage.management.console.actions.ImportSshKeysAction" + definitionId="org.gluster.storage.management.console.commands.ImportSshKeys" + id="org.gluster.storage.management.console.actions.ImportSshKeysAction" label="&Import Keys" - menubarPath="com.gluster.storage.management.console.menu.edit/edit" + menubarPath="org.gluster.storage.management.console.menu.edit/edit" mode="FORCE_TEXT" - pulldown="false" retarget="false" state="false" style="push" tooltip="Import SSH keys"> </action> <menu - id="com.gluster.storage.management.console.menu.edit" + id="org.gluster.storage.management.console.menu.edit" label="&Edit" path="additions"> <groupMarker @@ -1184,19 +1255,18 @@ </actionSet> <actionSet description="Set of Actions in "Edit" menu" - id="com.gluster.storage.management.console.actionsets.help" + id="org.gluster.storage.management.console.actionsets.help" label="Help Action Set" - visible="true"> + visible="false"> <action allowLabelUpdate="false" - class="com.gluster.storage.management.console.actions.SupportAction" - definitionId="com.gluster.storage.management.console.commands.Support" - id="com.gluster.storage.management.console.actions.SupportAction" + class="org.gluster.storage.management.console.actions.SupportAction" + definitionId="org.gluster.storage.management.console.commands.Support" + id="org.gluster.storage.management.console.actions.SupportAction" label="&Support" menubarPath="help/helpEnd" - pulldown="false" retarget="false" - state="false" + state="true" style="push" tooltip="Support Information"> </action> @@ -1208,7 +1278,7 @@ targetID="*"> <view closeable="false" - id="com.gluster.storage.management.console.views.NavigationView" + id="org.gluster.storage.management.console.views.NavigationView" minimized="false" moveable="false" ratio="0.30f" @@ -1220,192 +1290,192 @@ </view> <view closeable="false" - id="com.gluster.storage.management.console.views.ClusterSummaryView" + id="org.gluster.storage.management.console.views.ClusterSummaryView" minimized="false" moveable="false" ratio="0.30f" relationship="right" - relative="com.gluster.storage.management.console.views.navigator.NavigationView" + relative="org.gluster.storage.management.console.views.NavigationView" showTitle="true" standalone="false" visible="false"> </view> <view closeable="false" - id="com.gluster.storage.management.console.views.DiscoveredServersView" + id="org.gluster.storage.management.console.views.DiscoveredServersView" minimized="false" moveable="false" ratio="0.30f" relationship="stack" - relative="com.gluster.storage.management.console.views.ClusterSummaryView" + relative="org.gluster.storage.management.console.views.ClusterSummaryView" showTitle="true" standalone="false" visible="false"> </view> <view closeable="false" - id="com.gluster.storage.management.console.views.DiscoveredServerView" + id="org.gluster.storage.management.console.views.DiscoveredServerView" minimized="false" moveable="false" ratio="0.30f" relationship="stack" - relative="com.gluster.storage.management.console.views.ClusterSummaryView" + relative="org.gluster.storage.management.console.views.ClusterSummaryView" showTitle="true" standalone="false" visible="false"> </view> <view closeable="false" - id="com.gluster.storage.management.console.views.VolumesSummaryView" + id="org.gluster.storage.management.console.views.VolumesSummaryView" minimized="false" moveable="false" ratio="0.30f" relationship="stack" - relative="com.gluster.storage.management.console.views.ClusterSummaryView" + relative="org.gluster.storage.management.console.views.ClusterSummaryView" showTitle="true" standalone="false" visible="false"> </view> <view closeable="false" - id="com.gluster.storage.management.console.views.VolumesView" + id="org.gluster.storage.management.console.views.VolumesView" minimized="false" moveable="false" ratio="0.30f" relationship="stack" - relative="com.gluster.storage.management.console.views.VolumesSummaryView" + relative="org.gluster.storage.management.console.views.VolumesSummaryView" showTitle="true" standalone="false" visible="false"> </view> <view closeable="false" - id="com.gluster.storage.management.console.views.VolumeSummaryView" + id="org.gluster.storage.management.console.views.VolumeSummaryView" minimized="false" moveable="false" ratio="0.30f" relationship="stack" - relative="com.gluster.storage.management.console.views.ClusterSummaryView" + relative="org.gluster.storage.management.console.views.ClusterSummaryView" showTitle="true" standalone="false" visible="false"> </view> <view closeable="false" - id="com.gluster.storage.management.console.views.VolumeBricksView" + id="org.gluster.storage.management.console.views.VolumeBricksView" minimized="false" moveable="false" ratio="0.30f" relationship="stack" - relative="com.gluster.storage.management.console.views.ClusterSummaryView" + relative="org.gluster.storage.management.console.views.ClusterSummaryView" showTitle="true" standalone="false" visible="false"> </view> <view closeable="false" - id="com.gluster.storage.management.console.views.VolumeOptionsView" + id="org.gluster.storage.management.console.views.VolumeOptionsView" minimized="false" moveable="false" ratio="0.30f" relationship="stack" - relative="com.gluster.storage.management.console.views.ClusterSummaryView" + relative="org.gluster.storage.management.console.views.ClusterSummaryView" showTitle="true" standalone="false" visible="false"> </view> <view closeable="false" - id="com.gluster.storage.management.console.views.VolumeLogsView" + id="org.gluster.storage.management.console.views.VolumeLogsView" minimized="false" moveable="false" ratio="0.30f" relationship="stack" - relative="com.gluster.storage.management.console.views.ClusterSummaryView" + relative="org.gluster.storage.management.console.views.ClusterSummaryView" showTitle="true" standalone="false" visible="false"> </view> <view closeable="false" - id="com.gluster.storage.management.console.views.GlusterServersSummaryView" + id="org.gluster.storage.management.console.views.GlusterServersSummaryView" minimized="false" moveable="false" ratio="0.30f" relationship="stack" - relative="com.gluster.storage.management.console.views.ClusterSummaryView" + relative="org.gluster.storage.management.console.views.ClusterSummaryView" showTitle="true" standalone="false" visible="false"> </view> <view closeable="false" - id="com.gluster.storage.management.console.views.GlusterServersView" + id="org.gluster.storage.management.console.views.GlusterServersView" minimized="false" moveable="false" ratio="0.30f" relationship="stack" - relative="com.gluster.storage.management.console.views.ClusterSummaryView" + relative="org.gluster.storage.management.console.views.ClusterSummaryView" showTitle="true" standalone="false" visible="false"> </view> <view closeable="false" - id="com.gluster.storage.management.console.views.DisksView" + id="org.gluster.storage.management.console.views.DisksView" minimized="false" moveable="false" ratio="0.30f" relationship="stack" - relative="com.gluster.storage.management.console.views.ClusterSummaryView" + relative="org.gluster.storage.management.console.views.ClusterSummaryView" showTitle="true" standalone="false" visible="false"> </view> <view closeable="false" - id="com.gluster.storage.management.console.views.GlusterServerSummaryView" + id="org.gluster.storage.management.console.views.GlusterServerSummaryView" minimized="false" moveable="false" ratio="0.30f" relationship="stack" - relative="com.gluster.storage.management.console.views.ClusterSummaryView" + relative="org.gluster.storage.management.console.views.ClusterSummaryView" showTitle="true" standalone="false" visible="false"> </view> <view closeable="false" - id="com.gluster.storage.management.console.views.GlusterServerDisksView" + id="org.gluster.storage.management.console.views.GlusterServerDisksView" minimized="false" moveable="false" ratio="0.30f" relationship="stack" - relative="com.gluster.storage.management.console.views.ClusterSummaryView" + relative="org.gluster.storage.management.console.views.ClusterSummaryView" showTitle="true" standalone="false" visible="false"> </view> <view closeable="false" - id="com.gluster.storage.management.console.views.GlusterServerLogsView" + id="org.gluster.storage.management.console.views.GlusterServerLogsView" minimized="false" moveable="false" ratio="0.30f" relationship="stack" - relative="com.gluster.storage.management.console.views.ClusterSummaryView" + relative="org.gluster.storage.management.console.views.ClusterSummaryView" showTitle="true" standalone="false" visible="false"> </view> <view closeable="false" - id="com.gluster.storage.management.console.views.TasksView" + id="org.gluster.storage.management.console.views.TasksView" minimized="false" moveable="false" ratio="0.30f" relationship="stack" - relative="com.gluster.storage.management.console.views.ClusterSummaryView" + relative="org.gluster.storage.management.console.views.ClusterSummaryView" showTitle="true" standalone="false" visible="false"> @@ -1417,7 +1487,7 @@ moveable="false" ratio="0.60f" relationship="bottom" - relative="com.gluster.storage.management.console.views.ClusterSummaryView" + relative="org.gluster.storage.management.console.views.ClusterSummaryView" showTitle="true" standalone="false" visible="false"> @@ -1428,8 +1498,8 @@ point="org.eclipse.ui.decorators"> <decorator adaptable="false" - class="com.gluster.storage.management.console.views.NavigationTreeLabelDecorator" - id="com.gluster.storage.management.console.views.navigator.decorator" + class="org.gluster.storage.management.console.views.NavigationTreeLabelDecorator" + id="org.gluster.storage.management.console.views.navigator.decorator" label="Navigation Tree Decorator" lightweight="true" location="BOTTOM_LEFT" @@ -1439,177 +1509,145 @@ <extension point="org.eclipse.ui.preferencePages"> <page - class="com.gluster.storage.management.console.preferences.GlusterPreferencePage" - id="com.gluster.storage.management.console.preferences.GlusterPreferencePage" + class="org.gluster.storage.management.console.preferences.GlusterPreferencePage" + id="org.gluster.storage.management.console.preferences.GlusterPreferencePage" name="Gluster"> </page> <page - category="com.gluster.storage.management.console.preferences.GlusterPreferencePage" - class="com.gluster.storage.management.console.preferences.AlertsPreferencePage" - id="com.gluster.storage.management.console.preferences.AlertsPreferencePage" + category="org.gluster.storage.management.console.preferences.GlusterPreferencePage" + class="org.gluster.storage.management.console.preferences.AlertsPreferencePage" + id="org.gluster.storage.management.console.preferences.AlertsPreferencePage" name="Alerts"> </page> <page - category="com.gluster.storage.management.console.preferences.GlusterPreferencePage" - class="com.gluster.storage.management.console.preferences.ChartsPreferencePage" - id="com.gluster.storage.management.console.preferences.ChartsPreferencePage" + category="org.gluster.storage.management.console.preferences.GlusterPreferencePage" + class="org.gluster.storage.management.console.preferences.ChartsPreferencePage" + id="org.gluster.storage.management.console.preferences.ChartsPreferencePage" name="Charts"> </page> </extension> <extension point="org.eclipse.core.runtime.preferences"> <initializer - class="com.gluster.storage.management.console.preferences.PreferenceInitializer"> + class="org.gluster.storage.management.console.preferences.PreferenceInitializer"> </initializer> </extension> <extension point="org.eclipse.ui.popupMenus"> <objectContribution id="gluster.context.menu.glusterserver" - objectClass="com.gluster.storage.management.core.model.GlusterServer"> + objectClass="org.gluster.storage.management.core.model.GlusterServer"> <action - class="com.gluster.storage.management.console.actions.RemoveServerAction" - definitionId="com.gluster.storage.management.console.commands.RemoveServer" + class="org.gluster.storage.management.console.actions.RemoveServerAction" + definitionId="org.gluster.storage.management.console.commands.RemoveServer" enablesFor="+" - id="com.gluster.storage.management.console.actions.RemoveServerAction" + id="org.gluster.storage.management.console.actions.RemoveServerAction" label="&Remove Server" menubarPath="additions"> </action> </objectContribution> <objectContribution id="gluster.context.menu.volume" - objectClass="com.gluster.storage.management.core.model.Volume"> + objectClass="org.gluster.storage.management.core.model.Volume"> <action - allowLabelUpdate="false" - class="com.gluster.storage.management.console.actions.MigrateBrickAction" - definitionId="com.gluster.storage.management.console.commands.MigrateDisk" + class="org.gluster.storage.management.console.actions.MigrateBrickAction" + definitionId="org.gluster.storage.management.console.commands.MigrateDisk" enablesFor="1" - id="com.gluster.storage.management.console.actions.MigrateDiskAction" + id="org.gluster.storage.management.console.actions.MigrateDiskAction" label="&Migrate Disk" menubarPath="additions" - pulldown="false" - retarget="false" state="false" style="push" - toolbarPath="Normal" tooltip="Migrate Disk"> </action> <action - allowLabelUpdate="false" - class="com.gluster.storage.management.console.actions.DeleteVolumeAction" - definitionId="com.gluster.storage.management.console.commands.DeleteVolume" + class="org.gluster.storage.management.console.actions.DeleteVolumeAction" + definitionId="org.gluster.storage.management.console.commands.DeleteVolume" enablesFor="1" - id="com.gluster.storage.management.console.actions.DeleteVolumeAction" + id="org.gluster.storage.management.console.actions.DeleteVolumeAction" label="&Delete Volume" menubarPath="additions" - pulldown="false" - retarget="false" state="false" style="push" - toolbarPath="Normal" tooltip="Delete Volume"> </action> <action - allowLabelUpdate="false" - class="com.gluster.storage.management.console.actions.RebalanceVolumeAction" - definitionId="com.gluster.storage.management.console.commands.RebalanceVolume" + class="org.gluster.storage.management.console.actions.RebalanceVolumeAction" + definitionId="org.gluster.storage.management.console.commands.RebalanceVolume" enablesFor="1" - id="com.gluster.storage.management.console.actions.RebalanceVolumeAction" + id="org.gluster.storage.management.console.actions.RebalanceVolumeAction" label="&Rebalance Volume" menubarPath="additions" - pulldown="false" - retarget="false" state="false" style="push" - toolbarPath="Normal" tooltip="Rebalance Volume"> </action> <action - allowLabelUpdate="false" - class="com.gluster.storage.management.console.actions.StopVolumeAction" - definitionId="com.gluster.storage.management.console.commands.StopVolume" + class="org.gluster.storage.management.console.actions.StopVolumeAction" + definitionId="org.gluster.storage.management.console.commands.StopVolume" enablesFor="+" - id="com.gluster.storage.management.console.actions.StopVolumeAction" + id="org.gluster.storage.management.console.actions.StopVolumeAction" label="S&top Volume" menubarPath="additions" - pulldown="false" - retarget="false" state="false" style="push" - toolbarPath="Normal" tooltip="Stop Volume"> </action> <action - allowLabelUpdate="false" - class="com.gluster.storage.management.console.actions.StartVolumeAction" - definitionId="com.gluster.storage.management.console.commands.StartVolume" + class="org.gluster.storage.management.console.actions.StartVolumeAction" + definitionId="org.gluster.storage.management.console.commands.StartVolume" enablesFor="+" - id="com.gluster.storage.management.console.actions.StartVolumeAction" + id="org.gluster.storage.management.console.actions.StartVolumeAction" label="&Start Volume" menubarPath="additions" - pulldown="false" - retarget="false" state="false" style="push" - toolbarPath="Normal" tooltip="Start Volume"> </action> </objectContribution> <objectContribution id="gluster.context.menu.server" - objectClass="com.gluster.storage.management.core.model.Server"> + objectClass="org.gluster.storage.management.core.model.Server"> <action - allowLabelUpdate="false" - class="com.gluster.storage.management.console.actions.AddServerAction" - definitionId="com.gluster.storage.management.console.commands.AddServer" + class="org.gluster.storage.management.console.actions.AddServerAction" + definitionId="org.gluster.storage.management.console.commands.AddServer" enablesFor="+" - id="com.gluster.storage.management.console.actions.AddServerAction" + id="org.gluster.storage.management.console.actions.AddServerAction" label="&Add Server(s)" menubarPath="additions" - pulldown="false" - retarget="false" state="false" style="push" - toolbarPath="Normal" tooltip="Add Server(s) to Cluster"> </action> <visibility> <not> <objectClass - name="com.gluster.storage.management.core.model.GlusterServer"> + name="org.gluster.storage.management.core.model.GlusterServer"> </objectClass> </not> </visibility> </objectContribution> <objectContribution id="gluster.context.menu.entityGroup" - objectClass="com.gluster.storage.management.core.model.EntityGroup"> + objectClass="org.gluster.storage.management.core.model.EntityGroup"> <action - allowLabelUpdate="false" - class="com.gluster.storage.management.console.actions.CreateVolumeAction" - definitionId="com.gluster.storage.management.console.commands.CreateVolume" - id="com.gluster.storage.management.console.actions.CreateVolumeAction" + class="org.gluster.storage.management.console.actions.CreateVolumeAction" + definitionId="org.gluster.storage.management.console.commands.CreateVolume" + id="org.gluster.storage.management.console.actions.CreateVolumeAction" label="&Create Volume" menubarPath="additions" - pulldown="false" - retarget="false" state="false" style="push" - toolbarPath="Normal" tooltip="Create a new Volume"> </action> <action - allowLabelUpdate="false" - class="com.gluster.storage.management.console.actions.AddServerAction" - definitionId="com.gluster.storage.management.console.commands.AddServer" - id="com.gluster.storage.management.console.actions.AddServerAction" + class="org.gluster.storage.management.console.actions.AddServerAction" + definitionId="org.gluster.storage.management.console.commands.AddServer" + id="org.gluster.storage.management.console.actions.AddServerAction" label="&Add Server(s)" menubarPath="additions" - pulldown="false" - retarget="false" state="false" style="push" - toolbarPath="Normal" tooltip="Add Server(s) to Cluster"> </action> </objectContribution> diff --git a/src/org.gluster.storage.management.console/preferences.ini b/src/org.gluster.storage.management.console/preferences.ini new file mode 100644 index 00000000..5a4c6846 --- /dev/null +++ b/src/org.gluster.storage.management.console/preferences.ini @@ -0,0 +1,3 @@ +org.eclipse.ui/KEY_CONFIGURATION_ID = org.gluster.storage.management.console.KeyConfig +org.eclipse.help.base/help_home=/org.gluster.storage.management.console.help/html/help_home.html +IWorkbenchPreferenceConstants.SHOW_PROGRESS_ON_STARTUP=true
\ No newline at end of file diff --git a/src/com.gluster.storage.management.console/splash.bmp b/src/org.gluster.storage.management.console/splash.bmp Binary files differindex d4510414..d4510414 100644 --- a/src/com.gluster.storage.management.console/splash.bmp +++ b/src/org.gluster.storage.management.console/splash.bmp diff --git a/src/com.gluster.storage.management.console/src/com/gluster/storage/management/console/Activator.java b/src/org.gluster.storage.management.console/src/org/gluster/storage/management/console/Activator.java index 8edae7f4..9a4eed20 100644 --- a/src/com.gluster.storage.management.console/src/com/gluster/storage/management/console/Activator.java +++ b/src/org.gluster.storage.management.console/src/org/gluster/storage/management/console/Activator.java @@ -1,22 +1,22 @@ /******************************************************************************* - * Copyright (c) 2011 Gluster, Inc. <http://www.gluster.com> + * Copyright (c) 2006-2011 Gluster, Inc. <http://www.gluster.com> * This file is part of Gluster Management Console. * - * Gluster Management Console is free software; you can redistribute it and/or - * modify it under the terms of the GNU Affero General Public License as published - * by the Free Software Foundation; either version 3 of the License, or - * (at your option) any later version. - * - * Gluster Management Console is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY - * or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Affero General Public License - * for more details. - * - * You should have received a copy of the GNU Affero General Public License - * along with this program. If not, see + * Gluster Management Console is free software; you can redistribute + * it and/or modify it under the terms of the GNU General Public + * License as published by the Free Software Foundation; either + * version 3 of the License, or (at your option) any later version. + * + * Gluster Management Console is distributed in the hope that it + * will be useful, but WITHOUT ANY WARRANTY; without even the + * implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR + * PURPOSE. See the GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program. If not, see * <http://www.gnu.org/licenses/>. *******************************************************************************/ -package com.gluster.storage.management.console; +package org.gluster.storage.management.console; import org.eclipse.jface.resource.ImageDescriptor; import org.eclipse.ui.plugin.AbstractUIPlugin; @@ -28,7 +28,7 @@ import org.osgi.framework.BundleContext; public class Activator extends AbstractUIPlugin { // The plug-in ID - public static final String PLUGIN_ID = "com.gluster.storage.management.console"; //$NON-NLS-1$ + public static final String PLUGIN_ID = "org.gluster.storage.management.console"; //$NON-NLS-1$ // The shared instance private static Activator plugin; diff --git a/src/com.gluster.storage.management.console/src/com/gluster/storage/management/console/AlertsManager.java b/src/org.gluster.storage.management.console/src/org/gluster/storage/management/console/AlertsManager.java index 40a64498..0863a0c5 100644 --- a/src/com.gluster.storage.management.console/src/com/gluster/storage/management/console/AlertsManager.java +++ b/src/org.gluster.storage.management.console/src/org/gluster/storage/management/console/AlertsManager.java @@ -1,43 +1,41 @@ -/** - * AlertsManager.java - * - * Copyright (c) 2011 Gluster, Inc. <http://www.gluster.com> +/******************************************************************************* + * Copyright (c) 2006-2011 Gluster, Inc. <http://www.gluster.com> * This file is part of Gluster Management Console. * - * Gluster Management Console is free software; you can redistribute it and/or - * modify it under the terms of the GNU Affero General Public License as published - * by the Free Software Foundation; either version 3 of the License, or - * (at your option) any later version. + * Gluster Management Console is free software; you can redistribute + * it and/or modify it under the terms of the GNU General Public + * License as published by the Free Software Foundation; either + * version 3 of the License, or (at your option) any later version. * - * Gluster Management Console is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY - * or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Affero General Public License - * for more details. + * Gluster Management Console is distributed in the hope that it + * will be useful, but WITHOUT ANY WARRANTY; without even the + * implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR + * PURPOSE. See the GNU General Public License for more details. * - * You should have received a copy of the GNU Affero General Public License - * along with this program. If not, see + * You should have received a copy of the GNU General Public License + * along with this program. If not, see * <http://www.gnu.org/licenses/>. - */ -package com.gluster.storage.management.console; + *******************************************************************************/ +package org.gluster.storage.management.console; import java.util.ArrayList; import java.util.List; import org.eclipse.jface.preference.IPreferenceStore; +import org.gluster.storage.management.console.preferences.PreferenceConstants; +import org.gluster.storage.management.core.model.Alert; +import org.gluster.storage.management.core.model.Brick; +import org.gluster.storage.management.core.model.Cluster; +import org.gluster.storage.management.core.model.Disk; +import org.gluster.storage.management.core.model.GlusterServer; +import org.gluster.storage.management.core.model.Partition; +import org.gluster.storage.management.core.model.Volume; +import org.gluster.storage.management.core.model.Alert.ALERT_TYPES; +import org.gluster.storage.management.core.model.Brick.BRICK_STATUS; +import org.gluster.storage.management.core.model.Server.SERVER_STATUS; +import org.gluster.storage.management.core.model.Volume.VOLUME_STATUS; +import org.gluster.storage.management.core.utils.NumberUtil; -import com.gluster.storage.management.console.preferences.PreferenceConstants; -import com.gluster.storage.management.core.model.Alert; -import com.gluster.storage.management.core.model.Alert.ALERT_TYPES; -import com.gluster.storage.management.core.model.Brick; -import com.gluster.storage.management.core.model.Brick.BRICK_STATUS; -import com.gluster.storage.management.core.model.Cluster; -import com.gluster.storage.management.core.model.Disk; -import com.gluster.storage.management.core.model.GlusterServer; -import com.gluster.storage.management.core.model.Partition; -import com.gluster.storage.management.core.model.Server.SERVER_STATUS; -import com.gluster.storage.management.core.model.Volume; -import com.gluster.storage.management.core.model.Volume.VOLUME_STATUS; -import com.gluster.storage.management.core.utils.NumberUtil; public class AlertsManager { private List<Alert> alerts = new ArrayList<Alert>(); @@ -191,6 +189,9 @@ public class AlertsManager { for (Volume volume : cluster.getVolumes()) { if (volume.getStatus() == VOLUME_STATUS.OFFLINE) { + volumeAlerts.add(new Alert(ALERT_TYPES.OFFLINE_VOLUME_ALERT, volume.getName(), + Alert.ALERT_TYPE_STR[ALERT_TYPES.OFFLINE_VOLUME_ALERT.ordinal()] + " [" + volume.getName() + + "]")); continue; } diff --git a/src/com.gluster.storage.management.console/src/com/gluster/storage/management/console/Application.java b/src/org.gluster.storage.management.console/src/org/gluster/storage/management/console/Application.java index e84dac47..f1dc57da 100644 --- a/src/com.gluster.storage.management.console/src/com/gluster/storage/management/console/Application.java +++ b/src/org.gluster.storage.management.console/src/org/gluster/storage/management/console/Application.java @@ -1,22 +1,22 @@ /******************************************************************************* - * Copyright (c) 2011 Gluster, Inc. <http://www.gluster.com> + * Copyright (c) 2006-2011 Gluster, Inc. <http://www.gluster.com> * This file is part of Gluster Management Console. * - * Gluster Management Console is free software; you can redistribute it and/or - * modify it under the terms of the GNU Affero General Public License as published - * by the Free Software Foundation; either version 3 of the License, or - * (at your option) any later version. - * - * Gluster Management Console is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY - * or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Affero General Public License - * for more details. - * - * You should have received a copy of the GNU Affero General Public License - * along with this program. If not, see + * Gluster Management Console is free software; you can redistribute + * it and/or modify it under the terms of the GNU General Public + * License as published by the Free Software Foundation; either + * version 3 of the License, or (at your option) any later version. + * + * Gluster Management Console is distributed in the hope that it + * will be useful, but WITHOUT ANY WARRANTY; without even the + * implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR + * PURPOSE. See the GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program. If not, see * <http://www.gnu.org/licenses/>. *******************************************************************************/ -package com.gluster.storage.management.console; +package org.gluster.storage.management.console; import java.util.ArrayList; import java.util.Collections; @@ -32,16 +32,16 @@ import org.eclipse.swt.widgets.Display; import org.eclipse.swt.widgets.Shell; import org.eclipse.ui.IWorkbench; import org.eclipse.ui.PlatformUI; +import org.gluster.storage.management.console.dialogs.LoginDialog; +import org.gluster.storage.management.core.model.Entity; -import com.gluster.storage.management.console.dialogs.LoginDialog; -import com.gluster.storage.management.core.model.Entity; /** * This class controls all aspects of the application's execution */ public class Application implements IApplication { - public static final String PLUGIN_ID = "com.gluster.storage.management.console"; + public static final String PLUGIN_ID = "org.gluster.storage.management.console"; private static Application instance; private List<IEntityListener> entityListeners = Collections.synchronizedList(new ArrayList<IEntityListener>()); private IStatusLineManager statusLineManager; diff --git a/src/com.gluster.storage.management.console/src/com/gluster/storage/management/console/ApplicationActionBarAdvisor.java b/src/org.gluster.storage.management.console/src/org/gluster/storage/management/console/ApplicationActionBarAdvisor.java index e8d2dd8c..b77ddabd 100644 --- a/src/com.gluster.storage.management.console/src/com/gluster/storage/management/console/ApplicationActionBarAdvisor.java +++ b/src/org.gluster.storage.management.console/src/org/gluster/storage/management/console/ApplicationActionBarAdvisor.java @@ -1,22 +1,22 @@ /******************************************************************************* - * Copyright (c) 2011 Gluster, Inc. <http://www.gluster.com> + * Copyright (c) 2006-2011 Gluster, Inc. <http://www.gluster.com> * This file is part of Gluster Management Console. * - * Gluster Management Console is free software; you can redistribute it and/or - * modify it under the terms of the GNU Affero General Public License as published - * by the Free Software Foundation; either version 3 of the License, or - * (at your option) any later version. - * - * Gluster Management Console is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY - * or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Affero General Public License - * for more details. - * - * You should have received a copy of the GNU Affero General Public License - * along with this program. If not, see + * Gluster Management Console is free software; you can redistribute + * it and/or modify it under the terms of the GNU General Public + * License as published by the Free Software Foundation; either + * version 3 of the License, or (at your option) any later version. + * + * Gluster Management Console is distributed in the hope that it + * will be useful, but WITHOUT ANY WARRANTY; without even the + * implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR + * PURPOSE. See the GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program. If not, see * <http://www.gnu.org/licenses/>. *******************************************************************************/ -package com.gluster.storage.management.console; +package org.gluster.storage.management.console; import org.eclipse.jface.action.GroupMarker; import org.eclipse.jface.action.ICoolBarManager; @@ -32,14 +32,12 @@ import org.eclipse.ui.application.ActionBarAdvisor; import org.eclipse.ui.application.IActionBarConfigurer; import org.eclipse.ui.plugin.AbstractUIPlugin; -import com.gluster.storage.management.console.utils.GUIHelper; /** * An action bar advisor is responsible for creating, adding, and disposing of the actions added to a workbench window. * Each window will be populated with new actions. */ public class ApplicationActionBarAdvisor extends ActionBarAdvisor { - private IWorkbenchWindow window; /* * Actions - important to allocate these only in makeActions, and then use them in the fill methods. This ensures * that the actions aren't recreated when fillActionBars is called with FILL_PROXY. @@ -48,14 +46,12 @@ public class ApplicationActionBarAdvisor extends ActionBarAdvisor { private IWorkbenchAction aboutAction; private IWorkbenchAction helpContentsAction; - private GUIHelper guiHelper = GUIHelper.getInstance(); public ApplicationActionBarAdvisor(IActionBarConfigurer configurer) { super(configurer); } protected void makeActions(final IWorkbenchWindow window) { - this.window = window; /* * Creates the actions and registers them. Registering is needed to ensure that key bindings work. The * corresponding commands keybindings are defined in the plugin.xml file. Registering also provides automatic diff --git a/src/com.gluster.storage.management.console/src/com/gluster/storage/management/console/ApplicationWorkbenchAdvisor.java b/src/org.gluster.storage.management.console/src/org/gluster/storage/management/console/ApplicationWorkbenchAdvisor.java index e76503d5..9e00c196 100644 --- a/src/com.gluster.storage.management.console/src/com/gluster/storage/management/console/ApplicationWorkbenchAdvisor.java +++ b/src/org.gluster.storage.management.console/src/org/gluster/storage/management/console/ApplicationWorkbenchAdvisor.java @@ -1,22 +1,22 @@ /******************************************************************************* - * Copyright (c) 2011 Gluster, Inc. <http://www.gluster.com> + * Copyright (c) 2006-2011 Gluster, Inc. <http://www.gluster.com> * This file is part of Gluster Management Console. * - * Gluster Management Console is free software; you can redistribute it and/or - * modify it under the terms of the GNU Affero General Public License as published - * by the Free Software Foundation; either version 3 of the License, or - * (at your option) any later version. - * - * Gluster Management Console is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY - * or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Affero General Public License - * for more details. - * - * You should have received a copy of the GNU Affero General Public License - * along with this program. If not, see + * Gluster Management Console is free software; you can redistribute + * it and/or modify it under the terms of the GNU General Public + * License as published by the Free Software Foundation; either + * version 3 of the License, or (at your option) any later version. + * + * Gluster Management Console is distributed in the hope that it + * will be useful, but WITHOUT ANY WARRANTY; without even the + * implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR + * PURPOSE. See the GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program. If not, see * <http://www.gnu.org/licenses/>. *******************************************************************************/ -package com.gluster.storage.management.console; +package org.gluster.storage.management.console; import org.eclipse.core.runtime.jobs.IJobChangeEvent; import org.eclipse.core.runtime.jobs.Job; @@ -28,9 +28,9 @@ import org.eclipse.ui.application.IWorkbenchConfigurer; import org.eclipse.ui.application.IWorkbenchWindowConfigurer; import org.eclipse.ui.application.WorkbenchAdvisor; import org.eclipse.ui.application.WorkbenchWindowAdvisor; +import org.gluster.storage.management.console.jobs.DataSyncJob; +import org.gluster.storage.management.console.preferences.PreferenceConstants; -import com.gluster.storage.management.console.jobs.DataSyncJob; -import com.gluster.storage.management.console.preferences.PreferenceConstants; /** * This workbench advisor creates the window advisor, and specifies @@ -65,7 +65,7 @@ public class ApplicationWorkbenchAdvisor extends WorkbenchAdvisor { @Override public void propertyChange(PropertyChangeEvent event) { if(event.getProperty().equals(PreferenceConstants.P_DATA_SYNC_INTERVAL)) { - JOB_INTERVAL = (Integer)event.getNewValue() * 1000l; + JOB_INTERVAL = (Integer)event.getNewValue() * 1000L; } } }; @@ -78,7 +78,7 @@ public class ApplicationWorkbenchAdvisor extends WorkbenchAdvisor { } private void setupBackgroundJobs() { - syncJob = new DataSyncJob("Cluster Data Sync"); + syncJob = new DataSyncJob("Retrieving Management Info"); syncJob.schedule(JOB_INTERVAL); syncJob.addJobChangeListener(new JobChangeAdapter() { @Override diff --git a/src/com.gluster.storage.management.console/src/com/gluster/storage/management/console/ApplicationWorkbenchWindowAdvisor.java b/src/org.gluster.storage.management.console/src/org/gluster/storage/management/console/ApplicationWorkbenchWindowAdvisor.java index 2411dcb5..e73197f5 100644 --- a/src/com.gluster.storage.management.console/src/com/gluster/storage/management/console/ApplicationWorkbenchWindowAdvisor.java +++ b/src/org.gluster.storage.management.console/src/org/gluster/storage/management/console/ApplicationWorkbenchWindowAdvisor.java @@ -1,30 +1,30 @@ /******************************************************************************* - * Copyright (c) 2011 Gluster, Inc. <http://www.gluster.com> + * Copyright (c) 2006-2011 Gluster, Inc. <http://www.gluster.com> * This file is part of Gluster Management Console. * - * Gluster Management Console is free software; you can redistribute it and/or - * modify it under the terms of the GNU Affero General Public License as published - * by the Free Software Foundation; either version 3 of the License, or - * (at your option) any later version. - * - * Gluster Management Console is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY - * or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Affero General Public License - * for more details. - * - * You should have received a copy of the GNU Affero General Public License - * along with this program. If not, see + * Gluster Management Console is free software; you can redistribute + * it and/or modify it under the terms of the GNU General Public + * License as published by the Free Software Foundation; either + * version 3 of the License, or (at your option) any later version. + * + * Gluster Management Console is distributed in the hope that it + * will be useful, but WITHOUT ANY WARRANTY; without even the + * implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR + * PURPOSE. See the GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program. If not, see * <http://www.gnu.org/licenses/>. *******************************************************************************/ -package com.gluster.storage.management.console; +package org.gluster.storage.management.console; import org.eclipse.swt.graphics.Point; import org.eclipse.ui.application.ActionBarAdvisor; import org.eclipse.ui.application.IActionBarConfigurer; import org.eclipse.ui.application.IWorkbenchWindowConfigurer; import org.eclipse.ui.application.WorkbenchWindowAdvisor; +import org.gluster.storage.management.console.utils.GUIHelper; -import com.gluster.storage.management.console.utils.GUIHelper; public class ApplicationWorkbenchWindowAdvisor extends WorkbenchWindowAdvisor { private final static int DEFAULT_WIDTH = 1024; diff --git a/src/com.gluster.storage.management.console/src/com/gluster/storage/management/console/BrickTableLabelProvider.java b/src/org.gluster.storage.management.console/src/org/gluster/storage/management/console/BrickTableLabelProvider.java index 4796578e..d01f9041 100644 --- a/src/com.gluster.storage.management.console/src/com/gluster/storage/management/console/BrickTableLabelProvider.java +++ b/src/org.gluster.storage.management.console/src/org/gluster/storage/management/console/BrickTableLabelProvider.java @@ -1,32 +1,32 @@ /******************************************************************************* - * Copyright (c) 2011 Gluster, Inc. <http://www.gluster.com> + * Copyright (c) 2006-2011 Gluster, Inc. <http://www.gluster.com> * This file is part of Gluster Management Console. * - * Gluster Management Console is free software; you can redistribute it and/or - * modify it under the terms of the GNU Affero General Public License as published - * by the Free Software Foundation; either version 3 of the License, or - * (at your option) any later version. - * - * Gluster Management Console is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY - * or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Affero General Public License - * for more details. - * - * You should have received a copy of the GNU Affero General Public License - * along with this program. If not, see + * Gluster Management Console is free software; you can redistribute + * it and/or modify it under the terms of the GNU General Public + * License as published by the Free Software Foundation; either + * version 3 of the License, or (at your option) any later version. + * + * Gluster Management Console is distributed in the hope that it + * will be useful, but WITHOUT ANY WARRANTY; without even the + * implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR + * PURPOSE. See the GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program. If not, see * <http://www.gnu.org/licenses/>. *******************************************************************************/ -package com.gluster.storage.management.console; +package org.gluster.storage.management.console; import org.eclipse.swt.graphics.Image; +import org.gluster.storage.management.console.utils.GUIHelper; +import org.gluster.storage.management.console.views.pages.BricksPage.BRICK_TABLE_COLUMN_INDICES; +import org.gluster.storage.management.console.views.pages.DisksPage.DISK_TABLE_COLUMN_INDICES; +import org.gluster.storage.management.core.model.Brick; +import org.gluster.storage.management.core.model.Device; +import org.gluster.storage.management.core.model.Brick.BRICK_STATUS; +import org.gluster.storage.management.core.utils.NumberUtil; -import com.gluster.storage.management.console.utils.GUIHelper; -import com.gluster.storage.management.console.views.pages.BricksPage.BRICK_TABLE_COLUMN_INDICES; -import com.gluster.storage.management.console.views.pages.DisksPage.DISK_TABLE_COLUMN_INDICES; -import com.gluster.storage.management.core.model.Brick; -import com.gluster.storage.management.core.model.Brick.BRICK_STATUS; -import com.gluster.storage.management.core.model.Device; -import com.gluster.storage.management.core.utils.NumberUtil; public class BrickTableLabelProvider extends TableLabelProviderAdapter { private GUIHelper guiHelper = GUIHelper.getInstance(); diff --git a/src/org.gluster.storage.management.console/src/org/gluster/storage/management/console/ConsoleConstants.java b/src/org.gluster.storage.management.console/src/org/gluster/storage/management/console/ConsoleConstants.java new file mode 100644 index 00000000..76aa2e2f --- /dev/null +++ b/src/org.gluster.storage.management.console/src/org/gluster/storage/management/console/ConsoleConstants.java @@ -0,0 +1,29 @@ +/******************************************************************************* + * Copyright (c) 2006-2011 Gluster, Inc. <http://www.gluster.com> + * This file is part of Gluster Management Console. + * + * Gluster Management Console is free software; you can redistribute + * it and/or modify it under the terms of the GNU General Public + * License as published by the Free Software Foundation; either + * version 3 of the License, or (at your option) any later version. + * + * Gluster Management Console is distributed in the hope that it + * will be useful, but WITHOUT ANY WARRANTY; without even the + * implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR + * PURPOSE. See the GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program. If not, see + * <http://www.gnu.org/licenses/>. + *******************************************************************************/ +package org.gluster.storage.management.console; + +/** + * + */ +public class ConsoleConstants { + public static final String CONSOLE_TITLE = "Gluster Management Console"; + public static final String TERMINAL_VIEW_ID = "org.eclipse.tm.terminal.view.TerminalView"; + public static final String PROPERTY_AUTO_LOGIN_PASSWORD = "auto.login.password"; + public static final String PROPERTY_AUTO_CLUSTER_NAME = "auto.cluster.name"; +} diff --git a/src/com.gluster.storage.management.console/src/com/gluster/storage/management/console/DeviceTableLabelProvider.java b/src/org.gluster.storage.management.console/src/org/gluster/storage/management/console/DeviceTableLabelProvider.java index 3d8fa432..073b022f 100644 --- a/src/com.gluster.storage.management.console/src/com/gluster/storage/management/console/DeviceTableLabelProvider.java +++ b/src/org.gluster.storage.management.console/src/org/gluster/storage/management/console/DeviceTableLabelProvider.java @@ -1,35 +1,35 @@ /******************************************************************************* - * Copyright (c) 2011 Gluster, Inc. <http://www.gluster.com> + * Copyright (c) 2006-2011 Gluster, Inc. <http://www.gluster.com> * This file is part of Gluster Management Console. * - * Gluster Management Console is free software; you can redistribute it and/or - * modify it under the terms of the GNU Affero General Public License as published - * by the Free Software Foundation; either version 3 of the License, or - * (at your option) any later version. - * - * Gluster Management Console is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY - * or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Affero General Public License - * for more details. - * - * You should have received a copy of the GNU Affero General Public License - * along with this program. If not, see + * Gluster Management Console is free software; you can redistribute + * it and/or modify it under the terms of the GNU General Public + * License as published by the Free Software Foundation; either + * version 3 of the License, or (at your option) any later version. + * + * Gluster Management Console is distributed in the hope that it + * will be useful, but WITHOUT ANY WARRANTY; without even the + * implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR + * PURPOSE. See the GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program. If not, see * <http://www.gnu.org/licenses/>. *******************************************************************************/ -package com.gluster.storage.management.console; +package org.gluster.storage.management.console; import org.eclipse.jface.resource.FontRegistry; import org.eclipse.jface.viewers.ITableLabelProvider; import org.eclipse.jface.viewers.LabelProvider; import org.eclipse.swt.graphics.Image; +import org.gluster.storage.management.console.utils.GUIHelper; +import org.gluster.storage.management.core.exceptions.GlusterRuntimeException; +import org.gluster.storage.management.core.model.Device; +import org.gluster.storage.management.core.model.Disk; +import org.gluster.storage.management.core.model.Partition; +import org.gluster.storage.management.core.model.Device.DEVICE_STATUS; +import org.gluster.storage.management.core.utils.NumberUtil; -import com.gluster.storage.management.console.utils.GUIHelper; -import com.gluster.storage.management.core.exceptions.GlusterRuntimeException; -import com.gluster.storage.management.core.model.Device; -import com.gluster.storage.management.core.model.Device.DEVICE_STATUS; -import com.gluster.storage.management.core.model.Disk; -import com.gluster.storage.management.core.model.Partition; -import com.gluster.storage.management.core.utils.NumberUtil; public class DeviceTableLabelProvider extends LabelProvider implements ITableLabelProvider { diff --git a/src/com.gluster.storage.management.console/src/com/gluster/storage/management/console/EntityGroupContentProvider.java b/src/org.gluster.storage.management.console/src/org/gluster/storage/management/console/EntityGroupContentProvider.java index 9035e4e2..88c4d9b8 100644 --- a/src/com.gluster.storage.management.console/src/com/gluster/storage/management/console/EntityGroupContentProvider.java +++ b/src/org.gluster.storage.management.console/src/org/gluster/storage/management/console/EntityGroupContentProvider.java @@ -1,27 +1,27 @@ /******************************************************************************* - * Copyright (c) 2011 Gluster, Inc. <http://www.gluster.com> + * Copyright (c) 2006-2011 Gluster, Inc. <http://www.gluster.com> * This file is part of Gluster Management Console. * - * Gluster Management Console is free software; you can redistribute it and/or - * modify it under the terms of the GNU Affero General Public License as published - * by the Free Software Foundation; either version 3 of the License, or - * (at your option) any later version. - * - * Gluster Management Console is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY - * or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Affero General Public License - * for more details. - * - * You should have received a copy of the GNU Affero General Public License - * along with this program. If not, see + * Gluster Management Console is free software; you can redistribute + * it and/or modify it under the terms of the GNU General Public + * License as published by the Free Software Foundation; either + * version 3 of the License, or (at your option) any later version. + * + * Gluster Management Console is distributed in the hope that it + * will be useful, but WITHOUT ANY WARRANTY; without even the + * implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR + * PURPOSE. See the GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program. If not, see * <http://www.gnu.org/licenses/>. *******************************************************************************/ -package com.gluster.storage.management.console; +package org.gluster.storage.management.console; import org.eclipse.jface.viewers.IStructuredContentProvider; import org.eclipse.jface.viewers.Viewer; +import org.gluster.storage.management.core.model.EntityGroup; -import com.gluster.storage.management.core.model.EntityGroup; public class EntityGroupContentProvider<T> implements IStructuredContentProvider { diff --git a/src/com.gluster.storage.management.console/src/com/gluster/storage/management/console/GlusterDataModelManager.java b/src/org.gluster.storage.management.console/src/org/gluster/storage/management/console/GlusterDataModelManager.java index 82a24209..c9496aa6 100644 --- a/src/com.gluster.storage.management.console/src/com/gluster/storage/management/console/GlusterDataModelManager.java +++ b/src/org.gluster.storage.management.console/src/org/gluster/storage/management/console/GlusterDataModelManager.java @@ -1,22 +1,22 @@ /******************************************************************************* - * Copyright (c) 2011 Gluster, Inc. <http://www.gluster.com> + * Copyright (c) 2006-2011 Gluster, Inc. <http://www.gluster.com> * This file is part of Gluster Management Console. * - * Gluster Management Console is free software; you can redistribute it and/or - * modify it under the terms of the GNU Affero General Public License as published - * by the Free Software Foundation; either version 3 of the License, or - * (at your option) any later version. - * - * Gluster Management Console is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY - * or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Affero General Public License - * for more details. - * - * You should have received a copy of the GNU Affero General Public License - * along with this program. If not, see + * Gluster Management Console is free software; you can redistribute + * it and/or modify it under the terms of the GNU General Public + * License as published by the Free Software Foundation; either + * version 3 of the License, or (at your option) any later version. + * + * Gluster Management Console is distributed in the hope that it + * will be useful, but WITHOUT ANY WARRANTY; without even the + * implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR + * PURPOSE. See the GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program. If not, see * <http://www.gnu.org/licenses/>. *******************************************************************************/ -package com.gluster.storage.management.console; +package org.gluster.storage.management.console; import java.util.ArrayList; import java.util.List; @@ -26,41 +26,38 @@ import java.util.Set; import org.eclipse.core.runtime.IProgressMonitor; import org.eclipse.jface.preference.IPreferenceStore; +import org.gluster.storage.management.client.DiscoveredServersClient; +import org.gluster.storage.management.client.GlusterServersClient; +import org.gluster.storage.management.client.TasksClient; +import org.gluster.storage.management.client.VolumesClient; +import org.gluster.storage.management.console.preferences.PreferenceConstants; +import org.gluster.storage.management.console.utils.GlusterLogger; +import org.gluster.storage.management.core.constants.GlusterConstants; +import org.gluster.storage.management.core.exceptions.GlusterRuntimeException; +import org.gluster.storage.management.core.model.Alert; +import org.gluster.storage.management.core.model.Alert.ALERT_TYPES; +import org.gluster.storage.management.core.model.Brick; +import org.gluster.storage.management.core.model.Brick.BRICK_STATUS; +import org.gluster.storage.management.core.model.Cluster; +import org.gluster.storage.management.core.model.ClusterListener; +import org.gluster.storage.management.core.model.Device; +import org.gluster.storage.management.core.model.Device.DEVICE_STATUS; +import org.gluster.storage.management.core.model.Device.DEVICE_TYPE; +import org.gluster.storage.management.core.model.Disk; +import org.gluster.storage.management.core.model.Event; +import org.gluster.storage.management.core.model.Event.EVENT_TYPE; +import org.gluster.storage.management.core.model.GlusterDataModel; +import org.gluster.storage.management.core.model.GlusterServer; +import org.gluster.storage.management.core.model.Partition; +import org.gluster.storage.management.core.model.Server; +import org.gluster.storage.management.core.model.TaskInfo; +import org.gluster.storage.management.core.model.Volume; +import org.gluster.storage.management.core.model.Volume.TRANSPORT_TYPE; +import org.gluster.storage.management.core.model.Volume.VOLUME_STATUS; +import org.gluster.storage.management.core.model.Volume.VOLUME_TYPE; +import org.gluster.storage.management.core.model.VolumeOptionInfo; +import org.gluster.storage.management.core.utils.GlusterCoreUtil; -import com.gluster.storage.management.client.DiscoveredServersClient; -import com.gluster.storage.management.client.GlusterServersClient; -import com.gluster.storage.management.client.TasksClient; -import com.gluster.storage.management.client.VolumesClient; -import com.gluster.storage.management.console.preferences.PreferenceConstants; -import com.gluster.storage.management.console.utils.GlusterLogger; -import com.gluster.storage.management.core.constants.GlusterConstants; -import com.gluster.storage.management.core.exceptions.GlusterRuntimeException; -import com.gluster.storage.management.core.model.Alert; -import com.gluster.storage.management.core.model.Alert.ALERT_TYPES; -import com.gluster.storage.management.core.model.Brick; -import com.gluster.storage.management.core.model.Brick.BRICK_STATUS; -import com.gluster.storage.management.core.model.Cluster; -import com.gluster.storage.management.core.model.ClusterListener; -import com.gluster.storage.management.core.model.Device; -import com.gluster.storage.management.core.model.Device.DEVICE_STATUS; -import com.gluster.storage.management.core.model.Device.DEVICE_TYPE; -import com.gluster.storage.management.core.model.Disk; -import com.gluster.storage.management.core.model.Event; -import com.gluster.storage.management.core.model.Event.EVENT_TYPE; -import com.gluster.storage.management.core.model.GlusterDataModel; -import com.gluster.storage.management.core.model.GlusterServer; -import com.gluster.storage.management.core.model.Partition; -import com.gluster.storage.management.core.model.Server; -import com.gluster.storage.management.core.model.Status; -import com.gluster.storage.management.core.model.TaskInfo; -import com.gluster.storage.management.core.model.TaskInfo.TASK_TYPE; -import com.gluster.storage.management.core.model.TaskStatus; -import com.gluster.storage.management.core.model.Volume; -import com.gluster.storage.management.core.model.Volume.TRANSPORT_TYPE; -import com.gluster.storage.management.core.model.Volume.VOLUME_STATUS; -import com.gluster.storage.management.core.model.Volume.VOLUME_TYPE; -import com.gluster.storage.management.core.model.VolumeOptionInfo; -import com.gluster.storage.management.core.utils.GlusterCoreUtil; public class GlusterDataModelManager { private static GlusterDataModelManager instance = new GlusterDataModelManager(); @@ -331,7 +328,7 @@ public class GlusterDataModelManager { device.setStatus(status); device.setType(DEVICE_TYPE.DATA); for (ClusterListener listener : listeners) { - listener.serverChanged((GlusterServer) server, new Event(EVENT_TYPE.DEVICES_CHANGED, device)); + listener.serverChanged(server, new Event(EVENT_TYPE.DEVICES_CHANGED, device)); } } } @@ -408,6 +405,11 @@ public class GlusterDataModelManager { public void volumeChanged(Volume oldVolume, Volume newVolume) { oldVolume.copyFrom(newVolume); + + if (oldVolume.getStatus() != newVolume.getStatus()) { + updateVolumeStatusAlert(newVolume, newVolume.getStatus()); + } + for (ClusterListener listener : listeners) { listener.volumeChanged(oldVolume, new Event(EVENT_TYPE.VOLUME_CHANGED, newVolume)); } @@ -480,79 +482,6 @@ public class GlusterDataModelManager { cluster.setAggregatedNetworkStats(new GlusterServersClient().getAggregatedNetworkStats(networkStatsPeriod)); } - private List<TaskInfo> getDummyTasks() { - List<TaskInfo> taskInfoList = new ArrayList<TaskInfo>(); - - // Task #1 - TaskInfo taskInfo = new TaskInfo(); - taskInfo.setType(TASK_TYPE.BRICK_MIGRATE); - taskInfo.setName("Migrate Brick-music"); - taskInfo.setPauseSupported(true); - taskInfo.setStopSupported(true); - taskInfo.setStatus(new TaskStatus(new Status(Status.STATUS_CODE_PAUSE, ""))); - - taskInfo.getStatus().setMessage("Paused"); - taskInfo.setDescription("Migrate Brick on volume [Movies] from /export/adb/music to /export/sdc/music."); - taskInfoList.add(taskInfo); - - // Task #2 - taskInfo = new TaskInfo(); - taskInfo.setType(TASK_TYPE.DISK_FORMAT); - taskInfo.setName("Initialize disk [KVM-GVSA1:sdc]"); - taskInfo.setPauseSupported(false); - taskInfo.setStopSupported(false); - taskInfo.setStatus( new TaskStatus(new Status(Status.STATUS_CODE_RUNNING, ""))); - taskInfo.getStatus().setMessage("Format completed 80% ..."); - taskInfo.setDescription("Formatting disk [KVM-GVSA1:sdc]"); - taskInfoList.add(taskInfo); - - // Task #2 - taskInfo = new TaskInfo(); - taskInfo.setType(TASK_TYPE.VOLUME_REBALANCE); - taskInfo.setName("Rebalance volume [songs]"); - taskInfo.setPauseSupported(false); - taskInfo.setStopSupported(false); - taskInfo.setStatus( new TaskStatus(new Status(Status.STATUS_CODE_RUNNING, ""))); - taskInfo.getStatus().setMessage("Rebalance step1: layout fix in progress"); - taskInfo.setDescription("Rebalance volume [songs]"); - taskInfoList.add(taskInfo); - - return taskInfoList; - } - - private List<Alert> getDummyAlerts(Cluster cluster) { - List<Alert> alerts = new ArrayList<Alert>(); - for (Server server : cluster.getServers()) { - if (alerts.size() == 0) { - alerts.add(new Alert(ALERT_TYPES.CPU_USAGE_ALERT, server.getName(), - Alert.ALERT_TYPE_STR[ALERT_TYPES.CPU_USAGE_ALERT.ordinal()] + " [93.42 %] in " - + server.getName())); - continue; - } - - if (alerts.size() == 1) { - alerts.add(new Alert(ALERT_TYPES.MEMORY_USAGE_ALERT, server.getName(), - Alert.ALERT_TYPE_STR[ALERT_TYPES.MEMORY_USAGE_ALERT.ordinal()] + " [91.83 %] in " - + server.getName())); - continue; - } - - if (alerts.size() == 2) { - alerts.add(new Alert(ALERT_TYPES.OFFLINE_SERVERS_ALERT, server.getName(), - Alert.ALERT_TYPE_STR[ALERT_TYPES.OFFLINE_SERVERS_ALERT.ordinal()] + " " + server.getName())); - continue; - } - - if (alerts.size() == 3) { - alerts.add(new Alert(ALERT_TYPES.OFFLINE_VOLUME_BRICKS_ALERT, "songs", - Alert.ALERT_TYPE_STR[ALERT_TYPES.OFFLINE_VOLUME_BRICKS_ALERT.ordinal()] - + " [KVM-GVSA4:/export/hdb4/songs] in volume [songs]")); - continue; - } - } - return alerts; - } - public void initializeAlerts(Cluster cluster) { AlertsManager alertsManager = new AlertsManager(cluster); alertsManager.buildAlerts(); @@ -676,7 +605,7 @@ public class GlusterDataModelManager { cluster.addDiscoveredServer(server); for (ClusterListener listener : listeners) { - listener.discoveredServerAdded(server);; + listener.discoveredServerAdded(server); } } @@ -746,12 +675,16 @@ public class GlusterDataModelManager { public void updateVolumeStatus(Volume volume, VOLUME_STATUS newStatus) { volume.setStatus(newStatus); + updateVolumeStatusAlert(volume, newStatus); if(newStatus == VOLUME_STATUS.OFFLINE) { // mark as bricks also as offline for(Brick brick : volume.getBricks()) { brick.setStatus(BRICK_STATUS.OFFLINE); } + for (ClusterListener listener : listeners) { + listener.volumeChanged(volume, new Event(EVENT_TYPE.BRICKS_CHANGED, volume.getBricks())); + } } else { Volume newVolume = new VolumesClient().getVolume(volume.getName()); //Getting latest brick info updateBricks(volume, volume.getBricks(), newVolume.getBricks()); @@ -759,9 +692,44 @@ public class GlusterDataModelManager { for (ClusterListener listener : listeners) { listener.volumeChanged(volume, new Event(EVENT_TYPE.VOLUME_STATUS_CHANGED, newStatus)); - listener.volumeChanged(volume, new Event(EVENT_TYPE.BRICKS_CHANGED, volume.getBricks())); } } + + private void updateVolumeStatusAlert(Volume volume, VOLUME_STATUS newStatus) { + Alert alert = null; + if (newStatus == VOLUME_STATUS.OFFLINE) { + alert = createOfflineVolumeAlert(volume); + for (ClusterListener listener : listeners) { + listener.alertCreated(alert); + } + } else { + alert = removeOfflineVolumeAlert(volume); + for (ClusterListener listener : listeners) { + listener.alertRemoved(alert); + } + } + } + + private Alert createOfflineVolumeAlert(Volume volume) { + Alert alert = new Alert(ALERT_TYPES.OFFLINE_VOLUME_ALERT, volume.getName(), + Alert.ALERT_TYPE_STR[ALERT_TYPES.OFFLINE_VOLUME_ALERT.ordinal()] + " [" + volume.getName() + "]"); + getModel().getCluster().addAlert(alert); + return alert; + } + + private Alert removeOfflineVolumeAlert(Volume volume) { + List<Alert> clusterAlerts = getModel().getCluster().getAlerts(); + Alert removedAlert = null; + for (Alert alert : clusterAlerts) { + if (alert.getType().equals(ALERT_TYPES.OFFLINE_VOLUME_ALERT) + && alert.getReference().equals(volume.getName())) { + removedAlert = alert; + clusterAlerts.remove(alert); + break; + } + } + return removedAlert; + } public void resetVolumeOptions(Volume volume) { volume.getOptions().clear(); @@ -969,4 +937,24 @@ public class GlusterDataModelManager { } return volumeNames; } + + public List<String> getOfflineServers() { + List<String> offlineServers = new ArrayList<String>(); + for(GlusterServer server : model.getCluster().getServers()) { + if (!server.isOnline()) { + offlineServers.add(server.getName()); + } + } + return offlineServers; + } + + public List<String> getCifsEnabledVolumeNames(List<Volume> selectedVolumes) { + List<String> cifsVolumes = new ArrayList<String>(); + for(Volume volume : selectedVolumes) { + if (volume.isCifsEnable()) { + cifsVolumes.add(volume.getName()); + } + } + return cifsVolumes; + } } diff --git a/src/com.gluster.storage.management.console/src/com/gluster/storage/management/console/GlusterServerTableLabelProvider.java b/src/org.gluster.storage.management.console/src/org/gluster/storage/management/console/GlusterServerTableLabelProvider.java index 71d252ef..4defc221 100644 --- a/src/com.gluster.storage.management.console/src/com/gluster/storage/management/console/GlusterServerTableLabelProvider.java +++ b/src/org.gluster.storage.management.console/src/org/gluster/storage/management/console/GlusterServerTableLabelProvider.java @@ -1,30 +1,30 @@ /******************************************************************************* - * Copyright (c) 2011 Gluster, Inc. <http://www.gluster.com> + * Copyright (c) 2006-2011 Gluster, Inc. <http://www.gluster.com> * This file is part of Gluster Management Console. * - * Gluster Management Console is free software; you can redistribute it and/or - * modify it under the terms of the GNU Affero General Public License as published - * by the Free Software Foundation; either version 3 of the License, or - * (at your option) any later version. - * - * Gluster Management Console is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY - * or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Affero General Public License - * for more details. - * - * You should have received a copy of the GNU Affero General Public License - * along with this program. If not, see + * Gluster Management Console is free software; you can redistribute + * it and/or modify it under the terms of the GNU General Public + * License as published by the Free Software Foundation; either + * version 3 of the License, or (at your option) any later version. + * + * Gluster Management Console is distributed in the hope that it + * will be useful, but WITHOUT ANY WARRANTY; without even the + * implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR + * PURPOSE. See the GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program. If not, see * <http://www.gnu.org/licenses/>. *******************************************************************************/ -package com.gluster.storage.management.console; +package org.gluster.storage.management.console; import org.eclipse.swt.graphics.Image; +import org.gluster.storage.management.console.utils.GUIHelper; +import org.gluster.storage.management.console.views.pages.GlusterServersPage.GLUSTER_SERVER_TABLE_COLUMN_INDICES; +import org.gluster.storage.management.core.model.GlusterServer; +import org.gluster.storage.management.core.model.Server.SERVER_STATUS; +import org.gluster.storage.management.core.utils.NumberUtil; -import com.gluster.storage.management.console.utils.GUIHelper; -import com.gluster.storage.management.console.views.pages.GlusterServersPage.GLUSTER_SERVER_TABLE_COLUMN_INDICES; -import com.gluster.storage.management.core.model.GlusterServer; -import com.gluster.storage.management.core.model.Server.SERVER_STATUS; -import com.gluster.storage.management.core.utils.NumberUtil; public class GlusterServerTableLabelProvider extends TableLabelProviderAdapter { private GUIHelper guiHelper = GUIHelper.getInstance(); diff --git a/src/org.gluster.storage.management.console/src/org/gluster/storage/management/console/ICommandIds.java b/src/org.gluster.storage.management.console/src/org/gluster/storage/management/console/ICommandIds.java new file mode 100644 index 00000000..034042e9 --- /dev/null +++ b/src/org.gluster.storage.management.console/src/org/gluster/storage/management/console/ICommandIds.java @@ -0,0 +1,33 @@ +/******************************************************************************* + * Copyright (c) 2006-2011 Gluster, Inc. <http://www.gluster.com> + * This file is part of Gluster Management Console. + * + * Gluster Management Console is free software; you can redistribute + * it and/or modify it under the terms of the GNU General Public + * License as published by the Free Software Foundation; either + * version 3 of the License, or (at your option) any later version. + * + * Gluster Management Console is distributed in the hope that it + * will be useful, but WITHOUT ANY WARRANTY; without even the + * implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR + * PURPOSE. See the GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program. If not, see + * <http://www.gnu.org/licenses/>. + *******************************************************************************/ +package org.gluster.storage.management.console; + +/** + * Interface defining the application's command IDs. + * Key bindings can be defined for specific commands. + * To associate an action with a command, use IAction.setActionDefinitionId(commandId). + * + * @see org.eclipse.jface.action.IAction#setActionDefinitionId(String) + */ +public interface ICommandIds { + + public static final String CMD_OPEN = "org.gluster.storage.management.console.open"; + public static final String CMD_OPEN_MESSAGE = "org.gluster.storage.management.console.openMessage"; + +} diff --git a/src/com.gluster.storage.management.console/src/com/gluster/storage/management/console/IEntityListener.java b/src/org.gluster.storage.management.console/src/org/gluster/storage/management/console/IEntityListener.java index 91d90afe..2ea59eed 100644 --- a/src/com.gluster.storage.management.console/src/com/gluster/storage/management/console/IEntityListener.java +++ b/src/org.gluster.storage.management.console/src/org/gluster/storage/management/console/IEntityListener.java @@ -1,24 +1,24 @@ /******************************************************************************* - * Copyright (c) 2011 Gluster, Inc. <http://www.gluster.com> + * Copyright (c) 2006-2011 Gluster, Inc. <http://www.gluster.com> * This file is part of Gluster Management Console. * - * Gluster Management Console is free software; you can redistribute it and/or - * modify it under the terms of the GNU Affero General Public License as published - * by the Free Software Foundation; either version 3 of the License, or - * (at your option) any later version. - * - * Gluster Management Console is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY - * or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Affero General Public License - * for more details. - * - * You should have received a copy of the GNU Affero General Public License - * along with this program. If not, see + * Gluster Management Console is free software; you can redistribute + * it and/or modify it under the terms of the GNU General Public + * License as published by the Free Software Foundation; either + * version 3 of the License, or (at your option) any later version. + * + * Gluster Management Console is distributed in the hope that it + * will be useful, but WITHOUT ANY WARRANTY; without even the + * implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR + * PURPOSE. See the GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program. If not, see * <http://www.gnu.org/licenses/>. *******************************************************************************/ -package com.gluster.storage.management.console; +package org.gluster.storage.management.console; -import com.gluster.storage.management.core.model.Entity; +import org.gluster.storage.management.core.model.Entity; /** * Any class that is interested in changes to entities in application scope should implement this interface and register diff --git a/src/com.gluster.storage.management.console/src/com/gluster/storage/management/console/IImageKeys.java b/src/org.gluster.storage.management.console/src/org/gluster/storage/management/console/IImageKeys.java index 89b19f3f..c1d7dd24 100644 --- a/src/com.gluster.storage.management.console/src/com/gluster/storage/management/console/IImageKeys.java +++ b/src/org.gluster.storage.management.console/src/org/gluster/storage/management/console/IImageKeys.java @@ -1,22 +1,22 @@ /******************************************************************************* - * Copyright (c) 2011 Gluster, Inc. <http://www.gluster.com> + * Copyright (c) 2006-2011 Gluster, Inc. <http://www.gluster.com> * This file is part of Gluster Management Console. * - * Gluster Management Console is free software; you can redistribute it and/or - * modify it under the terms of the GNU Affero General Public License as published - * by the Free Software Foundation; either version 3 of the License, or - * (at your option) any later version. - * - * Gluster Management Console is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY - * or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Affero General Public License - * for more details. - * - * You should have received a copy of the GNU Affero General Public License - * along with this program. If not, see + * Gluster Management Console is free software; you can redistribute + * it and/or modify it under the terms of the GNU General Public + * License as published by the Free Software Foundation; either + * version 3 of the License, or (at your option) any later version. + * + * Gluster Management Console is distributed in the hope that it + * will be useful, but WITHOUT ANY WARRANTY; without even the + * implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR + * PURPOSE. See the GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program. If not, see * <http://www.gnu.org/licenses/>. *******************************************************************************/ -package com.gluster.storage.management.console; +package org.gluster.storage.management.console; public interface IImageKeys { @@ -42,6 +42,7 @@ public interface IImageKeys { public static final String BRICKS_16x16 = "icons/tango/16x16/bricks.png"; public static final String BRICK_ONLINE_16x16 = "icons/tango/16x16/online-brick.png"; public static final String BRICK_OFFLINE_16x16 = "icons/tango/16x16/offline-brick.png"; + public static final String VOLUME_OFFLINE_22x22 = "icons/tango/22x22/offline-volume.png"; public static final String SERVERS_16x16 = "icons/tango/16x16/servers.png"; public static final String SERVER_16x16 = "icons/tango/16x16/server.png"; @@ -80,6 +81,7 @@ public interface IImageKeys { public static final String COMMIT_TASK_32x32 = "icons/tango/32x32/commit-task.png"; public static final String PAUSE_TASK_16x16 = "icons/tango/16x16/pause.png"; public static final String RESUME_TASK_16x16 = "icons/tango/16x16/start.png"; + public static final String ERROR_TASK_16x16 = "icons/tango/16x16/error.png"; public static final String STOP_TASK_16x16 = "icons/tango/16x16/stop.png"; public static final String CLEAR_TASK_16x16 = "icons/tango/16x16/close_task.png"; public static final String COMPLETED_TASK_16x16 = "icons/tango/16x16/task-completed.png"; diff --git a/src/com.gluster.storage.management.console/src/com/gluster/storage/management/console/NetworkInterfaceTableLabelProvider.java b/src/org.gluster.storage.management.console/src/org/gluster/storage/management/console/NetworkInterfaceTableLabelProvider.java index 54ed5349..ef04ec36 100644 --- a/src/com.gluster.storage.management.console/src/com/gluster/storage/management/console/NetworkInterfaceTableLabelProvider.java +++ b/src/org.gluster.storage.management.console/src/org/gluster/storage/management/console/NetworkInterfaceTableLabelProvider.java @@ -1,27 +1,28 @@ /******************************************************************************* - * Copyright (c) 2011 Gluster, Inc. <http://www.gluster.com> + * Copyright (c) 2006-2011 Gluster, Inc. <http://www.gluster.com> * This file is part of Gluster Management Console. * - * Gluster Management Console is free software; you can redistribute it and/or - * modify it under the terms of the GNU Affero General Public License as published - * by the Free Software Foundation; either version 3 of the License, or - * (at your option) any later version. - * - * Gluster Management Console is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY - * or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Affero General Public License - * for more details. - * - * You should have received a copy of the GNU Affero General Public License - * along with this program. If not, see + * Gluster Management Console is free software; you can redistribute + * it and/or modify it under the terms of the GNU General Public + * License as published by the Free Software Foundation; either + * version 3 of the License, or (at your option) any later version. + * + * Gluster Management Console is distributed in the hope that it + * will be useful, but WITHOUT ANY WARRANTY; without even the + * implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR + * PURPOSE. See the GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program. If not, see * <http://www.gnu.org/licenses/>. *******************************************************************************/ -package com.gluster.storage.management.console; +package org.gluster.storage.management.console; + +import org.gluster.storage.management.console.views.GlusterServerSummaryView.NETWORK_INTERFACE_TABLE_COLUMN_INDICES; +import org.gluster.storage.management.core.constants.CoreConstants; +import org.gluster.storage.management.core.model.NetworkInterface; -import com.gluster.storage.management.console.views.GlusterServerSummaryView.NETWORK_INTERFACE_TABLE_COLUMN_INDICES; -import com.gluster.storage.management.core.constants.CoreConstants; -import com.gluster.storage.management.core.model.NetworkInterface; public class NetworkInterfaceTableLabelProvider extends TableLabelProviderAdapter { @Override diff --git a/src/com.gluster.storage.management.console/src/com/gluster/storage/management/console/Perspective.java b/src/org.gluster.storage.management.console/src/org/gluster/storage/management/console/Perspective.java index 9593bb88..ff1cec08 100644 --- a/src/com.gluster.storage.management.console/src/com/gluster/storage/management/console/Perspective.java +++ b/src/org.gluster.storage.management.console/src/org/gluster/storage/management/console/Perspective.java @@ -1,22 +1,22 @@ /******************************************************************************* - * Copyright (c) 2011 Gluster, Inc. <http://www.gluster.com> + * Copyright (c) 2006-2011 Gluster, Inc. <http://www.gluster.com> * This file is part of Gluster Management Console. * - * Gluster Management Console is free software; you can redistribute it and/or - * modify it under the terms of the GNU Affero General Public License as published - * by the Free Software Foundation; either version 3 of the License, or - * (at your option) any later version. - * - * Gluster Management Console is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY - * or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Affero General Public License - * for more details. - * - * You should have received a copy of the GNU Affero General Public License - * along with this program. If not, see + * Gluster Management Console is free software; you can redistribute + * it and/or modify it under the terms of the GNU General Public + * License as published by the Free Software Foundation; either + * version 3 of the License, or (at your option) any later version. + * + * Gluster Management Console is distributed in the hope that it + * will be useful, but WITHOUT ANY WARRANTY; without even the + * implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR + * PURPOSE. See the GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program. If not, see * <http://www.gnu.org/licenses/>. *******************************************************************************/ -package com.gluster.storage.management.console; +package org.gluster.storage.management.console; import org.eclipse.ui.IPageLayout; import org.eclipse.ui.IPerspectiveFactory; diff --git a/src/com.gluster.storage.management.console/src/com/gluster/storage/management/console/ServerDiskTableLabelProvider.java b/src/org.gluster.storage.management.console/src/org/gluster/storage/management/console/ServerDiskTableLabelProvider.java index 2f49d2b3..3f888727 100644 --- a/src/com.gluster.storage.management.console/src/com/gluster/storage/management/console/ServerDiskTableLabelProvider.java +++ b/src/org.gluster.storage.management.console/src/org/gluster/storage/management/console/ServerDiskTableLabelProvider.java @@ -1,34 +1,35 @@ /******************************************************************************* - * Copyright (c) 2011 Gluster, Inc. <http://www.gluster.com> + * Copyright (c) 2006-2011 Gluster, Inc. <http://www.gluster.com> * This file is part of Gluster Management Console. * - * Gluster Management Console is free software; you can redistribute it and/or - * modify it under the terms of the GNU Affero General Public License as published - * by the Free Software Foundation; either version 3 of the License, or - * (at your option) any later version. - * - * Gluster Management Console is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY - * or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Affero General Public License - * for more details. - * - * You should have received a copy of the GNU Affero General Public License - * along with this program. If not, see + * Gluster Management Console is free software; you can redistribute + * it and/or modify it under the terms of the GNU General Public + * License as published by the Free Software Foundation; either + * version 3 of the License, or (at your option) any later version. + * + * Gluster Management Console is distributed in the hope that it + * will be useful, but WITHOUT ANY WARRANTY; without even the + * implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR + * PURPOSE. See the GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program. If not, see * <http://www.gnu.org/licenses/>. *******************************************************************************/ -package com.gluster.storage.management.console; +package org.gluster.storage.management.console; import org.eclipse.swt.graphics.Image; +import org.gluster.storage.management.console.utils.GUIHelper; +import org.gluster.storage.management.console.views.pages.ServerDisksPage.SERVER_DISK_TABLE_COLUMN_INDICES; +import org.gluster.storage.management.core.exceptions.GlusterRuntimeException; +import org.gluster.storage.management.core.model.Device; +import org.gluster.storage.management.core.model.Disk; +import org.gluster.storage.management.core.model.Partition; +import org.gluster.storage.management.core.model.Device.DEVICE_STATUS; +import org.gluster.storage.management.core.utils.NumberUtil; + +import static org.gluster.storage.management.console.DeviceTableLabelProvider.DEVICE_COLUMN_INDICES; -import com.gluster.storage.management.console.DeviceTableLabelProvider.DEVICE_COLUMN_INDICES; -import com.gluster.storage.management.console.utils.GUIHelper; -import com.gluster.storage.management.console.views.pages.ServerDisksPage.SERVER_DISK_TABLE_COLUMN_INDICES; -import com.gluster.storage.management.core.exceptions.GlusterRuntimeException; -import com.gluster.storage.management.core.model.Device; -import com.gluster.storage.management.core.model.Device.DEVICE_STATUS; -import com.gluster.storage.management.core.model.Disk; -import com.gluster.storage.management.core.model.Partition; -import com.gluster.storage.management.core.utils.NumberUtil; public class ServerDiskTableLabelProvider extends TableLabelProviderAdapter { private GUIHelper guiHelper = GUIHelper.getInstance(); diff --git a/src/com.gluster.storage.management.console/src/com/gluster/storage/management/console/ServerTableLabelProvider.java b/src/org.gluster.storage.management.console/src/org/gluster/storage/management/console/ServerTableLabelProvider.java index eccf67ec..6210005e 100644 --- a/src/com.gluster.storage.management.console/src/com/gluster/storage/management/console/ServerTableLabelProvider.java +++ b/src/org.gluster.storage.management.console/src/org/gluster/storage/management/console/ServerTableLabelProvider.java @@ -1,30 +1,29 @@ /******************************************************************************* - * Copyright (c) 2011 Gluster, Inc. <http://www.gluster.com> + * Copyright (c) 2006-2011 Gluster, Inc. <http://www.gluster.com> * This file is part of Gluster Management Console. * - * Gluster Management Console is free software; you can redistribute it and/or - * modify it under the terms of the GNU Affero General Public License as published - * by the Free Software Foundation; either version 3 of the License, or - * (at your option) any later version. - * - * Gluster Management Console is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY - * or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Affero General Public License - * for more details. - * - * You should have received a copy of the GNU Affero General Public License - * along with this program. If not, see + * Gluster Management Console is free software; you can redistribute + * it and/or modify it under the terms of the GNU General Public + * License as published by the Free Software Foundation; either + * version 3 of the License, or (at your option) any later version. + * + * Gluster Management Console is distributed in the hope that it + * will be useful, but WITHOUT ANY WARRANTY; without even the + * implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR + * PURPOSE. See the GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program. If not, see * <http://www.gnu.org/licenses/>. *******************************************************************************/ -package com.gluster.storage.management.console; +package org.gluster.storage.management.console; + +import org.gluster.storage.management.console.views.pages.ServersPage.SERVER_TABLE_COLUMN_INDICES; +import org.gluster.storage.management.core.model.Server; +import org.gluster.storage.management.core.utils.NumberUtil; -import com.gluster.storage.management.console.utils.GUIHelper; -import com.gluster.storage.management.console.views.pages.ServersPage.SERVER_TABLE_COLUMN_INDICES; -import com.gluster.storage.management.core.model.Server; -import com.gluster.storage.management.core.utils.NumberUtil; public class ServerTableLabelProvider extends TableLabelProviderAdapter { - private GUIHelper guiHelper = GUIHelper.getInstance(); @Override public String getColumnText(Object element, int columnIndex) { diff --git a/src/com.gluster.storage.management.console/src/com/gluster/storage/management/console/TableLabelProviderAdapter.java b/src/org.gluster.storage.management.console/src/org/gluster/storage/management/console/TableLabelProviderAdapter.java index 5c527082..4a68934a 100644 --- a/src/com.gluster.storage.management.console/src/com/gluster/storage/management/console/TableLabelProviderAdapter.java +++ b/src/org.gluster.storage.management.console/src/org/gluster/storage/management/console/TableLabelProviderAdapter.java @@ -1,22 +1,22 @@ /******************************************************************************* - * Copyright (c) 2011 Gluster, Inc. <http://www.gluster.com> + * Copyright (c) 2006-2011 Gluster, Inc. <http://www.gluster.com> * This file is part of Gluster Management Console. * - * Gluster Management Console is free software; you can redistribute it and/or - * modify it under the terms of the GNU Affero General Public License as published - * by the Free Software Foundation; either version 3 of the License, or - * (at your option) any later version. - * - * Gluster Management Console is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY - * or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Affero General Public License - * for more details. - * - * You should have received a copy of the GNU Affero General Public License - * along with this program. If not, see + * Gluster Management Console is free software; you can redistribute + * it and/or modify it under the terms of the GNU General Public + * License as published by the Free Software Foundation; either + * version 3 of the License, or (at your option) any later version. + * + * Gluster Management Console is distributed in the hope that it + * will be useful, but WITHOUT ANY WARRANTY; without even the + * implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR + * PURPOSE. See the GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program. If not, see * <http://www.gnu.org/licenses/>. *******************************************************************************/ -package com.gluster.storage.management.console; +package org.gluster.storage.management.console; import org.eclipse.jface.viewers.ILabelProviderListener; import org.eclipse.jface.viewers.ITableLabelProvider; diff --git a/src/com.gluster.storage.management.console/src/com/gluster/storage/management/console/TasksTableLabelProvider.java b/src/org.gluster.storage.management.console/src/org/gluster/storage/management/console/TasksTableLabelProvider.java index 66fbefd3..72f25561 100644 --- a/src/com.gluster.storage.management.console/src/com/gluster/storage/management/console/TasksTableLabelProvider.java +++ b/src/org.gluster.storage.management.console/src/org/gluster/storage/management/console/TasksTableLabelProvider.java @@ -1,31 +1,29 @@ -/** - * TasksTableLabelProvider.java - * - * Copyright (c) 2011 Gluster, Inc. <http://www.gluster.com> +/******************************************************************************* + * Copyright (c) 2006-2011 Gluster, Inc. <http://www.gluster.com> * This file is part of Gluster Management Console. * - * Gluster Management Console is free software; you can redistribute it and/or - * modify it under the terms of the GNU Affero General Public License as published - * by the Free Software Foundation; either version 3 of the License, or - * (at your option) any later version. + * Gluster Management Console is free software; you can redistribute + * it and/or modify it under the terms of the GNU General Public + * License as published by the Free Software Foundation; either + * version 3 of the License, or (at your option) any later version. * - * Gluster Management Console is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY - * or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Affero General Public License - * for more details. + * Gluster Management Console is distributed in the hope that it + * will be useful, but WITHOUT ANY WARRANTY; without even the + * implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR + * PURPOSE. See the GNU General Public License for more details. * - * You should have received a copy of the GNU Affero General Public License - * along with this program. If not, see + * You should have received a copy of the GNU General Public License + * along with this program. If not, see * <http://www.gnu.org/licenses/>. - */ -package com.gluster.storage.management.console; + *******************************************************************************/ +package org.gluster.storage.management.console; import org.eclipse.swt.graphics.Image; +import org.gluster.storage.management.console.utils.GUIHelper; +import org.gluster.storage.management.console.views.pages.TasksPage.TASK_TABLE_COLUMN_INDICES; +import org.gluster.storage.management.core.model.Status; +import org.gluster.storage.management.core.model.TaskInfo; -import com.gluster.storage.management.console.utils.GUIHelper; -import com.gluster.storage.management.console.views.pages.TasksPage.TASK_TABLE_COLUMN_INDICES; -import com.gluster.storage.management.core.model.Status; -import com.gluster.storage.management.core.model.TaskInfo; public class TasksTableLabelProvider extends TableLabelProviderAdapter { @@ -50,7 +48,9 @@ public class TasksTableLabelProvider extends TableLabelProviderAdapter { case Status.STATUS_CODE_RUNNING: return guiHelper.getImage(IImageKeys.RESUME_TASK_16x16); case Status.STATUS_CODE_FAILURE: - return guiHelper.getImage(IImageKeys.STATUS_OFFLINE_16x16); + return guiHelper.getImage(IImageKeys.STATUS_OFFLINE_16x16); + case Status.STATUS_CODE_ERROR: + return guiHelper.getImage(IImageKeys.ERROR_TASK_16x16); default: break; } diff --git a/src/com.gluster.storage.management.console/src/com/gluster/storage/management/console/VolumeLogTableLabelProvider.java b/src/org.gluster.storage.management.console/src/org/gluster/storage/management/console/VolumeLogTableLabelProvider.java index 07c5cc77..19e5d211 100644 --- a/src/com.gluster.storage.management.console/src/com/gluster/storage/management/console/VolumeLogTableLabelProvider.java +++ b/src/org.gluster.storage.management.console/src/org/gluster/storage/management/console/VolumeLogTableLabelProvider.java @@ -1,27 +1,28 @@ /******************************************************************************* - * Copyright (c) 2011 Gluster, Inc. <http://www.gluster.com> + * Copyright (c) 2006-2011 Gluster, Inc. <http://www.gluster.com> * This file is part of Gluster Management Console. * - * Gluster Management Console is free software; you can redistribute it and/or - * modify it under the terms of the GNU Affero General Public License as published - * by the Free Software Foundation; either version 3 of the License, or - * (at your option) any later version. - * - * Gluster Management Console is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY - * or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Affero General Public License - * for more details. - * - * You should have received a copy of the GNU Affero General Public License - * along with this program. If not, see + * Gluster Management Console is free software; you can redistribute + * it and/or modify it under the terms of the GNU General Public + * License as published by the Free Software Foundation; either + * version 3 of the License, or (at your option) any later version. + * + * Gluster Management Console is distributed in the hope that it + * will be useful, but WITHOUT ANY WARRANTY; without even the + * implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR + * PURPOSE. See the GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program. If not, see * <http://www.gnu.org/licenses/>. *******************************************************************************/ -package com.gluster.storage.management.console; +package org.gluster.storage.management.console; + +import org.gluster.storage.management.console.views.pages.VolumeLogsPage.LOG_TABLE_COLUMN_INDICES; +import org.gluster.storage.management.core.model.VolumeLogMessage; +import org.gluster.storage.management.core.utils.DateUtil; -import com.gluster.storage.management.console.views.pages.VolumeLogsPage.LOG_TABLE_COLUMN_INDICES; -import com.gluster.storage.management.core.model.VolumeLogMessage; -import com.gluster.storage.management.core.utils.DateUtil; public class VolumeLogTableLabelProvider extends TableLabelProviderAdapter { @Override diff --git a/src/com.gluster.storage.management.console/src/com/gluster/storage/management/console/VolumeOptionsContentProvider.java b/src/org.gluster.storage.management.console/src/org/gluster/storage/management/console/VolumeOptionsContentProvider.java index 1289f0f4..6057a3ce 100644 --- a/src/com.gluster.storage.management.console/src/com/gluster/storage/management/console/VolumeOptionsContentProvider.java +++ b/src/org.gluster.storage.management.console/src/org/gluster/storage/management/console/VolumeOptionsContentProvider.java @@ -1,27 +1,27 @@ /******************************************************************************* - * Copyright (c) 2011 Gluster, Inc. <http://www.gluster.com> + * Copyright (c) 2006-2011 Gluster, Inc. <http://www.gluster.com> * This file is part of Gluster Management Console. * - * Gluster Management Console is free software; you can redistribute it and/or - * modify it under the terms of the GNU Affero General Public License as published - * by the Free Software Foundation; either version 3 of the License, or - * (at your option) any later version. - * - * Gluster Management Console is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY - * or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Affero General Public License - * for more details. - * - * You should have received a copy of the GNU Affero General Public License - * along with this program. If not, see + * Gluster Management Console is free software; you can redistribute + * it and/or modify it under the terms of the GNU General Public + * License as published by the Free Software Foundation; either + * version 3 of the License, or (at your option) any later version. + * + * Gluster Management Console is distributed in the hope that it + * will be useful, but WITHOUT ANY WARRANTY; without even the + * implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR + * PURPOSE. See the GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program. If not, see * <http://www.gnu.org/licenses/>. *******************************************************************************/ -package com.gluster.storage.management.console; +package org.gluster.storage.management.console; import org.eclipse.jface.viewers.IStructuredContentProvider; import org.eclipse.jface.viewers.Viewer; +import org.gluster.storage.management.core.model.VolumeOptions; -import com.gluster.storage.management.core.model.VolumeOptions; /** * @author root diff --git a/src/com.gluster.storage.management.console/src/com/gluster/storage/management/console/VolumeOptionsTableLabelProvider.java b/src/org.gluster.storage.management.console/src/org/gluster/storage/management/console/VolumeOptionsTableLabelProvider.java index 5a1089de..6359a38f 100644 --- a/src/com.gluster.storage.management.console/src/com/gluster/storage/management/console/VolumeOptionsTableLabelProvider.java +++ b/src/org.gluster.storage.management.console/src/org/gluster/storage/management/console/VolumeOptionsTableLabelProvider.java @@ -1,27 +1,28 @@ /******************************************************************************* - * Copyright (c) 2011 Gluster, Inc. <http://www.gluster.com> + * Copyright (c) 2006-2011 Gluster, Inc. <http://www.gluster.com> * This file is part of Gluster Management Console. * - * Gluster Management Console is free software; you can redistribute it and/or - * modify it under the terms of the GNU Affero General Public License as published - * by the Free Software Foundation; either version 3 of the License, or - * (at your option) any later version. - * - * Gluster Management Console is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY - * or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Affero General Public License - * for more details. - * - * You should have received a copy of the GNU Affero General Public License - * along with this program. If not, see + * Gluster Management Console is free software; you can redistribute + * it and/or modify it under the terms of the GNU General Public + * License as published by the Free Software Foundation; either + * version 3 of the License, or (at your option) any later version. + * + * Gluster Management Console is distributed in the hope that it + * will be useful, but WITHOUT ANY WARRANTY; without even the + * implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR + * PURPOSE. See the GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program. If not, see * <http://www.gnu.org/licenses/>. *******************************************************************************/ -package com.gluster.storage.management.console; +package org.gluster.storage.management.console; import java.util.Map.Entry; -import com.gluster.storage.management.console.views.pages.VolumeOptionsPage.OPTIONS_TABLE_COLUMN_INDICES; -import com.gluster.storage.management.core.model.VolumeOption; +import org.gluster.storage.management.console.views.pages.VolumeOptionsPage.OPTIONS_TABLE_COLUMN_INDICES; +import org.gluster.storage.management.core.model.VolumeOption; + public class VolumeOptionsTableLabelProvider extends TableLabelProviderAdapter { @Override diff --git a/src/com.gluster.storage.management.console/src/com/gluster/storage/management/console/VolumeTableLabelProvider.java b/src/org.gluster.storage.management.console/src/org/gluster/storage/management/console/VolumeTableLabelProvider.java index 908c23d5..bbec7f87 100644 --- a/src/com.gluster.storage.management.console/src/com/gluster/storage/management/console/VolumeTableLabelProvider.java +++ b/src/org.gluster.storage.management.console/src/org/gluster/storage/management/console/VolumeTableLabelProvider.java @@ -1,31 +1,31 @@ /******************************************************************************* - * Copyright (c) 2011 Gluster, Inc. <http://www.gluster.com> + * Copyright (c) 2006-2011 Gluster, Inc. <http://www.gluster.com> * This file is part of Gluster Management Console. * - * Gluster Management Console is free software; you can redistribute it and/or - * modify it under the terms of the GNU Affero General Public License as published - * by the Free Software Foundation; either version 3 of the License, or - * (at your option) any later version. - * - * Gluster Management Console is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY - * or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Affero General Public License - * for more details. - * - * You should have received a copy of the GNU Affero General Public License - * along with this program. If not, see + * Gluster Management Console is free software; you can redistribute + * it and/or modify it under the terms of the GNU General Public + * License as published by the Free Software Foundation; either + * version 3 of the License, or (at your option) any later version. + * + * Gluster Management Console is distributed in the hope that it + * will be useful, but WITHOUT ANY WARRANTY; without even the + * implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR + * PURPOSE. See the GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program. If not, see * <http://www.gnu.org/licenses/>. *******************************************************************************/ -package com.gluster.storage.management.console; +package org.gluster.storage.management.console; import org.eclipse.jface.viewers.ILabelProviderListener; import org.eclipse.jface.viewers.ITableLabelProvider; import org.eclipse.swt.graphics.Image; +import org.gluster.storage.management.console.utils.GUIHelper; +import org.gluster.storage.management.console.views.pages.VolumesPage.VOLUME_TABLE_COLUMN_INDICES; +import org.gluster.storage.management.core.model.Volume; +import org.gluster.storage.management.core.model.Volume.VOLUME_STATUS; -import com.gluster.storage.management.console.utils.GUIHelper; -import com.gluster.storage.management.console.views.pages.VolumesPage.VOLUME_TABLE_COLUMN_INDICES; -import com.gluster.storage.management.core.model.Volume; -import com.gluster.storage.management.core.model.Volume.VOLUME_STATUS; public class VolumeTableLabelProvider implements ITableLabelProvider { private GUIHelper guiHelper = GUIHelper.getInstance(); diff --git a/src/com.gluster.storage.management.console/src/com/gluster/storage/management/console/actions/AbstractActionDelegate.java b/src/org.gluster.storage.management.console/src/org/gluster/storage/management/console/actions/AbstractActionDelegate.java index 9a5a3437..7ba1f6b5 100644 --- a/src/com.gluster.storage.management.console/src/com/gluster/storage/management/console/actions/AbstractActionDelegate.java +++ b/src/org.gluster.storage.management.console/src/org/gluster/storage/management/console/actions/AbstractActionDelegate.java @@ -1,35 +1,34 @@ /******************************************************************************* - * Copyright (c) 2011 Gluster, Inc. <http://www.gluster.com> + * Copyright (c) 2006-2011 Gluster, Inc. <http://www.gluster.com> * This file is part of Gluster Management Console. * - * Gluster Management Console is free software; you can redistribute it and/or - * modify it under the terms of the GNU Affero General Public License as published - * by the Free Software Foundation; either version 3 of the License, or - * (at your option) any later version. - * - * Gluster Management Console is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY - * or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Affero General Public License - * for more details. - * - * You should have received a copy of the GNU Affero General Public License - * along with this program. If not, see + * Gluster Management Console is free software; you can redistribute + * it and/or modify it under the terms of the GNU General Public + * License as published by the Free Software Foundation; either + * version 3 of the License, or (at your option) any later version. + * + * Gluster Management Console is distributed in the hope that it + * will be useful, but WITHOUT ANY WARRANTY; without even the + * implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR + * PURPOSE. See the GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program. If not, see * <http://www.gnu.org/licenses/>. *******************************************************************************/ -package com.gluster.storage.management.console.actions; +package org.gluster.storage.management.console.actions; import org.eclipse.jface.action.IAction; import org.eclipse.jface.dialogs.MessageDialog; import org.eclipse.jface.viewers.ISelection; import org.eclipse.jface.viewers.StructuredSelection; -import org.eclipse.swt.widgets.Display; import org.eclipse.swt.widgets.Shell; import org.eclipse.ui.IWorkbenchWindow; import org.eclipse.ui.IWorkbenchWindowActionDelegate; import org.eclipse.ui.internal.UIPlugin; +import org.gluster.storage.management.console.utils.GlusterLogger; +import org.gluster.storage.management.core.model.Entity; -import com.gluster.storage.management.console.utils.GlusterLogger; -import com.gluster.storage.management.core.model.Entity; /** * All action delegates in the application should extend from this class. It provides common functionality of grabbing @@ -46,25 +45,12 @@ public abstract class AbstractActionDelegate implements IWorkbenchWindowActionDe @Override public void run(final IAction action) { - // Real action code must be executed using Display#asyncExec. - // Otherwise the system can hang when opening new dialog boxes on linux platform try { - Display.getDefault().asyncExec(new Runnable() { - @Override - public void run() { - performAction(action); - } - }); + performAction(action); } catch (final Exception e) { final String actionDesc = action.getDescription(); logger.error("Exception while running action [" + actionDesc + "]", e); - - Display.getDefault().asyncExec(new Runnable() { - @Override - public void run() { - showErrorDialog(actionDesc, e.getMessage()); - } - }); + showErrorDialog(actionDesc, e.getMessage()); } } diff --git a/src/com.gluster.storage.management.console/src/com/gluster/storage/management/console/actions/AbstractMonitoredActionDelegate.java b/src/org.gluster.storage.management.console/src/org/gluster/storage/management/console/actions/AbstractMonitoredActionDelegate.java index 1669d273..ec3ab027 100644 --- a/src/com.gluster.storage.management.console/src/com/gluster/storage/management/console/actions/AbstractMonitoredActionDelegate.java +++ b/src/org.gluster.storage.management.console/src/org/gluster/storage/management/console/actions/AbstractMonitoredActionDelegate.java @@ -1,22 +1,22 @@ /******************************************************************************* - * Copyright (c) 2011 Gluster, Inc. <http://www.gluster.com> + * Copyright (c) 2006-2011 Gluster, Inc. <http://www.gluster.com> * This file is part of Gluster Management Console. * - * Gluster Management Console is free software; you can redistribute it and/or - * modify it under the terms of the GNU Affero General Public License as published - * by the Free Software Foundation; either version 3 of the License, or - * (at your option) any later version. - * - * Gluster Management Console is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY - * or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Affero General Public License - * for more details. - * - * You should have received a copy of the GNU Affero General Public License - * along with this program. If not, see + * Gluster Management Console is free software; you can redistribute + * it and/or modify it under the terms of the GNU General Public + * License as published by the Free Software Foundation; either + * version 3 of the License, or (at your option) any later version. + * + * Gluster Management Console is distributed in the hope that it + * will be useful, but WITHOUT ANY WARRANTY; without even the + * implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR + * PURPOSE. See the GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program. If not, see * <http://www.gnu.org/licenses/>. *******************************************************************************/ -package com.gluster.storage.management.console.actions; +package org.gluster.storage.management.console.actions; import java.lang.reflect.InvocationTargetException; @@ -24,8 +24,8 @@ import org.eclipse.core.runtime.IProgressMonitor; import org.eclipse.jface.action.IAction; import org.eclipse.jface.dialogs.ProgressMonitorDialog; import org.eclipse.jface.operation.IRunnableWithProgress; +import org.gluster.storage.management.console.ConsoleConstants; -import com.gluster.storage.management.console.ConsoleConstants; /** * Any action that can potentially run for a long time, and supports monitoring and progress dialog should extend from @@ -33,7 +33,7 @@ import com.gluster.storage.management.console.ConsoleConstants; */ public abstract class AbstractMonitoredActionDelegate extends AbstractActionDelegate { /* (non-Javadoc) - * @see com.gluster.storage.management.console.actions.AbstractActionDelegate#performAction(org.eclipse.jface.action.IAction) + * @see org.gluster.storage.management.console.actions.AbstractActionDelegate#performAction(org.eclipse.jface.action.IAction) */ @Override protected void performAction(final IAction action) { diff --git a/src/org.gluster.storage.management.console/src/org/gluster/storage/management/console/actions/ActionConstants.java b/src/org.gluster.storage.management.console/src/org/gluster/storage/management/console/actions/ActionConstants.java new file mode 100644 index 00000000..e5fb8849 --- /dev/null +++ b/src/org.gluster.storage.management.console/src/org/gluster/storage/management/console/actions/ActionConstants.java @@ -0,0 +1,36 @@ +/******************************************************************************* + * Copyright (c) 2006-2011 Gluster, Inc. <http://www.gluster.com> + * This file is part of Gluster Management Console. + * + * Gluster Management Console is free software; you can redistribute + * it and/or modify it under the terms of the GNU General Public + * License as published by the Free Software Foundation; either + * version 3 of the License, or (at your option) any later version. + * + * Gluster Management Console is distributed in the hope that it + * will be useful, but WITHOUT ANY WARRANTY; without even the + * implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR + * PURPOSE. See the GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program. If not, see + * <http://www.gnu.org/licenses/>. + *******************************************************************************/ +package org.gluster.storage.management.console.actions; + +public class ActionConstants { + public static final String ACTION_SET_CLUSTER = "org.gluster.storage.management.console.actionsets.gluster"; + public static final String ACTION_SET_VOLUMES = "org.gluster.storage.management.console.actionsets.volumes"; + public static final String ACTION_SET_VOLUME = "org.gluster.storage.management.console.actionsets.volume"; + public static final String ACTION_SET_DISKS = "org.gluster.storage.management.console.actionsets.disks"; + public static final String ACTION_SET_DISK = "org.gluster.storage.management.console.actionsets.disk"; + public static final String ACTION_SET_GLUSTER_SERVERS = "org.gluster.storage.management.console.actionsets.glusterservers"; + public static final String ACTION_SET_GLUSTER_SERVER = "org.gluster.storage.management.console.actionsets.glusterserver"; + public static final String ACTION_SET_DISCOVERED_SERVERS = "org.gluster.storage.management.console.actionsets.serversdiscovered"; + public static final String ACTION_SET_DISCOVERED_SERVER = "org.gluster.storage.management.console.actionsets.serverdiscovered"; + public static final String ACTION_SET_TASK = "org.gluster.storage.management.console.actionsets.task"; + public static final String ACTION_SET_EDIT = "org.gluster.storage.management.console.actionsets.edit"; + + public static final String COMMAND_CREATE_VOLUME = "org.gluster.storage.management.console.commands.CreateVolume"; + public static final String COMMAND_ADD_SERVER = "org.gluster.storage.management.console.commands.AddServer"; +} diff --git a/src/com.gluster.storage.management.console/src/com/gluster/storage/management/console/actions/AddBrickAction.java b/src/org.gluster.storage.management.console/src/org/gluster/storage/management/console/actions/AddBrickAction.java index 479353ff..bcb9524e 100644 --- a/src/com.gluster.storage.management.console/src/com/gluster/storage/management/console/actions/AddBrickAction.java +++ b/src/org.gluster.storage.management.console/src/org/gluster/storage/management/console/actions/AddBrickAction.java @@ -1,37 +1,33 @@ -/** - * AddBrickAction.java - * - * Copyright (c) 2011 Gluster, Inc. <http://www.gluster.com> +/******************************************************************************* + * Copyright (c) 2006-2011 Gluster, Inc. <http://www.gluster.com> * This file is part of Gluster Management Console. * - * Gluster Management Console is free software; you can redistribute it and/or - * modify it under the terms of the GNU Affero General Public License as published - * by the Free Software Foundation; either version 3 of the License, or - * (at your option) any later version. + * Gluster Management Console is free software; you can redistribute + * it and/or modify it under the terms of the GNU General Public + * License as published by the Free Software Foundation; either + * version 3 of the License, or (at your option) any later version. * - * Gluster Management Console is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY - * or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Affero General Public License - * for more details. + * Gluster Management Console is distributed in the hope that it + * will be useful, but WITHOUT ANY WARRANTY; without even the + * implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR + * PURPOSE. See the GNU General Public License for more details. * - * You should have received a copy of the GNU Affero General Public License - * along with this program. If not, see + * You should have received a copy of the GNU General Public License + * along with this program. If not, see * <http://www.gnu.org/licenses/>. - */ + *******************************************************************************/ -package com.gluster.storage.management.console.actions; +package org.gluster.storage.management.console.actions; import org.eclipse.jface.action.IAction; import org.eclipse.jface.viewers.ISelection; import org.eclipse.jface.wizard.WizardDialog; +import org.gluster.storage.management.console.dialogs.AddBrickWizard; +import org.gluster.storage.management.core.model.Volume; -import com.gluster.storage.management.console.GlusterDataModelManager; -import com.gluster.storage.management.console.dialogs.AddBrickWizard; -import com.gluster.storage.management.core.model.Volume; public class AddBrickAction extends AbstractActionDelegate { private Volume volume; - private GlusterDataModelManager modelManager = GlusterDataModelManager.getInstance(); @Override public void dispose() { diff --git a/src/com.gluster.storage.management.console/src/com/gluster/storage/management/console/actions/AddServerAction.java b/src/org.gluster.storage.management.console/src/org/gluster/storage/management/console/actions/AddServerAction.java index c3b24eba..f2425d6a 100644 --- a/src/com.gluster.storage.management.console/src/com/gluster/storage/management/console/actions/AddServerAction.java +++ b/src/org.gluster.storage.management.console/src/org/gluster/storage/management/console/actions/AddServerAction.java @@ -1,22 +1,22 @@ /******************************************************************************* - * Copyright (c) 2011 Gluster, Inc. <http://www.gluster.com> + * Copyright (c) 2006-2011 Gluster, Inc. <http://www.gluster.com> * This file is part of Gluster Management Console. * - * Gluster Management Console is free software; you can redistribute it and/or - * modify it under the terms of the GNU Affero General Public License as published - * by the Free Software Foundation; either version 3 of the License, or - * (at your option) any later version. - * - * Gluster Management Console is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY - * or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Affero General Public License - * for more details. - * - * You should have received a copy of the GNU Affero General Public License - * along with this program. If not, see + * Gluster Management Console is free software; you can redistribute + * it and/or modify it under the terms of the GNU General Public + * License as published by the Free Software Foundation; either + * version 3 of the License, or (at your option) any later version. + * + * Gluster Management Console is distributed in the hope that it + * will be useful, but WITHOUT ANY WARRANTY; without even the + * implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR + * PURPOSE. See the GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program. If not, see * <http://www.gnu.org/licenses/>. *******************************************************************************/ -package com.gluster.storage.management.console.actions; +package org.gluster.storage.management.console.actions; import java.net.URI; import java.util.HashSet; @@ -24,16 +24,15 @@ import java.util.Set; import org.eclipse.core.runtime.IProgressMonitor; import org.eclipse.jface.action.IAction; +import org.gluster.storage.management.client.GlusterServersClient; +import org.gluster.storage.management.console.GlusterDataModelManager; +import org.gluster.storage.management.console.dialogs.ServerAdditionDialog; +import org.gluster.storage.management.console.utils.GUIHelper; +import org.gluster.storage.management.core.constants.CoreConstants; +import org.gluster.storage.management.core.model.Server; -import com.gluster.storage.management.client.GlusterServersClient; -import com.gluster.storage.management.console.GlusterDataModelManager; -import com.gluster.storage.management.console.dialogs.ServerAdditionDialog; -import com.gluster.storage.management.console.utils.GUIHelper; -import com.gluster.storage.management.core.constants.CoreConstants; -import com.gluster.storage.management.core.model.Server; public class AddServerAction extends AbstractMonitoredActionDelegate { - private GUIHelper guiHelper = GUIHelper.getInstance(); @Override protected void performAction(final IAction action, IProgressMonitor monitor) { diff --git a/src/org.gluster.storage.management.console/src/org/gluster/storage/management/console/actions/ChangePasswordAction.java b/src/org.gluster.storage.management.console/src/org/gluster/storage/management/console/actions/ChangePasswordAction.java new file mode 100644 index 00000000..6f00e004 --- /dev/null +++ b/src/org.gluster.storage.management.console/src/org/gluster/storage/management/console/actions/ChangePasswordAction.java @@ -0,0 +1,41 @@ +/******************************************************************************* + * Copyright (c) 2006-2011 Gluster, Inc. <http://www.gluster.com> + * This file is part of Gluster Management Console. + * + * Gluster Management Console is free software; you can redistribute + * it and/or modify it under the terms of the GNU General Public + * License as published by the Free Software Foundation; either + * version 3 of the License, or (at your option) any later version. + * + * Gluster Management Console is distributed in the hope that it + * will be useful, but WITHOUT ANY WARRANTY; without even the + * implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR + * PURPOSE. See the GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program. If not, see + * <http://www.gnu.org/licenses/>. + *******************************************************************************/ +package org.gluster.storage.management.console.actions; + +import org.eclipse.jface.action.IAction; +import org.gluster.storage.management.console.dialogs.ChangePasswordDialog; + + +public class ChangePasswordAction extends AbstractActionDelegate { + + @Override + protected void performAction(IAction action) { + try { + // To open a dialog for change password + ChangePasswordDialog dialog = new ChangePasswordDialog(getShell()); + dialog.open(); + } catch (Exception e) { + e.printStackTrace(); + } + } + + @Override + public void dispose() { + } +} diff --git a/src/org.gluster.storage.management.console/src/org/gluster/storage/management/console/actions/ClearTaskAction.java b/src/org.gluster.storage.management.console/src/org/gluster/storage/management/console/actions/ClearTaskAction.java new file mode 100644 index 00000000..d22abe6c --- /dev/null +++ b/src/org.gluster.storage.management.console/src/org/gluster/storage/management/console/actions/ClearTaskAction.java @@ -0,0 +1,65 @@ +/******************************************************************************* + * Copyright (c) 2006-2011 Gluster, Inc. <http://www.gluster.com> + * This file is part of Gluster Management Console. + * + * Gluster Management Console is free software; you can redistribute + * it and/or modify it under the terms of the GNU General Public + * License as published by the Free Software Foundation; either + * version 3 of the License, or (at your option) any later version. + * + * Gluster Management Console is distributed in the hope that it + * will be useful, but WITHOUT ANY WARRANTY; without even the + * implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR + * PURPOSE. See the GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program. If not, see + * <http://www.gnu.org/licenses/>. + *******************************************************************************/ +package org.gluster.storage.management.console.actions; + +import org.eclipse.jface.action.IAction; +import org.eclipse.jface.viewers.ISelection; +import org.gluster.storage.management.client.TasksClient; +import org.gluster.storage.management.console.GlusterDataModelManager; +import org.gluster.storage.management.core.model.Status; +import org.gluster.storage.management.core.model.TaskInfo; + + +public class ClearTaskAction extends AbstractActionDelegate { + private TaskInfo taskInfo; + private GlusterDataModelManager modelManager = GlusterDataModelManager.getInstance(); + + @Override + protected void performAction(final IAction action) { + final String actionDesc = action.getDescription(); + + try { + new TasksClient().deleteTask(taskInfo.getName()); // taskId + modelManager.removeTask(taskInfo); + action.setEnabled(false); // TODO disable other task buttons + } catch (Exception e) { + showErrorDialog(actionDesc, + "Task [" + taskInfo.getName() + "] could not be cleared! Error: [" + e.getMessage() + "]"); + } + } + + @Override + public void selectionChanged(IAction action, ISelection selection) { + super.selectionChanged(action, selection); + action.setEnabled(false); + if (selectedEntity instanceof TaskInfo) { + taskInfo = (TaskInfo) selectedEntity; + action.setEnabled(taskInfo.getStatus().getCode() == Status.STATUS_CODE_SUCCESS + || taskInfo.getStatus().getCode() == Status.STATUS_CODE_FAILURE + || taskInfo.getStatus().getCode() == Status.STATUS_CODE_ERROR); + } else { + action.setEnabled(false); + } + } + + @Override + public void dispose() { + + } +} diff --git a/src/com.gluster.storage.management.console/src/com/gluster/storage/management/console/actions/CommitTaskAction.java b/src/org.gluster.storage.management.console/src/org/gluster/storage/management/console/actions/CommitTaskAction.java index ea47bd8f..7c3c1f1b 100644 --- a/src/com.gluster.storage.management.console/src/com/gluster/storage/management/console/actions/CommitTaskAction.java +++ b/src/org.gluster.storage.management.console/src/org/gluster/storage/management/console/actions/CommitTaskAction.java @@ -1,18 +1,36 @@ -package com.gluster.storage.management.console.actions; +/******************************************************************************* + * Copyright (c) 2006-2011 Gluster, Inc. <http://www.gluster.com> + * This file is part of Gluster Management Console. + * + * Gluster Management Console is free software; you can redistribute + * it and/or modify it under the terms of the GNU General Public + * License as published by the Free Software Foundation; either + * version 3 of the License, or (at your option) any later version. + * + * Gluster Management Console is distributed in the hope that it + * will be useful, but WITHOUT ANY WARRANTY; without even the + * implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR + * PURPOSE. See the GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program. If not, see + * <http://www.gnu.org/licenses/>. + *******************************************************************************/ +package org.gluster.storage.management.console.actions; import org.eclipse.jface.action.IAction; import org.eclipse.jface.viewers.ISelection; import org.eclipse.swt.custom.BusyIndicator; import org.eclipse.swt.widgets.Display; +import org.gluster.storage.management.client.TasksClient; +import org.gluster.storage.management.client.VolumesClient; +import org.gluster.storage.management.console.GlusterDataModelManager; +import org.gluster.storage.management.core.model.Status; +import org.gluster.storage.management.core.model.TaskInfo; +import org.gluster.storage.management.core.model.TaskStatus; +import org.gluster.storage.management.core.model.Volume; -import com.gluster.storage.management.client.TasksClient; -import com.gluster.storage.management.client.VolumesClient; -import com.gluster.storage.management.console.GlusterDataModelManager; -import com.gluster.storage.management.core.model.Status; -import com.gluster.storage.management.core.model.TaskInfo; -import com.gluster.storage.management.core.model.TaskStatus; -import com.gluster.storage.management.core.model.Volume; public class CommitTaskAction extends AbstractActionDelegate { private TaskInfo taskInfo; @@ -36,7 +54,7 @@ public class CommitTaskAction extends AbstractActionDelegate { @Override public void run() { try { - String volumeName = taskInfo.getReference().split("-")[0]; //Extract volume name from reference + String volumeName = taskInfo.getReference().split("#")[0]; //Extract volume name from reference Volume oldVolume = modelManager.getModel().getCluster().getVolume(volumeName); Volume newVolume = (new VolumesClient()).getVolume(volumeName); diff --git a/src/com.gluster.storage.management.console/src/com/gluster/storage/management/console/actions/CreateVolumeAction.java b/src/org.gluster.storage.management.console/src/org/gluster/storage/management/console/actions/CreateVolumeAction.java index f8590171..c1f55478 100644 --- a/src/com.gluster.storage.management.console/src/com/gluster/storage/management/console/actions/CreateVolumeAction.java +++ b/src/org.gluster.storage.management.console/src/org/gluster/storage/management/console/actions/CreateVolumeAction.java @@ -1,30 +1,30 @@ /******************************************************************************* - * Copyright (c) 2011 Gluster, Inc. <http://www.gluster.com> + * Copyright (c) 2006-2011 Gluster, Inc. <http://www.gluster.com> * This file is part of Gluster Management Console. * - * Gluster Management Console is free software; you can redistribute it and/or - * modify it under the terms of the GNU Affero General Public License as published - * by the Free Software Foundation; either version 3 of the License, or - * (at your option) any later version. - * - * Gluster Management Console is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY - * or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Affero General Public License - * for more details. - * - * You should have received a copy of the GNU Affero General Public License - * along with this program. If not, see + * Gluster Management Console is free software; you can redistribute + * it and/or modify it under the terms of the GNU General Public + * License as published by the Free Software Foundation; either + * version 3 of the License, or (at your option) any later version. + * + * Gluster Management Console is distributed in the hope that it + * will be useful, but WITHOUT ANY WARRANTY; without even the + * implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR + * PURPOSE. See the GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program. If not, see * <http://www.gnu.org/licenses/>. *******************************************************************************/ -package com.gluster.storage.management.console.actions; +package org.gluster.storage.management.console.actions; import org.eclipse.jface.action.IAction; import org.eclipse.jface.dialogs.IDialogConstants; import org.eclipse.jface.wizard.WizardDialog; import org.eclipse.swt.widgets.Button; import org.eclipse.swt.widgets.Composite; +import org.gluster.storage.management.console.dialogs.CreateVolumeWizard; -import com.gluster.storage.management.console.dialogs.CreateVolumeWizard; public class CreateVolumeAction extends AbstractActionDelegate { @Override diff --git a/src/org.gluster.storage.management.console/src/org/gluster/storage/management/console/actions/DeleteVolumeAction.java b/src/org.gluster.storage.management.console/src/org/gluster/storage/management/console/actions/DeleteVolumeAction.java new file mode 100644 index 00000000..55e6d143 --- /dev/null +++ b/src/org.gluster.storage.management.console/src/org/gluster/storage/management/console/actions/DeleteVolumeAction.java @@ -0,0 +1,210 @@ +/******************************************************************************* + * Copyright (c) 2006-2011 Gluster, Inc. <http://www.gluster.com> + * This file is part of Gluster Management Console. + * + * Gluster Management Console is free software; you can redistribute + * it and/or modify it under the terms of the GNU General Public + * License as published by the Free Software Foundation; either + * version 3 of the License, or (at your option) any later version. + * + * Gluster Management Console is distributed in the hope that it + * will be useful, but WITHOUT ANY WARRANTY; without even the + * implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR + * PURPOSE. See the GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program. If not, see + * <http://www.gnu.org/licenses/>. + *******************************************************************************/ +package org.gluster.storage.management.console.actions; + +import java.util.ArrayList; +import java.util.List; +import java.util.Set; + +import org.eclipse.core.runtime.IProgressMonitor; +import org.eclipse.jface.action.IAction; +import org.eclipse.jface.dialogs.MessageDialog; +import org.eclipse.jface.viewers.ISelection; +import org.gluster.storage.management.client.VolumesClient; +import org.gluster.storage.management.console.GlusterDataModelManager; +import org.gluster.storage.management.console.IImageKeys; +import org.gluster.storage.management.console.utils.GUIHelper; +import org.gluster.storage.management.core.constants.CoreConstants; +import org.gluster.storage.management.core.model.Volume; +import org.gluster.storage.management.core.model.Volume.VOLUME_STATUS; + + +public class DeleteVolumeAction extends AbstractMonitoredActionDelegate { + private GlusterDataModelManager modelManager = GlusterDataModelManager.getInstance(); + private List<Volume> selectedVolumes = new ArrayList<Volume>(); + private List<String> selectedVolumeNames = new ArrayList<String>(); + private List<String> onlineVolumeNames = new ArrayList<String>(); + private List<String> deletedVolumeNames = new ArrayList<String>(); + private List<Volume> failedVolumes = new ArrayList<Volume>(); + + @Override + protected void performAction(final IAction action, IProgressMonitor monitor) { + final String actionDesc = action.getDescription(); + + collectVolumeNames(); + String warningMessage; + List<String> cifsVolumes = GlusterDataModelManager.getInstance().getCifsEnabledVolumeNames(selectedVolumes); + List<String> offlineServers = GlusterDataModelManager.getInstance().getOfflineServers(); + // One or more servers are offline, Show warning if cifs is enabled + if (cifsVolumes != null && cifsVolumes.size() > 0 && offlineServers != null && offlineServers.size() > 0) { + Integer userAction = new MessageDialog(getShell(), "CIFS configuration", GUIHelper.getInstance().getImage( + IImageKeys.VOLUME_16x16), + "Performing CIFS updates when one or more servers are offline can trigger " + + "inconsistent behavior for CIFS accesses in the cluster." + CoreConstants.NEWLINE + + "Are you sure you want to continue?", MessageDialog.QUESTION, + new String[] { "No", "Yes" }, -1).open(); + if (userAction != 1) { + return; // Do not delete volume services + } + } + + if (onlineVolumeNames.size() > 0) { // Getting confirmation for stop and delete + warningMessage = "Following volume(s) " + onlineVolumeNames + " are online, " + CoreConstants.NEWLINE + + "Are you sure to continue?" + CoreConstants.NEWLINE + selectedVolumeNames; + } else { + warningMessage = "Are you sure to delete the volumes " + selectedVolumeNames + " ?"; + } + + final Integer deleteOption = new MessageDialog(getShell(), "Delete Volume", GUIHelper.getInstance() + .getImage(IImageKeys.VOLUME_16x16), warningMessage, MessageDialog.QUESTION, new String[] { "Cancel", + "Delete volume and data", "Delete volume, keep data" }, -1).open(); + if (deleteOption <= 0) { // By Cancel button(0) or Escape key(-1) + return; + } + + String errorMessage = deleteVolumes(selectedVolumes, deleteOption, monitor); + + // Display the success or failure info + if (deletedVolumeNames.size() == 0) { // No volume(s) deleted successfully + showErrorDialog(actionDesc, "Volume(s) could not be deleted! " + CoreConstants.NEWLINE + errorMessage); + } else { + String info = "Volume(s) " + deletedVolumeNames + " deleted successfully!"; + if (!failedVolumes.isEmpty()) { + info += CoreConstants.NEWLINE + CoreConstants.NEWLINE + "Volumes " + failedVolumes + + " could not be deleted!" + CoreConstants.NEWLINE + errorMessage; + } + + if (selectedVolumes.size() == deletedVolumeNames.size()) { + showInfoDialog(actionDesc, info); + } else { + showWarningDialog(actionDesc, info); + } + } + } + + private String deleteVolumes(List<Volume> volumes, final Integer deleteOption, IProgressMonitor monitor) { + deletedVolumeNames.clear(); + failedVolumes.clear(); + VolumesClient vc = new VolumesClient(); + boolean confirmDeleteDir = (deleteOption == 1) ? true : false; + + String errorMessage = ""; + + // To calculate the total work we need to sum volumes size + online volumes (because we treat stop and delete as + // separate steps) + List<Volume> onlineVolumes = getOnlineVolumes(volumes); + monitor.beginTask("Deleting Selected Volumes...", volumes.size() + onlineVolumes.size()); + + // Deletion of a volume results in changes to the model, and ultimately updates the "selectedVolumes" list, + // over which we are iterating, thus resulting in ConcurrentModificationException. To avoid this, we iterate + // over an array obtained from the list. + for (Volume volume : volumes.toArray(new Volume[0])) { + if (volume.getStatus() == VOLUME_STATUS.ONLINE) { // stop if online volume + monitor.setTaskName("Stopping volume [" + volume.getName() + "]"); + try { + vc.stopVolume(volume.getName(), false); + } catch (Exception e1) { + // try again with force = true + try { + vc.stopVolume(volume.getName(), true); + } catch(Exception e2) { + // force stop also failed. + // Mark as deletion failed, append error message. + errorMessage += CoreConstants.NEWLINE + "Stop [" + volume.getName() + "] : [" + e2.getMessage() + + "]"; + failedVolumes.add(volume); + // since we are not going to perform delete on this volume, + // mark the deletion task as worked + monitor.worked(1); + + // continue to next volume without trying to delete this one + continue; + } + } finally { + // worked for "stop" operation + monitor.worked(1); + } + } + + monitor.setTaskName("Deleting volume [" + volume.getName() + "]"); + try { + vc.deleteVolume(volume.getName(), confirmDeleteDir); + modelManager.deleteVolume(volume); + deletedVolumeNames.add(volume.getName()); + } catch (Exception e) { + // Volume delete succeeded and post delete operation (directory cleanup, CIFS etc) may fail + if (vc.volumeExists(volume.getName())) { + errorMessage += CoreConstants.NEWLINE + "Delete [" + volume.getName() + "] : [" + e.getMessage() + "]"; + failedVolumes.add(volume); + } else { + errorMessage += CoreConstants.NEWLINE + "Volume [" + volume.getName() + + "] deleted, but following error occured: [" + e.getMessage() + "]"; + modelManager.deleteVolume(volume); + deletedVolumeNames.add(volume.getName()); + } + } finally { + monitor.worked(1); + } + } + monitor.done(); + return errorMessage; + } + + private List<Volume> getOnlineVolumes(List<Volume> volumes) { + List<Volume> onlineVolumes = new ArrayList<Volume>(); + for (Volume volume : volumes) { + if (volume.getStatus() == VOLUME_STATUS.ONLINE) { + onlineVolumes.add(volume); + } + } + return onlineVolumes; + } + + private void collectVolumeNames() { + selectedVolumeNames.clear(); + onlineVolumeNames.clear(); + for (Volume volume : selectedVolumes) { + selectedVolumeNames.add(volume.getName()); + if (volume.getStatus() == VOLUME_STATUS.ONLINE) { + onlineVolumeNames.add(volume.getName()); + } + } + } + + @Override + public void dispose() { + System.out.println("Disposing [" + this.getClass().getSimpleName() + "]"); + } + + @Override + public void selectionChanged(IAction action, ISelection selection) { + Set<Volume> selectedVolumeSet = GUIHelper.getInstance().getSelectedEntities(getWindow(), Volume.class); + selectedVolumes.clear(); + if (selectedVolumeSet == null || selectedVolumeSet.isEmpty()) { + super.selectionChanged(action, selection); + if (selectedEntity instanceof Volume) { + selectedVolumes.add((Volume) selectedEntity); + } + } else { + selectedVolumes.addAll(selectedVolumeSet); //TODO reverse the collection to maintain the selected order + } + + action.setEnabled( (selectedVolumes.size() > 0) ); + } +} diff --git a/src/org.gluster.storage.management.console/src/org/gluster/storage/management/console/actions/DownloadVolumeLogsAction.java b/src/org.gluster.storage.management.console/src/org/gluster/storage/management/console/actions/DownloadVolumeLogsAction.java new file mode 100644 index 00000000..1d266070 --- /dev/null +++ b/src/org.gluster.storage.management.console/src/org/gluster/storage/management/console/actions/DownloadVolumeLogsAction.java @@ -0,0 +1,61 @@ +/******************************************************************************* + * Copyright (c) 2006-2011 Gluster, Inc. <http://www.gluster.com> + * This file is part of Gluster Management Console. + * + * Gluster Management Console is free software; you can redistribute + * it and/or modify it under the terms of the GNU General Public + * License as published by the Free Software Foundation; either + * version 3 of the License, or (at your option) any later version. + * + * Gluster Management Console is distributed in the hope that it + * will be useful, but WITHOUT ANY WARRANTY; without even the + * implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR + * PURPOSE. See the GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program. If not, see + * <http://www.gnu.org/licenses/>. + *******************************************************************************/ +package org.gluster.storage.management.console.actions; + +import org.eclipse.jface.action.IAction; +import org.eclipse.swt.SWT; +import org.eclipse.swt.widgets.FileDialog; +import org.gluster.storage.management.client.VolumesClient; +import org.gluster.storage.management.console.utils.GUIHelper; +import org.gluster.storage.management.core.model.Volume; + + +/** + * + */ +public class DownloadVolumeLogsAction extends AbstractActionDelegate { + private GUIHelper guiHelper = GUIHelper.getInstance(); + + @Override + public void dispose() { + } + + @Override + protected void performAction(IAction action) { + final VolumesClient client = new VolumesClient(); + Volume volume = guiHelper.getSelectedEntity(getWindow(), Volume.class); + + FileDialog dialog = new FileDialog(getShell(), SWT.SAVE); + dialog.setFilterNames(new String[] { "GZipped Tar (*.tar.gz)" }); + dialog.setFilterExtensions(new String[] { "*.tar.gz" }); + String filePath = dialog.open(); + + if (filePath == null) { + return; + } + + String title = "Download Volume Logs [" + volume.getName() + "]"; + try { + client.downloadLogs(volume.getName(), filePath); + showInfoDialog(title, "Volume logs downloaded successfully to [" + filePath + "]"); + } catch (Exception e) { + showErrorDialog(title, e.getMessage()); + } + } +} diff --git a/src/com.gluster.storage.management.console/src/com/gluster/storage/management/console/actions/EditVolumeAction.java b/src/org.gluster.storage.management.console/src/org/gluster/storage/management/console/actions/EditVolumeAction.java index 610cbdf6..2bbb1618 100644 --- a/src/com.gluster.storage.management.console/src/com/gluster/storage/management/console/actions/EditVolumeAction.java +++ b/src/org.gluster.storage.management.console/src/org/gluster/storage/management/console/actions/EditVolumeAction.java @@ -1,22 +1,22 @@ /******************************************************************************* - * Copyright (c) 2011 Gluster, Inc. <http://www.gluster.com> + * Copyright (c) 2006-2011 Gluster, Inc. <http://www.gluster.com> * This file is part of Gluster Management Console. * - * Gluster Management Console is free software; you can redistribute it and/or - * modify it under the terms of the GNU Affero General Public License as published - * by the Free Software Foundation; either version 3 of the License, or - * (at your option) any later version. - * - * Gluster Management Console is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY - * or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Affero General Public License - * for more details. - * - * You should have received a copy of the GNU Affero General Public License - * along with this program. If not, see + * Gluster Management Console is free software; you can redistribute + * it and/or modify it under the terms of the GNU General Public + * License as published by the Free Software Foundation; either + * version 3 of the License, or (at your option) any later version. + * + * Gluster Management Console is distributed in the hope that it + * will be useful, but WITHOUT ANY WARRANTY; without even the + * implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR + * PURPOSE. See the GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program. If not, see * <http://www.gnu.org/licenses/>. *******************************************************************************/ -package com.gluster.storage.management.console.actions; +package org.gluster.storage.management.console.actions; import org.eclipse.jface.action.IAction; diff --git a/src/org.gluster.storage.management.console/src/org/gluster/storage/management/console/actions/ExportSshKeysAction.java b/src/org.gluster.storage.management.console/src/org/gluster/storage/management/console/actions/ExportSshKeysAction.java new file mode 100644 index 00000000..60d11eca --- /dev/null +++ b/src/org.gluster.storage.management.console/src/org/gluster/storage/management/console/actions/ExportSshKeysAction.java @@ -0,0 +1,59 @@ +/******************************************************************************* + * Copyright (c) 2006-2011 Gluster, Inc. <http://www.gluster.com> + * This file is part of Gluster Management Console. + * + * Gluster Management Console is free software; you can redistribute + * it and/or modify it under the terms of the GNU General Public + * License as published by the Free Software Foundation; either + * version 3 of the License, or (at your option) any later version. + * + * Gluster Management Console is distributed in the hope that it + * will be useful, but WITHOUT ANY WARRANTY; without even the + * implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR + * PURPOSE. See the GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program. If not, see + * <http://www.gnu.org/licenses/>. + *******************************************************************************/ +package org.gluster.storage.management.console.actions; + +import org.eclipse.jface.action.IAction; +import org.eclipse.swt.SWT; +import org.eclipse.swt.widgets.FileDialog; +import org.gluster.storage.management.client.KeysClient; + + +/** + * @author root + * + */ +public class ExportSshKeysAction extends AbstractActionDelegate { + + @Override + protected void performAction(IAction action) { + final KeysClient client = new KeysClient(); + FileDialog dialog = new FileDialog(getShell(), SWT.SAVE); + dialog.setFilterNames(new String[] { "Tar (*.tar)" }); + dialog.setFilterExtensions(new String[] { "*.tar" }); + String filePath = dialog.open(); + + if (filePath == null) { + return; + } + + String title = "Export SSH Keys"; + try { + client.exportSshKeys(filePath); + showInfoDialog(title, "SSH keys exported successfully to [" + filePath + "]"); + } catch (Exception e) { + showErrorDialog(title, e.getMessage()); + } + } + + + @Override + public void dispose() { + } + +} diff --git a/src/org.gluster.storage.management.console/src/org/gluster/storage/management/console/actions/ForceStartVolumeAction.java b/src/org.gluster.storage.management.console/src/org/gluster/storage/management/console/actions/ForceStartVolumeAction.java new file mode 100644 index 00000000..3cec5515 --- /dev/null +++ b/src/org.gluster.storage.management.console/src/org/gluster/storage/management/console/actions/ForceStartVolumeAction.java @@ -0,0 +1,89 @@ +/******************************************************************************* + * Copyright (c) 2006-2011 Gluster, Inc. <http://www.gluster.com> + * This file is part of Gluster Management Console. + * + * Gluster Management Console is free software; you can redistribute + * it and/or modify it under the terms of the GNU General Public + * License as published by the Free Software Foundation; either + * version 3 of the License, or (at your option) any later version. + * + * Gluster Management Console is distributed in the hope that it + * will be useful, but WITHOUT ANY WARRANTY; without even the + * implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR + * PURPOSE. See the GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program. If not, see + * <http://www.gnu.org/licenses/>. + *******************************************************************************/ +package org.gluster.storage.management.console.actions; + +import java.util.Set; + +import org.eclipse.jface.action.IAction; +import org.eclipse.jface.viewers.ISelection; +import org.eclipse.ui.IWorkbenchPart; +import org.gluster.storage.management.client.VolumesClient; +import org.gluster.storage.management.console.utils.GUIHelper; +import org.gluster.storage.management.console.views.VolumeBricksView; +import org.gluster.storage.management.core.model.Brick; +import org.gluster.storage.management.core.model.Volume; +import org.gluster.storage.management.core.model.Brick.BRICK_STATUS; +import org.gluster.storage.management.core.utils.StringUtil; + + +public class ForceStartVolumeAction extends AbstractActionDelegate { + + private Volume volume; + private GUIHelper guiHelper = GUIHelper.getInstance(); + private Set<Brick> bricks; + + @Override + public void dispose() { + + } + + @Override + protected void performAction(IAction action) { + // volume brick service will be started, do you want to continue? + final String actionDesc = action.getDescription(); + boolean confirmed = showConfirmDialog( + actionDesc, + "The offline Bricks [" + StringUtil.collectionToString(bricks, ", ") + "] of Volume [" + + volume.getName() + "] will be started. Are you sure you want to continue?"); + if (!confirmed) { + return; + } + try { + new VolumesClient().startVolume(volume.getName(), true); + showInfoDialog(actionDesc, "Offline Bricks of Volume [" + volume.getName() + "] started successfully!"); + } catch (Exception e) { + showErrorDialog(actionDesc, e.getMessage()); + } + } + + @Override + public void selectionChanged(IAction action, ISelection selection) { + super.selectionChanged(action, selection); + action.setEnabled(false); + volume = guiHelper.getSelectedEntity(window, Volume.class); + if (volume != null) { + // a volume is selected on navigation tree. Let's check if the currently open view is volume bricks view + IWorkbenchPart view = guiHelper.getActiveView(); + if (view instanceof VolumeBricksView) { + // volume bricks view is open. check if any offline brick is selected + bricks = GUIHelper.getInstance().getSelectedEntities(getWindow(), Brick.class); + for (Brick brick : bricks) { + if (brick.getStatus() == BRICK_STATUS.OFFLINE) { + action.setEnabled(true); + } else { + // if any one of the selected brick is online, the disable the button + action.setEnabled(false); + break; + } + } + } + } + } + +} diff --git a/src/org.gluster.storage.management.console/src/org/gluster/storage/management/console/actions/ImportSshKeysAction.java b/src/org.gluster.storage.management.console/src/org/gluster/storage/management/console/actions/ImportSshKeysAction.java new file mode 100644 index 00000000..5d63a321 --- /dev/null +++ b/src/org.gluster.storage.management.console/src/org/gluster/storage/management/console/actions/ImportSshKeysAction.java @@ -0,0 +1,62 @@ +/******************************************************************************* + * Copyright (c) 2006-2011 Gluster, Inc. <http://www.gluster.com> + * This file is part of Gluster Management Console. + * + * Gluster Management Console is free software; you can redistribute + * it and/or modify it under the terms of the GNU General Public + * License as published by the Free Software Foundation; either + * version 3 of the License, or (at your option) any later version. + * + * Gluster Management Console is distributed in the hope that it + * will be useful, but WITHOUT ANY WARRANTY; without even the + * implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR + * PURPOSE. See the GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program. If not, see + * <http://www.gnu.org/licenses/>. + *******************************************************************************/ +package org.gluster.storage.management.console.actions; + +import org.eclipse.jface.action.IAction; +import org.eclipse.swt.SWT; +import org.eclipse.swt.widgets.Display; +import org.eclipse.swt.widgets.FileDialog; +import org.gluster.storage.management.client.KeysClient; + + +public class ImportSshKeysAction extends AbstractActionDelegate { + + @Override + protected void performAction(IAction action) { + final KeysClient client = new KeysClient(); + + Display.getDefault().asyncExec(new Runnable() { + + @Override + public void run() { + FileDialog dialog = new FileDialog(getShell(), SWT.OPEN); + dialog.setText("Open"); + dialog.setFilterNames(new String[] { "ssh-keys (*.tar)" }); + dialog.setFilterExtensions(new String[] { "*.tar" }); + + String selectedFile = dialog.open(); + if (selectedFile == null) { + return; + } + + String title = "Import SSH Keys"; + try { + client.importSshKeys(selectedFile); + showInfoDialog(title, "SSH keys imported successfully!"); + } catch (Exception e) { + showErrorDialog(title, e.getMessage()); + } + } + }); + } + + @Override + public void dispose() { + } +} diff --git a/src/com.gluster.storage.management.console/src/com/gluster/storage/management/console/actions/MigrateBrickAction.java b/src/org.gluster.storage.management.console/src/org/gluster/storage/management/console/actions/MigrateBrickAction.java index 4816871e..faf883c8 100644 --- a/src/com.gluster.storage.management.console/src/com/gluster/storage/management/console/actions/MigrateBrickAction.java +++ b/src/org.gluster.storage.management.console/src/org/gluster/storage/management/console/actions/MigrateBrickAction.java @@ -1,33 +1,33 @@ /******************************************************************************* - * Copyright (c) 2011 Gluster, Inc. <http://www.gluster.com> + * Copyright (c) 2006-2011 Gluster, Inc. <http://www.gluster.com> * This file is part of Gluster Management Console. * - * Gluster Management Console is free software; you can redistribute it and/or - * modify it under the terms of the GNU Affero General Public License as published - * by the Free Software Foundation; either version 3 of the License, or - * (at your option) any later version. - * - * Gluster Management Console is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY - * or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Affero General Public License - * for more details. - * - * You should have received a copy of the GNU Affero General Public License - * along with this program. If not, see + * Gluster Management Console is free software; you can redistribute + * it and/or modify it under the terms of the GNU General Public + * License as published by the Free Software Foundation; either + * version 3 of the License, or (at your option) any later version. + * + * Gluster Management Console is distributed in the hope that it + * will be useful, but WITHOUT ANY WARRANTY; without even the + * implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR + * PURPOSE. See the GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program. If not, see * <http://www.gnu.org/licenses/>. *******************************************************************************/ -package com.gluster.storage.management.console.actions; +package org.gluster.storage.management.console.actions; import java.util.Set; import org.eclipse.jface.action.IAction; import org.eclipse.jface.viewers.ISelection; import org.eclipse.jface.wizard.WizardDialog; +import org.gluster.storage.management.console.dialogs.MigrateBrickWizard; +import org.gluster.storage.management.console.utils.GUIHelper; +import org.gluster.storage.management.core.model.Brick; +import org.gluster.storage.management.core.model.Volume; -import com.gluster.storage.management.console.dialogs.MigrateBrickWizard; -import com.gluster.storage.management.console.utils.GUIHelper; -import com.gluster.storage.management.core.model.Brick; -import com.gluster.storage.management.core.model.Volume; public class MigrateBrickAction extends AbstractActionDelegate { private Volume volume; @@ -54,7 +54,11 @@ public class MigrateBrickAction extends AbstractActionDelegate { action.setEnabled(false); if (selectedEntity instanceof Brick) { bricks = GUIHelper.getInstance().getSelectedEntities(getWindow(), Brick.class); - brick = (Brick) bricks.iterator().next(); + if ( bricks.iterator().hasNext()) { + brick = bricks.iterator().next(); + } else { + brick = null; + } action.setEnabled(brick != null); } } diff --git a/src/com.gluster.storage.management.console/src/com/gluster/storage/management/console/actions/MigrateVolumeAction.java b/src/org.gluster.storage.management.console/src/org/gluster/storage/management/console/actions/MigrateVolumeAction.java index 66013222..23d8701e 100644 --- a/src/com.gluster.storage.management.console/src/com/gluster/storage/management/console/actions/MigrateVolumeAction.java +++ b/src/org.gluster.storage.management.console/src/org/gluster/storage/management/console/actions/MigrateVolumeAction.java @@ -1,22 +1,22 @@ /******************************************************************************* - * Copyright (c) 2011 Gluster, Inc. <http://www.gluster.com> + * Copyright (c) 2006-2011 Gluster, Inc. <http://www.gluster.com> * This file is part of Gluster Management Console. * - * Gluster Management Console is free software; you can redistribute it and/or - * modify it under the terms of the GNU Affero General Public License as published - * by the Free Software Foundation; either version 3 of the License, or - * (at your option) any later version. - * - * Gluster Management Console is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY - * or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Affero General Public License - * for more details. - * - * You should have received a copy of the GNU Affero General Public License - * along with this program. If not, see + * Gluster Management Console is free software; you can redistribute + * it and/or modify it under the terms of the GNU General Public + * License as published by the Free Software Foundation; either + * version 3 of the License, or (at your option) any later version. + * + * Gluster Management Console is distributed in the hope that it + * will be useful, but WITHOUT ANY WARRANTY; without even the + * implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR + * PURPOSE. See the GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program. If not, see * <http://www.gnu.org/licenses/>. *******************************************************************************/ -package com.gluster.storage.management.console.actions; +package org.gluster.storage.management.console.actions; import org.eclipse.jface.action.IAction; diff --git a/src/com.gluster.storage.management.console/src/com/gluster/storage/management/console/actions/PauseTaskAction.java b/src/org.gluster.storage.management.console/src/org/gluster/storage/management/console/actions/PauseTaskAction.java index 92a79c73..fc6a4664 100644 --- a/src/com.gluster.storage.management.console/src/com/gluster/storage/management/console/actions/PauseTaskAction.java +++ b/src/org.gluster.storage.management.console/src/org/gluster/storage/management/console/actions/PauseTaskAction.java @@ -1,33 +1,31 @@ -/** - * PauseTaskAction.java - * - * Copyright (c) 2011 Gluster, Inc. <http://www.gluster.com> +/******************************************************************************* + * Copyright (c) 2006-2011 Gluster, Inc. <http://www.gluster.com> * This file is part of Gluster Management Console. * - * Gluster Management Console is free software; you can redistribute it and/or - * modify it under the terms of the GNU Affero General Public License as published - * by the Free Software Foundation; either version 3 of the License, or - * (at your option) any later version. + * Gluster Management Console is free software; you can redistribute + * it and/or modify it under the terms of the GNU General Public + * License as published by the Free Software Foundation; either + * version 3 of the License, or (at your option) any later version. * - * Gluster Management Console is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY - * or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Affero General Public License - * for more details. + * Gluster Management Console is distributed in the hope that it + * will be useful, but WITHOUT ANY WARRANTY; without even the + * implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR + * PURPOSE. See the GNU General Public License for more details. * - * You should have received a copy of the GNU Affero General Public License - * along with this program. If not, see + * You should have received a copy of the GNU General Public License + * along with this program. If not, see * <http://www.gnu.org/licenses/>. - */ -package com.gluster.storage.management.console.actions; + *******************************************************************************/ +package org.gluster.storage.management.console.actions; import org.eclipse.jface.action.IAction; import org.eclipse.jface.viewers.ISelection; +import org.gluster.storage.management.client.TasksClient; +import org.gluster.storage.management.console.GlusterDataModelManager; +import org.gluster.storage.management.core.model.Status; +import org.gluster.storage.management.core.model.TaskInfo; +import org.gluster.storage.management.core.model.TaskStatus; -import com.gluster.storage.management.client.TasksClient; -import com.gluster.storage.management.console.GlusterDataModelManager; -import com.gluster.storage.management.core.model.Status; -import com.gluster.storage.management.core.model.TaskInfo; -import com.gluster.storage.management.core.model.TaskStatus; public class PauseTaskAction extends AbstractActionDelegate { diff --git a/src/com.gluster.storage.management.console/src/com/gluster/storage/management/console/actions/PreferencesAction.java b/src/org.gluster.storage.management.console/src/org/gluster/storage/management/console/actions/PreferencesAction.java index b81a2a51..8f3f725d 100644 --- a/src/com.gluster.storage.management.console/src/com/gluster/storage/management/console/actions/PreferencesAction.java +++ b/src/org.gluster.storage.management.console/src/org/gluster/storage/management/console/actions/PreferencesAction.java @@ -1,22 +1,22 @@ /******************************************************************************* - * Copyright (c) 2011 Gluster, Inc. <http://www.gluster.com> + * Copyright (c) 2006-2011 Gluster, Inc. <http://www.gluster.com> * This file is part of Gluster Management Console. * - * Gluster Management Console is free software; you can redistribute it and/or - * modify it under the terms of the GNU Affero General Public License as published - * by the Free Software Foundation; either version 3 of the License, or - * (at your option) any later version. - * - * Gluster Management Console is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY - * or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Affero General Public License - * for more details. - * - * You should have received a copy of the GNU Affero General Public License - * along with this program. If not, see + * Gluster Management Console is free software; you can redistribute + * it and/or modify it under the terms of the GNU General Public + * License as published by the Free Software Foundation; either + * version 3 of the License, or (at your option) any later version. + * + * Gluster Management Console is distributed in the hope that it + * will be useful, but WITHOUT ANY WARRANTY; without even the + * implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR + * PURPOSE. See the GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program. If not, see * <http://www.gnu.org/licenses/>. *******************************************************************************/ -package com.gluster.storage.management.console.actions; +package org.gluster.storage.management.console.actions; import org.eclipse.jface.action.IAction; import org.eclipse.ui.actions.ActionFactory; diff --git a/src/com.gluster.storage.management.console/src/com/gluster/storage/management/console/actions/RebalanceVolumeAction.java b/src/org.gluster.storage.management.console/src/org/gluster/storage/management/console/actions/RebalanceVolumeAction.java index aeed223f..4e1d7127 100644 --- a/src/com.gluster.storage.management.console/src/com/gluster/storage/management/console/actions/RebalanceVolumeAction.java +++ b/src/org.gluster.storage.management.console/src/org/gluster/storage/management/console/actions/RebalanceVolumeAction.java @@ -1,36 +1,35 @@ /******************************************************************************* - * Copyright (c) 2011 Gluster, Inc. <http://www.gluster.com> + * Copyright (c) 2006-2011 Gluster, Inc. <http://www.gluster.com> * This file is part of Gluster Management Console. * - * Gluster Management Console is free software; you can redistribute it and/or - * modify it under the terms of the GNU Affero General Public License as published - * by the Free Software Foundation; either version 3 of the License, or - * (at your option) any later version. - * - * Gluster Management Console is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY - * or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Affero General Public License - * for more details. - * - * You should have received a copy of the GNU Affero General Public License - * along with this program. If not, see + * Gluster Management Console is free software; you can redistribute + * it and/or modify it under the terms of the GNU General Public + * License as published by the Free Software Foundation; either + * version 3 of the License, or (at your option) any later version. + * + * Gluster Management Console is distributed in the hope that it + * will be useful, but WITHOUT ANY WARRANTY; without even the + * implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR + * PURPOSE. See the GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program. If not, see * <http://www.gnu.org/licenses/>. *******************************************************************************/ -package com.gluster.storage.management.console.actions; +package org.gluster.storage.management.console.actions; import java.net.URI; import org.eclipse.jface.action.IAction; -import org.eclipse.jface.dialogs.MessageDialog; import org.eclipse.jface.viewers.ISelection; +import org.gluster.storage.management.client.TasksClient; +import org.gluster.storage.management.client.VolumesClient; +import org.gluster.storage.management.console.GlusterDataModelManager; +import org.gluster.storage.management.console.utils.GUIHelper; +import org.gluster.storage.management.core.model.Status; +import org.gluster.storage.management.core.model.TaskInfo; +import org.gluster.storage.management.core.model.Volume; -import com.gluster.storage.management.client.TasksClient; -import com.gluster.storage.management.client.VolumesClient; -import com.gluster.storage.management.console.GlusterDataModelManager; -import com.gluster.storage.management.console.utils.GUIHelper; -import com.gluster.storage.management.core.model.Status; -import com.gluster.storage.management.core.model.TaskInfo; -import com.gluster.storage.management.core.model.Volume; public class RebalanceVolumeAction extends AbstractActionDelegate { private Volume volume; @@ -52,10 +51,15 @@ public class RebalanceVolumeAction extends AbstractActionDelegate { // Add the task to model TasksClient taskClient = new TasksClient(); TaskInfo taskInfo = taskClient.getTaskInfo(uri); - if (taskInfo != null && taskInfo instanceof TaskInfo) { + if (taskInfo != null) { GlusterDataModelManager.getInstance().addTask(taskInfo); } - showInfoDialog(actionDesc, "Volume [" + volume.getName() + "] rebalance started successfully!"); + if (taskInfo.getStatus().getCode() == Status.STATUS_CODE_ERROR) { + showWarningDialog(actionDesc, "Volume [" + volume.getName() + + "] rebalance started, but following error occured: " + taskInfo.getStatus()); + } else { + showInfoDialog(actionDesc, "Volume [" + volume.getName() + "] rebalance started successfully!"); + } guiHelper.showTaskView(); } catch (Exception e) { showErrorDialog(actionDesc, "Volume rebalance could not be started on [" + volume.getName() + "]! Error: [" @@ -69,7 +73,7 @@ public class RebalanceVolumeAction extends AbstractActionDelegate { Volume selectedVolume = guiHelper.getSelectedEntity(getWindow(), Volume.class); if (selectedVolume != null) { - volume = (Volume) selectedVolume; + volume = selectedVolume; action.setEnabled(true); } else { action.setEnabled(false); diff --git a/src/org.gluster.storage.management.console/src/org/gluster/storage/management/console/actions/RefreshDataAction.java b/src/org.gluster.storage.management.console/src/org/gluster/storage/management/console/actions/RefreshDataAction.java new file mode 100644 index 00000000..4c2090b4 --- /dev/null +++ b/src/org.gluster.storage.management.console/src/org/gluster/storage/management/console/actions/RefreshDataAction.java @@ -0,0 +1,43 @@ +/******************************************************************************* + * Copyright (c) 2006-2011 Gluster, Inc. <http://www.gluster.com> + * This file is part of Gluster Management Console. + * + * Gluster Management Console is free software; you can redistribute + * it and/or modify it under the terms of the GNU General Public + * License as published by the Free Software Foundation; either + * version 3 of the License, or (at your option) any later version. + * + * Gluster Management Console is distributed in the hope that it + * will be useful, but WITHOUT ANY WARRANTY; without even the + * implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR + * PURPOSE. See the GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program. If not, see + * <http://www.gnu.org/licenses/>. + *******************************************************************************/ +package org.gluster.storage.management.console.actions; + +import org.eclipse.jface.action.IAction; +import org.gluster.storage.management.console.jobs.DataSyncJob; + + +/** + * + */ +public class RefreshDataAction extends AbstractActionDelegate { + /* (non-Javadoc) + * @see org.eclipse.ui.IWorkbenchWindowActionDelegate#dispose() + */ + @Override + public void dispose() { + } + + /* (non-Javadoc) + * @see org.gluster.storage.management.console.actions.AbstractActionDelegate#performAction(org.eclipse.jface.action.IAction) + */ + @Override + protected void performAction(IAction action) { + new DataSyncJob("Retrieving Management Info").schedule(); + } +} diff --git a/src/com.gluster.storage.management.console/src/com/gluster/storage/management/console/actions/RemoveBrickAction.java b/src/org.gluster.storage.management.console/src/org/gluster/storage/management/console/actions/RemoveBrickAction.java index 01d70b21..e27ad5ec 100644 --- a/src/com.gluster.storage.management.console/src/com/gluster/storage/management/console/actions/RemoveBrickAction.java +++ b/src/org.gluster.storage.management.console/src/org/gluster/storage/management/console/actions/RemoveBrickAction.java @@ -1,4 +1,22 @@ -package com.gluster.storage.management.console.actions; +/******************************************************************************* + * Copyright (c) 2006-2011 Gluster, Inc. <http://www.gluster.com> + * This file is part of Gluster Management Console. + * + * Gluster Management Console is free software; you can redistribute + * it and/or modify it under the terms of the GNU General Public + * License as published by the Free Software Foundation; either + * version 3 of the License, or (at your option) any later version. + * + * Gluster Management Console is distributed in the hope that it + * will be useful, but WITHOUT ANY WARRANTY; without even the + * implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR + * PURPOSE. See the GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program. If not, see + * <http://www.gnu.org/licenses/>. + *******************************************************************************/ +package org.gluster.storage.management.console.actions; import java.util.ArrayList; import java.util.List; @@ -10,16 +28,16 @@ import org.eclipse.jface.viewers.ISelection; import org.eclipse.swt.custom.BusyIndicator; import org.eclipse.swt.widgets.Display; import org.eclipse.ui.IWorkbenchPart; +import org.gluster.storage.management.client.VolumesClient; +import org.gluster.storage.management.console.GlusterDataModelManager; +import org.gluster.storage.management.console.IImageKeys; +import org.gluster.storage.management.console.utils.GUIHelper; +import org.gluster.storage.management.console.views.VolumeBricksView; +import org.gluster.storage.management.core.constants.CoreConstants; +import org.gluster.storage.management.core.model.Brick; +import org.gluster.storage.management.core.model.Volume; +import org.gluster.storage.management.core.utils.StringUtil; -import com.gluster.storage.management.client.VolumesClient; -import com.gluster.storage.management.console.GlusterDataModelManager; -import com.gluster.storage.management.console.IImageKeys; -import com.gluster.storage.management.console.utils.GUIHelper; -import com.gluster.storage.management.console.views.VolumeBricksView; -import com.gluster.storage.management.core.constants.CoreConstants; -import com.gluster.storage.management.core.model.Brick; -import com.gluster.storage.management.core.model.Volume; -import com.gluster.storage.management.core.utils.StringUtil; public class RemoveBrickAction extends AbstractActionDelegate { private GlusterDataModelManager modelManager = GlusterDataModelManager.getInstance(); @@ -69,12 +87,12 @@ public class RemoveBrickAction extends AbstractActionDelegate { super.selectionChanged(action, selection); action.setEnabled(false); - volume = (Volume) guiHelper.getSelectedEntity(window, Volume.class); + volume = guiHelper.getSelectedEntity(window, Volume.class); if (volume != null) { - // a volume is selected on navigation tree. Let's check if the currently open view is volume disks view + // a volume is selected on navigation tree. Let's check if the currently open view is volume bricks view IWorkbenchPart view = guiHelper.getActiveView(); if (view instanceof VolumeBricksView) { - // volume disks view is open. check if any brick is selected + // volume bricks view is open. check if any brick is selected bricks = GUIHelper.getInstance().getSelectedEntities(getWindow(), Brick.class); action.setEnabled(bricks.size() > 0); } diff --git a/src/com.gluster.storage.management.console/src/com/gluster/storage/management/console/actions/RemoveServerAction.java b/src/org.gluster.storage.management.console/src/org/gluster/storage/management/console/actions/RemoveServerAction.java index 8f52657c..c911f371 100644 --- a/src/com.gluster.storage.management.console/src/com/gluster/storage/management/console/actions/RemoveServerAction.java +++ b/src/org.gluster.storage.management.console/src/org/gluster/storage/management/console/actions/RemoveServerAction.java @@ -1,22 +1,22 @@ /******************************************************************************* - * Copyright (c) 2011 Gluster, Inc. <http://www.gluster.com> + * Copyright (c) 2006-2011 Gluster, Inc. <http://www.gluster.com> * This file is part of Gluster Management Console. * - * Gluster Management Console is free software; you can redistribute it and/or - * modify it under the terms of the GNU Affero General Public License as published - * by the Free Software Foundation; either version 3 of the License, or - * (at your option) any later version. - * - * Gluster Management Console is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY - * or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Affero General Public License - * for more details. - * - * You should have received a copy of the GNU Affero General Public License - * along with this program. If not, see + * Gluster Management Console is free software; you can redistribute + * it and/or modify it under the terms of the GNU General Public + * License as published by the Free Software Foundation; either + * version 3 of the License, or (at your option) any later version. + * + * Gluster Management Console is distributed in the hope that it + * will be useful, but WITHOUT ANY WARRANTY; without even the + * implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR + * PURPOSE. See the GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program. If not, see * <http://www.gnu.org/licenses/>. *******************************************************************************/ -package com.gluster.storage.management.console.actions; +package org.gluster.storage.management.console.actions; import java.util.HashMap; import java.util.HashSet; @@ -28,14 +28,16 @@ import java.util.Set; import org.eclipse.core.runtime.IProgressMonitor; import org.eclipse.jface.action.IAction; import org.eclipse.jface.viewers.ISelection; +import org.gluster.storage.management.client.GlusterServersClient; +import org.gluster.storage.management.console.GlusterDataModelManager; +import org.gluster.storage.management.console.utils.GUIHelper; +import org.gluster.storage.management.console.utils.GlusterLogger; +import org.gluster.storage.management.core.constants.CoreConstants; +import org.gluster.storage.management.core.model.GlusterServer; -import com.gluster.storage.management.client.GlusterServersClient; -import com.gluster.storage.management.console.GlusterDataModelManager; -import com.gluster.storage.management.console.utils.GUIHelper; -import com.gluster.storage.management.core.constants.CoreConstants; -import com.gluster.storage.management.core.model.GlusterServer; public class RemoveServerAction extends AbstractMonitoredActionDelegate { + private static final GlusterLogger logger = GlusterLogger.getInstance(); private GlusterDataModelManager modelManager = GlusterDataModelManager.getInstance(); private GUIHelper guiHelper = GUIHelper.getInstance(); @@ -64,12 +66,12 @@ public class RemoveServerAction extends AbstractMonitoredActionDelegate { GlusterServersClient client = new GlusterServersClient(); try { client.removeServer(server.getName()); - GlusterServer glusterServer = (GlusterServer) server; + GlusterServer glusterServer = server; modelManager.removeGlusterServer(glusterServer); successServers.add(server); } catch (Exception e) { if (!serverExists(server.getName())) { - modelManager.removeGlusterServer((GlusterServer) server); + modelManager.removeGlusterServer(server); } errMsg += "[" + server.getName() + "] : " + e.getMessage() + CoreConstants.NEWLINE; } @@ -83,12 +85,9 @@ public class RemoveServerAction extends AbstractMonitoredActionDelegate { try { GlusterServersClient client = new GlusterServersClient(); GlusterServer server = client.getGlusterServer(serverName); - if (server != null && server.getName().length() > 0) { - return true; - } else { - return false; - } + return (server != null && server.getName().length() > 0); } catch (Exception e) { + logger.error("Error while getting server info", e); return false; } } diff --git a/src/com.gluster.storage.management.console/src/com/gluster/storage/management/console/actions/ResetVolumeOptionsAction.java b/src/org.gluster.storage.management.console/src/org/gluster/storage/management/console/actions/ResetVolumeOptionsAction.java index 183b1668..eed5e093 100644 --- a/src/com.gluster.storage.management.console/src/com/gluster/storage/management/console/actions/ResetVolumeOptionsAction.java +++ b/src/org.gluster.storage.management.console/src/org/gluster/storage/management/console/actions/ResetVolumeOptionsAction.java @@ -1,13 +1,31 @@ -package com.gluster.storage.management.console.actions; +/******************************************************************************* + * Copyright (c) 2006-2011 Gluster, Inc. <http://www.gluster.com> + * This file is part of Gluster Management Console. + * + * Gluster Management Console is free software; you can redistribute + * it and/or modify it under the terms of the GNU General Public + * License as published by the Free Software Foundation; either + * version 3 of the License, or (at your option) any later version. + * + * Gluster Management Console is distributed in the hope that it + * will be useful, but WITHOUT ANY WARRANTY; without even the + * implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR + * PURPOSE. See the GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program. If not, see + * <http://www.gnu.org/licenses/>. + *******************************************************************************/ +package org.gluster.storage.management.console.actions; import org.eclipse.jface.action.IAction; import org.eclipse.jface.viewers.ISelection; import org.eclipse.swt.widgets.Display; +import org.gluster.storage.management.client.VolumesClient; +import org.gluster.storage.management.console.GlusterDataModelManager; +import org.gluster.storage.management.console.utils.GUIHelper; +import org.gluster.storage.management.core.model.Volume; -import com.gluster.storage.management.client.VolumesClient; -import com.gluster.storage.management.console.GlusterDataModelManager; -import com.gluster.storage.management.console.utils.GUIHelper; -import com.gluster.storage.management.core.model.Volume; public class ResetVolumeOptionsAction extends AbstractActionDelegate { private Volume volume; @@ -47,14 +65,13 @@ public class ResetVolumeOptionsAction extends AbstractActionDelegate { * (non-Javadoc) * * @see - * com.gluster.storage.management.console.actions.AbstractActionDelegate#selectionChanged(org.eclipse.jface.action.IAction + * org.gluster.storage.management.console.actions.AbstractActionDelegate#selectionChanged(org.eclipse.jface.action.IAction * , org.eclipse.jface.viewers.ISelection) */ @Override public void selectionChanged(IAction action, ISelection selection) { volume = GUIHelper.getInstance().getSelectedEntity(getWindow(), Volume.class); - - if (volume instanceof Volume) { + if (volume != null) { action.setEnabled(volume.getOptions().size() > 0); } else { action.setEnabled(false); diff --git a/src/org.gluster.storage.management.console/src/org/gluster/storage/management/console/actions/ResumeTaskAction.java b/src/org.gluster.storage.management.console/src/org/gluster/storage/management/console/actions/ResumeTaskAction.java new file mode 100644 index 00000000..3e39e914 --- /dev/null +++ b/src/org.gluster.storage.management.console/src/org/gluster/storage/management/console/actions/ResumeTaskAction.java @@ -0,0 +1,63 @@ +/******************************************************************************* + * Copyright (c) 2006-2011 Gluster, Inc. <http://www.gluster.com> + * This file is part of Gluster Management Console. + * + * Gluster Management Console is free software; you can redistribute + * it and/or modify it under the terms of the GNU General Public + * License as published by the Free Software Foundation; either + * version 3 of the License, or (at your option) any later version. + * + * Gluster Management Console is distributed in the hope that it + * will be useful, but WITHOUT ANY WARRANTY; without even the + * implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR + * PURPOSE. See the GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program. If not, see + * <http://www.gnu.org/licenses/>. + *******************************************************************************/ +package org.gluster.storage.management.console.actions; + +import org.eclipse.jface.action.IAction; +import org.eclipse.jface.viewers.ISelection; +import org.gluster.storage.management.client.TasksClient; +import org.gluster.storage.management.console.GlusterDataModelManager; +import org.gluster.storage.management.core.model.Status; +import org.gluster.storage.management.core.model.TaskInfo; +import org.gluster.storage.management.core.model.TaskStatus; + + +public class ResumeTaskAction extends AbstractActionDelegate { + private TaskInfo taskInfo; + private GlusterDataModelManager modelManager = GlusterDataModelManager.getInstance(); + + @Override + protected void performAction(final IAction action) { + final String actionDesc = action.getDescription(); + + try { + new TasksClient().resumeTask(taskInfo.getName()); + taskInfo.setStatus(new TaskStatus(new Status(Status.STATUS_CODE_RUNNING, "Resumed"))); + modelManager.updateTask(taskInfo); + } catch (Exception e) { + showErrorDialog(actionDesc, + "Task [" + taskInfo.getDescription() + "] could not be Resumed! Error: [" + e.getMessage() + "]"); + } + } + + @Override + public void selectionChanged(IAction action, ISelection selection) { + super.selectionChanged(action, selection); + action.setEnabled(false); + if (selectedEntity instanceof TaskInfo) { + taskInfo = (TaskInfo) selectedEntity; + action.setEnabled(taskInfo.getStatus().getCode() == Status.STATUS_CODE_PAUSE); + } + } + + @Override + public void dispose() { + + } + +} diff --git a/src/org.gluster.storage.management.console/src/org/gluster/storage/management/console/actions/ServerAdditionAction.java b/src/org.gluster.storage.management.console/src/org/gluster/storage/management/console/actions/ServerAdditionAction.java new file mode 100644 index 00000000..d610a9b0 --- /dev/null +++ b/src/org.gluster.storage.management.console/src/org/gluster/storage/management/console/actions/ServerAdditionAction.java @@ -0,0 +1,46 @@ +/******************************************************************************* + * Copyright (c) 2006-2011 Gluster, Inc. <http://www.gluster.com> + * This file is part of Gluster Management Console. + * + * Gluster Management Console is free software; you can redistribute + * it and/or modify it under the terms of the GNU General Public + * License as published by the Free Software Foundation; either + * version 3 of the License, or (at your option) any later version. + * + * Gluster Management Console is distributed in the hope that it + * will be useful, but WITHOUT ANY WARRANTY; without even the + * implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR + * PURPOSE. See the GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program. If not, see + * <http://www.gnu.org/licenses/>. + *******************************************************************************/ +package org.gluster.storage.management.console.actions; + +import org.eclipse.jface.action.IAction; +import org.gluster.storage.management.console.dialogs.ServerAdditionDialog; +import org.gluster.storage.management.console.utils.GlusterLogger; + + +public class ServerAdditionAction extends AbstractActionDelegate { + private static final GlusterLogger logger = GlusterLogger.getInstance(); + @Override + public void dispose() { + // TODO Auto-generated method stub + + } + + @Override + protected void performAction(IAction action) { + try { + // To open a dialog for server addition + ServerAdditionDialog dialog = new ServerAdditionDialog(getShell()); + dialog.open(); + } catch (Exception e) { + logger.error("Error in Manual server addition", e); + e.printStackTrace(); + } + } + +} diff --git a/src/com.gluster.storage.management.console/src/com/gluster/storage/management/console/actions/StartVolumeAction.java b/src/org.gluster.storage.management.console/src/org/gluster/storage/management/console/actions/StartVolumeAction.java index 8b2b3f09..10ce69c9 100644 --- a/src/com.gluster.storage.management.console/src/com/gluster/storage/management/console/actions/StartVolumeAction.java +++ b/src/org.gluster.storage.management.console/src/org/gluster/storage/management/console/actions/StartVolumeAction.java @@ -1,22 +1,22 @@ /******************************************************************************* - * Copyright (c) 2011 Gluster, Inc. <http://www.gluster.com> + * Copyright (c) 2006-2011 Gluster, Inc. <http://www.gluster.com> * This file is part of Gluster Management Console. * - * Gluster Management Console is free software; you can redistribute it and/or - * modify it under the terms of the GNU Affero General Public License as published - * by the Free Software Foundation; either version 3 of the License, or - * (at your option) any later version. - * - * Gluster Management Console is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY - * or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Affero General Public License - * for more details. - * - * You should have received a copy of the GNU Affero General Public License - * along with this program. If not, see + * Gluster Management Console is free software; you can redistribute + * it and/or modify it under the terms of the GNU General Public + * License as published by the Free Software Foundation; either + * version 3 of the License, or (at your option) any later version. + * + * Gluster Management Console is distributed in the hope that it + * will be useful, but WITHOUT ANY WARRANTY; without even the + * implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR + * PURPOSE. See the GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program. If not, see * <http://www.gnu.org/licenses/>. *******************************************************************************/ -package com.gluster.storage.management.console.actions; +package org.gluster.storage.management.console.actions; import java.util.ArrayList; import java.util.List; @@ -24,14 +24,16 @@ import java.util.Set; import org.eclipse.core.runtime.IProgressMonitor; import org.eclipse.jface.action.IAction; +import org.eclipse.jface.dialogs.MessageDialog; import org.eclipse.jface.viewers.ISelection; +import org.gluster.storage.management.client.VolumesClient; +import org.gluster.storage.management.console.GlusterDataModelManager; +import org.gluster.storage.management.console.IImageKeys; +import org.gluster.storage.management.console.utils.GUIHelper; +import org.gluster.storage.management.core.constants.CoreConstants; +import org.gluster.storage.management.core.model.Volume; +import org.gluster.storage.management.core.model.Volume.VOLUME_STATUS; -import com.gluster.storage.management.client.VolumesClient; -import com.gluster.storage.management.console.GlusterDataModelManager; -import com.gluster.storage.management.console.utils.GUIHelper; -import com.gluster.storage.management.core.constants.CoreConstants; -import com.gluster.storage.management.core.model.Volume; -import com.gluster.storage.management.core.model.Volume.VOLUME_STATUS; public class StartVolumeAction extends AbstractMonitoredActionDelegate { //private Volume volume; @@ -52,12 +54,28 @@ public class StartVolumeAction extends AbstractMonitoredActionDelegate { } VolumesClient vc = new VolumesClient(); - Volume newVolume = new Volume(); List<String> startedVolumes = new ArrayList<String>(); List<String> failedVolumes = new ArrayList<String>(); String errorMessage = ""; - + List<String> cifsVolumes = GlusterDataModelManager.getInstance().getCifsEnabledVolumeNames(selectedVolumes); + List<String> offlineServers = GlusterDataModelManager.getInstance().getOfflineServers(); + // One or more servers are offline, Show warning if cifs is enabled + if (cifsVolumes != null && cifsVolumes.size() > 0 && offlineServers != null && offlineServers.size() > 0) { + Integer userAction = new MessageDialog(getShell(), "CIFS configuration", GUIHelper.getInstance().getImage( + IImageKeys.VOLUME_16x16), + "Performing CIFS updates when one or more servers are offline can trigger " + + "inconsistent behavior for CIFS accesses in the cluster." + CoreConstants.NEWLINE + + "Are you sure you want to continue?", MessageDialog.QUESTION, + new String[] { "No", "Yes" }, -1).open(); + if (userAction != 1) { + return; // Do not start volume services + } + } + monitor.beginTask("Starting Selected Volumes...", selectedVolumes.size()); + // Starting of a volume results in changes to the model, and ultimately updates the "selectedVolumes" list, + // over which we are iterating, thus resulting in ConcurrentModificationException. To avoid this, we iterate + // over an array obtained from the list. for (Volume volume : selectedVolumes.toArray(new Volume[0])) { if(monitor.isCanceled()) { break; @@ -68,7 +86,8 @@ public class StartVolumeAction extends AbstractMonitoredActionDelegate { } try { monitor.setTaskName("Starting volume [" + volume.getName() + "]"); - vc.startVolume(volume.getName()); + vc.startVolume(volume.getName(), false); + modelManager.updateVolumeStatus(volume, VOLUME_STATUS.ONLINE); startedVolumes.add(volume.getName()); } catch (Exception e) { failedVolumes.add(volume.getName()); @@ -78,10 +97,10 @@ public class StartVolumeAction extends AbstractMonitoredActionDelegate { } errorMessage += e.getMessage() + CoreConstants.NEWLINE; } + // Update the model by fetching latest volume info (NOT JUST STATUS) try { - newVolume = vc.getVolume(volume.getName()); - modelManager.volumeChanged(volume, newVolume); + modelManager.refreshVolumeData(volume); } catch (Exception e) { errorMessage += "Updating volume info failed on UI. [" + e.getMessage() + "]"; } @@ -91,15 +110,19 @@ public class StartVolumeAction extends AbstractMonitoredActionDelegate { // Display the success or failure info if (startedVolumes.size() == 0) { // No volume(s) started successfully - showErrorDialog(actionDesc, "Following volumes " + failedVolumes + " could not be started!" + showErrorDialog(actionDesc, "Volume(s) " + failedVolumes + " could not be started!" + CoreConstants.NEWLINE + "Error: [" + errorMessage + "]"); } else { - String info = "Volumes " + startedVolumes + " started successfully!"; - if (errorMessage != "") { + String info = "Volume(s) " + startedVolumes + " started successfully!"; + if (!errorMessage.equals("")) { info += CoreConstants.NEWLINE + CoreConstants.NEWLINE + "Volumes " + failedVolumes + " failed to start! [" + errorMessage + "]"; } - showInfoDialog(actionDesc, info); + if (selectedVolumes.size() == startedVolumes.size()) { + showInfoDialog(actionDesc, info); + } else { + showWarningDialog(actionDesc, info); + } } } diff --git a/src/org.gluster.storage.management.console/src/org/gluster/storage/management/console/actions/StopTaskAction.java b/src/org.gluster.storage.management.console/src/org/gluster/storage/management/console/actions/StopTaskAction.java new file mode 100644 index 00000000..1a387414 --- /dev/null +++ b/src/org.gluster.storage.management.console/src/org/gluster/storage/management/console/actions/StopTaskAction.java @@ -0,0 +1,65 @@ +/******************************************************************************* + * Copyright (c) 2006-2011 Gluster, Inc. <http://www.gluster.com> + * This file is part of Gluster Management Console. + * + * Gluster Management Console is free software; you can redistribute + * it and/or modify it under the terms of the GNU General Public + * License as published by the Free Software Foundation; either + * version 3 of the License, or (at your option) any later version. + * + * Gluster Management Console is distributed in the hope that it + * will be useful, but WITHOUT ANY WARRANTY; without even the + * implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR + * PURPOSE. See the GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program. If not, see + * <http://www.gnu.org/licenses/>. + *******************************************************************************/ +package org.gluster.storage.management.console.actions; + +import org.eclipse.jface.action.IAction; +import org.eclipse.jface.viewers.ISelection; +import org.gluster.storage.management.client.TasksClient; +import org.gluster.storage.management.console.GlusterDataModelManager; +import org.gluster.storage.management.core.model.Status; +import org.gluster.storage.management.core.model.TaskInfo; + + +public class StopTaskAction extends AbstractActionDelegate { + private TaskInfo taskInfo; + private GlusterDataModelManager modelManager = GlusterDataModelManager.getInstance(); + + @Override + protected void performAction(final IAction action) { + final String actionDesc = action.getDescription(); + + try { + new TasksClient().stopTask(taskInfo.getName()); + // On successful stop clear from the task list + modelManager.removeTask(taskInfo); + action.setEnabled(false); // TODO disable other task buttons + } catch (Exception e) { + showErrorDialog(actionDesc, + "Task [" + taskInfo.getDescription() + "] could not be Stopped! Error: [" + e.getMessage() + "]"); + } + } + + @Override + public void selectionChanged(IAction action, ISelection selection) { + super.selectionChanged(action, selection); + action.setEnabled(false); + if (selectedEntity instanceof TaskInfo) { + taskInfo = (TaskInfo) selectedEntity; + action.setEnabled(taskInfo.getStopSupported() + && (taskInfo.getStatus().getCode() == Status.STATUS_CODE_PAUSE + || taskInfo.getStatus().getCode() == Status.STATUS_CODE_RUNNING || taskInfo.getStatus() + .getCode() == Status.STATUS_CODE_ERROR)); + } + } + + @Override + public void dispose() { + } + +} diff --git a/src/org.gluster.storage.management.console/src/org/gluster/storage/management/console/actions/StopVolumeAction.java b/src/org.gluster.storage.management.console/src/org/gluster/storage/management/console/actions/StopVolumeAction.java new file mode 100644 index 00000000..cd5d3caf --- /dev/null +++ b/src/org.gluster.storage.management.console/src/org/gluster/storage/management/console/actions/StopVolumeAction.java @@ -0,0 +1,228 @@ +/******************************************************************************* + * Copyright (c) 2006-2011 Gluster, Inc. <http://www.gluster.com> + * This file is part of Gluster Management Console. + * + * Gluster Management Console is free software; you can redistribute + * it and/or modify it under the terms of the GNU General Public + * License as published by the Free Software Foundation; either + * version 3 of the License, or (at your option) any later version. + * + * Gluster Management Console is distributed in the hope that it + * will be useful, but WITHOUT ANY WARRANTY; without even the + * implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR + * PURPOSE. See the GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program. If not, see + * <http://www.gnu.org/licenses/>. + *******************************************************************************/ +package org.gluster.storage.management.console.actions; + +import java.util.ArrayList; +import java.util.List; +import java.util.Set; + +import org.eclipse.core.runtime.IProgressMonitor; +import org.eclipse.jface.action.IAction; +import org.eclipse.jface.dialogs.MessageDialog; +import org.eclipse.jface.viewers.ISelection; +import org.gluster.storage.management.client.VolumesClient; +import org.gluster.storage.management.console.GlusterDataModelManager; +import org.gluster.storage.management.console.IImageKeys; +import org.gluster.storage.management.console.utils.GUIHelper; +import org.gluster.storage.management.core.constants.CoreConstants; +import org.gluster.storage.management.core.model.Volume; +import org.gluster.storage.management.core.model.Volume.VOLUME_STATUS; + + +public class StopVolumeAction extends AbstractMonitoredActionDelegate { + private GlusterDataModelManager modelManager = GlusterDataModelManager.getInstance(); + private List<Volume> selectedVolumes = new ArrayList<Volume>(); + private List<String> selectedVolumeNames = new ArrayList<String>(); + private List<String> onlineVolumeNames = new ArrayList<String>(); + private List<String> stoppedVolumes = new ArrayList<String>(); + private List<Volume> failedVolumes = new ArrayList<Volume>(); + private String errorMessage = null; + + @Override + protected void performAction(final IAction action, IProgressMonitor monitor) { + collectVolumeNames(); + + if (onlineVolumeNames.size() == 0) { + showWarningDialog(action.getDescription(), "Volumes " + selectedVolumeNames + " already stopped!"); + return; // Volumes already stopped, Don't do anything. + } + + Integer userAction = new MessageDialog(getShell(), "Stop Volume", GUIHelper.getInstance().getImage( + IImageKeys.VOLUME_16x16), "Are you sure you want to stop the following volumes?" + + CoreConstants.NEWLINE + onlineVolumeNames, MessageDialog.QUESTION, + new String[] { "No", "Yes" }, -1).open(); + + if (userAction <= 0) { // user select cancel or pressed escape key + return; + } + + List<String> cifsVolumes = GlusterDataModelManager.getInstance().getCifsEnabledVolumeNames(selectedVolumes); + List<String> offlineServers = GlusterDataModelManager.getInstance().getOfflineServers(); + // One or more servers are offline, Show warning if cifs is enabled + if (cifsVolumes != null && cifsVolumes.size() > 0 && offlineServers != null && offlineServers.size() > 0) { + userAction = new MessageDialog(getShell(), "CIFS configuration", GUIHelper.getInstance().getImage( + IImageKeys.VOLUME_16x16), + "Performing CIFS updates when one or more servers are offline can trigger " + + "inconsistent behavior for CIFS accesses in the cluster." + CoreConstants.NEWLINE + + "Are you sure you want to continue?", MessageDialog.QUESTION, + new String[] { "No", "Yes" }, -1).open(); + if (userAction != 1) { + return; // Do not stop volume services + } + } + + stopVolumes(selectedVolumes, false, monitor); + + // Check for errors, trying to force stop in case of errors + checkForErrors(action, monitor, true); + } + + private void checkForErrors(final IAction action, IProgressMonitor monitor, boolean tryForceStop) { + String message = null; + if (stoppedVolumes.size() == 0) { // No volume(s) stopped successfully + message = "Volume(s) " + failedVolumes + " could not be stopped! " + CoreConstants.NEWLINE + + "Error: [" + errorMessage + "]"; + if(tryForceStop) { + forceStopVolumes(action.getDescription(), message + CoreConstants.NEWLINE + + "Do you want to stop forcefully?", monitor); + // check for errors without trying to force stop in case of errors + checkForErrors(action, monitor, false); + return; + } else { + showErrorDialog(action.getDescription(), message); + return; + } + } else { + message = "Volume(s) " + stoppedVolumes + " stopped successfully!"; + if (!errorMessage.isEmpty()) { + if (failedVolumes.size() > 0) { + message = message + CoreConstants.NEWLINE + CoreConstants.NEWLINE + "Volume(s) " + + failedVolumes + " could not be stopped! [" + errorMessage + "]"; + if(tryForceStop) { + forceStopVolumes(action.getDescription(), message + CoreConstants.NEWLINE + + "Do you want to stop forcefully?", monitor); + // check for errors without trying to force stop in case of errors + checkForErrors(action, monitor, false); + return; + } + } else { // Stop volume success, but post stop volume fails, append the error message + message += CoreConstants.NEWLINE + CoreConstants.NEWLINE + errorMessage; + } + } + + if (errorMessage.isEmpty()) { + showInfoDialog(action.getDescription(), message); + } else { + showWarningDialog(action.getDescription(), message); + } + } + } + + private void forceStopVolumes(String actionDesc, String message, IProgressMonitor monitor) { + boolean forceStop = showConfirmDialog(actionDesc, message); + if (!forceStop) { + return; + } + stopVolumes(failedVolumes, true, monitor); + } + + private void stopVolumes(List<Volume> volumes, Boolean force, IProgressMonitor monitor) { + VolumesClient vc = new VolumesClient(); + stoppedVolumes.clear(); + failedVolumes.clear(); + errorMessage = ""; + + monitor.beginTask("Stopping Selected Volumes...", volumes.size()); + // Stopping of a volume results in changes to the model, and ultimately updates the "selectedVolumes" list, + // over which we are iterating, thus resulting in ConcurrentModificationException. To avoid this, we iterate + // over an array obtained from the list. + for (Volume volume : volumes.toArray(new Volume[0])) { + if(monitor.isCanceled()) { + break; + } + + if (volume.getStatus() == VOLUME_STATUS.OFFLINE) { + monitor.worked(1); + continue; // skip if already stopped + } + try { + monitor.setTaskName("Stopping volume [" + volume.getName() + "]"); + vc.stopVolume(volume.getName(), force); + stoppedVolumes.add(volume.getName()); + modelManager.updateVolumeStatus(volume, VOLUME_STATUS.OFFLINE); + } catch (Exception e) { + // If any post volume stop activity failed, update the volume status + if (vc.getVolume(volume.getName()).getStatus() == VOLUME_STATUS.OFFLINE) { + // stop volume succeed, so add it to stoppedVolumes + stoppedVolumes.add(volume.getName()); + modelManager.updateVolumeStatus(volume, VOLUME_STATUS.OFFLINE); + errorMessage += "Volume [" + volume.getName() + "] stopped, but following error occured: [" + + e.getMessage() + "]"; + } else { + failedVolumes.add(volume); + errorMessage += "[" + volume.getName() + "] : " + e.getMessage() + CoreConstants.NEWLINE; + } + } + + // Update the model by fetching latest volume info (NOT JUST STATUS) + try { + modelManager.refreshVolumeData(volume); + } catch (Exception e) { + errorMessage += "Failed to update volume info on UI. [" + e.getMessage() + "]"; + } + monitor.worked(1); + } + monitor.done(); + } + + private void collectVolumeNames() { + selectedVolumeNames.clear(); + onlineVolumeNames.clear(); + for (Volume volume : selectedVolumes) { + selectedVolumeNames.add(volume.getName()); + if (volume.getStatus() == VOLUME_STATUS.ONLINE) { + onlineVolumeNames.add(volume.getName()); + } + } + } + + @Override + public void dispose() { + } + + /* + * (non-Javadoc) + * + * @see + * org.gluster.storage.management.console.actions.AbstractActionDelegate#selectionChanged(org.eclipse.jface.action.IAction + * , org.eclipse.jface.viewers.ISelection) + */ + @Override + public void selectionChanged(IAction action, ISelection selection) { + Set<Volume> selectedVolumeNames = GUIHelper.getInstance().getSelectedEntities(getWindow(), Volume.class); + selectedVolumes.clear(); + if (selectedVolumeNames == null || selectedVolumeNames.isEmpty()) { + super.selectionChanged(action, selection); + if (selectedEntity instanceof Volume) { + selectedVolumes.add((Volume) selectedEntity); + } + } else { + selectedVolumes.addAll(selectedVolumeNames); //TODO reverse the collection to maintain the selected order + } + + action.setEnabled(false); + // To enable the action + for (Volume volume : selectedVolumes) { + if (volume.getStatus() == VOLUME_STATUS.ONLINE) { + action.setEnabled(true); + break; // If find an online volume, enable the action + } + } + } +} diff --git a/src/com.gluster.storage.management.console/src/com/gluster/storage/management/console/actions/SupportAction.java b/src/org.gluster.storage.management.console/src/org/gluster/storage/management/console/actions/SupportAction.java index 5d0bc833..00970c8b 100644 --- a/src/com.gluster.storage.management.console/src/com/gluster/storage/management/console/actions/SupportAction.java +++ b/src/org.gluster.storage.management.console/src/org/gluster/storage/management/console/actions/SupportAction.java @@ -1,26 +1,26 @@ /******************************************************************************* - * Copyright (c) 2011 Gluster, Inc. <http://www.gluster.com> + * Copyright (c) 2006-2011 Gluster, Inc. <http://www.gluster.com> * This file is part of Gluster Management Console. * - * Gluster Management Console is free software; you can redistribute it and/or - * modify it under the terms of the GNU Affero General Public License as published - * by the Free Software Foundation; either version 3 of the License, or - * (at your option) any later version. - * - * Gluster Management Console is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY - * or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Affero General Public License - * for more details. - * - * You should have received a copy of the GNU Affero General Public License - * along with this program. If not, see + * Gluster Management Console is free software; you can redistribute + * it and/or modify it under the terms of the GNU General Public + * License as published by the Free Software Foundation; either + * version 3 of the License, or (at your option) any later version. + * + * Gluster Management Console is distributed in the hope that it + * will be useful, but WITHOUT ANY WARRANTY; without even the + * implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR + * PURPOSE. See the GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program. If not, see * <http://www.gnu.org/licenses/>. *******************************************************************************/ -package com.gluster.storage.management.console.actions; +package org.gluster.storage.management.console.actions; import org.eclipse.jface.action.IAction; +import org.gluster.storage.management.console.dialogs.GlusterSupportDialog; -import com.gluster.storage.management.console.dialogs.GlusterSupportDialog; /** * @@ -28,7 +28,7 @@ import com.gluster.storage.management.console.dialogs.GlusterSupportDialog; public class SupportAction extends AbstractActionDelegate { /* (non-Javadoc) - * @see com.gluster.storage.management.console.actions.AbstractActionDelegate#performAction(org.eclipse.jface.action.IAction) + * @see org.gluster.storage.management.console.actions.AbstractActionDelegate#performAction(org.eclipse.jface.action.IAction) */ @Override protected void performAction(IAction action) { diff --git a/src/com.gluster.storage.management.console/src/com/gluster/storage/management/console/actions/TerminalAction.java b/src/org.gluster.storage.management.console/src/org/gluster/storage/management/console/actions/TerminalAction.java index 992cc11b..5f65611e 100644 --- a/src/com.gluster.storage.management.console/src/com/gluster/storage/management/console/actions/TerminalAction.java +++ b/src/org.gluster.storage.management.console/src/org/gluster/storage/management/console/actions/TerminalAction.java @@ -1,26 +1,26 @@ /******************************************************************************* - * Copyright (c) 2011 Gluster, Inc. <http://www.gluster.com> + * Copyright (c) 2006-2011 Gluster, Inc. <http://www.gluster.com> * This file is part of Gluster Management Console. * - * Gluster Management Console is free software; you can redistribute it and/or - * modify it under the terms of the GNU Affero General Public License as published - * by the Free Software Foundation; either version 3 of the License, or - * (at your option) any later version. - * - * Gluster Management Console is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY - * or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Affero General Public License - * for more details. - * - * You should have received a copy of the GNU Affero General Public License - * along with this program. If not, see + * Gluster Management Console is free software; you can redistribute + * it and/or modify it under the terms of the GNU General Public + * License as published by the Free Software Foundation; either + * version 3 of the License, or (at your option) any later version. + * + * Gluster Management Console is distributed in the hope that it + * will be useful, but WITHOUT ANY WARRANTY; without even the + * implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR + * PURPOSE. See the GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program. If not, see * <http://www.gnu.org/licenses/>. *******************************************************************************/ -package com.gluster.storage.management.console.actions; +package org.gluster.storage.management.console.actions; import org.eclipse.jface.action.IAction; +import org.gluster.storage.management.console.utils.GUIHelper; -import com.gluster.storage.management.console.utils.GUIHelper; /** * @@ -35,7 +35,7 @@ public class TerminalAction extends AbstractActionDelegate { } /* (non-Javadoc) - * @see com.gluster.storage.management.console.actions.AbstractActionDelegate#performAction(org.eclipse.jface.action.IAction) + * @see org.gluster.storage.management.console.actions.AbstractActionDelegate#performAction(org.eclipse.jface.action.IAction) */ @Override protected void performAction(IAction action) { diff --git a/src/com.gluster.storage.management.console/src/com/gluster/storage/management/console/actions/TestPopupMenuAction.java b/src/org.gluster.storage.management.console/src/org/gluster/storage/management/console/actions/TestPopupMenuAction.java index 0cf32adf..6fcf7d48 100644 --- a/src/com.gluster.storage.management.console/src/com/gluster/storage/management/console/actions/TestPopupMenuAction.java +++ b/src/org.gluster.storage.management.console/src/org/gluster/storage/management/console/actions/TestPopupMenuAction.java @@ -1,22 +1,22 @@ /******************************************************************************* - * Copyright (c) 2011 Gluster, Inc. <http://www.gluster.com> + * Copyright (c) 2006-2011 Gluster, Inc. <http://www.gluster.com> * This file is part of Gluster Management Console. * - * Gluster Management Console is free software; you can redistribute it and/or - * modify it under the terms of the GNU Affero General Public License as published - * by the Free Software Foundation; either version 3 of the License, or - * (at your option) any later version. - * - * Gluster Management Console is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY - * or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Affero General Public License - * for more details. - * - * You should have received a copy of the GNU Affero General Public License - * along with this program. If not, see + * Gluster Management Console is free software; you can redistribute + * it and/or modify it under the terms of the GNU General Public + * License as published by the Free Software Foundation; either + * version 3 of the License, or (at your option) any later version. + * + * Gluster Management Console is distributed in the hope that it + * will be useful, but WITHOUT ANY WARRANTY; without even the + * implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR + * PURPOSE. See the GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program. If not, see * <http://www.gnu.org/licenses/>. *******************************************************************************/ -package com.gluster.storage.management.console.actions; +package org.gluster.storage.management.console.actions; import org.eclipse.jface.action.IAction; import org.eclipse.jface.dialogs.MessageDialog; diff --git a/src/org.gluster.storage.management.console/src/org/gluster/storage/management/console/actions/VolumeLogRotateAction.java b/src/org.gluster.storage.management.console/src/org/gluster/storage/management/console/actions/VolumeLogRotateAction.java new file mode 100644 index 00000000..15bc99f0 --- /dev/null +++ b/src/org.gluster.storage.management.console/src/org/gluster/storage/management/console/actions/VolumeLogRotateAction.java @@ -0,0 +1,82 @@ +/******************************************************************************* + * Copyright (c) 2006-2011 Gluster, Inc. <http://www.gluster.com> + * This file is part of Gluster Management Console. + * + * Gluster Management Console is free software; you can redistribute + * it and/or modify it under the terms of the GNU General Public + * License as published by the Free Software Foundation; either + * version 3 of the License, or (at your option) any later version. + * + * Gluster Management Console is distributed in the hope that it + * will be useful, but WITHOUT ANY WARRANTY; without even the + * implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR + * PURPOSE. See the GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program. If not, see + * <http://www.gnu.org/licenses/>. + *******************************************************************************/ +package org.gluster.storage.management.console.actions; +import java.util.ArrayList; +import java.util.List; +import java.util.Set; + +import org.eclipse.jface.action.IAction; +import org.eclipse.jface.viewers.ISelection; +import org.eclipse.ui.IWorkbenchPart; +import org.gluster.storage.management.client.VolumesClient; +import org.gluster.storage.management.console.utils.GUIHelper; +import org.gluster.storage.management.console.views.VolumeBricksView; +import org.gluster.storage.management.core.model.Brick; +import org.gluster.storage.management.core.model.Volume; +import org.gluster.storage.management.core.utils.GlusterCoreUtil; + + + +public class VolumeLogRotateAction extends AbstractActionDelegate { + + private Volume volume; + private GUIHelper guiHelper = GUIHelper.getInstance(); + private Set<Brick> bricks; + + @Override + public void dispose() { + } + + @Override + protected void performAction(IAction action) { + final String actionDesc = action.getDescription(); + List<String> selectedBricks = new ArrayList<String>(); + boolean confirmed = showConfirmDialog(actionDesc, + "Are you sure you want to Rotate logs for volume [" + volume.getName() + "] ? "); + if (!confirmed) { + return; + } + + if (bricks != null) { + selectedBricks = GlusterCoreUtil.getQualifiedBrickList(bricks); + } + try { + new VolumesClient().volumeLogRotate(volume.getName(), selectedBricks); + showInfoDialog(actionDesc, "Volume logs for [" + volume.getName() + "] rotated successfully!"); + } catch (Exception e) { + showErrorDialog(actionDesc, "Volume [" + volume.getName() + "] log rotation failed! Error: [" + e.getMessage() + "]"); + } + } + + @Override + public void selectionChanged(IAction action, ISelection selection) { + super.selectionChanged(action, selection); + volume = guiHelper.getSelectedEntity(window, Volume.class); + + if (volume != null) { + // a volume is selected on navigation tree. Let's check if the currently open view is volume bricks view + IWorkbenchPart view = guiHelper.getActiveView(); + if (view instanceof VolumeBricksView) { + // volume bricks view is open. check if any brick is selected + bricks = GUIHelper.getInstance().getSelectedEntities(getWindow(), Brick.class); + } + } + } + +} diff --git a/src/com.gluster.storage.management.console/src/com/gluster/storage/management/console/dialogs/AddBrickPage.java b/src/org.gluster.storage.management.console/src/org/gluster/storage/management/console/dialogs/AddBrickPage.java index b2cb3582..9c87a580 100644 --- a/src/com.gluster.storage.management.console/src/com/gluster/storage/management/console/dialogs/AddBrickPage.java +++ b/src/org.gluster.storage.management.console/src/org/gluster/storage/management/console/dialogs/AddBrickPage.java @@ -1,24 +1,22 @@ -/** - * AddDiskPage.java - * - * Copyright (c) 2011 Gluster, Inc. <http://www.gluster.com> +/******************************************************************************* + * Copyright (c) 2006-2011 Gluster, Inc. <http://www.gluster.com> * This file is part of Gluster Management Console. * - * Gluster Management Console is free software; you can redistribute it and/or - * modify it under the terms of the GNU Affero General Public License as published - * by the Free Software Foundation; either version 3 of the License, or - * (at your option) any later version. + * Gluster Management Console is free software; you can redistribute + * it and/or modify it under the terms of the GNU General Public + * License as published by the Free Software Foundation; either + * version 3 of the License, or (at your option) any later version. * - * Gluster Management Console is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY - * or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Affero General Public License - * for more details. + * Gluster Management Console is distributed in the hope that it + * will be useful, but WITHOUT ANY WARRANTY; without even the + * implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR + * PURPOSE. See the GNU General Public License for more details. * - * You should have received a copy of the GNU Affero General Public License - * along with this program. If not, see + * You should have received a copy of the GNU General Public License + * along with this program. If not, see * <http://www.gnu.org/licenses/>. - */ -package com.gluster.storage.management.console.dialogs; + *******************************************************************************/ +package org.gluster.storage.management.console.dialogs; import java.util.ArrayList; import java.util.HashSet; @@ -28,12 +26,12 @@ import java.util.Set; import org.eclipse.jface.wizard.WizardPage; import org.eclipse.swt.SWT; import org.eclipse.swt.widgets.Composite; +import org.gluster.storage.management.console.GlusterDataModelManager; +import org.gluster.storage.management.core.model.Brick; +import org.gluster.storage.management.core.model.Device; +import org.gluster.storage.management.core.model.Volume; +import org.gluster.storage.management.core.model.Volume.VOLUME_TYPE; -import com.gluster.storage.management.console.GlusterDataModelManager; -import com.gluster.storage.management.core.model.Brick; -import com.gluster.storage.management.core.model.Device; -import com.gluster.storage.management.core.model.Volume; -import com.gluster.storage.management.core.model.Volume.VOLUME_TYPE; import com.richclientgui.toolbox.duallists.DualListComposite.ListContentChangedListener; import com.richclientgui.toolbox.duallists.IRemovableContentProvider; @@ -43,7 +41,6 @@ import com.richclientgui.toolbox.duallists.IRemovableContentProvider; */ public class AddBrickPage extends WizardPage { private List<Device> availableDevices = new ArrayList<Device>(); - private List<Device> selectedDevices = new ArrayList<Device>(); private Volume volume = null; private BricksSelectionPage page = null; diff --git a/src/com.gluster.storage.management.console/src/com/gluster/storage/management/console/dialogs/AddBrickWizard.java b/src/org.gluster.storage.management.console/src/org/gluster/storage/management/console/dialogs/AddBrickWizard.java index 734dd5e4..e2918721 100644 --- a/src/com.gluster.storage.management.console/src/com/gluster/storage/management/console/dialogs/AddBrickWizard.java +++ b/src/org.gluster.storage.management.console/src/org/gluster/storage/management/console/dialogs/AddBrickWizard.java @@ -1,36 +1,34 @@ -/** - * AddDiskWizard.java - * - * Copyright (c) 2011 Gluster, Inc. <http://www.gluster.com> +/******************************************************************************* + * Copyright (c) 2006-2011 Gluster, Inc. <http://www.gluster.com> * This file is part of Gluster Management Console. * - * Gluster Management Console is free software; you can redistribute it and/or - * modify it under the terms of the GNU Affero General Public License as published - * by the Free Software Foundation; either version 3 of the License, or - * (at your option) any later version. + * Gluster Management Console is free software; you can redistribute + * it and/or modify it under the terms of the GNU General Public + * License as published by the Free Software Foundation; either + * version 3 of the License, or (at your option) any later version. * - * Gluster Management Console is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY - * or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Affero General Public License - * for more details. + * Gluster Management Console is distributed in the hope that it + * will be useful, but WITHOUT ANY WARRANTY; without even the + * implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR + * PURPOSE. See the GNU General Public License for more details. * - * You should have received a copy of the GNU Affero General Public License - * along with this program. If not, see + * You should have received a copy of the GNU General Public License + * along with this program. If not, see * <http://www.gnu.org/licenses/>. - */ -package com.gluster.storage.management.console.dialogs; + *******************************************************************************/ +package org.gluster.storage.management.console.dialogs; import java.util.HashSet; import java.util.Set; import org.eclipse.jface.dialogs.MessageDialog; import org.eclipse.jface.wizard.Wizard; +import org.gluster.storage.management.client.VolumesClient; +import org.gluster.storage.management.console.GlusterDataModelManager; +import org.gluster.storage.management.core.model.Brick; +import org.gluster.storage.management.core.model.Volume; +import org.gluster.storage.management.core.utils.StringUtil; -import com.gluster.storage.management.client.VolumesClient; -import com.gluster.storage.management.console.GlusterDataModelManager; -import com.gluster.storage.management.core.model.Brick; -import com.gluster.storage.management.core.model.Volume; -import com.gluster.storage.management.core.utils.StringUtil; /** * diff --git a/src/com.gluster.storage.management.console/src/com/gluster/storage/management/console/dialogs/BricksSelectionPage.java b/src/org.gluster.storage.management.console/src/org/gluster/storage/management/console/dialogs/BricksSelectionPage.java index 5ec12a74..68e784d5 100644 --- a/src/com.gluster.storage.management.console/src/com/gluster/storage/management/console/dialogs/BricksSelectionPage.java +++ b/src/org.gluster.storage.management.console/src/org/gluster/storage/management/console/dialogs/BricksSelectionPage.java @@ -1,22 +1,22 @@ /******************************************************************************* - * Copyright (c) 2011 Gluster, Inc. <http://www.gluster.com> + * Copyright (c) 2006-2011 Gluster, Inc. <http://www.gluster.com> * This file is part of Gluster Management Console. * - * Gluster Management Console is free software; you can redistribute it and/or - * modify it under the terms of the GNU Affero General Public License as published - * by the Free Software Foundation; either version 3 of the License, or - * (at your option) any later version. - * - * Gluster Management Console is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY - * or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Affero General Public License - * for more details. - * - * You should have received a copy of the GNU Affero General Public License - * along with this program. If not, see + * Gluster Management Console is free software; you can redistribute + * it and/or modify it under the terms of the GNU General Public + * License as published by the Free Software Foundation; either + * version 3 of the License, or (at your option) any later version. + * + * Gluster Management Console is distributed in the hope that it + * will be useful, but WITHOUT ANY WARRANTY; without even the + * implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR + * PURPOSE. See the GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program. If not, see * <http://www.gnu.org/licenses/>. *******************************************************************************/ -package com.gluster.storage.management.console.dialogs; +package org.gluster.storage.management.console.dialogs; import java.util.ArrayList; import java.util.HashSet; @@ -36,16 +36,15 @@ import org.eclipse.swt.widgets.Composite; import org.eclipse.swt.widgets.Label; import org.eclipse.swt.widgets.TableItem; import org.eclipse.swt.widgets.Text; +import org.gluster.storage.management.console.IImageKeys; +import org.gluster.storage.management.console.TableLabelProviderAdapter; +import org.gluster.storage.management.console.utils.EntityViewerFilter; +import org.gluster.storage.management.console.utils.GUIHelper; +import org.gluster.storage.management.core.model.Brick; +import org.gluster.storage.management.core.model.Brick.BRICK_STATUS; +import org.gluster.storage.management.core.model.Device; +import org.gluster.storage.management.core.utils.NumberUtil; -import com.gluster.storage.management.console.IImageKeys; -import com.gluster.storage.management.console.TableLabelProviderAdapter; -import com.gluster.storage.management.console.utils.EntityViewerFilter; -import com.gluster.storage.management.console.utils.GUIHelper; -import com.gluster.storage.management.core.model.Brick; -import com.gluster.storage.management.core.model.Brick.BRICK_STATUS; -import com.gluster.storage.management.core.model.Device; -import com.gluster.storage.management.core.model.Disk; -import com.gluster.storage.management.core.utils.NumberUtil; import com.richclientgui.toolbox.duallists.CustomTableDualListComposite; import com.richclientgui.toolbox.duallists.DualListComposite.ListContentChangedListener; import com.richclientgui.toolbox.duallists.IRemovableContentProvider; @@ -106,15 +105,6 @@ public class BricksSelectionPage extends Composite { }; } - private int indexOf(List<Disk> disks, Disk searchDisk) { - for (Disk disk : disks) { - if (disk.getQualifiedName().equals(searchDisk.getQualifiedName())) { - return disks.indexOf(disk); - } - } - return -1; - } - private void createPage(List<Device> allDevice, List<Device> selectedDevice, String volumeName) { setupPageLayout(); @@ -130,7 +120,7 @@ public class BricksSelectionPage extends Composite { buttonContainerData.minimumWidth = 40; buttonContainer.setLayoutData(buttonContainerData); - btnUp = new Button(buttonContainer, SWT.TOGGLE); + btnUp = new Button(buttonContainer, SWT.PUSH); GridData btnUpData = new GridData(SWT.LEFT, SWT.BOTTOM, true, false); btnUpData.minimumWidth = 30; btnUp.setLayoutData(btnUpData); @@ -155,8 +145,10 @@ public class BricksSelectionPage extends Composite { } }); - btnDown = new Button(buttonContainer, SWT.TOGGLE); - btnDown.setLayoutData(new GridData(SWT.LEFT, SWT.TOP, true, false)); + btnDown = new Button(buttonContainer, SWT.PUSH); + GridData btnDownData = new GridData(SWT.LEFT, SWT.TOP, true, false); + btnDownData.minimumWidth = 30; + btnDown.setLayoutData(btnDownData); btnDown.setImage(guiHelper.getImage(IImageKeys.ARROW_DOWN_16x16)); btnDown.addSelectionListener(new SelectionAdapter() { @@ -306,7 +298,7 @@ public class BricksSelectionPage extends Composite { } public List<Device> getChosenDevices() { - Object[] devicesArr = (Object[]) chosenBricksContentProvider.getElements(dualTableViewer); + Object[] devicesArr = chosenBricksContentProvider.getElements(dualTableViewer); if (devicesArr != null) { List<Device> devices = new ArrayList<Device>(); for (Object device : devicesArr) { @@ -318,7 +310,7 @@ public class BricksSelectionPage extends Composite { } public Set<Brick> getChosenBricks(String volumeName) { - Object[] bricksArr = (Object[]) chosenBricksContentProvider.getElements(dualTableViewer); + Object[] bricksArr = chosenBricksContentProvider.getElements(dualTableViewer); if (bricksArr != null) { Set<Brick> bricks = new HashSet<Brick>(); diff --git a/src/com.gluster.storage.management.console/src/com/gluster/storage/management/console/dialogs/ChangePasswordDialog.java b/src/org.gluster.storage.management.console/src/org/gluster/storage/management/console/dialogs/ChangePasswordDialog.java index 1576ffe3..60386b75 100644 --- a/src/com.gluster.storage.management.console/src/com/gluster/storage/management/console/dialogs/ChangePasswordDialog.java +++ b/src/org.gluster.storage.management.console/src/org/gluster/storage/management/console/dialogs/ChangePasswordDialog.java @@ -1,24 +1,22 @@ -/** - * ChangePasswordDialog.java - * - * Copyright (c) 2011 Gluster, Inc. <http://www.gluster.com> +/******************************************************************************* + * Copyright (c) 2006-2011 Gluster, Inc. <http://www.gluster.com> * This file is part of Gluster Management Console. * - * Gluster Management Console is free software; you can redistribute it and/or - * modify it under the terms of the GNU Affero General Public License as published - * by the Free Software Foundation; either version 3 of the License, or - * (at your option) any later version. + * Gluster Management Console is free software; you can redistribute + * it and/or modify it under the terms of the GNU General Public + * License as published by the Free Software Foundation; either + * version 3 of the License, or (at your option) any later version. * - * Gluster Management Console is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY - * or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Affero General Public License - * for more details. + * Gluster Management Console is distributed in the hope that it + * will be useful, but WITHOUT ANY WARRANTY; without even the + * implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR + * PURPOSE. See the GNU General Public License for more details. * - * You should have received a copy of the GNU Affero General Public License - * along with this program. If not, see + * You should have received a copy of the GNU General Public License + * along with this program. If not, see * <http://www.gnu.org/licenses/>. - */ -package com.gluster.storage.management.console.dialogs; + *******************************************************************************/ +package org.gluster.storage.management.console.dialogs; import org.eclipse.core.databinding.DataBindingContext; import org.eclipse.core.databinding.UpdateValueStrategy; @@ -45,12 +43,12 @@ import org.eclipse.swt.widgets.Display; import org.eclipse.swt.widgets.Label; import org.eclipse.swt.widgets.Shell; import org.eclipse.swt.widgets.Text; +import org.gluster.storage.management.client.UsersClient; +import org.gluster.storage.management.console.utils.GUIHelper; +import org.gluster.storage.management.console.validators.StringRequiredValidator; +import org.gluster.storage.management.core.constants.CoreConstants; +import org.gluster.storage.management.core.model.ConnectionDetails; -import com.gluster.storage.management.client.UsersClient; -import com.gluster.storage.management.console.utils.GUIHelper; -import com.gluster.storage.management.console.validators.StringRequiredValidator; -import com.gluster.storage.management.core.constants.CoreConstants; -import com.gluster.storage.management.core.model.ConnectionDetails; public class ChangePasswordDialog extends Dialog { public static final int RETURN_CODE_ERROR = 2; diff --git a/src/com.gluster.storage.management.console/src/com/gluster/storage/management/console/dialogs/ClusterSelectionDialog.java b/src/org.gluster.storage.management.console/src/org/gluster/storage/management/console/dialogs/ClusterSelectionDialog.java index ac510f5e..4a8ff50a 100644 --- a/src/com.gluster.storage.management.console/src/com/gluster/storage/management/console/dialogs/ClusterSelectionDialog.java +++ b/src/org.gluster.storage.management.console/src/org/gluster/storage/management/console/dialogs/ClusterSelectionDialog.java @@ -1,22 +1,22 @@ /******************************************************************************* - * Copyright (c) 2011 Gluster, Inc. <http://www.gluster.com> + * Copyright (c) 2006-2011 Gluster, Inc. <http://www.gluster.com> * This file is part of Gluster Management Console. * - * Gluster Management Console is free software; you can redistribute it and/or - * modify it under the terms of the GNU Affero General Public License as published - * by the Free Software Foundation; either version 3 of the License, or - * (at your option) any later version. - * - * Gluster Management Console is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY - * or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Affero General Public License - * for more details. - * - * You should have received a copy of the GNU Affero General Public License - * along with this program. If not, see + * Gluster Management Console is free software; you can redistribute + * it and/or modify it under the terms of the GNU General Public + * License as published by the Free Software Foundation; either + * version 3 of the License, or (at your option) any later version. + * + * Gluster Management Console is distributed in the hope that it + * will be useful, but WITHOUT ANY WARRANTY; without even the + * implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR + * PURPOSE. See the GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program. If not, see * <http://www.gnu.org/licenses/>. *******************************************************************************/ -package com.gluster.storage.management.console.dialogs; +package org.gluster.storage.management.console.dialogs; import java.util.List; @@ -30,6 +30,8 @@ import org.eclipse.swt.events.ModifyEvent; import org.eclipse.swt.events.ModifyListener; import org.eclipse.swt.events.SelectionAdapter; import org.eclipse.swt.events.SelectionEvent; +import org.eclipse.swt.events.ShellAdapter; +import org.eclipse.swt.events.ShellEvent; import org.eclipse.swt.events.TraverseEvent; import org.eclipse.swt.events.TraverseListener; import org.eclipse.swt.layout.GridData; @@ -41,15 +43,20 @@ import org.eclipse.swt.widgets.Control; import org.eclipse.swt.widgets.Label; import org.eclipse.swt.widgets.Shell; import org.eclipse.swt.widgets.Text; +import org.gluster.storage.management.console.Activator; +import org.gluster.storage.management.console.ConsoleConstants; +import org.gluster.storage.management.console.preferences.PreferenceConstants; +import org.gluster.storage.management.console.utils.GUIHelper; -import com.gluster.storage.management.console.Activator; -import com.gluster.storage.management.console.preferences.PreferenceConstants; -import com.gluster.storage.management.console.utils.GUIHelper; /** * Cluster selection dialog, which prompts for the cluster name to be managed */ public class ClusterSelectionDialog extends Dialog { + private static final String MESSAGE_SELECT_CLUSTER = "Select the Cluster you want to manage in this session."; + private static final String MESSAGE_CREATE_CLUSTER = "Create an empty Cluster and start adding servers to it."; + private static final String MESSAGE_REGISTER_CLUSTER = "Register an existing Cluster with the Management Gateway and start managing it using the Management Console."; + protected enum CLUSTER_MODE { SELECT, CREATE, REGISTER }; private Combo clusterNameCombo = null; @@ -162,8 +169,31 @@ public class ClusterSelectionDialog extends Dialog { createRadioButtons(); createSubComposites(); + setupAutoSelectionIfRequired(); + return composite; } + + private void setupAutoSelectionIfRequired() { + if (clusters.size() == 0) { + return; + } + + final String clusterName = System.getProperty(ConsoleConstants.PROPERTY_AUTO_CLUSTER_NAME, null); + if (clusterName == null) { + return; + } + + getShell().addShellListener(new ShellAdapter() { + @Override + public void shellActivated(ShellEvent e) { + super.shellActivated(e); + clusterNameCombo.setText(clusterName); + okPressed(); + } + }); + } + private void createSubComposites() { Composite subComposite = new Composite(composite, SWT.NONE); @@ -250,15 +280,15 @@ public class ClusterSelectionDialog extends Dialog { clusterSelectionComposite = new Composite(subComposite, SWT.NONE); GridLayout layout = new GridLayout(2, false); clusterSelectionComposite.setLayout(layout); + createClusterNameLabel(clusterSelectionComposite); createClusterNameCombo(clusterSelectionComposite); - - createPreferenceCheckboxes(clusterSelectionComposite); + createPreferenceCheckbox(clusterSelectionComposite); stackLayout.topControl = clusterSelectionComposite; } - private void createPreferenceCheckboxes(Composite composite) { + private void createPreferenceCheckbox(Composite composite) { GridData layoutData = new GridData(SWT.FILL, SWT.FILL, true, false); layoutData.verticalIndent = 5; layoutData.horizontalSpan = 2; @@ -277,15 +307,18 @@ public class ClusterSelectionDialog extends Dialog { if (clusters.size() > 0) { selectButton = new Button(composite, SWT.RADIO); selectButton.setText("&Select"); + selectButton.setToolTipText(MESSAGE_SELECT_CLUSTER); } } { createButton = new Button(composite, SWT.RADIO); createButton.setText("&Create"); + createButton.setToolTipText(MESSAGE_CREATE_CLUSTER); } { registerButton = new Button(composite, SWT.RADIO); registerButton.setText("&Register"); + registerButton.setToolTipText(MESSAGE_REGISTER_CLUSTER); } } diff --git a/src/com.gluster.storage.management.console/src/com/gluster/storage/management/console/dialogs/CreateVolumePage1.java b/src/org.gluster.storage.management.console/src/org/gluster/storage/management/console/dialogs/CreateVolumePage1.java index d7d98d24..022ae6dc 100644 --- a/src/com.gluster.storage.management.console/src/com/gluster/storage/management/console/dialogs/CreateVolumePage1.java +++ b/src/org.gluster.storage.management.console/src/org/gluster/storage/management/console/dialogs/CreateVolumePage1.java @@ -1,22 +1,22 @@ /******************************************************************************* - * Copyright (c) 2011 Gluster, Inc. <http://www.gluster.com> + * Copyright (c) 2006-2011 Gluster, Inc. <http://www.gluster.com> * This file is part of Gluster Management Console. * - * Gluster Management Console is free software; you can redistribute it and/or - * modify it under the terms of the GNU Affero General Public License as published - * by the Free Software Foundation; either version 3 of the License, or - * (at your option) any later version. - * - * Gluster Management Console is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY - * or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Affero General Public License - * for more details. - * - * You should have received a copy of the GNU Affero General Public License - * along with this program. If not, see + * Gluster Management Console is free software; you can redistribute + * it and/or modify it under the terms of the GNU General Public + * License as published by the Free Software Foundation; either + * version 3 of the License, or (at your option) any later version. + * + * Gluster Management Console is distributed in the hope that it + * will be useful, but WITHOUT ANY WARRANTY; without even the + * implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR + * PURPOSE. See the GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program. If not, see * <http://www.gnu.org/licenses/>. *******************************************************************************/ -package com.gluster.storage.management.console.dialogs; +package org.gluster.storage.management.console.dialogs; import java.util.Arrays; import java.util.HashSet; @@ -47,16 +47,16 @@ import org.eclipse.swt.widgets.Label; import org.eclipse.swt.widgets.Link; import org.eclipse.swt.widgets.Listener; import org.eclipse.swt.widgets.Text; +import org.gluster.storage.management.console.GlusterDataModelManager; +import org.gluster.storage.management.core.model.Brick; +import org.gluster.storage.management.core.model.Device; +import org.gluster.storage.management.core.model.Volume; +import org.gluster.storage.management.core.model.Brick.BRICK_STATUS; +import org.gluster.storage.management.core.model.Volume.NAS_PROTOCOL; +import org.gluster.storage.management.core.model.Volume.TRANSPORT_TYPE; +import org.gluster.storage.management.core.model.Volume.VOLUME_TYPE; +import org.gluster.storage.management.core.utils.ValidationUtil; -import com.gluster.storage.management.console.GlusterDataModelManager; -import com.gluster.storage.management.core.model.Brick; -import com.gluster.storage.management.core.model.Brick.BRICK_STATUS; -import com.gluster.storage.management.core.model.Device; -import com.gluster.storage.management.core.model.Volume; -import com.gluster.storage.management.core.model.Volume.NAS_PROTOCOL; -import com.gluster.storage.management.core.model.Volume.TRANSPORT_TYPE; -import com.gluster.storage.management.core.model.Volume.VOLUME_TYPE; -import com.gluster.storage.management.core.utils.ValidationUtil; public class CreateVolumePage1 extends WizardPage { public static final String PAGE_NAME = "create.volume.page.1"; diff --git a/src/com.gluster.storage.management.console/src/com/gluster/storage/management/console/dialogs/CreateVolumeWizard.java b/src/org.gluster.storage.management.console/src/org/gluster/storage/management/console/dialogs/CreateVolumeWizard.java index 498723d9..49e57304 100644 --- a/src/com.gluster.storage.management.console/src/com/gluster/storage/management/console/dialogs/CreateVolumeWizard.java +++ b/src/org.gluster.storage.management.console/src/org/gluster/storage/management/console/dialogs/CreateVolumeWizard.java @@ -1,34 +1,37 @@ /******************************************************************************* - * Copyright (c) 2011 Gluster, Inc. <http://www.gluster.com> + * Copyright (c) 2006-2011 Gluster, Inc. <http://www.gluster.com> * This file is part of Gluster Management Console. * - * Gluster Management Console is free software; you can redistribute it and/or - * modify it under the terms of the GNU Affero General Public License as published - * by the Free Software Foundation; either version 3 of the License, or - * (at your option) any later version. - * - * Gluster Management Console is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY - * or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Affero General Public License - * for more details. - * - * You should have received a copy of the GNU Affero General Public License - * along with this program. If not, see + * Gluster Management Console is free software; you can redistribute + * it and/or modify it under the terms of the GNU General Public + * License as published by the Free Software Foundation; either + * version 3 of the License, or (at your option) any later version. + * + * Gluster Management Console is distributed in the hope that it + * will be useful, but WITHOUT ANY WARRANTY; without even the + * implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR + * PURPOSE. See the GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program. If not, see * <http://www.gnu.org/licenses/>. *******************************************************************************/ -package com.gluster.storage.management.console.dialogs; +package org.gluster.storage.management.console.dialogs; + +import java.util.List; import org.eclipse.jface.dialogs.MessageDialog; import org.eclipse.jface.wizard.Wizard; +import org.gluster.storage.management.client.VolumesClient; +import org.gluster.storage.management.console.GlusterDataModelManager; +import org.gluster.storage.management.console.IImageKeys; +import org.gluster.storage.management.console.utils.GUIHelper; +import org.gluster.storage.management.console.utils.GlusterLogger; +import org.gluster.storage.management.core.constants.CoreConstants; +import org.gluster.storage.management.core.model.Volume; +import org.gluster.storage.management.core.model.Volume.VOLUME_STATUS; +import org.gluster.storage.management.core.model.Volume.VOLUME_TYPE; -import com.gluster.storage.management.client.VolumesClient; -import com.gluster.storage.management.console.GlusterDataModelManager; -import com.gluster.storage.management.console.utils.GUIHelper; -import com.gluster.storage.management.console.utils.GlusterLogger; -import com.gluster.storage.management.core.constants.CoreConstants; -import com.gluster.storage.management.core.model.Volume; -import com.gluster.storage.management.core.model.Volume.VOLUME_STATUS; -import com.gluster.storage.management.core.model.Volume.VOLUME_TYPE; public class CreateVolumeWizard extends Wizard { private static final String title = "Gluster Management Console - Create Volume"; @@ -51,6 +54,20 @@ public class CreateVolumeWizard extends Wizard { VolumesClient volumesClient = new VolumesClient(); try { + List<String> servers = GlusterDataModelManager.getInstance().getOfflineServers(); + // One or more servers are offline, Show warning if cifs is enabled + if (newVolume.isCifsEnable() && servers != null && servers.size() > 0) { + Integer userAction = new MessageDialog(getShell(), "Create Volume", GUIHelper.getInstance().getImage( + IImageKeys.VOLUME_16x16), + "Performing CIFS updates when one or more servers are offline can trigger " + + "inconsistent behavior for CIFS accesses in the cluster." + CoreConstants.NEWLINE + + "Are you sure you want to continue?", MessageDialog.QUESTION, new String[] { "No", + "Yes" }, -1).open(); + if (userAction != 1) { + return false; // To stay on the create dialog + } + } + volumesClient.createVolume(newVolume); // Set proper volume type before assign to model @@ -82,7 +99,7 @@ public class CreateVolumeWizard extends Wizard { boolean warning = false; if (page.startVolumeAfterCreation()) { try { - volumesClient.startVolume(newVolume.getName()); + volumesClient.startVolume(newVolume.getName(), false); newVolume.setStatus(VOLUME_STATUS.ONLINE); message = "Volume created and started successfully!"; } catch(Exception e) { @@ -110,7 +127,7 @@ public class CreateVolumeWizard extends Wizard { + errMsg + CoreConstants.NEWLINE + CoreConstants.NEWLINE + "Do you still want to start the volume [" + newVolume.getName() + "]?")) { try { - volumesClient.startVolume(newVolume.getName()); + volumesClient.startVolume(newVolume.getName(), false); newVolume.setStatus(VOLUME_STATUS.ONLINE); message1 = "Volume [" + newVolume.getName() + "] started successfully!"; // Only start operation } catch(Exception e1) { diff --git a/src/com.gluster.storage.management.console/src/com/gluster/storage/management/console/dialogs/GlusterSupportDialog.java b/src/org.gluster.storage.management.console/src/org/gluster/storage/management/console/dialogs/GlusterSupportDialog.java index a2659650..bd9ceb04 100644 --- a/src/com.gluster.storage.management.console/src/com/gluster/storage/management/console/dialogs/GlusterSupportDialog.java +++ b/src/org.gluster.storage.management.console/src/org/gluster/storage/management/console/dialogs/GlusterSupportDialog.java @@ -1,22 +1,22 @@ /******************************************************************************* - * Copyright (c) 2011 Gluster, Inc. <http://www.gluster.com> + * Copyright (c) 2006-2011 Gluster, Inc. <http://www.gluster.com> * This file is part of Gluster Management Console. * - * Gluster Management Console is free software; you can redistribute it and/or - * modify it under the terms of the GNU Affero General Public License as published - * by the Free Software Foundation; either version 3 of the License, or - * (at your option) any later version. - * - * Gluster Management Console is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY - * or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Affero General Public License - * for more details. - * - * You should have received a copy of the GNU Affero General Public License - * along with this program. If not, see + * Gluster Management Console is free software; you can redistribute + * it and/or modify it under the terms of the GNU General Public + * License as published by the Free Software Foundation; either + * version 3 of the License, or (at your option) any later version. + * + * Gluster Management Console is distributed in the hope that it + * will be useful, but WITHOUT ANY WARRANTY; without even the + * implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR + * PURPOSE. See the GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program. If not, see * <http://www.gnu.org/licenses/>. *******************************************************************************/ -package com.gluster.storage.management.console.dialogs; +package org.gluster.storage.management.console.dialogs; import java.net.MalformedURLException; import java.net.URL; @@ -36,15 +36,14 @@ import org.eclipse.ui.forms.events.HyperlinkEvent; import org.eclipse.ui.forms.widgets.FormText; import org.eclipse.ui.forms.widgets.FormToolkit; import org.eclipse.ui.forms.widgets.ScrolledForm; +import org.gluster.storage.management.console.utils.GUIHelper; -import com.gluster.storage.management.console.utils.GUIHelper; public class GlusterSupportDialog extends FormDialog { private final GUIHelper guiHelper = GUIHelper.getInstance(); private FormToolkit toolkit; private ScrolledForm form; - private Composite parent; public GlusterSupportDialog(Shell shell) { super(shell); @@ -53,7 +52,6 @@ public class GlusterSupportDialog extends FormDialog { @Override protected void configureShell(Shell newShell) { super.configureShell(newShell); - this.parent = newShell; newShell.setText("Gluster Management Console - Support Information"); } diff --git a/src/org.gluster.storage.management.console/src/org/gluster/storage/management/console/dialogs/InitDiskDialog.java b/src/org.gluster.storage.management.console/src/org/gluster/storage/management/console/dialogs/InitDiskDialog.java new file mode 100644 index 00000000..4ff9235f --- /dev/null +++ b/src/org.gluster.storage.management.console/src/org/gluster/storage/management/console/dialogs/InitDiskDialog.java @@ -0,0 +1,209 @@ +/******************************************************************************* + * Copyright (c) 2006-2011 Gluster, Inc. <http://www.gluster.com> + * This file is part of Gluster Management Console. + * + * Gluster Management Console is free software; you can redistribute + * it and/or modify it under the terms of the GNU General Public + * License as published by the Free Software Foundation; either + * version 3 of the License, or (at your option) any later version. + * + * Gluster Management Console is distributed in the hope that it + * will be useful, but WITHOUT ANY WARRANTY; without even the + * implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR + * PURPOSE. See the GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program. If not, see + * <http://www.gnu.org/licenses/>. + *******************************************************************************/ +package org.gluster.storage.management.console.dialogs; + +import java.util.List; + +import org.eclipse.jface.dialogs.Dialog; +import org.eclipse.jface.dialogs.MessageDialog; +import org.eclipse.swt.SWT; +import org.eclipse.swt.events.ModifyEvent; +import org.eclipse.swt.events.ModifyListener; +import org.eclipse.swt.events.TraverseEvent; +import org.eclipse.swt.events.TraverseListener; +import org.eclipse.swt.graphics.Color; +import org.eclipse.swt.layout.GridData; +import org.eclipse.swt.layout.GridLayout; +import org.eclipse.swt.widgets.Combo; +import org.eclipse.swt.widgets.Composite; +import org.eclipse.swt.widgets.Control; +import org.eclipse.swt.widgets.Display; +import org.eclipse.swt.widgets.Label; +import org.eclipse.swt.widgets.Shell; +import org.eclipse.swt.widgets.Text; +import org.eclipse.ui.forms.events.HyperlinkAdapter; +import org.eclipse.ui.forms.events.HyperlinkEvent; +import org.eclipse.ui.forms.widgets.Hyperlink; +import org.gluster.storage.management.console.utils.GUIHelper; + + +public class InitDiskDialog extends Dialog { + + private Combo formatTypeCombo = null; + private final GUIHelper guiHelper = GUIHelper.getInstance(); + private Composite initializeDiskTypeComposite; + private Composite composite; + private String fsType; + private String mountPoint; + private Text mountPointText; + private String deviceName; + private List<String> fsTypes; + private static final String DEFAULT_MOUNT_POINT = "/export/"; + + public InitDiskDialog(Shell parentShell, String deviceName, List<String> fsTypes) { + super(parentShell); + this.fsTypes = fsTypes; + this.deviceName = deviceName; + } + + @Override + protected void configureShell(Shell newShell) { + super.configureShell(newShell); + + newShell.setText("Gluster Management Console - Select File System Type"); + addEscapeListener(newShell); + } + + private void addEscapeListener(Shell shell) { + shell.addTraverseListener(new TraverseListener() { + + @Override + public void keyTraversed(TraverseEvent e) { + if (e.keyCode == SWT.ESC) { + cancelPressed(); + } + } + }); + } + + @Override + protected Control createDialogArea(Composite parent) { + // Makes sure that child composites inherit the same background + parent.setBackgroundMode(SWT.INHERIT_FORCE); + + composite = (Composite) super.createDialogArea(parent); + configureDialogLayout(composite); + createComposite(composite); + return composite; + } + + private void configureDialogLayout(Composite composite) { + GridLayout layout = (GridLayout) composite.getLayout(); + layout.numColumns = 3; + layout.marginLeft = 20; + layout.marginRight = 20; + layout.marginTop = 20; + layout.horizontalSpacing = 20; + layout.verticalSpacing = 20; + } + + private void createComposite(Composite composite) { + initializeDiskTypeComposite = new Composite(composite, SWT.NONE); + GridLayout layout = new GridLayout(3, false); + initializeDiskTypeComposite.setLayout(layout); + + createLabel(initializeDiskTypeComposite, "File system "); + createFormatTypeCombo(initializeDiskTypeComposite); + createLabel(initializeDiskTypeComposite, "Mount point "); + createMountPointText(initializeDiskTypeComposite); + createChangeLink(initializeDiskTypeComposite); + } + + private void createLabel(Composite composite, String labelText) { + Label formatTypeLabel = new Label(composite, SWT.NONE); + formatTypeLabel.setText(labelText); + formatTypeLabel.setLayoutData(new GridData(GridData.BEGINNING, GridData.CENTER, false, false)); + } + + private void createFormatTypeCombo(Composite composite) { + formatTypeCombo = new Combo(composite, SWT.READ_ONLY); + formatTypeCombo.setItems(fsTypes.toArray(new String[0])); + formatTypeCombo.select(0); + new Label(composite, SWT.NONE); + } + + private void createMountPointText(Composite container) { + mountPointText = new Text(container, SWT.BORDER); + GridData txtNameData = new GridData(SWT.LEFT, SWT.CENTER, true, false, 1, 1); + txtNameData.widthHint = 400; + mountPointText.setTextLimit(100); + mountPointText.setLayoutData(txtNameData); + mountPointText.setText(DEFAULT_MOUNT_POINT + deviceName); + mountPointText.setEnabled(false); + mountPointText.addModifyListener(new ModifyListener() { + @Override + public void modifyText(ModifyEvent e) { + validateMountPoint(); + } + }); + } + + private void createChangeLink(Composite container) { + final Hyperlink changeLink = new Hyperlink(container, SWT.UNDERLINE_SINGLE); + changeLink.setText("change"); + changeLink.setUnderlined(true); + changeLink.setForeground(new Color(Display.getDefault(), 0, 0, 255)); + + changeLink.addHyperlinkListener(new HyperlinkAdapter() { + @Override + public void linkActivated(HyperlinkEvent e) { + if (!mountPointText.isEnabled()) { + changeLink.setVisible(false); + mountPointText.setEnabled(true); + } + } + }); + } + + @Override + protected void okPressed() { + fsType = formatTypeCombo.getText().trim(); + mountPoint = mountPointText.getText().trim(); + if (validateForm()) { + super.okPressed(); + } else { + MessageDialog.openError(getShell(), "Initialize Disk - Error", "Please enter a valid mount point"); + } + } + + @Override + public void cancelPressed() { + super.cancelPressed(); + } + + private boolean validateMountPoint() { + String mountPoint = mountPointText.getText().trim(); + if (mountPoint.isEmpty()) { + return false; + } + return mountPoint.matches("^/.+"); + } + + private boolean validateForm() { + return (!formatTypeCombo.getText().trim().isEmpty() && validateMountPoint()); + } + + /** + * Overriding to make sure that the dialog is centered in screen + */ + @Override + protected void initializeBounds() { + super.initializeBounds(); + + guiHelper.centerShellInScreen(getShell()); + } + + public String getFSType() { + return fsType; + } + + public String getMountPoint() { + return mountPoint; + } +} diff --git a/src/com.gluster.storage.management.console/src/com/gluster/storage/management/console/dialogs/LoginDialog.java b/src/org.gluster.storage.management.console/src/org/gluster/storage/management/console/dialogs/LoginDialog.java index 4bbcb36b..5f2b9bb8 100644 --- a/src/com.gluster.storage.management.console/src/com/gluster/storage/management/console/dialogs/LoginDialog.java +++ b/src/org.gluster.storage.management.console/src/org/gluster/storage/management/console/dialogs/LoginDialog.java @@ -1,22 +1,22 @@ /******************************************************************************* - * Copyright (c) 2011 Gluster, Inc. <http://www.gluster.com> + * Copyright (c) 2006-2011 Gluster, Inc. <http://www.gluster.com> * This file is part of Gluster Management Console. * - * Gluster Management Console is free software; you can redistribute it and/or - * modify it under the terms of the GNU Affero General Public License as published - * by the Free Software Foundation; either version 3 of the License, or - * (at your option) any later version. - * - * Gluster Management Console is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY - * or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Affero General Public License - * for more details. - * - * You should have received a copy of the GNU Affero General Public License - * along with this program. If not, see + * Gluster Management Console is free software; you can redistribute + * it and/or modify it under the terms of the GNU General Public + * License as published by the Free Software Foundation; either + * version 3 of the License, or (at your option) any later version. + * + * Gluster Management Console is distributed in the hope that it + * will be useful, but WITHOUT ANY WARRANTY; without even the + * implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR + * PURPOSE. See the GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program. If not, see * <http://www.gnu.org/licenses/>. *******************************************************************************/ -package com.gluster.storage.management.console.dialogs; +package org.gluster.storage.management.console.dialogs; import java.lang.reflect.InvocationTargetException; @@ -34,6 +34,8 @@ import org.eclipse.jface.operation.IRunnableWithProgress; import org.eclipse.jface.preference.IPreferenceStore; import org.eclipse.jface.window.Window; import org.eclipse.swt.SWT; +import org.eclipse.swt.events.ShellAdapter; +import org.eclipse.swt.events.ShellEvent; import org.eclipse.swt.events.TraverseEvent; import org.eclipse.swt.events.TraverseListener; import org.eclipse.swt.layout.GridData; @@ -45,18 +47,19 @@ import org.eclipse.swt.widgets.Display; import org.eclipse.swt.widgets.Label; import org.eclipse.swt.widgets.Shell; import org.eclipse.swt.widgets.Text; +import org.gluster.storage.management.client.ClustersClient; +import org.gluster.storage.management.client.UsersClient; +import org.gluster.storage.management.console.Activator; +import org.gluster.storage.management.console.ConsoleConstants; +import org.gluster.storage.management.console.GlusterDataModelManager; +import org.gluster.storage.management.console.IImageKeys; +import org.gluster.storage.management.console.dialogs.ClusterSelectionDialog.CLUSTER_MODE; +import org.gluster.storage.management.console.preferences.PreferenceConstants; +import org.gluster.storage.management.console.utils.GUIHelper; +import org.gluster.storage.management.console.validators.StringRequiredValidator; +import org.gluster.storage.management.core.constants.CoreConstants; +import org.gluster.storage.management.core.model.ConnectionDetails; -import com.gluster.storage.management.client.ClustersClient; -import com.gluster.storage.management.client.UsersClient; -import com.gluster.storage.management.console.Activator; -import com.gluster.storage.management.console.GlusterDataModelManager; -import com.gluster.storage.management.console.IImageKeys; -import com.gluster.storage.management.console.dialogs.ClusterSelectionDialog.CLUSTER_MODE; -import com.gluster.storage.management.console.preferences.PreferenceConstants; -import com.gluster.storage.management.console.utils.GUIHelper; -import com.gluster.storage.management.console.validators.StringRequiredValidator; -import com.gluster.storage.management.core.constants.CoreConstants; -import com.gluster.storage.management.core.model.ConnectionDetails; /** * Login dialog, which prompts for the user's account info, and has Login and Cancel buttons. @@ -171,6 +174,7 @@ public class LoginDialog extends Dialog { createPasswordLabel(composite); createPasswordText(composite); + setupAutoLoginIfRequired(); return composite; } @@ -203,6 +207,26 @@ public class LoginDialog extends Dialog { setupDataBinding(); } + private void setupAutoLoginIfRequired() { + final String password = System.getProperty(ConsoleConstants.PROPERTY_AUTO_LOGIN_PASSWORD, null); + if (password == null) { + return; + } + getShell().addShellListener(new ShellAdapter() { + @Override + public void shellActivated(ShellEvent e) { + super.shellActivated(e); + + if (passwordText.getText().isEmpty()) { + // Check whether the password has been passed as system parameter. This can be used for avoiding + // human intervention on login dialog while running SWTBot automated tests. + passwordText.setText(password); + okPressed(); + } + } + }); + } + /** * Sets up data binding between the text fields and the connection details object. Also attaches a "string required" * validator to the "password" text field. This validator is configured to do the following on validation failure<br> @@ -248,7 +272,6 @@ public class LoginDialog extends Dialog { // If the password is default, Let user to change the password if (password.equalsIgnoreCase(CoreConstants.DEFAULT_PASSWORD)) { - String oldSecurityTokeString = GlusterDataModelManager.getInstance().getSecurityToken(); ChangePasswordDialog dialog = new ChangePasswordDialog(getShell()); if (dialog.open() == Dialog.CANCEL) { diff --git a/src/com.gluster.storage.management.console/src/com/gluster/storage/management/console/dialogs/MigrateBrickPage1.java b/src/org.gluster.storage.management.console/src/org/gluster/storage/management/console/dialogs/MigrateBrickPage1.java index 2f271186..7e473fc2 100644 --- a/src/com.gluster.storage.management.console/src/com/gluster/storage/management/console/dialogs/MigrateBrickPage1.java +++ b/src/org.gluster.storage.management.console/src/org/gluster/storage/management/console/dialogs/MigrateBrickPage1.java @@ -1,25 +1,23 @@ -/** - * MigrateBrickPage1.java - * - * Copyright (c) 2011 Gluster, Inc. <http://www.gluster.com> +/******************************************************************************* + * Copyright (c) 2006-2011 Gluster, Inc. <http://www.gluster.com> * This file is part of Gluster Management Console. * - * Gluster Management Console is free software; you can redistribute it and/or - * modify it under the terms of the GNU Affero General Public License as published - * by the Free Software Foundation; either version 3 of the License, or - * (at your option) any later version. + * Gluster Management Console is free software; you can redistribute + * it and/or modify it under the terms of the GNU General Public + * License as published by the Free Software Foundation; either + * version 3 of the License, or (at your option) any later version. * - * Gluster Management Console is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY - * or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Affero General Public License - * for more details. + * Gluster Management Console is distributed in the hope that it + * will be useful, but WITHOUT ANY WARRANTY; without even the + * implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR + * PURPOSE. See the GNU General Public License for more details. * - * You should have received a copy of the GNU Affero General Public License - * along with this program. If not, see + * You should have received a copy of the GNU General Public License + * along with this program. If not, see * <http://www.gnu.org/licenses/>. - */ + *******************************************************************************/ -package com.gluster.storage.management.console.dialogs; +package org.gluster.storage.management.console.dialogs; import java.util.List; @@ -43,15 +41,14 @@ import org.eclipse.swt.widgets.Table; import org.eclipse.swt.widgets.TableColumn; import org.eclipse.swt.widgets.TableItem; import org.eclipse.swt.widgets.Text; +import org.gluster.storage.management.console.GlusterDataModelManager; +import org.gluster.storage.management.console.TableLabelProviderAdapter; +import org.gluster.storage.management.console.utils.GUIHelper; +import org.gluster.storage.management.core.model.Brick; +import org.gluster.storage.management.core.model.Device; +import org.gluster.storage.management.core.model.Volume; +import org.gluster.storage.management.core.utils.NumberUtil; -import com.gluster.storage.management.console.GlusterDataModelManager; -import com.gluster.storage.management.console.TableLabelProviderAdapter; -import com.gluster.storage.management.console.utils.GUIHelper; -import com.gluster.storage.management.core.model.Brick; -import com.gluster.storage.management.core.model.Device; -import com.gluster.storage.management.core.model.Entity; -import com.gluster.storage.management.core.model.Volume; -import com.gluster.storage.management.core.utils.NumberUtil; public class MigrateBrickPage1 extends WizardPage { private static final String PAGE_NAME = "migrate.disk.page.1"; @@ -148,18 +145,18 @@ public class MigrateBrickPage1 extends WizardPage { this.volume = volume; this.fromBrick = brick; setTitle("Migrate Brick [" + volume.getName() + "]"); - setPageDescription(null, null); + setPageDescription(fromBrick.getQualifiedName(), null); setPageComplete(false); } private void setPageDescription(String source, String target) { - if (source == null || source == "") { - source = "From Brick"; + if (source == null) { + source = ""; } - if (target == null || target == "") { - target = "To Brick"; + if (target == null) { + target = ""; } - setDescription("Migrate volume data from \"" + source + "\" to \"" + target + "\""); + setDescription("Migrate data from \"" + source + "\" to \"" + target + "\""); } private Object getSelectedItem(TableViewer tableViewer) { @@ -195,6 +192,9 @@ public class MigrateBrickPage1 extends WizardPage { public String getTargetBrickDir() { Device targetDevice = (Device)getSelectedItem(tableViewerTo); + if (targetDevice == null) { + return ""; + } return targetDevice.getQualifiedBrickName(volume.getName()); } @@ -291,6 +291,7 @@ public class MigrateBrickPage1 extends WizardPage { @Override public void selectionChanged(SelectionChangedEvent event) { refreshButtonStatus(); + setPageDescription(getSourceBrickDir(), getTargetBrickDir()); } }); return tableViewer; diff --git a/src/com.gluster.storage.management.console/src/com/gluster/storage/management/console/dialogs/MigrateBrickWizard.java b/src/org.gluster.storage.management.console/src/org/gluster/storage/management/console/dialogs/MigrateBrickWizard.java index 2f7c2fb9..51d5e1d0 100644 --- a/src/com.gluster.storage.management.console/src/com/gluster/storage/management/console/dialogs/MigrateBrickWizard.java +++ b/src/org.gluster.storage.management.console/src/org/gluster/storage/management/console/dialogs/MigrateBrickWizard.java @@ -1,38 +1,38 @@ /******************************************************************************* - * Copyright (c) 2011 Gluster, Inc. <http://www.gluster.com> + * Copyright (c) 2006-2011 Gluster, Inc. <http://www.gluster.com> * This file is part of Gluster Management Console. * - * Gluster Management Console is free software; you can redistribute it and/or - * modify it under the terms of the GNU Affero General Public License as published - * by the Free Software Foundation; either version 3 of the License, or - * (at your option) any later version. - * - * Gluster Management Console is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY - * or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Affero General Public License - * for more details. - * - * You should have received a copy of the GNU Affero General Public License - * along with this program. If not, see + * Gluster Management Console is free software; you can redistribute + * it and/or modify it under the terms of the GNU General Public + * License as published by the Free Software Foundation; either + * version 3 of the License, or (at your option) any later version. + * + * Gluster Management Console is distributed in the hope that it + * will be useful, but WITHOUT ANY WARRANTY; without even the + * implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR + * PURPOSE. See the GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program. If not, see * <http://www.gnu.org/licenses/>. *******************************************************************************/ -package com.gluster.storage.management.console.dialogs; +package org.gluster.storage.management.console.dialogs; import java.net.URI; import org.eclipse.jface.dialogs.MessageDialog; import org.eclipse.jface.wizard.Wizard; +import org.gluster.storage.management.client.TasksClient; +import org.gluster.storage.management.client.VolumesClient; +import org.gluster.storage.management.console.GlusterDataModelManager; +import org.gluster.storage.management.console.utils.GUIHelper; +import org.gluster.storage.management.core.model.Brick; +import org.gluster.storage.management.core.model.Cluster; +import org.gluster.storage.management.core.model.Status; +import org.gluster.storage.management.core.model.TaskInfo; +import org.gluster.storage.management.core.model.TaskStatus; +import org.gluster.storage.management.core.model.Volume; -import com.gluster.storage.management.client.TasksClient; -import com.gluster.storage.management.client.VolumesClient; -import com.gluster.storage.management.console.GlusterDataModelManager; -import com.gluster.storage.management.console.utils.GUIHelper; -import com.gluster.storage.management.core.model.Brick; -import com.gluster.storage.management.core.model.Cluster; -import com.gluster.storage.management.core.model.Status; -import com.gluster.storage.management.core.model.TaskInfo; -import com.gluster.storage.management.core.model.TaskStatus; -import com.gluster.storage.management.core.model.Volume; public class MigrateBrickWizard extends Wizard { private Volume volume; @@ -64,7 +64,7 @@ public class MigrateBrickWizard extends Wizard { String dialogTitle = "Brick migration"; try { - String reference = volume.getName() + "-" + sourceDir + "-" + targetDir; + String reference = volume.getName() + "#" + sourceDir + "#" + targetDir; TaskInfo existingTaskInfo = GlusterDataModelManager.getInstance().getTaskByReference(reference); if (existingTaskInfo != null && existingTaskInfo.getStatus().getCode() != Status.STATUS_CODE_SUCCESS && existingTaskInfo.getStatus().getCode() != Status.STATUS_CODE_FAILURE) { @@ -78,9 +78,9 @@ public class MigrateBrickWizard extends Wizard { // To get the object TasksClient taskClient = new TasksClient(); TaskInfo taskInfo = taskClient.getTaskInfo(uri); - if (taskInfo != null && taskInfo instanceof TaskInfo) { + if (taskInfo != null) { // cluster.addTaskInfo(taskInfo); - String volumeName = taskInfo.getReference().split("-")[0]; + String volumeName = taskInfo.getReference().split("#")[0]; modelManager.addTask(taskInfo); modelManager.refreshVolumeData(cluster.getVolume(volumeName)); @@ -95,7 +95,12 @@ public class MigrateBrickWizard extends Wizard { return true; } } - MessageDialog.openInformation(getShell(), dialogTitle, "Brick migration started successfully"); + if (taskInfo.getStatus().getCode() == TaskStatus.STATUS_CODE_RUNNING) { + MessageDialog.openInformation(getShell(), dialogTitle, "Brick migration started successfully"); + } else { + MessageDialog.openWarning(getShell(), dialogTitle, + "Brick migration started, but following error occured: " + taskInfo.getStatus()); + } GUIHelper.getInstance().showTaskView(); } catch (Exception e) { diff --git a/src/com.gluster.storage.management.console/src/com/gluster/storage/management/console/dialogs/SelectDisksDialog.java b/src/org.gluster.storage.management.console/src/org/gluster/storage/management/console/dialogs/SelectDisksDialog.java index 5a5f6046..b5515262 100644 --- a/src/com.gluster.storage.management.console/src/com/gluster/storage/management/console/dialogs/SelectDisksDialog.java +++ b/src/org.gluster.storage.management.console/src/org/gluster/storage/management/console/dialogs/SelectDisksDialog.java @@ -1,22 +1,22 @@ /******************************************************************************* - * Copyright (c) 2011 Gluster, Inc. <http://www.gluster.com> + * Copyright (c) 2006-2011 Gluster, Inc. <http://www.gluster.com> * This file is part of Gluster Management Console. * - * Gluster Management Console is free software; you can redistribute it and/or - * modify it under the terms of the GNU Affero General Public License as published - * by the Free Software Foundation; either version 3 of the License, or - * (at your option) any later version. - * - * Gluster Management Console is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY - * or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Affero General Public License - * for more details. - * - * You should have received a copy of the GNU Affero General Public License - * along with this program. If not, see + * Gluster Management Console is free software; you can redistribute + * it and/or modify it under the terms of the GNU General Public + * License as published by the Free Software Foundation; either + * version 3 of the License, or (at your option) any later version. + * + * Gluster Management Console is distributed in the hope that it + * will be useful, but WITHOUT ANY WARRANTY; without even the + * implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR + * PURPOSE. See the GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program. If not, see * <http://www.gnu.org/licenses/>. *******************************************************************************/ -package com.gluster.storage.management.console.dialogs; +package org.gluster.storage.management.console.dialogs; import java.util.List; import java.util.Set; @@ -31,9 +31,9 @@ import org.eclipse.swt.layout.GridLayout; import org.eclipse.swt.widgets.Composite; import org.eclipse.swt.widgets.Control; import org.eclipse.swt.widgets.Shell; +import org.gluster.storage.management.core.model.Brick; +import org.gluster.storage.management.core.model.Device; -import com.gluster.storage.management.core.model.Brick; -import com.gluster.storage.management.core.model.Device; public class SelectDisksDialog extends Dialog { @@ -93,11 +93,7 @@ public class SelectDisksDialog extends Dialog { return new Point(1024, 600); } - @Override - protected void cancelPressed() { - super.cancelPressed(); - } - + @Override protected void okPressed() { if (this.getSelectedDevices().size() == 0) { diff --git a/src/com.gluster.storage.management.console/src/com/gluster/storage/management/console/dialogs/ServerAdditionDialog.java b/src/org.gluster.storage.management.console/src/org/gluster/storage/management/console/dialogs/ServerAdditionDialog.java index 9781f348..388f6603 100644 --- a/src/com.gluster.storage.management.console/src/com/gluster/storage/management/console/dialogs/ServerAdditionDialog.java +++ b/src/org.gluster.storage.management.console/src/org/gluster/storage/management/console/dialogs/ServerAdditionDialog.java @@ -1,24 +1,22 @@ -/** - * ServerAdditionDialog.java - * - * Copyright (c) 2011 Gluster, Inc. <http://www.gluster.com> +/******************************************************************************* + * Copyright (c) 2006-2011 Gluster, Inc. <http://www.gluster.com> * This file is part of Gluster Management Console. * - * Gluster Management Console is free software; you can redistribute it and/or - * modify it under the terms of the GNU Affero General Public License as published - * by the Free Software Foundation; either version 3 of the License, or - * (at your option) any later version. + * Gluster Management Console is free software; you can redistribute + * it and/or modify it under the terms of the GNU General Public + * License as published by the Free Software Foundation; either + * version 3 of the License, or (at your option) any later version. * - * Gluster Management Console is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY - * or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Affero General Public License - * for more details. + * Gluster Management Console is distributed in the hope that it + * will be useful, but WITHOUT ANY WARRANTY; without even the + * implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR + * PURPOSE. See the GNU General Public License for more details. * - * You should have received a copy of the GNU Affero General Public License - * along with this program. If not, see + * You should have received a copy of the GNU General Public License + * along with this program. If not, see * <http://www.gnu.org/licenses/>. - */ -package com.gluster.storage.management.console.dialogs; + *******************************************************************************/ +package org.gluster.storage.management.console.dialogs; import java.net.URI; import java.util.List; @@ -40,11 +38,11 @@ import org.eclipse.swt.widgets.Control; import org.eclipse.swt.widgets.Label; import org.eclipse.swt.widgets.Shell; import org.eclipse.swt.widgets.Text; +import org.gluster.storage.management.client.GlusterServersClient; +import org.gluster.storage.management.console.GlusterDataModelManager; +import org.gluster.storage.management.console.utils.GUIHelper; +import org.gluster.storage.management.core.model.GlusterServer; -import com.gluster.storage.management.client.GlusterServersClient; -import com.gluster.storage.management.console.GlusterDataModelManager; -import com.gluster.storage.management.console.utils.GUIHelper; -import com.gluster.storage.management.core.model.GlusterServer; public class ServerAdditionDialog extends Dialog { public static final int RETURN_CODE_ERROR = 2; diff --git a/src/com.gluster.storage.management.console/src/com/gluster/storage/management/console/jobs/DataSyncJob.java b/src/org.gluster.storage.management.console/src/org/gluster/storage/management/console/jobs/DataSyncJob.java index 907d7b84..8be50e97 100644 --- a/src/com.gluster.storage.management.console/src/com/gluster/storage/management/console/jobs/DataSyncJob.java +++ b/src/org.gluster.storage.management.console/src/org/gluster/storage/management/console/jobs/DataSyncJob.java @@ -1,38 +1,36 @@ /******************************************************************************* - * Copyright (c) 2011 Gluster, Inc. <http://www.gluster.com> + * Copyright (c) 2006-2011 Gluster, Inc. <http://www.gluster.com> * This file is part of Gluster Management Console. * - * Gluster Management Console is free software; you can redistribute it and/or - * modify it under the terms of the GNU Affero General Public License as published - * by the Free Software Foundation; either version 3 of the License, or - * (at your option) any later version. - * - * Gluster Management Console is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY - * or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Affero General Public License - * for more details. - * - * You should have received a copy of the GNU Affero General Public License - * along with this program. If not, see + * Gluster Management Console is free software; you can redistribute + * it and/or modify it under the terms of the GNU General Public + * License as published by the Free Software Foundation; either + * version 3 of the License, or (at your option) any later version. + * + * Gluster Management Console is distributed in the hope that it + * will be useful, but WITHOUT ANY WARRANTY; without even the + * implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR + * PURPOSE. See the GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program. If not, see * <http://www.gnu.org/licenses/>. *******************************************************************************/ -package com.gluster.storage.management.console.jobs; +package org.gluster.storage.management.console.jobs; import org.eclipse.core.runtime.IProgressMonitor; import org.eclipse.core.runtime.IStatus; import org.eclipse.core.runtime.Status; import org.eclipse.core.runtime.jobs.Job; import org.eclipse.swt.widgets.Display; +import org.gluster.storage.management.console.GlusterDataModelManager; +import org.gluster.storage.management.core.model.GlusterDataModel; -import com.gluster.storage.management.console.GlusterDataModelManager; -import com.gluster.storage.management.console.utils.GlusterLogger; -import com.gluster.storage.management.core.model.GlusterDataModel; /** * */ public class DataSyncJob extends Job { - private static final GlusterLogger logger = GlusterLogger.getInstance(); public DataSyncJob(String name) { super(name); diff --git a/src/com.gluster.storage.management.console/src/com/gluster/storage/management/console/preferences/AlertsPreferencePage.java b/src/org.gluster.storage.management.console/src/org/gluster/storage/management/console/preferences/AlertsPreferencePage.java index be8513fc..9b7fcbf0 100644 --- a/src/com.gluster.storage.management.console/src/com/gluster/storage/management/console/preferences/AlertsPreferencePage.java +++ b/src/org.gluster.storage.management.console/src/org/gluster/storage/management/console/preferences/AlertsPreferencePage.java @@ -1,11 +1,29 @@ -package com.gluster.storage.management.console.preferences; +/******************************************************************************* + * Copyright (c) 2006-2011 Gluster, Inc. <http://www.gluster.com> + * This file is part of Gluster Management Console. + * + * Gluster Management Console is free software; you can redistribute + * it and/or modify it under the terms of the GNU General Public + * License as published by the Free Software Foundation; either + * version 3 of the License, or (at your option) any later version. + * + * Gluster Management Console is distributed in the hope that it + * will be useful, but WITHOUT ANY WARRANTY; without even the + * implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR + * PURPOSE. See the GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program. If not, see + * <http://www.gnu.org/licenses/>. + *******************************************************************************/ +package org.gluster.storage.management.console.preferences; import org.eclipse.jface.preference.FieldEditorPreferencePage; import org.eclipse.jface.preference.IntegerFieldEditor; import org.eclipse.ui.IWorkbench; import org.eclipse.ui.IWorkbenchPreferencePage; +import org.gluster.storage.management.console.Activator; -import com.gluster.storage.management.console.Activator; public class AlertsPreferencePage extends FieldEditorPreferencePage implements IWorkbenchPreferencePage { diff --git a/src/com.gluster.storage.management.console/src/com/gluster/storage/management/console/preferences/ChartsPreferencePage.java b/src/org.gluster.storage.management.console/src/org/gluster/storage/management/console/preferences/ChartsPreferencePage.java index 8eeb84ab..c3bbd370 100644 --- a/src/com.gluster.storage.management.console/src/com/gluster/storage/management/console/preferences/ChartsPreferencePage.java +++ b/src/org.gluster.storage.management.console/src/org/gluster/storage/management/console/preferences/ChartsPreferencePage.java @@ -1,29 +1,29 @@ /******************************************************************************* - * Copyright (c) 2011 Gluster, Inc. <http://www.gluster.com> + * Copyright (c) 2006-2011 Gluster, Inc. <http://www.gluster.com> * This file is part of Gluster Management Console. * - * Gluster Management Console is free software; you can redistribute it and/or - * modify it under the terms of the GNU Affero General Public License as published - * by the Free Software Foundation; either version 3 of the License, or - * (at your option) any later version. - * - * Gluster Management Console is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY - * or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Affero General Public License - * for more details. - * - * You should have received a copy of the GNU Affero General Public License - * along with this program. If not, see + * Gluster Management Console is free software; you can redistribute + * it and/or modify it under the terms of the GNU General Public + * License as published by the Free Software Foundation; either + * version 3 of the License, or (at your option) any later version. + * + * Gluster Management Console is distributed in the hope that it + * will be useful, but WITHOUT ANY WARRANTY; without even the + * implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR + * PURPOSE. See the GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program. If not, see * <http://www.gnu.org/licenses/>. *******************************************************************************/ -package com.gluster.storage.management.console.preferences; +package org.gluster.storage.management.console.preferences; import org.eclipse.jface.preference.ComboFieldEditor; import org.eclipse.jface.preference.FieldEditorPreferencePage; import org.eclipse.ui.IWorkbench; import org.eclipse.ui.IWorkbenchPreferencePage; +import org.gluster.storage.management.console.Activator; -import com.gluster.storage.management.console.Activator; /** * diff --git a/src/com.gluster.storage.management.console/src/com/gluster/storage/management/console/preferences/GlusterPreferencePage.java b/src/org.gluster.storage.management.console/src/org/gluster/storage/management/console/preferences/GlusterPreferencePage.java index e382b10a..793b152b 100644 --- a/src/com.gluster.storage.management.console/src/com/gluster/storage/management/console/preferences/GlusterPreferencePage.java +++ b/src/org.gluster.storage.management.console/src/org/gluster/storage/management/console/preferences/GlusterPreferencePage.java @@ -1,22 +1,22 @@ /******************************************************************************* - * Copyright (c) 2011 Gluster, Inc. <http://www.gluster.com> + * Copyright (c) 2006-2011 Gluster, Inc. <http://www.gluster.com> * This file is part of Gluster Management Console. * - * Gluster Management Console is free software; you can redistribute it and/or - * modify it under the terms of the GNU Affero General Public License as published - * by the Free Software Foundation; either version 3 of the License, or - * (at your option) any later version. - * - * Gluster Management Console is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY - * or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Affero General Public License - * for more details. - * - * You should have received a copy of the GNU Affero General Public License - * along with this program. If not, see + * Gluster Management Console is free software; you can redistribute + * it and/or modify it under the terms of the GNU General Public + * License as published by the Free Software Foundation; either + * version 3 of the License, or (at your option) any later version. + * + * Gluster Management Console is distributed in the hope that it + * will be useful, but WITHOUT ANY WARRANTY; without even the + * implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR + * PURPOSE. See the GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program. If not, see * <http://www.gnu.org/licenses/>. *******************************************************************************/ -package com.gluster.storage.management.console.preferences; +package org.gluster.storage.management.console.preferences; import java.util.List; @@ -26,9 +26,9 @@ import org.eclipse.jface.preference.FieldEditorPreferencePage; import org.eclipse.jface.preference.IntegerFieldEditor; import org.eclipse.ui.IWorkbench; import org.eclipse.ui.IWorkbenchPreferencePage; +import org.gluster.storage.management.client.ClustersClient; +import org.gluster.storage.management.console.Activator; -import com.gluster.storage.management.client.ClustersClient; -import com.gluster.storage.management.console.Activator; /** * This class represents a preference page that @@ -70,14 +70,14 @@ public class GlusterPreferencePage String[][] clusterNamesArr = new String[clusterNames.size()][2]; for(int i = 0; i < clusterNames.size(); i++) { - String clusterName = clusterNames.get(i);; + String clusterName = clusterNames.get(i); clusterNamesArr[i][0] = clusterName; clusterNamesArr[i][1] = clusterName; } addField(new ComboFieldEditor(PreferenceConstants.P_DEFAULT_CLUSTER_NAME, "Default &Cluster to manage:", clusterNamesArr, getFieldEditorParent())); - addField(new IntegerFieldEditor(PreferenceConstants.P_DATA_SYNC_INTERVAL, "&Data Sync Interval (sec):", + addField(new IntegerFieldEditor(PreferenceConstants.P_DATA_SYNC_INTERVAL, "&Refresh Interval (sec):", getFieldEditorParent())); } diff --git a/src/com.gluster.storage.management.console/src/com/gluster/storage/management/console/preferences/PreferenceConstants.java b/src/org.gluster.storage.management.console/src/org/gluster/storage/management/console/preferences/PreferenceConstants.java index 650ae1a9..b31ef2fb 100644 --- a/src/com.gluster.storage.management.console/src/com/gluster/storage/management/console/preferences/PreferenceConstants.java +++ b/src/org.gluster.storage.management.console/src/org/gluster/storage/management/console/preferences/PreferenceConstants.java @@ -1,22 +1,22 @@ /******************************************************************************* - * Copyright (c) 2011 Gluster, Inc. <http://www.gluster.com> + * Copyright (c) 2006-2011 Gluster, Inc. <http://www.gluster.com> * This file is part of Gluster Management Console. * - * Gluster Management Console is free software; you can redistribute it and/or - * modify it under the terms of the GNU Affero General Public License as published - * by the Free Software Foundation; either version 3 of the License, or - * (at your option) any later version. - * - * Gluster Management Console is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY - * or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Affero General Public License - * for more details. - * - * You should have received a copy of the GNU Affero General Public License - * along with this program. If not, see + * Gluster Management Console is free software; you can redistribute + * it and/or modify it under the terms of the GNU General Public + * License as published by the Free Software Foundation; either + * version 3 of the License, or (at your option) any later version. + * + * Gluster Management Console is distributed in the hope that it + * will be useful, but WITHOUT ANY WARRANTY; without even the + * implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR + * PURPOSE. See the GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program. If not, see * <http://www.gnu.org/licenses/>. *******************************************************************************/ -package com.gluster.storage.management.console.preferences; +package org.gluster.storage.management.console.preferences; /** * Constant definitions for plug-in preferences diff --git a/src/com.gluster.storage.management.console/src/com/gluster/storage/management/console/preferences/PreferenceInitializer.java b/src/org.gluster.storage.management.console/src/org/gluster/storage/management/console/preferences/PreferenceInitializer.java index 3c192f62..f525a52c 100644 --- a/src/com.gluster.storage.management.console/src/com/gluster/storage/management/console/preferences/PreferenceInitializer.java +++ b/src/org.gluster.storage.management.console/src/org/gluster/storage/management/console/preferences/PreferenceInitializer.java @@ -1,27 +1,27 @@ /******************************************************************************* - * Copyright (c) 2011 Gluster, Inc. <http://www.gluster.com> + * Copyright (c) 2006-2011 Gluster, Inc. <http://www.gluster.com> * This file is part of Gluster Management Console. * - * Gluster Management Console is free software; you can redistribute it and/or - * modify it under the terms of the GNU Affero General Public License as published - * by the Free Software Foundation; either version 3 of the License, or - * (at your option) any later version. - * - * Gluster Management Console is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY - * or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Affero General Public License - * for more details. - * - * You should have received a copy of the GNU Affero General Public License - * along with this program. If not, see + * Gluster Management Console is free software; you can redistribute + * it and/or modify it under the terms of the GNU General Public + * License as published by the Free Software Foundation; either + * version 3 of the License, or (at your option) any later version. + * + * Gluster Management Console is distributed in the hope that it + * will be useful, but WITHOUT ANY WARRANTY; without even the + * implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR + * PURPOSE. See the GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program. If not, see * <http://www.gnu.org/licenses/>. *******************************************************************************/ -package com.gluster.storage.management.console.preferences; +package org.gluster.storage.management.console.preferences; import org.eclipse.core.runtime.preferences.AbstractPreferenceInitializer; import org.eclipse.jface.preference.IPreferenceStore; +import org.gluster.storage.management.console.Activator; -import com.gluster.storage.management.console.Activator; /** * Class used to initialize default preference values. @@ -42,13 +42,13 @@ public class PreferenceInitializer extends AbstractPreferenceInitializer { store.setDefault(PreferenceConstants.P_DATA_SYNC_INTERVAL, 300); // Default CPU utilisation threshold - store.setDefault(PreferenceConstants.P_SERVER_CPU_CRITICAL_THRESHOLD, 95); + store.setDefault(PreferenceConstants.P_SERVER_CPU_CRITICAL_THRESHOLD, 80); // Default Memory threshold - store.setDefault(PreferenceConstants.P_SERVER_MEMORY_USAGE_THRESHOLD, 90); + store.setDefault(PreferenceConstants.P_SERVER_MEMORY_USAGE_THRESHOLD, 80); // Default disk free space threshold - store.setDefault(PreferenceConstants.P_DISK_SPACE_USAGE_THRESHOLD, 90); + store.setDefault(PreferenceConstants.P_DISK_SPACE_USAGE_THRESHOLD, 80); // Default period for server statistics charts store.setDefault(PreferenceConstants.P_CPU_CHART_PERIOD, "1d"); diff --git a/src/com.gluster.storage.management.console/src/com/gluster/storage/management/console/toolbar/GlusterToolbarManager.java b/src/org.gluster.storage.management.console/src/org/gluster/storage/management/console/toolbar/GlusterToolbarManager.java index ebd1db07..c462e5b7 100644 --- a/src/com.gluster.storage.management.console/src/com/gluster/storage/management/console/toolbar/GlusterToolbarManager.java +++ b/src/org.gluster.storage.management.console/src/org/gluster/storage/management/console/toolbar/GlusterToolbarManager.java @@ -1,37 +1,37 @@ /******************************************************************************* - * Copyright (c) 2011 Gluster, Inc. <http://www.gluster.com> + * Copyright (c) 2006-2011 Gluster, Inc. <http://www.gluster.com> * This file is part of Gluster Management Console. * - * Gluster Management Console is free software; you can redistribute it and/or - * modify it under the terms of the GNU Affero General Public License as published - * by the Free Software Foundation; either version 3 of the License, or - * (at your option) any later version. - * - * Gluster Management Console is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY - * or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Affero General Public License - * for more details. - * - * You should have received a copy of the GNU Affero General Public License - * along with this program. If not, see + * Gluster Management Console is free software; you can redistribute + * it and/or modify it under the terms of the GNU General Public + * License as published by the Free Software Foundation; either + * version 3 of the License, or (at your option) any later version. + * + * Gluster Management Console is distributed in the hope that it + * will be useful, but WITHOUT ANY WARRANTY; without even the + * implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR + * PURPOSE. See the GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program. If not, see * <http://www.gnu.org/licenses/>. *******************************************************************************/ -package com.gluster.storage.management.console.toolbar; +package org.gluster.storage.management.console.toolbar; import java.util.HashMap; import java.util.Map; import org.eclipse.ui.IWorkbenchPage; import org.eclipse.ui.IWorkbenchWindow; +import org.gluster.storage.management.console.actions.ActionConstants; +import org.gluster.storage.management.core.model.Cluster; +import org.gluster.storage.management.core.model.Entity; +import org.gluster.storage.management.core.model.EntityGroup; +import org.gluster.storage.management.core.model.GlusterServer; +import org.gluster.storage.management.core.model.Server; +import org.gluster.storage.management.core.model.TaskInfo; +import org.gluster.storage.management.core.model.Volume; -import com.gluster.storage.management.console.actions.ActionConstants; -import com.gluster.storage.management.core.model.Cluster; -import com.gluster.storage.management.core.model.Entity; -import com.gluster.storage.management.core.model.EntityGroup; -import com.gluster.storage.management.core.model.GlusterServer; -import com.gluster.storage.management.core.model.Server; -import com.gluster.storage.management.core.model.TaskInfo; -import com.gluster.storage.management.core.model.Volume; public class GlusterToolbarManager implements ToolbarManager { private enum ENTITY_TYPE { diff --git a/src/com.gluster.storage.management.console/src/com/gluster/storage/management/console/toolbar/ToolbarManager.java b/src/org.gluster.storage.management.console/src/org/gluster/storage/management/console/toolbar/ToolbarManager.java index 8dc14ffd..a755739b 100644 --- a/src/com.gluster.storage.management.console/src/com/gluster/storage/management/console/toolbar/ToolbarManager.java +++ b/src/org.gluster.storage.management.console/src/org/gluster/storage/management/console/toolbar/ToolbarManager.java @@ -1,24 +1,24 @@ /******************************************************************************* - * Copyright (c) 2011 Gluster, Inc. <http://www.gluster.com> + * Copyright (c) 2006-2011 Gluster, Inc. <http://www.gluster.com> * This file is part of Gluster Management Console. * - * Gluster Management Console is free software; you can redistribute it and/or - * modify it under the terms of the GNU Affero General Public License as published - * by the Free Software Foundation; either version 3 of the License, or - * (at your option) any later version. - * - * Gluster Management Console is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY - * or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Affero General Public License - * for more details. - * - * You should have received a copy of the GNU Affero General Public License - * along with this program. If not, see + * Gluster Management Console is free software; you can redistribute + * it and/or modify it under the terms of the GNU General Public + * License as published by the Free Software Foundation; either + * version 3 of the License, or (at your option) any later version. + * + * Gluster Management Console is distributed in the hope that it + * will be useful, but WITHOUT ANY WARRANTY; without even the + * implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR + * PURPOSE. See the GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program. If not, see * <http://www.gnu.org/licenses/>. *******************************************************************************/ -package com.gluster.storage.management.console.toolbar; +package org.gluster.storage.management.console.toolbar; -import com.gluster.storage.management.core.model.Entity; +import org.gluster.storage.management.core.model.Entity; /** * Whenever the current selection/action demands changes to the toolbar, the toolbar manager is used to update the diff --git a/src/com.gluster.storage.management.console/src/com/gluster/storage/management/console/utils/ChartUtil.java b/src/org.gluster.storage.management.console/src/org/gluster/storage/management/console/utils/ChartUtil.java index 57121f5b..52cfdca1 100644 --- a/src/com.gluster.storage.management.console/src/com/gluster/storage/management/console/utils/ChartUtil.java +++ b/src/org.gluster.storage.management.console/src/org/gluster/storage/management/console/utils/ChartUtil.java @@ -1,22 +1,22 @@ /******************************************************************************* - * Copyright (c) 2011 Gluster, Inc. <http://www.gluster.com> + * Copyright (c) 2006-2011 Gluster, Inc. <http://www.gluster.com> * This file is part of Gluster Management Console. * - * Gluster Management Console is free software; you can redistribute it and/or - * modify it under the terms of the GNU Affero General Public License as published - * by the Free Software Foundation; either version 3 of the License, or - * (at your option) any later version. - * - * Gluster Management Console is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY - * or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Affero General Public License - * for more details. - * - * You should have received a copy of the GNU Affero General Public License - * along with this program. If not, see + * Gluster Management Console is free software; you can redistribute + * it and/or modify it under the terms of the GNU General Public + * License as published by the Free Software Foundation; either + * version 3 of the License, or (at your option) any later version. + * + * Gluster Management Console is distributed in the hope that it + * will be useful, but WITHOUT ANY WARRANTY; without even the + * implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR + * PURPOSE. See the GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program. If not, see * <http://www.gnu.org/licenses/>. *******************************************************************************/ -package com.gluster.storage.management.console.utils; +package org.gluster.storage.management.console.utils; import java.util.ArrayList; import java.util.List; @@ -34,15 +34,15 @@ import org.eclipse.ui.forms.events.HyperlinkAdapter; import org.eclipse.ui.forms.events.HyperlinkEvent; import org.eclipse.ui.forms.widgets.FormToolkit; import org.eclipse.ui.forms.widgets.Hyperlink; +import org.gluster.storage.management.console.Activator; +import org.gluster.storage.management.console.preferences.PreferenceConstants; +import org.gluster.storage.management.core.constants.CoreConstants; +import org.gluster.storage.management.core.constants.GlusterConstants; +import org.gluster.storage.management.core.model.GlusterServer; +import org.gluster.storage.management.core.model.NetworkInterface; +import org.gluster.storage.management.core.model.ServerStats; +import org.gluster.storage.management.core.model.ServerStatsRow; -import com.gluster.storage.management.console.Activator; -import com.gluster.storage.management.console.preferences.PreferenceConstants; -import com.gluster.storage.management.core.constants.CoreConstants; -import com.gluster.storage.management.core.constants.GlusterConstants; -import com.gluster.storage.management.core.model.GlusterServer; -import com.gluster.storage.management.core.model.NetworkInterface; -import com.gluster.storage.management.core.model.ServerStats; -import com.gluster.storage.management.core.model.ServerStatsRow; import com.ibm.icu.util.Calendar; /** @@ -201,7 +201,6 @@ public class ChartUtil { @Override public void linkActivated(HyperlinkEvent e) { super.linkActivated(e); - Composite section = ((Hyperlink) e.getSource()).getParent().getParent(); updatePreference(serverName); } @@ -222,7 +221,6 @@ public class ChartUtil { @Override protected void updatePreference(String serverName) { - ServerStats stats; if (serverName == null) { preferenceStore.setValue(PreferenceConstants.P_CPU_AGGREGATED_CHART_PERIOD, statsPeriod); } else { diff --git a/src/com.gluster.storage.management.console/src/com/gluster/storage/management/console/utils/ChartViewerComposite.java b/src/org.gluster.storage.management.console/src/org/gluster/storage/management/console/utils/ChartViewerComposite.java index 8da32a60..bbea8bd9 100644 --- a/src/com.gluster.storage.management.console/src/com/gluster/storage/management/console/utils/ChartViewerComposite.java +++ b/src/org.gluster.storage.management.console/src/org/gluster/storage/management/console/utils/ChartViewerComposite.java @@ -1,22 +1,22 @@ /******************************************************************************* - * Copyright (c) 2011 Gluster, Inc. <http://www.gluster.com> + * Copyright (c) 2006-2011 Gluster, Inc. <http://www.gluster.com> * This file is part of Gluster Management Console. * - * Gluster Management Console is free software; you can redistribute it and/or - * modify it under the terms of the GNU Affero General Public License as published - * by the Free Software Foundation; either version 3 of the License, or - * (at your option) any later version. - * - * Gluster Management Console is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY - * or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Affero General Public License - * for more details. - * - * You should have received a copy of the GNU Affero General Public License - * along with this program. If not, see + * Gluster Management Console is free software; you can redistribute + * it and/or modify it under the terms of the GNU General Public + * License as published by the Free Software Foundation; either + * version 3 of the License, or (at your option) any later version. + * + * Gluster Management Console is distributed in the hope that it + * will be useful, but WITHOUT ANY WARRANTY; without even the + * implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR + * PURPOSE. See the GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program. If not, see * <http://www.gnu.org/licenses/>. *******************************************************************************/ -package com.gluster.storage.management.console.utils; +package org.gluster.storage.management.console.utils; import java.util.Arrays; import java.util.Collections; @@ -37,6 +37,8 @@ import org.eclipse.birt.chart.model.attribute.Bounds; import org.eclipse.birt.chart.model.attribute.ChartDimension; import org.eclipse.birt.chart.model.attribute.LineAttributes; import org.eclipse.birt.chart.model.attribute.LineStyle; +import org.eclipse.birt.chart.model.attribute.Position; +import org.eclipse.birt.chart.model.attribute.Text; import org.eclipse.birt.chart.model.attribute.TickStyle; import org.eclipse.birt.chart.model.attribute.impl.BoundsImpl; import org.eclipse.birt.chart.model.attribute.impl.ColorDefinitionImpl; @@ -307,6 +309,9 @@ public final class ChartViewerComposite extends Composite implements PaintListen */ public static final Chart createPieChart(String[] categories, Double[] values) { ChartWithoutAxes pieChart = ChartWithoutAxesImpl.create(); + + // script hook to NOT show the label if value is zero + pieChart.setScript("function beforeDrawDataPointLabel( dph, label, icsc ){ if (dph.getOrthogonalValue() == 0){ label.setVisible(false); } } "); // Plot pieChart.setSeriesThickness(10); @@ -350,8 +355,13 @@ public final class ChartViewerComposite extends Composite implements PaintListen sePie.setDataSet(seriesOneValues); sePie.setSeriesIdentifier("Chart");//$NON-NLS-1$ sePie.getTitle().setVisible(false); // no title - sePie.getLabel().setVisible(false); // no label (values) + sePie.getLabel().setVisible(true); // show label (values) sePie.setExplosion(0); // no gap between the pie slices + sePie.setLabelPosition(Position.INSIDE_LITERAL); + Text labelCaption = sePie.getLabel().getCaption(); + labelCaption.setColor(ColorDefinitionImpl.CYAN()); + labelCaption.getFont().setSize(8); + labelCaption.getFont().setBold(true); SeriesDefinition seriesDefinition = SeriesDefinitionImpl.create(); seriesDefinition.getQuery().setDefinition("query.definition");//$NON-NLS-1$ diff --git a/src/com.gluster.storage.management.console/src/com/gluster/storage/management/console/utils/EntityViewerFilter.java b/src/org.gluster.storage.management.console/src/org/gluster/storage/management/console/utils/EntityViewerFilter.java index 60161324..980c0c89 100644 --- a/src/com.gluster.storage.management.console/src/com/gluster/storage/management/console/utils/EntityViewerFilter.java +++ b/src/org.gluster.storage.management.console/src/org/gluster/storage/management/console/utils/EntityViewerFilter.java @@ -1,30 +1,30 @@ /******************************************************************************* - * Copyright (c) 2011 Gluster, Inc. <http://www.gluster.com> + * Copyright (c) 2006-2011 Gluster, Inc. <http://www.gluster.com> * This file is part of Gluster Management Console. * - * Gluster Management Console is free software; you can redistribute it and/or - * modify it under the terms of the GNU Affero General Public License as published - * by the Free Software Foundation; either version 3 of the License, or - * (at your option) any later version. - * - * Gluster Management Console is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY - * or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Affero General Public License - * for more details. - * - * You should have received a copy of the GNU Affero General Public License - * along with this program. If not, see + * Gluster Management Console is free software; you can redistribute + * it and/or modify it under the terms of the GNU General Public + * License as published by the Free Software Foundation; either + * version 3 of the License, or (at your option) any later version. + * + * Gluster Management Console is distributed in the hope that it + * will be useful, but WITHOUT ANY WARRANTY; without even the + * implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR + * PURPOSE. See the GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program. If not, see * <http://www.gnu.org/licenses/>. *******************************************************************************/ -package com.gluster.storage.management.console.utils; +package org.gluster.storage.management.console.utils; import java.util.Map.Entry; import org.eclipse.jface.viewers.Viewer; import org.eclipse.jface.viewers.ViewerFilter; +import org.gluster.storage.management.core.model.Filterable; +import org.gluster.storage.management.core.utils.StringUtil; -import com.gluster.storage.management.core.model.Filterable; -import com.gluster.storage.management.core.utils.StringUtil; public class EntityViewerFilter extends ViewerFilter { diff --git a/src/com.gluster.storage.management.console/src/com/gluster/storage/management/console/utils/GUIHelper.java b/src/org.gluster.storage.management.console/src/org/gluster/storage/management/console/utils/GUIHelper.java index ab846e74..e88d10f8 100644 --- a/src/com.gluster.storage.management.console/src/com/gluster/storage/management/console/utils/GUIHelper.java +++ b/src/org.gluster.storage.management.console/src/org/gluster/storage/management/console/utils/GUIHelper.java @@ -1,22 +1,22 @@ /******************************************************************************* - * Copyright (c) 2011 Gluster, Inc. <http://www.gluster.com> + * Copyright (c) 2006-2011 Gluster, Inc. <http://www.gluster.com> * This file is part of Gluster Management Console. * - * Gluster Management Console is free software; you can redistribute it and/or - * modify it under the terms of the GNU Affero General Public License as published - * by the Free Software Foundation; either version 3 of the License, or - * (at your option) any later version. - * - * Gluster Management Console is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY - * or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Affero General Public License - * for more details. - * - * You should have received a copy of the GNU Affero General Public License - * along with this program. If not, see + * Gluster Management Console is free software; you can redistribute + * it and/or modify it under the terms of the GNU General Public + * License as published by the Free Software Foundation; either + * version 3 of the License, or (at your option) any later version. + * + * Gluster Management Console is distributed in the hope that it + * will be useful, but WITHOUT ANY WARRANTY; without even the + * implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR + * PURPOSE. See the GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program. If not, see * <http://www.gnu.org/licenses/>. *******************************************************************************/ -package com.gluster.storage.management.console.utils; +package org.gluster.storage.management.console.utils; import java.util.Arrays; import java.util.HashSet; @@ -34,7 +34,6 @@ import org.eclipse.jface.layout.TableColumnLayout; import org.eclipse.jface.resource.ImageDescriptor; import org.eclipse.jface.viewers.CheckStateChangedEvent; import org.eclipse.jface.viewers.CheckboxTableViewer; -import org.eclipse.jface.viewers.ColumnLabelProvider; import org.eclipse.jface.viewers.ColumnLayoutData; import org.eclipse.jface.viewers.ColumnWeightData; import org.eclipse.jface.viewers.ICheckStateListener; @@ -44,8 +43,6 @@ import org.eclipse.jface.viewers.IStructuredSelection; import org.eclipse.jface.viewers.SelectionChangedEvent; import org.eclipse.jface.viewers.StructuredSelection; import org.eclipse.jface.viewers.StructuredViewer; -import org.eclipse.jface.viewers.TableViewer; -import org.eclipse.jface.viewers.TableViewerColumn; import org.eclipse.jface.viewers.TreeViewer; import org.eclipse.swt.SWT; import org.eclipse.swt.events.KeyAdapter; @@ -78,16 +75,16 @@ import org.eclipse.ui.forms.widgets.FormToolkit; import org.eclipse.ui.forms.widgets.ScrolledForm; import org.eclipse.ui.forms.widgets.Section; import org.eclipse.ui.progress.IProgressConstants; +import org.gluster.storage.management.console.Application; +import org.gluster.storage.management.console.ConsoleConstants; +import org.gluster.storage.management.console.GlusterDataModelManager; +import org.gluster.storage.management.console.IImageKeys; +import org.gluster.storage.management.console.views.NavigationView; +import org.gluster.storage.management.console.views.TasksView; +import org.gluster.storage.management.core.exceptions.GlusterRuntimeException; +import org.gluster.storage.management.core.model.Disk; +import org.gluster.storage.management.core.utils.JavaUtil; -import com.gluster.storage.management.console.Application; -import com.gluster.storage.management.console.ConsoleConstants; -import com.gluster.storage.management.console.GlusterDataModelManager; -import com.gluster.storage.management.console.IImageKeys; -import com.gluster.storage.management.console.views.NavigationView; -import com.gluster.storage.management.console.views.TasksView; -import com.gluster.storage.management.core.exceptions.GlusterRuntimeException; -import com.gluster.storage.management.core.model.Disk; -import com.gluster.storage.management.core.utils.JavaUtil; public class GUIHelper { private static final GUIHelper instance = new GUIHelper(); @@ -348,24 +345,6 @@ public class GUIHelper { } /** - * Sets properties for alignment and weight of given column of given table - * - * @param table - * @param columnIndex - * @param alignment - * @param weight - * - * @return The table viewer column created - */ - public TableViewerColumn setColumnProperties(TableViewer tableViewer, int columnIndex, int style, int weight) { - TableViewerColumn column = new TableViewerColumn(tableViewer, style, columnIndex); - TableColumnLayout tableColumnLayout = (TableColumnLayout) tableViewer.getTable().getParent().getLayout(); - tableColumnLayout.setColumnData(column.getColumn(), new ColumnWeightData(weight)); - column.setLabelProvider(new ColumnLabelProvider()); - return column; - } - - /** * Fetches the currently selected objects from the workbench site and returns the one of given type. If none of the * selected objects are of given type, returns null * @@ -436,7 +415,6 @@ public class GUIHelper { tableViewer.addSelectionChangedListener(new ISelectionChangedListener() { - @SuppressWarnings("unchecked") @Override public void selectionChanged(SelectionChangedEvent event) { List<Object> checkedElements = Arrays.asList(tableViewer.getCheckedElements()); diff --git a/src/com.gluster.storage.management.console/src/com/gluster/storage/management/console/utils/GlusterChartPalette.java b/src/org.gluster.storage.management.console/src/org/gluster/storage/management/console/utils/GlusterChartPalette.java index 3c5b0b62..f6bc80f6 100644 --- a/src/com.gluster.storage.management.console/src/com/gluster/storage/management/console/utils/GlusterChartPalette.java +++ b/src/org.gluster.storage.management.console/src/org/gluster/storage/management/console/utils/GlusterChartPalette.java @@ -1,15 +1,23 @@ -/*********************************************************************** - * Copyright (c) 2004 Actuate Corporation. - * All rights reserved. This program and the accompanying materials - * are made available under the terms of the Eclipse Public License v1.0 - * which accompanies this distribution, and is available at - * http://www.eclipse.org/legal/epl-v10.html +/******************************************************************************* + * Copyright (c) 2006-2011 Gluster, Inc. <http://www.gluster.com> + * This file is part of Gluster Management Console. * - * Contributors: - * Actuate Corporation - initial API and implementation - ***********************************************************************/ + * Gluster Management Console is free software; you can redistribute + * it and/or modify it under the terms of the GNU General Public + * License as published by the Free Software Foundation; either + * version 3 of the License, or (at your option) any later version. + * + * Gluster Management Console is distributed in the hope that it + * will be useful, but WITHOUT ANY WARRANTY; without even the + * implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR + * PURPOSE. See the GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program. If not, see + * <http://www.gnu.org/licenses/>. + *******************************************************************************/ -package com.gluster.storage.management.console.utils; +package org.gluster.storage.management.console.utils; import java.util.ArrayList; import java.util.Collection; @@ -81,7 +89,7 @@ public class GlusterChartPalette extends EObjectImpl implements Palette private static ILogger logger = Logger.getLogger( "org.eclipse.birt.chart.engine/model.attribute.impl" ); //$NON-NLS-1$ - private static List colorLib = new ArrayList( 32 ); + private static List<ColorDefinition> colorLib = new ArrayList<ColorDefinition>( 32 ); static { colorLib.add( ColorDefinitionImpl.create ( 0, 1, 252) ); @@ -303,7 +311,7 @@ public class GlusterChartPalette extends EObjectImpl implements Palette * @param lst * @param pos */ - private static final void shiftList( final List lst, int pos ) + private static final void shiftList( final List<ColorDefinition> lst, int pos ) { int size = lst.size( ); @@ -322,7 +330,7 @@ public class GlusterChartPalette extends EObjectImpl implements Palette return; } - Object[] array = lst.toArray( ); + ColorDefinition[] array = lst.toArray(new ColorDefinition[0]); lst.clear( ); @@ -344,13 +352,13 @@ public class GlusterChartPalette extends EObjectImpl implements Palette */ public final void update( int iIndex ) { - final EList el = getEntries( ); + final EList<Fill> el = getEntries( ); el.clear( ); if ( iIndex < 0 ) { // a rotation version of palette-0, rataion pos is the negatvie // index. - ArrayList al = new ArrayList( ); + ArrayList<ColorDefinition> al = new ArrayList<ColorDefinition>( ); al.add( ColorDefinitionImpl.create( 80, 166, 218 ) ); al.add( ColorDefinitionImpl.create( 242, 88, 106 ) ); @@ -406,7 +414,7 @@ public class GlusterChartPalette extends EObjectImpl implements Palette */ public final void update( Fill f ) { - final EList el = getEntries( ); + final EList<Fill> el = getEntries( ); el.clear( ); el.add( f ); } diff --git a/src/com.gluster.storage.management.console/src/com/gluster/storage/management/console/utils/GlusterLogger.java b/src/org.gluster.storage.management.console/src/org/gluster/storage/management/console/utils/GlusterLogger.java index b633678a..c69ec539 100644 --- a/src/com.gluster.storage.management.console/src/com/gluster/storage/management/console/utils/GlusterLogger.java +++ b/src/org.gluster.storage.management.console/src/org/gluster/storage/management/console/utils/GlusterLogger.java @@ -1,27 +1,27 @@ /******************************************************************************* - * Copyright (c) 2011 Gluster, Inc. <http://www.gluster.com> + * Copyright (c) 2006-2011 Gluster, Inc. <http://www.gluster.com> * This file is part of Gluster Management Console. * - * Gluster Management Console is free software; you can redistribute it and/or - * modify it under the terms of the GNU Affero General Public License as published - * by the Free Software Foundation; either version 3 of the License, or - * (at your option) any later version. - * - * Gluster Management Console is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY - * or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Affero General Public License - * for more details. - * - * You should have received a copy of the GNU Affero General Public License - * along with this program. If not, see + * Gluster Management Console is free software; you can redistribute + * it and/or modify it under the terms of the GNU General Public + * License as published by the Free Software Foundation; either + * version 3 of the License, or (at your option) any later version. + * + * Gluster Management Console is distributed in the hope that it + * will be useful, but WITHOUT ANY WARRANTY; without even the + * implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR + * PURPOSE. See the GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program. If not, see * <http://www.gnu.org/licenses/>. *******************************************************************************/ -package com.gluster.storage.management.console.utils; +package org.gluster.storage.management.console.utils; import org.eclipse.core.runtime.ILog; import org.eclipse.core.runtime.Status; +import org.gluster.storage.management.console.Activator; -import com.gluster.storage.management.console.Activator; /** * diff --git a/src/com.gluster.storage.management.console/src/com/gluster/storage/management/console/utils/ImageUtil.java b/src/org.gluster.storage.management.console/src/org/gluster/storage/management/console/utils/ImageUtil.java index d278704b..39e0ae34 100644 --- a/src/com.gluster.storage.management.console/src/com/gluster/storage/management/console/utils/ImageUtil.java +++ b/src/org.gluster.storage.management.console/src/org/gluster/storage/management/console/utils/ImageUtil.java @@ -1,31 +1,29 @@ -/** - * ImageUtil.java - * - * Copyright (c) 2011 Gluster, Inc. <http://www.gluster.com> +/******************************************************************************* + * Copyright (c) 2006-2011 Gluster, Inc. <http://www.gluster.com> * This file is part of Gluster Management Console. * - * Gluster Management Console is free software; you can redistribute it and/or - * modify it under the terms of the GNU Affero General Public License as published - * by the Free Software Foundation; either version 3 of the License, or - * (at your option) any later version. + * Gluster Management Console is free software; you can redistribute + * it and/or modify it under the terms of the GNU General Public + * License as published by the Free Software Foundation; either + * version 3 of the License, or (at your option) any later version. * - * Gluster Management Console is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY - * or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Affero General Public License - * for more details. + * Gluster Management Console is distributed in the hope that it + * will be useful, but WITHOUT ANY WARRANTY; without even the + * implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR + * PURPOSE. See the GNU General Public License for more details. * - * You should have received a copy of the GNU Affero General Public License - * along with this program. If not, see + * You should have received a copy of the GNU General Public License + * along with this program. If not, see * <http://www.gnu.org/licenses/>. - */ -package com.gluster.storage.management.console.utils; + *******************************************************************************/ +package org.gluster.storage.management.console.utils; import org.eclipse.jface.resource.ImageDescriptor; import org.eclipse.swt.graphics.Image; import org.eclipse.ui.plugin.AbstractUIPlugin; +import org.gluster.storage.management.console.Application; +import org.gluster.storage.management.core.utils.LRUCache; -import com.gluster.storage.management.console.Application; -import com.gluster.storage.management.core.utils.LRUCache; /** * diff --git a/src/org.gluster.storage.management.console/src/org/gluster/storage/management/console/utils/TableViewerComparator.java b/src/org.gluster.storage.management.console/src/org/gluster/storage/management/console/utils/TableViewerComparator.java new file mode 100644 index 00000000..b6cd8e54 --- /dev/null +++ b/src/org.gluster.storage.management.console/src/org/gluster/storage/management/console/utils/TableViewerComparator.java @@ -0,0 +1,73 @@ +/******************************************************************************* + * Copyright (c) 2006-2011 Gluster, Inc. <http://www.gluster.com> + * This file is part of Gluster Management Console. + * + * Gluster Management Console is free software; you can redistribute + * it and/or modify it under the terms of the GNU General Public + * License as published by the Free Software Foundation; either + * version 3 of the License, or (at your option) any later version. + * + * Gluster Management Console is distributed in the hope that it + * will be useful, but WITHOUT ANY WARRANTY; without even the + * implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR + * PURPOSE. See the GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program. If not, see + * <http://www.gnu.org/licenses/>. + *******************************************************************************/ +package org.gluster.storage.management.console.utils; + +import org.eclipse.jface.viewers.Viewer; +import org.eclipse.jface.viewers.ViewerComparator; +import org.eclipse.swt.SWT; + +/** + * Comparator for sorting contents of a table viewer + */ +public class TableViewerComparator extends ViewerComparator { + private int column = -1; + private static final int ASCENDING = 0; + private static final int DESCENDING = 1; + private static final int NONE = -1; + private int direction = DESCENDING; + + public TableViewerComparator() { + this(NONE); + } + + public TableViewerComparator(int direction) { + this.direction = direction; + } + + public int getDirection() { + return direction == DESCENDING ? SWT.DOWN : (direction == ASCENDING ? SWT.UP : SWT.NONE); + } + + public void setColumn(int column) { + if (column == this.column) { + // Same column as last sort; toggle the direction + direction = 1 - direction; + } else { + // first column selection or new column; do an ascending sort + direction = ASCENDING; + this.column = column; + } + } + + @Override + public int compare(Viewer viewer, Object e1, Object e2) { + if(direction == NONE) { + // no sorting + return 0; + } + + int result = super.compare(viewer, e1, e2); + // If descending order, flip the direction + if (direction == DESCENDING) { + result = -result; + } + + return result; + } +} diff --git a/src/com.gluster.storage.management.console/src/com/gluster/storage/management/console/validators/StringRequiredValidator.java b/src/org.gluster.storage.management.console/src/org/gluster/storage/management/console/validators/StringRequiredValidator.java index cac65829..7a914348 100644 --- a/src/com.gluster.storage.management.console/src/com/gluster/storage/management/console/validators/StringRequiredValidator.java +++ b/src/org.gluster.storage.management.console/src/org/gluster/storage/management/console/validators/StringRequiredValidator.java @@ -1,22 +1,22 @@ /******************************************************************************* - * Copyright (c) 2011 Gluster, Inc. <http://www.gluster.com> + * Copyright (c) 2006-2011 Gluster, Inc. <http://www.gluster.com> * This file is part of Gluster Management Console. * - * Gluster Management Console is free software; you can redistribute it and/or - * modify it under the terms of the GNU Affero General Public License as published - * by the Free Software Foundation; either version 3 of the License, or - * (at your option) any later version. - * - * Gluster Management Console is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY - * or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Affero General Public License - * for more details. - * - * You should have received a copy of the GNU Affero General Public License - * along with this program. If not, see + * Gluster Management Console is free software; you can redistribute + * it and/or modify it under the terms of the GNU General Public + * License as published by the Free Software Foundation; either + * version 3 of the License, or (at your option) any later version. + * + * Gluster Management Console is distributed in the hope that it + * will be useful, but WITHOUT ANY WARRANTY; without even the + * implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR + * PURPOSE. See the GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program. If not, see * <http://www.gnu.org/licenses/>. *******************************************************************************/ -package com.gluster.storage.management.console.validators; +package org.gluster.storage.management.console.validators; import org.eclipse.core.databinding.validation.IValidator; import org.eclipse.core.databinding.validation.ValidationStatus; diff --git a/src/com.gluster.storage.management.console/src/com/gluster/storage/management/console/views/ClusterAdapterFactory.java b/src/org.gluster.storage.management.console/src/org/gluster/storage/management/console/views/ClusterAdapterFactory.java index d904c8f3..7afdde1c 100644 --- a/src/com.gluster.storage.management.console/src/com/gluster/storage/management/console/views/ClusterAdapterFactory.java +++ b/src/org.gluster.storage.management.console/src/org/gluster/storage/management/console/views/ClusterAdapterFactory.java @@ -1,37 +1,37 @@ /******************************************************************************* - * Copyright (c) 2011 Gluster, Inc. <http://www.gluster.com> + * Copyright (c) 2006-2011 Gluster, Inc. <http://www.gluster.com> * This file is part of Gluster Management Console. * - * Gluster Management Console is free software; you can redistribute it and/or - * modify it under the terms of the GNU Affero General Public License as published - * by the Free Software Foundation; either version 3 of the License, or - * (at your option) any later version. - * - * Gluster Management Console is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY - * or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Affero General Public License - * for more details. - * - * You should have received a copy of the GNU Affero General Public License - * along with this program. If not, see + * Gluster Management Console is free software; you can redistribute + * it and/or modify it under the terms of the GNU General Public + * License as published by the Free Software Foundation; either + * version 3 of the License, or (at your option) any later version. + * + * Gluster Management Console is distributed in the hope that it + * will be useful, but WITHOUT ANY WARRANTY; without even the + * implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR + * PURPOSE. See the GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program. If not, see * <http://www.gnu.org/licenses/>. *******************************************************************************/ -package com.gluster.storage.management.console.views; +package org.gluster.storage.management.console.views; import org.eclipse.core.runtime.IAdapterFactory; import org.eclipse.jface.resource.ImageDescriptor; import org.eclipse.ui.model.IWorkbenchAdapter; import org.eclipse.ui.plugin.AbstractUIPlugin; +import org.gluster.storage.management.console.Application; +import org.gluster.storage.management.console.IImageKeys; +import org.gluster.storage.management.core.model.Cluster; +import org.gluster.storage.management.core.model.Entity; +import org.gluster.storage.management.core.model.EntityGroup; +import org.gluster.storage.management.core.model.GlusterDataModel; +import org.gluster.storage.management.core.model.GlusterServer; +import org.gluster.storage.management.core.model.Server; +import org.gluster.storage.management.core.model.Volume; -import com.gluster.storage.management.console.Application; -import com.gluster.storage.management.console.IImageKeys; -import com.gluster.storage.management.core.model.Cluster; -import com.gluster.storage.management.core.model.Entity; -import com.gluster.storage.management.core.model.EntityGroup; -import com.gluster.storage.management.core.model.GlusterDataModel; -import com.gluster.storage.management.core.model.GlusterServer; -import com.gluster.storage.management.core.model.Server; -import com.gluster.storage.management.core.model.Volume; public class ClusterAdapterFactory implements IAdapterFactory { private IWorkbenchAdapter entityAdapter = new IWorkbenchAdapter() { @@ -46,7 +46,7 @@ public class ClusterAdapterFactory implements IAdapterFactory { return ((Entity)o).getName(); } - @SuppressWarnings({ "unchecked", "rawtypes" }) + @SuppressWarnings("rawtypes") @Override public ImageDescriptor getImageDescriptor(Object object) { String iconPath = null; @@ -82,7 +82,6 @@ public class ClusterAdapterFactory implements IAdapterFactory { } }; - @SuppressWarnings("rawtypes") @Override public Object getAdapter(Object adaptableObject, Class adapterType) { if (adapterType == IWorkbenchAdapter.class) { @@ -93,7 +92,6 @@ public class ClusterAdapterFactory implements IAdapterFactory { return null; } - @SuppressWarnings("rawtypes") @Override public Class[] getAdapterList() { return new Class[] { IWorkbenchAdapter.class }; diff --git a/src/com.gluster.storage.management.console/src/com/gluster/storage/management/console/views/ClusterSummaryView.java b/src/org.gluster.storage.management.console/src/org/gluster/storage/management/console/views/ClusterSummaryView.java index 6c121752..85086e6f 100644 --- a/src/com.gluster.storage.management.console/src/com/gluster/storage/management/console/views/ClusterSummaryView.java +++ b/src/org.gluster.storage.management.console/src/org/gluster/storage/management/console/views/ClusterSummaryView.java @@ -1,27 +1,26 @@ -/** - * DiscoveredServerView.java - * - * Copyright (c) 2011 Gluster, Inc. <http://www.gluster.com> +/******************************************************************************* + * Copyright (c) 2006-2011 Gluster, Inc. <http://www.gluster.com> * This file is part of Gluster Management Console. * - * Gluster Management Console is free software; you can redistribute it and/or - * modify it under the terms of the GNU Affero General Public License as published - * by the Free Software Foundation; either version 3 of the License, or - * (at your option) any later version. + * Gluster Management Console is free software; you can redistribute + * it and/or modify it under the terms of the GNU General Public + * License as published by the Free Software Foundation; either + * version 3 of the License, or (at your option) any later version. * - * Gluster Management Console is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY - * or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Affero General Public License - * for more details. + * Gluster Management Console is distributed in the hope that it + * will be useful, but WITHOUT ANY WARRANTY; without even the + * implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR + * PURPOSE. See the GNU General Public License for more details. * - * You should have received a copy of the GNU Affero General Public License - * along with this program. If not, see + * You should have received a copy of the GNU General Public License + * along with this program. If not, see * <http://www.gnu.org/licenses/>. - */ -package com.gluster.storage.management.console.views; + *******************************************************************************/ +package org.gluster.storage.management.console.views; import java.util.List; +import org.eclipse.jface.fieldassist.ControlDecoration; import org.eclipse.jface.preference.IPreferenceStore; import org.eclipse.jface.util.IPropertyChangeListener; import org.eclipse.jface.util.PropertyChangeEvent; @@ -40,31 +39,30 @@ import org.eclipse.ui.forms.widgets.ImageHyperlink; import org.eclipse.ui.forms.widgets.ScrolledForm; import org.eclipse.ui.handlers.IHandlerService; import org.eclipse.ui.part.ViewPart; +import org.gluster.storage.management.console.Activator; +import org.gluster.storage.management.console.GlusterDataModelManager; +import org.gluster.storage.management.console.IImageKeys; +import org.gluster.storage.management.console.actions.ActionConstants; +import org.gluster.storage.management.console.preferences.PreferenceConstants; +import org.gluster.storage.management.console.utils.ChartUtil; +import org.gluster.storage.management.console.utils.ChartViewerComposite; +import org.gluster.storage.management.console.utils.GUIHelper; +import org.gluster.storage.management.console.utils.ChartUtil.ChartPeriodLinkListener; +import org.gluster.storage.management.core.constants.CoreConstants; +import org.gluster.storage.management.core.constants.GlusterConstants; +import org.gluster.storage.management.core.model.Alert; +import org.gluster.storage.management.core.model.Cluster; +import org.gluster.storage.management.core.model.ClusterListener; +import org.gluster.storage.management.core.model.DefaultClusterListener; +import org.gluster.storage.management.core.model.EntityGroup; +import org.gluster.storage.management.core.model.GlusterDataModel; +import org.gluster.storage.management.core.model.GlusterServer; +import org.gluster.storage.management.core.model.Server; +import org.gluster.storage.management.core.model.ServerStats; +import org.gluster.storage.management.core.model.Status; +import org.gluster.storage.management.core.model.TaskInfo; +import org.gluster.storage.management.core.model.Server.SERVER_STATUS; -import com.gluster.storage.management.console.Activator; -import com.gluster.storage.management.console.GlusterDataModelManager; -import com.gluster.storage.management.console.IImageKeys; -import com.gluster.storage.management.console.actions.ActionConstants; -import com.gluster.storage.management.console.preferences.PreferenceConstants; -import com.gluster.storage.management.console.utils.ChartUtil; -import com.gluster.storage.management.console.utils.ChartViewerComposite; -import com.gluster.storage.management.console.utils.GUIHelper; -import com.gluster.storage.management.console.utils.ChartUtil.ChartPeriodLinkListener; -import com.gluster.storage.management.core.constants.CoreConstants; -import com.gluster.storage.management.core.constants.GlusterConstants; -import com.gluster.storage.management.core.model.Alert; -import com.gluster.storage.management.core.model.Cluster; -import com.gluster.storage.management.core.model.ClusterListener; -import com.gluster.storage.management.core.model.DefaultClusterListener; -import com.gluster.storage.management.core.model.EntityGroup; -import com.gluster.storage.management.core.model.GlusterDataModel; -import com.gluster.storage.management.core.model.GlusterServer; -import com.gluster.storage.management.core.model.Server; -import com.gluster.storage.management.core.model.Server.SERVER_STATUS; -import com.gluster.storage.management.core.model.ServerStats; -import com.gluster.storage.management.core.model.Status; -import com.gluster.storage.management.core.model.TaskInfo; -import com.gluster.storage.management.core.utils.NumberUtil; /** * @@ -84,6 +82,8 @@ public class ClusterSummaryView extends ViewPart { private Composite tasksSection; private static final ChartUtil chartUtil = ChartUtil.getInstance(); private IPropertyChangeListener propertyChangeListener; + private Label onlineServerCountLabel; + private Label offlineServerCountLabel; /* * (non-Javadoc) @@ -136,6 +136,7 @@ public class ClusterSummaryView extends ViewPart { public void aggregatedStatsChanged() { super.aggregatedStatsChanged(); refreshCharts(); + populateOnlineOfflineServerCount(); } @Override @@ -198,19 +199,24 @@ public class ClusterSummaryView extends ViewPart { private void createServersSection() { Composite section = guiHelper.createSection(form, toolkit, "Servers", null, 2, false); + toolkit.createLabel(section, "Online : "); + onlineServerCountLabel = toolkit.createLabel(section, ""); + toolkit.createLabel(section, "Offline : "); + offlineServerCountLabel = toolkit.createLabel(section, ""); + populateOnlineOfflineServerCount(); + } + + private void populateOnlineOfflineServerCount() { int onlineServerCount = getServerCountByStatus(cluster, SERVER_STATUS.ONLINE); int offlineServerCount = getServerCountByStatus(cluster, SERVER_STATUS.OFFLINE); - - toolkit.createLabel(section, "Online : "); - Label label = toolkit.createLabel(section, "" + onlineServerCount); - label.setForeground(Display.getCurrent().getSystemColor(SWT.COLOR_DARK_GREEN)); - - toolkit.createLabel(section, "Offline : "); - label = toolkit.createLabel(section, "" + offlineServerCount); - label.setForeground(Display.getCurrent().getSystemColor(SWT.COLOR_RED)); + onlineServerCountLabel.setText("" + onlineServerCount); + onlineServerCountLabel.setForeground(Display.getCurrent().getSystemColor(SWT.COLOR_DARK_GREEN)); + offlineServerCountLabel.setText("" + offlineServerCount); + offlineServerCountLabel.setForeground(Display.getCurrent().getSystemColor(SWT.COLOR_RED)); } + private void createDiskSpaceSection() { Composite section = guiHelper.createSection(form, toolkit, "Disk Space", null, 3, false); if (cluster.getServers().size() == 0) { @@ -221,18 +227,17 @@ public class ClusterSummaryView extends ViewPart { double totalDiskSpace = cluster.getTotalDiskSpace(); double diskSpaceInUse = cluster.getDiskSpaceInUse(); - Double[] values = new Double[] { diskSpaceInUse, totalDiskSpace - diskSpaceInUse }; + Double[] values = new Double[] { diskSpaceInUse / 1024, (totalDiskSpace - diskSpaceInUse) / 1024 }; createDiskSpaceChart(section, values); } private void createDiskSpaceChart(Composite section, Double[] values) { - String[] categories = new String[] { "Used Space: " + NumberUtil.formatNumber((values[0] / 1024)) + " GB", - "Free Space: " + NumberUtil.formatNumber((values[1] / 1024)) + " GB" }; + String[] categories = new String[] { "Used Space (GB)", "Free Space (GB)" }; ChartViewerComposite chartViewerComposite = new ChartViewerComposite(section, SWT.NONE, categories, values); GridData data = new GridData(SWT.FILL, SWT.FILL, false, false); data.widthHint = 400; - data.heightHint = 170; + data.heightHint = 180; data.verticalAlignment = SWT.CENTER; chartViewerComposite.setLayoutData(data); } @@ -253,6 +258,11 @@ public class ClusterSummaryView extends ViewPart { private void addAlertLabel(Composite section, Alert alert) { CLabel lblAlert = new CLabel(section, SWT.FLAT); + GridData layoutData = new GridData(); + layoutData.widthHint = 400; + layoutData.horizontalIndent = 20; + lblAlert.setLayoutData(layoutData); + Image alertImage = null; switch (alert.getType()) { case OFFLINE_VOLUME_BRICKS_ALERT: @@ -270,9 +280,13 @@ public class ClusterSummaryView extends ViewPart { case CPU_USAGE_ALERT: alertImage = guiHelper.getImage(IImageKeys.SERVER_WARNING_22x22); break; + case OFFLINE_VOLUME_ALERT: + alertImage = guiHelper.getImage(IImageKeys.VOLUME_OFFLINE_22x22); + break; } - lblAlert.setImage(alertImage); lblAlert.setText(alert.getMessage()); + ControlDecoration dec = new ControlDecoration(lblAlert, SWT.LEFT); + dec.setImage(alertImage); lblAlert.redraw(); } @@ -437,6 +451,10 @@ public class ClusterSummaryView extends ViewPart { private void refreshChartSection(Composite section, ServerStats stats, String statsPeriod, String unit, double maxValue, int columnCount, ChartPeriodLinkListener linkListener, int dataColumnIndex) { + if(stats == null) { + return; + } + for (Control control : section.getChildren()) { if (!control.isDisposed()) { control.dispose(); diff --git a/src/com.gluster.storage.management.console/src/com/gluster/storage/management/console/views/DiscoveredServerView.java b/src/org.gluster.storage.management.console/src/org/gluster/storage/management/console/views/DiscoveredServerView.java index 96a2ca2a..aba4d127 100644 --- a/src/com.gluster.storage.management.console/src/com/gluster/storage/management/console/views/DiscoveredServerView.java +++ b/src/org.gluster.storage.management.console/src/org/gluster/storage/management/console/views/DiscoveredServerView.java @@ -1,24 +1,22 @@ -/** - * DiscoveredServerView.java - * - * Copyright (c) 2011 Gluster, Inc. <http://www.gluster.com> +/******************************************************************************* + * Copyright (c) 2006-2011 Gluster, Inc. <http://www.gluster.com> * This file is part of Gluster Management Console. * - * Gluster Management Console is free software; you can redistribute it and/or - * modify it under the terms of the GNU Affero General Public License as published - * by the Free Software Foundation; either version 3 of the License, or - * (at your option) any later version. + * Gluster Management Console is free software; you can redistribute + * it and/or modify it under the terms of the GNU General Public + * License as published by the Free Software Foundation; either + * version 3 of the License, or (at your option) any later version. * - * Gluster Management Console is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY - * or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Affero General Public License - * for more details. + * Gluster Management Console is distributed in the hope that it + * will be useful, but WITHOUT ANY WARRANTY; without even the + * implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR + * PURPOSE. See the GNU General Public License for more details. * - * You should have received a copy of the GNU Affero General Public License - * along with this program. If not, see + * You should have received a copy of the GNU General Public License + * along with this program. If not, see * <http://www.gnu.org/licenses/>. - */ -package com.gluster.storage.management.console.views; + *******************************************************************************/ +package org.gluster.storage.management.console.views; import org.eclipse.swt.SWT; import org.eclipse.swt.widgets.Composite; @@ -26,10 +24,10 @@ import org.eclipse.swt.widgets.Display; import org.eclipse.ui.forms.widgets.FormToolkit; import org.eclipse.ui.forms.widgets.ScrolledForm; import org.eclipse.ui.part.ViewPart; +import org.gluster.storage.management.console.utils.GUIHelper; +import org.gluster.storage.management.core.model.Server; +import org.gluster.storage.management.core.utils.NumberUtil; -import com.gluster.storage.management.console.utils.GUIHelper; -import com.gluster.storage.management.core.model.Server; -import com.gluster.storage.management.core.utils.NumberUtil; /** * @author root @@ -50,7 +48,7 @@ public class DiscoveredServerView extends ViewPart { @Override public void createPartControl(Composite parent) { if (server == null) { - server = (Server) guiHelper.getSelectedEntity(getSite(), Server.class); + server = guiHelper.getSelectedEntity(getSite(), Server.class); } createSections(parent); } diff --git a/src/com.gluster.storage.management.console/src/com/gluster/storage/management/console/views/DiscoveredServersView.java b/src/org.gluster.storage.management.console/src/org/gluster/storage/management/console/views/DiscoveredServersView.java index ab3cd556..2c5856f1 100644 --- a/src/com.gluster.storage.management.console/src/com/gluster/storage/management/console/views/DiscoveredServersView.java +++ b/src/org.gluster.storage.management.console/src/org/gluster/storage/management/console/views/DiscoveredServersView.java @@ -1,36 +1,34 @@ -/** - * DiscoveredServersView.java - * - * Copyright (c) 2011 Gluster, Inc. <http://www.gluster.com> +/******************************************************************************* + * Copyright (c) 2006-2011 Gluster, Inc. <http://www.gluster.com> * This file is part of Gluster Management Console. * - * Gluster Management Console is free software; you can redistribute it and/or - * modify it under the terms of the GNU Affero General Public License as published - * by the Free Software Foundation; either version 3 of the License, or - * (at your option) any later version. + * Gluster Management Console is free software; you can redistribute + * it and/or modify it under the terms of the GNU General Public + * License as published by the Free Software Foundation; either + * version 3 of the License, or (at your option) any later version. * - * Gluster Management Console is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY - * or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Affero General Public License - * for more details. + * Gluster Management Console is distributed in the hope that it + * will be useful, but WITHOUT ANY WARRANTY; without even the + * implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR + * PURPOSE. See the GNU General Public License for more details. * - * You should have received a copy of the GNU Affero General Public License - * along with this program. If not, see + * You should have received a copy of the GNU General Public License + * along with this program. If not, see * <http://www.gnu.org/licenses/>. - */ -package com.gluster.storage.management.console.views; + *******************************************************************************/ +package org.gluster.storage.management.console.views; import org.eclipse.jface.viewers.DoubleClickEvent; import org.eclipse.jface.viewers.IDoubleClickListener; import org.eclipse.jface.viewers.StructuredSelection; import org.eclipse.swt.widgets.Composite; import org.eclipse.ui.part.ViewPart; +import org.gluster.storage.management.console.utils.GUIHelper; +import org.gluster.storage.management.console.views.pages.ServersPage; +import org.gluster.storage.management.core.model.Entity; +import org.gluster.storage.management.core.model.EntityGroup; +import org.gluster.storage.management.core.model.Server; -import com.gluster.storage.management.console.utils.GUIHelper; -import com.gluster.storage.management.console.views.pages.ServersPage; -import com.gluster.storage.management.core.model.Entity; -import com.gluster.storage.management.core.model.EntityGroup; -import com.gluster.storage.management.core.model.Server; /** * diff --git a/src/org.gluster.storage.management.console/src/org/gluster/storage/management/console/views/DisksView.java b/src/org.gluster.storage.management.console/src/org/gluster/storage/management/console/views/DisksView.java new file mode 100644 index 00000000..6e840c01 --- /dev/null +++ b/src/org.gluster.storage.management.console/src/org/gluster/storage/management/console/views/DisksView.java @@ -0,0 +1,62 @@ +/******************************************************************************* + * Copyright (c) 2006-2011 Gluster, Inc. <http://www.gluster.com> + * This file is part of Gluster Management Console. + * + * Gluster Management Console is free software; you can redistribute + * it and/or modify it under the terms of the GNU General Public + * License as published by the Free Software Foundation; either + * version 3 of the License, or (at your option) any later version. + * + * Gluster Management Console is distributed in the hope that it + * will be useful, but WITHOUT ANY WARRANTY; without even the + * implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR + * PURPOSE. See the GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program. If not, see + * <http://www.gnu.org/licenses/>. + *******************************************************************************/ +package org.gluster.storage.management.console.views; + +import java.util.ArrayList; +import java.util.List; + +import org.eclipse.swt.SWT; +import org.eclipse.swt.widgets.Composite; +import org.eclipse.ui.part.ViewPart; +import org.gluster.storage.management.console.utils.GUIHelper; +import org.gluster.storage.management.console.views.pages.DisksPage; +import org.gluster.storage.management.core.model.Disk; +import org.gluster.storage.management.core.model.EntityGroup; +import org.gluster.storage.management.core.model.GlusterServer; + + +public class DisksView extends ViewPart { + public static final String ID = DisksView.class.getName(); + private static final GUIHelper guiHelper = GUIHelper.getInstance(); + private EntityGroup<GlusterServer> servers; + private DisksPage page; + + @Override + public void createPartControl(Composite parent) { + if (servers == null) { + servers = guiHelper.getSelectedEntity(getSite(), EntityGroup.class); + } + + page = new DisksPage(parent, SWT.NONE, getSite(), getAllDisks(servers)); + //page.layout(); // IMP: lays out the form properly + } + + private List<Disk> getAllDisks(EntityGroup<GlusterServer> servers) { + List<Disk> disks = new ArrayList<Disk>(); + for(GlusterServer server : servers.getEntities()) { + disks.addAll(server.getDisks()); + } + return disks; + } + + @Override + public void setFocus() { + page.setFocus(); + } +}
\ No newline at end of file diff --git a/src/com.gluster.storage.management.console/src/com/gluster/storage/management/console/views/GlusterServerDisksView.java b/src/org.gluster.storage.management.console/src/org/gluster/storage/management/console/views/GlusterServerDisksView.java index 951b5a91..e996a82b 100644 --- a/src/com.gluster.storage.management.console/src/com/gluster/storage/management/console/views/GlusterServerDisksView.java +++ b/src/org.gluster.storage.management.console/src/org/gluster/storage/management/console/views/GlusterServerDisksView.java @@ -1,37 +1,35 @@ -/** - * GlusterServerDisksView.java - * - * Copyright (c) 2011 Gluster, Inc. <http://www.gluster.com> +/******************************************************************************* + * Copyright (c) 2006-2011 Gluster, Inc. <http://www.gluster.com> * This file is part of Gluster Management Console. * - * Gluster Management Console is free software; you can redistribute it and/or - * modify it under the terms of the GNU Affero General Public License as published - * by the Free Software Foundation; either version 3 of the License, or - * (at your option) any later version. + * Gluster Management Console is free software; you can redistribute + * it and/or modify it under the terms of the GNU General Public + * License as published by the Free Software Foundation; either + * version 3 of the License, or (at your option) any later version. * - * Gluster Management Console is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY - * or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Affero General Public License - * for more details. + * Gluster Management Console is distributed in the hope that it + * will be useful, but WITHOUT ANY WARRANTY; without even the + * implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR + * PURPOSE. See the GNU General Public License for more details. * - * You should have received a copy of the GNU Affero General Public License - * along with this program. If not, see + * You should have received a copy of the GNU General Public License + * along with this program. If not, see * <http://www.gnu.org/licenses/>. - */ -package com.gluster.storage.management.console.views; + *******************************************************************************/ +package org.gluster.storage.management.console.views; import org.eclipse.swt.SWT; import org.eclipse.swt.widgets.Composite; import org.eclipse.ui.part.ViewPart; +import org.gluster.storage.management.console.GlusterDataModelManager; +import org.gluster.storage.management.console.utils.GUIHelper; +import org.gluster.storage.management.console.views.pages.ServerDisksPage; +import org.gluster.storage.management.core.model.ClusterListener; +import org.gluster.storage.management.core.model.DefaultClusterListener; +import org.gluster.storage.management.core.model.Event; +import org.gluster.storage.management.core.model.GlusterServer; +import org.gluster.storage.management.core.model.Event.EVENT_TYPE; -import com.gluster.storage.management.console.GlusterDataModelManager; -import com.gluster.storage.management.console.utils.GUIHelper; -import com.gluster.storage.management.console.views.pages.ServerDisksPage; -import com.gluster.storage.management.core.model.ClusterListener; -import com.gluster.storage.management.core.model.DefaultClusterListener; -import com.gluster.storage.management.core.model.Event; -import com.gluster.storage.management.core.model.Event.EVENT_TYPE; -import com.gluster.storage.management.core.model.GlusterServer; public class GlusterServerDisksView extends ViewPart { public static final String ID = GlusterServerDisksView.class.getName(); @@ -46,7 +44,7 @@ public class GlusterServerDisksView extends ViewPart { @Override public void createPartControl(Composite parent) { if (server == null) { - server = (GlusterServer) guiHelper.getSelectedEntity(getSite(), GlusterServer.class); + server = guiHelper.getSelectedEntity(getSite(), GlusterServer.class); } page = new ServerDisksPage(parent, SWT.NONE, getSite(), server.getDisks()); diff --git a/src/com.gluster.storage.management.console/src/com/gluster/storage/management/console/views/GlusterServerLogsView.java b/src/org.gluster.storage.management.console/src/org/gluster/storage/management/console/views/GlusterServerLogsView.java index 660da5a3..65a52d28 100644 --- a/src/com.gluster.storage.management.console/src/com/gluster/storage/management/console/views/GlusterServerLogsView.java +++ b/src/org.gluster.storage.management.console/src/org/gluster/storage/management/console/views/GlusterServerLogsView.java @@ -1,32 +1,30 @@ -/** - * GlusterServerLogsView.java - * - * Copyright (c) 2011 Gluster, Inc. <http://www.gluster.com> +/******************************************************************************* + * Copyright (c) 2006-2011 Gluster, Inc. <http://www.gluster.com> * This file is part of Gluster Management Console. * - * Gluster Management Console is free software; you can redistribute it and/or - * modify it under the terms of the GNU Affero General Public License as published - * by the Free Software Foundation; either version 3 of the License, or - * (at your option) any later version. + * Gluster Management Console is free software; you can redistribute + * it and/or modify it under the terms of the GNU General Public + * License as published by the Free Software Foundation; either + * version 3 of the License, or (at your option) any later version. * - * Gluster Management Console is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY - * or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Affero General Public License - * for more details. + * Gluster Management Console is distributed in the hope that it + * will be useful, but WITHOUT ANY WARRANTY; without even the + * implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR + * PURPOSE. See the GNU General Public License for more details. * - * You should have received a copy of the GNU Affero General Public License - * along with this program. If not, see + * You should have received a copy of the GNU General Public License + * along with this program. If not, see * <http://www.gnu.org/licenses/>. - */ -package com.gluster.storage.management.console.views; + *******************************************************************************/ +package org.gluster.storage.management.console.views; import org.eclipse.swt.SWT; import org.eclipse.swt.widgets.Composite; import org.eclipse.ui.part.ViewPart; +import org.gluster.storage.management.console.utils.GUIHelper; +import org.gluster.storage.management.console.views.pages.ServerLogsPage; +import org.gluster.storage.management.core.model.GlusterServer; -import com.gluster.storage.management.console.utils.GUIHelper; -import com.gluster.storage.management.console.views.pages.ServerLogsPage; -import com.gluster.storage.management.core.model.GlusterServer; public class GlusterServerLogsView extends ViewPart { public static final String ID = GlusterServerLogsView.class.getName(); @@ -40,7 +38,7 @@ public class GlusterServerLogsView extends ViewPart { @Override public void createPartControl(Composite parent) { if (server == null) { - server = (GlusterServer) guiHelper.getSelectedEntity(getSite(), GlusterServer.class); + server = guiHelper.getSelectedEntity(getSite(), GlusterServer.class); } page = new ServerLogsPage(parent, SWT.NONE, server); diff --git a/src/com.gluster.storage.management.console/src/com/gluster/storage/management/console/views/GlusterServerSummaryView.java b/src/org.gluster.storage.management.console/src/org/gluster/storage/management/console/views/GlusterServerSummaryView.java index 03c38df7..f76999e7 100644 --- a/src/com.gluster.storage.management.console/src/com/gluster/storage/management/console/views/GlusterServerSummaryView.java +++ b/src/org.gluster.storage.management.console/src/org/gluster/storage/management/console/views/GlusterServerSummaryView.java @@ -1,30 +1,27 @@ -/** - * GlusterServerSummaryView.java - * - * Copyright (c) 2011 Gluster, Inc. <http://www.gluster.com> +/******************************************************************************* + * Copyright (c) 2006-2011 Gluster, Inc. <http://www.gluster.com> * This file is part of Gluster Management Console. * - * Gluster Management Console is free software; you can redistribute it and/or - * modify it under the terms of the GNU Affero General Public License as published - * by the Free Software Foundation; either version 3 of the License, or - * (at your option) any later version. + * Gluster Management Console is free software; you can redistribute + * it and/or modify it under the terms of the GNU General Public + * License as published by the Free Software Foundation; either + * version 3 of the License, or (at your option) any later version. * - * Gluster Management Console is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY - * or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Affero General Public License - * for more details. + * Gluster Management Console is distributed in the hope that it + * will be useful, but WITHOUT ANY WARRANTY; without even the + * implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR + * PURPOSE. See the GNU General Public License for more details. * - * You should have received a copy of the GNU Affero General Public License - * along with this program. If not, see + * You should have received a copy of the GNU General Public License + * along with this program. If not, see * <http://www.gnu.org/licenses/>. - */ -package com.gluster.storage.management.console.views; + *******************************************************************************/ +package org.gluster.storage.management.console.views; import java.lang.reflect.InvocationTargetException; import java.util.ArrayList; import java.util.List; -import org.eclipse.birt.chart.util.CDateTime; import org.eclipse.core.runtime.IProgressMonitor; import org.eclipse.jface.dialogs.MessageDialog; import org.eclipse.jface.dialogs.ProgressMonitorDialog; @@ -41,7 +38,6 @@ import org.eclipse.swt.custom.CLabel; import org.eclipse.swt.graphics.Point; import org.eclipse.swt.layout.FillLayout; import org.eclipse.swt.layout.GridData; -import org.eclipse.swt.layout.GridLayout; import org.eclipse.swt.widgets.Composite; import org.eclipse.swt.widgets.Display; import org.eclipse.swt.widgets.Label; @@ -49,33 +45,29 @@ import org.eclipse.swt.widgets.ProgressBar; import org.eclipse.swt.widgets.Table; import org.eclipse.swt.widgets.TableColumn; import org.eclipse.ui.forms.widgets.FormToolkit; -import org.eclipse.ui.forms.widgets.Hyperlink; import org.eclipse.ui.forms.widgets.ScrolledForm; import org.eclipse.ui.part.ViewPart; +import org.gluster.storage.management.client.GlusterServersClient; +import org.gluster.storage.management.console.Activator; +import org.gluster.storage.management.console.ConsoleConstants; +import org.gluster.storage.management.console.GlusterDataModelManager; +import org.gluster.storage.management.console.IImageKeys; +import org.gluster.storage.management.console.NetworkInterfaceTableLabelProvider; +import org.gluster.storage.management.console.preferences.PreferenceConstants; +import org.gluster.storage.management.console.toolbar.GlusterToolbarManager; +import org.gluster.storage.management.console.utils.ChartUtil; +import org.gluster.storage.management.console.utils.ChartUtil.ChartPeriodLinkListener; +import org.gluster.storage.management.console.utils.GUIHelper; +import org.gluster.storage.management.console.utils.GlusterLogger; +import org.gluster.storage.management.core.model.ClusterListener; +import org.gluster.storage.management.core.model.DefaultClusterListener; +import org.gluster.storage.management.core.model.Event; +import org.gluster.storage.management.core.model.Event.EVENT_TYPE; +import org.gluster.storage.management.core.model.GlusterServer; +import org.gluster.storage.management.core.model.Server.SERVER_STATUS; +import org.gluster.storage.management.core.model.ServerStats; +import org.gluster.storage.management.core.utils.NumberUtil; -import com.gluster.storage.management.client.GlusterServersClient; -import com.gluster.storage.management.console.Activator; -import com.gluster.storage.management.console.ConsoleConstants; -import com.gluster.storage.management.console.GlusterDataModelManager; -import com.gluster.storage.management.console.IImageKeys; -import com.gluster.storage.management.console.NetworkInterfaceTableLabelProvider; -import com.gluster.storage.management.console.preferences.PreferenceConstants; -import com.gluster.storage.management.console.toolbar.GlusterToolbarManager; -import com.gluster.storage.management.console.utils.ChartUtil; -import com.gluster.storage.management.console.utils.ChartUtil.ChartPeriodLinkListener; -import com.gluster.storage.management.console.utils.ChartViewerComposite; -import com.gluster.storage.management.console.utils.GUIHelper; -import com.gluster.storage.management.console.utils.GlusterLogger; -import com.gluster.storage.management.core.model.ClusterListener; -import com.gluster.storage.management.core.model.DefaultClusterListener; -import com.gluster.storage.management.core.model.Event; -import com.gluster.storage.management.core.model.Event.EVENT_TYPE; -import com.gluster.storage.management.core.model.GlusterServer; -import com.gluster.storage.management.core.model.Server.SERVER_STATUS; -import com.gluster.storage.management.core.model.ServerStats; -import com.gluster.storage.management.core.model.ServerStatsRow; -import com.gluster.storage.management.core.utils.NumberUtil; -import com.ibm.icu.util.Calendar; import com.richclientgui.toolbox.gauges.CoolGauge; public class GlusterServerSummaryView extends ViewPart { @@ -85,8 +77,6 @@ public class GlusterServerSummaryView extends ViewPart { private ScrolledForm form; private GlusterServer server; private ClusterListener clusterListener; - private static final int CHART_WIDTH = 350; - private static final int CHART_HEIGHT = 250; private static final GlusterLogger logger = GlusterLogger.getInstance(); private static final IPreferenceStore preferenceStore = Activator.getDefault().getPreferenceStore(); @@ -111,7 +101,7 @@ public class GlusterServerSummaryView extends ViewPart { @Override public void createPartControl(Composite parent) { if (server == null) { - server = (GlusterServer) guiHelper.getSelectedEntity(getSite(), GlusterServer.class); + server = guiHelper.getSelectedEntity(getSite(), GlusterServer.class); } setPartName("Summary"); createSections(parent); @@ -207,49 +197,6 @@ public class GlusterServerSummaryView extends ViewPart { preferenceStore.removePropertyChangeListener(propertyChangeListener); } - private void createAreaChart(Composite section, Calendar timestamps[], Double values[], String unit) { - ChartViewerComposite chartViewerComposite = new ChartViewerComposite(section, SWT.NONE, timestamps, values, unit, "HH:mm", 100); - GridData data = new GridData(SWT.FILL, SWT.FILL, false, false); - data.widthHint = CHART_WIDTH; - data.heightHint = CHART_HEIGHT; - chartViewerComposite.setLayoutData(data); - } - - private void extractChartData(ServerStats stats, List<Calendar> timestamps, List<Double> data, int dataColumnIndex) { - for(ServerStatsRow row : stats.getRows()) { - Double cpuUsage = row.getUsageData().get(dataColumnIndex); - if(!cpuUsage.isNaN()) { - timestamps.add(new CDateTime(row.getTimestamp() * 1000)); - data.add(cpuUsage); - } - } - } - - private void createAreaChartSection(ServerStats stats, String sectionTitle, int dataColumnIndex, String unit) { - List<Calendar> timestamps = new ArrayList<Calendar>(); - List<Double> data = new ArrayList<Double>(); - extractChartData(stats, timestamps, data, dataColumnIndex); - - if(timestamps.size() == 0) { - // Log a message saying no CPU stats available - return; - } - - Composite section = guiHelper.createSection(form, toolkit, sectionTitle, null, 1, false); - createAreaChart(section, timestamps.toArray(new Calendar[0]), data.toArray(new Double[0]), unit); - -// Calendar[] timestamps = new Calendar[] { new CDateTime(1000l*1310468100), new CDateTime(1000l*1310468400), new CDateTime(1000l*1310468700), -// new CDateTime(1000l*1310469000), new CDateTime(1000l*1310469300), new CDateTime(1000l*1310469600), new CDateTime(1000l*1310469900), -// new CDateTime(1000l*1310470200), new CDateTime(1000l*1310470500), new CDateTime(1000l*1310470800), new CDateTime(1000l*1310471100), -// new CDateTime(1000l*1310471400), new CDateTime(1000l*1310471700), new CDateTime(1000l*1310472000), new CDateTime(1000l*1310472300), -// new CDateTime(1000l*1310472600), new CDateTime(1000l*1310472900), new CDateTime(1000l*1310473200), new CDateTime(1000l*1310473500), -// new CDateTime(1000l*1310473800) }; -// -// Double[] values = new Double[] { 10d, 11.23d, 17.92d, 18.69d, 78.62d, 89.11d, 92.43d, 89.31d, 57.39d, 18.46d, 10.44d, 16.28d, 13.51d, 17.53d, 12.21, 20d, 21.43d, 16.45d, 14.86d, 15.27d }; -// createLineChart(section, timestamps, values, "%"); - createChartLinks(section, 4); - } - private void createMemoryUsageSection() { String memStatsPeriod = preferenceStore.getString(PreferenceConstants.P_MEM_CHART_PERIOD); memoryUsageSection = guiHelper.createSection(form, toolkit, "Memory Usage", null, 1, false); @@ -311,25 +258,6 @@ public class GlusterServerSummaryView extends ViewPart { networkChartPeriodLinkListener , -1, 5); } - private Composite createChartLinks(Composite section, int columnCount) { - GridLayout layout = new org.eclipse.swt.layout.GridLayout(columnCount, false); - layout.marginBottom = 0; - layout.marginTop = 0; - layout.marginLeft = (CHART_WIDTH - (50*columnCount)) / 2; - Composite graphComposite = toolkit.createComposite(section, SWT.NONE); - graphComposite.setLayout(layout); - GridData data = new GridData(SWT.FILL, SWT.FILL, false, false); - data.widthHint = CHART_WIDTH; - graphComposite.setLayoutData(data); - - Label label1 = toolkit.createLabel(graphComposite, "1 day"); - Hyperlink link1 = toolkit.createHyperlink(graphComposite, "1 week", SWT.NONE); - Hyperlink link2 = toolkit.createHyperlink(graphComposite, "1 month", SWT.NONE); - Hyperlink link3 = toolkit.createHyperlink(graphComposite, "1 year", SWT.NONE); - - return graphComposite; - } - private void createSections(Composite parent) { String serverName = server.getName(); form = guiHelper.setupForm(parent, toolkit, "Server Summary [" + serverName + "]"); diff --git a/src/com.gluster.storage.management.console/src/com/gluster/storage/management/console/views/GlusterServersSummaryView.java b/src/org.gluster.storage.management.console/src/org/gluster/storage/management/console/views/GlusterServersSummaryView.java index b3879e4f..6d923a6b 100644 --- a/src/com.gluster.storage.management.console/src/com/gluster/storage/management/console/views/GlusterServersSummaryView.java +++ b/src/org.gluster.storage.management.console/src/org/gluster/storage/management/console/views/GlusterServersSummaryView.java @@ -1,24 +1,22 @@ -/** - * GlusterServersSummaryView.java - * - * Copyright (c) 2011 Gluster, Inc. <http://www.gluster.com> +/******************************************************************************* + * Copyright (c) 2006-2011 Gluster, Inc. <http://www.gluster.com> * This file is part of Gluster Management Console. * - * Gluster Management Console is free software; you can redistribute it and/or - * modify it under the terms of the GNU Affero General Public License as published - * by the Free Software Foundation; either version 3 of the License, or - * (at your option) any later version. + * Gluster Management Console is free software; you can redistribute + * it and/or modify it under the terms of the GNU General Public + * License as published by the Free Software Foundation; either + * version 3 of the License, or (at your option) any later version. * - * Gluster Management Console is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY - * or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Affero General Public License - * for more details. + * Gluster Management Console is distributed in the hope that it + * will be useful, but WITHOUT ANY WARRANTY; without even the + * implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR + * PURPOSE. See the GNU General Public License for more details. * - * You should have received a copy of the GNU Affero General Public License - * along with this program. If not, see + * You should have received a copy of the GNU General Public License + * along with this program. If not, see * <http://www.gnu.org/licenses/>. - */ -package com.gluster.storage.management.console.views; + *******************************************************************************/ +package org.gluster.storage.management.console.views; import java.util.List; @@ -31,23 +29,23 @@ import org.eclipse.swt.widgets.Display; import org.eclipse.ui.forms.widgets.FormToolkit; import org.eclipse.ui.forms.widgets.ScrolledForm; import org.eclipse.ui.part.ViewPart; +import org.gluster.storage.management.console.GlusterDataModelManager; +import org.gluster.storage.management.console.IImageKeys; +import org.gluster.storage.management.console.utils.ChartViewerComposite; +import org.gluster.storage.management.console.utils.GUIHelper; +import org.gluster.storage.management.core.constants.CoreConstants; +import org.gluster.storage.management.core.model.Alert; +import org.gluster.storage.management.core.model.ClusterListener; +import org.gluster.storage.management.core.model.DefaultClusterListener; +import org.gluster.storage.management.core.model.EntityGroup; +import org.gluster.storage.management.core.model.Event; +import org.gluster.storage.management.core.model.GlusterServer; +import org.gluster.storage.management.core.model.Status; +import org.gluster.storage.management.core.model.TaskInfo; +import org.gluster.storage.management.core.model.Alert.ALERT_TYPES; +import org.gluster.storage.management.core.model.Server.SERVER_STATUS; +import org.gluster.storage.management.core.model.TaskInfo.TASK_TYPE; -import com.gluster.storage.management.console.GlusterDataModelManager; -import com.gluster.storage.management.console.IImageKeys; -import com.gluster.storage.management.console.utils.ChartViewerComposite; -import com.gluster.storage.management.console.utils.GUIHelper; -import com.gluster.storage.management.core.constants.CoreConstants; -import com.gluster.storage.management.core.model.Alert; -import com.gluster.storage.management.core.model.Alert.ALERT_TYPES; -import com.gluster.storage.management.core.model.ClusterListener; -import com.gluster.storage.management.core.model.DefaultClusterListener; -import com.gluster.storage.management.core.model.EntityGroup; -import com.gluster.storage.management.core.model.Event; -import com.gluster.storage.management.core.model.GlusterServer; -import com.gluster.storage.management.core.model.Server.SERVER_STATUS; -import com.gluster.storage.management.core.model.Status; -import com.gluster.storage.management.core.model.TaskInfo; -import com.gluster.storage.management.core.model.TaskInfo.TASK_TYPE; /** * @@ -66,11 +64,10 @@ public class GlusterServersSummaryView extends ViewPart { /* (non-Javadoc) * @see org.eclipse.ui.part.WorkbenchPart#createPartControl(org.eclipse.swt.widgets.Composite) */ - @SuppressWarnings("unchecked") @Override public void createPartControl(Composite parent) { if (servers == null) { - servers = (EntityGroup<GlusterServer>)guiHelper.getSelectedEntity(getSite(), EntityGroup.class); + servers = guiHelper.getSelectedEntity(getSite(), EntityGroup.class); } setPartName("Summary"); createSections(parent); @@ -170,7 +167,7 @@ public class GlusterServersSummaryView extends ViewPart { private int getServerCountByStatus(EntityGroup<GlusterServer> servers, SERVER_STATUS status) { int count = 0; - for (GlusterServer server : (List<GlusterServer>)servers.getEntities()) { + for (GlusterServer server : servers.getEntities()) { if (server.getStatus() == status) { count++; } @@ -197,7 +194,9 @@ public class GlusterServersSummaryView extends ViewPart { List<Alert> alerts = GlusterDataModelManager.getInstance().getModel().getCluster().getAlerts(); for (Alert alert : alerts) { - if (alert.getType() != ALERT_TYPES.OFFLINE_VOLUME_BRICKS_ALERT) { + if (alert.getType() == ALERT_TYPES.DISK_USAGE_ALERT || alert.getType() != ALERT_TYPES.OFFLINE_SERVERS_ALERT + || alert.getType() == ALERT_TYPES.MEMORY_USAGE_ALERT + || alert.getType() == ALERT_TYPES.CPU_USAGE_ALERT) { addAlertLabel(alertsSection, alert); } } @@ -209,9 +208,6 @@ public class GlusterServersSummaryView extends ViewPart { CLabel lblAlert = new CLabel(section, SWT.FLAT); Image alertImage = null; switch (alert.getType()) { - case OFFLINE_VOLUME_BRICKS_ALERT: - alertImage = guiHelper.getImage(IImageKeys.BRICK_OFFLINE_22x22); - break; case DISK_USAGE_ALERT: alertImage = guiHelper.getImage(IImageKeys.LOW_DISK_SPACE_22x22); break; diff --git a/src/com.gluster.storage.management.console/src/com/gluster/storage/management/console/views/GlusterServersView.java b/src/org.gluster.storage.management.console/src/org/gluster/storage/management/console/views/GlusterServersView.java index 566befc3..0104ce9c 100644 --- a/src/com.gluster.storage.management.console/src/com/gluster/storage/management/console/views/GlusterServersView.java +++ b/src/org.gluster.storage.management.console/src/org/gluster/storage/management/console/views/GlusterServersView.java @@ -1,24 +1,22 @@ -/** - * GlusterServersView.java - * - * Copyright (c) 2011 Gluster, Inc. <http://www.gluster.com> +/******************************************************************************* + * Copyright (c) 2006-2011 Gluster, Inc. <http://www.gluster.com> * This file is part of Gluster Management Console. * - * Gluster Management Console is free software; you can redistribute it and/or - * modify it under the terms of the GNU Affero General Public License as published - * by the Free Software Foundation; either version 3 of the License, or - * (at your option) any later version. + * Gluster Management Console is free software; you can redistribute + * it and/or modify it under the terms of the GNU General Public + * License as published by the Free Software Foundation; either + * version 3 of the License, or (at your option) any later version. * - * Gluster Management Console is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY - * or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Affero General Public License - * for more details. + * Gluster Management Console is distributed in the hope that it + * will be useful, but WITHOUT ANY WARRANTY; without even the + * implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR + * PURPOSE. See the GNU General Public License for more details. * - * You should have received a copy of the GNU Affero General Public License - * along with this program. If not, see + * You should have received a copy of the GNU General Public License + * along with this program. If not, see * <http://www.gnu.org/licenses/>. - */ -package com.gluster.storage.management.console.views; + *******************************************************************************/ +package org.gluster.storage.management.console.views; import org.eclipse.jface.viewers.DoubleClickEvent; import org.eclipse.jface.viewers.IDoubleClickListener; @@ -26,12 +24,12 @@ import org.eclipse.jface.viewers.StructuredSelection; import org.eclipse.swt.SWT; import org.eclipse.swt.widgets.Composite; import org.eclipse.ui.part.ViewPart; +import org.gluster.storage.management.console.utils.GUIHelper; +import org.gluster.storage.management.console.views.pages.GlusterServersPage; +import org.gluster.storage.management.core.model.Entity; +import org.gluster.storage.management.core.model.EntityGroup; +import org.gluster.storage.management.core.model.GlusterServer; -import com.gluster.storage.management.console.utils.GUIHelper; -import com.gluster.storage.management.console.views.pages.GlusterServersPage; -import com.gluster.storage.management.core.model.Entity; -import com.gluster.storage.management.core.model.EntityGroup; -import com.gluster.storage.management.core.model.GlusterServer; /** * @author root @@ -46,11 +44,10 @@ public class GlusterServersView extends ViewPart implements IDoubleClickListener /* (non-Javadoc) * @see org.eclipse.ui.part.WorkbenchPart#createPartControl(org.eclipse.swt.widgets.Composite) */ - @SuppressWarnings("unchecked") @Override public void createPartControl(Composite parent) { if (servers == null) { - servers = (EntityGroup<GlusterServer>) guiHelper.getSelectedEntity(getSite(), EntityGroup.class); + servers = guiHelper.getSelectedEntity(getSite(), EntityGroup.class); } page = new GlusterServersPage(getSite(), parent, SWT.NONE, servers); diff --git a/src/com.gluster.storage.management.console/src/com/gluster/storage/management/console/views/GlusterViewsManager.java b/src/org.gluster.storage.management.console/src/org/gluster/storage/management/console/views/GlusterViewsManager.java index 05c30626..ba1ba8df 100644 --- a/src/com.gluster.storage.management.console/src/com/gluster/storage/management/console/views/GlusterViewsManager.java +++ b/src/org.gluster.storage.management.console/src/org/gluster/storage/management/console/views/GlusterViewsManager.java @@ -1,36 +1,34 @@ -/** - * GlusterViewsManager.java - * - * Copyright (c) 2011 Gluster, Inc. <http://www.gluster.com> +/******************************************************************************* + * Copyright (c) 2006-2011 Gluster, Inc. <http://www.gluster.com> * This file is part of Gluster Management Console. * - * Gluster Management Console is free software; you can redistribute it and/or - * modify it under the terms of the GNU Affero General Public License as published - * by the Free Software Foundation; either version 3 of the License, or - * (at your option) any later version. + * Gluster Management Console is free software; you can redistribute + * it and/or modify it under the terms of the GNU General Public + * License as published by the Free Software Foundation; either + * version 3 of the License, or (at your option) any later version. * - * Gluster Management Console is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY - * or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Affero General Public License - * for more details. + * Gluster Management Console is distributed in the hope that it + * will be useful, but WITHOUT ANY WARRANTY; without even the + * implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR + * PURPOSE. See the GNU General Public License for more details. * - * You should have received a copy of the GNU Affero General Public License - * along with this program. If not, see + * You should have received a copy of the GNU General Public License + * along with this program. If not, see * <http://www.gnu.org/licenses/>. - */ -package com.gluster.storage.management.console.views; + *******************************************************************************/ +package org.gluster.storage.management.console.views; import org.eclipse.ui.IViewReference; import org.eclipse.ui.IWorkbenchPage; import org.eclipse.ui.PartInitException; +import org.gluster.storage.management.console.ConsoleConstants; +import org.gluster.storage.management.core.model.Cluster; +import org.gluster.storage.management.core.model.Entity; +import org.gluster.storage.management.core.model.EntityGroup; +import org.gluster.storage.management.core.model.GlusterServer; +import org.gluster.storage.management.core.model.Server; +import org.gluster.storage.management.core.model.Volume; -import com.gluster.storage.management.console.ConsoleConstants; -import com.gluster.storage.management.core.model.Cluster; -import com.gluster.storage.management.core.model.Entity; -import com.gluster.storage.management.core.model.EntityGroup; -import com.gluster.storage.management.core.model.GlusterServer; -import com.gluster.storage.management.core.model.Server; -import com.gluster.storage.management.core.model.Volume; /** * @see ViewsManager @@ -43,7 +41,7 @@ public class GlusterViewsManager implements ViewsManager { } /* (non-Javadoc) - * @see com.gluster.storage.management.console.views.ViewsManager#updateViews(com.gluster.storage.management.core.model.Entity) + * @see org.gluster.storage.management.console.views.ViewsManager#updateViews(org.gluster.storage.management.core.model.Entity) */ @SuppressWarnings("rawtypes") @Override diff --git a/src/com.gluster.storage.management.console/src/com/gluster/storage/management/console/views/NavigationTreeLabelDecorator.java b/src/org.gluster.storage.management.console/src/org/gluster/storage/management/console/views/NavigationTreeLabelDecorator.java index d7448e76..2768b3f5 100644 --- a/src/com.gluster.storage.management.console/src/com/gluster/storage/management/console/views/NavigationTreeLabelDecorator.java +++ b/src/org.gluster.storage.management.console/src/org/gluster/storage/management/console/views/NavigationTreeLabelDecorator.java @@ -1,34 +1,34 @@ /******************************************************************************* - * Copyright (c) 2011 Gluster, Inc. <http://www.gluster.com> + * Copyright (c) 2006-2011 Gluster, Inc. <http://www.gluster.com> * This file is part of Gluster Management Console. * - * Gluster Management Console is free software; you can redistribute it and/or - * modify it under the terms of the GNU Affero General Public License as published - * by the Free Software Foundation; either version 3 of the License, or - * (at your option) any later version. - * - * Gluster Management Console is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY - * or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Affero General Public License - * for more details. - * - * You should have received a copy of the GNU Affero General Public License - * along with this program. If not, see + * Gluster Management Console is free software; you can redistribute + * it and/or modify it under the terms of the GNU General Public + * License as published by the Free Software Foundation; either + * version 3 of the License, or (at your option) any later version. + * + * Gluster Management Console is distributed in the hope that it + * will be useful, but WITHOUT ANY WARRANTY; without even the + * implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR + * PURPOSE. See the GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program. If not, see * <http://www.gnu.org/licenses/>. *******************************************************************************/ -package com.gluster.storage.management.console.views; +package org.gluster.storage.management.console.views; import org.eclipse.jface.viewers.IDecoration; import org.eclipse.jface.viewers.ILabelProviderListener; import org.eclipse.jface.viewers.ILightweightLabelDecorator; import org.eclipse.ui.plugin.AbstractUIPlugin; +import org.gluster.storage.management.console.Application; +import org.gluster.storage.management.console.IImageKeys; +import org.gluster.storage.management.core.model.EntityGroup; +import org.gluster.storage.management.core.model.GlusterServer; +import org.gluster.storage.management.core.model.Server; +import org.gluster.storage.management.core.model.Volume; -import com.gluster.storage.management.console.Application; -import com.gluster.storage.management.console.IImageKeys; -import com.gluster.storage.management.core.model.EntityGroup; -import com.gluster.storage.management.core.model.GlusterServer; -import com.gluster.storage.management.core.model.Server; -import com.gluster.storage.management.core.model.Volume; public class NavigationTreeLabelDecorator implements ILightweightLabelDecorator { diff --git a/src/com.gluster.storage.management.console/src/com/gluster/storage/management/console/views/NavigationView.java b/src/org.gluster.storage.management.console/src/org/gluster/storage/management/console/views/NavigationView.java index 9fd080e8..cbadfcfc 100644 --- a/src/com.gluster.storage.management.console/src/com/gluster/storage/management/console/views/NavigationView.java +++ b/src/org.gluster.storage.management.console/src/org/gluster/storage/management/console/views/NavigationView.java @@ -1,22 +1,22 @@ /******************************************************************************* - * Copyright (c) 2011 Gluster, Inc. <http://www.gluster.com> + * Copyright (c) 2006-2011 Gluster, Inc. <http://www.gluster.com> * This file is part of Gluster Management Console. * - * Gluster Management Console is free software; you can redistribute it and/or - * modify it under the terms of the GNU Affero General Public License as published - * by the Free Software Foundation; either version 3 of the License, or - * (at your option) any later version. - * - * Gluster Management Console is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY - * or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Affero General Public License - * for more details. - * - * You should have received a copy of the GNU Affero General Public License - * along with this program. If not, see + * Gluster Management Console is free software; you can redistribute + * it and/or modify it under the terms of the GNU General Public + * License as published by the Free Software Foundation; either + * version 3 of the License, or (at your option) any later version. + * + * Gluster Management Console is distributed in the hope that it + * will be useful, but WITHOUT ANY WARRANTY; without even the + * implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR + * PURPOSE. See the GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program. If not, see * <http://www.gnu.org/licenses/>. *******************************************************************************/ -package com.gluster.storage.management.console.views; +package org.gluster.storage.management.console.views; import org.eclipse.core.runtime.IAdapterFactory; import org.eclipse.core.runtime.Platform; @@ -33,15 +33,15 @@ import org.eclipse.ui.IWorkbenchPart; import org.eclipse.ui.model.BaseWorkbenchContentProvider; import org.eclipse.ui.model.WorkbenchLabelProvider; import org.eclipse.ui.part.ViewPart; +import org.gluster.storage.management.console.GlusterDataModelManager; +import org.gluster.storage.management.console.toolbar.GlusterToolbarManager; +import org.gluster.storage.management.core.model.DefaultClusterListener; +import org.gluster.storage.management.core.model.Entity; +import org.gluster.storage.management.core.model.Event; +import org.gluster.storage.management.core.model.GlusterDataModel; +import org.gluster.storage.management.core.model.GlusterServer; +import org.gluster.storage.management.core.model.Volume; -import com.gluster.storage.management.console.GlusterDataModelManager; -import com.gluster.storage.management.console.toolbar.GlusterToolbarManager; -import com.gluster.storage.management.core.model.DefaultClusterListener; -import com.gluster.storage.management.core.model.Entity; -import com.gluster.storage.management.core.model.Event; -import com.gluster.storage.management.core.model.GlusterDataModel; -import com.gluster.storage.management.core.model.GlusterServer; -import com.gluster.storage.management.core.model.Volume; public class NavigationView extends ViewPart implements ISelectionListener { public static final String ID = NavigationView.class.getName(); @@ -83,12 +83,13 @@ public class NavigationView extends ViewPart implements ISelectionListener { clusterListener = new DefaultClusterListener() { public void modelChanged() { - treeViewer.refresh(); + treeViewer.refresh(true); } @Override public void volumeChanged(Volume volume, Event event) { super.volumeChanged(volume, event); + treeViewer.update(volume, null); if (volume == entity) { // this makes sure that the toolbar buttons get updated according to new status selectEntity(volume); diff --git a/src/org.gluster.storage.management.console/src/org/gluster/storage/management/console/views/TasksView.java b/src/org.gluster.storage.management.console/src/org/gluster/storage/management/console/views/TasksView.java new file mode 100644 index 00000000..fd98c48b --- /dev/null +++ b/src/org.gluster.storage.management.console/src/org/gluster/storage/management/console/views/TasksView.java @@ -0,0 +1,57 @@ +/******************************************************************************* + * Copyright (c) 2006-2011 Gluster, Inc. <http://www.gluster.com> + * This file is part of Gluster Management Console. + * + * Gluster Management Console is free software; you can redistribute + * it and/or modify it under the terms of the GNU General Public + * License as published by the Free Software Foundation; either + * version 3 of the License, or (at your option) any later version. + * + * Gluster Management Console is distributed in the hope that it + * will be useful, but WITHOUT ANY WARRANTY; without even the + * implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR + * PURPOSE. See the GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program. If not, see + * <http://www.gnu.org/licenses/>. + *******************************************************************************/ +package org.gluster.storage.management.console.views; + +import java.util.List; + +import org.eclipse.swt.SWT; +import org.eclipse.swt.widgets.Composite; +import org.eclipse.ui.part.ViewPart; +import org.gluster.storage.management.console.GlusterDataModelManager; +import org.gluster.storage.management.console.views.pages.TasksPage; +import org.gluster.storage.management.core.model.TaskInfo; + + +public class TasksView extends ViewPart { + + public static final String ID = TasksView.class.getName(); + private TasksPage page; + + + public TasksView() { + // TODO Auto-generated constructor stub + } + + @Override + public void createPartControl(Composite parent) { + page = new TasksPage(getSite(), parent, SWT.NONE, getAllTasks()); + page.layout(); // IMP: lays out the form properly + } + + + private List<TaskInfo> getAllTasks() { + return GlusterDataModelManager.getInstance().getModel().getCluster().getTaskInfoList(); + } + + @Override + public void setFocus() { + page.setFocus(); + } + +} diff --git a/src/org.gluster.storage.management.console/src/org/gluster/storage/management/console/views/ViewsManager.java b/src/org.gluster.storage.management.console/src/org/gluster/storage/management/console/views/ViewsManager.java new file mode 100644 index 00000000..ebe58061 --- /dev/null +++ b/src/org.gluster.storage.management.console/src/org/gluster/storage/management/console/views/ViewsManager.java @@ -0,0 +1,36 @@ +/******************************************************************************* + * Copyright (c) 2006-2011 Gluster, Inc. <http://www.gluster.com> + * This file is part of Gluster Management Console. + * + * Gluster Management Console is free software; you can redistribute + * it and/or modify it under the terms of the GNU General Public + * License as published by the Free Software Foundation; either + * version 3 of the License, or (at your option) any later version. + * + * Gluster Management Console is distributed in the hope that it + * will be useful, but WITHOUT ANY WARRANTY; without even the + * implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR + * PURPOSE. See the GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program. If not, see + * <http://www.gnu.org/licenses/>. + *******************************************************************************/ +package org.gluster.storage.management.console.views; + +import org.gluster.storage.management.core.model.Entity; + +/** + * Whenever the current selection/action demands opening different set of views, the views manager is used to open + * appropriate views. + */ +public interface ViewsManager { + /** + * Updates the views for given entity. This typically means that user is working with the given entity, and hence + * the views related to that entity should be made visible, and other un-related views should be hidden. + * + * @param entity + * The entity for which views are to be updated + */ + public void updateViews(Entity entity); +}
\ No newline at end of file diff --git a/src/org.gluster.storage.management.console/src/org/gluster/storage/management/console/views/VolumeBricksView.java b/src/org.gluster.storage.management.console/src/org/gluster/storage/management/console/views/VolumeBricksView.java new file mode 100644 index 00000000..c5b0356b --- /dev/null +++ b/src/org.gluster.storage.management.console/src/org/gluster/storage/management/console/views/VolumeBricksView.java @@ -0,0 +1,57 @@ +/******************************************************************************* + * Copyright (c) 2006-2011 Gluster, Inc. <http://www.gluster.com> + * This file is part of Gluster Management Console. + * + * Gluster Management Console is free software; you can redistribute + * it and/or modify it under the terms of the GNU General Public + * License as published by the Free Software Foundation; either + * version 3 of the License, or (at your option) any later version. + * + * Gluster Management Console is distributed in the hope that it + * will be useful, but WITHOUT ANY WARRANTY; without even the + * implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR + * PURPOSE. See the GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program. If not, see + * <http://www.gnu.org/licenses/>. + *******************************************************************************/ +package org.gluster.storage.management.console.views; + +import org.eclipse.swt.SWT; +import org.eclipse.swt.widgets.Composite; +import org.eclipse.ui.part.ViewPart; +import org.gluster.storage.management.console.utils.GUIHelper; +import org.gluster.storage.management.console.views.pages.BricksPage; +import org.gluster.storage.management.core.model.Volume; + + +public class VolumeBricksView extends ViewPart { + public static final String ID = VolumeBricksView.class.getName(); + private static final GUIHelper guiHelper = GUIHelper.getInstance(); + private BricksPage page; + private Volume volume; + + @Override + public void createPartControl(Composite parent) { + if (volume == null) { + volume = guiHelper.getSelectedEntity(getSite(), Volume.class); + } + + createPage(parent); + } + + /** + * @param parent + */ + private void createPage(Composite parent) { + page = new BricksPage(parent, SWT.NONE, getSite(), volume.getBricks()); + parent.layout(); // IMP: lays out the form properly + } + + @Override + public void setFocus() { + page.setFocus(); + } +} + diff --git a/src/org.gluster.storage.management.console/src/org/gluster/storage/management/console/views/VolumeLogsView.java b/src/org.gluster.storage.management.console/src/org/gluster/storage/management/console/views/VolumeLogsView.java new file mode 100644 index 00000000..23c714e5 --- /dev/null +++ b/src/org.gluster.storage.management.console/src/org/gluster/storage/management/console/views/VolumeLogsView.java @@ -0,0 +1,75 @@ +/******************************************************************************* + * Copyright (c) 2006-2011 Gluster, Inc. <http://www.gluster.com> + * This file is part of Gluster Management Console. + * + * Gluster Management Console is free software; you can redistribute + * it and/or modify it under the terms of the GNU General Public + * License as published by the Free Software Foundation; either + * version 3 of the License, or (at your option) any later version. + * + * Gluster Management Console is distributed in the hope that it + * will be useful, but WITHOUT ANY WARRANTY; without even the + * implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR + * PURPOSE. See the GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program. If not, see + * <http://www.gnu.org/licenses/>. + *******************************************************************************/ +package org.gluster.storage.management.console.views; + +import org.eclipse.jface.dialogs.MessageDialog; +import org.eclipse.jface.viewers.DoubleClickEvent; +import org.eclipse.jface.viewers.IDoubleClickListener; +import org.eclipse.jface.viewers.StructuredSelection; +import org.eclipse.swt.SWT; +import org.eclipse.swt.widgets.Composite; +import org.eclipse.ui.part.ViewPart; +import org.gluster.storage.management.console.utils.GUIHelper; +import org.gluster.storage.management.console.views.pages.VolumeLogsPage; +import org.gluster.storage.management.core.constants.CoreConstants; +import org.gluster.storage.management.core.model.Volume; +import org.gluster.storage.management.core.model.VolumeLogMessage; +import org.gluster.storage.management.core.utils.DateUtil; + + +public class VolumeLogsView extends ViewPart implements IDoubleClickListener { + VolumeLogsPage logsPage; + public static final String ID = VolumeLogsView.class.getName(); + private static final GUIHelper guiHelper = GUIHelper.getInstance(); + private Volume volume; + + @Override + public void createPartControl(Composite parent) { + if (volume == null) { + volume = guiHelper.getSelectedEntity(getSite(), Volume.class); + } + + createPage(parent); + } + + private void createPage(Composite parent) { + logsPage = new VolumeLogsPage(parent, SWT.NONE, volume); + logsPage.addDoubleClickListener(this); + + parent.layout(); // IMP: lays out the form properly + } + + @Override + public void setFocus() { + logsPage.setFocus(); + } + + @Override + public void doubleClick(DoubleClickEvent event) { + VolumeLogMessage volumeLogMessage = (VolumeLogMessage) ((StructuredSelection) event.getSelection()) + .getFirstElement(); + String message = DateUtil.formatDate(volumeLogMessage.getTimestamp()) + " " + + DateUtil.formatTime(volumeLogMessage.getTimestamp()) + " [" + volumeLogMessage.getSeverity() + "]" + + CoreConstants.NEWLINE + CoreConstants.NEWLINE + volumeLogMessage.getMessage(); + + new MessageDialog(getSite().getShell(), "Log message from " + volumeLogMessage.getBrick(), null, message, + MessageDialog.NONE, new String[] { "Close" }, 0).open(); + + } +}
\ No newline at end of file diff --git a/src/org.gluster.storage.management.console/src/org/gluster/storage/management/console/views/VolumeOptionsView.java b/src/org.gluster.storage.management.console/src/org/gluster/storage/management/console/views/VolumeOptionsView.java new file mode 100644 index 00000000..3abdf617 --- /dev/null +++ b/src/org.gluster.storage.management.console/src/org/gluster/storage/management/console/views/VolumeOptionsView.java @@ -0,0 +1,54 @@ +/******************************************************************************* + * Copyright (c) 2006-2011 Gluster, Inc. <http://www.gluster.com> + * This file is part of Gluster Management Console. + * + * Gluster Management Console is free software; you can redistribute + * it and/or modify it under the terms of the GNU General Public + * License as published by the Free Software Foundation; either + * version 3 of the License, or (at your option) any later version. + * + * Gluster Management Console is distributed in the hope that it + * will be useful, but WITHOUT ANY WARRANTY; without even the + * implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR + * PURPOSE. See the GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program. If not, see + * <http://www.gnu.org/licenses/>. + *******************************************************************************/ +package org.gluster.storage.management.console.views; + +import org.eclipse.swt.SWT; +import org.eclipse.swt.widgets.Composite; +import org.eclipse.ui.part.ViewPart; +import org.gluster.storage.management.console.utils.GUIHelper; +import org.gluster.storage.management.console.views.pages.VolumeOptionsPage; +import org.gluster.storage.management.core.model.Volume; + + +public class VolumeOptionsView extends ViewPart { + public static final String ID = VolumeOptionsView.class.getName(); + private static final GUIHelper guiHelper = GUIHelper.getInstance(); + private VolumeOptionsPage page; + private Volume volume; + + @Override + public void createPartControl(Composite parent) { + if (volume == null) { + volume = guiHelper.getSelectedEntity(getSite(), Volume.class); + } + + createPage(parent); + } + + private void createPage(Composite parent) { + page = new VolumeOptionsPage(parent, SWT.NONE, volume); + parent.layout(); // IMP: lays out the form properly + } + + @Override + public void setFocus() { + page.setFocus(); + } +} + diff --git a/src/com.gluster.storage.management.console/src/com/gluster/storage/management/console/views/VolumeSummaryView.java b/src/org.gluster.storage.management.console/src/org/gluster/storage/management/console/views/VolumeSummaryView.java index dafc6c80..151a44e8 100644 --- a/src/com.gluster.storage.management.console/src/com/gluster/storage/management/console/views/VolumeSummaryView.java +++ b/src/org.gluster.storage.management.console/src/org/gluster/storage/management/console/views/VolumeSummaryView.java @@ -1,4 +1,22 @@ -package com.gluster.storage.management.console.views; +/******************************************************************************* + * Copyright (c) 2006-2011 Gluster, Inc. <http://www.gluster.com> + * This file is part of Gluster Management Console. + * + * Gluster Management Console is free software; you can redistribute + * it and/or modify it under the terms of the GNU General Public + * License as published by the Free Software Foundation; either + * version 3 of the License, or (at your option) any later version. + * + * Gluster Management Console is distributed in the hope that it + * will be useful, but WITHOUT ANY WARRANTY; without even the + * implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR + * PURPOSE. See the GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program. If not, see + * <http://www.gnu.org/licenses/>. + *******************************************************************************/ +package org.gluster.storage.management.console.views; import java.net.MalformedURLException; import java.net.URL; @@ -33,28 +51,29 @@ import org.eclipse.ui.forms.widgets.FormToolkit; import org.eclipse.ui.forms.widgets.Hyperlink; import org.eclipse.ui.forms.widgets.ScrolledForm; import org.eclipse.ui.part.ViewPart; +import org.gluster.storage.management.client.VolumesClient; +import org.gluster.storage.management.console.GlusterDataModelManager; +import org.gluster.storage.management.console.IImageKeys; +import org.gluster.storage.management.console.toolbar.GlusterToolbarManager; +import org.gluster.storage.management.console.utils.GUIHelper; +import org.gluster.storage.management.core.constants.CoreConstants; +import org.gluster.storage.management.core.constants.GlusterConstants; +import org.gluster.storage.management.core.model.Alert; +import org.gluster.storage.management.core.model.Brick; +import org.gluster.storage.management.core.model.Cluster; +import org.gluster.storage.management.core.model.DefaultClusterListener; +import org.gluster.storage.management.core.model.Device; +import org.gluster.storage.management.core.model.Disk; +import org.gluster.storage.management.core.model.Event; +import org.gluster.storage.management.core.model.GlusterServer; +import org.gluster.storage.management.core.model.Partition; +import org.gluster.storage.management.core.model.Volume; +import org.gluster.storage.management.core.model.Server.SERVER_STATUS; +import org.gluster.storage.management.core.model.Volume.VOLUME_TYPE; +import org.gluster.storage.management.core.utils.NumberUtil; +import org.gluster.storage.management.core.utils.StringUtil; +import org.gluster.storage.management.core.utils.ValidationUtil; -import com.gluster.storage.management.client.VolumesClient; -import com.gluster.storage.management.console.GlusterDataModelManager; -import com.gluster.storage.management.console.IImageKeys; -import com.gluster.storage.management.console.toolbar.GlusterToolbarManager; -import com.gluster.storage.management.console.utils.GUIHelper; -import com.gluster.storage.management.core.constants.GlusterConstants; -import com.gluster.storage.management.core.model.Alert; -import com.gluster.storage.management.core.model.Brick; -import com.gluster.storage.management.core.model.Cluster; -import com.gluster.storage.management.core.model.DefaultClusterListener; -import com.gluster.storage.management.core.model.Device; -import com.gluster.storage.management.core.model.Disk; -import com.gluster.storage.management.core.model.Event; -import com.gluster.storage.management.core.model.GlusterServer; -import com.gluster.storage.management.core.model.Partition; -import com.gluster.storage.management.core.model.Server.SERVER_STATUS; -import com.gluster.storage.management.core.model.Volume; -import com.gluster.storage.management.core.model.Volume.VOLUME_TYPE; -import com.gluster.storage.management.core.utils.NumberUtil; -import com.gluster.storage.management.core.utils.StringUtil; -import com.gluster.storage.management.core.utils.ValidationUtil; public class VolumeSummaryView extends ViewPart { public static final String ID = VolumeSummaryView.class.getName(); @@ -92,7 +111,7 @@ public class VolumeSummaryView extends ViewPart { @Override public void createPartControl(Composite parent) { if (volume == null) { - volume = (Volume) guiHelper.getSelectedEntity(getSite(), Volume.class); + volume = guiHelper.getSelectedEntity(getSite(), Volume.class); } this.parent = parent; @@ -420,15 +439,29 @@ public class VolumeSummaryView extends ViewPart { public void run() { VolumesClient vc = new VolumesClient(); Volume newVolume = new Volume(); + Integer userAction = 1; String cifsUsers = cifsUsersText.getText().trim(); + List<String> servers = GlusterDataModelManager.getInstance().getOfflineServers(); + // One or more servers are offline, Show warning if cifs is enabled + if (servers != null && servers.size() > 0) { + userAction = new MessageDialog(parent.getShell(), "CIFS configuration", GUIHelper + .getInstance().getImage(IImageKeys.VOLUME_16x16), + "Performing CIFS updates when one or more servers are offline can trigger " + + "inconsistent behavior for CIFS accesses in the cluster." + + CoreConstants.NEWLINE + CoreConstants.NEWLINE + + "Are you sure you want to continue?", MessageDialog.QUESTION, new String[] { + "No", "Yes" }, -1).open(); + } + // If no cifs users and removing cifs config, nothing to do - if (!(!cifsCheckbox.getSelection() && volume.getCifsUsers().toString() == "[]" && (cifsUsers - .isEmpty() || cifsUsers.equals("")))) { + if (!(!cifsCheckbox.getSelection() && volume.getCifsUsers().toString().equals("[]") && (cifsUsers + .isEmpty() || cifsUsers.equals(""))) && userAction == 1) { try { vc.setCifsConfig(volume.getName(), cifsCheckbox.getSelection(), cifsUsers); enableCifsUsersControls(false); newVolume = vc.getVolume(volume.getName()); modelManager.volumeChanged(volume, newVolume); + showCifsUsersControls(volume.isCifsEnable()); } catch (Exception e) { MessageDialog.openError(Display.getDefault().getActiveShell(), "Cifs Configuration", e.getMessage()); @@ -436,6 +469,10 @@ public class VolumeSummaryView extends ViewPart { enableCifsUsersControls(cifsCheckbox.getSelection()); populateCifsUsersText(); } + } else { + newVolume = vc.getVolume(volume.getName()); + modelManager.volumeChanged(volume, newVolume); + showCifsUsersControls(volume.isCifsEnable()); } } }); @@ -761,12 +798,6 @@ public class VolumeSummaryView extends ViewPart { lblStatusValue.redraw(); } - private void createTransportTypeField(Composite section) { - toolkit.createLabel(section, "Transport Type: ", SWT.NONE); - toolkit.createLabel(section, "" + volume.getTransportTypeStr(), SWT.NONE); - toolkit.createLabel(section, "", SWT.NONE); // dummy - } - private void createNumOfBricksField(Composite section) { toolkit.createLabel(section, "Number of Bricks: ", SWT.NONE); numberOfBricks = toolkit.createLabel(section, "" + volume.getNumOfBricks(), SWT.NONE); @@ -831,11 +862,7 @@ public class VolumeSummaryView extends ViewPart { private boolean isvalidCifsUser() { if (cifsCheckbox.getSelection()) { String cifsUserList = cifsUsersText.getText().trim(); - if (cifsUserList.length() == 0) { - return false; - } else { - return true; - } + return (cifsUserList.length() != 0); } validateCifsUsers(); return true; diff --git a/src/com.gluster.storage.management.console/src/com/gluster/storage/management/console/views/VolumeView.java b/src/org.gluster.storage.management.console/src/org/gluster/storage/management/console/views/VolumeView.java index 0c9ef92b..da5fc461 100644 --- a/src/com.gluster.storage.management.console/src/com/gluster/storage/management/console/views/VolumeView.java +++ b/src/org.gluster.storage.management.console/src/org/gluster/storage/management/console/views/VolumeView.java @@ -1,24 +1,22 @@ -/** - * DiscoveredServerView.java - * - * Copyright (c) 2011 Gluster, Inc. <http://www.gluster.com> +/******************************************************************************* + * Copyright (c) 2006-2011 Gluster, Inc. <http://www.gluster.com> * This file is part of Gluster Management Console. * - * Gluster Management Console is free software; you can redistribute it and/or - * modify it under the terms of the GNU Affero General Public License as published - * by the Free Software Foundation; either version 3 of the License, or - * (at your option) any later version. + * Gluster Management Console is free software; you can redistribute + * it and/or modify it under the terms of the GNU General Public + * License as published by the Free Software Foundation; either + * version 3 of the License, or (at your option) any later version. * - * Gluster Management Console is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY - * or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Affero General Public License - * for more details. + * Gluster Management Console is distributed in the hope that it + * will be useful, but WITHOUT ANY WARRANTY; without even the + * implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR + * PURPOSE. See the GNU General Public License for more details. * - * You should have received a copy of the GNU Affero General Public License - * along with this program. If not, see + * You should have received a copy of the GNU General Public License + * along with this program. If not, see * <http://www.gnu.org/licenses/>. - */ -package com.gluster.storage.management.console.views; + *******************************************************************************/ +package org.gluster.storage.management.console.views; import org.eclipse.swt.SWT; import org.eclipse.swt.widgets.Composite; @@ -26,10 +24,10 @@ import org.eclipse.swt.widgets.Display; import org.eclipse.ui.forms.widgets.FormToolkit; import org.eclipse.ui.forms.widgets.ScrolledForm; import org.eclipse.ui.part.ViewPart; +import org.gluster.storage.management.console.utils.GUIHelper; +import org.gluster.storage.management.core.model.Server; +import org.gluster.storage.management.core.utils.NumberUtil; -import com.gluster.storage.management.console.utils.GUIHelper; -import com.gluster.storage.management.core.model.Server; -import com.gluster.storage.management.core.utils.NumberUtil; /** * @author root @@ -50,7 +48,7 @@ public class VolumeView extends ViewPart { @Override public void createPartControl(Composite parent) { if (server == null) { - server = (Server) guiHelper.getSelectedEntity(getSite(), Server.class); + server = guiHelper.getSelectedEntity(getSite(), Server.class); } createSections(parent, server, toolkit); } diff --git a/src/com.gluster.storage.management.console/src/com/gluster/storage/management/console/views/VolumesSummaryView.java b/src/org.gluster.storage.management.console/src/org/gluster/storage/management/console/views/VolumesSummaryView.java index 79ebd84c..9581600b 100644 --- a/src/com.gluster.storage.management.console/src/com/gluster/storage/management/console/views/VolumesSummaryView.java +++ b/src/org.gluster.storage.management.console/src/org/gluster/storage/management/console/views/VolumesSummaryView.java @@ -1,52 +1,49 @@ -/** - * VolumesSummaryView.java - * - * Copyright (c) 2011 Gluster, Inc. <http://www.gluster.com> +/******************************************************************************* + * Copyright (c) 2006-2011 Gluster, Inc. <http://www.gluster.com> * This file is part of Gluster Management Console. * - * Gluster Management Console is free software; you can redistribute it and/or - * modify it under the terms of the GNU Affero General Public License as published - * by the Free Software Foundation; either version 3 of the License, or - * (at your option) any later version. + * Gluster Management Console is free software; you can redistribute + * it and/or modify it under the terms of the GNU General Public + * License as published by the Free Software Foundation; either + * version 3 of the License, or (at your option) any later version. * - * Gluster Management Console is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY - * or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Affero General Public License - * for more details. + * Gluster Management Console is distributed in the hope that it + * will be useful, but WITHOUT ANY WARRANTY; without even the + * implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR + * PURPOSE. See the GNU General Public License for more details. * - * You should have received a copy of the GNU Affero General Public License - * along with this program. If not, see + * You should have received a copy of the GNU General Public License + * along with this program. If not, see * <http://www.gnu.org/licenses/>. - */ -package com.gluster.storage.management.console.views; - -import java.util.List; + *******************************************************************************/ +package org.gluster.storage.management.console.views; import org.eclipse.swt.SWT; import org.eclipse.swt.custom.CLabel; +import org.eclipse.swt.graphics.Image; import org.eclipse.swt.layout.GridData; import org.eclipse.swt.widgets.Composite; import org.eclipse.swt.widgets.Display; import org.eclipse.ui.forms.widgets.FormToolkit; import org.eclipse.ui.forms.widgets.ScrolledForm; import org.eclipse.ui.part.ViewPart; +import org.gluster.storage.management.console.GlusterDataModelManager; +import org.gluster.storage.management.console.IImageKeys; +import org.gluster.storage.management.console.utils.ChartViewerComposite; +import org.gluster.storage.management.console.utils.GUIHelper; +import org.gluster.storage.management.core.constants.CoreConstants; +import org.gluster.storage.management.core.model.Alert; +import org.gluster.storage.management.core.model.Cluster; +import org.gluster.storage.management.core.model.ClusterListener; +import org.gluster.storage.management.core.model.DefaultClusterListener; +import org.gluster.storage.management.core.model.EntityGroup; +import org.gluster.storage.management.core.model.Event; +import org.gluster.storage.management.core.model.Status; +import org.gluster.storage.management.core.model.TaskInfo; +import org.gluster.storage.management.core.model.Volume; +import org.gluster.storage.management.core.model.TaskInfo.TASK_TYPE; +import org.gluster.storage.management.core.model.Volume.VOLUME_STATUS; -import com.gluster.storage.management.console.GlusterDataModelManager; -import com.gluster.storage.management.console.IImageKeys; -import com.gluster.storage.management.console.utils.ChartViewerComposite; -import com.gluster.storage.management.console.utils.GUIHelper; -import com.gluster.storage.management.core.constants.CoreConstants; -import com.gluster.storage.management.core.model.Alert; -import com.gluster.storage.management.core.model.Cluster; -import com.gluster.storage.management.core.model.ClusterListener; -import com.gluster.storage.management.core.model.DefaultClusterListener; -import com.gluster.storage.management.core.model.EntityGroup; -import com.gluster.storage.management.core.model.Event; -import com.gluster.storage.management.core.model.Status; -import com.gluster.storage.management.core.model.TaskInfo; -import com.gluster.storage.management.core.model.TaskInfo.TASK_TYPE; -import com.gluster.storage.management.core.model.Volume; -import com.gluster.storage.management.core.model.Volume.VOLUME_STATUS; /** * @@ -106,6 +103,11 @@ public class VolumesSummaryView extends ViewPart { updateSummarySection(); } + private void updateAlertSection() { + guiHelper.clearSection(alertsSection); + populateAlertSection(); + } + private void updateSummarySection() { guiHelper.clearSection(summarySection); populateSummarySection(); @@ -119,6 +121,18 @@ public class VolumesSummaryView extends ViewPart { guiHelper.clearSection(alertsSection); populateAlertSection(); } + + @Override + public void alertRemoved(Alert alert) { + super.alertRemoved(alert); + updateAlertSection(); + } + + @Override + public void alertCreated(Alert alert) { + super.alertCreated(alert); + updateAlertSection(); + } @Override public void taskAdded(TaskInfo taskInfo) { @@ -168,7 +182,8 @@ public class VolumesSummaryView extends ViewPart { private void populateAlertSection() { for (Alert alert : cluster.getAlerts()) { - if (alert.getType() == Alert.ALERT_TYPES.OFFLINE_VOLUME_BRICKS_ALERT) { + if (alert.getType() == Alert.ALERT_TYPES.OFFLINE_VOLUME_BRICKS_ALERT + || alert.getType() == Alert.ALERT_TYPES.OFFLINE_VOLUME_ALERT) { addAlertLabel(alertsSection, alert); } } @@ -178,8 +193,17 @@ public class VolumesSummaryView extends ViewPart { private void addAlertLabel(Composite section, Alert alert) { CLabel lblAlert = new CLabel(section, SWT.NONE); - lblAlert.setImage((alert.getType() == Alert.ALERT_TYPES.DISK_USAGE_ALERT) ? guiHelper - .getImage(IImageKeys.LOW_DISK_SPACE_22x22) : guiHelper.getImage(IImageKeys.BRICK_OFFLINE_22x22)); + + Image alertImage = null; + switch (alert.getType()) { + case OFFLINE_VOLUME_BRICKS_ALERT: + alertImage = guiHelper.getImage(IImageKeys.BRICK_OFFLINE_22x22); + break; + case OFFLINE_VOLUME_ALERT: + alertImage = guiHelper.getImage(IImageKeys.VOLUME_OFFLINE_22x22); + break; + } + lblAlert.setImage(alertImage); lblAlert.setText(alert.getMessage()); lblAlert.redraw(); } @@ -243,7 +267,7 @@ public class VolumesSummaryView extends ViewPart { private int getVolumeCountByStatus(EntityGroup<Volume> volumes, VOLUME_STATUS status) { int count = 0; - for (Volume volume : (List<Volume>) volumes.getEntities()) { + for (Volume volume : volumes.getEntities()) { if (volume.getStatus() == status) { count++; } diff --git a/src/com.gluster.storage.management.console/src/com/gluster/storage/management/console/views/VolumesView.java b/src/org.gluster.storage.management.console/src/org/gluster/storage/management/console/views/VolumesView.java index 4deeace2..d734e439 100644 --- a/src/com.gluster.storage.management.console/src/com/gluster/storage/management/console/views/VolumesView.java +++ b/src/org.gluster.storage.management.console/src/org/gluster/storage/management/console/views/VolumesView.java @@ -1,36 +1,34 @@ -/** - * DiscoveredServersView.java - * - * Copyright (c) 2011 Gluster, Inc. <http://www.gluster.com> +/******************************************************************************* + * Copyright (c) 2006-2011 Gluster, Inc. <http://www.gluster.com> * This file is part of Gluster Management Console. * - * Gluster Management Console is free software; you can redistribute it and/or - * modify it under the terms of the GNU Affero General Public License as published - * by the Free Software Foundation; either version 3 of the License, or - * (at your option) any later version. + * Gluster Management Console is free software; you can redistribute + * it and/or modify it under the terms of the GNU General Public + * License as published by the Free Software Foundation; either + * version 3 of the License, or (at your option) any later version. * - * Gluster Management Console is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY - * or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Affero General Public License - * for more details. + * Gluster Management Console is distributed in the hope that it + * will be useful, but WITHOUT ANY WARRANTY; without even the + * implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR + * PURPOSE. See the GNU General Public License for more details. * - * You should have received a copy of the GNU Affero General Public License - * along with this program. If not, see + * You should have received a copy of the GNU General Public License + * along with this program. If not, see * <http://www.gnu.org/licenses/>. - */ -package com.gluster.storage.management.console.views; + *******************************************************************************/ +package org.gluster.storage.management.console.views; import org.eclipse.jface.viewers.DoubleClickEvent; import org.eclipse.jface.viewers.IDoubleClickListener; import org.eclipse.jface.viewers.StructuredSelection; import org.eclipse.swt.widgets.Composite; import org.eclipse.ui.part.ViewPart; +import org.gluster.storage.management.console.utils.GUIHelper; +import org.gluster.storage.management.console.views.pages.VolumesPage; +import org.gluster.storage.management.core.model.Entity; +import org.gluster.storage.management.core.model.EntityGroup; +import org.gluster.storage.management.core.model.Volume; -import com.gluster.storage.management.console.utils.GUIHelper; -import com.gluster.storage.management.console.views.pages.VolumesPage; -import com.gluster.storage.management.core.model.Entity; -import com.gluster.storage.management.core.model.EntityGroup; -import com.gluster.storage.management.core.model.Volume; /** * diff --git a/src/com.gluster.storage.management.console/src/com/gluster/storage/management/console/views/pages/AbstractDisksPage.java b/src/org.gluster.storage.management.console/src/org/gluster/storage/management/console/views/pages/AbstractDisksPage.java index 58712e93..6f1fb744 100644 --- a/src/com.gluster.storage.management.console/src/com/gluster/storage/management/console/views/pages/AbstractDisksPage.java +++ b/src/org.gluster.storage.management.console/src/org/gluster/storage/management/console/views/pages/AbstractDisksPage.java @@ -1,24 +1,25 @@ /******************************************************************************* - * Copyright (c) 2011 Gluster, Inc. <http://www.gluster.com> + * Copyright (c) 2006-2011 Gluster, Inc. <http://www.gluster.com> * This file is part of Gluster Management Console. * - * Gluster Management Console is free software; you can redistribute it and/or - * modify it under the terms of the GNU Affero General Public License as published - * by the Free Software Foundation; either version 3 of the License, or - * (at your option) any later version. - * - * Gluster Management Console is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY - * or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Affero General Public License - * for more details. - * - * You should have received a copy of the GNU Affero General Public License - * along with this program. If not, see + * Gluster Management Console is free software; you can redistribute + * it and/or modify it under the terms of the GNU General Public + * License as published by the Free Software Foundation; either + * version 3 of the License, or (at your option) any later version. + * + * Gluster Management Console is distributed in the hope that it + * will be useful, but WITHOUT ANY WARRANTY; without even the + * implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR + * PURPOSE. See the GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program. If not, see * <http://www.gnu.org/licenses/>. *******************************************************************************/ -package com.gluster.storage.management.console.views.pages; +package org.gluster.storage.management.console.views.pages; import java.net.URI; +import java.util.ArrayList; import java.util.List; import org.eclipse.jface.dialogs.MessageDialog; @@ -38,28 +39,30 @@ import org.eclipse.ui.IWorkbenchSite; import org.eclipse.ui.forms.events.HyperlinkAdapter; import org.eclipse.ui.forms.events.HyperlinkEvent; import org.eclipse.ui.forms.widgets.ImageHyperlink; +import org.gluster.storage.management.client.GlusterServersClient; +import org.gluster.storage.management.client.TasksClient; +import org.gluster.storage.management.console.Application; +import org.gluster.storage.management.console.GlusterDataModelManager; +import org.gluster.storage.management.console.IEntityListener; +import org.gluster.storage.management.console.dialogs.InitDiskDialog; +import org.gluster.storage.management.console.utils.GlusterLogger; +import org.gluster.storage.management.core.exceptions.GlusterRuntimeException; +import org.gluster.storage.management.core.model.ClusterListener; +import org.gluster.storage.management.core.model.DefaultClusterListener; +import org.gluster.storage.management.core.model.Device; +import org.gluster.storage.management.core.model.Disk; +import org.gluster.storage.management.core.model.Entity; +import org.gluster.storage.management.core.model.Event; +import org.gluster.storage.management.core.model.GlusterServer; +import org.gluster.storage.management.core.model.Status; +import org.gluster.storage.management.core.model.TaskInfo; +import org.gluster.storage.management.core.model.Device.DEVICE_STATUS; +import org.gluster.storage.management.core.model.Event.EVENT_TYPE; -import com.gluster.storage.management.client.GlusterServersClient; -import com.gluster.storage.management.client.TasksClient; -import com.gluster.storage.management.console.Application; -import com.gluster.storage.management.console.GlusterDataModelManager; -import com.gluster.storage.management.console.IEntityListener; -import com.gluster.storage.management.console.dialogs.InitializeDiskTypeSelection; -import com.gluster.storage.management.core.model.ClusterListener; -import com.gluster.storage.management.core.model.DefaultClusterListener; -import com.gluster.storage.management.core.model.Device; -import com.gluster.storage.management.core.model.Device.DEVICE_STATUS; -import com.gluster.storage.management.core.model.Disk; -import com.gluster.storage.management.core.model.Entity; -import com.gluster.storage.management.core.model.Event; -import com.gluster.storage.management.core.model.Event.EVENT_TYPE; -import com.gluster.storage.management.core.model.GlusterDataModel; -import com.gluster.storage.management.core.model.GlusterServer; -import com.gluster.storage.management.core.model.Status; -import com.gluster.storage.management.core.model.TaskInfo; public abstract class AbstractDisksPage extends AbstractTableTreeViewerPage<Disk> implements IEntityListener { protected List<Disk> disks; + protected static final GlusterLogger logger = GlusterLogger.getInstance(); /** * @return Index of the "status" column in the table. Return -1 if status column is not displayed @@ -70,7 +73,7 @@ public abstract class AbstractDisksPage extends AbstractTableTreeViewerPage<Disk super(site, parent, style, false, true, disks); this.disks = disks; - // creates hyperlinks for "unitialized" disks + // creates hyperlinks for "uninitialized" disks setupStatusCellEditor(); // Listen for disk status change events Application.getApplication().addEntityListener(this); @@ -86,7 +89,8 @@ public abstract class AbstractDisksPage extends AbstractTableTreeViewerPage<Disk case DEVICES_REMOVED: case DEVICES_ADDED: case DEVICES_CHANGED: - treeViewer.refresh(); + case GLUSTER_SERVER_CHANGED: + treeViewer.refresh(true); default: break; } @@ -250,27 +254,36 @@ public abstract class AbstractDisksPage extends AbstractTableTreeViewerPage<Disk TaskInfo existingTaskInfo = modelManager.getTaskByReference(reference); if (existingTaskInfo != null && existingTaskInfo.getStatus().getCode() != Status.STATUS_CODE_SUCCESS && existingTaskInfo.getStatus().getCode() != Status.STATUS_CODE_FAILURE) { - MessageDialog.openInformation(getShell(), "Error: Initialize disk", "Initializing disk [" + reference + MessageDialog.openInformation(getShell(), "Initialize disk - Error", "Initializing disk [" + reference + "] is already in progress! Try later."); return; } - InitializeDiskTypeSelection formatDialog = new InitializeDiskTypeSelection(getShell()); + // To collect the available fsType + GlusterServersClient serversClient = new GlusterServersClient(); + List<String> fsTypes = new ArrayList<String>(); + try { + fsTypes = serversClient.getFSTypes(device.getServerName()); + } catch (GlusterRuntimeException e1) { + MessageDialog.openError(getShell(), "Initialize disk - Error", e1.getMessage()); + return; + } + + InitDiskDialog formatDialog = new InitDiskDialog(getShell(), device.getName(), fsTypes); int userAction = formatDialog.open(); if (userAction == Window.CANCEL) { - formatDialog.cancelPressed(); + // formatDialog.cancelPressed(); return; } - GlusterServersClient serversClient = new GlusterServersClient(); try { - URI uri = serversClient.initializeDisk(device.getServerName(), device.getName(), formatDialog.getFSType()); + URI uri = serversClient.initializeDisk(device.getServerName(), device.getName(), formatDialog.getFSType(), formatDialog.getMountPoint()); TasksClient taskClient = new TasksClient(); TaskInfo taskInfo = taskClient.getTaskInfo(uri); - if (taskInfo != null && taskInfo instanceof TaskInfo) { + if (taskInfo != null) { modelManager.addTask(taskInfo); } @@ -285,11 +298,12 @@ public abstract class AbstractDisksPage extends AbstractTableTreeViewerPage<Disk // GlusterDataModelManager.getInstance().updateDeviceStatus(device.getServerName(), device.getName(), // DEVICE_STATUS.INITIALIZED); } else { - MessageDialog.openError(getShell(), "Error: Initialize disk", taskInfo.getStatus().getMessage()); + MessageDialog.openError(getShell(), "Initialize disk - Error", taskInfo.getStatus().getMessage()); } guiHelper.showTaskView(); } catch (Exception e1) { - MessageDialog.openError(getShell(), "Error: Initialize disk", e1.getMessage()); + logger.error("Exception while initialize disk", e1); + MessageDialog.openError(getShell(), "Initialize disk - Error", e1.getMessage()); } } } diff --git a/src/com.gluster.storage.management.console/src/com/gluster/storage/management/console/views/pages/AbstractTableTreeViewerPage.java b/src/org.gluster.storage.management.console/src/org/gluster/storage/management/console/views/pages/AbstractTableTreeViewerPage.java index 7414bbc3..bc8cf9ac 100644 --- a/src/com.gluster.storage.management.console/src/com/gluster/storage/management/console/views/pages/AbstractTableTreeViewerPage.java +++ b/src/org.gluster.storage.management.console/src/org/gluster/storage/management/console/views/pages/AbstractTableTreeViewerPage.java @@ -1,22 +1,22 @@ /******************************************************************************* - * Copyright (c) 2011 Gluster, Inc. <http://www.gluster.com> + * Copyright (c) 2006-2011 Gluster, Inc. <http://www.gluster.com> * This file is part of Gluster Management Console. * - * Gluster Management Console is free software; you can redistribute it and/or - * modify it under the terms of the GNU Affero General Public License as published - * by the Free Software Foundation; either version 3 of the License, or - * (at your option) any later version. - * - * Gluster Management Console is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY - * or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Affero General Public License - * for more details. - * - * You should have received a copy of the GNU Affero General Public License - * along with this program. If not, see + * Gluster Management Console is free software; you can redistribute + * it and/or modify it under the terms of the GNU General Public + * License as published by the Free Software Foundation; either + * version 3 of the License, or (at your option) any later version. + * + * Gluster Management Console is distributed in the hope that it + * will be useful, but WITHOUT ANY WARRANTY; without even the + * implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR + * PURPOSE. See the GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program. If not, see * <http://www.gnu.org/licenses/>. *******************************************************************************/ -package com.gluster.storage.management.console.views.pages; +package org.gluster.storage.management.console.views.pages; import java.util.List; @@ -42,11 +42,11 @@ import org.eclipse.ui.ISelectionListener; import org.eclipse.ui.IWorkbenchPart; import org.eclipse.ui.IWorkbenchSite; import org.eclipse.ui.forms.widgets.FormToolkit; +import org.gluster.storage.management.console.GlusterDataModelManager; +import org.gluster.storage.management.console.utils.GUIHelper; +import org.gluster.storage.management.core.model.ClusterListener; +import org.gluster.storage.management.core.model.Disk; -import com.gluster.storage.management.console.GlusterDataModelManager; -import com.gluster.storage.management.console.utils.GUIHelper; -import com.gluster.storage.management.core.model.ClusterListener; -import com.gluster.storage.management.core.model.Disk; public abstract class AbstractTableTreeViewerPage<T> extends Composite implements ISelectionListener { diff --git a/src/com.gluster.storage.management.console/src/com/gluster/storage/management/console/views/pages/AbstractTableViewerPage.java b/src/org.gluster.storage.management.console/src/org/gluster/storage/management/console/views/pages/AbstractTableViewerPage.java index 91780403..258042b9 100644 --- a/src/com.gluster.storage.management.console/src/com/gluster/storage/management/console/views/pages/AbstractTableViewerPage.java +++ b/src/org.gluster.storage.management.console/src/org/gluster/storage/management/console/views/pages/AbstractTableViewerPage.java @@ -1,22 +1,22 @@ /******************************************************************************* - * Copyright (c) 2011 Gluster, Inc. <http://www.gluster.com> + * Copyright (c) 2006-2011 Gluster, Inc. <http://www.gluster.com> * This file is part of Gluster Management Console. * - * Gluster Management Console is free software; you can redistribute it and/or - * modify it under the terms of the GNU Affero General Public License as published - * by the Free Software Foundation; either version 3 of the License, or - * (at your option) any later version. - * - * Gluster Management Console is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY - * or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Affero General Public License - * for more details. - * - * You should have received a copy of the GNU Affero General Public License - * along with this program. If not, see + * Gluster Management Console is free software; you can redistribute + * it and/or modify it under the terms of the GNU General Public + * License as published by the Free Software Foundation; either + * version 3 of the License, or (at your option) any later version. + * + * Gluster Management Console is distributed in the hope that it + * will be useful, but WITHOUT ANY WARRANTY; without even the + * implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR + * PURPOSE. See the GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program. If not, see * <http://www.gnu.org/licenses/>. *******************************************************************************/ -package com.gluster.storage.management.console.views.pages; +package org.gluster.storage.management.console.views.pages; import java.util.List; @@ -28,17 +28,21 @@ import org.eclipse.jface.viewers.IDoubleClickListener; import org.eclipse.jface.viewers.ISelection; import org.eclipse.jface.viewers.StructuredSelection; import org.eclipse.jface.viewers.TableViewer; +import org.eclipse.jface.viewers.ViewerComparator; import org.eclipse.swt.SWT; import org.eclipse.swt.events.DisposeEvent; import org.eclipse.swt.events.DisposeListener; import org.eclipse.swt.events.PaintEvent; import org.eclipse.swt.events.PaintListener; +import org.eclipse.swt.events.SelectionAdapter; +import org.eclipse.swt.events.SelectionEvent; import org.eclipse.swt.layout.FillLayout; import org.eclipse.swt.layout.GridData; import org.eclipse.swt.layout.GridLayout; import org.eclipse.swt.widgets.Composite; import org.eclipse.swt.widgets.Display; import org.eclipse.swt.widgets.Table; +import org.eclipse.swt.widgets.TableColumn; import org.eclipse.swt.widgets.Text; import org.eclipse.ui.ISelectionListener; import org.eclipse.ui.IWorkbenchPart; @@ -46,10 +50,11 @@ import org.eclipse.ui.IWorkbenchSite; import org.eclipse.ui.forms.events.HyperlinkAdapter; import org.eclipse.ui.forms.widgets.FormToolkit; import org.eclipse.ui.forms.widgets.Hyperlink; +import org.gluster.storage.management.console.GlusterDataModelManager; +import org.gluster.storage.management.console.utils.GUIHelper; +import org.gluster.storage.management.console.utils.TableViewerComparator; +import org.gluster.storage.management.core.model.ClusterListener; -import com.gluster.storage.management.console.GlusterDataModelManager; -import com.gluster.storage.management.console.utils.GUIHelper; -import com.gluster.storage.management.core.model.ClusterListener; public abstract class AbstractTableViewerPage<T> extends Composite implements ISelectionListener { @@ -114,7 +119,7 @@ public abstract class AbstractTableViewerPage<T> extends Composite implements IS @Override public void linkActivated(org.eclipse.ui.forms.events.HyperlinkEvent e) { ((CheckboxTableViewer) tableViewer).setAllChecked(false); - tableViewer.setSelection(null); + tableViewer.setSelection(StructuredSelection.EMPTY); } }); } else { @@ -223,8 +228,32 @@ public abstract class AbstractTableViewerPage<T> extends Composite implements IS // Create a case insensitive filter for the table viewer using the filter text field guiHelper.createFilter(tableViewer, filterText, false); + + tableViewer.setComparator(createViewerComparator()); + for (int columnIndex = 0; columnIndex < tableViewer.getTable().getColumnCount(); columnIndex++) { + TableColumn column = tableViewer.getTable().getColumn(columnIndex); + column.addSelectionListener(getColumnSelectionAdapter(column, columnIndex)); + } + } + + private SelectionAdapter getColumnSelectionAdapter(final TableColumn column, final int columnIndex) { + return new SelectionAdapter() { + @Override + public void widgetSelected(SelectionEvent e) { + ViewerComparator viewerComparator = tableViewer.getComparator(); + if(viewerComparator instanceof TableViewerComparator) { + TableViewerComparator comparator = (TableViewerComparator)viewerComparator; + comparator.setColumn(columnIndex); + tableViewer.getTable().setSortDirection(comparator.getDirection()); + tableViewer.getTable().setSortColumn(column); + tableViewer.refresh(); + } + } + }; } + protected abstract ViewerComparator createViewerComparator(); + /* (non-Javadoc) * @see org.eclipse.ui.ISelectionListener#selectionChanged(org.eclipse.ui.IWorkbenchPart, org.eclipse.jface.viewers.ISelection) */ diff --git a/src/com.gluster.storage.management.console/src/com/gluster/storage/management/console/views/pages/BricksPage.java b/src/org.gluster.storage.management.console/src/org/gluster/storage/management/console/views/pages/BricksPage.java index 39e79beb..a07175a8 100644 --- a/src/com.gluster.storage.management.console/src/com/gluster/storage/management/console/views/pages/BricksPage.java +++ b/src/org.gluster.storage.management.console/src/org/gluster/storage/management/console/views/pages/BricksPage.java @@ -1,22 +1,22 @@ /******************************************************************************* - * Copyright (c) 2011 Gluster, Inc. <http://www.gluster.com> + * Copyright (c) 2006-2011 Gluster, Inc. <http://www.gluster.com> * This file is part of Gluster Management Console. * - * Gluster Management Console is free software; you can redistribute it and/or - * modify it under the terms of the GNU Affero General Public License as published - * by the Free Software Foundation; either version 3 of the License, or - * (at your option) any later version. - * - * Gluster Management Console is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY - * or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Affero General Public License - * for more details. - * - * You should have received a copy of the GNU Affero General Public License - * along with this program. If not, see + * Gluster Management Console is free software; you can redistribute + * it and/or modify it under the terms of the GNU General Public + * License as published by the Free Software Foundation; either + * version 3 of the License, or (at your option) any later version. + * + * Gluster Management Console is distributed in the hope that it + * will be useful, but WITHOUT ANY WARRANTY; without even the + * implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR + * PURPOSE. See the GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program. If not, see * <http://www.gnu.org/licenses/>. *******************************************************************************/ -package com.gluster.storage.management.console.views.pages; +package org.gluster.storage.management.console.views.pages; import java.util.Collection; import java.util.List; @@ -25,17 +25,18 @@ import java.util.Map; import org.eclipse.jface.viewers.ArrayContentProvider; import org.eclipse.jface.viewers.IContentProvider; import org.eclipse.jface.viewers.ITableLabelProvider; +import org.eclipse.jface.viewers.ViewerComparator; import org.eclipse.swt.SWT; import org.eclipse.swt.widgets.Composite; import org.eclipse.swt.widgets.Table; import org.eclipse.ui.IWorkbenchSite; +import org.gluster.storage.management.console.BrickTableLabelProvider; +import org.gluster.storage.management.core.model.Brick; +import org.gluster.storage.management.core.model.ClusterListener; +import org.gluster.storage.management.core.model.DefaultClusterListener; +import org.gluster.storage.management.core.model.Event; +import org.gluster.storage.management.core.model.Volume; -import com.gluster.storage.management.console.BrickTableLabelProvider; -import com.gluster.storage.management.core.model.Brick; -import com.gluster.storage.management.core.model.ClusterListener; -import com.gluster.storage.management.core.model.DefaultClusterListener; -import com.gluster.storage.management.core.model.Event; -import com.gluster.storage.management.core.model.Volume; public class BricksPage extends AbstractTableViewerPage<Brick> { private List<Brick> bricks; @@ -79,6 +80,7 @@ public class BricksPage extends AbstractTableViewerPage<Brick> { } tableViewer.update(updatedBricks, null); parent.update(); + tableViewer.refresh(true); default: break; } @@ -113,4 +115,9 @@ public class BricksPage extends AbstractTableViewerPage<Brick> { protected List<Brick> getAllEntities() { return bricks; } + + @Override + protected ViewerComparator createViewerComparator() { + return null; + } }
\ No newline at end of file diff --git a/src/com.gluster.storage.management.console/src/com/gluster/storage/management/console/views/pages/DiskTreeContentProvider.java b/src/org.gluster.storage.management.console/src/org/gluster/storage/management/console/views/pages/DiskTreeContentProvider.java index 4081d614..e28ac8a6 100644 --- a/src/com.gluster.storage.management.console/src/com/gluster/storage/management/console/views/pages/DiskTreeContentProvider.java +++ b/src/org.gluster.storage.management.console/src/org/gluster/storage/management/console/views/pages/DiskTreeContentProvider.java @@ -1,31 +1,31 @@ /******************************************************************************* - * Copyright (c) 2011 Gluster, Inc. <http://www.gluster.com> + * Copyright (c) 2006-2011 Gluster, Inc. <http://www.gluster.com> * This file is part of Gluster Management Console. * - * Gluster Management Console is free software; you can redistribute it and/or - * modify it under the terms of the GNU Affero General Public License as published - * by the Free Software Foundation; either version 3 of the License, or - * (at your option) any later version. - * - * Gluster Management Console is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY - * or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Affero General Public License - * for more details. - * - * You should have received a copy of the GNU Affero General Public License - * along with this program. If not, see + * Gluster Management Console is free software; you can redistribute + * it and/or modify it under the terms of the GNU General Public + * License as published by the Free Software Foundation; either + * version 3 of the License, or (at your option) any later version. + * + * Gluster Management Console is distributed in the hope that it + * will be useful, but WITHOUT ANY WARRANTY; without even the + * implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR + * PURPOSE. See the GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program. If not, see * <http://www.gnu.org/licenses/>. *******************************************************************************/ -package com.gluster.storage.management.console.views.pages; +package org.gluster.storage.management.console.views.pages; import java.util.ArrayList; import java.util.List; import org.eclipse.jface.viewers.ITreeContentProvider; import org.eclipse.jface.viewers.Viewer; +import org.gluster.storage.management.core.model.Disk; +import org.gluster.storage.management.core.model.Partition; -import com.gluster.storage.management.core.model.Disk; -import com.gluster.storage.management.core.model.Partition; public class DiskTreeContentProvider implements ITreeContentProvider { @@ -40,6 +40,7 @@ public class DiskTreeContentProvider implements ITreeContentProvider { * * @see org.eclipse.jface.viewers.IStructuredContentProvider#getElements(java.lang.Object) */ + @SuppressWarnings("unchecked") public Object[] getElements(Object inputElement) { return ((List<Disk>) inputElement).toArray(); } @@ -111,11 +112,7 @@ public class DiskTreeContentProvider implements ITreeContentProvider { * @see org.eclipse.jface.viewers.ITreeContentProvider#hasChildren(java.lang.Object) */ public boolean hasChildren(Object element) { - if(element instanceof Disk && ((Disk)element).getPartitions().size() > 0) { - return true; - } else { - return false; - } + return (element instanceof Disk && ((Disk)element).getPartitions().size() > 0); } diff --git a/src/com.gluster.storage.management.console/src/com/gluster/storage/management/console/views/pages/DisksPage.java b/src/org.gluster.storage.management.console/src/org/gluster/storage/management/console/views/pages/DisksPage.java index 8501bef3..91f3be12 100644 --- a/src/com.gluster.storage.management.console/src/com/gluster/storage/management/console/views/pages/DisksPage.java +++ b/src/org.gluster.storage.management.console/src/org/gluster/storage/management/console/views/pages/DisksPage.java @@ -1,32 +1,32 @@ /******************************************************************************* - * Copyright (c) 2011 Gluster, Inc. <http://www.gluster.com> + * Copyright (c) 2006-2011 Gluster, Inc. <http://www.gluster.com> * This file is part of Gluster Management Console. * - * Gluster Management Console is free software; you can redistribute it and/or - * modify it under the terms of the GNU Affero General Public License as published - * by the Free Software Foundation; either version 3 of the License, or - * (at your option) any later version. - * - * Gluster Management Console is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY - * or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Affero General Public License - * for more details. - * - * You should have received a copy of the GNU Affero General Public License - * along with this program. If not, see + * Gluster Management Console is free software; you can redistribute + * it and/or modify it under the terms of the GNU General Public + * License as published by the Free Software Foundation; either + * version 3 of the License, or (at your option) any later version. + * + * Gluster Management Console is distributed in the hope that it + * will be useful, but WITHOUT ANY WARRANTY; without even the + * implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR + * PURPOSE. See the GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program. If not, see * <http://www.gnu.org/licenses/>. *******************************************************************************/ -package com.gluster.storage.management.console.views.pages; +package org.gluster.storage.management.console.views.pages; import java.util.List; import org.eclipse.jface.viewers.IContentProvider; import org.eclipse.swt.widgets.Composite; import org.eclipse.ui.IWorkbenchSite; +import org.gluster.storage.management.console.DeviceTableLabelProvider; +import org.gluster.storage.management.core.model.Disk; +import org.gluster.storage.management.core.model.Entity; -import com.gluster.storage.management.console.DeviceTableLabelProvider; -import com.gluster.storage.management.core.model.Disk; -import com.gluster.storage.management.core.model.Entity; public class DisksPage extends AbstractDisksPage { @@ -34,17 +34,10 @@ public class DisksPage extends AbstractDisksPage { DISK, PARTITION, FREE_SPACE, TOTAL_SPACE, STATUS }; - private static final String[] DISK_TABLE_COLUMN_NAMES = new String[] { "Disk", "Partition", "Free Space (GB)", - "Total Space (GB)", "Status" }; - public DisksPage(final Composite parent, int style, IWorkbenchSite site, List<Disk> disks) { super(parent, style, site, disks); } - private String getDiskTableColumnDesc(DISK_TABLE_COLUMN_INDICES idx) { - return DISK_TABLE_COLUMN_NAMES[idx.ordinal()]; - } - @Override protected DeviceTableLabelProvider getLabelProvider() { return new DeviceTableLabelProvider(); diff --git a/src/com.gluster.storage.management.console/src/com/gluster/storage/management/console/views/pages/GlusterServersPage.java b/src/org.gluster.storage.management.console/src/org/gluster/storage/management/console/views/pages/GlusterServersPage.java index 8be17b24..b82e59bb 100644 --- a/src/com.gluster.storage.management.console/src/com/gluster/storage/management/console/views/pages/GlusterServersPage.java +++ b/src/org.gluster.storage.management.console/src/org/gluster/storage/management/console/views/pages/GlusterServersPage.java @@ -1,22 +1,22 @@ /******************************************************************************* - * Copyright (c) 2011 Gluster, Inc. <http://www.gluster.com> + * Copyright (c) 2006-2011 Gluster, Inc. <http://www.gluster.com> * This file is part of Gluster Management Console. * - * Gluster Management Console is free software; you can redistribute it and/or - * modify it under the terms of the GNU Affero General Public License as published - * by the Free Software Foundation; either version 3 of the License, or - * (at your option) any later version. - * - * Gluster Management Console is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY - * or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Affero General Public License - * for more details. - * - * You should have received a copy of the GNU Affero General Public License - * along with this program. If not, see + * Gluster Management Console is free software; you can redistribute + * it and/or modify it under the terms of the GNU General Public + * License as published by the Free Software Foundation; either + * version 3 of the License, or (at your option) any later version. + * + * Gluster Management Console is distributed in the hope that it + * will be useful, but WITHOUT ANY WARRANTY; without even the + * implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR + * PURPOSE. See the GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program. If not, see * <http://www.gnu.org/licenses/>. *******************************************************************************/ -package com.gluster.storage.management.console.views.pages; +package org.gluster.storage.management.console.views.pages; import java.util.List; @@ -24,20 +24,22 @@ import org.eclipse.jface.layout.TableColumnLayout; import org.eclipse.jface.viewers.ColumnWeightData; import org.eclipse.jface.viewers.IBaseLabelProvider; import org.eclipse.jface.viewers.IContentProvider; +import org.eclipse.jface.viewers.ViewerComparator; import org.eclipse.swt.SWT; import org.eclipse.swt.widgets.Composite; import org.eclipse.swt.widgets.Table; import org.eclipse.swt.widgets.TableColumn; import org.eclipse.ui.IWorkbenchSite; +import org.gluster.storage.management.console.EntityGroupContentProvider; +import org.gluster.storage.management.console.GlusterServerTableLabelProvider; +import org.gluster.storage.management.console.utils.TableViewerComparator; +import org.gluster.storage.management.core.constants.CoreConstants; +import org.gluster.storage.management.core.model.ClusterListener; +import org.gluster.storage.management.core.model.DefaultClusterListener; +import org.gluster.storage.management.core.model.EntityGroup; +import org.gluster.storage.management.core.model.Event; +import org.gluster.storage.management.core.model.GlusterServer; -import com.gluster.storage.management.console.EntityGroupContentProvider; -import com.gluster.storage.management.console.GlusterServerTableLabelProvider; -import com.gluster.storage.management.core.constants.CoreConstants; -import com.gluster.storage.management.core.model.ClusterListener; -import com.gluster.storage.management.core.model.DefaultClusterListener; -import com.gluster.storage.management.core.model.EntityGroup; -import com.gluster.storage.management.core.model.Event; -import com.gluster.storage.management.core.model.GlusterServer; public class GlusterServersPage extends AbstractTableViewerPage<GlusterServer> { private List<GlusterServer> glusterServers; @@ -54,6 +56,11 @@ public class GlusterServersPage extends AbstractTableViewerPage<GlusterServer> { super(site, parent, style, true, true, servers); this.glusterServers = servers.getEntities(); } + + @Override + protected ViewerComparator createViewerComparator() { + return new TableViewerComparator(); + } @Override protected ClusterListener createClusterListener() { diff --git a/src/com.gluster.storage.management.console/src/com/gluster/storage/management/console/views/pages/OptionKeyEditingSupport.java b/src/org.gluster.storage.management.console/src/org/gluster/storage/management/console/views/pages/OptionKeyEditingSupport.java index ed6aea64..013956cd 100644 --- a/src/com.gluster.storage.management.console/src/com/gluster/storage/management/console/views/pages/OptionKeyEditingSupport.java +++ b/src/org.gluster.storage.management.console/src/org/gluster/storage/management/console/views/pages/OptionKeyEditingSupport.java @@ -1,7 +1,25 @@ +/******************************************************************************* + * Copyright (c) 2006-2011 Gluster, Inc. <http://www.gluster.com> + * This file is part of Gluster Management Console. + * + * Gluster Management Console is free software; you can redistribute + * it and/or modify it under the terms of the GNU General Public + * License as published by the Free Software Foundation; either + * version 3 of the License, or (at your option) any later version. + * + * Gluster Management Console is distributed in the hope that it + * will be useful, but WITHOUT ANY WARRANTY; without even the + * implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR + * PURPOSE. See the GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program. If not, see + * <http://www.gnu.org/licenses/>. + *******************************************************************************/ /** * */ -package com.gluster.storage.management.console.views.pages; +package org.gluster.storage.management.console.views.pages; import java.util.ArrayList; import java.util.List; @@ -12,12 +30,12 @@ import org.eclipse.jface.viewers.ComboBoxCellEditor; import org.eclipse.jface.viewers.EditingSupport; import org.eclipse.swt.SWT; import org.eclipse.swt.widgets.Composite; +import org.gluster.storage.management.console.GlusterDataModelManager; +import org.gluster.storage.management.core.model.Volume; +import org.gluster.storage.management.core.model.VolumeOption; +import org.gluster.storage.management.core.model.VolumeOptionInfo; +import org.gluster.storage.management.core.model.VolumeOptions; -import com.gluster.storage.management.console.GlusterDataModelManager; -import com.gluster.storage.management.core.model.Volume; -import com.gluster.storage.management.core.model.VolumeOption; -import com.gluster.storage.management.core.model.VolumeOptionInfo; -import com.gluster.storage.management.core.model.VolumeOptions; /** * Editing support for the "value" column in volume options table viewer. diff --git a/src/com.gluster.storage.management.console/src/com/gluster/storage/management/console/views/pages/OptionValueEditingSupport.java b/src/org.gluster.storage.management.console/src/org/gluster/storage/management/console/views/pages/OptionValueEditingSupport.java index faf4fbe6..51a56a7c 100644 --- a/src/com.gluster.storage.management.console/src/com/gluster/storage/management/console/views/pages/OptionValueEditingSupport.java +++ b/src/org.gluster.storage.management.console/src/org/gluster/storage/management/console/views/pages/OptionValueEditingSupport.java @@ -1,7 +1,25 @@ +/******************************************************************************* + * Copyright (c) 2006-2011 Gluster, Inc. <http://www.gluster.com> + * This file is part of Gluster Management Console. + * + * Gluster Management Console is free software; you can redistribute + * it and/or modify it under the terms of the GNU General Public + * License as published by the Free Software Foundation; either + * version 3 of the License, or (at your option) any later version. + * + * Gluster Management Console is distributed in the hope that it + * will be useful, but WITHOUT ANY WARRANTY; without even the + * implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR + * PURPOSE. See the GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program. If not, see + * <http://www.gnu.org/licenses/>. + *******************************************************************************/ /** * */ -package com.gluster.storage.management.console.views.pages; +package org.gluster.storage.management.console.views.pages; import java.util.List; @@ -13,13 +31,13 @@ import org.eclipse.jface.viewers.TextCellEditor; import org.eclipse.swt.custom.BusyIndicator; import org.eclipse.swt.widgets.Composite; import org.eclipse.swt.widgets.Display; +import org.gluster.storage.management.client.VolumesClient; +import org.gluster.storage.management.console.GlusterDataModelManager; +import org.gluster.storage.management.console.utils.GUIHelper; +import org.gluster.storage.management.core.model.Volume; +import org.gluster.storage.management.core.model.VolumeOption; +import org.gluster.storage.management.core.model.VolumeOptionInfo; -import com.gluster.storage.management.client.VolumesClient; -import com.gluster.storage.management.console.GlusterDataModelManager; -import com.gluster.storage.management.console.utils.GUIHelper; -import com.gluster.storage.management.core.model.Volume; -import com.gluster.storage.management.core.model.VolumeOption; -import com.gluster.storage.management.core.model.VolumeOptionInfo; /** * Editing support for the "value" column in volume options table viewer. diff --git a/src/com.gluster.storage.management.console/src/com/gluster/storage/management/console/views/pages/ServerDisksPage.java b/src/org.gluster.storage.management.console/src/org/gluster/storage/management/console/views/pages/ServerDisksPage.java index a2982590..ba9b7152 100644 --- a/src/com.gluster.storage.management.console/src/com/gluster/storage/management/console/views/pages/ServerDisksPage.java +++ b/src/org.gluster.storage.management.console/src/org/gluster/storage/management/console/views/pages/ServerDisksPage.java @@ -1,32 +1,32 @@ /******************************************************************************* - * Copyright (c) 2011 Gluster, Inc. <http://www.gluster.com> + * Copyright (c) 2006-2011 Gluster, Inc. <http://www.gluster.com> * This file is part of Gluster Management Console. * - * Gluster Management Console is free software; you can redistribute it and/or - * modify it under the terms of the GNU Affero General Public License as published - * by the Free Software Foundation; either version 3 of the License, or - * (at your option) any later version. - * - * Gluster Management Console is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY - * or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Affero General Public License - * for more details. - * - * You should have received a copy of the GNU Affero General Public License - * along with this program. If not, see + * Gluster Management Console is free software; you can redistribute + * it and/or modify it under the terms of the GNU General Public + * License as published by the Free Software Foundation; either + * version 3 of the License, or (at your option) any later version. + * + * Gluster Management Console is distributed in the hope that it + * will be useful, but WITHOUT ANY WARRANTY; without even the + * implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR + * PURPOSE. See the GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program. If not, see * <http://www.gnu.org/licenses/>. *******************************************************************************/ -package com.gluster.storage.management.console.views.pages; +package org.gluster.storage.management.console.views.pages; import java.util.List; import org.eclipse.jface.viewers.IContentProvider; import org.eclipse.swt.widgets.Composite; import org.eclipse.ui.IWorkbenchSite; +import org.gluster.storage.management.console.ServerDiskTableLabelProvider; +import org.gluster.storage.management.core.model.Disk; +import org.gluster.storage.management.core.model.Entity; -import com.gluster.storage.management.console.ServerDiskTableLabelProvider; -import com.gluster.storage.management.core.model.Disk; -import com.gluster.storage.management.core.model.Entity; public class ServerDisksPage extends AbstractDisksPage { @@ -38,8 +38,6 @@ public class ServerDisksPage extends AbstractDisksPage { DISK, PARTITION, FREE_SPACE, TOTAL_SPACE, STATUS }; - private static final String[] SERVER_DISK_TABLE_COLUMN_NAMES = new String[] { "Disk", "Partition", "Free Space (GB)", - "Total Space (GB)", "Status" }; @Override protected int getStatusColumnIndex() { diff --git a/src/com.gluster.storage.management.console/src/com/gluster/storage/management/console/views/pages/ServerLogsPage.java b/src/org.gluster.storage.management.console/src/org/gluster/storage/management/console/views/pages/ServerLogsPage.java index 7b3f3946..99238c54 100644 --- a/src/com.gluster.storage.management.console/src/com/gluster/storage/management/console/views/pages/ServerLogsPage.java +++ b/src/org.gluster.storage.management.console/src/org/gluster/storage/management/console/views/pages/ServerLogsPage.java @@ -1,22 +1,22 @@ /******************************************************************************* - * Copyright (c) 2011 Gluster, Inc. <http://www.gluster.com> + * Copyright (c) 2006-2011 Gluster, Inc. <http://www.gluster.com> * This file is part of Gluster Management Console. * - * Gluster Management Console is free software; you can redistribute it and/or - * modify it under the terms of the GNU Affero General Public License as published - * by the Free Software Foundation; either version 3 of the License, or - * (at your option) any later version. - * - * Gluster Management Console is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY - * or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Affero General Public License - * for more details. - * - * You should have received a copy of the GNU Affero General Public License - * along with this program. If not, see + * Gluster Management Console is free software; you can redistribute + * it and/or modify it under the terms of the GNU General Public + * License as published by the Free Software Foundation; either + * version 3 of the License, or (at your option) any later version. + * + * Gluster Management Console is distributed in the hope that it + * will be useful, but WITHOUT ANY WARRANTY; without even the + * implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR + * PURPOSE. See the GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program. If not, see * <http://www.gnu.org/licenses/>. *******************************************************************************/ -package com.gluster.storage.management.console.views.pages; +package org.gluster.storage.management.console.views.pages; import org.eclipse.jface.viewers.ArrayContentProvider; import org.eclipse.jface.viewers.ListViewer; @@ -33,25 +33,22 @@ import org.eclipse.swt.widgets.Combo; import org.eclipse.swt.widgets.Composite; import org.eclipse.swt.widgets.Display; import org.eclipse.swt.widgets.Label; -import org.eclipse.swt.widgets.Table; import org.eclipse.swt.widgets.Text; import org.eclipse.ui.forms.widgets.FormToolkit; +import org.gluster.storage.management.console.utils.GUIHelper; +import org.gluster.storage.management.core.model.GlusterServer; -import com.gluster.storage.management.console.utils.GUIHelper; -import com.gluster.storage.management.core.model.GlusterServer; public class ServerLogsPage extends Composite { private final FormToolkit toolkit = new FormToolkit(Display.getCurrent()); private final GUIHelper guiHelper = GUIHelper.getInstance(); private Text text; - private Table table; public enum LOG_TABLE_COLUMN_INDICES { DATE, TIME, DISK, SEVERITY, MESSAGE }; - private static final String[] LOG_TABLE_COLUMN_NAMES = new String[] { "Date", "Time", "Disk", "Severity", "Message" }; /** * Create the composite. diff --git a/src/com.gluster.storage.management.console/src/com/gluster/storage/management/console/views/pages/ServersPage.java b/src/org.gluster.storage.management.console/src/org/gluster/storage/management/console/views/pages/ServersPage.java index 99945b31..b0cbac2b 100644 --- a/src/com.gluster.storage.management.console/src/com/gluster/storage/management/console/views/pages/ServersPage.java +++ b/src/org.gluster.storage.management.console/src/org/gluster/storage/management/console/views/pages/ServersPage.java @@ -1,22 +1,22 @@ - /******************************************************************************* - * Copyright (c) 2011 Gluster, Inc. <http://www.gluster.com> +/******************************************************************************* + * Copyright (c) 2006-2011 Gluster, Inc. <http://www.gluster.com> * This file is part of Gluster Management Console. * - * Gluster Management Console is free software; you can redistribute it and/or - * modify it under the terms of the GNU Affero General Public License as published - * by the Free Software Foundation; either version 3 of the License, or - * (at your option) any later version. - * - * Gluster Management Console is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY - * or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Affero General Public License - * for more details. - * - * You should have received a copy of the GNU Affero General Public License - * along with this program. If not, see + * Gluster Management Console is free software; you can redistribute + * it and/or modify it under the terms of the GNU General Public + * License as published by the Free Software Foundation; either + * version 3 of the License, or (at your option) any later version. + * + * Gluster Management Console is distributed in the hope that it + * will be useful, but WITHOUT ANY WARRANTY; without even the + * implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR + * PURPOSE. See the GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program. If not, see * <http://www.gnu.org/licenses/>. *******************************************************************************/ -package com.gluster.storage.management.console.views.pages; +package org.gluster.storage.management.console.views.pages; import java.util.List; @@ -24,19 +24,20 @@ import org.eclipse.jface.layout.TableColumnLayout; import org.eclipse.jface.viewers.ColumnWeightData; import org.eclipse.jface.viewers.IBaseLabelProvider; import org.eclipse.jface.viewers.IContentProvider; +import org.eclipse.jface.viewers.ViewerComparator; import org.eclipse.swt.SWT; import org.eclipse.swt.widgets.Composite; import org.eclipse.swt.widgets.Table; import org.eclipse.swt.widgets.TableColumn; import org.eclipse.ui.IWorkbenchSite; +import org.gluster.storage.management.console.EntityGroupContentProvider; +import org.gluster.storage.management.console.ServerTableLabelProvider; +import org.gluster.storage.management.core.model.ClusterListener; +import org.gluster.storage.management.core.model.DefaultClusterListener; +import org.gluster.storage.management.core.model.EntityGroup; +import org.gluster.storage.management.core.model.Event; +import org.gluster.storage.management.core.model.Server; -import com.gluster.storage.management.console.EntityGroupContentProvider; -import com.gluster.storage.management.console.ServerTableLabelProvider; -import com.gluster.storage.management.core.model.ClusterListener; -import com.gluster.storage.management.core.model.DefaultClusterListener; -import com.gluster.storage.management.core.model.EntityGroup; -import com.gluster.storage.management.core.model.Event; -import com.gluster.storage.management.core.model.Server; public class ServersPage extends AbstractTableViewerPage<Server> { private List<Server> servers; @@ -128,4 +129,10 @@ public class ServersPage extends AbstractTableViewerPage<Server> { TableColumnLayout tableColumnLayout = (TableColumnLayout) table.getParent().getLayout(); tableColumnLayout.setColumnData(column, new ColumnWeightData(weight)); } + + @Override + protected ViewerComparator createViewerComparator() { + // TODO Auto-generated method stub + return null; + } } diff --git a/src/com.gluster.storage.management.console/src/com/gluster/storage/management/console/views/pages/TasksPage.java b/src/org.gluster.storage.management.console/src/org/gluster/storage/management/console/views/pages/TasksPage.java index d54b501d..191b9a57 100644 --- a/src/com.gluster.storage.management.console/src/com/gluster/storage/management/console/views/pages/TasksPage.java +++ b/src/org.gluster.storage.management.console/src/org/gluster/storage/management/console/views/pages/TasksPage.java @@ -1,24 +1,22 @@ -/** - * TasksPage.java - * - * Copyright (c) 2011 Gluster, Inc. <http://www.gluster.com> +/******************************************************************************* + * Copyright (c) 2006-2011 Gluster, Inc. <http://www.gluster.com> * This file is part of Gluster Management Console. * - * Gluster Management Console is free software; you can redistribute it and/or - * modify it under the terms of the GNU Affero General Public License as published - * by the Free Software Foundation; either version 3 of the License, or - * (at your option) any later version. + * Gluster Management Console is free software; you can redistribute + * it and/or modify it under the terms of the GNU General Public + * License as published by the Free Software Foundation; either + * version 3 of the License, or (at your option) any later version. * - * Gluster Management Console is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY - * or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Affero General Public License - * for more details. + * Gluster Management Console is distributed in the hope that it + * will be useful, but WITHOUT ANY WARRANTY; without even the + * implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR + * PURPOSE. See the GNU General Public License for more details. * - * You should have received a copy of the GNU Affero General Public License - * along with this program. If not, see + * You should have received a copy of the GNU General Public License + * along with this program. If not, see * <http://www.gnu.org/licenses/>. - */ -package com.gluster.storage.management.console.views.pages; + *******************************************************************************/ +package org.gluster.storage.management.console.views.pages; import java.util.List; @@ -27,18 +25,19 @@ import org.eclipse.jface.viewers.IBaseLabelProvider; import org.eclipse.jface.viewers.IContentProvider; import org.eclipse.jface.viewers.ISelection; import org.eclipse.jface.viewers.StructuredSelection; +import org.eclipse.jface.viewers.ViewerComparator; import org.eclipse.swt.SWT; import org.eclipse.swt.widgets.Composite; import org.eclipse.swt.widgets.Table; import org.eclipse.ui.IWorkbenchPart; import org.eclipse.ui.IWorkbenchSite; +import org.gluster.storage.management.console.TasksTableLabelProvider; +import org.gluster.storage.management.console.toolbar.GlusterToolbarManager; +import org.gluster.storage.management.core.model.ClusterListener; +import org.gluster.storage.management.core.model.DefaultClusterListener; +import org.gluster.storage.management.core.model.Entity; +import org.gluster.storage.management.core.model.TaskInfo; -import com.gluster.storage.management.console.TasksTableLabelProvider; -import com.gluster.storage.management.console.toolbar.GlusterToolbarManager; -import com.gluster.storage.management.core.model.ClusterListener; -import com.gluster.storage.management.core.model.DefaultClusterListener; -import com.gluster.storage.management.core.model.Entity; -import com.gluster.storage.management.core.model.TaskInfo; public class TasksPage extends AbstractTableViewerPage<TaskInfo> { private List<TaskInfo> taskInfoList; @@ -57,7 +56,7 @@ public class TasksPage extends AbstractTableViewerPage<TaskInfo> { } /* (non-Javadoc) - * @see com.gluster.storage.management.console.views.pages.AbstractTableViewerPage#createClusterListener() + * @see org.gluster.storage.management.console.views.pages.AbstractTableViewerPage#createClusterListener() */ @Override protected ClusterListener createClusterListener() { @@ -88,7 +87,7 @@ public class TasksPage extends AbstractTableViewerPage<TaskInfo> { } /* (non-Javadoc) - * @see com.gluster.storage.management.console.views.pages.AbstractTableViewerPage#getColumnNames() + * @see org.gluster.storage.management.console.views.pages.AbstractTableViewerPage#getColumnNames() */ @Override protected String[] getColumnNames() { @@ -96,7 +95,7 @@ public class TasksPage extends AbstractTableViewerPage<TaskInfo> { } /* (non-Javadoc) - * @see com.gluster.storage.management.console.views.pages.AbstractTableViewerPage#setColumnProperties(org.eclipse.swt.widgets.Table) + * @see org.gluster.storage.management.console.views.pages.AbstractTableViewerPage#setColumnProperties(org.eclipse.swt.widgets.Table) */ @Override protected void setColumnProperties(Table table) { @@ -105,7 +104,7 @@ public class TasksPage extends AbstractTableViewerPage<TaskInfo> { } /* (non-Javadoc) - * @see com.gluster.storage.management.console.views.pages.AbstractTableViewerPage#getLabelProvider() + * @see org.gluster.storage.management.console.views.pages.AbstractTableViewerPage#getLabelProvider() */ @Override protected IBaseLabelProvider getLabelProvider() { @@ -113,7 +112,7 @@ public class TasksPage extends AbstractTableViewerPage<TaskInfo> { } /* (non-Javadoc) - * @see com.gluster.storage.management.console.views.pages.AbstractTableViewerPage#getContentProvider() + * @see org.gluster.storage.management.console.views.pages.AbstractTableViewerPage#getContentProvider() */ @Override protected IContentProvider getContentProvider() { @@ -121,7 +120,7 @@ public class TasksPage extends AbstractTableViewerPage<TaskInfo> { } /* (non-Javadoc) - * @see com.gluster.storage.management.console.views.pages.AbstractTableViewerPage#getAllEntities() + * @see org.gluster.storage.management.console.views.pages.AbstractTableViewerPage#getAllEntities() */ @Override protected List<TaskInfo> getAllEntities() { @@ -129,7 +128,7 @@ public class TasksPage extends AbstractTableViewerPage<TaskInfo> { } /* (non-Javadoc) - * @see com.gluster.storage.management.console.views.pages.AbstractTableViewerPage#selectionChanged(org.eclipse.ui.IWorkbenchPart, org.eclipse.jface.viewers.ISelection) + * @see org.gluster.storage.management.console.views.pages.AbstractTableViewerPage#selectionChanged(org.eclipse.ui.IWorkbenchPart, org.eclipse.jface.viewers.ISelection) */ @Override public void selectionChanged(IWorkbenchPart part, ISelection selection) { @@ -141,4 +140,10 @@ public class TasksPage extends AbstractTableViewerPage<TaskInfo> { } } } + + @Override + protected ViewerComparator createViewerComparator() { + // TODO Auto-generated method stub + return null; + } } diff --git a/src/com.gluster.storage.management.console/src/com/gluster/storage/management/console/views/pages/VolumeLogsPage.java b/src/org.gluster.storage.management.console/src/org/gluster/storage/management/console/views/pages/VolumeLogsPage.java index e573229c..a6a40561 100644 --- a/src/com.gluster.storage.management.console/src/com/gluster/storage/management/console/views/pages/VolumeLogsPage.java +++ b/src/org.gluster.storage.management.console/src/org/gluster/storage/management/console/views/pages/VolumeLogsPage.java @@ -1,22 +1,22 @@ /******************************************************************************* - * Copyright (c) 2011 Gluster, Inc. <http://www.gluster.com> + * Copyright (c) 2006-2011 Gluster, Inc. <http://www.gluster.com> * This file is part of Gluster Management Console. * - * Gluster Management Console is free software; you can redistribute it and/or - * modify it under the terms of the GNU Affero General Public License as published - * by the Free Software Foundation; either version 3 of the License, or - * (at your option) any later version. - * - * Gluster Management Console is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY - * or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Affero General Public License - * for more details. - * - * You should have received a copy of the GNU Affero General Public License - * along with this program. If not, see + * Gluster Management Console is free software; you can redistribute + * it and/or modify it under the terms of the GNU General Public + * License as published by the Free Software Foundation; either + * version 3 of the License, or (at your option) any later version. + * + * Gluster Management Console is distributed in the hope that it + * will be useful, but WITHOUT ANY WARRANTY; without even the + * implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR + * PURPOSE. See the GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program. If not, see * <http://www.gnu.org/licenses/>. *******************************************************************************/ -package com.gluster.storage.management.console.views.pages; +package org.gluster.storage.management.console.views.pages; import java.util.Calendar; import java.util.Date; @@ -26,6 +26,7 @@ import org.eclipse.jface.dialogs.MessageDialog; import org.eclipse.jface.layout.TableColumnLayout; import org.eclipse.jface.viewers.ArrayContentProvider; import org.eclipse.jface.viewers.ColumnWeightData; +import org.eclipse.jface.viewers.IDoubleClickListener; import org.eclipse.jface.viewers.TableViewer; import org.eclipse.swt.SWT; import org.eclipse.swt.events.DisposeEvent; @@ -47,15 +48,15 @@ import org.eclipse.swt.widgets.Table; import org.eclipse.swt.widgets.TableColumn; import org.eclipse.swt.widgets.Text; import org.eclipse.ui.forms.widgets.FormToolkit; +import org.gluster.storage.management.client.VolumesClient; +import org.gluster.storage.management.console.VolumeLogTableLabelProvider; +import org.gluster.storage.management.console.utils.GUIHelper; +import org.gluster.storage.management.core.constants.CoreConstants; +import org.gluster.storage.management.core.constants.GlusterConstants; +import org.gluster.storage.management.core.constants.GlusterConstants.VOLUME_LOG_LEVELS; +import org.gluster.storage.management.core.model.Volume; +import org.gluster.storage.management.core.model.VolumeLogMessage; -import com.gluster.storage.management.client.VolumesClient; -import com.gluster.storage.management.console.VolumeLogTableLabelProvider; -import com.gluster.storage.management.console.utils.GUIHelper; -import com.gluster.storage.management.core.constants.CoreConstants; -import com.gluster.storage.management.core.constants.GlusterConstants; -import com.gluster.storage.management.core.constants.GlusterConstants.VOLUME_LOG_LEVELS; -import com.gluster.storage.management.core.model.Volume; -import com.gluster.storage.management.core.model.VolumeLogMessage; public class VolumeLogsPage extends Composite { @@ -423,4 +424,8 @@ public class VolumeLogsPage extends Composite { calendar.set(Calendar.SECOND, time.getSeconds()); return calendar.getTime(); } + + public void addDoubleClickListener(IDoubleClickListener listener) { + tableViewer.addDoubleClickListener(listener); + } } diff --git a/src/com.gluster.storage.management.console/src/com/gluster/storage/management/console/views/pages/VolumeOptionsPage.java b/src/org.gluster.storage.management.console/src/org/gluster/storage/management/console/views/pages/VolumeOptionsPage.java index dd02a672..8bf522ab 100644 --- a/src/com.gluster.storage.management.console/src/com/gluster/storage/management/console/views/pages/VolumeOptionsPage.java +++ b/src/org.gluster.storage.management.console/src/org/gluster/storage/management/console/views/pages/VolumeOptionsPage.java @@ -1,22 +1,22 @@ /******************************************************************************* - * Copyright (c) 2011 Gluster, Inc. <http://www.gluster.com> + * Copyright (c) 2006-2011 Gluster, Inc. <http://www.gluster.com> * This file is part of Gluster Management Console. * - * Gluster Management Console is free software; you can redistribute it and/or - * modify it under the terms of the GNU Affero General Public License as published - * by the Free Software Foundation; either version 3 of the License, or - * (at your option) any later version. - * - * Gluster Management Console is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY - * or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Affero General Public License - * for more details. - * - * You should have received a copy of the GNU Affero General Public License - * along with this program. If not, see + * Gluster Management Console is free software; you can redistribute + * it and/or modify it under the terms of the GNU General Public + * License as published by the Free Software Foundation; either + * version 3 of the License, or (at your option) any later version. + * + * Gluster Management Console is distributed in the hope that it + * will be useful, but WITHOUT ANY WARRANTY; without even the + * implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR + * PURPOSE. See the GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program. If not, see * <http://www.gnu.org/licenses/>. *******************************************************************************/ -package com.gluster.storage.management.console.views.pages; +package org.gluster.storage.management.console.views.pages; import java.util.List; @@ -49,17 +49,17 @@ import org.eclipse.swt.widgets.Table; import org.eclipse.swt.widgets.TableColumn; import org.eclipse.swt.widgets.Text; import org.eclipse.ui.forms.widgets.FormToolkit; +import org.gluster.storage.management.console.GlusterDataModelManager; +import org.gluster.storage.management.console.VolumeOptionsContentProvider; +import org.gluster.storage.management.console.VolumeOptionsTableLabelProvider; +import org.gluster.storage.management.console.utils.GUIHelper; +import org.gluster.storage.management.core.constants.CoreConstants; +import org.gluster.storage.management.core.model.DefaultClusterListener; +import org.gluster.storage.management.core.model.Event; +import org.gluster.storage.management.core.model.Volume; +import org.gluster.storage.management.core.model.VolumeOption; +import org.gluster.storage.management.core.model.VolumeOptionInfo; -import com.gluster.storage.management.console.GlusterDataModelManager; -import com.gluster.storage.management.console.VolumeOptionsContentProvider; -import com.gluster.storage.management.console.VolumeOptionsTableLabelProvider; -import com.gluster.storage.management.console.utils.GUIHelper; -import com.gluster.storage.management.core.constants.CoreConstants; -import com.gluster.storage.management.core.model.DefaultClusterListener; -import com.gluster.storage.management.core.model.Event; -import com.gluster.storage.management.core.model.Volume; -import com.gluster.storage.management.core.model.VolumeOption; -import com.gluster.storage.management.core.model.VolumeOptionInfo; public class VolumeOptionsPage extends Composite { diff --git a/src/com.gluster.storage.management.console/src/com/gluster/storage/management/console/views/pages/VolumesPage.java b/src/org.gluster.storage.management.console/src/org/gluster/storage/management/console/views/pages/VolumesPage.java index 01d3e7b0..b65b0f01 100644 --- a/src/com.gluster.storage.management.console/src/com/gluster/storage/management/console/views/pages/VolumesPage.java +++ b/src/org.gluster.storage.management.console/src/org/gluster/storage/management/console/views/pages/VolumesPage.java @@ -1,22 +1,22 @@ /******************************************************************************* - * Copyright (c) 2011 Gluster, Inc. <http://www.gluster.com> + * Copyright (c) 2006-2011 Gluster, Inc. <http://www.gluster.com> * This file is part of Gluster Management Console. * - * Gluster Management Console is free software; you can redistribute it and/or - * modify it under the terms of the GNU Affero General Public License as published - * by the Free Software Foundation; either version 3 of the License, or - * (at your option) any later version. - * - * Gluster Management Console is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY - * or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Affero General Public License - * for more details. - * - * You should have received a copy of the GNU Affero General Public License - * along with this program. If not, see + * Gluster Management Console is free software; you can redistribute + * it and/or modify it under the terms of the GNU General Public + * License as published by the Free Software Foundation; either + * version 3 of the License, or (at your option) any later version. + * + * Gluster Management Console is distributed in the hope that it + * will be useful, but WITHOUT ANY WARRANTY; without even the + * implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR + * PURPOSE. See the GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program. If not, see * <http://www.gnu.org/licenses/>. *******************************************************************************/ -package com.gluster.storage.management.console.views.pages; +package org.gluster.storage.management.console.views.pages; import java.util.List; @@ -24,21 +24,22 @@ import org.eclipse.jface.layout.TableColumnLayout; import org.eclipse.jface.viewers.ColumnWeightData; import org.eclipse.jface.viewers.IBaseLabelProvider; import org.eclipse.jface.viewers.IContentProvider; +import org.eclipse.jface.viewers.ViewerComparator; import org.eclipse.swt.SWT; import org.eclipse.swt.widgets.Composite; import org.eclipse.swt.widgets.Table; import org.eclipse.swt.widgets.TableColumn; import org.eclipse.ui.IWorkbenchSite; +import org.gluster.storage.management.console.EntityGroupContentProvider; +import org.gluster.storage.management.console.VolumeTableLabelProvider; +import org.gluster.storage.management.console.toolbar.GlusterToolbarManager; +import org.gluster.storage.management.core.constants.CoreConstants; +import org.gluster.storage.management.core.model.ClusterListener; +import org.gluster.storage.management.core.model.DefaultClusterListener; +import org.gluster.storage.management.core.model.EntityGroup; +import org.gluster.storage.management.core.model.Event; +import org.gluster.storage.management.core.model.Volume; -import com.gluster.storage.management.console.EntityGroupContentProvider; -import com.gluster.storage.management.console.VolumeTableLabelProvider; -import com.gluster.storage.management.console.toolbar.GlusterToolbarManager; -import com.gluster.storage.management.core.constants.CoreConstants; -import com.gluster.storage.management.core.model.ClusterListener; -import com.gluster.storage.management.core.model.DefaultClusterListener; -import com.gluster.storage.management.core.model.EntityGroup; -import com.gluster.storage.management.core.model.Event; -import com.gluster.storage.management.core.model.Volume; public class VolumesPage extends AbstractTableViewerPage<Volume> { private List<Volume> volumes; @@ -125,4 +126,10 @@ public class VolumesPage extends AbstractTableViewerPage<Volume> { protected List<Volume> getAllEntities() { return volumes; } + + @Override + protected ViewerComparator createViewerComparator() { + // TODO Auto-generated method stub + return null; + } } diff --git a/src/com.gluster.storage.management.core/.classpath b/src/org.gluster.storage.management.core/.classpath index b41cbcdb..81cdfd54 100644 --- a/src/com.gluster.storage.management.core/.classpath +++ b/src/org.gluster.storage.management.core/.classpath @@ -3,7 +3,11 @@ <classpathentry kind="con" path="org.eclipse.pde.core.requiredPlugins"/> <classpathentry kind="src" path="src"/> <classpathentry kind="src" path="junit"/> - <classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER/org.eclipse.jdt.internal.debug.ui.launcher.StandardVMType/JavaSE-1.6"/> <classpathentry kind="con" path="org.eclipse.jdt.junit.JUNIT_CONTAINER/4"/> + <classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER/org.eclipse.jdt.internal.debug.ui.launcher.StandardVMType/JavaSE-1.6"> + <attributes> + <attribute name="owner.project.facets" value="java"/> + </attributes> + </classpathentry> <classpathentry kind="output" path="bin"/> </classpath> diff --git a/src/com.gluster.storage.management.core/.project b/src/org.gluster.storage.management.core/.project index 6c8fbb5c..93338d2e 100644 --- a/src/com.gluster.storage.management.core/.project +++ b/src/org.gluster.storage.management.core/.project @@ -1,11 +1,16 @@ <?xml version="1.0" encoding="UTF-8"?> <projectDescription> - <name>com.gluster.storage.management.core</name> + <name>org.gluster.storage.management.core</name> <comment></comment> <projects> </projects> <buildSpec> <buildCommand> + <name>org.eclipse.wst.common.project.facet.core.builder</name> + <arguments> + </arguments> + </buildCommand> + <buildCommand> <name>org.eclipse.jdt.core.javabuilder</name> <arguments> </arguments> @@ -20,9 +25,17 @@ <arguments> </arguments> </buildCommand> + <buildCommand> + <name>org.eclipse.wst.validation.validationbuilder</name> + <arguments> + </arguments> + </buildCommand> </buildSpec> <natures> + <nature>org.eclipse.jem.workbench.JavaEMFNature</nature> + <nature>org.eclipse.wst.common.modulecore.ModuleCoreNature</nature> <nature>org.eclipse.pde.PluginNature</nature> <nature>org.eclipse.jdt.core.javanature</nature> + <nature>org.eclipse.wst.common.project.facet.core.nature</nature> </natures> </projectDescription> diff --git a/src/com.gluster.storage.management.core/.settings/org.eclipse.jdt.core.prefs b/src/org.gluster.storage.management.core/.settings/org.eclipse.jdt.core.prefs index f22cedf1..f22cedf1 100644 --- a/src/com.gluster.storage.management.core/.settings/org.eclipse.jdt.core.prefs +++ b/src/org.gluster.storage.management.core/.settings/org.eclipse.jdt.core.prefs diff --git a/src/org.gluster.storage.management.core/.settings/org.eclipse.wst.common.component b/src/org.gluster.storage.management.core/.settings/org.eclipse.wst.common.component new file mode 100644 index 00000000..efdcd940 --- /dev/null +++ b/src/org.gluster.storage.management.core/.settings/org.eclipse.wst.common.component @@ -0,0 +1,6 @@ +<?xml version="1.0" encoding="UTF-8"?> +<project-modules id="moduleCoreId" project-version="1.5.0"> + <wb-module deploy-name="org.gluster.storage.management.core"> + <wb-resource deploy-path="/" source-path="/src"/> + </wb-module> +</project-modules> diff --git a/src/org.gluster.storage.management.core/.settings/org.eclipse.wst.common.project.facet.core.xml b/src/org.gluster.storage.management.core/.settings/org.eclipse.wst.common.project.facet.core.xml new file mode 100644 index 00000000..926884d9 --- /dev/null +++ b/src/org.gluster.storage.management.core/.settings/org.eclipse.wst.common.project.facet.core.xml @@ -0,0 +1,7 @@ +<?xml version="1.0" encoding="UTF-8"?> +<faceted-project> + <fixed facet="jst.utility"/> + <fixed facet="java"/> + <installed facet="java" version="1.6"/> + <installed facet="jst.utility" version="1.0"/> +</faceted-project> diff --git a/src/org.gluster.storage.management.core/META-INF/MANIFEST.MF b/src/org.gluster.storage.management.core/META-INF/MANIFEST.MF new file mode 100644 index 00000000..d1c69a80 --- /dev/null +++ b/src/org.gluster.storage.management.core/META-INF/MANIFEST.MF @@ -0,0 +1,15 @@ +Manifest-Version: 1.0 +Bundle-ManifestVersion: 2 +Bundle-Name: Gluster Storage Platform Core +Bundle-SymbolicName: org.gluster.storage.management.core +Bundle-Version: 1.0.0.qualifier +Bundle-Vendor: Gluster +Bundle-RequiredExecutionEnvironment: JavaSE-1.6 +Export-Package: org.gluster.storage.management.core.constants, + org.gluster.storage.management.core.exceptions, + org.gluster.storage.management.core.model, + org.gluster.storage.management.core.response, + org.gluster.storage.management.core.utils +Require-Bundle: org.eclipse.core.runtime;bundle-version="3.6.0" +Bundle-ClassPath: . +Import-Package: org.gluster.storage.management.core.exceptions diff --git a/src/org.gluster.storage.management.core/build.properties b/src/org.gluster.storage.management.core/build.properties new file mode 100644 index 00000000..19ab8727 --- /dev/null +++ b/src/org.gluster.storage.management.core/build.properties @@ -0,0 +1,23 @@ +############################################################################### +# Copyright (c) 2006-2011 Gluster, Inc. <http://www.gluster.com> +# This file is part of Gluster Management Console. +# +# Gluster Management Console is free software; you can redistribute +# it and/or modify it under the terms of the GNU General Public +# License as published by the Free Software Foundation; either +# version 3 of the License, or (at your option) any later version. +# +# Gluster Management Console is distributed in the hope that it +# will be useful, but WITHOUT ANY WARRANTY; without even the +# implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR +# PURPOSE. See the GNU General Public License for more details. +# +# You should have received a copy of the GNU General Public License +# along with this program. If not, see +# <http://www.gnu.org/licenses/>. +############################################################################### +source.. = src/,\ + junit/ +output.. = bin/ +bin.includes = META-INF/,\ + . diff --git a/src/com.gluster.storage.management.core/junit/core.junit.launch b/src/org.gluster.storage.management.core/junit/core.junit.launch index 0bf6dc30..3d6e7deb 100644 --- a/src/com.gluster.storage.management.core/junit/core.junit.launch +++ b/src/org.gluster.storage.management.core/junit/core.junit.launch @@ -1,15 +1,15 @@ <?xml version="1.0" encoding="UTF-8" standalone="no"?> <launchConfiguration type="org.eclipse.jdt.junit.launchconfig"> <listAttribute key="org.eclipse.debug.core.MAPPED_RESOURCE_PATHS"> -<listEntry value="/com.gluster.storage.management.core"/> +<listEntry value="/org.gluster.storage.management.core"/> </listAttribute> <listAttribute key="org.eclipse.debug.core.MAPPED_RESOURCE_TYPES"> <listEntry value="4"/> </listAttribute> -<stringAttribute key="org.eclipse.jdt.junit.CONTAINER" value="=com.gluster.storage.management.core"/> +<stringAttribute key="org.eclipse.jdt.junit.CONTAINER" value="=org.gluster.storage.management.core"/> <booleanAttribute key="org.eclipse.jdt.junit.KEEPRUNNING_ATTR" value="false"/> <stringAttribute key="org.eclipse.jdt.junit.TESTNAME" value=""/> <stringAttribute key="org.eclipse.jdt.junit.TEST_KIND" value="org.eclipse.jdt.junit.loader.junit4"/> <stringAttribute key="org.eclipse.jdt.launching.MAIN_TYPE" value=""/> -<stringAttribute key="org.eclipse.jdt.launching.PROJECT_ATTR" value="com.gluster.storage.management.core"/> +<stringAttribute key="org.eclipse.jdt.launching.PROJECT_ATTR" value="org.gluster.storage.management.core"/> </launchConfiguration> diff --git a/src/org.gluster.storage.management.core/junit/org/gluster/storage/management/core/model/AlertTest.java b/src/org.gluster.storage.management.core/junit/org/gluster/storage/management/core/model/AlertTest.java new file mode 100644 index 00000000..c013f9ea --- /dev/null +++ b/src/org.gluster.storage.management.core/junit/org/gluster/storage/management/core/model/AlertTest.java @@ -0,0 +1,101 @@ +/******************************************************************************* + * Copyright (c) 2006-2011 Gluster, Inc. <http://www.gluster.com> + * This file is part of Gluster Management Console. + * + * Gluster Management Console is free software; you can redistribute + * it and/or modify it under the terms of the GNU General Public + * License as published by the Free Software Foundation; either + * version 3 of the License, or (at your option) any later version. + * + * Gluster Management Console is distributed in the hope that it + * will be useful, but WITHOUT ANY WARRANTY; without even the + * implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR + * PURPOSE. See the GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program. If not, see + * <http://www.gnu.org/licenses/>. + *******************************************************************************/ +package org.gluster.storage.management.core.model; + +import static org.junit.Assert.assertEquals; +import static org.junit.Assert.assertNotNull; + +import org.gluster.storage.management.core.model.Alert; +import org.gluster.storage.management.core.model.Alert.ALERT_TYPES; +import org.junit.After; +import org.junit.Before; +import org.junit.Test; + + +/** + * The class <code>AlertTest</code> contains tests for the class <code>{@link Alert}</code>. + * + * @generatedBy CodePro at 10/17/11 3:32 PM + * @author root + * @version $Revision: 1.0 $ + */ +public class AlertTest { + + /** + * Run the void copyFrom(Alert) method test. + * + * @throws Exception + * + * @generatedBy CodePro at 10/17/11 3:32 PM + */ + @Test + public void testCopyFrom_1() + throws Exception { + Alert fixture = new Alert(ALERT_TYPES.DISK_USAGE_ALERT, "server1:sda", + Alert.ALERT_TYPE_STR[ALERT_TYPES.DISK_USAGE_ALERT.ordinal()] + " [85% used] in disk [server1:sda]"); + Alert alert = new Alert(); + alert.copyFrom(fixture); + + assertEquals(fixture.getId(), alert.getId()); + assertEquals(fixture.getReference(), alert.getReference()); + assertEquals(fixture.getType(), alert.getType()); + assertEquals(fixture.getMessage(), alert.getMessage()); + assertNotNull(alert); + } + + + /** + * Perform pre-test initialization. + * + * @throws Exception + * if the initialization fails for some reason + * + * @generatedBy CodePro at 10/17/11 3:32 PM + */ + @Before + public void setUp() + throws Exception { + // add additional set up code here + } + + /** + * Perform post-test clean-up. + * + * @throws Exception + * if the clean-up fails for some reason + * + * @generatedBy CodePro at 10/17/11 3:32 PM + */ + @After + public void tearDown() + throws Exception { + // Add additional tear down code here + } + + /** + * Launch the test. + * + * @param args the command line arguments + * + * @generatedBy CodePro at 10/17/11 3:32 PM + */ + public static void main(String[] args) { + new org.junit.runner.JUnitCore().run(AlertTest.class); + } +}
\ No newline at end of file diff --git a/src/org.gluster.storage.management.core/junit/org/gluster/storage/management/core/model/BrickTest.java b/src/org.gluster.storage.management.core/junit/org/gluster/storage/management/core/model/BrickTest.java new file mode 100644 index 00000000..0b2a208d --- /dev/null +++ b/src/org.gluster.storage.management.core/junit/org/gluster/storage/management/core/model/BrickTest.java @@ -0,0 +1,323 @@ +/******************************************************************************* + * Copyright (c) 2006-2011 Gluster, Inc. <http://www.gluster.com> + * This file is part of Gluster Management Console. + * + * Gluster Management Console is free software; you can redistribute + * it and/or modify it under the terms of the GNU General Public + * License as published by the Free Software Foundation; either + * version 3 of the License, or (at your option) any later version. + * + * Gluster Management Console is distributed in the hope that it + * will be useful, but WITHOUT ANY WARRANTY; without even the + * implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR + * PURPOSE. See the GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program. If not, see + * <http://www.gnu.org/licenses/>. + *******************************************************************************/ +package org.gluster.storage.management.core.model; + +import static org.junit.Assert.assertEquals; +import static org.junit.Assert.assertNotNull; +import static org.junit.Assert.assertTrue; + +import org.gluster.storage.management.core.model.Brick; +import org.gluster.storage.management.core.model.Brick.BRICK_STATUS; +import org.junit.After; +import org.junit.Before; +import org.junit.Test; + + +/** + * The class <code>BrickTest</code> contains tests for the class <code>{@link Brick}</code>. + * + * @generatedBy CodePro at 10/17/11 4:39 PM + * @author root + * @version $Revision: 1.0 $ + */ +public class BrickTest { + /** + * Run the void copyFrom(Brick) method test. + * + * @throws Exception + * + * @generatedBy CodePro at 10/17/11 4:39 PM + */ + @Test + public void testCopyFrom_1() + throws Exception { + Brick fixture = new Brick("Server1", BRICK_STATUS.ONLINE, "/sda1/songs"); + Brick newBrick = new Brick(); + newBrick.copyFrom(fixture); + + assertEquals(fixture.getServerName(), newBrick.getServerName()); + assertEquals(fixture.getBrickDirectory(), newBrick.getBrickDirectory()); + assertEquals(fixture.getStatus(), newBrick.getStatus()); + assertEquals(fixture.getQualifiedName(), newBrick.getQualifiedName()); + } + + /** + * Run the boolean equals(Object) method test. + * + * @throws Exception + * + * @generatedBy CodePro at 10/17/11 4:39 PM + */ + @Test + public void testEquals_1() + throws Exception { + Brick fixture = new Brick("Server1", BRICK_STATUS.ONLINE, "/sda1/songs"); + Brick newBrick = new Brick(); + newBrick.copyFrom(fixture); + + boolean result = fixture.equals(newBrick); + assertTrue(result); + } + + /** + * Run the boolean equals(Object) method test. + * + * @throws Exception + * + * @generatedBy CodePro at 10/17/11 4:39 PM + */ + @Test + public void testEquals_2() + throws Exception { + Brick fixture = new Brick("Server2", BRICK_STATUS.OFFLINE, "/md1/test"); + Brick newBrick = new Brick(); + newBrick.copyFrom(fixture); + + boolean result = fixture.equals(newBrick); + assertTrue(result); + } + + /** + * Run the boolean equals(Object) method test. + * + * @throws Exception + * + * @generatedBy CodePro at 10/17/11 4:39 PM + */ + @Test + public void testEquals_3() + throws Exception { + Brick fixture = new Brick("", BRICK_STATUS.ONLINE, ""); + Brick newBrick = new Brick(); + newBrick.copyFrom(fixture); + + boolean result = fixture.equals(newBrick); + assertTrue(result); + } + + + /** + * Run the boolean filter(String,boolean) method test. + * + * @throws Exception + * + * @generatedBy CodePro at 10/17/11 4:39 PM + */ + @Test + public void testFilter_1() + throws Exception { + Brick fixture = new Brick("Server2", BRICK_STATUS.OFFLINE, "/md1/test"); + + String filterString = "Ser"; + boolean caseSensitive = true; + + boolean result = fixture.filter(filterString, caseSensitive); + assertTrue(result); + } + + /** + * Run the boolean filter(String,boolean) method test. + * + * @throws Exception + * + * @generatedBy CodePro at 10/17/11 4:39 PM + */ + @Test + public void testFilter_2() + throws Exception { + Brick fixture = new Brick("Server2", BRICK_STATUS.OFFLINE, "/md1/test"); + + String filterString = "ser"; + boolean caseSensitive = true; + + boolean result = fixture.filter(filterString, caseSensitive); + assertEquals(result, false); + } + + /** + * Run the boolean filter(String,boolean) method test. + * + * @throws Exception + * + * @generatedBy CodePro at 10/17/11 4:39 PM + */ + @Test + public void testFilter_3() + throws Exception { + Brick fixture = new Brick("Server2", BRICK_STATUS.OFFLINE, "/md1/test"); + + String filterString = "Ser"; + boolean caseSensitive = false; + + boolean result = fixture.filter(filterString, caseSensitive); + assertTrue(result); + } + + /** + * Run the boolean filter(String,boolean) method test. + * + * @throws Exception + * + * @generatedBy CodePro at 10/17/11 4:39 PM + */ + @Test + public void testFilter_4() + throws Exception { + Brick fixture = new Brick("Server2", BRICK_STATUS.ONLINE, "/md1/test"); + + String filterString = "ser"; + boolean caseSensitive = false; + + boolean result = fixture.filter(filterString, caseSensitive); + assertTrue(result); + } + + /** + * Run the boolean filter(String,boolean) method test. + * + * @throws Exception + * + * @generatedBy CodePro at 10/17/11 4:39 PM + */ + @Test + public void testFilter_5() + throws Exception { + Brick fixture = new Brick("Server2", BRICK_STATUS.OFFLINE, "/md1/test"); + + String filterString = ""; + boolean caseSensitive = false; + + boolean result = fixture.filter(filterString, caseSensitive); + assertTrue(result); + } + + /** + * Run the boolean filter(String,boolean) method test. + * + * @throws Exception + * + * @generatedBy CodePro at 10/17/11 4:39 PM + */ + @Test + public void testFilter_6() + throws Exception { + Brick fixture = new Brick("Server2", BRICK_STATUS.OFFLINE, "/md1/test"); + + String filterString = ""; + boolean caseSensitive = true; + + boolean result = fixture.filter(filterString, caseSensitive); + assertTrue(result); + } + + + /** + * Run the String getQualifiedName() method test. + * + * @throws Exception + * + * @generatedBy CodePro at 10/17/11 4:39 PM + */ + @Test + public void testGetQualifiedName_1() + throws Exception { + Brick fixture = new Brick("Server2", BRICK_STATUS.OFFLINE, "/md1/test"); + + String result = fixture.getQualifiedName(); + + assertNotNull(result); + assertEquals(result, "Server2:/md1/test"); + } + + /** + * Run the String getQualifiedName() method test. + * + * @throws Exception + * + * @generatedBy CodePro at 10/17/11 4:39 PM + */ + @Test + public void testGetQualifiedName_2() + throws Exception { + Brick fixture = new Brick("", BRICK_STATUS.OFFLINE, ""); + + String result = fixture.getQualifiedName(); + + assertNotNull(result); + assertEquals(result, ":"); + } + + + /** + * Run the String toString() method test. + * + * @throws Exception + * + * @generatedBy CodePro at 10/17/11 4:39 PM + */ + @Test + public void testToString_1() + throws Exception { + Brick fixture = new Brick("Server2", BRICK_STATUS.OFFLINE, "/md1/test"); + + String result = fixture.toString(); + + assertNotNull(result); + assertEquals(result, "Server2:/md1/test"); + } + + /** + * Perform pre-test initialization. + * + * @throws Exception + * if the initialization fails for some reason + * + * @generatedBy CodePro at 10/17/11 4:39 PM + */ + @Before + public void setUp() + throws Exception { + // add additional set up code here + } + + /** + * Perform post-test clean-up. + * + * @throws Exception + * if the clean-up fails for some reason + * + * @generatedBy CodePro at 10/17/11 4:39 PM + */ + @After + public void tearDown() + throws Exception { + // Add additional tear down code here + } + + /** + * Launch the test. + * + * @param args the command line arguments + * + * @generatedBy CodePro at 10/17/11 4:39 PM + */ + public static void main(String[] args) { + new org.junit.runner.JUnitCore().run(BrickTest.class); + } +}
\ No newline at end of file diff --git a/src/org.gluster.storage.management.core/junit/org/gluster/storage/management/core/model/ClusterTest.java b/src/org.gluster.storage.management.core/junit/org/gluster/storage/management/core/model/ClusterTest.java new file mode 100644 index 00000000..acb342f2 --- /dev/null +++ b/src/org.gluster.storage.management.core/junit/org/gluster/storage/management/core/model/ClusterTest.java @@ -0,0 +1,229 @@ +/******************************************************************************* + * Copyright (c) 2006-2011 Gluster, Inc. <http://www.gluster.com> + * This file is part of Gluster Management Console. + * + * Gluster Management Console is free software; you can redistribute + * it and/or modify it under the terms of the GNU General Public + * License as published by the Free Software Foundation; either + * version 3 of the License, or (at your option) any later version. + * + * Gluster Management Console is distributed in the hope that it + * will be useful, but WITHOUT ANY WARRANTY; without even the + * implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR + * PURPOSE. See the GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program. If not, see + * <http://www.gnu.org/licenses/>. + *******************************************************************************/ +package org.gluster.storage.management.core.model; + +import static org.junit.Assert.assertEquals; +import static org.junit.Assert.assertNotNull; +import static org.junit.Assert.assertTrue; + +import java.util.ArrayList; +import java.util.List; + +import org.gluster.storage.management.core.model.Brick; +import org.gluster.storage.management.core.model.Cluster; +import org.gluster.storage.management.core.model.Disk; +import org.gluster.storage.management.core.model.GlusterServer; +import org.gluster.storage.management.core.model.Server; +import org.gluster.storage.management.core.model.Volume; +import org.gluster.storage.management.core.model.Brick.BRICK_STATUS; +import org.gluster.storage.management.core.model.Device.DEVICE_STATUS; +import org.gluster.storage.management.core.model.Device.DEVICE_TYPE; +import org.gluster.storage.management.core.model.Server.SERVER_STATUS; +import org.gluster.storage.management.core.model.Volume.TRANSPORT_TYPE; +import org.gluster.storage.management.core.model.Volume.VOLUME_STATUS; +import org.gluster.storage.management.core.model.Volume.VOLUME_TYPE; +import org.junit.After; +import org.junit.Before; +import org.junit.Test; + + +/** + * The class <code>ClusterTest</code> contains tests for the class <code>{@link Cluster}</code>. + * + * @generatedBy CodePro at 10/18/11 2:53 PM + * @author root + * @version $Revision: 1.0 $ + */ +public class ClusterTest { + private Cluster fixture; + + public List<Disk> getDisks(Server server) { + List<Disk> disks = new ArrayList<Disk>(); + disks.add(new Disk(server, "sda", "", 12456.0, 0.0, DEVICE_STATUS.UNINITIALIZED)); + Disk disk = new Disk(server, "sdb1", "/export", 134342456.0, 120343.0, DEVICE_STATUS.INITIALIZED); + disk.setType(DEVICE_TYPE.DATA); + disks.add(disk); + disk = new Disk(server, "sdc2", "/export", 876534346.0, 56334.0, DEVICE_STATUS.INITIALIZED); + disk.setType(DEVICE_TYPE.DATA); + disks.add(disk); + return disks; + } + + public List<GlusterServer> getServers() { + List<GlusterServer> servers = new ArrayList<GlusterServer>(); + GlusterServer server1 = new GlusterServer("Server1", null, SERVER_STATUS.ONLINE, 2, 10, 8, 4); + server1.addDisks(getDisks(server1)); + servers.add(server1); + + GlusterServer server2 = new GlusterServer("Server2", null, SERVER_STATUS.ONLINE, 1, 90, 10, 9); + server2.addDisks(getDisks(server2)); + servers.add(server2); + + GlusterServer server3 = new GlusterServer("Server3", null, SERVER_STATUS.ONLINE, 4, 50, 6, 5); + server3.addDisks(getDisks(server3)); + servers.add(server3); + + GlusterServer server4 = new GlusterServer("Server4", null, SERVER_STATUS.ONLINE, 2, 40, 4, 3); + server4.addDisks(getDisks(server4)); + servers.add(server4); + + return servers; + } + + public List<Brick> getBricks(String volumeName) { + List<Brick> bricks = new ArrayList<Brick>(); + Brick brick1 = new Brick("Server1", BRICK_STATUS.ONLINE, "/sda1/"+volumeName); + bricks.add(brick1); + Brick brick2 = new Brick("Server2", BRICK_STATUS.ONLINE, "/sdb1/"+volumeName); + bricks.add(brick2); + Brick brick3 = new Brick("Server3", BRICK_STATUS.ONLINE, "/sdc1/"+volumeName); + bricks.add(brick3); + Brick brick4 = new Brick("Server4", BRICK_STATUS.OFFLINE, "/sda2/"+volumeName); + bricks.add(brick4); + return bricks; + } + + + public void populateVolumes(Cluster cluster) { + Volume volume1 = new Volume("Songs", cluster, VOLUME_TYPE.DISTRIBUTE, TRANSPORT_TYPE.ETHERNET, + VOLUME_STATUS.ONLINE); + volume1.addBricks(getBricks(volume1.getName())); + cluster.addVolume(volume1); + + Volume volume2 = new Volume("Movie", cluster, VOLUME_TYPE.DISTRIBUTE, TRANSPORT_TYPE.ETHERNET, + VOLUME_STATUS.ONLINE); + volume2.addBricks(getBricks(volume1.getName())); + cluster.addVolume(volume2); + + Volume volume3 = new Volume("graphics", cluster, VOLUME_TYPE.DISTRIBUTE, TRANSPORT_TYPE.INFINIBAND, + VOLUME_STATUS.ONLINE); + volume3.addBricks(getBricks(volume1.getName())); + cluster.addVolume(volume3); + + Volume volume4 = new Volume("cartoon", cluster, VOLUME_TYPE.DISTRIBUTE, TRANSPORT_TYPE.ETHERNET, + VOLUME_STATUS.ONLINE); + volume4.addBricks(getBricks(volume1.getName())); + cluster.addVolume(volume4); + return; + } + + /** + * Run the double getDiskSpaceInUse() method test. + * + * @throws Exception + * + * @generatedBy CodePro at 10/18/11 2:53 PM + */ + @Test + public void testGetDiskSpaceInUse_1() + throws Exception { + double result = fixture.getDiskSpaceInUse(); + + assertEquals(706708.0, result, 0.1); + } + + /** + * Run the GlusterServer getServer(String) method test. + * + * @throws Exception + * + * @generatedBy CodePro at 10/18/11 2:53 PM + */ + @Test + public void testGetServer_1() + throws Exception { + GlusterServer result = fixture.getServer("Server1"); + + assertNotNull(result); + assertEquals("Server1", result.getName()); + assertEquals(2, result.getNumOfCPUs()); + assertEquals(3, result.getNumOfDisks() ); + } + + /** + * Run the double getTotalDiskSpace() method test. + * + * @throws Exception + * + * @generatedBy CodePro at 10/18/11 2:53 PM + */ + @Test + public void testGetTotalDiskSpace_1() + throws Exception { + double result = fixture.getTotalDiskSpace(); + assertEquals(4043557032.0, result, 0.1); // Including unformatted disks(!) + } + + /** + * Run the double getTotalDiskSpace() method test. + * + * @throws Exception + * + * @generatedBy CodePro at 10/18/11 2:53 PM + */ + @Test + public void testGetVolume_1() + throws Exception { + populateVolumes(fixture); + Volume result = fixture.getVolume("Songs"); + assertNotNull(result); + assertTrue(result instanceof Volume); + } + + + /** + * Perform pre-test initialization. + * + * @throws Exception + * if the initialization fails for some reason + * + * @generatedBy CodePro at 10/18/11 2:53 PM + */ + @Before + public void setUp() + throws Exception { + fixture = new Cluster(); + fixture.setServers(getServers()); + } + + /** + * Perform post-test clean-up. + * + * @throws Exception + * if the clean-up fails for some reason + * + * @generatedBy CodePro at 10/18/11 2:53 PM + */ + @After + public void tearDown() + throws Exception { + // Add additional tear down code here + } + + /** + * Launch the test. + * + * @param args the command line arguments + * + * @generatedBy CodePro at 10/18/11 2:53 PM + */ + public static void main(String[] args) { + new org.junit.runner.JUnitCore().run(ClusterTest.class); + } +}
\ No newline at end of file diff --git a/src/org.gluster.storage.management.core/junit/org/gluster/storage/management/core/model/DiskTest.java b/src/org.gluster.storage.management.core/junit/org/gluster/storage/management/core/model/DiskTest.java new file mode 100644 index 00000000..c709fb60 --- /dev/null +++ b/src/org.gluster.storage.management.core/junit/org/gluster/storage/management/core/model/DiskTest.java @@ -0,0 +1,495 @@ +/******************************************************************************* + * Copyright (c) 2006-2011 Gluster, Inc. <http://www.gluster.com> + * This file is part of Gluster Management Console. + * + * Gluster Management Console is free software; you can redistribute + * it and/or modify it under the terms of the GNU General Public + * License as published by the Free Software Foundation; either + * version 3 of the License, or (at your option) any later version. + * + * Gluster Management Console is distributed in the hope that it + * will be useful, but WITHOUT ANY WARRANTY; without even the + * implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR + * PURPOSE. See the GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program. If not, see + * <http://www.gnu.org/licenses/>. + *******************************************************************************/ +package org.gluster.storage.management.core.model; + +import static org.junit.Assert.assertEquals; +import static org.junit.Assert.assertNotNull; +import static org.junit.Assert.assertTrue; + +import java.util.ArrayList; + +import org.gluster.storage.management.core.model.Device.DEVICE_STATUS; +import org.gluster.storage.management.core.model.Device.DEVICE_TYPE; +import org.junit.After; +import org.junit.Before; +import org.junit.Test; + + +/** + * The class <code>DiskTest</code> contains tests for the class <code>{@link Disk}</code>. + * + * @generatedBy CodePro at 10/19/11 6:26 PM + * @author root + * @version $Revision: 1.0 $ + */ +public class DiskTest { + private Disk disk; + + /** + * Run the Disk() constructor test. + * + * @throws Exception + * + * @generatedBy CodePro at 10/19/11 6:26 PM + */ + @Test + public void testDisk_1() + throws Exception { + + // add additional test code here + assertNotNull(disk); + assertEquals(new Double(5000.0), disk.getSpace()); + assertEquals("Hitachi HTS72323 ATA", disk.getDescription()); + assertEquals(true, disk.isReady()); + assertEquals(null, disk.getDiskInterface()); + assertEquals(null, disk.getRaidDisks()); + assertEquals(false, disk.hasPartitions()); + assertEquals(new Double(3000.0), disk.getSpaceInUse()); + assertEquals(DEVICE_TYPE.DATA, disk.getType()); + assertEquals(new Double(2000.0), disk.getFreeSpace()); + assertEquals(DEVICE_STATUS.INITIALIZED, disk.getStatus()); + assertEquals("Server1:sda1", disk.getQualifiedName()); + assertEquals(true, disk.isInitialized()); + assertEquals(false, disk.hasErrors()); + assertEquals("Server1", disk.getServerName()); + assertEquals("Available", disk.getStatusStr()); + assertEquals(false, disk.isUninitialized()); + assertEquals("/md0/sda1", disk.getMountPoint()); + assertEquals("ext4", disk.getFsType()); + assertEquals("3.2.3", disk.getFsVersion()); + assertEquals("sda1", disk.toString()); + assertEquals("sda1", disk.getName()); + assertTrue(disk.getParent() instanceof Server); + } + + /** + * Run the Disk(Server,String,String,Double,Double,DEVICE_STATUS) constructor test. + * + * @throws Exception + * + * @generatedBy CodePro at 10/19/11 6:26 PM + */ + @Test + public void testDisk_2() + throws Exception { + Server server = new Server(); + String name = ""; + String mountPoint = ""; + Double space = new Double(1.0); + Double spaceInUse = new Double(1.0); + Device.DEVICE_STATUS status = Device.DEVICE_STATUS.INITIALIZED; + + Disk newDisk = new Disk(server, name, mountPoint, space, spaceInUse, status); + + // add additional test code here + assertNotNull(newDisk); + assertEquals(new Double(1.0), newDisk.getSpace()); + assertEquals(null, newDisk.getDescription()); + assertEquals(false, newDisk.isReady()); + assertEquals(null, newDisk.getDiskInterface()); + assertEquals(null, newDisk.getRaidDisks()); + assertEquals(false, newDisk.hasPartitions()); + assertEquals(new Double(1.0), newDisk.getSpaceInUse()); + assertEquals(null, newDisk.getType()); + assertEquals(new Double(0.0), newDisk.getFreeSpace()); + assertEquals("null:", newDisk.getQualifiedName()); + assertEquals(true, newDisk.isInitialized()); + assertEquals(false, newDisk.hasErrors()); + assertEquals(null, newDisk.getServerName()); + assertEquals("Initialized", newDisk.getStatusStr()); + assertEquals(false, newDisk.isUninitialized()); + assertEquals("", newDisk.getMountPoint()); + assertEquals(null, newDisk.getFsType()); + assertEquals(null, newDisk.getFsVersion()); + assertEquals("", newDisk.toString()); + assertEquals("", newDisk.getName()); + } + + /** + * Run the void copyFrom(Disk) method test. + * + * @throws Exception + * + * @generatedBy CodePro at 10/19/11 6:26 PM + */ + @Test + public void testCopyFrom_1() + throws Exception { + Disk newDisk = new Disk(); + newDisk.copyFrom(disk); + + assertEquals(newDisk.getSpace(), disk.getSpace()); + assertEquals(newDisk.getDescription(), disk.getDescription()); + assertEquals(newDisk.isReady(), disk.isReady()); + assertEquals(newDisk.getDiskInterface(), disk.getDiskInterface()); + assertEquals(newDisk.getRaidDisks(), disk.getRaidDisks()); + assertEquals(newDisk.hasPartitions(), disk.hasPartitions()); + assertEquals(newDisk.getSpaceInUse(), disk.getSpaceInUse()); + assertEquals(newDisk.getType(), disk.getType()); + assertEquals(newDisk.getFreeSpace(), disk.getFreeSpace()); + assertEquals(newDisk.getStatus(), disk.getStatus()); + assertEquals(newDisk.getQualifiedName(), disk.getQualifiedName()); + assertEquals(newDisk.isInitialized(), disk.isInitialized()); + assertEquals(newDisk.hasErrors(), disk.hasErrors()); + assertEquals(newDisk.getServerName(), disk.getServerName()); + assertEquals(newDisk.getStatusStr(), disk.getStatusStr()); + assertEquals(newDisk.isUninitialized(), disk.isUninitialized()); + assertEquals(newDisk.getMountPoint(), disk.getMountPoint()); + assertEquals(newDisk.getFsType(), disk.getFsType()); + assertEquals(newDisk.getFsVersion(), disk.getFsVersion()); + assertEquals(newDisk.toString(), disk.toString()); + assertEquals(newDisk.getName(), disk.getName()); + assertEquals(newDisk.getParent(), disk.getParent()); + } + + /** + * Run the boolean equals(Object) method test. + * + * @throws Exception + * + * @generatedBy CodePro at 10/19/11 6:26 PM + */ + @Test + public void testEquals_1() + throws Exception { + + Disk newDisk = new Disk(); + newDisk.copyFrom(disk); + boolean result = newDisk.equals(disk); + + assertTrue(result); + } + + /** + * Run the boolean equals(Object) method test. + * + * @throws Exception + * + * @generatedBy CodePro at 10/19/11 6:26 PM + */ + @Test + public void testEquals_2() + throws Exception { + Server server = new Server(); + String name = ""; + String mountPoint = ""; + Double space = new Double(1.0); + Double spaceInUse = new Double(1.0); + Device.DEVICE_STATUS status = Device.DEVICE_STATUS.INITIALIZED; + Disk newDisk = new Disk(server, name, mountPoint, space, spaceInUse, status); + + boolean result = newDisk.equals(disk); + + assertTrue(!result); + } + + /** + * Run the boolean equals(Object) method test. + * + * @throws Exception + * + * @generatedBy CodePro at 10/19/11 6:26 PM + */ + @Test + public void testEquals_3() + throws Exception { + + Disk newDisk = new Disk(); + newDisk.copyFrom(disk); + boolean result = newDisk.equals(disk); + + assertTrue(result); + } + + + /** + * Run the boolean filter(String,boolean) method test. + * + * @throws Exception + * + * @generatedBy CodePro at 10/19/11 6:26 PM + */ + @Test + public void testFilter_1() + throws Exception { + String filterString = ""; + boolean caseSensitive = true; + boolean result = disk.filter(filterString, caseSensitive); + + assertTrue(result); + } + + /** + * Run the boolean filter(String,boolean) method test. + * + * @throws Exception + * + * @generatedBy CodePro at 10/19/11 6:26 PM + */ + @Test + public void testFilter_2() + throws Exception { + String filterString = "Serv"; + boolean caseSensitive = true; + boolean result = disk.filter(filterString, caseSensitive); + + assertTrue(result); + } + + /** + * Run the boolean filter(String,boolean) method test. + * + * @throws Exception + * + * @generatedBy CodePro at 10/19/11 6:26 PM + */ + @Test + public void testFilter_3() + throws Exception { + String filterString = "serv"; + boolean caseSensitive = true; + boolean result = disk.filter(filterString, caseSensitive); + assertTrue(!result); + } + + /** + * Run the boolean filter(String,boolean) method test. + * + * @throws Exception + * + * @generatedBy CodePro at 10/19/11 6:26 PM + */ + @Test + public void testFilter_4() + throws Exception { + String filterString = "hitachi"; + boolean caseSensitive = true; + + boolean result = disk.filter(filterString, caseSensitive); + assertTrue(!result); + } + + + + /** + * Run the boolean filter(String,boolean) method test. + * + * @throws Exception + * + * @generatedBy CodePro at 10/19/11 6:26 PM + */ + @Test + public void testFilter_5() + throws Exception { + String filterString = "hitachi"; + boolean caseSensitive = false; + + boolean result = disk.filter(filterString, caseSensitive); + assertTrue(result); + } + + + /** + * Run the Double getSpace() method test. + * + * @throws Exception + * + * @generatedBy CodePro at 10/19/11 6:26 PM + */ + @Test + public void testGetSpace_1() + throws Exception { + Double result = disk.getSpace(); + assertNotNull(result); + assertTrue(result instanceof Double); + } + + + + /** + * Run the Double getSpaceInUse() method test. + * + * @throws Exception + * + * @generatedBy CodePro at 10/19/11 6:26 PM + */ + @Test + public void testGetSpaceInUse_1() + throws Exception { + Double result = disk.getSpaceInUse(); + assertNotNull(result); + assertTrue(result instanceof Double); + } + + + /** + * Run the boolean hasPartitions() method test. + * + * @throws Exception + * + * @generatedBy CodePro at 10/19/11 6:26 PM + */ + @Test + public void testHasPartitions_1() + throws Exception { + disk.setPartitions(new ArrayList<Partition>()); + boolean result = disk.hasPartitions(); + assertTrue(!result); + } + + + + /** + * Run the boolean isReady() method test. + * + * @throws Exception + * + * @generatedBy CodePro at 10/19/11 6:26 PM + */ + @Test + public void testIsReady_1() + throws Exception { + boolean result = disk.isReady(); + System.out.println("Disk status is [" + result + "] on [" + disk.getName() +"] and Status is [" + disk.getStatusStr() +"]"); + assertTrue(result); + } + + /** + * Run the boolean isReady() method test. + * + * @throws Exception + * + * @generatedBy CodePro at 10/19/11 6:26 PM + */ + @Test + public void testIsReady_2() + throws Exception { + disk.setPartitions(new ArrayList<Partition>()); + boolean result = disk.isReady(); + assertTrue(result); + } + + /** + * Run the boolean isReady() method test. + * + * @throws Exception + * + * @generatedBy CodePro at 10/19/11 6:26 PM + */ + @Test + public void testIsReady_3() + throws Exception { + disk.setStatus(DEVICE_STATUS.UNINITIALIZED); + boolean result = disk.isReady(); + assertTrue(!result); + } + + /** + * Run the boolean isReady() method test. + * + * @throws Exception + * + * @generatedBy CodePro at 10/19/11 6:26 PM + */ + @Test + public void testIsReady_4() + throws Exception { + disk.setStatus(DEVICE_STATUS.IO_ERROR); + boolean result = disk.isReady(); + + assertTrue(!result); + } + + /** + * Run the boolean isReady() method test. + * + * @throws Exception + * + * @generatedBy CodePro at 10/19/11 6:26 PM + */ + @Test + public void testIsReady_5() + throws Exception { + disk.setStatus(DEVICE_STATUS.INITIALIZING); + boolean result = disk.isReady(); + + assertTrue(!result); + } + + /** + * Run the boolean isReady() method test. + * + * @throws Exception + * + * @generatedBy CodePro at 10/19/11 6:26 PM + */ + @Test + public void testIsReady_6() + throws Exception { + disk.setStatus(DEVICE_STATUS.UNKNOWN); + boolean result = disk.isReady(); + + assertTrue(!result); + } + + + /** + * Perform pre-test initialization. + * + * @throws Exception + * if the initialization fails for some reason + * + * @generatedBy CodePro at 10/19/11 6:26 PM + */ + @Before + public void setUp() + throws Exception { + Server server = new Server("Server1", null, 2, 25D, 5000D, 2000D); + disk = new Disk(server,"sda1", "/md0/sda1", 5000D, 3000D, DEVICE_STATUS.INITIALIZED); + disk.setDescription("Hitachi HTS72323 ATA"); + disk.setFsType("ext4"); + disk.setFsVersion("3.2.3"); + disk.setType(DEVICE_TYPE.DATA); + } + + /** + * Perform post-test clean-up. + * + * @throws Exception + * if the clean-up fails for some reason + * + * @generatedBy CodePro at 10/19/11 6:26 PM + */ + @After + public void tearDown() + throws Exception { + // Add additional tear down code here + } + + /** + * Launch the test. + * + * @param args the command line arguments + * + * @generatedBy CodePro at 10/19/11 6:26 PM + */ + public static void main(String[] args) { + new org.junit.runner.JUnitCore().run(DiskTest.class); + } +}
\ No newline at end of file diff --git a/src/org.gluster.storage.management.core/junit/org/gluster/storage/management/core/model/TestAll.java b/src/org.gluster.storage.management.core/junit/org/gluster/storage/management/core/model/TestAll.java new file mode 100644 index 00000000..b4e26f8f --- /dev/null +++ b/src/org.gluster.storage.management.core/junit/org/gluster/storage/management/core/model/TestAll.java @@ -0,0 +1,53 @@ +/******************************************************************************* + * Copyright (c) 2006-2011 Gluster, Inc. <http://www.gluster.com> + * This file is part of Gluster Management Console. + * + * Gluster Management Console is free software; you can redistribute + * it and/or modify it under the terms of the GNU General Public + * License as published by the Free Software Foundation; either + * version 3 of the License, or (at your option) any later version. + * + * Gluster Management Console is distributed in the hope that it + * will be useful, but WITHOUT ANY WARRANTY; without even the + * implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR + * PURPOSE. See the GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program. If not, see + * <http://www.gnu.org/licenses/>. + *******************************************************************************/ +package org.gluster.storage.management.core.model; + +import org.junit.runner.JUnitCore; +import org.junit.runner.RunWith; +import org.junit.runners.Suite; + +/** + * The class <code>TestAll</code> builds a suite that can be used to run all + * of the tests within its package as well as within any subpackages of its + * package. + * + * @generatedBy CodePro at 10/19/11 6:26 PM + * @author root + * @version $Revision: 1.0 $ + */ +@RunWith(Suite.class) +@Suite.SuiteClasses({ + BrickTest.class, + ClusterTest.class, + AlertTest.class, + DiskTest.class, +}) +public class TestAll { + + /** + * Launch the test. + * + * @param args the command line arguments + * + * @generatedBy CodePro at 10/19/11 6:26 PM + */ + public static void main(String[] args) { + JUnitCore.runClasses(new Class[] { TestAll.class }); + } +} diff --git a/src/org.gluster.storage.management.core/junit/org/gluster/storage/management/core/utils/DateUtilTest.java b/src/org.gluster.storage.management.core/junit/org/gluster/storage/management/core/utils/DateUtilTest.java new file mode 100644 index 00000000..a2e29450 --- /dev/null +++ b/src/org.gluster.storage.management.core/junit/org/gluster/storage/management/core/utils/DateUtilTest.java @@ -0,0 +1,236 @@ +/******************************************************************************* + * Copyright (c) 2006-2011 Gluster, Inc. <http://www.gluster.com> + * This file is part of Gluster Management Console. + * + * Gluster Management Console is free software; you can redistribute + * it and/or modify it under the terms of the GNU General Public + * License as published by the Free Software Foundation; either + * version 3 of the License, or (at your option) any later version. + * + * Gluster Management Console is distributed in the hope that it + * will be useful, but WITHOUT ANY WARRANTY; without even the + * implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR + * PURPOSE. See the GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program. If not, see + * <http://www.gnu.org/licenses/>. + *******************************************************************************/ +package org.gluster.storage.management.core.utils; + +import static org.junit.Assert.assertEquals; + +import java.util.Date; + +import org.gluster.storage.management.core.constants.CoreConstants; +import org.gluster.storage.management.core.exceptions.GlusterRuntimeException; +import org.gluster.storage.management.core.utils.DateUtil; +import org.junit.After; +import org.junit.Before; +import org.junit.Test; + + +/** + * The class <code>DateUtilTest</code> contains tests for the class <code>{@link DateUtil}</code>. + * + * @generatedBy CodePro at 9/27/11 12:31 PM + * @author root + * @version $Revision: 1.0 $ + */ +public class DateUtilTest { + + private Date date = DateUtil.getDate(2011, 9, 29, 11, 17, 38, 10); + + /** + * Run the String dateToString(Date) method test. + * + * @throws Exception + * + * @generatedBy CodePro at 9/27/11 12:31 PM + */ + @Test + public void testDateToString_1() + throws Exception { + String result = DateUtil.dateToString(date); + + assertEquals("09/29/2011 11:17:38", result); + } + + /** + * Run the String dateToString(Date,String) method test. + * + * @throws Exception + * + * @generatedBy CodePro at 9/27/11 12:31 PM + */ + @Test + public void testDateToString_2() + throws Exception { + String dateFormat = ""; + + String result = DateUtil.dateToString(date, dateFormat); + assertEquals("", result); + } + + /** + * Run the String dateToString(Date,String) method test. + * + * @throws Exception + * + * @generatedBy CodePro at 9/27/11 12:31 PM + */ + @Test + public void testDateToString_3() + throws Exception { + String dateFormat = CoreConstants.PURE_DATE_FORMAT; + + String result = DateUtil.dateToString(date, dateFormat); + assertEquals("09/29/2011", result); + } + + /** + * Run the String formatDate(Date) method test. + * + * @throws Exception + * + * @generatedBy CodePro at 9/27/11 12:31 PM + */ + @Test + public void testFormatDate_1() + throws Exception { + String result = DateUtil.formatDate(date); + + assertEquals("09/29/2011", result); + } + + /** + * Run the String formatDate(Date) method test. + * + * @throws Exception + * + * @generatedBy CodePro at 9/27/11 12:31 PM + */ + @Test + public void testFormatDate_2() + throws Exception { + Date date1 = DateUtil.getDate(1965, 1, 12, 0, 0, 0, 0); + String result = DateUtil.formatDate(date1); + assertEquals("01/12/1965", result); + } + + /** + * Run the String formatTime(Date) method test. + * + * @throws Exception + * + * @generatedBy CodePro at 9/27/11 12:31 PM + */ + @Test + public void testFormatTime_1() + throws Exception { + String result = DateUtil.formatTime(date); + + // add additional test code here + assertEquals("11:17:38.010", result); + } + + /** + * Run the Date stringToDate(String) method test. + * + * @throws Exception + * + * @generatedBy CodePro at 9/27/11 12:31 PM + */ + @Test(expected=GlusterRuntimeException.class) + public void testStringToDate_1() + throws Exception { + DateUtil.stringToDate(""); + } + + /** + * Run the Date stringToDate(String) method test. + * + * @throws Exception + * + * @generatedBy CodePro at 9/27/11 12:31 PM + */ + @Test(expected=GlusterRuntimeException.class) + public void testStringToDate_2() + throws Exception { + String testDate = "09/29/2011"; + DateUtil.stringToDate(testDate); + } + + /** + * Run the Date stringToDate(String,String) method test. + * + * @throws Exception + * + * @generatedBy CodePro at 9/27/11 12:31 PM + */ + @Test + public void testStringToDate_3() + throws Exception { + String dateFormat = "MM/dd/yyyy"; + String input = "09/29/2011"; // MM/dd/yyyy HH:mm:ss + Date expectedDate = DateUtil.getDate(2011, 9, 29, 0, 0, 0, 0); + + Date result = DateUtil.stringToDate(input, dateFormat); + assertEquals(expectedDate, result); + } + + /** + * Run the Date stringToDate(String,String) method test. + * + * @throws Exception + * + * @generatedBy CodePro at 9/27/11 12:31 PM + */ + @Test(expected = GlusterRuntimeException.class) + public void testStringToDate_4() + throws Exception { + String inputDate = ""; + String dateFormat = ""; + + DateUtil.stringToDate(inputDate, dateFormat); + } + + /** + * Perform pre-test initialization. + * + * @throws Exception + * if the initialization fails for some reason + * + * @generatedBy CodePro at 9/27/11 12:31 PM + */ + @Before + public void setUp() + throws Exception { + // add additional set up code here + } + + /** + * Perform post-test clean-up. + * + * @throws Exception + * if the clean-up fails for some reason + * + * @generatedBy CodePro at 9/27/11 12:31 PM + */ + @After + public void tearDown() + throws Exception { + // Add additional tear down code here + } + + /** + * Launch the test. + * + * @param args the command line arguments + * + * @generatedBy CodePro at 9/27/11 12:31 PM + */ + public static void main(String[] args) { + new org.junit.runner.JUnitCore().run(DateUtilTest.class); + } +}
\ No newline at end of file diff --git a/src/org.gluster.storage.management.core/junit/org/gluster/storage/management/core/utils/FileUtilTest.java b/src/org.gluster.storage.management.core/junit/org/gluster/storage/management/core/utils/FileUtilTest.java new file mode 100644 index 00000000..0418acf9 --- /dev/null +++ b/src/org.gluster.storage.management.core/junit/org/gluster/storage/management/core/utils/FileUtilTest.java @@ -0,0 +1,500 @@ +/******************************************************************************* + * Copyright (c) 2006-2011 Gluster, Inc. <http://www.gluster.com> + * This file is part of Gluster Management Console. + * + * Gluster Management Console is free software; you can redistribute + * it and/or modify it under the terms of the GNU General Public + * License as published by the Free Software Foundation; either + * version 3 of the License, or (at your option) any later version. + * + * Gluster Management Console is distributed in the hope that it + * will be useful, but WITHOUT ANY WARRANTY; without even the + * implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR + * PURPOSE. See the GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program. If not, see + * <http://www.gnu.org/licenses/>. + *******************************************************************************/ +package org.gluster.storage.management.core.utils; + +import static org.junit.Assert.*; + +import java.io.BufferedWriter; +import java.io.File; +import java.io.FileWriter; +import java.io.IOException; +import java.io.Writer; + +import org.gluster.storage.management.core.exceptions.GlusterRuntimeException; +import org.gluster.storage.management.core.utils.FileUtil; +import org.junit.After; +import org.junit.Before; +import org.junit.Test; + + + +/** + * The class <code>FileUtilTest</code> contains tests for the class <code>{@link FileUtil}</code>. + * + * @generatedBy CodePro at 9/29/11 2:39 PM + * @author root + * @version $Revision: 1.0 $ + */ +public class FileUtilTest { + + + private static final String TEST_FILE_PATH = FileUtil.getTempDirName() + "/test.txt"; + private static final String TEST_FILE_CONTENT = "Welcome to Gluster Storage Management console."; + + + /** + * To write the text into given file. + * + * @generatedBy + */ + private boolean writeToFile(String fileName, String text) { + try { + Writer output = null; + File file = new File(fileName); + output = new BufferedWriter(new FileWriter(file)); + output.write(text); + output.close(); + return true; + } catch (Exception e) { + return false; + } + } + + private boolean createNestedDir(String path) { + File file = new File(path); + return file.mkdirs(); + } + + private boolean createEmptyFile(String fileName) { + File file = new File(fileName); + if (file.exists()) { + return true; + } + + try { + return file.createNewFile(); + } catch (IOException e) { + return false; + } + } + + /** + * Run the File createTempDir() method test. + * + * @throws Exception + * + * @generatedBy CodePro at 9/29/11 2:39 PM + */ + @Test + public void testCreateTempDir_1() + throws Exception { + + File result = FileUtil.createTempDir(); + + assertNotNull(result); + assertTrue(File.class.equals(result.getClass())); + } + + /** + * Run the File createTempDir() method test. + * + * @throws Exception + * + * @generatedBy CodePro at 9/29/11 2:39 PM + */ + @Test + public void testCreateTempDir_2() + throws Exception { + + File result1 = FileUtil.createTempDir(); + File result2 = FileUtil.createTempDir(); + + assertNotSame(result1, result2); + } + + + /** + * Run the void createTextFile(String,String) method test. + * + * @throws Exception + * + * @generatedBy CodePro at 9/29/11 2:39 PM + */ + @Test(expected=GlusterRuntimeException.class) + public void testCreateTextFile_1() + throws Exception { + String fileName = ""; + String contents = ""; + FileUtil.createTextFile(fileName, contents); + } + + /** + * Run the String getTempDirName() method test. + * + * @throws Exception + * + * @generatedBy CodePro at 9/29/11 2:39 PM + */ + @Test + public void testGetTempDirName_1() + throws Exception { + String result = FileUtil.getTempDirName(); + + // while running on linux + assertEquals("/tmp", result); + } + + /** + * Run the byte[] readFileAsByteArray(File) method test. + * + * @throws Exception + * + * @generatedBy CodePro at 9/29/11 2:39 PM + */ + + @Test(expected=GlusterRuntimeException.class) + public void testReadFileAsByteArray_1() + throws Exception { + File file = new File(""); + + FileUtil.readFileAsByteArray(file); + } + + /** + * Run the byte[] readFileAsByteArray(File) method test. + * + * @throws Exception + * + * @generatedBy CodePro at 9/29/11 2:39 PM + */ + @Test + public void testReadFileAsByteArray_2() + throws Exception { + File file = new File(TEST_FILE_PATH); + + byte[] result = FileUtil.readFileAsByteArray(file); + assertNotNull(result); + assertTrue(result instanceof byte[]); + assertTrue(TEST_FILE_CONTENT.equals(new String(result))); + } + + + /** + * Run the String readFileAsString(File) method test. + * + * @throws Exception + * + * @generatedBy CodePro at 9/29/11 2:39 PM + */ + + @Test(expected=GlusterRuntimeException.class) + public void testReadFileAsString_1() + throws Exception { + File file = new File(""); + + FileUtil.readFileAsString(file); + } + + + /** + * Run the String readFileAsString(File) method test. + * + * @throws Exception + * + * @generatedBy CodePro at 9/29/11 2:39 PM + */ + @Test + public void testReadFileAsString_2() + throws Exception { + File file = new File(TEST_FILE_PATH); + String result = FileUtil.readFileAsString(file); + + assertNotNull(result); + assertTrue(result instanceof String); + assertTrue(result.equals(TEST_FILE_CONTENT)); + } + + /** + * Run the void recursiveDelete(File) method test. + * + * @throws Exception + * + * @generatedBy CodePro at 9/29/11 2:39 PM + */ + @Test + public void testRecursiveDelete_1() + throws Exception { + + //Delete empty directories recursively + File fileOrDir = new File(FileUtil.getTempDirName() + "/rd"); + + FileUtil.recursiveDelete(fileOrDir); + assertTrue(!fileOrDir.exists()); + } + + /** + * Run the void recursiveDelete(File) method test. + * + * @throws Exception + * + * @generatedBy CodePro at 9/29/11 2:39 PM + */ + + @Test(expected=GlusterRuntimeException.class) + public void testRecursiveDelete_2() + throws Exception { + //Delete directories recursively (with some files) + File fileOrDir = new File(FileUtil.getTempDirName() + "/rdx"); + + FileUtil.recursiveDelete(fileOrDir); + assertTrue(!fileOrDir.exists()); + } + + /** + * Run the void recursiveDelete(File) method test. + * + * @throws Exception + * + * @generatedBy CodePro at 9/29/11 2:39 PM + */ + @Test + public void testRecursiveDelete_3() + throws Exception { + File fileOrDir = new File(FileUtil.getTempDirName() + "/rd"); + FileUtil.recursiveDelete(fileOrDir); + assertTrue(!fileOrDir.exists()); + } + + /** + * Run the void recursiveDelete(File) method test. + * + * @throws Exception + * + * @generatedBy CodePro at 9/29/11 2:39 PM + */ + @Test + public void testRecursiveDelete_4() + throws Exception { + File file = new File(FileUtil.getTempDirName() + "/rd/b/bc/mydoc.txt"); + assertTrue(!file.exists()); + + file = new File(FileUtil.getTempDirName() + "/rd//b/bc"); + assertTrue(!file.exists()); + } + + /** + * Run the void recursiveDelete(File) method test. + * + * @throws Exception + * + * @generatedBy CodePro at 9/29/11 2:39 PM + */ + @Test(expected=GlusterRuntimeException.class) + public void testRecursiveDelete_5() + throws Exception { + File fileOrDir = new File(FileUtil.getTempDirName() + "/rd/*"); //Wild cards + FileUtil.recursiveDelete(fileOrDir); + } + + + /** + * Run the void recursiveDelete(File) method test. + * + * @throws Exception + * + * @generatedBy CodePro at 9/29/11 2:39 PM + */ + @Test(expected=GlusterRuntimeException.class) + public void testRecursiveDelete_6() + throws Exception { + File fileOrDir = new File(FileUtil.getTempDirName() + "/abcxyz"); + FileUtil.recursiveDelete(fileOrDir); + } + + /** + * Run the void renameFile(String,String) method test. + * + * @throws Exception + * + * @generatedBy CodePro at 9/29/11 2:39 PM + */ + + @Test(expected=GlusterRuntimeException.class) + public void testRenameFile_1() + throws Exception { + String fromPath = FileUtil.getTempDirName() + "/test.txt"; + new File(fromPath).createNewFile(); + String toPath = "~/abc.txt"; // Relative path + + FileUtil.renameFile(fromPath, toPath); + assertTrue(!new File(fromPath).exists()); + assertTrue(new File(toPath).exists()); + } + + /** + * Run the void renameFile(String,String) method test. + * + * @throws Exception + * + * @generatedBy CodePro at 9/29/11 2:39 PM + */ + @Test + public void testRenameFile_2() + throws Exception { + String fromPath = FileUtil.getTempDirName() + "/test.txt"; + new File(fromPath).createNewFile(); + + String toPath = FileUtil.getTempDirName() + "/abc.txt"; // Absolute path example + FileUtil.renameFile(fromPath, toPath); + assertTrue(!new File(fromPath).exists()); + assertTrue(new File(toPath).exists()); + } + + @Test + public void testRenameFile_3() + throws Exception { + String fromPath = FileUtil.getTempDirName() + "/test.txt"; + new File(fromPath).createNewFile(); + + String toPath = FileUtil.getTempDirName() + "/renamefile.txt"; + FileUtil.renameFile(fromPath, toPath); + assertTrue(!new File(fromPath).exists()); + assertTrue(new File(toPath).exists()); + } + + /** + * Perform pre-test initialization. + * + * @throws Exception + * if the initialization fails for some reason + * + * @generatedBy CodePro at 9/29/11 2:39 PM + */ + @Before + public void setUp() + throws Exception { + + // testReadFileAsByteArray_2() + if (!writeToFile(TEST_FILE_PATH, TEST_FILE_CONTENT)) { + fail("Setup: Text file creation error!"); + } + + // testRecursiveDelete_1() + if (!createNestedDir(FileUtil.getTempDirName() + "/rd/b/c/d")) { + createEmptyFile(FileUtil.getTempDirName() + "/rd/b/mydoc.txt"); + createEmptyFile(FileUtil.getTempDirName() + "/rd/b/songs.mp3"); + createEmptyFile(FileUtil.getTempDirName() + "/rd/b/mysetup.cfg"); + + createEmptyFile(FileUtil.getTempDirName() + "/rd/b/bc/mydoc.txt"); + createEmptyFile(FileUtil.getTempDirName() + "/rd/songs.mp3"); + createEmptyFile(FileUtil.getTempDirName() + "/rd/b/bc/mysetup.cfg"); + + createEmptyFile(FileUtil.getTempDirName() + "/rd//b/mydoc.txt"); + createEmptyFile(FileUtil.getTempDirName() + "/rd/b/bc/songs.mp3"); + + } + + if (! createEmptyFile(FileUtil.getTempDirName() + "/renamefile.txt") ) { + fail("Failed to create file [/renamefile.txt]"); + } + } + + /** + * Perform post-test clean-up. + * + * @throws Exception + * if the clean-up fails for some reason + * + * @generatedBy CodePro at 9/29/11 2:39 PM + */ + @After + public void tearDown() + throws Exception { + File file = new File(TEST_FILE_PATH); + file.delete(); + file = new File(FileUtil.getTempDirName() + "/rd/b/c/d"); + if (file.exists()) { + file.delete(); + } + + file = new File(FileUtil.getTempDirName() + "/rd/b/c"); + if (file.exists()) { + file.delete(); + } + + file = new File(FileUtil.getTempDirName() + "/rd/b/mydoc.txt"); + if (file.exists()) { + file.delete(); + } + file = new File(FileUtil.getTempDirName() + "/rd/b/songs.mp3"); + if (file.exists()) { + file.delete(); + } + file = new File(FileUtil.getTempDirName() + "/rd/b/mysetup.cfg"); + if (file.exists()) { + file.delete(); + } + + file = new File(FileUtil.getTempDirName() + "/rd/b/bc/mydoc.txt"); + if (file.exists()) { + file.delete(); + } + file = new File(FileUtil.getTempDirName() + "/rd/b/bc/mysetup.cfg"); + if (file.exists()) { + file.delete(); + } + file = new File(FileUtil.getTempDirName() + "/rd/b/bc/songs.mp3"); + if (file.exists()) { + file.delete(); + } + + file = new File(FileUtil.getTempDirName() + "/rd/b/bc"); + if (file.exists()) { + file.delete(); + } + + file = new File(FileUtil.getTempDirName() + "/rd/b"); + if (file.exists()) { + file.delete(); + } + + file = new File(FileUtil.getTempDirName() + "/rd"); + if (file.exists()) { + file.delete(); + } + + file = new File(FileUtil.getTempDirName() + "/abc.txt"); + if (file.exists()) { + file.delete(); + } + file = new File("~/abc.txt"); + if (file.exists()) { + file.delete(); + } + file = new File(FileUtil.getTempDirName() + "/test.txt"); + if (file.exists()) { + file.delete(); + } + file = new File(FileUtil.getTempDirName() + "/renamefile.txt"); + if (file.exists()) { + file.delete(); + } + } + + /** + * Launch the test. + * + * @param args the command line arguments + * + * @generatedBy CodePro at 9/29/11 2:39 PM + */ + public static void main(String[] args) { + new org.junit.runner.JUnitCore().run(FileUtilTest.class); + } +}
\ No newline at end of file diff --git a/src/org.gluster.storage.management.core/junit/org/gluster/storage/management/core/utils/StringUtilTest.java b/src/org.gluster.storage.management.core/junit/org/gluster/storage/management/core/utils/StringUtilTest.java new file mode 100644 index 00000000..d428eae4 --- /dev/null +++ b/src/org.gluster.storage.management.core/junit/org/gluster/storage/management/core/utils/StringUtilTest.java @@ -0,0 +1,327 @@ +/******************************************************************************* + * Copyright (c) 2006-2011 Gluster, Inc. <http://www.gluster.com> + * This file is part of Gluster Management Console. + * + * Gluster Management Console is free software; you can redistribute + * it and/or modify it under the terms of the GNU General Public + * License as published by the Free Software Foundation; either + * version 3 of the License, or (at your option) any later version. + * + * Gluster Management Console is distributed in the hope that it + * will be useful, but WITHOUT ANY WARRANTY; without even the + * implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR + * PURPOSE. See the GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program. If not, see + * <http://www.gnu.org/licenses/>. + *******************************************************************************/ +package org.gluster.storage.management.core.utils; + +import static org.junit.Assert.assertEquals; +import static org.junit.Assert.assertNotNull; + +import java.util.ArrayList; +import java.util.List; +import java.util.Map; + +import org.gluster.storage.management.core.utils.StringUtil; +import org.junit.After; +import org.junit.Before; +import org.junit.Test; + + +/** + * The class <code>StringUtilTest</code> contains tests for the class <code>{@link StringUtil}</code>. + * + * @generatedBy CodePro at 21/9/11 4:53 PM + * @author root + * @version $Revision: 1.0 $ + */ +public class StringUtilTest { + public enum Season { WINTER, SPRING, SUMMER, FALL }; + /** + * Run the String collectionToString(Collection<? extends Object>,String) method test. + * + * @throws Exception + * + * @generatedBy CodePro at 21/9/11 4:53 PM + */ + @Test + public void testCollectionToString_1() + throws Exception { + List<String> string = new ArrayList<String>(); + string.add("test string"); + String delimiter = ""; + + String result = StringUtil.collectionToString(string, delimiter); + assertEquals("test string", result); + } + + /** + * Run the String collectionToString(Collection<? extends Object>,String) method test. + * + * @throws Exception + * + * @generatedBy CodePro at 21/9/11 4:53 PM + */ + @Test + public void testCollectionToString_2() + throws Exception { + List<String> string = new ArrayList<String>(); + string.add("test string"); + string.add("welcome to world"); + String delimiter = "::"; + + String result = StringUtil.collectionToString(string, delimiter); + + assertEquals("test string::welcome to world", result); + } + + /** + * Run the String collectionToString(Collection<? extends Object>,String) method test. + * + * @throws Exception + * + * @generatedBy CodePro at 21/9/11 4:53 PM + */ + @Test + public void testCollectionToString_3() + throws Exception { + List<String> string = new ArrayList<String>(); + string.add("test ## string"); + string.add("java world"); + String delimiter = "##"; + + String result = StringUtil.collectionToString(string, delimiter); + assertEquals("test ## string##java world", result); + } + + /** + * Run the String collectionToString(Collection<? extends Object>,String) method test. + * + * @throws Exception + * + * @generatedBy CodePro at 21/9/11 4:53 PM + */ + @Test + public void testCollectionToString_4() + throws Exception { + List<String> string = new ArrayList<String>(); + String delimiter = ""; + + String result = StringUtil.collectionToString(string, delimiter); + assertEquals("", result); + } + + /** + * Run the List<String> enumToArray(T[]) method test. + * + * @throws Exception + * + * @generatedBy CodePro at 21/9/11 4:53 PM + */ + @Test + public void testEnumToArray_1() + throws Exception { + + List<String> result = StringUtil.enumToArray(Season.values()); + + assertNotNull(result); + assertEquals(4, result.size()); + } + + /** + * Run the List<String> extractList(String,String) method test. + * + * @throws Exception + * + * @generatedBy CodePro at 21/9/11 4:53 PM + */ + @Test + public void testExtractList_1() + throws Exception { + String input = "This is test message"; + String delim = " "; + + List<String> result = StringUtil.extractList(input, delim); + + assertNotNull(result); + assertEquals(4, result.size()); + } + + /** + * Run the List<String> extractList(String,String) method test. + * + * @throws Exception + * + * @generatedBy CodePro at 21/9/11 4:53 PM + */ + @Test + public void testExtractList_2() + throws Exception { + String input = "welcome#to#java#world"; + String delim = "#"; + + List<String> result = StringUtil.extractList(input, delim); + + assertNotNull(result); + assertEquals(4, result.size()); + } + + /** + * Run the List<String> extractList(String,String) method test. + * + * @throws Exception + * + * @generatedBy CodePro at 21/9/11 4:53 PM + */ + @Test + public void testExtractList_3() + throws Exception { + String input = "list$to%string"; + String delim = "%"; + + List<String> result = StringUtil.extractList(input, delim); + + assertNotNull(result); + assertEquals(2, result.size()); + } + + /** + * Run the Map<String, String> extractMap(String,String,String) method test. + * + * @throws Exception + * + * @generatedBy CodePro at 21/9/11 4:53 PM + */ + @Test + public void testExtractMap_1() + throws Exception { + String input = "k1=v1,k2=v2,k3=v3"; + String majorDelim = ","; + String minorDelim = "="; + + Map<String, String> result = StringUtil.extractMap(input, majorDelim, minorDelim); + + // add additional test code here + assertNotNull(result); + assertEquals(3, result.size()); + } + + /** + * Run the Map<String, String> extractMap(String,String,String) method test. + * + * @throws Exception + * + * @generatedBy CodePro at 21/9/11 4:53 PM + */ + @Test + public void testExtractMap_2() + throws Exception { + String input = "k1=>v1&k2=>v2&k3=>v3"; + String majorDelim = "&"; + String minorDelim = "=>"; + + Map<String, String> result = StringUtil.extractMap(input, majorDelim, minorDelim); + + // add additional test code here + assertNotNull(result); + assertEquals(3, result.size()); + } + + /** + * Run the boolean filterString(String,String,boolean) method test. + * + * @throws Exception + * + * @generatedBy CodePro at 21/9/11 4:53 PM + */ + @Test + public void testFilterString_1() + throws Exception { + String sourceString = "This is java program"; + String filterString = "Java"; + boolean caseSensitive = true; + + boolean result = StringUtil.filterString(sourceString, filterString, caseSensitive); + + assertEquals(false, result); + } + + /** + * Run the boolean filterString(String,String,boolean) method test. + * + * @throws Exception + * + * @generatedBy CodePro at 21/9/11 4:53 PM + */ + @Test + public void testFilterString_2() + throws Exception { + String sourceString = "This is java program"; + String filterString = "Java"; + boolean caseSensitive = false; + + boolean result = StringUtil.filterString(sourceString, filterString, caseSensitive); + + assertEquals(true, result); + } + + /** + * Run the String removeSpaces(String) method test. + * + * @throws Exception + * + * @generatedBy CodePro at 21/9/11 4:53 PM + */ + @Test + public void testRemoveSpaces_1() + throws Exception { + String str = "this is test string"; + + String result = StringUtil.removeSpaces(str); + + // add additional test code here + assertEquals("thisisteststring", result); + } + + /** + * Perform pre-test initialization. + * + * @throws Exception + * if the initialization fails for some reason + * + * @generatedBy CodePro at 21/9/11 4:53 PM + */ + @Before + public void setUp() + throws Exception { + // add additional set up code here + } + + /** + * Perform post-test clean-up. + * + * @throws Exception + * if the clean-up fails for some reason + * + * @generatedBy CodePro at 21/9/11 4:53 PM + */ + @After + public void tearDown() + throws Exception { + // Add additional tear down code here + } + + /** + * Launch the test. + * + * @param args the command line arguments + * + * @generatedBy CodePro at 21/9/11 4:53 PM + */ + public static void main(String[] args) { + new org.junit.runner.JUnitCore().run(StringUtilTest.class); + } +}
\ No newline at end of file diff --git a/src/com.gluster.storage.management.core/junit/test/test.txt b/src/org.gluster.storage.management.core/junit/test/test.txt index 267ce144..267ce144 100644 --- a/src/com.gluster.storage.management.core/junit/test/test.txt +++ b/src/org.gluster.storage.management.core/junit/test/test.txt diff --git a/src/com.gluster.storage.management.gateway/WebContent/META-INF/MANIFEST.MF b/src/org.gluster.storage.management.core/src/META-INF/MANIFEST.MF index 5e949512..5e949512 100644 --- a/src/com.gluster.storage.management.gateway/WebContent/META-INF/MANIFEST.MF +++ b/src/org.gluster.storage.management.core/src/META-INF/MANIFEST.MF diff --git a/src/com.gluster.storage.management.core/src/com/gluster/storage/management/core/constants/CoreConstants.java b/src/org.gluster.storage.management.core/src/org/gluster/storage/management/core/constants/CoreConstants.java index 42f0e7a9..4aa7500e 100644 --- a/src/com.gluster.storage.management.core/src/com/gluster/storage/management/core/constants/CoreConstants.java +++ b/src/org.gluster.storage.management.core/src/org/gluster/storage/management/core/constants/CoreConstants.java @@ -1,22 +1,22 @@ /******************************************************************************* - * Copyright (c) 2011 Gluster, Inc. <http://www.gluster.com> + * Copyright (c) 2006-2011 Gluster, Inc. <http://www.gluster.com> * This file is part of Gluster Management Console. * - * Gluster Management Console is free software; you can redistribute it and/or - * modify it under the terms of the GNU Affero General Public License as published - * by the Free Software Foundation; either version 3 of the License, or - * (at your option) any later version. - * - * Gluster Management Console is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY - * or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Affero General Public License - * for more details. - * - * You should have received a copy of the GNU Affero General Public License - * along with this program. If not, see + * Gluster Management Console is free software; you can redistribute + * it and/or modify it under the terms of the GNU General Public + * License as published by the Free Software Foundation; either + * version 3 of the License, or (at your option) any later version. + * + * Gluster Management Console is distributed in the hope that it + * will be useful, but WITHOUT ANY WARRANTY; without even the + * implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR + * PURPOSE. See the GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program. If not, see * <http://www.gnu.org/licenses/>. *******************************************************************************/ -package com.gluster.storage.management.core.constants; +package org.gluster.storage.management.core.constants; /** diff --git a/src/com.gluster.storage.management.core/src/com/gluster/storage/management/core/constants/GlusterConstants.java b/src/org.gluster.storage.management.core/src/org/gluster/storage/management/core/constants/GlusterConstants.java index cbc51b10..615a6849 100644 --- a/src/com.gluster.storage.management.core/src/com/gluster/storage/management/core/constants/GlusterConstants.java +++ b/src/org.gluster.storage.management.core/src/org/gluster/storage/management/core/constants/GlusterConstants.java @@ -1,26 +1,27 @@ /******************************************************************************* - * Copyright (c) 2011 Gluster, Inc. <http://www.gluster.com> + * Copyright (c) 2006-2011 Gluster, Inc. <http://www.gluster.com> * This file is part of Gluster Management Console. * - * Gluster Management Console is free software; you can redistribute it and/or - * modify it under the terms of the GNU Affero General Public License as published - * by the Free Software Foundation; either version 3 of the License, or - * (at your option) any later version. - * - * Gluster Management Console is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY - * or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Affero General Public License - * for more details. - * - * You should have received a copy of the GNU Affero General Public License - * along with this program. If not, see + * Gluster Management Console is free software; you can redistribute + * it and/or modify it under the terms of the GNU General Public + * License as published by the Free Software Foundation; either + * version 3 of the License, or (at your option) any later version. + * + * Gluster Management Console is distributed in the hope that it + * will be useful, but WITHOUT ANY WARRANTY; without even the + * implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR + * PURPOSE. See the GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program. If not, see * <http://www.gnu.org/licenses/>. *******************************************************************************/ -package com.gluster.storage.management.core.constants; +package org.gluster.storage.management.core.constants; import java.util.List; -import com.gluster.storage.management.core.utils.StringUtil; +import org.gluster.storage.management.core.utils.StringUtil; + /** * diff --git a/src/com.gluster.storage.management.core/src/com/gluster/storage/management/core/constants/RESTConstants.java b/src/org.gluster.storage.management.core/src/org/gluster/storage/management/core/constants/RESTConstants.java index faddb1c6..bd4b283b 100644 --- a/src/com.gluster.storage.management.core/src/com/gluster/storage/management/core/constants/RESTConstants.java +++ b/src/org.gluster.storage.management.core/src/org/gluster/storage/management/core/constants/RESTConstants.java @@ -1,24 +1,22 @@ -/** - * RESTConstants.java - * - * Copyright (c) 2011 Gluster, Inc. <http://www.gluster.com> +/******************************************************************************* + * Copyright (c) 2006-2011 Gluster, Inc. <http://www.gluster.com> * This file is part of Gluster Management Console. * - * Gluster Management Console is free software; you can redistribute it and/or - * modify it under the terms of the GNU Affero General Public License as published - * by the Free Software Foundation; either version 3 of the License, or - * (at your option) any later version. + * Gluster Management Console is free software; you can redistribute + * it and/or modify it under the terms of the GNU General Public + * License as published by the Free Software Foundation; either + * version 3 of the License, or (at your option) any later version. * - * Gluster Management Console is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY - * or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Affero General Public License - * for more details. + * Gluster Management Console is distributed in the hope that it + * will be useful, but WITHOUT ANY WARRANTY; without even the + * implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR + * PURPOSE. See the GNU General Public License for more details. * - * You should have received a copy of the GNU Affero General Public License - * along with this program. If not, see + * You should have received a copy of the GNU General Public License + * along with this program. If not, see * <http://www.gnu.org/licenses/>. - */ -package com.gluster.storage.management.core.constants; + *******************************************************************************/ +package org.gluster.storage.management.core.constants; /** * All constants related to the Gluster REST server and client @@ -44,6 +42,7 @@ public class RESTConstants { public static final String RESOURCE_KEYS = "keys"; public static final String RESOURCE_STATISTICS = "statistics"; public static final String RESOURCE_USERS = "users"; + public static final String RESOURCE_FSTYPES = "fstypes"; public static final String TASK_START = "start"; public static final String TASK_PAUSE = "pause"; @@ -52,11 +51,12 @@ public class RESTConstants { public static final String TASK_COMMIT = "commit"; public static final String TASK_STATUS = "status"; public static final String TASK_DELETE = "delete"; + public static final String TASK_LOG_ROTATE = "logRotate"; public static final String TASK_REBALANCE_START = "rebalanceStart"; public static final String TASK_REBALANCE_STATUS = "rebalanceStatus"; public static final String TASK_REBALANCE_STOP = "rebalanceStop"; - public static final String FORM_PARAM_VOLUME_NAME = "name"; + public static final String FORM_PARAM_VOLUME_NAME = "volumeName"; public static final String FORM_PARAM_VOLUME_TYPE = "volumeType"; public static final String FORM_PARAM_TRANSPORT_TYPE = "transportType"; public static final String FORM_PARAM_REPLICA_COUNT = "replicaCount"; @@ -68,6 +68,7 @@ public class RESTConstants { public static final String FORM_PARAM_CIFS_ENABLE = "enableCifs"; public static final String FORM_PARAM_CIFS_USERS = "cifsUsers"; public static final String FORM_PARAM_CIFS_CONFIG = "cifsConfig"; + public static final String FORM_PARAM_LOG_ROTATE = "logRotate"; public static final String FORM_PARAM_CLUSTER_NAME = "clusterName"; public static final String FORM_PARAM_SERVER_NAME = "serverName"; @@ -79,11 +80,13 @@ public class RESTConstants { public static final String FORM_PARAM_SOURCE = "source"; public static final String FORM_PARAM_TARGET = "target"; public static final String FORM_PARAM_AUTO_COMMIT = "autoCommit"; - public static final String FORM_PARAM_FIX_LAYOUT = "fix-layout"; - public static final String FORM_PARAM_MIGRATE_DATA = "migrate-data"; - public static final String FORM_PARAM_FORCED_DATA_MIGRATE = "forced-data-migrate"; + public static final String FORM_PARAM_FIX_LAYOUT = "fixLayout"; + public static final String FORM_PARAM_MIGRATE_DATA = "migrateData"; + public static final String FORM_PARAM_FORCED_DATA_MIGRATE = "forcedDataMigrate"; public static final String FORM_PARAM_OLD_PASSWORD = "oldPassword"; public static final String FORM_PARAM_NEW_PASSWORD = "newPassword"; + public static final String FORM_PARAM_FORCE = "force"; + public static final String FORM_PARAM_MOUNTPOINT = "mountPoint"; public static final String PATH_PARAM_FORMAT = "format"; public static final String PATH_PARAM_VOLUME_NAME = "volumeName"; @@ -98,10 +101,10 @@ public class RESTConstants { public static final String QUERY_PARAM_BRICKS = "bricks"; public static final String QUERY_PARAM_LINE_COUNT = "lineCount"; public static final String QUERY_PARAM_VOLUME_NAME = "volumeName"; - public static final String QUERY_PARAM_DELETE_OPTION = "deleteOption"; + public static final String QUERY_PARAM_DELETE_OPTION = "deleteData"; public static final String QUERY_PARAM_LOG_SEVERITY = "severity"; - public static final String QUERY_PARAM_FROM_TIMESTAMP = "fromTimestamp"; - public static final String QUERY_PARAM_TO_TIMESTAMP = "toTimestamp"; + public static final String QUERY_PARAM_FROM_TIMESTAMP = "fromTimeStamp"; + public static final String QUERY_PARAM_TO_TIMESTAMP = "toTimeStamp"; public static final String QUERY_PARAM_DOWNLOAD = "download"; public static final String QUERY_PARAM_SERVER_NAME = "serverName"; public static final String QUERY_PARAM_DETAILS = "details"; diff --git a/src/com.gluster.storage.management.core/src/com/gluster/storage/management/core/exceptions/ConnectionException.java b/src/org.gluster.storage.management.core/src/org/gluster/storage/management/core/exceptions/ConnectionException.java index ec19ffd8..e98e260c 100644 --- a/src/com.gluster.storage.management.core/src/com/gluster/storage/management/core/exceptions/ConnectionException.java +++ b/src/org.gluster.storage.management.core/src/org/gluster/storage/management/core/exceptions/ConnectionException.java @@ -1,22 +1,22 @@ /******************************************************************************* - * Copyright (c) 2011 Gluster, Inc. <http://www.gluster.com> + * Copyright (c) 2006-2011 Gluster, Inc. <http://www.gluster.com> * This file is part of Gluster Management Console. * - * Gluster Management Console is free software; you can redistribute it and/or - * modify it under the terms of the GNU Affero General Public License as published - * by the Free Software Foundation; either version 3 of the License, or - * (at your option) any later version. - * - * Gluster Management Console is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY - * or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Affero General Public License - * for more details. - * - * You should have received a copy of the GNU Affero General Public License - * along with this program. If not, see + * Gluster Management Console is free software; you can redistribute + * it and/or modify it under the terms of the GNU General Public + * License as published by the Free Software Foundation; either + * version 3 of the License, or (at your option) any later version. + * + * Gluster Management Console is distributed in the hope that it + * will be useful, but WITHOUT ANY WARRANTY; without even the + * implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR + * PURPOSE. See the GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program. If not, see * <http://www.gnu.org/licenses/>. *******************************************************************************/ -package com.gluster.storage.management.core.exceptions; +package org.gluster.storage.management.core.exceptions; /** * diff --git a/src/com.gluster.storage.management.core/src/com/gluster/storage/management/core/exceptions/GlusterRuntimeException.java b/src/org.gluster.storage.management.core/src/org/gluster/storage/management/core/exceptions/GlusterRuntimeException.java index e7e604fc..a754c049 100644 --- a/src/com.gluster.storage.management.core/src/com/gluster/storage/management/core/exceptions/GlusterRuntimeException.java +++ b/src/org.gluster.storage.management.core/src/org/gluster/storage/management/core/exceptions/GlusterRuntimeException.java @@ -1,22 +1,22 @@ /******************************************************************************* - * Copyright (c) 2011 Gluster, Inc. <http://www.gluster.com> + * Copyright (c) 2006-2011 Gluster, Inc. <http://www.gluster.com> * This file is part of Gluster Management Console. * - * Gluster Management Console is free software; you can redistribute it and/or - * modify it under the terms of the GNU Affero General Public License as published - * by the Free Software Foundation; either version 3 of the License, or - * (at your option) any later version. - * - * Gluster Management Console is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY - * or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Affero General Public License - * for more details. - * - * You should have received a copy of the GNU Affero General Public License - * along with this program. If not, see + * Gluster Management Console is free software; you can redistribute + * it and/or modify it under the terms of the GNU General Public + * License as published by the Free Software Foundation; either + * version 3 of the License, or (at your option) any later version. + * + * Gluster Management Console is distributed in the hope that it + * will be useful, but WITHOUT ANY WARRANTY; without even the + * implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR + * PURPOSE. See the GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program. If not, see * <http://www.gnu.org/licenses/>. *******************************************************************************/ -package com.gluster.storage.management.core.exceptions; +package org.gluster.storage.management.core.exceptions; public class GlusterRuntimeException extends RuntimeException { private static final long serialVersionUID = 1L; diff --git a/src/org.gluster.storage.management.core/src/org/gluster/storage/management/core/exceptions/GlusterValidationException.java b/src/org.gluster.storage.management.core/src/org/gluster/storage/management/core/exceptions/GlusterValidationException.java new file mode 100644 index 00000000..79a50ea1 --- /dev/null +++ b/src/org.gluster.storage.management.core/src/org/gluster/storage/management/core/exceptions/GlusterValidationException.java @@ -0,0 +1,27 @@ +/******************************************************************************* + * Copyright (c) 2006-2011 Gluster, Inc. <http://www.gluster.com> + * This file is part of Gluster Management Console. + * + * Gluster Management Console is free software; you can redistribute + * it and/or modify it under the terms of the GNU General Public + * License as published by the Free Software Foundation; either + * version 3 of the License, or (at your option) any later version. + * + * Gluster Management Console is distributed in the hope that it + * will be useful, but WITHOUT ANY WARRANTY; without even the + * implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR + * PURPOSE. See the GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program. If not, see + * <http://www.gnu.org/licenses/>. + *******************************************************************************/ +package org.gluster.storage.management.core.exceptions; + +public class GlusterValidationException extends GlusterRuntimeException { + private static final long serialVersionUID = 1L; + + public GlusterValidationException(String message) { + super(message); + } +} diff --git a/src/com.gluster.storage.management.core/src/com/gluster/storage/management/core/model/Alert.java b/src/org.gluster.storage.management.core/src/org/gluster/storage/management/core/model/Alert.java index a29c150b..f55c9d35 100644 --- a/src/com.gluster.storage.management.core/src/com/gluster/storage/management/core/model/Alert.java +++ b/src/org.gluster.storage.management.core/src/org/gluster/storage/management/core/model/Alert.java @@ -1,15 +1,34 @@ -package com.gluster.storage.management.core.model; +/******************************************************************************* + * Copyright (c) 2006-2011 Gluster, Inc. <http://www.gluster.com> + * This file is part of Gluster Management Console. + * + * Gluster Management Console is free software; you can redistribute + * it and/or modify it under the terms of the GNU General Public + * License as published by the Free Software Foundation; either + * version 3 of the License, or (at your option) any later version. + * + * Gluster Management Console is distributed in the hope that it + * will be useful, but WITHOUT ANY WARRANTY; without even the + * implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR + * PURPOSE. See the GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program. If not, see + * <http://www.gnu.org/licenses/>. + *******************************************************************************/ +package org.gluster.storage.management.core.model; import org.eclipse.osgi.internal.signedcontent.Base64; +@SuppressWarnings("restriction") public class Alert extends Entity { public enum ALERT_TYPES { - CPU_USAGE_ALERT, MEMORY_USAGE_ALERT, DISK_USAGE_ALERT, OFFLINE_VOLUME_BRICKS_ALERT, OFFLINE_SERVERS_ALERT + CPU_USAGE_ALERT, MEMORY_USAGE_ALERT, DISK_USAGE_ALERT, OFFLINE_VOLUME_BRICKS_ALERT, OFFLINE_SERVERS_ALERT, OFFLINE_VOLUME_ALERT }; public static final String[] ALERT_TYPE_STR = { "High CPU Usage", "High Memory Usage", "Low Disk Space", - "Offline Brick", "Offline Server" }; + "Offline Brick", "Offline Server", "Offline Volume" }; // protected String id; protected ALERT_TYPES type; diff --git a/src/com.gluster.storage.management.core/src/com/gluster/storage/management/core/model/Brick.java b/src/org.gluster.storage.management.core/src/org/gluster/storage/management/core/model/Brick.java index 0b8ad6fd..daf5cea8 100644 --- a/src/com.gluster.storage.management.core/src/com/gluster/storage/management/core/model/Brick.java +++ b/src/org.gluster.storage.management.core/src/org/gluster/storage/management/core/model/Brick.java @@ -1,27 +1,28 @@ /******************************************************************************* - * Copyright (c) 2011 Gluster, Inc. <http://www.gluster.com> + * Copyright (c) 2006-2011 Gluster, Inc. <http://www.gluster.com> * This file is part of Gluster Management Console. * - * Gluster Management Console is free software; you can redistribute it and/or - * modify it under the terms of the GNU Affero General Public License as published - * by the Free Software Foundation; either version 3 of the License, or - * (at your option) any later version. - * - * Gluster Management Console is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY - * or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Affero General Public License - * for more details. - * - * You should have received a copy of the GNU Affero General Public License - * along with this program. If not, see + * Gluster Management Console is free software; you can redistribute + * it and/or modify it under the terms of the GNU General Public + * License as published by the Free Software Foundation; either + * version 3 of the License, or (at your option) any later version. + * + * Gluster Management Console is distributed in the hope that it + * will be useful, but WITHOUT ANY WARRANTY; without even the + * implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR + * PURPOSE. See the GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program. If not, see * <http://www.gnu.org/licenses/>. *******************************************************************************/ -package com.gluster.storage.management.core.model; +package org.gluster.storage.management.core.model; import javax.xml.bind.annotation.XmlRootElement; import javax.xml.bind.annotation.XmlTransient; -import com.gluster.storage.management.core.utils.StringUtil; +import org.gluster.storage.management.core.utils.StringUtil; + @XmlRootElement public class Brick extends Entity { diff --git a/src/com.gluster.storage.management.core/src/com/gluster/storage/management/core/model/Cluster.java b/src/org.gluster.storage.management.core/src/org/gluster/storage/management/core/model/Cluster.java index e11199f6..7b25b4bc 100644 --- a/src/com.gluster.storage.management.core/src/com/gluster/storage/management/core/model/Cluster.java +++ b/src/org.gluster.storage.management.core/src/org/gluster/storage/management/core/model/Cluster.java @@ -1,22 +1,22 @@ /******************************************************************************* - * Copyright (c) 2011 Gluster, Inc. <http://www.gluster.com> + * Copyright (c) 2006-2011 Gluster, Inc. <http://www.gluster.com> * This file is part of Gluster Management Console. * - * Gluster Management Console is free software; you can redistribute it and/or - * modify it under the terms of the GNU Affero General Public License as published - * by the Free Software Foundation; either version 3 of the License, or - * (at your option) any later version. - * - * Gluster Management Console is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY - * or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Affero General Public License - * for more details. - * - * You should have received a copy of the GNU Affero General Public License - * along with this program. If not, see + * Gluster Management Console is free software; you can redistribute + * it and/or modify it under the terms of the GNU General Public + * License as published by the Free Software Foundation; either + * version 3 of the License, or (at your option) any later version. + * + * Gluster Management Console is distributed in the hope that it + * will be useful, but WITHOUT ANY WARRANTY; without even the + * implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR + * PURPOSE. See the GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program. If not, see * <http://www.gnu.org/licenses/>. *******************************************************************************/ -package com.gluster.storage.management.core.model; +package org.gluster.storage.management.core.model; import java.util.ArrayList; import java.util.List; diff --git a/src/com.gluster.storage.management.core/src/com/gluster/storage/management/core/model/ClusterListener.java b/src/org.gluster.storage.management.core/src/org/gluster/storage/management/core/model/ClusterListener.java index bff717b7..ce9d5613 100644 --- a/src/com.gluster.storage.management.core/src/com/gluster/storage/management/core/model/ClusterListener.java +++ b/src/org.gluster.storage.management.core/src/org/gluster/storage/management/core/model/ClusterListener.java @@ -1,22 +1,22 @@ /******************************************************************************* - * Copyright (c) 2011 Gluster, Inc. <http://www.gluster.com> + * Copyright (c) 2006-2011 Gluster, Inc. <http://www.gluster.com> * This file is part of Gluster Management Console. * - * Gluster Management Console is free software; you can redistribute it and/or - * modify it under the terms of the GNU Affero General Public License as published - * by the Free Software Foundation; either version 3 of the License, or - * (at your option) any later version. - * - * Gluster Management Console is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY - * or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Affero General Public License - * for more details. - * - * You should have received a copy of the GNU Affero General Public License - * along with this program. If not, see + * Gluster Management Console is free software; you can redistribute + * it and/or modify it under the terms of the GNU General Public + * License as published by the Free Software Foundation; either + * version 3 of the License, or (at your option) any later version. + * + * Gluster Management Console is distributed in the hope that it + * will be useful, but WITHOUT ANY WARRANTY; without even the + * implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR + * PURPOSE. See the GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program. If not, see * <http://www.gnu.org/licenses/>. *******************************************************************************/ -package com.gluster.storage.management.core.model; +package org.gluster.storage.management.core.model; /** * Interface for a cluster listener. Every registered listener will be notified @@ -50,4 +50,8 @@ public interface ClusterListener { public void alertsGenerated(); public void aggregatedStatsChanged(); + + public void alertRemoved(Alert alert); + + public void alertCreated(Alert alert); } diff --git a/src/com.gluster.storage.management.core/src/com/gluster/storage/management/core/model/ConnectionDetails.java b/src/org.gluster.storage.management.core/src/org/gluster/storage/management/core/model/ConnectionDetails.java index 9f66ba5b..299c816a 100644 --- a/src/com.gluster.storage.management.core/src/com/gluster/storage/management/core/model/ConnectionDetails.java +++ b/src/org.gluster.storage.management.core/src/org/gluster/storage/management/core/model/ConnectionDetails.java @@ -1,22 +1,22 @@ /******************************************************************************* - * Copyright (c) 2011 Gluster, Inc. <http://www.gluster.com> + * Copyright (c) 2006-2011 Gluster, Inc. <http://www.gluster.com> * This file is part of Gluster Management Console. * - * Gluster Management Console is free software; you can redistribute it and/or - * modify it under the terms of the GNU Affero General Public License as published - * by the Free Software Foundation; either version 3 of the License, or - * (at your option) any later version. - * - * Gluster Management Console is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY - * or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Affero General Public License - * for more details. - * - * You should have received a copy of the GNU Affero General Public License - * along with this program. If not, see + * Gluster Management Console is free software; you can redistribute + * it and/or modify it under the terms of the GNU General Public + * License as published by the Free Software Foundation; either + * version 3 of the License, or (at your option) any later version. + * + * Gluster Management Console is distributed in the hope that it + * will be useful, but WITHOUT ANY WARRANTY; without even the + * implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR + * PURPOSE. See the GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program. If not, see * <http://www.gnu.org/licenses/>. *******************************************************************************/ -package com.gluster.storage.management.core.model; +package org.gluster.storage.management.core.model; /** * Class used for binding UI fields on login / password-change dialog boxes diff --git a/src/com.gluster.storage.management.core/src/com/gluster/storage/management/core/model/DefaultClusterListener.java b/src/org.gluster.storage.management.core/src/org/gluster/storage/management/core/model/DefaultClusterListener.java index f09d78bb..d7823ffb 100644 --- a/src/com.gluster.storage.management.core/src/com/gluster/storage/management/core/model/DefaultClusterListener.java +++ b/src/org.gluster.storage.management.core/src/org/gluster/storage/management/core/model/DefaultClusterListener.java @@ -1,22 +1,22 @@ /******************************************************************************* - * Copyright (c) 2011 Gluster, Inc. <http://www.gluster.com> + * Copyright (c) 2006-2011 Gluster, Inc. <http://www.gluster.com> * This file is part of Gluster Management Console. * - * Gluster Management Console is free software; you can redistribute it and/or - * modify it under the terms of the GNU Affero General Public License as published - * by the Free Software Foundation; either version 3 of the License, or - * (at your option) any later version. - * - * Gluster Management Console is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY - * or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Affero General Public License - * for more details. - * - * You should have received a copy of the GNU Affero General Public License - * along with this program. If not, see + * Gluster Management Console is free software; you can redistribute + * it and/or modify it under the terms of the GNU General Public + * License as published by the Free Software Foundation; either + * version 3 of the License, or (at your option) any later version. + * + * Gluster Management Console is distributed in the hope that it + * will be useful, but WITHOUT ANY WARRANTY; without even the + * implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR + * PURPOSE. See the GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program. If not, see * <http://www.gnu.org/licenses/>. *******************************************************************************/ -package com.gluster.storage.management.core.model; +package org.gluster.storage.management.core.model; /** * Default listener - doesn't do anything. Sub-class and override the method for @@ -105,4 +105,14 @@ public class DefaultClusterListener implements ClusterListener { public void aggregatedStatsChanged() { modelChanged(); } + + @Override + public void alertRemoved(Alert alert) { + modelChanged(); + } + + @Override + public void alertCreated(Alert alert) { + modelChanged(); + } } diff --git a/src/com.gluster.storage.management.core/src/com/gluster/storage/management/core/model/Device.java b/src/org.gluster.storage.management.core/src/org/gluster/storage/management/core/model/Device.java index 08092e7e..014826c3 100644 --- a/src/com.gluster.storage.management.core/src/com/gluster/storage/management/core/model/Device.java +++ b/src/org.gluster.storage.management.core/src/org/gluster/storage/management/core/model/Device.java @@ -1,29 +1,28 @@ /******************************************************************************* - * Copyright (c) 2011 Gluster, Inc. <http://www.gluster.com> + * Copyright (c) 2006-2011 Gluster, Inc. <http://www.gluster.com> * This file is part of Gluster Management Console. * - * Gluster Management Console is free software; you can redistribute it and/or - * modify it under the terms of the GNU Affero General Public License as published - * by the Free Software Foundation; either version 3 of the License, or - * (at your option) any later version. - * - * Gluster Management Console is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY - * or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Affero General Public License - * for more details. - * - * You should have received a copy of the GNU Affero General Public License - * along with this program. If not, see + * Gluster Management Console is free software; you can redistribute + * it and/or modify it under the terms of the GNU General Public + * License as published by the Free Software Foundation; either + * version 3 of the License, or (at your option) any later version. + * + * Gluster Management Console is distributed in the hope that it + * will be useful, but WITHOUT ANY WARRANTY; without even the + * implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR + * PURPOSE. See the GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program. If not, see * <http://www.gnu.org/licenses/>. *******************************************************************************/ -package com.gluster.storage.management.core.model; - -import java.io.File; +package org.gluster.storage.management.core.model; import javax.xml.bind.annotation.XmlElement; import javax.xml.bind.annotation.XmlTransient; -import com.gluster.storage.management.core.utils.StringUtil; +import org.gluster.storage.management.core.utils.StringUtil; + /** @@ -216,9 +215,13 @@ public class Device extends Entity { public void copyFrom(Device newDevice) { setName(newDevice.getName()); + setParent(newDevice.getParent()); setMountPoint(newDevice.getMountPoint()); setServerName(newDevice.getServerName()); setStatus(newDevice.getStatus()); + setFsType(newDevice.getFsType()); + setType(newDevice.getType()); + setFsVersion(newDevice.getFsVersion()); setSpace(newDevice.getSpace()); setSpaceInUse(newDevice.getSpaceInUse()); } diff --git a/src/com.gluster.storage.management.core/src/com/gluster/storage/management/core/model/Disk.java b/src/org.gluster.storage.management.core/src/org/gluster/storage/management/core/model/Disk.java index 4b159f37..fee589eb 100644 --- a/src/com.gluster.storage.management.core/src/com/gluster/storage/management/core/model/Disk.java +++ b/src/org.gluster.storage.management.core/src/org/gluster/storage/management/core/model/Disk.java @@ -1,22 +1,22 @@ /******************************************************************************* - * Copyright (c) 2011 Gluster, Inc. <http://www.gluster.com> + * Copyright (c) 2006-2011 Gluster, Inc. <http://www.gluster.com> * This file is part of Gluster Management Console. * - * Gluster Management Console is free software; you can redistribute it and/or - * modify it under the terms of the GNU Affero General Public License as published - * by the Free Software Foundation; either version 3 of the License, or - * (at your option) any later version. - * - * Gluster Management Console is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY - * or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Affero General Public License - * for more details. - * - * You should have received a copy of the GNU Affero General Public License - * along with this program. If not, see + * Gluster Management Console is free software; you can redistribute + * it and/or modify it under the terms of the GNU General Public + * License as published by the Free Software Foundation; either + * version 3 of the License, or (at your option) any later version. + * + * Gluster Management Console is distributed in the hope that it + * will be useful, but WITHOUT ANY WARRANTY; without even the + * implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR + * PURPOSE. See the GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program. If not, see * <http://www.gnu.org/licenses/>. *******************************************************************************/ -package com.gluster.storage.management.core.model; +package org.gluster.storage.management.core.model; import java.util.ArrayList; import java.util.Collection; @@ -25,8 +25,9 @@ import javax.xml.bind.annotation.XmlElement; import javax.xml.bind.annotation.XmlElementWrapper; import javax.xml.bind.annotation.XmlRootElement; -import com.gluster.storage.management.core.utils.GlusterCoreUtil; -import com.gluster.storage.management.core.utils.StringUtil; +import org.gluster.storage.management.core.utils.GlusterCoreUtil; +import org.gluster.storage.management.core.utils.StringUtil; + @XmlRootElement(name="disk") public class Disk extends Device { @@ -117,8 +118,8 @@ public class Disk extends Device { Disk disk = (Disk)obj; - if (!(super.equals(obj) && getDescription().equals(disk.getDescription()) && getDiskInterface().equals( - disk.getDiskInterface()))) { + if (!(super.equals(obj) && getDescription().equals(disk.getDescription()) && (getDiskInterface() == disk.getDiskInterface() || getDiskInterface().equals( + disk.getDiskInterface()) ))) { return false; } @@ -145,6 +146,9 @@ public class Disk extends Device { public void copyFrom(Disk newDisk) { super.copyFrom(newDisk); setDescription(newDisk.getDescription()); + setDiskInterface(newDisk.getDiskInterface()); + setPartitions(newDisk.getPartitions()); + setRaidDisks(newDisk.getRaidDisks()); } @Override diff --git a/src/com.gluster.storage.management.core/src/com/gluster/storage/management/core/model/Entity.java b/src/org.gluster.storage.management.core/src/org/gluster/storage/management/core/model/Entity.java index b905afc3..cfee7d19 100644 --- a/src/com.gluster.storage.management.core/src/com/gluster/storage/management/core/model/Entity.java +++ b/src/org.gluster.storage.management.core/src/org/gluster/storage/management/core/model/Entity.java @@ -1,22 +1,22 @@ /******************************************************************************* - * Copyright (c) 2011 Gluster, Inc. <http://www.gluster.com> + * Copyright (c) 2006-2011 Gluster, Inc. <http://www.gluster.com> * This file is part of Gluster Management Console. * - * Gluster Management Console is free software; you can redistribute it and/or - * modify it under the terms of the GNU Affero General Public License as published - * by the Free Software Foundation; either version 3 of the License, or - * (at your option) any later version. - * - * Gluster Management Console is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY - * or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Affero General Public License - * for more details. - * - * You should have received a copy of the GNU Affero General Public License - * along with this program. If not, see + * Gluster Management Console is free software; you can redistribute + * it and/or modify it under the terms of the GNU General Public + * License as published by the Free Software Foundation; either + * version 3 of the License, or (at your option) any later version. + * + * Gluster Management Console is distributed in the hope that it + * will be useful, but WITHOUT ANY WARRANTY; without even the + * implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR + * PURPOSE. See the GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program. If not, see * <http://www.gnu.org/licenses/>. *******************************************************************************/ -package com.gluster.storage.management.core.model; +package org.gluster.storage.management.core.model; import java.util.ArrayList; import java.util.List; @@ -25,12 +25,11 @@ import javax.xml.bind.annotation.XmlRootElement; import javax.xml.bind.annotation.XmlTransient; import org.eclipse.core.runtime.PlatformObject; +import org.gluster.storage.management.core.utils.StringUtil; -import com.gluster.storage.management.core.utils.StringUtil; @XmlRootElement public class Entity extends PlatformObject implements Filterable { - private static final long serialVersionUID = 1L; protected String name; protected List<Entity> children = new ArrayList<Entity>(); diff --git a/src/com.gluster.storage.management.core/src/com/gluster/storage/management/core/model/EntityGroup.java b/src/org.gluster.storage.management.core/src/org/gluster/storage/management/core/model/EntityGroup.java index 8e0311f5..db42807a 100644 --- a/src/com.gluster.storage.management.core/src/com/gluster/storage/management/core/model/EntityGroup.java +++ b/src/org.gluster.storage.management.core/src/org/gluster/storage/management/core/model/EntityGroup.java @@ -1,22 +1,22 @@ /******************************************************************************* - * Copyright (c) 2011 Gluster, Inc. <http://www.gluster.com> + * Copyright (c) 2006-2011 Gluster, Inc. <http://www.gluster.com> * This file is part of Gluster Management Console. * - * Gluster Management Console is free software; you can redistribute it and/or - * modify it under the terms of the GNU Affero General Public License as published - * by the Free Software Foundation; either version 3 of the License, or - * (at your option) any later version. - * - * Gluster Management Console is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY - * or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Affero General Public License - * for more details. - * - * You should have received a copy of the GNU Affero General Public License - * along with this program. If not, see + * Gluster Management Console is free software; you can redistribute + * it and/or modify it under the terms of the GNU General Public + * License as published by the Free Software Foundation; either + * version 3 of the License, or (at your option) any later version. + * + * Gluster Management Console is distributed in the hope that it + * will be useful, but WITHOUT ANY WARRANTY; without even the + * implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR + * PURPOSE. See the GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program. If not, see * <http://www.gnu.org/licenses/>. *******************************************************************************/ -package com.gluster.storage.management.core.model; +package org.gluster.storage.management.core.model; import java.util.List; @@ -33,10 +33,12 @@ public class EntityGroup<T extends Entity> extends Entity { this.type = type; } + @SuppressWarnings("unchecked") public List<T> getEntities() { return (List<T>)children; } + @SuppressWarnings("unchecked") public void setEntities(List<T> entities) { children = (List<Entity>)entities; } diff --git a/src/com.gluster.storage.management.core/src/com/gluster/storage/management/core/model/Event.java b/src/org.gluster.storage.management.core/src/org/gluster/storage/management/core/model/Event.java index 4ff52189..1444e8d4 100644 --- a/src/com.gluster.storage.management.core/src/com/gluster/storage/management/core/model/Event.java +++ b/src/org.gluster.storage.management.core/src/org/gluster/storage/management/core/model/Event.java @@ -1,22 +1,22 @@ /******************************************************************************* - * Copyright (c) 2011 Gluster, Inc. <http://www.gluster.com> + * Copyright (c) 2006-2011 Gluster, Inc. <http://www.gluster.com> * This file is part of Gluster Management Console. * - * Gluster Management Console is free software; you can redistribute it and/or - * modify it under the terms of the GNU Affero General Public License as published - * by the Free Software Foundation; either version 3 of the License, or - * (at your option) any later version. - * - * Gluster Management Console is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY - * or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Affero General Public License - * for more details. - * - * You should have received a copy of the GNU Affero General Public License - * along with this program. If not, see + * Gluster Management Console is free software; you can redistribute + * it and/or modify it under the terms of the GNU General Public + * License as published by the Free Software Foundation; either + * version 3 of the License, or (at your option) any later version. + * + * Gluster Management Console is distributed in the hope that it + * will be useful, but WITHOUT ANY WARRANTY; without even the + * implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR + * PURPOSE. See the GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program. If not, see * <http://www.gnu.org/licenses/>. *******************************************************************************/ -package com.gluster.storage.management.core.model; +package org.gluster.storage.management.core.model; public class Event { public enum EVENT_TYPE { @@ -24,6 +24,8 @@ public class Event { BRICKS_REMOVED, BRICKS_CHANGED, VOLUME_STATUS_CHANGED, + ALERT_CREATED, + ALERT_REMOVED, VOLUME_OPTIONS_RESET, VOLUME_OPTION_SET, VOLUME_CHANGED, diff --git a/src/com.gluster.storage.management.core/src/com/gluster/storage/management/core/model/Filterable.java b/src/org.gluster.storage.management.core/src/org/gluster/storage/management/core/model/Filterable.java index 9a2ed405..935fac29 100644 --- a/src/com.gluster.storage.management.core/src/com/gluster/storage/management/core/model/Filterable.java +++ b/src/org.gluster.storage.management.core/src/org/gluster/storage/management/core/model/Filterable.java @@ -1,22 +1,22 @@ /******************************************************************************* - * Copyright (c) 2011 Gluster, Inc. <http://www.gluster.com> + * Copyright (c) 2006-2011 Gluster, Inc. <http://www.gluster.com> * This file is part of Gluster Management Console. * - * Gluster Management Console is free software; you can redistribute it and/or - * modify it under the terms of the GNU Affero General Public License as published - * by the Free Software Foundation; either version 3 of the License, or - * (at your option) any later version. - * - * Gluster Management Console is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY - * or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Affero General Public License - * for more details. - * - * You should have received a copy of the GNU Affero General Public License - * along with this program. If not, see + * Gluster Management Console is free software; you can redistribute + * it and/or modify it under the terms of the GNU General Public + * License as published by the Free Software Foundation; either + * version 3 of the License, or (at your option) any later version. + * + * Gluster Management Console is distributed in the hope that it + * will be useful, but WITHOUT ANY WARRANTY; without even the + * implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR + * PURPOSE. See the GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program. If not, see * <http://www.gnu.org/licenses/>. *******************************************************************************/ -package com.gluster.storage.management.core.model; +package org.gluster.storage.management.core.model; /** * By default, the {@link EntityViewerFilter} filters the objects by parsing the diff --git a/src/com.gluster.storage.management.core/src/com/gluster/storage/management/core/model/GlusterDataModel.java b/src/org.gluster.storage.management.core/src/org/gluster/storage/management/core/model/GlusterDataModel.java index 733527c3..6a825f2f 100644 --- a/src/com.gluster.storage.management.core/src/com/gluster/storage/management/core/model/GlusterDataModel.java +++ b/src/org.gluster.storage.management.core/src/org/gluster/storage/management/core/model/GlusterDataModel.java @@ -1,22 +1,22 @@ /******************************************************************************* - * Copyright (c) 2011 Gluster, Inc. <http://www.gluster.com> + * Copyright (c) 2006-2011 Gluster, Inc. <http://www.gluster.com> * This file is part of Gluster Management Console. * - * Gluster Management Console is free software; you can redistribute it and/or - * modify it under the terms of the GNU Affero General Public License as published - * by the Free Software Foundation; either version 3 of the License, or - * (at your option) any later version. - * - * Gluster Management Console is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY - * or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Affero General Public License - * for more details. - * - * You should have received a copy of the GNU Affero General Public License - * along with this program. If not, see + * Gluster Management Console is free software; you can redistribute + * it and/or modify it under the terms of the GNU General Public + * License as published by the Free Software Foundation; either + * version 3 of the License, or (at your option) any later version. + * + * Gluster Management Console is distributed in the hope that it + * will be useful, but WITHOUT ANY WARRANTY; without even the + * implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR + * PURPOSE. See the GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program. If not, see * <http://www.gnu.org/licenses/>. *******************************************************************************/ -package com.gluster.storage.management.core.model; +package org.gluster.storage.management.core.model; import java.util.ArrayList; import java.util.List; diff --git a/src/com.gluster.storage.management.core/src/com/gluster/storage/management/core/model/GlusterDummyModel.java b/src/org.gluster.storage.management.core/src/org/gluster/storage/management/core/model/GlusterDummyModel.java index 2139bbd7..6b21790f 100644 --- a/src/com.gluster.storage.management.core/src/com/gluster/storage/management/core/model/GlusterDummyModel.java +++ b/src/org.gluster.storage.management.core/src/org/gluster/storage/management/core/model/GlusterDummyModel.java @@ -1,39 +1,40 @@ /******************************************************************************* - * Copyright (c) 2011 Gluster, Inc. <http://www.gluster.com> + * Copyright (c) 2006-2011 Gluster, Inc. <http://www.gluster.com> * This file is part of Gluster Management Console. * - * Gluster Management Console is free software; you can redistribute it and/or - * modify it under the terms of the GNU Affero General Public License as published - * by the Free Software Foundation; either version 3 of the License, or - * (at your option) any later version. - * - * Gluster Management Console is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY - * or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Affero General Public License - * for more details. - * - * You should have received a copy of the GNU Affero General Public License - * along with this program. If not, see + * Gluster Management Console is free software; you can redistribute + * it and/or modify it under the terms of the GNU General Public + * License as published by the Free Software Foundation; either + * version 3 of the License, or (at your option) any later version. + * + * Gluster Management Console is distributed in the hope that it + * will be useful, but WITHOUT ANY WARRANTY; without even the + * implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR + * PURPOSE. See the GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program. If not, see * <http://www.gnu.org/licenses/>. *******************************************************************************/ -package com.gluster.storage.management.core.model; +package org.gluster.storage.management.core.model; import java.util.ArrayList; import java.util.Arrays; import java.util.Date; import java.util.List; -import com.gluster.storage.management.core.model.Device.DEVICE_STATUS; -import com.gluster.storage.management.core.model.Server.SERVER_STATUS; -import com.gluster.storage.management.core.model.Volume.TRANSPORT_TYPE; -import com.gluster.storage.management.core.model.Volume.VOLUME_STATUS; -import com.gluster.storage.management.core.model.Volume.VOLUME_TYPE; +import org.gluster.storage.management.core.model.Device.DEVICE_STATUS; +import org.gluster.storage.management.core.model.Server.SERVER_STATUS; +import org.gluster.storage.management.core.model.Volume.TRANSPORT_TYPE; +import org.gluster.storage.management.core.model.Volume.VOLUME_STATUS; +import org.gluster.storage.management.core.model.Volume.VOLUME_TYPE; + public class GlusterDummyModel { // private Server discoveredServer1, discoveredServer2, discoveredServer3, discoveredServer4, discoveredServer5; - private GlusterServer server1, server2, server3, server4, server5; + private GlusterServer server1, server2, server4, server5; private Volume volume1, volume2, volume3, volume4, volume5; - private Disk s1da, s1db, s2da, s2db, s2dc, s2dd, s3da, s4da, s5da, s5db; + private Disk s1da, s1db, s2da, s2db, s2dc, s2dd, s4da, s5da, s5db; private static List<VolumeLogMessage> logMessages = new ArrayList<VolumeLogMessage>(); private static GlusterDummyModel instance = new GlusterDummyModel(); private GlusterDataModel model; @@ -56,7 +57,6 @@ public class GlusterDummyModel { double memoryInUse) { GlusterServer glusterServer = new GlusterServer(name, parent, status, numOfCPUs, cpuUsage, totalMemory, memoryInUse); - NetworkInterface networkInterface = addNetworkInterface(glusterServer, interfaceName); servers.add(glusterServer); return glusterServer; @@ -173,7 +173,6 @@ public class GlusterDummyModel { List<GlusterServer> servers = new ArrayList<GlusterServer>(); server1 = addGlusterServer(servers, cluster, "Server1", SERVER_STATUS.ONLINE, "eth0", 4, 56.3, 16, 8.4); server2 = addGlusterServer(servers, cluster, "Server2", SERVER_STATUS.ONLINE, "eth1", 8, 41.92, 32, 18.76); - server3 = addGlusterServer(servers, cluster, "Server3", SERVER_STATUS.OFFLINE, "eth0", -1, -1, -1, -1); server4 = addGlusterServer(servers, cluster, "Server4", SERVER_STATUS.ONLINE, "eth0", 1, 92.83, 4, 3.18); server5 = addGlusterServer(servers, cluster, "Server5", SERVER_STATUS.ONLINE, "inf0", 2, 87.24, 8, 7.23); diff --git a/src/com.gluster.storage.management.core/src/com/gluster/storage/management/core/model/GlusterServer.java b/src/org.gluster.storage.management.core/src/org/gluster/storage/management/core/model/GlusterServer.java index 9c7ac80b..1b396265 100644 --- a/src/com.gluster.storage.management.core/src/com/gluster/storage/management/core/model/GlusterServer.java +++ b/src/org.gluster.storage.management.core/src/org/gluster/storage/management/core/model/GlusterServer.java @@ -1,26 +1,27 @@ /******************************************************************************* - * Copyright (c) 2011 Gluster, Inc. <http://www.gluster.com> + * Copyright (c) 2006-2011 Gluster, Inc. <http://www.gluster.com> * This file is part of Gluster Management Console. * - * Gluster Management Console is free software; you can redistribute it and/or - * modify it under the terms of the GNU Affero General Public License as published - * by the Free Software Foundation; either version 3 of the License, or - * (at your option) any later version. - * - * Gluster Management Console is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY - * or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Affero General Public License - * for more details. - * - * You should have received a copy of the GNU Affero General Public License - * along with this program. If not, see + * Gluster Management Console is free software; you can redistribute + * it and/or modify it under the terms of the GNU General Public + * License as published by the Free Software Foundation; either + * version 3 of the License, or (at your option) any later version. + * + * Gluster Management Console is distributed in the hope that it + * will be useful, but WITHOUT ANY WARRANTY; without even the + * implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR + * PURPOSE. See the GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program. If not, see * <http://www.gnu.org/licenses/>. *******************************************************************************/ -package com.gluster.storage.management.core.model; +package org.gluster.storage.management.core.model; import javax.xml.bind.annotation.XmlRootElement; -import com.gluster.storage.management.core.utils.StringUtil; +import org.gluster.storage.management.core.utils.StringUtil; + @XmlRootElement(name = "glusterServer") public class GlusterServer extends Server { diff --git a/src/com.gluster.storage.management.core/src/com/gluster/storage/management/core/model/InitDiskStatusResponse.java b/src/org.gluster.storage.management.core/src/org/gluster/storage/management/core/model/InitDiskStatusResponse.java index f09dfc88..d55f88cb 100644 --- a/src/com.gluster.storage.management.core/src/com/gluster/storage/management/core/model/InitDiskStatusResponse.java +++ b/src/org.gluster.storage.management.core/src/org/gluster/storage/management/core/model/InitDiskStatusResponse.java @@ -1,24 +1,22 @@ /******************************************************************************* - * InitDiskStatusResponse.java - * - * Copyright (c) 2011 Gluster, Inc. <http://www.gluster.com> + * Copyright (c) 2006-2011 Gluster, Inc. <http://www.gluster.com> * This file is part of Gluster Management Console. * - * Gluster Management Console is free software; you can redistribute it and/or - * modify it under the terms of the GNU Affero General Public License as published - * by the Free Software Foundation; either version 3 of the License, or - * (at your option) any later version. - * - * Gluster Management Console is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY - * or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Affero General Public License - * for more details. - * - * You should have received a copy of the GNU Affero General Public License - * along with this program. If not, see + * Gluster Management Console is free software; you can redistribute + * it and/or modify it under the terms of the GNU General Public + * License as published by the Free Software Foundation; either + * version 3 of the License, or (at your option) any later version. + * + * Gluster Management Console is distributed in the hope that it + * will be useful, but WITHOUT ANY WARRANTY; without even the + * implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR + * PURPOSE. See the GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program. If not, see * <http://www.gnu.org/licenses/>. *******************************************************************************/ -package com.gluster.storage.management.core.model; +package org.gluster.storage.management.core.model; import javax.xml.bind.annotation.XmlRootElement; diff --git a/src/com.gluster.storage.management.core/src/com/gluster/storage/management/core/model/NetworkInterface.java b/src/org.gluster.storage.management.core/src/org/gluster/storage/management/core/model/NetworkInterface.java index 181b8e66..e9ef6f50 100644 --- a/src/com.gluster.storage.management.core/src/com/gluster/storage/management/core/model/NetworkInterface.java +++ b/src/org.gluster.storage.management.core/src/org/gluster/storage/management/core/model/NetworkInterface.java @@ -1,22 +1,22 @@ /******************************************************************************* - * Copyright (c) 2011 Gluster, Inc. <http://www.gluster.com> + * Copyright (c) 2006-2011 Gluster, Inc. <http://www.gluster.com> * This file is part of Gluster Management Console. * - * Gluster Management Console is free software; you can redistribute it and/or - * modify it under the terms of the GNU Affero General Public License as published - * by the Free Software Foundation; either version 3 of the License, or - * (at your option) any later version. - * - * Gluster Management Console is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY - * or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Affero General Public License - * for more details. - * - * You should have received a copy of the GNU Affero General Public License - * along with this program. If not, see + * Gluster Management Console is free software; you can redistribute + * it and/or modify it under the terms of the GNU General Public + * License as published by the Free Software Foundation; either + * version 3 of the License, or (at your option) any later version. + * + * Gluster Management Console is distributed in the hope that it + * will be useful, but WITHOUT ANY WARRANTY; without even the + * implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR + * PURPOSE. See the GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program. If not, see * <http://www.gnu.org/licenses/>. *******************************************************************************/ -package com.gluster.storage.management.core.model; +package org.gluster.storage.management.core.model; import javax.xml.bind.annotation.XmlRootElement; diff --git a/src/com.gluster.storage.management.core/src/com/gluster/storage/management/core/model/Partition.java b/src/org.gluster.storage.management.core/src/org/gluster/storage/management/core/model/Partition.java index ecf4035b..bbbc94de 100644 --- a/src/com.gluster.storage.management.core/src/com/gluster/storage/management/core/model/Partition.java +++ b/src/org.gluster.storage.management.core/src/org/gluster/storage/management/core/model/Partition.java @@ -1,22 +1,22 @@ /******************************************************************************* - * Copyright (c) 2011 Gluster, Inc. <http://www.gluster.com> + * Copyright (c) 2006-2011 Gluster, Inc. <http://www.gluster.com> * This file is part of Gluster Management Console. * - * Gluster Management Console is free software; you can redistribute it and/or - * modify it under the terms of the GNU Affero General Public License as published - * by the Free Software Foundation; either version 3 of the License, or - * (at your option) any later version. - * - * Gluster Management Console is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY - * or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Affero General Public License - * for more details. - * - * You should have received a copy of the GNU Affero General Public License - * along with this program. If not, see + * Gluster Management Console is free software; you can redistribute + * it and/or modify it under the terms of the GNU General Public + * License as published by the Free Software Foundation; either + * version 3 of the License, or (at your option) any later version. + * + * Gluster Management Console is distributed in the hope that it + * will be useful, but WITHOUT ANY WARRANTY; without even the + * implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR + * PURPOSE. See the GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program. If not, see * <http://www.gnu.org/licenses/>. *******************************************************************************/ -package com.gluster.storage.management.core.model; +package org.gluster.storage.management.core.model; import javax.xml.bind.annotation.XmlRootElement; diff --git a/src/com.gluster.storage.management.core/src/com/gluster/storage/management/core/model/Response.java b/src/org.gluster.storage.management.core/src/org/gluster/storage/management/core/model/Response.java index 96ea8497..46988678 100644 --- a/src/com.gluster.storage.management.core/src/com/gluster/storage/management/core/model/Response.java +++ b/src/org.gluster.storage.management.core/src/org/gluster/storage/management/core/model/Response.java @@ -1,37 +1,37 @@ /******************************************************************************* - * Copyright (c) 2011 Gluster, Inc. <http://www.gluster.com> + * Copyright (c) 2006-2011 Gluster, Inc. <http://www.gluster.com> * This file is part of Gluster Management Console. * - * Gluster Management Console is free software; you can redistribute it and/or - * modify it under the terms of the GNU Affero General Public License as published - * by the Free Software Foundation; either version 3 of the License, or - * (at your option) any later version. - * - * Gluster Management Console is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY - * or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Affero General Public License - * for more details. - * - * You should have received a copy of the GNU Affero General Public License - * along with this program. If not, see + * Gluster Management Console is free software; you can redistribute + * it and/or modify it under the terms of the GNU General Public + * License as published by the Free Software Foundation; either + * version 3 of the License, or (at your option) any later version. + * + * Gluster Management Console is distributed in the hope that it + * will be useful, but WITHOUT ANY WARRANTY; without even the + * implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR + * PURPOSE. See the GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program. If not, see * <http://www.gnu.org/licenses/>. *******************************************************************************/ -package com.gluster.storage.management.core.model;
-
-/**
- * Interface for server response. Any request handled by the Gluster Management
- * Server will result in a response that must be an instance of a class
- * implementing this interface.
- */
+package org.gluster.storage.management.core.model; + +/** + * Interface for server response. Any request handled by the Gluster Management + * Server will result in a response that must be an instance of a class + * implementing this interface. + */ public interface Response<T> { - /**
- * @return Status of request processing
- */
- public Status getStatus();
-
- /**
- * @return Data associated with the response. e.g. A "discover servers"
- * request will return the list of discovered servers.
- */
- public T getData();
-}
+ /** + * @return Status of request processing + */ + public Status getStatus(); + + /** + * @return Data associated with the response. e.g. A "discover servers" + * request will return the list of discovered servers. + */ + public T getData(); +} diff --git a/src/com.gluster.storage.management.core/src/com/gluster/storage/management/core/model/Server.java b/src/org.gluster.storage.management.core/src/org/gluster/storage/management/core/model/Server.java index ad2599a6..a0d20d01 100644 --- a/src/com.gluster.storage.management.core/src/com/gluster/storage/management/core/model/Server.java +++ b/src/org.gluster.storage.management.core/src/org/gluster/storage/management/core/model/Server.java @@ -1,21 +1,22 @@ /******************************************************************************* + * Copyright (c) 2006-2011 Gluster, Inc. <http://www.gluster.com> * This file is part of Gluster Management Console. * - * Gluster Management Console is free software; you can redistribute it and/or - * modify it under the terms of the GNU Affero General Public License as published - * by the Free Software Foundation; either version 3 of the License, or - * (at your option) any later version. - * - * Gluster Management Console is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY - * or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Affero General Public License - * for more details. - * - * You should have received a copy of the GNU Affero General Public License - * along with this program. If not, see + * Gluster Management Console is free software; you can redistribute + * it and/or modify it under the terms of the GNU General Public + * License as published by the Free Software Foundation; either + * version 3 of the License, or (at your option) any later version. + * + * Gluster Management Console is distributed in the hope that it + * will be useful, but WITHOUT ANY WARRANTY; without even the + * implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR + * PURPOSE. See the GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program. If not, see * <http://www.gnu.org/licenses/>. *******************************************************************************/ -package com.gluster.storage.management.core.model; +package org.gluster.storage.management.core.model; import java.util.ArrayList; import java.util.Collection; @@ -25,8 +26,9 @@ import javax.xml.bind.annotation.XmlElement; import javax.xml.bind.annotation.XmlElementWrapper; import javax.xml.bind.annotation.XmlRootElement; -import com.gluster.storage.management.core.utils.GlusterCoreUtil; -import com.gluster.storage.management.core.utils.StringUtil; +import org.gluster.storage.management.core.utils.GlusterCoreUtil; +import org.gluster.storage.management.core.utils.StringUtil; + @XmlRootElement(name = "server") public class Server extends Entity { @@ -199,7 +201,6 @@ public class Server extends Entity { * * @param server */ - @SuppressWarnings("unchecked") public void copyFrom(Server server) { setName(server.getName()); setParent(server.getParent()); @@ -245,4 +246,4 @@ public class Server extends Entity { return true; } -}
\ No newline at end of file +} diff --git a/src/com.gluster.storage.management.core/src/com/gluster/storage/management/core/model/ServerStats.java b/src/org.gluster.storage.management.core/src/org/gluster/storage/management/core/model/ServerStats.java index 042af256..7a9a006d 100644 --- a/src/com.gluster.storage.management.core/src/com/gluster/storage/management/core/model/ServerStats.java +++ b/src/org.gluster.storage.management.core/src/org/gluster/storage/management/core/model/ServerStats.java @@ -1,22 +1,22 @@ /******************************************************************************* - * Copyright (c) 2011 Gluster, Inc. <http://www.gluster.com> + * Copyright (c) 2006-2011 Gluster, Inc. <http://www.gluster.com> * This file is part of Gluster Management Console. * - * Gluster Management Console is free software; you can redistribute it and/or - * modify it under the terms of the GNU Affero General Public License as published - * by the Free Software Foundation; either version 3 of the License, or - * (at your option) any later version. - * - * Gluster Management Console is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY - * or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Affero General Public License - * for more details. - * - * You should have received a copy of the GNU Affero General Public License - * along with this program. If not, see + * Gluster Management Console is free software; you can redistribute + * it and/or modify it under the terms of the GNU General Public + * License as published by the Free Software Foundation; either + * version 3 of the License, or (at your option) any later version. + * + * Gluster Management Console is distributed in the hope that it + * will be useful, but WITHOUT ANY WARRANTY; without even the + * implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR + * PURPOSE. See the GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program. If not, see * <http://www.gnu.org/licenses/>. *******************************************************************************/ -package com.gluster.storage.management.core.model; +package org.gluster.storage.management.core.model; import java.util.ArrayList; import java.util.List; diff --git a/src/com.gluster.storage.management.core/src/com/gluster/storage/management/core/model/ServerStatsRow.java b/src/org.gluster.storage.management.core/src/org/gluster/storage/management/core/model/ServerStatsRow.java index 0088cef6..02c78271 100644 --- a/src/com.gluster.storage.management.core/src/com/gluster/storage/management/core/model/ServerStatsRow.java +++ b/src/org.gluster.storage.management.core/src/org/gluster/storage/management/core/model/ServerStatsRow.java @@ -1,22 +1,22 @@ /******************************************************************************* - * Copyright (c) 2011 Gluster, Inc. <http://www.gluster.com> + * Copyright (c) 2006-2011 Gluster, Inc. <http://www.gluster.com> * This file is part of Gluster Management Console. * - * Gluster Management Console is free software; you can redistribute it and/or - * modify it under the terms of the GNU Affero General Public License as published - * by the Free Software Foundation; either version 3 of the License, or - * (at your option) any later version. - * - * Gluster Management Console is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY - * or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Affero General Public License - * for more details. - * - * You should have received a copy of the GNU Affero General Public License - * along with this program. If not, see + * Gluster Management Console is free software; you can redistribute + * it and/or modify it under the terms of the GNU General Public + * License as published by the Free Software Foundation; either + * version 3 of the License, or (at your option) any later version. + * + * Gluster Management Console is distributed in the hope that it + * will be useful, but WITHOUT ANY WARRANTY; without even the + * implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR + * PURPOSE. See the GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program. If not, see * <http://www.gnu.org/licenses/>. *******************************************************************************/ -package com.gluster.storage.management.core.model; +package org.gluster.storage.management.core.model; import java.util.ArrayList; import java.util.List; diff --git a/src/com.gluster.storage.management.core/src/com/gluster/storage/management/core/model/StatsMetadata.java b/src/org.gluster.storage.management.core/src/org/gluster/storage/management/core/model/StatsMetadata.java index 22b42671..7f814cd3 100644 --- a/src/com.gluster.storage.management.core/src/com/gluster/storage/management/core/model/StatsMetadata.java +++ b/src/org.gluster.storage.management.core/src/org/gluster/storage/management/core/model/StatsMetadata.java @@ -1,22 +1,22 @@ /******************************************************************************* - * Copyright (c) 2011 Gluster, Inc. <http://www.gluster.com> + * Copyright (c) 2006-2011 Gluster, Inc. <http://www.gluster.com> * This file is part of Gluster Management Console. * - * Gluster Management Console is free software; you can redistribute it and/or - * modify it under the terms of the GNU Affero General Public License as published - * by the Free Software Foundation; either version 3 of the License, or - * (at your option) any later version. - * - * Gluster Management Console is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY - * or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Affero General Public License - * for more details. - * - * You should have received a copy of the GNU Affero General Public License - * along with this program. If not, see + * Gluster Management Console is free software; you can redistribute + * it and/or modify it under the terms of the GNU General Public + * License as published by the Free Software Foundation; either + * version 3 of the License, or (at your option) any later version. + * + * Gluster Management Console is distributed in the hope that it + * will be useful, but WITHOUT ANY WARRANTY; without even the + * implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR + * PURPOSE. See the GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program. If not, see * <http://www.gnu.org/licenses/>. *******************************************************************************/ -package com.gluster.storage.management.core.model; +package org.gluster.storage.management.core.model; import java.util.ArrayList; import java.util.List; diff --git a/src/com.gluster.storage.management.core/src/com/gluster/storage/management/core/model/Status.java b/src/org.gluster.storage.management.core/src/org/gluster/storage/management/core/model/Status.java index fc824db2..4fdcd534 100644 --- a/src/com.gluster.storage.management.core/src/com/gluster/storage/management/core/model/Status.java +++ b/src/org.gluster.storage.management.core/src/org/gluster/storage/management/core/model/Status.java @@ -1,27 +1,28 @@ /******************************************************************************* - * Copyright (c) 2011 Gluster, Inc. <http://www.gluster.com> + * Copyright (c) 2006-2011 Gluster, Inc. <http://www.gluster.com> * This file is part of Gluster Management Console. * - * Gluster Management Console is free software; you can redistribute it and/or - * modify it under the terms of the GNU Affero General Public License as published - * by the Free Software Foundation; either version 3 of the License, or - * (at your option) any later version. - * - * Gluster Management Console is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY - * or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Affero General Public License - * for more details. - * - * You should have received a copy of the GNU Affero General Public License - * along with this program. If not, see + * Gluster Management Console is free software; you can redistribute + * it and/or modify it under the terms of the GNU General Public + * License as published by the Free Software Foundation; either + * version 3 of the License, or (at your option) any later version. + * + * Gluster Management Console is distributed in the hope that it + * will be useful, but WITHOUT ANY WARRANTY; without even the + * implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR + * PURPOSE. See the GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program. If not, see * <http://www.gnu.org/licenses/>. *******************************************************************************/ -package com.gluster.storage.management.core.model; +package org.gluster.storage.management.core.model; import javax.xml.bind.annotation.XmlElement; import javax.xml.bind.annotation.XmlRootElement; -import com.gluster.storage.management.core.utils.ProcessResult; +import org.gluster.storage.management.core.utils.ProcessResult; + @XmlRootElement(name = "status") public class Status { @@ -33,6 +34,7 @@ public class Status { public static final int STATUS_CODE_PAUSE = 4; public static final int STATUS_CODE_WARNING = 5; public static final int STATUS_CODE_COMMIT_PENDING = 6; + public static final int STATUS_CODE_ERROR = 7; public static final Status STATUS_SUCCESS = new Status(STATUS_CODE_SUCCESS, "Success"); public static final Status STATUS_FAILURE = new Status(STATUS_CODE_FAILURE, "Failure"); diff --git a/src/com.gluster.storage.management.core/src/com/gluster/storage/management/core/model/TaskInfo.java b/src/org.gluster.storage.management.core/src/org/gluster/storage/management/core/model/TaskInfo.java index 43299863..65f44d44 100644 --- a/src/com.gluster.storage.management.core/src/com/gluster/storage/management/core/model/TaskInfo.java +++ b/src/org.gluster.storage.management.core/src/org/gluster/storage/management/core/model/TaskInfo.java @@ -1,29 +1,28 @@ -/** - * TaskInfo.java - * - * Copyright (c) 2011 Gluster, Inc. <http://www.gluster.com> +/******************************************************************************* + * Copyright (c) 2006-2011 Gluster, Inc. <http://www.gluster.com> * This file is part of Gluster Management Console. * - * Gluster Management Console is free software; you can redistribute it and/or - * modify it under the terms of the GNU Affero General Public License as published - * by the Free Software Foundation; either version 3 of the License, or - * (at your option) any later version. + * Gluster Management Console is free software; you can redistribute + * it and/or modify it under the terms of the GNU General Public + * License as published by the Free Software Foundation; either + * version 3 of the License, or (at your option) any later version. * - * Gluster Management Console is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY - * or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Affero General Public License - * for more details. + * Gluster Management Console is distributed in the hope that it + * will be useful, but WITHOUT ANY WARRANTY; without even the + * implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR + * PURPOSE. See the GNU General Public License for more details. * - * You should have received a copy of the GNU Affero General Public License - * along with this program. If not, see + * You should have received a copy of the GNU General Public License + * along with this program. If not, see * <http://www.gnu.org/licenses/>. - */ -package com.gluster.storage.management.core.model; + *******************************************************************************/ +package org.gluster.storage.management.core.model; import javax.xml.bind.annotation.XmlElement; import javax.xml.bind.annotation.XmlRootElement; -import com.gluster.storage.management.core.utils.StringUtil; +import org.gluster.storage.management.core.utils.StringUtil; + @XmlRootElement public class TaskInfo extends Entity { @@ -104,7 +103,7 @@ public class TaskInfo extends Entity { } /* (non-Javadoc) - * @see com.gluster.storage.management.core.model.Entity#filter(java.lang.String, boolean) + * @see org.gluster.storage.management.core.model.Entity#filter(java.lang.String, boolean) */ @Override public boolean filter(String filterString, boolean caseSensitive) { diff --git a/src/com.gluster.storage.management.core/src/com/gluster/storage/management/core/model/TaskStatus.java b/src/org.gluster.storage.management.core/src/org/gluster/storage/management/core/model/TaskStatus.java index c1205c0e..920cd47b 100644 --- a/src/com.gluster.storage.management.core/src/com/gluster/storage/management/core/model/TaskStatus.java +++ b/src/org.gluster.storage.management.core/src/org/gluster/storage/management/core/model/TaskStatus.java @@ -1,24 +1,22 @@ -/** - * TaskStatus.java - * - * Copyright (c) 2011 Gluster, Inc. <http://www.gluster.com> +/******************************************************************************* + * Copyright (c) 2006-2011 Gluster, Inc. <http://www.gluster.com> * This file is part of Gluster Management Console. * - * Gluster Management Console is free software; you can redistribute it and/or - * modify it under the terms of the GNU Affero General Public License as published - * by the Free Software Foundation; either version 3 of the License, or - * (at your option) any later version. + * Gluster Management Console is free software; you can redistribute + * it and/or modify it under the terms of the GNU General Public + * License as published by the Free Software Foundation; either + * version 3 of the License, or (at your option) any later version. * - * Gluster Management Console is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY - * or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Affero General Public License - * for more details. + * Gluster Management Console is distributed in the hope that it + * will be useful, but WITHOUT ANY WARRANTY; without even the + * implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR + * PURPOSE. See the GNU General Public License for more details. * - * You should have received a copy of the GNU Affero General Public License - * along with this program. If not, see + * You should have received a copy of the GNU General Public License + * along with this program. If not, see * <http://www.gnu.org/licenses/>. - */ -package com.gluster.storage.management.core.model; + *******************************************************************************/ +package org.gluster.storage.management.core.model; public class TaskStatus extends Status { @@ -34,6 +32,10 @@ public class TaskStatus extends Status { super(status.getCode(), status.getMessage()); } + public boolean isCommitPending() { + return getCode() == STATUS_CODE_COMMIT_PENDING; + } + public boolean isPercentageSupported() { return isPercentageSupported; } diff --git a/src/com.gluster.storage.management.core/src/com/gluster/storage/management/core/model/User.java b/src/org.gluster.storage.management.core/src/org/gluster/storage/management/core/model/User.java index ed5d12f7..efa1835f 100644 --- a/src/com.gluster.storage.management.core/src/com/gluster/storage/management/core/model/User.java +++ b/src/org.gluster.storage.management.core/src/org/gluster/storage/management/core/model/User.java @@ -1,22 +1,22 @@ /******************************************************************************* - * Copyright (c) 2011 Gluster, Inc. <http://www.gluster.com> + * Copyright (c) 2006-2011 Gluster, Inc. <http://www.gluster.com> * This file is part of Gluster Management Console. * - * Gluster Management Console is free software; you can redistribute it and/or - * modify it under the terms of the GNU Affero General Public License as published - * by the Free Software Foundation; either version 3 of the License, or - * (at your option) any later version. - * - * Gluster Management Console is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY - * or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Affero General Public License - * for more details. - * - * You should have received a copy of the GNU Affero General Public License - * along with this program. If not, see + * Gluster Management Console is free software; you can redistribute + * it and/or modify it under the terms of the GNU General Public + * License as published by the Free Software Foundation; either + * version 3 of the License, or (at your option) any later version. + * + * Gluster Management Console is distributed in the hope that it + * will be useful, but WITHOUT ANY WARRANTY; without even the + * implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR + * PURPOSE. See the GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program. If not, see * <http://www.gnu.org/licenses/>. *******************************************************************************/ -package com.gluster.storage.management.core.model; +package org.gluster.storage.management.core.model; import javax.xml.bind.annotation.XmlRootElement; import javax.xml.bind.annotation.XmlTransient; diff --git a/src/org.gluster.storage.management.core/src/org/gluster/storage/management/core/model/Version.java b/src/org.gluster.storage.management.core/src/org/gluster/storage/management/core/model/Version.java new file mode 100644 index 00000000..6749a530 --- /dev/null +++ b/src/org.gluster.storage.management.core/src/org/gluster/storage/management/core/model/Version.java @@ -0,0 +1,65 @@ +/******************************************************************************* + * Copyright (c) 2006-2011 Gluster, Inc. <http://www.gluster.com> + * This file is part of Gluster Management Console. + * + * Gluster Management Console is free software; you can redistribute + * it and/or modify it under the terms of the GNU General Public + * License as published by the Free Software Foundation; either + * version 3 of the License, or (at your option) any later version. + * + * Gluster Management Console is distributed in the hope that it + * will be useful, but WITHOUT ANY WARRANTY; without even the + * implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR + * PURPOSE. See the GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program. If not, see + * <http://www.gnu.org/licenses/>. + *******************************************************************************/ +package org.gluster.storage.management.core.model; + +/** + * + */ +public class Version implements Comparable<Version> { + public int major = 0; + public int minor = 0; + public int maintenance = 0; + + public Version(String version) { + String[] versionParts = version.split(".", -1); + major = Integer.valueOf(versionParts[0]); + if(versionParts.length > 1) { + minor = Integer.valueOf(versionParts[1]); + } + if(versionParts.length > 2) { + maintenance = Integer.valueOf(versionParts[2]); + } + } + + @Override + public int compareTo(Version newVer) { + if(this.major < newVer.major) { + return -1; + } else if(this.major > newVer.major) { + return 1; + } + + // major version is same + if(this.minor < newVer.minor) { + return -1; + } else if(this.minor > newVer.minor) { + return 1; + } + + // major.minor is same + if(this.maintenance < newVer.maintenance) { + return -1; + } else if(this.maintenance > newVer.maintenance) { + return 1; + } + + // major.minor.maintenance is same + return 0; + } +}
\ No newline at end of file diff --git a/src/com.gluster.storage.management.core/src/com/gluster/storage/management/core/model/Volume.java b/src/org.gluster.storage.management.core/src/org/gluster/storage/management/core/model/Volume.java index 65bec003..a8d54dbe 100644 --- a/src/com.gluster.storage.management.core/src/com/gluster/storage/management/core/model/Volume.java +++ b/src/org.gluster.storage.management.core/src/org/gluster/storage/management/core/model/Volume.java @@ -1,22 +1,22 @@ /******************************************************************************* - * Copyright (c) 2011 Gluster, Inc. <http://www.gluster.com> + * Copyright (c) 2006-2011 Gluster, Inc. <http://www.gluster.com> * This file is part of Gluster Management Console. * - * Gluster Management Console is free software; you can redistribute it and/or - * modify it under the terms of the GNU Affero General Public License as published - * by the Free Software Foundation; either version 3 of the License, or - * (at your option) any later version. - * - * Gluster Management Console is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY - * or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Affero General Public License - * for more details. - * - * You should have received a copy of the GNU Affero General Public License - * along with this program. If not, see + * Gluster Management Console is free software; you can redistribute + * it and/or modify it under the terms of the GNU General Public + * License as published by the Free Software Foundation; either + * version 3 of the License, or (at your option) any later version. + * + * Gluster Management Console is distributed in the hope that it + * will be useful, but WITHOUT ANY WARRANTY; without even the + * implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR + * PURPOSE. See the GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program. If not, see * <http://www.gnu.org/licenses/>. *******************************************************************************/ -package com.gluster.storage.management.core.model; +package org.gluster.storage.management.core.model; import java.util.ArrayList; import java.util.Arrays; @@ -33,9 +33,10 @@ import javax.xml.bind.annotation.XmlElementWrapper; import javax.xml.bind.annotation.XmlRootElement; import javax.xml.bind.annotation.XmlTransient; -import com.gluster.storage.management.core.constants.GlusterConstants; -import com.gluster.storage.management.core.utils.GlusterCoreUtil; -import com.gluster.storage.management.core.utils.StringUtil; +import org.gluster.storage.management.core.constants.GlusterConstants; +import org.gluster.storage.management.core.utils.GlusterCoreUtil; +import org.gluster.storage.management.core.utils.StringUtil; + @XmlRootElement public class Volume extends Entity { @@ -330,6 +331,14 @@ public class Volume extends Entity { if(oldBricks.size() != newBricks.size()) { return false; } + + if(!GlusterCoreUtil.getAddedEntities(oldBricks, newBricks, false).isEmpty()) { + return false; + } + + if(!GlusterCoreUtil.getAddedEntities(newBricks, oldBricks, false).isEmpty()) { + return false; + } Map<Brick, Brick> modifiedBricks = GlusterCoreUtil.getModifiedEntities(oldBricks, newBricks); if(modifiedBricks.size() > 0) { diff --git a/src/com.gluster.storage.management.core/src/com/gluster/storage/management/core/model/VolumeLogMessage.java b/src/org.gluster.storage.management.core/src/org/gluster/storage/management/core/model/VolumeLogMessage.java index 7b7b77c8..21b42aae 100644 --- a/src/com.gluster.storage.management.core/src/com/gluster/storage/management/core/model/VolumeLogMessage.java +++ b/src/org.gluster.storage.management.core/src/org/gluster/storage/management/core/model/VolumeLogMessage.java @@ -1,22 +1,22 @@ /******************************************************************************* - * Copyright (c) 2011 Gluster, Inc. <http://www.gluster.com> + * Copyright (c) 2006-2011 Gluster, Inc. <http://www.gluster.com> * This file is part of Gluster Management Console. * - * Gluster Management Console is free software; you can redistribute it and/or - * modify it under the terms of the GNU Affero General Public License as published - * by the Free Software Foundation; either version 3 of the License, or - * (at your option) any later version. - * - * Gluster Management Console is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY - * or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Affero General Public License - * for more details. - * - * You should have received a copy of the GNU Affero General Public License - * along with this program. If not, see + * Gluster Management Console is free software; you can redistribute + * it and/or modify it under the terms of the GNU General Public + * License as published by the Free Software Foundation; either + * version 3 of the License, or (at your option) any later version. + * + * Gluster Management Console is distributed in the hope that it + * will be useful, but WITHOUT ANY WARRANTY; without even the + * implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR + * PURPOSE. See the GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program. If not, see * <http://www.gnu.org/licenses/>. *******************************************************************************/ -package com.gluster.storage.management.core.model; +package org.gluster.storage.management.core.model; import java.util.Date; @@ -24,8 +24,9 @@ import javax.xml.bind.annotation.XmlElement; import javax.xml.bind.annotation.XmlRootElement; import javax.xml.bind.annotation.adapters.XmlJavaTypeAdapter; -import com.gluster.storage.management.core.model.adapters.VolumeLogDateAdapter; -import com.gluster.storage.management.core.utils.StringUtil; +import org.gluster.storage.management.core.model.adapters.VolumeLogDateAdapter; +import org.gluster.storage.management.core.utils.StringUtil; + @XmlRootElement public class VolumeLogMessage implements Filterable { diff --git a/src/com.gluster.storage.management.core/src/com/gluster/storage/management/core/model/VolumeOption.java b/src/org.gluster.storage.management.core/src/org/gluster/storage/management/core/model/VolumeOption.java index 6eb0c1bf..8c6d1d82 100644 --- a/src/com.gluster.storage.management.core/src/com/gluster/storage/management/core/model/VolumeOption.java +++ b/src/org.gluster.storage.management.core/src/org/gluster/storage/management/core/model/VolumeOption.java @@ -1,26 +1,27 @@ /******************************************************************************* - * Copyright (c) 2011 Gluster, Inc. <http://www.gluster.com> + * Copyright (c) 2006-2011 Gluster, Inc. <http://www.gluster.com> * This file is part of Gluster Management Console. * - * Gluster Management Console is free software; you can redistribute it and/or - * modify it under the terms of the GNU Affero General Public License as published - * by the Free Software Foundation; either version 3 of the License, or - * (at your option) any later version. - * - * Gluster Management Console is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY - * or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Affero General Public License - * for more details. - * - * You should have received a copy of the GNU Affero General Public License - * along with this program. If not, see + * Gluster Management Console is free software; you can redistribute + * it and/or modify it under the terms of the GNU General Public + * License as published by the Free Software Foundation; either + * version 3 of the License, or (at your option) any later version. + * + * Gluster Management Console is distributed in the hope that it + * will be useful, but WITHOUT ANY WARRANTY; without even the + * implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR + * PURPOSE. See the GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program. If not, see * <http://www.gnu.org/licenses/>. *******************************************************************************/ -package com.gluster.storage.management.core.model; +package org.gluster.storage.management.core.model; import javax.xml.bind.annotation.XmlRootElement; -import com.gluster.storage.management.core.utils.StringUtil; +import org.gluster.storage.management.core.utils.StringUtil; + /** * diff --git a/src/com.gluster.storage.management.core/src/com/gluster/storage/management/core/model/VolumeOptionInfo.java b/src/org.gluster.storage.management.core/src/org/gluster/storage/management/core/model/VolumeOptionInfo.java index 2cafc4b5..0e166c1c 100644 --- a/src/com.gluster.storage.management.core/src/com/gluster/storage/management/core/model/VolumeOptionInfo.java +++ b/src/org.gluster.storage.management.core/src/org/gluster/storage/management/core/model/VolumeOptionInfo.java @@ -1,24 +1,22 @@ -/** - * VolumeOptionInfo.java - * - * Copyright (c) 2011 Gluster, Inc. <http://www.gluster.com> +/******************************************************************************* + * Copyright (c) 2006-2011 Gluster, Inc. <http://www.gluster.com> * This file is part of Gluster Management Console. * - * Gluster Management Console is free software; you can redistribute it and/or - * modify it under the terms of the GNU Affero General Public License as published - * by the Free Software Foundation; either version 3 of the License, or - * (at your option) any later version. + * Gluster Management Console is free software; you can redistribute + * it and/or modify it under the terms of the GNU General Public + * License as published by the Free Software Foundation; either + * version 3 of the License, or (at your option) any later version. * - * Gluster Management Console is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY - * or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Affero General Public License - * for more details. + * Gluster Management Console is distributed in the hope that it + * will be useful, but WITHOUT ANY WARRANTY; without even the + * implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR + * PURPOSE. See the GNU General Public License for more details. * - * You should have received a copy of the GNU Affero General Public License - * along with this program. If not, see + * You should have received a copy of the GNU General Public License + * along with this program. If not, see * <http://www.gnu.org/licenses/>. - */ -package com.gluster.storage.management.core.model; + *******************************************************************************/ +package org.gluster.storage.management.core.model; import javax.xml.bind.annotation.XmlRootElement; diff --git a/src/com.gluster.storage.management.core/src/com/gluster/storage/management/core/model/VolumeOptions.java b/src/org.gluster.storage.management.core/src/org/gluster/storage/management/core/model/VolumeOptions.java index edeec768..90aaba54 100644 --- a/src/com.gluster.storage.management.core/src/com/gluster/storage/management/core/model/VolumeOptions.java +++ b/src/org.gluster.storage.management.core/src/org/gluster/storage/management/core/model/VolumeOptions.java @@ -1,22 +1,22 @@ /******************************************************************************* - * Copyright (c) 2011 Gluster, Inc. <http://www.gluster.com> + * Copyright (c) 2006-2011 Gluster, Inc. <http://www.gluster.com> * This file is part of Gluster Management Console. * - * Gluster Management Console is free software; you can redistribute it and/or - * modify it under the terms of the GNU Affero General Public License as published - * by the Free Software Foundation; either version 3 of the License, or - * (at your option) any later version. - * - * Gluster Management Console is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY - * or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Affero General Public License - * for more details. - * - * You should have received a copy of the GNU Affero General Public License - * along with this program. If not, see + * Gluster Management Console is free software; you can redistribute + * it and/or modify it under the terms of the GNU General Public + * License as published by the Free Software Foundation; either + * version 3 of the License, or (at your option) any later version. + * + * Gluster Management Console is distributed in the hope that it + * will be useful, but WITHOUT ANY WARRANTY; without even the + * implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR + * PURPOSE. See the GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program. If not, see * <http://www.gnu.org/licenses/>. *******************************************************************************/ -package com.gluster.storage.management.core.model; +package org.gluster.storage.management.core.model; import java.util.ArrayList; import java.util.List; diff --git a/src/com.gluster.storage.management.core/src/com/gluster/storage/management/core/model/adapters/VolumeLogDateAdapter.java b/src/org.gluster.storage.management.core/src/org/gluster/storage/management/core/model/adapters/VolumeLogDateAdapter.java index fac208ad..a1a50de4 100644 --- a/src/com.gluster.storage.management.core/src/com/gluster/storage/management/core/model/adapters/VolumeLogDateAdapter.java +++ b/src/org.gluster.storage.management.core/src/org/gluster/storage/management/core/model/adapters/VolumeLogDateAdapter.java @@ -1,29 +1,30 @@ /******************************************************************************* - * Copyright (c) 2011 Gluster, Inc. <http://www.gluster.com> + * Copyright (c) 2006-2011 Gluster, Inc. <http://www.gluster.com> * This file is part of Gluster Management Console. * - * Gluster Management Console is free software; you can redistribute it and/or - * modify it under the terms of the GNU Affero General Public License as published - * by the Free Software Foundation; either version 3 of the License, or - * (at your option) any later version. - * - * Gluster Management Console is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY - * or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Affero General Public License - * for more details. - * - * You should have received a copy of the GNU Affero General Public License - * along with this program. If not, see + * Gluster Management Console is free software; you can redistribute + * it and/or modify it under the terms of the GNU General Public + * License as published by the Free Software Foundation; either + * version 3 of the License, or (at your option) any later version. + * + * Gluster Management Console is distributed in the hope that it + * will be useful, but WITHOUT ANY WARRANTY; without even the + * implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR + * PURPOSE. See the GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program. If not, see * <http://www.gnu.org/licenses/>. *******************************************************************************/ -package com.gluster.storage.management.core.model.adapters; +package org.gluster.storage.management.core.model.adapters; import java.util.Date; import javax.xml.bind.annotation.adapters.XmlAdapter; -import com.gluster.storage.management.core.utils.DateUtil; +import org.gluster.storage.management.core.utils.DateUtil; + /** * Adapter class used for converting timestamp from Gluster volume log files to Date object. diff --git a/src/org.gluster.storage.management.core/src/org/gluster/storage/management/core/response/AbstractResponse.java b/src/org.gluster.storage.management.core/src/org/gluster/storage/management/core/response/AbstractResponse.java new file mode 100644 index 00000000..d0c386c1 --- /dev/null +++ b/src/org.gluster.storage.management.core/src/org/gluster/storage/management/core/response/AbstractResponse.java @@ -0,0 +1,35 @@ +/******************************************************************************* + * Copyright (c) 2006-2011 Gluster, Inc. <http://www.gluster.com> + * This file is part of Gluster Management Console. + * + * Gluster Management Console is free software; you can redistribute + * it and/or modify it under the terms of the GNU General Public + * License as published by the Free Software Foundation; either + * version 3 of the License, or (at your option) any later version. + * + * Gluster Management Console is distributed in the hope that it + * will be useful, but WITHOUT ANY WARRANTY; without even the + * implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR + * PURPOSE. See the GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program. If not, see + * <http://www.gnu.org/licenses/>. + *******************************************************************************/ +package org.gluster.storage.management.core.response; + +import org.gluster.storage.management.core.model.Response; +import org.gluster.storage.management.core.model.Status; + +public abstract class AbstractResponse implements Response<Object> { + private Status status; + + @Override + public Status getStatus() { + return status; + } + + public void setStatus(Status status) { + this.status = status; + } +} diff --git a/src/com.gluster.storage.management.core/src/com/gluster/storage/management/core/response/ClusterNameListResponse.java b/src/org.gluster.storage.management.core/src/org/gluster/storage/management/core/response/ClusterNameListResponse.java index 3b10ac86..ddac126d 100644 --- a/src/com.gluster.storage.management.core/src/com/gluster/storage/management/core/response/ClusterNameListResponse.java +++ b/src/org.gluster.storage.management.core/src/org/gluster/storage/management/core/response/ClusterNameListResponse.java @@ -1,22 +1,22 @@ /******************************************************************************* - * Copyright (c) 2011 Gluster, Inc. <http://www.gluster.com> + * Copyright (c) 2006-2011 Gluster, Inc. <http://www.gluster.com> * This file is part of Gluster Management Console. * - * Gluster Management Console is free software; you can redistribute it and/or - * modify it under the terms of the GNU Affero General Public License as published - * by the Free Software Foundation; either version 3 of the License, or - * (at your option) any later version. - * - * Gluster Management Console is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY - * or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Affero General Public License - * for more details. - * - * You should have received a copy of the GNU Affero General Public License - * along with this program. If not, see + * Gluster Management Console is free software; you can redistribute + * it and/or modify it under the terms of the GNU General Public + * License as published by the Free Software Foundation; either + * version 3 of the License, or (at your option) any later version. + * + * Gluster Management Console is distributed in the hope that it + * will be useful, but WITHOUT ANY WARRANTY; without even the + * implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR + * PURPOSE. See the GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program. If not, see * <http://www.gnu.org/licenses/>. *******************************************************************************/ -package com.gluster.storage.management.core.response; +package org.gluster.storage.management.core.response; import java.util.ArrayList; import java.util.List; diff --git a/src/org.gluster.storage.management.core/src/org/gluster/storage/management/core/response/FsTypeListResponse.java b/src/org.gluster.storage.management.core/src/org/gluster/storage/management/core/response/FsTypeListResponse.java new file mode 100644 index 00000000..4bd61d69 --- /dev/null +++ b/src/org.gluster.storage.management.core/src/org/gluster/storage/management/core/response/FsTypeListResponse.java @@ -0,0 +1,45 @@ +/******************************************************************************* + * Copyright (c) 2006-2011 Gluster, Inc. <http://www.gluster.com> + * This file is part of Gluster Management Console. + * + * Gluster Management Console is free software; you can redistribute + * it and/or modify it under the terms of the GNU General Public + * License as published by the Free Software Foundation; either + * version 3 of the License, or (at your option) any later version. + * + * Gluster Management Console is distributed in the hope that it + * will be useful, but WITHOUT ANY WARRANTY; without even the + * implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR + * PURPOSE. See the GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program. If not, see + * <http://www.gnu.org/licenses/>. + *******************************************************************************/ +package org.gluster.storage.management.core.response; + +import java.util.List; + +import javax.xml.bind.annotation.XmlElement; +import javax.xml.bind.annotation.XmlRootElement; + +@XmlRootElement(name = "fsTypes") +public class FsTypeListResponse { + private List<String> fsTypes; + + public FsTypeListResponse() { + } + + public FsTypeListResponse(List<String> fsTypes) { + setFsTypes(fsTypes); + } + + @XmlElement(name = "fsType", type=String.class) + public List<String> getFsTypes() { + return fsTypes; + } + + public void setFsTypes(List<String> fsTypes) { + this.fsTypes = fsTypes; + } +} diff --git a/src/com.gluster.storage.management.core/src/com/gluster/storage/management/core/response/GlusterServerListResponse.java b/src/org.gluster.storage.management.core/src/org/gluster/storage/management/core/response/GlusterServerListResponse.java index 868e2fc2..3e97bb71 100644 --- a/src/com.gluster.storage.management.core/src/com/gluster/storage/management/core/response/GlusterServerListResponse.java +++ b/src/org.gluster.storage.management.core/src/org/gluster/storage/management/core/response/GlusterServerListResponse.java @@ -1,24 +1,22 @@ -/** - * GlusterServerListResponse.java - * - * Copyright (c) 2011 Gluster, Inc. <http://www.gluster.com> +/******************************************************************************* + * Copyright (c) 2006-2011 Gluster, Inc. <http://www.gluster.com> * This file is part of Gluster Management Console. * - * Gluster Management Console is free software; you can redistribute it and/or - * modify it under the terms of the GNU Affero General Public License as published - * by the Free Software Foundation; either version 3 of the License, or - * (at your option) any later version. + * Gluster Management Console is free software; you can redistribute + * it and/or modify it under the terms of the GNU General Public + * License as published by the Free Software Foundation; either + * version 3 of the License, or (at your option) any later version. * - * Gluster Management Console is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY - * or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Affero General Public License - * for more details. + * Gluster Management Console is distributed in the hope that it + * will be useful, but WITHOUT ANY WARRANTY; without even the + * implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR + * PURPOSE. See the GNU General Public License for more details. * - * You should have received a copy of the GNU Affero General Public License - * along with this program. If not, see + * You should have received a copy of the GNU General Public License + * along with this program. If not, see * <http://www.gnu.org/licenses/>. - */ -package com.gluster.storage.management.core.response; + *******************************************************************************/ +package org.gluster.storage.management.core.response; import java.util.ArrayList; import java.util.List; @@ -26,7 +24,8 @@ import java.util.List; import javax.xml.bind.annotation.XmlElement; import javax.xml.bind.annotation.XmlRootElement; -import com.gluster.storage.management.core.model.GlusterServer; +import org.gluster.storage.management.core.model.GlusterServer; + /** * diff --git a/src/org.gluster.storage.management.core/src/org/gluster/storage/management/core/response/GlusterServerResponse.java b/src/org.gluster.storage.management.core/src/org/gluster/storage/management/core/response/GlusterServerResponse.java new file mode 100644 index 00000000..89d8affc --- /dev/null +++ b/src/org.gluster.storage.management.core/src/org/gluster/storage/management/core/response/GlusterServerResponse.java @@ -0,0 +1,54 @@ +/******************************************************************************* + * Copyright (c) 2006-2011 Gluster, Inc. <http://www.gluster.com> + * This file is part of Gluster Management Console. + * + * Gluster Management Console is free software; you can redistribute + * it and/or modify it under the terms of the GNU General Public + * License as published by the Free Software Foundation; either + * version 3 of the License, or (at your option) any later version. + * + * Gluster Management Console is distributed in the hope that it + * will be useful, but WITHOUT ANY WARRANTY; without even the + * implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR + * PURPOSE. See the GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program. If not, see + * <http://www.gnu.org/licenses/>. + *******************************************************************************/ +package org.gluster.storage.management.core.response; + +import javax.xml.bind.annotation.XmlRootElement; +import javax.xml.bind.annotation.XmlTransient; + +import org.gluster.storage.management.core.model.GlusterServer; +import org.gluster.storage.management.core.model.Status; + + +@XmlRootElement(name = "response") +public class GlusterServerResponse extends AbstractResponse { + private GlusterServer glusterServer; + + public GlusterServerResponse() { + } + + public GlusterServerResponse(Status status, GlusterServer server) { + setStatus(status); + setGlusterServer(server); + } + + public GlusterServer getGlusterServer() { + return glusterServer; + } + + public void setGlusterServer(GlusterServer glusterServer) { + this.glusterServer = glusterServer; + } + + @XmlTransient + @Override + public GlusterServer getData() { + return getGlusterServer(); + } + +} diff --git a/src/org.gluster.storage.management.core/src/org/gluster/storage/management/core/response/LogMessageListResponse.java b/src/org.gluster.storage.management.core/src/org/gluster/storage/management/core/response/LogMessageListResponse.java new file mode 100644 index 00000000..32370260 --- /dev/null +++ b/src/org.gluster.storage.management.core/src/org/gluster/storage/management/core/response/LogMessageListResponse.java @@ -0,0 +1,52 @@ +/******************************************************************************* + * Copyright (c) 2006-2011 Gluster, Inc. <http://www.gluster.com> + * This file is part of Gluster Management Console. + * + * Gluster Management Console is free software; you can redistribute + * it and/or modify it under the terms of the GNU General Public + * License as published by the Free Software Foundation; either + * version 3 of the License, or (at your option) any later version. + * + * Gluster Management Console is distributed in the hope that it + * will be useful, but WITHOUT ANY WARRANTY; without even the + * implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR + * PURPOSE. See the GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program. If not, see + * <http://www.gnu.org/licenses/>. + *******************************************************************************/ +/** + * + */ +package org.gluster.storage.management.core.response; + +import java.util.ArrayList; +import java.util.List; + +import javax.xml.bind.annotation.XmlElement; +import javax.xml.bind.annotation.XmlRootElement; + +import org.gluster.storage.management.core.model.VolumeLogMessage; + + +@XmlRootElement(name = "logMessages") +public class LogMessageListResponse { + private List<VolumeLogMessage> logMessages = new ArrayList<VolumeLogMessage>(); + + public LogMessageListResponse() { + } + + public LogMessageListResponse(List<VolumeLogMessage> logMessages) { + setLogMessages(logMessages); + } + + @XmlElement(name = "logMessage", type = VolumeLogMessage.class) + public List<VolumeLogMessage> getLogMessages() { + return logMessages; + } + + public void setLogMessages(List<VolumeLogMessage> logMessages) { + this.logMessages = logMessages; + } +} diff --git a/src/com.gluster.storage.management.core/src/com/gluster/storage/management/core/response/ServerListResponse.java b/src/org.gluster.storage.management.core/src/org/gluster/storage/management/core/response/ServerListResponse.java index 05627ab1..6f694900 100644 --- a/src/com.gluster.storage.management.core/src/com/gluster/storage/management/core/response/ServerListResponse.java +++ b/src/org.gluster.storage.management.core/src/org/gluster/storage/management/core/response/ServerListResponse.java @@ -1,22 +1,22 @@ /******************************************************************************* - * Copyright (c) 2011 Gluster, Inc. <http://www.gluster.com> + * Copyright (c) 2006-2011 Gluster, Inc. <http://www.gluster.com> * This file is part of Gluster Management Console. * - * Gluster Management Console is free software; you can redistribute it and/or - * modify it under the terms of the GNU Affero General Public License as published - * by the Free Software Foundation; either version 3 of the License, or - * (at your option) any later version. - * - * Gluster Management Console is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY - * or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Affero General Public License - * for more details. - * - * You should have received a copy of the GNU Affero General Public License - * along with this program. If not, see + * Gluster Management Console is free software; you can redistribute + * it and/or modify it under the terms of the GNU General Public + * License as published by the Free Software Foundation; either + * version 3 of the License, or (at your option) any later version. + * + * Gluster Management Console is distributed in the hope that it + * will be useful, but WITHOUT ANY WARRANTY; without even the + * implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR + * PURPOSE. See the GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program. If not, see * <http://www.gnu.org/licenses/>. *******************************************************************************/ -package com.gluster.storage.management.core.response; +package org.gluster.storage.management.core.response; import java.util.ArrayList; import java.util.List; @@ -24,7 +24,8 @@ import java.util.List; import javax.xml.bind.annotation.XmlElement; import javax.xml.bind.annotation.XmlRootElement; -import com.gluster.storage.management.core.model.Server; +import org.gluster.storage.management.core.model.Server; + @XmlRootElement(name = "servers") public class ServerListResponse { diff --git a/src/com.gluster.storage.management.core/src/com/gluster/storage/management/core/response/ServerNameListResponse.java b/src/org.gluster.storage.management.core/src/org/gluster/storage/management/core/response/ServerNameListResponse.java index 2211f29f..c52b2b11 100644 --- a/src/com.gluster.storage.management.core/src/com/gluster/storage/management/core/response/ServerNameListResponse.java +++ b/src/org.gluster.storage.management.core/src/org/gluster/storage/management/core/response/ServerNameListResponse.java @@ -1,22 +1,22 @@ /******************************************************************************* - * Copyright (c) 2011 Gluster, Inc. <http://www.gluster.com> + * Copyright (c) 2006-2011 Gluster, Inc. <http://www.gluster.com> * This file is part of Gluster Management Console. * - * Gluster Management Console is free software; you can redistribute it and/or - * modify it under the terms of the GNU Affero General Public License as published - * by the Free Software Foundation; either version 3 of the License, or - * (at your option) any later version. - * - * Gluster Management Console is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY - * or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Affero General Public License - * for more details. - * - * You should have received a copy of the GNU Affero General Public License - * along with this program. If not, see + * Gluster Management Console is free software; you can redistribute + * it and/or modify it under the terms of the GNU General Public + * License as published by the Free Software Foundation; either + * version 3 of the License, or (at your option) any later version. + * + * Gluster Management Console is distributed in the hope that it + * will be useful, but WITHOUT ANY WARRANTY; without even the + * implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR + * PURPOSE. See the GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program. If not, see * <http://www.gnu.org/licenses/>. *******************************************************************************/ -package com.gluster.storage.management.core.response; +package org.gluster.storage.management.core.response; import java.util.ArrayList; import java.util.List; diff --git a/src/com.gluster.storage.management.core/src/com/gluster/storage/management/core/response/StringListResponse.java b/src/org.gluster.storage.management.core/src/org/gluster/storage/management/core/response/StringListResponse.java index 785c6efb..feb6edd9 100644 --- a/src/com.gluster.storage.management.core/src/com/gluster/storage/management/core/response/StringListResponse.java +++ b/src/org.gluster.storage.management.core/src/org/gluster/storage/management/core/response/StringListResponse.java @@ -1,22 +1,22 @@ /******************************************************************************* - * Copyright (c) 2011 Gluster, Inc. <http://www.gluster.com> + * Copyright (c) 2006-2011 Gluster, Inc. <http://www.gluster.com> * This file is part of Gluster Management Console. * - * Gluster Management Console is free software; you can redistribute it and/or - * modify it under the terms of the GNU Affero General Public License as published - * by the Free Software Foundation; either version 3 of the License, or - * (at your option) any later version. - * - * Gluster Management Console is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY - * or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Affero General Public License - * for more details. - * - * You should have received a copy of the GNU Affero General Public License - * along with this program. If not, see + * Gluster Management Console is free software; you can redistribute + * it and/or modify it under the terms of the GNU General Public + * License as published by the Free Software Foundation; either + * version 3 of the License, or (at your option) any later version. + * + * Gluster Management Console is distributed in the hope that it + * will be useful, but WITHOUT ANY WARRANTY; without even the + * implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR + * PURPOSE. See the GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program. If not, see * <http://www.gnu.org/licenses/>. *******************************************************************************/ -package com.gluster.storage.management.core.response; +package org.gluster.storage.management.core.response; import java.util.ArrayList; import java.util.List; @@ -25,7 +25,8 @@ import javax.xml.bind.annotation.XmlElement; import javax.xml.bind.annotation.XmlElementWrapper; import javax.xml.bind.annotation.XmlRootElement; -import com.gluster.storage.management.core.model.Status; +import org.gluster.storage.management.core.model.Status; + @XmlRootElement(name = "response") public class StringListResponse extends AbstractResponse { diff --git a/src/com.gluster.storage.management.core/src/com/gluster/storage/management/core/response/TaskIdResponse.java b/src/org.gluster.storage.management.core/src/org/gluster/storage/management/core/response/TaskIdResponse.java index f2610104..809692b5 100644 --- a/src/com.gluster.storage.management.core/src/com/gluster/storage/management/core/response/TaskIdResponse.java +++ b/src/org.gluster.storage.management.core/src/org/gluster/storage/management/core/response/TaskIdResponse.java @@ -1,22 +1,22 @@ /******************************************************************************* - * Copyright (c) 2011 Gluster, Inc. <http://www.gluster.com> + * Copyright (c) 2006-2011 Gluster, Inc. <http://www.gluster.com> * This file is part of Gluster Management Console. * - * Gluster Management Console is free software; you can redistribute it and/or - * modify it under the terms of the GNU Affero General Public License as published - * by the Free Software Foundation; either version 3 of the License, or - * (at your option) any later version. - * - * Gluster Management Console is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY - * or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Affero General Public License - * for more details. - * - * You should have received a copy of the GNU Affero General Public License - * along with this program. If not, see + * Gluster Management Console is free software; you can redistribute + * it and/or modify it under the terms of the GNU General Public + * License as published by the Free Software Foundation; either + * version 3 of the License, or (at your option) any later version. + * + * Gluster Management Console is distributed in the hope that it + * will be useful, but WITHOUT ANY WARRANTY; without even the + * implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR + * PURPOSE. See the GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program. If not, see * <http://www.gnu.org/licenses/>. *******************************************************************************/ -package com.gluster.storage.management.core.response; +package org.gluster.storage.management.core.response; import javax.xml.bind.annotation.XmlElement; import javax.xml.bind.annotation.XmlRootElement; diff --git a/src/com.gluster.storage.management.core/src/com/gluster/storage/management/core/response/TaskInfoListResponse.java b/src/org.gluster.storage.management.core/src/org/gluster/storage/management/core/response/TaskInfoListResponse.java index ba1c4f9f..a111eba8 100644 --- a/src/com.gluster.storage.management.core/src/com/gluster/storage/management/core/response/TaskInfoListResponse.java +++ b/src/org.gluster.storage.management.core/src/org/gluster/storage/management/core/response/TaskInfoListResponse.java @@ -1,24 +1,22 @@ -/** - * TaskListResponse.java - * - * Copyright (c) 2011 Gluster, Inc. <http://www.gluster.com> +/******************************************************************************* + * Copyright (c) 2006-2011 Gluster, Inc. <http://www.gluster.com> * This file is part of Gluster Management Console. * - * Gluster Management Console is free software; you can redistribute it and/or - * modify it under the terms of the GNU Affero General Public License as published - * by the Free Software Foundation; either version 3 of the License, or - * (at your option) any later version. + * Gluster Management Console is free software; you can redistribute + * it and/or modify it under the terms of the GNU General Public + * License as published by the Free Software Foundation; either + * version 3 of the License, or (at your option) any later version. * - * Gluster Management Console is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY - * or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Affero General Public License - * for more details. + * Gluster Management Console is distributed in the hope that it + * will be useful, but WITHOUT ANY WARRANTY; without even the + * implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR + * PURPOSE. See the GNU General Public License for more details. * - * You should have received a copy of the GNU Affero General Public License - * along with this program. If not, see + * You should have received a copy of the GNU General Public License + * along with this program. If not, see * <http://www.gnu.org/licenses/>. - */ -package com.gluster.storage.management.core.response; + *******************************************************************************/ +package org.gluster.storage.management.core.response; import java.util.ArrayList; import java.util.List; @@ -26,7 +24,8 @@ import java.util.List; import javax.xml.bind.annotation.XmlElement; import javax.xml.bind.annotation.XmlRootElement; -import com.gluster.storage.management.core.model.TaskInfo; +import org.gluster.storage.management.core.model.TaskInfo; + @XmlRootElement(name = "tasks") public class TaskInfoListResponse { diff --git a/src/org.gluster.storage.management.core/src/org/gluster/storage/management/core/response/TaskResponse.java b/src/org.gluster.storage.management.core/src/org/gluster/storage/management/core/response/TaskResponse.java new file mode 100755 index 00000000..fa557117 --- /dev/null +++ b/src/org.gluster.storage.management.core/src/org/gluster/storage/management/core/response/TaskResponse.java @@ -0,0 +1,51 @@ +/******************************************************************************* + * Copyright (c) 2006-2011 Gluster, Inc. <http://www.gluster.com> + * This file is part of Gluster Management Console. + * + * Gluster Management Console is free software; you can redistribute + * it and/or modify it under the terms of the GNU General Public + * License as published by the Free Software Foundation; either + * version 3 of the License, or (at your option) any later version. + * + * Gluster Management Console is distributed in the hope that it + * will be useful, but WITHOUT ANY WARRANTY; without even the + * implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR + * PURPOSE. See the GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program. If not, see + * <http://www.gnu.org/licenses/>. + *******************************************************************************/ +package org.gluster.storage.management.core.response; + +import javax.xml.bind.annotation.XmlRootElement; + +import org.gluster.storage.management.core.model.Status; +import org.gluster.storage.management.core.model.TaskInfo; + + +@XmlRootElement(name = "response") +public class TaskResponse extends AbstractResponse { + private TaskInfo taskInfo; + private Status status; + + public TaskResponse() { + } + + public Status getStatus() { + return status; + } + + public void setStatus(Status status) { + this.status = status; + } + + public void setData(TaskInfo taskInfo) { + this.taskInfo = taskInfo; + } + + @Override + public TaskInfo getData() { + return taskInfo; + } +} diff --git a/src/org.gluster.storage.management.core/src/org/gluster/storage/management/core/response/VolumeListResponse.java b/src/org.gluster.storage.management.core/src/org/gluster/storage/management/core/response/VolumeListResponse.java new file mode 100644 index 00000000..ebb73214 --- /dev/null +++ b/src/org.gluster.storage.management.core/src/org/gluster/storage/management/core/response/VolumeListResponse.java @@ -0,0 +1,50 @@ +/******************************************************************************* + * Copyright (c) 2006-2011 Gluster, Inc. <http://www.gluster.com> + * This file is part of Gluster Management Console. + * + * Gluster Management Console is free software; you can redistribute + * it and/or modify it under the terms of the GNU General Public + * License as published by the Free Software Foundation; either + * version 3 of the License, or (at your option) any later version. + * + * Gluster Management Console is distributed in the hope that it + * will be useful, but WITHOUT ANY WARRANTY; without even the + * implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR + * PURPOSE. See the GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program. If not, see + * <http://www.gnu.org/licenses/>. + *******************************************************************************/ +package org.gluster.storage.management.core.response; + +import java.util.ArrayList; +import java.util.List; + +import javax.xml.bind.annotation.XmlElement; +import javax.xml.bind.annotation.XmlRootElement; + +import org.gluster.storage.management.core.model.Volume; + + +@XmlRootElement(name = "volumes") +public class VolumeListResponse { + private List<Volume> volumes = new ArrayList<Volume>(); + + public VolumeListResponse() { + + } + + public VolumeListResponse(List<Volume> volumes) { + setVolumes(volumes); + } + + @XmlElement(name = "volume", type = Volume.class) + public List<Volume> getVolumes() { + return this.volumes; + } + + public void setVolumes(List<Volume> volumes) { + this.volumes = volumes; + } +} diff --git a/src/com.gluster.storage.management.core/src/com/gluster/storage/management/core/response/VolumeOptionInfoListResponse.java b/src/org.gluster.storage.management.core/src/org/gluster/storage/management/core/response/VolumeOptionInfoListResponse.java index dfacf19f..49afd95f 100644 --- a/src/com.gluster.storage.management.core/src/com/gluster/storage/management/core/response/VolumeOptionInfoListResponse.java +++ b/src/org.gluster.storage.management.core/src/org/gluster/storage/management/core/response/VolumeOptionInfoListResponse.java @@ -1,22 +1,22 @@ /******************************************************************************* - * Copyright (c) 2011 Gluster, Inc. <http://www.gluster.com> + * Copyright (c) 2006-2011 Gluster, Inc. <http://www.gluster.com> * This file is part of Gluster Management Console. * - * Gluster Management Console is free software; you can redistribute it and/or - * modify it under the terms of the GNU Affero General Public License as published - * by the Free Software Foundation; either version 3 of the License, or - * (at your option) any later version. - * - * Gluster Management Console is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY - * or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Affero General Public License - * for more details. - * - * You should have received a copy of the GNU Affero General Public License - * along with this program. If not, see + * Gluster Management Console is free software; you can redistribute + * it and/or modify it under the terms of the GNU General Public + * License as published by the Free Software Foundation; either + * version 3 of the License, or (at your option) any later version. + * + * Gluster Management Console is distributed in the hope that it + * will be useful, but WITHOUT ANY WARRANTY; without even the + * implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR + * PURPOSE. See the GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program. If not, see * <http://www.gnu.org/licenses/>. *******************************************************************************/ -package com.gluster.storage.management.core.response; +package org.gluster.storage.management.core.response; import java.util.ArrayList; import java.util.List; @@ -24,7 +24,8 @@ import java.util.List; import javax.xml.bind.annotation.XmlElement; import javax.xml.bind.annotation.XmlRootElement; -import com.gluster.storage.management.core.model.VolumeOptionInfo; +import org.gluster.storage.management.core.model.VolumeOptionInfo; + @XmlRootElement(name = "options") public class VolumeOptionInfoListResponse { diff --git a/src/com.gluster.storage.management.core/src/com/gluster/storage/management/core/utils/DateUtil.java b/src/org.gluster.storage.management.core/src/org/gluster/storage/management/core/utils/DateUtil.java index 8677fecd..9d97eb39 100644 --- a/src/com.gluster.storage.management.core/src/com/gluster/storage/management/core/utils/DateUtil.java +++ b/src/org.gluster.storage.management.core/src/org/gluster/storage/management/core/utils/DateUtil.java @@ -1,29 +1,31 @@ /******************************************************************************* - * Copyright (c) 2011 Gluster, Inc. <http://www.gluster.com> + * Copyright (c) 2006-2011 Gluster, Inc. <http://www.gluster.com> * This file is part of Gluster Management Console. * - * Gluster Management Console is free software; you can redistribute it and/or - * modify it under the terms of the GNU Affero General Public License as published - * by the Free Software Foundation; either version 3 of the License, or - * (at your option) any later version. - * - * Gluster Management Console is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY - * or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Affero General Public License - * for more details. - * - * You should have received a copy of the GNU Affero General Public License - * along with this program. If not, see + * Gluster Management Console is free software; you can redistribute + * it and/or modify it under the terms of the GNU General Public + * License as published by the Free Software Foundation; either + * version 3 of the License, or (at your option) any later version. + * + * Gluster Management Console is distributed in the hope that it + * will be useful, but WITHOUT ANY WARRANTY; without even the + * implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR + * PURPOSE. See the GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program. If not, see * <http://www.gnu.org/licenses/>. *******************************************************************************/ -package com.gluster.storage.management.core.utils; +package org.gluster.storage.management.core.utils; import java.text.ParseException; import java.text.SimpleDateFormat; +import java.util.Calendar; import java.util.Date; -import com.gluster.storage.management.core.constants.CoreConstants; -import com.gluster.storage.management.core.exceptions.GlusterRuntimeException; +import org.gluster.storage.management.core.constants.CoreConstants; +import org.gluster.storage.management.core.exceptions.GlusterRuntimeException; + public class DateUtil { @@ -108,4 +110,11 @@ public class DateUtil { public static final Date stringToDate(String input) { return stringToDate(input, CoreConstants.DATE_WITH_TIME_FORMAT); } + + public static final Date getDate(int year, int month, int day, int hour, int min, int sec, int msec) { + Calendar calendar = Calendar.getInstance(); + calendar.set(year, month-1, day, hour, min, sec); + calendar.set(Calendar.MILLISECOND, msec); + return calendar.getTime(); + } } diff --git a/src/com.gluster.storage.management.core/src/com/gluster/storage/management/core/utils/FileUtil.java b/src/org.gluster.storage.management.core/src/org/gluster/storage/management/core/utils/FileUtil.java index 601a3790..e84655cb 100644 --- a/src/com.gluster.storage.management.core/src/com/gluster/storage/management/core/utils/FileUtil.java +++ b/src/org.gluster.storage.management.core/src/org/gluster/storage/management/core/utils/FileUtil.java @@ -1,22 +1,22 @@ /******************************************************************************* - * Copyright (c) 2011 Gluster, Inc. <http://www.gluster.com> + * Copyright (c) 2006-2011 Gluster, Inc. <http://www.gluster.com> * This file is part of Gluster Management Console. * - * Gluster Management Console is free software; you can redistribute it and/or - * modify it under the terms of the GNU Affero General Public License as published - * by the Free Software Foundation; either version 3 of the License, or - * (at your option) any later version. - * - * Gluster Management Console is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY - * or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Affero General Public License - * for more details. - * - * You should have received a copy of the GNU Affero General Public License - * along with this program. If not, see + * Gluster Management Console is free software; you can redistribute + * it and/or modify it under the terms of the GNU General Public + * License as published by the Free Software Foundation; either + * version 3 of the License, or (at your option) any later version. + * + * Gluster Management Console is distributed in the hope that it + * will be useful, but WITHOUT ANY WARRANTY; without even the + * implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR + * PURPOSE. See the GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program. If not, see * <http://www.gnu.org/licenses/>. *******************************************************************************/ -package com.gluster.storage.management.core.utils; +package org.gluster.storage.management.core.utils; import java.io.File; import java.io.FileInputStream; @@ -24,8 +24,9 @@ import java.io.FileWriter; import java.io.IOException; import java.util.UUID; -import com.gluster.storage.management.core.constants.CoreConstants; -import com.gluster.storage.management.core.exceptions.GlusterRuntimeException; +import org.gluster.storage.management.core.constants.CoreConstants; +import org.gluster.storage.management.core.exceptions.GlusterRuntimeException; + public class FileUtil { public static String readFileAsString(File file) { diff --git a/src/com.gluster.storage.management.core/src/com/gluster/storage/management/core/utils/GlusterCoreUtil.java b/src/org.gluster.storage.management.core/src/org/gluster/storage/management/core/utils/GlusterCoreUtil.java index 39794b79..78b13fef 100644 --- a/src/com.gluster.storage.management.core/src/com/gluster/storage/management/core/utils/GlusterCoreUtil.java +++ b/src/org.gluster.storage.management.core/src/org/gluster/storage/management/core/utils/GlusterCoreUtil.java @@ -1,24 +1,22 @@ -/** - * GlusterCoreUtil.java - * - * Copyright (c) 2011 Gluster, Inc. <http://www.gluster.com> +/******************************************************************************* + * Copyright (c) 2006-2011 Gluster, Inc. <http://www.gluster.com> * This file is part of Gluster Management Console. * - * Gluster Management Console is free software; you can redistribute it and/or - * modify it under the terms of the GNU Affero General Public License as published - * by the Free Software Foundation; either version 3 of the License, or - * (at your option) any later version. + * Gluster Management Console is free software; you can redistribute + * it and/or modify it under the terms of the GNU General Public + * License as published by the Free Software Foundation; either + * version 3 of the License, or (at your option) any later version. * - * Gluster Management Console is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY - * or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Affero General Public License - * for more details. + * Gluster Management Console is distributed in the hope that it + * will be useful, but WITHOUT ANY WARRANTY; without even the + * implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR + * PURPOSE. See the GNU General Public License for more details. * - * You should have received a copy of the GNU Affero General Public License - * along with this program. If not, see + * You should have received a copy of the GNU General Public License + * along with this program. If not, see * <http://www.gnu.org/licenses/>. - */ -package com.gluster.storage.management.core.utils; + *******************************************************************************/ +package org.gluster.storage.management.core.utils; import java.util.ArrayList; import java.util.Collection; @@ -28,11 +26,12 @@ import java.util.List; import java.util.Map; import java.util.Set; -import com.gluster.storage.management.core.model.Brick; -import com.gluster.storage.management.core.model.Disk; -import com.gluster.storage.management.core.model.Entity; -import com.gluster.storage.management.core.model.Partition; -import com.gluster.storage.management.core.model.Server; +import org.gluster.storage.management.core.model.Brick; +import org.gluster.storage.management.core.model.Disk; +import org.gluster.storage.management.core.model.Entity; +import org.gluster.storage.management.core.model.Partition; +import org.gluster.storage.management.core.model.Server; + public class GlusterCoreUtil { diff --git a/src/com.gluster.storage.management.core/src/com/gluster/storage/management/core/utils/JavaUtil.java b/src/org.gluster.storage.management.core/src/org/gluster/storage/management/core/utils/JavaUtil.java index fe2fc860..09e12680 100644 --- a/src/com.gluster.storage.management.core/src/com/gluster/storage/management/core/utils/JavaUtil.java +++ b/src/org.gluster.storage.management.core/src/org/gluster/storage/management/core/utils/JavaUtil.java @@ -1,22 +1,22 @@ /******************************************************************************* - * Copyright (c) 2011 Gluster, Inc. <http://www.gluster.com> + * Copyright (c) 2006-2011 Gluster, Inc. <http://www.gluster.com> * This file is part of Gluster Management Console. * - * Gluster Management Console is free software; you can redistribute it and/or - * modify it under the terms of the GNU Affero General Public License as published - * by the Free Software Foundation; either version 3 of the License, or - * (at your option) any later version. - * - * Gluster Management Console is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY - * or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Affero General Public License - * for more details. - * - * You should have received a copy of the GNU Affero General Public License - * along with this program. If not, see + * Gluster Management Console is free software; you can redistribute + * it and/or modify it under the terms of the GNU General Public + * License as published by the Free Software Foundation; either + * version 3 of the License, or (at your option) any later version. + * + * Gluster Management Console is distributed in the hope that it + * will be useful, but WITHOUT ANY WARRANTY; without even the + * implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR + * PURPOSE. See the GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program. If not, see * <http://www.gnu.org/licenses/>. *******************************************************************************/ -package com.gluster.storage.management.core.utils; +package org.gluster.storage.management.core.utils; import java.util.List; diff --git a/src/com.gluster.storage.management.core/src/com/gluster/storage/management/core/utils/LRUCache.java b/src/org.gluster.storage.management.core/src/org/gluster/storage/management/core/utils/LRUCache.java index f3c9c72d..edd519d9 100644 --- a/src/com.gluster.storage.management.core/src/com/gluster/storage/management/core/utils/LRUCache.java +++ b/src/org.gluster.storage.management.core/src/org/gluster/storage/management/core/utils/LRUCache.java @@ -1,24 +1,22 @@ -/** - * LRUCache.java - * - * Copyright (c) 2011 Gluster, Inc. <http://www.gluster.com> +/******************************************************************************* + * Copyright (c) 2006-2011 Gluster, Inc. <http://www.gluster.com> * This file is part of Gluster Management Console. * - * Gluster Management Console is free software; you can redistribute it and/or - * modify it under the terms of the GNU Affero General Public License as published - * by the Free Software Foundation; either version 3 of the License, or - * (at your option) any later version. + * Gluster Management Console is free software; you can redistribute + * it and/or modify it under the terms of the GNU General Public + * License as published by the Free Software Foundation; either + * version 3 of the License, or (at your option) any later version. * - * Gluster Management Console is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY - * or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Affero General Public License - * for more details. + * Gluster Management Console is distributed in the hope that it + * will be useful, but WITHOUT ANY WARRANTY; without even the + * implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR + * PURPOSE. See the GNU General Public License for more details. * - * You should have received a copy of the GNU Affero General Public License - * along with this program. If not, see + * You should have received a copy of the GNU General Public License + * along with this program. If not, see * <http://www.gnu.org/licenses/>. - */ -package com.gluster.storage.management.core.utils; + *******************************************************************************/ +package org.gluster.storage.management.core.utils; import java.util.LinkedHashMap; import java.util.Map; diff --git a/src/com.gluster.storage.management.core/src/com/gluster/storage/management/core/utils/NumberUtil.java b/src/org.gluster.storage.management.core/src/org/gluster/storage/management/core/utils/NumberUtil.java index 9b1cd5e2..ff41c6dd 100644 --- a/src/com.gluster.storage.management.core/src/com/gluster/storage/management/core/utils/NumberUtil.java +++ b/src/org.gluster.storage.management.core/src/org/gluster/storage/management/core/utils/NumberUtil.java @@ -1,22 +1,22 @@ /******************************************************************************* - * Copyright (c) 2011 Gluster, Inc. <http://www.gluster.com> + * Copyright (c) 2006-2011 Gluster, Inc. <http://www.gluster.com> * This file is part of Gluster Management Console. * - * Gluster Management Console is free software; you can redistribute it and/or - * modify it under the terms of the GNU Affero General Public License as published - * by the Free Software Foundation; either version 3 of the License, or - * (at your option) any later version. - * - * Gluster Management Console is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY - * or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Affero General Public License - * for more details. - * - * You should have received a copy of the GNU Affero General Public License - * along with this program. If not, see + * Gluster Management Console is free software; you can redistribute + * it and/or modify it under the terms of the GNU General Public + * License as published by the Free Software Foundation; either + * version 3 of the License, or (at your option) any later version. + * + * Gluster Management Console is distributed in the hope that it + * will be useful, but WITHOUT ANY WARRANTY; without even the + * implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR + * PURPOSE. See the GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program. If not, see * <http://www.gnu.org/licenses/>. *******************************************************************************/ -package com.gluster.storage.management.core.utils; +package org.gluster.storage.management.core.utils; import java.text.NumberFormat; diff --git a/src/com.gluster.storage.management.core/src/com/gluster/storage/management/core/utils/ProcessResult.java b/src/org.gluster.storage.management.core/src/org/gluster/storage/management/core/utils/ProcessResult.java index c297a9c4..6e5e5fbf 100644 --- a/src/com.gluster.storage.management.core/src/com/gluster/storage/management/core/utils/ProcessResult.java +++ b/src/org.gluster.storage.management.core/src/org/gluster/storage/management/core/utils/ProcessResult.java @@ -1,22 +1,22 @@ /******************************************************************************* - * Copyright (c) 2011 Gluster, Inc. <http://www.gluster.com> + * Copyright (c) 2006-2011 Gluster, Inc. <http://www.gluster.com> * This file is part of Gluster Management Console. * - * Gluster Management Console is free software; you can redistribute it and/or - * modify it under the terms of the GNU Affero General Public License as published - * by the Free Software Foundation; either version 3 of the License, or - * (at your option) any later version. - * - * Gluster Management Console is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY - * or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Affero General Public License - * for more details. - * - * You should have received a copy of the GNU Affero General Public License - * along with this program. If not, see + * Gluster Management Console is free software; you can redistribute + * it and/or modify it under the terms of the GNU General Public + * License as published by the Free Software Foundation; either + * version 3 of the License, or (at your option) any later version. + * + * Gluster Management Console is distributed in the hope that it + * will be useful, but WITHOUT ANY WARRANTY; without even the + * implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR + * PURPOSE. See the GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program. If not, see * <http://www.gnu.org/licenses/>. *******************************************************************************/ -package com.gluster.storage.management.core.utils; +package org.gluster.storage.management.core.utils; import javax.xml.bind.annotation.XmlRootElement; diff --git a/src/org.gluster.storage.management.core/src/org/gluster/storage/management/core/utils/ProcessUtil.java b/src/org.gluster.storage.management.core/src/org/gluster/storage/management/core/utils/ProcessUtil.java new file mode 100644 index 00000000..9a628cad --- /dev/null +++ b/src/org.gluster.storage.management.core/src/org/gluster/storage/management/core/utils/ProcessUtil.java @@ -0,0 +1,144 @@ +/******************************************************************************* + * Copyright (c) 2006-2011 Gluster, Inc. <http://www.gluster.com> + * This file is part of Gluster Management Console. + * + * Gluster Management Console is free software; you can redistribute + * it and/or modify it under the terms of the GNU General Public + * License as published by the Free Software Foundation; either + * version 3 of the License, or (at your option) any later version. + * + * Gluster Management Console is distributed in the hope that it + * will be useful, but WITHOUT ANY WARRANTY; without even the + * implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR + * PURPOSE. See the GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program. If not, see + * <http://www.gnu.org/licenses/>. + *******************************************************************************/ +package org.gluster.storage.management.core.utils; + +import static org.gluster.storage.management.core.constants.CoreConstants.NEWLINE; + +import java.io.BufferedReader; +import java.io.InputStream; +import java.io.InputStreamReader; +import java.util.ArrayList; +import java.util.List; +import java.util.Map; + +import org.gluster.storage.management.core.exceptions.GlusterRuntimeException; + + +/** + * Utility class for creating processes (foreground/background) with given + * command and checking the output/exit status + */ +public class ProcessUtil { + + public static ProcessResult executeCommand(List<String> command) { + return executeCommand(true, command); + } + + /** + * Waits till all the threads in given list are dead + * @param threads Threads to watch + * @throws InterruptedException + */ + public static void waitForThreads(List<Thread> threads) throws InterruptedException { + // Wait till all servers have been processed + for (int i = threads.size() - 1; i >= 0; i--) { + if (threads.get(i).isAlive()) { + // thread alive. sleep for half a second and check again. + Thread.sleep(500); + i++; // check the same thread in next iteration + } + } + } + + /** + * Executes given command in a separate process in FOREGROUND + * @param command + * @return {@link ProcessResult} object + */ + public static ProcessResult executeCommand(String... command) { + ArrayList<String> commandList = new ArrayList<String>(); + for (String part : command) { + commandList.add(part); + } + return executeCommand(commandList); + } + + /** + * Creates a process builder for executing given command with given set of environment variables + * + * @param command + * The command to be executed + * @param env + * Set of env variables to be made available to the command + * @return Process builder that can be used to execute the command + */ + private static ProcessBuilder createProcessBuilder(List<String> command, Map<String, String> env) { + ProcessBuilder builder = new ProcessBuilder(command); + if (env != null) { + builder.environment().putAll(env); + } + return builder; + } + + /** + * Executes given command in foreground/background + * + * @param runInForeground + * Boolean flag indicating whether the command should + * be executed in foreground + * @param command + * @return {@link ProcessResult} object + */ + public static ProcessResult executeCommand(boolean runInForeground, List<String> command) { + return executeCommand(runInForeground, command, null); + } + + /** + * Executes given command in foreground/background + * + * @param runInForeground + * Boolean flag indicating whether the command should + * be executed in foreground + * @param command + * @param env + * Set of env variables to be made available to the command + * @return {@link ProcessResult} object + */ + public static ProcessResult executeCommand(boolean runInForeground, List<String> command, Map<String, String> env) { + StringBuilder output = new StringBuilder(); + try { + Process process = createProcessBuilder(command, env).redirectErrorStream(true).start(); + if (runInForeground) { + process.waitFor(); // Wait for process to finish + + InputStream is = process.getInputStream(); + InputStreamReader isr = new InputStreamReader(is); + BufferedReader br = new BufferedReader(isr); + String line; + + while ((line = br.readLine()) != null) { + output.append(line); + output.append(NEWLINE); + } + br.close(); + isr.close(); + is.close(); + } else { + output.append("Command ["); + output.append(command); + output.append("] triggerred in background."); + } + + return new ProcessResult(process.exitValue(), output.toString()); + } catch (Throwable e) { + throw new GlusterRuntimeException("Exception while executing command [" + command + "] : [" + + e.getMessage() + "]", e); + } + } +} diff --git a/src/com.gluster.storage.management.core/src/com/gluster/storage/management/core/utils/StringUtil.java b/src/org.gluster.storage.management.core/src/org/gluster/storage/management/core/utils/StringUtil.java index cdf71dcc..f3515c97 100644 --- a/src/com.gluster.storage.management.core/src/com/gluster/storage/management/core/utils/StringUtil.java +++ b/src/org.gluster.storage.management.core/src/org/gluster/storage/management/core/utils/StringUtil.java @@ -1,24 +1,23 @@ /******************************************************************************* - * Copyright (c) 2011 Gluster, Inc. <http://www.gluster.com> + * Copyright (c) 2006-2011 Gluster, Inc. <http://www.gluster.com> * This file is part of Gluster Management Console. * - * Gluster Management Console is free software; you can redistribute it and/or - * modify it under the terms of the GNU Affero General Public License as published - * by the Free Software Foundation; either version 3 of the License, or - * (at your option) any later version. - * - * Gluster Management Console is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY - * or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Affero General Public License - * for more details. - * - * You should have received a copy of the GNU Affero General Public License - * along with this program. If not, see + * Gluster Management Console is free software; you can redistribute + * it and/or modify it under the terms of the GNU General Public + * License as published by the Free Software Foundation; either + * version 3 of the License, or (at your option) any later version. + * + * Gluster Management Console is distributed in the hope that it + * will be useful, but WITHOUT ANY WARRANTY; without even the + * implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR + * PURPOSE. See the GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program. If not, see * <http://www.gnu.org/licenses/>. *******************************************************************************/ -package com.gluster.storage.management.core.utils; +package org.gluster.storage.management.core.utils; -import java.text.NumberFormat; import java.util.ArrayList; import java.util.Collection; import java.util.LinkedHashMap; @@ -102,26 +101,20 @@ public class StringUtil { return output; } - public static String formatNumber(Double number, int dec) { - NumberFormat nf = NumberFormat.getInstance(); - nf.setMaximumFractionDigits(dec); - nf.setGroupingUsed(false); - // Setting this to true will give you xx,xxx,xxx type of formatting. - String formattedvalue = nf.format(number); - return formattedvalue; - } - - public static void main(String args[]) { - - //Test case for "ListToString" - List<String> string = new ArrayList<String>(); - // Empty list - System.out.println(StringUtil.collectionToString(string, ", ")); - // Only one - string.add("test"); - System.out.println(StringUtil.collectionToString(string, ",:")); - // Multiple - string.add("welcome to java"); - System.out.println(StringUtil.collectionToString(string, "")); + /** + * Extract value of given token from given line. It is assumed that the token, if present, will be of the following + * form: <code>token: value</code> + * + * @param line + * Line to be analyzed + * @param token + * Token whose value is to be extracted + * @return Value of the token, if present in the line + */ + public static String extractToken(String line, String token) { + if (line.contains(token)) { + return line.split(token)[1].trim(); + } + return null; } } diff --git a/src/com.gluster.storage.management.core/src/com/gluster/storage/management/core/utils/ValidationUtil.java b/src/org.gluster.storage.management.core/src/org/gluster/storage/management/core/utils/ValidationUtil.java index df0b749a..d0509e43 100644 --- a/src/com.gluster.storage.management.core/src/com/gluster/storage/management/core/utils/ValidationUtil.java +++ b/src/org.gluster.storage.management.core/src/org/gluster/storage/management/core/utils/ValidationUtil.java @@ -1,4 +1,22 @@ -package com.gluster.storage.management.core.utils; +/******************************************************************************* + * Copyright (c) 2006-2011 Gluster, Inc. <http://www.gluster.com> + * This file is part of Gluster Management Console. + * + * Gluster Management Console is free software; you can redistribute + * it and/or modify it under the terms of the GNU General Public + * License as published by the Free Software Foundation; either + * version 3 of the License, or (at your option) any later version. + * + * Gluster Management Console is distributed in the hope that it + * will be useful, but WITHOUT ANY WARRANTY; without even the + * implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR + * PURPOSE. See the GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program. If not, see + * <http://www.gnu.org/licenses/>. + *******************************************************************************/ +package org.gluster.storage.management.core.utils; import java.util.regex.Pattern; @@ -84,7 +102,6 @@ public class ValidationUtil { } public static void main(String[] argv) { - String ip = "0.0.0.0"; // System.out.println("Is valid ip (" + ip + ")? " + isValidIp(ip)); String hostName = "myhost.q"; // System.out.println(isValidHostName(hostName)); diff --git a/src/com.gluster.storage.management.gateway.scripts/.externalToolBuilders/org.python.pydev.PyDevBuilder.launch b/src/org.gluster.storage.management.gateway.scripts/.externalToolBuilders/org.python.pydev.PyDevBuilder.launch index 1cae618a..1cae618a 100644 --- a/src/com.gluster.storage.management.gateway.scripts/.externalToolBuilders/org.python.pydev.PyDevBuilder.launch +++ b/src/org.gluster.storage.management.gateway.scripts/.externalToolBuilders/org.python.pydev.PyDevBuilder.launch diff --git a/src/com.gluster.storage.management.gateway.scripts/.project b/src/org.gluster.storage.management.gateway.scripts/.project index bc0ebd63..46369752 100644 --- a/src/com.gluster.storage.management.gateway.scripts/.project +++ b/src/org.gluster.storage.management.gateway.scripts/.project @@ -1,6 +1,6 @@ <?xml version="1.0" encoding="UTF-8"?> <projectDescription> - <name>com.gluster.storage.management.gateway.scripts</name> + <name>org.gluster.storage.management.gateway.scripts</name> <comment></comment> <projects> </projects> diff --git a/src/org.gluster.storage.management.gateway.scripts/src/backend/DiskUtils.py b/src/org.gluster.storage.management.gateway.scripts/src/backend/DiskUtils.py new file mode 100644 index 00000000..6666707b --- /dev/null +++ b/src/org.gluster.storage.management.gateway.scripts/src/backend/DiskUtils.py @@ -0,0 +1,212 @@ +#!/usr/bin/python +# Copyright (C) 2011 Gluster, Inc. <http://www.gluster.com> +# This file is part of Gluster Management Gateway (GlusterMG). +# +# GlusterMG is free software; you can redistribute it and/or modify +# it under the terms of the GNU General Public License as published +# by the Free Software Foundation; either version 3 of the License, +# or (at your option) any later version. +# +# GlusterMG is distributed in the hope that it will be useful, but +# WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU +# General Public License for more details. +# +# You should have received a copy of the GNU General Public License +# along with this program. If not, see +# <http://www.gnu.org/licenses/>. +# + +import os +import sys +p1 = os.path.abspath(os.path.dirname(sys.argv[0])) +p2 = "%s/common" % os.path.dirname(p1) +if not p1 in sys.path: + sys.path.append(p1) +if not p2 in sys.path: + sys.path.append(p2) +import glob +import Globals +import Utils +import FsTabUtils + +def _stripDev(device): + if Utils.isString(device) and device.startswith("/dev/"): + return device[5:] + return device + + +def _addDev(deviceName): + if Utils.isString(deviceName) and not deviceName.startswith("/dev/"): + return "/dev/" + deviceName + return deviceName + + +def getDeviceName(device): + if type(device) == type([]): + nameList = [] + for d in device: + nameList.append(_stripDev(d)) + return nameList + return _stripDev(device) + + +def getDevice(deviceName): + if Utils.isString(deviceName): + return _addDev(deviceName) + if type(deviceName) == type([]): + nameList = [] + for d in deviceName: + nameList.append(_addDev(d)) + return nameList + return _addDev(deviceName) + + +def getDiskPartitionByUuid(uuid): + uuidFile = "/dev/disk/by-uuid/%s" % uuid + if os.path.exists(uuidFile): + return getDeviceName(os.path.realpath(uuidFile)) + return None + + +def getUuidByDiskPartition(device): + for uuidFile in glob.glob("/dev/disk/by-uuid/*"): + if os.path.realpath(uuidFile) == device: + return os.path.basename(uuidFile) + return None + + +def getDiskPartitionByLabel(label): + ## TODO: Finding needs to be enhanced + labelFile = "/dev/disk/by-label/%s" % label + if os.path.exists(labelFile): + if os.path.islink(labelFile): + return getDeviceName(os.path.realpath(labelFile)) + return None + + +def getDiskPartitionLabel(device): + rv = Utils.runCommand("e2label %s" % device, output=True, root=True) + if rv["Status"] == 0: + return rv["Stdout"].strip() + return False + + +def getDiskInfo(diskNameList=None): + procPartitionsDict = getProcPartitions() + diskDict = {} + for name, values in procPartitionsDict.iteritems(): + values["Description"] = None + values["Uuid"] = None + values["FsType"] = None + values["MountPoint"] = None + values["SpaceInUse"] = None + values["Member"] = None + ## extras ?!?! + values["Init"] = False + values["Status"] = None + values["Interface"] = None + values["DriveType"] = None + values["Type"] = None + values["FsVersion"] = None + values["ReadOnlyAccess"] = None + + device = getDevice(name) + values["Uuid"] = getUuidByDiskPartition(device) + rv = Utils.runCommand("blkid -c /dev/null -o value %s" % device, output=True, root=True) + if rv["Status"] == 0: + lines = rv["Stdout"].strip().split("\n") + values["FsType"] = lines[-1].strip() + values["MountPoint"] = getDeviceMountPoint(device) + if values["FsType"]: + values["Init"] = True + if values["MountPoint"]: + rv = Utils.runCommand(["df", values["MountPoint"]], output=True) + if rv["Status"] == 0: + try: + values["SpaceInUse"] = long(rv["Stdout"].split("\n")[1].split()[2]) + except IndexError, e: + pass + except ValueError, e: + pass + if os.path.isdir("/sys/block/%s" % name): + model = Utils.readFile("/sys/block/%s/device/model" % name) + vendor = Utils.readFile("/sys/block/%s/device/vendor" % name) + values["Description"] = "%s %s" % (model.strip(), vendor.strip()) + values["Partitions"] = {} + diskDict[name] = values + + for diskName in diskDict.keys(): + del procPartitionsDict[diskName] + for partName, values in procPartitionsDict.iteritems(): + if os.path.isdir("/sys/block/%s/%s" % (diskName, partName)): + diskDict[diskName]["Partitions"][partName] = values + + procMdstatDict = getProcMdstat() + for name, values in procMdstatDict.iteritems(): + try: + diskDict[name]["Description"] = "Software Raid Array - %s - %s" % (values["Type"], values["Status"]) + diskDict[name]["Member"] = values["Member"] + except KeyError, e: + pass + + diskNameList = getDeviceName(diskNameList) + if Utils.isString(diskNameList): + diskNameList = [diskNameList] + + if not diskNameList: + return diskDict + + outputDict = {} + for diskName in list(set(diskDict.keys()).intersection(set(diskNameList))): + outputDict[diskName] = diskDict[diskName] + return outputDict + + +def isDataDiskPartitionFormatted(device): + rv = Utils.runCommand("blkid -c /dev/null -o value %s" % device, output=True, root=True) + if rv["Status"] != 0: + return False + + uuid = getUuidByDiskPartition(device) + if not uuid: + return False + + for fsTabEntry in FsTabUtils.readFsTab(): + if fsTabEntry["Device"] == ("UUID=%s" % uuid) or fsTabEntry["Device"] == device: + return True + return False + + +def isDiskInFormatting(device): + DEVICE_FORMAT_LOCK_FILE = "/var/lock/%s.lock" % device + return os.path.exists(DEVICE_FORMAT_LOCK_FILE) + + +def getDeviceMountPoint(device): + lines = Utils.readFile("/proc/mounts", lines=True) + uuid = getUuidByDiskPartition(device) + for line in lines: + tokens = line.split() + if tokens[0] == device or (uuid and tokens[0].endswith(uuid)): + return tokens[1] + return None + +def getProcPartitions(): + procPartitionsDict = {} + s = Utils.readFile("/proc/partitions", lines=True) + for line in s[2:]: + tokens = line.strip().split() + procPartitionsDict[tokens[3]] = {"Size" : long(tokens[2])} + return procPartitionsDict + +def getProcMdstat(): + raidArrayDict = {} + lines = Utils.readFile("/proc/mdstat", lines=True) + for line in lines[1:]: + tokens = line.strip().split() + if not tokens: + continue + if tokens[0].startswith("md"): + raidArrayDict[tokens[0]] = {"Status" : tokens[2], "Type" : tokens[3], "Member" : [token.split('[')[0] for token in tokens[4:]]} + return raidArrayDict diff --git a/src/com.gluster.storage.management.gateway.scripts/src/backend/FsTabUtils.py b/src/org.gluster.storage.management.gateway.scripts/src/backend/FsTabUtils.py index a9adf4de..0bb328db 100644 --- a/src/com.gluster.storage.management.gateway.scripts/src/backend/FsTabUtils.py +++ b/src/org.gluster.storage.management.gateway.scripts/src/backend/FsTabUtils.py @@ -1,6 +1,20 @@ #!/usr/bin/python # Copyright (C) 2011 Gluster, Inc. <http://www.gluster.com> -# This file is part of Gluster Management Gateway. +# This file is part of Gluster Management Gateway (GlusterMG). +# +# GlusterMG is free software; you can redistribute it and/or modify +# it under the terms of the GNU General Public License as published +# by the Free Software Foundation; either version 3 of the License, +# or (at your option) any later version. +# +# GlusterMG is distributed in the hope that it will be useful, but +# WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU +# General Public License for more details. +# +# You should have received a copy of the GNU General Public License +# along with this program. If not, see +# <http://www.gnu.org/licenses/>. # import os @@ -11,17 +25,14 @@ if not p1 in sys.path: sys.path.append(p1) if not p2 in sys.path: sys.path.append(p2) +import Utils import Globals def readFsTab(fsTabFile=Globals.FSTAB_FILE): - try: - fsTabfp = open(fsTabFile) - except IOError, e: - log("readFsTab(): " + str(e)) - return None + lines = Utils.readFile(fsTabFile) fsTabEntryList = [] - for line in fsTabfp: + for line in lines: tokens = line.strip().split() if not tokens or tokens[0].startswith('#'): continue @@ -39,12 +50,10 @@ def readFsTab(fsTabFile=Globals.FSTAB_FILE): fsTabEntry["Options"] = tokens[3] fsTabEntry["DumpOption"] = tokens[4] fsTabEntry["fsckOrder"] = tokens[5] - except IndexError: + except IndexError, e: pass if fsTabEntry["Device"] and fsTabEntry["MountPoint"] and fsTabEntry["FsType"] and fsTabEntry["Options"]: fsTabEntryList.append(fsTabEntry) - - fsTabfp.close() return fsTabEntryList def writeFsTab(fsTabEntryList, fsTabFile=Globals.FSTAB_FILE): @@ -81,7 +90,7 @@ def removeFsTabEntry(fsTabEntry, fsTabFile=Globals.FSTAB_FILE): try: fsTabEntryList.remove(fsTabEntry) - except ValueError: + except ValueError, e: return False return writeFsTab(fsTabEntryList, fsTabFile) diff --git a/src/org.gluster.storage.management.gateway.scripts/src/backend/NetworkUtils.py b/src/org.gluster.storage.management.gateway.scripts/src/backend/NetworkUtils.py new file mode 100755 index 00000000..711dfa22 --- /dev/null +++ b/src/org.gluster.storage.management.gateway.scripts/src/backend/NetworkUtils.py @@ -0,0 +1,166 @@ +# Copyright (c) 2011 Gluster, Inc. <http://www.gluster.com> +# This file is part of Gluster Management Gateway (GlusterMG). +# +# GlusterMG is free software; you can redistribute it and/or modify +# it under the terms of the GNU General Public License as published +# by the Free Software Foundation; either version 3 of the License, +# or (at your option) any later version. +# +# GlusterMG is distributed in the hope that it will be useful, but +# WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU +# General Public License for more details. +# +# You should have received a copy of the GNU General Public License +# along with this program. If not, see +# <http://www.gnu.org/licenses/>. +# + +import os +import sys +p1 = os.path.abspath(os.path.dirname(sys.argv[0])) +p2 = "%s/common" % os.path.dirname(p1) +if not p1 in sys.path: + sys.path.append(p1) +if not p2 in sys.path: + sys.path.append(p2) +import Globals +import Utils + +def readResolvConfFile(fileName=None): + nameServerList = [] + domain = None + searchDomain = None + if not fileName: + fileName = Globals.RESOLV_CONF_FILE + lines = Utils.readFile(fileName, lines=True) + for line in lines: + tokens = line.split("#")[0].strip().split() + if len(tokens) < 2: + continue + if tokens[0].upper() == "NAMESERVER": + nameServerList.append(tokens[1]) + continue + if tokens[0].upper() == "DOMAIN": + domain = tokens[1:] + continue + if tokens[0].upper() == "SEARCH": + searchDomain = tokens[1:] + continue + return nameServerList, domain, searchDomain + + +def readIfcfgConfFile(deviceName, root=""): + conf = {} + fileName = "%s%s/ifcfg-%s" % (root, Globals.SYSCONFIG_NETWORK_DIR, deviceName) + lines = Utils.readFile(fileName, lines=True) + for line in lines: + tokens = line.split("#")[0].split("=") + if len(tokens) != 2: + continue + conf[tokens[0].strip().lower()] = tokens[1].strip() + return conf + + +def getBondMode(deviceName, fileName=None): + if not fileName: + fileName = Globals.MODPROBE_CONF_FILE + lines = Utils.readFile(fileName, lines=True) + for line in lines: + tokens = line.split("#")[0].split() + if len(tokens) < 4: + continue + if tokens[0].upper() == "OPTIONS" and tokens[1] == deviceName: + if tokens[2].startswith("mode="): + return tokens[2].split("=")[1] + if tokens[3].startswith("mode="): + return tokens[3].split("=")[1] + if tokens[4].startswith("mode="): + return tokens[4].split("=")[1] + if tokens[5].startswith("mode="): + return tokens[5].split("=")[1] + return None + + +def getNetDeviceList(root=""): + netDeviceList = {} + for deviceName in os.listdir("/sys/class/net/"): + netDevice = {} + netDevice["description"] = None + netDevice["hwaddr"] = None + netDevice["type"] = None + netDevice["onboot"] = None + netDevice["bootproto"] = None + netDevice["gateway"] = None + netDevice["peerdns"] = None + netDevice["autodns"] = None + netDevice["dns1"] = None + netDevice["dns2"] = None + netDevice["dns3"] = None + netDevice["master"] = None + netDevice["slave"] = None + netDevice["nmcontrolled"] = None + netDevice["link"] = None + netDevice["mode"] = None + netDevice["speed"] = None + netDevice["device"] = deviceName + netDevice["description"] = deviceName + netDevice["ipaddr"] = None + netDevice["netmask"] = None + netDevice["hwaddr"] = Utils.readFile("/sys/class/net/%s/address" % deviceName).strip() + + rv = Utils.runCommand("ifconfig %s" % deviceName, output=True) + if rv["Status"] == 0: + for line in rv["Stdout"].split("\n"): + if line.find("Link encap:") != -1: + netDevice["type"] = line.split("Link encap:")[1].split()[0] + continue + if line.find("inet addr:") != -1: + tokens = line.split("inet addr:")[1].split() + netDevice["ipaddr"] = tokens[0] + if line.find("Mask:") != -1: + netDevice["netmask"] = line.split("Mask:")[1].split()[0] + #print tokens[1].split(":")[1] + + rv = Utils.runCommand("ethtool %s" % deviceName, output=True, root=True) + if rv["Status"] == 0: + for line in rv["Stdout"].split("\n"): + if line.find("Speed: ") != -1: + netDevice["speed"] = line.split("Speed: ")[1].upper().split("MB")[0] + elif line.find("Link detected: ") != -1: + netDevice["link"] = line.split("Link detected: ")[1] + + rv = Utils.runCommand("route -n", output=True, root=True) + if rv["Status"] == 0: + for line in rv["Stdout"].split("\n"): + tokens = line.split() + if len(tokens) == 8 and tokens[-1] == deviceName and tokens[3] == "UG": + netDevice["gateway"] = tokens[1] + + netDevice["mode"] = getBondMode(deviceName, root + Globals.MODPROBE_CONF_FILE) + + netDeviceList[deviceName] = netDevice + + conf = readIfcfgConfFile(deviceName, root) + if not conf: + continue + try: + if not netDevice["ipaddr"]: + netDevice["ipaddr"] = conf["ipaddr"] + if not netDevice["netmask"]: + netDevice["netmask"] = conf["netmask"] + if not netDevice["gateway"]: + netDevice["gateway"] = conf["gateway"] + netDevice["onboot"] = conf["onboot"] + netDevice["bootproto"] = conf["bootproto"] + netDevice["peerdns"] = conf["peerdns"] + netDevice["autodns"] = conf["autodns"] + netDevice["dns1"] = conf["dns1"] + netDevice["dns2"] = conf["dns2"] + netDevice["dns3"] = conf["dns3"] + netDevice["master"] = conf["master"] + netDevice["slave"] = conf["slave"] + netDevice["nmcontrolled"] = conf["nmcontrolled"] + except KeyError, e: + pass + return netDeviceList diff --git a/src/org.gluster.storage.management.gateway.scripts/src/backend/VolumeUtils.py b/src/org.gluster.storage.management.gateway.scripts/src/backend/VolumeUtils.py new file mode 100644 index 00000000..84bd3a7e --- /dev/null +++ b/src/org.gluster.storage.management.gateway.scripts/src/backend/VolumeUtils.py @@ -0,0 +1,109 @@ +# Copyright (c) 2011 Gluster, Inc. <http://www.gluster.com> +# This file is part of Gluster Management Gateway (GlusterMG). +# +# GlusterMG is free software; you can redistribute it and/or modify +# it under the terms of the GNU General Public License as published +# by the Free Software Foundation; either version 3 of the License, +# or (at your option) any later version. +# +# GlusterMG is distributed in the hope that it will be useful, but +# WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU +# General Public License for more details. +# +# You should have received a copy of the GNU General Public License +# along with this program. If not, see +# <http://www.gnu.org/licenses/>. +# + +import os +import sys +p1 = os.path.abspath(os.path.dirname(sys.argv[0])) +p2 = "%s/common" % os.path.dirname(p1) +if not p1 in sys.path: + sys.path.append(p1) +if not p2 in sys.path: + sys.path.append(p2) +import Globals +import Utils + + +def readVolumeSmbConfFile(fileName=Globals.VOLUME_SMBCONF_FILE): + entryList = [] + lines = Utils.readFile(fileName, lines=True) + for line in lines: + tokens = line.split("#")[0].strip().split(";")[0].strip().split("=") + if len(tokens) != 2: + continue + if tokens[0].strip().upper() == "INCLUDE": + entryList.append(tokens[1].strip()) + return entryList + + +def writeVolumeSmbConfFile(entryList, fileName=Globals.VOLUME_SMBCONF_FILE): + try: + fp = open(fileName, "w") + for entry in entryList: + fp.write("include = %s\n" % entry) + fp.close() + return True + except IOError, e: + Utils.log("Failed to write file %s: %s" % (fileName, str(e))) + return False + + +def includeVolume(volumeName, fileName=Globals.VOLUME_SMBCONF_FILE): + volumeFile = "%s/%s.smbconf" % (Globals.VOLUME_CONF_DIR, volumeName) + if not os.path.exists(volumeFile): + return False + entryList = readVolumeSmbConfFile(fileName) + if volumeFile in entryList: + return True + entryList.append(volumeFile) + return writeVolumeSmbConfFile(entryList, fileName) + + +def excludeVolume(volumeName, fileName=Globals.VOLUME_SMBCONF_FILE): + volumeFile = "%s/%s.smbconf" % (Globals.VOLUME_CONF_DIR, volumeName) + if not os.path.exists(volumeFile): + return False + entryList = readVolumeSmbConfFile(fileName) + if volumeFile not in entryList: + return True + entryList.remove(volumeFile) + Utils.log("entryList = %s" % entryList) + return writeVolumeSmbConfFile(entryList, fileName) + + +def writeVolumeCifsConfiguration(volumeName, userList, adminUser=None): + volumeFile = "%s/%s.smbconf" % (Globals.VOLUME_CONF_DIR, volumeName) + try: + fp = open(volumeFile, "w") + fp.write("[%s]\n" % volumeName) + fp.write(" comment = %s volume served by Gluster\n" % volumeName) + fp.write(" path = %s/%s\n" % (Globals.CIFS_EXPORT_DIR, volumeName)) + fp.write(" guest ok = yes\n") + fp.write(" public = yes\n") + fp.write(" writable = yes\n") + if adminUser: + fp.write(" admin users = %s, %s\n" % (adminUser, ", ".join(userList))) + fp.write(" valid users = %s, %s\n" % (adminUser, ", ".join(userList))) + else: + fp.write(" admin users = %s\n" % (", ".join(userList))) + fp.write(" valid users = %s\n" % (", ".join(userList))) + fp.close() + return True + except IOError, e: + Utils.log("Failed to write file %s: %s" % (volumeFile, str(e))) + return False + + +def removeVolumeCifsConfiguration(volumeName): + volumeFile = "%s/%s.smbconf" % (Globals.VOLUME_CONF_DIR, volumeName) + try: + os.remove(volumeFile) + return True + except OSError, e: + Utils.log("Failed to remove file %s: %s" % (volumeFile, str(e))) + return False + diff --git a/src/com.gluster.storage.management.gateway.scripts/src/backend/add_user_cifs.py b/src/org.gluster.storage.management.gateway.scripts/src/backend/add_user_cifs.py index 2e1a1574..30cd399b 100755 --- a/src/com.gluster.storage.management.gateway.scripts/src/backend/add_user_cifs.py +++ b/src/org.gluster.storage.management.gateway.scripts/src/backend/add_user_cifs.py @@ -1,6 +1,20 @@ #!/usr/bin/python # Copyright (C) 2011 Gluster, Inc. <http://www.gluster.com> -# This file is part of Gluster Management Gateway. +# This file is part of Gluster Management Gateway (GlusterMG). +# +# GlusterMG is free software; you can redistribute it and/or modify +# it under the terms of the GNU General Public License as published +# by the Free Software Foundation; either version 3 of the License, +# or (at your option) any later version. +# +# GlusterMG is distributed in the hope that it will be useful, but +# WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU +# General Public License for more details. +# +# You should have received a copy of the GNU General Public License +# along with this program. If not, see +# <http://www.gnu.org/licenses/>. # import os diff --git a/src/com.gluster.storage.management.gateway.scripts/src/backend/clear_volume_directory.py b/src/org.gluster.storage.management.gateway.scripts/src/backend/clear_volume_directory.py index a9da783b..4c2ec112 100755 --- a/src/com.gluster.storage.management.gateway.scripts/src/backend/clear_volume_directory.py +++ b/src/org.gluster.storage.management.gateway.scripts/src/backend/clear_volume_directory.py @@ -1,6 +1,20 @@ #!/usr/bin/python # Copyright (C) 2011 Gluster, Inc. <http://www.gluster.com> -# This file is part of Gluster Management Gateway. +# This file is part of Gluster Management Gateway (GlusterMG). +# +# GlusterMG is free software; you can redistribute it and/or modify +# it under the terms of the GNU General Public License as published +# by the Free Software Foundation; either version 3 of the License, +# or (at your option) any later version. +# +# GlusterMG is distributed in the hope that it will be useful, but +# WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU +# General Public License for more details. +# +# You should have received a copy of the GNU General Public License +# along with this program. If not, see +# <http://www.gnu.org/licenses/>. # import os @@ -11,10 +25,7 @@ if not p1 in sys.path: sys.path.append(p1) if not p2 in sys.path: sys.path.append(p2) -import syslog import time -from XmlHandler import ResponseXml -import DiskUtils import Utils from optparse import OptionParser @@ -24,7 +35,7 @@ def main(): (options, args) = parser.parse_args() if len(args) != 1: - sys.stderr.write("usage: %s VOLUME_PATH [-d/--delete]\n" % os.path.basename(sys.argv[0])) + sys.stderr.write("usage: %s [-d | --delete] VOLUME_PATH\n" % os.path.basename(sys.argv[0])) sys.exit(-1) volumeDirectory = args[0] @@ -32,18 +43,20 @@ def main(): sys.stderr.write("Given volume directory path:%s does not exists\n" % volumeDirectory) sys.exit(1) - # trim '/' at the end if '/' == volumeDirectory[-1]: volumeDirectory = volumeDirectory[:-1] + newVolumeDirectoryName = "%s_%s" % (volumeDirectory, time.time()) if Utils.runCommand("mv -f %s %s" % (volumeDirectory, newVolumeDirectoryName), root=True) != 0: sys.stderr.write("Failed to rename volume directory\n") sys.exit(2) - if not options.todelete: - sys.exit(0) + if options.todelete: + process = Utils.runCommandBG("rm -fr %s" % newVolumeDirectoryName, root=True) + if not process: + sys.exit(3) + sys.exit(0) - sys.exit(Utils.runCommand("rm -fr %s" % newVolumeDirectoryName, root=True)) if __name__ == "__main__": main() diff --git a/src/com.gluster.storage.management.gateway.scripts/src/backend/create_volume_cifs.py b/src/org.gluster.storage.management.gateway.scripts/src/backend/create_volume_cifs.py index 5a27ab87..f3d6795a 100755 --- a/src/com.gluster.storage.management.gateway.scripts/src/backend/create_volume_cifs.py +++ b/src/org.gluster.storage.management.gateway.scripts/src/backend/create_volume_cifs.py @@ -1,6 +1,20 @@ #!/usr/bin/python # Copyright (C) 2011 Gluster, Inc. <http://www.gluster.com> -# This file is part of Gluster Management Gateway. +# This file is part of Gluster Management Gateway (GlusterMG). +# +# GlusterMG is free software; you can redistribute it and/or modify +# it under the terms of the GNU General Public License as published +# by the Free Software Foundation; either version 3 of the License, +# or (at your option) any later version. +# +# GlusterMG is distributed in the hope that it will be useful, but +# WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU +# General Public License for more details. +# +# You should have received a copy of the GNU General Public License +# along with this program. If not, see +# <http://www.gnu.org/licenses/>. # import os diff --git a/src/com.gluster.storage.management.gateway.scripts/src/backend/delete_user_cifs.py b/src/org.gluster.storage.management.gateway.scripts/src/backend/delete_user_cifs.py index aeda989f..88c6ac63 100755 --- a/src/com.gluster.storage.management.gateway.scripts/src/backend/delete_user_cifs.py +++ b/src/org.gluster.storage.management.gateway.scripts/src/backend/delete_user_cifs.py @@ -1,6 +1,20 @@ #!/usr/bin/python # Copyright (C) 2011 Gluster, Inc. <http://www.gluster.com> -# This file is part of Gluster Management Gateway. +# This file is part of Gluster Management Gateway (GlusterMG). +# +# GlusterMG is free software; you can redistribute it and/or modify +# it under the terms of the GNU General Public License as published +# by the Free Software Foundation; either version 3 of the License, +# or (at your option) any later version. +# +# GlusterMG is distributed in the hope that it will be useful, but +# WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU +# General Public License for more details. +# +# You should have received a copy of the GNU General Public License +# along with this program. If not, see +# <http://www.gnu.org/licenses/>. # import os diff --git a/src/com.gluster.storage.management.gateway.scripts/src/backend/delete_volume_cifs.py b/src/org.gluster.storage.management.gateway.scripts/src/backend/delete_volume_cifs.py index 572d819c..a25fc667 100755 --- a/src/com.gluster.storage.management.gateway.scripts/src/backend/delete_volume_cifs.py +++ b/src/org.gluster.storage.management.gateway.scripts/src/backend/delete_volume_cifs.py @@ -1,6 +1,20 @@ #!/usr/bin/python # Copyright (C) 2011 Gluster, Inc. <http://www.gluster.com> -# This file is part of Gluster Management Gateway. +# This file is part of Gluster Management Gateway (GlusterMG). +# +# GlusterMG is free software; you can redistribute it and/or modify +# it under the terms of the GNU General Public License as published +# by the Free Software Foundation; either version 3 of the License, +# or (at your option) any later version. +# +# GlusterMG is distributed in the hope that it will be useful, but +# WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU +# General Public License for more details. +# +# You should have received a copy of the GNU General Public License +# along with this program. If not, see +# <http://www.gnu.org/licenses/>. # import os diff --git a/src/org.gluster.storage.management.gateway.scripts/src/backend/format_device.py b/src/org.gluster.storage.management.gateway.scripts/src/backend/format_device.py new file mode 100755 index 00000000..8b9edf0c --- /dev/null +++ b/src/org.gluster.storage.management.gateway.scripts/src/backend/format_device.py @@ -0,0 +1,122 @@ +#!/usr/bin/python +# Copyright (C) 2011 Gluster, Inc. <http://www.gluster.com> +# This file is part of Gluster Management Gateway (GlusterMG). +# +# GlusterMG is free software; you can redistribute it and/or modify +# it under the terms of the GNU General Public License as published +# by the Free Software Foundation; either version 3 of the License, +# or (at your option) any later version. +# +# GlusterMG is distributed in the hope that it will be useful, but +# WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU +# General Public License for more details. +# +# You should have received a copy of the GNU General Public License +# along with this program. If not, see +# <http://www.gnu.org/licenses/>. +# + +import os +import sys +import stat +p1 = os.path.abspath(os.path.dirname(sys.argv[0])) +p2 = "%s/common" % os.path.dirname(p1) +if not p1 in sys.path: + sys.path.append(p1) +if not p2 in sys.path: + sys.path.append(p2) +import Globals +import Utils +import DiskUtils + +SIZE_TB_16 = 17179869184L + +def main(): + if Utils.runCommand("wget -t 1 -T 1 -q -O /dev/null %s" % Globals.AWS_WEB_SERVICE_URL) == 0: + sys.stderr.write("format device unsupported\n") + sys.exit(1) + + if len(sys.argv) != 4: + sys.stderr.write("usage: %s FSTYPE MOUNT_POINT DEVICE_NAME\n" % os.path.basename(sys.argv[0])) + sys.exit(-1) + + fsType = sys.argv[1] + mountPoint = sys.argv[2] + device = DiskUtils.getDevice(sys.argv[3]) + deviceName = DiskUtils.getDeviceName(sys.argv[3]) + + if not os.path.exists(device): + sys.stderr.write("device %s not found\n" % sys.argv[3]) + sys.exit(2) + + try: + if not stat.S_ISBLK(os.stat(device).st_mode): + sys.stderr.write("%s is not a block device\n" % sys.argv[3]) + sys.exit(3) + except OSError, e: + Utils.log("unable to get device %s mode: %s" % (device, str(e))) + sys.stderr.write("unable to get device %s mode\n" % sys.argv[3]) + sys.exit(-2) + + if fsType in ['ext3', 'ext4', 'ext4dev']: + deviceSize = DiskUtils.getProcPartitions()[deviceName]['Size'] + if deviceSize >= SIZE_TB_16: + Utils.log("device %s, size %s is greater than %s size for fstype %s" % (device, deviceSize, SIZE_TB_16, fsType)) + sys.stderr.write("size of device %s is unsupported for fstype %s\n" % (sys.argv[3], fsType)) + sys.exit(4) + + if DiskUtils.isDataDiskPartitionFormatted(device): + sys.stderr.write("device %s already formatted\n" % sys.argv[3]) + sys.exit(5) + + if os.path.exists(mountPoint): + if not os.path.isdir(mountPoint): + sys.stderr.write("mount point %s exists but not a directory" % mountPoint) + sys.exit(6) + procMounts = Utils.readFile("/proc/mounts") + if procMounts.find(" %s " % mountPoint) != -1: + sys.stderr.write("mount point %s already has a mount\n" % mountPoint) + sys.exit(7) + if procMounts.find(" %s/" % mountPoint) != -1: + sys.stderr.write("mount point %s has a submount\n" % mountPoint) + sys.exit(8) + else: + status = Utils.runCommand("mkdir -p %s" % mountPoint, output=True, root=True) + if status["Status"] != 0: + sys.stderr.write("failed to create mount point %s\n" % mountPoint) + sys.exit(9) + + if fsType not in Utils.getFileSystemType(): + sys.stderr.write("unsupported file system type %s\n" % fsType) + sys.exit(10) + + deviceFormatLockFile = Utils.getDeviceFormatLockFile(device) + deviceFormatStatusFile = Utils.getDeviceFormatStatusFile(device) + deviceFormatOutputFile = Utils.getDeviceFormatOutputFile(device) + + if os.path.exists(deviceFormatStatusFile): + Utils.log("format status file %s exists" % deviceFormatStatusFile) + line = Utils.readFile(deviceFormatStatusFile) + if not line: + sys.stderr.write("failed to read format status file %s\n" % deviceFormatStatusFile) + sys.exit(-3) + if line.strip().upper() == "COMPLETED": + sys.stderr.write("Device %s already formatted\n" % sys.argv[3]) + sys.exit(11) + else: + sys.stderr.write("Formatting device %s already running\n" % sys.argv[3]) + sys.exit(12) + + if os.path.exists(deviceFormatLockFile): + Utils.log("lock file %s exists" % deviceFormatLockFile) + sys.stderr.write("Formatting device %s already running\n" % sys.argv[3]) + sys.exit(13) + + command = ["%s/format_device_background.py" % p1, fsType, mountPoint, sys.argv[3]] + Utils.runCommandBG(command) + sys.exit(0) + + +if __name__ == "__main__": + main() diff --git a/src/org.gluster.storage.management.gateway.scripts/src/backend/format_device_background.py b/src/org.gluster.storage.management.gateway.scripts/src/backend/format_device_background.py new file mode 100755 index 00000000..77314ef2 --- /dev/null +++ b/src/org.gluster.storage.management.gateway.scripts/src/backend/format_device_background.py @@ -0,0 +1,142 @@ +#!/usr/bin/python +# Copyright (C) 2011 Gluster, Inc. <http://www.gluster.com> +# This file is part of Gluster Management Gateway (GlusterMG). +# +# GlusterMG is free software; you can redistribute it and/or modify +# it under the terms of the GNU General Public License as published +# by the Free Software Foundation; either version 3 of the License, +# or (at your option) any later version. +# +# GlusterMG is distributed in the hope that it will be useful, but +# WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU +# General Public License for more details. +# +# You should have received a copy of the GNU General Public License +# along with this program. If not, see +# <http://www.gnu.org/licenses/>. +# + +import os +import sys +p1 = os.path.abspath(os.path.dirname(sys.argv[0])) +p2 = "%s/common" % os.path.dirname(p1) +if not p1 in sys.path: + sys.path.append(p1) +if not p2 in sys.path: + sys.path.append(p2) +import Utils +import FsTabUtils +import DiskUtils + +def writeStatus(deviceFormatStatusFile, message): + try: + fp = open(deviceFormatStatusFile, "w") + fp.write(message) + fp.close() + except IOError, e: + Utils.log("Failed to update log file %s: %s" % (deviceFormatStatusFile, str(e))) + return False + return True + +def main(): + if len(sys.argv) != 4: + sys.stderr.write("usage: %s FSTYPE MOUNT_POINT DEVICE_NAME\n" % os.path.basename(sys.argv[0])) + sys.exit(-1) + + fsType = sys.argv[1] + mountPoint = sys.argv[2] + device = DiskUtils.getDevice(sys.argv[3]) + + deviceFormatLockFile = Utils.getDeviceFormatLockFile(device) + deviceFormatStatusFile = Utils.getDeviceFormatStatusFile(device) + deviceFormatOutputFile = Utils.getDeviceFormatOutputFile(device) + + if os.path.exists(deviceFormatStatusFile): + Utils.log("device format status file %s exists" % deviceFormatStatusFile) + sys.exit(1) + + if os.path.exists(deviceFormatLockFile): + Utils.log("device format lock file %s exists" % deviceFormatLockFile) + sys.exit(2) + + try: + fp = open(deviceFormatLockFile, "w") + fp.close() + except OSError, e: + Utils.log("failed to create lock file %s: %s" % (deviceFormatLockFile, str(e))) + writeStatus(deviceFormatStatusFile, "Lock file creation failed\n") + sys.exit(-2) + + try: + fptr = open(deviceFormatOutputFile, 'w') + except IOError, e: + Utils.log("failed to create output file %s" % deviceFormatOutputFile) + writeStatus(deviceFormatStatusFile, "Output file creation failed\n") + Utils.removeFile(deviceFormatLockFile) + sys.exit(-3) + + if fsType in ['ext3', 'ext4', 'ext4dev']: + command = "/sbin/mkfs.%s -F -I 512 %s" % (fsType, device) + elif fsType == "xfs": + command = "/sbin/mkfs.%s -f -i size=512 %s" % (fsType, device) + else: + command = "/sbin/mkfs.%s %s" % (fsType, device) + + status = Utils.runCommand(command, output=True, root=True) + if status["Status"] != 0: + Utils.removeFile(deviceFormatOutputFile) + Utils.removeFile(deviceFormatLockFile) + writeStatus(deviceFormatStatusFile, "Device format failed\n") + sys.exit(3) + + if Utils.runCommand("udevadm trigger") != 0: + Utils.log("failed running udevadm trigger") + + if Utils.runCommand("/usr/bin/lshal") != 0: + Utils.log("failed running /usr/bin/lshal") + + deviceUuid = DiskUtils.getUuidByDiskPartition(device) + if not deviceUuid: + Utils.removeFile(deviceFormatOutputFile) + Utils.removeFile(deviceFormatLockFile) + Utils.log("UUID not found after device %s formatted" % device) + writeStatus(deviceFormatStatusFile, "UUID not found after device %s formatted\n" % sys.argv[3]) + sys.exit(4) + + if DiskUtils.isDataDiskPartitionFormatted(device): + Utils.removeFile(deviceFormatOutputFile) + Utils.removeFile(deviceFormatLockFile) + Utils.log("UUID device %s already has an entry in fstab" % device) + writeStatus(deviceFormatStatusFile, "UUID device %s already has an entry in fstab\n" % sys.argv[3]) + sys.exit(5) + + newFsTabEntry = {"Device" : "UUID=%s" % deviceUuid, + "MountPoint" : mountPoint, + "FsType" : fsType, + "Options" : "defaults", + "DumpOption" : "0", + "fsckOrder" : "2"} + if fsType in ['ext3', 'ext4', 'ext4dev']: + newFsTabEntry["Options"] = "defaults,user_xattr" + if not FsTabUtils.addFsTabEntry(newFsTabEntry): + Utils.removeFile(deviceFormatOutputFile) + Utils.removeFile(deviceFormatLockFile) + writeStatus(deviceFormatStatusFile, "failed to update fstab") + sys.exit(6) + + status = Utils.runCommand("mount %s" % mountPoint, output=True, root=True) + if status["Status"] != 0: + Utils.removeFile(deviceFormatOutputFile) + Utils.removeFile(deviceFormatLockFile) + Utils.log("Mounting device %s on %s failed" % (device, mountPoint)) + writeStatus(deviceFormatStatusFile, "Mounting device %s on %s failed\n" % (sys.argv[3], mountPoint)) + sys.exit(7) + + writeStatus(deviceFormatStatusFile, "Completed\n") + Utils.removeFile(deviceFormatOutputFile) + Utils.removeFile(deviceFormatLockFile) + sys.exit(0) + +if __name__ == "__main__": + main() diff --git a/src/org.gluster.storage.management.gateway.scripts/src/backend/get_brick_status.py b/src/org.gluster.storage.management.gateway.scripts/src/backend/get_brick_status.py new file mode 100755 index 00000000..0f5ca578 --- /dev/null +++ b/src/org.gluster.storage.management.gateway.scripts/src/backend/get_brick_status.py @@ -0,0 +1,60 @@ +#!/usr/bin/python +# Copyright (C) 2011 Gluster, Inc. <http://www.gluster.com> +# This file is part of Gluster Management Gateway (GlusterMG). +# +# GlusterMG is free software; you can redistribute it and/or modify +# it under the terms of the GNU General Public License as published +# by the Free Software Foundation; either version 3 of the License, +# or (at your option) any later version. +# +# GlusterMG is distributed in the hope that it will be useful, but +# WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU +# General Public License for more details. +# +# You should have received a copy of the GNU General Public License +# along with this program. If not, see +# <http://www.gnu.org/licenses/>. +# + +import os +import sys +p1 = os.path.abspath(os.path.dirname(sys.argv[0])) +p2 = "%s/common" % os.path.dirname(p1) +if not p1 in sys.path: + sys.path.append(p1) +if not p2 in sys.path: + sys.path.append(p2) +import Utils + +def main(): + if len(sys.argv) != 3: + sys.stderr.write("usage: %s VOLUME_NAME BRICK_NAME\n" % os.path.basename(sys.argv[0])) + sys.exit(-1) + + volumeName = sys.argv[1] + brickName = sys.argv[2] + pidFile = "/etc/glusterd/vols/%s/run/%s.pid" % (volumeName, brickName.replace(":", "").replace("/", "-")) + + if not os.path.exists(pidFile): + print "OFFLINE" + sys.exit(0) + + lines = Utils.readFile(pidFile) + if not lines: + print "UNKNOWN" + sys.exit(0) + try: + pidString = lines[0] + os.getpgid(int(pidString)) + print "ONLINE" + except ValueError, e: + Utils.log("invalid pid %s in file %s: %s" % (pidString, pidFile, str(e))) + print "UNKNOWN" + except OSError, e: + #Utils.log("failed to get process detail of pid %s: %s" % (pidString, str(e))) + print "OFFLINE" + sys.exit(0) + +if __name__ == "__main__": + main() diff --git a/src/org.gluster.storage.management.gateway.scripts/src/backend/get_filesystem_type.py b/src/org.gluster.storage.management.gateway.scripts/src/backend/get_filesystem_type.py new file mode 100755 index 00000000..ce4daa4d --- /dev/null +++ b/src/org.gluster.storage.management.gateway.scripts/src/backend/get_filesystem_type.py @@ -0,0 +1,36 @@ +#!/usr/bin/python +# Copyright (C) 2011 Gluster, Inc. <http://www.gluster.com> +# This file is part of Gluster Management Gateway (GlusterMG). +# +# GlusterMG is free software; you can redistribute it and/or modify +# it under the terms of the GNU General Public License as published +# by the Free Software Foundation; either version 3 of the License, +# or (at your option) any later version. +# +# GlusterMG is distributed in the hope that it will be useful, but +# WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU +# General Public License for more details. +# +# You should have received a copy of the GNU General Public License +# along with this program. If not, see +# <http://www.gnu.org/licenses/>. +# + +import os +import sys +p1 = os.path.abspath(os.path.dirname(sys.argv[0])) +p2 = "%s/common" % os.path.dirname(p1) +if not p1 in sys.path: + sys.path.append(p1) +if not p2 in sys.path: + sys.path.append(p2) +import Utils + +SUPPORTED_FSTYPE = ['ext3', 'ext4', 'ext4dev', 'xfs'] + +def main(): + print "\n".join(list(set(Utils.getFileSystemType()).intersection(set(SUPPORTED_FSTYPE)))) + +if __name__ == "__main__": + main() diff --git a/src/com.gluster.storage.management.gateway.scripts/src/backend/get_format_device_status.py b/src/org.gluster.storage.management.gateway.scripts/src/backend/get_format_device_status.py index 39bfe01c..0d965229 100755 --- a/src/com.gluster.storage.management.gateway.scripts/src/backend/get_format_device_status.py +++ b/src/org.gluster.storage.management.gateway.scripts/src/backend/get_format_device_status.py @@ -1,20 +1,21 @@ #!/usr/bin/python -# Copyright (C) 2009,2010 Gluster, Inc. <http://www.gluster.com> -# This file is part of Gluster Storage Platform. +# Copyright (C) 2011 Gluster, Inc. <http://www.gluster.com> +# This file is part of Gluster Management Gateway (GlusterMG). # -# Gluster Storage Platform is free software; you can redistribute it -# and/or modify it under the terms of the GNU General Public License -# as published by the Free Software Foundation; either version 3 of -# the License, or (at your option) any later version. +# GlusterMG is free software; you can redistribute it and/or modify +# it under the terms of the GNU General Public License as published +# by the Free Software Foundation; either version 3 of the License, +# or (at your option) any later version. # -# Gluster Storage Platform is distributed in the hope that it will be -# useful, but WITHOUT ANY WARRANTY; without even the implied warranty -# of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -# GNU General Public License for more details. +# GlusterMG is distributed in the hope that it will be useful, but +# WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU +# General Public License for more details. # # You should have received a copy of the GNU General Public License # along with this program. If not, see # <http://www.gnu.org/licenses/>. +# import os import sys @@ -47,47 +48,26 @@ def main(): sys.exit(1) if os.path.exists(deviceFormatStatusFile): - try: - fp = open(deviceFormatStatusFile) - line = fp.read() - fp.close() - line = line.strip() - - Utils.removeFile(deviceFormatOutputFile) - Utils.removeFile(deviceFormatStatusFile) + line = Utils.readFile(deviceFormatStatusFile) + line = line.strip() - responseDom = ResponseXml() - responseDom.appendTagRoute("device", sys.argv[1]) - responseDom.appendTagRoute("completedBlocks", "0") - responseDom.appendTagRoute("totalBlocks", "0") - responseDom.appendTagRoute("message", line) - if line.upper() == "COMPLETED": - responseDom.appendTagRoute("formatStatus", "COMPLETED") - else: - responseDom.appendTagRoute("formatStatus", "NOT_RUNNING") - print responseDom.toxml() - sys.exit(0) - except IOError, e: - Utils.log("failed to read format status file %s: %s" % (deviceFormatStatusFile, str(e))) - sys.stderr.write("%s\n" % str(e)) - sys.exit(-2) + Utils.removeFile(deviceFormatOutputFile) + Utils.removeFile(deviceFormatStatusFile) - if not os.path.exists(deviceFormatOutputFile): responseDom = ResponseXml() responseDom.appendTagRoute("device", sys.argv[1]) responseDom.appendTagRoute("completedBlocks", "0") responseDom.appendTagRoute("totalBlocks", "0") - responseDom.appendTagRoute("message", None) - responseDom.appendTagRoute("formatStatus", "IN_PROGRESS") + responseDom.appendTagRoute("message", line) + if line.upper() == "COMPLETED": + responseDom.appendTagRoute("formatStatus", "COMPLETED") + else: + responseDom.appendTagRoute("formatStatus", "NOT_RUNNING") print responseDom.toxml() sys.exit(0) - try: - fp = open(deviceFormatOutputFile) - content = fp.read() - fp.close() - except IOError, e: - Utils.log("failed to read format output file %s: %s" % (deviceFormatOutputFile, str(e))) + content = Utils.readFile(deviceFormatOutputFile, lines=True) + if not content: responseDom = ResponseXml() responseDom.appendTagRoute("device", sys.argv[1]) responseDom.appendTagRoute("completedBlocks", "0") @@ -104,10 +84,7 @@ def main(): responseDom.appendTagRoute("device", sys.argv[1]) responseDom.appendTagRoute("completedBlocks", "0") responseDom.appendTagRoute("totalBlocks", "0") - if content: - responseDom.appendTagRoute("message", content[-1]) - else: - responseDom.appendTagRoute("message") + responseDom.appendTagRoute("message", content[-1]) responseDom.appendTagRoute("formatStatus", "IN_PROGRESS") print responseDom.toxml() sys.exit(0) diff --git a/src/com.gluster.storage.management.gateway.scripts/src/backend/get_rrd_cpu_details.py b/src/org.gluster.storage.management.gateway.scripts/src/backend/get_rrd_cpu_details.py index 0a05a4d3..219faa4f 100755 --- a/src/com.gluster.storage.management.gateway.scripts/src/backend/get_rrd_cpu_details.py +++ b/src/org.gluster.storage.management.gateway.scripts/src/backend/get_rrd_cpu_details.py @@ -1,6 +1,20 @@ #!/usr/bin/python # Copyright (C) 2011 Gluster, Inc. <http://www.gluster.com> -# This file is part of Gluster Management Gateway. +# This file is part of Gluster Management Gateway (GlusterMG). +# +# GlusterMG is free software; you can redistribute it and/or modify +# it under the terms of the GNU General Public License as published +# by the Free Software Foundation; either version 3 of the License, +# or (at your option) any later version. +# +# GlusterMG is distributed in the hope that it will be useful, but +# WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU +# General Public License for more details. +# +# You should have received a copy of the GNU General Public License +# along with this program. If not, see +# <http://www.gnu.org/licenses/>. # import os @@ -17,7 +31,7 @@ CPU_RRD_FILE = "/var/lib/rrd/cpu.rrd" def main(): if len(sys.argv) != 2: - sys.stderr.write("usage: %s <PERIOD>\n" % os.path.basename(sys.argv[0])) + sys.stderr.write("usage: %s DURATION\n" % os.path.basename(sys.argv[0])) sys.exit(-1) period = sys.argv[1] diff --git a/src/com.gluster.storage.management.gateway.scripts/src/backend/get_rrd_memory_details.py b/src/org.gluster.storage.management.gateway.scripts/src/backend/get_rrd_memory_details.py index 1e3c24f6..04453628 100755 --- a/src/com.gluster.storage.management.gateway.scripts/src/backend/get_rrd_memory_details.py +++ b/src/org.gluster.storage.management.gateway.scripts/src/backend/get_rrd_memory_details.py @@ -1,33 +1,21 @@ #!/usr/bin/python # Copyright (C) 2011 Gluster, Inc. <http://www.gluster.com> -# This file is part of Gluster Management Gateway. +# This file is part of Gluster Management Gateway (GlusterMG). # - -# Input command: get_rrd_memory_details.py 1hour -# OUTPUT as bellow: -# <?xml version="1.0" encoding="ISO-8859-1"?> +# GlusterMG is free software; you can redistribute it and/or modify +# it under the terms of the GNU General Public License as published +# by the Free Software Foundation; either version 3 of the License, +# or (at your option) any later version. +# +# GlusterMG is distributed in the hope that it will be useful, but +# WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU +# General Public License for more details. +# +# You should have received a copy of the GNU General Public License +# along with this program. If not, see +# <http://www.gnu.org/licenses/>. # -# <xport> -# <meta> -# <start>1310455500</start> -# <step>300</step> -# <end>1310459100</end> -# <rows>13</rows> -# <columns>5</columns> -# <legend> -# <entry>memoryUsed</entry> -# <entry>memoryFree</entry> -# <entry>memoryCache</entry> -# <entry>memoryBuffer</entry> -# <entry>totalMemory</entry> -# </legend> -# </meta> -# <data> -# <row><t>1310455500</t><v>1.9181091707e+06</v><v>1.5819754974e+06</v><v>1.2528146351e+06</v><v>1.2528146351e+06</v><v>3.5000846681e+06</v></row> -# --- -# --- -# </data> -# </xport> import os import sys @@ -37,14 +25,13 @@ if not p1 in sys.path: sys.path.append(p1) if not p2 in sys.path: sys.path.append(p2) -import syslog import Utils MEMORY_RRD_FILE = "/var/lib/rrd/mem.rrd" def main(): if len(sys.argv) != 2: - sys.stderr.write("usage: %s <PERIOD>\n" % os.path.basename(sys.argv[0])) + sys.stderr.write("usage: %s DURATION\n" % os.path.basename(sys.argv[0])) sys.exit(-1) period = sys.argv[1] diff --git a/src/com.gluster.storage.management.gateway.scripts/src/backend/get_rrd_net_details.py b/src/org.gluster.storage.management.gateway.scripts/src/backend/get_rrd_net_details.py index 41674ef9..258a758c 100755 --- a/src/com.gluster.storage.management.gateway.scripts/src/backend/get_rrd_net_details.py +++ b/src/org.gluster.storage.management.gateway.scripts/src/backend/get_rrd_net_details.py @@ -1,6 +1,20 @@ #!/usr/bin/python # Copyright (C) 2011 Gluster, Inc. <http://www.gluster.com> -# This file is part of Gluster Management Gateway. +# This file is part of Gluster Management Gateway (GlusterMG). +# +# GlusterMG is free software; you can redistribute it and/or modify +# it under the terms of the GNU General Public License as published +# by the Free Software Foundation; either version 3 of the License, +# or (at your option) any later version. +# +# GlusterMG is distributed in the hope that it will be useful, but +# WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU +# General Public License for more details. +# +# You should have received a copy of the GNU General Public License +# along with this program. If not, see +# <http://www.gnu.org/licenses/>. # import os @@ -15,7 +29,7 @@ import Utils def main(): if len(sys.argv) != 3: - sys.stderr.write("usage: %s <DEVICE> <PERIOD>\n" % os.path.basename(sys.argv[0])) + sys.stderr.write("usage: %s DEVICE DURATION\n" % os.path.basename(sys.argv[0])) sys.exit(-1) device = sys.argv[1] diff --git a/src/org.gluster.storage.management.gateway.scripts/src/backend/get_server_details.py b/src/org.gluster.storage.management.gateway.scripts/src/backend/get_server_details.py new file mode 100755 index 00000000..956a9e44 --- /dev/null +++ b/src/org.gluster.storage.management.gateway.scripts/src/backend/get_server_details.py @@ -0,0 +1,286 @@ +#!/usr/bin/python +# Copyright (C) 2011 Gluster, Inc. <http://www.gluster.com> +# This file is part of Gluster Management Gateway (GlusterMG). +# +# GlusterMG is free software; you can redistribute it and/or modify +# it under the terms of the GNU General Public License as published +# by the Free Software Foundation; either version 3 of the License, +# or (at your option) any later version. +# +# GlusterMG is distributed in the hope that it will be useful, but +# WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU +# General Public License for more details. +# +# You should have received a copy of the GNU General Public License +# along with this program. If not, see +# <http://www.gnu.org/licenses/>. +# + +import os +import sys +p1 = os.path.abspath(os.path.dirname(sys.argv[0])) +p2 = "%s/common" % os.path.dirname(p1) +if not p1 in sys.path: + sys.path.append(p1) +if not p2 in sys.path: + sys.path.append(p2) +import socket +import re +import Utils +import DiskUtils +import NetworkUtils +import XmlHandler +from optparse import OptionParser + + +def getDiskDom(): + diskInfo = DiskUtils.getDiskInfo() + if not diskInfo: + return None + procMdstat = DiskUtils.getProcMdstat() + diskDom = XmlHandler.XDOM() + disksTag = diskDom.createTag("disks", None) + diskTagDict = {} + raidDisksTag = diskDom.createTag("raidDisks", None) # raid members tag + for raidDiskName, raidDisk in procMdstat.iteritems(): + raidDiskTag = diskDom.createTag("disk", None) + raidDiskTag.appendChild(diskDom.createTag("name", raidDiskName)) + raidDiskTag.appendChild(diskDom.createTag("description", diskInfo[raidDiskName]['Description'])) + raidDiskTag.appendChild(diskDom.createTag("uuid", diskInfo[raidDiskName]['Uuid'])) + raidDiskTag.appendChild(diskDom.createTag("type", "UNKNOWN")) + raidDiskTag.appendChild(diskDom.createTag("mountPoint", diskInfo[raidDiskName]['MountPoint'])) + raidDiskTag.appendChild(diskDom.createTag("fsType", diskInfo[raidDiskName]['FsType'])) + if diskInfo[raidDiskName]['FsType']: + raidDiskTag.appendChild(diskDom.createTag("status", "INITIALIZED")) + else: + raidDiskTag.appendChild(diskDom.createTag("status", "UNINITIALIZED")) + raidDiskTag.appendChild(diskDom.createTag("interface")) + raidDiskTag.appendChild(diskDom.createTag("fsVersion")) + raidDiskTag.appendChild(diskDom.createTag("size", diskInfo[raidDiskName]['Size'] / 1024.0)) + if not diskInfo[raidDiskName]['SpaceInUse']: + raidDiskTag.appendChild(diskDom.createTag("spaceInUse", None)) + else: + raidDiskTag.appendChild(diskDom.createTag("spaceInUse", diskInfo[raidDiskName]['SpaceInUse'] / 1024.0)) + raidDiskTag.appendChild(raidDisksTag) + disksTag.appendChild(raidDiskTag) + for raidMember in raidDisk['Member']: + # Case1: Raid array member is a disk. The following code will add the disk details under a disk tag + if diskInfo.has_key(raidMember): + diskTag = diskDom.createTag("disk", None) + diskTag.appendChild(diskDom.createTag("name", raidMember)) + diskTag.appendChild(diskDom.createTag("description", diskInfo[raidMember]["Description"])) + diskTag.appendChild(diskDom.createTag("uuid", diskInfo[raidMember]["Uuid"])) + if DiskUtils.isDiskInFormatting(raidMember): + diskTag.appendChild(diskDom.createTag("status", "INITIALIZING")) + else: + if diskInfo[raidMember]["FsType"]: + diskTag.appendChild(diskDom.createTag("status", "INITIALIZED")) + else: + diskTag.appendChild(diskDom.createTag("status", "UNINITIALIZED")) + diskTag.appendChild(diskDom.createTag("interface", diskInfo[raidMember]["Interface"])) + diskTag.appendChild(diskDom.createTag("mountPoint", diskInfo[raidMember]["MountPoint"])) + if diskInfo[raidMember]["FsType"]: + diskTag.appendChild(diskDom.createTag("type", "DATA")) + else: + diskTag.appendChild(diskDom.createTag("type", "UNKNOWN")) + diskTag.appendChild(diskDom.createTag("fsType", diskInfo[raidMember]["FsType"])) + diskTag.appendChild(diskDom.createTag("fsVersion", diskInfo[raidMember]["FsVersion"])) + diskTag.appendChild(diskDom.createTag("size", diskInfo[raidMember]["Size"] / 1024.0)) + if not diskInfo[raidMember]["SpaceInUse"]: + diskTag.appendChild(diskDom.createTag("spaceInUse", None)) + else: + diskTag.appendChild(diskDom.createTag("spaceInUse", diskInfo[raidMember]["SpaceInUse"] / 1024.0)) + raidDisksTag.appendChild(diskTag) + del diskInfo[raidMember] + continue + # Case2: Raid array member is a partition. The following code will add the partition and its corresponding disk its belong to. + for disk, item in diskInfo.iteritems(): + if not item['Partitions'].has_key(raidMember): + continue + if not diskTagDict.has_key(disk): + diskTag = diskDom.createTag("disk", None) + diskTag.appendChild(diskDom.createTag("name", disk)) + diskTag.appendChild(diskDom.createTag("description", item["Description"])) + diskTag.appendChild(diskDom.createTag("uuid", item["Uuid"])) + diskTag.appendChild(diskDom.createTag("status", "INITIALIZED")) + diskTag.appendChild(diskDom.createTag("interface", item["Interface"])) + diskTag.appendChild(diskDom.createTag("mountPoint")) + diskTag.appendChild(diskDom.createTag("type", "DATA")) + diskTag.appendChild(diskDom.createTag("fsType", item["FsType"])) + diskTag.appendChild(diskDom.createTag("fsVersion", item["FsVersion"])) + diskTag.appendChild(diskDom.createTag("size", item["Size"] / 1024.0)) + if not item["SpaceInUse"]: + diskTag.appendChild(diskDom.createTag("spaceInUse", None)) + else: + diskTag.appendChild(diskDom.createTag("spaceInUse", item["SpaceInUse"] / 1024.0)) + partitionsTag = diskDom.createTag("partitions", None) + diskTag.appendChild(partitionsTag) + raidDisksTag.appendChild(diskTag) + # Constructed disk tag will be added to the dictonary. + # This will be used to keep add all the corresponding partitions tags of the disk to the disk tag. + diskTagDict[disk] = {'diskTag': diskTag, 'partitionsTag': partitionsTag} + # adding partition details under this disk tag + partitionTag = diskDom.createTag("partition", None) + partitionTag.appendChild(diskDom.createTag("name", raidMember)) + partitionTag.appendChild(diskDom.createTag("uuid", item['Partitions'][raidMember]["Uuid"])) + partitionTag.appendChild(diskDom.createTag("fsType", item['Partitions'][raidMember]["FsType"])) + if item['Partitions'][raidMember]["FsType"]: + partitionTag.appendChild(diskDom.createTag("status", "INITIALIZED")) + partitionTag.appendChild(diskDom.createTag("type", "DATA")) + else: + partitionTag.appendChild(diskDom.createTag("status", "UNINITIALIZED")) + partitionTag.appendChild(diskDom.createTag("type", "UNKNOWN")) + partitionTag.appendChild(diskDom.createTag("mountPoint", item['Partitions'][raidMember]['MountPoint'])) + partitionTag.appendChild(diskDom.createTag("size", item['Partitions'][raidMember]["Size"] / 1024.0)) + if not item['Partitions'][raidMember]["SpaceInUse"]: + partitionTag.appendChild(diskDom.createTag("spaceInUse", None)) + else: + partitionTag.appendChild(diskDom.createTag("spaceInUse", item['Partitions'][raidMember]["SpaceInUse"] / 1024.0)) + diskTagDict[disk]['partitionsTag'].appendChild(partitionTag) + # deleting partition entry of a raid member from diskInfo (item['Partitions']) + del item['Partitions'][raidMember] + del diskInfo[raidDiskName] + disksTag.appendChild(raidDisksTag) + for diskName, value in diskInfo.iteritems(): + diskTag = diskDom.createTag("disk", None) + diskTag.appendChild(diskDom.createTag("name", diskName)) + diskTag.appendChild(diskDom.createTag("description", value["Description"])) + diskTag.appendChild(diskDom.createTag("uuid", value["Uuid"])) + if DiskUtils.isDiskInFormatting(diskName): + status = "INITIALIZING" + else: + if value["FsType"]: + status = "INITIALIZED" + else: + status = "UNINITIALIZED" + diskTag.appendChild(diskDom.createTag("status", status)) + diskTag.appendChild(diskDom.createTag("interface", value["Interface"])) + if value["MountPoint"] and value["MountPoint"] in ["/", "/boot"]: + diskTag.appendChild(diskDom.createTag("type", "BOOT")) + elif "UNINITIALIZED" == status: + diskTag.appendChild(diskDom.createTag("type", "UNKNOWN")) + elif "swap" == value["FsType"]: + diskTag.appendChild(diskDom.createTag("type", "SWAP")) + else: + diskTag.appendChild(diskDom.createTag("type", "DATA")) + diskTag.appendChild(diskDom.createTag("fsType", value["FsType"])) + diskTag.appendChild(diskDom.createTag("fsVersion", value["FsVersion"])) + diskTag.appendChild(diskDom.createTag("mountPoint", value["MountPoint"])) + diskTag.appendChild(diskDom.createTag("size", value["Size"] / 1024.0)) + if not value["SpaceInUse"]: + diskTag.appendChild(diskDom.createTag("spaceInUse", None)) + else: + diskTag.appendChild(diskDom.createTag("spaceInUse", value["SpaceInUse"] / 1024.0)) + partitionsTag = diskDom.createTag("partitions", None) + diskTag.appendChild(partitionsTag) + for partName, partValues in value['Partitions'].iteritems(): + partitionTag = diskDom.createTag("partition", None) + partitionTag.appendChild(diskDom.createTag("name", partName)) + partitionTag.appendChild(diskDom.createTag("uuid", partValues["Uuid"])) + partitionTag.appendChild(diskDom.createTag("fsType", partValues["FsType"])) + if partValues["MountPoint"] and partValues["MountPoint"] in ["/", "/boot"]: + partitionTag.appendChild(diskDom.createTag("status", "INITIALIZED")) + partitionTag.appendChild(diskDom.createTag("type", "BOOT")) + elif partValues["FsType"]: + partitionTag.appendChild(diskDom.createTag("status", "INITIALIZED")) + if "swap" == partValues["FsType"]: + partitionTag.appendChild(diskDom.createTag("type", "SWAP")) + else: + partitionTag.appendChild(diskDom.createTag("type", "DATA")) + else: + partitionTag.appendChild(diskDom.createTag("status", "UNINITIALIZED")) + partitionTag.appendChild(diskDom.createTag("type", "UNKNOWN")) + partitionTag.appendChild(diskDom.createTag("mountPoint", partValues['MountPoint'])) + partitionTag.appendChild(diskDom.createTag("size", partValues["Size"] / 1024.0)) + if not partValues["SpaceInUse"]: + partitionTag.appendChild(diskDom.createTag("spaceInUse", None)) + else: + partitionTag.appendChild(diskDom.createTag("spaceInUse", partValues["SpaceInUse"] / 1024.0)) + partitionsTag.appendChild(partitionTag) + continue + disksTag.appendChild(diskTag) + diskDom.addTag(disksTag) + return diskDom + + +def getServerDetails(listall): + serverName = socket.getfqdn() + meminfo = Utils.getMeminfo() + cpu = Utils.getCpuUsageAvg() + nameServerList, domain, searchDomain = NetworkUtils.readResolvConfFile() + if not domain: + domain = [None] + + responseDom = XmlHandler.ResponseXml() + serverTag = responseDom.appendTagRoute("server") + serverTag.appendChild(responseDom.createTag("name", serverName)) + serverTag.appendChild(responseDom.createTag("domainname", domain[0])) + if Utils.runCommand("pidof glusterd") == 0: + serverTag.appendChild(responseDom.createTag("status", "ONLINE")) + else: + serverTag.appendChild(responseDom.createTag("status", "OFFLINE")) + serverTag.appendChild(responseDom.createTag("glusterFsVersion", Utils.getGlusterVersion())) + serverTag.appendChild(responseDom.createTag("cpuUsage", str(cpu))) + serverTag.appendChild(responseDom.createTag("totalMemory", str(Utils.convertKbToMb(meminfo['MemTotal'])))) + serverTag.appendChild(responseDom.createTag("memoryInUse", str(Utils.convertKbToMb(meminfo['MemUsed'])))) + serverTag.appendChild(responseDom.createTag("uuid", None)) + + for dns in nameServerList: + serverTag.appendChild(responseDom.createTag("dns%s" % str(nameServerList.index(dns) +1) , dns)) + + #TODO: probe and retrieve timezone, ntp-server details and update the tags + + interfaces = responseDom.createTag("networkInterfaces", None) + for deviceName, values in NetworkUtils.getNetDeviceList().iteritems(): + if values["type"].upper() in ['LOCAL', 'IPV6-IN-IPV4']: + continue + interfaceTag = responseDom.createTag("networkInterface", None) + interfaceTag.appendChild(responseDom.createTag("name", deviceName)) + interfaceTag.appendChild(responseDom.createTag("hwAddr", values["hwaddr"])) + interfaceTag.appendChild(responseDom.createTag("speed", values["speed"])) + interfaceTag.appendChild(responseDom.createTag("model", values["type"])) + if values["onboot"]: + interfaceTag.appendChild(responseDom.createTag("onBoot", "yes")) + else: + interfaceTag.appendChild(responseDom.createTag("onBoot", "no")) + interfaceTag.appendChild(responseDom.createTag("bootProto", values["bootproto"])) + interfaceTag.appendChild(responseDom.createTag("ipAddress", values["ipaddr"])) + interfaceTag.appendChild(responseDom.createTag("netMask", values["netmask"])) + interfaceTag.appendChild(responseDom.createTag("defaultGateway", values["gateway"])) + if values["mode"]: + interfaceTag.appendChild(responseDom.createTag("mode", values["mode"])) + if values["master"]: + interfaceTag.appendChild(responseDom.createTag("bonding", "yes")) + spliter = re.compile(r'[\D]') + interfaceTag.appendChild(responseDom.createTag("bondid", spliter.split(values["master"])[-1])) + interfaces.appendChild(interfaceTag) + serverTag.appendChild(interfaces) + + responseDom.appendTag(serverTag) + serverTag.appendChild(responseDom.createTag("numOfCPUs", int(os.sysconf('SC_NPROCESSORS_ONLN')))) + + diskDom = getDiskDom() + if not diskDom: + sys.stderr.write("No disk found!") + Utils.log("Failed to get disk details") + sys.exit(2) + + serverTag.appendChild(diskDom.getElementsByTagRoute("disks")[0]) + return serverTag + +def main(): + parser = OptionParser() + parser.add_option("-N", "--only-data-disks", + action="store_false", dest="listall", default=True, + help="List only data disks") + + (options, args) = parser.parse_args() + responseXml = getServerDetails(options.listall) + if responseXml: + print responseXml.toxml() + + sys.exit(0) + +if __name__ == "__main__": + main() diff --git a/src/org.gluster.storage.management.gateway.scripts/src/backend/get_server_status.py b/src/org.gluster.storage.management.gateway.scripts/src/backend/get_server_status.py new file mode 100755 index 00000000..72627bd1 --- /dev/null +++ b/src/org.gluster.storage.management.gateway.scripts/src/backend/get_server_status.py @@ -0,0 +1,42 @@ +#!/usr/bin/python +# Copyright (C) 2011 Gluster, Inc. <http://www.gluster.com> +# This file is part of Gluster Management Gateway (GlusterMG). +# +# GlusterMG is free software; you can redistribute it and/or modify +# it under the terms of the GNU General Public License as published +# by the Free Software Foundation; either version 3 of the License, +# or (at your option) any later version. +# +# GlusterMG is distributed in the hope that it will be useful, but +# WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU +# General Public License for more details. +# +# You should have received a copy of the GNU General Public License +# along with this program. If not, see +# <http://www.gnu.org/licenses/>. +# + +import os +import sys +p1 = os.path.abspath(os.path.dirname(sys.argv[0])) +p2 = "%s/common" % os.path.dirname(p1) +if not p1 in sys.path: + sys.path.append(p1) +if not p2 in sys.path: + sys.path.append(p2) +import Utils + +def main(): + if len(sys.argv) != 1: + sys.stderr.write("usage: %s\n" % os.path.basename(sys.argv[0])) + sys.exit(-1) + + if Utils.runCommand("pidof glusterd") == 0: + print "ONLINE" + else: + print "OFFLINE" + sys.exit(0) + +if __name__ == "__main__": + main() diff --git a/src/com.gluster.storage.management.gateway.scripts/src/backend/get_volume_brick_log.py b/src/org.gluster.storage.management.gateway.scripts/src/backend/get_volume_brick_log.py index ff4a4b9a..7a7904b9 100755 --- a/src/com.gluster.storage.management.gateway.scripts/src/backend/get_volume_brick_log.py +++ b/src/org.gluster.storage.management.gateway.scripts/src/backend/get_volume_brick_log.py @@ -1,20 +1,21 @@ #!/usr/bin/python -# Copyright (C) 2009,2010 Gluster, Inc. <http://www.gluster.com> -# This file is part of Gluster Storage Platform. +# Copyright (C) 2011 Gluster, Inc. <http://www.gluster.com> +# This file is part of Gluster Management Gateway (GlusterMG). # -# Gluster Storage Platform is free software; you can redistribute it -# and/or modify it under the terms of the GNU General Public License -# as published by the Free Software Foundation; either version 3 of -# the License, or (at your option) any later version. +# GlusterMG is free software; you can redistribute it and/or modify +# it under the terms of the GNU General Public License as published +# by the Free Software Foundation; either version 3 of the License, +# or (at your option) any later version. # -# Gluster Storage Platform is distributed in the hope that it will be -# useful, but WITHOUT ANY WARRANTY; without even the implied warranty -# of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -# GNU General Public License for more details. +# GlusterMG is distributed in the hope that it will be useful, but +# WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU +# General Public License for more details. # # You should have received a copy of the GNU General Public License # along with this program. If not, see # <http://www.gnu.org/licenses/>. +# import re import os @@ -26,6 +27,7 @@ if not p1 in sys.path: if not p2 in sys.path: sys.path.append(p2) from XmlHandler import XDOM +import Utils def enumLogType(logCode): if "M" == logCode.upper(): @@ -69,21 +71,21 @@ def logSplit(log): def getVolumeLog(logFilePath, tailCount): rs = XDOM() if not logFilePath: - print >> sys.stderr, "No log file path given" - sys.exit(-1); + sys.stderr.write("No log file path given\n") + sys.exit(-1) if not tailCount: - print >> sys.stderr, "No tail count given" - sys.exit(-1); + sys.stderr.write("No tail count given\n") + sys.exit(-1) pattern = '\[\d{4}-\d{2}-\d{2}\s{1}\d{2}:\d{2}:\d{2}.\d+\]\s{1}([MACEWNIDT]){1}\s+' - if not os.path.exists(logFilePath): - print >> sys.stderr, "volume log file [%s] not found!" % logFilePath - sys.exit(-1); - fp = open(logFilePath) - lines = [line for line in fp if re.match(pattern, line)] - fp.close() + content = Utils.readFile(logFilePath, lines=True) + if not content: + sys.stderr.write("volume log not found in file %s\n" % logFilePath) + sys.exit(-1) + + lines = [line for line in content if re.match(pattern, line)] i = len(lines) - int(tailCount) if i < 0: i = 0 @@ -97,7 +99,7 @@ def getVolumeLog(logFilePath, tailCount): def main(): if len(sys.argv) != 3: - print >> sys.stderr, "usage: %s <Log File Path> <Line Count>" % sys.argv[0] + sys.stderr.write("usage: %s LOG-FILE LINE-COUNT\n" % sys.argv[0]) sys.exit(-1) logFilePath = sys.argv[1] diff --git a/src/org.gluster.storage.management.gateway.scripts/src/backend/gluster-volume-settings.init.d b/src/org.gluster.storage.management.gateway.scripts/src/backend/gluster-volume-settings.init.d new file mode 100755 index 00000000..2afdfb4c --- /dev/null +++ b/src/org.gluster.storage.management.gateway.scripts/src/backend/gluster-volume-settings.init.d @@ -0,0 +1,36 @@ +#!/bin/bash +# Copyright (C) 2011 Gluster, Inc. <http://www.gluster.com> +# This file is part of Gluster Management Gateway (GlusterMG). +# +# GlusterMG is free software; you can redistribute it and/or modify +# it under the terms of the GNU General Public License as published +# by the Free Software Foundation; either version 3 of the License, +# or (at your option) any later version. +# +# GlusterMG is distributed in the hope that it will be useful, but +# WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU +# General Public License for more details. +# +# You should have received a copy of the GNU General Public License +# along with this program. If not, see +# <http://www.gnu.org/licenses/>. +# +# chkconfig: - 90 10 +### BEGIN INIT INFO +# Required-Start: $network syslog glusterd +# Default-Start: 3 5 +# Description: Setup/cleanup CIFS settings of Gluster volumes +### END INIT INFO + +case "$1" in + start) + modprobe -q fuse + sleep 3 + if ! lsmod | grep -qw fuse; then + echo "FATAL: fuse kernel module is not found. Gluster CIFS volume access will not work" >&2 + exit 1 + fi + /usr/sbin/gluster_cifs_volume_startup + ;; +esac diff --git a/src/org.gluster.storage.management.gateway.scripts/src/backend/gluster_cifs_volume_startup.py b/src/org.gluster.storage.management.gateway.scripts/src/backend/gluster_cifs_volume_startup.py new file mode 100644 index 00000000..2dfb1546 --- /dev/null +++ b/src/org.gluster.storage.management.gateway.scripts/src/backend/gluster_cifs_volume_startup.py @@ -0,0 +1,128 @@ +#!/usr/bin/python +# Copyright (C) 2011 Gluster, Inc. <http://www.gluster.com> +# This file is part of Gluster Management Gateway (GlusterMG). +# +# GlusterMG is free software; you can redistribute it and/or modify +# it under the terms of the GNU General Public License as published +# by the Free Software Foundation; either version 3 of the License, +# or (at your option) any later version. +# +# GlusterMG is distributed in the hope that it will be useful, but +# WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU +# General Public License for more details. +# +# You should have received a copy of the GNU General Public License +# along with this program. If not, see +# <http://www.gnu.org/licenses/>. +# + +import os +import sys +import glob +p1 = os.path.abspath(os.path.dirname(sys.argv[0])) +p2 = "%s/common" % os.path.dirname(p1) +if not p1 in sys.path: + sys.path.append(p1) +if not p2 in sys.path: + sys.path.append(p2) +import Globals +import Utils +import VolumeUtils + +def getGlusterVolumeInfo(volumeName=None): + volumeNameList = None + if Utils.isString(volumeName): + volumeNameList = [volumeName] + if type(volumeName) == type([]): + volumeNameList = volumeName + + status = Utils.runCommand("gluster volume info", output=True, root=True) + if status["Status"] != 0: + Utils.log("Failed to execute 'gluster volume info' command") + return None + + volumeInfoDict = {} + volumeInfo = {} + volumeName = None + brickList = [] + for line in status['Stdout'].split("\n"): + if not line: + if volumeName and volumeInfo: + volumeInfo["Bricks"] = brickList + volumeInfoDict[volumeName] = volumeInfo + volumeInfo = {} + volumeName = None + brickList = [] + continue + + tokens = line.split(":") + if tokens[0].strip().upper() == "BRICKS": + continue + elif tokens[0].strip().upper() == "VOLUME NAME": + volumeName = tokens[1].strip() + volumeInfo["VolumeName"] = volumeName + elif tokens[0].strip().upper() == "TYPE": + volumeInfo["VolumeType"] = tokens[1].strip() + elif tokens[0].strip().upper() == "STATUS": + volumeInfo["VolumeStatus"] = tokens[1].strip() + elif tokens[0].strip().upper() == "TRANSPORT-TYPE": + volumeInfo["TransportType"] = tokens[1].strip() + elif tokens[0].strip().upper().startswith("BRICK"): + brickList.append(":".join(tokens[1:]).strip()) + + if volumeName and volumeInfo: + volumeInfoDict[volumeName] = volumeInfo + + if not volumeNameList: + return volumeInfoDict + + # remove unwanted volume info + for volumeName in list(set(volumeInfoDict.keys()) - set(volumeNameList)): + del volumeInfoDict[volumeName] + + return volumeInfoDict + + +def main(): + volumeInfo = getGlusterVolumeInfo() + if not volumeInfo: + print "No volume present. Removing CIFS volume configuration if any" + Utils.runCommand("rm -fr %s/*" % Globals.VOLUME_CONF_DIR, root=True, shell=True) + Utils.runCommand("rm -fr %s/*" % Globals.REEXPORT_DIR, root=True, shell=True) + Utils.runCommand("rm -fr %s/*" % Globals.CIFS_EXPORT_DIR, root=True, shell=True) + sys.exit(0) + + lines = Utils.readFile(Globals.VOLUME_SMBCONF_FILE) + volumeSmbConfList = [line.strip() for line in lines] + for volumeName in volumeInfo.keys(): + if not "include = %s/%s.smbconf" % (Globals.VOLUME_CONF_DIR, volumeName) in volumeSmbConfList: + continue + if 'STOPPED' == volumeInfo[volumeName]['VolumeStatus'].upper(): + Utils.runCommand("rmdir %s/%s" % (Globals.CIFS_EXPORT_DIR, volumeName), root=True) + if not VolumeUtils.excludeVolume(volumeName): + Utils.log("Failed to exclude %s volume for CIFS reexport" % volumeName) + continue + if 'STARTED' == volumeInfo[volumeName]['VolumeStatus'].upper(): + volumeMountDirName = "%s/%s" % (Globals.REEXPORT_DIR, volumeName) + if Utils.runCommand("mount -t glusterfs 127.0.0.1:%s %s" % (volumeName, volumeMountDirName)) != 0: + Utils.log("Failed to mount volume %s" % (volumeName)) + + smbConfFileList = glob.glob("%s/*.smbconf" % Globals.VOLUME_CONF_DIR) + volumeList = [smbConfFileName.split(".smbconf")[0].split("/")[-1] for smbConfFileName in smbConfFileList] + danglingVolumeList = list(set(volumeList).difference(set(volumeInfo.keys()))) + if not danglingVolumeList: + sys.exit(0) + + print "Cleaning up dangling volume(s):", danglingVolumeList + for volumeName in danglingVolumeList: + Utils.runCommand("rmdir %s/%s" % (Globals.REEXPORT_DIR, volumeName), root=True) + Utils.runCommand("rm -f %s/%s" % (Globals.CIFS_EXPORT_DIR, volumeName), root=True) + if not VolumeUtils.excludeVolume(volumeName): + Utils.log("Failed to exclude volume %s for CIFS reexport" % volumeName) + Utils.runCommand("rm -f %s/%s.smbconf" % (Globals.VOLUME_CONF_DIR, volumeName), root=True) + + sys.exit(0) + +if __name__ == "__main__": + main() diff --git a/src/com.gluster.storage.management.gateway.scripts/src/backend/modify_volume_cifs.py b/src/org.gluster.storage.management.gateway.scripts/src/backend/modify_volume_cifs.py index d56b1f59..9e1e581c 100755 --- a/src/com.gluster.storage.management.gateway.scripts/src/backend/modify_volume_cifs.py +++ b/src/org.gluster.storage.management.gateway.scripts/src/backend/modify_volume_cifs.py @@ -1,6 +1,20 @@ #!/usr/bin/python # Copyright (C) 2011 Gluster, Inc. <http://www.gluster.com> -# This file is part of Gluster Management Gateway. +# This file is part of Gluster Management Gateway (GlusterMG). +# +# GlusterMG is free software; you can redistribute it and/or modify +# it under the terms of the GNU General Public License as published +# by the Free Software Foundation; either version 3 of the License, +# or (at your option) any later version. +# +# GlusterMG is distributed in the hope that it will be useful, but +# WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU +# General Public License for more details. +# +# You should have received a copy of the GNU General Public License +# along with this program. If not, see +# <http://www.gnu.org/licenses/>. # import os diff --git a/src/com.gluster.storage.management.gateway.scripts/src/backend/multicast-discoverd.init.d b/src/org.gluster.storage.management.gateway.scripts/src/backend/multicast-discoverd.init.d index 7cfbe44a..8bc881f8 100755 --- a/src/com.gluster.storage.management.gateway.scripts/src/backend/multicast-discoverd.init.d +++ b/src/org.gluster.storage.management.gateway.scripts/src/backend/multicast-discoverd.init.d @@ -1,6 +1,20 @@ #!/bin/bash # Copyright (C) 2011 Gluster, Inc. <http://www.gluster.com> -# This file is part of Gluster Management Gateway. +# This file is part of Gluster Management Gateway (GlusterMG). +# +# GlusterMG is free software; you can redistribute it and/or modify +# it under the terms of the GNU General Public License as published +# by the Free Software Foundation; either version 3 of the License, +# or (at your option) any later version. +# +# GlusterMG is distributed in the hope that it will be useful, but +# WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU +# General Public License for more details. +# +# You should have received a copy of the GNU General Public License +# along with this program. If not, see +# <http://www.gnu.org/licenses/>. # # chkconfig: - 85 15 # description: multicast discovery service diff --git a/src/com.gluster.storage.management.gateway.scripts/src/backend/multicast-discoverd.py b/src/org.gluster.storage.management.gateway.scripts/src/backend/multicast-discoverd.py index fbadd048..64236bbe 100755 --- a/src/com.gluster.storage.management.gateway.scripts/src/backend/multicast-discoverd.py +++ b/src/org.gluster.storage.management.gateway.scripts/src/backend/multicast-discoverd.py @@ -1,6 +1,20 @@ #!/usr/bin/python # Copyright (C) 2011 Gluster, Inc. <http://www.gluster.com> -# This file is part of Gluster Management Gateway. +# This file is part of Gluster Management Gateway (GlusterMG). +# +# GlusterMG is free software; you can redistribute it and/or modify +# it under the terms of the GNU General Public License as published +# by the Free Software Foundation; either version 3 of the License, +# or (at your option) any later version. +# +# GlusterMG is distributed in the hope that it will be useful, but +# WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU +# General Public License for more details. +# +# You should have received a copy of the GNU General Public License +# along with this program. If not, see +# <http://www.gnu.org/licenses/>. # import os @@ -31,17 +45,12 @@ def exitHandler(signum, frame): def updateGlusterdUuid(signum, frame): - try: - fp = open("/etc/glusterd/glusterd.info") - content = fp.read() - fp.close() - for line in content.strip().split(): - if line.startswith("UUID="): - GLUSTERD_UUID = line.split("=")[1] - break - except IOError, e: - Utils.log("failed to read file /etc/glusterd/glusterd.info: %s" % str(e)) - GLUSTERD_UUID = "NA" + lines = Utils.readFile("/etc/glusterd/glusterd.info", lines=True) + for line in lines: + if line.strip().startswith("UUID="): + GLUSTERD_UUID = line.strip().split("=")[1] + return + GLUSTERD_UUID = "NA" def isInPeer(): diff --git a/src/com.gluster.storage.management.gateway.scripts/src/backend/rrd_cpu.pl b/src/org.gluster.storage.management.gateway.scripts/src/backend/rrd_cpu.pl index 7b070812..7b2ba99a 100755 --- a/src/com.gluster.storage.management.gateway.scripts/src/backend/rrd_cpu.pl +++ b/src/org.gluster.storage.management.gateway.scripts/src/backend/rrd_cpu.pl @@ -1,4 +1,22 @@ #!/usr/bin/perl +#******************************************************************************* +# Copyright (c) 2006-2011 Gluster, Inc. <http://www.gluster.com> +# This file is part of Gluster Management Gateway. +# +# Gluster Management Gateway is free software; you can redistribute +# it and/or modify it under the terms of the GNU General Public +# License as published by the Free Software Foundation; either +# version 3 of the License, or (at your option) any later version. +# +# Gluster Management Gateway is distributed in the hope that it +# will be useful, but WITHOUT ANY WARRANTY; without even the +# implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR +# PURPOSE. See the GNU General Public License for more details. +# +# You should have received a copy of the GNU General Public License +# along with this program. If not, see +# <http://www.gnu.org/licenses/>. +#******************************************************************************* use RRDs; @@ -80,5 +98,5 @@ sub updatecpudata { $ERROR = RRDs::error; print "Error in RRD::update for cpu: $ERROR\n" if $ERROR; - print "N:$user:$system:$idle\n"; + #print "N:$user:$system:$idle\n"; } diff --git a/src/com.gluster.storage.management.gateway.scripts/src/backend/rrd_mem.pl b/src/org.gluster.storage.management.gateway.scripts/src/backend/rrd_mem.pl index 5c47cd81..39c4d92e 100755 --- a/src/com.gluster.storage.management.gateway.scripts/src/backend/rrd_mem.pl +++ b/src/org.gluster.storage.management.gateway.scripts/src/backend/rrd_mem.pl @@ -1,4 +1,22 @@ #!/usr/bin/perl +#******************************************************************************* +# Copyright (c) 2006-2011 Gluster, Inc. <http://www.gluster.com> +# This file is part of Gluster Management Gateway. +# +# Gluster Management Gateway is free software; you can redistribute +# it and/or modify it under the terms of the GNU General Public +# License as published by the Free Software Foundation; either +# version 3 of the License, or (at your option) any later version. +# +# Gluster Management Gateway is distributed in the hope that it +# will be useful, but WITHOUT ANY WARRANTY; without even the +# implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR +# PURPOSE. See the GNU General Public License for more details. +# +# You should have received a copy of the GNU General Public License +# along with this program. If not, see +# <http://www.gnu.org/licenses/>. +#******************************************************************************* use RRDs; diff --git a/src/com.gluster.storage.management.gateway.scripts/src/backend/rrd_net.pl b/src/org.gluster.storage.management.gateway.scripts/src/backend/rrd_net.pl index 6ae128fd..c5b5428f 100755 --- a/src/com.gluster.storage.management.gateway.scripts/src/backend/rrd_net.pl +++ b/src/org.gluster.storage.management.gateway.scripts/src/backend/rrd_net.pl @@ -1,4 +1,22 @@ #!/usr/bin/perl +#******************************************************************************* +# Copyright (c) 2006-2011 Gluster, Inc. <http://www.gluster.com> +# This file is part of Gluster Management Gateway. +# +# Gluster Management Gateway is free software; you can redistribute +# it and/or modify it under the terms of the GNU General Public +# License as published by the Free Software Foundation; either +# version 3 of the License, or (at your option) any later version. +# +# Gluster Management Gateway is distributed in the hope that it +# will be useful, but WITHOUT ANY WARRANTY; without even the +# implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR +# PURPOSE. See the GNU General Public License for more details. +# +# You should have received a copy of the GNU General Public License +# along with this program. If not, see +# <http://www.gnu.org/licenses/>. +#******************************************************************************* use RRDs; diff --git a/src/com.gluster.storage.management.gateway.scripts/src/backend/setup_cifs_config.py b/src/org.gluster.storage.management.gateway.scripts/src/backend/setup_cifs_config.py index 5d5187f4..62e031fd 100755 --- a/src/com.gluster.storage.management.gateway.scripts/src/backend/setup_cifs_config.py +++ b/src/org.gluster.storage.management.gateway.scripts/src/backend/setup_cifs_config.py @@ -1,6 +1,20 @@ #!/usr/bin/python # Copyright (C) 2011 Gluster, Inc. <http://www.gluster.com> -# This file is part of Gluster Management Gateway. +# This file is part of Gluster Management Gateway (GlusterMG). +# +# GlusterMG is free software; you can redistribute it and/or modify +# it under the terms of the GNU General Public License as published +# by the Free Software Foundation; either version 3 of the License, +# or (at your option) any later version. +# +# GlusterMG is distributed in the hope that it will be useful, but +# WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU +# General Public License for more details. +# +# You should have received a copy of the GNU General Public License +# along with this program. If not, see +# <http://www.gnu.org/licenses/>. # import os diff --git a/src/com.gluster.storage.management.gateway.scripts/src/backend/start_volume_cifs.py b/src/org.gluster.storage.management.gateway.scripts/src/backend/start_volume_cifs.py index e16c87c2..45d239e1 100755 --- a/src/com.gluster.storage.management.gateway.scripts/src/backend/start_volume_cifs.py +++ b/src/org.gluster.storage.management.gateway.scripts/src/backend/start_volume_cifs.py @@ -1,6 +1,20 @@ #!/usr/bin/python # Copyright (C) 2011 Gluster, Inc. <http://www.gluster.com> -# This file is part of Gluster Management Gateway. +# This file is part of Gluster Management Gateway (GlusterMG). +# +# GlusterMG is free software; you can redistribute it and/or modify +# it under the terms of the GNU General Public License as published +# by the Free Software Foundation; either version 3 of the License, +# or (at your option) any later version. +# +# GlusterMG is distributed in the hope that it will be useful, but +# WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU +# General Public License for more details. +# +# You should have received a copy of the GNU General Public License +# along with this program. If not, see +# <http://www.gnu.org/licenses/>. # import os diff --git a/src/com.gluster.storage.management.gateway.scripts/src/backend/stop_volume_cifs.py b/src/org.gluster.storage.management.gateway.scripts/src/backend/stop_volume_cifs.py index d67d9061..6bf736b9 100755 --- a/src/com.gluster.storage.management.gateway.scripts/src/backend/stop_volume_cifs.py +++ b/src/org.gluster.storage.management.gateway.scripts/src/backend/stop_volume_cifs.py @@ -1,6 +1,20 @@ #!/usr/bin/python # Copyright (C) 2011 Gluster, Inc. <http://www.gluster.com> -# This file is part of Gluster Management Gateway. +# This file is part of Gluster Management Gateway (GlusterMG). +# +# GlusterMG is free software; you can redistribute it and/or modify +# it under the terms of the GNU General Public License as published +# by the Free Software Foundation; either version 3 of the License, +# or (at your option) any later version. +# +# GlusterMG is distributed in the hope that it will be useful, but +# WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU +# General Public License for more details. +# +# You should have received a copy of the GNU General Public License +# along with this program. If not, see +# <http://www.gnu.org/licenses/>. # import os diff --git a/src/org.gluster.storage.management.gateway.scripts/src/backend/update-rrd.sh b/src/org.gluster.storage.management.gateway.scripts/src/backend/update-rrd.sh new file mode 100755 index 00000000..679a3a31 --- /dev/null +++ b/src/org.gluster.storage.management.gateway.scripts/src/backend/update-rrd.sh @@ -0,0 +1,24 @@ +#!/bin/bash +#******************************************************************************* +# Copyright (c) 2006-2011 Gluster, Inc. <http://www.gluster.com> +# This file is part of Gluster Management Gateway. +# +# Gluster Management Gateway is free software; you can redistribute +# it and/or modify it under the terms of the GNU General Public +# License as published by the Free Software Foundation; either +# version 3 of the License, or (at your option) any later version. +# +# Gluster Management Gateway is distributed in the hope that it +# will be useful, but WITHOUT ANY WARRANTY; without even the +# implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR +# PURPOSE. See the GNU General Public License for more details. +# +# You should have received a copy of the GNU General Public License +# along with this program. If not, see +# <http://www.gnu.org/licenses/>. +#******************************************************************************* + +/usr/bin/rrd_cpu.pl & +/usr/bin/rrd_mem.pl & +/usr/bin/rrd_net.pl & +wait diff --git a/src/com.gluster.storage.management.gateway.scripts/src/backend/update_volume_cifs.py b/src/org.gluster.storage.management.gateway.scripts/src/backend/update_volume_cifs.py index 64297a87..8544ac5c 100755 --- a/src/com.gluster.storage.management.gateway.scripts/src/backend/update_volume_cifs.py +++ b/src/org.gluster.storage.management.gateway.scripts/src/backend/update_volume_cifs.py @@ -1,6 +1,20 @@ #!/usr/bin/python # Copyright (C) 2011 Gluster, Inc. <http://www.gluster.com> -# This file is part of Gluster Management Gateway. +# This file is part of Gluster Management Gateway (GlusterMG). +# +# GlusterMG is free software; you can redistribute it and/or modify +# it under the terms of the GNU General Public License as published +# by the Free Software Foundation; either version 3 of the License, +# or (at your option) any later version. +# +# GlusterMG is distributed in the hope that it will be useful, but +# WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU +# General Public License for more details. +# +# You should have received a copy of the GNU General Public License +# along with this program. If not, see +# <http://www.gnu.org/licenses/>. # import os diff --git a/src/org.gluster.storage.management.gateway.scripts/src/common/Globals.py b/src/org.gluster.storage.management.gateway.scripts/src/common/Globals.py new file mode 100644 index 00000000..f03e9feb --- /dev/null +++ b/src/org.gluster.storage.management.gateway.scripts/src/common/Globals.py @@ -0,0 +1,49 @@ +# Copyright (C) 2011 Gluster, Inc. <http://www.gluster.com> +# This file is part of Gluster Management Gateway (GlusterMG). +# +# GlusterMG is free software; you can redistribute it and/or modify +# it under the terms of the GNU General Public License as published +# by the Free Software Foundation; either version 3 of the License, +# or (at your option) any later version. +# +# GlusterMG is distributed in the hope that it will be useful, but +# WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU +# General Public License for more details. +# +# You should have received a copy of the GNU General Public License +# along with this program. If not, see +# <http://www.gnu.org/licenses/>. +# + +MULTICAST_GROUP = '224.224.1.1' +MULTICAST_PORT = 24729 +GLUSTER_PROBE_STRING = "GLUSTERPROBE" +GLUSTER_PROBE_VERSION = "1.0.0" +DEFAULT_BUFSIZE = 1024 +SERVER_PORT = 24731 +DEFAULT_BACKLOG = 5 +DEFAULT_TIMEOUT = 3 +DEFAULT_ID_LENGTH = 16 +GLUSTER_PLATFORM_VERSION = "3.2" + +## System configuration constants +SYSCONFIG_NETWORK_DIR = "/etc/sysconfig/network-scripts" +FSTAB_FILE = "/etc/fstab" +SAMBA_CONF_FILE = "/etc/samba/smb.conf" +REAL_SAMBA_CONF_FILE = "/etc/samba/real.smb.conf" +MODPROBE_CONF_FILE = "/etc/modprobe.d/bonding.conf" +RESOLV_CONF_FILE = "/etc/resolv.conf" +VOLUME_USER_DESCRIPTION = "Gluster Volume User" +GLUSTER_BASE_DIR = "/etc/glustermg" +REEXPORT_DIR = "/reexport" +CIFS_EXPORT_DIR = "/cifs" + +## Derived constants +VOLUME_CONF_DIR = GLUSTER_BASE_DIR + "/volumes" +VOLUME_SMBCONF_FILE = VOLUME_CONF_DIR + "/volumes.smbconf.list" + +AWS_WEB_SERVICE_URL = "http://169.254.169.254/latest" +DEFAULT_UID = 1024000 +CIFS_USER_FILE = "/opt/glustermg/etc/users.cifs" +CIFS_VOLUME_FILE = "/opt/glustermg/etc/volumes.cifs" diff --git a/src/org.gluster.storage.management.gateway.scripts/src/common/Utils.py b/src/org.gluster.storage.management.gateway.scripts/src/common/Utils.py new file mode 100644 index 00000000..597f3fb6 --- /dev/null +++ b/src/org.gluster.storage.management.gateway.scripts/src/common/Utils.py @@ -0,0 +1,343 @@ +# Copyright (C) 2011 Gluster, Inc. <http://www.gluster.com> +# This file is part of Gluster Management Gateway (GlusterMG). +# +# GlusterMG is free software; you can redistribute it and/or modify +# it under the terms of the GNU General Public License as published +# by the Free Software Foundation; either version 3 of the License, +# or (at your option) any later version. +# +# GlusterMG is distributed in the hope that it will be useful, but +# WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU +# General Public License for more details. +# +# You should have received a copy of the GNU General Public License +# along with this program. If not, see +# <http://www.gnu.org/licenses/>. +# + +import os +import sys +p1 = os.path.abspath(os.path.dirname(sys.argv[0])) +p2 = "%s/common" % os.path.dirname(p1) +if not p1 in sys.path: + sys.path.append(p1) +if not p2 in sys.path: + sys.path.append(p2) +import re +import syslog +import subprocess +import time +import tempfile +import glob + +import Globals + +RUN_COMMAND_ERROR = -1024 +LOG_SYSLOG = 1 +SYSLOG_REQUIRED = False +LOG_FILE_NAME = None +LOG_FILE_OBJ = None +logOpened = False +sshCommandPrefix = "ssh -l root -q -i /opt/glustermg/keys/gluster.pem -o BatchMode=yes -o GSSAPIAuthentication=no -o PasswordAuthentication=no -o StrictHostKeyChecking=no".split() +try: + commandPath = "/opt/glustermg/%s/backend" % os.environ['GMG_VERSION'] +except KeyError, e: + commandPath = "/opt/glustermg/@VERSION@/backend" + +def log(priority, message=None): + global logOpened + if not logOpened: + syslog.openlog(os.path.basename(sys.argv[0])) + logOpened = True + + if type(priority) == type(""): + logPriority = syslog.LOG_INFO + logMessage = priority + else: + logPriority = priority + logMessage = message + if not logMessage: + return + #if Globals.DEBUG: + # sys.stderr.write(logMessage) + else: + syslog.syslog(logPriority, logMessage) + return + + +def isString(value): + return (type(value) == type("") or type(value) == type(u"")) + + +def getTempFileName(): + filedesc, filename = tempfile.mkstemp(prefix="GSP_") + os.close(filedesc) + return filename + + +def readFile(fileName, lines=False): + content = None + try: + fp = open(fileName) + if lines: + content = fp.readlines() + else: + content = fp.read() + fp.close() + return content + except IOError, e: + log("failed to read file %s: %s" % (fileName, str(e))) + if lines: + return [] + else: + return "" + + +def writeFile(fileName, content): + try: + fp = open(fileName, "w") + if isString(content): + fp.write(content) + elif type(content) == type([]): + fp.writelines(content) + fp.close() + return True + except IOError, e: + log("failed to write file %s: %s" % (fileName, str(e))) + return False + + +def removeFile(fileName, root=False): + if root: + if runCommand("rm %s" % fileName, root=True) == 0: + return True + return False + try: + os.remove(fileName) + return True + except OSError, e: + log("Failed to remove file %s: %s" % (fileName, str(e))) + return False + + +def runCommandBG(command, stdinFileObj=None, stdoutFileObj=None, stderrFileObj=None, + shell=False, root=None): + if shell: + if not isString(command): + return None + else: + if isString(command): + command = command.split() + + if root == True: + if shell: + command = "sudo " + command + else: + command = ['sudo'] + command + elif isString(root): + if shell: + command = "sudo -u " + root + " " + command + else: + command = ['sudo', '-u', root] + command + + if not stdinFileObj: + stdinFileObj=subprocess.PIPE + if not stdoutFileObj: + stdoutFileObj=subprocess.PIPE + if not stderrFileObj: + stderrFileObj=subprocess.PIPE + + try: + process = subprocess.Popen(command, + bufsize=-1, + stdin=stdinFileObj, + stdout=stdoutFileObj, + stderr=stderrFileObj, + shell=shell) + return process + except OSError, e: + log("runCommandBG(): Failed to run command [%s]: %s" % (command, e)) + return None + + +def runCommand(command, + input='', output=False, + shell=False, root=None): + rv = {} + rv["Status"] = RUN_COMMAND_ERROR + rv["Stdout"] = None + rv["Stderr"] = None + + try: + stdinFileName = getTempFileName() + stdinFileObj = open(stdinFileName, "w") + stdinFileObj.write(input) + stdinFileObj.close() + stdinFileObj = open(stdinFileName, "r") + + stdoutFileName = getTempFileName() + stdoutFileObj = open(stdoutFileName, "w") + + stderrFileName = getTempFileName() + stderrFileObj = open(stderrFileName, "w") + except IOError, e: + log("Failed to create temporary file for executing command [%s]: %s" % (command, e)) + if output: + return rv + return rv["Status"] + + stdoutContent = None + stderrContent = None + + process = runCommandBG(command, + stdinFileObj=stdinFileObj, + stdoutFileObj=stdoutFileObj, + stderrFileObj=stderrFileObj, + shell=shell, root=root) + if process: + rv['Status'] = process.wait() + rv['Stdout'] = readFile(stdoutFileName) + rv['Stderr'] = readFile(stderrFileName) + + os.remove(stdinFileName) + os.remove(stdoutFileName) + os.remove(stderrFileName) + + if output: + return rv + return rv["Status"] + + +def daemonize(): + try: + pid = os.fork() + if pid > 0: + # exit first parent + sys.exit(0) + except OSError, e: + #sys.stderr.write("fork #1 failed: %d (%s)\n" % (e.errno, e.strerror)) + return False + + # decouple from parent environment + os.chdir("/") + os.setsid() + os.umask(0) + + # do second fork + try: + pid = os.fork() + if pid > 0: + # exit from second parent + sys.exit(0) + except OSError, e: + #sys.stderr.write("fork #2 failed: %d (%s)\n" % (e.errno, e.strerror)) + return False + + # redirect standard file descriptors + sys.stdout.flush() + sys.stderr.flush() + si = file("/dev/null", 'r') + so = file("/dev/null", 'a+') + se = file("/dev/null", 'a+', 0) + os.dup2(si.fileno(), sys.stdin.fileno()) + os.dup2(so.fileno(), sys.stdout.fileno()) + os.dup2(se.fileno(), sys.stderr.fileno()) + return True + + +def getMeminfo(): + lines = readFile("/proc/meminfo", lines=True) + re_parser = re.compile(r'^(?P<key>\S*):\s*(?P<value>\d*)\s*kB' ) + result = {} + for line in lines: + match = re_parser.match(line) + if not match: + continue # skip lines that don't parse + key, value = match.groups(['key', 'value']) + result[key] = int(value) + result['MemUsed'] = (result['MemTotal'] - result['MemFree'] - result['Buffers'] - result['Cached']) + return result + + +def _getCpuStatList(): + lines = readFile("/proc/stat", lines=True) + if not lines: + return None + return map(float, lines[0].split()[1:5]) + + +def getCpuUsageAvg(): + st1 = _getCpuStatList() + #time1 = time.time() + time.sleep(1) + st2 = _getCpuStatList() + #time2 = time.time() + if not (st1 and st2): + return None + usageTime = (st2[0] - st1[0]) + (st2[1] - st1[1]) + (st2[2] - st1[2]) + try: + return (100.0 * usageTime) / (usageTime + (st2[3] - st1[3])) + except ZeroDivisionError, e: + return 0 + + +def convertKbToMb(kb): + return kb / 1024.0 + + +def getDeviceFormatStatusFile(device): + return "/var/tmp/format_%s.status" % device.replace('/', '_') + + +def getDeviceFormatLockFile(device): + return "/var/lock/format_%s.lock" % device.replace('/', '_') + + +def getDeviceFormatOutputFile(device): + return "/var/tmp/format_%s.out" % device.replace('/', '_') + + +def getGlusterVersion(): + rv = runCommand("/usr/sbin/gluster --version", output=True) + if rv["Stderr"]: + return None + if rv["Status"] != 0: + return None + if not rv["Stdout"]: + return None + return rv["Stdout"].strip().split()[1] + + +def getCifsUserUid(userName): + lines = readFile(Globals.CIFS_USER_FILE, lines=True) + for line in lines: + if not line.strip(): + continue + tokens = line.strip().split(":") + if tokens[1] == userName: + return int(tokens[0]) + return None + +def grun(serverFile, command, argumentList=[]): + commandList = ["%s/%s" % (commandPath, command)] + argumentList + serverNameList = readFile(serverFile, lines=True) + if not serverNameList: + return 1 + status = True + for serverName in serverNameList: + rv = runCommand(sshCommandPrefix + [serverName.strip()] + commandList, output=True) + if rv["Status"] != 0: + sys.stderr.write("%s: %s\n" % (serverName.strip(), rv["Status"])) + sys.stderr.write("Stdout:\n%s\n" % rv["Stdout"]) + sys.stderr.write("Stderr:\n%s\n" % rv["Stderr"]) + sys.stderr.write("---\n") + status = False + + if status: + return 0 + else: + return 2 + +def getFileSystemType(): + return [os.path.basename(i).split('.')[1] for i in glob.glob("/sbin/mkfs.*")] diff --git a/src/com.gluster.storage.management.gateway.scripts/src/common/XmlHandler.py b/src/org.gluster.storage.management.gateway.scripts/src/common/XmlHandler.py index b9db15c8..0d491a68 100644 --- a/src/com.gluster.storage.management.gateway.scripts/src/common/XmlHandler.py +++ b/src/org.gluster.storage.management.gateway.scripts/src/common/XmlHandler.py @@ -1,26 +1,26 @@ -# Copyright (C) 2009 Gluster, Inc. <http://www.gluster.com> -# This file is part of Gluster Storage Platform. +# Copyright (C) 2011 Gluster, Inc. <http://www.gluster.com> +# This file is part of Gluster Management Gateway (GlusterMG). # -# Gluster Storage Platform is free software; you can redistribute it -# and/or modify it under the terms of the GNU General Public License -# as published by the Free Software Foundation; either version 3 of -# the License, or (at your option) any later version. +# GlusterMG is free software; you can redistribute it and/or modify +# it under the terms of the GNU General Public License as published +# by the Free Software Foundation; either version 3 of the License, +# or (at your option) any later version. # -# Gluster Storage Platform is distributed in the hope that it will be -# useful, but WITHOUT ANY WARRANTY; without even the implied warranty -# of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -# GNU General Public License for more details. +# GlusterMG is distributed in the hope that it will be useful, but +# WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU +# General Public License for more details. # # You should have received a copy of the GNU General Public License # along with this program. If not, see # <http://www.gnu.org/licenses/>. +# import xml import xml.parsers.expat import xml.dom.minidom as MDOM import os import Globals -import copy import Utils XML_STRING = 0 @@ -195,7 +195,7 @@ class XDOM: self._domObj.writexml(fp, indent, addindent, newl) fp.close() return True - except IOError: + except IOError, e: return False def toString(self, indent=" ", newl="\n", encoding = None): @@ -231,9 +231,9 @@ class RequestXml(XDOM): self._domObj = MDOM.parse(requestString) elif XML_STRING == type: self._domObj = MDOM.parseString(requestString) - except IOError: + except IOError, e: XDOM.__init__(self) - except xml.parsers.expat.ExpatError: + except xml.parsers.expat.ExpatError, e: XDOM.__init__(self) ##--end of RequestXML diff --git a/src/com.gluster.storage.management.gateway.scripts/src/gateway/add_user_cifs_all.py b/src/org.gluster.storage.management.gateway.scripts/src/gateway/add_user_cifs_all.py index 33adea0b..bb17d4b5 100755 --- a/src/com.gluster.storage.management.gateway.scripts/src/gateway/add_user_cifs_all.py +++ b/src/org.gluster.storage.management.gateway.scripts/src/gateway/add_user_cifs_all.py @@ -1,6 +1,20 @@ #!/usr/bin/python # Copyright (C) 2011 Gluster, Inc. <http://www.gluster.com> -# This file is part of Gluster Management Gateway. +# This file is part of Gluster Management Gateway (GlusterMG). +# +# GlusterMG is free software; you can redistribute it and/or modify +# it under the terms of the GNU General Public License as published +# by the Free Software Foundation; either version 3 of the License, +# or (at your option) any later version. +# +# GlusterMG is distributed in the hope that it will be useful, but +# WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU +# General Public License for more details. +# +# You should have received a copy of the GNU General Public License +# along with this program. If not, see +# <http://www.gnu.org/licenses/>. # import os @@ -16,36 +30,19 @@ import Utils def getUid(userName): - try: - fp = open(Globals.CIFS_USER_FILE) - content = fp.read() - fp.close() - except IOError, e: - Utils.log("failed to read file %s: %s" % (Globals.CIFS_USER_FILE, str(e))) - return False - - for line in content.strip().split(): - tokens = line.split(":") + lines = Utils.readFile(Globals.CIFS_USER_FILE, lines=True) + for line in lines: + tokens = line.strip().split(":") if tokens[1] == userName: return int(tokens[0]) return None def getLastUid(): - if not os.path.exists(Globals.CIFS_USER_FILE): - return Globals.DEFAULT_UID - try: - fp = open(Globals.CIFS_USER_FILE) - content = fp.read() - fp.close() - except IOError, e: - Utils.log("failed to read file %s: %s" % (Globals.CIFS_USER_FILE, str(e))) - return False - - lines = content.strip().split() + lines = Utils.readFile(Globals.CIFS_USER_FILE, lines=True) if not lines: return Globals.DEFAULT_UID - return int(lines[-1].split(":")[0]) + return int([line.strip().split(':')[0] for line in lines if line.strip()][-1]) def setUid(uid, userName): @@ -80,7 +77,7 @@ def main(): existingUser = True print (serverFile, uid, userName, password) - rv = Utils.runCommand("grun.py %s add_user_cifs.py %s %s %s" % (serverFile, uid, userName, password)) + rv = Utils.grun(serverFile, "add_user_cifs.py", ["%s" % uid, userName, password]) if existingUser: sys.exit(rv) diff --git a/src/com.gluster.storage.management.gateway.scripts/src/gateway/create_volume_cifs_all.py b/src/org.gluster.storage.management.gateway.scripts/src/gateway/create_volume_cifs_all.py index 59e74bed..2c40a56b 100755 --- a/src/com.gluster.storage.management.gateway.scripts/src/gateway/create_volume_cifs_all.py +++ b/src/org.gluster.storage.management.gateway.scripts/src/gateway/create_volume_cifs_all.py @@ -1,6 +1,20 @@ #!/usr/bin/python # Copyright (C) 2011 Gluster, Inc. <http://www.gluster.com> -# This file is part of Gluster Management Gateway. +# This file is part of Gluster Management Gateway (GlusterMG). +# +# GlusterMG is free software; you can redistribute it and/or modify +# it under the terms of the GNU General Public License as published +# by the Free Software Foundation; either version 3 of the License, +# or (at your option) any later version. +# +# GlusterMG is distributed in the hope that it will be useful, but +# WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU +# General Public License for more details. +# +# You should have received a copy of the GNU General Public License +# along with this program. If not, see +# <http://www.gnu.org/licenses/>. # import os @@ -16,18 +30,13 @@ import Utils def addVolumeCifsConf(volumeName, userList): - try: - fp = open(Globals.CIFS_VOLUME_FILE) - content = fp.read() - fp.close() - except IOError, e: - Utils.log("failed to read file %s: %s" % (Globals.CIFS_VOLUME_FILE, str(e))) - content = "" - + lines = Utils.readFile(Globals.CIFS_VOLUME_FILE, lines=True) try: fp = open(Globals.CIFS_VOLUME_FILE, "w") - for line in content.split(): - if line.split(":")[0] != volumeName: + for line in lines: + if not line.strip(): + continue + if line.strip().split(":")[0] != volumeName: fp.write("%s\n" % line) fp.write("%s:%s\n" % (volumeName, ":".join(userList))) fp.close() @@ -55,7 +64,7 @@ def main(): sys.stderr.write("User %s does not exists\n" % missingUserList) sys.exit(1) - rv = Utils.runCommand(["grun.py", serverFile, "create_volume_cifs.py", volumeName] + userList) + rv = Utils.grun(serverFile, "create_volume_cifs.py", [volumeName] + userList) if rv == 0: if not addVolumeCifsConf(volumeName, userList): sys.stderr.write("Failed to add volume %s and user-list %s in cifs volume configuration\n" % (volumeName, userList)) diff --git a/src/com.gluster.storage.management.gateway.scripts/src/gateway/delete_user_cifs_all.py b/src/org.gluster.storage.management.gateway.scripts/src/gateway/delete_user_cifs_all.py index 3c68891c..92192d69 100755 --- a/src/com.gluster.storage.management.gateway.scripts/src/gateway/delete_user_cifs_all.py +++ b/src/org.gluster.storage.management.gateway.scripts/src/gateway/delete_user_cifs_all.py @@ -1,6 +1,20 @@ #!/usr/bin/python # Copyright (C) 2011 Gluster, Inc. <http://www.gluster.com> -# This file is part of Gluster Management Gateway. +# This file is part of Gluster Management Gateway (GlusterMG). +# +# GlusterMG is free software; you can redistribute it and/or modify +# it under the terms of the GNU General Public License as published +# by the Free Software Foundation; either version 3 of the License, +# or (at your option) any later version. +# +# GlusterMG is distributed in the hope that it will be useful, but +# WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU +# General Public License for more details. +# +# You should have received a copy of the GNU General Public License +# along with this program. If not, see +# <http://www.gnu.org/licenses/>. # import os @@ -16,18 +30,12 @@ import Utils def removeUser(userName): - try: - fp = open(Globals.CIFS_USER_FILE) - content = fp.read() - fp.close() - except IOError, e: - Utils.log("failed to read file %s: %s" % (Globals.CIFS_USER_FILE, str(e))) - return False - + lines = Utils.readFile(Globals.CIFS_USER_FILE, lines=True) try: fp = open(Globals.CIFS_USER_FILE, "w") - lines = content.strip().split() for line in lines: + if not line.strip(): + continue if line.split(":")[1] == userName: continue fp.write("%s\n" % line) @@ -40,13 +48,13 @@ def removeUser(userName): def main(): if len(sys.argv) < 3: - sys.stderr.write("usage: %s SERVER_LIST USERNAME\n" % os.path.basename(sys.argv[0])) + sys.stderr.write("usage: %s SERVER_FILE USERNAME\n" % os.path.basename(sys.argv[0])) sys.exit(-1) - serverList = sys.argv[1] + serverFile = sys.argv[1] userName = sys.argv[2] - rv = Utils.runCommand("grun.py %s delete_user_cifs.py %s" % (serverList, userName)) + rv = Utils.grun(serverFile, "delete_user_cifs.py", [userName]) if rv == 0: if not removeUser(userName): Utils.log("Failed to remove the user:%s on gateway server\n" % userName) diff --git a/src/com.gluster.storage.management.gateway.scripts/src/gateway/delete_volume_cifs_all.py b/src/org.gluster.storage.management.gateway.scripts/src/gateway/delete_volume_cifs_all.py index 3456b92d..0f4e7fb5 100755 --- a/src/com.gluster.storage.management.gateway.scripts/src/gateway/delete_volume_cifs_all.py +++ b/src/org.gluster.storage.management.gateway.scripts/src/gateway/delete_volume_cifs_all.py @@ -1,6 +1,20 @@ #!/usr/bin/python # Copyright (C) 2011 Gluster, Inc. <http://www.gluster.com> -# This file is part of Gluster Management Gateway. +# This file is part of Gluster Management Gateway (GlusterMG). +# +# GlusterMG is free software; you can redistribute it and/or modify +# it under the terms of the GNU General Public License as published +# by the Free Software Foundation; either version 3 of the License, +# or (at your option) any later version. +# +# GlusterMG is distributed in the hope that it will be useful, but +# WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU +# General Public License for more details. +# +# You should have received a copy of the GNU General Public License +# along with this program. If not, see +# <http://www.gnu.org/licenses/>. # import os @@ -16,18 +30,13 @@ import Utils def removeVolumeCifsConf(volumeName): - try: - fp = open(Globals.CIFS_VOLUME_FILE) - content = fp.read() - fp.close() - except IOError, e: - Utils.log("failed to read file %s: %s" % (Globals.CIFS_VOLUME_FILE, str(e))) - content = "" - + lines = Utils.readFile(Globals.CIFS_VOLUME_FILE, lines=True) try: fp = open(Globals.CIFS_VOLUME_FILE, "w") - for line in content.split(): - if line.split(":")[0] != volumeName: + for line in lines: + if not line.strip(): + continue + if line.strip().split(":")[0] != volumeName: fp.write("%s\n" % line) fp.close() except IOError, e: @@ -44,7 +53,7 @@ def main(): serverFile = sys.argv[1] volumeName = sys.argv[2] - rv = Utils.runCommand(["grun.py", serverFile, "delete_volume_cifs.py", volumeName]) + rv = Utils.grun(serverFile, "delete_volume_cifs.py", [volumeName]) if rv == 0: if not removeVolumeCifsConf(volumeName): sys.stderr.write("Failed to remove volume %s and user-list in cifs volume configuration\n" % volumeName) diff --git a/src/org.gluster.storage.management.gateway.scripts/src/gateway/get_volume_user_cifs.py b/src/org.gluster.storage.management.gateway.scripts/src/gateway/get_volume_user_cifs.py new file mode 100755 index 00000000..bbe736e1 --- /dev/null +++ b/src/org.gluster.storage.management.gateway.scripts/src/gateway/get_volume_user_cifs.py @@ -0,0 +1,52 @@ +#!/usr/bin/python +# Copyright (C) 2011 Gluster, Inc. <http://www.gluster.com> +# This file is part of Gluster Management Gateway (GlusterMG). +# +# GlusterMG is free software; you can redistribute it and/or modify +# it under the terms of the GNU General Public License as published +# by the Free Software Foundation; either version 3 of the License, +# or (at your option) any later version. +# +# GlusterMG is distributed in the hope that it will be useful, but +# WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU +# General Public License for more details. +# +# You should have received a copy of the GNU General Public License +# along with this program. If not, see +# <http://www.gnu.org/licenses/>. +# + +import os +import sys +p1 = os.path.abspath(os.path.dirname(sys.argv[0])) +p2 = "%s/common" % os.path.dirname(p1) +if not p1 in sys.path: + sys.path.append(p1) +if not p2 in sys.path: + sys.path.append(p2) +import Globals +import Utils + + +def main(): + if len(sys.argv) < 2: + sys.stderr.write("usage: %s VOLUME_NAME\n" % os.path.basename(sys.argv[0])) + sys.exit(-1) + + volumeName = sys.argv[1] + + lines = Utils.readFile(Globals.CIFS_VOLUME_FILE, lines=True) + for line in lines: + if not line.strip(): + continue + tokens = line.strip().split(":") + if tokens[0] == volumeName: + print "\n".join(tokens[1:]) + sys.exit(0) + # given volume is not configured for cifs export + sys.exit(0) + + +if __name__ == "__main__": + main() diff --git a/src/org.gluster.storage.management.gateway.scripts/src/gateway/gmg-reset-password.sh b/src/org.gluster.storage.management.gateway.scripts/src/gateway/gmg-reset-password.sh new file mode 100755 index 00000000..626300b0 --- /dev/null +++ b/src/org.gluster.storage.management.gateway.scripts/src/gateway/gmg-reset-password.sh @@ -0,0 +1,46 @@ +#!/bin/bash +#******************************************************************************* +# Copyright (c) 2006-2011 Gluster, Inc. <http://www.gluster.com> +# This file is part of Gluster Management Gateway. +# +# Gluster Management Gateway is free software; you can redistribute +# it and/or modify it under the terms of the GNU General Public +# License as published by the Free Software Foundation; either +# version 3 of the License, or (at your option) any later version. +# +# Gluster Management Gateway is distributed in the hope that it +# will be useful, but WITHOUT ANY WARRANTY; without even the +# implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR +# PURPOSE. See the GNU General Public License for more details. +# +# You should have received a copy of the GNU General Public License +# along with this program. If not, see +# <http://www.gnu.org/licenses/>. +#******************************************************************************* + +#----------------------------------------------------------------------------------- +# gmg-reset-password.sh - script to reset password of given user to default password +#----------------------------------------------------------------------------------- + +USAGE_ERR=1 + +if [ $# -ne 1 ]; then + echo "Usage: ${0} <username>" + echo + exit ${USAGE_ERR} +fi + +CURR_DIR=${PWD} +SCRIPT_PATH=`readlink -f ${0}` +GLUSTERMG_DIR=`dirname ${SCRIPT_PATH}` + +# Main action body +cd ${GLUSTERMG_DIR} +cd .. +for FILE in WEB-INF/lib/*.jar +do + export CLASSPATH=${CLASSPATH}:${PWD}/${FILE} +done +export CLASSPATH=${PWD}/WEB-INF/classes:${CLASSPATH} +cd ${CURR_DIR} +java org.gluster.storage.management.gateway.utils.PasswordManager reset ${1} diff --git a/src/org.gluster.storage.management.gateway.scripts/src/gateway/grun.py b/src/org.gluster.storage.management.gateway.scripts/src/gateway/grun.py new file mode 100755 index 00000000..d7c23ee8 --- /dev/null +++ b/src/org.gluster.storage.management.gateway.scripts/src/gateway/grun.py @@ -0,0 +1,35 @@ +#!/usr/bin/python +# Copyright (C) 2011 Gluster, Inc. <http://www.gluster.com> +# This file is part of Gluster Management Gateway (GlusterMG). +# +# GlusterMG is free software; you can redistribute it and/or modify +# it under the terms of the GNU General Public License as published +# by the Free Software Foundation; either version 3 of the License, +# or (at your option) any later version. +# +# GlusterMG is distributed in the hope that it will be useful, but +# WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU +# General Public License for more details. +# +# You should have received a copy of the GNU General Public License +# along with this program. If not, see +# <http://www.gnu.org/licenses/>. +# + +import os +import sys +p1 = os.path.abspath(os.path.dirname(sys.argv[0])) +p2 = "%s/common" % os.path.dirname(p1) +if not p1 in sys.path: + sys.path.append(p1) +if not p2 in sys.path: + sys.path.append(p2) +import Utils + + +if len(sys.argv) < 3: + sys.stderr.write("usage: %s SERVER_FILE COMMAND [ARGUMENTS]\n" % os.path.basename(sys.argv[0])) + sys.exit(-1) + +sys.exit(Utils.grun(sys.argv[1], sys.argv[2], sys.argv[3:])) diff --git a/src/com.gluster.storage.management.gateway.scripts/src/gateway/multicast-discover-servers.py b/src/org.gluster.storage.management.gateway.scripts/src/gateway/multicast-discover-servers.py index ded207c0..9bdb037d 100755 --- a/src/com.gluster.storage.management.gateway.scripts/src/gateway/multicast-discover-servers.py +++ b/src/org.gluster.storage.management.gateway.scripts/src/gateway/multicast-discover-servers.py @@ -1,6 +1,20 @@ #!/usr/bin/python # Copyright (C) 2011 Gluster, Inc. <http://www.gluster.com> -# This file is part of Gluster Management Gateway. +# This file is part of Gluster Management Gateway (GlusterMG). +# +# GlusterMG is free software; you can redistribute it and/or modify +# it under the terms of the GNU General Public License as published +# by the Free Software Foundation; either version 3 of the License, +# or (at your option) any later version. +# +# GlusterMG is distributed in the hope that it will be useful, but +# WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU +# General Public License for more details. +# +# You should have received a copy of the GNU General Public License +# along with this program. If not, see +# <http://www.gnu.org/licenses/>. # import os diff --git a/src/org.gluster.storage.management.gateway.scripts/src/gateway/remove_server_volume_cifs_config.py b/src/org.gluster.storage.management.gateway.scripts/src/gateway/remove_server_volume_cifs_config.py new file mode 100755 index 00000000..93c47af6 --- /dev/null +++ b/src/org.gluster.storage.management.gateway.scripts/src/gateway/remove_server_volume_cifs_config.py @@ -0,0 +1,82 @@ +#!/usr/bin/python +# Copyright (C) 2011 Gluster, Inc. <http://www.gluster.com> +# This file is part of Gluster Management Gateway (GlusterMG). +# +# GlusterMG is free software; you can redistribute it and/or modify +# it under the terms of the GNU General Public License as published +# by the Free Software Foundation; either version 3 of the License, +# or (at your option) any later version. +# +# GlusterMG is distributed in the hope that it will be useful, but +# WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU +# General Public License for more details. +# +# You should have received a copy of the GNU General Public License +# along with this program. If not, see +# <http://www.gnu.org/licenses/>. +# + +import os +import sys +p1 = os.path.abspath(os.path.dirname(sys.argv[0])) +p2 = "%s/common" % os.path.dirname(p1) +if not p1 in sys.path: + sys.path.append(p1) +if not p2 in sys.path: + sys.path.append(p2) +import Globals +import Utils + + +def main(): + if len(sys.argv) < 3: + sys.stderr.write("usage: %s SERVER_NAME VOLUME_FILE\n" % os.path.basename(sys.argv[0])) + sys.exit(-1) + + serverName = sys.argv[1] + volumeFile = sys.argv[2] + + lines = Utils.readFile(volumeFile, lines=True) + volumeNameList = [line.strip() for line in lines] + if not volumeNameList: + sys.exit(0) + + lines = Utils.readFile(Globals.CIFS_VOLUME_FILE, lines=True) + cifsVolumeList = [line.strip().split(":")[0] for line in lines if line.strip()] + runningCifsVolumeList = set(cifsVolumeList).intersection(set(volumeNameList)) + + if not runningCifsVolumeList: + sys.exit(0) + + tempFileName = Utils.getTempFileName() + try: + fp = open(tempFileName, "w") + fp.write("%s\n" % serverName) + fp.close() + except IOError, e: + Utils.log("Failed to write server name to file %s: %s" % (tempFileName, str(e))) + sys.stderr.write("Failed to write server name to file %s: %s\n" % (tempFileName, str(e))) + sys.exit(3) + + status = True + for volumeName in runningCifsVolumeList: + if Utils.grun(tempFileName, "stop_volume_cifs.py", [volumeName.strip()]) != 0: + status = False + if Utils.grun(tempFileName, "delete_volume_cifs.py", [volumeName.strip()]) != 0: + status = False + + try: + os.remove(tempFileName) + except OSError, e: + Utils.log("Failed to remove temporary file %s: %s" % (tempFileName, str(e))) + sys.stderr.write("Failed to remove temporary file %s: %s\n" % (tempFileName, str(e))) + pass + + if status: + sys.exit(0) + else: + sys.exit(2) + +if __name__ == "__main__": + main() diff --git a/src/org.gluster.storage.management.gateway.scripts/src/gateway/setup_cifs_config_all.py b/src/org.gluster.storage.management.gateway.scripts/src/gateway/setup_cifs_config_all.py new file mode 100755 index 00000000..99a4b2d3 --- /dev/null +++ b/src/org.gluster.storage.management.gateway.scripts/src/gateway/setup_cifs_config_all.py @@ -0,0 +1,43 @@ +#!/usr/bin/python +# Copyright (C) 2011 Gluster, Inc. <http://www.gluster.com> +# This file is part of Gluster Management Gateway (GlusterMG). +# +# GlusterMG is free software; you can redistribute it and/or modify +# it under the terms of the GNU General Public License as published +# by the Free Software Foundation; either version 3 of the License, +# or (at your option) any later version. +# +# GlusterMG is distributed in the hope that it will be useful, but +# WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU +# General Public License for more details. +# +# You should have received a copy of the GNU General Public License +# along with this program. If not, see +# <http://www.gnu.org/licenses/>. +# + +import os +import sys +p1 = os.path.abspath(os.path.dirname(sys.argv[0])) +p2 = "%s/common" % os.path.dirname(p1) +if not p1 in sys.path: + sys.path.append(p1) +if not p2 in sys.path: + sys.path.append(p2) +import Utils + + +def main(): + if len(sys.argv) < 2: + sys.stderr.write("usage: %s SERVER_FILE\n" % os.path.basename(sys.argv[0])) + sys.exit(-1) + + serverFile = sys.argv[1] + + rv = Utils.grun(serverFile, "setup_cifs_config.py") + sys.exit(rv) + + +if __name__ == "__main__": + main() diff --git a/src/com.gluster.storage.management.gateway.scripts/src/gateway/update_volume_cifs_all.py b/src/org.gluster.storage.management.gateway.scripts/src/gateway/update_volume_cifs_all.py index c5c9d1ef..07c1e90e 100755 --- a/src/com.gluster.storage.management.gateway.scripts/src/gateway/update_volume_cifs_all.py +++ b/src/org.gluster.storage.management.gateway.scripts/src/gateway/update_volume_cifs_all.py @@ -1,6 +1,20 @@ #!/usr/bin/python # Copyright (C) 2011 Gluster, Inc. <http://www.gluster.com> -# This file is part of Gluster Management Gateway. +# This file is part of Gluster Management Gateway (GlusterMG). +# +# GlusterMG is free software; you can redistribute it and/or modify +# it under the terms of the GNU General Public License as published +# by the Free Software Foundation; either version 3 of the License, +# or (at your option) any later version. +# +# GlusterMG is distributed in the hope that it will be useful, but +# WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU +# General Public License for more details. +# +# You should have received a copy of the GNU General Public License +# along with this program. If not, see +# <http://www.gnu.org/licenses/>. # import os @@ -16,21 +30,16 @@ import Utils def updateVolumeCifsConf(volumeName, userList): - try: - fp = open(Globals.CIFS_VOLUME_FILE) - content = fp.read() - fp.close() - except IOError, e: - Utils.log("failed to read file %s: %s" % (Globals.CIFS_VOLUME_FILE, str(e))) - return False - + lines = Utils.readFile(Globals.CIFS_VOLUME_FILE, lines=True) try: fp = open(Globals.CIFS_VOLUME_FILE, "w") - for line in content.split(): - if line.split(":")[0] == volumeName: + for line in lines: + if not line.strip(): + continue + if line.strip().split(":")[0] == volumeName: fp.write("%s:%s\n" % (volumeName, ":".join(userList))) else: - fp.write("%s\n" % line) + fp.write("%s\n" % line.strip()) fp.close() except IOError, e: Utils.log("failed to write file %s: %s" % (Globals.CIFS_VOLUME_FILE, str(e))) @@ -56,8 +65,7 @@ def main(): sys.stderr.write("User %s does not exists\n" % missingUserList) sys.exit(1) - - rv = Utils.runCommand(["grun.py", serverFile, "update_volume_cifs.py", volumeName] + userList) + rv = Utils.grun(serverFile, "update_volume_cifs.py", [volumeName] + userList) if rv == 0: if not updateVolumeCifsConf(volumeName, userList): sys.stderr.write("Failed to update volume %s and user-list %s in cifs volume configuration\n" % (volumeName, userList)) diff --git a/src/com.gluster.storage.management.gateway/.classpath b/src/org.gluster.storage.management.gateway/.classpath index 107e139d..894a6c4d 100644 --- a/src/com.gluster.storage.management.gateway/.classpath +++ b/src/org.gluster.storage.management.gateway/.classpath @@ -8,8 +8,7 @@ </classpathentry> <classpathentry kind="con" path="org.eclipse.jst.j2ee.internal.web.container"/> <classpathentry kind="con" path="org.eclipse.jst.j2ee.internal.module.container"/> - <classpathentry combineaccessrules="false" kind="src" path="/com.gluster.storage.management.core"/> + <classpathentry combineaccessrules="false" kind="src" path="/org.gluster.storage.management.core"/> <classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER/org.eclipse.jdt.internal.debug.ui.launcher.StandardVMType/JavaSE-1.6"/> - <classpathentry exported="true" kind="lib" path="/com.gluster.storage.management.client/lib/jersey-1.5/jersey-multipart-1.5.jar"/> <classpathentry kind="output" path="WebContent/WEB-INF/classes"/> </classpath> diff --git a/src/com.gluster.storage.management.gateway/.project b/src/org.gluster.storage.management.gateway/.project index 83fea45d..7a4356d5 100644 --- a/src/com.gluster.storage.management.gateway/.project +++ b/src/org.gluster.storage.management.gateway/.project @@ -1,8 +1,9 @@ <?xml version="1.0" encoding="UTF-8"?> <projectDescription> - <name>com.gluster.storage.management.gateway</name> + <name>org.gluster.storage.management.gateway</name> <comment></comment> <projects> + <project>org.gluster.storage.management.core</project> </projects> <buildSpec> <buildCommand> diff --git a/src/com.gluster.storage.management.gateway/.settings/.jsdtscope b/src/org.gluster.storage.management.gateway/.settings/.jsdtscope index 3a28de0c..3a28de0c 100644 --- a/src/com.gluster.storage.management.gateway/.settings/.jsdtscope +++ b/src/org.gluster.storage.management.gateway/.settings/.jsdtscope diff --git a/src/org.gluster.storage.management.gateway/.settings/org.eclipse.core.resources.prefs b/src/org.gluster.storage.management.gateway/.settings/org.eclipse.core.resources.prefs new file mode 100644 index 00000000..d159aeca --- /dev/null +++ b/src/org.gluster.storage.management.gateway/.settings/org.eclipse.core.resources.prefs @@ -0,0 +1,3 @@ +#Tue Sep 20 14:10:09 IST 2011 +eclipse.preferences.version=1 +encoding//src/rebel.xml=UTF-8 diff --git a/src/com.gluster.storage.management.gateway/.settings/org.eclipse.jdt.core.prefs b/src/org.gluster.storage.management.gateway/.settings/org.eclipse.jdt.core.prefs index 476db350..476db350 100644 --- a/src/com.gluster.storage.management.gateway/.settings/org.eclipse.jdt.core.prefs +++ b/src/org.gluster.storage.management.gateway/.settings/org.eclipse.jdt.core.prefs diff --git a/src/com.gluster.storage.management.gateway/.settings/org.eclipse.ltk.core.refactoring.prefs b/src/org.gluster.storage.management.gateway/.settings/org.eclipse.ltk.core.refactoring.prefs index 5d9c71b6..5d9c71b6 100644 --- a/src/com.gluster.storage.management.gateway/.settings/org.eclipse.ltk.core.refactoring.prefs +++ b/src/org.gluster.storage.management.gateway/.settings/org.eclipse.ltk.core.refactoring.prefs diff --git a/src/org.gluster.storage.management.gateway/.settings/org.eclipse.wst.common.component b/src/org.gluster.storage.management.gateway/.settings/org.eclipse.wst.common.component new file mode 100644 index 00000000..f3385657 --- /dev/null +++ b/src/org.gluster.storage.management.gateway/.settings/org.eclipse.wst.common.component @@ -0,0 +1,12 @@ +<?xml version="1.0" encoding="UTF-8"?> +<project-modules id="moduleCoreId" project-version="1.5.0"> + <wb-module deploy-name="org.gluster.storage.management.gateway"> + <wb-resource deploy-path="/" source-path="/WebContent"/> + <wb-resource deploy-path="/WEB-INF/classes" source-path="/src"/> + <dependent-module archiveName="org.gluster.storage.management.core.jar" deploy-path="/WEB-INF/lib" handle="module:/resource/org.gluster.storage.management.core/org.gluster.storage.management.core"> + <dependency-type>uses</dependency-type> + </dependent-module> + <property name="java-output-path" value="/org.gluster.storage.management.gateway/build/classes"/> + <property name="context-root" value="glustermg"/> + </wb-module> +</project-modules> diff --git a/src/com.gluster.storage.management.gateway/.settings/org.eclipse.wst.common.project.facet.core.xml b/src/org.gluster.storage.management.gateway/.settings/org.eclipse.wst.common.project.facet.core.xml index 8f960f27..8f960f27 100644 --- a/src/com.gluster.storage.management.gateway/.settings/org.eclipse.wst.common.project.facet.core.xml +++ b/src/org.gluster.storage.management.gateway/.settings/org.eclipse.wst.common.project.facet.core.xml diff --git a/src/com.gluster.storage.management.gateway/.settings/org.eclipse.wst.jsdt.ui.superType.container b/src/org.gluster.storage.management.gateway/.settings/org.eclipse.wst.jsdt.ui.superType.container index 3bd5d0a4..3bd5d0a4 100644 --- a/src/com.gluster.storage.management.gateway/.settings/org.eclipse.wst.jsdt.ui.superType.container +++ b/src/org.gluster.storage.management.gateway/.settings/org.eclipse.wst.jsdt.ui.superType.container diff --git a/src/com.gluster.storage.management.gateway/.settings/org.eclipse.wst.jsdt.ui.superType.name b/src/org.gluster.storage.management.gateway/.settings/org.eclipse.wst.jsdt.ui.superType.name index 05bd71b6..05bd71b6 100644 --- a/src/com.gluster.storage.management.gateway/.settings/org.eclipse.wst.jsdt.ui.superType.name +++ b/src/org.gluster.storage.management.gateway/.settings/org.eclipse.wst.jsdt.ui.superType.name diff --git a/src/com.gluster.storage.management.gateway/.settings/org.eclipse.wst.ws.service.policy.prefs b/src/org.gluster.storage.management.gateway/.settings/org.eclipse.wst.ws.service.policy.prefs index e5ca6272..e5ca6272 100644 --- a/src/com.gluster.storage.management.gateway/.settings/org.eclipse.wst.ws.service.policy.prefs +++ b/src/org.gluster.storage.management.gateway/.settings/org.eclipse.wst.ws.service.policy.prefs diff --git a/src/org.gluster.storage.management.gateway/WebContent/META-INF/MANIFEST.MF b/src/org.gluster.storage.management.gateway/WebContent/META-INF/MANIFEST.MF new file mode 100644 index 00000000..5e949512 --- /dev/null +++ b/src/org.gluster.storage.management.gateway/WebContent/META-INF/MANIFEST.MF @@ -0,0 +1,3 @@ +Manifest-Version: 1.0
+Class-Path:
+
diff --git a/src/org.gluster.storage.management.gateway/WebContent/WEB-INF/lib/Jersey-LICENSE.txt b/src/org.gluster.storage.management.gateway/WebContent/WEB-INF/lib/Jersey-LICENSE.txt new file mode 100644 index 00000000..d24fbfdb --- /dev/null +++ b/src/org.gluster.storage.management.gateway/WebContent/WEB-INF/lib/Jersey-LICENSE.txt @@ -0,0 +1,135 @@ +The GNU General Public License (GPL) Version 2, June 1991 + + +Copyright (C) 1989, 1991 Free Software Foundation, Inc. 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA + +Everyone is permitted to copy and distribute verbatim copies of this license document, but changing it is not allowed. + +Preamble + +The licenses for most software are designed to take away your freedom to share and change it. By contrast, the GNU General Public License is intended to guarantee your freedom to share and change free software--to make sure the software is free for all its users. This General Public License applies to most of the Free Software Foundation's software and to any other program whose authors commit to using it. (Some other Free Software Foundation software is covered by the GNU Library General Public License instead.) You can apply it to your programs, too. + +When we speak of free software, we are referring to freedom, not price. Our General Public Licenses are designed to make sure that you have the freedom to distribute copies of free software (and charge for this service if you wish), that you receive source code or can get it if you want it, that you can change the software or use pieces of it in new free programs; and that you know you can do these things. + +To protect your rights, we need to make restrictions that forbid anyone to deny you these rights or to ask you to surrender the rights. These restrictions translate to certain responsibilities for you if you distribute copies of the software, or if you modify it. + +For example, if you distribute copies of such a program, whether gratis or for a fee, you must give the recipients all the rights that you have. You must make sure that they, too, receive or can get the source code. And you must show them these terms so they know their rights. + +We protect your rights with two steps: (1) copyright the software, and (2) offer you this license which gives you legal permission to copy, distribute and/or modify the software. + +Also, for each author's protection and ours, we want to make certain that everyone understands that there is no warranty for this free software. If the software is modified by someone else and passed on, we want its recipients to know that what they have is not the original, so that any problems introduced by others will not reflect on the original authors' reputations. + +Finally, any free program is threatened constantly by software patents. We wish to avoid the danger that redistributors of a free program will individually obtain patent licenses, in effect making the program proprietary. To prevent this, we have made it clear that any patent must be licensed for everyone's free use or not licensed at all. + +The precise terms and conditions for copying, distribution and modification follow. + + +TERMS AND CONDITIONS FOR COPYING, DISTRIBUTION AND MODIFICATION + +0. This License applies to any program or other work which contains a notice placed by the copyright holder saying it may be distributed under the terms of this General Public License. The "Program", below, refers to any such program or work, and a "work based on the Program" means either the Program or any derivative work under copyright law: that is to say, a work containing the Program or a portion of it, either verbatim or with modifications and/or translated into another language. (Hereinafter, translation is included without limitation in the term "modification".) Each licensee is addressed as "you". + +Activities other than copying, distribution and modification are not covered by this License; they are outside its scope. The act of running the Program is not restricted, and the output from the Program is covered only if its contents constitute a work based on the Program (independent of having been made by running the Program). Whether that is true depends on what the Program does. + +1. You may copy and distribute verbatim copies of the Program's source code as you receive it, in any medium, provided that you conspicuously and appropriately publish on each copy an appropriate copyright notice and disclaimer of warranty; keep intact all the notices that refer to this License and to the absence of any warranty; and give any other recipients of the Program a copy of this License along with the Program. + +You may charge a fee for the physical act of transferring a copy, and you may at your option offer warranty protection in exchange for a fee. + +2. You may modify your copy or copies of the Program or any portion of it, thus forming a work based on the Program, and copy and distribute such modifications or work under the terms of Section 1 above, provided that you also meet all of these conditions: + + a) You must cause the modified files to carry prominent notices stating that you changed the files and the date of any change. + + b) You must cause any work that you distribute or publish, that in whole or in part contains or is derived from the Program or any part thereof, to be licensed as a whole at no charge to all third parties under the terms of this License. + + c) If the modified program normally reads commands interactively when run, you must cause it, when started running for such interactive use in the most ordinary way, to print or display an announcement including an appropriate copyright notice and a notice that there is no warranty (or else, saying that you provide a warranty) and that users may redistribute the program under these conditions, and telling the user how to view a copy of this License. (Exception: if the Program itself is interactive but does not normally print such an announcement, your work based on the Program is not required to print an announcement.) + +These requirements apply to the modified work as a whole. If identifiable sections of that work are not derived from the Program, and can be reasonably considered independent and separate works in themselves, then this License, and its terms, do not apply to those sections when you distribute them as separate works. But when you distribute the same sections as part of a whole which is a work based on the Program, the distribution of the whole must be on the terms of this License, whose permissions for other licensees extend to the entire whole, and thus to each and every part regardless of who wrote it. + +Thus, it is not the intent of this section to claim rights or contest your rights to work written entirely by you; rather, the intent is to exercise the right to control the distribution of derivative or collective works based on the Program. + +In addition, mere aggregation of another work not based on the Program with the Program (or with a work based on the Program) on a volume of a storage or distribution medium does not bring the other work under the scope of this License. + +3. You may copy and distribute the Program (or a work based on it, under Section 2) in object code or executable form under the terms of Sections 1 and 2 above provided that you also do one of the following: + + a) Accompany it with the complete corresponding machine-readable source code, which must be distributed under the terms of Sections 1 and 2 above on a medium customarily used for software interchange; or, + + b) Accompany it with a written offer, valid for at least three years, to give any third party, for a charge no more than your cost of physically performing source distribution, a complete machine-readable copy of the corresponding source code, to be distributed under the terms of Sections 1 and 2 above on a medium customarily used for software interchange; or, + + c) Accompany it with the information you received as to the offer to distribute corresponding source code. (This alternative is allowed only for noncommercial distribution and only if you received the program in object code or executable form with such an offer, in accord with Subsection b above.) + +The source code for a work means the preferred form of the work for making modifications to it. For an executable work, complete source code means all the source code for all modules it contains, plus any associated interface definition files, plus the scripts used to control compilation and installation of the executable. However, as a special exception, the source code distributed need not include anything that is normally distributed (in either source or binary form) with the major components (compiler, kernel, and so on) of the operating system on which the executable runs, unless that component itself accompanies the executable. + +If distribution of executable or object code is made by offering access to copy from a designated place, then offering equivalent access to copy the source code from the same place counts as distribution of the source code, even though third parties are not compelled to copy the source along with the object code. + +4. You may not copy, modify, sublicense, or distribute the Program except as expressly provided under this License. Any attempt otherwise to copy, modify, sublicense or distribute the Program is void, and will automatically terminate your rights under this License. However, parties who have received copies, or rights, from you under this License will not have their licenses terminated so long as such parties remain in full compliance. + +5. You are not required to accept this License, since you have not signed it. However, nothing else grants you permission to modify or distribute the Program or its derivative works. These actions are prohibited by law if you do not accept this License. Therefore, by modifying or distributing the Program (or any work based on the Program), you indicate your acceptance of this License to do so, and all its terms and conditions for copying, distributing or modifying the Program or works based on it. + +6. Each time you redistribute the Program (or any work based on the Program), the recipient automatically receives a license from the original licensor to copy, distribute or modify the Program subject to these terms and conditions. You may not impose any further restrictions on the recipients' exercise of the rights granted herein. You are not responsible for enforcing compliance by third parties to this License. + +7. If, as a consequence of a court judgment or allegation of patent infringement or for any other reason (not limited to patent issues), conditions are imposed on you (whether by court order, agreement or otherwise) that contradict the conditions of this License, they do not excuse you from the conditions of this License. If you cannot distribute so as to satisfy simultaneously your obligations under this License and any other pertinent obligations, then as a consequence you may not distribute the Program at all. For example, if a patent license would not permit royalty-free redistribution of the Program by all those who receive copies directly or indirectly through you, then the only way you could satisfy both it and this License would be to refrain entirely from distribution of the Program. + +If any portion of this section is held invalid or unenforceable under any particular circumstance, the balance of the section is intended to apply and the section as a whole is intended to apply in other circumstances. + +It is not the purpose of this section to induce you to infringe any patents or other property right claims or to contest validity of any such claims; this section has the sole purpose of protecting the integrity of the free software distribution system, which is implemented by public license practices. Many people have made generous contributions to the wide range of software distributed through that system in reliance on consistent application of that system; it is up to the author/donor to decide if he or she is willing to distribute software through any other system and a licensee cannot impose that choice. + +This section is intended to make thoroughly clear what is believed to be a consequence of the rest of this License. + +8. If the distribution and/or use of the Program is restricted in certain countries either by patents or by copyrighted interfaces, the original copyright holder who places the Program under this License may add an explicit geographical distribution limitation excluding those countries, so that distribution is permitted only in or among countries not thus excluded. In such case, this License incorporates the limitation as if written in the body of this License. + +9. The Free Software Foundation may publish revised and/or new versions of the General Public License from time to time. Such new versions will be similar in spirit to the present version, but may differ in detail to address new problems or concerns. + +Each version is given a distinguishing version number. If the Program specifies a version number of this License which applies to it and "any later version", you have the option of following the terms and conditions either of that version or of any later version published by the Free Software Foundation. If the Program does not specify a version number of this License, you may choose any version ever published by the Free Software Foundation. + +10. If you wish to incorporate parts of the Program into other free programs whose distribution conditions are different, write to the author to ask for permission. For software which is copyrighted by the Free Software Foundation, write to the Free Software Foundation; we sometimes make exceptions for this. Our decision will be guided by the two goals of preserving the free status of all derivatives of our free software and of promoting the sharing and reuse of software generally. + +NO WARRANTY + +11. BECAUSE THE PROGRAM IS LICENSED FREE OF CHARGE, THERE IS NO WARRANTY FOR THE PROGRAM, TO THE EXTENT PERMITTED BY APPLICABLE LAW. EXCEPT WHEN OTHERWISE STATED IN WRITING THE COPYRIGHT HOLDERS AND/OR OTHER PARTIES PROVIDE THE PROGRAM "AS IS" WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. THE ENTIRE RISK AS TO THE QUALITY AND PERFORMANCE OF THE PROGRAM IS WITH YOU. SHOULD THE PROGRAM PROVE DEFECTIVE, YOU ASSUME THE COST OF ALL NECESSARY SERVICING, REPAIR OR CORRECTION. + +12. IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN WRITING WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MAY MODIFY AND/OR REDISTRIBUTE THE PROGRAM AS PERMITTED ABOVE, BE LIABLE TO YOU FOR DAMAGES, INCLUDING ANY GENERAL, SPECIAL, INCIDENTAL OR CONSEQUENTIAL DAMAGES ARISING OUT OF THE USE OR INABILITY TO USE THE PROGRAM (INCLUDING BUT NOT LIMITED TO LOSS OF DATA OR DATA BEING RENDERED INACCURATE OR LOSSES SUSTAINED BY YOU OR THIRD PARTIES OR A FAILURE OF THE PROGRAM TO OPERATE WITH ANY OTHER PROGRAMS), EVEN IF SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE POSSIBILITY OF SUCH DAMAGES. + +END OF TERMS AND CONDITIONS + + +How to Apply These Terms to Your New Programs + +If you develop a new program, and you want it to be of the greatest possible use to the public, the best way to achieve this is to make it free software which everyone can redistribute and change under these terms. + +To do so, attach the following notices to the program. It is safest to attach them to the start of each source file to most effectively convey the exclusion of warranty; and each file should have at least the "copyright" line and a pointer to where the full notice is found. + + One line to give the program's name and a brief idea of what it does. + + Copyright (C) + + This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 2 of the License, or (at your option) any later version. + + This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. + + You should have received a copy of the GNU General Public License along with this program; if not, write to the Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA + +Also add information on how to contact you by electronic and paper mail. + +If the program is interactive, make it output a short notice like this when it starts in an interactive mode: + + Gnomovision version 69, Copyright (C) year name of author + Gnomovision comes with ABSOLUTELY NO WARRANTY; for details type `show w'. This is free software, and you are welcome to redistribute it under certain conditions; type `show c' for details. + +The hypothetical commands `show w' and `show c' should show the appropriate parts of the General Public License. Of course, the commands you use may be called something other than `show w' and `show c'; they could even be mouse-clicks or menu items--whatever suits your program. + +You should also get your employer (if you work as a programmer) or your school, if any, to sign a "copyright disclaimer" for the program, if necessary. Here is a sample; alter the names: + + Yoyodyne, Inc., hereby disclaims all copyright interest in the program `Gnomovision' (which makes passes at compilers) written by James Hacker. + + signature of Ty Coon, 1 April 1989 + Ty Coon, President of Vice + +This General Public License does not permit incorporating your program into proprietary programs. If your program is a subroutine library, you may consider it more useful to permit linking proprietary applications with the library. If this is what you want to do, use the GNU Library General Public License instead of this License. + + +"CLASSPATH" EXCEPTION TO THE GPL VERSION 2 + +Certain source files distributed by Oracle are subject to the following clarification and special exception to the GPL Version 2, but only where Oracle has expressly included in the particular source file's header the words "Oracle designates this particular file as subject to the "Classpath" exception as provided by Oracle in the License file that accompanied this code." + +Linking this library statically or dynamically with other modules is making a combined work based on this library. Thus, the terms and conditions of the GNU General Public License Version 2 cover the whole combination. + +As a special exception, the copyright holders of this library give you permission to link this library with independent modules to produce an executable, regardless of the license terms of these independent modules, and to copy and distribute the resulting executable under terms of your choice, provided that you also meet, for each linked independent module, the terms and conditions of the license of that module. An independent module is a module which is not derived from or based on this library. If you modify this library, you may extend this exception to your version of the library, but you are not obligated to do so. If you do not wish to do so, delete this exception statement from your version. diff --git a/src/org.gluster.storage.management.gateway/WebContent/WEB-INF/lib/Jersey-third-party-license-readme.txt b/src/org.gluster.storage.management.gateway/WebContent/WEB-INF/lib/Jersey-third-party-license-readme.txt new file mode 100644 index 00000000..b3acf520 --- /dev/null +++ b/src/org.gluster.storage.management.gateway/WebContent/WEB-INF/lib/Jersey-third-party-license-readme.txt @@ -0,0 +1,188 @@ + +DO NOT TRANSLATE OR LOCALIZE. + +%% The following software may be included in this product: ASM + Use of any of this software is governed by the terms of the license below: + +Copyright (c) 2000-2005 INRIA, France Telecom +All rights reserved. + +Redistribution and use in source and binary forms, with or without +modification, are permitted provided that the following conditions +are met: + +1. Redistributions of source code must retain the above copyright + notice, this list of conditions and the following disclaimer. + +2. Redistributions in binary form must reproduce the above copyright + notice, this list of conditions and the following disclaimer in the + documentation and/or other materials provided with the distribution. + +3. Neither the name of the copyright holders nor the names of its + contributors may be used to endorse or promote products derived from + this software without specific prior written permission. + +THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" +AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE +IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE +ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE +LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR +CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF +SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS +INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN +CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) +ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF +THE POSSIBILITY OF SUCH DAMAGE. + + +%% The following software may be included in this product: Jettison + Use of any of this software is governed by the terms of the license below: + + +Copyright 2006 Envoi Solutions LLC + +Licensed 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. + +-------------------------------------------------------------------------- + +Apache License +Version 2.0, January 2004 +http://www.apache.org/licenses/ + +TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION + +1. Definitions. + +"License" shall mean the terms and conditions for use, reproduction, and distribution as defined by Sections 1 through 9 of this document. + +"Licensor" shall mean the copyright owner or entity authorized by the copyright owner that is granting the License. + +"Legal Entity" shall mean the union of the acting entity and all other entities that control, are controlled by, or are under common control with that entity. For the purposes of this definition, "control" means (i) the power, direct or indirect, to cause the direction or management of such entity, whether by contract or otherwise, or (ii) ownership of fifty percent (50%) or more of the outstanding shares, or (iii) beneficial ownership of such entity. + +"You" (or "Your") shall mean an individual or Legal Entity exercising permissions granted by this License. + +"Source" form shall mean the preferred form for making modifications, including but not limited to software source code, documentation source, and configuration files. + +"Object" form shall mean any form resulting from mechanical transformation or translation of a Source form, including but not limited to compiled object code, generated documentation, and conversions to other media types. + +"Work" shall mean the work of authorship, whether in Source or Object form, made available under the License, as indicated by a copyright notice that is included in or attached to the work (an example is provided in the Appendix below). + +"Derivative Works" shall mean any work, whether in Source or Object form, that is based on (or derived from) the Work and for which the editorial revisions, annotations, elaborations, or other modifications represent, as a whole, an original work of authorship. For the purposes of this License, Derivative Works shall not include works that remain separable from, or merely link (or bind by name) to the interfaces of, the Work and Derivative Works thereof. + +"Contribution" shall mean any work of authorship, including the original version of the Work and any modifications or additions to that Work or Derivative Works thereof, that is intentionally submitted to Licensor for inclusion in the Work by the copyright owner or by an individual or Legal Entity authorized to submit on behalf of the copyright owner. For the purposes of this definition, "submitted" means any form of electronic, verbal, or written communication sent to the Licensor or its representatives, including but not limited to communication on electronic mailing lists, source code control systems, and issue tracking systems that are managed by, or on behalf of, the Licensor for the purpose of discussing and improving the Work, but excluding communication that is conspicuously marked or otherwise designated in writing by the copyright owner as "Not a Contribution." + +"Contributor" shall mean Licensor and any individual or Legal Entity on behalf of whom a Contribution has been received by Licensor and subsequently incorporated within the Work. + +2. Grant of Copyright License. Subject to the terms and conditions of this License, each Contributor hereby grants to You a perpetual, worldwide, non-exclusive, no-charge, royalty-free, irrevocable copyright license to reproduce, prepare Derivative Works of, publicly display, publicly perform, sublicense, and distribute the Work and such Derivative Works in Source or Object form. + +3. Grant of Patent License. Subject to the terms and conditions of this License, each Contributor hereby grants to You a perpetual, worldwide, non-exclusive, no-charge, royalty-free, irrevocable (except as stated in this section) patent license to make, have made, use, offer to sell, sell, import, and otherwise transfer the Work, where such license applies only to those patent claims licensable by such Contributor that are necessarily infringed by their Contribution(s) alone or by combination of their Contribution(s) with the Work to which such Contribution(s) was submitted. If You institute patent litigation against any entity (including a cross-claim or counterclaim in a lawsuit) alleging that the Work or a Contribution incorporated within the Work constitutes direct or contributory patent infringement, then any patent licenses granted to You under this License for that Work shall terminate as of the date such litigation is filed. + +4. Redistribution. You may reproduce and distribute copies of the Work or Derivative Works thereof in any medium, with or without modifications, and in Source or Object form, provided that You meet the following conditions: + + 1. You must give any other recipients of the Work or Derivative Works a copy of this License; and + + 2. You must cause any modified files to carry prominent notices stating that You changed the files; and + + 3. You must retain, in the Source form of any Derivative Works that You distribute, all copyright, patent, trademark, and attribution notices from the Source form of the Work, excluding those notices that do not pertain to any part of the Derivative Works; and + + 4. If the Work includes a "NOTICE" text file as part of its distribution, then any Derivative Works that You distribute must include a readable copy of the attribution notices contained within such NOTICE file, excluding those notices that do not pertain to any part of the Derivative Works, in at least one of the following places: within a NOTICE text file distributed as part of the Derivative Works; within the Source form or documentation, if provided along with the Derivative Works; or, within a display generated by the Derivative Works, if and wherever such third-party notices normally appear. The contents of the NOTICE file are for informational purposes only and do not modify the License. You may add Your own attribution notices within Derivative Works that You distribute, alongside or as an addendum to the NOTICE text from the Work, provided that such additional attribution notices cannot be construed as modifying the License. + +You may add Your own copyright statement to Your modifications and may provide additional or different license terms and conditions for use, reproduction, or distribution of Your modifications, or for any such Derivative Works as a whole, provided Your use, reproduction, and distribution of the Work otherwise complies with the conditions stated in this License. + +5. Submission of Contributions. Unless You explicitly state otherwise, any Contribution intentionally submitted for inclusion in the Work by You to the Licensor shall be under the terms and conditions of this License, without any additional terms or conditions. Notwithstanding the above, nothing herein shall supersede or modify the terms of any separate license agreement you may have executed with Licensor regarding such Contributions. + +6. Trademarks. This License does not grant permission to use the trade names, trademarks, service marks, or product names of the Licensor, except as required for reasonable and customary use in describing the origin of the Work and reproducing the content of the NOTICE file. + +7. Disclaimer of Warranty. Unless required by applicable law or agreed to in writing, Licensor provides the Work (and each Contributor provides its Contributions) on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied, including, without limitation, any warranties or conditions of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A PARTICULAR PURPOSE. You are solely responsible for determining the appropriateness of using or redistributing the Work and assume any risks associated with Your exercise of permissions under this License. + +8. Limitation of Liability. In no event and under no legal theory, whether in tort (including negligence), contract, or otherwise, unless required by applicable law (such as deliberate and grossly negligent acts) or agreed to in writing, shall any Contributor be liable to You for damages, including any direct, indirect, special, incidental, or consequential damages of any character arising as a result of this License or out of the use or inability to use the Work (including but not limited to damages for loss of goodwill, work stoppage, computer failure or malfunction, or any and all other commercial damages or losses), even if such Contributor has been advised of the possibility of such damages. + +9. Accepting Warranty or Additional Liability. While redistributing the Work or Derivative Works thereof, You may choose to offer, and charge a fee for, acceptance of support, warranty, indemnity, or other liability obligations and/or rights consistent with this License. However, in accepting such obligations, You may act only on Your own behalf and on Your sole responsibility, not on behalf of any other Contributor, and only if You agree to indemnify, defend, and hold each Contributor harmless for any liability incurred by, or claims asserted against, such Contributor by reason of your accepting any such warranty or additional liability. + +END OF TERMS AND CONDITIONS +APPENDIX: How to apply the Apache License to your work + +To apply the Apache License to your work, attach the following boilerplate notice, with the fields enclosed by brackets "[]" replaced with your own identifying information. (Don't include the brackets!) The text should be enclosed in the appropriate comment syntax for the file format. We also recommend that a file or class name and description of purpose be included on the same "printed page" as the copyright notice for easier identification within third-party archives. +Copyright [yyyy] [name of copyright owner] Licensed 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 following software may be included in this product: Jackson + Use of any of this software is governed by the terms of the license below: + + +Jackson is dual-licensed under two alternative popular Open Source licenses: Apache (AL 2.0) and Gnu Lesser GPL (LGPL 2.1). You choose one or the other, as necessary (if you want to redistribute the code ¿ for use, you do not need license), and abide by the license rules as defined by the respective license agreement (and only that one). + +-------------------------------------------------------------------------- + +Apache License +Version 2.0, January 2004 +http://www.apache.org/licenses/ + +TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION + +1. Definitions. + +"License" shall mean the terms and conditions for use, reproduction, and distribution as defined by Sections 1 through 9 of this document. + +"Licensor" shall mean the copyright owner or entity authorized by the copyright owner that is granting the License. + +"Legal Entity" shall mean the union of the acting entity and all other entities that control, are controlled by, or are under common control with that entity. For the purposes of this definition, "control" means (i) the power, direct or indirect, to cause the direction or management of such entity, whether by contract or otherwise, or (ii) ownership of fifty percent (50%) or more of the outstanding shares, or (iii) beneficial ownership of such entity. + +"You" (or "Your") shall mean an individual or Legal Entity exercising permissions granted by this License. + +"Source" form shall mean the preferred form for making modifications, including but not limited to software source code, documentation source, and configuration files. + +"Object" form shall mean any form resulting from mechanical transformation or translation of a Source form, including but not limited to compiled object code, generated documentation, and conversions to other media types. + +"Work" shall mean the work of authorship, whether in Source or Object form, made available under the License, as indicated by a copyright notice that is included in or attached to the work (an example is provided in the Appendix below). + +"Derivative Works" shall mean any work, whether in Source or Object form, that is based on (or derived from) the Work and for which the editorial revisions, annotations, elaborations, or other modifications represent, as a whole, an original work of authorship. For the purposes of this License, Derivative Works shall not include works that remain separable from, or merely link (or bind by name) to the interfaces of, the Work and Derivative Works thereof. + +"Contribution" shall mean any work of authorship, including the original version of the Work and any modifications or additions to that Work or Derivative Works thereof, that is intentionally submitted to Licensor for inclusion in the Work by the copyright owner or by an individual or Legal Entity authorized to submit on behalf of the copyright owner. For the purposes of this definition, "submitted" means any form of electronic, verbal, or written communication sent to the Licensor or its representatives, including but not limited to communication on electronic mailing lists, source code control systems, and issue tracking systems that are managed by, or on behalf of, the Licensor for the purpose of discussing and improving the Work, but excluding communication that is conspicuously marked or otherwise designated in writing by the copyright owner as "Not a Contribution." + +"Contributor" shall mean Licensor and any individual or Legal Entity on behalf of whom a Contribution has been received by Licensor and subsequently incorporated within the Work. + +2. Grant of Copyright License. Subject to the terms and conditions of this License, each Contributor hereby grants to You a perpetual, worldwide, non-exclusive, no-charge, royalty-free, irrevocable copyright license to reproduce, prepare Derivative Works of, publicly display, publicly perform, sublicense, and distribute the Work and such Derivative Works in Source or Object form. + +3. Grant of Patent License. Subject to the terms and conditions of this License, each Contributor hereby grants to You a perpetual, worldwide, non-exclusive, no-charge, royalty-free, irrevocable (except as stated in this section) patent license to make, have made, use, offer to sell, sell, import, and otherwise transfer the Work, where such license applies only to those patent claims licensable by such Contributor that are necessarily infringed by their Contribution(s) alone or by combination of their Contribution(s) with the Work to which such Contribution(s) was submitted. If You institute patent litigation against any entity (including a cross-claim or counterclaim in a lawsuit) alleging that the Work or a Contribution incorporated within the Work constitutes direct or contributory patent infringement, then any patent licenses granted to You under this License for that Work shall terminate as of the date such litigation is filed. + +4. Redistribution. You may reproduce and distribute copies of the Work or Derivative Works thereof in any medium, with or without modifications, and in Source or Object form, provided that You meet the following conditions: + + 1. You must give any other recipients of the Work or Derivative Works a copy of this License; and + + 2. You must cause any modified files to carry prominent notices stating that You changed the files; and + + 3. You must retain, in the Source form of any Derivative Works that You distribute, all copyright, patent, trademark, and attribution notices from the Source form of the Work, excluding those notices that do not pertain to any part of the Derivative Works; and + + 4. If the Work includes a "NOTICE" text file as part of its distribution, then any Derivative Works that You distribute must include a readable copy of the attribution notices contained within such NOTICE file, excluding those notices that do not pertain to any part of the Derivative Works, in at least one of the following places: within a NOTICE text file distributed as part of the Derivative Works; within the Source form or documentation, if provided along with the Derivative Works; or, within a display generated by the Derivative Works, if and wherever such third-party notices normally appear. The contents of the NOTICE file are for informational purposes only and do not modify the License. You may add Your own attribution notices within Derivative Works that You distribute, alongside or as an addendum to the NOTICE text from the Work, provided that such additional attribution notices cannot be construed as modifying the License. + +You may add Your own copyright statement to Your modifications and may provide additional or different license terms and conditions for use, reproduction, or distribution of Your modifications, or for any such Derivative Works as a whole, provided Your use, reproduction, and distribution of the Work otherwise complies with the conditions stated in this License. + +5. Submission of Contributions. Unless You explicitly state otherwise, any Contribution intentionally submitted for inclusion in the Work by You to the Licensor shall be under the terms and conditions of this License, without any additional terms or conditions. Notwithstanding the above, nothing herein shall supersede or modify the terms of any separate license agreement you may have executed with Licensor regarding such Contributions. + +6. Trademarks. This License does not grant permission to use the trade names, trademarks, service marks, or product names of the Licensor, except as required for reasonable and customary use in describing the origin of the Work and reproducing the content of the NOTICE file. + +7. Disclaimer of Warranty. Unless required by applicable law or agreed to in writing, Licensor provides the Work (and each Contributor provides its Contributions) on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied, including, without limitation, any warranties or conditions of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A PARTICULAR PURPOSE. You are solely responsible for determining the appropriateness of using or redistributing the Work and assume any risks associated with Your exercise of permissions under this License. + +8. Limitation of Liability. In no event and under no legal theory, whether in tort (including negligence), contract, or otherwise, unless required by applicable law (such as deliberate and grossly negligent acts) or agreed to in writing, shall any Contributor be liable to You for damages, including any direct, indirect, special, incidental, or consequential damages of any character arising as a result of this License or out of the use or inability to use the Work (including but not limited to damages for loss of goodwill, work stoppage, computer failure or malfunction, or any and all other commercial damages or losses), even if such Contributor has been advised of the possibility of such damages. + +9. Accepting Warranty or Additional Liability. While redistributing the Work or Derivative Works thereof, You may choose to offer, and charge a fee for, acceptance of support, warranty, indemnity, or other liability obligations and/or rights consistent with this License. However, in accepting such obligations, You may act only on Your own behalf and on Your sole responsibility, not on behalf of any other Contributor, and only if You agree to indemnify, defend, and hold each Contributor harmless for any liability incurred by, or claims asserted against, such Contributor by reason of your accepting any such warranty or additional liability. + +END OF TERMS AND CONDITIONS +APPENDIX: How to apply the Apache License to your work + +To apply the Apache License to your work, attach the following boilerplate notice, with the fields enclosed by brackets "[]" replaced with your own identifying information. (Don't include the brackets!) The text should be enclosed in the appropriate comment syntax for the file format. We also recommend that a file or class name and description of purpose be included on the same "printed page" as the copyright notice for easier identification within third-party archives. +Copyright [yyyy] [name of copyright owner] Licensed 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/src/com.gluster.storage.management.gateway/WebContent/WEB-INF/lib/antlr-2.7.6.jar b/src/org.gluster.storage.management.gateway/WebContent/WEB-INF/lib/antlr-2.7.6.jar Binary files differindex 3702b645..3702b645 100644 --- a/src/com.gluster.storage.management.gateway/WebContent/WEB-INF/lib/antlr-2.7.6.jar +++ b/src/org.gluster.storage.management.gateway/WebContent/WEB-INF/lib/antlr-2.7.6.jar diff --git a/src/com.gluster.storage.management.gateway/WebContent/WEB-INF/lib/aopalliance-1.0.jar b/src/org.gluster.storage.management.gateway/WebContent/WEB-INF/lib/aopalliance-1.0.jar Binary files differindex 578b1a0c..578b1a0c 100644 --- a/src/com.gluster.storage.management.gateway/WebContent/WEB-INF/lib/aopalliance-1.0.jar +++ b/src/org.gluster.storage.management.gateway/WebContent/WEB-INF/lib/aopalliance-1.0.jar diff --git a/src/com.gluster.storage.management.gateway/WebContent/WEB-INF/lib/asm-3.1.jar b/src/org.gluster.storage.management.gateway/WebContent/WEB-INF/lib/asm-3.1.jar Binary files differindex 8217cae0..8217cae0 100644 --- a/src/com.gluster.storage.management.gateway/WebContent/WEB-INF/lib/asm-3.1.jar +++ b/src/org.gluster.storage.management.gateway/WebContent/WEB-INF/lib/asm-3.1.jar diff --git a/src/com.gluster.storage.management.gateway/WebContent/WEB-INF/lib/commons-collections-3.1.jar b/src/org.gluster.storage.management.gateway/WebContent/WEB-INF/lib/commons-collections-3.1.jar Binary files differindex 41e230fe..41e230fe 100644 --- a/src/com.gluster.storage.management.gateway/WebContent/WEB-INF/lib/commons-collections-3.1.jar +++ b/src/org.gluster.storage.management.gateway/WebContent/WEB-INF/lib/commons-collections-3.1.jar diff --git a/src/com.gluster.storage.management.gateway/WebContent/WEB-INF/lib/commons-logging-1.1.1.jar b/src/org.gluster.storage.management.gateway/WebContent/WEB-INF/lib/commons-logging-1.1.1.jar Binary files differindex 8758a96b..8758a96b 100644 --- a/src/com.gluster.storage.management.gateway/WebContent/WEB-INF/lib/commons-logging-1.1.1.jar +++ b/src/org.gluster.storage.management.gateway/WebContent/WEB-INF/lib/commons-logging-1.1.1.jar diff --git a/src/com.gluster.storage.management.gateway/WebContent/WEB-INF/lib/derby.jar b/src/org.gluster.storage.management.gateway/WebContent/WEB-INF/lib/derby.jar Binary files differindex dc8ae8df..dc8ae8df 100644 --- a/src/com.gluster.storage.management.gateway/WebContent/WEB-INF/lib/derby.jar +++ b/src/org.gluster.storage.management.gateway/WebContent/WEB-INF/lib/derby.jar diff --git a/src/com.gluster.storage.management.gateway/WebContent/WEB-INF/lib/derbytools.jar b/src/org.gluster.storage.management.gateway/WebContent/WEB-INF/lib/derbytools.jar Binary files differindex ca367aae..ca367aae 100644 --- a/src/com.gluster.storage.management.gateway/WebContent/WEB-INF/lib/derbytools.jar +++ b/src/org.gluster.storage.management.gateway/WebContent/WEB-INF/lib/derbytools.jar diff --git a/src/com.gluster.storage.management.gateway/WebContent/WEB-INF/lib/dom4j-1.6.1.jar b/src/org.gluster.storage.management.gateway/WebContent/WEB-INF/lib/dom4j-1.6.1.jar Binary files differindex c8c4dbb9..c8c4dbb9 100644 --- a/src/com.gluster.storage.management.gateway/WebContent/WEB-INF/lib/dom4j-1.6.1.jar +++ b/src/org.gluster.storage.management.gateway/WebContent/WEB-INF/lib/dom4j-1.6.1.jar diff --git a/src/com.gluster.storage.management.gateway/WebContent/WEB-INF/lib/ganymed-ssh2-build250-LICENSE.txt b/src/org.gluster.storage.management.gateway/WebContent/WEB-INF/lib/ganymed-ssh2-build250-LICENSE.txt index 3eddd42f..3eddd42f 100644 --- a/src/com.gluster.storage.management.gateway/WebContent/WEB-INF/lib/ganymed-ssh2-build250-LICENSE.txt +++ b/src/org.gluster.storage.management.gateway/WebContent/WEB-INF/lib/ganymed-ssh2-build250-LICENSE.txt diff --git a/src/com.gluster.storage.management.gateway/WebContent/WEB-INF/lib/ganymed-ssh2-build250.jar b/src/org.gluster.storage.management.gateway/WebContent/WEB-INF/lib/ganymed-ssh2-build250.jar Binary files differindex c0a9ac7b..c0a9ac7b 100644 --- a/src/com.gluster.storage.management.gateway/WebContent/WEB-INF/lib/ganymed-ssh2-build250.jar +++ b/src/org.gluster.storage.management.gateway/WebContent/WEB-INF/lib/ganymed-ssh2-build250.jar diff --git a/src/com.gluster.storage.management.gateway/WebContent/WEB-INF/lib/hibernate-jpa-2.0-api-1.0.0.Final.jar b/src/org.gluster.storage.management.gateway/WebContent/WEB-INF/lib/hibernate-jpa-2.0-api-1.0.0.Final.jar Binary files differindex 4c9ac4e9..4c9ac4e9 100644 --- a/src/com.gluster.storage.management.gateway/WebContent/WEB-INF/lib/hibernate-jpa-2.0-api-1.0.0.Final.jar +++ b/src/org.gluster.storage.management.gateway/WebContent/WEB-INF/lib/hibernate-jpa-2.0-api-1.0.0.Final.jar diff --git a/src/com.gluster.storage.management.gateway/WebContent/WEB-INF/lib/hibernate3.jar b/src/org.gluster.storage.management.gateway/WebContent/WEB-INF/lib/hibernate3.jar Binary files differindex c1c81141..c1c81141 100644 --- a/src/com.gluster.storage.management.gateway/WebContent/WEB-INF/lib/hibernate3.jar +++ b/src/org.gluster.storage.management.gateway/WebContent/WEB-INF/lib/hibernate3.jar diff --git a/src/com.gluster.storage.management.gateway/WebContent/WEB-INF/lib/jackson-core-asl-1.5.5.jar b/src/org.gluster.storage.management.gateway/WebContent/WEB-INF/lib/jackson-core-asl-1.5.5.jar Binary files differindex a3248188..a3248188 100644 --- a/src/com.gluster.storage.management.gateway/WebContent/WEB-INF/lib/jackson-core-asl-1.5.5.jar +++ b/src/org.gluster.storage.management.gateway/WebContent/WEB-INF/lib/jackson-core-asl-1.5.5.jar diff --git a/src/com.gluster.storage.management.gateway/WebContent/WEB-INF/lib/jackson-jaxrs-1.5.5.jar b/src/org.gluster.storage.management.gateway/WebContent/WEB-INF/lib/jackson-jaxrs-1.5.5.jar Binary files differindex faf12cf6..faf12cf6 100644 --- a/src/com.gluster.storage.management.gateway/WebContent/WEB-INF/lib/jackson-jaxrs-1.5.5.jar +++ b/src/org.gluster.storage.management.gateway/WebContent/WEB-INF/lib/jackson-jaxrs-1.5.5.jar diff --git a/src/com.gluster.storage.management.gateway/WebContent/WEB-INF/lib/jackson-mapper-asl-1.5.5.jar b/src/org.gluster.storage.management.gateway/WebContent/WEB-INF/lib/jackson-mapper-asl-1.5.5.jar Binary files differindex ca612580..ca612580 100644 --- a/src/com.gluster.storage.management.gateway/WebContent/WEB-INF/lib/jackson-mapper-asl-1.5.5.jar +++ b/src/org.gluster.storage.management.gateway/WebContent/WEB-INF/lib/jackson-mapper-asl-1.5.5.jar diff --git a/src/com.gluster.storage.management.gateway/WebContent/WEB-INF/lib/jackson-xc-1.5.5.jar b/src/org.gluster.storage.management.gateway/WebContent/WEB-INF/lib/jackson-xc-1.5.5.jar Binary files differindex 57c2c670..57c2c670 100644 --- a/src/com.gluster.storage.management.gateway/WebContent/WEB-INF/lib/jackson-xc-1.5.5.jar +++ b/src/org.gluster.storage.management.gateway/WebContent/WEB-INF/lib/jackson-xc-1.5.5.jar diff --git a/src/com.gluster.storage.management.gateway/WebContent/WEB-INF/lib/javassist-3.12.0.GA.jar b/src/org.gluster.storage.management.gateway/WebContent/WEB-INF/lib/javassist-3.12.0.GA.jar Binary files differindex 8f692f4f..8f692f4f 100644 --- a/src/com.gluster.storage.management.gateway/WebContent/WEB-INF/lib/javassist-3.12.0.GA.jar +++ b/src/org.gluster.storage.management.gateway/WebContent/WEB-INF/lib/javassist-3.12.0.GA.jar diff --git a/src/com.gluster.storage.management.gateway/WebContent/WEB-INF/lib/jersey-client-1.5.jar b/src/org.gluster.storage.management.gateway/WebContent/WEB-INF/lib/jersey-client-1.5.jar Binary files differindex 62f790fa..62f790fa 100644 --- a/src/com.gluster.storage.management.gateway/WebContent/WEB-INF/lib/jersey-client-1.5.jar +++ b/src/org.gluster.storage.management.gateway/WebContent/WEB-INF/lib/jersey-client-1.5.jar diff --git a/src/com.gluster.storage.management.gateway/WebContent/WEB-INF/lib/jersey-core-1.5.jar b/src/org.gluster.storage.management.gateway/WebContent/WEB-INF/lib/jersey-core-1.5.jar Binary files differindex 92b38466..92b38466 100644 --- a/src/com.gluster.storage.management.gateway/WebContent/WEB-INF/lib/jersey-core-1.5.jar +++ b/src/org.gluster.storage.management.gateway/WebContent/WEB-INF/lib/jersey-core-1.5.jar diff --git a/src/com.gluster.storage.management.gateway/WebContent/WEB-INF/lib/jersey-json-1.5.jar b/src/org.gluster.storage.management.gateway/WebContent/WEB-INF/lib/jersey-json-1.5.jar Binary files differindex 01d8c83b..01d8c83b 100644 --- a/src/com.gluster.storage.management.gateway/WebContent/WEB-INF/lib/jersey-json-1.5.jar +++ b/src/org.gluster.storage.management.gateway/WebContent/WEB-INF/lib/jersey-json-1.5.jar diff --git a/src/com.gluster.storage.management.gateway/WebContent/WEB-INF/lib/jersey-multipart-1.5.jar b/src/org.gluster.storage.management.gateway/WebContent/WEB-INF/lib/jersey-multipart-1.5.jar Binary files differindex 1c134f05..1c134f05 100644 --- a/src/com.gluster.storage.management.gateway/WebContent/WEB-INF/lib/jersey-multipart-1.5.jar +++ b/src/org.gluster.storage.management.gateway/WebContent/WEB-INF/lib/jersey-multipart-1.5.jar diff --git a/src/com.gluster.storage.management.gateway/WebContent/WEB-INF/lib/jersey-server-1.5.jar b/src/org.gluster.storage.management.gateway/WebContent/WEB-INF/lib/jersey-server-1.5.jar Binary files differindex a29d7409..a29d7409 100644 --- a/src/com.gluster.storage.management.gateway/WebContent/WEB-INF/lib/jersey-server-1.5.jar +++ b/src/org.gluster.storage.management.gateway/WebContent/WEB-INF/lib/jersey-server-1.5.jar diff --git a/src/com.gluster.storage.management.gateway/WebContent/WEB-INF/lib/jersey-spring-1.5.jar b/src/org.gluster.storage.management.gateway/WebContent/WEB-INF/lib/jersey-spring-1.5.jar Binary files differindex c79b4490..c79b4490 100644 --- a/src/com.gluster.storage.management.gateway/WebContent/WEB-INF/lib/jersey-spring-1.5.jar +++ b/src/org.gluster.storage.management.gateway/WebContent/WEB-INF/lib/jersey-spring-1.5.jar diff --git a/src/com.gluster.storage.management.gateway/WebContent/WEB-INF/lib/jettison-1.1.jar b/src/org.gluster.storage.management.gateway/WebContent/WEB-INF/lib/jettison-1.1.jar Binary files differindex e4e9c8c3..e4e9c8c3 100644 --- a/src/com.gluster.storage.management.gateway/WebContent/WEB-INF/lib/jettison-1.1.jar +++ b/src/org.gluster.storage.management.gateway/WebContent/WEB-INF/lib/jettison-1.1.jar diff --git a/src/com.gluster.storage.management.gateway/WebContent/WEB-INF/lib/jnlp-servlet.jar b/src/org.gluster.storage.management.gateway/WebContent/WEB-INF/lib/jnlp-servlet.jar Binary files differindex 23782c02..23782c02 100644 --- a/src/com.gluster.storage.management.gateway/WebContent/WEB-INF/lib/jnlp-servlet.jar +++ b/src/org.gluster.storage.management.gateway/WebContent/WEB-INF/lib/jnlp-servlet.jar diff --git a/src/com.gluster.storage.management.gateway/WebContent/WEB-INF/lib/jsr311-api-1.1.1.jar b/src/org.gluster.storage.management.gateway/WebContent/WEB-INF/lib/jsr311-api-1.1.1.jar Binary files differindex ec8bc818..ec8bc818 100644 --- a/src/com.gluster.storage.management.gateway/WebContent/WEB-INF/lib/jsr311-api-1.1.1.jar +++ b/src/org.gluster.storage.management.gateway/WebContent/WEB-INF/lib/jsr311-api-1.1.1.jar diff --git a/src/com.gluster.storage.management.gateway/WebContent/WEB-INF/lib/jta-1.1.jar b/src/org.gluster.storage.management.gateway/WebContent/WEB-INF/lib/jta-1.1.jar Binary files differindex 6d225b76..6d225b76 100644 --- a/src/com.gluster.storage.management.gateway/WebContent/WEB-INF/lib/jta-1.1.jar +++ b/src/org.gluster.storage.management.gateway/WebContent/WEB-INF/lib/jta-1.1.jar diff --git a/src/com.gluster.storage.management.gateway/WebContent/WEB-INF/lib/log4j-1.2.16.jar b/src/org.gluster.storage.management.gateway/WebContent/WEB-INF/lib/log4j-1.2.16.jar Binary files differindex 3f9d8476..3f9d8476 100644 --- a/src/com.gluster.storage.management.gateway/WebContent/WEB-INF/lib/log4j-1.2.16.jar +++ b/src/org.gluster.storage.management.gateway/WebContent/WEB-INF/lib/log4j-1.2.16.jar diff --git a/src/com.gluster.storage.management.gateway/WebContent/WEB-INF/lib/mimepull-1.3.jar b/src/org.gluster.storage.management.gateway/WebContent/WEB-INF/lib/mimepull-1.3.jar Binary files differindex 48cc9295..48cc9295 100644 --- a/src/com.gluster.storage.management.gateway/WebContent/WEB-INF/lib/mimepull-1.3.jar +++ b/src/org.gluster.storage.management.gateway/WebContent/WEB-INF/lib/mimepull-1.3.jar diff --git a/src/com.gluster.storage.management.gateway/WebContent/WEB-INF/lib/org.eclipse.equinox.common_3.6.0.v20100503.jar b/src/org.gluster.storage.management.gateway/WebContent/WEB-INF/lib/org.eclipse.equinox.common_3.6.0.v20100503.jar Binary files differindex a5d37aa1..a5d37aa1 100644 --- a/src/com.gluster.storage.management.gateway/WebContent/WEB-INF/lib/org.eclipse.equinox.common_3.6.0.v20100503.jar +++ b/src/org.gluster.storage.management.gateway/WebContent/WEB-INF/lib/org.eclipse.equinox.common_3.6.0.v20100503.jar diff --git a/src/com.gluster.storage.management.gateway/WebContent/WEB-INF/lib/org.springframework.aop-3.0.5.RELEASE.jar b/src/org.gluster.storage.management.gateway/WebContent/WEB-INF/lib/org.springframework.aop-3.0.5.RELEASE.jar Binary files differindex db6f529f..db6f529f 100644 --- a/src/com.gluster.storage.management.gateway/WebContent/WEB-INF/lib/org.springframework.aop-3.0.5.RELEASE.jar +++ b/src/org.gluster.storage.management.gateway/WebContent/WEB-INF/lib/org.springframework.aop-3.0.5.RELEASE.jar diff --git a/src/com.gluster.storage.management.gateway/WebContent/WEB-INF/lib/org.springframework.asm-3.0.5.RELEASE.jar b/src/org.gluster.storage.management.gateway/WebContent/WEB-INF/lib/org.springframework.asm-3.0.5.RELEASE.jar Binary files differindex 7cd3a626..7cd3a626 100644 --- a/src/com.gluster.storage.management.gateway/WebContent/WEB-INF/lib/org.springframework.asm-3.0.5.RELEASE.jar +++ b/src/org.gluster.storage.management.gateway/WebContent/WEB-INF/lib/org.springframework.asm-3.0.5.RELEASE.jar diff --git a/src/com.gluster.storage.management.gateway/WebContent/WEB-INF/lib/org.springframework.aspects-3.0.5.RELEASE.jar b/src/org.gluster.storage.management.gateway/WebContent/WEB-INF/lib/org.springframework.aspects-3.0.5.RELEASE.jar Binary files differindex 11fc11b9..11fc11b9 100644 --- a/src/com.gluster.storage.management.gateway/WebContent/WEB-INF/lib/org.springframework.aspects-3.0.5.RELEASE.jar +++ b/src/org.gluster.storage.management.gateway/WebContent/WEB-INF/lib/org.springframework.aspects-3.0.5.RELEASE.jar diff --git a/src/com.gluster.storage.management.gateway/WebContent/WEB-INF/lib/org.springframework.beans-3.0.5.RELEASE.jar b/src/org.gluster.storage.management.gateway/WebContent/WEB-INF/lib/org.springframework.beans-3.0.5.RELEASE.jar Binary files differindex f2e2e927..f2e2e927 100644 --- a/src/com.gluster.storage.management.gateway/WebContent/WEB-INF/lib/org.springframework.beans-3.0.5.RELEASE.jar +++ b/src/org.gluster.storage.management.gateway/WebContent/WEB-INF/lib/org.springframework.beans-3.0.5.RELEASE.jar diff --git a/src/com.gluster.storage.management.gateway/WebContent/WEB-INF/lib/org.springframework.context-3.0.5.RELEASE.jar b/src/org.gluster.storage.management.gateway/WebContent/WEB-INF/lib/org.springframework.context-3.0.5.RELEASE.jar Binary files differindex bd1367d8..bd1367d8 100644 --- a/src/com.gluster.storage.management.gateway/WebContent/WEB-INF/lib/org.springframework.context-3.0.5.RELEASE.jar +++ b/src/org.gluster.storage.management.gateway/WebContent/WEB-INF/lib/org.springframework.context-3.0.5.RELEASE.jar diff --git a/src/com.gluster.storage.management.gateway/WebContent/WEB-INF/lib/org.springframework.context.support-3.0.5.RELEASE.jar b/src/org.gluster.storage.management.gateway/WebContent/WEB-INF/lib/org.springframework.context.support-3.0.5.RELEASE.jar Binary files differindex e46f9eb8..e46f9eb8 100644 --- a/src/com.gluster.storage.management.gateway/WebContent/WEB-INF/lib/org.springframework.context.support-3.0.5.RELEASE.jar +++ b/src/org.gluster.storage.management.gateway/WebContent/WEB-INF/lib/org.springframework.context.support-3.0.5.RELEASE.jar diff --git a/src/com.gluster.storage.management.gateway/WebContent/WEB-INF/lib/org.springframework.core-3.0.5.RELEASE.jar b/src/org.gluster.storage.management.gateway/WebContent/WEB-INF/lib/org.springframework.core-3.0.5.RELEASE.jar Binary files differindex ea9500d6..ea9500d6 100644 --- a/src/com.gluster.storage.management.gateway/WebContent/WEB-INF/lib/org.springframework.core-3.0.5.RELEASE.jar +++ b/src/org.gluster.storage.management.gateway/WebContent/WEB-INF/lib/org.springframework.core-3.0.5.RELEASE.jar diff --git a/src/com.gluster.storage.management.gateway/WebContent/WEB-INF/lib/org.springframework.expression-3.0.5.RELEASE.jar b/src/org.gluster.storage.management.gateway/WebContent/WEB-INF/lib/org.springframework.expression-3.0.5.RELEASE.jar Binary files differindex 6ef99d8d..6ef99d8d 100644 --- a/src/com.gluster.storage.management.gateway/WebContent/WEB-INF/lib/org.springframework.expression-3.0.5.RELEASE.jar +++ b/src/org.gluster.storage.management.gateway/WebContent/WEB-INF/lib/org.springframework.expression-3.0.5.RELEASE.jar diff --git a/src/com.gluster.storage.management.gateway/WebContent/WEB-INF/lib/org.springframework.instrument-3.0.5.RELEASE.jar b/src/org.gluster.storage.management.gateway/WebContent/WEB-INF/lib/org.springframework.instrument-3.0.5.RELEASE.jar Binary files differindex e149290e..e149290e 100644 --- a/src/com.gluster.storage.management.gateway/WebContent/WEB-INF/lib/org.springframework.instrument-3.0.5.RELEASE.jar +++ b/src/org.gluster.storage.management.gateway/WebContent/WEB-INF/lib/org.springframework.instrument-3.0.5.RELEASE.jar diff --git a/src/com.gluster.storage.management.gateway/WebContent/WEB-INF/lib/org.springframework.instrument.tomcat-3.0.5.RELEASE.jar b/src/org.gluster.storage.management.gateway/WebContent/WEB-INF/lib/org.springframework.instrument.tomcat-3.0.5.RELEASE.jar Binary files differindex dcd1e4d9..dcd1e4d9 100644 --- a/src/com.gluster.storage.management.gateway/WebContent/WEB-INF/lib/org.springframework.instrument.tomcat-3.0.5.RELEASE.jar +++ b/src/org.gluster.storage.management.gateway/WebContent/WEB-INF/lib/org.springframework.instrument.tomcat-3.0.5.RELEASE.jar diff --git a/src/com.gluster.storage.management.gateway/WebContent/WEB-INF/lib/org.springframework.jdbc-3.0.5.RELEASE.jar b/src/org.gluster.storage.management.gateway/WebContent/WEB-INF/lib/org.springframework.jdbc-3.0.5.RELEASE.jar Binary files differindex f7a3b837..f7a3b837 100644 --- a/src/com.gluster.storage.management.gateway/WebContent/WEB-INF/lib/org.springframework.jdbc-3.0.5.RELEASE.jar +++ b/src/org.gluster.storage.management.gateway/WebContent/WEB-INF/lib/org.springframework.jdbc-3.0.5.RELEASE.jar diff --git a/src/com.gluster.storage.management.gateway/WebContent/WEB-INF/lib/org.springframework.jms-3.0.5.RELEASE.jar b/src/org.gluster.storage.management.gateway/WebContent/WEB-INF/lib/org.springframework.jms-3.0.5.RELEASE.jar Binary files differindex 9cea2aef..9cea2aef 100644 --- a/src/com.gluster.storage.management.gateway/WebContent/WEB-INF/lib/org.springframework.jms-3.0.5.RELEASE.jar +++ b/src/org.gluster.storage.management.gateway/WebContent/WEB-INF/lib/org.springframework.jms-3.0.5.RELEASE.jar diff --git a/src/com.gluster.storage.management.gateway/WebContent/WEB-INF/lib/org.springframework.orm-3.0.5.RELEASE.jar b/src/org.gluster.storage.management.gateway/WebContent/WEB-INF/lib/org.springframework.orm-3.0.5.RELEASE.jar Binary files differindex d0550ccd..d0550ccd 100644 --- a/src/com.gluster.storage.management.gateway/WebContent/WEB-INF/lib/org.springframework.orm-3.0.5.RELEASE.jar +++ b/src/org.gluster.storage.management.gateway/WebContent/WEB-INF/lib/org.springframework.orm-3.0.5.RELEASE.jar diff --git a/src/com.gluster.storage.management.gateway/WebContent/WEB-INF/lib/org.springframework.oxm-3.0.5.RELEASE.jar b/src/org.gluster.storage.management.gateway/WebContent/WEB-INF/lib/org.springframework.oxm-3.0.5.RELEASE.jar Binary files differindex 1688cf74..1688cf74 100644 --- a/src/com.gluster.storage.management.gateway/WebContent/WEB-INF/lib/org.springframework.oxm-3.0.5.RELEASE.jar +++ b/src/org.gluster.storage.management.gateway/WebContent/WEB-INF/lib/org.springframework.oxm-3.0.5.RELEASE.jar diff --git a/src/com.gluster.storage.management.gateway/WebContent/WEB-INF/lib/org.springframework.spring-library-3.0.5.RELEASE.libd b/src/org.gluster.storage.management.gateway/WebContent/WEB-INF/lib/org.springframework.spring-library-3.0.5.RELEASE.libd index b3aa6af8..b3aa6af8 100644 --- a/src/com.gluster.storage.management.gateway/WebContent/WEB-INF/lib/org.springframework.spring-library-3.0.5.RELEASE.libd +++ b/src/org.gluster.storage.management.gateway/WebContent/WEB-INF/lib/org.springframework.spring-library-3.0.5.RELEASE.libd diff --git a/src/com.gluster.storage.management.gateway/WebContent/WEB-INF/lib/org.springframework.test-3.0.5.RELEASE.jar b/src/org.gluster.storage.management.gateway/WebContent/WEB-INF/lib/org.springframework.test-3.0.5.RELEASE.jar Binary files differindex 237995c5..237995c5 100644 --- a/src/com.gluster.storage.management.gateway/WebContent/WEB-INF/lib/org.springframework.test-3.0.5.RELEASE.jar +++ b/src/org.gluster.storage.management.gateway/WebContent/WEB-INF/lib/org.springframework.test-3.0.5.RELEASE.jar diff --git a/src/com.gluster.storage.management.gateway/WebContent/WEB-INF/lib/org.springframework.transaction-3.0.5.RELEASE.jar b/src/org.gluster.storage.management.gateway/WebContent/WEB-INF/lib/org.springframework.transaction-3.0.5.RELEASE.jar Binary files differindex 2f52122b..2f52122b 100644 --- a/src/com.gluster.storage.management.gateway/WebContent/WEB-INF/lib/org.springframework.transaction-3.0.5.RELEASE.jar +++ b/src/org.gluster.storage.management.gateway/WebContent/WEB-INF/lib/org.springframework.transaction-3.0.5.RELEASE.jar diff --git a/src/com.gluster.storage.management.gateway/WebContent/WEB-INF/lib/org.springframework.web-3.0.5.RELEASE.jar b/src/org.gluster.storage.management.gateway/WebContent/WEB-INF/lib/org.springframework.web-3.0.5.RELEASE.jar Binary files differindex 5a2381a0..5a2381a0 100644 --- a/src/com.gluster.storage.management.gateway/WebContent/WEB-INF/lib/org.springframework.web-3.0.5.RELEASE.jar +++ b/src/org.gluster.storage.management.gateway/WebContent/WEB-INF/lib/org.springframework.web-3.0.5.RELEASE.jar diff --git a/src/com.gluster.storage.management.gateway/WebContent/WEB-INF/lib/org.springframework.web.portlet-3.0.5.RELEASE.jar b/src/org.gluster.storage.management.gateway/WebContent/WEB-INF/lib/org.springframework.web.portlet-3.0.5.RELEASE.jar Binary files differindex 6ec9d681..6ec9d681 100644 --- a/src/com.gluster.storage.management.gateway/WebContent/WEB-INF/lib/org.springframework.web.portlet-3.0.5.RELEASE.jar +++ b/src/org.gluster.storage.management.gateway/WebContent/WEB-INF/lib/org.springframework.web.portlet-3.0.5.RELEASE.jar diff --git a/src/com.gluster.storage.management.gateway/WebContent/WEB-INF/lib/org.springframework.web.servlet-3.0.5.RELEASE.jar b/src/org.gluster.storage.management.gateway/WebContent/WEB-INF/lib/org.springframework.web.servlet-3.0.5.RELEASE.jar Binary files differindex 6d13bd40..6d13bd40 100644 --- a/src/com.gluster.storage.management.gateway/WebContent/WEB-INF/lib/org.springframework.web.servlet-3.0.5.RELEASE.jar +++ b/src/org.gluster.storage.management.gateway/WebContent/WEB-INF/lib/org.springframework.web.servlet-3.0.5.RELEASE.jar diff --git a/src/com.gluster.storage.management.gateway/WebContent/WEB-INF/lib/org.springframework.web.struts-3.0.5.RELEASE.jar b/src/org.gluster.storage.management.gateway/WebContent/WEB-INF/lib/org.springframework.web.struts-3.0.5.RELEASE.jar Binary files differindex e351ae7b..e351ae7b 100644 --- a/src/com.gluster.storage.management.gateway/WebContent/WEB-INF/lib/org.springframework.web.struts-3.0.5.RELEASE.jar +++ b/src/org.gluster.storage.management.gateway/WebContent/WEB-INF/lib/org.springframework.web.struts-3.0.5.RELEASE.jar diff --git a/src/com.gluster.storage.management.gateway/WebContent/WEB-INF/lib/servlet-api.jar b/src/org.gluster.storage.management.gateway/WebContent/WEB-INF/lib/servlet-api.jar Binary files differindex e5bc672b..e5bc672b 100644 --- a/src/com.gluster.storage.management.gateway/WebContent/WEB-INF/lib/servlet-api.jar +++ b/src/org.gluster.storage.management.gateway/WebContent/WEB-INF/lib/servlet-api.jar diff --git a/src/com.gluster.storage.management.gateway/WebContent/WEB-INF/lib/slf4j-api-1.6.1.jar b/src/org.gluster.storage.management.gateway/WebContent/WEB-INF/lib/slf4j-api-1 |
