Package org.apache.cloudstack.network.dao

Examples of org.apache.cloudstack.network.dao.SspCredentialVO


        }else{
            provider_found = true;
        }

        if(physicalNetworkId != null && provider_found){
            SspCredentialVO credential = _sspCredentialDao.findByZone(dataCenterId);
            List<HostVO> hosts = _resourceMgr.listAllHostsInOneZoneByType(Host.Type.L2Networking, dataCenterId);
            for(HostVO host : hosts){
                assert(credential != null);
                _hostDao.loadDetails(host);
                if("v1Api".equals(host.getDetail("sspHost"))){
                    clients.add(new SspClient(host.getDetail("url"), credential.getUsername(), credential.getPassword()));
                }
            }
        }
        if(clients.size()==0){
            String global_apiUrl = _configDao.getValueAndInitIfNotExist("ssp.url", "Network", null);
View Full Code Here


        if(!client.login()){
            throw new CloudRuntimeException("Ssp login failed.");
        }

        long zoneId = cmd.getZoneId();
        SspCredentialVO credential = _sspCredentialDao.findByZone(zoneId);
        if(credential==null){
            if(cmd.getUsername()==null || cmd.getPassword()==null){
                throw new InvalidParameterValueException("Initial credential required for zone: " + zoneId);
            }
            credential = new SspCredentialVO();
            credential.setZoneId(zoneId);
            credential.setUsername(cmd.getUsername());
            credential.setPassword(cmd.getPassword());
            _sspCredentialDao.persist(credential);
        }else{
            if(cmd.getUsername()!=null || cmd.getPassword()!=null){
                s_logger.warn("Tenant credential already configured for zone:"+zoneId);
            }
View Full Code Here

        } else {
            provider_found = true;
        }

        if (physicalNetworkId != null && provider_found) {
            SspCredentialVO credential = _sspCredentialDao.findByZone(dataCenterId);
            List<HostVO> hosts = _resourceMgr.listAllHostsInOneZoneByType(Host.Type.L2Networking, dataCenterId);
            for (HostVO host : hosts) {
                assert (credential != null);
                _hostDao.loadDetails(host);
                if ("v1Api".equals(host.getDetail("sspHost"))) {
                    clients.add(new SspClient(host.getDetail("url"), credential.getUsername(), credential.getPassword()));
                }
            }
        }
        if (clients.size() == 0) {
            String global_apiUrl = _configDao.getValueAndInitIfNotExist("ssp.url", "Network", null);
View Full Code Here

        if (!client.login()) {
            throw new CloudRuntimeException("Ssp login failed.");
        }

        long zoneId = cmd.getZoneId();
        SspCredentialVO credential = _sspCredentialDao.findByZone(zoneId);
        if (credential == null) {
            if (cmd.getUsername() == null || cmd.getPassword() == null) {
                throw new InvalidParameterValueException("Initial credential required for zone: " + zoneId);
            }
            credential = new SspCredentialVO();
            credential.setZoneId(zoneId);
            credential.setUsername(cmd.getUsername());
            credential.setPassword(cmd.getPassword());
            _sspCredentialDao.persist(credential);
        } else {
            if (cmd.getUsername() != null || cmd.getPassword() != null) {
                s_logger.warn("Tenant credential already configured for zone:" + zoneId);
            }
View Full Code Here

        }else{
            provider_found = true;
        }

        if(physicalNetworkId != null && provider_found){
            SspCredentialVO credential = _sspCredentialDao.findByZone(dataCenterId);
            List<HostVO> hosts = _resourceMgr.listAllHostsInOneZoneByType(Host.Type.L2Networking, dataCenterId);
            for(HostVO host : hosts){
                assert(credential != null);
                _hostDao.loadDetails(host);
                if("v1Api".equals(host.getDetail("sspHost"))){
                    clients.add(new SspClient(host.getDetail("url"), credential.getUsername(), credential.getPassword()));
                }
            }
        }
        if(clients.size()==0){
            String global_apiUrl = _configDao.getValueAndInitIfNotExist("ssp.url", "Network", null);
View Full Code Here

        if(!client.login()){
            throw new CloudRuntimeException("Ssp login failed.");
        }

        long zoneId = cmd.getZoneId();
        SspCredentialVO credential = _sspCredentialDao.findByZone(zoneId);
        if(credential==null){
            if(cmd.getUsername()==null || cmd.getPassword()==null){
                throw new InvalidParameterValueException("Initial credential required for zone: " + zoneId);
            }
            credential = new SspCredentialVO();
            credential.setZoneId(zoneId);
            credential.setUsername(cmd.getUsername());
            credential.setPassword(cmd.getPassword());
            _sspCredentialDao.persist(credential);
        }else{
            if(cmd.getUsername()!=null || cmd.getPassword()!=null){
                s_logger.warn("Tenant credential already configured for zone:"+zoneId);
            }
View Full Code Here

TOP

Related Classes of org.apache.cloudstack.network.dao.SspCredentialVO

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.