Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
S
slapos.core
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Analytics
Analytics
CI / CD
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Ivan Tyagov
slapos.core
Commits
57237fc5
Commit
57237fc5
authored
Mar 28, 2013
by
Cédric de Saint Martin
Browse files
Options
Browse Files
Download
Plain Diff
Merge remote-tracking branch 'origin/arnau'
parents
8ca213fc
190cdcc6
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
9 additions
and
8 deletions
+9
-8
setup.py
setup.py
+4
-2
slapos/grid/slapgrid.py
slapos/grid/slapgrid.py
+5
-5
slapos/proxy/query.py
slapos/proxy/query.py
+0
-1
No files found.
setup.py
View file @
57237fc5
...
@@ -38,16 +38,18 @@ setup(name=name,
...
@@ -38,16 +38,18 @@ setup(name=name,
'lxml'
,
# needed to play with XML trees
'lxml'
,
# needed to play with XML trees
'netaddr>=0.7.5'
,
# to play safely with IPv6 prefixes
'netaddr>=0.7.5'
,
# to play safely with IPv6 prefixes
'netifaces'
,
# to fetch information about network devices
'netifaces'
,
# to fetch information about network devices
'pyflakes'
,
# For testing purposes
'setuptools'
,
# namespaces
'setuptools'
,
# namespaces
'supervisor'
,
# slapgrid uses supervisor to manage processes
'supervisor'
,
# slapgrid uses supervisor to manage processes
'unittest2'
,
'xml_marshaller>=0.9.3'
,
# to unmarshall/marshall python objects to/from
'xml_marshaller>=0.9.3'
,
# to unmarshall/marshall python objects to/from
# XML
# XML
'zope.interface'
,
# slap library implementes interfaces
'zope.interface'
,
# slap library implementes interfaces
'zc.buildout'
,
'zc.buildout'
,
]
+
additional_install_requires
,
]
+
additional_install_requires
,
extra_requires
=
{
'docs'
:
(
'Sphinx'
,
'repoze.sphinx.autointerface'
),},
extra_requires
=
{
'docs'
:
(
'Sphinx'
,
'repoze.sphinx.autointerface'
),},
tests_require
=
[
'unittest2'
,
'pyflakes'
,
],
zip_safe
=
False
,
# proxy depends on Flask, which has issues with
zip_safe
=
False
,
# proxy depends on Flask, which has issues with
# accessing templates
# accessing templates
entry_points
=
{
entry_points
=
{
...
...
slapos/grid/slapgrid.py
View file @
57237fc5
...
@@ -1026,17 +1026,17 @@ class Slapgrid(object):
...
@@ -1026,17 +1026,17 @@ class Slapgrid(object):
for
computer_partition_usage
in
computer_partition_usage_list
:
for
computer_partition_usage
in
computer_partition_usage_list
:
try
:
try
:
root
=
etree
.
fromstring
(
computer_partition_usage
.
usage
)
root
=
etree
.
fromstring
(
computer_partition_usage
.
usage
)
except
UnicodeError
:
except
UnicodeError
,
e
:
self
.
logger
.
info
(
"Failed to read %s."
%
(
self
.
logger
.
info
(
"Failed to read %s."
%
(
computer_partition_usage
.
usage
))
computer_partition_usage
.
usage
))
self
.
logger
.
error
(
UnicodeError
)
self
.
logger
.
error
(
UnicodeError
)
raise
"Failed to read %s."
%
(
computer_partition_usage
.
usage
)
raise
UnicodeError
(
"Failed to read %s: %s"
%
(
computer_partition_usage
.
usage
,
e
)
)
except
(
etree
.
XMLSyntaxError
,
etree
.
DocumentInvalid
)
as
e
:
except
(
etree
.
XMLSyntaxError
,
etree
.
DocumentInvalid
)
as
e
:
self
.
logger
.
info
(
"Failed to parse %s."
%
(
computer_partition_usage
.
usage
))
self
.
logger
.
info
(
"Failed to parse %s."
%
(
computer_partition_usage
.
usage
))
self
.
logger
.
error
(
e
)
self
.
logger
.
error
(
e
)
raise
_formatXMLError
(
e
)
raise
_formatXMLError
(
e
)
except
Exception
:
except
Exception
,
e
:
raise
"Failed to generate XML report."
raise
Exception
(
"Failed to generate XML report: %s"
%
e
)
for
movement
in
root
.
findall
(
'movement'
):
for
movement
in
root
.
findall
(
'movement'
):
xml
.
append
(
'<movement>'
)
xml
.
append
(
'<movement>'
)
...
@@ -1220,7 +1220,7 @@ class Slapgrid(object):
...
@@ -1220,7 +1220,7 @@ class Slapgrid(object):
slap_computer_usage
.
reportUsage
(
computer_consumption
)
slap_computer_usage
.
reportUsage
(
computer_consumption
)
else
:
else
:
logger
.
info
(
'XML file generated by asXML is not valid !'
)
logger
.
info
(
'XML file generated by asXML is not valid !'
)
raise
'XML file generated by asXML is not valid !'
raise
ValueError
(
'XML file generated by asXML is not valid !'
)
except
Exception
:
except
Exception
:
computer_partition_id
=
computer_partition
.
getId
()
computer_partition_id
=
computer_partition
.
getId
()
exception
=
traceback
.
format_exc
()
exception
=
traceback
.
format_exc
()
...
...
slapos/proxy/query.py
View file @
57237fc5
#!/opt/slapos/bin/py
# -*- coding: utf-8 -*-
# -*- coding: utf-8 -*-
# vim: set et sts=4:
# vim: set et sts=4:
...
...
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