summaryrefslogtreecommitdiffstats
path: root/ci/prepare_env.py
diff options
context:
space:
mode:
authorSerenaFeng <feng.xiaowei@zte.com.cn>2016-09-01 10:19:58 +0800
committerSerenaFeng <feng.xiaowei@zte.com.cn>2016-09-01 16:44:18 +0800
commit470f573a3ac2eb1783efec6da01a3bee33360c65 (patch)
tree859f4bbd7afc35ce2a8ca33b0bc570f7f32c5724 /ci/prepare_env.py
parentc94a1c01e46b21f0139a8b1419f26c8b9f867a41 (diff)
stop hardcoded FUNCTEST_REPO path everywhere
functest repo is used by almost every testcase, each place we get it like: REPOS_DIR = os.getenv('repos_dir') FUNCTEST_REPO = ("%s/functest" % REPOS_DIR) provide a common interface in functest_util.py JIRA: FUNCTEST-453 Change-Id: Ie0635dacc761ed2d05b7e606530368844f32ebaf Signed-off-by: SerenaFeng <feng.xiaowei@zte.com.cn>
Diffstat (limited to 'ci/prepare_env.py')
-rwxr-xr-xci/prepare_env.py8
1 files changed, 3 insertions, 5 deletions
diff --git a/ci/prepare_env.py b/ci/prepare_env.py
index 2dc9e3ab4..49dcdd505 100755
--- a/ci/prepare_env.py
+++ b/ci/prepare_env.py
@@ -13,18 +13,18 @@
#
-import argparse
+import json
import os
import re
import subprocess
import sys
-import json
+import argparse
import functest.utils.functest_logger as ft_logger
import functest.utils.functest_utils as ft_utils
import functest.utils.openstack_utils as os_utils
import yaml
-
+from functest.utils.functest_utils import FUNCTEST_REPO as FUNCTEST_REPO
actions = ['start', 'check']
parser = argparse.ArgumentParser()
@@ -44,8 +44,6 @@ CI_INSTALLER_TYPE = ""
CI_INSTALLER_IP = ""
CI_SCENARIO = ""
CI_DEBUG = False
-REPOS_DIR = os.getenv('repos_dir')
-FUNCTEST_REPO = REPOS_DIR + '/functest/'
CONFIG_FUNCTEST_PATH = os.environ["CONFIG_FUNCTEST_YAML"]
CONFIG_PATCH_PATH = os.path.join(os.path.dirname(
CONFIG_FUNCTEST_PATH), "config_patch.yaml")
g */ .highlight .gi { color: #000000; background-color: #ddffdd } /* Generic.Inserted */ .highlight .go { color: #888888 } /* Generic.Output */ .highlight .gp { color: #555555 } /* Generic.Prompt */ .highlight .gs { font-weight: bold } /* Generic.Strong */ .highlight .gu { color: #666666 } /* Generic.Subheading */ .highlight .gt { color: #aa0000 } /* Generic.Traceback */ .highlight .kc { color: #008800; font-weight: bold } /* Keyword.Constant */ .highlight .kd { color: #008800; font-weight: bold } /* Keyword.Declaration */ .highlight .kn { color: #008800; font-weight: bold } /* Keyword.Namespace */ .highlight .kp { color: #008800 } /* Keyword.Pseudo */ .highlight .kr { color: #008800; font-weight: bold } /* Keyword.Reserved */ .highlight .kt { color: #888888; font-weight: bold } /* Keyword.Type */ .highlight .m { color: #0000DD; font-weight: bold } /* Literal.Number */ .highlight .s { color: #dd2200; background-color: #fff0f0 } /* Literal.String */ .highlight .na { color: #336699 } /* Name.Attribute */ .highlight .nb { color: #003388 } /* Name.Builtin */ .highlight .nc { color: #bb0066; font-weight: bold } /* Name.Class */ .highlight .no { color: #003366; font-weight: bold } /* Name.Constant */ .highlight .nd { color: #555555 } /* Name.Decorator */ .highlight .ne { color: #bb0066; font-weight: bold } /* Name.Exception */ .highlight .nf { color: #0066bb; font-weight: bold } /* Name.Function */ .highlight .nl { color: #336699; font-style: italic } /* Name.Label */ .highlight .nn { color: #bb0066; font-weight: bold } /* Name.Namespace */ .highlight .py { color: #336699; font-weight: bold } /* Name.Property */ .highlight .nt { color: #bb0066; font-weight: bold } /* Name.Tag */ .highlight .nv { color: #336699 } /* Name.Variable */ .highlight .ow { color: #008800 } /* Operator.Word */ .highlight .w { color: #bbbbbb } /* Text.Whitespace */ .highlight .mb { color: #0000DD; font-weight: bold } /* Literal.Number.Bin */ .highlight .mf { color: #0000DD; font-weight: bold } /* Literal.Number.Float */ .highlight .mh { color: #0000DD; font-weight: bold } /* Literal.Number.Hex */ .highlight .mi { color: #0000DD; font-weight: bold } /* Literal.Number.Integer */ .highlight .mo { color: #0000DD; font-weight: bold } /* Literal.Number.Oct */ .highlight .sa { color: #dd2200; background-color: #fff0f0 } /* Literal.String.Affix */ .highlight .sb { color: #dd2200; background-color: #fff0f0 } /* Literal.String.Backtick */ .highlight .sc { color: #dd2200; background-color: #fff0f0 } /* Literal.String.Char */ .highlight .dl { color: #dd2200; background-color: #fff0f0 } /* Literal.String.Delimiter */ .highlight .sd { color: #dd2200; background-color: #fff0f0 } /* Literal.String.Doc */ .highlight .s2 { color: #dd2200; background-color: #fff0f0 } /* Literal.String.Double */ .highlight .se { color: #0044dd; background-color: #fff0f0 } /* Literal.String.Escape */ .highlight .sh { color: #dd2200; background-color: #fff0f0 } /* Literal.String.Heredoc */ .highlight .si { color: #3333bb; background-color: #fff0f0 } /* Literal.String.Interpol */ .highlight .sx { color: #22bb22; background-color: #f0fff0 } /* Literal.String.Other */ .highlight .sr { color: #008800; background-color: #fff0ff } /* Literal.String.Regex */ .highlight .s1 { color: #dd2200; background-color: #fff0f0 } /* Literal.String.Single */ .highlight .ss { color: #aa6600; background-color: #fff0f0 } /* Literal.String.Symbol */ .highlight .bp { color: #003388 } /* Name.Builtin.Pseudo */ .highlight .fm { color: #0066bb; font-weight: bold } /* Name.Function.Magic */ .highlight .vc { color: #336699 } /* Name.Variable.Class */ .highlight .vg { color: #dd7700 } /* Name.Variable.Global */ .highlight .vi { color: #3333bb } /* Name.Variable.Instance */ .highlight .vm { color: #336699 } /* Name.Variable.Magic */ .highlight .il { color: #0000DD; font-weight: bold } /* Literal.Number.Integer.Long */ }
# Environment file demonstrating how to pre-assign IPs to all node types
resource_registry:
  OS::TripleO::Controller::Ports::ExternalPort: ../network/ports/external_from_pool.yaml
  OS::TripleO::Controller::Ports::InternalApiPort: ../network/ports/internal_api_from_pool.yaml
  OS::TripleO::Controller::Ports::StoragePort: ../network/ports/storage_from_pool.yaml
  OS::TripleO::Controller::Ports::StorageMgmtPort: ../network/ports/storage_mgmt_from_pool.yaml
  OS::TripleO::Controller::Ports::TenantPort: ../network/ports/tenant_from_pool.yaml
  # Management network is optional and disabled by default
  #OS::TripleO::Controller::Ports::ManagementPort: ../network/ports/management_from_pool.yaml

  OS::TripleO::Compute::Ports::ExternalPort: ../network/ports/noop.yaml
  OS::TripleO::Compute::Ports::InternalApiPort: ../network/ports/internal_api_from_pool.yaml
  OS::TripleO::Compute::Ports::StoragePort: ../network/ports/storage_from_pool.yaml
  OS::TripleO::Compute::Ports::StorageMgmtPort: ../network/ports/noop.yaml
  OS::TripleO::Compute::Ports::TenantPort: ../network/ports/tenant_from_pool.yaml
  #OS::TripleO::Compute::Ports::ManagementPort: ../network/ports/management_from_pool.yaml

  OS::TripleO::CephStorage::Ports::ExternalPort: ../network/ports/noop.yaml
  OS::TripleO::CephStorage::Ports::InternalApiPort: ../network/ports/noop.yaml
  OS::TripleO::CephStorage::Ports::StoragePort: ../network/ports/storage_from_pool.yaml
  OS::TripleO::CephStorage::Ports::StorageMgmtPort: ../network/ports/storage_mgmt_from_pool.yaml
  OS::TripleO::CephStorage::Ports::TenantPort: ../network/ports/noop.yaml
  #OS::TripleO::CephStorage::Ports::ManagementPort: ../network/ports/management_from_pool.yaml

  OS::TripleO::SwiftStorage::Ports::ExternalPort: ../network/ports/noop.yaml
  OS::TripleO::SwiftStorage::Ports::InternalApiPort: ../network/ports/internal_api_from_pool.yaml
  OS::TripleO::SwiftStorage::Ports::StoragePort: ../network/ports/storage_from_pool.yaml
  OS::TripleO::SwiftStorage::Ports::StorageMgmtPort: ../network/ports/storage_mgmt_from_pool.yaml
  OS::TripleO::SwiftStorage::Ports::TenantPort: ../network/ports/noop.yaml
  #OS::TripleO::SwiftStorage::Ports::ManagementPort: ../network/ports/management_from_pool.yaml

  OS::TripleO::BlockStorage::Ports::ExternalPort: ../network/ports/noop.yaml
  OS::TripleO::BlockStorage::Ports::InternalApiPort: ../network/ports/internal_api_from_pool.yaml
  OS::TripleO::BlockStorage::Ports::StoragePort: ../network/ports/storage_from_pool.yaml
  OS::TripleO::BlockStorage::Ports::StorageMgmtPort: ../network/ports/storage_mgmt_from_pool.yaml
  OS::TripleO::BlockStorage::Ports::TenantPort: ../network/ports/noop.yaml
  #OS::TripleO::BlockStorage::Ports::ManagementPort: ../network/ports/management_from_pool.yaml

parameter_defaults:
  ControllerIPs:
    # Each controller will get an IP from the lists below, first controller, first IP
    external:
    - 10.0.0.251
    internal_api:
    - 172.16.2.251
    storage:
    - 172.16.1.251
    storage_mgmt:
    - 172.16.3.251
    tenant:
    - 172.16.0.251
    #management:
    #- 172.16.4.251
  NovaComputeIPs:
    # Each compute will get an IP from the lists below, first compute, first IP
    internal_api:
    - 172.16.2.252
    storage:
    - 172.16.1.252
    tenant:
    - 172.16.0.252
    #management:
    #- 172.16.4.252
  CephStorageIPs:
    # Each ceph node will get an IP from the lists below, first node, first IP
    storage:
    - 172.16.1.253
    storage_mgmt:
    - 172.16.3.253
    #management:
    #- 172.16.4.253
  SwiftStorageIPs:
    # Each swift node will get an IP from the lists below, first node, first IP
    internal_api:
    - 172.16.2.254
    storage:
    - 172.16.1.254
    storage_mgmt:
    - 172.16.3.254
    #management:
    #- 172.16.4.254
  BlockStorageIPs:
    # Each cinder node will get an IP from the lists below, first node, first IP
    internal_api:
    - 172.16.2.250
    storage:
    - 172.16.1.250
    storage_mgmt:
    - 172.16.3.250
    #management:
    #- 172.16.4.250