From 4c8e6d8ab22d88cbf3eb20ab72696dcb7910a41c Mon Sep 17 00:00:00 2001 From: Trevor Vardeman Date: Mon, 23 Mar 2015 13:32:11 -0500 Subject: [PATCH] Modified amphora driver spec to include a new, optional method Updated spec to include method and description for network plug operations potentially necessary on an amphora Updated interface to include optional method and description for network plug operations potentially necessary on an amphora Change-Id: Iaee3033796d4890a549c25a7327cada81bdf0384 --- octavia/amphorae/drivers/driver_base.py | 14 ++++++++++++++ specs/version0.5/amphora-driver-interface.rst | 7 +++++++ 2 files changed, 21 insertions(+) diff --git a/octavia/amphorae/drivers/driver_base.py b/octavia/amphorae/drivers/driver_base.py index 3c666a85df..93ab84e82d 100644 --- a/octavia/amphorae/drivers/driver_base.py +++ b/octavia/amphorae/drivers/driver_base.py @@ -144,6 +144,20 @@ class AmphoraLoadBalancerDriver(object): """ pass + def post_network_plug(self, amphora): + """Called after amphora added to network + + + :param amphora: amphora object, needs id and network ip(s) + :type amphora: object + + This method is optional to implement. After adding an amphora to a + network, there may be steps necessary on the amphora to allow it to + access said network. Ex: creating an interface on an amphora for a + neutron network to utilize. + """ + pass + @six.add_metaclass(abc.ABCMeta) class HealthMixin(object): diff --git a/specs/version0.5/amphora-driver-interface.rst b/specs/version0.5/amphora-driver-interface.rst index 1e83a1bf42..55a2da8391 100755 --- a/specs/version0.5/amphora-driver-interface.rst +++ b/specs/version0.5/amphora-driver-interface.rst @@ -87,6 +87,13 @@ Establish a base class to model the desire functionality: """ pass + def post_network_plug(self, amphora): + """ + OPTIONAL - this method will be called after adding a compute instance to a network. + This will perform any necessary actions to allow for connectivity for that network + on that instance. + """ + The referenced listener is a listener object and vip a vip as described in our model. The model is detached from the DB so the driver can't write