diff --git a/.gitignore b/.gitignore index 9b4d590..280b7b0 100644 --- a/.gitignore +++ b/.gitignore @@ -2,3 +2,5 @@ *~ *venv .idea +*.egg* +.tox \ No newline at end of file diff --git a/neutron/aws/requirements-aws.txt b/neutron/aws/requirements-aws.txt deleted file mode 100644 index 6e69f51..0000000 --- a/neutron/aws/requirements-aws.txt +++ /dev/null @@ -1,104 +0,0 @@ -# The order of packages is significant, because pip processes them in the order -# of appearance. Changing the order has an impact on the overall integration -# process, which may cause wedges in the gate later. -pbr==1.8.1 - -Paste==2.0.2 -PasteDeploy==1.5.2 -Routes==2.2;python_version=='2.7' -Routes!=2.0,>=1.12.3;python_version!='2.7' -debtcollector==1.3.0 # Apache-2.0 -eventlet==0.18.4 -pecan==1.0.4 -greenlet==0.4.9 -httplib2==0.9.2 -requests==2.9.1 -Jinja2==2.8 # BSD License (3 clause) -keystonemiddleware==4.3.0 -netaddr==0.7.18 -python-neutronclient==4.0.0 -retrying==1.3.3 # Apache-2.0 -ryu==3.30 # Apache-2.0 -SQLAlchemy==1.0.12 -WebOb==1.5.1 -python-keystoneclient==2.2.0 -alembic==0.8.4 -six==1.10.0 -stevedore==1.11.0 # Apache-2.0 -oslo.vmware==2.1.0 -oslo.concurrency==2.6.1 # Apache-2.0 -oslo.config==3.7.0 # Apache-2.0 -oslo.context==2.0.0 # Apache-2.0 -oslo.db==4.5.0 # Apache-2.0 -oslo.i18n==3.3.0 # Apache-2.0 -oslo.log==3.0.0 # Apache-2.0 -oslo.messaging==4.3.0 -oslo.middleware==3.6.0 -oslo.policy==1.4.0 # Apache-2.0 -oslo.rootwrap==4.0.0 # Apache-2.0 -oslo.serialization==2.3.0 # Apache-2.0 -oslo.service==1.5.0 # Apache-2.0 -oslo.utils==3.6.0 # Apache-2.0 -oslo.versionedobjects==1.6.0 - -python-novaclient==3.2.0 -boto3==1.3.1 - -# Windows-only requirements -pywin32;sys_platform=='win32' -wmi;sys_platform=='win32' - -## The following requirements were added by pip freeze: -aioeventlet==0.5.1 -amqp==1.4.9 -anyjson==0.3.3 -appdirs==1.4.0 -Babel==2.2.0 -beautifulsoup4==4.4.1 -cachetools==1.1.5 -cliff==2.0.0 -cmd2==0.6.8 -contextlib2==0.5.1 -decorator==4.0.9 -enum34==1.1.2 -fasteners==0.14.1 -funcsigs==0.4 -futures==3.0.5 -futurist==0.13.0 -iso8601==0.1.11 -keystoneauth1==2.3.0 -kombu==3.0.35 -logutils==0.3.3 -Mako==1.0.4 -MarkupSafe==0.23 -monotonic==1.0 -msgpack-python==0.4.7 -MySQL-python==1.2.5 -netifaces==0.10.4 -os-client-config==1.16.0 -pika==0.10.0 -pika-pool==0.1.3 -positional==1.0.1 -prettytable==0.7.2 -pycadf==2.1.0 -pyinotify==0.9.6 -pyparsing==2.1.1 -python-dateutil==2.5.1 -python-editor==0.5 -pytz==2016.2 -PyYAML==3.11 -repoze.lru==0.6 -requestsexceptions==1.1.3 -simplejson==3.8.2 -singledispatch==3.4.0.3 -sqlalchemy-migrate==0.10.0 -sqlparse==0.1.19 -Tempita==0.5.2 -trollius==2.1 -unicodecsv==0.14.1 -waitress==0.8.10 -WebTest==2.0.20 -wrapt==1.10.6 - -# for ACI -cryptography==1.1.2 diff --git a/neutron/aws/setup.cfg b/neutron/aws/setup.cfg deleted file mode 100644 index 9528933..0000000 --- a/neutron/aws/setup.cfg +++ /dev/null @@ -1,208 +0,0 @@ -[metadata] -name = neutron -summary = OpenStack Networking -description-file = - README.rst -author = OpenStack -author-email = openstack-dev@lists.openstack.org -home-page = http://www.openstack.org/ -classifier = - Environment :: OpenStack - Intended Audience :: Information Technology - Intended Audience :: System Administrators - License :: OSI Approved :: Apache Software License - Operating System :: POSIX :: Linux - Programming Language :: Python - Programming Language :: Python :: 2 - Programming Language :: Python :: 2.7 - -[files] -packages = - neutron -data_files = - etc/neutron = - etc/api-paste.ini - etc/dhcp_agent.ini - etc/l3_agent.ini - etc/metadata_agent.ini - etc/metering_agent.ini - etc/policy.json - etc/neutron.conf - etc/rootwrap.conf - etc/neutron/rootwrap.d = - etc/neutron/rootwrap.d/debug.filters - etc/neutron/rootwrap.d/dhcp.filters - etc/neutron/rootwrap.d/dibbler.filters - etc/neutron/rootwrap.d/iptables-firewall.filters - etc/neutron/rootwrap.d/ebtables.filters - etc/neutron/rootwrap.d/ipset-firewall.filters - etc/neutron/rootwrap.d/l3.filters - etc/neutron/rootwrap.d/linuxbridge-plugin.filters - etc/neutron/rootwrap.d/openvswitch-plugin.filters - etc/init.d = etc/init.d/neutron-server - etc/neutron/plugins/bigswitch = - etc/neutron/plugins/bigswitch/restproxy.ini - etc/neutron/plugins/bigswitch/ssl/ca_certs = - etc/neutron/plugins/bigswitch/ssl/ca_certs/README - etc/neutron/plugins/bigswitch/ssl/host_certs = - etc/neutron/plugins/bigswitch/ssl/host_certs/README - etc/neutron/plugins/brocade = - etc/neutron/plugins/brocade/brocade.ini - etc/neutron/plugins/brocade/brocade_mlx.ini - etc/neutron/plugins/brocade/vyatta = etc/neutron/plugins/brocade/vyatta/vrouter.ini - etc/neutron/plugins/cisco = - etc/neutron/plugins/cisco/cisco_vpn_agent.ini - etc/neutron/plugins/embrane = etc/neutron/plugins/embrane/heleos_conf.ini - etc/neutron/plugins/ml2 = - etc/neutron/plugins/bigswitch/restproxy.ini - etc/neutron/plugins/ml2/linuxbridge_agent.ini - etc/neutron/plugins/ml2/ml2_conf.ini - etc/neutron/plugins/ml2/ml2_conf_brocade.ini - etc/neutron/plugins/ml2/ml2_conf_brocade_fi_ni.ini - etc/neutron/plugins/ml2/ml2_conf_ofa.ini - etc/neutron/plugins/ml2/ml2_conf_fslsdn.ini - etc/neutron/plugins/ml2/ml2_conf_sriov.ini - etc/neutron/plugins/ml2/openvswitch_agent.ini - etc/neutron/plugins/ml2/sriov_agent.ini - etc/neutron/plugins/mlnx = etc/neutron/plugins/mlnx/mlnx_conf.ini - etc/neutron/plugins/nuage = etc/neutron/plugins/nuage/nuage_plugin.ini - etc/neutron/plugins/oneconvergence = etc/neutron/plugins/oneconvergence/nvsdplugin.ini - etc/neutron/plugins/opencontrail = etc/neutron/plugins/opencontrail/contrailplugin.ini - etc/neutron/plugins/ovsvapp = etc/neutron/plugins/ovsvapp/ovsvapp_agent.ini -scripts = - bin/neutron-rootwrap-xen-dom0 - -[entry_points] -console_scripts = - neutron-db-manage = neutron.db.migration.cli:main - neutron-debug = neutron.debug.shell:main - neutron-dhcp-agent = neutron.cmd.eventlet.agents.dhcp:main - neutron-hyperv-agent = neutron.cmd.eventlet.plugins.hyperv_neutron_agent:main - neutron-keepalived-state-change = neutron.cmd.keepalived_state_change:main - neutron-ipset-cleanup = neutron.cmd.ipset_cleanup:main - neutron-l3-agent = neutron.cmd.eventlet.agents.l3:main - neutron-linuxbridge-agent = neutron.plugins.ml2.drivers.linuxbridge.agent.linuxbridge_neutron_agent:main - neutron-metadata-agent = neutron.cmd.eventlet.agents.metadata:main - neutron-mlnx-agent = neutron.cmd.eventlet.plugins.mlnx_neutron_agent:main - neutron-netns-cleanup = neutron.cmd.netns_cleanup:main - neutron-ns-metadata-proxy = neutron.cmd.eventlet.agents.metadata_proxy:main - neutron-ovsvapp-agent = neutron.cmd.eventlet.plugins.ovsvapp_neutron_agent:main - neutron-nvsd-agent = neutron.plugins.oneconvergence.agent.nvsd_neutron_agent:main - neutron-openvswitch-agent = neutron.cmd.eventlet.plugins.ovs_neutron_agent:main - neutron-ovs-cleanup = neutron.cmd.ovs_cleanup:main - neutron-pd-notify = neutron.cmd.pd_notify:main - neutron-restproxy-agent = neutron.plugins.bigswitch.agent.restproxy_agent:main - neutron-server = neutron.cmd.eventlet.server:main_wsgi_eventlet - neutron-dev-server = neutron.cmd.eventlet.server:main_wsgi_pecan - neutron-rpc-server = neutron.cmd.eventlet.server:main_rpc_eventlet - neutron-rootwrap = oslo_rootwrap.cmd:main - neutron-rootwrap-daemon = oslo_rootwrap.cmd:daemon - neutron-usage-audit = neutron.cmd.eventlet.usage_audit:main - neutron-metering-agent = neutron.cmd.eventlet.services.metering_agent:main - neutron-sriov-nic-agent = neutron.plugins.ml2.drivers.mech_sriov.agent.sriov_nic_agent:main - neutron-sanity-check = neutron.cmd.sanity_check:main -neutron.core_plugins = - bigswitch = neutron.plugins.bigswitch.plugin:NeutronRestProxyV2 - brocade = neutron.plugins.brocade.NeutronPlugin:BrocadePluginV2 - embrane = neutron.plugins.embrane.plugins.embrane_ml2_plugin:EmbraneMl2Plugin - ml2 = neutron.plugins.ml2.plugin:Ml2Plugin - nuage = neutron.plugins.nuage.plugin:NuagePlugin - oneconvergence = neutron.plugins.oneconvergence.plugin:OneConvergencePluginV2 -neutron.service_plugins = - dummy = neutron.tests.unit.dummy_plugin:DummyServicePlugin - router = neutron.services.l3_router.l3_router_plugin:L3RouterPlugin - bigswitch_l3 = neutron.plugins.bigswitch.l3_router_plugin:L3RestProxy - brocade_vyatta_l3 = neutron.services.l3_router.brocade.vyatta.vrouter_neutron_plugin:VyattaVRouterPlugin - brocade_mlx_l3 = neutron.services.l3_router.brocade.mlx.l3_router_plugin:BrocadeRouterPlugin - firewall = neutron_fwaas.services.firewall.fwaas_plugin:FirewallPlugin - fsl_firewall = neutron_fwaas.services.firewall.freescale.fwaas_plugin:FirewallPlugin - lbaas = neutron_lbaas.services.loadbalancer.plugin:LoadBalancerPlugin - vpnaas = neutron_vpnaas.services.vpn.plugin:VPNDriverPlugin - metering = neutron.services.metering.metering_plugin:MeteringPlugin - neutron.services.firewall.fwaas_plugin.FirewallPlugin = neutron_fwaas.services.firewall.fwaas_plugin:FirewallPlugin - neutron.services.loadbalancer.plugin.LoadBalancerPlugin = neutron_lbaas.services.loadbalancer.plugin:LoadBalancerPlugin - neutron.services.vpn.plugin.VPNDriverPlugin = neutron_vpnaas.services.vpn.plugin:VPNDriverPlugin - ibm_l3 = neutron.services.l3_router.l3_sdnve:SdnveL3ServicePlugin - qos = neutron.services.qos.qos_plugin:QoSPlugin - # PF9 start - aws_router = neutron.services.l3_router.aws_router_plugin:AwsRouterPlugin - # PF9 end -neutron.qos.notification_drivers = - message_queue = neutron.services.qos.notification_drivers.message_queue:RpcQosServiceNotificationDriver -neutron.ml2.type_drivers = - flat = neutron.plugins.ml2.drivers.type_flat:FlatTypeDriver - local = neutron.plugins.ml2.drivers.type_local:LocalTypeDriver - vlan = neutron.plugins.ml2.drivers.type_vlan:VlanTypeDriver - geneve = neutron.plugins.ml2.drivers.type_geneve:GeneveTypeDriver - gre = neutron.plugins.ml2.drivers.type_gre:GreTypeDriver - vxlan = neutron.plugins.ml2.drivers.type_vxlan:VxlanTypeDriver - opflex = opflexagent.type_opflex:OpflexTypeDriver -neutron.ml2.mechanism_drivers = - ovsvapp = neutron.plugins.ml2.drivers.ovsvapp.mech_driver:OVSvAppAgentMechanismDriver - opendaylight = neutron.plugins.ml2.drivers.opendaylight.driver:OpenDaylightMechanismDriver - logger = neutron.tests.unit.plugins.ml2.drivers.mechanism_logger:LoggerMechanismDriver - test = neutron.tests.unit.plugins.ml2.drivers.mechanism_test:TestMechanismDriver - linuxbridge = neutron.plugins.ml2.drivers.linuxbridge.mech_driver.mech_linuxbridge:LinuxbridgeMechanismDriver - openvswitch = neutron.plugins.ml2.drivers.openvswitch.mech_driver.mech_openvswitch:OpenvswitchMechanismDriver - hyperv = neutron.plugins.ml2.drivers.hyperv.mech_hyperv:HypervMechanismDriver - l2population = neutron.plugins.ml2.drivers.l2pop.mech_driver:L2populationMechanismDriver - ofagent = neutron.plugins.ml2.drivers.ofagent.driver:OfagentMechanismDriver - mlnx = neutron.plugins.ml2.drivers.mlnx.mech_mlnx:MlnxMechanismDriver - brocade = networking_brocade.vdx.ml2driver.mechanism_brocade:BrocadeMechanism - brocade_fi_ni = neutron.plugins.ml2.drivers.brocade.fi_ni.mechanism_brocade_fi_ni:BrocadeFiNiMechanism - fslsdn = neutron.plugins.ml2.drivers.freescale.mechanism_fslsdn:FslsdnMechanismDriver - sriovnicswitch = neutron.plugins.ml2.drivers.mech_sriov.mech_driver.mech_driver:SriovNicSwitchMechanismDriver - fake_agent = neutron.tests.unit.plugins.ml2.drivers.mech_fake_agent:FakeAgentMechanismDriver - sdnve = neutron.plugins.ml2.drivers.ibm.mechanism_sdnve:SdnveMechanismDriver - aws = neutron.plugins.ml2.drivers.aws.mechanism_aws:AwsMechanismDriver -neutron.ml2.extension_drivers = - test = neutron.tests.unit.plugins.ml2.drivers.ext_test:TestExtensionDriver - testdb = neutron.tests.unit.plugins.ml2.drivers.ext_test:TestDBExtensionDriver - port_security = neutron.plugins.ml2.extensions.port_security:PortSecurityExtensionDriver - qos = neutron.plugins.ml2.extensions.qos:QosExtensionDriver -neutron.openstack.common.cache.backends = - memory = neutron.openstack.common.cache._backends.memory:MemoryBackend -neutron.ipam_drivers = - fake = neutron.tests.unit.ipam.fake_driver:FakeDriver - internal = neutron.ipam.drivers.neutrondb_ipam.driver:NeutronDbPool -neutron.agent.l2.extensions = - qos = neutron.agent.l2.extensions.qos:QosAgentExtension -neutron.qos.agent_drivers = - ovs = neutron.plugins.ml2.drivers.openvswitch.agent.extension_drivers.qos_driver:QosOVSAgentDriver - sriov = neutron.plugins.ml2.drivers.mech_sriov.agent.extension_drivers.qos_driver:QosSRIOVAgentDriver -neutron.agent.linux.pd_drivers = - dibbler = neutron.agent.linux.dibbler:PDDibbler -# These are for backwards compat with Icehouse notification_driver configuration values -oslo.messaging.notify.drivers = - neutron.openstack.common.notifier.log_notifier = oslo_messaging.notify._impl_log:LogDriver - neutron.openstack.common.notifier.no_op_notifier = oslo_messaging.notify._impl_noop:NoOpDriver - neutron.openstack.common.notifier.rpc_notifier2 = oslo_messaging.notify._impl_messaging:MessagingV2Driver - neutron.openstack.common.notifier.rpc_notifier = oslo_messaging.notify._impl_messaging:MessagingDriver - neutron.openstack.common.notifier.test_notifier = oslo_messaging.notify._impl_test:TestDriver -neutron.db.alembic_migrations = - neutron = neutron.db.migration:alembic_migrations - -[build_sphinx] -all_files = 1 -build-dir = doc/build -source-dir = doc/source - -[extract_messages] -keywords = _ gettext ngettext l_ lazy_gettext -mapping_file = babel.cfg -output_file = neutron/locale/neutron.pot - -[compile_catalog] -directory = neutron/locale -domain = neutron - -[update_catalog] -domain = neutron -output_dir = neutron/locale -input_file = neutron/locale/neutron.pot - -[wheel] -universal = 1 - -[pbr] -warnerrors = true diff --git a/neutron/aws/neutron/common/aws_utils.py b/neutron/neutron/common/aws_utils.py similarity index 100% rename from neutron/aws/neutron/common/aws_utils.py rename to neutron/neutron/common/aws_utils.py diff --git a/neutron/aws/neutron/common/config.py b/neutron/neutron/common/config.py similarity index 100% rename from neutron/aws/neutron/common/config.py rename to neutron/neutron/common/config.py diff --git a/neutron/aws/neutron/common/exceptions.py b/neutron/neutron/common/exceptions.py similarity index 100% rename from neutron/aws/neutron/common/exceptions.py rename to neutron/neutron/common/exceptions.py diff --git a/neutron/gce/neutron/common/gceconf.py b/neutron/neutron/common/gceconf.py similarity index 100% rename from neutron/gce/neutron/common/gceconf.py rename to neutron/neutron/common/gceconf.py diff --git a/neutron/gce/neutron/common/gceutils.py b/neutron/neutron/common/gceutils.py similarity index 100% rename from neutron/gce/neutron/common/gceutils.py rename to neutron/neutron/common/gceutils.py diff --git a/neutron/aws/neutron/plugins/ml2/drivers/aws/__init__.py b/neutron/neutron/plugins/ml2/drivers/aws/__init__.py similarity index 100% rename from neutron/aws/neutron/plugins/ml2/drivers/aws/__init__.py rename to neutron/neutron/plugins/ml2/drivers/aws/__init__.py diff --git a/neutron/aws/neutron/plugins/ml2/drivers/aws/callbacks.py b/neutron/neutron/plugins/ml2/drivers/aws/callbacks.py similarity index 100% rename from neutron/aws/neutron/plugins/ml2/drivers/aws/callbacks.py rename to neutron/neutron/plugins/ml2/drivers/aws/callbacks.py diff --git a/neutron/aws/neutron/plugins/ml2/drivers/aws/mechanism_aws.py b/neutron/neutron/plugins/ml2/drivers/aws/mechanism_aws.py similarity index 100% rename from neutron/aws/neutron/plugins/ml2/drivers/aws/mechanism_aws.py rename to neutron/neutron/plugins/ml2/drivers/aws/mechanism_aws.py diff --git a/neutron/gce/neutron/plugins/ml2/drivers/gce/__init__.py b/neutron/neutron/plugins/ml2/drivers/gce/__init__.py similarity index 100% rename from neutron/gce/neutron/plugins/ml2/drivers/gce/__init__.py rename to neutron/neutron/plugins/ml2/drivers/gce/__init__.py diff --git a/neutron/gce/neutron/plugins/ml2/drivers/gce/mech_gce.py b/neutron/neutron/plugins/ml2/drivers/gce/mech_gce.py similarity index 100% rename from neutron/gce/neutron/plugins/ml2/drivers/gce/mech_gce.py rename to neutron/neutron/plugins/ml2/drivers/gce/mech_gce.py diff --git a/neutron/aws/neutron/plugins/ml2/managers.py b/neutron/neutron/plugins/ml2/managers.py similarity index 100% rename from neutron/aws/neutron/plugins/ml2/managers.py rename to neutron/neutron/plugins/ml2/managers.py diff --git a/neutron/aws/neutron/services/l3_router/aws_router_plugin.py b/neutron/neutron/services/l3_router/aws_router_plugin.py similarity index 100% rename from neutron/aws/neutron/services/l3_router/aws_router_plugin.py rename to neutron/neutron/services/l3_router/aws_router_plugin.py diff --git a/neutron/gce/neutron/services/l3_router/gce_router_plugin.py b/neutron/neutron/services/l3_router/gce_router_plugin.py similarity index 100% rename from neutron/gce/neutron/services/l3_router/gce_router_plugin.py rename to neutron/neutron/services/l3_router/gce_router_plugin.py diff --git a/neutron/gce/requirements-gce.txt b/neutron/requirements-gce.txt similarity index 100% rename from neutron/gce/requirements-gce.txt rename to neutron/requirements-gce.txt diff --git a/nova/tests/ec2/__init__.py b/nova/tests/unit/ec2/__init__.py similarity index 100% rename from nova/tests/ec2/__init__.py rename to nova/tests/unit/ec2/__init__.py diff --git a/nova/tests/ec2/test_driver.py b/nova/tests/unit/ec2/test_driver.py similarity index 100% rename from nova/tests/ec2/test_driver.py rename to nova/tests/unit/ec2/test_driver.py diff --git a/nova/tests/gce/__init__.py b/nova/tests/unit/gce/__init__.py similarity index 100% rename from nova/tests/gce/__init__.py rename to nova/tests/unit/gce/__init__.py diff --git a/nova/tests/gce/data/disk/get_disk.json b/nova/tests/unit/gce/data/disk/get_disk.json similarity index 100% rename from nova/tests/gce/data/disk/get_disk.json rename to nova/tests/unit/gce/data/disk/get_disk.json diff --git a/nova/tests/gce/data/image/get_image.json b/nova/tests/unit/gce/data/image/get_image.json similarity index 100% rename from nova/tests/gce/data/image/get_image.json rename to nova/tests/unit/gce/data/image/get_image.json diff --git a/nova/tests/gce/data/instance/get_instance.json b/nova/tests/unit/gce/data/instance/get_instance.json similarity index 100% rename from nova/tests/gce/data/instance/get_instance.json rename to nova/tests/unit/gce/data/instance/get_instance.json diff --git a/nova/tests/gce/data/instance/get_instance_without_boot.json b/nova/tests/unit/gce/data/instance/get_instance_without_boot.json similarity index 100% rename from nova/tests/gce/data/instance/get_instance_without_boot.json rename to nova/tests/unit/gce/data/instance/get_instance_without_boot.json diff --git a/nova/tests/gce/data/instance/list_instances.json b/nova/tests/unit/gce/data/instance/list_instances.json similarity index 100% rename from nova/tests/gce/data/instance/list_instances.json rename to nova/tests/unit/gce/data/instance/list_instances.json diff --git a/nova/tests/gce/data/machines_info/list_machines_info.json b/nova/tests/unit/gce/data/machines_info/list_machines_info.json similarity index 100% rename from nova/tests/gce/data/machines_info/list_machines_info.json rename to nova/tests/unit/gce/data/machines_info/list_machines_info.json diff --git a/nova/tests/gce/data/omni.json b/nova/tests/unit/gce/data/omni.json similarity index 100% rename from nova/tests/gce/data/omni.json rename to nova/tests/unit/gce/data/omni.json diff --git a/nova/tests/gce/data/service/service_data.json b/nova/tests/unit/gce/data/service/service_data.json similarity index 100% rename from nova/tests/gce/data/service/service_data.json rename to nova/tests/unit/gce/data/service/service_data.json diff --git a/nova/tests/gce/gce_mock.py b/nova/tests/unit/gce/gce_mock.py similarity index 100% rename from nova/tests/gce/gce_mock.py rename to nova/tests/unit/gce/gce_mock.py diff --git a/nova/tests/gce/test_gce.py b/nova/tests/unit/gce/test_gce.py similarity index 100% rename from nova/tests/gce/test_gce.py rename to nova/tests/unit/gce/test_gce.py diff --git a/nova/ec2/__init__.py b/nova/virt/ec2/__init__.py similarity index 100% rename from nova/ec2/__init__.py rename to nova/virt/ec2/__init__.py diff --git a/nova/ec2/cloud_burst_filter.py b/nova/virt/ec2/cloud_burst_filter.py similarity index 100% rename from nova/ec2/cloud_burst_filter.py rename to nova/virt/ec2/cloud_burst_filter.py diff --git a/nova/ec2/ec2driver.py b/nova/virt/ec2/ec2driver.py similarity index 100% rename from nova/ec2/ec2driver.py rename to nova/virt/ec2/ec2driver.py diff --git a/nova/ec2/exception_handler.py b/nova/virt/ec2/exception_handler.py similarity index 100% rename from nova/ec2/exception_handler.py rename to nova/virt/ec2/exception_handler.py diff --git a/nova/gce/__init__.py b/nova/virt/gce/__init__.py similarity index 100% rename from nova/gce/__init__.py rename to nova/virt/gce/__init__.py diff --git a/nova/gce/constants.py b/nova/virt/gce/constants.py similarity index 100% rename from nova/gce/constants.py rename to nova/virt/gce/constants.py diff --git a/nova/gce/create-nova-flavors-gce.py b/nova/virt/gce/create-nova-flavors-gce.py similarity index 100% rename from nova/gce/create-nova-flavors-gce.py rename to nova/virt/gce/create-nova-flavors-gce.py diff --git a/nova/gce/driver.py b/nova/virt/gce/driver.py similarity index 100% rename from nova/gce/driver.py rename to nova/virt/gce/driver.py diff --git a/nova/gce/gceutils.py b/nova/virt/gce/gceutils.py similarity index 100% rename from nova/gce/gceutils.py rename to nova/virt/gce/gceutils.py diff --git a/omni-requirements.txt b/omni-requirements.txt new file mode 100644 index 0000000..39fba96 --- /dev/null +++ b/omni-requirements.txt @@ -0,0 +1,128 @@ +# This file contains Cinder, Nova, Glance and Neutron packages to run Omni unit test cases. + +pbr>=1.6 # Apache-2.0 +Babel>=2.3.4 # BSD +decorator>=3.4.0 # BSD +enum34;python_version=='2.7' or python_version=='2.6' or python_version=='3.3' # BSD +eventlet!=0.18.3,>=0.18.2 # MIT +greenlet>=0.3.2 # MIT +httplib2>=0.7.5 # MIT +iso8601>=0.1.11 # MIT +ipaddress>=1.0.7;python_version<'3.3' # PSF +keystoneauth1>=2.10.0 # Apache-2.0 +keystonemiddleware!=4.1.0,!=4.5.0,>=4.0.0 # Apache-2.0 +lxml>=2.3 # BSD +oauth2client>=1.5.0 # Apache-2.0 +oslo.config>=3.14.0 # Apache-2.0 +oslo.concurrency>=3.8.0 # Apache-2.0 +oslo.context>=2.9.0 # Apache-2.0 +oslo.db!=4.13.1,!=4.13.2,>=4.10.0 # Apache-2.0 +oslo.log>=1.14.0 # Apache-2.0 +oslo.messaging>=5.2.0 # Apache-2.0 +oslo.middleware>=3.0.0 # Apache-2.0 +oslo.policy>=1.9.0 # Apache-2.0 +oslo.privsep>=1.9.0 # Apache-2.0 +oslo.reports>=0.6.0 # Apache-2.0 +oslo.rootwrap>=5.0.0 # Apache-2.0 +oslo.serialization>=1.10.0 # Apache-2.0 +oslo.service>=1.10.0 # Apache-2.0 +oslo.utils>=3.16.0 # Apache-2.0 +oslo.versionedobjects>=1.13.0 # Apache-2.0 +osprofiler>=1.4.0 # Apache-2.0 +paramiko>=2.0 # LGPLv2.1+ +Paste # MIT +PasteDeploy>=1.5.0 # MIT +pycrypto>=2.6 # Public Domain +pyparsing>=2.0.1 # MIT +python-barbicanclient>=4.0.0 # Apache-2.0 +python-glanceclient!=2.4.0,>=2.3.0 # Apache-2.0 +python-keystoneclient!=2.1.0,>=2.0.0 # Apache-2.0 +python-novaclient!=2.33.0,>=2.29.0 # Apache-2.0 +python-swiftclient>=2.2.0 # Apache-2.0 +pytz>=2013.6 # MIT +requests>=2.10.0 # Apache-2.0 +retrying!=1.3.0,>=1.2.3 # Apache-2.0 +Routes!=2.0,!=2.1,!=2.3.0,>=1.12.3;python_version=='2.7' # MIT +Routes!=2.0,!=2.3.0,>=1.12.3;python_version!='2.7' # MIT +taskflow>=1.26.0 # Apache-2.0 +rtslib-fb!=2.1.60,!=2.1.61,>=2.1.41 # Apache-2.0 +simplejson>=2.2.0 # MIT +six>=1.9.0 # MIT +SQLAlchemy<1.1.0,>=1.0.10 # MIT +sqlalchemy-migrate>=0.9.6 # Apache-2.0 +stevedore>=1.16.0 # Apache-2.0 +suds-jurko>=0.6 # LGPLv3+ +WebOb>=1.2.3 # MIT +oslo.i18n>=2.1.0 # Apache-2.0 +oslo.vmware>=2.11.0 # Apache-2.0 +os-brick>=1.6.1 # Apache-2.0 +os-win>=0.2.3 # Apache-2.0 +tooz>=1.28.0 # Apache-2.0 +google-api-python-client>=1.4.2 # Apache-2.0 +castellan>=0.4.0 # Apache-2.0 +hacking<0.11,>=0.10.0 +anyjson>=0.3.3 # BSD +coverage>=3.6 # Apache-2.0 +ddt>=1.0.1 # MIT +fixtures>=3.0.0 # Apache-2.0/BSD +mock>=2.0 # BSD +mox3>=0.7.0 # Apache-2.0 +os-api-ref>=1.0.0 # Apache-2.0 +oslotest>=1.10.0 # Apache-2.0 +sphinx!=1.3b1,<1.3,>=1.2.1 # BSD +python-subunit>=0.0.18 # Apache-2.0/BSD +testtools>=1.4.0 # MIT +testrepository>=0.0.18 # Apache-2.0/BSD +testresources>=0.2.4 # Apache-2.0/BSD +testscenarios>=0.4 # Apache-2.0/BSD +oslosphinx!=3.4.0,>=2.5.0 # Apache-2.0 +os-testr>=0.7.0 # Apache-2.0 +tempest-lib>=0.14.0 # Apache-2.0 +bandit>=1.1.0 # Apache-2.0 +reno>=1.8.0 # Apache2 +psycopg2>=2.5 # LGPL/ZPL +PyMySQL!=0.7.7,>=0.6.2 # MIT License +python-ironicclient>=1.6.0 # Apache-2.0 +requests-mock>=1.0 # Apache-2.0 +openstackdocstheme>=1.5.0 # Apache-2.0 +gabbi>=1.24.0 # Apache-2.0 +wsgi-intercept>=0.6.1 # MIT License +moto +boto>=2.32.1 # MIT +Jinja2>=2.8 # BSD License (3 clause) +cryptography!=1.3.0,>=1.0 # BSD/Apache-2.0 +PrettyTable<0.8,>=0.7 # BSD +netaddr!=0.7.16,>=0.7.13 # BSD +netifaces>=0.10.4 # MIT +jsonschema!=2.5.0,<3.0.0,>=2.0.0 # MIT +python-cinderclient!=1.7.0,!=1.7.1,>=1.6.0 # Apache-2.0 +python-neutronclient>=5.1.0 # Apache-2.0 +setuptools!=24.0.0,!=34.0.0,!=34.0.1,!=34.0.2,!=34.0.3,!=34.1.0,!=34.1.1,!=34.2.0,!=34.3.0,!=34.3.1,!=34.3.2,!=34.3.3,>=16.0 # PSF/ZPL +websockify>=0.8.0 # LGPLv3 +oslo.cache>=1.5.0 # Apache-2.0 +rfc3986>=0.2.2 # Apache-2.0 +psutil<2.0.0,>=1.1.1 # BSD +os-vif>=1.1.0 # Apache-2.0 +microversion-parse>=0.1.2 # Apache-2.0 +debtcollector>=1.2.0 # Apache-2.0 +pecan!=1.0.2,!=1.0.3,!=1.0.4,>=1.0.0 # BSD +neutron-lib>=0.4.0 # Apache-2.0 +ryu!=4.1,!=4.2,!=4.2.1,!=4.4,>=3.30 # Apache-2.0 +alembic>=0.8.4 # MIT +ovs>=2.5.0;python_version=='2.7' # Apache-2.0 +ovs>=2.6.0.dev3;python_version>='3.4' # Apache-2.0 +python-designateclient>=1.5.0 # Apache-2.0 +ipaddr +WebTest>=2.0 # MIT +pylint==1.4.5 # GPLv2 +tempest>=12.1.0 # Apache-2.0 +pysendfile>=2.0.0 # MIT +qpid-python;python_version=='2.7' # Apache-2.0 +xattr>=0.4 # MIT +futurist!=0.15.0,>=0.11.0 # Apache-2.0 +WSME>=0.8 # MIT +glance-store>=0.18.0 # Apache-2.0 +semantic-version>=2.3.1 # BSD +debtcollector>=1.2.0 # Apache-2.0 +cursive>=0.1.1 # Apache-2.0 +monotonic>=0.6 # Apache-2.0 \ No newline at end of file diff --git a/run_tests.sh b/run_tests.sh new file mode 100644 index 0000000..88d41f6 --- /dev/null +++ b/run_tests.sh @@ -0,0 +1,117 @@ +# Copyright (c) 2017 Platform9 Systems Inc. +# +# 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 expressed or implied. See the +# License for the specific language governing permissions and limitations +# under the License. + +#!/usr/bin/env bash +set -x + +WORKSPACE=$(pwd) +DIRECTORY="$WORKSPACE/omnitests" +declare -A results + +if [ -d "$DIRECTORY" ]; then + rm -rf $DIRECTORY +fi + +mkdir $DIRECTORY +python setup.py develop + +clone_repos() { + project=$1 + git clone -b stable/newton --depth 1 https://github.com/openstack/$project.git $DIRECTORY/$project +} + +copy_cinder_files() { + cp -R $WORKSPACE/cinder/tests/unit/volume/drivers/ $DIRECTORY/cinder/cinder/tests/unit/volume/ + cp -R $WORKSPACE/cinder/volume/drivers/ $DIRECTORY/cinder/cinder/volume/ +} + +copy_glance_files() { + cp -R $WORKSPACE/glance/glance_store/tests/unit/ $DIRECTORY/glance_store/glance_store/tests + cp $WORKSPACE/glance/gce/gceutils.py $DIRECTORY/glance_store/glance_store/_drivers/ + cp -R $WORKSPACE/glance/glance_store/_drivers/ $DIRECTORY/glance_store/glance_store/ +} + +copy_nova_files() { + cp -R $WORKSPACE/nova/virt/ $DIRECTORY/nova/nova/virt/ + cp -R $WORKSPACE/nova/tests/unit/ $DIRECTORY/nova/nova/tests/ +} + +copy_neutron_files() { + cp -R $WORKSPACE/neutron/neutron/common/ $DIRECTORY/neutron/neutron/ + cp -R $WORKSPACE/neutron/neutron/plugins/ml2/drivers/ $DIRECTORY/neutron/neutron/plugins/ml2/ + cp $WORKSPACE/neutron/neutron/services/l3_router/* $DIRECTORY/neutron/neutron/services/l3_router/ + cp -R $WORKSPACE/neutron/tests/common/ $DIRECTORY/neutron/neutron/tests/ + cp -R $WORKSPACE/neutron/tests/plugins/ml2/drivers/ $DIRECTORY/neutron/neutron/tests/unit/plugins/ml2/ +} + +run_tests() { + project=$1 + tests=$2 + source $WORKSPACE/.tox/py27/bin/activate + cd $DIRECTORY/$project + python -m testtools.run $tests >> $DIRECTORY/$project.log +} + +check_results() { + project=$1 + string="FAILED" + total_tests=$(tail -2 $DIRECTORY/$project.log | head -1) + complete_result=$(tail -1 $DIRECTORY/$project.log | head -1) + if test "${complete_result#*$string}" != "$complete_result"; then + results=( ["$project"]="$string") + else + results=( ["$project"]="PASSED") + fi +} + +clone_repos cinder & +clone_repos nova & +clone_repos glance_store & +clone_repos neutron & +wait + +copy_cinder_files +copy_glance_files +copy_nova_files +copy_neutron_files + +NOVA_TESTS="nova.tests.unit.virt.ec2.test_ebs nova.tests.unit.virt.gce.test_gce" +CINDER_TESTS="cinder.tests.unit.volume.drivers.test_ebs cinder.tests.unit.volume.drivers.gce.test_gce" +GLANCE_TESTS="glance_store.tests.unit.gce.test_gce" +NEUTRON_TESTS="neutron.tests.unit.plugins.ml2.drivers.gce.test_gce" + +run_tests cinder "$CINDER_TESTS" & +run_tests glance_store "$GLANCE_TESTS" & +run_tests neutron "$NEUTRON_TESTS" & +run_tests nova "$NOVA_TESTS" & +wait + +check_results cinder +check_results nova +check_results neutron +check_results glance_store + +echo "Cinder results: ${results[cinder]}" +echo "Glance results: ${results[glance_store]}" +echo "Neutron results: ${results[neutron]}" +echo "Nova results: ${results[nova]}" + +if [ "${results[cinder]}" = "FAILED" ] || \ + [ "${results[glance_store]}" = "FAILED" ] || \ + [ "${results[neutron]}" = "FAILED" ] || \ + [ "${results[nova]}" = "FAILED" ]; then + echo "Test cases failed" + exit 1 +fi +echo "All tests passed" diff --git a/setup.cfg b/setup.cfg new file mode 100644 index 0000000..3ecede6 --- /dev/null +++ b/setup.cfg @@ -0,0 +1,11 @@ +[metadata] +name = omni +summary = Omni Project +description-file = README.md +classifier = + Environment :: OpenStack + License :: OSI Approved :: Apache Software License + Operating System :: POSIX :: Linux + Programming Language :: Python + Programming Language :: Python :: 2 + Programming Language :: Python :: 2.7 diff --git a/setup.py b/setup.py new file mode 100644 index 0000000..deef104 --- /dev/null +++ b/setup.py @@ -0,0 +1,19 @@ +# Copyright (c) 2017 Platform9 Systems Inc. +# +# 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 expressed or implied. See the +# License for the specific language governing permissions and limitations +# under the License. + +import setuptools + +setuptools.setup( + setup_requires=['pbr>=1.8'], + pbr=True) diff --git a/tox.ini b/tox.ini new file mode 100644 index 0000000..8b9187c --- /dev/null +++ b/tox.ini @@ -0,0 +1,10 @@ +[tox] +envlist = py27 +skipsdist = true + +[testenv] +usedevelop = True +whitelist_externals = bash +install_command = pip install -c{env:UPPER_CONSTRAINTS_FILE:https://git.openstack.org/cgit/openstack/requirements/plain/upper-constraints.txt?h=stable/newton} {opts} {packages} +deps = -r{toxinidir}/omni-requirements.txt +commands = bash run_tests.sh