コード例 #1
0
ファイル: sahara_job_binaries.py プロジェクト: rvbaz/rally
    def cleanup(self):
        resources = ["job_binary_internals", "job_binaries"]

        # TODO(boris-42): Delete only resources created by this context
        resource_manager.cleanup(
            names=["sahara.%s" % res for res in resources],
            users=self.context.get("users", []))
コード例 #2
0
ファイル: sahara_data_sources.py プロジェクト: dalees/rally
    def cleanup(self):
        resources = ["job_executions", "jobs", "data_sources"]

        # TODO(boris-42): Delete only resources created by this context
        resource_manager.cleanup(
            names=["sahara.%s" % res for res in resources],
            users=self.context.get("users", []))
コード例 #3
0
ファイル: sahara_data_sources.py プロジェクト: paboldin/rally
    def cleanup(self):
        resources = ["job_executions", "jobs", "data_sources"]

        # TODO(boris-42): Delete only resources created by this context
        resource_manager.cleanup(
            names=["sahara.%s" % res for res in resources],
            users=self.context.get("users", []))
コード例 #4
0
    def cleanup(self):
        resources = ["job_binary_internals", "job_binaries"]

        # TODO(boris-42): Delete only resources created by this context
        resource_manager.cleanup(
            names=["sahara.%s" % res for res in resources],
            users=self.context.get("users", []))
コード例 #5
0
    def cleanup(self):
        resources = ["data_sources"]
        for swift_object in self.context["sahara"]["swift_objects"]:
            res_cleanup.SwiftObject(resource=swift_object[1])
        res_cleanup.SwiftContainer(
            resource=self.context["sahara"]["container_name"])

        # TODO(boris-42): Delete only resources created by this context
        resource_manager.cleanup(
            names=["sahara.%s" % res for res in resources],
            users=self.context.get("users", []))
コード例 #6
0
ファイル: test_manager.py プロジェクト: aarefiev22/rally
    def test_cleanup(self, mock_find, mock_seek_and_destroy):
        manager.cleanup(names=["a", "b"], admin_required=True,
                        admin="admin", users=["user"])

        mock_find.assert_called_once_with(["a", "b"], True)

        mock_seek_and_destroy.assert_has_calls([
            mock.call(mock_find.return_value[0], "admin", ["user"]),
            mock.call().exterminate(),
            mock.call(mock_find.return_value[1], "admin", ["user"]),
            mock.call().exterminate()
        ])
コード例 #7
0
 def cleanup(self):
     for user, tenant_id in rutils.iterate_per_tenants(
             self.context["users"]):
         if self.context["tenants"][tenant_id].get("sahara", {}).get(
                 "container", {}).get("name") is not None:
             for swift_object in (
                     self.context["tenants"][tenant_id]["sahara"]
                 ["container"]["output_swift_objects"]):
                 res_cleanup.SwiftObject(swift_object[1])
         res_cleanup.SwiftContainer(self.context["tenants"][tenant_id].get(
             "sahara", {}).get("container", {}).get("name"))
     resources = ["data_sources"]
     resource_manager.cleanup(
         names=["sahara.%s" % res for res in resources],
         users=self.context.get("users", []))
コード例 #8
0
 def cleanup(self):
     for user, tenant_id in rutils.iterate_per_tenants(
             self.context["users"]):
         if self.context["tenants"][tenant_id].get(
                 "sahara", {}).get("container", {}).get("name") is not None:
             for swift_object in (
                 self.context["tenants"][tenant_id]["sahara"]["container"][
                     "output_swift_objects"]):
                 res_cleanup.SwiftObject(swift_object[1])
         res_cleanup.SwiftContainer(
             self.context["tenants"][tenant_id].get(
                 "sahara", {}).get("container", {}).get("name"))
     resources = ["data_sources"]
     resource_manager.cleanup(
         names=["sahara.%s" % res for res in resources],
         users=self.context.get("users", []))
コード例 #9
0
ファイル: test_manager.py プロジェクト: noah8713/rally-ovs
    def test_cleanup(self, mock_find_resource_managers, mock_seek_and_destroy):
        manager.cleanup(names=["a", "b"],
                        admin_required=True,
                        admin="admin",
                        users=["user"])

        mock_find_resource_managers.assert_called_once_with(["a", "b"], True)

        mock_seek_and_destroy.assert_has_calls([
            mock.call(mock_find_resource_managers.return_value[0], "admin",
                      ["user"]),
            mock.call().exterminate(),
            mock.call(mock_find_resource_managers.return_value[1], "admin",
                      ["user"]),
            mock.call().exterminate()
        ])
コード例 #10
0
ファイル: servers.py プロジェクト: l8huang/rally
 def cleanup(self):
     resource_manager.cleanup(names=["nova.servers"], users=self.context.get("users", []))
コード例 #11
0
 def cleanup(self):
     resource_manager.cleanup(names=["murano.packages"],
                              users=self.context.get("users", []))
コード例 #12
0
ファイル: murano_packages.py プロジェクト: aarefiev22/rally
 def cleanup(self):
     resource_manager.cleanup(names=["murano.packages"],
                              users=self.context.get("users", []))
コード例 #13
0
ファイル: zones.py プロジェクト: lezbar/rally
 def cleanup(self):
     # TODO(boris-42): Delete only resources created by this context
     resource_manager.cleanup(names=["designate.zones"],
                              users=self.context.get("users", []))
コード例 #14
0
ファイル: servers.py プロジェクト: noah8713/rally-ovs
 def cleanup(self):
     resource_manager.cleanup(names=["nova.servers"],
                              users=self.context.get("users", []))
コード例 #15
0
ファイル: stacks.py プロジェクト: huikang/rally
 def cleanup(self):
     resource_manager.cleanup(names=["heat.stacks"],
                              users=self.context.get("users", []))
コード例 #16
0
 def cleanup(self):
     manager.cleanup(names=self.config,
                     admin_required=False,
                     users=self.context.get("users", []))
コード例 #17
0
ファイル: context.py プロジェクト: aarefiev22/rally
 def cleanup(self):
     manager.cleanup(names=self.config,
                     admin_required=True,
                     admin=self.context["admin"],
                     users=self.context.get("users", []))
コード例 #18
0
 def cleanup(self):
     resource_manager.cleanup(names=["heat.stacks"],
                              users=self.context.get("users", []))
コード例 #19
0
ファイル: sahara_image.py プロジェクト: paboldin/rally
    def cleanup(self):

        # TODO(boris-42): Delete only resources created by this context
        if self.context["need_sahara_image_cleanup"]:
            resource_manager.cleanup(names=["glance.images"],
                                     users=self.context.get("users", []))
コード例 #20
0
    def cleanup(self):

        # TODO(boris-42): Delete only resources created by this context
        if self.context["need_sahara_image_cleanup"]:
            resource_manager.cleanup(names=["glance.images"],
                                     users=self.context.get("users", []))
コード例 #21
0
ファイル: context.py プロジェクト: aarefiev22/rally
 def cleanup(self):
     manager.cleanup(names=self.config,
                     admin_required=False,
                     users=self.context.get("users", []))
コード例 #22
0
 def cleanup(self):
     manager.cleanup(names=self.config,
                     admin_required=True,
                     admin=self.context["admin"],
                     users=self.context.get("users", []))