Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 3 additions & 3 deletions neutron/db/db_base_plugin_common.py
Original file line number Diff line number Diff line change
Expand Up @@ -144,9 +144,9 @@ def _store_ip_allocation(context, ip_address, network_id, subnet_id,

def _make_subnet_dict(self, subnet, fields=None, context=None):
if isinstance(subnet, subnet_obj.Subnet):
standard_attr_id = subnet.db_obj.standard_attr.id
standard_attr_id = subnet.db_obj.standard_attr_id
else:
standard_attr_id = subnet.standard_attr.id
standard_attr_id = subnet.standard_attr_id

res = {'id': subnet['id'],
'name': subnet['name'],
Expand Down Expand Up @@ -335,7 +335,7 @@ def _make_network_dict(self, network, fields=None,
'status': network['status'],
'subnets': [subnet['id']
for subnet in network['subnets']],
'standard_attr_id': network.standard_attr.id}
'standard_attr_id': network.standard_attr_id}
res['shared'] = self._is_network_shared(context, network.rbac_entries)
# Call auxiliary extend functions, if any
if process_extensions:
Expand Down
2 changes: 1 addition & 1 deletion neutron/db/l3_db.py
Original file line number Diff line number Diff line change
Expand Up @@ -1231,7 +1231,7 @@ def _make_floatingip_dict(self, floatingip, fields=None,
'port_id': floatingip.fixed_port_id,
'fixed_ip_address': fixed_ip_address,
'status': floatingip.status,
'standard_attr_id': floatingip.db_obj.standard_attr.id,
'standard_attr_id': floatingip.db_obj.standard_attr_id,
}
# NOTE(mlavalle): The following assumes this mixin is used in a
# class inheriting from CommonDbMixin, which is true for all existing
Expand Down
2 changes: 1 addition & 1 deletion neutron/db/migration/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -55,7 +55,7 @@
WALLABY,
XENA,
YOGA,
RELEASE_2023_1,
ZED,
# Do not add the milestone until the end of the release
]

Expand Down
2 changes: 1 addition & 1 deletion neutron/db/securitygroups_db.py
Original file line number Diff line number Diff line change
Expand Up @@ -330,7 +330,7 @@ def _make_security_group_dict(self, security_group, fields=None):
'stateful': security_group['stateful'],
'tenant_id': security_group['tenant_id'],
'description': security_group['description'],
'standard_attr_id': security_group.db_obj.standard_attr.id,
'standard_attr_id': security_group.db_obj.standard_attr_id,
'shared': security_group['shared'],
}
if security_group.rules:
Expand Down
4 changes: 3 additions & 1 deletion neutron/tests/unit/fake_resources.py
Original file line number Diff line number Diff line change
Expand Up @@ -708,6 +708,7 @@ def create_one_fip(attrs=None):

# Set default attributes.
fake_uuid = uuidutils.generate_uuid()
standard_attr = FakeStandardAttribute()
fip_attrs = {
'id': 'fip-id-' + fake_uuid,
'tenant_id': '',
Expand All @@ -724,7 +725,8 @@ def create_one_fip(attrs=None):
'dns_domain': '',
'dns_name': '',
'project_id': '',
'standard_attr': FakeStandardAttribute(),
'standard_attr': standard_attr,
'standard_attr_id': standard_attr.id,
'qos_policy_binding': FakeQosFIPPolicyBinding(),
'qos_network_policy_binding': FakeQosNetworkPolicyBinding(),
}
Expand Down