Adding check of indirect access

If in scenario file set is_proxy_gateway: true, need
check of indirect access

Change-Id: Icf779a9e8cd1145de68f5341720d32c6b0d1ef55
This commit is contained in:
Evgeny Sikachev 2015-09-14 15:52:00 +03:00
parent ea993f12c2
commit 3b89217a8b
10 changed files with 20 additions and 3 deletions

View File

@ -44,6 +44,7 @@ clusters:
- YARN_NODEMANAGER
- ZOOKEEPER_SERVER
auto_security_group: true
is_proxy_gateway: true
- name: master-additional
flavor: ${medium_flavor_id}
node_processes:

View File

@ -17,6 +17,7 @@ clusters:
- jobtracker
- namenode
auto_security_group: true
is_proxy_gateway: true
cluster_template:
name: fake01
node_group_templates:

View File

@ -16,6 +16,7 @@ clusters:
- SECONDARY_NAMENODE
- ZOOKEEPER_SERVER
auto_security_group: true
is_proxy_gateway: true
- name: worker
flavor: ${ci_flavor_id}
node_processes:

View File

@ -25,6 +25,7 @@ clusters:
auto_security_group: true
volumes_per_node: 2
volumes_size: 20
is_proxy_gateway: true
- name: worker
flavor: ${ci_flavor_id}
node_processes:

View File

@ -9,6 +9,7 @@ clusters:
- master
- namenode
auto_security_group: true
is_proxy_gateway: true
- name: worker
flavor: ${ci_flavor_id}
node_processes:

View File

@ -28,6 +28,7 @@ clusters:
- resourcemanager
- namenode
auto_security_group: true
is_proxy_gateway: true
cluster_template:
name: transient
node_group_templates:

View File

@ -39,6 +39,7 @@ clusters:
- secondarynamenode
- nodemanager
auto_security_group: true
is_proxy_gateway: true
cluster_template:
name: vanilla271
node_group_templates:

View File

@ -237,7 +237,7 @@ This section is an array-type.
+---------------------------+------------------+----------+----------+--------------------------------------------------+
| volume_type | string | | | |
+---------------------------+------------------+----------+----------+--------------------------------------------------+
| is_proxy_gateway | boolean | | False | |
| is_proxy_gateway | boolean | | False | use this node as proxy gateway |
+---------------------------+------------------+----------+----------+--------------------------------------------------+

View File

@ -413,13 +413,22 @@ class BaseTestCase(base.BaseTestCase):
with open(template_file) as data:
node_groups.append(json.load(data))
check_indirect_access = False
for ng in node_groups:
if ng.get('is_proxy_gateway'):
check_indirect_access = True
for ng in node_groups:
kwargs = dict(ng)
kwargs.update(self.plugin_opts)
kwargs['flavor_id'] = self._get_flavor_id(kwargs['flavor'])
del kwargs['flavor']
kwargs['name'] = utils.rand_name(kwargs['name'])
kwargs['floating_ip_pool'] = floating_ip_pool
if (not kwargs.get('is_proxy_gateway',
False)) and (check_indirect_access):
kwargs['floating_ip_pool'] = None
else:
kwargs['floating_ip_pool'] = floating_ip_pool
ng_id = self.__create_node_group_template(**kwargs)
ng_id_map[ng['name']] = ng_id
return ng_id_map

View File

@ -91,7 +91,8 @@ class TestBase(testtools.TestCase):
{
'name': 'master',
'node_processes': ['namenode', 'oozie', 'resourcemanager'],
'flavor': '2'
'flavor': '2',
'is_proxy_gateway': True
},
{
'name': 'worker',