[GitHub] cloudstack pull request: Customer escalations

2015-08-21 Thread shwetaag
GitHub user shwetaag opened a pull request:

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

Customer escalations

Automated two test cases and modified one testcase
First one is  to verify correct guest os mapping in vmware for CentOS 5.9 
and above
Step1 :Register an CentOS 6.3 template
Step2 :Launch a VM
Step3: Try to attach VMware Tools ISO
Step4: Verify VMware tools ISO attached correctly
Second one is 
 Verify FTP modules are loaded in VR of advance zone
step1 : create a VR in advance zone
step2: Verify FTP modules are there in created VR
and modified test case for listing default ISO which was not codded 
correctly and hence not giving error even after failing


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

$ git pull https://github.com/shwetaag/cloudstack customer_escalations

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

https://github.com/apache/cloudstack/pull/724.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 #724


commit d1311b90ac0764bd137f7140572a71a7b33da10c
Author: shweta agarwal 
Date:   2015-07-30T11:57:22Z

test case automated for list template pagination

commit 4ff606bce8d587c91a1bef2447ac109ec23b3ebc
Author: shweta agarwal 
Date:   2015-08-10T11:18:03Z

additional verification added

commit f05fec9044c28db6802c9c1c593b11424cf79294
Author: shweta agarwal 
Date:   2015-08-19T05:28:02Z

Merge branch 'master' of https://git-wip-us.apache.org/repos/asf/cloudstack 
into customer_escalations

commit 9dacbd615276fbc33d6d37a5fe6c2a181a49ce2a
Author: shweta agarwal 
Date:   2015-08-21T07:19:13Z

added 3 test case 39918 38555 22659




---
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-docs-admin pull request: CLOUDSTACK-8592: Quota plugin ...

2015-08-21 Thread DaanHoogland
Github user DaanHoogland commented on a diff in the pull request:

https://github.com/apache/cloudstack-docs-admin/pull/30#discussion_r37615562
  
--- Diff: source/plugins/quota.rst ---
@@ -0,0 +1,189 @@
+.. 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.
+
+
+Quota Plugin 
+=
+
+Quota service, while allowing for scalability, will make sure that the 
cloud is
+not exploited by attacks, careless use and program errors. To address this
+problem, we propose to employ a quota-enforcement service that allows 
resource
--- End diff --

We don't propose anymore once this is out. "To address this problem, a 
quota-enforcement service can be employed. This service allows resource usage 
to be restricted to certain bounds as..."


---
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-docs-admin pull request: CLOUDSTACK-8592: Quota plugin ...

2015-08-21 Thread DaanHoogland
Github user DaanHoogland commented on a diff in the pull request:

https://github.com/apache/cloudstack-docs-admin/pull/30#discussion_r37615635
  
--- Diff: source/plugins/quota.rst ---
@@ -0,0 +1,189 @@
+.. 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.
+
+
+Quota Plugin 
+=
+
+Quota service, while allowing for scalability, will make sure that the 
cloud is
+not exploited by attacks, careless use and program errors. To address this
+problem, we propose to employ a quota-enforcement service that allows 
resource
+usage within certain bounds as defined by policies and available quotas for
+various entities. Quota service extends the functionality of usage server 
to
+provide a measurement for the resources used by the accounts and domains 
using a
+common unit referred to as cloud currency in this document. It can be 
configured
+to ensure that your usage won’t exceed the budget allocated to 
accounts/domain
+in cloud currency. It will let user know how much of the cloud resources 
he is
+using. It will help the cloud admins, if they want, to ensure that a user 
does
+not go beyond his allocated quota. Per usage cycle if a account is found 
to be
--- End diff --

typo: an account (not a account)


---
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-docs-admin pull request: CLOUDSTACK-8592: Quota plugin ...

2015-08-21 Thread DaanHoogland
Github user DaanHoogland commented on a diff in the pull request:

https://github.com/apache/cloudstack-docs-admin/pull/30#discussion_r37615671
  
--- Diff: source/plugins/quota.rst ---
@@ -0,0 +1,189 @@
+.. 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.
+
+
+Quota Plugin 
+=
+
+Quota service, while allowing for scalability, will make sure that the 
cloud is
+not exploited by attacks, careless use and program errors. To address this
+problem, we propose to employ a quota-enforcement service that allows 
resource
+usage within certain bounds as defined by policies and available quotas for
+various entities. Quota service extends the functionality of usage server 
to
+provide a measurement for the resources used by the accounts and domains 
using a
+common unit referred to as cloud currency in this document. It can be 
configured
+to ensure that your usage won’t exceed the budget allocated to 
accounts/domain
+in cloud currency. It will let user know how much of the cloud resources 
he is
+using. It will help the cloud admins, if they want, to ensure that a user 
does
+not go beyond his allocated quota. Per usage cycle if a account is found 
to be
+exceeding its quota then it is locked. Locking an account means that it 
will not
--- End diff --

then it is locked => , it will be locked


---
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-docs-admin pull request: CLOUDSTACK-8592: Quota plugin ...

2015-08-21 Thread DaanHoogland
Github user DaanHoogland commented on a diff in the pull request:

https://github.com/apache/cloudstack-docs-admin/pull/30#discussion_r37615769
  
--- Diff: source/plugins/quota.rst ---
@@ -0,0 +1,189 @@
+.. 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.
+
+
+Quota Plugin 
+=
+
+Quota service, while allowing for scalability, will make sure that the 
cloud is
+not exploited by attacks, careless use and program errors. To address this
+problem, we propose to employ a quota-enforcement service that allows 
resource
+usage within certain bounds as defined by policies and available quotas for
+various entities. Quota service extends the functionality of usage server 
to
+provide a measurement for the resources used by the accounts and domains 
using a
+common unit referred to as cloud currency in this document. It can be 
configured
+to ensure that your usage won’t exceed the budget allocated to 
accounts/domain
+in cloud currency. It will let user know how much of the cloud resources 
he is
+using. It will help the cloud admins, if they want, to ensure that a user 
does
+not go beyond his allocated quota. Per usage cycle if a account is found 
to be
+exceeding its quota then it is locked. Locking an account means that it 
will not
+be able to initiate a new resource allocation request, whether it is more
+storage or an additional ip. Needless to say quota service as well as any 
action
+on the account is configurable.
+
+Enabling the Quota Service 
+
+
+Before installing and configuring the quota service you need to make sure 
that
+the Usage Server has been installed. This requires extra steps beyond just
+installing the CloudStack software. See Installing the Usage Server 
(Optional)
+in the Advanced Installation Guide.
+
+#. enable.usage.server: Set to true to enable usage server.
+
+The quota plugin is disabled by default. To enable it goto Global Settings 
and
+set the following global configuration to true:
+
+#.  quota.enable.service
+
+By default Quota service does not lock the accounts that have exceeded the 
quota
+usage. To enable quota service to lock accounts set the following global
+configuration to true:
+
+#. quota.enable.enforcement
+
+The other configurations that are there for quota service are as:
+
+#. quota.currency.symbol : The symbal that is used before any currency 
--- End diff --

"The symbol that is used in front of any currency figure in various ...


---
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-docs-admin pull request: CLOUDSTACK-8592: Quota plugin ...

2015-08-21 Thread DaanHoogland
Github user DaanHoogland commented on a diff in the pull request:

https://github.com/apache/cloudstack-docs-admin/pull/30#discussion_r37615907
  
--- Diff: source/plugins/quota.rst ---
@@ -0,0 +1,189 @@
+.. 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.
+
+
+Quota Plugin 
+=
+
+Quota service, while allowing for scalability, will make sure that the 
cloud is
+not exploited by attacks, careless use and program errors. To address this
+problem, we propose to employ a quota-enforcement service that allows 
resource
+usage within certain bounds as defined by policies and available quotas for
+various entities. Quota service extends the functionality of usage server 
to
+provide a measurement for the resources used by the accounts and domains 
using a
+common unit referred to as cloud currency in this document. It can be 
configured
+to ensure that your usage won’t exceed the budget allocated to 
accounts/domain
+in cloud currency. It will let user know how much of the cloud resources 
he is
+using. It will help the cloud admins, if they want, to ensure that a user 
does
+not go beyond his allocated quota. Per usage cycle if a account is found 
to be
+exceeding its quota then it is locked. Locking an account means that it 
will not
+be able to initiate a new resource allocation request, whether it is more
+storage or an additional ip. Needless to say quota service as well as any 
action
+on the account is configurable.
+
+Enabling the Quota Service 
+
+
+Before installing and configuring the quota service you need to make sure 
that
+the Usage Server has been installed. This requires extra steps beyond just
+installing the CloudStack software. See Installing the Usage Server 
(Optional)
+in the Advanced Installation Guide.
+
+#. enable.usage.server: Set to true to enable usage server.
+
+The quota plugin is disabled by default. To enable it goto Global Settings 
and
+set the following global configuration to true:
+
+#.  quota.enable.service
+
+By default Quota service does not lock the accounts that have exceeded the 
quota
+usage. To enable quota service to lock accounts set the following global
+configuration to true:
+
+#. quota.enable.enforcement
+
+The other configurations that are there for quota service are as:
+
+#. quota.currency.symbol : The symbal that is used before any currency 
+figure in various quota forms and reports. 
+#. quota.usage.smtp.host: Quota SMTP host for sending quota alerts. 
+#. quota.usage.smtp.port: Quota SMTP port. 
+#. quota.usage.smtp.user: Quota SMTP user. 
+#. quota.usage.smtp.password: Quota SMTP password. 
+#. quota.usage.smtp.sender: Quota SMTP alert sender email address. 
+#. quota.usage.smtp.useAuth: If true, use secure SMTP authentication when 
sending
+   emails. 
+#. quota.usage.smtp.connection.timeout: Quota SMTP server connection
+   timeout duration.
+
+There are several configuration variables that are inherited from usage 
server.
+These are listed below:
+
+#. usage.aggregation.timezone 
+
+All these are described in details in Usage Server documentation.
+
+Restart the Management Server (as usual with any global configuration 
change)
--- End diff --

usual but not always needed. I would rephrase to (to enable the set 
configuration values)


---
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-docs-admin pull request: CLOUDSTACK-8592: Quota plugin ...

2015-08-21 Thread DaanHoogland
Github user DaanHoogland commented on a diff in the pull request:

https://github.com/apache/cloudstack-docs-admin/pull/30#discussion_r37615956
  
--- Diff: source/plugins/quota.rst ---
@@ -0,0 +1,189 @@
+.. 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.
+
+
+Quota Plugin 
+=
+
+Quota service, while allowing for scalability, will make sure that the 
cloud is
+not exploited by attacks, careless use and program errors. To address this
+problem, we propose to employ a quota-enforcement service that allows 
resource
+usage within certain bounds as defined by policies and available quotas for
+various entities. Quota service extends the functionality of usage server 
to
+provide a measurement for the resources used by the accounts and domains 
using a
+common unit referred to as cloud currency in this document. It can be 
configured
+to ensure that your usage won’t exceed the budget allocated to 
accounts/domain
+in cloud currency. It will let user know how much of the cloud resources 
he is
+using. It will help the cloud admins, if they want, to ensure that a user 
does
+not go beyond his allocated quota. Per usage cycle if a account is found 
to be
+exceeding its quota then it is locked. Locking an account means that it 
will not
+be able to initiate a new resource allocation request, whether it is more
+storage or an additional ip. Needless to say quota service as well as any 
action
+on the account is configurable.
+
+Enabling the Quota Service 
+
+
+Before installing and configuring the quota service you need to make sure 
that
+the Usage Server has been installed. This requires extra steps beyond just
+installing the CloudStack software. See Installing the Usage Server 
(Optional)
+in the Advanced Installation Guide.
+
+#. enable.usage.server: Set to true to enable usage server.
+
+The quota plugin is disabled by default. To enable it goto Global Settings 
and
+set the following global configuration to true:
+
+#.  quota.enable.service
+
+By default Quota service does not lock the accounts that have exceeded the 
quota
+usage. To enable quota service to lock accounts set the following global
+configuration to true:
+
+#. quota.enable.enforcement
+
+The other configurations that are there for quota service are as:
+
+#. quota.currency.symbol : The symbal that is used before any currency 
+figure in various quota forms and reports. 
+#. quota.usage.smtp.host: Quota SMTP host for sending quota alerts. 
+#. quota.usage.smtp.port: Quota SMTP port. 
+#. quota.usage.smtp.user: Quota SMTP user. 
+#. quota.usage.smtp.password: Quota SMTP password. 
+#. quota.usage.smtp.sender: Quota SMTP alert sender email address. 
+#. quota.usage.smtp.useAuth: If true, use secure SMTP authentication when 
sending
+   emails. 
+#. quota.usage.smtp.connection.timeout: Quota SMTP server connection
+   timeout duration.
+
+There are several configuration variables that are inherited from usage 
server.
+These are listed below:
+
+#. usage.aggregation.timezone 
+
+All these are described in details in Usage Server documentation.
+
+Restart the Management Server (as usual with any global configuration 
change)
+and also the Usage Server:
+
+   .. code:: bash
+
+  service cloudstack-management restart 
+  service cloudstack-usage restart
+
+Once the quota service is running it will calculate the quota balance for 
each account.
+The quota usage is calculated as per the quota tariff provided by the site 
administrator.
+
+
+Quota Tariff
+-
+
+The following table shows all quota types for which you can specify tariff.
+
+.. cssclass:: table-striped table-bordered table-hover
+

++--+---+-+
+| Type ID  | Type Name | Tariff 
Description  |
+|  |   

[GitHub] cloudstack-docs-admin pull request: CLOUDSTACK-8592: Quota plugin ...

2015-08-21 Thread DaanHoogland
Github user DaanHoogland commented on the pull request:


https://github.com/apache/cloudstack-docs-admin/pull/30#issuecomment-12732
  
remarks made but LGTM


---
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 master

2015-08-21 Thread DaanHoogland
Github user DaanHoogland commented on a diff in the pull request:

https://github.com/apache/cloudstack/pull/689#discussion_r37616481
  
--- Diff: 
framework/quota/src/org/apache/cloudstack/quota/dao/QuotaCreditsDaoImpl.java ---
@@ -0,0 +1,72 @@
+//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.ArrayList;
+import java.util.Date;
+import java.util.List;
+
+import javax.ejb.Local;
+import javax.inject.Inject;
+
+import org.springframework.stereotype.Component;
+import org.apache.cloudstack.quota.vo.QuotaBalanceVO;
+import org.apache.cloudstack.quota.vo.QuotaCreditsVO;
+
+import com.cloud.utils.db.Filter;
+import com.cloud.utils.db.GenericDaoBase;
+import com.cloud.utils.db.SearchCriteria;
+import com.cloud.utils.db.TransactionLegacy;
+
+@Component
+@Local(value = { QuotaCreditsDao.class })
+public class QuotaCreditsDaoImpl extends GenericDaoBase implements QuotaCreditsDao {
+@Inject
+QuotaBalanceDao _quotaBalanceDao;
+
+@SuppressWarnings("deprecation")
+@Override
+public List findCredits(final long accountId, final 
long domainId, final Date startDate, final Date endDate) {
+final short opendb = 
TransactionLegacy.currentTxn().getDatabaseId();
+TransactionLegacy.open(TransactionLegacy.USAGE_DB);
+Filter filter = new Filter(QuotaCreditsVO.class, "updatedOn", 
true, 0L, Long.MAX_VALUE);
+SearchCriteria sc = createSearchCriteria();
+sc.addAnd("accountId", SearchCriteria.Op.EQ, accountId);
+sc.addAnd("domainId", SearchCriteria.Op.EQ, domainId);
+if ((startDate != null) && (endDate != null) && 
startDate.before(endDate)) {
+sc.addAnd("updatedOn", SearchCriteria.Op.BETWEEN, startDate, 
endDate);
+} else {
+return new ArrayList();
+}
+List qc = search(sc, filter);
+TransactionLegacy.open(opendb).close();
+return qc;
+}
+
+@Override
+public QuotaCreditsVO saveCredits(final QuotaCreditsVO credits) {
+final short opendb = 
TransactionLegacy.currentTxn().getDatabaseId();
+TransactionLegacy.open(TransactionLegacy.USAGE_DB);
--- End diff --

please do not close in finally but have the compiler do it for you.


---
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 master

2015-08-21 Thread DaanHoogland
Github user DaanHoogland commented on a diff in the pull request:

https://github.com/apache/cloudstack/pull/689#discussion_r37616523
  
--- Diff: 
framework/quota/src/org/apache/cloudstack/quota/dao/QuotaEmailTemplatesDaoImpl.java
 ---
@@ -0,0 +1,64 @@
+//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 com.cloud.utils.db.GenericDaoBase;
+import com.cloud.utils.db.SearchBuilder;
+import com.cloud.utils.db.SearchCriteria;
+import com.cloud.utils.db.TransactionLegacy;
+import org.apache.cloudstack.quota.vo.QuotaEmailTemplatesVO;
+import org.springframework.stereotype.Component;
+
+import javax.ejb.Local;
+import java.util.List;
+
+@Component
+@Local(value = { QuotaEmailTemplatesDao.class })
+public class QuotaEmailTemplatesDaoImpl extends 
GenericDaoBase implements QuotaEmailTemplatesDao {
+
+protected SearchBuilder 
QuotaEmailTemplateSearch;
+
+public QuotaEmailTemplatesDaoImpl() {
+super();
+
+QuotaEmailTemplateSearch = createSearchBuilder();
+QuotaEmailTemplateSearch.and("template_name", 
QuotaEmailTemplateSearch.entity().getTemplateName(), SearchCriteria.Op.EQ);
+QuotaEmailTemplateSearch.done();
+}
+
+@Override
+public List listAllQuotaEmailTemplates(String 
templateName) {
+final short opendb = 
TransactionLegacy.currentTxn().getDatabaseId();
+TransactionLegacy.open(TransactionLegacy.USAGE_DB);
+SearchCriteria sc = 
QuotaEmailTemplateSearch.create();
+if (templateName != null) {
+sc.setParameters("template_name", templateName);
+}
+List result = this.listBy(sc);
+TransactionLegacy.open(opendb).close();
+return result;
+}
+
+@Override
+public boolean updateQuotaEmailTemplate(QuotaEmailTemplatesVO 
template) {
+final short opendb = 
TransactionLegacy.currentTxn().getDatabaseId();
+TransactionLegacy.open(TransactionLegacy.USAGE_DB);
+final boolean result = this.update(template.getId(), template);
+TransactionLegacy.open(opendb).close();
--- End diff --

t-w-r


---
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 master

2015-08-21 Thread DaanHoogland
Github user DaanHoogland commented on the pull request:

https://github.com/apache/cloudstack/pull/689#issuecomment-15452
  
I saw @jburwell his remarks coming by. I trust him to be thorough. I will 
review when I see unit and integration tests. 
try using more try with resource when possible. No beef just 
try (Transaction trx =TransactionLegacy.open(TransactionLegacy.USAGE_DB)) 
{} is an often used pattern. maybe create a method/utility called switchDb(...)


---
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-docs-admin pull request: CLOUDSTACK-8592: Quota plugin ...

2015-08-21 Thread abhinandanprateek
Github user abhinandanprateek commented on the pull request:


https://github.com/apache/cloudstack-docs-admin/pull/30#issuecomment-133351307
  
Daan, 
  Thanks for reviewing the document, the observations are incorporated.
   


---
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 master

2015-08-21 Thread abhinandanprateek
Github user abhinandanprateek commented on the pull request:

https://github.com/apache/cloudstack/pull/689#issuecomment-133352253
  
Where ever there is a DB change the pattern is use. The plain switch is 
used where it is db readonly.


---
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-8733: Host stuck in rebalancin...

2015-08-21 Thread remibergsma
Github user remibergsma commented on the pull request:

https://github.com/apache/cloudstack/pull/698#issuecomment-133358938
  
Can't currently check the output of Apache Build Jenkins as it returns 404. 
Wanted to double check the UNSTABLE state. Holding on for now..


---
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-8733: Host stuck in rebalancin...

2015-08-21 Thread koushik-das
Github user koushik-das commented on the pull request:

https://github.com/apache/cloudstack/pull/698#issuecomment-133369723
  
@remibergsma https://builds.apache.org is available, maybe 
https://builds.apache.org/job/cloudstack-pull-requests/1001/ got removed from 
the server as it was 7days old. In that case it will always return 404.


---
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 master

2015-08-21 Thread jburwell
Github user jburwell commented on a diff in the pull request:

https://github.com/apache/cloudstack/pull/689#discussion_r37623820
  
--- Diff: 
framework/quota/src/org/apache/cloudstack/quota/constant/QuotaTypes.java ---
@@ -0,0 +1,92 @@
+// 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.constant;
+
+import org.apache.cloudstack.usage.UsageTypes;
+
+import java.util.HashMap;
+
+public class QuotaTypes extends UsageTypes {
+public static final int CPU_CLOCK_RATE = 15;
+public static final int CPU_NUMBER = 16;
+public static final int MEMORY = 17;
+
+private Integer quotaType;
+private String quotaName;
+private String quotaUnit;
+private String description;
+private String discriminator;
+
+public QuotaTypes(Integer quotaType, String name, String unit, String 
description) {
+this.quotaType = quotaType;
+this.description = description;
+this.quotaName = name;
+this.quotaUnit = unit;
+this.discriminator = "None";
+}
+
+public static HashMap listQuotaTypes() {
+final HashMap quotaTypeList = new 
HashMap();
+quotaTypeList.put(new Integer(RUNNING_VM), new QuotaTypes(new 
Integer(RUNNING_VM), "RUNNING_VM", "Compute-Month", "Running Vm Usage"));
--- End diff --

Understanding the compatibility with the type declarations of existing 
code, I can see no reason to avoid the constant pool and put unnecessary 
pressure on the garbage collector by using ``new Integer()`` rather than 
``Integer.valueOf()``.


---
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-8754: VM migration triggered b...

2015-08-21 Thread koushik-das
GitHub user koushik-das opened a pull request:

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

CLOUDSTACK-8754: VM migration triggered by dynamic scaling is failing

This is caused by serialization failure for VmWorkMigrateForScale object. 
Replaced DeployDestination member present in VmWorkMigrateForScale with 
serializable types.

Haven't added any unit test as couldn't find a clean way to do it. Simply 
adding a test to do (de)serialization won't help catch any new member addition 
to the type which breaks serializability.

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

$ git pull https://github.com/koushik-das/cloudstack CLOUDSTACK-8754

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

https://github.com/apache/cloudstack/pull/725.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 #725


commit 3be2b6310333b8ee263ef7865d235d30ec9c804f
Author: Koushik Das 
Date:   2015-08-21T11:01:44Z

CLOUDSTACK-8754: VM migration triggered by dynamic scaling is failing
This is caused by serialization failure for VmWorkMigrateForScale object. 
Replaced DeployDestination member
present in VmWorkMigrateForScale with serializable types.




---
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: Customer escalations

2015-08-21 Thread nitt10prashant
Github user nitt10prashant commented on a diff in the pull request:

https://github.com/apache/cloudstack/pull/724#discussion_r37625731
  
--- Diff: test/integration/component/test_escalations_routers.py ---
@@ -0,0 +1,189 @@
+# 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.
+""" P1 tests for alert receiving from VR on service failure in VR
+"""
+# Import Local Modules
+# import marvin
+from marvin.cloudstackTestCase import cloudstackTestCase
+from marvin.lib.utils import (get_process_status, validateList,
+  cleanup_resources)
+from marvin.lib.base import (Account,
+ ServiceOffering,
+ VirtualMachine)
+from marvin.lib.common import (list_hosts,
+   list_routers,
+   get_zone,
+   get_domain,
+   get_template)
+from nose.plugins.attrib import attr
+from marvin.codes import FAILED
+from marvin.codes import PASS
+
+_multiprocess_shared_ = True
+
+
+class TestVR(cloudstackTestCase):
+
+@classmethod
+def setUpClass(cls):
+cls._cleanup = []
+cls.testClient = super(
+TestVR,
+cls).getClsTestClient()
+cls.api_client = cls.testClient.getApiClient()
+cls.services = cls.testClient.getParsedTestDataConfig()
+
+# Get Zone, Domain and templates
+cls.zone = get_zone(cls.api_client, 
cls.testClient.getZoneForTests())
+domain = get_domain(cls.api_client)
+cls.services['mode'] = cls.zone.networktype
+
+template = get_template(
+cls.api_client,
+cls.zone.id,
+cls.services["ostype"]
+)
+
+if template == FAILED:
+assert False, "get_template() failed to return template with \
+   description %s" % cls.services["ostype"]
+# Set Zones and disk offerings ??
--- End diff --

remove  "??" .


---
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: Customer escalations

2015-08-21 Thread shwetaag
Github user shwetaag closed the pull request at:

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


---
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 master

2015-08-21 Thread jburwell
Github user jburwell commented on a diff in the pull request:

https://github.com/apache/cloudstack/pull/689#discussion_r37627680
  
--- Diff: engine/schema/src/com/cloud/usage/dao/UsageDaoImpl.java ---
@@ -469,4 +478,25 @@ public void removeOldUsageRecords(int days) {
 txn.close();
 }
 }
+
+@SuppressWarnings("deprecation")
+public Pair, Integer> 
getUsageRecordsPendingQuotaAggregation(final long accountId, final long 
domainId) {
+final short opendb = 
TransactionLegacy.currentTxn().getDatabaseId();
+TransactionLegacy.open(TransactionLegacy.USAGE_DB).close();
+s_logger.debug("getting usage records for account: " + accountId + 
", domainId: " + domainId);
+Filter usageFilter = new Filter(UsageVO.class, "startDate", true, 
0L, 1L);
+SearchCriteria sc = createSearchCriteria();
+if (accountId != -1) {
+sc.addAnd("accountId", SearchCriteria.Op.EQ, accountId);
+}
+if (domainId != -1) {
+sc.addAnd("domainId", SearchCriteria.Op.EQ, domainId);
+}
+sc.addAnd("quotaCalculated", SearchCriteria.Op.NULL);
+sc.addOr("quotaCalculated", SearchCriteria.Op.EQ, 0);
+s_logger.debug("Getting usage records" + usageFilter.getOrderBy());
+Pair, Integer> usageRecords = 
searchAndCountAllRecords(sc, usageFilter);
+TransactionLegacy.open(opendb).close();
--- End diff --

Reading through the ``TransactionLegacy`` code, this approach to switching 
the databases imposes in an incredibly high overhead because it actually 
consumes a connection from the pool and then throws it away in order to 
manipulate a thread local that tracks which the current connection pool.  At a 
minimum, we should consider adding a ``switch`` or ``use`` method that only 
modifies the thread local tracking the current connection pool.

The larger issue, which is out of scope for this PR, is that we essentially 
have a global, mutable state.  This pattern of behavior appears to be present 
to change the connection pool used for the set of database queries executed 
within the scope of this method.  If the method fails to switch the connection 
pool back to the original value, subsequent operations would fail.  Within 
``TransactionLegacy``, a thread local variable is used to track this state.  
Since threads are reused within application, this data is effectively global.  
We should refactor this class to create a new object instance for each 
transaction that points to the proper connection pool within its scope. By 
reducing the scope to an instance, we can create a side effect free 
transaction/connection management mechanism.


---
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 master

2015-08-21 Thread jburwell
Github user jburwell commented on a diff in the pull request:

https://github.com/apache/cloudstack/pull/689#discussion_r37627808
  
--- Diff: 
framework/quota/src/org/apache/cloudstack/quota/dao/QuotaCreditsDaoImpl.java ---
@@ -0,0 +1,72 @@
+//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.ArrayList;
+import java.util.Date;
+import java.util.List;
+
+import javax.ejb.Local;
+import javax.inject.Inject;
+
+import org.springframework.stereotype.Component;
+import org.apache.cloudstack.quota.vo.QuotaBalanceVO;
+import org.apache.cloudstack.quota.vo.QuotaCreditsVO;
+
+import com.cloud.utils.db.Filter;
+import com.cloud.utils.db.GenericDaoBase;
+import com.cloud.utils.db.SearchCriteria;
+import com.cloud.utils.db.TransactionLegacy;
+
+@Component
+@Local(value = { QuotaCreditsDao.class })
+public class QuotaCreditsDaoImpl extends GenericDaoBase implements QuotaCreditsDao {
+@Inject
+QuotaBalanceDao _quotaBalanceDao;
+
+@SuppressWarnings("deprecation")
+@Override
+public List findCredits(final long accountId, final 
long domainId, final Date startDate, final Date endDate) {
+final short opendb = 
TransactionLegacy.currentTxn().getDatabaseId();
+TransactionLegacy.open(TransactionLegacy.USAGE_DB);
+Filter filter = new Filter(QuotaCreditsVO.class, "updatedOn", 
true, 0L, Long.MAX_VALUE);
+SearchCriteria sc = createSearchCriteria();
+sc.addAnd("accountId", SearchCriteria.Op.EQ, accountId);
+sc.addAnd("domainId", SearchCriteria.Op.EQ, domainId);
+if ((startDate != null) && (endDate != null) && 
startDate.before(endDate)) {
+sc.addAnd("updatedOn", SearchCriteria.Op.BETWEEN, startDate, 
endDate);
+} else {
+return new ArrayList();
+}
+List qc = search(sc, filter);
+TransactionLegacy.open(opendb).close();
+return qc;
+}
+
+@Override
+public QuotaCreditsVO saveCredits(final QuotaCreditsVO credits) {
+final short opendb = 
TransactionLegacy.currentTxn().getDatabaseId();
+TransactionLegacy.open(TransactionLegacy.USAGE_DB);
--- End diff --

@DaanHoogland do you mean using a try with resources construct?  +1 to that 
idea.


---
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 master

2015-08-21 Thread jburwell
Github user jburwell commented on a diff in the pull request:

https://github.com/apache/cloudstack/pull/689#discussion_r37627849
  
--- Diff: 
framework/quota/src/org/apache/cloudstack/quota/dao/QuotaEmailTemplatesDaoImpl.java
 ---
@@ -0,0 +1,64 @@
+//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 com.cloud.utils.db.GenericDaoBase;
+import com.cloud.utils.db.SearchBuilder;
+import com.cloud.utils.db.SearchCriteria;
+import com.cloud.utils.db.TransactionLegacy;
+import org.apache.cloudstack.quota.vo.QuotaEmailTemplatesVO;
+import org.springframework.stereotype.Component;
+
+import javax.ejb.Local;
+import java.util.List;
+
+@Component
+@Local(value = { QuotaEmailTemplatesDao.class })
+public class QuotaEmailTemplatesDaoImpl extends 
GenericDaoBase implements QuotaEmailTemplatesDao {
+
+protected SearchBuilder 
QuotaEmailTemplateSearch;
+
+public QuotaEmailTemplatesDaoImpl() {
+super();
+
+QuotaEmailTemplateSearch = createSearchBuilder();
+QuotaEmailTemplateSearch.and("template_name", 
QuotaEmailTemplateSearch.entity().getTemplateName(), SearchCriteria.Op.EQ);
+QuotaEmailTemplateSearch.done();
+}
+
+@Override
+public List listAllQuotaEmailTemplates(String 
templateName) {
+final short opendb = 
TransactionLegacy.currentTxn().getDatabaseId();
+TransactionLegacy.open(TransactionLegacy.USAGE_DB);
--- End diff --

See @DaanHoogland note above and consider a try with resources rather than 
a ``try { ... } finally { ... }`` block.


---
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: SDN solutions in use today with CloudStack

2015-08-21 Thread Zaeem Arshad
How does that integrate with a XenServer based environment?

Regards

Zaeem

On Fri, Aug 21, 2015 at 1:17 AM, Remi Bergsma 
wrote:

> Hi Simon,
>
> At Schuberg Philis we use Nicira (which nowadays is called VMware NSX-MH)
> in production since 2012. It works well for us. The plugin is also still
> maintained and is getting some tlc as we speak.
>
> The Nuage plugin was introduced recently, I think in 4.5. I hear people
> are using this a lot so it’s definitely something to investigate. The
> others I have never tried. Really wondering if anyone is using GRE in
> CloudStack?
>
> Regards,
> Remi
>
>
> > On 20 Aug 2015, at 20:41, Simon Weller  wrote:
> >
> > Hi all,
> >
> > We  are currently exploring options for improving our networking setup
> (read SDN) within CS for our advanced zones.
> >
> > There are a few plugins currently available for various third party SDN
> providers (Nicira, Big Switch VNS, MidoNet, Stratosphere SSP, Nuage VSP  et
> al), as well as some pre-SDN functionality using native VXLAN, OVS GRE and
> of course vlans.
> >
> > Most of the organizations mentioned above appear to have drunken the
> OpenStack kool-aid and don't even mention support for CloudStack on their
> commercial websites.
> >
> > It seems that some of these plugins are getting rather old now and I'd
> be interesting to know (if you're willing to share) what is in use in the
> community today.
> >
> > - Si
> >
> >
> >
>
>


[GitHub] cloudstack pull request: Fix for the NicVO.java regression.

2015-08-21 Thread borisroman
GitHub user borisroman opened a pull request:

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

Fix for the NicVO.java regression.

Renamed set*() methods to correct naming.

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

$ git pull https://github.com/borisroman/cloudstack NicVORegression

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

https://github.com/apache/cloudstack/pull/726.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 #726


commit 4b88eabef1310fde8631cc3874a5e07dbca5ee4c
Author: Boris Schrijver 
Date:   2015-08-21T08:06:12Z

Fix for the NicVO.java regression.

Renamed set*() methods to correct naming.




---
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-8755: xs-tools.iso missing fro...

2015-08-21 Thread shwetaag
GitHub user shwetaag opened a pull request:

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

CLOUDSTACK-8755: xs-tools.iso missing from ISOs in CCP GUI

updated the automation for correct verification in case of listing default 
isos 

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

$ git pull https://github.com/shwetaag/cloudstack list_iso

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

https://github.com/apache/cloudstack/pull/727.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 #727


commit b6fafbfcbe527b65b80cc11d394421dc363e007f
Author: shweta agarwal 
Date:   2015-08-21T12:03:23Z

CLOUDSTACK-8755: xs-tools.iso missing from ISOs in CCP GUI




---
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 master

2015-08-21 Thread jburwell
Github user jburwell commented on a diff in the pull request:

https://github.com/apache/cloudstack/pull/689#discussion_r37628117
  
--- Diff: 
plugins/database/quota/src/org/apache/cloudstack/api/response/QuotaResponseBuilderImpl.java
 ---
@@ -0,0 +1,419 @@
+//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.size() == 0) {
--- End diff --

Findbugs is a static analysis tool that finds NPE con

[GitHub] cloudstack pull request: Fix for the NicVO.java regression.

2015-08-21 Thread borisroman
Github user borisroman commented on the pull request:

https://github.com/apache/cloudstack/pull/726#issuecomment-133395038
  
The updateBuilder will check if the DAO has changed based on the set*() 
methods. When it can't resolve one, it won't update. After learning this I 
changed the set*() method names to reflect the names of the variable fields.


---
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: Fix for the NicVO.java regression.

2015-08-21 Thread wido
Github user wido commented on the pull request:

https://github.com/apache/cloudstack/pull/726#issuecomment-133397841
  
LGTM


---
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: More typos

2015-08-21 Thread wido
Github user wido commented on the pull request:

https://github.com/apache/cloudstack/pull/723#issuecomment-133398506
  
LGTM

Keep them coming!


---
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 master

2015-08-21 Thread jburwell
Github user jburwell commented on a diff in the pull request:

https://github.com/apache/cloudstack/pull/689#discussion_r37628373
  
--- Diff: 
plugins/database/quota/src/org/apache/cloudstack/api/response/QuotaResponseBuilderImpl.java
 ---
@@ -0,0 +1,419 @@
+//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.size() == 0) {
+new InvalidParameterValueException("The request period does 
not 

[GitHub] cloudstack pull request: Fix for the NicVO.java regression.

2015-08-21 Thread borisroman
Github user borisroman commented on the pull request:

https://github.com/apache/cloudstack/pull/726#issuecomment-133399200
  
@remibergsma @karuturi Please review!


---
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: Fix for the NicVO.java regression.

2015-08-21 Thread borisroman
Github user borisroman commented on the pull request:

https://github.com/apache/cloudstack/pull/726#issuecomment-133398943
  
Tested it in a new environment. The nics are correctly put in the db again.


---
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-8754: VM migration triggered b...

2015-08-21 Thread wido
Github user wido commented on the pull request:

https://github.com/apache/cloudstack/pull/725#issuecomment-133399741
  
Although I think the code is good and I want to give a LGTM, I'm just not 
100% sure about this 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: Quota master

2015-08-21 Thread jburwell
Github user jburwell commented on a diff in the pull request:

https://github.com/apache/cloudstack/pull/689#discussion_r37628668
  
--- Diff: 
plugins/database/quota/src/org/apache/cloudstack/api/response/QuotaResponseBuilderImpl.java
 ---
@@ -0,0 +1,419 @@
+//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.size() == 0) {
+new InvalidParameterValueException("The request period does 
not 

[GitHub] cloudstack pull request: CLOUDSTACK-8756:Incorrect guest os mappin...

2015-08-21 Thread shwetaag
GitHub user shwetaag opened a pull request:

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

CLOUDSTACK-8756:Incorrect guest os mapping in CCP 4.2.1-6 for CentOS 5.9

Check the bug 8756 for more details 

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

$ git pull https://github.com/shwetaag/cloudstack attach_iso

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

https://github.com/apache/cloudstack/pull/728.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 #728


commit bbdb47854df106f6c95b9c8935ffc3717eac3617
Author: shweta agarwal 
Date:   2015-08-21T12:17:01Z

CLOUDSTACK-8756:Incorrect guest os mapping in CCP 4.2.1-6 for CentOS 5.9




---
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 master

2015-08-21 Thread jburwell
Github user jburwell commented on a diff in the pull request:

https://github.com/apache/cloudstack/pull/689#discussion_r37628774
  
--- Diff: 
plugins/database/quota/src/org/apache/cloudstack/api/response/QuotaResponseBuilderImpl.java
 ---
@@ -0,0 +1,419 @@
+//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.size() == 0) {
+new InvalidParameterValueException("The request period does 
not 

Re: SDN solutions in use today with CloudStack

2015-08-21 Thread Simon Weller
Zaeem,

Nicara (VMWare-NSX-MH) and Nuage both work with XenServer. Reading the Nuage 
VSP plugin jira ticket, they only claim support for XenServer right now, and 
none for KVM.

- Si




From: Zaeem Arshad 
Sent: Friday, August 21, 2015 7:04 AM
To: dev@cloudstack.apache.org
Subject: Re: SDN solutions in use today with CloudStack

How does that integrate with a XenServer based environment?

Regards

Zaeem

On Fri, Aug 21, 2015 at 1:17 AM, Remi Bergsma 
wrote:

> Hi Simon,
>
> At Schuberg Philis we use Nicira (which nowadays is called VMware NSX-MH)
> in production since 2012. It works well for us. The plugin is also still
> maintained and is getting some tlc as we speak.
>
> The Nuage plugin was introduced recently, I think in 4.5. I hear people
> are using this a lot so it’s definitely something to investigate. The
> others I have never tried. Really wondering if anyone is using GRE in
> CloudStack?
>
> Regards,
> Remi
>
>
> > On 20 Aug 2015, at 20:41, Simon Weller  wrote:
> >
> > Hi all,
> >
> > We  are currently exploring options for improving our networking setup
> (read SDN) within CS for our advanced zones.
> >
> > There are a few plugins currently available for various third party SDN
> providers (Nicira, Big Switch VNS, MidoNet, Stratosphere SSP, Nuage VSP  et
> al), as well as some pre-SDN functionality using native VXLAN, OVS GRE and
> of course vlans.
> >
> > Most of the organizations mentioned above appear to have drunken the
> OpenStack kool-aid and don't even mention support for CloudStack on their
> commercial websites.
> >
> > It seems that some of these plugins are getting rather old now and I'd
> be interesting to know (if you're willing to share) what is in use in the
> community today.
> >
> > - Si
> >
> >
> >
>
>

[GitHub] cloudstack pull request: Fix for the NicVO.java regression.

2015-08-21 Thread karuturi
Github user karuturi commented on the pull request:

https://github.com/apache/cloudstack/pull/726#issuecomment-133406706
  
LGTM. lets wait for travis and other jenkins verifications.

In future, can you club all refactoring work in a branch and merge them 
together? That way, we can test it once(giving bigger time window for everyone 
to verofy) and merge
Also, I think this refactoring is a candidate for 4.7. We are already close 
to RC on 4.6(once 4.5.2 is done) and cannot afford regressions at this stage.


---
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: More typos

2015-08-21 Thread karuturi
Github user karuturi commented on the pull request:

https://github.com/apache/cloudstack/pull/723#issuecomment-133407414
  
LGTM


---
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 master

2015-08-21 Thread jburwell
Github user jburwell commented on the pull request:

https://github.com/apache/cloudstack/pull/689#issuecomment-133407337
  
@DaanHoogland in addition to failing to convey the intention of the action, 
the open then close pattern is incredibly expensive due to rapid, unnecessary 
churn on the connection pool.  Please see my response above for my thoughts on 
how we can improve it and avoid the nasty side effects the 
``TransactionLegacy`` imposes.  


---
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: Fix for the NicVO.java regression.

2015-08-21 Thread borisroman
Github user borisroman commented on the pull request:

https://github.com/apache/cloudstack/pull/726#issuecomment-133408184
  
@karuturi I came to that conclusion in the previous pr. I will stack all 
refactoring work in a branch. And send a PR when done.


---
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: More typos

2015-08-21 Thread asfgit
Github user asfgit closed the pull request at:

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


---
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-8757:FTP modules are not loade...

2015-08-21 Thread shwetaag
GitHub user shwetaag opened a pull request:

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

CLOUDSTACK-8757:FTP modules are not loaded in VR

check bug 8757 for more details .

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

$ git pull https://github.com/shwetaag/cloudstack router

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

https://github.com/apache/cloudstack/pull/729.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 #729


commit cc308050b8e50516c50b02d99934d5ea14304ac4
Author: shweta agarwal 
Date:   2015-08-21T12:34:19Z

CLOUDSTACK-8757:FTP modules are not loaded in VR




---
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: Replace some profiler.getDuration with pr...

2015-08-21 Thread ustcweizhou
GitHub user ustcweizhou opened a pull request:

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

Replace some profiler.getDuration with profiler.getDurationInMillis fter 
commit 5557ad55

We got a lot of debugging information in management server log because of 
this.

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

$ git pull https://github.com/ustcweizhou/cloudstack 
profiler-getDurationInMillis

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

https://github.com/apache/cloudstack/pull/730.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 #730


commit 662b478d454a9c60fcd7c0e7fc952fd6c98bf20f
Author: Wei Zhou 
Date:   2015-08-21T11:36:27Z

Replace some profiler.getDuration with profiler.getDurationInMillis after 
commit 5557ad55




---
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: SDN solutions in use today with CloudStack

2015-08-21 Thread Zaeem Arshad
Thanks.

On Fri, Aug 21, 2015 at 5:19 PM, Simon Weller  wrote:

> Zaeem,
>
> Nicara (VMWare-NSX-MH) and Nuage both work with XenServer. Reading the
> Nuage VSP plugin jira ticket, they only claim support for XenServer right
> now, and none for KVM.
>
> - Si
>
>
>
> 
> From: Zaeem Arshad 
> Sent: Friday, August 21, 2015 7:04 AM
> To: dev@cloudstack.apache.org
> Subject: Re: SDN solutions in use today with CloudStack
>
> How does that integrate with a XenServer based environment?
>
> Regards
>
> Zaeem
>
> On Fri, Aug 21, 2015 at 1:17 AM, Remi Bergsma  >
> wrote:
>
> > Hi Simon,
> >
> > At Schuberg Philis we use Nicira (which nowadays is called VMware NSX-MH)
> > in production since 2012. It works well for us. The plugin is also still
> > maintained and is getting some tlc as we speak.
> >
> > The Nuage plugin was introduced recently, I think in 4.5. I hear people
> > are using this a lot so it’s definitely something to investigate. The
> > others I have never tried. Really wondering if anyone is using GRE in
> > CloudStack?
> >
> > Regards,
> > Remi
> >
> >
> > > On 20 Aug 2015, at 20:41, Simon Weller  wrote:
> > >
> > > Hi all,
> > >
> > > We  are currently exploring options for improving our networking setup
> > (read SDN) within CS for our advanced zones.
> > >
> > > There are a few plugins currently available for various third party SDN
> > providers (Nicira, Big Switch VNS, MidoNet, Stratosphere SSP, Nuage VSP
> et
> > al), as well as some pre-SDN functionality using native VXLAN, OVS GRE
> and
> > of course vlans.
> > >
> > > Most of the organizations mentioned above appear to have drunken the
> > OpenStack kool-aid and don't even mention support for CloudStack on their
> > commercial websites.
> > >
> > > It seems that some of these plugins are getting rather old now and I'd
> > be interesting to know (if you're willing to share) what is in use in the
> > community today.
> > >
> > > - Si
> > >
> > >
> > >
> >
> >
>


Re: SDN solutions in use today with CloudStack

2015-08-21 Thread Remi Bergsma
We use it with hundreds of XenServers (currently 6.2) and KVM hypervisors on 
CentOS 7. Open vSwitch does the magic. We did upgrade ovs to a more recent 
version, though. 

Regards, Remi 

Sent from my iPhone

> On 21 Aug 2015, at 14:04, Zaeem Arshad  wrote:
> 
> How does that integrate with a XenServer based environment?
> 
> Regards
> 
> Zaeem
> 
> On Fri, Aug 21, 2015 at 1:17 AM, Remi Bergsma 
> wrote:
> 
>> Hi Simon,
>> 
>> At Schuberg Philis we use Nicira (which nowadays is called VMware NSX-MH)
>> in production since 2012. It works well for us. The plugin is also still
>> maintained and is getting some tlc as we speak.
>> 
>> The Nuage plugin was introduced recently, I think in 4.5. I hear people
>> are using this a lot so it’s definitely something to investigate. The
>> others I have never tried. Really wondering if anyone is using GRE in
>> CloudStack?
>> 
>> Regards,
>> Remi
>> 
>> 
>>> On 20 Aug 2015, at 20:41, Simon Weller  wrote:
>>> 
>>> Hi all,
>>> 
>>> We  are currently exploring options for improving our networking setup
>> (read SDN) within CS for our advanced zones.
>>> 
>>> There are a few plugins currently available for various third party SDN
>> providers (Nicira, Big Switch VNS, MidoNet, Stratosphere SSP, Nuage VSP  et
>> al), as well as some pre-SDN functionality using native VXLAN, OVS GRE and
>> of course vlans.
>>> 
>>> Most of the organizations mentioned above appear to have drunken the
>> OpenStack kool-aid and don't even mention support for CloudStack on their
>> commercial websites.
>>> 
>>> It seems that some of these plugins are getting rather old now and I'd
>> be interesting to know (if you're willing to share) what is in use in the
>> community today.
>>> 
>>> - Si
>> 
>> 


[GitHub] cloudstack pull request: CLOUDSTACK-8754: VM migration triggered b...

2015-08-21 Thread DaanHoogland
Github user DaanHoogland commented on a diff in the pull request:

https://github.com/apache/cloudstack/pull/725#discussion_r37640687
  
--- Diff: engine/orchestration/src/com/cloud/vm/VmWorkMigrateForScale.java 
---
@@ -18,30 +18,18 @@
 
 import com.cloud.deploy.DeployDestination;
 
-public class VmWorkMigrateForScale extends VmWork {
+public class VmWorkMigrateForScale extends VmWorkMigrate {
 private static final long serialVersionUID = 6854870395568389613L;
 
-long srcHostId;
-DeployDestination deployDestination;
--- End diff --

removing deployDestination warrants a new serialVersionUID, does 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 pull request: CLOUDSTACK-8754: VM migration triggered b...

2015-08-21 Thread DaanHoogland
Github user DaanHoogland commented on the pull request:

https://github.com/apache/cloudstack/pull/725#issuecomment-133449560
  
You mention replacing deployDestination with something serializable but I 
don't see it,

Why is a simple (de)serialization test not usefull? it will catch some 
things won't it?
A > serialize > desrialize > B
assertEquals(A,B);

btw removal if primitive types in serializable classes is something we do 
need.


---
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-8754: VM migration triggered b...

2015-08-21 Thread koushik-das
Github user koushik-das commented on the pull request:

https://github.com/apache/cloudstack/pull/725#issuecomment-133451646
  
@DaanHoogland check the base class
The test cannot catch a new addition to the class which may break 
serialization.
Suppose a new non-serializable member of type Object is added to the class 
and is initialized to null and only way to set it is through a new ctor or 
setter. Then the test would still pass. Ideally in this case you want the test 
to fail.


---
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-8754: VM migration triggered b...

2015-08-21 Thread koushik-das
Github user koushik-das commented on a diff in the pull request:

https://github.com/apache/cloudstack/pull/725#discussion_r37642249
  
--- Diff: engine/orchestration/src/com/cloud/vm/VmWorkMigrateForScale.java 
---
@@ -18,30 +18,18 @@
 
 import com.cloud.deploy.DeployDestination;
 
-public class VmWorkMigrateForScale extends VmWork {
+public class VmWorkMigrateForScale extends VmWorkMigrate {
 private static final long serialVersionUID = 6854870395568389613L;
 
-long srcHostId;
-DeployDestination deployDestination;
--- End diff --

Serialization was broken anyway so doesn't matter.


---
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-8754: VM migration triggered b...

2015-08-21 Thread DaanHoogland
Github user DaanHoogland commented on the pull request:

https://github.com/apache/cloudstack/pull/725#issuecomment-133457425
  
Maybe a little out of scope for this PR, I have been looking a bit at the 
hierarchy. It contains a lot of primitives. somewhat related to our gson 
problem (arrays of primitive types) those should be removed.

@kishankavala I see your point on serialisation testing. But it doesn't 
mean that a simple test is useless. (no -1 for that) Let us think/search on 
applicable tests.

Did you test this code in any way?


---
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: Fix for the NicVO.java regression.

2015-08-21 Thread remibergsma
Github user remibergsma commented on the pull request:

https://github.com/apache/cloudstack/pull/726#issuecomment-133467580
  
@borisroman Thanks! I'll run some tests later tonight. Travis is green, 
didn't see an Apache build reporting results (yet?).


---
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-ec2stack pull request: Add AWS CLI compatibility info t...

2015-08-21 Thread runseb
Github user runseb commented on the pull request:

https://github.com/apache/cloudstack-ec2stack/pull/1#issuecomment-133505244
  
testing comment notification, DISCARD


---
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: Changed AddressFormat elements to reflect...

2015-08-21 Thread remibergsma
Github user remibergsma commented on the pull request:

https://github.com/apache/cloudstack/pull/716#issuecomment-13354
  
@borisroman I suggest you close this PR and do all the refactor work in a 
separate branch, as discussed. Thanks!


---
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: Changed variable s_logger to non-static a...

2015-08-21 Thread rafaelweingartner
Github user rafaelweingartner commented on the pull request:

https://github.com/apache/cloudstack/pull/714#issuecomment-133544774
  
Hi @DaanHoogland, after we opened the Jira Ticket, someone ended up 
assigning them to us!? So, we decided to take a lead and analyzed the impact 
that the proposed changed may cause. It turns out that most of the classes of 
that hierarchic are singletons, therefore it would not have an impact on memory 
consumption. The result of the analysis is the following: 

Beans instantiated with @Component:
1.  
/cloudstack/engine/storage/src/org/apache/cloudstack/storage/allocator/LocalStoragePoolAllocator.java
2.  
/cloudstack/engine/storage/src/org/apache/cloudstack/storage/allocator/ZoneWideStoragePoolAllocator.java
3.  
/cloudstack/plugins/api/rate-limit/src/org/apache/cloudstack/ratelimit/ApiRateLimitServiceImpl.java
4.  
/cloudstack/server/src/com/cloud/agent/manager/authn/impl/BasicAgentAuthManager.java
5.  
/cloudstack/plugins/network-elements/bigswitch/src/com/cloud/network/element/BigSwitchBcfElement.java
6.  
/cloudstack/plugins/network-elements/brocade-vcs/src/com/cloud/network/element/BrocadeVcsElement.java
7.  
/cloudstack/server/src/com/cloud/hypervisor/CloudZonesStartupProcessor.java
8.  /cloudstack/server/src/com/cloud/alert/ClusterAlertAdapter.java
9.  
/cloudstack/engine/orchestration/src/com/cloud/cluster/agentlb/ClusterBasedAgentLoadBalancerPlanner.java
10. /cloudstack/server/src/com/cloud/alert/ConsoleProxyAlertAdapter.java
11. 
/cloudstack/plugins/network-elements/juniper-contrail/src/org/apache/cloudstack/network/contrail/management/ContrailElementImpl.java
12. 
/cloudstack/plugins/network-elements/juniper-contrail/src/org/apache/cloudstack/network/contrail/management/ContrailVpcElementImpl.java
13. 
/cloudstack/plugins/network-elements/juniper-contrail/src/org/apache/cloudstack/network/contrail/management/ManagementNetworkGuru.java
14. 
/cloudstack/engine/schema/src/com/cloud/upgrade/DatabaseIntegrityChecker.java
15. /cloudstack/server/src/com/cloud/resource/DummyHostDiscoverer.java
16. 
/cloudstack/plugins/network-elements/elastic-loadbalancer/src/com/cloud/network/element/ElasticLoadBalancerElement.java
17. 
/cloudstack/server/src/com/cloud/agent/manager/allocator/impl/FirstFitAllocator.java
18. 
/cloudstack/server/src/com/cloud/agent/manager/allocator/impl/RecreateHostAllocator.java
19. 
/cloudstack/plugins/network-elements/globodns/src/com/globo/globodns/cloudstack/element/GloboDnsElement.java
20. 
/cloudstack/plugins/network-elements/midonet/src/com/cloud/network/guru/MidoNetGuestNetworkGuru.java
21. 
/cloudstack/plugins/network-elements/ovs/src/com/cloud/network/guru/OvsGuestNetworkGuru.java
22. 
/cloudstack/plugins/network-elements/vxlan/src/com/cloud/network/guru/VxlanGuestNetworkGuru.java
23. 
/cloudstack/plugins/network-elements/midonet/src/com/cloud/network/element/MidoNetElement.java
24. 
/cloudstack/plugins/network-elements/nicira-nvp/src/com/cloud/network/element/NiciraNvpElement.java
25. 
/cloudstack/plugins/network-elements/opendaylight/src/main/java/org/apache/cloudstack/network/opendaylight/OpendaylightElement.java
26. 
/cloudstack/plugins/host-allocators/random/src/com/cloud/agent/manager/allocator/impl/RandomAllocator.java
27. /cloudstack/server/src/com/cloud/ha/RecreatableFencer.java
28. 
/cloudstack/plugins/user-authenticators/saml2/src/org/apache/cloudstack/saml/SAML2AuthManagerImpl.java
29. 
/cloudstack/server/src/com/cloud/alert/SecondaryStorageVmAlertAdapter.java
30. 
/cloudstack/plugins/api/discovery/src/org/apache/cloudstack/discovery/ApiDiscoveryServiceImpl.java
31. /cloudstack/engine/schema/src/com/cloud/user/dao/AccountDaoImpl.java
32. /cloudstack/server/src/com/cloud/api/query/dao/AccountJoinDaoImpl.java
33. 
/cloudstack/engine/schema/src/com/cloud/capacity/dao/CapacityDaoImpl.java
34. 
/cloudstack/engine/schema/src/com/cloud/certificate/dao/CertificateDaoImpl.java
35. 
/cloudstack/plugins/hypervisors/vmware/src/com/cloud/network/dao/CiscoNexusVSMDeviceDaoImpl.java
36. 
/cloudstack/framework/config/src/org/apache/cloudstack/framework/config/dao/ConfigurationDaoImpl.java
37. /cloudstack/engine/schema/src/com/cloud/vm/dao/ConsoleProxyDaoImpl.java
38. /cloudstack/engine/schema/src/com/cloud/dc/dao/DataCenterDaoImpl.java
39. 
/cloudstack/engine/schema/src/com/cloud/dc/dao/DataCenterIpAddressDaoImpl.java
40. 
/cloudstack/server/src/com/cloud/api/query/dao/DataCenterJoinDaoImpl.java
41. 
/cloudstack/engine/schema/src/com/cloud/dc/dao/DataCenterLinkLocalIpAddressDaoImpl.java
42. 
/cloudstack/server/src/com/cloud/api/query/dao/DiskOfferingJoinDaoImpl.java
43. /cloudstack/engine/schema/src/com/cloud/domain/dao/DomainDaoImpl.java
44. /cloudstack/server/src/com/cloud/api/query/dao/DomainJoinDaoImpl.java
45. 
/cloudstack/server/src/com/cloud/api

[GitHub] cloudstack pull request: Fix for the NicVO.java regression.

2015-08-21 Thread remibergsma
Github user remibergsma commented on the pull request:

https://github.com/apache/cloudstack/pull/726#issuecomment-133544954
  
LGTM Verified that a new cloud deployment had working system VMs again.


---
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: Fix for the NicVO.java regression.

2015-08-21 Thread remibergsma
Github user remibergsma commented on the pull request:

https://github.com/apache/cloudstack/pull/726#issuecomment-133546545
  
cloudstack-pull-analysis 296 failed due to: `Expected exactly 2 but it took 
more than 3 microseconds between 2 consecutive calls to System.nanoTime().` 
Seems not related.


---
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-8756:Incorrect guest os mappin...

2015-08-21 Thread remibergsma
Github user remibergsma commented on the pull request:

https://github.com/apache/cloudstack/pull/728#issuecomment-133548095
  
@shwetaag Please add more details on the actual problem (also in Jira) and 
what you want to achieve by adding this test. Both CentOS 5 and CCP 4.2.1seem 
very specific (and old) to me. But I might be missing something so let me 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.
---


[GitHub] cloudstack pull request: CLOUDSTACK-8757:FTP modules are not loade...

2015-08-21 Thread remibergsma
Github user remibergsma commented on the pull request:

https://github.com/apache/cloudstack/pull/729#issuecomment-133547422
  
@shwetaag Can you please add more details? The Jira issue only has a title. 
Are you submitting a test so in case the modules are not loaded, alarms go off? 
Or do you think it is actually broken right now in master?

When I test it, it seems to work:
```
root@r-3-VM:~# lsmod | grep ftp
nf_nat_ftp 12460  0 
nf_nat 18242  2 nf_nat_ftp,iptable_nat
nf_conntrack_ftp   12605  1 nf_nat_ftp
nf_conntrack   52720  7 
nf_conntrack_ipv4,nf_conntrack_ftp,nf_nat,nf_nat_ftp,iptable_nat,xt_state,xt_connmark
```

If you want to submit a test (which is great btw!), then please update the 
title of the PR and the Jira issue accordingly. Thanks!


---
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-8754: VM migration triggered b...

2015-08-21 Thread DaanHoogland
Github user DaanHoogland commented on the pull request:

https://github.com/apache/cloudstack/pull/725#issuecomment-133552003
  
analysisfailures are unrelated to the changes AFAICT


---
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: Fix for the NicVO.java regression.

2015-08-21 Thread DaanHoogland
Github user DaanHoogland commented on the pull request:

https://github.com/apache/cloudstack/pull/726#issuecomment-133552422
  
I think we have to disable this test, enlarging the period even more beats 
every intention of its use. not related indeed


---
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: [cloudstack] Changed variable s_logger to non-static and fixed its name in “com.cloud.utils.component.ComponentLifecycleBase” and its subclasses (#714)

2015-08-21 Thread Daan Hoogland
H Rafael, I saw Rajani assigning the ticket to Pedro and as he created it I
thought he would be informed of it so he can undo if needed.

Thanks for the report. Due to the extensiveness I can not determine the
full implication but as it seems the largest part (132/167) are spring
instantiated singletons I am alright with investigating further.

You can reopen or create a new PR. Equal to me but for your own tracking
reopening the last one might be convenient.

As far as I know the @Local are remnants of an abandoned architectural
path. Investigation needed. You will find some corpses and babies in
closets on this quest! good hunting and thanks for picking it up.

On Fri, Aug 21, 2015 at 9:54 PM, Rafael Weingartner <
notificati...@github.com> wrote:

> Hi @DaanHoogland , after we opened the
> Jira Ticket, someone ended up assigning them to us!? So, we decided to take
> a lead and analyzed the impact that the proposed changed may cause. It
> turns out that most of the classes of that hierarchic are singletons,
> therefore it would not have an impact on memory consumption. The result of
> the analysis is the following:
>
> Beans instantiated with @Component :
> 1.
> /cloudstack/engine/storage/src/org/apache/cloudstack/storage/allocator/LocalStoragePoolAllocator.java
> 2.
> /cloudstack/engine/storage/src/org/apache/cloudstack/storage/allocator/ZoneWideStoragePoolAllocator.java
> 3.
> /cloudstack/plugins/api/rate-limit/src/org/apache/cloudstack/ratelimit/ApiRateLimitServiceImpl.java
> 4.
> /cloudstack/server/src/com/cloud/agent/manager/authn/impl/BasicAgentAuthManager.java
> 5.
> /cloudstack/plugins/network-elements/bigswitch/src/com/cloud/network/element/BigSwitchBcfElement.java
> 6.
> /cloudstack/plugins/network-elements/brocade-vcs/src/com/cloud/network/element/BrocadeVcsElement.java
> 7.
> /cloudstack/server/src/com/cloud/hypervisor/CloudZonesStartupProcessor.java
> 8. /cloudstack/server/src/com/cloud/alert/ClusterAlertAdapter.java
> 9.
> /cloudstack/engine/orchestration/src/com/cloud/cluster/agentlb/ClusterBasedAgentLoadBalancerPlanner.java
> 10. /cloudstack/server/src/com/cloud/alert/ConsoleProxyAlertAdapter.java
> 11.
> /cloudstack/plugins/network-elements/juniper-contrail/src/org/apache/cloudstack/network/contrail/management/ContrailElementImpl.java
> 12.
> /cloudstack/plugins/network-elements/juniper-contrail/src/org/apache/cloudstack/network/contrail/management/ContrailVpcElementImpl.java
> 13.
> /cloudstack/plugins/network-elements/juniper-contrail/src/org/apache/cloudstack/network/contrail/management/ManagementNetworkGuru.java
> 14.
> /cloudstack/engine/schema/src/com/cloud/upgrade/DatabaseIntegrityChecker.java
> 15. /cloudstack/server/src/com/cloud/resource/DummyHostDiscoverer.java
> 16.
> /cloudstack/plugins/network-elements/elastic-loadbalancer/src/com/cloud/network/element/ElasticLoadBalancerElement.java
> 17.
> /cloudstack/server/src/com/cloud/agent/manager/allocator/impl/FirstFitAllocator.java
> 18.
> /cloudstack/server/src/com/cloud/agent/manager/allocator/impl/RecreateHostAllocator.java
> 19.
> /cloudstack/plugins/network-elements/globodns/src/com/globo/globodns/cloudstack/element/GloboDnsElement.java
> 20.
> /cloudstack/plugins/network-elements/midonet/src/com/cloud/network/guru/MidoNetGuestNetworkGuru.java
> 21.
> /cloudstack/plugins/network-elements/ovs/src/com/cloud/network/guru/OvsGuestNetworkGuru.java
> 22.
> /cloudstack/plugins/network-elements/vxlan/src/com/cloud/network/guru/VxlanGuestNetworkGuru.java
> 23.
> /cloudstack/plugins/network-elements/midonet/src/com/cloud/network/element/MidoNetElement.java
> 24.
> /cloudstack/plugins/network-elements/nicira-nvp/src/com/cloud/network/element/NiciraNvpElement.java
> 25.
> /cloudstack/plugins/network-elements/opendaylight/src/main/java/org/apache/cloudstack/network/opendaylight/OpendaylightElement.java
> 26.
> /cloudstack/plugins/host-allocators/random/src/com/cloud/agent/manager/allocator/impl/RandomAllocator.java
> 27. /cloudstack/server/src/com/cloud/ha/RecreatableFencer.java
> 28.
> /cloudstack/plugins/user-authenticators/saml2/src/org/apache/cloudstack/saml/SAML2AuthManagerImpl.java
> 29.
> /cloudstack/server/src/com/cloud/alert/SecondaryStorageVmAlertAdapter.java
> 30.
> /cloudstack/plugins/api/discovery/src/org/apache/cloudstack/discovery/ApiDiscoveryServiceImpl.java
> 31. /cloudstack/engine/schema/src/com/cloud/user/dao/AccountDaoImpl.java
> 32. /cloudstack/server/src/com/cloud/api/query/dao/AccountJoinDaoImpl.java
> 33.
> /cloudstack/engine/schema/src/com/cloud/capacity/dao/CapacityDaoImpl.java
> 34.
> /cloudstack/engine/schema/src/com/cloud/certificate/dao/CertificateDaoImpl.java
> 35.
> /cloudstack/plugins/hypervisors/vmware/src/com/cloud/network/dao/CiscoNexusVSMDeviceDaoImpl.java
> 36.
> /cloudstack/framework/config/src/org/apache/cloudstack/framework/config/dao/ConfigurationDaoImpl.java
> 37. /cloudstack/engine/schema/src/com/cloud/vm/dao/ConsoleProxyDaoImpl.java

[GitHub] cloudstack pull request: Changed variable s_logger to non-static a...

2015-08-21 Thread pedro-martins
GitHub user pedro-martins reopened a pull request:

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

Changed variable s_logger to non-static and fixed its name in 
“com.cloud.utils.component.ComponentLifecycleBase” and its subclasses

Hi guys, 
We have noticed that every single class that is a subclass of 
“ComponentLifecycleBase” instantiate their on “logger” manually and 
uses a nonstandard name. We fixed that by changing the variable in 
“ComponentLifecycleBase” to protected and non-static and instantiated it 
using the method “getClass” from Object class. Therefore, we can reduce the 
code in a few hundred lines and use a more intuitive name for the logger 
variable.

During that process we found a static method that used the “s_logger” 
variable in classes:
com.cloud.network.element.VirtualRouterElement 
org.apache.cloudstack.network.element.InternalLoadBalancerElement 

To fix that we had to create a new class 
“com.cloud.network.element.HAProxyLBRule”, instantiate it with @Componente 
and inject into the aforementioned classes.

The class that we create is “com.cloud.network.element.HAProxyLBRule” 
and has the following methods:
com.cloud.network.element.HAProxyLBRule.containsOnlyNumbers(String, String)

com.cloud.network.element.HAProxyLBRule.validateHAProxyLBRule(LoadBalancingRule)

Sadly we could not write test cases to it; hence we did not fully 
understand those methods. However, if anyone out there understands it, we would 
appreciate some code to be added to it.

As minor this change may seem; we believe that it enhances a little bit the 
ACS code by using standard name to logger variable.



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

$ git pull https://github.com/rafaelweingartner/cloudstack 
master-lrg-cs-hackday-003

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

https://github.com/apache/cloudstack/pull/714.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 #714


commit ddcd1ed3e53dd3fff6e557e4a4b13eb2f03e62df
Author: pedro-martins 
Date:   2015-08-19T14:02:37Z

Changed variable s_logger to non-static and fixed its name in 
“com.cloud.utils.component.ComponentLifecycleBase” and its subclasses
We have noticed that every single class that is a subclass of 
“ComponentLifecycleBase” instantiate their on “logger” manually and 
uses a nonstandard name. We fixed that by changing the variable in 
“ComponentLifecycleBase” to protected and non-static and instantiated it 
using the method “getClass” from Object class. Therefore, we can reduce the 
code in a few hundred lines and use a more intuitive name for the logger 
variable.
During that process we found a static method that used the “s_logger” 
variable in classes:
com.cloud.network.element.VirtualRouterElement
org.apache.cloudstack.network.element.InternalLoadBalancerElement

To fix that we had to create a new class 
“com.cloud.network.element.HAProxyLBRule”, instantiate it with @Componente 
and inject into the aforementioned classes.
The class that we create is “com.cloud.network.element.HAProxyLBRule” 
and has the following methods:
com.cloud.network.element.HAProxyLBRule.containsOnlyNumbers(String, String)

com.cloud.network.element.HAProxyLBRule.validateHAProxyLBRule(LoadBalancingRule)

test

test2




---
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: Fix for the NicVO.java regression.

2015-08-21 Thread asfgit
Github user asfgit closed the pull request at:

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


---
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: Fix for the NicVO.java regression.

2015-08-21 Thread remibergsma
Github user remibergsma commented on the pull request:

https://github.com/apache/cloudstack/pull/726#issuecomment-133567102
  
Check, as far as I can tell everything is OK. And since master is broken 
now anyway, I think it's time to merge this to fix 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 pull request: Fix for the NicVO.java regression.

2015-08-21 Thread DaanHoogland
Github user DaanHoogland commented on the pull request:

https://github.com/apache/cloudstack/pull/726#issuecomment-133567885
  
hm, you shouldt merge anything to a broken master that isn't hellbound on 
fixing 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 pull request: Fix for the NicVO.java regression.

2015-08-21 Thread remibergsma
Github user remibergsma commented on the pull request:

https://github.com/apache/cloudstack/pull/726#issuecomment-133570169
  
@DaanHoogland It does fix the problem, I just feel a bit blind sometimes by 
the builds that seem less reliable lately so then it's hard to be sure. 
But anyway, when looking back we should have quickly reverted the initial 
PR that introduced the problem. Next time we should do that. Benefit is master 
is stable again, plus there is time to work on a fix that can then be send as a 
PR along with the original commits.


---
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: Changed variable s_logger to non-static a...

2015-08-21 Thread DaanHoogland
Github user DaanHoogland commented on the pull request:

https://github.com/apache/cloudstack/pull/714#issuecomment-133633062
  
As the system won't be build with just the first commit applied can you 
squash those two commits?


---
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.
---


review wanted

2015-08-21 Thread Daan Hoogland
everybody, I will LGTM PR #714 [1] and I would like to have more then one
extra pair of eyes this time. Some group of folks, I know there is at least
three of them, have decided to invest in cleaning some code in CS and I
think their work deserves full attention. they worked on refactoring some
of the CitrixResourceBase hierarchy [2] and now they are busy on the
ComponentLifecycleBase
hierarchy.

Please have a look,

​[1] https://github.com/apache/cloudstack/pull/714​
[2] https://github.com/apache/cloudstack/pull/700

-- 
Daan