Refactor hyperv plugin and agent.
Remove unused imports. Add an empty tunnel_sync method so that we can run ovs-quantum-agent with the hyper-v plugin when we are using vlan networks. Change-Id: I94b1d0cf188d0a1e03e0948708975594f2615fbf
This commit is contained in:
parent
eef903f64b
commit
dbe122704f
@ -20,7 +20,6 @@
|
||||
|
||||
import sys
|
||||
import time
|
||||
import uuid
|
||||
|
||||
from quantum.common import exceptions as q_exc
|
||||
from quantum.openstack.common import cfg
|
||||
|
@ -16,23 +16,10 @@
|
||||
# under the License.
|
||||
# @author: Alessandro Pilotti, Cloudbase Solutions Srl
|
||||
|
||||
from quantum.api.v2 import attributes
|
||||
from quantum.common import constants as q_const
|
||||
from quantum.common import exceptions as q_exc
|
||||
from quantum.common import rpc as q_rpc
|
||||
from quantum.common import topics
|
||||
from quantum.db import db_base_plugin_v2
|
||||
from quantum.db import dhcp_rpc_base
|
||||
from quantum.db import l3_db
|
||||
from quantum.db import l3_rpc_base
|
||||
from quantum.extensions import portbindings
|
||||
from quantum.extensions import providernet as provider
|
||||
from quantum.openstack.common import cfg
|
||||
from quantum.openstack.common import log as logging
|
||||
from quantum.openstack.common import rpc
|
||||
from quantum.openstack.common.rpc import proxy
|
||||
from quantum.plugins.hyperv.common import constants
|
||||
from quantum import policy
|
||||
|
||||
LOG = logging.getLogger(__name__)
|
||||
|
||||
|
@ -21,7 +21,6 @@ from sqlalchemy.orm import exc
|
||||
from quantum.common import exceptions as q_exc
|
||||
import quantum.db.api as db_api
|
||||
from quantum.db import models_v2
|
||||
from quantum.openstack.common import cfg
|
||||
from quantum.openstack.common import log as logging
|
||||
from quantum.plugins.hyperv.common import constants
|
||||
from quantum.plugins.hyperv import model as hyperv_model
|
||||
|
@ -16,29 +16,25 @@
|
||||
# under the License.
|
||||
# @author: Alessandro Pilotti, Cloudbase Solutions Srl
|
||||
|
||||
import sys
|
||||
|
||||
from quantum.api.v2 import attributes
|
||||
from quantum.common import constants as q_const
|
||||
from quantum.common import exceptions as q_exc
|
||||
from quantum.common import rpc as q_rpc
|
||||
from quantum.common import topics
|
||||
from quantum.db import db_base_plugin_v2
|
||||
from quantum.db import dhcp_rpc_base
|
||||
from quantum.db import l3_db
|
||||
from quantum.db import l3_rpc_base
|
||||
# NOTE: quota_db cannot be removed, it is for db model
|
||||
from quantum.db import quota_db
|
||||
from quantum.extensions import portbindings
|
||||
from quantum.extensions import providernet as provider
|
||||
from quantum.openstack.common import cfg
|
||||
from quantum.openstack.common import log as logging
|
||||
from quantum.openstack.common import rpc
|
||||
from quantum.openstack.common.rpc import proxy
|
||||
from quantum.plugins.hyperv import agent_notifier_api
|
||||
from quantum.plugins.hyperv.common import constants
|
||||
from quantum.plugins.hyperv import db as hyperv_db
|
||||
from quantum.plugins.hyperv import rpc_callbacks
|
||||
from quantum import policy
|
||||
|
||||
|
||||
DEFAULT_VLAN_RANGES = []
|
||||
|
||||
hyperv_opts = [
|
||||
|
@ -16,26 +16,13 @@
|
||||
# under the License.
|
||||
# @author: Alessandro Pilotti, Cloudbase Solutions Srl
|
||||
|
||||
import sys
|
||||
|
||||
from quantum.api.v2 import attributes
|
||||
from quantum.common import constants as q_const
|
||||
from quantum.common import exceptions as q_exc
|
||||
from quantum.common import rpc as q_rpc
|
||||
from quantum.common import topics
|
||||
from quantum.db import db_base_plugin_v2
|
||||
from quantum.db import dhcp_rpc_base
|
||||
from quantum.db import l3_db
|
||||
from quantum.db import l3_rpc_base
|
||||
from quantum.extensions import portbindings
|
||||
from quantum.extensions import providernet as provider
|
||||
from quantum.openstack.common import cfg
|
||||
from quantum.openstack.common import log as logging
|
||||
from quantum.openstack.common import rpc
|
||||
from quantum.openstack.common.rpc import proxy
|
||||
from quantum.plugins.hyperv.common import constants
|
||||
from quantum.plugins.hyperv import db as hyperv_db
|
||||
from quantum import policy
|
||||
|
||||
|
||||
LOG = logging.getLogger(__name__)
|
||||
|
||||
@ -100,3 +87,11 @@ class HyperVRpcCallbacks(
|
||||
'exists': False}
|
||||
LOG.debug(_("%s can not be found in database"), device)
|
||||
return entry
|
||||
|
||||
def tunnel_sync(self, rpc_context, **kwargs):
|
||||
"""Dummy function for ovs agent running on Linux to
|
||||
work with Hyper-V plugin and agent."""
|
||||
entry = dict()
|
||||
entry['tunnels'] = {}
|
||||
# Return the list of tunnels IP's to the agent
|
||||
return entry
|
||||
|
Loading…
Reference in New Issue
Block a user