778bd9dd4b
*Adds a metadata field to API calls if there is metadata *Adds objects.base.PagedListObjectMixin to hold metadata fields *Adds a count_x call to domains/recordsets _find_x to get data *Unit tests for metadata/total_count Change-Id: I6929e933afad1570603e9276ccf33cf45bb349d3 Implements: blueprint zones-and-record-totalcount
44 lines
1.3 KiB
Python
44 lines
1.3 KiB
Python
# Copyright (c) 2014 Rackspace Hosting
|
|
# All Rights Reserved.
|
|
#
|
|
# 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 designate.objects import base
|
|
|
|
|
|
class Domain(base.DictObjectMixin, base.SoftDeleteObjectMixin,
|
|
base.PersistentObjectMixin, base.DesignateObject):
|
|
FIELDS = {
|
|
'tenant_id': {},
|
|
'name': {},
|
|
'email': {},
|
|
'ttl': {},
|
|
'refresh': {},
|
|
'retry': {},
|
|
'expire': {},
|
|
'minimum': {},
|
|
'parent_domain_id': {},
|
|
'serial': {},
|
|
'description': {},
|
|
'status': {},
|
|
'action': {},
|
|
'pool_id': {},
|
|
'recordsets': {
|
|
'relation': True
|
|
}
|
|
}
|
|
|
|
|
|
class DomainList(base.ListObjectMixin, base.DesignateObject,
|
|
base.PagedListObjectMixin):
|
|
LIST_ITEM_TYPE = Domain
|