Skip to content
GitLab
Menu
Projects
Groups
Snippets
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
itminedu
synnefo
Commits
31b2f900
Commit
31b2f900
authored
Jun 03, 2013
by
Giorgos Korfiatis
Browse files
cyclades, pithos: Update resource definitions
Include service_type in each resource dict.
parent
f92e9fa9
Changes
4
Hide whitespace changes
Inline
Side-by-side
snf-cyclades-app/synnefo/quotas/management/commands/resource-export-cyclades.py
View file @
31b2f900
...
...
@@ -40,7 +40,5 @@ class Command(NoArgsCommand):
help
=
"Export Cyclades resources in JSON format."
def
handle
(
self
,
*
args
,
**
options
):
data
=
{
"service"
:
resources
.
service
,
"resources"
:
resources
.
resources
}
output
=
json
.
dumps
(
data
,
indent
=
4
)
output
=
json
.
dumps
(
resources
.
resources
,
indent
=
4
)
self
.
stdout
.
write
(
output
+
"
\n
"
)
snf-cyclades-app/synnefo/quotas/resources.py
View file @
31b2f900
service
=
"cyclades"
resources
=
\
[{
"name"
:
"cyclades.vm"
,
"desc"
:
"Number of virtual machines"
},
"desc"
:
"Number of virtual machines"
,
"service_type"
:
"compute"
,
},
{
"name"
:
"cyclades.cpu"
,
"desc"
:
"Number of virtual machine processors"
},
"desc"
:
"Number of virtual machine processors"
,
"service_type"
:
"compute"
,
},
{
"name"
:
"cyclades.ram"
,
"desc"
:
"Virtual machine memory size"
,
"unit"
:
"bytes"
},
"unit"
:
"bytes"
,
"service_type"
:
"compute"
,
},
{
"name"
:
"cyclades.disk"
,
"desc"
:
"Virtual machine disk size"
,
"unit"
:
"bytes"
},
"unit"
:
"bytes"
,
"service_type"
:
"compute"
,
},
{
"name"
:
"cyclades.network.private"
,
"desc"
:
"Number of private networks"
}]
"desc"
:
"Number of private networks"
,
"service_type"
:
"compute"
,
}]
snf-pithos-app/pithos/api/management/commands/resource-export-pithos.py
View file @
31b2f900
...
...
@@ -41,8 +41,5 @@ class Command(BaseCommand):
help
=
"Export pithos resources in json format"
def
handle
(
self
,
*
args
,
**
options
):
data
=
{
'service'
:
resources
.
service
,
'resources'
:
resources
.
resources
,
}
output
=
json
.
dumps
(
data
,
indent
=
4
)
output
=
json
.
dumps
(
resources
.
resources
,
indent
=
4
)
self
.
stdout
.
write
(
output
+
'
\n
'
)
snf-pithos-app/pithos/api/resources.py
View file @
31b2f900
...
...
@@ -31,11 +31,11 @@
# interpreted as representing official policies, either expressed
# or implied, of GRNET S.A.
service
=
"pithos"
resources
=
[
{
"desc"
:
"Pithos account diskspace"
,
"name"
:
"pithos.diskspace"
,
"unit"
:
"bytes"
,
"service_type"
:
"object-store"
,
}
]
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment