You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@stratos.apache.org by ni...@apache.org on 2013/08/06 07:59:19 UTC

[1/2] git commit: removing deprecated createKeyPairFromPublicKey operation from CC service

Updated Branches:
  refs/heads/master aa931e17b -> 8f43b4af8


removing deprecated createKeyPairFromPublicKey operation from CC service


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

Branch: refs/heads/master
Commit: bdd6c4afce268afa483b84c1eedfd4dc6a349390
Parents: 9810013
Author: Nirmal Fernando <ni...@apache.org>
Authored: Tue Aug 6 11:26:50 2013 +0530
Committer: Nirmal Fernando <ni...@apache.org>
Committed: Tue Aug 6 11:26:50 2013 +0530

----------------------------------------------------------------------
 .../impl/CloudControllerServiceImpl.java        |  28 -----
 .../interfaces/CloudControllerService.java      | 111 +++++++------------
 2 files changed, 42 insertions(+), 97 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/incubator-stratos/blob/bdd6c4af/components/org.apache.stratos.cloud.controller/src/main/java/org/apache/stratos/cloud/controller/impl/CloudControllerServiceImpl.java
----------------------------------------------------------------------
diff --git a/components/org.apache.stratos.cloud.controller/src/main/java/org/apache/stratos/cloud/controller/impl/CloudControllerServiceImpl.java b/components/org.apache.stratos.cloud.controller/src/main/java/org/apache/stratos/cloud/controller/impl/CloudControllerServiceImpl.java
index 4d64b8b..1386372 100644
--- a/components/org.apache.stratos.cloud.controller/src/main/java/org/apache/stratos/cloud/controller/impl/CloudControllerServiceImpl.java
+++ b/components/org.apache.stratos.cloud.controller/src/main/java/org/apache/stratos/cloud/controller/impl/CloudControllerServiceImpl.java
@@ -1041,34 +1041,6 @@ public class CloudControllerServiceImpl implements CloudControllerService {
 		return cartridgeTypes;
 	}
 
-	@Override
-	public boolean createKeyPairFromPublicKey(String cartridgeType, String keyPairName,
-	                                          String publicKey) {
-
-		Cartridge cartridge = FasterLookUpDataHolder.getInstance().getCartridge(cartridgeType);
-
-		if (cartridge == null) {
-			String msg = "Invalid Cartridge type specified : " + cartridgeType;
-			log.fatal(msg);
-			throw new CloudControllerException(msg);
-		}
-
-		for (IaasProvider iaas : cartridge.getIaases()) {
-			String region = ComputeServiceBuilderUtil.extractRegion(iaas);
-
-			if (region == null) {
-				String msg =
-				             "Cannot find a region to create the key pair. Please add a property called 'region' under IaaS '" +
-				                     iaas.getType() + "' of Cartridge - " + cartridgeType;
-				log.fatal(msg);
-				throw new CloudControllerException(msg);
-			}
-
-			return iaas.getIaas().createKeyPairFromPublicKey(iaas, region, keyPairName, publicKey);
-		}
-
-		return false;
-	}
 
 	private String checkSubDomain(String subDomainName) {
 		// if sub domain is null, we assume it as default one.

http://git-wip-us.apache.org/repos/asf/incubator-stratos/blob/bdd6c4af/components/org.apache.stratos.cloud.controller/src/main/java/org/apache/stratos/cloud/controller/interfaces/CloudControllerService.java
----------------------------------------------------------------------
diff --git a/components/org.apache.stratos.cloud.controller/src/main/java/org/apache/stratos/cloud/controller/interfaces/CloudControllerService.java b/components/org.apache.stratos.cloud.controller/src/main/java/org/apache/stratos/cloud/controller/interfaces/CloudControllerService.java
index 15cf663..d444644 100644
--- a/components/org.apache.stratos.cloud.controller/src/main/java/org/apache/stratos/cloud/controller/interfaces/CloudControllerService.java
+++ b/components/org.apache.stratos.cloud.controller/src/main/java/org/apache/stratos/cloud/controller/interfaces/CloudControllerService.java
@@ -31,70 +31,8 @@ import org.apache.stratos.cloud.controller.exception.UnregisteredCartridgeExcept
  */
 public interface CloudControllerService {
 
-    /**
-     * Creates a key pair in all IaaSes that are configured for the given cartridge,
-     * having the given name and public key.
-     * 
-     * <p/>
-     * <h4>Supported Formats</h4>
-     * <ul>
-     * <li>OpenSSH public key format (e.g., the format in ~/.ssh/authorized_keys)</li>
-     * <li>Base64 encoded DER format</li>
-     * <li>SSH public key file format as specified in RFC4716</li>
-     * </ul>
-     * DSA keys are not supported. Make sure your key generator is set up to create RSA keys.
-     * <p/>
-     * Supported lengths: 1024, 2048, and 4096.
-     * <p/>
-     * 
-     * @param cartridgeType
-     *            type of the cartridge. Note this cartridge type should be already
-     *            registered one.
-     * @param keyPairName
-     *            name of the key pair which is going to get created in IaaSes.
-     * @param publicKey
-     *            The public key.
-     * 
-     */
-	@Deprecated
-    public boolean createKeyPairFromPublicKey(String cartridgeType, String keyPairName,
-        String publicKey);
 
     /**
-     * This method will return the information regarding the given cartridge, if present.
-     * Else this will return <code>null</code>.
-     * 
-     * @param cartridgeType
-     *            type of the cartridge.
-     * @return {@link org.apache.stratos.cloud.controller.util.CartridgeInfo} of the given cartridge type or <code>null</code>.
-     * @throws UnregisteredCartridgeException if there is no registered cartridge with this type.
-     */
-    public CartridgeInfo getCartridgeInfo(String cartridgeType) throws UnregisteredCartridgeException;
-
-    /**
-     * Calling this method will result in returning the pending instances
-     * count of a particular domain.
-     * 
-     * @param domainName
-     *            service cluster domain
-     * @param sudDomainName
-     *            service clustering sub domain of the instance to be started up.
-     *            If this is null, the default value will be used. Default value is
-     *            {@link Constants}.DEFAULT_SUB_DOMAIN.
-     * @return number of pending instances for this domain. If no instances of this
-     *         domain is present, this will return zero.
-     */
-    public int getPendingInstanceCount(String domainName, String subDomainName);
-
-    /**
-     * Calling this method will result in returning the types of {@link org.apache.stratos.cloud.controller.util.Cartridge}s
-     * registered in Cloud Controller.
-     * 
-     * @return String array containing types of registered {@link org.apache.stratos.cloud.controller.util.Cartridge}s.
-     */
-    public String[] getRegisteredCartridges();
-    
-    /**
      * <p>
      * Registers the details of a newly created service cluster. This will override an already
      * present service cluster, if there is any. A service cluster is uniquely identified by its
@@ -140,34 +78,35 @@ public interface CloudControllerService {
      * @return public IP which is associated with the newly started instance.
      */
     public String startInstance(String domainName, String subDomainName);
-
+    
     /**
-     * Calling this method will result in termination of all instances belong
+     * Calling this method will result in termination of an instance which is belong
      * to the provided service domain and sub domain.
      * 
      * @param domainName
      *            service domain of the instance to be terminated.
      * @param sudDomainName
-     *            service clustering sub domain of the instances to be terminated.
+     *            service clustering sub domain of the instance to be terminated.
      *            If this is null, the default value will be used. Default value is
      *            {@link Constants}.DEFAULT_SUB_DOMAIN.
      * @return whether an instance terminated successfully or not.
      */
-    public boolean terminateAllInstances(String domainName, String subDomainName);
+    public boolean terminateInstance(String domainName, String subDomainName);
 
     /**
-     * Calling this method will result in termination of an instance which is belong
+     * Calling this method will result in termination of all instances belong
      * to the provided service domain and sub domain.
      * 
      * @param domainName
      *            service domain of the instance to be terminated.
      * @param sudDomainName
-     *            service clustering sub domain of the instance to be terminated.
+     *            service clustering sub domain of the instances to be terminated.
      *            If this is null, the default value will be used. Default value is
      *            {@link Constants}.DEFAULT_SUB_DOMAIN.
      * @return whether an instance terminated successfully or not.
      */
-    public boolean terminateInstance(String domainName, String subDomainName);
+    public boolean terminateAllInstances(String domainName, String subDomainName);
+
     
     /**
      * Calling this method will result in termination of the lastly spawned instance which is
@@ -191,5 +130,39 @@ public interface CloudControllerService {
      * @throws org.apache.stratos.cloud.controller.exception.UnregisteredServiceException if the service cluster requested is not a registered one.
      */
     public boolean unregisterService(String domain, String subDomain) throws UnregisteredServiceException;
+    
+    /**
+     * This method will return the information regarding the given cartridge, if present.
+     * Else this will return <code>null</code>.
+     * 
+     * @param cartridgeType
+     *            type of the cartridge.
+     * @return {@link org.apache.stratos.cloud.controller.util.CartridgeInfo} of the given cartridge type or <code>null</code>.
+     * @throws UnregisteredCartridgeException if there is no registered cartridge with this type.
+     */
+    public CartridgeInfo getCartridgeInfo(String cartridgeType) throws UnregisteredCartridgeException;
+
+    /**
+     * Calling this method will result in returning the pending instances
+     * count of a particular domain.
+     * 
+     * @param domainName
+     *            service cluster domain
+     * @param sudDomainName
+     *            service clustering sub domain of the instance to be started up.
+     *            If this is null, the default value will be used. Default value is
+     *            {@link Constants}.DEFAULT_SUB_DOMAIN.
+     * @return number of pending instances for this domain. If no instances of this
+     *         domain is present, this will return zero.
+     */
+    public int getPendingInstanceCount(String domainName, String subDomainName);
+
+    /**
+     * Calling this method will result in returning the types of {@link org.apache.stratos.cloud.controller.util.Cartridge}s
+     * registered in Cloud Controller.
+     * 
+     * @return String array containing types of registered {@link org.apache.stratos.cloud.controller.util.Cartridge}s.
+     */
+    public String[] getRegisteredCartridges();
 
 }


[2/2] git commit: Merge branch 'master' of https://git-wip-us.apache.org/repos/asf/incubator-stratos

Posted by ni...@apache.org.
Merge branch 'master' of https://git-wip-us.apache.org/repos/asf/incubator-stratos


Project: http://git-wip-us.apache.org/repos/asf/incubator-stratos/repo
Commit: http://git-wip-us.apache.org/repos/asf/incubator-stratos/commit/8f43b4af
Tree: http://git-wip-us.apache.org/repos/asf/incubator-stratos/tree/8f43b4af
Diff: http://git-wip-us.apache.org/repos/asf/incubator-stratos/diff/8f43b4af

Branch: refs/heads/master
Commit: 8f43b4af88776092bd372fc6faa95e94579bf938
Parents: bdd6c4a aa931e1
Author: Nirmal Fernando <ni...@apache.org>
Authored: Tue Aug 6 11:27:51 2013 +0530
Committer: Nirmal Fernando <ni...@apache.org>
Committed: Tue Aug 6 11:27:51 2013 +0530

----------------------------------------------------------------------
 .../billing-script/stratos_mysql.sql            | 121 +++++++++++++++++++
 .../modules/distribution/src/assembly/bin.xml   |  36 ++++--
 .../payload/user-data/ssl-cert-snakeoil.key     |  16 +++
 .../payload/user-data/ssl-cert-snakeoil.pem     |  14 +++
 4 files changed, 174 insertions(+), 13 deletions(-)
----------------------------------------------------------------------