Exemplo n.º 1
0
def _log_module(module, primary_module):
    for record in launchpad_utils.lp_blueprint_generator(module):
        for field in LINK_FIELDS:
            link = record[field + '_link']
            if link:
                record[field] = launchpad_utils.link_to_launchpad_id(link)
                del record[field + '_link']
        for field in DATE_FIELDS:
            date = record[field]
            if date:
                record[field] = utils.iso8601_to_timestamp(date)

        record['module'] = primary_module
        record['id'] = utils.get_blueprint_id(primary_module, record['name'])

        LOG.debug('New blueprint: %s', record)
        yield record
Exemplo n.º 2
0
def log(repo):
    module = repo['module']
    LOG.debug('Retrieving list of blueprints for module: %s', module)

    if not launchpad_utils.lp_module_exists(module):
        LOG.debug('Module %s not exist at Launchpad', module)
        return

    for record in launchpad_utils.lp_blueprint_generator(module):
        for field in LINK_FIELDS:
            link = record[field + '_link']
            if link:
                record[field] = _link_to_launchpad_id(link)
                del record[field + '_link']
        for field in DATE_FIELDS:
            date = record[field]
            if date:
                record[field] = utils.iso8601_to_timestamp(date)

        record['module'] = module
        record['id'] = utils.get_blueprint_id(module, record['name'])

        LOG.debug('New blueprint: %s', record)
        yield record
Exemplo n.º 3
0
def log(repo):
    module = repo['module']
    LOG.debug('Retrieving list of blueprints for module: %s', module)

    if not launchpad_utils.lp_module_exists(module):
        LOG.debug('Module %s does not exist at Launchpad', module)
        return

    for record in launchpad_utils.lp_blueprint_generator(module):
        for field in LINK_FIELDS:
            link = record[field + '_link']
            if link:
                record[field] = launchpad_utils.link_to_launchpad_id(link)
                del record[field + '_link']
        for field in DATE_FIELDS:
            date = record[field]
            if date:
                record[field] = utils.iso8601_to_timestamp(date)

        record['module'] = module
        record['id'] = utils.get_blueprint_id(module, record['name'])

        LOG.debug('New blueprint: %s', record)
        yield record