[GitHub] cloudstack pull request: CLOUDSTACK-9153: When negative credits ar...

2015-12-12 Thread agneya2001
GitHub user agneya2001 opened a pull request:

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

CLOUDSTACK-9153: When negative credits are added to an account the

When negative credits are added to an account the balance credits can 
become negative for that account. This will fix will lock the account if quota 
is enforced.

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

$ git pull https://github.com/shapeblue/cloudstack master-9153

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

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


commit 5025011d3151e9056fed7a9b24f913dc83515fdc
Author: Abhinandan Prateek 
Date:   2015-12-13T03:58:02Z

CLOUDSTACK-9153: When negative credits are added to an account the
balance credits can become negative for that account. This will fix will
lock the account if quota is enforced.




---
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-9153: When negative credits ar...

2015-12-13 Thread agneya2001
Github user agneya2001 commented on the pull request:

https://github.com/apache/cloudstack/pull/1234#issuecomment-164243999
  
@DaanHoogland  This does have a smoke test here: 
test/integration/smoke/test_quota.py. This is very basic, will add more test 
scenarios to 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-9153: When negative credits ar...

2015-12-13 Thread agneya2001
Github user agneya2001 commented on a diff in the pull request:

https://github.com/apache/cloudstack/pull/1234#discussion_r47443252
  
--- Diff: 
plugins/database/quota/src/org/apache/cloudstack/api/response/QuotaResponseBuilderImpl.java
 ---
@@ -383,31 +383,41 @@ public QuotaTariffVO 
updateQuotaTariffPlan(QuotaTariffUpdateCmd cmd) {
 
 @Override
--- End diff --

There were two "addQuotaCredits" methods here, the first one with only a 
check. So combined the two. That removed on '@override' but still kept the 
'@Override' of the removed method.


---
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-9153: When negative credits ar...

2015-12-13 Thread agneya2001
Github user agneya2001 commented on a diff in the pull request:

https://github.com/apache/cloudstack/pull/1234#discussion_r47443258
  
--- Diff: 
plugins/database/quota/src/org/apache/cloudstack/api/response/QuotaResponseBuilderImpl.java
 ---
@@ -95,7 +95,7 @@
 @Inject
 private DomainDao _domainDao;
 @Inject
-private RegionManager _regionMgr;
+private AccountManager _accountMgr;
--- End diff --

Noted.



---
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-9153: When negative credits ar...

2015-12-13 Thread agneya2001
Github user agneya2001 commented on the pull request:

https://github.com/apache/cloudstack/pull/1234#issuecomment-164248806
  
Kept it as a major bug as the account with negative quota will still get 
locked if quota is enforced, by the quota service thread, when it runs next.

While with this fix you can lock the account with the add credit API, 
instead of waiting for quota service to do that.


---
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-9161: fix the quota marvin tes...

2015-12-13 Thread agneya2001
GitHub user agneya2001 opened a pull request:

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

CLOUDSTACK-9161: fix the quota marvin test

  1. Create a dummy user, as existing user may already have stale quota
  data
  2. fix the tests to use the dummy user
  3. a boundary condition was revealed and fixed for a new user where
  quota service has never run and created bootstrap entries

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

$ git pull https://github.com/shapeblue/cloudstack master-9161

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

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


commit b9ff4abadecc44924b0f77ebd2c8cb2d4f9cc253
Author: Abhinandan Prateek 
Date:   2015-12-14T06:40:48Z

CLOUDSTACK-9161: fix the quota marvin test

  1. Create a dummy user, as existing user may already have stale quota
  data
  2. fix the tests to use the dummy user
  3. a boundary condition was revealed and fixed for a new user where
  quota service has never run and created bootstrap entries




---
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-8841: Storage XenMotion from X...

2015-12-14 Thread agneya2001
Github user agneya2001 commented on the pull request:

https://github.com/apache/cloudstack/pull/815#issuecomment-164376871
  
@priyankparihar As per XenMotion docs: The target host must have the same 
or a more recent version of XenServer installed as the source host. So a 
migration from 6.2 to 6.5 is allowed but not the other way around. (Ref: 
https://knowcitrixx.wordpress.com/2014/11/12/xenmotion/ )
Instead of completely removing the version check you need to ensure that 
the target host has a higher version.



---
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-9161: fix the quota marvin tes...

2015-12-14 Thread agneya2001
Github user agneya2001 commented on a diff in the pull request:

https://github.com/apache/cloudstack/pull/1240#discussion_r47481989
  
--- Diff: 
plugins/database/quota/src/org/apache/cloudstack/api/response/QuotaResponseBuilderImpl.java
 ---
@@ -186,7 +186,7 @@ public int compare(QuotaBalanceVO o1, QuotaBalanceVO 
o2) {
 //check that there is at least one balance entry
 for (Iterator it = quotaBalance.iterator(); 
it.hasNext();) {
 QuotaBalanceVO entry = it.next();
-if (entry.getCreditsId() > 0) {
+if (entry.getCreditsId() == 0) {
--- End diff --

@DaanHoogland good that you are probing the logic.

In a system where quota service has never run, there could be credit 
entries a admin may want to add some credit entries even before quota service 
has run. So at a point the db can have credit entries without any real balance 
entry. There could be a situation where there is a balance entry after several 
credit entries followed by another set of credit entries.

When there is a balance entry it consolidates all the credit entries that 
happened before it.

So when calculating balance you need to add all the credit entries that 
happened after a balance entry while ignoring all the credit entries that 
happened before the first balance entry. You till need to show all the credit 
entries that happened in between for the balance statement.

When marvin tests were run the db was clean with only one credit entry. 
This was a special case where you add all the credit entries to show the final 
balance but you still need to show this credit entry in the balance statement. 
If quota service has run once it makes a 0 balance entry as part of 
bootstrapping.

entry.getCreditsId() == 0, looks for real balance entry. A credit id that 
is non-zero refers to a credit entry with id being the credit id.


---
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-9161: fix the quota marvin tes...

2015-12-14 Thread agneya2001
Github user agneya2001 commented on the pull request:

https://github.com/apache/cloudstack/pull/1240#issuecomment-164405451
  
@DaanHoogland Let me add the DC definition, I still need to figure the 
howto part.


---
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-9161: fix the quota marvin tes...

2015-12-14 Thread agneya2001
Github user agneya2001 commented on the pull request:

https://github.com/apache/cloudstack/pull/1240#issuecomment-164432291
  
@DaanHoogland I have put a check that if the quota is not enabled then the 
tests are skipped. I tried enabling quota from inside the test, but it requires 
a MS restart so will not work.
Also all we will be testing is API on a empty dataset, the real meat is in 
quota generation, but that is outside scope of marvin tests.


---
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-9161: fix the quota marvin tes...

2015-12-14 Thread agneya2001
Github user agneya2001 commented on the pull request:

https://github.com/apache/cloudstack/pull/1240#issuecomment-164652898
  
@DaanHoogland this is what I did:
1. Created a simulator environment
2. Deployed the datacenter using the cfg above, 
3. checked the DB and confirmed that the plugin is enabled
4. The tests still fail as to make the quota APIs available the MS needs to 
be restarted.
5. Restarted management server, all 7 tests ran successfully.


---
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-9161: fix the quota marvin tes...

2015-12-15 Thread agneya2001
Github user agneya2001 commented on the pull request:

https://github.com/apache/cloudstack/pull/1240#issuecomment-165001244
  
Moving the test to test/integration/plugins folder as in most automated 
environment this will either fail or not run, due to  the MS restart required 
to enable the plugin.


---
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-8847: ListServiceOfferings is ...

2015-12-16 Thread agneya2001
Github user agneya2001 commented on the pull request:

https://github.com/apache/cloudstack/pull/823#issuecomment-165102057
  
@nitin-maharana i am wondering why should change in service offering have 
any restrictions on tags ?  @kishankavala any usage implications.


---
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-8847: ListServiceOfferings is ...

2015-12-16 Thread agneya2001
Github user agneya2001 commented on the pull request:

https://github.com/apache/cloudstack/pull/823#issuecomment-165325933
  
@nitin-maharana @koushik-das @kishankavala @bhaisaab @jburwell 
@DaanHoogland @remibergsma Can we have a discussion on: Why do we need any kind 
of restriction on tags while looking for compatible service offering ? Is there 
any downside ? My opinion is we should just allow change of service offering 
irrespective of tags.


---
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-9174: A deleted account result...

2015-12-16 Thread agneya2001
GitHub user agneya2001 opened a pull request:

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

CLOUDSTACK-9174: A deleted account results in NPE

When an account is deleted from cloudstack for which quota is still
being calculated and if the quota reaches minimum threshold then
quota service will try to alert the user. This results in NPE and is
fixed by excluding such accounts from alerting and other quota related
mechanisms.

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

$ git pull https://github.com/shapeblue/cloudstack master-9174

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

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


commit c07720b73cb16cb55dc83047373e22885d47dbc5
Author: Abhinandan Prateek 
Date:   2015-12-17T05:02:33Z

CLOUDSTACK-9174: A deleted account results in NPE

When an account is deleted from cloudstack for which quota is still
being calculated and if the quota reaches minimum threshold then
quota service will try to alert the user. This results in NPE and is
fixed by excluding such accounts from alerting and other quota related
mechanisms.




---
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-9174: A deleted account result...

2015-12-17 Thread agneya2001
Github user agneya2001 commented on a diff in the pull request:

https://github.com/apache/cloudstack/pull/1254#discussion_r47990946
  
--- Diff: 
plugins/database/quota/src/org/apache/cloudstack/api/command/QuotaSummaryCmd.java
 ---
@@ -59,7 +59,7 @@ public QuotaSummaryCmd() {
 public void execute() {
 Account caller = CallContext.current().getCallingAccount();
 List responses;
-if (caller.getAccountId() <= 2) { //non root admin or system
+if (caller.getAccountId() <= 2) { // root admin or system
--- End diff --

rightly pointed


---
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: README: happy holidays!

2015-12-23 Thread agneya2001
Github user agneya2001 commented on the pull request:

https://github.com/apache/cloudstack/pull/1281#issuecomment-166833361
  
sure !


---
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: findbug fixes

2015-12-28 Thread agneya2001
GitHub user agneya2001 opened a pull request:

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

Quota: findbug fixes

Findbug fixes for cloud-framework-quota and cloud-plugin-database-quota.

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

$ git pull https://github.com/shapeblue/cloudstack master-quotafb

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

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


commit 625abb80aa590cfc7e6cfefe6f0bf55c95ac679f
Author: Abhinandan Prateek 
Date:   2015-12-23T04:42:11Z

Quota: findbug fixes




---
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: QuotaStatementTest: fix the method invoca...

2016-01-04 Thread agneya2001
GitHub user agneya2001 opened a pull request:

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

QuotaStatementTest: fix the method invocation verification

Quota emails are send at start of the month, that triggered the 
sendQuotaAlert that was not getting invoked earlier.

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

$ git pull https://github.com/shapeblue/cloudstack master-quota-test

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

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


commit c9296c5cd91c710a079e4e482e7f83ab52c26cec
Author: Abhinandan Prateek 
Date:   2016-01-04T10:58:42Z

QuotaStatementTest: fix the method invocation verification




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


[GitHub] cloudstack pull request: 4.7 quota test

2016-01-04 Thread agneya2001
GitHub user agneya2001 opened a pull request:

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

4.7 quota test

engine/schema: Use semantically correct upgrade path 4.6.2->4.7.0 
QuotaStatementTest: fix the method invocation verification

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

$ git pull https://github.com/shapeblue/cloudstack 4.7-quota-test

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

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


commit 6c5a182c39d62c7615ba3c9ebdecc7fffc541d9f
Author: Rohit Yadav 
Date:   2015-12-16T09:01:00Z

engine/schema: Use semantically correct upgrade path 4.6.2->4.7.0

Adds an explicit upgrade path class from 4.6.2 to 4.7.0, that extends over
the upgrade path from 4.6.1 to 4.7.0

Signed-off-by: Rohit Yadav 

commit 89f9180e7a8e35541f0fe807d28e7b03b39dedf0
Author: Abhinandan Prateek 
Date:   2016-01-04T10:58:42Z

QuotaStatementTest: fix the method invocation verification




---
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: QuotaStatementTest: fix the method invoca...

2016-01-05 Thread agneya2001
Github user agneya2001 closed the pull request at:

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


---
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-8847: ListServiceOfferings is ...

2016-01-14 Thread agneya2001
Github user agneya2001 commented on the pull request:

https://github.com/apache/cloudstack/pull/1321#issuecomment-171865987
  
tag should not be a reason for incompatibility. that is you can mover from 
a service offering that is similar but with any other set of tags.  we should 
just do away with check on tags.


---
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: findbug fixes

2016-01-17 Thread agneya2001
Github user agneya2001 commented on the pull request:

https://github.com/apache/cloudstack/pull/1289#issuecomment-172418090
  
@remibergsma @bhaisaab made review changes


---
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: OSPF: WIP: adding dynamically routing cap...

2016-01-19 Thread agneya2001
GitHub user agneya2001 opened a pull request:

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

OSPF: WIP: adding dynamically routing capability to VPS 

Ticket: https://issues.apache.org/jira/browse/CLOUDSTACK-9163

FS: 
https://cwiki.apache.org/confluence/display/CLOUDSTACK/Dynamically+routed+VPC

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

$ git pull https://github.com/shapeblue/cloudstack master-ospf

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

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


commit d8d178f5ca45d565c4e31fea05f4e45ada410daa
Author: Abhinandan Prateek 
Date:   2015-12-24T11:53:27Z

OSPF: WIP: addign dynamically routing capability to VPS and adding config
item structure to VR quagga configuration




---
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-9174: A deleted account result...

2016-01-26 Thread agneya2001
Github user agneya2001 commented on the pull request:

https://github.com/apache/cloudstack/pull/1254#issuecomment-175372328
  
@cristofolini it is not that involved a code and not something that i can 
reuse. 
But yes i will take a holistic look at the code and refactor when I get 
back to it. 

@bhaisaab @remibergsma Lets not hold it for this.


---
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: consolidated lockable account chec...

2016-01-26 Thread agneya2001
Github user agneya2001 commented on the pull request:

https://github.com/apache/cloudstack/pull/1350#issuecomment-175408926
  
@cristofolini @bhaisaab @remibergsma test code split into simpler methods.


---
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: findbug fixes

2016-01-27 Thread agneya2001
Github user agneya2001 commented on the pull request:

https://github.com/apache/cloudstack/pull/1289#issuecomment-175472278
  
This patch cleans up any find bug issues in cloud-framework-quota and 
cloud-plugin-database-quota, verifiy output below. I think we should not delay 
this @remibergsma @DaanHoogland @bhaisaab @rafaelweingartner 



mvn -P enablefindbugs -pl :cloud-framework-quota verify
...

[INFO] --- maven-compiler-plugin:3.2:compile (default-compile) @ 
cloud-framework-quota ---
[INFO] Nothing to compile - all classes are up to date
[INFO] 
[INFO] >>> findbugs-maven-plugin:3.0.1:check (cloudstack-findbugs) > 
:findbugs @ cloud-framework-quota >>>
[INFO] 
[INFO] --- findbugs-maven-plugin:3.0.1:findbugs (findbugs) @ 
cloud-framework-quota ---
[INFO] Fork Value is true
[INFO] Done FindBugs Analysis
[INFO] 
[INFO] <<< findbugs-maven-plugin:3.0.1:check (cloudstack-findbugs) < 
:findbugs @ cloud-framework-quota <<<
[INFO] 
[INFO] --- findbugs-maven-plugin:3.0.1:check (cloudstack-findbugs) @ 
cloud-framework-quota ---
[INFO] BugInstance size is 0
[INFO] Error size is 0
[INFO] No errors/warnings found
[INFO] 


mvn -P enablefindbugs -pl :cloud-plugin-database-quota verify

..
[INFO] >>> findbugs-maven-plugin:3.0.1:check (cloudstack-findbugs) > 
:findbugs @ cloud-plugin-database-quota >>>
[INFO] 
[INFO] --- findbugs-maven-plugin:3.0.1:findbugs (findbugs) @ 
cloud-plugin-database-quota ---
[INFO] Fork Value is true
[INFO] Done FindBugs Analysis
[INFO] 
[INFO] <<< findbugs-maven-plugin:3.0.1:check (cloudstack-findbugs) < 
:findbugs @ cloud-plugin-database-quota <<<
[INFO] 
[INFO] --- findbugs-maven-plugin:3.0.1:check (cloudstack-findbugs) @ 
cloud-plugin-database-quota ---
[INFO] BugInstance size is 0
[INFO] Error size is 0
[INFO] No errors/warnings found



---
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: findbug fixes

2016-01-27 Thread agneya2001
Github user agneya2001 commented on the pull request:

https://github.com/apache/cloudstack/pull/1289#issuecomment-175500735
  
merging LGTM from @DaanHoogland and @bhaisaab 


---
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: OSPF: WIP: adding dynamically routing cap...

2016-01-27 Thread agneya2001
Github user agneya2001 closed the pull request at:

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


---
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: OSPF: WIP: adding dynamically routing cap...

2016-01-27 Thread agneya2001
GitHub user agneya2001 opened a pull request:

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

OSPF: WIP: adding dynamically routing capability to VPC 

adding dynamically routing capability to VPC and adding config item 
structure to VR quagga configuration

OSPF: zone quagga config API

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

$ git pull https://github.com/shapeblue/cloudstack master-quagga

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

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


commit 7390f87f96cdd7b45f2eb341a27dc1567b9b570a
Author: Abhinandan Prateek 
Date:   2015-12-24T11:53:27Z

OSPF: WIP: adding dynamically routing capability to VPC and adding config
item structure to VR quagga configuration

OSPF: zone quagga config API




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


[GitHub] cloudstack pull request: Quota: consolidated lockable account chec...

2016-01-27 Thread agneya2001
Github user agneya2001 commented on the pull request:

https://github.com/apache/cloudstack/pull/1350#issuecomment-175601093
  
@rafaelweingartner Can you comment on the duplicated lines. There is a way 
you can get to the code and comment there.



---
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: consolidated lockable account chec...

2016-01-27 Thread agneya2001
Github user agneya2001 commented on the pull request:

https://github.com/apache/cloudstack/pull/1350#issuecomment-175603740
  
@rafaelweingartner if you mean initialisation of AccountVO to be moved into 
a method, and replacing it with a method call. I guess I would prefer it this 
way as this keeps things simple. 
The initialisation for domainId and id is done as the method will receive 
similar object, so no harm in passing a object that is close to the one passed 
at runtime, though as you said the function tested is not using 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: Quota: consolidated lockable account chec...

2016-01-27 Thread agneya2001
Github user agneya2001 commented on the pull request:

https://github.com/apache/cloudstack/pull/1350#issuecomment-175624327
  
@rafaelweingartner quality is what we are discussing and I simply do not 
think that putting 3 lines of object initialisation in a method will make it 
high quality. Are you referring to some guidelines that I can see too ? 


---
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: consolidated lockable account chec...

2016-01-27 Thread agneya2001
Github user agneya2001 commented on the pull request:

https://github.com/apache/cloudstack/pull/1350#issuecomment-175634392
  
@rafaelweingartner If it is a black box test then the person testing will 
obviously try to pass a realistic data set, that is what I have done. It is 
possible that tomorrow there are some changes to the tested method and the data 
that looks superficial may come into play and expose some erratic behaviour. 
The dataset passed mocks the dataset that will go thru the method in real 
runtime condition. Now offcourse we can see that the data is not being used in 
this method but does that mean I should change the dataset that mocks the real 
value ?


---
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: consolidated lockable account chec...

2016-01-27 Thread agneya2001
Github user agneya2001 commented on the pull request:

https://github.com/apache/cloudstack/pull/1350#issuecomment-175656788
  
@rafaelweingartner  It is only about realistic test data that is being 
passed to the method tested. You should differentiate between the tested code 
and the code that is testing. The logic/code that is being tested should have 
all the characteristics that you are talking about ie any data that is not 
being used should not be there.
But when it comes to writing tests and creating mocks you do it in a more 
realistic manner without deducing what could be happening inside the method as 
you only test what the method is supposed to be doing. That makes it error 
proof in future and that was what i was talking about.



---
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: consolidated lockable account chec...

2016-01-27 Thread agneya2001
Github user agneya2001 commented on the pull request:

https://github.com/apache/cloudstack/pull/1350#issuecomment-175710627
  
@rafaelweingartner @bhaisaab I have taken out the duplicate account 
initialisation.


---
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: consolidated lockable account chec...

2016-01-27 Thread agneya2001
Github user agneya2001 commented on the pull request:

https://github.com/apache/cloudstack/pull/1350#issuecomment-175712977
  
@cristofolini your changes are incorporated can you review these.


---
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: consolidated lockable account chec...

2016-01-27 Thread agneya2001
Github user agneya2001 commented on a diff in the pull request:

https://github.com/apache/cloudstack/pull/1350#discussion_r51006727
  
--- Diff: 
framework/quota/test/org/apache/cloudstack/quota/QuotaManagerImplTest.java ---
@@ -197,4 +197,58 @@ public void testProcessQuotaBalanceForAccount() {
 Mockito.verify(quotaAcc, 
Mockito.times(1)).persistQuotaAccount(Mockito.any(QuotaAccountVO.class));
 }
 
+@Test
+public void testAdminLockableAccount() {
+AccountVO accountVO = new AccountVO();
+accountVO.setId(2L);
+accountVO.setDomainId(1L);
+accountVO.setType(Account.ACCOUNT_TYPE_ADMIN);
+assertFalse(quotaManager.isLockable(accountVO));
+}
+
+@Test
+public void testNormalLockableAccount() {
+AccountVO accountVO = new AccountVO();
+accountVO.setId(3L);
+accountVO.setDomainId(1L);
+accountVO.setType(Account.ACCOUNT_TYPE_NORMAL);
+assertTrue(quotaManager.isLockable(accountVO));
+}
+
+@Test
+public void tesDomainAdmingLockableAccount() {
+AccountVO accountVO = new AccountVO();
+accountVO.setId(5L);
+accountVO.setDomainId(1L);
+accountVO.setType(Account.ACCOUNT_TYPE_DOMAIN_ADMIN);
+assertTrue(quotaManager.isLockable(accountVO));
+}
+
+@Test
+public void testReadOnlyAdminLockableAccount() {
+AccountVO accountVO = new AccountVO();
+accountVO.setId(6L);
+accountVO.setDomainId(1L);
+accountVO.setType(Account.ACCOUNT_TYPE_READ_ONLY_ADMIN);
+assertFalse(quotaManager.isLockable(accountVO));
+}
+
+@Test
+public void testResourceDomainAdminLockableAccount() {
+AccountVO accountVO = new AccountVO();
+accountVO.setId(7L);
+accountVO.setDomainId(1L);
+accountVO.setType(Account.ACCOUNT_TYPE_RESOURCE_DOMAIN_ADMIN);
+assertFalse(quotaManager.isLockable(accountVO));
+}
+
+@Test
+public void testProjectLockableAccount() {
+AccountVO accountVO = new AccountVO();
+accountVO.setId(7L);
+accountVO.setDomainId(1L);
+accountVO.setType(Account.ACCOUNT_TYPE_PROJECT);
+assertFalse(quotaManager.isLockable(accountVO));
--- End diff --

@bhaisaab I don't agree with the change as it impacts simplicity and 
quality. All the three lines that you are asking me have a data element that 
will become a function parameter, I am not sure how it will simplify or result 
in enhanced quality.


---
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: consolidated lockable account chec...

2016-01-27 Thread agneya2001
Github user agneya2001 commented on the pull request:

https://github.com/apache/cloudstack/pull/1350#issuecomment-175931632
  
This code that was suggested:

private AccountVO createAccountVoForType(short type) {
AccountVO accountVO = new AccountVO();
accountVO.setType(type);
return accountVO;
  }

   @Test
public void testAdminLockableAccount() {
AccountVO accountVO = 
createAccountVoForType(Account.ACCOUNT_TYPE_ADMIN);
assertFalse(quotaManager.isLockable(accountVO));
}

@Test
public void testAdminLockableAccount() {
AccountVO accountVO = 
createAccountVoForType(Account.ACCOUNT_TYPE_ADMIN);
assertFalse(quotaManager.isLockable(accountVO));
}

and this code that will otherwise be:


   @Test
   public void testResourceDomainAdminLockableAccount() {
   AccountVO accountVO = new AccountVO();
accountVO.setType(Account.ACCOUNT_TYPE_RESOURCE_DOMAIN_ADMIN);
 assertFalse(quotaManager.isLockable(accountVO));
   }
   
   @Test
public void testProjectLockableAccount() {
AccountVO accountVO = new AccountVO();
accountVO.setType(Account.ACCOUNT_TYPE_PROJECT);
assertFalse(quotaManager.isLockable(accountVO));
   }
   

@rafaelweingartner  To me the code below looks simple and more readable. 
(In general if this was not the test code some of this code will be in 
constructor. Coming to constructors, there is much more repeatable code there 
in many cloudstack classes.) Now this might not look good to you and some 
others too. I suggest if that is the case take some effort and put up a code 
style guideline or at least adopt a guideline that already exists so that we 
donot have to go thru this. This will also be food for further cleanup as 
findbug and code style check already are CC: @bhaisaab @remibergsma 
@DaanHoogland @cristofolini. Till then this stands as it is.

 


---
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: consolidated lockable account chec...

2016-01-28 Thread agneya2001
Github user agneya2001 commented on the pull request:

https://github.com/apache/cloudstack/pull/1350#issuecomment-176082402
  
@DaanHoogland I agree there should be some guideline on code style. If 
these are there I think most of us will be willing to follow these. I guess it 
will not be difficult to adapt something that is already out there. 


---
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: OSPF: WIP: adding dynamically routing cap...

2016-02-04 Thread agneya2001
Github user agneya2001 commented on a diff in the pull request:

https://github.com/apache/cloudstack/pull/1371#discussion_r51858432
  
--- Diff: setup/db/db/schema-471to480.sql ---
@@ -27,3 +27,10 @@ ALTER TABLE `cloud`.`image_store` MODIFY COLUMN `url` 
varchar(2048);
 ALTER TABLE `cloud`.`template_store_ref` MODIFY COLUMN `url` varchar(2048);
 ALTER TABLE `cloud`.`volume_store_ref` MODIFY COLUMN `url` varchar(2048);
 ALTER TABLE `cloud`.`volume_store_ref` MODIFY COLUMN `download_url` 
varchar(2048);
+
--- End diff --

@remibergsma thank you, will adjust the versions


---
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-8395: vmops plugin should work...

2015-04-21 Thread agneya2001
Github user agneya2001 commented on the pull request:

https://github.com/apache/cloudstack/pull/186#issuecomment-95016103
  
Reviewed it, looks good.


---
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: tool to aid db comaprision for upgrade te...

2015-04-23 Thread agneya2001
Github user agneya2001 commented on the pull request:

https://github.com/apache/cloudstack/pull/188#issuecomment-95811296
  
It appears that some functionality still needs to be completed.


---
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: tool to aid db comaprision for upgrade te...

2015-04-24 Thread agneya2001
Github user agneya2001 commented on the pull request:

https://github.com/apache/cloudstack/pull/188#issuecomment-95858828
  
Was thinking of more of a script with a wizard interface, instead of bunch 
of scripts, that guides the user during upgrade.
Some suggestions:
A way to fix mismatched configuration like prompt user with missing config 
and accept values ?
On another side, if this kind of functionality is integrated with upgrade 
itself, that warns user about changed configs after upgrades etc.


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


[GitHub] cloudstack pull request: Quota

2015-12-07 Thread agneya2001
Github user agneya2001 commented on a diff in the pull request:

https://github.com/apache/cloudstack/pull/768#discussion_r46796541
  
--- Diff: 
framework/quota/test/org/apache/cloudstack/quota/QuotaAlertManagerImplTest.java 
---
@@ -0,0 +1,205 @@
+// Licensed to the Apache Software Foundation (ASF) under one
+// or more contributor license agreements.  See the NOTICE file
+// distributed with this work for additional information
+// regarding copyright ownership.  The ASF licenses this file
+// to you under the Apache License, Version 2.0 (the
+// "License"); you may not use this file except in compliance
+// with the License.  You may obtain a copy of the License at
+//
+//   http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing,
+// software distributed under the License is distributed on an
+// "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+// KIND, either express or implied.  See the License for the
+// specific language governing permissions and limitations
+// under the License.
+package org.apache.cloudstack.quota;
+
+import com.cloud.domain.DomainVO;
+import com.cloud.domain.dao.DomainDao;
+import com.cloud.user.Account;
+import com.cloud.user.AccountVO;
+import com.cloud.user.UserVO;
+import com.cloud.user.dao.AccountDao;
+import com.cloud.user.dao.UserDao;
+import com.cloud.utils.db.TransactionLegacy;
+import junit.framework.TestCase;
+import org.apache.cloudstack.framework.config.dao.ConfigurationDao;
+import org.apache.cloudstack.quota.constant.QuotaConfig;
+import org.apache.cloudstack.quota.dao.QuotaAccountDao;
+import org.apache.cloudstack.quota.dao.QuotaEmailTemplatesDao;
+import org.apache.cloudstack.quota.dao.QuotaUsageDao;
+import org.apache.cloudstack.quota.vo.QuotaAccountVO;
+import org.apache.cloudstack.quota.vo.QuotaEmailTemplatesVO;
+import org.joda.time.DateTime;
+import org.junit.Before;
+import org.junit.Test;
+import org.junit.runner.RunWith;
+import org.mockito.Mock;
+import org.mockito.Mockito;
+import org.mockito.Spy;
+import org.mockito.runners.MockitoJUnitRunner;
+
+import javax.mail.MessagingException;
+import javax.naming.ConfigurationException;
+import java.io.UnsupportedEncodingException;
+import java.lang.reflect.Field;
+import java.math.BigDecimal;
+import java.util.ArrayList;
+import java.util.Date;
+import java.util.List;
+
+@RunWith(MockitoJUnitRunner.class)
+public class QuotaAlertManagerImplTest extends TestCase {
+
+@Mock
+AccountDao accountDao;
+@Mock
+QuotaAccountDao quotaAcc;
+@Mock
+UserDao userDao;
+@Mock
+DomainDao domainDao;
+@Mock
+QuotaEmailTemplatesDao quotaEmailTemplateDao;
+@Mock
+ConfigurationDao configDao;
+@Mock
+QuotaUsageDao quotaUsage;
+@Mock
+QuotaAlertManagerImpl.EmailQuotaAlert emailQuotaAlert;
+
+@Spy
+QuotaAlertManagerImpl quotaAlertManager = new QuotaAlertManagerImpl();
+
+private void injectMockToField(Object mock, String fieldName) throws 
NoSuchFieldException, IllegalAccessException {
+Field f = QuotaAlertManagerImpl.class.getDeclaredField(fieldName);
+f.setAccessible(true);
+f.set(quotaAlertManager, mock);
+}
+
+@Before
+public void setup() throws IllegalAccessException, 
NoSuchFieldException, ConfigurationException {
+// Dummy transaction stack setup
+TransactionLegacy.open("QuotaAlertManagerImplTest");
+
+injectMockToField(accountDao, "_accountDao");
+injectMockToField(quotaAcc, "_quotaAcc");
+injectMockToField(userDao, "_userDao");
+injectMockToField(domainDao, "_domainDao");
+injectMockToField(quotaEmailTemplateDao, "_quotaEmailTemplateDao");
+injectMockToField(configDao, "_configDao");
+injectMockToField(quotaUsage, "_quotaUsage");
+injectMockToField(emailQuotaAlert, "_emailQuotaAlert");
+}
+
+@Test
+public void testStartStop() {
+try {
+quotaAlertManager.start(); // expected to fail as pid is not 
available
+} catch (NumberFormatException ignored) {
+}
+assertTrue(quotaAlertManager.stop());
+}
+
+@Test
+public void testCheckAndSendQuotaAlertEmails() {
+AccountVO accountVO = new AccountVO();
+accountVO.setId(2L);
+accountVO.setDomainId(1L);
+accountVO.setType(Account.ACCOUNT_TYPE_NORMAL);
+
Mockito.w

[GitHub] cloudstack pull request: Quota

2015-12-07 Thread agneya2001
Github user agneya2001 commented on a diff in the pull request:

https://github.com/apache/cloudstack/pull/768#discussion_r46796893
  
--- Diff: 
framework/quota/test/org/apache/cloudstack/quota/QuotaAlertManagerImplTest.java 
---
@@ -0,0 +1,205 @@
+// Licensed to the Apache Software Foundation (ASF) under one
+// or more contributor license agreements.  See the NOTICE file
+// distributed with this work for additional information
+// regarding copyright ownership.  The ASF licenses this file
+// to you under the Apache License, Version 2.0 (the
+// "License"); you may not use this file except in compliance
+// with the License.  You may obtain a copy of the License at
+//
+//   http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing,
+// software distributed under the License is distributed on an
+// "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+// KIND, either express or implied.  See the License for the
+// specific language governing permissions and limitations
+// under the License.
+package org.apache.cloudstack.quota;
+
+import com.cloud.domain.DomainVO;
+import com.cloud.domain.dao.DomainDao;
+import com.cloud.user.Account;
+import com.cloud.user.AccountVO;
+import com.cloud.user.UserVO;
+import com.cloud.user.dao.AccountDao;
+import com.cloud.user.dao.UserDao;
+import com.cloud.utils.db.TransactionLegacy;
+import junit.framework.TestCase;
+import org.apache.cloudstack.framework.config.dao.ConfigurationDao;
+import org.apache.cloudstack.quota.constant.QuotaConfig;
+import org.apache.cloudstack.quota.dao.QuotaAccountDao;
+import org.apache.cloudstack.quota.dao.QuotaEmailTemplatesDao;
+import org.apache.cloudstack.quota.dao.QuotaUsageDao;
+import org.apache.cloudstack.quota.vo.QuotaAccountVO;
+import org.apache.cloudstack.quota.vo.QuotaEmailTemplatesVO;
+import org.joda.time.DateTime;
+import org.junit.Before;
+import org.junit.Test;
+import org.junit.runner.RunWith;
+import org.mockito.Mock;
+import org.mockito.Mockito;
+import org.mockito.Spy;
+import org.mockito.runners.MockitoJUnitRunner;
+
+import javax.mail.MessagingException;
+import javax.naming.ConfigurationException;
+import java.io.UnsupportedEncodingException;
+import java.lang.reflect.Field;
+import java.math.BigDecimal;
+import java.util.ArrayList;
+import java.util.Date;
+import java.util.List;
+
+@RunWith(MockitoJUnitRunner.class)
+public class QuotaAlertManagerImplTest extends TestCase {
+
+@Mock
+AccountDao accountDao;
+@Mock
+QuotaAccountDao quotaAcc;
+@Mock
+UserDao userDao;
+@Mock
+DomainDao domainDao;
+@Mock
+QuotaEmailTemplatesDao quotaEmailTemplateDao;
+@Mock
+ConfigurationDao configDao;
+@Mock
+QuotaUsageDao quotaUsage;
+@Mock
+QuotaAlertManagerImpl.EmailQuotaAlert emailQuotaAlert;
+
+@Spy
+QuotaAlertManagerImpl quotaAlertManager = new QuotaAlertManagerImpl();
+
+private void injectMockToField(Object mock, String fieldName) throws 
NoSuchFieldException, IllegalAccessException {
+Field f = QuotaAlertManagerImpl.class.getDeclaredField(fieldName);
+f.setAccessible(true);
+f.set(quotaAlertManager, mock);
+}
+
+@Before
+public void setup() throws IllegalAccessException, 
NoSuchFieldException, ConfigurationException {
+// Dummy transaction stack setup
+TransactionLegacy.open("QuotaAlertManagerImplTest");
+
+injectMockToField(accountDao, "_accountDao");
+injectMockToField(quotaAcc, "_quotaAcc");
+injectMockToField(userDao, "_userDao");
+injectMockToField(domainDao, "_domainDao");
+injectMockToField(quotaEmailTemplateDao, "_quotaEmailTemplateDao");
+injectMockToField(configDao, "_configDao");
+injectMockToField(quotaUsage, "_quotaUsage");
+injectMockToField(emailQuotaAlert, "_emailQuotaAlert");
+}
+
+@Test
+public void testStartStop() {
+try {
+quotaAlertManager.start(); // expected to fail as pid is not 
available
+} catch (NumberFormatException ignored) {
+}
+assertTrue(quotaAlertManager.stop());
+}
+
+@Test
+public void testCheckAndSendQuotaAlertEmails() {
+AccountVO accountVO = new AccountVO();
+accountVO.setId(2L);
+accountVO.setDomainId(1L);
+accountVO.setType(Account.ACCOUNT_TYPE_NORMAL);
+
Mockito.w

[GitHub] cloudstack pull request: Quota

2015-12-07 Thread agneya2001
Github user agneya2001 commented on a diff in the pull request:

https://github.com/apache/cloudstack/pull/768#discussion_r46796854
  
--- Diff: 
framework/quota/test/org/apache/cloudstack/quota/QuotaManagerImplTest.java ---
@@ -0,0 +1,203 @@
+// Licensed to the Apache Software Foundation (ASF) under one
+// or more contributor license agreements.  See the NOTICE file
+// distributed with this work for additional information
+// regarding copyright ownership.  The ASF licenses this file
+// to you under the Apache License, Version 2.0 (the
+// "License"); you may not use this file except in compliance
+// with the License.  You may obtain a copy of the License at
+//
+//   http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing,
+// software distributed under the License is distributed on an
+// "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+// KIND, either express or implied.  See the License for the
+// specific language governing permissions and limitations
+// under the License.
+package org.apache.cloudstack.quota;
+
+import com.cloud.usage.UsageVO;
+import com.cloud.usage.dao.UsageDao;
+import com.cloud.user.Account;
+import com.cloud.user.AccountVO;
+import com.cloud.user.dao.AccountDao;
+import com.cloud.utils.Pair;
+import com.cloud.utils.db.TransactionLegacy;
+import junit.framework.TestCase;
+import org.apache.cloudstack.framework.config.dao.ConfigurationDao;
+import org.apache.cloudstack.quota.dao.QuotaAccountDao;
+import org.apache.cloudstack.quota.dao.QuotaBalanceDao;
+import org.apache.cloudstack.quota.dao.QuotaTariffDao;
+import org.apache.cloudstack.quota.dao.QuotaUsageDao;
+import org.apache.cloudstack.quota.dao.ServiceOfferingDao;
+import org.apache.cloudstack.quota.vo.QuotaAccountVO;
+import org.apache.cloudstack.quota.vo.QuotaTariffVO;
+import org.apache.cloudstack.quota.vo.QuotaUsageVO;
+import org.apache.cloudstack.usage.UsageTypes;
+import org.junit.Before;
+import org.junit.Test;
+import org.junit.runner.RunWith;
+import org.mockito.Mock;
+import org.mockito.Mockito;
+import org.mockito.Spy;
+import org.mockito.runners.MockitoJUnitRunner;
+
+import javax.naming.ConfigurationException;
+import java.lang.reflect.Field;
+import java.math.BigDecimal;
+import java.util.ArrayList;
+import java.util.Date;
+import java.util.HashMap;
+import java.util.List;
+import java.util.Map;
+
+@RunWith(MockitoJUnitRunner.class)
+public class QuotaManagerImplTest extends TestCase {
+
+@Mock
+private AccountDao accountDao;
+@Mock
+private QuotaAccountDao quotaAcc;
+@Mock
+private UsageDao usageDao;
+@Mock
+private QuotaTariffDao quotaTariffDao;
+@Mock
+private QuotaUsageDao quotaUsageDao;
+@Mock
+private ServiceOfferingDao serviceOfferingDao;
+@Mock
+private QuotaBalanceDao quotaBalanceDao;
+@Mock
+private ConfigurationDao configDao;
+
+@Spy
+QuotaManagerImpl quotaManager = new QuotaManagerImpl();
+
+private void injectMockToField(Object mock, String fieldName) throws 
NoSuchFieldException, IllegalAccessException {
+Field f = QuotaManagerImpl.class.getDeclaredField(fieldName);
+f.setAccessible(true);
+f.set(quotaManager, mock);
+}
+
+@Before
+public void setup() throws IllegalAccessException, 
NoSuchFieldException, ConfigurationException {
+// Dummy transaction stack setup
+TransactionLegacy.open("QuotaManagerImplTest");
+
+injectMockToField(accountDao, "_accountDao");
+injectMockToField(quotaAcc, "_quotaAcc");
+injectMockToField(usageDao, "_usageDao");
+injectMockToField(quotaTariffDao, "_quotaTariffDao");
+injectMockToField(quotaUsageDao, "_quotaUsageDao");
+injectMockToField(serviceOfferingDao, "_serviceOfferingDao");
+injectMockToField(quotaBalanceDao, "_quotaBalanceDao");
+injectMockToField(configDao, "_configDao");
+}
+
+@Test
+public void testStartStop() {
+try {
+quotaManager.start(); // expected to fail as pid is not 
available
+} catch (NumberFormatException ignored) {
+}
+assertTrue(quotaManager.stop());
+}
+
+@Test
+public void testConfig() throws ConfigurationException {
+
Mockito.when(configDao.getConfiguration(Mockito.anyMapOf(String.class, 
Object.class))).thenReturn(new HashMap());
+Map 

[GitHub] cloudstack pull request: Quota

2015-12-07 Thread agneya2001
Github user agneya2001 commented on the pull request:

https://github.com/apache/cloudstack/pull/768#issuecomment-162529656
  
@bhaisaab @remibergsma there is still one issue that I am looking at 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: Implement Quota service

2015-12-07 Thread agneya2001
Github user agneya2001 commented on the pull request:

https://github.com/apache/cloudstack/pull/768#issuecomment-162595100
  
@bhaisaab the issue is resolved.


---
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-9122: future credit etries sho...

2015-12-08 Thread agneya2001
GitHub user agneya2001 opened a pull request:

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

CLOUDSTACK-9122: future credit etries should be incorporated when the…

future credit etries should be incorporated when the balance is calculated

1. Some code is refactored so that unit tests (TODO in future) are more 
comprehensive
2. The fix is to incorporate the credit entries on line 228.

https://issues.apache.org/jira/browse/CLOUDSTACK-9122

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

$ git pull https://github.com/shapeblue/cloudstack master-9122

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

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


commit f6828268ccb6c2218650e9870d09843714dfd791
Author: Abhinandan Prateek 
Date:   2015-12-08T11:51:00Z

CLOUDSTACK-9122: future credit etries should be incorporated when the 
balance is
calculated




---
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: ENSURING THAT THE DATES DISPLAYED ...

2015-12-08 Thread agneya2001
GitHub user agneya2001 opened a pull request:

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

QUOTA: ENSURING THAT THE DATES DISPLAYED ARE AS PER USER EXPECTATIONS

When querying db we use start of next day to query quota usage for
today, but while displaying it to user we still need to show it as
todays date.

A regression due to feature review fixes is also made.

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

$ git pull https://github.com/shapeblue/cloudstack master-9126

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

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


commit 5243ec882dc078edcbf10d5f0f618f7d9d9f5592
Author: Abhinandan Prateek 
Date:   2015-12-08T04:29:06Z

QUOTA: ENSURING THAT THE DATES DISPLAYED ARE AS PER USER EXPECTATIONS

When querying db we use start of next day to query quota usage for
today, but while displaying it to user we still need to show it as
todays date




---
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-9125: Brazilian translations

2015-12-08 Thread agneya2001
GitHub user agneya2001 opened a pull request:

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

CLOUDSTACK-9125: Brazilian translations

The pull request contains brazilian translations for quota labels.

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

$ git pull https://github.com/shapeblue/cloudstack master-9125

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

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


commit 7859c6813c00af5de8c7f6e1e7416334ca0a049b
Author: Abhinandan Prateek 
Date:   2015-12-08T06:10:00Z

CLOUDSTACK-9125: Brazilian translations




---
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-9125: Brazilian translations

2015-12-09 Thread agneya2001
Github user agneya2001 commented on the pull request:

https://github.com/apache/cloudstack/pull/1194#issuecomment-163158903
  
@milamberspace will give it a try.


---
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: Implement Quota service

2015-12-09 Thread agneya2001
Github user agneya2001 commented on the pull request:

https://github.com/apache/cloudstack/pull/768#issuecomment-163178775
  
checking. cc @remibergsma 


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


[GitHub] cloudstack pull request: CLOUDSTACK-9131: Create a new API to chec...

2015-12-09 Thread agneya2001
GitHub user agneya2001 opened a pull request:

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

CLOUDSTACK-9131: Create a new API to check if the plugin is enabled.


Adding a new command to check if the quota plugin is enabled.
Also changed the command version to 4.7.

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

$ git pull https://github.com/shapeblue/cloudstack master-CLOUDSTACK-9131

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

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


commit 17d8ea64a8e615e4ed1cf8ddfeee3d7e60548004
Author: Abhinandan Prateek 
Date:   2015-12-09T11:41:18Z

CLOUDSTACK-9131: Create a new API to check if the plugin is enabled.




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


[GitHub] cloudstack pull request: QUOTA: ENSURING THAT THE DATES DISPLAYED ...

2015-12-09 Thread agneya2001
Github user agneya2001 closed the pull request at:

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


---
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: ENSURING THAT THE DATES DISPLAYED ...

2015-12-09 Thread agneya2001
Github user agneya2001 commented on the pull request:

https://github.com/apache/cloudstack/pull/1193#issuecomment-163479275
  
Closing this to change the case of the title.


---
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: Ensuring that the dates displayed ...

2015-12-09 Thread agneya2001
GitHub user agneya2001 opened a pull request:

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

QUOTA: Ensuring that the dates displayed are as per user expectations

When querying db we use start of next day to query quota usage for
today, but while displaying it to user we still need to show it as
todays date

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

$ git pull https://github.com/shapeblue/cloudstack master-9126

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

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


commit 0bad8dd18a445d9570bf6589bf9b5bbeccbd4dca
Author: Abhinandan Prateek 
Date:   2015-12-08T04:29:06Z

QUOTA: Ensuring that the dates displayed are as per user expectations

When querying db we use start of next day to query quota usage for
today, but while displaying it to user we still need to show it as
todays date




---
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-9125: Brazilian translations

2015-12-10 Thread agneya2001
Github user agneya2001 commented on the pull request:

https://github.com/apache/cloudstack/pull/1194#issuecomment-163586496
  
@GabrielBrascher Noted, I think I need to submit translation via Transfix. 
I am working on 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-8847: ListServiceOfferings is ...

2015-12-10 Thread agneya2001
Github user agneya2001 commented on the pull request:

https://github.com/apache/cloudstack/pull/823#issuecomment-163834017
  
@nitin-maharana The current way was to move the service offering to a 
similar or a more flexible one in terms of deployment. While this change will 
make the new service offering more restrictive and may result in change of 
deployment. This does not sound very reasonable. cc @DaanHoogland 


---
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-9136: remove ssh keypairs alon...

2015-12-10 Thread agneya2001
Github user agneya2001 commented on the pull request:

https://github.com/apache/cloudstack/pull/1212#issuecomment-163835153
  
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: L10N update before 4.7.0 RC1

2015-12-11 Thread agneya2001
Github user agneya2001 commented on the pull request:

https://github.com/apache/cloudstack/pull/1217#issuecomment-163879371
  
@milamberspace pt_BR updated.


---
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-9103 : Missing OS Mappings for...

2015-12-11 Thread agneya2001
Github user agneya2001 commented on the pull request:

https://github.com/apache/cloudstack/pull/1216#issuecomment-163879896
  
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: CLOUDSTACK-9125: Brazilian translations

2015-12-11 Thread agneya2001
Github user agneya2001 commented on the pull request:

https://github.com/apache/cloudstack/pull/1194#issuecomment-163880656
  
Closing it as translations are submitted via transfix website.


---
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-9125: Brazilian translations

2015-12-11 Thread agneya2001
Github user agneya2001 closed the pull request at:

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


---
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: Ensuring that the dates displayed ...

2015-12-11 Thread agneya2001
Github user agneya2001 commented on a diff in the pull request:

https://github.com/apache/cloudstack/pull/1205#discussion_r47334512
  
--- Diff: 
plugins/database/quota/src/org/apache/cloudstack/api/response/QuotaResponseBuilderImpl.java
 ---
@@ -233,9 +233,9 @@ public int compare(QuotaBalanceVO o1, QuotaBalanceVO 
o2) {
 // order is desc last item is the start item
 QuotaBalanceVO startItem = 
quotaBalance.get(quotaBalance.size() - 1);
 QuotaBalanceVO endItem = quotaBalance.get(0);
-resp.setStartDate(startItem.getUpdatedOn());
+resp.setStartDate(startDate);
--- End diff --

setStartDate of QuotaBalanceResponse makes a copy of the date passed.


---
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-9136: remove ssh keypairs alon...

2015-12-11 Thread agneya2001
Github user agneya2001 commented on the pull request:

https://github.com/apache/cloudstack/pull/1212#issuecomment-163939898
  
Sorry, I just started looking at PRs, next time I will elaborate on my LGTM.
For this particular one when a account is deleted it leaves the ssh key in 
the user table. Since, it is a few line fix I did a code review and it shows 
that the code will remove the ssh keys for all users under a removed account. 
Leaving ssh keys in db is not a good idea. This issue is there in 4.7 too.


---
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-9103 : Missing OS Mappings for...

2015-12-11 Thread agneya2001
Github user agneya2001 commented on the pull request:

https://github.com/apache/cloudstack/pull/1216#issuecomment-163940491
  
Elaborating on my LGTM: The changes are in right upgrade path. The sql 
script is error free. It adds guest os support for 6.0 excluding the ones that 
are deprecated. It also adds rhel7 support for 5.5 that is as per documentation.


---
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: tool to aid db comaprision for upgrade te...

2015-08-18 Thread agneya2001
Github user agneya2001 commented on the pull request:

https://github.com/apache/cloudstack/pull/188#issuecomment-132160851
  
Yes this was committed.

> On 14-Aug-2015, at 2:48 pm, Rohit Yadav  wrote:
> 
> Was this merge on master?
> 
> —
> Reply to this email directly or view it on GitHub 
<https://github.com/apache/cloudstack/pull/188#issuecomment-131039138>.
> 




---
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: OSPF: adding dynamically routing capabili...

2016-03-18 Thread agneya2001
Github user agneya2001 commented on the pull request:

https://github.com/apache/cloudstack/pull/1371#issuecomment-198251894
  
Documentation PR is here 
https://github.com/apache/cloudstack-docs-admin/pull/36


---
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: OSPF: WIP formatting documenta...

2016-03-18 Thread agneya2001
GitHub user agneya2001 opened a pull request:

https://github.com/apache/cloudstack-docs-admin/pull/36

OSPF: WIP formatting documentation for ospf

WIP: documentation for ospf

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

$ git pull https://github.com/agneya2001/cloudstack-docs-admin master-quagga

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

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


commit cb02452042ca1ac8d1d1cbbd3e68e9831f4d8536
Author: Abhinandan Prateek 
Date:   2016-03-18T08:26:30Z

OSPF: WIP formatting documentation for ospf




---
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: OSPF: adding dynamically routing capabili...

2016-03-19 Thread agneya2001
Github user agneya2001 commented on the pull request:

https://github.com/apache/cloudstack/pull/1371#issuecomment-197830412
  
Marvin test log for testing ospf: 

nosetests --with-xunit --xunit-file=/tmp/simulator/smoke/test_quota.xml 
--with-marvin --marvin-config=/root/cloudstack_shapeblue/advanced.cfg 
/root/cloudstack_shapeblue/test/integration/component/test_ospf.py -s -a 
tags=advanced,required_hardware=false --zone=Bootcamp --hypervisor=xenserver

 Marvin Init Started 

=== Marvin Parse Config Successful ===

=== Marvin Setting TestData Successful===

 Log Folder Path: /tmp//MarvinLogs//Mar_17_2016_15_54_43_FRA4VS. All 
logs will be available here 

=== Marvin Init Logging Successful===

 Marvin Init Successful 
test_01_dynamic_routing_using_ospf 
(integration.component.test_ospf.TestCreateDynmaicServiceOffering)
Response quaggaEnabled: true
Response ospfSuperCIDR: 200.100.0.0/16
Response quaggaEnabled: true
Response ospfSuperCIDR: 200.100.0.0/16
Check if the VPC offering is created successfully?
VPC offering is created successfully - Cosmic VPC off-8V5DNP
VPC Offering id = 0976e8a3-87ec-4f47-854d-7fb6433a64a4
Check if the VPC network is created successfully?
VPC network created successfully - Batman VPC-U784HI
VPC batman_vpc id = db59e37c-bd73-4c7b-b9af-6de6f494b4b0
Check if the VPC network is created successfully?
VPC network created successfully - Superman VPC-9OWLC6
VPC superman_vpc id = ffcdfa4d-2af8-43db-b7df-f3abc3e6ce78
Dynamic Network offering id = ffd45aec-9917-471e-8e90-297584963618
Created a network ACL list acl
Added a network ACL 3546e9cc-570f-495a-9bf2-60e1e4b823f2 to ACL list acl
Added a network ACL 02a4dbb2-e29a-4653-9d06-868d0aa6406c to ACL list acl
Verifying list network response to check if network created?
Created batman_network_tier1 with ID: c2eb368f-330c-4e08-b36f-a431e369023f
Created a network ACL list acl
Added a network ACL 48042210-7e6c-4001-97bb-625a36da9584 to ACL list acl
Added a network ACL a96782de-1d30-4650-b896-d27089ef9258 to ACL list acl
Verifying list network response to check if network created?
Created superman_network_tier1 with ID: e037f276-5527-43f5-8916-e97aaf0f4656
Using template 06415103-d802-44de-ba4c-82f1f465dda8 
Using service offering 438477b3-f54d-4d59-a845-520ac91a874f 
Deployed VM 75b13cfa-09d7-4836-a8ba-2b4aa33346f9 in network: 
c2eb368f-330c-4e08-b36f-a431e369023f
Deployed VM c5bbab5c-108b-4cfe-88d7-f87ae4e27bc3 in network: 
e037f276-5527-43f5-8916-e97aaf0f4656
Acquired public ip for batman vm 192.168.100.69
Static Nat enabled on ip 192.168.100.69
Trying SSH Connection: Host:192.168.100.69 User:root
   Port:22 RetryCnt:60===
===SSH to Host 192.168.100.69 port : 22 SUCCESSFUL===
{Cmd: ping -c 1 200.100.5.101 via Host: 192.168.100.69} {returns: [u'PING 
200.100.5.101 (200.100.5.101): 56 data bytes', u'64 bytes from 200.100.5.101: 
seq=0 ttl=62 time=2.347 ms', u'', u'--- 200.100.5.101 ping statistics ---', u'1 
packets transmitted, 1 packets received, 0% packet loss', u'round-trip 
min/avg/max = 2.347/2.347/2.347 ms']}
[u'PING 200.100.5.101 (200.100.5.101): 56 data bytes', u'64 bytes from 
200.100.5.101: seq=0 ttl=62 time=2.347 ms', u'', u'--- 200.100.5.101 ping 
statistics ---', u'1 packets transmitted, 1 packets received, 0% packet loss', 
u'round-trip min/avg/max = 2.347/2.347/2.347 ms']
Test successful clearing VMs
Test successful clearing VPC Tiers
Test successful clearing VPCs
=== TestName: test_01_dynamic_routing_using_ospf | Status : SUCCESS ===

===final results are now copied to: /tmp//MarvinLogs/test_ospf_DHP8KX===



---
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: OSPF: WIP formatting documenta...

2016-03-20 Thread agneya2001
Github user agneya2001 commented on the pull request:


https://github.com/apache/cloudstack-docs-admin/pull/36#issuecomment-199133110
  
@GabrielBrascher all suggestions are good, made them for some i will have 
to tune the code, will do that too.


---
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: OSPF: adding dynamically routing capabili...

2016-03-20 Thread agneya2001
Github user agneya2001 commented on the pull request:

https://github.com/apache/cloudstack/pull/1371#issuecomment-199133805
  
@bvbharatk Thank you for running the marvin tests. Do you think any 
specific test that is failing on this branch ?


---
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: OSPF: adding dynamically routing capabili...

2016-03-28 Thread agneya2001
Github user agneya2001 commented on a diff in the pull request:

https://github.com/apache/cloudstack/pull/1371#discussion_r57577607
  
--- Diff: core/src/com/cloud/agent/api/storage/CopyVolumeCommand.java ---
@@ -75,4 +76,12 @@ public boolean toSecondaryStorage() {
 public String getVmName() {
 return vmName;
 }
+
+public String getNfsVersion() {
+return nfsVersion;
+}
+
+public void setNfsVersion(String nfsVersion) {
+this.nfsVersion = nfsVersion;
+}
--- End diff --

@jburwell Can you click on the OSPF commit for review, somehow during 
rebase non ospf commits also got included. I will try to clean them up.


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