Issue raised by c689:
When we create a network using the openstack plugin v3, we see that kwargs are not configured anymore (as they were with openstack plugin v2).
Logs for creation with OSPv3 plugin:
2019-09-05 13:00:46.085 LOG <test_ext_netw_ospv3> [network_u9c2m0.create] DEBUG: Attempting to create network with these args: {u'router:external': True, u'name': u'test_network', u'admin_state_up': True, u'tenant_id': u'77c0dff409f44af2a4e772b126447ceb', u'apic:distinguished_names': {u'ExternalNetwork': u'uni/tn-prj_77c0dff409f44af2a4e772b126447ceb/out-l3out_test_n/instP-EPG_l3out_test_n'}, u'apic:nat_type': u'', u'port_security_enabled': True, u'project_id': u'77c0dff409f44af2a4e772b126447ceb'}
2019-09-05 13:00:47.502 LOG <test_ext_netw_ospv3> [network_u9c2m0.create] DEBUG: Created network with this result: openstack.network.v2.network.Network(providerhysical_network=physnet1, ipv6_address_scope=None, revision_number=4, port_security_enabled=True, provider:network_type=opflex, id=7e0b15ef-a11f-468a-a4da-31fc75d5661b, router:external=True, availability_zone_hints=[], availability_zones=[], location=Munch({'project': Munch({'domain_id': None, 'id': u'77c0dff409f44af2a4e772b126447ceb', 'name': 'l2ext_test', 'domain_name': 'Default'}), 'zone': None, 'region_name': u'regionOne', 'cloud': 'defaults'}), ipv4_address_scope=None, shared=False, project_id=77c0dff409f44af2a4e772b126447ceb, status=ACTIVE, subnets=[], description=, tags=[], updated_at=2019-09-05T11:00:46Z, is_default=False, provider:segmentation_id=None, name=test_network, admin_state_up=True, created_at=2019-09-05T11:00:46Z, mtu=1500)
2019-09-05 13:00:48.215 CFY <test_ext_netw_ospv3> [network_u9c2m0.create] Task succeeded 'openstack_plugin.resources.network.network.create'
But "apic" configuration is not executed/handled.
Logs for creation in OSPv2:
(and the "apic" configuration is properly done)
2019-07-04 09:57:16.944 LOG <pxs_vm_n_mgmt_uqfwzs> [network_1ywtw5.create] DEBUG: REQ: curl -g -i --cacert "/etc/cloudify/[REDACTED].pem" -X POST https://[REDACTED]:13696/v2.0/networks -H "Accept: application/json" -H "Content-Type: application/json" -H "User-Agent: python-neutronclient" -H "X-Auth-Token: {SHA1}aafcdb0293439fff6584e632902de933b0b888a4" -d '{"network": {"router:external": true, "apic:nat_type": "", "tenant_id": "6cbbb48f42e74cf9957d50f0ad0f7180", "name": "pxs_vm_n_mgmt", "admin_state_up": true, "port_security_enabled": true, "apic:distinguished_names": {"ExternalNetwork": "uni/tn-prj_6cbbb48f42e74cf9957d50f0ad0f7180/out-pxs_vm_mgmt/instP-EPG_pxs_vm_mgmt"}}}'
2019-07-04 09:57:18.062 LOG <pxs_vm_n_mgmt_uqfwzs> [network_1ywtw5.create] DEBUG: RESP BODY: {"network": {"apic:bgp_enable": false, "apic:bgp_asn": "0", "providerhysical_network": "physnet1", "apic:distinguished_names": {"ExternalNetwork": "uni/tn-prj_6cbbb48f42e74cf9957d50f0ad0f7180/out-pxs_vm_mgmt/instP-EPG_pxs_vm_mgmt", "VRF": "uni/tn-prj_6cbbb48f42e74cf9957d50f0ad0f7180/ctx-pxs_vm_mgmt", "EndpointGroup": "uni/tn-prj_6cbbb48f42e74cf9957d50f0ad0f7180/ap-OpenStack/epg-EXT-pxs_vm_mgmt", "BridgeDomain": "uni/tn-prj_6cbbb48f42e74cf9957d50f0ad0f7180/BD-EXT-pxs_vm_mgmt"}, "ipv6_address_scope": null, "revision_number": 4, "port_security_enabled": true, "mtu": 1500, "apic:bgp_type": "default_export", "id": "559bb3ae-3599-4d07-9d6f-7fb5f6162acf", "description": "", "router:external": true, "availability_zone_hints": [], "availability_zones": [], "ipv4_address_scope": null, "shared": false, "project_id": "6cbbb48f42e74cf9957d50f0ad0f7180", "status": "ACTIVE", "subnets": [], "apic:synchronization_state": "synced", "tags": [], "updated_at": "2019-07-04T07:57:17Z", "is_default": false, "apic:nat_type": "", "provider:segmentation_id": null, "name": "pxs_vm_n_mgmt", "admin_state_up": true, "tenant_id": "6cbbb48f42e74cf9957d50f0ad0f7180", "created_at": "2019-07-04T07:57:17Z", "provider:network_type": "opflex", "apic:external_cidrs": ["0.0.0.0/0"], "apic:svi": false}}
Update on this Jira , I checked the openstacksdk -create_network- method as the documentation
https://docs.openstack.org/api-ref/network/v2/?expanded=create-network-detail#create-network.
and source code as far we can tell only supports the following args
while in v2 [ we are using the neutron client directly ] , there is no restriction to what we could send , it just forward that to the underlying API
CC
What is the actual behavior and the expected behavior?
The expected behavior is demonstrated in the OS plugin v2 logs.
Please attach a blueprint. As said, the OpenstackSDK, which is Openstack’s official Python SDK does not support sending miscellaneous keyword args to the create_network function. I also don’t see that there is such a feature in the Openstack documentation. What this means is that it’s not supported. With a blueprint we will be able to look at what is the intended usage, and hopefully see what work around we can find via officially supported means.
Customer didn’t provide blueprint and requested to close the ticket.