In PostgreSQL there are special types for storing IPv4, IPv6 address and
subnetworks and also MAC addresses. Storing data in these types is more
efficient than in strings because it requires less space. In addition,
it provides additional operations for columns of these types.
This patch changes types of some columns for models such as:
Reviewed: https:/ /review. openstack. org/235865 /git.openstack. org/cgit/ openstack/ fuel-web/ commit/ ?id=83bd490394e 1ca12e6729917ce 13d39b2a83f995
Committed: https:/
Submitter: Jenkins
Branch: master
commit 83bd490394e1ca1 2e6729917ce13d3 9b2a83f995
Author: smurashov <email address hidden>
Date: Fri Oct 16 14:23:21 2015 +0300
Use appropriate types to store IP and MAC addrs
In PostgreSQL there are special types for storing IPv4, IPv6 address and
subnetworks and also MAC addresses. Storing data in these types is more
efficient than in strings because it requires less space. In addition,
it provides additional operations for columns of these types.
This patch changes types of some columns for models such as:
IPAddr
ip_ addr: inet
IPAddrRange
first: inet
last: inet
Node
mac: macaddr
ip: inet
mac: macaddr
mac: macaddr
cidr: cidr
Co-Authored-By: Ilya Kharin <email address hidden> 1a1cc29fc865d57 359b29d0e35
Change-Id: Id8431eb7d2e3ca
Partial-Bug: #1484973