[Maas-devel] celeryconfig.py not found
Jeff Marcom
jeff.marcom at canonical.com
Thu Sep 6 19:53:00 UTC 2012
On 09/06/2012 02:31 PM, Jeff Marcom wrote:
> 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
I was able to retrieve the file. Thanks
More information about the Maas-devel
mailing list