incubator-cloudstack-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From n..@apache.org
Subject [14/20] git commit: refs/heads/noa/packaging_rpm_fixes - CLOUDSTACK-241: Removed API based account sync. Removed all the related API changes. Converted tabs to spaces in the related files. Verified account, user and domain APIs manually.
Date Thu, 28 Feb 2013 14:56:03 GMT
CLOUDSTACK-241: Removed API based account sync. Removed all the related API changes. Converted tabs to spaces in the related files.
Verified account, user and domain APIs manually.


Project: http://git-wip-us.apache.org/repos/asf/incubator-cloudstack/repo
Commit: http://git-wip-us.apache.org/repos/asf/incubator-cloudstack/commit/1a2173f4
Tree: http://git-wip-us.apache.org/repos/asf/incubator-cloudstack/tree/1a2173f4
Diff: http://git-wip-us.apache.org/repos/asf/incubator-cloudstack/diff/1a2173f4

Branch: refs/heads/noa/packaging_rpm_fixes
Commit: 1a2173f4dbb0acfd96f8f41095dcf538cbd6556c
Parents: ccc5114
Author: Kishan Kavala <kishan@cloud.com>
Authored: Wed Feb 27 15:54:33 2013 +0530
Committer: Kishan Kavala <kishan@cloud.com>
Committed: Thu Feb 28 11:21:02 2013 +0530

----------------------------------------------------------------------
 api/src/com/cloud/user/AccountService.java         |    4 +-
 api/src/com/cloud/user/DomainService.java          |    2 +-
 .../org/apache/cloudstack/api/ApiConstants.java    |    5 +-
 .../command/admin/account/CreateAccountCmd.java    |   28 +-
 .../command/admin/account/DeleteAccountCmd.java    |   11 +-
 .../command/admin/account/DisableAccountCmd.java   |   17 +-
 .../command/admin/account/EnableAccountCmd.java    |   11 +-
 .../command/admin/account/UpdateAccountCmd.java    |   11 +-
 .../api/command/admin/domain/CreateDomainCmd.java  |   16 +-
 .../api/command/admin/domain/DeleteDomainCmd.java  |    9 +-
 .../api/command/admin/domain/UpdateDomainCmd.java  |   11 +-
 .../api/command/admin/user/CreateUserCmd.java      |   16 +-
 .../api/command/admin/user/DeleteUserCmd.java      |    9 +-
 .../api/command/admin/user/DisableUserCmd.java     |   11 +-
 .../api/command/admin/user/EnableUserCmd.java      |   11 +-
 .../api/command/admin/user/UpdateUserCmd.java      |   11 +-
 server/src/com/cloud/user/AccountManagerImpl.java  |   89 +-
 server/src/com/cloud/user/DomainManager.java       |    2 +-
 server/src/com/cloud/user/DomainManagerImpl.java   |   31 +-
 .../apache/cloudstack/region/RegionManager.java    |  194 +--
 .../cloudstack/region/RegionManagerImpl.java       | 1078 ++++++---------
 .../cloudstack/region/RegionServiceImpl.java       |  270 ++---
 .../apache/cloudstack/region/RegionsApiUtil.java   |  478 ++++----
 .../cloudstack/region/dao/RegionSyncDao.java       |   24 -
 .../cloudstack/region/dao/RegionSyncDaoImpl.java   |   35 -
 .../com/cloud/user/MockAccountManagerImpl.java     |   47 +-
 .../test/com/cloud/user/MockDomainManagerImpl.java |   38 +-
 setup/db/db/schema-40to410.sql                     |    9 -
 28 files changed, 896 insertions(+), 1582 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/incubator-cloudstack/blob/1a2173f4/api/src/com/cloud/user/AccountService.java
----------------------------------------------------------------------
diff --git a/api/src/com/cloud/user/AccountService.java b/api/src/com/cloud/user/AccountService.java
index 8026891..f9c6ddb 100755
--- a/api/src/com/cloud/user/AccountService.java
+++ b/api/src/com/cloud/user/AccountService.java
@@ -62,7 +62,7 @@ public interface AccountService {
      * @return the user if created successfully, null otherwise
      */
     UserAccount createUserAccount(String userName, String password, String firstName, String lastName, String email, String timezone, String accountName, short accountType, Long domainId, String networkDomain,
-            Map<String, String> details, String accountUUID, String userUUID, Integer regionId);
+            Map<String, String> details);
 
     /**
      * Locks a user by userId. A locked user cannot access the API, but will still have running VMs/IP addresses
@@ -77,7 +77,7 @@ public interface AccountService {
 
     User getSystemUser();
 
-    User createUser(String userName, String password, String firstName, String lastName, String email, String timeZone, String accountName, Long domainId, String userUUID, Integer regionId);
+    User createUser(String userName, String password, String firstName, String lastName, String email, String timeZone, String accountName, Long domainId);
 
     boolean isAdmin(short accountType);
 

http://git-wip-us.apache.org/repos/asf/incubator-cloudstack/blob/1a2173f4/api/src/com/cloud/user/DomainService.java
----------------------------------------------------------------------
diff --git a/api/src/com/cloud/user/DomainService.java b/api/src/com/cloud/user/DomainService.java
index 1a96354..1f03019 100644
--- a/api/src/com/cloud/user/DomainService.java
+++ b/api/src/com/cloud/user/DomainService.java
@@ -27,7 +27,7 @@ import com.cloud.utils.Pair;
 
 public interface DomainService {
 
-    Domain createDomain(String name, Long parentId, String networkDomain, String domainUUID, Integer regionId);
+    Domain createDomain(String name, Long parentId, String networkDomain);
 
     Domain getDomain(long id);
 

http://git-wip-us.apache.org/repos/asf/incubator-cloudstack/blob/1a2173f4/api/src/org/apache/cloudstack/api/ApiConstants.java
----------------------------------------------------------------------
diff --git a/api/src/org/apache/cloudstack/api/ApiConstants.java b/api/src/org/apache/cloudstack/api/ApiConstants.java
index 7efb7fe..834b272 100755
--- a/api/src/org/apache/cloudstack/api/ApiConstants.java
+++ b/api/src/org/apache/cloudstack/api/ApiConstants.java
@@ -376,9 +376,8 @@ public class ApiConstants {
     public static final String VSM_CONFIG_STATE = "vsmconfigstate";
     public static final String VSM_DEVICE_STATE = "vsmdevicestate";
     public static final String ADD_VSM_FLAG = "addvsmflag";
-	public static final String END_POINT = "endpoint";
-	public static final String REGION_ID = "regionid";
-	public static final String IS_PROPAGATE = "ispropagate";
+    public static final String END_POINT = "endpoint";
+    public static final String REGION_ID = "regionid";
     public static final String VPC_OFF_ID = "vpcofferingid";
     public static final String NETWORK = "network";
     public static final String VPC_ID = "vpcid";

http://git-wip-us.apache.org/repos/asf/incubator-cloudstack/blob/1a2173f4/api/src/org/apache/cloudstack/api/command/admin/account/CreateAccountCmd.java
----------------------------------------------------------------------
diff --git a/api/src/org/apache/cloudstack/api/command/admin/account/CreateAccountCmd.java b/api/src/org/apache/cloudstack/api/command/admin/account/CreateAccountCmd.java
index b0f73d1..4121651 100644
--- a/api/src/org/apache/cloudstack/api/command/admin/account/CreateAccountCmd.java
+++ b/api/src/org/apache/cloudstack/api/command/admin/account/CreateAccountCmd.java
@@ -78,19 +78,7 @@ public class CreateAccountCmd extends BaseCmd {
     @Parameter(name = ApiConstants.ACCOUNT_DETAILS, type = CommandType.MAP, description = "details for account used to store specific parameters")
     private Map<String, String> details;
 
-	//@Parameter(name = ApiConstants.REGION_DETAILS, type = CommandType.MAP, description = "details for account used to store region specific parameters")
-    //private Map<String, String> regionDetails;
-	
-    @Parameter(name=ApiConstants.ACCOUNT_ID, type=CommandType.STRING, description="Account UUID, required for adding account from another Region")
-    private String accountUUID;
 
-    @Parameter(name=ApiConstants.USER_ID, type=CommandType.STRING, description="User UUID, required for adding account from another Region")
-    private String userUUID;
-
-    @Parameter(name=ApiConstants.REGION_ID, type=CommandType.INTEGER, description="Id of the Region creating the account")
-    private Integer regionId;
-
-    
     /////////////////////////////////////////////////////
     /////////////////// Accessors ///////////////////////
     /////////////////////////////////////////////////////
@@ -145,18 +133,6 @@ public class CreateAccountCmd extends BaseCmd {
         return params;
     }
 
-    public String getAccountUUID() {
-		return accountUUID;
-	}
-
-	public String getUserUUID() {
-		return userUUID;
-	}
-
-	public Integer getRegionId() {
-		return regionId;
-	}
-    
     /////////////////////////////////////////////////////
     /////////////// API Implementation///////////////////
     /////////////////////////////////////////////////////
@@ -174,8 +150,8 @@ public class CreateAccountCmd extends BaseCmd {
     @Override
     public void execute(){
         UserContext.current().setEventDetails("Account Name: "+getAccountName()+", Domain Id:"+getDomainId());
-        UserAccount userAccount = _accountService.createUserAccount(getUsername(), getPassword(), getFirstName(), getLastName(), getEmail(), getTimeZone(), getAccountName(), getAccountType(), getDomainId(), getNetworkDomain(), getDetails(), 
-        		getAccountUUID(), getUserUUID(), getRegionId());
+        UserAccount userAccount = _accountService.createUserAccount(getUsername(), getPassword(), getFirstName(), getLastName(), getEmail(), getTimeZone(), getAccountName(), getAccountType(),
+                getDomainId(), getNetworkDomain(), getDetails());
         if (userAccount != null) {
             AccountResponse response = _responseGenerator.createUserAccountResponse(userAccount);
             response.setResponseName(getCommandName());

http://git-wip-us.apache.org/repos/asf/incubator-cloudstack/blob/1a2173f4/api/src/org/apache/cloudstack/api/command/admin/account/DeleteAccountCmd.java
----------------------------------------------------------------------
diff --git a/api/src/org/apache/cloudstack/api/command/admin/account/DeleteAccountCmd.java b/api/src/org/apache/cloudstack/api/command/admin/account/DeleteAccountCmd.java
index 959d7ce..9895da1 100644
--- a/api/src/org/apache/cloudstack/api/command/admin/account/DeleteAccountCmd.java
+++ b/api/src/org/apache/cloudstack/api/command/admin/account/DeleteAccountCmd.java
@@ -48,11 +48,8 @@ public class DeleteAccountCmd extends BaseAsyncCmd {
             required=true, description="Account id")
     private Long id;
 
-    @Parameter(name=ApiConstants.IS_PROPAGATE, type=CommandType.BOOLEAN, description="True if command is sent from another Region")
-    private Boolean isPropagate;
-
     @Inject RegionService _regionService;
-    
+
     /////////////////////////////////////////////////////
     /////////////////// Accessors ///////////////////////
     /////////////////////////////////////////////////////
@@ -62,10 +59,6 @@ public class DeleteAccountCmd extends BaseAsyncCmd {
         return id;
     }
 
-	public Boolean getIsPropagate() {
-		return isPropagate;
-	}
-
     /////////////////////////////////////////////////////
     /////////////// API Implementation///////////////////
     /////////////////////////////////////////////////////
@@ -103,7 +96,7 @@ public class DeleteAccountCmd extends BaseAsyncCmd {
     @Override
     public void execute(){
         UserContext.current().setEventDetails("Account Id: "+getId());
- 
+
         boolean	result = _regionService.deleteUserAccount(this);
         if (result) {
             SuccessResponse response = new SuccessResponse(getCommandName());

http://git-wip-us.apache.org/repos/asf/incubator-cloudstack/blob/1a2173f4/api/src/org/apache/cloudstack/api/command/admin/account/DisableAccountCmd.java
----------------------------------------------------------------------
diff --git a/api/src/org/apache/cloudstack/api/command/admin/account/DisableAccountCmd.java b/api/src/org/apache/cloudstack/api/command/admin/account/DisableAccountCmd.java
index 60e9fd5..1f9b821 100644
--- a/api/src/org/apache/cloudstack/api/command/admin/account/DisableAccountCmd.java
+++ b/api/src/org/apache/cloudstack/api/command/admin/account/DisableAccountCmd.java
@@ -58,11 +58,8 @@ public class DisableAccountCmd extends BaseAsyncCmd {
     @Parameter(name=ApiConstants.LOCK, type=CommandType.BOOLEAN, required=true, description="If true, only lock the account; else disable the account")
     private Boolean lockRequested;
 
-    @Parameter(name=ApiConstants.IS_PROPAGATE, type=CommandType.BOOLEAN, description="True if command is sent from another Region")
-    private Boolean isPropagate;
-    
     @Inject RegionService _regionService;
-    
+
     /////////////////////////////////////////////////////
     /////////////////// Accessors ///////////////////////
     /////////////////////////////////////////////////////
@@ -79,14 +76,10 @@ public class DisableAccountCmd extends BaseAsyncCmd {
         return domainId;
     }
 
-	public Boolean getIsPropagate() {
-		return isPropagate;
-	}
-
     public Boolean getLockRequested() {
-		return lockRequested;
-	}
-	
+        return lockRequested;
+    }
+
     /////////////////////////////////////////////////////
     /////////////// API Implementation///////////////////
     /////////////////////////////////////////////////////
@@ -124,7 +117,7 @@ public class DisableAccountCmd extends BaseAsyncCmd {
     @Override
     public void execute() throws ConcurrentOperationException, ResourceUnavailableException{
         UserContext.current().setEventDetails("Account Name: "+getAccountName()+", Domain Id:"+getDomainId());
-    	Account result = _regionService.disableAccount(this);
+        Account result = _regionService.disableAccount(this);
         if (result != null){
             AccountResponse response = _responseGenerator.createAccountResponse(result);
             response.setResponseName(getCommandName());

http://git-wip-us.apache.org/repos/asf/incubator-cloudstack/blob/1a2173f4/api/src/org/apache/cloudstack/api/command/admin/account/EnableAccountCmd.java
----------------------------------------------------------------------
diff --git a/api/src/org/apache/cloudstack/api/command/admin/account/EnableAccountCmd.java b/api/src/org/apache/cloudstack/api/command/admin/account/EnableAccountCmd.java
index 9a92f78..b9a9f6d 100644
--- a/api/src/org/apache/cloudstack/api/command/admin/account/EnableAccountCmd.java
+++ b/api/src/org/apache/cloudstack/api/command/admin/account/EnableAccountCmd.java
@@ -50,11 +50,8 @@ public class EnableAccountCmd extends BaseCmd {
             description="Enables specified account in this domain.")
     private Long domainId;
 
-    @Parameter(name=ApiConstants.IS_PROPAGATE, type=CommandType.BOOLEAN, description="True if command is sent from another Region")
-    private Boolean isPropagate;
-    
     @Inject RegionService _regionService;
-    
+
     /////////////////////////////////////////////////////
     /////////////////// Accessors ///////////////////////
     /////////////////////////////////////////////////////
@@ -71,10 +68,6 @@ public class EnableAccountCmd extends BaseCmd {
         return domainId;
     }
 
-	public Boolean getIsPropagate() {
-		return isPropagate;
-	}
-    
     /////////////////////////////////////////////////////
     /////////////// API Implementation///////////////////
     /////////////////////////////////////////////////////
@@ -101,7 +94,7 @@ public class EnableAccountCmd extends BaseCmd {
 
     @Override
     public void execute(){
-    	Account result = _regionService.enableAccount(this);
+        Account result = _regionService.enableAccount(this);
         if (result != null){
             AccountResponse response = _responseGenerator.createAccountResponse(result);
             response.setResponseName(getCommandName());

http://git-wip-us.apache.org/repos/asf/incubator-cloudstack/blob/1a2173f4/api/src/org/apache/cloudstack/api/command/admin/account/UpdateAccountCmd.java
----------------------------------------------------------------------
diff --git a/api/src/org/apache/cloudstack/api/command/admin/account/UpdateAccountCmd.java b/api/src/org/apache/cloudstack/api/command/admin/account/UpdateAccountCmd.java
index 6fad48b..60d1a97 100644
--- a/api/src/org/apache/cloudstack/api/command/admin/account/UpdateAccountCmd.java
+++ b/api/src/org/apache/cloudstack/api/command/admin/account/UpdateAccountCmd.java
@@ -63,11 +63,8 @@ public class UpdateAccountCmd extends BaseCmd{
     @Parameter(name = ApiConstants.ACCOUNT_DETAILS, type = CommandType.MAP, description = "details for account used to store specific parameters")
     private Map details;
 
-    @Parameter(name=ApiConstants.IS_PROPAGATE, type=CommandType.BOOLEAN, description="True if command is sent from another Region")
-    private Boolean isPropagate;
-	
     @Inject RegionService _regionService;
-    
+
     /////////////////////////////////////////////////////
     /////////////////// Accessors ///////////////////////
     /////////////////////////////////////////////////////
@@ -102,10 +99,6 @@ public class UpdateAccountCmd extends BaseCmd{
         return params;
     }
 
-	public Boolean getIsPropagate() {
-		return isPropagate;
-	}
-    
     /////////////////////////////////////////////////////
     /////////////// API Implementation///////////////////
     /////////////////////////////////////////////////////
@@ -131,7 +124,7 @@ public class UpdateAccountCmd extends BaseCmd{
 
     @Override
     public void execute(){
-    	Account result = _regionService.updateAccount(this);
+        Account result = _regionService.updateAccount(this);
         if (result != null){
             AccountResponse response = _responseGenerator.createAccountResponse(result);
             response.setResponseName(getCommandName());

http://git-wip-us.apache.org/repos/asf/incubator-cloudstack/blob/1a2173f4/api/src/org/apache/cloudstack/api/command/admin/domain/CreateDomainCmd.java
----------------------------------------------------------------------
diff --git a/api/src/org/apache/cloudstack/api/command/admin/domain/CreateDomainCmd.java b/api/src/org/apache/cloudstack/api/command/admin/domain/CreateDomainCmd.java
index e0ba693..5eae486 100644
--- a/api/src/org/apache/cloudstack/api/command/admin/domain/CreateDomainCmd.java
+++ b/api/src/org/apache/cloudstack/api/command/admin/domain/CreateDomainCmd.java
@@ -49,12 +49,6 @@ public class CreateDomainCmd extends BaseCmd {
     @Parameter(name=ApiConstants.NETWORK_DOMAIN, type=CommandType.STRING, description="Network domain for networks in the domain")
     private String networkDomain;
 
-    @Parameter(name=ApiConstants.DOMAIN_ID, type=CommandType.STRING, description="Domain UUID, required for adding domain from another Region")
-    private String domainUUID;
-    
-    @Parameter(name=ApiConstants.REGION_ID, type=CommandType.INTEGER, description="Id of the Region creating the Domain")
-    private Integer regionId;
-    
     /////////////////////////////////////////////////////
     /////////////////// Accessors ///////////////////////
     /////////////////////////////////////////////////////
@@ -71,14 +65,6 @@ public class CreateDomainCmd extends BaseCmd {
         return networkDomain;
     }
 
-    public String getDomainUUID() {
-        return domainUUID;
-    }
-    
-	public Integer getRegionId() {
-		return regionId;
-	}
-    
     /////////////////////////////////////////////////////
     /////////////// API Implementation///////////////////
     /////////////////////////////////////////////////////
@@ -96,7 +82,7 @@ public class CreateDomainCmd extends BaseCmd {
     @Override
     public void execute(){
         UserContext.current().setEventDetails("Domain Name: "+getDomainName()+((getParentDomainId()!=null)?", Parent DomainId :"+getParentDomainId():""));
-        Domain domain = _domainService.createDomain(getDomainName(), getParentDomainId(), getNetworkDomain(), getDomainUUID(), getRegionId());
+        Domain domain = _domainService.createDomain(getDomainName(), getParentDomainId(), getNetworkDomain());
         if (domain != null) {
             DomainResponse response = _responseGenerator.createDomainResponse(domain);
             response.setResponseName(getCommandName());

http://git-wip-us.apache.org/repos/asf/incubator-cloudstack/blob/1a2173f4/api/src/org/apache/cloudstack/api/command/admin/domain/DeleteDomainCmd.java
----------------------------------------------------------------------
diff --git a/api/src/org/apache/cloudstack/api/command/admin/domain/DeleteDomainCmd.java b/api/src/org/apache/cloudstack/api/command/admin/domain/DeleteDomainCmd.java
index eae393d..488a758 100644
--- a/api/src/org/apache/cloudstack/api/command/admin/domain/DeleteDomainCmd.java
+++ b/api/src/org/apache/cloudstack/api/command/admin/domain/DeleteDomainCmd.java
@@ -50,11 +50,8 @@ public class DeleteDomainCmd extends BaseAsyncCmd {
     @Parameter(name=ApiConstants.CLEANUP, type=CommandType.BOOLEAN, description="true if all domain resources (child domains, accounts) have to be cleaned up, false otherwise")
     private Boolean cleanup;
 
-    @Parameter(name=ApiConstants.IS_PROPAGATE, type=CommandType.BOOLEAN, description="True if command is sent from another Region")
-    private Boolean propagate;
-
     @Inject RegionService _regionService;
-    
+
     /////////////////////////////////////////////////////
     /////////////////// Accessors ///////////////////////
     /////////////////////////////////////////////////////
@@ -67,10 +64,6 @@ public class DeleteDomainCmd extends BaseAsyncCmd {
         return cleanup;
     }
 
-	public Boolean isPropagate() {
-		return propagate;
-	}
-    
     /////////////////////////////////////////////////////
     /////////////// API Implementation///////////////////
     /////////////////////////////////////////////////////

http://git-wip-us.apache.org/repos/asf/incubator-cloudstack/blob/1a2173f4/api/src/org/apache/cloudstack/api/command/admin/domain/UpdateDomainCmd.java
----------------------------------------------------------------------
diff --git a/api/src/org/apache/cloudstack/api/command/admin/domain/UpdateDomainCmd.java b/api/src/org/apache/cloudstack/api/command/admin/domain/UpdateDomainCmd.java
index c217f16..e658f49 100644
--- a/api/src/org/apache/cloudstack/api/command/admin/domain/UpdateDomainCmd.java
+++ b/api/src/org/apache/cloudstack/api/command/admin/domain/UpdateDomainCmd.java
@@ -52,11 +52,8 @@ public class UpdateDomainCmd extends BaseCmd {
     @Parameter(name=ApiConstants.NETWORK_DOMAIN, type=CommandType.STRING, description="Network domain for the domain's networks; empty string will update domainName with NULL value")
     private String networkDomain;
 
-    @Parameter(name=ApiConstants.IS_PROPAGATE, type=CommandType.BOOLEAN, description="True if command is sent from another Region")
-    private Boolean isPropagate;
-    
     @Inject RegionService _regionService;
-    
+
     /////////////////////////////////////////////////////
     /////////////////// Accessors ///////////////////////
     /////////////////////////////////////////////////////
@@ -73,10 +70,6 @@ public class UpdateDomainCmd extends BaseCmd {
         return networkDomain;
     }
 
-	public Boolean getIsPropagate() {
-		return isPropagate;
-	}
-    
     /////////////////////////////////////////////////////
     /////////////// API Implementation///////////////////
     /////////////////////////////////////////////////////
@@ -95,7 +88,7 @@ public class UpdateDomainCmd extends BaseCmd {
     public void execute(){
         UserContext.current().setEventDetails("Domain Id: "+getId());
         Domain domain =  _regionService.updateDomain(this);
-        
+
         if (domain != null) {
             DomainResponse response = _responseGenerator.createDomainResponse(domain);
             response.setResponseName(getCommandName());

http://git-wip-us.apache.org/repos/asf/incubator-cloudstack/blob/1a2173f4/api/src/org/apache/cloudstack/api/command/admin/user/CreateUserCmd.java
----------------------------------------------------------------------
diff --git a/api/src/org/apache/cloudstack/api/command/admin/user/CreateUserCmd.java b/api/src/org/apache/cloudstack/api/command/admin/user/CreateUserCmd.java
index d1f72c4..6ea8d9b 100644
--- a/api/src/org/apache/cloudstack/api/command/admin/user/CreateUserCmd.java
+++ b/api/src/org/apache/cloudstack/api/command/admin/user/CreateUserCmd.java
@@ -65,12 +65,6 @@ public class CreateUserCmd extends BaseCmd {
     @Parameter(name=ApiConstants.USERNAME, type=CommandType.STRING, required=true, description="Unique username.")
     private String username;
 
-    @Parameter(name=ApiConstants.USER_ID, type=CommandType.STRING, description="User UUID, required for adding account from another Region")
-    private String userUUID;
-    
-    @Parameter(name=ApiConstants.REGION_ID, type=CommandType.INTEGER, description="Id of the Region creating the User")
-    private Integer regionId;
-    
     /////////////////////////////////////////////////////
     /////////////////// Accessors ///////////////////////
     /////////////////////////////////////////////////////
@@ -107,14 +101,6 @@ public class CreateUserCmd extends BaseCmd {
         return username;
     }
 
-	public String getUserUUID() {
-		return userUUID;
-	}
-    
-	public Integer getRegionId() {
-		return regionId;
-	}
-    
     /////////////////////////////////////////////////////
     /////////////// API Implementation///////////////////
     /////////////////////////////////////////////////////
@@ -146,7 +132,7 @@ public class CreateUserCmd extends BaseCmd {
     @Override
     public void execute(){
         UserContext.current().setEventDetails("UserName: "+getUserName()+", FirstName :"+getFirstName()+", LastName: "+getLastName());
-        User user = _accountService.createUser(getUserName(), getPassword(), getFirstName(), getLastName(), getEmail(), getTimezone(), getAccountName(), getDomainId(), getUserUUID(), getRegionId());
+        User user = _accountService.createUser(getUserName(), getPassword(), getFirstName(), getLastName(), getEmail(), getTimezone(), getAccountName(), getDomainId());
         if (user != null) {
             UserResponse response = _responseGenerator.createUserResponse(user);
             response.setResponseName(getCommandName());

http://git-wip-us.apache.org/repos/asf/incubator-cloudstack/blob/1a2173f4/api/src/org/apache/cloudstack/api/command/admin/user/DeleteUserCmd.java
----------------------------------------------------------------------
diff --git a/api/src/org/apache/cloudstack/api/command/admin/user/DeleteUserCmd.java b/api/src/org/apache/cloudstack/api/command/admin/user/DeleteUserCmd.java
index e8f671d..bb37d08 100644
--- a/api/src/org/apache/cloudstack/api/command/admin/user/DeleteUserCmd.java
+++ b/api/src/org/apache/cloudstack/api/command/admin/user/DeleteUserCmd.java
@@ -45,11 +45,8 @@ public class DeleteUserCmd extends BaseCmd {
     @Parameter(name=ApiConstants.ID, type=CommandType.UUID, entityType=UserResponse.class, required=true, description="Deletes a user")
     private Long id;
 
-    @Parameter(name=ApiConstants.IS_PROPAGATE, type=CommandType.BOOLEAN, description="True if command is sent from another Region")
-    private Boolean isPropagate;
-    
     @Inject RegionService _regionService;
-    
+
     /////////////////////////////////////////////////////
     /////////////////// Accessors ///////////////////////
     /////////////////////////////////////////////////////
@@ -58,10 +55,6 @@ public class DeleteUserCmd extends BaseCmd {
         return id;
     }
 
-	public Boolean getIsPropagate() {
-		return isPropagate;
-	}
-    
     /////////////////////////////////////////////////////
     /////////////// API Implementation///////////////////
     /////////////////////////////////////////////////////

http://git-wip-us.apache.org/repos/asf/incubator-cloudstack/blob/1a2173f4/api/src/org/apache/cloudstack/api/command/admin/user/DisableUserCmd.java
----------------------------------------------------------------------
diff --git a/api/src/org/apache/cloudstack/api/command/admin/user/DisableUserCmd.java b/api/src/org/apache/cloudstack/api/command/admin/user/DisableUserCmd.java
index 95013ec..6eaa46b 100644
--- a/api/src/org/apache/cloudstack/api/command/admin/user/DisableUserCmd.java
+++ b/api/src/org/apache/cloudstack/api/command/admin/user/DisableUserCmd.java
@@ -49,11 +49,8 @@ public class DisableUserCmd extends BaseAsyncCmd {
             required=true, description="Disables user by user ID.")
     private Long id;
 
-    @Parameter(name=ApiConstants.IS_PROPAGATE, type=CommandType.BOOLEAN, description="True if command is sent from another Region")
-    private Boolean isPropagate;
-    
     @Inject RegionService _regionService;
-    
+
     /////////////////////////////////////////////////////
     /////////////////// Accessors ///////////////////////
     /////////////////////////////////////////////////////
@@ -62,10 +59,6 @@ public class DisableUserCmd extends BaseAsyncCmd {
         return id;
     }
 
-	public Boolean getIsPropagate() {
-		return isPropagate;
-	}
-    
     /////////////////////////////////////////////////////
     /////////////// API Implementation///////////////////
     /////////////////////////////////////////////////////
@@ -100,7 +93,7 @@ public class DisableUserCmd extends BaseAsyncCmd {
     public void execute(){
         UserContext.current().setEventDetails("UserId: "+getId());
         UserAccount user = _regionService.disableUser(this);
-        
+
         if (user != null){
             UserResponse response = _responseGenerator.createUserResponse(user);
             response.setResponseName(getCommandName());

http://git-wip-us.apache.org/repos/asf/incubator-cloudstack/blob/1a2173f4/api/src/org/apache/cloudstack/api/command/admin/user/EnableUserCmd.java
----------------------------------------------------------------------
diff --git a/api/src/org/apache/cloudstack/api/command/admin/user/EnableUserCmd.java b/api/src/org/apache/cloudstack/api/command/admin/user/EnableUserCmd.java
index c1ba900..382f67c 100644
--- a/api/src/org/apache/cloudstack/api/command/admin/user/EnableUserCmd.java
+++ b/api/src/org/apache/cloudstack/api/command/admin/user/EnableUserCmd.java
@@ -46,11 +46,8 @@ public class EnableUserCmd extends BaseCmd {
             required=true, description="Enables user by user ID.")
     private Long id;
 
-    @Parameter(name=ApiConstants.IS_PROPAGATE, type=CommandType.BOOLEAN, description="True if command is sent from another Region")
-    private Boolean isPropagate;
-
     @Inject RegionService _regionService;
-    
+
     /////////////////////////////////////////////////////
     /////////////////// Accessors ///////////////////////
     /////////////////////////////////////////////////////
@@ -59,10 +56,6 @@ public class EnableUserCmd extends BaseCmd {
         return id;
     }
 
-	public Boolean getIsPropagate() {
-		return isPropagate;
-	}
-    
     /////////////////////////////////////////////////////
     /////////////// API Implementation///////////////////
     /////////////////////////////////////////////////////
@@ -86,7 +79,7 @@ public class EnableUserCmd extends BaseCmd {
     public void execute(){
         UserContext.current().setEventDetails("UserId: "+getId());
         UserAccount user = _regionService.enableUser(this);
-        
+
         if (user != null){
             UserResponse response = _responseGenerator.createUserResponse(user);
             response.setResponseName(getCommandName());

http://git-wip-us.apache.org/repos/asf/incubator-cloudstack/blob/1a2173f4/api/src/org/apache/cloudstack/api/command/admin/user/UpdateUserCmd.java
----------------------------------------------------------------------
diff --git a/api/src/org/apache/cloudstack/api/command/admin/user/UpdateUserCmd.java b/api/src/org/apache/cloudstack/api/command/admin/user/UpdateUserCmd.java
index ee59d07..1f31662 100644
--- a/api/src/org/apache/cloudstack/api/command/admin/user/UpdateUserCmd.java
+++ b/api/src/org/apache/cloudstack/api/command/admin/user/UpdateUserCmd.java
@@ -71,11 +71,8 @@ public class UpdateUserCmd extends BaseCmd {
     @Parameter(name=ApiConstants.USERNAME, type=CommandType.STRING, description="Unique username")
     private String username;
 
-    @Parameter(name=ApiConstants.IS_PROPAGATE, type=CommandType.BOOLEAN, description="True if command is sent from another Region")
-    private Boolean isPropagate;
-    
     @Inject RegionService _regionService;
-    
+
     /////////////////////////////////////////////////////
     /////////////////// Accessors ///////////////////////
     /////////////////////////////////////////////////////
@@ -116,10 +113,6 @@ public class UpdateUserCmd extends BaseCmd {
         return username;
     }
 
-	public Boolean getIsPropagate() {
-		return isPropagate;
-	}
-    
     /////////////////////////////////////////////////////
     /////////////// API Implementation///////////////////
     /////////////////////////////////////////////////////
@@ -143,7 +136,7 @@ public class UpdateUserCmd extends BaseCmd {
     public void execute(){
         UserContext.current().setEventDetails("UserId: "+getId());
         UserAccount user = _regionService.updateUser(this);
-        
+
         if (user != null){
             UserResponse response = _responseGenerator.createUserResponse(user);
             response.setResponseName(getCommandName());

http://git-wip-us.apache.org/repos/asf/incubator-cloudstack/blob/1a2173f4/server/src/com/cloud/user/AccountManagerImpl.java
----------------------------------------------------------------------
diff --git a/server/src/com/cloud/user/AccountManagerImpl.java b/server/src/com/cloud/user/AccountManagerImpl.java
index a3f9505..069ed2b 100755
--- a/server/src/com/cloud/user/AccountManagerImpl.java
+++ b/server/src/com/cloud/user/AccountManagerImpl.java
@@ -762,8 +762,8 @@ public class AccountManagerImpl extends ManagerBase implements AccountManager, M
     @Override
     @DB
     @ActionEvent(eventType = EventTypes.EVENT_ACCOUNT_CREATE, eventDescription = "creating Account")
-    public UserAccount createUserAccount(String userName, String password, String firstName, String lastName, String email, String timezone, String accountName, short accountType, Long domainId, String networkDomain,
-            Map<String, String> details, String accountUUID, String userUUID, Integer regionId) {
+    public UserAccount createUserAccount(String userName, String password, String firstName, String lastName, String email, String timezone, String accountName, short accountType,
+                                         Long domainId, String networkDomain, Map<String, String> details) {
 
         if (accountName == null) {
             accountName = userName;
@@ -805,55 +805,30 @@ public class AccountManagerImpl extends ManagerBase implements AccountManager, M
             }
         }
 
-        if(regionId == null){
-            Transaction txn = Transaction.currentTxn();
-            txn.start();
-
-        	// create account
-        	AccountVO account = createAccount(accountName, accountType, domainId, networkDomain, details, UUID.randomUUID().toString(), _regionMgr.getId());
-        	long accountId = account.getId();
-
-        	// create the first user for the account
-        	UserVO user = createUser(accountId, userName, password, firstName, lastName, email, timezone);
-
-        	if (accountType == Account.ACCOUNT_TYPE_RESOURCE_DOMAIN_ADMIN) {
-        		// set registration token
-        		byte[] bytes = (domainId + accountName + userName + System.currentTimeMillis()).getBytes();
-        		String registrationToken = UUID.nameUUIDFromBytes(bytes).toString();
-        		user.setRegistrationToken(registrationToken);
-        	}
-        	txn.commit();
-        	//Propagate Add account to other Regions
-        	_regionMgr.propagateAddAccount(userName, password, firstName, lastName, email, timezone, accountName, accountType, domainId, 
-        			networkDomain, details, account.getUuid(), user.getUuid());
-        	//check success
-            return _userAccountDao.findById(user.getId());
-        } else {
-        	// Account is propagated from another Region
-
-        	Transaction txn = Transaction.currentTxn();
-            txn.start();
+        Transaction txn = Transaction.currentTxn();
+        txn.start();
 
-            // create account
-            AccountVO account = createAccount(accountName, accountType, domainId, networkDomain, details, accountUUID, regionId);
-            long accountId = account.getId();
+        // create account
+        AccountVO account = createAccount(accountName, accountType, domainId, networkDomain, details, UUID.randomUUID().toString(), _regionMgr.getId());
+        long accountId = account.getId();
 
-            // create the first user for the account
-            UserVO user = createUser(accountId, userName, password, firstName, lastName, email, timezone, userUUID, regionId);
+        // create the first user for the account
+        UserVO user = createUser(accountId, userName, password, firstName, lastName, email, timezone);
 
-            if (accountType == Account.ACCOUNT_TYPE_RESOURCE_DOMAIN_ADMIN) {
-                // set registration token
-                byte[] bytes = (domainId + accountName + userName + System.currentTimeMillis()).getBytes();
-                String registrationToken = UUID.nameUUIDFromBytes(bytes).toString();
-                user.setRegistrationToken(registrationToken);
-            }
-            txn.commit();
-            return _userAccountDao.findById(user.getId());
+        if (accountType == Account.ACCOUNT_TYPE_RESOURCE_DOMAIN_ADMIN) {
+            // set registration token
+            byte[] bytes = (domainId + accountName + userName + System.currentTimeMillis()).getBytes();
+            String registrationToken = UUID.nameUUIDFromBytes(bytes).toString();
+            user.setRegistrationToken(registrationToken);
         }
+        txn.commit();
+
+        //check success
+        return _userAccountDao.findById(user.getId());
     }
 
     @Override
-    public UserVO createUser(String userName, String password, String firstName, String lastName, String email, String timeZone, String accountName, Long domainId, String userUUID, Integer regionId) {
+    public UserVO createUser(String userName, String password, String firstName, String lastName, String email, String timeZone, String accountName, Long domainId) {
 
         // default domain to ROOT if not specified
         if (domainId == null) {
@@ -882,13 +857,7 @@ public class AccountManagerImpl extends ManagerBase implements AccountManager, M
             throw new CloudRuntimeException("The user " + userName + " already exists in domain " + domainId);
         }
         UserVO user = null;
-        if(regionId == null){
-        	user = createUser(account.getId(), userName, password, firstName, lastName, email, timeZone);
-        	//Propagate Add user to peer Regions
-        	_regionMgr.propagateAddUser(userName, password, firstName, lastName, email, timeZone, accountName, domain.getUuid(), user.getUuid());
-        } else {
-        	user = createUser(account.getId(), userName, password, firstName, lastName, email, timeZone, userUUID, regionId);
-        }
+        user = createUser(account.getId(), userName, password, firstName, lastName, email, timeZone);
         return user;
     }
 
@@ -974,7 +943,7 @@ public class AccountManagerImpl extends ManagerBase implements AccountManager, M
                 }
             }
             if (encodedPassword == null) {
-            	throw new CloudRuntimeException("Failed to encode password");
+                throw new CloudRuntimeException("Failed to encode password");
             }
             user.setPassword(encodedPassword);
         }
@@ -1296,7 +1265,7 @@ public class AccountManagerImpl extends ManagerBase implements AccountManager, M
         String newAccountName = cmd.getNewName();
         String networkDomain = cmd.getNetworkDomain();
         Map<String, String> details = cmd.getDetails();
-        
+
         boolean success = false;
         Account account = null;
         if (accountId != null) {
@@ -1748,7 +1717,7 @@ public class AccountManagerImpl extends ManagerBase implements AccountManager, M
         if (s_logger.isDebugEnabled()) {
             s_logger.debug("Creating user: " + userName + ", accountId: " + accountId + " timezone:" + timezone);
         }
-        
+
         String encodedPassword = null;
         for (UserAuthenticator  authenticator : _userAuthenticators) {
             encodedPassword = authenticator.encode(password);
@@ -1757,9 +1726,9 @@ public class AccountManagerImpl extends ManagerBase implements AccountManager, M
             }
         }
         if (encodedPassword == null) {
-        	throw new CloudRuntimeException("Failed to encode password");
+            throw new CloudRuntimeException("Failed to encode password");
         }
-        
+
         UserVO user = _userDao.persist(new UserVO(accountId, userName, encodedPassword, firstName, lastName, email, timezone, UUID.randomUUID().toString(), _regionMgr.getId()));
 
         return user;
@@ -1780,9 +1749,9 @@ public class AccountManagerImpl extends ManagerBase implements AccountManager, M
             }
         }
         if (encodedPassword == null) {
-        	throw new CloudRuntimeException("Failed to encode password");
+            throw new CloudRuntimeException("Failed to encode password");
         }
-        
+
         UserVO user = _userDao.persist(new UserVO(accountId, userName, encodedPassword, firstName, lastName, email, timezone, uuid, regionId));
 
         return user;
@@ -2013,7 +1982,7 @@ public class AccountManagerImpl extends ManagerBase implements AccountManager, M
 
     @Override @DB
     public String[] createApiKeyAndSecretKey(RegisterCmd cmd) {
-    	//Send keys to other Regions
+        //Send keys to other Regions
         Long userId = cmd.getId();
 
         User user = getUserIncludingRemoved(userId);
@@ -2242,7 +2211,7 @@ public class AccountManagerImpl extends ManagerBase implements AccountManager, M
         }
     }
 
-	@Override
+    @Override
     public void buildACLViewSearchBuilder(SearchBuilder<? extends ControlledViewEntity> sb, Long domainId,
             boolean isRecursive, List<Long> permittedAccounts, ListProjectResourcesCriteria listProjectResourcesCriteria) {
 

http://git-wip-us.apache.org/repos/asf/incubator-cloudstack/blob/1a2173f4/server/src/com/cloud/user/DomainManager.java
----------------------------------------------------------------------
diff --git a/server/src/com/cloud/user/DomainManager.java b/server/src/com/cloud/user/DomainManager.java
index af102e2..f268f6e 100644
--- a/server/src/com/cloud/user/DomainManager.java
+++ b/server/src/com/cloud/user/DomainManager.java
@@ -27,7 +27,7 @@ import com.cloud.domain.DomainVO;
 public interface DomainManager extends DomainService {
     Set<Long> getDomainChildrenIds(String parentDomainPath);
 
-    Domain createDomain(String name, Long parentId, Long ownerId, String networkDomain, String domainUUID, Integer regionId);
+    Domain createDomain(String name, Long parentId, Long ownerId, String networkDomain);
 
     Set<Long> getDomainParentIds(long domainId);
 

http://git-wip-us.apache.org/repos/asf/incubator-cloudstack/blob/1a2173f4/server/src/com/cloud/user/DomainManagerImpl.java
----------------------------------------------------------------------
diff --git a/server/src/com/cloud/user/DomainManagerImpl.java b/server/src/com/cloud/user/DomainManagerImpl.java
index 8ad9f5b..9f0ad53 100644
--- a/server/src/com/cloud/user/DomainManagerImpl.java
+++ b/server/src/com/cloud/user/DomainManagerImpl.java
@@ -118,7 +118,7 @@ public class DomainManagerImpl extends ManagerBase implements DomainManager, Dom
 
     @Override
     @ActionEvent(eventType = EventTypes.EVENT_DOMAIN_CREATE, eventDescription = "creating Domain")
-    public Domain createDomain(String name, Long parentId, String networkDomain, String domainUUID, Integer regionId) {
+    public Domain createDomain(String name, Long parentId, String networkDomain) {
         Account caller = UserContext.current().getCaller();
 
         if (parentId == null) {
@@ -136,13 +136,13 @@ public class DomainManagerImpl extends ManagerBase implements DomainManager, Dom
 
         _accountMgr.checkAccess(caller, parentDomain);
 
-        return createDomain(name, parentId, caller.getId(), networkDomain, domainUUID, regionId);
+        return createDomain(name, parentId, caller.getId(), networkDomain);
 
     }
 
     @Override
     @DB
-    public Domain createDomain(String name, Long parentId, Long ownerId, String networkDomain, String domainUUID, Integer regionId) {
+    public Domain createDomain(String name, Long parentId, Long ownerId, String networkDomain) {
         // Verify network domain
         if (networkDomain != null) {
             if (!NetUtils.verifyDomainName(networkDomain)) {
@@ -161,28 +161,13 @@ public class DomainManagerImpl extends ManagerBase implements DomainManager, Dom
             throw new InvalidParameterValueException("Domain with name " + name + " already exists for the parent id=" + parentId);
         }
 
-        if(regionId == null){
         Transaction txn = Transaction.currentTxn();
         txn.start();
 
-        	DomainVO domain = _domainDao.create(new DomainVO(name, ownerId, parentId, networkDomain, _regionMgr.getId()));
+        DomainVO domain = _domainDao.create(new DomainVO(name, ownerId, parentId, networkDomain, _regionMgr.getId()));
         _resourceCountDao.createResourceCounts(domain.getId(), ResourceLimit.ResourceOwnerType.Domain);
         txn.commit();
-        	//Propagate domain creation to peer Regions
-        	_regionMgr.propagateAddDomain(name, parentId, networkDomain, domain.getUuid());        	
-        	return domain;
-        } else {
-        	Transaction txn = Transaction.currentTxn();
-        	txn.start();
-
-        	DomainVO domain = _domainDao.create(new DomainVO(name, ownerId, parentId, networkDomain, domainUUID, regionId));
-        	_resourceCountDao.createResourceCounts(domain.getId(), ResourceLimit.ResourceOwnerType.Domain);
-
-        	txn.commit();
         return domain;
-        	
-        }
-        
     }
 
     @Override
@@ -485,8 +470,8 @@ public class DomainManagerImpl extends ManagerBase implements DomainManager, Dom
         // check if domain exists in the system
         DomainVO domain = _domainDao.findById(domainId);
         if (domain == null) {
-        	InvalidParameterValueException ex = new InvalidParameterValueException("Unable to find domain with specified domain id");
-        	ex.addProxyObject(domain, domainId, "domainId");            
+            InvalidParameterValueException ex = new InvalidParameterValueException("Unable to find domain with specified domain id");
+            ex.addProxyObject(domain, domainId, "domainId");
             throw ex;
         } else if (domain.getParent() == null && domainName != null) {
             // check if domain is ROOT domain - and deny to edit it with the new name
@@ -508,7 +493,7 @@ public class DomainManagerImpl extends ManagerBase implements DomainManager, Dom
             if (!domains.isEmpty() && !sameDomain) {
                 InvalidParameterValueException ex = new InvalidParameterValueException("Failed to update specified domain id with name '" + domainName + "' since it already exists in the system");
                 ex.addProxyObject(domain, domainId, "domainId");                
-            	throw ex;
+                throw ex;
             }
         }
 
@@ -566,5 +551,5 @@ public class DomainManagerImpl extends ManagerBase implements DomainManager, Dom
             _domainDao.update(dom.getId(), dom);
         }
     }
-    
+
 }

http://git-wip-us.apache.org/repos/asf/incubator-cloudstack/blob/1a2173f4/server/src/org/apache/cloudstack/region/RegionManager.java
----------------------------------------------------------------------
diff --git a/server/src/org/apache/cloudstack/region/RegionManager.java b/server/src/org/apache/cloudstack/region/RegionManager.java
index 56bdb9b..4cbd664 100644
--- a/server/src/org/apache/cloudstack/region/RegionManager.java
+++ b/server/src/org/apache/cloudstack/region/RegionManager.java
@@ -31,95 +31,49 @@ import com.cloud.user.Account;
 import com.cloud.user.UserAccount;
 
 public interface RegionManager {
-	
-	/**
-	 * Propagates Account details to peer Regions
-	 * @param userName
-	 * @param password
-	 * @param firstName
-	 * @param lastName
-	 * @param email
-	 * @param timezone
-	 * @param accountName
-	 * @param accountType
-	 * @param domainId
-	 * @param networkDomain
-	 * @param details
-	 * @param accountUUID
-	 * @param userUUID
-	 * @return
-	 */
-	public boolean propagateAddAccount(String userName, String password, String firstName, String lastName, String email, String timezone, String accountName, short accountType, Long domainId, String networkDomain,
-            Map<String, String> details, String accountUUID, String userUUID);
-	
-	/**
-	 * Returns the Id of local Region
-	 * @return
-	 */
-	public int getId();
-	
-	/**
-	 * Propagates User details to peer Regions
-	 * @param userName
-	 * @param password
-	 * @param firstName
-	 * @param lastName
-	 * @param email
-	 * @param timeZone
-	 * @param accountName
-	 * @param domainUUId
-	 * @param userUUID
-	 */
-	public void propagateAddUser(String userName, String password,
-			String firstName, String lastName, String email, String timeZone,
-			String accountName, String domainUUId, String userUUID);
-	
-	/**
-	 * Propagates Domain details to peer Regions
-	 * @param name
-	 * @param parentId
-	 * @param networkDomain
-	 * @param uuid
-	 */
-	public void propagateAddDomain(String name, Long parentId, String networkDomain, String uuid);
-	
-	
-	/**
-	 * Adds a peer Region to the local Region
-	 * @param id
-	 * @param name 
-	 * @param endPoint
-	 * @param apiKey
-	 * @param secretKey
-	 * @return Returns added Region object
-	 */
-	Region addRegion(int id, String name, String endPoint, String apiKey, String secretKey);
-	
-	/**
-	 * Update details of the Region with specified Id
-	 * @param id
-	 * @param name
-	 * @param endPoint
-	 * 
-	 * @param apiKey
-	 * @param secretKey
-	 * @return Returns update Region object
-	 */
-	Region updateRegion(int id, String name, String endPoint, String apiKey, String secretKey);
-	
-	/**
-	 * @param id
-	 * @return True if region is successfully removed
-	 */
-	boolean removeRegion(int id);
-	
-	/** List all Regions or by Id/Name
-	 * @param id
-	 * @param name
-	 * @return List of Regions
-	 */
-	List<RegionVO> listRegions(Integer id, String name);
-	
+
+    /**
+     * Returns the Id of local Region
+     * @return
+     */
+    public int getId();
+
+    /**
+     * Adds a peer Region to the local Region
+     * @param id
+     * @param name
+     * @param endPoint
+     * @param apiKey
+     * @param secretKey
+     * @return Returns added Region object
+     */
+    Region addRegion(int id, String name, String endPoint, String apiKey, String secretKey);
+
+    /**
+     * Update details of the Region with specified Id
+     * @param id
+     * @param name
+     * @param endPoint
+     *
+     * @param apiKey
+     * @param secretKey
+     * @return Returns update Region object
+     */
+    Region updateRegion(int id, String name, String endPoint, String apiKey, String secretKey);
+
+    /**
+     * @param id
+     * @return True if region is successfully removed
+     */
+    boolean removeRegion(int id);
+
+    /** List all Regions or by Id/Name
+     * @param id
+     * @param name
+     * @return List of Regions
+     */
+    List<RegionVO> listRegions(Integer id, String name);
+
     /**
      * Deletes a user by userId and propagates the change to peer Regions
      *
@@ -128,8 +82,8 @@ public interface RegionManager {
      *
      * @return true if delete was successful, false otherwise
      */
-	boolean deleteUserAccount(long accountId);
-	
+    boolean deleteUserAccount(long accountId);
+
     /**
      * Updates an account
      * isPopagate falg is set to true if sent from peer Region 
@@ -139,19 +93,19 @@ public interface RegionManager {
      * @return updated account object
      */
     Account updateAccount(UpdateAccountCmd cmd);
-    
-	/**
-	 * Disables an account by accountName and domainId or accountId
-	 * @param accountName
-	 * @param domainId
-	 * @param id
-	 * @param lockRequested
-	 * @return
-	 * @throws ConcurrentOperationException
-	 * @throws ResourceUnavailableException
-	 */
-	Account disableAccount(String accountName, Long domainId, Long id, Boolean lockRequested) throws ConcurrentOperationException, ResourceUnavailableException;
-	
+
+    /**
+     * Disables an account by accountName and domainId or accountId
+     * @param accountName
+     * @param domainId
+     * @param id
+     * @param lockRequested
+     * @return
+     * @throws ConcurrentOperationException
+     * @throws ResourceUnavailableException
+     */
+    Account disableAccount(String accountName, Long domainId, Long id, Boolean lockRequested) throws ConcurrentOperationException, ResourceUnavailableException;
+
     /**
      * Enables an account by accountId
      *
@@ -163,14 +117,14 @@ public interface RegionManager {
      * @return account object
      */
     Account enableAccount(String accountName, Long domainId, Long accountId); 	
-    
+
     /**
      * Deletes user by Id
      * @param deleteUserCmd
      * @return
      */
     boolean deleteUser(DeleteUserCmd deleteUserCmd);
-    
+
     /**
      * update an existing domain
      * 
@@ -178,24 +132,24 @@ public interface RegionManager {
      *            - the command containing domainId and new domainName
      * @return Domain object if the command succeeded
      */
-	Domain updateDomain(UpdateDomainCmd updateDomainCmd);    
-    
-	/**
-	 * Deletes domain by Id
-	 * @param id
-	 * @param cleanup
-	 * @return true if delete was successful, false otherwise
-	 */
-	boolean deleteDomain(Long id, Boolean cleanup);
-	
+    Domain updateDomain(UpdateDomainCmd updateDomainCmd);
+
+    /**
+     * Deletes domain by Id
+     * @param id
+     * @param cleanup
+     * @return true if delete was successful, false otherwise
+     */
+    boolean deleteDomain(Long id, Boolean cleanup);
+
     /**
      * Update a user by userId
      *
      * @param userId
      * @return UserAccount object
      */
-	UserAccount updateUser(UpdateUserCmd updateUserCmd);
-	
+    UserAccount updateUser(UpdateUserCmd updateUserCmd);
+
     /**
      * Disables a user by userId
      *
@@ -203,8 +157,8 @@ public interface RegionManager {
      *            - the userId
      * @return UserAccount object
      */	
-	UserAccount disableUser(Long id);
-	
+    UserAccount disableUser(Long id);
+
     /**
      * Enables a user
      *


Mime
View raw message