Package org.apache.cloudstack.config

Examples of org.apache.cloudstack.config.Configuration


                    Account rsUserAccount = _accountSvc.getActiveAccountByName(resourceAdminAccount.getAccountName() + "-user", resourceAdminAccount.getDomainId());

                    List<UserVO> users = _userDao.listByAccount(rsUserAccount.getId());
                    User rsUser = users.get(0);

                    Configuration config = _configDao.findByName("endpointe.url");

                    StringBuffer sb = new StringBuffer();
                    sb.append("{ \"registration_info\" : { \"endpoint_url\" : \"" + encodeParam(config.getValue()) + "\", ");
                    sb.append("\"domain_id\" : \"" + resourceAdminAccount.getDomainId() + "\", ");
                    sb.append("\"admin_account\" : \"" + encodeParam(resourceAdminUser.getUsername()) + "\", ");
                    sb.append("\"admin_account_api_key\" : \"" + resourceAdminUser.getApiKey() + "\", ");
                    sb.append("\"admin_account_secret_key\" : \"" + resourceAdminUser.getSecretKey() + "\", ");
                    sb.append("\"user_account\" : \"" + encodeParam(rsUser.getUsername()) + "\", ");
View Full Code Here


        return Account.ACCOUNT_ID_SYSTEM;
    }

    @Override
    public void execute() {
        Configuration cfg = _configService.updateConfiguration(this);
        if (cfg != null) {
            ConfigurationResponse response = _responseGenerator.createConfigurationResponse(cfg);
            response.setResponseName(getCommandName());
            if (getZoneId() != null) {
                response.setScope("zone");
View Full Code Here

    }

    @Test
    public void testCreateSuccess() {

        Configuration cfg = Mockito.mock(Configuration.class);
        updateCfgCmd._configService = configService;
        updateCfgCmd._responseGenerator = responseGenerator;

        try {
            Mockito.when(configService.updateConfiguration(updateCfgCmd)).thenReturn(cfg);
View Full Code Here

    }

    @Test
    public void testCreateSuccess() {

        Configuration cfg = Mockito.mock(Configuration.class);
        listCfgsByCmd._mgr = mgr;
        listCfgsByCmd._responseGenerator = responseGenerator;

        List<Configuration> configList = new ArrayList<Configuration>();
        configList.add(cfg);
View Full Code Here


    @Test
    public void testCreateSuccess() {

        Configuration cfg = Mockito.mock(Configuration.class);
        updateCfgCmd._configService = configService;
        updateCfgCmd._responseGenerator = responseGenerator;

        try {
            Mockito.when(
View Full Code Here

    }

    @Test
    public void testCreateSuccess() {

        Configuration cfg = Mockito.mock(Configuration.class);
        listCfgsByCmd._mgr = mgr;
        listCfgsByCmd._responseGenerator = responseGenerator;


View Full Code Here

        return Account.ACCOUNT_ID_SYSTEM;
    }

    @Override
    public void execute(){
        Configuration cfg = _configService.updateConfiguration(this);
        if (cfg != null) {
            ConfigurationResponse response = _responseGenerator.createConfigurationResponse(cfg);
            response.setResponseName(getCommandName());
            if(getZoneId() != null) {
                response.setScope("zone");
View Full Code Here

                    Account rsUserAccount = _accountSvc.getActiveAccountByName(resourceAdminAccount.getAccountName()+"-user", resourceAdminAccount.getDomainId());

                    List<UserVO> users =  _userDao.listByAccount(rsUserAccount.getId());
                    User rsUser = users.get(0);

                    Configuration config = _configDao.findByName("endpointe.url");

                    StringBuffer sb = new StringBuffer();
                    sb.append("{ \"registration_info\" : { \"endpoint_url\" : \""+encodeParam(config.getValue())+"\", ");
                    sb.append("\"domain_id\" : \""+resourceAdminAccount.getDomainId()+"\", ");
                    sb.append("\"admin_account\" : \""+encodeParam(resourceAdminUser.getUsername())+"\", ");
                    sb.append("\"admin_account_api_key\" : \""+resourceAdminUser.getApiKey()+"\", ");
                    sb.append("\"admin_account_secret_key\" : \""+resourceAdminUser.getSecretKey()+"\", ");
                    sb.append("\"user_account\" : \""+encodeParam(rsUser.getUsername())+"\", ");
View Full Code Here

TOP

Related Classes of org.apache.cloudstack.config.Configuration

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.