summaryrefslogtreecommitdiff
path: root/designate/api
diff options
context:
space:
mode:
authorErik Olof Gunnar Andersson <eandersson@blizzard.com>2019-10-03 00:17:00 -0700
committerErik Olof Gunnar Andersson <eandersson@blizzard.com>2019-11-27 18:39:25 +0000
commit2108a22037d432ee938f37760ccdde93bdc1b04a (patch)
tree66802e0cfc1f4857f37ceb75aba305d63a8ca0fc /designate/api
parentd9fb34767c5bd9f8f822acc2b91715db45ab68db (diff)
downloaddesignate-2108a22037d432ee938f37760ccdde93bdc1b04a.tar.gz
Remove broken target sync extension
When we removed the pool-manager this was missed and the extension is no longer functional. Change-Id: Id3e5f87d18c7b6d79b44a6fa6df2f8efd2bf73ef
Diffstat (limited to 'designate/api')
-rw-r--r--designate/api/admin/controllers/extensions/target_sync.py54
1 files changed, 0 insertions, 54 deletions
diff --git a/designate/api/admin/controllers/extensions/target_sync.py b/designate/api/admin/controllers/extensions/target_sync.py
deleted file mode 100644
index 0126c0bb..00000000
--- a/designate/api/admin/controllers/extensions/target_sync.py
+++ /dev/null
@@ -1,54 +0,0 @@
-# COPYRIGHT 2015 Rackspace Inc.
-#
-# 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.
-
-import pecan
-from oslo_log import log as logging
-from oslo_config import cfg
-
-from designate.api.v2.controllers import rest
-from designate import exceptions
-
-LOG = logging.getLogger(__name__)
-CONF = cfg.CONF
-
-
-class TargetSyncController(rest.RestController):
-
- @staticmethod
- def get_path():
- return '.target_sync'
-
- @pecan.expose(template='json:', content_type='application/json')
- def post_all(self):
- """Initialize a Target Syncing"""
- request = pecan.request
- context = request.environ['context']
-
- body = request.body_dict
-
- fields = ['target_id', 'timestamp']
- for f in fields:
- if f not in body:
- raise exceptions.BadRequest('Failed to supply correct fields')
-
- if (not isinstance(body['timestamp'], int) or body['timestamp'] < 0):
- raise exceptions.BadRequest(
- 'Timestamp should be a positive integer')
-
- pool_id = CONF['service:pool_manager'].pool_id
-
- return {
- 'message': self.pool_mgr_api.target_sync(context, pool_id,
- body['target_id'], body['timestamp'])
- }