Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- ^[[01;31m2014-05-06 14:06:14.228 TRACE neutron.api.v2.resource ^[[01;35m^[[00mTraceback (most recent call last):
- ^[[01;31m2014-05-06 14:06:14.228 TRACE neutron.api.v2.resource ^[[01;35m^[[00m File "/opt/stack/neutron/neutron/api/v2/resource.py", line 87, in resource
- ^[[01;31m2014-05-06 14:06:14.228 TRACE neutron.api.v2.resource ^[[01;35m^[[00m result = method(request=request, **args)
- ^[[01;31m2014-05-06 14:06:14.228 TRACE neutron.api.v2.resource ^[[01;35m^[[00m File "/opt/stack/neutron/neutron/api/v2/base.py", line 423, in create
- ^[[01;31m2014-05-06 14:06:14.228 TRACE neutron.api.v2.resource ^[[01;35m^[[00m obj = obj_creator(request.context, **kwargs)
- ^[[01;31m2014-05-06 14:06:14.228 TRACE neutron.api.v2.resource ^[[01;35m^[[00m File "/opt/stack/neutron/neutron/plugins/cisco/n1kv/n1kv_neutron_plugin.py", line 1372, in create_network_profile
- ^[[01;31m2014-05-06 14:06:14.228 TRACE neutron.api.v2.resource ^[[01;35m^[[00m net_p['id'])
- ^[[01;31m2014-05-06 14:06:14.228 TRACE neutron.api.v2.resource ^[[01;35m^[[00m File "/opt/stack/neutron/neutron/plugins/cisco/db/n1kv_db_v2.py", line 906, in delete_profile_binding
- ^[[01;31m2014-05-06 14:06:14.228 TRACE neutron.api.v2.resource ^[[01;35m^[[00m db_session.delete(binding)
- ^[[01;31m2014-05-06 14:06:14.228 TRACE neutron.api.v2.resource ^[[01;35m^[[00m File "/usr/lib/python2.7/dist-packages/sqlalchemy/orm/session.py", line 1279, in delete
- ^[[01;31m2014-05-06 14:06:14.228 TRACE neutron.api.v2.resource ^[[01;35m^[[00m raise exc.UnmappedInstanceError(instance)
- ^[[01;31m2014-05-06 14:06:14.228 TRACE neutron.api.v2.resource ^[[01;35m^[[00mUnmappedInstanceError: Class '__builtin__.NoneType' is not mapped
- def get_profile_binding(db_session, tenant_id, profile_id):
- """Get Network/Policy Profile - Tenant binding."""
- LOG.debug(_("get_profile_binding()"))
- try:
- return (db_session.query(n1kv_models_v2.ProfileBinding).filter_by(
- tenant_id=tenant_id, profile_id=profile_id).one())
- except exc.NoResultFound:
- c_exc.ProfileTenantBindingNotFound(profile_id=profile_id)
- def delete_profile_binding(db_session, tenant_id, profile_id):
- """Delete Policy Binding."""
- LOG.debug(_("delete_profile_binding()"))
- db_session = db_session or db.get_session()
- try:
- binding = get_profile_binding(db_session, tenant_id, profile_id)
- with db_session.begin(subtransactions=True):
- db_session.delete(binding)
- except c_exc.ProfileTenantBindingNotFound:
- LOG.debug(_("Profile-Tenant binding missing for profile ID "
- "%(profile_id)s and tenant ID %(tenant_id)s"),
- {"profile_id": profile_id, "tenant_id": tenant_id})
- return
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement