Merge "Adding check of indirect access"
This commit is contained in:
commit
5deababe20
@ -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:
|
||||
|
@ -17,6 +17,7 @@ clusters:
|
||||
- jobtracker
|
||||
- namenode
|
||||
auto_security_group: true
|
||||
is_proxy_gateway: true
|
||||
cluster_template:
|
||||
name: fake01
|
||||
node_group_templates:
|
||||
|
@ -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:
|
||||
|
@ -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:
|
||||
|
@ -9,6 +9,7 @@ clusters:
|
||||
- master
|
||||
- namenode
|
||||
auto_security_group: true
|
||||
is_proxy_gateway: true
|
||||
- name: worker
|
||||
flavor: ${ci_flavor_id}
|
||||
node_processes:
|
||||
|
@ -28,6 +28,7 @@ clusters:
|
||||
- resourcemanager
|
||||
- namenode
|
||||
auto_security_group: true
|
||||
is_proxy_gateway: true
|
||||
cluster_template:
|
||||
name: transient
|
||||
node_group_templates:
|
||||
|
@ -39,6 +39,7 @@ clusters:
|
||||
- secondarynamenode
|
||||
- nodemanager
|
||||
auto_security_group: true
|
||||
is_proxy_gateway: true
|
||||
cluster_template:
|
||||
name: vanilla271
|
||||
node_group_templates:
|
||||
|
@ -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 |
|
||||
+---------------------------+------------------+----------+----------+--------------------------------------------------+
|
||||
|
||||
|
||||
|
@ -413,12 +413,21 @@ 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'])
|
||||
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
|
||||
|
@ -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',
|
||||
|
Loading…
Reference in New Issue
Block a user