Rename sync-all to the more accurate "sync-domains"

Change-Id: I7d89d5cb6e02b237396987c179583b64213bba78
This commit is contained in:
Kiall Mac Innes 2013-03-02 12:43:41 +00:00
parent 4072f43370
commit cd9e279779
7 changed files with 14 additions and 14 deletions

View File

@ -34,7 +34,7 @@
"use_blacklisted_domain": "rule:admin",
"diagnostics_ping": "rule:admin",
"diagnostics_sync_all": "rule:admin",
"diagnostics_sync_domains": "rule:admin",
"diagnostics_sync_domain": "rule:admin",
"diagnostics_sync_record": "rule:admin"
}

View File

@ -23,12 +23,12 @@ LOG = logging.getLogger(__name__)
blueprint = flask.Blueprint('sync', __name__)
@blueprint.route('/sync', methods=['POST'])
def sync_all():
@blueprint.route('/domains/sync', methods=['POST'])
def sync_domains():
context = flask.request.environ.get('context')
try:
central_api.sync_all(context)
central_api.sync_domains(context)
except exceptions.Forbidden:
return flask.Response(status=401)
except rpc_common.Timeout:

View File

@ -267,9 +267,9 @@ def delete_record(context, domain_id, record_id):
return RPC.call(context, msg)
def sync_all(context):
def sync_domains(context):
msg = {
'method': 'sync_all',
'method': 'sync_domains',
'args': {},
}

View File

@ -596,8 +596,8 @@ class Service(rpc_service.Service):
return self.storage_conn.delete_record(context, record_id)
# Diagnostics Methods
def sync_all(self, context):
policy.check('diagnostics_sync_all', context)
def sync_domains(self, context):
policy.check('diagnostics_sync_domains', context)
domains = self.storage_conn.get_domains(context)
results = {}

View File

@ -20,11 +20,11 @@ from moniker.central import api as central_api
LOG = logging.getLogger(__name__)
class SyncAllCommand(base.Command):
""" Sync Everything """
class SyncDomainsCommand(base.Command):
""" Sync All Domains """
def execute(self, parsed_args):
return central_api.sync_all(self.context)
return central_api.sync_domains(self.context)
class SyncDomainCommand(base.Command):

View File

@ -34,8 +34,8 @@ def upgrade(migrate_engine):
domain_count = domains_table.count().execute().first()[0]
if domain_count > 0:
LOG.warn('A sync-all is now required in order for the API provided, '
'and backend provided serial numbers to align')
LOG.warn('A sync-domains is now required in order for the API '
'provided, and backend provided serial numbers to align')
def downgrade(migrate_engine):

View File

@ -97,7 +97,7 @@ setup(
tsigkey-update = moniker.manage.tsigkeys:UpdateTsigKeyCommand
tsigkey-delete = moniker.manage.tsigkeys:DeleteTsigKeyCommand
sync-all = moniker.manage.sync:SyncAllCommand
sync-domains = moniker.manage.sync:SyncDomainsCommand
sync-domain = moniker.manage.sync:SyncDomainCommand
sync-record = moniker.manage.sync:SyncRecordCommand
"""),