# vim: tabstop=4 shiftwidth=4 softtabstop=4
-#
-# Copyright 2012 Cisco Systems, Inc. All rights reserved.
+
+# Copyright 2012 Cisco Systems, Inc.
+# All rights reserved.
#
# Licensed under the Apache License, Version 2.0 (the "License"); you may
# not use this file except in compliance with the License. You may obtain
# under the License.
#
# @author: Sumit Naiksatam, Cisco Systems, Inc.
+#
from copy import deepcopy
import inspect
Invokes a device plugin's relevant functions (on the it's
inventory and plugin implementation) for completing this operation.
"""
- if not plugin_key in self._plugins.keys():
+ if plugin_key not in self._plugins:
LOG.info(_("No %s Plugin loaded"), plugin_key)
LOG.info(_("%(plugin_key)s: %(function_name)s with args %(args)s "
"ignored"), locals())
Invokes the relevant function on a device plugin's
inventory for completing this operation.
"""
- if not plugin_key in self._inventory.keys():
+ if plugin_key not in self._inventory:
LOG.info(_("No %s inventory loaded"), plugin_key)
LOG.info(_("%(plugin_key)s: %(function_name)s with args %(args)s "
"ignored"), locals())
# vim: tabstop=4 shiftwidth=4 softtabstop=4
-#
-# Copyright 2012 Cisco Systems, Inc. All rights reserved.
+
+# Copyright 2012 Cisco Systems, Inc.
+# All rights reserved.
#
# Licensed under the Apache License, Version 2.0 (the "License"); you may
# not use this file except in compliance with the License. You may obtain
#
# @author: Sumit Naiksatam, Cisco Systems, Inc.
# @author: Rohit Agarwalla, Cisco Systems, Inc.
+#
from copy import deepcopy
import inspect
from quantum.plugins.openvswitch import ovs_db_v2 as odb
from quantum import quantum_plugin_base_v2
+
LOG = logging.getLogger(__name__)
Invokes a device plugin's relevant functions (on the it's
inventory and plugin implementation) for completing this operation.
"""
- if not plugin_key in self._plugins.keys():
+ if plugin_key not in self._plugins:
LOG.info(_("No %s Plugin loaded"), plugin_key)
LOG.info(_("%(plugin_key)s: %(function_name)s with args %(args)s "
"ignored"), locals())
Invokes the relevant function on a device plugin's
inventory for completing this operation.
"""
- if not plugin_key in self._inventory.keys():
+ if plugin_key not in self._inventory:
LOG.info(_("No %s inventory loaded"), plugin_key)
LOG.info(_("%(plugin_key)s: %(function_name)s with args %(args)s "
"ignored"), locals())
# vim: tabstop=4 shiftwidth=4 softtabstop=4
-#
-# Copyright 2012 Cisco Systems, Inc. All rights reserved.
+
+# Copyright 2012 Cisco Systems, Inc.
+# All rights reserved.
#
# Licensed under the Apache License, Version 2.0 (the "License"); you may
# not use this file except in compliance with the License. You may obtain
# @author: Edgar Magana, Cisco Systems, Inc.
# @author: Arvind Somya, Cisco Systems, Inc. (asomya@cisco.com)
#
+
"""
PlugIn for Nexus OS driver
"""
+
import logging
from quantum.common import exceptions as exc
self.credentials = {}
def get_credential(self, nexus_ip):
- if not nexus_ip in self.credentials.keys():
+ if nexus_ip not in self.credentials:
_nexus_username = cred.Store.get_username(nexus_ip)
_nexus_password = cred.Store.get_password(nexus_ip)
self.credentials[nexus_ip] = {
# vim: tabstop=4 shiftwidth=4 softtabstop=4
-#
-# Copyright 2011 Cisco Systems, Inc. All rights reserved.
+
+# Copyright 2011 Cisco Systems, Inc.
+# All rights reserved.
#
# Licensed under the Apache License, Version 2.0 (the "License"); you may
# not use this file except in compliance with the License. You may obtain
# under the License.
#
# @author: Edgar Magana, Cisco Systems
+#
+
"""
Logistic components for Service Insertion utility
"""
for key in conf.PLUGINS[const.PLUGINS].keys():
plugin_obj = conf.PLUGINS[const.PLUGINS][key]
_plugins[key] = importutils.import_object(plugin_obj)
- if not plugin_key in _plugins.keys():
+ if plugin_key not in _plugins:
LOG.debug(_("No %s Plugin loaded"), plugin_key)
return False
else: