From 2f1cd3eb5577c9f6543924d1fcb8b97781785416 Mon Sep 17 00:00:00 2001 From: Abhishek Raut Date: Tue, 9 Jul 2013 12:29:54 -0700 Subject: [PATCH] Add support for the Nexus 1000V into the Cisco Plugin. This will enable the Cisco Nexus 1000V to integrate with the Cisco plugin and be used to drive the realization of Neutron constructs. Network profile and Policy profile are introduced as extended neutron resources, while n1kv:profile_id is introduced as an extended attribute for network and port objects. Necessary changes to the Cisco plugin are made to accomodate Nexus 1000V as a configurable vswitch plugin. Implements: blueprint cisco-plugin-n1k-support Change-Id: I951e10c57d74c935fca8754c0e21e1ac9df35704 --- etc/neutron/plugins/cisco/cisco_plugins.ini | 19 + etc/policy.json | 11 +- .../263772d65691_cisco_db_cleanup_2.py | 18 +- .../versions/c88b6b5fea3_cisco_n1kv_tables.py | 144 ++ .../plugins/cisco/common/cisco_constants.py | 29 + .../cisco/common/cisco_credentials_v2.py | 33 +- .../plugins/cisco/common/cisco_exceptions.py | 116 +- neutron/plugins/cisco/common/config.py | 63 +- neutron/plugins/cisco/db/n1kv_db_v2.py | 1250 +++++++++++++++++ neutron/plugins/cisco/db/n1kv_models_v2.py | 144 ++ neutron/plugins/cisco/db/network_db_v2.py | 122 +- neutron/plugins/cisco/db/network_models_v2.py | 2 +- .../plugins/cisco/extensions/credential.py | 158 +-- .../plugins/cisco/extensions/n1kv_profile.py | 93 ++ .../cisco/extensions/network_profile.py | 98 ++ .../cisco/extensions/policy_profile.py | 85 ++ .../plugins/cisco/models/virt_phy_sw_v2.py | 39 +- neutron/plugins/cisco/n1kv/__init__.py | 18 + neutron/plugins/cisco/n1kv/n1kv_client.py | 500 +++++++ .../plugins/cisco/n1kv/n1kv_neutron_plugin.py | 1042 ++++++++++++++ neutron/plugins/cisco/network_plugin.py | 44 +- .../nexus/cisco_nexus_network_driver_v2.py | 5 +- neutron/tests/unit/cisco/n1kv/__init__.py | 18 + neutron/tests/unit/cisco/n1kv/test_n1kv_db.py | 672 +++++++++ .../tests/unit/cisco/n1kv/test_n1kv_plugin.py | 318 +++++ neutron/tests/unit/cisco/test_network_db.py | 78 +- .../tests/unit/cisco/test_network_plugin.py | 20 +- 27 files changed, 4806 insertions(+), 333 deletions(-) create mode 100644 neutron/db/migration/alembic_migrations/versions/c88b6b5fea3_cisco_n1kv_tables.py create mode 100644 neutron/plugins/cisco/db/n1kv_db_v2.py create mode 100644 neutron/plugins/cisco/db/n1kv_models_v2.py create mode 100644 neutron/plugins/cisco/extensions/n1kv_profile.py create mode 100644 neutron/plugins/cisco/extensions/network_profile.py create mode 100644 neutron/plugins/cisco/extensions/policy_profile.py create mode 100644 neutron/plugins/cisco/n1kv/__init__.py create mode 100644 neutron/plugins/cisco/n1kv/n1kv_client.py create mode 100644 neutron/plugins/cisco/n1kv/n1kv_neutron_plugin.py create mode 100644 neutron/tests/unit/cisco/n1kv/__init__.py create mode 100644 neutron/tests/unit/cisco/n1kv/test_n1kv_db.py create mode 100644 neutron/tests/unit/cisco/n1kv/test_n1kv_plugin.py diff --git a/etc/neutron/plugins/cisco/cisco_plugins.ini b/etc/neutron/plugins/cisco/cisco_plugins.ini index 32b91bf0c6..bce23b7465 100644 --- a/etc/neutron/plugins/cisco/cisco_plugins.ini +++ b/etc/neutron/plugins/cisco/cisco_plugins.ini @@ -85,3 +85,22 @@ # username=admin # password=mySecretPassword +# +# N1KV Format. +# [N1KV:] +# username= +# password= +# +# Example: +# [N1KV:2.2.2.2] +# username=admin +# password=mySecretPassword + +[cisco_n1k] +# integration_bridge=br-int +# enable_tunneling=True +# tunnel_bridge=br-tun +# local_ip=10.0.0.3 +# tenant_network_type=local +# default_policy_profile= +# poll_duration=