DB String Type Cleanup

Registered by Rick Harris

The proposal here is to change from using SQLAlchemy's String type directly in our models to using logical datatypes that may or may not (depending on the database) map to string columns under the hood.

Blueprint information

Status:
Not started
Approver:
None
Priority:
Undefined
Drafter:
Rick Harris
Direction:
Needs approval
Assignee:
Rick Harris
Definition:
Drafting
Series goal:
None
Implementation:
Unknown
Milestone target:
None

Related branches

Sprints

Whiteboard

Looks like a good idea to enforce some consistency and reduce errors in the models & migrations.

Gerrit topic: https://review.openstack.org/#q,topic:bp/db-string-type-cleanup,n,z

Addressed by: https://review.openstack.org/53417
    Use types.UUID instead of String(36)

Addressed by: https://review.openstack.org/53454
    Use types.IPAddress() instead of String(39)

Addressed by: https://review.openstack.org/53463
    Use types.CIDR instead of String(43)

Addressed by: https://review.openstack.org/53464
    Use types.NetworkProtocol() instead of String(5)

Addressed by: https://review.openstack.org/53465
    Use types.PCIAddress() instead of String(12)

Addressed by: https://review.openstack.org/53466
    Use types.PCIDeviceType() instead of String(8)

Addressed by: https://review.openstack.org/53469
    Use PCIProductID()/PCIVendorID() instead of String(4)

Addressed by: https://review.openstack.org/53471
    Use String(255) instead of String(256)

Addressed by: https://review.openstack.org/53476
    Use types.String() instead of String(255)

Addressed by: https://review.openstack.org/53692
    Use types.SMBackendConfigParams instead of String(2047)
Looks like a good idea to enforce some consistency and reduce errors in the models & migrations.

Gerrit topic: https://review.openstack.org/#q,topic:bp/db-string-type-cleanup,n,z

Addressed by: https://review.openstack.org/53417
    Use types.UUID instead of String(36)

Addressed by: https://review.openstack.org/53454
    Use types.IPAddress() instead of String(39)

Addressed by: https://review.openstack.org/53463
    Use types.CIDR instead of String(43)

Addressed by: https://review.openstack.org/53464
    Use types.NetworkProtocol() instead of String(5)

Addressed by: https://review.openstack.org/53465
    Use types.PCIAddress() instead of String(12)

Addressed by: https://review.openstack.org/53466
    Use types.PCIDeviceType() instead of String(8)

Addressed by: https://review.openstack.org/53469
    Use PCIProductID()/PCIVendorID() instead of String(4)

Addressed by: https://review.openstack.org/53471
    Use String(255) instead of String(256)

Addressed by: https://review.openstack.org/53476
    Use types.String() instead of String(255)

Addressed by: https://review.openstack.org/53692
    Use types.SMBackendConfigParams instead of String(2047)

If you are still working on this, please re-submit via nova-specs. If not, please mark as obsolete, and add a quick comment to describe why. --johnthetubaguy (20th April 2014)

(?)

Work Items

This blueprint contains Public information 
Everyone can see this information.