Revice policy api

This commit is contained in:
lvdongbing 2016-01-05 00:55:12 -05:00
parent 6298bf7b09
commit 5ff6ab5518
3 changed files with 25 additions and 4 deletions

View File

@ -1,4 +1,25 @@
Bilean
======
/Todo/
--------
Overview
--------
Bilean is a billing service for OpenStack clouds, it provides trigger-type
billing based on other OpenStack services' notification.
---------
Resources
---------
Launchpad Projects
------------------
- Server: https://launchpad.net/bilean
Blueprints
----------
- Blueprints: https://blueprints.launchpad.net/bilean
Bug Tracking
------------
- Bugs: https://bugs.launchpad.net/bilean

View File

@ -14,6 +14,7 @@
import routes
from bilean.api.openstack.v1 import events
from bilean.api.openstack.v1 import policies
from bilean.api.openstack.v1 import resources
from bilean.api.openstack.v1 import rules
from bilean.api.openstack.v1 import users

View File

@ -101,7 +101,7 @@ class PolicyController(object):
raise exc.HTTPUnprocessableEntity()
policy_data = body.get('policy', None)
if profile_data is None:
if policy_data is None:
raise exc.HTTPBadRequest(_("Malformed request data, missing "
"'policy' key in request body."))
@ -118,7 +118,7 @@ class PolicyController(object):
raise exc.HTTPUnprocessableEntity()
policy_data = body.get('policy', None)
if profile_data is None:
if policy_data is None:
raise exc.HTTPBadRequest(_("Malformed request data, missing "
"'policy' key in request body."))
@ -130,7 +130,6 @@ class PolicyController(object):
metadata, is_default)
return {'policy': policy}
@util.policy_enforce
def delete(self, req, policy_id):
"""Delete a policy with given policy_id"""