Re: stopVirtualMachine command ignores the forced parameter

2016-08-10 Thread Wei ZHOU
We also noticed this issue.



2016-08-09 19:21 GMT+02:00 Jeff Hair :

> Hi,
>
> I'm looking at the documentation and then the code for stopVirtualMachine.
> The forced parameter is passed down into the VM manager, where it seems to
> be ignored. This means that cleanupEvenIfFailed during VM stop will always
> be false, despite what the API command says. Going back to commit a4f4c986
> in 2013, we can see that the forced parameter was used. During subsequent
> refactoring, this seems to have vanished.
>


[GitHub] cloudstack issue #1545: CLOUDSTACK-8715: Add channel to Instances for Qemu G...

2016-08-10 Thread wido
Github user wido commented on the issue:

https://github.com/apache/cloudstack/pull/1545
  
@rhtyd Yes, we could not add the port to SSVMs right now and thus skip the 
Agent inside the SSVM.

That way only Instances will get the Socket and we can use it.

We can add it to the SSVM later, that would be a very simple PR.

Would that be a easier route to get this in?


---
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 issue #1541: Systemd packaging for Ubuntu 16.04

2016-08-10 Thread wido
Github user wido commented on the issue:

https://github.com/apache/cloudstack/pull/1541
  
I pushed a new version of the commits, could @rhtyd and @vincentbernat take 
a look?

Yes, Ubuntu 12.04 is dropped, but I did that earlier. See my commits. It 
will go EOL in April next year, but libvirt and Qemu are already far to old to 
use 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 #1541: Systemd packaging for Ubuntu 16.04

2016-08-10 Thread vincentbernat
Github user vincentbernat commented on a diff in the pull request:

https://github.com/apache/cloudstack/pull/1541#discussion_r74198886
  
--- Diff: debian/rules ---
@@ -136,5 +156,8 @@ override_dh_auto_install:
 override_dh_installinit:
dh_installinit -pcloudstack-management -pcloudstack-agent 
-pcloudstack-usage --onlyscripts --no-start
 
+override_dh_systemd_enable:
+   dh_systemd_enable -pcloudstack-agent -pcloudstack-usage --with systemd
--- End diff --

I didn't mean the `--with systemd` to be here, just on the `dh` invocation 
in the `%` target (like it now 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 issue #1541: Systemd packaging for Ubuntu 16.04

2016-08-10 Thread vincentbernat
Github user vincentbernat commented on the issue:

https://github.com/apache/cloudstack/pull/1541
  
Except the extra `--with systemd`, 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 #1541: Systemd packaging for Ubuntu 16.04

2016-08-10 Thread wido
Github user wido commented on a diff in the pull request:

https://github.com/apache/cloudstack/pull/1541#discussion_r74199703
  
--- Diff: debian/rules ---
@@ -136,5 +156,8 @@ override_dh_auto_install:
 override_dh_installinit:
dh_installinit -pcloudstack-management -pcloudstack-agent 
-pcloudstack-usage --onlyscripts --no-start
 
+override_dh_systemd_enable:
+   dh_systemd_enable -pcloudstack-agent -pcloudstack-usage --with systemd
--- End diff --

Ah, understood! Fixed and pushed


---
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 #1633: CLOUDSTACK-9452: use optparse instead of argp...

2016-08-10 Thread rhtyd
GitHub user rhtyd opened a pull request:

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

CLOUDSTACK-9452: use optparse instead of argparse in patchviasocket

Use optparse that is supported by python 2.3+, instead of argparse that is
supported by python 2.7+. On KVM hosts which don't have python-argparse pkg
installed, the patchviasocket script will break. This fixes so that 
patchviasocket
would work on CentOS6 KVM hosts, or KVM hosts without python 2.7/argparse in
general.

The patchviasocket script was rewritten as a Python script from PR #1533

@blueorangutan package

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

$ git pull https://github.com/shapeblue/cloudstack patchviasocket-49-py26fix

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

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


commit bfbf9f45ad8ca7247fb96005d47afeb7131ba216
Author: Rohit Yadav 
Date:   2016-08-10T08:43:40Z

CLOUDSTACK-9452: use optparse instead of argparse in patchviasocket

Use optparse that is supported by python 2.3+, instead of argparse that is
supported by python 2.7+. On KVM hosts which don't have python-argparse pkg
installed, the patchviasocket script will break. This fixes so that 
patchviasocket
would work on CentOS6 KVM hosts, or KVM hosts without python 2.7/argparse in
general.

The patchviasocket script was rewritten as a Python script from PR #1533

Signed-off-by: Rohit Yadav 




---
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 issue #1633: [blocker] CLOUDSTACK-9452: use optparse instead of a...

2016-08-10 Thread blueorangutan
Github user blueorangutan commented on the issue:

https://github.com/apache/cloudstack/pull/1633
  
@rhtyd a Jenkins job has been kicked to build packages. I'll keep you 
posted as I make progress.


---
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 issue #1633: [blocker] CLOUDSTACK-9452: use optparse instead of a...

2016-08-10 Thread rhtyd
Github user rhtyd commented on the issue:

https://github.com/apache/cloudstack/pull/1633
  
@karuturi @jburwell @wido @sverrirab please review, it's a blocker for kvm 
centos6 hosts without argparse/python2.7 installed.

I could run an existing test: (gave same results before and after the 
change)
$ python ./scripts/vm/hypervisor/kvm/test_patchviasocket.py
ERROR: unable to connect to /tmp/tmpDuudOL.sck - Permission denied
.ERROR: unable to open /tmp/tmpoEzOGN.sck - Permission denied
.ERROR: ssh public key not found on host at must-not-exist
.ERROR: unable to connect to /tmp/tmpm2rGlP.sck - Connection refused
.ERROR: must-not-exist socket not found
..
--
Ran 6 tests in 1.633s

OK


---
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 issue #1633: [blocker] CLOUDSTACK-9452: use optparse instead of a...

2016-08-10 Thread wido
Github user wido commented on the issue:

https://github.com/apache/cloudstack/pull/1633
  
Do we seriously want to write code that still works on CentOS 6 or systems 
without Python 2.7?

Looking at the Python website: 
https://docs.python.org/2/library/optparse.html

Deprecated since version 2.7: The optparse module is deprecated and 
will not be developed further; development will continue with the argparse 
module.

I wouldn't call this a blocker at all. CentOS 6 is pre-historic and we 
can't go back to using a old module like OptParse.

Sorry, -1 for me on 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 issue #1615: CLOUDSTACK-9438: Fix for CLOUDSTACK-9252 - Make NFS ...

2016-08-10 Thread rhtyd
Github user rhtyd commented on the issue:

https://github.com/apache/cloudstack/pull/1615
  
@jburwell the test pipeline had issues, I'll rekick it once I can get the 
issues sorted. For now, only package works without any issues. We also 
found/fixed a blocker that failed all of our kvm environments #1633 


---
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 issue #1628: updated contributing.md

2016-08-10 Thread wido
Github user wido commented on the issue:

https://github.com/apache/cloudstack/pull/1628
  
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 issue #1615: CLOUDSTACK-9438: Fix for CLOUDSTACK-9252 - Make NFS ...

2016-08-10 Thread blueorangutan
Github user blueorangutan commented on the issue:

https://github.com/apache/cloudstack/pull/1615
  
@rhtyd a Jenkins job has been kicked to build packages. I'll keep you 
posted as I make progress.


---
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 issue #1615: CLOUDSTACK-9438: Fix for CLOUDSTACK-9252 - Make NFS ...

2016-08-10 Thread rhtyd
Github user rhtyd commented on the issue:

https://github.com/apache/cloudstack/pull/1615
  
@blueorangutan package

@jburwell @nvazquez since a new code commit was made, we need to call 
package before we could kick in 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 issue #1545: CLOUDSTACK-8715: Add channel to Instances for Qemu G...

2016-08-10 Thread rhtyd
Github user rhtyd commented on the issue:

https://github.com/apache/cloudstack/pull/1545
  
@wido thanks, @PaulAngus found an issue with the kvm patchviasocket script 
and I've sent a fix #1533 
I was not sure what was causing the failure and saw this PR which looked 
promising. Let's get it in master and for master we can rebuild a new systemvm 
template (for kvm only?). /cc @jburwell @karuturi 


---
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 issue #1633: [blocker] CLOUDSTACK-9452: use optparse instead of a...

2016-08-10 Thread rhtyd
Github user rhtyd commented on the issue:

https://github.com/apache/cloudstack/pull/1633
  
@wido I'm sorry we will need to support CentOS6 kvm hosts, just because you 
don't use it does not mean we should not support for people. It is a valid 
`blocker` as the KVM CentOS6 hosts have stopped working from deploying VMs.

`optparse` is deprecated which does not mean that it will fail or won't be 
available. We can have another way of fixing this: (1) revert #1533, (2) add a 
package dependency `python-argparse` on (at least centos6) rpms to ensure that 
argparse will be available on centos6/7 hosts. Which way should we go, if not 
the way PR fixes 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 issue #1633: [blocker] CLOUDSTACK-9452: use optparse instead of a...

2016-08-10 Thread sverrirab
Github user sverrirab commented on the issue:

https://github.com/apache/cloudstack/pull/1633
  
The updated script that now depends on python 2.7 (or python 2.6 + argparse 
I assume) is replacing the perl installation requirement that was there before. 
 Would it not be the correct solution to require python 2.7 to be installed?  
If the hosts are dedicated KVM hosts that should be relatively low risk?


---
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 issue #1633: [blocker] CLOUDSTACK-9452: use optparse instead of a...

2016-08-10 Thread sverrirab
Github user sverrirab commented on the issue:

https://github.com/apache/cloudstack/pull/1633
  
The reason for my suggestion is that I don't think anyone should be running 
python 2.6 in production.   The last update for it was in 2008 so I would 
consider it risky at this point.


---
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 issue #1633: [blocker] CLOUDSTACK-9452: use optparse instead of a...

2016-08-10 Thread rhtyd
Github user rhtyd commented on the issue:

https://github.com/apache/cloudstack/pull/1633
  
CentOS6 default/epel repos don't have python 2.7 :) There are large 
installations running old code, old hardware, old kernels/OSs; they will get 
upgraded over time, but they need to be supported for the time being. Lastly, I 
could make the same argument for our usage of Java6/7, why aren't we running 
Java8. Java7 has eoled, but most of us I know are still using it in production.


---
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 issue #1633: [blocker] CLOUDSTACK-9452: use optparse instead of a...

2016-08-10 Thread blueorangutan
Github user blueorangutan commented on the issue:

https://github.com/apache/cloudstack/pull/1633
  
Packaging result: ✖centos6 ✔centos7 ✔debian repo: 
http://packages.shapeblue.com/cloudstack/pr/1633
Job ID-73


---
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 issue #1633: [blocker] CLOUDSTACK-9452: use optparse instead of a...

2016-08-10 Thread rhtyd
Github user rhtyd commented on the issue:

https://github.com/apache/cloudstack/pull/1633
  
@wido @sverrirab will adding python-argparse as a dependency be an 
acceptable solution to the problem? this package is available on el6, but 
python 2.7 is not available (without using one of the 3rd party repositories).


---
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 issue #1633: [blocker] CLOUDSTACK-9452: use optparse instead of a...

2016-08-10 Thread sverrirab
Github user sverrirab commented on the issue:

https://github.com/apache/cloudstack/pull/1633
  
adding the python-argparse dependency is fine by me.  I have not tested 
that combination though.


---
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 issue #1615: CLOUDSTACK-9438: Fix for CLOUDSTACK-9252 - Make NFS ...

2016-08-10 Thread blueorangutan
Github user blueorangutan commented on the issue:

https://github.com/apache/cloudstack/pull/1615
  
Packaging result: ✔centos6 ✔centos7 ✔debian repo: 
http://packages.shapeblue.com/cloudstack/pr/1615
Job ID-74


---
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 issue #1633: [blocker] CLOUDSTACK-9452: use optparse instead of a...

2016-08-10 Thread wido
Github user wido commented on the issue:

https://github.com/apache/cloudstack/pull/1633
  
@rhtyd I'm fine with adding it as a dependency.

Perception is different here I think. My personal opinion is that nobody 
should be running CentOS 6 with CloudStack in production just as much as you 
shouldn't use Ubuntu 12.04 anymore for CloudStack.

I'm against writing code which brings in legacy instead of removing 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.
---


Re: stopVirtualMachine command ignores the forced parameter

2016-08-10 Thread Jeff Hair
Looks like Nathan has already opened a PR for this:
https://github.com/apache/cloudstack/pull/1632

*Jeff Hair*
Technical Lead and Software Developer

Tel: (+354) 415 0200
j...@greenqloud.com
www.greenqloud.com

On Wed, Aug 10, 2016 at 7:01 AM, Wei ZHOU  wrote:

> We also noticed this issue.
>
>
>
> 2016-08-09 19:21 GMT+02:00 Jeff Hair :
>
> > Hi,
> >
> > I'm looking at the documentation and then the code for
> stopVirtualMachine.
> > The forced parameter is passed down into the VM manager, where it seems
> to
> > be ignored. This means that cleanupEvenIfFailed during VM stop will
> always
> > be false, despite what the API command says. Going back to commit
> a4f4c986
> > in 2013, we can see that the forced parameter was used. During subsequent
> > refactoring, this seems to have vanished.
> >
>


[GitHub] cloudstack pull request #1580: CLOUDSTACK-9402 : Support for underlay featur...

2016-08-10 Thread nlivens
Github user nlivens closed the pull request at:

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


---
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 #1580: CLOUDSTACK-9402 : Support for underlay featur...

2016-08-10 Thread nlivens
GitHub user nlivens reopened a pull request:

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

CLOUDSTACK-9402 : Support for underlay features (Source & Static NAT to 
underlay) in Nuage VSP plugin

Support for underlay features (Source & Static NAT to underlay) with Nuage 
VSP SDN Plugin including Marvin test coverage for corresponding Source & Static 
NAT features on master. Moreover, our Marvin tests are written in such a way 
that they can validate our supported feature set with both Nuage VSP SDN 
platform's overlay and underlay infra.

PR contents:
1) Support for Source NAT to underlay feature on master with Nuage VSP SDN 
Plugin.
2) Support for Static NAT to underlay feature on master with Nuage VSP SDN 
Plugin.
3) Marvin test coverage for Source & Static NAT to underlay on master with 
Nuage VSP SDN Plugin.
4) Enhancements on our exiting Marvin test code (nuagevsp plugins 
directory).
5) PEP8 & PyFlakes compliance with our Marvin test code.

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

$ git pull https://github.com/nlivens/cloudstack nuage_vsp_pat_fip2ul

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

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


commit e5fd206e7e090121798c80745df4629f890e3234
Author: Eric Waegeman 
Date:   2016-05-26T09:37:52Z

CLOUDSTACK-9401 : Support for Internal DNS in Nuage VSP plugin

commit ec7b6a5f887555e513b1d1d9c5e469eb079d721a
Author: Prashanth Manthena 
Date:   2016-05-26T10:48:02Z

CLOUDSTACK-9402 : Marvin tests for Source NAT and Static NAT including 
PAT/FIP2UL features with NuageVsp

commit be8ae9376664925255595a50f5c4574c4abb7179
Author: Nick Livens 
Date:   2016-06-15T09:04:21Z

CLOUDSTACK-9402 : Support for underlay features (Source & Static NAT to 
underlay) in Nuage VSP plugin

commit a2e1999bbacf3e00570bd51492b05cda8ca81c7d
Author: Rahul Singal 
Date:   2016-07-01T13:22:50Z

CLOUDSTACK-9401 : Marvin tests for Internal DNS verification with NuageVsp




---
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 #1633: [blocker] CLOUDSTACK-9452: use optparse inste...

2016-08-10 Thread rhtyd
Github user rhtyd closed the pull request at:

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


---
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 issue #1633: [blocker] CLOUDSTACK-9452: use optparse instead of a...

2016-08-10 Thread blueorangutan
Github user blueorangutan commented on the issue:

https://github.com/apache/cloudstack/pull/1633
  
@rhtyd a Jenkins job has been kicked to build packages. I'll keep you 
posted as I make progress.


---
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 #1634: [blocker] CLOUDSTACK-9452: add python-argpars...

2016-08-10 Thread rhtyd
GitHub user rhtyd opened a pull request:

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

[blocker] CLOUDSTACK-9452: add python-argparse dependency on el6,7 rpms

The patchviasocket script was rewritten in Python from PR #1533 and made
assumptions that Python 2.7 would be available. In case of CentOS, python 
2.7
may not be available or installed. This change ensures that python-argparse
is installed which is used by this script.

/cc @wido @sverrirab @karuturi @jburwell 

@blueorangutan package

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

$ git pull https://github.com/shapeblue/cloudstack patchviasocket-49-py26fix

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

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


commit 50e1d16e1e4aac43e1bed59516a374190e2f8ce3
Author: Rohit Yadav 
Date:   2016-08-10T08:43:40Z

CLOUDSTACK-9452: add python-argparse dependency on el6,7 rpms

The patchviasocket script was rewritten in Python from PR #1533 and made
assumptions that Python 2.7 would be available. In case of CentOS, python 
2.7
may not be available or installed. This change ensures that python-argparse
is installed which is used by this script.

Signed-off-by: Rohit Yadav 




---
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 issue #1634: [blocker] CLOUDSTACK-9452: add python-argparse depen...

2016-08-10 Thread blueorangutan
Github user blueorangutan commented on the issue:

https://github.com/apache/cloudstack/pull/1634
  
@rhtyd a Jenkins job has been kicked to build packages. I'll keep you 
posted as I make progress.


---
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 issue #1634: [blocker] CLOUDSTACK-9452: add python-argparse depen...

2016-08-10 Thread sverrirab
Github user sverrirab commented on the issue:

https://github.com/apache/cloudstack/pull/1634
  
+1 from me (for what it's worth)


---
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 issue #1633: [blocker] CLOUDSTACK-9452: use optparse instead of a...

2016-08-10 Thread blueorangutan
Github user blueorangutan commented on the issue:

https://github.com/apache/cloudstack/pull/1633
  
Packaging result: ✔centos6 ✔centos7 ✔debian repo: 
http://packages.shapeblue.com/cloudstack/pr/1633
Job ID-75


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


Virtual Router Configuration Time Linearly Increases in 4.7

2016-08-10 Thread Jeff Hair
There is a problem in the virtual router in 4.7 where the time to execute
router configuration commands linearly increases. This is because the
router continually executes command updates for instances it no longer
needs to care about, such as ones that were destroyed. The main culprits
are SetStaticNatRulesCommand and SaveVmPasswordCommand, especially
SaveVmPasswordCommand. It updates by IP, and these IPs might not even be
assigned to the account anymore!

The eventual result is that configuring the router will take too long and
VM deployment will essentially deadlock until CS kills the job, leaving the
VMs stuck in a starting state.

I remember there was a pull request or talk in a PR about this issue, but
for the life of me I cannot find it. Can someone help me out?

Thanks,

Jeff


[GitHub] cloudstack issue #1634: [blocker] CLOUDSTACK-9452: add python-argparse depen...

2016-08-10 Thread blueorangutan
Github user blueorangutan commented on the issue:

https://github.com/apache/cloudstack/pull/1634
  
Packaging result: ✔centos6 ✔centos7 ✔debian repo: 
http://packages.shapeblue.com/cloudstack/pr/1634
Job ID-77


---
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 issue #1541: Systemd packaging for Ubuntu 16.04

2016-08-10 Thread rhtyd
Github user rhtyd commented on the issue:

https://github.com/apache/cloudstack/pull/1541
  
@wido sure I'll spend sometime testing them as well. Since this is 
packaging only changes, should we get this on 4.9 for the lts /cc @jburwell 
@karuturi ?


---
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 issue #1541: Systemd packaging for Ubuntu 16.04

2016-08-10 Thread rhtyd
Github user rhtyd commented on the issue:

https://github.com/apache/cloudstack/pull/1541
  
@blueorangutan package


---
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 issue #1541: Systemd packaging for Ubuntu 16.04

2016-08-10 Thread blueorangutan
Github user blueorangutan commented on the issue:

https://github.com/apache/cloudstack/pull/1541
  
@rhtyd a Jenkins job has been kicked to build packages. I'll keep you 
posted as I make progress.


---
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 issue #1578: CLOUDSTACK-9401 : Support for Internal DNS in Nuage ...

2016-08-10 Thread prashanthvarma
Github user prashanthvarma commented on the issue:

https://github.com/apache/cloudstack/pull/1578
  
Marvin test code PEP8 & PyFlakes compliance:
CloudStack$
CloudStack$ pep8 test/integration/plugins/nuagevsp/*.py
CloudStack$
CloudStack$ pyflakes test/integration/plugins/nuagevsp/*.py
CloudStack$


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


[GitHub] cloudstack issue #1541: Systemd packaging for Ubuntu 16.04

2016-08-10 Thread blueorangutan
Github user blueorangutan commented on the issue:

https://github.com/apache/cloudstack/pull/1541
  
Packaging result: ✔centos6 ✔centos7 ✖debian repo: 
http://packages.shapeblue.com/cloudstack/pr/1541
Job ID-78


---
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 issue #1541: Systemd packaging for Ubuntu 16.04

2016-08-10 Thread rhtyd
Github user rhtyd commented on the issue:

https://github.com/apache/cloudstack/pull/1541
  
Build system did not have dh-systemd pkg installed, rekicked build job.


---
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 issue #1541: Systemd packaging for Ubuntu 16.04

2016-08-10 Thread rhtyd
Github user rhtyd commented on the issue:

https://github.com/apache/cloudstack/pull/1541
  
@wido can you apply the PR on 4.9/master and fix build? I got following 
failures. It would be great if this PR can opened for 4.9. Thanks.

Error from Jenkins build:
   dh_install
dh_install: cloudstack-agent missing files: /etc/init.d/cloudstack-agent
dh_install: cloudstack-usage missing files: /etc/init.d/cloudstack-usage
dh_install: missing files, aborting
debian/rules:15: recipe for target 'binary' failed
make: *** [binary] Error 255
dpkg-buildpackage: error: fakeroot debian/rules binary gave error exit 
status 2
Build step 'Execute shell' marked build as failure
Finished: FAILURE


---
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: Virtual Router Configuration Time Linearly Increases in 4.7

2016-08-10 Thread Wei ZHOU
Jeff,

do you mean this PR ? it is already in 4.7 branch.
https://github.com/apache/cloudstack/pull/1356

-Wei

2016-08-10 11:55 GMT+02:00 Jeff Hair :

> There is a problem in the virtual router in 4.7 where the time to execute
> router configuration commands linearly increases. This is because the
> router continually executes command updates for instances it no longer
> needs to care about, such as ones that were destroyed. The main culprits
> are SetStaticNatRulesCommand and SaveVmPasswordCommand, especially
> SaveVmPasswordCommand. It updates by IP, and these IPs might not even be
> assigned to the account anymore!
>
> The eventual result is that configuring the router will take too long and
> VM deployment will essentially deadlock until CS kills the job, leaving the
> VMs stuck in a starting state.
>
> I remember there was a pull request or talk in a PR about this issue, but
> for the life of me I cannot find it. Can someone help me out?
>
> Thanks,
>
> Jeff
>


[DISCUSS] Marvin optimizations

2016-08-10 Thread Abhinandan Prateek
Hi,

   Most of us have been running marvin tests in virtual environments and it 
takes days to run all the tests.
I have filed https://issues.apache.org/jira/browse/CLOUDSTACK-9453 to work on 
few enhancements that have the potential to substantially speedup the tests.
I think there are others will have similar thoughts or plans, like in the past 
someone has suggested to include machininna templates along with Centos.

Please, do chime in if you have a suggestion that can be incorporated to 
improve Marvin.

-abhi


abhinandan.prat...@shapeblue.com 
www.shapeblue.com
53 Chandos Place, Covent Garden, London  WC2N 4HSUK
@shapeblue
  
 



[GitHub] cloudstack issue #1612: CLOUDSTACK-9446: Marvin and integration-tests packag...

2016-08-10 Thread rhtyd
Github user rhtyd commented on the issue:

https://github.com/apache/cloudstack/pull/1612
  
Just to note here for future reference: this PR was backported to 4.5 and 
4.6 branches as well.


---
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 issue #1580: CLOUDSTACK-9402 : Support for underlay features (Sou...

2016-08-10 Thread prashanthvarma
Github user prashanthvarma commented on the issue:

https://github.com/apache/cloudstack/pull/1580
  
Marvin test code PEP8 & PyFlakes compliance:
CloudStack$
CloudStack$ pep8 test/integration/plugins/nuagevsp/.py
CloudStack$
CloudStack$ pyflakes test/integration/plugins/nuagevsp/.py
CloudStack$

@remibergsma  Our Marvin test code is now truly PEP8 & PyFlakes compliant. 
Moreover, we have extended our custom base class 
"test/integration/plugins/nuagevsp/nuageTestCase.py" support for optimal 
creation of cloudstack objects at setUpClass level in order to re-use/test them 
across different testcases. Thus, conserving test resources (i.e. reduced test 
created objects and time).  

Note: We have updated with these changes our other outstanding PRs as well. 

Let me know, if you have any other questions for me.

Thank you for your valuable review and suggestions !!


---
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 issue #1577: CLOUDSTACK-9321 : Multiple Internal LB rules (more t...

2016-08-10 Thread prashanthvarma
Github user prashanthvarma commented on the issue:

https://github.com/apache/cloudstack/pull/1577
  
Marvin test code PEP8 & PyFlakes compliance:
CloudStack$
CloudStack$ pep8 test/integration/plugins/nuagevsp/*.py
CloudStack$
CloudStack$ pyflakes test/integration/plugins/nuagevsp/*.py
CloudStack$


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


Re: Virtual Router Configuration Time Linearly Increases in 4.7

2016-08-10 Thread Jeff Hair
Hi,

I did discover that PR while looking, but  it's not that one. Our
production system has that PR in it as well, yet we still see the issue
with the virtual routers. Perhaps I am mis-remembering and I need to open a
new bug report?

Jeff

*Jeff Hair*
Technical Lead and Software Developer

Tel: (+354) 415 0200
j...@greenqloud.com
www.greenqloud.com

On Wed, Aug 10, 2016 at 12:20 PM, Wei ZHOU  wrote:

> Jeff,
>
> do you mean this PR ? it is already in 4.7 branch.
> https://github.com/apache/cloudstack/pull/1356
>
> -Wei
>
> 2016-08-10 11:55 GMT+02:00 Jeff Hair :
>
> > There is a problem in the virtual router in 4.7 where the time to execute
> > router configuration commands linearly increases. This is because the
> > router continually executes command updates for instances it no longer
> > needs to care about, such as ones that were destroyed. The main culprits
> > are SetStaticNatRulesCommand and SaveVmPasswordCommand, especially
> > SaveVmPasswordCommand. It updates by IP, and these IPs might not even be
> > assigned to the account anymore!
> >
> > The eventual result is that configuring the router will take too long and
> > VM deployment will essentially deadlock until CS kills the job, leaving
> the
> > VMs stuck in a starting state.
> >
> > I remember there was a pull request or talk in a PR about this issue, but
> > for the life of me I cannot find it. Can someone help me out?
> >
> > Thanks,
> >
> > Jeff
> >
>


VPN User/Pass printed in plain text in syslog on VR

2016-08-10 Thread Matthew Smart

Hey guys,

I am new to Cloudstack and Apache (from a dev perspective) so forgive me 
if this is not the proper place for this... and let me know where I 
should be reporting issues like this.


I am getting Remote Access VPN configured in my test environment and in 
my debugging I noticed that if you view the VRouter's console while it 
is booting it prints out the vpn usernames and passwords in plaintext.


I am sure some debug statements just got left in by accident.

I am running Cloudstack 4.8.0 and using SystemVM Template version 4.6 
for KVM.


Thanks,


--
Matthew Smart
President
Smart Software Solutions Inc.
108 S Pierre St.
Pierre, SD 57501

Phone: (605) 280-0383
Skype: msmart13
Email: msm...@smartsoftwareinc.com



[GitHub] cloudstack pull request #1545: CLOUDSTACK-8715: Add channel to Instances for...

2016-08-10 Thread jburwell
Github user jburwell commented on a diff in the pull request:

https://github.com/apache/cloudstack/pull/1545#discussion_r74247733
  
--- Diff: 
plugins/hypervisors/kvm/src/com/cloud/hypervisor/kvm/resource/LibvirtComputingResource.java
 ---
@@ -768,6 +770,12 @@ public boolean configure(final String name, final 
Map params) th
 _localStoragePath = "/var/lib/libvirt/images/";
 }
 
+/* Directory to use for Qemu sockets like for the Qemu Guest Agent 
*/
+_qemuSocketsPath = (String)params.get("qemu.sockets.path");
+if (Strings.isNullOrEmpty(_qemuSocketsPath)) {
--- End diff --

One issue we have found with ``Strings.isNullOrEmpty`` is that it does do a 
``trim`` when checking for an empty string.  Therefore, a string containing one 
or more strings is considered non-empty.  Therefore, consider using 
``StringUtils.isNoneBlank`` if a string containing only whitespace would be a a 
problem.


---
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 #1545: CLOUDSTACK-8715: Add channel to Instances for...

2016-08-10 Thread jburwell
Github user jburwell commented on a diff in the pull request:

https://github.com/apache/cloudstack/pull/1545#discussion_r74248311
  
--- Diff: 
plugins/hypervisors/kvm/src/com/cloud/hypervisor/kvm/resource/LibvirtComputingResource.java
 ---
@@ -1978,11 +1986,16 @@ So if getMinSpeed() returns null we fall back to 
getSpeed().
 final SerialDef serial = new SerialDef("pty", null, (short)0);
 devices.addDevice(serial);
 
+/* Add a VirtIO channel for SystemVMs for communication and 
provisioning */
 if (vmTO.getType() != VirtualMachine.Type.User) {
-final VirtioSerialDef vserial = new 
VirtioSerialDef(vmTO.getName(), null);
-devices.addDevice(vserial);
+devices.addDevice(new ChannelDef(vmTO.getName() + ".vport", 
ChannelDef.ChannelType.UNIX,
+  _qemuSocketsPath + "/" + vmTO.getName() + 
".agent"));
 }
 
+/* Add a VirtIO channel for the Qemu Guest Agent tools */
+devices.addDevice(new ChannelDef("org.qemu.guest_agent.0", 
ChannelDef.ChannelType.UNIX,
--- End diff --

The ``org.qemu.guest_agent.0`` value is used in multiple places and appears 
to be a magic value.  Please consider extracting to a constant and/or a 
parameter passed into the method if this value could change based on context.


---
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 #1545: CLOUDSTACK-8715: Add channel to Instances for...

2016-08-10 Thread jburwell
Github user jburwell commented on a diff in the pull request:

https://github.com/apache/cloudstack/pull/1545#discussion_r74248622
  
--- Diff: 
plugins/hypervisors/kvm/src/com/cloud/hypervisor/kvm/resource/LibvirtComputingResource.java
 ---
@@ -244,6 +245,7 @@
 protected long _diskActivityCheckFileSizeMin = 10485760; // 10MB
 protected int _diskActivityCheckTimeoutSeconds = 120; // 120s
 protected long _diskActivityInactiveThresholdMilliseconds = 3; // 
30s
+protected String _qemuSocketsPath;
--- End diff --

Why not represent this value as a ``File`` instead of a ``String``?  The 
``File`` class provides semantics for path construction, as well as, providing 
stronger type information.  Also, why is it declared ``protected`` and not 
``private``?


---
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 #1545: CLOUDSTACK-8715: Add channel to Instances for...

2016-08-10 Thread jburwell
Github user jburwell commented on a diff in the pull request:

https://github.com/apache/cloudstack/pull/1545#discussion_r74248818
  
--- Diff: 
plugins/hypervisors/kvm/src/com/cloud/hypervisor/kvm/resource/LibvirtDomainXMLParser.java
 ---
@@ -171,6 +174,25 @@ public boolean parseDomainXML(String domXML) {
 interfaces.add(def);
 }
 
+NodeList ports = devices.getElementsByTagName("channel");
+for (int i = 0; i < ports.getLength(); i++) {
+Element channel = (Element)ports.item(i);
+
+String type = channel.getAttribute("type");
+String path = getAttrValue("source", "path", channel);
+String name = getAttrValue("target", "name", channel);
+String state = getAttrValue("target", "state", channel);
+
+ChannelDef def = null;
+if (Strings.isNullOrEmpty(state)) {
--- End diff --

Please see previous comment about whitespace sensitivity in 
``String.isNullorEmpty``.


---
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 #1545: CLOUDSTACK-8715: Add channel to Instances for...

2016-08-10 Thread jburwell
Github user jburwell commented on a diff in the pull request:

https://github.com/apache/cloudstack/pull/1545#discussion_r74249185
  
--- Diff: 
plugins/hypervisors/kvm/src/com/cloud/hypervisor/kvm/resource/LibvirtDomainXMLParser.java
 ---
@@ -171,6 +174,25 @@ public boolean parseDomainXML(String domXML) {
 interfaces.add(def);
 }
 
+NodeList ports = devices.getElementsByTagName("channel");
+for (int i = 0; i < ports.getLength(); i++) {
+Element channel = (Element)ports.item(i);
+
+String type = channel.getAttribute("type");
+String path = getAttrValue("source", "path", channel);
+String name = getAttrValue("target", "name", channel);
+String state = getAttrValue("target", "state", channel);
+
+ChannelDef def = null;
+if (Strings.isNullOrEmpty(state)) {
+def = new ChannelDef(name, 
ChannelDef.ChannelType.valueOf(type.toUpperCase()), path);
--- End diff --

What if ``type`` is ``null``?  While it likely shouldn't happen, malformed 
XML could cause an NPE.  Consider adding a 
``checkState(StringUtils.isNoneBlank(type), "")`` on line 185.


---
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 #1545: CLOUDSTACK-8715: Add channel to Instances for...

2016-08-10 Thread jburwell
Github user jburwell commented on a diff in the pull request:

https://github.com/apache/cloudstack/pull/1545#discussion_r74249341
  
--- Diff: 
plugins/hypervisors/kvm/src/com/cloud/hypervisor/kvm/resource/LibvirtDomainXMLParser.java
 ---
@@ -171,6 +174,25 @@ public boolean parseDomainXML(String domXML) {
 interfaces.add(def);
 }
 
+NodeList ports = devices.getElementsByTagName("channel");
+for (int i = 0; i < ports.getLength(); i++) {
+Element channel = (Element)ports.item(i);
+
+String type = channel.getAttribute("type");
+String path = getAttrValue("source", "path", channel);
+String name = getAttrValue("target", "name", channel);
+String state = getAttrValue("target", "state", channel);
+
+ChannelDef def = null;
+if (Strings.isNullOrEmpty(state)) {
+def = new ChannelDef(name, 
ChannelDef.ChannelType.valueOf(type.toUpperCase()), path);
+} else {
+def = new ChannelDef(name, 
ChannelDef.ChannelType.valueOf(type.toUpperCase()), 
ChannelDef.ChannelState.valueOf(state.toUpperCase()), path);
--- End diff --

What if ``state`` is ``null``?  While it likely shouldn't happen, malformed 
XML could cause an NPE which will not be helpful to operators or developers 
trying to debug the issue.  Consider adding a 
``checkState(StringUtils.isNoneBlank(state), "")`` on line 185.


---
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 #1545: CLOUDSTACK-8715: Add channel to Instances for...

2016-08-10 Thread jburwell
Github user jburwell commented on a diff in the pull request:

https://github.com/apache/cloudstack/pull/1545#discussion_r74249850
  
--- Diff: 
plugins/hypervisors/kvm/src/com/cloud/hypervisor/kvm/resource/LibvirtDomainXMLParser.java
 ---
@@ -234,6 +256,10 @@ public Integer getVncPort() {
 return diskDefs;
 }
 
+public List getChannels() {
+return channels;
--- End diff --

Please make a defensive copy of the list before returning to avoid 
side-effects on this class by potential mutations of the list by the caller.  
Ideally, return it as a ``Collections.unmodifiableList(channels)``.


---
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 #1545: CLOUDSTACK-8715: Add channel to Instances for...

2016-08-10 Thread jburwell
Github user jburwell commented on a diff in the pull request:

https://github.com/apache/cloudstack/pull/1545#discussion_r74250104
  
--- Diff: 
plugins/hypervisors/kvm/src/com/cloud/hypervisor/kvm/resource/LibvirtVMDef.java 
---
@@ -1209,25 +1209,95 @@ public String toString() {
 }
 }
 
-public static class VirtioSerialDef {
-private final String _name;
-private String _path;
+public static class ChannelDef {
--- End diff --

Do you design this class for inheritance?  If not, declare it ``final``?


---
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 #1545: CLOUDSTACK-8715: Add channel to Instances for...

2016-08-10 Thread jburwell
Github user jburwell commented on a diff in the pull request:

https://github.com/apache/cloudstack/pull/1545#discussion_r74250269
  
--- Diff: 
plugins/hypervisors/kvm/src/com/cloud/hypervisor/kvm/resource/LibvirtVMDef.java 
---
@@ -1209,25 +1209,95 @@ public String toString() {
 }
 }
 
-public static class VirtioSerialDef {
-private final String _name;
-private String _path;
+public static class ChannelDef {
+enum ChannelType {
+UNIX("unix"), SERIAL("serial");
+String type;
 
-public VirtioSerialDef(String name, String path) {
-_name = name;
-_path = path;
+ChannelType(String type) {
+this.type = type;
+}
+
+@Override
+public String toString() {
+return this.type;
+}
+}
+
+enum ChannelState {
+DISCONNECTED("disconnected"), CONNECTED("connected");
+String type;
+
+ChannelState(String type) {
+this.type = type;
+}
+
+@Override
+public String toString() {
+return type;
+}
+}
+
+private String name;
+private String path;
+private ChannelType type;
+private ChannelState state;
+
+public ChannelDef(String name, ChannelType type) {
+this.name = name;
+this.type = type;
+}
+
+public ChannelDef(String name, ChannelType type, String path) {
--- End diff --

Why not delegate to ``this(String name, ChannelType type, ChannelState 
state, String path)``?


---
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 #1545: CLOUDSTACK-8715: Add channel to Instances for...

2016-08-10 Thread jburwell
Github user jburwell commented on a diff in the pull request:

https://github.com/apache/cloudstack/pull/1545#discussion_r74250260
  
--- Diff: 
plugins/hypervisors/kvm/src/com/cloud/hypervisor/kvm/resource/LibvirtVMDef.java 
---
@@ -1209,25 +1209,95 @@ public String toString() {
 }
 }
 
-public static class VirtioSerialDef {
-private final String _name;
-private String _path;
+public static class ChannelDef {
+enum ChannelType {
+UNIX("unix"), SERIAL("serial");
+String type;
 
-public VirtioSerialDef(String name, String path) {
-_name = name;
-_path = path;
+ChannelType(String type) {
+this.type = type;
+}
+
+@Override
+public String toString() {
+return this.type;
+}
+}
+
+enum ChannelState {
+DISCONNECTED("disconnected"), CONNECTED("connected");
+String type;
+
+ChannelState(String type) {
+this.type = type;
+}
+
+@Override
+public String toString() {
+return type;
+}
+}
+
+private String name;
+private String path;
+private ChannelType type;
+private ChannelState state;
+
+public ChannelDef(String name, ChannelType type) {
+this.name = name;
+this.type = type;
--- End diff --

Why not delegate to ``this(String name, ChannelType type, ChannelState 
state, String path)``?


---
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 #1545: CLOUDSTACK-8715: Add channel to Instances for...

2016-08-10 Thread jburwell
Github user jburwell commented on a diff in the pull request:

https://github.com/apache/cloudstack/pull/1545#discussion_r74250288
  
--- Diff: 
plugins/hypervisors/kvm/src/com/cloud/hypervisor/kvm/resource/LibvirtVMDef.java 
---
@@ -1209,25 +1209,95 @@ public String toString() {
 }
 }
 
-public static class VirtioSerialDef {
-private final String _name;
-private String _path;
+public static class ChannelDef {
+enum ChannelType {
+UNIX("unix"), SERIAL("serial");
+String type;
 
-public VirtioSerialDef(String name, String path) {
-_name = name;
-_path = path;
+ChannelType(String type) {
+this.type = type;
+}
+
+@Override
+public String toString() {
+return this.type;
+}
+}
+
+enum ChannelState {
+DISCONNECTED("disconnected"), CONNECTED("connected");
+String type;
+
+ChannelState(String type) {
+this.type = type;
+}
+
+@Override
+public String toString() {
+return type;
+}
+}
+
+private String name;
+private String path;
+private ChannelType type;
+private ChannelState state;
+
+public ChannelDef(String name, ChannelType type) {
+this.name = name;
+this.type = type;
+}
+
+public ChannelDef(String name, ChannelType type, String path) {
+this.name = name;
+this.path = path;
+this.type = type;
+}
+
+public ChannelDef(String name, ChannelType type, ChannelState 
state) {
--- End diff --

Why not delegate to ``this(String name, ChannelType type, ChannelState 
state, String path)``?


---
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 #1545: CLOUDSTACK-8715: Add channel to Instances for...

2016-08-10 Thread jburwell
Github user jburwell commented on a diff in the pull request:

https://github.com/apache/cloudstack/pull/1545#discussion_r74250378
  
--- Diff: 
plugins/hypervisors/kvm/src/com/cloud/hypervisor/kvm/resource/LibvirtVMDef.java 
---
@@ -1209,25 +1209,95 @@ public String toString() {
 }
 }
 
-public static class VirtioSerialDef {
-private final String _name;
-private String _path;
+public static class ChannelDef {
+enum ChannelType {
+UNIX("unix"), SERIAL("serial");
+String type;
 
-public VirtioSerialDef(String name, String path) {
-_name = name;
-_path = path;
+ChannelType(String type) {
+this.type = type;
+}
+
+@Override
+public String toString() {
+return this.type;
+}
+}
+
+enum ChannelState {
+DISCONNECTED("disconnected"), CONNECTED("connected");
+String type;
+
+ChannelState(String type) {
+this.type = type;
+}
+
+@Override
+public String toString() {
+return type;
+}
+}
+
+private String name;
+private String path;
+private ChannelType type;
+private ChannelState state;
--- End diff --

These attributes are not modified by the class.  Why not declare them as 
``final``?


---
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 #1545: CLOUDSTACK-8715: Add channel to Instances for...

2016-08-10 Thread jburwell
Github user jburwell commented on a diff in the pull request:

https://github.com/apache/cloudstack/pull/1545#discussion_r74250473
  
--- Diff: 
plugins/hypervisors/kvm/src/com/cloud/hypervisor/kvm/resource/LibvirtVMDef.java 
---
@@ -1209,25 +1209,95 @@ public String toString() {
 }
 }
 
-public static class VirtioSerialDef {
-private final String _name;
-private String _path;
+public static class ChannelDef {
+enum ChannelType {
+UNIX("unix"), SERIAL("serial");
+String type;
 
-public VirtioSerialDef(String name, String path) {
-_name = name;
-_path = path;
+ChannelType(String type) {
+this.type = type;
+}
+
+@Override
+public String toString() {
+return this.type;
+}
+}
+
+enum ChannelState {
+DISCONNECTED("disconnected"), CONNECTED("connected");
+String type;
+
+ChannelState(String type) {
+this.type = type;
+}
+
+@Override
+public String toString() {
+return type;
+}
+}
+
+private String name;
+private String path;
--- End diff --

Does the ``path`` attribute represent a file path?  If so, why not 
represent it as a ``File``?


---
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 #1545: CLOUDSTACK-8715: Add channel to Instances for...

2016-08-10 Thread jburwell
Github user jburwell commented on a diff in the pull request:

https://github.com/apache/cloudstack/pull/1545#discussion_r74250773
  
--- Diff: 
plugins/hypervisors/kvm/src/com/cloud/hypervisor/kvm/resource/LibvirtVMDef.java 
---
@@ -1209,25 +1209,95 @@ public String toString() {
 }
 }
 
-public static class VirtioSerialDef {
-private final String _name;
-private String _path;
+public static class ChannelDef {
+enum ChannelType {
+UNIX("unix"), SERIAL("serial");
+String type;
 
-public VirtioSerialDef(String name, String path) {
-_name = name;
-_path = path;
+ChannelType(String type) {
+this.type = type;
+}
+
+@Override
+public String toString() {
+return this.type;
+}
+}
+
+enum ChannelState {
+DISCONNECTED("disconnected"), CONNECTED("connected");
+String type;
+
+ChannelState(String type) {
+this.type = type;
+}
+
+@Override
+public String toString() {
+return type;
+}
+}
+
+private String name;
+private String path;
+private ChannelType type;
+private ChannelState state;
+
+public ChannelDef(String name, ChannelType type) {
+this.name = name;
+this.type = type;
+}
+
+public ChannelDef(String name, ChannelType type, String path) {
+this.name = name;
+this.path = path;
+this.type = type;
+}
+
+public ChannelDef(String name, ChannelType type, ChannelState 
state) {
+this.name = name;
+this.state = state;
+this.type = type;
+}
+
+public ChannelDef(String name, ChannelType type, ChannelState 
state, String path) {
+this.name = name;
+this.path = path;
+this.state = state;
+this.type = type;
+}
+
+public ChannelType getChannelType() {
+return type;
+}
+
+public ChannelState getChannelState() {
+return state;
+}
+
+public String getName() {
+return name;
+}
+
+public String getPath() {
+return path;
 }
 
 @Override
 public String toString() {
 StringBuilder virtioSerialBuilder = new StringBuilder();
-if (_path == null) {
-_path = "/var/lib/libvirt/qemu";
+virtioSerialBuilder.append("\n");
--- End diff --

Please use ``System.lineseparator()`` instead of ``\n`` for proper platform 
independence.


---
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 #1545: CLOUDSTACK-8715: Add channel to Instances for...

2016-08-10 Thread jburwell
Github user jburwell commented on a diff in the pull request:

https://github.com/apache/cloudstack/pull/1545#discussion_r74251286
  
--- Diff: 
plugins/hypervisors/kvm/src/com/cloud/hypervisor/kvm/resource/LibvirtVMDef.java 
---
@@ -1209,25 +1209,95 @@ public String toString() {
 }
 }
 
-public static class VirtioSerialDef {
-private final String _name;
-private String _path;
+public static class ChannelDef {
+enum ChannelType {
+UNIX("unix"), SERIAL("serial");
+String type;
 
-public VirtioSerialDef(String name, String path) {
-_name = name;
-_path = path;
+ChannelType(String type) {
+this.type = type;
+}
+
+@Override
+public String toString() {
+return this.type;
+}
+}
+
+enum ChannelState {
+DISCONNECTED("disconnected"), CONNECTED("connected");
+String type;
+
+ChannelState(String type) {
+this.type = type;
+}
+
+@Override
+public String toString() {
+return type;
+}
+}
+
+private String name;
+private String path;
+private ChannelType type;
+private ChannelState state;
+
+public ChannelDef(String name, ChannelType type) {
+this.name = name;
+this.type = type;
+}
+
+public ChannelDef(String name, ChannelType type, String path) {
+this.name = name;
+this.path = path;
+this.type = type;
+}
+
+public ChannelDef(String name, ChannelType type, ChannelState 
state) {
+this.name = name;
+this.state = state;
+this.type = type;
+}
+
+public ChannelDef(String name, ChannelType type, ChannelState 
state, String path) {
+this.name = name;
+this.path = path;
+this.state = state;
+this.type = type;
+}
+
+public ChannelType getChannelType() {
+return type;
+}
+
+public ChannelState getChannelState() {
+return state;
+}
+
+public String getName() {
+return name;
+}
+
+public String getPath() {
+return path;
 }
 
 @Override
 public String toString() {
 StringBuilder virtioSerialBuilder = new StringBuilder();
-if (_path == null) {
-_path = "/var/lib/libvirt/qemu";
+virtioSerialBuilder.append("\n");
+if (path == null) {
+virtioSerialBuilder.append("\n");
+} else {
+virtioSerialBuilder.append("\n");
--- End diff --

``");
virtioSerialBuilder.append(System.lineSeparator());
```


---
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 #1545: CLOUDSTACK-8715: Add channel to Instances for...

2016-08-10 Thread jburwell
Github user jburwell commented on a diff in the pull request:

https://github.com/apache/cloudstack/pull/1545#discussion_r74251739
  
--- Diff: 
plugins/hypervisors/kvm/src/com/cloud/hypervisor/kvm/resource/LibvirtVMDef.java 
---
@@ -1209,25 +1209,95 @@ public String toString() {
 }
 }
 
-public static class VirtioSerialDef {
-private final String _name;
-private String _path;
+public static class ChannelDef {
+enum ChannelType {
+UNIX("unix"), SERIAL("serial");
+String type;
 
-public VirtioSerialDef(String name, String path) {
-_name = name;
-_path = path;
+ChannelType(String type) {
+this.type = type;
+}
+
+@Override
+public String toString() {
+return this.type;
+}
+}
+
+enum ChannelState {
+DISCONNECTED("disconnected"), CONNECTED("connected");
+String type;
+
+ChannelState(String type) {
+this.type = type;
+}
+
+@Override
+public String toString() {
+return type;
+}
+}
+
+private String name;
+private String path;
+private ChannelType type;
+private ChannelState state;
+
+public ChannelDef(String name, ChannelType type) {
+this.name = name;
+this.type = type;
+}
+
+public ChannelDef(String name, ChannelType type, String path) {
+this.name = name;
+this.path = path;
+this.type = type;
+}
+
+public ChannelDef(String name, ChannelType type, ChannelState 
state) {
+this.name = name;
+this.state = state;
+this.type = type;
+}
+
+public ChannelDef(String name, ChannelType type, ChannelState 
state, String path) {
+this.name = name;
+this.path = path;
+this.state = state;
+this.type = type;
+}
+
+public ChannelType getChannelType() {
+return type;
+}
+
+public ChannelState getChannelState() {
+return state;
+}
+
+public String getName() {
+return name;
+}
+
+public String getPath() {
+return path;
 }
 
 @Override
 public String toString() {
 StringBuilder virtioSerialBuilder = new StringBuilder();
-if (_path == null) {
-_path = "/var/lib/libvirt/qemu";
+virtioSerialBuilder.append("\n");
+if (path == null) {
+virtioSerialBuilder.append("\n");
+} else {
+virtioSerialBuilder.append("\n");
 }
-virtioSerialBuilder.append("\n");
-virtioSerialBuilder.append("\n");
-virtioSerialBuilder.append("\n");
 virtioSerialBuilder.append("\n");
+if (state == null) {
+virtioSerialBuilder.append("\n");
+} else {
+virtioSerialBuilder.append("\n");
+}
--- End diff --

See previously recommended refactoring for source mode as this ``if`` 
condition appears to follow the same pattern.


---
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 issue #1579: CLOUDSTACK-9403 : Support for shared networks in Nua...

2016-08-10 Thread prashanthvarma
Github user prashanthvarma commented on the issue:

https://github.com/apache/cloudstack/pull/1579
  
Marvin test code PEP8 & PyFlakes compliance:
CloudStack$
CloudStack$ pep8 test/integration/plugins/nuagevsp/*.py
CloudStack$
CloudStack$ pyflakes test/integration/plugins/nuagevsp/*.py
CloudStack$


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


[GitHub] cloudstack issue #1545: CLOUDSTACK-8715: Add channel to Instances for Qemu G...

2016-08-10 Thread jburwell
Github user jburwell commented on the issue:

https://github.com/apache/cloudstack/pull/1545
  
@wido @rhtyd given the flakiness of patchviasocket, I think we should 
consider including this fix in all supported branches (4.8, 4.9, and master).  
The issues I have seen move this bug from a Major to a Critical -- especially 
in large environments where the law of large numbers greatly increases the 
probability of occurrence and its impact.  My primary hesitation is the need 
for a new system VM template.  However, I think LTS will eventually require a 
new system VM template to address outstanding site 2 site VPN issues.  Also, I 
don't see the patchviasocket script being impacted by this patch.  How does 
this patch fix/replace patchviasocket?

/cc @karuturi


---
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 #1602: CLOUDSTACK-9422: Granular 'vmware.create.full...

2016-08-10 Thread jburwell
Github user jburwell commented on a diff in the pull request:

https://github.com/apache/cloudstack/pull/1602#discussion_r74271023
  
--- Diff: 
plugins/hypervisors/vmware/src/com/cloud/storage/resource/VmwareStorageSubsystemCommandHandler.java
 ---
@@ -66,19 +68,28 @@ public 
VmwareStorageSubsystemCommandHandler(StorageProcessor processor, Integer
 this._nfsVersion = nfsVersion;
 }
 
-/**
- * Reconfigure NFS version for storage operations
- * @param nfsVersion NFS version to set
- * @return true if NFS version could be configured, false in other case
- */
-public boolean reconfigureNfsVersion(Integer nfsVersion){
+public boolean 
reconfigureStorageProcessor(EnumMap
 params) {
+VmwareStorageProcessor processor = (VmwareStorageProcessor) 
this.processor;
 try {
-VmwareStorageProcessor processor = (VmwareStorageProcessor) 
this.processor;
-processor.setNfsVersion(nfsVersion);
-this._nfsVersion = nfsVersion;
+for (VmwareStorageProcessorConfigurableFields key : 
params.keySet()){
+switch (key){
+case NFS_VERSION:
+Integer nfsVersion = (Integer) params.get(key);
+processor.setNfsVersion(nfsVersion);
+this._nfsVersion = nfsVersion;
+break;
+case FULL_CLONE_FLAG:
+boolean fullClone = (boolean) params.get(key);
+processor.setFullCloneFlag(fullClone);
+break;
+default:
+String msg = "Unknown reconfigurable field " + 
key.getName() + " for VmwareStorageProcessor";
+throw new IllegalStateException(msg);
+}
+}
 return true;
-} catch (Exception e){
-s_logger.error("Error while reconfiguring NFS version " + 
nfsVersion);
+} catch (IllegalStateException e){
--- End diff --

Per my previous comment, why are we throwing an exception on line 86 and 
catching it here?  Why not log the error and return ``false`` in the 
``default`` case?  Using exceptions flow control is both expensive and an bad 
code smell.


---
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 issue #1634: [blocker] CLOUDSTACK-9452: add python-argparse depen...

2016-08-10 Thread jburwell
Github user jburwell commented on the issue:

https://github.com/apache/cloudstack/pull/1634
  
LGTM for code


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


[GitHub] cloudstack issue #1541: Systemd packaging for Ubuntu 16.04

2016-08-10 Thread wido
Github user wido commented on the issue:

https://github.com/apache/cloudstack/pull/1541
  
Done @rhtyd , it should build 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 #1602: CLOUDSTACK-9422: Granular 'vmware.create.full...

2016-08-10 Thread nvazquez
Github user nvazquez commented on a diff in the pull request:

https://github.com/apache/cloudstack/pull/1602#discussion_r74301008
  
--- Diff: 
plugins/hypervisors/vmware/src/com/cloud/storage/resource/VmwareStorageSubsystemCommandHandler.java
 ---
@@ -66,19 +68,28 @@ public 
VmwareStorageSubsystemCommandHandler(StorageProcessor processor, Integer
 this._nfsVersion = nfsVersion;
 }
 
-/**
- * Reconfigure NFS version for storage operations
- * @param nfsVersion NFS version to set
- * @return true if NFS version could be configured, false in other case
- */
-public boolean reconfigureNfsVersion(Integer nfsVersion){
+public boolean 
reconfigureStorageProcessor(EnumMap
 params) {
+VmwareStorageProcessor processor = (VmwareStorageProcessor) 
this.processor;
 try {
-VmwareStorageProcessor processor = (VmwareStorageProcessor) 
this.processor;
-processor.setNfsVersion(nfsVersion);
-this._nfsVersion = nfsVersion;
+for (VmwareStorageProcessorConfigurableFields key : 
params.keySet()){
+switch (key){
+case NFS_VERSION:
+Integer nfsVersion = (Integer) params.get(key);
+processor.setNfsVersion(nfsVersion);
+this._nfsVersion = nfsVersion;
+break;
+case FULL_CLONE_FLAG:
+boolean fullClone = (boolean) params.get(key);
+processor.setFullCloneFlag(fullClone);
+break;
+default:
+String msg = "Unknown reconfigurable field " + 
key.getName() + " for VmwareStorageProcessor";
+throw new IllegalStateException(msg);
+}
+}
 return true;
-} catch (Exception e){
-s_logger.error("Error while reconfiguring NFS version " + 
nfsVersion);
+} catch (IllegalStateException e){
--- End diff --

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


Re: [VOTE] Apache Cloudstack 4.8.1 RC2

2016-08-10 Thread Tutkowski, Mike
+1 (binding)

I have run tests on this using a Basic Zone with both VMware 5.5 (two hosts) 
and XenServer 6.5 (two hosts).

The zone was created using the RC with XenServer. All system VMs were running 
on local storage.

I added primary storages to the zone that make use of different SolidFire 
plug-ins. I was able to successfully create VMs. I could attach data disks to 
VMs. I was able to create a volume snapshot.

From: Will Stevens 
Sent: Monday, August 8, 2016 8:29 AM
To: dev@cloudstack.apache.org
Subject: [VOTE] Apache Cloudstack 4.8.1 RC2

Hi All,

Sorry for the version mix up with RC1.  This will be the 4.8.1 release, not
the 4.8.2 release.

I've created a 4.8.1 release, with the following artifacts up for a vote:

Git Branch and Commit SH:
https://git-wip-us.apache.org/repos/asf?p=cloudstack.git;a=
shortlog;h=refs/heads/4.8.1-RC20160808T1006
Commit: a63db21d16072821a1e27473813fddf36accfdd4

List of changes will be produced with the release notes once the RC passes.

Source release (checksums and signatures are available at the same
location):
https://dist.apache.org/repos/dist/dev/cloudstack/4.8.1/


PGP release keys (signed using CB818F64):
https://dist.apache.org/repos/dist/release/cloudstack/KEYS

Vote will be open for 72 hours.

For sanity in tallying the vote, can PMC members please be sure to indicate
"(binding)" with their vote?

[ ] +1  approve
[ ] +0  no opinion
[ ] -1  disapprove (and reason why)


Re: [VOTE] Apache Cloudstack 4.8.1 RC2

2016-08-10 Thread Will Stevens
Thanks Mike.  :)

*Will STEVENS*
Lead Developer

*CloudOps* *| *Cloud Solutions Experts
420 rue Guy *|* Montreal *|* Quebec *|* H3J 1S6
w cloudops.com *|* tw @CloudOps_

On Wed, Aug 10, 2016 at 2:24 PM, Tutkowski, Mike 
wrote:

> +1 (binding)
>
> I have run tests on this using a Basic Zone with both VMware 5.5 (two
> hosts) and XenServer 6.5 (two hosts).
>
> The zone was created using the RC with XenServer. All system VMs were
> running on local storage.
>
> I added primary storages to the zone that make use of different SolidFire
> plug-ins. I was able to successfully create VMs. I could attach data disks
> to VMs. I was able to create a volume snapshot.
> 
> From: Will Stevens 
> Sent: Monday, August 8, 2016 8:29 AM
> To: dev@cloudstack.apache.org
> Subject: [VOTE] Apache Cloudstack 4.8.1 RC2
>
> Hi All,
>
> Sorry for the version mix up with RC1.  This will be the 4.8.1 release, not
> the 4.8.2 release.
>
> I've created a 4.8.1 release, with the following artifacts up for a vote:
>
> Git Branch and Commit SH:
> https://git-wip-us.apache.org/repos/asf?p=cloudstack.git;a=
> shortlog;h=refs/heads/4.8.1-RC20160808T1006
> Commit: a63db21d16072821a1e27473813fddf36accfdd4
>
> List of changes will be produced with the release notes once the RC passes.
>
> Source release (checksums and signatures are available at the same
> location):
> https://dist.apache.org/repos/dist/dev/cloudstack/4.8.1/
> 
>
> PGP release keys (signed using CB818F64):
> https://dist.apache.org/repos/dist/release/cloudstack/KEYS
>
> Vote will be open for 72 hours.
>
> For sanity in tallying the vote, can PMC members please be sure to indicate
> "(binding)" with their vote?
>
> [ ] +1  approve
> [ ] +0  no opinion
> [ ] -1  disapprove (and reason why)
>


[GitHub] cloudstack issue #1630: Add projectid to project details page

2016-08-10 Thread swill
Github user swill commented on the issue:

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


Re: [VOTE] Apache Cloudstack 4.8.1 RC2

2016-08-10 Thread Simon Weller
+1


We're running this in production with a few cherry picked upstream patches.

Environment: Centos 7, KVM with advanced networking (VPCs) and RBD.



From: williamstev...@gmail.com  on behalf of Will 
Stevens 
Sent: Wednesday, August 10, 2016 1:49 PM
To: dev@cloudstack.apache.org
Subject: Re: [VOTE] Apache Cloudstack 4.8.1 RC2

Thanks Mike.  :)

*Will STEVENS*
Lead Developer

*CloudOps* *| *Cloud Solutions Experts
420 rue Guy *|* Montreal *|* Quebec *|* H3J 1S6
w cloudops.com *|* tw @CloudOps_

On Wed, Aug 10, 2016 at 2:24 PM, Tutkowski, Mike 
wrote:

> +1 (binding)
>
> I have run tests on this using a Basic Zone with both VMware 5.5 (two
> hosts) and XenServer 6.5 (two hosts).
>
> The zone was created using the RC with XenServer. All system VMs were
> running on local storage.
>
> I added primary storages to the zone that make use of different SolidFire
> plug-ins. I was able to successfully create VMs. I could attach data disks
> to VMs. I was able to create a volume snapshot.
> 
> From: Will Stevens 
> Sent: Monday, August 8, 2016 8:29 AM
> To: dev@cloudstack.apache.org
> Subject: [VOTE] Apache Cloudstack 4.8.1 RC2
>
> Hi All,
>
> Sorry for the version mix up with RC1.  This will be the 4.8.1 release, not
> the 4.8.2 release.
>
> I've created a 4.8.1 release, with the following artifacts up for a vote:
>
> Git Branch and Commit SH:
> https://git-wip-us.apache.org/repos/asf?p=cloudstack.git;a=
> shortlog;h=refs/heads/4.8.1-RC20160808T1006
> Commit: a63db21d16072821a1e27473813fddf36accfdd4
>
> List of changes will be produced with the release notes once the RC passes.
>
> Source release (checksums and signatures are available at the same
> location):
> https://dist.apache.org/repos/dist/dev/cloudstack/4.8.1/
> 
>
> PGP release keys (signed using CB818F64):
> https://dist.apache.org/repos/dist/release/cloudstack/KEYS
>
> Vote will be open for 72 hours.
>
> For sanity in tallying the vote, can PMC members please be sure to indicate
> "(binding)" with their vote?
>
> [ ] +1  approve
> [ ] +0  no opinion
> [ ] -1  disapprove (and reason why)
>


[GitHub] cloudstack issue #1541: Systemd packaging for Ubuntu 16.04

2016-08-10 Thread rhtyd
Github user rhtyd commented on the issue:

https://github.com/apache/cloudstack/pull/1541
  
@blueorangutan package


---
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 #1624: Fixes regarding VOLUME_DELETE events resultin...

2016-08-10 Thread jburwell
Github user jburwell commented on a diff in the pull request:

https://github.com/apache/cloudstack/pull/1624#discussion_r74313420
  
--- Diff: server/test/com/cloud/user/AccountManagerImplTest.java ---
@@ -231,6 +253,73 @@ public void cleanup() {
 CallContext.unregister();
 }
 
+public UsageEventUtils setupUsageUtils() {
+_usageEventDao = new MockUsageEventDao();
+UsageEventUtils utils = new UsageEventUtils();
+
+Map usageUtilsFields = new HashMap();
+usageUtilsFields.put("usageEventDao", "_usageEventDao");
+usageUtilsFields.put("accountDao", "_accountDao");
+usageUtilsFields.put("dcDao", "_dcDao");
+usageUtilsFields.put("configDao", "_configDao");
+
+for (String fieldName : usageUtilsFields.keySet()) {
+try {
+Field f = 
UsageEventUtils.class.getDeclaredField(fieldName);
+f.setAccessible(true);
+//Remember the old fields for cleanup later (see 
cleanupUsageUtils)
+Field staticField = 
UsageEventUtils.class.getDeclaredField("s_" + fieldName);
+staticField.setAccessible(true);
+oldFields.put(f.getName(), staticField.get(null));
+f.set(utils, 
this.getClass().getDeclaredField(usageUtilsFields.get(fieldName)).get(this));
+} catch (IllegalArgumentException | IllegalAccessException
+| NoSuchFieldException | SecurityException e) {
+// TODO Auto-generated catch block
+e.printStackTrace();
+}
+}
+
+Method method;
+try {
+method = UsageEventUtils.class.getDeclaredMethod("init");
+method.setAccessible(true);
+method.invoke(utils);
+} catch (NoSuchMethodException | SecurityException | 
IllegalAccessException |
+IllegalArgumentException | InvocationTargetException 
e) {
+// TODO Auto-generated catch block
--- End diff --

Is there a TODO to be 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 #1624: Fixes regarding VOLUME_DELETE events resultin...

2016-08-10 Thread jburwell
Github user jburwell commented on a diff in the pull request:

https://github.com/apache/cloudstack/pull/1624#discussion_r74313401
  
--- Diff: server/test/com/cloud/user/AccountManagerImplTest.java ---
@@ -231,6 +253,73 @@ public void cleanup() {
 CallContext.unregister();
 }
 
+public UsageEventUtils setupUsageUtils() {
+_usageEventDao = new MockUsageEventDao();
+UsageEventUtils utils = new UsageEventUtils();
+
+Map usageUtilsFields = new HashMap();
+usageUtilsFields.put("usageEventDao", "_usageEventDao");
+usageUtilsFields.put("accountDao", "_accountDao");
+usageUtilsFields.put("dcDao", "_dcDao");
+usageUtilsFields.put("configDao", "_configDao");
+
+for (String fieldName : usageUtilsFields.keySet()) {
+try {
+Field f = 
UsageEventUtils.class.getDeclaredField(fieldName);
+f.setAccessible(true);
+//Remember the old fields for cleanup later (see 
cleanupUsageUtils)
+Field staticField = 
UsageEventUtils.class.getDeclaredField("s_" + fieldName);
+staticField.setAccessible(true);
+oldFields.put(f.getName(), staticField.get(null));
+f.set(utils, 
this.getClass().getDeclaredField(usageUtilsFields.get(fieldName)).get(this));
+} catch (IllegalArgumentException | IllegalAccessException
+| NoSuchFieldException | SecurityException e) {
+// TODO Auto-generated catch block
--- End diff --

Is there a TODO to be 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 issue #1541: Systemd packaging for Ubuntu 16.04

2016-08-10 Thread blueorangutan
Github user blueorangutan commented on the issue:

https://github.com/apache/cloudstack/pull/1541
  
@rhtyd a Jenkins job has been kicked to build packages. I'll keep you 
posted as I make progress.


---
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 #1624: Fixes regarding VOLUME_DELETE events resultin...

2016-08-10 Thread jburwell
Github user jburwell commented on a diff in the pull request:

https://github.com/apache/cloudstack/pull/1624#discussion_r74313885
  
--- Diff: server/test/com/cloud/user/AccountManagerImplTest.java ---
@@ -231,6 +253,73 @@ public void cleanup() {
 CallContext.unregister();
 }
 
+public UsageEventUtils setupUsageUtils() {
+_usageEventDao = new MockUsageEventDao();
+UsageEventUtils utils = new UsageEventUtils();
+
+Map usageUtilsFields = new HashMap();
+usageUtilsFields.put("usageEventDao", "_usageEventDao");
+usageUtilsFields.put("accountDao", "_accountDao");
+usageUtilsFields.put("dcDao", "_dcDao");
+usageUtilsFields.put("configDao", "_configDao");
+
+for (String fieldName : usageUtilsFields.keySet()) {
+try {
+Field f = 
UsageEventUtils.class.getDeclaredField(fieldName);
+f.setAccessible(true);
+//Remember the old fields for cleanup later (see 
cleanupUsageUtils)
+Field staticField = 
UsageEventUtils.class.getDeclaredField("s_" + fieldName);
+staticField.setAccessible(true);
+oldFields.put(f.getName(), staticField.get(null));
+f.set(utils, 
this.getClass().getDeclaredField(usageUtilsFields.get(fieldName)).get(this));
+} catch (IllegalArgumentException | IllegalAccessException
+| NoSuchFieldException | SecurityException e) {
+// TODO Auto-generated catch block
+e.printStackTrace();
+}
+}
+
+Method method;
+try {
+method = UsageEventUtils.class.getDeclaredMethod("init");
+method.setAccessible(true);
+method.invoke(utils);
+} catch (NoSuchMethodException | SecurityException | 
IllegalAccessException |
+IllegalArgumentException | InvocationTargetException 
e) {
+// TODO Auto-generated catch block
+e.printStackTrace();
+}
+
+return utils;
+}
+
+public void cleanupUsageUtils() {
+UsageEventUtils utils = new UsageEventUtils();
+
+for (String fieldName : oldFields.keySet()) {
+try {
+Field f = 
UsageEventUtils.class.getDeclaredField(fieldName);
+f.setAccessible(true);
+f.set(utils, oldFields.get(fieldName));
+} catch (IllegalArgumentException | IllegalAccessException
+| NoSuchFieldException | SecurityException e) {
+// TODO Auto-generated catch block
--- End diff --

Is there a TODO to be 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 #1624: Fixes regarding VOLUME_DELETE events resultin...

2016-08-10 Thread jburwell
Github user jburwell commented on a diff in the pull request:

https://github.com/apache/cloudstack/pull/1624#discussion_r74313796
  
--- Diff: server/test/com/cloud/user/AccountManagerImplTest.java ---
@@ -231,6 +253,73 @@ public void cleanup() {
 CallContext.unregister();
 }
 
+public UsageEventUtils setupUsageUtils() {
+_usageEventDao = new MockUsageEventDao();
+UsageEventUtils utils = new UsageEventUtils();
+
+Map usageUtilsFields = new HashMap();
+usageUtilsFields.put("usageEventDao", "_usageEventDao");
+usageUtilsFields.put("accountDao", "_accountDao");
+usageUtilsFields.put("dcDao", "_dcDao");
+usageUtilsFields.put("configDao", "_configDao");
--- End diff --

Why not declare this map as a static constant?  It would shorten this 
method and make it easier to understand.   Also, consider using the 
``ImmutableMap`` type for the type of the constant.


---
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 #1624: Fixes regarding VOLUME_DELETE events resultin...

2016-08-10 Thread jburwell
Github user jburwell commented on a diff in the pull request:

https://github.com/apache/cloudstack/pull/1624#discussion_r74313918
  
--- Diff: server/test/com/cloud/user/AccountManagerImplTest.java ---
@@ -231,6 +253,73 @@ public void cleanup() {
 CallContext.unregister();
 }
 
+public UsageEventUtils setupUsageUtils() {
+_usageEventDao = new MockUsageEventDao();
+UsageEventUtils utils = new UsageEventUtils();
+
+Map usageUtilsFields = new HashMap();
+usageUtilsFields.put("usageEventDao", "_usageEventDao");
+usageUtilsFields.put("accountDao", "_accountDao");
+usageUtilsFields.put("dcDao", "_dcDao");
+usageUtilsFields.put("configDao", "_configDao");
+
+for (String fieldName : usageUtilsFields.keySet()) {
+try {
+Field f = 
UsageEventUtils.class.getDeclaredField(fieldName);
+f.setAccessible(true);
+//Remember the old fields for cleanup later (see 
cleanupUsageUtils)
+Field staticField = 
UsageEventUtils.class.getDeclaredField("s_" + fieldName);
+staticField.setAccessible(true);
+oldFields.put(f.getName(), staticField.get(null));
+f.set(utils, 
this.getClass().getDeclaredField(usageUtilsFields.get(fieldName)).get(this));
+} catch (IllegalArgumentException | IllegalAccessException
+| NoSuchFieldException | SecurityException e) {
+// TODO Auto-generated catch block
+e.printStackTrace();
+}
+}
+
+Method method;
+try {
+method = UsageEventUtils.class.getDeclaredMethod("init");
+method.setAccessible(true);
+method.invoke(utils);
+} catch (NoSuchMethodException | SecurityException | 
IllegalAccessException |
+IllegalArgumentException | InvocationTargetException 
e) {
+// TODO Auto-generated catch block
+e.printStackTrace();
+}
+
+return utils;
+}
+
+public void cleanupUsageUtils() {
+UsageEventUtils utils = new UsageEventUtils();
+
+for (String fieldName : oldFields.keySet()) {
+try {
+Field f = 
UsageEventUtils.class.getDeclaredField(fieldName);
+f.setAccessible(true);
+f.set(utils, oldFields.get(fieldName));
+} catch (IllegalArgumentException | IllegalAccessException
+| NoSuchFieldException | SecurityException e) {
+// TODO Auto-generated catch block
+e.printStackTrace();
+}
+
+}
+try {
+Method method = 
UsageEventUtils.class.getDeclaredMethod("init");
+method.setAccessible(true);
+method.invoke(utils);
+} catch (SecurityException | NoSuchMethodException
+| IllegalAccessException | IllegalArgumentException
+| InvocationTargetException e) {
+// TODO Auto-generated catch block
--- End diff --

Is there a TODO to be 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 #1624: Fixes regarding VOLUME_DELETE events resultin...

2016-08-10 Thread jburwell
Github user jburwell commented on a diff in the pull request:

https://github.com/apache/cloudstack/pull/1624#discussion_r74314062
  
--- Diff: server/test/com/cloud/user/MockUsageEventDao.java ---
@@ -0,0 +1,356 @@
+// 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 com.cloud.user;
+
+import java.util.ArrayList;
+import java.util.Date;
+import java.util.List;
+import java.util.Map;
+
+import javax.naming.ConfigurationException;
+
+import com.cloud.event.UsageEventVO;
+import com.cloud.event.dao.UsageEventDao;
+import com.cloud.utils.Pair;
+import com.cloud.utils.db.Attribute;
+import com.cloud.utils.db.Filter;
+import com.cloud.utils.db.GenericSearchBuilder;
+import com.cloud.utils.db.SearchBuilder;
+import com.cloud.utils.db.SearchCriteria;
+
+public class MockUsageEventDao implements UsageEventDao{
+
+List persistedItems;
+
+public MockUsageEventDao() {
+persistedItems = new ArrayList();
+}
+
+@Override
+public UsageEventVO findById(Long id) {
+// TODO Auto-generated method stub
+return null;
+}
+
+@Override
+public UsageEventVO findByIdIncludingRemoved(Long id) {
+// TODO Auto-generated method stub
--- End diff --

Is there a TODO to be 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 #1624: Fixes regarding VOLUME_DELETE events resultin...

2016-08-10 Thread jburwell
Github user jburwell commented on a diff in the pull request:

https://github.com/apache/cloudstack/pull/1624#discussion_r74314074
  
--- Diff: server/test/com/cloud/user/MockUsageEventDao.java ---
@@ -0,0 +1,356 @@
+// 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 com.cloud.user;
+
+import java.util.ArrayList;
+import java.util.Date;
+import java.util.List;
+import java.util.Map;
+
+import javax.naming.ConfigurationException;
+
+import com.cloud.event.UsageEventVO;
+import com.cloud.event.dao.UsageEventDao;
+import com.cloud.utils.Pair;
+import com.cloud.utils.db.Attribute;
+import com.cloud.utils.db.Filter;
+import com.cloud.utils.db.GenericSearchBuilder;
+import com.cloud.utils.db.SearchBuilder;
+import com.cloud.utils.db.SearchCriteria;
+
+public class MockUsageEventDao implements UsageEventDao{
+
+List persistedItems;
+
+public MockUsageEventDao() {
+persistedItems = new ArrayList();
+}
+
+@Override
+public UsageEventVO findById(Long id) {
+// TODO Auto-generated method stub
+return null;
+}
+
+@Override
+public UsageEventVO findByIdIncludingRemoved(Long id) {
+// TODO Auto-generated method stub
+return null;
+}
+
+@Override
+public UsageEventVO findById(Long id, boolean fresh) {
+// TODO Auto-generated method stub
--- End diff --

Is there a TODO to be 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 #1624: Fixes regarding VOLUME_DELETE events resultin...

2016-08-10 Thread jburwell
Github user jburwell commented on a diff in the pull request:

https://github.com/apache/cloudstack/pull/1624#discussion_r74314037
  
--- Diff: server/test/com/cloud/user/MockUsageEventDao.java ---
@@ -0,0 +1,356 @@
+// 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 com.cloud.user;
+
+import java.util.ArrayList;
+import java.util.Date;
+import java.util.List;
+import java.util.Map;
+
+import javax.naming.ConfigurationException;
+
+import com.cloud.event.UsageEventVO;
+import com.cloud.event.dao.UsageEventDao;
+import com.cloud.utils.Pair;
+import com.cloud.utils.db.Attribute;
+import com.cloud.utils.db.Filter;
+import com.cloud.utils.db.GenericSearchBuilder;
+import com.cloud.utils.db.SearchBuilder;
+import com.cloud.utils.db.SearchCriteria;
+
+public class MockUsageEventDao implements UsageEventDao{
+
+List persistedItems;
+
+public MockUsageEventDao() {
+persistedItems = new ArrayList();
+}
+
+@Override
+public UsageEventVO findById(Long id) {
+// TODO Auto-generated method stub
--- End diff --

Is there a TODO to be 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 #1624: Fixes regarding VOLUME_DELETE events resultin...

2016-08-10 Thread jburwell
Github user jburwell commented on a diff in the pull request:

https://github.com/apache/cloudstack/pull/1624#discussion_r74314114
  
--- Diff: server/test/com/cloud/user/MockUsageEventDao.java ---
@@ -0,0 +1,356 @@
+// 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 com.cloud.user;
+
+import java.util.ArrayList;
+import java.util.Date;
+import java.util.List;
+import java.util.Map;
+
+import javax.naming.ConfigurationException;
+
+import com.cloud.event.UsageEventVO;
+import com.cloud.event.dao.UsageEventDao;
+import com.cloud.utils.Pair;
+import com.cloud.utils.db.Attribute;
+import com.cloud.utils.db.Filter;
+import com.cloud.utils.db.GenericSearchBuilder;
+import com.cloud.utils.db.SearchBuilder;
+import com.cloud.utils.db.SearchCriteria;
+
+public class MockUsageEventDao implements UsageEventDao{
+
+List persistedItems;
+
+public MockUsageEventDao() {
+persistedItems = new ArrayList();
+}
+
+@Override
+public UsageEventVO findById(Long id) {
+// TODO Auto-generated method stub
+return null;
+}
+
+@Override
+public UsageEventVO findByIdIncludingRemoved(Long id) {
+// TODO Auto-generated method stub
+return null;
+}
+
+@Override
+public UsageEventVO findById(Long id, boolean fresh) {
+// TODO Auto-generated method stub
+return null;
+}
+
+@Override
+public UsageEventVO findByUuid(String uuid) {
+// TODO Auto-generated method stub
+return null;
+}
+
+@Override
+public UsageEventVO findByUuidIncludingRemoved(String uuid) {
+// TODO Auto-generated method stub
+return null;
+}
+
+@Override
+public UsageEventVO createForUpdate() {
+// TODO Auto-generated method stub
--- End diff --

Is there a TODO to be 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 #1624: Fixes regarding VOLUME_DELETE events resultin...

2016-08-10 Thread jburwell
Github user jburwell commented on a diff in the pull request:

https://github.com/apache/cloudstack/pull/1624#discussion_r74314104
  
--- Diff: server/test/com/cloud/user/MockUsageEventDao.java ---
@@ -0,0 +1,356 @@
+// 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 com.cloud.user;
+
+import java.util.ArrayList;
+import java.util.Date;
+import java.util.List;
+import java.util.Map;
+
+import javax.naming.ConfigurationException;
+
+import com.cloud.event.UsageEventVO;
+import com.cloud.event.dao.UsageEventDao;
+import com.cloud.utils.Pair;
+import com.cloud.utils.db.Attribute;
+import com.cloud.utils.db.Filter;
+import com.cloud.utils.db.GenericSearchBuilder;
+import com.cloud.utils.db.SearchBuilder;
+import com.cloud.utils.db.SearchCriteria;
+
+public class MockUsageEventDao implements UsageEventDao{
+
+List persistedItems;
+
+public MockUsageEventDao() {
+persistedItems = new ArrayList();
+}
+
+@Override
+public UsageEventVO findById(Long id) {
+// TODO Auto-generated method stub
+return null;
+}
+
+@Override
+public UsageEventVO findByIdIncludingRemoved(Long id) {
+// TODO Auto-generated method stub
+return null;
+}
+
+@Override
+public UsageEventVO findById(Long id, boolean fresh) {
+// TODO Auto-generated method stub
+return null;
+}
+
+@Override
+public UsageEventVO findByUuid(String uuid) {
+// TODO Auto-generated method stub
+return null;
+}
+
+@Override
+public UsageEventVO findByUuidIncludingRemoved(String uuid) {
+// TODO Auto-generated method stub
--- End diff --

Is there a TODO to be 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 #1624: Fixes regarding VOLUME_DELETE events resultin...

2016-08-10 Thread jburwell
Github user jburwell commented on a diff in the pull request:

https://github.com/apache/cloudstack/pull/1624#discussion_r74314127
  
--- Diff: server/test/com/cloud/user/MockUsageEventDao.java ---
@@ -0,0 +1,356 @@
+// 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 com.cloud.user;
+
+import java.util.ArrayList;
+import java.util.Date;
+import java.util.List;
+import java.util.Map;
+
+import javax.naming.ConfigurationException;
+
+import com.cloud.event.UsageEventVO;
+import com.cloud.event.dao.UsageEventDao;
+import com.cloud.utils.Pair;
+import com.cloud.utils.db.Attribute;
+import com.cloud.utils.db.Filter;
+import com.cloud.utils.db.GenericSearchBuilder;
+import com.cloud.utils.db.SearchBuilder;
+import com.cloud.utils.db.SearchCriteria;
+
+public class MockUsageEventDao implements UsageEventDao{
+
+List persistedItems;
+
+public MockUsageEventDao() {
+persistedItems = new ArrayList();
+}
+
+@Override
+public UsageEventVO findById(Long id) {
+// TODO Auto-generated method stub
+return null;
+}
+
+@Override
+public UsageEventVO findByIdIncludingRemoved(Long id) {
+// TODO Auto-generated method stub
+return null;
+}
+
+@Override
+public UsageEventVO findById(Long id, boolean fresh) {
+// TODO Auto-generated method stub
+return null;
+}
+
+@Override
+public UsageEventVO findByUuid(String uuid) {
+// TODO Auto-generated method stub
+return null;
+}
+
+@Override
+public UsageEventVO findByUuidIncludingRemoved(String uuid) {
+// TODO Auto-generated method stub
+return null;
+}
+
+@Override
+public UsageEventVO createForUpdate() {
+// TODO Auto-generated method stub
+return null;
+}
+
+@Override
+public SearchBuilder createSearchBuilder() {
+// TODO Auto-generated method stub
--- End diff --

Is there a TODO to be 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 #1624: Fixes regarding VOLUME_DELETE events resultin...

2016-08-10 Thread jburwell
Github user jburwell commented on a diff in the pull request:

https://github.com/apache/cloudstack/pull/1624#discussion_r74314149
  
--- Diff: server/test/com/cloud/user/MockUsageEventDao.java ---
@@ -0,0 +1,356 @@
+// 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 com.cloud.user;
+
+import java.util.ArrayList;
+import java.util.Date;
+import java.util.List;
+import java.util.Map;
+
+import javax.naming.ConfigurationException;
+
+import com.cloud.event.UsageEventVO;
+import com.cloud.event.dao.UsageEventDao;
+import com.cloud.utils.Pair;
+import com.cloud.utils.db.Attribute;
+import com.cloud.utils.db.Filter;
+import com.cloud.utils.db.GenericSearchBuilder;
+import com.cloud.utils.db.SearchBuilder;
+import com.cloud.utils.db.SearchCriteria;
+
+public class MockUsageEventDao implements UsageEventDao{
+
+List persistedItems;
+
+public MockUsageEventDao() {
+persistedItems = new ArrayList();
+}
+
+@Override
+public UsageEventVO findById(Long id) {
+// TODO Auto-generated method stub
+return null;
+}
+
+@Override
+public UsageEventVO findByIdIncludingRemoved(Long id) {
+// TODO Auto-generated method stub
+return null;
+}
+
+@Override
+public UsageEventVO findById(Long id, boolean fresh) {
+// TODO Auto-generated method stub
+return null;
+}
+
+@Override
+public UsageEventVO findByUuid(String uuid) {
+// TODO Auto-generated method stub
+return null;
+}
+
+@Override
+public UsageEventVO findByUuidIncludingRemoved(String uuid) {
+// TODO Auto-generated method stub
+return null;
+}
+
+@Override
+public UsageEventVO createForUpdate() {
+// TODO Auto-generated method stub
+return null;
+}
+
+@Override
+public SearchBuilder createSearchBuilder() {
+// TODO Auto-generated method stub
+return null;
+}
+
+@Override
+public  GenericSearchBuilder createSearchBuilder(
+Class clazz) {
+// TODO Auto-generated method stub
--- End diff --

Is there a TODO to be 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 #1624: Fixes regarding VOLUME_DELETE events resultin...

2016-08-10 Thread jburwell
Github user jburwell commented on a diff in the pull request:

https://github.com/apache/cloudstack/pull/1624#discussion_r74314166
  
--- Diff: server/test/com/cloud/user/MockUsageEventDao.java ---
@@ -0,0 +1,356 @@
+// 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 com.cloud.user;
+
+import java.util.ArrayList;
+import java.util.Date;
+import java.util.List;
+import java.util.Map;
+
+import javax.naming.ConfigurationException;
+
+import com.cloud.event.UsageEventVO;
+import com.cloud.event.dao.UsageEventDao;
+import com.cloud.utils.Pair;
+import com.cloud.utils.db.Attribute;
+import com.cloud.utils.db.Filter;
+import com.cloud.utils.db.GenericSearchBuilder;
+import com.cloud.utils.db.SearchBuilder;
+import com.cloud.utils.db.SearchCriteria;
+
+public class MockUsageEventDao implements UsageEventDao{
+
+List persistedItems;
+
+public MockUsageEventDao() {
+persistedItems = new ArrayList();
+}
+
+@Override
+public UsageEventVO findById(Long id) {
+// TODO Auto-generated method stub
+return null;
+}
+
+@Override
+public UsageEventVO findByIdIncludingRemoved(Long id) {
+// TODO Auto-generated method stub
+return null;
+}
+
+@Override
+public UsageEventVO findById(Long id, boolean fresh) {
+// TODO Auto-generated method stub
+return null;
+}
+
+@Override
+public UsageEventVO findByUuid(String uuid) {
+// TODO Auto-generated method stub
+return null;
+}
+
+@Override
+public UsageEventVO findByUuidIncludingRemoved(String uuid) {
+// TODO Auto-generated method stub
+return null;
+}
+
+@Override
+public UsageEventVO createForUpdate() {
+// TODO Auto-generated method stub
+return null;
+}
+
+@Override
+public SearchBuilder createSearchBuilder() {
+// TODO Auto-generated method stub
+return null;
+}
+
+@Override
+public  GenericSearchBuilder createSearchBuilder(
+Class clazz) {
+// TODO Auto-generated method stub
+return null;
+}
+
+@Override
+public UsageEventVO createForUpdate(Long id) {
+// TODO Auto-generated method stub
--- End diff --

Is there a TODO to be 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 #1624: Fixes regarding VOLUME_DELETE events resultin...

2016-08-10 Thread jburwell
Github user jburwell commented on a diff in the pull request:

https://github.com/apache/cloudstack/pull/1624#discussion_r74314190
  
--- Diff: server/test/com/cloud/user/MockUsageEventDao.java ---
@@ -0,0 +1,356 @@
+// 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 com.cloud.user;
+
+import java.util.ArrayList;
+import java.util.Date;
+import java.util.List;
+import java.util.Map;
+
+import javax.naming.ConfigurationException;
+
+import com.cloud.event.UsageEventVO;
+import com.cloud.event.dao.UsageEventDao;
+import com.cloud.utils.Pair;
+import com.cloud.utils.db.Attribute;
+import com.cloud.utils.db.Filter;
+import com.cloud.utils.db.GenericSearchBuilder;
+import com.cloud.utils.db.SearchBuilder;
+import com.cloud.utils.db.SearchCriteria;
+
+public class MockUsageEventDao implements UsageEventDao{
+
+List persistedItems;
+
+public MockUsageEventDao() {
+persistedItems = new ArrayList();
+}
+
+@Override
+public UsageEventVO findById(Long id) {
+// TODO Auto-generated method stub
+return null;
+}
+
+@Override
+public UsageEventVO findByIdIncludingRemoved(Long id) {
+// TODO Auto-generated method stub
+return null;
+}
+
+@Override
+public UsageEventVO findById(Long id, boolean fresh) {
+// TODO Auto-generated method stub
+return null;
+}
+
+@Override
+public UsageEventVO findByUuid(String uuid) {
+// TODO Auto-generated method stub
+return null;
+}
+
+@Override
+public UsageEventVO findByUuidIncludingRemoved(String uuid) {
+// TODO Auto-generated method stub
+return null;
+}
+
+@Override
+public UsageEventVO createForUpdate() {
+// TODO Auto-generated method stub
+return null;
+}
+
+@Override
+public SearchBuilder createSearchBuilder() {
+// TODO Auto-generated method stub
+return null;
+}
+
+@Override
+public  GenericSearchBuilder createSearchBuilder(
+Class clazz) {
+// TODO Auto-generated method stub
+return null;
+}
+
+@Override
+public UsageEventVO createForUpdate(Long id) {
+// TODO Auto-generated method stub
+return null;
+}
+
+@Override
+public SearchCriteria createSearchCriteria() {
+// TODO Auto-generated method stub
+return null;
+}
+
+@Override
+public List lockRows(SearchCriteria sc,
+Filter filter, boolean exclusive) {
+// TODO Auto-generated method stub
--- End diff --

Is there a TODO to be 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 #1624: Fixes regarding VOLUME_DELETE events resultin...

2016-08-10 Thread jburwell
Github user jburwell commented on a diff in the pull request:

https://github.com/apache/cloudstack/pull/1624#discussion_r74314175
  
--- Diff: server/test/com/cloud/user/MockUsageEventDao.java ---
@@ -0,0 +1,356 @@
+// 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 com.cloud.user;
+
+import java.util.ArrayList;
+import java.util.Date;
+import java.util.List;
+import java.util.Map;
+
+import javax.naming.ConfigurationException;
+
+import com.cloud.event.UsageEventVO;
+import com.cloud.event.dao.UsageEventDao;
+import com.cloud.utils.Pair;
+import com.cloud.utils.db.Attribute;
+import com.cloud.utils.db.Filter;
+import com.cloud.utils.db.GenericSearchBuilder;
+import com.cloud.utils.db.SearchBuilder;
+import com.cloud.utils.db.SearchCriteria;
+
+public class MockUsageEventDao implements UsageEventDao{
+
+List persistedItems;
+
+public MockUsageEventDao() {
+persistedItems = new ArrayList();
+}
+
+@Override
+public UsageEventVO findById(Long id) {
+// TODO Auto-generated method stub
+return null;
+}
+
+@Override
+public UsageEventVO findByIdIncludingRemoved(Long id) {
+// TODO Auto-generated method stub
+return null;
+}
+
+@Override
+public UsageEventVO findById(Long id, boolean fresh) {
+// TODO Auto-generated method stub
+return null;
+}
+
+@Override
+public UsageEventVO findByUuid(String uuid) {
+// TODO Auto-generated method stub
+return null;
+}
+
+@Override
+public UsageEventVO findByUuidIncludingRemoved(String uuid) {
+// TODO Auto-generated method stub
+return null;
+}
+
+@Override
+public UsageEventVO createForUpdate() {
+// TODO Auto-generated method stub
+return null;
+}
+
+@Override
+public SearchBuilder createSearchBuilder() {
+// TODO Auto-generated method stub
+return null;
+}
+
+@Override
+public  GenericSearchBuilder createSearchBuilder(
+Class clazz) {
+// TODO Auto-generated method stub
+return null;
+}
+
+@Override
+public UsageEventVO createForUpdate(Long id) {
+// TODO Auto-generated method stub
+return null;
+}
+
+@Override
+public SearchCriteria createSearchCriteria() {
+// TODO Auto-generated method stub
--- End diff --

Is there a TODO to be 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 #1624: Fixes regarding VOLUME_DELETE events resultin...

2016-08-10 Thread jburwell
Github user jburwell commented on a diff in the pull request:

https://github.com/apache/cloudstack/pull/1624#discussion_r74314220
  
--- Diff: server/test/com/cloud/user/MockUsageEventDao.java ---
@@ -0,0 +1,356 @@
+// 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 com.cloud.user;
+
+import java.util.ArrayList;
+import java.util.Date;
+import java.util.List;
+import java.util.Map;
+
+import javax.naming.ConfigurationException;
+
+import com.cloud.event.UsageEventVO;
+import com.cloud.event.dao.UsageEventDao;
+import com.cloud.utils.Pair;
+import com.cloud.utils.db.Attribute;
+import com.cloud.utils.db.Filter;
+import com.cloud.utils.db.GenericSearchBuilder;
+import com.cloud.utils.db.SearchBuilder;
+import com.cloud.utils.db.SearchCriteria;
+
+public class MockUsageEventDao implements UsageEventDao{
+
+List persistedItems;
+
+public MockUsageEventDao() {
+persistedItems = new ArrayList();
+}
+
+@Override
+public UsageEventVO findById(Long id) {
+// TODO Auto-generated method stub
+return null;
+}
+
+@Override
+public UsageEventVO findByIdIncludingRemoved(Long id) {
+// TODO Auto-generated method stub
+return null;
+}
+
+@Override
+public UsageEventVO findById(Long id, boolean fresh) {
+// TODO Auto-generated method stub
+return null;
+}
+
+@Override
+public UsageEventVO findByUuid(String uuid) {
+// TODO Auto-generated method stub
+return null;
+}
+
+@Override
+public UsageEventVO findByUuidIncludingRemoved(String uuid) {
+// TODO Auto-generated method stub
+return null;
+}
+
+@Override
+public UsageEventVO createForUpdate() {
+// TODO Auto-generated method stub
+return null;
+}
+
+@Override
+public SearchBuilder createSearchBuilder() {
+// TODO Auto-generated method stub
+return null;
+}
+
+@Override
+public  GenericSearchBuilder createSearchBuilder(
+Class clazz) {
+// TODO Auto-generated method stub
+return null;
+}
+
+@Override
+public UsageEventVO createForUpdate(Long id) {
+// TODO Auto-generated method stub
+return null;
+}
+
+@Override
+public SearchCriteria createSearchCriteria() {
+// TODO Auto-generated method stub
+return null;
+}
+
+@Override
+public List lockRows(SearchCriteria sc,
+Filter filter, boolean exclusive) {
+// TODO Auto-generated method stub
+return null;
+}
+
+@Override
+public UsageEventVO lockOneRandomRow(SearchCriteria sc,
+boolean exclusive) {
+// TODO Auto-generated method stub
+return null;
+}
+
+@Override
+public UsageEventVO lockRow(Long id, Boolean exclusive) {
+// TODO Auto-generated method stub
--- End diff --

Is there a TODO to be 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 #1624: Fixes regarding VOLUME_DELETE events resultin...

2016-08-10 Thread jburwell
Github user jburwell commented on a diff in the pull request:

https://github.com/apache/cloudstack/pull/1624#discussion_r74314203
  
--- Diff: server/test/com/cloud/user/MockUsageEventDao.java ---
@@ -0,0 +1,356 @@
+// 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 com.cloud.user;
+
+import java.util.ArrayList;
+import java.util.Date;
+import java.util.List;
+import java.util.Map;
+
+import javax.naming.ConfigurationException;
+
+import com.cloud.event.UsageEventVO;
+import com.cloud.event.dao.UsageEventDao;
+import com.cloud.utils.Pair;
+import com.cloud.utils.db.Attribute;
+import com.cloud.utils.db.Filter;
+import com.cloud.utils.db.GenericSearchBuilder;
+import com.cloud.utils.db.SearchBuilder;
+import com.cloud.utils.db.SearchCriteria;
+
+public class MockUsageEventDao implements UsageEventDao{
+
+List persistedItems;
+
+public MockUsageEventDao() {
+persistedItems = new ArrayList();
+}
+
+@Override
+public UsageEventVO findById(Long id) {
+// TODO Auto-generated method stub
+return null;
+}
+
+@Override
+public UsageEventVO findByIdIncludingRemoved(Long id) {
+// TODO Auto-generated method stub
+return null;
+}
+
+@Override
+public UsageEventVO findById(Long id, boolean fresh) {
+// TODO Auto-generated method stub
+return null;
+}
+
+@Override
+public UsageEventVO findByUuid(String uuid) {
+// TODO Auto-generated method stub
+return null;
+}
+
+@Override
+public UsageEventVO findByUuidIncludingRemoved(String uuid) {
+// TODO Auto-generated method stub
+return null;
+}
+
+@Override
+public UsageEventVO createForUpdate() {
+// TODO Auto-generated method stub
+return null;
+}
+
+@Override
+public SearchBuilder createSearchBuilder() {
+// TODO Auto-generated method stub
+return null;
+}
+
+@Override
+public  GenericSearchBuilder createSearchBuilder(
+Class clazz) {
+// TODO Auto-generated method stub
+return null;
+}
+
+@Override
+public UsageEventVO createForUpdate(Long id) {
+// TODO Auto-generated method stub
+return null;
+}
+
+@Override
+public SearchCriteria createSearchCriteria() {
+// TODO Auto-generated method stub
+return null;
+}
+
+@Override
+public List lockRows(SearchCriteria sc,
+Filter filter, boolean exclusive) {
+// TODO Auto-generated method stub
+return null;
+}
+
+@Override
+public UsageEventVO lockOneRandomRow(SearchCriteria sc,
+boolean exclusive) {
+// TODO Auto-generated method stub
--- End diff --

Is there a TODO to be 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 #1624: Fixes regarding VOLUME_DELETE events resultin...

2016-08-10 Thread jburwell
Github user jburwell commented on a diff in the pull request:

https://github.com/apache/cloudstack/pull/1624#discussion_r74314244
  
--- Diff: server/test/com/cloud/user/MockUsageEventDao.java ---
@@ -0,0 +1,356 @@
+// 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 com.cloud.user;
+
+import java.util.ArrayList;
+import java.util.Date;
+import java.util.List;
+import java.util.Map;
+
+import javax.naming.ConfigurationException;
+
+import com.cloud.event.UsageEventVO;
+import com.cloud.event.dao.UsageEventDao;
+import com.cloud.utils.Pair;
+import com.cloud.utils.db.Attribute;
+import com.cloud.utils.db.Filter;
+import com.cloud.utils.db.GenericSearchBuilder;
+import com.cloud.utils.db.SearchBuilder;
+import com.cloud.utils.db.SearchCriteria;
+
+public class MockUsageEventDao implements UsageEventDao{
+
+List persistedItems;
+
+public MockUsageEventDao() {
+persistedItems = new ArrayList();
+}
+
+@Override
+public UsageEventVO findById(Long id) {
+// TODO Auto-generated method stub
+return null;
+}
+
+@Override
+public UsageEventVO findByIdIncludingRemoved(Long id) {
+// TODO Auto-generated method stub
+return null;
+}
+
+@Override
+public UsageEventVO findById(Long id, boolean fresh) {
+// TODO Auto-generated method stub
+return null;
+}
+
+@Override
+public UsageEventVO findByUuid(String uuid) {
+// TODO Auto-generated method stub
+return null;
+}
+
+@Override
+public UsageEventVO findByUuidIncludingRemoved(String uuid) {
+// TODO Auto-generated method stub
+return null;
+}
+
+@Override
+public UsageEventVO createForUpdate() {
+// TODO Auto-generated method stub
+return null;
+}
+
+@Override
+public SearchBuilder createSearchBuilder() {
+// TODO Auto-generated method stub
+return null;
+}
+
+@Override
+public  GenericSearchBuilder createSearchBuilder(
+Class clazz) {
+// TODO Auto-generated method stub
+return null;
+}
+
+@Override
+public UsageEventVO createForUpdate(Long id) {
+// TODO Auto-generated method stub
+return null;
+}
+
+@Override
+public SearchCriteria createSearchCriteria() {
+// TODO Auto-generated method stub
+return null;
+}
+
+@Override
+public List lockRows(SearchCriteria sc,
+Filter filter, boolean exclusive) {
+// TODO Auto-generated method stub
+return null;
+}
+
+@Override
+public UsageEventVO lockOneRandomRow(SearchCriteria sc,
+boolean exclusive) {
+// TODO Auto-generated method stub
+return null;
+}
+
+@Override
+public UsageEventVO lockRow(Long id, Boolean exclusive) {
+// TODO Auto-generated method stub
+return null;
+}
+
+@Override
+public UsageEventVO acquireInLockTable(Long id) {
+// TODO Auto-generated method stub
+return null;
+}
+
+@Override
+public UsageEventVO acquireInLockTable(Long id, int seconds) {
+// TODO Auto-generated method stub
--- End diff --

Is there a TODO to be 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 #1624: Fixes regarding VOLUME_DELETE events resultin...

2016-08-10 Thread jburwell
Github user jburwell commented on a diff in the pull request:

https://github.com/apache/cloudstack/pull/1624#discussion_r74314253
  
--- Diff: server/test/com/cloud/user/MockUsageEventDao.java ---
@@ -0,0 +1,356 @@
+// 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 com.cloud.user;
+
+import java.util.ArrayList;
+import java.util.Date;
+import java.util.List;
+import java.util.Map;
+
+import javax.naming.ConfigurationException;
+
+import com.cloud.event.UsageEventVO;
+import com.cloud.event.dao.UsageEventDao;
+import com.cloud.utils.Pair;
+import com.cloud.utils.db.Attribute;
+import com.cloud.utils.db.Filter;
+import com.cloud.utils.db.GenericSearchBuilder;
+import com.cloud.utils.db.SearchBuilder;
+import com.cloud.utils.db.SearchCriteria;
+
+public class MockUsageEventDao implements UsageEventDao{
+
+List persistedItems;
+
+public MockUsageEventDao() {
+persistedItems = new ArrayList();
+}
+
+@Override
+public UsageEventVO findById(Long id) {
+// TODO Auto-generated method stub
+return null;
+}
+
+@Override
+public UsageEventVO findByIdIncludingRemoved(Long id) {
+// TODO Auto-generated method stub
+return null;
+}
+
+@Override
+public UsageEventVO findById(Long id, boolean fresh) {
+// TODO Auto-generated method stub
+return null;
+}
+
+@Override
+public UsageEventVO findByUuid(String uuid) {
+// TODO Auto-generated method stub
+return null;
+}
+
+@Override
+public UsageEventVO findByUuidIncludingRemoved(String uuid) {
+// TODO Auto-generated method stub
+return null;
+}
+
+@Override
+public UsageEventVO createForUpdate() {
+// TODO Auto-generated method stub
+return null;
+}
+
+@Override
+public SearchBuilder createSearchBuilder() {
+// TODO Auto-generated method stub
+return null;
+}
+
+@Override
+public  GenericSearchBuilder createSearchBuilder(
+Class clazz) {
+// TODO Auto-generated method stub
+return null;
+}
+
+@Override
+public UsageEventVO createForUpdate(Long id) {
+// TODO Auto-generated method stub
+return null;
+}
+
+@Override
+public SearchCriteria createSearchCriteria() {
+// TODO Auto-generated method stub
+return null;
+}
+
+@Override
+public List lockRows(SearchCriteria sc,
+Filter filter, boolean exclusive) {
+// TODO Auto-generated method stub
+return null;
+}
+
+@Override
+public UsageEventVO lockOneRandomRow(SearchCriteria sc,
+boolean exclusive) {
+// TODO Auto-generated method stub
+return null;
+}
+
+@Override
+public UsageEventVO lockRow(Long id, Boolean exclusive) {
+// TODO Auto-generated method stub
+return null;
+}
+
+@Override
+public UsageEventVO acquireInLockTable(Long id) {
+// TODO Auto-generated method stub
+return null;
+}
+
+@Override
+public UsageEventVO acquireInLockTable(Long id, int seconds) {
+// TODO Auto-generated method stub
+return null;
+}
+
+@Override
+public boolean releaseFromLockTable(Long id) {
+// TODO Auto-generated method stub
--- End diff --

Is there a TODO to be 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 infrastruc

[GitHub] cloudstack pull request #1624: Fixes regarding VOLUME_DELETE events resultin...

2016-08-10 Thread jburwell
Github user jburwell commented on a diff in the pull request:

https://github.com/apache/cloudstack/pull/1624#discussion_r74314233
  
--- Diff: server/test/com/cloud/user/MockUsageEventDao.java ---
@@ -0,0 +1,356 @@
+// 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 com.cloud.user;
+
+import java.util.ArrayList;
+import java.util.Date;
+import java.util.List;
+import java.util.Map;
+
+import javax.naming.ConfigurationException;
+
+import com.cloud.event.UsageEventVO;
+import com.cloud.event.dao.UsageEventDao;
+import com.cloud.utils.Pair;
+import com.cloud.utils.db.Attribute;
+import com.cloud.utils.db.Filter;
+import com.cloud.utils.db.GenericSearchBuilder;
+import com.cloud.utils.db.SearchBuilder;
+import com.cloud.utils.db.SearchCriteria;
+
+public class MockUsageEventDao implements UsageEventDao{
+
+List persistedItems;
+
+public MockUsageEventDao() {
+persistedItems = new ArrayList();
+}
+
+@Override
+public UsageEventVO findById(Long id) {
+// TODO Auto-generated method stub
+return null;
+}
+
+@Override
+public UsageEventVO findByIdIncludingRemoved(Long id) {
+// TODO Auto-generated method stub
+return null;
+}
+
+@Override
+public UsageEventVO findById(Long id, boolean fresh) {
+// TODO Auto-generated method stub
+return null;
+}
+
+@Override
+public UsageEventVO findByUuid(String uuid) {
+// TODO Auto-generated method stub
+return null;
+}
+
+@Override
+public UsageEventVO findByUuidIncludingRemoved(String uuid) {
+// TODO Auto-generated method stub
+return null;
+}
+
+@Override
+public UsageEventVO createForUpdate() {
+// TODO Auto-generated method stub
+return null;
+}
+
+@Override
+public SearchBuilder createSearchBuilder() {
+// TODO Auto-generated method stub
+return null;
+}
+
+@Override
+public  GenericSearchBuilder createSearchBuilder(
+Class clazz) {
+// TODO Auto-generated method stub
+return null;
+}
+
+@Override
+public UsageEventVO createForUpdate(Long id) {
+// TODO Auto-generated method stub
+return null;
+}
+
+@Override
+public SearchCriteria createSearchCriteria() {
+// TODO Auto-generated method stub
+return null;
+}
+
+@Override
+public List lockRows(SearchCriteria sc,
+Filter filter, boolean exclusive) {
+// TODO Auto-generated method stub
+return null;
+}
+
+@Override
+public UsageEventVO lockOneRandomRow(SearchCriteria sc,
+boolean exclusive) {
+// TODO Auto-generated method stub
+return null;
+}
+
+@Override
+public UsageEventVO lockRow(Long id, Boolean exclusive) {
+// TODO Auto-generated method stub
+return null;
+}
+
+@Override
+public UsageEventVO acquireInLockTable(Long id) {
+// TODO Auto-generated method stub
--- End diff --

Is there a TODO to be 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 #1624: Fixes regarding VOLUME_DELETE events resultin...

2016-08-10 Thread jburwell
Github user jburwell commented on a diff in the pull request:

https://github.com/apache/cloudstack/pull/1624#discussion_r74314270
  
--- Diff: server/test/com/cloud/user/MockUsageEventDao.java ---
@@ -0,0 +1,356 @@
+// 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 com.cloud.user;
+
+import java.util.ArrayList;
+import java.util.Date;
+import java.util.List;
+import java.util.Map;
+
+import javax.naming.ConfigurationException;
+
+import com.cloud.event.UsageEventVO;
+import com.cloud.event.dao.UsageEventDao;
+import com.cloud.utils.Pair;
+import com.cloud.utils.db.Attribute;
+import com.cloud.utils.db.Filter;
+import com.cloud.utils.db.GenericSearchBuilder;
+import com.cloud.utils.db.SearchBuilder;
+import com.cloud.utils.db.SearchCriteria;
+
+public class MockUsageEventDao implements UsageEventDao{
+
+List persistedItems;
+
+public MockUsageEventDao() {
+persistedItems = new ArrayList();
+}
+
+@Override
+public UsageEventVO findById(Long id) {
+// TODO Auto-generated method stub
+return null;
+}
+
+@Override
+public UsageEventVO findByIdIncludingRemoved(Long id) {
+// TODO Auto-generated method stub
+return null;
+}
+
+@Override
+public UsageEventVO findById(Long id, boolean fresh) {
+// TODO Auto-generated method stub
+return null;
+}
+
+@Override
+public UsageEventVO findByUuid(String uuid) {
+// TODO Auto-generated method stub
+return null;
+}
+
+@Override
+public UsageEventVO findByUuidIncludingRemoved(String uuid) {
+// TODO Auto-generated method stub
+return null;
+}
+
+@Override
+public UsageEventVO createForUpdate() {
+// TODO Auto-generated method stub
+return null;
+}
+
+@Override
+public SearchBuilder createSearchBuilder() {
+// TODO Auto-generated method stub
+return null;
+}
+
+@Override
+public  GenericSearchBuilder createSearchBuilder(
+Class clazz) {
+// TODO Auto-generated method stub
+return null;
+}
+
+@Override
+public UsageEventVO createForUpdate(Long id) {
+// TODO Auto-generated method stub
+return null;
+}
+
+@Override
+public SearchCriteria createSearchCriteria() {
+// TODO Auto-generated method stub
+return null;
+}
+
+@Override
+public List lockRows(SearchCriteria sc,
+Filter filter, boolean exclusive) {
+// TODO Auto-generated method stub
+return null;
+}
+
+@Override
+public UsageEventVO lockOneRandomRow(SearchCriteria sc,
+boolean exclusive) {
+// TODO Auto-generated method stub
+return null;
+}
+
+@Override
+public UsageEventVO lockRow(Long id, Boolean exclusive) {
+// TODO Auto-generated method stub
+return null;
+}
+
+@Override
+public UsageEventVO acquireInLockTable(Long id) {
+// TODO Auto-generated method stub
+return null;
+}
+
+@Override
+public UsageEventVO acquireInLockTable(Long id, int seconds) {
+// TODO Auto-generated method stub
+return null;
+}
+
+@Override
+public boolean releaseFromLockTable(Long id) {
+// TODO Auto-generated method stub
+return false;
+}
+
+@Override
+public boolean update(Long id, UsageEventVO entity) {
+// TODO Auto-generated method stub
--- End diff --

Is there a TODO to be resolved?


---
If your project is set up for it, you can reply to this email and have your
reply appear 

[GitHub] cloudstack pull request #1624: Fixes regarding VOLUME_DELETE events resultin...

2016-08-10 Thread jburwell
Github user jburwell commented on a diff in the pull request:

https://github.com/apache/cloudstack/pull/1624#discussion_r74314285
  
--- Diff: server/test/com/cloud/user/MockUsageEventDao.java ---
@@ -0,0 +1,356 @@
+// 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 com.cloud.user;
+
+import java.util.ArrayList;
+import java.util.Date;
+import java.util.List;
+import java.util.Map;
+
+import javax.naming.ConfigurationException;
+
+import com.cloud.event.UsageEventVO;
+import com.cloud.event.dao.UsageEventDao;
+import com.cloud.utils.Pair;
+import com.cloud.utils.db.Attribute;
+import com.cloud.utils.db.Filter;
+import com.cloud.utils.db.GenericSearchBuilder;
+import com.cloud.utils.db.SearchBuilder;
+import com.cloud.utils.db.SearchCriteria;
+
+public class MockUsageEventDao implements UsageEventDao{
+
+List persistedItems;
+
+public MockUsageEventDao() {
+persistedItems = new ArrayList();
+}
+
+@Override
+public UsageEventVO findById(Long id) {
+// TODO Auto-generated method stub
+return null;
+}
+
+@Override
+public UsageEventVO findByIdIncludingRemoved(Long id) {
+// TODO Auto-generated method stub
+return null;
+}
+
+@Override
+public UsageEventVO findById(Long id, boolean fresh) {
+// TODO Auto-generated method stub
+return null;
+}
+
+@Override
+public UsageEventVO findByUuid(String uuid) {
+// TODO Auto-generated method stub
+return null;
+}
+
+@Override
+public UsageEventVO findByUuidIncludingRemoved(String uuid) {
+// TODO Auto-generated method stub
+return null;
+}
+
+@Override
+public UsageEventVO createForUpdate() {
+// TODO Auto-generated method stub
+return null;
+}
+
+@Override
+public SearchBuilder createSearchBuilder() {
+// TODO Auto-generated method stub
+return null;
+}
+
+@Override
+public  GenericSearchBuilder createSearchBuilder(
+Class clazz) {
+// TODO Auto-generated method stub
+return null;
+}
+
+@Override
+public UsageEventVO createForUpdate(Long id) {
+// TODO Auto-generated method stub
+return null;
+}
+
+@Override
+public SearchCriteria createSearchCriteria() {
+// TODO Auto-generated method stub
+return null;
+}
+
+@Override
+public List lockRows(SearchCriteria sc,
+Filter filter, boolean exclusive) {
+// TODO Auto-generated method stub
+return null;
+}
+
+@Override
+public UsageEventVO lockOneRandomRow(SearchCriteria sc,
+boolean exclusive) {
+// TODO Auto-generated method stub
+return null;
+}
+
+@Override
+public UsageEventVO lockRow(Long id, Boolean exclusive) {
+// TODO Auto-generated method stub
+return null;
+}
+
+@Override
+public UsageEventVO acquireInLockTable(Long id) {
+// TODO Auto-generated method stub
+return null;
+}
+
+@Override
+public UsageEventVO acquireInLockTable(Long id, int seconds) {
+// TODO Auto-generated method stub
+return null;
+}
+
+@Override
+public boolean releaseFromLockTable(Long id) {
+// TODO Auto-generated method stub
+return false;
+}
+
+@Override
+public boolean update(Long id, UsageEventVO entity) {
+// TODO Auto-generated method stub
+return false;
+}
+
+@Override
+public int update(UsageEventVO entity, SearchCriteria 
sc) {
+// TODO Au

[GitHub] cloudstack pull request #1624: Fixes regarding VOLUME_DELETE events resultin...

2016-08-10 Thread jburwell
Github user jburwell commented on a diff in the pull request:

https://github.com/apache/cloudstack/pull/1624#discussion_r74314305
  
--- Diff: server/test/com/cloud/user/MockUsageEventDao.java ---
@@ -0,0 +1,356 @@
+// 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 com.cloud.user;
+
+import java.util.ArrayList;
+import java.util.Date;
+import java.util.List;
+import java.util.Map;
+
+import javax.naming.ConfigurationException;
+
+import com.cloud.event.UsageEventVO;
+import com.cloud.event.dao.UsageEventDao;
+import com.cloud.utils.Pair;
+import com.cloud.utils.db.Attribute;
+import com.cloud.utils.db.Filter;
+import com.cloud.utils.db.GenericSearchBuilder;
+import com.cloud.utils.db.SearchBuilder;
+import com.cloud.utils.db.SearchCriteria;
+
+public class MockUsageEventDao implements UsageEventDao{
+
+List persistedItems;
+
+public MockUsageEventDao() {
+persistedItems = new ArrayList();
+}
+
+@Override
+public UsageEventVO findById(Long id) {
+// TODO Auto-generated method stub
+return null;
+}
+
+@Override
+public UsageEventVO findByIdIncludingRemoved(Long id) {
+// TODO Auto-generated method stub
+return null;
+}
+
+@Override
+public UsageEventVO findById(Long id, boolean fresh) {
+// TODO Auto-generated method stub
+return null;
+}
+
+@Override
+public UsageEventVO findByUuid(String uuid) {
+// TODO Auto-generated method stub
+return null;
+}
+
+@Override
+public UsageEventVO findByUuidIncludingRemoved(String uuid) {
+// TODO Auto-generated method stub
+return null;
+}
+
+@Override
+public UsageEventVO createForUpdate() {
+// TODO Auto-generated method stub
+return null;
+}
+
+@Override
+public SearchBuilder createSearchBuilder() {
+// TODO Auto-generated method stub
+return null;
+}
+
+@Override
+public  GenericSearchBuilder createSearchBuilder(
+Class clazz) {
+// TODO Auto-generated method stub
+return null;
+}
+
+@Override
+public UsageEventVO createForUpdate(Long id) {
+// TODO Auto-generated method stub
+return null;
+}
+
+@Override
+public SearchCriteria createSearchCriteria() {
+// TODO Auto-generated method stub
+return null;
+}
+
+@Override
+public List lockRows(SearchCriteria sc,
+Filter filter, boolean exclusive) {
+// TODO Auto-generated method stub
+return null;
+}
+
+@Override
+public UsageEventVO lockOneRandomRow(SearchCriteria sc,
+boolean exclusive) {
+// TODO Auto-generated method stub
+return null;
+}
+
+@Override
+public UsageEventVO lockRow(Long id, Boolean exclusive) {
+// TODO Auto-generated method stub
+return null;
+}
+
+@Override
+public UsageEventVO acquireInLockTable(Long id) {
+// TODO Auto-generated method stub
+return null;
+}
+
+@Override
+public UsageEventVO acquireInLockTable(Long id, int seconds) {
+// TODO Auto-generated method stub
+return null;
+}
+
+@Override
+public boolean releaseFromLockTable(Long id) {
+// TODO Auto-generated method stub
+return false;
+}
+
+@Override
+public boolean update(Long id, UsageEventVO entity) {
+// TODO Auto-generated method stub
+return false;
+}
+
+@Override
+public int update(UsageEventVO entity, SearchCriteria 
sc) {
+// TODO Au

  1   2   >