diff options
Diffstat (limited to 'pkgs/applications/virtualization')
6 files changed, 0 insertions, 418 deletions
diff --git a/pkgs/applications/virtualization/openstack/glance.nix b/pkgs/applications/virtualization/openstack/glance.nix deleted file mode 100644 index 21cb4906d034..000000000000 --- a/pkgs/applications/virtualization/openstack/glance.nix +++ /dev/null @@ -1,69 +0,0 @@ -{ stdenv, fetchurl, python2Packages, sqlite, which, strace }: - -python2Packages.buildPythonApplication rec { - name = "glance-${version}"; - version = "11.0.0"; - namePrefix = ""; - - PBR_VERSION = "${version}"; - - src = fetchurl { - url = "https://github.com/openstack/glance/archive/${version}.tar.gz"; - sha256 = "05rz1lmzdmpnw8sf87vvi0l6q9g6s840z934zyinw17yfcvmqrdg"; - }; - - # https://github.com/openstack/glance/blob/stable/liberty/requirements.txt - propagatedBuildInputs = with python2Packages; [ - pbr sqlalchemy anyjson eventlet PasteDeploy routes webob sqlalchemy_migrate - httplib2 pycrypto iso8601 stevedore futurist keystonemiddleware paste - jsonschema keystoneclient pyopenssl six retrying semantic-version qpid-python - WSME osprofiler glance_store castellan taskflow cryptography xattr pysendfile - - # oslo componenets - oslo-config oslo-context oslo-concurrency oslo-service oslo-utils oslo-db - oslo-i18n oslo-log oslo-messaging oslo-middleware oslo-policy oslo-serialization - MySQL_python - ]; - - buildInputs = with python2Packages; [ - Babel coverage fixtures mox3 mock oslosphinx requests testrepository pep8 - testresources testscenarios testtools psutil_1 oslotest psycopg2 - sqlite which strace - ]; - - patchPhase = '' - # it's not a test, but a class mixin - sed -i 's/ImageCacheTestCase/ImageCacheMixin/' glance/tests/unit/test_image_cache.py - - # these require network access, see https://bugs.launchpad.net/glance/+bug/1508868 - sed -i 's/test_get_image_data_http/noop/' glance/tests/unit/common/scripts/test_scripts_utils.py - sed -i 's/test_set_image_data_http/noop/' glance/tests/unit/common/scripts/image_import/test_main.py - sed -i 's/test_create_image_with_nonexistent_location_url/noop/' glance/tests/unit/v1/test_api.py - sed -i 's/test_upload_image_http_nonexistent_location_url/noop/' glance/tests/unit/v1/test_api.py - - # TODO: couldn't figure out why this test is failing - sed -i 's/test_all_task_api/noop/' glance/tests/integration/v2/test_tasks_api.py - ''; - - postInstall = '' - # check all binaries don't crash - for i in $out/bin/*; do - case "$i" in - *glance-artifacts) # https://bugs.launchpad.net/glance/+bug/1508879 - : - ;; - *) - $i --help - esac - done - - cp etc/*-paste.ini $out/etc/ - ''; - - meta = with stdenv.lib; { - homepage = http://glance.openstack.org/; - description = "Services for discovering, registering, and retrieving virtual machine images"; - license = stdenv.lib.licenses.asl20; - platforms = stdenv.lib.platforms.linux; - }; -} diff --git a/pkgs/applications/virtualization/openstack/keystone.nix b/pkgs/applications/virtualization/openstack/keystone.nix deleted file mode 100644 index 39c54f0d204b..000000000000 --- a/pkgs/applications/virtualization/openstack/keystone.nix +++ /dev/null @@ -1,55 +0,0 @@ -{ stdenv, fetchurl, python2Packages, xmlsec, which, openssl }: - -python2Packages.buildPythonApplication rec { - name = "keystone-${version}"; - version = "8.0.0"; - namePrefix = ""; - - PBR_VERSION = "${version}"; - - src = fetchurl { - url = "https://github.com/openstack/keystone/archive/${version}.tar.gz"; - sha256 = "1xbrs7xgwjzrs07zyxxcl2lq18dh582gd6lx1zzzji8c0qmffy0z"; - }; - - # remove on next version bump - patches = [ ./remove-oslo-policy-tests.patch ]; - - # https://github.com/openstack/keystone/blob/stable/liberty/requirements.txt - propagatedBuildInputs = with python2Packages; [ - pbr webob eventlet greenlet PasteDeploy paste routes cryptography six - sqlalchemy sqlalchemy_migrate stevedore passlib keystoneclient memcached - keystonemiddleware oauthlib pysaml2 dogpile_cache jsonschema pycadf msgpack - xmlsec MySQL_python - - # oslo - oslo-cache oslo-concurrency oslo-config oslo-context oslo-messaging oslo-db - oslo-i18n oslo-log oslo-middleware oslo-policy oslo-serialization oslo-service - oslo-utils - ]; - - buildInputs = with python2Packages; [ - coverage fixtures mock subunit tempest-lib testtools testrepository - ldap ldappool webtest requests oslotest pep8 pymongo which - ]; - - makeWrapperArgs = ["--prefix PATH : '${openssl.bin}/bin:$PATH'"]; - - postInstall = '' - # install .ini files - mkdir -p $out/etc - cp etc/* $out/etc - - # check all binaries don't crash - for i in $out/bin/*; do - $i --help - done - ''; - - meta = with stdenv.lib; { - homepage = http://keystone.openstack.org/; - description = "Authentication, authorization and service discovery mechanisms via HTTP"; - license = stdenv.lib.licenses.asl20; - platforms = stdenv.lib.platforms.linux; - }; -} diff --git a/pkgs/applications/virtualization/openstack/neutron-iproute-4.patch b/pkgs/applications/virtualization/openstack/neutron-iproute-4.patch deleted file mode 100644 index d7a2caa2bdea..000000000000 --- a/pkgs/applications/virtualization/openstack/neutron-iproute-4.patch +++ /dev/null @@ -1,93 +0,0 @@ -From 3aefdf4de76fdcdc02093bc631e339f9ecd4c707 Mon Sep 17 00:00:00 2001 -From: James Page <james.page@ubuntu.com> -Date: Fri, 18 Sep 2015 16:38:47 +0100 -Subject: Add compatibility with iproute2 >= 4.0 - -The ip netns list command adds additional id data in more recent -versions of iproute2 of the format: - - qdhcp-35fc068a-750d-4add-b1d2-af392dbd8790 (id: 1) - -Update parsing to deal with old and new formats. - -Change-Id: I0d3fc4262284172f5ad31e4f2f78ae1fb33b4228 -Closes-Bug: 1497309 ---- - neutron/agent/linux/ip_lib.py | 6 +++--- - neutron/tests/functional/agent/test_l3_agent.py | 2 +- - neutron/tests/unit/agent/linux/test_ip_lib.py | 15 +++++++++++++++ - 3 files changed, 19 insertions(+), 4 deletions(-) - -diff --git a/neutron/agent/linux/ip_lib.py b/neutron/agent/linux/ip_lib.py -index 551341a..a717bf6 100644 ---- a/neutron/agent/linux/ip_lib.py -+++ b/neutron/agent/linux/ip_lib.py -@@ -208,7 +208,7 @@ class IPWrapper(SubProcessBase): - @classmethod - def get_namespaces(cls): - output = cls._execute([], 'netns', ('list',)) -- return [l.strip() for l in output.split('\n')] -+ return [l.split()[0] for l in output.splitlines()] - - - class IPDevice(SubProcessBase): -@@ -819,8 +819,8 @@ class IpNetnsCommand(IpCommandBase): - output = self._parent._execute( - ['o'], 'netns', ['list'], - run_as_root=cfg.CONF.AGENT.use_helper_for_ns_read) -- for line in output.split('\n'): -- if name == line.strip(): -+ for line in [l.split()[0] for l in output.splitlines()]: -+ if name == line: - return True - return False - -diff --git a/neutron/tests/functional/agent/test_l3_agent.py b/neutron/tests/functional/agent/test_l3_agent.py -index ffa20e6..84b16df 100644 ---- a/neutron/tests/functional/agent/test_l3_agent.py -+++ b/neutron/tests/functional/agent/test_l3_agent.py -@@ -790,7 +790,7 @@ class L3HATestFramework(L3AgentTestFramework): - get_ns_name = mock.patch.object( - namespaces.RouterNamespace, '_get_ns_name').start() - get_ns_name.return_value = "%s%s%s" % ( -- namespaces.RouterNamespace._get_ns_name(router_info['id']), -+ 'qrouter-' + router_info['id'], - self.NESTED_NAMESPACE_SEPARATOR, self.agent.host) - router1 = self.manage_router(self.agent, router_info) - -diff --git a/neutron/tests/unit/agent/linux/test_ip_lib.py b/neutron/tests/unit/agent/linux/test_ip_lib.py -index 2de408d..bdfc9d7 100644 ---- a/neutron/tests/unit/agent/linux/test_ip_lib.py -+++ b/neutron/tests/unit/agent/linux/test_ip_lib.py -@@ -27,6 +27,11 @@ NETNS_SAMPLE = [ - 'bbbbbbbb-bbbb-bbbb-bbbb-bbbbbbbbbbbb', - 'cccccccc-cccc-cccc-cccc-cccccccccccc'] - -+NETNS_SAMPLE_IPROUTE2_4 = [ -+ '12345678-1234-5678-abcd-1234567890ab (id: 1)', -+ 'bbbbbbbb-bbbb-bbbb-bbbb-bbbbbbbbbbbb (id: 0)', -+ 'cccccccc-cccc-cccc-cccc-cccccccccccc (id: 2)'] -+ - LINK_SAMPLE = [ - '1: lo: <LOOPBACK,UP,LOWER_UP> mtu 16436 qdisc noqueue state UNKNOWN \\' - 'link/loopback 00:00:00:00:00:00 brd 00:00:00:00:00:00 promiscuity 0', -@@ -279,6 +284,16 @@ class TestIpWrapper(base.BaseTestCase): - - self.execute.assert_called_once_with([], 'netns', ('list',)) - -+ def test_get_namespaces_iproute2_4(self): -+ self.execute.return_value = '\n'.join(NETNS_SAMPLE_IPROUTE2_4) -+ retval = ip_lib.IPWrapper.get_namespaces() -+ self.assertEqual(retval, -+ ['12345678-1234-5678-abcd-1234567890ab', -+ 'bbbbbbbb-bbbb-bbbb-bbbb-bbbbbbbbbbbb', -+ 'cccccccc-cccc-cccc-cccc-cccccccccccc']) -+ -+ self.execute.assert_called_once_with([], 'netns', ('list',)) -+ - def test_add_tuntap(self): - ip_lib.IPWrapper().add_tuntap('tap0') - self.execute.assert_called_once_with([], 'tuntap', --- -cgit v0.11.2 - diff --git a/pkgs/applications/virtualization/openstack/neutron.nix b/pkgs/applications/virtualization/openstack/neutron.nix deleted file mode 100644 index 9ee586cf0409..000000000000 --- a/pkgs/applications/virtualization/openstack/neutron.nix +++ /dev/null @@ -1,69 +0,0 @@ -{ stdenv, fetchurl, python2Packages, xmlsec, which, dnsmasq }: - -python2Packages.buildPythonApplication rec { - name = "neutron-${version}"; - version = "7.0.0"; - namePrefix = ""; - - PBR_VERSION = "${version}"; - - src = fetchurl { - url = "https://github.com/openstack/neutron/archive/${version}.tar.gz"; - sha256 = "02ll081xly7zfjmgkal81fy3aplbnn5zgx8xfy3yy1nv3kfnyi40"; - }; - - # https://github.com/openstack/neutron/blob/stable/liberty/requirements.txt - propagatedBuildInputs = with python2Packages; [ - pbr paste PasteDeploy routes debtcollector eventlet greenlet httplib2 requests - jinja2 keystonemiddleware netaddr retrying sqlalchemy webob alembic six - stevedore pecan ryu networking-hyperv MySQL_python - - # clients - keystoneclient neutronclient novaclient - - # oslo components - oslo-concurrency oslo-config oslo-context oslo-db oslo-i18n oslo-log oslo-messaging - oslo-middleware oslo-policy oslo-rootwrap oslo-serialization oslo-service oslo-utils - oslo-versionedobjects - ]; - - # make sure we include migrations - prePatch = '' - echo "graft neutron" >> MANIFEST.in - substituteInPlace etc/neutron/rootwrap.d/dhcp.filters --replace "/sbin/dnsmasq" "${dnsmasq}/bin/dnsmasq" - ''; - patches = [ ./neutron-iproute-4.patch ]; - - buildInputs = with python2Packages; [ - cliff coverage fixtures mock subunit requests-mock oslosphinx testrepository - testtools testresources testscenarios webtest oslotest os-testr tempest-lib - ddt pep8 - ]; - - postInstall = '' - # requires extra optional dependencies - # TODO: package networking_mlnx, networking_vsphere, bsnstacklib, XenAPI - rm $out/bin/{neutron-mlnx-agent,neutron-ovsvapp-agent,neutron-restproxy-agent,neutron-rootwrap-xen-dom0} - - # check all binaries don't crash - for i in $out/bin/*; do - case "$i" in - *neutron-pd-notify|*neutron-rootwrap-daemon|*neutron-rootwrap) - : - ;; - *) - $i --help - esac - done - ''; - - meta = with stdenv.lib; { - homepage = http://neutron.openstack.org/; - description = "Virtual network service for Openstack"; - license = stdenv.lib.licenses.asl20; - platforms = stdenv.lib.platforms.linux; - # Marked as broken due to needing an update for security issues. - # See: https://github.com/NixOS/nixpkgs/issues/18856 - broken = true; - }; -} diff --git a/pkgs/applications/virtualization/openstack/nova.nix b/pkgs/applications/virtualization/openstack/nova.nix deleted file mode 100644 index ef3eb2fb0842..000000000000 --- a/pkgs/applications/virtualization/openstack/nova.nix +++ /dev/null @@ -1,71 +0,0 @@ -{ stdenv, fetchurl, python2Packages, openssl, openssh }: - -python2Packages.buildPythonApplication rec { - name = "nova-${version}"; - version = "12.0.0"; - namePrefix = ""; - - PBR_VERSION = "${version}"; - - src = fetchurl { - url = "https://github.com/openstack/nova/archive/${version}.tar.gz"; - sha256 = "175n1znvmy8f5vqvabc2fa4qy8y17685z4gzpq8984mdsdnpv21w"; - }; - - # otherwise migrate.cfg is not installed - patchPhase = '' - echo "graft nova" >> MANIFEST.in - - # remove transient error test, see http://hydra.nixos.org/build/40203534 - rm nova/tests/unit/compute/test_{shelve,compute_utils}.py - ''; - - # https://github.com/openstack/nova/blob/stable/liberty/requirements.txt - propagatedBuildInputs = with python2Packages; [ - pbr sqlalchemy boto decorator eventlet jinja2 lxml routes cryptography - webob greenlet PasteDeploy paste prettytable sqlalchemy_migrate netaddr - netifaces paramiko Babel iso8601 jsonschema keystoneclient requests six - stevedore websockify rfc3986 os-brick psutil_1 alembic psycopg2 pymysql - keystonemiddleware MySQL_python - - # oslo components - oslo-rootwrap oslo-reports oslo-utils oslo-i18n oslo-config oslo-context - oslo-log oslo-serialization oslo-middleware oslo-db oslo-service oslo-messaging - oslo-concurrency oslo-versionedobjects - - # clients - cinderclient neutronclient glanceclient - ]; - - buildInputs = with python2Packages; [ - coverage fixtures mock mox3 subunit requests-mock pillow oslosphinx - oslotest testrepository testresources testtools tempest-lib bandit - oslo-vmware pep8 barbicanclient ironicclient openssl openssh - ]; - - postInstall = '' - cp -prvd etc $out/etc - - # check all binaries don't crash - for i in $out/bin/*; do - case "$i" in - *nova-dhcpbridge*) - : - ;; - *nova-rootwrap*) - : - ;; - *) - $i --help - ;; - esac - done - ''; - - meta = with stdenv.lib; { - homepage = http://nova.openstack.org/; - description = "OpenStack Compute (a.k.a. Nova), a cloud computing fabric controller"; - license = stdenv.lib.licenses.asl20; - platforms = stdenv.lib.platforms.linux; - }; -} diff --git a/pkgs/applications/virtualization/openstack/remove-oslo-policy-tests.patch b/pkgs/applications/virtualization/openstack/remove-oslo-policy-tests.patch deleted file mode 100644 index 3cdc27a2d2af..000000000000 --- a/pkgs/applications/virtualization/openstack/remove-oslo-policy-tests.patch +++ /dev/null @@ -1,61 +0,0 @@ -From 6016d017004acaae288312b196ef07ea98e9962d Mon Sep 17 00:00:00 2001 -From: Brant Knudson <bknudson@us.ibm.com> -Date: Mon, 12 Oct 2015 15:12:45 -0500 -Subject: [PATCH] Remove oslo.policy implementation tests from keystone - -oslo.policy 0.12.0 contains a change to use requests to do the http -check rather than urllib. This change caused keystone tests to fail -because the keystone tests were mocking urllib, making assumptions -about how oslo.policy is implemented. Keystone doesn't need to test -internal features of oslo.policy, so these tests are removed. - -Change-Id: I9d6e4950b9fe75cbb94100c8effdcec002642027 -Closes-Bug: 1505374 ---- - keystone/tests/unit/test_policy.py | 24 ------------------------ - 1 file changed, 24 deletions(-) - -diff --git a/keystone/tests/unit/test_policy.py b/keystone/tests/unit/test_policy.py -index b2f0e52..686e2b7 100644 ---- a/keystone/tests/unit/test_policy.py -+++ b/keystone/tests/unit/test_policy.py -@@ -16,10 +16,8 @@ - import json - import os - --import mock - from oslo_policy import policy as common_policy - import six --from six.moves.urllib import request as urlrequest - from testtools import matchers - - from keystone import exception -@@ -118,28 +116,6 @@ def test_enforce_good_action(self): - action = "example:allowed" - rules.enforce(self.credentials, action, self.target) - -- def test_enforce_http_true(self): -- -- def fakeurlopen(url, post_data): -- return six.StringIO("True") -- -- action = "example:get_http" -- target = {} -- with mock.patch.object(urlrequest, 'urlopen', fakeurlopen): -- result = rules.enforce(self.credentials, action, target) -- self.assertTrue(result) -- -- def test_enforce_http_false(self): -- -- def fakeurlopen(url, post_data): -- return six.StringIO("False") -- -- action = "example:get_http" -- target = {} -- with mock.patch.object(urlrequest, 'urlopen', fakeurlopen): -- self.assertRaises(exception.ForbiddenAction, rules.enforce, -- self.credentials, action, target) -- - def test_templatized_enforcement(self): - target_mine = {'project_id': 'fake'} - target_not_mine = {'project_id': 'another'} |