[openstack-dev] [sdk] issues with using OpenStack SDK Python client

gerard.damm at wipro.com gerard.damm at wipro.com
Wed May 9 20:49:05 UTC 2018

Many thanks !

Adding a gateway to a router: it looks like it works in the router creation method, but not in the router update method.
(i.e., passing a external_gateway_info dictionary in conn.network.create_router() worked,
but doing the same with conn.network.add_gateway_to_router() did not work)

the (verbose) code snippet is:

external_network = conn.network.find_network(EXTERNAL_NETWORK_NAME)

onap_gateway_external_subnets = []
for ext_subn_id in external_network.subnet_ids:

network_dict_body = {
        'network_id': external_network.id,
        'enable_snat': True,
        'external_fixed_ips': onap_gateway_external_subnets}

onap_router = conn.network.create_router(
    name = ONAP_ROUTER_NAME,
    description = ONAP_ROUTER_DESC,
    external_gateway_info = network_dict_body,
    is_admin_state_up = True)

I got the idea of trying at creation time, from the create_router API (external_gateway_info entry) at
(thanks for the tip!)

So there might be a difference between how network.create_router() handles this external_gateway_info,
versus how network.add_gateway_to_router() handles it.

About identity_api_version in clouds.yaml:
yep, that works !

About the "!=None" comparison problem: OK, thanks for the fixing effort in progress !

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