Esempio n. 1
0
def list_cmd():
    """
    List available collections and mock configs.
    """
    click.echo()
    click.echo('Available software collections: {}'.format(':'.join(get_build_order())))
    click.echo('Available mock configs: {}'.format(':'.join(get_mock_configs())))
Esempio n. 2
0
def list_cmd():
    """
    List available collections and mock configs.
    """
    click.echo()
    click.echo('Available software collections: {}'.format(':'.join(
        get_build_order())))
    click.echo('Available mock configs: {}'.format(':'.join(
        get_mock_configs())))
Esempio n. 3
0
 def convert(self, value, param, ctx):
     expected_cfgs = get_mock_configs()
     expected_cfgs.append('all')
     actual_cfgs = value.split(':')
     if 'all' in actual_cfgs:
         actual_cfgs = list(set(expected_cfgs) - set(actual_cfgs))
     if set(actual_cfgs) - set(expected_cfgs):
         self.fail(u'You must choose from following options: {0}.'.format(expected_cfgs))
     if not actual_cfgs:
         self.fail(u'¯\_(ツ)_/¯ You\'ve tried to be too smart and you end up with nothing to build with.')
     return actual_cfgs
Esempio n. 4
0
 def convert(self, value, param, ctx):
     expected_cfgs = get_mock_configs()
     expected_cfgs.append('all')
     actual_cfgs = value.split(':')
     if 'all' in actual_cfgs:
         actual_cfgs = list(set(expected_cfgs) - set(actual_cfgs))
     if set(actual_cfgs) - set(expected_cfgs):
         self.fail(u'You must choose from following options: {0}.'.format(
             expected_cfgs))
     if not actual_cfgs:
         self.fail(
             u'¯\_(ツ)_/¯ You\'ve tried to be too smart and you end up with nothing to build with.'
         )
     return actual_cfgs