Merge "Add cinder CLI tests to tempest"
diff --git a/etc/tempest.conf.sample b/etc/tempest.conf.sample
index 0af8e9b..12aa399 100644
--- a/etc/tempest.conf.sample
+++ b/etc/tempest.conf.sample
@@ -181,9 +181,9 @@
# This section contains configuration options used when executing tests
# against the OpenStack Network API.
-# Version of the Quantum API
+# Version of the Neutron API
api_version = v1.1
-# Catalog type of the Quantum Service
+# Catalog type of the Neutron Service
catalog_type = network
# A large private cidr block from which to allocate smaller blocks for
@@ -206,8 +206,8 @@
# for each tenant to have their own router.
public_router_id = {$PUBLIC_ROUTER_ID}
-# Whether or not quantum is expected to be available
-quantum_available = false
+# Whether or not neutron is expected to be available
+neutron_available = false
[volume]
# This section contains the configuration options used when executing tests
diff --git a/requirements.txt b/requirements.txt
index 606d7ae..b3c706b 100644
--- a/requirements.txt
+++ b/requirements.txt
@@ -11,7 +11,7 @@
python-glanceclient>=0.5.0
python-keystoneclient>=0.2.0
python-novaclient>=2.10.0
-python-quantumclient>=2.1
+python-neutronclient>=2.2.3,<3.0.0
python-cinderclient>=1.0.4,<2
testresources
keyring
diff --git a/tempest/api/compute/admin/test_fixed_ips.py b/tempest/api/compute/admin/test_fixed_ips.py
index 34f96ba..2eaf3b0 100644
--- a/tempest/api/compute/admin/test_fixed_ips.py
+++ b/tempest/api/compute/admin/test_fixed_ips.py
@@ -56,8 +56,8 @@
CONF = config.TempestConfig()
- @testtools.skipIf(CONF.network.quantum_available, "This feature is not" +
- "implemented by Quantum. See bug: #1194569")
+ @testtools.skipIf(CONF.network.neutron_available, "This feature is not" +
+ "implemented by Neutron. See bug: #1194569")
@attr(type='gate')
def test_list_fixed_ip_details(self):
resp, fixed_ip = self.client.get_fixed_ip_details(self.ip)
diff --git a/tempest/api/compute/security_groups/test_security_groups.py b/tempest/api/compute/security_groups/test_security_groups.py
index 12c646d..e105121 100644
--- a/tempest/api/compute/security_groups/test_security_groups.py
+++ b/tempest/api/compute/security_groups/test_security_groups.py
@@ -158,8 +158,8 @@
self.client.create_security_group, s_name,
s_description)
- @testtools.skipIf(config.TempestConfig().network.quantum_available,
- "Quantum allows duplicate names for security groups")
+ @testtools.skipIf(config.TempestConfig().network.neutron_available,
+ "Neutron allows duplicate names for security groups")
@attr(type=['negative', 'gate'])
def test_security_group_create_with_duplicate_name(self):
# Negative test:Security Group with duplicate name should not
diff --git a/tempest/api/compute/servers/test_attach_interfaces.py b/tempest/api/compute/servers/test_attach_interfaces.py
index 113ac78..de095c5 100644
--- a/tempest/api/compute/servers/test_attach_interfaces.py
+++ b/tempest/api/compute/servers/test_attach_interfaces.py
@@ -24,8 +24,8 @@
@classmethod
def setUpClass(cls):
- if not cls.config.network.quantum_available:
- raise cls.skipException("Quantum is required")
+ if not cls.config.network.neutron_available:
+ raise cls.skipException("Neutron is required")
super(AttachInterfacesTestJSON, cls).setUpClass()
cls.client = cls.os.interfaces_client
diff --git a/tempest/api/compute/servers/test_server_actions.py b/tempest/api/compute/servers/test_server_actions.py
index 9f97f4f..304a512 100644
--- a/tempest/api/compute/servers/test_server_actions.py
+++ b/tempest/api/compute/servers/test_server_actions.py
@@ -253,6 +253,24 @@
lines = len(output.split('\n'))
self.assertEqual(lines, 10)
+ @attr(type='gate')
+ def test_pause_unpause_server(self):
+ resp, server = self.client.pause_server(self.server_id)
+ self.assertEqual(202, resp.status)
+ self.client.wait_for_server_status(self.server_id, 'PAUSED')
+ resp, server = self.client.unpause_server(self.server_id)
+ self.assertEqual(202, resp.status)
+ self.client.wait_for_server_status(self.server_id, 'ACTIVE')
+
+ @attr(type='gate')
+ def test_suspend_resume_server(self):
+ resp, server = self.client.suspend_server(self.server_id)
+ self.assertEqual(202, resp.status)
+ self.client.wait_for_server_status(self.server_id, 'SUSPENDED')
+ resp, server = self.client.resume_server(self.server_id)
+ self.assertEqual(202, resp.status)
+ self.client.wait_for_server_status(self.server_id, 'ACTIVE')
+
@classmethod
def rebuild_servers(cls):
# Destroy any existing server and creates a new one
diff --git a/tempest/api/compute/servers/test_virtual_interfaces.py b/tempest/api/compute/servers/test_virtual_interfaces.py
index 9073aeb..35f0fc0 100644
--- a/tempest/api/compute/servers/test_virtual_interfaces.py
+++ b/tempest/api/compute/servers/test_virtual_interfaces.py
@@ -37,8 +37,8 @@
resp, server = cls.create_server(wait_until='ACTIVE')
cls.server_id = server['id']
- @testtools.skipIf(CONF.network.quantum_available, "This feature is not " +
- "implemented by Quantum. See bug: #1183436")
+ @testtools.skipIf(CONF.network.neutron_available, "This feature is not " +
+ "implemented by Neutron. See bug: #1183436")
@attr(type='gate')
def test_list_virtual_interfaces(self):
# Positive test:Should be able to GET the virtual interfaces list
diff --git a/tempest/api/identity/admin/v3/test_domains.py b/tempest/api/identity/admin/v3/test_domains.py
index 8d019fe..3d40eb3 100644
--- a/tempest/api/identity/admin/v3/test_domains.py
+++ b/tempest/api/identity/admin/v3/test_domains.py
@@ -15,6 +15,7 @@
# License for the specific language governing permissions and limitations
# under the License.
+
from tempest.api.identity import base
from tempest.common.utils.data_utils import rand_name
from tempest.test import attr
@@ -49,6 +50,48 @@
missing_doms = [d for d in domain_ids if d not in fetched_ids]
self.assertEqual(0, len(missing_doms))
+ @attr(type='smoke')
+ def test_create_update_delete_domain(self):
+ d_name = rand_name('domain-')
+ d_desc = rand_name('domain-desc-')
+ resp_1, domain = self.v3_client.create_domain(
+ d_name, description=d_desc)
+ self.assertEqual(resp_1['status'], '201')
+ self.addCleanup(self._delete_domain, domain['id'])
+ self.assertIn('id', domain)
+ self.assertIn('description', domain)
+ self.assertIn('name', domain)
+ self.assertIn('enabled', domain)
+ self.assertIn('links', domain)
+ self.assertIsNotNone(domain['id'])
+ self.assertEqual(d_name, domain['name'])
+ self.assertEqual(d_desc, domain['description'])
+ if self._interface == "json":
+ self.assertEqual(True, domain['enabled'])
+ else:
+ self.assertEqual('true', str(domain['enabled']).lower())
+ new_desc = rand_name('new-desc-')
+ new_name = rand_name('new-name-')
+
+ resp_2, updated_domain = self.v3_client.update_domain(
+ domain['id'], name=new_name, description=new_desc)
+ self.assertEqual(resp_2['status'], '200')
+ self.assertIn('id', updated_domain)
+ self.assertIn('description', updated_domain)
+ self.assertIn('name', updated_domain)
+ self.assertIn('enabled', updated_domain)
+ self.assertIn('links', updated_domain)
+ self.assertIsNotNone(updated_domain['id'])
+ self.assertEqual(new_name, updated_domain['name'])
+ self.assertEqual(new_desc, updated_domain['description'])
+ self.assertEqual('true', str(updated_domain['enabled']).lower())
+
+ resp_3, fetched_domain = self.v3_client.get_domain(domain['id'])
+ self.assertEqual(resp_3['status'], '200')
+ self.assertEqual(new_name, fetched_domain['name'])
+ self.assertEqual(new_desc, fetched_domain['description'])
+ self.assertEqual('true', str(fetched_domain['enabled']).lower())
+
class DomainsTestXML(DomainsTestJSON):
_interface = 'xml'
diff --git a/tempest/api/network/base.py b/tempest/api/network/base.py
index 03e73df..3b7f9dd 100644
--- a/tempest/api/network/base.py
+++ b/tempest/api/network/base.py
@@ -26,11 +26,11 @@
class BaseNetworkTest(tempest.test.BaseTestCase):
"""
- Base class for the Quantum tests that use the Tempest Quantum REST client
+ Base class for the Neutron tests that use the Tempest Neutron REST client
- Per the Quantum API Guide, API v1.x was removed from the source code tree
+ Per the Neutron API Guide, API v1.x was removed from the source code tree
(docs.openstack.org/api/openstack-network/2.0/content/Overview-d1e71.html)
- Therefore, v2.x of the Quantum API is assumed. It is also assumed that the
+ Therefore, v2.x of the Neutron API is assumed. It is also assumed that the
following options are defined in the [network] section of etc/tempest.conf:
tenant_network_cidr with a block of cidr's from which smaller blocks
@@ -44,8 +44,8 @@
def setUpClass(cls):
os = clients.Manager()
cls.network_cfg = os.config.network
- if not cls.network_cfg.quantum_available:
- raise cls.skipException("Quantum support is required")
+ if not cls.network_cfg.neutron_available:
+ raise cls.skipException("Neutron support is required")
cls.client = os.network_client
cls.networks = []
cls.subnets = []
diff --git a/tempest/api/network/common.py b/tempest/api/network/common.py
index 22eb1d3..c3fb821 100644
--- a/tempest/api/network/common.py
+++ b/tempest/api/network/common.py
@@ -32,7 +32,7 @@
class DeletableResource(AttributeDict):
"""
- Support deletion of quantum resources (networks, subnets) via a
+ Support deletion of neutron resources (networks, subnets) via a
delete() method, as is supported by keystone and nova resources.
"""
diff --git a/tempest/api/network/test_networks.py b/tempest/api/network/test_networks.py
index 1f45f92..4481853 100644
--- a/tempest/api/network/test_networks.py
+++ b/tempest/api/network/test_networks.py
@@ -26,8 +26,8 @@
class NetworksTest(base.BaseNetworkTest):
"""
- Tests the following operations in the Quantum API using the REST client for
- Quantum:
+ Tests the following operations in the Neutron API using the REST client for
+ Neutron:
create a network for a tenant
list tenant's networks
@@ -36,7 +36,7 @@
list tenant's subnets
show a tenant subnet details
- v2.0 of the Quantum API is assumed. It is also assumed that the following
+ v2.0 of the Neutron API is assumed. It is also assumed that the following
options are defined in the [network] section of etc/tempest.conf:
tenant_network_cidr with a block of cidr's from which smaller blocks
diff --git a/tempest/api/object_storage/test_object_services.py b/tempest/api/object_storage/test_object_services.py
index 2f52a65..6136216 100644
--- a/tempest/api/object_storage/test_object_services.py
+++ b/tempest/api/object_storage/test_object_services.py
@@ -340,18 +340,19 @@
def test_object_upload_in_segments(self):
# create object
object_name = rand_name(name='LObject')
- data = arbitrary_string(size=len(object_name),
- base_text=object_name)
+ data = arbitrary_string()
segments = 10
- self.object_client.create_object(self.container_name,
- object_name, data)
- # uploading 10 segments
- for i in range(segments):
+ data_segments = [data + str(i) for i in xrange(segments)]
+ # uploading segments
+ for i in xrange(segments):
resp, _ = self.object_client.create_object_segments(
- self.container_name, object_name, i, data)
- # creating a manifest file (metadata update)
+ self.container_name, object_name, i, data_segments[i])
+ self.assertEqual(resp['status'], '201')
+ # creating a manifest file
metadata = {'X-Object-Manifest': '%s/%s/'
% (self.container_name, object_name)}
+ self.object_client.create_object(self.container_name,
+ object_name, data='')
resp, _ = self.object_client.update_object_metadata(
self.container_name, object_name, metadata, metadata_prefix='')
resp, _ = self.object_client.list_object_metadata(
@@ -363,7 +364,7 @@
# downloading the object
resp, body = self.object_client.get_object(
self.container_name, object_name)
- self.assertEqual(data * segments, body)
+ self.assertEqual(''.join(data_segments), body)
@attr(type='gate')
def test_get_object_if_different(self):
diff --git a/tempest/api/orchestration/base.py b/tempest/api/orchestration/base.py
index 6d6000a..ffa534a 100644
--- a/tempest/api/orchestration/base.py
+++ b/tempest/api/orchestration/base.py
@@ -12,7 +12,7 @@
# License for the specific language governing permissions and limitations
# under the License.
-import logging
+from tempest.common import log as logging
import time
from tempest import clients
diff --git a/tempest/api/orchestration/stacks/test_instance_cfn_init.py b/tempest/api/orchestration/stacks/test_instance_cfn_init.py
index add8588..16509ea 100644
--- a/tempest/api/orchestration/stacks/test_instance_cfn_init.py
+++ b/tempest/api/orchestration/stacks/test_instance_cfn_init.py
@@ -13,7 +13,7 @@
# under the License.
import json
-import logging
+from tempest.common import log as logging
import testtools
from tempest.api.orchestration import base
diff --git a/tempest/api/orchestration/stacks/test_stacks.py b/tempest/api/orchestration/stacks/test_stacks.py
index 5fed581..15979ed 100644
--- a/tempest/api/orchestration/stacks/test_stacks.py
+++ b/tempest/api/orchestration/stacks/test_stacks.py
@@ -12,7 +12,7 @@
# License for the specific language governing permissions and limitations
# under the License.
-import logging
+from tempest.common import log as logging
from tempest.api.orchestration import base
from tempest.common.utils.data_utils import rand_name
diff --git a/tempest/cli/__init__.py b/tempest/cli/__init__.py
index 8905824..0e1d6db 100644
--- a/tempest/cli/__init__.py
+++ b/tempest/cli/__init__.py
@@ -15,7 +15,6 @@
# License for the specific language governing permissions and limitations
# under the License.
-import logging
import os
import shlex
import subprocess
@@ -23,6 +22,7 @@
from oslo.config import cfg
import tempest.cli.output_parser
+from tempest.common import log as logging
import tempest.test
diff --git a/tempest/cli/output_parser.py b/tempest/cli/output_parser.py
index 840839b..3ee3098 100644
--- a/tempest/cli/output_parser.py
+++ b/tempest/cli/output_parser.py
@@ -18,7 +18,8 @@
"""Collection of utilities for parsing CLI clients output."""
-import logging
+from tempest.common import log as logging
+
import re
diff --git a/tempest/cli/simple_read_only/test_compute.py b/tempest/cli/simple_read_only/test_compute.py
index fa64561..561fd00 100644
--- a/tempest/cli/simple_read_only/test_compute.py
+++ b/tempest/cli/simple_read_only/test_compute.py
@@ -15,13 +15,13 @@
# License for the specific language governing permissions and limitations
# under the License.
-import logging
import subprocess
from oslo.config import cfg
import testtools
import tempest.cli
+from tempest.common import log as logging
CONF = cfg.CONF
diff --git a/tempest/cli/simple_read_only/test_compute_manage.py b/tempest/cli/simple_read_only/test_compute_manage.py
index a788c8b..802a206 100644
--- a/tempest/cli/simple_read_only/test_compute_manage.py
+++ b/tempest/cli/simple_read_only/test_compute_manage.py
@@ -15,10 +15,10 @@
# License for the specific language governing permissions and limitations
# under the License.
-import logging
import subprocess
import tempest.cli
+from tempest.common import log as logging
LOG = logging.getLogger(__name__)
diff --git a/tempest/cli/simple_read_only/test_glance.py b/tempest/cli/simple_read_only/test_glance.py
index b3b3eb7..fa77e8a 100644
--- a/tempest/cli/simple_read_only/test_glance.py
+++ b/tempest/cli/simple_read_only/test_glance.py
@@ -15,11 +15,11 @@
# License for the specific language governing permissions and limitations
# under the License.
-import logging
import re
import subprocess
import tempest.cli
+from tempest.common import log as logging
LOG = logging.getLogger(__name__)
diff --git a/tempest/cli/simple_read_only/test_keystone.py b/tempest/cli/simple_read_only/test_keystone.py
index 45d519b..3bc8b3e 100644
--- a/tempest/cli/simple_read_only/test_keystone.py
+++ b/tempest/cli/simple_read_only/test_keystone.py
@@ -15,11 +15,11 @@
# License for the specific language governing permissions and limitations
# under the License.
-import logging
import re
import subprocess
import tempest.cli
+from tempest.common import log as logging
LOG = logging.getLogger(__name__)
diff --git a/tempest/clients.py b/tempest/clients.py
index a5c7b4d..d7a740a 100644
--- a/tempest/clients.py
+++ b/tempest/clients.py
@@ -399,5 +399,5 @@
base = super(OrchestrationManager, self)
base.__init__(conf.identity.admin_username,
conf.identity.admin_password,
- conf.identity.admin_tenant_name,
+ conf.identity.tenant_name,
interface=interface)
diff --git a/tempest/config.py b/tempest/config.py
index f6fd1d9..96b144c 100644
--- a/tempest/config.py
+++ b/tempest/config.py
@@ -280,7 +280,7 @@
NetworkGroup = [
cfg.StrOpt('catalog_type',
default='network',
- help='Catalog type of the Quantum service.'),
+ help='Catalog type of the Neutron service.'),
cfg.StrOpt('tenant_network_cidr',
default="10.100.0.0/16",
help="The cidr block to allocate tenant networks from"),
@@ -299,9 +299,9 @@
default="",
help="Id of the public router that provides external "
"connectivity"),
- cfg.BoolOpt('quantum_available',
+ cfg.BoolOpt('neutron_available',
default=False,
- help="Whether or not quantum is expected to be available"),
+ help="Whether or not neutron is expected to be available"),
]
diff --git a/tempest/hacking/checks.py b/tempest/hacking/checks.py
index 5e941da..f9eb968 100644
--- a/tempest/hacking/checks.py
+++ b/tempest/hacking/checks.py
@@ -17,7 +17,7 @@
import re
-PYTHON_CLIENTS = ['cinder', 'glance', 'keystone', 'nova', 'swift', 'quantum']
+PYTHON_CLIENTS = ['cinder', 'glance', 'keystone', 'nova', 'swift', 'neutron']
SKIP_DECORATOR_RE = re.compile(r'\s*@testtools.skip\((.*)\)')
SKIP_STR_RE = re.compile(r'.*Bug #\d+.*')
diff --git a/tempest/scenario/manager.py b/tempest/scenario/manager.py
index 366ff43..fe6fbf5 100644
--- a/tempest/scenario/manager.py
+++ b/tempest/scenario/manager.py
@@ -16,7 +16,6 @@
# License for the specific language governing permissions and limitations
# under the License.
-import logging
import subprocess
# Default client libs
@@ -24,12 +23,13 @@
import glanceclient
import keystoneclient.v2_0.client
import netaddr
+from neutronclient.common import exceptions as exc
+import neutronclient.v2_0.client
import novaclient.client
-from quantumclient.common import exceptions as exc
-import quantumclient.v2_0.client
from tempest.api.network import common as net_common
+from tempest.common import log as logging
from tempest.common import ssh
from tempest.common.utils.data_utils import rand_name
from tempest import exceptions
@@ -166,7 +166,7 @@
auth_url = self.config.identity.uri
dscv = self.config.identity.disable_ssl_certificate_validation
- return quantumclient.v2_0.client.Client(username=username,
+ return neutronclient.v2_0.client.Client(username=username,
password=password,
tenant_name=tenant_name,
auth_url=auth_url,
@@ -236,9 +236,9 @@
@classmethod
def check_preconditions(cls):
- if (cls.config.network.quantum_available):
+ if (cls.config.network.neutron_available):
cls.enabled = True
- #verify that quantum_available is telling the truth
+ #verify that neutron_available is telling the truth
try:
cls.network_client.list_networks()
except exc.EndpointNotFound:
@@ -246,7 +246,7 @@
raise
else:
cls.enabled = False
- msg = 'Quantum not available'
+ msg = 'Neutron not available'
raise cls.skipException(msg)
@classmethod
@@ -358,7 +358,7 @@
try:
result = self.network_client.create_subnet(body=body)
break
- except exc.QuantumClientException as e:
+ except exc.NeutronClientException as e:
is_overlapping_cidr = 'overlaps with another subnet' in str(e)
if not is_overlapping_cidr:
raise
diff --git a/tempest/scenario/test_minimum_basic.py b/tempest/scenario/test_minimum_basic.py
index a55bbb2..2097f50 100644
--- a/tempest/scenario/test_minimum_basic.py
+++ b/tempest/scenario/test_minimum_basic.py
@@ -15,7 +15,7 @@
# License for the specific language governing permissions and limitations
# under the License.
-import logging
+from tempest.common import log as logging
from tempest.common.utils.data_utils import rand_name
from tempest.common.utils.linux.remote_client import RemoteClient
diff --git a/tempest/scenario/test_network_basic_ops.py b/tempest/scenario/test_network_basic_ops.py
index b94caaa..390e004 100644
--- a/tempest/scenario/test_network_basic_ops.py
+++ b/tempest/scenario/test_network_basic_ops.py
@@ -26,7 +26,7 @@
"""
This smoke test suite assumes that Nova has been configured to
- boot VM's with Quantum-managed networking, and attempts to
+ boot VM's with Neutron-managed networking, and attempts to
verify network connectivity as follows:
* For a freshly-booted VM with an IP address ("port") on a given network:
diff --git a/tempest/scenario/test_network_quotas.py b/tempest/scenario/test_network_quotas.py
index 8c3af73..267aff6 100644
--- a/tempest/scenario/test_network_quotas.py
+++ b/tempest/scenario/test_network_quotas.py
@@ -15,7 +15,7 @@
# License for the specific language governing permissions and limitations
# under the License.
-from quantumclient.common import exceptions as exc
+from neutronclient.common import exceptions as exc
from tempest.scenario.manager import NetworkScenarioTest
MAX_REASONABLE_ITERATIONS = 51 # more than enough. Default for port is 50.
@@ -48,7 +48,7 @@
self.networks.append(
self._create_network(self.tenant_id,
namestart='network-quotatest-'))
- except exc.QuantumClientException as e:
+ except exc.NeutronClientException as e:
if (e.status_code != 409):
raise
hit_limit = True
@@ -66,7 +66,7 @@
self.subnets.append(
self._create_subnet(self.networks[0],
namestart='subnet-quotatest-'))
- except exc.QuantumClientException as e:
+ except exc.NeutronClientException as e:
if (e.status_code != 409):
raise
hit_limit = True
@@ -84,7 +84,7 @@
self.ports.append(
self._create_port(self.networks[0],
namestart='port-quotatest-'))
- except exc.QuantumClientException as e:
+ except exc.NeutronClientException as e:
if (e.status_code != 409):
raise
hit_limit = True
diff --git a/tempest/scenario/test_snapshot_pattern.py b/tempest/scenario/test_snapshot_pattern.py
index 7725421..f21a00b 100644
--- a/tempest/scenario/test_snapshot_pattern.py
+++ b/tempest/scenario/test_snapshot_pattern.py
@@ -15,7 +15,7 @@
# License for the specific language governing permissions and limitations
# under the License.
-import logging
+from tempest.common import log as logging
from tempest.common.utils.data_utils import rand_name
from tempest.common.utils.linux.remote_client import RemoteClient
diff --git a/tempest/services/compute/xml/servers_client.py b/tempest/services/compute/xml/servers_client.py
index 1ec4df0..f2cca72 100644
--- a/tempest/services/compute/xml/servers_client.py
+++ b/tempest/services/compute/xml/servers_client.py
@@ -163,6 +163,22 @@
server = self._parse_server(etree.fromstring(body))
return resp, server
+ def suspend_server(self, server_id, **kwargs):
+ """Suspends the provided server."""
+ return self.action(server_id, 'suspend', None, **kwargs)
+
+ def resume_server(self, server_id, **kwargs):
+ """Un-suspends the provided server."""
+ return self.action(server_id, 'resume', None, **kwargs)
+
+ def pause_server(self, server_id, **kwargs):
+ """Pauses the provided server."""
+ return self.action(server_id, 'pause', None, **kwargs)
+
+ def unpause_server(self, server_id, **kwargs):
+ """Un-pauses the provided server."""
+ return self.action(server_id, 'unpause', None, **kwargs)
+
def delete_server(self, server_id):
"""Deletes the given server."""
return self.delete("servers/%s" % str(server_id))
diff --git a/tempest/services/network/json/network_client.py b/tempest/services/network/json/network_client.py
index 4758ddd..c4fe6b1 100644
--- a/tempest/services/network/json/network_client.py
+++ b/tempest/services/network/json/network_client.py
@@ -5,10 +5,10 @@
class NetworkClient(RestClient):
"""
- Tempest REST client for Quantum. Uses v2 of the Quantum API, since the
+ Tempest REST client for Neutron. Uses v2 of the Neutron API, since the
V1 API has been removed from the code base.
- Implements the following operations for each one of the basic Quantum
+ Implements the following operations for each one of the basic Neutron
abstractions (networks, sub-networks and ports):
create
diff --git a/tools/install_venv_common.py b/tools/install_venv_common.py
index 42a44e8..f428c1e 100644
--- a/tools/install_venv_common.py
+++ b/tools/install_venv_common.py
@@ -34,12 +34,13 @@
class InstallVenv(object):
- def __init__(self, root, venv, pip_requires, test_requires, py_version,
+ def __init__(self, root, venv, requirements,
+ test_requirements, py_version,
project):
self.root = root
self.venv = venv
- self.pip_requires = pip_requires
- self.test_requires = test_requires
+ self.requirements = requirements
+ self.test_requirements = test_requirements
self.py_version = py_version
self.project = project
@@ -75,11 +76,13 @@
def get_distro(self):
if (os.path.exists('/etc/fedora-release') or
os.path.exists('/etc/redhat-release')):
- return Fedora(self.root, self.venv, self.pip_requires,
- self.test_requires, self.py_version, self.project)
+ return Fedora(
+ self.root, self.venv, self.requirements,
+ self.test_requirements, self.py_version, self.project)
else:
- return Distro(self.root, self.venv, self.pip_requires,
- self.test_requires, self.py_version, self.project)
+ return Distro(
+ self.root, self.venv, self.requirements,
+ self.test_requirements, self.py_version, self.project)
def check_dependencies(self):
self.get_distro().install_virtualenv()
@@ -98,11 +101,6 @@
else:
self.run_command(['virtualenv', '-q', self.venv])
print('done.')
- print('Installing pip in venv...', end=' ')
- if not self.run_command(['tools/with_venv.sh', 'easy_install',
- 'pip>1.0']).strip():
- self.die("Failed to install pip.")
- print('done.')
else:
print("venv already exists...")
pass
@@ -116,20 +114,12 @@
print('Installing dependencies with pip (this can take a while)...')
# First things first, make sure our venv has the latest pip and
- # distribute.
- # NOTE: we keep pip at version 1.1 since the most recent version causes
- # the .venv creation to fail. See:
- # https://bugs.launchpad.net/nova/+bug/1047120
- self.pip_install('pip==1.1')
- self.pip_install('distribute')
+ # setuptools.
+ self.pip_install('pip>=1.3')
+ self.pip_install('setuptools')
- # Install greenlet by hand - just listing it in the requires file does
- # not
- # get it installed in the right order
- self.pip_install('greenlet')
-
- self.pip_install('-r', self.pip_requires)
- self.pip_install('-r', self.test_requires)
+ self.pip_install('-r', self.requirements)
+ self.pip_install('-r', self.test_requirements)
def post_process(self):
self.get_distro().post_process()