Boil the pasta, drain and leave it in a covered container.
Cut the octopus finely, as well as the onions and garlic too. Heat a wide and deep pot with oil and fry the onions and garlic.
Add the octopus, stir and add the chopped tomatoes. Leave everything to boil until the sauce thickens a bit.
Finally, season with spices, add some cherry tomatoes and a few minutes later, pour in the pasta. Stir and remove from the heat.