From 5dacbba701037200f9b0ae40c34981ecd941b41c Mon Sep 17 00:00:00 2001 From: Kevin Benton Date: Wed, 10 Feb 2016 17:00:21 -0800 Subject: Add a description field to all standard resources In order to give users and operators more flexibility in annotating the purpose of various Neutron resources, this patch adds a description field limited to 255 chars to all of the Neutron resources that reference the standard attribute table. The resource that reference the table are the following: security_group_rules, security_groups, ports, subnets, networks, routers, floatingips, subnetpools This patch adds a description table related to standard attributes and migrates over the existing security group description to the new table as well. Co-Authored-By: James Dempsey APIImpact DocImpact: Adds a description field to all resources outline in commit message. Closes-Bug: #1483480 Change-Id: I6e1ef53d7aae7d04a5485810cc1db0a8eb125953 --- neutron/db/db_base_plugin_common.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'neutron/db/db_base_plugin_common.py') diff --git a/neutron/db/db_base_plugin_common.py b/neutron/db/db_base_plugin_common.py index 12775b0e77..3eebde0c1f 100644 --- a/neutron/db/db_base_plugin_common.py +++ b/neutron/db/db_base_plugin_common.py @@ -298,7 +298,8 @@ class DbBasePluginCommon(common_db_mixin.CommonDbMixin): 'cidr': str(detail.subnet_cidr), 'subnetpool_id': subnetpool_id, 'enable_dhcp': subnet['enable_dhcp'], - 'gateway_ip': gateway_ip} + 'gateway_ip': gateway_ip, + 'description': subnet.get('description')} if subnet['ip_version'] == 6 and subnet['enable_dhcp']: if attributes.is_attr_set(subnet['ipv6_ra_mode']): args['ipv6_ra_mode'] = subnet['ipv6_ra_mode'] -- cgit v1.2.1