maas-devel team mailing list archive
-
maas-devel team
-
Mailing list archive
-
Message #00507
celeryconfig.py not found
Hello,
I'm trying to use django to delete a node from maas. I'm writing a
simple class that will handle this:
#!/usr/bin/env python
from argparse import ArgumentParser
import djcelery
import os
os.environ['CELERY_LOADER'] = 'djcelery.loaders.DjangoLoader'
os.environ['CELERY_CONFIG_MODULE'] = 'maas_django_control.celeryconfig'
os.environ['DJANGO_SETTINGS_MODULE'] = 'maas_django_control.settings'
from maasserver.models import Node
class NodeControl(object):
def __init__(self, hostname):
self.hostname = hostname
self.node = Node.objects.get(self.hostname)
def delete_node(self):
self.node.delete()
I'm getting the following error when executing:
from provisioningserver.tasks import (
File "/usr/lib/python2.7/dist-packages/provisioningserver/tasks.py",
line 34, in <module>
from celeryconfig import DHCP_CONFIG_FILE
Where can I obtain this? It does not exist anywhere on my system.
Thanks
Follow ups