You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@cloudstack.apache.org by ProjectMoon <gi...@git.apache.org> on 2016/08/02 14:40:51 UTC

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

GitHub user ProjectMoon opened a pull request:

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

    Fixes regarding VOLUME_DELETE events resulting from account deletion

    New version of #1491.
    
    **Original Description**
    New version of #1373, but updated for the 4.7 branch with another fix that allows it to properly find expunged root volumes. This is a bug fix, which is why we target the 4.7 branch.
    
    Original pull request:
    Fixes regarding usage event emission.
    
    UsageEventUtils was previously not checking deleted accounts, which meant that if an account was deleted that had some resources running on it, those resources would get destroyed without emitting any events.
    
    Furthermore, the VOLUME_DELETE event of ROOT volumes is the responsibility of the UserVmManager, which gets circumvented when expunging resources following the account deletion. Added a check to the AccountManager which catches the ROOT volumes that need to be deleted and emits events for them.
    
    To test this: Create a new user. As that user, create and destroy an instance. This should cause the VM_CREATE, VM_START, VM_STOP, VM_DESTROY, VOLUME_CREATE, and VOLUME_DELETE events to be emitted. 
    Create a new instance as the same user. Log in as admin, and delete the user. The same set of events should be emitted, and there should be no duplicate DELETE events for the ROOT volume of the previous instance.

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

    $ git pull https://github.com/greenqloud/cloudstack pr-volume-usage-events-fixes-4.8

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

    https://github.com/apache/cloudstack/pull/1624.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 #1624
    
----
commit c861e1a4922ce9030d0a0d8542572d3a444c1509
Author: nnesic <ne...@greenqloud.com>
Date:   2015-10-12T13:15:30Z

    Emit a VOLUME_DELETE usage event when account deletion destroys an instance.
    
    Currently the logic about volume deletion seems to be that an event
    should be emitted when the volume delete is requested, not when the
    deletion completes.
    
    The VolumeStateListener specifically ignores destroy events for ROOT
    volumes, assuming that the ROOT volume only gets deleted when the
    instance is destroyed and the UserVmManager should take care of it.
    
    When deleting an account, all of its resources get destroyed, but the
    instance expunging circumvents the UserVmManager, and thus we miss the
    VOLUME_DESTROY usage event.  Added a check in the AccountManager to
    emit the deletion event for ROOT volumes belonging to instances which
    weren't destroyed prior to the account deletion.

----


---
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 infrastructure@apache.org or file a JIRA ticket
with INFRA.
---

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

Posted by jburwell <gi...@git.apache.org>.
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<UsageEventVO> persistedItems;
    +
    +    public MockUsageEventDao() {
    +        persistedItems = new ArrayList<UsageEventVO>();
    +    }
    +
    +    @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<UsageEventVO> createSearchBuilder() {
    +        // TODO Auto-generated method stub
    +        return null;
    +    }
    +
    +    @Override
    +    public <K> GenericSearchBuilder<UsageEventVO, K> createSearchBuilder(
    +            Class<K> clazz) {
    +        // TODO Auto-generated method stub
    +        return null;
    +    }
    +
    +    @Override
    +    public UsageEventVO createForUpdate(Long id) {
    +        // TODO Auto-generated method stub
    +        return null;
    +    }
    +
    +    @Override
    +    public SearchCriteria<UsageEventVO> createSearchCriteria() {
    +        // TODO Auto-generated method stub
    +        return null;
    +    }
    +
    +    @Override
    +    public List<UsageEventVO> lockRows(SearchCriteria<UsageEventVO> sc,
    +            Filter filter, boolean exclusive) {
    +        // TODO Auto-generated method stub
    +        return null;
    +    }
    +
    +    @Override
    +    public UsageEventVO lockOneRandomRow(SearchCriteria<UsageEventVO> 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 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 infrastructure@apache.org or file a JIRA ticket
with INFRA.
---

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

Posted by jburwell <gi...@git.apache.org>.
Github user jburwell commented on a diff in the pull request:

    https://github.com/apache/cloudstack/pull/1624#discussion_r76545408
  
    --- 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<String, String> usageUtilsFields = new HashMap<String, String>();
    +        usageUtilsFields.put("usageEventDao", "_usageEventDao");
    +        usageUtilsFields.put("accountDao", "_accountDao");
    +        usageUtilsFields.put("dcDao", "_dcDao");
    +        usageUtilsFields.put("configDao", "_configDao");
    --- End diff --
    
    @ProjectMoon I got lost thinking it was in the main code base re-allocating a set of static values on every invocation would cause GC churn.  Not a significant concern in a test class.


---
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 infrastructure@apache.org or file a JIRA ticket
with INFRA.
---

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

Posted by ProjectMoon <gi...@git.apache.org>.
GitHub user ProjectMoon reopened a pull request:

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

    Fixes regarding VOLUME_DELETE events resulting from account deletion

    New version of #1491.
    
    **Original Description**
    New version of #1373, but updated for the 4.7 branch with another fix that allows it to properly find expunged root volumes. This is a bug fix, which is why we target the 4.7 branch.
    
    Original pull request:
    Fixes regarding usage event emission.
    
    UsageEventUtils was previously not checking deleted accounts, which meant that if an account was deleted that had some resources running on it, those resources would get destroyed without emitting any events.
    
    Furthermore, the VOLUME_DELETE event of ROOT volumes is the responsibility of the UserVmManager, which gets circumvented when expunging resources following the account deletion. Added a check to the AccountManager which catches the ROOT volumes that need to be deleted and emits events for them.
    
    To test this: Create a new user. As that user, create and destroy an instance. This should cause the VM_CREATE, VM_START, VM_STOP, VM_DESTROY, VOLUME_CREATE, and VOLUME_DELETE events to be emitted. 
    Create a new instance as the same user. Log in as admin, and delete the user. The same set of events should be emitted, and there should be no duplicate DELETE events for the ROOT volume of the previous instance.

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

    $ git pull https://github.com/greenqloud/cloudstack pr-volume-usage-events-fixes-4.8

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

    https://github.com/apache/cloudstack/pull/1624.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 #1624
    
----
commit 8009683e67da185bc3e6d630c42b0f614f1eb825
Author: nnesic <ne...@greenqloud.com>
Date:   2015-10-12T13:15:30Z

    Emit a VOLUME_DELETE usage event when account deletion destroys an instance.
    
    Currently the logic about volume deletion seems to be that an event
    should be emitted when the volume delete is requested, not when the
    deletion completes.
    
    The VolumeStateListener specifically ignores destroy events for ROOT
    volumes, assuming that the ROOT volume only gets deleted when the
    instance is destroyed and the UserVmManager should take care of it.
    
    When deleting an account, all of its resources get destroyed, but the
    instance expunging circumvents the UserVmManager, and thus we miss the
    VOLUME_DESTROY usage event.  Added a check in the AccountManager to
    emit the deletion event for ROOT volumes belonging to instances which
    weren't destroyed prior to the account deletion.

----


---
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 infrastructure@apache.org or file a JIRA ticket
with INFRA.
---

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

Posted by jburwell <gi...@git.apache.org>.
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<String, String> usageUtilsFields = new HashMap<String, String>();
    +        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 infrastructure@apache.org or file a JIRA ticket
with INFRA.
---

[GitHub] cloudstack issue #1624: Fixes regarding VOLUME_DELETE events resulting from ...

Posted by ProjectMoon <gi...@git.apache.org>.
Github user ProjectMoon commented on the issue:

    https://github.com/apache/cloudstack/pull/1624
  
    Looks like it's ready for merging 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 infrastructure@apache.org or file a JIRA ticket
with INFRA.
---

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

Posted by jburwell <gi...@git.apache.org>.
Github user jburwell commented on a diff in the pull request:

    https://github.com/apache/cloudstack/pull/1624#discussion_r74314424
  
    --- 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<UsageEventVO> persistedItems;
    +
    +    public MockUsageEventDao() {
    +        persistedItems = new ArrayList<UsageEventVO>();
    +    }
    +
    +    @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<UsageEventVO> createSearchBuilder() {
    +        // TODO Auto-generated method stub
    +        return null;
    +    }
    +
    +    @Override
    +    public <K> GenericSearchBuilder<UsageEventVO, K> createSearchBuilder(
    +            Class<K> clazz) {
    +        // TODO Auto-generated method stub
    +        return null;
    +    }
    +
    +    @Override
    +    public UsageEventVO createForUpdate(Long id) {
    +        // TODO Auto-generated method stub
    +        return null;
    +    }
    +
    +    @Override
    +    public SearchCriteria<UsageEventVO> createSearchCriteria() {
    +        // TODO Auto-generated method stub
    +        return null;
    +    }
    +
    +    @Override
    +    public List<UsageEventVO> lockRows(SearchCriteria<UsageEventVO> sc,
    +            Filter filter, boolean exclusive) {
    +        // TODO Auto-generated method stub
    +        return null;
    +    }
    +
    +    @Override
    +    public UsageEventVO lockOneRandomRow(SearchCriteria<UsageEventVO> 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<UsageEventVO> sc) {
    +        // TODO Auto-generated method stub
    +        return 0;
    +    }
    +
    +    @Override
    +    public List<UsageEventVO> listAll() {
    +
    +        return persistedItems;
    +    }
    +
    +    @Override
    +    public List<UsageEventVO> listAll(Filter filter) {
    +        // TODO Auto-generated method stub
    +        return null;
    +    }
    +
    +    @Override
    +    public List<UsageEventVO> search(SearchCriteria<UsageEventVO> sc,
    +            Filter filter) {
    +        // TODO Auto-generated method stub
    +        return null;
    +    }
    +
    +    @Override
    +    public List<UsageEventVO> search(SearchCriteria<UsageEventVO> sc,
    +            Filter filter, boolean enableQueryCache) {
    +        // TODO Auto-generated method stub
    +        return null;
    +    }
    +
    +    @Override
    +    public List<UsageEventVO> searchIncludingRemoved(
    +            SearchCriteria<UsageEventVO> sc, Filter filter, Boolean lock,
    +            boolean cache) {
    +        // TODO Auto-generated method stub
    +        return null;
    +    }
    +
    +    @Override
    +    public List<UsageEventVO> searchIncludingRemoved(
    +            SearchCriteria<UsageEventVO> sc, Filter filter, Boolean lock,
    +            boolean cache, boolean enableQueryCache) {
    +        // TODO Auto-generated method stub
    +        return null;
    +    }
    +
    +    @Override
    +    public <M> List<M> customSearchIncludingRemoved(SearchCriteria<M> sc,
    +            Filter filter) {
    +        // TODO Auto-generated method stub
    +        return null;
    +    }
    +
    +    @Override
    +    public List<UsageEventVO> listAllIncludingRemoved() {
    +        // TODO Auto-generated method stub
    +        return null;
    +    }
    +
    +    @Override
    +    public List<UsageEventVO> listAllIncludingRemoved(Filter filter) {
    +        // TODO Auto-generated method stub
    +        return null;
    +    }
    +
    +    @Override
    +    public UsageEventVO persist(UsageEventVO entity) {
    +        persistedItems.add(entity);
    +        return entity;
    +    }
    +
    +    @Override
    +    public boolean remove(Long id) {
    +        // TODO Auto-generated method stub
    +        return false;
    +    }
    +
    +    @Override
    +    public int remove(SearchCriteria<UsageEventVO> sc) {
    +        // 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 infrastructure@apache.org or file a JIRA ticket
with INFRA.
---

[GitHub] cloudstack issue #1624: Fixes regarding VOLUME_DELETE events resulting from ...

Posted by jburwell <gi...@git.apache.org>.
Github user jburwell commented on the issue:

    https://github.com/apache/cloudstack/pull/1624
  
    @ProjectMoon I would like to get this PR merged for the 4.8.2.0 release, but I need to cut an RC ASAP.  Will it be possible for you to address the PR comments in time?


---
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 infrastructure@apache.org or file a JIRA ticket
with INFRA.
---

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

Posted by jburwell <gi...@git.apache.org>.
Github user jburwell commented on a diff in the pull request:

    https://github.com/apache/cloudstack/pull/1624#discussion_r74314577
  
    --- 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<UsageEventVO> persistedItems;
    +
    +    public MockUsageEventDao() {
    +        persistedItems = new ArrayList<UsageEventVO>();
    +    }
    +
    +    @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<UsageEventVO> createSearchBuilder() {
    +        // TODO Auto-generated method stub
    +        return null;
    +    }
    +
    +    @Override
    +    public <K> GenericSearchBuilder<UsageEventVO, K> createSearchBuilder(
    +            Class<K> clazz) {
    +        // TODO Auto-generated method stub
    +        return null;
    +    }
    +
    +    @Override
    +    public UsageEventVO createForUpdate(Long id) {
    +        // TODO Auto-generated method stub
    +        return null;
    +    }
    +
    +    @Override
    +    public SearchCriteria<UsageEventVO> createSearchCriteria() {
    +        // TODO Auto-generated method stub
    +        return null;
    +    }
    +
    +    @Override
    +    public List<UsageEventVO> lockRows(SearchCriteria<UsageEventVO> sc,
    +            Filter filter, boolean exclusive) {
    +        // TODO Auto-generated method stub
    +        return null;
    +    }
    +
    +    @Override
    +    public UsageEventVO lockOneRandomRow(SearchCriteria<UsageEventVO> 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<UsageEventVO> sc) {
    +        // TODO Auto-generated method stub
    +        return 0;
    +    }
    +
    +    @Override
    +    public List<UsageEventVO> listAll() {
    +
    +        return persistedItems;
    +    }
    +
    +    @Override
    +    public List<UsageEventVO> listAll(Filter filter) {
    +        // TODO Auto-generated method stub
    +        return null;
    +    }
    +
    +    @Override
    +    public List<UsageEventVO> search(SearchCriteria<UsageEventVO> sc,
    +            Filter filter) {
    +        // TODO Auto-generated method stub
    +        return null;
    +    }
    +
    +    @Override
    +    public List<UsageEventVO> search(SearchCriteria<UsageEventVO> sc,
    +            Filter filter, boolean enableQueryCache) {
    +        // TODO Auto-generated method stub
    +        return null;
    +    }
    +
    +    @Override
    +    public List<UsageEventVO> searchIncludingRemoved(
    +            SearchCriteria<UsageEventVO> sc, Filter filter, Boolean lock,
    +            boolean cache) {
    +        // TODO Auto-generated method stub
    +        return null;
    +    }
    +
    +    @Override
    +    public List<UsageEventVO> searchIncludingRemoved(
    +            SearchCriteria<UsageEventVO> sc, Filter filter, Boolean lock,
    +            boolean cache, boolean enableQueryCache) {
    +        // TODO Auto-generated method stub
    +        return null;
    +    }
    +
    +    @Override
    +    public <M> List<M> customSearchIncludingRemoved(SearchCriteria<M> sc,
    +            Filter filter) {
    +        // TODO Auto-generated method stub
    +        return null;
    +    }
    +
    +    @Override
    +    public List<UsageEventVO> listAllIncludingRemoved() {
    +        // TODO Auto-generated method stub
    +        return null;
    +    }
    +
    +    @Override
    +    public List<UsageEventVO> listAllIncludingRemoved(Filter filter) {
    +        // TODO Auto-generated method stub
    +        return null;
    +    }
    +
    +    @Override
    +    public UsageEventVO persist(UsageEventVO entity) {
    +        persistedItems.add(entity);
    +        return entity;
    +    }
    +
    +    @Override
    +    public boolean remove(Long id) {
    +        // TODO Auto-generated method stub
    +        return false;
    +    }
    +
    +    @Override
    +    public int remove(SearchCriteria<UsageEventVO> sc) {
    +        // TODO Auto-generated method stub
    +        return 0;
    +    }
    +
    +    @Override
    +    public boolean expunge(Long id) {
    +        // TODO Auto-generated method stub
    +        return false;
    +    }
    +
    +    @Override
    +    public int expunge(SearchCriteria<UsageEventVO> sc) {
    +        // TODO Auto-generated method stub
    +        return 0;
    +    }
    +
    +    @Override
    +    public void expunge() {
    +        // TODO Auto-generated method stub
    +
    +    }
    +
    +    @Override
    +    public <K> K getNextInSequence(Class<K> clazz, String name) {
    +        // TODO Auto-generated method stub
    +        return null;
    +    }
    +
    +    @Override
    +    public boolean configure(String name, Map<String, Object> params)
    +            throws ConfigurationException {
    +        // TODO Auto-generated method stub
    +        return false;
    +    }
    +
    +    @Override
    +    public <M> List<M> customSearch(SearchCriteria<M> sc, Filter filter) {
    +        // TODO Auto-generated method stub
    +        return null;
    +    }
    +
    +    @Override
    +    public boolean lockInLockTable(String id) {
    +        // TODO Auto-generated method stub
    +        return false;
    +    }
    +
    +    @Override
    +    public boolean lockInLockTable(String id, int seconds) {
    +        // TODO Auto-generated method stub
    +        return false;
    +    }
    +
    +    @Override
    +    public boolean unlockFromLockTable(String id) {
    +        // TODO Auto-generated method stub
    +        return false;
    +    }
    +
    +    @Override
    +    public <K> K getRandomlyIncreasingNextInSequence(Class<K> clazz, String name) {
    +        // TODO Auto-generated method stub
    +        return null;
    +    }
    +
    +    @Override
    +    public UsageEventVO findOneBy(SearchCriteria<UsageEventVO> sc) {
    +        // TODO Auto-generated method stub
    +        return null;
    +    }
    +
    +    @Override
    +    public Class<UsageEventVO> getEntityBeanType() {
    +        // TODO Auto-generated method stub
    +        return null;
    +    }
    +
    +    @Override
    +    public Pair<List<UsageEventVO>, Integer> searchAndCount(
    +            SearchCriteria<UsageEventVO> sc, Filter filter) {
    +        // TODO Auto-generated method stub
    +        return null;
    +    }
    +
    +    @Override
    +    public Pair<List<UsageEventVO>, Integer> searchAndDistinctCount(SearchCriteria<UsageEventVO> sc, Filter filter) {
    +        //TODO Auto-generated method stub
    +        return null;
    +    }
    +
    +    @Override
    +    public Map<String, Attribute> getAllAttributes() {
    +        // TODO Auto-generated method stub
    +        return null;
    +    }
    +
    +    @Override
    +    public List<UsageEventVO> listLatestEvents(Date endDate) {
    +        // TODO Auto-generated method stub
    +        return null;
    +    }
    +
    +    @Override
    +    public List<UsageEventVO> getLatestEvent() {
    +        // TODO Auto-generated method stub
    +        return null;
    +    }
    +
    +    @Override
    +    public List<UsageEventVO> getRecentEvents(Date endDate) {
    +        // TODO Auto-generated method stub
    +        return null;
    +    }
    +
    +    @Override
    +    public List<UsageEventVO> listDirectIpEvents(Date startDate, Date endDate,
    +            long zoneId) {
    +        // 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 infrastructure@apache.org or file a JIRA ticket
with INFRA.
---

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

Posted by jburwell <gi...@git.apache.org>.
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<UsageEventVO> persistedItems;
    +
    +    public MockUsageEventDao() {
    +        persistedItems = new ArrayList<UsageEventVO>();
    +    }
    +
    +    @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<UsageEventVO> createSearchBuilder() {
    +        // TODO Auto-generated method stub
    +        return null;
    +    }
    +
    +    @Override
    +    public <K> GenericSearchBuilder<UsageEventVO, K> createSearchBuilder(
    +            Class<K> clazz) {
    +        // TODO Auto-generated method stub
    +        return null;
    +    }
    +
    +    @Override
    +    public UsageEventVO createForUpdate(Long id) {
    +        // TODO Auto-generated method stub
    +        return null;
    +    }
    +
    +    @Override
    +    public SearchCriteria<UsageEventVO> createSearchCriteria() {
    +        // TODO Auto-generated method stub
    +        return null;
    +    }
    +
    +    @Override
    +    public List<UsageEventVO> lockRows(SearchCriteria<UsageEventVO> sc,
    +            Filter filter, boolean exclusive) {
    +        // TODO Auto-generated method stub
    +        return null;
    +    }
    +
    +    @Override
    +    public UsageEventVO lockOneRandomRow(SearchCriteria<UsageEventVO> 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<UsageEventVO> sc) {
    +        // 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 infrastructure@apache.org or file a JIRA ticket
with INFRA.
---

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

Posted by jburwell <gi...@git.apache.org>.
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<UsageEventVO> persistedItems;
    +
    +    public MockUsageEventDao() {
    +        persistedItems = new ArrayList<UsageEventVO>();
    +    }
    +
    +    @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 infrastructure@apache.org or file a JIRA ticket
with INFRA.
---

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

Posted by jburwell <gi...@git.apache.org>.
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<String, String> usageUtilsFields = new HashMap<String, String>();
    +        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 infrastructure@apache.org or file a JIRA ticket
with INFRA.
---

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

Posted by asfgit <gi...@git.apache.org>.
Github user asfgit closed the pull request at:

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


---
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 infrastructure@apache.org or file a JIRA ticket
with INFRA.
---

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

Posted by jburwell <gi...@git.apache.org>.
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<UsageEventVO> persistedItems;
    +
    +    public MockUsageEventDao() {
    +        persistedItems = new ArrayList<UsageEventVO>();
    +    }
    +
    +    @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<UsageEventVO> createSearchBuilder() {
    +        // TODO Auto-generated method stub
    +        return null;
    +    }
    +
    +    @Override
    +    public <K> GenericSearchBuilder<UsageEventVO, K> createSearchBuilder(
    +            Class<K> clazz) {
    +        // TODO Auto-generated method stub
    +        return null;
    +    }
    +
    +    @Override
    +    public UsageEventVO createForUpdate(Long id) {
    +        // TODO Auto-generated method stub
    +        return null;
    +    }
    +
    +    @Override
    +    public SearchCriteria<UsageEventVO> 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 infrastructure@apache.org or file a JIRA ticket
with INFRA.
---

[GitHub] cloudstack issue #1624: Fixes regarding VOLUME_DELETE events resulting from ...

Posted by ProjectMoon <gi...@git.apache.org>.
Github user ProjectMoon commented on the issue:

    https://github.com/apache/cloudstack/pull/1624
  
    Alright. I'll rebase it once #1654 has been merged.


---
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 infrastructure@apache.org or file a JIRA ticket
with INFRA.
---

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

Posted by ProjectMoon <gi...@git.apache.org>.
Github user ProjectMoon closed the pull request at:

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


---
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 infrastructure@apache.org or file a JIRA ticket
with INFRA.
---

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

Posted by jburwell <gi...@git.apache.org>.
Github user jburwell commented on a diff in the pull request:

    https://github.com/apache/cloudstack/pull/1624#discussion_r74314442
  
    --- 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<UsageEventVO> persistedItems;
    +
    +    public MockUsageEventDao() {
    +        persistedItems = new ArrayList<UsageEventVO>();
    +    }
    +
    +    @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<UsageEventVO> createSearchBuilder() {
    +        // TODO Auto-generated method stub
    +        return null;
    +    }
    +
    +    @Override
    +    public <K> GenericSearchBuilder<UsageEventVO, K> createSearchBuilder(
    +            Class<K> clazz) {
    +        // TODO Auto-generated method stub
    +        return null;
    +    }
    +
    +    @Override
    +    public UsageEventVO createForUpdate(Long id) {
    +        // TODO Auto-generated method stub
    +        return null;
    +    }
    +
    +    @Override
    +    public SearchCriteria<UsageEventVO> createSearchCriteria() {
    +        // TODO Auto-generated method stub
    +        return null;
    +    }
    +
    +    @Override
    +    public List<UsageEventVO> lockRows(SearchCriteria<UsageEventVO> sc,
    +            Filter filter, boolean exclusive) {
    +        // TODO Auto-generated method stub
    +        return null;
    +    }
    +
    +    @Override
    +    public UsageEventVO lockOneRandomRow(SearchCriteria<UsageEventVO> 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<UsageEventVO> sc) {
    +        // TODO Auto-generated method stub
    +        return 0;
    +    }
    +
    +    @Override
    +    public List<UsageEventVO> listAll() {
    +
    +        return persistedItems;
    +    }
    +
    +    @Override
    +    public List<UsageEventVO> listAll(Filter filter) {
    +        // TODO Auto-generated method stub
    +        return null;
    +    }
    +
    +    @Override
    +    public List<UsageEventVO> search(SearchCriteria<UsageEventVO> sc,
    +            Filter filter) {
    +        // TODO Auto-generated method stub
    +        return null;
    +    }
    +
    +    @Override
    +    public List<UsageEventVO> search(SearchCriteria<UsageEventVO> sc,
    +            Filter filter, boolean enableQueryCache) {
    +        // TODO Auto-generated method stub
    +        return null;
    +    }
    +
    +    @Override
    +    public List<UsageEventVO> searchIncludingRemoved(
    +            SearchCriteria<UsageEventVO> sc, Filter filter, Boolean lock,
    +            boolean cache) {
    +        // TODO Auto-generated method stub
    +        return null;
    +    }
    +
    +    @Override
    +    public List<UsageEventVO> searchIncludingRemoved(
    +            SearchCriteria<UsageEventVO> sc, Filter filter, Boolean lock,
    +            boolean cache, boolean enableQueryCache) {
    +        // TODO Auto-generated method stub
    +        return null;
    +    }
    +
    +    @Override
    +    public <M> List<M> customSearchIncludingRemoved(SearchCriteria<M> sc,
    +            Filter filter) {
    +        // TODO Auto-generated method stub
    +        return null;
    +    }
    +
    +    @Override
    +    public List<UsageEventVO> listAllIncludingRemoved() {
    +        // TODO Auto-generated method stub
    +        return null;
    +    }
    +
    +    @Override
    +    public List<UsageEventVO> listAllIncludingRemoved(Filter filter) {
    +        // TODO Auto-generated method stub
    +        return null;
    +    }
    +
    +    @Override
    +    public UsageEventVO persist(UsageEventVO entity) {
    +        persistedItems.add(entity);
    +        return entity;
    +    }
    +
    +    @Override
    +    public boolean remove(Long id) {
    +        // TODO Auto-generated method stub
    +        return false;
    +    }
    +
    +    @Override
    +    public int remove(SearchCriteria<UsageEventVO> sc) {
    +        // TODO Auto-generated method stub
    +        return 0;
    +    }
    +
    +    @Override
    +    public boolean expunge(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 infrastructure@apache.org or file a JIRA ticket
with INFRA.
---

[GitHub] cloudstack issue #1624: Fixes regarding VOLUME_DELETE events resulting from ...

Posted by ProjectMoon <gi...@git.apache.org>.
Github user ProjectMoon commented on the issue:

    https://github.com/apache/cloudstack/pull/1624
  
    This branch has been rebased to latest 4.8.


---
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 infrastructure@apache.org or file a JIRA ticket
with INFRA.
---

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

Posted by jburwell <gi...@git.apache.org>.
Github user jburwell commented on a diff in the pull request:

    https://github.com/apache/cloudstack/pull/1624#discussion_r74314666
  
    --- 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<UsageEventVO> persistedItems;
    +
    +    public MockUsageEventDao() {
    +        persistedItems = new ArrayList<UsageEventVO>();
    +    }
    +
    +    @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<UsageEventVO> createSearchBuilder() {
    +        // TODO Auto-generated method stub
    +        return null;
    +    }
    +
    +    @Override
    +    public <K> GenericSearchBuilder<UsageEventVO, K> createSearchBuilder(
    +            Class<K> clazz) {
    +        // TODO Auto-generated method stub
    +        return null;
    +    }
    +
    +    @Override
    +    public UsageEventVO createForUpdate(Long id) {
    +        // TODO Auto-generated method stub
    +        return null;
    +    }
    +
    +    @Override
    +    public SearchCriteria<UsageEventVO> createSearchCriteria() {
    +        // TODO Auto-generated method stub
    +        return null;
    +    }
    +
    +    @Override
    +    public List<UsageEventVO> lockRows(SearchCriteria<UsageEventVO> sc,
    +            Filter filter, boolean exclusive) {
    +        // TODO Auto-generated method stub
    +        return null;
    +    }
    +
    +    @Override
    +    public UsageEventVO lockOneRandomRow(SearchCriteria<UsageEventVO> 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<UsageEventVO> sc) {
    +        // TODO Auto-generated method stub
    +        return 0;
    +    }
    +
    +    @Override
    +    public List<UsageEventVO> listAll() {
    +
    +        return persistedItems;
    +    }
    +
    +    @Override
    +    public List<UsageEventVO> listAll(Filter filter) {
    +        // TODO Auto-generated method stub
    +        return null;
    +    }
    +
    +    @Override
    +    public List<UsageEventVO> search(SearchCriteria<UsageEventVO> sc,
    +            Filter filter) {
    +        // TODO Auto-generated method stub
    +        return null;
    +    }
    +
    +    @Override
    +    public List<UsageEventVO> search(SearchCriteria<UsageEventVO> sc,
    +            Filter filter, boolean enableQueryCache) {
    +        // TODO Auto-generated method stub
    +        return null;
    +    }
    +
    +    @Override
    +    public List<UsageEventVO> searchIncludingRemoved(
    +            SearchCriteria<UsageEventVO> sc, Filter filter, Boolean lock,
    +            boolean cache) {
    +        // TODO Auto-generated method stub
    +        return null;
    +    }
    +
    +    @Override
    +    public List<UsageEventVO> searchIncludingRemoved(
    +            SearchCriteria<UsageEventVO> sc, Filter filter, Boolean lock,
    +            boolean cache, boolean enableQueryCache) {
    +        // TODO Auto-generated method stub
    +        return null;
    +    }
    +
    +    @Override
    +    public <M> List<M> customSearchIncludingRemoved(SearchCriteria<M> sc,
    +            Filter filter) {
    +        // TODO Auto-generated method stub
    +        return null;
    +    }
    +
    +    @Override
    +    public List<UsageEventVO> listAllIncludingRemoved() {
    +        // TODO Auto-generated method stub
    +        return null;
    +    }
    +
    +    @Override
    +    public List<UsageEventVO> listAllIncludingRemoved(Filter filter) {
    +        // TODO Auto-generated method stub
    +        return null;
    +    }
    +
    +    @Override
    +    public UsageEventVO persist(UsageEventVO entity) {
    +        persistedItems.add(entity);
    +        return entity;
    +    }
    +
    +    @Override
    +    public boolean remove(Long id) {
    +        // TODO Auto-generated method stub
    +        return false;
    +    }
    +
    +    @Override
    +    public int remove(SearchCriteria<UsageEventVO> sc) {
    +        // TODO Auto-generated method stub
    +        return 0;
    +    }
    +
    +    @Override
    +    public boolean expunge(Long id) {
    +        // TODO Auto-generated method stub
    +        return false;
    +    }
    +
    +    @Override
    +    public int expunge(SearchCriteria<UsageEventVO> sc) {
    +        // TODO Auto-generated method stub
    +        return 0;
    +    }
    +
    +    @Override
    +    public void expunge() {
    +        // TODO Auto-generated method stub
    +
    +    }
    +
    +    @Override
    +    public <K> K getNextInSequence(Class<K> clazz, String name) {
    +        // TODO Auto-generated method stub
    +        return null;
    +    }
    +
    +    @Override
    +    public boolean configure(String name, Map<String, Object> params)
    +            throws ConfigurationException {
    +        // TODO Auto-generated method stub
    +        return false;
    +    }
    +
    +    @Override
    +    public <M> List<M> customSearch(SearchCriteria<M> sc, Filter filter) {
    +        // TODO Auto-generated method stub
    +        return null;
    +    }
    +
    +    @Override
    +    public boolean lockInLockTable(String id) {
    +        // TODO Auto-generated method stub
    +        return false;
    +    }
    +
    +    @Override
    +    public boolean lockInLockTable(String id, int seconds) {
    +        // TODO Auto-generated method stub
    +        return false;
    +    }
    +
    +    @Override
    +    public boolean unlockFromLockTable(String id) {
    +        // TODO Auto-generated method stub
    +        return false;
    +    }
    +
    +    @Override
    +    public <K> K getRandomlyIncreasingNextInSequence(Class<K> clazz, String name) {
    +        // TODO Auto-generated method stub
    +        return null;
    +    }
    +
    +    @Override
    +    public UsageEventVO findOneBy(SearchCriteria<UsageEventVO> sc) {
    +        // TODO Auto-generated method stub
    +        return null;
    +    }
    +
    +    @Override
    +    public Class<UsageEventVO> getEntityBeanType() {
    +        // TODO Auto-generated method stub
    +        return null;
    +    }
    +
    +    @Override
    +    public Pair<List<UsageEventVO>, Integer> searchAndCount(
    +            SearchCriteria<UsageEventVO> sc, Filter filter) {
    +        // 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 infrastructure@apache.org or file a JIRA ticket
with INFRA.
---

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

Posted by jburwell <gi...@git.apache.org>.
Github user jburwell commented on a diff in the pull request:

    https://github.com/apache/cloudstack/pull/1624#discussion_r74314326
  
    --- 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<UsageEventVO> persistedItems;
    +
    +    public MockUsageEventDao() {
    +        persistedItems = new ArrayList<UsageEventVO>();
    +    }
    +
    +    @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<UsageEventVO> createSearchBuilder() {
    +        // TODO Auto-generated method stub
    +        return null;
    +    }
    +
    +    @Override
    +    public <K> GenericSearchBuilder<UsageEventVO, K> createSearchBuilder(
    +            Class<K> clazz) {
    +        // TODO Auto-generated method stub
    +        return null;
    +    }
    +
    +    @Override
    +    public UsageEventVO createForUpdate(Long id) {
    +        // TODO Auto-generated method stub
    +        return null;
    +    }
    +
    +    @Override
    +    public SearchCriteria<UsageEventVO> createSearchCriteria() {
    +        // TODO Auto-generated method stub
    +        return null;
    +    }
    +
    +    @Override
    +    public List<UsageEventVO> lockRows(SearchCriteria<UsageEventVO> sc,
    +            Filter filter, boolean exclusive) {
    +        // TODO Auto-generated method stub
    +        return null;
    +    }
    +
    +    @Override
    +    public UsageEventVO lockOneRandomRow(SearchCriteria<UsageEventVO> 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<UsageEventVO> sc) {
    +        // TODO Auto-generated method stub
    +        return 0;
    +    }
    +
    +    @Override
    +    public List<UsageEventVO> listAll() {
    +
    +        return persistedItems;
    +    }
    +
    +    @Override
    +    public List<UsageEventVO> listAll(Filter filter) {
    +        // TODO Auto-generated method stub
    +        return null;
    +    }
    +
    +    @Override
    +    public List<UsageEventVO> search(SearchCriteria<UsageEventVO> sc,
    +            Filter filter) {
    +        // 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 infrastructure@apache.org or file a JIRA ticket
with INFRA.
---

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

Posted by jburwell <gi...@git.apache.org>.
Github user jburwell commented on a diff in the pull request:

    https://github.com/apache/cloudstack/pull/1624#discussion_r74314681
  
    --- 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<UsageEventVO> persistedItems;
    +
    +    public MockUsageEventDao() {
    +        persistedItems = new ArrayList<UsageEventVO>();
    +    }
    +
    +    @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<UsageEventVO> createSearchBuilder() {
    +        // TODO Auto-generated method stub
    +        return null;
    +    }
    +
    +    @Override
    +    public <K> GenericSearchBuilder<UsageEventVO, K> createSearchBuilder(
    +            Class<K> clazz) {
    +        // TODO Auto-generated method stub
    +        return null;
    +    }
    +
    +    @Override
    +    public UsageEventVO createForUpdate(Long id) {
    +        // TODO Auto-generated method stub
    +        return null;
    +    }
    +
    +    @Override
    +    public SearchCriteria<UsageEventVO> createSearchCriteria() {
    +        // TODO Auto-generated method stub
    +        return null;
    +    }
    +
    +    @Override
    +    public List<UsageEventVO> lockRows(SearchCriteria<UsageEventVO> sc,
    +            Filter filter, boolean exclusive) {
    +        // TODO Auto-generated method stub
    +        return null;
    +    }
    +
    +    @Override
    +    public UsageEventVO lockOneRandomRow(SearchCriteria<UsageEventVO> 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<UsageEventVO> sc) {
    +        // TODO Auto-generated method stub
    +        return 0;
    +    }
    +
    +    @Override
    +    public List<UsageEventVO> listAll() {
    +
    +        return persistedItems;
    +    }
    +
    +    @Override
    +    public List<UsageEventVO> listAll(Filter filter) {
    +        // TODO Auto-generated method stub
    +        return null;
    +    }
    +
    +    @Override
    +    public List<UsageEventVO> search(SearchCriteria<UsageEventVO> sc,
    +            Filter filter) {
    +        // TODO Auto-generated method stub
    +        return null;
    +    }
    +
    +    @Override
    +    public List<UsageEventVO> search(SearchCriteria<UsageEventVO> sc,
    +            Filter filter, boolean enableQueryCache) {
    +        // TODO Auto-generated method stub
    +        return null;
    +    }
    +
    +    @Override
    +    public List<UsageEventVO> searchIncludingRemoved(
    +            SearchCriteria<UsageEventVO> sc, Filter filter, Boolean lock,
    +            boolean cache) {
    +        // TODO Auto-generated method stub
    +        return null;
    +    }
    +
    +    @Override
    +    public List<UsageEventVO> searchIncludingRemoved(
    +            SearchCriteria<UsageEventVO> sc, Filter filter, Boolean lock,
    +            boolean cache, boolean enableQueryCache) {
    +        // TODO Auto-generated method stub
    +        return null;
    +    }
    +
    +    @Override
    +    public <M> List<M> customSearchIncludingRemoved(SearchCriteria<M> sc,
    +            Filter filter) {
    +        // TODO Auto-generated method stub
    +        return null;
    +    }
    +
    +    @Override
    +    public List<UsageEventVO> listAllIncludingRemoved() {
    +        // TODO Auto-generated method stub
    +        return null;
    +    }
    +
    +    @Override
    +    public List<UsageEventVO> listAllIncludingRemoved(Filter filter) {
    +        // TODO Auto-generated method stub
    +        return null;
    +    }
    +
    +    @Override
    +    public UsageEventVO persist(UsageEventVO entity) {
    +        persistedItems.add(entity);
    +        return entity;
    +    }
    +
    +    @Override
    +    public boolean remove(Long id) {
    +        // TODO Auto-generated method stub
    +        return false;
    +    }
    +
    +    @Override
    +    public int remove(SearchCriteria<UsageEventVO> sc) {
    +        // TODO Auto-generated method stub
    +        return 0;
    +    }
    +
    +    @Override
    +    public boolean expunge(Long id) {
    +        // TODO Auto-generated method stub
    +        return false;
    +    }
    +
    +    @Override
    +    public int expunge(SearchCriteria<UsageEventVO> sc) {
    +        // TODO Auto-generated method stub
    +        return 0;
    +    }
    +
    +    @Override
    +    public void expunge() {
    +        // TODO Auto-generated method stub
    +
    +    }
    +
    +    @Override
    +    public <K> K getNextInSequence(Class<K> clazz, String name) {
    +        // TODO Auto-generated method stub
    +        return null;
    +    }
    +
    +    @Override
    +    public boolean configure(String name, Map<String, Object> params)
    +            throws ConfigurationException {
    +        // TODO Auto-generated method stub
    +        return false;
    +    }
    +
    +    @Override
    +    public <M> List<M> customSearch(SearchCriteria<M> sc, Filter filter) {
    +        // TODO Auto-generated method stub
    +        return null;
    +    }
    +
    +    @Override
    +    public boolean lockInLockTable(String id) {
    +        // TODO Auto-generated method stub
    +        return false;
    +    }
    +
    +    @Override
    +    public boolean lockInLockTable(String id, int seconds) {
    +        // TODO Auto-generated method stub
    +        return false;
    +    }
    +
    +    @Override
    +    public boolean unlockFromLockTable(String id) {
    +        // TODO Auto-generated method stub
    +        return false;
    +    }
    +
    +    @Override
    +    public <K> K getRandomlyIncreasingNextInSequence(Class<K> clazz, String name) {
    +        // TODO Auto-generated method stub
    +        return null;
    +    }
    +
    +    @Override
    +    public UsageEventVO findOneBy(SearchCriteria<UsageEventVO> sc) {
    +        // TODO Auto-generated method stub
    +        return null;
    +    }
    +
    +    @Override
    +    public Class<UsageEventVO> getEntityBeanType() {
    +        // 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 infrastructure@apache.org or file a JIRA ticket
with INFRA.
---

[GitHub] cloudstack issue #1624: Fixes regarding VOLUME_DELETE events resulting from ...

Posted by ProjectMoon <gi...@git.apache.org>.
Github user ProjectMoon commented on the issue:

    https://github.com/apache/cloudstack/pull/1624
  
    Have rebased to latest 4.8. Travis build failed with what looks like `Unable to execute /home/travis/build/apache/cloudstack/developer/target/db/templates.simulator.sql: Unknown column 'state' in 'field list'`. Don't think it's related to this. Will see what happens with the latest 4.8 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 infrastructure@apache.org or file a JIRA ticket
with INFRA.
---

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

Posted by jburwell <gi...@git.apache.org>.
Github user jburwell commented on a diff in the pull request:

    https://github.com/apache/cloudstack/pull/1624#discussion_r74314633
  
    --- 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<UsageEventVO> persistedItems;
    +
    +    public MockUsageEventDao() {
    +        persistedItems = new ArrayList<UsageEventVO>();
    +    }
    +
    +    @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<UsageEventVO> createSearchBuilder() {
    +        // TODO Auto-generated method stub
    +        return null;
    +    }
    +
    +    @Override
    +    public <K> GenericSearchBuilder<UsageEventVO, K> createSearchBuilder(
    +            Class<K> clazz) {
    +        // TODO Auto-generated method stub
    +        return null;
    +    }
    +
    +    @Override
    +    public UsageEventVO createForUpdate(Long id) {
    +        // TODO Auto-generated method stub
    +        return null;
    +    }
    +
    +    @Override
    +    public SearchCriteria<UsageEventVO> createSearchCriteria() {
    +        // TODO Auto-generated method stub
    +        return null;
    +    }
    +
    +    @Override
    +    public List<UsageEventVO> lockRows(SearchCriteria<UsageEventVO> sc,
    +            Filter filter, boolean exclusive) {
    +        // TODO Auto-generated method stub
    +        return null;
    +    }
    +
    +    @Override
    +    public UsageEventVO lockOneRandomRow(SearchCriteria<UsageEventVO> 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<UsageEventVO> sc) {
    +        // TODO Auto-generated method stub
    +        return 0;
    +    }
    +
    +    @Override
    +    public List<UsageEventVO> listAll() {
    +
    +        return persistedItems;
    +    }
    +
    +    @Override
    +    public List<UsageEventVO> listAll(Filter filter) {
    +        // TODO Auto-generated method stub
    +        return null;
    +    }
    +
    +    @Override
    +    public List<UsageEventVO> search(SearchCriteria<UsageEventVO> sc,
    +            Filter filter) {
    +        // TODO Auto-generated method stub
    +        return null;
    +    }
    +
    +    @Override
    +    public List<UsageEventVO> search(SearchCriteria<UsageEventVO> sc,
    +            Filter filter, boolean enableQueryCache) {
    +        // TODO Auto-generated method stub
    +        return null;
    +    }
    +
    +    @Override
    +    public List<UsageEventVO> searchIncludingRemoved(
    +            SearchCriteria<UsageEventVO> sc, Filter filter, Boolean lock,
    +            boolean cache) {
    +        // TODO Auto-generated method stub
    +        return null;
    +    }
    +
    +    @Override
    +    public List<UsageEventVO> searchIncludingRemoved(
    +            SearchCriteria<UsageEventVO> sc, Filter filter, Boolean lock,
    +            boolean cache, boolean enableQueryCache) {
    +        // TODO Auto-generated method stub
    +        return null;
    +    }
    +
    +    @Override
    +    public <M> List<M> customSearchIncludingRemoved(SearchCriteria<M> sc,
    +            Filter filter) {
    +        // TODO Auto-generated method stub
    +        return null;
    +    }
    +
    +    @Override
    +    public List<UsageEventVO> listAllIncludingRemoved() {
    +        // TODO Auto-generated method stub
    +        return null;
    +    }
    +
    +    @Override
    +    public List<UsageEventVO> listAllIncludingRemoved(Filter filter) {
    +        // TODO Auto-generated method stub
    +        return null;
    +    }
    +
    +    @Override
    +    public UsageEventVO persist(UsageEventVO entity) {
    +        persistedItems.add(entity);
    +        return entity;
    +    }
    +
    +    @Override
    +    public boolean remove(Long id) {
    +        // TODO Auto-generated method stub
    +        return false;
    +    }
    +
    +    @Override
    +    public int remove(SearchCriteria<UsageEventVO> sc) {
    +        // TODO Auto-generated method stub
    +        return 0;
    +    }
    +
    +    @Override
    +    public boolean expunge(Long id) {
    +        // TODO Auto-generated method stub
    +        return false;
    +    }
    +
    +    @Override
    +    public int expunge(SearchCriteria<UsageEventVO> sc) {
    +        // TODO Auto-generated method stub
    +        return 0;
    +    }
    +
    +    @Override
    +    public void expunge() {
    +        // TODO Auto-generated method stub
    +
    +    }
    +
    +    @Override
    +    public <K> K getNextInSequence(Class<K> clazz, String name) {
    +        // TODO Auto-generated method stub
    +        return null;
    +    }
    +
    +    @Override
    +    public boolean configure(String name, Map<String, Object> params)
    +            throws ConfigurationException {
    +        // TODO Auto-generated method stub
    +        return false;
    +    }
    +
    +    @Override
    +    public <M> List<M> customSearch(SearchCriteria<M> sc, Filter filter) {
    +        // TODO Auto-generated method stub
    +        return null;
    +    }
    +
    +    @Override
    +    public boolean lockInLockTable(String id) {
    +        // TODO Auto-generated method stub
    +        return false;
    +    }
    +
    +    @Override
    +    public boolean lockInLockTable(String id, int seconds) {
    +        // TODO Auto-generated method stub
    +        return false;
    +    }
    +
    +    @Override
    +    public boolean unlockFromLockTable(String id) {
    +        // TODO Auto-generated method stub
    +        return false;
    +    }
    +
    +    @Override
    +    public <K> K getRandomlyIncreasingNextInSequence(Class<K> clazz, String name) {
    +        // TODO Auto-generated method stub
    +        return null;
    +    }
    +
    +    @Override
    +    public UsageEventVO findOneBy(SearchCriteria<UsageEventVO> sc) {
    +        // TODO Auto-generated method stub
    +        return null;
    +    }
    +
    +    @Override
    +    public Class<UsageEventVO> getEntityBeanType() {
    +        // TODO Auto-generated method stub
    +        return null;
    +    }
    +
    +    @Override
    +    public Pair<List<UsageEventVO>, Integer> searchAndCount(
    +            SearchCriteria<UsageEventVO> sc, Filter filter) {
    +        // TODO Auto-generated method stub
    +        return null;
    +    }
    +
    +    @Override
    +    public Pair<List<UsageEventVO>, Integer> searchAndDistinctCount(SearchCriteria<UsageEventVO> sc, Filter filter) {
    +        //TODO Auto-generated method stub
    +        return null;
    +    }
    +
    +    @Override
    +    public Map<String, Attribute> getAllAttributes() {
    +        // TODO Auto-generated method stub
    +        return null;
    +    }
    +
    +    @Override
    +    public List<UsageEventVO> listLatestEvents(Date endDate) {
    +        // 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 infrastructure@apache.org or file a JIRA ticket
with INFRA.
---

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

Posted by jburwell <gi...@git.apache.org>.
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<UsageEventVO> persistedItems;
    +
    +    public MockUsageEventDao() {
    +        persistedItems = new ArrayList<UsageEventVO>();
    +    }
    +
    +    @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<UsageEventVO> createSearchBuilder() {
    +        // TODO Auto-generated method stub
    +        return null;
    +    }
    +
    +    @Override
    +    public <K> GenericSearchBuilder<UsageEventVO, K> createSearchBuilder(
    +            Class<K> clazz) {
    +        // TODO Auto-generated method stub
    +        return null;
    +    }
    +
    +    @Override
    +    public UsageEventVO createForUpdate(Long id) {
    +        // TODO Auto-generated method stub
    +        return null;
    +    }
    +
    +    @Override
    +    public SearchCriteria<UsageEventVO> createSearchCriteria() {
    +        // TODO Auto-generated method stub
    +        return null;
    +    }
    +
    +    @Override
    +    public List<UsageEventVO> lockRows(SearchCriteria<UsageEventVO> 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 infrastructure@apache.org or file a JIRA ticket
with INFRA.
---

[GitHub] cloudstack issue #1624: Fixes regarding VOLUME_DELETE events resulting from ...

Posted by jburwell <gi...@git.apache.org>.
Github user jburwell commented on the issue:

    https://github.com/apache/cloudstack/pull/1624
  
    @ProjectMoon we have a code review LGTM on #1654, and have someone lined up to test it and provide the second LGTM.  We should have the second LGTM by 1 Sept 2016 at which time you can re-kick this PR.


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

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

Posted by jburwell <gi...@git.apache.org>.
Github user jburwell commented on a diff in the pull request:

    https://github.com/apache/cloudstack/pull/1624#discussion_r74314335
  
    --- 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<UsageEventVO> persistedItems;
    +
    +    public MockUsageEventDao() {
    +        persistedItems = new ArrayList<UsageEventVO>();
    +    }
    +
    +    @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<UsageEventVO> createSearchBuilder() {
    +        // TODO Auto-generated method stub
    +        return null;
    +    }
    +
    +    @Override
    +    public <K> GenericSearchBuilder<UsageEventVO, K> createSearchBuilder(
    +            Class<K> clazz) {
    +        // TODO Auto-generated method stub
    +        return null;
    +    }
    +
    +    @Override
    +    public UsageEventVO createForUpdate(Long id) {
    +        // TODO Auto-generated method stub
    +        return null;
    +    }
    +
    +    @Override
    +    public SearchCriteria<UsageEventVO> createSearchCriteria() {
    +        // TODO Auto-generated method stub
    +        return null;
    +    }
    +
    +    @Override
    +    public List<UsageEventVO> lockRows(SearchCriteria<UsageEventVO> sc,
    +            Filter filter, boolean exclusive) {
    +        // TODO Auto-generated method stub
    +        return null;
    +    }
    +
    +    @Override
    +    public UsageEventVO lockOneRandomRow(SearchCriteria<UsageEventVO> 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<UsageEventVO> sc) {
    +        // TODO Auto-generated method stub
    +        return 0;
    +    }
    +
    +    @Override
    +    public List<UsageEventVO> listAll() {
    +
    +        return persistedItems;
    +    }
    +
    +    @Override
    +    public List<UsageEventVO> listAll(Filter filter) {
    +        // TODO Auto-generated method stub
    +        return null;
    +    }
    +
    +    @Override
    +    public List<UsageEventVO> search(SearchCriteria<UsageEventVO> sc,
    +            Filter filter) {
    +        // TODO Auto-generated method stub
    +        return null;
    +    }
    +
    +    @Override
    +    public List<UsageEventVO> search(SearchCriteria<UsageEventVO> sc,
    +            Filter filter, boolean enableQueryCache) {
    +        // 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 infrastructure@apache.org or file a JIRA ticket
with INFRA.
---

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

Posted by jburwell <gi...@git.apache.org>.
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<UsageEventVO> persistedItems;
    +
    +    public MockUsageEventDao() {
    +        persistedItems = new ArrayList<UsageEventVO>();
    +    }
    +
    +    @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<UsageEventVO> createSearchBuilder() {
    +        // TODO Auto-generated method stub
    +        return null;
    +    }
    +
    +    @Override
    +    public <K> GenericSearchBuilder<UsageEventVO, K> createSearchBuilder(
    +            Class<K> 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 infrastructure@apache.org or file a JIRA ticket
with INFRA.
---

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

Posted by rhtyd <gi...@git.apache.org>.
Github user rhtyd commented on a diff in the pull request:

    https://github.com/apache/cloudstack/pull/1624#discussion_r77326112
  
    --- Diff: server/src/com/cloud/user/AccountManagerImpl.java ---
    @@ -761,6 +774,17 @@ protected boolean cleanupAccount(AccountVO account, long callerUserId, Account c
                         s_logger.error("Unable to expunge vm: " + vm.getId());
                         accountCleanupNeeded = true;
                     }
    +                else if (!vm.getState().equals(VirtualMachine.State.Destroyed)) {
    +                    // We have to emit the event here because the state listener is ignoring root volume deletions,
    +                    // assuming that the UserVMManager is responsible for emitting the usage event for them when
    --- End diff --
    
    Why not fix the state listener, or the manager that is responsible for emitting the event in the first place?


---
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 infrastructure@apache.org or file a JIRA ticket
with INFRA.
---

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

Posted by jburwell <gi...@git.apache.org>.
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<UsageEventVO> persistedItems;
    +
    +    public MockUsageEventDao() {
    +        persistedItems = new ArrayList<UsageEventVO>();
    +    }
    +
    +    @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<UsageEventVO> createSearchBuilder() {
    +        // TODO Auto-generated method stub
    +        return null;
    +    }
    +
    +    @Override
    +    public <K> GenericSearchBuilder<UsageEventVO, K> createSearchBuilder(
    +            Class<K> clazz) {
    +        // TODO Auto-generated method stub
    +        return null;
    +    }
    +
    +    @Override
    +    public UsageEventVO createForUpdate(Long id) {
    +        // TODO Auto-generated method stub
    +        return null;
    +    }
    +
    +    @Override
    +    public SearchCriteria<UsageEventVO> createSearchCriteria() {
    +        // TODO Auto-generated method stub
    +        return null;
    +    }
    +
    +    @Override
    +    public List<UsageEventVO> lockRows(SearchCriteria<UsageEventVO> sc,
    +            Filter filter, boolean exclusive) {
    +        // TODO Auto-generated method stub
    +        return null;
    +    }
    +
    +    @Override
    +    public UsageEventVO lockOneRandomRow(SearchCriteria<UsageEventVO> 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 infrastructure@apache.org or file a JIRA ticket
with INFRA.
---

[GitHub] cloudstack issue #1624: Fixes regarding VOLUME_DELETE events resulting from ...

Posted by rhtyd <gi...@git.apache.org>.
Github user rhtyd commented on the issue:

    https://github.com/apache/cloudstack/pull/1624
  
    @ProjectMoon please rebase now, PR 1654 has been merged now. DB upgrades should not cause errors.


---
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 infrastructure@apache.org or file a JIRA ticket
with INFRA.
---

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

Posted by jburwell <gi...@git.apache.org>.
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<UsageEventVO> persistedItems;
    +
    +    public MockUsageEventDao() {
    +        persistedItems = new ArrayList<UsageEventVO>();
    +    }
    +
    +    @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 infrastructure@apache.org or file a JIRA ticket
with INFRA.
---

[GitHub] cloudstack issue #1624: Fixes regarding VOLUME_DELETE events resulting from ...

Posted by jburwell <gi...@git.apache.org>.
Github user jburwell commented on the issue:

    https://github.com/apache/cloudstack/pull/1624
  
    LGTM for code review.  Do we have someone testing for the second 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 infrastructure@apache.org or file a JIRA ticket
with INFRA.
---

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

Posted by jburwell <gi...@git.apache.org>.
Github user jburwell commented on a diff in the pull request:

    https://github.com/apache/cloudstack/pull/1624#discussion_r74314414
  
    --- 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<UsageEventVO> persistedItems;
    +
    +    public MockUsageEventDao() {
    +        persistedItems = new ArrayList<UsageEventVO>();
    +    }
    +
    +    @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<UsageEventVO> createSearchBuilder() {
    +        // TODO Auto-generated method stub
    +        return null;
    +    }
    +
    +    @Override
    +    public <K> GenericSearchBuilder<UsageEventVO, K> createSearchBuilder(
    +            Class<K> clazz) {
    +        // TODO Auto-generated method stub
    +        return null;
    +    }
    +
    +    @Override
    +    public UsageEventVO createForUpdate(Long id) {
    +        // TODO Auto-generated method stub
    +        return null;
    +    }
    +
    +    @Override
    +    public SearchCriteria<UsageEventVO> createSearchCriteria() {
    +        // TODO Auto-generated method stub
    +        return null;
    +    }
    +
    +    @Override
    +    public List<UsageEventVO> lockRows(SearchCriteria<UsageEventVO> sc,
    +            Filter filter, boolean exclusive) {
    +        // TODO Auto-generated method stub
    +        return null;
    +    }
    +
    +    @Override
    +    public UsageEventVO lockOneRandomRow(SearchCriteria<UsageEventVO> 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<UsageEventVO> sc) {
    +        // TODO Auto-generated method stub
    +        return 0;
    +    }
    +
    +    @Override
    +    public List<UsageEventVO> listAll() {
    +
    +        return persistedItems;
    +    }
    +
    +    @Override
    +    public List<UsageEventVO> listAll(Filter filter) {
    +        // TODO Auto-generated method stub
    +        return null;
    +    }
    +
    +    @Override
    +    public List<UsageEventVO> search(SearchCriteria<UsageEventVO> sc,
    +            Filter filter) {
    +        // TODO Auto-generated method stub
    +        return null;
    +    }
    +
    +    @Override
    +    public List<UsageEventVO> search(SearchCriteria<UsageEventVO> sc,
    +            Filter filter, boolean enableQueryCache) {
    +        // TODO Auto-generated method stub
    +        return null;
    +    }
    +
    +    @Override
    +    public List<UsageEventVO> searchIncludingRemoved(
    +            SearchCriteria<UsageEventVO> sc, Filter filter, Boolean lock,
    +            boolean cache) {
    +        // TODO Auto-generated method stub
    +        return null;
    +    }
    +
    +    @Override
    +    public List<UsageEventVO> searchIncludingRemoved(
    +            SearchCriteria<UsageEventVO> sc, Filter filter, Boolean lock,
    +            boolean cache, boolean enableQueryCache) {
    +        // TODO Auto-generated method stub
    +        return null;
    +    }
    +
    +    @Override
    +    public <M> List<M> customSearchIncludingRemoved(SearchCriteria<M> sc,
    +            Filter filter) {
    +        // TODO Auto-generated method stub
    +        return null;
    +    }
    +
    +    @Override
    +    public List<UsageEventVO> listAllIncludingRemoved() {
    +        // TODO Auto-generated method stub
    +        return null;
    +    }
    +
    +    @Override
    +    public List<UsageEventVO> listAllIncludingRemoved(Filter filter) {
    +        // TODO Auto-generated method stub
    +        return null;
    +    }
    +
    +    @Override
    +    public UsageEventVO persist(UsageEventVO entity) {
    +        persistedItems.add(entity);
    +        return entity;
    +    }
    +
    +    @Override
    +    public boolean remove(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 infrastructure@apache.org or file a JIRA ticket
with INFRA.
---

[GitHub] cloudstack issue #1624: Fixes regarding VOLUME_DELETE events resulting from ...

Posted by ProjectMoon <gi...@git.apache.org>.
Github user ProjectMoon commented on the issue:

    https://github.com/apache/cloudstack/pull/1624
  
    We can have someone test it. Are you looking for results of a manual test, reproduction tests, or something automated? A manual test is probably the best from our side because we don't really have the time to write any unit/integration tests at the moment beyond what already exists in this PR.


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

[GitHub] cloudstack issue #1624: Fixes regarding VOLUME_DELETE events resulting from ...

Posted by ProjectMoon <gi...@git.apache.org>.
Github user ProjectMoon commented on the issue:

    https://github.com/apache/cloudstack/pull/1624
  
    The pull request has been rebased.


---
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 infrastructure@apache.org or file a JIRA ticket
with INFRA.
---

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

Posted by jburwell <gi...@git.apache.org>.
Github user jburwell commented on a diff in the pull request:

    https://github.com/apache/cloudstack/pull/1624#discussion_r74314591
  
    --- 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<UsageEventVO> persistedItems;
    +
    +    public MockUsageEventDao() {
    +        persistedItems = new ArrayList<UsageEventVO>();
    +    }
    +
    +    @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<UsageEventVO> createSearchBuilder() {
    +        // TODO Auto-generated method stub
    +        return null;
    +    }
    +
    +    @Override
    +    public <K> GenericSearchBuilder<UsageEventVO, K> createSearchBuilder(
    +            Class<K> clazz) {
    +        // TODO Auto-generated method stub
    +        return null;
    +    }
    +
    +    @Override
    +    public UsageEventVO createForUpdate(Long id) {
    +        // TODO Auto-generated method stub
    +        return null;
    +    }
    +
    +    @Override
    +    public SearchCriteria<UsageEventVO> createSearchCriteria() {
    +        // TODO Auto-generated method stub
    +        return null;
    +    }
    +
    +    @Override
    +    public List<UsageEventVO> lockRows(SearchCriteria<UsageEventVO> sc,
    +            Filter filter, boolean exclusive) {
    +        // TODO Auto-generated method stub
    +        return null;
    +    }
    +
    +    @Override
    +    public UsageEventVO lockOneRandomRow(SearchCriteria<UsageEventVO> 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<UsageEventVO> sc) {
    +        // TODO Auto-generated method stub
    +        return 0;
    +    }
    +
    +    @Override
    +    public List<UsageEventVO> listAll() {
    +
    +        return persistedItems;
    +    }
    +
    +    @Override
    +    public List<UsageEventVO> listAll(Filter filter) {
    +        // TODO Auto-generated method stub
    +        return null;
    +    }
    +
    +    @Override
    +    public List<UsageEventVO> search(SearchCriteria<UsageEventVO> sc,
    +            Filter filter) {
    +        // TODO Auto-generated method stub
    +        return null;
    +    }
    +
    +    @Override
    +    public List<UsageEventVO> search(SearchCriteria<UsageEventVO> sc,
    +            Filter filter, boolean enableQueryCache) {
    +        // TODO Auto-generated method stub
    +        return null;
    +    }
    +
    +    @Override
    +    public List<UsageEventVO> searchIncludingRemoved(
    +            SearchCriteria<UsageEventVO> sc, Filter filter, Boolean lock,
    +            boolean cache) {
    +        // TODO Auto-generated method stub
    +        return null;
    +    }
    +
    +    @Override
    +    public List<UsageEventVO> searchIncludingRemoved(
    +            SearchCriteria<UsageEventVO> sc, Filter filter, Boolean lock,
    +            boolean cache, boolean enableQueryCache) {
    +        // TODO Auto-generated method stub
    +        return null;
    +    }
    +
    +    @Override
    +    public <M> List<M> customSearchIncludingRemoved(SearchCriteria<M> sc,
    +            Filter filter) {
    +        // TODO Auto-generated method stub
    +        return null;
    +    }
    +
    +    @Override
    +    public List<UsageEventVO> listAllIncludingRemoved() {
    +        // TODO Auto-generated method stub
    +        return null;
    +    }
    +
    +    @Override
    +    public List<UsageEventVO> listAllIncludingRemoved(Filter filter) {
    +        // TODO Auto-generated method stub
    +        return null;
    +    }
    +
    +    @Override
    +    public UsageEventVO persist(UsageEventVO entity) {
    +        persistedItems.add(entity);
    +        return entity;
    +    }
    +
    +    @Override
    +    public boolean remove(Long id) {
    +        // TODO Auto-generated method stub
    +        return false;
    +    }
    +
    +    @Override
    +    public int remove(SearchCriteria<UsageEventVO> sc) {
    +        // TODO Auto-generated method stub
    +        return 0;
    +    }
    +
    +    @Override
    +    public boolean expunge(Long id) {
    +        // TODO Auto-generated method stub
    +        return false;
    +    }
    +
    +    @Override
    +    public int expunge(SearchCriteria<UsageEventVO> sc) {
    +        // TODO Auto-generated method stub
    +        return 0;
    +    }
    +
    +    @Override
    +    public void expunge() {
    +        // TODO Auto-generated method stub
    +
    +    }
    +
    +    @Override
    +    public <K> K getNextInSequence(Class<K> clazz, String name) {
    +        // TODO Auto-generated method stub
    +        return null;
    +    }
    +
    +    @Override
    +    public boolean configure(String name, Map<String, Object> params)
    +            throws ConfigurationException {
    +        // TODO Auto-generated method stub
    +        return false;
    +    }
    +
    +    @Override
    +    public <M> List<M> customSearch(SearchCriteria<M> sc, Filter filter) {
    +        // TODO Auto-generated method stub
    +        return null;
    +    }
    +
    +    @Override
    +    public boolean lockInLockTable(String id) {
    +        // TODO Auto-generated method stub
    +        return false;
    +    }
    +
    +    @Override
    +    public boolean lockInLockTable(String id, int seconds) {
    +        // TODO Auto-generated method stub
    +        return false;
    +    }
    +
    +    @Override
    +    public boolean unlockFromLockTable(String id) {
    +        // TODO Auto-generated method stub
    +        return false;
    +    }
    +
    +    @Override
    +    public <K> K getRandomlyIncreasingNextInSequence(Class<K> clazz, String name) {
    +        // TODO Auto-generated method stub
    +        return null;
    +    }
    +
    +    @Override
    +    public UsageEventVO findOneBy(SearchCriteria<UsageEventVO> sc) {
    +        // TODO Auto-generated method stub
    +        return null;
    +    }
    +
    +    @Override
    +    public Class<UsageEventVO> getEntityBeanType() {
    +        // TODO Auto-generated method stub
    +        return null;
    +    }
    +
    +    @Override
    +    public Pair<List<UsageEventVO>, Integer> searchAndCount(
    +            SearchCriteria<UsageEventVO> sc, Filter filter) {
    +        // TODO Auto-generated method stub
    +        return null;
    +    }
    +
    +    @Override
    +    public Pair<List<UsageEventVO>, Integer> searchAndDistinctCount(SearchCriteria<UsageEventVO> sc, Filter filter) {
    +        //TODO Auto-generated method stub
    +        return null;
    +    }
    +
    +    @Override
    +    public Map<String, Attribute> getAllAttributes() {
    +        // TODO Auto-generated method stub
    +        return null;
    +    }
    +
    +    @Override
    +    public List<UsageEventVO> listLatestEvents(Date endDate) {
    +        // TODO Auto-generated method stub
    +        return null;
    +    }
    +
    +    @Override
    +    public List<UsageEventVO> getLatestEvent() {
    +        // TODO Auto-generated method stub
    +        return null;
    +    }
    +
    +    @Override
    +    public List<UsageEventVO> getRecentEvents(Date endDate) {
    +        // 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 infrastructure@apache.org or file a JIRA ticket
with INFRA.
---

[GitHub] cloudstack issue #1624: Fixes regarding VOLUME_DELETE events resulting from ...

Posted by blueorangutan <gi...@git.apache.org>.
Github user blueorangutan commented on the issue:

    https://github.com/apache/cloudstack/pull/1624
  
    Packaging result: \u2714centos6 \u2714centos7 \u2714debian. JID-88


---
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 infrastructure@apache.org or file a JIRA ticket
with INFRA.
---

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

Posted by jburwell <gi...@git.apache.org>.
Github user jburwell commented on a diff in the pull request:

    https://github.com/apache/cloudstack/pull/1624#discussion_r74314758
  
    --- 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<UsageEventVO> persistedItems;
    +
    +    public MockUsageEventDao() {
    +        persistedItems = new ArrayList<UsageEventVO>();
    +    }
    +
    +    @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<UsageEventVO> createSearchBuilder() {
    +        // TODO Auto-generated method stub
    +        return null;
    +    }
    +
    +    @Override
    +    public <K> GenericSearchBuilder<UsageEventVO, K> createSearchBuilder(
    +            Class<K> clazz) {
    +        // TODO Auto-generated method stub
    +        return null;
    +    }
    +
    +    @Override
    +    public UsageEventVO createForUpdate(Long id) {
    +        // TODO Auto-generated method stub
    +        return null;
    +    }
    +
    +    @Override
    +    public SearchCriteria<UsageEventVO> createSearchCriteria() {
    +        // TODO Auto-generated method stub
    +        return null;
    +    }
    +
    +    @Override
    +    public List<UsageEventVO> lockRows(SearchCriteria<UsageEventVO> sc,
    +            Filter filter, boolean exclusive) {
    +        // TODO Auto-generated method stub
    +        return null;
    +    }
    +
    +    @Override
    +    public UsageEventVO lockOneRandomRow(SearchCriteria<UsageEventVO> 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<UsageEventVO> sc) {
    +        // TODO Auto-generated method stub
    +        return 0;
    +    }
    +
    +    @Override
    +    public List<UsageEventVO> listAll() {
    +
    +        return persistedItems;
    +    }
    +
    +    @Override
    +    public List<UsageEventVO> listAll(Filter filter) {
    +        // TODO Auto-generated method stub
    +        return null;
    +    }
    +
    +    @Override
    +    public List<UsageEventVO> search(SearchCriteria<UsageEventVO> sc,
    +            Filter filter) {
    +        // TODO Auto-generated method stub
    +        return null;
    +    }
    +
    +    @Override
    +    public List<UsageEventVO> search(SearchCriteria<UsageEventVO> sc,
    +            Filter filter, boolean enableQueryCache) {
    +        // TODO Auto-generated method stub
    +        return null;
    +    }
    +
    +    @Override
    +    public List<UsageEventVO> searchIncludingRemoved(
    +            SearchCriteria<UsageEventVO> sc, Filter filter, Boolean lock,
    +            boolean cache) {
    +        // TODO Auto-generated method stub
    +        return null;
    +    }
    +
    +    @Override
    +    public List<UsageEventVO> searchIncludingRemoved(
    +            SearchCriteria<UsageEventVO> sc, Filter filter, Boolean lock,
    +            boolean cache, boolean enableQueryCache) {
    +        // TODO Auto-generated method stub
    +        return null;
    +    }
    +
    +    @Override
    +    public <M> List<M> customSearchIncludingRemoved(SearchCriteria<M> sc,
    +            Filter filter) {
    +        // TODO Auto-generated method stub
    +        return null;
    +    }
    +
    +    @Override
    +    public List<UsageEventVO> listAllIncludingRemoved() {
    +        // TODO Auto-generated method stub
    +        return null;
    +    }
    +
    +    @Override
    +    public List<UsageEventVO> listAllIncludingRemoved(Filter filter) {
    +        // TODO Auto-generated method stub
    +        return null;
    +    }
    +
    +    @Override
    +    public UsageEventVO persist(UsageEventVO entity) {
    +        persistedItems.add(entity);
    +        return entity;
    +    }
    +
    +    @Override
    +    public boolean remove(Long id) {
    +        // TODO Auto-generated method stub
    +        return false;
    +    }
    +
    +    @Override
    +    public int remove(SearchCriteria<UsageEventVO> sc) {
    +        // TODO Auto-generated method stub
    +        return 0;
    +    }
    +
    +    @Override
    +    public boolean expunge(Long id) {
    +        // TODO Auto-generated method stub
    +        return false;
    +    }
    +
    +    @Override
    +    public int expunge(SearchCriteria<UsageEventVO> sc) {
    +        // TODO Auto-generated method stub
    +        return 0;
    +    }
    +
    +    @Override
    +    public void expunge() {
    +        // TODO Auto-generated method stub
    +
    +    }
    +
    +    @Override
    +    public <K> K getNextInSequence(Class<K> clazz, String name) {
    +        // TODO Auto-generated method stub
    +        return null;
    +    }
    +
    +    @Override
    +    public boolean configure(String name, Map<String, Object> params)
    +            throws ConfigurationException {
    +        // TODO Auto-generated method stub
    +        return false;
    +    }
    +
    +    @Override
    +    public <M> List<M> customSearch(SearchCriteria<M> sc, Filter filter) {
    +        // TODO Auto-generated method stub
    +        return null;
    +    }
    +
    +    @Override
    +    public boolean lockInLockTable(String 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 infrastructure@apache.org or file a JIRA ticket
with INFRA.
---

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

Posted by jburwell <gi...@git.apache.org>.
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<UsageEventVO> persistedItems;
    +
    +    public MockUsageEventDao() {
    +        persistedItems = new ArrayList<UsageEventVO>();
    +    }
    +
    +    @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<UsageEventVO> createSearchBuilder() {
    +        // TODO Auto-generated method stub
    +        return null;
    +    }
    +
    +    @Override
    +    public <K> GenericSearchBuilder<UsageEventVO, K> createSearchBuilder(
    +            Class<K> clazz) {
    +        // TODO Auto-generated method stub
    +        return null;
    +    }
    +
    +    @Override
    +    public UsageEventVO createForUpdate(Long id) {
    +        // TODO Auto-generated method stub
    +        return null;
    +    }
    +
    +    @Override
    +    public SearchCriteria<UsageEventVO> createSearchCriteria() {
    +        // TODO Auto-generated method stub
    +        return null;
    +    }
    +
    +    @Override
    +    public List<UsageEventVO> lockRows(SearchCriteria<UsageEventVO> sc,
    +            Filter filter, boolean exclusive) {
    +        // TODO Auto-generated method stub
    +        return null;
    +    }
    +
    +    @Override
    +    public UsageEventVO lockOneRandomRow(SearchCriteria<UsageEventVO> 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<UsageEventVO> sc) {
    +        // TODO Auto-generated method stub
    +        return 0;
    +    }
    +
    +    @Override
    +    public List<UsageEventVO> listAll() {
    +
    +        return persistedItems;
    +    }
    +
    +    @Override
    +    public List<UsageEventVO> listAll(Filter filter) {
    +        // 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 infrastructure@apache.org or file a JIRA ticket
with INFRA.
---

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

Posted by ProjectMoon <gi...@git.apache.org>.
Github user ProjectMoon closed the pull request at:

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


---
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 infrastructure@apache.org or file a JIRA ticket
with INFRA.
---

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

Posted by jburwell <gi...@git.apache.org>.
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<UsageEventVO> persistedItems;
    +
    +    public MockUsageEventDao() {
    +        persistedItems = new ArrayList<UsageEventVO>();
    +    }
    +
    +    @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<UsageEventVO> createSearchBuilder() {
    +        // TODO Auto-generated method stub
    +        return null;
    +    }
    +
    +    @Override
    +    public <K> GenericSearchBuilder<UsageEventVO, K> createSearchBuilder(
    +            Class<K> clazz) {
    +        // TODO Auto-generated method stub
    +        return null;
    +    }
    +
    +    @Override
    +    public UsageEventVO createForUpdate(Long id) {
    +        // TODO Auto-generated method stub
    +        return null;
    +    }
    +
    +    @Override
    +    public SearchCriteria<UsageEventVO> createSearchCriteria() {
    +        // TODO Auto-generated method stub
    +        return null;
    +    }
    +
    +    @Override
    +    public List<UsageEventVO> lockRows(SearchCriteria<UsageEventVO> sc,
    +            Filter filter, boolean exclusive) {
    +        // TODO Auto-generated method stub
    +        return null;
    +    }
    +
    +    @Override
    +    public UsageEventVO lockOneRandomRow(SearchCriteria<UsageEventVO> 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 infrastructure@apache.org or file a JIRA ticket
with INFRA.
---

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

Posted by jburwell <gi...@git.apache.org>.
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<String, String> usageUtilsFields = new HashMap<String, String>();
    +        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 infrastructure@apache.org or file a JIRA ticket
with INFRA.
---

[GitHub] cloudstack issue #1624: Fixes regarding VOLUME_DELETE events resulting from ...

Posted by karuturi <gi...@git.apache.org>.
Github user karuturi commented on the issue:

    https://github.com/apache/cloudstack/pull/1624
  
    I started another test run on this. If it goes through, I will merge this tonight. 


---
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 infrastructure@apache.org or file a JIRA ticket
with INFRA.
---

[GitHub] cloudstack issue #1624: Fixes regarding VOLUME_DELETE events resulting from ...

Posted by blueorangutan <gi...@git.apache.org>.
Github user blueorangutan commented on the issue:

    https://github.com/apache/cloudstack/pull/1624
  
    Packaging result: \u2714centos6 \u2714centos7 \u2714debian repo: http://packages.shapeblue.com/cloudstack/pr/1624


---
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 infrastructure@apache.org or file a JIRA ticket
with INFRA.
---

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

Posted by ProjectMoon <gi...@git.apache.org>.
GitHub user ProjectMoon reopened a pull request:

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

    Fixes regarding VOLUME_DELETE events resulting from account deletion

    New version of #1491.
    
    **Original Description**
    New version of #1373, but updated for the 4.7 branch with another fix that allows it to properly find expunged root volumes. This is a bug fix, which is why we target the 4.7 branch.
    
    Original pull request:
    Fixes regarding usage event emission.
    
    UsageEventUtils was previously not checking deleted accounts, which meant that if an account was deleted that had some resources running on it, those resources would get destroyed without emitting any events.
    
    Furthermore, the VOLUME_DELETE event of ROOT volumes is the responsibility of the UserVmManager, which gets circumvented when expunging resources following the account deletion. Added a check to the AccountManager which catches the ROOT volumes that need to be deleted and emits events for them.
    
    To test this: Create a new user. As that user, create and destroy an instance. This should cause the VM_CREATE, VM_START, VM_STOP, VM_DESTROY, VOLUME_CREATE, and VOLUME_DELETE events to be emitted. 
    Create a new instance as the same user. Log in as admin, and delete the user. The same set of events should be emitted, and there should be no duplicate DELETE events for the ROOT volume of the previous instance.

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

    $ git pull https://github.com/greenqloud/cloudstack pr-volume-usage-events-fixes-4.8

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

    https://github.com/apache/cloudstack/pull/1624.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 #1624
    
----
commit 24a194939b46488e38af6913f417d7e08ebf5eb3
Author: nnesic <ne...@greenqloud.com>
Date:   2015-10-12T13:15:30Z

    Emit a VOLUME_DELETE usage event when account deletion destroys an instance.
    
    Currently the logic about volume deletion seems to be that an event
    should be emitted when the volume delete is requested, not when the
    deletion completes.
    
    The VolumeStateListener specifically ignores destroy events for ROOT
    volumes, assuming that the ROOT volume only gets deleted when the
    instance is destroyed and the UserVmManager should take care of it.
    
    When deleting an account, all of its resources get destroyed, but the
    instance expunging circumvents the UserVmManager, and thus we miss the
    VOLUME_DESTROY usage event.  Added a check in the AccountManager to
    emit the deletion event for ROOT volumes belonging to instances which
    weren't destroyed prior to the account deletion.

commit 609c3bb17be96c68cd3652fb1e8439e1907a8176
Author: nnesic <ne...@greenqloud.com>
Date:   2016-09-13T10:01:50Z

    Instead of emitting volume delete events directly, account manager
    now attempts to propperly destroy the vm before expunging it. This
    way the destroy logic is respected, including the event emission.
    Unit tests have been modified accordingly.

----


---
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 infrastructure@apache.org or file a JIRA ticket
with INFRA.
---

[GitHub] cloudstack issue #1624: Fixes regarding VOLUME_DELETE events resulting from ...

Posted by karuturi <gi...@git.apache.org>.
Github user karuturi commented on the issue:

    https://github.com/apache/cloudstack/pull/1624
  
    It is now fwd merged to all the branches. 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 infrastructure@apache.org or file a JIRA ticket
with INFRA.
---

[GitHub] cloudstack issue #1624: Fixes regarding VOLUME_DELETE events resulting from ...

Posted by karuturi <gi...@git.apache.org>.
Github user karuturi commented on the issue:

    https://github.com/apache/cloudstack/pull/1624
  
    I started BVT run(xenserver, advanced zone) on this PR. @cloudmonger will post the results here in approx. 4 hrs.


---
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 infrastructure@apache.org or file a JIRA ticket
with INFRA.
---

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

Posted by jburwell <gi...@git.apache.org>.
Github user jburwell commented on a diff in the pull request:

    https://github.com/apache/cloudstack/pull/1624#discussion_r74314349
  
    --- 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<UsageEventVO> persistedItems;
    +
    +    public MockUsageEventDao() {
    +        persistedItems = new ArrayList<UsageEventVO>();
    +    }
    +
    +    @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<UsageEventVO> createSearchBuilder() {
    +        // TODO Auto-generated method stub
    +        return null;
    +    }
    +
    +    @Override
    +    public <K> GenericSearchBuilder<UsageEventVO, K> createSearchBuilder(
    +            Class<K> clazz) {
    +        // TODO Auto-generated method stub
    +        return null;
    +    }
    +
    +    @Override
    +    public UsageEventVO createForUpdate(Long id) {
    +        // TODO Auto-generated method stub
    +        return null;
    +    }
    +
    +    @Override
    +    public SearchCriteria<UsageEventVO> createSearchCriteria() {
    +        // TODO Auto-generated method stub
    +        return null;
    +    }
    +
    +    @Override
    +    public List<UsageEventVO> lockRows(SearchCriteria<UsageEventVO> sc,
    +            Filter filter, boolean exclusive) {
    +        // TODO Auto-generated method stub
    +        return null;
    +    }
    +
    +    @Override
    +    public UsageEventVO lockOneRandomRow(SearchCriteria<UsageEventVO> 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<UsageEventVO> sc) {
    +        // TODO Auto-generated method stub
    +        return 0;
    +    }
    +
    +    @Override
    +    public List<UsageEventVO> listAll() {
    +
    +        return persistedItems;
    +    }
    +
    +    @Override
    +    public List<UsageEventVO> listAll(Filter filter) {
    +        // TODO Auto-generated method stub
    +        return null;
    +    }
    +
    +    @Override
    +    public List<UsageEventVO> search(SearchCriteria<UsageEventVO> sc,
    +            Filter filter) {
    +        // TODO Auto-generated method stub
    +        return null;
    +    }
    +
    +    @Override
    +    public List<UsageEventVO> search(SearchCriteria<UsageEventVO> sc,
    +            Filter filter, boolean enableQueryCache) {
    +        // TODO Auto-generated method stub
    +        return null;
    +    }
    +
    +    @Override
    +    public List<UsageEventVO> searchIncludingRemoved(
    +            SearchCriteria<UsageEventVO> sc, Filter filter, Boolean lock,
    +            boolean cache) {
    +        // 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 infrastructure@apache.org or file a JIRA ticket
with INFRA.
---

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

Posted by jburwell <gi...@git.apache.org>.
Github user jburwell commented on a diff in the pull request:

    https://github.com/apache/cloudstack/pull/1624#discussion_r74314365
  
    --- 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<UsageEventVO> persistedItems;
    +
    +    public MockUsageEventDao() {
    +        persistedItems = new ArrayList<UsageEventVO>();
    +    }
    +
    +    @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<UsageEventVO> createSearchBuilder() {
    +        // TODO Auto-generated method stub
    +        return null;
    +    }
    +
    +    @Override
    +    public <K> GenericSearchBuilder<UsageEventVO, K> createSearchBuilder(
    +            Class<K> clazz) {
    +        // TODO Auto-generated method stub
    +        return null;
    +    }
    +
    +    @Override
    +    public UsageEventVO createForUpdate(Long id) {
    +        // TODO Auto-generated method stub
    +        return null;
    +    }
    +
    +    @Override
    +    public SearchCriteria<UsageEventVO> createSearchCriteria() {
    +        // TODO Auto-generated method stub
    +        return null;
    +    }
    +
    +    @Override
    +    public List<UsageEventVO> lockRows(SearchCriteria<UsageEventVO> sc,
    +            Filter filter, boolean exclusive) {
    +        // TODO Auto-generated method stub
    +        return null;
    +    }
    +
    +    @Override
    +    public UsageEventVO lockOneRandomRow(SearchCriteria<UsageEventVO> 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<UsageEventVO> sc) {
    +        // TODO Auto-generated method stub
    +        return 0;
    +    }
    +
    +    @Override
    +    public List<UsageEventVO> listAll() {
    +
    +        return persistedItems;
    +    }
    +
    +    @Override
    +    public List<UsageEventVO> listAll(Filter filter) {
    +        // TODO Auto-generated method stub
    +        return null;
    +    }
    +
    +    @Override
    +    public List<UsageEventVO> search(SearchCriteria<UsageEventVO> sc,
    +            Filter filter) {
    +        // TODO Auto-generated method stub
    +        return null;
    +    }
    +
    +    @Override
    +    public List<UsageEventVO> search(SearchCriteria<UsageEventVO> sc,
    +            Filter filter, boolean enableQueryCache) {
    +        // TODO Auto-generated method stub
    +        return null;
    +    }
    +
    +    @Override
    +    public List<UsageEventVO> searchIncludingRemoved(
    +            SearchCriteria<UsageEventVO> sc, Filter filter, Boolean lock,
    +            boolean cache) {
    +        // TODO Auto-generated method stub
    +        return null;
    +    }
    +
    +    @Override
    +    public List<UsageEventVO> searchIncludingRemoved(
    +            SearchCriteria<UsageEventVO> sc, Filter filter, Boolean lock,
    +            boolean cache, boolean enableQueryCache) {
    +        // 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 infrastructure@apache.org or file a JIRA ticket
with INFRA.
---

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

Posted by jburwell <gi...@git.apache.org>.
Github user jburwell commented on a diff in the pull request:

    https://github.com/apache/cloudstack/pull/1624#discussion_r74314768
  
    --- 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<UsageEventVO> persistedItems;
    +
    +    public MockUsageEventDao() {
    +        persistedItems = new ArrayList<UsageEventVO>();
    +    }
    +
    +    @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<UsageEventVO> createSearchBuilder() {
    +        // TODO Auto-generated method stub
    +        return null;
    +    }
    +
    +    @Override
    +    public <K> GenericSearchBuilder<UsageEventVO, K> createSearchBuilder(
    +            Class<K> clazz) {
    +        // TODO Auto-generated method stub
    +        return null;
    +    }
    +
    +    @Override
    +    public UsageEventVO createForUpdate(Long id) {
    +        // TODO Auto-generated method stub
    +        return null;
    +    }
    +
    +    @Override
    +    public SearchCriteria<UsageEventVO> createSearchCriteria() {
    +        // TODO Auto-generated method stub
    +        return null;
    +    }
    +
    +    @Override
    +    public List<UsageEventVO> lockRows(SearchCriteria<UsageEventVO> sc,
    +            Filter filter, boolean exclusive) {
    +        // TODO Auto-generated method stub
    +        return null;
    +    }
    +
    +    @Override
    +    public UsageEventVO lockOneRandomRow(SearchCriteria<UsageEventVO> 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<UsageEventVO> sc) {
    +        // TODO Auto-generated method stub
    +        return 0;
    +    }
    +
    +    @Override
    +    public List<UsageEventVO> listAll() {
    +
    +        return persistedItems;
    +    }
    +
    +    @Override
    +    public List<UsageEventVO> listAll(Filter filter) {
    +        // TODO Auto-generated method stub
    +        return null;
    +    }
    +
    +    @Override
    +    public List<UsageEventVO> search(SearchCriteria<UsageEventVO> sc,
    +            Filter filter) {
    +        // TODO Auto-generated method stub
    +        return null;
    +    }
    +
    +    @Override
    +    public List<UsageEventVO> search(SearchCriteria<UsageEventVO> sc,
    +            Filter filter, boolean enableQueryCache) {
    +        // TODO Auto-generated method stub
    +        return null;
    +    }
    +
    +    @Override
    +    public List<UsageEventVO> searchIncludingRemoved(
    +            SearchCriteria<UsageEventVO> sc, Filter filter, Boolean lock,
    +            boolean cache) {
    +        // TODO Auto-generated method stub
    +        return null;
    +    }
    +
    +    @Override
    +    public List<UsageEventVO> searchIncludingRemoved(
    +            SearchCriteria<UsageEventVO> sc, Filter filter, Boolean lock,
    +            boolean cache, boolean enableQueryCache) {
    +        // TODO Auto-generated method stub
    +        return null;
    +    }
    +
    +    @Override
    +    public <M> List<M> customSearchIncludingRemoved(SearchCriteria<M> sc,
    +            Filter filter) {
    +        // TODO Auto-generated method stub
    +        return null;
    +    }
    +
    +    @Override
    +    public List<UsageEventVO> listAllIncludingRemoved() {
    +        // TODO Auto-generated method stub
    +        return null;
    +    }
    +
    +    @Override
    +    public List<UsageEventVO> listAllIncludingRemoved(Filter filter) {
    +        // TODO Auto-generated method stub
    +        return null;
    +    }
    +
    +    @Override
    +    public UsageEventVO persist(UsageEventVO entity) {
    +        persistedItems.add(entity);
    +        return entity;
    +    }
    +
    +    @Override
    +    public boolean remove(Long id) {
    +        // TODO Auto-generated method stub
    +        return false;
    +    }
    +
    +    @Override
    +    public int remove(SearchCriteria<UsageEventVO> sc) {
    +        // TODO Auto-generated method stub
    +        return 0;
    +    }
    +
    +    @Override
    +    public boolean expunge(Long id) {
    +        // TODO Auto-generated method stub
    +        return false;
    +    }
    +
    +    @Override
    +    public int expunge(SearchCriteria<UsageEventVO> sc) {
    +        // TODO Auto-generated method stub
    +        return 0;
    +    }
    +
    +    @Override
    +    public void expunge() {
    +        // TODO Auto-generated method stub
    +
    +    }
    +
    +    @Override
    +    public <K> K getNextInSequence(Class<K> clazz, String name) {
    +        // TODO Auto-generated method stub
    +        return null;
    +    }
    +
    +    @Override
    +    public boolean configure(String name, Map<String, Object> params)
    +            throws ConfigurationException {
    +        // TODO Auto-generated method stub
    +        return false;
    +    }
    +
    +    @Override
    +    public <M> List<M> customSearch(SearchCriteria<M> sc, Filter filter) {
    +        // 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 infrastructure@apache.org or file a JIRA ticket
with INFRA.
---

[GitHub] cloudstack issue #1624: Fixes regarding VOLUME_DELETE events resulting from ...

Posted by rhtyd <gi...@git.apache.org>.
Github user rhtyd commented on the issue:

    https://github.com/apache/cloudstack/pull/1624
  
    LGTM. Thanks @ProjectMoon as soon as #1654 is merged, we'll get this merged as well. Do we have any regression tests results, especially around the changed 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 infrastructure@apache.org or file a JIRA ticket
with INFRA.
---

[GitHub] cloudstack issue #1624: Fixes regarding VOLUME_DELETE events resulting from ...

Posted by blueorangutan <gi...@git.apache.org>.
Github user blueorangutan commented on the issue:

    https://github.com/apache/cloudstack/pull/1624
  
    @jburwell 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 infrastructure@apache.org or file a JIRA ticket
with INFRA.
---

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

Posted by jburwell <gi...@git.apache.org>.
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<UsageEventVO> persistedItems;
    +
    +    public MockUsageEventDao() {
    +        persistedItems = new ArrayList<UsageEventVO>();
    +    }
    +
    +    @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 infrastructure@apache.org or file a JIRA ticket
with INFRA.
---

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

Posted by jburwell <gi...@git.apache.org>.
Github user jburwell commented on a diff in the pull request:

    https://github.com/apache/cloudstack/pull/1624#discussion_r74314089
  
    --- 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<UsageEventVO> persistedItems;
    +
    +    public MockUsageEventDao() {
    +        persistedItems = new ArrayList<UsageEventVO>();
    +    }
    +
    +    @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
    --- 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 infrastructure@apache.org or file a JIRA ticket
with INFRA.
---

[GitHub] cloudstack issue #1624: Fixes regarding VOLUME_DELETE events resulting from ...

Posted by rhtyd <gi...@git.apache.org>.
Github user rhtyd commented on the issue:

    https://github.com/apache/cloudstack/pull/1624
  
    @blueorangutan kick


---
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 infrastructure@apache.org or file a JIRA ticket
with INFRA.
---

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

Posted by jburwell <gi...@git.apache.org>.
Github user jburwell commented on a diff in the pull request:

    https://github.com/apache/cloudstack/pull/1624#discussion_r74314390
  
    --- 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<UsageEventVO> persistedItems;
    +
    +    public MockUsageEventDao() {
    +        persistedItems = new ArrayList<UsageEventVO>();
    +    }
    +
    +    @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<UsageEventVO> createSearchBuilder() {
    +        // TODO Auto-generated method stub
    +        return null;
    +    }
    +
    +    @Override
    +    public <K> GenericSearchBuilder<UsageEventVO, K> createSearchBuilder(
    +            Class<K> clazz) {
    +        // TODO Auto-generated method stub
    +        return null;
    +    }
    +
    +    @Override
    +    public UsageEventVO createForUpdate(Long id) {
    +        // TODO Auto-generated method stub
    +        return null;
    +    }
    +
    +    @Override
    +    public SearchCriteria<UsageEventVO> createSearchCriteria() {
    +        // TODO Auto-generated method stub
    +        return null;
    +    }
    +
    +    @Override
    +    public List<UsageEventVO> lockRows(SearchCriteria<UsageEventVO> sc,
    +            Filter filter, boolean exclusive) {
    +        // TODO Auto-generated method stub
    +        return null;
    +    }
    +
    +    @Override
    +    public UsageEventVO lockOneRandomRow(SearchCriteria<UsageEventVO> 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<UsageEventVO> sc) {
    +        // TODO Auto-generated method stub
    +        return 0;
    +    }
    +
    +    @Override
    +    public List<UsageEventVO> listAll() {
    +
    +        return persistedItems;
    +    }
    +
    +    @Override
    +    public List<UsageEventVO> listAll(Filter filter) {
    +        // TODO Auto-generated method stub
    +        return null;
    +    }
    +
    +    @Override
    +    public List<UsageEventVO> search(SearchCriteria<UsageEventVO> sc,
    +            Filter filter) {
    +        // TODO Auto-generated method stub
    +        return null;
    +    }
    +
    +    @Override
    +    public List<UsageEventVO> search(SearchCriteria<UsageEventVO> sc,
    +            Filter filter, boolean enableQueryCache) {
    +        // TODO Auto-generated method stub
    +        return null;
    +    }
    +
    +    @Override
    +    public List<UsageEventVO> searchIncludingRemoved(
    +            SearchCriteria<UsageEventVO> sc, Filter filter, Boolean lock,
    +            boolean cache) {
    +        // TODO Auto-generated method stub
    +        return null;
    +    }
    +
    +    @Override
    +    public List<UsageEventVO> searchIncludingRemoved(
    +            SearchCriteria<UsageEventVO> sc, Filter filter, Boolean lock,
    +            boolean cache, boolean enableQueryCache) {
    +        // TODO Auto-generated method stub
    +        return null;
    +    }
    +
    +    @Override
    +    public <M> List<M> customSearchIncludingRemoved(SearchCriteria<M> sc,
    +            Filter filter) {
    +        // TODO Auto-generated method stub
    +        return null;
    +    }
    +
    +    @Override
    +    public List<UsageEventVO> listAllIncludingRemoved() {
    +        // 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 infrastructure@apache.org or file a JIRA ticket
with INFRA.
---

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

Posted by jburwell <gi...@git.apache.org>.
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<String, String> usageUtilsFields = new HashMap<String, String>();
    +        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 infrastructure@apache.org or file a JIRA ticket
with INFRA.
---

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

Posted by jburwell <gi...@git.apache.org>.
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<UsageEventVO> persistedItems;
    +
    +    public MockUsageEventDao() {
    +        persistedItems = new ArrayList<UsageEventVO>();
    +    }
    +
    +    @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<UsageEventVO> 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 infrastructure@apache.org or file a JIRA ticket
with INFRA.
---

[GitHub] cloudstack issue #1624: Fixes regarding VOLUME_DELETE events resulting from ...

Posted by cloudmonger <gi...@git.apache.org>.
Github user cloudmonger commented on the issue:

    https://github.com/apache/cloudstack/pull/1624
  
    ### ACS CI BVT Run
     **Sumarry:**
     Build Number 102
     Hypervisor xenserver
     NetworkType Advanced
     Passed=99
     Failed=2
     Skipped=4
    
    _Link to logs Folder (search by build_no):_ https://www.dropbox.com/sh/yj3wnzbceo9uef2/AAB6u-Iap-xztdm6jHX9SjPja?dl=0
    
    
    **Failed tests:**
    * test_service_offerings.py
    
     * ContextSuite context=TestServiceOfferings>:setup Failing since 14 runs
    
    * test_volumes.py
    
     * test_01_create_volume Failed
    
    
    **Skipped tests:**
    test_vm_nic_adapter_vmxnet3
    test_static_role_account_acls
    test_3d_gpu_support
    test_deploy_vgpu_enabled_vm
    
    **Passed test suits:**
    test_deploy_vm_with_userdata.py
    test_affinity_groups_projects.py
    test_portable_publicip.py
    test_over_provisioning.py
    test_global_settings.py
    test_scale_vm.py
    test_routers_iptables_default_policy.py
    test_loadbalance.py
    test_routers.py
    test_reset_vm_on_reboot.py
    test_snapshots.py
    test_deploy_vms_with_varied_deploymentplanners.py
    test_network.py
    test_router_dns.py
    test_non_contigiousvlan.py
    test_login.py
    test_deploy_vm_iso.py
    test_list_ids_parameter.py
    test_public_ip_range.py
    test_multipleips_per_nic.py
    test_regions.py
    test_affinity_groups.py
    test_network_acl.py
    test_pvlan.py
    test_ssvm.py
    test_nic.py
    test_deploy_vm_root_resize.py
    test_resource_detail.py
    test_secondary_storage.py
    test_vm_life_cycle.py
    test_disk_offerings.py


---
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 infrastructure@apache.org or file a JIRA ticket
with INFRA.
---

[GitHub] cloudstack issue #1624: Fixes regarding VOLUME_DELETE events resulting from ...

Posted by rhtyd <gi...@git.apache.org>.
Github user rhtyd commented on the issue:

    https://github.com/apache/cloudstack/pull/1624
  
    Until #1654 is fixed and merged, all 4.8 will fail due to db upgrade failures. /cc @jburwell 


---
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 infrastructure@apache.org or file a JIRA ticket
with INFRA.
---

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

Posted by jburwell <gi...@git.apache.org>.
Github user jburwell commented on a diff in the pull request:

    https://github.com/apache/cloudstack/pull/1624#discussion_r74314615
  
    --- 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<UsageEventVO> persistedItems;
    +
    +    public MockUsageEventDao() {
    +        persistedItems = new ArrayList<UsageEventVO>();
    +    }
    +
    +    @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<UsageEventVO> createSearchBuilder() {
    +        // TODO Auto-generated method stub
    +        return null;
    +    }
    +
    +    @Override
    +    public <K> GenericSearchBuilder<UsageEventVO, K> createSearchBuilder(
    +            Class<K> clazz) {
    +        // TODO Auto-generated method stub
    +        return null;
    +    }
    +
    +    @Override
    +    public UsageEventVO createForUpdate(Long id) {
    +        // TODO Auto-generated method stub
    +        return null;
    +    }
    +
    +    @Override
    +    public SearchCriteria<UsageEventVO> createSearchCriteria() {
    +        // TODO Auto-generated method stub
    +        return null;
    +    }
    +
    +    @Override
    +    public List<UsageEventVO> lockRows(SearchCriteria<UsageEventVO> sc,
    +            Filter filter, boolean exclusive) {
    +        // TODO Auto-generated method stub
    +        return null;
    +    }
    +
    +    @Override
    +    public UsageEventVO lockOneRandomRow(SearchCriteria<UsageEventVO> 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<UsageEventVO> sc) {
    +        // TODO Auto-generated method stub
    +        return 0;
    +    }
    +
    +    @Override
    +    public List<UsageEventVO> listAll() {
    +
    +        return persistedItems;
    +    }
    +
    +    @Override
    +    public List<UsageEventVO> listAll(Filter filter) {
    +        // TODO Auto-generated method stub
    +        return null;
    +    }
    +
    +    @Override
    +    public List<UsageEventVO> search(SearchCriteria<UsageEventVO> sc,
    +            Filter filter) {
    +        // TODO Auto-generated method stub
    +        return null;
    +    }
    +
    +    @Override
    +    public List<UsageEventVO> search(SearchCriteria<UsageEventVO> sc,
    +            Filter filter, boolean enableQueryCache) {
    +        // TODO Auto-generated method stub
    +        return null;
    +    }
    +
    +    @Override
    +    public List<UsageEventVO> searchIncludingRemoved(
    +            SearchCriteria<UsageEventVO> sc, Filter filter, Boolean lock,
    +            boolean cache) {
    +        // TODO Auto-generated method stub
    +        return null;
    +    }
    +
    +    @Override
    +    public List<UsageEventVO> searchIncludingRemoved(
    +            SearchCriteria<UsageEventVO> sc, Filter filter, Boolean lock,
    +            boolean cache, boolean enableQueryCache) {
    +        // TODO Auto-generated method stub
    +        return null;
    +    }
    +
    +    @Override
    +    public <M> List<M> customSearchIncludingRemoved(SearchCriteria<M> sc,
    +            Filter filter) {
    +        // TODO Auto-generated method stub
    +        return null;
    +    }
    +
    +    @Override
    +    public List<UsageEventVO> listAllIncludingRemoved() {
    +        // TODO Auto-generated method stub
    +        return null;
    +    }
    +
    +    @Override
    +    public List<UsageEventVO> listAllIncludingRemoved(Filter filter) {
    +        // TODO Auto-generated method stub
    +        return null;
    +    }
    +
    +    @Override
    +    public UsageEventVO persist(UsageEventVO entity) {
    +        persistedItems.add(entity);
    +        return entity;
    +    }
    +
    +    @Override
    +    public boolean remove(Long id) {
    +        // TODO Auto-generated method stub
    +        return false;
    +    }
    +
    +    @Override
    +    public int remove(SearchCriteria<UsageEventVO> sc) {
    +        // TODO Auto-generated method stub
    +        return 0;
    +    }
    +
    +    @Override
    +    public boolean expunge(Long id) {
    +        // TODO Auto-generated method stub
    +        return false;
    +    }
    +
    +    @Override
    +    public int expunge(SearchCriteria<UsageEventVO> sc) {
    +        // TODO Auto-generated method stub
    +        return 0;
    +    }
    +
    +    @Override
    +    public void expunge() {
    +        // TODO Auto-generated method stub
    +
    +    }
    +
    +    @Override
    +    public <K> K getNextInSequence(Class<K> clazz, String name) {
    +        // TODO Auto-generated method stub
    +        return null;
    +    }
    +
    +    @Override
    +    public boolean configure(String name, Map<String, Object> params)
    +            throws ConfigurationException {
    +        // TODO Auto-generated method stub
    +        return false;
    +    }
    +
    +    @Override
    +    public <M> List<M> customSearch(SearchCriteria<M> sc, Filter filter) {
    +        // TODO Auto-generated method stub
    +        return null;
    +    }
    +
    +    @Override
    +    public boolean lockInLockTable(String id) {
    +        // TODO Auto-generated method stub
    +        return false;
    +    }
    +
    +    @Override
    +    public boolean lockInLockTable(String id, int seconds) {
    +        // TODO Auto-generated method stub
    +        return false;
    +    }
    +
    +    @Override
    +    public boolean unlockFromLockTable(String id) {
    +        // TODO Auto-generated method stub
    +        return false;
    +    }
    +
    +    @Override
    +    public <K> K getRandomlyIncreasingNextInSequence(Class<K> clazz, String name) {
    +        // TODO Auto-generated method stub
    +        return null;
    +    }
    +
    +    @Override
    +    public UsageEventVO findOneBy(SearchCriteria<UsageEventVO> sc) {
    +        // TODO Auto-generated method stub
    +        return null;
    +    }
    +
    +    @Override
    +    public Class<UsageEventVO> getEntityBeanType() {
    +        // TODO Auto-generated method stub
    +        return null;
    +    }
    +
    +    @Override
    +    public Pair<List<UsageEventVO>, Integer> searchAndCount(
    +            SearchCriteria<UsageEventVO> sc, Filter filter) {
    +        // TODO Auto-generated method stub
    +        return null;
    +    }
    +
    +    @Override
    +    public Pair<List<UsageEventVO>, Integer> searchAndDistinctCount(SearchCriteria<UsageEventVO> sc, Filter filter) {
    +        //TODO Auto-generated method stub
    +        return null;
    +    }
    +
    +    @Override
    +    public Map<String, Attribute> getAllAttributes() {
    +        // TODO Auto-generated method stub
    +        return null;
    +    }
    +
    +    @Override
    +    public List<UsageEventVO> listLatestEvents(Date endDate) {
    +        // TODO Auto-generated method stub
    +        return null;
    +    }
    +
    +    @Override
    +    public List<UsageEventVO> getLatestEvent() {
    +        // 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 infrastructure@apache.org or file a JIRA ticket
with INFRA.
---

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

Posted by jburwell <gi...@git.apache.org>.
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<UsageEventVO> persistedItems;
    +
    +    public MockUsageEventDao() {
    +        persistedItems = new ArrayList<UsageEventVO>();
    +    }
    +
    +    @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 infrastructure@apache.org or file a JIRA ticket
with INFRA.
---

[GitHub] cloudstack issue #1624: Fixes regarding VOLUME_DELETE events resulting from ...

Posted by rhtyd <gi...@git.apache.org>.
Github user rhtyd commented on the issue:

    https://github.com/apache/cloudstack/pull/1624
  
    @ProjectMoon can you squash your changes, and rebase against latest base branch?


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

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

Posted by ProjectMoon <gi...@git.apache.org>.
Github user ProjectMoon commented on a diff in the pull request:

    https://github.com/apache/cloudstack/pull/1624#discussion_r75853547
  
    --- 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<String, String> usageUtilsFields = new HashMap<String, String>();
    +        usageUtilsFields.put("usageEventDao", "_usageEventDao");
    +        usageUtilsFields.put("accountDao", "_accountDao");
    +        usageUtilsFields.put("dcDao", "_dcDao");
    +        usageUtilsFields.put("configDao", "_configDao");
    --- End diff --
    
    In this case, the map is not used outside of the method.


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

[GitHub] cloudstack issue #1624: Fixes regarding VOLUME_DELETE events resulting from ...

Posted by cloudmonger <gi...@git.apache.org>.
Github user cloudmonger commented on the issue:

    https://github.com/apache/cloudstack/pull/1624
  
    ### ACS CI BVT Run
     **Sumarry:**
     Build Number 112
     Hypervisor xenserver
     NetworkType Advanced
     Passed=101
     Failed=2
     Skipped=4
    
    _Link to logs Folder (search by build_no):_ https://www.dropbox.com/sh/yj3wnzbceo9uef2/AAB6u-Iap-xztdm6jHX9SjPja?dl=0
    
    
    **Failed tests:**
    * test_deploy_vm_iso.py
    
     * test_deploy_vm_from_iso Failing since 3 runs
    
    * test_vm_life_cycle.py
    
     * test_10_attachAndDetach_iso Failing since 3 runs
    
    
    **Skipped tests:**
    test_vm_nic_adapter_vmxnet3
    test_static_role_account_acls
    test_3d_gpu_support
    test_deploy_vgpu_enabled_vm
    
    **Passed test suits:**
    test_deploy_vm_with_userdata.py
    test_affinity_groups_projects.py
    test_portable_publicip.py
    test_over_provisioning.py
    test_global_settings.py
    test_scale_vm.py
    test_service_offerings.py
    test_routers_iptables_default_policy.py
    test_loadbalance.py
    test_routers.py
    test_reset_vm_on_reboot.py
    test_snapshots.py
    test_deploy_vms_with_varied_deploymentplanners.py
    test_network.py
    test_router_dns.py
    test_non_contigiousvlan.py
    test_login.py
    test_list_ids_parameter.py
    test_public_ip_range.py
    test_multipleips_per_nic.py
    test_regions.py
    test_affinity_groups.py
    test_network_acl.py
    test_pvlan.py
    test_volumes.py
    test_ssvm.py
    test_nic.py
    test_deploy_vm_root_resize.py
    test_resource_detail.py
    test_secondary_storage.py
    test_disk_offerings.py


---
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 infrastructure@apache.org or file a JIRA ticket
with INFRA.
---

[GitHub] cloudstack issue #1624: Fixes regarding VOLUME_DELETE events resulting from ...

Posted by ProjectMoon <gi...@git.apache.org>.
Github user ProjectMoon commented on the issue:

    https://github.com/apache/cloudstack/pull/1624
  
    The commits have been squashed, commit message updated to make sense (I think; let me know if it's not right), and rebased against latest 4.8.


---
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 infrastructure@apache.org or file a JIRA ticket
with INFRA.
---

[GitHub] cloudstack issue #1624: Fixes regarding VOLUME_DELETE events resulting from ...

Posted by jburwell <gi...@git.apache.org>.
Github user jburwell commented on the issue:

    https://github.com/apache/cloudstack/pull/1624
  
    @ProjectMoon both the Jenkins and Travis builds are failing.  Could you please investigate?


---
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 infrastructure@apache.org or file a JIRA ticket
with INFRA.
---

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

Posted by jburwell <gi...@git.apache.org>.
Github user jburwell commented on a diff in the pull request:

    https://github.com/apache/cloudstack/pull/1624#discussion_r74314463
  
    --- 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<UsageEventVO> persistedItems;
    +
    +    public MockUsageEventDao() {
    +        persistedItems = new ArrayList<UsageEventVO>();
    +    }
    +
    +    @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<UsageEventVO> createSearchBuilder() {
    +        // TODO Auto-generated method stub
    +        return null;
    +    }
    +
    +    @Override
    +    public <K> GenericSearchBuilder<UsageEventVO, K> createSearchBuilder(
    +            Class<K> clazz) {
    +        // TODO Auto-generated method stub
    +        return null;
    +    }
    +
    +    @Override
    +    public UsageEventVO createForUpdate(Long id) {
    +        // TODO Auto-generated method stub
    +        return null;
    +    }
    +
    +    @Override
    +    public SearchCriteria<UsageEventVO> createSearchCriteria() {
    +        // TODO Auto-generated method stub
    +        return null;
    +    }
    +
    +    @Override
    +    public List<UsageEventVO> lockRows(SearchCriteria<UsageEventVO> sc,
    +            Filter filter, boolean exclusive) {
    +        // TODO Auto-generated method stub
    +        return null;
    +    }
    +
    +    @Override
    +    public UsageEventVO lockOneRandomRow(SearchCriteria<UsageEventVO> 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<UsageEventVO> sc) {
    +        // TODO Auto-generated method stub
    +        return 0;
    +    }
    +
    +    @Override
    +    public List<UsageEventVO> listAll() {
    +
    +        return persistedItems;
    +    }
    +
    +    @Override
    +    public List<UsageEventVO> listAll(Filter filter) {
    +        // TODO Auto-generated method stub
    +        return null;
    +    }
    +
    +    @Override
    +    public List<UsageEventVO> search(SearchCriteria<UsageEventVO> sc,
    +            Filter filter) {
    +        // TODO Auto-generated method stub
    +        return null;
    +    }
    +
    +    @Override
    +    public List<UsageEventVO> search(SearchCriteria<UsageEventVO> sc,
    +            Filter filter, boolean enableQueryCache) {
    +        // TODO Auto-generated method stub
    +        return null;
    +    }
    +
    +    @Override
    +    public List<UsageEventVO> searchIncludingRemoved(
    +            SearchCriteria<UsageEventVO> sc, Filter filter, Boolean lock,
    +            boolean cache) {
    +        // TODO Auto-generated method stub
    +        return null;
    +    }
    +
    +    @Override
    +    public List<UsageEventVO> searchIncludingRemoved(
    +            SearchCriteria<UsageEventVO> sc, Filter filter, Boolean lock,
    +            boolean cache, boolean enableQueryCache) {
    +        // TODO Auto-generated method stub
    +        return null;
    +    }
    +
    +    @Override
    +    public <M> List<M> customSearchIncludingRemoved(SearchCriteria<M> sc,
    +            Filter filter) {
    +        // TODO Auto-generated method stub
    +        return null;
    +    }
    +
    +    @Override
    +    public List<UsageEventVO> listAllIncludingRemoved() {
    +        // TODO Auto-generated method stub
    +        return null;
    +    }
    +
    +    @Override
    +    public List<UsageEventVO> listAllIncludingRemoved(Filter filter) {
    +        // TODO Auto-generated method stub
    +        return null;
    +    }
    +
    +    @Override
    +    public UsageEventVO persist(UsageEventVO entity) {
    +        persistedItems.add(entity);
    +        return entity;
    +    }
    +
    +    @Override
    +    public boolean remove(Long id) {
    +        // TODO Auto-generated method stub
    +        return false;
    +    }
    +
    +    @Override
    +    public int remove(SearchCriteria<UsageEventVO> sc) {
    +        // TODO Auto-generated method stub
    +        return 0;
    +    }
    +
    +    @Override
    +    public boolean expunge(Long id) {
    +        // TODO Auto-generated method stub
    +        return false;
    +    }
    +
    +    @Override
    +    public int expunge(SearchCriteria<UsageEventVO> sc) {
    +        // 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 infrastructure@apache.org or file a JIRA ticket
with INFRA.
---

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

Posted by jburwell <gi...@git.apache.org>.
Github user jburwell commented on a diff in the pull request:

    https://github.com/apache/cloudstack/pull/1624#discussion_r74314378
  
    --- 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<UsageEventVO> persistedItems;
    +
    +    public MockUsageEventDao() {
    +        persistedItems = new ArrayList<UsageEventVO>();
    +    }
    +
    +    @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<UsageEventVO> createSearchBuilder() {
    +        // TODO Auto-generated method stub
    +        return null;
    +    }
    +
    +    @Override
    +    public <K> GenericSearchBuilder<UsageEventVO, K> createSearchBuilder(
    +            Class<K> clazz) {
    +        // TODO Auto-generated method stub
    +        return null;
    +    }
    +
    +    @Override
    +    public UsageEventVO createForUpdate(Long id) {
    +        // TODO Auto-generated method stub
    +        return null;
    +    }
    +
    +    @Override
    +    public SearchCriteria<UsageEventVO> createSearchCriteria() {
    +        // TODO Auto-generated method stub
    +        return null;
    +    }
    +
    +    @Override
    +    public List<UsageEventVO> lockRows(SearchCriteria<UsageEventVO> sc,
    +            Filter filter, boolean exclusive) {
    +        // TODO Auto-generated method stub
    +        return null;
    +    }
    +
    +    @Override
    +    public UsageEventVO lockOneRandomRow(SearchCriteria<UsageEventVO> 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<UsageEventVO> sc) {
    +        // TODO Auto-generated method stub
    +        return 0;
    +    }
    +
    +    @Override
    +    public List<UsageEventVO> listAll() {
    +
    +        return persistedItems;
    +    }
    +
    +    @Override
    +    public List<UsageEventVO> listAll(Filter filter) {
    +        // TODO Auto-generated method stub
    +        return null;
    +    }
    +
    +    @Override
    +    public List<UsageEventVO> search(SearchCriteria<UsageEventVO> sc,
    +            Filter filter) {
    +        // TODO Auto-generated method stub
    +        return null;
    +    }
    +
    +    @Override
    +    public List<UsageEventVO> search(SearchCriteria<UsageEventVO> sc,
    +            Filter filter, boolean enableQueryCache) {
    +        // TODO Auto-generated method stub
    +        return null;
    +    }
    +
    +    @Override
    +    public List<UsageEventVO> searchIncludingRemoved(
    +            SearchCriteria<UsageEventVO> sc, Filter filter, Boolean lock,
    +            boolean cache) {
    +        // TODO Auto-generated method stub
    +        return null;
    +    }
    +
    +    @Override
    +    public List<UsageEventVO> searchIncludingRemoved(
    +            SearchCriteria<UsageEventVO> sc, Filter filter, Boolean lock,
    +            boolean cache, boolean enableQueryCache) {
    +        // TODO Auto-generated method stub
    +        return null;
    +    }
    +
    +    @Override
    +    public <M> List<M> customSearchIncludingRemoved(SearchCriteria<M> sc,
    +            Filter filter) {
    +        // 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 infrastructure@apache.org or file a JIRA ticket
with INFRA.
---

[GitHub] cloudstack issue #1624: Fixes regarding VOLUME_DELETE events resulting from ...

Posted by karuturi <gi...@git.apache.org>.
Github user karuturi commented on the issue:

    https://github.com/apache/cloudstack/pull/1624
  
    This is pushed to 4.8 but not merged fwd. 
    looks like 4.8 is not fwd merged for some commits and there are conflicts now. Need to investigate further. Will continue on monday.


---
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 infrastructure@apache.org or file a JIRA ticket
with INFRA.
---

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

Posted by jburwell <gi...@git.apache.org>.
Github user jburwell commented on a diff in the pull request:

    https://github.com/apache/cloudstack/pull/1624#discussion_r74314477
  
    --- 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<UsageEventVO> persistedItems;
    +
    +    public MockUsageEventDao() {
    +        persistedItems = new ArrayList<UsageEventVO>();
    +    }
    +
    +    @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<UsageEventVO> createSearchBuilder() {
    +        // TODO Auto-generated method stub
    +        return null;
    +    }
    +
    +    @Override
    +    public <K> GenericSearchBuilder<UsageEventVO, K> createSearchBuilder(
    +            Class<K> clazz) {
    +        // TODO Auto-generated method stub
    +        return null;
    +    }
    +
    +    @Override
    +    public UsageEventVO createForUpdate(Long id) {
    +        // TODO Auto-generated method stub
    +        return null;
    +    }
    +
    +    @Override
    +    public SearchCriteria<UsageEventVO> createSearchCriteria() {
    +        // TODO Auto-generated method stub
    +        return null;
    +    }
    +
    +    @Override
    +    public List<UsageEventVO> lockRows(SearchCriteria<UsageEventVO> sc,
    +            Filter filter, boolean exclusive) {
    +        // TODO Auto-generated method stub
    +        return null;
    +    }
    +
    +    @Override
    +    public UsageEventVO lockOneRandomRow(SearchCriteria<UsageEventVO> 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<UsageEventVO> sc) {
    +        // TODO Auto-generated method stub
    +        return 0;
    +    }
    +
    +    @Override
    +    public List<UsageEventVO> listAll() {
    +
    +        return persistedItems;
    +    }
    +
    +    @Override
    +    public List<UsageEventVO> listAll(Filter filter) {
    +        // TODO Auto-generated method stub
    +        return null;
    +    }
    +
    +    @Override
    +    public List<UsageEventVO> search(SearchCriteria<UsageEventVO> sc,
    +            Filter filter) {
    +        // TODO Auto-generated method stub
    +        return null;
    +    }
    +
    +    @Override
    +    public List<UsageEventVO> search(SearchCriteria<UsageEventVO> sc,
    +            Filter filter, boolean enableQueryCache) {
    +        // TODO Auto-generated method stub
    +        return null;
    +    }
    +
    +    @Override
    +    public List<UsageEventVO> searchIncludingRemoved(
    +            SearchCriteria<UsageEventVO> sc, Filter filter, Boolean lock,
    +            boolean cache) {
    +        // TODO Auto-generated method stub
    +        return null;
    +    }
    +
    +    @Override
    +    public List<UsageEventVO> searchIncludingRemoved(
    +            SearchCriteria<UsageEventVO> sc, Filter filter, Boolean lock,
    +            boolean cache, boolean enableQueryCache) {
    +        // TODO Auto-generated method stub
    +        return null;
    +    }
    +
    +    @Override
    +    public <M> List<M> customSearchIncludingRemoved(SearchCriteria<M> sc,
    +            Filter filter) {
    +        // TODO Auto-generated method stub
    +        return null;
    +    }
    +
    +    @Override
    +    public List<UsageEventVO> listAllIncludingRemoved() {
    +        // TODO Auto-generated method stub
    +        return null;
    +    }
    +
    +    @Override
    +    public List<UsageEventVO> listAllIncludingRemoved(Filter filter) {
    +        // TODO Auto-generated method stub
    +        return null;
    +    }
    +
    +    @Override
    +    public UsageEventVO persist(UsageEventVO entity) {
    +        persistedItems.add(entity);
    +        return entity;
    +    }
    +
    +    @Override
    +    public boolean remove(Long id) {
    +        // TODO Auto-generated method stub
    +        return false;
    +    }
    +
    +    @Override
    +    public int remove(SearchCriteria<UsageEventVO> sc) {
    +        // TODO Auto-generated method stub
    +        return 0;
    +    }
    +
    +    @Override
    +    public boolean expunge(Long id) {
    +        // TODO Auto-generated method stub
    +        return false;
    +    }
    +
    +    @Override
    +    public int expunge(SearchCriteria<UsageEventVO> sc) {
    +        // TODO Auto-generated method stub
    +        return 0;
    +    }
    +
    +    @Override
    +    public void expunge() {
    +        // 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 infrastructure@apache.org or file a JIRA ticket
with INFRA.
---

[GitHub] cloudstack issue #1624: Fixes regarding VOLUME_DELETE events resulting from ...

Posted by ProjectMoon <gi...@git.apache.org>.
Github user ProjectMoon commented on the issue:

    https://github.com/apache/cloudstack/pull/1624
  
    Has been rebased against latest 4.8 and the `TODO` comments removed. The map was left alone 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 infrastructure@apache.org or file a JIRA ticket
with INFRA.
---

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

Posted by jburwell <gi...@git.apache.org>.
Github user jburwell commented on a diff in the pull request:

    https://github.com/apache/cloudstack/pull/1624#discussion_r74314710
  
    --- 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<UsageEventVO> persistedItems;
    +
    +    public MockUsageEventDao() {
    +        persistedItems = new ArrayList<UsageEventVO>();
    +    }
    +
    +    @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<UsageEventVO> createSearchBuilder() {
    +        // TODO Auto-generated method stub
    +        return null;
    +    }
    +
    +    @Override
    +    public <K> GenericSearchBuilder<UsageEventVO, K> createSearchBuilder(
    +            Class<K> clazz) {
    +        // TODO Auto-generated method stub
    +        return null;
    +    }
    +
    +    @Override
    +    public UsageEventVO createForUpdate(Long id) {
    +        // TODO Auto-generated method stub
    +        return null;
    +    }
    +
    +    @Override
    +    public SearchCriteria<UsageEventVO> createSearchCriteria() {
    +        // TODO Auto-generated method stub
    +        return null;
    +    }
    +
    +    @Override
    +    public List<UsageEventVO> lockRows(SearchCriteria<UsageEventVO> sc,
    +            Filter filter, boolean exclusive) {
    +        // TODO Auto-generated method stub
    +        return null;
    +    }
    +
    +    @Override
    +    public UsageEventVO lockOneRandomRow(SearchCriteria<UsageEventVO> 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<UsageEventVO> sc) {
    +        // TODO Auto-generated method stub
    +        return 0;
    +    }
    +
    +    @Override
    +    public List<UsageEventVO> listAll() {
    +
    +        return persistedItems;
    +    }
    +
    +    @Override
    +    public List<UsageEventVO> listAll(Filter filter) {
    +        // TODO Auto-generated method stub
    +        return null;
    +    }
    +
    +    @Override
    +    public List<UsageEventVO> search(SearchCriteria<UsageEventVO> sc,
    +            Filter filter) {
    +        // TODO Auto-generated method stub
    +        return null;
    +    }
    +
    +    @Override
    +    public List<UsageEventVO> search(SearchCriteria<UsageEventVO> sc,
    +            Filter filter, boolean enableQueryCache) {
    +        // TODO Auto-generated method stub
    +        return null;
    +    }
    +
    +    @Override
    +    public List<UsageEventVO> searchIncludingRemoved(
    +            SearchCriteria<UsageEventVO> sc, Filter filter, Boolean lock,
    +            boolean cache) {
    +        // TODO Auto-generated method stub
    +        return null;
    +    }
    +
    +    @Override
    +    public List<UsageEventVO> searchIncludingRemoved(
    +            SearchCriteria<UsageEventVO> sc, Filter filter, Boolean lock,
    +            boolean cache, boolean enableQueryCache) {
    +        // TODO Auto-generated method stub
    +        return null;
    +    }
    +
    +    @Override
    +    public <M> List<M> customSearchIncludingRemoved(SearchCriteria<M> sc,
    +            Filter filter) {
    +        // TODO Auto-generated method stub
    +        return null;
    +    }
    +
    +    @Override
    +    public List<UsageEventVO> listAllIncludingRemoved() {
    +        // TODO Auto-generated method stub
    +        return null;
    +    }
    +
    +    @Override
    +    public List<UsageEventVO> listAllIncludingRemoved(Filter filter) {
    +        // TODO Auto-generated method stub
    +        return null;
    +    }
    +
    +    @Override
    +    public UsageEventVO persist(UsageEventVO entity) {
    +        persistedItems.add(entity);
    +        return entity;
    +    }
    +
    +    @Override
    +    public boolean remove(Long id) {
    +        // TODO Auto-generated method stub
    +        return false;
    +    }
    +
    +    @Override
    +    public int remove(SearchCriteria<UsageEventVO> sc) {
    +        // TODO Auto-generated method stub
    +        return 0;
    +    }
    +
    +    @Override
    +    public boolean expunge(Long id) {
    +        // TODO Auto-generated method stub
    +        return false;
    +    }
    +
    +    @Override
    +    public int expunge(SearchCriteria<UsageEventVO> sc) {
    +        // TODO Auto-generated method stub
    +        return 0;
    +    }
    +
    +    @Override
    +    public void expunge() {
    +        // TODO Auto-generated method stub
    +
    +    }
    +
    +    @Override
    +    public <K> K getNextInSequence(Class<K> clazz, String name) {
    +        // TODO Auto-generated method stub
    +        return null;
    +    }
    +
    +    @Override
    +    public boolean configure(String name, Map<String, Object> params)
    +            throws ConfigurationException {
    +        // TODO Auto-generated method stub
    +        return false;
    +    }
    +
    +    @Override
    +    public <M> List<M> customSearch(SearchCriteria<M> sc, Filter filter) {
    +        // TODO Auto-generated method stub
    +        return null;
    +    }
    +
    +    @Override
    +    public boolean lockInLockTable(String id) {
    +        // TODO Auto-generated method stub
    +        return false;
    +    }
    +
    +    @Override
    +    public boolean lockInLockTable(String id, int seconds) {
    +        // TODO Auto-generated method stub
    +        return false;
    +    }
    +
    +    @Override
    +    public boolean unlockFromLockTable(String id) {
    +        // TODO Auto-generated method stub
    +        return false;
    +    }
    +
    +    @Override
    +    public <K> K getRandomlyIncreasingNextInSequence(Class<K> clazz, String name) {
    +        // 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 infrastructure@apache.org or file a JIRA ticket
with INFRA.
---

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

Posted by jburwell <gi...@git.apache.org>.
Github user jburwell commented on a diff in the pull request:

    https://github.com/apache/cloudstack/pull/1624#discussion_r74314650
  
    --- 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<UsageEventVO> persistedItems;
    +
    +    public MockUsageEventDao() {
    +        persistedItems = new ArrayList<UsageEventVO>();
    +    }
    +
    +    @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<UsageEventVO> createSearchBuilder() {
    +        // TODO Auto-generated method stub
    +        return null;
    +    }
    +
    +    @Override
    +    public <K> GenericSearchBuilder<UsageEventVO, K> createSearchBuilder(
    +            Class<K> clazz) {
    +        // TODO Auto-generated method stub
    +        return null;
    +    }
    +
    +    @Override
    +    public UsageEventVO createForUpdate(Long id) {
    +        // TODO Auto-generated method stub
    +        return null;
    +    }
    +
    +    @Override
    +    public SearchCriteria<UsageEventVO> createSearchCriteria() {
    +        // TODO Auto-generated method stub
    +        return null;
    +    }
    +
    +    @Override
    +    public List<UsageEventVO> lockRows(SearchCriteria<UsageEventVO> sc,
    +            Filter filter, boolean exclusive) {
    +        // TODO Auto-generated method stub
    +        return null;
    +    }
    +
    +    @Override
    +    public UsageEventVO lockOneRandomRow(SearchCriteria<UsageEventVO> 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<UsageEventVO> sc) {
    +        // TODO Auto-generated method stub
    +        return 0;
    +    }
    +
    +    @Override
    +    public List<UsageEventVO> listAll() {
    +
    +        return persistedItems;
    +    }
    +
    +    @Override
    +    public List<UsageEventVO> listAll(Filter filter) {
    +        // TODO Auto-generated method stub
    +        return null;
    +    }
    +
    +    @Override
    +    public List<UsageEventVO> search(SearchCriteria<UsageEventVO> sc,
    +            Filter filter) {
    +        // TODO Auto-generated method stub
    +        return null;
    +    }
    +
    +    @Override
    +    public List<UsageEventVO> search(SearchCriteria<UsageEventVO> sc,
    +            Filter filter, boolean enableQueryCache) {
    +        // TODO Auto-generated method stub
    +        return null;
    +    }
    +
    +    @Override
    +    public List<UsageEventVO> searchIncludingRemoved(
    +            SearchCriteria<UsageEventVO> sc, Filter filter, Boolean lock,
    +            boolean cache) {
    +        // TODO Auto-generated method stub
    +        return null;
    +    }
    +
    +    @Override
    +    public List<UsageEventVO> searchIncludingRemoved(
    +            SearchCriteria<UsageEventVO> sc, Filter filter, Boolean lock,
    +            boolean cache, boolean enableQueryCache) {
    +        // TODO Auto-generated method stub
    +        return null;
    +    }
    +
    +    @Override
    +    public <M> List<M> customSearchIncludingRemoved(SearchCriteria<M> sc,
    +            Filter filter) {
    +        // TODO Auto-generated method stub
    +        return null;
    +    }
    +
    +    @Override
    +    public List<UsageEventVO> listAllIncludingRemoved() {
    +        // TODO Auto-generated method stub
    +        return null;
    +    }
    +
    +    @Override
    +    public List<UsageEventVO> listAllIncludingRemoved(Filter filter) {
    +        // TODO Auto-generated method stub
    +        return null;
    +    }
    +
    +    @Override
    +    public UsageEventVO persist(UsageEventVO entity) {
    +        persistedItems.add(entity);
    +        return entity;
    +    }
    +
    +    @Override
    +    public boolean remove(Long id) {
    +        // TODO Auto-generated method stub
    +        return false;
    +    }
    +
    +    @Override
    +    public int remove(SearchCriteria<UsageEventVO> sc) {
    +        // TODO Auto-generated method stub
    +        return 0;
    +    }
    +
    +    @Override
    +    public boolean expunge(Long id) {
    +        // TODO Auto-generated method stub
    +        return false;
    +    }
    +
    +    @Override
    +    public int expunge(SearchCriteria<UsageEventVO> sc) {
    +        // TODO Auto-generated method stub
    +        return 0;
    +    }
    +
    +    @Override
    +    public void expunge() {
    +        // TODO Auto-generated method stub
    +
    +    }
    +
    +    @Override
    +    public <K> K getNextInSequence(Class<K> clazz, String name) {
    +        // TODO Auto-generated method stub
    +        return null;
    +    }
    +
    +    @Override
    +    public boolean configure(String name, Map<String, Object> params)
    +            throws ConfigurationException {
    +        // TODO Auto-generated method stub
    +        return false;
    +    }
    +
    +    @Override
    +    public <M> List<M> customSearch(SearchCriteria<M> sc, Filter filter) {
    +        // TODO Auto-generated method stub
    +        return null;
    +    }
    +
    +    @Override
    +    public boolean lockInLockTable(String id) {
    +        // TODO Auto-generated method stub
    +        return false;
    +    }
    +
    +    @Override
    +    public boolean lockInLockTable(String id, int seconds) {
    +        // TODO Auto-generated method stub
    +        return false;
    +    }
    +
    +    @Override
    +    public boolean unlockFromLockTable(String id) {
    +        // TODO Auto-generated method stub
    +        return false;
    +    }
    +
    +    @Override
    +    public <K> K getRandomlyIncreasingNextInSequence(Class<K> clazz, String name) {
    +        // TODO Auto-generated method stub
    +        return null;
    +    }
    +
    +    @Override
    +    public UsageEventVO findOneBy(SearchCriteria<UsageEventVO> sc) {
    +        // TODO Auto-generated method stub
    +        return null;
    +    }
    +
    +    @Override
    +    public Class<UsageEventVO> getEntityBeanType() {
    +        // TODO Auto-generated method stub
    +        return null;
    +    }
    +
    +    @Override
    +    public Pair<List<UsageEventVO>, Integer> searchAndCount(
    +            SearchCriteria<UsageEventVO> sc, Filter filter) {
    +        // TODO Auto-generated method stub
    +        return null;
    +    }
    +
    +    @Override
    +    public Pair<List<UsageEventVO>, Integer> searchAndDistinctCount(SearchCriteria<UsageEventVO> sc, Filter filter) {
    +        //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 infrastructure@apache.org or file a JIRA ticket
with INFRA.
---

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

Posted by jburwell <gi...@git.apache.org>.
Github user jburwell commented on a diff in the pull request:

    https://github.com/apache/cloudstack/pull/1624#discussion_r74314529
  
    --- 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<UsageEventVO> persistedItems;
    +
    +    public MockUsageEventDao() {
    +        persistedItems = new ArrayList<UsageEventVO>();
    +    }
    +
    +    @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<UsageEventVO> createSearchBuilder() {
    +        // TODO Auto-generated method stub
    +        return null;
    +    }
    +
    +    @Override
    +    public <K> GenericSearchBuilder<UsageEventVO, K> createSearchBuilder(
    +            Class<K> clazz) {
    +        // TODO Auto-generated method stub
    +        return null;
    +    }
    +
    +    @Override
    +    public UsageEventVO createForUpdate(Long id) {
    +        // TODO Auto-generated method stub
    +        return null;
    +    }
    +
    +    @Override
    +    public SearchCriteria<UsageEventVO> createSearchCriteria() {
    +        // TODO Auto-generated method stub
    +        return null;
    +    }
    +
    +    @Override
    +    public List<UsageEventVO> lockRows(SearchCriteria<UsageEventVO> sc,
    +            Filter filter, boolean exclusive) {
    +        // TODO Auto-generated method stub
    +        return null;
    +    }
    +
    +    @Override
    +    public UsageEventVO lockOneRandomRow(SearchCriteria<UsageEventVO> 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<UsageEventVO> sc) {
    +        // TODO Auto-generated method stub
    +        return 0;
    +    }
    +
    +    @Override
    +    public List<UsageEventVO> listAll() {
    +
    +        return persistedItems;
    +    }
    +
    +    @Override
    +    public List<UsageEventVO> listAll(Filter filter) {
    +        // TODO Auto-generated method stub
    +        return null;
    +    }
    +
    +    @Override
    +    public List<UsageEventVO> search(SearchCriteria<UsageEventVO> sc,
    +            Filter filter) {
    +        // TODO Auto-generated method stub
    +        return null;
    +    }
    +
    +    @Override
    +    public List<UsageEventVO> search(SearchCriteria<UsageEventVO> sc,
    +            Filter filter, boolean enableQueryCache) {
    +        // TODO Auto-generated method stub
    +        return null;
    +    }
    +
    +    @Override
    +    public List<UsageEventVO> searchIncludingRemoved(
    +            SearchCriteria<UsageEventVO> sc, Filter filter, Boolean lock,
    +            boolean cache) {
    +        // TODO Auto-generated method stub
    +        return null;
    +    }
    +
    +    @Override
    +    public List<UsageEventVO> searchIncludingRemoved(
    +            SearchCriteria<UsageEventVO> sc, Filter filter, Boolean lock,
    +            boolean cache, boolean enableQueryCache) {
    +        // TODO Auto-generated method stub
    +        return null;
    +    }
    +
    +    @Override
    +    public <M> List<M> customSearchIncludingRemoved(SearchCriteria<M> sc,
    +            Filter filter) {
    +        // TODO Auto-generated method stub
    +        return null;
    +    }
    +
    +    @Override
    +    public List<UsageEventVO> listAllIncludingRemoved() {
    +        // TODO Auto-generated method stub
    +        return null;
    +    }
    +
    +    @Override
    +    public List<UsageEventVO> listAllIncludingRemoved(Filter filter) {
    +        // TODO Auto-generated method stub
    +        return null;
    +    }
    +
    +    @Override
    +    public UsageEventVO persist(UsageEventVO entity) {
    +        persistedItems.add(entity);
    +        return entity;
    +    }
    +
    +    @Override
    +    public boolean remove(Long id) {
    +        // TODO Auto-generated method stub
    +        return false;
    +    }
    +
    +    @Override
    +    public int remove(SearchCriteria<UsageEventVO> sc) {
    +        // TODO Auto-generated method stub
    +        return 0;
    +    }
    +
    +    @Override
    +    public boolean expunge(Long id) {
    +        // TODO Auto-generated method stub
    +        return false;
    +    }
    +
    +    @Override
    +    public int expunge(SearchCriteria<UsageEventVO> sc) {
    +        // TODO Auto-generated method stub
    +        return 0;
    +    }
    +
    +    @Override
    +    public void expunge() {
    +        // TODO Auto-generated method stub
    +
    +    }
    +
    +    @Override
    +    public <K> K getNextInSequence(Class<K> clazz, String name) {
    +        // TODO Auto-generated method stub
    +        return null;
    +    }
    +
    +    @Override
    +    public boolean configure(String name, Map<String, Object> params)
    +            throws ConfigurationException {
    +        // 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 infrastructure@apache.org or file a JIRA ticket
with INFRA.
---

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

Posted by jburwell <gi...@git.apache.org>.
Github user jburwell commented on a diff in the pull request:

    https://github.com/apache/cloudstack/pull/1624#discussion_r74314735
  
    --- 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<UsageEventVO> persistedItems;
    +
    +    public MockUsageEventDao() {
    +        persistedItems = new ArrayList<UsageEventVO>();
    +    }
    +
    +    @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<UsageEventVO> createSearchBuilder() {
    +        // TODO Auto-generated method stub
    +        return null;
    +    }
    +
    +    @Override
    +    public <K> GenericSearchBuilder<UsageEventVO, K> createSearchBuilder(
    +            Class<K> clazz) {
    +        // TODO Auto-generated method stub
    +        return null;
    +    }
    +
    +    @Override
    +    public UsageEventVO createForUpdate(Long id) {
    +        // TODO Auto-generated method stub
    +        return null;
    +    }
    +
    +    @Override
    +    public SearchCriteria<UsageEventVO> createSearchCriteria() {
    +        // TODO Auto-generated method stub
    +        return null;
    +    }
    +
    +    @Override
    +    public List<UsageEventVO> lockRows(SearchCriteria<UsageEventVO> sc,
    +            Filter filter, boolean exclusive) {
    +        // TODO Auto-generated method stub
    +        return null;
    +    }
    +
    +    @Override
    +    public UsageEventVO lockOneRandomRow(SearchCriteria<UsageEventVO> 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<UsageEventVO> sc) {
    +        // TODO Auto-generated method stub
    +        return 0;
    +    }
    +
    +    @Override
    +    public List<UsageEventVO> listAll() {
    +
    +        return persistedItems;
    +    }
    +
    +    @Override
    +    public List<UsageEventVO> listAll(Filter filter) {
    +        // TODO Auto-generated method stub
    +        return null;
    +    }
    +
    +    @Override
    +    public List<UsageEventVO> search(SearchCriteria<UsageEventVO> sc,
    +            Filter filter) {
    +        // TODO Auto-generated method stub
    +        return null;
    +    }
    +
    +    @Override
    +    public List<UsageEventVO> search(SearchCriteria<UsageEventVO> sc,
    +            Filter filter, boolean enableQueryCache) {
    +        // TODO Auto-generated method stub
    +        return null;
    +    }
    +
    +    @Override
    +    public List<UsageEventVO> searchIncludingRemoved(
    +            SearchCriteria<UsageEventVO> sc, Filter filter, Boolean lock,
    +            boolean cache) {
    +        // TODO Auto-generated method stub
    +        return null;
    +    }
    +
    +    @Override
    +    public List<UsageEventVO> searchIncludingRemoved(
    +            SearchCriteria<UsageEventVO> sc, Filter filter, Boolean lock,
    +            boolean cache, boolean enableQueryCache) {
    +        // TODO Auto-generated method stub
    +        return null;
    +    }
    +
    +    @Override
    +    public <M> List<M> customSearchIncludingRemoved(SearchCriteria<M> sc,
    +            Filter filter) {
    +        // TODO Auto-generated method stub
    +        return null;
    +    }
    +
    +    @Override
    +    public List<UsageEventVO> listAllIncludingRemoved() {
    +        // TODO Auto-generated method stub
    +        return null;
    +    }
    +
    +    @Override
    +    public List<UsageEventVO> listAllIncludingRemoved(Filter filter) {
    +        // TODO Auto-generated method stub
    +        return null;
    +    }
    +
    +    @Override
    +    public UsageEventVO persist(UsageEventVO entity) {
    +        persistedItems.add(entity);
    +        return entity;
    +    }
    +
    +    @Override
    +    public boolean remove(Long id) {
    +        // TODO Auto-generated method stub
    +        return false;
    +    }
    +
    +    @Override
    +    public int remove(SearchCriteria<UsageEventVO> sc) {
    +        // TODO Auto-generated method stub
    +        return 0;
    +    }
    +
    +    @Override
    +    public boolean expunge(Long id) {
    +        // TODO Auto-generated method stub
    +        return false;
    +    }
    +
    +    @Override
    +    public int expunge(SearchCriteria<UsageEventVO> sc) {
    +        // TODO Auto-generated method stub
    +        return 0;
    +    }
    +
    +    @Override
    +    public void expunge() {
    +        // TODO Auto-generated method stub
    +
    +    }
    +
    +    @Override
    +    public <K> K getNextInSequence(Class<K> clazz, String name) {
    +        // TODO Auto-generated method stub
    +        return null;
    +    }
    +
    +    @Override
    +    public boolean configure(String name, Map<String, Object> params)
    +            throws ConfigurationException {
    +        // TODO Auto-generated method stub
    +        return false;
    +    }
    +
    +    @Override
    +    public <M> List<M> customSearch(SearchCriteria<M> sc, Filter filter) {
    +        // TODO Auto-generated method stub
    +        return null;
    +    }
    +
    +    @Override
    +    public boolean lockInLockTable(String id) {
    +        // TODO Auto-generated method stub
    +        return false;
    +    }
    +
    +    @Override
    +    public boolean lockInLockTable(String 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 infrastructure@apache.org or file a JIRA ticket
with INFRA.
---

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

Posted by jburwell <gi...@git.apache.org>.
Github user jburwell commented on a diff in the pull request:

    https://github.com/apache/cloudstack/pull/1624#discussion_r74314697
  
    --- 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<UsageEventVO> persistedItems;
    +
    +    public MockUsageEventDao() {
    +        persistedItems = new ArrayList<UsageEventVO>();
    +    }
    +
    +    @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<UsageEventVO> createSearchBuilder() {
    +        // TODO Auto-generated method stub
    +        return null;
    +    }
    +
    +    @Override
    +    public <K> GenericSearchBuilder<UsageEventVO, K> createSearchBuilder(
    +            Class<K> clazz) {
    +        // TODO Auto-generated method stub
    +        return null;
    +    }
    +
    +    @Override
    +    public UsageEventVO createForUpdate(Long id) {
    +        // TODO Auto-generated method stub
    +        return null;
    +    }
    +
    +    @Override
    +    public SearchCriteria<UsageEventVO> createSearchCriteria() {
    +        // TODO Auto-generated method stub
    +        return null;
    +    }
    +
    +    @Override
    +    public List<UsageEventVO> lockRows(SearchCriteria<UsageEventVO> sc,
    +            Filter filter, boolean exclusive) {
    +        // TODO Auto-generated method stub
    +        return null;
    +    }
    +
    +    @Override
    +    public UsageEventVO lockOneRandomRow(SearchCriteria<UsageEventVO> 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<UsageEventVO> sc) {
    +        // TODO Auto-generated method stub
    +        return 0;
    +    }
    +
    +    @Override
    +    public List<UsageEventVO> listAll() {
    +
    +        return persistedItems;
    +    }
    +
    +    @Override
    +    public List<UsageEventVO> listAll(Filter filter) {
    +        // TODO Auto-generated method stub
    +        return null;
    +    }
    +
    +    @Override
    +    public List<UsageEventVO> search(SearchCriteria<UsageEventVO> sc,
    +            Filter filter) {
    +        // TODO Auto-generated method stub
    +        return null;
    +    }
    +
    +    @Override
    +    public List<UsageEventVO> search(SearchCriteria<UsageEventVO> sc,
    +            Filter filter, boolean enableQueryCache) {
    +        // TODO Auto-generated method stub
    +        return null;
    +    }
    +
    +    @Override
    +    public List<UsageEventVO> searchIncludingRemoved(
    +            SearchCriteria<UsageEventVO> sc, Filter filter, Boolean lock,
    +            boolean cache) {
    +        // TODO Auto-generated method stub
    +        return null;
    +    }
    +
    +    @Override
    +    public List<UsageEventVO> searchIncludingRemoved(
    +            SearchCriteria<UsageEventVO> sc, Filter filter, Boolean lock,
    +            boolean cache, boolean enableQueryCache) {
    +        // TODO Auto-generated method stub
    +        return null;
    +    }
    +
    +    @Override
    +    public <M> List<M> customSearchIncludingRemoved(SearchCriteria<M> sc,
    +            Filter filter) {
    +        // TODO Auto-generated method stub
    +        return null;
    +    }
    +
    +    @Override
    +    public List<UsageEventVO> listAllIncludingRemoved() {
    +        // TODO Auto-generated method stub
    +        return null;
    +    }
    +
    +    @Override
    +    public List<UsageEventVO> listAllIncludingRemoved(Filter filter) {
    +        // TODO Auto-generated method stub
    +        return null;
    +    }
    +
    +    @Override
    +    public UsageEventVO persist(UsageEventVO entity) {
    +        persistedItems.add(entity);
    +        return entity;
    +    }
    +
    +    @Override
    +    public boolean remove(Long id) {
    +        // TODO Auto-generated method stub
    +        return false;
    +    }
    +
    +    @Override
    +    public int remove(SearchCriteria<UsageEventVO> sc) {
    +        // TODO Auto-generated method stub
    +        return 0;
    +    }
    +
    +    @Override
    +    public boolean expunge(Long id) {
    +        // TODO Auto-generated method stub
    +        return false;
    +    }
    +
    +    @Override
    +    public int expunge(SearchCriteria<UsageEventVO> sc) {
    +        // TODO Auto-generated method stub
    +        return 0;
    +    }
    +
    +    @Override
    +    public void expunge() {
    +        // TODO Auto-generated method stub
    +
    +    }
    +
    +    @Override
    +    public <K> K getNextInSequence(Class<K> clazz, String name) {
    +        // TODO Auto-generated method stub
    +        return null;
    +    }
    +
    +    @Override
    +    public boolean configure(String name, Map<String, Object> params)
    +            throws ConfigurationException {
    +        // TODO Auto-generated method stub
    +        return false;
    +    }
    +
    +    @Override
    +    public <M> List<M> customSearch(SearchCriteria<M> sc, Filter filter) {
    +        // TODO Auto-generated method stub
    +        return null;
    +    }
    +
    +    @Override
    +    public boolean lockInLockTable(String id) {
    +        // TODO Auto-generated method stub
    +        return false;
    +    }
    +
    +    @Override
    +    public boolean lockInLockTable(String id, int seconds) {
    +        // TODO Auto-generated method stub
    +        return false;
    +    }
    +
    +    @Override
    +    public boolean unlockFromLockTable(String id) {
    +        // TODO Auto-generated method stub
    +        return false;
    +    }
    +
    +    @Override
    +    public <K> K getRandomlyIncreasingNextInSequence(Class<K> clazz, String name) {
    +        // TODO Auto-generated method stub
    +        return null;
    +    }
    +
    +    @Override
    +    public UsageEventVO findOneBy(SearchCriteria<UsageEventVO> sc) {
    +        // 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 infrastructure@apache.org or file a JIRA ticket
with INFRA.
---

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

Posted by jburwell <gi...@git.apache.org>.
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<UsageEventVO> persistedItems;
    +
    +    public MockUsageEventDao() {
    +        persistedItems = new ArrayList<UsageEventVO>();
    +    }
    +
    +    @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<UsageEventVO> createSearchBuilder() {
    +        // TODO Auto-generated method stub
    +        return null;
    +    }
    +
    +    @Override
    +    public <K> GenericSearchBuilder<UsageEventVO, K> createSearchBuilder(
    +            Class<K> clazz) {
    +        // TODO Auto-generated method stub
    +        return null;
    +    }
    +
    +    @Override
    +    public UsageEventVO createForUpdate(Long id) {
    +        // TODO Auto-generated method stub
    +        return null;
    +    }
    +
    +    @Override
    +    public SearchCriteria<UsageEventVO> createSearchCriteria() {
    +        // TODO Auto-generated method stub
    +        return null;
    +    }
    +
    +    @Override
    +    public List<UsageEventVO> lockRows(SearchCriteria<UsageEventVO> sc,
    +            Filter filter, boolean exclusive) {
    +        // TODO Auto-generated method stub
    +        return null;
    +    }
    +
    +    @Override
    +    public UsageEventVO lockOneRandomRow(SearchCriteria<UsageEventVO> 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 infrastructure@apache.org or file a JIRA ticket
with INFRA.
---

[GitHub] cloudstack issue #1624: Fixes regarding VOLUME_DELETE events resulting from ...

Posted by nnesic <gi...@git.apache.org>.
Github user nnesic commented on the issue:

    https://github.com/apache/cloudstack/pull/1624
  
    @blueorangutan kick


---
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 infrastructure@apache.org or file a JIRA ticket
with INFRA.
---

[GitHub] cloudstack issue #1624: Fixes regarding VOLUME_DELETE events resulting from ...

Posted by karuturi <gi...@git.apache.org>.
Github user karuturi commented on the issue:

    https://github.com/apache/cloudstack/pull/1624
  
    Iso tests failed as the iso url wasnt accessible from our test environment. All is well here.
    @ProjectMoon were there any code changes in your latest rebase? (meaning, do we have to run BVT again?)



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

[GitHub] cloudstack issue #1624: Fixes regarding VOLUME_DELETE events resulting from ...

Posted by ProjectMoon <gi...@git.apache.org>.
Github user ProjectMoon commented on the issue:

    https://github.com/apache/cloudstack/pull/1624
  
    No code changes, just updating the commits under 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 infrastructure@apache.org or file a JIRA ticket
with INFRA.
---

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

Posted by rhtyd <gi...@git.apache.org>.
Github user rhtyd commented on a diff in the pull request:

    https://github.com/apache/cloudstack/pull/1624#discussion_r77325991
  
    --- Diff: server/src/com/cloud/user/AccountManagerImpl.java ---
    @@ -677,6 +679,17 @@ public boolean deleteAccount(AccountVO account, long callerUserId, Account calle
             return cleanupAccount(account, callerUserId, caller);
         }
     
    +    protected List<VolumeVO> getExpungedInstanceRootVolume(long instanceId) {
    +        SearchBuilder<VolumeVO> sb = _volumeDao.createSearchBuilder();
    +        sb.and("instanceId", sb.entity().getInstanceId(), SearchCriteria.Op.EQ);
    +        sb.and("vType", sb.entity().getVolumeType(), SearchCriteria.Op.EQ);
    +        sb.done();
    +        SearchCriteria<VolumeVO> c = sb.create();
    +        c.setParameters("instanceId", instanceId);
    +        c.setParameters("vType", Volume.Type.ROOT);
    +        return _volumeDao.customSearchIncludingRemoved(c, null);
    --- End diff --
    
    This method does not return expunged volume, but root volume of a VM. Could there be a case where a VM can have more than one root volume? If not, let's rename the method to say `getInstanceRootVolume` and return just the VolumeVO instead a list.


---
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 infrastructure@apache.org or file a JIRA ticket
with INFRA.
---

[GitHub] cloudstack issue #1624: Fixes regarding VOLUME_DELETE events resulting from ...

Posted by blueorangutan <gi...@git.apache.org>.
Github user blueorangutan commented on the issue:

    https://github.com/apache/cloudstack/pull/1624
  
    A Trillian-Jenkins job has been kicked to build packages and start testing. 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 infrastructure@apache.org or file a JIRA ticket
with INFRA.
---

[GitHub] cloudstack issue #1624: Fixes regarding VOLUME_DELETE events resulting from ...

Posted by jburwell <gi...@git.apache.org>.
Github user jburwell commented on the issue:

    https://github.com/apache/cloudstack/pull/1624
  
    @ProjectMoon I want to get this PR into 4.8.2.0, 4.9.1.0, and 4.10.0.0 for which we will be cutting RCs on 25 Sept 2016.  Tests should be the entire Marvin smoke test suite against VMware, KVM, and XenServer, as well as, the `test_account` component test.
    
    Also, is it possible to automate the test procedure described in the description?  Given the amount of change in the project, we want to keep manual testing to an absolute minimum.
    
    Finally, is there a JIRA ticket for this bug?


---
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 infrastructure@apache.org or file a JIRA ticket
with INFRA.
---

[GitHub] cloudstack issue #1624: Fixes regarding VOLUME_DELETE events resulting from ...

Posted by karuturi <gi...@git.apache.org>.
Github user karuturi commented on the issue:

    https://github.com/apache/cloudstack/pull/1624
  
    Iso failures are due to URL access issues. All good here. merging this 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 infrastructure@apache.org or file a JIRA ticket
with INFRA.
---

[GitHub] cloudstack issue #1624: Fixes regarding VOLUME_DELETE events resulting from ...

Posted by cloudmonger <gi...@git.apache.org>.
Github user cloudmonger commented on the issue:

    https://github.com/apache/cloudstack/pull/1624
  
    ### ACS CI BVT Run
     **Sumarry:**
     Build Number 116
     Hypervisor xenserver
     NetworkType Advanced
     Passed=103
     Failed=2
     Skipped=5
    
    _Link to logs Folder (search by build_no):_ https://www.dropbox.com/sh/yj3wnzbceo9uef2/AAB6u-Iap-xztdm6jHX9SjPja?dl=0
    
    
    **Failed tests:**
    * test_deploy_vm_iso.py
    
     * test_deploy_vm_from_iso Failing since 4 runs
    
    * test_vm_life_cycle.py
    
     * test_10_attachAndDetach_iso Failing since 4 runs
    
    
    **Skipped tests:**
    test_01_test_vm_volume_snapshot
    test_vm_nic_adapter_vmxnet3
    test_static_role_account_acls
    test_3d_gpu_support
    test_deploy_vgpu_enabled_vm
    
    **Passed test suits:**
    test_deploy_vm_with_userdata.py
    test_affinity_groups_projects.py
    test_portable_publicip.py
    test_over_provisioning.py
    test_global_settings.py
    test_scale_vm.py
    test_service_offerings.py
    test_routers_iptables_default_policy.py
    test_loadbalance.py
    test_routers.py
    test_reset_vm_on_reboot.py
    test_snapshots.py
    test_deploy_vms_with_varied_deploymentplanners.py
    test_network.py
    test_router_dns.py
    test_non_contigiousvlan.py
    test_login.py
    test_list_ids_parameter.py
    test_public_ip_range.py
    test_multipleips_per_nic.py
    test_regions.py
    test_affinity_groups.py
    test_network_acl.py
    test_pvlan.py
    test_volumes.py
    test_ssvm.py
    test_nic.py
    test_deploy_vm_root_resize.py
    test_resource_detail.py
    test_secondary_storage.py
    test_routers_network_ops.py
    test_disk_offerings.py


---
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 infrastructure@apache.org or file a JIRA ticket
with INFRA.
---

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

Posted by jburwell <gi...@git.apache.org>.
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<UsageEventVO> persistedItems;
    +
    +    public MockUsageEventDao() {
    +        persistedItems = new ArrayList<UsageEventVO>();
    +    }
    +
    +    @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 infrastructure@apache.org or file a JIRA ticket
with INFRA.
---

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

Posted by jburwell <gi...@git.apache.org>.
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<String, String> usageUtilsFields = new HashMap<String, String>();
    +        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 infrastructure@apache.org or file a JIRA ticket
with INFRA.
---

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

Posted by jburwell <gi...@git.apache.org>.
Github user jburwell commented on a diff in the pull request:

    https://github.com/apache/cloudstack/pull/1624#discussion_r74314403
  
    --- 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<UsageEventVO> persistedItems;
    +
    +    public MockUsageEventDao() {
    +        persistedItems = new ArrayList<UsageEventVO>();
    +    }
    +
    +    @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<UsageEventVO> createSearchBuilder() {
    +        // TODO Auto-generated method stub
    +        return null;
    +    }
    +
    +    @Override
    +    public <K> GenericSearchBuilder<UsageEventVO, K> createSearchBuilder(
    +            Class<K> clazz) {
    +        // TODO Auto-generated method stub
    +        return null;
    +    }
    +
    +    @Override
    +    public UsageEventVO createForUpdate(Long id) {
    +        // TODO Auto-generated method stub
    +        return null;
    +    }
    +
    +    @Override
    +    public SearchCriteria<UsageEventVO> createSearchCriteria() {
    +        // TODO Auto-generated method stub
    +        return null;
    +    }
    +
    +    @Override
    +    public List<UsageEventVO> lockRows(SearchCriteria<UsageEventVO> sc,
    +            Filter filter, boolean exclusive) {
    +        // TODO Auto-generated method stub
    +        return null;
    +    }
    +
    +    @Override
    +    public UsageEventVO lockOneRandomRow(SearchCriteria<UsageEventVO> 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<UsageEventVO> sc) {
    +        // TODO Auto-generated method stub
    +        return 0;
    +    }
    +
    +    @Override
    +    public List<UsageEventVO> listAll() {
    +
    +        return persistedItems;
    +    }
    +
    +    @Override
    +    public List<UsageEventVO> listAll(Filter filter) {
    +        // TODO Auto-generated method stub
    +        return null;
    +    }
    +
    +    @Override
    +    public List<UsageEventVO> search(SearchCriteria<UsageEventVO> sc,
    +            Filter filter) {
    +        // TODO Auto-generated method stub
    +        return null;
    +    }
    +
    +    @Override
    +    public List<UsageEventVO> search(SearchCriteria<UsageEventVO> sc,
    +            Filter filter, boolean enableQueryCache) {
    +        // TODO Auto-generated method stub
    +        return null;
    +    }
    +
    +    @Override
    +    public List<UsageEventVO> searchIncludingRemoved(
    +            SearchCriteria<UsageEventVO> sc, Filter filter, Boolean lock,
    +            boolean cache) {
    +        // TODO Auto-generated method stub
    +        return null;
    +    }
    +
    +    @Override
    +    public List<UsageEventVO> searchIncludingRemoved(
    +            SearchCriteria<UsageEventVO> sc, Filter filter, Boolean lock,
    +            boolean cache, boolean enableQueryCache) {
    +        // TODO Auto-generated method stub
    +        return null;
    +    }
    +
    +    @Override
    +    public <M> List<M> customSearchIncludingRemoved(SearchCriteria<M> sc,
    +            Filter filter) {
    +        // TODO Auto-generated method stub
    +        return null;
    +    }
    +
    +    @Override
    +    public List<UsageEventVO> listAllIncludingRemoved() {
    +        // TODO Auto-generated method stub
    +        return null;
    +    }
    +
    +    @Override
    +    public List<UsageEventVO> listAllIncludingRemoved(Filter filter) {
    +        // 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 infrastructure@apache.org or file a JIRA ticket
with INFRA.
---

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

Posted by nnesic <gi...@git.apache.org>.
Github user nnesic commented on a diff in the pull request:

    https://github.com/apache/cloudstack/pull/1624#discussion_r78407479
  
    --- Diff: server/src/com/cloud/user/AccountManagerImpl.java ---
    @@ -761,6 +774,17 @@ protected boolean cleanupAccount(AccountVO account, long callerUserId, Account c
                         s_logger.error("Unable to expunge vm: " + vm.getId());
                         accountCleanupNeeded = true;
                     }
    +                else if (!vm.getState().equals(VirtualMachine.State.Destroyed)) {
    +                    // We have to emit the event here because the state listener is ignoring root volume deletions,
    +                    // assuming that the UserVMManager is responsible for emitting the usage event for them when
    --- End diff --
    
    The reason why the delete events for the root volume are not handled by the state listener is that the root volumes don't get destroyed until the VM is expunged. Because of this, if we rely on the state listener to emit the event, the timestamp on the event will not reflect the actual time when the user requested and expects the volume to be destroyed. 
    
    For now, I would not move the logic for handling these events out of UserVMManager. However, thinking about this again, I agree that it would be better not to scatter this event emitting further. Instead, I am working adding a call to vmMgr.destroy during the cleanup of the account (right now the manager is taking a shortcut, and expunging machines directly). Does that sound better?


---
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 infrastructure@apache.org or file a JIRA ticket
with INFRA.
---

[GitHub] cloudstack issue #1624: Fixes regarding VOLUME_DELETE events resulting from ...

Posted by jburwell <gi...@git.apache.org>.
Github user jburwell commented on the issue:

    https://github.com/apache/cloudstack/pull/1624
  
    @ProjectMoon we need a test LGTM.  I inquired yesterday -- do you have someone lined up to test 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 infrastructure@apache.org or file a JIRA ticket
with INFRA.
---

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

Posted by jburwell <gi...@git.apache.org>.
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<UsageEventVO> persistedItems;
    +
    +    public MockUsageEventDao() {
    +        persistedItems = new ArrayList<UsageEventVO>();
    +    }
    +
    +    @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<UsageEventVO> createSearchBuilder() {
    +        // TODO Auto-generated method stub
    +        return null;
    +    }
    +
    +    @Override
    +    public <K> GenericSearchBuilder<UsageEventVO, K> createSearchBuilder(
    +            Class<K> 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 infrastructure@apache.org or file a JIRA ticket
with INFRA.
---

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

Posted by jburwell <gi...@git.apache.org>.
Github user jburwell commented on a diff in the pull request:

    https://github.com/apache/cloudstack/pull/1624#discussion_r74314512
  
    --- 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<UsageEventVO> persistedItems;
    +
    +    public MockUsageEventDao() {
    +        persistedItems = new ArrayList<UsageEventVO>();
    +    }
    +
    +    @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<UsageEventVO> createSearchBuilder() {
    +        // TODO Auto-generated method stub
    +        return null;
    +    }
    +
    +    @Override
    +    public <K> GenericSearchBuilder<UsageEventVO, K> createSearchBuilder(
    +            Class<K> clazz) {
    +        // TODO Auto-generated method stub
    +        return null;
    +    }
    +
    +    @Override
    +    public UsageEventVO createForUpdate(Long id) {
    +        // TODO Auto-generated method stub
    +        return null;
    +    }
    +
    +    @Override
    +    public SearchCriteria<UsageEventVO> createSearchCriteria() {
    +        // TODO Auto-generated method stub
    +        return null;
    +    }
    +
    +    @Override
    +    public List<UsageEventVO> lockRows(SearchCriteria<UsageEventVO> sc,
    +            Filter filter, boolean exclusive) {
    +        // TODO Auto-generated method stub
    +        return null;
    +    }
    +
    +    @Override
    +    public UsageEventVO lockOneRandomRow(SearchCriteria<UsageEventVO> 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<UsageEventVO> sc) {
    +        // TODO Auto-generated method stub
    +        return 0;
    +    }
    +
    +    @Override
    +    public List<UsageEventVO> listAll() {
    +
    +        return persistedItems;
    +    }
    +
    +    @Override
    +    public List<UsageEventVO> listAll(Filter filter) {
    +        // TODO Auto-generated method stub
    +        return null;
    +    }
    +
    +    @Override
    +    public List<UsageEventVO> search(SearchCriteria<UsageEventVO> sc,
    +            Filter filter) {
    +        // TODO Auto-generated method stub
    +        return null;
    +    }
    +
    +    @Override
    +    public List<UsageEventVO> search(SearchCriteria<UsageEventVO> sc,
    +            Filter filter, boolean enableQueryCache) {
    +        // TODO Auto-generated method stub
    +        return null;
    +    }
    +
    +    @Override
    +    public List<UsageEventVO> searchIncludingRemoved(
    +            SearchCriteria<UsageEventVO> sc, Filter filter, Boolean lock,
    +            boolean cache) {
    +        // TODO Auto-generated method stub
    +        return null;
    +    }
    +
    +    @Override
    +    public List<UsageEventVO> searchIncludingRemoved(
    +            SearchCriteria<UsageEventVO> sc, Filter filter, Boolean lock,
    +            boolean cache, boolean enableQueryCache) {
    +        // TODO Auto-generated method stub
    +        return null;
    +    }
    +
    +    @Override
    +    public <M> List<M> customSearchIncludingRemoved(SearchCriteria<M> sc,
    +            Filter filter) {
    +        // TODO Auto-generated method stub
    +        return null;
    +    }
    +
    +    @Override
    +    public List<UsageEventVO> listAllIncludingRemoved() {
    +        // TODO Auto-generated method stub
    +        return null;
    +    }
    +
    +    @Override
    +    public List<UsageEventVO> listAllIncludingRemoved(Filter filter) {
    +        // TODO Auto-generated method stub
    +        return null;
    +    }
    +
    +    @Override
    +    public UsageEventVO persist(UsageEventVO entity) {
    +        persistedItems.add(entity);
    +        return entity;
    +    }
    +
    +    @Override
    +    public boolean remove(Long id) {
    +        // TODO Auto-generated method stub
    +        return false;
    +    }
    +
    +    @Override
    +    public int remove(SearchCriteria<UsageEventVO> sc) {
    +        // TODO Auto-generated method stub
    +        return 0;
    +    }
    +
    +    @Override
    +    public boolean expunge(Long id) {
    +        // TODO Auto-generated method stub
    +        return false;
    +    }
    +
    +    @Override
    +    public int expunge(SearchCriteria<UsageEventVO> sc) {
    +        // TODO Auto-generated method stub
    +        return 0;
    +    }
    +
    +    @Override
    +    public void expunge() {
    +        // TODO Auto-generated method stub
    +
    +    }
    +
    +    @Override
    +    public <K> K getNextInSequence(Class<K> clazz, String name) {
    +        // 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 infrastructure@apache.org or file a JIRA ticket
with INFRA.
---

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

Posted by jburwell <gi...@git.apache.org>.
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<UsageEventVO> persistedItems;
    +
    +    public MockUsageEventDao() {
    +        persistedItems = new ArrayList<UsageEventVO>();
    +    }
    +
    +    @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<UsageEventVO> createSearchBuilder() {
    +        // TODO Auto-generated method stub
    +        return null;
    +    }
    +
    +    @Override
    +    public <K> GenericSearchBuilder<UsageEventVO, K> createSearchBuilder(
    +            Class<K> clazz) {
    +        // TODO Auto-generated method stub
    +        return null;
    +    }
    +
    +    @Override
    +    public UsageEventVO createForUpdate(Long id) {
    +        // TODO Auto-generated method stub
    +        return null;
    +    }
    +
    +    @Override
    +    public SearchCriteria<UsageEventVO> createSearchCriteria() {
    +        // TODO Auto-generated method stub
    +        return null;
    +    }
    +
    +    @Override
    +    public List<UsageEventVO> lockRows(SearchCriteria<UsageEventVO> sc,
    +            Filter filter, boolean exclusive) {
    +        // TODO Auto-generated method stub
    +        return null;
    +    }
    +
    +    @Override
    +    public UsageEventVO lockOneRandomRow(SearchCriteria<UsageEventVO> 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 infrastructure@apache.org or file a JIRA ticket
with INFRA.
---

[GitHub] cloudstack issue #1624: Fixes regarding VOLUME_DELETE events resulting from ...

Posted by jburwell <gi...@git.apache.org>.
Github user jburwell commented on the issue:

    https://github.com/apache/cloudstack/pull/1624
  
    @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 infrastructure@apache.org or file a JIRA ticket
with INFRA.
---

[GitHub] cloudstack issue #1624: Fixes regarding VOLUME_DELETE events resulting from ...

Posted by ProjectMoon <gi...@git.apache.org>.
Github user ProjectMoon commented on the issue:

    https://github.com/apache/cloudstack/pull/1624
  
    Jenkins build log has vanished into 404 oblivion. Will see what happened with Travis (https://travis-ci.org/apache/cloudstack/builds/154436801).


---
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 infrastructure@apache.org or file a JIRA ticket
with INFRA.
---

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

Posted by jburwell <gi...@git.apache.org>.
Github user jburwell commented on a diff in the pull request:

    https://github.com/apache/cloudstack/pull/1624#discussion_r74314724
  
    --- 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<UsageEventVO> persistedItems;
    +
    +    public MockUsageEventDao() {
    +        persistedItems = new ArrayList<UsageEventVO>();
    +    }
    +
    +    @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<UsageEventVO> createSearchBuilder() {
    +        // TODO Auto-generated method stub
    +        return null;
    +    }
    +
    +    @Override
    +    public <K> GenericSearchBuilder<UsageEventVO, K> createSearchBuilder(
    +            Class<K> clazz) {
    +        // TODO Auto-generated method stub
    +        return null;
    +    }
    +
    +    @Override
    +    public UsageEventVO createForUpdate(Long id) {
    +        // TODO Auto-generated method stub
    +        return null;
    +    }
    +
    +    @Override
    +    public SearchCriteria<UsageEventVO> createSearchCriteria() {
    +        // TODO Auto-generated method stub
    +        return null;
    +    }
    +
    +    @Override
    +    public List<UsageEventVO> lockRows(SearchCriteria<UsageEventVO> sc,
    +            Filter filter, boolean exclusive) {
    +        // TODO Auto-generated method stub
    +        return null;
    +    }
    +
    +    @Override
    +    public UsageEventVO lockOneRandomRow(SearchCriteria<UsageEventVO> 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<UsageEventVO> sc) {
    +        // TODO Auto-generated method stub
    +        return 0;
    +    }
    +
    +    @Override
    +    public List<UsageEventVO> listAll() {
    +
    +        return persistedItems;
    +    }
    +
    +    @Override
    +    public List<UsageEventVO> listAll(Filter filter) {
    +        // TODO Auto-generated method stub
    +        return null;
    +    }
    +
    +    @Override
    +    public List<UsageEventVO> search(SearchCriteria<UsageEventVO> sc,
    +            Filter filter) {
    +        // TODO Auto-generated method stub
    +        return null;
    +    }
    +
    +    @Override
    +    public List<UsageEventVO> search(SearchCriteria<UsageEventVO> sc,
    +            Filter filter, boolean enableQueryCache) {
    +        // TODO Auto-generated method stub
    +        return null;
    +    }
    +
    +    @Override
    +    public List<UsageEventVO> searchIncludingRemoved(
    +            SearchCriteria<UsageEventVO> sc, Filter filter, Boolean lock,
    +            boolean cache) {
    +        // TODO Auto-generated method stub
    +        return null;
    +    }
    +
    +    @Override
    +    public List<UsageEventVO> searchIncludingRemoved(
    +            SearchCriteria<UsageEventVO> sc, Filter filter, Boolean lock,
    +            boolean cache, boolean enableQueryCache) {
    +        // TODO Auto-generated method stub
    +        return null;
    +    }
    +
    +    @Override
    +    public <M> List<M> customSearchIncludingRemoved(SearchCriteria<M> sc,
    +            Filter filter) {
    +        // TODO Auto-generated method stub
    +        return null;
    +    }
    +
    +    @Override
    +    public List<UsageEventVO> listAllIncludingRemoved() {
    +        // TODO Auto-generated method stub
    +        return null;
    +    }
    +
    +    @Override
    +    public List<UsageEventVO> listAllIncludingRemoved(Filter filter) {
    +        // TODO Auto-generated method stub
    +        return null;
    +    }
    +
    +    @Override
    +    public UsageEventVO persist(UsageEventVO entity) {
    +        persistedItems.add(entity);
    +        return entity;
    +    }
    +
    +    @Override
    +    public boolean remove(Long id) {
    +        // TODO Auto-generated method stub
    +        return false;
    +    }
    +
    +    @Override
    +    public int remove(SearchCriteria<UsageEventVO> sc) {
    +        // TODO Auto-generated method stub
    +        return 0;
    +    }
    +
    +    @Override
    +    public boolean expunge(Long id) {
    +        // TODO Auto-generated method stub
    +        return false;
    +    }
    +
    +    @Override
    +    public int expunge(SearchCriteria<UsageEventVO> sc) {
    +        // TODO Auto-generated method stub
    +        return 0;
    +    }
    +
    +    @Override
    +    public void expunge() {
    +        // TODO Auto-generated method stub
    +
    +    }
    +
    +    @Override
    +    public <K> K getNextInSequence(Class<K> clazz, String name) {
    +        // TODO Auto-generated method stub
    +        return null;
    +    }
    +
    +    @Override
    +    public boolean configure(String name, Map<String, Object> params)
    +            throws ConfigurationException {
    +        // TODO Auto-generated method stub
    +        return false;
    +    }
    +
    +    @Override
    +    public <M> List<M> customSearch(SearchCriteria<M> sc, Filter filter) {
    +        // TODO Auto-generated method stub
    +        return null;
    +    }
    +
    +    @Override
    +    public boolean lockInLockTable(String id) {
    +        // TODO Auto-generated method stub
    +        return false;
    +    }
    +
    +    @Override
    +    public boolean lockInLockTable(String id, int seconds) {
    +        // TODO Auto-generated method stub
    +        return false;
    +    }
    +
    +    @Override
    +    public boolean unlockFromLockTable(String 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 infrastructure@apache.org or file a JIRA ticket
with INFRA.
---

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

Posted by jburwell <gi...@git.apache.org>.
Github user jburwell commented on a diff in the pull request:

    https://github.com/apache/cloudstack/pull/1624#discussion_r74314571
  
    --- 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<UsageEventVO> persistedItems;
    +
    +    public MockUsageEventDao() {
    +        persistedItems = new ArrayList<UsageEventVO>();
    +    }
    +
    +    @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<UsageEventVO> createSearchBuilder() {
    +        // TODO Auto-generated method stub
    +        return null;
    +    }
    +
    +    @Override
    +    public <K> GenericSearchBuilder<UsageEventVO, K> createSearchBuilder(
    +            Class<K> clazz) {
    +        // TODO Auto-generated method stub
    +        return null;
    +    }
    +
    +    @Override
    +    public UsageEventVO createForUpdate(Long id) {
    +        // TODO Auto-generated method stub
    +        return null;
    +    }
    +
    +    @Override
    +    public SearchCriteria<UsageEventVO> createSearchCriteria() {
    +        // TODO Auto-generated method stub
    +        return null;
    +    }
    +
    +    @Override
    +    public List<UsageEventVO> lockRows(SearchCriteria<UsageEventVO> sc,
    +            Filter filter, boolean exclusive) {
    +        // TODO Auto-generated method stub
    +        return null;
    +    }
    +
    +    @Override
    +    public UsageEventVO lockOneRandomRow(SearchCriteria<UsageEventVO> 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<UsageEventVO> sc) {
    +        // TODO Auto-generated method stub
    +        return 0;
    +    }
    +
    +    @Override
    +    public List<UsageEventVO> listAll() {
    +
    +        return persistedItems;
    +    }
    +
    +    @Override
    +    public List<UsageEventVO> listAll(Filter filter) {
    +        // TODO Auto-generated method stub
    +        return null;
    +    }
    +
    +    @Override
    +    public List<UsageEventVO> search(SearchCriteria<UsageEventVO> sc,
    +            Filter filter) {
    +        // TODO Auto-generated method stub
    +        return null;
    +    }
    +
    +    @Override
    +    public List<UsageEventVO> search(SearchCriteria<UsageEventVO> sc,
    +            Filter filter, boolean enableQueryCache) {
    +        // TODO Auto-generated method stub
    +        return null;
    +    }
    +
    +    @Override
    +    public List<UsageEventVO> searchIncludingRemoved(
    +            SearchCriteria<UsageEventVO> sc, Filter filter, Boolean lock,
    +            boolean cache) {
    +        // TODO Auto-generated method stub
    +        return null;
    +    }
    +
    +    @Override
    +    public List<UsageEventVO> searchIncludingRemoved(
    +            SearchCriteria<UsageEventVO> sc, Filter filter, Boolean lock,
    +            boolean cache, boolean enableQueryCache) {
    +        // TODO Auto-generated method stub
    +        return null;
    +    }
    +
    +    @Override
    +    public <M> List<M> customSearchIncludingRemoved(SearchCriteria<M> sc,
    +            Filter filter) {
    +        // TODO Auto-generated method stub
    +        return null;
    +    }
    +
    +    @Override
    +    public List<UsageEventVO> listAllIncludingRemoved() {
    +        // TODO Auto-generated method stub
    +        return null;
    +    }
    +
    +    @Override
    +    public List<UsageEventVO> listAllIncludingRemoved(Filter filter) {
    +        // TODO Auto-generated method stub
    +        return null;
    +    }
    +
    +    @Override
    +    public UsageEventVO persist(UsageEventVO entity) {
    +        persistedItems.add(entity);
    +        return entity;
    +    }
    +
    +    @Override
    +    public boolean remove(Long id) {
    +        // TODO Auto-generated method stub
    +        return false;
    +    }
    +
    +    @Override
    +    public int remove(SearchCriteria<UsageEventVO> sc) {
    +        // TODO Auto-generated method stub
    +        return 0;
    +    }
    +
    +    @Override
    +    public boolean expunge(Long id) {
    +        // TODO Auto-generated method stub
    +        return false;
    +    }
    +
    +    @Override
    +    public int expunge(SearchCriteria<UsageEventVO> sc) {
    +        // TODO Auto-generated method stub
    +        return 0;
    +    }
    +
    +    @Override
    +    public void expunge() {
    +        // TODO Auto-generated method stub
    +
    +    }
    +
    +    @Override
    +    public <K> K getNextInSequence(Class<K> clazz, String name) {
    +        // TODO Auto-generated method stub
    +        return null;
    +    }
    +
    +    @Override
    +    public boolean configure(String name, Map<String, Object> params)
    +            throws ConfigurationException {
    +        // TODO Auto-generated method stub
    +        return false;
    +    }
    +
    +    @Override
    +    public <M> List<M> customSearch(SearchCriteria<M> sc, Filter filter) {
    +        // TODO Auto-generated method stub
    +        return null;
    +    }
    +
    +    @Override
    +    public boolean lockInLockTable(String id) {
    +        // TODO Auto-generated method stub
    +        return false;
    +    }
    +
    +    @Override
    +    public boolean lockInLockTable(String id, int seconds) {
    +        // TODO Auto-generated method stub
    +        return false;
    +    }
    +
    +    @Override
    +    public boolean unlockFromLockTable(String id) {
    +        // TODO Auto-generated method stub
    +        return false;
    +    }
    +
    +    @Override
    +    public <K> K getRandomlyIncreasingNextInSequence(Class<K> clazz, String name) {
    +        // TODO Auto-generated method stub
    +        return null;
    +    }
    +
    +    @Override
    +    public UsageEventVO findOneBy(SearchCriteria<UsageEventVO> sc) {
    +        // TODO Auto-generated method stub
    +        return null;
    +    }
    +
    +    @Override
    +    public Class<UsageEventVO> getEntityBeanType() {
    +        // TODO Auto-generated method stub
    +        return null;
    +    }
    +
    +    @Override
    +    public Pair<List<UsageEventVO>, Integer> searchAndCount(
    +            SearchCriteria<UsageEventVO> sc, Filter filter) {
    +        // TODO Auto-generated method stub
    +        return null;
    +    }
    +
    +    @Override
    +    public Pair<List<UsageEventVO>, Integer> searchAndDistinctCount(SearchCriteria<UsageEventVO> sc, Filter filter) {
    +        //TODO Auto-generated method stub
    +        return null;
    +    }
    +
    +    @Override
    +    public Map<String, Attribute> getAllAttributes() {
    +        // TODO Auto-generated method stub
    +        return null;
    +    }
    +
    +    @Override
    +    public List<UsageEventVO> listLatestEvents(Date endDate) {
    +        // TODO Auto-generated method stub
    +        return null;
    +    }
    +
    +    @Override
    +    public List<UsageEventVO> getLatestEvent() {
    +        // TODO Auto-generated method stub
    +        return null;
    +    }
    +
    +    @Override
    +    public List<UsageEventVO> getRecentEvents(Date endDate) {
    +        // TODO Auto-generated method stub
    +        return null;
    +    }
    +
    +    @Override
    +    public List<UsageEventVO> listDirectIpEvents(Date startDate, Date endDate,
    +            long zoneId) {
    +        // TODO Auto-generated method stub
    +        return null;
    +    }
    +
    +    @Override
    +    public void saveDetails(long eventId, Map<String, String> details) {
    +        // 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 infrastructure@apache.org or file a JIRA ticket
with INFRA.
---

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

Posted by jburwell <gi...@git.apache.org>.
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<UsageEventVO> persistedItems;
    +
    +    public MockUsageEventDao() {
    +        persistedItems = new ArrayList<UsageEventVO>();
    +    }
    +
    +    @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<UsageEventVO> createSearchBuilder() {
    +        // TODO Auto-generated method stub
    +        return null;
    +    }
    +
    +    @Override
    +    public <K> GenericSearchBuilder<UsageEventVO, K> createSearchBuilder(
    +            Class<K> clazz) {
    +        // TODO Auto-generated method stub
    +        return null;
    +    }
    +
    +    @Override
    +    public UsageEventVO createForUpdate(Long id) {
    +        // TODO Auto-generated method stub
    +        return null;
    +    }
    +
    +    @Override
    +    public SearchCriteria<UsageEventVO> createSearchCriteria() {
    +        // TODO Auto-generated method stub
    +        return null;
    +    }
    +
    +    @Override
    +    public List<UsageEventVO> lockRows(SearchCriteria<UsageEventVO> sc,
    +            Filter filter, boolean exclusive) {
    +        // TODO Auto-generated method stub
    +        return null;
    +    }
    +
    +    @Override
    +    public UsageEventVO lockOneRandomRow(SearchCriteria<UsageEventVO> 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 infrastructure@apache.org or file a JIRA ticket
with INFRA.
---