Преглед на файлове

Renamed CB_USE_MOCK_DRIVERS to CB_USE_MOCK_PROVIDERS for consistency.

Nuwan Goonasekera преди 10 години
родител
ревизия
5981e6ac8e
променени са 4 файла, в които са добавени 13 реда и са изтрити 13 реда
  1. 4 4
      README.rst
  2. 7 7
      docs/topics/setup.rst
  3. 1 1
      test/helpers.py
  4. 1 1
      tox.ini

+ 4 - 4
README.rst

@@ -39,10 +39,10 @@ look like the following.
 
 
 .. code-block:: python
 .. code-block:: python
 
 
-	from cloudbridge.cloud.factory import CloudProviderFactory, ProviderList
+  from cloudbridge.cloud.factory import CloudProviderFactory, ProviderList
 
 
-	provider = CloudProviderFactory().create_provider(ProviderList.AWS, {})
-	print(provider.security.key_pairs.list())
+  provider = CloudProviderFactory().create_provider(ProviderList.AWS, {})
+  print(provider.security.key_pairs.list())
 
 
 In the example above, the AWS_ACCESS_KEY and AWS_SECRET_KEY environment variables
 In the example above, the AWS_ACCESS_KEY and AWS_SECRET_KEY environment variables
 must be set to your AWS credentials.
 must be set to your AWS credentials.
@@ -102,7 +102,7 @@ Note that running the tests may create various cloud resources, for which you
 may incur costs. For the AWS cloud, there is also a mock provider that will
 may incur costs. For the AWS cloud, there is also a mock provider that will
 simulate AWS resources. It is used by default when running the test suite. To
 simulate AWS resources. It is used by default when running the test suite. To
 disable it, set the following environment variable:
 disable it, set the following environment variable:
-``export CB_USE_MOCK_DRIVERS=No``.
+``export CB_USE_MOCK_PROVIDERS=No``.
 
 
 Testing philosophy
 Testing philosophy
 ~~~~~~~~~~~~~~~~~~
 ~~~~~~~~~~~~~~~~~~

+ 7 - 7
docs/topics/setup.rst

@@ -87,10 +87,10 @@ In addition to the provider specific configuration variables above, there are
 some general configuration environment variables that apply to cloudbridge as
 some general configuration environment variables that apply to cloudbridge as
 a whole
 a whole
 
 
-====================  ==================
-Variable		      Description
-====================  ==================
-CB_DEBUG              Setting ``CB_DEBUG=True`` will cause detailed debug output to be printed for each provider (including HTTP traces).
-CB_USE_MOCK_DRIVERS   Setting this to ``True`` will cause the CloudBridge test suite to use mock drivers when available.
-CB_TEST_PROVIDER      Set this value to a valid :class:`.ProviderList` value such as ``aws``, to limit tests to that provider only.
-====================  ==================
+=====================  ==================
+Variable		       Description
+=====================  ==================
+CB_DEBUG               Setting ``CB_DEBUG=True`` will cause detailed debug output to be printed for each provider (including HTTP traces).
+CB_USE_MOCK_PROVIDERS  Setting this to ``True`` will cause the CloudBridge test suite to use mock drivers when available.
+CB_TEST_PROVIDER       Set this value to a valid :class:`.ProviderList` value such as ``aws``, to limit tests to that provider only.
+=====================  ==================

+ 1 - 1
test/helpers.py

@@ -188,7 +188,7 @@ class ProviderTestCaseGenerator():
         """
         """
         factory = CloudProviderFactory()
         factory = CloudProviderFactory()
         use_mock_drivers = parse_bool(
         use_mock_drivers = parse_bool(
-            os.environ.get("CB_USE_MOCK_DRIVERS", True))
+            os.environ.get("CB_USE_MOCK_PROVIDERS", True))
         provider_name = os.environ.get("CB_TEST_PROVIDER", None)
         provider_name = os.environ.get("CB_TEST_PROVIDER", None)
         if provider_name:
         if provider_name:
             provider_classes = [
             provider_classes = [

+ 1 - 1
tox.ini

@@ -8,7 +8,7 @@ envlist = py27, py35, pypy
 
 
 [testenv]
 [testenv]
 commands = {envpython} -m coverage run --branch --source=cloudbridge --omit=cloudbridge/cloud/interfaces/* setup.py test
 commands = {envpython} -m coverage run --branch --source=cloudbridge --omit=cloudbridge/cloud/interfaces/* setup.py test
-passenv = AWS_ACCESS_KEY AWS_SECRET_KEY OS_AUTH_URL OS_PASSWORD OS_TENANT_NAME OS_USERNAME OS_REGION_NAME NOVA_SERVICE_NAME CB_IMAGE_AWS CB_INSTANCE_TYPE_AWS CB_PLACEMENT_AWS CB_IMAGE_OS CB_INSTANCE_TYPE_OS CB_PLACEMENT_OS CB_TEST_PROVIDER CB_USE_MOCK_DRIVERS
+passenv = AWS_ACCESS_KEY AWS_SECRET_KEY OS_AUTH_URL OS_PASSWORD OS_TENANT_NAME OS_USERNAME OS_REGION_NAME NOVA_SERVICE_NAME CB_IMAGE_AWS CB_INSTANCE_TYPE_AWS CB_PLACEMENT_AWS CB_IMAGE_OS CB_INSTANCE_TYPE_OS CB_PLACEMENT_OS CB_TEST_PROVIDER CB_USE_MOCK_PROVIDERS
 deps =
 deps =
     -rrequirements.txt
     -rrequirements.txt
     coverage
     coverage