Merge "Import manager module from ncclient - part two"
This commit is contained in:
commit
3f07005c92
|
@ -15,9 +15,9 @@
|
|||
import pprint
|
||||
import sys
|
||||
|
||||
from ncclient import manager
|
||||
from oslo_config import cfg
|
||||
import oslo_messaging
|
||||
from oslo_utils import importutils
|
||||
|
||||
from neutron.common import config as common_config
|
||||
from neutron.common import rpc as n_rpc
|
||||
|
@ -30,6 +30,7 @@ from networking_cisco.plugins.cisco.cfg_agent.device_drivers.asr1k import (
|
|||
asr1k_cfg_validator)
|
||||
from networking_cisco.plugins.cisco.common import cisco_constants
|
||||
|
||||
manager = importutils.try_import('ncclient.manager')
|
||||
# USAGE:
|
||||
# python asr1k_auto_config_check.py --config-file /etc/neutron/neutron.conf
|
||||
|
||||
|
|
|
@ -12,10 +12,10 @@
|
|||
# License for the specific language governing permissions and limitations
|
||||
# under the License.
|
||||
|
||||
import ciscoconfparse
|
||||
import netaddr
|
||||
|
||||
from neutron.common import constants
|
||||
from oslo_utils import importutils
|
||||
|
||||
from networking_cisco.plugins.cisco.common import cisco_constants
|
||||
from networking_cisco.plugins.cisco.extensions import ha
|
||||
|
@ -24,6 +24,8 @@ from networking_cisco.plugins.cisco.extensions import routerrole
|
|||
import re
|
||||
import xml.etree.ElementTree as ET
|
||||
|
||||
ciscoconfparse = importutils.try_import('ciscoconfparse')
|
||||
|
||||
HA_INFO = 'ha_info'
|
||||
ROUTER_ROLE_ATTR = routerrole.ROUTER_ROLE_ATTR
|
||||
|
||||
|
|
|
@ -31,7 +31,7 @@ from networking_cisco.plugins.cisco.cfg_agent.device_drivers.csr1kv import (
|
|||
cisco_csr1kv_snippets as snippets)
|
||||
|
||||
ciscoconfparse = importutils.try_import('ciscoconfparse')
|
||||
ncclient = importutils.try_import('ncclient')
|
||||
manager = importutils.try_import('ncclient.manager')
|
||||
|
||||
LOG = logging.getLogger(__name__)
|
||||
|
||||
|
@ -283,7 +283,7 @@ class CSR1kvRoutingDriver(devicedriver_api.RoutingDriverBase):
|
|||
if self._csr_conn and self._csr_conn.connected:
|
||||
return self._csr_conn
|
||||
else:
|
||||
self._csr_conn = ncclient.manager.connect(
|
||||
self._csr_conn = manager.connect(
|
||||
host=self._csr_host,
|
||||
port=self._csr_ssh_port,
|
||||
username=self._csr_user,
|
||||
|
|
Loading…
Reference in New Issue