Sync with global requirements

Change-Id: I00db3139a6e6442e8392dd83447ece810a6bb6ca
This commit is contained in:
Romain Ziba 2015-07-02 10:01:56 +02:00
parent 2dd5003a87
commit 743a941f9f
5 changed files with 44 additions and 47 deletions

View File

@ -18,7 +18,7 @@ from wsgiref import simple_server
from oslo.config import cfg from oslo.config import cfg
import auth from cerberus.api import auth
from cerberus.api import config as api_config from cerberus.api import config as api_config
from cerberus.api import hooks from cerberus.api import hooks
from cerberus.openstack.common import log as logging from cerberus.openstack.common import log as logging

View File

@ -149,7 +149,7 @@ def _security_report_get(uuid):
session = get_session() session = get_session()
return model_query( return model_query(
models.SecurityReport, read_deleted="no", session=session).filter( models.SecurityReport, read_deleted="no", session=session).filter(
models.SecurityReport.uuid == uuid).first() models.SecurityReport.uuid == uuid).first()
except Exception as e: except Exception as e:
LOG.exception(e) LOG.exception(e)
raise exception.DBException() raise exception.DBException()
@ -162,10 +162,9 @@ def security_report_get(uuid):
def _security_report_get_from_report_id(report_id): def _security_report_get_from_report_id(report_id):
try: try:
session = get_session() session = get_session()
return model_query(models.SecurityReport, return model_query(
read_deleted="no", models.SecurityReport, read_deleted="no", session=session).filter(
session=session).filter( models.SecurityReport.report_id == report_id).first()
models.SecurityReport.report_id == report_id).first()
except Exception as e: except Exception as e:
LOG.exception(e) LOG.exception(e)
raise exception.DBException() raise exception.DBException()
@ -178,8 +177,9 @@ def security_report_get_from_report_id(report_id):
def _security_report_delete(uuid): def _security_report_delete(uuid):
try: try:
session = get_session() session = get_session()
report = model_query(models.SecurityReport, read_deleted="no", report = model_query(
session=session).filter_by(uuid=uuid) models.SecurityReport, read_deleted="no",
session=session).filter_by(uuid=uuid)
report.delete() report.delete()
except Exception as e: except Exception as e:
LOG.exception(e) LOG.exception(e)
@ -307,10 +307,9 @@ def security_alarm_get_all():
def _security_alarm_get(alarm_id): def _security_alarm_get(alarm_id):
try: try:
session = get_session() session = get_session()
return model_query(models.SecurityAlarm, return model_query(
read_deleted="no", models.SecurityAlarm, read_deleted="no", session=session).filter(
session=session).filter( models.SecurityAlarm.alarm_id == alarm_id).first()
models.SecurityAlarm.alarm_id == alarm_id).first()
except Exception as e: except Exception as e:
LOG.exception(e) LOG.exception(e)
raise exception.DBException() raise exception.DBException()
@ -323,10 +322,9 @@ def security_alarm_get(alarm_id):
def _security_alarm_update_ticket_id(alarm_id, ticket_id): def _security_alarm_update_ticket_id(alarm_id, ticket_id):
try: try:
session = get_session() session = get_session()
alarm = model_query(models.SecurityAlarm, alarm = model_query(
read_deleted="no", models.SecurityAlarm, read_deleted="no", session=session).filter(
session=session).filter( models.SecurityAlarm.alarm_id == alarm_id).first()
models.SecurityAlarm.alarm_id == alarm_id).first()
alarm.ticket_id = ticket_id alarm.ticket_id = ticket_id
alarm.save(session) alarm.save(session)

View File

@ -120,12 +120,12 @@ class CerberusManager(service.CerberusService):
'uuid': uuid.uuid4(), 'uuid': uuid.uuid4(),
'version': version, 'version': version,
'provider': 'provider':
plugin.PROVIDER, plugin.PROVIDER,
'type': plugin.TYPE, 'type': plugin.TYPE,
'description': 'description':
plugin.DESCRIPTION, plugin.DESCRIPTION,
'tool_name': 'tool_name':
plugin.TOOL_NAME}) plugin.TOOL_NAME})
else: else:
db_api.plugin_version_update(db_plugin_info.id, version) db_api.plugin_version_update(db_plugin_info.id, version)

View File

@ -1,22 +1,21 @@
# The order of packages is significant, because pip processes them in the order # The order of packages is significant, because pip processes them in the order
# of appearance. Changing the order has an impact on the overall integration # of appearance. Changing the order has an impact on the overall integration
# process, which may cause wedges in the gate later. # process, which may cause wedges in the gate later.
pbr>=0.6,!=0.7,<1.0 pbr>=0.6,<1.0
alembic>=0.7.2 alembic>=0.4.1,<=0.7.5.post2
Babel>=1.3 Babel>=1.3,<=1.3
eventlet>=0.15.1 eventlet>=0.13.0,<0.16.0
greenlet>=0.3.2 greenlet>=0.3.2,<=0.4.5
lockfile>=0.8 lockfile>=0.8,<=0.10.2
mysql-python MySQL-python<=1.2.5
oslo.config>=1.2.0,<1.5 oslo.config>=1.2.0,<1.5
oslo.messaging>=1.3.0,<=1.4.1 oslo.messaging>=1.3.0,<1.5
pecan>=0.4.5 pecan>=0.4.5,<=0.8.3
posix_ipc posix_ipc
python-keystoneclient>=0.4.2,<0.12 python-keystoneclient>=0.7.0,<0.12.0
python-neutronclient>=2.3 python-neutronclient>=2.4.0 # Bug #1469087 in launchpad (https://bugs.launchpad.net/python-neutronclient/+bug/1469087)
python-novaclient==2.20 python-novaclient>=2.17.0,<2.21
six>=1.6.0 six>=1.6.0,<=1.9.0
SQLAlchemy>=0.7.8,!=0.9.5,<=0.9.99 SQLAlchemy>=0.7.8,!=0.9.5,<=0.9.99
sqlalchemy-migrate>=0.8.2,!=0.8.4,<=0.9.1 WebOb>=1.2.3,<=1.4
webob>=1.2.3 WSME>=0.6,<=0.6.4
WSME>=0.7

View File

@ -2,23 +2,23 @@
# of appearance. Changing the order has an impact on the overall integration # of appearance. Changing the order has an impact on the overall integration
# process, which may cause wedges in the gate later. # process, which may cause wedges in the gate later.
hacking>=0.9.2,<0.10 hacking>=0.8.0,<0.9
# mock object framework # mock object framework
mock>=1.0 mock>=1.0,<=1.0.1
coverage>=3.6 coverage>=3.6,<=3.7.1
discover discover<=0.4.0
# fixture stubbing # fixture stubbing
fixtures>=0.3.14 fixtures>=0.3.14,<=1.0.0
oslotest>=1.1.0 # Apache-2.0 oslotest>=1.2.0,<1.3
python-subunit python-subunit>=0.0.18,<=1.1.0
nose nose
nose-exclude nose-exclude
nosexcover nosexcover
mox>=0.5.3,<=0.5.3 mox>=0.5.3,<=0.5.3
tempest-lib>=0.5.0 tempest-lib
# Doc requirements # Doc requirements
sphinx>=1.1.2,!=1.2.0,!=1.3b1,<1.3 sphinx>=1.1.2,<1.1.999
oslosphinx>=2.5.0,<2.6.0 # Apache-2.0 oslosphinx<=2.5.0
sphinxcontrib-httpdomain sphinxcontrib-httpdomain<=1.3.0
sphinxcontrib-pecanwsme>=0.8 sphinxcontrib-pecanwsme>=0.6,<=0.8.0