Beispiel #1
0
    def cleanup(self):
        resources = ["job_executions", "jobs", "job_binary_internals",
                     "job_binaries", "data_sources"]

        # TODO(boris-42): Delete only resources created by this context
        resource_manager.cleanup(
            names=map(lambda r: "sahara.%s" % r, resources),
            users=self.context.get("users", []))
Beispiel #2
0
    def cleanup(self):
        resources = ["job_executions", "jobs", "job_binary_internals",
                     "job_binaries", "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", []))
Beispiel #3
0
    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()
        ])
Beispiel #4
0
    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()
        ])
Beispiel #5
0
 def cleanup(self):
     # TODO(boris-42): Delete only resources created by this context
     resource_manager.cleanup(names=["glance.images"],
                              users=self.context.get("users", []))
Beispiel #6
0
 def cleanup(self):
     resource_manager.cleanup(names=["nova.servers"],
                              users=self.context.get("users", []))
Beispiel #7
0
 def cleanup(self):
     # TODO(boris-42): Delete only resources created by this context
     resource_manager.cleanup(names=["glance.images"],
                              users=self.context.get("users", []))
Beispiel #8
0
 def cleanup(self):
     resource_manager.cleanup(names=["heat.stacks"],
                              users=self.context.get("users", []))
Beispiel #9
0
 def cleanup(self):
     resource_manager.cleanup(names=["nova.servers"],
                              users=self.context.get("users", []))
Beispiel #10
0
 def cleanup(self):
     resource_manager.cleanup(names=["heat.stacks"], users=self.context.get("users", []))
Beispiel #11
0
 def cleanup(self):
     manager.cleanup(names=self.config,
                     admin_required=False,
                     users=self.context.get("users", []))
Beispiel #12
0
 def cleanup(self):
     manager.cleanup(names=self.config,
                     admin_required=True,
                     admin=self.context["admin"],
                     users=self.context.get("users", []))
Beispiel #13
0
 def cleanup(self):
     manager.cleanup(names=self.config,
                     admin_required=False,
                     users=self.context.get("users", []))
Beispiel #14
0
 def cleanup(self):
     manager.cleanup(names=self.config,
                     admin_required=True,
                     admin=self.context["admin"],
                     users=self.context.get("users", []))
Beispiel #15
0
 def cleanup(self):
     """This method is called after the task finish."""
     resource_manager.cleanup(names=["nova.servers"],
                              users=self.context.get("users", []))
Beispiel #16
0
 def cleanup(self):
     resource_manager.cleanup(names=["murano.packages"],
                              users=self.context.get("users", []))