diff options
-rw-r--r-- | nova/network/security_group/quantum_driver.py | 8 | ||||
-rw-r--r-- | nova/tests/api/openstack/compute/contrib/test_quantum_security_groups.py | 4 |
2 files changed, 6 insertions, 6 deletions
diff --git a/nova/network/security_group/quantum_driver.py b/nova/network/security_group/quantum_driver.py index d8696afd2..595400c42 100644 --- a/nova/network/security_group/quantum_driver.py +++ b/nova/network/security_group/quantum_driver.py @@ -90,8 +90,8 @@ class SecurityGroupAPI(security_group_base.SecurityGroupBase): nova_rule['to_port'] = -1 else: nova_rule['to_port'] = rule['port_range_max'] - nova_rule['group_id'] = rule['source_group_id'] - nova_rule['cidr'] = rule['source_ip_prefix'] + nova_rule['group_id'] = rule['remote_group_id'] + nova_rule['cidr'] = rule['remote_ip_prefix'] return nova_rule def get(self, context, name=None, id=None, map_exception=False): @@ -205,9 +205,9 @@ class SecurityGroupAPI(security_group_base.SecurityGroupBase): new_rule['ethertype'] = 'IPv4' else: new_rule['ethertype'] = utils.get_ip_version(rule.get('cidr')) - new_rule['source_ip_prefix'] = rule.get('cidr') + new_rule['remote_ip_prefix'] = rule.get('cidr') new_rule['security_group_id'] = rule.get('parent_group_id') - new_rule['source_group_id'] = rule.get('group_id') + new_rule['remote_group_id'] = rule.get('group_id') if rule['from_port'] != -1: new_rule['port_range_min'] = rule['from_port'] if rule['to_port'] != -1: diff --git a/nova/tests/api/openstack/compute/contrib/test_quantum_security_groups.py b/nova/tests/api/openstack/compute/contrib/test_quantum_security_groups.py index 70c430860..a413babdf 100644 --- a/nova/tests/api/openstack/compute/contrib/test_quantum_security_groups.py +++ b/nova/tests/api/openstack/compute/contrib/test_quantum_security_groups.py @@ -532,8 +532,8 @@ class MockClient(object): # does not handle bulk case so just picks rule[0] r = body.get('security_group_rules')[0] fields = ['direction', 'protocol', 'port_range_min', 'port_range_max', - 'ethertype', 'source_ip_prefix', 'tenant_id', - 'security_group_id', 'source_group_id'] + 'ethertype', 'remote_ip_prefix', 'tenant_id', + 'security_group_id', 'remote_group_id'] ret = {} for field in fields: ret[field] = r.get(field) |