diff options
author | Kevin Benton <kevin@benton.pub> | 2016-02-10 17:00:21 -0800 |
---|---|---|
committer | Kevin Benton <kevin@benton.pub> | 2016-03-05 02:29:35 +0000 |
commit | 5dacbba701037200f9b0ae40c34981ecd941b41c (patch) | |
tree | f2a3d938b54ae49309ca7fdf20e7e738bbeee2d3 /neutron/db/db_base_plugin_common.py | |
parent | 4c2c983618ddb7a528c9005b0d7aaf5322bd198d (diff) | |
download | neutron-5dacbba701037200f9b0ae40c34981ecd941b41c.tar.gz |
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 <jamesd@catalyst.net.nz>
APIImpact
DocImpact: Adds a description field to all resources outline in
commit message.
Closes-Bug: #1483480
Change-Id: I6e1ef53d7aae7d04a5485810cc1db0a8eb125953
Diffstat (limited to 'neutron/db/db_base_plugin_common.py')
-rw-r--r-- | neutron/db/db_base_plugin_common.py | 3 |
1 files changed, 2 insertions, 1 deletions
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'] |