Commit d6891337 by Őry Máté

fabfile: remove trash from namespace

Fab can't work with a #! as "#!/usr/bin/env fab -f" would be three words,
which is not supported by Linux
parent 65e7d88a
#!/usr/bin/env fab #!/bin/echo Usage: fab --list -f
import contextlib import contextlib
import datetime import datetime
...@@ -10,14 +10,14 @@ from fabric.decorators import roles, parallel ...@@ -10,14 +10,14 @@ from fabric.decorators import roles, parallel
env.roledefs['portal'] = ['localhost'] env.roledefs['portal'] = ['localhost']
try: try:
from vm.models import Node from vm.models import Node as _Node
from storage.models import DataStore from storage.models import DataStore as _DataStore
except Exception as e: except Exception as e:
print e print e
else: else:
env.roledefs['node'] = [unicode(n.host.ipv4) env.roledefs['node'] = [unicode(n.host.ipv4)
for n in Node.objects.filter(enabled=True)] for n in _Node.objects.filter(enabled=True)]
env.roledefs['storage'] = [DataStore.objects.get().hostname] env.roledefs['storage'] = [_DataStore.objects.get().hostname]
def update_all(): def update_all():
......
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