diff --git a/README.rst b/README.rst index c4f4283..847e826 100644 --- a/README.rst +++ b/README.rst @@ -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 diff --git a/bilean/api/openstack/v1/__init__.py b/bilean/api/openstack/v1/__init__.py index 0fb4766..d3d5e6e 100644 --- a/bilean/api/openstack/v1/__init__.py +++ b/bilean/api/openstack/v1/__init__.py @@ -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 diff --git a/bilean/api/openstack/v1/policies.py b/bilean/api/openstack/v1/policies.py index 55bfe7f..059e914 100644 --- a/bilean/api/openstack/v1/policies.py +++ b/bilean/api/openstack/v1/policies.py @@ -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"""