예제 #1
0
    def _delete_floating_ip(self, floating_ip):
        """Delete (deallocate) a  floating ip for a tenant

        :param floating_ip: The floating ip address to delete.
        """
        self.clients("nova").floating_ips.delete(floating_ip)
        bench_utils.wait_for_delete(
            floating_ip, update_resource=bench_utils.get_from_manager())
예제 #2
0
파일: utils.py 프로젝트: jtaleric/rally
    def _delete_floating_ip(self, floating_ip):
        """Delete (deallocate) a  floating ip for a tenant

        :param floating_ip: The floating ip address to delete.
        """
        self.clients("nova").floating_ips.delete(floating_ip)
        bench_utils.wait_for_delete(
            floating_ip,
            update_resource=bench_utils.get_from_manager()
        )
예제 #3
0
파일: utils.py 프로젝트: vponomaryov/rally
    def _delete_share_network(self, share_network):
        """Delete share network.

        :param share_network: instance of :class:`ShareNetwork`.
        """
        share_network.delete()
        bench_utils.wait_for_delete(
            share_network,
            update_resource=bench_utils.get_from_manager(),
            timeout=CONF.benchmark.manila_share_delete_timeout,
            check_interval=CONF.benchmark.manila_share_delete_poll_interval)
예제 #4
0
파일: utils.py 프로젝트: vponomaryov/rally
    def _delete_security_service(self, security_service):
        """Delete security service.

        :param security_service: instance of :class:`SecurityService`.
        """
        security_service.delete()
        bench_utils.wait_for_delete(
            security_service,
            update_resource=bench_utils.get_from_manager(),
            timeout=CONF.benchmark.manila_share_delete_timeout,
            check_interval=CONF.benchmark.manila_share_delete_poll_interval)
예제 #5
0
    def _delete_share_network(self, share_network):
        """Delete share network.

        :param share_network: instance of :class:`ShareNetwork`.
        """
        share_network.delete()
        bench_utils.wait_for_delete(
            share_network,
            update_resource=bench_utils.get_from_manager(),
            timeout=CONF.benchmark.manila_share_delete_timeout,
            check_interval=CONF.benchmark.manila_share_delete_poll_interval)
예제 #6
0
파일: utils.py 프로젝트: vponomaryov/rally
    def _delete_share(self, share):
        """Delete the given share.

        :param share: :class:`Share`
        """
        share.delete()
        error_statuses = ("error_deleting", )
        bench_utils.wait_for_delete(
            share,
            update_resource=bench_utils.get_from_manager(error_statuses),
            timeout=CONF.benchmark.manila_share_delete_timeout,
            check_interval=CONF.benchmark.manila_share_delete_poll_interval)
예제 #7
0
    def _delete_share(self, share):
        """Delete the given share.

        :param share: :class:`Share`
        """
        share.delete()
        error_statuses = ("error_deleting", )
        bench_utils.wait_for_delete(
            share,
            update_resource=bench_utils.get_from_manager(error_statuses),
            timeout=CONF.benchmark.manila_share_delete_timeout,
            check_interval=CONF.benchmark.manila_share_delete_poll_interval)
예제 #8
0
파일: network.py 프로젝트: meteorfox/rally
    def delete_floating_ip(self, fip_id, wait=False):
        """Delete floating IP.

        :param fip_id: int floating IP id
        :param wait: if True then wait to return until floating ip is deleted
        """
        self.client.floating_ips.delete(fip_id)
        if not wait:
            return
        bench_utils.wait_for_delete(
            fip_id,
            update_resource=lambda i: self._get_floating_ip(i, do_raise=True))
예제 #9
0
파일: network.py 프로젝트: aarefiev22/rally
    def delete_floating_ip(self, fip_id, wait=False):
        """Delete floating IP.

        :param fip_id: int floating IP id
        :param wait: if True then wait to return until floating ip is deleted
        """
        self.client.floating_ips.delete(fip_id)
        if not wait:
            return
        bench_utils.wait_for_delete(
            fip_id,
            update_resource=lambda i: self._get_floating_ip(i, do_raise=True))
예제 #10
0
파일: utils.py 프로젝트: varunarya10/rally
    def _delete_snapshot(self, snapshot):
        """Delete the given snapshot.

        Returns when the snapshot is actually deleted.

        :param snapshot: snapshot object
        """
        snapshot.delete()
        bench_utils.wait_for_delete(
            snapshot,
            update_resource=bench_utils.get_from_manager(),
            timeout=CONF.benchmark.cinder_volume_delete_timeout,
            check_interval=CONF.benchmark.cinder_volume_delete_poll_interval)
예제 #11
0
파일: utils.py 프로젝트: dlenwell/rally
    def _delete_image(self, image):
        """Deletes the given image.

        Returns when the image is actually deleted.

        :param image: Image object
        """
        image.delete()
        bench_utils.wait_for_delete(
            image,
            update_resource=bench_utils.get_from_manager(),
            timeout=CONF.benchmark.glance_image_delete_timeout,
            check_interval=CONF.benchmark.glance_image_delete_poll_interval)
예제 #12
0
파일: utils.py 프로젝트: varunarya10/rally
    def _delete_stack(self, stack):
        """Delete given stack.

        Returns when the stack is actually deleted.

        :param stack: stack object
        """
        stack.delete()
        bench_utils.wait_for_delete(
            stack,
            update_resource=bench_utils.get_from_manager(),
            timeout=CONF.benchmark.heat_stack_delete_timeout,
            check_interval=CONF.benchmark.heat_stack_delete_poll_interval)
예제 #13
0
    def _delete_environment(self, environment):
        """Delete given environment.

        Return when the environment is actually deleted.

        :param environment: Environment instance
        """
        self.clients("murano").environments.delete(environment.id)
        bench_utils.wait_for_delete(
            environment,
            update_resource=bench_utils.get_from_manager(),
            timeout=CONF.benchmark.delete_environment_timeout,
            check_interval=CONF.benchmark.delete_environment_check_interval)
예제 #14
0
파일: utils.py 프로젝트: sahanasj/rally
    def _delete_image(self, image):
        """Deletes the given image.

        Returns when the image is actually deleted.

        :param image: Image object
        """
        image.delete()
        bench_utils.wait_for_delete(
            image,
            update_resource=bench_utils.get_from_manager(),
            timeout=CONF.benchmark.glance_image_delete_timeout,
            check_interval=CONF.benchmark.glance_image_delete_poll_interval)
예제 #15
0
파일: utils.py 프로젝트: yongfengdu/rally
    def _delete_backup(self, backup):
        """Delete the given backup.

        Returns when the backup is actually deleted.

        :param backup: backup instance
        """
        backup.delete()
        bench_utils.wait_for_delete(
            backup,
            update_resource=bench_utils.get_from_manager(),
            timeout=CONF.benchmark.cinder_volume_delete_timeout,
            check_interval=CONF.benchmark.cinder_volume_delete_poll_interval)
예제 #16
0
    def _delete_stack(self, stack):
        """Delete the given stack.

        Returns when the stack is actually deleted.

        :param stack: stack object
        """
        stack.delete()
        bench_utils.wait_for_delete(
            stack,
            update_resource=bench_utils.get_from_manager(),
            timeout=CONF.benchmark.heat_stack_delete_timeout,
            check_interval=CONF.benchmark.heat_stack_delete_poll_interval)
예제 #17
0
    def _delete_server(self, server):
        """Deletes the given server.

        Returns when the server is actually deleted.

        :param server: Server object
        """
        server.delete()
        bench_utils.wait_for_delete(
            server,
            update_resource=bench_utils.get_from_manager(),
            timeout=CONF.benchmark.nova_server_delete_timeout,
            check_interval=CONF.benchmark.nova_server_delete_poll_interval)
예제 #18
0
    def _delete_volume(self, volume):
        """Delete the given volume.

        Returns when the volume is actually deleted.

        :param volume: volume object
        """
        volume.delete()
        bench_utils.wait_for_delete(
            volume,
            update_resource=bench_utils.get_from_manager(),
            timeout=CONF.benchmark.cinder_volume_delete_timeout,
            check_interval=CONF.benchmark.cinder_volume_delete_poll_interval)
예제 #19
0
파일: utils.py 프로젝트: auroaj/rally
    def _delete_snapshot(self, snapshot):
        """Delete the given snapshot.

        Returns when the snapshot is actually deleted.

        :param snapshot: snapshot object
        """
        snapshot.delete()
        bench_utils.wait_for_delete(
            snapshot,
            update_resource=bench_utils.get_from_manager(),
            timeout=CONF.benchmark.cinder_volume_delete_timeout,
            check_interval=CONF.benchmark.cinder_volume_delete_poll_interval
        )
예제 #20
0
파일: utils.py 프로젝트: slashk/rally
    def _delete_volume(self, volume):
        """Delete the given volume.

        Returns when the volume is actually deleted.

        :param volume: volume object
        """
        volume.delete()
        bench_utils.wait_for_delete(
            volume,
            update_resource=bench_utils.get_from_manager(),
            timeout=CONF.benchmark.cinder_volume_delete_timeout,
            check_interval=CONF.benchmark.cinder_volume_delete_poll_interval
        )
예제 #21
0
파일: utils.py 프로젝트: mohitsethi/rally
    def _delete_server(self, server):
        """Deletes the given server.

        Returns when the server is actually deleted.

        :param server: Server object
        """
        server.delete()
        bench_utils.wait_for_delete(
            server,
            update_resource=bench_utils.get_from_manager(),
            timeout=CONF.benchmark.nova_server_delete_timeout,
            check_interval=CONF.benchmark.nova_server_delete_poll_interval
        )
예제 #22
0
파일: utils.py 프로젝트: NeCTAR-RC/rally
    def _delete_environment(self, environment):
        """Delete given environment.

        Return when the environment is actually deleted.

        :param environment: Environment instance
        """
        self.clients("murano").environments.delete(environment.id)
        bench_utils.wait_for_delete(
            environment,
            update_resource=bench_utils.get_from_manager(),
            timeout=CONF.benchmark.delete_environment_timeout,
            check_interval=CONF.benchmark.delete_environment_check_interval
        )
예제 #23
0
파일: utils.py 프로젝트: aarefiev22/rally
    def _delete_backup(self, backup):
        """Delete the given backup.

        Returns when the backup is actually deleted.

        :param backup: backup instance
        """
        backup.delete()
        bench_utils.wait_for_delete(
            backup,
            update_resource=bench_utils.get_from_manager(),
            timeout=CONF.benchmark.cinder_volume_delete_timeout,
            check_interval=CONF.benchmark.cinder_volume_delete_poll_interval
        )
예제 #24
0
파일: manila.py 프로젝트: vponomaryov/rally
    def _wait_for_resources_deletion(self, resources):
        """Waiter for resources deletion.

        :param resources: resource or list of resources for deletion
            verification
        """
        if not resources:
            return
        if not isinstance(resources, list):
            resources = [resources]
        for resource in resources:
            bench_utils.wait_for_delete(
                resource,
                update_resource=bench_utils.get_from_manager(),
                timeout=CONF.benchmark.manila_share_delete_timeout,
                check_interval=(
                    CONF.benchmark.manila_share_delete_poll_interval))
예제 #25
0
파일: utils.py 프로젝트: varunarya10/rally
    def _delete_environment(self, environment, timeout=180, check_interval=2):
        """Delete given environment.

        Return when the environment is actually deleted.

        :param environment: Environment instance
        :param timeout: Timeout in seconds after which a TimeoutException
                        will be raised, by default 180
        :param check_interval: Interval in seconds between the two consecutive
                               readiness checks, by default 2
        """
        self.clients("murano").environments.delete(environment.id)
        bench_utils.wait_for_delete(
            environment,
            update_resource=bench_utils.get_from_manager(),
            timeout=timeout,
            check_interval=check_interval)
예제 #26
0
파일: utils.py 프로젝트: Vaidyanath/rally
    def _delete_environment(self, environment, timeout=180, check_interval=2):
        """Delete given environment.

        Return when the environment is actually deleted.

        :param environment: Environment instance
        :param timeout: Timeout in seconds after which a TimeoutException
                        will be raised, by default 180
        :param check_interval: Interval in seconds between the two consecutive
                               readiness checks, by default 2
        """
        self.clients("murano").environments.delete(environment.id)
        bench_utils.wait_for_delete(
            environment,
            update_resource=bench_utils.get_from_manager(),
            timeout=timeout,
            check_interval=check_interval
        )
예제 #27
0
    def _delete_server(self, server, force=False):
        """Delete the given server.

        Returns when the server is actually deleted.

        :param server: Server object
        :param force: If True, force_delete will be used instead of delete.
        """
        atomic_name = ("nova.%sdelete_server") % (force and "force_" or "")
        with base.AtomicAction(self, atomic_name):
            if force:
                server.force_delete()
            else:
                server.delete()

            bench_utils.wait_for_delete(
                server,
                update_resource=bench_utils.get_from_manager(),
                timeout=CONF.benchmark.nova_server_delete_timeout,
                check_interval=CONF.benchmark.nova_server_delete_poll_interval)
예제 #28
0
파일: utils.py 프로젝트: yongfengdu/rally
    def _delete_servers(self, servers, force=False):
        """Delete multiple servers.

        :param servers: A list of servers to delete
        :param force: If True, force_delete will be used instead of delete.
        """
        atomic_name = ("nova.%sdelete_servers") % (force and "force_" or "")
        with base.AtomicAction(self, atomic_name):
            for server in servers:
                if force:
                    server.force_delete()
                else:
                    server.delete()

            for server in servers:
                bench_utils.wait_for_delete(
                    server,
                    update_resource=bench_utils.get_from_manager(),
                    timeout=CONF.benchmark.nova_server_delete_timeout,
                    check_interval=CONF.benchmark.
                    nova_server_delete_poll_interval)
예제 #29
0
파일: utils.py 프로젝트: briandowns/rally
    def _delete_server(self, server, force=False):
        """Delete the given server.

        Returns when the server is actually deleted.

        :param server: Server object
        :param force: If True, force_delete will be used instead of delete.
        """
        atomic_name = ("nova.%sdelete_server") % (force and "force_" or "")
        with base.AtomicAction(self, atomic_name):
            if force:
                server.force_delete()
            else:
                server.delete()

            bench_utils.wait_for_delete(
                server,
                update_resource=bench_utils.get_from_manager(),
                timeout=CONF.benchmark.nova_server_delete_timeout,
                check_interval=CONF.benchmark.nova_server_delete_poll_interval
            )
예제 #30
0
파일: utils.py 프로젝트: NeCTAR-RC/rally
    def _delete_servers(self, servers, force=False):
        """Delete multiple servers.

        :param servers: A list of servers to delete
        :param force: If True, force_delete will be used instead of delete.
        """
        atomic_name = ("nova.%sdelete_servers") % (force and "force_" or "")
        with base.AtomicAction(self, atomic_name):
            for server in servers:
                if force:
                    server.force_delete()
                else:
                    server.delete()

            for server in servers:
                bench_utils.wait_for_delete(
                    server,
                    update_resource=bench_utils.get_from_manager(),
                    timeout=CONF.benchmark.nova_server_delete_timeout,
                    check_interval=CONF.
                    benchmark.nova_server_delete_poll_interval
                )
예제 #31
0
    def test_wait_for_delete(self):
        def update_resource(self):
            raise exceptions.GetResourceNotFound()

        resource = mock.MagicMock()
        utils.wait_for_delete(resource, update_resource=update_resource)
예제 #32
0
    def test_wait_for_delete(self):
        def update_resource(self):
            raise exceptions.GetResourceNotFound()

        resource = mock.MagicMock()
        utils.wait_for_delete(resource, update_resource=update_resource)