Support Attaching to an existing OpenStack Network
As: An app designer I want to: I want to be able to attach my compute to existing networks So that: I can bind to specific public or service specific networks
AC1: Should be able to specify network ID or name AC2: Should somehow be able to define which network should be the primary (we should have something like admin net for provisioning, default applicative network, others networks)
We've just stumbled across this issue as well. We assume that the network_name of the tosca.capabilities.Endpoint.Admin of a compute instance is supposed to be used to configure which network is used for admin access.
It's set to PRIVATE by default, which uses private_network_name from the infrastructure configuration.
Currently this always adds a network connection to the compute instance, even though the instance might be connected to that network explicitly. In this case, the compute instance gets connected to the same network twice.
Our suggestion would be to first attach the instance to explicitly connected networks. After that the endpoint gets applied by checking if the instance is connected to the suggested network already, which leads to setting that network as AccessNetwork: true. If the network isn't connected, a new connection to it should get created automatically, which is the current behaviour.