Merge "Provide support for tap-*-update"
This commit is contained in:
commit
0c6d0f60b7
@ -216,3 +216,19 @@ class Tass_db_Mixin(taas.TaasPluginBase, base_db.CommonDbMixin):
|
||||
port = self._core_plugin().get_port(context, port_id)
|
||||
|
||||
return port
|
||||
|
||||
def update_tap_service(self, context, id, tap_service):
|
||||
LOG.debug("update_tap_service() called")
|
||||
t_s = tap_service['tap_service']
|
||||
with context.session.begin(subtransactions=True):
|
||||
tap_service_db = self._get_tap_service(context, id)
|
||||
tap_service_db.update(t_s)
|
||||
return self._make_tap_service_dict(tap_service_db)
|
||||
|
||||
def update_tap_flow(self, context, id, tap_flow):
|
||||
LOG.debug("update_tap_flow() called")
|
||||
t_f = tap_flow['tap_flow']
|
||||
with context.session.begin(subtransactions=True):
|
||||
tap_flow_db = self._get_tap_flow(context, id)
|
||||
tap_flow_db.update(t_f)
|
||||
return self._make_tap_flow_dict(tap_flow_db)
|
||||
|
@ -238,6 +238,11 @@ class TaasPluginBase(service_base.ServicePluginBase):
|
||||
"""List all Tap Services."""
|
||||
pass
|
||||
|
||||
@abc.abstractmethod
|
||||
def update_tap_service(self, context, id, tap_service):
|
||||
"""Update a Tap Service."""
|
||||
pass
|
||||
|
||||
@abc.abstractmethod
|
||||
def create_tap_flow(self, context, tap_flow):
|
||||
"""Create a Tap Flow."""
|
||||
@ -259,3 +264,8 @@ class TaasPluginBase(service_base.ServicePluginBase):
|
||||
page_reverse=False):
|
||||
"""List all Tap Flows."""
|
||||
pass
|
||||
|
||||
@abc.abstractmethod
|
||||
def update_tap_flow(self, context, id, tap_flow):
|
||||
"""Update a Tap Flow."""
|
||||
pass
|
||||
|
Loading…
x
Reference in New Issue
Block a user