'Generates a list of docker commands based on provided configuration.
:param rpm_setup_config: A list of .rpm or .repo paths or URLs
(can be empty)
:return: A list of docker commands'

def build_rpm_setup(self, rpm_setup_config):

    rpm_setup = list()
    for config in rpm_setup_config:
        if config.endswith('.rpm'):
            cmd = 'RUN    yum    -y    install    {}'.format(config)
        elif config.endswith('.repo'):
            if config.startswith('http'):
                name = config.split('/')[(-1)]
                cmd = 'RUN    curl    -L    {}    -o    /etc/yum.repos.d/{}'.format(config, name)
            else:
                cmd = 'COPY    {}    /etc/yum.repos.d/'.format(config)
        elif (not config):
            cmd = ''
        else:
            raise exception.KollaRpmSetupUnknownConfig('RPM    setup    must    be    provided    as    .rpm    or    .repo    files.    Attempted    configuration    was    {}'.format(config))
        rpm_setup.append(cmd)
    return rpm_setup
