[openstack-dev] [sdk] issues with using OpenStack SDK Python client
gerard.damm at wipro.com
gerard.damm at wipro.com
Mon May 7 20:58:53 UTC 2018
more details about router deletion:
I tried replacing the "!=None" test with a try statement:
try:
onap_router = conn.network.find_router(ONAP_ROUTER_NAME)
conn.network.delete_router(onap_router.id)
(router print-out just before deleting):
openstack.network.v2.router.Router(revision=3, distributed=False, status=ACTIVE, tenant_id=03aa47d3bcfd48199e0470b1c86a7f5b, created_at=2018-05-07T20:37:56Z, name=ONAP_router, admin_state_up=True, tags=[], updated_at=2018-05-07T20:37:59Z, ha=False, id=9fc30b97-3942-4444-856a-69c9e2368e02, availability_zone_hints=[], flavor_id=None, description=Router created for ONAP, availability_zones=['nova'], routes=[], external_gateway_info=None)
*** traceback.print_exception():
Traceback (most recent call last):
File "auto_script_config_openstack_for_onap.py", line 158, in delete_all_ONAP
conn.network.delete_router(onap_router.id)
File "/usr/local/lib/python3.5/dist-packages/openstack/network/v2/_proxy.py", line 2255, in delete_router
self._delete(_router.Router, router, ignore_missing=ignore_missing)
File "/usr/local/lib/python3.5/dist-packages/openstack/proxy.py", line 41, in check
return method(self, expected, actual, *args, **kwargs)
File "/usr/local/lib/python3.5/dist-packages/openstack/proxy.py", line 146, in _delete
value=value,
File "/usr/local/lib/python3.5/dist-packages/openstack/resource.py", line 847, in delete
self._translate_response(response, has_body=False, **kwargs)
File "/usr/local/lib/python3.5/dist-packages/openstack/resource.py", line 666, in _translate_response
exceptions.raise_from_response(response, error_message=error_message)
File "/usr/local/lib/python3.5/dist-packages/openstack/exceptions.py", line 212, in raise_from_response
http_status=http_status, request_id=request_id
openstack.exceptions.ConflictException: Unable to delete Router for 9fc30b97-3942-4444-856a-69c9e2368e02
(note: deleting the router from either the openstack CLI or from the Horizon GUI works fine)
The information contained in this electronic message and any attachments to this message are intended for the exclusive use of the addressee(s) and may contain proprietary, confidential or privileged information. If you are not the intended recipient, you should not disseminate, distribute or copy this e-mail. Please notify the sender immediately and destroy all copies of this message and any attachments. WARNING: Computer viruses can be transmitted via email. The recipient should check this email and any attachments for the presence of viruses. The company accepts no liability for any damage caused by any virus transmitted by this email. www.wipro.com
More information about the OpenStack-dev
mailing list