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:
parent
ea993f12c2
commit
3b89217a8b
|
@ -44,6 +44,7 @@ clusters:
|
||||||
- YARN_NODEMANAGER
|
- YARN_NODEMANAGER
|
||||||
- ZOOKEEPER_SERVER
|
- ZOOKEEPER_SERVER
|
||||||
auto_security_group: true
|
auto_security_group: true
|
||||||
|
is_proxy_gateway: true
|
||||||
- name: master-additional
|
- name: master-additional
|
||||||
flavor: ${medium_flavor_id}
|
flavor: ${medium_flavor_id}
|
||||||
node_processes:
|
node_processes:
|
||||||
|
|
|
@ -17,6 +17,7 @@ clusters:
|
||||||
- jobtracker
|
- jobtracker
|
||||||
- namenode
|
- namenode
|
||||||
auto_security_group: true
|
auto_security_group: true
|
||||||
|
is_proxy_gateway: true
|
||||||
cluster_template:
|
cluster_template:
|
||||||
name: fake01
|
name: fake01
|
||||||
node_group_templates:
|
node_group_templates:
|
||||||
|
|
|
@ -16,6 +16,7 @@ clusters:
|
||||||
- SECONDARY_NAMENODE
|
- SECONDARY_NAMENODE
|
||||||
- ZOOKEEPER_SERVER
|
- ZOOKEEPER_SERVER
|
||||||
auto_security_group: true
|
auto_security_group: true
|
||||||
|
is_proxy_gateway: true
|
||||||
- name: worker
|
- name: worker
|
||||||
flavor: ${ci_flavor_id}
|
flavor: ${ci_flavor_id}
|
||||||
node_processes:
|
node_processes:
|
||||||
|
|
|
@ -25,6 +25,7 @@ clusters:
|
||||||
auto_security_group: true
|
auto_security_group: true
|
||||||
volumes_per_node: 2
|
volumes_per_node: 2
|
||||||
volumes_size: 20
|
volumes_size: 20
|
||||||
|
is_proxy_gateway: true
|
||||||
- name: worker
|
- name: worker
|
||||||
flavor: ${ci_flavor_id}
|
flavor: ${ci_flavor_id}
|
||||||
node_processes:
|
node_processes:
|
||||||
|
|
|
@ -9,6 +9,7 @@ clusters:
|
||||||
- master
|
- master
|
||||||
- namenode
|
- namenode
|
||||||
auto_security_group: true
|
auto_security_group: true
|
||||||
|
is_proxy_gateway: true
|
||||||
- name: worker
|
- name: worker
|
||||||
flavor: ${ci_flavor_id}
|
flavor: ${ci_flavor_id}
|
||||||
node_processes:
|
node_processes:
|
||||||
|
|
|
@ -28,6 +28,7 @@ clusters:
|
||||||
- resourcemanager
|
- resourcemanager
|
||||||
- namenode
|
- namenode
|
||||||
auto_security_group: true
|
auto_security_group: true
|
||||||
|
is_proxy_gateway: true
|
||||||
cluster_template:
|
cluster_template:
|
||||||
name: transient
|
name: transient
|
||||||
node_group_templates:
|
node_group_templates:
|
||||||
|
|
|
@ -39,6 +39,7 @@ clusters:
|
||||||
- secondarynamenode
|
- secondarynamenode
|
||||||
- nodemanager
|
- nodemanager
|
||||||
auto_security_group: true
|
auto_security_group: true
|
||||||
|
is_proxy_gateway: true
|
||||||
cluster_template:
|
cluster_template:
|
||||||
name: vanilla271
|
name: vanilla271
|
||||||
node_group_templates:
|
node_group_templates:
|
||||||
|
|
|
@ -237,7 +237,7 @@ This section is an array-type.
|
||||||
+---------------------------+------------------+----------+----------+--------------------------------------------------+
|
+---------------------------+------------------+----------+----------+--------------------------------------------------+
|
||||||
| volume_type | string | | | |
|
| volume_type | string | | | |
|
||||||
+---------------------------+------------------+----------+----------+--------------------------------------------------+
|
+---------------------------+------------------+----------+----------+--------------------------------------------------+
|
||||||
| is_proxy_gateway | boolean | | False | |
|
| is_proxy_gateway | boolean | | False | use this node as proxy gateway |
|
||||||
+---------------------------+------------------+----------+----------+--------------------------------------------------+
|
+---------------------------+------------------+----------+----------+--------------------------------------------------+
|
||||||
|
|
||||||
|
|
||||||
|
|
|
@ -413,13 +413,22 @@ class BaseTestCase(base.BaseTestCase):
|
||||||
with open(template_file) as data:
|
with open(template_file) as data:
|
||||||
node_groups.append(json.load(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:
|
for ng in node_groups:
|
||||||
kwargs = dict(ng)
|
kwargs = dict(ng)
|
||||||
kwargs.update(self.plugin_opts)
|
kwargs.update(self.plugin_opts)
|
||||||
kwargs['flavor_id'] = self._get_flavor_id(kwargs['flavor'])
|
kwargs['flavor_id'] = self._get_flavor_id(kwargs['flavor'])
|
||||||
del kwargs['flavor']
|
del kwargs['flavor']
|
||||||
kwargs['name'] = utils.rand_name(kwargs['name'])
|
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 = self.__create_node_group_template(**kwargs)
|
||||||
ng_id_map[ng['name']] = ng_id
|
ng_id_map[ng['name']] = ng_id
|
||||||
return ng_id_map
|
return ng_id_map
|
||||||
|
|
|
@ -91,7 +91,8 @@ class TestBase(testtools.TestCase):
|
||||||
{
|
{
|
||||||
'name': 'master',
|
'name': 'master',
|
||||||
'node_processes': ['namenode', 'oozie', 'resourcemanager'],
|
'node_processes': ['namenode', 'oozie', 'resourcemanager'],
|
||||||
'flavor': '2'
|
'flavor': '2',
|
||||||
|
'is_proxy_gateway': True
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
'name': 'worker',
|
'name': 'worker',
|
||||||
|
|
Loading…
Reference in New Issue