Re: [GitHub] cloudstack pull request: Add all tests in /test/integration/smoke ...

2015-10-13 Thread Sanjeev N
Hi,

travis/script.sh uses following nose command to pick the tests.
nosetests --with-xunit --xunit-file=integration-test-results/$suite.xml
--with-marvin --marvin-config=setup/dev/advanced.cfg
test/integration/$suite.py -s -a tags=advanced,required_hardware=false
--zone=Sandbox-simulator --hypervisor=simulator || true ;

CI is running on advanced zone and it is picking the tests that are tagged
for running on simulator.  That is the reason we don't see all tests
running since some of them require hardware to run.

PR looks good. LTGM !!

@pvr9711, we don't need to add .py at the end.

Thanks,
Sanjeev

On Tue, Oct 13, 2015 at 11:01 AM, pvr9711  wrote:

> Github user pvr9711 commented on the pull request:
>
> https://github.com/apache/cloudstack/pull/920#issuecomment-147607738
>
> Following are the tests that run on Simulator basic and adv -
> separately, please add ".py" to the end.
> Simulator Basic -
> integration.smoke.test_affinity_groups
> integration.smoke.test_deploy_vms_with_varied_deploymentplanners
> integration.smoke.test_disk_offerings
> integration.smoke.test_global_settings
> integration.smoke.test_iso
> integration.smoke.test_multipleips_per_nic
> integration.smoke.test_over_provisioning
> integration.smoke.test_portable_publicip
> integration.smoke.test_primary_storage
> integration.smoke.test_reset_vm_on_reboot
> integration.smoke.test_scale_vm
> integration.smoke.test_secondary_storage
> integration.smoke.test_service_offerings
> integration.smoke.test_ssvm
> integration.smoke.test_templates
> integration.smoke.test_vm_life_cycle
> integration.smoke.test_volumes
>
> Simulator Adv -
> integration.smoke.test_affinity_groups
> integration.smoke.test_deploy_vms_with_varied_deploymentplanners
> integration.smoke.test_disk_offerings
> integration.smoke.test_global_settings
> integration.smoke.test_guest_vlan_range
> integration.smoke.test_iso
> integration.smoke.test_multipleips_per_nic
> integration.smoke.test_network
> integration.smoke.test_nic_adapter_type
> integration.smoke.test_non_contigiousvlan
> integration.smoke.test_over_provisioning
> integration.smoke.test_portable_publicip
> integration.smoke.test_primary_storage
> integration.smoke.test_privategw_acl
> integration.smoke.test_public_ip_range
> integration.smoke.test_pvlan
> integration.smoke.test_reset_vm_on_reboot
> integration.smoke.test_resource_detail
> integration.smoke.test_routers
> integration.smoke.test_scale_vm
> integration.smoke.test_secondary_storage
> integration.smoke.test_service_offerings
> integration.smoke.test_ssvm
> integration.smoke.test_templates
> integration.smoke.test_vm_life_cycle
> integration.smoke.test_volumes
> ntegration.smoke.test_vpc_vpn
>
>
>
>
>
> ---
> If your project is set up for it, you can reply to this email and have your
> reply appear on GitHub as well. If your project does not have this feature
> enabled and wishes so, or if the feature is enabled but not working, please
> contact infrastructure at infrastruct...@apache.org or file a JIRA ticket
> with INFRA.
> ---
>


[GitHub] cloudstack pull request: Quota

2015-10-13 Thread abhinandanprateek
Github user abhinandanprateek commented on a diff in the pull request:

https://github.com/apache/cloudstack/pull/768#discussion_r41834872
  
--- Diff: 
plugins/database/quota/src/org/apache/cloudstack/api/response/QuotaResponseBuilderImpl.java
 ---
@@ -0,0 +1,422 @@
+//Licensed to the Apache Software Foundation (ASF) under one
+//or more contributor license agreements.  See the NOTICE file
+//distributed with this work for additional information
+//regarding copyright ownership.  The ASF licenses this file
+//to you under the Apache License, Version 2.0 (the
+//"License"); you may not use this file except in compliance
+//with the License.  You may obtain a copy of the License at
+//
+//http://www.apache.org/licenses/LICENSE-2.0
+//
+//Unless required by applicable law or agreed to in writing,
+//software distributed under the License is distributed on an
+//"AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+//KIND, either express or implied.  See the License for the
+//specific language governing permissions and limitations
+//under the License.
+package org.apache.cloudstack.api.response;
+
+import com.cloud.exception.InvalidParameterValueException;
+import com.cloud.user.Account;
+import com.cloud.user.AccountVO;
+import com.cloud.user.User;
+import com.cloud.user.dao.AccountDao;
+import com.cloud.user.dao.UserDao;
+import com.cloud.utils.db.TransactionLegacy;
+
+import org.apache.cloudstack.api.command.QuotaBalanceCmd;
+import org.apache.cloudstack.api.command.QuotaEmailTemplateListCmd;
+import org.apache.cloudstack.api.command.QuotaEmailTemplateUpdateCmd;
+import org.apache.cloudstack.api.command.QuotaStatementCmd;
+import org.apache.cloudstack.api.command.QuotaTariffListCmd;
+import org.apache.cloudstack.api.command.QuotaTariffUpdateCmd;
+import org.apache.cloudstack.quota.QuotaService;
+import org.apache.cloudstack.quota.constant.QuotaConfig;
+import org.apache.cloudstack.quota.constant.QuotaTypes;
+import org.apache.cloudstack.quota.dao.QuotaBalanceDao;
+import org.apache.cloudstack.quota.dao.QuotaCreditsDao;
+import org.apache.cloudstack.quota.dao.QuotaEmailTemplatesDao;
+import org.apache.cloudstack.quota.dao.QuotaTariffDao;
+import org.apache.cloudstack.quota.vo.QuotaBalanceVO;
+import org.apache.cloudstack.quota.vo.QuotaCreditsVO;
+import org.apache.cloudstack.quota.vo.QuotaEmailTemplatesVO;
+import org.apache.cloudstack.quota.vo.QuotaTariffVO;
+import org.apache.cloudstack.quota.vo.QuotaUsageVO;
+import org.apache.cloudstack.region.RegionManager;
+import org.apache.commons.lang.StringEscapeUtils;
+import org.apache.log4j.Logger;
+import org.springframework.stereotype.Component;
+
+import javax.ejb.Local;
+import javax.inject.Inject;
+
+import java.math.BigDecimal;
+import java.util.ArrayList;
+import java.util.Calendar;
+import java.util.Collections;
+import java.util.Comparator;
+import java.util.Date;
+import java.util.HashMap;
+import java.util.Iterator;
+import java.util.List;
+
+@Component
+@Local(value = QuotaResponseBuilderImpl.class)
+public class QuotaResponseBuilderImpl implements QuotaResponseBuilder {
+private static final Logger s_logger = 
Logger.getLogger(QuotaResponseBuilderImpl.class.getName());
+
+@Inject
+private QuotaTariffDao _quotaTariffDao;
+@Inject
+private QuotaBalanceDao _quotaBalanceDao;
+@Inject
+private QuotaCreditsDao _quotaCreditsDao;
+@Inject
+private QuotaEmailTemplatesDao _quotaEmailTemplateDao;
+
+@Inject
+private UserDao _userDao;
+@Inject
+private QuotaService _quotaService;
+@Inject
+AccountDao _accountDao;
+@Inject
+private RegionManager _regionMgr;
+
+@Override
+public QuotaTariffResponse createQuotaTariffResponse(QuotaTariffVO 
tariff) {
+final QuotaTariffResponse response = new QuotaTariffResponse();
+response.setUsageType(tariff.getUsageType());
+response.setUsageName(tariff.getUsageName());
+response.setUsageUnit(tariff.getUsageUnit());
+response.setUsageDiscriminator(tariff.getUsageDiscriminator());
+response.setTariffValue(tariff.getCurrencyValue());
+response.setEffectiveOn(tariff.getEffectiveOn());
+response.setDescription(tariff.getDescription());
+response.setCurrency(QuotaConfig.QuotaCurrencySymbol.value());
+return response;
+}
+
+@Override
+public QuotaBalanceResponse 
createQuotaBalanceResponse(List quotaBalance, Date startDate, 
Date endDate) {
+if (quotaBalance == null || quotaBalance.size() == 0) {
+new InvalidParameterValueExcepti

[GitHub] cloudstack pull request: CLOUDSTACK-8934 - Default routes not conf...

2015-10-13 Thread borisroman
Github user borisroman commented on the pull request:

https://github.com/apache/cloudstack/pull/923#issuecomment-147633618
  
Testing now, will post results later today!


---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastruct...@apache.org or file a JIRA ticket
with INFRA.
---


[GitHub] cloudstack-www pull request: Improvements to survey.html

2015-10-13 Thread runseb
Github user runseb commented on the pull request:

https://github.com/apache/cloudstack-www/pull/16#issuecomment-147636042
  
+0

I don't think we need two LGTM etc for this.
But it's automatically built, so you don't need to touch the .html.
Jut edit the .md file, and build with the script build.sh 

You can build on master and then merge in asf-site branch, which will get 
deployed automatically.

I basically use master branch for dev/test and merge for prod.



---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastruct...@apache.org or file a JIRA ticket
with INFRA.
---


[GitHub] cloudstack-www pull request: Improvements to survey.html

2015-10-13 Thread terbolous
Github user terbolous commented on the pull request:

https://github.com/apache/cloudstack-www/pull/16#issuecomment-147637056
  
I didn't touch the html manually, but included the generated html in the 
commit. Not sure if that is necessary or not.

Should I wait for a couple of others to comment on the LGTM thing, or just 
merge it?


---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastruct...@apache.org or file a JIRA ticket
with INFRA.
---


[GitHub] cloudstack-www pull request: Improvements to survey.html

2015-10-13 Thread runseb
Github user runseb commented on the pull request:

https://github.com/apache/cloudstack-www/pull/16#issuecomment-147640430
  
you can merge. but make sure to merge in the other branch as well, 
otherwise it won't go live.


---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastruct...@apache.org or file a JIRA ticket
with INFRA.
---


[GitHub] cloudstack-www pull request: Improvements to survey.html

2015-10-13 Thread asfgit
Github user asfgit closed the pull request at:

https://github.com/apache/cloudstack-www/pull/16


---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastruct...@apache.org or file a JIRA ticket
with INFRA.
---


[GitHub] cloudstack pull request: Local cloudstack

2015-10-13 Thread sarathkouk
GitHub user sarathkouk reopened a pull request:

https://github.com/apache/cloudstack/pull/919

Local cloudstack

LDAP: Auto Import and Trust AD 

You can merge this pull request into a Git repository by running:

$ git pull https://github.com/sarathkouk/cloudstack local_cloudstack

Alternatively you can review and apply these changes as the patch at:

https://github.com/apache/cloudstack/pull/919.patch

To close this pull request, make a commit to your master/trunk branch
with (at least) the following in the commit message:

This closes #919


commit c07764b0811dde3c2976aa958d6f2b90affb918f
Author: sarath 
Date:   2015-10-09T14:23:04Z

test/integration/smoke/AUTOMATIONConfigfiles/
'LDAP: Auto Import and Trust AD' automation

commit 30829073b0e00f7b892799b92b2f35e02bd93114
Author: sarath 
Date:   2015-10-09T14:29:19Z

'LDAP:Auto Import and Trust AD' automation 2




---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastruct...@apache.org or file a JIRA ticket
with INFRA.
---


[GitHub] cloudstack pull request: Quota

2015-10-13 Thread abhinandanprateek
Github user abhinandanprateek commented on a diff in the pull request:

https://github.com/apache/cloudstack/pull/768#discussion_r41844702
  
--- Diff: 
plugins/database/quota/src/org/apache/cloudstack/api/response/QuotaResponseBuilderImpl.java
 ---
@@ -0,0 +1,422 @@
+//Licensed to the Apache Software Foundation (ASF) under one
+//or more contributor license agreements.  See the NOTICE file
+//distributed with this work for additional information
+//regarding copyright ownership.  The ASF licenses this file
+//to you under the Apache License, Version 2.0 (the
+//"License"); you may not use this file except in compliance
+//with the License.  You may obtain a copy of the License at
+//
+//http://www.apache.org/licenses/LICENSE-2.0
+//
+//Unless required by applicable law or agreed to in writing,
+//software distributed under the License is distributed on an
+//"AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+//KIND, either express or implied.  See the License for the
+//specific language governing permissions and limitations
+//under the License.
+package org.apache.cloudstack.api.response;
+
+import com.cloud.exception.InvalidParameterValueException;
+import com.cloud.user.Account;
+import com.cloud.user.AccountVO;
+import com.cloud.user.User;
+import com.cloud.user.dao.AccountDao;
+import com.cloud.user.dao.UserDao;
+import com.cloud.utils.db.TransactionLegacy;
+
+import org.apache.cloudstack.api.command.QuotaBalanceCmd;
+import org.apache.cloudstack.api.command.QuotaEmailTemplateListCmd;
+import org.apache.cloudstack.api.command.QuotaEmailTemplateUpdateCmd;
+import org.apache.cloudstack.api.command.QuotaStatementCmd;
+import org.apache.cloudstack.api.command.QuotaTariffListCmd;
+import org.apache.cloudstack.api.command.QuotaTariffUpdateCmd;
+import org.apache.cloudstack.quota.QuotaService;
+import org.apache.cloudstack.quota.constant.QuotaConfig;
+import org.apache.cloudstack.quota.constant.QuotaTypes;
+import org.apache.cloudstack.quota.dao.QuotaBalanceDao;
+import org.apache.cloudstack.quota.dao.QuotaCreditsDao;
+import org.apache.cloudstack.quota.dao.QuotaEmailTemplatesDao;
+import org.apache.cloudstack.quota.dao.QuotaTariffDao;
+import org.apache.cloudstack.quota.vo.QuotaBalanceVO;
+import org.apache.cloudstack.quota.vo.QuotaCreditsVO;
+import org.apache.cloudstack.quota.vo.QuotaEmailTemplatesVO;
+import org.apache.cloudstack.quota.vo.QuotaTariffVO;
+import org.apache.cloudstack.quota.vo.QuotaUsageVO;
+import org.apache.cloudstack.region.RegionManager;
+import org.apache.commons.lang.StringEscapeUtils;
+import org.apache.log4j.Logger;
+import org.springframework.stereotype.Component;
+
+import javax.ejb.Local;
+import javax.inject.Inject;
+
+import java.math.BigDecimal;
+import java.util.ArrayList;
+import java.util.Calendar;
+import java.util.Collections;
+import java.util.Comparator;
+import java.util.Date;
+import java.util.HashMap;
+import java.util.Iterator;
+import java.util.List;
+
+@Component
+@Local(value = QuotaResponseBuilderImpl.class)
+public class QuotaResponseBuilderImpl implements QuotaResponseBuilder {
+private static final Logger s_logger = 
Logger.getLogger(QuotaResponseBuilderImpl.class.getName());
+
+@Inject
+private QuotaTariffDao _quotaTariffDao;
+@Inject
+private QuotaBalanceDao _quotaBalanceDao;
+@Inject
+private QuotaCreditsDao _quotaCreditsDao;
+@Inject
+private QuotaEmailTemplatesDao _quotaEmailTemplateDao;
+
+@Inject
+private UserDao _userDao;
+@Inject
+private QuotaService _quotaService;
+@Inject
+AccountDao _accountDao;
+@Inject
+private RegionManager _regionMgr;
+
+@Override
+public QuotaTariffResponse createQuotaTariffResponse(QuotaTariffVO 
tariff) {
+final QuotaTariffResponse response = new QuotaTariffResponse();
+response.setUsageType(tariff.getUsageType());
+response.setUsageName(tariff.getUsageName());
+response.setUsageUnit(tariff.getUsageUnit());
+response.setUsageDiscriminator(tariff.getUsageDiscriminator());
+response.setTariffValue(tariff.getCurrencyValue());
+response.setEffectiveOn(tariff.getEffectiveOn());
+response.setDescription(tariff.getDescription());
+response.setCurrency(QuotaConfig.QuotaCurrencySymbol.value());
+return response;
+}
+
+@Override
+public QuotaBalanceResponse 
createQuotaBalanceResponse(List quotaBalance, Date startDate, 
Date endDate) {
+if (quotaBalance == null || quotaBalance.size() == 0) {
+new InvalidParameterValueExcepti

[GitHub] cloudstack pull request: Quota

2015-10-13 Thread abhinandanprateek
Github user abhinandanprateek commented on a diff in the pull request:

https://github.com/apache/cloudstack/pull/768#discussion_r41845417
  
--- Diff: 
plugins/database/quota/src/org/apache/cloudstack/api/response/QuotaStatementResponse.java
 ---
@@ -0,0 +1,130 @@
+//Licensed to the Apache Software Foundation (ASF) under one
+//or more contributor license agreements.  See the NOTICE file
+//distributed with this work for additional information
+//regarding copyright ownership.  The ASF licenses this file
+//to you under the Apache License, Version 2.0 (the
+//"License"); you may not use this file except in compliance
+//with the License.  You may obtain a copy of the License at
+//
+//http://www.apache.org/licenses/LICENSE-2.0
+//
+//Unless required by applicable law or agreed to in writing,
+//software distributed under the License is distributed on an
+//"AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+//KIND, either express or implied.  See the License for the
+//specific language governing permissions and limitations
+//under the License.
+package org.apache.cloudstack.api.response;
+
+import com.cloud.serializer.Param;
+import com.google.gson.annotations.SerializedName;
+import org.apache.cloudstack.api.BaseResponse;
+
+import java.math.BigDecimal;
+import java.math.RoundingMode;
+import java.util.Date;
+import java.util.List;
+
+public class QuotaStatementResponse  extends BaseResponse {
+
+@SerializedName("accountid")
+@Param(description = "account id")
+private Long accountId;
+
+@SerializedName("account")
+@Param(description = "account name")
+private String accountName;
+
+@SerializedName("domain")
+@Param(description = "domain id")
+private Long domainId;
+
+@SerializedName("quotausage")
+@Param(description = "list of quota usage under various types", 
responseObject = QuotaStatementItemResponse.class)
+private List lineItem;
+
+@SerializedName("totalquota")
+@Param(description = "total quota used during this period")
+private BigDecimal totalQuota;
+
+@SerializedName("startdate")
+@Param(description = "start date")
+private Date startDate = null;
+
+@SerializedName("enddate")
+@Param(description = "end date")
+private Date endDate = null;
+
+@SerializedName("currency")
+@Param(description = "currency")
+private String currency;
+
+public QuotaStatementResponse() {
--- End diff --

@jburwell spring requires a no-arg constructor to instantiate a bean.


---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastruct...@apache.org or file a JIRA ticket
with INFRA.
---


[GitHub] cloudstack pull request: [4.5] CLOUDSTACK-8848: ensure power state...

2015-10-13 Thread bhaisaab
Github user bhaisaab commented on the pull request:

https://github.com/apache/cloudstack/pull/922#issuecomment-147663586
  
LGTM, merging on 4.5 as we've already merged this on master. Thanks for the 
PR @resmo 


---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastruct...@apache.org or file a JIRA ticket
with INFRA.
---


[GitHub] cloudstack pull request: [4.5] CLOUDSTACK-8848: ensure power state...

2015-10-13 Thread asfgit
Github user asfgit closed the pull request at:

https://github.com/apache/cloudstack/pull/922


---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastruct...@apache.org or file a JIRA ticket
with INFRA.
---


[GitHub] cloudstack pull request: Quota

2015-10-13 Thread abhinandanprateek
Github user abhinandanprateek commented on a diff in the pull request:

https://github.com/apache/cloudstack/pull/768#discussion_r41845814
  
--- Diff: 
plugins/database/quota/src/org/apache/cloudstack/quota/QuotaServiceImpl.java ---
@@ -0,0 +1,304 @@
+//Licensed to the Apache Software Foundation (ASF) under one
+//or more contributor license agreements.  See the NOTICE file
+//distributed with this work for additional information
+//regarding copyright ownership.  The ASF licenses this file
+//to you under the Apache License, Version 2.0 (the
+//"License"); you may not use this file except in compliance
+//with the License.  You may obtain a copy of the License at
+//
+//http://www.apache.org/licenses/LICENSE-2.0
+//
+//Unless required by applicable law or agreed to in writing,
+//software distributed under the License is distributed on an
+//"AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+//KIND, either express or implied.  See the License for the
+//specific language governing permissions and limitations
+//under the License.
+package org.apache.cloudstack.quota;
+
+import com.cloud.configuration.Config;
+import com.cloud.domain.dao.DomainDao;
+import com.cloud.exception.InvalidParameterValueException;
+import com.cloud.exception.PermissionDeniedException;
+import com.cloud.user.Account;
+import com.cloud.user.AccountVO;
+import com.cloud.user.dao.AccountDao;
+import com.cloud.utils.component.ManagerBase;
+import com.cloud.utils.db.Filter;
+import com.cloud.utils.db.TransactionLegacy;
+
+import org.apache.cloudstack.api.command.QuotaBalanceCmd;
+import org.apache.cloudstack.api.command.QuotaCreditsCmd;
+import org.apache.cloudstack.api.command.QuotaEmailTemplateUpdateCmd;
+import org.apache.cloudstack.api.command.QuotaEmailTemplateListCmd;
+import org.apache.cloudstack.api.command.QuotaStatementCmd;
+import org.apache.cloudstack.api.command.QuotaTariffListCmd;
+import org.apache.cloudstack.api.command.QuotaTariffUpdateCmd;
+import org.apache.cloudstack.api.response.QuotaResponseBuilder;
+import org.apache.cloudstack.context.CallContext;
+import org.apache.cloudstack.framework.config.ConfigKey;
+import org.apache.cloudstack.framework.config.Configurable;
+import org.apache.cloudstack.framework.config.dao.ConfigurationDao;
+import org.apache.cloudstack.quota.constant.QuotaConfig;
+import org.apache.cloudstack.quota.dao.QuotaAccountDao;
+import org.apache.cloudstack.quota.dao.QuotaBalanceDao;
+import org.apache.cloudstack.quota.dao.QuotaUsageDao;
+import org.apache.cloudstack.quota.vo.QuotaAccountVO;
+import org.apache.cloudstack.quota.vo.QuotaBalanceVO;
+import org.apache.cloudstack.quota.vo.QuotaUsageVO;
+import org.apache.cloudstack.utils.usage.UsageUtils;
+import org.apache.log4j.Logger;
+import org.springframework.stereotype.Component;
+
+import javax.ejb.Local;
+import javax.inject.Inject;
+import javax.naming.ConfigurationException;
+
+import java.math.BigDecimal;
+import java.util.ArrayList;
+import java.util.Calendar;
+import java.util.Date;
+import java.util.List;
+import java.util.Map;
+import java.util.TimeZone;
+
+@Component
+@Local(value = QuotaService.class)
+public class QuotaServiceImpl extends ManagerBase implements QuotaService, 
Configurable, QuotaConfig {
+private static final Logger s_logger = 
Logger.getLogger(QuotaServiceImpl.class.getName());
+
+@Inject
+private AccountDao _accountDao;
+@Inject
+private QuotaAccountDao _quotaAcc;
+@Inject
+private QuotaUsageDao _quotaUsageDao;
+@Inject
+private DomainDao _domainDao;
+@Inject
+private ConfigurationDao _configDao;
+@Inject
+private QuotaBalanceDao _quotaBalanceDao;
+@Inject
+private QuotaResponseBuilder _respBldr;
+
+private TimeZone _usageTimezone;
+private int _aggregationDuration = 0;
+
+final static BigDecimal s_hoursInMonth = new BigDecimal(30 * 24);
+final static BigDecimal s_minutesInMonth = new BigDecimal(30 * 24 * 
60);
+final static BigDecimal s_gb = new BigDecimal(1024 * 1024 * 1024);
+
+public QuotaServiceImpl() {
+super();
+}
+
+@Override
+public boolean configure(String name, Map params) 
throws ConfigurationException {
+super.configure(name, params);
+String timeZoneStr = 
_configDao.getValue(Config.UsageAggregationTimezone.toString());
+String aggregationRange = 
_configDao.getValue(Config.UsageStatsJobAggregationRange.toString());
+if (timeZoneStr == null) {
+timeZoneStr = "GMT";
+}
+_usageTimezone = TimeZone.getTimeZone(timeZon

[GitHub] cloudstack pull request: Quota

2015-10-13 Thread abhinandanprateek
Github user abhinandanprateek commented on a diff in the pull request:

https://github.com/apache/cloudstack/pull/768#discussion_r41846405
  
--- Diff: 
plugins/database/quota/src/org/apache/cloudstack/quota/QuotaServiceImpl.java ---
@@ -0,0 +1,304 @@
+//Licensed to the Apache Software Foundation (ASF) under one
+//or more contributor license agreements.  See the NOTICE file
+//distributed with this work for additional information
+//regarding copyright ownership.  The ASF licenses this file
+//to you under the Apache License, Version 2.0 (the
+//"License"); you may not use this file except in compliance
+//with the License.  You may obtain a copy of the License at
+//
+//http://www.apache.org/licenses/LICENSE-2.0
+//
+//Unless required by applicable law or agreed to in writing,
+//software distributed under the License is distributed on an
+//"AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+//KIND, either express or implied.  See the License for the
+//specific language governing permissions and limitations
+//under the License.
+package org.apache.cloudstack.quota;
+
+import com.cloud.configuration.Config;
+import com.cloud.domain.dao.DomainDao;
+import com.cloud.exception.InvalidParameterValueException;
+import com.cloud.exception.PermissionDeniedException;
+import com.cloud.user.Account;
+import com.cloud.user.AccountVO;
+import com.cloud.user.dao.AccountDao;
+import com.cloud.utils.component.ManagerBase;
+import com.cloud.utils.db.Filter;
+import com.cloud.utils.db.TransactionLegacy;
+
+import org.apache.cloudstack.api.command.QuotaBalanceCmd;
+import org.apache.cloudstack.api.command.QuotaCreditsCmd;
+import org.apache.cloudstack.api.command.QuotaEmailTemplateUpdateCmd;
+import org.apache.cloudstack.api.command.QuotaEmailTemplateListCmd;
+import org.apache.cloudstack.api.command.QuotaStatementCmd;
+import org.apache.cloudstack.api.command.QuotaTariffListCmd;
+import org.apache.cloudstack.api.command.QuotaTariffUpdateCmd;
+import org.apache.cloudstack.api.response.QuotaResponseBuilder;
+import org.apache.cloudstack.context.CallContext;
+import org.apache.cloudstack.framework.config.ConfigKey;
+import org.apache.cloudstack.framework.config.Configurable;
+import org.apache.cloudstack.framework.config.dao.ConfigurationDao;
+import org.apache.cloudstack.quota.constant.QuotaConfig;
+import org.apache.cloudstack.quota.dao.QuotaAccountDao;
+import org.apache.cloudstack.quota.dao.QuotaBalanceDao;
+import org.apache.cloudstack.quota.dao.QuotaUsageDao;
+import org.apache.cloudstack.quota.vo.QuotaAccountVO;
+import org.apache.cloudstack.quota.vo.QuotaBalanceVO;
+import org.apache.cloudstack.quota.vo.QuotaUsageVO;
+import org.apache.cloudstack.utils.usage.UsageUtils;
+import org.apache.log4j.Logger;
+import org.springframework.stereotype.Component;
+
+import javax.ejb.Local;
+import javax.inject.Inject;
+import javax.naming.ConfigurationException;
+
+import java.math.BigDecimal;
+import java.util.ArrayList;
+import java.util.Calendar;
+import java.util.Date;
+import java.util.List;
+import java.util.Map;
+import java.util.TimeZone;
+
+@Component
+@Local(value = QuotaService.class)
+public class QuotaServiceImpl extends ManagerBase implements QuotaService, 
Configurable, QuotaConfig {
+private static final Logger s_logger = 
Logger.getLogger(QuotaServiceImpl.class.getName());
+
+@Inject
+private AccountDao _accountDao;
+@Inject
+private QuotaAccountDao _quotaAcc;
+@Inject
+private QuotaUsageDao _quotaUsageDao;
+@Inject
+private DomainDao _domainDao;
+@Inject
+private ConfigurationDao _configDao;
+@Inject
+private QuotaBalanceDao _quotaBalanceDao;
+@Inject
+private QuotaResponseBuilder _respBldr;
+
+private TimeZone _usageTimezone;
+private int _aggregationDuration = 0;
+
+final static BigDecimal s_hoursInMonth = new BigDecimal(30 * 24);
+final static BigDecimal s_minutesInMonth = new BigDecimal(30 * 24 * 
60);
+final static BigDecimal s_gb = new BigDecimal(1024 * 1024 * 1024);
+
+public QuotaServiceImpl() {
+super();
+}
+
+@Override
+public boolean configure(String name, Map params) 
throws ConfigurationException {
+super.configure(name, params);
+String timeZoneStr = 
_configDao.getValue(Config.UsageAggregationTimezone.toString());
+String aggregationRange = 
_configDao.getValue(Config.UsageStatsJobAggregationRange.toString());
+if (timeZoneStr == null) {
+timeZoneStr = "GMT";
+}
+_usageTimezone = TimeZone.getTimeZone(timeZon

[GitHub] cloudstack pull request: Quota

2015-10-13 Thread abhinandanprateek
Github user abhinandanprateek commented on a diff in the pull request:

https://github.com/apache/cloudstack/pull/768#discussion_r41847054
  
--- Diff: usage/src/org/apache/cloudstack/quota/QuotaManagerImpl.java ---
@@ -0,0 +1,397 @@
+//Licensed to the Apache Software Foundation (ASF) under one
+//or more contributor license agreements.  See the NOTICE file
+//distributed with this work for additional information
+//regarding copyright ownership.  The ASF licenses this file
+//to you under the Apache License, Version 2.0 (the
+//"License"); you may not use this file except in compliance
+//with the License.  You may obtain a copy of the License at
+//
+//http://www.apache.org/licenses/LICENSE-2.0
+//
+//Unless required by applicable law or agreed to in writing,
+//software distributed under the License is distributed on an
+//"AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+//KIND, either express or implied.  See the License for the
+//specific language governing permissions and limitations
+//under the License.
+package org.apache.cloudstack.quota;
+
+import com.cloud.usage.UsageVO;
+import com.cloud.usage.dao.UsageDao;
+import com.cloud.user.AccountVO;
+import com.cloud.user.dao.AccountDao;
+import com.cloud.utils.Pair;
+import com.cloud.utils.component.ManagerBase;
+import com.cloud.utils.db.DB;
+import com.cloud.utils.db.TransactionLegacy;
+import org.apache.cloudstack.framework.config.dao.ConfigurationDao;
+import org.apache.cloudstack.quota.constant.QuotaTypes;
+import org.apache.cloudstack.quota.dao.QuotaAccountDao;
+import org.apache.cloudstack.quota.dao.QuotaBalanceDao;
+import org.apache.cloudstack.quota.dao.QuotaTariffDao;
+import org.apache.cloudstack.quota.dao.QuotaUsageDao;
+import org.apache.cloudstack.quota.dao.ServiceOfferingDao;
+import org.apache.cloudstack.quota.vo.QuotaAccountVO;
+import org.apache.cloudstack.quota.vo.QuotaBalanceVO;
+import org.apache.cloudstack.quota.vo.QuotaTariffVO;
+import org.apache.cloudstack.quota.vo.QuotaUsageVO;
+import org.apache.cloudstack.quota.vo.ServiceOfferingVO;
+import org.apache.cloudstack.utils.usage.UsageUtils;
+import org.apache.log4j.Logger;
+import org.springframework.stereotype.Component;
+
+import javax.ejb.Local;
+import javax.inject.Inject;
+import javax.naming.ConfigurationException;
+import java.math.BigDecimal;
+import java.math.RoundingMode;
+import java.util.ArrayList;
+import java.util.Date;
+import java.util.List;
+import java.util.Map;
+import java.util.TimeZone;
+
+@Component
+@Local(value = QuotaManager.class)
+public class QuotaManagerImpl extends ManagerBase implements QuotaManager {
+private static final Logger s_logger = 
Logger.getLogger(QuotaManagerImpl.class.getName());
+
+@Inject
+private AccountDao _accountDao;
+@Inject
+private QuotaAccountDao _quotaAcc;
+@Inject
+private UsageDao _usageDao;
+@Inject
+private QuotaTariffDao _quotaTariffDao;
+@Inject
+private QuotaUsageDao _quotaUsageDao;
+@Inject
+private ServiceOfferingDao _serviceOfferingDao;
+@Inject
+private QuotaBalanceDao _quotaBalanceDao;
+@Inject
+private ConfigurationDao _configDao;
+
+private TimeZone _usageTimezone;
+private int _aggregationDuration = 0;
+
+final static BigDecimal s_hoursInMonth = new BigDecimal(30 * 24);
+final static BigDecimal s_minutesInMonth = new BigDecimal(30 * 24 * 
60);
+final static BigDecimal s_gb = new BigDecimal(1024 * 1024 * 1024);
+
+int _pid = 0;
+
+public QuotaManagerImpl() {
+super();
+}
+
+private void mergeConfigs(Map dbParams, Map xmlParams) {
+for (Map.Entry param : xmlParams.entrySet()) {
+dbParams.put(param.getKey(), (String) param.getValue());
+}
+}
+
+@Override
+public boolean configure(String name, Map params) 
throws ConfigurationException {
+super.configure(name, params);
+
+Map configs = _configDao.getConfiguration(params);
+
+if (params != null) {
+mergeConfigs(configs, params);
+}
+
+String aggregationRange = 
configs.get("usage.stats.job.aggregation.range");
+String timeZoneStr = configs.get("usage.aggregation.timezone");
+
+if (timeZoneStr == null) {
+timeZoneStr = "GMT";
+}
+_usageTimezone = TimeZone.getTimeZone(timeZoneStr);
--- End diff --

QuotaServiceImpl and QuotaManagerImpl are in different packages and such 
cannot have a reference to each other. The code can be pulled into a third 
standalone 

[GitHub] cloudstack pull request: Quota

2015-10-13 Thread abhinandanprateek
Github user abhinandanprateek commented on a diff in the pull request:

https://github.com/apache/cloudstack/pull/768#discussion_r41847268
  
--- Diff: usage/src/org/apache/cloudstack/quota/QuotaManagerImpl.java ---
@@ -0,0 +1,397 @@
+//Licensed to the Apache Software Foundation (ASF) under one
+//or more contributor license agreements.  See the NOTICE file
+//distributed with this work for additional information
+//regarding copyright ownership.  The ASF licenses this file
+//to you under the Apache License, Version 2.0 (the
+//"License"); you may not use this file except in compliance
+//with the License.  You may obtain a copy of the License at
+//
+//http://www.apache.org/licenses/LICENSE-2.0
+//
+//Unless required by applicable law or agreed to in writing,
+//software distributed under the License is distributed on an
+//"AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+//KIND, either express or implied.  See the License for the
+//specific language governing permissions and limitations
+//under the License.
+package org.apache.cloudstack.quota;
--- End diff --

@jburwell  The Alert functionality exist at other places in cloudstack. I 
think it should be moved to a common utility package. This also overlaps with 
consolidating smtp related parameters as @wilderrodrigues  has pointed out 
somewhere in this PR. @bhaisaab has commented that he will take this up after 
this PR is done as it affects more than just this part of the code.


---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastruct...@apache.org or file a JIRA ticket
with INFRA.
---


Build failed in Jenkins: simulator-4.5-singlerun #274

2015-10-13 Thread jenkins
See 

--
Started by upstream project "build-4.5-simulator" build number 328
originally caused by:
 Started by upstream project "build-4.5" build number 532
 originally caused by:
  Started by an SCM change
[EnvInject] - Loading node environment variables.
Building remotely on simulator in workspace 

 > /usr/bin/git rev-parse --is-inside-work-tree # timeout=400
Fetching changes from the remote Git repository
 > /usr/bin/git config remote.origin.url 
 > https://git-wip-us.apache.org/repos/asf/cloudstack.git # timeout=400
Fetching upstream changes from 
https://git-wip-us.apache.org/repos/asf/cloudstack.git
 > /usr/bin/git --version # timeout=400
 > /usr/bin/git fetch --tags --progress 
 > https://git-wip-us.apache.org/repos/asf/cloudstack.git 
 > +refs/heads/*:refs/remotes/origin/*
ERROR: Error fetching remote repo 'origin'
hudson.plugins.git.GitException: Failed to fetch from 
https://git-wip-us.apache.org/repos/asf/cloudstack.git
at hudson.plugins.git.GitSCM.fetchFrom(GitSCM.java:735)
at hudson.plugins.git.GitSCM.retrieveChanges(GitSCM.java:983)
at hudson.plugins.git.GitSCM.checkout(GitSCM.java:1016)
at hudson.scm.SCM.checkout(SCM.java:484)
at hudson.model.AbstractProject.checkout(AbstractProject.java:1258)
at 
hudson.model.AbstractBuild$AbstractBuildExecution.defaultCheckout(AbstractBuild.java:622)
at jenkins.scm.SCMCheckoutStrategy.checkout(SCMCheckoutStrategy.java:86)
at 
hudson.model.AbstractBuild$AbstractBuildExecution.run(AbstractBuild.java:528)
at hudson.model.Run.execute(Run.java:1759)
at hudson.model.FreeStyleBuild.run(FreeStyleBuild.java:43)
at hudson.model.ResourceController.execute(ResourceController.java:89)
at hudson.model.Executor.run(Executor.java:240)
Caused by: hudson.plugins.git.GitException: Command "/usr/bin/git fetch --tags 
--progress https://git-wip-us.apache.org/repos/asf/cloudstack.git 
+refs/heads/*:refs/remotes/origin/*" returned status code 128:
stdout: 
stderr: error:  while accessing 
https://git-wip-us.apache.org/repos/asf/cloudstack.git/info/refs

fatal: HTTP request failed

at 
org.jenkinsci.plugins.gitclient.CliGitAPIImpl.launchCommandIn(CliGitAPIImpl.java:1591)
at 
org.jenkinsci.plugins.gitclient.CliGitAPIImpl.launchCommandWithCredentials(CliGitAPIImpl.java:1379)
at 
org.jenkinsci.plugins.gitclient.CliGitAPIImpl.access$300(CliGitAPIImpl.java:86)
at 
org.jenkinsci.plugins.gitclient.CliGitAPIImpl$1.execute(CliGitAPIImpl.java:324)
at 
org.jenkinsci.plugins.gitclient.RemoteGitImpl$CommandInvocationHandler$1.call(RemoteGitImpl.java:152)
at 
org.jenkinsci.plugins.gitclient.RemoteGitImpl$CommandInvocationHandler$1.call(RemoteGitImpl.java:145)
at hudson.remoting.UserRequest.perform(UserRequest.java:121)
at hudson.remoting.UserRequest.perform(UserRequest.java:49)
at hudson.remoting.Request$2.run(Request.java:324)
at 
hudson.remoting.InterceptingExecutorService$1.call(InterceptingExecutorService.java:68)
at java.util.concurrent.FutureTask.run(FutureTask.java:262)
at 
java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1145)
at 
java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:615)
at java.lang.Thread.run(Thread.java:744)
at ..remote call to simulator(Native Method)
at hudson.remoting.Channel.attachCallSiteStackTrace(Channel.java:1356)
at hudson.remoting.UserResponse.retrieve(UserRequest.java:221)
at hudson.remoting.Channel.call(Channel.java:752)
at 
org.jenkinsci.plugins.gitclient.RemoteGitImpl$CommandInvocationHandler.execute(RemoteGitImpl.java:145)
at sun.reflect.GeneratedMethodAccessor375.invoke(Unknown Source)
at 
sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at java.lang.reflect.Method.invoke(Method.java:601)
at 
org.jenkinsci.plugins.gitclient.RemoteGitImpl$CommandInvocationHandler.invoke(RemoteGitImpl.java:131)
at sun.proxy.$Proxy46.execute(Unknown Source)
at hudson.plugins.git.GitSCM.fetchFrom(GitSCM.java:733)
... 11 more
ERROR: Error fetching remote repo 'origin'
[xUnit] [INFO] - Starting to record.
[xUnit] [INFO] - Processing JUnit
[xUnit] [INFO] - [JUnit] - No test report file(s) were found with the pattern 
'xunit.xml' relative to 
' for the 
testing framework 'JUnit'.  Did you enter a pattern relative to the correct 
directory?  Did you generate the result report(s) for 'JUnit'?
[xUnit] [ERROR] - No test reports found for the metric 'JUnit' with the 
resolved pattern 'xunit.xml'. Configuration error?.
[xUnit] [INFO] - Failing BUILD.
[xUnit] [INFO] -

[GitHub] cloudstack pull request: Quota

2015-10-13 Thread abhinandanprateek
Github user abhinandanprateek commented on a diff in the pull request:

https://github.com/apache/cloudstack/pull/768#discussion_r41848280
  
--- Diff: usage/src/org/apache/cloudstack/quota/QuotaManagerImpl.java ---
@@ -0,0 +1,397 @@
+//Licensed to the Apache Software Foundation (ASF) under one
+//or more contributor license agreements.  See the NOTICE file
+//distributed with this work for additional information
+//regarding copyright ownership.  The ASF licenses this file
+//to you under the Apache License, Version 2.0 (the
+//"License"); you may not use this file except in compliance
+//with the License.  You may obtain a copy of the License at
+//
+//http://www.apache.org/licenses/LICENSE-2.0
+//
+//Unless required by applicable law or agreed to in writing,
+//software distributed under the License is distributed on an
+//"AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+//KIND, either express or implied.  See the License for the
+//specific language governing permissions and limitations
+//under the License.
+package org.apache.cloudstack.quota;
+
+import com.cloud.usage.UsageVO;
+import com.cloud.usage.dao.UsageDao;
+import com.cloud.user.AccountVO;
+import com.cloud.user.dao.AccountDao;
+import com.cloud.utils.Pair;
+import com.cloud.utils.component.ManagerBase;
+import com.cloud.utils.db.DB;
+import com.cloud.utils.db.TransactionLegacy;
+import org.apache.cloudstack.framework.config.dao.ConfigurationDao;
+import org.apache.cloudstack.quota.constant.QuotaTypes;
+import org.apache.cloudstack.quota.dao.QuotaAccountDao;
+import org.apache.cloudstack.quota.dao.QuotaBalanceDao;
+import org.apache.cloudstack.quota.dao.QuotaTariffDao;
+import org.apache.cloudstack.quota.dao.QuotaUsageDao;
+import org.apache.cloudstack.quota.dao.ServiceOfferingDao;
+import org.apache.cloudstack.quota.vo.QuotaAccountVO;
+import org.apache.cloudstack.quota.vo.QuotaBalanceVO;
+import org.apache.cloudstack.quota.vo.QuotaTariffVO;
+import org.apache.cloudstack.quota.vo.QuotaUsageVO;
+import org.apache.cloudstack.quota.vo.ServiceOfferingVO;
+import org.apache.cloudstack.utils.usage.UsageUtils;
+import org.apache.log4j.Logger;
+import org.springframework.stereotype.Component;
+
+import javax.ejb.Local;
+import javax.inject.Inject;
+import javax.naming.ConfigurationException;
+import java.math.BigDecimal;
+import java.math.RoundingMode;
+import java.util.ArrayList;
+import java.util.Date;
+import java.util.List;
+import java.util.Map;
+import java.util.TimeZone;
+
+@Component
+@Local(value = QuotaManager.class)
+public class QuotaManagerImpl extends ManagerBase implements QuotaManager {
+private static final Logger s_logger = 
Logger.getLogger(QuotaManagerImpl.class.getName());
+
+@Inject
+private AccountDao _accountDao;
+@Inject
+private QuotaAccountDao _quotaAcc;
+@Inject
+private UsageDao _usageDao;
+@Inject
+private QuotaTariffDao _quotaTariffDao;
+@Inject
+private QuotaUsageDao _quotaUsageDao;
+@Inject
+private ServiceOfferingDao _serviceOfferingDao;
+@Inject
+private QuotaBalanceDao _quotaBalanceDao;
+@Inject
+private ConfigurationDao _configDao;
+
+private TimeZone _usageTimezone;
+private int _aggregationDuration = 0;
+
+final static BigDecimal s_hoursInMonth = new BigDecimal(30 * 24);
+final static BigDecimal s_minutesInMonth = new BigDecimal(30 * 24 * 
60);
+final static BigDecimal s_gb = new BigDecimal(1024 * 1024 * 1024);
+
+int _pid = 0;
+
+public QuotaManagerImpl() {
+super();
+}
+
+private void mergeConfigs(Map dbParams, Map xmlParams) {
+for (Map.Entry param : xmlParams.entrySet()) {
+dbParams.put(param.getKey(), (String) param.getValue());
+}
+}
+
+@Override
+public boolean configure(String name, Map params) 
throws ConfigurationException {
+super.configure(name, params);
+
+Map configs = _configDao.getConfiguration(params);
+
+if (params != null) {
+mergeConfigs(configs, params);
+}
+
+String aggregationRange = 
configs.get("usage.stats.job.aggregation.range");
+String timeZoneStr = configs.get("usage.aggregation.timezone");
+
+if (timeZoneStr == null) {
+timeZoneStr = "GMT";
+}
+_usageTimezone = TimeZone.getTimeZone(timeZoneStr);
+
+_aggregationDuration = Integer.parseInt(aggregationRange);
+if (_aggregationDuration < UsageUtils.USAGE_AGGREGATION_RANGE_MIN) 
{
+s_logger.war

[GitHub] cloudstack pull request: Quota

2015-10-13 Thread abhinandanprateek
Github user abhinandanprateek commented on a diff in the pull request:

https://github.com/apache/cloudstack/pull/768#discussion_r41848405
  
--- Diff: usage/src/org/apache/cloudstack/quota/QuotaManagerImpl.java ---
@@ -0,0 +1,397 @@
+//Licensed to the Apache Software Foundation (ASF) under one
+//or more contributor license agreements.  See the NOTICE file
+//distributed with this work for additional information
+//regarding copyright ownership.  The ASF licenses this file
+//to you under the Apache License, Version 2.0 (the
+//"License"); you may not use this file except in compliance
+//with the License.  You may obtain a copy of the License at
+//
+//http://www.apache.org/licenses/LICENSE-2.0
+//
+//Unless required by applicable law or agreed to in writing,
+//software distributed under the License is distributed on an
+//"AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+//KIND, either express or implied.  See the License for the
+//specific language governing permissions and limitations
+//under the License.
+package org.apache.cloudstack.quota;
+
+import com.cloud.usage.UsageVO;
+import com.cloud.usage.dao.UsageDao;
+import com.cloud.user.AccountVO;
+import com.cloud.user.dao.AccountDao;
+import com.cloud.utils.Pair;
+import com.cloud.utils.component.ManagerBase;
+import com.cloud.utils.db.DB;
+import com.cloud.utils.db.TransactionLegacy;
+import org.apache.cloudstack.framework.config.dao.ConfigurationDao;
+import org.apache.cloudstack.quota.constant.QuotaTypes;
+import org.apache.cloudstack.quota.dao.QuotaAccountDao;
+import org.apache.cloudstack.quota.dao.QuotaBalanceDao;
+import org.apache.cloudstack.quota.dao.QuotaTariffDao;
+import org.apache.cloudstack.quota.dao.QuotaUsageDao;
+import org.apache.cloudstack.quota.dao.ServiceOfferingDao;
+import org.apache.cloudstack.quota.vo.QuotaAccountVO;
+import org.apache.cloudstack.quota.vo.QuotaBalanceVO;
+import org.apache.cloudstack.quota.vo.QuotaTariffVO;
+import org.apache.cloudstack.quota.vo.QuotaUsageVO;
+import org.apache.cloudstack.quota.vo.ServiceOfferingVO;
+import org.apache.cloudstack.utils.usage.UsageUtils;
+import org.apache.log4j.Logger;
+import org.springframework.stereotype.Component;
+
+import javax.ejb.Local;
+import javax.inject.Inject;
+import javax.naming.ConfigurationException;
+import java.math.BigDecimal;
+import java.math.RoundingMode;
+import java.util.ArrayList;
+import java.util.Date;
+import java.util.List;
+import java.util.Map;
+import java.util.TimeZone;
+
+@Component
+@Local(value = QuotaManager.class)
+public class QuotaManagerImpl extends ManagerBase implements QuotaManager {
+private static final Logger s_logger = 
Logger.getLogger(QuotaManagerImpl.class.getName());
+
+@Inject
+private AccountDao _accountDao;
+@Inject
+private QuotaAccountDao _quotaAcc;
+@Inject
+private UsageDao _usageDao;
+@Inject
+private QuotaTariffDao _quotaTariffDao;
+@Inject
+private QuotaUsageDao _quotaUsageDao;
+@Inject
+private ServiceOfferingDao _serviceOfferingDao;
+@Inject
+private QuotaBalanceDao _quotaBalanceDao;
+@Inject
+private ConfigurationDao _configDao;
+
+private TimeZone _usageTimezone;
+private int _aggregationDuration = 0;
+
+final static BigDecimal s_hoursInMonth = new BigDecimal(30 * 24);
+final static BigDecimal s_minutesInMonth = new BigDecimal(30 * 24 * 
60);
+final static BigDecimal s_gb = new BigDecimal(1024 * 1024 * 1024);
+
+int _pid = 0;
+
+public QuotaManagerImpl() {
+super();
+}
+
+private void mergeConfigs(Map dbParams, Map xmlParams) {
+for (Map.Entry param : xmlParams.entrySet()) {
+dbParams.put(param.getKey(), (String) param.getValue());
+}
+}
+
+@Override
+public boolean configure(String name, Map params) 
throws ConfigurationException {
+super.configure(name, params);
+
+Map configs = _configDao.getConfiguration(params);
+
+if (params != null) {
+mergeConfigs(configs, params);
+}
+
+String aggregationRange = 
configs.get("usage.stats.job.aggregation.range");
+String timeZoneStr = configs.get("usage.aggregation.timezone");
+
+if (timeZoneStr == null) {
+timeZoneStr = "GMT";
+}
+_usageTimezone = TimeZone.getTimeZone(timeZoneStr);
+
+_aggregationDuration = Integer.parseInt(aggregationRange);
+if (_aggregationDuration < UsageUtils.USAGE_AGGREGATION_RANGE_MIN) 
{
+s_logger.war

[GitHub] cloudstack pull request: Quota

2015-10-13 Thread abhinandanprateek
Github user abhinandanprateek commented on a diff in the pull request:

https://github.com/apache/cloudstack/pull/768#discussion_r41848497
  
--- Diff: usage/src/org/apache/cloudstack/quota/QuotaManagerImpl.java ---
@@ -0,0 +1,397 @@
+//Licensed to the Apache Software Foundation (ASF) under one
+//or more contributor license agreements.  See the NOTICE file
+//distributed with this work for additional information
+//regarding copyright ownership.  The ASF licenses this file
+//to you under the Apache License, Version 2.0 (the
+//"License"); you may not use this file except in compliance
+//with the License.  You may obtain a copy of the License at
+//
+//http://www.apache.org/licenses/LICENSE-2.0
+//
+//Unless required by applicable law or agreed to in writing,
+//software distributed under the License is distributed on an
+//"AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+//KIND, either express or implied.  See the License for the
+//specific language governing permissions and limitations
+//under the License.
+package org.apache.cloudstack.quota;
+
+import com.cloud.usage.UsageVO;
+import com.cloud.usage.dao.UsageDao;
+import com.cloud.user.AccountVO;
+import com.cloud.user.dao.AccountDao;
+import com.cloud.utils.Pair;
+import com.cloud.utils.component.ManagerBase;
+import com.cloud.utils.db.DB;
+import com.cloud.utils.db.TransactionLegacy;
+import org.apache.cloudstack.framework.config.dao.ConfigurationDao;
+import org.apache.cloudstack.quota.constant.QuotaTypes;
+import org.apache.cloudstack.quota.dao.QuotaAccountDao;
+import org.apache.cloudstack.quota.dao.QuotaBalanceDao;
+import org.apache.cloudstack.quota.dao.QuotaTariffDao;
+import org.apache.cloudstack.quota.dao.QuotaUsageDao;
+import org.apache.cloudstack.quota.dao.ServiceOfferingDao;
+import org.apache.cloudstack.quota.vo.QuotaAccountVO;
+import org.apache.cloudstack.quota.vo.QuotaBalanceVO;
+import org.apache.cloudstack.quota.vo.QuotaTariffVO;
+import org.apache.cloudstack.quota.vo.QuotaUsageVO;
+import org.apache.cloudstack.quota.vo.ServiceOfferingVO;
+import org.apache.cloudstack.utils.usage.UsageUtils;
+import org.apache.log4j.Logger;
+import org.springframework.stereotype.Component;
+
+import javax.ejb.Local;
+import javax.inject.Inject;
+import javax.naming.ConfigurationException;
+import java.math.BigDecimal;
+import java.math.RoundingMode;
+import java.util.ArrayList;
+import java.util.Date;
+import java.util.List;
+import java.util.Map;
+import java.util.TimeZone;
+
+@Component
+@Local(value = QuotaManager.class)
+public class QuotaManagerImpl extends ManagerBase implements QuotaManager {
+private static final Logger s_logger = 
Logger.getLogger(QuotaManagerImpl.class.getName());
+
+@Inject
+private AccountDao _accountDao;
+@Inject
+private QuotaAccountDao _quotaAcc;
+@Inject
+private UsageDao _usageDao;
+@Inject
+private QuotaTariffDao _quotaTariffDao;
+@Inject
+private QuotaUsageDao _quotaUsageDao;
+@Inject
+private ServiceOfferingDao _serviceOfferingDao;
+@Inject
+private QuotaBalanceDao _quotaBalanceDao;
+@Inject
+private ConfigurationDao _configDao;
+
+private TimeZone _usageTimezone;
+private int _aggregationDuration = 0;
+
+final static BigDecimal s_hoursInMonth = new BigDecimal(30 * 24);
+final static BigDecimal s_minutesInMonth = new BigDecimal(30 * 24 * 
60);
+final static BigDecimal s_gb = new BigDecimal(1024 * 1024 * 1024);
+
+int _pid = 0;
+
+public QuotaManagerImpl() {
+super();
+}
+
+private void mergeConfigs(Map dbParams, Map xmlParams) {
+for (Map.Entry param : xmlParams.entrySet()) {
+dbParams.put(param.getKey(), (String) param.getValue());
+}
+}
+
+@Override
+public boolean configure(String name, Map params) 
throws ConfigurationException {
+super.configure(name, params);
+
+Map configs = _configDao.getConfiguration(params);
+
+if (params != null) {
+mergeConfigs(configs, params);
+}
+
+String aggregationRange = 
configs.get("usage.stats.job.aggregation.range");
+String timeZoneStr = configs.get("usage.aggregation.timezone");
+
+if (timeZoneStr == null) {
+timeZoneStr = "GMT";
+}
+_usageTimezone = TimeZone.getTimeZone(timeZoneStr);
+
+_aggregationDuration = Integer.parseInt(aggregationRange);
+if (_aggregationDuration < UsageUtils.USAGE_AGGREGATION_RANGE_MIN) 
{
+s_logger.war

[GitHub] cloudstack pull request: Quota

2015-10-13 Thread abhinandanprateek
Github user abhinandanprateek commented on a diff in the pull request:

https://github.com/apache/cloudstack/pull/768#discussion_r41853484
  
--- Diff: 
framework/quota/src/org/apache/cloudstack/quota/dao/ServiceOfferingDaoImpl.java 
---
@@ -0,0 +1,86 @@
+// Licensed to the Apache Software Foundation (ASF) under one
+// or more contributor license agreements.  See the NOTICE file
+// distributed with this work for additional information
+// regarding copyright ownership.  The ASF licenses this file
+// to you under the Apache License, Version 2.0 (the
+// "License"); you may not use this file except in compliance
+// with the License.  You may obtain a copy of the License at
+//
+//   http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing,
+// software distributed under the License is distributed on an
+// "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+// KIND, either express or implied.  See the License for the
+// specific language governing permissions and limitations
+// under the License.
+package org.apache.cloudstack.quota.dao;
+
+import java.util.Map;
+
+import javax.ejb.Local;
+import javax.inject.Inject;
+
+import org.apache.log4j.Logger;
+import org.springframework.stereotype.Component;
+import org.apache.cloudstack.quota.vo.ServiceOfferingVO;
+
+import com.cloud.event.UsageEventVO;
+import com.cloud.utils.db.DB;
+import com.cloud.utils.db.GenericDaoBase;
+import com.cloud.utils.db.TransactionLegacy;
+import com.cloud.utils.exception.CloudRuntimeException;
+
+@Component
+@Local(value = { ServiceOfferingDao.class })
+@DB()
+public class ServiceOfferingDaoImpl extends 
GenericDaoBase implements ServiceOfferingDao {
+protected static final Logger s_logger = 
Logger.getLogger(ServiceOfferingDaoImpl.class);
+
+@Inject
+UserVmDetailsDao userVmDetailsDao;
+
+@Override
+public ServiceOfferingVO findServiceOffering(final Long vmId, final 
long serviceOfferingId) {
+final short opendb = 
TransactionLegacy.currentTxn().getDatabaseId();
+ServiceOfferingVO result = null;
+try (TransactionLegacy txn = 
TransactionLegacy.open(TransactionLegacy.CLOUD_DB)) {
+result = findById(vmId, serviceOfferingId);
+} catch (Exception e) {
+s_logger.error("Quota 
ServiceOfferingDaoImpl::findServiceOffering() failed due to: " + 
e.getMessage());
+throw new CloudRuntimeException("Unable to find service 
offering for quota calculations");
+} finally {
+TransactionLegacy.open(opendb).close();
+}
+return result;
+}
+
+private ServiceOfferingVO findById(Long vmId, long serviceOfferingId) {
+ServiceOfferingVO offering = super.findById(serviceOfferingId);
+if (offering.isDynamic()) {
+if (vmId == null) {
+throw new CloudRuntimeException("missing argument vmId");
+}
+offering.setDynamicFlag(true);
+Map dynamicOffering = 
userVmDetailsDao.listDetailsKeyPairs(vmId);
+return getcomputeOffering(offering, dynamicOffering);
+}
+return offering;
+}
+
+private ServiceOfferingVO getcomputeOffering(ServiceOfferingVO 
serviceOffering, Map customParameters) {
--- End diff --

Started making this change but it ripples back to the packages that are 
outside quota related packages. At this point I would like to avoid fixes to 
the pre-existing packages as any changes to those will increase the effort on 
testing. This could be part of the overall code cleanup for cloudstack.


---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastruct...@apache.org or file a JIRA ticket
with INFRA.
---


[GitHub] cloudstack pull request: CLOUDSTACK-8934 - Default routes not conf...

2015-10-13 Thread remibergsma
Github user remibergsma commented on the pull request:

https://github.com/apache/cloudstack/pull/923#issuecomment-147700296
  
@wilderrodrigues Thanks, looking good! LGTM

Tested on 2-node KVM cluster on CentOS 7.

I started by running the same tests:
```
nosetests --with-marvin --marvin-config=${marvinCfg} -s -a 
tags=advanced,required_hardware=true \
component/test_vpc_redundant.py \
component/test_routers_iptables_default_policy.py \
component/test_routers_network_ops.py \
component/test_vpc_router_nics.py
```
Results:
```
Create a redundant VPC with two networks with two VMs in each network ... 
=== TestName: test_01_create_redundant_VPC_2tiers_4VMs_4IPs_4PF_ACL | Status : 
SUCCESS ===
ok
Create a redundant VPC with two networks with two VMs in each network and 
check default routes ... === TestName: test_02_redundant_VPC_default_routes | 
Status : SUCCESS ===
ok
Stop existing router, add a PF rule and check we can access the VM ... === 
TestName: test_isolate_network_FW_PF_default_routes | Status : SUCCESS ===
ok
Test redundant router internals ... === TestName: 
test_RVR_Network_FW_PF_SSH_default_routes | Status : SUCCESS ===
ok

--
Ran 4 tests in 4592.786s

OK
```
I have seen these tests failing, but trying again and even doing it 
manually works.

Next test:
```
nosetests --with-marvin --marvin-config=${marvinCfg} -s -a 
tags=advanced,required_hardware=false \
smoke/test_routers.py \
smoke/test_network_acl.py \
smoke/test_privategw_acl.py \
smoke/test_reset_vm_on_reboot.py \
smoke/test_vm_life_cycle.py \
smoke/test_vpc_vpn.py \
smoke/test_service_offerings.py \
component/test_vpc_offerings.py \
component/test_vpc_routers.py
```

Results:
```
Test router internal advanced zone ... === TestName: 
test_02_router_internal_adv | Status : SUCCESS ===
ok
Test restart network ... === TestName: test_03_restart_network_cleanup | 
Status : SUCCESS ===
ok
Test router basic setup ... === TestName: test_05_router_basic | Status : 
SUCCESS ===
ok
Test router advanced setup ... === TestName: test_06_router_advanced | 
Status : SUCCESS ===
ok
Test stop router ... === TestName: test_07_stop_router | Status : SUCCESS 
===
ok
Test start router ... === TestName: test_08_start_router | Status : SUCCESS 
===
ok
Test reboot router ... === TestName: test_09_reboot_router | Status : 
SUCCESS ===
ok
test_privategw_acl (integration.smoke.test_privategw_acl.TestPrivateGwACL) 
... === TestName: test_privategw_acl | Status : SUCCESS ===
ok
Test reset virtual machine on reboot ... === TestName: 
test_01_reset_vm_on_reboot | Status : SUCCESS ===
ok
Test advanced zone virtual router ... === TestName: 
test_advZoneVirtualRouter | Status : SUCCESS ===
ok
Test Deploy Virtual Machine ... === TestName: test_deploy_vm | Status : 
SUCCESS ===
ok
Test Multiple Deploy Virtual Machine ... === TestName: 
test_deploy_vm_multiple | Status : SUCCESS ===
ok
Test Stop Virtual Machine ... === TestName: test_01_stop_vm | Status : 
SUCCESS ===
ok
Test Start Virtual Machine ... === TestName: test_02_start_vm | Status : 
SUCCESS ===
ok
Test Reboot Virtual Machine ... === TestName: test_03_reboot_vm | Status : 
SUCCESS ===
ok
Test destroy Virtual Machine ... === TestName: test_06_destroy_vm | Status 
: SUCCESS ===
ok
Test recover Virtual Machine ... === TestName: test_07_restore_vm | Status 
: SUCCESS ===
ok
Test migrate VM ... === TestName: test_08_migrate_vm | Status : SUCCESS ===
ok
Test destroy(expunge) Virtual Machine ... === TestName: test_09_expunge_vm 
| Status : SUCCESS ===
ok
Test VPN in VPC ... === TestName: test_vpc_remote_access_vpn | Status : 
SUCCESS ===
ok
Test VPN in VPC ... === TestName: test_vpc_site2site_vpn | Status : SUCCESS 
===
ok
Test to create service offering ... === TestName: 
test_01_create_service_offering | Status : SUCCESS ===
ok
Test to update existing service offering ... === TestName: 
test_02_edit_service_offering | Status : SUCCESS ===
ok
Test to delete service offering ... === TestName: 
test_03_delete_service_offering | Status : SUCCESS ===
ok
Test create VPC offering ... === TestName: test_01_create_vpc_offering | 
Status : SUCCESS ===
ok
Test VPC offering without load balancing service ... === TestName: 
test_03_vpc_off_without_lb | Status : EXCEPTION ===
ERROR
Test VPC offering without static NAT service ... === TestName: 
test_04_vpc_off_without_static_nat | Status : EXCEPTION ===
ERROR
Test VPC offering without port forwarding service ... === TestName: 
test_05_vpc_off_without_pf | Status : EXCEPTION ===
ERROR
Test VPC offering with i

[GitHub] cloudstack pull request: Add all tests in /test/integration/smoke ...

2015-10-13 Thread runseb
Github user runseb commented on the pull request:

https://github.com/apache/cloudstack/pull/920#issuecomment-147706546
  
Sanjeev, good point, Travis only runs advanced zone tests. Maybe we should 
figure out a way to also run the tests with a basic config.


---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastruct...@apache.org or file a JIRA ticket
with INFRA.
---


[GitHub] cloudstack pull request: CLOUDSTACK-7984: Collect network statisti...

2015-10-13 Thread ustcweizhou
GitHub user ustcweizhou opened a pull request:

https://github.com/apache/cloudstack/pull/926

CLOUDSTACK-7984: Collect network statistics for VMs on shared network (KVM 
implementation)

For now we can get network traffic statistics from virtual router for 
isolated network.
For nics on shared networks, we need to collect the traffic as well. 
It is useful for utility billing, especially for basic zone or advanced 
zone with security groups.
This supports KVM until now.

You can merge this pull request into a Git repository by running:

$ git pull https://github.com/ustcweizhou/cloudstack CLOUDSTACK-7984

Alternatively you can review and apply these changes as the patch at:

https://github.com/apache/cloudstack/pull/926.patch

To close this pull request, make a commit to your master/trunk branch
with (at least) the following in the commit message:

This closes #926


commit ec615bb794c0fccdc5900609ceaee91248371cb4
Author: Wei Zhou 
Date:   2015-10-12T12:22:29Z

CLOUDSTACK-7984: Collect network statistics for VMs on shared network (KVM 
implementation)




---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastruct...@apache.org or file a JIRA ticket
with INFRA.
---


[GitHub] cloudstack pull request: CLOUDSTACK-8793 Enable s2s VPN connection...

2015-10-13 Thread pdube
Github user pdube commented on the pull request:

https://github.com/apache/cloudstack/pull/879#issuecomment-147741954
  
Hey guys, 
I have been re-pushing the branch for it to build on Jenkins. It has been 
failing, but it doesn't seem to be related to my fixes (it seems like Jenkins 
issues). It finally worked

To test the fix:
1. Create a project
2. Create 2 vpcs (A and B)
3. Create a VPN gateway on each vpc
4. Create 2 customer gateways (pointing to each vpc's CIDR and vpn gateway)
5. Create a passive vpn connection from A to B
6. Create an active vpn connection form B to A
7. You can now ssh from A to B, or B to A



---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastruct...@apache.org or file a JIRA ticket
with INFRA.
---


[GitHub] cloudstack pull request: CLOUDSTACK-8934 - Default routes not conf...

2015-10-13 Thread karuturi
Github user karuturi commented on the pull request:

https://github.com/apache/cloudstack/pull/923#issuecomment-147749011
  
thanks for running the tests @remibergsma 
should we merge this PR since we have two reviews from @DaanHoogland and 
@remibergsma ?


---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastruct...@apache.org or file a JIRA ticket
with INFRA.
---


Re: 4.6 release

2015-10-13 Thread Rajani Karuturi
current status: we have 6 blockers

CLOUDSTACK-8947: Load Balancer not working with Isolated Networks  -
Wilder Rodrigues  is working on this  (PR will be ready tomorrow)
CLOUDSTACK-8933: SSVm and CPVM do not survive a reboot from API -
unassigned ( KVM specific issue. I spent sometime on it but, couldnt get to
the root cause. *Any KVM expert who can work on this?* )
CLOUDSTACK-8927: [VPC]Executing command in VR:
/opt/cloud/bin/router_proxy.sh is failing whenever there is a configuration
change in VR - assigned to Wilder
CLOUDSTACK-8934: Default routes not configured for rVPC and RVR - PR 923
from Wilder. It already has test results and LGTM from Remi.
CLOUDSTACK-8923: Create storage network IP range failed, Unknown parameters
: zoneid - Boris is working on this
CLOUDSTACK-8697: Assign VPC Internal LB rule to a VM fails - Michael
Andersen is working on this

Hopefully, we will be able to knock off blockers in this week and create RC
next week.

~Rajani

On Thu, Sep 24, 2015 at 11:45 AM, Rajani Karuturi  wrote:

> (resending in plain text)
>
> Thanks Boris(@borisroman) for fixing 3 blockers.
>
> We now have 7 blockers for the 4.6 release
> https://issues.apache.org/jira/secure/Dashboard.jspa?selectPageId=12326765
>
> Key Summary Assignee Creator
> CLOUDSTACK-8881[Blocker] PF , static nat , LB , egress rules not
> working in case of isolated networksWilder Rodrigues Raja Pullela
>
> CLOUDSTACK-8878 No route to host on VPC router after
> stop/start/rebootWilder Rodrigues Wilder Rodrigues
> CLOUDSTACK-8848Unexpected VR reboot after out-of-band migration
> Unassigned René Moser
> CLOUDSTACK-8843Guest VMs are not getting IPs as the DHCP port is not
> opened in VRJayapal Reddy manasaveloori
> CLOUDSTACK-8808Successfully registered VHD template is downloaded
> again due to missing virtualsize property in template.properties
> Unassigned Remi Bergsma
> CLOUDSTACK-8795  outgoing public traffic blocked in vm created using
> DefaultIsolatedNetworkOfferingWithSourceNatService  Wilder Rodrigues
> Rajani Karuturi
> CLOUDSTACK-8697   Assign VPC Internal LB rule to a VM fails  Wilder
> Rodrigues Pavan Kumar Bandarupally
>
> Once these are out of the way, we can start on first RC.
>
> Let us all work together on getting 4.6 out.
>
> Thanks,
> ~Rajani
>
>
>> On Wed, Sep 16, 2015 at 11:47 AM, Rajani Karuturi 
>> wrote:
>>
>>> Hi all,
>>> There is little progress on 4.6 blockers this week. To release 4.6, we
>>> all should come together and fix the blockers. In recent days, master has
>>> broken multiple times with compilation failures/regressions. If master
>>> breaks, time spent on figuring out what happened and fixing it is time
>>> *not* spent on 4.6.
>>>
>>> Here is what we propose:
>>>
>>> 1. Only BLOCKER fixes to master. If there's something else that needs to
>>> get in, it can be discussed with the RMs on a case-by-case basis.
>>> 2. Atleast one of the reviewers of a PR should do the actual tests. We
>>> do not have good CI in place and travis just does simulator tests. Until we
>>> have a real hypervisor CI in place, manually testing the PR is a must.
>>> Also, LGTM(or +1) should be accompanied with whats tested and why you are
>>> giving LGTM.
>>>
>>> Let us all work together on getting 4.6 out.
>>>
>>> Thanks
>>>
>>> Regards from the 4.6 RMs,
>>> Remi and Rajani.
>>>
>>>
>>>
>>> On Thu, Sep 10, 2015 at 2:52 PM, Remi Bergsma <
>>> rberg...@schubergphilis.com> wrote:
>>>
 Hi all,


 A lot of work is being done to make 4.6 ready for a release. It's great
 to see it's getting better every day!


 Today Rajani and myself looked at all blocker and critical issues on
 4.6. We decided to bump some of them to blocker. Two more issues need to
 verified against current master. In case still broken, they will be marked
 blocker as well. This means we'll have 6-8 blocker issues to resolve. Most
 of them are virtual router related and we feel we cannot do a RC without
 properly fixing them.


 If you have some time, please:


 Look at the 4.6 release dashboard:


 https://issues.apache.org/jira/secure/Dashboard.jspa?selectPageId=12326765


 Fix one of the blockers (or critical issues):

 https://issues.apache.org/jira/browse/CLOUDSTACK-8697?filter=12332940


 It also helps if people help reviewing PRs:

 https://github.com/apache/cloudstack/pulls


 Apart from these issues, 4.6 (aka master) is pretty stable. Feel free
 to test-drive it and verify your key functionality.


 Thanks!


 Regards from the 4.6 RMs,


 Rajani / Remi


>>>
>>
>


[GitHub] cloudstack pull request: CLOUDSTACK-8934 - Default routes not conf...

2015-10-13 Thread remibergsma
Github user remibergsma commented on the pull request:

https://github.com/apache/cloudstack/pull/923#issuecomment-147780057
  
Let's wait for the test results of @borisroman as he said he was testing as 
well. 
@borisroman if you are no longer testing, please let us know.


---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastruct...@apache.org or file a JIRA ticket
with INFRA.
---


BVT Report 10/14

2015-10-13 Thread Raja Pullela
BVT Report - 10/14;  No change from earlier report - 10/5

-  Simulator Basic - 100%

-  Simulator Adv - 100%

-  XS Basic - 98.6%, 1 failure

-  XS Adv - 95.5%, 5 failures

-  KVM Basic - 94.2%, 4 failures

-  KVM Adv - 92.6%, 8 failures

Working with Kishan, Rajani on failures related to test_ssvm/reboot_ssvm/cpvm 
(2 tests) and test_loadbalance failures (3 tests).
Hope to see KVM and XS - Adv passrates to improve in the next day or two?

best,
Raja


Tests failed

XS Basic - 1 failure

-  integration.smoke.test_volumes.TestVolumes.test_02_attach_volume

XS Adv - 5 failures

-  :setup

-  
integration.smoke.test_loadbalance.TestLoadBalance.test_01_create_lb_rule_src_nat

-  
integration.smoke.test_loadbalance.TestLoadBalance.test_02_create_lb_rule_non_nat

-  
integration.smoke.test_loadbalance.TestLoadBalance.test_assign_and_removal_lb

-  integration.smoke.test_internal_lb.TestInternalLb.test_internallb

KVM Basic - 4 Failures

-  
integration.smoke.test_vm_life_cycle.TestVMLifeCycle.test_10_attachAndDetach_iso

-  integration.smoke.test_volumes.TestVolumes.test_02_attach_volume

-  integration.smoke.test_ssvm.TestSSVMs.test_07_reboot_ssvm

-  integration.smoke.test_ssvm.TestSSVMs.test_08_reboot_cpvm

KVM Advanced - 8 Failures

-  
integration.smoke.test_loadbalance.TestLoadBalance.test_01_create_lb_rule_src_nat

-  
integration.smoke.test_loadbalance.TestLoadBalance.test_02_create_lb_rule_non_nat

-  
integration.smoke.test_loadbalance.TestLoadBalance.test_assign_and_removal_lb

-  :setup

-  
integration.smoke.test_snapshots.TestSnapshotRootDisk.test_01_snapshot_root_disk

-  integration.smoke.test_ssvm.TestSSVMs.test_07_reboot_ssvm

-  integration.smoke.test_ssvm.TestSSVMs.test_08_reboot_cpvm

-  integration.smoke.test_internal_lb.TestInternalLb.test_internallb



Time to create 4.6 branch ?

2015-10-13 Thread Wei ZHOU
Guys,

As I know, 4.6 will be close to RC. I am wondering if it is time to create
4.6 branch, so that we can add the upgrade path to next version and new
features/improvements can be merged into master branch (to keep a clean 4.6
branch).

By the way, which is the new version? 4.7 or 5.0 ?


-Wei


Re: Time to create 4.6 branch ?

2015-10-13 Thread Boris Schrijver
Dear Wei.

In the new release process we are releasing directly from master. So no 4.6
branch will be created.

As we are releasing directly from master, it is now frozen till release.

-- 

Met vriendelijke groet / Kind regards,

Boris Schrijver

PCextreme B.V.

http://www.pcextreme.nl/contact
Tel direct: +31 6 33784542

> 
> On October 13, 2015 at 9:26 PM Wei ZHOU  wrote:
> 
> 
> Guys,
> 
> As I know, 4.6 will be close to RC. I am wondering if it is time to create
> 4.6 branch, so that we can add the upgrade path to next version and new
> features/improvements can be merged into master branch (to keep a clean
> 4.6
> branch).
> 
> By the way, which is the new version? 4.7 or 5.0 ?
> 
> 
> -Wei
> 

Re: Time to create 4.6 branch ?

2015-10-13 Thread Wei ZHOU
Dear Boris,

Thanks for your quick reply.
so maybe no 4.6.1 in the future?



2015-10-13 20:47 GMT+01:00 Boris Schrijver :

> Dear Wei.
>
> In the new release process we are releasing directly from master. So no 4.6
> branch will be created.
>
> As we are releasing directly from master, it is now frozen till release.
>
> --
>
> Met vriendelijke groet / Kind regards,
>
> Boris Schrijver
>
> PCextreme B.V.
>
> http://www.pcextreme.nl/contact
> Tel direct: +31 6 33784542
>
> >
> > On October 13, 2015 at 9:26 PM Wei ZHOU 
> wrote:
> >
> >
> > Guys,
> >
> > As I know, 4.6 will be close to RC. I am wondering if it is time to
> create
> > 4.6 branch, so that we can add the upgrade path to next version and
> new
> > features/improvements can be merged into master branch (to keep a
> clean
> > 4.6
> > branch).
> >
> > By the way, which is the new version? 4.7 or 5.0 ?
> >
> >
> > -Wei
> >
>


Re: Time to create 4.6 branch ?

2015-10-13 Thread Pierre-Luc Dion
Hi, we have the same under has Boris where all new release would be done on
master. Do we have any wikipage explaining the new release cycle, Wei have
a good point...

Cheers,
On Oct 13, 2015 15:57, "Wei ZHOU"  wrote:

> Dear Boris,
>
> Thanks for your quick reply.
> so maybe no 4.6.1 in the future?
>
>
>
> 2015-10-13 20:47 GMT+01:00 Boris Schrijver :
>
> > Dear Wei.
> >
> > In the new release process we are releasing directly from master. So no
> 4.6
> > branch will be created.
> >
> > As we are releasing directly from master, it is now frozen till release.
> >
> > --
> >
> > Met vriendelijke groet / Kind regards,
> >
> > Boris Schrijver
> >
> > PCextreme B.V.
> >
> > http://www.pcextreme.nl/contact
> > Tel direct: +31 6 33784542
> >
> > >
> > > On October 13, 2015 at 9:26 PM Wei ZHOU 
> > wrote:
> > >
> > >
> > > Guys,
> > >
> > > As I know, 4.6 will be close to RC. I am wondering if it is time to
> > create
> > > 4.6 branch, so that we can add the upgrade path to next version and
> > new
> > > features/improvements can be merged into master branch (to keep a
> > clean
> > > 4.6
> > > branch).
> > >
> > > By the way, which is the new version? 4.7 or 5.0 ?
> > >
> > >
> > > -Wei
> > >
> >
>


[GitHub] cloudstack pull request: CLOUDSTACK-8934 - Default routes not conf...

2015-10-13 Thread borisroman
Github user borisroman commented on the pull request:

https://github.com/apache/cloudstack/pull/923#issuecomment-147841813
  
@remibergsma @karuturi @wilderrodrigues @DaanHoogland I tested this PR 
today. Tests ran fine except for the cleanups (which are known by 
CLOUDSTACK-8935). I'll spare the space of this comment as all test results 
already have been posted twice by Wilder and Remi. I also ran the 
test_loadbalance.py which turned out positive.

Test to create Load balancing rule with source NAT ... === TestName: 
test_01_create_lb_rule_src_nat | Status : SUCCESS ===
ok
Test to create Load balancing rule with non source NAT ... === TestName: 
test_02_create_lb_rule_non_nat | Status : SUCCESS ===
ok
Test for assign & removing load balancing rule ... === TestName: 
test_assign_and_removal_lb | Status : SUCCESS ===
ok

--
Ran 3 tests in 633.239s

OK
/tmp//MarvinLogs/test_loadbalance_HD34OP/results.txt 

Code (style) changes look good to me.

To conclude: LGTM :+1: 


---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastruct...@apache.org or file a JIRA ticket
with INFRA.
---


Re: Time to create 4.6 branch ?

2015-10-13 Thread Sebastien Goasguen
Wei might have a point, however:

1-We still have blockers, and one is unassigned, the others are on Wilder’s 
plate. So there is still work to get done on the blockers and work to help 
Wilder.

2-If you don’t work on blockers you can start testing master as if it was RC 
and getting ready to vote, you might uncover other blockers

3-We have tons of PR that need reviews, and issues that need triage. So taking 
bit of time to look at JIRA and clean up will be a great bonus to the project.

4-if you still don’t know what to do :) you can keep working on your new 
features for 4.7 and make sure they are rebased, with unit tests and new marvin 
tests to get ready to merge.

5-if you still don’t know what to do, you might help with release notes and 
documentation to be ready for 4.6 release.

6-if all that is unexciting you can prepare the upgrade path. How we do it is 
up for grabs. I think there will be a 4.6 branch once the RC passes.

-seb


> On Oct 13, 2015, at 10:15 PM, Pierre-Luc Dion  wrote:
> 
> Hi, we have the same under has Boris where all new release would be done on
> master. Do we have any wikipage explaining the new release cycle, Wei have
> a good point...
> 
> Cheers,
> On Oct 13, 2015 15:57, "Wei ZHOU"  wrote:
> 
>> Dear Boris,
>> 
>> Thanks for your quick reply.
>> so maybe no 4.6.1 in the future?
>> 
>> 
>> 
>> 2015-10-13 20:47 GMT+01:00 Boris Schrijver :
>> 
>>> Dear Wei.
>>> 
>>> In the new release process we are releasing directly from master. So no
>> 4.6
>>> branch will be created.
>>> 
>>> As we are releasing directly from master, it is now frozen till release.
>>> 
>>> --
>>> 
>>> Met vriendelijke groet / Kind regards,
>>> 
>>> Boris Schrijver
>>> 
>>> PCextreme B.V.
>>> 
>>> http://www.pcextreme.nl/contact
>>> Tel direct: +31 6 33784542
>>> 
 
On October 13, 2015 at 9:26 PM Wei ZHOU 
>>> wrote:
 
 
Guys,
 
As I know, 4.6 will be close to RC. I am wondering if it is time to
>>> create
4.6 branch, so that we can add the upgrade path to next version and
>>> new
features/improvements can be merged into master branch (to keep a
>>> clean
 4.6
branch).
 
By the way, which is the new version? 4.7 or 5.0 ?
 
 
-Wei
 
>>> 
>> 



[GitHub] cloudstack pull request: CLOUDSTACK-8934 - Default routes not conf...

2015-10-13 Thread asfgit
Github user asfgit closed the pull request at:

https://github.com/apache/cloudstack/pull/923


---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastruct...@apache.org or file a JIRA ticket
with INFRA.
---


[GitHub] cloudstack pull request: Quota

2015-10-13 Thread jburwell
Github user jburwell commented on a diff in the pull request:

https://github.com/apache/cloudstack/pull/768#discussion_r41923673
  
--- Diff: 
plugins/database/quota/src/org/apache/cloudstack/quota/QuotaServiceImpl.java ---
@@ -0,0 +1,304 @@
+//Licensed to the Apache Software Foundation (ASF) under one
+//or more contributor license agreements.  See the NOTICE file
+//distributed with this work for additional information
+//regarding copyright ownership.  The ASF licenses this file
+//to you under the Apache License, Version 2.0 (the
+//"License"); you may not use this file except in compliance
+//with the License.  You may obtain a copy of the License at
+//
+//http://www.apache.org/licenses/LICENSE-2.0
+//
+//Unless required by applicable law or agreed to in writing,
+//software distributed under the License is distributed on an
+//"AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+//KIND, either express or implied.  See the License for the
+//specific language governing permissions and limitations
+//under the License.
+package org.apache.cloudstack.quota;
+
+import com.cloud.configuration.Config;
+import com.cloud.domain.dao.DomainDao;
+import com.cloud.exception.InvalidParameterValueException;
+import com.cloud.exception.PermissionDeniedException;
+import com.cloud.user.Account;
+import com.cloud.user.AccountVO;
+import com.cloud.user.dao.AccountDao;
+import com.cloud.utils.component.ManagerBase;
+import com.cloud.utils.db.Filter;
+import com.cloud.utils.db.TransactionLegacy;
+
+import org.apache.cloudstack.api.command.QuotaBalanceCmd;
+import org.apache.cloudstack.api.command.QuotaCreditsCmd;
+import org.apache.cloudstack.api.command.QuotaEmailTemplateUpdateCmd;
+import org.apache.cloudstack.api.command.QuotaEmailTemplateListCmd;
+import org.apache.cloudstack.api.command.QuotaStatementCmd;
+import org.apache.cloudstack.api.command.QuotaTariffListCmd;
+import org.apache.cloudstack.api.command.QuotaTariffUpdateCmd;
+import org.apache.cloudstack.api.response.QuotaResponseBuilder;
+import org.apache.cloudstack.context.CallContext;
+import org.apache.cloudstack.framework.config.ConfigKey;
+import org.apache.cloudstack.framework.config.Configurable;
+import org.apache.cloudstack.framework.config.dao.ConfigurationDao;
+import org.apache.cloudstack.quota.constant.QuotaConfig;
+import org.apache.cloudstack.quota.dao.QuotaAccountDao;
+import org.apache.cloudstack.quota.dao.QuotaBalanceDao;
+import org.apache.cloudstack.quota.dao.QuotaUsageDao;
+import org.apache.cloudstack.quota.vo.QuotaAccountVO;
+import org.apache.cloudstack.quota.vo.QuotaBalanceVO;
+import org.apache.cloudstack.quota.vo.QuotaUsageVO;
+import org.apache.cloudstack.utils.usage.UsageUtils;
+import org.apache.log4j.Logger;
+import org.springframework.stereotype.Component;
+
+import javax.ejb.Local;
+import javax.inject.Inject;
+import javax.naming.ConfigurationException;
+
+import java.math.BigDecimal;
+import java.util.ArrayList;
+import java.util.Calendar;
+import java.util.Date;
+import java.util.List;
+import java.util.Map;
+import java.util.TimeZone;
+
+@Component
+@Local(value = QuotaService.class)
+public class QuotaServiceImpl extends ManagerBase implements QuotaService, 
Configurable, QuotaConfig {
+private static final Logger s_logger = 
Logger.getLogger(QuotaServiceImpl.class.getName());
+
+@Inject
+private AccountDao _accountDao;
+@Inject
+private QuotaAccountDao _quotaAcc;
+@Inject
+private QuotaUsageDao _quotaUsageDao;
+@Inject
+private DomainDao _domainDao;
+@Inject
+private ConfigurationDao _configDao;
+@Inject
+private QuotaBalanceDao _quotaBalanceDao;
+@Inject
+private QuotaResponseBuilder _respBldr;
+
+private TimeZone _usageTimezone;
+private int _aggregationDuration = 0;
+
+final static BigDecimal s_hoursInMonth = new BigDecimal(30 * 24);
+final static BigDecimal s_minutesInMonth = new BigDecimal(30 * 24 * 
60);
+final static BigDecimal s_gb = new BigDecimal(1024 * 1024 * 1024);
+
+public QuotaServiceImpl() {
+super();
+}
+
+@Override
+public boolean configure(String name, Map params) 
throws ConfigurationException {
+super.configure(name, params);
+String timeZoneStr = 
_configDao.getValue(Config.UsageAggregationTimezone.toString());
+String aggregationRange = 
_configDao.getValue(Config.UsageStatsJobAggregationRange.toString());
+if (timeZoneStr == null) {
+timeZoneStr = "GMT";
+}
+_usageTimezone = TimeZone.getTimeZone(timeZoneStr);
  

[GitHub] cloudstack pull request: Quota

2015-10-13 Thread jburwell
Github user jburwell commented on a diff in the pull request:

https://github.com/apache/cloudstack/pull/768#discussion_r41923847
  
--- Diff: 
plugins/database/quota/src/org/apache/cloudstack/quota/QuotaServiceImpl.java ---
@@ -0,0 +1,301 @@
+//Licensed to the Apache Software Foundation (ASF) under one
+//or more contributor license agreements.  See the NOTICE file
+//distributed with this work for additional information
+//regarding copyright ownership.  The ASF licenses this file
+//to you under the Apache License, Version 2.0 (the
+//"License"); you may not use this file except in compliance
+//with the License.  You may obtain a copy of the License at
+//
+//http://www.apache.org/licenses/LICENSE-2.0
+//
+//Unless required by applicable law or agreed to in writing,
+//software distributed under the License is distributed on an
+//"AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+//KIND, either express or implied.  See the License for the
+//specific language governing permissions and limitations
+//under the License.
+package org.apache.cloudstack.quota;
+
+import com.cloud.configuration.Config;
+import com.cloud.domain.dao.DomainDao;
+import com.cloud.exception.InvalidParameterValueException;
+import com.cloud.exception.PermissionDeniedException;
+import com.cloud.user.Account;
+import com.cloud.user.AccountVO;
+import com.cloud.user.dao.AccountDao;
+import com.cloud.utils.component.ManagerBase;
+import com.cloud.utils.db.Filter;
+import com.cloud.utils.db.TransactionLegacy;
+
+import org.apache.cloudstack.api.command.QuotaBalanceCmd;
+import org.apache.cloudstack.api.command.QuotaCreditsCmd;
+import org.apache.cloudstack.api.command.QuotaEmailTemplateUpdateCmd;
+import org.apache.cloudstack.api.command.QuotaEmailTemplateListCmd;
+import org.apache.cloudstack.api.command.QuotaStatementCmd;
+import org.apache.cloudstack.api.command.QuotaTariffListCmd;
+import org.apache.cloudstack.api.command.QuotaTariffUpdateCmd;
+import org.apache.cloudstack.api.response.QuotaResponseBuilder;
+import org.apache.cloudstack.context.CallContext;
+import org.apache.cloudstack.framework.config.ConfigKey;
+import org.apache.cloudstack.framework.config.Configurable;
+import org.apache.cloudstack.framework.config.dao.ConfigurationDao;
+import org.apache.cloudstack.quota.constant.QuotaConfig;
+import org.apache.cloudstack.quota.dao.QuotaAccountDao;
+import org.apache.cloudstack.quota.dao.QuotaBalanceDao;
+import org.apache.cloudstack.quota.dao.QuotaUsageDao;
+import org.apache.cloudstack.quota.vo.QuotaAccountVO;
+import org.apache.cloudstack.quota.vo.QuotaBalanceVO;
+import org.apache.cloudstack.quota.vo.QuotaUsageVO;
+import org.apache.cloudstack.utils.usage.UsageUtils;
+import org.apache.log4j.Logger;
+import org.springframework.stereotype.Component;
+
+import javax.ejb.Local;
+import javax.inject.Inject;
+import javax.naming.ConfigurationException;
+
+import java.math.BigDecimal;
+import java.util.ArrayList;
+import java.util.Calendar;
+import java.util.Date;
+import java.util.List;
+import java.util.Map;
+import java.util.TimeZone;
+
+@Component
+@Local(value = QuotaService.class)
+public class QuotaServiceImpl extends ManagerBase implements QuotaService, 
Configurable, QuotaConfig {
+private static final Logger s_logger = 
Logger.getLogger(QuotaServiceImpl.class);
+
+@Inject
+private AccountDao _accountDao;
+@Inject
+private QuotaAccountDao _quotaAcc;
+@Inject
+private QuotaUsageDao _quotaUsageDao;
+@Inject
+private DomainDao _domainDao;
+@Inject
+private ConfigurationDao _configDao;
+@Inject
+private QuotaBalanceDao _quotaBalanceDao;
+@Inject
+private QuotaResponseBuilder _respBldr;
+
+private TimeZone _usageTimezone;
+private int _aggregationDuration = 0;
+
+public QuotaServiceImpl() {
+super();
+}
+
+@Override
+public boolean configure(String name, Map params) 
throws ConfigurationException {
+super.configure(name, params);
+String timeZoneStr = 
_configDao.getValue(Config.UsageAggregationTimezone.toString());
+String aggregationRange = 
_configDao.getValue(Config.UsageStatsJobAggregationRange.toString());
+if (timeZoneStr == null) {
+timeZoneStr = "GMT";
+}
+_usageTimezone = TimeZone.getTimeZone(timeZoneStr);
+
+_aggregationDuration = Integer.parseInt(aggregationRange);
+if (_aggregationDuration < UsageUtils.USAGE_AGGREGATION_RANGE_MIN) 
{
+s_logger.warn("Usage stats job aggregation range is to small, 
using the m

Build failed in Jenkins: build-master-jdk18 #365

2015-10-13 Thread jenkins
See 

Changes:

[wrodrigues] CLOUDSTACK-8934 - Add default gateway when the public interface is 
up again

[wrodrigues] CLOUDSTACK-8934 - Adding tests to cover default routes on IsoNest 
and RVR nets

[wrodrigues] CLOUDSTACK-8934 - Fix default EGRESS rules for isolated networks

[wrodrigues] CLOUDSTACK-8934 - Fix the AclIP class to make it configure the 
default FW policy

--
[...truncated 398 lines...]
Tests run: 2, Failures: 0, Errors: 0, Skipped: 0, Time elapsed: 0.056 sec - in 
com.cloud.utils.UuidUtilsTest
Running com.cloud.utils.crypto.RSAHelperTest
2015-10-13 21:08:19,324 INFO  [utils.crypt.RSAHelper] (main:) [ignored]error 
during public key encryption: Unsupported format
Tests run: 2, Failures: 0, Errors: 0, Skipped: 0, Time elapsed: 1.083 sec - in 
com.cloud.utils.crypto.RSAHelperTest
Running com.cloud.utils.crypto.EncryptionSecretKeyCheckerTest
2015-10-13 21:08:19,634 DEBUG [utils.crypt.EncryptionSecretKeyChecker] (main:) 
Encryption Type: null
2015-10-13 21:08:19,634 DEBUG [utils.crypt.EncryptionSecretKeyChecker] (main:) 
Encryption Type: file
Tests run: 1, Failures: 0, Errors: 0, Skipped: 0, Time elapsed: 0.04 sec - in 
com.cloud.utils.crypto.EncryptionSecretKeyCheckerTest
Running com.cloud.utils.PropertiesUtilsTest
Tests run: 4, Failures: 0, Errors: 0, Skipped: 0, Time elapsed: 0.033 sec - in 
com.cloud.utils.PropertiesUtilsTest
Running com.cloud.utils.exception.ExceptionUtilTest
Tests run: 1, Failures: 0, Errors: 0, Skipped: 0, Time elapsed: 0.002 sec - in 
com.cloud.utils.exception.ExceptionUtilTest
Running com.cloud.utils.storage.QCOW2UtilsTest
Tests run: 2, Failures: 0, Errors: 0, Skipped: 0, Time elapsed: 0.005 sec - in 
com.cloud.utils.storage.QCOW2UtilsTest
Running com.cloud.utils.encoding.UrlEncoderTest
Tests run: 1, Failures: 0, Errors: 0, Skipped: 0, Time elapsed: 0.003 sec - in 
com.cloud.utils.encoding.UrlEncoderTest
Running com.cloud.utils.UriUtilsTest
Tests run: 2, Failures: 0, Errors: 0, Skipped: 0, Time elapsed: 0.054 sec - in 
com.cloud.utils.UriUtilsTest
Running com.cloud.utils.HttpUtilsTest
Tests run: 2, Failures: 0, Errors: 0, Skipped: 0, Time elapsed: 0.091 sec - in 
com.cloud.utils.HttpUtilsTest
Running com.cloud.utils.backoff.impl.ConstantTimeBackoffTest
2015-10-13 21:08:19,959 INFO  [backoff.impl.ConstantTimeBackoff] (Thread-1:) 
Thread Thread-1 interrupted while waiting for retry
2015-10-13 21:08:20,062 DEBUG [backoff.impl.ConstantTimeBackoffTest] (main:) 
thread started
2015-10-13 21:08:20,062 DEBUG [backoff.impl.ConstantTimeBackoffTest] 
(Thread-2:) before
2015-10-13 21:08:20,163 DEBUG [backoff.impl.ConstantTimeBackoffTest] (main:) 
testing wakeup
Tests run: 6, Failures: 0, Errors: 0, Skipped: 0, Time elapsed: 0.316 sec - in 
com.cloud.utils.backoff.impl.ConstantTimeBackoffTest
2015-10-13 21:08:20,164 INFO  [backoff.impl.ConstantTimeBackoff] (Thread-2:) 
Thread Thread-2 interrupted while waiting for retry
Running com.cloud.utils.ProcessUtilTest
2015-10-13 21:08:20,164 DEBUG [backoff.impl.ConstantTimeBackoffTest] 
(Thread-2:) after
2015-10-13 21:08:20,170 DEBUG [cloud.utils.ProcessUtil] (main:) 
environment.properties could not be opened
2015-10-13 21:08:20,178 DEBUG [cloud.utils.ProcessUtil] (main:) 
environment.properties could not be opened
2015-10-13 21:08:20,179 DEBUG [cloud.utils.ProcessUtil] (main:) Executing: bash 
-c ps -p 123456 
2015-10-13 21:08:20,275 DEBUG [cloud.utils.ProcessUtil] (main:) Exit value is 1
2015-10-13 21:08:20,278 DEBUG [cloud.utils.ProcessUtil] (main:)   PID TTY   
   TIME CMD
2015-10-13 21:08:20,279 DEBUG [cloud.utils.ProcessUtil] (main:) Executing: bash 
-c echo $PPID 
2015-10-13 21:08:20,281 DEBUG [cloud.utils.ProcessUtil] (main:) Execution is 
successful.
2015-10-13 21:08:20,288 DEBUG [cloud.utils.ProcessUtil] (main:) 
environment.properties could not be opened
Tests run: 3, Failures: 0, Errors: 0, Skipped: 0, Time elapsed: 0.136 sec - in 
com.cloud.utils.ProcessUtilTest
Running com.cloud.utils.PasswordGeneratorTest
Tests run: 1, Failures: 0, Errors: 0, Skipped: 0, Time elapsed: 0 sec - in 
com.cloud.utils.PasswordGeneratorTest
Running com.cloud.utils.rest.HttpUriRequestBuilderTest
Tests run: 7, Failures: 0, Errors: 0, Skipped: 0, Time elapsed: 0.049 sec - in 
com.cloud.utils.rest.HttpUriRequestBuilderTest
Running com.cloud.utils.rest.HttpStatusCodeHelperTest
Tests run: 2, Failures: 0, Errors: 0, Skipped: 0, Time elapsed: 0.001 sec - in 
com.cloud.utils.rest.HttpStatusCodeHelperTest
Running com.cloud.utils.rest.RESTServiceConnectorTest
2015-10-13 21:08:20,592 DEBUG [utils.rest.RESTServiceConnector] (main:) 
Executing retrieve object on /somepath
2015-10-13 21:08:20,592 DEBUG [utils.rest.BasicRestClient] (main:) Executig GET 
request on https://localhost:443/somepath
2015-10-13 21:08:20,603 DEBUG [utils.rest.RESTServiceConnector] (main:) 
Executed request: GET /somepath HTTP/1.1 status was HTTP/1.1 200 OK
2015-10-13 21:08:20,6

Re: Time to create 4.6 branch ?

2015-10-13 Thread Remi Bergsma
There indeed will be a 4.6 branch once 4.6RC passes and 4.6.0 is released. From 
this branch we will create 4.6.x releases.

The process is documented here:
https://cwiki.apache.org/confluence/display/CLOUDSTACK/Release+principles+for+Apache+CloudStack+4.6+and+up


Regards,
Remi





On 13/10/15 22:27, "Sebastien Goasguen"  wrote:

>Wei might have a point, however:
>
>1-We still have blockers, and one is unassigned, the others are on Wilder’s 
>plate. So there is still work to get done on the blockers and work to help 
>Wilder.
>
>2-If you don’t work on blockers you can start testing master as if it was RC 
>and getting ready to vote, you might uncover other blockers
>
>3-We have tons of PR that need reviews, and issues that need triage. So taking 
>bit of time to look at JIRA and clean up will be a great bonus to the project.
>
>4-if you still don’t know what to do :) you can keep working on your new 
>features for 4.7 and make sure they are rebased, with unit tests and new 
>marvin tests to get ready to merge.
>
>5-if you still don’t know what to do, you might help with release notes and 
>documentation to be ready for 4.6 release.
>
>6-if all that is unexciting you can prepare the upgrade path. How we do it is 
>up for grabs. I think there will be a 4.6 branch once the RC passes.
>
>-seb
>
>
>> On Oct 13, 2015, at 10:15 PM, Pierre-Luc Dion  wrote:
>> 
>> Hi, we have the same under has Boris where all new release would be done on
>> master. Do we have any wikipage explaining the new release cycle, Wei have
>> a good point...
>> 
>> Cheers,
>> On Oct 13, 2015 15:57, "Wei ZHOU"  wrote:
>> 
>>> Dear Boris,
>>> 
>>> Thanks for your quick reply.
>>> so maybe no 4.6.1 in the future?
>>> 
>>> 
>>> 
>>> 2015-10-13 20:47 GMT+01:00 Boris Schrijver :
>>> 
 Dear Wei.
 
 In the new release process we are releasing directly from master. So no
>>> 4.6
 branch will be created.
 
 As we are releasing directly from master, it is now frozen till release.
 
 --
 
 Met vriendelijke groet / Kind regards,
 
 Boris Schrijver
 
 PCextreme B.V.
 
 http://www.pcextreme.nl/contact
 Tel direct: +31 6 33784542
 
> 
>On October 13, 2015 at 9:26 PM Wei ZHOU 
 wrote:
> 
> 
>Guys,
> 
>As I know, 4.6 will be close to RC. I am wondering if it is time to
 create
>4.6 branch, so that we can add the upgrade path to next version and
 new
>features/improvements can be merged into master branch (to keep a
 clean
> 4.6
>branch).
> 
>By the way, which is the new version? 4.7 or 5.0 ?
> 
> 
>-Wei
> 
 
>>> 
>


[GitHub] cloudstack pull request: [4.7] secure and hidden config values are...

2015-10-13 Thread karuturi
GitHub user karuturi opened a pull request:

https://github.com/apache/cloudstack/pull/927

[4.7] secure and hidden config values are returned as plaintext string

secure and hidden config values are first unencrypted before returning
them in the api. This is not desired as they are secure configs
returning encrypted strings for secure and hidden configs if encryption
is enabled.

Will update the test results/testing later.

You can merge this pull request into a Git repository by running:

$ git pull https://github.com/karuturi/cloudstack secure-configs

Alternatively you can review and apply these changes as the patch at:

https://github.com/apache/cloudstack/pull/927.patch

To close this pull request, make a commit to your master/trunk branch
with (at least) the following in the commit message:

This closes #927


commit 1e4ea03fe86e976507929cb54dd0a3cba9f6bb13
Author: Rajani Karuturi 
Date:   2015-10-06T10:33:22Z

secure and hidden config values are returned as plaintext string

secure and hidden config values are first unencrypted before returning
them in the api. This is not desired as they are secure configs
returning encrypted strings for secure and hidden configs if encryption
is enabled.




---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastruct...@apache.org or file a JIRA ticket
with INFRA.
---


[GitHub] cloudstack pull request: [4.7] CLOUDSTACK-8950 Hypervisor Paramete...

2015-10-13 Thread karuturi
GitHub user karuturi opened a pull request:

https://github.com/apache/cloudstack/pull/928

[4.7] CLOUDSTACK-8950 Hypervisor Parameter check is not performed for 
registerTemplate and getUploadParamsForTemplate API's

Any string is allowed as hypervisor type from the api.
HypervisorType.getType() tries to validates with the enums and if nothing
matches sets the type as None.

Added a check to not allow None hypervisor type when registering.

will update test results and testing done later.

You can merge this pull request into a Git repository by running:

$ git pull https://github.com/karuturi/cloudstack CLOUDSTACK-8950

Alternatively you can review and apply these changes as the patch at:

https://github.com/apache/cloudstack/pull/928.patch

To close this pull request, make a commit to your master/trunk branch
with (at least) the following in the commit message:

This closes #928


commit fed3b1f909b2acb17e48e1e5fd013e751593addc
Author: Rajani Karuturi 
Date:   2015-10-06T11:26:50Z

CLOUDSTACK-8950 Hypervisor Parameter check is not performed for
registerTemplate and getUploadParamsForTemplate API's

Any string is allowed as hypervisor type from the api.
Hypervisor.getType() tries to validate with the enums and if nothing
matches set the type as None.

Added a check to not allow None hypervisor type when registering.




---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastruct...@apache.org or file a JIRA ticket
with INFRA.
---


[GitHub] cloudstack pull request: [4.7] CLOUDSTACK-8951: validation for con...

2015-10-13 Thread karuturi
GitHub user karuturi opened a pull request:

https://github.com/apache/cloudstack/pull/929

[4.7] CLOUDSTACK-8951: validation for config param 
"remote.access.vpn.psk.length"

throwing error for value < 8 and value > 256
right now, 8, 256 are hardcoded in the code. They should be moved to a
constant and has to be reused everywhere.

will update with test cases/testing later.

You can merge this pull request into a Git repository by running:

$ git pull https://github.com/karuturi/cloudstack CLOUDSTACK-8951

Alternatively you can review and apply these changes as the patch at:

https://github.com/apache/cloudstack/pull/929.patch

To close this pull request, make a commit to your master/trunk branch
with (at least) the following in the commit message:

This closes #929


commit 8a6ab21b88d2fb09b147289062e4046dfee8d418
Author: Rajani Karuturi 
Date:   2015-10-06T11:27:39Z

CLOUDSTACK-8951: validation for "remote.access.vpn.psk.length"

throwing error for value < 8 and value > 256
right now, 8, 256 are hardcoded in the code. They should be moved to a
constant and has to be reused everywhere.




---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastruct...@apache.org or file a JIRA ticket
with INFRA.
---


[GitHub] cloudstack pull request: Add all tests in /test/integration/smoke ...

2015-10-13 Thread kishankavala
Github user kishankavala commented on the pull request:

https://github.com/apache/cloudstack/pull/920#issuecomment-147944007
  
@runseb @pvr9711 @sanjeevneelarapu 
Can we include all regression simulator tests also?


---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastruct...@apache.org or file a JIRA ticket
with INFRA.
---


[GitHub] cloudstack pull request: CLOUDSTACK-8933 SSVm and CPVM do not surv...

2015-10-13 Thread bvbharatk
GitHub user bvbharatk opened a pull request:

https://github.com/apache/cloudstack/pull/930

CLOUDSTACK-8933 SSVm and CPVM do not survive a reboot from API

The issue is because we loop infinitely when we do not receive any cmdline 
data during reboots. The current fix is to attempt one time to read the 
commadline data, the data is not there we check if the cmdline is already 
populated. If is already there we continue with the existing command line.

This fix will work in case of reboots, but in case of stop and start if the 
cmdline changes and we do not get it on first read we will end up using the old 
cmdline data instead of the new one. I am not sure if the cmd data will change 
on start stop.  One way to fix this will be to send some data in the cmdline on 
reboot to say that we can use the existing data in the cmdline. I am not sure 
if this a good way to fix it.

Please let me know if there is a better way to do this.

You can merge this pull request into a Git repository by running:

$ git pull https://github.com/bvbharatk/cloudstack CLOUDSTACK-8933

Alternatively you can review and apply these changes as the patch at:

https://github.com/apache/cloudstack/pull/930.patch

To close this pull request, make a commit to your master/trunk branch
with (at least) the following in the commit message:

This closes #930


commit 2fd8ab0b4852e792607b8ae4431d4537e98e6fea
Author: Bharat Kumar 
Date:   2014-12-24T11:18:55Z

CLOUDSTACK-8933 SSVm and CPVM do not survive a reboot from API




---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastruct...@apache.org or file a JIRA ticket
with INFRA.
---


Re: [GitHub] cloudstack pull request: Add all tests in /test/integration/smoke ...

2015-10-13 Thread Sanjeev N
@kishankavala,
Big no , because simulator regression suite takes almost 6 hours to
complete.

On Wed, Oct 14, 2015 at 11:24 AM, kishankavala  wrote:

> Github user kishankavala commented on the pull request:
>
> https://github.com/apache/cloudstack/pull/920#issuecomment-147944007
>
> @runseb @pvr9711 @sanjeevneelarapu
> Can we include all regression simulator tests also?
>
>
> ---
> If your project is set up for it, you can reply to this email and have your
> reply appear on GitHub as well. If your project does not have this feature
> enabled and wishes so, or if the feature is enabled but not working, please
> contact infrastructure at infrastruct...@apache.org or file a JIRA ticket
> with INFRA.
> ---
>


[GitHub] cloudstack pull request: Usage event fixes for deleted accounts

2015-10-13 Thread kishankavala
Github user kishankavala commented on the pull request:

https://github.com/apache/cloudstack/pull/924#issuecomment-147945829
  
@remibergsma We not have any tests that will check for correct events on 
account delete. 
@nnesic Would you be able to add one?


---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastruct...@apache.org or file a JIRA ticket
with INFRA.
---


[GitHub] cloudstack pull request: Add all tests in /test/integration/smoke ...

2015-10-13 Thread kishankavala
Github user kishankavala commented on the pull request:

https://github.com/apache/cloudstack/pull/920#issuecomment-147947974
  
@sanjeevneelarapu 
1. We should look at ways to improve the simulator to run faster.
2. We have PRs open for more than a day in most cases. I would rather wait 
for 6hrs than to have code which might break some functionality.

When we get CI based on real hardware in future, it'll take even more time. 
At that point we can look at running it once a day on latest master instead of 
per PR.



---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastruct...@apache.org or file a JIRA ticket
with INFRA.
---


[GitHub] cloudstack pull request: CLOUDSTACK-8929

2015-10-13 Thread rags22489664
Github user rags22489664 closed the pull request at:

https://github.com/apache/cloudstack/pull/904


---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastruct...@apache.org or file a JIRA ticket
with INFRA.
---


[GitHub] cloudstack pull request: CLOUDSTACK-8929

2015-10-13 Thread rags22489664
Github user rags22489664 commented on the pull request:

https://github.com/apache/cloudstack/pull/904#issuecomment-147951735
  
Sorry for the delayed response, I was attending the conference in Dublin. I 
will make appropriate fix and will open another pull request.


---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastruct...@apache.org or file a JIRA ticket
with INFRA.
---