Revision a6e6fe48 snf-cyclades-app/synnefo/logic/management/commands/stats-cyclades.py
b/snf-cyclades-app/synnefo/logic/management/commands/stats-cyclades.py | ||
---|---|---|
1 |
# Copyright 2013 GRNET S.A. All rights reserved. |
|
1 |
# Copyright 2013-2014 GRNET S.A. All rights reserved.
|
|
2 | 2 |
# |
3 | 3 |
# Redistribution and use in source and binary forms, with or |
4 | 4 |
# without modification, are permitted provided that the following |
... | ... | |
31 | 31 |
# interpreted as representing official policies, either expressed |
32 | 32 |
# or implied, of GRNET S.A. |
33 | 33 |
|
34 |
|
|
35 | 34 |
import json |
36 | 35 |
import string |
37 | 36 |
|
... | ... | |
40 | 39 |
from snf_django.management.utils import pprint_table, parse_bool |
41 | 40 |
|
42 | 41 |
from snf_django.management.commands import SynnefoCommand, CommandError |
43 |
from synnefo.management.common import get_backend
|
|
42 |
from synnefo.management.common import get_resource
|
|
44 | 43 |
from synnefo.admin import stats as statistics |
45 | 44 |
|
46 | 45 |
|
... | ... | |
87 | 86 |
|
88 | 87 |
def handle(self, *args, **options): |
89 | 88 |
if options["backend"] is not None: |
90 |
backend = get_backend(options["backend"])
|
|
89 |
backend = get_resource("backend", options["backend"])
|
|
91 | 90 |
else: |
92 | 91 |
backend = None |
93 | 92 |
|
Also available in: Unified diff