Revision 89d091bf
b/snf-cyclades-app/synnefo/quotas/management/commands/resource-export-cyclades.py | ||
---|---|---|
40 | 40 |
help = "Export Cyclades resources in JSON format." |
41 | 41 |
|
42 | 42 |
def handle(self, *args, **options): |
43 |
data = {"service": resources.service, |
|
44 |
"resources": resources.resources} |
|
45 |
output = json.dumps(data, indent=4) |
|
43 |
output = json.dumps(resources.resources, indent=4) |
|
46 | 44 |
self.stdout.write(output + "\n") |
b/snf-cyclades-app/synnefo/quotas/resources.py | ||
---|---|---|
1 |
service = "cyclades" |
|
2 | 1 |
|
3 | 2 |
resources =\ |
4 | 3 |
[{"name": "cyclades.vm", |
5 |
"desc": "Number of virtual machines"}, |
|
4 |
"desc": "Number of virtual machines", |
|
5 |
"service_type": "compute", |
|
6 |
}, |
|
6 | 7 |
{"name": "cyclades.cpu", |
7 |
"desc": "Number of virtual machine processors"}, |
|
8 |
"desc": "Number of virtual machine processors", |
|
9 |
"service_type": "compute", |
|
10 |
}, |
|
8 | 11 |
{"name": "cyclades.ram", |
9 | 12 |
"desc": "Virtual machine memory size", |
10 |
"unit": "bytes"}, |
|
13 |
"unit": "bytes", |
|
14 |
"service_type": "compute", |
|
15 |
}, |
|
11 | 16 |
{"name": "cyclades.disk", |
12 | 17 |
"desc": "Virtual machine disk size", |
13 |
"unit": "bytes"}, |
|
18 |
"unit": "bytes", |
|
19 |
"service_type": "compute", |
|
20 |
}, |
|
14 | 21 |
{"name": "cyclades.network.private", |
15 |
"desc": "Number of private networks"}] |
|
22 |
"desc": "Number of private networks", |
|
23 |
"service_type": "compute", |
|
24 |
}] |
b/snf-pithos-app/pithos/api/management/commands/resource-export-pithos.py | ||
---|---|---|
41 | 41 |
help = "Export pithos resources in json format" |
42 | 42 |
|
43 | 43 |
def handle(self, *args, **options): |
44 |
data = {'service': resources.service, |
|
45 |
'resources': resources.resources, |
|
46 |
} |
|
47 |
output = json.dumps(data, indent=4) |
|
44 |
output = json.dumps(resources.resources, indent=4) |
|
48 | 45 |
self.stdout.write(output + '\n') |
b/snf-pithos-app/pithos/api/resources.py | ||
---|---|---|
31 | 31 |
# interpreted as representing official policies, either expressed |
32 | 32 |
# or implied, of GRNET S.A. |
33 | 33 |
|
34 |
service = "pithos" |
|
35 | 34 |
|
36 | 35 |
resources = [ |
37 | 36 |
{"desc": "Pithos account diskspace", |
38 | 37 |
"name": "pithos.diskspace", |
39 | 38 |
"unit": "bytes", |
39 |
"service_type": "object-store", |
|
40 | 40 |
} |
41 | 41 |
] |
Also available in: Unified diff