diff options
| author | Shireesh Anjal <shireesh@gluster.com> | 2011-02-08 21:09:29 +0530 |
|---|---|---|
| committer | Shireesh Anjal <shireesh@gluster.com> | 2011-02-08 21:09:29 +0530 |
| commit | 9438d94101e33638affc463953bd22d18ca0c6d6 (patch) | |
| tree | 8f25d09622ef0f628bea92f7c52c7dd4f9e738a9 /com.gluster.storage.management.server/src/com | |
| parent | cf9c3498b400ea5b04a2d93e019e94c85759ea8a (diff) | |
Introduced server discovery task
Diffstat (limited to 'com.gluster.storage.management.server/src/com')
| -rw-r--r-- | com.gluster.storage.management.server/src/com/gluster/storage/management/server/tasks/ServerDiscoveryTask.java | 51 |
1 files changed, 51 insertions, 0 deletions
diff --git a/com.gluster.storage.management.server/src/com/gluster/storage/management/server/tasks/ServerDiscoveryTask.java b/com.gluster.storage.management.server/src/com/gluster/storage/management/server/tasks/ServerDiscoveryTask.java new file mode 100644 index 00000000..6bc25e81 --- /dev/null +++ b/com.gluster.storage.management.server/src/com/gluster/storage/management/server/tasks/ServerDiscoveryTask.java @@ -0,0 +1,51 @@ +/** + * ServerDiscoveryTask.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.server.tasks; + +import org.springframework.beans.factory.annotation.Autowired; +import org.springframework.stereotype.Component; + +/** + * Task for auto-discovery of servers eligible to be added to the Gluster cluster. This task runs periodically and keeps + * the discovered server list at a common place. The server resource can then pick it and send to client whenever + * demanded. + */ +@Component +public class ServerDiscoveryTask { + private static final String ENV_AWS = "aws"; + private static final String ENV_VMWARE = "vmware"; + private static final String ENV_PHYCAL = "physical"; + + @Autowired + private String environment; + + public void discoverServers() { + System.out.println("Starting discovery in [" + environment + "]"); + + /** + * TODO: Flow should be as follows <br> + * 1) Get the discovery policy specific for the environment <br> + * 2) Execute discovery to get list of auto-discovered server <br> + * 3) Probe each one of them to fetch server details <br> + * 4) Store the details in a common place which can be read by the server resource <br> + */ + } +}
\ No newline at end of file |
