Merge "Adding support for Discovery calls"
This commit is contained in:
commit
7cd5da8207
@ -297,6 +297,19 @@ visible and editable resource entity attachable to containers from users'
|
||||
perspective. Sandbox manages information exposed by Endpoint behind the scene
|
||||
automatically.
|
||||
|
||||
|
||||
Notes on implementing the libnetwork remote driver API in Kuryr
|
||||
---------------------------------------------------------------
|
||||
|
||||
1. DiscoverNew Notification:
|
||||
Neutron does not use the informaton related to discovery of new resources such
|
||||
as new nodes and therefore the implementation of this API method does nothing.
|
||||
|
||||
2. DiscoverDelete Notification:
|
||||
Neutron does not use the informaton related to discovery of resources such as
|
||||
nodes being deleted and therefore the implementation of this API method does
|
||||
nothing.
|
||||
|
||||
.. _libnetwork remote network driver: https://github.com/docker/libnetwork/blob/master/docs/remote.md
|
||||
.. _libnetwork IPAM driver: https://github.com/docker/libnetwork/blob/master/docs/ipam.md
|
||||
.. _Neutron: https://wiki.openstack.org/wiki/Neutron
|
||||
|
@ -306,6 +306,36 @@ def plugin_scope():
|
||||
return flask.jsonify(capabilities)
|
||||
|
||||
|
||||
@app.route('/NetworkDriver.DiscoverNew', methods=['POST'])
|
||||
def network_driver_discover_new():
|
||||
"""The callback function for the DiscoverNew notification.
|
||||
|
||||
The DiscoverNew notification includes the type of the
|
||||
resource that has been newly discovered and possibly other
|
||||
information associated with the resource.
|
||||
|
||||
See the following link for more details about the spec:
|
||||
|
||||
https://github.com/docker/libnetwork/blob/master/docs/remote.md#discovernew-notification # noqa
|
||||
"""
|
||||
return flask.jsonify(constants.SCHEMA['SUCCESS'])
|
||||
|
||||
|
||||
@app.route('/NetworkDriver.DiscoverDelete', methods=['POST'])
|
||||
def network_driver_discover_delete():
|
||||
"""The callback function for the DiscoverDelete notification.
|
||||
|
||||
The DiscoverDelete notification includes the type of the
|
||||
resource that has been deleted and possibly other
|
||||
information associated with the resource.
|
||||
|
||||
See the following link for more details about the spec:
|
||||
|
||||
https://github.com/docker/libnetwork/blob/master/docs/remote.md#discoverdelete-notification # noqa
|
||||
"""
|
||||
return flask.jsonify(constants.SCHEMA['SUCCESS'])
|
||||
|
||||
|
||||
@app.route('/NetworkDriver.CreateNetwork', methods=['POST'])
|
||||
def network_driver_create_network():
|
||||
"""Creates a new Neutron Network which name is the given NetworkID.
|
||||
|
@ -43,6 +43,8 @@ class TestKuryr(base.TestKuryrBase):
|
||||
- POST /NetworkDriver.Leave
|
||||
"""
|
||||
@ddt.data(('/Plugin.Activate', constants.SCHEMA['PLUGIN_ACTIVATE']),
|
||||
('/NetworkDriver.DiscoverNew', constants.SCHEMA['SUCCESS']),
|
||||
('/NetworkDriver.DiscoverDelete', constants.SCHEMA['SUCCESS']),
|
||||
('/NetworkDriver.EndpointOperInfo',
|
||||
constants.SCHEMA['ENDPOINT_OPER_INFO']))
|
||||
@ddt.unpack
|
||||
|
Loading…
Reference in New Issue
Block a user