Commit 19840f1d by Őry Máté

one: add rabbitmq on devenv

parent 2ea6aaa0
...@@ -57,3 +57,11 @@ git config --global color.ui true ...@@ -57,3 +57,11 @@ git config --global color.ui true
git config --global core.editor vim git config --global core.editor vim
true true
sudo apt-get install rabbitmq-server
sudo rabbitmqctl delete_user guest
sudo rabbitmqctl add_user nyuszi teszt
sudo rabbitmqctl add_vhost django
sudo rabbitmqctl set_permissions -p django nyuszi '.*' '.*' '.*'
...@@ -344,7 +344,7 @@ class Template(models.Model): ...@@ -344,7 +344,7 @@ class Template(models.Model):
else: else:
return "linux" return "linux"
@transaction.commit_on_success @transaction.autocommit
def safe_delete(self): def safe_delete(self):
if not self.instance_set.exclude(state='DONE').exists(): if not self.instance_set.exclude(state='DONE').exists():
self.delete() self.delete()
...@@ -549,6 +549,9 @@ class Instance(models.Model): ...@@ -549,6 +549,9 @@ class Instance(models.Model):
for i in Host.objects.filter(ipv4=host.ipv4).all(): for i in Host.objects.filter(ipv4=host.ipv4).all():
logger.warning('Delete orphan fw host (%s) of %s.' % (i, inst)) logger.warning('Delete orphan fw host (%s) of %s.' % (i, inst))
i.delete() i.delete()
for i in Host.objects.filter(mac=host.mac).all():
logger.warning('Delete orphan fw host (%s) of %s.' % (i, inst))
i.delete()
host.save() host.save()
host.enable_net() host.enable_net()
host.add_port("tcp", inst.get_port(), {"rdp": 3389, "nx": 22, host.add_port("tcp", inst.get_port(), {"rdp": 3389, "nx": 22,
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or sign in to comment