[Urgent] Fix sec-group unit tests and smoke tests
1. What is the problem (1) In this patch[1] of Neutron project, new object model for security group is used. As a result, the "remote_ip_prefix" field returned by "get_security_group_rule" is an AuthenticIPNetwork object instead of a string, so our "_compare_rule" method fails to recognize two identical rules. (2) After this patch[2] of devstack-gate project, horizon is no longer the default project to be deployed in gate test, so enable horizon in our own local.conf without explicitly enabling horizon in the gate test will cause gate test to fail. 2. What is the solution for the problem (1) Use str() to transform the AuthenticIPNetwork object to string. (2) Disable horizon in our own local.conf since we don't need it. 3. What features need to be implemented to the Tricircle to realize the solution N/A [1] https://github.com/openstack/neutron/commit/ af52d499a53f9dddacd8c9116d1bb0570e8f579c [2] https://github.com/openstack-infra/devstack-gate/commit/ e1b6e9f1d6532fe87a8947a633e254d14aeb8fc0 Change-Id: I57ac130cb2383f2912fc6c0af646fb84ab2cdd90
This commit is contained in:
parent
9bffb43330
commit
31c45b33dc
|
@ -42,7 +42,7 @@ class TricircleSecurityGroupMixin(securitygroups_db.SecurityGroupDbMixin):
|
|||
def _compare_rule(rule1, rule2):
|
||||
for key in ('direction', 'remote_ip_prefix', 'protocol', 'ethertype',
|
||||
'port_range_max', 'port_range_min'):
|
||||
if rule1[key] != rule2[key]:
|
||||
if rule1[key] != rule2[key] and str(rule1[key]) != str(rule2[key]):
|
||||
return False
|
||||
return True
|
||||
|
||||
|
|
|
@ -30,7 +30,7 @@ function _setup_tricircle_multinode {
|
|||
SUBNODE_IP=$(head -n1 /etc/nodepool/sub_nodes_private)
|
||||
|
||||
export OVERRIDE_ENABLED_SERVICES="c-api,c-bak,c-sch,c-vol,cinder,"
|
||||
export OVERRIDE_ENABLED_SERVICES+="g-api,g-reg,horizon,key,"
|
||||
export OVERRIDE_ENABLED_SERVICES+="g-api,g-reg,key,"
|
||||
export OVERRIDE_ENABLED_SERVICES+="n-api,n-cauth,n-cond,n-cpu,n-crt,"
|
||||
export OVERRIDE_ENABLED_SERVICES+="n-novnc,n-obj,n-sch,"
|
||||
export OVERRIDE_ENABLED_SERVICES+="placement-api,placement-client,"
|
||||
|
|
|
@ -28,6 +28,7 @@ class TricircleSecurityGroupTestMixin(object):
|
|||
return {'security_group_id': sg_id,
|
||||
'id': _id,
|
||||
'tenant_id': project_id,
|
||||
'project_id': project_id,
|
||||
'remote_group_id': remote_group,
|
||||
'direction': 'ingress',
|
||||
'remote_ip_prefix': ip_prefix,
|
||||
|
|
Loading…
Reference in New Issue