diff options
Diffstat (limited to 'designate/storage')
-rw-r--r-- | designate/storage/impl_sqlalchemy/migrate_repo/versions/103_support_cert_records.py | 29 | ||||
-rw-r--r-- | designate/storage/impl_sqlalchemy/tables.py | 2 |
2 files changed, 30 insertions, 1 deletions
diff --git a/designate/storage/impl_sqlalchemy/migrate_repo/versions/103_support_cert_records.py b/designate/storage/impl_sqlalchemy/migrate_repo/versions/103_support_cert_records.py new file mode 100644 index 00000000..85ba5b67 --- /dev/null +++ b/designate/storage/impl_sqlalchemy/migrate_repo/versions/103_support_cert_records.py @@ -0,0 +1,29 @@ +# Copyright 2021 Cloudification GmbH +# +# Author: cloudification <contact@cloudification.io> +# +# Licensed under the Apache License, Version 2.0 (the "License"); you may +# not use this file except in compliance with the License. You may obtain +# a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, WITHOUT +# WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the +# License for the specific language governing permissions and limitations +# under the License. + +from sqlalchemy import MetaData, Table, Enum + +meta = MetaData() + + +def upgrade(migrate_engine): + meta.bind = migrate_engine + + RECORD_TYPES = ['A', 'AAAA', 'CNAME', 'MX', 'SRV', 'TXT', 'SPF', 'NS', + 'PTR', 'SSHFP', 'SOA', 'NAPTR', 'CAA', 'CERT'] + + records_table = Table('recordsets', meta, autoload=True) + records_table.columns.type.alter(name='type', type=Enum(*RECORD_TYPES)) diff --git a/designate/storage/impl_sqlalchemy/tables.py b/designate/storage/impl_sqlalchemy/tables.py index 8adb14d2..6f4c4a81 100644 --- a/designate/storage/impl_sqlalchemy/tables.py +++ b/designate/storage/impl_sqlalchemy/tables.py @@ -29,7 +29,7 @@ CONF = cfg.CONF RESOURCE_STATUSES = ['ACTIVE', 'PENDING', 'DELETED', 'ERROR'] RECORD_TYPES = ['A', 'AAAA', 'CNAME', 'MX', 'SRV', 'TXT', 'SPF', 'NS', 'PTR', - 'SSHFP', 'SOA', 'NAPTR', 'CAA'] + 'SSHFP', 'SOA', 'NAPTR', 'CAA', 'CERT'] TASK_STATUSES = ['ACTIVE', 'PENDING', 'DELETED', 'ERROR', 'COMPLETE'] TSIG_ALGORITHMS = ['hmac-md5', 'hmac-sha1', 'hmac-sha224', 'hmac-sha256', |