'Get remote profiles and distros and sync them locally'

def run(self, cobbler_master=None, port='80', distro_patterns=None, profile_patterns=None, system_patterns=None, repo_patterns=None, image_patterns=None, mgmtclass_patterns=None, package_patterns=None, file_patterns=None, prune=False, omit_data=False, sync_all=False, use_ssl=False):

    self.port = str(port)
    self.distro_patterns = distro_patterns.split()
    self.profile_patterns = profile_patterns.split()
    self.system_patterns = system_patterns.split()
    self.repo_patterns = repo_patterns.split()
    self.image_patterns = image_patterns.split()
    self.mgmtclass_patterns = mgmtclass_patterns.split()
    self.package_patterns = package_patterns.split()
    self.file_patterns = file_patterns.split()
    self.omit_data = omit_data
    self.prune = prune
    self.sync_all = sync_all
    self.use_ssl = use_ssl
    if self.use_ssl:
        protocol = 'https'
    else:
        protocol = 'http'
    if (cobbler_master is not None):
        self.master = cobbler_master
    elif (len(self.settings.cobbler_master) > 0):
        self.master = self.settings.cobbler_master
    else:
        utils.die(self.logger, 'No    cobbler    master    specified,    try    --master.')
    self.uri = ('%s://%s:%s/cobbler_api' % (protocol, self.master, self.port))
    self.logger.info(('cobbler_master                        =    %s' % cobbler_master))
    self.logger.info(('port                                                                =    %s' % self.port))
    self.logger.info(('distro_patterns                    =    %s' % self.distro_patterns))
    self.logger.info(('profile_patterns                =    %s' % self.profile_patterns))
    self.logger.info(('system_patterns                    =    %s' % self.system_patterns))
    self.logger.info(('repo_patterns                            =    %s' % self.repo_patterns))
    self.logger.info(('image_patterns                        =    %s' % self.image_patterns))
    self.logger.info(('mgmtclass_patterns        =    %s' % self.mgmtclass_patterns))
    self.logger.info(('package_patterns                =    %s' % self.package_patterns))
    self.logger.info(('file_patterns                            =    %s' % self.file_patterns))
    self.logger.info(('omit_data                                            =    %s' % self.omit_data))
    self.logger.info(('sync_all                                                =    %s' % self.sync_all))
    self.logger.info(('use_ssl                                                    =    %s' % self.use_ssl))
    self.logger.info(('XMLRPC    endpoint:    %s' % self.uri))
    self.logger.debug('test    ALPHA')
    self.remote = xmlrpclib.Server(self.uri)
    self.logger.debug('test    BETA')
    self.remote.ping()
    self.local = xmlrpclib.Server(('http://127.0.0.1:%s/cobbler_api' % self.settings.http_port))
    self.local.ping()
    self.replicate_data()
    self.link_distros()
    self.logger.info('Syncing')
    self.api.sync(logger=self.logger)
    self.logger.info('Done')
