1
# Copyright 2013 OpenStack Foundation. All rights reserved
3
# Licensed under the Apache License, Version 2.0 (the "License"); you may
4
# not use this file except in compliance with the License. You may obtain
5
# a copy of the License at
7
# http://www.apache.org/licenses/LICENSE-2.0
9
# Unless required by applicable law or agreed to in writing, software
10
# distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
11
# WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
12
# License for the specific language governing permissions and limitations
20
@six.add_metaclass(abc.ABCMeta)
21
class AgentDeviceDriver(object):
22
"""Abstract device driver that defines the API required by LBaaS agent."""
26
"""Returns unique name across all LBaaS device drivers."""
30
def deploy_instance(self, logical_config):
31
"""Fully deploys a loadbalancer instance from a given config."""
35
def undeploy_instance(self, pool_id):
36
"""Fully undeploys the loadbalancer instance."""
40
def get_stats(self, pool_id):
43
def remove_orphans(self, known_pool_ids):
44
# Not all drivers will support this
45
raise NotImplementedError()
48
def create_vip(self, vip):
52
def update_vip(self, old_vip, vip):
56
def delete_vip(self, vip):
60
def create_pool(self, pool):
64
def update_pool(self, old_pool, pool):
68
def delete_pool(self, pool):
72
def create_member(self, member):
76
def update_member(self, old_member, member):
80
def delete_member(self, member):
84
def create_pool_health_monitor(self, health_monitor, pool_id):
88
def update_pool_health_monitor(self,
95
def delete_pool_health_monitor(self, health_monitor, pool_id):