]> review.fuel-infra Code Review - openstack-build/neutron-build.git/commitdiff
Removed redundant configuration, and added more comments in the configuration files.
authorSumit Naiksatam <snaiksat@cisco.com>
Wed, 31 Aug 2011 19:56:01 +0000 (12:56 -0700)
committerSumit Naiksatam <snaiksat@cisco.com>
Wed, 31 Aug 2011 19:56:01 +0000 (12:56 -0700)
quantum/plugins/cisco/README
quantum/plugins/cisco/common/cisco_nova_configuration.py [deleted file]
quantum/plugins/cisco/common/cisco_utils.py
quantum/plugins/cisco/conf/credentials.ini
quantum/plugins/cisco/conf/nova.ini [deleted file]
quantum/plugins/cisco/conf/ucs.ini

index d43883e291be238e86493ead55f97ac290b0e05a..a2c71abad4f74c8ecbd8b17fc9eb7ccac3865b90 100755 (executable)
@@ -178,7 +178,7 @@ mysql -u<mysqlusername> -p<mysqlpassword> -e "create database quantum_l2network"
 6.  Verify that you have the correct credentials for each IP address listed\r
     in quantum/plugins/cisco/conf/credentials.ini.  Example:\r
 \r
-# Provide the UCSM credentials\r
+# Provide the UCSM credentials, create a separte entry for each UCSM used in your system\r
 # UCSM IP address, username and password.\r
 [10.0.0.2]\r
 username=admin\r
@@ -190,6 +190,10 @@ password=mySecretPasswordForUCSM
 username=admin\r
 password=mySecretPasswordForNexus\r
 \r
+    In general, make sure that every UCSM and Nexus switch  used in your system,\r
+    has a credential entry in the above file. This is required for the system to\r
+    be able to communicate with those switches.\r
+\r
 7.  Configure the UCS systems' information in your deployment by editing the\r
     quantum/plugins/cisco/conf/ucs_inventory.ini file. You can configure multiple\r
     UCSMs per deployment, multiple chassis per UCSM, and multiple blades per\r
diff --git a/quantum/plugins/cisco/common/cisco_nova_configuration.py b/quantum/plugins/cisco/common/cisco_nova_configuration.py
deleted file mode 100644 (file)
index b26fe33..0000000
+++ /dev/null
@@ -1,37 +0,0 @@
-"""
-# vim: tabstop=4 shiftwidth=4 softtabstop=4
-#
-# 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
-#    a copy of the License at
-#
-#         http://www.apache.org/licenses/LICENSE-2.0
-#
-#    Unless required by applicable law or agreed to in writing, software
-#    distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
-#    WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
-#    License for the specific language governing permissions and limitations
-#    under the License.
-#
-# @author: Sumit Naiksatam, Cisco Systems, Inc.
-#
-"""
-
-import os
-
-from quantum.plugins.cisco.common import cisco_configparser as confp
-
-CONF_FILE = "../conf/nova.ini"
-
-CP = confp.CiscoConfigParser(os.path.dirname(os.path.realpath(__file__)) \
-                             + "/" + CONF_FILE)
-
-SECTION = CP['NOVA']
-DB_SERVER_IP = SECTION['db_server_ip']
-DB_NAME = SECTION['db_name']
-DB_USERNAME = SECTION['db_username']
-DB_PASSWORD = SECTION['db_password']
-NOVA_HOST_NAME = SECTION['nova_host_name']
-NOVA_PROJ_NAME = SECTION['nova_proj_name']
index b5e70623b6a6869665506038680d2183ea67132f..cbfd83727b52eca44b1b3371145a41e7040f23bd 100644 (file)
@@ -25,7 +25,6 @@ import MySQLdb
 import traceback
 
 from quantum.plugins.cisco.common import cisco_constants as const
-from quantum.plugins.cisco.common import cisco_nova_configuration as conf
 from quantum.plugins.cisco.db import api as db
 from quantum.plugins.cisco.db import l2network_db as cdb
 
@@ -77,35 +76,3 @@ def make_portprofile_assc_list(tenant_id, profile_id):
         assc_list.append(port[const.PORTID])
 
     return assc_list
-
-
-class DBUtils(object):
-    """Utilities to use connect to MySQL DB and execute queries"""
-
-    def __init__(self):
-        pass
-
-    def _get_db_connection(self):
-        """Get a connection to the DB"""
-        db_ip = conf.DB_SERVER_IP
-        db_username = conf.DB_USERNAME
-        db_password = conf.DB_PASSWORD
-        self.db = MySQLdb.connect(db_ip, db_username, db_password,
-                                  conf.DB_NAME)
-        return self.db
-
-    def execute_db_query(self, sql_query):
-        """Execute a DB query"""
-        db = self._get_db_connection()
-        cursor = db.cursor()
-        try:
-            cursor.execute(sql_query)
-            results = cursor.fetchall()
-            db.commit()
-            LOG.debug("DB query execution succeeded: %s" % sql_query)
-            db.close()
-        except:
-            db.rollback()
-            LOG.debug("DB query execution failed: %s" % sql_query)
-            traceback.print_exc()
-            db.close()
index 96e912cc70091c95bd3b52f37f5b6135e42a5058..ebb004ba1727d9c05aeff7bc0f4aec213aa770e0 100644 (file)
@@ -1,13 +1,8 @@
-#Provide the UCSM credentials
+#Provide the UCSM credentials, make sure you have a separate entry for every UCSM in your deployment
 [<put_ucsm_ip_address_here>]
 username=<put_user_name_here>
 password=<put_password_here>
 
-#Provide the Nova DB credentials, the IP address should be the same as in nova.ini
-[<put_nova_db_ip_here>]
-username=<put_user_name_here>
-password=<put_password_here>
-
 #Provide the Nexus credentials, if you are using Nexus
 [<put_nexus_ip_address_here>]
 username=<put_user_name_here>
diff --git a/quantum/plugins/cisco/conf/nova.ini b/quantum/plugins/cisco/conf/nova.ini
deleted file mode 100644 (file)
index 7ef5d43..0000000
+++ /dev/null
@@ -1,8 +0,0 @@
-[NOVA]
-#Change the following details to reflect your OpenStack Nova configuration. If you are running this service on the same machine as the Nova DB, you do not have to change the IP address.
-db_server_ip=127.0.0.1
-db_name=nova
-db_username=<put_db_user_name_here>
-db_password=<put_db_password_here>
-nova_host_name=<put_openstack_cloud_controller_hostname_here>
-nova_proj_name=<put_openstack_project_name_here>
index 431025313109e129fbda14c85293118d8a6d5162..73c0968b3db3931e3203bd3fa2735d4624551964 100644 (file)
@@ -1,5 +1,6 @@
 [UCSM]
 #change the following to the appropriate UCSM IP address
+#if you have more than one UCSM, enter info from any one
 ip_address=<put_ucsm_ip_address_here>
 default_vlan_name=default
 default_vlan_id=1