kuryr-libnetwork/kuryr/common/constants.py
Mohammad Banikazemi b25eca0d7d Support for existing Neutron nets
An existing Neutron network can be specified as the network
being used for a Docker network being created. The Neutron
network id or name can be specified.

If a Docker network is deleted, the corresponding pre existing
Neutron network will not be deleted.

Usage:
 docker network create -d kuryr --ipam-driver=kuryr
     --subnet=10.10.0.0/24 --gateway=10.10.0.1
     -o neutron.net.uuid=d98d1259-03d1-4b45-9b86-b039cba1d90d mynet

 docker network create -d kuryr --ipam-driver=kuryr
     --subnet=10.10.0.0/24 --gateway=10.10.0.1
     -o neutron.net.name=my_neutron_net mynet

If subnet being specified does not exist, it will be created by
Kuryr. If exists it will be used.

Blueprint existing-neutron-network

Change-Id: I570aa4e77c906d3f04768e882f02050cd0cad558
2016-03-29 23:02:48 -04:00

31 lines
1.1 KiB
Python

# Licensed under the Apache License, Version 2.0 (the "License"); you may
# not use this file except in compliance with the License. You may obtain
# a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
# WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
# License for the specific language governing permissions and limitations
# under the License.
SCHEMA = {
"PLUGIN_ACTIVATE": {"Implements": ["NetworkDriver", "IpamDriver"]},
# TODO(tfukushima): This is mocked and should be replaced with real data.
"ENDPOINT_OPER_INFO": {"Value": {}},
"SUCCESS": {}
}
DEVICE_OWNER = 'kuryr:container'
NEUTRON_ID_LH_OPTION = 'kuryr.net.uuid.lh'
NEUTRON_ID_UH_OPTION = 'kuryr.net.uuid.uh'
NET_NAME_PREFIX = 'kuryr-net-'
NETWORK_GENERIC_OPTIONS = 'com.docker.network.generic'
NEUTRON_UUID_OPTION = 'neutron.net.uuid'
NEUTRON_NAME_OPTION = 'neutron.net.name'
KURYR_EXISTING_NEUTRON_NET = 'kuryr.net.existing'