Browse Source

Revert "Octavia driver: agent implementation"

This reverts commit bac9c058e5.

Change-Id: Id806f56824d0cb1112ce3e4f28880629c0d72c2e
tags/14.0.1^0
Adit Sarfaty 1 month ago
parent
commit
b54c1293d7
3 changed files with 15 additions and 30 deletions
  1. +0
    -8
      doc/source/devstack.rst
  2. +0
    -2
      setup.cfg
  3. +15
    -20
      vmware_nsx/services/lbaas/octavia/octavia_driver.py

+ 0
- 8
doc/source/devstack.rst View File

@@ -153,9 +153,6 @@ Add octavia and python-octaviaclient repos as external repositories and configur
[controller_worker]
network_driver = allowed_address_pairs_driver

[driver_agent]
enabled_provider_agents=vmwareagent

NSX-T
-----

@@ -279,8 +276,6 @@ Add octavia and python-octaviaclient repos as external repositories and configur
[controller_worker]
network_driver = allowed_address_pairs_driver

[driver_agent]
enabled_provider_agents=vmwareagent

NSX-P
-----
@@ -362,9 +357,6 @@ Add octavia and python-octaviaclient repos as external repositories and configur
[controller_worker]
network_driver = allowed_address_pairs_driver

[driver_agent]
enabled_provider_agents=vmwareagent

Trunk Driver
~~~~~~~~~~~~



+ 0
- 2
setup.cfg View File

@@ -98,8 +98,6 @@ vmware_nsx.neutron.nsxv3.housekeeper.jobs =
mismatch_logical_port = vmware_nsx.plugins.nsx_v3.housekeeper.mismatch_logical_port:MismatchLogicalportJob
octavia.api.drivers =
vmwareedge = vmware_nsx.services.lbaas.octavia.octavia_driver:NSXOctaviaDriver
octavia.driver_agent.provider_agents =
vmwareagent = vmware_nsx.services.lbaas.octavia.octavia_driver:vmware_nsx_provider_agent
[build_sphinx]
source-dir = doc/source
build-dir = doc/build


+ 15
- 20
vmware_nsx/services/lbaas/octavia/octavia_driver.py View File

@@ -15,7 +15,6 @@

import copy
import socket
import time

from oslo_config import cfg
from oslo_log import helpers as log_helpers
@@ -74,6 +73,7 @@ class NSXOctaviaDriver(driver_base.ProviderDriver):
def __init__(self):
super(NSXOctaviaDriver, self).__init__()
self._init_rpc_messaging()
self._init_rpc_listener()
self.repositories = repositories.Repositories()

@log_helpers.log_method_call
@@ -85,6 +85,20 @@ class NSXOctaviaDriver(driver_base.ProviderDriver):
version='1.0')
self.client = messaging.RPCClient(transport, target)

@log_helpers.log_method_call
def _init_rpc_listener(self):
# Initialize RPC listener
topic = d_const.DRIVER_TO_OCTAVIA_TOPIC
server = socket.gethostname()
target = messaging.Target(topic=topic, server=server,
exchange="common", fanout=False)
endpoints = [NSXOctaviaDriverEndpoint()]
access_policy = dispatcher.DefaultRPCAccessPolicy

self.octavia_server = get_rpc_server(target, endpoints,
access_policy)
self.octavia_server.start()

def get_obj_project_id(self, obj_type, obj_dict):
if obj_dict.get('project_id'):
return obj_dict['project_id']
@@ -582,22 +596,3 @@ class NSXOctaviaDriverEndpoint(driver_lib.DriverLibrary):
except exceptions.UpdateStatisticsError as e:
LOG.error("Failed to update Octavia listener statistics. "
"Stats %s, Error %s", statistics, e.fault_string)


@log_helpers.log_method_call
def vmware_nsx_provider_agent(exit_event):
# Initialize RPC listener
topic = d_const.DRIVER_TO_OCTAVIA_TOPIC
server = socket.gethostname()
target = messaging.Target(topic=topic, server=server,
exchange="common", fanout=False)
endpoints = [NSXOctaviaDriverEndpoint()]
access_policy = dispatcher.DefaultRPCAccessPolicy
get_transport()
octavia_server = get_rpc_server(target, endpoints, access_policy)
octavia_server.start()

LOG.info('VMware NSX Octavia provider agent has started.')
while not exit_event.is_set():
time.sleep(1)
LOG.info('VMware NSX Octavia provider agent is exiting.')

Loading…
Cancel
Save