merging 4.8 -> master

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

Branch: refs/heads/master
Commit: 20f779298d0fb6a18bf4fcf89371573e5dca9752
Parents: ecac28b 744f9d5
Author: Will Stevens <[email protected]>
Authored: Fri May 27 15:19:33 2016 -0400
Committer: Will Stevens <[email protected]>
Committed: Fri May 27 15:19:33 2016 -0400

----------------------------------------------------------------------
 api/src/com/cloud/user/DomainService.java       |  10 +
 debian/control                                  |   4 +-
 server/src/com/cloud/api/ApiServer.java         |  16 +-
 .../auth/DefaultLoginAPIAuthenticatorCmd.java   |  13 +
 .../com/cloud/api/query/QueryManagerImpl.java   |   4 +-
 .../template/HypervisorTemplateAdapter.java     |   2 +-
 .../src/com/cloud/user/DomainManagerImpl.java   |  20 ++
 .../template/HypervisorTemplateAdapterTest.java | 285 +++++++++++++++++++
 .../com/cloud/user/DomainManagerImplTest.java   | 137 +++++++++
 .../com/cloud/user/MockDomainManagerImpl.java   |   5 +
 test/integration/component/test_templates.py    |  76 +++++
 test/integration/smoke/test_login.py            | 145 ++++++++++
 12 files changed, 701 insertions(+), 16 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/cloudstack/blob/20f77929/debian/control
----------------------------------------------------------------------
diff --cc debian/control
index 6452c03,42cff9d..8d40059
--- a/debian/control
+++ b/debian/control
@@@ -15,14 -15,14 +15,14 @@@ Description: A common package which con
  
  Package: cloudstack-management
  Architecture: all
- Depends: ${misc:Depends}, ${python:Depends}, cloudstack-common (= 
${source:Version}), tomcat6 | tomcat7, sudo, jsvc, python-mysql.connector, 
libmysql-java, augeas-tools, mysql-client, adduser, bzip2, ipmitool
 -Depends: ${misc:Depends}, ${python:Depends}, cloudstack-common (= 
${source:Version}), tomcat6, sudo, jsvc, python-mysqldb, libmysql-java, 
augeas-tools, mysql-client, adduser, bzip2, lsb-release
++Depends: ${misc:Depends}, ${python:Depends}, cloudstack-common (= 
${source:Version}), tomcat6 | tomcat7, sudo, jsvc, python-mysql.connector, 
libmysql-java, augeas-tools, mysql-client, adduser, bzip2, ipmitool, lsb-release
  Conflicts: cloud-server, cloud-client, cloud-client-ui
  Description: CloudStack server library
   The CloudStack management server
  
  Package: cloudstack-agent
  Architecture: all
- Depends: ${misc:Depends}, ${python:Depends}, openjdk-8-jre-headless | 
openjdk-7-jre-headless, cloudstack-common (= ${source:Version}), lsb-base (>= 
4.0), libcommons-daemon-java, openssh-client, qemu-kvm (>= 1.0), libvirt-bin 
(>= 0.9.8), uuid-runtime, iproute, ebtables, vlan, jsvc, ipset, python-libvirt, 
ethtool, iptables
 -Depends: ${misc:Depends}, ${python:Depends}, openjdk-8-jre-headless | 
openjdk-7-jre-headless, cloudstack-common (= ${source:Version}), lsb-base (>= 
4.0), libcommons-daemon-java, openssh-client, qemu-kvm (>= 1.0), libvirt-bin 
(>= 0.9.8), uuid-runtime, iproute, ebtables, vlan, jsvc, ipset, python-libvirt, 
ethtool, iptables, perl-modules, lsb-release
++Depends: ${misc:Depends}, ${python:Depends}, openjdk-8-jre-headless | 
openjdk-7-jre-headless, cloudstack-common (= ${source:Version}), lsb-base (>= 
4.0), libcommons-daemon-java, openssh-client, qemu-kvm (>= 1.0), libvirt-bin 
(>= 0.9.8), uuid-runtime, iproute, ebtables, vlan, jsvc, ipset, python-libvirt, 
ethtool, iptables, lsb-release
  Conflicts: cloud-agent, cloud-agent-libs, cloud-agent-deps, 
cloud-agent-scripts
  Description: CloudStack agent
   The CloudStack agent is in charge of managing shared computing resources in

http://git-wip-us.apache.org/repos/asf/cloudstack/blob/20f77929/server/src/com/cloud/api/ApiServer.java
----------------------------------------------------------------------
diff --cc server/src/com/cloud/api/ApiServer.java
index 666aedd,689ae9c..9c296cb
--- a/server/src/com/cloud/api/ApiServer.java
+++ b/server/src/com/cloud/api/ApiServer.java
@@@ -1003,20 -993,14 +1003,14 @@@ public class ApiServer extends ManagerB
              final Map<String, Object[]> requestParameters) throws 
CloudAuthenticationException {
          // We will always use domainId first. If that does not exist, we will 
use domain name. If THAT doesn't exist
          // we will default to ROOT
-         if (domainId == null) {
-             if (domainPath == null || domainPath.trim().length() == 0) {
-                 domainId = Domain.ROOT_DOMAIN;
-             } else {
-                 final Domain domainObj = 
domainMgr.findDomainByPath(domainPath);
-                 if (domainObj != null) {
-                     domainId = domainObj.getId();
-                 } else { // if an unknown path is passed in, fail the login 
call
-                     throw new CloudAuthenticationException("Unable to find 
the domain from the path " + domainPath);
-                 }
-             }
+         final Domain userDomain = _domainMgr.findDomainByIdOrPath(domainId, 
domainPath);
+         if (userDomain == null || userDomain.getId() < 1L) {
+             throw new CloudAuthenticationException("Unable to find the domain 
from the path " + domainPath);
+         } else {
+             domainId = userDomain.getId();
          }
  
 -        final UserAccount userAcct = _accountMgr.authenticateUser(username, 
password, domainId, loginIpAddress, requestParameters);
 +        final UserAccount userAcct = accountMgr.authenticateUser(username, 
password, domainId, loginIpAddress, requestParameters);
          if (userAcct != null) {
              final String timezone = userAcct.getTimezone();
              float offsetInHrs = 0f;

http://git-wip-us.apache.org/repos/asf/cloudstack/blob/20f77929/server/src/com/cloud/api/query/QueryManagerImpl.java
----------------------------------------------------------------------

http://git-wip-us.apache.org/repos/asf/cloudstack/blob/20f77929/server/src/com/cloud/user/DomainManagerImpl.java
----------------------------------------------------------------------

Reply via email to