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:
onap_gateway_external_subnets.append({'subnet_id':ext_subn_id})
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
https://developer.openstack.org/api-ref/network/v2/#layer-3-networking
(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
__________________________________________________________________________
OpenStack Development Mailing List (not for usage questions)
Unsubscribe: [email protected]?subject:unsubscribe
http://lists.openstack.org/cgi-bin/mailman/listinfo/openstack-dev