You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@cloudstack.apache.org by GitBox <gi...@apache.org> on 2022/11/30 08:43:33 UTC

[GitHub] [cloudstack] DaanHoogland commented on a diff in pull request #6899: Count Resource Virtual Router

DaanHoogland commented on code in PR #6899:
URL: https://github.com/apache/cloudstack/pull/6899#discussion_r1035653160


##########
test/integration/component/test_router_resources.py:
##########
@@ -0,0 +1,824 @@
+# 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.
+
+"""
+Test case for router resources
+"""
+
+# Import local modules
+
+from nose.plugins.attrib import attr
+from marvin.cloudstackTestCase import cloudstackTestCase
+from marvin.cloudstackAPI import (scaleSystemVm,
+                                  stopRouter,
+                                  startRouter,
+                                  restartNetwork,
+                                  updateConfiguration)
+from marvin.lib.utils import (cleanup_resources)
+from marvin.lib.base import (NetworkOffering,
+                             ServiceOffering,
+                             VirtualMachine,
+                             Account,
+                             Domain,
+                             Network,
+                             Router,
+                             destroyRouter,
+                             Zone,
+                             updateResourceCount)
+from marvin.lib.common import (get_zone,
+                               get_template,
+                               get_domain,
+                               list_virtual_machines,
+                               list_networks,
+                               list_configurations,
+                               list_routers,
+                               list_service_offering)
+
+import logging
+
+class TestRouterResources(cloudstackTestCase):
+
+    @classmethod
+    def setupClass(cls):
+        cls.testClient = super(
+            TestRouterResources, cls
+        ).getClsTestClient()
+        cls.apiclient = cls.testClient.getApiClient()
+
+        cls.services = cls.testClient.getParsedTestDataConfig()
+        zone = get_zone(cls.apiclient, cls.testClient.getZoneForTests())
+        cls.zone = Zone(zone.__dict__)
+        cls.template = get_template(cls.apiclient, cls.zone.id)
+        cls._cleanup = []
+
+        cls.logger = logging.getLogger("TestRouterResources")
+        cls.stream_handler = logging.StreamHandler()
+        cls.logger.setLevel(logging.DEBUG)
+        cls.logger.addHandler(cls.stream_handler)
+
+        # Get Zone, Domain and templates
+        cls.domain = get_domain(cls.apiclient)
+
+        cls.template = get_template(
+            cls.apiclient,
+            cls.zone.id,
+            cls.services["ostype"]
+        )
+
+        cls.service_offering = ServiceOffering.create(
+            cls.apiclient,
+            cls.services["service_offerings"]["big"]
+        )
+
+        # Create new domain1
+        cls.domain1 = Domain.create(
+            cls.apiclient,
+            services=cls.services["acl"]["domain1"],
+            parentdomainid=cls.domain.id)

Review Comment:
   please add to `_cleanup` immediately



##########
test/integration/component/test_router_resources.py:
##########
@@ -0,0 +1,824 @@
+# 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.
+
+"""
+Test case for router resources
+"""
+
+# Import local modules
+
+from nose.plugins.attrib import attr
+from marvin.cloudstackTestCase import cloudstackTestCase
+from marvin.cloudstackAPI import (scaleSystemVm,
+                                  stopRouter,
+                                  startRouter,
+                                  restartNetwork,
+                                  updateConfiguration)
+from marvin.lib.utils import (cleanup_resources)
+from marvin.lib.base import (NetworkOffering,
+                             ServiceOffering,
+                             VirtualMachine,
+                             Account,
+                             Domain,
+                             Network,
+                             Router,
+                             destroyRouter,
+                             Zone,
+                             updateResourceCount)
+from marvin.lib.common import (get_zone,
+                               get_template,
+                               get_domain,
+                               list_virtual_machines,
+                               list_networks,
+                               list_configurations,
+                               list_routers,
+                               list_service_offering)
+
+import logging
+
+class TestRouterResources(cloudstackTestCase):
+
+    @classmethod
+    def setupClass(cls):
+        cls.testClient = super(
+            TestRouterResources, cls
+        ).getClsTestClient()
+        cls.apiclient = cls.testClient.getApiClient()
+
+        cls.services = cls.testClient.getParsedTestDataConfig()
+        zone = get_zone(cls.apiclient, cls.testClient.getZoneForTests())
+        cls.zone = Zone(zone.__dict__)
+        cls.template = get_template(cls.apiclient, cls.zone.id)
+        cls._cleanup = []
+
+        cls.logger = logging.getLogger("TestRouterResources")
+        cls.stream_handler = logging.StreamHandler()
+        cls.logger.setLevel(logging.DEBUG)
+        cls.logger.addHandler(cls.stream_handler)
+
+        # Get Zone, Domain and templates
+        cls.domain = get_domain(cls.apiclient)
+
+        cls.template = get_template(
+            cls.apiclient,
+            cls.zone.id,
+            cls.services["ostype"]
+        )
+
+        cls.service_offering = ServiceOffering.create(
+            cls.apiclient,
+            cls.services["service_offerings"]["big"]
+        )
+
+        # Create new domain1
+        cls.domain1 = Domain.create(
+            cls.apiclient,
+            services=cls.services["acl"]["domain1"],
+            parentdomainid=cls.domain.id)
+
+        # Create account1
+        cls.account1 = Account.create(
+            cls.apiclient,
+            cls.services["acl"]["accountD1"],
+            domainid=cls.domain1.id
+        )
+
+        # Create Network Offering with all the services
+        cls.network_offering = NetworkOffering.create(
+            cls.apiclient,
+            cls.services["isolated_network_offering"]
+        )

Review Comment:
   please add to `_cleanup` immediately



##########
test/integration/component/test_router_resources.py:
##########
@@ -0,0 +1,824 @@
+# 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.
+
+"""
+Test case for router resources
+"""
+
+# Import local modules
+
+from nose.plugins.attrib import attr
+from marvin.cloudstackTestCase import cloudstackTestCase
+from marvin.cloudstackAPI import (scaleSystemVm,
+                                  stopRouter,
+                                  startRouter,
+                                  restartNetwork,
+                                  updateConfiguration)
+from marvin.lib.utils import (cleanup_resources)
+from marvin.lib.base import (NetworkOffering,
+                             ServiceOffering,
+                             VirtualMachine,
+                             Account,
+                             Domain,
+                             Network,
+                             Router,
+                             destroyRouter,
+                             Zone,
+                             updateResourceCount)
+from marvin.lib.common import (get_zone,
+                               get_template,
+                               get_domain,
+                               list_virtual_machines,
+                               list_networks,
+                               list_configurations,
+                               list_routers,
+                               list_service_offering)
+
+import logging
+
+class TestRouterResources(cloudstackTestCase):
+
+    @classmethod
+    def setupClass(cls):
+        cls.testClient = super(
+            TestRouterResources, cls
+        ).getClsTestClient()
+        cls.apiclient = cls.testClient.getApiClient()
+
+        cls.services = cls.testClient.getParsedTestDataConfig()
+        zone = get_zone(cls.apiclient, cls.testClient.getZoneForTests())
+        cls.zone = Zone(zone.__dict__)
+        cls.template = get_template(cls.apiclient, cls.zone.id)
+        cls._cleanup = []
+
+        cls.logger = logging.getLogger("TestRouterResources")
+        cls.stream_handler = logging.StreamHandler()
+        cls.logger.setLevel(logging.DEBUG)
+        cls.logger.addHandler(cls.stream_handler)
+
+        # Get Zone, Domain and templates
+        cls.domain = get_domain(cls.apiclient)
+
+        cls.template = get_template(
+            cls.apiclient,
+            cls.zone.id,
+            cls.services["ostype"]
+        )
+
+        cls.service_offering = ServiceOffering.create(
+            cls.apiclient,
+            cls.services["service_offerings"]["big"]
+        )
+
+        # Create new domain1
+        cls.domain1 = Domain.create(
+            cls.apiclient,
+            services=cls.services["acl"]["domain1"],
+            parentdomainid=cls.domain.id)
+
+        # Create account1
+        cls.account1 = Account.create(
+            cls.apiclient,
+            cls.services["acl"]["accountD1"],
+            domainid=cls.domain1.id
+        )
+
+        # Create Network Offering with all the services
+        cls.network_offering = NetworkOffering.create(
+            cls.apiclient,
+            cls.services["isolated_network_offering"]
+        )
+        # Enable Network offering
+        cls.network_offering.update(cls.apiclient, state='Enabled')
+
+        cls.network = Network.create(
+            cls.apiclient,
+            cls.services["isolated_network"],
+            accountid=cls.account1.name,
+            domainid=cls.account1.domainid,
+            networkofferingid=cls.network_offering.id,
+            zoneid=cls.zone.id
+        )
+
+        virtualmachine = VirtualMachine.create(
+            cls.apiclient,
+            services=cls.services["virtual_machine_userdata"],
+            accountid=cls.account1.name,
+            domainid=cls.account1.domainid,
+            serviceofferingid=cls.service_offering.id,
+            networkids=cls.network.id,
+            templateid=cls.template.id,
+            zoneid=cls.zone.id
+        )
+
+        vms = list_virtual_machines(
+            cls.apiclient,
+            account=cls.account1.name,
+            domainid=cls.account1.domainid,
+            id=virtualmachine.id
+        )
+        vm = vms[0]
+
+        # get vm cpu and memory values
+        cls.vm_cpu_count = vm.cpunumber
+        cls.vm_mem_count = vm.memory
+
+        routers = list_routers(
+            cls.apiclient,
+            account=cls.account1.name,
+            domainid=cls.account1.domainid
+        )
+
+        router = routers[0]
+
+        router_so_id = router.serviceofferingid
+
+        list_service_response = list_service_offering(
+            cls.apiclient,
+            id=router_so_id,
+            issystem="true",
+            systemvmtype="domainrouter",
+            listall="true"
+        )
+
+        # Get default router service offering cpu and memory values
+        cls.default_vr_cpu = list_service_response[0].cpunumber
+        cls.default_vr_ram = list_service_response[0].memory
+
+        cls._cleanup.append(virtualmachine)
+        cls._cleanup.append(cls.network)
+
+        # Disable Network offering
+        cls.network_offering.update(cls.apiclient, state='Disabled')
+        cls._cleanup.append(cls.network_offering)
+        cls._cleanup.append(cls.account1)
+        cls._cleanup.append(cls.domain1)

Review Comment:
   too late ;)



##########
server/src/main/java/com/cloud/resourcelimit/ResourceLimitManagerImpl.java:
##########
@@ -987,11 +1000,59 @@ public long countCpusForAccount(long accountId) {
         for (UserVmJoinVO vm : userVms) {
             cputotal += Long.valueOf(vm.getCpu());
         }
-        return cputotal;
+

Review Comment:
   can you extract the new bits in this method into separate methods, please?



##########
server/src/main/java/com/cloud/configuration/ConfigurationManagerImpl.java:
##########
@@ -1135,6 +1145,13 @@ private String validateConfigurationValue(final String name, String value, final
             return errMsg;
         }
 
+        if (VirtualMachineManager.ResourceCountRoutersType.key().equalsIgnoreCase(name)
+                && (!resourceCountRoutersTypeValues.contains(value) || isBlank(value))) {
+            final String msg = "Possible values are: delta or all.";
+            s_logger.error(msg);
+            throw new InvalidParameterValueException(msg);
+        }

Review Comment:
   please extract this to a method with a clear name, something that explains why the check is needed.



##########
test/integration/component/test_router_resources.py:
##########
@@ -0,0 +1,824 @@
+# 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.
+
+"""
+Test case for router resources
+"""
+
+# Import local modules
+
+from nose.plugins.attrib import attr
+from marvin.cloudstackTestCase import cloudstackTestCase
+from marvin.cloudstackAPI import (scaleSystemVm,
+                                  stopRouter,
+                                  startRouter,
+                                  restartNetwork,
+                                  updateConfiguration)
+from marvin.lib.utils import (cleanup_resources)
+from marvin.lib.base import (NetworkOffering,
+                             ServiceOffering,
+                             VirtualMachine,
+                             Account,
+                             Domain,
+                             Network,
+                             Router,
+                             destroyRouter,
+                             Zone,
+                             updateResourceCount)
+from marvin.lib.common import (get_zone,
+                               get_template,
+                               get_domain,
+                               list_virtual_machines,
+                               list_networks,
+                               list_configurations,
+                               list_routers,
+                               list_service_offering)
+
+import logging
+
+class TestRouterResources(cloudstackTestCase):
+
+    @classmethod
+    def setupClass(cls):
+        cls.testClient = super(
+            TestRouterResources, cls
+        ).getClsTestClient()
+        cls.apiclient = cls.testClient.getApiClient()
+
+        cls.services = cls.testClient.getParsedTestDataConfig()
+        zone = get_zone(cls.apiclient, cls.testClient.getZoneForTests())
+        cls.zone = Zone(zone.__dict__)
+        cls.template = get_template(cls.apiclient, cls.zone.id)
+        cls._cleanup = []
+
+        cls.logger = logging.getLogger("TestRouterResources")
+        cls.stream_handler = logging.StreamHandler()
+        cls.logger.setLevel(logging.DEBUG)
+        cls.logger.addHandler(cls.stream_handler)
+
+        # Get Zone, Domain and templates
+        cls.domain = get_domain(cls.apiclient)
+
+        cls.template = get_template(
+            cls.apiclient,
+            cls.zone.id,
+            cls.services["ostype"]
+        )
+
+        cls.service_offering = ServiceOffering.create(
+            cls.apiclient,
+            cls.services["service_offerings"]["big"]
+        )
+
+        # Create new domain1
+        cls.domain1 = Domain.create(
+            cls.apiclient,
+            services=cls.services["acl"]["domain1"],
+            parentdomainid=cls.domain.id)
+
+        # Create account1
+        cls.account1 = Account.create(
+            cls.apiclient,
+            cls.services["acl"]["accountD1"],
+            domainid=cls.domain1.id
+        )

Review Comment:
   please add to `_cleanup` immediately



##########
test/integration/component/test_router_resources.py:
##########
@@ -0,0 +1,824 @@
+# 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.
+
+"""
+Test case for router resources
+"""
+
+# Import local modules
+
+from nose.plugins.attrib import attr
+from marvin.cloudstackTestCase import cloudstackTestCase
+from marvin.cloudstackAPI import (scaleSystemVm,
+                                  stopRouter,
+                                  startRouter,
+                                  restartNetwork,
+                                  updateConfiguration)
+from marvin.lib.utils import (cleanup_resources)
+from marvin.lib.base import (NetworkOffering,
+                             ServiceOffering,
+                             VirtualMachine,
+                             Account,
+                             Domain,
+                             Network,
+                             Router,
+                             destroyRouter,
+                             Zone,
+                             updateResourceCount)
+from marvin.lib.common import (get_zone,
+                               get_template,
+                               get_domain,
+                               list_virtual_machines,
+                               list_networks,
+                               list_configurations,
+                               list_routers,
+                               list_service_offering)
+
+import logging
+
+class TestRouterResources(cloudstackTestCase):
+
+    @classmethod
+    def setupClass(cls):
+        cls.testClient = super(
+            TestRouterResources, cls
+        ).getClsTestClient()
+        cls.apiclient = cls.testClient.getApiClient()
+
+        cls.services = cls.testClient.getParsedTestDataConfig()
+        zone = get_zone(cls.apiclient, cls.testClient.getZoneForTests())
+        cls.zone = Zone(zone.__dict__)
+        cls.template = get_template(cls.apiclient, cls.zone.id)
+        cls._cleanup = []
+
+        cls.logger = logging.getLogger("TestRouterResources")
+        cls.stream_handler = logging.StreamHandler()
+        cls.logger.setLevel(logging.DEBUG)
+        cls.logger.addHandler(cls.stream_handler)
+
+        # Get Zone, Domain and templates
+        cls.domain = get_domain(cls.apiclient)
+
+        cls.template = get_template(
+            cls.apiclient,
+            cls.zone.id,
+            cls.services["ostype"]
+        )
+
+        cls.service_offering = ServiceOffering.create(
+            cls.apiclient,
+            cls.services["service_offerings"]["big"]
+        )
+
+        # Create new domain1
+        cls.domain1 = Domain.create(
+            cls.apiclient,
+            services=cls.services["acl"]["domain1"],
+            parentdomainid=cls.domain.id)
+
+        # Create account1
+        cls.account1 = Account.create(
+            cls.apiclient,
+            cls.services["acl"]["accountD1"],
+            domainid=cls.domain1.id
+        )
+
+        # Create Network Offering with all the services
+        cls.network_offering = NetworkOffering.create(
+            cls.apiclient,
+            cls.services["isolated_network_offering"]
+        )
+        # Enable Network offering
+        cls.network_offering.update(cls.apiclient, state='Enabled')
+
+        cls.network = Network.create(
+            cls.apiclient,
+            cls.services["isolated_network"],
+            accountid=cls.account1.name,
+            domainid=cls.account1.domainid,
+            networkofferingid=cls.network_offering.id,
+            zoneid=cls.zone.id
+        )

Review Comment:
   please add to `_cleanup` immediately



##########
test/integration/component/test_router_resources.py:
##########
@@ -0,0 +1,824 @@
+# 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.
+
+"""
+Test case for router resources
+"""
+
+# Import local modules
+
+from nose.plugins.attrib import attr
+from marvin.cloudstackTestCase import cloudstackTestCase
+from marvin.cloudstackAPI import (scaleSystemVm,
+                                  stopRouter,
+                                  startRouter,
+                                  restartNetwork,
+                                  updateConfiguration)
+from marvin.lib.utils import (cleanup_resources)
+from marvin.lib.base import (NetworkOffering,
+                             ServiceOffering,
+                             VirtualMachine,
+                             Account,
+                             Domain,
+                             Network,
+                             Router,
+                             destroyRouter,
+                             Zone,
+                             updateResourceCount)
+from marvin.lib.common import (get_zone,
+                               get_template,
+                               get_domain,
+                               list_virtual_machines,
+                               list_networks,
+                               list_configurations,
+                               list_routers,
+                               list_service_offering)
+
+import logging
+
+class TestRouterResources(cloudstackTestCase):
+
+    @classmethod
+    def setupClass(cls):
+        cls.testClient = super(
+            TestRouterResources, cls
+        ).getClsTestClient()
+        cls.apiclient = cls.testClient.getApiClient()
+
+        cls.services = cls.testClient.getParsedTestDataConfig()
+        zone = get_zone(cls.apiclient, cls.testClient.getZoneForTests())
+        cls.zone = Zone(zone.__dict__)
+        cls.template = get_template(cls.apiclient, cls.zone.id)
+        cls._cleanup = []
+
+        cls.logger = logging.getLogger("TestRouterResources")
+        cls.stream_handler = logging.StreamHandler()
+        cls.logger.setLevel(logging.DEBUG)
+        cls.logger.addHandler(cls.stream_handler)
+
+        # Get Zone, Domain and templates
+        cls.domain = get_domain(cls.apiclient)
+
+        cls.template = get_template(
+            cls.apiclient,
+            cls.zone.id,
+            cls.services["ostype"]
+        )
+
+        cls.service_offering = ServiceOffering.create(
+            cls.apiclient,
+            cls.services["service_offerings"]["big"]
+        )
+
+        # Create new domain1
+        cls.domain1 = Domain.create(
+            cls.apiclient,
+            services=cls.services["acl"]["domain1"],
+            parentdomainid=cls.domain.id)
+
+        # Create account1
+        cls.account1 = Account.create(
+            cls.apiclient,
+            cls.services["acl"]["accountD1"],
+            domainid=cls.domain1.id
+        )
+
+        # Create Network Offering with all the services
+        cls.network_offering = NetworkOffering.create(
+            cls.apiclient,
+            cls.services["isolated_network_offering"]
+        )
+        # Enable Network offering
+        cls.network_offering.update(cls.apiclient, state='Enabled')
+
+        cls.network = Network.create(
+            cls.apiclient,
+            cls.services["isolated_network"],
+            accountid=cls.account1.name,
+            domainid=cls.account1.domainid,
+            networkofferingid=cls.network_offering.id,
+            zoneid=cls.zone.id
+        )
+
+        virtualmachine = VirtualMachine.create(
+            cls.apiclient,
+            services=cls.services["virtual_machine_userdata"],
+            accountid=cls.account1.name,
+            domainid=cls.account1.domainid,
+            serviceofferingid=cls.service_offering.id,
+            networkids=cls.network.id,
+            templateid=cls.template.id,
+            zoneid=cls.zone.id
+        )
+
+        vms = list_virtual_machines(
+            cls.apiclient,
+            account=cls.account1.name,
+            domainid=cls.account1.domainid,
+            id=virtualmachine.id
+        )
+        vm = vms[0]
+
+        # get vm cpu and memory values
+        cls.vm_cpu_count = vm.cpunumber
+        cls.vm_mem_count = vm.memory
+
+        routers = list_routers(
+            cls.apiclient,
+            account=cls.account1.name,
+            domainid=cls.account1.domainid
+        )
+
+        router = routers[0]
+
+        router_so_id = router.serviceofferingid
+
+        list_service_response = list_service_offering(
+            cls.apiclient,
+            id=router_so_id,
+            issystem="true",
+            systemvmtype="domainrouter",
+            listall="true"
+        )
+
+        # Get default router service offering cpu and memory values
+        cls.default_vr_cpu = list_service_response[0].cpunumber
+        cls.default_vr_ram = list_service_response[0].memory
+
+        cls._cleanup.append(virtualmachine)
+        cls._cleanup.append(cls.network)
+
+        # Disable Network offering
+        cls.network_offering.update(cls.apiclient, state='Disabled')
+        cls._cleanup.append(cls.network_offering)
+        cls._cleanup.append(cls.account1)
+        cls._cleanup.append(cls.domain1)
+
+    @classmethod
+    def tearDownClass(cls):
+        try:
+            cleanup_resources(cls.apiclient, cls._cleanup)
+        except Exception as e:
+            raise Exception("Warning: Exception during cleanup : %s" % e)
+        return
+
+    def setUp(self):
+        self.apiclient = self.testClient.getApiClient()
+        self.cleanup = []
+        return
+
+    def tearDown(self):
+        try:
+            cleanup_resources(self.apiclient, self.cleanup)
+        except Exception as e:
+            raise Exception("Warning: Exception during cleanup : %s" % e)
+        return

Review Comment:
   ```suggestion
           super(TestRouterResources, self).tearDown()
   ```



##########
server/src/main/java/com/cloud/resourcelimit/ResourceLimitManagerImpl.java:
##########
@@ -1011,7 +1072,51 @@ public long calculateMemoryForAccount(long accountId) {
         for (UserVmJoinVO vm : userVms) {
             ramtotal += Long.valueOf(vm.getRamSize());
         }
-        return ramtotal;
+

Review Comment:
   Can you extract the new parts of this method into separate methods please?



##########
server/src/main/java/com/cloud/network/router/NetworkHelperImpl.java:
##########
@@ -568,6 +588,10 @@ public DomainRouterVO deployRouter(final RouterDeploymentDefinition routerDeploy
                         destroyRouter(router.getId(), _accountMgr.getAccount(Account.ACCOUNT_ID_SYSTEM), User.UID_SYSTEM);
                         continue;
                     } else {
+                        // If router can't be started then decrement the resource count
+                        if (Boolean.TRUE.equals(VirtualMachineManager.ResourceCountRouters.valueIn(owner.getDomainId()))) {
+                            _itMgr.decrementVrResourceCount(routerOffering, owner,true);
+                        }

Review Comment:
   re-use



##########
test/integration/component/test_router_resources.py:
##########
@@ -0,0 +1,824 @@
+# 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.
+
+"""
+Test case for router resources
+"""
+
+# Import local modules
+
+from nose.plugins.attrib import attr
+from marvin.cloudstackTestCase import cloudstackTestCase
+from marvin.cloudstackAPI import (scaleSystemVm,
+                                  stopRouter,
+                                  startRouter,
+                                  restartNetwork,
+                                  updateConfiguration)
+from marvin.lib.utils import (cleanup_resources)
+from marvin.lib.base import (NetworkOffering,
+                             ServiceOffering,
+                             VirtualMachine,
+                             Account,
+                             Domain,
+                             Network,
+                             Router,
+                             destroyRouter,
+                             Zone,
+                             updateResourceCount)
+from marvin.lib.common import (get_zone,
+                               get_template,
+                               get_domain,
+                               list_virtual_machines,
+                               list_networks,
+                               list_configurations,
+                               list_routers,
+                               list_service_offering)
+
+import logging
+
+class TestRouterResources(cloudstackTestCase):
+
+    @classmethod
+    def setupClass(cls):
+        cls.testClient = super(
+            TestRouterResources, cls
+        ).getClsTestClient()
+        cls.apiclient = cls.testClient.getApiClient()
+
+        cls.services = cls.testClient.getParsedTestDataConfig()
+        zone = get_zone(cls.apiclient, cls.testClient.getZoneForTests())
+        cls.zone = Zone(zone.__dict__)
+        cls.template = get_template(cls.apiclient, cls.zone.id)
+        cls._cleanup = []
+
+        cls.logger = logging.getLogger("TestRouterResources")
+        cls.stream_handler = logging.StreamHandler()
+        cls.logger.setLevel(logging.DEBUG)
+        cls.logger.addHandler(cls.stream_handler)
+
+        # Get Zone, Domain and templates
+        cls.domain = get_domain(cls.apiclient)
+
+        cls.template = get_template(
+            cls.apiclient,
+            cls.zone.id,
+            cls.services["ostype"]
+        )
+
+        cls.service_offering = ServiceOffering.create(
+            cls.apiclient,
+            cls.services["service_offerings"]["big"]
+        )

Review Comment:
   please add `cls.service_offering` to `cls._cleanup` immediately i.e.
   ```suggestion
           cls.service_offering = ServiceOffering.create(
               cls.apiclient,
               cls.services["service_offerings"]["big"]
           )
           cls._cleanup.append(cls.service_offering)
   ```
   if you wait till later and an exception occurs we get left with garbage in our env after the test run.



##########
engine/orchestration/src/main/java/com/cloud/vm/VirtualMachineManagerImpl.java:
##########
@@ -2094,10 +2238,14 @@ private void advanceStop(final VMInstanceVO vm, final boolean cleanUpEvenIfUnabl
 
             boolean result = stateTransitTo(vm, Event.OperationSucceeded, null);
             if (result) {
+                ServiceOfferingVO offering = _offeringDao.findById(vm.getId(), vm.getServiceOfferingId());
                 if (VirtualMachine.Type.User.equals(vm.type) && ResourceCountRunningVMsonly.value()) {
-                    ServiceOfferingVO offering = _offeringDao.findById(vm.getId(), vm.getServiceOfferingId());
-                    resourceCountDecrement(vm.getAccountId(),new Long(offering.getCpu()), new Long(offering.getRamSize()));
+                    //update resource count if stop successfully

Review Comment:
   this comment should not be necessary, if the code is clear (or it could be a javadoc for an extracted method)



##########
test/integration/component/test_router_resources.py:
##########
@@ -0,0 +1,824 @@
+# 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.
+
+"""
+Test case for router resources
+"""
+
+# Import local modules
+
+from nose.plugins.attrib import attr
+from marvin.cloudstackTestCase import cloudstackTestCase
+from marvin.cloudstackAPI import (scaleSystemVm,
+                                  stopRouter,
+                                  startRouter,
+                                  restartNetwork,
+                                  updateConfiguration)
+from marvin.lib.utils import (cleanup_resources)
+from marvin.lib.base import (NetworkOffering,
+                             ServiceOffering,
+                             VirtualMachine,
+                             Account,
+                             Domain,
+                             Network,
+                             Router,
+                             destroyRouter,
+                             Zone,
+                             updateResourceCount)
+from marvin.lib.common import (get_zone,
+                               get_template,
+                               get_domain,
+                               list_virtual_machines,
+                               list_networks,
+                               list_configurations,
+                               list_routers,
+                               list_service_offering)
+
+import logging
+
+class TestRouterResources(cloudstackTestCase):
+
+    @classmethod
+    def setupClass(cls):
+        cls.testClient = super(
+            TestRouterResources, cls
+        ).getClsTestClient()
+        cls.apiclient = cls.testClient.getApiClient()
+
+        cls.services = cls.testClient.getParsedTestDataConfig()
+        zone = get_zone(cls.apiclient, cls.testClient.getZoneForTests())
+        cls.zone = Zone(zone.__dict__)
+        cls.template = get_template(cls.apiclient, cls.zone.id)
+        cls._cleanup = []
+
+        cls.logger = logging.getLogger("TestRouterResources")
+        cls.stream_handler = logging.StreamHandler()
+        cls.logger.setLevel(logging.DEBUG)
+        cls.logger.addHandler(cls.stream_handler)
+
+        # Get Zone, Domain and templates
+        cls.domain = get_domain(cls.apiclient)
+
+        cls.template = get_template(
+            cls.apiclient,
+            cls.zone.id,
+            cls.services["ostype"]
+        )
+
+        cls.service_offering = ServiceOffering.create(
+            cls.apiclient,
+            cls.services["service_offerings"]["big"]
+        )
+
+        # Create new domain1
+        cls.domain1 = Domain.create(
+            cls.apiclient,
+            services=cls.services["acl"]["domain1"],
+            parentdomainid=cls.domain.id)
+
+        # Create account1
+        cls.account1 = Account.create(
+            cls.apiclient,
+            cls.services["acl"]["accountD1"],
+            domainid=cls.domain1.id
+        )
+
+        # Create Network Offering with all the services
+        cls.network_offering = NetworkOffering.create(
+            cls.apiclient,
+            cls.services["isolated_network_offering"]
+        )
+        # Enable Network offering
+        cls.network_offering.update(cls.apiclient, state='Enabled')
+
+        cls.network = Network.create(
+            cls.apiclient,
+            cls.services["isolated_network"],
+            accountid=cls.account1.name,
+            domainid=cls.account1.domainid,
+            networkofferingid=cls.network_offering.id,
+            zoneid=cls.zone.id
+        )
+
+        virtualmachine = VirtualMachine.create(
+            cls.apiclient,
+            services=cls.services["virtual_machine_userdata"],
+            accountid=cls.account1.name,
+            domainid=cls.account1.domainid,
+            serviceofferingid=cls.service_offering.id,
+            networkids=cls.network.id,
+            templateid=cls.template.id,
+            zoneid=cls.zone.id
+        )
+
+        vms = list_virtual_machines(
+            cls.apiclient,
+            account=cls.account1.name,
+            domainid=cls.account1.domainid,
+            id=virtualmachine.id
+        )
+        vm = vms[0]
+
+        # get vm cpu and memory values
+        cls.vm_cpu_count = vm.cpunumber
+        cls.vm_mem_count = vm.memory
+
+        routers = list_routers(
+            cls.apiclient,
+            account=cls.account1.name,
+            domainid=cls.account1.domainid
+        )
+
+        router = routers[0]
+
+        router_so_id = router.serviceofferingid
+
+        list_service_response = list_service_offering(
+            cls.apiclient,
+            id=router_so_id,
+            issystem="true",
+            systemvmtype="domainrouter",
+            listall="true"
+        )
+
+        # Get default router service offering cpu and memory values
+        cls.default_vr_cpu = list_service_response[0].cpunumber
+        cls.default_vr_ram = list_service_response[0].memory
+
+        cls._cleanup.append(virtualmachine)
+        cls._cleanup.append(cls.network)
+
+        # Disable Network offering
+        cls.network_offering.update(cls.apiclient, state='Disabled')
+        cls._cleanup.append(cls.network_offering)
+        cls._cleanup.append(cls.account1)
+        cls._cleanup.append(cls.domain1)
+
+    @classmethod
+    def tearDownClass(cls):
+        try:
+            cleanup_resources(cls.apiclient, cls._cleanup)
+        except Exception as e:
+            raise Exception("Warning: Exception during cleanup : %s" % e)
+        return

Review Comment:
   ```suggestion
           super(TestRouterResources, cls).tearDownClass()
   ```



##########
test/integration/component/test_router_resources.py:
##########
@@ -0,0 +1,824 @@
+# 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.
+
+"""
+Test case for router resources
+"""
+
+# Import local modules
+
+from nose.plugins.attrib import attr
+from marvin.cloudstackTestCase import cloudstackTestCase
+from marvin.cloudstackAPI import (scaleSystemVm,
+                                  stopRouter,
+                                  startRouter,
+                                  restartNetwork,
+                                  updateConfiguration)
+from marvin.lib.utils import (cleanup_resources)
+from marvin.lib.base import (NetworkOffering,
+                             ServiceOffering,
+                             VirtualMachine,
+                             Account,
+                             Domain,
+                             Network,
+                             Router,
+                             destroyRouter,
+                             Zone,
+                             updateResourceCount)
+from marvin.lib.common import (get_zone,
+                               get_template,
+                               get_domain,
+                               list_virtual_machines,
+                               list_networks,
+                               list_configurations,
+                               list_routers,
+                               list_service_offering)
+
+import logging
+
+class TestRouterResources(cloudstackTestCase):
+
+    @classmethod
+    def setupClass(cls):
+        cls.testClient = super(
+            TestRouterResources, cls
+        ).getClsTestClient()
+        cls.apiclient = cls.testClient.getApiClient()
+
+        cls.services = cls.testClient.getParsedTestDataConfig()
+        zone = get_zone(cls.apiclient, cls.testClient.getZoneForTests())
+        cls.zone = Zone(zone.__dict__)
+        cls.template = get_template(cls.apiclient, cls.zone.id)
+        cls._cleanup = []
+
+        cls.logger = logging.getLogger("TestRouterResources")
+        cls.stream_handler = logging.StreamHandler()
+        cls.logger.setLevel(logging.DEBUG)
+        cls.logger.addHandler(cls.stream_handler)
+
+        # Get Zone, Domain and templates
+        cls.domain = get_domain(cls.apiclient)
+
+        cls.template = get_template(
+            cls.apiclient,
+            cls.zone.id,
+            cls.services["ostype"]
+        )
+
+        cls.service_offering = ServiceOffering.create(
+            cls.apiclient,
+            cls.services["service_offerings"]["big"]
+        )
+
+        # Create new domain1
+        cls.domain1 = Domain.create(
+            cls.apiclient,
+            services=cls.services["acl"]["domain1"],
+            parentdomainid=cls.domain.id)
+
+        # Create account1
+        cls.account1 = Account.create(
+            cls.apiclient,
+            cls.services["acl"]["accountD1"],
+            domainid=cls.domain1.id
+        )
+
+        # Create Network Offering with all the services
+        cls.network_offering = NetworkOffering.create(
+            cls.apiclient,
+            cls.services["isolated_network_offering"]
+        )
+        # Enable Network offering
+        cls.network_offering.update(cls.apiclient, state='Enabled')
+
+        cls.network = Network.create(
+            cls.apiclient,
+            cls.services["isolated_network"],
+            accountid=cls.account1.name,
+            domainid=cls.account1.domainid,
+            networkofferingid=cls.network_offering.id,
+            zoneid=cls.zone.id
+        )
+
+        virtualmachine = VirtualMachine.create(
+            cls.apiclient,
+            services=cls.services["virtual_machine_userdata"],
+            accountid=cls.account1.name,
+            domainid=cls.account1.domainid,
+            serviceofferingid=cls.service_offering.id,
+            networkids=cls.network.id,
+            templateid=cls.template.id,
+            zoneid=cls.zone.id
+        )
+
+        vms = list_virtual_machines(
+            cls.apiclient,
+            account=cls.account1.name,
+            domainid=cls.account1.domainid,
+            id=virtualmachine.id
+        )
+        vm = vms[0]
+
+        # get vm cpu and memory values
+        cls.vm_cpu_count = vm.cpunumber
+        cls.vm_mem_count = vm.memory
+
+        routers = list_routers(
+            cls.apiclient,
+            account=cls.account1.name,
+            domainid=cls.account1.domainid
+        )
+
+        router = routers[0]
+
+        router_so_id = router.serviceofferingid
+
+        list_service_response = list_service_offering(
+            cls.apiclient,
+            id=router_so_id,
+            issystem="true",
+            systemvmtype="domainrouter",
+            listall="true"
+        )
+
+        # Get default router service offering cpu and memory values
+        cls.default_vr_cpu = list_service_response[0].cpunumber
+        cls.default_vr_ram = list_service_response[0].memory
+
+        cls._cleanup.append(virtualmachine)
+        cls._cleanup.append(cls.network)
+
+        # Disable Network offering
+        cls.network_offering.update(cls.apiclient, state='Disabled')
+        cls._cleanup.append(cls.network_offering)
+        cls._cleanup.append(cls.account1)
+        cls._cleanup.append(cls.domain1)

Review Comment:
   also you can use the super call to do the cleaning but they need to be in the order of creation for that.



##########
test/integration/component/test_router_resources.py:
##########
@@ -0,0 +1,824 @@
+# 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.
+
+"""
+Test case for router resources
+"""
+
+# Import local modules
+
+from nose.plugins.attrib import attr
+from marvin.cloudstackTestCase import cloudstackTestCase
+from marvin.cloudstackAPI import (scaleSystemVm,
+                                  stopRouter,
+                                  startRouter,
+                                  restartNetwork,
+                                  updateConfiguration)
+from marvin.lib.utils import (cleanup_resources)
+from marvin.lib.base import (NetworkOffering,
+                             ServiceOffering,
+                             VirtualMachine,
+                             Account,
+                             Domain,
+                             Network,
+                             Router,
+                             destroyRouter,
+                             Zone,
+                             updateResourceCount)
+from marvin.lib.common import (get_zone,
+                               get_template,
+                               get_domain,
+                               list_virtual_machines,
+                               list_networks,
+                               list_configurations,
+                               list_routers,
+                               list_service_offering)
+
+import logging
+
+class TestRouterResources(cloudstackTestCase):
+
+    @classmethod
+    def setupClass(cls):
+        cls.testClient = super(
+            TestRouterResources, cls
+        ).getClsTestClient()
+        cls.apiclient = cls.testClient.getApiClient()
+
+        cls.services = cls.testClient.getParsedTestDataConfig()
+        zone = get_zone(cls.apiclient, cls.testClient.getZoneForTests())
+        cls.zone = Zone(zone.__dict__)
+        cls.template = get_template(cls.apiclient, cls.zone.id)
+        cls._cleanup = []
+
+        cls.logger = logging.getLogger("TestRouterResources")
+        cls.stream_handler = logging.StreamHandler()
+        cls.logger.setLevel(logging.DEBUG)
+        cls.logger.addHandler(cls.stream_handler)
+
+        # Get Zone, Domain and templates
+        cls.domain = get_domain(cls.apiclient)
+
+        cls.template = get_template(
+            cls.apiclient,
+            cls.zone.id,
+            cls.services["ostype"]
+        )
+
+        cls.service_offering = ServiceOffering.create(
+            cls.apiclient,
+            cls.services["service_offerings"]["big"]
+        )
+
+        # Create new domain1
+        cls.domain1 = Domain.create(
+            cls.apiclient,
+            services=cls.services["acl"]["domain1"],
+            parentdomainid=cls.domain.id)
+
+        # Create account1
+        cls.account1 = Account.create(
+            cls.apiclient,
+            cls.services["acl"]["accountD1"],
+            domainid=cls.domain1.id
+        )
+
+        # Create Network Offering with all the services
+        cls.network_offering = NetworkOffering.create(
+            cls.apiclient,
+            cls.services["isolated_network_offering"]
+        )
+        # Enable Network offering
+        cls.network_offering.update(cls.apiclient, state='Enabled')
+
+        cls.network = Network.create(
+            cls.apiclient,
+            cls.services["isolated_network"],
+            accountid=cls.account1.name,
+            domainid=cls.account1.domainid,
+            networkofferingid=cls.network_offering.id,
+            zoneid=cls.zone.id
+        )
+
+        virtualmachine = VirtualMachine.create(
+            cls.apiclient,
+            services=cls.services["virtual_machine_userdata"],
+            accountid=cls.account1.name,
+            domainid=cls.account1.domainid,
+            serviceofferingid=cls.service_offering.id,
+            networkids=cls.network.id,
+            templateid=cls.template.id,
+            zoneid=cls.zone.id
+        )

Review Comment:
   please add to `_cleanup` immediately



##########
server/src/main/java/com/cloud/network/router/NetworkHelperImpl.java:
##########
@@ -502,6 +510,14 @@ public DomainRouterVO deployRouter(final RouterDeploymentDefinition routerDeploy
         // failed both times, throw the exception up
         final List<HypervisorType> hypervisors = getHypervisors(routerDeploymentDefinition);
 
+        // Increment the resource count with router offering.
+        // If router can't be deployed or started, decrement the resources.
+        // If resource.count.running.vms is false, increment resource count.
+        if (Boolean.TRUE.equals(VirtualMachineManager.ResourceCountRouters.valueIn(owner.getDomainId()))) {
+            _itMgr.incrementVrResourceCount(routerOffering,
+                    owner, true);
+        }

Review Comment:
   please extract this



##########
server/src/main/java/com/cloud/network/router/NetworkHelperImpl.java:
##########
@@ -262,8 +262,16 @@ public VirtualRouter destroyRouter(final long routerId, final Account caller, fi
             return null;
         }
 
+
+
         _accountMgr.checkAccess(caller, null, true, router);
 
+        final Account owner = _accountMgr.getAccount(router.getAccountId());
+        ServiceOfferingVO routerOffering = _serviceOfferingDao.findById(router.getServiceOfferingId());
+        if (Boolean.TRUE.equals(VirtualMachineManager.ResourceCountRouters.valueIn(router.getDomainId()))) {
+            _itMgr.decrementVrResourceCount(routerOffering, owner, true);
+        }

Review Comment:
   can you extract this?



##########
server/src/main/java/com/cloud/network/router/NetworkHelperImpl.java:
##########
@@ -551,6 +567,10 @@ public DomainRouterVO deployRouter(final RouterDeploymentDefinition routerDeploy
                     s_logger.debug("Failed to allocate the VR with hypervisor type " + hType + ", retrying one more time");
                     continue;
                 } else {
+                    // If VR can't be deployed then decrement the resource count
+                    if (Boolean.TRUE.equals(VirtualMachineManager.ResourceCountRouters.valueIn(owner.getDomainId()))) {
+                        _itMgr.decrementVrResourceCount(routerOffering, owner,true);
+                    }

Review Comment:
   sounds like a utility method and the comment as javadoc. Can you extracta and reuse this, please?



-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: commits-unsubscribe@cloudstack.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org